Files
palkkakysely/analysaattori/assets/index-27bc9a0c.js
2023-09-28 13:02:58 +00:00

3655 lines
3.8 MiB
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(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<V){for(var e=Array(V),m=0;m<V;m++)e[m]=arguments[m+2];ke.children=e}if(F&&F.defaultProps)for(we in V=F.defaultProps,V)ke[we]===void 0&&(ke[we]=V[we]);return{$$typeof:gp,type:F,key:Xe,ref:G,props:ke,_owner:rm.current}}function eM(F,W){return{$$typeof:gp,type:F.type,key:W,ref:F.ref,props:F.props,_owner:F._owner}}function nm(F){return typeof F=="object"&&F!==null&&F.$$typeof===gp}function tM(F){var W={"=":"=0",":":"=2"};return"$"+F.replace(/[=:]/g,function(ue){return W[ue]})}var T2=/\/+/g;function fy(F,W){return typeof F=="object"&&F!==null&&F.key!=null?tM(""+F.key):W.toString(36)}function T0(F,W,ue,we,ke){var Xe=typeof F;(Xe==="undefined"||Xe==="boolean")&&(F=null);var G=!1;if(F===null)G=!0;else switch(Xe){case"string":case"number":G=!0;break;case"object":switch(F.$$typeof){case gp:case G4:G=!0}}if(G)return G=F,ke=ke(G),F=we===""?"."+fy(G,0):we,w2(ke)?(ue="",F!=null&&(ue=F.replace(T2,"$&/")+"/"),T0(ke,W,ue,"",function(m){return m})):ke!=null&&(nm(ke)&&(ke=eM(ke,ue+(!ke.key||G&&G.key===ke.key?"":(""+ke.key).replace(T2,"$&/")+"/")+F)),W.push(ke)),1;if(G=0,we=we===""?".":we+":",w2(F))for(var V=0;V<F.length;V++){Xe=F[V];var e=we+fy(Xe,V);G+=T0(Xe,W,ue,e,ke)}else if(e=q4(F),typeof e=="function")for(F=e.call(F),V=0;!(Xe=F.next()).done;)Xe=Xe.value,e=we+fy(Xe,V++),G+=T0(Xe,W,ue,e,ke);else if(Xe==="object")throw W=String(F),Error("Objects are not valid as a React child (found: "+(W==="[object Object]"?"object with keys {"+Object.keys(F).join(", ")+"}":W)+"). If you meant to render a collection of children, use an array instead.");return G}function $p(F,W,ue){if(F==null)return F;var we=[],ke=0;return T0(F,we,"","",function(Xe){return W.call(ue,Xe,ke++)}),we}function rM(F){if(F._status===-1){var W=F._result;W=W(),W.then(function(ue){(F._status===0||F._status===-1)&&(F._status=1,F._result=ue)},function(ue){(F._status===0||F._status===-1)&&(F._status=2,F._result=ue)}),F._status===-1&&(F._status=0,F._result=W)}if(F._status===1)return F._result.default;throw F._result}var Ws={current:null},A0={transition:null},nM={ReactCurrentDispatcher:Ws,ReactCurrentBatchConfig:A0,ReactCurrentOwner:rm};hi.Children={map:$p,forEach:function(F,W,ue){$p(F,function(){W.apply(this,arguments)},ue)},count:function(F){var W=0;return $p(F,function(){W++}),W},toArray:function(F){return $p(F,function(W){return W})||[]},only:function(F){if(!nm(F))throw Error("React.Children.only expected to receive a single React element child.");return F}};hi.Component=Kv;hi.Fragment=W4;hi.Profiler=Z4;hi.PureComponent=em;hi.StrictMode=Y4;hi.Suspense=J4;hi.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=nM;hi.cloneElement=function(F,W,ue){if(F==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+F+".");var we=$b({},F.props),ke=F.key,Xe=F.ref,G=F._owner;if(W!=null){if(W.ref!==void 0&&(Xe=W.ref,G=rm.current),W.key!==void 0&&(ke=""+W.key),F.type&&F.type.defaultProps)var V=F.type.defaultProps;for(e in W)t3.call(W,e)&&!r3.hasOwnProperty(e)&&(we[e]=W[e]===void 0&&V!==void 0?V[e]:W[e])}var e=arguments.length-2;if(e===1)we.children=ue;else if(1<e){V=Array(e);for(var m=0;m<e;m++)V[m]=arguments[m+2];we.children=V}return{$$typeof:gp,type:F.type,key:ke,ref:Xe,props:we,_owner:G}};hi.createContext=function(F){return F={$$typeof:j4,_currentValue:F,_currentValue2:F,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},F.Provider={$$typeof:X4,_context:F},F.Consumer=F};hi.createElement=n3;hi.createFactory=function(F){var W=n3.bind(null,F);return W.type=F,W};hi.createRef=function(){return{current:null}};hi.forwardRef=function(F){return{$$typeof:K4,render:F}};hi.isValidElement=nm;hi.lazy=function(F){return{$$typeof:$4,_payload:{_status:-1,_result:F},_init:rM}};hi.memo=function(F,W){return{$$typeof:Q4,type:F,compare:W===void 0?null:W}};hi.startTransition=function(F){var W=A0.transition;A0.transition={};try{F()}finally{A0.transition=W}};hi.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};hi.useCallback=function(F,W){return Ws.current.useCallback(F,W)};hi.useContext=function(F){return Ws.current.useContext(F)};hi.useDebugValue=function(){};hi.useDeferredValue=function(F){return Ws.current.useDeferredValue(F)};hi.useEffect=function(F,W){return Ws.current.useEffect(F,W)};hi.useId=function(){return Ws.current.useId()};hi.useImperativeHandle=function(F,W,ue){return Ws.current.useImperativeHandle(F,W,ue)};hi.useInsertionEffect=function(F,W){return Ws.current.useInsertionEffect(F,W)};hi.useLayoutEffect=function(F,W){return Ws.current.useLayoutEffect(F,W)};hi.useMemo=function(F,W){return Ws.current.useMemo(F,W)};hi.useReducer=function(F,W,ue){return Ws.current.useReducer(F,W,ue)};hi.useRef=function(F){return Ws.current.useRef(F)};hi.useState=function(F){return Ws.current.useState(F)};hi.useSyncExternalStore=function(F,W,ue){return Ws.current.useSyncExternalStore(F,W,ue)};hi.useTransition=function(){return Ws.current.useTransition()};hi.version="18.2.0";Jb.exports=hi;var Fn=Jb.exports;const Hi=fg(Fn);/**
* @license React
* react-jsx-runtime.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 aM=Fn,iM=Symbol.for("react.element"),oM=Symbol.for("react.fragment"),sM=Object.prototype.hasOwnProperty,lM=aM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,uM={key:!0,ref:!0,__self:!0,__source:!0};function a3(F,W,ue){var we,ke={},Xe=null,G=null;ue!==void 0&&(Xe=""+ue),W.key!==void 0&&(Xe=""+W.key),W.ref!==void 0&&(G=W.ref);for(we in W)sM.call(W,we)&&!uM.hasOwnProperty(we)&&(ke[we]=W[we]);if(F&&F.defaultProps)for(we in W=F.defaultProps,W)ke[we]===void 0&&(ke[we]=W[we]);return{$$typeof:iM,type:F,key:Xe,ref:G,props:ke,_owner:lM.current}}cg.Fragment=oM;cg.jsx=a3;cg.jsxs=a3;Kb.exports=cg;var xa=Kb.exports,i3={exports:{}},Dl={},o3={exports:{}},s3={};/**
* @license React
* scheduler.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.
*/(function(F){function W(b,a){var E=b.length;b.push(a);e:for(;0<E;){var y=E-1>>>1,z=b[y];if(0<ke(z,a))b[y]=a,b[E]=z,E=y;else break e}}function ue(b){return b.length===0?null:b[0]}function we(b){if(b.length===0)return null;var a=b[0],E=b.pop();if(E!==a){b[0]=E;e:for(var y=0,z=b.length,I=z>>>1;y<I;){var B=2*(y+1)-1,k=b[B],O=B+1,N=b[O];if(0>ke(k,E))O<z&&0>ke(N,k)?(b[y]=N,b[O]=E,y=O):(b[y]=k,b[B]=E,y=B);else if(O<z&&0>ke(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()-h<w)}function d(){if(g!==null){var b=F.unstable_now();h=b;var a=!0;try{a=g(!0,b)}finally{a?M():(u=!1,g=null)}}else u=!1}var M;if(typeof s=="function")M=function(){s(d)};else if(typeof MessageChannel<"u"){var T=new MessageChannel,C=T.port2;T.port1.onmessage=d,M=function(){C.postMessage(null)}}else M=function(){t(d,0)};function x(b){g=b,u||(u=!0,M())}function S(b,a){f=t(function(){b(F.unstable_now())},a)}F.unstable_IdlePriority=5,F.unstable_ImmediatePriority=1,F.unstable_LowPriority=4,F.unstable_NormalPriority=3,F.unstable_Profiling=null,F.unstable_UserBlockingPriority=2,F.unstable_cancelCallback=function(b){b.callback=null},F.unstable_continueExecution=function(){v||A||(v=!0,x(c))},F.unstable_forceFrameRate=function(b){0>b||125<b?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):w=0<b?Math.floor(1e3/b):5},F.unstable_getCurrentPriorityLevel=function(){return L},F.unstable_getFirstCallbackNode=function(){return ue(e)},F.unstable_next=function(b){switch(L){case 1:case 2:case 3:var a=3;break;default:a=L}var E=L;L=a;try{return b()}finally{L=E}},F.unstable_pauseExecution=function(){},F.unstable_requestPaint=function(){},F.unstable_runWithPriority=function(b,a){switch(b){case 1:case 2:case 3:case 4:case 5:break;default:b=3}var E=L;L=b;try{return a()}finally{L=E}},F.unstable_scheduleCallback=function(b,a,E){var y=F.unstable_now();switch(typeof E=="object"&&E!==null?(E=E.delay,E=typeof E=="number"&&0<E?y+E:y):E=y,b){case 1:var z=-1;break;case 2:z=250;break;case 5:z=1073741823;break;case 4:z=1e4;break;default:z=5e3}return z=E+z,b={id:P++,callback:a,priorityLevel:b,startTime:E,expirationTime:z,sortIndex:-1},E>y?(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<arguments.length;ue++)W+="&args[]="+encodeURIComponent(arguments[ue]);return"Minified React error #"+F+"; visit "+W+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var u3=new Set,Kd={};function Wh(F,W){Bv(F,W),Bv(F+"Capture",W)}function Bv(F,W){for(Kd[F]=W,F=0;F<W.length;F++)u3.add(W[F])}var jf=!(typeof window>"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||!(2<W.length)||W[0]!=="o"&&W[0]!=="O"||W[1]!=="n"&&W[1]!=="N")&&(dM(W,ue,ke,we)&&(ue=null),we||ke===null?hM(W)&&(ue===null?F.removeAttribute(W):F.setAttribute(W,""+ue)):ke.mustUseProperty?F[ke.propertyName]=ue===null?ke.type===3?!1:"":ue:(W=ke.attributeName,we=ke.attributeNamespace,ue===null?F.removeAttribute(W):(ke=ke.type,ue=ke===3||ke===4&&ue===!0?"":""+ue,we?F.setAttributeNS(we,W,ue):F.setAttribute(W,ue))))}var $f=l3.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,qp=Symbol.for("react.element"),xv=Symbol.for("react.portal"),bv=Symbol.for("react.fragment"),sm=Symbol.for("react.strict_mode"),Qy=Symbol.for("react.profiler"),f3=Symbol.for("react.provider"),c3=Symbol.for("react.context"),lm=Symbol.for("react.forward_ref"),$y=Symbol.for("react.suspense"),qy=Symbol.for("react.suspense_list"),um=Symbol.for("react.memo"),Ic=Symbol.for("react.lazy"),h3=Symbol.for("react.offscreen"),S2=Symbol.iterator;function Ad(F){return F===null||typeof F!="object"?null:(F=S2&&F[S2]||F["@@iterator"],typeof F=="function"?F:null)}var fo=Object.assign,cy;function Id(F){if(cy===void 0)try{throw Error()}catch(ue){var W=ue.stack.trim().match(/\n( *(at )?)/);cy=W&&W[1]||""}return`
`+cy+F}var hy=!1;function vy(F,W){if(!F||hy)return"";hy=!0;var ue=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(W)if(W=function(){throw Error()},Object.defineProperty(W.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(W,[])}catch(m){var we=m}Reflect.construct(F,[],W)}else{try{W.call()}catch(m){we=m}F.call(W.prototype)}else{try{throw Error()}catch(m){we=m}F()}}catch(m){if(m&&we&&typeof m.stack=="string"){for(var ke=m.stack.split(`
`),Xe=we.stack.split(`
`),G=ke.length-1,V=Xe.length-1;1<=G&&0<=V&&ke[G]!==Xe[V];)V--;for(;1<=G&&0<=V;G--,V--)if(ke[G]!==Xe[V]){if(G!==1||V!==1)do if(G--,V--,0>V||ke[G]!==Xe[V]){var e=`
`+ke[G].replace(" at new "," at ");return F.displayName&&e.includes("<anonymous>")&&(e=e.replace("<anonymous>",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<ue.length;ke++)W["$"+ue[ke]]=!0;for(ue=0;ue<F.length;ue++)ke=W.hasOwnProperty("$"+F[ue].value),F[ue].selected!==ke&&(F[ue].selected=ke),ke&&we&&(F[ue].defaultSelected=!0)}else{for(ue=""+jc(ue),W=null,ke=0;ke<F.length;ke++){if(F[ke].value===ue){F[ke].selected=!0,we&&(F[ke].defaultSelected=!0);return}W!==null||F[ke].disabled||(W=F[ke])}W!==null&&(W.selected=!0)}}function a1(F,W){if(W.dangerouslySetInnerHTML!=null)throw Error(va(91));return fo({},W,{value:void 0,defaultValue:void 0,children:""+F._wrapperState.initialValue})}function L2(F,W){var ue=W.value;if(ue==null){if(ue=W.children,W=W.defaultValue,ue!=null){if(W!=null)throw Error(va(92));if(kd(ue)){if(1<ue.length)throw Error(va(93));ue=ue[0]}W=ue}W==null&&(W=""),ue=W}F._wrapperState={initialValue:jc(ue)}}function g3(F,W){var ue=jc(W.value),we=jc(W.defaultValue);ue!=null&&(ue=""+ue,ue!==F.value&&(F.value=ue),W.defaultValue==null&&F.defaultValue!==ue&&(F.defaultValue=ue)),we!=null&&(F.defaultValue=""+we)}function P2(F){var W=F.textContent;W===F._wrapperState.initialValue&&W!==""&&W!==null&&(F.value=W)}function y3(F){switch(F){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function i1(F,W){return F==null||F==="http://www.w3.org/1999/xhtml"?y3(W):F==="http://www.w3.org/2000/svg"&&W==="foreignObject"?"http://www.w3.org/1999/xhtml":F}var t0,m3=function(F){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(W,ue,we,ke){MSApp.execUnsafeLocalFunction(function(){return F(W,ue,we,ke)})}:F}(function(F,W){if(F.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in F)F.innerHTML=W;else{for(t0=t0||document.createElement("div"),t0.innerHTML="<svg>"+W.valueOf().toString()+"</svg>",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<W.length;F++)R2(W[F])}}function A3(F,W){return F(W)}function M3(){}var dy=!1;function S3(F,W,ue){if(dy)return F(W,ue);dy=!0;try{return A3(F,W,ue)}finally{dy=!1,(kv!==null||Fv!==null)&&(M3(),T3())}}function Qd(F,W){var ue=F.stateNode;if(ue===null)return null;var we=gg(ue);if(we===null)return null;ue=we[W];e:switch(W){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(we=!we.disabled)||(F=F.type,we=!(F==="button"||F==="input"||F==="select"||F==="textarea")),F=!we;break e;default:F=!1}if(F)return null;if(ue&&typeof ue!="function")throw Error(va(231,W,typeof ue));return ue}var f1=!1;if(jf)try{var Md={};Object.defineProperty(Md,"passive",{get:function(){f1=!0}}),window.addEventListener("test",Md,Md),window.removeEventListener("test",Md,Md)}catch{f1=!1}function bM(F,W,ue,we,ke,Xe,G,V,e){var m=Array.prototype.slice.call(arguments,3);try{W.apply(ue,m)}catch(P){this.onError(P)}}var Od=!1,z0=null,O0=!1,c1=null,wM={onError:function(F){Od=!0,z0=F}};function TM(F,W,ue,we,ke,Xe,G,V,e){Od=!1,z0=null,bM.apply(wM,arguments)}function AM(F,W,ue,we,ke,Xe,G,V,e){if(TM.apply(this,arguments),Od){if(Od){var m=z0;Od=!1,z0=null}else throw Error(va(198));O0||(O0=!0,c1=m)}}function Yh(F){var W=F,ue=F;if(F.alternate)for(;W.return;)W=W.return;else{F=W;do W=F,W.flags&4098&&(ue=W.return),F=W.return;while(F)}return W.tag===3?ue:null}function E3(F){if(F.tag===13){var W=F.memoizedState;if(W===null&&(F=F.alternate,F!==null&&(W=F.memoizedState)),W!==null)return W.dehydrated}return null}function D2(F){if(Yh(F)!==F)throw Error(va(188))}function MM(F){var W=F.alternate;if(!W){if(W=Yh(F),W===null)throw Error(va(188));return W!==F?null:F}for(var ue=F,we=W;;){var ke=ue.return;if(ke===null)break;var Xe=ke.alternate;if(Xe===null){if(we=ke.return,we!==null){ue=we;continue}break}if(ke.child===Xe.child){for(Xe=ke.child;Xe;){if(Xe===ue)return D2(ke),F;if(Xe===we)return D2(ke),W;Xe=Xe.sibling}throw Error(va(188))}if(ue.return!==we.return)ue=ke,we=Xe;else{for(var G=!1,V=ke.child;V;){if(V===ue){G=!0,ue=ke,we=Xe;break}if(V===we){G=!0,we=ke,ue=Xe;break}V=V.sibling}if(!G){for(V=Xe.child;V;){if(V===ue){G=!0,ue=Xe,we=ke;break}if(V===we){G=!0,we=Xe,ue=ke;break}V=V.sibling}if(!G)throw Error(va(189))}}if(ue.alternate!==we)throw Error(va(190))}if(ue.tag!==3)throw Error(va(188));return ue.stateNode.current===ue?F:W}function C3(F){return F=MM(F),F!==null?L3(F):null}function L3(F){if(F.tag===5||F.tag===6)return F;for(F=F.child;F!==null;){var W=L3(F);if(W!==null)return W;F=F.sibling}return null}var P3=Rl.unstable_scheduleCallback,I2=Rl.unstable_cancelCallback,SM=Rl.unstable_shouldYield,EM=Rl.unstable_requestPaint,Ao=Rl.unstable_now,CM=Rl.unstable_getCurrentPriorityLevel,cm=Rl.unstable_ImmediatePriority,R3=Rl.unstable_UserBlockingPriority,N0=Rl.unstable_NormalPriority,LM=Rl.unstable_LowPriority,D3=Rl.unstable_IdlePriority,hg=null,uf=null;function PM(F){if(uf&&typeof uf.onCommitFiberRoot=="function")try{uf.onCommitFiberRoot(hg,F,void 0,(F.current.flags&128)===128)}catch{}}var Du=Math.clz32?Math.clz32:IM,RM=Math.log,DM=Math.LN2;function IM(F){return 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;0<W;)ue=31-Du(W),ke=1<<ue,we|=F[ue],W&=~ke;return we}function kM(F,W){switch(F){case 1:case 2:case 4:return W+250;case 8:case 16:case 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 W+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function FM(F,W){for(var ue=F.suspendedLanes,we=F.pingedLanes,ke=F.expirationTimes,Xe=F.pendingLanes;0<Xe;){var G=31-Du(Xe),V=1<<G,e=ke[G];e===-1?(!(V&ue)||V&we)&&(ke[G]=kM(V,W)):e<=W&&(F.expiredLanes|=V),Xe&=~V}}function h1(F){return F=F.pendingLanes&-1073741825,F!==0?F:F&1073741824?1073741824:0}function I3(){var F=r0;return r0<<=1,!(r0&4194240)&&(r0=64),F}function py(F){for(var W=[],ue=0;31>ue;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<ue;){var ke=31-Du(ue),Xe=1<<ke;W[ke]=0,we[ke]=-1,F[ke]=-1,ue&=~Xe}}function hm(F,W){var ue=F.entangledLanes|=W;for(F=F.entanglements;ue;){var we=31-Du(ue),ke=1<<we;ke&W|F[we]&W&&(F[we]|=W),ue&=~ke}}var ki=0;function k3(F){return F&=-F,1<F?4<F?F&268435455?16:536870912:4:1}var F3,vm,_3,z3,O3,v1=!1,a0=[],Uc=null,Vc=null,Hc=null,$d=new Map,qd=new Map,_c=[],zM="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function k2(F,W){switch(F){case"focusin":case"focusout":Uc=null;break;case"dragenter":case"dragleave":Vc=null;break;case"mouseover":case"mouseout":Hc=null;break;case"pointerover":case"pointerout":$d.delete(W.pointerId);break;case"gotpointercapture":case"lostpointercapture":qd.delete(W.pointerId)}}function Sd(F,W,ue,we,ke,Xe){return F===null||F.nativeEvent!==Xe?(F={blockedOn:W,domEventName:ue,eventSystemFlags:we,nativeEvent:Xe,targetContainers:[ke]},W!==null&&(W=xp(W),W!==null&&vm(W)),F):(F.eventSystemFlags|=we,W=F.targetContainers,ke!==null&&W.indexOf(ke)===-1&&W.push(ke),F)}function OM(F,W,ue,we,ke){switch(W){case"focusin":return Uc=Sd(Uc,F,W,ue,we,ke),!0;case"dragenter":return Vc=Sd(Vc,F,W,ue,we,ke),!0;case"mouseover":return Hc=Sd(Hc,F,W,ue,we,ke),!0;case"pointerover":var Xe=ke.pointerId;return $d.set(Xe,Sd($d.get(Xe)||null,F,W,ue,we,ke)),!0;case"gotpointercapture":return Xe=ke.pointerId,qd.set(Xe,Sd(qd.get(Xe)||null,F,W,ue,we,ke)),!0}return!1}function N3(F){var W=Fh(F.target);if(W!==null){var ue=Yh(W);if(ue!==null){if(W=ue.tag,W===13){if(W=E3(ue),W!==null){F.blockedOn=W,O3(F.priority,function(){_3(ue)});return}}else if(W===3&&ue.stateNode.current.memoizedState.isDehydrated){F.blockedOn=ue.tag===3?ue.stateNode.containerInfo:null;return}}}F.blockedOn=null}function M0(F){if(F.blockedOn!==null)return!1;for(var W=F.targetContainers;0<W.length;){var ue=d1(F.domEventName,F.eventSystemFlags,W[0],F.nativeEvent);if(ue===null){ue=F.nativeEvent;var we=new ue.constructor(ue.type,ue);l1=we,ue.target.dispatchEvent(we),l1=null}else return W=xp(ue),W!==null&&vm(W),F.blockedOn=ue,!1;W.shift()}return!0}function F2(F,W,ue){M0(F)&&ue.delete(W)}function NM(){v1=!1,Uc!==null&&M0(Uc)&&(Uc=null),Vc!==null&&M0(Vc)&&(Vc=null),Hc!==null&&M0(Hc)&&(Hc=null),$d.forEach(F2),qd.forEach(F2)}function Ed(F,W){F.blockedOn===W&&(F.blockedOn=null,v1||(v1=!0,Rl.unstable_scheduleCallback(Rl.unstable_NormalPriority,NM)))}function ep(F){function W(ke){return Ed(ke,F)}if(0<a0.length){Ed(a0[0],F);for(var ue=1;ue<a0.length;ue++){var we=a0[ue];we.blockedOn===F&&(we.blockedOn=null)}}for(Uc!==null&&Ed(Uc,F),Vc!==null&&Ed(Vc,F),Hc!==null&&Ed(Hc,F),$d.forEach(W),qd.forEach(W),ue=0;ue<_c.length;ue++)we=_c[ue],we.blockedOn===F&&(we.blockedOn=null);for(;0<_c.length&&(ue=_c[0],ue.blockedOn===null);)N3(ue),ue.blockedOn===null&&_c.shift()}var _v=$f.ReactCurrentBatchConfig,U0=!0;function BM(F,W,ue,we){var ke=ki,Xe=_v.transition;_v.transition=null;try{ki=1,dm(F,W,ue,we)}finally{ki=ke,_v.transition=Xe}}function UM(F,W,ue,we){var ke=ki,Xe=_v.transition;_v.transition=null;try{ki=4,dm(F,W,ue,we)}finally{ki=ke,_v.transition=Xe}}function dm(F,W,ue,we){if(U0){var ke=d1(F,W,ue,we);if(ke===null)Sy(F,W,we,V0,ue),k2(F,we);else if(OM(ke,F,W,ue,we))we.stopPropagation();else if(k2(F,we),W&4&&-1<zM.indexOf(F)){for(;ke!==null;){var Xe=xp(ke);if(Xe!==null&&F3(Xe),Xe=d1(F,W,ue,we),Xe===null&&Sy(F,W,we,V0,ue),Xe===ke)break;ke=Xe}ke!==null&&we.stopPropagation()}else Sy(F,W,we,null,ue)}}var V0=null;function d1(F,W,ue,we){if(V0=null,F=fm(we),F=Fh(F),F!==null)if(W=Yh(F),W===null)F=null;else if(ue=W.tag,ue===13){if(F=E3(W),F!==null)return F;F=null}else if(ue===3){if(W.stateNode.current.memoizedState.isDehydrated)return W.tag===3?W.stateNode.containerInfo:null;F=null}else W!==F&&(F=null);return V0=F,null}function B3(F){switch(F){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(CM()){case cm:return 1;case R3:return 4;case N0:case LM:return 16;case D3:return 536870912;default:return 16}default:return 16}}var Oc=null,pm=null,S0=null;function U3(){if(S0)return S0;var F,W=pm,ue=W.length,we,ke="value"in Oc?Oc.value:Oc.textContent,Xe=ke.length;for(F=0;F<ue&&W[F]===ke[F];F++);var G=ue-F;for(we=1;we<=G&&W[ue-we]===ke[Xe-we];we++);return S0=ke.slice(F,1<we?1-we:void 0)}function E0(F){var W=F.keyCode;return"charCode"in F?(F=F.charCode,F===0&&W===13&&(F=13)):F=W,F===10&&(F=13),32<=F||F===13?F:0}function i0(){return!0}function _2(){return!1}function Il(F){function W(ue,we,ke,Xe,G){this._reactName=ue,this._targetInst=ke,this.type=we,this.nativeEvent=Xe,this.target=G,this.currentTarget=null;for(var V in F)F.hasOwnProperty(V)&&(ue=F[V],this[V]=ue?ue(Xe):Xe[V]);return this.isDefaultPrevented=(Xe.defaultPrevented!=null?Xe.defaultPrevented:Xe.returnValue===!1)?i0:_2,this.isPropagationStopped=_2,this}return fo(W.prototype,{preventDefault:function(){this.defaultPrevented=!0;var ue=this.nativeEvent;ue&&(ue.preventDefault?ue.preventDefault():typeof ue.returnValue!="unknown"&&(ue.returnValue=!1),this.isDefaultPrevented=i0)},stopPropagation:function(){var ue=this.nativeEvent;ue&&(ue.stopPropagation?ue.stopPropagation():typeof ue.cancelBubble!="unknown"&&(ue.cancelBubble=!0),this.isPropagationStopped=i0)},persist:function(){},isPersistent:i0}),W}var Jv={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(F){return F.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},gm=Il(Jv),mp=fo({},Jv,{view:0,detail:0}),VM=Il(mp),gy,yy,Cd,vg=fo({},mp,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ym,button:0,buttons:0,relatedTarget:function(F){return F.relatedTarget===void 0?F.fromElement===F.srcElement?F.toElement:F.fromElement:F.relatedTarget},movementX:function(F){return"movementX"in F?F.movementX:(F!==Cd&&(Cd&&F.type==="mousemove"?(gy=F.screenX-Cd.screenX,yy=F.screenY-Cd.screenY):yy=gy=0,Cd=F),gy)},movementY:function(F){return"movementY"in F?F.movementY:yy}}),z2=Il(vg),HM=fo({},vg,{dataTransfer:0}),GM=Il(HM),WM=fo({},mp,{relatedTarget:0}),my=Il(WM),YM=fo({},Jv,{animationName:0,elapsedTime:0,pseudoElement:0}),ZM=Il(YM),XM=fo({},Jv,{clipboardData:function(F){return"clipboardData"in F?F.clipboardData:window.clipboardData}}),jM=Il(XM),KM=fo({},Jv,{data:0}),O2=Il(KM),JM={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},QM={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},$M={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function qM(F){var W=this.nativeEvent;return W.getModifierState?W.getModifierState(F):(F=$M[F])?!!W[F]:!1}function ym(){return qM}var eS=fo({},mp,{key:function(F){if(F.key){var W=JM[F.key]||F.key;if(W!=="Unidentified")return W}return F.type==="keypress"?(F=E0(F),F===13?"Enter":String.fromCharCode(F)):F.type==="keydown"||F.type==="keyup"?QM[F.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ym,charCode:function(F){return F.type==="keypress"?E0(F):0},keyCode:function(F){return F.type==="keydown"||F.type==="keyup"?F.keyCode:0},which:function(F){return F.type==="keypress"?E0(F):F.type==="keydown"||F.type==="keyup"?F.keyCode:0}}),tS=Il(eS),rS=fo({},vg,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),N2=Il(rS),nS=fo({},mp,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ym}),aS=Il(nS),iS=fo({},Jv,{propertyName:0,elapsedTime:0,pseudoElement:0}),oS=Il(iS),sS=fo({},vg,{deltaX:function(F){return"deltaX"in F?F.deltaX:"wheelDeltaX"in F?-F.wheelDeltaX:0},deltaY:function(F){return"deltaY"in F?F.deltaY:"wheelDeltaY"in F?-F.wheelDeltaY:"wheelDelta"in F?-F.wheelDelta:0},deltaZ:0,deltaMode:0}),lS=Il(sS),uS=[9,13,27,32],mm=jf&&"CompositionEvent"in window,Nd=null;jf&&"documentMode"in document&&(Nd=document.documentMode);var fS=jf&&"TextEvent"in window&&!Nd,V3=jf&&(!mm||Nd&&8<Nd&&11>=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.char.length)return W.char;if(W.which)return String.fromCharCode(W.which)}return null;case"compositionend":return V3&&W.locale!=="ko"?null:W.data;default:return null}}var vS={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function V2(F){var W=F&&F.nodeName&&F.nodeName.toLowerCase();return W==="input"?!!vS[F.type]:W==="textarea"}function W3(F,W,ue,we){w3(we),W=H0(W,"onChange"),0<W.length&&(ue=new gm("onChange","change",null,ue,we),F.push({event:ue,listeners:W}))}var Bd=null,tp=null;function dS(F){tw(F,0)}function dg(F){var W=Mv(F);if(d3(W))return F}function pS(F,W){if(F==="change")return W}var Y3=!1;if(jf){var xy;if(jf){var by="oninput"in document;if(!by){var H2=document.createElement("div");H2.setAttribute("oninput","return;"),by=typeof H2.oninput=="function"}xy=by}else xy=!1;Y3=xy&&(!document.documentMode||9<document.documentMode)}function G2(){Bd&&(Bd.detachEvent("onpropertychange",Z3),tp=Bd=null)}function Z3(F){if(F.propertyName==="value"&&dg(tp)){var W=[];W3(W,tp,F,fm(F)),S3(dS,W)}}function gS(F,W,ue){F==="focusin"?(G2(),Bd=W,tp=ue,Bd.attachEvent("onpropertychange",Z3)):F==="focusout"&&G2()}function yS(F){if(F==="selectionchange"||F==="keyup"||F==="keydown")return dg(tp)}function mS(F,W){if(F==="click")return dg(W)}function xS(F,W){if(F==="input"||F==="change")return dg(W)}function bS(F,W){return F===W&&(F!==0||1/F===1/W)||F!==F&&W!==W}var ku=typeof Object.is=="function"?Object.is:bS;function rp(F,W){if(ku(F,W))return!0;if(typeof F!="object"||F===null||typeof W!="object"||W===null)return!1;var ue=Object.keys(F),we=Object.keys(W);if(ue.length!==we.length)return!1;for(we=0;we<ue.length;we++){var ke=ue[we];if(!Jy.call(W,ke)||!ku(F[ke],W[ke]))return!1}return!0}function W2(F){for(;F&&F.firstChild;)F=F.firstChild;return F}function Y2(F,W){var ue=W2(F);F=0;for(var we;ue;){if(ue.nodeType===3){if(we=F+ue.textContent.length,F<=W&&we>=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<W.length;ue++)F=W[ue],F.element.scrollLeft=F.left,F.element.scrollTop=F.top}}var TS=jf&&"documentMode"in document&&11>=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"),0<we.length&&(W=new gm("onSelect","select",null,W,ue),F.push({event:W,listeners:we}),W.target=Tv)))}function o0(F,W){var ue={};return ue[F.toLowerCase()]=W.toLowerCase(),ue["Webkit"+F]="webkit"+W,ue["Moz"+F]="moz"+W,ue}var Av={animationend:o0("Animation","AnimationEnd"),animationiteration:o0("Animation","AnimationIteration"),animationstart:o0("Animation","AnimationStart"),transitionend:o0("Transition","TransitionEnd")},wy={},K3={};jf&&(K3=document.createElement("div").style,"AnimationEvent"in window||(delete Av.animationend.animation,delete Av.animationiteration.animation,delete Av.animationstart.animation),"TransitionEvent"in window||delete Av.transitionend.transition);function pg(F){if(wy[F])return wy[F];if(!Av[F])return F;var W=Av[F],ue;for(ue in W)if(W.hasOwnProperty(ue)&&ue in K3)return wy[F]=W[ue];return F}var J3=pg("animationend"),Q3=pg("animationiteration"),$3=pg("animationstart"),q3=pg("transitionend"),ew=new Map,X2="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Qc(F,W){ew.set(F,W),Wh(W,[F])}for(var Ty=0;Ty<X2.length;Ty++){var Ay=X2[Ty],AS=Ay.toLowerCase(),MS=Ay[0].toUpperCase()+Ay.slice(1);Qc(AS,"on"+MS)}Qc(J3,"onAnimationEnd");Qc(Q3,"onAnimationIteration");Qc($3,"onAnimationStart");Qc("dblclick","onDoubleClick");Qc("focusin","onFocus");Qc("focusout","onBlur");Qc(q3,"onTransitionEnd");Bv("onMouseEnter",["mouseout","mouseover"]);Bv("onMouseLeave",["mouseout","mouseover"]);Bv("onPointerEnter",["pointerout","pointerover"]);Bv("onPointerLeave",["pointerout","pointerover"]);Wh("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Wh("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Wh("onBeforeInput",["compositionend","keypress","textInput","paste"]);Wh("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Wh("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Wh("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var _d="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),SS=new Set("cancel close invalid load scroll toggle".split(" ").concat(_d));function j2(F,W,ue){var we=F.type||"unknown-event";F.currentTarget=ue,AM(we,W,void 0,F),F.currentTarget=null}function tw(F,W){W=(W&4)!==0;for(var ue=0;ue<F.length;ue++){var we=F[ue],ke=we.event;we=we.listeners;e:{var Xe=void 0;if(W)for(var G=we.length-1;0<=G;G--){var V=we[G],e=V.instance,m=V.currentTarget;if(V=V.listener,e!==Xe&&ke.isPropagationStopped())break e;j2(ke,V,m),Xe=e}else for(G=0;G<we.length;G++){if(V=we[G],e=V.instance,m=V.currentTarget,V=V.listener,e!==Xe&&ke.isPropagationStopped())break e;j2(ke,V,m),Xe=e}}}if(O0)throw F=c1,O0=!1,c1=null,F}function Xi(F,W){var ue=W[w1];ue===void 0&&(ue=W[w1]=new Set);var we=F+"__bubble";ue.has(we)||(rw(W,F,2,!1),ue.add(we))}function My(F,W,ue){var we=0;W&&(we|=4),rw(ue,F,we,W)}var s0="_reactListening"+Math.random().toString(36).slice(2);function np(F){if(!F[s0]){F[s0]=!0,u3.forEach(function(ue){ue!=="selectionchange"&&(SS.has(ue)||My(ue,!1,F),My(ue,!0,F))});var W=F.nodeType===9?F:F.ownerDocument;W===null||W[s0]||(W[s0]=!0,My("selectionchange",!1,W))}}function rw(F,W,ue,we){switch(B3(W)){case 1:var ke=BM;break;case 4:ke=UM;break;default:ke=dm}ue=ke.bind(null,W,ue,F),ke=void 0,!f1||W!=="touchstart"&&W!=="touchmove"&&W!=="wheel"||(ke=!0),we?ke!==void 0?F.addEventListener(W,ue,{capture:!0,passive:ke}):F.addEventListener(W,ue,!0):ke!==void 0?F.addEventListener(W,ue,{passive:ke}):F.addEventListener(W,ue,!1)}function Sy(F,W,ue,we,ke){var Xe=we;if(!(W&1)&&!(W&2)&&we!==null)e:for(;;){if(we===null)return;var G=we.tag;if(G===3||G===4){var V=we.stateNode.containerInfo;if(V===ke||V.nodeType===8&&V.parentNode===ke)break;if(G===4)for(G=we.return;G!==null;){var e=G.tag;if((e===3||e===4)&&(e=G.stateNode.containerInfo,e===ke||e.nodeType===8&&e.parentNode===ke))return;G=G.return}for(;V!==null;){if(G=Fh(V),G===null)return;if(e=G.tag,e===5||e===6){we=Xe=G;continue e}V=V.parentNode}}we=we.return}S3(function(){var m=Xe,P=fm(ue),i=[];e:{var L=ew.get(F);if(L!==void 0){var A=gm,v=F;switch(F){case"keypress":if(E0(ue)===0)break e;case"keydown":case"keyup":A=tS;break;case"focusin":v="focus",A=my;break;case"focusout":v="blur",A=my;break;case"beforeblur":case"afterblur":A=my;break;case"click":if(ue.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":A=z2;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":A=GM;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":A=aS;break;case J3:case Q3:case $3:A=ZM;break;case q3:A=oS;break;case"scroll":A=VM;break;case"wheel":A=lS;break;case"copy":case"cut":case"paste":A=jM;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":A=N2}var p=(W&4)!==0,t=!p&&F==="scroll",r=p?L!==null?L+"Capture":null:L;p=[];for(var s=m,n;s!==null;){n=s;var l=n.stateNode;if(n.tag===5&&l!==null&&(n=l,r!==null&&(l=Qd(s,r),l!=null&&p.push(ap(s,l,n)))),t)break;s=s.return}0<p.length&&(L=new A(L,v,null,ue,P),i.push({event:L,listeners:p}))}}if(!(W&7)){e:{if(L=F==="mouseover"||F==="pointerover",A=F==="mouseout"||F==="pointerout",L&&ue!==l1&&(v=ue.relatedTarget||ue.fromElement)&&(Fh(v)||v[Kf]))break e;if((A||L)&&(L=P.window===P?P:(L=P.ownerDocument)?L.defaultView||L.parentWindow:window,A?(v=ue.relatedTarget||ue.toElement,A=m,v=v?Fh(v):null,v!==null&&(t=Yh(v),v!==t||v.tag!==5&&v.tag!==6)&&(v=null)):(A=null,v=m),A!==v)){if(p=z2,l="onMouseLeave",r="onMouseEnter",s="mouse",(F==="pointerout"||F==="pointerover")&&(p=N2,l="onPointerLeave",r="onPointerEnter",s="pointer"),t=A==null?L:Mv(A),n=v==null?L:Mv(v),L=new p(l,s+"leave",A,ue,P),L.target=t,L.relatedTarget=n,l=null,Fh(P)===m&&(p=new p(r,s+"enter",v,ue,P),p.target=n,p.relatedTarget=t,l=p),t=l,A&&v)t:{for(p=A,r=v,s=0,n=p;n;n=mv(n))s++;for(n=0,l=r;l;l=mv(l))n++;for(;0<s-n;)p=mv(p),s--;for(;0<n-s;)r=mv(r),n--;for(;s--;){if(p===r||r!==null&&p===r.alternate)break t;p=mv(p),r=mv(r)}p=null}else p=null;A!==null&&K2(i,L,A,p,!1),v!==null&&t!==null&&K2(i,t,v,p,!0)}}e:{if(L=m?Mv(m):window,A=L.nodeName&&L.nodeName.toLowerCase(),A==="select"||A==="input"&&L.type==="file")var c=pS;else if(V2(L))if(Y3)c=xS;else{c=yS;var u=gS}else(A=L.nodeName)&&A.toLowerCase()==="input"&&(L.type==="checkbox"||L.type==="radio")&&(c=mS);if(c&&(c=c(F,m))){W3(i,c,ue,P);break e}u&&u(F,L,m),F==="focusout"&&(u=L._wrapperState)&&u.controlled&&L.type==="number"&&n1(L,"number",L.value)}switch(u=m?Mv(m):window,F){case"focusin":(V2(u)||u.contentEditable==="true")&&(Tv=u,p1=m,Ud=null);break;case"focusout":Ud=p1=Tv=null;break;case"mousedown":g1=!0;break;case"contextmenu":case"mouseup":case"dragend":g1=!1,Z2(i,ue,P);break;case"selectionchange":if(TS)break;case"keydown":case"keyup":Z2(i,ue,P)}var g;if(mm)e:{switch(F){case"compositionstart":var f="onCompositionStart";break e;case"compositionend":f="onCompositionEnd";break e;case"compositionupdate":f="onCompositionUpdate";break e}f=void 0}else wv?H3(F,ue)&&(f="onCompositionEnd"):F==="keydown"&&ue.keyCode===229&&(f="onCompositionStart");f&&(V3&&ue.locale!=="ko"&&(wv||f!=="onCompositionStart"?f==="onCompositionEnd"&&wv&&(g=U3()):(Oc=P,pm="value"in Oc?Oc.value:Oc.textContent,wv=!0)),u=H0(m,f),0<u.length&&(f=new O2(f,F,null,ue,P),i.push({event:f,listeners:u}),g?f.data=g:(g=G3(ue),g!==null&&(f.data=g)))),(g=fS?cS(F,ue):hS(F,ue))&&(m=H0(m,"onBeforeInput"),0<m.length&&(P=new O2("onBeforeInput","beforeinput",null,ue,P),i.push({event:P,listeners:m}),P.data=g))}tw(i,W)})}function ap(F,W,ue){return{instance:F,listener:W,currentTarget:ue}}function H0(F,W){for(var ue=W+"Capture",we=[];F!==null;){var ke=F,Xe=ke.stateNode;ke.tag===5&&Xe!==null&&(ke=Xe,Xe=Qd(F,ue),Xe!=null&&we.unshift(ap(F,Xe,ke)),Xe=Qd(F,W),Xe!=null&&we.push(ap(F,Xe,ke))),F=F.return}return we}function mv(F){if(F===null)return null;do F=F.return;while(F&&F.tag!==5);return F||null}function K2(F,W,ue,we,ke){for(var Xe=W._reactName,G=[];ue!==null&&ue!==we;){var V=ue,e=V.alternate,m=V.stateNode;if(e!==null&&e===we)break;V.tag===5&&m!==null&&(V=m,ke?(e=Qd(ue,Xe),e!=null&&G.unshift(ap(ue,e,V))):ke||(e=Qd(ue,Xe),e!=null&&G.push(ap(ue,e,V)))),ue=ue.return}G.length!==0&&F.push({event:W,listeners:G})}var ES=/\r\n?/g,CS=/\u0000|\uFFFD/g;function J2(F){return(typeof F=="string"?F:""+F).replace(ES,`
`).replace(CS,"")}function l0(F,W,ue){if(W=J2(W),J2(F)!==W&&ue)throw Error(va(425))}function G0(){}var y1=null,m1=null;function x1(F,W){return F==="textarea"||F==="noscript"||typeof W.children=="string"||typeof W.children=="number"||typeof W.dangerouslySetInnerHTML=="object"&&W.dangerouslySetInnerHTML!==null&&W.dangerouslySetInnerHTML.__html!=null}var b1=typeof setTimeout=="function"?setTimeout:void 0,LS=typeof clearTimeout=="function"?clearTimeout:void 0,Q2=typeof Promise=="function"?Promise:void 0,PS=typeof queueMicrotask=="function"?queueMicrotask:typeof Q2<"u"?function(F){return Q2.resolve(null).then(F).catch(RS)}:b1;function RS(F){setTimeout(function(){throw F})}function Ey(F,W){var ue=W,we=0;do{var ke=ue.nextSibling;if(F.removeChild(ue),ke&&ke.nodeType===8)if(ue=ke.data,ue==="/$"){if(we===0){F.removeChild(ke),ep(W);return}we--}else ue!=="$"&&ue!=="$?"&&ue!=="$!"||we++;ue=ke}while(ue);ep(W)}function Gc(F){for(;F!=null;F=F.nextSibling){var W=F.nodeType;if(W===1||W===3)break;if(W===8){if(W=F.data,W==="$"||W==="$!"||W==="$?")break;if(W==="/$")return null}}return F}function $2(F){F=F.previousSibling;for(var W=0;F;){if(F.nodeType===8){var ue=F.data;if(ue==="$"||ue==="$!"||ue==="$?"){if(W===0)return F;W--}else ue==="/$"&&W++}F=F.previousSibling}return null}var Qv=Math.random().toString(36).slice(2),lf="__reactFiber$"+Qv,ip="__reactProps$"+Qv,Kf="__reactContainer$"+Qv,w1="__reactEvents$"+Qv,DS="__reactListeners$"+Qv,IS="__reactHandles$"+Qv;function Fh(F){var W=F[lf];if(W)return W;for(var ue=F.parentNode;ue;){if(W=ue[Kf]||ue[lf]){if(ue=W.alternate,W.child!==null||ue!==null&&ue.child!==null)for(F=$2(F);F!==null;){if(ue=F[lf])return ue;F=$2(F)}return W}F=ue,ue=F.parentNode}return null}function xp(F){return F=F[lf]||F[Kf],!F||F.tag!==5&&F.tag!==6&&F.tag!==13&&F.tag!==3?null:F}function Mv(F){if(F.tag===5||F.tag===6)return F.stateNode;throw Error(va(33))}function gg(F){return F[ip]||null}var T1=[],Sv=-1;function $c(F){return{current:F}}function ji(F){0>Sv||(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<ue.length;F++){var we=ue[F];do we=we(!0);while(we!==null)}Hf=null,yg=!1}catch(ke){throw Hf!==null&&(Hf=Hf.slice(F+1)),P3(cm,qc),ke}finally{ki=W,Cy=!1}}return null}var Ev=[],Cv=0,Z0=null,X0=0,$l=[],ql=0,Uh=null,Wf=1,Yf="";function Rh(F,W){Ev[Cv++]=X0,Ev[Cv++]=Z0,Z0=F,X0=W}function iw(F,W,ue){$l[ql++]=Wf,$l[ql++]=Yf,$l[ql++]=Uh,Uh=F;var we=Wf;F=Yf;var ke=32-Du(we)-1;we&=~(1<<ke),ue+=1;var Xe=32-Du(W)+ke;if(30<Xe){var G=ke-ke%5;Xe=(we&(1<<G)-1).toString(32),we>>=G,ke-=G,Wf=1<<32-Du(W)+ke|ue<<ke|we,Yf=Xe+F}else Wf=1<<Xe|ue<<ke|we,Yf=F}function bm(F){F.return!==null&&(Rh(F,1),iw(F,1,0))}function wm(F){for(;F===Z0;)Z0=Ev[--Cv],Ev[Cv]=null,X0=Ev[--Cv],Ev[Cv]=null;for(;F===Uh;)Uh=$l[--ql],$l[ql]=null,Yf=$l[--ql],$l[ql]=null,Wf=$l[--ql],$l[ql]=null}var Pl=null,Ll=null,qi=!1,Ru=null;function ow(F,W){var ue=eu(5,null,null,0);ue.elementType="DELETED",ue.stateNode=W,ue.return=F,W=F.deletions,W===null?(F.deletions=[ue],F.flags|=16):W.push(ue)}function tb(F,W){switch(F.tag){case 5:var ue=F.type;return W=W.nodeType!==1||ue.toLowerCase()!==W.nodeName.toLowerCase()?null:W,W!==null?(F.stateNode=W,Pl=F,Ll=Gc(W.firstChild),!0):!1;case 6:return W=F.pendingProps===""||W.nodeType!==3?null:W,W!==null?(F.stateNode=W,Pl=F,Ll=null,!0):!1;case 13:return W=W.nodeType!==8?null:W,W!==null?(ue=Uh!==null?{id:Wf,overflow:Yf}:null,F.memoizedState={dehydrated:W,treeContext:ue,retryLane:1073741824},ue=eu(18,null,null,0),ue.stateNode=W,ue.return=F,F.child=ue,Pl=F,Ll=null,!0):!1;default:return!1}}function A1(F){return(F.mode&1)!==0&&(F.flags&128)===0}function M1(F){if(qi){var W=Ll;if(W){var ue=W;if(!tb(F,W)){if(A1(F))throw Error(va(418));W=Gc(ue.nextSibling);var we=Pl;W&&tb(F,W)?ow(we,ue):(F.flags=F.flags&-4097|2,qi=!1,Pl=F)}}else{if(A1(F))throw Error(va(418));F.flags=F.flags&-4097|2,qi=!1,Pl=F}}}function rb(F){for(F=F.return;F!==null&&F.tag!==5&&F.tag!==3&&F.tag!==13;)F=F.return;Pl=F}function u0(F){if(F!==Pl)return!1;if(!qi)return rb(F),qi=!0,!1;var W;if((W=F.tag!==3)&&!(W=F.tag!==5)&&(W=F.type,W=W!=="head"&&W!=="body"&&!x1(F.type,F.memoizedProps)),W&&(W=Ll)){if(A1(F))throw sw(),Error(va(418));for(;W;)ow(F,W),W=Gc(W.nextSibling)}if(rb(F),F.tag===13){if(F=F.memoizedState,F=F!==null?F.dehydrated:null,!F)throw Error(va(317));e:{for(F=F.nextSibling,W=0;F;){if(F.nodeType===8){var ue=F.data;if(ue==="/$"){if(W===0){Ll=Gc(F.nextSibling);break e}W--}else ue!=="$"&&ue!=="$!"&&ue!=="$?"||W++}F=F.nextSibling}Ll=null}}else Ll=Pl?Gc(F.stateNode.nextSibling):null;return!0}function sw(){for(var F=Ll;F;)F=Gc(F.nextSibling)}function Vv(){Ll=Pl=null,qi=!1}function Tm(F){Ru===null?Ru=[F]:Ru.push(F)}var FS=$f.ReactCurrentBatchConfig;function Lu(F,W){if(F&&F.defaultProps){W=fo({},W),F=F.defaultProps;for(var ue in F)W[ue]===void 0&&(W[ue]=F[ue]);return W}return W}var j0=$c(null),K0=null,Lv=null,Am=null;function Mm(){Am=Lv=K0=null}function Sm(F){var W=j0.current;ji(j0),F._currentValue=W}function S1(F,W,ue){for(;F!==null;){var we=F.alternate;if((F.childLanes&W)!==W?(F.childLanes|=W,we!==null&&(we.childLanes|=W)):we!==null&&(we.childLanes&W)!==W&&(we.childLanes|=W),F===ue)break;F=F.return}}function zv(F,W){K0=F,Am=Lv=null,F=F.dependencies,F!==null&&F.firstContext!==null&&(F.lanes&W&&(sl=!0),F.firstContext=null)}function ru(F){var W=F._currentValue;if(Am!==F)if(F={context:F,memoizedValue:W,next:null},Lv===null){if(K0===null)throw Error(va(308));Lv=F,K0.dependencies={lanes:0,firstContext:F}}else Lv=Lv.next=F;return W}var _h=null;function Em(F){_h===null?_h=[F]:_h.push(F)}function lw(F,W,ue,we){var ke=W.interleaved;return ke===null?(ue.next=ue,Em(W)):(ue.next=ke.next,ke.next=ue),W.interleaved=ue,Jf(F,we)}function Jf(F,W){F.lanes|=W;var ue=F.alternate;for(ue!==null&&(ue.lanes|=W),ue=F,F=F.return;F!==null;)F.childLanes|=W,ue=F.alternate,ue!==null&&(ue.childLanes|=W),ue=F,F=F.return;return ue.tag===3?ue.stateNode:null}var kc=!1;function Cm(F){F.updateQueue={baseState:F.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function uw(F,W){F=F.updateQueue,W.updateQueue===F&&(W.updateQueue={baseState:F.baseState,firstBaseUpdate:F.firstBaseUpdate,lastBaseUpdate:F.lastBaseUpdate,shared:F.shared,effects:F.effects})}function Xf(F,W){return{eventTime:F,lane:W,tag:0,payload:null,callback:null,next:null}}function Wc(F,W,ue){var we=F.updateQueue;if(we===null)return null;if(we=we.shared,Ai&2){var ke=we.pending;return ke===null?W.next=W:(W.next=ke.next,ke.next=W),we.pending=W,Jf(F,ue)}return ke=we.interleaved,ke===null?(W.next=W,Em(we)):(W.next=ke.next,ke.next=W),we.interleaved=W,Jf(F,ue)}function C0(F,W,ue){if(W=W.updateQueue,W!==null&&(W=W.shared,(ue&4194240)!==0)){var we=W.lanes;we&=F.pendingLanes,ue|=we,W.lanes=ue,hm(F,ue)}}function nb(F,W){var ue=F.updateQueue,we=F.alternate;if(we!==null&&(we=we.updateQueue,ue===we)){var ke=null,Xe=null;if(ue=ue.firstBaseUpdate,ue!==null){do{var G={eventTime:ue.eventTime,lane:ue.lane,tag:ue.tag,payload:ue.payload,callback:ue.callback,next:null};Xe===null?ke=Xe=G:Xe=Xe.next=G,ue=ue.next}while(ue!==null);Xe===null?ke=Xe=W:Xe=Xe.next=W}else ke=Xe=W;ue={baseState:we.baseState,firstBaseUpdate:ke,lastBaseUpdate:Xe,shared:we.shared,effects:we.effects},F.updateQueue=ue;return}F=ue.lastBaseUpdate,F===null?ue.firstBaseUpdate=W:F.next=W,ue.lastBaseUpdate=W}function J0(F,W,ue,we){var ke=F.updateQueue;kc=!1;var Xe=ke.firstBaseUpdate,G=ke.lastBaseUpdate,V=ke.shared.pending;if(V!==null){ke.shared.pending=null;var e=V,m=e.next;e.next=null,G===null?Xe=m:G.next=m,G=e;var P=F.alternate;P!==null&&(P=P.updateQueue,V=P.lastBaseUpdate,V!==G&&(V===null?P.firstBaseUpdate=m:V.next=m,P.lastBaseUpdate=e))}if(Xe!==null){var i=ke.baseState;G=0,P=m=e=null,V=Xe;do{var L=V.lane,A=V.eventTime;if((we&L)===L){P!==null&&(P=P.next={eventTime:A,lane:0,tag:V.tag,payload:V.payload,callback:V.callback,next:null});e:{var v=F,p=V;switch(L=W,A=ue,p.tag){case 1:if(v=p.payload,typeof v=="function"){i=v.call(A,i,L);break e}i=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=p.payload,L=typeof v=="function"?v.call(A,i,L):v,L==null)break e;i=fo({},i,L);break e;case 2:kc=!0}}V.callback!==null&&V.lane!==0&&(F.flags|=64,L=ke.effects,L===null?ke.effects=[V]:L.push(V))}else A={eventTime:A,lane:L,tag:V.tag,payload:V.payload,callback:V.callback,next:null},P===null?(m=P=A,e=i):P=P.next=A,G|=L;if(V=V.next,V===null){if(V=ke.shared.pending,V===null)break;L=V,V=L.next,L.next=null,ke.lastBaseUpdate=L,ke.shared.pending=null}}while(1);if(P===null&&(e=i),ke.baseState=e,ke.firstBaseUpdate=m,ke.lastBaseUpdate=P,W=ke.shared.interleaved,W!==null){ke=W;do G|=ke.lane,ke=ke.next;while(ke!==W)}else Xe===null&&(ke.shared.lanes=0);Hh|=G,F.lanes=G,F.memoizedState=i}}function ab(F,W,ue){if(F=W.effects,W.effects=null,F!==null)for(W=0;W<F.length;W++){var we=F[W],ke=we.callback;if(ke!==null){if(we.callback=null,we=ue,typeof ke!="function")throw Error(va(191,ke));ke.call(we)}}}var fw=new l3.Component().refs;function E1(F,W,ue,we){W=F.memoizedState,ue=ue(we,W),ue=ue==null?W:fo({},W,ue),F.memoizedState=ue,F.lanes===0&&(F.updateQueue.baseState=ue)}var mg={isMounted:function(F){return(F=F._reactInternals)?Yh(F)===F:!1},enqueueSetState:function(F,W,ue){F=F._reactInternals;var we=Gs(),ke=Zc(F),Xe=Xf(we,ke);Xe.payload=W,ue!=null&&(Xe.callback=ue),W=Wc(F,Xe,ke),W!==null&&(Iu(W,F,ke,we),C0(W,F,ke))},enqueueReplaceState:function(F,W,ue){F=F._reactInternals;var we=Gs(),ke=Zc(F),Xe=Xf(we,ke);Xe.tag=1,Xe.payload=W,ue!=null&&(Xe.callback=ue),W=Wc(F,Xe,ke),W!==null&&(Iu(W,F,ke,we),C0(W,F,ke))},enqueueForceUpdate:function(F,W){F=F._reactInternals;var ue=Gs(),we=Zc(F),ke=Xf(ue,we);ke.tag=2,W!=null&&(ke.callback=W),W=Wc(F,ke,we),W!==null&&(Iu(W,F,we,ue),C0(W,F,we))}};function ib(F,W,ue,we,ke,Xe,G){return F=F.stateNode,typeof F.shouldComponentUpdate=="function"?F.shouldComponentUpdate(we,Xe,G):W.prototype&&W.prototype.isPureReactComponent?!rp(ue,we)||!rp(ke,Xe):!0}function cw(F,W,ue){var we=!1,ke=Kc,Xe=W.contextType;return typeof Xe=="object"&&Xe!==null?Xe=ru(Xe):(ke=ul(W)?Bh:Cs.current,we=W.contextTypes,Xe=(we=we!=null)?Uv(F,ke):Kc),W=new W(ue,Xe),F.memoizedState=W.state!==null&&W.state!==void 0?W.state:null,W.updater=mg,F.stateNode=W,W._reactInternals=F,we&&(F=F.stateNode,F.__reactInternalMemoizedUnmaskedChildContext=ke,F.__reactInternalMemoizedMaskedChildContext=Xe),W}function ob(F,W,ue,we){F=W.state,typeof W.componentWillReceiveProps=="function"&&W.componentWillReceiveProps(ue,we),typeof W.UNSAFE_componentWillReceiveProps=="function"&&W.UNSAFE_componentWillReceiveProps(ue,we),W.state!==F&&mg.enqueueReplaceState(W,W.state,null)}function C1(F,W,ue,we){var ke=F.stateNode;ke.props=ue,ke.state=F.memoizedState,ke.refs=fw,Cm(F);var Xe=W.contextType;typeof Xe=="object"&&Xe!==null?ke.context=ru(Xe):(Xe=ul(W)?Bh:Cs.current,ke.context=Uv(F,Xe)),ke.state=F.memoizedState,Xe=W.getDerivedStateFromProps,typeof Xe=="function"&&(E1(F,W,Xe,ue),ke.state=F.memoizedState),typeof W.getDerivedStateFromProps=="function"||typeof ke.getSnapshotBeforeUpdate=="function"||typeof ke.UNSAFE_componentWillMount!="function"&&typeof ke.componentWillMount!="function"||(W=ke.state,typeof ke.componentWillMount=="function"&&ke.componentWillMount(),typeof ke.UNSAFE_componentWillMount=="function"&&ke.UNSAFE_componentWillMount(),W!==ke.state&&mg.enqueueReplaceState(ke,ke.state,null),J0(F,ue,ke,we),ke.state=F.memoizedState),typeof ke.componentDidMount=="function"&&(F.flags|=4194308)}function Ld(F,W,ue){if(F=ue.ref,F!==null&&typeof F!="function"&&typeof F!="object"){if(ue._owner){if(ue=ue._owner,ue){if(ue.tag!==1)throw Error(va(309));var we=ue.stateNode}if(!we)throw Error(va(147,F));var ke=we,Xe=""+F;return W!==null&&W.ref!==null&&typeof W.ref=="function"&&W.ref._stringRef===Xe?W.ref:(W=function(G){var V=ke.refs;V===fw&&(V=ke.refs={}),G===null?delete V[Xe]:V[Xe]=G},W._stringRef=Xe,W)}if(typeof F!="string")throw Error(va(284));if(!ue._owner)throw Error(va(290,F))}return F}function f0(F,W){throw F=Object.prototype.toString.call(W),Error(va(31,F==="[object Object]"?"object with keys {"+Object.keys(W).join(", ")+"}":F))}function sb(F){var W=F._init;return W(F._payload)}function hw(F){function W(r,s){if(F){var n=r.deletions;n===null?(r.deletions=[s],r.flags|=16):n.push(s)}}function ue(r,s){if(!F)return null;for(;s!==null;)W(r,s),s=s.sibling;return null}function we(r,s){for(r=new Map;s!==null;)s.key!==null?r.set(s.key,s):r.set(s.index,s),s=s.sibling;return r}function ke(r,s){return r=Xc(r,s),r.index=0,r.sibling=null,r}function Xe(r,s,n){return r.index=n,F?(n=r.alternate,n!==null?(n=n.index,n<s?(r.flags|=2,s):n):(r.flags|=2,s)):(r.flags|=1048576,s)}function G(r){return F&&r.alternate===null&&(r.flags|=2),r}function V(r,s,n,l){return s===null||s.tag!==6?(s=Fy(n,r.mode,l),s.return=r,s):(s=ke(s,n),s.return=r,s)}function e(r,s,n,l){var c=n.type;return c===bv?P(r,s,n.props.children,l,n.key):s!==null&&(s.elementType===c||typeof c=="object"&&c!==null&&c.$$typeof===Ic&&sb(c)===s.type)?(l=ke(s,n.props),l.ref=Ld(r,s,n),l.return=r,l):(l=k0(n.type,n.key,n.props,null,r.mode,l),l.ref=Ld(r,s,n),l.return=r,l)}function m(r,s,n,l){return s===null||s.tag!==4||s.stateNode.containerInfo!==n.containerInfo||s.stateNode.implementation!==n.implementation?(s=_y(n,r.mode,l),s.return=r,s):(s=ke(s,n.children||[]),s.return=r,s)}function P(r,s,n,l,c){return s===null||s.tag!==7?(s=Nh(n,r.mode,l,c),s.return=r,s):(s=ke(s,n),s.return=r,s)}function i(r,s,n){if(typeof s=="string"&&s!==""||typeof s=="number")return s=Fy(""+s,r.mode,n),s.return=r,s;if(typeof s=="object"&&s!==null){switch(s.$$typeof){case qp:return n=k0(s.type,s.key,s.props,null,r.mode,n),n.ref=Ld(r,null,s),n.return=r,n;case xv:return s=_y(s,r.mode,n),s.return=r,s;case Ic:var l=s._init;return i(r,l(s._payload),n)}if(kd(s)||Ad(s))return s=Nh(s,r.mode,n,null),s.return=r,s;f0(r,s)}return null}function L(r,s,n,l){var c=s!==null?s.key:null;if(typeof n=="string"&&n!==""||typeof n=="number")return c!==null?null:V(r,s,""+n,l);if(typeof n=="object"&&n!==null){switch(n.$$typeof){case qp:return n.key===c?e(r,s,n,l):null;case xv:return n.key===c?m(r,s,n,l):null;case Ic:return c=n._init,L(r,s,c(n._payload),l)}if(kd(n)||Ad(n))return c!==null?null:P(r,s,n,l,null);f0(r,n)}return null}function A(r,s,n,l,c){if(typeof l=="string"&&l!==""||typeof l=="number")return r=r.get(n)||null,V(s,r,""+l,c);if(typeof l=="object"&&l!==null){switch(l.$$typeof){case qp:return r=r.get(l.key===null?n:l.key)||null,e(s,r,l,c);case xv:return r=r.get(l.key===null?n:l.key)||null,m(s,r,l,c);case Ic:var u=l._init;return A(r,s,n,u(l._payload),c)}if(kd(l)||Ad(l))return r=r.get(n)||null,P(s,r,l,c,null);f0(s,l)}return null}function v(r,s,n,l){for(var c=null,u=null,g=s,f=s=0,w=null;g!==null&&f<n.length;f++){g.index>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(;f<n.length;f++)g=i(r,n[f],l),g!==null&&(s=Xe(g,s,f),u===null?c=g:u.sibling=g,u=g);return qi&&Rh(r,f),c}for(g=we(r,g);f<n.length;f++)w=A(g,r,f,n[f],l),w!==null&&(F&&w.alternate!==null&&g.delete(w.key===null?f:w.key),s=Xe(w,s,f),u===null?c=w:u.sibling=w,u=w);return F&&g.forEach(function(o){return W(r,o)}),qi&&Rh(r,f),c}function p(r,s,n,l){var c=Ad(n);if(typeof c!="function")throw Error(va(150));if(n=c.call(n),n==null)throw Error(va(151));for(var u=c=null,g=s,f=s=0,w=null,h=n.next();g!==null&&!h.done;f++,h=n.next()){g.index>f?(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;F<Ly.length;F++)Ly[F]._workInProgressVersionPrimary=null;Ly.length=0}var L0=$f.ReactCurrentDispatcher,Py=$f.ReactCurrentBatchConfig,Vh=0,uo=null,No=null,Ko=null,$0=!1,Vd=!1,lp=0,_S=0;function As(){throw Error(va(321))}function Dm(F,W){if(W===null)return!1;for(var ue=0;ue<W.length&&ue<F.length;ue++)if(!ku(F[ue],W[ue]))return!1;return!0}function Im(F,W,ue,we,ke,Xe){if(Vh=Xe,uo=W,W.memoizedState=null,W.updateQueue=null,W.lanes=0,L0.current=F===null||F.memoizedState===null?BS:US,F=ue(we,ke),Vd){Xe=0;do{if(Vd=!1,lp=0,25<=Xe)throw Error(va(301));Xe+=1,Ko=No=null,W.updateQueue=null,L0.current=VS,F=ue(we,ke)}while(Vd)}if(L0.current=q0,W=No!==null&&No.next!==null,Vh=0,Ko=No=uo=null,$0=!1,W)throw Error(va(300));return F}function km(){var F=lp!==0;return lp=0,F}function sf(){var F={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ko===null?uo.memoizedState=Ko=F:Ko=Ko.next=F,Ko}function nu(){if(No===null){var F=uo.alternate;F=F!==null?F.memoizedState:null}else F=No.next;var W=Ko===null?uo.memoizedState:Ko.next;if(W!==null)Ko=W,No=F;else{if(F===null)throw Error(va(310));No=F,F={memoizedState:No.memoizedState,baseState:No.baseState,baseQueue:No.baseQueue,queue:No.queue,next:null},Ko===null?uo.memoizedState=Ko=F:Ko=Ko.next=F}return Ko}function up(F,W){return typeof W=="function"?W(F):W}function Ry(F){var W=nu(),ue=W.queue;if(ue===null)throw Error(va(311));ue.lastRenderedReducer=F;var we=No,ke=we.baseQueue,Xe=ue.pending;if(Xe!==null){if(ke!==null){var G=ke.next;ke.next=Xe.next,Xe.next=G}we.baseQueue=ke=Xe,ue.pending=null}if(ke!==null){Xe=ke.next,we=we.baseState;var V=G=null,e=null,m=Xe;do{var P=m.lane;if((Vh&P)===P)e!==null&&(e=e.next={lane:0,action:m.action,hasEagerState:m.hasEagerState,eagerState:m.eagerState,next:null}),we=m.hasEagerState?m.eagerState:F(we,m.action);else{var i={lane:P,action:m.action,hasEagerState:m.hasEagerState,eagerState:m.eagerState,next:null};e===null?(V=e=i,G=we):e=e.next=i,uo.lanes|=P,Hh|=P}m=m.next}while(m!==null&&m!==Xe);e===null?G=we:e.next=V,ku(we,W.memoizedState)||(sl=!0),W.memoizedState=we,W.baseState=G,W.baseQueue=e,ue.lastRenderedState=we}if(F=ue.interleaved,F!==null){ke=F;do Xe=ke.lane,uo.lanes|=Xe,Hh|=Xe,ke=ke.next;while(ke!==F)}else ke===null&&(ue.lanes=0);return[W.memoizedState,ue.dispatch]}function Dy(F){var W=nu(),ue=W.queue;if(ue===null)throw Error(va(311));ue.lastRenderedReducer=F;var we=ue.dispatch,ke=ue.pending,Xe=W.memoizedState;if(ke!==null){ue.pending=null;var G=ke=ke.next;do Xe=F(Xe,G.action),G=G.next;while(G!==ke);ku(Xe,W.memoizedState)||(sl=!0),W.memoizedState=Xe,W.baseQueue===null&&(W.baseState=Xe),ue.lastRenderedState=Xe}return[Xe,we]}function pw(){}function gw(F,W){var ue=uo,we=nu(),ke=W(),Xe=!ku(we.memoizedState,ke);if(Xe&&(we.memoizedState=ke,sl=!0),we=we.queue,Fm(xw.bind(null,ue,we,F),[F]),we.getSnapshot!==W||Xe||Ko!==null&&Ko.memoizedState.tag&1){if(ue.flags|=2048,fp(9,mw.bind(null,ue,we,ke,W),void 0,null),Qo===null)throw Error(va(349));Vh&30||yw(ue,W,ke)}return ke}function yw(F,W,ue){F.flags|=16384,F={getSnapshot:W,value:ue},W=uo.updateQueue,W===null?(W={lastEffect:null,stores:null},uo.updateQueue=W,W.stores=[F]):(ue=W.stores,ue===null?W.stores=[F]:ue.push(F))}function mw(F,W,ue,we){W.value=ue,W.getSnapshot=we,bw(W)&&ww(F)}function xw(F,W,ue){return ue(function(){bw(W)&&ww(F)})}function bw(F){var W=F.getSnapshot;F=F.value;try{var ue=W();return!ku(F,ue)}catch{return!0}}function ww(F){var W=Jf(F,1);W!==null&&Iu(W,F,1,-1)}function lb(F){var W=sf();return typeof F=="function"&&(F=F()),W.memoizedState=W.baseState=F,F={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:up,lastRenderedState:F},W.queue=F,F=F.dispatch=NS.bind(null,uo,F),[W.memoizedState,F]}function fp(F,W,ue,we){return F={tag:F,create:W,destroy:ue,deps:we,next:null},W=uo.updateQueue,W===null?(W={lastEffect:null,stores:null},uo.updateQueue=W,W.lastEffect=F.next=F):(ue=W.lastEffect,ue===null?W.lastEffect=F.next=F:(we=ue.next,ue.next=F,F.next=we,W.lastEffect=F)),F}function Tw(){return nu().memoizedState}function P0(F,W,ue,we){var ke=sf();uo.flags|=F,ke.memoizedState=fp(1|W,ue,void 0,we===void 0?null:we)}function xg(F,W,ue,we){var ke=nu();we=we===void 0?null:we;var Xe=void 0;if(No!==null){var G=No.memoizedState;if(Xe=G.destroy,we!==null&&Dm(we,G.deps)){ke.memoizedState=fp(W,ue,Xe,we);return}}uo.flags|=F,ke.memoizedState=fp(1|W,ue,Xe,we)}function ub(F,W){return P0(8390656,8,F,W)}function Fm(F,W){return xg(2048,8,F,W)}function Aw(F,W){return xg(4,2,F,W)}function Mw(F,W){return xg(4,4,F,W)}function Sw(F,W){if(typeof W=="function")return F=F(),W(F),function(){W(null)};if(W!=null)return F=F(),W.current=F,function(){W.current=null}}function Ew(F,W,ue){return ue=ue!=null?ue.concat([F]):null,xg(4,4,Sw.bind(null,W,F),ue)}function _m(){}function Cw(F,W){var ue=nu();W=W===void 0?null:W;var we=ue.memoizedState;return we!==null&&W!==null&&Dm(W,we[1])?we[0]:(ue.memoizedState=[F,W],F)}function Lw(F,W){var ue=nu();W=W===void 0?null:W;var we=ue.memoizedState;return we!==null&&W!==null&&Dm(W,we[1])?we[0]:(F=F(),ue.memoizedState=[F,W],F)}function Pw(F,W,ue){return Vh&21?(ku(ue,W)||(ue=I3(),uo.lanes|=ue,Hh|=ue,F.baseState=!0),W):(F.baseState&&(F.baseState=!1,sl=!0),F.memoizedState=ue)}function zS(F,W){var ue=ki;ki=ue!==0&&4>ue?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<ue&&(W+="H"+ue.toString(32)),W+=":"}else ue=_S++,W=":"+W+"r"+ue.toString(32)+":";return F.memoizedState=W},unstable_isNewReconciler:!1},US={readContext:ru,useCallback:Cw,useContext:ru,useEffect:Fm,useImperativeHandle:Ew,useInsertionEffect:Aw,useLayoutEffect:Mw,useMemo:Lw,useReducer:Ry,useRef:Tw,useState:function(){return Ry(up)},useDebugValue:_m,useDeferredValue:function(F){var W=nu();return Pw(W,No.memoizedState,F)},useTransition:function(){var F=Ry(up)[0],W=nu().memoizedState;return[F,W]},useMutableSource:pw,useSyncExternalStore:gw,useId:Rw,unstable_isNewReconciler:!1},VS={readContext:ru,useCallback:Cw,useContext:ru,useEffect:Fm,useImperativeHandle:Ew,useInsertionEffect:Aw,useLayoutEffect:Mw,useMemo:Lw,useReducer:Dy,useRef:Tw,useState:function(){return Dy(up)},useDebugValue:_m,useDeferredValue:function(F){var W=nu();return No===null?W.memoizedState=F:Pw(W,No.memoizedState,F)},useTransition:function(){var F=Dy(up)[0],W=nu().memoizedState;return[F,W]},useMutableSource:pw,useSyncExternalStore:gw,useId:Rw,unstable_isNewReconciler:!1};function Wv(F,W){try{var ue="",we=W;do ue+=pM(we),we=we.return;while(we);var ke=ue}catch(Xe){ke=`
Error generating stack: `+Xe.message+`
`+Xe.stack}return{value:F,source:W,stack:ke,digest:null}}function Iy(F,W,ue){return{value:F,source:null,stack:ue??null,digest:W??null}}function L1(F,W){try{console.error(W.value)}catch(ue){setTimeout(function(){throw ue})}}var HS=typeof WeakMap=="function"?WeakMap:Map;function Fw(F,W,ue){ue=Xf(-1,ue),ue.tag=3,ue.payload={element:null};var we=W.value;return ue.callback=function(){tg||(tg=!0,N1=we),L1(F,W)},ue}function _w(F,W,ue){ue=Xf(-1,ue),ue.tag=3;var we=F.type.getDerivedStateFromError;if(typeof we=="function"){var ke=W.value;ue.payload=function(){return we(ke)},ue.callback=function(){L1(F,W)}}var Xe=F.stateNode;return Xe!==null&&typeof Xe.componentDidCatch=="function"&&(ue.callback=function(){L1(F,W),typeof we!="function"&&(Yc===null?Yc=new Set([this]):Yc.add(this));var G=W.stack;this.componentDidCatch(W.value,{componentStack:G!==null?G:""})}),ue}function fb(F,W,ue){var we=F.pingCache;if(we===null){we=F.pingCache=new HS;var ke=new Set;we.set(W,ke)}else ke=we.get(W),ke===void 0&&(ke=new Set,we.set(W,ke));ke.has(ue)||(ke.add(ue),F=r6.bind(null,F,W,ue),W.then(F,F))}function cb(F){do{var W;if((W=F.tag===13)&&(W=F.memoizedState,W=W!==null?W.dehydrated!==null:!0),W)return F;F=F.return}while(F!==null);return null}function hb(F,W,ue,we,ke){return F.mode&1?(F.flags|=65536,F.lanes=ke,F):(F===W?F.flags|=65536:(F.flags|=128,ue.flags|=131072,ue.flags&=-52805,ue.tag===1&&(ue.alternate===null?ue.tag=17:(W=Xf(-1,1),W.tag=2,Wc(ue,W,1))),ue.lanes|=1),F)}var GS=$f.ReactCurrentOwner,sl=!1;function Hs(F,W,ue,we){W.child=F===null?vw(W,null,ue,we):Hv(W,F.child,ue,we)}function vb(F,W,ue,we,ke){ue=ue.render;var Xe=W.ref;return zv(W,ke),we=Im(F,W,ue,we,Xe,ke),ue=km(),F!==null&&!sl?(W.updateQueue=F.updateQueue,W.flags&=-2053,F.lanes&=~ke,Qf(F,W,ke)):(qi&&ue&&bm(W),W.flags|=1,Hs(F,W,we,ke),W.child)}function db(F,W,ue,we,ke){if(F===null){var Xe=ue.type;return typeof Xe=="function"&&!Gm(Xe)&&Xe.defaultProps===void 0&&ue.compare===null&&ue.defaultProps===void 0?(W.tag=15,W.type=Xe,zw(F,W,Xe,we,ke)):(F=k0(ue.type,null,we,W,W.mode,ke),F.ref=W.ref,F.return=W,W.child=F)}if(Xe=F.child,!(F.lanes&ke)){var G=Xe.memoizedProps;if(ue=ue.compare,ue=ue!==null?ue:rp,ue(G,we)&&F.ref===W.ref)return Qf(F,W,ke)}return W.flags|=1,F=Xc(Xe,we),F.ref=W.ref,F.return=W,W.child=F}function zw(F,W,ue,we,ke){if(F!==null){var Xe=F.memoizedProps;if(rp(Xe,we)&&F.ref===W.ref)if(sl=!1,W.pendingProps=we=Xe,(F.lanes&ke)!==0)F.flags&131072&&(sl=!0);else return W.lanes=F.lanes,Qf(F,W,ke)}return P1(F,W,ue,we,ke)}function Ow(F,W,ue){var we=W.pendingProps,ke=we.children,Xe=F!==null?F.memoizedState:null;if(we.mode==="hidden")if(!(W.mode&1))W.memoizedState={baseLanes:0,cachePool:null,transitions:null},Gi(Rv,Cl),Cl|=ue;else{if(!(ue&1073741824))return F=Xe!==null?Xe.baseLanes|ue:ue,W.lanes=W.childLanes=1073741824,W.memoizedState={baseLanes:F,cachePool:null,transitions:null},W.updateQueue=null,Gi(Rv,Cl),Cl|=F,null;W.memoizedState={baseLanes:0,cachePool:null,transitions:null},we=Xe!==null?Xe.baseLanes:ue,Gi(Rv,Cl),Cl|=we}else Xe!==null?(we=Xe.baseLanes|ue,W.memoizedState=null):we=ue,Gi(Rv,Cl),Cl|=we;return Hs(F,W,ke,ue),W.child}function Nw(F,W){var ue=W.ref;(F===null&&ue!==null||F!==null&&F.ref!==ue)&&(W.flags|=512,W.flags|=2097152)}function P1(F,W,ue,we,ke){var Xe=ul(ue)?Bh:Cs.current;return Xe=Uv(W,Xe),zv(W,ke),ue=Im(F,W,ue,we,Xe,ke),we=km(),F!==null&&!sl?(W.updateQueue=F.updateQueue,W.flags&=-2053,F.lanes&=~ke,Qf(F,W,ke)):(qi&&we&&bm(W),W.flags|=1,Hs(F,W,ue,ke),W.child)}function pb(F,W,ue,we,ke){if(ul(ue)){var Xe=!0;Y0(W)}else Xe=!1;if(zv(W,ke),W.stateNode===null)R0(F,W),cw(W,ue,we),C1(W,ue,we,ke),we=!0;else if(F===null){var G=W.stateNode,V=W.memoizedProps;G.props=V;var e=G.context,m=ue.contextType;typeof m=="object"&&m!==null?m=ru(m):(m=ul(ue)?Bh:Cs.current,m=Uv(W,m));var P=ue.getDerivedStateFromProps,i=typeof P=="function"||typeof G.getSnapshotBeforeUpdate=="function";i||typeof G.UNSAFE_componentWillReceiveProps!="function"&&typeof G.componentWillReceiveProps!="function"||(V!==we||e!==m)&&ob(W,G,we,m),kc=!1;var L=W.memoizedState;G.state=L,J0(W,we,G,ke),e=W.memoizedState,V!==we||L!==e||ll.current||kc?(typeof P=="function"&&(E1(W,ue,P,we),e=W.memoizedState),(V=kc||ib(W,ue,V,we,L,e,m))?(i||typeof G.UNSAFE_componentWillMount!="function"&&typeof G.componentWillMount!="function"||(typeof G.componentWillMount=="function"&&G.componentWillMount(),typeof G.UNSAFE_componentWillMount=="function"&&G.UNSAFE_componentWillMount()),typeof G.componentDidMount=="function"&&(W.flags|=4194308)):(typeof G.componentDidMount=="function"&&(W.flags|=4194308),W.memoizedProps=we,W.memoizedState=e),G.props=we,G.state=e,G.context=m,we=V):(typeof G.componentDidMount=="function"&&(W.flags|=4194308),we=!1)}else{G=W.stateNode,uw(F,W),V=W.memoizedProps,m=W.type===W.elementType?V:Lu(W.type,V),G.props=m,i=W.pendingProps,L=G.context,e=ue.contextType,typeof e=="object"&&e!==null?e=ru(e):(e=ul(ue)?Bh:Cs.current,e=Uv(W,e));var A=ue.getDerivedStateFromProps;(P=typeof A=="function"||typeof G.getSnapshotBeforeUpdate=="function")||typeof G.UNSAFE_componentWillReceiveProps!="function"&&typeof G.componentWillReceiveProps!="function"||(V!==i||L!==e)&&ob(W,G,we,e),kc=!1,L=W.memoizedState,G.state=L,J0(W,we,G,ke);var v=W.memoizedState;V!==i||L!==v||ll.current||kc?(typeof A=="function"&&(E1(W,ue,A,we),v=W.memoizedState),(m=kc||ib(W,ue,m,we,L,v,e)||!1)?(P||typeof G.UNSAFE_componentWillUpdate!="function"&&typeof G.componentWillUpdate!="function"||(typeof G.componentWillUpdate=="function"&&G.componentWillUpdate(we,v,e),typeof G.UNSAFE_componentWillUpdate=="function"&&G.UNSAFE_componentWillUpdate(we,v,e)),typeof G.componentDidUpdate=="function"&&(W.flags|=4),typeof G.getSnapshotBeforeUpdate=="function"&&(W.flags|=1024)):(typeof G.componentDidUpdate!="function"||V===F.memoizedProps&&L===F.memoizedState||(W.flags|=4),typeof G.getSnapshotBeforeUpdate!="function"||V===F.memoizedProps&&L===F.memoizedState||(W.flags|=1024),W.memoizedProps=we,W.memoizedState=v),G.props=we,G.state=v,G.context=e,we=m):(typeof G.componentDidUpdate!="function"||V===F.memoizedProps&&L===F.memoizedState||(W.flags|=4),typeof G.getSnapshotBeforeUpdate!="function"||V===F.memoizedProps&&L===F.memoizedState||(W.flags|=1024),we=!1)}return R1(F,W,ue,we,Xe,ke)}function R1(F,W,ue,we,ke,Xe){Nw(F,W);var G=(W.flags&128)!==0;if(!we&&!G)return ke&&eb(W,ue,!1),Qf(F,W,Xe);we=W.stateNode,GS.current=W;var V=G&&typeof ue.getDerivedStateFromError!="function"?null:we.render();return W.flags|=1,F!==null&&G?(W.child=Hv(W,F.child,null,Xe),W.child=Hv(W,null,V,Xe)):Hs(F,W,V,Xe),W.memoizedState=we.state,ke&&eb(W,ue,!0),W.child}function Bw(F){var W=F.stateNode;W.pendingContext?q2(F,W.pendingContext,W.pendingContext!==W.context):W.context&&q2(F,W.context,!1),Lm(F,W.containerInfo)}function gb(F,W,ue,we,ke){return Vv(),Tm(ke),W.flags|=256,Hs(F,W,ue,we),W.child}var D1={dehydrated:null,treeContext:null,retryLane:0};function I1(F){return{baseLanes:F,cachePool:null,transitions:null}}function Uw(F,W,ue){var we=W.pendingProps,ke=lo.current,Xe=!1,G=(W.flags&128)!==0,V;if((V=G)||(V=F!==null&&F.memoizedState===null?!1:(ke&2)!==0),V?(Xe=!0,W.flags&=-129):(F===null||F.memoizedState!==null)&&(ke|=1),Gi(lo,ke&1),F===null)return M1(W),F=W.memoizedState,F!==null&&(F=F.dehydrated,F!==null)?(W.mode&1?F.data==="$!"?W.lanes=8:W.lanes=1073741824:W.lanes=1,null):(G=we.children,F=we.fallback,Xe?(we=W.mode,Xe=W.child,G={mode:"hidden",children:G},!(we&1)&&Xe!==null?(Xe.childLanes=0,Xe.pendingProps=G):Xe=Tg(G,we,0,null),F=Nh(F,we,ue,null),Xe.return=W,F.return=W,Xe.sibling=F,W.child=Xe,W.child.memoizedState=I1(ue),W.memoizedState=D1,F):zm(W,G));if(ke=F.memoizedState,ke!==null&&(V=ke.dehydrated,V!==null))return WS(F,W,G,we,V,ke,ue);if(Xe){Xe=we.fallback,G=W.mode,ke=F.child,V=ke.sibling;var e={mode:"hidden",children:we.children};return!(G&1)&&W.child!==ke?(we=W.child,we.childLanes=0,we.pendingProps=e,W.deletions=null):(we=Xc(ke,e),we.subtreeFlags=ke.subtreeFlags&14680064),V!==null?Xe=Xc(V,Xe):(Xe=Nh(Xe,G,ue,null),Xe.flags|=2),Xe.return=W,we.return=W,we.sibling=Xe,W.child=we,we=Xe,Xe=W.child,G=F.child.memoizedState,G=G===null?I1(ue):{baseLanes:G.baseLanes|ue,cachePool:null,transitions:G.transitions},Xe.memoizedState=G,Xe.childLanes=F.childLanes&~ue,W.memoizedState=D1,we}return Xe=F.child,F=Xe.sibling,we=Xc(Xe,{mode:"visible",children:we.children}),!(W.mode&1)&&(we.lanes=ue),we.return=W,we.sibling=null,F!==null&&(ue=W.deletions,ue===null?(W.deletions=[F],W.flags|=16):ue.push(F)),W.child=we,W.memoizedState=null,we}function zm(F,W){return W=Tg({mode:"visible",children:W},F.mode,0,null),W.return=F,F.child=W}function c0(F,W,ue,we){return we!==null&&Tm(we),Hv(W,F.child,null,ue),F=zm(W,W.pendingProps.children),F.flags|=2,W.memoizedState=null,F}function WS(F,W,ue,we,ke,Xe,G){if(ue)return W.flags&256?(W.flags&=-257,we=Iy(Error(va(422))),c0(F,W,G,we)):W.memoizedState!==null?(W.child=F.child,W.flags|=128,null):(Xe=we.fallback,ke=W.mode,we=Tg({mode:"visible",children:we.children},ke,0,null),Xe=Nh(Xe,ke,G,null),Xe.flags|=2,we.return=W,Xe.return=W,we.sibling=Xe,W.child=we,W.mode&1&&Hv(W,F.child,null,G),W.child.memoizedState=I1(G),W.memoizedState=D1,Xe);if(!(W.mode&1))return c0(F,W,G,null);if(ke.data==="$!"){if(we=ke.nextSibling&&ke.nextSibling.dataset,we)var V=we.dgst;return we=V,Xe=Error(va(419)),we=Iy(Xe,we,void 0),c0(F,W,G,we)}if(V=(G&F.childLanes)!==0,sl||V){if(we=Qo,we!==null){switch(G&-G){case 4:ke=2;break;case 16:ke=8;break;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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:ke=32;break;case 536870912:ke=268435456;break;default:ke=0}ke=ke&(we.suspendedLanes|G)?0:ke,ke!==0&&ke!==Xe.retryLane&&(Xe.retryLane=ke,Jf(F,ke),Iu(we,F,ke,-1))}return Hm(),we=Iy(Error(va(421))),c0(F,W,G,we)}return ke.data==="$?"?(W.flags|=128,W.child=F.child,W=n6.bind(null,F),ke._reactRetry=W,null):(F=Xe.treeContext,Ll=Gc(ke.nextSibling),Pl=W,qi=!0,Ru=null,F!==null&&($l[ql++]=Wf,$l[ql++]=Yf,$l[ql++]=Uh,Wf=F.id,Yf=F.overflow,Uh=W),W=zm(W,we.children),W.flags|=4096,W)}function yb(F,W,ue){F.lanes|=W;var we=F.alternate;we!==null&&(we.lanes|=W),S1(F.return,W,ue)}function ky(F,W,ue,we,ke){var Xe=F.memoizedState;Xe===null?F.memoizedState={isBackwards:W,rendering:null,renderingStartTime:0,last:we,tail:ue,tailMode:ke}:(Xe.isBackwards=W,Xe.rendering=null,Xe.renderingStartTime=0,Xe.last=we,Xe.tail=ue,Xe.tailMode=ke)}function Vw(F,W,ue){var we=W.pendingProps,ke=we.revealOrder,Xe=we.tail;if(Hs(F,W,we.children,ue),we=lo.current,we&2)we=we&1|2,W.flags|=128;else{if(F!==null&&F.flags&128)e:for(F=W.child;F!==null;){if(F.tag===13)F.memoizedState!==null&&yb(F,ue,W);else if(F.tag===19)yb(F,ue,W);else if(F.child!==null){F.child.return=F,F=F.child;continue}if(F===W)break e;for(;F.sibling===null;){if(F.return===null||F.return===W)break e;F=F.return}F.sibling.return=F.return,F=F.sibling}we&=1}if(Gi(lo,we),!(W.mode&1))W.memoizedState=null;else switch(ke){case"forwards":for(ue=W.child,ke=null;ue!==null;)F=ue.alternate,F!==null&&Q0(F)===null&&(ke=ue),ue=ue.sibling;ue=ke,ue===null?(ke=W.child,W.child=null):(ke=ue.sibling,ue.sibling=null),ky(W,!1,ke,ue,Xe);break;case"backwards":for(ue=null,ke=W.child,W.child=null;ke!==null;){if(F=ke.alternate,F!==null&&Q0(F)===null){W.child=ke;break}F=ke.sibling,ke.sibling=ue,ue=ke,ke=F}ky(W,!0,ue,null,Xe);break;case"together":ky(W,!1,null,null,void 0);break;default:W.memoizedState=null}return W.child}function R0(F,W){!(W.mode&1)&&F!==null&&(F.alternate=null,W.alternate=null,W.flags|=2)}function Qf(F,W,ue){if(F!==null&&(W.dependencies=F.dependencies),Hh|=W.lanes,!(ue&W.childLanes))return null;if(F!==null&&W.child!==F.child)throw Error(va(153));if(W.child!==null){for(F=W.child,ue=Xc(F,F.pendingProps),W.child=ue,ue.return=W;F.sibling!==null;)F=F.sibling,ue=ue.sibling=Xc(F,F.pendingProps),ue.return=W;ue.sibling=null}return W.child}function YS(F,W,ue){switch(W.tag){case 3:Bw(W),Vv();break;case 5:dw(W);break;case 1:ul(W.type)&&Y0(W);break;case 4:Lm(W,W.stateNode.containerInfo);break;case 10:var we=W.type._context,ke=W.memoizedProps.value;Gi(j0,we._currentValue),we._currentValue=ke;break;case 13:if(we=W.memoizedState,we!==null)return we.dehydrated!==null?(Gi(lo,lo.current&1),W.flags|=128,null):ue&W.child.childLanes?Uw(F,W,ue):(Gi(lo,lo.current&1),F=Qf(F,W,ue),F!==null?F.sibling:null);Gi(lo,lo.current&1);break;case 19:if(we=(ue&W.childLanes)!==0,F.flags&128){if(we)return Vw(F,W,ue);W.flags|=128}if(ke=W.memoizedState,ke!==null&&(ke.rendering=null,ke.tail=null,ke.lastEffect=null),Gi(lo,lo.current),we)break;return null;case 22:case 23:return W.lanes=0,Ow(F,W,ue)}return Qf(F,W,ue)}var Hw,k1,Gw,Ww;Hw=function(F,W){for(var ue=W.child;ue!==null;){if(ue.tag===5||ue.tag===6)F.appendChild(ue.stateNode);else if(ue.tag!==4&&ue.child!==null){ue.child.return=ue,ue=ue.child;continue}if(ue===W)break;for(;ue.sibling===null;){if(ue.return===null||ue.return===W)return;ue=ue.return}ue.sibling.return=ue.return,ue=ue.sibling}};k1=function(){};Gw=function(F,W,ue,we){var ke=F.memoizedProps;if(ke!==we){F=W.stateNode,zh(ff.current);var Xe=null;switch(ue){case"input":ke=t1(F,ke),we=t1(F,we),Xe=[];break;case"select":ke=fo({},ke,{value:void 0}),we=fo({},we,{value:void 0}),Xe=[];break;case"textarea":ke=a1(F,ke),we=a1(F,we),Xe=[];break;default:typeof ke.onClick!="function"&&typeof we.onClick=="function"&&(F.onclick=G0)}o1(ue,we);var G;ue=null;for(m in ke)if(!we.hasOwnProperty(m)&&ke.hasOwnProperty(m)&&ke[m]!=null)if(m==="style"){var V=ke[m];for(G in V)V.hasOwnProperty(G)&&(ue||(ue={}),ue[G]="")}else m!=="dangerouslySetInnerHTML"&&m!=="children"&&m!=="suppressContentEditableWarning"&&m!=="suppressHydrationWarning"&&m!=="autoFocus"&&(Kd.hasOwnProperty(m)?Xe||(Xe=[]):(Xe=Xe||[]).push(m,null));for(m in we){var e=we[m];if(V=ke!=null?ke[m]:void 0,we.hasOwnProperty(m)&&e!==V&&(e!=null||V!=null))if(m==="style")if(V){for(G in V)!V.hasOwnProperty(G)||e&&e.hasOwnProperty(G)||(ue||(ue={}),ue[G]="");for(G in e)e.hasOwnProperty(G)&&V[G]!==e[G]&&(ue||(ue={}),ue[G]=e[G])}else ue||(Xe||(Xe=[]),Xe.push(m,ue)),ue=e;else m==="dangerouslySetInnerHTML"?(e=e?e.__html:void 0,V=V?V.__html:void 0,e!=null&&V!==e&&(Xe=Xe||[]).push(m,e)):m==="children"?typeof e!="string"&&typeof e!="number"||(Xe=Xe||[]).push(m,""+e):m!=="suppressContentEditableWarning"&&m!=="suppressHydrationWarning"&&(Kd.hasOwnProperty(m)?(e!=null&&m==="onScroll"&&Xi("scroll",F),Xe||V===e||(Xe=[])):(Xe=Xe||[]).push(m,e))}ue&&(Xe=Xe||[]).push("style",ue);var m=Xe;(W.updateQueue=m)&&(W.flags|=4)}};Ww=function(F,W,ue,we){ue!==we&&(W.flags|=4)};function Pd(F,W){if(!qi)switch(F.tailMode){case"hidden":W=F.tail;for(var ue=null;W!==null;)W.alternate!==null&&(ue=W),W=W.sibling;ue===null?F.tail=null:ue.sibling=null;break;case"collapsed":ue=F.tail;for(var we=null;ue!==null;)ue.alternate!==null&&(we=ue),ue=ue.sibling;we===null?W||F.tail===null?F.tail=null:F.tail.sibling=null:we.sibling=null}}function Ms(F){var W=F.alternate!==null&&F.alternate.child===F.child,ue=0,we=0;if(W)for(var ke=F.child;ke!==null;)ue|=ke.lanes|ke.childLanes,we|=ke.subtreeFlags&14680064,we|=ke.flags&14680064,ke.return=F,ke=ke.sibling;else for(ke=F.child;ke!==null;)ue|=ke.lanes|ke.childLanes,we|=ke.subtreeFlags,we|=ke.flags,ke.return=F,ke=ke.sibling;return F.subtreeFlags|=we,F.childLanes=ue,W}function ZS(F,W,ue){var we=W.pendingProps;switch(wm(W),W.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ms(W),null;case 1:return ul(W.type)&&W0(),Ms(W),null;case 3:return we=W.stateNode,Gv(),ji(ll),ji(Cs),Rm(),we.pendingContext&&(we.context=we.pendingContext,we.pendingContext=null),(F===null||F.child===null)&&(u0(W)?W.flags|=4:F===null||F.memoizedState.isDehydrated&&!(W.flags&256)||(W.flags|=1024,Ru!==null&&(V1(Ru),Ru=null))),k1(F,W),Ms(W),null;case 5:Pm(W);var ke=zh(sp.current);if(ue=W.type,F!==null&&W.stateNode!=null)Gw(F,W,ue,we,ke),F.ref!==W.ref&&(W.flags|=512,W.flags|=2097152);else{if(!we){if(W.stateNode===null)throw Error(va(166));return Ms(W),null}if(F=zh(ff.current),u0(W)){we=W.stateNode,ue=W.type;var Xe=W.memoizedProps;switch(we[lf]=W,we[ip]=Xe,F=(W.mode&1)!==0,ue){case"dialog":Xi("cancel",we),Xi("close",we);break;case"iframe":case"object":case"embed":Xi("load",we);break;case"video":case"audio":for(ke=0;ke<_d.length;ke++)Xi(_d[ke],we);break;case"source":Xi("error",we);break;case"img":case"image":case"link":Xi("error",we),Xi("load",we);break;case"details":Xi("toggle",we);break;case"input":E2(we,Xe),Xi("invalid",we);break;case"select":we._wrapperState={wasMultiple:!!Xe.multiple},Xi("invalid",we);break;case"textarea":L2(we,Xe),Xi("invalid",we)}o1(ue,Xe),ke=null;for(var G in Xe)if(Xe.hasOwnProperty(G)){var V=Xe[G];G==="children"?typeof V=="string"?we.textContent!==V&&(Xe.suppressHydrationWarning!==!0&&l0(we.textContent,V,F),ke=["children",V]):typeof V=="number"&&we.textContent!==""+V&&(Xe.suppressHydrationWarning!==!0&&l0(we.textContent,V,F),ke=["children",""+V]):Kd.hasOwnProperty(G)&&V!=null&&G==="onScroll"&&Xi("scroll",we)}switch(ue){case"input":e0(we),C2(we,Xe,!0);break;case"textarea":e0(we),P2(we);break;case"select":case"option":break;default:typeof Xe.onClick=="function"&&(we.onclick=G0)}we=ke,W.updateQueue=we,we!==null&&(W.flags|=4)}else{G=ke.nodeType===9?ke:ke.ownerDocument,F==="http://www.w3.org/1999/xhtml"&&(F=y3(ue)),F==="http://www.w3.org/1999/xhtml"?ue==="script"?(F=G.createElement("div"),F.innerHTML="<script><\/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;we<ue.length;we++){var ke=ue[we];try{var Xe=F,G=W,V=G;e:for(;V!==null;){switch(V.tag){case 5:ss=V.stateNode,Pu=!1;break e;case 3:ss=V.stateNode.containerInfo,Pu=!0;break e;case 4:ss=V.stateNode.containerInfo,Pu=!0;break e}V=V.return}if(ss===null)throw Error(va(160));Xw(Xe,G,ke),ss=null,Pu=!1;var e=ke.alternate;e!==null&&(e.return=null),ke.return=null}catch(m){go(ke,W,m)}}if(W.subtreeFlags&12854)for(W=W.child;W!==null;)jw(W,F),W=W.sibling}function jw(F,W){var ue=F.alternate,we=F.flags;switch(F.tag){case 0:case 11:case 14:case 15:if(Cu(W,F),of(F),we&4){try{Hd(3,F,F.return),bg(3,F)}catch(p){go(F,F.return,p)}try{Hd(5,F,F.return)}catch(p){go(F,F.return,p)}}break;case 1:Cu(W,F),of(F),we&512&&ue!==null&&Pv(ue,ue.return);break;case 5:if(Cu(W,F),of(F),we&512&&ue!==null&&Pv(ue,ue.return),F.flags&32){var ke=F.stateNode;try{Jd(ke,"")}catch(p){go(F,F.return,p)}}if(we&4&&(ke=F.stateNode,ke!=null)){var Xe=F.memoizedProps,G=ue!==null?ue.memoizedProps:Xe,V=F.type,e=F.updateQueue;if(F.updateQueue=null,e!==null)try{V==="input"&&Xe.type==="radio"&&Xe.name!=null&&p3(ke,Xe),s1(V,G);var m=s1(V,Xe);for(G=0;G<e.length;G+=2){var P=e[G],i=e[G+1];P==="style"?b3(ke,i):P==="dangerouslySetInnerHTML"?m3(ke,i):P==="children"?Jd(ke,i):om(ke,P,i,m)}switch(V){case"input":r1(ke,Xe);break;case"textarea":g3(ke,Xe);break;case"select":var L=ke._wrapperState.wasMultiple;ke._wrapperState.wasMultiple=!!Xe.multiple;var A=Xe.value;A!=null?Iv(ke,!!Xe.multiple,A,!1):L!==!!Xe.multiple&&(Xe.defaultValue!=null?Iv(ke,!!Xe.multiple,Xe.defaultValue,!0):Iv(ke,!!Xe.multiple,Xe.multiple?[]:"",!1))}ke[ip]=Xe}catch(p){go(F,F.return,p)}}break;case 6:if(Cu(W,F),of(F),we&4){if(F.stateNode===null)throw Error(va(162));ke=F.stateNode,Xe=F.memoizedProps;try{ke.nodeValue=Xe}catch(p){go(F,F.return,p)}}break;case 3:if(Cu(W,F),of(F),we&4&&ue!==null&&ue.memoizedState.isDehydrated)try{ep(W.containerInfo)}catch(p){go(F,F.return,p)}break;case 4:Cu(W,F),of(F);break;case 13:Cu(W,F),of(F),ke=F.child,ke.flags&8192&&(Xe=ke.memoizedState!==null,ke.stateNode.isHidden=Xe,!Xe||ke.alternate!==null&&ke.alternate.memoizedState!==null||(Bm=Ao())),we&4&&bb(F);break;case 22:if(P=ue!==null&&ue.memoizedState!==null,F.mode&1?(Ss=(m=Ss)||P,Cu(W,F),Ss=m):Cu(W,F),of(F),we&8192){if(m=F.memoizedState!==null,(F.stateNode.isHidden=m)&&!P&&F.mode&1)for(Fa=F,P=F.child;P!==null;){for(i=Fa=P;Fa!==null;){switch(L=Fa,A=L.child,L.tag){case 0:case 11:case 14:case 15:Hd(4,L,L.return);break;case 1:Pv(L,L.return);var v=L.stateNode;if(typeof v.componentWillUnmount=="function"){we=L,ue=L.return;try{W=we,v.props=W.memoizedProps,v.state=W.memoizedState,v.componentWillUnmount()}catch(p){go(we,ue,p)}}break;case 5:Pv(L,L.return);break;case 22:if(L.memoizedState!==null){Tb(i);continue}}A!==null?(A.return=L,Fa=A):Tb(i)}P=P.sibling}e:for(P=null,i=F;;){if(i.tag===5){if(P===null){P=i;try{ke=i.stateNode,m?(Xe=ke.style,typeof Xe.setProperty=="function"?Xe.setProperty("display","none","important"):Xe.display="none"):(V=i.stateNode,e=i.memoizedProps.style,G=e!=null&&e.hasOwnProperty("display")?e.display:null,V.style.display=x3("display",G))}catch(p){go(F,F.return,p)}}}else if(i.tag===6){if(P===null)try{i.stateNode.nodeValue=m?"":i.memoizedProps}catch(p){go(F,F.return,p)}}else if((i.tag!==22&&i.tag!==23||i.memoizedState===null||i===F)&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===F)break e;for(;i.sibling===null;){if(i.return===null||i.return===F)break e;P===i&&(P=null),i=i.return}P===i&&(P=null),i.sibling.return=i.return,i=i.sibling}}break;case 19:Cu(W,F),of(F),we&4&&bb(F);break;case 21:break;default:Cu(W,F),of(F)}}function of(F){var W=F.flags;if(W&2){try{e:{for(var ue=F.return;ue!==null;){if(Zw(ue)){var we=ue;break e}ue=ue.return}throw Error(va(160))}switch(we.tag){case 5:var ke=we.stateNode;we.flags&32&&(Jd(ke,""),we.flags&=-33);var Xe=xb(F);O1(F,Xe,ke);break;case 3:case 4:var G=we.stateNode.containerInfo,V=xb(F);z1(F,V,G);break;default:throw Error(va(161))}}catch(e){go(F,F.return,e)}F.flags&=-3}W&4096&&(F.flags&=-4097)}function JS(F,W,ue){Fa=F,Kw(F)}function Kw(F,W,ue){for(var we=(F.mode&1)!==0;Fa!==null;){var ke=Fa,Xe=ke.child;if(ke.tag===22&&we){var G=ke.memoizedState!==null||h0;if(!G){var V=ke.alternate,e=V!==null&&V.memoizedState!==null||Ss;V=h0;var m=Ss;if(h0=G,(Ss=e)&&!m)for(Fa=ke;Fa!==null;)G=Fa,e=G.child,G.tag===22&&G.memoizedState!==null?Ab(ke):e!==null?(e.return=G,Fa=e):Ab(ke);for(;Xe!==null;)Fa=Xe,Kw(Xe),Xe=Xe.sibling;Fa=ke,h0=V,Ss=m}wb(F)}else ke.subtreeFlags&8772&&Xe!==null?(Xe.return=ke,Fa=Xe):wb(F)}}function wb(F){for(;Fa!==null;){var W=Fa;if(W.flags&8772){var ue=W.alternate;try{if(W.flags&8772)switch(W.tag){case 0:case 11:case 15:Ss||bg(5,W);break;case 1:var we=W.stateNode;if(W.flags&4&&!Ss)if(ue===null)we.componentDidMount();else{var ke=W.elementType===W.type?ue.memoizedProps:Lu(W.type,ue.memoizedProps);we.componentDidUpdate(ke,ue.memoizedState,we.__reactInternalSnapshotBeforeUpdate)}var Xe=W.updateQueue;Xe!==null&&ab(W,Xe,we);break;case 3:var G=W.updateQueue;if(G!==null){if(ue=null,W.child!==null)switch(W.child.tag){case 5:ue=W.child.stateNode;break;case 1:ue=W.child.stateNode}ab(W,G,ue)}break;case 5:var V=W.stateNode;if(ue===null&&W.flags&4){ue=V;var e=W.memoizedProps;switch(W.type){case"button":case"input":case"select":case"textarea":e.autoFocus&&ue.focus();break;case"img":e.src&&(ue.src=e.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(W.memoizedState===null){var m=W.alternate;if(m!==null){var P=m.memoizedState;if(P!==null){var i=P.dehydrated;i!==null&&ep(i)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(va(163))}Ss||W.flags&512&&_1(W)}catch(L){go(W,W.return,L)}}if(W===F){Fa=null;break}if(ue=W.sibling,ue!==null){ue.return=W.return,Fa=ue;break}Fa=W.return}}function Tb(F){for(;Fa!==null;){var W=Fa;if(W===F){Fa=null;break}var ue=W.sibling;if(ue!==null){ue.return=W.return,Fa=ue;break}Fa=W.return}}function Ab(F){for(;Fa!==null;){var W=Fa;try{switch(W.tag){case 0:case 11:case 15:var ue=W.return;try{bg(4,W)}catch(e){go(W,ue,e)}break;case 1:var we=W.stateNode;if(typeof we.componentDidMount=="function"){var ke=W.return;try{we.componentDidMount()}catch(e){go(W,ke,e)}}var Xe=W.return;try{_1(W)}catch(e){go(W,Xe,e)}break;case 5:var G=W.return;try{_1(W)}catch(e){go(W,G,e)}}}catch(e){go(W,W.return,e)}if(W===F){Fa=null;break}var V=W.sibling;if(V!==null){V.return=W.return,Fa=V;break}Fa=W.return}}var QS=Math.ceil,eg=$f.ReactCurrentDispatcher,Om=$f.ReactCurrentOwner,tu=$f.ReactCurrentBatchConfig,Ai=0,Qo=null,Io=null,ls=0,Cl=0,Rv=$c(0),Uo=0,cp=null,Hh=0,wg=0,Nm=0,Gd=null,il=null,Bm=0,Yv=1/0,Vf=null,tg=!1,N1=null,Yc=null,v0=!1,Nc=null,rg=0,Wd=0,B1=null,D0=-1,I0=0;function Gs(){return Ai&6?Ao():D0!==-1?D0:D0=Ao()}function Zc(F){return F.mode&1?Ai&2&&ls!==0?ls&-ls:FS.transition!==null?(I0===0&&(I0=I3()),I0):(F=ki,F!==0||(F=window.event,F=F===void 0?16:B3(F.type)),F):1}function Iu(F,W,ue,we){if(50<Wd)throw Wd=0,B1=null,Error(va(185));yp(F,ue,we),(!(Ai&2)||F!==Qo)&&(F===Qo&&(!(Ai&2)&&(wg|=ue),Uo===4&&zc(F,ls)),fl(F,we),ue===1&&Ai===0&&!(W.mode&1)&&(Yv=Ao()+500,yg&&qc()))}function fl(F,W){var ue=F.callbackNode;FM(F,W);var we=B0(F,F===Qo?ls:0);if(we===0)ue!==null&&I2(ue),F.callbackNode=null,F.callbackPriority=0;else if(W=we&-we,F.callbackPriority!==W){if(ue!=null&&I2(ue),W===1)F.tag===0?kS(Mb.bind(null,F)):aw(Mb.bind(null,F)),PS(function(){!(Ai&6)&&qc()}),ue=null;else{switch(k3(we)){case 1:ue=cm;break;case 4:ue=R3;break;case 16:ue=N0;break;case 536870912:ue=D3;break;default:ue=N0}ue=nT(ue,Jw.bind(null,F))}F.callbackPriority=W,F.callbackNode=ue}}function Jw(F,W){if(D0=-1,I0=0,Ai&6)throw Error(va(327));var ue=F.callbackNode;if(Ov()&&F.callbackNode!==ue)return null;var we=B0(F,F===Qo?ls:0);if(we===0)return null;if(we&30||we&F.expiredLanes||W)W=ng(F,we);else{W=we;var ke=Ai;Ai|=2;var Xe=$w();(Qo!==F||ls!==W)&&(Vf=null,Yv=Ao()+500,Oh(F,W));do try{e6();break}catch(V){Qw(F,V)}while(1);Mm(),eg.current=Xe,Ai=ke,Io!==null?W=0:(Qo=null,ls=0,W=Uo)}if(W!==0){if(W===2&&(ke=h1(F),ke!==0&&(we=ke,W=U1(F,ke))),W===1)throw ue=cp,Oh(F,0),zc(F,we),fl(F,Ao()),ue;if(W===6)zc(F,we);else{if(ke=F.current.alternate,!(we&30)&&!$S(ke)&&(W=ng(F,we),W===2&&(Xe=h1(F),Xe!==0&&(we=Xe,W=U1(F,Xe))),W===1))throw ue=cp,Oh(F,0),zc(F,we),fl(F,Ao()),ue;switch(F.finishedWork=ke,F.finishedLanes=we,W){case 0:case 1:throw Error(va(345));case 2:Dh(F,il,Vf);break;case 3:if(zc(F,we),(we&130023424)===we&&(W=Bm+500-Ao(),10<W)){if(B0(F,0)!==0)break;if(ke=F.suspendedLanes,(ke&we)!==we){Gs(),F.pingedLanes|=F.suspendedLanes&ke;break}F.timeoutHandle=b1(Dh.bind(null,F,il,Vf),W);break}Dh(F,il,Vf);break;case 4:if(zc(F,we),(we&4194240)===we)break;for(W=F.eventTimes,ke=-1;0<we;){var G=31-Du(we);Xe=1<<G,G=W[G],G>ke&&(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,10<we){F.timeoutHandle=b1(Dh.bind(null,F,il,Vf),we);break}Dh(F,il,Vf);break;case 5:Dh(F,il,Vf);break;default:throw Error(va(329))}}}return fl(F,Ao()),F.callbackNode===ue?Jw.bind(null,F):null}function U1(F,W){var ue=Gd;return F.current.memoizedState.isDehydrated&&(Oh(F,W).flags|=256),F=ng(F,W),F!==2&&(W=il,il=ue,W!==null&&V1(W)),F}function V1(F){il===null?il=F:il.push.apply(il,F)}function $S(F){for(var W=F;;){if(W.flags&16384){var ue=W.updateQueue;if(ue!==null&&(ue=ue.stores,ue!==null))for(var we=0;we<ue.length;we++){var ke=ue[we],Xe=ke.getSnapshot;ke=ke.value;try{if(!ku(Xe(),ke))return!1}catch{return!1}}}if(ue=W.child,W.subtreeFlags&16384&&ue!==null)ue.return=W,W=ue;else{if(W===F)break;for(;W.sibling===null;){if(W.return===null||W.return===F)return!0;W=W.return}W.sibling.return=W.return,W=W.sibling}}return!0}function zc(F,W){for(W&=~Nm,W&=~wg,F.suspendedLanes|=W,F.pingedLanes&=~W,F=F.expirationTimes;0<W;){var ue=31-Du(W),we=1<<ue;F[ue]=-1,W&=~we}}function Mb(F){if(Ai&6)throw Error(va(327));Ov();var W=B0(F,0);if(!(W&1))return fl(F,Ao()),null;var ue=ng(F,W);if(F.tag!==0&&ue===2){var we=h1(F);we!==0&&(W=we,ue=U1(F,we))}if(ue===1)throw ue=cp,Oh(F,0),zc(F,W),fl(F,Ao()),ue;if(ue===6)throw Error(va(345));return F.finishedWork=F.current.alternate,F.finishedLanes=W,Dh(F,il,Vf),fl(F,Ao()),null}function Um(F,W){var ue=Ai;Ai|=1;try{return F(W)}finally{Ai=ue,Ai===0&&(Yv=Ao()+500,yg&&qc())}}function Gh(F){Nc!==null&&Nc.tag===0&&!(Ai&6)&&Ov();var W=Ai;Ai|=1;var ue=tu.transition,we=ki;try{if(tu.transition=null,ki=1,F)return F()}finally{ki=we,tu.transition=ue,Ai=W,!(Ai&6)&&qc()}}function Vm(){Cl=Rv.current,ji(Rv)}function Oh(F,W){F.finishedWork=null,F.finishedLanes=0;var ue=F.timeoutHandle;if(ue!==-1&&(F.timeoutHandle=-1,LS(ue)),Io!==null)for(ue=Io.return;ue!==null;){var we=ue;switch(wm(we),we.tag){case 1:we=we.type.childContextTypes,we!=null&&W0();break;case 3:Gv(),ji(ll),ji(Cs),Rm();break;case 5:Pm(we);break;case 4:Gv();break;case 13:ji(lo);break;case 19:ji(lo);break;case 10:Sm(we.type._context);break;case 22:case 23:Vm()}ue=ue.return}if(Qo=F,Io=F=Xc(F.current,null),ls=Cl=W,Uo=0,cp=null,Nm=wg=Hh=0,il=Gd=null,_h!==null){for(W=0;W<_h.length;W++)if(ue=_h[W],we=ue.interleaved,we!==null){ue.interleaved=null;var ke=we.next,Xe=ue.pending;if(Xe!==null){var G=Xe.next;Xe.next=ke,we.next=G}ue.pending=we}_h=null}return F}function Qw(F,W){do{var ue=Io;try{if(Mm(),L0.current=q0,$0){for(var we=uo.memoizedState;we!==null;){var ke=we.queue;ke!==null&&(ke.pending=null),we=we.next}$0=!1}if(Vh=0,Ko=No=uo=null,Vd=!1,lp=0,Om.current=null,ue===null||ue.return===null){Uo=1,cp=W,Io=null;break}e:{var Xe=F,G=ue.return,V=ue,e=W;if(W=ls,V.flags|=32768,e!==null&&typeof e=="object"&&typeof e.then=="function"){var m=e,P=V,i=P.tag;if(!(P.mode&1)&&(i===0||i===11||i===15)){var L=P.alternate;L?(P.updateQueue=L.updateQueue,P.memoizedState=L.memoizedState,P.lanes=L.lanes):(P.updateQueue=null,P.memoizedState=null)}var A=cb(G);if(A!==null){A.flags&=-257,hb(A,G,V,Xe,W),A.mode&1&&fb(Xe,m,W),W=A,e=m;var v=W.updateQueue;if(v===null){var p=new Set;p.add(e),W.updateQueue=p}else v.add(e);break e}else{if(!(W&1)){fb(Xe,m,W),Hm();break e}e=Error(va(426))}}else if(qi&&V.mode&1){var t=cb(G);if(t!==null){!(t.flags&65536)&&(t.flags|=256),hb(t,G,V,Xe,W),Tm(Wv(e,V));break e}}Xe=e=Wv(e,V),Uo!==4&&(Uo=2),Gd===null?Gd=[Xe]:Gd.push(Xe),Xe=G;do{switch(Xe.tag){case 3:Xe.flags|=65536,W&=-W,Xe.lanes|=W;var r=Fw(Xe,e,W);nb(Xe,r);break e;case 1:V=e;var s=Xe.type,n=Xe.stateNode;if(!(Xe.flags&128)&&(typeof s.getDerivedStateFromError=="function"||n!==null&&typeof n.componentDidCatch=="function"&&(Yc===null||!Yc.has(n)))){Xe.flags|=65536,W&=-W,Xe.lanes|=W;var l=_w(Xe,V,W);nb(Xe,l);break e}}Xe=Xe.return}while(Xe!==null)}eT(ue)}catch(c){W=c,Io===ue&&ue!==null&&(Io=ue=ue.return);continue}break}while(1)}function $w(){var F=eg.current;return eg.current=q0,F===null?q0:F}function Hm(){(Uo===0||Uo===3||Uo===2)&&(Uo=4),Qo===null||!(Hh&268435455)&&!(wg&268435455)||zc(Qo,ls)}function ng(F,W){var ue=Ai;Ai|=2;var we=$w();(Qo!==F||ls!==W)&&(Vf=null,Oh(F,W));do try{qS();break}catch(ke){Qw(F,ke)}while(1);if(Mm(),Ai=ue,eg.current=we,Io!==null)throw Error(va(261));return Qo=null,ls=0,Uo}function qS(){for(;Io!==null;)qw(Io)}function e6(){for(;Io!==null&&!SM();)qw(Io)}function qw(F){var W=rT(F.alternate,F,Cl);F.memoizedProps=F.pendingProps,W===null?eT(F):Io=W,Om.current=null}function eT(F){var W=F;do{var ue=W.alternate;if(F=W.return,W.flags&32768){if(ue=XS(ue,W),ue!==null){ue.flags&=32767,Io=ue;return}if(F!==null)F.flags|=32768,F.subtreeFlags=0,F.deletions=null;else{Uo=6,Io=null;return}}else if(ue=ZS(ue,W,Cl),ue!==null){Io=ue;return}if(W=W.sibling,W!==null){Io=W;return}Io=W=F}while(W!==null);Uo===0&&(Uo=5)}function Dh(F,W,ue){var we=ki,ke=tu.transition;try{tu.transition=null,ki=1,t6(F,W,ue,we)}finally{tu.transition=ke,ki=we}return null}function t6(F,W,ue,we){do Ov();while(Nc!==null);if(Ai&6)throw Error(va(327));ue=F.finishedWork;var ke=F.finishedLanes;if(ue===null)return null;if(F.finishedWork=null,F.finishedLanes=0,ue===F.current)throw Error(va(177));F.callbackNode=null,F.callbackPriority=0;var Xe=ue.lanes|ue.childLanes;if(_M(F,Xe),F===Qo&&(Io=Qo=null,ls=0),!(ue.subtreeFlags&2064)&&!(ue.flags&2064)||v0||(v0=!0,nT(N0,function(){return Ov(),null})),Xe=(ue.flags&15990)!==0,ue.subtreeFlags&15990||Xe){Xe=tu.transition,tu.transition=null;var G=ki;ki=1;var V=Ai;Ai|=4,Om.current=null,KS(F,ue),jw(ue,F),wS(m1),U0=!!y1,m1=y1=null,F.current=ue,JS(ue),EM(),Ai=V,ki=G,tu.transition=Xe}else F.current=ue;if(v0&&(v0=!1,Nc=F,rg=ke),Xe=F.pendingLanes,Xe===0&&(Yc=null),PM(ue.stateNode),fl(F,Ao()),W!==null)for(we=F.onRecoverableError,ue=0;ue<W.length;ue++)ke=W[ue],we(ke.value,{componentStack:ke.stack,digest:ke.digest});if(tg)throw tg=!1,F=N1,N1=null,F;return rg&1&&F.tag!==0&&Ov(),Xe=F.pendingLanes,Xe&1?F===B1?Wd++:(Wd=0,B1=F):Wd=0,qc(),null}function Ov(){if(Nc!==null){var F=k3(rg),W=tu.transition,ue=ki;try{if(tu.transition=null,ki=16>F?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;e<V.length;e++){var m=V[e];for(Fa=m;Fa!==null;){var P=Fa;switch(P.tag){case 0:case 11:case 15:Hd(8,P,Xe)}var i=P.child;if(i!==null)i.return=P,Fa=i;else for(;Fa!==null;){P=Fa;var L=P.sibling,A=P.return;if(Yw(P),P===m){Fa=null;break}if(L!==null){L.return=A,Fa=L;break}Fa=A}}}var v=Xe.alternate;if(v!==null){var p=v.child;if(p!==null){v.child=null;do{var t=p.sibling;p.sibling=null,p=t}while(p!==null)}}Fa=Xe}}if(Xe.subtreeFlags&2064&&G!==null)G.return=Xe,Fa=G;else e:for(;Fa!==null;){if(Xe=Fa,Xe.flags&2048)switch(Xe.tag){case 0:case 11:case 15:Hd(9,Xe,Xe.return)}var r=Xe.sibling;if(r!==null){r.return=Xe.return,Fa=r;break e}Fa=Xe.return}}var s=F.current;for(Fa=s;Fa!==null;){G=Fa;var n=G.child;if(G.subtreeFlags&2064&&n!==null)n.return=G,Fa=n;else e:for(G=s;Fa!==null;){if(V=Fa,V.flags&2048)try{switch(V.tag){case 0:case 11:case 15:bg(9,V)}}catch(c){go(V,V.return,c)}if(V===G){Fa=null;break e}var l=V.sibling;if(l!==null){l.return=V.return,Fa=l;break e}Fa=V.return}}if(Ai=ke,qc(),uf&&typeof uf.onPostCommitFiberRoot=="function")try{uf.onPostCommitFiberRoot(hg,F)}catch{}we=!0}return we}finally{ki=ue,tu.transition=W}}return!1}function Sb(F,W,ue){W=Wv(ue,W),W=Fw(F,W,1),F=Wc(F,W,1),W=Gs(),F!==null&&(yp(F,1,W),fl(F,W))}function go(F,W,ue){if(F.tag===3)Sb(F,F,ue);else for(;W!==null;){if(W.tag===3){Sb(W,F,ue);break}else if(W.tag===1){var we=W.stateNode;if(typeof W.type.getDerivedStateFromError=="function"||typeof we.componentDidCatch=="function"&&(Yc===null||!Yc.has(we))){F=Wv(ue,F),F=_w(W,F,1),W=Wc(W,F,1),F=Gs(),W!==null&&(yp(W,1,F),fl(W,F));break}}W=W.return}}function r6(F,W,ue){var we=F.pingCache;we!==null&&we.delete(W),W=Gs(),F.pingedLanes|=F.suspendedLanes&ue,Qo===F&&(ls&ue)===ue&&(Uo===4||Uo===3&&(ls&130023424)===ls&&500>Ao()-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<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:xv,key:we==null?null:""+we,children:F,containerInfo:W,implementation:ue}}function aT(F){if(!F)return Kc;F=F._reactInternals;e:{if(Yh(F)!==F||F.tag!==1)throw Error(va(170));var W=F;do{switch(W.tag){case 3:W=W.stateNode.context;break e;case 1:if(ul(W.type)){W=W.stateNode.__reactInternalMemoizedMergedChildContext;break e}}W=W.return}while(W!==null);throw Error(va(171))}if(F.tag===1){var ue=F.type;if(ul(ue))return nw(F,ue,W)}return W}function iT(F,W,ue,we,ke,Xe,G,V,e){return F=Wm(ue,we,!0,F,ke,Xe,G,V,e),F.context=aT(null),ue=F.current,we=Gs(),ke=Zc(ue),Xe=Xf(we,ke),Xe.callback=W??null,Wc(ue,Xe,ke),F.current.lanes=ke,yp(F,ke,we),fl(F,we),F}function Ag(F,W,ue,we){var ke=W.current,Xe=Gs(),G=Zc(ke);return ue=aT(ue),W.context===null?W.context=ue:W.pendingContext=ue,W=Xf(Xe,G),W.payload={element:F},we=we===void 0?null:we,we!==null&&(W.callback=we),F=Wc(ke,W,G),F!==null&&(Iu(F,ke,G,Xe),C0(F,ke,G)),G}function ag(F){if(F=F.current,!F.child)return null;switch(F.child.tag){case 5:return F.child.stateNode;default:return F.child.stateNode}}function Eb(F,W){if(F=F.memoizedState,F!==null&&F.dehydrated!==null){var ue=F.retryLane;F.retryLane=ue!==0&&ue<W?ue:W}}function Ym(F,W){Eb(F,W),(F=F.alternate)&&Eb(F,W)}function u6(){return null}var oT=typeof reportError=="function"?reportError:function(F){console.error(F)};function Zm(F){this._internalRoot=F}Mg.prototype.render=Zm.prototype.render=function(F){var W=this._internalRoot;if(W===null)throw Error(va(409));Ag(F,W,null,null)};Mg.prototype.unmount=Zm.prototype.unmount=function(){var F=this._internalRoot;if(F!==null){this._internalRoot=null;var W=F.containerInfo;Gh(function(){Ag(null,F,null,null)}),W[Kf]=null}};function Mg(F){this._internalRoot=F}Mg.prototype.unstable_scheduleHydration=function(F){if(F){var W=z3();F={blockedOn:null,target:F,priority:W};for(var ue=0;ue<_c.length&&W!==0&&W<_c[ue].priority;ue++);_c.splice(ue,0,F),ue===0&&N3(F)}};function Xm(F){return!(!F||F.nodeType!==1&&F.nodeType!==9&&F.nodeType!==11)}function Sg(F){return!(!F||F.nodeType!==1&&F.nodeType!==9&&F.nodeType!==11&&(F.nodeType!==8||F.nodeValue!==" react-mount-point-unstable "))}function Cb(){}function f6(F,W,ue,we,ke){if(ke){if(typeof we=="function"){var Xe=we;we=function(){var m=ag(G);Xe.call(m)}}var G=iT(W,we,F,0,null,!1,!1,"",Cb);return F._reactRootContainer=G,F[Kf]=G.current,np(F.nodeType===8?F.parentNode:F),Gh(),G}for(;ke=F.lastChild;)F.removeChild(ke);if(typeof we=="function"){var V=we;we=function(){var m=ag(e);V.call(m)}}var e=Wm(F,0,!1,null,null,!1,!1,"",Cb);return F._reactRootContainer=e,F[Kf]=e.current,np(F.nodeType===8?F.parentNode:F),Gh(function(){Ag(W,e,ue,we)}),e}function Eg(F,W,ue,we,ke){var Xe=ue._reactRootContainer;if(Xe){var G=Xe;if(typeof ke=="function"){var V=ke;ke=function(){var e=ag(G);V.call(e)}}Ag(W,G,F,ke)}else G=f6(ue,W,F,ke,we);return ag(G)}F3=function(F){switch(F.tag){case 3:var W=F.stateNode;if(W.current.memoizedState.isDehydrated){var ue=Fd(W.pendingLanes);ue!==0&&(hm(W,ue|1),fl(W,Ao()),!(Ai&6)&&(Yv=Ao()+500,qc()))}break;case 13:Gh(function(){var we=Jf(F,1);if(we!==null){var ke=Gs();Iu(we,F,1,ke)}}),Ym(F,1)}};vm=function(F){if(F.tag===13){var W=Jf(F,134217728);if(W!==null){var ue=Gs();Iu(W,F,134217728,ue)}Ym(F,134217728)}};_3=function(F){if(F.tag===13){var W=Zc(F),ue=Jf(F,W);if(ue!==null){var we=Gs();Iu(ue,F,W,we)}Ym(F,W)}};z3=function(){return ki};O3=function(F,W){var ue=ki;try{return ki=F,W()}finally{ki=ue}};u1=function(F,W,ue){switch(W){case"input":if(r1(F,ue),W=ue.name,ue.type==="radio"&&W!=null){for(ue=F;ue.parentNode;)ue=ue.parentNode;for(ue=ue.querySelectorAll("input[name="+JSON.stringify(""+W)+'][type="radio"]'),W=0;W<ue.length;W++){var we=ue[W];if(we!==F&&we.form===F.form){var ke=gg(we);if(!ke)throw Error(va(90));d3(we),r1(we,ke)}}}break;case"textarea":g3(F,ue);break;case"select":W=ue.value,W!=null&&Iv(F,!!ue.multiple,W,!1)}};A3=Um;M3=Gh;var c6={usingClientEntryPoint:!1,Events:[xp,Mv,gg,w3,T3,Um]},Rd={findFiberByHostInstance:Fh,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},h6={bundleType:Rd.bundleType,version:Rd.version,rendererPackageName:Rd.rendererPackageName,rendererConfig:Rd.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:$f.ReactCurrentDispatcher,findHostInstanceByFiber:function(F){return F=C3(F),F===null?null:F.stateNode},findFiberByHostInstance:Rd.findFiberByHostInstance||u6,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var d0=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!d0.isDisabled&&d0.supportsFiber)try{hg=d0.inject(h6),uf=d0}catch{}}Dl.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=c6;Dl.createPortal=function(F,W){var ue=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Xm(W))throw Error(va(200));return l6(F,W,null,ue)};Dl.createRoot=function(F,W){if(!Xm(F))throw Error(va(299));var ue=!1,we="",ke=oT;return W!=null&&(W.unstable_strictMode===!0&&(ue=!0),W.identifierPrefix!==void 0&&(we=W.identifierPrefix),W.onRecoverableError!==void 0&&(ke=W.onRecoverableError)),W=Wm(F,1,!1,null,null,ue,!1,we,ke),F[Kf]=W.current,np(F.nodeType===8?F.parentNode:F),new Zm(W)};Dl.findDOMNode=function(F){if(F==null)return null;if(F.nodeType===1)return F;var W=F._reactInternals;if(W===void 0)throw typeof F.render=="function"?Error(va(188)):(F=Object.keys(F).join(","),Error(va(268,F)));return F=C3(W),F=F===null?null:F.stateNode,F};Dl.flushSync=function(F){return Gh(F)};Dl.hydrate=function(F,W,ue){if(!Sg(W))throw Error(va(200));return Eg(null,F,W,!0,ue)};Dl.hydrateRoot=function(F,W,ue){if(!Xm(F))throw Error(va(405));var we=ue!=null&&ue.hydratedSources||null,ke=!1,Xe="",G=oT;if(ue!=null&&(ue.unstable_strictMode===!0&&(ke=!0),ue.identifierPrefix!==void 0&&(Xe=ue.identifierPrefix),ue.onRecoverableError!==void 0&&(G=ue.onRecoverableError)),W=iT(W,null,F,1,ue??null,ke,!1,Xe,G),F[Kf]=W.current,np(F),we)for(F=0;F<we.length;F++)ue=we[F],ke=ue._getVersion,ke=ke(ue._source),W.mutableSourceEagerHydrationData==null?W.mutableSourceEagerHydrationData=[ue,ke]:W.mutableSourceEagerHydrationData.push(ue,ke);return new Mg(W)};Dl.render=function(F,W,ue){if(!Sg(W))throw Error(va(200));return Eg(null,F,W,!1,ue)};Dl.unmountComponentAtNode=function(F){if(!Sg(F))throw Error(va(40));return F._reactRootContainer?(Gh(function(){Eg(null,null,F,!1,function(){F._reactRootContainer=null,F[Kf]=null})}),!0):!1};Dl.unstable_batchedUpdates=Um;Dl.unstable_renderSubtreeIntoContainer=function(F,W,ue,we){if(!Sg(ue))throw Error(va(200));if(F==null||F._reactInternals===void 0)throw Error(va(38));return Eg(F,W,ue,!1,we)};Dl.version="18.2.0-next-9e3b772b8-20220608";function sT(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"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;ue<F;ue++)W[ue]=arguments[ue];return Fn.useMemo(()=>we=>{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<ue;ke++)we[ke]=arguments[ke];return W.current==null?void 0:W.current(...we)},[])}function p6(){const F=Fn.useRef(null),W=Fn.useCallback((we,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<ue;ke++)we[ke-1]=arguments[ke];return we.reduce((Xe,G)=>{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 <DndContext>");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<F;ue++)W[ue]=arguments[ue];return Fn.useMemo(()=>[...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<ke&&ue<Xe){const e=W.width*W.height,m=F.width*F.height,P=G*V,i=P/(e+m-P);return Number(i.toFixed(4))}return 0}const hT=F=>{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<we;Xe++)ke[Xe-1]=arguments[Xe];return ke.reduce((G,V)=>({...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<F.length;ue++)if(F[ue]!==W[ue])return!1;return!0}function O8(F){return typeof F=="boolean"?{draggable:F,droppable:F}:F}const g0={scaleX:1,scaleY:1},N8=F=>{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:ke<Xe?m.left+m.width-(V.left+V.width):m.left-V.left,y:0,...g0}:null}return G>ke&&G<=Xe?{x:-V.width-e,y:0,...g0}:G<ke&&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<W?ke?we.left-(ke.left+ke.width):Xe.left-(we.left+we.width):Xe?Xe.left-(we.left+we.width):we.left-(ke.left+ke.width)}const LT=F=>{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:ue<G?m.top+m.height-(V.top+V.height):m.top-V.top,...y0}:null}const e=V8(Xe,ke,ue);return ke>ue&&ke<=G?{x:0,y:-V.height-e,...y0}:ke<ue&&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?ue<W?ke?we.top-(ke.top+ke.height):Xe?Xe.top-(we.top+we.height):0:Xe?Xe.top-(we.top+we.height):ke?we.top-(ke.top+ke.height):0:0}const PT="Sortable",RT=Hi.createContext({activeIndex:-1,containerId:PT,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:LT,disabled:{draggable:!1,droppable:!1}});function H8(F){let{children:W,id:ue,items:we,strategy:ke=LT,disabled:Xe=!1}=F;const{active:G,dragOverlay:V,droppableRects:e,over:m,measureDroppableContainers:P}=I8(),i=Ap(PT,ue),L=V.rect!==null,A=Fn.useMemo(()=>we.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.top<L.top&&e.push(i);break;case mi.Up:we.top>L.top&&e.push(i);break;case mi.Left:we.left>L.left&&e.push(i);break;case mi.Right:we.left<L.left&&e.push(i);break}});const m=R6({active:ue,collisionRect:we,droppableRects:ke,droppableContainers:e,pointerCoordinates:null});let P=ex(m,"id");if(P===(G==null?void 0:G.id)&&m.length>1&&(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<W.data.current.sortable.index}var j1={exports:{}};(function(F,W){Object.defineProperty(W,"__esModule",{value:!0});function ue(g){return typeof g=="object"&&!("toString"in g)?Object.prototype.toString.call(g).slice(8,-1):g}var we=typeof process=="object"&&!0;function ke(g,f){if(!g)throw we?new Error("Invariant failed"):new Error(f())}W.invariant=ke;var Xe=Object.prototype.hasOwnProperty,G=Array.prototype.splice,V=Object.prototype.toString;function e(g){return V.call(g).slice(8,-1)}var m=Object.assign||function(g,f){return P(f).forEach(function(w){Xe.call(f,w)&&(g[w]=f[w])}),g},P=typeof Object.getOwnPropertySymbols=="function"?function(g){return Object.keys(g).concat(Object.getOwnPropertySymbols(g))}:function(g){return Object.keys(g)};function i(g){return Array.isArray(g)?m(g.constructor(g.length),g):e(g)==="Map"?new Map(g):e(g)==="Set"?new Set(g):g&&typeof g=="object"?m(Object.create(Object.getPrototypeOf(g)),g):g}var L=function(){function g(){this.commands=m({},A),this.update=this.update.bind(this),this.update.extend=this.extend=this.extend.bind(this),this.update.isEquals=function(f,w){return f===w},this.update.newContext=function(){return new g().update}}return Object.defineProperty(g.prototype,"isEquals",{get:function(){return this.update.isEquals},set:function(f){this.update.isEquals=f},enumerable:!0,configurable:!0}),g.prototype.extend=function(f,w){this.commands[f]=w},g.prototype.update=function(f,w){var h=this,o=typeof w=="function"?{$apply:w}:w;Array.isArray(f)&&Array.isArray(o)||ke(!Array.isArray(o),function(){return"update(): You provided an invalid spec to update(). The spec may not contain an array except as the value of $set, $push, $unshift, $splice or any custom command allowing an array value."}),ke(typeof o=="object"&&o!==null,function(){return"update(): You provided an invalid spec to update(). The spec and every included key path must be plain objects containing one of the "+("following commands: "+Object.keys(h.commands).join(", ")+".")});var d=f;return P(o).forEach(function(M){if(Xe.call(h.commands,M)){var T=f===d;d=h.commands[M](o[M],d,o,f),T&&h.isEquals(d,f)&&(d=f)}else{var C=e(f)==="Map"?h.update(f.get(M),o[M]):h.update(f[M],o[M]),x=e(d)==="Map"?d.get(M):d[M];(!h.isEquals(C,x)||typeof C>"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(ue<we)return-1;if(ue>we)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;Xe<we;Xe++)ke[Xe]=arguments[Xe];return function(G,V,e){return{selector:{total:[[],[]],row:[V,[]],col:[[],e]}[W],inner:F(...Array.from(ke||[]))(G,V,e),push(m){this.inner.push(m)},format:ue,value(){return this.inner.value()/G.getAggregator(...Array.from(this.selector||[])).inner.value()},numInputs:F(...Array.from(ke||[]))().numInputs}}}}};Mo.countUnique=F=>Mo.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<F.length;){let Xe,G,V=!1;for(we=0,G=ue,Xe=G>=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<F.menuLimit,l=s.filter(v).sort(F.sorter);return xa.jsx(oE,{onChange:c=>{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.unusedOrientationCutoff,A=this.makeDnDCell(P,"unused",`pvtAxisContainer pvtUnused ${L?"pvtHorizList":"pvtVertList"}`),v=ke.filter(f=>!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.length;g++){var f=u[g];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(c,f.key,f)}}function m(c,u,g){return u&&e(c.prototype,u),g&&e(c,g),Object.defineProperty(c,"prototype",{writable:!1}),c}function P(c,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(u&&u.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),u&&i(c,u)}function i(c,u){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,w){return f.__proto__=w,f},i(c,u)}function L(c){var u=p();return function(){var f=t(c),w;if(u){var h=t(this).constructor;w=Reflect.construct(f,arguments,h)}else w=f.apply(this,arguments);return A(this,w)}}function A(c,u){if(u&&(W(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return v(c)}function v(c){if(c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c}function p(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}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<n.length;g++)f=i(t.layout,"annotations",u[n[g]]),f.modifyItem("visible",!0),m.extendFlat(c,f.getUpdateObj());for(g=0;g<l.length;g++)f=i(t.layout,"annotations",u[l[g]]),f.modifyItem("visible",!1),m.extendFlat(c,f.getUpdateObj());return P.call("update",t,{},c)}}function v(t,r){var s=t._fullLayout.annotations,n=[],l=[],c=[],u=(r||[]).length,g,f,w,h,o,d,M,T;for(g=0;g<s.length;g++)if(w=s[g],h=w.clicktoshow,h){for(f=0;f<u;f++)if(o=r[f],d=o.xaxis,M=o.yaxis,d._id===w.xref&&M._id===w.yref&&d.d2r(o.x)===p(w._xclick,d)&&M.d2r(o.y)===p(w._yclick,M)){w.visible?h==="onout"?T=l:T=c:T=n,T.push(g);break}f===u&&w.visible&&h==="onout"&&l.push(g)}return{on:n,off:l,explicitOff:c}}function p(t,r){return r.type==="log"?r.l2r(t):r.d2r(t)}},25625:function(G,V,e){var m=e(71828),P=e(7901);G.exports=function(L,A,v,p){p("opacity");var t=p("bgcolor"),r=p("bordercolor"),s=P.opacity(r);p("borderpad");var n=p("borderwidth"),l=p("showarrow");p("text",l?" ":v._dfltTitle.annotation),p("textangle"),m.coerceFont(p,"font",v.font),p("width"),p("align");var c=p("height");if(c&&p("valign"),l){var u=p("arrowside"),g,f;u.indexOf("end")!==-1&&(g=p("arrowhead"),f=p("arrowsize")),u.indexOf("start")!==-1&&(p("startarrowhead",g),p("startarrowsize",f)),p("arrowcolor",s?A.bordercolor:P.defaultLine),p("arrowwidth",(s&&n||1)*2),p("standoff"),p("startstandoff")}var w=p("hovertext"),h=v.hoverlabel||{};if(w){var o=p("hoverlabel.bgcolor",h.bgcolor||(P.opacity(t)?P.rgb(t):P.defaultLine)),d=p("hoverlabel.bordercolor",h.bordercolor||P.contrast(o));m.coerceFont(p,"hoverlabel.font",{family:h.font.family,size:h.font.size,color:h.font.color||d})}p("captureevents",!!w)}},94128:function(G,V,e){var m=e(92770),P=e(58163);G.exports=function(L,A,v,p){A=A||{};var t=v==="log"&&A.type==="linear",r=v==="linear"&&A.type==="log";if(!(t||r))return;var s=L._fullLayout.annotations,n=A._id.charAt(0),l,c;function u(f){var w=l[f],h=null;t?h=P(w,A.range):h=Math.pow(10,w),m(h)||(h=null),p(c+f,h)}for(var g=0;g<s.length;g++)l=s[g],c="annotations["+g+"].",l[n+"ref"]===A._id&&u(n),l["a"+n+"ref"]===A._id&&u("a"+n)}},84046:function(G,V,e){var m=e(71828),P=e(89298),i=e(85501),L=e(25625),A=e(50215);G.exports=function(t,r){i(t,r,{name:"annotations",handleItemDefaults:v})};function v(p,t,r){function s(b,a){return m.coerce(p,t,A,b,a)}var n=s("visible"),l=s("clicktoshow");if(n||l){L(p,t,r,s);for(var c=t.showarrow,u=["x","y"],g=[-10,-30],f={_fullLayout:r},w=0;w<2;w++){var h=u[w],o=P.coerceRef(p,t,f,h,"","paper");if(o!=="paper"){var d=P.getFromId(f,o);d._annIndices.push(t._index)}if(P.coercePosition(t,f,s,o,h,.5),c){var M="a"+h,T=P.coerceRef(p,t,f,M,"pixel",["pixel","paper"]);T!=="pixel"&&T!==o&&(T=t[M]="pixel");var C=T==="pixel"?g[w]:.4;P.coercePosition(t,f,s,T,M,C)}s(h+"anchor"),s(h+"shift")}if(m.noneOrAll(p,t,["x","y"]),c&&m.noneOrAll(p,t,["ax","ay"]),l){var x=s("xclick"),S=s("yclick");t._xclick=x===void 0?t.x:P.cleanPosition(x,f,t.xref),t._yclick=S===void 0?t.y:P.cleanPosition(S,f,t.yref)}}}},92605:function(G,V,e){var m=e(39898),P=e(73972),i=e(74875),L=e(71828),A=L.strTranslate,v=e(89298),p=e(7901),t=e(91424),r=e(30211),s=e(63893),n=e(6964),l=e(28569),c=e(44467).arrayEditor,u=e(13011);G.exports={draw:g,drawOne:f,drawRaw:h};function g(o){var d=o._fullLayout;d._infolayer.selectAll(".annotation").remove();for(var M=0;M<d.annotations.length;M++)d.annotations[M].visible&&f(o,M);return i.previousPromises(o)}function f(o,d){var M=o._fullLayout,T=M.annotations[d]||{},C=v.getFromId(o,T.xref),x=v.getFromId(o,T.yref);C&&C.setScale(),x&&x.setScale(),h(o,T,d,!1,C,x)}function w(o,d,M,T,C){var x=C[M],S=C[M+"ref"],b=M.indexOf("y")!==-1,a=v.getRefType(S)==="domain",E=b?T.h:T.w;return o?a?x+(b?-d:d)/o._length:o.p2r(o.r2p(x)+d):x+(b?-d:d)/E}function h(o,d,M,T,C,x){var S=o._fullLayout,b=o._fullLayout._size,a=o._context.edits,E,y;T?(E="annotation-"+T,y=T+".annotations"):(E="annotation",y="annotations");var z=c(o.layout,y,d),I=z.modifyBase,B=z.modifyItem,k=z.getUpdateObj;S._infolayer.selectAll("."+E+'[data-index="'+M+'"]').remove();var O="clip"+S._uid+"_ann"+M;if(!d._input||d.visible===!1){m.selectAll("#"+O).remove();return}var N={x:{},y:{}},_=+d.textangle||0,U=S._infolayer.append("g").classed(E,!0).attr("data-index",String(M)).style("opacity",d.opacity),Y=U.append("g").classed("annotation-text-g",!0),J=a[d.showarrow?"annotationTail":"annotationPosition"],te=d.captureevents||a.annotationText||J;function ae(me){var Me={index:M,annotation:d._input,fullAnnotation:d,event:me};return T&&(Me.subplotId=T),Me}var ce=Y.append("g").style("pointer-events",te?"all":null).call(n,"pointer").on("click",function(){o._dragging=!1,o.emit("plotly_clickannotation",ae(m.event))});d.hovertext&&ce.on("mouseover",function(){var me=d.hoverlabel,Me=me.font,Te=this.getBoundingClientRect(),Oe=o.getBoundingClientRect();r.loneHover({x0:Te.left-Oe.left,x1:Te.right-Oe.left,y:(Te.top+Te.bottom)/2-Oe.top,text:d.hovertext,color:me.bgcolor,borderColor:me.bordercolor,fontFamily:Me.family,fontSize:Me.size,fontColor:Me.color},{container:S._hoverlayer.node(),outerContainer:S._paper.node(),gd:o})}).on("mouseout",function(){r.loneUnhover(S._hoverlayer.node())});var Q=d.borderwidth,Z=d.borderpad,j=Q+Z,K=ce.append("rect").attr("class","bg").style("stroke-width",Q+"px").call(p.stroke,d.bordercolor).call(p.fill,d.bgcolor),ee=d.width||d.height,oe=S._topclips.selectAll("#"+O).data(ee?[0]:[]);oe.enter().append("clipPath").classed("annclip",!0).attr("id",O).append("rect"),oe.exit().remove();var q=d.font,$=S._meta?L.templateString(d.text,S._meta):d.text,le=ce.append("text").classed("annotation-text",!0).text($);function ie(me){return me.call(t.font,q).attr({"text-anchor":{left:"start",right:"end"}[d.align]||"middle"}),s.convertToTspans(me,o,he),me}function he(){var me=le.selectAll("a");if(me.size()===1&&me.text()===le.text()){var Me=ce.insert("a",":first-child").attr({"xlink:xlink:href":me.attr("xlink:href"),"xlink:xlink:show":me.attr("xlink:show")}).style({cursor:"pointer"});Me.node().appendChild(K.node())}var Te=ce.select(".annotation-text-math-group"),Oe=!Te.empty(),Ne=t.bBox((Oe?Te:le).node()),Ee=Ne.width,xe=Ne.height,Se=d.width||Ee,Ue=d.height||xe,He=Math.round(Se+2*j),Fe=Math.round(Ue+2*j);function Ge(br,hr){return hr==="auto"&&(br<.3333333333333333?hr="left":br>.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;$e<qe.length;$e++){var et=qe[$e],ct=d[et+"ref"]||et,dt=d["a"+et+"ref"],pt={x:C,y:x}[et],At=(_+(et==="x"?0:-90))*Math.PI/180,Mt=He*Math.cos(At),Vt=Fe*Math.sin(At),Je=Math.abs(Mt)+Math.abs(Vt),De=d[et+"anchor"],Ie=d[et+"shift"]*(et==="x"?1:-1),ze=N[et],Pe,be,se,ye,Le,Be=v.getRefType(ct);if(pt&&Be!=="domain"){var ot=pt.r2fraction(d[et]);(ot<0||ot>1)&&(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(I<o+d){Y();return}var k=l.getPointAtLength(0),O=l.getPointAtLength(.1);C=Math.atan2(k.y-O.y,k.x-O.x),M=l.getPointAtLength(Math.min(d,I)),B="0px,"+d+"px,";var N=l.getPointAtLength(I),_=l.getPointAtLength(I-.1);x=Math.atan2(N.y-_.y,N.x-_.x),T=l.getPointAtLength(Math.max(0,I-o));var U=B?d+o:o;B+=I-U+"px,"+I+"px",r.style("stroke-dasharray",B)}function Y(){r.style("stroke-dasharray","0px,100px")}function J(te,ae,ce,Q){te.path&&(te.noRotate&&(ce=0),m.select(l.parentNode).append("path").attr({class:r.attr("class"),d:te.path,transform:p(ae.x,ae.y)+v(ce*180/Math.PI)+A(Q)}).style({fill:P.rgb(n.arrowcolor),"stroke-width":0}))}w&&J(u,M,C,f),h&&J(c,T,x,g)}},32745:function(G,V,e){var m=e(92605),P=e(44317);G.exports={moduleType:"component",name:"annotations",layoutAttributes:e(50215),supplyLayoutDefaults:e(84046),includeBasePlot:e(76325)("annotations"),calcAutorange:e(3749),draw:m.draw,drawOne:m.drawOne,drawRaw:m.drawRaw,hasClickToShow:P.hasClickToShow,onClick:P.onClick,convertCoords:e(94128)}},26997:function(G,V,e){var m=e(50215),P=e(30962).overrideAll,i=e(44467).templatedArray;G.exports=P(i("annotation",{visible:m.visible,x:{valType:"any"},y:{valType:"any"},z:{valType:"any"},ax:{valType:"number"},ay:{valType:"number"},xanchor:m.xanchor,xshift:m.xshift,yanchor:m.yanchor,yshift:m.yshift,text:m.text,textangle:m.textangle,font:m.font,width:m.width,height:m.height,opacity:m.opacity,align:m.align,valign:m.valign,bgcolor:m.bgcolor,bordercolor:m.bordercolor,borderpad:m.borderpad,borderwidth:m.borderwidth,showarrow:m.showarrow,arrowcolor:m.arrowcolor,arrowhead:m.arrowhead,startarrowhead:m.startarrowhead,arrowside:m.arrowside,arrowsize:m.arrowsize,startarrowsize:m.startarrowsize,arrowwidth:m.arrowwidth,standoff:m.standoff,startstandoff:m.startstandoff,hovertext:m.hovertext,hoverlabel:m.hoverlabel,captureevents:m.captureevents}),"calc","from-root")},5485:function(G,V,e){var m=e(71828),P=e(89298);G.exports=function(A){for(var v=A.fullSceneLayout,p=v.annotations,t=0;t<p.length;t++)i(p[t],A);A.fullLayout._infolayer.selectAll(".annotation-"+A.id).remove()};function i(L,A){var v=A.fullSceneLayout,p=v.domain,t=A.fullLayout._size,r={pdata:null,type:"linear",autorange:!1,range:[-1/0,1/0]};L._xa={},m.extendFlat(L._xa,r),P.setConvert(L._xa),L._xa._offset=t.l+p.x[0]*t.w,L._xa.l2p=function(){return .5*(1+L._pdata[0]/L._pdata[3])*t.w*(p.x[1]-p.x[0])},L._ya={},m.extendFlat(L._ya,r),P.setConvert(L._ya),L._ya._offset=t.t+(1-p.y[1])*t.h,L._ya.l2p=function(){return .5*(1-L._pdata[1]/L._pdata[3])*t.h*(p.y[1]-p.y[0])}}},20226:function(G,V,e){var m=e(71828),P=e(89298),i=e(85501),L=e(25625),A=e(26997);G.exports=function(t,r,s){i(t,r,{name:"annotations",handleItemDefaults:v,fullLayout:s.fullLayout})};function v(p,t,r,s){function n(u,g){return m.coerce(p,t,A,u,g)}function l(u){var g=u+"axis",f={_fullLayout:{}};return f._fullLayout[g]=r[g],P.coercePosition(t,f,n,u,u,.5)}var c=n("visible");c&&(L(p,t,s.fullLayout,n),l("x"),l("y"),l("z"),m.noneOrAll(p,t,["x","y","z"]),t.xref="x",t.yref="y",t.zref="z",n("xanchor"),n("yanchor"),n("xshift"),n("yshift"),t.showarrow&&(t.axref="pixel",t.ayref="pixel",n("ax",-10),n("ay",-30),m.noneOrAll(p,t,["ax","ay"])))}},82188:function(G,V,e){var m=e(92605).drawRaw,P=e(63538),i=["x","y","z"];G.exports=function(A){for(var v=A.fullSceneLayout,p=A.dataScale,t=v.annotations,r=0;r<t.length;r++){for(var s=t[r],n=!1,l=0;l<3;l++){var c=i[l],u=s[c],g=v[c+"axis"],f=g.r2fraction(u);if(f<0||f>1){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<t.length;r++){var s=t[r];p.test(s)&&(L[s].annotations||[]).length&&(P.pushUnique(A._basePlotModules,v),P.pushUnique(A._subplots.gl3d,s))}}},7561:function(G,V,e){G.exports=e(63489),e(94338),e(3961),e(38751),e(86825),e(37715),e(99384),e(43805),e(88874),e(83290),e(29108),e(55422),e(94320),e(31320),e(51367),e(21457)},72201:function(G,V,e){var m=e(7561),P=e(71828),i=e(50606),L=i.EPOCHJD,A=i.ONEDAY,v={valType:"enumerated",values:P.sortObjectKeys(m.calendars),editType:"calc",dflt:"gregorian"},p=function(C,x,S,b){var a={};return a[S]=v,P.coerce(C,x,a,S,b)},t=function(C,x,S,b){for(var a=0;a<S.length;a++)p(C,x,S[a]+"calendar",b.calendar)},r={chinese:"2000-01-01",coptic:"2000-01-01",discworld:"2000-01-01",ethiopian:"2000-01-01",hebrew:"5000-01-01",islamic:"1000-01-01",julian:"2000-01-01",mayan:"5000-01-01",nanakshahi:"1000-01-01",nepali:"2000-01-01",persian:"1000-01-01",jalali:"1000-01-01",taiwan:"1000-01-01",thai:"2000-01-01",ummalqura:"1400-01-01"},s={chinese:"2000-01-02",coptic:"2000-01-03",discworld:"2000-01-03",ethiopian:"2000-01-05",hebrew:"5000-01-01",islamic:"1000-01-02",julian:"2000-01-03",mayan:"5000-01-01",nanakshahi:"1000-01-05",nepali:"2000-01-05",persian:"1000-01-01",jalali:"1000-01-01",taiwan:"1000-01-04",thai:"2000-01-04",ummalqura:"1400-01-06"},n={chinese:["2000-01-01","2001-01-01"],coptic:["1700-01-01","1701-01-01"],discworld:["1800-01-01","1801-01-01"],ethiopian:["2000-01-01","2001-01-01"],hebrew:["5700-01-01","5701-01-01"],islamic:["1400-01-01","1401-01-01"],julian:["2000-01-01","2001-01-01"],mayan:["5200-01-01","5201-01-01"],nanakshahi:["0500-01-01","0501-01-01"],nepali:["2000-01-01","2001-01-01"],persian:["1400-01-01","1401-01-01"],jalali:["1400-01-01","1401-01-01"],taiwan:["0100-01-01","0101-01-01"],thai:["2500-01-01","2501-01-01"],ummalqura:["1400-01-01","1401-01-01"]},l="##",c={d:{0:"dd","-":"d"},e:{0:"d","-":"d"},a:{0:"D","-":"D"},A:{0:"DD","-":"DD"},j:{0:"oo","-":"o"},W:{0:"ww","-":"w"},m:{0:"mm","-":"m"},b:{0:"M","-":"M"},B:{0:"MM","-":"MM"},y:{0:"yy","-":"yy"},Y:{0:"yyyy","-":"yyyy"},U:l,w:l,c:{0:"D M d %X yyyy","-":"D M d %X yyyy"},x:{0:"mm/dd/yyyy","-":"mm/dd/yyyy"}};function u(C,x,S){for(var b=Math.floor((x+.05)/A)+L,a=f(S).fromJD(b),E=0,y,z,I,B,k;(E=C.indexOf("%",E))!==-1;)y=C.charAt(E+1),y==="0"||y==="-"||y==="_"?(I=3,z=C.charAt(E+2),y==="_"&&(y="-")):(z=y,y="0",I=2),B=c[z],B?(B===l?k=l:k=a.formatDate(B[y]),C=C.substr(0,E)+k+C.substr(E+I),E+=k.length):E+=I;return C}var g={};function f(C){var x=g[C];return x||(x=g[C]=m.instance(C),x)}function w(C){return P.extendFlat({},v,{description:C})}function h(C){return"Sets the calendar system to use with `"+C+"` date data."}var o={xcalendar:w(h("x"))},d=P.extendFlat({},o,{ycalendar:w(h("y"))}),M=P.extendFlat({},d,{zcalendar:w(h("z"))}),T=w(["Sets the calendar system to use for `range` and `tick0`","if this is a date axis. This does not set the calendar for","interpreting data on this axis, that's specified in the trace","or via the global `layout.calendar`"].join(" "));G.exports={moduleType:"component",name:"calendars",schema:{traces:{scatter:d,bar:d,box:d,heatmap:d,contour:d,histogram:d,histogram2d:d,histogram2dcontour:d,scatter3d:M,surface:M,mesh3d:M,scattergl:d,ohlc:o,candlestick:o},layout:{calendar:w(["Sets the default calendar system to use for interpreting and","displaying dates throughout the plot."].join(" "))},subplots:{xaxis:{calendar:T},yaxis:{calendar:T},scene:{xaxis:{calendar:T},yaxis:{calendar:T},zaxis:{calendar:T}},polar:{radialaxis:{calendar:T}}},transforms:{filter:{valuecalendar:w(["WARNING: All transforms are deprecated and may be removed from the API in next major version.","Sets the calendar system to use for `value`, if it is a date."].join(" ")),targetcalendar:w(["WARNING: All transforms are deprecated and may be removed from the API in next major version.","Sets the calendar system to use for `target`, if it is an","array of dates. If `target` is a string (eg *x*) we use the","corresponding trace attribute (eg `xcalendar`) if it exists,","even if `targetcalendar` is provided."].join(" "))}}},layoutAttributes:v,handleDefaults:p,handleTraceDefaults:t,CANONICAL_SUNDAY:s,CANONICAL_TICK:r,DFLTRANGE:n,getCal:f,worldCalFmt:u}},22399:function(G,V){V.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],V.defaultLine="#444",V.lightLine="#eee",V.background="#fff",V.borderLine="#BEC8D9",V.lightFraction=90.9090909090909},7901:function(G,V,e){var m=e(84267),P=e(92770),i=e(73627).isTypedArray,L=G.exports={},A=e(22399);L.defaults=A.defaults;var v=L.defaultLine=A.defaultLine;L.lightLine=A.lightLine;var p=L.background=A.background;L.tinyRGB=function(r){var s=r.toRgb();return"rgb("+Math.round(s.r)+", "+Math.round(s.g)+", "+Math.round(s.b)+")"},L.rgb=function(r){return L.tinyRGB(m(r))},L.opacity=function(r){return r?m(r).getAlpha():0},L.addOpacity=function(r,s){var n=m(r).toRgb();return"rgba("+Math.round(n.r)+", "+Math.round(n.g)+", "+Math.round(n.b)+", "+s+")"},L.combine=function(r,s){var n=m(r).toRgb();if(n.a===1)return m(r).toRgbString();var l=m(s||p).toRgb(),c=l.a===1?l:{r:255*(1-l.a)+l.r*l.a,g:255*(1-l.a)+l.g*l.a,b:255*(1-l.a)+l.b*l.a},u={r:c.r*(1-n.a)+n.r*n.a,g:c.g*(1-n.a)+n.g*n.a,b:c.b*(1-n.a)+n.b*n.a};return m(u).toRgbString()},L.contrast=function(r,s,n){var l=m(r);l.getAlpha()!==1&&(l=m(L.combine(r,p)));var c=l.isDark()?s?l.lighten(s):p:n?l.darken(n):v;return c.toString()},L.stroke=function(r,s){var n=m(s);r.style({stroke:L.tinyRGB(n),"stroke-opacity":n.getAlpha()})},L.fill=function(r,s){var n=m(s);r.style({fill:L.tinyRGB(n),"fill-opacity":n.getAlpha()})},L.clean=function(r){if(!(!r||typeof r!="object")){var s=Object.keys(r),n,l,c,u;for(n=0;n<s.length;n++)if(c=s[n],u=r[c],c.substr(c.length-5)==="color")if(Array.isArray(u))for(l=0;l<u.length;l++)u[l]=t(u[l]);else r[c]=t(u);else if(c.substr(c.length-10)==="colorscale"&&Array.isArray(u))for(l=0;l<u.length;l++)Array.isArray(u[l])&&(u[l][1]=t(u[l][1]));else if(Array.isArray(u)){var g=u[0];if(!Array.isArray(g)&&g&&typeof g=="object")for(l=0;l<u.length;l++)L.clean(u[l])}else u&&typeof u=="object"&&!i(u)&&L.clean(u)}};function t(r){if(P(r)||typeof r!="string")return r;var s=r.trim();if(s.substr(0,3)!=="rgb")return r;var n=s.match(/^rgba?\s*\(([^()]*)\)$/);if(!n)return r;var l=n[1].trim().split(/\s*[\s,]\s*/),c=s.charAt(3)==="a"&&l.length===4;if(!c&&l.length!==3)return r;for(var u=0;u<l.length;u++){if(!l[u].length||(l[u]=Number(l[u]),!(l[u]>=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;te<B.length;te++){var ae=B[te];if(_=ae[0].trace,!!_._module){var ce=_._module.colorbar;if(_.visible===!0&&ce)for(var Q=Array.isArray(ce),Z=Q?ce:[ce],j=0;j<Z.length;j++){U=Z[j];var K=U.container;N=K?_[K]:_,N&&N.showscale&&(O=Y(N.colorbar),O._id="cb"+_.uid+(Q&&K?"-"+K:""),O._traceIndex=_.index,O._propPrefix=(K?K+".":"")+"colorbar.",O._meta=_._meta,J(),k.push(O))}}}for(var ee in I._colorAxes)if(N=I[ee],N.showscale){var oe=I._colorAxes[ee];O=Y(N.colorbar),O._id="cb"+ee,O._propPrefix=ee+".colorbar.",O._meta=I._meta,U={min:"cmin",max:"cmax"},oe[0]!=="heatmap"&&(_=oe[1],U.calc=_._module.colorbar.calc),J(),k.push(O)}return k}function b(z,I,B){var k=I.orientation==="v",O=I.len,N=I.lenmode,_=I.thickness,U=I.thicknessmode,Y=I.outlinewidth,J=I.borderwidth,te=I.bgcolor,ae=I.xanchor,ce=I.yanchor,Q=I.xpad,Z=I.ypad,j=I.x,K=k?I.y:1-I.y,ee=I.yref==="paper",oe=I.xref==="paper",q=B._fullLayout,$=q._size,le=I._fillcolor,ie=I._line,he=I.title,me=he.side,Me=I._zrange||m.extent((typeof le=="function"?le:ie.color).domain()),Te=typeof ie.color=="function"?ie.color:function(){return ie.color},Oe=typeof le=="function"?le:function(){return le},Ne=I._levels,Ee=E(B,I,Me),xe=Ee.fill,Se=Ee.line,Ue=Math.round(_*(U==="fraction"?k?$.w:$.h:1)),He=Ue/(k?$.w:$.h),Fe=Math.round(O*(N==="fraction"?k?$.h:$.w:1)),Ge=Fe/(k?$.h:$.w),nt=oe?$.w:B._fullLayout.width,qe=ee?$.h:B._fullLayout.height,$e=Math.round(k?j*nt+Q:K*qe+Z),et={center:.5,right:1}[ae]||0,ct={top:1,middle:.5}[ce]||0,dt=k?j-et*He:K-ct*He,pt=k?K-ct*Ge:j-et*Ge,At=Math.round(k?qe*(1-pt):nt*pt);I._lenFrac=Ge,I._thickFrac=He,I._uFrac=dt,I._vFrac=pt;var Mt=I._axis=y(B,I,Me);Mt.position=He+(k?j+Q/$.w:K+Z/$.h);var Vt=["top","bottom"].indexOf(me)!==-1;if(k&&Vt&&(Mt.title.side=me,Mt.titlex=j+Q/$.w,Mt.titley=pt+(he.side==="top"?Ge-Z/$.h:Z/$.h)),!k&&!Vt&&(Mt.title.side=me,Mt.titley=K+Z/$.h,Mt.titlex=pt+Q/$.w),ie.color&&I.tickmode==="auto"){Mt.tickmode="linear",Mt.tick0=Ne.start;var Je=Ne.size,De=p.constrain(Fe/50,4,15)+1,Ie=(Me[1]-Me[0])/((I.nticks||De)*Je);if(Ie>1){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("<br>").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&&_<ae&&O.push(_);if(I._fillgradient)N=[0];else if(typeof I._fillcolor=="function"){var ce=I._filllevels;if(ce)for(Y=ce.end+ce.size/100,J=ce.size,U=0;U<1e5&&(_=ce.start+U*J,!(J>0?_>=Y:_<=Y));U++)_>B[0]&&_<B[1]&&N.push(_);else N=O.map(function(Q){return Q-k.size/2}),N.push(N[N.length-1]+k.size)}else I._fillcolor&&typeof I._fillcolor=="string"&&(N=[0]);return k.size<0&&(O.reverse(),N.reverse()),{line:O,fill:N}}function y(z,I,B){var k=z._fullLayout,O=I.orientation==="v",N={type:"linear",range:B,tickmode:I.tickmode,nticks:I.nticks,tick0:I.tick0,dtick:I.dtick,tickvals:I.tickvals,ticktext:I.ticktext,ticks:I.ticks,ticklen:I.ticklen,tickwidth:I.tickwidth,tickcolor:I.tickcolor,showticklabels:I.showticklabels,labelalias:I.labelalias,ticklabelposition:I.ticklabelposition,ticklabeloverflow:I.ticklabeloverflow,ticklabelstep:I.ticklabelstep,tickfont:I.tickfont,tickangle:I.tickangle,tickformat:I.tickformat,exponentformat:I.exponentformat,minexponent:I.minexponent,separatethousands:I.separatethousands,showexponent:I.showexponent,showtickprefix:I.showtickprefix,tickprefix:I.tickprefix,showticksuffix:I.showticksuffix,ticksuffix:I.ticksuffix,title:I.title,showline:!0,anchor:"free",side:O?"right":"bottom",position:1},_=O?"y":"x",U={type:"linear",_id:_+I._id},Y={letter:_,font:k.font,noHover:!0,noTickson:!0,noTicklabelmode:!0,calendar:k.calendar};function J(te,ae){return p.coerce(N,U,h,te,ae)}return f(N,U,J,Y,k),w(N,U,J,Y),U}G.exports={draw:x}},76228:function(G,V,e){var m=e(71828);G.exports=function(i){return m.isPlainObject(i.colorbar)}},12311:function(G,V,e){G.exports={moduleType:"component",name:"colorbar",attributes:e(63583),supplyDefaults:e(62499),draw:e(98981).draw,hasColorbar:e(76228)}},50693:function(G,V,e){var m=e(63583),P=e(30587).counter,i=e(78607),L=e(63282).scales;i(L),G.exports=function(v,p){v=v||"",p=p||{};var t=p.cLetter||"c";"onlyIfNumerical"in p&&p.onlyIfNumerical;var r="noScale"in p?p.noScale:v==="marker.line",s="showScaleDflt"in p?p.showScaleDflt:t==="z",n=typeof p.colorscaleDflt=="string"?L[p.colorscaleDflt]:null,l=p.editTypeOverride||"",c;"colorAttr"in p?(c=p.colorAttr,p.colorAttr):c={z:"z",c:"color"}[t];var u=t+"auto",g=t+"min",f=t+"max",w=t+"mid",h={};h[g]=h[f]=void 0;var o={};o[u]=!1;var d={};return c==="color"&&(d.color={valType:"color",arrayOk:!0,editType:l||"style"},p.anim&&(d.color.anim=!0)),d[u]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:h},d[g]={valType:"number",dflt:null,editType:l||"plot",impliedEdits:o},d[f]={valType:"number",dflt:null,editType:l||"plot",impliedEdits:o},d[w]={valType:"number",dflt:null,editType:"calc",impliedEdits:h},d.colorscale={valType:"colorscale",editType:"calc",dflt:n,impliedEdits:{autocolorscale:!1}},d.autocolorscale={valType:"boolean",dflt:p.autoColorDflt!==!1,editType:"calc",impliedEdits:{colorscale:void 0}},d.reversescale={valType:"boolean",dflt:!1,editType:"plot"},r||(d.showscale={valType:"boolean",dflt:s,editType:"calc"},d.colorbar=m),p.noColorAxis||(d.coloraxis={valType:"subplotid",regex:P("coloraxis"),dflt:null,editType:"calc"}),d}},78803:function(G,V,e){var m=e(92770),P=e(71828),i=e(52075).extractOpts;G.exports=function(A,v,p){var t=A._fullLayout,r=p.vals,s=p.containerStr,n=s?P.nestedProperty(v,s).get():v,l=i(n),c=l.auto!==!1,u=l.min,g=l.max,f=l.mid,w=function(){return P.aggNums(Math.min,null,r)},h=function(){return P.aggNums(Math.max,null,r)};if(u===void 0?u=w():c&&(n._colorAx&&m(u)?u=Math.min(u,w()):u=w()),g===void 0?g=h():c&&(n._colorAx&&m(g)?g=Math.max(g,h()):g=h()),c&&f!==void 0&&(g-f>f-u?u=f-(g-f):g-f<f-u&&(g=f+(f-u))),u===g&&(u-=.5,g+=.5),l._sync("min",u),l._sync("max",g),l.autocolorscale){var o;u*g<0?o=t.colorscale.diverging:u>=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<A.length;r++){var s=A[r],n=s._module.colorbar;if(n)if(Array.isArray(n))for(var l=0;l<n.length;l++)t(s,n[l]);else t(s,n);P(s,"marker.line")&&t(s,{container:"marker.line",min:"cmin",max:"cmax"})}for(var c in v._colorAxes)t(v[c],{min:"cmin",max:"cmax"})}},1586:function(G,V,e){var m=e(92770),P=e(71828),i=e(76228),L=e(62499),A=e(63282).isValid,v=e(73972).traceIs;function p(t,r){var s=r.slice(0,r.length-1);return r?P.nestedProperty(t,s).get()||{}:t}G.exports=function t(r,s,n,l,c){var u=c.prefix,g=c.cLetter,f="_module"in s,w=p(r,u),h=p(s,u),o=p(s._template||{},u)||{},d=function(){return delete r.coloraxis,delete s.coloraxis,t(r,s,n,l,c)};if(f){var M=n._colorAxes||{},T=l(u+"coloraxis");if(T){var C=v(s,"contour")&&P.nestedProperty(s,"contours.coloring").get()||"heatmap",x=M[T];x?(x[2].push(d),x[0]!==C&&(x[0]=!1,P.warn(["Ignoring coloraxis:",T,"setting","as it is linked to incompatible colorscales."].join(" ")))):M[T]=[C,s,[d]];return}}var S=w[g+"min"],b=w[g+"max"],a=m(S)&&m(b)&&S<b,E=l(u+g+"auto",!a);E?l(u+g+"mid"):(l(u+g+"min"),l(u+g+"max"));var y=w.colorscale,z=o.colorscale,I;if(y!==void 0&&(I=!A(y)),z!==void 0&&(I=!A(z)),l(u+"autocolorscale",I),l(u+"colorscale"),l(u+"reversescale"),u!=="marker.line."){var B;u&&f&&(B=i(w));var k=l(u+"showscale",B);k&&(u&&o&&(h._template=o),L(w,h,n))}}},52075:function(G,V,e){var m=e(39898),P=e(84267),i=e(92770),L=e(71828),A=e(7901),v=e(63282).isValid;function p(f,w,h){var o=w?L.nestedProperty(f,w).get()||{}:f,d=o[h||"color"],M=!1;if(L.isArrayOrTypedArray(d)){for(var T=0;T<d.length;T++)if(i(d[T])){M=!0;break}}return L.isPlainObject(o)&&(M||o.showscale===!0||i(o.cmin)&&i(o.cmax)||v(o.colorscale)||L.isPlainObject(o.colorbar))}var t=["showscale","autocolorscale","colorscale","reversescale","colorbar"],r=["min","max","mid","auto"];function s(f){var w=f._colorAx,h=w||f,o={},d,M,T;for(M=0;M<t.length;M++)T=t[M],o[T]=h[T];if(w)for(d="c",M=0;M<r.length;M++)T=r[M],o[T]=h["c"+T];else{var C;for(M=0;M<r.length;M++){if(T=r[M],C="c"+T,C in h){o[T]=h[C];continue}C="z"+T,C in h&&(o[T]=h[C])}d=C.charAt(0)}return o._sync=function(x,S){var b=r.indexOf(x)!==-1?d+x:x;h[b]=h["_"+b]=S},o}function n(f){for(var w=s(f),h=w.min,o=w.max,d=w.reversescale?l(w.colorscale):w.colorscale,M=d.length,T=new Array(M),C=new Array(M),x=0;x<M;x++){var S=d[x];T[x]=h+S[0]*(o-h),C[x]=S[1]}return{domain:T,range:C}}function l(f){for(var w=f.length,h=new Array(w),o=w-1,d=0;o>=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;T<d;T++){var C=P(o[T]).toRgb();M[T]=[C.r,C.g,C.b,C.a]}var x=m.scale.linear().domain(h).range(M).clamp(!0),S=w.noNumericCheck,b=w.returnArray,a;return S&&b?a=x:S?a=function(E){return g(x(E))}:b?a=function(E){return i(E)?x(E):P(E).isValid()?E:A.defaultLine}:a=function(E){return i(E)?g(x(E)):P(E).isValid()?E:A.defaultLine},a.domain=x.domain,a.range=function(){return o},a}function u(f,w){return c(n(f),w)}function g(f){var w={r:f[0],g:f[1],b:f[2],a:f[3]};return P(w).toRgbString()}G.exports={hasColorscale:p,extractOpts:s,extractScale:n,flipScale:l,makeColorScaleFunc:c,makeColorScaleFuncFromTrace:u}},21081:function(G,V,e){var m=e(63282),P=e(52075);G.exports={moduleType:"component",name:"colorscale",attributes:e(50693),layoutAttributes:e(72673),supplyLayoutDefaults:e(30959),handleDefaults:e(1586),crossTraceDefaults:e(33046),calc:e(78803),scales:m.scales,defaultScale:m.defaultScale,getScale:m.get,isValidScale:m.isValid,hasColorscale:P.hasColorscale,extractOpts:P.extractOpts,extractScale:P.extractScale,flipScale:P.flipScale,makeColorScaleFunc:P.makeColorScaleFunc,makeColorScaleFuncFromTrace:P.makeColorScaleFuncFromTrace}},72673:function(G,V,e){var m=e(1426).extendFlat,P=e(50693),i=e(63282).scales;G.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:i.Reds,editType:"calc"},sequentialminus:{valType:"colorscale",dflt:i.Blues,editType:"calc"},diverging:{valType:"colorscale",dflt:i.RdBu,editType:"calc"}},coloraxis:m({_isSubplotObj:!0,editType:"calc"},P("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}},30959:function(G,V,e){var m=e(71828),P=e(44467),i=e(72673),L=e(1586);G.exports=function(v,p){function t(f,w){return m.coerce(v,p,i,f,w)}t("colorscale.sequential"),t("colorscale.sequentialminus"),t("colorscale.diverging");var r=p._colorAxes,s,n;function l(f,w){return m.coerce(s,n,i.coloraxis,f,w)}for(var c in r){var u=r[c];if(u[0])s=v[c]||{},n=P.newContainer(p,c,"coloraxis"),n._name=c,L(s,n,p,l,{prefix:"",cLetter:"c"});else{for(var g=0;g<u[2].length;g++)u[2][g]();delete p._colorAxes[c]}}}},63282:function(G,V,e){var m=e(84267),P={Greys:[[0,"rgb(0,0,0)"],[1,"rgb(255,255,255)"]],YlGnBu:[[0,"rgb(8,29,88)"],[.125,"rgb(37,52,148)"],[.25,"rgb(34,94,168)"],[.375,"rgb(29,145,192)"],[.5,"rgb(65,182,196)"],[.625,"rgb(127,205,187)"],[.75,"rgb(199,233,180)"],[.875,"rgb(237,248,217)"],[1,"rgb(255,255,217)"]],Greens:[[0,"rgb(0,68,27)"],[.125,"rgb(0,109,44)"],[.25,"rgb(35,139,69)"],[.375,"rgb(65,171,93)"],[.5,"rgb(116,196,118)"],[.625,"rgb(161,217,155)"],[.75,"rgb(199,233,192)"],[.875,"rgb(229,245,224)"],[1,"rgb(247,252,245)"]],YlOrRd:[[0,"rgb(128,0,38)"],[.125,"rgb(189,0,38)"],[.25,"rgb(227,26,28)"],[.375,"rgb(252,78,42)"],[.5,"rgb(253,141,60)"],[.625,"rgb(254,178,76)"],[.75,"rgb(254,217,118)"],[.875,"rgb(255,237,160)"],[1,"rgb(255,255,204)"]],Bluered:[[0,"rgb(0,0,255)"],[1,"rgb(255,0,0)"]],RdBu:[[0,"rgb(5,10,172)"],[.35,"rgb(106,137,247)"],[.5,"rgb(190,190,190)"],[.6,"rgb(220,170,132)"],[.7,"rgb(230,145,90)"],[1,"rgb(178,10,28)"]],Reds:[[0,"rgb(220,220,220)"],[.2,"rgb(245,195,157)"],[.4,"rgb(245,160,105)"],[1,"rgb(178,10,28)"]],Blues:[[0,"rgb(5,10,172)"],[.35,"rgb(40,60,190)"],[.5,"rgb(70,100,245)"],[.6,"rgb(90,120,245)"],[.7,"rgb(106,137,247)"],[1,"rgb(220,220,220)"]],Picnic:[[0,"rgb(0,0,255)"],[.1,"rgb(51,153,255)"],[.2,"rgb(102,204,255)"],[.3,"rgb(153,204,255)"],[.4,"rgb(204,204,255)"],[.5,"rgb(255,255,255)"],[.6,"rgb(255,204,255)"],[.7,"rgb(255,153,255)"],[.8,"rgb(255,102,204)"],[.9,"rgb(255,102,102)"],[1,"rgb(255,0,0)"]],Rainbow:[[0,"rgb(150,0,90)"],[.125,"rgb(0,0,200)"],[.25,"rgb(0,25,255)"],[.375,"rgb(0,152,255)"],[.5,"rgb(44,255,150)"],[.625,"rgb(151,255,0)"],[.75,"rgb(255,234,0)"],[.875,"rgb(255,111,0)"],[1,"rgb(255,0,0)"]],Portland:[[0,"rgb(12,51,131)"],[.25,"rgb(10,136,186)"],[.5,"rgb(242,211,56)"],[.75,"rgb(242,143,56)"],[1,"rgb(217,30,30)"]],Jet:[[0,"rgb(0,0,131)"],[.125,"rgb(0,60,170)"],[.375,"rgb(5,255,255)"],[.625,"rgb(255,255,0)"],[.875,"rgb(250,0,0)"],[1,"rgb(128,0,0)"]],Hot:[[0,"rgb(0,0,0)"],[.3,"rgb(230,0,0)"],[.6,"rgb(255,210,0)"],[1,"rgb(255,255,255)"]],Blackbody:[[0,"rgb(0,0,0)"],[.2,"rgb(230,0,0)"],[.4,"rgb(230,210,0)"],[.7,"rgb(255,255,255)"],[1,"rgb(160,200,255)"]],Earth:[[0,"rgb(0,0,130)"],[.1,"rgb(0,180,180)"],[.2,"rgb(40,210,40)"],[.4,"rgb(230,230,50)"],[.6,"rgb(120,70,20)"],[1,"rgb(255,255,255)"]],Electric:[[0,"rgb(0,0,0)"],[.15,"rgb(30,0,100)"],[.4,"rgb(120,0,100)"],[.6,"rgb(160,90,0)"],[.8,"rgb(230,200,0)"],[1,"rgb(255,250,220)"]],Viridis:[[0,"#440154"],[.06274509803921569,"#48186a"],[.12549019607843137,"#472d7b"],[.18823529411764706,"#424086"],[.25098039215686274,"#3b528b"],[.3137254901960784,"#33638d"],[.3764705882352941,"#2c728e"],[.4392156862745098,"#26828e"],[.5019607843137255,"#21918c"],[.5647058823529412,"#1fa088"],[.6274509803921569,"#28ae80"],[.6901960784313725,"#3fbc73"],[.7529411764705882,"#5ec962"],[.8156862745098039,"#84d44b"],[.8784313725490196,"#addc30"],[.9411764705882353,"#d8e219"],[1,"#fde725"]],Cividis:[[0,"rgb(0,32,76)"],[.058824,"rgb(0,42,102)"],[.117647,"rgb(0,52,110)"],[.176471,"rgb(39,63,108)"],[.235294,"rgb(60,74,107)"],[.294118,"rgb(76,85,107)"],[.352941,"rgb(91,95,109)"],[.411765,"rgb(104,106,112)"],[.470588,"rgb(117,117,117)"],[.529412,"rgb(131,129,120)"],[.588235,"rgb(146,140,120)"],[.647059,"rgb(161,152,118)"],[.705882,"rgb(176,165,114)"],[.764706,"rgb(192,177,109)"],[.823529,"rgb(209,191,102)"],[.882353,"rgb(225,204,92)"],[.941176,"rgb(243,219,79)"],[1,"rgb(255,233,69)"]]},i=P.RdBu;function L(p,t){if(t||(t=i),!p)return t;function r(){try{p=P[p]||JSON.parse(p)}catch{p=t}}return typeof p=="string"&&(r(),typeof p=="string"&&r()),A(p)?p:t}function A(p){var t=0;if(!Array.isArray(p)||p.length<2||!p[0]||!p[p.length-1]||+p[0][0]!=0||+p[p.length-1][0]!=1)return!1;for(var r=0;r<p.length;r++){var s=p[r];if(s.length!==2||+s[0]<t||!m(s[1]).isValid())return!1;t=+s[0]}return!0}function v(p){return P[p]!==void 0?!0:A(p)}G.exports={scales:P,defaultScale:i,get:L,isValid:v}},92807:function(G){G.exports=function(e,m,P,i,L){var A=(e-P)/(i-P),v=A+m/(i-P),p=(A+v)/2;return L==="left"||L==="bottom"?A:L==="center"||L==="middle"?p:L==="right"||L==="top"?v:A<.6666666666666666-p?A:v>1.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)<I&&(y=0),Math.abs(z)<I&&(z=0),[y,z]}var S=n.clampFn||x;function b(y){l._dragged=!1,l._dragging=!0;var z=r(y);f=z[0],w=z[1],T=y.target,M=y,C=y.buttons===2||y.ctrlKey,typeof y.clientX>"u"&&typeof y.clientY>"u"&&(y.clientX=f,y.clientY=w),h=new Date().getTime(),h-l._mouseDownTime<u?c+=1:(c=1,l._mouseDownTime=h),n.prepFn&&n.prepFn(y,f,w),P&&!C?(d=t(),d.style.cursor=window.getComputedStyle(g).cursor):P||(d=document,o=window.getComputedStyle(document.documentElement).cursor,document.documentElement.style.cursor=window.getComputedStyle(g).cursor),document.addEventListener("mouseup",E),document.addEventListener("touchend",E),n.dragmode!==!1&&(y.preventDefault(),document.addEventListener("mousemove",a),document.addEventListener("touchmove",a,{passive:!1}))}function a(y){y.preventDefault();var z=r(y),I=n.minDrag||A.MINDRAG,B=S(z[0]-f,z[1]-w,I),k=B[0],O=B[1];(k||O)&&(l._dragged=!0,v.unhover(l,y)),l._dragged&&n.moveFn&&!C&&(l._dragdata={element:g,dx:k,dy:O},n.moveFn(k,O))}function E(y){if(delete l._dragdata,n.dragmode!==!1&&(y.preventDefault(),document.removeEventListener("mousemove",a),document.removeEventListener("touchmove",a)),document.removeEventListener("mouseup",E),document.removeEventListener("touchend",E),P?L(d):o&&(d.documentElement.style.cursor=o,o=null),!l._dragging){l._dragged=!1;return}if(l._dragging=!1,new Date().getTime()-l._mouseDownTime>u&&(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<Ge;$e++)nt.reversed?qe[Ge-1-$e]=[b((1-He[$e][0])*100),He[$e][1]]:qe[$e]=[b(He[$e][0]*100),He[$e][1]];var et=xe._fullLayout,ct="g"+et._uid+"-"+Se,dt=et._defs.select(".gradients").selectAll("#"+ct).data([Ue+qe.join(";")],P.identity);dt.exit().remove(),dt.enter().append(nt.node).each(function(){var pt=m.select(this);nt.attrs&&pt.attr(nt.attrs),pt.attr("id",ct);var At=pt.selectAll("stop").data(qe);At.exit().remove(),At.enter().append("stop"),At.each(function(Mt){var Vt=A(Mt[1]);m.select(this).attr({offset:Mt[0]+"%","stop-color":p.tinyRGB(Vt),"stop-opacity":Vt.getAlpha()})})}),Ee.style(Fe,Z(ct,xe)).style(Fe+"-opacity",null),Ee.classed("gradient_filled",!0)},h.pattern=function(Ee,xe,Se,Ue,He,Fe,Ge,nt,qe,$e,et,ct){var dt=xe==="legend";nt&&(qe==="overlay"?($e=nt,et=p.contrast($e)):($e=void 0,et=nt));var pt=Se._fullLayout,At="p"+pt._uid+"-"+Ue,Mt,Vt,Je=function(wt,It,Bt,Gt,Lt){return Gt+(Lt-Gt)*(wt-It)/(Bt-It)},De,Ie,ze,Pe,be={},se=A(et),ye=p.tinyRGB(se),Le=se.getAlpha(),Be=ct*Le;switch(He){case"/":Mt=Fe*Math.sqrt(2),Vt=Fe*Math.sqrt(2),De="M-"+Mt/4+","+Vt/4+"l"+Mt/2+",-"+Vt/2+"M0,"+Vt+"L"+Mt+",0M"+Mt/4*3+","+Vt/4*5+"l"+Mt/2+",-"+Vt/2,Ie=Ge*Fe,Pe="path",be={d:De,opacity:Be,stroke:ye,"stroke-width":Ie+"px"};break;case"\\":Mt=Fe*Math.sqrt(2),Vt=Fe*Math.sqrt(2),De="M"+Mt/4*3+",-"+Vt/4+"l"+Mt/2+","+Vt/2+"M0,0L"+Mt+","+Vt+"M-"+Mt/4+","+Vt/4*3+"l"+Mt/2+","+Vt/2,Ie=Ge*Fe,Pe="path",be={d:De,opacity:Be,stroke:ye,"stroke-width":Ie+"px"};break;case"x":Mt=Fe*Math.sqrt(2),Vt=Fe*Math.sqrt(2),De="M-"+Mt/4+","+Vt/4+"l"+Mt/2+",-"+Vt/2+"M0,"+Vt+"L"+Mt+",0M"+Mt/4*3+","+Vt/4*5+"l"+Mt/2+",-"+Vt/2+"M"+Mt/4*3+",-"+Vt/4+"l"+Mt/2+","+Vt/2+"M0,0L"+Mt+","+Vt+"M-"+Mt/4+","+Vt/4*3+"l"+Mt/2+","+Vt/2,Ie=Fe-Fe*Math.sqrt(1-Ge),Pe="path",be={d:De,opacity:Be,stroke:ye,"stroke-width":Ie+"px"};break;case"|":Mt=Fe,Vt=Fe,Pe="path",De="M"+Mt/2+",0L"+Mt/2+","+Vt,Ie=Ge*Fe,Pe="path",be={d:De,opacity:Be,stroke:ye,"stroke-width":Ie+"px"};break;case"-":Mt=Fe,Vt=Fe,Pe="path",De="M0,"+Vt/2+"L"+Mt+","+Vt/2,Ie=Ge*Fe,Pe="path",be={d:De,opacity:Be,stroke:ye,"stroke-width":Ie+"px"};break;case"+":Mt=Fe,Vt=Fe,Pe="path",De="M"+Mt/2+",0L"+Mt/2+","+Vt+"M0,"+Vt/2+"L"+Mt+","+Vt/2,Ie=Fe-Fe*Math.sqrt(1-Ge),Pe="path",be={d:De,opacity:Be,stroke:ye,"stroke-width":Ie+"px"};break;case".":Mt=Fe,Vt=Fe,Ge<Math.PI/4?ze=Math.sqrt(Ge*Fe*Fe/Math.PI):ze=Je(Ge,Math.PI/4,1,Fe/2,Fe/Math.sqrt(2)),Pe="circle",be={cx:Mt/2,cy:Vt/2,r:ze,opacity:Be,fill:ye};break}var ot=[He||"noSh",$e||"noBg",et||"noFg",Fe,Ge].join(";"),at=pt._defs.select(".patterns").selectAll("#"+At).data([ot],P.identity);at.exit().remove(),at.enter().append("pattern").each(function(){var wt=m.select(this);if(wt.attr({id:At,width:Mt+"px",height:Vt+"px",patternUnits:"userSpaceOnUse",patternTransform:dt?"scale(0.8)":""}),$e){var It=A($e),Bt=p.tinyRGB(It),Gt=It.getAlpha(),Lt=wt.selectAll("rect").data([0]);Lt.exit().remove(),Lt.enter().append("rect").attr({width:Mt+"px",height:Vt+"px",fill:Bt,"fill-opacity":Gt})}var Kt=wt.selectAll(Pe).data([0]);Kt.exit().remove(),Kt.enter().append(Pe).attr(be)}),Ee.style("fill",Z(At,Se)).style("fill-opacity",null),Ee.classed("pattern_filled",!0)},h.initGradients=function(Ee){var xe=Ee._fullLayout,Se=P.ensureSingle(xe._defs,"g","gradients");Se.selectAll("linearGradient,radialGradient").remove(),m.select(Ee).selectAll(".gradient_filled").classed("gradient_filled",!1)},h.initPatterns=function(Ee){var xe=Ee._fullLayout,Se=P.ensureSingle(xe._defs,"g","patterns");Se.selectAll("pattern").remove(),m.select(Ee).selectAll(".pattern_filled").classed("pattern_filled",!1)},h.getPatternAttr=function(Ee,xe,Se){return Ee&&P.isArrayOrTypedArray(Ee)?xe<Ee.length?Ee[xe]:Se:Ee},h.pointStyle=function(Ee,xe,Se,Ue){if(Ee.size()){var He=h.makePointStyleFns(xe);Ee.each(function(Fe){h.singlePointStyle(Fe,m.select(this),xe,He,Se,Ue)})}},h.singlePointStyle=function(Ee,xe,Se,Ue,He,Fe){var Ge=Se.marker,nt=Ge.line;if(Fe&&Fe.i>=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;nt<He.length;nt++)He[nt](Ge,Fe)})}},h.tryColorscale=function(Ee,xe){var Se=xe?P.nestedProperty(Ee,xe).get():Ee;if(Se){var Ue=Se.color;if((Se.colorscale||Se._colorAx)&&P.isArrayOrTypedArray(Ue))return t.makeColorScaleFuncFromTrace(Se)}return P.identity};var E={start:1,end:-1,middle:0,bottom:1,top:-1};function y(Ee,xe,Se,Ue,He){var Fe=m.select(Ee.node().parentNode),Ge=xe.indexOf("top")!==-1?"top":xe.indexOf("bottom")!==-1?"bottom":"middle",nt=xe.indexOf("left")!==-1?"end":xe.indexOf("right")!==-1?"start":"middle",qe=Ue?Ue/.8+1:0,$e=(s.lineCount(Ee)-1)*c+1,et=E[nt]*qe,ct=Se*.75+E[Ge]*qe+(E[Ge]-1)*$e*Se/2;Ee.attr("text-anchor",nt),He||Fe.attr("transform",r(et,ct))}function z(Ee,xe){var Se=Ee.ts||xe.textfont.size;return L(Se)&&Se>0?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<Ee.length-1;He++)Ue.push(U(Ee[He-1],Ee[He],Ee[He+1],xe));for(Se+="Q"+Ue[0][0]+" "+Ee[1],He=2;He<Ee.length-1;He++)Se+="C"+Ue[He-2][1]+" "+Ue[He-1][0]+" "+Ee[He];return Se+="Q"+Ue[Ee.length-3][1]+" "+Ee[Ee.length-1],Se},h.smoothclosed=function(Ee,xe){if(Ee.length<3)return"M"+Ee.join("L")+"Z";var Se="M"+Ee[0],Ue=Ee.length-1,He=[U(Ee[Ue],Ee[0],Ee[1],xe)],Fe;for(Fe=1;Fe<Ue;Fe++)He.push(U(Ee[Fe-1],Ee[Fe],Ee[Fe+1],xe));for(He.push(U(Ee[Ue-1],Ee[Ue],Ee[0],xe)),Fe=1;Fe<=Ue;Fe++)Se+="C"+He[Fe-1][1]+" "+He[Fe][0]+" "+Ee[Fe];return Se+="C"+He[Ue][1]+" "+He[0][0]+" "+Ee[0]+"Z",Se};var B,k;function O(Ee,xe,Se){return Se&&(Ee=te(Ee)),xe?_(Ee[1]):N(Ee[0])}function N(Ee){var xe=m.round(Ee,2);return B=xe,xe}function _(Ee){var xe=m.round(Ee,2);return k=xe,xe}function U(Ee,xe,Se,Ue){var He=Ee[0]-xe[0],Fe=Ee[1]-xe[1],Ge=Se[0]-xe[0],nt=Se[1]-xe[1],qe=Math.pow(He*He+Fe*Fe,I/2),$e=Math.pow(Ge*Ge+nt*nt,I/2),et=($e*$e*He-qe*qe*Ge)*Ue,ct=($e*$e*Fe-qe*qe*nt)*Ue,dt=3*$e*(qe+$e),pt=3*qe*(qe+$e);return[[N(xe[0]+(dt&&et/dt)),_(xe[1]+(dt&&ct/dt))],[N(xe[0]-(pt&&et/pt)),_(xe[1]-(pt&&ct/pt))]]}var Y={hv:function(Ee,xe,Se){return"H"+N(xe[0])+"V"+O(xe,1,Se)},vh:function(Ee,xe,Se){return"V"+_(xe[1])+"H"+O(xe,0,Se)},hvh:function(Ee,xe,Se){return"H"+N((Ee[0]+xe[0])/2)+"V"+_(xe[1])+"H"+O(xe,0,Se)},vhv:function(Ee,xe,Se){return"V"+_((Ee[1]+xe[1])/2)+"H"+N(xe[0])+"V"+O(xe,1,Se)}},J=function(Ee,xe,Se){return"L"+O(xe,0,Se)+","+O(xe,1,Se)};h.steps=function(Ee){var xe=Y[Ee]||J;return function(Se){for(var Ue="M"+N(Se[0][0])+","+_(Se[0][1]),He=Se.length,Fe=1;Fe<He;Fe++)Ue+=xe(Se[Fe-1],Se[Fe],Fe===He-1);return Ue}};function te(Ee,xe){var Se=Ee.backoff,Ue=Ee.trace,He=Ee.d,Fe=Ee.i;if(Se&&Ue&&Ue.marker&&Ue.marker.angle%360===0&&Ue.line&&Ue.line.shape!=="spline"){var Ge=P.isArrayOrTypedArray(Se),nt=Ee,qe=xe?xe[0]:B||0,$e=xe?xe[1]:k||0,et=nt[0],ct=nt[1],dt=et-qe,pt=ct-$e,At=Math.atan2(pt,dt),Mt=Ge?Se[Fe]:Se;if(Mt==="auto"){var Vt=nt.i;Ue.type==="scatter"&&Vt--;var Je=nt.marker,De=Je.symbol;P.isArrayOrTypedArray(De)&&(De=De[Vt]);var Ie=Je.size;P.isArrayOrTypedArray(Ie)&&(Ie=Ie[Vt]),Mt=Je?h.symbolBackOffs[h.symbolNumber(De)]*Ie:0,Mt+=h.getMarkerStandoff(He[Vt],Ue)||0}var ze=et-Mt*Math.cos(At),Pe=ct-Mt*Math.sin(At);(ze<=et&&ze>=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;x<T.length;x++){var S=T[x],b=S[0],a=d,E=M;if(b==="M"||b==="L")d=+S[1],M=+S[2];else if(b==="m"||b==="l")d+=+S[1],M+=+S[2];else if(b==="H")d=+S[1];else if(b==="h")d+=+S[1];else if(b==="V")M=+S[1];else if(b==="v")M+=+S[1];else if(b==="A"){d=+S[1],M=+S[2];var y=h(o,[+S[6],+S[7]]);S[6]=y[0],S[7]=y[1],S[3]=+S[3]+g}(b==="H"||b==="V")&&(b="L"),(b==="h"||b==="v")&&(b="l"),(b==="m"||b==="l")&&(d-=a,M-=E);var z=h(o,[d,M]);(b==="H"||b==="V")&&(b="L"),(b==="M"||b==="L"||b==="m"||b==="l")&&(S[1]=z[0],S[2]=z[1]),S[0]=b,C+=S[0]+S.slice(1).join(",")}return n=C,C}},25673:function(G){G.exports={visible:{valType:"boolean",editType:"calc"},type:{valType:"enumerated",values:["percent","constant","sqrt","data"],editType:"calc"},symmetric:{valType:"boolean",editType:"calc"},array:{valType:"data_array",editType:"calc"},arrayminus:{valType:"data_array",editType:"calc"},value:{valType:"number",min:0,dflt:10,editType:"calc"},valueminus:{valType:"number",min:0,dflt:10,editType:"calc"},traceref:{valType:"integer",min:0,dflt:0,editType:"style"},tracerefminus:{valType:"integer",min:0,dflt:0,editType:"style"},copy_ystyle:{valType:"boolean",editType:"plot"},copy_zstyle:{valType:"boolean",editType:"style"},color:{valType:"color",editType:"style"},thickness:{valType:"number",min:0,dflt:2,editType:"style"},width:{valType:"number",min:0,editType:"plot"},editType:"calc",_deprecated:{opacity:{valType:"number",editType:"style"}}}},84532:function(G,V,e){var m=e(92770),P=e(73972),i=e(89298),L=e(71828),A=e(45827);G.exports=function(t){for(var r=t.calcdata,s=0;s<r.length;s++){var n=r[s],l=n[0].trace;if(l.visible===!0&&P.traceIs(l,"errorBarsOK")){var c=i.getFromId(t,l.xaxis),u=i.getFromId(t,l.yaxis);v(n,l,c,"x"),v(n,l,u,"y")}}};function v(p,t,r,s){var n=t["error_"+s]||{},l=n.visible&&["linear","log"].indexOf(r.type)!==-1,c=[];if(l){for(var u=A(n),g=0;g<p.length;g++){var f=p[g],w=f.i;if(w===void 0)w=g;else if(w===null)continue;var h=f[s];if(m(r.c2l(h))){var o=u(h,w);if(m(o[0])&&m(o[1])){var d=f[s+"s"]=h-o[0],M=f[s+"h"]=h+o[1];c.push(d,M)}}}var T=r._id,C=t._extremes[T],x=i.findExtremes(r,c,L.extendFlat({tozero:C.opts.tozero},{padded:!0}));C.min=C.min.concat(x.min),C.max=C.max.concat(x.max)}}},45827:function(G){G.exports=function(m){var P=m.type,i=m.symmetric;if(P==="data"){var L=m.array||[];if(i)return function(r,s){var n=+L[s];return[n,n]};var A=m.arrayminus||[];return function(r,s){var n=+L[s],l=+A[s];return!isNaN(n)||!isNaN(l)?[l||0,n||0]:[NaN,NaN]}}else{var v=V(P,m.value),p=V(P,m.valueminus);return i||m.valueminus===void 0?function(r){var s=v(r);return[s,s]}:function(r){return[p(r),v(r)]}}};function V(e,m){if(e==="percent")return function(P){return Math.abs(P*m/100)};if(e==="constant")return function(){return Math.abs(m)};if(e==="sqrt")return function(P){return Math.sqrt(Math.abs(P))}}},97587:function(G,V,e){var m=e(92770),P=e(73972),i=e(71828),L=e(44467),A=e(25673);G.exports=function(v,p,t,r){var s="error_"+r.axis,n=L.newContainer(p,s),l=v[s]||{};function c(d,M){return i.coerce(l,n,A,d,M)}var u=l.array!==void 0||l.value!==void 0||l.type==="sqrt",g=c("visible",u);if(g!==!1){var f=c("type","array"in l?"data":"percent"),w=!0;f!=="sqrt"&&(w=c("symmetric",!((f==="data"?"arrayminus":"valueminus")in l))),f==="data"?(c("array"),c("traceref"),w||(c("arrayminus"),c("tracerefminus"))):(f==="percent"||f==="constant")&&(c("value"),w||c("valueminus"));var h="copy_"+r.inherit+"style";if(r.inherit){var o=p["error_"+r.inherit];(o||{}).visible&&c(h,!(l.color||m(l.thickness)||m(l.width)))}(!r.inherit||!n[h])&&(c("color",t),c("thickness"),c("width",P.traceIs(p,"gl3d")?0:4))}}},37369:function(G,V,e){var m=e(71828),P=e(30962).overrideAll,i=e(25673),L={error_x:m.extendFlat({},i),error_y:m.extendFlat({},i)};delete L.error_x.copy_zstyle,delete L.error_y.copy_zstyle,delete L.error_y.copy_ystyle;var A={error_x:m.extendFlat({},i),error_y:m.extendFlat({},i),error_z:m.extendFlat({},i)};delete A.error_x.copy_ystyle,delete A.error_y.copy_ystyle,delete A.error_z.copy_ystyle,delete A.error_z.copy_zstyle,G.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:L,bar:L,histogram:L,scatter3d:P(A,"calc","nested"),scattergl:P(L,"calc","nested")}},supplyDefaults:e(97587),calc:e(84532),makeComputeError:e(45827),plot:e(19398),style:e(62662),hoverInfo:v};function v(p,t,r){(t.error_y||{}).visible&&(r.yerr=p.yh-p.y,t.error_y.symmetric||(r.yerrneg=p.y-p.ys)),(t.error_x||{}).visible&&(r.xerr=p.xh-p.x,t.error_x.symmetric||(r.xerrneg=p.x-p.xs))}},19398:function(G,V,e){var m=e(39898),P=e(92770),i=e(91424),L=e(34098);G.exports=function(p,t,r,s){var n,l=r.xaxis,c=r.yaxis,u=s&&s.duration>0,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<v.length;r++){var s=v[r],n=s[0].trace;if(!P.traceIs(n,"pie-like")){var l=P.traceIs(n,"2dMap")?i:m.fillArray;l(n.hoverinfo,s,"hi",t(n)),n.hovertemplate&&l(n.hovertemplate,s,"ht"),n.hoverlabel&&(l(n.hoverlabel.bgcolor,s,"hbg"),l(n.hoverlabel.bordercolor,s,"hbc"),l(n.hoverlabel.font.size,s,"hts"),l(n.hoverlabel.font.color,s,"htc"),l(n.hoverlabel.font.family,s,"htf"),l(n.hoverlabel.namelength,s,"hnl"),l(n.hoverlabel.align,s,"hta"))}}};function i(L,A,v,p){p=p||m.identity,Array.isArray(L)&&(A[0][v]=p(L))}},75914:function(G,V,e){var m=e(73972),P=e(88335).hover;G.exports=function(L,A,v){var p=m.getComponentMethod("annotations","onClick")(L,L._hoverdata);v!==void 0&&P(L,A,v,!0);function t(){L.emit("plotly_click",{points:L._hoverdata,event:A})}L._hoverdata&&A&&A.target&&(p&&p.then?p.then(t):t(),A.stopImmediatePropagation&&A.stopImmediatePropagation())}},26675:function(G){G.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}},54268:function(G,V,e){var m=e(71828),P=e(77914),i=e(38048);G.exports=function(A,v,p,t){function r(n,l){return m.coerce(A,v,P,n,l)}var s=m.extendFlat({},t.hoverlabel);v.hovertemplate&&(s.namelength=-1),i(A,v,r,s)}},23469:function(G,V,e){var m=e(71828);V.getSubplot=function(p){return p.subplot||p.xaxis+p.yaxis||p.geo},V.isTraceInSubplots=function(p,t){if(p.type==="splom"){for(var r=p.xaxes||[],s=p.yaxes||[],n=0;n<r.length;n++)for(var l=0;l<s.length;l++)if(t.indexOf(r[n]+s[l])!==-1)return!0;return!1}return t.indexOf(V.getSubplot(p))!==-1},V.flat=function(p,t){for(var r=new Array(p.length),s=0;s<p.length;s++)r[s]=t;return r},V.p2c=function(p,t){for(var r=new Array(p.length),s=0;s<p.length;s++)r[s]=p[s].p2c(t);return r},V.getDistanceFunction=function(p,t,r,s){return p==="closest"?s||V.quadrature(t,r):p.charAt(0)==="x"?t:r},V.getClosest=function(p,t,r){if(r.index!==!1)r.index>=0&&r.index<p.length?r.distance=0:r.index=!1;else for(var s=0;s<p.length;s++){var n=t(p[s]);n<=r.distance&&(r.index=s,r.distance=n)}return r},V.inbox=function(p,t,r){return p*t<0||p===0?r:1/0},V.quadrature=function(p,t){return function(r){var s=p(r),n=t(r);return Math.sqrt(s*s+n*n)}},V.makeEventData=function(p,t,r){var s="index"in p?p.index:p.pointNumber,n={data:t._input,fullData:t,curveNumber:t.index,pointNumber:s};if(t._indexToPoints){var l=t._indexToPoints[s];l.length===1?n.pointIndex=l[0]:n.pointIndices=l}else n.pointIndex=s;return t._module.eventData?n=t._module.eventData(n,p,t,r,s):("xVal"in p?n.x=p.xVal:"x"in p&&(n.x=p.x),"yVal"in p?n.y=p.yVal:"y"in p&&(n.y=p.y),p.xa&&(n.xaxis=p.xa),p.ya&&(n.yaxis=p.ya),p.zLabelVal!==void 0&&(n.z=p.zLabelVal)),V.appendArrayPointValue(n,t,s),n},V.appendArrayPointValue=function(p,t,r){var s=t._arrayAttrs;if(s)for(var n=0;n<s.length;n++){var l=s[n],c=i(l);if(p[c]===void 0){var u=m.nestedProperty(t,l).get(),g=L(u,r);g!==void 0&&(p[c]=g)}}},V.appendArrayMultiPointValues=function(p,t,r){var s=t._arrayAttrs;if(s)for(var n=0;n<s.length;n++){var l=s[n],c=i(l);if(p[c]===void 0){for(var u=m.nestedProperty(t,l).get(),g=new Array(r.length),f=0;f<r.length;f++)g[f]=L(u,r[f]);p[c]=g}}};var P={ids:"id",locations:"location",labels:"label",values:"value","marker.colors":"color",parents:"parent"};function i(p){return P[p]||p}function L(p,t){if(Array.isArray(t)){if(Array.isArray(p)&&Array.isArray(p[t[0]]))return p[t[0]][t[1]]}else return p[t]}var A={x:!0,y:!0},v={"x unified":!0,"y unified":!0};V.isUnifiedHover=function(p){return typeof p!="string"?!1:!!v[p]},V.isXYhover=function(p){return typeof p!="string"?!1:!!A[p]}},88335:function(G,V,e){var m=e(39898),P=e(92770),i=e(84267),L=e(71828),A=L.strTranslate,v=L.strRotate,p=e(11086),t=e(63893),r=e(39918),s=e(91424),n=e(7901),l=e(28569),c=e(89298),u=e(73972),g=e(23469),f=e(26675),w=e(99017),h=e(43969),o=f.YANGLE,d=Math.PI*o/180,M=1/Math.sin(d),T=Math.cos(d),C=Math.sin(d),x=f.HOVERARROWSIZE,S=f.HOVERTEXTPAD,b={box:!0,ohlc:!0,violin:!0,candlestick:!0},a={scatter:!0,scattergl:!0,splom:!0};V.hover=function(oe,q,$,le){oe=L.getGraphDiv(oe);var ie=q.target;L.throttle(oe._fullLayout._uid+f.HOVERID,f.HOVERMINTIME,function(){E(oe,q,$,le,ie)})},V.loneHover=function(oe,q){var $=!0;Array.isArray(oe)||($=!1,oe=[oe]);var le=q.gd,ie=Z(le),he=j(le),me=oe.map(function(He){var Fe=He._x0||He.x0||He.x||0,Ge=He._x1||He.x1||He.x||0,nt=He._y0||He.y0||He.y||0,qe=He._y1||He.y1||He.y||0,$e=He.eventData;if($e){var et=Math.min(Fe,Ge),ct=Math.max(Fe,Ge),dt=Math.min(nt,qe),pt=Math.max(nt,qe),At=He.trace;if(u.traceIs(At,"gl3d")){var Mt=le._fullLayout[At.scene]._scene.container,Vt=Mt.offsetLeft,Je=Mt.offsetTop;et+=Vt,ct+=Vt,dt+=Je,pt+=Je}$e.bbox={x0:et+he,x1:ct+he,y0:dt+ie,y1:pt+ie},q.inOut_bbox&&q.inOut_bbox.push($e.bbox)}else $e=!1;return{color:He.color||n.defaultLine,x0:He.x0||He.x||0,x1:He.x1||He.x||0,y0:He.y0||He.y||0,y1:He.y1||He.y||0,xLabel:He.xLabel,yLabel:He.yLabel,zLabel:He.zLabel,text:He.text,name:He.name,idealAlign:He.idealAlign,borderColor:He.borderColor,fontFamily:He.fontFamily,fontSize:He.fontSize,fontColor:He.fontColor,nameLength:He.nameLength,textAlign:He.textAlign,trace:He.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:He.hovertemplate||!1,hovertemplateLabels:He.hovertemplateLabels||!1,eventData:$e}}),Me=!1,Te=I(me,{gd:le,hovermode:"closest",rotateLabels:Me,bgColor:q.bgColor||n.background,container:m.select(q.container),outerContainer:q.outerContainer||q.container}),Oe=Te.hoverLabels,Ne=5,Ee=0,xe=0;Oe.sort(function(He,Fe){return He.y0-Fe.y0}).each(function(He,Fe){var Ge=He.y0-He.by/2;Ge-Ne<Ee?He.offset=Ee-Ge+Ne:He.offset=0,Ee=Ge+He.by+He.offset,Fe===q.anchorIndex&&(xe=He.offset)}).each(function(He){He.offset-=xe});var Se=le._fullLayout._invScaleX,Ue=le._fullLayout._invScaleY;return _(Oe,Me,Se,Ue),$?Oe:Oe.node()};function E(ee,oe,q,$,le){q||(q="xy");var ie=Array.isArray(q)?q:[q],he=ee._fullLayout,me=he._plots||[],Me=me[q],Te=he._has("cartesian");if(Me){var Oe=Me.overlays.map(function(Ar){return Ar.id});ie=ie.concat(Oe)}for(var Ne=ie.length,Ee=new Array(Ne),xe=new Array(Ne),Se=!1,Ue=0;Ue<Ne;Ue++){var He=ie[Ue];if(me[He])Se=!0,Ee[Ue]=me[He].xaxis,xe[Ue]=me[He].yaxis;else if(he[He]&&he[He]._subplot){var Fe=he[He]._subplot;Ee[Ue]=Fe.xaxis,xe[Ue]=Fe.yaxis}else{L.warn("Unrecognized subplot: "+He);return}}var Ge=oe.hovermode||he.hovermode;if(Ge&&!Se&&(Ge="closest"),["x","y","closest","x unified","y unified"].indexOf(Ge)===-1||!ee.calcdata||ee.querySelector(".zoombox")||ee._dragging)return l.unhoverRaw(ee,oe);var nt=he.hoverdistance;nt===-1&&(nt=1/0);var qe=he.spikedistance;qe===-1&&(qe=1/0);var $e=[],et=[],ct,dt,pt,At,Mt,Vt,Je,De,Ie,ze,Pe,be,se,ye={hLinePoint:null,vLinePoint:null},Le=!1;if(Array.isArray(oe))for(Ge="array",pt=0;pt<oe.length;pt++)Mt=ee.calcdata[oe[pt].curveNumber||0],Mt&&(Vt=Mt[0].trace,Mt[0].trace.hoverinfo!=="skip"&&(et.push(Mt),Vt.orientation==="h"&&(Le=!0)));else{for(At=0;At<ee.calcdata.length;At++)Mt=ee.calcdata[At],Vt=Mt[0].trace,Vt.hoverinfo!=="skip"&&g.isTraceInSubplots(Vt,ie)&&(et.push(Mt),Vt.orientation==="h"&&(Le=!0));var Be=!le,ot,at;if(Be)"xpx"in oe?ot=oe.xpx:ot=Ee[0]._length/2,"ypx"in oe?at=oe.ypx:at=xe[0]._length/2;else{if(p.triggerHandler(ee,"plotly_beforehover",oe)===!1)return;var wt=le.getBoundingClientRect();ot=oe.clientX-wt.left,at=oe.clientY-wt.top,he._calcInverseTransform(ee);var It=L.apply3DTransform(he._invTransform)(ot,at);if(ot=It[0],at=It[1],ot<0||ot>Ee[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;At<et.length;At++)if(Mt=et[At],!(!Mt||!Mt[0]||!Mt[0].trace)&&(Vt=Mt[0].trace,!(Vt.visible!==!0||Vt._length===0)&&["carpet","contourcarpet"].indexOf(Vt._module.name)===-1)){if(Vt.type==="splom"?(De=0,Je=ie[De]):(Je=g.getSubplot(Vt),De=ie.indexOf(Je)),Ie=Ge,g.isUnifiedHover(Ie)&&(Ie=Ie.charAt(0)),be={cd:Mt,trace:Vt,xa:Ee[De],ya:xe[De],maxHoverDistance:nt,maxSpikeDistance:qe,index:!1,distance:Math.min(Bt,nt),spikeDistance:1/0,xSpike:void 0,ySpike:void 0,color:n.defaultLine,name:Vt.name,x0:void 0,x1:void 0,y0:void 0,y1:void 0,xLabelVal:void 0,yLabelVal:void 0,zLabelVal:void 0,text:void 0},he[Je]&&(be.subplot=he[Je]._subplot),he._splomScenes&&he._splomScenes[Vt.uid]&&(be.scene=he._splomScenes[Vt.uid]),se=$e.length,Ie==="array"){var Nr=oe[At];"pointNumber"in Nr?(be.index=Nr.pointNumber,Ie="closest"):(Ie="","xval"in Nr&&(ze=Nr.xval,Ie="x"),"yval"in Nr&&(Pe=Nr.yval,Ie=Ie?"closest":"y"))}else Ar!==void 0&&Or!==void 0?(ze=Ar,Pe=Or):(ze=ct[De],Pe=dt[De]);if(nt!==0)if(Vt._module&&Vt._module.hoverPoints){var qr=Vt._module.hoverPoints(be,ze,Pe,Ie,{finiteRange:!0,hoverLayer:he._hoverlayer});if(qr)for(var vn,fn=0;fn<qr.length;fn++)vn=qr[fn],P(vn.x0)&&P(vn.y0)&&$e.push(U(vn,Ge))}else L.log("Unrecognized trace type in hover:",Vt);if(Ge==="closest"&&$e.length>se&&($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;Tn<Ar.length;Tn++)fn=Ar[Tn].spikeDistance,Nr&&Tn===0&&(fn=-1/0),fn<=vn&&fn<=Or&&(qr=Ar[Tn],vn=fn);return qr}function Kt(Ar){return Ar?{xa:Ar.xa,ya:Ar.ya,x:Ar.xSpike!==void 0?Ar.xSpike:(Ar.x0+Ar.x1)/2,y:Ar.ySpike!==void 0?Ar.ySpike:(Ar.y0+Ar.y1)/2,distance:Ar.distance,spikeDistance:Ar.spikeDistance,curveNumber:Ar.trace.index,color:Ar.color,pointNumber:Ar.index}:null}var ir={fullLayout:he,container:he._hoverlayer,event:oe},_r=ee._spikepoints,yt={vLinePoint:ye.vLinePoint,hLinePoint:ye.hLinePoint};ee._spikepoints=yt;var jt=function(){$e.sort(function(Ar,Or){return Ar.distance-Or.distance}),$e=ce($e,Ge)};jt();var Yt=Ge.charAt(0),br=(Yt==="x"||Yt==="y")&&$e[0]&&a[$e[0].trace.type];if(Te&&qe!==0&&$e.length!==0){var hr=$e.filter(function(Ar){return Ar.ya.showspikes}),ut=Lt(hr,qe,br);ye.hLinePoint=Kt(ut);var lt=$e.filter(function(Ar){return Ar.xa.showspikes}),xt=Lt(lt,qe,br);ye.vLinePoint=Kt(xt)}if($e.length===0){var Tt=l.unhoverRaw(ee,oe);return Te&&(ye.hLinePoint!==null||ye.vLinePoint!==null)&&te(_r)&&Y(ee,ye,ir),Tt}if(Te&&te(_r)&&Y(ee,ye,ir),g.isXYhover(Ie)&&$e[0].length!==0&&$e[0].trace.type!=="splom"){var Ct=$e[0];b[Ct.trace.type]?$e=$e.filter(function(Ar){return Ar.trace.index===Ct.trace.index}):$e=[Ct];var St=$e.length,_t=Q("x",Ct,he),Ht=Q("y",Ct,he);Gt(_t,Ht);var $t=[],Qt={},or=0,Er=function(Ar){var Or=b[Ar.trace.type]?y(Ar):Ar.trace.index;if(!Qt[Or])or++,Qt[Or]=or,$t.push(Ar);else{var Nr=Qt[Or]-1,qr=$t[Nr];Nr>0&&Math.abs(Ar.distance)<Math.abs(qr.distance)&&($t[Nr]=Ar)}},Ye;for(Ye=0;Ye<St;Ye++)Er($e[Ye]);for(Ye=$e.length-1;Ye>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=/<extra>([\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<ee.length&&(Fe=ee[Ge][He],Fe===void 0);Ge++);var nt=K(q,Me),qe=nt.top,$e=nt.width,et=nt.height,ct=Fe!==void 0&&Ee.distance<=oe.hoverdistance&&(le==="x"||le==="y");if(ct){var dt=!0,pt,At;for(pt=0;pt<ee.length;pt++)if(dt&&ee[pt].zLabel===void 0&&(dt=!1),At=ee[pt].hoverinfo||ee[pt].trace.hoverinfo,At){var Mt=Array.isArray(At)?At:At.split("+");if(Mt.indexOf("all")===-1&&Mt.indexOf(le)===-1){ct=!1;break}}dt&&(ct=!1)}var Vt=me.selectAll("g.axistext").data(ct?[0]:[]);Vt.enter().append("g").classed("axistext",!0),Vt.exit().remove();var Je={minX:0,maxX:0,minY:0,maxY:0};if(Vt.each(function(){var St=m.select(this),_t=L.ensureSingle(St,"path","",function(Ir){Ir.style({"stroke-width":"1px"})}),Ht=L.ensureSingle(St,"text","",function(Ir){Ir.attr("data-notex",1)}),$t=Te.bgcolor||n.defaultLine,Qt=Te.bordercolor||n.contrast($t),or=n.contrast($t),Er={family:Te.font.family||Oe,size:Te.font.size||Ne,color:Te.font.color||or};_t.style({fill:$t,stroke:Qt}),Ht.text(Fe).call(s.font,Er).call(t.positionText,0,0).call(t.convertToTspans,q),St.attr("transform","");var Ye=K(q,Ht.node()),We,Dt;if(le==="x"){var Ft=xe.side==="top"?"-":"";Ht.attr("text-anchor","middle").call(t.positionText,0,xe.side==="top"?qe-Ye.bottom-x-S:qe-Ye.top+x+S),We=xe._offset+(Ee.x0+Ee.x1)/2,Dt=Se._offset+(xe.side==="top"?0:Se._length);var Zt=Ye.width/2+S;We<Zt?(We=Zt,_t.attr("d","M-"+(Zt-x)+",0L-"+(Zt-x*2)+","+Ft+x+"H"+Zt+"v"+Ft+(S*2+Ye.height)+"H-"+Zt+"V"+Ft+x+"Z")):We>$.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<Ye.width+2*S+x){pr="M-"+(x+S)+"-"+zt+"h-"+(Ye.width-S)+"V"+zt+"h"+(Ye.width-S)+"Z";var vr=Ye.width-We+S;t.positionText(Ht,vr,fr),nr==="end"&&Ht.selectAll("tspan").each(function(){var Ir=m.select(this),kr=s.tester.append("text").text(Ir.text()).call(s.font,Er),pn=K(q,kr.node());Math.round(pn.width)<Math.round(Ye.width)&&Ir.attr("x",vr-pn.width),kr.remove()})}else t.positionText(Ht,lr*(S+x),fr),pr=null;var Hr=$._topclips.selectAll("#"+dr).data(pr?[0]:[]);Hr.enter().append("clipPath").attr("id",dr).append("path"),Hr.exit().remove(),Hr.select("path").attr("d",pr),s.setClipUrl(Ht,pr?dr:null,q)}St.attr("transform",A(We,Dt))}),g.isUnifiedHover(le)){me.selectAll("g.hovertext").remove();var De=ee.filter(function(St){return St.hoverinfo!=="none"});if(De.length===0)return[];var Ie=$.hoverlabel,ze=Ie.font,Pe={showlegend:!0,legend:{title:{text:Fe,font:ze},font:ze,bgcolor:Ie.bgcolor,bordercolor:Ie.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:$.legend?$.legend.traceorder:void 0,orientation:"v"}},be={font:ze};w(Pe,be,q._fullData);var se=be.legend;se.entries=[];for(var ye=0;ye<De.length;ye++){var Le=De[ye];if(Le.hoverinfo!=="none"){var Be=B(Le,!0,le,$,Fe),ot=Be[0],at=Be[1];Le.name=at,at!==""?Le.text=at+" : "+ot:Le.text=ot;var wt=Le.cd[Le.index];wt&&(wt.mc&&(Le.mc=wt.mc),wt.mcc&&(Le.mc=wt.mcc),wt.mlc&&(Le.mlc=wt.mlc),wt.mlcc&&(Le.mlc=wt.mlcc),wt.mlw&&(Le.mlw=wt.mlw),wt.mrc&&(Le.mrc=wt.mrc),wt.dir&&(Le.dir=wt.dir)),Le._distinct=!0,se.entries.push([Le])}}se.entries.sort(function(St,_t){return St[0].trace.index-_t[0].trace.index}),se.layer=me,se._inHover=!0,se._groupTitleFont=Ie.grouptitlefont,h(q,se);var It=me.select("g.legend"),Bt=K(q,It.node()),Gt=Bt.width+2*S,Lt=Bt.height+2*S,Kt=De[0],ir=(Kt.x0+Kt.x1)/2,_r=(Kt.y0+Kt.y1)/2,yt=!(u.traceIs(Kt.trace,"bar-like")||u.traceIs(Kt.trace,"box-violin")),jt,Yt;Ue==="y"?yt?(Yt=_r-S,jt=_r+S):(Yt=Math.min.apply(null,De.map(function(St){return Math.min(St.y0,St.y1)})),jt=Math.max.apply(null,De.map(function(St){return Math.max(St.y0,St.y1)}))):Yt=jt=L.mean(De.map(function(St){return(St.y0+St.y1)/2}))-Lt/2;var br,hr;Ue==="x"?yt?(br=ir+S,hr=ir-S):(br=Math.max.apply(null,De.map(function(St){return Math.max(St.x0,St.x1)})),hr=Math.min.apply(null,De.map(function(St){return Math.min(St.x0,St.x1)}))):br=hr=L.mean(De.map(function(St){return(St.x0+St.x1)/2}))-Gt/2;var ut=xe._offset,lt=Se._offset;jt+=lt,br+=ut,hr+=ut-Gt,Yt+=lt-Lt;var xt,Tt;return br+Gt<$e&&br>=0?xt=br:hr+Gt<$e&&hr>=0?xt=hr:ut+Gt<$e?xt=ut:br-ir<ir-hr+Gt?xt=$e-Gt:xt=0,xt+=S,jt+Lt<et&&jt>=0?Tt=jt:Yt+Lt<et&&Yt>=0?Tt=Yt:lt+Lt<et?Tt=lt:jt-_r<_r-Yt+Lt?Tt=et-Lt:Tt=0,Tt+=S,It.attr("transform",A(xt-1,Tt-1)),It}var Ct=me.selectAll("g.hovertext").data(ee,function(St){return y(St)});return Ct.enter().append("g").classed("hovertext",!0).each(function(){var St=m.select(this);St.append("rect").call(n.fill,n.addOpacity(he,.8)),St.append("text").classed("name",!0),St.append("path").style("stroke-width","1px"),St.append("text").classed("nums",!0).call(s.font,Oe,Ne)}),Ct.exit().remove(),Ct.each(function(St){var _t=m.select(this).attr("transform",""),Ht=St.color;Array.isArray(Ht)&&(Ht=Ht[St.eventData[0].pointNumber]);var $t=St.bgcolor||Ht,Qt=n.combine(n.opacity($t)?$t:n.defaultLine,he),or=n.combine(n.opacity(Ht)?Ht:n.defaultLine,he),Er=St.borderColor||n.contrast(Qt),Ye=B(St,ct,le,$,Fe,_t),We=Ye[0],Dt=Ye[1],Ft=_t.select("text.nums").call(s.font,St.fontFamily||Oe,St.fontSize||Ne,St.fontColor||Er).text(We).attr("data-notex",1).call(t.positionText,0,0).call(t.convertToTspans,q),Zt=_t.select("text.name"),nr=0,lr=0;if(Dt&&Dt!==We){Zt.call(s.font,St.fontFamily||Oe,St.fontSize||Ne,or).text(Dt).attr("data-notex",1).call(t.positionText,0,0).call(t.convertToTspans,q);var rr=K(q,Zt.node());nr=rr.width+2*S,lr=rr.height+2*S}else Zt.remove(),_t.select("rect").remove();_t.select("path").style({fill:Qt,stroke:Er});var zt=St.xa._offset+(St.x0+St.x1)/2,fr=St.ya._offset+(St.y0+St.y1)/2,dr=Math.abs(St.x1-St.x0),pr=Math.abs(St.y1-St.y0),vr=K(q,Ft.node()),Hr=vr.width/$._invScaleX,Ir=vr.height/$._invScaleY;St.ty0=(qe-vr.top)/$._invScaleY,St.bx=Hr+2*S,St.by=Math.max(Ir+2*S,lr),St.anchor="start",St.txwidth=Hr,St.tx2width=nr,St.offset=0;var kr=(Hr+x+S+nr)*$._invScaleX,pn,jr;if(ie)St.pos=zt,pn=fr+pr/2+kr<=et,jr=fr-pr/2-kr>=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+"<br>"),ee.yLabel!==void 0&&(me+="y: "+ee.yLabel+"<br>"),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?"<br>":"")+ee.text),ee.extraText!==void 0&&(me+=(me?"<br>":"")+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;qe<ze.length;qe++)et=ze[qe],et.pos+et.dp+et.size>Pe.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<ze.length&&!(se<=0);qe++)if(et=ze[qe],et.pos<Pe.pmin+1)for(et.del=!0,se--,nt=et.size*2,$e=ze.length-1;$e>=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<Te.length-1;){var pt=Te[qe],At=Te[qe+1],Mt=pt[pt.length-1],Vt=At[0];if(Ge=Mt.pos+Mt.dp+Mt.size-Vt.pos-Vt.dp+Vt.size,Ge>.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;he<ee.length;he++){var me=ee[he];u.traceIs(me.trace,"bar-like")||u.traceIs(me.trace,"box-violin")?ie.push(me):me.trace[q+"period"]?le.push(me):$.push(me)}return $.concat(le).concat(ie)}function Q(ee,oe,q){var $=oe[ee+"a"],le=oe[ee+"Val"],ie=oe.cd[0];if($.type==="category"||$.type==="multicategory")le=$._categoriesMap[le];else if($.type==="date"){var he=oe.trace[ee+"periodalignment"];if(he){var me=oe.cd[oe.index],Me=me[ee+"Start"];Me===void 0&&(Me=me[ee]);var Te=me[ee+"End"];Te===void 0&&(Te=me[ee]);var Oe=Te-Me;he==="end"?le+=Oe:he==="middle"&&(le+=Oe/2)}le=$.d2c(le)}return ie&&ie.t&&ie.t.posLetter===$._id&&(q.boxmode==="group"||q.violinmode==="group")&&(le+=ie.t.dPos),le}function Z(ee){return ee.offsetTop+ee.clientTop}function j(ee){return ee.offsetLeft+ee.clientLeft}function K(ee,oe){var q=ee._fullLayout,$=oe.getBoundingClientRect(),le=$.left,ie=$.top,he=le+$.width,me=ie+$.height,Me=L.apply3DTransform(q._invTransform)(le,ie),Te=L.apply3DTransform(q._invTransform)(he,me),Oe=Me[0],Ne=Me[1],Ee=Te[0],xe=Te[1];return{x:Oe,y:Ne,width:Ee-Oe,height:xe-Ne,top:Math.min(Ne,xe),left:Math.min(Oe,Ee),right:Math.max(Oe,Ee),bottom:Math.max(Ne,xe)}}},38048:function(G,V,e){var m=e(71828),P=e(7901),i=e(23469).isUnifiedHover;G.exports=function(A,v,p,t){t=t||{};var r=v.legend;function s(n){t.font[n]||(t.font[n]=r?v.legend.font[n]:v.font[n])}v&&i(v.hovermode)&&(t.font||(t.font={}),s("size"),s("family"),s("color"),r?(t.bgcolor||(t.bgcolor=P.combine(v.legend.bgcolor,v.paper_bgcolor)),t.bordercolor||(t.bordercolor=v.legend.bordercolor)):t.bgcolor||(t.bgcolor=v.paper_bgcolor)),p("hoverlabel.bgcolor",t.bgcolor),p("hoverlabel.bordercolor",t.bordercolor),p("hoverlabel.namelength",t.namelength),m.coerceFont(p,"hoverlabel.font",t.font),p("hoverlabel.align",t.align)}},98212:function(G,V,e){var m=e(71828),P=e(528);G.exports=function(L,A){function v(p,t){return A[p]!==void 0?A[p]:m.coerce(L,A,P,p,t)}return v("clickmode"),v("hovermode")}},30211:function(G,V,e){var m=e(39898),P=e(71828),i=e(28569),L=e(23469),A=e(528),v=e(88335);G.exports={moduleType:"component",name:"fx",constants:e(26675),schema:{layout:A},attributes:e(77914),layoutAttributes:A,supplyLayoutGlobalDefaults:e(22774),supplyDefaults:e(54268),supplyLayoutDefaults:e(34938),calc:e(30732),getDistanceFunction:L.getDistanceFunction,getClosest:L.getClosest,inbox:L.inbox,quadrature:L.quadrature,appendArrayPointValue:L.appendArrayPointValue,castHoverOption:t,castHoverinfo:r,hover:v.hover,unhover:i.unhover,loneHover:v.loneHover,loneUnhover:p,click:e(75914)};function p(s){var n=P.isD3Selection(s)?s:m.select(s);n.selectAll("g.hovertext").remove(),n.selectAll(".spikeline").remove()}function t(s,n,l){return P.castOption(s,n,"hoverlabel."+l)}function r(s,n,l){function c(u){return P.coerceHoverinfo({hoverinfo:u},{_module:s._module},n)}return P.castOption(s,l,"hoverinfo",c)}},528:function(G,V,e){var m=e(26675),P=e(41940),i=P({editType:"none"});i.family.dflt=m.HOVERFONT,i.size.dflt=m.HOVERFONTSIZE,G.exports={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"]},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar"},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar"},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none"},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none"},hoverlabel:{bgcolor:{valType:"color",editType:"none"},bordercolor:{valType:"color",editType:"none"},font:i,grouptitlefont:P({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}},34938:function(G,V,e){var m=e(71828),P=e(528),i=e(98212),L=e(38048);G.exports=function(v,p){function t(u,g){return m.coerce(v,p,P,u,g)}var r=i(v,p);r&&(t("hoverdistance"),t("spikedistance"));var s=t("dragmode");s==="select"&&t("selectdirection");var n=p._has("mapbox"),l=p._has("geo"),c=p._basePlotModules.length;p.dragmode==="zoom"&&((n||l)&&c===1||n&&l&&c===2)&&(p.dragmode="pan"),L(v,p,t),m.coerceFont(t,"hoverlabel.grouptitlefont",p.hoverlabel.font)}},22774:function(G,V,e){var m=e(71828),P=e(38048),i=e(528);G.exports=function(A,v){function p(t,r){return m.coerce(A,v,i,t,r)}P(A,v,p)}},83312:function(G,V,e){var m=e(71828),P=e(30587).counter,i=e(27670).Y,L=e(85555).idRegex,A=e(44467),v={rows:{valType:"integer",min:1,editType:"plot"},roworder:{valType:"enumerated",values:["top to bottom","bottom to top"],dflt:"top to bottom",editType:"plot"},columns:{valType:"integer",min:1,editType:"plot"},subplots:{valType:"info_array",freeLength:!0,dimensions:2,items:{valType:"enumerated",values:[P("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[L.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[L.y.toString(),""],editType:"plot"},editType:"plot"},pattern:{valType:"enumerated",values:["independent","coupled"],dflt:"coupled",editType:"plot"},xgap:{valType:"number",min:0,max:1,editType:"plot"},ygap:{valType:"number",min:0,max:1,editType:"plot"},domain:i({name:"grid",editType:"plot",noGridCell:!0},{}),xside:{valType:"enumerated",values:["bottom","bottom plot","top plot","top"],dflt:"bottom plot",editType:"plot"},yside:{valType:"enumerated",values:["left","left plot","right plot","right"],dflt:"left plot",editType:"plot"},editType:"plot"};function p(l,c,u){var g=c[u+"axes"],f=Object.keys((l._splomAxes||{})[u]||{});if(Array.isArray(g))return g;if(f.length)return f}function t(l,c){var u=l.grid||{},g=p(c,u,"x"),f=p(c,u,"y");if(!l.grid&&!g&&!f)return;var w=Array.isArray(u.subplots)&&Array.isArray(u.subplots[0]),h=Array.isArray(g),o=Array.isArray(f),d=h&&g!==u.xaxes&&o&&f!==u.yaxes,M,T;w?(M=u.subplots.length,T=u.subplots[0].length):(o&&(M=f.length),h&&(T=g.length));var C=A.newContainer(c,"grid");function x(O,N){return m.coerce(u,C,v,O,N)}var S=x("rows",M),b=x("columns",T);if(!(S*b>1)){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<f;x++){var S=M+T*x;d[w?f-1-x:x]=[S,S+C]}return d}function s(l,c){var u=c.grid;if(!(!u||!u._domains)){var g=l.grid||{},f=c._subplots,w=u._hasSubplotGrid,h=u.rows,o=u.columns,d=u.pattern==="independent",M,T,C,x,S,b,a,E=u._axisMap={};if(w){var y=g.subplots||[];b=u.subplots=new Array(h);var z=1;for(M=0;M<h;M++){var I=b[M]=new Array(o),B=y[M]||[];for(T=0;T<o;T++)if(d?(S=z===1?"xy":"x"+z+"y"+z,z++):S=B[T],I[T]="",f.cartesian.indexOf(S)!==-1){if(a=S.indexOf("y"),C=S.slice(0,a),x=S.slice(a),E[C]!==void 0&&E[C]!==T||E[x]!==void 0&&E[x]!==M)continue;I[T]=S,E[C]=T,E[x]=M}}}else{var k=p(c,g,"x"),O=p(c,g,"y");u.xaxes=n(k,f.xaxis,o,E,"x"),u.yaxes=n(O,f.yaxis,h,E,"y")}var N=u._anchors={},_=u.roworder==="top to bottom";for(var U in E){var Y=U.charAt(0),J=u[Y+"side"],te,ae,ce;if(J.length<8)N[U]="free";else if(Y==="x"){if(J.charAt(0)==="t"===_?(te=0,ae=1,ce=h):(te=h-1,ae=-1,ce=-1),w){var Q=E[U];for(M=te;M!==ce;M+=ae)if(S=b[M][Q],!!S&&(a=S.indexOf("y"),S.slice(0,a)===U)){N[U]=S.slice(a);break}}else for(M=te;M!==ce;M+=ae)if(x=u.yaxes[M],f.cartesian.indexOf(U+x)!==-1){N[U]=x;break}}else if(J.charAt(0)==="l"?(te=0,ae=1,ce=o):(te=o-1,ae=-1,ce=-1),w){var Z=E[U];for(M=te;M!==ce;M+=ae)if(S=b[Z][M],!!S&&(a=S.indexOf("y"),S.slice(a)===U)){N[U]=S.slice(0,a);break}}else for(M=te;M!==ce;M+=ae)if(C=u.xaxes[M],f.cartesian.indexOf(C+U)!==-1){N[U]=C;break}}}}function n(l,c,u,g,f){var w=new Array(u),h;function o(d,M){c.indexOf(M)!==-1&&g[M]===void 0?(w[d]=M,g[M]=d):w[d]=""}if(Array.isArray(l))for(h=0;h<u;h++)o(h,l[h]);else for(o(0,f),h=1;h<u;h++)o(h,f+(h+1));return w}G.exports={moduleType:"component",name:"grid",schema:{layout:{grid:v}},layoutAttributes:v,sizeDefaults:t,contentDefaults:s}},69819:function(G,V,e){var m=e(85555),P=e(44467).templatedArray;e(24695),G.exports=P("image",{visible:{valType:"boolean",dflt:!0,editType:"arraydraw"},source:{valType:"string",editType:"arraydraw"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw"},sizex:{valType:"number",dflt:0,editType:"arraydraw"},sizey:{valType:"number",dflt:0,editType:"arraydraw"},sizing:{valType:"enumerated",values:["fill","contain","stretch"],dflt:"contain",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},x:{valType:"any",dflt:0,editType:"arraydraw"},y:{valType:"any",dflt:0,editType:"arraydraw"},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",editType:"arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"top",editType:"arraydraw"},xref:{valType:"enumerated",values:["paper",m.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",m.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})},75378:function(G,V,e){var m=e(92770),P=e(58163);G.exports=function(L,A,v,p){A=A||{};var t=v==="log"&&A.type==="linear",r=v==="linear"&&A.type==="log";if(t||r){for(var s=L._fullLayout.images,n=A._id.charAt(0),l,c,u=0;u<s.length;u++)if(l=s[u],c="images["+u+"].",l[n+"ref"]===A._id){var g=l[n],f=l["size"+n],w=null,h=null;if(t){w=P(g,A.range);var o=f/Math.pow(10,w)/2;h=2*Math.log(o+Math.sqrt(1+o*o))/Math.LN10}else w=Math.pow(10,g),h=w*(Math.pow(10,f/2)-Math.pow(10,-f/2));m(w)?m(h)||(h=null):(w=null,h=null),p(c+n,w),p(c+"size"+n,h)}}}},81603:function(G,V,e){var m=e(71828),P=e(89298),i=e(85501),L=e(69819),A="images";G.exports=function(t,r){var s={name:A,handleItemDefaults:v};i(t,r,s)};function v(p,t,r){function s(o,d){return m.coerce(p,t,L,o,d)}var n=s("source"),l=s("visible",!!n);if(!l)return t;s("layer"),s("xanchor"),s("yanchor"),s("sizex"),s("sizey"),s("sizing"),s("opacity");for(var c={_fullLayout:r},u=["x","y"],g=0;g<2;g++){var f=u[g],w=P.coerceRef(p,t,c,f,"paper",void 0);if(w!=="paper"){var h=P.getFromId(c,w);h._imgIndices.push(t._index)}P.coercePosition(t,c,s,w,f,0)}return t}},80750:function(G,V,e){var m=e(39898),P=e(91424),i=e(89298),L=e(41675),A=e(77922);G.exports=function(p){var t=p._fullLayout,r=[],s={},n=[],l,c;for(c=0;c<t.images.length;c++){var u=t.images[c];if(u.visible)if(u.layer==="below"&&u.xref!=="paper"&&u.yref!=="paper"){l=L.ref2id(u.xref)+L.ref2id(u.yref);var g=t._plots[l];if(!g){n.push(u);continue}g.mainplot&&(l=g.mainplot.id),s[l]||(s[l]=[]),s[l].push(u)}else u.layer==="above"?r.push(u):n.push(u)}var f={x:{left:{sizing:"xMin",offset:0},center:{sizing:"xMid",offset:-1/2},right:{sizing:"xMax",offset:-1}},y:{top:{sizing:"YMin",offset:0},middle:{sizing:"YMid",offset:-1/2},bottom:{sizing:"YMax",offset:-1}}};function w(x){var S=m.select(this);if(this._imgSrc!==x.source)if(S.attr("xmlns",A.svg),x.source&&x.source.slice(0,5)==="data:")S.attr("xlink:href",x.source),this._imgSrc=x.source;else{var b=new Promise((function(a){var E=new Image;this.img=E,E.setAttribute("crossOrigin","anonymous"),E.onerror=y,E.onload=function(){var z=document.createElement("canvas");z.width=this.width,z.height=this.height;var I=z.getContext("2d",{willReadFrequently:!0});I.drawImage(this,0,0);var B=z.toDataURL("image/png");S.attr("xlink:href",B),a()},S.on("error",y),E.src=x.source,this._imgSrc=x.source;function y(){S.remove(),a()}}).bind(this));p._promises.push(b)}}function h(x){var S=m.select(this),b=i.getFromId(p,x.xref),a=i.getFromId(p,x.yref),E=i.getRefType(x.xref)==="domain",y=i.getRefType(x.yref)==="domain",z=t._size,I,B;b!==void 0?I=typeof x.xref=="string"&&E?b._length*x.sizex:Math.abs(b.l2p(x.sizex)-b.l2p(0)):I=x.sizex*z.w,a!==void 0?B=typeof x.yref=="string"&&y?a._length*x.sizey:Math.abs(a.l2p(x.sizey)-a.l2p(0)):B=x.sizey*z.h;var k=I*f.x[x.xanchor].offset,O=B*f.y[x.yanchor].offset,N=f.x[x.xanchor].sizing+f.y[x.yanchor].sizing,_,U;switch(b!==void 0?_=typeof x.xref=="string"&&E?b._length*x.x+b._offset:b.r2p(x.x)+b._offset:_=x.x*z.w+z.l,_+=k,a!==void 0?U=typeof x.yref=="string"&&y?a._length*(1-x.y)+a._offset:a.r2p(x.y)+a._offset:U=z.h-x.y*z.h+z.t,U+=O,x.sizing){case"fill":N+=" slice";break;case"stretch":N="none";break}S.attr({x:_,y:U,width:I,height:B,preserveAspectRatio:N,opacity:x.opacity});var Y=b&&i.getRefType(x.xref)!=="domain"?b._id:"",J=a&&i.getRefType(x.yref)!=="domain"?a._id:"",te=Y+J;P.setClipUrl(S,te?"clip"+t._uid+te:null,p)}var o=t._imageLowerLayer.selectAll("image").data(n),d=t._imageUpperLayer.selectAll("image").data(r);o.enter().append("image"),d.enter().append("image"),o.exit().remove(),d.exit().remove(),o.each(function(x){w.bind(this)(x),h.bind(this)(x)}),d.each(function(x){w.bind(this)(x),h.bind(this)(x)});var M=Object.keys(t._plots);for(c=0;c<M.length;c++){l=M[c];var T=t._plots[l];if(T.imagelayer){var C=T.imagelayer.selectAll("image").data(s[l]||[]);C.enter().append("image"),C.exit().remove(),C.each(function(x){w.bind(this)(x),h.bind(this)(x)})}}}},68804:function(G,V,e){G.exports={moduleType:"component",name:"images",layoutAttributes:e(69819),supplyLayoutDefaults:e(81603),includeBasePlot:e(76325)("images"),draw:e(80750),convertCoords:e(75378)}},33030:function(G,V,e){var m=e(41940),P=e(22399);G.exports={_isSubplotObj:!0,visible:{valType:"boolean",dflt:!0,editType:"legend"},bgcolor:{valType:"color",editType:"legend"},bordercolor:{valType:"color",dflt:P.defaultLine,editType:"legend"},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend"},font:m({editType:"legend"}),grouptitlefont:m({editType:"legend"}),orientation:{valType:"enumerated",values:["v","h"],dflt:"v",editType:"legend"},traceorder:{valType:"flaglist",flags:["reversed","grouped"],extras:["normal"],editType:"legend"},tracegroupgap:{valType:"number",min:0,dflt:10,editType:"legend"},entrywidth:{valType:"number",min:0,editType:"legend"},entrywidthmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels",editType:"legend"},itemsizing:{valType:"enumerated",values:["trace","constant"],dflt:"trace",editType:"legend"},itemwidth:{valType:"number",min:30,dflt:30,editType:"legend"},itemclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggle",editType:"legend"},itemdoubleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggleothers",editType:"legend"},groupclick:{valType:"enumerated",values:["toggleitem","togglegroup"],dflt:"togglegroup",editType:"legend"},x:{valType:"number",editType:"legend"},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"legend"},y:{valType:"number",editType:"legend"},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],editType:"legend"},uirevision:{valType:"any",editType:"none"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"legend"},title:{text:{valType:"string",dflt:"",editType:"legend"},font:m({editType:"legend"}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend"},editType:"legend"},editType:"legend"}},14928:function(G){G.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}},99017:function(G,V,e){var m=e(73972),P=e(71828),i=e(44467),L=e(9012),A=e(33030),v=e(10820),p=e(10130);function t(r,s,n,l){var c=s[r]||{},u=i.newContainer(n,r);function g(ce,Q){return P.coerce(c,u,A,ce,Q)}var f=P.coerceFont(g,"font",n.font);g("bgcolor",n.paper_bgcolor),g("bordercolor");var w=g("visible");if(w){for(var h,o=function(ce,Q){var Z=h._input,j=h;return P.coerce(Z,j,L,ce,Q)},d=n.font||{},M=P.coerceFont(g,"grouptitlefont",P.extendFlat({},d,{size:Math.round(d.size*1.1)})),T=0,C=!1,x="normal",S=(n.shapes||[]).filter(function(ce){return ce.showlegend}),b=l.concat(S).filter(function(ce){return r===(ce.legend||"legend")}),a=0;a<b.length;a++)if(h=b[a],!!h.visible){var E=h._isShape;(h.showlegend||h._dfltShowLegend&&!(h._module&&h._module.attributes&&h._module.attributes.showlegend&&h._module.attributes.showlegend.dflt===!1))&&(T++,h.showlegend&&(C=!0,(!E&&m.traceIs(h,"pie-like")||h._input.showlegend===!0)&&T++),P.coerceFont(o,"legendgrouptitle.font",M)),(!E&&m.traceIs(h,"bar")&&n.barmode==="stack"||["tonextx","tonexty"].indexOf(h.fill)!==-1)&&(x=p.isGrouped({traceorder:x})?"grouped+reversed":"reversed"),h.legendgroup!==void 0&&h.legendgroup!==""&&(x=p.isReversed({traceorder:x})?"reversed+grouped":"grouped")}var y=P.coerce(s,n,v,"showlegend",C&&T>(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;c<g.length;c++){var f=g[c];if(f.showlegend){var w={_input:f._input,visible:f.visible,showlegend:f.showlegend,legend:f.legend};u.push(w)}}var h=["legend"];for(c=0;c<u.length;c++)P.pushUnique(h,u[c].legend);for(n._legends=[],c=0;c<h.length;c++){var o=h[c];t(o,s,n,u),n[o]&&n[o].visible&&(n[o]._id=o),n._legends.push(o)}}},43969:function(G,V,e){var m=e(39898),P=e(71828),i=e(74875),L=e(73972),A=e(11086),v=e(28569),p=e(91424),t=e(7901),r=e(63893),s=e(85167),n=e(14928),l=e(18783),c=l.LINE_SPACING,u=l.FROM_TL,g=l.FROM_BR,f=e(82424),w=e(53630),h=e(10130),o=1,d=/^legend[0-9]*$/;G.exports=function(U,Y){if(Y)T(U,Y);else{var J=U._fullLayout,te=J._legends,ae=J._infolayer.selectAll('[class^="legend"]');ae.each(function(){var j=m.select(this),K=j.attr("class"),ee=K.split(" ")[0];ee.match(d)&&te.indexOf(ee)===-1&&j.remove()});for(var ce=0;ce<te.length;ce++){var Q=te[ce],Z=U._fullLayout[Q];T(U,Z)}}};function M(_,U,Y){if(!(U.title.side!=="top center"&&U.title.side!=="top right")){var J=U.title.font,te=J.size*c,ae=0,ce=_.node(),Q=p.bBox(ce).width;U.title.side==="top center"?ae=.5*(U._width-2*Y-2*n.titlePad-Q):U.title.side==="top right"&&(ae=U._width-2*Y-2*n.titlePad-Q),r.positionText(_,Y+n.titlePad+ae,Y+te)}}function T(_,U){var Y=U||{},J=_._fullLayout,te=N(Y),ae,ce,Q=Y._inHover;if(Q?(ce=Y.layer,ae="hover"):(ce=J._infolayer,ae=te),!!ce){ae+=J._uid,_._legendMouseDownTime||(_._legendMouseDownTime=0);var Z;if(Q){if(!Y.entries)return;Z=f(Y.entries,Y)}else{for(var j=(_.calcdata||[]).slice(),K=J.shapes,ee=0;ee<K.length;ee++){var oe=K[ee];if(oe.showlegend){var q={_isShape:!0,_fullInput:oe,index:oe._index,name:oe.name||oe.label.text||"shape "+oe._index,legend:oe.legend,legendgroup:oe.legendgroup,legendgrouptitle:oe.legendgrouptitle,legendrank:oe.legendrank,legendwidth:oe.legendwidth,showlegend:oe.showlegend,visible:oe.visible,opacity:oe.opacity,mode:oe.type==="line"?"lines":"markers",line:oe.line,marker:{line:oe.line,color:oe.fillcolor,size:12,symbol:oe.type==="rect"?"square":oe.type==="circle"?"circle":"hexagon2"}};j.push([{trace:q}])}}Z=J.showlegend&&f(j,Y,J._legends.length>1)}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._legendMouseDownTime<J?ae+=1:(ae=1,U._legendMouseDownTime=te)}),ce.on("mouseup",function(){if(!(U._dragged||U._editing)){var Q=U._fullLayout[Y];new Date().getTime()-U._legendMouseDownTime>J&&(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,dt=0,pt=0,At=0,Mt=0;Y.each(function(De){var Ie=De[0].height,ze=C(De,J,q),Pe=ct?ze:He;j||(Pe+=oe),Pe+K+pt-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;f<L.length;f++){var o=L[f],d=o[0],M=d.trace,T=M.legend,C=M.legendgroup;if(!(!p&&(!M.visible||!M.showlegend)))if(m.traceIs(M,"pie-like"))for(c[C]||(c[C]={}),w=0;w<o.length;w++){var x=o[w].label;c[C][x]||(h(T,C,{label:x,color:o[w].color,i:o[w].i,trace:M,pts:o[w].pts}),c[C][x]=!0,g=Math.max(g,(x||"").length))}else h(T,C,d),g=Math.max(g,(M.name||"").length)}if(!n.length)return[];var S=!l||!t,b=[];for(f=0;f<n.length;f++){var a=s[n[f]];S?b.push(a[0]):b.push(a)}for(S&&(b=[b]),f=0;f<b.length;f++){var E=1/0;for(w=0;w<b[f].length;w++){var y=b[f][w].trace.legendrank;E>y&&(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;f<b.length;f++){b[f].forEach(function(_,U){_._preSort=U}),b[f].sort(I);var B=b[f][0].trace,k=null;for(w=0;w<b[f].length;w++){var O=b[f][w].trace.legendgrouptitle;if(O&&O.text){k=O,p&&(O.font=A._groupTitleFont);break}}if(r&&b[f].reverse(),k){var N=!1;for(w=0;w<b[f].length;w++)if(m.traceIs(b[f][w].trace,"pie-like")){N=!0;break}b[f].unshift({i:-1,groupTitle:k,noClick:N,trace:{showlegend:B.showlegend,legendgroup:B.legendgroup,visible:A.groupclick==="toggleitem"?!0:B.visible}})}for(w=0;w<b[f].length;w++)b[f][w]=[b[f][w]]}return A._lgroupsLength=b.length,A._maxNameLength=g,b}},85167:function(G,V,e){var m=e(73972),P=e(71828),i=P.pushUnique,L=!0;G.exports=function(v,p,t){var r=p._fullLayout;if(p._dragged||p._editing)return;var s=r.legend.itemclick,n=r.legend.itemdoubleclick,l=r.legend.groupclick;t===1&&s==="toggle"&&n==="toggleothers"&&L&&p.data&&p._context.showTips&&P.notifier(P._(p,"Double-click on legend to isolate one trace"),"long"),L=!1;var c;if(t===1?c=s:t===2&&(c=n),!c)return;var u=l==="togglegroup",g=r.hiddenlabels?r.hiddenlabels.slice():[],f=v.data()[0][0];if(f.groupTitle&&f.noClick)return;var w=p._fullData,h=(r.shapes||[]).filter(function(Ue){return Ue.showlegend}),o=w.concat(h),d=f.trace;d._isShape&&(d=d._fullInput);var M=d.legendgroup,T,C,x,S,b,a,E={},y=[],z=[],I=[];function B(Ue,He){var Fe=y.indexOf(Ue),Ge=E.visible;return Ge||(Ge=E.visible=[]),y.indexOf(Ue)===-1&&(y.push(Ue),Fe=y.length-1),Ge[Fe]=He,Fe}var k=(r.shapes||[]).map(function(Ue){return Ue._input}),O=!1;function N(Ue,He){k[Ue].visible=He,O=!0}function _(Ue,He){if(!(f.groupTitle&&!u)){var Fe=Ue._fullInput||Ue,Ge=Fe._isShape,nt=Fe.index;if(nt===void 0&&(nt=Fe._index),m.hasTransform(Fe,"groupby")){var qe=z[nt];if(!qe){var $e=m.getTransformIndices(Fe,"groupby"),et=$e[$e.length-1];qe=P.keyedContainer(Fe,"transforms["+et+"].styles","target","value.visible"),z[nt]=qe}var ct=qe.get(Ue._group);ct===void 0&&(ct=!0),ct!==!1&&qe.set(Ue._group,He),I[nt]=B(nt,Fe.visible!==!1)}else{var dt=Fe.visible===!1?!1:He;Ge?N(nt,dt):B(nt,dt)}}}var U=d.legend,Y=d._fullInput,J=Y&&Y._isShape;if(!J&&m.traceIs(d,"pie-like")){var te=f.label,ae=g.indexOf(te);if(c==="toggle")ae===-1?g.push(te):g.splice(ae,1);else if(c==="toggleothers"){var ce=ae!==-1,Q=[];for(T=0;T<p.calcdata.length;T++){var Z=p.calcdata[T];for(C=0;C<Z.length;C++){var j=Z[C],K=j.label;U===Z[0].trace.legend&&te!==K&&(g.indexOf(K)===-1&&(ce=!0),i(g,K),Q.push(K))}}if(!ce)for(var ee=0;ee<Q.length;ee++){var oe=g.indexOf(Q[ee]);oe!==-1&&g.splice(oe,1)}}m.call("_guiRelayout",p,"hiddenlabels",g)}else{var q=M&&M.length,$=[],le;if(q)for(T=0;T<o.length;T++)le=o[T],le.visible&&le.legendgroup===M&&$.push(T);if(c==="toggle"){var ie;switch(d.visible){case!0:ie="legendonly";break;case!1:ie=!1;break;case"legendonly":ie=!0;break}if(q)if(u)for(T=0;T<o.length;T++){var he=o[T];he.visible!==!1&&he.legendgroup===M&&_(he,ie)}else _(d,ie);else _(d,ie)}else if(c==="toggleothers"){var me,Me,Te,Oe,Ne,Ee=!0;for(T=0;T<o.length;T++)if(Ne=o[T],me=Ne===d,Te=Ne.showlegend!==!0,!(me||Te)&&(Me=q&&Ne.legendgroup===M,!Me&&Ne.legend===U&&Ne.visible===!0&&!m.traceIs(Ne,"notLegendIsolatable"))){Ee=!1;break}for(T=0;T<o.length;T++)if(Ne=o[T],!(Ne.visible===!1||Ne.legend!==U)&&!m.traceIs(Ne,"notLegendIsolatable"))switch(d.visible){case"legendonly":_(Ne,!0);break;case!0:Oe=Ee?!0:"legendonly",me=Ne===d,Te=Ne.showlegend!==!0&&!Ne.legendgroup,Me=me||q&&Ne.legendgroup===M,_(Ne,Me||Te?!0:Oe);break}}for(T=0;T<z.length;T++)if(x=z[T],!!x){var xe=x.constructUpdate(),Se=Object.keys(xe);for(C=0;C<Se.length;C++)S=Se[C],a=E[S]=E[S]||[],a[I[T]]=xe[S]}for(b=Object.keys(E),T=0;T<b.length;T++)for(S=b[T],C=0;C<y.length;C++)E[S].hasOwnProperty(C)||(E[S][C]=void 0);O?m.call("_guiUpdate",p,E,{shapes:k},y):m.call("_guiRestyle",p,E,y)}}},10130:function(G,V){V.isGrouped=function(m){return(m.traceorder||"").indexOf("grouped")!==-1},V.isVertical=function(m){return m.orientation!=="h"},V.isReversed=function(m){return(m.traceorder||"").indexOf("reversed")!==-1}},2199:function(G,V,e){G.exports={moduleType:"component",name:"legend",layoutAttributes:e(33030),supplyLayoutDefaults:e(99017),draw:e(43969),style:e(53630)}},53630:function(G,V,e){var m=e(39898),P=e(73972),i=e(71828),L=i.strTranslate,A=e(91424),v=e(7901),p=e(52075).extractOpts,t=e(34098),r=e(63463),s=e(53581).castOption,n=e(14928),l=12,c=5,u=2,g=10,f=5;G.exports=function(M,T,C){var x=T._fullLayout;C||(C=x.legend);var S=C.itemsizing==="constant",b=C.itemwidth,a=(b+n.itemGap*2)/2,E=L(a,0),y=function(Q,Z,j,K){var ee;if(Q+1)ee=Q;else if(Z&&Z.width>0)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(qe<Fe[0])return Fe[0];if(qe>Fe[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;z<a.length;z++)if(y=a[z],!y.fixedrange)if(O=y._name,x==="auto")b[O+".autorange"]=!0;else if(x==="reset")y._rangeInitial0===void 0&&y._rangeInitial1===void 0?b[O+".autorange"]=!0:y._rangeInitial0===void 0?(b[O+".autorange"]=y._autorangeInitial,b[O+".range"]=[null,y._rangeInitial1]):y._rangeInitial1===void 0?(b[O+".range"]=[y._rangeInitial0,null],b[O+".autorange"]=y._autorangeInitial):b[O+".range"]=[y._rangeInitial0,y._rangeInitial1],y._showSpikeInitial!==void 0&&(b[O+".showspikes"]=y._showSpikeInitial,E==="on"&&!y._showSpikeInitial&&(E="off"));else{var N=[y.r2l(y.range[0]),y.r2l(y.range[1])],_=[B*N[0]+k*N[1],B*N[1]+k*N[0]];b[O+".range[0]"]=y.l2r(_[0]),b[O+".range[1]"]=y.l2r(_[1])}}else C==="hovermode"&&(x==="x"||x==="y")&&(x=S._isHoriz?"y":"x",T.setAttribute("data-val",x)),b[C]=x;S._cartesianSpikesEnabled=E,m.call("_guiRelayout",d,b)}t.zoom3d={name:"zoom3d",_cat:"zoom",title:function(d){return p(d,"Zoom")},attr:"scene.dragmode",val:"zoom",icon:L.zoombox,click:s},t.pan3d={name:"pan3d",_cat:"pan",title:function(d){return p(d,"Pan")},attr:"scene.dragmode",val:"pan",icon:L.pan,click:s},t.orbitRotation={name:"orbitRotation",title:function(d){return p(d,"Orbital rotation")},attr:"scene.dragmode",val:"orbit",icon:L["3d_rotate"],click:s},t.tableRotation={name:"tableRotation",title:function(d){return p(d,"Turntable rotation")},attr:"scene.dragmode",val:"turntable",icon:L["z-axis"],click:s};function s(d,M){for(var T=M.currentTarget,C=T.getAttribute("data-attr"),x=T.getAttribute("data-val")||!0,S=d._fullLayout._subplots.gl3d||[],b={},a=C.split("."),E=0;E<S.length;E++)b[S[E]+"."+a[1]]=x;var y=x==="pan"?x:"zoom";b.dragmode=y,m.call("_guiRelayout",d,b)}t.resetCameraDefault3d={name:"resetCameraDefault3d",_cat:"resetCameraDefault",title:function(d){return p(d,"Reset camera to default")},attr:"resetDefault",icon:L.home,click:n},t.resetCameraLastSave3d={name:"resetCameraLastSave3d",_cat:"resetCameraLastSave",title:function(d){return p(d,"Reset camera to last save")},attr:"resetLastSave",icon:L.movie,click:n};function n(d,M){for(var T=M.currentTarget,C=T.getAttribute("data-attr"),x=C==="resetLastSave",S=C==="resetDefault",b=d._fullLayout,a=b._subplots.gl3d||[],E={},y=0;y<a.length;y++){var z=a[y],I=z+".camera",B=z+".aspectratio",k=z+".aspectmode",O=b[z]._scene,N;x?(E[I+".up"]=O.viewInitial.up,E[I+".eye"]=O.viewInitial.eye,E[I+".center"]=O.viewInitial.center,N=!0):S&&(E[I+".up"]=null,E[I+".eye"]=null,E[I+".center"]=null,N=!0),N&&(E[B+".x"]=O.viewInitial.aspectratio.x,E[B+".y"]=O.viewInitial.aspectratio.y,E[B+".z"]=O.viewInitial.aspectratio.z,E[k]=O.viewInitial.aspectmode)}m.call("_guiRelayout",d,E)}t.hoverClosest3d={name:"hoverClosest3d",_cat:"hoverclosest",title:function(d){return p(d,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:L.tooltip_basic,gravity:"ne",click:c};function l(d,M){var T=M.currentTarget,C=T._previousVal,x=d._fullLayout,S=x._subplots.gl3d||[],b=["xaxis","yaxis","zaxis"],a={},E={};if(C)E=C,T._previousVal=null;else{for(var y=0;y<S.length;y++){var z=S[y],I=x[z],B=z+".hovermode";a[B]=I.hovermode,E[B]=!1;for(var k=0;k<3;k++){var O=b[k],N=z+"."+O+".showspikes";E[N]=!1,a[N]=I[O].showspikes}}T._previousVal=a}return E}function c(d,M){var T=l(d,M);m.call("_guiRelayout",d,T)}t.zoomInGeo={name:"zoomInGeo",_cat:"zoomin",title:function(d){return p(d,"Zoom in")},attr:"zoom",val:"in",icon:L.zoom_plus,click:u},t.zoomOutGeo={name:"zoomOutGeo",_cat:"zoomout",title:function(d){return p(d,"Zoom out")},attr:"zoom",val:"out",icon:L.zoom_minus,click:u},t.resetGeo={name:"resetGeo",_cat:"reset",title:function(d){return p(d,"Reset")},attr:"reset",val:null,icon:L.autoscale,click:u},t.hoverClosestGeo={name:"hoverClosestGeo",_cat:"hoverclosest",title:function(d){return p(d,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:L.tooltip_basic,gravity:"ne",click:f};function u(d,M){for(var T=M.currentTarget,C=T.getAttribute("data-attr"),x=T.getAttribute("data-val")||!0,S=d._fullLayout,b=S._subplots.geo||[],a=0;a<b.length;a++){var E=b[a],y=S[E];if(C==="zoom"){var z=y.projection.scale,I=x==="in"?2*z:.5*z;m.call("_guiRelayout",d,E+".projection.scale",I)}}C==="reset"&&o(d,"geo")}t.hoverClosestGl2d={name:"hoverClosestGl2d",_cat:"hoverclosest",title:function(d){return p(d,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:L.tooltip_basic,gravity:"ne",click:f},t.hoverClosestPie={name:"hoverClosestPie",_cat:"hoverclosest",title:function(d){return p(d,"Toggle show closest data on hover")},attr:"hovermode",val:"closest",icon:L.tooltip_basic,gravity:"ne",click:f};function g(d){var M=d._fullLayout;return M.hovermode?!1:M._has("cartesian")?M._isHoriz?"y":"x":"closest"}function f(d){var M=g(d);m.call("_guiRelayout",d,"hovermode",M)}t.resetViewSankey={name:"resetSankeyGroup",title:function(d){return p(d,"Reset view")},icon:L.home,click:function(d){for(var M={"node.groups":[],"node.x":[],"node.y":[]},T=0;T<d._fullData.length;T++){var C=d._fullData[T]._viewInitial;M["node.groups"].push(C.node.groups.slice()),M["node.x"].push(C.node.x.slice()),M["node.y"].push(C.node.y.slice())}m.call("restyle",d,M)}},t.toggleHover={name:"toggleHover",title:function(d){return p(d,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:L.tooltip_basic,gravity:"ne",click:function(d,M){var T=l(d,M);T.hovermode=g(d),m.call("_guiRelayout",d,T)}},t.resetViews={name:"resetViews",title:function(d){return p(d,"Reset views")},icon:L.home,click:function(d,M){var T=M.currentTarget;T.setAttribute("data-attr","zoom"),T.setAttribute("data-val","reset"),r(d,M),T.setAttribute("data-attr","resetLastSave"),n(d,M),o(d,"geo"),o(d,"mapbox")}},t.toggleSpikelines={name:"toggleSpikelines",title:function(d){return p(d,"Toggle Spike Lines")},icon:L.spikeline,attr:"_cartesianSpikesEnabled",val:"on",click:function(d){var M=d._fullLayout,T=M._cartesianSpikesEnabled;M._cartesianSpikesEnabled=T==="on"?"off":"on",m.call("_guiRelayout",d,w(d))}};function w(d){for(var M=d._fullLayout,T=M._cartesianSpikesEnabled==="on",C=i.list(d,null,!0),x={},S=0;S<C.length;S++){var b=C[S];x[b._name+".showspikes"]=T?!0:b._showSpikeInitial}return x}t.resetViewMapbox={name:"resetViewMapbox",_cat:"resetView",title:function(d){return p(d,"Reset view")},attr:"reset",icon:L.home,click:function(d){o(d,"mapbox")}},t.zoomInMapbox={name:"zoomInMapbox",_cat:"zoomin",title:function(d){return p(d,"Zoom in")},attr:"zoom",val:"in",icon:L.zoom_plus,click:h},t.zoomOutMapbox={name:"zoomOutMapbox",_cat:"zoomout",title:function(d){return p(d,"Zoom out")},attr:"zoom",val:"out",icon:L.zoom_minus,click:h};function h(d,M){for(var T=M.currentTarget,C=T.getAttribute("data-val"),x=d._fullLayout,S=x._subplots.mapbox||[],b=1.05,a={},E=0;E<S.length;E++){var y=S[E],z=x[y].zoom,I=C==="in"?b*z:z/b;a[y+".zoom"]=I}m.call("_guiRelayout",d,a)}function o(d,M){for(var T=d._fullLayout,C=T._subplots[M]||[],x={},S=0;S<C.length;S++)for(var b=C[S],a=T[b]._subplot,E=a.viewInitial,y=Object.keys(E),z=0;z<y.length;z++){var I=y[z];x[b+"."+I]=E[I]}m.call("_guiRelayout",d,x)}},93348:function(G,V,e){var m=e(26023),P=Object.keys(m),i=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],L=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(i),A=[],v=function(p){if(L.indexOf(p._cat||p.name)===-1){var t=p.name,r=(p._cat||p.name).toLowerCase();A.indexOf(t)===-1&&A.push(t),A.indexOf(r)===-1&&A.push(r)}};P.forEach(function(p){v(m[p])}),A.sort(),G.exports={DRAW_MODES:i,backButtons:L,foreButtons:A}},35750:function(G,V,e){var m=e(71828),P=e(7901),i=e(44467),L=e(42068);G.exports=function(v,p){var t=v.modebar||{},r=i.newContainer(p,"modebar");function s(l,c){return m.coerce(t,r,L,l,c)}s("orientation"),s("bgcolor",P.addOpacity(p.paper_bgcolor,.5));var n=P.contrast(P.rgb(p.modebar.bgcolor));s("color",P.addOpacity(n,.3)),s("activecolor",P.addOpacity(n,.7)),s("uirevision",p.uirevision),s("add"),s("remove")}},64168:function(G,V,e){G.exports={moduleType:"component",name:"modebar",layoutAttributes:e(42068),supplyLayoutDefaults:e(35750),manage:e(14192)}},14192:function(G,V,e){var m=e(41675),P=e(34098),i=e(73972),L=e(23469).isUnifiedHover,A=e(37676),v=e(26023),p=e(93348).DRAW_MODES,t=e(71828).extendDeep;G.exports=function(f){var w=f._fullLayout,h=f._context,o=w._modeBar;if(!h.displayModeBar&&!h.watermark){o&&(o.destroy(),delete w._modeBar);return}if(!Array.isArray(h.modeBarButtonsToRemove))throw new Error(["*modeBarButtonsToRemove* configuration options","must be an array."].join(" "));if(!Array.isArray(h.modeBarButtonsToAdd))throw new Error(["*modeBarButtonsToAdd* configuration options","must be an array."].join(" "));var d=h.modeBarButtons,M;Array.isArray(d)&&d.length?M=u(d):!h.displayModeBar&&h.watermark?M=[]:M=r(f),o?o.update(f,M):w._modeBar=A(f,M)};function r(g){var f=g._fullLayout,w=g._fullData,h=g._context;function o(q,$){if(typeof $=="string"){if($.toLowerCase()===q.toLowerCase())return!0}else{var le=$.name,ie=$._cat||$.name;if(le===q||ie===q.toLowerCase())return!0}return!1}var d=f.modebar.add;typeof d=="string"&&(d=[d]);var M=f.modebar.remove;typeof M=="string"&&(M=[M]);var T=h.modeBarButtonsToAdd.concat(d.filter(function(q){for(var $=0;$<h.modeBarButtonsToRemove.length;$++)if(o(q,h.modeBarButtonsToRemove[$]))return!1;return!0})),C=h.modeBarButtonsToRemove.concat(M.filter(function(q){for(var $=0;$<h.modeBarButtonsToAdd.length;$++)if(o(q,h.modeBarButtonsToAdd[$]))return!1;return!0})),x=f._has("cartesian"),S=f._has("gl3d"),b=f._has("geo"),a=f._has("pie"),E=f._has("funnelarea"),y=f._has("gl2d"),z=f._has("ternary"),I=f._has("mapbox"),B=f._has("polar"),k=f._has("smith"),O=f._has("sankey"),N=s(f),_=L(f.hovermode),U=[];function Y(q){if(q.length){for(var $=[],le=0;le<q.length;le++){for(var ie=q[le],he=v[ie],me=he.name.toLowerCase(),Me=(he._cat||he.name).toLowerCase(),Te=!1,Oe=0;Oe<C.length;Oe++){var Ne=C[Oe].toLowerCase();if(Ne===me||Ne===Me){Te=!0;break}}Te||$.push(v[ie])}U.push($)}}var J=["toImage"];h.showEditInChartStudio?J.push("editInChartStudio"):h.showSendToCloud&&J.push("sendDataToCloud"),Y(J);var te=[],ae=[],ce=[],Q=[];(x||y||a||E||z)+b+S+I+B+k>1?(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;ee<T.length;ee++){var oe=T[ee];typeof oe=="string"?(oe=oe.toLowerCase(),p.indexOf(oe)!==-1?(f._has("mapbox")||f._has("cartesian"))&&Q.push(oe):oe==="togglespikelines"?j("toggleSpikelines"):oe==="togglehover"?j("toggleHover"):oe==="hovercompare"?j("hoverCompareCartesian"):oe==="hoverclosest"?(j("hoverClosestCartesian"),j("hoverClosestGeo"),j("hoverClosest3d"),j("hoverClosestGl2d"),j("hoverClosestPie")):oe==="v1hovermode"&&(j("toggleHover"),j("hoverClosestCartesian"),j("hoverCompareCartesian"),j("hoverClosestGeo"),j("hoverClosest3d"),j("hoverClosestGl2d"),j("hoverClosestPie"))):K.push(oe)}T=K}return Y(Q),Y(te.concat(ce)),Y(Z),c(U,T)}function s(g){for(var f=m.list({_fullLayout:g},null,!0),w=0;w<f.length;w++)if(!f[w].fixedrange)return!1;return!0}function n(g){for(var f=!1,w=0;w<g.length&&!f;w++){var h=g[w];!h._module||!h._module.selectPoints||(i.traceIs(h,"scatter-like")?(P.hasMarkers(h)||P.hasText(h))&&(f=!0):i.traceIs(h,"box-violin")?(h.boxpoints==="all"||h.points==="all")&&(f=!0):f=!0)}return f}function l(g){for(var f=0;f<g.length;f++)if(!i.traceIs(g[f],"noHover"))return!1;return!0}function c(g,f){if(f.length)if(Array.isArray(f[0]))for(var w=0;w<f.length;w++)g.push(f[w]);else g.push(f);return g}function u(g){for(var f=t([],g),w=0;w<f.length;w++)for(var h=f[w],o=0;o<h.length;o++){var d=h[o];if(typeof d=="string")if(v[d]!==void 0)f[w][o]=v[d];else throw new Error(["*modeBarButtons* configuration options","invalid button name"].join(" "))}return f}},37676:function(G,V,e){var m=e(39898),P=e(92770),i=e(71828),L=e(24255),A=e(11506).version,v=new DOMParser;function p(n){this.container=n.container,this.element=document.createElement("div"),this.update(n.graphInfo,n.buttons),this.container.appendChild(this.element)}var t=p.prototype;t.update=function(n,l){this.graphInfo=n;var c=this.graphInfo._context,u=this.graphInfo._fullLayout,g="modebar-"+u._uid;this.element.setAttribute("id",g),this._uid=g,this.element.className="modebar",c.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),u.modebar.orientation==="v"&&(this.element.className+=" vertical",l=l.reverse());var f=u.modebar,w=c.displayModeBar==="hover"?".js-plotly-plot .plotly:hover ":"";i.deleteRelatedStyleRule(g),i.addRelatedStyleRule(g,w+"#"+g+" .modebar-group","background-color: "+f.bgcolor),i.addRelatedStyleRule(g,"#"+g+" .modebar-btn .icon path","fill: "+f.color),i.addRelatedStyleRule(g,"#"+g+" .modebar-btn:hover .icon path","fill: "+f.activecolor),i.addRelatedStyleRule(g,"#"+g+" .modebar-btn.active .icon path","fill: "+f.activecolor);var h=!this.hasButtons(l),o=this.hasLogo!==c.displaylogo,d=this.locale!==c.locale;if(this.locale=c.locale,(h||o||d)&&(this.removeAllButtons(),this.updateButtons(l),c.watermark||c.displaylogo)){var M=this.getLogo();c.watermark&&(M.className=M.className+" watermark"),u.modebar.orientation==="v"?this.element.insertBefore(M,this.element.childNodes[0]):this.element.appendChild(M),this.hasLogo=!0}this.updateActiveButton()},t.updateButtons=function(n){var l=this;this.buttons=n,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(c){var u=l.createGroup();c.forEach(function(g){var f=g.name;if(!f)throw new Error("must provide button 'name' in button config");if(l.buttonsNames.indexOf(f)!==-1)throw new Error("button name '"+f+"' is taken");l.buttonsNames.push(f);var w=l.createButton(g);l.buttonElements.push(w),u.appendChild(w)}),l.element.appendChild(u)})},t.createGroup=function(){var n=document.createElement("div");return n.className="modebar-group",n},t.createButton=function(n){var l=this,c=document.createElement("a");c.setAttribute("rel","tooltip"),c.className="modebar-btn";var u=n.title;u===void 0?u=n.name:typeof u=="function"&&(u=u(this.graphInfo)),(u||u===0)&&c.setAttribute("data-title",u),n.attr!==void 0&&c.setAttribute("data-attr",n.attr);var g=n.val;g!==void 0&&(typeof g=="function"&&(g=g(this.graphInfo)),c.setAttribute("data-val",g));var f=n.click;if(typeof f!="function")throw new Error("must provide button 'click' function in button config");c.addEventListener("click",function(h){n.click(l.graphInfo,h),l.updateActiveButton(h.currentTarget)}),c.setAttribute("data-toggle",n.toggle||!1),n.toggle&&m.select(c).classed("active",!0);var w=n.icon;return typeof w=="function"?c.appendChild(w()):c.appendChild(this.createIcon(w||L.question)),c.setAttribute("data-gravity",n.gravity||"n"),c},t.createIcon=function(n){var l=P(n.height)?Number(n.height):n.ascent-n.descent,c="http://www.w3.org/2000/svg",u;if(n.path){u=document.createElementNS(c,"svg"),u.setAttribute("viewBox",[0,0,n.width,l].join(" ")),u.setAttribute("class","icon");var g=document.createElementNS(c,"path");g.setAttribute("d",n.path),n.transform?g.setAttribute("transform",n.transform):n.ascent!==void 0&&g.setAttribute("transform","matrix(1 0 0 -1 0 "+n.ascent+")"),u.appendChild(g)}if(n.svg){var f=v.parseFromString(n.svg,"application/xml");u=f.childNodes[0]}return u.setAttribute("height","1em"),u.setAttribute("width","1em"),u},t.updateActiveButton=function(n){var l=this.graphInfo._fullLayout,c=n!==void 0?n.getAttribute("data-attr"):null;this.buttonElements.forEach(function(u){var g=u.getAttribute("data-val")||!0,f=u.getAttribute("data-attr"),w=u.getAttribute("data-toggle")==="true",h=m.select(u);if(w)f===c&&h.classed("active",!h.classed("active"));else{var o=f===null?f:i.nestedProperty(l,f).get();h.classed("active",o===g)}})},t.hasButtons=function(n){var l=this.buttons;if(!l||n.length!==l.length)return!1;for(var c=0;c<n.length;++c){if(n[c].length!==l[c].length)return!1;for(var u=0;u<n[c].length;u++)if(n[c][u].name!==l[c][u].name)return!1}return!0};function r(n){return n+" (v"+A+")"}t.getLogo=function(){var n=this.createGroup(),l=document.createElement("a");return l.href="https://plotly.com/",l.target="_blank",l.setAttribute("data-title",r(i._(this.graphInfo,"Produced with Plotly.js"))),l.className="modebar-btn plotlyjsicon modebar-btn--logo",l.appendChild(this.createIcon(L.newplotlylogo)),n.appendChild(l),n},t.removeAllButtons=function(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.hasLogo=!1},t.destroy=function(){i.removeElement(this.container.querySelector(".modebar")),i.deleteRelatedStyleRule(this._uid)};function s(n,l){var c=n._fullLayout,u=new p({graphInfo:n,container:c._modebardiv.node(),buttons:l});return c._privateplot&&m.select(u.element).append("span").classed("badge-private float--left",!0).text("PRIVATE"),u}G.exports=s},37113:function(G,V,e){var m=e(41940),P=e(22399),i=e(44467).templatedArray,L=i("button",{visible:{valType:"boolean",dflt:!0,editType:"plot"},step:{valType:"enumerated",values:["month","year","day","hour","minute","second","all"],dflt:"month",editType:"plot"},stepmode:{valType:"enumerated",values:["backward","todate"],dflt:"backward",editType:"plot"},count:{valType:"number",min:0,dflt:1,editType:"plot"},label:{valType:"string",editType:"plot"},editType:"plot"});G.exports={visible:{valType:"boolean",editType:"plot"},buttons:L,x:{valType:"number",min:-2,max:3,editType:"plot"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"plot"},y:{valType:"number",min:-2,max:3,editType:"plot"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"bottom",editType:"plot"},font:m({editType:"plot"}),bgcolor:{valType:"color",dflt:P.lightLine,editType:"plot"},activecolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:P.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"}},89573:function(G){G.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}},28674:function(G,V,e){var m=e(71828),P=e(7901),i=e(44467),L=e(85501),A=e(37113),v=e(89573);G.exports=function(s,n,l,c,u){var g=s.rangeselector||{},f=i.newContainer(n,"rangeselector");function w(T,C){return m.coerce(g,f,A,T,C)}var h=L(g,f,{name:"buttons",handleItemDefaults:p,calendar:u}),o=w("visible",h.length>0);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<l.length;u++){var g=s[l[u]].domain;g&&(c=Math.max(g[1],c))}return[r.domain[0],c+v.yPad]}},21598:function(G,V,e){var m=e(39898),P=e(73972),i=e(74875),L=e(7901),A=e(91424),v=e(71828),p=v.strTranslate,t=e(63893),r=e(41675),s=e(18783),n=s.LINE_SPACING,l=s.FROM_TL,c=s.FROM_BR,u=e(89573),g=e(70565);G.exports=function(S){var b=S._fullLayout,a=b._infolayer.selectAll(".rangeselector").data(f(S),w);a.enter().append("g").classed("rangeselector",!0),a.exit().remove(),a.style({cursor:"pointer","pointer-events":"all"}),a.each(function(E){var y=m.select(this),z=E,I=z.rangeselector,B=y.selectAll("g.button").data(v.filterVisible(I.buttons));B.enter().append("g").classed("button",!0),B.exit().remove(),B.each(function(k){var O=m.select(this),N=g(z,k);k._isActive=h(z,k,N),O.call(o,I,k),O.call(M,I,k,S),O.on("click",function(){S._dragged||P.call("_guiRelayout",S,N)}),O.on("mouseover",function(){k._isHovered=!0,O.call(o,I,k)}),O.on("mouseout",function(){k._isHovered=!1,O.call(o,I,k)})}),C(S,B,I,z._name,y)})};function f(x){for(var S=r.list(x,"x",!0),b=[],a=0;a<S.length;a++){var E=S[a];E.rangeselector&&E.rangeselector.visible&&b.push(E)}return b}function w(x){return x._id}function h(x,S,b){if(S.step==="all")return x.autorange===!0;var a=Object.keys(b);return x.range[0]===b[a[0]]&&x.range[1]===b[a[1]]}function o(x,S,b){var a=v.ensureSingle(x,"rect","selector-rect",function(E){E.attr("shape-rendering","crispEdges")});a.attr({rx:u.rx,ry:u.ry}),a.call(L.stroke,S.bordercolor).call(L.fill,d(S,b)).style("stroke-width",S.borderwidth+"px")}function d(x,S){return S._isActive||S._isHovered?x.activecolor:x.bgcolor}function M(x,S,b,a){function E(z){t.convertToTspans(z,a)}var y=v.ensureSingle(x,"text","selector-text",function(z){z.attr("text-anchor","middle")});y.call(A.font,S.font).text(T(b,a._fullLayout._meta)).call(E)}function T(x,S){return x.label?S?v.templateString(x.label,S):x.label:x.step==="all"?"all":x.count+x.step.charAt(0)}function C(x,S,b,a,E){var y=0,z=0,I=b.borderwidth;S.each(function(){var U=m.select(this),Y=U.select(".selector-text"),J=b.font.size*n,te=Math.max(J*t.lineCount(Y),16)+3;z=Math.max(z,te)}),S.each(function(){var U=m.select(this),Y=U.select(".selector-rect"),J=U.select(".selector-text"),te=J.node()&&A.bBox(J.node()).width,ae=b.font.size*n,ce=t.lineCount(J),Q=Math.max(te+10,u.minButtonWidth);U.attr("transform",p(I+y,I)),Y.attr({x:0,y:0,width:Q,height:z}),t.positionText(J,Q/2,z/2-(ce-1)*ae/2+3),y+=Q+5});var B=x._fullLayout._size,k=B.l+B.w*b.x,O=B.t+B.h*(1-b.y),N="left";v.isRightAnchor(b)&&(k-=y,N="right"),v.isCenterAnchor(b)&&(k-=y/2,N="center");var _="top";v.isBottomAnchor(b)&&(O-=z,_="bottom"),v.isMiddleAnchor(b)&&(O-=z/2,_="middle"),y=Math.ceil(y),z=Math.ceil(z),k=Math.round(k),O=Math.round(O),i.autoMargin(x,a+"-range-selector",{x:b.x,y:b.y,l:y*l[N],r:y*c[N],b:z*c[_],t:z*l[_]}),E.attr("transform",p(k,O))}},70565:function(G,V,e){var m=e(81041),P=e(71828).titleCase;G.exports=function(A,v){var p=A._name,t={};if(v.step==="all")t[p+".autorange"]=!0;else{var r=i(A,v);t[p+".range[0]"]=r[0],t[p+".range[1]"]=r[1]}return t};function i(L,A){var v=L.range,p=new Date(L.r2l(v[1])),t=A.step,r=m["utc"+P(t)],s=A.count,n;switch(A.stepmode){case"backward":n=L.l2r(+r.offset(p,-s));break;case"todate":var l=r.offset(p,-s);n=L.l2r(+r.ceil(l));break}var c=v[1];return[n,c]}},97218:function(G,V,e){G.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:e(37113)}}},layoutAttributes:e(37113),handleDefaults:e(28674),draw:e(21598)}},75148:function(G,V,e){var m=e(22399);G.exports={bgcolor:{valType:"color",dflt:m.background,editType:"plot"},bordercolor:{valType:"color",dflt:m.defaultLine,editType:"plot"},borderwidth:{valType:"integer",dflt:0,min:0,editType:"plot"},autorange:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},range:{valType:"info_array",items:[{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}}],editType:"calc",impliedEdits:{autorange:!1}},thickness:{valType:"number",dflt:.15,min:0,max:1,editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"}},88443:function(G,V,e){var m=e(41675).list,P=e(71739).getAutoRange,i=e(73251);G.exports=function(A){for(var v=m(A,"x",!0),p=0;p<v.length;p++){var t=v[p],r=t[i.name];r&&r.visible&&r.autorange&&(r._input.autorange=!0,r._input.range=r.range=P(A,t))}}},73251:function(G){G.exports={name:"rangeslider",containerClassName:"rangeslider-container",bgClassName:"rangeslider-bg",rangePlotClassName:"rangeslider-rangeplot",maskMinClassName:"rangeslider-mask-min",maskMaxClassName:"rangeslider-mask-max",slideBoxClassName:"rangeslider-slidebox",grabberMinClassName:"rangeslider-grabber-min",grabAreaMinClassName:"rangeslider-grabarea-min",handleMinClassName:"rangeslider-handle-min",grabberMaxClassName:"rangeslider-grabber-max",grabAreaMaxClassName:"rangeslider-grabarea-max",handleMaxClassName:"rangeslider-handle-max",maskMinOppAxisClassName:"rangeslider-mask-min-opp-axis",maskMaxOppAxisClassName:"rangeslider-mask-max-opp-axis",maskColor:"rgba(0,0,0,0.4)",maskOppAxisColor:"rgba(0,0,0,0.2)",slideBoxFill:"transparent",slideBoxCursor:"ew-resize",grabAreaFill:"transparent",grabAreaCursor:"col-resize",grabAreaWidth:10,handleWidth:4,handleRadius:1,handleStrokeWidth:1,extraPad:15}},26377:function(G,V,e){var m=e(71828),P=e(44467),i=e(41675),L=e(75148),A=e(47850);G.exports=function(p,t,r){var s=p[r],n=t[r];if(!(s.rangeslider||t._requestRangeslider[n._id]))return;m.isPlainObject(s.rangeslider)||(s.rangeslider={});var l=s.rangeslider,c=P.newContainer(n,"rangeslider");function u(a,E){return m.coerce(l,c,L,a,E)}var g,f;function w(a,E){return m.coerce(g,f,A,a,E)}var h=u("visible");if(h){u("bgcolor",t.plot_bgcolor),u("bordercolor"),u("borderwidth"),u("thickness"),u("autorange",!n.isValidRange(l.range)),u("range");var o=t._subplots;if(o)for(var d=o.cartesian.filter(function(a){return a.substr(0,a.indexOf("y"))===i.name2id(r)}).map(function(a){return a.substr(a.indexOf("y"),a.length)}),M=m.simpleMap(d,i.id2name),T=0;T<M.length;T++){var C=M[T];g=l[C]||{},f=P.newContainer(c,C,"yaxis");var x=t[C],S;g.range&&x.isValidRange(g.range)&&(S="fixed");var b=w("rangemode",S);b!=="match"&&w("range",x.range.slice())}c._input=l}}},72413:function(G,V,e){var m=e(39898),P=e(73972),i=e(74875),L=e(71828),A=L.strTranslate,v=e(91424),p=e(7901),t=e(92998),r=e(93612),s=e(41675),n=e(28569),l=e(6964),c=e(73251);G.exports=function(x){for(var S=x._fullLayout,b=S._rangeSliderData,a=0;a<b.length;a++){var E=b[a][c.name];E._clipId=E._id+"-"+S._uid}function y(I){return I._name}var z=S._infolayer.selectAll("g."+c.containerClassName).data(b,y);z.exit().each(function(I){var B=I[c.name];S._topdefs.select("#"+B._clipId).remove()}).remove(),b.length!==0&&(z.enter().append("g").classed(c.containerClassName,!0).attr("pointer-events","all"),z.each(function(I){var B=m.select(this),k=I[c.name],O=S[s.id2name(I.anchor)],N=k[s.id2name(I.anchor)];if(k.range){var _=L.simpleMap(k.range,I.r2l),U=L.simpleMap(I.range,I.r2l),Y;U[0]<U[1]?Y=[Math.min(_[0],U[0]),Math.max(_[1],U[1])]:Y=[Math.max(_[0],U[0]),Math.min(_[1],U[1])],k.range=k._input.range=L.simpleMap(Y,I.l2r)}I.cleanRange("rangeslider.range");var J=S._size,te=I.domain;k._width=J.w*(te[1]-te[0]);var ae=Math.round(J.l+J.w*te[0]),ce=Math.round(J.t+J.h*(1-I._counterDomainMin)+(I.side==="bottom"?I._depth:0)+k._offsetShift+c.extraPad);B.attr("transform",A(ae,ce)),k._rl=L.simpleMap(k.range,I.r2l);var Q=k._rl[0],Z=k._rl[1],j=Z-Q;if(k.p2d=function(Me){return Me/k._width*j+Q},k.d2p=function(Me){return(Me-Q)/j*k._width},I.rangebreaks){var K=I.locateBreaks(Q,Z);if(K.length){var ee,oe,q=0;for(ee=0;ee<K.length;ee++)oe=K[ee],q+=oe.max-oe.min;var $=k._width/(Z-Q-q),le=[-$*Q];for(ee=0;ee<K.length;ee++)oe=K[ee],le.push(le[le.length-1]-$*(oe.max-oe.min));for(k.d2p=function(Me){for(var Te=le[0],Oe=0;Oe<K.length;Oe++){var Ne=K[Oe];if(Me>=Ne.max)Te=le[Oe+1];else if(Me<Ne.min)break}return Te+$*Me},ee=0;ee<K.length;ee++)oe=K[ee],oe.pmin=k.d2p(oe.min),oe.pmax=k.d2p(oe.max);k.p2d=function(Me){for(var Te=le[0],Oe=0;Oe<K.length;Oe++){var Ne=K[Oe];if(Me>=Ne.pmax)Te=le[Oe+1];else if(Me<Ne.pmin)break}return(Me-Te)/$}}}if(N.rangemode!=="match"){var ie=O.r2l(N.range[0]),he=O.r2l(N.range[1]),me=he-ie;k.d2pOppAxis=function(Me){return(Me-ie)/me*k._height}}B.call(w,x,I,k).call(h,x,I,k).call(o,x,I,k).call(M,x,I,k,N).call(T,x,I,k).call(C,x,I,k),u(B,x,I,k),f(B,x,I,k,O,N),I.side==="bottom"&&t.draw(x,I._id+"title",{propContainer:I,propName:I._name+".title",placeholder:S._dfltTitle.x,attributes:{x:I._offset+I._length/2,y:ce+k._height+k._offsetShift+10+1.5*I.title.font.size,"text-anchor":"middle"}})}))};function u(x,S,b,a){if(S._context.staticPlot)return;var E=x.select("rect."+c.slideBoxClassName).node(),y=x.select("rect."+c.grabAreaMinClassName).node(),z=x.select("rect."+c.grabAreaMaxClassName).node();function I(){var B=m.event,k=B.target,O=B.clientX||B.touches[0].clientX,N=O-x.node().getBoundingClientRect().left,_=a.d2p(b._rl[0]),U=a.d2p(b._rl[1]),Y=n.coverSlip();this.addEventListener("touchmove",J),this.addEventListener("touchend",te),Y.addEventListener("mousemove",J),Y.addEventListener("mouseup",te);function J(ae){var ce=ae.clientX||ae.touches[0].clientX,Q=+ce-O,Z,j,K;switch(k){case E:if(K="ew-resize",_+Q>b._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<Z){var ee=j;j=Z,Z=ee}a._pixelMin=Z,a._pixelMax=j,l(m.select(Y),K),g(x,S,b,a)}function te(){Y.removeEventListener("mousemove",J),Y.removeEventListener("mouseup",te),this.removeEventListener("touchmove",J),this.removeEventListener("touchend",te),L.removeElement(Y)}}x.on("mousedown",I),x.on("touchstart",I)}function g(x,S,b,a){function E(I){return b.l2r(L.constrain(I,a._rl[0],a._rl[1]))}var y=E(a.p2d(a._pixelMin)),z=E(a.p2d(a._pixelMax));window.requestAnimationFrame(function(){P.call("_guiRelayout",S,b._name+".range",[y,z])})}function f(x,S,b,a,E,y){var z=c.handleWidth/2;function I(ae){return L.constrain(ae,0,a._width)}function B(ae){return L.constrain(ae,0,a._height)}function k(ae){return L.constrain(ae,-z,a._width+z)}var O=I(a.d2p(b._rl[0])),N=I(a.d2p(b._rl[1]));if(x.select("rect."+c.slideBoxClassName).attr("x",O).attr("width",N-O),x.select("rect."+c.maskMinClassName).attr("width",O),x.select("rect."+c.maskMaxClassName).attr("x",N).attr("width",a._width-N),y.rangemode!=="match"){var _=a._height-B(a.d2pOppAxis(E._rl[1])),U=a._height-B(a.d2pOppAxis(E._rl[0]));x.select("rect."+c.maskMinOppAxisClassName).attr("x",O).attr("height",_).attr("width",N-O),x.select("rect."+c.maskMaxOppAxisClassName).attr("x",O).attr("y",U).attr("height",a._height-U).attr("width",N-O),x.select("rect."+c.slideBoxClassName).attr("y",_).attr("height",U-_)}var Y=.5,J=Math.round(k(O-z))-Y,te=Math.round(k(N-z))+Y;x.select("g."+c.grabberMinClassName).attr("transform",A(J,Y)),x.select("g."+c.grabberMaxClassName).attr("transform",A(te,Y))}function w(x,S,b,a){var E=L.ensureSingle(x,"rect",c.bgClassName,function(B){B.attr({x:0,y:0,"shape-rendering":"crispEdges"})}),y=a.borderwidth%2===0?a.borderwidth:a.borderwidth-1,z=-a._offsetShift,I=v.crispRound(S,a.borderwidth);E.attr({width:a._width+y,height:a._height+y,transform:A(z,z),"stroke-width":I}).call(p.stroke,a.bordercolor).call(p.fill,a.bgcolor)}function h(x,S,b,a){var E=S._fullLayout,y=L.ensureSingleById(E._topdefs,"clipPath",a._clipId,function(z){z.append("rect").attr({x:0,y:0})});y.select("rect").attr({width:a._width,height:a._height})}function o(x,S,b,a){var E=S.calcdata,y=x.selectAll("g."+c.rangePlotClassName).data(b._subplotsWith,L.identity);y.enter().append("g").attr("class",function(I){return c.rangePlotClassName+" "+I}).call(v.setClipUrl,a._clipId,S),y.order(),y.exit().remove();var z;y.each(function(I,B){var k=m.select(this),O=B===0,N=s.getFromId(S,I,"y"),_=N._name,U=a[_],Y={data:[],layout:{xaxis:{type:b.type,domain:[0,1],range:a.range.slice(),calendar:b.calendar},width:a._width,height:a._height,margin:{t:0,b:0,l:0,r:0}},_context:S._context};b.rangebreaks&&(Y.layout.xaxis.rangebreaks=b.rangebreaks),Y.layout[_]={type:N.type,domain:[0,1],range:U.rangemode!=="match"?U.range.slice():N.range.slice(),calendar:N.calendar},N.rangebreaks&&(Y.layout[_].rangebreaks=N.rangebreaks),i.supplyDefaults(Y);var J=Y._fullLayout.xaxis,te=Y._fullLayout[_];J.clearCalc(),J.setScale(),te.clearCalc(),te.setScale();var ae={id:I,plotgroup:k,xaxis:J,yaxis:te,isRangePlot:!0};O?z=ae:(ae.mainplot="xy",ae.mainplotinfo=z),r.rangePlot(S,ae,d(E,I))})}function d(x,S){for(var b=[],a=0;a<x.length;a++){var E=x[a],y=E[0].trace;y.xaxis+y.yaxis===S&&b.push(E)}return b}function M(x,S,b,a,E){var y=L.ensureSingle(x,"rect",c.maskMinClassName,function(k){k.attr({x:0,y:0,"shape-rendering":"crispEdges"})});y.attr("height",a._height).call(p.fill,c.maskColor);var z=L.ensureSingle(x,"rect",c.maskMaxClassName,function(k){k.attr({y:0,"shape-rendering":"crispEdges"})});if(z.attr("height",a._height).call(p.fill,c.maskColor),E.rangemode!=="match"){var I=L.ensureSingle(x,"rect",c.maskMinOppAxisClassName,function(k){k.attr({y:0,"shape-rendering":"crispEdges"})});I.attr("width",a._width).call(p.fill,c.maskOppAxisColor);var B=L.ensureSingle(x,"rect",c.maskMaxOppAxisClassName,function(k){k.attr({y:0,"shape-rendering":"crispEdges"})});B.attr("width",a._width).style("border-top",c.maskOppBorder).call(p.fill,c.maskOppAxisColor)}}function T(x,S,b,a){if(!S._context.staticPlot){var E=L.ensureSingle(x,"rect",c.slideBoxClassName,function(y){y.attr({y:0,cursor:c.slideBoxCursor,"shape-rendering":"crispEdges"})});E.attr({height:a._height,fill:c.slideBoxFill})}}function C(x,S,b,a){var E=L.ensureSingle(x,"g",c.grabberMinClassName),y=L.ensureSingle(x,"g",c.grabberMaxClassName),z={x:0,width:c.handleWidth,rx:c.handleRadius,fill:p.background,stroke:p.defaultLine,"stroke-width":c.handleStrokeWidth,"shape-rendering":"crispEdges"},I={y:Math.round(a._height/4),height:Math.round(a._height/2)},B=L.ensureSingle(E,"rect",c.handleMinClassName,function(U){U.attr(z)});B.attr(I);var k=L.ensureSingle(y,"rect",c.handleMaxClassName,function(U){U.attr(z)});k.attr(I);var O={width:c.grabAreaWidth,x:0,y:0,fill:c.grabAreaFill,cursor:S._context.staticPlot?void 0:c.grabAreaCursor},N=L.ensureSingle(E,"rect",c.grabAreaMinClassName,function(U){U.attr(O)});N.attr("height",a._height);var _=L.ensureSingle(y,"rect",c.grabAreaMaxClassName,function(U){U.attr(O)});_.attr("height",a._height)}},549:function(G,V,e){var m=e(41675),P=e(63893),i=e(73251),L=e(18783).LINE_SPACING,A=i.name;function v(p){var t=p&&p[A];return t&&t.visible}V.isVisible=v,V.makeData=function(p){var t=m.list({_fullLayout:p},"x",!0),r=p.margin,s=[];if(!p._has("gl2d"))for(var n=0;n<t.length;n++){var l=t[n];if(v(l)){s.push(l);var c=l[A];c._id=A+l._id,c._height=(p.height-r.b-r.t)*c.thickness,c._offsetShift=Math.floor(c.borderwidth/2)}}p._rangeSliderData=s},V.autoMarginOpts=function(p,t){var r=p._fullLayout,s=t[A],n=t._id.charAt(0),l=0,c=0;if(t.side==="bottom"&&(l=t._depth,t.title.text!==r._dfltTitle[n])){c=1.5*t.title.font.size+10+s._offsetShift;var u=(t.title.text.match(P.BR_TAG_ALL)||[]).length;c+=u*t.title.font.size*L}return{x:0,y:t._counterDomainMin,l:0,r:0,t:0,b:s._height+l+Math.max(r.margin.b,c),pad:i.extraPad+s._offsetShift*2}}},13137:function(G,V,e){var m=e(71828),P=e(75148),i=e(47850),L=e(549);G.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:m.extendFlat({},P,{yaxis:i})}}},layoutAttributes:e(75148),handleDefaults:e(26377),calcAutorange:e(88443),draw:e(72413),isVisible:L.isVisible,makeData:L.makeData,autoMarginOpts:L.autoMarginOpts}},47850:function(G){G.exports={_isSubplotObj:!0,rangemode:{valType:"enumerated",values:["auto","fixed","match"],dflt:"match",editType:"calc"},range:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},editType:"calc"}},8389:function(G,V,e){var m=e(50215),P=e(82196).line,i=e(79952).P,L=e(1426).extendFlat,A=e(30962).overrideAll,v=e(44467).templatedArray;e(24695),G.exports=A(v("selection",{type:{valType:"enumerated",values:["rect","path"]},xref:L({},m.xref,{}),yref:L({},m.yref,{}),x0:{valType:"any"},x1:{valType:"any"},y0:{valType:"any"},y1:{valType:"any"},path:{valType:"string",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:.7,editType:"arraydraw"},line:{color:P.color,width:L({},P.width,{min:1,dflt:1}),dash:L({},i,{dflt:"dot"})}}),"arraydraw","from-root")},34122:function(G){G.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}},59402:function(G,V,e){var m=e(71828),P=e(89298),i=e(85501),L=e(8389),A=e(30477);G.exports=function(t,r){i(t,r,{name:"selections",handleItemDefaults:v});for(var s=r.selections,n=0;n<s.length;n++){var l=s[n];l&&l.path===void 0&&(l.x0===void 0||l.x1===void 0||l.y0===void 0||l.y1===void 0)&&(r.selections[n]=null)}};function v(p,t,r){function s(y,z){return m.coerce(p,t,L,y,z)}var n=s("path"),l=n?"path":"rect",c=s("type",l),u=c!=="path";u&&delete t.path,s("opacity"),s("line.color"),s("line.width"),s("line.dash");for(var g=["x","y"],f=0;f<2;f++){var w=g[f],h={_fullLayout:r},o,d,M,T=P.coerceRef(p,t,h,w);if(o=P.getFromId(h,T),o._selectionIndices.push(t._index),M=A.rangeToShapePosition(o),d=A.shapePositionToRange(o),u){var C=w+"0",x=w+"1",S=p[C],b=p[x];p[C]=d(p[C],!0),p[x]=d(p[x],!0),P.coercePosition(t,h,s,T,C),P.coercePosition(t,h,s,T,x);var a=t[C],E=t[x];a!==void 0&&E!==void 0&&(t[C]=M(a),t[x]=M(E),p[C]=S,p[x]=b)}}u&&m.noneOrAll(p,t,["x0","x1","y0","y1"])}},32485:function(G,V,e){var m=e(60165).readPaths,P=e(42359),i=e(51873).clearOutlineControllers,L=e(7901),A=e(91424),v=e(44467).arrayEditor,p=e(30477),t=p.getPathString;G.exports={draw:r,drawOne:n,activateLastSelection:u};function r(f){var w=f._fullLayout;i(f),w._selectionLayer.selectAll("path").remove();for(var h in w._plots){var o=w._plots[h].selectionLayer;o&&o.selectAll("path").remove()}for(var d=0;d<w.selections.length;d++)n(f,d)}function s(f){return f._context.editSelection}function n(f,w){f._fullLayout._paperdiv.selectAll('.selectionlayer [data-index="'+w+'"]').remove();var h=p.makeSelectionsOptionsAndPlotinfo(f,w),o=h.options,d=h.plotinfo;if(!o._input)return;M(f._fullLayout._selectionLayer);function M(T){var C=t(f,o),x={"data-index":w,"fill-rule":"evenodd",d:C},S=o.opacity,b="rgba(0,0,0,0)",a=o.line.color||L.contrast(f._fullLayout.plot_bgcolor),E=o.line.width,y=o.line.dash;E||(E=5,y="solid");var z=s(f)&&f._fullLayout._activeSelectionIndex===w;z&&(b=f._fullLayout.activeselection.fillcolor,S=f._fullLayout.activeselection.opacity);for(var I=[],B=1;B>=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<M.length)switch(u._fullLayout.selections[T].type){case"rect":d="select";break;case"path":d="lasso";break}}var C=v(c,u,f,o),x={xref:w._id,yref:h._id,opacity:g.opacity,line:{color:g.line.color,width:g.line.width,dash:g.line.dash}},S;C.length===1&&(S=C[0]),S&&S.length===5&&d==="select"?(x.type="rect",x.x0=S[0][1],x.y0=S[0][2],x.x1=S[2][1],x.y1=S[2][2]):(x.type="path",w&&h&&t(C,w,h),x.path=p(C),S=null),L(u);for(var b=n.editHelpers,a=(b||{}).modifyItem,E=[],y=0;y<M.length;y++){var z=u._fullLayout.selections[y];if(!z){E[y]=z;continue}if(E[y]=z._input,o!==void 0&&y===u._fullLayout._activeSelectionIndex){var I=x;switch(z.type){case"rect":a("x0",I.x0),a("x1",I.x1),a("y0",I.y0),a("y1",I.y1);break;case"path":a("path",I.path);break}}}return o===void 0?(E.push(x),E):b?b.getUpdateObj():{}}}}},75549:function(G,V,e){var m=e(71828).strTranslate;function P(v,p){switch(v.type){case"log":return v.p2d(p);case"date":return v.p2r(p,0,v.calendar);default:return v.p2r(p)}}function i(v,p){switch(v.type){case"log":return v.d2p(p);case"date":return v.r2p(p,0,v.calendar);default:return v.r2p(p)}}function L(v){var p=v._id.charAt(0)==="y"?1:0;return function(t){return P(v,t[p])}}function A(v){return m(v.xaxis._offset,v.yaxis._offset)}G.exports={p2r:P,r2p:i,axValue:L,getTransform:A}},47322:function(G,V,e){var m=e(32485),P=e(3937);G.exports={moduleType:"component",name:"selections",layoutAttributes:e(8389),supplyLayoutDefaults:e(59402),supplyDrawNewSelectionDefaults:e(90849),includeBasePlot:e(76325)("selections"),draw:m.draw,drawOne:m.drawOne,reselect:P.reselect,prepSelect:P.prepSelect,clearOutline:P.clearOutline,clearSelectionsCache:P.clearSelectionsCache,selectOnClick:P.selectOnClick}},3937:function(G,V,e){var m=e(52142),P=e(38258),i=e(73972),L=e(91424).dashStyle,A=e(7901),v=e(30211),p=e(23469).makeEventData,t=e(64505),r=t.freeMode,s=t.rectMode,n=t.drawMode,l=t.openMode,c=t.selectMode,u=e(30477),g=e(21459),f=e(42359),w=e(51873).clearOutline,h=e(60165),o=h.handleEllipse,d=h.readPaths,M=e(90551).newShapes,T=e(35855),C=e(32485).activateLastSelection,x=e(71828),S=x.sorterAsc,b=e(61082),a=e(79990),E=e(41675).getFromId,y=e(33306),z=e(61549).redrawReglTraces,I=e(34122),B=I.MINSELECT,k=b.filter,O=b.tester,N=e(75549),_=N.p2r,U=N.axValue,Y=N.getTransform;function J(ze){return ze.subplot!==void 0}function te(ze,Pe,be,se,ye){var Le=!J(se),Be=r(ye),ot=s(ye),at=l(ye),wt=n(ye),It=c(ye),Bt=ye==="drawline",Gt=ye==="drawcircle",Lt=Bt||Gt,Kt=se.gd,ir=Kt._fullLayout,_r=It&&ir.newselection.mode==="immediate"&&Le,yt=ir._zoomlayer,jt=se.element.getBoundingClientRect(),Yt=se.plotinfo,br=Y(Yt),hr=Pe-jt.left,ut=be-jt.top;ir._calcInverseTransform(Kt);var lt=x.apply3DTransform(ir._invTransform)(hr,ut);hr=lt[0],ut=lt[1];var xt=ir._invScaleX,Tt=ir._invScaleY,Ct=hr,St=ut,_t="M"+hr+","+ut,Ht=se.xaxes[0],$t=se.yaxes[0],Qt=Ht._length,or=$t._length,Er=ze.altKey&&!(n(ye)&&at),Ye,We,Dt,Ft,Zt,nr,lr;K(ze,Kt,se),Be&&(Ye=k([[hr,ut]],I.BENDPX));var rr=yt.selectAll("path.select-outline-"+Yt.id).data([1]),zt=wt?ir.newshape:ir.newselection;wt&&(se.hasText=zt.label.text||zt.label.texttemplate);var fr=wt&&!at?zt.fillcolor:"rgba(0,0,0,0)",dr=zt.line.color||(Le?A.contrast(Kt._fullLayout.plot_bgcolor):"#7f7f7f");rr.enter().append("path").attr("class","select-outline select-outline-"+Yt.id).style({opacity:wt?zt.opacity/2:1,"stroke-dasharray":L(zt.line.dash,zt.line.width),"stroke-width":zt.line.width+"px","shape-rendering":"crispEdges"}).call(A.stroke,dr).call(A.fill,fr).attr("fill-rule","evenodd").classed("cursor-move",!!wt).attr("transform",br).attr("d",_t+"Z");var pr=yt.append("path").attr("class","zoombox-corners").style({fill:A.background,stroke:A.defaultLine,"stroke-width":1}).attr("transform",br).attr("d","M0,0Z");if(wt&&se.hasText){var vr=yt.select(".label-temp");vr.empty()&&(vr=yt.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var Hr=ir._uid+I.SELECTID,Ir=[],kr=le(Kt,se.xaxes,se.yaxes,se.subplot);_r&&!ze.shiftKey&&(se._clearSubplotSelections=function(){if(Le){var jr=Ht._id,In=$t._id;qe(Kt,jr,In,kr);for(var Dn=(Kt.layout||{}).selections||[],xr=[],Ar=!1,Or=0;Or<Dn.length;Or++){var Nr=ir.selections[Or];Nr.xref!==jr||Nr.yref!==In?xr.push(Dn[Or]):Ar=!0}Ar&&(Kt._fullLayout._noEmitSelectedAtStart=!0,i.call("_guiRelayout",Kt,{selections:xr}))}});var pn=Vt(se);se.moveFn=function(jr,In){se._clearSubplotSelections&&(se._clearSubplotSelections(),se._clearSubplotSelections=void 0),Ct=Math.max(0,Math.min(Qt,xt*jr+hr)),St=Math.max(0,Math.min(or,Tt*In+ut));var Dn=Math.abs(Ct-hr),xr=Math.abs(St-ut);if(ot){var Ar,Or,Nr;if(It){var qr=ir.selectdirection;switch(qr==="any"?xr<Math.min(Dn*.6,B)?Ar="h":Dn<Math.min(xr*.6,B)?Ar="v":Ar="d":Ar=qr,Ar){case"h":Or=Gt?or/2:0,Nr=or;break;case"v":Or=Gt?Qt/2:0,Nr=Qt;break}}if(wt)switch(ir.newshape.drawdirection){case"vertical":Ar="h",Or=Gt?or/2:0,Nr=or;break;case"horizontal":Ar="v",Or=Gt?Qt/2:0,Nr=Qt;break;case"ortho":Dn<xr?(Ar="h",Or=ut,Nr=St):(Ar="v",Or=hr,Nr=Ct);break;default:Ar="d"}Ar==="h"?(Ft=Lt?o(Gt,[Ct,Or],[Ct,Nr]):[[hr,Or],[hr,Nr],[Ct,Nr],[Ct,Or]],Ft.xmin=Lt?Ct:Math.min(hr,Ct),Ft.xmax=Lt?Ct:Math.max(hr,Ct),Ft.ymin=Math.min(Or,Nr),Ft.ymax=Math.max(Or,Nr),pr.attr("d","M"+Ft.xmin+","+(ut-B)+"h-4v"+2*B+"h4ZM"+(Ft.xmax-1)+","+(ut-B)+"h4v"+2*B+"h-4Z")):Ar==="v"?(Ft=Lt?o(Gt,[Or,St],[Nr,St]):[[Or,ut],[Or,St],[Nr,St],[Nr,ut]],Ft.xmin=Math.min(Or,Nr),Ft.xmax=Math.max(Or,Nr),Ft.ymin=Lt?St:Math.min(ut,St),Ft.ymax=Lt?St:Math.max(ut,St),pr.attr("d","M"+(hr-B)+","+Ft.ymin+"v-4h"+2*B+"v4ZM"+(hr-B)+","+(Ft.ymax-1)+"v4h"+2*B+"v-4Z")):Ar==="d"&&(Ft=Lt?o(Gt,[hr,ut],[Ct,St]):[[hr,ut],[hr,St],[Ct,St],[Ct,ut]],Ft.xmin=Math.min(hr,Ct),Ft.xmax=Math.max(hr,Ct),Ft.ymin=Math.min(ut,St),Ft.ymax=Math.max(ut,St),pr.attr("d","M0,0Z"))}else Be&&(Ye.addPt([Ct,St]),Ft=Ye.filtered);if(se.selectionDefs&&se.selectionDefs.length?(Dt=xe(se.mergedPolygons,Ft,Er),Ft.subtract=Er,We=j(se.selectionDefs.concat([Ft]))):(Dt=[Ft],We=O(Ft)),f(Ue(Dt,at),rr,se),It){var vn=Fe(Kt,!1),fn=vn.eventData?vn.eventData.points.slice():[];vn=Fe(Kt,!1,We,kr,se),We=vn.selectionTesters,lr=vn.eventData;var Tn;Ye?Tn=Ye.filtered:Tn=pt(Dt),a.throttle(Hr,I.SELECTDELAY,function(){Ir=He(We,kr);for(var Pn=Ir.slice(),jn=0;jn<fn.length;jn++){for(var qn=fn[jn],sa=!1,ta=0;ta<Pn.length;ta++)if(Pn[ta].curveNumber===qn.curveNumber&&Pn[ta].pointNumber===qn.pointNumber){sa=!0;break}sa||Pn.push(qn)}Pn.length&&(lr||(lr={}),lr.points=Pn),pn(lr,Tn),Je(Kt,lr)})}},se.clickFn=function(jr,In){if(pr.remove(),Kt._fullLayout._activeShapeIndex>=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<kr.length;Zt++)nr=kr[Zt],nr._module.selectPoints(nr,!1);if(Ne(Kt,kr),q(se),Ie(Kt),kr.length){var xr=kr[0].xaxis,Ar=kr[0].yaxis;if(xr&&Ar){for(var Or=[],Nr=Kt._fullLayout.selections,qr=0;qr<Nr.length;qr++){var vn=Nr[qr];vn&&(vn.xref!==xr._id||vn.yref!==Ar._id)&&Or.push(vn)}Or.length<Nr.length&&(Kt._fullLayout._noEmitSelectedAtStart=!0,i.call("_guiRelayout",Kt,{selections:Or}))}}}else Dn.indexOf("select")>-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<Gt.length;hr++)Lt=Gt[hr],Lt._module.selectPoints(Lt,!1);Ne(Pe,Gt),q(Le),It&&Ie(Pe)}else{Yt=ze.shiftKey&&(jt!==void 0?jt:Me(ut)),Kt=ce(ut.pointNumber,ut.searchInfo,Yt);var xt=Le.selectionDefs.concat([Kt]);for(ir=j(xt),hr=0;hr<Gt.length;hr++)if(_r=Gt[hr]._module.selectPoints(Gt[hr],ir),yt=Se(_r,Gt[hr]),Bt.length)for(var Tt=0;Tt<yt.length;Tt++)Bt.push(yt[Tt]);else Bt=yt;if(br={points:Bt},Ne(Pe,Gt,br),Kt&&Le&&Le.selectionDefs.push(Kt),Be){var Ct=Le.mergedPolygons,St=l(Le.dragmode);f(Ue(Ct,St),Be,Le)}It&&De(Pe,br)}}}function ce(ze,Pe,be){return{pointNumber:ze,searchInfo:Pe,subtract:!!be}}function Q(ze){return"pointNumber"in ze&&"searchInfo"in ze}function Z(ze){return{xmin:0,xmax:0,ymin:0,ymax:0,pts:[],contains:function(Pe,be,se,ye){var Le=ze.searchInfo.cd[0].trace._expandedIndex,Be=ye.cd[0].trace._expandedIndex;return Be===Le&&se===ze.pointNumber},isRect:!1,degenerate:!1,subtract:!!ze.subtract}}function j(ze){if(!ze.length)return;for(var Pe=[],be=Q(ze[0])?0:ze[0][0][0],se=be,ye=Q(ze[0])?0:ze[0][0][1],Le=ye,Be=0;Be<ze.length;Be++)if(Q(ze[Be]))Pe.push(Z(ze[Be]));else{var ot=O(ze[Be]);ot.subtract=!!ze[Be].subtract,Pe.push(ot),be=Math.min(be,ot.xmin),se=Math.max(se,ot.xmax),ye=Math.min(ye,ot.ymin),Le=Math.max(Le,ot.ymax)}function at(wt,It,Bt,Gt){for(var Lt=!1,Kt=0;Kt<Pe.length;Kt++)Pe[Kt].contains(wt,It,Bt,Gt)&&(Lt=!Pe[Kt].subtract);return Lt}return{xmin:be,xmax:se,ymin:ye,ymax:Le,pts:[],contains:at,isRect:!1,degenerate:!1}}function K(ze,Pe,be){var se=Pe._fullLayout,ye=be.plotinfo,Le=be.dragmode,Be=se._lastSelectedSubplot&&se._lastSelectedSubplot===ye.id,ot=(ze.shiftKey||ze.altKey)&&!(n(Le)&&l(Le));Be&&ot&&ye.selection&&ye.selection.selectionDefs&&!be.selectionDefs?(be.selectionDefs=ye.selection.selectionDefs,be.mergedPolygons=ye.selection.mergedPolygons):(!ot||!ye.selection)&&q(be),Be||(w(Pe),se._lastSelectedSubplot=ye.id)}function ee(ze){return ze._fullLayout._activeShapeIndex>=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;wt<ze.calcdata.length;wt++)if(ot=ze.calcdata[wt],at=ot[0].trace,!(at.visible!==!0||!at._module||!at._module.selectPoints))if(J({subplot:se})&&(at.subplot===se||at.geo===se))ye.push(ie(at._module,ot,Pe[0],be[0]));else if(at.type==="splom"){if(at._xaxes[Le[0]]&&at._yaxes[Be[0]]){var It=ie(at._module,ot,Pe[0],be[0]);It.scene=ze._fullLayout._splomScenes[at.uid],ye.push(It)}}else if(at.type==="sankey"){var Bt=ie(at._module,ot,Pe[0],be[0]);ye.push(Bt)}else{if(Le.indexOf(at.xaxis)===-1||Be.indexOf(at.yaxis)===-1)continue;ye.push(ie(at._module,ot,E(ze,at.xaxis),E(ze,at.yaxis)))}return ye}function ie(ze,Pe,be,se){return{_module:ze,cd:Pe,xaxis:be,yaxis:se}}function he(ze){return ze&&Array.isArray(ze)&&ze[0].hoverOnBox!==!0}function me(ze,Pe){var be=ze[0],se=-1,ye=[],Le,Be;for(Be=0;Be<Pe.length;Be++)if(Le=Pe[Be],be.fullData._expandedIndex===Le.cd[0].trace._expandedIndex){if(be.hoverOnBox===!0)break;be.pointNumber!==void 0?se=be.pointNumber:be.binNumber!==void 0&&(se=be.binNumber,ye=be.pointNumbers);break}return{pointNumber:se,pointNumbers:ye,searchInfo:Le}}function Me(ze){var Pe=ze.searchInfo.cd[0].trace,be=ze.pointNumber,se=ze.pointNumbers,ye=se.length>0,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;Be<ze.length;Be++)se=ze[Be],se.cd[0].trace.selectedpoints&&se.cd[0].trace.selectedpoints.length>0&&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;Be<Pe.pointNumbers.length;Be++)if(ye.selectedpoints.indexOf(Pe.pointNumbers[Be])<0)return!1;return!0}return!1}function Oe(ze){var Pe=0,be,se,ye;for(ye=0;ye<ze.length;ye++)if(be=ze[ye],se=be.cd[0].trace,se.selectedpoints&&(se.selectedpoints.length>1||(Pe+=se.selectedpoints.length,Pe>1)))return!1;return Pe===1}function Ne(ze,Pe,be){var se;for(se=0;se<Pe.length;se++){var ye=Pe[se].cd[0].trace._fullInput,Le=ze._fullLayout._tracePreGUI[ye.uid]||{};Le.selectedpoints===void 0&&(Le.selectedpoints=ye._input.selectedpoints||null)}var Be;if(be){var ot=be.points||[];for(se=0;se<Pe.length;se++)Be=Pe[se].cd[0].trace,Be._input.selectedpoints=Be._fullInput.selectedpoints=[],Be._fullInput!==Be&&(Be.selectedpoints=[]);for(var at=0;at<ot.length;at++){var wt=ot[at],It=wt.data,Bt=wt.fullData,Gt=wt.pointIndex,Lt=wt.pointIndices;Lt?([].push.apply(It.selectedpoints,Lt),Be._fullInput!==Be&&[].push.apply(Bt.selectedpoints,Lt)):(It.selectedpoints.push(Gt),Be._fullInput!==Be&&Bt.selectedpoints.push(Gt))}}else for(se=0;se<Pe.length;se++)Be=Pe[se].cd[0].trace,delete Be.selectedpoints,delete Be._input.selectedpoints,Be._fullInput!==Be&&delete Be._fullInput.selectedpoints;Ee(ze,Pe)}function Ee(ze,Pe){for(var be=!1,se=0;se<Pe.length;se++){var ye=Pe[se],Le=ye.cd;i.traceIs(Le[0].trace,"regl")&&(be=!0);var Be=ye._module,ot=Be.styleOnSelect||Be.style;ot&&(ot(ze,Le,Le[0].node3),Le[0].nodeRangePlot3&&ot(ze,Le,Le[0].nodeRangePlot3))}be&&(y(ze),z(ze))}function xe(ze,Pe,be){for(var se=be?m.difference:m.union,ye=se({regions:ze},{regions:[Pe]}),Le=ye.regions.reverse(),Be=0;Be<Le.length;Be++){var ot=Le[Be];ot.subtract=ct(ot,Le.slice(0,Be))}return Le}function Se(ze,Pe){if(Array.isArray(ze))for(var be=Pe.cd,se=Pe.cd[0].trace,ye=0;ye<ze.length;ye++)ze[ye]=p(ze[ye],se,be);return ze}function Ue(ze,Pe){for(var be=[],se=0;se<ze.length;se++){be[se]=[];for(var ye=0;ye<ze[se].length;ye++){be[se][ye]=[],be[se][ye][0]=ye?"L":"M";for(var Le=0;Le<ze[se][ye].length;Le++)be[se][ye].push(ze[se][ye][Le])}Pe||be[se].push(["Z",be[se][0][1],be[se][0][2]])}return be}function He(ze,Pe){for(var be=[],se,ye,Le=0;Le<Pe.length;Le++){var Be=Pe[Le];ye=Be._module.selectPoints(Be,ze),se=Se(ye,Be),be=be.concat(se)}return be}function Fe(ze,Pe,be,se,ye){var Le=!!se,Be,ot,at;ye&&(Be=ye.plotinfo,ot=ye.xaxes[0]._id,at=ye.yaxes[0]._id);var wt=[],It=[],Bt=et(ze),Gt=ze._fullLayout;if(Be){var Lt=Gt._zoomlayer,Kt=Gt.dragmode,ir=n(Kt),_r=c(Kt);if(ir||_r){var yt=E(ze,ot,"x"),jt=E(ze,at,"y");if(yt&&jt){var Yt=Lt.selectAll(".select-outline-"+Be.id);if(Yt&&ze._fullLayout._outlining&&Yt.length){for(var br=Yt[0][0],hr=br.getAttribute("d"),ut=d(hr,ze,Be),lt=[],xt=0;xt<ut.length;xt++){for(var Tt=ut[xt],Ct=[],St=0;St<Tt.length;St++)Ct.push([dt(yt,Tt[St][1]),dt(jt,Tt[St][2])]);Ct.xref=ot,Ct.yref=at,Ct.subtract=ct(Ct,lt),lt.push(Ct)}Bt=Bt.concat(lt)}}}}var _t=ot&&at?[ot+at]:Gt._subplots.cartesian;Ge(ze);for(var Ht={},$t=0;$t<_t.length;$t++){var Qt=_t[$t],or=Qt.indexOf("y"),Er=Qt.slice(0,or),Ye=Qt.slice(or),We=ot&&at?be:void 0;if(We=$e(Bt,Er,Ye,We),We){var Dt=se;if(!Le){var Ft=E(ze,Er,"x"),Zt=E(ze,Ye,"y");Dt=le(ze,[Ft],[Zt],Qt);for(var nr=0;nr<Dt.length;nr++){var lr=Dt[nr],rr=lr.cd[0],zt=rr.trace;if(lr._module.name==="scattergl"&&!rr.t.xpx){var fr=zt.x,dr=zt.y,pr=zt._length;rr.t.xpx=[],rr.t.ypx=[];for(var vr=0;vr<pr;vr++)rr.t.xpx[vr]=Ft.c2p(fr[vr]),rr.t.ypx[vr]=Zt.c2p(dr[vr])}lr._module.name==="splom"&&(Ht[zt.uid]||(Ht[zt.uid]=!0))}}var Hr=He(We,Dt);wt=wt.concat(Hr),It=It.concat(Dt)}}var Ir={points:wt};Ne(ze,It,Ir);var kr=Gt.clickmode,pn=kr.indexOf("event")>-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;be<Pe.length;be++){var se=Pe[be][0],ye=se.trace,Le=ze._fullLayout._splomScenes;if(Le){var Be=Le[ye.uid];Be&&(Be.selectBatch=[])}}}function nt(ze,Pe,be){for(var se=0;se<be.length;se++){var ye=be[se];if(ye.xaxis&&ye.xaxis._id===ze&&ye.yaxis&&ye.yaxis._id===Pe)return!0}return!1}function qe(ze,Pe,be,se){se=le(ze,[E(ze,Pe,"x")],[E(ze,be,"y")],Pe+be);for(var ye=0;ye<se.length;ye++){var Le=se[ye];Le._module.selectPoints(Le,!1)}Ne(ze,se)}function $e(ze,Pe,be,se){for(var ye,Le=0;Le<ze.length;Le++){var Be=ze[Le];if(!(Pe!==Be.xref||be!==Be.yref))if(ye){var ot=!!Be.subtract;ye=xe(ye,Be,ot),se=j(ye)}else ye=[Be],se=O(Be)}return se}function et(ze,Pe){for(var be=[],se=ze._fullLayout,ye=se.selections,Le=ye.length,Be=0;Be<Le;Be++)if(!(Pe&&Be!==se._activeSelectionIndex)){var ot=ye[Be];if(ot){var at=ot.xref,wt=ot.yref,It=E(ze,at,"x"),Bt=E(ze,wt,"y"),Gt,Lt,Kt,ir,_r;if(ot.type==="rect"){_r=[];var yt=dt(It,ot.x0),jt=dt(It,ot.x1),Yt=dt(Bt,ot.y0),br=dt(Bt,ot.y1);_r=[[yt,Yt],[yt,br],[jt,br],[jt,Yt]],Gt=Math.min(yt,jt),Lt=Math.max(yt,jt),Kt=Math.min(Yt,br),ir=Math.max(Yt,br),_r.xmin=Gt,_r.xmax=Lt,_r.ymin=Kt,_r.ymax=ir,_r.xref=at,_r.yref=wt,_r.subtract=!1,_r.isRect=!0,be.push(_r)}else if(ot.type==="path")for(var hr=ot.path.split("Z"),ut=[],lt=0;lt<hr.length;lt++){var xt=hr[lt];if(xt){xt+="Z";var Tt=u.extractPathCoords(xt,g.paramIsX,"raw"),Ct=u.extractPathCoords(xt,g.paramIsY,"raw");Gt=1/0,Lt=-1/0,Kt=1/0,ir=-1/0,_r=[];for(var St=0;St<Tt.length;St++){var _t=dt(It,Tt[St]),Ht=dt(Bt,Ct[St]);_r.push([_t,Ht]),Gt=Math.min(_t,Gt),Lt=Math.max(_t,Lt),Kt=Math.min(Ht,Kt),ir=Math.max(Ht,ir)}_r.xmin=Gt,_r.xmax=Lt,_r.ymin=Kt,_r.ymax=ir,_r.xref=at,_r.yref=wt,_r.subtract=ct(_r,ut),ut.push(_r),be.push(_r)}}}}return be}function ct(ze,Pe){for(var be=!1,se=0;se<Pe.length;se++)for(var ye=Pe[se],Le=0;Le<ze.length;Le++)if(P(ze[Le],ye)){be=!be;break}return be}function dt(ze,Pe){return ze.type==="date"&&(Pe=Pe.replace("_"," ")),ze.type==="log"?ze.c2p(Pe):ze.r2p(Pe,null,ze.calendar)}function pt(ze){for(var Pe=ze.length,be=[],se=0;se<Pe;se++){var ye=ze[se];be=be.concat(ye),be=be.concat([ye[0]])}return At(be)}function At(ze){return ze.isRect=ze.length===5&&ze[0][0]===ze[4][0]&&ze[0][1]===ze[4][1]&&ze[0][0]===ze[1][0]&&ze[2][0]===ze[3][0]&&ze[0][1]===ze[3][1]&&ze[1][1]===ze[2][1]||ze[0][1]===ze[1][1]&&ze[2][1]===ze[3][1]&&ze[0][0]===ze[3][0]&&ze[1][0]===ze[2][0],ze.isRect&&(ze.xmin=Math.min(ze[0][0],ze[2][0]),ze.xmax=Math.max(ze[0][0],ze[2][0]),ze.ymin=Math.min(ze[0][1],ze[2][1]),ze.ymax=Math.max(ze[0][1],ze[2][1])),ze}function Mt(ze){return function(Pe,be){for(var se,ye,Le=0;Le<ze.length;Le++){var Be=ze[Le],ot=Be._id,at=ot.charAt(0);if(be.isRect){se||(se={});var wt=be[at+"min"],It=be[at+"max"];wt!==void 0&&It!==void 0&&(se[ot]=[_(Be,wt),_(Be,It)].sort(S))}else ye||(ye={}),ye[ot]=be.map(U(Be))}se&&(Pe.range=se),ye&&(Pe.lassoPoints=ye)}}function Vt(ze){var Pe=ze.plotinfo;return Pe.fillRangeItems||Mt(ze.xaxes.concat(ze.yaxes))}function Je(ze,Pe){ze.emit("plotly_selecting",Pe)}function De(ze,Pe){Pe&&(Pe.selections=(ze.layout||{}).selections||[]),ze.emit("plotly_selected",Pe)}function Ie(ze){ze.emit("plotly_deselect",null)}G.exports={reselect:Fe,prepSelect:te,clearOutline:w,clearSelectionsCache:q,selectOnClick:ae}},89827:function(G,V,e){var m=e(50215),P=e(41940),i=e(82196).line,L=e(79952).P,A=e(1426).extendFlat,v=e(44467).templatedArray;e(24695);var p=e(9012),t=e(5386).R,r=e(37281);G.exports=v("shape",{visible:A({},p.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:A({},p.legend,{editType:"calc+arraydraw"}),legendgroup:A({},p.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:A({},p.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:P({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:A({},p.legendrank,{editType:"calc+arraydraw"}),legendwidth:A({},p.legendwidth,{editType:"calc+arraydraw"}),type:{valType:"enumerated",values:["circle","rect","path","line"],editType:"calc+arraydraw"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw"},xref:A({},m.xref,{}),xsizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},xanchor:{valType:"any",editType:"calc+arraydraw"},x0:{valType:"any",editType:"calc+arraydraw"},x1:{valType:"any",editType:"calc+arraydraw"},yref:A({},m.yref,{}),ysizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},yanchor:{valType:"any",editType:"calc+arraydraw"},y0:{valType:"any",editType:"calc+arraydraw"},y1:{valType:"any",editType:"calc+arraydraw"},path:{valType:"string",editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},line:{color:A({},i.color,{editType:"arraydraw"}),width:A({},i.width,{editType:"calc+arraydraw"}),dash:A({},L,{editType:"arraydraw"}),editType:"calc+arraydraw"},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",editType:"arraydraw"},editable:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},label:{text:{valType:"string",dflt:"",editType:"arraydraw"},texttemplate:t({},{keys:Object.keys(r)}),font:P({editType:"calc+arraydraw",colorEditType:"arraydraw"}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"],editType:"arraydraw"},textangle:{valType:"angle",dflt:"auto",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],editType:"calc+arraydraw"},padding:{valType:"number",dflt:3,min:0,editType:"arraydraw"},editType:"arraydraw"},editType:"arraydraw"})},5627:function(G,V,e){var m=e(71828),P=e(89298),i=e(21459),L=e(30477);G.exports=function(s){var n=s._fullLayout,l=m.filterVisible(n.shapes);if(!(!l.length||!s._fullData.length))for(var c=0;c<l.length;c++){var u=l[c];u._extremes={};var g,f,w=P.getRefType(u.xref),h=P.getRefType(u.yref);if(u.xref!=="paper"&&w!=="domain"){var o=u.xsizemode==="pixel"?u.xanchor:u.x0,d=u.xsizemode==="pixel"?u.xanchor:u.x1;g=P.getFromId(s,u.xref),f=t(g,o,d,u.path,i.paramIsX),f&&(u._extremes[g._id]=P.findExtremes(g,f,A(u)))}if(u.yref!=="paper"&&h!=="domain"){var M=u.ysizemode==="pixel"?u.yanchor:u.y0,T=u.ysizemode==="pixel"?u.yanchor:u.y1;g=P.getFromId(s,u.yref),f=t(g,M,T,u.path,i.paramIsY),f&&(u._extremes[g._id]=P.findExtremes(g,f,v(u)))}}};function A(r){return p(r.line.width,r.xsizemode,r.x0,r.x1,r.path,!1)}function v(r){return p(r.line.width,r.ysizemode,r.y0,r.y1,r.path,!0)}function p(r,s,n,l,c,u){var g=r/2,f=u;if(s==="pixel"){var w=c?L.extractPathCoords(c,u?i.paramIsY:i.paramIsX):[n,l],h=m.aggNums(Math.max,null,w),o=m.aggNums(Math.min,null,w),d=o<0?Math.abs(o)+g:g,M=h>0?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;h<w.length;h++)o=w[h],d=c[o.charAt(0)].drawn,d!==void 0&&(M=w[h].substr(1).match(i.paramRE),!(!M||M.length<d)&&(T=u(M[d]),T<g&&(g=T),T>f&&(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<k.length;O++)for(var N=0;N<k[O].length;N++)for(var _=k[O][N],U=1;U<_.length;U+=2){var Y=_[U],J=_[U+1];E=Math.min(E,Y),y=Math.max(y,Y),z=Math.min(z,J),I=Math.max(I,J)}}else{var te=P.getFromId(c,g.xref),ae=P.getRefType(g.xref),ce=P.getFromId(c,g.yref),Q=P.getRefType(g.yref),Z=v.getDataToPixel(c,te,!1,ae),j=v.getDataToPixel(c,ce,!0,Q);E=Z(g.x0),y=Z(g.x1),z=j(g.y0),I=j(g.y1)}var K=g.label.textangle;K==="auto"&&(g.type==="line"?K=s(E,z,y,I):K=0),a.call(function(ie){return ie.call(L.font,x).attr({}),i.convertToTspans(ie,c),ie});var ee=L.bBox(a.node()),oe=n(E,z,y,I,g,K,ee),q=oe.textx,$=oe.texty,le=oe.xanchor;a.attr({"text-anchor":{left:"start",center:"middle",right:"end"}[le],y:$,x:q,transform:"rotate("+K+","+q+","+$+")"}).call(i.positionText,q,$)}};function s(l,c,u,g){var f,w;return w=Math.abs(u-l),u>=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":u<l?b="right":b="center":u>l?b="right":u<l?b="left":b="center":o==="end"?d==="auto"?u>l?b="right":u<l?b="left":b="center":u>l?b="left":u<l?b="right":b="center":b="center");var B={left:1,center:0,right:-1},k={bottom:-1,middle:0,top:1};if(d==="auto"){var O=k[a];z=-M*x*O,I=M*S*O}else{var N=B[b],_=k[a];z=M*N,I=M*_}E=E+z,y=y+I}else z=M+3,o.indexOf("right")!==-1?(E=Math.max(l,u)-z,b==="auto"&&(b="right")):o.indexOf("left")!==-1?(E=Math.min(l,u)+z,b==="auto"&&(b="left")):(E=(l+u)/2,b==="auto"&&(b="center")),o.indexOf("top")!==-1?y=Math.min(c,g):o.indexOf("bottom")!==-1?y=Math.max(c,g):y=(c+g)/2,I=M,a==="bottom"?y=y-I:a==="top"&&(y=y+I);var U=r[a],Y=f.label.font.size,J=h.height,te=(J*U-Y)*x,ae=-(J*U-Y)*S;return{textx:E+te,texty:y+ae,xanchor:b}}},42359:function(G,V,e){var m=e(71828),P=m.strTranslate,i=e(28569),L=e(64505),A=L.drawMode,v=L.selectMode,p=e(73972),t=e(7901),r=e(89995),s=r.i000,n=r.i090,l=r.i180,c=r.i270,u=e(51873),g=u.clearOutlineControllers,f=e(60165),w=f.pointsOnRectangle,h=f.pointsOnEllipse,o=f.writePaths,d=e(90551).newShapes,M=e(90551).createShapeObj,T=e(35855),C=e(48100);G.exports=function a(E,y,z,I){I||(I=0);var B=z.gd;function k(){a(E,y,z,I++),(h(E[0])||z.hasText)&&O({redrawing:!0})}function O(xe){var Se={};z.isActiveShape!==void 0&&(z.isActiveShape=!1,Se=d(y,z)),z.isActiveSelection!==void 0&&(z.isActiveSelection=!1,Se=T(y,z),B._fullLayout._reselect=!0),Object.keys(Se).length&&p.call((xe||{}).redrawing?"relayout":"_guiRelayout",B,Se)}var N=B._fullLayout,_=N._zoomlayer,U=z.dragmode,Y=A(U),J=v(U);(Y||J)&&(B._fullLayout._outlining=!0),g(B),y.attr("d",o(E));var te,ae,ce,Q,Z;if(!I&&(z.isActiveShape||z.isActiveSelection)){Z=x([],E);var j=_.append("g").attr("class","outline-controllers");he(j),Ee()}if(Y&&z.hasText){var K=_.select(".label-temp"),ee=M(y,z,z.dragmode);C(B,"label-temp",ee,K)}function oe(xe){ce=+xe.srcElement.getAttribute("data-i"),Q=+xe.srcElement.getAttribute("data-j"),te[ce][Q].moveFn=q}function q(xe,Se){if(E.length){var Ue=Z[ce][Q][1],He=Z[ce][Q][2],Fe=E[ce],Ge=Fe.length;if(w(Fe)){var nt=xe,qe=Se;if(z.isActiveSelection){var $e=S(Fe,Q);$e[1]===Fe[Q][1]?qe=0:nt=0}for(var et=0;et<Ge;et++)if(et!==Q){var ct=Fe[et];ct[1]===Fe[Q][1]&&(ct[1]=Ue+nt),ct[2]===Fe[Q][2]&&(ct[2]=He+qe)}if(Fe[Q][1]=Ue+nt,Fe[Q][2]=He+qe,!w(Fe))for(var dt=0;dt<Ge;dt++)for(var pt=0;pt<Fe[dt].length;pt++)Fe[dt][pt]=Z[ce][dt][pt]}else Fe[Q][1]=Ue+xe,Fe[Q][2]=He+Se;k()}}function $(){O()}function le(){if(E.length&&E[ce]&&E[ce].length){for(var xe=[],Se=0;Se<E[ce].length;Se++)Se!==Q&&xe.push(E[ce][Se]);xe.length>1&&!(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;Se<E.length;Se++){var Ue=E[Se],He=w(Ue),Fe=!He&&h(Ue);te[Se]=[];for(var Ge=Ue.length,nt=0;nt<Ge;nt++)if(Ue[nt][0]!=="Z"&&!(Fe&&nt!==s&&nt!==n&&nt!==l&&nt!==c)){var qe=He&&z.isActiveSelection,$e;qe&&($e=S(Ue,nt));var et=Ue[nt][1],ct=Ue[nt][2],dt=xe.append(qe?"rect":"circle").attr("data-i",Se).attr("data-j",nt).style({fill:t.background,stroke:t.defaultLine,"stroke-width":1,"shape-rendering":"crispEdges"});if(qe){var pt=$e[1]-et,At=$e[2]-ct,Mt=At?5:Math.max(Math.min(25,Math.abs(pt)-5),5),Vt=pt?5:Math.max(Math.min(25,Math.abs(At)-5),5);dt.classed(At?"cursor-ew-resize":"cursor-ns-resize",!0).attr("width",Mt).attr("height",Vt).attr("x",et-Mt/2).attr("y",ct-Vt/2).attr("transform",P(pt/2,At/2))}else dt.classed("cursor-grab",!0).attr("r",5).attr("cx",et).attr("cy",ct);te[Se][nt]={element:dt.node(),gd:B,prepFn:oe,doneFn:$,clickFn:ie},i.init(te[Se][nt])}}}function me(xe,Se){if(E.length)for(var Ue=0;Ue<E.length;Ue++)for(var He=0;He<E[Ue].length;He++)for(var Fe=0;Fe+2<E[Ue][He].length;Fe+=2)E[Ue][He][Fe+1]=Z[Ue][He][Fe+1]+xe,E[Ue][He][Fe+2]=Z[Ue][He][Fe+2]+Se}function Me(xe,Se){me(xe,Se),k()}function Te(xe){ce=+xe.srcElement.getAttribute("data-i"),ce||(ce=0),ae[ce].moveFn=Me}function Oe(){O()}function Ne(xe){xe===2&&b(B)}function Ee(){if(ae=[],!!E.length){var xe=0;ae[xe]={element:y[0][0],gd:B,prepFn:Te,doneFn:Oe,clickFn:Ne},i.init(ae[xe])}}};function x(a,E){for(var y=0;y<E.length;y++){var z=E[y];a[y]=[];for(var I=0;I<z.length;I++){a[y][I]=[];for(var B=0;B<z[I].length;B++)a[y][I][B]=z[I][B]}}return a}function S(a,E){var y=a[E][1],z=a[E][2],I=a.length,B,k,O;return B=(E+1)%I,k=a[B][1],O=a[B][2],k===y&&O===z&&(B=(E+2)%I,k=a[B][1],O=a[B][2]),[B,k,O]}function b(a){if(v(a._fullLayout.dragmode)){g(a);var E=a._fullLayout._activeSelectionIndex,y=(a.layout||{}).selections||[];if(E<y.length){for(var z=[],I=0;I<y.length;I++)I!==E&&z.push(y[I]);delete a._fullLayout._activeSelectionIndex;var B=a._fullLayout.selections[E];a._fullLayout._deselect={xref:B.xref,yref:B.yref},p.call("_guiRelayout",a,{selections:z})}}}},34031:function(G,V,e){var m=e(39898),P=e(73972),i=e(71828),L=e(89298),A=e(60165).readPaths,v=e(42359),p=e(48100),t=e(51873).clearOutlineControllers,r=e(7901),s=e(91424),n=e(44467).arrayEditor,l=e(28569),c=e(6964),u=e(21459),g=e(30477),f=g.getPathString;G.exports={draw:w,drawOne:d,eraseActiveShape:b,drawLabel:p};function w(a){var E=a._fullLayout;E._shapeUpperLayer.selectAll("path").remove(),E._shapeLowerLayer.selectAll("path").remove(),E._shapeUpperLayer.selectAll("text").remove(),E._shapeLowerLayer.selectAll("text").remove();for(var y in E._plots){var z=E._plots[y].shapelayer;z&&(z.selectAll("path").remove(),z.selectAll("text").remove())}for(var I=0;I<E.shapes.length;I++)E.shapes[I].visible===!0&&d(a,I)}function h(a){return!!a._fullLayout._outlining}function o(a){return!a._context.edits.shapePosition}function d(a,E){a._fullLayout._paperdiv.selectAll('.shapelayer [data-index="'+E+'"]').remove();var y=g.makeShapesOptionsAndPlotinfo(a,E),z=y.options,I=y.plotinfo;if(!z._input||z.visible!==!0)return;if(z.layer!=="below")k(a._fullLayout._shapeUpperLayer);else if(z.xref==="paper"||z.yref==="paper")k(a._fullLayout._shapeLowerLayer);else if(I._hadPlotinfo){var B=I.mainplotinfo||I;k(B.shapelayer)}else k(a._fullLayout._shapeLowerLayer);function k(O){var N=f(a,z),_={"data-index":E,"fill-rule":z.fillrule,d:N},U=z.opacity,Y=z.fillcolor,J=z.line.width?z.line.color:"rgba(0,0,0,0)",te=z.line.width,ae=z.line.dash;!te&&z.editable===!0&&(te=5,ae="solid");var ce=N[N.length-1]!=="Z",Q=o(a)&&z.editable&&a._fullLayout._activeShapeIndex===E;Q&&(Y=ce?"rgba(0,0,0,0)":a._fullLayout.activeshape.fillcolor,U=a._fullLayout.activeshape.opacity);var Z=O.append("g").classed("shape-group",!0).attr({"data-index":E}),j=Z.append("path").attr(_).style("opacity",U).call(r.stroke,J).call(r.fill,Y).call(s.dashLine,ae,te);M(Z,a,z),p(a,E,z,Z);var K;if((Q||a._context.edits.shapePosition)&&(K=n(a.layout,"shapes",z)),Q){j.style({cursor:"move"});var ee={element:j.node(),plotinfo:I,gd:a,editHelpers:K,hasText:z.label.text||z.label.texttemplate,isActiveShape:!0},oe=A(N,a);v(oe,j,ee)}else a._context.edits.shapePosition?T(a,j,z,E,O,K):z.editable===!0&&j.style("pointer-events",ce||r.opacity(Y)*U<=.5?"stroke":"all");j.node().addEventListener("click",function(){return x(a,j)})}}function M(a,E,y){var z=(y.xref+y.yref).replace(/paper/g,"").replace(/[xyz][1-9]* *domain/g,"");s.setClipUrl(a,z?"clip"+E._fullLayout._uid+z:null,E)}function T(a,E,y,z,I,B){var k=10,O=10,N=y.xsizemode==="pixel",_=y.ysizemode==="pixel",U=y.type==="line",Y=y.type==="path",J=B.modifyItem,te,ae,ce,Q,Z,j,K,ee,oe,q,$,le,ie,he,me,Me=m.select(E.node().parentNode),Te=L.getFromId(a,y.xref),Oe=L.getRefType(y.xref),Ne=L.getFromId(a,y.yref),Ee=L.getRefType(y.yref),xe=g.getDataToPixel(a,Te,!1,Oe),Se=g.getDataToPixel(a,Ne,!0,Ee),Ue=g.getPixelToData(a,Te,!1,Oe),He=g.getPixelToData(a,Ne,!0,Ee),Fe=qe(),Ge={element:Fe.node(),gd:a,prepFn:ct,doneFn:dt,clickFn:pt},nt;l.init(Ge),Fe.node().onmousemove=et;function qe(){return U?$e():E}function $e(){var Ie=10,ze=Math.max(y.line.width,Ie),Pe=I.append("g").attr("data-index",z).attr("drag-helper",!0);Pe.append("path").attr("d",E.attr("d")).style({cursor:"move","stroke-width":ze,"stroke-opacity":"0"});var be={"fill-opacity":"0"},se=Math.max(ze/2,Ie);return Pe.append("circle").attr({"data-line-point":"start-point",cx:N?xe(y.xanchor)+y.x0:xe(y.x0),cy:_?Se(y.yanchor)-y.y0:Se(y.y0),r:se}).style(be).classed("cursor-grab",!0),Pe.append("circle").attr({"data-line-point":"end-point",cx:N?xe(y.xanchor)+y.x1:xe(y.x1),cy:_?Se(y.yanchor)-y.y1:Se(y.y1),r:se}).style(be).classed("cursor-grab",!0),Pe}function et(Ie){if(h(a)){nt=null;return}if(U)Ie.target.tagName==="path"?nt="move":nt=Ie.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var ze=Ge.element.getBoundingClientRect(),Pe=ze.right-ze.left,be=ze.bottom-ze.top,se=Ie.clientX-ze.left,ye=Ie.clientY-ze.top,Le=!Y&&Pe>k&&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)),te<ce?(oe=te,ie="x0",q=ce,he="x1"):(oe=ce,ie="x1",q=te,he="x0"),!_&&ae<Q||_&&ae>Q?(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(E<y.length){for(var z=[],I=0;I<y.length;I++)I!==E&&z.push(y[I]);return delete a._fullLayout._activeShapeIndex,P.call("_guiRelayout",a,{shapes:z})}}}},29241:function(G,V,e){var m=e(30962).overrideAll,P=e(9012),i=e(41940),L=e(79952).P,A=e(1426).extendFlat,v=e(5386).R,p=e(37281);G.exports=m({newshape:{visible:A({},P.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:A({},P.legend,{}),legendgroup:A({},P.legendgroup,{}),legendgrouptitle:{text:A({},P.legendgrouptitle.text,{}),font:i({})},legendrank:A({},P.legendrank,{}),legendwidth:A({},P.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:A({},L,{dflt:"solid"})},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd"},opacity:{valType:"number",min:0,max:1,dflt:1},layer:{valType:"enumerated",values:["below","above"],dflt:"above"},drawdirection:{valType:"enumerated",values:["ortho","horizontal","vertical","diagonal"],dflt:"diagonal"},name:A({},P.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:v({newshape:!0},{keys:Object.keys(p)}),font:i({}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)"},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")},89995:function(G){var V=32;G.exports={CIRCLE_SIDES:V,i000:0,i090:V/4,i180:V/2,i270:V/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}},45547:function(G,V,e){var m=e(7901),P=e(71828);function i(L,A){return L?"bottom":A.indexOf("top")!==-1?"top":A.indexOf("bottom")!==-1?"bottom":"middle"}G.exports=function(A,v,p){p("newshape.visible"),p("newshape.name"),p("newshape.showlegend"),p("newshape.legend"),p("newshape.legendwidth"),p("newshape.legendgroup"),p("newshape.legendgrouptitle.text"),P.coerceFont(p,"newshape.legendgrouptitle.font"),p("newshape.legendrank"),p("newshape.drawdirection"),p("newshape.layer"),p("newshape.fillcolor"),p("newshape.fillrule"),p("newshape.opacity");var t=p("newshape.line.width");if(t){var r=(A||{}).plot_bgcolor||"#FFF";p("newshape.line.color",m.contrast(r)),p("newshape.line.dash")}var s=A.dragmode==="drawline",n=p("newshape.label.text"),l=p("newshape.label.texttemplate");if(n||l){p("newshape.label.textangle");var c=p("newshape.label.textposition",s?"middle":"middle center");p("newshape.label.xanchor"),p("newshape.label.yanchor",i(s,c)),p("newshape.label.padding"),P.coerceFont(p,"newshape.label.font",v.font)}p("activeshape.fillcolor"),p("activeshape.opacity")}},60165:function(G,V,e){var m=e(95616),P=e(89995),i=P.CIRCLE_SIDES,L=P.SQRT2,A=e(75549),v=A.p2r,p=A.r2p,t=[0,3,4,5,6,1,2],r=[0,3,4,1,2];V.writePaths=function(l){var c=l.length;if(!c)return"M0,0Z";for(var u="",g=0;g<c;g++)for(var f=l[g].length,w=0;w<f;w++){var h=l[g][w][0];if(h==="Z")u+="Z";else for(var o=l[g][w].length,d=0;d<o;d++){var M=d;h==="Q"||h==="S"?M=r[d]:h==="C"&&(M=t[d]),u+=l[g][w][M],d>0&&d<o-1&&(u+=",")}}return u},V.readPaths=function(l,c,u,g){var f=m(l),w=[],h=-1,o=function(){h++,w[h]=[]},d,M=0,T=0,C,x,S=function(){C=M,x=T};S();for(var b=0;b<f.length;b++){var a=[],E,y,z,I,B=f[b][0],k=B;switch(B){case"M":o(),M=+f[b][1],T=+f[b][2],a.push([k,M,T]),S();break;case"Q":case"S":E=+f[b][1],z=+f[b][2],M=+f[b][3],T=+f[b][4],a.push([k,M,T,E,z]);break;case"C":E=+f[b][1],z=+f[b][2],y=+f[b][3],I=+f[b][4],M=+f[b][5],T=+f[b][6],a.push([k,M,T,E,z,y,I]);break;case"T":case"L":M=+f[b][1],T=+f[b][2],a.push([k,M,T]);break;case"H":k="L",M=+f[b][1],a.push([k,M,T]);break;case"V":k="L",T=+f[b][1],a.push([k,M,T]);break;case"A":k="L";var O=+f[b][1],N=+f[b][2];+f[b][4]||(O=-O,N=-N);var _=M-O,U=T;for(d=1;d<=i/2;d++){var Y=2*Math.PI*d/i;a.push([k,_+O*Math.cos(Y),U+N*Math.sin(Y)])}break;case"Z":(M!==C||T!==x)&&(M=C,T=x,a.push([k,M,T]));break}for(var J=(u||{}).domain,te=c._fullLayout._size,ae=u&&u.xsizemode==="pixel",ce=u&&u.ysizemode==="pixel",Q=g===!1,Z=0;Z<a.length;Z++){for(d=0;d+2<7;d+=2){var j=a[Z][d+1],K=a[Z][d+2];j===void 0||K===void 0||(M=j,T=K,u&&(u.xaxis&&u.xaxis.p2r?(Q&&(j-=u.xaxis._offset),ae?j=p(u.xaxis,u.xanchor)+j:j=v(u.xaxis,j)):(Q&&(j-=te.l),J?j=J.x[0]+j/te.w:j=j/te.w),u.yaxis&&u.yaxis.p2r?(Q&&(K-=u.yaxis._offset),ce?K=p(u.yaxis,u.yanchor)-K:K=v(u.yaxis,K)):(Q&&(K-=te.t),J?K=J.y[1]-K/te.h:K=1-K/te.h)),a[Z][d+1]=j,a[Z][d+2]=K)}w[h].push(a[Z].slice())}}return w};function s(l,c){return Math.abs(l-c)<=1e-6}function n(l,c){var u=c[1]-l[1],g=c[2]-l[2];return Math.sqrt(u*u+g*g)}V.pointsOnRectangle=function(l){var c=l.length;if(c!==5)return!1;for(var u=1;u<3;u++){var g=l[0][u]-l[1][u],f=l[3][u]-l[2][u];if(!s(g,f))return!1;var w=l[0][u]-l[3][u],h=l[1][u]-l[2][u];if(!s(w,h))return!1}return!s(l[0][1],l[1][1])&&!s(l[0][1],l[3][1])?!1:!!(n(l[0],l[1])*n(l[0],l[3]))},V.pointsOnEllipse=function(l){var c=l.length;if(c!==i+1)return!1;c=i;for(var u=0;u<c;u++){var g=(c*2-u)%c,f=(c/2+g)%c,w=(c/2+u)%c;if(!s(n(l[u],l[w]),n(l[g],l[f])))return!1}return!0},V.handleEllipse=function(l,c,u){if(!l)return[c,u];var g=V.ellipseOver({x0:c[0],y0:c[1],x1:u[0],y1:u[1]}),f=(g.x1+g.x0)/2,w=(g.y1+g.y0)/2,h=(g.x1-g.x0)/2,o=(g.y1-g.y0)/2;h||(h=o=o/L),o||(o=h=h/L);for(var d=[],M=0;M<i;M++){var T=M*2*Math.PI/i;d.push([f+h*Math.cos(T),w+o*Math.sin(T)])}return d},V.ellipseOver=function(l){var c=l.x0,u=l.y0,g=l.x1,f=l.y1,w=g-c,h=f-u;c-=w,u-=h;var o=(c+g)/2,d=(u+f)/2,M=L;return w*=M,h*=M,{x0:o-w,y0:d-h,x1:o+w,y1:d+h}},V.fixDatesForPaths=function(l,c,u){var g=c.type==="date",f=u.type==="date";if(!g&&!f)return l;for(var w=0;w<l.length;w++)for(var h=0;h<l[w].length;h++)for(var o=0;o+2<l[w][h].length;o+=2)g&&(l[w][h][o+1]=l[w][h][o+1].replace(" ","_")),f&&(l[w][h][o+2]=l[w][h][o+2].replace(" ","_"));return l}},90551:function(G,V,e){var m=e(64505),P=m.drawMode,i=m.openMode,L=e(89995),A=L.i000,v=L.i090,p=L.i180,t=L.i270,r=L.cos45,s=L.sin45,n=e(75549),l=n.p2r,c=n.r2p,u=e(51873),g=u.clearOutline,f=e(60165),w=f.readPaths,h=f.writePaths,o=f.ellipseOver,d=f.fixDatesForPaths;function M(C,x){if(C.length){var S=C[0][0];if(S){var b=x.gd,a=x.isActiveShape,E=x.dragmode,y=(b.layout||{}).shapes||[];if(!P(E)&&a!==void 0){var z=b._fullLayout._activeShapeIndex;if(z<y.length)switch(b._fullLayout.shapes[z].type){case"rect":E="drawrect";break;case"circle":E="drawcircle";break;case"line":E="drawline";break;case"path":var I=y[z].path||"";I[I.length-1]==="Z"?E="drawclosedpath":E="drawopenpath";break}}var B=T(C,x,E);g(b);for(var k=x.editHelpers,O=(k||{}).modifyItem,N=[],_=0;_<y.length;_++){var U=b._fullLayout.shapes[_];if(N[_]=U._input,a!==void 0&&_===b._fullLayout._activeShapeIndex){var Y=B;switch(U.type){case"line":case"rect":case"circle":O("x0",Y.x0),O("x1",Y.x1),O("y0",Y.y0),O("y1",Y.y1);break;case"path":O("path",Y.path);break}}}return a===void 0?(N.push(B),N):k?k.getUpdateObj():{}}}}function T(C,x,S){var b=C[0][0],a=x.gd,E=b.getAttribute("d"),y=a._fullLayout.newshape,z=x.plotinfo,I=x.isActiveShape,B=z.xaxis,k=z.yaxis,O=!!z.domain||!z.xaxis,N=!!z.domain||!z.yaxis,_=i(S),U=w(E,a,z,I),Y={editable:!0,visible:y.visible,name:y.name,showlegend:y.showlegend,legend:y.legend,legendwidth:y.legendwidth,legendgroup:y.legendgroup,legendgrouptitle:{text:y.legendgrouptitle.text,font:y.legendgrouptitle.font},legendrank:y.legendrank,label:y.label,xref:O?"paper":B._id,yref:N?"paper":k._id,layer:y.layer,opacity:y.opacity,line:{color:y.line.color,width:y.line.width,dash:y.line.dash}};_||(Y.fillcolor=y.fillcolor,Y.fillrule=y.fillrule);var J;if(U.length===1&&(J=U[0]),J&&J.length===5&&S==="drawrect")Y.type="rect",Y.x0=J[0][1],Y.y0=J[0][2],Y.x1=J[2][1],Y.y1=J[2][2];else if(J&&S==="drawline")Y.type="line",Y.x0=J[0][1],Y.y0=J[0][2],Y.x1=J[1][1],Y.y1=J[1][2];else if(J&&S==="drawcircle"){Y.type="circle";var te=J[A][1],ae=J[v][1],ce=J[p][1],Q=J[t][1],Z=J[A][2],j=J[v][2],K=J[p][2],ee=J[t][2],oe=z.xaxis&&(z.xaxis.type==="date"||z.xaxis.type==="log"),q=z.yaxis&&(z.yaxis.type==="date"||z.yaxis.type==="log");oe&&(te=c(z.xaxis,te),ae=c(z.xaxis,ae),ce=c(z.xaxis,ce),Q=c(z.xaxis,Q)),q&&(Z=c(z.yaxis,Z),j=c(z.yaxis,j),K=c(z.yaxis,K),ee=c(z.yaxis,ee));var $=(ae+Q)/2,le=(Z+K)/2,ie=(Q-ae+ce-te)/2,he=(ee-j+K-Z)/2,me=o({x0:$,y0:le,x1:$+ie*r,y1:le+he*s});oe&&(me.x0=l(z.xaxis,me.x0),me.x1=l(z.xaxis,me.x1)),q&&(me.y0=l(z.yaxis,me.y0),me.y1=l(z.yaxis,me.y1)),Y.x0=me.x0,Y.y0=me.y0,Y.x1=me.x1,Y.y1=me.y1}else Y.type="path",B&&k&&d(U,B,k),Y.path=h(U),J=null;return Y}G.exports={newShapes:M,createShapeObj:T}},51873:function(G){function V(m){var P=m._fullLayout._zoomlayer;P&&P.selectAll(".outline-controllers").remove()}function e(m){var P=m._fullLayout._zoomlayer;P&&P.selectAll(".select-outline").remove(),m._fullLayout._outlining=!1}G.exports={clearOutlineControllers:V,clearOutline:e}},30477:function(G,V,e){var m=e(21459),P=e(71828),i=e(89298);V.rangeToShapePosition=function(A){return A.type==="log"?A.r2d:function(v){return v}},V.shapePositionToRange=function(A){return A.type==="log"?A.d2r:function(v){return v}},V.decodeDate=function(A){return function(v){return v.replace&&(v=v.replace("_"," ")),A(v)}},V.encodeDate=function(A){return function(v){return A(v).replace(" ","_")}},V.extractPathCoords=function(A,v,p){var t=[],r=A.match(m.segmentRE);return r.forEach(function(s){var n=v[s.charAt(0)].drawn;if(n!==void 0){var l=s.substr(1).match(m.paramRE);if(!(!l||l.length<n)){var c=l[n],u=p?c:P.cleanNumber(c);t.push(u)}}}),t},V.getDataToPixel=function(A,v,p,t){var r=A._fullLayout._size,s;if(v)if(t==="domain")s=function(l){return v._length*(p?1-l:l)+v._offset};else{var n=V.shapePositionToRange(v);s=function(l){return v._offset+v.r2p(n(l,!0))},v.type==="date"&&(s=V.decodeDate(s))}else p?s=function(l){return r.t+r.h*(1-l)}:s=function(l){return r.l+r.w*l};return s},V.getPixelToData=function(A,v,p,t){var r=A._fullLayout._size,s;if(v)if(t==="domain")s=function(l){var c=(l-v._offset)/v._length;return p?1-c:c};else{var n=V.rangeToShapePosition(v);s=function(l){return n(v.p2r(l-v._offset))}}else p?s=function(l){return 1-(l-r.t)/r.h}:s=function(l){return(l-r.l)/r.w};return s},V.roundPositionForSharpStrokeRendering=function(A,v){var p=Math.round(v%2)===1,t=Math.round(A);return p?t+.5:t},V.makeShapesOptionsAndPlotinfo=function(A,v){var p=A._fullLayout.shapes[v]||{},t=A._fullLayout._plots[p.xref+p.yref],r=!!t;return r?t._hadPlotinfo=!0:(t={},p.xref&&p.xref!=="paper"&&(t.xaxis=A._fullLayout[p.xref+"axis"]),p.yref&&p.yref!=="paper"&&(t.yaxis=A._fullLayout[p.yref+"axis"])),t.xsizemode=p.xsizemode,t.ysizemode=p.ysizemode,t.xanchor=p.xanchor,t.yanchor=p.yanchor,{options:p,plotinfo:t}},V.makeSelectionsOptionsAndPlotinfo=function(A,v){var p=A._fullLayout.selections[v]||{},t=A._fullLayout._plots[p.xref+p.yref],r=!!t;return r?t._hadPlotinfo=!0:(t={},p.xref&&(t.xaxis=A._fullLayout[p.xref+"axis"]),p.yref&&(t.yaxis=A._fullLayout[p.yref+"axis"])),{options:p,plotinfo:t}},V.getPathString=function(A,v){var p=v.type,t=i.getRefType(v.xref),r=i.getRefType(v.yref),s=i.getFromId(A,v.xref),n=i.getFromId(A,v.yref),l=A._fullLayout._size,c,u,g,f,w,h,o,d;if(s?t==="domain"?u=function(z){return s._offset+s._length*z}:(c=V.shapePositionToRange(s),u=function(z){return s._offset+s.r2p(c(z,!0))}):u=function(z){return l.l+l.w*z},n?r==="domain"?f=function(z){return n._offset+n._length*(1-z)}:(g=V.shapePositionToRange(n),f=function(z){return n._offset+n.r2p(g(z,!0))}):f=function(z){return l.t+l.h*(1-z)},p==="path")return s&&s.type==="date"&&(u=V.decodeDate(u)),n&&n.type==="date"&&(f=V.decodeDate(f)),L(v,u,f);if(v.xsizemode==="pixel"){var M=u(v.xanchor);w=M+v.x0,h=M+v.x1}else w=u(v.x0),h=u(v.x1);if(v.ysizemode==="pixel"){var T=f(v.yanchor);o=T-v.y0,d=T-v.y1}else o=f(v.y0),d=f(v.y1);if(p==="line")return"M"+w+","+o+"L"+h+","+d;if(p==="rect")return"M"+w+","+o+"H"+h+"V"+d+"H"+w+"Z";var C=(w+h)/2,x=(o+d)/2,S=Math.abs(C-w),b=Math.abs(x-o),a="A"+S+","+b,E=C+S+","+x,y=C+","+(x-b);return"M"+E+a+" 0 1,1 "+y+a+" 0 0,1 "+E+"Z"};function L(A,v,p){var t=A.path,r=A.xsizemode,s=A.ysizemode,n=A.xanchor,l=A.yanchor;return t.replace(m.segmentRE,function(c){var u=0,g=c.charAt(0),f=m.paramIsX[g],w=m.paramIsY[g],h=m.numParams[g],o=c.substr(1).replace(m.paramRE,function(d){return f[u]?r==="pixel"?d=v(n)+Number(d):d=v(d):w[u]&&(s==="pixel"?d=p(l)-Number(d):d=p(d)),u++,u>h&&(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;g<c.length;g++)c[g].visible&&u++;var f;if(u<2?f=s.visible=!1:f=l("visible"),!!f){s._stepCount=u;var w=s._visibleSteps=m.filterVisible(c),h=l("active");(c[h]||{}).visible||(s.active=w[0]._index),l("x"),l("y"),m.noneOrAll(r,s,["x","y"]),l("xanchor"),l("yanchor"),l("len"),l("lenmode"),l("pad.t"),l("pad.r"),l("pad.b"),l("pad.l"),m.coerceFont(l,"font",n.font);var o=l("currentvalue.visible");o&&(l("currentvalue.xanchor"),l("currentvalue.prefix"),l("currentvalue.suffix"),l("currentvalue.offset"),m.coerceFont(l,"currentvalue.font",s.font)),l("transition.duration"),l("transition.easing"),l("bgcolor"),l("activebgcolor"),l("bordercolor"),l("borderwidth"),l("ticklen"),l("tickwidth"),l("tickcolor"),l("minorticklen")}}function t(r,s){function n(u,g){return m.coerce(r,s,v,u,g)}var l;if(r.method!=="skip"&&!Array.isArray(r.args)?l=s.visible=!1:l=n("visible"),l){n("method"),n("args");var c=n("label","step-"+s._index);n("value",c),n("execute")}}},44504:function(G,V,e){var m=e(39898),P=e(74875),i=e(7901),L=e(91424),A=e(71828),v=A.strTranslate,p=e(63893),t=e(44467).arrayEditor,r=e(98292),s=e(18783),n=s.LINE_SPACING,l=s.FROM_TL,c=s.FROM_BR;G.exports=function(O){var N=O._context.staticPlot,_=O._fullLayout,U=g(_,O),Y=_._infolayer.selectAll("g."+r.containerClassName).data(U.length>0?[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;ae<U.length;ae++){var ce=U[ae];w(O,ce)}te.each(function(Q){var Z=m.select(this);a(Q),P.manageCommandObserver(O,Q,Q._visibleSteps,function(j){var K=Z.data()[0];K.active!==j.index&&(K._dragging||x(O,Z,K,j.index,!1,!0))}),h(O,m.select(this),Q)})}};function u(k){return r.autoMarginIdRoot+k._index}function g(k,O){for(var N=k[r.name],_=[],U=0;U<N.length;U++){var Y=N[U];Y.visible&&(Y._gd=O,_.push(Y))}return _}function f(k){return k._index}function w(k,O){var N=L.tester.selectAll("g."+r.labelGroupClass).data(O._visibleSteps);N.enter().append("g").classed(r.labelGroupClass,!0);var _=0,U=0;N.each(function(ee){var oe=m.select(this),q=M(oe,{step:ee},O),$=q.node();if($){var le=L.bBox($);U=Math.max(U,le.height),_=Math.max(_,le.width)}}),N.remove();var Y=O._dims={};Y.inputAreaWidth=Math.max(r.railWidth,r.gripHeight);var J=k._fullLayout._size;Y.lx=J.l+J.w*O.x,Y.ly=J.t+J.h*(1-O.y),O.lenmode==="fraction"?Y.outerLength=Math.round(J.w*O.len):Y.outerLength=O.len,Y.inputAreaStart=0,Y.inputAreaLength=Math.round(Y.outerLength-O.pad.l-O.pad.r);var te=Y.inputAreaLength-2*r.stepInset,ae=te/(O._stepCount-1),ce=_+r.labelPadding;if(Y.labelStride=Math.max(1,Math.ceil(ce/ae)),Y.labelHeight=U,Y.currentValueMaxWidth=0,Y.currentValueHeight=0,Y.currentValueTotalHeight=0,Y.currentValueMaxLines=1,O.currentvalue.visible){var Q=L.tester.append("g");N.each(function(ee){var oe=o(Q,O,ee.label),q=oe.node()&&L.bBox(oe.node())||{width:0,height:0},$=p.lineCount(oe);Y.currentValueMaxWidth=Math.max(Y.currentValueMaxWidth,Math.ceil(q.width)),Y.currentValueHeight=Math.max(Y.currentValueHeight,Math.ceil(q.height)),Y.currentValueMaxLines=Math.max(Y.currentValueMaxLines,$)}),Y.currentValueTotalHeight=Y.currentValueHeight+O.currentvalue.offset,Q.remove()}Y.height=Y.currentValueTotalHeight+r.tickOffset+O.ticklen+r.labelOffset+Y.labelHeight+O.pad.t+O.pad.b;var Z="left";A.isRightAnchor(O)&&(Y.lx-=Y.outerLength,Z="right"),A.isCenterAnchor(O)&&(Y.lx-=Y.outerLength/2,Z="center");var j="top";A.isBottomAnchor(O)&&(Y.ly-=Y.height,j="bottom"),A.isMiddleAnchor(O)&&(Y.ly-=Y.height/2,j="middle"),Y.outerLength=Math.ceil(Y.outerLength),Y.height=Math.ceil(Y.height),Y.lx=Math.round(Y.lx),Y.ly=Math.round(Y.ly);var K={y:O.y,b:Y.height*c[j],t:Y.height*l[j]};O.lenmode==="fraction"?(K.l=0,K.xl=O.x-O.len*l[Z],K.r=0,K.xr=O.x+O.len*c[Z]):(K.x=O.x,K.l=Y.outerLength*l[Z],K.r=Y.outerLength*c[Z]),P.autoMargin(k,u(O),K)}function h(k,O,N){(N.steps[N.active]||{}).visible||(N.active=N._visibleSteps[0]._index),O.call(o,N).call(B,N).call(T,N).call(b,N).call(I,k,N).call(d,k,N);var _=N._dims;L.setTranslate(O,_.lx+N.pad.l,_.ly+N.pad.t),O.call(E,N,!1),O.call(o,N)}function o(k,O,N){if(O.currentvalue.visible){var _=O._dims,U,Y;switch(O.currentvalue.xanchor){case"right":U=_.inputAreaLength-r.currentValueInset-_.currentValueMaxWidth,Y="left";break;case"center":U=_.inputAreaLength*.5,Y="middle";break;default:U=r.currentValueInset,Y="left"}var J=A.ensureSingle(k,"text",r.labelClass,function(j){j.attr({"text-anchor":Y,"data-notex":1})}),te=O.currentvalue.prefix?O.currentvalue.prefix:"";if(typeof N=="string")te+=N;else{var ae=O.steps[O.active].label,ce=O._gd._fullLayout._meta;ce&&(ae=A.templateString(ae,ce)),te+=ae}O.currentvalue.suffix&&(te+=O.currentvalue.suffix),J.call(L.font,O.currentvalue.font).text(te).call(p.convertToTspans,O._gd);var Q=p.lineCount(J),Z=(_.currentValueMaxLines+1-Q)*O.currentvalue.font.size*n;return p.positionText(J,U,Z),J}}function d(k,O,N){var _=A.ensureSingle(k,"rect",r.gripRectClass,function(U){U.call(S,O,k,N).style("pointer-events","all")});_.attr({width:r.gripWidth,height:r.gripHeight,rx:r.gripRadius,ry:r.gripRadius}).call(i.stroke,N.bordercolor).call(i.fill,N.bgcolor).style("stroke-width",N.borderwidth+"px")}function M(k,O,N){var _=A.ensureSingle(k,"text",r.labelClass,function(J){J.attr({"text-anchor":"middle","data-notex":1})}),U=O.step.label,Y=N._gd._fullLayout._meta;return Y&&(U=A.templateString(U,Y)),_.call(L.font,N.font).text(U).call(p.convertToTspans,N._gd),_}function T(k,O){var N=A.ensureSingle(k,"g",r.labelsClass),_=O._dims,U=N.selectAll("g."+r.labelGroupClass).data(_.labelSteps);U.enter().append("g").classed(r.labelGroupClass,!0),U.exit().remove(),U.each(function(Y){var J=m.select(this);J.call(M,Y,O),L.setTranslate(J,y(O,Y.fraction),r.tickOffset+O.ticklen+O.font.size*n+r.labelOffset+_.currentValueTotalHeight)})}function C(k,O,N,_,U){var Y=Math.round(_*(N._stepCount-1)),J=N._visibleSteps[Y]._index;J!==N.active&&x(k,O,N,J,!0,U)}function x(k,O,N,_,U,Y){var J=N.active;N.active=_,t(k.layout,r.name,N).applyUpdate("active",_);var te=N.steps[N.active];O.call(E,N,Y),O.call(o,N),k.emit("plotly_sliderchange",{slider:N,step:N.steps[N.active],interaction:U,previousActive:J}),te&&te.method&&U&&(O._nextMethod?(O._nextMethod.step=te,O._nextMethod.doCallback=U,O._nextMethod.doTransition=Y):(O._nextMethod={step:te,doCallback:U,doTransition:Y},O._nextMethodRaf=window.requestAnimationFrame(function(){var ae=O._nextMethod.step;ae.method&&(ae.execute&&P.executeAPICommand(k,ae.method,ae.args),O._nextMethod=null,O._nextMethodRaf=null)})))}function S(k,O,N){if(O._context.staticPlot)return;var _=N.node(),U=m.select(O);function Y(){return N.data()[0]}function J(){var te=Y();O.emit("plotly_sliderstart",{slider:te});var ae=N.select("."+r.gripRectClass);m.event.stopPropagation(),m.event.preventDefault(),ae.call(i.fill,te.activebgcolor);var ce=z(te,m.mouse(_)[0]);C(O,N,te,ce,!0),te._dragging=!0;function Q(){var j=Y(),K=z(j,m.mouse(_)[0]);C(O,N,j,K,!1)}U.on("mousemove",Q),U.on("touchmove",Q);function Z(){var j=Y();j._dragging=!1,ae.call(i.fill,j.bgcolor),U.on("mouseup",null),U.on("mousemove",null),U.on("touchend",null),U.on("touchmove",null),O.emit("plotly_sliderend",{slider:j,step:j.steps[j.active]})}U.on("mouseup",Z),U.on("touchend",Z)}k.on("mousedown",J),k.on("touchstart",J)}function b(k,O){var N=k.selectAll("rect."+r.tickRectClass).data(O._visibleSteps),_=O._dims;N.enter().append("rect").classed(r.tickRectClass,!0),N.exit().remove(),N.attr({width:O.tickwidth+"px","shape-rendering":"crispEdges"}),N.each(function(U,Y){var J=Y%_.labelStride===0,te=m.select(this);te.attr({height:J?O.ticklen:O.minorticklen}).call(i.fill,O.tickcolor),L.setTranslate(te,y(O,Y/(O._stepCount-1))-.5*O.tickwidth,(J?r.tickOffset:r.minorTickOffset)+_.currentValueTotalHeight)})}function a(k){var O=k._dims;O.labelSteps=[];for(var N=k._stepCount,_=0;_<N;_+=O.labelStride)O.labelSteps.push({fraction:_/(N-1),step:k._visibleSteps[_]})}function E(k,O,N){for(var _=k.select("rect."+r.gripRectClass),U=0,Y=0;Y<O._stepCount;Y++)if(O._visibleSteps[Y]._index===O.active){U=Y;break}var J=y(O,U/(O._stepCount-1));if(!O._invokingCommand){var te=_;N&&O.transition.duration>0&&(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;U<B.length;U++){var Y=B[U];S(z,Y)}var J="updatemenus"+I._uid,te=new s(z,_,J);N.enter().size()&&(_.node().parentNode.appendChild(_.node()),_.call(E)),N.exit().each(function(ae){_.call(E),k(ae)}).remove(),N.each(function(ae){var ce=m.select(this),Q=ae.type==="dropdown"?_:null;P.manageCommandObserver(z,ae,ae.buttons,function(Z){u(z,ae,ae.buttons[Z.index],ce,Q,te,Z.index,!0)}),ae.type==="dropdown"?(g(z,ce,_,te,ae),c(_,ae)&&f(z,ce,_,te,ae)):f(z,ce,null,null,ae)})}};function n(y){return y._index}function l(y){return+y.attr(r.menuIndexAttrName)==-1}function c(y,z){return+y.attr(r.menuIndexAttrName)===z._index}function u(y,z,I,B,k,O,N,_){z.active=N,p(y.layout,r.name,z).applyUpdate("active",N),z.type==="buttons"?f(y,B,null,null,z):z.type==="dropdown"&&(k.attr(r.menuIndexAttrName,"-1"),g(y,B,k,O,z),_||f(y,B,k,O,z))}function g(y,z,I,B,k){var O=A.ensureSingle(z,"g",r.headerClassName,function(ae){ae.style("pointer-events","all")}),N=k._dims,_=k.active,U=k.buttons[_]||r.blankHeaderOpts,Y={y:k.pad.t,yPad:0,x:k.pad.l,xPad:0,index:0},J={width:N.headerWidth,height:N.headerHeight};O.call(o,k,U,y).call(a,k,Y,J);var te=A.ensureSingle(z,"text",r.headerArrowClassName,function(ae){ae.attr("text-anchor","end").call(L.font,k.font).text(r.arrowSymbol[k.direction])});te.attr({x:N.headerWidth-r.arrowOffsetX+k.pad.l,y:N.headerHeight/2+r.textOffsetY+k.pad.t}),O.on("click",function(){I.call(E,String(c(I,k)?-1:k._index)),f(y,z,I,B,k)}),O.on("mouseover",function(){O.call(C)}),O.on("mouseout",function(){O.call(x,k)}),L.setTranslate(z,N.lx,N.ly)}function f(y,z,I,B,k){I||(I=z,I.attr("pointer-events","all"));var O=!l(I)||k.type==="buttons"?k.buttons:[],N=k.type==="dropdown"?r.dropdownButtonClassName:r.buttonClassName,_=I.selectAll("g."+N).data(A.filterVisible(O)),U=_.enter().append("g").classed(N,!0),Y=_.exit();k.type==="dropdown"?(U.attr("opacity","0").transition().attr("opacity","1"),Y.transition().attr("opacity","0").remove()):Y.remove();var J=0,te=0,ae=k._dims,ce=["up","down"].indexOf(k.direction)!==-1;k.type==="dropdown"&&(ce?te=ae.headerHeight+r.gapButtonHeader:J=ae.headerWidth+r.gapButtonHeader),k.type==="dropdown"&&k.direction==="up"&&(te=-r.gapButtonHeader+r.gapButton-ae.openHeight),k.type==="dropdown"&&k.direction==="left"&&(J=-r.gapButtonHeader+r.gapButton-ae.openWidth);var Q={x:ae.lx+J+k.pad.l,y:ae.ly+te+k.pad.t,yPad:r.gapButton,xPad:r.gapButton,index:0},Z={l:Q.x+k.borderwidth,t:Q.y+k.borderwidth};_.each(function(j,K){var ee=m.select(this);ee.call(o,k,j,y).call(a,k,Q),ee.on("click",function(){m.event.defaultPrevented||(j.execute&&(j.args2&&k.active===K?(u(y,k,j,z,I,B,-1),P.executeAPICommand(y,j.method,j.args2)):(u(y,k,j,z,I,B,K),P.executeAPICommand(y,j.method,j.args))),y.emit("plotly_buttonclicked",{menu:k,button:j,active:k.active}))}),ee.on("mouseover",function(){ee.call(C)}),ee.on("mouseout",function(){ee.call(x,k),_.call(T,k)})}),_.call(T,k),ce?(Z.w=Math.max(ae.openWidth,ae.headerWidth),Z.h=Q.y-Z.t):(Z.w=Q.x-Z.l,Z.h=Math.max(ae.openHeight,ae.headerHeight)),Z.direction=k.direction,B&&(_.size()?w(y,z,I,B,k,Z):h(B))}function w(y,z,I,B,k,O){var N=k.direction,_=N==="up"||N==="down",U=k._dims,Y=k.active,J,te,ae;if(_)for(te=0,ae=0;ae<Y;ae++)te+=U.heights[ae]+r.gapButton;else for(J=0,ae=0;ae<Y;ae++)J+=U.widths[ae]+r.gapButton;B.enable(O,J,te),B.hbar&&B.hbar.attr("opacity","0").transition().attr("opacity","1"),B.vbar&&B.vbar.attr("opacity","0").transition().attr("opacity","1")}function h(y){var z=!!y.hbar,I=!!y.vbar;z&&y.hbar.transition().attr("opacity","0").each("end",function(){z=!1,I||y.disable()}),I&&y.vbar.transition().attr("opacity","0").each("end",function(){I=!1,z||y.disable()})}function o(y,z,I,B){y.call(d,z).call(M,z,I,B)}function d(y,z){var I=A.ensureSingle(y,"rect",r.itemRectClassName,function(B){B.attr({rx:r.rx,ry:r.ry,"shape-rendering":"crispEdges"})});I.call(i.stroke,z.bordercolor).call(i.fill,z.bgcolor).style("stroke-width",z.borderwidth+"px")}function M(y,z,I,B){var k=A.ensureSingle(y,"text",r.itemTextClassName,function(_){_.attr({"text-anchor":"start","data-notex":1})}),O=I.label,N=B._fullLayout._meta;N&&(O=A.templateString(O,N)),k.call(L.font,z.font).text(O).call(v.convertToTspans,B)}function T(y,z){var I=z.active;y.each(function(B,k){var O=m.select(this);k===I&&z.showactive&&O.select("rect."+r.itemRectClassName).call(i.fill,r.activeColor)})}function C(y){y.select("rect."+r.itemRectClassName).call(i.fill,r.hoverColor)}function x(y,z){y.select("rect."+r.itemRectClassName).call(i.fill,z.bgcolor)}function S(y,z){var I=z._dims={width1:0,height1:0,heights:[],widths:[],totalWidth:0,totalHeight:0,openWidth:0,openHeight:0,lx:0,ly:0},B=L.tester.selectAll("g."+r.dropdownButtonClassName).data(A.filterVisible(z.buttons));B.enter().append("g").classed(r.dropdownButtonClassName,!0);var k=["up","down"].indexOf(z.direction)!==-1;B.each(function(J,te){var ae=m.select(this);ae.call(o,z,J,y);var ce=ae.select("."+r.itemTextClassName),Q=ce.node()&&L.bBox(ce.node()).width,Z=Math.max(Q+r.textPadX,r.minWidth),j=z.font.size*t,K=v.lineCount(ce),ee=Math.max(j*K,r.minHeight)+r.textOffsetY;ee=Math.ceil(ee),Z=Math.ceil(Z),I.widths[te]=Z,I.heights[te]=ee,I.height1=Math.max(I.height1,ee),I.width1=Math.max(I.width1,Z),k?(I.totalWidth=Math.max(I.totalWidth,Z),I.openWidth=I.totalWidth,I.totalHeight+=ee+r.gapButton,I.openHeight+=ee+r.gapButton):(I.totalWidth+=Z+r.gapButton,I.openWidth+=Z+r.gapButton,I.totalHeight=Math.max(I.totalHeight,ee),I.openHeight=I.totalHeight)}),k?I.totalHeight-=r.gapButton:I.totalWidth-=r.gapButton,I.headerWidth=I.width1+r.arrowPadX,I.headerHeight=I.height1,z.type==="dropdown"&&(k?(I.width1+=r.arrowPadX,I.totalHeight=I.height1):I.totalWidth=I.width1,I.totalWidth+=r.arrowPadX),B.remove();var O=I.totalWidth+z.pad.l+z.pad.r,N=I.totalHeight+z.pad.t+z.pad.b,_=y._fullLayout._size;I.lx=_.l+_.w*z.x,I.ly=_.t+_.h*(1-z.y);var U="left";A.isRightAnchor(z)&&(I.lx-=O,U="right"),A.isCenterAnchor(z)&&(I.lx-=O/2,U="center");var Y="top";A.isBottomAnchor(z)&&(I.ly-=N,Y="bottom"),A.isMiddleAnchor(z)&&(I.ly-=N/2,Y="middle"),I.totalWidth=Math.ceil(I.totalWidth),I.totalHeight=Math.ceil(I.totalHeight),I.lx=Math.round(I.lx),I.ly=Math.round(I.ly),P.autoMargin(y,b(z),{x:z.x,y:z.y,l:O*({right:1,center:.5}[U]||0),r:O*({left:1,center:.5}[U]||0),b:N*({top:1,middle:.5}[Y]||0),t:N*({bottom:1,middle:.5}[Y]||0)})}function b(y){return r.autoMarginIdRoot+y._index}function a(y,z,I,B){B=B||{};var k=y.select("."+r.itemRectClassName),O=y.select("."+r.itemTextClassName),N=z.borderwidth,_=I.index,U=z._dims;L.setTranslate(y,N+I.x,N+I.y);var Y=["up","down"].indexOf(z.direction)!==-1,J=B.height||(Y?U.heights[_]:U.height1);k.attr({x:0,y:0,width:B.width||(Y?U.width1:U.widths[_]),height:J});var te=z.font.size*t,ae=v.lineCount(O),ce=(ae-1)*te/2;v.positionText(O,r.textOffsetX,J/2-ce+r.textOffsetY),Y?I.y+=U.heights[_]+I.yPad:I.x+=U.widths[_]+I.xPad,I.index++}function E(y,z){y.attr(r.menuIndexAttrName,z||"-1").selectAll("g."+r.dropdownButtonClassName).remove()}},20763:function(G,V,e){var m=e(75909);G.exports={moduleType:"component",name:m.name,layoutAttributes:e(7163),supplyLayoutDefaults:e(64897),draw:e(13689)}},25849:function(G,V,e){G.exports=A;var m=e(39898),P=e(7901),i=e(91424),L=e(71828);function A(v,p,t){this.gd=v,this.container=p,this.id=t,this.position=null,this.translateX=null,this.translateY=null,this.hbar=null,this.vbar=null,this.bg=this.container.selectAll("rect.scrollbox-bg").data([0]),this.bg.exit().on(".drag",null).on("wheel",null).remove(),this.bg.enter().append("rect").classed("scrollbox-bg",!0).style("pointer-events","all").attr({opacity:0,x:0,y:0,width:0,height:0})}A.barWidth=2,A.barLength=20,A.barRadius=2,A.barPad=1,A.barColor="#808BA4",A.prototype.enable=function(p,t,r){var s=this.gd._fullLayout,n=s.width,l=s.height;this.position=p;var c=this.position.l,u=this.position.w,g=this.position.t,f=this.position.h,w=this.position.direction,h=w==="down",o=w==="left",d=w==="right",M=w==="up",T=u,C=f,x,S,b,a;!h&&!o&&!d&&!M&&(this.position.direction="down",h=!0);var E=h||M;E?(x=c,S=x+T,h?(b=g,a=Math.min(b+C,l),C=a-b):(a=g+C,b=Math.max(a-C,0),C=a-b)):(b=g,a=b+C,o?(S=c+T,x=Math.max(S-T,0),T=S-x):(x=c,S=Math.min(x+T,n),T=S-x)),this._box={l:x,t:b,w:T,h:C};var y=u>T,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<L.length;A++){var v=L[A];v.charAt(0)!=="_"&&(V[v]=i[v]),P({moduleType:"apiMethod",name:v,fn:i[v]})}P(e(67368)),P([e(32745),e(2468),e(47322),e(89853),e(68804),e(20763),e(23243),e(13137),e(97218),e(83312),e(37369),e(21081),e(12311),e(2199),e(30211),e(64168)]),P([e(92177),e(37815)]),window.PlotlyLocales&&Array.isArray(window.PlotlyLocales)&&(P(window.PlotlyLocales),delete window.PlotlyLocales),V.Icons=e(24255);var p=e(30211),t=e(74875);V.Plots={resize:t.resize,graphJson:t.graphJson,sendDataToCloud:t.sendDataToCloud},V.Fx={hover:p.hover,unhover:p.unhover,loneHover:p.loneHover,loneUnhover:p.loneUnhover},V.Snapshot=e(44511),V.PlotSchema=e(86281)},24255:function(G){G.exports={undo:{width:857.1,height:1e3,path:"m857 350q0-87-34-166t-91-137-137-92-166-34q-96 0-183 41t-147 114q-4 6-4 13t5 11l76 77q6 5 14 5 9-1 13-7 41-53 100-82t126-29q58 0 110 23t92 61 61 91 22 111-22 111-61 91-92 61-110 23q-55 0-105-20t-90-57l77-77q17-16 8-38-10-23-33-23h-250q-15 0-25 11t-11 25v250q0 24 22 33 22 10 39-8l72-72q60 57 137 88t159 31q87 0 166-34t137-92 91-137 34-166z",transform:"matrix(1 0 0 -1 0 850)"},home:{width:928.6,height:1e3,path:"m786 296v-267q0-15-11-26t-25-10h-214v214h-143v-214h-214q-15 0-25 10t-11 26v267q0 1 0 2t0 2l321 264 321-264q1-1 1-4z m124 39l-34-41q-5-5-12-6h-2q-7 0-12 3l-386 322-386-322q-7-4-13-4-7 2-12 7l-35 41q-4 5-3 13t6 12l401 334q18 15 42 15t43-15l136-114v109q0 8 5 13t13 5h107q8 0 13-5t5-13v-227l122-102q5-5 6-12t-4-13z",transform:"matrix(1 0 0 -1 0 850)"},"camera-retro":{width:1e3,height:1e3,path:"m518 386q0 8-5 13t-13 5q-37 0-63-27t-26-63q0-8 5-13t13-5 12 5 5 13q0 23 16 38t38 16q8 0 13 5t5 13z m125-73q0-59-42-101t-101-42-101 42-42 101 42 101 101 42 101-42 42-101z m-572-320h858v71h-858v-71z m643 320q0 89-62 152t-152 62-151-62-63-152 63-151 151-63 152 63 62 151z m-571 358h214v72h-214v-72z m-72-107h858v143h-462l-36-71h-360v-72z m929 143v-714q0-30-21-51t-50-21h-858q-29 0-50 21t-21 51v714q0 30 21 51t50 21h858q29 0 50-21t21-51z",transform:"matrix(1 0 0 -1 0 850)"},zoombox:{width:1e3,height:1e3,path:"m1000-25l-250 251c40 63 63 138 63 218 0 224-182 406-407 406-224 0-406-182-406-406s183-406 407-406c80 0 155 22 218 62l250-250 125 125z m-812 250l0 438 437 0 0-438-437 0z m62 375l313 0 0-312-313 0 0 312z",transform:"matrix(1 0 0 -1 0 850)"},pan:{width:1e3,height:1e3,path:"m1000 350l-187 188 0-125-250 0 0 250 125 0-188 187-187-187 125 0 0-250-250 0 0 125-188-188 186-187 0 125 252 0 0-250-125 0 187-188 188 188-125 0 0 250 250 0 0-126 187 188z",transform:"matrix(1 0 0 -1 0 850)"},zoom_plus:{width:875,height:1e3,path:"m1 787l0-875 875 0 0 875-875 0z m687-500l-187 0 0-187-125 0 0 187-188 0 0 125 188 0 0 187 125 0 0-187 187 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},zoom_minus:{width:875,height:1e3,path:"m0 788l0-876 875 0 0 876-875 0z m688-500l-500 0 0 125 500 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},autoscale:{width:1e3,height:1e3,path:"m250 850l-187 0-63 0 0-62 0-188 63 0 0 188 187 0 0 62z m688 0l-188 0 0-62 188 0 0-188 62 0 0 188 0 62-62 0z m-875-938l0 188-63 0 0-188 0-62 63 0 187 0 0 62-187 0z m875 188l0-188-188 0 0-62 188 0 62 0 0 62 0 188-62 0z m-125 188l-1 0-93-94-156 156 156 156 92-93 2 0 0 250-250 0 0-2 93-92-156-156-156 156 94 92 0 2-250 0 0-250 0 0 93 93 157-156-157-156-93 94 0 0 0-250 250 0 0 0-94 93 156 157 156-157-93-93 0 0 250 0 0 250z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_basic:{width:1500,height:1e3,path:"m375 725l0 0-375-375 375-374 0-1 1125 0 0 750-1125 0z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_compare:{width:1125,height:1e3,path:"m187 786l0 2-187-188 188-187 0 0 937 0 0 373-938 0z m0-499l0 1-187-188 188-188 0 0 937 0 0 376-938-1z",transform:"matrix(1 0 0 -1 0 850)"},plotlylogo:{width:1542,height:1e3,path:"m0-10h182v-140h-182v140z m228 146h183v-286h-183v286z m225 714h182v-1000h-182v1000z m225-285h182v-715h-182v715z m225 142h183v-857h-183v857z m231-428h182v-429h-182v429z m225-291h183v-138h-183v138z",transform:"matrix(1 0 0 -1 0 850)"},"z-axis":{width:1e3,height:1e3,path:"m833 5l-17 108v41l-130-65 130-66c0 0 0 38 0 39 0-1 36-14 39-25 4-15-6-22-16-30-15-12-39-16-56-20-90-22-187-23-279-23-261 0-341 34-353 59 3 60 228 110 228 110-140-8-351-35-351-116 0-120 293-142 474-142 155 0 477 22 477 142 0 50-74 79-163 96z m-374 94c-58-5-99-21-99-40 0-24 65-43 144-43 79 0 143 19 143 43 0 19-42 34-98 40v216h87l-132 135-133-135h88v-216z m167 515h-136v1c16 16 31 34 46 52l84 109v54h-230v-71h124v-1c-16-17-28-32-44-51l-89-114v-51h245v72z",transform:"matrix(1 0 0 -1 0 850)"},"3d_rotate":{width:1e3,height:1e3,path:"m922 660c-5 4-9 7-14 11-359 263-580-31-580-31l-102 28 58-400c0 1 1 1 2 2 118 108 351 249 351 249s-62 27-100 42c88 83 222 183 347 122 16-8 30-17 44-27-2 1-4 2-6 4z m36-329c0 0 64 229-88 296-62 27-124 14-175-11 157-78 225-208 249-266 8-19 11-31 11-31 2 5 6 15 11 32-5-13-8-20-8-20z m-775-239c70-31 117-50 198-32-121 80-199 346-199 346l-96-15-58-12c0 0 55-226 155-287z m603 133l-317-139c0 0 4-4 19-14 7-5 24-15 24-15s-177-147-389 4c235-287 536-112 536-112l31-22 100 299-4-1z m-298-153c6-4 14-9 24-15 0 0-17 10-24 15z",transform:"matrix(1 0 0 -1 0 850)"},camera:{width:1e3,height:1e3,path:"m500 450c-83 0-150-67-150-150 0-83 67-150 150-150 83 0 150 67 150 150 0 83-67 150-150 150z m400 150h-120c-16 0-34 13-39 29l-31 93c-6 15-23 28-40 28h-340c-16 0-34-13-39-28l-31-94c-6-15-23-28-40-28h-120c-55 0-100-45-100-100v-450c0-55 45-100 100-100h800c55 0 100 45 100 100v450c0 55-45 100-100 100z m-400-550c-138 0-250 112-250 250 0 138 112 250 250 250 138 0 250-112 250-250 0-138-112-250-250-250z m365 380c-19 0-35 16-35 35 0 19 16 35 35 35 19 0 35-16 35-35 0-19-16-35-35-35z",transform:"matrix(1 0 0 -1 0 850)"},movie:{width:1e3,height:1e3,path:"m938 413l-188-125c0 37-17 71-44 94 64 38 107 107 107 187 0 121-98 219-219 219-121 0-219-98-219-219 0-61 25-117 66-156h-115c30 33 49 76 49 125 0 103-84 187-187 187s-188-84-188-187c0-57 26-107 65-141-38-22-65-62-65-109v-250c0-70 56-126 125-126h500c69 0 125 56 125 126l188-126c34 0 62 28 62 63v375c0 35-28 63-62 63z m-750 0c-69 0-125 56-125 125s56 125 125 125 125-56 125-125-56-125-125-125z m406-1c-87 0-157 70-157 157 0 86 70 156 157 156s156-70 156-156-70-157-156-157z",transform:"matrix(1 0 0 -1 0 850)"},question:{width:857.1,height:1e3,path:"m500 82v107q0 8-5 13t-13 5h-107q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h107q8 0 13 5t5 13z m143 375q0 49-31 91t-77 65-95 23q-136 0-207-119-9-14 4-24l74-55q4-4 10-4 9 0 14 7 30 38 48 51 19 14 48 14 27 0 48-15t21-33q0-21-11-34t-38-25q-35-16-65-48t-29-70v-20q0-8 5-13t13-5h107q8 0 13 5t5 13q0 10 12 27t30 28q18 10 28 16t25 19 25 27 16 34 7 45z m214-107q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z",transform:"matrix(1 0 0 -1 0 850)"},disk:{width:857.1,height:1e3,path:"m214-7h429v214h-429v-214z m500 0h72v500q0 8-6 21t-11 20l-157 156q-5 6-19 12t-22 5v-232q0-22-15-38t-38-16h-322q-22 0-37 16t-16 38v232h-72v-714h72v232q0 22 16 38t37 16h465q22 0 38-16t15-38v-232z m-214 518v178q0 8-5 13t-13 5h-107q-7 0-13-5t-5-13v-178q0-8 5-13t13-5h107q7 0 13 5t5 13z m357-18v-518q0-22-15-38t-38-16h-750q-23 0-38 16t-16 38v750q0 22 16 38t38 16h517q23 0 50-12t42-26l156-157q16-15 27-42t11-49z",transform:"matrix(1 0 0 -1 0 850)"},drawopenpath:{width:70,height:70,path:"M33.21,85.65a7.31,7.31,0,0,1-2.59-.48c-8.16-3.11-9.27-19.8-9.88-41.3-.1-3.58-.19-6.68-.35-9-.15-2.1-.67-3.48-1.43-3.79-2.13-.88-7.91,2.32-12,5.86L3,32.38c1.87-1.64,11.55-9.66,18.27-6.9,2.13.87,4.75,3.14,5.17,9,.17,2.43.26,5.59.36,9.25a224.17,224.17,0,0,0,1.5,23.4c1.54,10.76,4,12.22,4.48,12.4.84.32,2.79-.46,5.76-3.59L43,80.07C41.53,81.57,37.68,85.64,33.21,85.65ZM74.81,69a11.34,11.34,0,0,0,6.09-6.72L87.26,44.5,74.72,32,56.9,38.35c-2.37.86-5.57,3.42-6.61,6L38.65,72.14l8.42,8.43ZM55,46.27a7.91,7.91,0,0,1,3.64-3.17l14.8-5.3,8,8L76.11,60.6l-.06.19a6.37,6.37,0,0,1-3,3.43L48.25,74.59,44.62,71Zm16.57,7.82A6.9,6.9,0,1,0,64.64,61,6.91,6.91,0,0,0,71.54,54.09Zm-4.05,0a2.85,2.85,0,1,1-2.85-2.85A2.86,2.86,0,0,1,67.49,54.09Zm-4.13,5.22L60.5,56.45,44.26,72.7l2.86,2.86ZM97.83,35.67,84.14,22l-8.57,8.57L89.26,44.24Zm-13.69-8,8,8-2.85,2.85-8-8Z",transform:"matrix(1 0 0 1 -15 -15)"},drawclosedpath:{width:90,height:90,path:"M88.41,21.12a26.56,26.56,0,0,0-36.18,0l-2.07,2-2.07-2a26.57,26.57,0,0,0-36.18,0,23.74,23.74,0,0,0,0,34.8L48,90.12a3.22,3.22,0,0,0,4.42,0l36-34.21a23.73,23.73,0,0,0,0-34.79ZM84,51.24,50.16,83.35,16.35,51.25a17.28,17.28,0,0,1,0-25.47,20,20,0,0,1,27.3,0l4.29,4.07a3.23,3.23,0,0,0,4.44,0l4.29-4.07a20,20,0,0,1,27.3,0,17.27,17.27,0,0,1,0,25.46ZM66.76,47.68h-33v6.91h33ZM53.35,35H46.44V68h6.91Z",transform:"matrix(1 0 0 1 -5 -5)"},lasso:{width:1031,height:1e3,path:"m1018 538c-36 207-290 336-568 286-277-48-473-256-436-463 10-57 36-108 76-151-13-66 11-137 68-183 34-28 75-41 114-42l-55-70 0 0c-2-1-3-2-4-3-10-14-8-34 5-45 14-11 34-8 45 4 1 1 2 3 2 5l0 0 113 140c16 11 31 24 45 40 4 3 6 7 8 11 48-3 100 0 151 9 278 48 473 255 436 462z m-624-379c-80 14-149 48-197 96 42 42 109 47 156 9 33-26 47-66 41-105z m-187-74c-19 16-33 37-39 60 50-32 109-55 174-68-42-25-95-24-135 8z m360 75c-34-7-69-9-102-8 8 62-16 128-68 170-73 59-175 54-244-5-9 20-16 40-20 61-28 159 121 317 333 354s407-60 434-217c28-159-121-318-333-355z",transform:"matrix(1 0 0 -1 0 850)"},selectbox:{width:1e3,height:1e3,path:"m0 850l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-285l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z",transform:"matrix(1 0 0 -1 0 850)"},drawline:{width:70,height:70,path:"M60.64,62.3a11.29,11.29,0,0,0,6.09-6.72l6.35-17.72L60.54,25.31l-17.82,6.4c-2.36.86-5.57,3.41-6.6,6L24.48,65.5l8.42,8.42ZM40.79,39.63a7.89,7.89,0,0,1,3.65-3.17l14.79-5.31,8,8L61.94,54l-.06.19a6.44,6.44,0,0,1-3,3.43L34.07,68l-3.62-3.63Zm16.57,7.81a6.9,6.9,0,1,0-6.89,6.9A6.9,6.9,0,0,0,57.36,47.44Zm-4,0a2.86,2.86,0,1,1-2.85-2.85A2.86,2.86,0,0,1,53.32,47.44Zm-4.13,5.22L46.33,49.8,30.08,66.05l2.86,2.86ZM83.65,29,70,15.34,61.4,23.9,75.09,37.59ZM70,21.06l8,8-2.84,2.85-8-8ZM87,80.49H10.67V87H87Z",transform:"matrix(1 0 0 1 -15 -15)"},drawrect:{width:80,height:80,path:"M78,22V79H21V22H78m9-9H12V88H87V13ZM68,46.22H31V54H68ZM53,32H45.22V69H53Z",transform:"matrix(1 0 0 1 -10 -10)"},drawcircle:{width:80,height:80,path:"M50,84.72C26.84,84.72,8,69.28,8,50.3S26.84,15.87,50,15.87,92,31.31,92,50.3,73.16,84.72,50,84.72Zm0-60.59c-18.6,0-33.74,11.74-33.74,26.17S31.4,76.46,50,76.46,83.74,64.72,83.74,50.3,68.6,24.13,50,24.13Zm17.15,22h-34v7.11h34Zm-13.8-13H46.24v34h7.11Z",transform:"matrix(1 0 0 1 -10 -10)"},eraseshape:{width:80,height:80,path:"M82.77,78H31.85L6,49.57,31.85,21.14H82.77a8.72,8.72,0,0,1,8.65,8.77V69.24A8.72,8.72,0,0,1,82.77,78ZM35.46,69.84H82.77a.57.57,0,0,0,.49-.6V29.91a.57.57,0,0,0-.49-.61H35.46L17,49.57Zm32.68-34.7-24,24,5,5,24-24Zm-19,.53-5,5,24,24,5-5Z",transform:"matrix(1 0 0 1 -10 -10)"},spikeline:{width:1e3,height:1e3,path:"M512 409c0-57-46-104-103-104-57 0-104 47-104 104 0 57 47 103 104 103 57 0 103-46 103-103z m-327-39l92 0 0 92-92 0z m-185 0l92 0 0 92-92 0z m370-186l92 0 0 93-92 0z m0-184l92 0 0 92-92 0z",transform:"matrix(1.5 0 0 -1.5 0 850)"},pencil:{width:1792,height:1792,path:"M491 1536l91-91-235-235-91 91v107h128v128h107zm523-928q0-22-22-22-10 0-17 7l-542 542q-7 7-7 17 0 22 22 22 10 0 17-7l542-542q7-7 7-17zm-54-192l416 416-832 832h-416v-416zm683 96q0 53-37 90l-166 166-416-416 166-165q36-38 90-38 53 0 91 38l235 234q37 39 37 91z",transform:"matrix(1 0 0 1 0 1)"},newplotlylogo:{name:"newplotlylogo",svg:["<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 132 132'>","<defs>"," <style>"," .cls-0{fill:#000;}"," .cls-1{fill:#FFF;}"," .cls-2{fill:#F26;}"," .cls-3{fill:#D69;}"," .cls-4{fill:#BAC;}"," .cls-5{fill:#9EF;}"," </style>","</defs>"," <title>plotly-logomark</title>"," <g id='symbol'>"," <rect class='cls-0' x='0' y='0' width='132' height='132' rx='18' ry='18'/>"," <circle class='cls-5' cx='102' cy='30' r='6'/>"," <circle class='cls-4' cx='78' cy='30' r='6'/>"," <circle class='cls-4' cx='78' cy='54' r='6'/>"," <circle class='cls-3' cx='54' cy='30' r='6'/>"," <circle class='cls-2' cx='30' cy='30' r='6'/>"," <circle class='cls-2' cx='30' cy='54' r='6'/>"," <path class='cls-1' d='M30,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,30,72Z'/>"," <path class='cls-1' d='M78,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,78,72Z'/>"," <path class='cls-1' d='M54,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,54,48Z'/>"," <path class='cls-1' d='M102,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,102,48Z'/>"," </g>","</svg>"].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]<h[1]?(o=h[0],d=h[1]):(o=h[1],d=h[0]),o=P(o,A),d=P(d,A),o>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]<o[1]?(M=o[0],T=o[1]):(M=o[1],T=o[0]),w>=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):o<d?(S=o,a=d):(S=d,a=o),w<h?(E=w,y=h):(E=h,y=w);function z(O,N){return[O*Math.cos(N)+M,T-O*Math.sin(N)]}var I=Math.abs(a-S)<=L?0:1;function B(O,N,_){return"A"+[O,O]+" "+[0,I,_]+" "+z(O,N)}var k;return x?E===null?k="M"+z(y,S)+B(y,b,0)+B(y,a,0)+"Z":k="M"+z(E,S)+B(E,b,0)+B(E,a,0)+"ZM"+z(y,S)+B(y,b,1)+B(y,a,1)+"Z":E===null?(k="M"+z(y,S)+B(y,a,0),C&&(k+="L0,0Z")):k="M"+z(E,S)+"L"+z(y,S)+B(y,a,0)+"L"+z(E,a)+B(E,S,1)+"Z",k}function u(w,h,o,d,M){return c(null,w,h,o,d,M,0)}function g(w,h,o,d,M){return c(null,w,h,o,d,M,1)}function f(w,h,o,d,M,T){return c(w,h,o,d,M,T,1)}G.exports={deg2rad:v,rad2deg:p,angleDelta:r,angleDist:s,isFullCircle:t,isAngleInsideSector:n,isPtInsideSector:l,pathArc:u,pathSector:g,pathAnnulus:f}},73627:function(G,V){var e=Array.isArray,m=ArrayBuffer,P=DataView;function i(p){return m.isView(p)&&!(p instanceof P)}V.isTypedArray=i;function L(p){return e(p)||i(p)}V.isArrayOrTypedArray=L;function A(p){return!L(p[0])}V.isArray1D=A,V.ensureArray=function(p,t){return e(p)||(p=[]),p.length=t,p},V.concat=function(){var p=[],t=!0,r=0,s,n,l,c,u,g,f,w;for(l=0;l<arguments.length;l++)c=arguments[l],g=c.length,g&&(n?p.push(c):(n=c,u=g),e(c)?s=!1:(t=!1,r?s!==c.constructor&&(s=!1):s=c.constructor),r+=g);if(!r)return[];if(!p.length)return n;if(t)return n.concat.apply(n,p);if(s){for(f=new s(r),f.set(n),l=0;l<p.length;l++)c=p[l],f.set(c,u),u+=c.length;return f}for(f=new Array(r),w=0;w<n.length;w++)f[w]=n[w];for(l=0;l<p.length;l++){for(c=p[l],w=0;w<c.length;w++)f[u+w]=c[w];u+=w}return f},V.maxRowLength=function(p){return v(p,Math.max,0)},V.minRowLength=function(p){return v(p,Math.min,1/0)};function v(p,t,r){if(L(p))if(L(p[0])){for(var s=r,n=0;n<p.length;n++)s=t(s,p[n].length);return s}else return p.length;return 0}},95218:function(G,V,e){var m=e(92770),P=e(50606).BADNUM,i=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;G.exports=function(A){return typeof A=="string"&&(A=A.replace(i,"")),m(A)?Number(A):P}},33306:function(G){G.exports=function(e){var m=e._fullLayout;m._glcanvas&&m._glcanvas.size()&&m._glcanvas.each(function(P){P.regl&&P.regl.clear({color:!0,depth:!0})})}},86367:function(G){G.exports=function(e){e._responsiveChartHandler&&(window.removeEventListener("resize",e._responsiveChartHandler),delete e._responsiveChartHandler)}},96554:function(G,V,e){var m=e(92770),P=e(84267),i=e(9012),L=e(63282),A=e(7901),v=e(37822).DESELECTDIM,p=e(65487),t=e(30587).counter,r=e(64872).modHalf,s=e(73627).isArrayOrTypedArray;V.valObjectMeta={data_array:{coerceFunction:function(l,c,u){s(l)?c.set(l):u!==void 0&&c.set(u)}},enumerated:{coerceFunction:function(l,c,u,g){g.coerceNumber&&(l=+l),g.values.indexOf(l)===-1?c.set(u):c.set(l)},validateFunction:function(l,c){c.coerceNumber&&(l=+l);for(var u=c.values,g=0;g<u.length;g++){var f=String(u[g]);if(f.charAt(0)==="/"&&f.charAt(f.length-1)==="/"){var w=new RegExp(f.substr(1,f.length-2));if(w.test(l))return!0}else if(l===u[g])return!0}return!1}},boolean:{coerceFunction:function(l,c,u){l===!0||l===!1?c.set(l):c.set(u)}},number:{coerceFunction:function(l,c,u,g){!m(l)||g.min!==void 0&&l<g.min||g.max!==void 0&&l>g.max?c.set(u):c.set(+l)}},integer:{coerceFunction:function(l,c,u,g){l%1||!m(l)||g.min!==void 0&&l<g.min||g.max!==void 0&&l>g.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<f.length;){var h=f[w];g.flags.indexOf(h)===-1||f.indexOf(h)<w?f.splice(w,1):w++}f.length?c.set(f.join("+")):c.set(u)}},any:{coerceFunction:function(l,c,u){l===void 0?c.set(u):c.set(l)}},info_array:{coerceFunction:function(l,c,u,g){function f(z,I,B){var k,O={set:function(N){k=N}};return B===void 0&&(B=I.dflt),V.valObjectMeta[I.valType].coerceFunction(z,O,B,I),k}var w=g.dimensions===2||g.dimensions==="1-2"&&Array.isArray(l)&&Array.isArray(l[0]);if(!Array.isArray(l)){c.set(u);return}var h=g.items,o=[],d=Array.isArray(h),M=d&&w&&Array.isArray(h[0]),T=w&&d&&!M,C=d&&!T?h.length:l.length,x,S,b,a,E,y;if(u=Array.isArray(u)?u:[],w)for(x=0;x<C;x++)for(o[x]=[],b=Array.isArray(l[x])?l[x]:[],T?E=h.length:d?E=h[x].length:E=b.length,S=0;S<E;S++)T?a=h[S]:d?a=h[x][S]:a=h,y=f(b[S],a,(u[x]||[])[S]),y!==void 0&&(o[x][S]=y);else for(x=0;x<C;x++)y=f(l[x],d?h[x]:h,u[x]),y!==void 0&&(o[x]=y);c.set(o)},validateFunction:function(l,c){if(!Array.isArray(l))return!1;var u=c.items,g=Array.isArray(u),f=c.dimensions===2;if(!c.freeLength&&l.length!==u.length)return!1;for(var w=0;w<l.length;w++)if(f){if(!Array.isArray(l[w])||!c.freeLength&&l[w].length!==u[w].length)return!1;for(var h=0;h<l[w].length;h++)if(!n(l[w][h],g?u[w][h]:u))return!1}else if(!n(l[w],g?u[w]:u))return!1;return!0}}},V.coerce=function(l,c,u,g,f){var w=p(u,g).get(),h=p(l,g),o=p(c,g),d=h.get(),M=c._template;if(d===void 0&&M&&(d=p(M,g).get(),M=0),f===void 0&&(f=w.dflt),w.arrayOk&&s(d))return o.set(d),d;var T=V.valObjectMeta[w.valType].coerceFunction;T(d,o,f,w);var C=o.get();return M&&C===f&&!n(d,w)&&(d=p(M,g).get(),T(d,o,f,w),C=o.get()),C},V.coerce2=function(l,c,u,g,f){var w=p(l,g),h=V.coerce(l,c,u,g,f),o=w.get();return o!=null?h:!1},V.coerceFont=function(l,c,u){var g={};return u=u||{},g.family=l(c+".family",u.family),g.size=l(c+".size",u.size),g.color=l(c+".color",u.color),g},V.coercePattern=function(l,c,u,g){var f=l(c+".shape");if(f){l(c+".solidity"),l(c+".size");var w=l(c+".fillmode"),h=w==="overlay";if(!g){var o=l(c+".bgcolor",h?u:void 0);l(c+".fgcolor",h?A.contrast(o):u)}l(c+".fgopacity",h?.5:1)}},V.coerceHoverinfo=function(l,c,u){var g=c._module.attributes,f=g.hoverinfo?g:i,w=f.hoverinfo,h;if(u._dataLength===1){var o=w.dflt==="all"?w.flags.slice():w.dflt.split("+");o.splice(o.indexOf("name"),1),h=o.join("+")}return V.coerce(l,c,f,"hoverinfo",h)},V.coerceSelectionMarkerOpacity=function(l,c){if(l.marker){var u=l.marker.opacity;if(u!==void 0){var g,f;!s(u)&&!l.selected&&!l.unselected&&(g=u,f=v*u),c("selected.marker.opacity",g),c("unselected.marker.opacity",f)}}};function n(l,c){var u=V.valObjectMeta[c.valType];if(c.arrayOk&&s(l))return!0;if(u.validateFunction)return u.validateFunction(l,c);var g={},f=g,w={set:function(h){f=h}};return u.coerceFunction(l,w,g,c),f!==g}V.validate=n},41631:function(G,V,e){var m=e(84096).i$,P=e(92770),i=e(47769),L=e(64872).mod,A=e(50606),v=A.BADNUM,p=A.ONEDAY,t=A.ONEHOUR,r=A.ONEMIN,s=A.ONESEC,n=A.EPOCHJD,l=e(73972),c=e(84096).g0,u=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\d)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,g=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\di?)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,f=new Date().getFullYear()-70;function w(k){return k&&l.componentsRegistry.calendars&&typeof k=="string"&&k!=="gregorian"}V.dateTick0=function(k,O){var N=h(k,!!O);if(O<2)return N;var _=V.dateTime2ms(N,k);return _+=p*(O-1),V.ms2DateTime(_,0,k)};function h(k,O){return w(k)?O?l.getComponentMethod("calendars","CANONICAL_SUNDAY")[k]:l.getComponentMethod("calendars","CANONICAL_TICK")[k]:O?"2000-01-02":"2000-01-01"}V.dfltRange=function(k){return w(k)?l.getComponentMethod("calendars","DFLTRANGE")[k]:["2000-01-01","2001-01-01"]},V.isJSDate=function(k){return typeof k=="object"&&k!==null&&typeof k.getTime=="function"};var o,d;V.dateTime2ms=function(k,O){if(V.isJSDate(k)){var N=k.getTimezoneOffset()*r,_=(k.getUTCMinutes()-k.getMinutes())*r+(k.getUTCSeconds()-k.getSeconds())*s+(k.getUTCMilliseconds()-k.getMilliseconds());if(_){var U=3*r;N=N-U/2+L(_-N+U/2,U)}return k=Number(k)-N,k>=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<T?Math.floor(j/t):0,te=O<T?Math.floor(j%t/r):0,ae=O<C?Math.floor(j%r/s):0,ce=O<x?j%s*10+_:0}else Q=new Date(U),Y=c("%Y-%m-%d")(Q),J=O<T?Q.getUTCHours():0,te=O<T?Q.getUTCMinutes():0,ae=O<C?Q.getUTCSeconds():0,ce=O<x?Q.getUTCMilliseconds()*10+_:0;return S(Y,J,te,ae,ce)},V.ms2DateTimeLocal=function(k){if(!(k>=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;ce<k.length;ce++){if(te=k[ce],!P(te)){Y++;continue}if(!(te%p))if(ae)try{J=ae.fromJD(te/p+n),J.day()===1?J.month()===1?N++:_++:U++}catch{}else J=new Date(te),J.getUTCDate()===1?J.getUTCMonth()===0?N++:_++:U++}_+=N,U+=_;var Q=k.length-Y;return{exactYears:N/Q,exactMonths:_/Q,exactDays:U/Q}}},24401:function(G,V,e){var m=e(39898),P=e(47769),i=e(35657),L=e(79576);function A(f){var w;if(typeof f=="string"){if(w=document.getElementById(f),w===null)throw new Error("No DOM element with id '"+f+"' exists on the page.");return w}else if(f==null)throw new Error("DOM element provided is null or undefined");return f}function v(f){var w=m.select(f);return w.node()instanceof HTMLElement&&w.size()&&w.classed("js-plotly-plot")}function p(f){var w=f&&f.parentNode;w&&w.removeChild(f)}function t(f,w){r("global",f,w)}function r(f,w,h){var o="plotly.js-style-"+f,d=document.getElementById(o);d||(d=document.createElement("style"),d.setAttribute("id",o),d.appendChild(document.createTextNode("")),document.head.appendChild(d));var M=d.sheet;M.insertRule?M.insertRule(w+"{"+h+"}",0):M.addRule?M.addRule(w,h,0):P.warn("addStyleRule failed")}function s(f){var w="plotly.js-style-"+f,h=document.getElementById(w);h&&p(h)}function n(f){var w=c(f),h=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return w.forEach(function(o){var d=l(o);if(d){var M=i.convertCssMatrix(d);h=L.multiply(h,h,M)}}),h}function l(f){var w=window.getComputedStyle(f,null),h=w.getPropertyValue("-webkit-transform")||w.getPropertyValue("-moz-transform")||w.getPropertyValue("-ms-transform")||w.getPropertyValue("-o-transform")||w.getPropertyValue("transform");return h==="none"?null:h.replace("matrix","").replace("3d","").slice(1,-1).split(",").map(function(o){return+o})}function c(f){for(var w=[];u(f);)w.push(f),f=f.parentNode;return w}function u(f){return f&&(f instanceof Element||f instanceof HTMLElement)}function g(f,w){return f&&w&&f.top===w.top&&f.left===w.left&&f.right===w.right&&f.bottom===w.bottom}G.exports={getGraphDiv:A,isPlotDiv:v,removeElement:p,addStyleRule:t,addRelatedStyleRule:r,deleteRelatedStyleRule:s,getFullTransformMatrix:n,getElementTransformMatrix:l,getElementAndAncestors:c,equalDomRects:g}},11086:function(G,V,e){var m=e(15398).EventEmitter,P={init:function(i){if(i._ev instanceof m)return i;var L=new m,A=new m;return i._ev=L,i._internalEv=A,i.on=L.on.bind(L),i.once=L.once.bind(L),i.removeListener=L.removeListener.bind(L),i.removeAllListeners=L.removeAllListeners.bind(L),i._internalOn=A.on.bind(A),i._internalOnce=A.once.bind(A),i._removeInternalListener=A.removeListener.bind(A),i._removeAllInternalListeners=A.removeAllListeners.bind(A),i.emit=function(v,p){typeof jQuery<"u"&&jQuery(i).trigger(v,p),L.emit(v,p),A.emit(v,p)},i},triggerHandler:function(i,L,A){var v,p;typeof jQuery<"u"&&(v=jQuery(i).triggerHandler(L,A));var t=i._ev;if(!t)return v;var r=t._events[L];if(!r)return v;function s(l){if(l.listener){if(t.removeListener(L,l.listener),!l.fired)return l.fired=!0,l.listener.apply(t,[A])}else return l.apply(t,[A])}r=Array.isArray(r)?r:[r];var n;for(n=0;n<r.length-1;n++)s(r[n]);return p=s(r[n]),v!==void 0?v:p},purge:function(i){return delete i._ev,delete i.on,delete i.once,delete i.removeListener,delete i.removeAllListeners,delete i.emit,delete i._ev,delete i._internalEv,delete i._internalOn,delete i._internalOnce,delete i._removeInternalListener,delete i._removeAllInternalListeners,i}};G.exports=P},1426:function(G,V,e){var m=e(41965),P=Array.isArray;function i(A,v){var p,t;for(p=0;p<A.length;p++){if(t=A[p],t!==null&&typeof t=="object")return!1;t!==void 0&&(v[p]=t)}return!0}V.extendFlat=function(){return L(arguments,!1,!1,!1)},V.extendDeep=function(){return L(arguments,!0,!1,!1)},V.extendDeepAll=function(){return L(arguments,!0,!0,!1)},V.extendDeepNoArrays=function(){return L(arguments,!0,!1,!0)};function L(A,v,p,t){var r=A[0],s=A.length,n,l,c,u,g,f,w;if(s===2&&P(r)&&P(A[1])&&r.length===0){if(w=i(A[1],r),w)return r;r.splice(0,r.length)}for(var h=1;h<s;h++){n=A[h];for(l in n)c=r[l],u=n[l],t&&P(u)?r[l]=u:v&&u&&(m(u)||(g=P(u)))?(g?(g=!1,f=c&&P(c)?c:[]):f=c&&m(c)?c:{},r[l]=L([f,u],v,p,t)):(typeof u<"u"||p)&&(r[l]=u)}return r}},75744:function(G){G.exports=function(e){for(var m={},P=[],i=0,L=0;L<e.length;L++){var A=e[L];m[A]!==1&&(m[A]=1,P[i++]=A)}return P}},76756:function(G){G.exports=function(i){for(var L=m(i)?e:V,A=[],v=0;v<i.length;v++){var p=i[v];L(p)&&A.push(p)}return A};function V(P){return P.visible===!0}function e(P){var i=P[0].trace;return i.visible===!0&&i._length!==0}function m(P){return Array.isArray(P)&&Array.isArray(P[0])&&P[0][0]&&P[0][0].trace}},41327:function(G,V,e){var m=e(39898),P=e(24138),i=e(30774),L=e(29261),A=e(85268),v=e(23389),p=e(47769),t=e(41965),r=e(65487),s=e(61082),n=Object.keys(P),l={"ISO-3":v,"USA-states":v,"country names":c};function c(M){for(var T=0;T<n.length;T++){var C=n[T],x=new RegExp(P[C]);if(x.test(M.trim().toLowerCase()))return C}return p.log("Unrecognized country name: "+M+"."),!1}function u(M,T,C){if(!T||typeof T!="string")return!1;var x=l[M](T),S,b,a;if(x){if(M==="USA-states")for(S=[],a=0;a<C.length;a++)b=C[a],b.properties&&b.properties.gu&&b.properties.gu==="USA"&&S.push(b);else S=C;for(a=0;a<S.length;a++)if(b=S[a],b.id===x)return b;p.log(["Location with id",x,"does not have a matching topojson feature at this resolution."].join(" "))}return!1}function g(M){var T=M.geometry,C=T.coordinates,x=M.id,S=[],b,a,E,y;function z(I){for(var B=0;B<I.length-1;B++)if(I[B][0]>0&&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;y<I.length;y++)B[y]=[I[y][0]<0?I[y][0]+360:I[y][0],I[y][1]];S.push(s.tester(B))}:x==="ATA"?b=function(I){var B=z(I);if(B===null)return S.push(s.tester(I));var k=new Array(I.length+1),O=0;for(y=0;y<I.length;y++)y>B?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;a<C.length;a++)for(E=0;E<C[a].length;E++)b(C[a][E]);break;case"Polygon":for(a=0;a<C.length;a++)b(C[a]);break}return S}function f(M){var T=M.geojson,C=window.PlotlyGeoAssets||{},x=typeof T=="string"?C[T]:T;return t(x)?x:(p.error("Oops ... something went wrong when fetching "+T),!1)}function w(M){var T=M[0].trace,C=f(T);if(!C)return!1;var x={},S=[],b;for(b=0;b<T._length;b++){var a=M[b];(a.loc||a.loc===0)&&(x[a.loc]=a)}function E(I){var B=r(I,T.featureidkey||"id").get(),k=x[B];if(k){var O=I.geometry;if(O.type==="Polygon"||O.type==="MultiPolygon"){var N={type:"Feature",id:B,geometry:O,properties:{}};N.properties.ct=h(N),k.fIn=I,k.fOut=N,S.push(N)}else p.log(["Location",k.loc,"does not have a valid GeoJSON geometry.","Traces with locationmode *geojson-id* only support","*Polygon* and *MultiPolygon* geometries."].join(" "))}delete x[B]}switch(C.type){case"FeatureCollection":var y=C.features;for(b=0;b<y.length;b++)E(y[b]);break;case"Feature":E(C);break;default:return p.warn(["Invalid GeoJSON type",(C.type||"none")+".","Traces with locationmode *geojson-id* only support","*FeatureCollection* and *Feature* types."].join(" ")),!1}for(var z in x)p.log(["Location *"+z+"*","does not have a matching feature with id-key","*"+T.featureidkey+"*."].join(" "));return S}function h(M){var T=M.geometry,C;if(T.type==="MultiPolygon")for(var x=T.coordinates,S=0,b=0;b<x.length;b++){var a={type:"Polygon",coordinates:x[b]},E=i.default(a);E>S&&(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;b<M.length;b++){var a=M[b][0].trace,E=a.geojson;typeof E=="string"&&(T[E]?T[E]==="pending"&&C.push(S(E)):(T[E]="pending",C.push(x(E))))}return C}function d(M){return A.default(M)}G.exports={locationToFeature:u,feature2polygons:g,getTraceGeojson:f,extractTraceFeature:w,fetchTraceGeoData:o,computeBbox:d}},18214:function(G,V,e){var m=e(50606).BADNUM;V.calcTraceToLineCoords=function(P){for(var i=P[0].trace,L=i.connectgaps,A=[],v=[],p=0;p<P.length;p++){var t=P[p],r=t.lonlat;r[0]!==m?v.push(r):!L&&v.length>0&&(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;L<P.length;L++)i[L]=[P[L]];return{type:"MultiPolygon",coordinates:i}},V.makeBlank=function(){return{type:"Point",coordinates:[]}}},87642:function(G,V,e){var m=e(64872).mod;V.segmentsIntersect=P;function P(p,t,r,s,n,l,c,u){var g=r-p,f=n-p,w=c-n,h=s-t,o=l-t,d=u-l,M=g*d-w*h;if(M===0)return null;var T=(f*d-w*o)/M,C=(f*h-g*o)/M;return C<0||C>1||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.x<n?n-C.x:C.x>l?C.x-l:0,S=C.y<c?c-C.y:C.y>u?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;f<u;){if(o=(w+h)/2,d=t.getPointAtLength(o),M=d[s]-r,Math.abs(M)<c)return d;g*M>0?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;a<f;a++)S=C(w,a),b=x(g,a),M[a]=r(S,b);else M=r(i(w),g);return M}function c(u){var g=L.extractOpts(u),f=g.colorscale;return g.reversescale&&(f=L.flipScale(g.colorscale)),f.map(function(w){var h=w[0],o=P(w[1]),d=o.toRgb();return{index:h,rgb:[d.r,d.g,d.b,d.a]}})}G.exports={formatColor:l,parseColorScale:c}},28984:function(G,V,e){var m=e(23389);function P(i){return[i]}G.exports={keyFun:function(i){return i.key},repeat:P,descend:m,wrap:P,unwrap:function(i){return i[0]}}},23389:function(G){G.exports=function(e){return e}},39240:function(G){G.exports=function(e,m){if(!m)return e;var P=1/Math.abs(m),i=P>1?(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<p?t:oe):t},r.isIndex=function(ee,oe){return oe!==void 0&&ee>=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;$<oe;$++)q[$]=ee;return q},r.swapAttrs=function(ee,oe,q,$){q||(q="x"),$||($="y");for(var le=0;le<oe.length;le++){var ie=oe[le],he=r.nestedProperty(ee,ie.replace("?",q)),me=r.nestedProperty(ee,ie.replace("?",$)),Me=he.get();he.set(me.get()),me.set(Me)}},r.raiseToTop=function(oe){oe.parentNode.appendChild(oe)},r.cancelTransition=function(ee){return ee.transition().duration(0)},r.constrain=function(ee,oe,q){return oe>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<ie;me++)he[me]=oe(ee[me],q,$,le);return he},r.randstr=function ee(oe,q,$,le){if($||($=16),q===void 0&&(q=24),q<=0)return"0";var ie=Math.log(Math.pow(2,q))/Math.log($),he="",me,Me,Te;for(me=2;ie===1/0;me*=2)ie=Math.log(Math.pow(2,q/me))/Math.log($)*me;var Oe=ie-Math.floor(ie);for(me=0;me<Math.floor(ie);me++)Te=Math.floor(Math.random()*$).toString($),he=Te+he;Oe&&(Me=Math.pow($,Oe),Te=Math.floor(Math.random()*Me).toString($),he=Te+he);var Ne=parseInt(he,$);return oe&&oe[he]||Ne!==1/0&&Ne>=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<le;me++)ie[me]=(1-Math.cos(Math.PI*(me+1)/oe))/(2*oe);for(me=0;me<q;me++){for(Oe=0,Me=0;Me<le;Me++)Te=me+Me+1-oe,Te<-q?Te-=$*Math.round(Te/$):Te>=$&&(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;ie<q.length;ie++)he=ee[q[ie]],he!=null?$=!0:le=!1;if($&&!le)for(ie=0;ie<q.length;ie++)ee[q[ie]]=oe[q[ie]]}},r.mergeArray=function(ee,oe,q,$){var le=typeof $=="function";if(r.isArrayOrTypedArray(ee))for(var ie=Math.min(ee.length,oe.length),he=0;he<ie;he++){var me=ee[he];oe[he][q]=le?$(me):me}},r.mergeArrayCastPositive=function(ee,oe,q){return r.mergeArray(ee,oe,q,function($){var le=+$;return isFinite(le)&&le>0?le:0})},r.fillArray=function(ee,oe,q,$){if($=$||r.identity,r.isArrayOrTypedArray(ee))for(var le=0;le<oe.length;le++)oe[le][q]=$(ee[le])},r.castOption=function(ee,oe,q,$){$=$||r.identity;var le=r.nestedProperty(ee,q).get();return r.isArrayOrTypedArray(le)?Array.isArray(oe)&&r.isArrayOrTypedArray(le[oe[0]])?$(le[oe[0]][oe[1]]):$(le[oe]):le},r.extractOption=function(ee,oe,q,$){if(q in ee)return ee[q];var le=r.nestedProperty(oe,$).get();if(!Array.isArray(le))return le};function b(ee){var oe={};for(var q in ee)for(var $=ee[q],le=0;le<$.length;le++)oe[$[le]]=+q;return oe}r.tagSelected=function(ee,oe,q){var $=oe.selectedpoints,le=oe._indexToPoints,ie;le&&(ie=b(le));function he(Ne){return Ne!==void 0&&Ne<ee.length}for(var me=0;me<$.length;me++){var Me=$[me];if(r.isIndex(Me)||r.isArrayOrTypedArray(Me)&&r.isIndex(Me[0])&&r.isIndex(Me[1])){var Te=ie?ie[Me]:Me,Oe=q?q[Te]:Te;he(Oe)&&(ee[Oe].selected=1)}}},r.selIndices2selPoints=function(ee){var oe=ee.selectedpoints,q=ee._indexToPoints;if(q){for(var $=b(q),le=[],ie=0;ie<oe.length;ie++){var he=oe[ie];if(r.isIndex(he)){var me=$[he];r.isIndex(me)&&le.push(me)}}return le}else return oe},r.getTargetArray=function(ee,oe){var q=oe.target;if(typeof q=="string"&&q){var $=r.nestedProperty(ee,q).get();return Array.isArray($)?$:!1}else if(Array.isArray(q))return q;return!1};function a(ee,oe,q){var $={};typeof oe!="object"&&(oe={});var le=q==="pieLike"?-1:3,ie=Object.keys(ee),he,me,Me;for(he=0;he<ie.length;he++)me=ie[he],Me=ee[me],!(me.charAt(0)==="_"||typeof Me=="function")&&(me==="module"?$[me]=Me:Array.isArray(Me)?me==="colorscale"||le===-1?$[me]=Me.slice():$[me]=Me.slice(0,le):r.isTypedArray(Me)?le===-1?$[me]=Me.subarray():$[me]=Me.subarray(0,le):Me&&typeof Me=="object"?$[me]=a(ee[me],oe[me],q):$[me]=Me);for(ie=Object.keys(oe),he=0;he<ie.length;he++)me=ie[he],Me=oe[me],(typeof Me!="object"||!(me in $)||typeof $[me]!="object")&&($[me]=Me);return $}r.minExtend=a,r.titleCase=function(ee){return ee.charAt(0).toUpperCase()+ee.substr(1)},r.containsAny=function(ee,oe){for(var q=0;q<oe.length;q++)if(ee.indexOf(oe[q])!==-1)return!0;return!1},r.isIE=function(){return typeof window.navigator.msSaveBlob<"u"};var E=/Version\/[\d\.]+.*Safari/;r.isSafari=function(){return E.test(window.navigator.userAgent)};var y=/iPad|iPhone|iPod/;r.isIOS=function(){return y.test(window.navigator.userAgent)};var z=/Firefox\/(\d+)\.\d+/;r.getFirefoxVersion=function(){var ee=z.exec(window.navigator.userAgent);if(ee&&ee.length===2){var oe=parseInt(ee[1]);if(!isNaN(oe))return oe}return null},r.isD3Selection=function(ee){return ee instanceof m.selection},r.ensureSingle=function(ee,oe,q,$){var le=ee.select(oe+(q?"."+q:""));if(le.size())return le;var ie=ee.append(oe);return q&&ie.classed(q,!0),$&&ie.call($),ie},r.ensureSingleById=function(ee,oe,q,$){var le=ee.select(oe+"#"+q);if(le.size())return le;var ie=ee.append(oe).attr("id",q);return $&&ie.call($),ie},r.objectFromPath=function(ee,oe){for(var q=ee.split("."),$,le=$={},ie=0;ie<q.length;ie++){var he=q[ie],me=null,Me=q[ie].match(/(.*)\[([0-9]+)\]/);Me?(he=Me[1],me=Me[2],$=$[he]=[],ie===q.length-1?$[me]=oe:$[me]={},$=$[me]):(ie===q.length-1?$[he]=oe:$[he]={},$=$[he])}return le};var I=/^([^\[\.]+)\.(.+)?/,B=/^([^\.]+)\[([0-9]+)\](\.)?(.+)?/;function k(ee){return ee.slice(0,2)==="__"}r.expandObjectPaths=function(ee){var oe,q,$,le,ie,he,me;if(typeof ee=="object"&&!Array.isArray(ee)){for(q in ee)if(ee.hasOwnProperty(q))if(oe=q.match(I)){if(le=ee[q],$=oe[1],k($))continue;delete ee[q],ee[$]=r.extendDeepNoArrays(ee[$]||{},r.objectFromPath(q,r.expandObjectPaths(le))[$])}else if(oe=q.match(B)){if(le=ee[q],$=oe[1],k($))continue;if(ie=parseInt(oe[2]),delete ee[q],ee[$]=ee[$]||[],oe[3]===".")me=oe[4],he=ee[$][ie]=ee[$][ie]||{},r.extendDeepNoArrays(he,r.objectFromPath(me,r.expandObjectPaths(le)));else{if(k($))continue;ee[$][ie]=r.expandObjectPaths(le)}}else{if(k(q))continue;ee[q]=r.expandObjectPaths(ee[q])}}return ee},r.numSeparate=function(ee,oe,q){if(q||(q=!1),typeof oe!="string"||oe.length===0)throw new Error("Separator string required for formatting!");typeof ee=="number"&&(ee=String(ee));var $=/(\d+)(\d{3})/,le=oe.charAt(0),ie=oe.charAt(1),he=ee.split("."),me=he[0],Me=he.length>1?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<le.length;qe++)if(nt=le[qe],!!nt){if(nt.hasOwnProperty(Se)){Ge=nt[Se];break}if(O.test(Se)||(Ge=r.nestedProperty(nt,Se).get(),Ge=ie[Se]||r.nestedProperty(nt,Se).get(),Ge&&(ie[Se]=Ge)),Ge!==void 0)break}}if(Ge!==void 0&&(Ue==="*"&&(Ge*=He),Ue==="/"&&(Ge/=He)),Ge===void 0&&$)return $.count<$.max&&(r.warn("Variable '"+Se+"' in "+$.name+" could not be found!"),Ge=he),$.count===$.max&&r.warn("Too many "+$.name+" warnings - additional warnings will be suppressed"),$.count++,he;if(Me){var $e;if(Me[0]===":"&&($e=q?q.numberFormat:r.numberFormat,Ge=$e(Me.replace(te,""))(Ge)),Me[0]==="|"){$e=q?q.timeFormat:P;var et=r.dateTime2ms(Ge);Ge=r.formatDate(et,Me.replace(te,""),!1,$e)}}else{var ct=Se+"Label";oe.hasOwnProperty(ct)&&(Ge=oe[ct])}return xe&&(Ge="("+Ge+")",(Oe||Ne)&&(Ge=" "+Ge),(Ee||Ne)&&(Ge=Ge+" ")),Ge})}var ce=48,Q=57;r.subplotSort=function(ee,oe){for(var q=Math.min(ee.length,oe.length)+1,$=0,le=0,ie=0;ie<q;ie++){var he=ee.charCodeAt(ie)||0,me=oe.charCodeAt(ie)||0,Me=he>=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;$<oe;$++)q.indexOf(".")!==-1&&(q=q.replace("0%","%"),q=q.replace(".%","%"));return q},r.isHidden=function(ee){var oe=window.getComputedStyle(ee).display;return!oe||oe==="none"},r.strTranslate=function(ee,oe){return ee||oe?"translate("+ee+","+oe+")":""},r.strRotate=function(ee){return ee?"rotate("+ee+")":""},r.strScale=function(ee){return ee!==1?"scale("+ee+")":""},r.getTextTransform=function(ee){var oe=ee.noCenter,q=ee.textX,$=ee.textY,le=ee.targetX,ie=ee.targetY,he=ee.anchorX||0,me=ee.anchorY||0,Me=ee.rotate,Te=ee.scale;return Te?Te>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;c<u.length;c++)w[u[c][n]]=c;var h=P.test(l),o={set:function(d,M){var T=M===null?p:i;if(!u){if(!g||T===p)return;u=[],g.set(u)}var C=w[d];if(C===void 0){if(T===p)return;T=T|v,C=u.length,w[d]=C}else M!==(h?u[C][l]:m(u[C],l).get())&&(T=T|A);var x=u[C]=u[C]||{};return x[n]=d,h?x[l]=M:m(x,l).set(M),M!==null&&(T=T&~p),f[C]=f[C]|T,o},get:function(d){if(u){var M=w[d];if(M!==void 0)return h?u[M][l]:m(u[M],l).get()}},rename:function(d,M){var T=w[d];return T===void 0||(f[T]=f[T]|L,w[M]=T,delete w[d],u[T][n]=M),o},remove:function(d){var M=w[d];if(M===void 0)return o;var T=u[M];if(Object.keys(T).length>2)return f[M]=f[M]|A,o.set(d,null);if(h){for(c=M;c<u.length;c++)f[c]=f[c]|v;for(c=M;c<u.length;c++)w[u[c][n]]--;u.splice(M,1),delete w[d]}else m(T,l).set(null),f[M]=f[M]|A|p;return o},constructUpdate:function(){for(var d,M,T={},C=Object.keys(f),x=0;x<C.length;x++)M=C[x],d=s+"["+M+"]",u[M]?(f[M]&L&&(T[d+"."+n]=u[M][n]),f[M]&A&&(h?T[d+"."+l]=f[M]&p?null:u[M][l]:T[d+"."+l]=f[M]&p?null:m(u[M],l).get())):T[d]=null;return T}};return o}},15867:function(G,V,e){var m=e(73972);G.exports=function(i,L){for(var A=i._context.locale,v=0;v<2;v++){for(var p=i._context.locales,t=0;t<2;t++){var r=(p[A]||{}).dictionary;if(r){var s=r[L];if(s)return s}p=m.localeRegistry}var n=A.split("-")[0];if(n===A)break;A=n}return L}},47769:function(G,V,e){var m=e(72075).dfltConfig,P=e(75046),i=G.exports={};i.log=function(){var L;if(m.logging>1){var A=["LOG:"];for(L=0;L<arguments.length;L++)A.push(arguments[L]);console.trace.apply(console,A)}if(m.notifyOnLogging>1){var v=[];for(L=0;L<arguments.length;L++)v.push(arguments[L]);P(v.join("<br>"),"long")}},i.warn=function(){var L;if(m.logging>0){var A=["WARN:"];for(L=0;L<arguments.length;L++)A.push(arguments[L]);console.trace.apply(console,A)}if(m.notifyOnLogging>0){var v=[];for(L=0;L<arguments.length;L++)v.push(arguments[L]);P(v.join("<br>"),"stick")}},i.error=function(){var L;if(m.logging>0){var A=["ERROR:"];for(L=0;L<arguments.length;L++)A.push(arguments[L]);console.error.apply(console,A)}if(m.notifyOnLogging>0){var v=[];for(L=0;L<arguments.length;L++)v.push(arguments[L]);P(v.join("<br>"),"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;A<P;A++)L[A]=new Array(i);return L},V.transposeRagged=function(P){var i=0,L=P.length,A,v;for(A=0;A<L;A++)i=Math.max(i,P[A].length);var p=new Array(i);for(A=0;A<i;A++)for(p[A]=new Array(L),v=0;v<L;v++)p[A][v]=P[v][A];return p},V.dot=function(P,i){if(!(P.length&&i.length)||P.length!==i.length)return null;var L=P.length,A,v;if(P[0].length)for(A=new Array(L),v=0;v<L;v++)A[v]=V.dot(P[v],i);else if(i[0].length){var p=V.transposeRagged(i);for(A=new Array(p.length),v=0;v<p.length;v++)A[v]=V.dot(P,p[v])}else for(A=0,v=0;v<L;v++)A+=P[v]*i[v];return A},V.translationMatrix=function(P,i){return[[1,0,P],[0,1,i],[0,0,1]]},V.rotationMatrix=function(P){var i=P*Math.PI/180;return[[Math.cos(i),-Math.sin(i),0],[Math.sin(i),Math.cos(i),0],[0,0,1]]},V.rotationXYMatrix=function(P,i,L){return V.dot(V.dot(V.translationMatrix(i,L),V.rotationMatrix(P)),V.translationMatrix(-i,-L))},V.apply3DTransform=function(P){return function(){var i=arguments,L=arguments.length===1?i[0]:[i[0],i[1],i[2]||0];return V.dot(P,[L[0],L[1],L[2],1]).slice(0,3)}},V.apply2DTransform=function(P){return function(){var i=arguments;i.length===3&&(i=i[0]);var L=arguments.length===1?i[0]:[i[0],i[1]];return V.dot(P,[L[0],L[1],1]).slice(0,2)}},V.apply2DTransform2=function(P){var i=V.apply2DTransform(P);return function(L){return i(L.slice(0,2)).concat(i(L.slice(2,4)))}},V.convertCssMatrix=function(P){if(P){var i=P.length;if(i===16)return P;if(i===6)return[P[0],P[1],0,0,P[2],P[3],0,0,0,0,1,0,P[4],P[5],0,1]}return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]},V.inverseTransformMatrix=function(P){var i=[];return m.invert(i,P),[[i[0],i[1],i[2],i[3]],[i[4],i[5],i[6],i[7]],[i[8],i[9],i[10],i[11]],[i[12],i[13],i[14],i[15]]]}},64872:function(G){function V(m,P){var i=m%P;return i<0?i+P:i}function e(m,P){return Math.abs(m)>P/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<u.length;h++)if(String(u[h]).slice(0,2)==="__")throw"bad property string";for(h=0;h<u.length;){if(g=String(u[h]).match(/^([^\[\]]*)((\[\-?[0-9]*\])+)$/),g){if(g[1])u[h]=g[1];else if(h===0)u.splice(0,1);else throw"bad property string";for(f=g[2].substr(1,g[2].length-2).split("]["),w=0;w<f.length;w++)h++,u.splice(h,0,Number(f[w]))}h++}return typeof l!="object"?s(l,c,u):{set:v(l,u,c),get:i(l,u),astr:c,parts:u,obj:l}};function i(n,l){return function(){var c=n,u,g,f,w,h;for(w=0;w<l.length-1;w++){if(u=l[w],u===-1){for(g=!0,f=[],h=0;h<c.length;h++)f[h]=i(c[h],l.slice(w+1))(),f[h]!==f[0]&&(g=!1);return g?f[0]:f}if(typeof u=="number"&&!P(c)||(c=c[u],typeof c!="object"||c===null))return}if(!(typeof c!="object"||c===null)&&(f=c[l[w]],f!==null))return f}}var L=/(^|\.)args\[/;function A(n,l){return n===void 0||n===null&&!l.match(L)}function v(n,l,c){return function(u){var g=n,f="",w=A(u,c),h,o;for(o=0;o<l.length-1;o++){if(h=l[o],typeof h=="number"&&!P(g))throw"array index but container is not an array";if(h===-1){if(w=!t(g,l.slice(o+1),u,c),w)break;return}if(!r(g,h,l[o+1],w))break;if(g=g[h],typeof g!="object"||g===null)throw"container is not an object";f=p(f,h)}if(w){if(o===l.length-1&&(delete g[l[o]],Array.isArray(g)&&+l[o]===g.length-1))for(;g.length&&g[g.length-1]===void 0;)g.pop()}else g[l[o]]=u}}function p(n,l){var c=l;return m(l)?c="["+l+"]":n&&(c="."+l),n+c}function t(n,l,c,u){var g=P(c),f=!0,w=c,h=u.replace("-1",0),o=g?!1:A(c,h),d=l[0],M;for(M=0;M<n.length;M++)h=u.replace("-1",M),g&&(w=c[M%c.length],o=A(w,h)),o&&(f=!1),r(n,M,d,o)&&v(n[M],l,u.replace("-1",M))(w);return f}function r(n,l,c,u){if(n[l]===void 0){if(u)return!1;typeof c=="number"?n[l]=[]:n[l]={}}return!0}function s(n,l,c){return{set:function(){throw"bad container"},get:function(){},astr:l,parts:c,obj:n}}},64213:function(G){G.exports=function(){}},75046:function(G,V,e){var m=e(39898),P=e(92770),i=[];G.exports=function(L,A){if(i.indexOf(L)!==-1)return;i.push(L);var v=1e3;P(A)?v=A:A==="long"&&(v=3e3);var p=m.select("body").selectAll(".plotly-notifier").data([0]);p.enter().append("div").classed("plotly-notifier",!0);var t=p.selectAll(".notifier-note").data(i);function r(s){s.duration(700).style("opacity",0).each("end",function(n){var l=i.indexOf(n);l!==-1&&i.splice(l,1),m.select(this).remove()})}t.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(s){var n=m.select(this);n.append("button").classed("notifier-close",!0).html("&times;").on("click",function(){n.transition().call(r)});for(var l=n.append("p"),c=s.split(/<br\s*\/?>/g),u=0;u<c.length;u++)u&&l.append("br"),l.append("span").text(c[u]);A==="stick"?n.transition().duration(350).style("opacity",1):n.transition().duration(700).style("opacity",1).transition().delay(v).call(r)})}},39918:function(G,V,e){var m=e(6964),P="data-savedcursor",i="!!";G.exports=function(A,v){var p=A.attr(P);if(v){if(!p){for(var t=(A.attr("class")||"").split(" "),r=0;r<t.length;r++){var s=t[r];s.indexOf("cursor-")===0&&A.attr(P,s.substr(7)).classed(s,!1)}A.attr(P)||A.attr(P,i)}m(A,v)}else p&&(A.attr(P,null),p===i?m(A):m(A,p))}},61082:function(G,V,e){var m=e(35657).dot,P=e(50606).BADNUM,i=G.exports={};i.tester=function(A){var v=A.slice(),p=v[0][0],t=p,r=v[0][1],s=r,n;for((v[v.length-1][0]!==v[0][0]||v[v.length-1][1]!==v[0][1])&&v.push(v[0]),n=1;n<v.length;n++)p=Math.min(p,v[n][0]),t=Math.max(t,v[n][0]),r=Math.min(r,v[n][1]),s=Math.max(s,v[n][1]);var l=!1,c;v.length===5&&(v[0][0]===v[1][0]?v[2][0]===v[3][0]&&v[0][1]===v[3][1]&&v[1][1]===v[2][1]&&(l=!0,c=function(h){return h[0]===v[0][0]}):v[0][1]===v[1][1]&&v[2][1]===v[3][1]&&v[0][0]===v[3][0]&&v[1][0]===v[2][0]&&(l=!0,c=function(h){return h[1]===v[0][1]}));function u(h,o){var d=h[0],M=h[1];return!(d===P||d<p||d>t||M===P||M<r||M>s||o&&c(h))}function g(h,o){var d=h[0],M=h[1];if(d===P||d<p||d>t||M===P||M<r||M>s)return!1;var T=v.length,C=v[0][0],x=v[0][1],S=0,b,a,E,y,z;for(b=1;b<T;b++)if(a=C,E=x,C=v[b][0],x=v[b][1],y=Math.min(a,C),!(d<y||d>Math.max(a,C)||M>Math.max(E,x)))if(M<Math.min(E,x))d!==y&&S++;else{if(C===a?z=M:z=E+(d-a)*(x-E)/(C-a),M===z)return!(b===1&&o);M<=z&&d!==y&&S++}return S%2===1}var f=!0,w=v[0];for(n=1;n<v.length;n++)if(w[0]!==v[n][0]||w[1]!==v[n][1]){f=!1;break}return{xmin:p,xmax:t,ymin:r,ymax:s,pts:v,contains:l?u:g,isRect:l,degenerate:f}},i.isSegmentBent=function(A,v,p,t){var r=A[v],s=[A[p][0]-r[0],A[p][1]-r[1]],n=m(s,s),l=Math.sqrt(n),c=[-s[1]/l,s[0]/l],u,g,f;for(u=v+1;u<p;u++)if(g=[A[u][0]-r[0],A[u][1]-r[1]],f=m(g,s),f<0||f>n||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;g<A.length;g++)(g===A.length-1||i.isSegmentBent(A,u,g+1,v))&&(p.push(A[g]),p.length<c-2&&(t=g,r=p.length-1),u=g)}if(A.length>1){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<t.length;r++){var s=t[r];if(s.indexOf("Safari")!==-1)for(var n=r-1;n>-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;i<e.length;i++)if(e[i]instanceof RegExp&&e[i].toString()===P)return e;e.push(m)}else(m||m===0)&&e.indexOf(m)===-1&&e.push(m);return e}},10847:function(G,V,e){var m=e(71828),P=e(72075).dfltConfig;function i(A,v){for(var p=[],t,r=0;r<v.length;r++)t=v[r],t===A?p[r]=t:typeof t=="object"?p[r]=Array.isArray(t)?m.extendDeep([],t):m.extendDeepAll({},t):p[r]=t;return p}var L={};L.add=function(A,v,p,t,r){var s,n;if(A.undoQueue=A.undoQueue||{index:0,queue:[],sequence:!1},n=A.undoQueue.index,A.autoplay){A.undoQueue.inSequence||(A.autoplay=!1);return}!A.undoQueue.sequence||A.undoQueue.beginSequence?(s={undo:{calls:[],args:[]},redo:{calls:[],args:[]}},A.undoQueue.queue.splice(n,A.undoQueue.queue.length-n,s),A.undoQueue.index+=1):s=A.undoQueue.queue[n-1],A.undoQueue.beginSequence=!1,s&&(s.undo.calls.unshift(v),s.undo.args.unshift(p),s.redo.calls.push(t),s.redo.args.push(r)),A.undoQueue.queue.length>P.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<p.undo.calls.length;t++)L.plotDo(v,p.undo.calls[t],p.undo.args[t]);v.undoQueue.inSequence=!1,v.autoplay=!1}},L.redo=function(v){var p,t;if(!(v.undoQueue===void 0||isNaN(v.undoQueue.index)||v.undoQueue.index>=v.undoQueue.queue.length)){for(p=v.undoQueue.queue[v.undoQueue.index],v.undoQueue.inSequence=!0,t=0;t<p.redo.calls.length;t++)L.plotDo(v,p.redo.calls[t],p.redo.args[t]);v.undoQueue.inSequence=!1,v.autoplay=!1,v.undoQueue.index++}},L.plotDo=function(A,v,p){A.autoplay=!0,p=i(A,p),v.apply(null,p)},G.exports=L},30587:function(G,V){V.counter=function(e,m,P,i){var L=(m||"")+(P?"":"$"),A=i===!1?"":"^";return e==="xy"?new RegExp(A+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+L):new RegExp(A+e+"([2-9]|[1-9][0-9]+)?"+L)}},6962:function(G){var V=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,e=/^[^\.\[\]]+$/;G.exports=function(m,P){for(;P;){var i=m.match(V);if(i)m=i[1];else if(m.match(e))m="";else throw new Error("bad relativeAttr call:"+[m,P]);if(P.charAt(0)==="^")P=P.slice(1);else break}return m&&P.charAt(0)!=="["?m+"."+P:m+P}},51332:function(G,V,e){var m=e(73627).isArrayOrTypedArray,P=e(41965);G.exports=function i(L,A){for(var v in A){var p=A[v],t=L[v];if(t!==p)if(v.charAt(0)==="_"||typeof p=="function"){if(v in L)continue;L[v]=p}else if(m(p)&&m(t)&&P(p[0])){if(v==="customdata"||v==="ids")continue;for(var r=Math.min(p.length,t.length),s=0;s<r;s++)t[s]!==p[s]&&P(p[s])&&P(t[s])&&i(t[s],p[s])}else P(p)&&P(t)&&(i(t,p),Object.keys(t).length||delete L[v])}}},65888:function(G,V,e){var m=e(92770),P=e(47769),i=e(23389),L=e(50606).BADNUM,A=1e-9;V.findBin=function(s,n,l){if(m(n.start))return l?Math.ceil((s-n.start)/n.size-A)-1:Math.floor((s-n.start)/n.size+A);var c=0,u=n.length,g=0,f=u>1?(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);c<u&&g++<100;)w=Math.floor((c+u)/2),h(n[w],s)?c=w+1:u=w;return g>90&&P.log("Long binary search..."),c-1};function v(s,n){return s<n}function p(s,n){return s<=n}function t(s,n){return s>n}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;c<u&&f++<100;)g=o((c+u)/2),n[g]<=s?c=g+w:u=g-h;return n[c]},V.sort=function(s,n){for(var l=0,c=0,u=1;u<s.length;u++){var g=n(s[u],s[u-1]);if(g<0?l=1:g>0&&(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;u<s.length;u++){var g=n(s[u]);g<l&&(l=g,c=u)}return c}},6964:function(G){G.exports=function(e,m){(e.attr("class")||"").split(" ").forEach(function(P){P.indexOf("cursor-")===0&&e.classed(P,!1)}),m&&e.classed("cursor-"+m,!0)}},58617:function(G,V,e){var m=e(7901),P=function(){};G.exports=function(L){for(var A in L)typeof L[A]=="function"&&(L[A]=P);L.destroy=function(){L.container.parentNode.removeChild(L.container)};var v=document.createElement("div");v.className="no-webgl",v.style.cursor="pointer",v.style.fontSize="24px",v.style.color=m.defaults[0],v.style.position="absolute",v.style.left=v.style.top="0px",v.style.width=v.style.height="100%",v.style["background-color"]=m.lightLine,v.style["z-index"]=30;var p=document.createElement("p");return p.textContent="WebGL is not supported by your browser - visit https://get.webgl.org for more info",p.style.position="relative",p.style.top="50%",p.style.left="50%",p.style.height="30%",p.style.width="50%",p.style.margin="-15% 0 0 -25%",v.appendChild(p),L.container.appendChild(v),L.container.style.background="#FFFFFF",L.container.onclick=function(){window.open("https://get.webgl.org")},!1}},78607:function(G){G.exports=function(e){return Object.keys(e).sort()}},80038:function(G,V,e){var m=e(92770),P=e(73627).isArrayOrTypedArray;V.aggNums=function(i,L,A,v){var p,t;if((!v||v>A.length)&&(v=A.length),m(L)||(L=!1),P(A[0])){for(t=new Array(v),p=0;p<v;p++)t[p]=V.aggNums(i,L,A[p]);A=t}for(p=0;p<v;p++)m(L)?m(A[p])&&(L=i(+L,+A[p])):L=A[p];return L},V.len=function(i){return V.aggNums(function(L){return L+1},0,i)},V.mean=function(i,L){return L||(L=V.len(i)),V.aggNums(function(A,v){return A+v},0,i)/L},V.midRange=function(i){if(!(i===void 0||i.length===0))return(V.aggNums(Math.max,null,i)+V.aggNums(Math.min,null,i))/2},V.variance=function(i,L,A){return L||(L=V.len(i)),m(A)||(A=V.mean(i,L)),V.aggNums(function(v,p){return v+Math.pow(p-A,2)},0,i)/L},V.stdev=function(i,L,A){return Math.sqrt(V.variance(i,L,A))},V.median=function(i){var L=i.slice().sort();return V.interp(L,.5)},V.interp=function(i,L){if(!m(L))throw"n should be a finite number";if(L=L*i.length-.5,L<0)return i[0];if(L>i.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=/(<|&lt;|&#60;)/g,t=/(>|&gt;|&#62;)/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=/<br(\s+.*)?>/i;V.BR_TAG_ALL=/<br(\s+.*)?>/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;j<ae.length;j++){var K=ae[j],ee=K.match(o),oe=ee&&ee[2].toLowerCase();if(oe)Y.indexOf(oe)!==-1&&(ce.push(K),Q=oe);else{var q=K.length;if(Z+q<U)ce.push(K),Z+=q;else if(Z<U){var $=U-Z;Q&&(Q!=="br"||$<=te||q<=te)&&ce.pop(),U>te?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<Ne.length;Ee++)ce(Ne[Ee])}function ce(Oe){var Ne=Oe.type,Ee={},xe;if(Ne==="a"){xe="a";var Se=Oe.target,Ue=Oe.href,He=Oe.popup;Ue&&(Ee={"xlink:xlink:show":Se==="_blank"||Se.charAt(0)!=="_"?"new":"replace",target:Se,"xlink:xlink:href":Ue},He&&(Ee.onclick='window.open(this.href.baseVal,this.target.baseVal,"'+He+'");return false;'))}else xe="tspan";Oe.style&&(Ee.style=Oe.style);var Fe=document.createElementNS(L.svg,xe);if(Ne==="sup"||Ne==="sub"){Q(J,g),J.appendChild(Fe);var Ge=document.createElementNS(L.svg,"tspan");Q(Ge,g),m.select(Ge).attr("dy",u[Ne]),Ee.dy=c[Ne],J.appendChild(Fe),J.appendChild(Ge)}else J.appendChild(Fe);m.select(Fe).attr(Ee),J=Oe.node=Fe,Y.push(Oe)}function Q(Oe,Ne){Oe.appendChild(document.createTextNode(Ne))}function Z(Oe){if(Y.length===1){P.log("Ignoring unexpected end tag </"+Oe+">.",_);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;ee<K.length;ee++){var oe=K[ee],q=oe.match(o),$=q&&q[2].toLowerCase(),le=l[$];if($==="br")ae();else if(le===void 0)Q(J,y(oe));else if(q[1])Z($);else{var ie=q[4],he={type:$},me=S(ie,M);if(me?(me=me.replace(b,"$1 fill:"),le&&(me+=";"+le)):le&&(me=le),me&&(he.style=me),$==="a"){U=!0;var Me=S(ie,T);if(Me){var Te=B(Me);Te&&(he.href=Te,he.target=S(ie,C)||"_blank",he.popup=S(ie,x))}}ce(he)}}return U}function B(N){var _=encodeURI(decodeURI(N)),U=document.createElement("a"),Y=document.createElement("a");U.href=N,Y.href=_;var J=U.protocol,te=Y.protocol;return f.indexOf(J)!==-1&&f.indexOf(te)!==-1?_:""}V.sanitizeHTML=function(_){_=_.replace(w," ");for(var U=document.createElement("p"),Y=U,J=[],te=_.split(h),ae=0;ae<te.length;ae++){var ce=te[ae],Q=ce.match(o),Z=Q&&Q[2].toLowerCase();if(Z in l)if(Q[1])J.length&&(Y=J.pop());else{var j=Q[4],K=S(j,M),ee=K?{style:K}:{};if(Z==="a"){var oe=S(j,T);if(oe){var q=B(oe);if(q){ee.href=q;var $=S(j,C);$&&(ee.target=$)}}}var le=document.createElement(Z);Y.appendChild(le),m.select(le).attr(ee),Y=le,J.push(le)}else Y.appendChild(document.createTextNode(y(ce)))}var ie="innerHTML";return U[ie]},V.lineCount=function(_){return _.selectAll("tspan.line").size()||1},V.positionText=function(_,U,Y){return _.each(function(){var J=m.select(this);function te(Q,Z){return Z===void 0?(Z=J.attr(Q),Z===null&&(J.attr(Q,0),Z=0)):J.attr(Q,Z),Z}var ae=te("x",U),ce=te("y",Y);this.nodeName==="text"&&J.selectAll("tspan.line").attr({x:ae,y:ce})})};function k(N,_,U){var Y=U.horizontalAlign,J=U.verticalAlign||"top",te=N.node().getBoundingClientRect(),ae=_.node().getBoundingClientRect(),ce,Q,Z;return J==="bottom"?Q=function(){return te.bottom-ce.height}:J==="middle"?Q=function(){return te.top+(te.height-ce.height)/2}:Q=function(){return te.top},Y==="right"?Z=function(){return te.right-ce.width}:Y==="center"?Z=function(){return te.left+(te.width-ce.width)/2}:Z=function(){return te.left},function(){ce=this.node().getBoundingClientRect();var j=Z()-ae.left,K=Q()-ae.top,ee=U.gd||{};if(U.gd){ee._fullLayout._calcInverseTransform(ee);var oe=P.apply3DTransform(ee._fullLayout._invTransform)(j,K);j=oe[0],K=oe[1]}return this.style({top:K+"px",left:j+"px","z-index":1e3}),this}}var O="1px ";V.makeTextShadow=function(N){var _=O,U=O,Y=O;return _+U+Y+N+", -"+_+"-"+U+Y+N+", "+_+"-"+U+Y+N+", -"+_+U+Y+N},V.makeEditable=function(N,_){var U=_.gd,Y=_.delegate,J=m.dispatch("edit","input","cancel"),te=Y||N;if(N.style({"pointer-events":Y?"none":"all"}),N.size()!==1)throw new Error("boo");function ae(){Q(),N.style({opacity:0});var Z=te.attr("class"),j;Z?j="."+Z.split(" ")[0]+"-math-group":j="[class*=-math-group]",j&&m.select(N.node().parentNode).select(j).style({opacity:0})}function ce(Z){var j=Z.node(),K=document.createRange();K.selectNodeContents(j);var ee=window.getSelection();ee.removeAllRanges(),ee.addRange(K),j.focus()}function Q(){var Z=m.select(U),j=Z.select(".svg-container"),K=j.append("div"),ee=N.node().style,oe=parseFloat(ee.fontSize||12),q=_.text;q===void 0&&(q=N.attr("data-unformatted")),K.classed("plugin-editable editable",!0).style({position:"absolute","font-family":ee.fontFamily||"Arial","font-size":oe,color:_.fill||ee.fill||"black",opacity:1,"background-color":_.background||"transparent",outline:"#ffffff33 1px solid",margin:[-oe/8+1,0,0,-1].join("px ")+"px",padding:"0","box-sizing":"border-box"}).attr({contenteditable:!0}).text(q).call(k(N,j,_)).on("blur",function(){U._editing=!1,N.text(this.textContent).style({opacity:1});var $=m.select(this).attr("class"),le;$?le="."+$.split(" ")[0]+"-math-group":le="[class*=-math-group]",le&&m.select(N.node().parentNode).select(le).style({opacity:0});var ie=this.textContent;m.select(this).transition().duration(0).remove(),m.select(document).on("mouseup",null),J.edit.call(N,ie)}).on("focus",function(){var $=this;U._editing=!0,m.select(document).on("mouseup",function(){if(m.event.target===$)return!1;document.activeElement===K.node()&&K.node().blur()})}).on("keyup",function(){m.event.which===27?(U._editing=!1,N.style({opacity:1}),m.select(this).style({opacity:0}).on("blur",function(){return!1}).transition().remove(),J.cancel.call(N,this.textContent)):(J.input.call(N,this.textContent),m.select(this).call(k(N,j,_)))}).on("keydown",function(){m.event.which===13&&this.blur()}).call(ce)}return _.immediate?ae():te.on("click",ae),m.rebind(N,J,"on")}},79990:function(G,V){var e={};V.throttle=function(i,L,A){var v=e[i],p=Date.now();if(!v){for(var t in e)e[t].ts<p-6e4&&delete e[t];v=e[i]={ts:0,timer:null}}m(v);function r(){A(),v.ts=Date.now(),v.onDone&&(v.onDone(),v.onDone=null)}if(p>v.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;r<A.length;r++)if(t=i.match(A[r]),t&&t.index===0){p=t[0];break}if(p||(p=L[L.indexOf(v)]),!p)return!1;var s=i.substr(p.length);return s?(t=s.match(/^\[(0|[1-9][0-9]*)\](\.(.+))?$/),t?{array:p,index:Number(t[1]),property:t[3]||""}:!1):{array:p,index:"",property:""}}},30962:function(G,V,e){var m=e(1426).extendFlat,P=e(41965),i={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"]},L={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"]},A=i.flags.slice().concat(["fullReplot"]),v=L.flags.slice().concat("layoutReplot");G.exports={traces:i,layout:L,traceFlags:function(){return p(A)},layoutFlags:function(){return p(v)},update:function(s,n){var l=n.editType;if(l&&l!=="none")for(var c=l.split("+"),u=0;u<c.length;u++)s[c[u]]=!0},overrideAll:t};function p(s){for(var n={},l=0;l<s.length;l++)n[s[l]]=!1;return n}function t(s,n,l){var c=m({},s);for(var u in c){var g=c[u];P(g)&&(c[u]=r(g,n,l,u))}return l==="from-root"&&(c.editType=n),c}function r(s,n,l,c){if(s.valType){var u=m({},s);if(u.editType=n,Array.isArray(s.items)){u.items=new Array(s.items.length);for(var g=0;g<s.items.length;g++)u.items[g]=r(s.items[g],n)}return u}else return t(s,n,c.charAt(0)==="_"?"nested":"from-root")}},58377:function(G,V,e){var m=e(92770),P=e(27812),i=e(73972),L=e(71828),A=e(74875),v=e(41675),p=e(7901),t=v.cleanId,r=v.getFromTrace,s=i.traceIs;V.clearPromiseQueue=function(d){Array.isArray(d._promises)&&d._promises.length>0&&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;M<a.length;M++){var E=a[M];if(C&&C.test(E)){var y=d[E];y.anchor&&y.anchor!=="free"&&(y.anchor=t(y.anchor)),y.overlaying&&(y.overlaying=t(y.overlaying)),y.type||(y.isdate?y.type="date":y.islog?y.type="log":y.isdate===!1&&y.islog===!1&&(y.type="linear")),(y.autorange==="withzero"||y.autorange==="tozero")&&(y.autorange=!0,y.rangemode="tozero"),delete y.islog,delete y.isdate,delete y.categories,f(y,"domain")&&delete y.domain,y.autotick!==void 0&&(y.tickmode===void 0&&(y.tickmode=y.autotick?"auto":"linear"),delete y.autotick),l(y)}else if(x&&x.test(E)){var z=d[E];l(z.radialaxis)}else if(S&&S.test(E)){var I=d[E];l(I.aaxis),l(I.baxis),l(I.caxis)}else if(b&&b.test(E)){var B=d[E],k=B.cameraposition;if(Array.isArray(k)&&k[0].length===4){var O=k[0],N=k[1],_=k[2],U=P([],O),Y=[];for(T=0;T<3;++T)Y[T]=N[T]+_*U[2+4*T];B.camera={eye:{x:Y[0],y:Y[1],z:Y[2]},center:{x:N[0],y:N[1],z:N[2]},up:{x:0,y:0,z:1}},delete B.cameraposition}l(B.xaxis),l(B.yaxis),l(B.zaxis)}}var J=Array.isArray(d.annotations)?d.annotations.length:0;for(M=0;M<J;M++){var te=d.annotations[M];L.isPlainObject(te)&&(te.ref&&(te.ref==="paper"?(te.xref="paper",te.yref="paper"):te.ref==="data"&&(te.xref="x",te.yref="y"),delete te.ref),n(te,"xref"),n(te,"yref"))}var ae=Array.isArray(d.shapes)?d.shapes.length:0;for(M=0;M<ae;M++){var ce=d.shapes[M];L.isPlainObject(ce)&&(n(ce,"xref"),n(ce,"yref"))}var Q=Array.isArray(d.images)?d.images.length:0;for(M=0;M<Q;M++){var Z=d.images[M];L.isPlainObject(Z)&&(n(Z,"xref"),n(Z,"yref"))}var j=d.legend;return j&&(j.x>3?(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;M<d.length;M++){var T=d[M],C;if(T.type==="histogramy"&&"xbins"in T&&!("ybins"in T)&&(T.ybins=T.xbins,delete T.xbins),T.error_y&&"opacity"in T.error_y){var x=p.defaults,S=T.error_y.color||(s(T,"bar")?p.defaultLine:x[M%x.length]);T.error_y.color=p.addOpacity(p.rgb(S),p.opacity(S)*T.error_y.opacity),delete T.error_y.opacity}if("bardir"in T&&(T.bardir==="h"&&(s(T,"bar")||T.type.substr(0,9)==="histogram")&&(T.orientation="h",V.swapXYData(T)),delete T.bardir),T.type==="histogramy"&&V.swapXYData(T),(T.type==="histogramx"||T.type==="histogramy")&&(T.type="histogram"),"scl"in T&&!("colorscale"in T)&&(T.colorscale=T.scl,delete T.scl),"reversescl"in T&&!("reversescale"in T)&&(T.reversescale=T.reversescl,delete T.reversescl),T.xaxis&&(T.xaxis=t(T.xaxis,"x")),T.yaxis&&(T.yaxis=t(T.yaxis,"y")),s(T,"gl3d")&&T.scene&&(T.scene=A.subplotsRegistry.gl3d.cleanId(T.scene)),!s(T,"pie-like")&&!s(T,"bar-like"))if(Array.isArray(T.textposition))for(C=0;C<T.textposition.length;C++)T.textposition[C]=g(T.textposition[C]);else T.textposition&&(T.textposition=g(T.textposition));var b=i.getModule(T);if(b&&b.colorbar){var a=b.colorbar.container,E=a?T[a]:T;E&&E.colorscale&&(E.colorscale==="YIGnBu"&&(E.colorscale="YlGnBu"),E.colorscale==="YIOrRd"&&(E.colorscale="YlOrRd"))}if(T.type==="surface"&&L.isPlainObject(T.contours)){var y=["x","y","z"];for(C=0;C<y.length;C++){var z=T.contours[y[C]];L.isPlainObject(z)&&(z.highlightColor&&(z.highlightcolor=z.highlightColor,delete z.highlightColor),z.highlightWidth&&(z.highlightwidth=z.highlightWidth,delete z.highlightWidth))}}if(T.type==="candlestick"||T.type==="ohlc"){var I=(T.increasing||{}).showlegend!==!1,B=(T.decreasing||{}).showlegend!==!1,k=c(T.increasing),O=c(T.decreasing);if(k!==!1&&O!==!1){var N=u(k,O,I,B);N&&(T.name=N)}else(k||O)&&!T.name&&(T.name=k||O)}if(Array.isArray(T.transforms)){var _=T.transforms;for(C=0;C<_.length;C++){var U=_[C];if(L.isPlainObject(U))switch(U.type){case"filter":U.filtersrc&&(U.target=U.filtersrc,delete U.filtersrc),U.calendar&&(U.valuecalendar||(U.valuecalendar=U.calendar),delete U.calendar);break;case"groupby":if(U.styles=U.styles||U.style,U.styles&&!Array.isArray(U.styles)){var Y=U.styles,J=Object.keys(Y);U.styles=[];for(var te=0;te<J.length;te++)U.styles.push({target:J[te],value:Y[J[te]]})}break}}}f(T,"line")&&delete T.line,"marker"in T&&(f(T.marker,"line")&&delete T.marker.line,f(T,"marker")&&delete T.marker),p.clean(T),T.autobinx&&(delete T.autobinx,delete T.xbins),T.autobiny&&(delete T.autobiny,delete T.ybins),l(T),T.colorbar&&l(T.colorbar),T.marker&&T.marker.colorbar&&l(T.marker.colorbar),T.line&&T.line.colorbar&&l(T.line.colorbar),T.aaxis&&l(T.aaxis),T.baxis&&l(T.baxis)}};function c(d){if(!L.isPlainObject(d))return!1;var M=d.name;return delete d.name,delete d.showlegend,(typeof M=="string"||typeof M=="number")&&String(M)}function u(d,M,T,C){if(T&&!C)return d;if(C&&!T||!d.trim())return M;if(!M.trim())return d;var x=Math.min(d.length,M.length),S;for(S=0;S<x&&d.charAt(S)===M.charAt(S);S++);var b=d.substr(0,S);return b.trim()}function g(d){var M="middle",T="center";return typeof d=="string"&&(d.indexOf("top")!==-1?M="top":d.indexOf("bottom")!==-1&&(M="bottom"),d.indexOf("left")!==-1?T="left":d.indexOf("right")!==-1&&(T="right")),M+" "+T}function f(d,M){return M in d&&typeof d[M]=="object"&&Object.keys(d[M]).length===0}V.swapXYData=function(d){var M;if(L.swapAttrs(d,["?","?0","d?","?bins","nbins?","autobin?","?src","error_?"]),Array.isArray(d.z)&&Array.isArray(d.z[0])&&(d.transpose?delete d.transpose:d.transpose=!0),d.error_x&&d.error_y){var T=d.error_y,C="copy_ystyle"in T?T.copy_ystyle:!(T.color||T.thickness||T.width);L.swapAttrs(d,["error_?.copy_ystyle"]),C&&L.swapAttrs(d,["error_?.color","error_?.thickness","error_?.width"])}if(typeof d.hoverinfo=="string"){var x=d.hoverinfo.split("+");for(M=0;M<x.length;M++)x[M]==="x"?x[M]="y":x[M]==="y"&&(x[M]="x");d.hoverinfo=x.join("+")}},V.coerceTraceIndices=function(d,M){if(m(M))return[M];if(!Array.isArray(M)||!M.length)return d.data.map(function(x,S){return S});if(Array.isArray(M)){for(var T=[],C=0;C<M.length;C++)L.isIndex(M[C],d.data.length)?T.push(M[C]):L.warn("trace index (",M[C],") is not a number or is out of bounds");return T}return M},V.manageArrayContainers=function(d,M,T){var C=d.obj,x=d.parts,S=x.length,b=x[S-1],a=m(b);if(a&&M===null){var E=x.slice(0,S-1).join("."),y=L.nestedProperty(C,E).get();y.splice(b,1)}else a&&d.get()===void 0&&d.get()===void 0&&(T[d.astr]=null),d.set(M)};var w=/(\.[^\[\]\.]+|\[[^\[\]\.]+\])$/;function h(d){var M=d.search(w);if(M>0)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;C<M.length;C++)for(var x=d._fullData[C],S=0;S<3;S++){var b=r(d,x,o[S]);if(b&&b.type!=="log"){var a=b._name,E=b._id.substr(1);if(E.substr(0,5)==="scene"){if(T[E]!==void 0)continue;a=E+"."+a}var y=a+".type";T[a]===void 0&&T[y]===void 0&&L.nestedProperty(d.layout,y).set(null)}}}},10641:function(G,V,e){var m=e(72391);V._doPlot=m._doPlot,V.newPlot=m.newPlot,V.restyle=m.restyle,V.relayout=m.relayout,V.redraw=m.redraw,V.update=m.update,V._guiRestyle=m._guiRestyle,V._guiRelayout=m._guiRelayout,V._guiUpdate=m._guiUpdate,V._storeDirectGUIEdit=m._storeDirectGUIEdit,V.react=m.react,V.extendTraces=m.extendTraces,V.prependTraces=m.prependTraces,V.addTraces=m.addTraces,V.deleteTraces=m.deleteTraces,V.moveTraces=m.moveTraces,V.purge=m.purge,V.addFrames=m.addFrames,V.deleteFrames=m.deleteFrames,V.animate=m.animate,V.setPlotConfig=m.setPlotConfig;var P=e(24401).getGraphDiv,i=e(34031).eraseActiveShape;V.deleteActiveShape=function(A){return i(P(A))},V.toImage=e(403),V.validate=e(84936),V.downloadImage=e(7239);var L=e(96318);V.makeTemplate=L.makeTemplate,V.validateTemplate=L.validateTemplate},6611:function(G,V,e){var m=e(41965),P=e(64213),i=e(47769),L=e(65888).sorterAsc,A=e(73972);V.containerArrayMatch=e(14458);var v=V.isAddVal=function(r){return r==="add"||m(r)},p=V.isRemoveVal=function(r){return r===null||r==="remove"};V.applyContainerArrayChanges=function(r,s,n,l,c){var u=s.astr,g=A.getComponentMethod(u,"supplyLayoutDefaults"),f=A.getComponentMethod(u,"draw"),w=A.getComponentMethod(u,"drawOne"),h=l.replot||l.recalc||g===P||f===P,o=r.layout,d=r._fullLayout;if(n[""]){Object.keys(n).length>1&&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;y<T.length;y++){if(I=T[y],B=n[I],k=Object.keys(B),O=B[""],N=v(O),I<0||I>x.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<k.length;z++)_=u+"["+I+"].",c(x[I],k[z],_).set(B[k[z]])}for(y=b.length-1;y>=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<T.length&&(I=T[y],!(I>=a));y++)U.push(I);for(y=a;y<E;y++)U.push(y)}for(y=0;y<U.length;y++)w(r,U[y])}else f(r);return!0}},72391:function(G,V,e){var m=e(39898),P=e(92770),i=e(57035),L=e(71828),A=L.nestedProperty,v=e(11086),p=e(10847),t=e(73972),r=e(86281),s=e(74875),n=e(89298),l=e(91424),c=e(7901),u=e(4305).initInteractions,g=e(77922),f=e(47322).clearOutline,w=e(72075).dfltConfig,h=e(6611),o=e(58377),d=e(61549),M=e(30962),T=e(85555).AX_NAME_PATTERN,C=0,x=5;function S(se,ye,Le,Be){var ot;if(se=L.getGraphDiv(se),v.init(se),L.isPlainObject(ye)){var at=ye;ye=at.data,Le=at.layout,Be=at.config,ot=at.frames}var wt=v.triggerHandler(se,"plotly_beforeplot",[ye,Le,Be]);if(wt===!1)return Promise.reject();!ye&&!Le&&!L.isPlotDiv(se)&&L.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",se);function It(){if(ot)return V.addFrames(se,ot)}z(se,Be),Le||(Le={}),m.select(se).classed("js-plotly-plot",!0),l.makeTester(),Array.isArray(se._promises)||(se._promises=[]);var Bt=(se.data||[]).length===0&&Array.isArray(ye);Array.isArray(ye)&&(o.cleanData(ye),Bt?se.data=ye:se.data.push.apply(se.data,ye),se.empty=!1),(!se.layout||Bt)&&(se.layout=o.cleanLayout(Le)),s.supplyDefaults(se);var Gt=se._fullLayout,Lt=Gt._has("cartesian");Gt._replotting=!0,(Bt||Gt._shouldCreateBgLayer)&&(be(se),Gt._shouldCreateBgLayer&&delete Gt._shouldCreateBgLayer),l.initGradients(se),l.initPatterns(se),Bt&&n.saveShowSpikeInitial(se);var Kt=!se.calcdata||se.calcdata.length!==(se._fullData||[]).length;Kt&&s.doCalcdata(se);for(var ir=0;ir<se.calcdata.length;ir++)se.calcdata[ir][0].trace=se._fullData[ir];se._context.responsive?se._responsiveChartHandler||(se._responsiveChartHandler=function(){L.isHidden(se)||s.resize(se)},window.addEventListener("resize",se._responsiveChartHandler)):L.clearResponsive(se);var _r=L.extendFlat({},Gt._size),yt=0;function jt(){for(var St=Gt._basePlotModules,_t=0;_t<St.length;_t++)St[_t].drawFramework&&St[_t].drawFramework(se);!Gt._glcanvas&&Gt._has("gl")&&(Gt._glcanvas=Gt._glcontainer.selectAll(".gl-canvas").data([{key:"contextLayer",context:!0,pick:!1},{key:"focusLayer",context:!1,pick:!1},{key:"pickLayer",context:!1,pick:!0}],function(or){return or.key}),Gt._glcanvas.enter().append("canvas").attr("class",function(or){return"gl-canvas gl-canvas-"+or.key.replace("Layer","")}).style({position:"absolute",top:0,left:0,overflow:"visible","pointer-events":"none"}));var Ht=se._context.plotGlPixelRatio;if(Gt._glcanvas){Gt._glcanvas.attr("width",Gt.width*Ht).attr("height",Gt.height*Ht).style("width",Gt.width+"px").style("height",Gt.height+"px");var $t=Gt._glcanvas.data()[0].regl;if($t&&(Math.floor(Gt.width*Ht)!==$t._gl.drawingBufferWidth||Math.floor(Gt.height*Ht)!==$t._gl.drawingBufferHeight)){var Qt="WebGL context buffer and canvas dimensions do not match due to browser/WebGL bug.";if(yt)L.error(Qt);else return L.log(Qt+" Clearing graph and plotting again."),s.cleanPlot([],{},se._fullData,Gt),s.supplyDefaults(se),Gt=se._fullLayout,s.doCalcdata(se),yt++,jt()}}return Gt.modebar.orientation==="h"?Gt._modebardiv.style("height",null).style("width","100%"):Gt._modebardiv.style("width",null).style("height",Gt.height+"px"),s.previousPromises(se)}function Yt(){if(s.clearAutoMarginIds(se),d.drawMarginPushers(se),n.allowAutoMargin(se),se._fullLayout.title.text&&se._fullLayout.title.automargin&&s.allowAutoMargin(se,"title.automargin"),Gt._has("pie"))for(var St=se._fullData,_t=0;_t<St.length;_t++){var Ht=St[_t];Ht.type==="pie"&&Ht.automargin&&s.allowAutoMargin(se,"pie."+Ht.uid+".automargin")}return s.doAutoMargin(se),s.previousPromises(se)}function br(){if(s.didMarginChange(_r,Gt._size))return L.syncOrAsync([Yt,d.layoutStyles],se)}function hr(){if(!Kt){ut();return}return L.syncOrAsync([t.getComponentMethod("shapes","calcAutorange"),t.getComponentMethod("annotations","calcAutorange"),ut],se)}function ut(){se._transitioning||(d.doAutoRangeAndConstraints(se),Bt&&n.saveRangeInitial(se),t.getComponentMethod("rangeslider","calcAutorange")(se))}function lt(){return n.draw(se,Bt?"":"redraw")}var xt=[s.previousPromises,It,jt,Yt,br];Lt&&xt.push(hr),xt.push(d.layoutStyles),Lt&&xt.push(lt,function(_t){_t._fullLayout._insideTickLabelsAutorange&&he(_t,_t._fullLayout._insideTickLabelsAutorange).then(function(){_t._fullLayout._insideTickLabelsAutorange=void 0})}),xt.push(d.drawData,d.finalDraw,u,s.addLinks,s.rehover,s.redrag,s.reselect,s.doAutoMargin,Tt,s.previousPromises);function Tt(St){St._fullLayout._insideTickLabelsAutorange&&Bt&&n.saveRangeInitial(St,!0)}var Ct=L.syncOrAsync(xt,se);return(!Ct||!Ct.then)&&(Ct=Promise.resolve()),Ct.then(function(){return b(se),se})}function b(se){var ye=se._fullLayout;ye._redrawFromAutoMarginCount?ye._redrawFromAutoMarginCount--:se.emit("plotly_afterplot")}function a(se){return L.extendFlat(w,se)}function E(se,ye){try{se._fullLayout._paper.style("background",ye)}catch(Le){L.error(Le)}}function y(se,ye){var Le=c.combine(ye,"white");E(se,Le)}function z(se,ye){if(!se._context){se._context=L.extendDeep({},w);var Le=m.select("base");se._context._baseUrl=Le.size()&&Le.attr("href")?window.location.href.split("#")[0]:""}var Be=se._context,ot,at,wt;if(ye){for(at=Object.keys(ye),ot=0;ot<at.length;ot++)wt=at[ot],!(wt==="editable"||wt==="edits")&&wt in Be&&(wt==="setBackground"&&ye[wt]==="opaque"?Be[wt]=y:Be[wt]=ye[wt]);ye.plot3dPixelRatio&&!Be.plotGlPixelRatio&&(Be.plotGlPixelRatio=Be.plot3dPixelRatio);var It=ye.editable;if(It!==void 0)for(Be.editable=It,at=Object.keys(Be.edits),ot=0;ot<at.length;ot++)Be.edits[at[ot]]=It;if(ye.edits)for(at=Object.keys(ye.edits),ot=0;ot<at.length;ot++)wt=at[ot],wt in Be.edits&&(Be.edits[wt]=ye.edits[wt]);Be._exportedPlot=ye._exportedPlot}Be.staticPlot&&(Be.editable=!1,Be.edits={},Be.autosizable=!1,Be.scrollZoom=!1,Be.doubleClick=!1,Be.showTips=!1,Be.showLink=!1,Be.displayModeBar=!1),Be.displayModeBar==="hover"&&!i&&(Be.displayModeBar=!0),(Be.setBackground==="transparent"||typeof Be.setBackground!="function")&&(Be.setBackground=E),Be._hasZeroHeight=Be._hasZeroHeight||se.clientHeight===0,Be._hasZeroWidth=Be._hasZeroWidth||se.clientWidth===0;var Bt=Be.scrollZoom,Gt=Be._scrollZoom={};if(Bt===!0)Gt.cartesian=1,Gt.gl3d=1,Gt.geo=1,Gt.mapbox=1;else if(typeof Bt=="string"){var Lt=Bt.split("+");for(ot=0;ot<Lt.length;ot++)Gt[Lt[ot]]=1}else Bt!==!1&&(Gt.gl3d=1,Gt.geo=1,Gt.mapbox=1)}function I(se){if(se=L.getGraphDiv(se),!L.isPlotDiv(se))throw new Error("This element is not a Plotly plot: "+se);return o.cleanData(se.data),o.cleanLayout(se.layout),se.calcdata=void 0,V._doPlot(se).then(function(){return se.emit("plotly_redraw"),se})}function B(se,ye,Le,Be){return se=L.getGraphDiv(se),s.cleanPlot([],{},se._fullData||[],se._fullLayout||{}),s.purge(se),V._doPlot(se,ye,Le,Be)}function k(se,ye){var Le=ye+1,Be=[],ot,at;for(ot=0;ot<se.length;ot++)at=se[ot],at<0?Be.push(Le+at):Be.push(at);return Be}function O(se,ye,Le){var Be,ot;for(Be=0;Be<ye.length;Be++){if(ot=ye[Be],ot!==parseInt(ot,10))throw new Error("all values in "+Le+" must be integers");if(ot>=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<ye.length;Be++)if(ot=ye[Be],typeof ot!="object"||Array.isArray(ot)||ot===null)throw new Error("all values in traces array must be non-array objects");if(typeof Le<"u"&&!Array.isArray(Le)&&(Le=[Le]),typeof Le<"u"&&Le.length!==ye.length)throw new Error("if indices is specified, traces.length must equal indices.length")}function U(se,ye,Le,Be){var ot=L.isPlainObject(Be);if(!Array.isArray(se.data))throw new Error("gd.data must be an array");if(!L.isPlainObject(ye))throw new Error("update must be a key:value object");if(typeof Le>"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<Le.length;ir++){if(wt=se.data[Le[ir]],Bt=A(wt,Kt),It=Bt.get(),Gt=ye[Kt][ir],!L.isArrayOrTypedArray(Gt))throw new Error("attribute: "+Kt+" index: "+ir+" must be an array");if(!L.isArrayOrTypedArray(It))throw new Error("cannot extend missing or non-array attribute: "+Kt);if(It.constructor!==Gt.constructor)throw new Error("cannot extend array with an array of a different type: "+Kt);Lt=ot?Be[Kt][ir]:Be,P(Lt)||(Lt=-1),at.push({prop:Bt,target:It,insert:Gt,maxp:Math.floor(Lt)})}return at}function J(se,ye,Le,Be,ot){U(se,ye,Le,Be);for(var at=Y(se,ye,Le,Be),wt={},It={},Bt=0;Bt<at.length;Bt++){var Gt=at[Bt].prop,Lt=at[Bt].maxp,Kt=ot(at[Bt].target,at[Bt].insert,Lt);Gt.set(Kt[0]),Array.isArray(wt[Gt.astr])||(wt[Gt.astr]=[]),wt[Gt.astr].push(Kt[1]),Array.isArray(It[Gt.astr])||(It[Gt.astr]=[]),It[Gt.astr].push(at[Bt].target.length)}return{update:wt,maxPoints:It}}function te(se,ye){var Le=new se.constructor(se.length+ye.length);return Le.set(se),Le.set(ye,se.length),Le}function ae(se,ye,Le,Be){se=L.getGraphDiv(se);function ot(Bt,Gt,Lt){var Kt,ir;if(L.isTypedArray(Bt))if(Lt<0){var _r=new Bt.constructor(0),yt=te(Bt,Gt);Lt<0?(Kt=yt,ir=_r):(Kt=_r,ir=yt)}else if(Kt=new Bt.constructor(Lt),ir=new Bt.constructor(Bt.length+Gt.length-Lt),Lt===Gt.length)Kt.set(Gt),ir.set(Bt);else if(Lt<Gt.length){var jt=Gt.length-Lt;Kt.set(Gt.subarray(jt)),ir.set(Bt),ir.set(Gt.subarray(0,jt),Bt.length)}else{var Yt=Lt-Gt.length,br=Bt.length-Yt;Kt.set(Bt.subarray(br)),Kt.set(Gt,Yt),ir.set(Bt.subarray(0,br))}else Kt=Bt.concat(Gt),ir=Lt>=0&&Lt<Kt.length?Kt.splice(0,Kt.length-Lt):[];return[Kt,ir]}var at=J(se,ye,Le,Be,ot),wt=V.redraw(se),It=[se,at.update,Le,at.maxPoints];return p.add(se,V.prependTraces,It,ae,arguments),wt}function ce(se,ye,Le,Be){se=L.getGraphDiv(se);function ot(Bt,Gt,Lt){var Kt,ir;if(L.isTypedArray(Bt))if(Lt<=0){var _r=new Bt.constructor(0),yt=te(Gt,Bt);Lt<0?(Kt=yt,ir=_r):(Kt=_r,ir=yt)}else if(Kt=new Bt.constructor(Lt),ir=new Bt.constructor(Bt.length+Gt.length-Lt),Lt===Gt.length)Kt.set(Gt),ir.set(Bt);else if(Lt<Gt.length){var jt=Gt.length-Lt;Kt.set(Gt.subarray(0,jt)),ir.set(Gt.subarray(jt)),ir.set(Bt,jt)}else{var Yt=Lt-Gt.length;Kt.set(Gt),Kt.set(Bt.subarray(0,Yt),Gt.length),ir.set(Bt.subarray(Yt))}else Kt=Gt.concat(Bt),ir=Lt>=0&&Lt<Kt.length?Kt.splice(Lt,Kt.length):[];return[Kt,ir]}var at=J(se,ye,Le,Be,ot),wt=V.redraw(se),It=[se,at.update,Le,at.maxPoints];return p.add(se,V.extendTraces,It,ce,arguments),wt}function Q(se,ye,Le){se=L.getGraphDiv(se);var Be=[],ot=V.deleteTraces,at=Q,wt=[se,Be],It=[se,ye],Bt,Gt;for(_(se,ye,Le),Array.isArray(ye)||(ye=[ye]),ye=ye.map(function(Lt){return L.extendFlat({},Lt)}),o.cleanData(ye),Bt=0;Bt<ye.length;Bt++)se.data.push(ye[Bt]);for(Bt=0;Bt<ye.length;Bt++)Be.push(-ye.length+Bt);if(typeof Le>"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<ye.length;It+=1)Bt=se.data.splice(ye[It],1)[0],Le.push(Bt);var Gt=V.redraw(se);return p.add(se,Be,at,ot,wt),Gt}function j(se,ye,Le){se=L.getGraphDiv(se);var Be=[],ot=[],at=j,wt=j,It=[se,Le,ye],Bt=[se,ye,Le],Gt;if(N(se,ye,Le),ye=Array.isArray(ye)?ye:[ye],typeof Le>"u")for(Le=[],Gt=0;Gt<ye.length;Gt++)Le.push(-ye.length+Gt);for(Le=Array.isArray(Le)?Le:[Le],ye=k(ye,se.data.length-1),Le=k(Le,se.data.length-1),Gt=0;Gt<se.data.length;Gt++)ye.indexOf(Gt)===-1&&Be.push(se.data[Gt]);for(Gt=0;Gt<ye.length;Gt++)ot.push({newIndex:Le[Gt],trace:se.data[ye[Gt]]});for(ot.sort(function(Kt,ir){return Kt.newIndex-ir.newIndex}),Gt=0;Gt<ot.length;Gt+=1)Be.splice(ot[Gt].newIndex,0,ot[Gt].trace);se.data=Be;var Lt=V.redraw(se);return p.add(se,at,It,wt,Bt),Lt}function K(se,ye,Le,Be){se=L.getGraphDiv(se),o.clearPromiseQueue(se);var ot={};if(typeof ye=="string")ot[ye]=Le;else if(L.isPlainObject(ye))ot=L.extendFlat({},ye),Be===void 0&&(Be=Le);else return L.warn("Restyle fail.",ye,Le,Be),Promise.reject();Object.keys(ot).length&&(se.changed=!0);var at=o.coerceTraceIndices(se,Be),wt=le(se,ot,at),It=wt.flags;It.calc&&(se.calcdata=void 0),It.clearAxisTypes&&o.clearAxisTypes(se,at,{});var Bt=[];It.fullReplot?Bt.push(V._doPlot):(Bt.push(s.previousPromises),s.supplyDefaults(se),It.markerSize&&(s.doCalcdata(se),Me(Bt)),It.style&&Bt.push(d.doTraceStyle),It.colorbars&&Bt.push(d.doColorBars),Bt.push(b)),Bt.push(s.rehover,s.redrag,s.reselect),p.add(se,K,[se,wt.undoit,wt.traces],K,[se,wt.redoit,wt.traces]);var Gt=L.syncOrAsync(Bt,se);return(!Gt||!Gt.then)&&(Gt=Promise.resolve()),Gt.then(function(){return se.emit("plotly_restyle",wt.eventData),se})}function ee(se){return se===void 0?null:se}function oe(se,ye){return ye?function(Le,Be,ot){var at=A(Le,Be),wt=at.set;return at.set=function(It){var Bt=(ot||"")+Be;q(Bt,at.get(),It,se),wt(It)},at}:A}function q(se,ye,Le,Be){if(Array.isArray(ye)||Array.isArray(Le))for(var ot=Array.isArray(ye)?ye:[],at=Array.isArray(Le)?Le:[],wt=Math.max(ot.length,at.length),It=0;It<wt;It++)q(se+"["+It+"]",ot[It],at[It],Be);else if(L.isPlainObject(ye)||L.isPlainObject(Le)){var Bt=L.isPlainObject(ye)?ye:{},Gt=L.isPlainObject(Le)?Le:{},Lt=L.extendFlat({},Bt,Gt);for(var Kt in Lt)q(se+"."+Kt,Bt[Kt],Gt[Kt],Be)}else Be[se]===void 0&&(Be[se]=ee(ye))}function $(se,ye,Le){for(var Be in Le){var ot=A(se,Be);q(Be,ot.get(),Le[Be],ye)}}function le(se,ye,Le){var Be=se._fullLayout,ot=se._fullData,at=se.data,wt=Be._guiEditing,It=oe(Be._preGUI,wt),Bt=L.extendDeepAll({},ye),Gt;ie(ye);var Lt=M.traceFlags(),Kt={},ir={},_r;function yt(){return Le.map(function(){})}function jt(jr){var In=n.id2name(jr);_r.indexOf(In)===-1&&_r.push(In)}function Yt(jr){return"LAYOUT"+jr+".autorange"}function br(jr){return"LAYOUT"+jr+".range"}function hr(jr){for(var In=jr;In<ot.length;In++)if(ot[In]._input===at[jr])return ot[In]}function ut(jr,In,Dn){if(Array.isArray(jr)){jr.forEach(function(Nr){ut(Nr,In,Dn)});return}if(!(jr in ye||o.hasParent(ye,jr))){var xr;if(jr.substr(0,6)==="LAYOUT")xr=It(se.layout,jr.replace("LAYOUT",""));else{var Ar=Le[Dn],Or=Be._tracePreGUI[hr(Ar)._fullInput.uid];xr=oe(Or,wt)(at[Ar],jr)}jr in ir||(ir[jr]=yt()),ir[jr][Dn]===void 0&&(ir[jr][Dn]=ee(xr.get())),In!==void 0&&xr.set(In)}}function lt(jr){return function(In){return ot[In][jr]}}function xt(jr){return function(In,Dn){return In===!1?ot[Le[Dn]][jr]:null}}for(var Tt in ye){if(o.hasParent(ye,Tt))throw new Error("cannot set "+Tt+" and a parent attribute simultaneously");var Ct=ye[Tt],St,_t,Ht,$t,Qt,or;if((Tt==="autobinx"||Tt==="autobiny")&&(Tt=Tt.charAt(Tt.length-1)+"bins",Array.isArray(Ct)?Ct=Ct.map(xt(Tt)):Ct===!1?Ct=Le.map(lt(Tt)):Ct=null),Kt[Tt]=Ct,Tt.substr(0,6)==="LAYOUT"){Ht=It(se.layout,Tt.replace("LAYOUT","")),ir[Tt]=[ee(Ht.get())],Ht.set(Array.isArray(Ct)?Ct[0]:Ct),Lt.calc=!0;continue}for(ir[Tt]=yt(),Gt=0;Gt<Le.length;Gt++){St=at[Le[Gt]],_t=hr(Le[Gt]);var Er=Be._tracePreGUI[_t._fullInput.uid];if(Ht=oe(Er,wt)(St,Tt),$t=Ht.get(),Qt=Array.isArray(Ct)?Ct[Gt%Ct.length]:Ct,Qt!==void 0){var Ye=Ht.parts[Ht.parts.length-1],We=Tt.substr(0,Tt.length-Ye.length-1),Dt=We?We+".":"",Ft=We?A(_t,We).get():_t;if(or=r.getTraceValObject(_t,Ht.parts),or&&or.impliedEdits&&Qt!==null)for(var Zt in or.impliedEdits)ut(L.relativeAttr(Tt,Zt),or.impliedEdits[Zt],Gt);else if((Ye==="thicknessmode"||Ye==="lenmode")&&$t!==Qt&&(Qt==="fraction"||Qt==="pixels")&&Ft){var nr=Be._size,lr=Ft.orient,rr=lr==="top"||lr==="bottom";if(Ye==="thicknessmode"){var zt=rr?nr.h:nr.w;ut(Dt+"thickness",Ft.thickness*(Qt==="fraction"?1/zt:zt),Gt)}else{var fr=rr?nr.w:nr.h;ut(Dt+"len",Ft.len*(Qt==="fraction"?1/fr:fr),Gt)}}else if(Tt==="type"&&(Qt==="pie"!=($t==="pie")||Qt==="funnelarea"!=($t==="funnelarea"))){var dr="x",pr="y";(Qt==="bar"||$t==="bar")&&St.orientation==="h"&&(dr="y",pr="x"),L.swapAttrs(St,["?","?src"],"labels",dr),L.swapAttrs(St,["d?","?0"],"label",dr),L.swapAttrs(St,["?","?src"],"values",pr),$t==="pie"||$t==="funnelarea"?(A(St,"marker.color").set(A(St,"marker.colors").get()),Be._pielayer.selectAll("g.trace").remove()):t.traceIs(St,"cartesian")&&A(St,"marker.colors").set(A(St,"marker.color").get())}ir[Tt][Gt]=ee($t);var vr=["swapxy","swapxyaxes","orientation","orientationaxes"];if(vr.indexOf(Tt)!==-1){if(Tt==="orientation"){Ht.set(Qt);var Hr=St.x&&!St.y?"h":"v";if((Ht.get()||Hr)===_t.orientation)continue}else Tt==="orientationaxes"&&(St.orientation={v:"h",h:"v"}[_t.orientation]);o.swapXYData(St),Lt.calc=Lt.clearAxisTypes=!0}else s.dataArrayContainers.indexOf(Ht.parts[0])!==-1?(o.manageArrayContainers(Ht,Qt,ir),Lt.calc=!0):(or?or.arrayOk&&!t.traceIs(_t,"regl")&&(L.isArrayOrTypedArray(Qt)||L.isArrayOrTypedArray($t))?Lt.calc=!0:M.update(Lt,or):Lt.calc=!0,Ht.set(Qt))}}if(["swapxyaxes","orientationaxes"].indexOf(Tt)!==-1&&n.swap(se,Le),Tt==="orientationaxes"){var Ir=A(se.layout,"hovermode"),kr=Ir.get();kr==="x"?Ir.set("y"):kr==="y"?Ir.set("x"):kr==="x unified"?Ir.set("y unified"):kr==="y unified"&&Ir.set("x unified")}if(["orientation","type"].indexOf(Tt)!==-1){for(_r=[],Gt=0;Gt<Le.length;Gt++){var pn=at[Le[Gt]];t.traceIs(pn,"cartesian")&&(jt(pn.xaxis||"x"),jt(pn.yaxis||"y"))}ut(_r.map(Yt),!0,0),ut(_r.map(br),[0,1],0)}}return(Lt.calc||Lt.plot)&&(Lt.fullReplot=!0),{flags:Lt,undoit:ir,redoit:Kt,traces:Le,eventData:L.extendDeepNoArrays([],[Bt,Le])}}function ie(se){var ye=L.counterRegex("axis",".title",!1,!1),Le=/colorbar\.title$/,Be=Object.keys(se),ot,at,wt;for(ot=0;ot<Be.length;ot++)at=Be[ot],wt=se[at],(at==="title"||ye.test(at)||Le.test(at))&&(typeof wt=="string"||typeof wt=="number")?It(at,at.replace("title","title.text")):at.indexOf("titlefont")>-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;Kt<wt.length;Kt++)if(wt[Kt].indexOf("allaxes")===0){for(ir=0;ir<It.length;ir++){var _r=It[ir]._id.substr(1),yt=_r.indexOf("scene")!==-1?_r+".":"",jt=wt[Kt].replace("allaxes",yt+It[ir]._name);ye[jt]||(ye[jt]=ye[wt[Kt]])}delete ye[wt[Kt]]}var Yt=M.layoutFlags(),br={},hr={};function ut(Or,Nr){if(Array.isArray(Or)){Or.forEach(function(vn){ut(vn,Nr)});return}if(!(Or in ye||o.hasParent(ye,Or))){var qr=at(Le,Or);Or in hr||(hr[Or]=ee(qr.get())),Nr!==void 0&&qr.set(Nr)}}var lt={},xt;function Tt(Or){var Nr=n.name2id(Or.split(".")[0]);return lt[Nr]=1,Nr}for(var Ct in ye){if(o.hasParent(ye,Ct))throw new Error("cannot set "+Ct+" and a parent attribute simultaneously");for(var St=at(Le,Ct),_t=ye[Ct],Ht=St.parts.length,$t=Ht-1;$t>0&&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;Kt<Ar.length;Kt++)if(Ar[Kt].showlegend){Yt.calc=!0;break}return(Yt.plot||Yt.calc)&&(Yt.layoutReplot=!0),{flags:Yt,rangesAltered:lt,undoit:hr,redoit:br,eventData:Bt}}function xe(se){var ye=se._fullLayout,Le=ye.width,Be=ye.height;return se.layout.autosize&&s.plotAutoSize(se,se.layout,ye),ye.width!==Le||ye.height!==Be}function Se(se,ye,Le,Be){se=L.getGraphDiv(se),o.clearPromiseQueue(se),L.isPlainObject(ye)||(ye={}),L.isPlainObject(Le)||(Le={}),Object.keys(ye).length&&(se.changed=!0),Object.keys(Le).length&&(se.changed=!0);var ot=o.coerceTraceIndices(se,Be),at=le(se,L.extendFlat({},ye),ot),wt=at.flags,It=Ee(se,L.extendFlat({},Le)),Bt=It.flags;(wt.calc||Bt.calc)&&(se.calcdata=void 0),wt.clearAxisTypes&&o.clearAxisTypes(se,ot,Le);var Gt=[];Bt.layoutReplot?Gt.push(d.layoutReplot):wt.fullReplot?Gt.push(V._doPlot):(Gt.push(s.previousPromises),me(se,Bt,It)||s.supplyDefaults(se),wt.style&&Gt.push(d.doTraceStyle),(wt.colorbars||Bt.colorbars)&&Gt.push(d.doColorBars),Bt.legend&&Gt.push(d.doLegend),Bt.layoutstyle&&Gt.push(d.layoutStyles),Bt.axrange&&Me(Gt,It.rangesAltered),Bt.ticks&&Gt.push(d.doTicksRelayout),Bt.modebar&&Gt.push(d.doModeBar),Bt.camera&&Gt.push(d.doCamera),Gt.push(b)),Gt.push(s.rehover,s.redrag,s.reselect),p.add(se,Se,[se,at.undoit,It.undoit,at.traces],Se,[se,at.redoit,It.redoit,at.traces]);var Lt=L.syncOrAsync(Gt,se);return(!Lt||!Lt.then)&&(Lt=Promise.resolve(se)),Lt.then(function(){return se.emit("plotly_update",{data:at.eventData,layout:It.eventData}),se})}function Ue(se){return function(Le){Le._fullLayout._guiEditing=!0;var Be=se.apply(null,arguments);return Le._fullLayout._guiEditing=!1,Be}}var He=[{pattern:/^hiddenlabels/,attr:"legend.uirevision"},{pattern:/^((x|y)axis\d*)\.((auto)?range|title\.text)/},{pattern:/axis\d*\.showspikes$/,attr:"modebar.uirevision"},{pattern:/(hover|drag)mode$/,attr:"modebar.uirevision"},{pattern:/^(scene\d*)\.camera/},{pattern:/^(geo\d*)\.(projection|center|fitbounds)/},{pattern:/^(ternary\d*\.[abc]axis)\.(min|title\.text)$/},{pattern:/^(polar\d*\.radialaxis)\.((auto)?range|angle|title\.text)/},{pattern:/^(polar\d*\.angularaxis)\.rotation/},{pattern:/^(mapbox\d*)\.(center|zoom|bearing|pitch)/},{pattern:/^legend\.(x|y)$/,attr:"editrevision"},{pattern:/^(shapes|annotations)/,attr:"editrevision"},{pattern:/^title\.text$/,attr:"editrevision"}],Fe=[{pattern:/^selectedpoints$/,attr:"selectionrevision"},{pattern:/(^|value\.)visible$/,attr:"legend.uirevision"},{pattern:/^dimensions\[\d+\]\.constraintrange/},{pattern:/^node\.(x|y|groups)/},{pattern:/^level$/},{pattern:/(^|value\.)name$/},{pattern:/colorbar\.title\.text$/},{pattern:/colorbar\.(x|y)$/,attr:"editrevision"}];function Ge(se,ye){for(var Le=0;Le<ye.length;Le++){var Be=ye[Le],ot=se.match(Be.pattern);if(ot){var at=ot[1]||"";return{head:at,tail:se.substr(at.length+1),attr:Be.attr}}}}function nt(se,ye){var Le=A(ye,se).get();if(Le!==void 0)return Le;var Be=se.split(".");for(Be.pop();Be.length>1;)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<ye.length;Le++)if(ye[Le]._fullInput.uid===se)return Le;return-1}function $e(se,ye,Le){for(var Be=0;Be<ye.length;Be++)if(ye[Be].uid===se)return Be;return!ye[Le]||ye[Le].uid?-1:Le}function et(se,ye){var Le=L.isPlainObject(se),Be=Array.isArray(se);return Le||Be?(Le&&L.isPlainObject(ye)||Be&&Array.isArray(ye))&&JSON.stringify(se)===JSON.stringify(ye):se===ye}function ct(se,ye,Le,Be){var ot=Be._preGUI,at,wt,It,Bt,Gt,Lt,Kt,ir,_r,yt,jt=[],Yt={},br={};for(at in ot){if(Gt=Ge(at,He),Gt){if(_r=Gt.head,yt=Gt.tail,wt=Gt.attr||_r+".uirevision",It=A(Be,wt).get(),Bt=It&&nt(wt,ye),Bt&&Bt===It){if(Lt=ot[at],Lt===null&&(Lt=void 0),Kt=A(ye,at),ir=Kt.get(),et(ir,Lt)){ir===void 0&&yt==="autorange"&&jt.push(_r),Kt.set(ee(A(Be,at).get()));continue}else if(yt==="autorange"||yt.substr(0,6)==="range["){var hr=ot[_r+".range[0]"],ut=ot[_r+".range[1]"],lt=ot[_r+".autorange"];if(lt||lt===null&&hr===null&&ut===null){if(!(_r in Yt)){var xt=A(ye,_r).get();Yt[_r]=xt&&(xt.autorange||xt.autorange!==!1&&(!xt.range||xt.range.length!==2))}if(Yt[_r]){Kt.set(ee(A(Be,at).get()));continue}}}}}else L.warn("unrecognized GUI edit: "+at);delete ot[at],Gt&&Gt.tail.substr(0,6)==="range["&&(br[Gt.head]=1)}for(var Tt=0;Tt<jt.length;Tt++){var Ct=jt[Tt];if(br[Ct]){var St=A(ye,Ct).get();St&&delete St.autorange}}var _t=Be._tracePreGUI;for(var Ht in _t){var $t=_t[Ht],Qt=null,or;for(at in $t){if(!Qt){var Er=qe(Ht,Le);if(Er<0){delete _t[Ht];break}var Ye=Le[Er];or=Ye._fullInput;var We=$e(Ht,se,or.index);if(We<0){delete _t[Ht];break}Qt=se[We]}if(Gt=Ge(at,Fe),Gt){if(Gt.attr?(It=A(Be,Gt.attr).get(),Bt=It&&nt(Gt.attr,ye)):(It=or.uirevision,Bt=Qt.uirevision,Bt===void 0&&(Bt=ye.uirevision)),Bt&&Bt===It&&(Lt=$t[at],Lt===null&&(Lt=void 0),Kt=A(Qt,at),ir=Kt.get(),et(ir,Lt))){Kt.set(ee(A(or,at).get()));continue}}else L.warn("unrecognized GUI edit: "+at+" in trace uid "+Ht);delete $t[at]}}}function dt(se,ye,Le,Be){var ot,at;function wt(){return V.addFrames(se,ot)}se=L.getGraphDiv(se),o.clearPromiseQueue(se);var It=se._fullData,Bt=se._fullLayout;if(!L.isPlotDiv(se)||!It||!Bt)at=V.newPlot(se,ye,Le,Be);else{if(L.isPlainObject(ye)){var Gt=ye;ye=Gt.data,Le=Gt.layout,Be=Gt.config,ot=Gt.frames}var Lt=!1;if(Be){var Kt=L.extendDeep({},se._context);se._context=void 0,z(se,Be),Lt=Vt(Kt,se._context)}se.data=ye||[],o.cleanData(se.data),se.layout=Le||{},o.cleanLayout(se.layout),ct(se.data,se.layout,It,Bt),s.supplyDefaults(se,{skipUpdateCalc:!0});var ir=se._fullData,_r=se._fullLayout,yt=_r.datarevision===void 0,jt=_r.transition,Yt=At(se,Bt,_r,yt,jt),br=Yt.newDataRevision,hr=pt(se,It,ir,yt,jt,br);if(xe(se)&&(Yt.layoutReplot=!0),hr.calc||Yt.calc){se.calcdata=void 0;for(var ut=Object.getOwnPropertyNames(_r),lt=0;lt<ut.length;lt++){var xt=ut[lt],Tt=xt.substring(0,5);if(Tt==="xaxis"||Tt==="yaxis"){var Ct=_r[xt]._emptyCategories;Ct&&Ct()}}}else s.supplyDefaultsUpdateCalc(se.calcdata,ir);var St=[];if(ot&&(se._transitionData={},s.createTransitionData(se),St.push(wt)),_r.transition&&!Lt&&(hr.anim||Yt.anim))Yt.ticks&&St.push(d.doTicksRelayout),s.doCalcdata(se),d.doAutoRangeAndConstraints(se),St.push(function(){return s.transitionFromReact(se,hr,Yt,Bt)});else if(hr.fullReplot||Yt.layoutReplot||Lt)se._fullLayout._skipDefaults=!0,St.push(V._doPlot);else{for(var _t in Yt.arrays){var Ht=Yt.arrays[_t];if(Ht.length){var $t=t.getComponentMethod(_t,"drawOne");if($t!==L.noop)for(var Qt=0;Qt<Ht.length;Qt++)$t(se,Ht[Qt]);else{var or=t.getComponentMethod(_t,"draw");if(or===L.noop)throw new Error("cannot draw components: "+_t);or(se)}}}St.push(s.previousPromises),hr.style&&St.push(d.doTraceStyle),(hr.colorbars||Yt.colorbars)&&St.push(d.doColorBars),Yt.legend&&St.push(d.doLegend),Yt.layoutstyle&&St.push(d.layoutStyles),Yt.axrange&&Me(St),Yt.ticks&&St.push(d.doTicksRelayout),Yt.modebar&&St.push(d.doModeBar),Yt.camera&&St.push(d.doCamera),St.push(b)}St.push(s.rehover,s.redrag,s.reselect),at=L.syncOrAsync(St,se),(!at||!at.then)&&(at=Promise.resolve(se))}return at.then(function(){return se.emit("plotly_react",{data:ye,layout:Le}),se})}function pt(se,ye,Le,Be,ot,at){var wt=ye.length===Le.length;if(!ot&&!wt)return{fullReplot:!0,calc:!0};var It=M.traceFlags();It.arrays={},It.nChanges=0,It.nChangesAnim=0;var Bt,Gt;function Lt(_r){var yt=r.getTraceValObject(Gt,_r);return!Gt._module.animatable&&yt.anim&&(yt.anim=!1),yt}var Kt={getValObject:Lt,flags:It,immutable:Be,transition:ot,newDataRevision:at,gd:se},ir={};for(Bt=0;Bt<ye.length;Bt++)if(Le[Bt]){if(Gt=Le[Bt]._fullInput,s.hasMakesDataTransform(Gt)&&(Gt=Le[Bt]),ir[Gt.uid])continue;ir[Gt.uid]=1,Mt(ye[Bt]._fullInput,Gt,[],Kt)}return(It.calc||It.plot)&&(It.fullReplot=!0),ot&&It.nChanges&&It.nChangesAnim&&(It.anim=It.nChanges===It.nChangesAnim&&wt?"all":"some"),It}function At(se,ye,Le,Be,ot){var at=M.layoutFlags();at.arrays={},at.rangesAltered={},at.nChanges=0,at.nChangesAnim=0;function wt(Bt){return r.getLayoutValObject(Le,Bt)}var It={getValObject:wt,flags:at,immutable:Be,transition:ot,gd:se};return Mt(ye,Le,[],It),(at.plot||at.calc)&&(at.layoutReplot=!0),ot&&at.nChanges&&at.nChangesAnim&&(at.anim=at.nChanges===at.nChangesAnim?"all":"some"),at}function Mt(se,ye,Le,Be){var ot,at,wt,It=Be.getValObject,Bt=Be.flags,Gt=Be.immutable,Lt=Be.inArray,Kt=Be.arrayIndex;function ir(){var Er=ot.editType;if(Lt&&Er.indexOf("arraydraw")!==-1){L.pushUnique(Bt.arrays[Lt],Kt);return}M.update(Bt,ot),Er!=="none"&&Bt.nChanges++,Be.transition&&ot.anim&&Bt.nChangesAnim++,(Te.test(wt)||Oe.test(wt))&&(Bt.rangesAltered[Le[0]]=1),Ne.test(wt)&&A(ye,"_inputDomain").set(null),at==="datarevision"&&(Bt.newDataRevision=1)}function _r(Er){return Er.valType==="data_array"||Er.arrayOk}for(at in se){if(Bt.calc&&!Be.transition)return;var yt=se[at],jt=ye[at],Yt=Le.concat(at);if(wt=Yt.join("."),!(at.charAt(0)==="_"||typeof yt=="function"||yt===jt)){if((at==="tick0"||at==="dtick")&&Le[0]!=="geo"){var br=ye.tickmode;if(br==="auto"||br==="array"||!br)continue}if(!(at==="range"&&ye.autorange)&&!((at==="zmin"||at==="zmax")&&ye.type==="contourcarpet")&&(ot=It(Yt),!!ot&&!(ot._compareAsJSON&&JSON.stringify(yt)===JSON.stringify(jt)))){var hr=ot.valType,ut,lt=_r(ot),xt=Array.isArray(yt),Tt=Array.isArray(jt);if(xt&&Tt){var Ct="_input_"+at,St=se[Ct],_t=ye[Ct];if(Array.isArray(St)&&St===_t)continue}if(jt===void 0)lt&&xt?Bt.calc=!0:ir();else if(ot._isLinkedToArray){var Ht=[],$t=!1;Lt||(Bt.arrays[at]=Ht);var Qt=Math.min(yt.length,jt.length),or=Math.max(yt.length,jt.length);if(Qt!==or)if(ot.editType==="arraydraw")$t=!0;else{ir();continue}for(ut=0;ut<Qt;ut++)Mt(yt[ut],jt[ut],Yt.concat(ut),L.extendFlat({inArray:at,arrayIndex:ut},Be));if($t)for(ut=Qt;ut<or;ut++)Ht.push(ut)}else!hr&&L.isPlainObject(yt)?Mt(yt,jt,Yt,Be):lt?xt&&Tt?(Gt&&(Bt.calc=!0),(Gt||Be.newDataRevision)&&ir()):xt!==Tt?Bt.calc=!0:ir():xt&&Tt?(yt.length!==jt.length||String(yt)!==String(jt))&&ir():ir()}}}for(at in ye)if(!(at in se||at.charAt(0)==="_"||typeof ye[at]=="function"))if(ot=It(Le.concat(at)),_r(ot)&&Array.isArray(ye[at])){Bt.calc=!0;return}else ir()}function Vt(se,ye){var Le;for(Le in se)if(Le.charAt(0)!=="_"){var Be=se[Le],ot=ye[Le];if(Be!==ot)if(L.isPlainObject(Be)&&L.isPlainObject(ot)){if(Vt(Be,ot))return!0}else if(Array.isArray(Be)&&Array.isArray(ot)){if(Be.length!==ot.length)return!0;for(var at=0;at<Be.length;at++)if(Be[at]!==ot[at])if(L.isPlainObject(Be[at])&&L.isPlainObject(ot[at])){if(Vt(Be[at],ot[at]))return!0}else return!0}else return!0}}function Je(se,ye,Le){if(se=L.getGraphDiv(se),!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 animating it. For more details, see https://plotly.com/javascript/animations/");var Be=se._transitionData;Be._frameQueue||(Be._frameQueue=[]),Le=s.supplyAnimationDefaults(Le);var ot=Le.transition,at=Le.frame;Be._frameWaitingCnt===void 0&&(Be._frameWaitingCnt=0);function wt(Gt){return Array.isArray(ot)?Gt>=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;or<Qt.length;or++){var Er;Qt[or].type==="byname"?Er=s.computeFrame(se,Qt[or].name):Er=Qt[or].data;var Ye=It(or),We=wt(or);We.duration=Math.min(We.duration,Ye.duration);var Dt={frame:Er,name:Qt[or].name,frameOpts:Ye,transitionOpts:We};or===Qt.length-1&&(Dt.onComplete=Bt(Gt,2),Dt.onInterrupt=Lt),Be._frameQueue.push(Dt)}Le.mode==="immediate"&&(Be._lastFrameAt=-1/0),Be._animationRaf||jt()}}function _r(){se.emit("plotly_animated"),window.cancelAnimationFrame(Be._animationRaf),Be._animationRaf=null}function yt(){Be._currentFrame&&Be._currentFrame.onComplete&&Be._currentFrame.onComplete();var Qt=Be._currentFrame=Be._frameQueue.shift();if(Qt){var or=Qt.name?Qt.name.toString():null;se._fullLayout._currentFrame=or,Be._lastFrameAt=Date.now(),Be._timeToNext=Qt.frameOpts.duration,s.transition(se,Qt.frame.data,Qt.frame.layout,o.coerceTraceIndices(se,Qt.frame.traces),Qt.frameOpts,Qt.transitionOpts).then(function(){Qt.onComplete&&Qt.onComplete()}),se.emit("plotly_animatingframe",{name:or,frame:Qt.frame,animation:{frame:Qt.frameOpts,transition:Qt.transitionOpts}})}else _r()}function jt(){se.emit("plotly_animating"),Be._lastFrameAt=-1/0,Be._timeToNext=0,Be._runningTransitions=0,Be._currentFrame=null;var Qt=function(){Be._animationRaf=window.requestAnimationFrame(Qt),Date.now()-Be._lastFrameAt>Be._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;hr<Be._frames.length;hr++)ut=Be._frames[hr],ut&&(xt||String(ut.group)===String(ye))&&lt.push({type:"byname",name:String(ut.name),data:br({name:ut.name})});else if(Tt)for(hr=0;hr<ye.length;hr++){var St=ye[hr];["number","string"].indexOf(typeof St)!==-1?(St=String(St),lt.push({type:"byname",name:St,data:br({name:St})})):L.isPlainObject(St)&&lt.push({type:"object",data:br(L.extendFlat({},St))})}for(hr=0;hr<lt.length;hr++)if(ut=lt[hr],ut.type==="byname"&&!Be._frameHash[ut.data.name]){L.warn('animate failure: frame not found: "'+ut.data.name+'"'),Lt();return}["next","immediate"].indexOf(Le.mode)!==-1&&Kt(),Le.direction==="reverse"&&lt.reverse();var _t=se._fullLayout._currentFrame;if(_t&&Le.fromcurrent){var Ht=-1;for(hr=0;hr<lt.length;hr++)if(ut=lt[hr],ut.type==="byname"&&ut.name===_t){Ht=hr;break}if(Ht>0&&Ht<lt.length-1){var $t=[];for(hr=0;hr<lt.length;hr++)ut=lt[hr],(lt[hr].type!=="byname"||hr>Ht)&&$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&&C<x&&(C++,L.warn('addFrames: overwriting frame "'+(Bt[_r]||Kt[_r]).name+'" with a frame whose name of type "number" also equates to "'+_r+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),C===x&&L.warn("addFrames: This API call has yielded too many of these warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.")),Kt[ir]={name:ir},Lt.push({frame:s.supplyFrameDefaults(ye[Be]),index:Le&&Le[Be]!==void 0&&Le[Be]!==null?Le[Be]:Gt+Be})}Lt.sort(function(Ct,St){return Ct.index>St.index?-1:Ct.index<St.index?1:0});var Yt=[],br=[],hr=It.length;for(Be=Lt.length-1;Be>=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<It.length&&(It[at]||{}).name!==ot.name;at++);Yt.push({type:"replace",index:at,value:ot}),br.unshift({type:"replace",index:at,value:It[at]})}else wt=Math.max(0,Math.min(Lt[Be].index,hr)),Yt.push({type:"insert",index:wt,value:ot}),br.unshift({type:"delete",index:wt}),hr++}var ut=s.modifyFrames,lt=s.modifyFrames,xt=[se,br],Tt=[se,Yt];return p&&p.add(se,ut,xt,lt,Tt),s.modifyFrames(se,Yt)}function Ie(se,ye){if(se=L.getGraphDiv(se),!L.isPlotDiv(se))throw new Error("This element is not a Plotly plot: "+se);var Le,Be,ot=se._transitionData._frames,at=[],wt=[];if(!ye)for(ye=[],Le=0;Le<ot.length;Le++)ye.push(Le);for(ye=ye.slice(),ye.sort(),Le=ye.length-1;Le>=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<ee.length;q++)s(ee[q])&&J(ee[q],j+1,oe+"["+q+"].")}else s(ee)&&J(ee,j+1,oe+".")}_=B,U="",V.crawl(i,Y),B._module&&B._module.attributes&&V.crawl(B._module.attributes,Y);var te=B.transforms;if(te)for(var ae=0;ae<te.length;ae++){var ce=te[ae],Q=ce._module;Q&&(U="transforms["+ae+"].",_=ce,V.crawl(Q.attributes,Y))}return k},V.getTraceValObject=function(B,k){var O=k[0],N=1,_,U;if(O==="transforms"){if(k.length===1)return i.transforms;var Y=B.transforms;if(!Array.isArray(Y)||!Y.length)return!1;var J=k[1];if(!M(J)||J>=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<Y.length;O++){if(_=Y[O],_.attrRegex&&_.attrRegex.test(k)){if(_.layoutAttrOverrides)return _.layoutAttrOverrides;!J&&_.layoutAttributes&&(J=_.layoutAttributes)}var te=_.baseLayoutAttrOverrides;if(te&&k in te)return te[k]}if(J)return J}var ae=B._modules;if(ae){for(O=0;O<ae.length;O++)if(U=ae[O].layoutAttributes,U&&k in U)return U[k]}for(N in m.componentsRegistry){if(_=m.componentsRegistry[N],_.name==="colorscale"&&k.indexOf("coloraxis")===0)return _.layoutAttributes[k];if(!_.schema&&k===_.name)return _.layoutAttributes}return k in L?L[k]:!1}function d(B,k,O){if(!B)return!1;if(B._isLinkedToArray){if(M(k[O]))O++;else if(O<k.length)return!1}for(;O<k.length;O++){var N=B[k[O]];if(s(N))B=N;else break;if(O===k.length-1)break;if(B._isLinkedToArray){if(O++,!M(k[O]))return!1}else if(B.valType==="info_array"){O++;var _=k[O];if(!M(_))return!1;var U=B.items;if(Array.isArray(U)){if(_>=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<O.attr.length;N++)z(B,O,O.attr[N]);else{var _=O.attr==="subplot"?O.name:O.attr;z(B,O,_)}for(k in m.componentsRegistry){O=m.componentsRegistry[k];var U=O.schema;if(U&&(U.subplots||U.layout)){var Y=U.subplots;if(Y&&Y.xaxis&&!Y.yaxis)for(var J in Y.xaxis)delete B.yaxis[J];delete B.xaxis.shift,delete B.xaxis.autoshift}else O.name==="colorscale"?r(B,O.layoutAttributes):O.layoutAttributes&&I(B,O.layoutAttributes,O.name)}return{layoutAttributes:b(B)}}function x(B){var k=m.transformsRegistry[B],O=r({},k.attributes);return Object.keys(m.componentsRegistry).forEach(function(N){var _=m.componentsRegistry[N];_.schema&&_.schema.transforms&&_.schema.transforms[B]&&Object.keys(_.schema.transforms[B]).forEach(function(U){I(O,_.schema.transforms[B][U],U)})}),{attributes:b(O)}}function S(){var B={frames:r({},A)};return b(B),B.frames}function b(B){return a(B),E(B),y(B),B}function a(B){function k(N){return{valType:"string",editType:"none"}}function O(N,_,U){V.isValObject(N)?(N.arrayOk===!0||N.valType==="data_array")&&(U[_+"src"]=k()):s(N)&&(N.role="object")}V.crawl(B,O)}function E(B){function k(O,N,_){if(O){var U=O[g];U&&(delete O[g],_[N]={items:{}},_[N].items[U]=O,_[N].role="object")}}V.crawl(B,k)}function y(B){function k(O){for(var N in O)if(s(O[N]))k(O[N]);else if(Array.isArray(O[N]))for(var _=0;_<O[N].length;_++)k(O[N][_]);else O[N]instanceof RegExp&&(O[N]=O[N].toString())}k(B)}function z(B,k,O){var N=l(B,O),_=r({},k.layoutAttributes);_[u]=!0,N.set(_)}function I(B,k,O){var N=l(B,O);N.set(r(N.get()||{},k))}},44467:function(G,V,e){var m=e(71828),P=e(9012),i="templateitemname",L={name:{valType:"string",editType:"none"}};L[i]={valType:"string",editType:"calc"},V.templatedArray=function(p,t){return t._isLinkedToArray=p,t.name=L.name,t[i]=L[i],t},V.traceTemplater=function(p){var t={},r,s;for(r in p)s=p[r],Array.isArray(s)&&s.length&&(t[r]=0);function n(l){r=m.coerce(l,{},P,"type");var c={type:r,_template:null};if(r in t){s=p[r];var u=t[r]%s.length;t[r]++,c._template=s[u]}return c}return{newTrace:n}},V.newContainer=function(p,t,r){var s=p._template,n=s&&(s[t]||r&&s[r]);m.isPlainObject(n)||(n=null);var l=p[t]={_template:n};return l},V.arrayTemplater=function(p,t,r){var s=p._template,n=s&&s[v(t)],l=s&&s[t];(!Array.isArray(l)||!l.length)&&(l=[]);var c={};function u(f){var w={name:f.name,_input:f},h=w[i]=f[i];if(!A(h))return w._template=n,w;for(var o=0;o<l.length;o++){var d=l[o];if(d.name===h)return c[h]=1,w._template=d,w}return w[r]=f[r]||!1,w._template=!1,w}function g(){for(var f=[],w=0;w<l.length;w++){var h=l[w],o=h.name;if(A(o)&&!c[o]){var d={_template:h,name:o,_input:{_templateitemname:o}};d[i]=h[i],f.push(d),c[o]=1}}return f}return{newItem:u,defaultItems:g}};function A(p){return p&&typeof p=="string"}function v(p){var t=p.length-1;return p.charAt(t)!=="s"&&m.warn("bad argument to arrayDefaultKey: "+p),p.substr(0,p.length-1)+"defaults"}V.arrayDefaultKey=v,V.arrayEditor=function(p,t,r){var s=(m.nestedProperty(p,t).get()||[]).length,n=r._index,l=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[1]&&J[1]>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;J<Y.length;J++){ce=Y[J];var K=ce._anchorAxis;ce._linepositions={},ce._lw=t.crispRound(O,ce.linewidth,1),ce._mainLinePosition=j(ce,K,ce.side),ce._mainMirrorPosition=ce.mirror&&K?j(ce,K,l.OPPOSITE_SIDE[ce.side]):null}var ee=[],oe=[],q=[],$=p.opacity(N.paper_bgcolor)===1&&p.opacity(N.plot_bgcolor)===1&&N.paper_bgcolor===N.plot_bgcolor;for(te in N._plots)if(ae=N._plots[te],ae.mainplot)ae.bg&&ae.bg.remove(),ae.bg=void 0;else{var le=ae.xaxis.domain,ie=ae.yaxis.domain,he=ae.plotgroup;if(d(le,ie,q)){var me=he.node(),Me=ae.bg=L.ensureSingle(he,"rect","bg");me.insertBefore(Me.node(),me.childNodes[0]),oe.push(te)}else he.select("rect.bg").remove(),q.push([le,ie]),$||(ee.push(te),oe.push(te))}var Te=N._bgLayer.selectAll(".bg").data(ee);for(Te.enter().append("rect").classed("bg",!0),Te.exit().remove(),Te.each(function(be){N._plots[be].bg=m.select(this)}),J=0;J<oe.length;J++)ae=N._plots[oe[J]],Q=ae.xaxis,Z=ae.yaxis,ae.bg&&Q._offset!==void 0&&Z._offset!==void 0&&ae.bg.call(t.setRect,Q._offset-U,Z._offset-U,Q._length+2*U,Z._length+2*U).call(p.fill,N.plot_bgcolor).style("stroke-width",0);if(!N._hasOnlyLargeSploms)for(te in N._plots){ae=N._plots[te],Q=ae.xaxis,Z=ae.yaxis;var Oe=ae.clipId="clip"+N._uid+te+"plot",Ne=L.ensureSingleById(N._clips,"clipPath",Oe,function(be){be.classed("plotclip",!0).append("rect")});ae.clipRect=Ne.select("rect").attr({width:Q._length,height:Z._length}),t.setTranslate(ae.plot,Q._offset,Z._offset);var Ee,xe;ae._hasClipOnAxisFalse?(Ee=null,xe=Oe):(Ee=Oe,xe=null),t.setClipUrl(ae.plot,Ee,O),ae.layerClipId=xe}var Se,Ue,He,Fe,Ge,nt,qe,$e,et,ct,dt,pt,At;function Mt(be){return"M"+Se+","+be+"H"+Ue}function Vt(be){return"M"+Q._offset+","+be+"h"+Q._length}function Je(be){return"M"+be+","+$e+"V"+qe}function De(be){return Z._shift!==void 0&&(be+=Z._shift),"M"+be+","+Z._offset+"v"+Z._length}function Ie(be,se,ye){if(!be.showline||te!==be._mainSubplot)return"";if(!be._anchorAxis)return ye(be._mainLinePosition);var Le=se(be._mainLinePosition);return be.mirror&&(Le+=se(be._mainMirrorPosition)),Le}for(te in N._plots){ae=N._plots[te],Q=ae.xaxis,Z=ae.yaxis;var ze="M0,0";T(Q,te)&&(Ge=x(Q,"left",Z,Y),Se=Q._offset-(Ge?U+Ge:0),nt=x(Q,"right",Z,Y),Ue=Q._offset+Q._length+(nt?U+nt:0),He=j(Q,Z,"bottom"),Fe=j(Q,Z,"top"),At=!Q._anchorAxis||te!==Q._mainSubplot,At&&(Q.mirror==="allticks"||Q.mirror==="all")&&(Q._linepositions[te]=[He,Fe]),ze=Ie(Q,Mt,Vt),At&&Q.showline&&(Q.mirror==="all"||Q.mirror==="allticks")&&(ze+=Mt(He)+Mt(Fe)),ae.xlines.style("stroke-width",Q._lw+"px").call(p.stroke,Q.showline?Q.linecolor:"rgba(0,0,0,0)")),ae.xlines.attr("d",ze);var Pe="M0,0";T(Z,te)&&(dt=x(Z,"bottom",Q,Y),qe=Z._offset+Z._length+(dt?U:0),pt=x(Z,"top",Q,Y),$e=Z._offset-(pt?U:0),et=j(Z,Q,"left"),ct=j(Z,Q,"right"),At=!Z._anchorAxis||te!==Z._mainSubplot,At&&(Z.mirror==="allticks"||Z.mirror==="all")&&(Z._linepositions[te]=[et,ct]),Pe=Ie(Z,Je,De),At&&Z.showline&&(Z.mirror==="all"||Z.mirror==="allticks")&&(Pe+=Je(et)+Je(ct)),ae.ylines.style("stroke-width",Z._lw+"px").call(p.stroke,Z.showline?Z.linecolor:"rgba(0,0,0,0)")),ae.ylines.attr("d",Pe)}return n.makeClipPaths(O),i.previousPromises(O)}function T(O,N){return(O.ticks||O.showline)&&(N===O._mainSubplot||O.mirror==="all"||O.mirror==="allticks")}function C(O,N,_){if(!_.showline||!_._lw)return!1;if(_.mirror==="all"||_.mirror==="allticks")return!0;var U=_._anchorAxis;if(!U)return!1;var Y=l.FROM_BL[N];return _.side===N?U.domain[Y]===O.domain[Y]:_.mirror&&U.domain[1-Y]===O.domain[1-Y]}function x(O,N,_,U){if(C(O,N,_))return _._lw;for(var Y=0;Y<U.length;Y++){var J=U[Y];if(J._mainAxis===_._mainAxis&&C(O,N,J))return J._lw}return 0}V.drawMainTitle=function(O){var N=O._fullLayout.title,_=O._fullLayout,U=B(_),Y=k(_),J=z(_,Y),te=y(_,U);if(r.draw(O,"gtitle",{propContainer:_,propName:"title.text",placeholder:_._dfltTitle.plot,attributes:{x:te,y:J,"text-anchor":U,dy:Y}}),N.text&&N.automargin){var ae=m.selectAll(".gtitle"),ce=t.bBox(ae.node()).height,Q=a(O,N,ce);Q>0&&(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<Y}function b(O,N,_,U,Y){var J=0;return _==="middle"&&(J+=Y/2),O==="t"?(_==="top"&&(J+=Y),J+=U-N*U):(_==="bottom"&&(J+=Y),J+=N*U),J}function a(O,N,_){var U=N.y,Y=N.yanchor,J=U>.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;U<N.length;U++){var Y=N[U],J=Y[0]||{},te=J.trace||{},ae=te._module||{},ce=ae.arraysToCalcdata;ce&&ce(Y,te);var Q=ae.editStyle;Q&&_.push({fn:Q,cd0:J})}if(_.length){for(U=0;U<_.length;U++){var Z=_[U];Z.fn(O,Z.cd0)}v(O),V.redrawReglTraces(O)}return i.style(O),P.getComponentMethod("legend","draw")(O),i.previousPromises(O)},V.doColorBars=function(O){return P.getComponentMethod("colorbar","draw")(O),i.previousPromises(O)},V.layoutReplot=function(O){var N=O.layout;return O.layout=void 0,P.call("_doPlot",O,"",N)},V.doLegend=function(O){return P.getComponentMethod("legend","draw")(O),i.previousPromises(O)},V.doTicksRelayout=function(O){return n.draw(O,"redraw"),O._fullLayout._hasOnlyLargeSploms&&(P.subplotsRegistry.splom.updateGrid(O),v(O),V.redrawReglTraces(O)),V.drawMainTitle(O),i.previousPromises(O)},V.doModeBar=function(O){var N=O._fullLayout;s.manage(O);for(var _=0;_<N._basePlotModules.length;_++){var U=N._basePlotModules[_].updateFx;U&&U(O)}return i.previousPromises(O)},V.doCamera=function(O){for(var N=O._fullLayout,_=N._subplots.gl3d,U=0;U<_.length;U++){var Y=N[_[U]],J=Y._scene;J.setViewport(Y)}},V.drawData=function(O){var N=O._fullLayout;v(O);for(var _=N._basePlotModules,U=0;U<_.length;U++)_[U].plot(O);return V.redrawReglTraces(O),i.style(O),P.getComponentMethod("selections","draw")(O),P.getComponentMethod("shapes","draw")(O),P.getComponentMethod("annotations","draw")(O),P.getComponentMethod("images","draw")(O),N._replotting=!1,i.previousPromises(O)},V.redrawReglTraces=function(O){var N=O._fullLayout;if(N._has("regl")){var _=O._fullData,U=[],Y=[],J,te;for(N._hasOnlyLargeSploms&&N._splomGrid.draw(),J=0;J<_.length;J++){var ae=_[J];ae.visible===!0&&ae._length!==0&&(ae.type==="splom"?N._splomScenes[ae.uid].draw():ae.type==="scattergl"?L.pushUnique(U,ae.xaxis+ae.yaxis):ae.type==="scatterpolargl"&&L.pushUnique(Y,ae.subplot))}for(J=0;J<U.length;J++)te=N._plots[U[J]],te._scene&&te._scene.draw();for(J=0;J<Y.length;J++)te=N[Y[J]]._subplot,te._scene&&te._scene.draw()}},V.doAutoRangeAndConstraints=function(O){for(var N=n.list(O,"",!0),_,U={},Y=0;Y<N.length;Y++)if(_=N[Y],!U[_._id]){U[_._id]=1,g(O,_),f(O,_);var J=_._matchGroup;if(J)for(var te in J){var ae=n.getFromId(O,te);f(O,ae,_.range),U[te]=1}}u(O)},V.finalDraw=function(O){P.getComponentMethod("rangeslider","draw")(O),P.getComponentMethod("rangeselector","draw")(O)},V.drawMarginPushers=function(O){P.getComponentMethod("legend","draw")(O),P.getComponentMethod("rangeselector","draw")(O),P.getComponentMethod("sliders","draw")(O),P.getComponentMethod("updatemenus","draw")(O),P.getComponentMethod("colorbar","draw")(O)}},96318:function(G,V,e){var m=e(71828),P=m.isPlainObject,i=e(86281),L=e(74875),A=e(9012),v=e(44467),p=e(72075).dfltConfig;V.makeTemplate=function(f){f=m.isPlainObject(f)?f:m.getGraphDiv(f),f=m.extendDeep({_context:p},{data:f.data,layout:f.layout}),L.supplyDefaults(f);var w=f.data||[],h=f.layout||{};h._basePlotModules=f._fullLayout._basePlotModules,h._modules=f._fullLayout._modules;var o={data:{},layout:{}};w.forEach(function(y){var z={};s(y,z,l.bind(null,y));var I=m.coerce(y,{},A,"type"),B=o.data[I];B||(B=o.data[I]=[]),B.push(z)}),s(h,o.layout,n.bind(null,h)),delete o.layout.template;var d=h.template;if(P(d)){var M=d.layout,T,C,x,S,b,a;P(M)&&t(M,o.layout);var E=d.data;if(P(E)){for(C in o.data)if(x=E[C],Array.isArray(x)){for(b=o.data[C],a=b.length,S=x.length,T=0;T<a;T++)t(x[T%S],b[T]);for(T=a;T<S;T++)b.push(m.extendDeep({},x[T]))}for(C in E)C in o.data||(o.data[C]=m.extendDeep([],E[C]))}}return o};function t(f,w){f=m.extendDeep({},f);var h=Object.keys(f).sort(),o,d;function M(b,a,E){if(P(a)&&P(b))t(b,a);else if(Array.isArray(a)&&Array.isArray(b)){var y=v.arrayTemplater({_template:f},E);for(d=0;d<a.length;d++){var z=a[d],I=y.newItem(z)._template;I&&t(I,z)}var B=y.defaultItems();for(d=0;d<B.length;d++)a.push(B[d]._template);for(d=0;d<a.length;d++)delete a[d].templateitemname}}for(o=0;o<h.length;o++){var T=h[o],C=f[T];if(T in w?M(C,w[T],T):w[T]=C,r(T)===T)for(var x in w){var S=r(x);x!==S&&S===T&&!(x in f)&&M(C,w[x],T)}}}function r(f){return f.replace(/[0-9]+$/,"")}function s(f,w,h,o,d){var M=d&&h(d);for(var T in f){var C=f[T],x=c(f,T,o),S=c(f,T,d),b=h(S);if(!b){var a=r(T);a!==T&&(S=c(f,a,d),b=h(S))}if(!(M&&M===b)&&!(!b||b._noTemplating||b.valType==="data_array"||b.arrayOk&&Array.isArray(C)))if(!b.valType&&P(C))s(C,w,h,x,S);else if(b._isLinkedToArray&&Array.isArray(C))for(var E=!1,y=0,z={},I=0;I<C.length;I++){var B=C[I];if(P(B)){var k=B.name;if(k)z[k]||(s(B,w,h,c(C,y,x),c(C,y,S)),y++,z[k]=1);else if(!E){var O=v.arrayDefaultKey(T),N=c(f,O,o),_=c(C,y,x);s(B,w,h,_,c(C,y,S));var U=m.nestedProperty(w,_),Y=m.nestedProperty(w,N);Y.set(U.get()),U.set(null),E=!0}}}else{var J=m.nestedProperty(w,x);J.set(C)}}}function n(f,w){return i.getLayoutValObject(f,m.nestedProperty({},w).parts)}function l(f,w){return i.getTraceValObject(f,m.nestedProperty({},w).parts)}function c(f,w,h){var o;return h?Array.isArray(f)?o=h+"["+w+"]":o=h+"."+w:o=w,o}V.validateTemplate=function(f,w){var h=m.extendDeep({},{_context:p,data:f.data,layout:f.layout}),o=h.layout||{};P(w)||(w=o.template||{});var d=w.layout,M=w.data,T=[];h.layout=o,h.layout.template=w,L.supplyDefaults(h);var C=h._fullLayout,x=h._fullData,S={};function b(N,_){for(var U in N)if(U.charAt(0)!=="_"&&P(N[U])){var Y=r(U),J=[],te;for(te=0;te<_.length;te++)J.push(c(N,U,_[te])),Y!==U&&J.push(c(N,Y,_[te]));for(te=0;te<J.length;te++)S[J[te]]=1;b(N[U],J)}}function a(N,_){for(var U in N)if(U.indexOf("defaults")===-1&&P(N[U])){var Y=c(N,U,_);S[Y]?a(N[U],Y):T.push({code:"unused",path:Y})}}if(P(d)?(b(C,["layout"]),a(d,"layout")):T.push({code:"layout"}),!P(M))T.push({code:"data"});else{for(var E={},y,z=0;z<x.length;z++){var I=x[z];y=I.type,E[y]=(E[y]||0)+1,I._fullInput._template||T.push({code:"missing",index:I._fullInput.index,traceType:y})}for(y in M){var B=M[y].length,k=E[y]||0;B>k?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;w<f.length;w++)if(P(f[w]))return!0}function g(f){var w;switch(f.code){case"data":w="The template has no key data.";break;case"layout":w="The template has no key layout.";break;case"missing":f.path?w="There are no templates for item "+f.path+" with name "+f.templateitemname:w="There are no templates for trace "+f.index+", of type "+f.traceType+".";break;case"unused":f.path?w="The template item at "+f.path+" was not used in constructing the plot.":f.dataCount?w="Some of the templates of type "+f.traceType+" were not used. The template has "+f.templateCount+" traces, the data only has "+f.dataCount+" of this type.":w="The template has "+f.templateCount+" traces of type "+f.traceType+" but there are none in the data.";break;case"reused":w="Some of the templates of type "+f.traceType+" were used more than once. The template has "+f.templateCount+" traces, the data has "+f.dataCount+" of this type.";break}return f.msg=w,f}},403:function(G,V,e){var m=e(92770),P=e(72391),i=e(74875),L=e(71828),A=e(25095),v=e(5900),p=e(70942),t=e(11506).version,r={format:{valType:"enumerated",values:["png","jpeg","webp","svg","full-json"],dflt:"png"},width:{valType:"number",min:1},height:{valType:"number",min:1},scale:{valType:"number",min:0,dflt:1},setBackground:{valType:"any",dflt:!1},imageDataOnly:{valType:"boolean",dflt:!1}};function s(n,l){l=l||{};var c,u,g,f;L.isPlainObject(n)?(c=n.data||[],u=n.layout||{},g=n.config||{},f={}):(n=L.getGraphDiv(n),c=L.extendDeep([],n.data),u=L.extendDeep({},n.layout),g=n._context,f=n._fullLayout||{});function w(k){return!(k in l)||L.validate(l[k],r[k])}if(!w("width")&&l.width!==null||!w("height")&&l.height!==null)throw new Error("Height and width should be pixel values.");if(!w("format"))throw new Error("Export format is not "+L.join2(r.format.values,", "," or ")+".");var h={};function o(k,O){return L.coerce(l,h,r,k,O)}var d=o("format"),M=o("width"),T=o("height"),C=o("scale"),x=o("setBackground"),S=o("imageDataOnly"),b=document.createElement("div");b.style.position="absolute",b.style.left="-5000px",document.body.appendChild(b);var a=L.extendFlat({},u);M?a.width=M:l.width===null&&m(f.width)&&(a.width=f.width),T?a.height=T:l.height===null&&m(f.height)&&(a.height=f.height);var E=L.extendFlat({},g,{_exportedPlot:!0,staticPlot:!0,setBackground:x}),y=A.getRedrawFunc(b);function z(){return new Promise(function(k){setTimeout(k,A.getDelay(b._fullLayout))})}function I(){return new Promise(function(k,O){var N=v(b,d,C),_=b._fullLayout.width,U=b._fullLayout.height;function Y(){P.purge(b),document.body.removeChild(b)}if(d==="full-json"){var J=i.graphJson(b,!1,"keepdata","object",!0,!0);return J.version=t,J=JSON.stringify(J),Y(),k(S?J:A.encodeJSON(J))}if(Y(),d==="svg")return k(S?N:A.encodeSVG(N));var te=document.createElement("canvas");te.id=L.randstr(),p({format:d,width:_,height:U,scale:C,canvas:te,svg:N,promise:!0}).then(k).catch(O)})}function B(k){return S?k.replace(A.IMAGE_URL_PREFIX,""):k}return new Promise(function(k,O){P.newPlot(b,c,a,E).then(y).then(z).then(I).then(function(N){k(B(N))}).catch(function(N){O(N)})})}G.exports=s},84936:function(G,V,e){var m=e(71828),P=e(74875),i=e(86281),L=e(72075).dfltConfig,A=m.isPlainObject,v=Array.isArray,p=m.isArrayOrTypedArray;G.exports=function(o,d){o===void 0&&(o=[]),d===void 0&&(d={});var M=i.get(),T=[],C={_context:m.extendFlat({},L)},x,S;v(o)?(C.data=m.extendDeep([],o),x=o):(C.data=[],x=[],T.push(l("array","data"))),A(d)?(C.layout=m.extendDeep({},d),S=d):(C.layout={},S={},arguments.length>1&&T.push(l("object","layout"))),P.supplyDefaults(C);for(var b=C._fullData,a=x.length,E=0;E<a;E++){var y=x[E],z=["data",E];if(!A(y)){T.push(l("object",z));continue}var I=b[E],B=I.type,k=M.traces[B].attributes;k.type={valType:"enumerated",values:[B]},I.visible===!1&&y.visible!==!1&&T.push(l("invisible",z)),t(y,I,k,T,z);var O=y.transforms,N=I.transforms;if(O){v(O)||T.push(l("array",z,["transforms"])),z.push("transforms");for(var _=0;_<O.length;_++){var U=["transforms",_],Y=O[_].type;if(!A(O[_])){T.push(l("object",z,U));continue}var J=M.transforms[Y]?M.transforms[Y].attributes:{};J.type={valType:"enumerated",values:Object.keys(M.transforms)},t(O[_],N[_],J,T,z,U)}}}var te=C._fullLayout,ae=r(M,b);return t(S,te,ae,T,"layout"),T.length===0?void 0:T};function t(h,o,d,M,T,C){C=C||[];for(var x=Object.keys(h),S=0;S<x.length;S++){var b=x[S];if(b!=="transforms"){var a=C.slice();a.push(b);var E=h[b],y=o[b],z=u(d,b),I=(z||{}).valType,B=I==="info_array",k=I==="colorscale",O=(z||{}).items;if(!c(d,b))M.push(l("schema",T,a));else if(A(E)&&A(y)&&I!=="any")t(E,y,z,M,T,a);else if(B&&v(E)){E.length>y.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;Y<N;Y++)if(v(E[Y])){E[Y].length>y[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;Y<N;Y++)J=_?O[Y]:O,te=E[Y],ae=y[Y],m.validate(te,J)?ae!==te&&ae!==+te&&M.push(l("dynamic",T,a.concat(Y),te,ae)):M.push(l("value",T,a.concat(Y),te))}else if(z.items&&!B&&v(E)){var Q=O[Object.keys(O)[0]],Z=[],j,K;for(j=0;j<y.length;j++){var ee=y[j]._index||j;if(K=a.slice(),K.push(ee),A(E[ee])&&A(y[j])){Z.push(ee);var oe=E[ee],q=y[j];A(oe)&&oe.visible!==!1&&q.visible===!1?M.push(l("invisible",T,K)):t(oe,q,Q,M,T,K)}}for(j=0;j<E.length;j++)K=a.slice(),K.push(j),A(E[j])?Z.indexOf(j)===-1&&M.push(l("unused",T,K)):M.push(l("object",T,K,E[j]))}else!A(E)&&A(y)?M.push(l("object",T,a,E)):!p(E)&&p(y)&&!B&&!k?M.push(l("array",T,a,E)):b in o?m.validate(E,z)?z.valType==="enumerated"&&(z.coerceNumber&&E!==+y||E!==y)&&M.push(l("dynamic",T,a,E,y)):M.push(l("value",T,a,E)):M.push(l("unused",T,a,E))}}return M}function r(h,o){for(var d=h.layout.layoutAttributes,M=0;M<o.length;M++){var T=o[M],C=h.traces[T.type],x=C.layoutAttributes;x&&(T.subplot?m.extendFlat(d[C.attributes.subplot.dflt],x):m.extendFlat(d,x))}return d}var s={object:function(h,o){var d;return h==="layout"&&o===""?d="The layout argument":h[0]==="data"&&o===""?d="Trace "+h[1]+" in the data argument":d=n(h)+"key "+o,d+" must be linked to an object container"},array:function(h,o){var d;return h==="data"?d="The data argument":d=n(h)+"key "+o,d+" must be linked to an array container"},schema:function(h,o){return n(h)+"key "+o+" is not part of the schema"},unused:function(h,o,d){var M=A(d)?"container":"key";return n(h)+M+" "+o+" did not get coerced"},dynamic:function(h,o,d,M){return[n(h)+"key",o,"(set to '"+d+"')","got reset to","'"+M+"'","during defaults."].join(" ")},invisible:function(h,o){return(o?n(h)+"item "+o:"Trace "+h[1])+" got defaulted to be not visible"},value:function(h,o,d){return[n(h)+"key "+o,"is set to an invalid value ("+d+")"].join(" ")}};function n(h){return v(h)?"In data trace "+h[1]+", ":"In "+h+", "}function l(h,o,d,M,T){d=d||"";var C,x;v(o)?(C=o[0],x=o[1]):(C=o,x=null);var S=w(d),b=s[h](o,S,M,T);return m.log(b),{code:h,container:C,trace:x,path:d,astr:S,msg:b}}function c(h,o){var d=f(o),M=d.keyMinusId,T=d.id;return M in h&&h[M]._isSubplotObj&&T?!0:o in h}function u(h,o){if(o in h)return h[o];var d=f(o);return h[d.keyMinusId]}var g=m.counterRegex("([a-z]+)");function f(h){var o=h.match(g);return{keyMinusId:o&&o[1],id:o&&o[2]}}function w(h){if(!v(h))return String(h);for(var o="",d=0;d<h.length;d++){var M=h[d];typeof M=="number"?o=o.substr(0,o.length-1)+"["+M+"]":o+=M,d<h.length-1&&(o+=".")}return o}},85594:function(G){G.exports={mode:{valType:"enumerated",dflt:"afterall",values:["immediate","next","afterall"]},direction:{valType:"enumerated",values:["forward","reverse"],dflt:"forward"},fromcurrent:{valType:"boolean",dflt:!1},frame:{duration:{valType:"number",min:0,dflt:500},redraw:{valType:"boolean",dflt:!0}},transition:{duration:{valType:"number",min:0,dflt:500,editType:"none"},easing:{valType:"enumerated",dflt:"cubic-in-out",values:["linear","quad","cubic","sin","exp","circle","elastic","back","bounce","linear-in","quad-in","cubic-in","sin-in","exp-in","circle-in","elastic-in","back-in","bounce-in","linear-out","quad-out","cubic-out","sin-out","exp-out","circle-out","elastic-out","back-out","bounce-out","linear-in-out","quad-in-out","cubic-in-out","sin-in-out","exp-in-out","circle-in-out","elastic-in-out","back-in-out","bounce-in-out"],editType:"none"},ordering:{valType:"enumerated",values:["layout first","traces first"],dflt:"layout first",editType:"none"}}}},85501:function(G,V,e){var m=e(71828),P=e(44467);G.exports=function(L,A,v){var p=v.name,t=v.inclusionAttr||"visible",r=A[p],s=m.isArrayOrTypedArray(L[p])?L[p]:[],n=A[p]=[],l=P.arrayTemplater(A,p,t),c,u;for(c=0;c<s.length;c++){var g=s[c];m.isPlainObject(g)?u=l.newItem(g):(u=l.newItem({}),u[t]=!1),u._index=c,u[t]!==!1&&v.handleItemDefaults(g,u,A,v),n.push(u)}var f=l.defaultItems();for(c=0;c<f.length;c++)u=f[c],u._index=n.length,v.handleItemDefaults({},u,A,v,{}),n.push(u);if(m.isArrayOrTypedArray(r)){var w=Math.min(r.length,n.length);for(c=0;c<w;c++)m.relinkPrivateKeys(n[c],r[c])}return n}},9012:function(G,V,e){var m=e(41940),P=e(77914);G.exports={type:{valType:"enumerated",values:[],dflt:"scatter",editType:"calc+clearAxisTypes",_noTemplating:!0},visible:{valType:"enumerated",values:[!0,!1,"legendonly"],dflt:!0,editType:"calc"},showlegend:{valType:"boolean",dflt:!0,editType:"style"},legend:{valType:"subplotid",dflt:"legend",editType:"style"},legendgroup:{valType:"string",dflt:"",editType:"style"},legendgrouptitle:{text:{valType:"string",dflt:"",editType:"style"},font:m({editType:"style"}),editType:"style"},legendrank:{valType:"number",dflt:1e3,editType:"style"},legendwidth:{valType:"number",min:0,editType:"style"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"style"},name:{valType:"string",editType:"style"},uid:{valType:"string",editType:"plot",anim:!0},ids:{valType:"data_array",editType:"calc",anim:!0},customdata:{valType:"data_array",editType:"calc"},meta:{valType:"any",arrayOk:!0,editType:"plot"},selectedpoints:{valType:"any",editType:"calc"},hoverinfo:{valType:"flaglist",flags:["x","y","z","text","name"],extras:["all","none","skip"],arrayOk:!0,dflt:"all",editType:"none"},hoverlabel:P.hoverlabel,stream:{token:{valType:"string",noBlank:!0,strict:!0,editType:"calc"},maxpoints:{valType:"number",min:0,max:1e4,dflt:500,editType:"calc"},editType:"calc"},transforms:{_isLinkedToArray:"transform",editType:"calc"},uirevision:{valType:"any",editType:"none"}}},42973:function(G,V,e){var m=e(92770),P=e(71828),i=P.dateTime2ms,L=P.incrementMonth,A=e(50606),v=A.ONEAVGMONTH;G.exports=function(t,r,s,n){if(r.type!=="date")return{vals:n};var l=t[s+"periodalignment"];if(!l)return{vals:n};var c=t[s+"period"],u;if(m(c)){if(c=+c,c<=0)return{vals:n}}else if(typeof c=="string"&&c.charAt(0)==="M"){var g=+c.substring(1);if(g>0&&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;S<x;S++){var b=n[S],a,E,y;if(u){for(a=Math.round((b-d)/(u*v)),y=L(d,u*a,f);y>b;)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;z<U.length&&J===te;z++)J=Math.min(J,U[z].val);for(z=1;z<Y.length&&J===te;z++)te=Math.max(te,Y[z].val);var ae=y.autorange,ce=ae==="reversed"||ae==="min reversed"||ae==="max reversed";if(!ce&&y.range){var Q=i.simpleMap(y.range,y.r2l);ce=Q[1]<Q[0]}y.autorange==="reversed"&&(y.autorange=!0);var Z=y.rangemode,j=Z==="tozero",K=Z==="nonnegative",ee=y._length,oe=ee/10,q=0,$,le,ie,he,me,Me;for(z=0;z<U.length;z++)for($=U[z],I=0;I<Y.length;I++)le=Y[I],Me=le.val-$.val-n(y,$.val,le.val),Me>0&&(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;k<B.length;k++){var O=B[k];I+=O.max-O.min}return I}function l(E,y,z){var I=.05*y._length,B=y._anchorAxis||{};if((y.ticklabelposition||"").indexOf("inside")!==-1||(B.ticklabelposition||"").indexOf("inside")!==-1){var k=y.isReversed();if(!k){var O=i.simpleMap(y.range,y.r2l);k=O[1]<O[0]}k&&(z=!z)}var N=0;return r(E,y._id)||(N=u(E,y,z)),I=Math.max(N,I),y.constrain==="domain"&&y._inputDomain&&(I*=(y._inputDomain[1]-y._inputDomain[0])/(y.domain[1]-y.domain[0])),function(U){return U.nopad?0:U.pad+(U.extrapad?I:N)}}var c=3;function u(E,y,z){var I=0,B=y._id.charAt(0)==="x";for(var k in E._plots){var O=E._plots[k];if(!(y._id!==O.xaxis._id&&y._id!==O.yaxis._id)){var N=(B?O.yaxis:O.xaxis)||{};if((N.ticklabelposition||"").indexOf("inside")!==-1&&(!z&&(N.side==="left"||N.side==="bottom")||z&&(N.side==="top"||N.side==="right"))){if(N._vals){var _=i.deg2rad(N._tickAngles[N._id+"tick"]||0),U=Math.abs(Math.cos(_)),Y=Math.abs(Math.sin(_));if(!N._vals[0].bb){var J=N._id+"tick",te=N._selections[J];te.each(function(K){var ee=m.select(this),oe=ee.select(".text-math-group");oe.empty()&&(K.bb=v.bBox(ee.node()))})}for(var ae=0;ae<N._vals.length;ae++){var ce=N._vals[ae],Q=ce.bb;if(Q){var Z=2*c+Q.width,j=2*c+Q.height;I=Math.max(I,B?Math.max(Z*U,j*Y):Math.max(j*U,Z*Y))}}}N.ticks==="inside"&&N.ticklabelposition==="inside"&&(I+=N.ticklen||0)}}}return I}function g(E,y,z){var I=y._id,B=E._fullData,k=E._fullLayout,O=[],N=[],_,U,Y;function J(Z,j){for(_=0;_<j.length;_++){var K=Z[j[_]],ee=(K._extremes||{})[I];if(K.visible===!0&&ee){for(U=0;U<ee.min.length;U++)Y=ee.min[U],h(O,Y.val,Y.pad,{extrapad:Y.extrapad});for(U=0;U<ee.max.length;U++)Y=ee.max[U],o(N,Y.val,Y.pad,{extrapad:Y.extrapad})}}}if(J(B,y._traceIndices),J(k.annotations||[],y._annIndices||[]),J(k.shapes||[],y._shapeIndices||[]),y._matchGroup&&!z){for(var te in y._matchGroup)if(te!==y._id){var ae=t(E,te),ce=g(E,ae,!0),Q=y._length/ae._length;for(U=0;U<ce.min.length;U++)Y=ce.min[U],h(O,Y.val,Y.pad*Q,{extrapad:Y.extrapad});for(U=0;U<ce.max.length;U++)Y=ce.max[U],o(N,Y.val,Y.pad*Q,{extrapad:Y.extrapad})}}return{min:O,max:N}}function f(E,y,z){if(y.setScale(),y.autorange){y.range=z?z.slice():s(E,y),y._r=y.range.slice(),y._rl=i.simpleMap(y._r,y.r2l);var I=y._input,B={};B[y._attr+".range"]=y.range,B[y._attr+".autorange"]=y.autorange,A.call("_storeDirectGUIEdit",E.layout,E._fullLayout._preGUI,B),I.range=y.range.slice(),I.autorange=y.autorange}var k=y._anchorAxis;if(k&&k.rangeslider){var O=k.rangeslider[y._name];O&&O.rangemode==="auto"&&(O.range=s(E,y)),k._input.rangeslider[y._name]=i.extendFlat({},O)}}function w(E,y,z){z||(z={}),E._m||E.setScale();var I=[],B=[],k=y.length,O=z.padded||!1,N=z.tozero&&(E.type==="linear"||E.type==="-"),_=E.type==="log",U=!1,Y=z.vpadLinearized||!1,J,te,ae,ce,Q,Z,j,K,ee;function oe(Te){if(Array.isArray(Te))return U=!0,function(Ne){return Math.max(Number(Te[Ne]||0),0)};var Oe=Math.max(Number(Te||0),0);return function(){return Oe}}var q=oe((E._m>0?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;J<k;J++)te=y[J],te<K&&te>0&&(K=te),te>ee&&te<L&&(ee=te);else for(J=0;J<k;J++)te=y[J],te<K&&te>-L&&(K=te),te>ee&&te<L&&(ee=te);y=[K,ee],k=2}var he={tozero:N,extrapad:O};function me(Te){ae=y[Te],P(ae)&&(Z=q(Te),j=$(Te),Y?(ce=E.c2l(ae)-ie(Te),Q=E.c2l(ae)+le(Te)):(K=ae-ie(Te),ee=ae+le(Te),_&&K<ee/10&&(K=ee/10),ce=E.c2l(K),Q=E.c2l(ee)),N&&(ce=Math.min(0,ce),Q=Math.max(0,Q)),M(ce)&&h(I,ce,j,he),M(Q)&&o(B,Q,Z,he))}var Me=Math.min(6,k);for(J=0;J<Me;J++)me(J);for(J=k-1;J>=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;_<E.length&&N;_++){var U=E[_];if(B(U.val,y)&&U.pad>=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)<L}function T(E,y){return E<=y}function C(E,y){return 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<z):!0}function a(E,y){if(!y||!y.autorangeoptions)return E;var z=E[0],I=E[1],B=y.autorangeoptions.include;if(B!==void 0){var k=y.d2l(z),O=y.d2l(I);i.isArrayOrTypedArray(B)||(B=[B]);for(var N=0;N<B.length;N++){var _=y.d2l(B[N]);k>=_&&(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;dr<We.length;dr++)for(var pr=Dt[Q.id2name(We[dr])],vr=pr[lr],Hr=0;Hr<vr.length;Hr++){var Ir=vr[Hr];if(!fr[Ir]&&(zt(Ye,Ir),fr[Ir]=1,rr))return}}Ft("annotations","drawOne","_annIndices"),Ft("shapes","drawOne","_shapeIndices"),Ft("images","draw","_imgIndices",!0),Ft("selections","drawOne","_selectionIndices")};var le=Q.getDataConversions=function(Ye,We,Dt,Ft){var Zt,nr=Dt==="x"||Dt==="y"||Dt==="z"?Dt:Ft;if(Array.isArray(nr)){if(Zt={type:Z(Ft,void 0,{autotypenumbers:Ye._fullLayout.autotypenumbers}),_categories:[]},Q.setConvert(Zt),Zt.type==="category")for(var lr=0;lr<Ft.length;lr++)Zt.d2c(Ft[lr])}else Zt=Q.getFromTrace(Ye,We,nr);return Zt?{d2c:Zt.d2c,c2d:Zt.c2d}:nr==="ids"?{d2c:he,c2d:he}:{d2c:ie,c2d:ie}};function ie(Ye){return+Ye}function he(Ye){return String(Ye)}Q.getDataToCoordFunc=function(Ye,We,Dt,Ft){return le(Ye,We,Dt,Ft).d2c},Q.counterLetter=function(Ye){var We=Ye.charAt(0);if(We==="x")return"y";if(We==="y")return"x"},Q.minDtick=function(Ye,We,Dt,Ft){["log","category","multicategory"].indexOf(Ye.type)!==-1||!Ft?Ye._minDtick=0:Ye._minDtick===void 0?(Ye._minDtick=We,Ye._forceTick0=Dt):Ye._minDtick&&((Ye._minDtick/We+1e-6)%1<2e-6&&((Dt-Ye._forceTick0)/We%1+1.000001)%1<2e-6?(Ye._minDtick=We,Ye._forceTick0=Dt):((We/Ye._minDtick+1e-6)%1>2e-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;Zt<Dt.length;Zt++){var nr=Dt[Zt],lr=nr._rangeInitial0===void 0&&nr._rangeInitial1===void 0,rr=lr||nr.range[0]!==nr._rangeInitial0||nr.range[1]!==nr._rangeInitial1,zt=nr.autorange;(lr&&zt!==!0||We&&rr)&&(nr._rangeInitial0=zt==="min"||zt==="max reversed"?void 0:nr.range[0],nr._rangeInitial1=zt==="max"||zt==="min reversed"?void 0:nr.range[1],nr._autorangeInitial=zt,Ft=!0)}return Ft},Q.saveShowSpikeInitial=function(Ye,We){for(var Dt=Q.list(Ye,"",!0),Ft=!1,Zt="on",nr=0;nr<Dt.length;nr++){var lr=Dt[nr],rr=lr._showSpikeInitial===void 0,zt=rr||lr.showspikes!==lr._showspikes;(rr||We&&zt)&&(lr._showSpikeInitial=lr.showspikes,Ft=!0),Zt==="on"&&!lr.showspikes&&(Zt="off")}return Ye._fullLayout._cartesianSpikesEnabled=Zt,Ft},Q.autoBin=function(Ye,We,Dt,Ft,Zt,nr){var lr=A.aggNums(Math.min,null,Ye),rr=A.aggNums(Math.max,null,Ye);if(We.type==="category"||We.type==="multicategory")return{start:lr-.5,end:rr+.5,size:Math.max(1,Math.round(nr)||1),_dataSpan:rr-lr};Zt||(Zt=We.calendar);var zt;if(We.type==="log"?zt={type:"linear",range:[lr,rr]}:zt={type:We.type,range:A.simpleMap([lr,rr],We.c2r,0,Zt),calendar:Zt},Q.setConvert(zt),nr=nr&&l.dtick(nr,zt.type),nr)zt.dtick=nr,zt.tick0=l.tick0(void 0,zt.type,Zt);else{var fr;if(Dt)fr=(rr-lr)/Dt;else{var dr=A.distinctVals(Ye),pr=Math.pow(10,Math.floor(Math.log(dr.minDiff)/Math.LN10)),vr=pr*A.roundUp(dr.minDiff/pr,[.9,1.9,4.9,9.9],!0);fr=Math.max(vr,2*A.stdev(Ye)/Math.pow(Ye.length,Ft?.25:.4)),P(fr)||(fr=1)}Q.autoTicks(zt,fr)}var Hr=zt.dtick,Ir=Q.tickIncrement(Q.tickFirst(zt),Hr,"reverse",Zt),kr,pn;if(typeof Hr=="number")Ir=me(Ir,Ye,zt,lr,rr),pn=1+Math.floor((rr-Ir)/Hr),kr=Ir+pn*Hr;else for(zt.dtick.charAt(0)==="M"&&(Ir=Me(Ir,Ye,Hr,lr,Zt)),kr=Ir,pn=0;kr<=rr;)kr=Q.tickIncrement(kr,Hr,!1,Zt),pn++;return{start:We.c2r(Ir,0,Zt),end:We.c2r(kr,0,Zt),size:Hr,_dataSpan:rr-lr}};function me(Ye,We,Dt,Ft,Zt){var nr=0,lr=0,rr=0,zt=0;function fr(Hr){return(1+(Hr-Ye)*100/Dt.dtick)%100<2}for(var dr=0;dr<We.length;dr++)We[dr]%1===0?rr++:P(We[dr])||zt++,fr(We[dr])&&nr++,fr(We[dr]+Dt.dtick/2)&&lr++;var pr=We.length-zt;if(rr===pr&&Dt.type!=="date")Dt.dtick<1?Ye=Ft-.5*Dt.dtick:(Ye-=.5,Ye+Dt.dtick<Ft&&(Ye+=Dt.dtick));else if(lr<pr*.1&&(nr>pr*.3||fr(Ft)||fr(Zt))){var vr=Dt.dtick/2;Ye+=Ye+vr<Ft?vr:-vr}return Ye}function Me(Ye,We,Dt,Ft,Zt){var nr=A.findExactDates(We,Zt),lr=.8;if(nr.exactDays>lr){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.dtick<Ye._minDtick*2&&(Ye.dtick=Ye._minDtick,Ye.tick0=Ye.l2r(Ye._forceTick0))}Ye.ticklabelmode==="period"&&Ee(Ye),Ye.tick0||(Ye.tick0=Ye.type==="date"?"2000-01-01":0),Ye.type==="date"&&Ye.dtick<.1&&(Ye.dtick=.1),pt(Ye)};function Ne(Ye){return+Ye.substring(1)}function Ee(Ye){var We;function Dt(){return!(P(Ye.dtick)||Ye.dtick.charAt(0)!=="M")}var Ft=Dt(),Zt=Q.getTickFormat(Ye);if(Zt){var nr=Ye._dtickInit!==Ye.dtick;/%[fLQsSMX]/.test(Zt)||(/%[HI]/.test(Zt)?(We=b,nr&&!Ft&&Ye.dtick<b&&(Ye.dtick=b)):/%p/.test(Zt)?(We=S,nr&&!Ft&&Ye.dtick<S&&(Ye.dtick=S)):/%[Aadejuwx]/.test(Zt)?(We=x,nr&&!Ft&&Ye.dtick<x&&(Ye.dtick=x)):/%[UVW]/.test(Zt)?(We=C,nr&&!Ft&&Ye.dtick<C&&(Ye.dtick=C)):/%[Bbm]/.test(Zt)?(We=M,nr&&(Ft?Ne(Ye.dtick)<1:Ye.dtick<T)&&(Ye.dtick="M1")):/%[q]/.test(Zt)?(We=h,nr&&(Ft?Ne(Ye.dtick)<3:Ye.dtick<o)&&(Ye.dtick="M3")):/%[Yy]/.test(Zt)&&(We=g,nr&&(Ft?Ne(Ye.dtick)<12:Ye.dtick<f)&&(Ye.dtick="M12")))}Ft=Dt(),Ft&&Ye.tick0===Ye._dowTick0&&(Ye.tick0=Ye._rawTick0),Ye._definedDelta=We}function xe(Ye,We,Dt){for(var Ft=0;Ft<Ye.length;Ft++){var Zt=Ye[Ft].value,nr=Ft,lr=Ft+1;Ft<Ye.length-1?(nr=Ft,lr=Ft+1):Ft>0?(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;pn<Ir;pn++){var jr=(pn+.5)/Ir;We.maskBreaks(Zt*(1-jr)+jr*Hr)!==z&&kr++}pr*=kr/Ir,pr||(Ye[Ft].drop=!0),vr&&fr>C&&(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]<rr[0],fr=Math.min(rr[0],rr[1]),dr=Math.max(rr[0],rr[1]),pr=Math.max(1e3,We._length||0),vr=[],Hr=[],Ir=[],kr=[],pn=We.minor&&(We.minor.ticks||We.minor.showgrid),jr=1;jr>=(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<Ar!==zt)break;(Ft==="category"||Ft==="multicategory")&&(Or=zt?Math.max(-.5,Or):Math.min(We._categories.length-.5,Or))}var fn=null,Tn=vn,Pn;if(jr){var jn;Nr?jn=We.dtick:Ft==="date"?typeof We.dtick=="string"&&We.dtick.charAt(0)==="M"&&(jn=M*We.dtick.substring(1)):jn=We._roughDTick,Pn=Math.round((We.r2l(Tn)-We.r2l(We.tick0))/jn)-1}var qn=Dn.dtick;for(Dn.rangebreaks&&Dn._tick0Init!==Dn.tick0&&(Tn=Ht(Tn,We),zt||(Tn=Q.tickIncrement(Tn,qn,!zt,Zt))),jr&&lr&&(Tn=Q.tickIncrement(Tn,qn,!zt,Zt),Pn--);zt?Tn>=Or:Tn<=Or;Tn=Q.tickIncrement(Tn,qn,zt,Zt)){if(jr&&Pn++,Dn.rangebreaks&&!zt){if(Tn<Ar)continue;if(Dn.maskBreaks(Tn)===z&&Ht(Tn,Dn)>=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<kr.length;on++){var nn=kr[on],gn=nn.value;if(ea.indexOf(gn)===-1){for(var Un=!1,En=0;!Un&&En<Ir.length;En++)1e7+Ir[En].value===1e7+gn&&(Un=!0);Un||Mr.push(nn)}}kr=Mr}}lr&&xe(Ir,We,We._definedDelta);var Cn;if(We.rangebreaks){var Hn=We._id.charAt(0)==="y",aa=1;We.tickmode==="auto"&&(aa=We.tickfont?We.tickfont.size:12);var Pa=NaN;for(Cn=Ir.length-1;Cn>-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:Pa<Za+aa)?Ir.splice(zt?Cn+1:Cn,1):Pa=Za}}_t(We)&&Math.abs(rr[1]-rr[0])===360&&Ir.pop(),We._tmax=(Ir[Ir.length-1]||{}).value,We._prevDateHead="",We._inCalcTicks=!0;var Xt,wr=function(wn){wn.text="",We._prevDateHead=Xt};Ir=Ir.concat(kr);var an,cn;for(Cn=0;Cn<Ir.length;Cn++){var hn=Ir[Cn].minor,Ln=Ir[Cn].value;hn?Hr.push({x:Ln,minor:!0}):(Xt=We._prevDateHead,an=Q.tickText(We,Ln,!1,Ir[Cn].simpleLabel),cn=Ir[Cn].periodX,cn!==void 0&&(an.periodX=cn,(cn>dr||cn<fr)&&(cn>dr&&(an.periodX=dr),cn<fr&&(an.periodX=fr),wr(an))),Ir[Cn].skipLabel&&wr(an),vr.push(an))}return vr=vr.concat(Hr),We._inCalcTicks=!1,lr&&vr.length&&(vr[0].noTick=!0),vr};function Se(Ye,We){return Ye.rangebreaks&&(We=We.filter(function(Dt){return Ye.maskBreaks(Dt.x)!==z})),We}function Ue(Ye){var We=Ye._mainAxis,Dt=[];if(We._vals){for(var Ft=0;Ft<We._vals.length;Ft++)if(!We._vals[Ft].noTick){var Zt=We.l2p(We._vals[Ft].x),nr=Ye.p2l(Zt),lr=Q.tickText(Ye,nr);We._vals[Ft].minor&&(lr.minor=!0,lr.text=""),Dt.push(lr)}}return Dt=Se(Ye,Dt),Dt}function He(Ye){var We=A.simpleMap(Ye.range,Ye.r2l),Dt=$(We),Ft=Math.min(Dt[0],Dt[1]),Zt=Math.max(Dt[0],Dt[1]),nr=Ye.type==="category"?Ye.d2l_noadd:Ye.d2l;Ye.type==="log"&&String(Ye.dtick).charAt(0)!=="L"&&(Ye.dtick="L"+Math.pow(10,Math.floor(Math.min(Ye.range[0],Ye.range[1]))-1));for(var lr=[],rr=0;rr<=1;rr++)if(!(rr&&!Ye.minor)){var zt=rr?Ye.minor.tickvals:Ye.tickvals,fr=rr?[]:Ye.ticktext;if(zt){Array.isArray(fr)||(fr=[]);for(var dr=0;dr<zt.length;dr++){var pr=nr(zt[dr]);if(pr>Ft&&pr<Zt){var vr=fr[dr]===void 0?Q.tickText(Ye,pr):At(Ye,pr,String(fr[dr]));rr&&(vr.minor=!0,vr.text=""),lr.push(vr)}}}}return lr=Se(Ye,lr),lr}var Fe=[2,5,10],Ge=[1,2,3,6,12],nt=[1,2,5,10,15,30],qe=[1,2,3,7,14],$e=[-.046,0,.301,.477,.602,.699,.778,.845,.903,.954,1],et=[-.301,0,.301,.699,1],ct=[15,30,45,90,180];function dt(Ye,We,Dt){return We*A.roundUp(Ye/We,Dt)}Q.autoTicks=function(Ye,We,Dt){var Ft;function Zt(pr){return Math.pow(pr,Math.floor(Math.log(We)/Math.LN10))}if(Ye.type==="date"){Ye.tick0=A.dateTick0(Ye.calendar,0);var nr=2*We;if(nr>g)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]<Ft[0],nr=Zt?Math.floor:Math.ceil,lr=$(Ft)[0],rr=Ye.dtick,zt=Dt(Ye.tick0);if(P(rr)){var fr=nr((lr-zt)/rr)*rr+zt;return(Ye.type==="category"||Ye.type==="multicategory")&&(fr=A.constrain(fr,0,Ye._categories.length-1)),fr}var dr=rr.charAt(0),pr=Number(rr.substr(1));if(dr==="M"){for(var vr=0,Hr=zt,Ir,kr,pn;vr<10;){if(Ir=Q.tickIncrement(Hr,rr,Zt,Ye.calendar),(Ir-lr)*(Hr-lr)<=0)return Zt?Math.min(Hr,Ir):Math.max(Hr,Ir);kr=(lr-(Hr+Ir)/2)/(Ir-Hr),pn=dr+(Math.abs(Math.round(kr))||1)*pr,Hr=Q.tickIncrement(Hr,pn,kr<0?!Zt:Zt,Ye.calendar),vr++}return A.error("tickFirst did not converge",Ye),Hr}else{if(dr==="L")return Math.log(nr((Math.pow(10,lr)-zt)/pr)*pr+zt)/Math.LN10;if(dr==="D"){var jr=rr==="D2"?et:$e,In=A.roundUp(A.mod(lr,1),jr,Zt);return Math.floor(lr)+Math.log(m.round(Math.pow(10,In),1))/Math.LN10}else throw"unrecognized dtick "+String(rr)}},Q.tickText=function(Ye,We,Dt,Ft){var Zt=At(Ye,We),nr=Ye.tickmode==="array",lr=Dt||nr,rr=Ye.type,zt=rr==="category"?Ye.d2l_noadd:Ye.d2l,fr;if(nr&&Array.isArray(Ye.ticktext)){var dr=A.simpleMap(Ye.range,Ye.r2l),pr=(Math.abs(dr[1]-dr[0])-(Ye._lBreaks||0))/1e4;for(fr=0;fr<Ye.ticktext.length&&!(Math.abs(We-zt(Ye.tickvals[fr]))<pr);fr++);if(fr<Ye.ticktext.length)return Zt.text=String(Ye.ticktext[fr]),Zt}function vr(pn){if(pn===void 0)return!0;if(Dt)return pn==="none";var jr={first:Ye._tmin,last:Ye._tmax}[pn];return pn!=="all"&&We!==jr}var Hr=Dt?"never":Ye.exponentformat!=="none"&&vr(Ye.showexponent)?"hide":"";if(rr==="date"?Mt(Ye,Zt,Dt,lr):rr==="log"?Vt(Ye,Zt,Dt,lr,Hr):rr==="category"?Je(Ye,Zt):rr==="multicategory"?De(Ye,Zt,Dt):_t(Ye)?ze(Ye,Zt,Dt,lr,Hr):Ie(Ye,Zt,Dt,lr,Hr),Ft||(Ye.tickprefix&&!vr(Ye.showtickprefix)&&(Zt.text=Ye.tickprefix+Zt.text),Ye.ticksuffix&&!vr(Ye.showticksuffix)&&(Zt.text+=Ye.ticksuffix)),Ye.labelalias&&Ye.labelalias.hasOwnProperty(Zt.text)){var Ir=Ye.labelalias[Zt.text];typeof Ir=="string"&&(Zt.text=Ir)}if(Ye.tickson==="boundaries"||Ye.showdividers){var kr=function(pn){var jr=Ye.l2p(pn);return jr>=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+="<br>"+rr;else{var fr=$t(Ye),dr=Ye._trueSide||Ye.side;(!fr&&dr==="top"||fr&&dr==="bottom")&&(lr+="<br> ")}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<sup>"+(fr>1?"":y)+dr+"</sup>",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=["<sup>",lr[0],"</sup>","","<sub>",lr[1],"</sub>","π"].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<pr)Ye="0",Zt=!1;else{if(Ye+=pr,rr&&(Ye*=Math.pow(10,-rr),nr+=rr),nr===0)Ye=String(Math.floor(Ye));else if(nr<0){Ye=String(Math.round(Ye)),Ye=Ye.substr(0,Ye.length+nr);for(var vr=nr;vr<0;vr++)Ye+="0"}else{Ye=String(Ye);var Hr=Ye.indexOf(".")+1;Hr&&(Ye=Ye.substr(0,Hr+nr).replace(/\.?0+$/,""))}Ye=A.numSeparate(Ye,We._separators,fr)}if(rr&&lr!=="hide"){se(lr)&&ye(rr)&&(lr="power");var Ir;rr<0?Ir=y+-rr:lr!=="power"?Ir="+"+rr:Ir=String(rr),lr==="e"||lr==="E"?Ye+=lr+Ir:lr==="power"?Ye+="×10<sup>"+Ir+"</sup>":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<Ye.tickformatstops.length;We++)if(rr=Ye.tickformatstops[We],rr.enabled&&Zt(Ye.dtick,rr.dtickrange,Dt)){lr=rr;break}break}case"log":{for(We=0;We<Ye.tickformatstops.length;We++)if(rr=Ye.tickformatstops[We],rr.enabled&&nr(Ye.dtick,rr.dtickrange)){lr=rr;break}break}}return lr?lr.value:Ye.tickformat},Q.getSubplots=function(Ye,We){var Dt=Ye._fullLayout._subplots,Ft=Dt.cartesian.concat(Dt.gl2d||[]),Zt=We?Q.findSubplotsWithAxis(Ft,We):Ft;return Zt.sort(function(nr,lr){var rr=nr.substr(1).split("y"),zt=lr.substr(1).split("y");return rr[0]===zt[0]?+rr[1]-+zt[1]:+rr[0]-+zt[0]}),Zt},Q.findSubplotsWithAxis=function(Ye,We){for(var Dt=new RegExp(We._id.charAt(0)==="x"?"^"+We._id+"y":We._id+"$"),Ft=[],Zt=0;Zt<Ye.length;Zt++){var nr=Ye[Zt];Dt.test(nr)&&Ft.push(nr)}return Ft},Q.makeClipPaths=function(Ye){var We=Ye._fullLayout;if(!We._hasOnlyLargeSploms){var Dt={_offset:0,_length:We.width,_id:""},Ft={_offset:0,_length:We.height,_id:""},Zt=Q.list(Ye,"x",!0),nr=Q.list(Ye,"y",!0),lr=[],rr,zt;for(rr=0;rr<Zt.length;rr++)for(lr.push({x:Zt[rr],y:Ft}),zt=0;zt<nr.length;zt++)rr===0&&lr.push({x:Dt,y:nr[zt]}),lr.push({x:Zt[rr],y:nr[zt]});var fr=We._clips.selectAll(".axesclip").data(lr,function(dr){return dr.x._id+dr.y._id});fr.enter().append("clipPath").classed("axesclip",!0).attr("id",function(dr){return"clip"+We._uid+dr.x._id+dr.y._id}).append("rect"),fr.exit().remove(),fr.each(function(dr){m.select(this).select("rect").attr({x:dr.x._offset||0,y:dr.y._offset||0,width:dr.x._length||1,height:dr.y._length||1})})}},Q.draw=function(Ye,We,Dt){var Ft=Ye._fullLayout;We==="redraw"&&Ft._paper.selectAll("g.subplot").each(function(zt){var fr=zt[0],dr=Ft._plots[fr];if(dr){var pr=dr.xaxis,vr=dr.yaxis;dr.xaxislayer.selectAll("."+pr._id+"tick").remove(),dr.yaxislayer.selectAll("."+vr._id+"tick").remove(),dr.xaxislayer.selectAll("."+pr._id+"tick2").remove(),dr.yaxislayer.selectAll("."+vr._id+"tick2").remove(),dr.xaxislayer.selectAll("."+pr._id+"divider").remove(),dr.yaxislayer.selectAll("."+vr._id+"divider").remove(),dr.minorGridlayer&&dr.minorGridlayer.selectAll("path").remove(),dr.gridlayer&&dr.gridlayer.selectAll("path").remove(),dr.zerolinelayer&&dr.zerolinelayer.selectAll("path").remove(),Ft._infolayer.select(".g-"+pr._id+"title").remove(),Ft._infolayer.select(".g-"+vr._id+"title").remove()}});var Zt=!We||We==="redraw"?Q.listIds(Ye):We,nr=Q.list(Ye),lr=nr.filter(function(zt){return zt.autoshift}).map(function(zt){return zt.overlaying});Zt.map(function(zt){var fr=Q.getFromId(Ye,zt);if(fr.tickmode==="sync"&&fr.overlaying){var dr=Zt.findIndex(function(pr){return pr===fr.overlaying});dr>=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;nr<In.length;nr++)In[nr].axInfo=Dn;We._selections={},We._tickAngles&&(We._prevTickAngles=We._tickAngles),We._tickAngles={},We._depth=null;var xr={};function Ar(zr){var dn=fr+(zr||"tick");return xr[dn]||(xr[dn]=It(We,dn)),xr[dn]}if(We.visible){var Or=Q.makeTransTickFn(We),Nr=Q.makeTransTickLabelFn(We),qr,vn,fn=We.ticks==="inside",Tn=We.ticks==="outside";if(We.tickson==="boundaries"){var Pn=ot(We,In);vn=Q.clipEnds(We,Pn),qr=fn?vn:Pn}else vn=Q.clipEnds(We,In),qr=fn&&We.ticklabelmode!=="period"?vn:In;var jn=We._gridVals=vn,qn=wt(We,In);if(!zt._hasOnlyLargeSploms){var sa=We._subplotsWith,ta={};for(nr=0;nr<sa.length;nr++){lr=sa[nr],rr=zt._plots[lr];var ea=rr[pr+"axis"],Mr=ea._mainAxis._id;if(!ta[Mr]){ta[Mr]=1;var on=dr==="x"?"M0,"+ea._offset+"v"+ea._length:"M"+ea._offset+",0h"+ea._length;Q.drawGrid(Ye,We,{vals:jn,counterAxis:ea,layer:rr.gridlayer.select("."+fr),minorLayer:rr.minorGridlayer.select("."+fr),path:on,transFn:Or}),Q.drawZeroLine(Ye,We,{counterAxis:ea,layer:rr.zerolinelayer,path:on,transFn:Or})}}}var nn,gn=Q.getTickSigns(We),Un=Q.getTickSigns(We,"minor");if(We.ticks||We.minor&&We.minor.ticks){var En=Q.makeTickPath(We,pn,gn[2]),Cn=Q.makeTickPath(We,pn,Un[2],{minor:!0}),Hn,aa,Pa,Za;if(We._anchorAxis&&We.mirror&&We.mirror!==!0?(Hn=Q.makeTickPath(We,jr,gn[3]),aa=Q.makeTickPath(We,jr,Un[3],{minor:!0}),Pa=En+Hn,Za=Cn+aa):(Hn="",aa="",Pa=En,Za=Cn),We.showdividers&&Tn&&We.tickson==="boundaries"){var Xt={};for(nr=0;nr<qn.length;nr++)Xt[qn[nr].x]=1;nn=function(zr){return Xt[zr.x]?Hn:Pa}}else nn=function(zr){return zr.minor?Za:Pa}}if(Q.drawTicks(Ye,We,{vals:qr,layer:Ir,path:nn,transFn:Or}),We.mirror==="allticks"){var wr=Object.keys(We._linepositions||{});for(nr=0;nr<wr.length;nr++){lr=wr[nr],rr=zt._plots[lr];var an=We._linepositions[lr]||[],cn=an[0],hn=an[1],Ln=an[2],wn=Q.makeTickPath(We,cn,Ln?gn[0]:Un[0],{minor:Ln})+Q.makeTickPath(We,hn,Ln?gn[1]:Un[1],{minor:Ln});Q.drawTicks(Ye,We,{vals:qr,layer:rr[dr+"axislayer"],path:wn,transFn:Or})}}var un=[];if(un.push(function(){return Q.drawLabels(Ye,We,{vals:In,layer:Ir,plotinfo:rr,transFn:Nr,labelFns:Q.makeLabelFns(We,pn)})}),We.type==="multicategory"){var Rr={x:2,y:10}[dr];un.push(function(){var zr={x:"height",y:"width"}[dr],dn=Ar()[zr]+Rr+(We._tickAngles[fr+"tick"]?We.tickfont.size*te:0);return Q.drawLabels(Ye,We,{vals:at(We,In),layer:Ir,cls:fr+"tick2",repositionOnUpdate:!0,secondary:!0,transFn:Or,labelFns:Q.makeLabelFns(We,pn+dn*gn[4])})}),un.push(function(){return We._depth=gn[4]*(Ar("tick2")[We.side]-pn),Kt(Ye,We,{vals:qn,layer:Ir,path:Q.makeTickPath(We,pn,gn[4],{len:We._depth}),transFn:Or})})}else We.title.hasOwnProperty("standoff")&&un.push(function(){We._depth=gn[4]*(Ar()[We.side]-pn)});var Cr=L.getComponentMethod("rangeslider","isVisible")(We);return!Dt.skipTitle&&!(Cr&&We.side==="bottom")&&un.push(function(){return _r(Ye,We)}),un.push(function(){var zr=We.side.charAt(0),dn=ae[We.side].charAt(0),_n=Q.getPxPosition(Ye,We),Wn=Tn?We.ticklen:0,yn,On,$n,la;(We.automargin||Cr||We._shiftPusher)&&(We.type==="multicategory"?yn=Ar("tick2"):(yn=Ar(),dr==="x"&&zr==="b"&&(We._depth=Math.max(yn.width>0?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;Ft<We.length;Ft++)Zt(We[Ft],0);Zt(We[Ft-1],1)}return Dt}function at(Ye,We){for(var Dt=[],Ft={},Zt=0;Zt<We.length;Zt++){var nr=We[Zt];Ft[nr.text2]?Ft[nr.text2].push(nr.x):Ft[nr.text2]=[nr.x]}for(var lr in Ft)Dt.push(At(Ye,A.interp(Ft[lr],.5),lr));return Dt}function wt(Ye,We){var Dt=[],Ft,Zt,nr=We.length&&We[We.length-1].x<We[0].x,lr=function(zt,fr){var dr=zt.xbnd[fr];dr!==null&&Dt.push(A.extendFlat({},zt,{x:dr}))};if(Ye.showdividers&&We.length){for(Ft=0;Ft<We.length;Ft++){var rr=We[Ft];rr.text2!==Zt&&lr(rr,nr?1:0),Zt=rr.text2}lr(We[Ft-1],nr?0:1)}return Dt}function It(Ye,We){var Dt,Ft,Zt,nr;return Ye._selections[We].size()?(Dt=1/0,Ft=-1/0,Zt=1/0,nr=-1/0,Ye._selections[We].each(function(){var lr=br(this),rr=s.bBox(lr.node().parentNode);Dt=Math.min(Dt,rr.top),Ft=Math.max(Ft,rr.bottom),Zt=Math.min(Zt,rr.left),nr=Math.max(nr,rr.right)})):(Dt=0,Ft=0,Zt=0,nr=0),{top:Dt,bottom:Ft,left:Zt,right:nr,height:Ft-Dt,width:nr-Zt}}Q.getTickSigns=function(Ye,We){var Dt=Ye._id.charAt(0),Ft={x:"top",y:"right"}[Dt],Zt=Ye.side===Ft?1:-1,nr=[-1,1,Zt,-Zt],lr=We?(Ye.minor||{}).ticks:Ye.ticks;return lr!=="inside"==(Dt==="x")&&(nr=nr.map(function(rr){return-rr})),Ye.side&&nr.push({l:-1,t:-1,r:1,b:1}[Ye.side.charAt(0)]),nr},Q.makeTransTickFn=function(Ye){return Ye._id.charAt(0)==="x"?function(We){return v(Ye._offset+Ye.l2p(We.x),0)}:function(We){return v(0,Ye._offset+Ye.l2p(We.x))}},Q.makeTransTickLabelFn=function(Ye){var We=Gt(Ye),Dt=We[0],Ft=We[1];return Ye._id.charAt(0)==="x"?function(Zt){return v(Dt+Ye._offset+Ye.l2p(Bt(Zt)),Ft)}:function(Zt){return v(Ft,Dt+Ye._offset+Ye.l2p(Bt(Zt)))}};function Bt(Ye){return Ye.periodX!==void 0?Ye.periodX:Ye.x}function Gt(Ye){var We=Ye.ticklabelposition||"",Dt=function(Hr){return We.indexOf(Hr)!==-1},Ft=Dt("top"),Zt=Dt("left"),nr=Dt("right"),lr=Dt("bottom"),rr=Dt("inside"),zt=lr||Zt||Ft||nr;if(!zt&&!rr)return[0,0];var fr=Ye.side,dr=zt?(Ye.tickwidth||0)/2:0,pr=ce,vr=Ye.tickfont?Ye.tickfont.size:12;return(lr||Ft)&&(dr+=vr*J,pr+=(Ye.linewidth||0)/2),(Zt||nr)&&(dr+=(Ye.linewidth||0)/2,pr+=ce),rr&&fr==="top"&&(pr-=vr*(1-J)),(Zt||Ft)&&(dr=-dr),(fr==="bottom"||fr==="right")&&(pr=-pr),[zt?dr:0,rr?pr:0]}Q.makeTickPath=function(Ye,We,Dt,Ft){Ft||(Ft={});var Zt=Ft.minor;if(Zt&&!Ye.minor)return"";var nr=Ft.len!==void 0?Ft.len:Zt?Ye.minor.ticklen:Ye.ticklen,lr=Ye._id.charAt(0),rr=(Ye.linewidth||1)/2;return lr==="x"?"M0,"+(We+rr*Dt)+"v"+nr*Dt:"M"+(We+rr*Dt)+",0h"+nr*Dt},Q.makeLabelFns=function(Ye,We,Dt){var Ft=Ye.ticklabelposition||"",Zt=function(Pn){return Ft.indexOf(Pn)!==-1},nr=Zt("top"),lr=Zt("left"),rr=Zt("right"),zt=Zt("bottom"),fr=zt||lr||nr||rr,dr=Zt("inside"),pr=Ft==="inside"&&Ye.ticks==="inside"||!dr&&Ye.ticks==="outside"&&Ye.tickson!=="boundaries",vr=0,Hr=0,Ir=pr?Ye.ticklen:0;if(dr?Ir*=-1:fr&&(Ir=0),pr&&(vr+=Ir,Dt)){var kr=A.deg2rad(Dt);vr=Ir*Math.cos(kr)+1,Hr=Ir*Math.sin(kr)}Ye.showticklabels&&(pr||Ye.showline)&&(vr+=.2*Ye.tickfont.size),vr+=(Ye.linewidth||1)/2*(dr?-1:1);var pn={labelStandoff:vr,labelShift:Hr},jr,In,Dn,xr,Ar=0,Or=Ye.side,Nr=Ye._id.charAt(0),qr=Ye.tickangle,vn;if(Nr==="x")vn=!dr&&Or==="bottom"||dr&&Or==="top",xr=vn?1:-1,dr&&(xr*=-1),jr=Hr*xr,In=We+vr*xr,Dn=vn?1:-.2,Math.abs(qr)===90&&(dr?Dn+=Y:qr===-90&&Or==="bottom"?Dn=J:qr===90&&Or==="top"?Dn=Y:Dn=.5,Ar=Y/2*(qr/90)),pn.xFn=function(Pn){return Pn.dx+jr+Ar*Pn.fontSize},pn.yFn=function(Pn){return Pn.dy+In+Pn.fontSize*Dn},pn.anchorFn=function(Pn,jn){if(fr){if(lr)return"end";if(rr)return"start"}return!P(jn)||jn===0||jn===180?"middle":jn*xr<0!==dr?"end":"start"},pn.heightFn=function(Pn,jn,qn){return jn<-60||jn>60?-.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<lr.length;fr++){var dr=lr[fr].x;if(zt?!dr:Math.abs(dr)<We.dtick/100)if(lr=lr.slice(0,fr).concat(lr.slice(fr+1)),zt)fr--;else break}We._gw=s.crispRound(Ye,We.gridwidth,1);for(var pr=Zt?s.crispRound(Ye,We.minor.gridwidth,1):0,vr=Dt.layer,Hr=Dt.minorLayer,Ir=1;Ir>=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.left<fn)&&(Un=1):(gn.bottom>Tn||gn.top+(We.tickangle?0:Mr.fontSize/4)<fn)&&(Un=1);var En=on.select("text");Un?Ar&&En.style("opacity",0):(En.style("opacity",1),Pn==="bottom"||Pn==="right"?jn=Math.min(jn,Or?gn.top:gn.left):jn=-1/0,Pn==="top"||Pn==="left"?qn=Math.max(qn,Or?gn.bottom:gn.right):qn=1/0)}});for(var sa in Ft._plots){var ta=Ft._plots[sa];if(!(We._id!==ta.xaxis._id&&We._id!==ta.yaxis._id)){var ea=Or?ta.yaxis:ta.xaxis;ea&&(ea["_visibleLabelMin_"+We._id]=jn,ea["_visibleLabelMax_"+We._id]=qn)}}}},We._hideCounterAxisInsideTickLabels=function(xr){var Ar=We._id.charAt(0)==="x",Or=[];for(var Nr in Ft._plots){var qr=Ft._plots[Nr];We._id!==qr.xaxis._id&&We._id!==qr.yaxis._id||Or.push(Ar?qr.yaxis:qr.xaxis)}Or.forEach(function(vn,fn){vn&&$t(vn)&&(xr||[I,k,B,O,N]).forEach(function(Tn){var Pn=Tn.K==="tick"&&Tn.L==="text"&&We.ticklabelmode==="period",jn=Ft._plots[We._mainSubplot],qn;Tn.K===I.K?qn=jn.zerolinelayer.selectAll("."+We._id+"zl"):Tn.K===k.K?qn=jn.minorGridlayer.selectAll("."+We._id):Tn.K===B.K?qn=jn.gridlayer.selectAll("."+We._id):qn=jn[We._id.charAt(0)+"axislayer"],qn.each(function(){var sa=m.select(this);Tn.L&&(sa=sa.selectAll(Tn.L)),sa.each(function(ta){var ea=We.l2p(Pn?Bt(ta):ta.x)+We._offset,Mr=m.select(this);ea<We["_visibleLabelMax_"+vn._id]&&ea>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;Or<Ar.length;Or++){var qr=rr[Or].xbnd,vn=Ar[Or];if(qr[0]!==null&&vn.left-We.l2p(qr[0])<Nr||qr[1]!==null&&We.l2p(qr[1])-vn.right<Nr){kr=90;break}}}else{var fn=rr.length,Tn=Math.abs((rr[fn-1].x-rr[0].x)*We._m)/(fn-1),Pn=We.ticklabelposition||"",jn=function(gn){return Pn.indexOf(gn)!==-1},qn=jn("top"),sa=jn("left"),ta=jn("right"),ea=jn("bottom"),Mr=ea||sa||qn||ta,on=Mr?(We.tickwidth||0)+2*ce:0,nn=Tn<xr*2.5||We.type==="multicategory"||We._name==="realaxis";for(Or=0;Or<Ar.length-1;Or++)if(A.bBoxIntersect(Ar[Or],Ar[Or+1],on)){kr=nn?90:30;break}}kr&&Hr(pr,kr)}}We._selections&&(We._selections[lr]=pr);var jr=[Ir];We.automargin&&Ft._redrawFromAutoMarginCount&&dr===90?(kr=90,jr.push(function(){Hr(pr,dr)})):jr.push(pn),We._tickAngles&&jr.push(function(){We._tickAngles[lr]=kr===null?P(fr)?fr:0:kr});var In=We._anchorAxis;In&&In.autorange&&$t(We)&&!ee(Ft,We._id)&&(Ft._insideTickLabelsAutorange||(Ft._insideTickLabelsAutorange={}),Ft._insideTickLabelsAutorange[In._name+".autorange"]=In.autorange,jr.push(function(){pr.each(function(Ar,Or){var Nr=br(this),qr=Nr.select(".text-math-group");qr.empty()&&(We._vals[Or].bb=s.bBox(Nr.node()))})}));var Dn=A.syncOrAsync(jr);return Dn&&Dn.then&&Ye._promises.push(Dn),Dn};function Kt(Ye,We,Dt){var Ft=We._id+"divider",Zt=Dt.vals,nr=Dt.layer.selectAll("path."+Ft).data(Zt,Lt);nr.exit().remove(),nr.enter().insert("path",":first-child").classed(Ft,1).classed("crisp",1).call(r.stroke,We.dividercolor).style("stroke-width",s.crispRound(Ye,We.dividerwidth,1)+"px"),nr.attr("transform",Dt.transFn).attr("d",Dt.path)}Q.getPxPosition=function(Ye,We){var Dt=Ye._fullLayout._size,Ft=We._id.charAt(0),Zt=We.side,nr;if(We.anchor!=="free"?nr=We._anchorAxis:Ft==="x"?nr={_offset:Dt.t+(1-(We.position||0))*Dt.h,_length:0}:Ft==="y"&&(nr={_offset:Dt.l+(We.position||0)*Dt.w+We._shift,_length:0}),Zt==="top"||Zt==="left")return nr._offset;if(Zt==="bottom"||Zt==="right")return nr._offset+nr._length};function ir(Ye){var We=Ye.title.font.size,Dt=(Ye.title.text.match(p.BR_TAG_ALL)||[]).length;return Ye.title.hasOwnProperty("standoff")?Dt?We*(J+Dt*te):We*J:Dt?We*(Dt+1)*te:We}function _r(Ye,We){var Dt=Ye._fullLayout,Ft=We._id,Zt=Ft.charAt(0),nr=We.title.font.size,lr;if(We.title.hasOwnProperty("standoff"))lr=We._depth+We.title.standoff+ir(We);else{var rr=$t(We);if(We.type==="multicategory")lr=We._depth;else{var zt=1.5*nr;rr&&(zt=.5*nr,We.ticks==="outside"&&(zt+=We.ticklen)),lr=10+zt+(We.linewidth?We.linewidth-1:0)}rr||(Zt==="x"?lr+=We.side==="top"?nr*(We.showticklabels?1:0):nr*(We.showticklabels?1.5:.5):lr+=We.side==="right"?nr*(We.showticklabels?1:.5):nr*(We.showticklabels?.5:0))}var fr=Q.getPxPosition(Ye,We),dr,pr,vr;Zt==="x"?(pr=We._offset+We._length/2,vr=We.side==="top"?fr-lr:fr+lr):(vr=We._offset+We._length/2,pr=We.side==="right"?fr+lr:fr-lr,dr={rotate:"-90",offset:0});var Hr;if(We.type!=="multicategory"){var Ir=We._selections[We._id+"tick"];if(Hr={selection:Ir,side:We.side},Ir&&Ir.node()&&Ir.node().parentNode){var kr=s.getTranslate(Ir.node().parentNode);Hr.offsetLeft=kr.x,Hr.offsetTop=kr.y}We.title.hasOwnProperty("standoff")&&(Hr.pad=0)}return We._titleStandoff=lr,t.draw(Ye,Ft+"title",{propContainer:We,propName:We._name+".title.text",placeholder:Dt._dfltTitle[Zt],avoid:Hr,transform:dr,attributes:{x:pr,y:vr,"text-anchor":"middle"}})}Q.shouldShowZeroLine=function(Ye,We,Dt){var Ft=A.simpleMap(We.range,We.r2l);return Ft[0]*Ft[1]<=0&&We.zeroline&&(We.type==="linear"||We.type==="-")&&!(We.rangebreaks&&We.maskBreaks(0)===z)&&(yt(We,0)||!jt(Ye,We,Dt,Ft)||Yt(Ye,We))},Q.clipEnds=function(Ye,We){return We.filter(function(Dt){return yt(Ye,Dt.x)})};function yt(Ye,We){var Dt=Ye.l2p(We);return Dt>1&&Dt<Ye._length-1}function jt(Ye,We,Dt,Ft){var Zt=Dt._mainAxis;if(!Zt)return;var nr=Ye._fullLayout,lr=We._id.charAt(0),rr=Q.counterLetter(We._id),zt=We._offset+(Math.abs(Ft[0])<Math.abs(Ft[1])==(lr==="x")?0:We._length);function fr(Ir){if(!Ir.showline||!Ir.linewidth)return!1;var kr=Math.max((Ir.linewidth+We.zerolinewidth)/2,1);function pn(Dn){return typeof Dn=="number"&&Math.abs(Dn-zt)<kr}if(pn(Ir._mainLinePosition)||pn(Ir._mainMirrorPosition))return!0;var jr=Ir._linepositions||{};for(var In in jr)if(pn(jr[In][0])||pn(jr[In][1]))return!0}var dr=nr._plots[Dt._mainSubplot];if(!(dr.mainplotinfo||dr).overlays.length)return fr(Dt);for(var pr=Q.list(Ye,rr),vr=0;vr<pr.length;vr++){var Hr=pr[vr];if(Hr._mainAxis===Zt&&fr(Hr))return!0}}function Yt(Ye,We){for(var Dt=Ye._fullData,Ft=We._mainSubplot,Zt=We._id.charAt(0),nr=0;nr<Dt.length;nr++){var lr=Dt[nr];if(lr.visible===!0&&lr.xaxis+lr.yaxis===Ft&&(L.traceIs(lr,"bar-like")&&lr.orientation==={x:"h",y:"v"}[Zt]||lr.fill&&lr.fill.charAt(lr.fill.length-1)===Zt))return!0}return!1}function br(Ye){var We=m.select(Ye),Dt=We.select(".text-math-group");return Dt.empty()?We.select("text"):Dt}Q.allowAutoMargin=function(Ye){for(var We=Q.list(Ye,"",!0),Dt=0;Dt<We.length;Dt++){var Ft=We[Dt];Ft.automargin&&(i.allowAutoMargin(Ye,hr(Ft)),Ft.mirror&&i.allowAutoMargin(Ye,ut(Ft))),L.getComponentMethod("rangeslider","isVisible")(Ft)&&i.allowAutoMargin(Ye,lt(Ft))}};function hr(Ye){return Ye._id+".automargin"}function ut(Ye){return hr(Ye)+".mirror"}function lt(Ye){return Ye._id+".rangeslider"}Q.swap=function(Ye,We){for(var Dt=xt(Ye,We),Ft=0;Ft<Dt.length;Ft++)Ct(Ye,Dt[Ft].x,Dt[Ft].y)};function xt(Ye,We){var Dt=[],Ft,Zt;for(Ft=0;Ft<We.length;Ft++){var nr=[],lr=Ye._fullData[We[Ft]].xaxis,rr=Ye._fullData[We[Ft]].yaxis;if(!(!lr||!rr)){for(Zt=0;Zt<Dt.length;Zt++)(Dt[Zt].x.indexOf(lr)!==-1||Dt[Zt].y.indexOf(rr)!==-1)&&nr.push(Zt);if(!nr.length){Dt.push({x:[lr],y:[rr]});continue}var zt=Dt[nr[0]],fr;if(nr.length>1)for(Zt=1;Zt<nr.length;Zt++)fr=Dt[nr[Zt]],Tt(zt.x,fr.x),Tt(zt.y,fr.y);Tt(zt.x,[lr]),Tt(zt.y,[rr])}}return Dt}function Tt(Ye,We){for(var Dt=0;Dt<We.length;Dt++)Ye.indexOf(We[Dt])===-1&&Ye.push(We[Dt])}function Ct(Ye,We,Dt){var Ft=[],Zt=[],nr=Ye.layout,lr,rr;for(lr=0;lr<We.length;lr++)Ft.push(Q.getFromId(Ye,We[lr]));for(lr=0;lr<Dt.length;lr++)Zt.push(Q.getFromId(Ye,Dt[lr]));var zt=Object.keys(n),fr=["anchor","domain","overlaying","position","side","tickangle","editType"],dr=["linear","log"];for(lr=0;lr<zt.length;lr++){var pr=zt[lr],vr=Ft[0][pr],Hr=Zt[0][pr],Ir=!0,kr=!1,pn=!1;if(!(pr.charAt(0)==="_"||typeof vr=="function"||fr.indexOf(pr)!==-1)){for(rr=1;rr<Ft.length&&Ir;rr++){var jr=Ft[rr][pr];pr==="type"&&dr.indexOf(vr)!==-1&&dr.indexOf(jr)!==-1&&vr!==jr?kr=!0:jr!==vr&&(Ir=!1)}for(rr=1;rr<Zt.length&&Ir;rr++){var In=Zt[rr][pr];pr==="type"&&dr.indexOf(Hr)!==-1&&dr.indexOf(In)!==-1&&Hr!==In?pn=!0:Zt[rr][pr]!==Hr&&(Ir=!1)}Ir&&(kr&&(nr[Ft[0]._name].type="linear"),pn&&(nr[Zt[0]._name].type="linear"),St(nr,pr,Ft,Zt,Ye._fullLayout._dfltTitle))}}for(lr=0;lr<Ye._fullLayout.annotations.length;lr++){var Dn=Ye._fullLayout.annotations[lr];We.indexOf(Dn.xref)!==-1&&Dt.indexOf(Dn.yref)!==-1&&A.swapAttrs(nr.annotations[lr],["?"])}}function St(Ye,We,Dt,Ft,Zt){var nr=A.nestedProperty,lr=nr(Ye[Dt[0]._name],We).get(),rr=nr(Ye[Ft[0]._name],We).get(),zt;for(We==="title"&&(lr&&lr.text===Zt.x&&(lr.text=Zt.y),rr&&rr.text===Zt.y&&(rr.text=Zt.x)),zt=0;zt<Dt.length;zt++)nr(Ye,Dt[zt]._name+"."+We).set(rr);for(zt=0;zt<Ft.length;zt++)nr(Ye,Ft[zt]._name+"."+We).set(lr)}function _t(Ye){return Ye._id==="angularaxis"}function Ht(Ye,We){for(var Dt=We._rangebreaks.length,Ft=0;Ft<Dt;Ft++){var Zt=We._rangebreaks[Ft];if(Ye>=Zt.min&&Ye<Zt.max)return Zt.max}return Ye}function $t(Ye){return(Ye.ticklabelposition||"").indexOf("inside")!==-1}function Qt(Ye,We){$t(Ye._anchorAxis||{})&&Ye._hideCounterAxisInsideTickLabels&&Ye._hideCounterAxisInsideTickLabels(We)}function or(Ye,We,Dt,Ft){var Zt=Ye.anchor!=="free"&&(Ye.overlaying===void 0||Ye.overlaying===!1)?Ye._id:Ye.overlaying,nr;Ft?nr=Ye.side==="right"?We:-We:nr=We,Zt in Dt||(Dt[Zt]={}),Ye.side in Dt[Zt]||(Dt[Zt][Ye.side]=0),Dt[Zt][Ye.side]+=nr}function Er(Ye,We){return Ye.autoshift?We[Ye.overlaying][Ye.side]:Ye.shift||0}},4322:function(G,V,e){var m=e(92770),P=e(71828),i=e(50606).BADNUM,L=P.isArrayOrTypedArray,A=P.isDateTime,v=P.cleanNumber,p=Math.round;G.exports=function(g,f,w){var h=g,o=w.noMultiCategory;if(L(h)&&!h.length)return"-";if(!o&&c(h))return"multicategory";if(o&&Array.isArray(h[0])){for(var d=[],M=0;M<h.length;M++)if(L(h[M]))for(var T=0;T<h[M].length;T++)d.push(h[M][T]);h=d}if(s(h,f))return"date";var C=w.autotypenumbers!=="strict";return l(h,C)?"category":r(h,C)?"linear":"-"};function t(u,g){return g?m(u):typeof u=="number"}function r(u,g){for(var f=u.length,w=0;w<f;w++)if(t(u[w],g))return!0;return!1}function s(u,g){for(var f=u.length,w=n(f),h=0,o=0,d={},M=0;M<f;M+=w){var T=p(M),C=u[T],x=String(C);d[x]||(d[x]=1,A(C,g)&&h++,m(C)&&o++)}return h>o*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;M<f;M+=w){var T=p(M),C=u[T],x=String(C);if(!d[x]){d[x]=1;var S=typeof C;S==="boolean"?o++:(g?v(C)!==i:S==="number")?h++:S==="string"&&o++}}return o>h*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<T.rangebreaks.length;oe++)if(T.rangebreaks[oe].pattern===g){T._hasDayOfWeekBreaks=!0;break}if(u(T,S),S._has("scattergl")||S._has("splom"))for(var q=0;q<x.data.length;q++){var $=x.data[q];($.type==="scattergl"||$.type==="splom")&&($.visible=!1,i.warn($.type+" traces do not work on axes with rangebreaks. Setting trace "+$.index+" to `visible: false`."))}}return T};function w(d,M,T){function C(B,k){return i.coerce(d,M,v.rangebreaks,B,k)}var x=C("enabled");if(x){var S=C("bounds");if(S&&S.length>=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]){if(S[0]<z[0]&&S[1]>z[1]){M.enabled=!1;return}}else if(S[0]>z[0]&&S[1]<z[1]){M.enabled=!1;return}}}else{var I=C("values");if(I&&I.length)C("dvalue");else{M.enabled=!1;return}}}}var h={sun:1,mon:2,tue:3,wed:4,thu:5,fri:6,sat:7};function o(d){if(typeof d=="string")return h[d.substr(0,3).toLowerCase()]}},12663:function(G,V,e){var m=e(31562),P=m.FORMAT_LINK,i=m.DATE_FORMAT_LINK;function L(p,t){return{valType:"string",dflt:"",editType:"none",description:(t?A:v)("hover text",p)+["By default the values are formatted using "+(t?"generic number format":"`"+p+"axis.hoverformat`")+"."].join(" ")}}function A(p,t){return["Sets the "+p+" formatting rule"+(t?"for `"+t+"` ":""),"using d3 formatting mini-languages","which are very similar to those in Python. For numbers, see: "+P+"."].join(" ")}function v(p,t){return A(p,t)+[" And for dates see: "+i+".","We add two items to d3's date formatter:","*%h* for half of the year as a decimal number as well as","*%{n}f* for fractional seconds","with n digits. For example, *2016-10-13 09:15:23.456* with tickformat","*%H~%M~%S.%2f* would display *09~15~23.46*"].join(" ")}G.exports={axisHoverFormat:L,descriptionOnlyNumbers:A,descriptionWithDates:v}},41675:function(G,V,e){var m=e(73972),P=e(85555);V.id2name=function(A){if(!(typeof A!="string"||!A.match(P.AX_ID_PATTERN))){var v=A.split(" ")[0].substr(1);return v==="1"&&(v=""),A.charAt(0)+"axis"+v}},V.name2id=function(A){if(A.match(P.AX_NAME_PATTERN)){var v=A.substr(5);return v==="1"&&(v=""),A.charAt(0)+v}},V.cleanId=function(A,v,p){var t=/( domain)$/.test(A);if(!(typeof A!="string"||!A.match(P.AX_ID_PATTERN))&&!(v&&A.charAt(0)!==v)&&!(t&&!p)){var r=A.split(" ")[0].substr(1).replace(/^0+/,"");return r==="1"&&(r=""),A.charAt(0)+r+(t&&p?" domain":"")}},V.list=function(L,A,v){var p=L._fullLayout;if(!p)return[];var t=V.listIds(L,A),r=new Array(t.length),s;for(s=0;s<t.length;s++){var n=t[s];r[s]=p[n.charAt(0)+"axis"+n.substr(1)]}if(!v){var l=p._subplots.gl3d||[];for(s=0;s<l.length;s++){var c=p[l[s]];A?r.push(c[A+"axis"]):r.push(c.xaxis,c.yaxis,c.zaxis)}}return r},V.listIds=function(L,A){var v=L._fullLayout;if(!v)return[];var p=v._subplots;return A?p[A+"axis"]:p.xaxis.concat(p.yaxis)},V.getFromId=function(L,A,v){var p=L._fullLayout;return A=A===void 0||typeof A!="string"?A:A.replace(" domain",""),v==="x"?A=A.replace(/y[0-9]*/,""):v==="y"&&(A=A.replace(/x[0-9]*/,"")),p[V.id2name(A)]},V.getFromTrace=function(L,A,v){var p=L._fullLayout,t=null;if(m.traceIs(A,"gl3d")){var r=A.scene;r.substr(0,5)==="scene"&&(t=p[r][v+"axis"])}else t=V.getFromId(L,A[v+"axis"]||v);return t},V.idSort=function(L,A){var v=L.charAt(0),p=A.charAt(0);return v!==p?v>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;v<A.length;v++)if(A[v][L])return!0}return!1}V.isLinked=function(L,A){return i(A,L._axisMatchGroups)||i(A,L._axisConstraintGroups)}},15258:function(G){function V(e,m){var P=m.dataAttr||e._id.charAt(0),i={},L,A,v;if(m.axData)L=m.axData;else for(L=[],A=0;A<m.data.length;A++){var p=m.data[A];p[P+"axis"]===e._id&&L.push(p)}for(A=0;A<L.length;A++){var t=L[A][P];for(v=0;v<t.length;v++){var r=t[v];r!=null&&(i[r]=1)}}return Object.keys(i)}G.exports=function(m,P,i,L){if(P.type==="category"){var A=m.categoryarray,v=Array.isArray(A)&&A.length>0,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;C<o.length;C++)b=i(o[C]),a=f[b],E=w[b],r(a,E,{axIds:o,layoutOut:w,hasImage:d[b]});function I(te,ae){for(C=0;C<te.length;C++){x=te[C];for(S in x)w[i(S)][ae]=x}}for(I(T,"_matchGroup"),C=0;C<M.length;C++){x=M[C];for(S in x)if(E=w[i(S)],E.fixedrange){for(var B in x){var k=i(B);(f[k]||{}).fixedrange===!1&&m.warn("fixedrange was specified as false for axis "+k+" but was overridden because another axis in its constraint group has fixedrange true"),w[k].fixedrange=!0}break}}for(C=0;C<M.length;){x=M[C];for(S in x){E=w[i(S)],E._matchGroup&&Object.keys(E._matchGroup).length===Object.keys(x).length&&(M.splice(C,1),C--);break}C++}I(M,"_constraintGroup");var O=["constrain","range","autorange","rangemode","rangebreaks","categoryorder","categoryarray"],N=!1,_=!1;function U(){z=E[y],y==="rangebreaks"&&(_=E._hasDayOfWeekBreaks)}for(C=0;C<T.length;C++){x=T[C];for(var Y=0;Y<O.length;Y++){y=O[Y],z=null;var J;for(S in x)if(b=i(S),a=f[b],E=w[b],y in E){if(!E.matches&&(J=E,y in a)){U();break}z===null&&y in a&&U()}if(y==="range"&&z&&a.range&&a.range.length===2&&a.range[0]!==null&&a.range[1]!==null&&(N=!0),y==="autorange"&&z===null&&N&&(z=!1),z===null&&y in J&&(z=J[y]),z!==null)for(S in x)E=w[i(S)],E[y]=y==="range"?z.slice():z,y==="rangebreaks"&&(E._hasDayOfWeekBreaks=_,v(E,w))}}};function r(f,w,h){var o=h.axIds,d=h.layoutOut,M=h.hasImage,T=d._axisConstraintGroups,C=d._axisMatchGroups,x=w._id,S=x.charAt(0),b=((d._splomAxes||{})[S]||{})[x]||{},a=w._id,E=a.charAt(0)==="x";w._matchGroup=null,w._constraintGroup=null;function y(Z,j){return m.coerce(f,w,L,Z,j)}y("constrain",M?"domain":"range"),m.coerce(f,w,{constraintoward:{valType:"enumerated",values:E?["left","center","right"]:["bottom","middle","top"],dflt:E?"center":"middle"}},"constraintoward");var z=w.type,I,B,k=[];for(I=0;I<o.length;I++)if(B=o[I],B!==a){var O=d[i(B)];O.type===z&&k.push(B)}var N=n(T,a);if(N){var _=[];for(I=0;I<k.length;I++)B=k[I],N[B]||_.push(B);k=_}var U=k.length,Y,J;U&&(f.matches||b.matches)&&(Y=m.coerce(f,w,{matches:{valType:"enumerated",values:k,dflt:k.indexOf(b.matches)!==-1?b.matches:void 0}},"matches"));var te=M&&!E?w.anchor:void 0;if(U&&!Y&&(f.scaleanchor||te)&&(J=m.coerce(f,w,{scaleanchor:{valType:"enumerated",values:k.concat([!1])}},"scaleanchor",te)),Y){w._matchGroup=l(C,a,Y,1);var ae=d[i(Y)],ce=s(d,w)/s(d,ae);E!==(Y.charAt(0)==="x")&&(ce=(E?"x":"y")+ce),l(T,a,Y,ce)}else f.matches&&o.indexOf(f.matches)!==-1&&m.warn("ignored "+w._name+'.matches: "'+f.matches+'" to avoid an infinite loop');if(J){var Q=y("scaleratio");Q||(Q=w.scaleratio=1),l(T,a,J,Q)}else f.scaleanchor&&o.indexOf(f.scaleanchor)!==-1&&m.warn("ignored "+w._name+'.scaleanchor: "'+f.scaleanchor+'" to avoid either an infinite loop and possibly inconsistent scaleratios, or because this axis declares a *matches* constraint.')}function s(f,w){var h=w.domain;return h||(h=f[i(w.overlaying)].domain),h[1]-h[0]}function n(f,w){for(var h=0;h<f.length;h++)if(f[h][w])return f[h];return null}function l(f,w,h,o){var d,M,T,C,x,S=n(f,w);S===null?(S={},S[w]=1,x=f.length,f.push(S)):x=f.indexOf(S);var b=Object.keys(S);for(d=0;d<f.length;d++)if(T=f[d],d!==x&&T[h]){var a=T[h];for(M=0;M<b.length;M++)C=b[M],T[C]=c(a,c(o,S[C]));f.splice(x,1);return}if(o!==1)for(M=0;M<b.length;M++){var E=b[M];S[E]=c(o,S[E])}S[h]=1}function c(f,w){var h="",o="",d,M;typeof f=="string"&&(h=f.match(/^[xy]*/)[0],d=h.length,f=+f.substr(d)),typeof w=="string"&&(o=w.match(/^[xy]*/)[0],M=o.length,w=+w.substr(M));var T=f*w;return!d&&!M?T:!d||!M||h.charAt(0)===o.charAt(0)?h+o+f*w:d===M?T:(d>M?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;T<M.length;T++){var C=M[T],x=f[C];if(typeof x=="string"){var S=x.match(/^[xy]*/)[0],b=S.length;x=+x.substr(b);for(var a=S.charAt(0)==="y"?o:1/o,E=0;E<b;E++)x*=a}d[C]=x}return d}V.enforce=function(w){var h=w._fullLayout,o=h._axisConstraintGroups||[],d,M,T,C,x,S,b,a;for(d=0;d<o.length;d++){T=u(o[d],h);var E=Object.keys(T),y=1/0,z=0,I=1/0,B={},k={},O=!1;for(M=0;M<E.length;M++)C=E[M],k[C]=x=h[i(C)],x._inputDomain?x.domain=x._inputDomain.slice():x._inputDomain=x.domain.slice(),x._inputRange||(x._inputRange=x.range.slice()),x.setScale(),B[C]=S=Math.abs(x._m)/T[C],y=Math.min(y,S),(x.constrain==="domain"||!x._constraintShrinkable)&&(I=Math.min(I,S)),delete x._constraintShrinkable,z=Math.max(z,S),x.constrain==="domain"&&(O=!0);if(!(y>p*z&&!O)){for(M=0;M<E.length;M++)if(C=E[M],S=B[C],x=k[C],b=x.constrain,S!==I||b==="domain")if(a=S/I,b==="range")A(x,a);else{var N=x._inputDomain,_=(x.domain[1]-x.domain[0])/(N[1]-N[0]),U=(x.r2l(x.range[1])-x.r2l(x.range[0]))/(x.r2l(x._inputRange[1])-x.r2l(x._inputRange[0]));if(a/=_,a*U<1){x.domain=x._input.domain=N.slice(),A(x,a);continue}if(U<1&&(x.range=x._input.range=x._inputRange.slice(),a*=U),x.autorange){var Y=x.r2l(x.range[0]),J=x.r2l(x.range[1]),te=(Y+J)/2,ae=te,ce=te,Q=Math.abs(J-te),Z=te-Q*a*1.0001,j=te+Q*a*1.0001,K=P.makePadFn(h,x,0),ee=P.makePadFn(h,x,1);g(x,a);var oe=Math.abs(x._m),q=P.concatExtremes(w,x),$=q.min,le=q.max,ie,he;for(he=0;he<$.length;he++)ie=$[he].val-K($[he])/oe,ie>Z&&ie<ae&&(ae=ie);for(he=0;he<le.length;he++)ie=le[he].val+ee(le[he])/oe,ie<j&&ie>ce&&(ce=ie);var me=(ce-ae)/(2*Q);a/=me,ae=x.l2r(ae),ce=x.l2r(ce),x.range=x._input.range=Y<J?[ae,ce]:[ce,ae]}g(x,a)}}}},V.getAxisGroup=function(w,h){for(var o=w._axisMatchGroups,d=0;d<o.length;d++){var M=o[d];if(M[h])return"g"+d}return h},V.clean=function(w,h){if(h._inputDomain){for(var o=!1,d=h._id,M=w._fullLayout._axisConstraintGroups,T=0;T<M.length;T++)if(M[T][d]){o=!0;break}(!o||h.constrain!=="domain")&&(h._input.domain=h.domain=h._inputDomain,delete h._inputDomain)}};function g(f,w){var h=f._inputDomain,o=t[f.constraintoward],d=h[0]+(h[1]-h[0])*o;f.domain=f._input.domain=[d+(h[0]-d)/w,d+(h[1]-d)/w],f.setScale()}},29323:function(G,V,e){var m=e(39898),P=e(71828),i=P.numberFormat,L=e(84267),A=e(38520),v=e(73972),p=P.strTranslate,t=e(63893),r=e(7901),s=e(91424),n=e(30211),l=e(89298),c=e(6964),u=e(28569),g=e(64505),f=g.selectingOrDrawing,w=g.freeMode,h=e(18783).FROM_TL,o=e(33306),d=e(61549).redrawReglTraces,M=e(74875),T=e(41675).getFromId,C=e(47322).prepSelect,x=e(47322).clearOutline,S=e(47322).selectOnClick,b=e(42449),a=e(85555),E=a.MINDRAG,y=a.MINZOOM,z=!0;function I(ie,he,me,Me,Te,Oe,Ne,Ee){var xe=ie._fullLayout._zoomlayer,Se=Ne+Ee==="nsew",Ue=(Ne+Ee).length===1,He,Fe,Ge,nt,qe,$e,et,ct,dt,pt,At,Mt,Vt,Je,De,Ie,ze,Pe,be,se,ye,Le,Be;me+=he.yaxis._shift;function ot(){if(He=he.xaxis,Fe=he.yaxis,dt=He._length,pt=Fe._length,et=He._offset,ct=Fe._offset,Ge={},Ge[He._id]=He,nt={},nt[Fe._id]=Fe,Ne&&Ee)for(var rr=he.overlays,zt=0;zt<rr.length;zt++){var fr=rr[zt].xaxis;Ge[fr._id]=fr;var dr=rr[zt].yaxis;nt[dr._id]=dr}qe=le(Ge),$e=le(nt),Vt=O(qe,Ee),Je=O($e,Ne),De=!Je&&!Vt,Mt=q(ie,ie._fullLayout._axisMatchGroups,Ge,nt),At=q(ie,ie._fullLayout._axisConstraintGroups,Ge,nt,Mt);var pr=At.isSubplotConstrained||Mt.isSubplotConstrained;Ie=Ee||pr,ze=Ne||pr;var vr=ie._fullLayout;Pe=vr._has("scattergl"),be=vr._has("splom"),se=vr._has("svg")}ot();var at=J(Je+Vt,ie._fullLayout.dragmode,Se),wt=k(he,Ne+Ee+"drag",at,me,Me,Te,Oe);if(De&&!Se)return wt.onmousedown=null,wt.style.pointerEvents="none",wt;var It={element:wt,gd:ie,plotinfo:he};It.prepFn=function(rr,zt,fr){var dr=It.dragmode,pr=ie._fullLayout.dragmode;pr!==dr&&(It.dragmode=pr),ot(),Le=ie._fullLayout._invScaleX,Be=ie._fullLayout._invScaleY,De||(Se?rr.shiftKey?pr==="pan"?pr="zoom":f(pr)||(pr="pan"):rr.ctrlKey&&(pr="pan"):pr="pan"),w(pr)?It.minDrag=1:It.minDrag=void 0,f(pr)?(It.xaxes=qe,It.yaxes=$e,C(rr,zt,fr,It,pr)):(It.clickFn=Gt,f(dr)&&Bt(),De||(pr==="zoom"?(It.moveFn=xt,It.doneFn=Ct,It.minDrag=1,lt(rr,zt,fr)):pr==="pan"&&(It.moveFn=or,It.doneFn=Dt))),ie._fullLayout._redrag=function(){var vr=ie._dragdata;if(vr&&vr.element===wt){var Hr=ie._fullLayout.dragmode;f(Hr)||(ot(),Ft([0,0,dt,pt]),It.moveFn(vr.dx,vr.dy))}}};function Bt(){It.plotinfo.selection=!1,x(ie)}function Gt(rr,zt){var fr=It.gd;if(fr._fullLayout._activeShapeIndex>=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||vr<Math.min(Math.max(pr*.6,E),y)?pr<E||!Vt?Hr():(ir.t=0,ir.b=pt,Yt="x",hr.attr("d",K(ir,Kt))):!Vt||pr<Math.min(vr*.6,y)?(ir.l=0,ir.r=dt,Yt="y",hr.attr("d",ee(ir,Lt))):(Yt="xy",hr.attr("d",oe(ir)));ir.w=ir.r-ir.l,ir.h=ir.b-ir.t,Yt&&(ut=!0),ie._dragged=ut,ce(br,hr,ir,yt,jt,_r),Tt(),ie.emit("plotly_relayouting",ye),jt=!0}function Tt(){ye={},(Yt==="xy"||Yt==="x")&&(_(qe,ir.l/dt,ir.r/dt,ye,At.xaxes),Er("x",ye)),(Yt==="xy"||Yt==="y")&&(_($e,(pt-ir.b)/pt,(pt-ir.t)/pt,ye,At.yaxes),Er("y",ye))}function Ct(){Tt(),Z(ie),Dt(),j(ie)}var St=[0,0,dt,pt],_t=null,Ht=a.REDRAWDELAY,$t=he.mainplot?ie._fullLayout._plots[he.mainplot]:he;function Qt(rr){if(!ie._context._scrollZoom.cartesian&&!ie._fullLayout._enablescrollzoom)return;if(Bt(),ie._transitioningWithDuration){rr.preventDefault(),rr.stopPropagation();return}ot(),clearTimeout(_t);var zt=-rr.deltaY;if(isFinite(zt)||(zt=rr.wheelDelta/10),!isFinite(zt)){P.log("Did not find wheel motion attributes: ",rr);return}var fr=Math.exp(-Math.min(Math.max(zt,-20),20)/200),dr=$t.draglayer.select(".nsewdrag").node().getBoundingClientRect(),pr=(rr.clientX-dr.left)/dr.width,vr=(dr.bottom-rr.clientY)/dr.height,Hr;function Ir(kr,pn,jr){if(kr.fixedrange)return;var In=P.simpleMap(kr.range,kr.r2l),Dn=In[0]+(In[1]-In[0])*pn;function xr(Ar){return kr.l2r(Dn+(Ar-Dn)*jr)}kr.range=In.map(xr)}if(Ie){for(Ee||(pr=.5),Hr=0;Hr<qe.length;Hr++)Ir(qe[Hr],pr,fr);Er("x"),St[2]*=fr,St[0]+=St[2]*pr*(1/fr-1)}if(ze){for(Ne||(vr=.5),Hr=0;Hr<$e.length;Hr++)Ir($e[Hr],vr,fr);Er("y"),St[3]*=fr,St[1]+=St[3]*(1-vr)*(1/fr-1)}Ft(St),Ye(),ie.emit("plotly_relayouting",ye),_t=setTimeout(function(){ie._fullLayout&&(St=[0,0,dt,pt],Dt())},Ht),rr.preventDefault()}Ne.length*Ee.length!==1&&$(wt,Qt);function or(rr,zt){if(rr=rr*Le,zt=zt*Be,ie._transitioningWithDuration)return;if(ie._fullLayout._replotting=!0,Vt==="ew"||Je==="ns"){var fr=Vt?-rr:0,dr=Je?-zt:0;if(Mt.isSubplotConstrained){if(Vt&&Je){var pr=(rr/dt-zt/pt)/2;rr=pr*dt,zt=-pr*pt,fr=-rr,dr=-zt}Je?fr=-dr*dt/pt:dr=-fr*pt/dt}Vt&&(U(qe,rr),Er("x")),Je&&(U($e,zt),Er("y")),Ft([fr,dr,dt,pt]),Ye(),ie.emit("plotly_relayouting",ye);return}function vr(xr,Ar,Or){for(var Nr=1-Ar,qr,vn,fn=0;fn<xr.length;fn++){var Tn=xr[fn];if(!Tn.fixedrange){qr=Tn,vn=Tn._rl[Nr]+(Tn._rl[Ar]-Tn._rl[Nr])/Y(Or/Tn._length);var Pn=Tn.l2r(vn);Pn!==!1&&Pn!==void 0&&(Tn.range[Ar]=Pn)}}return qr._length*(qr._rl[Ar]-vn)/(qr._rl[Ar]-qr._rl[Nr])}var Hr=Vt==="w"==(Je==="n")?1:-1;if(Vt&&Je&&(At.isSubplotConstrained||Mt.isSubplotConstrained)){var Ir=(rr/dt+Hr*zt/pt)/2;rr=Ir*dt,zt=Hr*Ir*pt}var kr,pn;if(Vt==="w"?rr=vr(qe,0,rr):Vt==="e"?rr=vr(qe,1,-rr):Vt||(rr=0),Je==="n"?zt=vr($e,1,zt):Je==="s"?zt=vr($e,0,-zt):Je||(zt=0),kr=Vt==="w"?rr:0,pn=Je==="n"?zt:0,At.isSubplotConstrained&&!Mt.isSubplotConstrained||Mt.isSubplotConstrained&&Vt&&Je&&Hr>0){var jr;if(Mt.isSubplotConstrained||!Vt&&Je.length===1){for(jr=0;jr<qe.length;jr++)qe[jr].range=qe[jr]._r.slice(),b(qe[jr],1-zt/pt);rr=zt*dt/pt,kr=rr/2}if(Mt.isSubplotConstrained||!Je&&Vt.length===1){for(jr=0;jr<$e.length;jr++)$e[jr].range=$e[jr]._r.slice(),b($e[jr],1-rr/dt);zt=rr*pt/dt,pn=zt/2}}(!Mt.isSubplotConstrained||!Je)&&Er("x"),(!Mt.isSubplotConstrained||!Vt)&&Er("y");var In=dt-rr,Dn=pt-zt;Mt.isSubplotConstrained&&!(Vt&&Je)&&(Vt?(pn=kr?0:rr*pt/dt,Dn=In*pt/dt):(kr=pn?0:zt*dt/pt,In=Dn*dt/pt)),Ft([kr,pn,In,Dn]),Ye(),ie.emit("plotly_relayouting",ye)}function Er(rr,zt){for(var fr=Mt.isSubplotConstrained?{x:$e,y:qe}[rr]:Mt[rr+"axes"],dr=Mt.isSubplotConstrained?{x:qe,y:$e}[rr]:[],pr=0;pr<fr.length;pr++){var vr=fr[pr],Hr=vr._id,Ir=Mt.xLinks[Hr]||Mt.yLinks[Hr],kr=dr[0]||Ge[Ir]||nt[Ir];kr&&(zt?(zt[vr._name+".range[0]"]=zt[kr._name+".range[0]"],zt[vr._name+".range[1]"]=zt[kr._name+".range[1]"]):vr.range=kr.range.slice())}}function Ye(){var rr=[],zt;function fr(Hr){for(zt=0;zt<Hr.length;zt++)Hr[zt].fixedrange||rr.push(Hr[zt]._id)}function dr(Hr,Ir){for(zt=0;zt<Hr.length;zt++){var kr=Hr[zt],pn=kr[Ir];!kr.fixedrange&&pn.tickmode==="sync"&&rr.push(pn._id)}}for(Ie&&(fr(qe),fr(At.xaxes),fr(Mt.xaxes),dr(he.overlays,"xaxis")),ze&&(fr($e),fr(At.yaxes),fr(Mt.yaxes),dr(he.overlays,"yaxis")),ye={},zt=0;zt<rr.length;zt++){var pr=rr[zt],vr=T(ie,pr);l.drawOne(ie,vr,{skipTitle:!0}),ye[vr._name+".range[0]"]=vr.range[0],ye[vr._name+".range[1]"]=vr.range[1]}l.redrawComponents(ie,rr)}function We(){if(!ie._transitioningWithDuration){var rr=ie._context.doubleClick,zt=[];Vt&&(zt=zt.concat(qe)),Je&&(zt=zt.concat($e)),Mt.xaxes&&(zt=zt.concat(Mt.xaxes)),Mt.yaxes&&(zt=zt.concat(Mt.yaxes));var fr={},dr,pr;if(rr==="reset+autosize")for(rr="autosize",pr=0;pr<zt.length;pr++){dr=zt[pr];var vr=dr._rangeInitial0,Hr=dr._rangeInitial1,Ir=vr!==void 0||Hr!==void 0;if(Ir&&(vr!==void 0&&vr!==dr.range[0]||Hr!==void 0&&Hr!==dr.range[1])||!Ir&&dr.autorange!==!0){rr="reset";break}}if(rr==="autosize")for(pr=0;pr<zt.length;pr++)dr=zt[pr],dr.fixedrange||(fr[dr._name+".autorange"]=!0);else if(rr==="reset"){for((Vt||At.isSubplotConstrained)&&(zt=zt.concat(At.xaxes)),Je&&!At.isSubplotConstrained&&(zt=zt.concat(At.yaxes)),At.isSubplotConstrained&&(Vt?Je||(zt=zt.concat($e)):zt=zt.concat(qe)),pr=0;pr<zt.length;pr++)if(dr=zt[pr],!dr.fixedrange){var kr=dr._name,pn=dr._autorangeInitial;dr._rangeInitial0===void 0&&dr._rangeInitial1===void 0?fr[kr+".autorange"]=!0:dr._rangeInitial0===void 0?(fr[kr+".autorange"]=pn,fr[kr+".range"]=[null,dr._rangeInitial1]):dr._rangeInitial1===void 0?(fr[kr+".range"]=[dr._rangeInitial0,null],fr[kr+".autorange"]=pn):fr[kr+".range"]=[dr._rangeInitial0,dr._rangeInitial1]}}ie.emit("plotly_doubleclick",null),v.call("_guiRelayout",ie,fr)}}function Dt(){Ft([0,0,dt,pt]),P.syncOrAsync([M.previousPromises,function(){ie._fullLayout._replotting=!1,v.call("_guiRelayout",ie,ye)}],ie)}function Ft(rr){var zt=ie._fullLayout,fr=zt._plots,dr=zt._subplots.cartesian,pr,vr,Hr,Ir;if(be&&v.subplotsRegistry.splom.drag(ie),Pe){for(pr=0;pr<dr.length;pr++)if(vr=fr[dr[pr]],Hr=vr.xaxis,Ir=vr.yaxis,vr._scene){var kr=P.simpleMap(Hr.range,Hr.r2l),pn=P.simpleMap(Ir.range,Ir.r2l);Hr.limitRange&&Hr.limitRange(),Ir.limitRange&&Ir.limitRange(),kr=Hr.range,pn=Ir.range,vr._scene.update({range:[kr[0],pn[0],kr[1],pn[1]]})}}if((be||Pe)&&(o(ie),d(ie)),se){var jr=rr[2]/He._length,In=rr[3]/Fe._length;for(pr=0;pr<dr.length;pr++){vr=fr[dr[pr]],Hr=vr.xaxis,Ir=vr.yaxis;var Dn=(Ie||Mt.isSubplotConstrained)&&!Hr.fixedrange&&Ge[Hr._id],xr=(ze||Mt.isSubplotConstrained)&&!Ir.fixedrange&&nt[Ir._id],Ar,Or,Nr,qr;if(Dn?(Ar=jr,Nr=Ee||Mt.isSubplotConstrained?rr[0]:lr(Hr,Ar)):Mt.xaHash[Hr._id]?(Ar=jr,Nr=rr[0]*Hr._length/He._length):Mt.yaHash[Hr._id]?(Ar=In,Nr=Je==="ns"?-rr[1]*Hr._length/Fe._length:lr(Hr,Ar,{n:"top",s:"bottom"}[Je])):(Ar=Zt(Hr,jr,In),Nr=nr(Hr,Ar)),Ar>1&&(Hr.maxallowed!==void 0&&Ie===(Hr.range[0]<Hr.range[1]?"e":"w")||Hr.minallowed!==void 0&&Ie===(Hr.range[0]<Hr.range[1]?"w":"e"))&&(Ar=1,Nr=0),xr?(Or=In,qr=Ne||Mt.isSubplotConstrained?rr[1]:lr(Ir,Or)):Mt.yaHash[Ir._id]?(Or=In,qr=rr[1]*Ir._length/Fe._length):Mt.xaHash[Ir._id]?(Or=jr,qr=Vt==="ew"?-rr[0]*Ir._length/He._length:lr(Ir,Or,{e:"right",w:"left"}[Vt])):(Or=Zt(Ir,jr,In),qr=nr(Ir,Or)),Or>1&&(Ir.maxallowed!==void 0&&ze===(Ir.range[0]<Ir.range[1]?"n":"s")||Ir.minallowed!==void 0&&ze===(Ir.range[0]<Ir.range[1]?"s":"n"))&&(Or=1,qr=0),!(!Ar&&!Or)){Ar||(Ar=1),Or||(Or=1);var vn=Hr._offset-Nr/Ar,fn=Ir._offset-qr/Or;vr.clipRect.call(s.setTranslate,Nr,qr).call(s.setScale,Ar,Or),vr.plot.call(s.setTranslate,vn,fn).call(s.setScale,1/Ar,1/Or),(Ar!==vr.xScaleFactor||Or!==vr.yScaleFactor)&&(s.setPointGroupScale(vr.zoomScalePts,Ar,Or),s.setTextPointsScale(vr.zoomScaleTxt,Ar,Or)),s.hideOutsideRangePoints(vr.clipOnAxisFalseTraces,vr),vr.xScaleFactor=Ar,vr.yScaleFactor=Or}}}}function Zt(rr,zt,fr){return rr.fixedrange?0:Ie&&At.xaHash[rr._id]?zt:ze&&(At.isSubplotConstrained?At.xaHash:At.yaHash)[rr._id]?fr:0}function nr(rr,zt){return zt?(rr.range=rr._r.slice(),b(rr,zt),lr(rr,zt)):0}function lr(rr,zt,fr){return rr._length*(1-zt)*h[fr||rr.constraintoward||"middle"]}return wt}function B(ie,he,me,Me){var Te=P.ensureSingle(ie.draglayer,he,me,function(Oe){Oe.classed("drag",!0).style({fill:"transparent","stroke-width":0}).attr("data-subplot",ie.id)});return Te.call(c,Me),Te.node()}function k(ie,he,me,Me,Te,Oe,Ne){var Ee=B(ie,"rect",he,me);return m.select(Ee).call(s.setRect,Me,Te,Oe,Ne),Ee}function O(ie,he){for(var me=0;me<ie.length;me++)if(!ie[me].fixedrange)return he;return""}function N(ie,he){var me=ie.range[he],Me=Math.abs(me-ie.range[1-he]),Te;return ie.type==="date"?me:ie.type==="log"?(Te=Math.ceil(Math.max(0,-Math.log(Me)/Math.LN10))+3,i("."+Te+"g")(Math.pow(10,me))):(Te=Math.floor(Math.log(Math.abs(me))/Math.LN10)-Math.floor(Math.log(Me)/Math.LN10)+4,i("."+String(Te)+"g")(me))}function _(ie,he,me,Me,Te){for(var Oe=0;Oe<ie.length;Oe++){var Ne=ie[Oe];if(!Ne.fixedrange)if(Ne.rangebreaks){var Ee=Ne._id.charAt(0)==="y",xe=Ee?1-he:he,Se=Ee?1-me:me;Me[Ne._name+".range[0]"]=Ne.l2r(Ne.p2l(xe*Ne._length)),Me[Ne._name+".range[1]"]=Ne.l2r(Ne.p2l(Se*Ne._length))}else{var Ue=Ne._rl[0],He=Ne._rl[1]-Ue;Me[Ne._name+".range[0]"]=Ne.l2r(Ue+He*he),Me[Ne._name+".range[1]"]=Ne.l2r(Ue+He*me)}}if(Te&&Te.length){var Fe=(he+(1-me))/2;_(Te,Fe,1-Fe,Me,[])}}function U(ie,he){for(var me=0;me<ie.length;me++){var Me=ie[me];if(!Me.fixedrange){if(Me.rangebreaks){var Te=0,Oe=Me._length,Ne=Me.p2l(Te+he)-Me.p2l(Te),Ee=Me.p2l(Oe+he)-Me.p2l(Oe),xe=(Ne+Ee)/2;Me.range=[Me.l2r(Me._rl[0]-xe),Me.l2r(Me._rl[1]-xe)]}else Me.range=[Me.l2r(Me._rl[0]-he/Me._m),Me.l2r(Me._rl[1]-he/Me._m)];Me.limitRange&&Me.limitRange()}}}function Y(ie){return 1-(ie>=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;nt<he.length;nt++){var qe=he[nt];for(xe in me)if(qe[xe]){for(Ue in qe)!(Te&&(Fe[Ue]||Ge[Ue]))&&!(Ue.charAt(0)==="x"?me:Me)[Ue]&&(Ne[Ue]=xe);for(Se in Me)!(Te&&(Fe[Se]||Ge[Se]))&&qe[Se]&&(Oe=!0)}for(Se in Me)if(qe[Se])for(He in qe)!(Te&&(Fe[He]||Ge[He]))&&!(He.charAt(0)==="x"?me:Me)[He]&&(Ee[He]=Se)}Oe&&(P.extendFlat(Ne,Ee),Ee={});var $e={},et=[];for(Ue in Ne){var ct=T(ie,Ue);et.push(ct),$e[ct._id]=ct}var dt={},pt=[];for(He in Ee){var At=T(ie,He);pt.push(At),dt[At._id]=At}return{xaHash:$e,yaHash:dt,xaxes:et,yaxes:pt,xLinks:Ne,yLinks:Ee,isSubplotConstrained:Oe}}function $(ie,he){if(!A)ie.onwheel!==void 0?ie.onwheel=he:ie.onmousewheel!==void 0?ie.onmousewheel=he:ie.isAddedWheelEvent||(ie.isAddedWheelEvent=!0,ie.addEventListener("wheel",he,{passive:!1}));else{var me=ie.onwheel!==void 0?"wheel":"mousewheel";ie._onwheel&&ie.removeEventListener(me,ie._onwheel),ie._onwheel=he,ie.addEventListener(me,he,{passive:!1})}}function le(ie){var he=[];for(var me in ie)he.push(ie[me]);return he}G.exports={makeDragBox:I,makeDragger:B,makeRectDragger:k,makeZoombox:te,makeCorners:ae,updateZoombox:ce,xyCorners:oe,transitionZoombox:Q,removeZoombox:Z,showDoubleClickNotifier:j,attachWheelEventHandler:$}},4305:function(G,V,e){var m=e(39898),P=e(30211),i=e(28569),L=e(6964),A=e(29323).makeDragBox,v=e(85555).DRAGGERSIZE;V.initInteractions=function(t){var r=t._fullLayout;if(t._context.staticPlot){m.select(t).selectAll(".drag").remove();return}if(!(!r._has("cartesian")&&!r._has("splom"))){var s=Object.keys(r._plots||{}).sort(function(l,c){if((r._plots[l].mainplot&&!0)===(r._plots[c].mainplot&&!0)){var u=l.split("y"),g=c.split("y");return u[0]===g[0]?Number(u[1]||1)-Number(g[1]||1):Number(u[0]||1)-Number(g[0]||1)}return r._plots[l].mainplot?1:-1});s.forEach(function(l){var c=r._plots[l],u=c.xaxis,g=c.yaxis;if(!c.mainplot){var f=A(t,c,u._offset,g._offset,u._length,g._length,"ns","ew");f.onmousemove=function(o){t._fullLayout._rehover=function(){t._fullLayout._hoversubplot===l&&t._fullLayout._plots[l]&&P.hover(t,o,l)},P.hover(t,o,l),t._fullLayout._lasthover=f,t._fullLayout._hoversubplot=l},f.onmouseout=function(o){t._dragging||(t._fullLayout._hoversubplot=null,i.unhover(t,o))},t._context.showAxisDragHandles&&(A(t,c,u._offset-v,g._offset-v,v,v,"n","w"),A(t,c,u._offset+u._length,g._offset-v,v,v,"n","e"),A(t,c,u._offset-v,g._offset+g._length,v,v,"s","w"),A(t,c,u._offset+u._length,g._offset+g._length,v,v,"s","e"))}if(t._context.showAxisDragHandles){if(l===u._mainSubplot){var w=u._mainLinePosition;u.side==="top"&&(w-=v),A(t,c,u._offset+u._length*.1,w,u._length*.8,v,"","ew"),A(t,c,u._offset,w,u._length*.1,v,"","w"),A(t,c,u._offset+u._length*.9,w,u._length*.1,v,"","e")}if(l===g._mainSubplot){var h=g._mainLinePosition;g.side!=="right"&&(h-=v),A(t,c,h,g._offset+g._length*.1,v,g._length*.8,"ns",""),A(t,c,h,g._offset+g._length*.9,v,g._length*.1,"s",""),A(t,c,h,g._offset,v,g._length*.1,"n","")}}});var n=r._hoverlayer.node();n.onmousemove=function(l){l.target=t._fullLayout._lasthover,P.hover(t,l,r._hoversubplot)},n.onclick=function(l){l.target=t._fullLayout._lasthover,P.click(t,l)},n.onmousedown=function(l){t._fullLayout._lasthover.onmousedown(l)},V.updateFx(t)}},V.updateFx=function(p){var t=p._fullLayout,r=t.dragmode==="pan"?"move":"crosshair";L(t._draggers,r)}},76325:function(G,V,e){var m=e(73972),P=e(71828),i=e(41675);G.exports=function(A){return function(p,t){var r=p[A];if(Array.isArray(r))for(var s=m.subplotsRegistry.cartesian,n=s.idRegex,l=t._subplots,c=l.xaxis,u=l.yaxis,g=l.cartesian,f=t._has("cartesian")||t._has("gl2d"),w=0;w<r.length;w++){var h=r[w];if(P.isPlainObject(h)){var o=i.cleanId(h.xref,"x",!1),d=i.cleanId(h.yref,"y",!1),M=n.x.test(o),T=n.y.test(d);if(M||T){f||P.pushUnique(t._basePlotModules,s);var C=!1;M&&c.indexOf(o)===-1&&(c.push(o),C=!0),T&&u.indexOf(d)===-1&&(u.push(d),C=!0),C&&M&&T&&g.push(o+d)}}}}}},93612:function(G,V,e){var m=e(39898),P=e(73972),i=e(71828),L=e(74875),A=e(91424),v=e(27659).a0,p=e(41675),t=e(85555),r=e(77922),s=i.ensureSingle;function n(w,h,o){return i.ensureSingle(w,h,o,function(d){d.datum(o)})}V.name="cartesian",V.attr=["xaxis","yaxis"],V.idRoot=["x","y"],V.idRegex=t.idRegex,V.attrRegex=t.attrRegex,V.attributes=e(89502),V.layoutAttributes=e(13838),V.supplyLayoutDefaults=e(86763),V.transitionAxes=e(66847),V.finalizeSubplots=function(w,h){var o=h._subplots,d=o.xaxis,M=o.yaxis,T=o.cartesian,C=T.concat(o.gl2d||[]),x={},S={},b,a,E;for(b=0;b<C.length;b++){var y=C[b].split("y");x[y[0]]=1,S["y"+y[1]]=1}for(b=0;b<d.length;b++)a=d[b],x[a]||(E=(w[p.id2name(a)]||{}).anchor,t.idRegex.y.test(E)||(E="y"),T.push(a+E),C.push(a+E),S[E]||(S[E]=1,i.pushUnique(M,E)));for(b=0;b<M.length;b++)E=M[b],S[E]||(a=(w[p.id2name(E)]||{}).anchor,t.idRegex.x.test(a)||(a="x"),T.push(a+E),C.push(a+E),x[a]||(x[a]=1,i.pushUnique(d,a)));if(!C.length){a="",E="";for(var z in w)if(t.attrRegex.test(z)){var I=z.charAt(0);I==="x"?(!a||+z.substr(5)<+a.substr(5))&&(a=z):(!E||+z.substr(5)<+E.substr(5))&&(E=z)}a=a?p.name2id(a):"x",E=E?p.name2id(E):"y",d.push(a),M.push(E),T.push(a+E)}},V.plot=function(w,h,o,d){var M=w._fullLayout,T=M._subplots.cartesian,C=w.calcdata,x;if(!Array.isArray(h))for(h=[],x=0;x<C.length;x++)h.push(x);for(x=0;x<T.length;x++){for(var S=T[x],b=M._plots[S],a=[],E,y=0;y<C.length;y++){var z=C[y],I=z[0].trace;I.xaxis+I.yaxis===S&&((h.indexOf(I.index)!==-1||I.carpet)&&(E&&E[0].trace.xaxis+E[0].trace.yaxis===S&&["tonextx","tonexty","tonext"].indexOf(I.fill)!==-1&&a.indexOf(E)===-1&&a.push(E),a.push(z)),E=z)}l(w,b,a,o,d)}};function l(w,h,o,d,M){for(var T=t.traceLayerClasses,C=w._fullLayout,x=C._modules,S,b,a,E=[],y=[],z=0;z<x.length;z++){S=x[z];var I=S.name,B=P.modules[I].categories;if(B.svg){var k=S.layerName||I+"layer",O=S.plot;b=v(o,O),a=b[0],o=b[1],a.length&&E.push({i:T.indexOf(k),className:k,plotMethod:O,cdModule:a}),B.zoomScale&&y.push("."+k)}}E.sort(function(U,Y){return U.i-Y.i});var N=h.plot.selectAll("g.mlayer").data(E,function(U){return U.className});if(N.enter().append("g").attr("class",function(U){return U.className}).classed("mlayer",!0).classed("rangeplot",h.isRangePlot),N.exit().remove(),N.order(),N.each(function(U){var Y=m.select(this),J=U.className;U.plotMethod(w,h,U.cdModule,Y,d,M),t.clipOnAxisFalseQuery.indexOf("."+J)===-1&&A.setClipUrl(Y,h.layerClipId,w)}),C._has("scattergl")&&(S=P.getModule("scattergl"),a=v(o,S)[0],S.plot(w,h,a)),!w._context.staticPlot&&(h._hasClipOnAxisFalse&&(h.clipOnAxisFalseTraces=h.plot.selectAll(t.clipOnAxisFalseQuery.join(",")).selectAll(".trace")),y.length)){var _=h.plot.selectAll(y.join(",")).selectAll(".trace");h.zoomScalePts=_.selectAll("path.point"),h.zoomScaleTxt=_.selectAll(".textpoint")}}V.clean=function(w,h,o,d){var M=d._plots||{},T=h._plots||{},C=d._subplots||{},x,S,b;if(d._hasOnlyLargeSploms&&!h._hasOnlyLargeSploms)for(b in M)x=M[b],x.plotgroup&&x.plotgroup.remove();var a=d._has&&d._has("gl"),E=h._has&&h._has("gl");if(a&&!E)for(b in M)x=M[b],x._scene&&x._scene.destroy();if(C.xaxis&&C.yaxis){var y=p.listIds({_fullLayout:d});for(S=0;S<y.length;S++){var z=y[S];h[p.id2name(z)]||d._infolayer.selectAll(".g-"+z+"title").remove()}}var I=d._has&&d._has("cartesian"),B=h._has&&h._has("cartesian");if(I&&!B)g(d._cartesianlayer.selectAll(".subplot"),d),d._defs.selectAll(".axesclip").remove(),delete d._axisConstraintGroups,delete d._axisMatchGroups;else if(C.cartesian)for(S=0;S<C.cartesian.length;S++){var k=C.cartesian[S];if(!T[k]){var O="."+k+",."+k+"-x,."+k+"-y";d._cartesianlayer.selectAll(O).remove(),f(k,d)}}},V.drawFramework=function(w){var h=w._fullLayout,o=c(w),d=h._cartesianlayer.selectAll(".subplot").data(o,String);d.enter().append("g").attr("class",function(M){return"subplot "+M[0]}),d.order(),d.exit().call(g,h),d.each(function(M){var T=M[0],C=h._plots[T];C.plotgroup=m.select(this),u(w,C),C.draglayer=s(h._draggers,"g",T)})},V.rangePlot=function(w,h,o){u(w,h),l(w,h,o),L.style(w)};function c(w){var h=w._fullLayout,o=h._subplots.cartesian,d=o.length,M,T,C,x,S,b,a=[],E=[];for(M=0;M<d;M++){C=o[M],x=h._plots[C],S=x.xaxis,b=x.yaxis;var y=S._mainAxis,z=b._mainAxis,I=y._id+z._id,B=h._plots[I];x.overlays=[],I!==C&&B?(x.mainplot=I,x.mainplotinfo=B,E.push(C)):(x.mainplot=void 0,x.mainplotinfo=void 0,a.push(C))}for(M=0;M<E.length;M++)C=E[M],x=h._plots[C],x.mainplotinfo.overlays.push(x);var k=a.concat(E),O=new Array(d);for(M=0;M<d;M++){C=k[M],x=h._plots[C],S=x.xaxis,b=x.yaxis;var N=[C,S.layer,b.layer,S.overlaying||"",b.overlaying||""];for(T=0;T<x.overlays.length;T++)N.push(x.overlays[T].id);O[M]=N}return O}function u(w,h){var o=h.plotgroup,d=h.id,M=t.layerValue2layerClass[h.xaxis.layer],T=t.layerValue2layerClass[h.yaxis.layer],C=w._fullLayout._hasOnlyLargeSploms;if(h.mainplot){var S=h.mainplotinfo,b=S.plotgroup,a=d+"-x",E=d+"-y";h.minorGridlayer=S.minorGridlayer,h.gridlayer=S.gridlayer,h.zerolinelayer=S.zerolinelayer,s(S.overlinesBelow,"path",a),s(S.overlinesBelow,"path",E),s(S.overaxesBelow,"g",a),s(S.overaxesBelow,"g",E),h.plot=s(S.overplot,"g",d),s(S.overlinesAbove,"path",a),s(S.overlinesAbove,"path",E),s(S.overaxesAbove,"g",a),s(S.overaxesAbove,"g",E),h.xlines=b.select(".overlines-"+M).select("."+a),h.ylines=b.select(".overlines-"+T).select("."+E),h.xaxislayer=b.select(".overaxes-"+M).select("."+a),h.yaxislayer=b.select(".overaxes-"+T).select("."+E)}else if(C)h.xlines=s(o,"path","xlines-above"),h.ylines=s(o,"path","ylines-above"),h.xaxislayer=s(o,"g","xaxislayer-above"),h.yaxislayer=s(o,"g","yaxislayer-above");else{var x=s(o,"g","layer-subplot");h.shapelayer=s(x,"g","shapelayer"),h.imagelayer=s(x,"g","imagelayer"),h.minorGridlayer=s(o,"g","minor-gridlayer"),h.gridlayer=s(o,"g","gridlayer"),h.zerolinelayer=s(o,"g","zerolinelayer"),s(o,"path","xlines-below"),s(o,"path","ylines-below"),h.overlinesBelow=s(o,"g","overlines-below"),s(o,"g","xaxislayer-below"),s(o,"g","yaxislayer-below"),h.overaxesBelow=s(o,"g","overaxes-below"),h.plot=s(o,"g","plot"),h.overplot=s(o,"g","overplot"),h.xlines=s(o,"path","xlines-above"),h.ylines=s(o,"path","ylines-above"),h.overlinesAbove=s(o,"g","overlines-above"),s(o,"g","xaxislayer-above"),s(o,"g","yaxislayer-above"),h.overaxesAbove=s(o,"g","overaxes-above"),h.xlines=o.select(".xlines-"+M),h.ylines=o.select(".ylines-"+T),h.xaxislayer=o.select(".xaxislayer-"+M),h.yaxislayer=o.select(".yaxislayer-"+T)}C||(n(h.minorGridlayer,"g",h.xaxis._id),n(h.minorGridlayer,"g",h.yaxis._id),h.minorGridlayer.selectAll("g").map(function(y){return y[0]}).sort(p.idSort),n(h.gridlayer,"g",h.xaxis._id),n(h.gridlayer,"g",h.yaxis._id),h.gridlayer.selectAll("g").map(function(y){return y[0]}).sort(p.idSort)),h.xlines.style("fill","none").classed("crisp",!0),h.ylines.style("fill","none").classed("crisp",!0)}function g(w,h){if(w){var o={};w.each(function(S){var b=S[0],a=m.select(this);a.remove(),f(b,h),o[b]=!0});for(var d in h._plots)for(var M=h._plots[d],T=M.overlays||[],C=0;C<T.length;C++){var x=T[C];o[x.id]&&x.plot.selectAll(".trace").remove()}}}function f(w,h){h._draggers.selectAll("g."+w).remove(),h._defs.select("#clip"+h._uid+w+"plot").remove()}V.toSVG=function(w){var h=w._fullLayout._glimages,o=m.select(w).selectAll(".svg-container"),d=o.filter(function(T,C){return C===o.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function M(){var T=this,C=T.toDataURL("image/png"),x=h.append("svg:image");x.attr({xmlns:r.svg,"xlink:href":C,preserveAspectRatio:"none",x:0,y:0,width:T.style.width,height:T.style.height})}d.each(M)},V.updateFx=e(4305).updateFx},13838:function(G,V,e){var m=e(41940),P=e(22399),i=e(79952).P,L=e(1426).extendFlat,A=e(44467).templatedArray,v=e(12663).descriptionWithDates,p=e(50606).ONEDAY,t=e(85555),r=t.HOUR_PATTERN,s=t.WEEKDAY_PATTERN,n={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0}},l=L({},n,{values:n.values.slice().concat(["sync"])});function c(S){return{valType:"integer",min:0,dflt:S?5:0,editType:"ticks"}}var u={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},g={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},f={valType:"data_array",editType:"ticks"},w={valType:"enumerated",values:["outside","inside",""],editType:"ticks"};function h(S){var b={valType:"number",min:0,editType:"ticks"};return S||(b.dflt=5),b}function o(S){var b={valType:"number",min:0,editType:"ticks"};return S||(b.dflt=1),b}var d={valType:"color",dflt:P.defaultLine,editType:"ticks"},M={valType:"color",dflt:P.lightLine,editType:"ticks"};function T(S){var b={valType:"number",min:0,editType:"ticks"};return S||(b.dflt=1),b}var C=L({},i,{editType:"ticks"}),x={valType:"boolean",editType:"ticks"};G.exports={visible:{valType:"boolean",editType:"plot"},color:{valType:"color",dflt:P.defaultLine,editType:"ticks"},title:{text:{valType:"string",editType:"ticks"},font:m({editType:"ticks"}),standoff:{valType:"number",min:0,editType:"ticks"},editType:"ticks"},type:{valType:"enumerated",values:["-","linear","log","date","category","multicategory"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},autorange:{valType:"enumerated",values:[!0,!1,"reversed","min reversed","max reversed","min","max"],dflt:!0,editType:"axrange",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},autorangeoptions:{minallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},clipmin:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},clipmax:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},include:{valType:"any",arrayOk:!0,editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},editType:"plot"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"plot"},range:{valType:"info_array",items:[{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0},{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0}],editType:"axrange",impliedEdits:{autorange:!1},anim:!0},minallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},fixedrange:{valType:"boolean",dflt:!1,editType:"calc"},scaleanchor:{valType:"enumerated",values:[t.idRegex.x.toString(),t.idRegex.y.toString(),!1],editType:"plot"},scaleratio:{valType:"number",min:0,dflt:1,editType:"plot"},constrain:{valType:"enumerated",values:["range","domain"],editType:"plot"},constraintoward:{valType:"enumerated",values:["left","center","right","top","middle","bottom"],editType:"plot"},matches:{valType:"enumerated",values:[t.idRegex.x.toString(),t.idRegex.y.toString()],editType:"calc"},rangebreaks:A("rangebreak",{enabled:{valType:"boolean",dflt:!0,editType:"calc"},bounds:{valType:"info_array",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}],editType:"calc"},pattern:{valType:"enumerated",values:[s,r,""],editType:"calc"},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"}},dvalue:{valType:"number",editType:"calc",min:0,dflt:p},editType:"calc"}),tickmode:l,nticks:c(),tick0:u,dtick:g,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks"},tickvals:f,ticktext:{valType:"data_array",editType:"ticks"},ticks:w,tickson:{valType:"enumerated",values:["labels","boundaries"],dflt:"labels",editType:"ticks"},ticklabelmode:{valType:"enumerated",values:["instant","period"],dflt:"instant",editType:"ticks"},ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside",editType:"calc"},ticklabeloverflow:{valType:"enumerated",values:["allow","hide past div","hide past domain"],editType:"calc"},mirror:{valType:"enumerated",values:[!0,"ticks",!1,"all","allticks"],dflt:!1,editType:"ticks+layoutstyle"},ticklen:h(),tickwidth:o(),tickcolor:d,showticklabels:{valType:"boolean",dflt:!0,editType:"ticks"},labelalias:{valType:"any",dflt:!1,editType:"ticks"},automargin:{valType:"flaglist",flags:["height","width","left","right","top","bottom"],extras:[!0,!1],dflt:!1,editType:"ticks"},showspikes:{valType:"boolean",dflt:!1,editType:"modebar"},spikecolor:{valType:"color",dflt:null,editType:"none"},spikethickness:{valType:"number",dflt:3,editType:"none"},spikedash:L({},i,{dflt:"dash",editType:"none"}),spikemode:{valType:"flaglist",flags:["toaxis","across","marker"],dflt:"toaxis",editType:"none"},spikesnap:{valType:"enumerated",values:["data","cursor","hovered data"],dflt:"hovered data",editType:"none"},tickfont:m({editType:"ticks"}),tickangle:{valType:"angle",dflt:"auto",editType:"ticks"},tickprefix:{valType:"string",dflt:"",editType:"ticks"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},ticksuffix:{valType:"string",dflt:"",editType:"ticks"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B"],dflt:"B",editType:"ticks"},minexponent:{valType:"number",dflt:3,min:0,editType:"ticks"},separatethousands:{valType:"boolean",dflt:!1,editType:"ticks"},tickformat:{valType:"string",dflt:"",editType:"ticks",description:v("tick label")},tickformatstops:A("tickformatstop",{enabled:{valType:"boolean",dflt:!0,editType:"ticks"},dtickrange:{valType:"info_array",items:[{valType:"any",editType:"ticks"},{valType:"any",editType:"ticks"}],editType:"ticks"},value:{valType:"string",dflt:"",editType:"ticks"},editType:"ticks"}),hoverformat:{valType:"string",dflt:"",editType:"none",description:v("hover text")},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle"},linecolor:{valType:"color",dflt:P.defaultLine,editType:"layoutstyle"},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle"},showgrid:x,gridcolor:M,gridwidth:T(),griddash:C,zeroline:{valType:"boolean",editType:"ticks"},zerolinecolor:{valType:"color",dflt:P.defaultLine,editType:"ticks"},zerolinewidth:{valType:"number",dflt:1,editType:"ticks"},showdividers:{valType:"boolean",dflt:!0,editType:"ticks"},dividercolor:{valType:"color",dflt:P.defaultLine,editType:"ticks"},dividerwidth:{valType:"number",dflt:1,editType:"ticks"},anchor:{valType:"enumerated",values:["free",t.idRegex.x.toString(),t.idRegex.y.toString()],editType:"plot"},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot"},overlaying:{valType:"enumerated",values:["free",t.idRegex.x.toString(),t.idRegex.y.toString()],editType:"plot"},minor:{tickmode:n,nticks:c("minor"),tick0:u,dtick:g,tickvals:f,ticks:w,ticklen:h("minor"),tickwidth:o("minor"),tickcolor:d,gridcolor:M,gridwidth:T("minor"),griddash:C,showgrid:x,editType:"ticks"},layer:{valType:"enumerated",values:["above traces","below traces"],dflt:"above traces",editType:"plot"},domain:{valType:"info_array",items:[{valType:"number",min:0,max:1,editType:"plot"},{valType:"number",min:0,max:1,editType:"plot"}],dflt:[0,1],editType:"plot"},position:{valType:"number",min:0,max:1,dflt:0,editType:"plot"},autoshift:{valType:"boolean",dflt:!1,editType:"plot"},shift:{valType:"number",editType:"plot"},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array","total ascending","total descending","min ascending","min descending","max ascending","max descending","sum ascending","sum descending","mean ascending","mean descending","median ascending","median descending"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},uirevision:{valType:"any",editType:"none"},editType:"calc",_deprecated:{autotick:{valType:"boolean",editType:"ticks"},title:{valType:"string",editType:"ticks"},titlefont:m({editType:"ticks"})}}},86763:function(G,V,e){var m=e(71828),P=e(7901),i=e(23469).isUnifiedHover,L=e(98212),A=e(44467),v=e(10820),p=e(13838),t=e(951),r=e(71453),s=e(99082),n=e(52830),l=e(41675),c=l.id2name,u=l.name2id,g=e(85555).AX_ID_PATTERN,f=e(73972),w=f.traceIs,h=f.getComponentMethod;function o(d,M,T){Array.isArray(d[M])?d[M].push(T):d[M]=[T]}G.exports=function(M,T,C){var x=T.autotypenumbers,S={},b={},a={},E={},y={},z={},I={},B={},k={},O={},N,_;for(N=0;N<C.length;N++){var U=C[N];if(!(!w(U,"cartesian")&&!w(U,"gl2d"))){var Y;if(U.xaxis)Y=c(U.xaxis),o(S,Y,U);else if(U.xaxes)for(_=0;_<U.xaxes.length;_++)o(S,c(U.xaxes[_]),U);var J;if(U.yaxis)J=c(U.yaxis),o(S,J,U);else if(U.yaxes)for(_=0;_<U.yaxes.length;_++)o(S,c(U.yaxes[_]),U);if(U.type==="funnel"?U.orientation==="h"?(Y&&(b[Y]=!0),J&&(I[J]=!0)):J&&(a[J]=!0):U.type==="image"?(J&&(B[J]=!0),Y&&(B[Y]=!0)):(J&&(y[J]=!0,z[J]=!0),(!w(U,"carpet")||U.type==="carpet"&&!U._cheater)&&Y&&(E[Y]=!0)),U.type==="carpet"&&U._cheater&&Y&&(b[Y]=!0),w(U,"2dMap")&&(k[Y]=!0,k[J]=!0),w(U,"oriented")){var te=U.orientation==="h"?J:Y;O[te]=!0}}}var ae=T._subplots,ce=ae.xaxis,Q=ae.yaxis,Z=m.simpleMap(ce,c),j=m.simpleMap(Q,c),K=Z.concat(j),ee=P.background;ce.length&&Q.length&&(ee=m.coerce(M,T,v,"plot_bgcolor"));var oe=P.combine(ee,T.paper_bgcolor),q,$,le,ie,he;function me(){var Le=S[q]||[];he._traceIndices=Le.map(function(Be){return Be._expandedIndex}),he._annIndices=[],he._shapeIndices=[],he._selectionIndices=[],he._imgIndices=[],he._subplotsWith=[],he._counterAxes=[],he._name=he._attr=q,he._id=$}function Me(Le,Be){return m.coerce(ie,he,p,Le,Be)}function Te(Le,Be){return m.coerce2(ie,he,p,Le,Be)}function Oe(Le){return Le==="x"?Q:ce}function Ne(Le,Be){for(var ot=Le==="x"?Z:j,at=[],wt=0;wt<ot.length;wt++){var It=ot[wt];It!==Be&&!(M[It]||{}).overlaying&&at.push(u(It))}return at}var Ee={x:Oe("x"),y:Oe("y")},xe=Ee.x.concat(Ee.y),Se={},Ue=[];function He(){var Le=ie.matches;g.test(Le)&&xe.indexOf(Le)===-1&&(Se[Le]=ie.type,Ue=Object.keys(Se))}var Fe=L(M,T),Ge=i(Fe);for(N=0;N<K.length;N++){q=K[N],$=u(q),le=q.charAt(0),m.isPlainObject(M[q])||(M[q]={}),ie=M[q],he=A.newContainer(T,q,le+"axis"),me();var nt=le==="x"&&!E[q]&&b[q]||le==="y"&&!y[q]&&a[q],qe=le==="y"&&(!z[q]&&I[q]||B[q]),$e={hasMinor:!0,letter:le,font:T.font,outerTicks:k[q],showGrid:!O[q],data:S[q]||[],bgColor:oe,calendar:T.calendar,automargin:!0,visibleDflt:nt,reverseDflt:qe,autotypenumbersDflt:x,splomStash:((T._splomAxes||{})[le]||{})[$]};Me("uirevision",T.uirevision),t(ie,he,Me,$e),r(ie,he,Me,$e,T);var et=Ge&&le===Fe.charAt(0),ct=Te("spikecolor",Ge?he.color:void 0),dt=Te("spikethickness",Ge?1.5:void 0),pt=Te("spikedash",Ge?"dot":void 0),At=Te("spikemode",Ge?"across":void 0),Mt=Te("spikesnap"),Vt=Me("showspikes",!!et||!!ct||!!dt||!!pt||!!At||!!Mt);Vt||(delete he.spikecolor,delete he.spikethickness,delete he.spikedash,delete he.spikemode,delete he.spikesnap);var Je=c(ie.overlaying),De=[0,1];if(T[Je]!==void 0){var Ie=c(T[Je].anchor);T[Ie]!==void 0&&(De=T[Ie].domain)}n(ie,he,Me,{letter:le,counterAxes:Ee[le],overlayableAxes:Ne(le,q),grid:T.grid,overlayingDomain:De}),Me("title.standoff"),He(),he._input=ie}for(N=0;N<Ue.length;){$=Ue[N++],q=c($),le=q.charAt(0),m.isPlainObject(M[q])||(M[q]={}),ie=M[q],he=A.newContainer(T,q,le+"axis"),me();var ze={letter:le,font:T.font,outerTicks:k[q],showGrid:!O[q],data:[],bgColor:oe,calendar:T.calendar,automargin:!0,visibleDflt:!1,reverseDflt:!1,autotypenumbersDflt:x,splomStash:((T._splomAxes||{})[le]||{})[$]};Me("uirevision",T.uirevision),he.type=Se[$]||"linear",r(ie,he,Me,ze,T),n(ie,he,Me,{letter:le,counterAxes:Ee[le],overlayableAxes:Ne(le,q),grid:T.grid}),Me("fixedrange"),He(),he._input=ie}var Pe=h("rangeslider","handleDefaults"),be=h("rangeselector","handleDefaults");for(N=0;N<Z.length;N++)q=Z[N],ie=M[q],he=T[q],Pe(M,T,q),he.type==="date"&&be(ie,he,T,j,he.calendar),Me("fixedrange");for(N=0;N<j.length;N++){q=j[N],ie=M[q],he=T[q];var se=T[c(he.anchor)],ye=h("rangeslider","isVisible")(se);Me("fixedrange",ye)}s.handleDefaults(M,T,{axIds:xe.concat(Ue).sort(l.idSort),axHasImage:B})}},92128:function(G,V,e){var m=e(84267).mix,P=e(22399),i=e(71828);G.exports=function(A,v,p,t){t=t||{};var r=t.dfltColor;function s(a,E){return i.coerce2(A,v,t.attributes,a,E)}var n=s("linecolor",r),l=s("linewidth"),c=p("showline",t.showLine||!!n||!!l);c||(delete v.linecolor,delete v.linewidth);var u=m(r,t.bgColor,t.blend||P.lightFraction).toRgbString(),g=s("gridcolor",u),f=s("gridwidth"),w=s("griddash"),h=p("showgrid",t.showGrid||!!g||!!f||!!w);if(h||(delete v.gridcolor,delete v.gridwidth,delete v.griddash),t.hasMinor){var o=m(v.gridcolor,t.bgColor,67).toRgbString(),d=s("minor.gridcolor",o),M=s("minor.gridwidth",v.gridwidth||1),T=s("minor.griddash",v.griddash||"solid"),C=p("minor.showgrid",!!d||!!M||!!T);C||(delete v.minor.gridcolor,delete v.minor.gridwidth,delete v.minor.griddash)}if(!t.noZeroLine){var x=s("zerolinecolor",r),S=s("zerolinewidth"),b=p("zeroline",t.showGrid||!!x||!!S);b||(delete v.zerolinecolor,delete v.zerolinewidth)}}},52830:function(G,V,e){var m=e(92770),P=e(71828);G.exports=function(L,A,v,p){var t=p.counterAxes||[],r=p.overlayableAxes||[],s=p.letter,n=p.grid,l=p.overlayingDomain,c,u,g,f,w,h;n&&(u=n._domains[s][n._axisMap[A._id]],c=n._anchors[A._id],u&&(g=n[s+"side"].split(" ")[0],f=n.domain[s][g==="right"||g==="top"?1:0])),u=u||[0,1],c=c||(m(L.position)?"free":t[0]||"free"),g=g||(s==="x"?"bottom":"left"),f=f||0,w=0,h=!1;var o=P.coerce(L,A,{anchor:{valType:"enumerated",values:["free"].concat(t),dflt:c}},"anchor"),d=P.coerce(L,A,{side:{valType:"enumerated",values:s==="x"?["bottom","top"]:["left","right"],dflt:g}},"side");if(o==="free"){if(s==="y"){var M=v("autoshift");M&&(f=d==="left"?l[0]:l[1],h=A.automargin?A.automargin:!0,w=d==="left"?-3:3),v("shift",w)}v("position",f)}v("automargin",h);var T=!1;if(r.length&&(T=P.coerce(L,A,{overlaying:{valType:"enumerated",values:[!1].concat(r),dflt:!1}},"overlaying")),!T){var C=v("domain",u);C[0]>C[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;q<ee;q++){var $=(K[0]||[])[q],le=(K[1]||[])[q];oe[q]=U([$,le])}return oe}function U(K){if(a._categoriesMap)return a._categoriesMap[K]}function Y(K){var ee=U(K);if(ee!==void 0)return ee;if(A(K))return+K}function J(K){return A(K)?+K:U(K)}function te(K,ee,oe){return m.round(oe+ee*K,2)}function ae(K,ee,oe){return(K-oe)/ee}var ce=function(ee){return A(ee)?te(ee,a._m,a._b):c},Q=function(K){return ae(K,a._m,a._b)};if(a.rangebreaks){var Z=z==="y";ce=function(K){if(!A(K))return c;var ee=a._rangebreaks.length;if(!ee)return te(K,a._m,a._b);var oe=Z;a.range[0]>a.range[1]&&(oe=!oe);for(var q=oe?-1:1,$=q*K,le=0,ie=0;ie<ee;ie++){var he=q*a._rangebreaks[ie].min,me=q*a._rangebreaks[ie].max;if($<he)break;if($>me)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;q<ee&&!(K<a._rangebreaks[q].pmin);q++)K>a._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;oe<ee.length;oe++){var Me=K[ee[oe]];if(z in Me){var Te=Me[z],Oe=Me._length||i.minRowLength(Te);if(s(Te[0])&&s(Te[1]))for(q=0;q<Oe;q++){var Ne=Te[0][q],Ee=Te[1][q];S(Ne)&&S(Ee)&&(me.push([Ne,Ee]),Ne in he[0][1]||(he[0][1][Ne]=he[0][0]++),Ee in he[1][1]||(he[1][1][Ee]=he[1][0]++))}}}for(me.sort(function(xe,Se){var Ue=he[0][1],He=Ue[xe[0]]-Ue[Se[0]];if(He)return He;var Fe=he[1][1];return Fe[xe[1]]-Fe[Se[1]]}),oe=0;oe<me.length;oe++)N(me[oe])}),a.fraction2r=function(K){var ee=a.r2l(a.range[0]),oe=a.r2l(a.range[1]);return a.l2r(ee+K*(oe-ee))},a.r2fraction=function(K){var ee=a.r2l(a.range[0]),oe=a.r2l(a.range[1]);return(a.r2l(K)-ee)/(oe-ee)},a.limitRange=function(K){var ee=a.minallowed,oe=a.maxallowed;if(!(ee===void 0&&oe===void 0)){K||(K="range");var q=i.nestedProperty(a,K).get(),$=i.simpleMap(q,a.r2l),le=$[1]<$[0];le&&$.reverse();var ie=i.simpleMap([ee,oe],a.r2l);ee!==void 0&&$[0]<ie[0]&&(q[le?1:0]=ee),oe!==void 0&&$[1]>ie[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;me<a._rangebreaks.length;me++)Me=a._rangebreaks[me],a._lBreaks+=Math.abs(Me.max-Me.min);var Te=he;le>ie&&(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<a._rangebreaks.length;me++)Me=a._rangebreaks[me],a._B.push(a._B[a._B.length-1]-Oe*a._m2*(Me.max-Me.min));for(me=0;me<a._rangebreaks.length;me++)Me=a._rangebreaks[me],Me.pmin=ce(Me.min),Me.pmax=ce(Me.max)}}if(!isFinite(a._m)||!isFinite(a._b)||a._length<0)throw E._replotting=!1,new Error("Something went wrong with axis scaling")},a.maskBreaks=function(K){var ee=a.rangebreaks||[],oe,q,$,le,ie;ee._cachedPatterns||(ee._cachedPatterns=ee.map(function(Ue){return Ue.enabled&&Ue.bounds?i.simpleMap(Ue.bounds,Ue.pattern?v:a.d2c):null})),ee._cachedValues||(ee._cachedValues=ee.map(function(Ue){return Ue.enabled&&Ue.values?i.simpleMap(Ue.values,a.d2c).sort(i.sorterAsc):null}));for(var he=0;he<ee.length;he++){var me=ee[he];if(me.enabled){if(me.bounds){var Me=me.pattern;switch(oe=ee._cachedPatterns[he],q=oe[0],$=oe[1],Me){case C:ie=new Date(K),le=ie.getUTCDay(),q>$&&($+=7,le<q&&(le+=7));break;case T:ie=new Date(K);var Te=ie.getUTCHours(),Oe=ie.getUTCMinutes(),Ne=ie.getUTCSeconds(),Ee=ie.getUTCMilliseconds();le=Te+(Oe/60+Ne/3600+Ee/36e5),q>$&&($+=24,le<q&&(le+=24));break;case"":le=K;break}if(le>=q&&le<$)return c}else for(var xe=ee._cachedValues[he],Se=0;Se<xe.length;Se++)if(q=xe[Se],$=q+me.dvalue,K>=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<ie.length;qe++){var $e=ie[qe];Fe<$e.max&&Ge>=$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<he.length;oe++){var Me=he[oe];if(Me.enabled)if(Me.bounds){var Te=K,Oe=ee;Me.pattern&&(Te=Math.floor(Te)),q=i.simpleMap(Me.bounds,Me.pattern?v:a.r2l),$=q[0],le=q[1];var Ne=new Date(Te),Ee,xe;switch(Me.pattern){case C:xe=g,Ee=((le<$?7:0)+(le-$))*f,Te+=$*f-(Ne.getUTCDay()*f+Ne.getUTCHours()*w+Ne.getUTCMinutes()*h+Ne.getUTCSeconds()*o+Ne.getUTCMilliseconds());break;case T:xe=f,Ee=((le<$?24:0)+(le-$))*w,Te+=$*w-(Ne.getUTCHours()*w+Ne.getUTCMinutes()*h+Ne.getUTCSeconds()*o+Ne.getUTCMilliseconds());break;default:Te=Math.min(q[0],q[1]),Oe=Math.max(q[0],q[1]),xe=Oe-Te,Ee=xe}for(var Se=Te;Se<Oe;Se+=xe)me(Se,Se+Ee)}else for(var Ue=i.simpleMap(Me.values,a.d2c),He=0;He<Ue.length;He++)$=Ue[He],le=$+Me.dvalue,me($,le)}return ie.sort(function(Fe,Ge){return Fe.min-Ge.min}),ie},a.makeCalcdata=function(K,ee,oe){var q,$,le,ie,he=a.type,me=he==="date"&&K[ee+"calendar"];if(ee in K){if(q=K[ee],ie=K._length||i.minRowLength(q),i.isTypedArray(q)&&(he==="linear"||he==="log")){if(ie===q.length)return q;if(q.subarray)return q.subarray(0,ie)}if(he==="multicategory")return _(q,ie);for($=new Array(ie),le=0;le<ie;le++)$[le]=a.d2c(q[le],0,me,oe)}else{var Me=ee+"0"in K?a.d2c(K[ee+"0"],0,me):0,Te=K["d"+ee]?Number(K["d"+ee]):1;for(q=K[{x:"y",y:"x"}[ee]],ie=K._length||q.length,$=new Array(ie),le=0;le<ie;le++)$[le]=Me+le*Te}if(a.rangebreaks)for(le=0;le<ie;le++)$[le]=a.maskBreaks($[le]);return $},a.isValidRange=function(K,ee){return Array.isArray(K)&&K.length===2&&(ee&&K[0]===null||A(a.r2l(K[0])))&&(ee&&K[1]===null||A(a.r2l(K[1])))},a.getAutorangeDflt=function(K,ee){var oe=!a.isValidRange(K,"nullOk");return oe&&ee&&ee.reverseDflt?oe="reversed":K&&(K[0]===null&&K[1]===null?oe=!0:K[0]===null&&K[1]!==null?oe="min":K[0]!==null&&K[1]===null&&(oe="max")),oe},a.isReversed=function(){var K=a.autorange;return K==="reversed"||K==="min reversed"||K==="max reversed"},a.isPtWithinRange=function(K,ee){var oe=a.c2l(K[z],null,ee),q=a.r2l(a.range[0]),$=a.r2l(a.range[1]);return q<$?q<=oe&&oe<=$:$<=oe&&oe<=q},a._emptyCategories=function(){a._categories=[],a._categoriesMap={}},a.clearCalc=function(){var K=a._matchGroup;if(K){var ee=null,oe=null;for(var q in K){var $=E[d.id2name(q)];if($._categories){ee=$._categories,oe=$._categoriesMap;break}}ee&&oe?(a._categories=ee,a._categoriesMap=oe):a._emptyCategories()}else a._emptyCategories();if(a._initialCategories)for(var le=0;le<a._initialCategories.length;le++)N(a._initialCategories[le])},a.sortByInitialCategories=function(){var K=[];if(a._emptyCategories(),a._initialCategories)for(var ee=0;ee<a._initialCategories.length;ee++)N(a._initialCategories[ee]);K=K.concat(a._traceIndices);var oe=a._matchGroup;for(var q in oe)if(y!==q){var $=E[d.id2name(q)];$._categories=a._categories,$._categoriesMap=a._categoriesMap,K=K.concat($._traceIndices)}return K};var j=E._d3locale;a.type==="date"&&(a._dateFormat=j?j.timeFormat:P,a._extraFormat=E._extraFormat),a._separators=E.separators,a._numFormat=j?j.numberFormat:L,delete a._minDtick,delete a._forceTick0}},59652:function(G){G.exports=function(e){var m=["showexponent","showtickprefix","showticksuffix"],P=m.filter(function(L){return e[L]!==void 0}),i=function(L){return e[L]===e[P[0]]};if(P.every(i)||P.length===1)return e[P[0]]}},96115:function(G,V,e){var m=e(71828),P=e(7901).contrast,i=e(13838),L=e(59652),A=e(85501);G.exports=function(t,r,s,n,l){l||(l={});var c=s("labelalias");m.isPlainObject(c)||delete r.labelalias;var u=L(t),g=s("showticklabels");if(g){var f=l.font||{},w=r.color,h=r.ticklabelposition||"",o=h.indexOf("inside")!==-1?P(l.bgColor):w&&w!==i.color.dflt?w:f.color;if(m.coerceFont(s,"tickfont",{family:f.family,size:f.size,color:o}),!l.noTicklabelstep&&n!=="multicategory"&&n!=="log"&&s("ticklabelstep"),l.noAng||s("tickangle"),n!=="category"){var d=s("tickformat");A(t,r,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:v}),r.tickformatstops.length||delete r.tickformatstops,!l.noExp&&!d&&n!=="date"&&(s("showexponent",u),s("exponentformat"),s("minexponent"),s("separatethousands"))}}};function v(p,t){function r(n,l){return m.coerce(p,t,i.tickformatstops,n,l)}var s=r("enabled");s&&(r("dtickrange"),r("value"))}},38701:function(G,V,e){var m=e(71828),P=e(13838);G.exports=function(L,A,v,p){var t=p.isMinor,r=t?L.minor||{}:L,s=t?A.minor:A,n=t?P.minor:P,l=t?"minor.":"",c=m.coerce2(r,s,n,"ticklen",t?(A.ticklen||5)*.6:void 0),u=m.coerce2(r,s,n,"tickwidth",t?A.tickwidth||1:void 0),g=m.coerce2(r,s,n,"tickcolor",(t?A.tickcolor:void 0)||s.color),f=v(l+"ticks",!t&&p.outerTicks||c||u||g?"outside":"");f||(delete s.ticklen,delete s.tickwidth,delete s.tickcolor)}},26218:function(G,V,e){var m=e(66287),P=e(71828).isArrayOrTypedArray;G.exports=function(L,A,v,p,t){t||(t={});var r=t.isMinor,s=r?L.minor||{}:L,n=r?A.minor:A,l=r?"minor.":"";function c(M){var T=s[M];return T!==void 0?T:(n._template||{})[M]}var u=c("tick0"),g=c("dtick"),f=c("tickvals"),w=P(f)?"array":g?"linear":"auto",h=v(l+"tickmode",w);if(h==="auto"||h==="sync")v(l+"nticks");else if(h==="linear"){var o=n.dtick=m.dtick(g,p);n.tick0=m.tick0(u,p,A.calendar,o)}else if(p!=="multicategory"){var d=v(l+"tickvals");d===void 0?n.tickmode="auto":r||v("ticktext")}}},66847:function(G,V,e){var m=e(39898),P=e(73972),i=e(71828),L=e(91424),A=e(89298);G.exports=function(p,t,r,s){var n=p._fullLayout;if(t.length===0){A.redrawComponents(p);return}function l(T){var C=T.xaxis,x=T.yaxis;n._defs.select("#"+T.clipId+"> 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;C<t.length;C++){var x=t[C],S=x.plotinfo.xaxis,b=x.plotinfo.yaxis;x.xr1&&(T[S._name+".range"]=x.xr1.slice()),x.yr1&&(T[b._name+".range"]=x.yr1.slice())}return u&&u(),P.call("relayout",p,T).then(function(){for(var a=0;a<t.length;a++)l(t[a].plotinfo)})}function f(){for(var T={},C=0;C<t.length;C++){var x=t[C],S=x.plotinfo.xaxis,b=x.plotinfo.yaxis;x.xr0&&(T[S._name+".range"]=x.xr0.slice()),x.yr0&&(T[b._name+".range"]=x.yr0.slice())}return P.call("relayout",p,T).then(function(){for(var a=0;a<t.length;a++)l(t[a].plotinfo)})}var w,h,o,d=m.ease(r.easing);p._transitionData._interruptCallbacks.push(function(){return window.cancelAnimationFrame(o),o=null,f()});function M(){h=Date.now();for(var T=Math.min(1,(h-w)/r.duration),C=d(T),x=0;x<t.length;x++)c(t[x],C);h-w>r.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;n<t.length;n++){var h=t[n];!m(h,"box-violin")||(h[s+"axis"]||s)!==r||(h[f]!==void 0?w.push(h[f][0]):h.name!==void 0?w.push(h.name):w.push("text"),h[c]!==u&&(u=void 0))}p.type=P(w,u,g)}else if(l.type==="splom"){var o=l.dimensions,d=o[l._axesDim[r]];d.visible&&(p.type=P(d.values,u,g))}else p.type=P(l[s]||[l[s+"0"]],u,g)}}}function L(p,t,r){for(var s=0;s<p.length;s++){var n=p[s];if(n.type==="splom"&&n._length>0&&(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;f<g.length;f++)t._internalOn(g[f],l.check);l.remove=function(){for(var w=0;w<g.length;w++)t._removeInternalListener(g[w],l.check)}}else P.log("Unable to automatically bind plot updates to API command"),l.lookupTable={},l.remove=function(){};return l.disable=function(){c=!1},l.enable=function(){c=!0},r&&(r._commandObserver=l),l},V.hasSimpleAPICommandBindings=function(t,r,s){var n,l=r.length,c;for(n=0;n<l;n++){var u,g=r[n],f=g.method,w=g.args;if(Array.isArray(w)||(w=[]),!f)return!1;var h=V.computeAPICommandBindings(t,f,w);if(h.length!==1)return!1;if(!c)c=h[0],Array.isArray(c.traces)&&c.traces.sort();else{if(u=h[0],u.type!==c.type||u.prop!==c.prop)return!1;if(Array.isArray(c.traces))if(Array.isArray(u.traces)){u.traces.sort();for(var o=0;o<c.traces.length;o++)if(c.traces[o]!==u.traces[o])return!1}else return!1;else if(u.prop!==c.prop)return!1}u=h[0];var d=u.value;if(Array.isArray(d))if(d.length===1)d=d[0];else return!1;s&&(s[d]=n)}return c};function i(t,r,s){var n,l,c,u=!1;if(r.type==="data")n=t._fullData[r.traces!==null?r.traces[0]:0];else if(r.type==="layout")n=t._fullLayout;else return!1;return l=P.nestedProperty(n,r.prop).get(),c=s[r.type]=s[r.type]||{},c.hasOwnProperty(r.prop)&&c[r.prop]!==l&&(u=!0),c[r.prop]=l,{changed:u,value:l}}V.executeAPICommand=function(t,r,s){if(r==="skip")return Promise.resolve();var n=m.apiMethodRegistry[r],l=[t];Array.isArray(s)||(s=[]);for(var c=0;c<s.length;c++)l.push(s[c]);return n.apply(null,l).catch(function(u){return P.warn("API call to Plotly."+r+" rejected.",u),Promise.reject(u)})},V.computeAPICommandBindings=function(t,r,s){var n;switch(Array.isArray(s)||(s=[]),r){case"restyle":n=v(t,s);break;case"relayout":n=A(t,s);break;case"update":n=v(t,[s[0],s[2]]).concat(A(t,[s[1]]));break;case"animate":n=L(t,s);break;default:n=[]}return n};function L(t,r){return Array.isArray(r[0])&&r[0].length===1&&["string","number"].indexOf(typeof r[0][0])!==-1?[{type:"layout",prop:"_currentFrame",value:r[0][0].toString()}]:[]}function A(t,r){var s=[],n=r[0],l={};if(typeof n=="string")l[n]=r[1];else if(P.isPlainObject(n))l=n;else return s;return p(l,function(c,u,g){s.push({type:"layout",prop:c,value:g})},"",0),s}function v(t,r){var s,n,l,c,u=[];if(n=r[0],l=r[1],s=r[2],c={},typeof n=="string")c[n]=l;else if(P.isPlainObject(n))c=n,s===void 0&&(s=l);else return u;return s===void 0&&(s=null),p(c,function(g,f,w){var h,o;if(Array.isArray(w)){o=w.slice();var d=Math.min(o.length,t.data.length);s&&(d=Math.min(d,s.length)),h=[];for(var M=0;M<d;M++)h[M]=s?s[M]:M}else o=w,h=s?s.slice():null;if(h===null)Array.isArray(o)&&(o=o[0]);else if(Array.isArray(h)){if(!Array.isArray(o)){var T=o;o=[];for(var C=0;C<h.length;C++)o[C]=T}o.length=Math.min(h.length,o.length)}u.push({type:"data",prop:g,traces:h,value:o})},"",0),u}function p(t,r,s,n){Object.keys(t).forEach(function(l){var c=t[l];if(l[0]!=="_"){var u=s+(n>0?".":"")+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&&(r<t.columns?v=t._domains.x[r]:delete P.domain.column);var s=L("domain.row");s!==void 0&&(s<t.rows?p=t._domains.y[s]:delete P.domain.row)}var n=L("domain.x",v),l=L("domain.y",p);n[0]<n[1]||(P.domain.x=v.slice()),l[0]<l[1]||(P.domain.y=p.slice())}},41940:function(G){G.exports=function(V){var e=V.editType,m=V.colorEditType;m===void 0&&(m=e);var P={family:{valType:"string",noBlank:!0,strict:!0,editType:e},size:{valType:"number",min:1,editType:e},color:{valType:"color",editType:m},editType:e};return V.autoSize&&(P.size.dflt="auto"),V.autoColor&&(P.color.dflt="auto"),V.arrayOk&&(P.family.arrayOk=!0,P.size.arrayOk=!0,P.color.arrayOk=!0),P}},31391:function(G){G.exports={_isLinkedToArray:"frames_entry",group:{valType:"string"},name:{valType:"string"},traces:{valType:"any"},baseframe:{valType:"string"},data:{valType:"any"},layout:{valType:"any"}}},78776:function(G,V){V.projNames={airy:"airy",aitoff:"aitoff","albers usa":"albersUsa",albers:"albers",august:"august","azimuthal equal area":"azimuthalEqualArea","azimuthal equidistant":"azimuthalEquidistant",baker:"baker",bertin1953:"bertin1953",boggs:"boggs",bonne:"bonne",bottomley:"bottomley",bromley:"bromley",collignon:"collignon","conic conformal":"conicConformal","conic equal area":"conicEqualArea","conic equidistant":"conicEquidistant",craig:"craig",craster:"craster","cylindrical equal area":"cylindricalEqualArea","cylindrical stereographic":"cylindricalStereographic",eckert1:"eckert1",eckert2:"eckert2",eckert3:"eckert3",eckert4:"eckert4",eckert5:"eckert5",eckert6:"eckert6",eisenlohr:"eisenlohr","equal earth":"equalEarth",equirectangular:"equirectangular",fahey:"fahey","foucaut sinusoidal":"foucautSinusoidal",foucaut:"foucaut",ginzburg4:"ginzburg4",ginzburg5:"ginzburg5",ginzburg6:"ginzburg6",ginzburg8:"ginzburg8",ginzburg9:"ginzburg9",gnomonic:"gnomonic","gringorten quincuncial":"gringortenQuincuncial",gringorten:"gringorten",guyou:"guyou",hammer:"hammer",hill:"hill",homolosine:"homolosine",hufnagel:"hufnagel",hyperelliptical:"hyperelliptical",kavrayskiy7:"kavrayskiy7",lagrange:"lagrange",larrivee:"larrivee",laskowski:"laskowski",loximuthal:"loximuthal",mercator:"mercator",miller:"miller",mollweide:"mollweide","mt flat polar parabolic":"mtFlatPolarParabolic","mt flat polar quartic":"mtFlatPolarQuartic","mt flat polar sinusoidal":"mtFlatPolarSinusoidal","natural earth":"naturalEarth","natural earth1":"naturalEarth1","natural earth2":"naturalEarth2","nell hammer":"nellHammer",nicolosi:"nicolosi",orthographic:"orthographic",patterson:"patterson","peirce quincuncial":"peirceQuincuncial",polyconic:"polyconic","rectangular polyconic":"rectangularPolyconic",robinson:"robinson",satellite:"satellite","sinu mollweide":"sinuMollweide",sinusoidal:"sinusoidal",stereographic:"stereographic",times:"times","transverse mercator":"transverseMercator","van der grinten":"vanDerGrinten","van der grinten2":"vanDerGrinten2","van der grinten3":"vanDerGrinten3","van der grinten4":"vanDerGrinten4",wagner4:"wagner4",wagner6:"wagner6",wiechel:"wiechel","winkel tripel":"winkel3",winkel3:"winkel3"},V.axesNames=["lonaxis","lataxis"],V.lonaxisSpan={orthographic:180,"azimuthal equal area":360,"azimuthal equidistant":360,"conic conformal":180,gnomonic:160,stereographic:180,"transverse mercator":180,"*":360},V.lataxisSpan={"conic conformal":150,stereographic:179.5,"*":180},V.scopeDefaults={world:{lonaxisRange:[-180,180],lataxisRange:[-90,90],projType:"equirectangular",projRotate:[0,0,0]},usa:{lonaxisRange:[-180,-50],lataxisRange:[15,80],projType:"albers usa"},europe:{lonaxisRange:[-30,60],lataxisRange:[30,85],projType:"conic conformal",projRotate:[15,0,0],projParallels:[0,60]},asia:{lonaxisRange:[22,160],lataxisRange:[-15,55],projType:"mercator",projRotate:[0,0,0]},africa:{lonaxisRange:[-30,60],lataxisRange:[-40,40],projType:"mercator",projRotate:[0,0,0]},"north america":{lonaxisRange:[-180,-45],lataxisRange:[5,85],projType:"conic conformal",projRotate:[-100,0,0],projParallels:[29.5,45.5]},"south america":{lonaxisRange:[-100,-30],lataxisRange:[-60,15],projType:"mercator",projRotate:[0,0,0]}},V.clipPad=.001,V.precision=.1,V.landColor="#F0DC82",V.waterColor="#3399FF",V.locationmodeToLayer={"ISO-3":"countries","USA-states":"subunits","country names":"countries"},V.sphereSVG={type:"Sphere"},V.fillLayers={ocean:1,land:1,lakes:1},V.lineLayers={subunits:1,countries:1,coastlines:1,rivers:1,frame:1},V.layers=["bg","ocean","land","lakes","subunits","countries","coastlines","rivers","lataxis","lonaxis","frame","backplot","frontplot"],V.layersForChoropleth=["bg","ocean","land","subunits","countries","coastlines","lataxis","lonaxis","frame","backplot","rivers","lakes","frontplot"],V.layerNameToAdjective={ocean:"ocean",land:"land",lakes:"lake",subunits:"subunit",countries:"country",coastlines:"coastline",rivers:"river",frame:"frame"}},69082:function(G,V,e){var m=e(39898),P=e(27362),i=P.geoPath,L=P.geoDistance,A=e(65704),v=e(73972),p=e(71828),t=p.strTranslate,r=e(7901),s=e(91424),n=e(30211),l=e(74875),c=e(89298),u=e(71739).getAutoRange,g=e(28569),f=e(47322).prepSelect,w=e(47322).clearOutline,h=e(47322).selectOnClick,o=e(74455),d=e(78776),M=e(41327),T=e(90973),C=e(96892).zL;function x(y){this.id=y.id,this.graphDiv=y.graphDiv,this.container=y.container,this.topojsonURL=y.topojsonURL,this.isStatic=y.staticPlot,this.topojsonName=null,this.topojson=null,this.projection=null,this.scope=null,this.viewInitial=null,this.fitScale=null,this.bounds=null,this.midPt=null,this.hasChoropleth=!1,this.traceHash={},this.layers={},this.basePaths={},this.dataPaths={},this.dataPoints={},this.clipDef=null,this.clipRect=null,this.bgRect=null,this.makeFramework()}var S=x.prototype;G.exports=function(z){return new x(z)},S.plot=function(y,z,I,B){var k=this;if(B)return k.update(y,z,!0);k._geoCalcData=y,k._fullLayout=z;var O=z[this.id],N=[],_=!1;for(var U in d.layerNameToAdjective)if(U!=="frame"&&O["show"+U]){_=!0;break}for(var Y=!1,J=0;J<y.length;J++){var te=y[0][0].trace;te._geo=k,te.locationmode&&(_=!0);var ae=te.marker;if(ae){var ce=ae.angle,Q=ae.angleref;(ce||Q==="north"||Q==="previous")&&(Y=!0)}}if(this._hasMarkerAngles=Y,_){var Z=T.getTopojsonName(O);(k.topojson===null||Z!==k.topojsonName)&&(k.topojsonName=Z,PlotlyGeoAssets.topojson[k.topojsonName]===void 0&&N.push(k.fetchTopojson()))}N=N.concat(M.fetchTraceGeoData(y)),I.push(new Promise(function(j,K){Promise.all(N).then(function(){k.topojson=PlotlyGeoAssets.topojson[k.topojsonName],k.update(y,z),j()}).catch(K)}))},S.fetchTopojson=function(){var y=this,z=T.getTopojsonPath(y.topojsonURL,y.topojsonName);return new Promise(function(I,B){m.json(z,function(k,O){if(k)return k.status===404?B(new Error(["plotly.js could not find topojson file at",z+".","Make sure the *topojsonURL* plot config option","is set properly."].join(" "))):B(new Error(["unexpected error while fetching topojson file at",z].join(" ")));PlotlyGeoAssets.topojson[y.topojsonName]=O,I()})})},S.update=function(y,z,I){var B=z[this.id];this.hasChoropleth=!1;for(var k=0;k<y.length;k++){var O=y[k],N=O[0].trace;N.type==="choropleth"&&(this.hasChoropleth=!0),N.visible===!0&&N._length>0&&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;Q<ae;Q++)for(var Z=te[Q].x,j=ce[Q]=[],K=U[0];K<U[1]+k;K+=k)j.push(Y(Z,K));return{type:"MultiLineString",coordinates:ce}}function E(y,z){var I=d.clipPad,B=y[0]+I,k=y[1]-I,O=z[0]+I,N=z[1]-I;B>0&&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;u<c.length;u++){var g=c[u],f=m(l,L,g),w=n[g],h=w._subplot;h||(h=i({id:g,graphDiv:s,container:n._geolayer.node(),topojsonURL:s._context.topojsonURL,staticPlot:s._context.staticPlot}),n[g]._subplot=h),h.plot(f,n,s._promises)}}function t(s,n,l,c){for(var u=c._subplots[L]||[],g=0;g<u.length;g++){var f=u[g],w=c[f]._subplot;!n[f]&&w&&(w.framework.remove(),w.clipDef.remove())}}function r(s){for(var n=s._fullLayout,l=n._subplots[L],c=0;c<l.length;c++){var u=n[l[c]],g=u._subplot;g.updateFx(n,u)}}G.exports={attr:L,name:L,idRoot:L,idRegex:A,attrRegex:A,attributes:v,layoutAttributes:e(77519),supplyLayoutDefaults:e(82161),plot:p,updateFx:r,clean:t}},77519:function(G,V,e){var m=e(22399),P=e(27670).Y,i=e(79952).P,L=e(78776),A=e(30962).overrideAll,v=e(78607),p={range:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},showgrid:{valType:"boolean",dflt:!1},tick0:{valType:"number",dflt:0},dtick:{valType:"number"},gridcolor:{valType:"color",dflt:m.lightLine},gridwidth:{valType:"number",min:0,dflt:1},griddash:i},t=G.exports=A({domain:P({name:"geo"},{}),fitbounds:{valType:"enumerated",values:[!1,"locations","geojson"],dflt:!1,editType:"plot"},resolution:{valType:"enumerated",values:[110,50],dflt:110,coerceNumber:!0},scope:{valType:"enumerated",values:v(L.scopeDefaults),dflt:"world"},projection:{type:{valType:"enumerated",values:v(L.projNames)},rotation:{lon:{valType:"number"},lat:{valType:"number"},roll:{valType:"number"}},tilt:{valType:"number",dflt:0},distance:{valType:"number",min:1.001,dflt:2},parallels:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},scale:{valType:"number",min:0,dflt:1}},center:{lon:{valType:"number"},lat:{valType:"number"}},visible:{valType:"boolean",dflt:!0},showcoastlines:{valType:"boolean"},coastlinecolor:{valType:"color",dflt:m.defaultLine},coastlinewidth:{valType:"number",min:0,dflt:1},showland:{valType:"boolean",dflt:!1},landcolor:{valType:"color",dflt:L.landColor},showocean:{valType:"boolean",dflt:!1},oceancolor:{valType:"color",dflt:L.waterColor},showlakes:{valType:"boolean",dflt:!1},lakecolor:{valType:"color",dflt:L.waterColor},showrivers:{valType:"boolean",dflt:!1},rivercolor:{valType:"color",dflt:L.waterColor},riverwidth:{valType:"number",min:0,dflt:1},showcountries:{valType:"boolean"},countrycolor:{valType:"color",dflt:m.defaultLine},countrywidth:{valType:"number",min:0,dflt:1},showsubunits:{valType:"boolean"},subunitcolor:{valType:"color",dflt:m.defaultLine},subunitwidth:{valType:"number",min:0,dflt:1},showframe:{valType:"boolean"},framecolor:{valType:"color",dflt:m.defaultLine},framewidth:{valType:"number",min:0,dflt:1},bgcolor:{valType:"color",dflt:m.background},lonaxis:p,lataxis:p},"plot","from-root");t.uirevision={valType:"any",editType:"none"}},82161:function(G,V,e){var m=e(71828),P=e(49119),i=e(27659).NG,L=e(78776),A=e(77519),v=L.axesNames;G.exports=function(r,s,n){P(r,s,n,{type:"geo",attributes:A,handleDefaults:p,fullData:n,partition:"y"})};function p(t,r,s,n){var l=i(n.fullData,"geo",n.id),c=l.map(function(j){return j._expandedIndex}),u=s("resolution"),g=s("scope"),f=L.scopeDefaults[g],w=s("projection.type",f.projType),h=r._isAlbersUsa=w==="albers usa";h&&(g=r.scope="usa");var o=r._isScoped=g!=="world",d=r._isSatellite=w==="satellite",M=r._isConic=w.indexOf("conic")!==-1||w==="albers",T=r._isClipped=!!L.lonaxisSpan[w];if(t.visible===!1){var C=m.extendDeep({},r._template);C.showcoastlines=!1,C.showcountries=!1,C.showframe=!1,C.showlakes=!1,C.showland=!1,C.showocean=!1,C.showrivers=!1,C.showsubunits=!1,C.lonaxis&&(C.lonaxis.showgrid=!1),C.lataxis&&(C.lataxis.showgrid=!1),r._template=C}for(var x=s("visible"),S,b=0;b<v.length;b++){var a=v[b],E=[30,10][b],y;if(o)y=f[a+"Range"];else{var z=L[a+"Span"],I=(z[w]||z["*"])/2,B=s("projection.rotation."+a.substr(0,3),f.projRotate[b]);y=[B-I,B+I]}var k=s(a+".range",y);s(a+".tick0"),s(a+".dtick",E),S=s(a+".showgrid",x?void 0:!1),S&&(s(a+".gridcolor"),s(a+".gridwidth"),s(a+".griddash")),r[a]._ax={type:"linear",_id:a.slice(0,3),_traceIndices:c,setScale:m.identity,c2l:m.identity,r2l:m.identity,autorange:!0,range:k.slice(),_m:1,_input:{}}}var O=r.lonaxis.range,N=r.lataxis.range,_=O[0],U=O[1];_>0&&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;z<I;++z)y+=a[z]*E[z];return y}function S(a,E){return[a[1]*E[2]-a[2]*E[1],a[2]*E[0]-a[0]*E[2],a[0]*E[1]-a[1]*E[0]]}function b(a){for(var E=0,y=arguments.length,z=[];++E<y;)z.push(arguments[E]);var I=m.dispatch.apply(null,z);return I.of=function(B,k){return function(O){var N;try{N=O.sourceEvent=m.event,O.target=a,m.event=O,I[O.type].apply(B,k)}finally{m.event=N}}},I}},27659:function(G,V,e){var m=e(73972),P=e(85555).SUBPLOT_PATTERN;V.AU=function(i,L,A){var v=m.subplotsRegistry[L];if(!v)return[];for(var p=v.attr,t=[],r=0;r<i.length;r++){var s=i[r],n=s[0].trace;n[p]===A&&t.push(s)}return t},V.a0=function(i,L){var A=[],v=[],p;if(typeof L=="string"?p=m.getModule(L).plot:typeof L=="function"?p=L:p=L.plot,!p)return[A,i];for(var t=0;t<i.length;t++){var r=i[t],s=r[0].trace;s.visible!==!0||s._length===0||(s._module&&s._module.plot===p?A.push(r):v.push(r))}return[A,v]},V.NG=function(L,A,v){if(!m.subplotsRegistry[A])return[];var p=m.subplotsRegistry[A].attr,t=[],r,s,n;if(A==="gl2d"){var l=v.match(P);s="x"+l[1],n="y"+l[2]}for(var c=0;c<L.length;c++)r=L[c],A==="gl2d"&&m.traceIs(r,"gl2d")?r[p[0]]===s&&r[p[1]]===n&&t.push(r):r[p]===v&&t.push(r);return t}},75071:function(G,V,e){var m=e(16825),P=e(1195),i=e(48956),L=e(85555),A=e(38520);G.exports=p;function v(t,r){this.element=t,this.plot=r,this.mouseListener=null,this.wheelListener=null,this.lastInputTime=Date.now(),this.lastPos=[0,0],this.boxEnabled=!1,this.boxInited=!1,this.boxStart=[0,0],this.boxEnd=[0,0],this.dragStart=[0,0]}function p(t){var r=t.mouseContainer,s=t.glplot,n=new v(r,s);function l(){t.xaxis.autorange=!1,t.yaxis.autorange=!1}function c(){for(var g=t.graphDiv._fullLayout._axisConstraintGroups,f=t.xaxis._id,w=t.yaxis._id,h=0;h<g.length;h++)if(g[h][f]!==-1){if(g[h][w]!==-1)return!0;break}return!1}n.mouseListener=m(r,u),r.addEventListener("touchstart",function(g){var f=i(g.changedTouches[0],r);u(0,f[0],f[1]),u(1,f[0],f[1]),g.preventDefault()},A?{passive:!1}:!1),r.addEventListener("touchmove",function(g){g.preventDefault();var f=i(g.changedTouches[0],r);u(1,f[0],f[1]),g.preventDefault()},A?{passive:!1}:!1),r.addEventListener("touchend",function(g){u(0,n.lastPos[0],n.lastPos[1]),g.preventDefault()},A?{passive:!1}:!1);function u(g,f,w){var h=t.calcDataBox(),o=s.viewBox,d=n.lastPos[0],M=n.lastPos[1],T=L.MINDRAG*s.pixelRatio,C=L.MINZOOM*s.pixelRatio,x,S;f*=s.pixelRatio,w*=s.pixelRatio,w=o[3]-o[1]-w;function b(B,k,O){var N=Math.min(k,O),_=Math.max(k,O);N!==_?(h[B]=N,h[B+2]=_,n.dataBox=h,t.setRanges(h)):(t.selectBox.selectBox=[0,0,1,1],t.glplot.setDirty())}switch(t.fullLayout.dragmode){case"zoom":if(g){var a=f/(o[2]-o[0])*(h[2]-h[0])+h[0],E=w/(o[3]-o[1])*(h[3]-h[1])+h[1];n.boxInited||(n.boxStart[0]=a,n.boxStart[1]=E,n.dragStart[0]=f,n.dragStart[1]=w),n.boxEnd[0]=a,n.boxEnd[1]=E,n.boxInited=!0,!n.boxEnabled&&(n.boxStart[0]!==n.boxEnd[0]||n.boxStart[1]!==n.boxEnd[1])&&(n.boxEnabled=!0);var y=Math.abs(n.dragStart[0]-f)<C,z=Math.abs(n.dragStart[1]-w)<C;if(c()&&!(y&&z)){x=n.boxEnd[0]-n.boxStart[0],S=n.boxEnd[1]-n.boxStart[1];var I=(h[3]-h[1])/(h[2]-h[0]);Math.abs(x*I)>Math.abs(S)?(n.boxEnd[1]=n.boxStart[1]+Math.abs(x)*I*(S>=0?1:-1),n.boxEnd[1]<h[1]?(n.boxEnd[1]=h[1],n.boxEnd[0]=n.boxStart[0]+(h[1]-n.boxStart[1])/Math.abs(I)):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[0]?(n.boxEnd[0]=h[0],n.boxEnd[1]=n.boxStart[1]+(h[0]-n.boxStart[0])*Math.abs(I)):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)<T&&(f=n.dragStart[0]),Math.abs(n.dragStart[1]-w)<T&&(w=n.dragStart[1]),x=(d-f)*(h[2]-h[0])/(s.viewBox[2]-s.viewBox[0]),S=(M-w)*(h[3]-h[1])/(s.viewBox[3]-s.viewBox[1]),h[0]+=x,h[2]+=x,h[1]+=S,h[3]+=S,t.setRanges(h),n.panning=!0,n.lastInputTime=Date.now(),l(),t.cameraChanged(),t.handleAnnotations()):n.panning&&(n.panning=!1,t.relayoutCallback());break}n.lastPos[0]=f,n.lastPos[1]=w}return n.wheelListener=P(r,function(g,f){if(!t.scrollZoom)return!1;var w=t.calcDataBox(),h=s.viewBox,o=n.lastPos[0],d=n.lastPos[1],M=Math.exp(5*f/(h[3]-h[1])),T=o/(h[2]-h[0])*(w[2]-w[0])+w[0],C=d/(h[3]-h[1])*(w[3]-w[1])+w[1];return w[0]=(w[0]-T)*M+T,w[2]=(w[2]-T)*M+T,w[1]=(w[1]-C)*M+C,w[3]=(w[3]-C)*M+C,t.setRanges(w),n.lastInputTime=Date.now(),l(),t.cameraChanged(),t.handleAnnotations(),t.relayoutCallback(),!0},!0),n}},82961:function(G,V,e){var m=e(89298),P=e(78614);function i(p){this.scene=p,this.gl=p.gl,this.pixelRatio=p.pixelRatio,this.screenBox=[0,0,1,1],this.viewBox=[0,0,1,1],this.dataBox=[-1,-1,1,1],this.borderLineEnable=[!1,!1,!1,!1],this.borderLineWidth=[1,1,1,1],this.borderLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.ticks=[[],[]],this.tickEnable=[!0,!0,!1,!1],this.tickPad=[15,15,15,15],this.tickAngle=[0,0,0,0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickMarkLength=[0,0,0,0],this.tickMarkWidth=[0,0,0,0],this.tickMarkColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labels=["x","y"],this.labelEnable=[!0,!0,!1,!1],this.labelAngle=[0,Math.PI/2,0,3*Math.PI/2],this.labelPad=[15,15,15,15],this.labelSize=[12,12],this.labelFont=["sans-serif","sans-serif"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.title="",this.titleEnable=!0,this.titleCenter=[0,0,0,0],this.titleAngle=0,this.titleColor=[0,0,0,1],this.titleFont="sans-serif",this.titleSize=18,this.gridLineEnable=[!0,!0],this.gridLineColor=[[0,0,0,.5],[0,0,0,.5]],this.gridLineWidth=[1,1],this.zeroLineEnable=[!0,!0],this.zeroLineWidth=[1,1],this.zeroLineColor=[[0,0,0,1],[0,0,0,1]],this.borderColor=[0,0,0,0],this.backgroundColor=[0,0,0,0],this.static=this.scene.staticPlot}var L=i.prototype,A=["xaxis","yaxis"];L.merge=function(p){this.titleEnable=!1,this.backgroundColor=P(p.plot_bgcolor);var t,r,s,n,l,c,u,g,f,w,h;for(w=0;w<2;++w){t=A[w];var o=t.charAt(0);for(r=p[this.scene[t]._name],s=r.title.text===this.scene.fullLayout._dfltTitle[o]?"":r.title.text,h=0;h<=2;h+=2)this.labelEnable[w+h]=!1,this.labels[w+h]=s,this.labelColor[w+h]=P(r.title.font.color),this.labelFont[w+h]=r.title.font.family,this.labelSize[w+h]=r.title.font.size,this.labelPad[w+h]=this.getLabelPad(t,r),this.tickEnable[w+h]=!1,this.tickColor[w+h]=P((r.tickfont||{}).color),this.tickAngle[w+h]=r.tickangle==="auto"?0:Math.PI*-r.tickangle/180,this.tickPad[w+h]=this.getTickPad(r),this.tickMarkLength[w+h]=0,this.tickMarkWidth[w+h]=r.tickwidth||0,this.tickMarkColor[w+h]=P(r.tickcolor),this.borderLineEnable[w+h]=!1,this.borderLineColor[w+h]=P(r.linecolor),this.borderLineWidth[w+h]=r.linewidth||0;u=this.hasSharedAxis(r),l=this.hasAxisInDfltPos(t,r)&&!u,c=this.hasAxisInAltrPos(t,r)&&!u,n=r.mirror||!1,g=u?String(n).indexOf("all")!==-1:!!n,f=u?n==="allticks":String(n).indexOf("ticks")!==-1,l?this.labelEnable[w]=!0:c&&(this.labelEnable[w+2]=!0),l?this.tickEnable[w]=r.showticklabels:c&&(this.tickEnable[w+2]=r.showticklabels),(l||g)&&(this.borderLineEnable[w]=r.showline),(c||g)&&(this.borderLineEnable[w+2]=r.showline),(l||f)&&(this.tickMarkLength[w]=this.getTickMarkLength(r)),(c||f)&&(this.tickMarkLength[w+2]=this.getTickMarkLength(r)),this.gridLineEnable[w]=r.showgrid,this.gridLineColor[w]=P(r.gridcolor),this.gridLineWidth[w]=r.gridwidth,this.zeroLineEnable[w]=r.zeroline,this.zeroLineColor[w]=P(r.zerolinecolor),this.zeroLineWidth[w]=r.zerolinewidth}},L.hasSharedAxis=function(p){var t=this.scene,r=t.fullLayout._subplots.gl2d,s=m.findSubplotsWithAxis(r,p);return s.indexOf(t.id)!==0},L.hasAxisInDfltPos=function(p,t){var r=t.side;if(p==="xaxis")return r==="bottom";if(p==="yaxis")return r==="left"},L.hasAxisInAltrPos=function(p,t){var r=t.side;if(p==="xaxis")return r==="top";if(p==="yaxis")return r==="right"},L.getLabelPad=function(p,t){var r=1.5,s=t.title.font.size,n=t.showticklabels;if(p==="xaxis")return t.side==="top"?-10+s*(r+(n?1:0)):-10+s*(r+(n?.5:0));if(p==="yaxis")return t.side==="right"?10+s*(r+(n?1:.5)):10+s*(r+(n?.5:0))},L.getTickPad=function(p){return p.ticks==="outside"?10+p.ticklen:15},L.getTickMarkLength=function(p){if(!p.ticks)return 0;var t=p.ticklen;return p.ticks==="inside"?-t:t};function v(p){return new i(p)}G.exports=v},4796:function(G,V,e){var m=e(30962).overrideAll,P=e(92918),i=e(10820),L=e(77922),A=e(85555),v=e(93612),p=e(528),t=e(27659).NG;V.name="gl2d",V.attr=["xaxis","yaxis"],V.idRoot=["x","y"],V.idRegex=A.idRegex,V.attrRegex=A.attrRegex,V.attributes=e(89502),V.supplyLayoutDefaults=function(r,s,n){s._has("cartesian")||v.supplyLayoutDefaults(r,s,n)},V.layoutAttrOverrides=m(v.layoutAttributes,"plot","from-root"),V.baseLayoutAttrOverrides=m({plot_bgcolor:i.plot_bgcolor,hoverlabel:p.hoverlabel},"plot","nested"),V.plot=function(s){for(var n=s._fullLayout,l=s._fullData,c=n._subplots.gl2d,u=0;u<c.length;u++){var g=c[u],f=n._plots[g],w=t(l,"gl2d",g),h=f._scene2d;h===void 0&&(h=new P({id:g,graphDiv:s,container:s.querySelector(".gl-container"),staticPlot:s._context.staticPlot,plotGlPixelRatio:s._context.plotGlPixelRatio},n),f._scene2d=h),h.plot(w,s.calcdata,n,s.layout)}},V.clean=function(r,s,n,l){for(var c=l._subplots.gl2d||[],u=0;u<c.length;u++){var g=c[u],f=l._plots[g];if(f._scene2d){var w=t(r,"gl2d",g);w.length===0&&(f._scene2d.destroy(),delete l._plots[g])}}v.clean.apply(this,arguments)},V.drawFramework=function(r){r._context.staticPlot||v.drawFramework(r)},V.toSVG=function(r){for(var s=r._fullLayout,n=s._subplots.gl2d,l=0;l<n.length;l++){var c=s._plots[n[l]],u=c._scene2d,g=u.toImage("png"),f=s._glimages.append("svg:image");f.attr({xmlns:L.svg,"xlink:href":g,x:0,y:0,width:"100%",height:"100%",preserveAspectRatio:"none"}),u.destroy()}},V.updateFx=function(r){for(var s=r._fullLayout,n=s._subplots.gl2d,l=0;l<n.length;l++){var c=s._plots[n[l]]._scene2d;c.updateFx(s.dragmode)}}},92918:function(G,V,e){var m=e(73972),P=e(89298),i=e(30211),L=e(9330).gl_plot2d,A=e(9330).gl_spikes2d,v=e(9330).gl_select_box,p=e(40372),t=e(82961),r=e(75071),s=e(58617),n=e(99082),l=n.enforce,c=n.clean,u=e(71739).doAutoRange,g=e(64505),f=g.drawMode,w=g.selectMode,h=["xaxis","yaxis"],o,d,M=e(85555).SUBPLOT_PATTERN;function T(S,b){this.container=S.container,this.graphDiv=S.graphDiv,this.pixelRatio=S.plotGlPixelRatio||window.devicePixelRatio,this.id=S.id,this.staticPlot=!!S.staticPlot,this.scrollZoom=this.graphDiv._context._scrollZoom.cartesian,this.fullData=null,this.updateRefs(b),this.makeFramework(),!this.stopped&&(this.glplotOptions=t(this),this.glplotOptions.merge(b),this.glplot=L(this.glplotOptions),this.camera=r(this),this.traces={},this.spikes=A(this.glplot),this.selectBox=v(this.glplot,{innerFill:!1,outerFill:!0}),this.lastButtonState=0,this.pickResult=null,this.isMouseOver=!0,this.stopped=!1,this.redraw=this.draw.bind(this),this.redraw())}G.exports=T;var C=T.prototype;C.makeFramework=function(){if(this.staticPlot){if(!d&&(o=document.createElement("canvas"),d=p({canvas:o,preserveDrawingBuffer:!1,premultipliedAlpha:!0,antialias:!0}),!d))throw new Error("Error creating static canvas/context for image server");this.canvas=o,this.gl=d}else{var S=this.container.querySelector(".gl-canvas-focus"),b=p({canvas:S,preserveDrawingBuffer:!0,premultipliedAlpha:!0});if(!b){s(this),this.stopped=!0;return}this.canvas=S,this.gl=b}var a=this.canvas;a.style.width="100%",a.style.height="100%",a.style.position="absolute",a.style.top="0px",a.style.left="0px",a.style["pointer-events"]="none",this.updateSize(a);var E=this.svgContainer=document.createElementNS("http://www.w3.org/2000/svg","svg");E.style.position="absolute",E.style.top=E.style.left="0px",E.style.width=E.style.height="100%",E.style["z-index"]=20,E.style["pointer-events"]="none";var y=this.mouseContainer=document.createElement("div");y.style.position="absolute",y.style["pointer-events"]="auto",this.pickCanvas=this.container.querySelector(".gl-canvas-pick");var z=this.container;z.appendChild(E),z.appendChild(y);var I=this;y.addEventListener("mouseout",function(){I.isMouseOver=!1,I.unhover()}),y.addEventListener("mouseover",function(){I.isMouseOver=!0})},C.toImage=function(S){S||(S="png"),this.stopped=!0,this.staticPlot&&this.container.appendChild(o),this.updateSize(this.canvas);var b=this.glplot.gl,a=b.drawingBufferWidth,E=b.drawingBufferHeight;b.clearColor(1,1,1,0),b.clear(b.COLOR_BUFFER_BIT|b.DEPTH_BUFFER_BIT),this.glplot.setDirty(),this.glplot.draw(),b.bindFramebuffer(b.FRAMEBUFFER,null);var y=new Uint8Array(a*E*4);b.readPixels(0,0,a,E,b.RGBA,b.UNSIGNED_BYTE,y);for(var z=0,I=E-1;z<I;++z,--I)for(var B=0;B<a;++B)for(var k=0;k<4;++k){var O=y[4*(a*z+B)+k];y[4*(a*z+B)+k]=y[4*(a*I+B)+k],y[4*(a*I+B)+k]=O}var N=document.createElement("canvas");N.width=a,N.height=E;var _=N.getContext("2d",{willReadFrequently:!0}),U=_.createImageData(a,E);U.data.set(y),_.putImageData(U,0,0);var Y;switch(S){case"jpeg":Y=N.toDataURL("image/jpeg");break;case"webp":Y=N.toDataURL("image/webp");break;default:Y=N.toDataURL("image/png")}return this.staticPlot&&this.container.removeChild(o),Y},C.updateSize=function(S){S||(S=this.canvas);var b=this.pixelRatio,a=this.fullLayout,E=a.width,y=a.height,z=Math.ceil(b*E)|0,I=Math.ceil(b*y)|0;return(S.width!==z||S.height!==I)&&(S.width=z,S.height=I),S},C.computeTickMarks=function(){this.xaxis.setScale(),this.yaxis.setScale();for(var S=[P.calcTicks(this.xaxis),P.calcTicks(this.yaxis)],b=0;b<2;++b)for(var a=0;a<S[b].length;++a)S[b][a].text=S[b][a].text+"";return S};function x(S,b){for(var a=0;a<2;++a){var E=S[a],y=b[a];if(E.length!==y.length)return!0;for(var z=0;z<E.length;++z)if(E[z].x!==y[z].x)return!0}return!1}C.updateRefs=function(S){this.fullLayout=S;var b=this.id.match(M),a="xaxis"+b[1],E="yaxis"+b[2];this.xaxis=this.fullLayout[a],this.yaxis=this.fullLayout[E]},C.relayoutCallback=function(){var S=this.graphDiv,b=this.xaxis,a=this.yaxis,E=S.layout,y={},z=y[b._name+".range"]=b.range.slice(),I=y[a._name+".range"]=a.range.slice();y[b._name+".autorange"]=b.autorange,y[a._name+".autorange"]=a.autorange,m.call("_storeDirectGUIEdit",S.layout,S._fullLayout._preGUI,y);var B=E[b._name];B.range=z,B.autorange=b.autorange;var k=E[a._name];k.range=I,k.autorange=a.autorange,y.lastInputTime=this.camera.lastInputTime,S.emit("plotly_relayout",y)},C.cameraChanged=function(){var S=this.camera;this.glplot.setDataBox(this.calcDataBox());var b=this.computeTickMarks(),a=this.glplotOptions.ticks;x(b,a)&&(this.glplotOptions.ticks=b,this.glplotOptions.dataBox=S.dataBox,this.glplot.update(this.glplotOptions),this.handleAnnotations())},C.handleAnnotations=function(){for(var S=this.graphDiv,b=this.fullLayout.annotations,a=0;a<b.length;a++){var E=b[a];E.xref===this.xaxis._id&&E.yref===this.yaxis._id&&m.getComponentMethod("annotations","drawOne")(S,a)}},C.destroy=function(){if(this.glplot){var S=this.traces;S&&Object.keys(S).map(function(b){S[b].dispose(),delete S[b]}),this.glplot.dispose(),this.container.removeChild(this.svgContainer),this.container.removeChild(this.mouseContainer),this.fullData=null,this.glplot=null,this.stopped=!0,this.camera.mouseListener.enabled=!1,this.mouseContainer.removeEventListener("wheel",this.camera.wheelListener),this.camera=null}},C.plot=function(S,b,a){var E=this.glplot;this.updateRefs(a),this.xaxis.clearCalc(),this.yaxis.clearCalc(),this.updateTraces(S,b),this.updateFx(a.dragmode);var y=a.width,z=a.height;this.updateSize(this.canvas);var I=this.glplotOptions;I.merge(a),I.screenBox=[0,0,y,z];var B={_fullLayout:{_axisConstraintGroups:a._axisConstraintGroups,xaxis:this.xaxis,yaxis:this.yaxis,_size:a._size}};c(B,this.xaxis),c(B,this.yaxis);var k=a._size,O=this.xaxis.domain,N=this.yaxis.domain;I.viewBox=[k.l+O[0]*k.w,k.b+N[0]*k.h,y-k.r-(1-O[1])*k.w,z-k.t-(1-N[1])*k.h],this.mouseContainer.style.width=k.w*(O[1]-O[0])+"px",this.mouseContainer.style.height=k.h*(N[1]-N[0])+"px",this.mouseContainer.height=k.h*(N[1]-N[0]),this.mouseContainer.style.left=k.l+O[0]*k.w+"px",this.mouseContainer.style.top=k.t+(1-N[1])*k.h+"px";var _,U;for(U=0;U<2;++U)_=this[h[U]],_._length=I.viewBox[U+2]-I.viewBox[U],u(this.graphDiv,_),_.setScale();l(B),I.ticks=this.computeTickMarks(),I.dataBox=this.calcDataBox(),I.merge(a),E.update(I),this.glplot.draw()},C.calcDataBox=function(){var S=this.xaxis,b=this.yaxis,a=S.range,E=b.range,y=S.r2l,z=b.r2l;return[y(a[0]),z(E[0]),y(a[1]),z(E[1])]},C.setRanges=function(S){var b=this.xaxis,a=this.yaxis,E=b.l2r,y=a.l2r;b.range=[E(S[0]),E(S[2])],a.range=[y(S[1]),y(S[3])]},C.updateTraces=function(S,b){var a=Object.keys(this.traces),E,y,z;this.fullData=S;e:for(E=0;E<a.length;E++){var I=a[E],B=this.traces[I];for(y=0;y<S.length;y++)if(z=S[y],z.uid===I&&z.type===B.type)continue e;B.dispose(),delete this.traces[I]}for(E=0;E<S.length;E++){z=S[E];var k=b[E],O=this.traces[z.uid];O?O.update(z,k):(O=z._module.plot(this,z,k),this.traces[z.uid]=O)}this.glplot.objects.sort(function(N,_){return N._trace.index-_._trace.index})},C.updateFx=function(S){w(S)||f(S)?(this.pickCanvas.style["pointer-events"]="none",this.mouseContainer.style["pointer-events"]="none"):(this.pickCanvas.style["pointer-events"]="auto",this.mouseContainer.style["pointer-events"]="auto"),S==="pan"?this.mouseContainer.style.cursor="move":S==="zoom"?this.mouseContainer.style.cursor="crosshair":this.mouseContainer.style.cursor=null},C.emitPointAction=function(S,b){for(var a=S.trace.uid,E=S.pointIndex,y,z=0;z<this.fullData.length;z++)this.fullData[z].uid===a&&(y=this.fullData[z]);var I={x:S.traceCoord[0],y:S.traceCoord[1],curveNumber:y.index,pointNumber:E,data:y._input,fullData:this.fullData,xaxis:this.xaxis,yaxis:this.yaxis};i.appendArrayPointValue(I,y,E),this.graphDiv.emit(b,{points:[I]})},C.draw=function(){if(!this.stopped){requestAnimationFrame(this.redraw);var S=this.glplot,b=this.camera,a=b.mouseListener,E=this.lastButtonState===1&&a.buttons===0,y=this.fullLayout;this.lastButtonState=a.buttons,this.cameraChanged();var z=a.x*S.pixelRatio,I=this.canvas.height-S.pixelRatio*a.y,B;if(b.boxEnabled&&y.dragmode==="zoom"){this.selectBox.enabled=!0;for(var k=this.selectBox.selectBox=[Math.min(b.boxStart[0],b.boxEnd[0]),Math.min(b.boxStart[1],b.boxEnd[1]),Math.max(b.boxStart[0],b.boxEnd[0]),Math.max(b.boxStart[1],b.boxEnd[1])],O=0;O<2;O++)b.boxStart[O]===b.boxEnd[O]&&(k[O]=S.dataBox[O],k[O+2]=S.dataBox[O+2]);S.setDirty()}else if(!b.panning&&this.isMouseOver){this.selectBox.enabled=!1;var N=y._size,_=this.xaxis.domain,U=this.yaxis.domain;B=S.pick(z/S.pixelRatio+N.l+_[0]*N.w,I/S.pixelRatio-(N.t+(1-U[1])*N.h));var Y=B&&B.object._trace.handlePick(B);if(Y&&E&&this.emitPointAction(Y,"plotly_click"),B&&B.object._trace.hoverinfo!=="skip"&&y.hovermode&&Y&&(!this.lastPickResult||this.lastPickResult.traceUid!==Y.trace.uid||this.lastPickResult.dataCoord[0]!==Y.dataCoord[0]||this.lastPickResult.dataCoord[1]!==Y.dataCoord[1])){var J=Y;this.lastPickResult={traceUid:Y.trace?Y.trace.uid:null,dataCoord:Y.dataCoord.slice()},this.spikes.update({center:B.dataCoord}),J.screenCoord=[((S.viewBox[2]-S.viewBox[0])*(B.dataCoord[0]-S.dataBox[0])/(S.dataBox[2]-S.dataBox[0])+S.viewBox[0])/S.pixelRatio,(this.canvas.height-(S.viewBox[3]-S.viewBox[1])*(B.dataCoord[1]-S.dataBox[1])/(S.dataBox[3]-S.dataBox[1])-S.viewBox[1])/S.pixelRatio],this.emitPointAction(Y,"plotly_hover");var te=this.fullData[J.trace.index]||{},ae=J.pointIndex,ce=i.castHoverinfo(te,y,ae);if(ce&&ce!=="all"){var Q=ce.split("+");Q.indexOf("x")===-1&&(J.traceCoord[0]=void 0),Q.indexOf("y")===-1&&(J.traceCoord[1]=void 0),Q.indexOf("z")===-1&&(J.traceCoord[2]=void 0),Q.indexOf("text")===-1&&(J.textLabel=void 0),Q.indexOf("name")===-1&&(J.name=void 0)}i.loneHover({x:J.screenCoord[0],y:J.screenCoord[1],xLabel:this.hoverFormatter("xaxis",J.traceCoord[0]),yLabel:this.hoverFormatter("yaxis",J.traceCoord[1]),zLabel:J.traceCoord[2],text:J.textLabel,name:J.name,color:i.castHoverOption(te,ae,"bgcolor")||J.color,borderColor:i.castHoverOption(te,ae,"bordercolor"),fontFamily:i.castHoverOption(te,ae,"font.family"),fontSize:i.castHoverOption(te,ae,"font.size"),fontColor:i.castHoverOption(te,ae,"font.color"),nameLength:i.castHoverOption(te,ae,"namelength"),textAlign:i.castHoverOption(te,ae,"align")},{container:this.svgContainer,gd:this.graphDiv})}}B||this.unhover(),S.draw()}},C.unhover=function(){this.lastPickResult&&(this.spikes.update({}),this.lastPickResult=null,this.graphDiv.emit("plotly_unhover"),i.loneUnhover(this.svgContainer))},C.hoverFormatter=function(S,b){if(b!==void 0){var a=this[S];return P.tickText(a,a.c2l(b),"hover").text}}},58547:function(G,V,e){var m=e(30962).overrideAll,P=e(528),i=e(33539),L=e(27659).NG,A=e(71828),v=e(77922),p="gl3d",t="scene";V.name=p,V.attr=t,V.idRoot=t,V.idRegex=V.attrRegex=A.counterRegex("scene"),V.attributes=e(59084),V.layoutAttributes=e(65500),V.baseLayoutAttrOverrides=m({hoverlabel:P.hoverlabel},"plot","nested"),V.supplyLayoutDefaults=e(24682),V.plot=function(s){for(var n=s._fullLayout,l=s._fullData,c=n._subplots[p],u=0;u<c.length;u++){var g=c[u],f=L(l,p,g),w=n[g],h=w.camera,o=w._scene;o||(o=new i({id:g,graphDiv:s,container:s.querySelector(".gl-container"),staticPlot:s._context.staticPlot,plotGlPixelRatio:s._context.plotGlPixelRatio,camera:h},n),w._scene=o),o.viewInitial||(o.viewInitial={up:{x:h.up.x,y:h.up.y,z:h.up.z},eye:{x:h.eye.x,y:h.eye.y,z:h.eye.z},center:{x:h.center.x,y:h.center.y,z:h.center.z}}),o.plot(f,n,s.layout)}},V.clean=function(r,s,n,l){for(var c=l._subplots[p]||[],u=0;u<c.length;u++){var g=c[u];!s[g]&&l[g]._scene&&(l[g]._scene.destroy(),l._infolayer&&l._infolayer.selectAll(".annotation-"+g).remove())}},V.toSVG=function(r){for(var s=r._fullLayout,n=s._subplots[p],l=s._size,c=0;c<n.length;c++){var u=s[n[c]],g=u.domain,f=u._scene,w=f.toImage("png"),h=s._glimages.append("svg:image");h.attr({xmlns:v.svg,"xlink:href":w,x:l.l+l.w*g.x[0],y:l.t+l.h*(1-g.y[1]),width:l.w*(g.x[1]-g.x[0]),height:l.h*(g.y[1]-g.y[0]),preserveAspectRatio:"none"}),f.destroy()}},V.cleanId=function(s){if(s.match(/^scene[0-9]*$/)){var n=s.substr(5);return n==="1"&&(n=""),t+n}},V.updateFx=function(r){for(var s=r._fullLayout,n=s._subplots[p],l=0;l<n.length;l++){var c=s[n[l]]._scene;c.updateFx(s.dragmode,s.hovermode)}}},59084:function(G){G.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}},77894:function(G,V,e){var m=e(7901),P=e(13838),i=e(1426).extendFlat,L=e(30962).overrideAll;G.exports=L({visible:P.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:m.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:P.color,categoryorder:P.categoryorder,categoryarray:P.categoryarray,title:{text:P.title.text,font:P.title.font},type:i({},P.type,{values:["-","linear","log","date","category"]}),autotypenumbers:P.autotypenumbers,autorange:P.autorange,autorangeoptions:{minallowed:P.autorangeoptions.minallowed,maxallowed:P.autorangeoptions.maxallowed,clipmin:P.autorangeoptions.clipmin,clipmax:P.autorangeoptions.clipmax,include:P.autorangeoptions.include,editType:"plot"},rangemode:P.rangemode,minallowed:P.minallowed,maxallowed:P.maxallowed,range:i({},P.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:P.minor.tickmode,nticks:P.nticks,tick0:P.tick0,dtick:P.dtick,tickvals:P.tickvals,ticktext:P.ticktext,ticks:P.ticks,mirror:P.mirror,ticklen:P.ticklen,tickwidth:P.tickwidth,tickcolor:P.tickcolor,showticklabels:P.showticklabels,labelalias:P.labelalias,tickfont:P.tickfont,tickangle:P.tickangle,tickprefix:P.tickprefix,showtickprefix:P.showtickprefix,ticksuffix:P.ticksuffix,showticksuffix:P.showticksuffix,showexponent:P.showexponent,exponentformat:P.exponentformat,minexponent:P.minexponent,separatethousands:P.separatethousands,tickformat:P.tickformat,tickformatstops:P.tickformatstops,hoverformat:P.hoverformat,showline:P.showline,linecolor:P.linecolor,linewidth:P.linewidth,showgrid:P.showgrid,gridcolor:i({},P.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:P.gridwidth,zeroline:P.zeroline,zerolinecolor:P.zerolinecolor,zerolinewidth:P.zerolinewidth,_deprecated:{title:P._deprecated.title,titlefont:P._deprecated.titlefont}},"plot","from-root")},3277:function(G,V,e){var m=e(84267).mix,P=e(71828),i=e(44467),L=e(77894),A=e(951),v=e(71453),p=["xaxis","yaxis","zaxis"],t=100*(204-68)/(255-68);G.exports=function(s,n,l){var c,u;function g(h,o){return P.coerce(c,u,L,h,o)}for(var f=0;f<p.length;f++){var w=p[f];c=s[w]||{},u=i.newContainer(n,w),u._id=w[0]+l.scene,u._name=w,A(c,u,g,l),v(c,u,g,{font:l.font,letter:w[0],data:l.data,showGrid:!0,noTickson:!0,noTicklabelmode:!0,noTicklabelstep:!0,noTicklabelposition:!0,noTicklabeloverflow:!0,bgColor:l.bgColor,calendar:l.calendar},l.fullLayout),g("gridcolor",m(u.color,l.bgColor,t).toRgbString()),g("title.text",w[0]),u.setScale=P.noop,g("showspikes")&&(g("spikesides"),g("spikethickness"),g("spikecolor",u.color)),g("showaxeslabels"),g("showbackground")&&g("backgroundcolor")}}},30422:function(G,V,e){var m=e(78614),P=e(71828),i=["xaxis","yaxis","zaxis"];function L(){this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[18,18,18],this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["Open Sans","Open Sans","Open Sans"],this.labelSize=[20,20,20],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[30,30,30],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[10,10,10],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!0,!0,!0],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._defaultTickPad=this.tickPad.slice(),this._defaultLabelPad=this.labelPad.slice(),this._defaultLineTickLength=this.lineTickLength.slice()}var A=L.prototype;A.merge=function(p,t){for(var r=this,s=0;s<3;++s){var n=t[i[s]];if(!n.visible){r.tickEnable[s]=!1,r.labelEnable[s]=!1,r.lineEnable[s]=!1,r.lineTickEnable[s]=!1,r.gridEnable[s]=!1,r.zeroEnable[s]=!1,r.backgroundEnable[s]=!1;continue}r.labels[s]=p._meta?P.templateString(n.title.text,p._meta):n.title.text,"font"in n.title&&(n.title.font.color&&(r.labelColor[s]=m(n.title.font.color)),n.title.font.family&&(r.labelFont[s]=n.title.font.family),n.title.font.size&&(r.labelSize[s]=n.title.font.size)),"showline"in n&&(r.lineEnable[s]=n.showline),"linecolor"in n&&(r.lineColor[s]=m(n.linecolor)),"linewidth"in n&&(r.lineWidth[s]=n.linewidth),"showgrid"in n&&(r.gridEnable[s]=n.showgrid),"gridcolor"in n&&(r.gridColor[s]=m(n.gridcolor)),"gridwidth"in n&&(r.gridWidth[s]=n.gridwidth),n.type==="log"?r.zeroEnable[s]=!1:"zeroline"in n&&(r.zeroEnable[s]=n.zeroline),"zerolinecolor"in n&&(r.zeroLineColor[s]=m(n.zerolinecolor)),"zerolinewidth"in n&&(r.zeroLineWidth[s]=n.zerolinewidth),"ticks"in n&&n.ticks?r.lineTickEnable[s]=!0:r.lineTickEnable[s]=!1,"ticklen"in n&&(r.lineTickLength[s]=r._defaultLineTickLength[s]=n.ticklen),"tickcolor"in n&&(r.lineTickColor[s]=m(n.tickcolor)),"tickwidth"in n&&(r.lineTickWidth[s]=n.tickwidth),"tickangle"in n&&(r.tickAngle[s]=n.tickangle==="auto"?-3600:Math.PI*-n.tickangle/180),"showticklabels"in n&&(r.tickEnable[s]=n.showticklabels),"tickfont"in n&&(n.tickfont.color&&(r.tickColor[s]=m(n.tickfont.color)),n.tickfont.family&&(r.tickFont[s]=n.tickfont.family),n.tickfont.size&&(r.tickSize[s]=n.tickfont.size)),"mirror"in n?["ticks","all","allticks"].indexOf(n.mirror)!==-1?(r.lineTickMirror[s]=!0,r.lineMirror[s]=!0):n.mirror===!0?(r.lineTickMirror[s]=!1,r.lineMirror[s]=!0):(r.lineTickMirror[s]=!1,r.lineMirror[s]=!1):r.lineMirror[s]=!1,"showbackground"in n&&n.showbackground!==!1?(r.backgroundEnable[s]=!0,r.backgroundColor[s]=m(n.backgroundcolor)):r.backgroundEnable[s]=!1}};function v(p,t){var r=new L;return r.merge(p,t),r}G.exports=v},24682:function(G,V,e){var m=e(71828),P=e(7901),i=e(73972),L=e(49119),A=e(3277),v=e(65500),p=e(27659).NG,t="gl3d";G.exports=function(n,l,c){var u=l._basePlotModules.length>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<f.length;w++)l("camera."+f[w]+".x"),l("camera."+f[w]+".y"),l("camera."+f[w]+".z");l("camera.projection.type");var h=!!l("aspectratio.x")&&!!l("aspectratio.y")&&!!l("aspectratio.z"),o=h?"manual":"auto",d=l("aspectmode",o);h||(s.aspectratio=n.aspectratio={x:1,y:1,z:1},d==="manual"&&(n.aspectmode="auto"),s.aspectmode=n.aspectmode);var M=p(c.fullData,t,c.id);A(s,n,{font:c.font,scene:c.id,data:M,bgColor:g,calendar:c.calendar,autotypenumbersDflt:c.autotypenumbersDflt,fullLayout:c.fullLayout}),i.getComponentMethod("annotations3d","handleDefaults")(s,n,c);var T=c.getDfltFromLayout("dragmode");if(T!==!1&&!T)if(T="orbit",s.camera&&s.camera.up){var C=s.camera.up.x,x=s.camera.up.y,S=s.camera.up.z;S!==0&&(!C||!x||!S||S/Math.sqrt(C*C+x*x+S*S)>.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<r.length;++n)s[n]=r[n].x;p[t]=s}return p}function A(v){for(var p=v.axesOptions,t=v.glplot.axesPixels,r=v.fullSceneLayout,s=[[],[],[]],n=0;n<3;++n){var l=r[i[n]];if(l._length=(t[n].hi-t[n].lo)*t[n].pixelsPerDataUnit/v.dataScale[n],Math.abs(l._length)===1/0||isNaN(l._length))s[n]=[];else{l._input_range=l.range.slice(),l.range[0]=t[n].lo/v.dataScale[n],l.range[1]=t[n].hi/v.dataScale[n],l._m=1/(v.dataScale[n]*t[n].pixelsPerDataUnit),l.range[0]===l.range[1]&&(l.range[0]-=1,l.range[1]+=1);var c=l.tickmode;if(l.tickmode==="auto"){l.tickmode="linear";var u=l.nticks||P.constrain(l._length/40,4,9);m.autoTicks(l,Math.abs(l.range[1]-l.range[0])/u)}for(var g=m.calcTicks(l,{msUTC:!0}),f=0;f<g.length;++f)g[f].x=g[f].x*v.dataScale[n],l.type==="date"&&(g[f].text=g[f].text.replace(/\<br\>/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<te.length;++Q)k=I.traces[te[Q]],k.data.hoverinfo!=="skip"&&k.handlePick(ce)&&(ae=k),k.setContourLevels&&k.setContourLevels();function Z(Oe,Ne,Ee){var xe=I.fullSceneLayout[Oe+"axis"];return xe.type!=="log"&&(Ne=xe.d2l(Ne)),r.hoverLabelText(xe,Ne,Ee)}if(ae!==null){var j=c(I.glplot.cameraParams,ce.dataCoordinate);k=ae.data;var K=B._fullData[k.index],ee=ce.index,oe={xLabel:Z("x",ce.traceCoordinate[0],k.xhoverformat),yLabel:Z("y",ce.traceCoordinate[1],k.yhoverformat),zLabel:Z("z",ce.traceCoordinate[2],k.zhoverformat)},q=s.castHoverinfo(K,I.fullLayout,ee),$=(q||"").split("+"),le=q&&q==="all";!K.hovertemplate&&!le&&($.indexOf("x")===-1&&(oe.xLabel=void 0),$.indexOf("y")===-1&&(oe.yLabel=void 0),$.indexOf("z")===-1&&(oe.zLabel=void 0),$.indexOf("text")===-1&&(ce.textLabel=void 0),$.indexOf("name")===-1&&(ae.name=void 0));var ie,he=[];k.type==="cone"||k.type==="streamtube"?(oe.uLabel=Z("x",ce.traceCoordinate[3],k.uhoverformat),(le||$.indexOf("u")!==-1)&&he.push("u: "+oe.uLabel),oe.vLabel=Z("y",ce.traceCoordinate[4],k.vhoverformat),(le||$.indexOf("v")!==-1)&&he.push("v: "+oe.vLabel),oe.wLabel=Z("z",ce.traceCoordinate[5],k.whoverformat),(le||$.indexOf("w")!==-1)&&he.push("w: "+oe.wLabel),oe.normLabel=ce.traceCoordinate[6].toPrecision(3),(le||$.indexOf("norm")!==-1)&&he.push("norm: "+oe.normLabel),k.type==="streamtube"&&(oe.divergenceLabel=ce.traceCoordinate[7].toPrecision(3),(le||$.indexOf("divergence")!==-1)&&he.push("divergence: "+oe.divergenceLabel)),ce.textLabel&&he.push(ce.textLabel),ie=he.join("<br>")):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("<br>")):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;Z<J[Q].length;++Z)ce=Y.d2l(J[Q][Z],0,te),!isNaN(ce)&&isFinite(ce)&&(k[0][N]=Math.min(k[0][N],ce),k[1][N]=Math.max(k[1][N],ce));else ce=Y.d2l(J[Q],0,te),!isNaN(ce)&&isFinite(ce)&&(k[0][N]=Math.min(k[0][N],ce),k[1][N]=Math.max(k[1][N],ce))}}function b(I,B){for(var k=I.fullSceneLayout,O=k.annotations||[],N=0;N<3;N++)for(var _=x[N],U=_.charAt(0),Y=k[_],J=0;J<O.length;J++){var te=O[J];if(te.visible){var ae=Y.r2l(te[U]);!isNaN(ae)&&isFinite(ae)&&(B[0][N]=Math.min(B[0][N],ae),B[1][N]=Math.max(B[1][N],ae))}}}T.plot=function(I,B,k){var O=this;if(O.plotArgs=[I,B,k],!O.glplot.contextLost){var N,_,U,Y,J,te,ae=B[O.id],ce=k[O.id];O.fullLayout=B,O.fullSceneLayout=ae,O.axesOptions.merge(B,ae),O.spikeOptions.merge(ae),O.setViewport(ae),O.updateFx(ae.dragmode,ae.hovermode),O.camera.enableWheel=O.graphDiv._context._scrollZoom.gl3d,O.glplot.setClearColor(n(ae.bgcolor)),O.setConvert(J),I?Array.isArray(I)||(I=[I]):I=[];var Q=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(U=0;U<I.length;++U)N=I[U],!(N.visible!==!0||N._length===0)&&S(this,N,Q);b(this,Q);var Z=[1,1,1];for(Y=0;Y<3;++Y)Q[1][Y]===Q[0][Y]?Z[Y]=1:Z[Y]=1/(Q[1][Y]-Q[0][Y]);for(O.dataScale=Z,O.convertAnnotations(this),U=0;U<I.length;++U)N=I[U],!(N.visible!==!0||N._length===0)&&(_=O.traces[N.uid],_?_.data.type===N.type?_.update(N):(_.dispose(),_=N._module.plot(this,N),O.traces[N.uid]=_):(_=N._module.plot(this,N),O.traces[N.uid]=_),_.name=N.name);var j=Object.keys(O.traces);e:for(U=0;U<j.length;++U){for(Y=0;Y<I.length;++Y)if(I[Y].uid===j[U]&&I[Y].visible===!0&&I[Y]._length!==0)continue e;_=O.traces[j[U]],_.dispose(),delete O.traces[j[U]]}O.glplot.objects.sort(function(qe,$e){return qe._trace.data.index-$e._trace.data.index});var K=[[0,0,0],[0,0,0]],ee={};for(U=0;U<3;++U){J=ae[x[U]],te=J.type,te in ee?(ee[te].acc*=Z[U],ee[te].count+=1):ee[te]={acc:Z[U],count:1};var oe;if(J.autorange){K[0][U]=1/0,K[1][U]=-1/0;var q=O.glplot.objects,$=O.fullSceneLayout.annotations||[],le=J._name.charAt(0);for(Y=0;Y<q.length;Y++){var ie=q[Y],he=ie.bounds,me=ie._trace.data._pad||0;ie.constructor.name==="ErrorBars"&&J._lowerLogErrorBound?K[0][U]=Math.min(K[0][U],J._lowerLogErrorBound):K[0][U]=Math.min(K[0][U],he[0][U]/Z[U]-me),K[1][U]=Math.max(K[1][U],he[1][U]/Z[U]+me)}for(Y=0;Y<$.length;Y++){var Me=$[Y];if(Me.visible){var Te=J.r2l(Me[le]);K[0][U]=Math.min(K[0][U],Te),K[1][U]=Math.max(K[1][U],Te)}}if("rangemode"in J&&J.rangemode==="tozero"&&(K[0][U]=Math.min(K[0][U],0),K[1][U]=Math.max(K[1][U],0)),K[0][U]>K[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;O<N;++O,--N)for(var _=0;_<B;++_)for(var U=0;U<4;++U){var Y=4*(B*O+_)+U,J=4*(B*N+_)+U,te=I[Y];I[Y]=I[J],I[J]=te}}function z(I,B,k){for(var O=0;O<k;++O)for(var N=0;N<B;++N){var _=4*(B*O+N),U=I[_+3];if(U>0)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;A<i;A++)L[A]=[e[A],m[A],P[A]];return L}},10820:function(G,V,e){var m=e(41940),P=e(85594),i=e(22399),L=e(29241),A=e(53777),v=e(35025),p=e(1426).extendFlat,t=m({editType:"calc"});t.family.dflt='"Open Sans", verdana, arial, sans-serif',t.size.dflt=12,t.color.dflt=i.defaultLine,G.exports={font:t,title:{text:{valType:"string",editType:"layoutstyle"},font:m({editType:"layoutstyle"}),xref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},yref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},x:{valType:"number",min:0,max:1,dflt:.5,editType:"layoutstyle"},y:{valType:"number",min:0,max:1,dflt:"auto",editType:"layoutstyle"},xanchor:{valType:"enumerated",dflt:"auto",values:["auto","left","center","right"],editType:"layoutstyle"},yanchor:{valType:"enumerated",dflt:"auto",values:["auto","top","middle","bottom"],editType:"layoutstyle"},pad:p(v({editType:"layoutstyle"}),{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},editType:"layoutstyle"},uniformtext:{mode:{valType:"enumerated",values:[!1,"hide","show"],dflt:!1,editType:"plot"},minsize:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"},autosize:{valType:"boolean",dflt:!1,editType:"none"},width:{valType:"number",min:10,dflt:700,editType:"plot"},height:{valType:"number",min:10,dflt:450,editType:"plot"},minreducedwidth:{valType:"number",min:2,dflt:64,editType:"plot"},minreducedheight:{valType:"number",min:2,dflt:64,editType:"plot"},margin:{l:{valType:"number",min:0,dflt:80,editType:"plot"},r:{valType:"number",min:0,dflt:80,editType:"plot"},t:{valType:"number",min:0,dflt:100,editType:"plot"},b:{valType:"number",min:0,dflt:80,editType:"plot"},pad:{valType:"number",min:0,dflt:0,editType:"plot"},autoexpand:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},computed:{valType:"any",editType:"none"},paper_bgcolor:{valType:"color",dflt:i.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:i.background,editType:"layoutstyle"},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},separators:{valType:"string",editType:"plot"},hidesources:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:{valType:"boolean",editType:"legend"},colorway:{valType:"colorlist",dflt:i.defaults,editType:"calc"},datarevision:{valType:"any",editType:"calc"},uirevision:{valType:"any",editType:"none"},editrevision:{valType:"any",editType:"none"},selectionrevision:{valType:"any",editType:"none"},template:{valType:"any",editType:"calc"},newshape:L.newshape,activeshape:L.activeshape,newselection:A.newselection,activeselection:A.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:p({},P.transition,{editType:"none"}),_deprecated:{title:{valType:"string",editType:"layoutstyle"},titlefont:m({editType:"layoutstyle"})}}},77734:function(G,V,e){var m=e(78607),P="1.10.1",i='© <a target="_blank" href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',L=['© <a target="_blank" href="https://carto.com/">Carto</a>',i].join(" "),A=['Map tiles by <a target="_blank" href="https://stamen.com">Stamen Design</a>','under <a target="_blank" href="https://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>',"|",'Data by <a target="_blank" href="https://openstreetmap.org">OpenStreetMap</a> contributors','under <a target="_blank" href="https://www.openstreetmap.org/copyright">ODbL</a>'].join(" "),v=['Map tiles by <a target="_blank" href="https://stamen.com">Stamen Design</a>','under <a target="_blank" href="https://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>',"|",'Data by <a target="_blank" href="https://openstreetmap.org">OpenStreetMap</a> contributors','under <a target="_blank" href="https://creativecommons.org/licenses/by-sa/3.0">CC BY SA</a>'].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;M<o.length;M++){var T=o[M],C=A(h,n,T),x=w[T],S=x._subplot;S||(S=new s(f,T),w[T]._subplot=S),S.viewInitial||(S.viewInitial={center:P.extendFlat({},x.center),zoom:x.zoom,bearing:x.bearing,pitch:x.pitch}),S.plot(C,w,f._promises)}},V.clean=function(g,f,w,h){for(var o=h._subplots[n]||[],d=0;d<o.length;d++){var M=o[d];!f[M]&&h[M]._subplot&&h[M]._subplot.destroy()}},V.toSVG=function(g){for(var f=g._fullLayout,w=f._subplots[n],h=f._size,o=0;o<w.length;o++){var d=f[w[o]],M=d.domain,T=d._subplot,C=T.toImage("png"),x=f._glimages.append("svg:image");x.attr({xmlns:v.svg,"xlink:href":C,x:h.l+h.w*M.x[0],y:h.t+h.h*(1-M.y[1]),width:h.w*(M.x[1]-M.x[0]),height:h.h*(M.y[1]-M.y[0]),preserveAspectRatio:"none"});var S=p.select(d._subplot.div),b=S.select(".mapboxgl-ctrl-logo").node().offsetParent===null;if(!b){var a=f._glimages.append("g");a.attr("transform",i(h.l+h.w*M.x[0]+10,h.t+h.h*(1-M.y[0])-31)),a.append("path").attr("d",l.mapboxLogo.path0).style({opacity:.9,fill:"#ffffff","enable-background":"new"}),a.append("path").attr("d",l.mapboxLogo.path1).style("opacity",.35).style("enable-background","new"),a.append("path").attr("d",l.mapboxLogo.path2).style("opacity",.35).style("enable-background","new"),a.append("polygon").attr("points",l.mapboxLogo.polygon).style({opacity:.9,fill:"#ffffff","enable-background":"new"})}var E=S.select(".mapboxgl-ctrl-attrib").text().replace("Improve this map",""),y=f._glimages.append("g"),z=y.append("text");z.text(E).classed("static-attribution",!0).attr({"font-size":12,"font-family":"Arial",color:"rgba(0, 0, 0, 0.75)","text-anchor":"end","data-unformatted":E});var I=t.bBox(z.node()),B=h.w*(M.x[1]-M.x[0]);if(I.width>B/2){var k=E.split("|").join("<br>");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;C<f.length;C++){var x=w[f[C]],S=x.accesstoken;u(x.style)&&(S?P.pushUnique(o,S):(u(x._input.style)&&(P.error("Uses Mapbox map style, but did not set an access token."),M=!0),T=!0)),S&&P.pushUnique(d,S)}if(T){var b=M?l.noAccessTokenErrorMsg:l.missingStyleErrorMsg;throw P.error(b),new Error(b)}return o.length?(o.length>1&&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;h<w.length;h++){var o=f[w[h]]._subplot;o.updateFx(f)}}},67911:function(G,V,e){var m=e(71828),P=e(63893).sanitizeHTML,i=e(13056),L=e(77734);function A(s,n){this.subplot=s,this.uid=s.uid+"-"+n,this.index=n,this.idSource="source-"+this.uid,this.idLayer=L.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var v=A.prototype;v.update=function(n){this.visible?this.needsNewImage(n)?this.updateImage(n):this.needsNewSource(n)?(this.removeLayer(),this.updateSource(n),this.updateLayer(n)):this.needsNewLayer(n)?this.updateLayer(n):this.updateStyle(n):(this.updateSource(n),this.updateLayer(n)),this.visible=p(n)},v.needsNewImage=function(s){var n=this.subplot.map;return n.getSource(this.idSource)&&this.sourceType==="image"&&s.sourcetype==="image"&&(this.source!==s.source||JSON.stringify(this.coordinates)!==JSON.stringify(s.coordinates))},v.needsNewSource=function(s){return this.sourceType!==s.sourcetype||JSON.stringify(this.source)!==JSON.stringify(s.source)||this.layerType!==s.type},v.needsNewLayer=function(s){return this.layerType!==s.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},v.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},v.updateImage=function(s){var n=this.subplot.map;n.getSource(this.idSource).updateImage({url:s.source,coordinates:s.coordinates});var l=this.findFollowingMapboxLayerId(this.lookupBelow());l!==null&&this.subplot.map.moveLayer(this.idLayer,l)},v.updateSource=function(s){var n=this.subplot.map;if(n.getSource(this.idSource)&&n.removeSource(this.idSource),this.sourceType=s.sourcetype,this.source=s.source,!!p(s)){var l=r(s);n.addSource(this.idSource,l)}},v.findFollowingMapboxLayerId=function(s){if(s==="traces")for(var n=this.subplot.getMapLayers(),l=0;l<n.length;l++){var c=n[l].id;if(typeof c=="string"&&c.indexOf(L.traceLayerPrefix)===0){s=c;break}}return s},v.updateLayer=function(s){var n=this.subplot,l=t(s),c=this.lookupBelow(),u=this.findFollowingMapboxLayerId(c);this.removeLayer(),p(s)&&n.addLayer({id:this.idLayer,source:this.idSource,"source-layer":s.sourcelayer||"",type:s.type,minzoom:s.minzoom,maxzoom:s.maxzoom,layout:l.layout,paint:l.paint},u),this.layerType=s.type,this.below=c},v.updateStyle=function(s){if(p(s)){var n=t(s);this.subplot.setOptions(this.idLayer,"setLayoutProperty",n.layout),this.subplot.setOptions(this.idLayer,"setPaintProperty",n.paint)}},v.removeLayer=function(){var s=this.subplot.map;s.getLayer(this.idLayer)&&s.removeLayer(this.idLayer)},v.dispose=function(){var s=this.subplot.map;s.getLayer(this.idLayer)&&s.removeLayer(this.idLayer),s.getSource(this.idSource)&&s.removeSource(this.idSource)};function p(s){if(!s.visible)return!1;var n=s.source;if(Array.isArray(n)&&n.length>0){for(var l=0;l<n.length;l++)if(typeof n[l]!="string"||n[l].length===0)return!1;return!0}return m.isPlainObject(n)||typeof n=="string"&&n.length>0}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;a<C.length;a++){var I=C[a][0].trace,B=I._module;typeof I.below=="string"?E=I.below:B.getBelow&&(E=B.getBelow(I,this)),E===""&&(z=!0),y["trace-"+I.uid]=E||""}for(a=0;a<b.length;a++){var k=b[a];typeof k.below=="string"?E=k.below:z?E="traces":E="",y["layout-"+a]=E}var O={},N,_;for(N in y)E=y[N],O[E]?O[E].push(N):O[E]=[N];for(E in O){var U=O[E];if(U.length>1)for(a=0;a<U.length;a++)N=U[a],N.indexOf("trace-")===0?(_=N.split("trace-")[1],this.traceHash[_]&&(this.traceHash[_].below=null)):N.indexOf("layout-")===0&&(_=N.split("layout-")[1],this.layerList[_]&&(this.layerList[_].below=null))}};var o={choroplethmapbox:0,densitymapbox:1,scattermapbox:2};h.updateData=function(C){var x=this.traceHash,S,b,a,E,y=C.slice().sort(function(O,N){return o[O[0].trace.type]-o[N[0].trace.type]});for(a=0;a<y.length;a++){var z=y[a];b=z[0].trace,S=x[b.uid];var I=!1;S&&(S.type===b.type?(S.update(z),I=!0):S.dispose()),!I&&b._module&&(x[b.uid]=b._module.plot(this,z))}var B=Object.keys(x);e:for(a=0;a<B.length;a++){var k=B[a];for(E=0;E<C.length;E++)if(b=C[E][0].trace,k===b.uid)continue e;S=x[k],S.dispose(),delete x[k]}},h.updateLayout=function(C){var x=this.map,S=C[this.id];!this.dragging&&!this.wheeling&&(x.setCenter(T(S.center)),x.setZoom(S.zoom),x.setBearing(S.bearing),x.setPitch(S.pitch)),this.updateLayers(C),this.updateFramework(C),this.updateFx(C),this.map.resize(),this.gd._context._scrollZoom.mapbox?x.scrollZoom.enable():x.scrollZoom.disable()},h.resolveOnRender=function(C){var x=this.map;x.on("render",function S(){x.loaded()&&(x.off("render",S),setTimeout(C,10))})},h.rejectOnError=function(C){var x=this.map;function S(){C(new Error(g.mapOnErrorMsg))}x.once("error",S),x.once("style.error",S),x.once("source.error",S),x.once("tile.error",S),x.once("layer.error",S)},h.createFramework=function(C){var x=this,S=x.div=document.createElement("div");S.id=x.uid,S.style.position="absolute",x.container.appendChild(S),x.xaxis={_id:"x",c2p:function(b){return x.project(b).x}},x.yaxis={_id:"y",c2p:function(b){return x.project(b).y}},x.updateFramework(C),x.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},A.setConvert(x.mockAxis,C)},h.initFx=function(C,x){var S=this,b=S.gd,a=S.map;a.on("moveend",function(z){if(S.map){var I=b._fullLayout;if(z.originalEvent||S.wheeling){var B=I[S.id];L.call("_storeDirectGUIEdit",b.layout,I._preGUI,S.getViewEdits(B));var k=S.getView();B._input.center=B.center=k.center,B._input.zoom=B.zoom=k.zoom,B._input.bearing=B.bearing=k.bearing,B._input.pitch=B.pitch=k.pitch,b.emit("plotly_relayout",S.getViewEditsWithDerived(k))}z.originalEvent&&z.originalEvent.type==="mouseup"?S.dragging=!1:S.wheeling&&(S.wheeling=!1),I._rehover&&I._rehover()}}),a.on("wheel",function(){S.wheeling=!0}),a.on("mousemove",function(z){var I=S.div.getBoundingClientRect(),B=[z.originalEvent.offsetX,z.originalEvent.offsetY];z.target.getBoundingClientRect=function(){return I},S.xaxis.p2c=function(){return a.unproject(B).lng},S.yaxis.p2c=function(){return a.unproject(B).lat},b._fullLayout._rehover=function(){b._fullLayout._hoversubplot===S.id&&b._fullLayout[S.id]&&p.hover(b,z,S.id)},p.hover(b,z,S.id),b._fullLayout._hoversubplot=S.id});function E(){p.loneUnhover(x._hoverlayer)}a.on("dragstart",function(){S.dragging=!0,E()}),a.on("zoomstart",E),a.on("mouseout",function(){b._fullLayout._hoversubplot=null});function y(){var z=S.getView();b.emit("plotly_relayouting",S.getViewEditsWithDerived(z))}a.on("drag",y),a.on("zoom",y),a.on("dblclick",function(){var z=b._fullLayout[S.id];L.call("_storeDirectGUIEdit",b.layout,b._fullLayout._preGUI,S.getViewEdits(z));var I=S.viewInitial;a.setCenter(T(I.center)),a.setZoom(I.zoom),a.setBearing(I.bearing),a.setPitch(I.pitch);var B=S.getView();z._input.center=z.center=B.center,z._input.zoom=z.zoom=B.zoom,z._input.bearing=z.bearing=B.bearing,z._input.pitch=z.pitch=B.pitch,b.emit("plotly_doubleclick",null),b.emit("plotly_relayout",S.getViewEditsWithDerived(B))}),S.clearOutline=function(){c(S.dragOptions),l(S.dragOptions.gd)},S.onClickInPanFn=function(z){return function(I){var B=b._fullLayout.clickmode;B.indexOf("select")>-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<b.length;a++)b[a].dispose();for(b=this.layerList=[],a=0;a<S.length;a++)b.push(f(this,a,S[a]))}else for(a=0;a<S.length;a++)b[a].update(S[a])},h.destroy=function(){this.map&&(this.map.remove(),this.map=null,this.container.removeChild(this.div))},h.toImage=function(){return this.map.stop(),this.map.getCanvas().toDataURL()},h.setOptions=function(C,x,S){for(var b in S)this.map[x](C,b,S[b])},h.getMapLayers=function(){return this.map.getStyle().layers},h.addLayer=function(C,x){var S=this.map;if(typeof x=="string"){if(x===""){S.addLayer(C,x);return}for(var b=this.getMapLayers(),a=0;a<b.length;a++)if(x===b[a].id){S.addLayer(C,x);return}P.warn(["Trying to add layer with *below* value",x,"referencing a layer that does not exist","or that does not yet exist."].join(" "))}S.addLayer(C)},h.project=function(C){return this.map.project(new m.LngLat(C[0],C[1]))},h.getView=function(){var C=this.map,x=C.getCenter(),S=x.lng,b=x.lat,a={lon:S,lat:b},E=C.getCanvas(),y=parseInt(E.style.width),z=parseInt(E.style.height);return{center:a,zoom:C.getZoom(),bearing:C.getBearing(),pitch:C.getPitch(),_derived:{coordinates:[C.unproject([0,0]).toArray(),C.unproject([y,0]).toArray(),C.unproject([y,z]).toArray(),C.unproject([0,z]).toArray()]}}},h.getViewEdits=function(C){for(var x=this.id,S=["center","zoom","bearing","pitch"],b={},a=0;a<S.length;a++){var E=S[a];b[x+"."+E]=C[E]}return b},h.getViewEditsWithDerived=function(C){var x=this.id,S=this.getViewEdits(C);return S[x+"._derived"]=C._derived,S};function d(C){var x={};return P.isPlainObject(C)?(x.id=C.id,x.style=C):typeof C=="string"?(x.id=C,g.styleValuesMapbox.indexOf(C)!==-1?x.style=M(C):g.stylesNonMapbox[C]?x.style=g.stylesNonMapbox[C]:x.style=C):(x.id=g.styleValueDflt,x.style=M(g.styleValueDflt)),x.transition={duration:0,delay:0},x}function M(C){return g.styleUrlPrefix+C+"-"+g.styleUrlSuffix}function T(C){return[C.lon,C.lat]}G.exports=w},35025:function(G){G.exports=function(V){var e=V.editType;return{t:{valType:"number",dflt:0,editType:e},r:{valType:"number",dflt:0,editType:e},b:{valType:"number",dflt:0,editType:e},l:{valType:"number",dflt:0,editType:e},editType:e}}},74875:function(G,V,e){var m=e(39898),P=e(84096).Dq,i=e(60721).FF,L=e(92770),A=e(73972),v=e(86281),p=e(44467),t=e(71828),r=e(7901),s=e(50606).BADNUM,n=e(41675),l=e(51873).clearOutline,c=e(21479),u=e(85594),g=e(31391),f=e(27659).a0,w=t.relinkPrivateKeys,h=t._,o=G.exports={};t.extendFlat(o,A),o.attributes=e(9012),o.attributes.type.values=o.allTypes,o.fontAttrs=e(41940),o.layoutAttributes=e(10820),o.fontWeight="normal";var d=o.transformsRegistry,M=e(31137);o.executeAPICommand=M.executeAPICommand,o.computeAPICommandBindings=M.computeAPICommandBindings,o.manageCommandObserver=M.manageCommandObserver,o.hasSimpleAPICommandBindings=M.hasSimpleAPICommandBindings,o.redrawText=function(j){return j=t.getGraphDiv(j),new Promise(function(K){setTimeout(function(){j._fullLayout&&(A.getComponentMethod("annotations","draw")(j),A.getComponentMethod("legend","draw")(j),A.getComponentMethod("colorbar","draw")(j),K(o.previousPromises(j)))},300)})},o.resize=function(j){j=t.getGraphDiv(j);var K,ee=new Promise(function(oe,q){(!j||t.isHidden(j))&&q(new Error("Resize must be passed a displayed plot div element.")),j._redrawTimer&&clearTimeout(j._redrawTimer),j._resolveResize&&(K=j._resolveResize),j._resolveResize=oe,j._redrawTimer=setTimeout(function(){if(!j.layout||j.layout.width&&j.layout.height||t.isHidden(j)){oe(j);return}delete j.layout.width,delete j.layout.height;var $=j.changed;j.autoplay=!0,A.call("relayout",j,{autosize:!0}).then(function(){j.changed=$,j._resolveResize===oe&&(delete j._resolveResize,oe(j))})},100)});return K&&K(ee),ee},o.previousPromises=function(j){if((j._promises||[]).length)return Promise.all(j._promises).then(function(){j._promises=[]})},o.addLinks=function(j){if(!(!j._context.showLink&&!j._context.showSources)){var K=j._fullLayout,ee=t.ensureSingle(K._paper,"text","js-plot-link-container",function(he){he.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:r.defaultLine,"pointer-events":"all"}).each(function(){var me=m.select(this);me.append("tspan").classed("js-link-to-tool",!0),me.append("tspan").classed("js-link-spacer",!0),me.append("tspan").classed("js-sourcelinks",!0)})}),oe=ee.node(),q={y:K._paper.attr("height")-9};document.body.contains(oe)&&oe.getComputedTextLength()>=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;Te<qe.length;Te++)t.pushUnique(Fe.xaxis,qe[Te]);for(Te=0;Te<$e.length;Te++)t.pushUnique(Fe.yaxis,$e[Te]);for(var et in nt)t.pushUnique(Fe.cartesian,et)}if(q._has=o._hasPlotType.bind(q),le.length===ie.length)for(Te=0;Te<ie.length;Te++)w(ie[Te],le[Te]);o.supplyLayoutModuleDefaults($,q,ie,j._transitionData);var ct=q._visibleModules,dt=[];for(Te=0;Te<ct.length;Te++){var pt=ct[Te].crossTraceDefaults;pt&&t.pushUnique(dt,pt)}for(Te=0;Te<dt.length;Te++)dt[Te](ie,q);q._hasOnlyLargeSploms=q._basePlotModules.length===1&&q._basePlotModules[0].name==="splom"&&qe.length>15&&$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;Te<ie.length;Te++)be=ie[Te]._fullInput.uid,Pe[be]||(ze[be]={}),Pe[be]="new";for(be in Pe)Pe[be]==="old"&&delete ze[be];O(q),A.getComponentMethod("rangeslider","makeData")(q),!ee&&me.length===ie.length&&o.supplyDefaultsUpdateCalc(me,ie)},o.supplyDefaultsUpdateCalc=function(j,K){for(var ee=0;ee<K.length;ee++){var oe=K[ee],q=(j[ee]||[])[0];if(q&&q.trace){var $=q.trace;if($._hasCalcTransform){var le=$._arrayAttrs,ie,he,me;for(ie=0;ie<le.length;ie++)he=le[ie],me=t.nestedProperty($,he).get().slice(),t.nestedProperty(oe,he).set(me)}q.trace=oe}}};function S(j,K){var ee=K.length,oe=[],q,$;for(q=0;q<j.length;q++){var le=j[q]._fullInput;le!==$&&oe.push(le),$=le}var ie=oe.length,he=new Array(ee),me={};function Me(Ne,Ee){he[Ee]=Ne,me[Ne]=1}function Te(Ne,Ee){if(Ne&&typeof Ne=="string"&&!me[Ne])return Me(Ne,Ee),!0}for(q=0;q<ee;q++){var Oe=K[q].uid;typeof Oe=="number"&&(Oe=String(Oe)),!Te(Oe,q)&&(q<ie&&Te(oe[q].uid,q)||Me(t.randstr(me),q))}return he}function b(){var j=A.collectableSubplotTypes,K={},ee,oe;if(!j){j=[];var q=A.subplotsRegistry;for(var $ in q){var le=q[$],ie=le.attr;if(ie&&(j.push($),Array.isArray(ie)))for(oe=0;oe<ie.length;oe++)t.pushUnique(j,ie[oe])}}for(ee=0;ee<j.length;ee++)K[j[ee]]=[];return K}function a(j,K){var ee=j._context.locale;ee||(ee="en-US");var oe=!1,q={};function $(Te){for(var Oe=!0,Ne=0;Ne<K.length;Ne++){var Ee=K[Ne];q[Ee]||(Te[Ee]?q[Ee]=Te[Ee]:Oe=!1)}Oe&&(oe=!0)}for(var le=0;le<2;le++){for(var ie=j._context.locales,he=0;he<2;he++){var me=(ie[ee]||{}).format;if(me&&($(me),oe))break;ie=A.localeRegistry}var Me=ee.split("-")[0];if(oe||Me===ee)break;ee=Me}return oe||$(A.localeRegistry.en.format),q}function E(j,K){return j.decimal=K.charAt(0),j.thousands=K.charAt(1),{numberFormat:function(ee){try{ee=i(j).format(t.adjustFormat(ee))}catch{return t.warnBadFormat(ee),t.noFormat}return ee},timeFormat:P(j).utcFormat}}function y(j,K){var ee,oe=[];K.meta&&(ee=K._meta={meta:K.meta,layout:{meta:K.meta}});for(var q=0;q<j.length;q++){var $=j[q];$.meta?oe[$.index]=$._meta={meta:$.meta}:K.meta&&($._meta={meta:K.meta}),K.meta&&($._meta.layout={meta:K.meta})}oe.length&&(ee||(ee=K._meta={}),ee.data=oe)}o.createTransitionData=function(j){j._transitionData||(j._transitionData={}),j._transitionData._frames||(j._transitionData._frames=[]),j._transitionData._frameHash||(j._transitionData._frameHash={}),j._transitionData._counter||(j._transitionData._counter=0),j._transitionData._interruptCallbacks||(j._transitionData._interruptCallbacks=[])},o._hasPlotType=function(j){var K,ee=this._basePlotModules||[];for(K=0;K<ee.length;K++)if(ee[K].name===j)return!0;var oe=this._modules||[];for(K=0;K<oe.length;K++){var q=oe[K].name;if(q===j)return!0;var $=A.modules[q];if($&&$.categories[j])return!0}return!1},o.cleanPlot=function(j,K,ee,oe){var q,$,le=oe._basePlotModules||[];for(q=0;q<le.length;q++){var ie=le[q];ie.clean&&ie.clean(j,K,ee,oe)}var he=oe._has&&oe._has("gl"),me=K._has&&K._has("gl");he&&!me&&oe._glcontainer!==void 0&&(oe._glcontainer.selectAll(".gl-canvas").remove(),oe._glcontainer.selectAll(".no-webgl").remove(),oe._glcanvas=null);var Me=!!oe._infolayer;e:for(q=0;q<ee.length;q++){var Te=ee[q],Oe=Te.uid;for($=0;$<j.length;$++){var Ne=j[$];if(Oe===Ne.uid)continue e}Me&&oe._infolayer.select(".cb"+Oe).remove()}},o.linkSubplots=function(j,K,ee,oe){var q,$,le=oe._plots||{},ie=K._plots={},he=K._subplots,me={_fullData:j,_fullLayout:K},Me=he.cartesian.concat(he.gl2d||[]);for(q=0;q<Me.length;q++){var Te=Me[q],Oe=le[Te],Ne=n.getFromId(me,Te,"x"),Ee=n.getFromId(me,Te,"y"),xe;for(Oe?xe=ie[Te]=Oe:(xe=ie[Te]={},xe.id=Te),Ne._counterAxes.push(Ee._id),Ee._counterAxes.push(Ne._id),Ne._subplotsWith.push(Te),Ee._subplotsWith.push(Te),xe.xaxis=Ne,xe.yaxis=Ee,xe._hasClipOnAxisFalse=!1,$=0;$<j.length;$++){var Se=j[$];if(Se.xaxis===xe.xaxis._id&&Se.yaxis===xe.yaxis._id&&Se.cliponaxis===!1){xe._hasClipOnAxisFalse=!0;break}}}var Ue=n.list(me,null,!0),He;for(q=0;q<Ue.length;q++){He=Ue[q];var Fe=null;He.overlaying&&(Fe=n.getFromId(me,He.overlaying),Fe&&Fe.overlaying&&(He.overlaying=!1,Fe=null)),He._mainAxis=Fe||He,Fe&&(He.domain=Fe.domain.slice()),He._anchorAxis=He.anchor==="free"?null:n.getFromId(me,He.anchor)}for(q=0;q<Ue.length;q++)if(He=Ue[q],He._counterAxes.sort(n.idSort),He._subplotsWith.sort(t.subplotSort),He._mainSubplot=z(He,K),He._counterAxes.length&&(He.spikemode&&He.spikemode.indexOf("across")!==-1||He.automargin&&He.mirror&&He.anchor!=="free"||A.getComponentMethod("rangeslider","isVisible")(He))){var Ge=1,nt=0;for($=0;$<He._counterAxes.length;$++){var qe=n.getFromId(me,He._counterAxes[$]);Ge=Math.min(Ge,qe.domain[0]),nt=Math.max(nt,qe.domain[1])}Ge<nt&&(He._counterDomainMin=Ge,He._counterDomainMax=nt)}};function z(j,K){var ee={_fullLayout:K},oe=j._id.charAt(0)==="x",q=j._mainAxis._anchorAxis,$="",le="",ie="";if(q&&(ie=q._mainAxis._id,$=oe?j._id+ie:ie+j._id),!$||!K._plots[$]){$="";for(var he=j._counterAxes,me=0;me<he.length;me++){var Me=he[me],Te=oe?j._id+Me:Me+j._id;le||(le=Te);var Oe=n.getFromId(ee,Me);if(ie&&Oe.overlaying===ie){$=Te;break}}}return $||le}o.clearExpandedTraceDefaultColors=function(j){var K,ee,oe;function q(le,ie,he,me){ee[me]=ie,ee.length=me+1,le.valType==="color"&&le.dflt===void 0&&K.push(ee.join("."))}for(ee=[],K=j._module._colorAttrs,K||(j._module._colorAttrs=K=[],v.crawl(j._module.attributes,q)),oe=0;oe<K.length;oe++){var $=t.nestedProperty(j,"_input."+K[oe]);$.get()||t.nestedProperty(j,K[oe]).set(null)}},o.supplyDataDefaults=function(j,K,ee,oe){var q=oe._modules,$=oe._visibleModules,le=oe._basePlotModules,ie=0,he=0,me,Me,Te;oe._transformModules=[];function Oe($e){K.push($e);var et=$e._module;et&&(t.pushUnique(q,et),$e.visible===!0&&t.pushUnique($,et),t.pushUnique(le,$e._module.basePlotModule),ie++,$e._input.visible!==!1&&he++)}var Ne={},Ee=[],xe=(ee.template||{}).data||{},Se=p.traceTemplater(xe);for(me=0;me<j.length;me++){if(Te=j[me],Me=Se.newTrace(Te),Me.uid=oe._traceUids[me],o.supplyTraceDefaults(Te,Me,he,oe,me),Me.index=me,Me._input=Te,Me._expandedIndex=ie,Me.transforms&&Me.transforms.length)for(var Ue=Te.visible!==!1&&Me.visible===!1,He=B(Me,K,ee,oe),Fe=0;Fe<He.length;Fe++){var Ge=He[Fe],nt={_template:Me._template,type:Me.type,uid:Me.uid+Fe};Ue&&Ge.visible===!1&&delete Ge.visible,o.supplyTraceDefaults(Ge,nt,ie,oe,me),w(nt,Ge),nt.index=me,nt._input=Te,nt._fullInput=Me,nt._expandedIndex=ie,nt._expandedInput=Ge,Oe(nt)}else Me._fullInput=Me,Me._expandedInput=Me,Oe(Me);A.traceIs(Me,"carpetAxis")&&(Ne[Me.carpet]=Me),A.traceIs(Me,"carpetDependent")&&Ee.push(me)}for(me=0;me<Ee.length;me++)if(Me=K[Ee[me]],!!Me.visible){var qe=Ne[Me.carpet];if(Me._carpet=qe,!qe||!qe.visible){Me.visible=!1;continue}Me.xaxis=qe.xaxis,Me.yaxis=qe.yaxis}},o.supplyAnimationDefaults=function(j){j=j||{};var K,ee={};function oe(q,$){return t.coerce(j||{},ee,u,q,$)}if(oe("mode"),oe("direction"),oe("fromcurrent"),Array.isArray(j.frame))for(ee.frame=[],K=0;K<j.frame.length;K++)ee.frame[K]=o.supplyAnimationFrameDefaults(j.frame[K]||{});else ee.frame=o.supplyAnimationFrameDefaults(j.frame||{});if(Array.isArray(j.transition))for(ee.transition=[],K=0;K<j.transition.length;K++)ee.transition[K]=o.supplyAnimationTransitionDefaults(j.transition[K]||{});else ee.transition=o.supplyAnimationTransitionDefaults(j.transition||{});return ee},o.supplyAnimationFrameDefaults=function(j){var K={};function ee(oe,q){return t.coerce(j||{},K,u.frame,oe,q)}return ee("duration"),ee("redraw"),K},o.supplyAnimationTransitionDefaults=function(j){var K={};function ee(oe,q){return t.coerce(j||{},K,u.transition,oe,q)}return ee("duration"),ee("easing"),K},o.supplyFrameDefaults=function(j){var K={};function ee(oe,q){return t.coerce(j,K,g,oe,q)}return ee("group"),ee("name"),ee("traces"),ee("baseframe"),ee("data"),ee("layout"),K},o.supplyTraceDefaults=function(j,K,ee,oe,q){var $=oe.colorway||r.defaults,le=$[ee%$.length],ie;function he(He,Fe){return t.coerce(j,K,o.attributes,He,Fe)}var me=he("visible");he("type"),he("name",oe._traceWord+" "+q),he("uirevision",oe.uirevision);var Me=o.getModule(K);if(K._module=Me,Me){var Te=Me.basePlotModule,Oe=Te.attr,Ne=Te.attributes;if(Oe&&Ne){var Ee=oe._subplots,xe="";if(me||Te.name!=="gl2d"){if(Array.isArray(Oe))for(ie=0;ie<Oe.length;ie++){var Se=Oe[ie],Ue=t.coerce(j,K,Ne,Se);Ee[Se]&&t.pushUnique(Ee[Se],Ue),xe+=Ue}else xe=t.coerce(j,K,Ne,Oe);Ee[Te.name]&&t.pushUnique(Ee[Te.name],xe)}}}return me&&(he("customdata"),he("ids"),he("meta"),A.traceIs(K,"showLegend")?(t.coerce(j,K,Me.attributes.showlegend?Me.attributes:o.attributes,"showlegend"),he("legend"),he("legendwidth"),he("legendgroup"),he("legendgrouptitle.text"),he("legendrank"),K._dfltShowLegend=!0):K._dfltShowLegend=!1,Me&&Me.supplyDefaults(j,K,le,oe),A.traceIs(K,"noOpacity")||he("opacity"),A.traceIs(K,"notLegendIsolatable")&&(K.visible=!!K.visible),A.traceIs(K,"noHover")||(K.hovertemplate||t.coerceHoverinfo(j,K,oe),K.type!=="parcats"&&A.getComponentMethod("fx","supplyDefaults")(j,K,le,oe)),Me&&Me.selectPoints&&he("selectedpoints"),o.supplyTransformDefaults(j,K,oe)),K};function I(j){var K=j.transforms;if(Array.isArray(K)&&K.length)for(var ee=0;ee<K.length;ee++){var oe=K[ee],q=oe._module||d[oe.type];if(q&&q.makesData)return!0}return!1}o.hasMakesDataTransform=I,o.supplyTransformDefaults=function(j,K,ee){if(K._length||I(j)){var oe=ee._globalTransforms||[],q=ee._transformModules||[];if(!(!Array.isArray(j.transforms)&&oe.length===0))for(var $=j.transforms||[],le=oe.concat($),ie=K.transforms=[],he=0;he<le.length;he++){var me=le[he],Me=me.type,Te=d[Me],Oe,Ne=!(me._module&&me._module===Te),Ee=Te&&typeof Te.transform=="function";Te||t.warn("Unrecognized transform type "+Me+"."),Te&&Te.supplyDefaults&&(Ne||Ee)?(Oe=Te.supplyDefaults(me,K,ee,j),Oe.type=Me,Oe._module=Te,t.pushUnique(q,Te)):Oe=t.extendFlat({},me),ie.push(Oe)}}};function B(j,K,ee,oe){for(var q=j.transforms,$=[j],le=0;le<q.length;le++){var ie=q[le],he=d[ie.type];he&&he.transform&&($=he.transform($,{transform:ie,fullTrace:j,fullData:K,layout:ee,fullLayout:oe,transformIndex:le}))}return $}o.supplyLayoutGlobalDefaults=function(j,K,ee){function oe(Te,Oe){return t.coerce(j,K,o.layoutAttributes,Te,Oe)}var q=j.template;t.isPlainObject(q)&&(K.template=q,K._template=q.layout,K._dataTemplate=q.data),oe("autotypenumbers");var $=t.coerceFont(oe,"font"),le=$.size;t.coerceFont(oe,"title.font",t.extendFlat({},$,{size:Math.round(le*1.4)})),oe("title.text",K._dfltTitle.plot),oe("title.xref");var ie=oe("title.yref");oe("title.pad.t"),oe("title.pad.r"),oe("title.pad.b"),oe("title.pad.l");var he=oe("title.automargin");oe("title.x"),oe("title.xanchor"),oe("title.y"),oe("title.yanchor"),he&&(ie==="paper"&&(K.title.y!==0&&(K.title.y=1),K.title.yanchor==="auto"&&(K.title.yanchor=K.title.y===0?"top":"bottom")),ie==="container"&&(K.title.y==="auto"&&(K.title.y=1),K.title.yanchor==="auto"&&(K.title.yanchor=K.title.y<.5?"bottom":"top")));var me=oe("uniformtext.mode");me&&oe("uniformtext.minsize"),oe("autosize",!(j.width&&j.height)),oe("width"),oe("height"),oe("minreducedwidth"),oe("minreducedheight"),oe("margin.l"),oe("margin.r"),oe("margin.t"),oe("margin.b"),oe("margin.pad"),oe("margin.autoexpand"),j.width&&j.height&&o.sanitizeMargins(K),A.getComponentMethod("grid","sizeDefaults")(j,K),oe("paper_bgcolor"),oe("separators",ee.decimal+ee.thousands),oe("hidesources"),oe("colorway"),oe("datarevision");var Me=oe("uirevision");oe("editrevision",Me),oe("selectionrevision",Me),A.getComponentMethod("modebar","supplyLayoutDefaults")(j,K),A.getComponentMethod("shapes","supplyDrawNewShapeDefaults")(j,K,oe),A.getComponentMethod("selections","supplyDrawNewSelectionDefaults")(j,K,oe),oe("meta"),t.isPlainObject(j.transition)&&(oe("transition.duration"),oe("transition.easing"),oe("transition.ordering")),A.getComponentMethod("calendars","handleDefaults")(j,K,"calendar"),A.getComponentMethod("fx","supplyLayoutGlobalDefaults")(j,K,oe),t.coerce(j,K,c,"scattermode")};function k(j){return typeof j=="string"&&j.substr(j.length-2)==="px"&&parseFloat(j)}o.plotAutoSize=function(K,ee,oe){var q=K._context||{},$=q.frameMargins,le,ie,he=t.isPlotDiv(K);if(he&&K.emit("plotly_autosize"),q.fillFrame)le=window.innerWidth,ie=window.innerHeight,document.body.style.overflow="hidden";else{var me=he?window.getComputedStyle(K):{};if(le=k(me.width)||k(me.maxWidth)||oe.width,ie=k(me.height)||k(me.maxHeight)||oe.height,L($)&&$>0){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;le<Te&&(le=Te),ie<Oe&&(ie=Oe);var Ne=!ee.width&&Math.abs(oe.width-le)>1,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;ie<Te.length;ie++)he=Te[ie],he.supplyLayoutDefaults&&he.supplyLayoutDefaults(j,K,ee);var Oe=K._transformModules;for(ie=0;ie<Oe.length;ie++)he=Oe[ie],he.supplyLayoutDefaults&&he.supplyLayoutDefaults(j,K,ee,oe);for(le in q)he=q[le],he.supplyLayoutDefaults&&he.supplyLayoutDefaults(j,K,ee)},o.purge=function(j){var K=j._fullLayout||{};K._glcontainer!==void 0&&(K._glcontainer.selectAll(".gl-canvas").remove(),K._glcontainer.remove(),K._glcanvas=null),K._modeBar&&K._modeBar.destroy(),j._transitionData&&(j._transitionData._interruptCallbacks&&(j._transitionData._interruptCallbacks.length=0),j._transitionData._animationRaf&&window.cancelAnimationFrame(j._transitionData._animationRaf)),t.clearThrottle(),t.clearResponsive(j),delete j.data,delete j.layout,delete j._fullData,delete j._fullLayout,delete j.calcdata,delete j.empty,delete j.fid,delete j.undoqueue,delete j.undonum,delete j.autoplay,delete j.changed,delete j._promises,delete j._redrawTimer,delete j._hmlumcount,delete j._hmpixcount,delete j._transitionData,delete j._transitioning,delete j._initialAutoSize,delete j._transitioningWithDuration,delete j._dragging,delete j._dragged,delete j._dragdata,delete j._hoverdata,delete j._snapshotInProgress,delete j._editing,delete j._mouseDownTime,delete j._legendMouseDownTime,j.removeAllListeners&&j.removeAllListeners()},o.style=function(j){var K=j._fullLayout._visibleModules,ee=[],oe;for(oe=0;oe<K.length;oe++){var q=K[oe];q.style&&t.pushUnique(ee,q.style)}for(oe=0;oe<ee.length;oe++)ee[oe](j)},o.sanitizeMargins=function(j){if(!(!j||!j.margin)){var K=j.width,ee=j.height,oe=j.margin,q=K-(oe.l+oe.r),$=ee-(oe.t+oe.b),le;q<0&&(le=(K-1)/(oe.l+oe.r),oe.l=Math.floor(le*oe.l),oe.r=Math.floor(le*oe.r)),$<0&&(le=(ee-1)/(oe.t+oe.b),oe.t=Math.floor(le*oe.t),oe.b=Math.floor(le*oe.b))}},o.clearAutoMarginIds=function(j){j._fullLayout._pushmarginIds={}},o.allowAutoMargin=function(j,K){j._fullLayout._pushmarginIds[K]=1};function O(j){var K=j.margin;if(!j._size){var ee=j._size={l:Math.round(K.l),r:Math.round(K.r),t:Math.round(K.t),b:Math.round(K.b),p:Math.round(K.pad)};ee.w=Math.round(j.width)-ee.l-ee.r,ee.h=Math.round(j.height)-ee.t-ee.b}j._pushmargin||(j._pushmargin={}),j._pushmarginIds||(j._pushmarginIds={}),j._reservedMargin||(j._reservedMargin={})}var N=2,_=2;o.autoMargin=function(j,K,ee){var oe=j._fullLayout,q=oe.width,$=oe.height,le=oe.margin,ie=oe.minreducedwidth,he=oe.minreducedheight,me=t.constrain(q-le.l-le.r,N,ie),Me=t.constrain($-le.t-le.b,_,he),Te=Math.max(0,q-me),Oe=Math.max(0,$-Me),Ne=oe._pushmargin,Ee=oe._pushmarginIds;if(le.autoexpand!==!1){if(!ee)delete Ne[K],delete Ee[K];else{var xe=ee.pad;if(xe===void 0&&(xe=Math.min(12,le.l,le.r,le.t,le.b)),Te){var Se=(ee.l+ee.r)/Te;Se>1&&(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._redrawFromAutoMarginCount<ir)return A.call("_doPlot",j);K._size=ie,t.warn("Too many auto-margin redraws.")}Y(j)};function Y(j){var K=n.list(j,"",!0);["_adjustTickLabelsOverflow","_hideCounterAxisInsideTickLabels"].forEach(function(ee){for(var oe=0;oe<K.length;oe++){var q=K[oe][ee];q&&q()}})}var J=["l","r","t","b","p","w","h"];o.didMarginChange=function(j,K){for(var ee=0;ee<J.length;ee++){var oe=J[ee],q=j[oe],$=K[oe];if(!L(q)||Math.abs($-q)>1)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;ee<K.length;ee++)switch(oe=K[ee],oe.type){case"replace":q=oe.value;var ie=($[oe.index]||{}).name,he=q.name;$[oe.index]=le[he]=q,he!==ie&&(delete le[ie],le[he]=q);break;case"insert":q=oe.value,le[q.name]=q,$.splice(oe.index,0,q);break;case"delete":q=$[oe.index],delete le[q.name],$.splice(oe.index,1);break}return Promise.resolve()},o.computeFrame=function(j,K){var ee=j._transitionData._frameHash,oe,q,$,le;if(!K)throw new Error("computeFrame must be given a string frame name");var ie=ee[K.toString()];if(!ie)return!1;for(var he=[ie],me=[ie.name];ie.baseframe&&(ie=ee[ie.baseframe.toString()])&&me.indexOf(ie.name)===-1;)he.push(ie),me.push(ie.name);for(var Me={};ie=he.pop();)if(ie.layout&&(Me.layout=o.extendLayout(Me.layout,ie.layout)),ie.data){if(Me.data||(Me.data=[]),q=ie.traces,!q)for(q=[],oe=0;oe<ie.data.length;oe++)q[oe]=oe;for(Me.traces||(Me.traces=[]),oe=0;oe<ie.data.length;oe++)$=q[oe],$!=null&&(le=Me.traces.indexOf($),le===-1&&(le=Me.data.length,Me.traces[le]=$),Me.data[le]=o.extendTrace(Me.data[le],ie.data[oe]))}return Me},o.recomputeFrameHash=function(j){for(var K=j._transitionData._frameHash={},ee=j._transitionData._frames,oe=0;oe<ee.length;oe++){var q=ee[oe];q&&q.name&&(K[q.name]=q)}},o.extendObjectWithContainers=function(j,K,ee){var oe,q,$,le,ie,he,me,Me,Te=t.extendDeepNoArrays({},K||{}),Oe=t.expandObjectPaths(Te),Ne={};if(ee&&ee.length)for($=0;$<ee.length;$++)oe=t.nestedProperty(Oe,ee[$]),q=oe.get(),q===void 0?t.nestedProperty(Ne,ee[$]).set(null):(oe.set(null),t.nestedProperty(Ne,ee[$]).set(q));if(j=t.extendDeepNoArrays(j||{},Oe),ee&&ee.length){for($=0;$<ee.length;$++)if(ie=t.nestedProperty(Ne,ee[$]),me=ie.get(),!!me){for(he=t.nestedProperty(j,ee[$]),Me=he.get(),Array.isArray(Me)||(Me=[],he.set(Me)),le=0;le<me.length;le++){var Ee=me[le];Ee===null?Me[le]=null:Me[le]=o.extendObjectWithContainers(Me[le],Ee)}he.set(Me)}}return j},o.dataArrayContainers=["transforms","dimensions"],o.layoutArrayContainers=A.layoutArrayContainers,o.extendTrace=function(j,K){return o.extendObjectWithContainers(j,K,o.dataArrayContainers)},o.extendLayout=function(j,K){return o.extendObjectWithContainers(j,K,o.layoutArrayContainers)},o.transition=function(j,K,ee,oe,q,$){var le={redraw:q.redraw},ie={},he=[];return le.prepareFn=function(){for(var me=Array.isArray(K)?K.length:0,Me=oe.slice(0,me),Te=0;Te<Me.length;Te++){var Oe=Me[Te],Ne=j._fullData[Oe],Ee=Ne._module;if(Ee){if(Ee.animatable){var xe=Ee.basePlotModule.name;ie[xe]||(ie[xe]=[]),ie[xe].push(Oe)}j.data[Me[Te]]=o.extendTrace(j.data[Me[Te]],K[Te])}}var Se=t.expandObjectPaths(t.extendDeepNoArrays({},ee)),Ue=/^[xy]axis[0-9]*$/;for(var He in Se)Ue.test(He)&&delete Se[He].range;o.extendLayout(j.layout,Se),delete j.calcdata,o.supplyDefaults(j),o.doCalcdata(j);var Fe=t.expandObjectPaths(ee);if(Fe){var Ge=j._fullLayout._plots;for(var nt in Ge){var qe=Ge[nt],$e=qe.xaxis,et=qe.yaxis,ct=$e.range.slice(),dt=et.range.slice(),pt=null,At=null,Mt=null,Vt=null;Array.isArray(Fe[$e._name+".range"])?pt=Fe[$e._name+".range"].slice():Array.isArray((Fe[$e._name]||{}).range)&&(pt=Fe[$e._name].range.slice()),Array.isArray(Fe[et._name+".range"])?At=Fe[et._name+".range"].slice():Array.isArray((Fe[et._name]||{}).range)&&(At=Fe[et._name].range.slice()),ct&&pt&&($e.r2l(ct[0])!==$e.r2l(pt[0])||$e.r2l(ct[1])!==$e.r2l(pt[1]))&&(Mt={xr0:ct,xr1:pt}),dt&&At&&(et.r2l(dt[0])!==et.r2l(At[0])||et.r2l(dt[1])!==et.r2l(At[1]))&&(Vt={yr0:dt,yr1:At}),(Mt||Vt)&&he.push(t.extendFlat({plotinfo:qe},Mt,Vt))}}return Promise.resolve()},le.runFn=function(me){var Me,Te=j._fullLayout._basePlotModules,Oe=he.length,Ne;if(ee)for(Ne=0;Ne<Te.length;Ne++)Te[Ne].transitionAxes&&Te[Ne].transitionAxes(j,he,$,me);Oe?(Me=t.extendFlat({},$),Me.duration=0,delete ie.cartesian):Me=$;for(var Ee in ie){var xe=ie[Ee],Se=j._fullData[xe[0]]._module;Se.basePlotModule.plot(j,xe,Me,me)}},te(j,$,le)},o.transitionFromReact=function(j,K,ee,oe){var q=j._fullLayout,$=q.transition,le={},ie=[];return le.prepareFn=function(){var he=q._plots;le.redraw=!1,K.anim==="some"&&(le.redraw=!0),ee.anim==="some"&&(le.redraw=!0);for(var me in he){var Me=he[me],Te=Me.xaxis,Oe=Me.yaxis,Ne=oe[Te._name].range.slice(),Ee=oe[Oe._name].range.slice(),xe=Te.range.slice(),Se=Oe.range.slice();Te.setScale(),Oe.setScale();var Ue=null,He=null;(Te.r2l(Ne[0])!==Te.r2l(xe[0])||Te.r2l(Ne[1])!==Te.r2l(xe[1]))&&(Ue={xr0:Ne,xr1:xe}),(Oe.r2l(Ee[0])!==Oe.r2l(Se[0])||Oe.r2l(Ee[1])!==Oe.r2l(Se[1]))&&(He={yr0:Ee,yr1:Se}),(Ue||He)&&ie.push(t.extendFlat({plotinfo:Me},Ue,He))}return Promise.resolve()},le.runFn=function(he){for(var me=j._fullData,Me=j._fullLayout,Te=Me._basePlotModules,Oe,Ne,Ee,xe=[],Se=0;Se<me.length;Se++)xe.push(Se);function Ue(){if(j._fullLayout)for(var Fe=0;Fe<Te.length;Fe++)Te[Fe].transitionAxes&&Te[Fe].transitionAxes(j,ie,Oe,he)}function He(){if(j._fullLayout)for(var Fe=0;Fe<Te.length;Fe++)Te[Fe].plot(j,Ee,Ne,he)}ie.length&&K.anim?$.ordering==="traces first"?(Oe=t.extendFlat({},$,{duration:0}),Ee=xe,Ne=$,setTimeout(Ue,$.duration),He()):(Oe=$,Ee=null,Ne=t.extendFlat({},$,{duration:0}),setTimeout(He,Oe.duration),Ue()):ie.length?(Oe=$,Ue()):K.anim&&(Ee=xe,Ne=$,He())},te(j,$,le)};function te(j,K,ee){var oe=!1;function q(Te){var Oe=Promise.resolve();if(!Te)return Oe;for(;Te.length;)Oe=Oe.then(Te.shift());return Oe}function $(Te){if(Te)for(;Te.length;)Te.shift()}function le(){return j.emit("plotly_transitioning",[]),new Promise(function(Te){j._transitioning=!0,K.duration>0&&(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<oe.length;ie++)if(Array.isArray(K)&&K.indexOf(ie)===-1){me[ie]=Me[ie];continue}for(ie=0;ie<oe.length;ie++)$=oe[ie],$._arrayAttrs=v.findArrayAttributes($),$._extremes={};var Te=q._subplots.polar||[];for(ie=0;ie<Te.length;ie++)ee.push(q[Te[ie]].radialaxis,q[Te[ie]].angularaxis);for(var Oe in q._colorAxes){var Ne=q[Oe];Ne.cauto!==!1&&(delete Ne.cmin,delete Ne.cmax)}var Ee=!1;function xe(He){if($=oe[He],le=$._module,$.visible===!0&&$.transforms){if(le&&le.calc){var Fe=le.calc(j,$);Fe[0]&&Fe[0].t&&Fe[0].t._scene&&delete Fe[0].t._scene.dirty}for(he=0;he<$.transforms.length;he++){var Ge=$.transforms[he];le=d[Ge.type],le&&le.calcTransform&&($._hasCalcTransform=!0,Ee=!0,le.calcTransform(j,$,Ge))}}}function Se(He,Fe){if($=oe[He],le=$._module,!!le.isContainer===Fe){var Ge=[];if($.visible===!0&&$._length!==0){delete $._indexToPoints;var nt=$.transforms||[];for(he=nt.length-1;he>=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;ie<oe.length;ie++)Se(ie,!0);for(ie=0;ie<oe.length;ie++)xe(ie);for(Ee&&Q(ee,oe,q),ie=0;ie<oe.length;ie++)Se(ie,!0);for(ie=0;ie<oe.length;ie++)Se(ie,!1);Z(j);var Ue=ce(ee,j);if(Ue.length){for(q._numBoxes=0,q._numViolins=0,ie=0;ie<Ue.length;ie++)Se(Ue[ie],!0);for(ie=0;ie<Ue.length;ie++)Se(Ue[ie],!1);Z(j)}A.getComponentMethod("fx","calc")(j),A.getComponentMethod("errorbars","calc")(j)};var ae=/(total|sum|min|max|mean|median) (ascending|descending)/;function ce(j,K){var ee=[],oe,q,$,le,ie;function he(De,Ie,ze){var Pe=Ie._id.charAt(0);if(De==="histogram2dcontour"){var be=Ie._counterAxes[0],se=n.getFromId(K,be),ye=Pe==="x"||be==="x"&&se.type==="category",Le=Pe==="y"||be==="y"&&se.type==="category";return function(Be,ot){return Be===0||ot===0||ye&&Be===ze[ot].length-1||Le&&ot===ze.length-1?-1:(Pe==="y"?ot:Be)-1}}else return function(Be,ot){return Pe==="y"?ot:Be}}var me={min:function(De){return t.aggNums(Math.min,null,De)},max:function(De){return t.aggNums(Math.max,null,De)},sum:function(De){return t.aggNums(function(Ie,ze){return Ie+ze},null,De)},total:function(De){return t.aggNums(function(Ie,ze){return Ie+ze},null,De)},mean:function(De){return t.mean(De)},median:function(De){return t.median(De)}};for(oe=0;oe<j.length;oe++){var Me=j[oe];if(Me.type==="category"){var Te=Me.categoryorder.match(ae);if(Te){var Oe=Te[1],Ne=Te[2],Ee=Me._id.charAt(0),xe=Ee==="x",Se=[];for(q=0;q<Me._categories.length;q++)Se.push([Me._categories[q],[]]);for(q=0;q<Me._traceIndices.length;q++){var Ue=Me._traceIndices[q],He=K._fullData[Ue];if(He.visible===!0){var Fe=He.type;A.traceIs(He,"histogram")&&(delete He._xautoBinFinished,delete He._yautoBinFinished);var Ge=Fe==="splom",nt=Fe==="scattergl",qe=K.calcdata[Ue];for($=0;$<qe.length;$++){var $e=qe[$],et,ct;if(Ge){var dt=He._axesDim[Me._id];if(!xe){var pt=He._diag[dt][0];pt&&(Me=K._fullLayout[n.id2name(pt)])}var At=$e.trace.dimensions[dt].values;for(le=0;le<At.length;le++)for(et=Me._categoriesMap[At[le]],ie=0;ie<$e.trace.dimensions.length;ie++)if(ie!==dt){var Mt=$e.trace.dimensions[ie];Se[et][1].push(Mt.values[le])}}else if(nt){for(le=0;le<$e.t.x.length;le++)xe?(et=$e.t.x[le],ct=$e.t.y[le]):(et=$e.t.y[le],ct=$e.t.x[le]),Se[et][1].push(ct);$e.t&&$e.t._scene&&delete $e.t._scene.dirty}else if($e.hasOwnProperty("z")){ct=$e.z;var Vt=he(He.type,Me,ct);for(le=0;le<ct.length;le++)for(ie=0;ie<ct[le].length;ie++)et=Vt(ie,le),et+1&&Se[et][1].push(ct[le][ie])}else for(et=$e.p,et===void 0&&(et=$e[Ee]),ct=$e.s,ct===void 0&&(ct=$e.v),ct===void 0&&(ct=xe?$e.y:$e.x),Array.isArray(ct)||(ct===void 0?ct=[]:ct=[ct]),le=0;le<ct.length;le++)Se[et][1].push(ct[le])}}}Me._categoriesValue=Se;var Je=[];for(q=0;q<Se.length;q++)Je.push([Se[q][0],me[Oe](Se[q][1])]);Je.sort(function(De,Ie){return De[1]-Ie[1]}),Me._categoriesAggregatedValue=Je,Me._initialCategories=Je.map(function(De){return De[0]}),Ne==="descending"&&Me._initialCategories.reverse(),ee=ee.concat(Me.sortByInitialCategories())}}}return ee}function Q(j,K,ee){var oe={};function q(he){he.clearCalc(),he.type==="multicategory"&&he.setupMultiCategory(K),oe[he._id]=1}t.simpleMap(j,q);for(var $=ee._axisMatchGroups||[],le=0;le<$.length;le++)for(var ie in $[le])oe[ie]||q(ee[n.id2name(ie)])}function Z(j){var K=j._fullLayout,ee=K._visibleModules,oe={},q,$,le;for($=0;$<ee.length;$++){var ie=ee[$],he=ie.crossTraceCalc;if(he){var me=ie.basePlotModule.name;oe[me]?t.pushUnique(oe[me],he):oe[me]=[he]}}for(le in oe){var Me=oe[le],Te=K._subplots[le];if(Array.isArray(Te))for(q=0;q<Te.length;q++){var Oe=Te[q],Ne=le==="cartesian"?K._plots[Oe]:K[Oe];for($=0;$<Me.length;$++)Me[$](j,Ne,Oe)}else for($=0;$<Me.length;$++)Me[$](j)}}o.rehover=function(j){j._fullLayout._rehover&&j._fullLayout._rehover()},o.redrag=function(j){j._fullLayout._redrag&&j._fullLayout._redrag()},o.reselect=function(j){var K=j._fullLayout,ee=(j.layout||{}).selections,oe=K._previousSelections;K._previousSelections=ee;var q=K._reselect||JSON.stringify(ee)!==JSON.stringify(oe);A.getComponentMethod("selections","reselect")(j,q)},o.generalUpdatePerTraceModule=function(j,K,ee,oe){var q=K.traceHash,$={},le;for(le=0;le<ee.length;le++){var ie=ee[le],he=ie[0].trace;he.visible&&($[he.type]=$[he.type]||[],$[he.type].push(ie))}for(var me in q)if(!$[me]){var Me=q[me][0],Te=Me[0].trace;Te.visible=!1,$[me]=[Me]}for(var Oe in $){var Ne=$[Oe],Ee=Ne[0][0].trace._module;Ee.plot(j,K,t.filterVisible(Ne),oe)}K.traceHash=$},o.plotBasePlot=function(j,K,ee,oe,q){var $=A.getModule(j),le=f(K.calcdata,$)[0];$.plot(K,le,oe,q)},o.cleanBasePlot=function(j,K,ee,oe,q){var $=q._has&&q._has(j),le=ee._has&&ee._has(j);$&&!le&&q["_"+j+"layer"].selectAll("g.trace").remove()}},9813:function(G){G.exports={attr:"subplot",name:"polar",axisNames:["angularaxis","radialaxis"],axisName2dataArray:{angularaxis:"theta",radialaxis:"r"},layerNames:["draglayer","plotbg","backplot","angular-grid","radial-grid","frontplot","angular-line","radial-line","angular-axis","radial-axis"],radialDragBoxSize:50,angularDragBoxSize:30,cornerLen:25,cornerHalfWidth:2,MINDRAG:8,MINZOOM:20,OFFEDGE:20}},10869:function(G,V,e){var m=e(71828),P=e(61082).tester,i=m.findIndexOfMin,L=m.isAngleInsideSector,A=m.angleDelta,v=m.angleDist;function p(o,d,M,T,C){if(!L(d,T))return!1;var x,S;M[0]<M[1]?(x=M[0],S=M[1]):(x=M[1],S=M[0]);var b=P(l(x,T[0],T[1],C)),a=P(l(S,T[0],T[1],C)),E=[o*Math.cos(d),o*Math.sin(d)];return a.contains(E)&&!b.contains(E)}function t(o,d,M,T){var C,x,S=T[0],b=T[1],a=g(Math.sin(d)-Math.sin(o)),E=g(Math.cos(d)-Math.cos(o)),y=Math.tan(M),z=g(1/y),I=a/E,B=b-I*S;return z?a&&E?(C=B/(y-I),x=y*C):E?(C=b*z,x=b):(C=S,x=S*y):a&&E?(C=0,x=B):E?(C=0,x=b):C=x=NaN,[C,x]}function r(o,d,M,T){var C=-d*M,x=d*d+1,S=2*(d*C-M),b=C*C+M*M-o*o,a=Math.sqrt(S*S-4*x*b),E=(-S+a)/(2*x),y=(-S-a)/(2*x);return[[E,d*E+C+T],[y,d*y+C+T]]}function s(o,d){var M=d.length,T=new Array(M+1),C;for(C=0;C<M;C++){var x=d[C];T[C]=[o*Math.cos(x),o*Math.sin(x)]}return T[C]=T[0].slice(),T}function n(o,d,M,T){var C=T.length,x=[],S,b;function a(_){return[o*Math.cos(_),o*Math.sin(_)]}function E(_,U,Y){return t(_,U,Y,a(_))}function y(_){return m.mod(_,C)}function z(_){return L(_,[d,M])}var I=i(T,function(_){return z(_)?v(_,d):1/0}),B=E(T[I],T[y(I-1)],d);for(x.push(B),S=I,b=0;b<C;S++,b++){var k=T[y(S)];if(!z(k))break;x.push(a(k))}var O=i(T,function(_){return z(_)?v(_,M):1/0}),N=E(T[O],T[y(O+1)],M);return x.push(N),x.push([0,0]),x.push(x[0].slice()),x}function l(o,d,M,T){return m.isFullCircle([d,M])?s(o,T):n(o,d,M,T)}function c(o,d,M,T){for(var C=1/0,x=1/0,S=l(o,d,M,T),b=0;b<S.length;b++){var a=S[b];C=Math.min(C,a[0]),x=Math.min(x,-a[1])}return[C,x]}function u(o,d){var M=function(x){var S=A(x,o);return S>0?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;x<T;x++){var S=o[x];C[x]=[d+S[0],M-S[1]]}return C}function w(o,d,M,T,C,x){var S=l(o,d,M,T);return"M"+f(S,C,x).join("L")}function h(o,d,M,T,C,x,S){var b,a;o<d?(b=o,a=d):(b=d,a=o);var E=f(l(b,M,T,C),x,S),y=f(l(a,M,T,C),x,S);return"M"+y.reverse().join("L")+"M"+E.join("L")}G.exports={isPtInsidePolygon:p,findPolygonOffset:c,findEnclosingVertexAngles:u,findIntersectionXY:t,findXYatLength:r,clampTiny:g,pathPolygon:w,pathPolygonAnnulus:h}},23580:function(G,V,e){var m=e(27659).AU,P=e(71828).counterRegex,i=e(77997),L=e(9813),A=L.attr,v=L.name,p=P(v),t={};t[A]={valType:"subplotid",dflt:v,editType:"calc"};function r(n){for(var l=n._fullLayout,c=n.calcdata,u=l._subplots[v],g=0;g<u.length;g++){var f=u[g],w=m(c,v,f),h=l[f]._subplot;h||(h=i(n,f),l[f]._subplot=h),h.plot(w,l,n._promises)}}function s(n,l,c,u){for(var g=u._subplots[v]||[],f=u._has&&u._has("gl"),w=l._has&&l._has("gl"),h=f&&!w,o=0;o<g.length;o++){var d=g[o],M=u[d]._subplot;if(!l[d]&&M){M.framework.remove(),M.layers["radial-axis-title"].remove();for(var T in M.clipPaths)M.clipPaths[T].remove()}h&&M._scene&&(M._scene.destroy(),M._scene=null)}}G.exports={attr:A,name:v,idRoot:v,idRegex:p,attrRegex:p,attributes:t,layoutAttributes:e(73812),supplyLayoutDefaults:e(68993),plot:r,clean:s,toSVG:e(93612).toSVG}},73812:function(G,V,e){var m=e(22399),P=e(13838),i=e(27670).Y,L=e(71828).extendFlat,A=e(30962).overrideAll,v=A({color:P.color,showline:L({},P.showline,{dflt:!0}),linecolor:P.linecolor,linewidth:P.linewidth,showgrid:L({},P.showgrid,{dflt:!0}),gridcolor:P.gridcolor,gridwidth:P.gridwidth,griddash:P.griddash},"plot","from-root"),p=A({tickmode:P.minor.tickmode,nticks:P.nticks,tick0:P.tick0,dtick:P.dtick,tickvals:P.tickvals,ticktext:P.ticktext,ticks:P.ticks,ticklen:P.ticklen,tickwidth:P.tickwidth,tickcolor:P.tickcolor,ticklabelstep:P.ticklabelstep,showticklabels:P.showticklabels,labelalias:P.labelalias,showtickprefix:P.showtickprefix,tickprefix:P.tickprefix,showticksuffix:P.showticksuffix,ticksuffix:P.ticksuffix,showexponent:P.showexponent,exponentformat:P.exponentformat,minexponent:P.minexponent,separatethousands:P.separatethousands,tickfont:P.tickfont,tickangle:P.tickangle,tickformat:P.tickformat,tickformatstops:P.tickformatstops,layer:P.layer},"plot","from-root"),t={visible:L({},P.visible,{dflt:!0}),type:L({},P.type,{values:["-","linear","log","date","category"]}),autotypenumbers:P.autotypenumbers,autorangeoptions:{minallowed:P.autorangeoptions.minallowed,maxallowed:P.autorangeoptions.maxallowed,clipmin:P.autorangeoptions.clipmin,clipmax:P.autorangeoptions.clipmax,include:P.autorangeoptions.include,editType:"plot"},autorange:L({},P.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},minallowed:L({},P.minallowed,{editType:"plot"}),maxallowed:L({},P.maxallowed,{editType:"plot"}),range:L({},P.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:P.categoryorder,categoryarray:P.categoryarray,angle:{valType:"angle",editType:"plot"},side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:L({},P.title.text,{editType:"plot",dflt:""}),font:L({},P.title.font,{editType:"plot"}),editType:"plot"},hoverformat:P.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc",_deprecated:{title:P._deprecated.title,titlefont:P._deprecated.titlefont}};L(t,v,p);var r={visible:L({},P.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:P.autotypenumbers,categoryorder:P.categoryorder,categoryarray:P.categoryarray,thetaunit:{valType:"enumerated",values:["radians","degrees"],dflt:"degrees",editType:"calc"},period:{valType:"number",editType:"calc",min:0},direction:{valType:"enumerated",values:["counterclockwise","clockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",editType:"calc"},hoverformat:P.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};L(r,v,p),G.exports={domain:i({name:"polar",editType:"plot"}),sector:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],dflt:[0,360],editType:"plot"},hole:{valType:"number",min:0,max:1,dflt:0,editType:"plot"},bgcolor:{valType:"color",editType:"plot",dflt:m.background},radialaxis:t,angularaxis:r,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot"},uirevision:{valType:"any",editType:"none"},editType:"calc"}},68993:function(G,V,e){var m=e(71828),P=e(7901),i=e(44467),L=e(49119),A=e(27659).NG,v=e(26218),p=e(38701),t=e(96115),r=e(89426),s=e(15258),n=e(92128),l=e(23074),c=e(4322),u=e(73812),g=e(12101),f=e(9813),w=f.axisNames;function h(d,M,T,C){var x=T("bgcolor");C.bgColor=P.combine(x,C.paper_bgcolor);var S=T("sector");T("hole");var b=A(C.fullData,f.name,C.id),a=C.layoutOut,E;function y(ee,oe){return T(E+"."+ee,oe)}for(var z=0;z<w.length;z++){E=w[z],m.isPlainObject(d[E])||(d[E]={});var I=d[E],B=i.newContainer(M,E);B._id=B._name=E,B._attr=C.id+"."+E,B._traceIndices=b.map(function(ee){return ee._expandedIndex});var k=f.axisName2dataArray[E],O=o(I,B,y,b,k,C);s(I,B,y,{axData:b,dataAttr:k});var N=y("visible");switch(g(B,M,a),y("uirevision",M.uirevision),B._m=1,E){case"radialaxis":y("minallowed"),y("maxallowed");var _=y("range"),U=B.getAutorangeDflt(_),Y=y("autorange",U),J;_&&(_[0]===null&&_[1]===null||(_[0]===null||_[1]===null)&&(Y==="reversed"||Y===!0)||_[0]!==null&&(Y==="min"||Y==="max reversed")||_[1]!==null&&(Y==="max"||Y==="min reversed"))&&(_=void 0,delete B.range,B.autorange=!0,J=!0),J||(U=B.getAutorangeDflt(_),Y=y("autorange",U)),I.autorange=Y,Y&&(l(y,Y,_),(O==="linear"||O==="-")&&y("rangemode"),B.isReversed()&&(B._m=-1)),B.cleanRange("range",{dfltRange:[0,1]});break;case"angularaxis":if(O==="date"){m.log("Polar plots do not support date angular axes yet.");for(var te=0;te<b.length;te++)b[te].visible=!1;O=I.type=B.type="linear"}y(O==="linear"?"thetaunit":"period");var ae=y("direction");y("rotation",{counterclockwise:0,clockwise:90}[ae]);break}if(r(I,B,y,B.type,{tickSuffixDflt:B.thetaunit==="degrees"?"°":void 0}),N){var ce,Q,Z,j,K=C.font||{};ce=y("color"),Q=ce===I.color?ce:K.color,Z=K.size,j=K.family,v(I,B,y,B.type),t(I,B,y,B.type,{font:{color:Q,size:Z,family:j}}),p(I,B,y,{outerTicks:!0}),n(I,B,y,{dfltColor:ce,bgColor:C.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:u[E]}),y("layer"),E==="radialaxis"&&(y("side"),y("angle",S[0]),y("title.text"),m.coerceFont(y,"title.font",{color:Q,size:m.bigFont(Z),family:j}))}O!=="category"&&y("hoverformat"),B._input=I}M.angularaxis.type==="category"&&T("gridshape")}function o(d,M,T,C,x,S){var b=T("autotypenumbers",S.autotypenumbersDflt),a=T("type");if(a==="-"){for(var E,y=0;y<C.length;y++)if(C[y].visible){E=C[y];break}E&&E[x]&&(M.type=c(E[x],"gregorian",{noMultiCategory:!0,autotypenumbers:b})),M.type==="-"?M.type="linear":d.type=M.type}return M.type}G.exports=function(M,T,C){L(M,T,C,{type:f.name,attributes:u,handleDefaults:h,font:T.font,autotypenumbersDflt:T.autotypenumbers,paper_bgcolor:T.paper_bgcolor,fullData:C,layoutOut:T})}},77997:function(G,V,e){var m=e(39898),P=e(84267),i=e(73972),L=e(71828),A=L.strRotate,v=L.strTranslate,p=e(7901),t=e(91424),r=e(74875),s=e(89298),n=e(21994),l=e(12101),c=e(71739).doAutoRange,u=e(29323),g=e(28569),f=e(30211),w=e(92998),h=e(47322).prepSelect,o=e(47322).selectOnClick,d=e(47322).clearOutline,M=e(6964),T=e(33306),C=e(61549).redrawReglTraces,x=e(18783).MID_SHIFT,S=e(9813),b=e(10869),a=e(23893),E=a.smith,y=a.reactanceArc,z=a.resistanceArc,I=a.smithTransform,B=L._,k=L.mod,O=L.deg2rad,N=L.rad2deg;function _(ce,Q,Z){this.isSmith=Z||!1,this.id=Q,this.gd=ce,this._hasClipOnAxisFalse=null,this.vangles=null,this.radialAxisAngle=null,this.traceHash={},this.layers={},this.clipPaths={},this.clipIds={},this.viewInitial={};var j=ce._fullLayout,K="clip"+j._uid+Q;this.clipIds.forTraces=K+"-for-traces",this.clipPaths.forTraces=j._clips.append("clipPath").attr("id",this.clipIds.forTraces),this.clipPaths.forTraces.append("path"),this.framework=j["_"+(Z?"smith":"polar")+"layer"].append("g").attr("class",Q),this.getHole=function(ee){return this.isSmith?0:ee.hole},this.getSector=function(ee){return this.isSmith?[0,360]:ee.sector},this.getRadial=function(ee){return this.isSmith?ee.realaxis:ee.radialaxis},this.getAngular=function(ee){return this.isSmith?ee.imaginaryaxis:ee.angularaxis},Z||(this.radialTickLayout=null,this.angularTickLayout=null)}var U=_.prototype;G.exports=function(Q,Z,j){return new _(Q,Z,j)},U.plot=function(ce,Q){for(var Z=this,j=Q[Z.id],K=!1,ee=0;ee<ce.length;ee++){var oe=ce[ee][0].trace;if(oe.cliponaxis===!1){K=!0;break}}Z._hasClipOnAxisFalse=K,Z.updateLayers(Q,j),Z.updateLayout(Q,j),r.generalUpdatePerTraceModule(Z.gd,Z,ce,j),Z.updateFx(Q,j),Z.isSmith&&(delete j.realaxis.range,delete j.imaginaryaxis.range)},U.updateLayers=function(ce,Q){var Z=this,j=Z.isSmith,K=Z.layers,ee=Z.getRadial(Q),oe=Z.getAngular(Q),q=S.layerNames,$=q.indexOf("frontplot"),le=q.slice(0,$),ie=oe.layer==="below traces",he=ee.layer==="below traces";ie&&le.push("angular-line"),he&&le.push("radial-line"),ie&&le.push("angular-axis"),he&&le.push("radial-axis"),le.push("frontplot"),ie||le.push("angular-line"),he||le.push("radial-line"),ie||le.push("angular-axis"),he||le.push("radial-axis");var me=(j?"smith":"polar")+"sublayer",Me=Z.framework.selectAll("."+me).data(le,String);Me.enter().append("g").attr("class",function(Te){return me+" "+Te}).each(function(Te){var Oe=K[Te]=m.select(this);switch(Te){case"frontplot":j||Oe.append("g").classed("barlayer",!0),Oe.append("g").classed("scatterlayer",!0);break;case"backplot":Oe.append("g").classed("maplayer",!0);break;case"plotbg":K.bg=Oe.append("path");break;case"radial-grid":Oe.style("fill","none");break;case"angular-grid":Oe.style("fill","none");break;case"radial-line":Oe.append("line").style("fill","none");break;case"angular-line":Oe.append("path").style("fill","none");break}}),Me.order()},U.updateLayout=function(ce,Q){var Z=this,j=Z.layers,K=ce._size,ee=Z.getRadial(Q),oe=Z.getAngular(Q),q=Q.domain.x,$=Q.domain.y;Z.xOffset=K.l+K.w*q[0],Z.yOffset=K.t+K.h*(1-$[1]);var le=Z.xLength=K.w*(q[1]-q[0]),ie=Z.yLength=K.h*($[1]-$[0]),he=Z.getSector(Q);Z.sectorInRad=he.map(O);var me=Z.sectorBBox=J(he),Me=me[2]-me[0],Te=me[3]-me[1],Oe=ie/le,Ne=Math.abs(Te/Me),Ee,xe,Se,Ue,He;Oe>Ne?(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=oe<ee,Me=Z.isSmith;Me||(Z.fillViewInitialKey("radialaxis.angle",le.angle),Z.fillViewInitialKey("radialaxis.range",he.range.slice()),he.setGeometry()),he.tickangle==="auto"&&ie>90&&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),Lt<q?Lt=0:$-Lt<q?Lt=$:Kt<q?Kt=0:$-Kt<q&&(Kt=$),Math.abs(Kt-Lt)>oe?(Lt<Kt?(ct=Lt,dt=Kt):(ct=Kt,dt=Lt),!0):(ct=null,dt=null,!1)}function Be(Lt,Kt){Lt=Lt||pt,Kt=Kt||"M0,0Z",Vt.attr("d",Lt),Je.attr("d",Kt),u.transitionZoombox(Vt,Je,At,Mt),At=!0;var ir={};Bt(ir),j.emit("plotly_relayouting",ir)}function ot(Lt,Kt){Lt=Lt*Fe,Kt=Kt*Ge;var ir=$e+Lt,_r=et+Kt,yt=Ie($e,et),jt=Math.min(Ie(ir,_r),$),Yt=ze($e,et),br,hr;Le(yt,jt)&&(br=pt+Q.pathSector(dt),ct&&(br+=Q.pathSector(ct)),hr=be(ct,Yt)+be(dt,Yt)),Be(br,hr)}function at(Lt,Kt,ir,_r){var yt=b.findIntersectionXY(ir,_r,ir,[Lt-me,Me-Kt]);return De(yt[0],yt[1])}function wt(Lt,Kt){var ir=$e+Lt,_r=et+Kt,yt=ze($e,et),jt=ze(ir,_r),Yt=Se(yt,Oe),br=Se(jt,Oe),hr=at($e,et,Yt[0],Yt[1]),ut=Math.min(at(ir,_r,br[0],br[1]),$),lt,xt;Le(hr,ut)&&(lt=pt+Q.pathSector(dt),ct&&(lt+=Q.pathSector(ct)),xt=[se(ct,Yt[0],Yt[1]),se(dt,Yt[0],Yt[1])].join(" ")),Be(lt,xt)}function It(){if(u.removeZoombox(j),!(ct===null||dt===null)){var Lt={};Bt(Lt),u.showDoubleClickNotifier(j),i.call("_guiRelayout",j,Lt)}}function Bt(Lt){var Kt=Ne._rl,ir=(Kt[1]-Kt[0])/(1-le/$)/$,_r=[Kt[0]+(ct-le)*ir,Kt[0]+(dt-le)*ir];Lt[Q.id+".radialaxis.range"]=_r}function Gt(Lt,Kt){var ir=j._fullLayout.clickmode;if(u.removeZoombox(j),Lt===2){var _r={};for(var yt in Q.viewInitial)_r[Q.id+"."+yt]=Q.viewInitial[yt];j.emit("plotly_doubleclick",null),i.call("_guiRelayout",j,_r)}ir.indexOf("select")>-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&&q<oe,{transform:v(Se,Ue)});var nt,qe,$e;function et(Mt,Vt){if(nt)nt(Mt,Vt);else{var Je=[Mt,-Vt],De=[Math.cos(Me),Math.sin(Me)],Ie=Math.abs(L.dot(Je,De)/Math.sqrt(L.dot(Je,Je)));isNaN(Ie)||(nt=Ie<.5?pt:At)}var ze={};ct(ze),K.emit("plotly_relayouting",ze)}function ct(Mt){qe!==null?Mt[j.id+".radialaxis.angle"]=qe:$e!==null&&(Mt[j.id+".radialaxis.range["+Z+"]"]=$e)}function dt(){qe!==null?i.call("_guiRelayout",K,j.id+".radialaxis.angle",qe):$e!==null&&i.call("_guiRelayout",K,j.id+".radialaxis.range["+Z+"]",$e)}function pt(Mt,Vt){if(Z!==0){var Je=Se+Mt,De=Ue+Vt;qe=Math.atan2(le-De,Je-$),j.vangles&&(qe=te(qe,j.vangles)),qe=N(qe);var Ie=v($,le)+A(-qe);ee["radial-axis"].attr("transform",Ie),ee["radial-line"].select("line").attr("transform",Ie);var ze=j.gd._fullLayout,Pe=ze[j.id];j.updateRadialAxisTitle(ze,Pe,qe)}}function At(Mt,Vt){var Je=L.dot([Mt,-Vt],[Math.cos(Me),Math.sin(Me)]);if($e=Ee-xe*Je,xe>0!=(Z?$e>Oe:$e<Ne)){$e=null;return}var De=K._fullLayout,Ie=De[j.id];ie.range[Z]=$e,ie._rl[Z]=$e,j.updateRadialAxis(De,Ie),j.xaxis.setRange(),j.xaxis.setScale(),j.yaxis.setRange(),j.yaxis.setScale();var ze=!1;for(var Pe in j.traceHash){var be=j.traceHash[Pe],se=L.filterVisible(be),ye=be[0][0].trace._module;ye.plot(K,j,se,Ie),i.traceIs(Pe,"gl")&&se.length&&(ze=!0)}ze&&(T(K),C(K))}Ge.prepFn=function(){nt=null,qe=null,$e=null,Ge.moveFn=et,Ge.doneFn=dt,d(K)},Ge.clampFn=function(Mt,Vt){return Math.sqrt(Mt*Mt+Vt*Vt)<S.MINDRAG&&(Mt=0,Vt=0),[Mt,Vt]},g.init(Ge)},U.updateAngularDrag=function(ce){var Q=this,Z=Q.gd,j=Q.layers,K=Q.radius,ee=Q.angularAxis,oe=Q.cx,q=Q.cy,$=Q.cxx,le=Q.cyy,ie=S.angularDragBoxSize,he=u.makeDragger(j,"path","angulardrag",ce.dragmode===!1?"none":"move"),me={element:he,gd:Z};ce.dragmode===!1?me.dragmode=!1:m.select(he).attr("d",Q.pathAnnulus(K,K+ie)).attr("transform",v(oe,q)).call(M,"move");function Me($e,et){return Math.atan2(le+ie-et,$e-$-ie)}var Te=j.frontplot.select(".scatterlayer").selectAll(".trace"),Oe=Te.selectAll(".point"),Ne=Te.selectAll(".textpoint"),Ee,xe,Se,Ue,He,Fe;function Ge($e,et){var ct=Q.gd._fullLayout,dt=ct[Q.id],pt=Ee+$e*ce._invScaleX,At=xe+et*ce._invScaleY,Mt=Me(pt,At),Vt=N(Mt-Fe);if(Ue=Se+Vt,j.frontplot.attr("transform",v(Q.xOffset2,Q.yOffset2)+A([-Vt,$,le])),Q.vangles){He=Q.radialAxisAngle+Vt;var Je=v(oe,q)+A(-Vt),De=v(oe,q)+A(-He);j.bg.attr("transform",Je),j["radial-grid"].attr("transform",Je),j["radial-axis"].attr("transform",De),j["radial-line"].select("line").attr("transform",De),Q.updateRadialAxisTitle(ct,dt,He)}else Q.clipPaths.forTraces.select("path").attr("transform",v($,le)+A(Vt));Oe.each(function(){var Le=m.select(this),Be=t.getTranslate(Le);Le.attr("transform",v(Be.x,Be.y)+A([Vt]))}),Ne.each(function(){var Le=m.select(this),Be=Le.select("text"),ot=t.getTranslate(Le);Le.attr("transform",A([Vt,Be.attr("x"),Be.attr("y")])+v(ot.x,ot.y))}),ee.rotation=L.modHalf(Ue,360),Q.updateAngularAxis(ct,dt),Q._hasClipOnAxisFalse&&!L.isFullCircle(Q.sectorInRad)&&Te.call(t.hideOutsideRangePoints,Q);var Ie=!1;for(var ze in Q.traceHash)if(i.traceIs(ze,"gl")){var Pe=Q.traceHash[ze],be=L.filterVisible(Pe),se=Pe[0][0].trace._module;se.plot(Z,Q,be,dt),be.length&&(Ie=!0)}Ie&&(T(Z),C(Z));var ye={};nt(ye),Z.emit("plotly_relayouting",ye)}function nt($e){$e[Q.id+".angularaxis.rotation"]=Ue,Q.vangles&&($e[Q.id+".radialaxis.angle"]=He)}function qe(){Ne.select("text").attr("transform",null);var $e={};nt($e),i.call("_guiRelayout",Z,$e)}me.prepFn=function($e,et,ct){var dt=ce[Q.id];Se=dt.angularaxis.rotation;var pt=he.getBoundingClientRect();Ee=et-pt.left,xe=ct-pt.top,Z._fullLayout._calcInverseTransform(Z);var At=L.apply3DTransform(ce._invTransform)(Ee,xe);Ee=At[0],xe=At[1],Fe=Me(Ee,xe),me.moveFn=Ge,me.doneFn=qe,d(Z)},Q.vangles&&!L.isFullCircle(Q.sectorInRad)&&(me.prepFn=L.noop,M(m.select(he),null)),g.init(me)},U.isPtInside=function(ce){if(this.isSmith)return!0;var Q=this.sectorInRad,Z=this.vangles,j=this.angularAxis.c2g(ce.theta),K=this.radialAxis,ee=K.c2l(ce.r),oe=K._rl,q=Z?b.isPtInsidePolygon:L.isPtInsideSector;return q(ee,j,oe,Q,Z)},U.pathArc=function(ce){var Q=this.sectorInRad,Z=this.vangles,j=Z?b.pathPolygon:L.pathArc;return j(ce,Q[0],Q[1],Z)},U.pathSector=function(ce){var Q=this.sectorInRad,Z=this.vangles,j=Z?b.pathPolygon:L.pathSector;return j(ce,Q[0],Q[1],Z)},U.pathAnnulus=function(ce,Q){var Z=this.sectorInRad,j=this.vangles,K=j?b.pathPolygonAnnulus:L.pathAnnulus;return K(ce,Q,Z[0],Z[1],j)},U.pathSubplot=function(){var ce=this.innerRadius,Q=this.radius;return ce?this.pathAnnulus(ce,Q):this.pathSector(Q)},U.fillViewInitialKey=function(ce,Q){ce in this.viewInitial||(this.viewInitial[ce]=Q)};function Y(ce){var Q=ce.ticks+String(ce.ticklen)+String(ce.showticklabels);return"side"in ce&&(Q+=ce.side),Q}function J(ce){var Q=ce[0],Z=ce[1],j=Z-Q,K=k(Q,360),ee=K+j,oe=Math.cos(O(K)),q=Math.sin(O(K)),$=Math.cos(O(ee)),le=Math.sin(O(ee)),ie,he,me,Me;return K<=90&&ee>=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;o<w;o++)h[o]=d(f[o])}else{var M=g+"0",T="d"+g,C=M in u?d(u[M]):0,x=u[T]?d(u[T]):(r.period||2*Math.PI)/w;for(h=new Array(w),o=0;o<w;o++)h[o]=C+o*x}return h},r.setGeometry=function(){var u=s.sector,g=u.map(i),f={clockwise:-1,counterclockwise:1}[r.direction],w=i(r.rotation),h=function(b){return f*b+w},o=function(b){return(b-w)/f},d,M,T,C;switch(n){case"linear":M=d=m.identity,C=i,T=L,r.range=m.isFullCircle(g)?[u[0],u[0]+360]:g.map(o).map(L);break;case"category":var x=r._categories.length,S=r.period?Math.max(r.period,x):x;S===0&&(S=1),M=C=function(b){return b*2*Math.PI/S},d=T=function(b){return b*S/Math.PI/2},r.range=[0,S];break}r.c2g=function(b){return h(M(b))},r.g2c=function(b){return d(o(b))},r.t2g=function(b){return h(C(b))},r.g2t=function(b){return T(o(b))}}}},39779:function(G){G.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}},23893:function(G){function V(A){return A<0?-1:A>0?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,"+(0<p?0:1)+" "+w+","+h,"A"+r+","+r+" 0 0,"+(t<0?0:1)+u+","+g].join(" ")}return["M"+n+","+l,"A"+r+","+r+" 0 0,"+(t<p?0:1)+" "+u+","+g].join(" ")}G.exports={smith:e,reactanceArc:i,resistanceArc:L,smithTransform:m}},7504:function(G,V,e){var m=e(27659).AU,P=e(71828).counterRegex,i=e(77997),L=e(39779),A=L.attr,v=L.name,p=P(v),t={};t[A]={valType:"subplotid",dflt:v,editType:"calc"};function r(n){for(var l=n._fullLayout,c=n.calcdata,u=l._subplots[v],g=0;g<u.length;g++){var f=u[g],w=m(c,v,f),h=l[f]._subplot;h||(h=i(n,f,!0),l[f]._subplot=h),h.plot(w,l,n._promises)}}function s(n,l,c,u){for(var g=u._subplots[v]||[],f=0;f<g.length;f++){var w=g[f],h=u[w]._subplot;if(!l[w]&&h){h.framework.remove();for(var o in h.clipPaths)h.clipPaths[o].remove()}}}G.exports={attr:A,name:v,idRoot:v,idRegex:p,attrRegex:p,attributes:t,layoutAttributes:e(33419),supplyLayoutDefaults:e(9558),plot:r,clean:s,toSVG:e(93612).toSVG}},33419:function(G,V,e){var m=e(22399),P=e(13838),i=e(27670).Y,L=e(71828).extendFlat,A=e(30962).overrideAll,v=A({color:P.color,showline:L({},P.showline,{dflt:!0}),linecolor:P.linecolor,linewidth:P.linewidth,showgrid:L({},P.showgrid,{dflt:!0}),gridcolor:P.gridcolor,gridwidth:P.gridwidth,griddash:P.griddash},"plot","from-root"),p=A({ticklen:P.ticklen,tickwidth:L({},P.tickwidth,{dflt:2}),tickcolor:P.tickcolor,showticklabels:P.showticklabels,labelalias:P.labelalias,showtickprefix:P.showtickprefix,tickprefix:P.tickprefix,showticksuffix:P.showticksuffix,ticksuffix:P.ticksuffix,tickfont:P.tickfont,tickformat:P.tickformat,hoverformat:P.hoverformat,layer:P.layer},"plot","from-root"),t=L({visible:L({},P.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:L({},P.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},editType:"calc"},v,p),r=L({visible:L({},P.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:P.ticks,editType:"calc"},v,p);G.exports={domain:i({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:m.background},realaxis:t,imaginaryaxis:r,editType:"calc"}},9558:function(G,V,e){var m=e(71828),P=e(7901),i=e(44467),L=e(49119),A=e(27659).NG,v=e(89426),p=e(96115),t=e(92128),r=e(21994),s=e(33419),n=e(39779),l=n.axisNames,c=g(function(f){return f.slice().reverse().map(function(w){return-w}).concat([0]).concat(f)},String);function u(f,w,h,o){var d=h("bgcolor");o.bgColor=P.combine(d,o.paper_bgcolor);var M=A(o.fullData,n.name,o.id),T=o.layoutOut,C;function x(U,Y){return h(C+"."+U,Y)}for(var S=0;S<l.length;S++){C=l[S],m.isPlainObject(f[C])||(f[C]={});var b=f[C],a=i.newContainer(w,C);a._id=a._name=C,a._attr=o.id+"."+C,a._traceIndices=M.map(function(U){return U._expandedIndex});var E=x("visible");if(a.type="linear",r(a,T),v(b,a,x,a.type),E){var y=C==="realaxis";if(y&&x("side"),y)x("tickvals");else{var z=c(w.realaxis.tickvals||s.realaxis.tickvals.dflt);x("tickvals",z)}var I,B,k,O,N=o.font||{};E&&(I=x("color"),B=I===b.color?I:N.color,k=N.size,O=N.family),p(b,a,x,a.type,{noTicklabelstep:!0,noAng:!y,noExp:!0,font:{color:B,size:k,family:O}}),m.coerce2(f,w,s,C+".ticklen"),m.coerce2(f,w,s,C+".tickwidth"),m.coerce2(f,w,s,C+".tickcolor",w.color);var _=x("ticks");_||(delete w[C].ticklen,delete w[C].tickwidth,delete w[C].tickcolor),t(b,a,x,{dfltColor:I,bgColor:o.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:s[C]}),x("layer")}x("hoverformat"),delete a.type,a._input=b}}G.exports=function(w,h,o){L(w,h,o,{noUirevision:!0,type:n.name,attributes:s,handleDefaults:u,font:h.font,paper_bgcolor:h.paper_bgcolor,fullData:o,layoutOut:h})};function g(f,w){var h={};return function(o){var d=w?w(o):o;if(d in h)return h[d];var M=f(o);return h[d]=M,M}}},49119:function(G,V,e){var m=e(71828),P=e(44467),i=e(27670).c;G.exports=function(A,v,p,t){var r=t.type,s=t.attributes,n=t.handleDefaults,l=t.partition||"x",c=v._subplots[r],u=c.length,g=u&&c[0].replace(/\d+$/,""),f,w;function h(T,C){return m.coerce(f,w,s,T,C)}for(var o=0;o<u;o++){var d=c[o];A[d]?f=A[d]:f=A[d]={},w=P.newContainer(v,d,g),t.noUirevision||h("uirevision",v.uirevision);var M={};M[l]=[o/u,(o+1)/u],i(w,v,h,M),t.id=d,n(f,w,h,t)}}},5386:function(G,V,e){var m=e(31562);m.FORMAT_LINK,m.DATE_FORMAT_LINK;function P(i){var L=i.description?" "+i.description:"",A=i.keys||[];if(A.length>0){for(var v=[],p=0;p<A.length;p++)v[p]="`"+A[p]+"`";L=L+"Finally, the template string has access to ",A.length===1?L=L+"variable "+v[0]:L=L+"variables "+v.slice(0,-1).join(", ")+" and "+v.slice(-1)+"."}return L}V.fF=function(i,L){i=i||{},L=L||{},P(L);var A={valType:"string",dflt:"",editType:i.editType||"none"};return i.arrayOk!==!1&&(A.arrayOk=!0),A},V.si=function(i,L){i=i||{},L=L||{},P(L);var A={valType:"string",dflt:"",editType:i.editType||"calc"};return i.arrayOk!==!1&&(A.arrayOk=!0),A},V.R=function(i,L){i=i||{},L=L||{},i.newshape,P(L);var A={valType:"string",dflt:"",editType:i.editType||"arraydraw"};return A}},61639:function(G,V,e){var m=e(64380),P=e(27659).AU,i=e(71828).counterRegex,L="ternary";V.name=L;var A=V.attr="subplot";V.idRoot=L,V.idRegex=V.attrRegex=i(L);var v=V.attributes={};v[A]={valType:"subplotid",dflt:"ternary",editType:"calc"},V.layoutAttributes=e(81367),V.supplyLayoutDefaults=e(25369),V.plot=function(t){for(var r=t._fullLayout,s=t.calcdata,n=r._subplots[L],l=0;l<n.length;l++){var c=n[l],u=P(s,L,c),g=r[c]._subplot;g||(g=new m({id:c,graphDiv:t,container:r._ternarylayer.node()},r),r[c]._subplot=g),g.plot(u,r,t._promises)}},V.clean=function(p,t,r,s){for(var n=s._subplots[L]||[],l=0;l<n.length;l++){var c=n[l],u=s[c]._subplot;!t[c]&&u&&(u.plotContainer.remove(),u.clipDef.remove(),u.clipDefRelative.remove(),u.layers["a-title"].remove(),u.layers["b-title"].remove(),u.layers["c-title"].remove())}}},81367:function(G,V,e){var m=e(22399),P=e(27670).Y,i=e(13838),L=e(30962).overrideAll,A=e(1426).extendFlat,v={title:{text:i.title.text,font:i.title.font},color:i.color,tickmode:i.minor.tickmode,nticks:A({},i.nticks,{dflt:6,min:1}),tick0:i.tick0,dtick:i.dtick,tickvals:i.tickvals,ticktext:i.ticktext,ticks:i.ticks,ticklen:i.ticklen,tickwidth:i.tickwidth,tickcolor:i.tickcolor,ticklabelstep:i.ticklabelstep,showticklabels:i.showticklabels,labelalias:i.labelalias,showtickprefix:i.showtickprefix,tickprefix:i.tickprefix,showticksuffix:i.showticksuffix,ticksuffix:i.ticksuffix,showexponent:i.showexponent,exponentformat:i.exponentformat,minexponent:i.minexponent,separatethousands:i.separatethousands,tickfont:i.tickfont,tickangle:i.tickangle,tickformat:i.tickformat,tickformatstops:i.tickformatstops,hoverformat:i.hoverformat,showline:A({},i.showline,{dflt:!0}),linecolor:i.linecolor,linewidth:i.linewidth,showgrid:A({},i.showgrid,{dflt:!0}),gridcolor:i.gridcolor,gridwidth:i.gridwidth,griddash:i.griddash,layer:i.layer,min:{valType:"number",dflt:0,min:0},_deprecated:{title:i._deprecated.title,titlefont:i._deprecated.titlefont}},p=G.exports=L({domain:P({name:"ternary"}),bgcolor:{valType:"color",dflt:m.background},sum:{valType:"number",dflt:1,min:0},aaxis:v,baxis:v,caxis:v},"plot","from-root");p.uirevision={valType:"any",editType:"none"},p.aaxis.uirevision=p.baxis.uirevision=p.caxis.uirevision={valType:"any",editType:"none"}},25369:function(G,V,e){var m=e(7901),P=e(44467),i=e(71828),L=e(49119),A=e(96115),v=e(89426),p=e(38701),t=e(26218),r=e(92128),s=e(81367),n=["aaxis","baxis","caxis"];G.exports=function(g,f,w){L(g,f,w,{type:"ternary",attributes:s,handleDefaults:l,font:f.font,paper_bgcolor:f.paper_bgcolor})};function l(u,g,f,w){var h=f("bgcolor"),o=f("sum");w.bgColor=m.combine(h,w.paper_bgcolor);for(var d,M,T,C=0;C<n.length;C++)d=n[C],M=u[d]||{},T=P.newContainer(g,d),T._name=d,c(M,T,w,g);var x=g.aaxis,S=g.baxis,b=g.caxis;x.min+S.min+b.min>=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;te<N.length;te++){var ae=N[te][0].trace;if(ae.cliponaxis===!1){U._hasClipOnAxisFalse=!0;break}}U.updateLayers(Y),U.adjustLayout(Y,J),n.generalUpdatePerTraceModule(U.graphDiv,U,N,Y),U.layers.plotbg.select("path").call(p.fill,Y.bgcolor)},S.makeFramework=function(N){var _=this,U=_.graphDiv,Y=N[_.id],J=_.clipId="clip"+_.layoutId+_.id,te=_.clipIdRelative="clip-relative"+_.layoutId+_.id;_.clipDef=L.ensureSingleById(N._clips,"clipPath",J,function(ae){ae.append("path").attr("d","M0,0Z")}),_.clipDefRelative=L.ensureSingleById(N._clips,"clipPath",te,function(ae){ae.append("path").attr("d","M0,0Z")}),_.plotContainer=L.ensureSingle(_.container,"g",_.id),_.updateLayers(Y),t.setClipUrl(_.layers.backplot,J,U),t.setClipUrl(_.layers.grids,J,U)},S.updateLayers=function(N){var _=this,U=_.layers,Y=["draglayer","plotbg","backplot","grids"];N.aaxis.layer==="below traces"&&Y.push("aaxis","aline"),N.baxis.layer==="below traces"&&Y.push("baxis","bline"),N.caxis.layer==="below traces"&&Y.push("caxis","cline"),Y.push("frontplot"),N.aaxis.layer==="above traces"&&Y.push("aaxis","aline"),N.baxis.layer==="above traces"&&Y.push("baxis","bline"),N.caxis.layer==="above traces"&&Y.push("caxis","cline");var J=_.plotContainer.selectAll("g.toplevel").data(Y,String),te=["agrid","bgrid","cgrid"];J.enter().append("g").attr("class",function(ae){return"toplevel "+ae}).each(function(ae){var ce=m.select(this);U[ae]=ce,ae==="frontplot"?ce.append("g").classed("scatterlayer",!0):ae==="backplot"?ce.append("g").classed("maplayer",!0):ae==="plotbg"?ce.append("path").attr("d","M0,0Z"):ae==="aline"||ae==="bline"||ae==="cline"?ce.append("path"):ae==="grids"&&te.forEach(function(Q){U[Q]=ce.append("g").classed("grid "+Q,!0)})}),J.order()};var b=Math.sqrt(4/3);S.adjustLayout=function(N,_){var U=this,Y=N.domain,J=(Y.x[0]+Y.x[1])/2,te=(Y.y[0]+Y.y[1])/2,ae=Y.x[1]-Y.x[0],ce=Y.y[1]-Y.y[0],Q=ae*_.w,Z=ce*_.h,j=N.sum,K=N.aaxis.min,ee=N.baxis.min,oe=N.caxis.min,q,$,le,ie,he,me;Q>b*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<C.MINZOOM?(j=Q,q.attr("d",ee),$.attr("d","M0,0Z")):(j={a:Q.a+nt*Z,b:Q.b+qe*Z,c:Q.c+$e*Z},q.attr("d",ee+"M"+et+","+At+"H"+ct+"L"+dt+","+Mt+"L"+et+","+At+"Z"),$.attr("d","M"+ae+","+ce+B+"M"+et+","+At+y+"M"+ct+","+At+z+"M"+dt+","+Mt+I)),oe||(q.transition().style("fill",K>.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<T.length;C++){var x=T[C];if(!x)throw new Error("Invalid module was attempted to be registered!");switch(x.moduleType){case"trace":n(x);break;case"transform":u(x);break;case"component":c(x);break;case"locale":g(x);break;case"apiMethod":var S=x.name;V.apiMethodRegistry[S]=x.fn;break;default:throw new Error("Invalid module was attempted to be registered!")}}},V.getModule=function(M){var T=V.modules[d(M)];return T?T._module:!1},V.traceIs=function(M,T){if(M=d(M),M==="various")return!1;var C=V.modules[M];return C||(M&&m.log("Unrecognized trace type "+M+"."),C=V.modules[p.type.dflt]),!!C.categories[T]},V.getTransformIndices=function(M,T){for(var C=[],x=M.transforms||[],S=0;S<x.length;S++)x[S].type===T&&C.push(S);return C},V.hasTransform=function(M,T){for(var C=M.transforms||[],x=0;x<C.length;x++)if(C[x].type===T)return!0;return!1},V.getComponentMethod=function(M,T){var C=V.componentsRegistry[M];return C&&C[T]||P},V.call=function(){var M=arguments[0],T=[].slice.call(arguments,1);return V.apiMethodRegistry[M].apply(null,T)};function n(M){var T=M.name,C=M.categories,x=M.meta;if(V.modules[T]){m.log("Type "+T+" already registered");return}V.subplotsRegistry[M.basePlotModule.name]||l(M.basePlotModule);for(var S={},b=0;b<C.length;b++)S[C[b]]=!0,V.allCategories[C[b]]=!0;V.modules[T]={_module:M,categories:S},x&&Object.keys(x).length&&(V.modules[T].meta=x),V.allTypes.push(T);for(var a in V.componentsRegistry)w(a,T);M.layoutAttributes&&r(V.traceLayoutAttributes,M.layoutAttributes);var E=M.basePlotModule,y=E.name;if(y==="mapbox"){var z=E.constants.styleRules;for(var I in z)A(".js-plotly-plot .plotly .mapboxgl-"+I,z[I])}(y==="geo"||y==="mapbox")&&window.PlotlyGeoAssets===void 0&&(window.PlotlyGeoAssets={topojson:{}})}function l(M){var T=M.name;if(V.subplotsRegistry[T]){m.log("Plot type "+T+" already registered.");return}f(M),V.subplotsRegistry[T]=M;for(var C in V.componentsRegistry)o(C,M.name)}function c(M){if(typeof M.name!="string")throw new Error("Component module *name* must be a string.");var T=M.name;V.componentsRegistry[T]=M,M.layoutAttributes&&(M.layoutAttributes._isLinkedToArray&&i(V.layoutArrayContainers,T),f(M));for(var C in V.modules)w(T,C);for(var x in V.subplotsRegistry)o(T,x);for(var S in V.transformsRegistry)h(T,S);M.schema&&M.schema.layout&&s(t,M.schema.layout)}function u(M){if(typeof M.name!="string")throw new Error("Transform module *name* must be a string.");var T="Transform module "+M.name,C=typeof M.transform=="function",x=typeof M.calcTransform=="function";if(!C&&!x)throw new Error(T+" is missing a *transform* or *calcTransform* method.");C&&x&&m.log([T+" has both a *transform* and *calcTransform* methods.","Please note that all *transform* methods are executed","before all *calcTransform* methods."].join(" ")),L(M.attributes)||m.log(T+" registered without an *attributes* object."),typeof M.supplyDefaults!="function"&&m.log(T+" registered without a *supplyDefaults* method."),V.transformsRegistry[M.name]=M;for(var S in V.componentsRegistry)h(S,M.name)}function g(M){var T=M.name,C=T.split("-")[0],x=M.dictionary,S=M.format,b=x&&Object.keys(x).length,a=S&&Object.keys(S).length,E=V.localeRegistry,y=E[T];if(y||(E[T]=y={}),C!==T){var z=E[C];z||(E[C]=z={}),b&&z.dictionary===y.dictionary&&(z.dictionary=x),a&&z.format===y.format&&(z.format=S)}b&&(y.dictionary=x),a&&(y.format=S)}function f(M){if(M.layoutAttributes){var T=M.layoutAttributes._arrayAttrRegexps;if(T)for(var C=0;C<T.length;C++)i(V.layoutArrayRegexes,T[C])}}function w(M,T){var C=V.componentsRegistry[M].schema;if(!(!C||!C.traces)){var x=C.traces[T];x&&s(V.modules[T]._module.attributes,x)}}function h(M,T){var C=V.componentsRegistry[M].schema;if(!(!C||!C.transforms)){var x=C.transforms[T];x&&s(V.transformsRegistry[T].attributes,x)}}function o(M,T){var C=V.componentsRegistry[M].schema;if(!(!C||!C.subplots)){var x=V.subplotsRegistry[T],S=x.layoutAttributes,b=x.attr==="subplot"?x.name:x.attr;Array.isArray(b)&&(b=b[0]);var a=C.subplots[b];S&&a&&s(S,a)}}function d(M){return typeof M=="object"&&(M=M.type),M}},61914:function(G,V,e){var m=e(73972),P=e(71828),i=P.extendFlat,L=P.extendDeep;function A(p){var t;switch(p){case"themes__thumb":t={autosize:!0,width:150,height:150,title:{text:""},showlegend:!1,margin:{l:5,r:5,t:5,b:5,pad:0},annotations:[]};break;case"thumbnail":t={title:{text:""},hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:t={}}return t}function v(p){var t=["xaxis","yaxis","zaxis"];return t.indexOf(p.slice(0,5))>-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<f.length;s++)v(f[s])&&(u[f[s]].title={text:""});for(s=0;s<c.length;s++){var w=c[s];w.showscale=!1,w.marker&&(w.marker.showscale=!1),m.traceIs(w,"pie-like")&&(w.textposition="none")}}if(Array.isArray(r.annotations))for(s=0;s<r.annotations.length;s++)u.annotations.push(r.annotations[s]);var h=Object.keys(u).filter(function(C){return C.match(/^scene\d*$/)});if(h.length){var o={};for(r.tileClass==="thumbnail"&&(o={title:{text:""},showaxeslabels:!1,showticklabels:!1,linetickenable:!1}),s=0;s<h.length;s++){var d=u[h[s]];d.xaxis||(d.xaxis={}),d.yaxis||(d.yaxis={}),d.zaxis||(d.zaxis={}),i(d.xaxis,o),i(d.yaxis,o),i(d.zaxis,o),d._scene=null}}var M=document.createElement("div");r.tileClass&&(M.className=r.tileClass);var T={gd:M,td:M,layout:u,data:c,config:{staticPlot:r.staticPlot===void 0?!0:r.staticPlot,plotGlPixelRatio:r.plotGlPixelRatio===void 0?2:r.plotGlPixelRatio,displaylogo:r.displaylogo||!1,showLink:r.showLink||!1,showTips:r.showTips||!1,mapboxAccessToken:g.mapboxAccessToken}};return r.setBackground!=="transparent"&&(T.config.setBackground=r.setBackground||"opaque"),T.gd.defaultLayout=A(r.tileClass),T}},7239:function(G,V,e){var m=e(71828),P=e(403),i=e(22435),L=e(25095);function A(v,p){var t;return m.isPlainObject(v)||(t=m.getGraphDiv(v)),p=p||{},p.format=p.format||"png",p.width=p.width||null,p.height=p.height||null,p.imageDataOnly=!0,new Promise(function(r,s){t&&t._snapshotInProgress&&s(new Error("Snapshotting already in progress.")),m.isIE()&&p.format!=="svg"&&s(new Error(L.MSG_IE_BAD_FORMAT)),t&&(t._snapshotInProgress=!0);var n=P(v,p),l=p.filename||v.fn||"newplot";l+="."+p.format.replace("-","."),n.then(function(c){return t&&(t._snapshotInProgress=!1),i(c,l,p.format)}).then(function(c){r(c)}).catch(function(c){t&&(t._snapshotInProgress=!1),s(c)})})}G.exports=A},22435:function(G,V,e){var m=e(71828),P=e(25095);function i(L,A,v){var p=document.createElement("a"),t="download"in p,r=new Promise(function(s,n){var l,c;if(m.isIE())return l=P.createBlob(L,"svg"),window.navigator.msSaveBlob(l,A),l=null,s(A);if(t)return l=P.createBlob(L,v),c=P.createObjectURL(l),p.href=c,p.download=A,document.body.appendChild(p),p.click(),document.body.removeChild(p),P.revokeObjectURL(c),l=null,s(A);if(m.isSafari()){var u=v==="svg"?",":";base64,";return P.octetStream(u+encodeURIComponent(L)),s(A)}n(new Error("download error"))});return r}G.exports=i},25095:function(G,V,e){var m=e(73972);V.getDelay=function(L){return L._has&&(L._has("gl3d")||L._has("gl2d")||L._has("mapbox"))?500:0},V.getRedrawFunc=function(L){return function(){m.getComponentMethod("colorbar","draw")(L)}},V.encodeSVG=function(L){return"data:image/svg+xml,"+encodeURIComponent(L)},V.encodeJSON=function(L){return"data:application/json,"+encodeURIComponent(L)};var P=window.URL||window.webkitURL;V.createObjectURL=function(L){return P.createObjectURL(L)},V.revokeObjectURL=function(L){return P.revokeObjectURL(L)},V.createBlob=function(L,A){if(A==="svg")return new window.Blob([L],{type:"image/svg+xml;charset=utf-8"});if(A==="full-json")return new window.Blob([L],{type:"application/json;charset=utf-8"});var v=i(window.atob(L));return new window.Blob([v],{type:"image/"+A})},V.octetStream=function(L){document.location.href="data:application/octet-stream"+L};function i(L){for(var A=L.length,v=new ArrayBuffer(A),p=new Uint8Array(v),t=0;t<A;t++)p[t]=L.charCodeAt(t);return v}V.IMAGE_URL_PREFIX=/^data:image\/\w+;base64,/,V.MSG_IE_BAD_FORMAT="Sorry IE does not support downloading from canvas. Try {format:'svg'} instead."},44511:function(G,V,e){var m=e(25095),P={getDelay:m.getDelay,getRedrawFunc:m.getRedrawFunc,clone:e(61914),toSVG:e(5900),svgToImg:e(70942),toImage:e(56395),downloadImage:e(7239)};G.exports=P},70942:function(G,V,e){var m=e(71828),P=e(15398).EventEmitter,i=e(25095);function L(A){var v=A.emitter||new P,p=new Promise(function(t,r){var s=window.Image,n=A.svg,l=A.format||"png";if(m.isIE()&&l!=="svg"){var c=new Error(i.MSG_IE_BAD_FORMAT);return r(c),A.promise?p:v.emit("error",c)}var u=A.canvas,g=A.scale||1,f=A.width||300,w=A.height||150,h=g*f,o=g*w,d=u.getContext("2d",{willReadFrequently:!0}),M=new s,T,C;l==="svg"||m.isSafari()?C=i.encodeSVG(n):(T=i.createBlob(n,"svg"),C=i.createObjectURL(T)),u.width=h,u.height=o,M.onload=function(){var x;switch(T=null,i.revokeObjectURL(C),l!=="svg"&&d.drawImage(M,0,0,h,o),l){case"jpeg":x=u.toDataURL("image/jpeg");break;case"png":x=u.toDataURL("image/png");break;case"webp":x=u.toDataURL("image/webp");break;case"svg":x=C;break;default:var S="Image format is not jpeg, png, svg or webp.";if(r(new Error(S)),!A.promise)return v.emit("error",S)}t(x),A.promise||v.emit("success",x)},M.onerror=function(x){if(T=null,i.revokeObjectURL(C),r(x),!A.promise)return v.emit("error",x)},M.src=C});return A.promise?p:v}G.exports=L},56395:function(G,V,e){var m=e(15398).EventEmitter,P=e(73972),i=e(71828),L=e(25095),A=e(61914),v=e(5900),p=e(70942);function t(r,s){var n=new m,l=A(r,{format:"png"}),c=l.gd;c.style.position="absolute",c.style.left="-5000px",document.body.appendChild(c);function u(){var f=L.getDelay(c._fullLayout);setTimeout(function(){var w=v(c),h=document.createElement("canvas");h.id=i.randstr(),n=p({format:s.format,width:c._fullLayout.width,height:c._fullLayout.height,canvas:h,emitter:n,svg:w}),n.clean=function(){c&&document.body.removeChild(c)}},f)}var g=L.getRedrawFunc(c);return P.call("_doPlot",c,l.data,l.layout,l.config).then(g).then(u).catch(function(f){n.emit("error",f)}),n}G.exports=t},5900:function(G,V,e){var m=e(39898),P=e(71828),i=e(91424),L=e(7901),A=e(77922),v=/"/g,p="TOBESTRIPPED",t=new RegExp('("'+p+")|("+p+'")',"g");function r(n){var l=m.select("body").append("div").style({display:"none"}).html(""),c=n.replace(/(&[^;]*;)/gi,function(u){return u==="&lt;"?"&#60;":u==="&rt;"?"&#62;":u.indexOf("<")!==-1||u.indexOf(">")!==-1?"":l.html(u).text()});return l.remove(),c}function s(n){return n.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&amp;")}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;d<M.length;d++){var T=M[d];T.toSVG&&T.toSVG(l)}if(w){var C=w.node().childNodes,x=Array.prototype.slice.call(C);for(d=0;d<x.length;d++){var S=x[d];S.childNodes.length&&f.node().appendChild(S)}}g._draggers&&g._draggers.remove(),f.node().style.background="",f.selectAll("text").attr({"data-unformatted":null,"data-math":null}).each(function(){var a=m.select(this);if(this.style.visibility==="hidden"||this.style.display==="none"){a.remove();return}else a.style({visibility:null,display:null});var E=this.style.fontFamily;E&&E.indexOf('"')!==-1&&a.style("font-family",E.replace(v,p))}),f.selectAll(".gradient_filled,.pattern_filled").each(function(){var a=m.select(this),E=this.style.fill;E&&E.indexOf("url(")!==-1&&a.style("fill",E.replace(v,p));var y=this.style.stroke;y&&y.indexOf("url(")!==-1&&a.style("stroke",y.replace(v,p))}),(c==="pdf"||c==="eps")&&f.selectAll("#MathJax_SVG_glyphs path").attr("stroke-width",0),f.node().setAttributeNS(A.xmlns,"xmlns",A.svg),f.node().setAttributeNS(A.xmlns,"xmlns:xlink",A.xlink),c==="svg"&&u&&(f.attr("width",u*h),f.attr("height",u*o),f.attr("viewBox","0 0 "+h+" "+o));var b=new window.XMLSerializer().serializeToString(f.node());return b=r(b),b=s(b),b=b.replace(t,"'"),P.isIE()&&(b=b.replace(/"/gi,"'"),b=b.replace(/(\('#)([^']*)('\))/gi,'("#$2")'),b=b.replace(/(\\')/gi,'"')),b}},75341:function(G,V,e){var m=e(71828);G.exports=function(i,L){for(var A=0;A<i.length;A++)i[A].i=A;m.mergeArray(L.text,i,"tx"),m.mergeArray(L.hovertext,i,"htx");var v=L.marker;if(v){m.mergeArray(v.opacity,i,"mo",!0),m.mergeArray(v.color,i,"mc");var p=v.line;p&&(m.mergeArray(p.color,i,"mlc"),m.mergeArrayCastPositive(p.width,i,"mlw"))}}},1486:function(G,V,e){var m=e(82196),P=e(12663).axisHoverFormat,i=e(5386).fF,L=e(5386).si,A=e(50693),v=e(41940),p=e(97313),t=e(79952).u,r=e(1426).extendFlat,s=v({editType:"calc",arrayOk:!0,colorEditType:"style"}),n=m.marker,l=n.line,c=r({},l.width,{dflt:0}),u=r({width:c,editType:"calc"},A("marker.line")),g=r({line:u,editType:"calc"},A("marker"),{opacity:{valType:"number",arrayOk:!0,dflt:1,min:0,max:1,editType:"style"},pattern:t});G.exports={x:m.x,x0:m.x0,dx:m.dx,y:m.y,y0:m.y0,dy:m.dy,xperiod:m.xperiod,yperiod:m.yperiod,xperiod0:m.xperiod0,yperiod0:m.yperiod0,xperiodalignment:m.xperiodalignment,yperiodalignment:m.yperiodalignment,xhoverformat:P("x"),yhoverformat:P("y"),text:m.text,texttemplate:L({editType:"plot"},{keys:p.eventDataKeys}),hovertext:m.hovertext,hovertemplate:i({},{keys:p.eventDataKeys}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"calc"},insidetextanchor:{valType:"enumerated",values:["end","middle","start"],dflt:"end",editType:"plot"},textangle:{valType:"angle",dflt:"auto",editType:"plot"},textfont:r({},s,{}),insidetextfont:r({},s,{}),outsidetextfont:r({},s,{}),constraintext:{valType:"enumerated",values:["inside","outside","both","none"],dflt:"both",editType:"calc"},cliponaxis:r({},m.cliponaxis,{}),orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},base:{valType:"any",dflt:null,arrayOk:!0,editType:"calc"},offset:{valType:"number",dflt:null,arrayOk:!0,editType:"calc"},width:{valType:"number",dflt:null,min:0,arrayOk:!0,editType:"calc"},marker:g,offsetgroup:m.offsetgroup,alignmentgroup:m.alignmentgroup,selected:{marker:{opacity:m.selected.marker.opacity,color:m.selected.marker.color,editType:"style"},textfont:m.selected.textfont,editType:"style"},unselected:{marker:{opacity:m.unselected.marker.opacity,color:m.unselected.marker.color,editType:"style"},textfont:m.unselected.textfont,editType:"style"},_deprecated:{bardir:{valType:"enumerated",editType:"calc",values:["v","h"]}}}},92290:function(G,V,e){var m=e(89298),P=e(42973),i=e(52075).hasColorscale,L=e(78803),A=e(75341),v=e(66279);G.exports=function(t,r){var s=m.getFromId(t,r.xaxis||"x"),n=m.getFromId(t,r.yaxis||"y"),l,c,u,g,f,w,h={msUTC:!!(r.base||r.base===0)};r.orientation==="h"?(l=s.makeCalcdata(r,"x",h),u=n.makeCalcdata(r,"y"),g=P(r,n,"y",u),f=!!r.yperiodalignment,w="y"):(l=n.makeCalcdata(r,"y",h),u=s.makeCalcdata(r,"x"),g=P(r,s,"x",u),f=!!r.xperiodalignment,w="x"),c=g.vals;for(var o=Math.min(c.length,l.length),d=new Array(o),M=0;M<o;M++)d[M]={p:c[M],s:l[M]},f&&(d[M].orig_p=u[M],d[M][w+"End"]=g.ends[M],d[M][w+"Start"]=g.starts[M]),r.ids&&(d[M].id=String(r.ids[M]));return i(r,"marker")&&L(t,r,{vals:r.marker.color,containerStr:"marker",cLetter:"c"}),i(r,"marker.line")&&L(t,r,{vals:r.marker.line.color,containerStr:"marker.line",cLetter:"c"}),A(d,r),v(d,r),d}},97313:function(G){G.exports={TEXTPAD:3,eventDataKeys:["value","label"]}},11661:function(G,V,e){var m=e(92770),P=e(71828).isArrayOrTypedArray,i=e(50606).BADNUM,L=e(73972),A=e(89298),v=e(99082).getAxisGroup,p=e(61546);function t(b,a){for(var E=a.xaxis,y=a.yaxis,z=b._fullLayout,I=b._fullData,B=b.calcdata,k=[],O=[],N=0;N<I.length;N++){var _=I[N];if(_.visible===!0&&L.traceIs(_,"bar")&&_.xaxis===E._id&&_.yaxis===y._id&&(_.orientation==="h"?k.push(B[N]):O.push(B[N]),_._computePh))for(var U=b.calcdata[N],Y=0;Y<U.length;Y++)typeof U[Y].ph0=="function"&&(U[Y].ph0=U[Y].ph0()),typeof U[Y].ph1=="function"&&(U[Y].ph1=U[Y].ph1())}var J={xCat:E.type==="category"||E.type==="multicategory",yCat:y.type==="category"||y.type==="multicategory",mode:z.barmode,norm:z.barnorm,gap:z.bargap,groupgap:z.bargroupgap};r(b,E,y,O,J),r(b,y,E,k,J)}function r(b,a,E,y,z){if(y.length){var I,B,k,O,N;switch(s(E,y),z.mode){case"overlay":n(a,E,y,z);break;case"group":for(I=[],B=[],k=0;k<y.length;k++)O=y[k],N=O[0].trace,N.offset===void 0?B.push(O):I.push(O);B.length&&l(b,a,E,B,z),I.length&&n(a,E,I,z);break;case"stack":case"relative":for(I=[],B=[],k=0;k<y.length;k++)O=y[k],N=O[0].trace,N.base===void 0?B.push(O):I.push(O);B.length&&c(b,a,E,B,z),I.length&&n(a,E,I,z);break}x(y,a)}}function s(b,a){var E,y;for(E=0;E<a.length;E++){var z=a[E],I=z[0].trace,B=I.type==="funnel"?I._base:I.base,k,O=I.orientation==="h"?I.xcalendar:I.ycalendar,N=b.type==="category"||b.type==="multicategory"?function(){return null}:b.d2c;if(P(B)){for(y=0;y<Math.min(B.length,z.length);y++)k=N(B[y],0,O),m(k)?(z[y].b=+k,z[y].hasB=1):z[y].b=0;for(;y<z.length;y++)z[y].b=0}else{k=N(B,0,O);var _=m(k);for(k=_?k:0,y=0;y<z.length;y++)z[y].b=k,_&&(z[y].hasB=1)}}}function n(b,a,E,y){for(var z=0;z<E.length;z++){var I=E[z],B=new p([I],{posAxis:b,sepNegVal:!1,overlapNoMerge:!y.norm});u(b,B,y),y.norm?(M(B),C(a,B,y)):o(a,B)}}function l(b,a,E,y,z){var I=new p(y,{posAxis:a,sepNegVal:!1,overlapNoMerge:!z.norm});g(b,a,I,z),T(I,a),z.norm?(M(I),C(E,I,z)):o(E,I)}function c(b,a,E,y,z){var I=new p(y,{posAxis:a,sepNegVal:z.mode==="relative",overlapNoMerge:!(z.norm||z.mode==="stack"||z.mode==="relative")});u(a,I,z),d(E,I,z);for(var B=0;B<y.length;B++)for(var k=y[B],O=0;O<k.length;O++){var N=k[O];if(N.s!==i){var _=N.b+N.s===I.get(N.p,N.s);_&&(N._outmost=!0)}}z.norm&&C(E,I,z)}function u(b,a,E){for(var y=a.minDiff,z=a.traces,I=y*(1-E.gap),B=I,k=B*(1-(E.groupgap||0)),O=-k/2,N=0;N<z.length;N++){var _=z[N],U=_[0].t;U.barwidth=k,U.poffset=O,U.bargroupwidth=I,U.bardelta=y}a.binWidth=z[0][0].t.barwidth/100,f(a),w(b,a),h(b,a)}function g(b,a,E,y){for(var z=b._fullLayout,I=E.positions,B=E.distinctPositions,k=E.minDiff,O=E.traces,N=O.length,_=I.length!==B.length,U=k*(1-y.gap),Y=v(z,a._id)+O[0][0].trace.orientation,J=z._alignmentOpts[Y]||{},te=0;te<N;te++){var ae=O[te],ce=ae[0].trace,Q=J[ce.alignmentgroup]||{},Z=Object.keys(Q.offsetGroups||{}).length,j;Z?j=U/Z:j=_?U/N:U;var K=j*(1-(y.groupgap||0)),ee;Z?ee=((2*ce._offsetIndex+1-Z)*j-K)/2:ee=_?((2*te+1-N)*j-K)/2:-K/2;var oe=ae[0].t;oe.barwidth=K,oe.poffset=ee,oe.bargroupwidth=U,oe.bardelta=k}E.binWidth=O[0][0].t.barwidth/100,f(E),w(a,E),h(a,E,_)}function f(b){var a=b.traces,E,y;for(E=0;E<a.length;E++){var z=a[E],I=z[0],B=I.trace,k=I.t,O=B._offset||B.offset,N=k.poffset,_;if(P(O)){for(_=Array.prototype.slice.call(O,0,z.length),y=0;y<_.length;y++)m(_[y])||(_[y]=N);for(y=_.length;y<z.length;y++)_.push(N);k.poffset=_}else O!==void 0&&(k.poffset=O);var U=B._width||B.width,Y=k.barwidth;if(P(U)){var J=Array.prototype.slice.call(U,0,z.length);for(y=0;y<J.length;y++)m(J[y])||(J[y]=Y);for(y=J.length;y<z.length;y++)J.push(Y);if(k.barwidth=J,O===void 0){for(_=[],y=0;y<z.length;y++)_.push(N+(Y-J[y])/2);k.poffset=_}}else U!==void 0&&(k.barwidth=U,O===void 0&&(k.poffset=N+(Y-U)/2))}}function w(b,a){for(var E=a.traces,y=S(b),z=0;z<E.length;z++)for(var I=E[z],B=I[0].t,k=B.poffset,O=Array.isArray(k),N=B.barwidth,_=Array.isArray(N),U=0;U<I.length;U++){var Y=I[U],J=Y.w=_?N[U]:N;Y.p===void 0&&(Y.p=Y[y],Y["orig_"+y]=Y[y]);var te=(O?k[U]:k)+J/2;Y[y]=Y.p+te}}function h(b,a,E){var y=a.traces,z=a.minDiff,I=z/2;A.minDtick(b,a.minDiff,a.distinctPositions[0],E);for(var B=0;B<y.length;B++){var k=y[B],O=k[0],N=O.trace,_=[],U,Y,J,te;for(te=0;te<k.length;te++)U=k[te],Y=U.p-I,J=U.p+I,_.push(Y,J);if(N.width||N.offset){var ae=O.t,ce=ae.poffset,Q=ae.barwidth,Z=Array.isArray(ce),j=Array.isArray(Q);for(te=0;te<k.length;te++){U=k[te];var K=Z?ce[te]:ce,ee=j?Q[te]:Q;Y=U.p+K,J=Y+ee,_.push(Y,J)}}N._extremes[b._id]=A.findExtremes(b,_,{padded:!1})}}function o(b,a){for(var E=a.traces,y=S(b),z=0;z<E.length;z++){for(var I=E[z],B=I[0].trace,k=B.type==="scatter",O=B.orientation==="v",N=[],_=!1,U=0;U<I.length;U++){var Y=I[U],J=k?0:Y.b,te=k?O?Y.y:Y.x:J+Y.s;Y[y]=te,N.push(te),Y.hasB&&N.push(J),(!Y.hasB||!Y.b)&&(_=!0)}B._extremes[b._id]=A.findExtremes(b,N,{tozero:_,padded:!0})}}function d(b,a,E){var y=S(b),z=a.traces,I,B,k,O,N,_;for(O=0;O<z.length;O++)if(I=z[O],B=I[0].trace,B.type==="funnel")for(N=0;N<I.length;N++)_=I[N],_.s!==i&&a.put(_.p,-.5*_.s);for(O=0;O<z.length;O++){I=z[O],B=I[0].trace,k=B.type==="funnel";var U=[];for(N=0;N<I.length;N++)if(_=I[N],_.s!==i){var Y;k?Y=_.s:Y=_.s+_.b;var J=a.put(_.p,Y),te=J+Y;_.b=J,_[y]=te,E.norm||(U.push(te),_.hasB&&U.push(J))}E.norm||(B._extremes[b._id]=A.findExtremes(b,U,{tozero:!0,padded:!0}))}}function M(b){for(var a=b.traces,E=0;E<a.length;E++)for(var y=a[E],z=0;z<y.length;z++){var I=y[z];I.s!==i&&b.put(I.p,I.b+I.s)}}function T(b,a){for(var E=b.traces,y=0;y<E.length;y++){var z=E[y],I=z[0].trace;if(I.base===void 0)for(var B=new p([z],{posAxis:a,sepNegVal:!0,overlapNoMerge:!0}),k=0;k<z.length;k++){var O=z[k];if(O.p!==i){var N=B.put(O.p,O.b+O.s);N&&(O.b=N)}}}}function C(b,a,E){var y=a.traces,z=S(b),I=E.norm==="fraction"?1:100,B=I/1e9,k=b.l2c(b.c2l(0)),O=E.mode==="stack"?I:k;function N(ee){return m(b.c2l(ee))&&(ee<k-B||ee>O+B||!m(k))}for(var _=0;_<y.length;_++){for(var U=y[_],Y=U[0].trace,J=[],te=!1,ae=!1,ce=0;ce<U.length;ce++){var Q=U[ce];if(Q.s!==i){var Z=Math.abs(I/a.get(Q.p,Q.s));Q.b*=Z,Q.s*=Z;var j=Q.b,K=j+Q.s;Q[z]=K,J.push(K),ae=ae||N(K),Q.hasB&&(J.push(j),ae=ae||N(j)),(!Q.hasB||!Q.b)&&(te=!0)}}Y._extremes[b._id]=A.findExtremes(b,J,{tozero:te,padded:ae})}}function x(b,a){var E=S(a),y={},z,I,B,k=1/0,O=-1/0;for(z=0;z<b.length;z++)for(B=b[z],I=0;I<B.length;I++){var N=B[I].p;m(N)&&(k=Math.min(k,N),O=Math.max(O,N))}var _=1e4/(O-k),U=y.round=function(Z){return String(Math.round(_*(Z-k)))};for(z=0;z<b.length;z++){B=b[z],B[0].t.extents=y;var Y=B[0].t.poffset,J=Array.isArray(Y);for(I=0;I<B.length;I++){var te=B[I],ae=te[E]-te.w/2;if(m(ae)){var ce=te[E]+te.w/2,Q=U(te.p);y[Q]?y[Q]=[Math.min(ae,y[Q][0]),Math.max(ce,y[Q][1])]:y[Q]=[ae,ce]}te.p0=te.p+(J?Y[I]:Y),te.p1=te.p0+te.w,te.s0=te.b,te.s1=te.s0+te.s}}}function S(b){return b._id.charAt(0)}G.exports={crossTraceCalc:t,setGroupPositions:r}},90769:function(G,V,e){var m=e(71828),P=e(7901),i=e(73972),L=e(67513),A=e(73927),v=e(98340),p=e(26125),t=e(1486),r=m.coerceFont;function s(c,u,g,f){function w(T,C){return m.coerce(c,u,t,T,C)}var h=L(c,u,f,w);if(!h){u.visible=!1;return}A(c,u,f,w),w("xhoverformat"),w("yhoverformat"),w("orientation",u.x&&!u.y?"h":"v"),w("base"),w("offset"),w("width"),w("text"),w("hovertext"),w("hovertemplate");var o=w("textposition");l(c,u,f,w,o,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),v(c,u,w,g,f);var d=(u.marker.line||{}).color,M=i.getComponentMethod("errorbars","supplyDefaults");M(c,u,d||P.defaultLine,{axis:"y"}),M(c,u,d||P.defaultLine,{axis:"x",inherit:"y"}),m.coerceSelectionMarkerOpacity(u,w)}function n(c,u){var g,f;function w(o){return m.coerce(f._input,f,t,o)}if(u.barmode==="group")for(var h=0;h<c.length;h++)f=c[h],f.type==="bar"&&(g=f._input,p(g,f,u,w))}function l(c,u,g,f,w,h){h=h||{};var o=h.moduleHasSelected!==!1,d=h.moduleHasUnselected!==!1,M=h.moduleHasConstrain!==!1,T=h.moduleHasCliponaxis!==!1,C=h.moduleHasTextangle!==!1,x=h.moduleHasInsideanchor!==!1,S=!!h.hasPathbar,b=Array.isArray(w)||w==="auto",a=b||w==="inside",E=b||w==="outside";if(a||E){var y=r(f,"textfont",g.font),z=m.extendFlat({},y),I=c.textfont&&c.textfont.color,B=!I;if(B&&delete z.color,r(f,"insidetextfont",z),S){var k=m.extendFlat({},y);B&&delete k.color,r(f,"pathbar.textfont",k)}E&&r(f,"outsidetextfont",y),o&&f("selected.textfont.color"),d&&f("unselected.textfont.color"),M&&f("constraintext"),T&&f("cliponaxis"),C&&f("textangle"),f("texttemplate")}a&&x&&f("insidetextanchor")}G.exports={supplyDefaults:s,crossTraceDefaults:n,handleText:l}},58065:function(G){G.exports=function(e,m,P){return e.x="xVal"in m?m.xVal:m.x,e.y="yVal"in m?m.yVal:m.y,m.xa&&(e.xaxis=m.xa),m.ya&&(e.yaxis=m.ya),P.orientation==="h"?(e.label=e.y,e.value=e.x):(e.label=e.x,e.value=e.y),e}},69383:function(G,V,e){var m=e(92770),P=e(84267),i=e(71828).isArrayOrTypedArray;V.coerceString=function(L,A,v){if(typeof A=="string"){if(A||!L.noBlank)return A}else if((typeof A=="number"||A===!0)&&!L.strict)return String(A);return v!==void 0?v:L.dflt},V.coerceNumber=function(L,A,v){if(m(A)){A=+A;var p=L.min,t=L.max,r=p!==void 0&&A<p||t!==void 0&&A>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)?A<L.length&&(v=L[A]):v=L,v},V.getLineWidth=function(L,A){var v=0<A.mlw?A.mlw:i(L.marker.line.width)?0:L.marker.line.width;return v}},95423:function(G,V,e){var m=e(30211),P=e(73972),i=e(7901),L=e(71828).fillText,A=e(69383).getLineWidth,v=e(89298).hoverLabelText,p=e(50606).BADNUM;function t(n,l,c,u,g){var f=r(n,l,c,u,g);if(f){var w=f.cd,h=w[0].trace,o=w[f.index];return f.color=s(h,o),P.getComponentMethod("errorbars","hoverInfo")(o,h,f),[f]}}function r(n,l,c,u,g){var f=n.cd,w=f[0].trace,h=f[0].t,o=u==="closest",d=w.type==="waterfall",M=n.maxHoverDistance,T=n.maxSpikeDistance,C,x,S,b,a,E,y;w.orientation==="h"?(C=c,x=l,S="y",b="x",a=ce,E=J):(C=l,x=c,S="x",b="y",E=ce,a=J);var z=w[S+"period"],I=o||z;function B(he){return O(he,-1)}function k(he){return O(he,1)}function O(he,me){var Me=he.w;return he[S]+me*Me/2}function N(he){return he[S+"End"]-he[S+"Start"]}var _=o?B:z?function(he){return he.p-N(he)/2}:function(he){return Math.min(B(he),he.p-h.bardelta/2)},U=o?k:z?function(he){return he.p+N(he)/2}:function(he){return Math.max(k(he),he.p+h.bardelta/2)};function Y(he,me,Me){return g.finiteRange&&(Me=0),m.inbox(he-C,me-C,Me+Math.min(1,Math.abs(me-he)/y)-1)}function J(he){return Y(_(he),U(he),M)}function te(he){return Y(B(he),k(he),T)}function ae(he){var me=he[b];if(d){var Me=Math.abs(he.rawS)||0;x>0?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;u<p.length;u++){var g=p[u];if(m.traceIs(g,"bar")&&g.visible)r=!0;else continue;if(c==="group"){var f=g.xaxis+g.yaxis;l[f]&&(n=!0),l[f]=!0}if(g.visible&&g.type==="histogram"){var w=P.getFromId({_fullLayout:v},g[g.orientation==="v"?"xaxis":"yaxis"]);w.type!=="category"&&(s=!0)}}if(!r){delete v.barmode;return}c!=="overlay"&&t("barnorm"),t("bargap",s&&!n?0:.2),t("bargroupgap")}},17295:function(G,V,e){var m=e(39898),P=e(92770),i=e(71828),L=e(63893),A=e(7901),v=e(91424),p=e(73972),t=e(89298).tickText,r=e(72597),s=r.recordMinTextSize,n=r.clearMinTextSize,l=e(16688),c=e(69383),u=e(97313),g=e(1486),f=g.text,w=g.textposition,h=e(23469).appendArrayPointValue,o=u.TEXTPAD;function d(_){return _.id}function M(_){if(_.ids)return d}function T(_,U){return _<U?1:-1}function C(_,U,Y,J){var te=[],ae=[],ce=J?U:Y,Q=J?Y:U;return te[0]=ce.c2p(_.s0,!0),ae[0]=Q.c2p(_.p0,!0),te[1]=ce.c2p(_.s1,!0),ae[1]=Q.c2p(_.p1,!0),J?[te,ae]:[ae,te]}function x(_,U,Y,J){if(!U.uniformtext.mode&&S(Y)){var te;return J&&(te=J()),_.transition().duration(Y.duration).ease(Y.easing).each("end",function(){te&&te()}).each("interrupt",function(){te&&te()})}else return _}function S(_){return _&&_.duration>0}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]<ee.range[1]?ae=0:ae=ee._length):oe.type==="log"&&Ue.s0<=0&&(oe.range[0]<oe.range[1]?Q=oe._length:Q=0);var He=Math.abs(ce-ae)-2*o,Fe=Math.abs(Z-Q)-2*o,Ge,nt,qe,$e,et;if($==="outside"&&!Oe&&!Te.hasB&&($="inside"),$==="auto")if(Oe){$="inside",et=i.ensureUniformFontSize(_,xe),Ge=le(Y,me,et),nt=v.bBox(Ge.node()),qe=nt.width,$e=nt.height;var ct=qe>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)||le<ie!=he<me)&&(Te+=90);var Oe=y(te,Te),Ne=1;Q&&(Ne=Math.min(1,he/Oe.x,me/Oe.y));var Ee=te.left*$+te.right*q,xe=(te.top+te.bottom)/2,Se=(_+o)*$+(U-o)*q,Ue=(Y+J)/2,He=0,Fe=0;if(ee||K){var Ge=(ce?Oe.x:Oe.y)/2,nt=ce?T(_,U):T(Y,J);ce?ee?(Se=_+nt*Me,He=-nt*Ge):(Se=U-nt*Me,He=nt*Ge):ee?(Ue=Y+nt*Me,Fe=-nt*Ge):(Ue=J-nt*Me,Fe=nt*Ge)}return{textX:Ee,textY:xe,targetX:Se,targetY:Ue,anchorX:He,anchorY:Fe,scale:Ne,rotate:Te}}function I(_,U,Y,J,te,ae){var ce=!!ae.isHorizontal,Q=!!ae.constrained,Z=ae.angle||0,j=te.width,K=te.height,ee=Math.abs(U-_),oe=Math.abs(J-Y),q;ce?q=oe>2*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("<br>")}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;s<i.length;s++)i[s].selected=0;else for(s=0;s<i.length;s++){var n=i[s],l="ct"in n?n.ct:V(n,L,A,t,p);P.contains(l,!1,s,m)?(r.push({pointNumber:s,x:L.c2d(n.x),y:A.c2d(n.y)}),n.selected=1):n.selected=0}return r};function V(e,m,P,i,L){var A=m.c2p(i?e.s0:e.p0,!0),v=m.c2p(i?e.s1:e.p1,!0),p=P.c2p(i?e.p0:e.s0,!0),t=P.c2p(i?e.p1:e.s1,!0);return L?[(A+v)/2,(p+t)/2]:i?[v,(p+t)/2]:[(A+v)/2,t]}},61546:function(G,V,e){G.exports=P;var m=e(71828).distinctVals;function P(i,L){this.traces=i,this.sepNegVal=L.sepNegVal,this.overlapNoMerge=L.overlapNoMerge;for(var A=1/0,v=L.posAxis._id.charAt(0),p=[],t=0;t<i.length;t++){for(var r=i[t],s=0;s<r.length;s++){var n=r[s],l=n.p;l===void 0&&(l=n[v]),l!==void 0&&p.push(l)}r[0]&&r[0].width1&&(A=Math.min(r[0].width1,A))}this.positions=p;var c=m(p);this.distinctPositions=c.vals,c.vals.length===1&&A!==1/0?this.minDiff=A:this.minDiff=Math.min(c.minDiff,A);var u=(L.posAxis||{}).type;(u==="category"||u==="multicategory")&&(this.minDiff=1),this.binWidth=this.minDiff,this.bins={}}P.prototype.put=function(L,A){var v=this.getLabel(L,A),p=this.bins[v]||0;return this.bins[v]=p+A,p},P.prototype.get=function(L,A){var v=this.getLabel(L,A);return this.bins[v]||0},P.prototype.getLabel=function(L,A){var v=A<0&&this.sepNegVal?"v":"^",p=this.overlapNoMerge?L:Math.round(L/this.binWidth);return v+p}},16688:function(G,V,e){var m=e(39898),P=e(7901),i=e(91424),L=e(71828),A=e(73972),v=e(72597).resizeText,p=e(1486),t=p.textfont,r=p.insidetextfont,s=p.outsidetextfont,n=e(69383);function l(x){var S=m.select(x).selectAll("g.barlayer").selectAll("g.trace");v(x,S,"bar");var b=S.size(),a=x._fullLayout;S.style("opacity",function(E){return E[0].trace.opacity}).each(function(E){(a.barmode==="stack"&&b>1||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=l<n,r[s]=r[s]||1/0,t.hide||(r[s]=Math.min(r[s],Math.max(l,n)))}}function A(p,t){var r=v(p);t[r]=void 0}function v(p){return"_"+p+"Text_minsize"}G.exports={recordMinTextSize:L,clearMinTextSize:A,resizeText:i}},55023:function(G,V,e){var m=e(5386).fF,P=e(1426).extendFlat,i=e(81245),L=e(1486);G.exports={r:i.r,theta:i.theta,r0:i.r0,dr:i.dr,theta0:i.theta0,dtheta:i.dtheta,thetaunit:i.thetaunit,base:P({},L.base,{}),offset:P({},L.offset,{}),width:P({},L.width,{}),text:P({},L.text,{}),hovertext:P({},L.hovertext,{}),marker:L.marker,hoverinfo:i.hoverinfo,hovertemplate:m(),selected:L.selected,unselected:L.unselected}},74692:function(G,V,e){var m=e(52075).hasColorscale,P=e(78803),i=e(75341),L=e(11661).setGroupPositions,A=e(66279),v=e(73972).traceIs,p=e(71828).extendFlat;function t(s,n){for(var l=s._fullLayout,c=n.subplot,u=l[c].radialaxis,g=l[c].angularaxis,f=u.makeCalcdata(n,"r"),w=g.makeCalcdata(n,"theta"),h=n._length,o=new Array(h),d=f,M=w,T=0;T<h;T++)o[T]={p:M[T],s:d[T]};function C(x){var S=n[x];S!==void 0&&(n["_"+x]=Array.isArray(S)?g.makeCalcdata(n,x):g.d2c(S,n.thetaunit))}return g.type==="linear"&&(C("width"),C("offset")),m(n,"marker")&&P(s,n,{vals:n.marker.color,containerStr:"marker",cLetter:"c"}),m(n,"marker.line")&&P(s,n,{vals:n.marker.line.color,containerStr:"marker.line",cLetter:"c"}),i(o,n),A(o,n),o}function r(s,n,l){for(var c=s.calcdata,u=[],g=0;g<c.length;g++){var f=c[g],w=f[0].trace;w.visible===!0&&v(w,"bar")&&w.subplot===l&&u.push(f)}var h=p({},n.radialaxis,{_id:"x"}),o=n.angularaxis;L(s,o,h,u,{mode:n.barmode,norm:n.barnorm,gap:n.bargap,groupgap:n.bargroupgap})}G.exports={calc:t,crossTraceCalc:r}},6135:function(G,V,e){var m=e(71828),P=e(22184).handleRThetaDefaults,i=e(98340),L=e(55023);G.exports=function(v,p,t,r){function s(l,c){return m.coerce(v,p,L,l,c)}var n=P(v,p,r,s);if(!n){p.visible=!1;return}s("thetaunit"),s("base"),s("offset"),s("width"),s("text"),s("hovertext"),s("hovertemplate"),i(v,p,s,t,r),m.coerceSelectionMarkerOpacity(p,s)}},27379:function(G,V,e){var m=e(30211),P=e(71828),i=e(95423).getTraceColor,L=P.fillText,A=e(59150).makeHoverPointText,v=e(10869).isPtInsidePolygon;G.exports=function(t,r,s){var n=t.cd,l=n[0].trace,c=t.subplot,u=c.radialAxis,g=c.angularAxis,f=c.vangles,w=f?v:P.isPtInsideSector,h=t.maxHoverDistance,o=g._period||2*Math.PI,d=Math.abs(u.g2p(Math.sqrt(r*r+s*s))),M=Math.atan2(s,r);u.range[0]>u.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;r<A.length;r++){var s=A[r];s.type==="barpolar"&&s.visible===!0&&(p=s.subplot,v[p]||(t("barmode"),t("bargap"),v[p]=1))}}},60173:function(G,V,e){var m=e(39898),P=e(92770),i=e(71828),L=e(91424),A=e(10869);G.exports=function(t,r,s){var n=t._context.staticPlot,l=r.xaxis,c=r.yaxis,u=r.radialAxis,g=r.angularAxis,f=v(r),w=r.layers.frontplot.select("g.barlayer");i.makeTraceGroups(w,s,"trace bars").each(function(){var h=m.select(this),o=i.ensureSingle(h,"g","points"),d=o.selectAll("g.point").data(i.identity);d.enter().append("g").style("vector-effect",n?"none":"non-scaling-stroke").style("stroke-miterlimit",2).classed("point",!0),d.exit().remove(),d.each(function(M){var T=m.select(this),C=M.rp0=u.c2p(M.s0),x=M.rp1=u.c2p(M.s1),S=M.thetag0=g.c2g(M.p0),b=M.thetag1=g.c2g(M.p1),a;if(!P(C)||!P(x)||!P(S)||!P(b)||C===x||S===b)a="M0,0Z";else{var E=u.c2g(M.s1),y=(S+b)/2;M.ct=[l.c2p(E*Math.cos(y)),c.c2p(E*Math.sin(y))],a=f(C,x,S,b)}i.ensureSingle(T,"path").attr("d",a)}),L.setClipUrl(h,r._hasClipOnAxisFalse?r.clipIds.forTraces:null,t)})};function v(p){var t=p.cxx,r=p.cyy;return p.vangles?function(s,n,l,c){var u,g;i.angleDelta(l,c)>0?(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.v<ae.lf||Mt.v>ae.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<T._length;E++){var ie=_[E];if(m(ie)){if(ae={},ae.pos=ae[k]=ie,O&&U&&(ae.orig_p=U[E]),ae.q1=q("q1"),ae.med=q("median"),ae.q3=q("q3"),ce=[],oe&&L.isArrayOrTypedArray(oe[E]))for(y=0;y<oe[E].length;y++)K=z.d2c(oe[E][y]),K!==A&&(j={v:K,i:[E,y]},n(j,T,[E,y]),ce.push(j));if(ae.pts=ce.sort(c),Q=ae[I]=ce.map(u),Z=Q.length,ae.med!==A&&ae.q1!==A&&ae.q3!==A&&ae.med>=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<T._length;E++)if(K=Se[E],!!m(K)){var Ge=L.findBin(_[E],Ue);Ge>=0&&Ge<He&&(j={v:K,i:E},n(j,T,E),Fe[Ge].push(j))}var nt=1/0,qe=-1/0,$e=T.quartilemethod,et=$e==="exclusive",ct=$e==="inclusive";for(E=0;E<He;E++)if(Fe[E].length>0){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;k<I;k++)B[k]=z;return[B]}function t(d,M){for(var T=d.length,C=new Array(T+1),x=0;x<T;x++)C[x]=d[x]-M;return C[T]=d[T-1]+M,C}function r(d){for(var M=new Array(d),T=0;T<d;T++)M[T]=[];return M}var s={text:"tx",hovertext:"htx"};function n(d,M,T){for(var C in s)L.isArrayOrTypedArray(M[C])&&(Array.isArray(T)?L.isArrayOrTypedArray(M[C][T[0]])&&(d[s[C]]=M[C][T[0]][T[1]]):d[s[C]]=M[C][T])}function l(d,M){if(L.isArrayOrTypedArray(M.selectedpoints))for(var T=0;T<d.length;T++){for(var C=d[T].pts||[],x={},S=0;S<C.length;S++)x[C[S].i]=S;L.tagSelected(C,M,x)}}function c(d,M){return d.v-M.v}function u(d){return d.v}function g(d,M,T){return T===0?d.q1:Math.min(d.q1,M[Math.min(L.findBin(2.5*d.q1-1.5*d.q3,M,!0)+1,T-1)])}function f(d,M,T){return T===0?d.q3:Math.max(d.q3,M[Math.max(L.findBin(2.5*d.q3-1.5*d.q1,M),0)])}function w(d){return 4*d.q1-3*d.q3}function h(d){return 4*d.q3-3*d.q1}function o(d,M){return M===0?0:1.57*(d.q3-d.q1)/Math.sqrt(M)}},37188:function(G,V,e){var m=e(89298),P=e(71828),i=e(99082).getAxisGroup,L=["v","h"];function A(p,t){for(var r=p.calcdata,s=t.xaxis,n=t.yaxis,l=0;l<L.length;l++){for(var c=L[l],u=c==="h"?n:s,g=[],f=0;f<r.length;f++){var w=r[f],h=w[0].t,o=w[0].trace;o.visible===!0&&(o.type==="box"||o.type==="candlestick")&&!h.empty&&(o.orientation||"v")===c&&o.xaxis===s._id&&o.yaxis===n._id&&g.push(f)}v("box",p,g,u)}}function v(p,t,r,s){var n=t.calcdata,l=t._fullLayout,c=s._id,u=c.charAt(0),g,f,w,h=[],o=0;for(g=0;g<r.length;g++)for(w=n[r[g]],f=0;f<w.length;f++)h.push(s.c2l(w[f].pos,!0)),o+=(w[f].pts2||[]).length;if(h.length){var d=P.distinctVals(h);(s.type==="category"||s.type==="multicategory")&&(d.minDiff=1);var M=d.minDiff/2;m.minDtick(s,d.minDiff,d.vals[0],!0);var T=p==="violin"?"_numViolins":"_numBoxes",C=l[T],x=l[p+"mode"]==="group"&&C>1,S=1-l[p+"gap"],b=1-l[p+"groupgap"];for(g=0;g<r.length;g++){w=n[r[g]];var a=w[0].trace,E=w[0].t,y=a.width,z=a.side,I,B,k,O;if(y)I=B=O=y/2,k=0;else if(I=M,x){var N=i(l,s._id)+a.orientation,_=l._alignmentOpts[N]||{},U=_[a.alignmentgroup]||{},Y=Object.keys(U.offsetGroups||{}).length,J=Y||C,te=Y?a._offsetIndex:E.num;B=I*S*b/J,k=2*I*(-.5+(te+.5)/J)*S,O=I*S/J}else B=I*S*b,k=0,O=I;E.dPos=I,E.bPos=k,E.bdPos=B,E.wHover=O;var ae,ce,Q=k+B,Z,j,K,ee,oe,q,$=!!y,le=(a.boxpoints||a.points)&&o>0;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;f<w.length;f++)Oe[f]=w[f].pos;a._extremes[c]=m.findExtremes(s,Oe,{padded:$,vpadminus:ee,vpadplus:K,vpadLinearized:!0,ppadminus:{x:q,y:oe}[u],ppadplus:{x:oe,y:q}[u]})}}}G.exports={crossTraceCalc:A,setPositionOffset:v}},36411:function(G,V,e){var m=e(71828),P=e(73972),i=e(7901),L=e(73927),A=e(26125),v=e(4322),p=e(53522);function t(l,c,u,g){function f(b,a){return m.coerce(l,c,p,b,a)}if(r(l,c,f,g),c.visible!==!1){L(l,c,g,f),f("xhoverformat"),f("yhoverformat");var w=c._hasPreCompStats;w&&(f("lowerfence"),f("upperfence")),f("line.color",(l.marker||{}).color||u),f("line.width"),f("fillcolor",i.addOpacity(c.line.color,.5));var h=!1;if(w){var o=f("mean"),d=f("sd");o&&o.length&&(h=!0,d&&d.length&&(h="sd"))}f("whiskerwidth");var M=f("sizemode"),T;M==="quartiles"&&(T=f("boxmean",h)),f("showwhiskers",M==="quartiles"),(M==="sd"||T==="sd")&&f("sdmultiple"),f("width"),f("quartilemethod");var C=!1;if(w){var x=f("notchspan");x&&x.length&&(C=!0)}else m.validate(l.notchwidth,p.notchwidth)&&(C=!0);var S=f("notched",C);S&&f("notchwidth"),s(l,c,f,{prefix:"box"})}}function r(l,c,u,g){function f(Y){var J=0;return Y&&Y.length&&(J+=1,m.isArrayOrTypedArray(Y[0])&&Y[0].length&&(J+=1)),J}function w(Y){return m.validate(l[Y],p[Y])}var h=u("y"),o=u("x"),d;if(c.type==="box"){var M=u("q1"),T=u("median"),C=u("q3");c._hasPreCompStats=M&&M.length&&T&&T.length&&C&&C.length,d=Math.min(m.minRowLength(M),m.minRowLength(T),m.minRowLength(C))}var x=f(h),S=f(o),b=x&&m.minRowLength(h),a=S&&m.minRowLength(o),E=g.calendar,y={autotypenumbers:g.autotypenumbers},z,I;if(c._hasPreCompStats)switch(String(S)+String(x)){case"00":var B=w("x0")||w("dx"),k=w("y0")||w("dy");k&&!B?z="h":z="v",I=d;break;case"10":z="v",I=Math.min(d,a);break;case"20":z="h",I=Math.min(d,o.length);break;case"01":z="h",I=Math.min(d,b);break;case"02":z="v",I=Math.min(d,h.length);break;case"12":z="v",I=Math.min(d,a,h.length);break;case"21":z="h",I=Math.min(d,o.length,b);break;case"11":I=0;break;case"22":var O=!1,N;for(N=0;N<o.length;N++)if(v(o[N],E,y)==="category"){O=!0;break}if(O)z="v",I=Math.min(d,a,h.length);else{for(N=0;N<h.length;N++)if(v(h[N],E,y)==="category"){O=!0;break}O?(z="h",I=Math.min(d,o.length,b)):(z="v",I=Math.min(d,a,h.length))}break}else x>0?(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;w<l.length;w++){g=l[w];var h=g.type;(h==="box"||h==="violin")&&(u=g._input,c[h+"mode"]==="group"&&A(u,g,c,f))}}G.exports={supplyDefaults:t,crossTraceDefaults:n,handleSampleDefaults:r,handlePointsDefaults:s}},74907:function(G){G.exports=function(e,m){return m.hoverOnBox&&(e.hoverOnBox=m.hoverOnBox),"xVal"in m&&(e.x=m.xVal),"yVal"in m&&(e.y=m.yVal),m.xa&&(e.xaxis=m.xa),m.ya&&(e.yaxis=m.ya),e}},41868:function(G,V,e){var m=e(89298),P=e(71828),i=e(30211),L=e(7901),A=P.fillText;function v(r,s,n,l){var c=r.cd,u=c[0].trace,g=u.hoveron,f=[],w;return g.indexOf("boxes")!==-1&&(f=f.concat(p(r,s,n,l))),g.indexOf("points")!==-1&&(w=t(r,s,n)),l==="closest"?w?[w]:f:(w&&f.push(w),f)}function p(r,s,n,l){var c=r.cd,u=r.xa,g=r.ya,f=c[0].trace,w=c[0].t,h=f.type==="violin",o,d,M,T,C,x,S,b,a,E,y,z=w.bdPos,I,B,k=w.wHover,O=function(Te){return M.c2l(Te.pos)+w.bPos-M.c2l(x)};h&&f.side!=="both"?(f.side==="positive"&&(a=function(Te){var Oe=O(Te);return i.inbox(Oe,Oe+k,E)},I=z,B=0),f.side==="negative"&&(a=function(Te){var Oe=O(Te);return i.inbox(Oe-k,Oe,E)},I=0,B=z)):(a=function(Te){var Oe=O(Te);return i.inbox(Oe-k,Oe+k,E)},I=B=z);var N;h?N=function(Te){return i.inbox(Te.span[0]-C,Te.span[1]-C,E)}:N=function(Te){return i.inbox(Te.min-C,Te.max-C,E)},f.orientation==="h"?(C=s,x=n,S=N,b=a,o="y",M=g,d="x",T=u):(C=n,x=s,S=a,b=N,o="x",M=u,d="y",T=g);var _=Math.min(1,z/Math.abs(M.r2c(M.range[1])-M.r2c(M.range[0])));E=r.maxHoverDistance-_,y=r.maxSpikeDistance-_;function U(Te){return(S(Te)+b(Te))/2}var Y=i.getDistanceFunction(l,S,b,U);if(i.getClosest(c,Y,r),r.index===!1)return[];var J=c[r.index],te=f.line.color,ae=(f.marker||{}).color;L.opacity(te)&&f.line.width?r.color=te:L.opacity(ae)&&f.boxpoints?r.color=ae:r.color=f.fillcolor,r[o+"0"]=M.c2p(J.pos+w.bPos-B,!0),r[o+"1"]=M.c2p(J.pos+w.bPos+I,!0),r[o+"LabelVal"]=J.orig_p!==void 0?J.orig_p:J.pos;var ce=o+"Spike";r.spikeDistance=U(J)*y/E,r[ce]=M.c2p(J.pos,!0);var Q=f.boxmean||f.sizemode==="sd"||(f.meanline||{}).visible,Z=f.boxpoints||f.points,j=Z&&Q?["max","uf","q3","med","mean","q1","lf","min"]:Z&&!Q?["max","uf","q3","med","q1","lf","min"]:!Z&&Q?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],K=T.range[1]<T.range[0];f.orientation===(K?"v":"h")&&j.reverse();for(var ee=r.spikeDistance,oe=r[ce],q=[],$=0;$<j.length;$++){var le=j[$];if(le in J){var ie=J[le],he=T.c2p(ie,!0),me=P.extendFlat({},r);me.attr=le,me[d+"0"]=me[d+"1"]=he,me[d+"LabelVal"]=ie,me[d+"Label"]=(w.labels?w.labels[le]+" ":"")+m.hoverLabelText(T,ie,f[d+"hoverformat"]),me.hoverOnBox=!0,le==="mean"&&"sd"in J&&(f.boxmean==="sd"||f.sizemode==="sd")&&(me[d+"err"]=J.sd),me.hovertemplate=!1,q.push(me)}}r.name="",r.spikeDistance=void 0,r[ce]=void 0;for(var Me=0;Me<q.length;Me++)q[Me].attr!=="med"?(q[Me].name="",q[Me].spikeDistance=void 0,q[Me][ce]=void 0):(q[Me].spikeDistance=ee,q[Me][ce]=oe);return q}function t(r,s,n){for(var l=r.cd,c=r.xa,u=r.ya,g=l[0].trace,f=c.c2p(s),w=u.c2p(n),h,o=function(N){var _=Math.max(3,N.mrc||0);return Math.max(Math.abs(c.c2p(N.x)-f)-_,1-3/_)},d=function(N){var _=Math.max(3,N.mrc||0);return Math.max(Math.abs(u.c2p(N.y)-w)-_,1-3/_)},M=i.quadrature(o,d),T=!1,C,x,S=0;S<l.length;S++){C=l[S];for(var b=0;b<(C.pts||[]).length;b++){x=C.pts[b];var a=M(x);a<=r.distance&&(r.distance=a,T=[S,b])}}if(!T)return!1;C=l[T[0]],x=C.pts[T[1]];var E=c.c2p(x.x,!0),y=u.c2p(x.y,!0),z=x.mrc||1;h=P.extendFlat({},r,{index:x.i,color:(g.marker||{}).color,name:g.name,x0:E-z,x1:E+z,y0:y-z,y1:y+z,spikeDistance:r.distance,hovertemplate:g.hovertemplate});var I=C.orig_p,B=I!==void 0?I:C.pos,k;g.orientation==="h"?(k=u,h.xLabelVal=x.x,h.yLabelVal=B):(k=c,h.xLabelVal=B,h.yLabelVal=x.y);var O=k._id.charAt(0);return h[O+"Spike"]=k.c2p(C.pos,!0),A(x,g,h),h}G.exports={hoverPoints:v,hoverOnBoxes:p,hoverOnPoints:t}},83832:function(G,V,e){G.exports={attributes:e(53522),layoutAttributes:e(40094),supplyDefaults:e(36411).supplyDefaults,crossTraceDefaults:e(36411).crossTraceDefaults,supplyLayoutDefaults:e(4199).supplyLayoutDefaults,calc:e(48518),crossTraceCalc:e(37188).crossTraceCalc,plot:e(86047).plot,style:e(58063).style,styleOnSelect:e(58063).styleOnSelect,hoverPoints:e(41868).hoverPoints,eventData:e(74907),selectPoints:e(24626),moduleType:"trace",name:"box",basePlotModule:e(93612),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","boxLayout","zoomScale"],meta:{}}},40094:function(G){G.exports={boxmode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},boxgap:{valType:"number",min:0,max:1,dflt:.3,editType:"calc"},boxgroupgap:{valType:"number",min:0,max:1,dflt:.3,editType:"calc"}}},4199:function(G,V,e){var m=e(73972),P=e(71828),i=e(40094);function L(v,p,t,r,s){for(var n=s+"Layout",l=!1,c=0;c<t.length;c++){var u=t[c];if(m.traceIs(u,n)){l=!0;break}}l&&(r(s+"mode"),r(s+"gap"),r(s+"groupgap"))}function A(v,p,t){function r(s,n){return P.coerce(v,p,i,s,n)}L(v,p,t,r,"box")}G.exports={supplyLayoutDefaults:A,_supply:L}},86047:function(G,V,e){var m=e(39898),P=e(71828),i=e(91424),L=5,A=.01;function v(s,n,l,c){var u=s._context.staticPlot,g=n.xaxis,f=n.yaxis;P.makeTraceGroups(c,l,"trace boxes").each(function(w){var h=m.select(this),o=w[0],d=o.t,M=o.trace;if(d.wdPos=d.bdPos*M.whiskerwidth,M.visible!==!0||d.empty){h.remove();return}var T,C;M.orientation==="h"?(T=f,C=g):(T=g,C=f),p(h,{pos:T,val:C},M,d,u),t(h,{x:g,y:f},M,d),r(h,{pos:T,val:C},M,d)})}function p(s,n,l,c,u){var g=l.orientation==="h",f=n.val,w=n.pos,h=!!w.rangebreaks,o=c.bPos,d=c.wdPos||0,M=c.bPosPxOffset||0,T=l.whiskerwidth||0,C=l.showwhiskers!==!1,x=l.notched||!1,S=x?1-2*l.notchwidth:1,b,a;Array.isArray(c.bdPos)?(b=c.bdPos[0],a=c.bdPos[1]):(b=c.bdPos,a=c.bdPos);var E=s.selectAll("path.box").data(l.type!=="violin"||l.box.visible?P.identity:[]);E.enter().append("path").style("vector-effect",u?"none":"non-scaling-stroke").attr("class","box"),E.exit().remove(),E.each(function(y){if(y.empty)return"M0,0Z";var z=w.c2l(y.pos+o,!0),I=w.l2p(z-b)+M,B=w.l2p(z+a)+M,k=h?(I+B)/2:w.l2p(z)+M,O=l.whiskerwidth,N=h?I*O+(1-O)*k:w.l2p(z-d)+M,_=h?B*O+(1-O)*k:w.l2p(z+d)+M,U=w.l2p(z-b*S)+M,Y=w.l2p(z+a*S)+M,J=l.sizemode==="sd",te=f.c2p(J?y.mean-y.sd:y.q1,!0),ae=J?f.c2p(y.mean+y.sd,!0):f.c2p(y.q3,!0),ce=P.constrain(J?f.c2p(y.mean,!0):f.c2p(y.med,!0),Math.min(te,ae)+1,Math.max(te,ae)-1),Q=y.lf===void 0||l.boxpoints===!1||J,Z=f.c2p(Q?y.min:y.lf,!0),j=f.c2p(Q?y.max:y.uf,!0),K=f.c2p(y.ln,!0),ee=f.c2p(y.un,!0);g?m.select(this).attr("d","M"+ce+","+U+"V"+Y+"M"+te+","+I+"V"+B+(x?"H"+K+"L"+ce+","+Y+"L"+ee+","+B:"")+"H"+ae+"V"+I+(x?"H"+ee+"L"+ce+","+U+"L"+K+","+I:"")+"Z"+(C?"M"+te+","+k+"H"+Z+"M"+ae+","+k+"H"+j+(T===0?"":"M"+Z+","+N+"V"+_+"M"+j+","+N+"V"+_):"")):m.select(this).attr("d","M"+U+","+ce+"H"+Y+"M"+I+","+te+"H"+B+(x?"V"+K+"L"+Y+","+ce+"L"+B+","+ee:"")+"V"+ae+"H"+I+(x?"V"+ee+"L"+U+","+ce+"L"+I+","+K:"")+"Z"+(C?"M"+k+","+te+"V"+Z+"M"+k+","+ae+"V"+j+(T===0?"":"M"+N+","+Z+"H"+_+"M"+N+","+j+"H"+_):""))})}function t(s,n,l,c){var u=n.x,g=n.y,f=c.bdPos,w=c.bPos,h=l.boxpoints||l.points;P.seedPseudoRandom();var o=function(T){return T.forEach(function(C){C.t=c,C.trace=l}),T},d=s.selectAll("g.points").data(h?o:[]);d.enter().append("g").attr("class","points"),d.exit().remove();var M=d.selectAll("path").data(function(T){var C,x=T.pts2,S=Math.max((T.max-T.min)/10,T.q3-T.q1),b=S*1e-9,a=S*A,E=[],y=0,z;if(l.jitter){if(S===0)for(y=1,E=new Array(x.length),C=0;C<x.length;C++)E[C]=1;else for(C=0;C<x.length;C++){var I=Math.max(0,C-L),B=x[I].v,k=Math.min(x.length-1,C+L),O=x[k].v;h!=="all"&&(x[C].v<T.lf?O=Math.min(O,T.lf):B=Math.max(B,T.uf));var N=Math.sqrt(a*(k-I)/(O-B+b))||0;N=P.constrain(Math.abs(N),0,1),E.push(N),y=Math.max(N,y)}z=l.jitter*2/(y||1)}for(C=0;C<x.length;C++){var _=x[C],U=_.v,Y=l.jitter?z*E[C]*(P.pseudoRandom()-.5):0,J=T.pos+w+f*(l.pointpos+Y);l.orientation==="h"?(_.y=J,_.x=U):(_.x=J,_.y=U),h==="suspectedoutliers"&&U<T.uo&&U>T.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<P.length;v++)for(p=0;p<(P[v].pts||[]).length;p++)P[v].pts[p].selected=0;else for(v=0;v<P.length;v++)for(p=0;p<(P[v].pts||[]).length;p++){var t=P[v].pts[p],r=i.c2p(t.x),s=L.c2p(t.y);m.contains([r,s],null,t.i,e)?(A.push({pointNumber:t.i,x:i.c2d(t.x),y:L.c2d(t.y)}),t.selected=1):t.selected=0}return A}},58063:function(G,V,e){var m=e(39898),P=e(7901),i=e(91424);function L(v,p,t){var r=t||m.select(v).selectAll("g.trace.boxes");r.style("opacity",function(s){return s[0].trace.opacity}),r.each(function(s){var n=m.select(this),l=s[0].trace,c=l.line.width;function u(w,h,o,d){w.style("stroke-width",h+"px").call(P.stroke,o).call(P.fill,d)}var g=n.selectAll("path.box");if(l.type==="candlestick")g.each(function(w){if(!w.empty){var h=m.select(this),o=l[w.dir];u(h,o.line.width,o.line.color,o.fillcolor),h.style("opacity",l.selectedpoints&&!w.selected?.3:1)}});else{u(g,c,l.line.color,l.fillcolor),n.selectAll("path.mean").style({"stroke-width":c,"stroke-dasharray":2*c+"px,"+c+"px"}).call(P.stroke,l.line.color);var f=n.selectAll("path.point");i.pointStyle(f,l,v)}})}function A(v,p,t){var r=p[0].trace,s=t.selectAll("path.point");r.selectedpoints?i.selectedPointStyle(s,r):i.pointStyle(s,r,v)}G.exports={style:L,styleOnSelect:A}},75343:function(G,V,e){var m=e(71828).extendFlat,P=e(12663).axisHoverFormat,i=e(2522),L=e(53522);function A(v){return{line:{color:m({},L.line.color,{dflt:v}),width:L.line.width,editType:"style"},fillcolor:L.fillcolor,editType:"style"}}G.exports={xperiod:i.xperiod,xperiod0:i.xperiod0,xperiodalignment:i.xperiodalignment,xhoverformat:P("x"),yhoverformat:P("y"),x:i.x,open:i.open,high:i.high,low:i.low,close:i.close,line:{width:m({},L.line.width,{}),editType:"style"},increasing:A(i.increasing.line.color.dflt),decreasing:A(i.decreasing.line.color.dflt),text:i.text,hovertext:i.hovertext,whiskerwidth:m({},L.whiskerwidth,{dflt:0}),hoverlabel:i.hoverlabel}},41197:function(G,V,e){var m=e(71828),P=e(89298),i=e(42973),L=e(3485).calcCommon;G.exports=function(v,p){var t=v._fullLayout,r=P.getFromId(v,p.xaxis),s=P.getFromId(v,p.yaxis),n=r.makeCalcdata(p,"x"),l=i(p,r,"x",n).vals,c=L(v,p,n,l,s,A);return c.length?(m.extendFlat(c[0].t,{num:t._numBoxes,dPos:m.distinctVals(l).minDiff/2,posLetter:"x",valLetter:"y"}),t._numBoxes++,c):[{t:{empty:!0}}]};function A(v,p,t,r){return{min:t,q1:Math.min(v,r),med:r,q3:Math.max(v,r),max:p}}},1026:function(G,V,e){var m=e(71828),P=e(7901),i=e(14555),L=e(73927),A=e(75343);G.exports=function(t,r,s,n){function l(u,g){return m.coerce(t,r,A,u,g)}var c=i(t,r,l,n);if(!c){r.visible=!1;return}L(t,r,n,l,{x:!0}),l("xhoverformat"),l("yhoverformat"),l("line.width"),v(t,r,l,"increasing"),v(t,r,l,"decreasing"),l("text"),l("hovertext"),l("whiskerwidth"),n._requestRangeslider[r.xaxis]=!0};function v(p,t,r,s){var n=r(s+".line.color");r(s+".line.width",t.line.width),r(s+".fillcolor",P.addOpacity(n,.5))}},91815:function(G,V,e){G.exports={moduleType:"trace",name:"candlestick",basePlotModule:e(93612),categories:["cartesian","svg","showLegend","candlestick","boxLayout"],meta:{},attributes:e(75343),layoutAttributes:e(40094),supplyLayoutDefaults:e(4199).supplyLayoutDefaults,crossTraceCalc:e(37188).crossTraceCalc,supplyDefaults:e(1026),calc:e(41197),plot:e(86047).plot,layerName:"boxlayer",style:e(58063).style,hoverPoints:e(66449).hoverPoints,selectPoints:e(67324)}},13145:function(G,V,e){var m=e(11500),P=e(44467);G.exports=function(A,v,p,t,r){var s=t("a");s||(t("da"),t("a0"));var n=t("b");n||(t("db"),t("b0")),i(A,v,p,r)};function i(L,A,v,p){var t=["aaxis","baxis"];t.forEach(function(r){var s=r.charAt(0),n=L[r]||{},l=P.newContainer(A,r),c={noTicklabelstep:!0,tickfont:"x",id:s+"axis",letter:s,font:A.font,name:r,data:L[s],calendar:A.calendar,dfltColor:p,bgColor:v.paper_bgcolor,autotypenumbersDflt:v.autotypenumbers,fullLayout:v};m(n,l,c),l._categories=l._categories||[],!L[r]&&n.type!=="-"&&(L[r]={type:n.type})})}},402:function(G,V,e){var m=e(71828).isArrayOrTypedArray;G.exports=function(i){return P(i,0)};function P(i,L){if(!m(i)||L>=10)return null;for(var A=1/0,v=-1/0,p=i.length,t=0;t<p;t++){var r=i[t];if(m(r)){var s=P(r,L+1);s&&(A=Math.min(s[0],A),v=Math.max(s[1],v))}else A=Math.min(r,A),v=Math.max(r,v)}return[A,v]}},99798:function(G,V,e){var m=e(41940),P=e(1928),i=e(22399),L=m({editType:"calc"});L.family.dflt='"Open Sans", verdana, arial, sans-serif',L.size.dflt=12,L.color.dflt=i.defaultLine,G.exports={carpet:{valType:"string",editType:"calc"},x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},a:{valType:"data_array",editType:"calc"},a0:{valType:"number",dflt:0,editType:"calc"},da:{valType:"number",dflt:1,editType:"calc"},b:{valType:"data_array",editType:"calc"},b0:{valType:"number",dflt:0,editType:"calc"},db:{valType:"number",dflt:1,editType:"calc"},cheaterslope:{valType:"number",dflt:1,editType:"calc"},aaxis:P,baxis:P,font:L,color:{valType:"color",dflt:i.defaultLine,editType:"plot"},transforms:void 0}},4536:function(G,V,e){var m=e(71828).isArrayOrTypedArray;G.exports=function(P,i,L,A){var v,p,t,r,s,n,l,c,u,g,f,w,h,o=m(L)?"a":"b",d=o==="a"?P.aaxis:P.baxis,M=d.smoothing,T=o==="a"?P.a2i:P.b2j,C=o==="a"?L:A,x=o==="a"?A:L,S=o==="a"?i.a.length:i.b.length,b=o==="a"?i.b.length:i.a.length,a=Math.floor(o==="a"?P.b2j(x):P.a2i(x)),E=o==="a"?function(te){return P.evalxy([],te,a)}:function(te){return P.evalxy([],a,te)};M&&(t=Math.max(0,Math.min(b-2,a)),r=a-t,p=o==="a"?function(te,ae){return P.dxydi([],te,t,ae,r)}:function(te,ae){return P.dxydj([],t,te,r,ae)});var y=T(C[0]),z=T(C[1]),I=y<z?1:-1,B=(z-y)*1e-8,k=I>0?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<Y*I;v+=I)s=[],f=_(y,v),w=N(z,v+I),h=w-f,n=Math.max(0,Math.min(S-2,Math.floor(.5*(f+w)))),c=E(w),M&&(u=p(n,f-n),g=p(n,w-n),s.push([l[0]+u[0]/3*h,l[1]+u[1]/3*h]),s.push([c[0]-g[0]/3*h,c[1]-g[1]/3*h])),s.push(c),J.push(s),l=c;return J}},1928:function(G,V,e){var m=e(41940),P=e(22399),i=e(13838),L=e(12663).descriptionWithDates,A=e(30962).overrideAll,v=e(79952).P,p=e(1426).extendFlat;G.exports={color:{valType:"color",editType:"calc"},smoothing:{valType:"number",dflt:1,min:0,max:1.3,editType:"calc"},title:{text:{valType:"string",dflt:"",editType:"calc"},font:m({editType:"calc"}),offset:{valType:"number",dflt:10,editType:"calc"},editType:"calc"},type:{valType:"enumerated",values:["-","linear","date","category"],dflt:"-",editType:"calc"},autotypenumbers:i.autotypenumbers,autorange:{valType:"enumerated",values:[!0,!1,"reversed"],dflt:!0,editType:"calc"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"calc"},range:{valType:"info_array",editType:"calc",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}]},fixedrange:{valType:"boolean",dflt:!1,editType:"calc"},cheatertype:{valType:"enumerated",values:["index","value"],dflt:"value",editType:"calc"},tickmode:{valType:"enumerated",values:["linear","array"],dflt:"array",editType:"calc"},nticks:{valType:"integer",min:0,dflt:0,editType:"calc"},tickvals:{valType:"data_array",editType:"calc"},ticktext:{valType:"data_array",editType:"calc"},showticklabels:{valType:"enumerated",values:["start","end","both","none"],dflt:"start",editType:"calc"},labelalias:p({},i.labelalias,{editType:"calc"}),tickfont:m({editType:"calc"}),tickangle:{valType:"angle",dflt:"auto",editType:"calc"},tickprefix:{valType:"string",dflt:"",editType:"calc"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},ticksuffix:{valType:"string",dflt:"",editType:"calc"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B"],dflt:"B",editType:"calc"},minexponent:{valType:"number",dflt:3,min:0,editType:"calc"},separatethousands:{valType:"boolean",dflt:!1,editType:"calc"},tickformat:{valType:"string",dflt:"",editType:"calc",description:L("tick label")},tickformatstops:A(i.tickformatstops,"calc","from-root"),categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},labelpadding:{valType:"integer",dflt:10,editType:"calc"},labelprefix:{valType:"string",editType:"calc"},labelsuffix:{valType:"string",dflt:"",editType:"calc"},showline:{valType:"boolean",dflt:!1,editType:"calc"},linecolor:{valType:"color",dflt:P.defaultLine,editType:"calc"},linewidth:{valType:"number",min:0,dflt:1,editType:"calc"},gridcolor:{valType:"color",editType:"calc"},gridwidth:{valType:"number",min:0,dflt:1,editType:"calc"},griddash:p({},v,{editType:"calc"}),showgrid:{valType:"boolean",dflt:!0,editType:"calc"},minorgridcount:{valType:"integer",min:0,dflt:0,editType:"calc"},minorgridwidth:{valType:"number",min:0,dflt:1,editType:"calc"},minorgriddash:p({},v,{editType:"calc"}),minorgridcolor:{valType:"color",dflt:P.lightLine,editType:"calc"},startline:{valType:"boolean",editType:"calc"},startlinecolor:{valType:"color",editType:"calc"},startlinewidth:{valType:"number",dflt:1,editType:"calc"},endline:{valType:"boolean",editType:"calc"},endlinewidth:{valType:"number",dflt:1,editType:"calc"},endlinecolor:{valType:"color",editType:"calc"},tick0:{valType:"number",min:0,dflt:0,editType:"calc"},dtick:{valType:"number",min:0,dflt:1,editType:"calc"},arraytick0:{valType:"integer",min:0,dflt:0,editType:"calc"},arraydtick:{valType:"integer",min:1,dflt:1,editType:"calc"},_deprecated:{title:{valType:"string",editType:"calc"},titlefont:m({editType:"calc"}),titleoffset:{valType:"number",dflt:10,editType:"calc"}},editType:"calc"}},11500:function(G,V,e){var m=e(99798),P=e(7901).addOpacity,i=e(73972),L=e(71828),A=e(26218),v=e(96115),p=e(89426),t=e(15258),r=e(21994),s=e(4322);G.exports=function(c,u,g){var f=g.letter,w=g.font||{},h=m[f+"axis"];function o(U,Y){return L.coerce(c,u,h,U,Y)}function d(U,Y){return L.coerce2(c,u,h,U,Y)}g.name&&(u._name=g.name,u._id=g.name),o("autotypenumbers",g.autotypenumbersDflt);var M=o("type");if(M==="-"&&(g.data&&n(u,g.data),u.type==="-"?u.type="linear":M=c.type=u.type),o("smoothing"),o("cheatertype"),o("showticklabels"),o("labelprefix",f+" = "),o("labelsuffix"),o("showtickprefix"),o("showticksuffix"),o("separatethousands"),o("tickformat"),o("exponentformat"),o("minexponent"),o("showexponent"),o("categoryorder"),o("tickmode"),o("tickvals"),o("ticktext"),o("tick0"),o("dtick"),u.tickmode==="array"&&(o("arraytick0"),o("arraydtick")),o("labelpadding"),u._hovertitle=f,M==="date"){var T=i.getComponentMethod("calendars","handleDefaults");T(c,u,"calendar",g.calendar)}r(u,g.fullLayout),u.c2p=L.identity;var C=o("color",g.dfltColor),x=C===c.color?C:w.color,S=o("title.text");S&&(L.coerceFont(o,"title.font",{family:w.family,size:L.bigFont(w.size),color:x}),o("title.offset")),o("tickangle");var b=o("autorange",!u.isValidRange(c.range));b&&o("rangemode"),o("range"),u.cleanRange(),o("fixedrange"),A(c,u,o,M),p(c,u,o,M,g),v(c,u,o,M,g),t(c,u,o,{data:g.data,dataAttr:f});var a=d("gridcolor",P(C,.3)),E=d("gridwidth"),y=d("griddash"),z=o("showgrid");z||(delete u.gridcolor,delete u.gridwidth,delete u.griddash);var I=d("startlinecolor",C),B=d("startlinewidth",E),k=o("startline",u.showgrid||!!I||!!B);k||(delete u.startlinecolor,delete u.startlinewidth);var O=d("endlinecolor",C),N=d("endlinewidth",E),_=o("endline",u.showgrid||!!O||!!N);return _||(delete u.endlinecolor,delete u.endlinewidth),z?(o("minorgridcount"),o("minorgridwidth",E),o("minorgriddash",y),o("minorgridcolor",P(a,.06)),u.minorgridcount||(delete u.minorgridwidth,delete u.minorgriddash,delete u.minorgridcolor)):(delete u.gridcolor,delete u.gridwidth,delete u.griddash),u.showticklabels==="none"&&(delete u.tickfont,delete u.tickangle,delete u.showexponent,delete u.exponentformat,delete u.minexponent,delete u.tickformat,delete u.showticksuffix,delete u.showtickprefix),u.showticksuffix||delete u.ticksuffix,u.showtickprefix||delete u.tickprefix,o("tickmode"),u};function n(l,c){if(l.type==="-"){var u=l._id,g=u.charAt(0),f=g+"calendar",w=l[f];l.type=s(c,w,{autotypenumbers:l.autotypenumbers})}}},25281:function(G,V,e){var m=e(89298),P=e(71828).isArray1D,i=e(53824),L=e(402),A=e(20347),v=e(83311),p=e(44807),t=e(4742),r=e(72505),s=e(68296),n=e(11435);G.exports=function(c,u){var g=m.getFromId(c,u.xaxis),f=m.getFromId(c,u.yaxis),w=u.aaxis,h=u.baxis,o=u.x,d=u.y,M=[];o&&P(o)&&M.push("x"),d&&P(d)&&M.push("y"),M.length&&s(u,w,h,"a","b",M);var T=u._a=u._a||u.a,C=u._b=u._b||u.b;o=u._x||u.x,d=u._y||u.y;var x={};if(u._cheater){var S=w.cheatertype==="index"?T.length:T,b=h.cheatertype==="index"?C.length:C;o=i(S,b,u.cheaterslope)}u._x=o=t(o),u._y=d=t(d),r(o,T,C),r(d,T,C),n(u),u.setScale();var a=L(o),E=L(d),y=.5*(a[1]-a[0]),z=.5*(a[1]+a[0]),I=.5*(E[1]-E[0]),B=.5*(E[1]+E[0]),k=1.3;return a=[z-y*k,z+y*k],E=[B-I*k,B+I*k],u._extremes[g._id]=m.findExtremes(g,a,{padded:!0}),u._extremes[f._id]=m.findExtremes(f,E,{padded:!0}),A(u,"a","b"),A(u,"b","a"),v(u,w),v(u,h),x.clipsegments=p(u._xctrl,u._yctrl,w,h),x.x=o,x.y=d,x.a=T,x.b=C,[x]}},44807:function(G){G.exports=function(e,m,P,i){var L,A,v,p=[],t=!!P.smoothing,r=!!i.smoothing,s=e[0].length-1,n=e.length-1;for(L=0,A=[],v=[];L<=s;L++)A[L]=e[0][L],v[L]=m[0][L];for(p.push({x:A,y:v,bicubic:t}),L=0,A=[],v=[];L<=n;L++)A[L]=e[L][s],v[L]=m[L][s];for(p.push({x:A,y:v,bicubic:r}),L=s,A=[],v=[];L>=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;Y<B;Y++)Q=Math.min(B-2,Y),Z=Y-Q,j=L.evalxy([],Y,J),a.smoothing&&Y>0&&(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;J<k;J++)te=Math.min(k-2,J),ae=J-te,j=L.evalxy([],Y,J),a.smoothing&&J>0&&(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;Y<z;Y++)Q[Y]=E[U*O][Y],Z[Y]=y[U*O][Y];else for(J=Math.max(0,Math.min(B-2,U)),ae=Math.min(1,Math.max(0,U-J)),j.xy=function(K){return L.evalxy([],U,K)},j.dxy=function(K,ee){return L.dxydj([],J,K,ae,ee)},Y=0;Y<I;Y++)Q[Y]=E[Y][U*O],Z[Y]=y[Y][U*O];return j.axisLetter=A,j.axis=T,j.crossAxis=a,j.value=M[U],j.constvar=v,j.index=U,j.x=Q,j.y=Z,j.smoothing=a.smoothing,j}if(T.tickmode==="array"){for(s=5e-15,n=[Math.floor((M.length-1-T.arraytick0)/T.arraydtick*(1+s)),Math.ceil(-T.arraytick0/T.arraydtick/(1+s))].sort(function(U,Y){return U-Y}),l=n[0]-1,c=n[1]+1,u=l;u<c;u++)t=T.arraytick0+T.arraydtick*u,!(t<0||t>M.length-1)&&C.push(P(_(t),{color:T.gridcolor,width:T.gridwidth,dash:T.griddash}));for(u=l;u<c;u++)if(r=T.arraytick0+T.arraydtick*u,w=Math.min(r+T.arraydtick,M.length-1),!(r<0||r>M.length-1)&&!(w<0||w>M.length-1))for(h=M[r],o=M[w],p=0;p<T.minorgridcount;p++)d=w-r,!(d<=0)&&(f=h+(o-h)*(p+1)/(T.minorgridcount+1)*(T.arraydtick/d),!(f<M[0]||f>M[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;u<c+1;u++)for(g=T.tick0+T.dtick*u,p=0;p<T.minorgridcount;p++)f=g+T.dtick*(p+1)/(T.minorgridcount+1),!(f<M[0]||f>M[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;v<l.length;v++)s=l[v],["start","both"].indexOf(A.showticklabels)!==-1&&(p=m.tickText(A,s.value),P(p,{prefix:t,suffix:r,endAnchor:!0,xy:s.xy(0),dxy:s.dxy(0,0),axis:s.axis,length:s.crossAxis.length,font:s.axis.tickfont,isFirst:v===0,isLast:v===l.length-1}),n.push(p)),["end","both"].indexOf(A.showticklabels)!==-1&&(p=m.tickText(A,s.value),P(p,{endAnchor:!1,xy:s.xy(s.crossLength-1),dxy:s.dxy(s.crossLength-2,1),axis:s.axis,length:s.crossAxis.length,font:s.axis.tickfont,isFirst:v===0,isLast:v===l.length-1}),n.push(p))}},42048:function(G){var V=.5;G.exports=function(m,P,i,L){var A=m[0]-P[0],v=m[1]-P[1],p=i[0]-P[0],t=i[1]-P[1],r=Math.pow(A*A+v*v,V/2),s=Math.pow(p*p+t*t,V/2),n=(s*s*A-r*r*p)*L,l=(s*s*v-r*r*t)*L,c=s*(r+s)*3,u=r*(r+s)*3;return[[P[0]+(c&&n/c),P[1]+(c&&l/c)],[P[0]-(u&&n/u),P[1]-(u&&l/u)]]}},53824:function(G,V,e){var m=e(71828).isArrayOrTypedArray;G.exports=function(P,i,L){var A,v,p,t,r,s,n=[],l=m(P)?P.length:P,c=m(i)?i.length:i,u=m(P)?P:null,g=m(i)?i:null;u&&(p=(u.length-1)/(u[u.length-1]-u[0])/(l-1)),g&&(t=(g.length-1)/(g[g.length-1]-g[0])/(c-1));var f,w=1/0,h=-1/0;for(v=0;v<c;v++)for(n[v]=[],s=g?(g[v]-g[0])*t:v/(c-1),A=0;A<l;A++)r=u?(u[A]-u[0])*p:A/(l-1),f=r-s*L,w=Math.min(f,w),h=Math.max(f,h),n[v][A]=f;var o=1/(h-w),d=-w*o;for(v=0;v<c;v++)for(A=0;A<l;A++)n[v][A]=o*n[v][A]+d;return n}},45664:function(G,V,e){var m=e(42048),P=e(71828).ensureArray;function i(L,A,v){var p=-.5*v[0]+1.5*A[0],t=-.5*v[1]+1.5*A[1];return[(2*p+L[0])/3,(2*t+L[1])/3]}G.exports=function(A,v,p,t,r,s){var n,l,c,u,g,f,w,h,o,d,M=p[0].length,T=p.length,C=r?3*M-2:M,x=s?3*T-2:T;for(A=P(A,x),v=P(v,x),c=0;c<x;c++)A[c]=P(A[c],C),v[c]=P(v[c],C);for(l=0,u=0;l<T;l++,u+=s?3:1)for(g=A[u],f=v[u],w=p[l],h=t[l],n=0,c=0;n<M;n++,c+=r?3:1)g[c]=w[n],f[c]=h[n];if(r)for(l=0,u=0;l<T;l++,u+=s?3:1){for(n=1,c=3;n<M-1;n++,c+=3)o=m([p[l][n-1],t[l][n-1]],[p[l][n],t[l][n]],[p[l][n+1],t[l][n+1]],r),A[u][c-1]=o[0][0],v[u][c-1]=o[0][1],A[u][c+1]=o[1][0],v[u][c+1]=o[1][1];d=i([A[u][0],v[u][0]],[A[u][2],v[u][2]],[A[u][3],v[u][3]]),A[u][1]=d[0],v[u][1]=d[1],d=i([A[u][C-1],v[u][C-1]],[A[u][C-3],v[u][C-3]],[A[u][C-4],v[u][C-4]]),A[u][C-2]=d[0],v[u][C-2]=d[1]}if(s)for(c=0;c<C;c++){for(u=3;u<x-3;u+=3)o=m([A[u-3][c],v[u-3][c]],[A[u][c],v[u][c]],[A[u+3][c],v[u+3][c]],s),A[u-1][c]=o[0][0],v[u-1][c]=o[0][1],A[u+1][c]=o[1][0],v[u+1][c]=o[1][1];d=i([A[0][c],v[0][c]],[A[2][c],v[2][c]],[A[3][c],v[3][c]]),A[1][c]=d[0],v[1][c]=d[1],d=i([A[x-1][c],v[x-1][c]],[A[x-3][c],v[x-3][c]],[A[x-4][c],v[x-4][c]]),A[x-2][c]=d[0],v[x-2][c]=d[1]}if(r&&s)for(u=1;u<x;u+=(u+1)%3===0?2:1){for(c=3;c<C-3;c+=3)o=m([A[u][c-3],v[u][c-3]],[A[u][c],v[u][c]],[A[u][c+3],v[u][c+3]],r),A[u][c-1]=.5*(A[u][c-1]+o[0][0]),v[u][c-1]=.5*(v[u][c-1]+o[0][1]),A[u][c+1]=.5*(A[u][c+1]+o[1][0]),v[u][c+1]=.5*(v[u][c+1]+o[1][1]);d=i([A[u][0],v[u][0]],[A[u][2],v[u][2]],[A[u][3],v[u][3]]),A[u][1]=.5*(A[u][1]+d[0]),v[u][1]=.5*(v[u][1]+d[1]),d=i([A[u][C-1],v[u][C-1]],[A[u][C-3],v[u][C-3]],[A[u][C-4],v[u][C-4]]),A[u][C-2]=.5*(A[u][C-2]+d[0]),v[u][C-2]=.5*(v[u][C-2]+d[1])}return[A,v]}},35509:function(G){G.exports={RELATIVE_CULL_TOLERANCE:1e-6}},54495:function(G){G.exports=function(V,e,m){return e&&m?function(P,i,L,A,v){P||(P=[]);var p,t,r,s,n,l;i*=3,L*=3;var c=A*A,u=1-A,g=u*u,f=u*A*2,w=-3*g,h=3*(g-f),o=3*(f-c),d=3*c,M=v*v,T=M*v,C=1-v,x=C*C,S=x*C;for(l=0;l<V.length;l++)n=V[l],p=w*n[L][i]+h*n[L][i+1]+o*n[L][i+2]+d*n[L][i+3],t=w*n[L+1][i]+h*n[L+1][i+1]+o*n[L+1][i+2]+d*n[L+1][i+3],r=w*n[L+2][i]+h*n[L+2][i+1]+o*n[L+2][i+2]+d*n[L+2][i+3],s=w*n[L+3][i]+h*n[L+3][i+1]+o*n[L+3][i+2]+d*n[L+3][i+3],P[l]=S*p+3*(x*v*t+C*M*r)+T*s;return P}:e?function(P,i,L,A,v){P||(P=[]);var p,t,r,s;i*=3;var n=A*A,l=1-A,c=l*l,u=l*A*2,g=-3*c,f=3*(c-u),w=3*(u-n),h=3*n,o=1-v;for(r=0;r<V.length;r++)s=V[r],p=g*s[L][i]+f*s[L][i+1]+w*s[L][i+2]+h*s[L][i+3],t=g*s[L+1][i]+f*s[L+1][i+1]+w*s[L+1][i+2]+h*s[L+1][i+3],P[r]=o*p+v*t;return P}:m?function(P,i,L,A,v){P||(P=[]);var p,t,r,s,n,l;L*=3;var c=v*v,u=c*v,g=1-v,f=g*g,w=f*g;for(n=0;n<V.length;n++)l=V[n],p=l[L][i+1]-l[L][i],t=l[L+1][i+1]-l[L+1][i],r=l[L+2][i+1]-l[L+2][i],s=l[L+3][i+1]-l[L+3][i],P[n]=w*p+3*(f*v*t+g*c*r)+u*s;return P}:function(P,i,L,A,v){P||(P=[]);var p,t,r,s,n=1-v;for(r=0;r<V.length;r++)s=V[r],p=s[L][i+1]-s[L][i],t=s[L+1][i+1]-s[L+1][i],P[r]=n*p+v*t;return P}}},73057:function(G){G.exports=function(V,e,m){return e&&m?function(P,i,L,A,v){P||(P=[]);var p,t,r,s,n,l;i*=3,L*=3;var c=A*A,u=c*A,g=1-A,f=g*g,w=f*g,h=v*v,o=1-v,d=o*o,M=o*v*2,T=-3*d,C=3*(d-M),x=3*(M-h),S=3*h;for(l=0;l<V.length;l++)n=V[l],p=T*n[L][i]+C*n[L+1][i]+x*n[L+2][i]+S*n[L+3][i],t=T*n[L][i+1]+C*n[L+1][i+1]+x*n[L+2][i+1]+S*n[L+3][i+1],r=T*n[L][i+2]+C*n[L+1][i+2]+x*n[L+2][i+2]+S*n[L+3][i+2],s=T*n[L][i+3]+C*n[L+1][i+3]+x*n[L+2][i+3]+S*n[L+3][i+3],P[l]=w*p+3*(f*A*t+g*c*r)+u*s;return P}:e?function(P,i,L,A,v){P||(P=[]);var p,t,r,s,n,l;i*=3;var c=v*v,u=c*v,g=1-v,f=g*g,w=f*g;for(n=0;n<V.length;n++)l=V[n],p=l[L+1][i]-l[L][i],t=l[L+1][i+1]-l[L][i+1],r=l[L+1][i+2]-l[L][i+2],s=l[L+1][i+3]-l[L][i+3],P[n]=w*p+3*(f*v*t+g*c*r)+u*s;return P}:m?function(P,i,L,A,v){P||(P=[]);var p,t,r,s;L*=3;var n=1-A,l=v*v,c=1-v,u=c*c,g=c*v*2,f=-3*u,w=3*(u-g),h=3*(g-l),o=3*l;for(r=0;r<V.length;r++)s=V[r],p=f*s[L][i]+w*s[L+1][i]+h*s[L+2][i]+o*s[L+3][i],t=f*s[L][i+1]+w*s[L+1][i+1]+h*s[L+2][i+1]+o*s[L+3][i+1],P[r]=n*p+A*t;return P}:function(P,i,L,A,v){P||(P=[]);var p,t,r,s,n=1-A;for(r=0;r<V.length;r++)s=V[r],p=s[L+1][i]-s[L][i],t=s[L+1][i+1]-s[L][i+1],P[r]=n*p+A*t;return P}}},20349:function(G){G.exports=function(V,e,m,P,i){var L=e-2,A=m-2;return P&&i?function(v,p,t){v||(v=[]);var r,s,n,l,c,u,g=Math.max(0,Math.min(Math.floor(p),L)),f=Math.max(0,Math.min(Math.floor(t),A)),w=Math.max(0,Math.min(1,p-g)),h=Math.max(0,Math.min(1,t-f));g*=3,f*=3;var o=w*w,d=o*w,M=1-w,T=M*M,C=T*M,x=h*h,S=x*h,b=1-h,a=b*b,E=a*b;for(u=0;u<V.length;u++)c=V[u],r=C*c[f][g]+3*(T*w*c[f][g+1]+M*o*c[f][g+2])+d*c[f][g+3],s=C*c[f+1][g]+3*(T*w*c[f+1][g+1]+M*o*c[f+1][g+2])+d*c[f+1][g+3],n=C*c[f+2][g]+3*(T*w*c[f+2][g+1]+M*o*c[f+2][g+2])+d*c[f+2][g+3],l=C*c[f+3][g]+3*(T*w*c[f+3][g+1]+M*o*c[f+3][g+2])+d*c[f+3][g+3],v[u]=E*r+3*(a*h*s+b*x*n)+S*l;return v}:P?function(v,p,t){v||(v=[]);var r=Math.max(0,Math.min(Math.floor(p),L)),s=Math.max(0,Math.min(Math.floor(t),A)),n=Math.max(0,Math.min(1,p-r)),l=Math.max(0,Math.min(1,t-s)),c,u,g,f,w,h;r*=3;var o=n*n,d=o*n,M=1-n,T=M*M,C=T*M,x=1-l;for(w=0;w<V.length;w++)h=V[w],c=x*h[s][r]+l*h[s+1][r],u=x*h[s][r+1]+l*h[s+1][r+1],g=x*h[s][r+2]+l*h[s+1][r+1],f=x*h[s][r+3]+l*h[s+1][r+1],v[w]=C*c+3*(T*n*u+M*o*g)+d*f;return v}:i?function(v,p,t){v||(v=[]);var r=Math.max(0,Math.min(Math.floor(p),L)),s=Math.max(0,Math.min(Math.floor(t),A)),n=Math.max(0,Math.min(1,p-r)),l=Math.max(0,Math.min(1,t-s)),c,u,g,f,w,h;s*=3;var o=l*l,d=o*l,M=1-l,T=M*M,C=T*M,x=1-n;for(w=0;w<V.length;w++)h=V[w],c=x*h[s][r]+n*h[s][r+1],u=x*h[s+1][r]+n*h[s+1][r+1],g=x*h[s+2][r]+n*h[s+2][r+1],f=x*h[s+3][r]+n*h[s+3][r+1],v[w]=C*c+3*(T*l*u+M*o*g)+d*f;return v}:function(v,p,t){v||(v=[]);var r=Math.max(0,Math.min(Math.floor(p),L)),s=Math.max(0,Math.min(Math.floor(t),A)),n=Math.max(0,Math.min(1,p-r)),l=Math.max(0,Math.min(1,t-s)),c,u,g,f,w=1-l,h=1-n;for(g=0;g<V.length;g++)f=V[g],c=h*f[s][r]+n*f[s][r+1],u=h*f[s+1][r]+n*f[s+1][r+1],v[g]=w*c+l*u;return v}}},92087:function(G,V,e){var m=e(71828),P=e(19237),i=e(13145),L=e(99798),A=e(22399);G.exports=function(p,t,r,s){function n(u,g){return m.coerce(p,t,L,u,g)}t._clipPathId="clip"+t.uid+"carpet";var l=n("color",A.defaultLine);if(m.coerceFont(n,"font"),n("carpet"),i(p,t,s,n,l),!t.a||!t.b){t.visible=!1;return}t.a.length<3&&(t.aaxis.smoothing=0),t.b.length<3&&(t.baxis.smoothing=0);var c=P(p,t,n);c||(t.visible=!1),t._cheater&&n("cheaterslope")}},21462:function(G,V,e){G.exports={attributes:e(99798),supplyDefaults:e(92087),plot:e(89740),calc:e(25281),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:e(93612),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}},22882:function(G){G.exports=function(V,e){for(var m=V._fullData.length,P,i=0;i<m;i++){var L=V._fullData[i];if(L.index!==e.index&&L.type==="carpet"&&(P||(P=L),L.carpet===e.carpet))return L}return P}},67961:function(G){G.exports=function(e,m,P){if(e.length===0)return"";var i,L=[],A=P?3:1;for(i=0;i<e.length;i+=A)L.push(e[i]+","+m[i]),P&&i<e.length-A&&(L.push("C"),L.push([e[i+1]+","+m[i+1],e[i+2]+","+m[i+2]+" "].join(" ")));return L.join(P?"":"L")}},27669:function(G,V,e){var m=e(71828).isArrayOrTypedArray;G.exports=function(i,L,A){var v;for(m(i)?i.length>L.length&&(i=i.slice(0,L.length)):i=[],v=0;v<L.length;v++)i[v]=A(L[v]);return i}},11651:function(G){G.exports=function(e,m,P,i,L,A){var v=L[0]*e.dpdx(m),p=L[1]*e.dpdy(P),t=1,r=1;if(A){var s=Math.sqrt(L[0]*L[0]+L[1]*L[1]),n=Math.sqrt(A[0]*A[0]+A[1]*A[1]),l=(L[0]*A[0]+L[1]*A[1])/s/n;r=Math.max(0,l)}var c=Math.atan2(p,v)*180/Math.PI;return c<-90?(c+=180,t=-t):c>90&&(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;b<y.length;b++)C=y[b],x=i([],C.x,M.c2p),S=i([],C.y,T.c2p),z.push(L(x,S,C.bicubic));var I="M"+z.join("L")+"Z";a.attr("id",h._clipPathId),E.attr("d",I)}function l(h,o,d,M,T,C,x){var S="const-"+T+"-lines",b=d.selectAll("."+S).data(C);b.enter().append("path").classed(S,!0).style("vector-effect",x?"none":"non-scaling-stroke"),b.each(function(a){var E=a,y=E.x,z=E.y,I=i([],y,h.c2p),B=i([],z,o.c2p),k="M"+L(I,B,E.smoothing),O=m.select(this);O.attr("d",k).style("stroke-width",E.width).style("stroke",E.color).style("stroke-dasharray",P.dashStyle(E.dash,E.width)).style("fill","none")}),b.exit().remove()}function c(h,o,d,M,T,C,x,S){var b=C.selectAll("text."+S).data(x);b.enter().append("text").classed(S,!0);var a=0,E={};return b.each(function(y,z){var I;if(y.axis.tickangle==="auto")I=A(M,o,d,y.xy,y.dxy);else{var B=(y.axis.tickangle+180)*Math.PI/180;I=A(M,o,d,y.xy,[Math.cos(B),Math.sin(B)])}z||(E={angle:I.angle,flip:I.flip});var k=(y.endAnchor?-1:1)*I.flip,O=m.select(this).attr({"text-anchor":k>0?"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&&C<f&&x>w&&x<h},t.isOccluded=function(C,x){return C<g||C>f||x<w||x>h},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&&(C<r[0]||C>r[n-1]|x<s[0]||x>s[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;C<r[0]?(B=0,k=0,y=(C-r[0])/(r[1]-r[0])):C>r[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),x<s[0]?(O=0,N=0,z=(x-s[0])/(s[1]-s[0])):x>s[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),J<n-1&&(ce=i[te][J+1])!==void 0&&(Q++,ae+=ce),te>0&&(ce=i[te-1][J])!==void 0&&(Q++,ae+=ce),te<l-1&&(ce=i[te+1][J])!==void 0&&(Q++,ae+=ce),ae/Math.max(1,Q)}var u=0;for(v=0;v<n;v++)for(p=0;p<l;p++)i[p][v]===void 0&&(r.push(v),s.push(p),i[p][v]=c(v,p)),u=Math.max(u,Math.abs(i[p][v]));if(!r.length)return i;var g,f,w,h,o,d,M,T,C,x,S,b=1e-5,a=0,E=100,y=0,z=r.length;do{for(a=0,t=0;t<z;t++){v=r[t],p=s[t];var I=0,B=0,k,O,N,_,U,Y;v===0?(U=Math.min(n-1,2),N=L[U],_=L[1],k=i[p][U],O=i[p][1],B+=O+(O-k)*(L[0]-_)/(_-N),I++):v===n-1&&(U=Math.max(0,n-3),N=L[U],_=L[n-2],k=i[p][U],O=i[p][n-2],B+=O+(O-k)*(L[n-1]-_)/(_-N),I++),(v===0||v===n-1)&&p>0&&p<l-1&&(g=A[p+1]-A[p],f=A[p]-A[p-1],B+=(f*i[p+1][v]+g*i[p-1][v])/(f+g),I++),p===0?(Y=Math.min(l-1,2),N=A[Y],_=A[1],k=i[Y][v],O=i[1][v],B+=O+(O-k)*(A[0]-_)/(_-N),I++):p===l-1&&(Y=Math.max(0,l-3),N=A[Y],_=A[l-2],k=i[Y][v],O=i[l-2][v],B+=O+(O-k)*(A[l-1]-_)/(_-N),I++),(p===0||p===l-1)&&v>0&&v<n-1&&(g=L[v+1]-L[v],f=L[v]-L[v-1],B+=(f*i[p][v+1]+g*i[p][v-1])/(f+g),I++),I?B/=I:(w=L[v+1]-L[v],h=L[v]-L[v-1],o=A[p+1]-A[p],d=A[p]-A[p-1],M=w*h*(w+h),T=o*d*(o+d),B=(M*(d*i[p+1][v]+o*i[p-1][v])+T*(h*i[p][v+1]+w*i[p][v-1]))/(T*(h+w)+M*(d+o))),C=B-i[p][v],x=C/u,a+=x*x,S=I?0:.85,i[p][v]+=C*(1+S)}a=Math.sqrt(a)}while(y++<E&&a>b);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<s;c++){var u=n[c]={},g=r.locations[c],f=r.z[c];l(g)&&m(f)?(u.loc=g,u.z=f):(u.loc=null,u.z=P),u.index=c}return L(n,r),i(t,r,{vals:r.z,containerStr:"",cLetter:"z"}),A(n,r),n}},61869:function(G,V,e){var m=e(71828),P=e(1586),i=e(69568);G.exports=function(A,v,p,t){function r(f,w){return m.coerce(A,v,i,f,w)}var s=r("locations"),n=r("z");if(!(s&&s.length&&m.isArrayOrTypedArray(n)&&n.length)){v.visible=!1;return}v._length=Math.min(s.length,n.length);var l=r("geojson"),c;(typeof l=="string"&&l!==""||m.isPlainObject(l))&&(c="geojson-id");var u=r("locationmode",c);u==="geojson-id"&&r("featureidkey"),r("text"),r("hovertext"),r("hovertemplate");var g=r("marker.line.width");g&&r("marker.line.color"),r("marker.opacity"),P(A,v,t,r,{prefix:"",cLetter:"z"}),m.coerceSelectionMarkerOpacity(v,r)}},92069:function(G){G.exports=function(e,m,P,i,L){e.location=m.location,e.z=m.z;var A=i[L];return A.fIn&&A.fIn.properties&&(e.properties=A.fIn.properties),e.ct=A.ct,e}},42300:function(G,V,e){var m=e(89298),P=e(69568),i=e(71828).fillText;G.exports=function(v,p,t){var r=v.cd,s=r[0].trace,n=v.subplot,l,c,u,g,f=[p,t],w=[p+360,t];for(c=0;c<r.length;c++)if(l=r[c],g=!1,l._polygons){for(u=0;u<l._polygons.length;u++)l._polygons[u].contains(f)&&(g=!g),l._polygons[u].contains(w)&&(g=!g);if(g)break}if(!(!g||!l))return v.x0=v.x1=v.xa.c2p(l.ct),v.y0=v.y1=v.ya.c2p(l.ct),v.index=l.index,v.location=l.loc,v.z=l.z,v.zLabel=m.tickText(n.mockAxis,n.mockAxis.c2l(l.z),"hover").text,v.hovertemplate=l.hovertemplate,L(v,s,l),[v]};function L(A,v,p){if(!v.hovertemplate){var t=p.hi||v.hoverinfo,r=String(p.loc),s=t==="all"?P.hoverinfo.flags:t.split("+"),n=s.indexOf("name")!==-1,l=s.indexOf("location")!==-1,c=s.indexOf("z")!==-1,u=s.indexOf("text")!==-1,g=!n&&l,f=[];g?A.nameOverride=r:(n&&(A.nameOverride=v.name),l&&f.push(r)),c&&f.push(A.zLabel),u&&i(p,v,f),A.extraText=f.join("<br>")}}},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<g;o++){var d=r[o],M=u==="geojson-id"?d.fOut:i.locationToFeature(u,d.loc,f);if(M){d.geojson=M,d.ct=M.properties.ct,d._polygons=i.feature2polygons(M);var T=i.computeBbox(M);w.push(T[0],T[2]),h.push(T[1],T[3])}else d.geojson=null}if(l.fitbounds==="geojson"&&u==="geojson-id"){var C=i.computeBbox(i.getTraceGeojson(n));w=[C[0],C[2]],h=[C[1],C[3]]}var x={padded:!0};n._extremes.lon=A(l.lonaxis._ax,w,x),n._extremes.lat=A(l.lataxis._ax,h,x)}G.exports={calcGeoJSON:t,plot:p}},81253:function(G){G.exports=function(e,m){var P=e.cd,i=e.xaxis,L=e.yaxis,A=[],v,p,t,r,s;if(m===!1)for(v=0;v<P.length;v++)P[v].selected=0;else for(v=0;v<P.length;v++)p=P[v],t=p.ct,t&&(r=i.c2p(t),s=L.c2p(t),m.contains([r,s],null,v,e)?(A.push({pointNumber:v,lon:t[0],lat:t[1]}),p.selected=1):p.selected=0);return A}},99636:function(G,V,e){var m=e(39898),P=e(7901),i=e(91424),L=e(21081);function A(t,r){r&&v(t,r)}function v(t,r){var s=r[0].trace,n=r[0].node3,l=n.selectAll(".choroplethlocation"),c=s.marker||{},u=c.line||{},g=L.makeColorScaleFuncFromTrace(s);l.each(function(f){m.select(this).attr("fill",g(f.z)).call(P.stroke,f.mlc||u.color).call(i.dashLine,"",f.mlw||u.width||0).style("opacity",c.opacity)}),i.selectedPointStyle(l,s)}function p(t,r){var s=r[0].node3,n=r[0].trace;n.selectedpoints?i.selectedPointStyle(s.selectAll(".choroplethlocation"),n):v(t,r)}G.exports={style:A,styleOnSelect:p}},64496:function(G,V,e){var m=e(69568),P=e(50693),i=e(5386).fF,L=e(9012),A=e(1426).extendFlat;G.exports=A({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:A({},m.featureidkey,{}),below:{valType:"string",editType:"plot"},text:m.text,hovertext:m.hovertext,marker:{line:{color:A({},m.marker.line.color,{editType:"plot"}),width:A({},m.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:A({},m.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:A({},m.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:A({},m.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:m.hoverinfo,hovertemplate:i({},{keys:["properties"]}),showlegend:A({},L.showlegend,{dflt:!1})},P("",{cLetter:"z",editTypeOverride:"calc"}))},82004:function(G,V,e){var m=e(92770),P=e(71828),i=e(21081),L=e(91424),A=e(18214).makeBlank,v=e(41327);function p(r){var s=r[0].trace,n=s.visible===!0&&s._length!==0,l={layout:{visibility:"none"},paint:{}},c={layout:{visibility:"none"},paint:{}},u=s._opts={fill:l,line:c,geojson:A()};if(!n)return u;var g=v.extractTraceFeature(r);if(!g)return u;var f=i.makeColorScaleFuncFromTrace(s),w=s.marker,h=w.line||{},o;P.isArrayOrTypedArray(w.opacity)&&(o=function(a){var E=a.mo;return m(E)?+P.constrain(E,0,1):0});var d;P.isArrayOrTypedArray(h.color)&&(d=function(a){return a.mlc});var M;P.isArrayOrTypedArray(h.width)&&(M=function(a){return a.mlw});for(var T=0;T<r.length;T++){var C=r[T],x=C.fOut;if(x){var S=x.properties;S.fc=f(C.z),o&&(S.mo=o(C)),d&&(S.mlc=d(C)),M&&(S.mlw=M(C)),C.ct=S.ct,C._polygons=v.feature2polygons(x)}}var b=o?{type:"identity",property:"mo"}:w.opacity;return P.extendFlat(l.paint,{"fill-color":{type:"identity",property:"fc"},"fill-opacity":b}),P.extendFlat(c.paint,{"line-color":d?{type:"identity",property:"mlc"}:h.color,"line-width":M?{type:"identity",property:"mlw"}:h.width,"line-opacity":b}),l.layout.visibility="visible",c.layout.visibility="visible",u.geojson={type:"FeatureCollection",features:g},t(r),u}function t(r){var s=r[0].trace,n=s._opts,l;if(s.selectedpoints){for(var c=L.makeSelectedPointStyleFns(s),u=0;u<r.length;u++){var g=r[u];g.fOut&&(g.fOut.properties.mo2=c.selectedOpacityFn(g))}l={type:"identity",property:"mo2"}}else l=P.isArrayOrTypedArray(s.marker.opacity)?{type:"identity",property:"mo"}:s.marker.opacity;return P.extendFlat(n.fill.paint,{"fill-opacity":l}),P.extendFlat(n.line.paint,{"line-opacity":l}),n}G.exports={convert:p,convertOnSelect:t}},22654:function(G,V,e){var m=e(71828),P=e(1586),i=e(64496);G.exports=function(A,v,p,t){function r(u,g){return m.coerce(A,v,i,u,g)}var s=r("locations"),n=r("z"),l=r("geojson");if(!m.isArrayOrTypedArray(s)||!s.length||!m.isArrayOrTypedArray(n)||!n.length||!(typeof l=="string"&&l!==""||m.isPlainObject(l))){v.visible=!1;return}r("featureidkey"),v._length=Math.min(s.length,n.length),r("below"),r("text"),r("hovertext"),r("hovertemplate");var c=r("marker.line.width");c&&r("marker.line.color"),r("marker.opacity"),P(A,v,t,r,{prefix:"",cLetter:"z"}),m.coerceSelectionMarkerOpacity(v,r)}},57516:function(G,V,e){G.exports={attributes:e(64496),supplyDefaults:e(22654),colorbar:e(61243),calc:e(38675),plot:e(7852),hoverPoints:e(42300),eventData:e(92069),selectPoints:e(81253),styleOnSelect:function(m,P){if(P){var i=P[0].trace;i._glTrace.updateOnSelect(P)}},getBelow:function(m,P){for(var i=P.getMapLayers(),L=i.length-2;L>=0;L--){var A=i[L].id;if(typeof A=="string"&&A.indexOf("water")===0){for(var v=L+1;v<i.length;v++)if(A=i[v].id,typeof A=="string"&&A.indexOf("plotly-")===-1)return A}}},moduleType:"trace",name:"choroplethmapbox",basePlotModule:e(50101),categories:["mapbox","gl","noOpacity","showLegend"],meta:{hr_name:"choropleth_mapbox"}}},7852:function(G,V,e){var m=e(82004).convert,P=e(82004).convertOnSelect,i=e(77734).traceLayerPrefix;function L(v,p){this.type="choroplethmapbox",this.subplot=v,this.uid=p,this.sourceId="source-"+p,this.layerList=[["fill",i+p+"-fill"],["line",i+p+"-line"]],this.below=null}var A=L.prototype;A.update=function(v){this._update(m(v)),v[0].trace._glTrace=this},A.updateOnSelect=function(v){this._update(P(v))},A._update=function(v){var p=this.subplot,t=this.layerList,r=p.belowLookup["trace-"+this.uid];p.map.getSource(this.sourceId).setData(v.geojson),r!==this.below&&(this._removeLayers(),this._addLayers(v,r),this.below=r);for(var s=0;s<t.length;s++){var n=t[s],l=n[0],c=n[1],u=v[l];p.setOptions(c,"setLayoutProperty",u.layout),u.layout.visibility==="visible"&&p.setOptions(c,"setPaintProperty",u.paint)}},A._addLayers=function(v,p){for(var t=this.subplot,r=this.layerList,s=this.sourceId,n=0;n<r.length;n++){var l=r[n],c=l[0],u=v[c];t.addLayer({type:c,id:l[1],source:s,layout:u.layout,paint:u.paint},p)}},A._removeLayers=function(){for(var v=this.subplot.map,p=this.layerList,t=p.length-1;t>=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;n<t;n++){var l=A[n],c=v[n],u=p[n],g=Math.sqrt(l*l+c*c+u*u);r=Math.max(r,g),s=Math.min(s,g)}L._len=t,L._normMax=r,m(i,L,{vals:[s,r],containerStr:"",cLetter:"c"})}},5453:function(G,V,e){var m=e(9330).gl_cone3d,P=e(9330).gl_cone3d.createConeMesh,i=e(71828).simpleMap,L=e(81697).parseColorScale,A=e(21081).extractOpts,v=e(90060);function p(u,g){this.scene=u,this.uid=g,this.mesh=null,this.data=null}var t=p.prototype;t.handlePick=function(u){if(u.object===this.mesh){var g=u.index=u.data.index,f=this.data.x[g],w=this.data.y[g],h=this.data.z[g],o=this.data.u[g],d=this.data.v[g],M=this.data.w[g];u.traceCoordinate=[f,w,h,o,d,M,Math.sqrt(o*o+d*d+M*M)];var T=this.data.hovertext||this.data.text;return Array.isArray(T)&&T[g]!==void 0?u.textLabel=T[g]:T&&(u.textLabel=T),!0}};var r={xaxis:0,yaxis:1,zaxis:2},s={tip:1,tail:0,cm:.25,center:.5},n={tip:1,tail:1,cm:.75,center:.5};function l(u,g){var f=u.fullSceneLayout,w=u.dataScale,h={};function o(C,x){var S=f[x],b=w[r[x]];return i(C,function(a){return S.d2l(a)*b})}h.vectors=v(o(g.u,"xaxis"),o(g.v,"yaxis"),o(g.w,"zaxis"),g._len),h.positions=v(o(g.x,"xaxis"),o(g.y,"yaxis"),o(g.z,"zaxis"),g._len);var d=A(g);h.colormap=L(g),h.vertexIntensityBounds=[d.min/g._normMax,d.max/g._normMax],h.coneOffset=s[g.anchor],g.sizemode==="scaled"?h.coneSize=g.sizeref||.5:h.coneSize=g.sizeref&&g._normMax?g.sizeref/g._normMax:.5;var M=m(h),T=g.lightposition;return M.lightPosition=[T.x,T.y,T.z],M.ambient=g.lighting.ambient,M.diffuse=g.lighting.diffuse,M.specular=g.lighting.specular,M.roughness=g.lighting.roughness,M.fresnel=g.lighting.fresnel,M.opacity=g.opacity,g._pad=n[g.anchor]*M.vectorScale*M.coneScale*g._normMax,M}t.update=function(u){this.data=u;var g=l(this.scene,u);this.mesh.update(g)},t.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function c(u,g){var f=u.glplot.gl,w=l(u,g),h=P(f,w),o=new p(u,g.uid);return o.mesh=h,o.data=g,h._trace=o,u.glplot.add(h),o}G.exports=c},91750:function(G,V,e){var m=e(71828),P=e(1586),i=e(12674);G.exports=function(A,v,p,t){function r(f,w){return m.coerce(A,v,i,f,w)}var s=r("u"),n=r("v"),l=r("w"),c=r("x"),u=r("y"),g=r("z");if(!s||!s.length||!n||!n.length||!l||!l.length||!c||!c.length||!u||!u.length||!g||!g.length){v.visible=!1;return}r("sizeref"),r("sizemode"),r("anchor"),r("lighting.ambient"),r("lighting.diffuse"),r("lighting.specular"),r("lighting.roughness"),r("lighting.fresnel"),r("lightposition.x"),r("lightposition.y"),r("lightposition.z"),P(A,v,t,r,{prefix:"",cLetter:"c"}),r("text"),r("hovertext"),r("hovertemplate"),r("uhoverformat"),r("vhoverformat"),r("whoverformat"),r("xhoverformat"),r("yhoverformat"),r("zhoverformat"),v._length=null}},98128:function(G,V,e){G.exports={moduleType:"trace",name:"cone",basePlotModule:e(58547),categories:["gl3d","showLegend"],attributes:e(12674),supplyDefaults:e(91750),colorbar:{min:"cmin",max:"cmax"},calc:e(31371),plot:e(5453),eventData:function(m,P){return m.norm=P.traceCoordinate[6],m},meta:{}}},70600:function(G,V,e){var m=e(21606),P=e(82196),i=e(12663),L=i.axisHoverFormat,A=i.descriptionOnlyNumbers,v=e(50693),p=e(79952).P,t=e(41940),r=e(1426).extendFlat,s=e(74808),n=s.COMPARISON_OPS2,l=s.INTERVAL_OPS,c=P.line;G.exports=r({z:m.z,x:m.x,x0:m.x0,dx:m.dx,y:m.y,y0:m.y0,dy:m.dy,xperiod:m.xperiod,yperiod:m.yperiod,xperiod0:P.xperiod0,yperiod0:P.yperiod0,xperiodalignment:m.xperiodalignment,yperiodalignment:m.yperiodalignment,text:m.text,hovertext:m.hovertext,transpose:m.transpose,xtype:m.xtype,ytype:m.ytype,xhoverformat:L("x"),yhoverformat:L("y"),zhoverformat:L("z",1),hovertemplate:m.hovertemplate,texttemplate:r({},m.texttemplate,{}),textfont:r({},m.textfont,{}),hoverongaps:m.hoverongaps,connectgaps:r({},m.connectgaps,{}),fillcolor:{valType:"color",editType:"calc"},autocontour:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"contours.start":void 0,"contours.end":void 0,"contours.size":void 0}},ncontours:{valType:"integer",dflt:15,min:1,editType:"calc"},contours:{type:{valType:"enumerated",values:["levels","constraint"],dflt:"levels",editType:"calc"},start:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},end:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},size:{valType:"number",dflt:null,min:0,editType:"plot",impliedEdits:{"^autocontour":!1}},coloring:{valType:"enumerated",values:["fill","heatmap","lines","none"],dflt:"fill",editType:"calc"},showlines:{valType:"boolean",dflt:!0,editType:"plot"},showlabels:{valType:"boolean",dflt:!1,editType:"plot"},labelfont:t({editType:"plot",colorEditType:"style"}),labelformat:{valType:"string",dflt:"",editType:"plot",description:A("contour label")},operation:{valType:"enumerated",values:[].concat(n).concat(l),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:r({},c.color,{editType:"style+colorbars"}),width:{valType:"number",min:0,editType:"style+colorbars"},dash:p,smoothing:r({},c.smoothing,{}),editType:"plot"}},v("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))},27529:function(G,V,e){var m=e(21081),P=e(90757),i=e(18670),L=e(53572);G.exports=function(v,p){var t=P(v,p),r=t[0].z;i(p,r);var s=p.contours,n=m.extractOpts(p),l;if(s.coloring==="heatmap"&&n.auto&&p.autocontour===!1){var c=s.start,u=L(s),g=s.size||1,f=Math.floor((u-c)/g)+1;isFinite(g)||(g=1,f=1);var w=c-g/2,h=w+f*g;l=[w,h]}else l=r;return m.calc(v,p,{vals:l,cLetter:"z"}),t}},20083:function(G){G.exports=function(V,e){var m=V[0],P=m.z,i;switch(e.type){case"levels":var L=Math.min(P[0][0],P[0][1]);for(i=0;i<V.length;i++){var A=V[i];A.prefixBoundary=!A.edgepaths.length&&(L>A.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<p;i++)r=Math.min(r,P[i][0]),r=Math.min(r,P[i][v-1]),t=Math.max(t,P[i][0]),t=Math.max(t,P[i][v-1]);for(i=1;i<v-1;i++)r=Math.min(r,P[0][i]),r=Math.min(r,P[p-1][i]),t=Math.max(t,P[0][i]),t=Math.max(t,P[p-1][i]);var s=e.value,n,l;switch(e._operation){case">":s>t&&(m.prefixBoundary=!0);break;case"<":(s<r||m.starts.length&&s===r)&&(m.prefixBoundary=!0);break;case"[]":n=Math.min(s[0],s[1]),l=Math.max(s[0],s[1]),(l<r||n>t||m.starts.length&&l===r)&&(m.prefixBoundary=!0);break;case"][":n=Math.min(s[0],s[1]),l=Math.max(s[0],s[1]),n<r&&l>t&&(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;A<v.edgepaths.length;A++)v.edgepaths[A]=t(v.edgepaths[A]);for(A=0;A<v.paths.length;A++)v.paths[A]=t(v.paths[A]);for(A=0;A<v.starts.length;A++)v.starts[A]=t(v.starts[A]);return i;case"][":var s=t;t=r,r=s;case"[]":for(i.length!==2&&m.warn("Contour data invalid for the specified inequality range operation."),v=P(i[0]),p=P(i[1]),A=0;A<v.edgepaths.length;A++)v.edgepaths[A]=t(v.edgepaths[A]);for(A=0;A<v.paths.length;A++)v.paths[A]=t(v.paths[A]);for(A=0;A<v.starts.length;A++)v.starts[A]=t(v.starts[A]);for(;p.edgepaths.length;)v.edgepaths.push(r(p.edgepaths.shift()));for(;p.paths.length;)v.paths.push(r(p.paths.shift()));for(;p.starts.length;)v.starts.push(r(p.starts.shift()));return[v]}};function P(i){return m.extendFlat({},i,{edgepaths:m.extendDeep([],i.edgepaths),paths:m.extendDeep([],i.paths),starts:m.extendDeep([],i.starts)})}},13031:function(G,V,e){var m=e(71828),P=e(67684),i=e(73927),L=e(83179),A=e(67217),v=e(8724),p=e(58623),t=e(70600);G.exports=function(s,n,l,c){function u(h,o){return m.coerce(s,n,t,h,o)}function g(h){return m.coerce2(s,n,t,h)}var f=P(s,n,u,c);if(!f){n.visible=!1;return}i(s,n,c,u),u("xhoverformat"),u("yhoverformat"),u("text"),u("hovertext"),u("hoverongaps"),u("hovertemplate");var w=u("contours.type")==="constraint";u("connectgaps",m.isArray1D(n.z)),w?L(s,n,u,c,l):(A(s,n,u,g),v(s,n,u,c)),n.contours&&n.contours.coloring==="heatmap"&&p(u,c)}},87558:function(G,V,e){var m=e(71828),P=e(64237),i=e(53572);G.exports=function(A,v,p){for(var t=A.type==="constraint"?P[A._operation](A.value):A,r=t.size,s=[],n=i(t),l=p.trace._carpetTrace,c=l?{xaxis:l.aaxis,yaxis:l.baxis,x:p.a,y:p.b}:{xaxis:v.xaxis,yaxis:v.yaxis,x:p.x,y:p.y},u=t.start;u<n;u+=r)if(s.push(m.extendFlat({level:u,crossings:{},starts:[],edgepaths:[],paths:[],z:p.z,smoothing:p.trace.line.smoothing},c)),s.length>1e3){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;u<r.length;u++){for(g=r[u],f=0;f<g.starts.length;f++)c=g.starts[f],A(g,c,"edge",s,n);for(l=0;Object.keys(g.crossings).length&&l<1e4;)l++,c=Object.keys(g.crossings)[0].split(",").map(Number),A(g,c,void 0,s,n);l===1e4&&m.log("Infinite loop in contour?")}};function i(t,r,s,n){return Math.abs(t[0]-r[0])<s&&Math.abs(t[1]-r[1])<n}function L(t,r){var s=t[2]-r[2],n=t[3]-r[3];return Math.sqrt(s*s+n*n)}function A(t,r,s,n,l){var c=r.join(","),u=t.crossings[c],g=v(u,s,r),f=[p(t,r,[-g[0],-g[1]])],w=t.z.length,h=t.z[0].length,o=r.slice(),d=g.slice(),M;for(M=0;M<1e4;M++){if(u>20?(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<f.length;M++)N=L(f[M],f[M-1]),S+=N,a.push(N);var te=S/a.length*b;function ae(Z){return f[Z%f.length]}for(M=f.length-2;M>=E;M--)if(y=a[M],y<te){for(I=0,z=M-1;z>=E&&y+a[z]<te;z--)y+=a[z];if(x&&M===f.length-2)for(I=0;I<z&&y+a[I]<te;I++)y+=a[I];k=M-z+I+1,O=Math.floor((M+z+I+2)/2),!x&&M===f.length-2?B=f[f.length-1]:!x&&z===-1?B=f[0]:k%2?B=ae(O):B=[(ae(O)[0]+ae(O+1)[0])/2,(ae(O)[1]+ae(O+1)[1])/2],f.splice(z+1,M-z+1,B),M=z+1,I&&(E=I),x&&(M===f.length-2?f[I]=f[f.length-1]:M===0&&(f[f.length-1]=f[0]))}for(f.splice(0,E),M=0;M<f.length;M++)f[M].length=2;if(!(f.length<2))if(x)f.pop(),t.paths.push(f);else{s||m.log("Unclosed interior contour?",t.level,o.join(","),f.join("L"));var ce=!1;for(_=0;_<t.edgepaths.length;_++)if(Y=t.edgepaths[_],!ce&&i(Y[0],f[f.length-1],n,l)){f.pop(),ce=!0;var Q=!1;for(U=0;U<t.edgepaths.length;U++)if(J=t.edgepaths[U],i(J[J.length-1],f[0],n,l)){Q=!0,f.shift(),t.edgepaths.splice(_,1),U===_?t.paths.push(f.concat(J)):(U>_&&U--,t.edgepaths[U]=J.concat(f,Y));break}Q||(t.edgepaths[_]=f.concat(Y))}for(_=0;_<t.edgepaths.length&&!ce;_++)Y=t.edgepaths[_],i(Y[Y.length-1],f[0],n,l)&&(f.shift(),t.edgepaths[_]=Y.concat(f),ce=!0);ce||t.edgepaths.push(f)}}function v(t,r,s){var n=0,l=0;return t>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<u;h++)w=c[h],g[h]=w[0]*(d-o)+o,f[h]=w[1];var M=m.extent([o,d,v.start,v.start+r*(s-1)]),T=M[o<d?0:1],C=M[o<d?1:0];T!==o&&(g.splice(0,0,T),f.splice(0,0,f[0])),C!==d&&(g.push(C),f.push(f[f.length-1]))}else{var x=A._input&&typeof A._input.zmin=="number"&&typeof A._input.zmax=="number";for(x&&(p<=o||t>=d)&&(p<=o&&(p=o),t>=d&&(t=d),s=Math.floor((t-p)/r)+1,n=0),h=0;h<u;h++)w=c[h],g[h]=(w[0]*(s+n-1)-n/2)*r+p,f[h]=w[1];(x||A.autocontour)&&(g[0]>o&&(g.unshift(o),f.unshift(f[0])),g[g.length-1]<d&&(g.push(d),f.push(f[f.length-1])))}return P.makeColorScaleFunc({domain:g,range:f},{noNumericCheck:!0})}},87678:function(G,V,e){var m=e(36914);G.exports=function(L){var A=L[0].z,v=A.length,p=A[0].length,t=v===2||p===2,r,s,n,l,c,u,g,f,w;for(s=0;s<v-1;s++)for(l=[],s===0&&(l=l.concat(m.BOTTOMSTART)),s===v-2&&(l=l.concat(m.TOPSTART)),r=0;r<p-1;r++)for(n=l.slice(),r===0&&(n=n.concat(m.LEFTSTART)),r===p-2&&(n=n.concat(m.RIGHTSTART)),c=r+","+s,u=[[A[s][r],A[s][r+1]],[A[s+1][r],A[s+1][r+1]]],w=0;w<L.length;w++)f=L[w],g=P(f.level,u),g&&(f.crossings[c]=g,n.indexOf(g)!==-1&&(f.starts.push([r,s]),t&&n.indexOf(g,n.indexOf(g)+1)!==-1&&f.starts.push([r,s])))};function P(i,L){var A=(L[0][0]>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<C.edgepaths.length;k++){var J=C.edgepaths[k][0];Math.abs(y[0]-z[0])<.01?Math.abs(y[0]-J[0])<.01&&(J[1]-y[1])*(z[1]-J[1])>=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;b<C.paths.length;b++)S+=i.smoothclosed(C.paths[b],C.smoothing);return S}function o(C,x,S,b,a){var E=S._context.staticPlot,y=P.ensureSingle(C,"g","contourlines"),z=a.showlines!==!1,I=a.showlabels,B=z&&I,k=V.createLines(y,z||I,x,E),O=V.createLineClip(y,B,S,b.trace.uid),N=C.selectAll("g.contourlabels").data(I?[0]:[]);if(N.exit().remove(),N.enter().append("g").classed("contourlabels",!0),I){var _=[],U=[];P.clearLocationCache();var Y=V.labelFormatter(S,b),J=i.tester.append("text").attr("data-notex",1).call(i.font,a.labelfont),te=x[0].xaxis,ae=x[0].yaxis,ce=te._length,Q=ae._length,Z=te.range,j=ae.range,K=P.aggNums(Math.min,null,b.x),ee=P.aggNums(Math.max,null,b.x),oe=P.aggNums(Math.min,null,b.y),q=P.aggNums(Math.max,null,b.y),$=Math.max(te.c2p(K,!0),0),le=Math.min(te.c2p(ee,!0),ce),ie=Math.max(ae.c2p(q,!0),0),he=Math.min(ae.c2p(oe,!0),Q),me={};Z[0]<Z[1]?(me.left=$,me.right=le):(me.left=le,me.right=$),j[0]<j[1]?(me.top=ie,me.bottom=he):(me.top=he,me.bottom=ie),me.middle=(me.top+me.bottom)/2,me.center=(me.left+me.right)/2,_.push([[me.left,me.top],[me.right,me.top],[me.right,me.bottom],[me.left,me.bottom]]);var Me=Math.sqrt(ce*ce+Q*Q),Te=u.LABELDISTANCE*Me/Math.max(1,x.length/u.LABELINCREASE);k.each(function(Oe){var Ne=V.calcTextOpts(Oe.level,Y,J,S);m.select(this).selectAll("path").each(function(){var Ee=this,xe=P.getVisibleSegment(Ee,me,Ne.height/2);if(xe&&!(xe.len<(Ne.width+Ne.height)*u.LABELMIN))for(var Se=Math.min(Math.ceil(xe.len/Te),u.LABELMAX),Ue=0;Ue<Se;Ue++){var He=V.findBestTextLocation(Ee,xe,Ne,U,me);if(!He)break;V.addLabelData(He,Ne,U,_)}})}),J.remove(),V.drawLabels(N,U,S,O,B?_:null)}I&&!z&&k.remove()}V.createLines=function(C,x,S,b){var a=S[0].smoothing,E=C.selectAll("g.contourlevel").data(x?S:[]);if(E.exit().remove(),E.enter().append("g").classed("contourlevel",!0),x){var y=E.selectAll("path.openline").data(function(I){return I.pedgepaths||I.edgepaths});y.exit().remove(),y.enter().append("path").classed("openline",!0),y.attr("d",function(I){return i.smoothopen(I,a)}).style("stroke-miterlimit",1).style("vector-effect",b?"none":"non-scaling-stroke");var z=E.selectAll("path.closedline").data(function(I){return I.ppaths||I.paths});z.exit().remove(),z.enter().append("path").classed("closedline",!0),z.attr("d",function(I){return i.smoothclosed(I,a)}).style("stroke-miterlimit",1).style("vector-effect",b?"none":"non-scaling-stroke")}return E},V.createLineClip=function(C,x,S,b){var a=S._fullLayout._clips,E=x?"clipline"+b:null,y=a.selectAll("#"+E).data(x?[0]:[]);return y.exit().remove(),y.enter().append("clipPath").classed("contourlineclip",!0).attr("id",E),i.setClipUrl(C,E,S),y},V.labelFormatter=function(C,x){var S=C._fullLayout,b=x.trace,a=b.contours,E={type:"linear",_id:"ycontour",showexponent:"all",exponentformat:"B"};if(a.labelformat)E.tickformat=a.labelformat,p(E,S);else{var y=L.extractOpts(b);if(y&&y.colorbar&&y.colorbar._axis)E=y.colorbar._axis;else{if(a.type==="constraint"){var z=a.value;Array.isArray(z)?E.range=[z[0],z[z.length-1]]:E.range=[z,z]}else E.range=[a.start,a.end],E.nticks=(a.end-a.start)/a.size;E.range[0]===E.range[1]&&(E.range[1]+=E.range[0]||1),E.nticks||(E.nticks=1e3),p(E,S),v.prepTicks(E),E._tmin=null,E._tmax=null}}return function(I){return v.tickText(E,I).text}},V.calcTextOpts=function(C,x,S,b){var a=x(C);S.text(a).call(A.convertToTspans,b);var E=S.node(),y=i.bBox(E,!0);return{text:a,width:y.width,height:y.height,fontSize:+E.style["font-size"].replace("px",""),level:C,dy:(y.top+y.bottom)/2}},V.findBestTextLocation=function(C,x,S,b,a){var E=S.width,y,z,I,B,k;x.isClosed?(z=x.len/g.INITIALSEARCHPOINTS,y=x.min+z/2,I=x.max):(z=(x.len-E)/(g.INITIALSEARCHPOINTS+1),y=x.min+z+E/2,I=x.max-(z+E)/2);for(var O=1/0,N=0;N<g.ITERATIONS;N++){for(var _=y;_<I;_+=z){var U=P.getTextLocation(C,x.total,_,E),Y=d(U,S,b,a);Y<O&&(O=Y,k=U,B=_)}if(O>g.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;ae<S.length;ae++){var ce=S[ae],Q=Math.cos(ce.theta)*ce.width/2,Z=Math.sin(ce.theta)*ce.width/2,j=P.segmentDistance(U,Y,J,te,ce.x-Q,ce.y-Z,ce.x+Q,ce.y+Z)*2/(x.height+ce.height),K=ce.level===x.level,ee=K?g.SAMELEVELDISTANCE:1;if(j<=ee)return 1/0;var oe=g.NEIGHBORCOST*(K?g.SAMELEVELFACTOR:1);_+=oe/(j-ee)}return _}V.addLabelData=function(C,x,S,b){var a=x.fontSize,E=x.width+a/3,y=Math.max(0,x.height-a/3),z=C.x,I=C.y,B=C.theta,k=Math.sin(B),O=Math.cos(B),N=function(U,Y){return[z+U*O-Y*k,I+U*k+Y*O]},_=[N(-E/2,-y/2),N(-E/2,y/2),N(E/2,y/2),N(E/2,-y/2)];S.push({text:x.text,x:z,y:I,dy:x.dy,theta:B,level:x.level,width:E,height:y}),b.push(_)},V.drawLabels=function(C,x,S,b,a){var E=C.selectAll("text").data(x,function(B){return B.text+","+B.x+","+B.y+","+B.theta});if(E.exit().remove(),E.enter().append("text").attr({"data-notex":1,"text-anchor":"middle"}).each(function(B){var k=B.x+Math.sin(B.theta)*B.dy,O=B.y-Math.cos(B.theta)*B.dy;m.select(this).text(B.text).attr({x:k,y:O,transform:"rotate("+180*B.theta/Math.PI+" "+k+" "+O+")"}).call(A.convertToTspans,S)}),a){for(var y="",z=0;z<a.length;z++)y+="M"+a[z].join("L")+"Z";var I=P.ensureSingle(b,"path","");I.attr("d",y)}};function M(C,x,S,b,a){var E=b.trace,y=S._fullLayout._clips,z="clip"+E.uid,I=y.selectAll("#"+z).data(E.connectgaps?[]:[0]);if(I.enter().append("clipPath").classed("contourclip",!0).attr("id",z),I.exit().remove(),E.connectgaps===!1){var B={level:.9,crossings:{},starts:[],edgepaths:[],paths:[],xaxis:x.xaxis,yaxis:x.yaxis,x:b.x,y:b.y,z:T(b),smoothing:0};r([B]),s([B]),c([B],{type:"levels"});var k=P.ensureSingle(I,"path","");k.attr("d",(B.prefixBoundary?"M"+a.join("L")+"Z":"")+h(B,a))}else z=null;i.setClipUrl(C,z,S)}function T(C){var x=C.trace._emptypoints,S=[],b=C.z.length,a=C.z[0].length,E,y=[],z;for(E=0;E<a;E++)y.push(1);for(E=0;E<b;E++)S.push(y.slice());for(E=0;E<x.length;E++)z=x[E],S[z[0]][z[1]]=0;return C.zmask=S,S}},18670:function(G,V,e){var m=e(89298),P=e(71828);G.exports=function(A,v){var p=A.contours;if(A.autocontour){var t=A.zmin,r=A.zmax;(A.zauto||t===void 0)&&(t=P.aggNums(Math.min,null,v)),(A.zauto||r===void 0)&&(r=P.aggNums(Math.max,null,v));var s=i(t,r,A.ncontours);p.size=s.dtick,p.start=m.tickFirst(s),s.range.reverse(),p.end=m.tickFirst(s),p.start===t&&(p.start+=p.size),p.end===r&&(p.end-=p.size),p.start>p.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;b<x.length;b++){for(y=x[b],z=y.pedgepaths=[],I=y.ppaths=[],a=0;a<y.edgepaths.length;a++){for(O=y.edgepaths[a],B=[],E=0;E<O.length;E++)B[E]=S(O[E]);z.push(B)}for(a=0;a<y.paths.length;a++){for(O=y.paths[a],k=[],E=0;E<O.length;E++)k[E]=S(O[E]);I.push(k)}}}function f(x,S,b,a,E,y,z){var I=b._context.staticPlot,B=A.ensureSingle(x,"g","contourlines"),k=E.showlines!==!1,O=E.showlabels,N=k&&O,_=t.createLines(B,k||O,S,I),U=t.createLineClip(B,N,b,a.trace.uid),Y=x.selectAll("g.contourlabels").data(O?[0]:[]);if(Y.exit().remove(),Y.enter().append("g").classed("contourlabels",!0),O){var J=y.xaxis,te=y.yaxis,ae=J._length,ce=te._length,Q=[[[0,0],[ae,0],[ae,ce],[0,ce]]],Z=[];A.clearLocationCache();var j=t.labelFormatter(b,a),K=L.tester.append("text").attr("data-notex",1).call(L.font,E.labelfont),ee={left:0,right:ae,center:ae/2,top:0,bottom:ce,middle:ce/2},oe=Math.sqrt(ae*ae+ce*ce),q=r.LABELDISTANCE*oe/Math.max(1,S.length/r.LABELINCREASE);_.each(function($){var le=t.calcTextOpts($.level,j,K,b);m.select(this).selectAll("path").each(function(ie){var he=this,me=A.getVisibleSegment(he,ee,le.height/2);if(me&&(w(he,ie,$,me,z,le.height),!(me.len<(le.width+le.height)*r.LABELMIN)))for(var Me=Math.min(Math.ceil(me.len/q),r.LABELMAX),Te=0;Te<Me;Te++){var Oe=t.findBestTextLocation(he,me,le,Z,ee);if(!Oe)break;t.addLabelData(Oe,le,Z,Q)}})}),K.remove(),t.drawLabels(Y,Z,b,U,N?Q:null)}O&&!k&&_.remove()}function w(x,S,b,a,E,y){for(var z,I=0;I<b.pedgepaths.length;I++)S===b.pedgepaths[I]&&(z=b.edgepaths[I]);if(!z)return;var B=E.a[0],k=E.a[E.a.length-1],O=E.b[0],N=E.b[E.b.length-1];function _(ae,ce){var Q=0,Z,j=.1;return(Math.abs(ae[0]-B)<j||Math.abs(ae[0]-k)<j)&&(Z=o(E.dxydb_rough(ae[0],ae[1],j)),Q=Math.max(Q,y*d(ce,Z)/2)),(Math.abs(ae[1]-O)<j||Math.abs(ae[1]-N)<j)&&(Z=o(E.dxyda_rough(ae[0],ae[1],j)),Q=Math.max(Q,y*d(ce,Z)/2)),Q}var U=h(x,0,1),Y=h(x,a.total,a.total-1),J=_(z[0],U),te=a.total-_(z[z.length-1],Y);a.min<J&&(a.min=J),a.max>te&&(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<S.length;k++)z=S[k],I=P([],z.x,b.c2p),B=P([],z.y,a.c2p),_.push(i(I,B,z.bicubic));N.attr("d","M"+_.join("L")+"Z").style("stroke","none")}function T(x,S,b,a,E,y,z,I,B,k,O){var N=k==="fill";N&&l(E,x.contours);var _=A.ensureSingle(S,"g","contourfill"),U=_.selectAll("path").data(N?E:[]);U.enter().append("path"),U.exit().remove(),U.each(function(Y){var J=(Y.prefixBoundary?O:"")+C(x,Y,y,z,I,B,b,a);J?m.select(this).attr("d",J).style("stroke","none"):m.select(this).remove()})}function C(x,S,b,a,E,y,z,I){var B,k="",O=S.edgepaths.map(function(le,ie){return ie}),N=!0,_,U,Y,J,te,ae,ce=Math.abs(b[0][0]-b[2][0])*1e-4,Q=Math.abs(b[0][1]-b[2][1])*1e-4;function Z(le){return Math.abs(le[1]-b[0][1])<Q}function j(le){return Math.abs(le[1]-b[2][1])<Q}function K(le){return Math.abs(le[0]-b[0][0])<ce}function ee(le){return Math.abs(le[0]-b[2][0])<ce}function oe(le,ie){var he,me,Me,Te,Oe="";for(Z(le)&&!ee(le)||j(le)&&!K(le)?(Te=E.aaxis,Me=u(E,y,[le[0],ie[0]],.5*(le[1]+ie[1]))):(Te=E.baxis,Me=u(E,y,.5*(le[0]+ie[0]),[le[1],ie[1]])),he=1;he<Me.length;he++)for(Oe+=Te.smoothing?"C":"L",me=0;me<Me[he].length;me++){var Ne=Me[he][me];Oe+=[z.c2p(Ne[0]),I.c2p(Ne[1])]+" "}return Oe}for(B=0,_=null;O.length;){var q=S.edgepaths[B][0];for(_&&(k+=oe(_,q)),ae=L.smoothopen(S.edgepaths[B].map(a),S.smoothing),k+=N?ae:ae.replace(/^M/,"L"),O.splice(O.indexOf(B),1),_=S.edgepaths[B][S.edgepaths[B].length-1],J=-1,Y=0;Y<4;Y++){if(!_){A.log("Missing end?",B,S);break}for(Z(_)&&!ee(_)?U=b[1]:K(_)?U=b[0]:j(_)?U=b[3]:ee(_)&&(U=b[2]),te=0;te<S.edgepaths.length;te++){var $=S.edgepaths[te][0];Math.abs(_[0]-U[0])<ce?Math.abs(_[0]-$[0])<ce&&($[1]-_[1])*(U[1]-$[1])>=0&&(U=$,J=te):Math.abs(_[1]-U[1])<Q?Math.abs(_[1]-$[1])<Q&&($[0]-_[0])*(U[0]-$[0])>=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;B<S.paths.length;B++)k+=L.smoothclosed(S.paths[B].map(a),S.smoothing);return k}},64096:function(G,V,e){var m=e(50693),P=e(5386).fF,i=e(9012),L=e(99181),A=e(1426).extendFlat;G.exports=A({lon:L.lon,lat:L.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:L.text,hovertext:L.hovertext,hoverinfo:A({},i.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:P(),showlegend:A({},i.showlegend,{dflt:!1})},m("",{cLetter:"z",editTypeOverride:"calc"}))},85070:function(G,V,e){var m=e(92770),P=e(71828).isArrayOrTypedArray,i=e(50606).BADNUM,L=e(78803),A=e(71828)._;G.exports=function(p,t){for(var r=t._length,s=new Array(r),n=t.z,l=P(n)&&n.length,c=0;c<r;c++){var u=s[c]={},g=t.lon[c],f=t.lat[c];if(u.lonlat=m(g)&&m(f)?[+g,+f]:[i,i],l){var w=n[c];u.z=m(w)?w:i}}return L(p,t,{vals:l?n:[0,1],containerStr:"",cLetter:"z"}),r&&(s[0].t={labels:{lat:A(p,"lat:")+" ",lon:A(p,"lon:")+" "}}),s}},52414:function(G,V,e){var m=e(92770),P=e(71828),i=e(7901),L=e(21081),A=e(50606).BADNUM,v=e(18214).makeBlank;G.exports=function(t){var r=t[0].trace,s=r.visible===!0&&r._length!==0,n={layout:{visibility:"none"},paint:{}},l=r._opts={heatmap:n,geojson:v()};if(!s)return l;var c=[],u,g=r.z,f=r.radius,w=P.isArrayOrTypedArray(g)&&g.length,h=P.isArrayOrTypedArray(f);for(u=0;u<t.length;u++){var o=t[u],d=o.lonlat;if(d[0]!==A){var M={};if(w){var T=o.z;M.z=T!==A?T:0}h&&(M.r=m(f[u])&&f[u]>0?+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<x.length;u++)a.push(x[u][0],x[u][1]);var E=["interpolate",["linear"],["get","z"],C.min,0,C.max,1];return P.extendFlat(l.heatmap.paint,{"heatmap-weight":w?E:1/(C.max-C.min),"heatmap-color":a,"heatmap-radius":h?{type:"identity",property:"r"}:r.radius,"heatmap-opacity":r.opacity}),l.geojson={type:"FeatureCollection",features:c},l.heatmap.layout.visibility="visible",l}},79429:function(G,V,e){var m=e(71828),P=e(1586),i=e(64096);G.exports=function(A,v,p,t){function r(c,u){return m.coerce(A,v,i,c,u)}var s=r("lon")||[],n=r("lat")||[],l=Math.min(s.length,n.length);if(!l){v.visible=!1;return}v._length=l,r("z"),r("radius"),r("below"),r("text"),r("hovertext"),r("hovertemplate"),P(A,v,t,r,{prefix:"",cLetter:"z"})}},62474:function(G){G.exports=function(e,m){return e.lon=m.lon,e.lat=m.lat,e.z=m.z,e}},84684:function(G,V,e){var m=e(89298),P=e(28178).hoverPoints,i=e(28178).getExtraText;G.exports=function(A,v,p){var t=P(A,v,p);if(t){var r=t[0],s=r.cd,n=s[0].trace,l=s[r.index];if(delete r.color,"z"in l){var c=r.subplot.mockAxis;r.z=l.z,r.zLabel=m.tickText(c,c.c2l(l.z),"hover").text}return r.extraText=i(n,l,s[0].t.labels),[r]}}},93814:function(G,V,e){G.exports={attributes:e(64096),supplyDefaults:e(79429),colorbar:e(61243),formatLabels:e(15636),calc:e(85070),plot:e(7336),hoverPoints:e(84684),eventData:e(62474),getBelow:function(m,P){for(var i=P.getMapLayers(),L=0;L<i.length;L++){var A=i[L],v=A.id;if(A.type==="symbol"&&typeof v=="string"&&v.indexOf("plotly-")===-1)return v}},moduleType:"trace",name:"densitymapbox",basePlotModule:e(50101),categories:["mapbox","gl","showLegend"],meta:{hr_name:"density_mapbox"}}},7336:function(G,V,e){var m=e(52414),P=e(77734).traceLayerPrefix;function i(A,v){this.type="densitymapbox",this.subplot=A,this.uid=v,this.sourceId="source-"+v,this.layerList=[["heatmap",P+v+"-heatmap"]],this.below=null}var L=i.prototype;L.update=function(A){var v=this.subplot,p=this.layerList,t=m(A),r=v.belowLookup["trace-"+this.uid];v.map.getSource(this.sourceId).setData(t.geojson),r!==this.below&&(this._removeLayers(),this._addLayers(t,r),this.below=r);for(var s=0;s<p.length;s++){var n=p[s],l=n[0],c=n[1],u=t[l];v.setOptions(c,"setLayoutProperty",u.layout),u.layout.visibility==="visible"&&v.setOptions(c,"setPaintProperty",u.paint)}},L._addLayers=function(A,v){for(var p=this.subplot,t=this.layerList,r=this.sourceId,s=0;s<t.length;s++){var n=t[s],l=n[0],c=A[l];p.addLayer({type:l,id:n[1],source:r,layout:c.layout,paint:c.paint},v)}},L._removeLayers=function(){for(var A=this.subplot.map,v=this.layerList,p=v.length-1;p>=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<i.length;A++)i[A].i=A;m.mergeArray(L.text,i,"tx"),m.mergeArray(L.hovertext,i,"htx");var v=L.marker;if(v){m.mergeArray(v.opacity,i,"mo"),m.mergeArray(v.color,i,"mc");var p=v.line;p&&(m.mergeArray(p.color,i,"mlc"),m.mergeArrayCastPositive(p.width,i,"mlw"))}}},1285:function(G,V,e){var m=e(1486),P=e(82196).line,i=e(9012),L=e(12663).axisHoverFormat,A=e(5386).fF,v=e(5386).si,p=e(18517),t=e(1426).extendFlat,r=e(7901);G.exports={x:m.x,x0:m.x0,dx:m.dx,y:m.y,y0:m.y0,dy:m.dy,xperiod:m.xperiod,yperiod:m.yperiod,xperiod0:m.xperiod0,yperiod0:m.yperiod0,xperiodalignment:m.xperiodalignment,yperiodalignment:m.yperiodalignment,xhoverformat:L("x"),yhoverformat:L("y"),hovertext:m.hovertext,hovertemplate:A({},{keys:p.eventDataKeys}),hoverinfo:t({},i.hoverinfo,{flags:["name","x","y","text","percent initial","percent previous","percent total"]}),textinfo:{valType:"flaglist",flags:["label","text","percent initial","percent previous","percent total","value"],extras:["none"],editType:"plot",arrayOk:!1},texttemplate:v({editType:"plot"},{keys:p.eventDataKeys.concat(["label","value"])}),text:m.text,textposition:m.textposition,insidetextanchor:t({},m.insidetextanchor,{dflt:"middle"}),textangle:t({},m.textangle,{dflt:0}),textfont:m.textfont,insidetextfont:m.insidetextfont,outsidetextfont:m.outsidetextfont,constraintext:m.constraintext,cliponaxis:m.cliponaxis,orientation:t({},m.orientation,{}),offset:t({},m.offset,{arrayOk:!1}),width:t({},m.width,{arrayOk:!1}),marker:s(),connector:{fillcolor:{valType:"color",editType:"style"},line:{color:t({},P.color,{dflt:r.defaultLine}),width:t({},P.width,{dflt:0,editType:"plot"}),dash:P.dash,editType:"style"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:m.offsetgroup,alignmentgroup:m.alignmentgroup};function s(){var n=t({},m.marker);return delete n.pattern,n}},9532:function(G,V,e){var m=e(89298),P=e(42973),i=e(49789),L=e(66279),A=e(50606).BADNUM;G.exports=function(t,r){var s=m.getFromId(t,r.xaxis||"x"),n=m.getFromId(t,r.yaxis||"y"),l,c,u,g,f,w,h,o;r.orientation==="h"?(l=s.makeCalcdata(r,"x"),u=n.makeCalcdata(r,"y"),g=P(r,n,"y",u),f=!!r.yperiodalignment,w="y"):(l=n.makeCalcdata(r,"y"),u=s.makeCalcdata(r,"x"),g=P(r,s,"x",u),f=!!r.xperiodalignment,w="x"),c=g.vals;var d=Math.min(c.length,l.length),M=new Array(d);for(r._base=[],h=0;h<d;h++){l[h]<0&&(l[h]=A);var T=!1;l[h]!==A&&h+1<d&&l[h+1]!==A&&(T=!0),o=M[h]={p:c[h],s:l[h],cNext:T},r._base[h]=-.5*o.s,f&&(M[h].orig_p=u[h],M[h][w+"End"]=g.ends[h],M[h][w+"Start"]=g.starts[h]),r.ids&&(o.id=String(r.ids[h])),h===0&&(M[0].vTotal=0),M[0].vTotal+=v(o.s),o.begR=v(o.s)/v(M[0].s)}var C;for(h=0;h<d;h++)o=M[h],o.s!==A&&(o.sumR=o.s/M[0].vTotal,o.difR=C!==void 0?o.s/C:1,C=o.s);return i(M,r),L(M,r),M};function v(p){return p===A?0:p}},18517:function(G){G.exports={eventDataKeys:["percentInitial","percentPrevious","percentTotal"]}},8984:function(G,V,e){var m=e(11661).setGroupPositions;G.exports=function(i,L){var A=i._fullLayout,v=i._fullData,p=i.calcdata,t=L.xaxis,r=L.yaxis,s=[],n=[],l=[],c,u;for(u=0;u<v.length;u++){var g=v[u],f=g.orientation==="h";g.visible===!0&&g.xaxis===t._id&&g.yaxis===r._id&&g.type==="funnel"&&(c=p[u],f?l.push(c):n.push(c),s.push(c))}var w={mode:A.funnelmode,norm:A.funnelnorm,gap:A.funnelgap,groupgap:A.funnelgroupgap};for(m(i,t,r,n,w),m(i,r,t,l,w),u=0;u<s.length;u++){c=s[u];for(var h=0;h<c.length;h++)h+1<c.length&&(c[h].nextP0=c[h+1].p0,c[h].nextS0=c[h+1].s0,c[h].nextP1=c[h+1].p1,c[h].nextS1=c[h+1].s1)}}},26199:function(G,V,e){var m=e(71828),P=e(26125),i=e(90769).handleText,L=e(67513),A=e(73927),v=e(1285),p=e(7901);function t(n,l,c,u){function g(T,C){return m.coerce(n,l,v,T,C)}var f=L(n,l,u,g);if(!f){l.visible=!1;return}A(n,l,u,g),g("xhoverformat"),g("yhoverformat"),g("orientation",l.y&&!l.x?"v":"h"),g("offset"),g("width");var w=g("text");g("hovertext"),g("hovertemplate");var h=g("textposition");i(n,l,u,g,h,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),l.textposition!=="none"&&!l.texttemplate&&g("textinfo",Array.isArray(w)?"text+value":"value");var o=g("marker.color",c);g("marker.line.color",p.defaultLine),g("marker.line.width");var d=g("connector.visible");if(d){g("connector.fillcolor",r(o));var M=g("connector.line.width");M&&(g("connector.line.color"),g("connector.line.dash"))}}function r(n){var l=m.isArrayOrTypedArray(n)?"#000":n;return p.addOpacity(l,.5*p.opacity(l))}function s(n,l){var c,u;function g(w){return m.coerce(u._input,u,v,w)}if(l.funnelmode==="group")for(var f=0;f<n.length;f++)u=n[f],c=u._input,P(c,u,l,g)}G.exports={supplyDefaults:t,crossTraceDefaults:s}},34598:function(G){G.exports=function(e,m){return e.x="xVal"in m?m.xVal:m.x,e.y="yVal"in m?m.yVal:m.y,"percentInitial"in m&&(e.percentInitial=m.percentInitial),"percentPrevious"in m&&(e.percentPrevious=m.percentPrevious),"percentTotal"in m&&(e.percentTotal=m.percentTotal),m.xa&&(e.xaxis=m.xa),m.ya&&(e.yaxis=m.ya),e}},63341:function(G,V,e){var m=e(7901).opacity,P=e(95423).hoverOnBars,i=e(71828).formatPercent;G.exports=function(v,p,t,r,s){var n=P(v,p,t,r,s);if(n){var l=n.cd,c=l[0].trace,u=c.orientation==="h",g=n.index,f=l[g],w=u?"x":"y";n[w+"LabelVal"]=f.s,n.percentInitial=f.begR,n.percentInitialLabel=i(f.begR,1),n.percentPrevious=f.difR,n.percentPreviousLabel=i(f.difR,1),n.percentTotal=f.sumR,n.percentTotalLabel=i(f.sumR,1);var h=f.hi||c.hoverinfo,o=[];if(h&&h!=="none"&&h!=="skip"){var d=h==="all",M=h.split("+"),T=function(C){return d||M.indexOf(C)!==-1};T("percent initial")&&o.push(n.percentInitialLabel+" of initial"),T("percent previous")&&o.push(n.percentPreviousLabel+" of previous"),T("percent total")&&o.push(n.percentTotalLabel+" of total")}return n.extraText=o.join("<br>"),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<A.length;t++){var r=A[t];if(r.visible&&r.type==="funnel"){v=!0;break}}v&&(p("funnelmode"),p("funnelgap",.2),p("funnelgroupgap"))}},80461:function(G,V,e){var m=e(39898),P=e(71828),i=e(91424),L=e(50606).BADNUM,A=e(17295),v=e(72597).clearMinTextSize;G.exports=function(n,l,c,u){var g=n._fullLayout;v("funnel",g),p(n,l,c,u),t(n,l,c,u),A.plot(n,l,c,u,{mode:g.funnelmode,norm:g.funnelmode,gap:g.funnelgap,groupgap:g.funnelgroupgap})};function p(s,n,l,c){var u=n.xaxis,g=n.yaxis;P.makeTraceGroups(c,l,"trace bars").each(function(f){var w=m.select(this),h=f[0].trace,o=P.ensureSingle(w,"g","regions");if(!h.connector||!h.connector.visible){o.remove();return}var d=h.orientation==="h",M=o.selectAll("g.region").data(P.identity);M.enter().append("g").classed("region",!0),M.exit().remove();var T=M.size();M.each(function(C,x){if(!(x!==T-1&&!C.cNext)){var S=r(C,u,g,d),b=S[0],a=S[1],E="";b[0]!==L&&a[0]!==L&&b[1]!==L&&a[1]!==L&&b[2]!==L&&a[2]!==L&&b[3]!==L&&a[3]!==L&&(d?E+="M"+b[0]+","+a[1]+"L"+b[2]+","+a[2]+"H"+b[3]+"L"+b[1]+","+a[1]+"Z":E+="M"+b[1]+","+a[1]+"L"+b[2]+","+a[3]+"V"+a[2]+"L"+b[1]+","+a[0]+"Z"),E===""&&(E="M0,0Z"),P.ensureSingle(m.select(this),"path").attr("d",E).call(i.setClipUrl,n.layerClipId,s)}})})}function t(s,n,l,c){var u=n.xaxis,g=n.yaxis;P.makeTraceGroups(c,l,"trace bars").each(function(f){var w=m.select(this),h=f[0].trace,o=P.ensureSingle(w,"g","lines");if(!h.connector||!h.connector.visible||!h.connector.line.width){o.remove();return}var d=h.orientation==="h",M=o.selectAll("g.line").data(P.identity);M.enter().append("g").classed("line",!0),M.exit().remove();var T=M.size();M.each(function(C,x){if(!(x!==T-1&&!C.cNext)){var S=r(C,u,g,d),b=S[0],a=S[1],E="";b[3]!==void 0&&a[3]!==void 0&&(d?(E+="M"+b[0]+","+a[1]+"L"+b[2]+","+a[2],E+="M"+b[1]+","+a[1]+"L"+b[3]+","+a[2]):(E+="M"+b[1]+","+a[1]+"L"+b[2]+","+a[3],E+="M"+b[1]+","+a[0]+"L"+b[2]+","+a[2])),E===""&&(E="M0,0Z"),P.ensureSingle(m.select(this),"path").attr("d",E).call(i.setClipUrl,n.layerClipId,s)}})})}function r(s,n,l,c){var u=[],g=[],f=c?n:l,w=c?l:n;return u[0]=f.c2p(s.s0,!0),g[0]=w.c2p(s.p0,!0),u[1]=f.c2p(s.s1,!0),g[1]=w.c2p(s.p1,!0),u[2]=f.c2p(s.nextS0,!0),g[2]=w.c2p(s.nextP0,!0),u[3]=f.c2p(s.nextS1,!0),g[3]=w.c2p(s.nextP1,!0),c?[u,g]:[g,u]}},68266:function(G,V,e){var m=e(39898),P=e(91424),i=e(7901),L=e(37822).DESELECTDIM,A=e(16688),v=e(72597).resizeText,p=A.styleTextPoints;function t(r,s,n){var l=n||m.select(r).selectAll("g.funnellayer").selectAll("g.trace");v(r,l,"funnel"),l.style("opacity",function(c){return c[0].trace.opacity}),l.each(function(c){var u=m.select(this),g=c[0].trace;u.selectAll(".point > 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;k<j.length-1;k++)if(Math.abs(j[k+1]-j[k]-K)>ee)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<w;h++){var o=g[h];o!==l&&f.push(o)}return f}function u(g,f,w){for(var h=[],o=-1,d=0;d<w.length;d++)if(f[d]!==l){o++,h[o]=[];for(var M=0;M<w[d].length;M++)g[M]!==l&&h[o].push(w[d][M])}return h}},4742:function(G,V,e){var m=e(92770),P=e(71828),i=e(50606).BADNUM;G.exports=function(A,v,p,t){var r,s,n,l,c,u;function g(M){if(m(M))return+M}if(v&&v.transpose){for(r=0,c=0;c<A.length;c++)r=Math.max(r,A[c].length);if(r===0)return!1;n=function(M){return M.length},l=function(M,T,C){return(M[C]||[])[T]}}else r=A.length,n=function(M,T){return M[T].length},l=function(M,T,C){return(M[T]||[])[C]};var f=function(M,T,C){return T===i||C===i?i:l(M,T,C)};function w(M){if(v&&v.type!=="carpet"&&v.type!=="contourcarpet"&&M&&M.type==="category"&&v["_"+M._id.charAt(0)].length){var T=M._id.charAt(0),C={},x=v["_"+T+"CategoryMap"]||v[T];for(c=0;c<x.length;c++)C[x[c]]=c;return function(S){var b=C[M._categories[S]];return b+1?b:i}}else return P.identity}var h=w(p),o=w(t);t&&t.type==="category"&&(r=t._categories.length);var d=new Array(r);for(c=0;c<r;c++)for(p&&p.type==="category"?s=p._categories.length:s=n(A,c),d[c]=new Array(s),u=0;u<s;u++)d[c][u]=g(f(A,o(c),h(u)));return d}},61243:function(G){G.exports={min:"zmin",max:"zmax"}},68296:function(G,V,e){var m=e(71828),P=e(50606).BADNUM,i=e(42973);G.exports=function(A,v,p,t,r,s){var n=A._length,l=v.makeCalcdata(A,t),c=p.makeCalcdata(A,r);l=i(A,v,t,l).vals,c=i(A,p,r,c).vals;var u=A.text,g=u!==void 0&&m.isArray1D(u),f=A.hovertext,w=f!==void 0&&m.isArray1D(f),h,o,d=m.distinctVals(l),M=d.vals,T=m.distinctVals(c),C=T.vals,x=[],S,b,a=C.length,E=M.length;for(h=0;h<s.length;h++)x[h]=m.init2dArray(a,E);g&&(S=m.init2dArray(a,E)),w&&(b=m.init2dArray(a,E));var y=m.init2dArray(a,E);for(h=0;h<n;h++)if(l[h]!==P&&c[h]!==P){var z=m.findBin(l[h]+d.minDiff/2,M),I=m.findBin(c[h]+T.minDiff/2,C);for(o=0;o<s.length;o++){var B=s[o],k=A[B],O=x[o];O[I][z]=k[h],y[I][z]=h}g&&(S[I][z]=u[h]),w&&(b[I][z]=f[h])}for(A["_"+t]=M,A["_"+r]=C,o=0;o<s.length;o++)A["_"+s[o]]=x[o];g&&(A._text=S),w&&(A._hovertext=b),v&&v.type==="category"&&(A["_"+t+"CategoryMap"]=M.map(function(N){return v._categories[N]})),p&&p.type==="category"&&(A["_"+r+"CategoryMap"]=C.map(function(N){return p._categories[N]})),A._after2before=y}},76382:function(G,V,e){var m=e(71828),P=e(67684),i=e(58623),L=e(73927),A=e(49901),v=e(1586),p=e(21606);G.exports=function(r,s,n,l){function c(g,f){return m.coerce(r,s,p,g,f)}var u=P(r,s,c,l);if(!u){s.visible=!1;return}L(r,s,l,c),c("xhoverformat"),c("yhoverformat"),c("text"),c("hovertext"),c("hovertemplate"),i(c,l),A(r,s,c,l),c("hoverongaps"),c("connectgaps",m.isArray1D(s.z)&&s.zsmooth!==!1),v(r,s,l,c,{prefix:"",cLetter:"z"})}},43907:function(G,V,e){var m=e(71828).maxRowLength;G.exports=function(i){var L=[],A={},v=[],p=i[0],t=[],r=[0,0,0],s=m(i),n,l,c,u,g,f,w,h;for(l=0;l<i.length;l++)for(n=t,t=p,p=i[l+1]||[],c=0;c<s;c++)t[c]===void 0&&(f=(t[c-1]!==void 0?1:0)+(t[c+1]!==void 0?1:0)+(n[c]!==void 0?1:0)+(p[c]!==void 0?1:0),f?(l===0&&f++,c===0&&f++,l===i.length-1&&f++,c===t.length-1&&f++,f<4&&(A[[l,c]]=[l,c,f]),L.push([l,c,f])):v.push([l,c]));for(;v.length;){for(w={},h=!1,g=v.length-1;g>=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;y<f.length;y++)C.push((f[y]+f[y-1])/2);for(C.push([2*f[f.length-1]-f[f.length-2]]),x=[2*w[0]-w[1]],y=1;y<w.length;y++)x.push((w[y]+w[y-1])/2);x.push([2*w[w.length-1]-w[w.length-2]])}a=Math.max(0,Math.min(C.length-2,P.findBin(p,C))),E=Math.max(0,Math.min(x.length-2,P.findBin(t,x)))}var z=u.c2p(f[a]),I=u.c2p(f[a+1]),B=g.c2p(w[E]),k=g.c2p(w[E+1]),O,N;n?(O=l.orig_x||f,N=l.orig_y||w,I=z,S=O[a],k=B,b=N[E]):(O=l.orig_x||o||f,N=l.orig_y||d||w,S=o?O[a]:(O[a]+O[a+1])/2,b=d?N[E]:(N[E]+N[E+1])/2,u&&u.type==="category"&&(S=f[a]),g&&g.type==="category"&&(b=w[E]),c.zsmooth&&(z=I=u.c2p(S),B=k=g.c2p(b)));var _=h[E][a];if(M&&!M[E][a]&&(_=void 0),!(_===void 0&&!c.hoverongaps)){var U;Array.isArray(l.hovertext)&&Array.isArray(l.hovertext[E])?U=l.hovertext[E][a]:Array.isArray(l.text)&&Array.isArray(l.text[E])&&(U=l.text[E][a]);var Y=L(c),J={type:"linear",range:[Y.min,Y.max],hoverformat:T,_separators:u._separators,_numFormat:u._numFormat},te=i.tickText(J,_,"hover").text;return[P.extendFlat(v,{index:c._after2before?c._after2before[E][a]:[E,a],distance:v.maxHoverDistance,spikeDistance:v.maxSpikeDistance,x0:z,x1:I,y0:B,y1:k,xLabelVal:S,yLabelVal:b,zLabelVal:_,zLabel:te,text:U})]}}},92165:function(G,V,e){G.exports={attributes:e(21606),supplyDefaults:e(76382),calc:e(90757),plot:e(50347),colorbar:e(61243),style:e(70035),hoverPoints:e(46248),moduleType:"trace",name:"heatmap",basePlotModule:e(93612),categories:["cartesian","svg","2dMap","showLegend"],meta:{}}},824:function(G,V,e){var m=e(71828),P=.01,i=[[-1,0],[1,0],[0,-1],[0,1]];function L(v){return .5-.25*Math.min(1,v*.5)}G.exports=function(p,t){var r=1,s;for(A(p,t),s=0;s<t.length&&!(t[s][2]<4);s++);for(t=t.slice(s),s=0;s<100&&r>P;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;c<p.length;c++){for(s=p[c],n=s[0],l=s[1],d=v[n][l],o=0,h=0,u=0;u<4;u++)g=i[u],f=v[n+g[0]],f&&(w=f[l+g[1]],w!==void 0&&(o===0?M=T=w:(M=Math.min(M,w),T=Math.max(T,w)),h++,o+=w));if(h===0)throw"iterateInterp2d order is wrong: no defined neighbors";v[n][l]=o/h,d===void 0?h<4&&(r=1):(v[n][l]=(1+t)*v[n][l]-t*d,T>M&&(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;f<h;f++)s.push((A[f-1]+A[f])*.5);s.push(1.5*A[h-1]-.5*A[h-2])}if(h<t){var o=s[s.length-1],d=o-s[s.length-2];for(f=h;f<t;f++)o+=d,s.push(o)}}else return n?A.slice(0,t):A.slice(0,t+1)}else{var M=L[r._id.charAt(0)+"calendar"];if(l)u=r.r2c(v,0,M);else if(P(A)&&A.length===1)u=A[0];else if(v===void 0)u=0;else{var T=r.type==="log"?r.d2c:r.r2c;u=T(v,0,M)}for(g=p||1,f=n||c?0:-.5;f<t;f++)s.push(u+g*f)}return s}},50347:function(G,V,e){var m=e(39898),P=e(84267),i=e(73972),L=e(91424),A=e(89298),v=e(71828),p=e(63893),t=e(8225),r=e(7901),s=e(21081).extractOpts,n=e(21081).makeColorScaleFuncFromTrace,l=e(77922),c=e(18783),u=c.LINE_SPACING,g=e(3883),f=e(32396).STYLE,w="heatmap-label";function h(C){return C.selectAll("g."+w)}function o(C){h(C).remove()}G.exports=function(C,x,S,b){var a=x.xaxis,E=x.yaxis;v.makeTraceGroups(b,S,"hm").each(function(y){var z=m.select(this),I=y[0],B=I.trace,k=B.xgap||0,O=B.ygap||0,N=I.z,_=I.x,U=I.y,Y=I.xCenter,J=I.yCenter,te=i.traceIs(B,"contour"),ae=te?"best":B.zsmooth,ce=N.length,Q=v.maxRowLength(N),Z=!1,j=!1,K,ee,oe,q,$,le,ie,he;for(le=0;K===void 0&&le<_.length-1;)K=a.c2p(_[le]),le++;for(le=_.length-1;ee===void 0&&le>0;)ee=a.c2p(_[le]),le--;for(ee<K&&(oe=ee,ee=K,K=oe,Z=!0),le=0;q===void 0&&le<U.length-1;)q=E.c2p(U[le]),le++;for(le=U.length-1;$===void 0&&le>0;)$=E.c2p(U[le]),le--;$<q&&(oe=q,q=$,$=oe,j=!0),te&&(Y=_,J=U,_=I.xfill,U=I.yfill);var me="default";if(ae?me=ae==="best"?"smooth":"fast":B._islinear&&k===0&&O===0&&g()&&(me="fast"),me!=="fast"){var Me=ae==="best"?0:.5;K=Math.max(-Me*a._length,K),ee=Math.min((1+Me)*a._length,ee),q=Math.max(-Me*E._length,q),$=Math.min((1+Me)*E._length,$)}var Te=Math.round(ee-K),Oe=Math.round($-q),Ne=K>=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;le<Le.length;le++)ot[le]=Math.round(a.c2p(Le[le])-K);for(le=0;le<Be.length;le++)at[le]=Math.round(E.c2p(Be[le])-q);for(le=0;le<Te;le++)wt[le]=It(le,ot);for(ie=0;ie<Oe;ie++)for(Gt=Bt(ie,at),Lt=N[Gt.bin0],Kt=N[Gt.bin1],le=0;le<Te;le++,se+=4)ze=be(Lt,Kt,wt[le],Gt),T(ye,se,ze)}else for(ie=0;ie<ce;ie++)for(Ie=N[ie],$e=nt(ie),le=0;le<Q;le++)ze=Pe(Ie[le],1),se=($e*Q+Ge(le))*4,T(ye,se,ze);var ir=He.createImageData(xe,Se);try{ir.data.set(ye)}catch{var _r=ir.data,yt=_r.length;for(ie=0;ie<yt;ie++)_r[ie]=ye[ie]}He.putImageData(ir,0,0)}else{var jt=Math.floor(k/2),Yt=Math.floor(O/2);for(ie=0;ie<ce;ie++)if(Ie=N[ie],$e.reverse(),$e[ct]=nt(ie+1),!($e[0]===$e[1]||$e[0]===void 0||$e[1]===void 0))for(Je=Ge(0),Vt=[Je,Je],le=0;le<Q;le++)Vt.reverse(),Vt[et]=Ge(le+1),!(Vt[0]===Vt[1]||Vt[0]===void 0||Vt[1]===void 0)&&(De=Ie[le],ze=Pe(De,(Vt[1]-Vt[0])*($e[1]-$e[0])),He.fillStyle="rgba("+ze.join(",")+")",He.fillRect(Vt[0]+jt,$e[0]+Yt,Vt[1]-Vt[0]-k,$e[1]-$e[0]-O))}pt=Math.round(pt/dt),At=Math.round(At/dt),Mt=Math.round(Mt/dt);var br=P("rgb("+pt+","+At+","+Mt+")");C._hmpixcount=(C._hmpixcount||0)+dt,C._hmlumcount=(C._hmlumcount||0)+dt*br.getLuminance();var hr=z.selectAll("image").data(y);hr.enter().append("svg:image").attr({xmlns:l.svg,preserveAspectRatio:"none"}),hr.attr({height:Oe,width:Te,x:K,y:q,"xlink:href":Ue.toDataURL("image/png")}),me==="fast"&&!ae&&hr.attr("style",f),o(z);var ut=B.texttemplate;if(ut){var lt=s(B),xt={type:"linear",range:[lt.min,lt.max],_separators:a._separators,_numFormat:a._numFormat},Tt=B.type==="histogram2dcontour",Ct=B.type==="contour",St=Ct?1:0,_t=Ct?ce-1:ce,Ht=Ct?1:0,$t=Ct?Q-1:Q,Qt=[];for(le=St;le<_t;le++){var or;if(Ct)or=I.y[le];else if(Tt){if(le===0||le===ce-1)continue;or=I.y[le]}else if(I.yCenter)or=I.yCenter[le];else{if(le+1===ce&&I.y[le+1]===void 0)continue;or=(I.y[le]+I.y[le+1])/2}var Er=Math.round(E.c2p(or));if(!(0>Er||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("<br>"),rr=lr.length,zt=0;for(he=0;he<rr;he++)zt=Math.max(zt,lr[he].length);Qt.push({l:rr,c:zt,t:nr,x:We,y:Er,z:Ft})}}}}var fr=B.textfont,dr=fr.family,pr=fr.size,vr=C._fullLayout.font.size;if(!pr||pr==="auto"){var Hr=1/0,Ir=1/0,kr=0,pn=0;for(he=0;he<Qt.length;he++){var jr=Qt[he];if(kr=Math.max(kr,jr.l),pn=Math.max(pn,jr.c),he<Qt.length-1){var In=Qt[he+1],Dn=Math.abs(In.x-jr.x),xr=Math.abs(In.y-jr.y);Dn&&(Hr=Math.min(Hr,Dn)),xr&&(Ir=Math.min(Ir,xr))}}!isFinite(Hr)||!isFinite(Ir)?pr=vr:(Hr-=k,Ir-=O,Hr/=pn,Ir/=kr,Hr/=u/2,Ir/=u,pr=Math.min(Math.floor(Hr),Math.floor(Ir),vr))}if(pr<=0||!isFinite(pr))return;var Ar=function(qr){return qr.x},Or=function(qr){return qr.y-pr*(qr.l*u/2-1)},Nr=h(z).data(Qt);Nr.enter().append("g").classed(w,1).append("text").attr("text-anchor","middle").each(function(qr){var vn=m.select(this),fn=fr.color;(!fn||fn==="auto")&&(fn=r.contrast("rgba("+Fe(qr.z).join()+")")),vn.attr("data-notex",1).call(p.positionText,Ar(qr),Or(qr)).call(L.font,dr,pr,fn).text(qr.t).call(p.convertToTspans,C)})}})};function d(C,x){var S=x.length-2,b=v.constrain(v.findBin(C,x),0,S),a=x[b],E=x[b+1],y=v.constrain(b+(C-a)/(E-a)-.5,0,S),z=Math.round(y),I=Math.abs(y-z);return!y||y===S||!I?{bin0:z,bin1:z,frac:0}:{bin0:z,frac:I,bin1:Math.round(z+I/(y-z))}}function M(C,x){var S=x.length-1,b=v.constrain(v.findBin(C,x),0,S),a=x[b],E=x[b+1],y=(C-a)/(E-a)||0;return y<=0?{bin0:b,bin1:b,frac:0}:y<.5?{bin0:b,bin1:b+1,frac:y}:{bin0:b+1,bin1:b,frac:1-y}}function T(C,x,S){C[x]=S[0],C[x+1]=S[1],C[x+2]=S[2],C[x+3]=Math.round(S[3]*255)}},70035:function(G,V,e){var m=e(39898);G.exports=function(i){m.select(i).selectAll(".hm image").style("opacity",function(L){return L.trace.opacity})}},49901:function(G){G.exports=function(e,m,P){var i=P("zsmooth");i===!1&&(P("xgap"),P("ygap")),P("zhoverformat")}},67684:function(G,V,e){var m=e(92770),P=e(71828),i=e(73972);G.exports=function(p,t,r,s,n,l){var c=r("z");n=n||"x",l=l||"y";var u,g;if(c===void 0||!c.length)return 0;if(P.isArray1D(p.z)){u=r(n),g=r(l);var f=P.minRowLength(u),w=P.minRowLength(g);if(f===0||w===0)return 0;t._length=Math.min(f,w,c.length)}else{if(u=L(n,r),g=L(l,r),!A(c))return 0;r("transpose"),t._length=null}if(p.type==="heatmapgl")return!0;var h=i.getComponentMethod("calendars","handleTraceDefaults");return h(p,t,[n,l],s),!0};function L(v,p){var t=p(v),r=t?p(v+"type","array"):"scaled";return r==="scaled"&&(p(v+"0"),p("d"+v)),t}function A(v){for(var p=!0,t=!1,r=!1,s,n=0;n<v.length;n++){if(s=v[n],!P.isArrayOrTypedArray(s)){p=!1;break}s.length>0&&(t=!0);for(var l=0;l<s.length;l++)if(m(s[l])){r=!0;break}}return p&&t&&r}},16063:function(G,V,e){for(var m=e(21606),P=e(50693),i=e(1426).extendFlat,L=e(30962).overrideAll,A=["z","x","x0","dx","y","y0","dy","text","transpose","xtype","ytype"],v={},p=0;p<A.length;p++){var t=A[p];v[t]=m[t]}v.zsmooth={valType:"enumerated",values:["fast",!1],dflt:"fast",editType:"calc"},i(v,P("",{cLetter:"z",autoColorDflt:!1})),G.exports=L(v,"calc","nested")},59560:function(G,V,e){var m=e(9330).gl_heatmap2d,P=e(89298),i=e(78614);function L(t,r){this.scene=t,this.uid=r,this.type="heatmapgl",this.name="",this.hoverinfo="all",this.xData=[],this.yData=[],this.zData=[],this.textLabels=[],this.idToIndex=[],this.bounds=[0,0,0,0],this.options={zsmooth:"fast",z:[],x:[],y:[],shape:[0,0],colorLevels:[0],colorValues:[0,0,0,1]},this.heatmap=m(t.glplot,this.options),this.heatmap._trace=this}var A=L.prototype;A.handlePick=function(t){var r=this.options,s=r.shape,n=t.pointId,l=n%s[0],c=Math.floor(n/s[0]),u=n;return{trace:this,dataCoord:t.dataCoord,traceCoord:[r.x[l],r.y[c],r.z[u]],textLabel:this.textLabels[n],name:this.name,pointIndex:[c,l],hoverinfo:this.hoverinfo}},A.update=function(t,r){var s=r[0];this.index=t.index,this.name=t.name,this.hoverinfo=t.hoverinfo;var n=s.z;this.options.z=[].concat.apply([],n);var l=n[0].length,c=n.length;this.options.shape=[l,c],this.options.x=s.x,this.options.y=s.y,this.options.zsmooth=t.zsmooth;var u=v(t);this.options.colorLevels=u.colorLevels,this.options.colorValues=u.colorValues,this.textLabels=[].concat.apply([],t.text),this.heatmap.update(this.options);var g=this.scene.xaxis,f=this.scene.yaxis,w,h;t.zsmooth===!1&&(w={ppad:s.x[1]-s.x[0]},h={ppad:s.y[1]-s.y[0]}),t._extremes[g._id]=P.findExtremes(g,s.x,w),t._extremes[f._id]=P.findExtremes(f,s.y,h)},A.dispose=function(){this.heatmap.dispose()};function v(t){for(var r=t.colorscale,s=t.zmin,n=t.zmax,l=r.length,c=new Array(l),u=new Array(4*l),g=0;g<l;g++){var f=r[g],w=i(f[1]);c[g]=s+f[0]*(n-s);for(var h=0;h<4;h++)u[4*g+h]=w[h]}return{colorLevels:c,colorValues:u}}function p(t,r,s){var n=new L(t,r.uid);return n.update(r,s),n}G.exports=p},19600:function(G,V,e){var m=e(71828),P=e(67684),i=e(1586),L=e(16063);G.exports=function(v,p,t,r){function s(l,c){return m.coerce(v,p,L,l,c)}var n=P(v,p,s,r);if(!n){p.visible=!1;return}s("text"),s("zsmooth"),i(v,p,r,s,{prefix:"",cLetter:"z"})}},3325:function(G,V,e){G.exports={attributes:e(16063),supplyDefaults:e(19600),colorbar:e(61243),calc:e(90757),plot:e(59560),moduleType:"trace",name:"heatmapgl",basePlotModule:e(4796),categories:["gl","gl2d","2dMap"],meta:{}}},7745:function(G,V,e){var m=e(1486),P=e(12663).axisHoverFormat,i=e(5386).fF,L=e(5386).si,A=e(41940),v=e(17656),p=e(72406),t=e(1426).extendFlat;G.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},xhoverformat:P("x"),yhoverformat:P("y"),text:t({},m.text,{}),hovertext:t({},m.hovertext,{}),orientation:m.orientation,histfunc:{valType:"enumerated",values:["count","sum","avg","min","max"],dflt:"count",editType:"calc"},histnorm:{valType:"enumerated",values:["","percent","probability","density","probability density"],dflt:"",editType:"calc"},cumulative:{enabled:{valType:"boolean",dflt:!1,editType:"calc"},direction:{valType:"enumerated",values:["increasing","decreasing"],dflt:"increasing",editType:"calc"},currentbin:{valType:"enumerated",values:["include","exclude","half"],dflt:"include",editType:"calc"},editType:"calc"},nbinsx:{valType:"integer",min:0,dflt:0,editType:"calc"},xbins:v("x",!0),nbinsy:{valType:"integer",min:0,dflt:0,editType:"calc"},ybins:v("y",!0),autobinx:{valType:"boolean",dflt:null,editType:"calc"},autobiny:{valType:"boolean",dflt:null,editType:"calc"},bingroup:{valType:"string",dflt:"",editType:"calc"},hovertemplate:i({},{keys:p.eventDataKeys}),texttemplate:L({arrayOk:!1,editType:"plot"},{keys:["label","value"]}),textposition:t({},m.textposition,{arrayOk:!1}),textfont:A({arrayOk:!1,editType:"plot",colorEditType:"style"}),outsidetextfont:A({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextfont:A({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextanchor:m.insidetextanchor,textangle:m.textangle,cliponaxis:m.cliponaxis,constraintext:m.constraintext,marker:m.marker,offsetgroup:m.offsetgroup,alignmentgroup:m.alignmentgroup,selected:m.selected,unselected:m.unselected,_deprecated:{bardir:m._deprecated.bardir}}},42174:function(G){G.exports=function(e,m){for(var P=e.length,i=0,L=0;L<P;L++)m[L]?(e[L]/=m[L],i+=e[L]):e[L]=null;return i}},17656:function(G){G.exports=function(e,m){return{start:{valType:"any",editType:"calc"},end:{valType:"any",editType:"calc"},size:{valType:"any",editType:"calc"},editType:"calc"}}},59575:function(G,V,e){var m=e(92770);G.exports={count:function(P,i,L){return L[P]++,1},sum:function(P,i,L,A){var v=A[i];return m(v)?(v=Number(v),L[P]+=v,v):0},avg:function(P,i,L,A,v){var p=A[i];return m(p)&&(p=Number(p),L[P]+=p,v[P]++),0},min:function(P,i,L,A){var v=A[i];if(m(v))if(v=Number(v),m(L[P])){if(L[P]>v){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]<v){var p=v-L[P];return L[P]=v,p}}else return L[P]=v,v;return 0}}},40965:function(G,V,e){var m=e(50606),P=m.ONEAVGYEAR,i=m.ONEAVGMONTH,L=m.ONEDAY,A=m.ONEHOUR,v=m.ONEMIN,p=m.ONESEC,t=e(89298).tickIncrement;G.exports=function(u,g,f,w,h){var o=-1.1*g,d=-.1*g,M=u-d,T=f[0],C=f[1],x=Math.min(r(T+d,T+M,w,h),r(C+d,C+M,w,h)),S=Math.min(r(T+o,T+d,w,h),r(C+o,C+d,w,h)),b,a;if(x>S&&S<Math.abs(C-T)/4e3?(b=x,a=!1):(b=Math.min(x,S),a=!0),w.type==="date"&&b>L){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(O<z){var N=t(O,y,!1,h);(O+N)/2<z+u&&(O=N)}return I&&a?t(O,y,!0,h):O}}return function(z,I){var B=b*Math.round(z/b);return B+b/10<z&&B+b*.9<z+u&&(B+=b),I&&a&&(B-=b),B}};function r(c,u,g,f){if(c*u<=0)return 1/0;for(var w=Math.abs(u-c),h=g.type==="date",o=s(w,h),d=0;d<10;d++){var M=s(o*80,h);if(o===M)break;if(n(M,c,u,h,g,f))o=M;else break}return o}function s(c,u){return u&&c>p?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<te&&w.length<1e6&&(J=L.tickIncrement(S,a.size,!1,C),w.push((S+J)/2),h.push(Q),O.push([]),z.push(S),Y&&B.push(1/(J-S)),K&&k.push(0),!(J<=S));)S=J;z.push(S),!y&&d.type==="date"&&(I={start:ee(I.start),end:ee(I.end),size:I.size}),g._fullLayout._roundFnOpts||(g._fullLayout._roundFnOpts={});var q=f["_"+M+"bingroup"],$={leftGap:1/0,rightGap:1/0};q&&(g._fullLayout._roundFnOpts[q]||(g._fullLayout._roundFnOpts[q]=$),$=g._fullLayout._roundFnOpts[q]);var le=h.length,ie=!0,he=$.leftGap,me=$.rightGap,Me={};for(S=0;S<E.length;S++){var Te=E[S];ae=P.findBin(Te,I),ae>=0&&ae<le&&(N+=Z(ae,S,h,oe,k),ie&&O[ae].length&&Te!==E[O[ae][0]]&&(ie=!1),O[ae].push(S),Me[S]=ae,he=Math.min(he,Te-z[ae]),me=Math.min(me,z[ae+1]-Te))}$.leftGap=he,$.rightGap=me;var Oe;ie||(Oe=function(He,Fe){return function(){var Ge=g._fullLayout._roundFnOpts[q];return r(Ge.leftGap,Ge.rightGap,z,d,C)(He,Fe)}}),K&&(N=t(h,k)),j&&j(h,N,B),x.enabled&&u(h,x.direction,x.currentbin);var Ne=Math.min(w.length,h.length),Ee=[],xe=0,Se=Ne-1;for(S=0;S<Ne;S++)if(h[S]){xe=S;break}for(S=Ne-1;S>=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<b.length;S++)if(a=b[S],a.visible){var te=C.dirs[S];y=a["_"+te+"pos0"]=w.makeCalcdata(a,te),_=P.concat(_,y),delete a["_"+h+"autoBinFinished"],f.visible===!0&&(U?U=!1:(delete a._autoBin,a["_"+h+"autoBinFinished"]=1),i.traceIs(a,"2dMap")&&(Y=!0),a.type==="histogram2dcontour"&&(J=!0))}E=b[0][h+"calendar"];var ae=L.autoBin(_,w,C.nbins,Y,E,C.sizeFound&&C.size),ce=b[0]._autoBin={};if(z=ce[C.dirs[0]]={},J&&(C.size||(ae.start=k(L.tickIncrement(B(ae.start),ae.size,!0,E))),C.end===void 0&&(ae.end=k(L.tickIncrement(B(ae.end),ae.size,!1,E)))),x&&!i.traceIs(f,"2dMap")&&ae._dataSpan===0&&w.type!=="category"&&w.type!=="multicategory"&&f.bingroup===""&&typeof f.xbins>"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<M.length;S++)if(b=M[S],b===f)T=!0;else if(!T)a=d._histogramBinOpts[b["_"+h+"bingroup"]],C=Math.min(C,a.size||b[o].size);else{var E=n(g,b,w,h,!0),y=E[0],z=E[2];b["_"+h+"autoBinFinished"]=1,b["_"+h+"pos0"]=E[1],z?x.push(b):C=Math.min(C,y.size)}var I=new Array(x.length);for(S=0;S<x.length;S++)for(var B=x[S]["_"+h+"pos0"],k=0;k<B.length;k++)if(B[k]!==void 0){I[S]=B[k];break}for(isFinite(C)||(C=P.distinctVals(I).minDiff),S=0;S<x.length;S++){b=x[S];var O=b[h+"calendar"],N={start:w.c2r(I[S]-C/2,0,O),end:w.c2r(I[S]+C/2,0,O),size:C};b._input[o]=b[o]=N,a=d._histogramBinOpts[b["_"+h+"bingroup"]],a&&P.extendFlat(a,N)}return f[o]}function c(g,f){for(var w=f.xaxis,h=f.yaxis,o=f.orientation,d=[],M=g._fullData,T=0;T<M.length;T++){var C=M[T];C.type==="histogram"&&C.visible===!0&&C.orientation===o&&C.xaxis===w&&C.yaxis===h&&d.push(C)}return d}function u(g,f,w){var h,o,d;function M(C){d=g[C],g[C]/=2}function T(C){o=g[C],g[C]=d+o/2,d+=o}if(w==="half")if(f==="increasing")for(M(0),h=1;h<g.length;h++)T(h);else for(M(g.length-1),h=g.length-2;h>=0;h--)T(h);else if(f==="increasing"){for(h=1;h<g.length;h++)g[h]+=g[h-1];w==="exclude"&&(g.unshift(0),g.pop())}else{for(h=g.length-2;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;d<s.length;d++)f=s[d],i(f,"histogram")&&(c.push(f),delete f._xautoBinFinished,delete f._yautoBinFinished,i(f,"2dMap")||L(f._input,f,n,C));var a=n._alignmentOpts||{};for(d=0;d<c.length;d++){if(f=c[d],h="",!i(f,"2dMap")){if(o=x(f),n.barmode==="group"&&f.alignmentgroup){var E=f[o+"axis"],y=v(n,E)+f.orientation;(a[y]||{})[f.alignmentgroup]&&(h=y)}!h&&n.barmode!=="overlay"&&(h=v(n,f.xaxis)+v(n,f.yaxis)+x(f))}h?(u[h]||(u[h]=[]),u[h].push(f)):g.push(f)}for(h in u){if(w=u[h],w.length===1){g.push(w[0]);continue}var z=!1;for(w.length&&(f=w[0],z=C("bingroup")),h=z||h,d=0;d<w.length;d++){f=w[d];var I=f._input.bingroup;I&&I!==h&&m.warn(["Trace",f.index,"must match","within bingroup",h+".","Ignoring its bingroup:",I,"setting."].join(" ")),f.bingroup=h,b(f,h,x(f))}}for(d=0;d<g.length;d++){f=g[d];var B=C("bingroup");if(i(f,"2dMap"))for(T=0;T<2;T++){o=t[T];var k=C(o+"bingroup",B?B+"__"+o:null);b(f,k,o)}else b(f,B,x(f))}for(h in l){var O=l[h];for(w=O.traces,M=0;M<p.length;M++){var N=p[M],_=N.name,U,Y;if(!(_==="nbins"&&O.sizeFound)){for(d=0;d<w.length;d++){if(f=w[d],o=O.dirs[d],U=N.aStr[o],A(f._input,U).get()!==void 0){O[_]=C(U),O[_+"Found"]=!0;break}Y=(f._autoBin||{})[o]||{},Y[_]&&A(f,U).set(Y[_])}if(_==="start"||_==="end")for(;d<w.length;d++)f=w[d],f["_"+o+"bingroup"]&&(Y=(f._autoBin||{})[o]||{},C(U,Y[_]));_==="nbins"&&!O.sizeFound&&!O.nbinsFound&&(f=w[0],O[_]=C(U))}}}}},11385:function(G,V,e){var m=e(73972),P=e(71828),i=e(7901),L=e(90769).handleText,A=e(98340),v=e(7745);G.exports=function(t,r,s,n){function l(S,b){return P.coerce(t,r,v,S,b)}var c=l("x"),u=l("y"),g=l("cumulative.enabled");g&&(l("cumulative.direction"),l("cumulative.currentbin")),l("text");var f=l("textposition");L(t,r,n,l,f,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),l("hovertext"),l("hovertemplate"),l("xhoverformat"),l("yhoverformat");var w=l("orientation",u&&!c?"h":"v"),h=w==="v"?"x":"y",o=w==="v"?"y":"x",d=c&&u?Math.min(P.minRowLength(c)&&P.minRowLength(u)):P.minRowLength(r[h]||[]);if(!d){r.visible=!1;return}r._length=d;var M=m.getComponentMethod("calendars","handleTraceDefaults");M(t,r,["x","y"],n);var T=r[o];T&&l("histfunc"),l("histnorm"),l("autobin"+h),A(t,r,l,s,n),P.coerceSelectionMarkerOpacity(r,l);var C=(r.marker.line||{}).color,x=m.getComponentMethod("errorbars","supplyDefaults");x(t,r,C||i.defaultLine,{axis:"y"}),x(t,r,C||i.defaultLine,{axis:"x",inherit:"y"})}},84402:function(G){G.exports=function(e,m,P,i,L){if(e.x="xVal"in m?m.xVal:m.x,e.y="yVal"in m?m.yVal:m.y,"zLabelVal"in m&&(e.z=m.zLabelVal),m.xa&&(e.xaxis=m.xa),m.ya&&(e.yaxis=m.ya),!(P.cumulative||{}).enabled){var A=Array.isArray(L)?i[0].pts[L[0]][L[1]]:i[L].pts;e.pointNumbers=A,e.binNumber=e.pointNumber,delete e.pointNumber,delete e.pointIndex;var v;if(P._indexToPoints){v=[];for(var p=0;p<A.length;p++)v=v.concat(P._indexToPoints[A[p]])}else v=A;e.pointIndices=v}return e}},76440:function(G,V,e){var m=e(95423).hoverPoints,P=e(89298).hoverLabelText;G.exports=function(L,A,v,p,t){var r=m(L,A,v,p,t);if(r){L=r[0];var s=L.cd[L.index],n=L.cd[0].trace;if(!n.cumulative.enabled){var l=n.orientation==="h"?"y":"x";L[l+"Label"]=P(L[l+"a"],[s.ph0,s.ph1],n[l+"hoverformat"])}return r}}},36071:function(G,V,e){G.exports={attributes:e(7745),layoutAttributes:e(43641),supplyDefaults:e(11385),crossTraceDefaults:e(82222),supplyLayoutDefaults:e(13957),calc:e(72138).calc,crossTraceCalc:e(11661).crossTraceCalc,plot:e(17295).plot,layerName:"barlayer",style:e(16688).style,styleOnSelect:e(16688).styleOnSelect,colorbar:e(4898),hoverPoints:e(76440),selectPoints:e(81974),eventData:e(84402),moduleType:"trace",name:"histogram",basePlotModule:e(93612),categories:["bar-like","cartesian","svg","bar","histogram","oriented","errorBarsOK","showLegend"],meta:{}}},36362:function(G){G.exports={percent:function(V,e){for(var m=V.length,P=100/e,i=0;i<m;i++)V[i]*=P},probability:function(V,e){for(var m=V.length,P=0;P<m;P++)V[P]/=e},density:function(V,e,m,P){var i=V.length;P=P||1;for(var L=0;L<i;L++)V[L]*=m[L]*P},"probability density":function(V,e,m,P){var i=V.length;P&&(e/=P);for(var L=0;L<i;L++)V[L]*=m[L]/e}}},35361:function(G,V,e){var m=e(7745),P=e(17656),i=e(21606),L=e(9012),A=e(12663).axisHoverFormat,v=e(5386).fF,p=e(5386).si,t=e(50693),r=e(1426).extendFlat;G.exports=r({x:m.x,y:m.y,z:{valType:"data_array",editType:"calc"},marker:{color:{valType:"data_array",editType:"calc"},editType:"calc"},histnorm:m.histnorm,histfunc:m.histfunc,nbinsx:m.nbinsx,xbins:P("x"),nbinsy:m.nbinsy,ybins:P("y"),autobinx:m.autobinx,autobiny:m.autobiny,bingroup:r({},m.bingroup,{}),xbingroup:r({},m.bingroup,{}),ybingroup:r({},m.bingroup,{}),xgap:i.xgap,ygap:i.ygap,zsmooth:i.zsmooth,xhoverformat:A("x"),yhoverformat:A("y"),zhoverformat:A("z",1),hovertemplate:v({},{keys:"z"}),texttemplate:p({arrayOk:!1,editType:"plot"},{keys:"z"}),textfont:i.textfont,showlegend:r({},L.showlegend,{dflt:!1})},t("",{cLetter:"z",autoColorDflt:!1}))},17562:function(G,V,e){var m=e(71828),P=e(89298),i=e(59575),L=e(36362),A=e(42174),v=e(40965),p=e(72138).calcAllAutoBins;G.exports=function(l,c){var u=P.getFromId(l,c.xaxis),g=P.getFromId(l,c.yaxis),f=c.xcalendar,w=c.ycalendar,h=function(ze){return u.r2c(ze,0,f)},o=function(ze){return g.r2c(ze,0,w)},d=function(ze){return u.c2r(ze,0,f)},M=function(ze){return g.c2r(ze,0,w)},T,C,x,S,b=p(l,c,u,"x"),a=b[0],E=b[1],y=p(l,c,g,"y"),z=y[0],I=y[1],B=c._length;E.length>B&&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<Ne;T=P.tickIncrement(T,Te,!1,f))O.push(q),Y.push(T),ie&&N.push(0);Y.push(T);var Ee=O.length,xe=(T-Oe)/Ee,Se=d(Oe+xe/2),Ue=z.size,He=o(z.start),Fe=o(z.end)+(He-P.tickIncrement(He,Ue,!1,w))/1e6;for(T=He;T<Fe;T=P.tickIncrement(T,Ue,!1,w)){k.push(O.slice()),J.push(T);var Ge=new Array(Ee);for(C=0;C<Ee;C++)Ge[C]=[];Z.push(Ge),ie&&Q.push(N.slice())}J.push(T);var nt=k.length,qe=(T-He)/nt,$e=M(He+qe/2);ee&&(he=t(O.length,te,xe,_),me=t(k.length,ae,qe,U)),!_&&u.type==="date"&&(te=r(h,te)),!U&&g.type==="date"&&(ae=r(o,ae));var et=!0,ct=!0,dt=new Array(Ee),pt=new Array(nt),At=1/0,Mt=1/0,Vt=1/0,Je=1/0;for(T=0;T<B;T++){var De=E[T],Ie=I[T];x=m.findBin(De,te),S=m.findBin(Ie,ae),x>=0&&x<Ee&&S>=0&&S<nt&&(ce+=$(x,T,k[S],Me,Q[S]),Z[S][x].push(T),et&&(dt[x]===void 0?dt[x]=De:dt[x]!==De&&(et=!1)),ct&&(pt[S]===void 0?pt[S]=Ie:pt[S]!==Ie&&(ct=!1)),At=Math.min(At,De-Y[x]),Mt=Math.min(Mt,Y[x+1]-De),Vt=Math.min(Vt,Ie-J[S]),Je=Math.min(Je,J[S+1]-Ie))}if(ie)for(S=0;S<nt;S++)ce+=A(k[S],Q[S]);if(le)for(S=0;S<nt;S++)le(k[S],ce,he,me[S]);return{x:E,xRanges:s(Y,et&&dt,At,Mt,u,f),x0:Se,dx:xe,y:I,yRanges:s(J,ct&&pt,Vt,Je,g,w),y0:$e,dy:qe,z:k,pts:Z}};function t(n,l,c,u){var g=new Array(n),f;if(u)for(f=0;f<n;f++)g[f]=1/(l[f+1]-l[f]);else{var w=1/c;for(f=0;f<n;f++)g[f]=w}return g}function r(n,l){return{start:n(l.start),end:n(l.end),size:l.size}}function s(n,l,c,u,g,f){var w,h=n.length-1,o=new Array(h),d=v(c,u,n,g,f);for(w=0;w<h;w++){var M=(l||[])[w];o[w]=M===void 0?[d(n[w]),d(n[w+1],!0)]:[M,M]}return o}},93888:function(G,V,e){var m=e(71828),P=e(75238),i=e(49901),L=e(1586),A=e(58623),v=e(35361);G.exports=function(t,r,s,n){function l(c,u){return m.coerce(t,r,v,c,u)}P(t,r,l,n),r.visible!==!1&&(i(t,r,l,n),L(t,r,n,l,{prefix:"",cLetter:"z"}),l("hovertemplate"),A(l,n),l("xhoverformat"),l("yhoverformat"))}},76128:function(G,V,e){var m=e(46248),P=e(89298).hoverLabelText;G.exports=function(L,A,v,p,t){var r=m(L,A,v,p,t);if(r){L=r[0];var s=L.index,n=s[0],l=s[1],c=L.cd[0],u=c.trace,g=c.xRanges[l],f=c.yRanges[n];return L.xLabel=P(L.xa,[g[0],g[1]],u.xhoverformat),L.yLabel=P(L.ya,[f[0],f[1]],u.yhoverformat),r}}},43905:function(G,V,e){G.exports={attributes:e(35361),supplyDefaults:e(93888),crossTraceDefaults:e(82222),calc:e(90757),plot:e(50347),layerName:"heatmaplayer",colorbar:e(61243),style:e(70035),hoverPoints:e(76128),eventData:e(84402),moduleType:"trace",name:"histogram2d",basePlotModule:e(93612),categories:["cartesian","svg","2dMap","histogram","showLegend"],meta:{}}},75238:function(G,V,e){var m=e(73972),P=e(71828);G.exports=function(L,A,v,p){var t=v("x"),r=v("y"),s=P.minRowLength(t),n=P.minRowLength(r);if(!s||!n){A.visible=!1;return}A._length=Math.min(s,n);var l=m.getComponentMethod("calendars","handleTraceDefaults");l(L,A,["x","y"],p);var c=v("z")||v("marker.color");c&&v("histfunc"),v("histnorm"),v("autobinx"),v("autobiny")}},99066:function(G,V,e){var m=e(35361),P=e(70600),i=e(50693),L=e(12663).axisHoverFormat,A=e(1426).extendFlat;G.exports=A({x:m.x,y:m.y,z:m.z,marker:m.marker,histnorm:m.histnorm,histfunc:m.histfunc,nbinsx:m.nbinsx,xbins:m.xbins,nbinsy:m.nbinsy,ybins:m.ybins,autobinx:m.autobinx,autobiny:m.autobiny,bingroup:m.bingroup,xbingroup:m.xbingroup,ybingroup:m.ybingroup,autocontour:P.autocontour,ncontours:P.ncontours,contours:P.contours,line:{color:P.line.color,width:A({},P.line.width,{dflt:.5}),dash:P.line.dash,smoothing:P.line.smoothing,editType:"plot"},xhoverformat:L("x"),yhoverformat:L("y"),zhoverformat:L("z",1),hovertemplate:m.hovertemplate,texttemplate:P.texttemplate,textfont:P.textfont},i("",{cLetter:"z",editTypeOverride:"calc"}))},62654:function(G,V,e){var m=e(71828),P=e(75238),i=e(67217),L=e(8724),A=e(58623),v=e(99066);G.exports=function(t,r,s,n){function l(u,g){return m.coerce(t,r,v,u,g)}function c(u){return m.coerce2(t,r,v,u)}P(t,r,l,n),r.visible!==!1&&(i(t,r,l,c),L(t,r,l,n),l("xhoverformat"),l("yhoverformat"),l("hovertemplate"),r.contours&&r.contours.coloring==="heatmap"&&A(l,n))}},35902:function(G,V,e){G.exports={attributes:e(99066),supplyDefaults:e(62654),crossTraceDefaults:e(82222),calc:e(27529),plot:e(29854).plot,layerName:"contourlayer",style:e(84426),colorbar:e(90654),hoverPoints:e(52421),moduleType:"trace",name:"histogram2dcontour",basePlotModule:e(93612),categories:["cartesian","svg","2dMap","contour","histogram","showLegend"],meta:{}}},46291:function(G,V,e){var m=e(5386).fF,P=e(5386).si,i=e(50693),L=e(27670).Y,A=e(34e3),v=e(57564),p=e(45802),t=e(43473),r=e(1426).extendFlat,s=e(79952).u;G.exports={labels:v.labels,parents:v.parents,values:v.values,branchvalues:v.branchvalues,count:v.count,level:v.level,maxdepth:v.maxdepth,tiling:{orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"plot"},flip:p.tiling.flip,pad:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},marker:r({colors:v.marker.colors,line:v.marker.line,pattern:s,editType:"calc"},i("marker",{colorAttr:"colors",anim:!1})),leaf:v.leaf,pathbar:p.pathbar,text:A.text,textinfo:v.textinfo,texttemplate:P({editType:"plot"},{keys:t.eventDataKeys.concat(["label","value"])}),hovertext:A.hovertext,hoverinfo:v.hoverinfo,hovertemplate:m({},{keys:t.eventDataKeys}),textfont:A.textfont,insidetextfont:A.insidetextfont,outsidetextfont:p.outsidetextfont,textposition:p.textposition,sort:A.sort,root:v.root,domain:L({name:"icicle",trace:!0,editType:"calc"})}},96346:function(G,V,e){var m=e(74875);V.name="icicle",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)}},46584: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("icicle",P)}},56524:function(G,V,e){var m=e(71828),P=e(46291),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(x,S){return m.coerce(l,c,P,x,S)}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"),f("tiling.orientation"),f("tiling.flip"),f("tiling.pad");var d=f("text");f("texttemplate"),c.texttemplate||f("textinfo",Array.isArray(d)?"text+label":"label"),f("hovertext"),f("hovertemplate");var M=f("pathbar.visible"),T="auto";A(l,c,g,f,T,{hasPathbar:M,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),f("textposition"),p(l,c,g,f);var C=c._hasColorscale=r(l,"marker","colors")||(l.marker||{}).coloraxis;C&&s(l,c,g,f,{prefix:"marker.",cLetter:"c"}),f("leaf.opacity",C?1:.7),c._hovered={marker:{line:{width:2,color:i.contrast(g.paper_bgcolor)}}},M&&(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}},90666:function(G,V,e){var m=e(39898),P=e(71828),i=e(91424),L=e(63893),A=e(21538),v=e(82454).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=A(g,[h,o],{flipX:O.tiling.flip.indexOf("x")>-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;t<A.length;t++){var r=L[A[t]];v.push("For the `"+A[t]+"` colormodel, it is ["+(r.zminDflt||r.min).join(", ")+"]."),p.push("For the `"+A[t]+"` colormodel, it is ["+(r.zmaxDflt||r.max).join(", ")+"].")}G.exports=i({source:{valType:"string",editType:"calc"},z:{valType:"data_array",editType:"calc"},colormodel:{valType:"enumerated",values:A,editType:"calc"},zsmooth:{valType:"enumerated",values:["fast",!1],dflt:!1,editType:"plot"},zmin:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc"},zmax:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc"},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dx:{valType:"number",dflt:1,editType:"calc"},dy:{valType:"number",dflt:1,editType:"calc"},text:{valType:"data_array",editType:"plot"},hovertext:{valType:"data_array",editType:"plot"},hoverinfo:i({},m.hoverinfo,{flags:["x","y","z","color","name","text"],dflt:"x+y+z+text+name"}),hovertemplate:P({},{keys:["z","color","colormodel"]}),transforms:void 0})},71113:function(G,V,e){var m=e(71828),P=e(51877),i=e(92770),L=e(89298),A=e(71828).maxRowLength,v=e(67395).A;G.exports=function(n,l){var c,u;if(l._hasZ)c=l.z.length,u=A(l.z);else if(l._hasSource){var g=v(l.source);c=g.height,u=g.width}var f=L.getFromId(n,l.xaxis||"x"),w=L.getFromId(n,l.yaxis||"y"),h=f.d2c(l.x0)-l.dx/2,o=w.d2c(l.y0)-l.dy/2,d,M=[h,h+u*l.dx],T=[o,o+c*l.dy];if(f&&f.type==="log")for(d=0;d<u;d++)M.push(h+d*l.dx);if(w&&w.type==="log")for(d=0;d<c;d++)T.push(o+d*l.dy);l._extremes[f._id]=L.findExtremes(f,M),l._extremes[w._id]=L.findExtremes(w,T),l._scaler=r(l);var C={x0:h,y0:o,z:l.z,w:u,h:c};return[C]};function p(s,n,l,c){return function(u){return m.constrain((u-s)*n,l,c)}}function t(s,n){return function(l){return m.constrain(l,s,n)}}function r(s){var n=P.colormodel[s.colormodel],l=n.colormodel||s.colormodel,c=l.length;s._sArray=[];for(var u=0;u<c;u++)n.min[u]!==s.zmin[u]||n.max[u]!==s.zmax[u]?s._sArray.push(p(s.zmin[u],(n.max[u]-n.min[u])/(s.zmax[u]-s.zmin[u]),n.min[u],n.max[u])):s._sArray.push(t(n.min[u],n.max[u]));return function(g){for(var f=g.slice(0,c),w=0;w<c;w++){var h=f[w];if(!i(h))return!1;f[w]=s._sArray[w](h)}return f}}},51877:function(G){G.exports={colormodel:{rgb:{min:[0,0,0],max:[255,255,255],fmt:function(V){return V.slice(0,3)},suffix:["","",""]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:function(V){return V.slice(0,4)},suffix:["","","",""]},rgba256:{colormodel:"rgba",zminDflt:[0,0,0,0],zmaxDflt:[255,255,255,255],min:[0,0,0,0],max:[255,255,255,1],fmt:function(V){return V.slice(0,4)},suffix:["","","",""]},hsl:{min:[0,0,0],max:[360,100,100],fmt:function(V){var e=V.slice(0,3);return e[1]=e[1]+"%",e[2]=e[2]+"%",e},suffix:["°","%","%"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(V){var e=V.slice(0,4);return e[1]=e[1]+"%",e[2]=e[2]+"%",e},suffix:["°","%","%",""]}}}},13245:function(G,V,e){var m=e(71828),P=e(17230),i=e(51877),L=e(25095).IMAGE_URL_PREFIX;G.exports=function(v,p){function t(n,l){return m.coerce(v,p,P,n,l)}t("source"),p.source&&!p.source.match(L)&&delete p.source,p._hasSource=!!p.source;var r=t("z");if(p._hasZ=!(r===void 0||!r.length||!r[0]||!r[0].length),!p._hasZ&&!p._hasSource){p.visible=!1;return}t("x0"),t("y0"),t("dx"),t("dy");var s;p._hasZ?(t("colormodel","rgb"),s=i.colormodel[p.colormodel],t("zmin",s.zminDflt||s.min),t("zmax",s.zmaxDflt||s.max)):p._hasSource&&(p.colormodel="rgba256",s=i.colormodel[p.colormodel],p.zmin=s.zminDflt,p.zmax=s.zmaxDflt),t("zsmooth"),t("text"),t("hovertext"),t("hovertemplate"),p._length=null}},30835:function(G){G.exports=function(e,m){return"xVal"in m&&(e.x=m.xVal),"yVal"in m&&(e.y=m.yVal),m.xa&&(e.xaxis=m.xa),m.ya&&(e.yaxis=m.ya),e.color=m.color,e.colormodel=m.trace.colormodel,e.z||(e.z=m.color),e}},67395:function(G,V,e){var m=e(33575),P=e(25095).IMAGE_URL_PREFIX,i=e(12856).Buffer;V.A=function(L){var A=L.replace(P,""),v=new i(A,"base64");return m(v)}},28749:function(G,V,e){var m=e(30211),P=e(71828),i=e(51877);G.exports=function(A,v,p){var t=A.cd[0],r=t.trace,s=A.xa,n=A.ya;if(!(m.inbox(v-t.x0,v-(t.x0+t.w*r.dx),0)>0||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&&k<x;)E=c.c2p(T+k*b),k++;for(k=x;y===void 0&&k>0;)y=c.c2p(T+k*b),k--;for(k=0;I===void 0&&k<S;)I=u.c2p(C+k*a),k++;for(k=S;B===void 0&&k>0;)B=u.c2p(C+k*a),k--;if(y<E&&(z=y,y=E,E=z),B<I&&(z=I,I=B,B=z),!d){var O=.5;E=Math.max(-O*c._length,E),y=Math.min((1+O)*c._length,y),I=Math.max(-O*u._length,I),B=Math.min((1+O)*u._length,B)}var N=Math.round(y-E),_=Math.round(B-I),U=N<=0||_<=0;if(U){var Y=w.selectAll("image").data([]);Y.exit().remove();return}function J(q){var $=document.createElement("canvas");$.width=N,$.height=_;var le=$.getContext("2d",{willReadFrequently:!0}),ie=function(He){return P.constrain(Math.round(c.c2p(T+He*b)-E),0,N)},he=function(He){return P.constrain(Math.round(u.c2p(C+He*a)-I),0,_)},me=A.colormodel[o.colormodel],Me=me.colormodel||o.colormodel,Te=me.fmt,Oe;for(k=0;k<h.w;k++){var Ne=ie(k),Ee=ie(k+1);if(!(Ee===Ne||isNaN(Ee)||isNaN(Ne)))for(var xe=0;xe<h.h;xe++){var Se=he(xe),Ue=he(xe+1);Ue===Se||isNaN(Ue)||isNaN(Se)||!q(k,xe)||(Oe=o._scaler(q(k,xe)),Oe?le.fillStyle=Me+"("+Te(Oe).join(",")+")":le.fillStyle="rgba(0,0,0,0)",le.fillRect(Ne,Se,Ee-Ne,Ue-Se))}}return $}var te=w.selectAll("image").data([f]);te.enter().append("svg:image").attr({xmlns:L.svg,preserveAspectRatio:"none"}),te.exit().remove();var ae=o.zsmooth===!1?p:"";if(d){var ce=P.simpleMap(c.range,c.r2l),Q=P.simpleMap(u.range,u.r2l),Z=ce[1]<ce[0],j=Q[1]>Q[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;s<v._len;s++){var n=v._value[s];t=Math.min(t,n),r=Math.max(r,n)}v._minValues=t,v._maxValues=r,v._vMin=v.isomin===void 0||v.isomin===null?t:v.isomin,v._vMax=v.isomax===void 0||v.isomin===null?r:v.isomax,m(A,v,{vals:[v._vMin,v._vMax],containerStr:"",cLetter:"c"})}},22674:function(G,V,e){var m=e(9330).gl_mesh3d,P=e(81697).parseColorScale,i=e(78614),L=e(21081).extractOpts,A=e(90060),v=function(l,c){for(var u=c.length-1;u>0;u--){var g=Math.min(c[u],c[u-1]),f=Math.max(c[u],c[u-1]);if(f>g&&g<l&&l<=f)return{id:u,distRatio:(f-l)/(f-g)}}return{id:0,distRatio:0}};function p(l,c,u){this.scene=l,this.uid=u,this.mesh=c,this.name="",this.data=null,this.showContour=!1}var t=p.prototype;t.handlePick=function(l){if(l.object===this.mesh){var c=l.data.index,u=this.data._meshX[c],g=this.data._meshY[c],f=this.data._meshZ[c],w=this.data._Ys.length,h=this.data._Zs.length,o=v(u,this.data._Xs).id,d=v(g,this.data._Ys).id,M=v(f,this.data._Zs).id,T=l.index=M+h*d+h*w*o;l.traceCoordinate=[this.data._meshX[T],this.data._meshY[T],this.data._meshZ[T],this.data._value[T]];var C=this.data.hovertext||this.data.text;return Array.isArray(C)&&C[T]!==void 0?l.textLabel=C[T]:C&&(l.textLabel=C),!0}},t.update=function(l){var c=this.scene,u=c.fullSceneLayout;this.data=s(l);function g(d,M,T,C){return M.map(function(x){return d.d2l(x,0,C)*T})}var f=A(g(u.xaxis,l._meshX,c.dataScale[0],l.xcalendar),g(u.yaxis,l._meshY,c.dataScale[1],l.ycalendar),g(u.zaxis,l._meshZ,c.dataScale[2],l.zcalendar)),w=A(l._meshI,l._meshJ,l._meshK),h={positions:f,cells:w,lightPosition:[l.lightposition.x,l.lightposition.y,l.lightposition.z],ambient:l.lighting.ambient,diffuse:l.lighting.diffuse,specular:l.lighting.specular,roughness:l.lighting.roughness,fresnel:l.lighting.fresnel,vertexNormalsEpsilon:l.lighting.vertexnormalsepsilon,faceNormalsEpsilon:l.lighting.facenormalsepsilon,opacity:l.opacity,contourEnable:l.contour.show,contourColor:i(l.contour.color).slice(0,3),contourWidth:l.contour.width,useFacetNormals:l.flatshading},o=L(l);h.vertexIntensity=l._meshIntensity,h.vertexIntensityBounds=[o.min,o.max],h.colormap=P(l),this.mesh.update(h)},t.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};var r=["xyz","xzy","yxz","yzx","zxy","zyx"];function s(l){l._meshI=[],l._meshJ=[],l._meshK=[];var c=l.surface.show,u=l.spaceframe.show,g=l.surface.fill,f=l.spaceframe.fill,w=!1,h=!1,o=0,d,M,T=l._Xs,C=l._Ys,x=l._Zs,S=T.length,b=C.length,a=x.length,E=r.indexOf(l._gridFill.replace(/-/g,"").replace(/\+/g,"")),y=function(De,Ie,ze){switch(E){case 5:return ze+a*Ie+a*b*De;case 4:return ze+a*De+a*S*Ie;case 3:return Ie+b*ze+b*a*De;case 2:return Ie+b*De+b*S*ze;case 1:return De+S*ze+S*a*Ie;default:return De+S*Ie+S*b*ze}},z=l._minValues,I=l._maxValues,B=l._vMin,k=l._vMax,O,N,_,U;function Y(De,Ie,ze){for(var Pe=U.length,be=M;be<Pe;be++)if(De===O[be]&&Ie===N[be]&&ze===_[be])return be;return-1}function J(){M=d}function te(){O=[],N=[],_=[],U=[],d=0,J()}function ae(De,Ie,ze,Pe){return O.push(De),N.push(Ie),_.push(ze),U.push(Pe),d++,d-1}function ce(De,Ie,ze){return l._meshI.push(De),l._meshJ.push(Ie),l._meshK.push(ze),o++,o-1}function Q(De,Ie,ze){for(var Pe=[],be=0;be<De.length;be++)Pe[be]=(De[be]+Ie[be]+ze[be])/3;return Pe}function Z(De,Ie,ze){for(var Pe=[],be=0;be<De.length;be++)Pe[be]=De[be]*(1-ze)+ze*Ie[be];return Pe}var j;function K(De){j=De}function ee(De,Ie){var ze=De[0],Pe=De[1],be=De[2],se=Q(ze,Pe,be),ye=Math.sqrt(1-j),Le=Z(se,ze,ye),Be=Z(se,Pe,ye),ot=Z(se,be,ye),at=Ie[0],wt=Ie[1],It=Ie[2];return{xyzv:[[ze,Pe,Be],[Be,Le,ze],[Pe,be,ot],[ot,Be,Pe],[be,ze,Le],[Le,ot,be]],abc:[[at,wt,-1],[-1,-1,at],[wt,It,-1],[-1,-1,wt],[It,at,-1],[-1,-1,It]]}}function oe(De,Ie){return De==="all"||De===null?!0:De.indexOf(Ie)>-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<Pe.length;ye++){Ie=Pe[ye],ze=be[ye];for(var Le=[],Be=0;Be<3;Be++){var ot=Ie[Be][0],at=Ie[Be][1],wt=Ie[Be][2],It=Ie[Be][3],Bt=ze[Be]>-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];be<ze&&(be=ze),be>Pe&&(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):se<Oe?Ne(at,wt,It,B,k,++se):!1};if(Le[0]&&Le[1]&&Le[2])return Be(De,Ie,ze)||ye;var ot=!1;return[[0,1,2],[2,0,1],[1,2,0]].forEach(function(at){if(Le[at[0]]&&Le[at[1]]&&!Le[at[2]]){var wt=Ie[at[0]],It=Ie[at[1]],Bt=Ie[at[2]],Gt=he(Bt,wt,Pe,be),Lt=he(Bt,It,Pe,be);ye=Be(De,[Lt,Gt,wt],[-1,-1,ze[at[0]]])||ye,ye=Be(De,[wt,It,Lt],[ze[at[0]],ze[at[1]],-1])||ye,ot=!0}}),ot||[[0,1,2],[1,2,0],[2,0,1]].forEach(function(at){if(Le[at[0]]&&!Le[at[1]]&&!Le[at[2]]){var wt=Ie[at[0]],It=Ie[at[1]],Bt=Ie[at[2]],Gt=he(It,wt,Pe,be),Lt=he(Bt,wt,Pe,be);ye=Be(De,[Lt,Gt,wt],[-1,-1,ze[at[0]]])||ye,ot=!0}}),ye}function Ee(De,Ie,ze,Pe){var be=!1,se=Te(Ie),ye=[me(se[0][3],ze,Pe),me(se[1][3],ze,Pe),me(se[2][3],ze,Pe),me(se[3][3],ze,Pe)];if(!ye[0]&&!ye[1]&&!ye[2]&&!ye[3])return be;if(ye[0]&&ye[1]&&ye[2]&&ye[3])return h&&(be=ie(De,se,Ie)||be),be;var Le=!1;return[[0,1,2,3],[3,0,1,2],[2,3,0,1],[1,2,3,0]].forEach(function(Be){if(ye[Be[0]]&&ye[Be[1]]&&ye[Be[2]]&&!ye[Be[3]]){var ot=se[Be[0]],at=se[Be[1]],wt=se[Be[2]],It=se[Be[3]];if(h)be=$(De,[ot,at,wt],[Ie[Be[0]],Ie[Be[1]],Ie[Be[2]]])||be;else{var Bt=he(It,ot,ze,Pe),Gt=he(It,at,ze,Pe),Lt=he(It,wt,ze,Pe);be=$(null,[Bt,Gt,Lt],[-1,-1,-1])||be}Le=!0}}),Le||([[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2],[0,2,3,1],[1,3,2,0]].forEach(function(Be){if(ye[Be[0]]&&ye[Be[1]]&&!ye[Be[2]]&&!ye[Be[3]]){var ot=se[Be[0]],at=se[Be[1]],wt=se[Be[2]],It=se[Be[3]],Bt=he(wt,ot,ze,Pe),Gt=he(wt,at,ze,Pe),Lt=he(It,at,ze,Pe),Kt=he(It,ot,ze,Pe);h?(be=$(De,[ot,Kt,Bt],[Ie[Be[0]],-1,-1])||be,be=$(De,[at,Gt,Lt],[Ie[Be[1]],-1,-1])||be):be=le(null,[Bt,Gt,Lt,Kt],[-1,-1,-1,-1])||be,Le=!0}}),Le)||[[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2]].forEach(function(Be){if(ye[Be[0]]&&!ye[Be[1]]&&!ye[Be[2]]&&!ye[Be[3]]){var ot=se[Be[0]],at=se[Be[1]],wt=se[Be[2]],It=se[Be[3]],Bt=he(at,ot,ze,Pe),Gt=he(wt,ot,ze,Pe),Lt=he(It,ot,ze,Pe);h?(be=$(De,[ot,Bt,Gt],[Ie[Be[0]],-1,-1])||be,be=$(De,[ot,Gt,Lt],[Ie[Be[0]],-1,-1])||be,be=$(De,[ot,Lt,Bt],[Ie[Be[0]],-1,-1])||be):be=$(null,[Bt,Gt,Lt],[-1,-1,-1])||be,Le=!0}}),be}function xe(De,Ie,ze,Pe,be,se,ye,Le,Be,ot,at){var wt=!1;return w&&(oe(De,"A")&&(wt=Ee(null,[Ie,ze,Pe,se],ot,at)||wt),oe(De,"B")&&(wt=Ee(null,[ze,Pe,be,Be],ot,at)||wt),oe(De,"C")&&(wt=Ee(null,[ze,se,ye,Be],ot,at)||wt),oe(De,"D")&&(wt=Ee(null,[Pe,se,Le,Be],ot,at)||wt),oe(De,"E")&&(wt=Ee(null,[ze,Pe,se,Be],ot,at)||wt)),h&&(wt=Ee(De,[ze,Pe,se,Be],ot,at)||wt),wt}function Se(De,Ie,ze,Pe,be,se,ye,Le){return[Le[0]===!0?!0:Ne(De,Te([Ie,ze,Pe]),[Ie,ze,Pe],se,ye),Le[1]===!0?!0:Ne(De,Te([Pe,be,Ie]),[Pe,be,Ie],se,ye)]}function Ue(De,Ie,ze,Pe,be,se,ye,Le,Be){return Le?Se(De,Ie,ze,be,Pe,se,ye,Be):Se(De,ze,be,Pe,Ie,se,ye,Be)}function He(De,Ie,ze,Pe,be,se,ye){var Le=!1,Be,ot,at,wt,It=function(){Le=Ne(De,[Be,ot,at],[-1,-1,-1],be,se)||Le,Le=Ne(De,[at,wt,Be],[-1,-1,-1],be,se)||Le},Bt=ye[0],Gt=ye[1],Lt=ye[2];return Bt&&(Be=Z(Te([y(Ie,ze-0,Pe-0)])[0],Te([y(Ie-1,ze-0,Pe-0)])[0],Bt),ot=Z(Te([y(Ie,ze-0,Pe-1)])[0],Te([y(Ie-1,ze-0,Pe-1)])[0],Bt),at=Z(Te([y(Ie,ze-1,Pe-1)])[0],Te([y(Ie-1,ze-1,Pe-1)])[0],Bt),wt=Z(Te([y(Ie,ze-1,Pe-0)])[0],Te([y(Ie-1,ze-1,Pe-0)])[0],Bt),It()),Gt&&(Be=Z(Te([y(Ie-0,ze,Pe-0)])[0],Te([y(Ie-0,ze-1,Pe-0)])[0],Gt),ot=Z(Te([y(Ie-0,ze,Pe-1)])[0],Te([y(Ie-0,ze-1,Pe-1)])[0],Gt),at=Z(Te([y(Ie-1,ze,Pe-1)])[0],Te([y(Ie-1,ze-1,Pe-1)])[0],Gt),wt=Z(Te([y(Ie-1,ze,Pe-0)])[0],Te([y(Ie-1,ze-1,Pe-0)])[0],Gt),It()),Lt&&(Be=Z(Te([y(Ie-0,ze-0,Pe)])[0],Te([y(Ie-0,ze-0,Pe-1)])[0],Lt),ot=Z(Te([y(Ie-0,ze-1,Pe)])[0],Te([y(Ie-0,ze-1,Pe-1)])[0],Lt),at=Z(Te([y(Ie-1,ze-1,Pe)])[0],Te([y(Ie-1,ze-1,Pe-1)])[0],Lt),wt=Z(Te([y(Ie-1,ze-0,Pe)])[0],Te([y(Ie-1,ze-0,Pe-1)])[0],Lt),It()),Le}function Fe(De,Ie,ze,Pe,be,se,ye,Le,Be,ot,at,wt){var It=De;return wt?(w&&De==="even"&&(It=null),xe(It,Ie,ze,Pe,be,se,ye,Le,Be,ot,at)):(w&&De==="odd"&&(It=null),xe(It,Be,Le,ye,se,be,Pe,ze,Ie,ot,at))}function Ge(De,Ie,ze,Pe,be){for(var se=[],ye=0,Le=0;Le<Ie.length;Le++)for(var Be=Ie[Le],ot=1;ot<a;ot++)for(var at=1;at<b;at++)se.push(Ue(De,y(Be,at-1,ot-1),y(Be,at-1,ot),y(Be,at,ot-1),y(Be,at,ot),ze,Pe,(Be+at+ot)%2,be&&be[ye]?be[ye]:[])),ye++;return se}function nt(De,Ie,ze,Pe,be){for(var se=[],ye=0,Le=0;Le<Ie.length;Le++)for(var Be=Ie[Le],ot=1;ot<S;ot++)for(var at=1;at<a;at++)se.push(Ue(De,y(ot-1,Be,at-1),y(ot,Be,at-1),y(ot-1,Be,at),y(ot,Be,at),ze,Pe,(ot+Be+at)%2,be&&be[ye]?be[ye]:[])),ye++;return se}function qe(De,Ie,ze,Pe,be){for(var se=[],ye=0,Le=0;Le<Ie.length;Le++)for(var Be=Ie[Le],ot=1;ot<b;ot++)for(var at=1;at<S;at++)se.push(Ue(De,y(at-1,ot-1,Be),y(at-1,ot,Be),y(at,ot-1,Be),y(at,ot,Be),ze,Pe,(at+ot+Be)%2,be&&be[ye]?be[ye]:[])),ye++;return se}function $e(De,Ie,ze){for(var Pe=1;Pe<a;Pe++)for(var be=1;be<b;be++)for(var se=1;se<S;se++)Fe(De,y(se-1,be-1,Pe-1),y(se-1,be-1,Pe),y(se-1,be,Pe-1),y(se-1,be,Pe),y(se,be-1,Pe-1),y(se,be-1,Pe),y(se,be,Pe-1),y(se,be,Pe),Ie,ze,(se+be+Pe)%2)}function et(De,Ie,ze){h=!0,$e(De,Ie,ze),h=!1}function ct(De,Ie,ze){w=!0,$e(De,Ie,ze),w=!1}function dt(De,Ie,ze,Pe,be,se){for(var ye=[],Le=0,Be=0;Be<Ie.length;Be++)for(var ot=Ie[Be],at=1;at<a;at++)for(var wt=1;wt<b;wt++)ye.push(He(De,ot,wt,at,ze,Pe,be[Be],se&&se[Le]?se[Le]:[])),Le++;return ye}function pt(De,Ie,ze,Pe,be,se){for(var ye=[],Le=0,Be=0;Be<Ie.length;Be++)for(var ot=Ie[Be],at=1;at<S;at++)for(var wt=1;wt<a;wt++)ye.push(He(De,at,ot,wt,ze,Pe,be[Be],se&&se[Le]?se[Le]:[])),Le++;return ye}function At(De,Ie,ze,Pe,be,se){for(var ye=[],Le=0,Be=0;Be<Ie.length;Be++)for(var ot=Ie[Be],at=1;at<b;at++)for(var wt=1;wt<S;wt++)ye.push(He(De,wt,at,ot,ze,Pe,be[Be],se&&se[Le]?se[Le]:[])),Le++;return ye}function Mt(De,Ie){for(var ze=[],Pe=De;Pe<Ie;Pe++)ze.push(Pe);return ze}function Vt(){for(var De=0;De<S;De++)for(var Ie=0;Ie<b;Ie++)for(var ze=0;ze<a;ze++){var Pe=y(De,Ie,ze);ae(l._x[Pe],l._y[Pe],l._z[Pe],l._value[Pe])}}function Je(){te(),Vt();var De=null;if(u&&f&&(K(f),et(De,B,k)),c&&g){K(g);for(var Ie=l.surface.pattern,ze=l.surface.count,Pe=0;Pe<ze;Pe++){var be=ze===1?.5:Pe/(ze-1),se=(1-be)*B+be*k,ye=Math.abs(se-z),Le=Math.abs(se-I),Be=ye>Le?[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;It<ot.length;It++){var Bt=0,Gt=ot[It][0],Lt=ot[It][1],Kt=l.slices[at];if(Kt.show&&Kt.fill){K(Kt.fill);var ir=[],_r=[],yt=[];if(Kt.locations.length)for(var jt=0;jt<Kt.locations.length;jt++){var Yt=v(Kt.locations[jt],at==="x"?T:at==="y"?C:x);Yt.distRatio===0?ir.push(Yt.id):Yt.id>0&&(_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<o;d++)h[d]=v(w[d]);return h}function l(w,h,o,d){for(var M=[],T=h.length,C=0;C<T;C++)M[C]=w.d2l(h[C],0,d)*o;return M}function c(w){for(var h=[],o=w.length,d=0;d<o;d++)h[d]=Math.round(w[d]);return h}function u(w,h){for(var o=["x","y","z"].indexOf(w),d=[],M=h.length,T=0;T<M;T++)d[T]=[h[T][(o+1)%3],h[T][(o+2)%3]];return P(d)}function g(w,h){for(var o=w.length,d=0;d<o;d++)if(w[d]<=-.5||w[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;b<c.length;b++){var a=c[b],E=f[b],y=w[b],z=h[b],I=o[b];if(a!==A&&E!==A&&y!==A&&z!==A&&I!==A){I===E?C!==null&&I!==C&&(T=I>C):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<u.length;f++){var w=u[f];if(w.type==="ohlc"&&w.visible===!0&&w.xaxis===n._id){g.push(w);var h=n.makeCalcdata(w,"x");w._origX=h;var o=L(l,n,"x",h).vals;w._xcalc=o;var d=m.distinctVals(o).minDiff;d&&isFinite(d)&&(c=Math.min(c,d))}}for(c===1/0&&(c=1),f=0;f<g.length;f++)g[f]._minDiff=c}return c*l.tickwidth}G.exports={calc:v,calcCommon:t}},16169:function(G,V,e){var m=e(71828),P=e(14555),i=e(73927),L=e(2522);G.exports=function(p,t,r,s){function n(c,u){return m.coerce(p,t,L,c,u)}var l=P(p,t,n,s);if(!l){t.visible=!1;return}i(p,t,s,n,{x:!0}),n("xhoverformat"),n("yhoverformat"),n("line.width"),n("line.dash"),A(p,t,n,"increasing"),A(p,t,n,"decreasing"),n("text"),n("hovertext"),n("tickwidth"),s._requestRangeslider[t.xaxis]=!0};function A(v,p,t,r){t(r+".line.color"),t(r+".line.width",p.line.width),t(r+".line.dash",p.line.dash)}},66449:function(G,V,e){var m=e(89298),P=e(71828),i=e(30211),L=e(7901),A=e(71828).fillText,v=e(22372),p={increasing:v.INCREASING.SYMBOL,decreasing:v.DECREASING.SYMBOL};function t(l,c,u,g){var f=l.cd,w=f[0].trace;return w.hoverlabel.split?s(l,c,u,g):n(l,c,u,g)}function r(l,c,u,g){var f=l.cd,w=l.xa,h=f[0].trace,o=f[0].t,d=h.type,M=d==="ohlc"?"l":"min",T=d==="ohlc"?"h":"max",C,x,S=o.bPos||0,b=function(Y){return Y.pos+S-c},a=o.bdPos||o.tickLen,E=o.wHover,y=Math.min(1,a/Math.abs(w.r2c(w.range[1])-w.r2c(w.range[0])));C=l.maxHoverDistance-y,x=l.maxSpikeDistance-y;function z(Y){var J=b(Y);return i.inbox(J-E,J+E,C)}function I(Y){var J=Y[M],te=Y[T];return J===te||i.inbox(J-u,te-u,C)}function B(Y){return(z(Y)+I(Y))/2}var k=i.getDistanceFunction(g,z,I,B);if(i.getClosest(f,k,l),l.index===!1)return null;var O=f[l.index];if(O.empty)return null;var N=O.dir,_=h[N],U=_.line.color;return L.opacity(U)&&_.line.width?l.color=U:l.color=_.fillcolor,l.x0=w.c2p(O.pos+S-a,!0),l.x1=w.c2p(O.pos+S+a,!0),l.xLabelVal=O.orig_p!==void 0?O.orig_p:O.pos,l.spikeDistance=B(O)*x/C,l.xSpike=w.c2p(O.pos,!0),l}function s(l,c,u,g){var f=l.cd,w=l.ya,h=f[0].trace,o=f[0].t,d=[],M=r(l,c,u,g);if(!M)return[];var T=M.index,C=f[T],x=C.hi||h.hoverinfo,S=x.split("+"),b=x==="all",a=b||S.indexOf("y")!==-1;if(!a)return[];for(var E=["high","open","close","low"],y={},z=0;z<E.length;z++){var I=E[z],B=h[I][M.index],k=w.c2p(B,!0),O;B in y?(O=y[B],O.yLabel+="<br>"+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("<br>"),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<P.length;v++)P[v].selected=0;else for(v=0;v<P.length;v++){var t=P[v];m.contains([i.c2p(t.pos+p),L.c2p(t.yc)],null,t.i,e)?(A.push({pointNumber:t.i,x:i.c2d(t.pos),y:L.c2d(t.yc)}),t.selected=1):t.selected=0}return A}},53101:function(G,V,e){var m=e(39898),P=e(91424),i=e(7901);G.exports=function(A,v,p){var t=p||m.select(A).selectAll("g.ohlclayer").selectAll("g.trace");t.style("opacity",function(r){return r[0].trace.opacity}),t.each(function(r){var s=r[0].trace;m.select(this).selectAll("path").each(function(n){if(!n.empty){var l=s[n.dir].line;m.select(this).style("fill","none").call(i.stroke,l.color).call(P.dashLine,l.dash,l.width).style("opacity",s.selectedpoints&&!n.selected?.3:1)}})})}},99506:function(G,V,e){var m=e(1426).extendFlat,P=e(9012),i=e(41940),L=e(50693),A=e(5386).fF,v=e(27670).Y,p=m({editType:"calc"},L("line",{editTypeOverride:"calc"}),{shape:{valType:"enumerated",values:["linear","hspline"],dflt:"linear",editType:"plot"},hovertemplate:A({editType:"plot",arrayOk:!1},{keys:["count","probability"]})});G.exports={domain:v({name:"parcats",trace:!0,editType:"calc"}),hoverinfo:m({},P.hoverinfo,{flags:["count","probability"],editType:"plot",arrayOk:!1}),hoveron:{valType:"enumerated",values:["category","color","dimension"],dflt:"category",editType:"plot"},hovertemplate:A({editType:"plot",arrayOk:!1},{keys:["count","probability","category","categorycount","colorcount","bandcolorcount"]}),arrangement:{valType:"enumerated",values:["perpendicular","freeform","fixed"],dflt:"perpendicular",editType:"plot"},bundlecolors:{valType:"boolean",dflt:!0,editType:"plot"},sortpaths:{valType:"enumerated",values:["forward","backward"],dflt:"forward",editType:"plot"},labelfont:i({editType:"calc"}),tickfont:i({editType:"calc"}),dimensions:{_isLinkedToArray:"dimension",label:{valType:"string",editType:"calc"},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},ticktext:{valType:"data_array",editType:"calc"},values:{valType:"data_array",dflt:[],editType:"calc"},displayindex:{valType:"integer",editType:"calc"},editType:"calc",visible:{valType:"boolean",dflt:!0,editType:"calc"}},line:p,counts:{valType:"number",min:0,dflt:1,arrayOk:!0,editType:"calc"},customdata:void 0,hoverlabel:void 0,ids:void 0,legend:void 0,legendgroup:void 0,legendrank:void 0,opacity:void 0,selectedpoints:void 0,showlegend:void 0}},27677:function(G,V,e){var m=e(27659).a0,P=e(45784),i="parcats";V.name=i,V.plot=function(L,A,v,p){var t=m(L.calcdata,i);if(t.length){var r=t[0];P(L,r,v,p)}},V.clean=function(L,A,v,p){var t=p._has&&p._has("parcats"),r=A._has&&A._has("parcats");t&&!r&&p._paperdiv.selectAll(".parcats").remove()}},28699:function(G,V,e){var m=e(28984).wrap,P=e(52075).hasColorscale,i=e(78803),L=e(75744),A=e(91424),v=e(71828),p=e(92770);G.exports=function(o,d){var M=v.filterVisible(d.dimensions);if(M.length===0)return[];var T=M.map(function(Q){var Z;if(Q.categoryorder==="trace")Z=null;else if(Q.categoryorder==="array")Z=Q.categoryarray;else{Z=L(Q.values);for(var j=!0,K=0;K<Z.length;K++)if(!p(Z[K])){j=!1;break}Z.sort(j?v.sorterAsc:void 0),Q.categoryorder==="category descending"&&(Z=Z.reverse())}return u(Q.values,Z)}),C,x,S;v.isArrayOrTypedArray(d.counts)?C=d.counts:C=[d.counts],g(M),M.forEach(function(Q,Z){f(Q,T[Z])});var b=d.line,a;b?(P(d,"line")&&i(o,d,{vals:d.line.color,containerStr:"line",cLetter:"c"}),a=A.tryColorscale(b)):a=v.identity;function E(Q){var Z,j;return v.isArrayOrTypedArray(b.color)?(Z=b.color[Q%b.color.length],j=Z):Z=b.color,{color:a(Z),rawColor:j}}var y=M[0].values.length,z={},I=T.map(function(Q){return Q.inds});S=0;var B,k;for(B=0;B<y;B++){var O=[];for(k=0;k<I.length;k++)O.push(I[k][B]);x=C[B%C.length],S+=x;var N=E(B),_=O+"-"+N.rawColor;z[_]===void 0&&(z[_]=l(O,N.color,N.rawColor)),c(z[_],B,x)}var U=M.map(function(Q,Z){return r(Z,Q._index,Q._displayindex,Q.label,S)});for(B=0;B<y;B++)for(x=C[B%C.length],k=0;k<U.length;k++){var Y=U[k].containerInd,J=T[k].inds[B],te=U[k].categories;if(te[J]===void 0){var ae=d.dimensions[Y]._categoryarray[J],ce=d.dimensions[Y]._ticktext[J];te[J]=s(k,J,ae,ce)}n(te[J],B,x)}return m(t(U,z,S))};function t(h,o,d){var M=h.map(function(T){return T.categories.length}).reduce(function(T,C){return Math.max(T,C)});return{dimensions:h,paths:o,trace:void 0,maxCats:M,count:d}}function r(h,o,d,M,T){return{dimensionInd:h,containerInd:o,displayInd:d,dimensionLabel:M,count:T,categories:[],dragX:null}}function s(h,o,d,M){return{dimensionInd:h,categoryInd:o,categoryValue:d,displayInd:o,categoryLabel:M,valueInds:[],count:0,dragY:null}}function n(h,o,d){h.valueInds.push(o),h.count+=d}function l(h,o,d){return{categoryInds:h,color:o,rawColor:d,valueInds:[],count:0}}function c(h,o,d){h.valueInds.push(o),h.count+=d}function u(h,o){o==null?o=[]:o=o.map(function(a){return a});var d={},M={},T=[];o.forEach(function(a,E){d[a]=0,M[a]=E});for(var C=0;C<h.length;C++){var x=h[C],S;d[x]===void 0?(d[x]=1,S=o.push(x)-1,M[x]=S):(d[x]++,S=M[x]),T.push(S)}var b=o.map(function(a){return d[a]});return{uniqueValues:o,uniqueCounts:b,inds:T}}function g(h){var o=h.map(function(M){return M.displayindex}),d;if(w(o))for(d=0;d<h.length;d++)h[d]._displayindex=h[d].displayindex;else for(d=0;d<h.length;d++)h[d]._displayindex=d}function f(h,o){h._categoryarray=o.uniqueValues,h.ticktext===null||h.ticktext===void 0?h._ticktext=[]:h._ticktext=h.ticktext.slice();for(var d=h._ticktext.length;d<o.uniqueValues.length;d++)h._ticktext.push(o.uniqueValues[d])}function w(h){for(var o=new Array(h.length),d=0;d<h.length;d++){if(h[d]<0||h[d]>=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<ee.model.rawColor?-1:0}function u(K){if(!K.parcatsViewModel.dragDimension&&K.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){A.raiseToTop(this),d(m.select(this));var ee=f(K),oe=w(K);if(K.parcatsViewModel.graphDiv.emit("plotly_hover",{points:ee,event:m.event,constraints:oe}),K.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var q=m.mouse(this)[0],$=K.parcatsViewModel.graphDiv,le=K.parcatsViewModel.trace,ie=$._fullLayout,he=ie._paperdiv.node().getBoundingClientRect(),me=K.parcatsViewModel.graphDiv.getBoundingClientRect(),Me,Te,Oe;for(Oe=0;Oe<K.leftXs.length-1;Oe++)if(K.leftXs[Oe]+K.dimWidths[Oe]-2<=q&&q<=K.leftXs[Oe+1]+2){var Ne=K.parcatsViewModel.dimensions[Oe],Ee=K.parcatsViewModel.dimensions[Oe+1];Me=(Ne.x+Ne.width+Ee.x)/2,Te=(K.topYs[Oe]+K.topYs[Oe+1]+K.height)/2;break}var xe=K.parcatsViewModel.x+Me,Se=K.parcatsViewModel.y+Te,Ue=t.mostReadable(K.model.color,["black","white"]),He=K.model.count,Fe=He/K.parcatsViewModel.model.count,Ge={countLabel:He,probabilityLabel:Fe.toFixed(3)},nt=[];K.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&nt.push(["Count:",Ge.countLabel].join(" ")),K.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&nt.push(["P:",Ge.probabilityLabel].join(" "));var qe=nt.join("<br>"),$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:$e<xe?"right":"left",hovertemplate:(le.line||{}).hovertemplate,hovertemplateLabels:Ge,eventData:[{data:le._input,fullData:le,count:He,probability:Fe}]},{container:ie._hoverlayer.node(),outerContainer:ie._paper.node(),gd:$})}}}function g(K){if(!K.parcatsViewModel.dragDimension&&(o(m.select(this)),L.loneUnhover(K.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()),K.parcatsViewModel.pathSelection.sort(c),K.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1)){var ee=f(K),oe=w(K);K.parcatsViewModel.graphDiv.emit("plotly_unhover",{points:ee,event:m.event,constraints:oe})}}function f(K){for(var ee=[],oe=Y(K.parcatsViewModel),q=0;q<K.model.valueInds.length;q++){var $=K.model.valueInds[q];ee.push({curveNumber:oe,pointNumber:$})}return ee}function w(K){for(var ee={},oe=K.parcatsViewModel.model.dimensions,q=0;q<oe.length;q++){var $=oe[q],le=$.categories[K.model.categoryInds[q]];ee[$.containerInd]=le.categoryValue}return K.model.rawColor!==void 0&&(ee.color=K.model.rawColor),ee}function h(K){if(K.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var ee=f(K),oe=w(K);K.parcatsViewModel.graphDiv.emit("plotly_click",{points:ee,event:m.event,constraints:oe})}}function o(K){K.attr("fill",function(ee){return ee.model.color}).attr("fill-opacity",.6).attr("stroke","lightgray").attr("stroke-width",.2).attr("stroke-opacity",1)}function d(K){K.attr("fill-opacity",.8).attr("stroke",function(ee){return t.mostReadable(ee.model.color,["black","white"])}).attr("stroke-width",.3)}function M(K){K.select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5)}function T(K){K.select("rect.catrect").attr("stroke","black").attr("stroke-width",1).attr("stroke-opacity",1)}function C(K){K.attr("stroke","black").attr("stroke-width",1.5)}function x(K){K.attr("stroke","black").attr("stroke-width",.2).attr("stroke-opacity",1).attr("fill-opacity",1)}function S(K){var ee=K.parcatsViewModel.pathSelection,oe=K.categoryViewModel.model.dimensionInd,q=K.categoryViewModel.model.categoryInd;return ee.filter(function($){return $.model.categoryInds[oe]===q&&$.model.color===K.color})}function b(K){var ee=m.select(K.parentNode).selectAll("rect.bandrect");ee.each(function(oe){var q=S(oe);d(q),q.each(function(){A.raiseToTop(this)})}),M(m.select(K.parentNode))}function a(K){var ee=m.select(K).datum(),oe=S(ee);d(oe),oe.each(function(){A.raiseToTop(this)}),m.select(K.parentNode).selectAll("rect.bandrect").filter(function(q){return q.color===ee.color}).each(function(){A.raiseToTop(this),C(m.select(this))})}function E(K,ee,oe){var q=m.select(K).datum(),$=q.categoryViewModel.model,le=q.parcatsViewModel.graphDiv,ie=m.select(K.parentNode).selectAll("rect.bandrect"),he=[];ie.each(function(Me){var Te=S(Me);Te.each(function(Oe){Array.prototype.push.apply(he,f(Oe))})});var me={};me[$.dimensionInd]=$.categoryValue,le.emit(ee,{points:he,event:oe,constraints:me})}function y(K,ee,oe){var q=m.select(K).datum(),$=q.categoryViewModel.model,le=q.parcatsViewModel.graphDiv,ie=S(q),he=[];ie.each(function(Me){Array.prototype.push.apply(he,f(Me))});var me={};me[$.dimensionInd]=$.categoryValue,q.rawColor!==void 0&&(me.color=q.rawColor),le.emit(ee,{points:he,event:oe,constraints:me})}function z(K,ee,oe){K._fullLayout._calcInverseTransform(K);var q=K._fullLayout._invScaleX,$=K._fullLayout._invScaleY,le=m.select(oe.parentNode).select("rect.catrect"),ie=le.node().getBoundingClientRect(),he=le.datum(),me=he.parcatsViewModel,Me=me.model.dimensions[he.model.dimensionInd],Te=me.trace,Oe=ie.top+ie.height/2,Ne,Ee;me.dimensions.length>1&&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("<br>");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("<br>"),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($){$.y<q&&q<=$.y+$.height&&(K.potentialClickBand=this)}))}),K.parcatsViewModel.dragDimension=K,L.loneUnhover(K.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()))}function _(K){if(K.parcatsViewModel.arrangement!=="fixed"&&(K.dragHasMoved=!0,K.dragDimensionDisplayInd!==null)){var ee=K.dragDimensionDisplayInd,oe=ee-1,q=ee+1,$=K.parcatsViewModel.dimensions[ee];if(K.dragCategoryDisplayInd!==null){var le=$.categories[K.dragCategoryDisplayInd];le.model.dragY+=m.event.dy;var ie=le.model.dragY,he=le.model.displayInd,me=$.categories,Me=me[he-1],Te=me[he+1];Me!==void 0&&ie<Me.y+Me.height/2&&(le.model.displayInd=Me.model.displayInd,Me.model.displayInd=he),Te!==void 0&&ie+le.height>Te.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.dragX<Oe.x+Oe.width&&($.model.displayInd=Oe.model.displayInd,Oe.model.displayInd=ee),Ne!==void 0&&$.model.dragX+$.width>Ne.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<oe.length;q++)if(K.key===oe[q].uid){ee=q;break}return ee}function J(K,ee){ee===void 0&&(ee=!1);function oe(q){return ee?q.transition():q}K.pathSelection.data(function(q){return q.paths},n),oe(K.pathSelection).attr("d",function(q){return q.svgD})}function te(K,ee){ee===void 0&&(ee=!1);function oe(me){return ee?me.transition():me}K.dimensionSelection.data(function(me){return me.dimensions},n);var q=K.dimensionSelection.selectAll("g.category").data(function(me){return me.categories},n);oe(K.dimensionSelection).attr("transform",function(me){return v(me.x,0)}),oe(q).attr("transform",function(me){return v(0,me.y)});var $=q.select(".dimlabel");$.text(function(me,Me){return Me===0?me.parcatsViewModel.model.dimensions[me.model.dimensionInd].dimensionLabel:null});var le=q.select(".catlabel");le.attr("text-anchor",function(me){return l(me)?"start":"end"}).attr("x",function(me){return l(me)?me.width+5:-5}).each(function(me){var Me,Te;l(me)?(Me=me.width+5,Te="start"):(Me=-5,Te="end"),m.select(this).selectAll("tspan").attr("x",Me).attr("text-anchor",Te)});var ie=q.selectAll("rect.bandrect").data(function(me){return me.bands},n),he=ie.enter().append("rect").attr("class","bandrect").attr("cursor","move").attr("stroke-opacity",0).attr("fill",function(me){return me.color}).attr("fill-opacity",0);ie.attr("fill",function(me){return me.color}).attr("width",function(me){return me.width}).attr("height",function(me){return me.height}).attr("y",function(me){return me.y}),x(he),ie.each(function(){A.raiseToTop(this)}),ie.exit().remove()}function ae(K,ee,oe){var q=oe[0],$=ee.margin||{l:80,r:80,t:100,b:80},le=q.trace,ie=le.domain,he=ee.width,me=ee.height,Me=Math.floor(he*(ie.x[1]-ie.x[0])),Te=Math.floor(me*(ie.y[1]-ie.y[0])),Oe=ie.x[0]*he+$.l,Ne=ee.height-ie.y[1]*ee.height+$.t,Ee=le.line.shape,xe;le.hoverinfo==="all"?xe=["count","probability"]:xe=(le.hoverinfo||"").split("+");var Se={trace:le,key:le.uid,model:q,x:Oe,y:Ne,width:Me,height:Te,hoveron:le.hoveron,hoverinfoItems:xe,arrangement:le.arrangement,bundlecolors:le.bundlecolors,sortpaths:le.sortpaths,labelfont:le.labelfont,categorylabelfont:le.tickfont,pathShape:Ee,dragDimension:null,margin:$,paths:[],dimensions:[],graphDiv:K,traceSelection:null,pathSelection:null,dimensionSelection:null};return q.dimensions&&(Z(Se),Q(Se)),Se}function ce(K,ee,oe,q,$){var le=[],ie=[],he,me;for(me=0;me<oe.length-1;me++)he=P(oe[me]+K[me],K[me+1]),le.push(he($)),ie.push(he(1-$));var Me="M "+K[0]+","+ee[0];for(Me+="l"+oe[0]+",0 ",me=1;me<oe.length;me++)Me+="C"+le[me-1]+","+ee[me-1]+" "+ie[me-1]+","+ee[me]+" "+K[me]+","+ee[me],Me+="l"+oe[me]+",0 ";for(Me+="l0,"+q+" ",Me+="l -"+oe[oe.length-1]+",0 ",me=oe.length-2;me>=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)),De<Ie?-1:De>Ie?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;Se<Me.length;Se++){var Ue=Me[Se],He;Ee>0?He=xe*(Ue.count/Ee):He=0;for(var Fe=new Array(q.length),Ge=0;Ge<Ue.categoryInds.length;Ge++){var nt=Ue.categoryInds[Ge],qe=$[Ge][nt],$e=le[Ge];Fe[$e]=q[$e][qe],q[$e][qe]+=He;var et=K.dimensions[$e].categories[qe],ct=et.bands.length,dt=et.bands[ct-1];if(dt===void 0||Ue.rawColor!==dt.rawColor){var pt=dt===void 0?0:dt.y+dt.height;et.bands.push({key:pt,color:Ue.color,rawColor:Ue.rawColor,height:He,width:et.width,count:Ue.count,y:pt,categoryViewModel:et,parcatsViewModel:K})}else{var At=et.bands[ct-1];At.height+=He,At.count+=Ue.count}}var Mt;K.pathShape==="hspline"?Mt=ce(he,Fe,me,He,.5):Mt=ce(he,Fe,me,He,0),Ne[Se]={key:Ue.valueInds[0],model:Ue,height:He,leftXs:he,topYs:Fe,dimWidths:me,svgD:Mt,parcatsViewModel:K}}K.paths=Ne}function Z(K){var ee=K.model.dimensions.map(function(ie){return{displayInd:ie.displayInd,dimensionInd:ie.dimensionInd}});ee.sort(function(ie,he){return ie.displayInd-he.displayInd});var oe=[];for(var q in ee){var $=ee[q].dimensionInd,le=K.model.dimensions[$];oe.push(j(K,le))}K.dimensions=oe}function j(K,ee){var oe=40,q=16,$=K.model.dimensions.length,le=ee.displayInd,ie,he,me;$>1?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;Ge<Oe;Ge++)Fe=qe[Ge].categoryInd,Ue=ee.categories[Fe],Ee>0?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<ae*Q;ee+=ae){var oe=ee+ae,q=Y[oe];if(ae*J<ae*s(j,q))return t(j,K);if(ae*J<ae*q||oe===Q)return t(q,j);K=j,j=q}}function l(U,Y){for(var J=0;J<Y.length;J++)if(U>=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;Z<Y.length;Z++)te=Y[Z],ae=te[1]-te[0],J.push(Q),J.push(ae),ce=Z+1,ce<Y.length&&(Q=Y[ce][0]-te[1]);return J.push(U.height),J}function f(U,Y){return U.map(function(J){return J.map(function(te){return Math.max(0,te*Y)}).sort(A)})}function w(U,Y){var J=m.bar.handleHeight;if(!(Y>U[1]+J||Y<U[0]-J))return 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]<K[q][0]-Y?oe:q),!isNaN(ae)){var le=K[ae],ie=w(le,Y);ie&&(ce.interval=j[ae],ce.intervalPix=le,ce.region=ie)}}if(U.ordinal&&!ce.region){var he=U.unitTickvals,me=U.unitToPaddedPx.invert(Y);for(Q=0;Q<he.length;Q++){var Me=[he[Math.max(Q-1,0)]*.25+he[Q]*.75,he[Math.min(Q+1,he.length-1)]*.25+he[Q]*.75];if(me>=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]<j[0]&&j.reverse(),ae.newExtent=[n(0,j,ae.newExtent[0],ae.stayingIntervals),n(1,j,ae.newExtent[1],ae.stayingIntervals)];var K=ae.newExtent[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;p<A;p++)v[p]=.5;return v}},25706:function(G){G.exports={maxDimensionCount:60,overdrag:45,verticalPadding:2,tickDistance:50,canvasPixelRatio:1,blockLineCount:5e3,layers:["contextLineLayer","focusLineLayer","pickLineLayer"],axisTitleOffset:28,axisExtentOffset:10,bar:{width:4,captureWidth:10,fillColor:"magenta",fillOpacity:1,snapDuration:150,snapRatio:.25,snapClose:.01,strokeOpacity:1,strokeWidth:1,handleHeight:8,handleOpacity:1,handleOverlap:0},cn:{axisExtentText:"axis-extent-text",parcoordsLineLayers:"parcoords-line-layers",parcoordsLineLayer:"parcoords-lines",parcoords:"parcoords",parcoordsControlView:"parcoords-control-view",yAxis:"y-axis",axisOverlays:"axis-overlays",axis:"axis",axisHeading:"axis-heading",axisTitle:"axis-title",axisExtent:"axis-extent",axisExtentTop:"axis-extent-top",axisExtentTopText:"axis-extent-top-text",axisExtentBottom:"axis-extent-bottom",axisExtentBottomText:"axis-extent-bottom-text",axisBrush:"axis-brush"},id:{filterBarPattern:"filter-bar-pattern"}}},3633:function(G,V,e){var m=e(71828),P=e(52075).hasColorscale,i=e(1586),L=e(27670).c,A=e(85501),v=e(89298),p=e(73362),t=e(57920),r=e(25706).maxDimensionCount,s=e(94397);function n(c,u,g,f,w){var h=w("line.color",g);if(P(c,"line")&&m.isArrayOrTypedArray(h)){if(h.length)return w("line.colorscale"),i(c,u,f,w,{prefix:"line.",cLetter:"c"}),h.length;u.line.color=g}return 1/0}function l(c,u,g,f){function w(T,C){return m.coerce(c,u,p.dimensions,T,C)}var h=w("values"),o=w("visible");if(h&&h.length||(o=u.visible=!1),o){w("label"),w("tickvals"),w("ticktext"),w("tickformat");var d=w("range");u._ax={_id:"y",type:"linear",showexponent:"all",exponentformat:"B",range:d},v.setConvert(u._ax,f.layout),w("multiselect");var M=w("constraintrange");M&&(u.constraintrange=t.cleanRanges(M,u))}}G.exports=function(u,g,f,w){function h(C,x){return m.coerce(u,g,p,C,x)}var o=u.dimensions;Array.isArray(o)&&o.length>r&&(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<y&&(a.currentRafs[I]=window.requestAnimationFrame(function(){B(k+1)})),a.drawCompleted=!1)}a.drawCompleted||(n(S),a.drawCompleted=!0),B(0)}function u(S){return Math.max(v,Math.min(1-v,S))}function g(S,b){for(var a=new Array(256),E=0;E<256;E++)a[E]=S(E/255).concat(b);return a}function f(S,b){return(S>>>8*b)%256/255}function w(S,b,a){for(var E=new Array(S*(L+4)),y=0,z=0;z<S;z++){for(var I=0;I<L;I++)E[y++]=I<b.length?b[I].paddedUnitValues[z]:.5;E[y++]=f(z,2),E[y++]=f(z,1),E[y++]=f(z,0),E[y++]=u(a[z])}return E}function h(S,b,a){for(var E=new Array(b*8),y=0,z=0;z<b;z++)for(var I=0;I<2;I++)for(var B=0;B<4;B++){var k=S*4+B,O=a[z*64+k];k===63&&I===0&&(O*=-1),E[y++]=O}return E}function o(S){var b="0"+S;return b.substr(b.length-2)}function d(S){return S<L?"p"+o(S+1)+"_"+o(S+4):"colors"}function M(S,b,a){for(var E=0;E<=L;E+=4)S[d(E)](h(E/4,b,a))}function T(S){for(var b={},a=0;a<=L;a+=4)b[d(a)]=S.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)});return b}function C(S,b,a,E,y,z,I,B,k,O,N,_,U,Y){for(var J=[[],[]],te=0;te<64;te++)J[0][te]=te===y?1:0,J[1][te]=te===z?1:0;I*=Y,B*=Y,k*=Y,O*=Y;var ae=S.lines.canvasOverdrag*Y,ce=S.domain,Q=S.canvasWidth*Y,Z=S.canvasHeight*Y,j=S.pad.l*Y,K=S.pad.b*Y,ee=S.layoutHeight*Y,oe=S.layoutWidth*Y,q=S.deselectedLines.color,$=S.deselectedLines.opacity,le=A.extendFlat({key:N,resolution:[Q,Z],viewBoxPos:[I+ae,B],viewBoxSize:[k,O],i0:y,i1:z,dim0A:J[0].slice(0,16),dim0B:J[0].slice(16,32),dim0C:J[0].slice(32,48),dim0D:J[0].slice(48,64),dim1A:J[1].slice(0,16),dim1B:J[1].slice(16,32),dim1C:J[1].slice(32,48),dim1D:J[1].slice(48,64),drwLayer:_,contextColor:[q[0]/255,q[1]/255,q[2]/255,$!=="auto"?q[3]*$:Math.max(1/255,Math.pow(1/S.lines.color.length,1/3))],scissorX:(E===b?0:I+ae)+(j-ae)+oe*ce.x[0],scissorWidth:(E===a?Q-I+ae:k+.5)+(E===b?I+ae:0),scissorY:B+K+ee*ce.y[0],scissorHeight:O,viewportX:j-ae+oe*ce.x[0],viewportY:K+ee*ce.y[0],viewportWidth:Q,viewportHeight:Z},U);return le}function x(S){var b=p-1,a=Math.max(0,Math.floor(S[0]*b),0),E=Math.min(b,Math.ceil(S[1]*b),b);return[Math.min(a,E),Math.max(a,E)]}G.exports=function(S,b){var a=b.context,E=b.pick,y=b.regl,z=y._gl,I=z.getParameter(z.ALIASED_LINE_WIDTH_RANGE),B=Math.max(I[0],Math.min(I[1],b.viewModel.plotGlPixelRatio)),k={currentRafs:{},drawCompleted:!0,clearOnly:!1},O,N,_,U,Y=T(y),J,te=y.texture(s),ae=[];Q(b);var ce=y({profile:!1,blend:{enable:a,func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:1,dstAlpha:1},equation:{rgb:"add",alpha:"add"},color:[0,0,0,0]},depth:{enable:!a,mask:!0,func:"less",range:[0,1]},cull:{enable:!0,face:"back"},scissor:{enable:!0,box:{x:y.prop("scissorX"),y:y.prop("scissorY"),width:y.prop("scissorWidth"),height:y.prop("scissorHeight")}},viewport:{x:y.prop("viewportX"),y:y.prop("viewportY"),width:y.prop("viewportWidth"),height:y.prop("viewportHeight")},dither:!1,vert:P,frag:i,primitive:"lines",lineWidth:B,attributes:Y,uniforms:{resolution:y.prop("resolution"),viewBoxPos:y.prop("viewBoxPos"),viewBoxSize:y.prop("viewBoxSize"),dim0A:y.prop("dim0A"),dim1A:y.prop("dim1A"),dim0B:y.prop("dim0B"),dim1B:y.prop("dim1B"),dim0C:y.prop("dim0C"),dim1C:y.prop("dim1C"),dim0D:y.prop("dim0D"),dim1D:y.prop("dim1D"),loA:y.prop("loA"),hiA:y.prop("hiA"),loB:y.prop("loB"),hiB:y.prop("hiB"),loC:y.prop("loC"),hiC:y.prop("hiC"),loD:y.prop("loD"),hiD:y.prop("hiD"),palette:te,contextColor:y.prop("contextColor"),maskTexture:y.prop("maskTexture"),drwLayer:y.prop("drwLayer"),maskHeight:y.prop("maskHeight")},offset:y.prop("offset"),count:y.prop("count")});function Q(q){O=q.model,N=q.viewModel,_=N.dimensions.slice(),U=_[0]?_[0].values.length:0;var $=O.lines,le=E?$.color.map(function(he,me){return me/$.color.length}):$.color,ie=w(U,_,le);M(Y,U,ie),!a&&!E&&(te=y.texture(A.extendFlat({data:g(O.unitToColor,255)},s)))}function Z(q){var $,le,ie,he=[[],[]];for(ie=0;ie<64;ie++){var me=!q&&ie<_.length?_[ie].brush.filter.getBounds():[-1/0,1/0];he[0][ie]=me[0],he[1][ie]=me[1]}var Me=p*8,Te=new Array(Me);for($=0;$<Me;$++)Te[$]=255;if(!q)for($=0;$<_.length;$++){var Oe=$%8,Ne=($-Oe)/8,Ee=Math.pow(2,Oe),xe=_[$],Se=xe.brush.filter.get();if(!(Se.length<2)){var Ue=x(Se[0])[1];for(le=1;le<Se.length;le++){var He=x(Se[le]);for(ie=Ue+1;ie<He[0];ie++)Te[ie*8+Ne]&=~Ee;Ue=Math.max(Ue,He[1])}}}var Fe={shape:[8,p],format:"alpha",type:"uint8",mag:"nearest",min:"nearest",data:Te};return J?J(Fe):J=y.texture(Fe),{maskTexture:J,maskHeight:p,loA:he[0].slice(0,16),loB:he[0].slice(16,32),loC:he[0].slice(32,48),loD:he[0].slice(48,64),hiA:he[1].slice(0,16),hiB:he[1].slice(16,32),hiC:he[1].slice(32,48),hiD:he[1].slice(48,64)}}function j(q,$,le){var ie=q.length,he,me,Me,Te=1/0,Oe=-1/0;for(he=0;he<ie;he++)q[he].dim0.canvasX<Te&&(Te=q[he].dim0.canvasX,me=he),q[he].dim1.canvasX>Oe&&(Oe=q[he].dim1.canvasX,Me=he);ie===0&&l(y,0,0,O.canvasWidth,O.canvasHeight);var Ne=Z(a);for(he=0;he<ie;he++){var Ee=q[he],xe=Ee.dim0.crossfilterDimensionIndex,Se=Ee.dim1.crossfilterDimensionIndex,Ue=Ee.canvasX,He=Ee.canvasY,Fe=Ue+Ee.panelSizeX,Ge=Ee.plotGlPixelRatio;if($||!ae[xe]||ae[xe][0]!==Ue||ae[xe][1]!==Fe){ae[xe]=[Ue,Fe];var nt=C(O,me,Me,he,xe,Se,Ue,He,Ee.panelSizeX,Ee.panelSizeY,Ee.dim0.crossfilterDimensionIndex,a?0:E?2:1,Ne,Ge);k.clearOnly=le;var qe=$?O.lines.blockLineCount:U;c(y,ce,k,qe,U,nt)}}}function K(q,$){return y.read({x:q,y:$,width:1,height:1,data:r}),r}function ee(q,$,le,ie){var he=new Uint8Array(4*le*ie);return y.read({x:q,y:$,width:le,height:ie,data:he}),he}function oe(){S.style["pointer-events"]="none",te.destroy(),J&&J.destroy();for(var q in Y)Y[q].destroy()}return{render:j,readPixel:K,readPixels:ee,destroy:oe,update:Q}}},94397:function(G){G.exports=function(V,e,m,P){P||(P=1/0);var i,L;for(i=0;i<e.length;i++)L=e[i],L.visible&&(P=Math.min(P,L[m].length));for(P===1/0&&(P=0),V._length=P,i=0;i<e.length;i++)L=e[i],L.visible&&(L._length=P);return P}},17171:function(G,V,e){var m=e(39898),P=e(71828),i=P.numberFormat,L=e(36652),A=e(89298),v=P.strRotate,p=P.strTranslate,t=e(63893),r=e(91424),s=e(21081),n=e(28984),l=n.keyFun,c=n.repeat,u=n.unwrap,g=e(1602),f=e(25706),w=e(57920),h=e(83398);function o(J,te,ae){return P.aggNums(J,null,te,ae)}function d(J,te){return T(o(Math.min,J,te),o(Math.max,J,te))}function M(J){var te=J.range;return te?T(te[0],te[1]):d(J.values,J._length)}function T(J,te){return(isNaN(J)||!isFinite(J))&&(J=0),(isNaN(te)||!isFinite(te))&&(te=0),J===te&&(J===0?(J-=1,te+=1):(J*=.9,te*=1.1)),[J,te]}function C(J,te){return te?function(ae,ce){var Q=te[ce];return Q??J(ae)}:J}function x(J,te,ae,ce,Q){var Z=M(ae);return ce?m.scale.ordinal().domain(ce.map(C(i(ae.tickformat),Q))).range(ce.map(function(j){var K=(j-Z[0])/(Z[1]-Z[0]);return J-te+K*(2*te-J)})):m.scale.linear().domain(Z).range([J-te,te])}function S(J,te){return m.scale.linear().range([te,J-te])}function b(J,te){return m.scale.linear().domain(M(J)).range([te,1-te])}function a(J){if(J.tickvals){var te=M(J);return m.scale.ordinal().domain(J.tickvals).range(J.tickvals.map(function(ae){return(ae-te[0])/(te[1]-te[0])}))}}function E(J){var te=J.map(function(Z){return Z[0]}),ae=J.map(function(Z){var j=L(Z[1]);return m.rgb("rgb("+j[0]+","+j[1]+","+j[2]+")")}),ce=function(Z){return function(j){return j[Z]}},Q="rgb".split("").map(function(Z){return m.scale.linear().clamp(!0).domain(te).range(ae.map(ce(Z)))});return function(Z){return Q.map(function(j){return j(Z)})}}function y(J){return J.dimensions.some(function(te){return te.brush.filterSpecified})}function z(J,te,ae){var ce=u(te),Q=ce.trace,Z=g.convertTypedArray(ce.lineColor),j=Q.line,K={color:L(Q.unselected.line.color),opacity:Q.unselected.line.opacity},ee=s.extractOpts(j),oe=ee.reversescale?s.flipScale(ce.cscale):ce.cscale,q=Q.domain,$=Q.dimensions,le=J.width,ie=Q.labelangle,he=Q.labelside,me=Q.labelfont,Me=Q.tickfont,Te=Q.rangefont,Oe=P.extendDeepNoArrays({},j,{color:Z.map(m.scale.linear().domain(M({values:Z,range:[ee.min,ee.max],_length:Q._length}))),blockLineCount:f.blockLineCount,canvasOverdrag:f.overdrag*f.canvasPixelRatio}),Ne=Math.floor(le*(q.x[1]-q.x[0])),Ee=Math.floor(J.height*(q.y[1]-q.y[0])),xe=J.margin||{l:80,r:80,t:100,b:80},Se=Ne,Ue=Ee;return{key:ae,colCount:$.filter(g.isVisible).length,dimensions:$,tickDistance:f.tickDistance,unitToColor:E(oe),lines:Oe,deselectedLines:K,labelAngle:ie,labelSide:he,labelFont:me,tickFont:Me,rangeFont:Te,layoutWidth:le,layoutHeight:J.height,domain:q,translateX:q.x[0]*le,translateY:J.height-q.y[1]*J.height,pad:xe,canvasWidth:Se*f.canvasPixelRatio+2*Oe.canvasOverdrag,canvasHeight:Ue*f.canvasPixelRatio,width:Se,height:Ue,canvasPixelRatio:f.canvasPixelRatio}}function I(J,te,ae){var ce=ae.width,Q=ae.height,Z=ae.dimensions,j=ae.canvasPixelRatio,K=function(le){return ce*le/Math.max(1,ae.colCount-1)},ee=f.verticalPadding/Q,oe=S(Q,f.verticalPadding),q={key:ae.key,xScale:K,model:ae,inBrushDrag:!1},$={};return q.dimensions=Z.filter(g.isVisible).map(function(le,ie){var he=b(le,ee),me=$[le.label];$[le.label]=(me||0)+1;var Me=le.label+(me?"__"+me:""),Te=le.constraintrange,Oe=Te&&Te.length;Oe&&!Array.isArray(Te[0])&&(Te=[Te]);var Ne=Oe?Te.map(function($e){return $e.map(he)}):[[-1/0,1/0]],Ee=function(){var $e=q;$e.focusLayer&&$e.focusLayer.render($e.panels,!0);var et=y($e);!J.contextShown()&&et?($e.contextLayer&&$e.contextLayer.render($e.panels,!0),J.contextShown(!0)):J.contextShown()&&!et&&($e.contextLayer&&$e.contextLayer.render($e.panels,!0,!0),J.contextShown(!1))},xe=le.values;xe.length>le._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<Se.length;Ge++)if(Se[Ge]<Se[Ge-1]){for(var nt=Se.map(He).sort(Fe),qe=0;qe<Se.length;qe++)Se[qe]=nt[qe].val,Ue[qe]=nt[qe].text;break}}else Se=void 0;return xe=g.convertTypedArray(xe),{key:Me,label:le.label,tickFormat:le.tickformat,tickvals:Se,ticktext:Ue,ordinal:g.isOrdinal(le),multiselect:le.multiselect,xIndex:ie,crossfilterDimensionIndex:ie,visibleIndex:le._index,height:Q,values:xe,paddedUnitValues:xe.map(he),unitTickvals:Se&&Se.map(he),xScale:K,x:K(ie),canvasX:K(ie)*j,unitToPaddedPx:oe,domainScale:x(Q,f.verticalPadding,le,Se,Ue),ordinalScale:a(le),parent:q,model:ae,brush:w.makeBrush(J,Oe,Ne,function(){J.linePickActive(!1)},Ee,function($e){if(q.focusLayer.render(q.panels,!0),q.pickLayer&&q.pickLayer.render(q.panels,!0),J.linePickActive(!0),te&&te.filterChanged){var et=he.invert,ct=$e.map(function(dt){return dt.map(et).sort(P.sorterAsc)}).sort(function(dt,pt){return dt[0]-pt[0]});te.filterChanged(q.key,le._index,ct)}})}}),q}function B(J){J.classed(f.cn.axisExtentText,!0).attr("text-anchor","middle").style("cursor","default")}function k(){var J=!0,te=!1;return{linePickActive:function(ae){return arguments.length?J=!!ae:J},contextShown:function(ae){return arguments.length?te=!!ae:te}}}function O(J,te){var ae=te==="top"?1:-1,ce=J*Math.PI/180,Q=Math.sin(ce),Z=Math.cos(ce);return{dir:ae,dx:Q,dy:Z,degrees:J}}function N(J,te,ae){for(var ce=te.panels||(te.panels=[]),Q=J.data(),Z=0;Z<Q.length-1;Z++){var j=ce[Z]||(ce[Z]={}),K=Q[Z],ee=Q[Z+1];j.dim0=K,j.dim1=ee,j.canvasX=K.canvasX,j.panelSizeX=ee.canvasX-K.canvasX,j.panelSizeY=te.model.canvasHeight,j.y=0,j.canvasY=0,j.plotGlPixelRatio=ae}}function _(J){for(var te=0;te<J.length;te++)for(var ae=0;ae<J[te].length;ae++)for(var ce=J[te][ae].trace,Q=ce.dimensions,Z=0;Z<Q.length;Z++){var j=Q[Z].values,K=Q[Z]._ax;K&&(K.range?K.range=T(K.range[0],K.range[1]):K.range=d(j,ce._length),K.dtick||(K.dtick=.01*(Math.abs(K.range[1]-K.range[0])||1)),K.tickformat=Q[Z].tickformat,A.calcTicks(K),K.cleanRange())}}function U(J,te){return A.tickText(J._ax,te,!1).text}function Y(J,te){if(J.ordinal)return"";var ae=J.domainScale.domain(),ce=ae[te?ae.length-1:0];return U(J.model.dimensions[J.visibleIndex],ce)}G.exports=function(te,ae,ce,Q){var Z=te._context.staticPlot,j=te._fullLayout,K=j._toppaper,ee=j._glcontainer,oe=te._context.plotGlPixelRatio,q=te._fullLayout.paper_bgcolor;_(ae);var $=k(),le=ae.filter(function(qe){return u(qe).trace.visible}).map(z.bind(0,ce)).map(I.bind(0,$,Q));ee.each(function(qe,$e){return P.extendFlat(qe,le[$e])});var ie=ee.selectAll(".gl-canvas").each(function(qe){qe.viewModel=le[0],qe.viewModel.plotGlPixelRatio=oe,qe.viewModel.paperColor=q,qe.model=qe.viewModel?qe.viewModel.model:null}),he=null,me=ie.filter(function(qe){return qe.pick});me.style("pointer-events",Z?"none":"auto").on("mousemove",function(qe){if($.linePickActive()&&qe.lineLayer&&Q&&Q.hover){var $e=m.event,et=this.width,ct=this.height,dt=m.mouse(this),pt=dt[0],At=dt[1];if(pt<0||At<0||pt>=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<w;o++)u[o]=String(s.label0+o*s.dlabel);var M={},T=v(l["_"+s.type+"colormap"]),C=0,x=!1;for(o=0;o<w;o++){var S,b,a;if(h){if(S=f[o],!m(S))continue;S=+S}else S=1;b=u[o],(b===void 0||b==="")&&(b=o),b=String(b);var E=M[b];E===void 0?(M[b]=n.length,a=c.indexOf(b)!==-1,a||(C+=S),n.push({v:S,label:b,color:T(g[o],b),i:o,pts:[o],hidden:a})):(x=!0,d=n[E],d.v+=S,d.pts.push(o),d.hidden||(C+=S),d.color===!1&&g[o]&&(d.color=T(g[o],b)))}n=n.filter(function(z){return z.v>=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;w<c.length;w++){var h=c[w],o=h[0].trace.type;if(o===n)for(var d=0;d<h.length;d++){var M=h[d];M.color===!1&&(g[M.label]?M.color=g[M.label]:(g[M.label]=M.color=u[f%u.length],f++))}}}function t(r,s){var n,l=JSON.stringify(r),c=s[l];if(!c){for(c=r.slice(),n=0;n<r.length;n++)c.push(P(r[n]).lighten(20).toHexString());for(n=0;n<r.length;n++)c.push(P(r[n]).darken(20).toHexString());s[l]=c}return c}G.exports={calc:A,crossTraceCalc:p,makePullColorFn:v,generateExtendedColors:t}},37434:function(G,V,e){var m=e(92770),P=e(71828),i=e(34e3),L=e(27670).c,A=e(90769).handleText,v=e(71828).coercePattern;function p(s,n){var l=Array.isArray(s),c=P.isArrayOrTypedArray(n),u=Math.min(l?s.length:1/0,c?n.length:1/0);if(isFinite(u)||(u=0),u&&c){for(var g,f=0;f<u;f++){var w=n[f];if(m(w)&&w>0){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;v<A.length;v++){var p=L[A[v]];if(p||p===0||p==="")return p}},V.castOption=function(L,A){if(Array.isArray(L))return V.getFirstFilled(L,A);if(L)return L},V.getRotationAngle=function(i){return(i==="auto"?0:i)*Math.PI/180}},58810:function(G,V,e){G.exports={attributes:e(34e3),supplyDefaults:e(37434).supplyDefaults,supplyLayoutDefaults:e(92097),layoutAttributes:e(92774),calc:e(32354).calc,crossTraceCalc:e(32354).crossTraceCalc,plot:e(14575).plot,style:e(68357),styleOne:e(63463),moduleType:"trace",name:"pie",basePlotModule:e(13584),categories:["pie-like","pie","showLegend"],meta:{}}},92774:function(G){G.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}},92097:function(G,V,e){var m=e(71828),P=e(92774);G.exports=function(L,A){function v(p,t){return m.coerce(L,A,P,p,t)}v("hiddenlabels"),v("piecolorway",A.colorway),v("extendpiecolors")}},14575:function(G,V,e){var m=e(39898),P=e(74875),i=e(30211),L=e(7901),A=e(91424),v=e(71828),p=v.strScale,t=v.strTranslate,r=e(63893),s=e(72597),n=s.recordMinTextSize,l=s.clearMinTextSize,c=e(97313).TEXTPAD,u=e(53581),g=e(20007),f=e(71828).isValidTextValue;function w(Z,j){var K=Z._context.staticPlot,ee=Z._fullLayout,oe=ee._size;l("pie",ee),T(j,Z),Y(j,oe);var q=v.makeTraceGroups(ee._pielayer,j,"trace").each(function($){var le=m.select(this),ie=$[0],he=ie.trace;te($),le.attr("stroke-linejoin","round"),le.each(function(){var me=m.select(this).selectAll("g.slice").data($);me.enter().append("g").classed("slice",!0),me.exit().remove();var Me=[[[],[]],[[],[]]],Te=!1;me.each(function(Fe,Ge){if(Fe.hidden){m.select(this).selectAll("path,g").remove();return}Fe.pointNumber=Fe.i,Fe.curveNumber=he.index,Me[Fe.pxmid[1]<0?0:1][Fe.pxmid[0]<0?0:1].push(Fe);var nt=ie.cx,qe=ie.cy,$e=m.select(this),et=$e.selectAll("path.surface").data([Fe]);if(et.enter().append("path").classed("surface",!0).style({"pointer-events":K?"none":"all"}),$e.call(o,Z,$),he.pull){var ct=+u.castOption(he.pull,Fe.pts)||0;ct>0&&(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("<br>"),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<Z.length;oe++)if(K=Z[oe][0],ee=K.trace,ee.title.text){var q=ee.title.text;ee._meta&&(q=v.templateString(q,ee._meta));var $=A.tester.append("text").attr("data-notex",1).text(q).call(A.font,ee.title.font).call(r.convertToTspans,j),le=A.bBox($.node(),!0);K.titleBox={width:le.width,height:le.height},$.remove()}}function C(Z,j,K){var ee=K.r||j.rpx1,oe=j.rInscribed,q=j.startangle===j.stopangle;if(q)return{rCenter:1-oe,scale:0,rotate:0,textPosAngle:0};var $=j.ring,le=$===1&&Math.abs(j.startangle-j.stopangle)===Math.PI*2,ie=j.halfangle,he=j.midangle,me=K.trace.insidetextorientation,Me=me==="horizontal",Te=me==="tangential",Oe=me==="radial",Ne=me==="auto",Ee=[],xe;if(!Ne){var Se=function($e,et){if(x(j,$e)){var ct=Math.abs($e-j.startangle),dt=Math.abs($e-j.stopangle),pt=ct<dt?ct:dt;et==="tan"?xe=b(Z,ee,$,pt,0):xe=S(Z,ee,$,pt,Math.PI/2),xe.textPosAngle=$e,Ee.push(xe)}},Ue;if(Me||Te){for(Ue=4;Ue>=-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<Ee.length;nt++){var qe=Ee[nt].scale;if(Ge<qe&&(Ge=qe,Fe=nt),!Ne&&Ge>=1)break}return Ee[Fe]}function x(Z,j){var K=Z.startangle,ee=Z.stopangle;return K>j&&j>ee||K<j&&j<ee}function S(Z,j,K,ee,oe){j=Math.max(0,j-2*c);var q=Z.width/Z.height,$=y(q,ee,j,K);return{scale:$*2/Z.height,rCenter:a(q,$/j),rotate:E(oe)}}function b(Z,j,K,ee,oe){j=Math.max(0,j-2*c);var q=Z.height/Z.width,$=y(q,ee,j,K);return{scale:$*2/Z.width,rCenter:a(q,$/j),rotate:E(oe+Math.PI/2)}}function a(Z,j){return Math.cos(j)-Z*j}function E(Z){return(180/Math.PI*Z+720)%180-90}function y(Z,j,K,ee){var oe=Z+1/(2*Math.tan(j));return K*Math.min(1/(Math.sqrt(oe*oe+.5)+oe),ee/(Math.sqrt(Z*Z+ee/2)+Z))}function z(Z,j){return Z.v===j.vTotal&&!j.trace.hole?1:Math.min(1/(1+1/Math.sin(Z.halfangle)),Z.ring/2)}function I(Z,j){var K=j.pxmid[0],ee=j.pxmid[1],oe=Z.width/2,q=Z.height/2;return K<0&&(oe*=-1),ee<0&&(q*=-1),{scale:1,rCenter:1,rotate:0,x:oe+Math.abs(q)*(oe>0?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;K<Z.pull.length;K++)Z.pull[K]>j&&(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<Me.length;dt++)pt=Me[dt],!(pt===He||(u.castOption(j.pull,He.pts)||0)>=(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;Te<he.length;Te++)he[Te].yLabelMid!==void 0&&Oe.push(he[Te]);for(Ne=!1,Te=0;ee&&Te<me.length;Te++)if(me[Te].yLabelMid!==void 0){Ne=me[Te];break}for(Te=0;Te<Oe.length;Te++){var Ue=Te&&Oe[Te-1];Ne&&!Te&&(Ue=Ne),Se(Oe[Te],Ue)}}}function Y(Z,j){for(var K=[],ee=0;ee<Z.length;ee++){var oe=Z[ee][0],q=oe.trace,$=q.domain,le=j.w*($.x[1]-$.x[0]),ie=j.h*($.y[1]-$.y[0]);q.title.text&&q.title.position!=="middle center"&&(ie-=N(oe,j));var he=le/2,me=ie/2;q.type==="funnelarea"&&!q.scalegroup&&(me/=q.aspectratio),oe.r=Math.min(he,me)/(1+_(q)),oe.cx=j.l+j.w*(q.domain.x[1]+q.domain.x[0])/2,oe.cy=j.t+j.h*(1-q.domain.y[0])-ie/2,q.title.text&&q.title.position.indexOf("bottom")!==-1&&(oe.cy-=N(oe,j)),q.scalegroup&&K.indexOf(q.scalegroup)===-1&&K.push(q.scalegroup)}J(Z,K)}function J(Z,j){for(var K,ee,oe,q=0;q<j.length;q++){var $=1/0,le=j[q];for(ee=0;ee<Z.length;ee++)if(K=Z[ee][0],oe=K.trace,oe.scalegroup===le){var ie;if(oe.type==="pie")ie=K.r*K.r;else if(oe.type==="funnelarea"){var he,me;oe.aspectratio>1?(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;ee<Z.length;ee++)if(K=Z[ee][0],oe=K.trace,oe.scalegroup===le){var Me=$*K.vTotal;oe.type==="funnelarea"&&(Me/=(1+oe.baseratio)/2,Me/=oe.aspectratio),K.r=Math.sqrt(Me)}}}function te(Z){var j=Z[0],K=j.r,ee=j.trace,oe=u.getRotationAngle(ee.rotation),q=2*Math.PI/j.vTotal,$="px0",le="px1",ie,he,me;if(ee.direction==="counterclockwise"){for(ie=0;ie<Z.length&&Z[ie].hidden;ie++);if(ie===Z.length)return;oe+=q*Z[ie].v,q*=-1,$="px1",le="px0"}for(me=ae(K,oe),ie=0;ie<Z.length;ie++)he=Z[ie],!he.hidden&&(he[$]=me,he.startangle=oe,oe+=q*he.v/2,he.pxmid=ae(K,oe),he.midangle=oe,oe+=q*he.v/2,me=ae(K,oe),he.stopangle=oe,he[le]=me,he.largeArc=he.v>j.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("<br>")}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;d<u;d++)h=f[d*2],o=f[d*2+1],h<w[0]&&(w[0]=h),h>w[2]&&(w[2]=h),o<w[1]&&(w[1]=o),o>w[3]&&(w[3]=o);if(c)g=c;else for(g=new Int32Array(u),d=0;d<u;d++)g[d]=d}else for(u=r.length,f=new Float32Array(2*u),g=new Int32Array(u),d=0;d<u;d++)h=r[d],o=s[d],g[d]=d,f[d*2]=h,f[d*2+1]=o,h<w[0]&&(w[0]=h),h>w[2]&&(w[2]=h),o<w[1]&&(w[1]=o),o>w[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.length<S||s.length<S}this.pointcloudOptions.blend=x,T[3]*=C,this.pointcloudOptions.borderColor=T;var b=t.marker.sizemin,a=Math.max(t.marker.sizemax,t.marker.sizemin);this.pointcloudOptions.sizeMin=b,this.pointcloudOptions.sizeMax=a,this.pointcloudOptions.areaRatio=t.marker.border.arearatio,this.pointcloud.update(this.pointcloudOptions);var E=this.scene.xaxis,y=this.scene.yaxis,z=a/2||.5;t._extremes[E._id]=i(E,[w[0],w[2]],{ppad:z}),t._extremes[y._id]=i(y,[w[1],w[3]],{ppad:z})},v.dispose=function(){this.pointcloud.dispose()};function p(t,r){var s=new A(t,r.uid);return s.update(r),s}G.exports=p},33876:function(G,V,e){var m=e(71828),P=e(10959);G.exports=function(L,A,v){function p(t,r){return m.coerce(L,A,P,t,r)}p("x"),p("y"),p("xbounds"),p("ybounds"),L.xy&&L.xy instanceof Float32Array&&(A.xy=L.xy),L.indices&&L.indices instanceof Int32Array&&(A.indices=L.indices),p("text"),p("marker.color",v),p("marker.opacity"),p("marker.blend"),p("marker.sizemin"),p("marker.sizemax"),p("marker.border.color",v),p("marker.border.arearatio"),A._length=null}},20593:function(G,V,e){G.exports={attributes:e(10959),supplyDefaults:e(33876),calc:e(36563),plot:e(42743),moduleType:"trace",name:"pointcloud",basePlotModule:e(4796),categories:["gl","gl2d","showLegend"],meta:{}}},39953:function(G,V,e){var m=e(41940),P=e(9012),i=e(22399),L=e(77914),A=e(27670).Y,v=e(5386).fF,p=e(50693),t=e(44467).templatedArray,r=e(12663).descriptionOnlyNumbers,s=e(1426).extendFlat,n=e(30962).overrideAll,l=G.exports=n({hoverinfo:s({},P.hoverinfo,{flags:[],arrayOk:!1}),hoverlabel:L.hoverlabel,domain:A({name:"sankey",trace:!0}),orientation:{valType:"enumerated",values:["v","h"],dflt:"h"},valueformat:{valType:"string",dflt:".3s",description:r("value")},valuesuffix:{valType:"string",dflt:""},arrangement:{valType:"enumerated",values:["snap","perpendicular","freeform","fixed"],dflt:"snap"},textfont:m({}),customdata:void 0,node:{label:{valType:"data_array",dflt:[]},groups:{valType:"info_array",impliedEdits:{x:[],y:[]},dimensions:2,freeLength:!0,dflt:[],items:{valType:"number",editType:"calc"}},x:{valType:"data_array",dflt:[]},y:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:i.defaultLine,arrayOk:!0},width:{valType:"number",min:0,dflt:.5,arrayOk:!0}},pad:{valType:"number",arrayOk:!1,min:0,dflt:20},thickness:{valType:"number",arrayOk:!1,min:1,dflt:20},hoverinfo:{valType:"enumerated",values:["all","none","skip"],dflt:"all"},hoverlabel:L.hoverlabel,hovertemplate:v({},{keys:["value","label"]})},link:{arrowlen:{valType:"number",min:0,dflt:0},label:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:i.defaultLine,arrayOk:!0},width:{valType:"number",min:0,dflt:0,arrayOk:!0}},source:{valType:"data_array",dflt:[]},target:{valType:"data_array",dflt:[]},value:{valType:"data_array",dflt:[]},hoverinfo:{valType:"enumerated",values:["all","none","skip"],dflt:"all"},hoverlabel:L.hoverlabel,hovertemplate:v({},{keys:["value","label"]}),colorscales:t("concentrationscales",{editType:"calc",label:{valType:"string",editType:"calc",dflt:""},cmax:{valType:"number",editType:"calc",dflt:1},cmin:{valType:"number",editType:"calc",dflt:0},colorscale:s(p().colorscale,{dflt:[[0,"white"],[1,"black"]]})})}},"calc","nested");l.transforms=void 0},75536:function(G,V,e){var m=e(30962).overrideAll,P=e(27659).a0,i=e(60436),L=e(528),A=e(6964),v=e(28569),p=e(47322).prepSelect,t=e(71828),r=e(73972),s="sankey";V.name=s,V.baseLayoutAttrOverrides=m({hoverlabel:L.hoverlabel},"plot","nested"),V.plot=function(l){var c=P(l.calcdata,s)[0];i(l,c),V.updateFx(l)},V.clean=function(l,c,u,g){var f=g._has&&g._has(s),w=c._has&&c._has(s);f&&!w&&(g._paperdiv.selectAll(".sankey").remove(),g._paperdiv.selectAll(".bgsankey").remove())},V.updateFx=function(l){for(var c=0;c<l._fullData.length;c++)n(l,c)};function n(l,c){var u=l._fullData[c],g=l._fullLayout,f=g.dragmode,w=g.dragmode==="pan"?"move":"crosshair",h=u._bgRect;if(h&&!(f==="pan"||f==="zoom")){A(h,w);var o={_id:"x",c2p:t.identity,_offset:u._sankey.translateX,_length:u._sankey.width},d={_id:"y",c2p:t.identity,_offset:u._sankey.translateY,_length:u._sankey.height},M={gd:l,element:h.node(),plotinfo:{id:c,xaxis:o,yaxis:d,fillRangeItems:t.noop},subplot:c,xaxes:[o],yaxes:[d],doneFnCompleted:function(T){var C=l._fullData[c],x,S=C.node.groups.slice(),b=[];function a(I){for(var B=C._sankey.graph.nodes,k=0;k<B.length;k++)if(B[k].pointNumber===I)return B[k]}for(var E=0;E<T.length;E++){var y=a(T[E].pointNumber);if(y)if(y.group){for(var z=0;z<y.childrenNodes.length;z++)b.push(y.childrenNodes[z].pointNumber);S[y.pointNumber-C.node._count]=!1}else b.push(y.pointNumber)}x=S.filter(Boolean).concat([b]),r.call("_guiRestyle",l,{"node.groups":[x]},c)}};M.prepFn=function(T,C,x){p(T,C,x,M,f)},v.init(M)}}},92930:function(G,V,e){var m=e(68664),P=e(71828),i=e(28984).wrap,L=P.isArrayOrTypedArray,A=P.isIndex,v=e(21081);function p(r){var s=r.node,n=r.link,l=[],c=L(n.color),u=L(n.customdata),g={},f={},w=n.colorscales.length,h;for(h=0;h<w;h++){var o=n.colorscales[h],d=v.extractScale(o,{cLetter:"c"}),M=v.makeColorScaleFunc(d);f[o.label]=M}var T=0;for(h=0;h<n.value.length;h++)n.source[h]>T&&(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;h<S.length;h++){var a=S[h];for(x=0;x<a.length;x++){var E=a[x],y=C+h;b.hasOwnProperty(E)?P.warn("Node "+E+" is already part of a group."):b[E]=y}}var z={source:[],target:[]};for(h=0;h<n.value.length;h++){var I=n.value[h],B=n.source[h],k=n.target[h];if(I>0&&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;c<Math.min(s.length,n.length);c++)if(P.isIndex(s[c],r)&&P.isIndex(n[c],r)){if(s[c]===n[c])return!0;l[s[c]].push(n[c])}var u=m(l);return u.components.some(function(g){return g.length>1})}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<M._fullData.length;b++)if(M._fullData[b].visible&&M._fullData[b].type===p.sankey&&!M._fullData[b]._viewInitial){var a=M._fullData[b].node;M._fullData[b]._viewInitial={node:{groups:a.groups.slice(),x:a.x.slice(),y:a.y.slice()}}}var E=function(ae,ce){var Q=ce.link;Q.originalEvent=m.event,M._hoverdata=[Q],A.click(M,{target:!0})},y=function(ae,ce,Q){M._fullLayout.hovermode!==!1&&(m.select(ae).call(w.bind(0,ce,Q,!0)),ce.link.trace.link.hoverinfo!=="skip"&&(ce.link.fullData=ce.link.trace,M.emit("plotly_hover",{event:m.event,points:[ce.link]})))},z=t(M,"source:")+" ",I=t(M,"target:")+" ",B=t(M,"concentration:")+" ",k=t(M,"incoming flow count:")+" ",O=t(M,"outgoing flow count:")+" ",N=function(ae,ce){if(M._fullLayout.hovermode===!1)return;var Q=ce.link.trace.link;if(Q.hoverinfo==="none"||Q.hoverinfo==="skip")return;var Z=[];function j(ie){var he,me;ie.circular?(he=(ie.circularPathData.leftInnerExtent+ie.circularPathData.rightInnerExtent)/2,me=ie.circularPathData.verticalFullExtent):(he=(ie.source.x1+ie.target.x0)/2,me=(ie.y0+ie.y1)/2);var Me=[he,me];return ie.trace.orientation==="v"&&Me.reverse(),Me[0]+=ce.parent.translateX,Me[1]+=ce.parent.translateY,Me}for(var K=0,ee=0;ee<ce.flow.links.length;ee++){var oe=ce.flow.links[ee];if(!(M._fullLayout.hovermode==="closest"&&ce.link.pointNumber!==oe.pointNumber)){ce.link.pointNumber===oe.pointNumber&&(K=ee),oe.fullData=oe.trace,Q=ce.link.trace.link;var q=j(oe),$={valueLabel:i(ce.valueFormat)(oe.value)+ce.valueSuffix};Z.push({x:q[0],y:q[1],name:$.valueLabel,text:[oe.label||"",z+oe.source.label,I+oe.target.label,oe.concentrationscale?B+i("%0.2f")(oe.flow.labelConcentration):""].filter(r).join("<br>"),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<q[0]?"right":"left",hovertemplate:Q.hovertemplate,hovertemplateLabels:$,eventData:[oe]})}}var le=A.loneHover(Z,{container:C._hoverlayer.node(),outerContainer:C._paper.node(),gd:M,anchorIndex:K});le.each(function(){var ie=this;ce.link.concentrationscale||n(ie,.65),l(ie)})},_=function(ae,ce,Q){M._fullLayout.hovermode!==!1&&(m.select(ae).call(h.bind(0,ce,Q,!0)),ce.link.trace.link.hoverinfo!=="skip"&&(ce.link.fullData=ce.link.trace,M.emit("plotly_unhover",{event:m.event,points:[ce.link]})),A.loneUnhover(C._hoverlayer.node()))},U=function(ae,ce,Q){var Z=ce.node;Z.originalEvent=m.event,M._hoverdata=[Z],m.select(ae).call(f,ce,Q),A.click(M,{target:!0})},Y=function(ae,ce,Q){M._fullLayout.hovermode!==!1&&(m.select(ae).call(g,ce,Q),ce.node.trace.node.hoverinfo!=="skip"&&(ce.node.fullData=ce.node.trace,M.emit("plotly_hover",{event:m.event,points:[ce.node]})))},J=function(ae,ce){if(M._fullLayout.hovermode!==!1){var Q=ce.node.trace.node;if(!(Q.hoverinfo==="none"||Q.hoverinfo==="skip")){var Z=m.select(ae).select("."+p.nodeRect),j=M._fullLayout._paperdiv.node().getBoundingClientRect(),K=Z.node().getBoundingClientRect(),ee=K.left-2-j.left,oe=K.right+2-j.left,q=K.top+K.height/4-j.top,$={valueLabel:i(ce.valueFormat)(ce.node.value)+ce.valueSuffix};ce.node.fullData=ce.node.trace,M._fullLayout._calcInverseTransform(M);var le=M._fullLayout._invScaleX,ie=M._fullLayout._invScaleY,he=A.loneHover({x0:le*ee,x1:le*oe,y:ie*q,name:i(ce.valueFormat)(ce.node.value)+ce.valueSuffix,text:[ce.node.label,k+ce.node.targetLinks.length,O+ce.node.sourceLinks.length].filter(r).join("<br>"),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&&s.warn("node.pad was reduced to ",Ee.nodePadding()," to fit within the figure.");var Se,Ue,He;for(var Fe in oe._groupLookup){var Ge=parseInt(oe._groupLookup[Fe]),nt;for(Se=0;Se<xe.nodes.length;Se++)if(xe.nodes[Se].pointNumber===Ge){nt=xe.nodes[Se];break}if(nt){var qe={pointNumber:parseInt(Fe),x0:nt.x0,x1:nt.x1,y0:nt.y0,y1:nt.y1,partOfGroup:!0,sourceLinks:[],targetLinks:[]};xe.nodes.unshift(qe),nt.childrenNodes.unshift(qe)}}function $e(){for(Se=0;Se<xe.nodes.length;Se++){var Mt=xe.nodes[Se],Vt={},Je,De;for(Ue=0;Ue<Mt.targetLinks.length;Ue++)De=Mt.targetLinks[Ue],Je=De.source.pointNumber+":"+De.target.pointNumber,Vt.hasOwnProperty(Je)||(Vt[Je]=[]),Vt[Je].push(De);var Ie=Object.keys(Vt);for(Ue=0;Ue<Ie.length;Ue++){Je=Ie[Ue];var ze=Vt[Je],Pe=0,be={};for(He=0;He<ze.length;He++)De=ze[He],be[De.label]||(be[De.label]=0),be[De.label]+=De.value,Pe+=De.value;for(He=0;He<ze.length;He++)De=ze[He],De.flow={value:Pe,labelConcentration:be[De.label]/Pe,concentration:De.value/Pe,links:ze},De.concentrationscale&&(De.color=p(De.concentrationscale(De.flow.labelConcentration)))}var se=0;for(Ue=0;Ue<Mt.sourceLinks.length;Ue++)se+=Mt.sourceLinks[Ue].value;for(Ue=0;Ue<Mt.sourceLinks.length;Ue++)De=Mt.sourceLinks[Ue],De.concentrationOut=De.value/se;var ye=0;for(Ue=0;Ue<Mt.targetLinks.length;Ue++)ye+=Mt.targetLinks[Ue].value;for(Ue=0;Ue<Mt.targetLinks.length;Ue++)De=Mt.targetLinks[Ue],De.concenrationIn=De.value/ye}}$e();function et(Mt){Mt.forEach(function(Vt){var Je,De,Ie=0,ze=Vt.length,Pe;for(Vt.sort(function(be,se){return be.y0-se.y0}),Pe=0;Pe<ze;++Pe)Je=Vt[Pe],Je.y0>=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;Se<Vt.length;Se++){var be=Mt[Vt[Se].index];be.x0>ze+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;Se<Math.min(q.node.x.length,q.node.y.length,xe.nodes.length);Se++)if(q.node.x[Se]&&q.node.y[Se]){var dt=[q.node.x[Se]*me,q.node.y[Se]*Me];xe.nodes[Se].x0=dt[0]-he/2,xe.nodes[Se].x1=dt[0]+he/2;var pt=xe.nodes[Se].y1-xe.nodes[Se].y0;xe.nodes[Se].y0=dt[1]-pt/2,xe.nodes[Se].y1=dt[1]+pt/2}if(q.arrangement==="snap"){Te=xe.nodes;var At=ct(Te);et(At)}Ee.update(xe)}return{circular:Ne,key:ee,trace:q,guid:s.randstr(),horizontal:le,width:me,height:Me,nodePad:q.node.pad,nodeLineColor:q.node.line.color,nodeLineWidth:q.node.line.width,linkLineColor:q.link.line.color,linkLineWidth:q.link.line.width,linkArrowLength:q.link.arrowlen,valueFormat:q.valueformat,valueSuffix:q.valuesuffix,textFont:q.textfont,translateX:$.x[0]*j.width+j.margin.l,translateY:j.height-$.y[1]*j.height+j.margin.t,dragParallel:le?Me:me,dragPerpendicular:le?me:Me,arrangement:q.arrangement,sankey:Ee,graph:xe,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}function x(j,K,ee){var oe=p(K.color),q=K.source.label+"|"+K.target.label,$=q+"__"+ee;return K.trace=j.trace,K.curveNumber=j.trace.index,{circular:j.circular,key:$,traceId:j.key,pointNumber:K.pointNumber,link:K,tinyColorHue:t.tinyRGB(oe),tinyColorAlpha:oe.getAlpha(),linkPath:b,linkLineColor:j.linkLineColor,linkLineWidth:j.linkLineWidth,linkArrowLength:j.linkArrowLength,valueFormat:j.valueFormat,valueSuffix:j.valueSuffix,sankey:j.sankey,parent:j,interactionState:j.interactionState,flow:K.flow}}function S(j,K){var ee="",oe=j.width/2,q=j.circularPathData;return j.circularLinkType==="top"?ee="M "+(q.targetX-K)+" "+(q.targetY+oe)+" L"+(q.rightInnerExtent-K)+" "+(q.targetY+oe)+"A"+(q.rightLargeArcRadius+oe)+" "+(q.rightSmallArcRadius+oe)+" 0 0 1 "+(q.rightFullExtent-oe-K)+" "+(q.targetY-q.rightSmallArcRadius)+"L"+(q.rightFullExtent-oe-K)+" "+q.verticalRightInnerExtent+"A"+(q.rightLargeArcRadius+oe)+" "+(q.rightLargeArcRadius+oe)+" 0 0 1 "+(q.rightInnerExtent-K)+" "+(q.verticalFullExtent-oe)+"L"+q.leftInnerExtent+" "+(q.verticalFullExtent-oe)+"A"+(q.leftLargeArcRadius+oe)+" "+(q.leftLargeArcRadius+oe)+" 0 0 1 "+(q.leftFullExtent+oe)+" "+q.verticalLeftInnerExtent+"L"+(q.leftFullExtent+oe)+" "+(q.sourceY-q.leftSmallArcRadius)+"A"+(q.leftLargeArcRadius+oe)+" "+(q.leftSmallArcRadius+oe)+" 0 0 1 "+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 0 "+(q.leftFullExtent-oe)+" "+(q.sourceY-q.leftSmallArcRadius)+"L"+(q.leftFullExtent-oe)+" "+q.verticalLeftInnerExtent+"A"+(q.leftLargeArcRadius-oe)+" "+(q.leftLargeArcRadius-oe)+" 0 0 0 "+q.leftInnerExtent+" "+(q.verticalFullExtent+oe)+"L"+(q.rightInnerExtent-K)+" "+(q.verticalFullExtent+oe)+"A"+(q.rightLargeArcRadius-oe)+" "+(q.rightLargeArcRadius-oe)+" 0 0 0 "+(q.rightFullExtent+oe-K)+" "+q.verticalRightInnerExtent+"L"+(q.rightFullExtent+oe-K)+" "+(q.targetY-q.rightSmallArcRadius)+"A"+(q.rightLargeArcRadius-oe)+" "+(q.rightSmallArcRadius-oe)+" 0 0 0 "+(q.rightInnerExtent-K)+" "+(q.targetY-oe)+"L"+(q.targetX-K)+" "+(q.targetY-oe)+(K>0?"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;le<v.forceTicksPerFrame;le++)ee.forceLayouts[oe].tick();var ie=ee.graph.nodes;if(Z(ie),ee.sankey.update(ee.graph),z(j.filter(ce(ee)),K),ee.forceLayouts[oe].alpha()>0)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;le<ee.length;le++){var ie=ee[le];ie===oe.interactionState.dragInProgress?(ie.x=ie.lastDraggedX,ie.y=ie.lastDraggedY):(ie.vx=(ie.originalX-ie.x)/v.forceTicksPerFrame,ie.y=Math.min(oe.size-ie.dy/2,Math.max(ie.dy/2,ie.y))),$=Math.max($,Math.abs(ie.vx),Math.abs(ie.vy))}!oe.interactionState.dragInProgress&&$<.1&&oe.forceLayouts[K].alpha()>0&&oe.forceLayouts[K].alpha(0)}}function J(j,K){for(var ee=[],oe=[],q=0;q<j.graph.nodes.length;q++){var $=(j.graph.nodes[q].x0+j.graph.nodes[q].x1)/2,le=(j.graph.nodes[q].y0+j.graph.nodes[q].y1)/2;ee.push($/j.figure.width),oe.push(le/j.figure.height)}h.call("_guiRestyle",K,{"node.x":[ee],"node.y":[oe]},j.trace.index).then(function(){K._fullLayout._dragCover&&K._fullLayout._dragCover.remove()})}function te(j){var K=[],ee;for(ee=0;ee<j.length;ee++)j[ee].originalX=(j[ee].x0+j[ee].x1)/2,j[ee].originalY=(j[ee].y0+j[ee].y1)/2,K.indexOf(j[ee].originalX)===-1&&K.push(j[ee].originalX);for(K.sort(function(oe,q){return oe-q}),ee=0;ee<j.length;ee++)j[ee].originalLayerIndex=K.indexOf(j[ee].originalX),j[ee].originalLayer=j[ee].originalLayerIndex/(K.length-1)}function ae(j){j.lastDraggedX=j.x0+j.dx/2,j.lastDraggedY=j.y0+j.dy/2}function ce(j){return function(K){return K.node.originalX===j.node.originalX}}function Q(j){for(var K=0;K<j.length;K++)j[K].y=(j[K].y0+j[K].y1)/2,j[K].x=(j[K].x0+j[K].x1)/2}function Z(j){for(var K=0;K<j.length;K++)j[K].y0=j[K].y-j[K].dy/2,j[K].y1=j[K].y0+j[K].dy,j[K].x0=j[K].x-j[K].dx/2,j[K].x1=j[K].x0+j[K].dx}G.exports=function(j,K,ee,oe,q){var $=j._context.staticPlot,le=!1;s.ensureSingle(j._fullLayout._infolayer,"g","first-render",function(){le=!0});var ie=j._fullLayout._dragCover,he=ee.filter(function(Se){return f(Se).trace.visible}).map(C.bind(null,oe)),me=K.selectAll("."+v.cn.sankey).data(he,u);me.exit().remove(),me.enter().append("g").classed(v.cn.sankey,!0).style("box-sizing","content-box").style("position","absolute").style("left",0).style("shape-rendering","geometricPrecision").style("pointer-events",$?"none":"auto").attr("transform",k),me.each(function(Se,Ue){j._fullData[Ue]._sankey=Se;var He="bgsankey-"+Se.trace.uid+"-"+Ue;s.ensureSingle(j._fullLayout._draggers,"rect",He),j._fullData[Ue]._bgRect=i.select("."+He),j._fullData[Ue]._bgRect.style("pointer-events",$?"none":"all").attr("width",Se.width).attr("height",Se.height).attr("x",Se.translateX).attr("y",Se.translateY).classed("bgsankey",!0).style({fill:"transparent","stroke-width":0})}),me.transition().ease(v.ease).duration(v.duration).attr("transform",k);var Me=me.selectAll("."+v.cn.sankeyLinks).data(g,u);Me.enter().append("g").classed(v.cn.sankeyLinks,!0).style("fill","none");var Te=Me.selectAll("."+v.cn.sankeyLink).data(function(Se){var Ue=Se.graph.links;return Ue.filter(function(He){return He.value}).map(x.bind(null,Se))},u);Te.enter().append("path").classed(v.cn.sankeyLink,!0).call(O,me,q.linkEvents),Te.style("stroke",function(Se){return B(Se)?t.tinyRGB(p(Se.linkLineColor)):Se.tinyColorHue}).style("stroke-opacity",function(Se){return B(Se)?t.opacity(Se.linkLineColor):Se.tinyColorAlpha}).style("fill",function(Se){return Se.tinyColorHue}).style("fill-opacity",function(Se){return Se.tinyColorAlpha}).style("stroke-width",function(Se){return B(Se)?Se.linkLineWidth:1}).attr("d",b()),Te.style("opacity",function(){return j._context.staticPlot||le||ie?1:0}).transition().ease(v.ease).duration(v.duration).style("opacity",1),Te.exit().transition().ease(v.ease).duration(v.duration).style("opacity",0).remove();var Oe=me.selectAll("."+v.cn.sankeyNodeSet).data(g,u);Oe.enter().append("g").classed(v.cn.sankeyNodeSet,!0),Oe.style("cursor",function(Se){switch(Se.arrangement){case"fixed":return"default";case"perpendicular":return"ns-resize";default:return"move"}});var Ne=Oe.selectAll("."+v.cn.sankeyNode).data(function(Se){var Ue=Se.graph.nodes;return te(Ue),Ue.map(a.bind(null,Se))},u);Ne.enter().append("g").classed(v.cn.sankeyNode,!0).call(E).style("opacity",function(Se){return(j._context.staticPlot||le)&&!Se.partOfGroup?1:0}),Ne.call(O,me,q.nodeEvents).call(N,Te,q,j),Ne.transition().ease(v.ease).duration(v.duration).call(E).style("opacity",function(Se){return Se.partOfGroup?0:1}),Ne.exit().transition().ease(v.ease).duration(v.duration).style("opacity",0).remove();var Ee=Ne.selectAll("."+v.cn.nodeRect).data(g);Ee.enter().append("rect").classed(v.cn.nodeRect,!0).call(I),Ee.style("stroke-width",function(Se){return Se.nodeLineWidth}).style("stroke",function(Se){return t.tinyRGB(p(Se.nodeLineColor))}).style("stroke-opacity",function(Se){return t.opacity(Se.nodeLineColor)}).style("fill",function(Se){return Se.tinyColorHue}).style("fill-opacity",function(Se){return Se.tinyColorAlpha}),Ee.transition().ease(v.ease).duration(v.duration).call(I);var xe=Ne.selectAll("."+v.cn.nodeLabel).data(g);xe.enter().append("text").classed(v.cn.nodeLabel,!0).style("cursor","default"),xe.attr("data-notex",1).text(function(Se){return Se.node.label}).each(function(Se){var Ue=i.select(this);r.font(Ue,Se.textFont),w.convertToTspans(Ue,j)}).style("text-shadow",w.makeTextShadow(j._fullLayout.paper_bgcolor)).attr("text-anchor",function(Se){return Se.horizontal&&Se.left?"end":"start"}).attr("transform",function(Se){var Ue=i.select(this),He=w.lineCount(Ue),Fe=Se.textFont.size*((He-1)*M-d),Ge=Se.nodeLineWidth/2+T,nt=((Se.horizontal?Se.visibleHeight:Se.visibleWidth)-Fe)/2;Se.horizontal&&(Se.left?Ge=-Ge:Ge+=Se.visibleWidth);var qe=Se.horizontal?"":"scale(-1,1)"+l(90);return n(Se.horizontal?Ge:nt,Se.horizontal?nt:Ge)+qe}),xe.transition().ease(v.ease).duration(v.duration)}},84564:function(G){G.exports=function(e,m){for(var P=e.cd,i=[],L=P[0].trace,A=L._sankey.graph.nodes,v=0;v<A.length;v++){var p=A[v];if(!p.partOfGroup){var t=[(p.x0+p.x1)/2,(p.y0+p.y1)/2];L.orientation==="v"&&t.reverse(),m&&m.contains(t,!1,v,e)&&i.push({pointNumber:p.pointNumber})}}return i}},75225:function(G,V,e){var m=e(71828);G.exports=function(i,L){for(var A=0;A<i.length;A++)i[A].i=A;m.mergeArray(L.text,i,"tx"),m.mergeArray(L.texttemplate,i,"txt"),m.mergeArray(L.hovertext,i,"htx"),m.mergeArray(L.customdata,i,"data"),m.mergeArray(L.textposition,i,"tp"),L.textfont&&(m.mergeArrayCastPositive(L.textfont.size,i,"ts"),m.mergeArray(L.textfont.color,i,"tc"),m.mergeArray(L.textfont.family,i,"tf"));var v=L.marker;if(v){m.mergeArrayCastPositive(v.size,i,"ms"),m.mergeArrayCastPositive(v.opacity,i,"mo"),m.mergeArray(v.symbol,i,"mx"),m.mergeArray(v.angle,i,"ma"),m.mergeArray(v.standoff,i,"mf"),m.mergeArray(v.color,i,"mc");var p=v.line;v.line&&(m.mergeArray(p.color,i,"mlc"),m.mergeArrayCastPositive(p.width,i,"mlw"));var t=v.gradient;t&&t.type!=="none"&&(m.mergeArray(t.type,i,"mgt"),m.mergeArray(t.color,i,"mgc"))}}},82196:function(G,V,e){var m=e(12663).axisHoverFormat,P=e(5386).si,i=e(5386).fF,L=e(50693),A=e(41940),v=e(79952).P,p=e(79952).u,t=e(91424),r=e(47581),s=e(1426).extendFlat;function n(u){return{valType:"any",dflt:0,editType:"calc"}}function l(u){return{valType:"any",editType:"calc"}}function c(u){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"}}G.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0},dx:{valType:"number",dflt:1,editType:"calc",anim:!0},y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0},dy:{valType:"number",dflt:1,editType:"calc",anim:!0},xperiod:n(),yperiod:n(),xperiod0:l(),yperiod0:l(),xperiodalignment:c(),yperiodalignment:c(),xhoverformat:m("x"),yhoverformat:m("y"),offsetgroup:{valType:"string",dflt:"",editType:"calc"},alignmentgroup:{valType:"string",dflt:"",editType:"calc"},stackgroup:{valType:"string",dflt:"",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc"},groupnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},stackgaps:{valType:"enumerated",values:["infer zero","interpolate"],dflt:"infer zero",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},texttemplate:P({},{}),hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"],editType:"calc"},hoveron:{valType:"flaglist",flags:["points","fills"],editType:"style"},hovertemplate:i({},{keys:r.eventDataKeys}),line:{color:{valType:"color",editType:"style",anim:!0},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot"},dash:s({},v,{editType:"style"}),backoff:{valType:"number",min:0,dflt:"auto",arrayOk:!0,editType:"plot"},simplify:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},cliponaxis:{valType:"boolean",dflt:!0,editType:"plot"},fill:{valType:"enumerated",values:["none","tozeroy","tozerox","tonexty","tonextx","toself","tonext"],editType:"calc"},fillcolor:{valType:"color",editType:"style",anim:!0},fillpattern:p,marker:s({symbol:{valType:"enumerated",values:t.symbolList,dflt:"circle",arrayOk:!0,editType:"style"},opacity:{valType:"number",min:0,max:1,arrayOk:!0,editType:"style",anim:!0},angle:{valType:"angle",dflt:0,arrayOk:!0,editType:"plot",anim:!1},angleref:{valType:"enumerated",values:["previous","up"],dflt:"up",editType:"plot",anim:!1},standoff:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"plot",anim:!0},size:{valType:"number",min:0,dflt:6,arrayOk:!0,editType:"calc",anim:!0},maxdisplayed:{valType:"number",min:0,dflt:0,editType:"plot"},sizeref:{valType:"number",dflt:1,editType:"calc"},sizemin:{valType:"number",min:0,dflt:0,editType:"calc"},sizemode:{valType:"enumerated",values:["diameter","area"],dflt:"diameter",editType:"calc"},line:s({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0},editType:"calc"},L("marker.line",{anim:!0})),gradient:{type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],arrayOk:!0,dflt:"none",editType:"calc"},color:{valType:"color",arrayOk:!0,editType:"calc"},editType:"calc"},editType:"calc"},L("marker",{anim:!0})),selected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style"},color:{valType:"color",editType:"style"},size:{valType:"number",min:0,editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},unselected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style"},color:{valType:"color",editType:"style"},size:{valType:"number",min:0,editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"middle center",arrayOk:!0,editType:"calc"},textfont:A({editType:"calc",colorEditType:"style",arrayOk:!0})}},47761:function(G,V,e){var m=e(92770),P=e(71828),i=e(89298),L=e(42973),A=e(50606).BADNUM,v=e(34098),p=e(36922),t=e(75225),r=e(66279);function s(f,w){var h=f._fullLayout,o=w._xA=i.getFromId(f,w.xaxis||"x","x"),d=w._yA=i.getFromId(f,w.yaxis||"y","y"),M=o.makeCalcdata(w,"x"),T=d.makeCalcdata(w,"y"),C=L(w,o,"x",M),x=L(w,d,"y",T),S=C.vals,b=x.vals,a=w._length,E=new Array(a),y=w.ids,z=g(w,h,o,d),I=!1,B,k,O,N,_,U;c(h,w);var Y="x",J="y",te;if(z)P.pushUnique(z.traceIndices,w._expandedIndex),B=z.orientation==="v",B?(J="s",te="x"):(Y="s",te="y"),_=z.stackgaps==="interpolate";else{var ae=l(w,a);n(f,w,o,d,S,b,ae)}var ce=!!w.xperiodalignment,Q=!!w.yperiodalignment;for(k=0;k<a;k++){var Z=E[k]={},j=m(S[k]),K=m(b[k]);j&&K?(Z[Y]=S[k],Z[J]=b[k],ce&&(Z.orig_x=M[k],Z.xEnd=C.ends[k],Z.xStart=C.starts[k]),Q&&(Z.orig_y=T[k],Z.yEnd=x.ends[k],Z.yStart=x.starts[k])):z&&(B?j:K)?(Z[te]=B?S[k]:b[k],Z.gap=!0,_?(Z.s=A,I=!0):Z.s=0):Z[Y]=Z[J]=A,y&&(Z.id=String(y[k]))}if(t(E,w),p(f,w),r(E,w),z){for(k=0;k<E.length;)E[k][te]===A?E.splice(k,1):k++;if(P.sort(E,function($,le){return $[te]-le[te]||$.i-le.i}),I){for(k=0;k<E.length-1&&E[k].gap;)k++;for(U=E[k].s,U||(U=E[k].s=0),O=0;O<k;O++)E[O].s=U;for(N=E.length-1;N>k&&E[N].gap;)N--;for(U=E[N].s,O=E.length-1;O>N;O--)E[O].s=U;for(;k<N;)if(k++,E[k].gap){for(O=k+1;E[O].gap;)O++;for(var ee=E[k-1][te],oe=E[k-1].s,q=(E[O].s-oe)/(E[O][te]-ee);k<O;)E[k].s=oe+(E[k][te]-ee)*q,k++}}}return E}function n(f,w,h,o,d,M,T){var C=w._length,x=f._fullLayout,S=h._id,b=o._id,a=x._firstScatter[u(w)]===w.uid,E=(g(w,x,h,o)||{}).orientation,y=w.fill;h._minDtick=0,o._minDtick=0;var z={padded:!0},I={padded:!0};T&&(z.ppad=I.ppad=T);var B=C<2||d[0]!==d[C-1]||M[0]!==M[C-1];B&&(y==="tozerox"||y==="tonextx"&&(a||E==="h"))?z.tozero=!0:!(w.error_y||{}).visible&&(y==="tonexty"||y==="tozeroy"||!v.hasMarkers(w)&&!v.hasText(w))&&(z.padded=!1,z.ppad=0),B&&(y==="tozeroy"||y==="tonexty"&&(a||E==="v"))?I.tozero=!0:(y==="tonextx"||y==="tozerox")&&(I.padded=!1),S&&(w._extremes[S]=i.findExtremes(h,d,z)),b&&(w._extremes[b]=i.findExtremes(o,M,I))}function l(f,w){if(v.hasMarkers(f)){var h=f.marker,o=1.6*(f.marker.sizeref||1),d;if(f.marker.sizemode==="area"?d=function(S){return Math.max(Math.sqrt((S||0)/o),3)}:d=function(S){return Math.max((S||0)/o,3)},P.isArrayOrTypedArray(h.size)){var M={type:"linear"};i.setConvert(M);for(var T=M.makeCalcdata(f.marker,"size"),C=new Array(w),x=0;x<w;x++)C[x]=d(T[x]);return C}else return d(h.size)}}function c(f,w){var h=u(w),o=f._firstScatter;o[h]||(o[h]=w.uid)}function u(f){var w=f.stackgroup;return f.xaxis+f.yaxis+f.type+(w?"-"+w:"")}function g(f,w,h,o){var d=f.stackgroup;if(d){var M=w._scatterStackOpts[h._id+o._id][d],T=M.orientation==="v"?o:h;if(T.type==="linear"||T.type==="log")return M}}G.exports={calc:s,calcMarkerSize:l,calcAxisExpansion:n,setFirstScatter:c,getStackOpts:g}},66279:function(G,V,e){var m=e(71828);G.exports=function(i,L){m.isArrayOrTypedArray(L.selectedpoints)&&m.tagSelected(i,L)}},36922:function(G,V,e){var m=e(52075).hasColorscale,P=e(78803),i=e(34098);G.exports=function(A,v){i.hasLines(v)&&m(v,"line")&&P(A,v,{vals:v.line.color,containerStr:"line",cLetter:"c"}),i.hasMarkers(v)&&(m(v,"marker")&&P(A,v,{vals:v.marker.color,containerStr:"marker",cLetter:"c"}),m(v,"marker.line")&&P(A,v,{vals:v.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}},47581:function(G){G.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}},72626:function(G,V,e){var m=e(47761),P=e(11661).setGroupPositions;function i(v,p){for(var t=p.xaxis,r=p.yaxis,s=v._fullLayout,n=v._fullData,l=v.calcdata,c=[],u=[],g=0;g<n.length;g++){var f=n[g];f.visible===!0&&f.type==="scatter"&&f.xaxis===t._id&&f.yaxis===r._id&&(f.orientation==="h"?c.push(l[g]):f.orientation==="v"&&u.push(l[g]))}var w={mode:s.scattermode,gap:s.scattergap};P(v,t,r,u,w),P(v,r,t,c,w)}G.exports=function(p,t){p._fullLayout.scattermode==="group"&&i(p,t);var r=t.xaxis,s=t.yaxis,n=r._id+s._id,l=p._fullLayout._scatterStackOpts[n];if(l){var c=p.calcdata,u,g,f,w,h,o,d,M,T,C,x,S,b,a,E;for(var y in l){C=l[y];var z=C.traceIndices;if(z.length){for(x=C.stackgaps==="interpolate",S=C.groupnorm,C.orientation==="v"?(b="x",a="y"):(b="y",a="x"),E=new Array(z.length),u=0;u<E.length;u++)E[u]=!1;o=c[z[0]];var I=new Array(o.length);for(u=0;u<o.length;u++)I[u]=o[u][b];for(u=1;u<z.length;u++){for(h=c[z[u]],g=f=0;g<h.length;g++){for(d=h[g][b];d>I[f]&&f<I.length;f++)L(h,g,I[f],u,E,x,b),g++;if(d!==I[f]){for(w=0;w<u;w++)L(c[z[w]],f,d,w,E,x,b);I.splice(f,0,d)}f++}for(;f<I.length;f++)L(h,g,I[f],u,E,x,b),g++}var B=I.length;for(g=0;g<o.length;g++){for(M=o[g][a]=o[g].s,u=1;u<z.length;u++)h=c[z[u]],h[0].trace._rawLength=h[0].trace._length,h[0].trace._length=B,M+=h[g].s,h[g][a]=M;if(S)for(T=(S==="fraction"?M:M/100)||1,u=0;u<z.length;u++){var k=c[z[u]][g];k[a]/=T,k.sNorm=k.s/T}}for(u=0;u<z.length;u++){h=c[z[u]];var O=h[0].trace,N=m.calcMarkerSize(O,O._rawLength),_=Array.isArray(N);if(N&&E[u]||_){var U=N;for(N=new Array(B),g=0;g<B;g++)N[g]=h[g].gap?0:_?U[h[g].i]:U}var Y=new Array(B),J=new Array(B);for(g=0;g<B;g++)Y[g]=h[g].x,J[g]=h[g].y;m.calcAxisExpansion(p,O,r,s,Y,J,N),h[0].t.orientation=C.orientation}}}}};function L(v,p,t,r,s,n,l){s[r]=!0;var c={i:null,gap:!0,s:0};if(c[l]=t,v.splice(p,0,c),p&&t===v[p-1][l]){var u=v[p-1];c.s=u.s,c.i=u.i,c.gap=u.gap}else n&&(c.s=A(v,p,t,l));p||(v[0].t=v[1].t,v[0].trace=v[1].trace,delete v[1].t,delete v[1].trace)}function A(v,p,t,r){var s=v[p-1],n=v[p+1];return n?s?s.s+(n.s-s.s)*(t-s[r])/(n[r]-s[r]):n.s:s.s}},34936:function(G,V,e){var m=e(71828),P=e(26125),i=e(82196);G.exports=function(A,v){var p,t,r;function s(g){return m.coerce(t._input,t,i,g)}if(v.scattermode==="group")for(r=0;r<A.length;r++)t=A[r],t.type==="scatter"&&(p=t._input,P(p,t,v,s));for(r=0;r<A.length;r++){var n=A[r];if(n.type==="scatter"){var l=n.fill;if(!(l==="none"||l==="toself")&&(n.opacity=void 0,l==="tonexty"||l==="tonextx"))for(var c=r-1;c>=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<L.PTS_LINESONLY?"lines+markers":"lines";d("text"),d("hovertext"),d("mode",C),A.hasLines(w)&&(s(f,w,h,o,d,{backoff:!0}),n(f,w,d),d("connectgaps"),d("line.simplify")),A.hasMarkers(w)&&r(f,w,h,o,d,{gradient:!0}),A.hasText(w)&&(d("texttemplate"),l(f,w,o,d));var x=[];(A.hasMarkers(w)||A.hasText(w))&&(d("cliponaxis"),d("marker.maxdisplayed"),x.push("points")),d("fill",T?T.fillDflt:"none"),w.fill!=="none"&&(c(f,w,h,d),A.hasLines(w)||n(f,w,d),u(d,"fillpattern",w.fillcolor,!1));var S=(w.line||{}).color,b=(w.marker||{}).color;(w.fill==="tonext"||w.fill==="toself")&&x.push("fills"),d("hoveron",x.join("+")||"points"),w.hoveron!=="fills"&&d("hovertemplate");var a=P.getComponentMethod("errorbars","supplyDefaults");a(f,w,S||b||h,{axis:"y"}),a(f,w,S||b||h,{axis:"x",inherit:"y"}),m.coerceSelectionMarkerOpacity(w,d)}}},28908:function(G,V,e){var m=e(7901),P=e(71828).isArrayOrTypedArray;G.exports=function(L,A,v,p){var t=!1;if(A.marker){var r=A.marker.color,s=(A.marker.line||{}).color;r&&!P(r)?t=r:s&&!P(s)&&(t=s)}p("fillcolor",m.addOpacity((A.line||{}).color||t||v,.5))}},8225:function(G,V,e){var m=e(89298);G.exports=function(i,L,A){var v={},p={_fullLayout:A},t=m.getFromTrace(p,L,"x"),r=m.getFromTrace(p,L,"y"),s=i.orig_x;s===void 0&&(s=i.x);var n=i.orig_y;return n===void 0&&(n=i.y),v.xLabel=m.tickText(t,t.c2l(s),!0).text,v.yLabel=m.tickText(r,r.c2l(n),!0).text,v}},34603:function(G,V,e){var m=e(7901),P=e(34098);G.exports=function(L,A){var v,p;if(L.mode==="lines")return v=L.line.color,v&&m.opacity(v)?v:L.fillcolor;if(L.mode==="none")return L.fill?L.fillcolor:"";var t=A.mcc||(L.marker||{}).color,r=A.mlcc||((L.marker||{}).line||{}).color;return p=t&&m.opacity(t)?t:r&&m.opacity(r)&&(A.mlw||((L.marker||{}).line||{}).width)?r:"",p?m.opacity(p)<.3?m.addOpacity(p,.3):p:(v=(L.line||{}).color,v&&m.opacity(v)&&P.hasLines(L)&&L.line.width?v:L.fillcolor)}},26125:function(G,V,e){var m=e(99082).getAxisGroup;G.exports=function(i,L,A,v){var p=L.orientation,t=L[{v:"x",h:"y"}[p]+"axis"],r=m(A,t)+p,s=A._alignmentOpts||{},n=v("alignmentgroup"),l=s[r];l||(l=s[r]={});var c=l[n];c?c.traces.push(L):c=l[n]={traces:[L],alignmentIndex:Object.keys(l).length,offsetGroups:{}};var u=v("offsetgroup"),g=c.offsetGroups,f=g[u];u&&(f||(f=g[u]={offsetIndex:Object.keys(g).length}),L._offsetIndex=f.offsetIndex)}},33720:function(G,V,e){var m=e(71828),P=e(30211),i=e(73972),L=e(34603),A=e(7901),v=m.fillText;G.exports=function(t,r,s,n){var l=t.cd,c=l[0].trace,u=t.xa,g=t.ya,f=u.c2p(r),w=g.c2p(s),h=[f,w],o=c.hoveron||"",d=c.mode.indexOf("markers")!==-1?3:.5,M=!!c.xperiodalignment,T=!!c.yperiodalignment;if(o.indexOf("points")!==-1){var C=function(he){if(M){var me=u.c2p(he.xStart),Me=u.c2p(he.xEnd);return f>=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<Te?Oe*Ne/Te:Ne-Te+Oe},x=function(he){if(T){var me=g.c2p(he.yStart),Me=g.c2p(he.yEnd);return w>=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 Ne<Te?Oe*Ne/Te:Ne-Te+Oe},S=function(he){var me=Math.max(d,he.mrc||0),Me=u.c2p(he.x)-f,Te=g.c2p(he.y)-w;return Math.max(Math.sqrt(Me*Me+Te*Te)-me,1-d/me)},b=P.getDistanceFunction(n,C,x,S);if(P.getClosest(l,b,t),t.index!==!1){var a=l[t.index],E=u.c2p(a.x,!0),y=g.c2p(a.y,!0),z=a.mrc||1;t.index=a.i;var I=l[0].t.orientation,B=I&&(a.sNorm||a.s),k=I==="h"?B:a.orig_x!==void 0?a.orig_x:a.x,O=I==="v"?B:a.orig_y!==void 0?a.orig_y:a.y;return m.extendFlat(t,{color:L(c,a),x0:E-z,x1:E+z,xLabelVal:k,y0:y-z,y1:y+z,yLabelVal:O,spikeDistance:S(a),hovertemplate:c.hovertemplate}),v(a,c,t),i.getComponentMethod("errorbars","hoverInfo")(a,c,t),[t]}}if(o.indexOf("fills")!==-1&&c._polygons){var N=c._polygons,_=[],U=!1,Y=1/0,J=-1/0,te=1/0,ae=-1/0,ce,Q,Z,j,K,ee,oe,q,$;for(ce=0;ce<N.length;ce++)Z=N[ce],Z.contains(h)&&(U=!U,_.push(Z),te=Math.min(te,Z.ymin),ae=Math.max(ae,Z.ymax));if(U){te=Math.max(te,0),ae=Math.min(ae,g._length);var le=(te+ae)/2;for(ce=0;ce<_.length;ce++)for(j=_[ce].pts,Q=1;Q<j.length;Q++)q=j[Q-1][1],$=j[Q][1],q>le!=$>=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&&jt<yt){var Yt=ir*Kt-_r*Lt;if(Yt*Yt<yt)return!0}}var le,ie;function he(wt,It){var Bt=wt[0]/o,Gt=wt[1]/d,Lt=Math.max(0,-Bt,Bt-1,-Gt,Gt-1);return Lt&&le!==void 0&&$(Bt,Gt,le,ie)&&(Lt=0),Lt&&It&&$(Bt,Gt,It[0]/o,It[1]/d)&&(Lt=0),(1+s.toleranceGrowth*Lt)*x}function me(wt,It){var Bt=wt[0]-It[0],Gt=wt[1]-It[1];return Math.sqrt(Bt*Bt+Gt*Gt)}var Me=s.maxScreensAway,Te=-o*Me,Oe=o*(1+Me),Ne=-d*Me,Ee=d*(1+Me),xe=[[Te,Ne,Oe,Ne],[Oe,Ne,Oe,Ee],[Oe,Ee,Te,Ee],[Te,Ee,Te,Ne]],Se,Ue,He,Fe,Ge,nt;function qe(wt,It){for(var Bt=[],Gt=0,Lt=0;Lt<4;Lt++){var Kt=xe[Lt],ir=t(wt[0],wt[1],It[0],It[1],Kt[0],Kt[1],Kt[2],Kt[3]);ir&&(!Gt||Math.abs(ir.x-Bt[0][0])>1||Math.abs(ir.y-Bt[0][1])>1)&&(ir=[ir.x,ir.y],Gt&&me(ir,wt)<me(Bt[0],wt)?Bt.unshift(ir):Bt.push(ir),Gt++)}return Bt}function $e(wt){if(wt[0]<Te||wt[0]>Oe||wt[1]<Ne||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]<Te?Te:wt[0]>Oe?Oe:0,Ue=wt[1]<Ne?Ne: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;k<z;k++)if(O=q(k),!!O){for(B=0,Ge=null,De(O),k++;k<z;k++){if(_=q(k),!_){if(C)continue;break}if(!b||!c.simplify){De(_);continue}var Ie=q(k+1);if(ce=me(_,O),!(!(a&&(B===0||B===z-1))&&ce<he(_,Ie)*y)){for(te=[(_[0]-O[0])/ce,(_[1]-O[1])/ce],U=O,Q=ce,Z=K=ee=0,J=!1,N=_,k++;k<l.length;k++){if(Y=Ie,Ie=q(k+1),!Y){if(C)continue;break}if(ae=[Y[0]-O[0],Y[1]-O[1]],oe=ae[0]*te[1]-ae[1]*te[0],K=Math.min(K,oe),ee=Math.max(ee,oe),ee-K>he(Y,Ie))break;N=Y,j=ae[0]*te[0]+ae[1]*te[1],j>Q?(Q=j,_=Y,J=!1):j<Z&&(Z=j,U=Y,J=!0)}if(J?(De(_),N!==U&&De(U)):(U!==O&&De(U),N!==_&&De(_)),De(N),k>=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<E.length;ye++)for(var Le=0;Le<E[ye].length-1;Le++){var Be=E[ye][Le],ot=E[ye][Le+1],at=m.applyBackoff(ot,Be);(at[0]!==ot[0]||at[1]!==ot[1])&&(Pe=!0),se[be+1]||(be++,se[be]=[Be,[at[0],at[1]]])}return Pe?se:E}return E}},94039:function(G){G.exports=function(e,m,P){var i=P("line.shape");i==="spline"&&P("line.smoothing")}},68687:function(G){var V={tonextx:1,tonexty:1,tonext:1};G.exports=function(m,P,i){var L,A,v,p,t,r={},s=!1,n=-1,l=0,c=-1;for(A=0;A<i.length;A++)L=i[A][0].trace,v=L.stackgroup||"",v?v in r?t=r[v]:(t=r[v]=l,l++):L.fill in V&&c>=0?t=c:(t=c=l,l++),t<n&&(s=!0),L._groupIndex=n=t;var u=i.slice();s&&u.sort(function(f,w){var h=f[0].trace,o=w[0].trace;return h._groupIndex-o._groupIndex||h.index-o.index});var g={};for(A=0;A<u.length;A++)L=u[A][0].trace,v=L.stackgroup||"",L.visible===!0?(L._nexttrace=null,L.fill in V&&(p=g[v],L._prevtrace=p||null,p&&(p._nexttrace=L)),L._ownfill=L.fill&&(L.fill.substr(0,6)==="tozero"||L.fill==="toself"||L.fill.substr(0,2)==="to"&&!L._prevtrace),g[v]=L):L._prevtrace=L._nexttrace=L._ownfill=null;return u}},39984:function(G,V,e){var m=e(92770);G.exports=function(i,L){L||(L=2);var A=i.marker,v=A.sizeref||1,p=A.sizemin||0,t=A.sizemode==="area"?function(r){return Math.sqrt(r/v)}:function(r){return r/v};return function(r){var s=t(r/L);return m(s)&&s>0?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<le.length;T++)a._polygons[T]=s(le[T]);le.length&&(ee=le[0][0],oe=le[le.length-1],q=oe[oe.length-1]),ie=function(Fe){return function(Ge){if(te=Z(Ge),ae=K(Ge),ce?_?(ce+="L"+te.substr(1),Q=ae+("L"+Q.substr(1))):(ce+="Z"+te,Q=ae+"Z"+Q):(ce=te,Q=ae),p.hasLines(a)){var nt=m.select(this);if(nt.datum(w),Fe)x(nt.style("opacity",0).attr("d",te).call(v.lineGroupStyle)).style("opacity",1);else{var qe=x(nt);qe.attr("d",te),v.singleLineStyle(w,qe)}}}}}var he=I.selectAll(".js-line").data(le);x(he.exit()).style("opacity",0).remove(),he.each(ie(!1)),he.enter().append("path").classed("js-line",!0).style("vector-effect",M?"none":"non-scaling-stroke").call(v.lineGroupStyle).each(ie(!0)),v.setClipUrl(he,f.layerClipId,u);function me(Fe){x(Fe).attr("d","M0,0Z")}le.length?(O?(O.datum(w),ee&&q&&(_?(_==="y"?ee[1]=q[1]=b.c2p(0,!0):_==="x"&&(ee[0]=q[0]=S.c2p(0,!0)),x(O).attr("d","M"+q+"L"+ee+"L"+ce.substr(1)).call(v.singleFillStyle,u)):x(O).attr("d",ce+"Z").call(v.singleFillStyle,u))):N&&(a.fill.substr(0,6)==="tonext"&&ce&&U?(a.fill==="tonext"?x(N).attr("d",ce+"Z"+U+"Z").call(v.singleFillStyle,u):x(N).attr("d",ce+"L"+U.substr(1)+"Z").call(v.singleFillStyle,u),a._polygons=a._polygons.concat(Y)):(me(N),a._polygons=null)),a._prevRevpath=Q,a._prevPolygons=$):(O?me(O):N&&me(N),a._polygons=a._prevRevpath=a._prevPolygons=null);function Me(Fe){return Fe.filter(function(Ge){return!Ge.gap&&Ge.vis})}function Te(Fe){return Fe.filter(function(Ge){return Ge.vis})}function Oe(Fe){return Fe.filter(function(Ge){return!Ge.gap})}function Ne(Fe){return Fe.id}function Ee(Fe){if(Fe.ids)return Ne}function xe(){return!1}function Se(Fe,Ge,nt){var qe,$e,et,ct=nt[0].trace,dt=p.hasMarkers(ct),pt=p.hasText(ct),At=Ee(ct),Mt=xe,Vt=xe;if(dt||pt){var Je=A,De=ct.stackgroup,Ie=De&&u._fullLayout._scatterStackOpts[S._id+b._id][De].stackgaps==="infer zero";ct.marker.maxdisplayed||ct._needsCull?Je=Ie?Te:Me:De&&!Ie&&(Je=Oe),dt&&(Mt=Je),pt&&(Vt=Je)}$e=Fe.selectAll("path.point"),qe=$e.data(Mt,At);var ze=qe.enter().append("path").classed("point",!0);C&&ze.call(v.pointStyle,ct,u).call(v.translatePoints,S,b).style("opacity",0).transition().style("opacity",1),qe.order();var Pe;dt&&(Pe=v.makePointStyleFns(ct)),qe.each(function(be){var se=m.select(this),ye=x(se);et=v.translatePoint(be,ye,S,b),et?(v.singlePointStyle(be,ye,ct,Pe,u),f.layerClipId&&v.hideOutsideRangePoint(be,ye,S,b,ct.xcalendar,ct.ycalendar),ct.customdata&&se.classed("plotly-customdata",be.data!==null&&be.data!==void 0)):ye.remove()}),C?qe.exit().transition().style("opacity",0).remove():qe.exit().remove(),$e=Ge.selectAll("g"),qe=$e.data(Vt,At),qe.enter().append("g").classed("textpoint",!0).append("text"),qe.order(),qe.each(function(be){var se=m.select(this),ye=x(se.select("text"));et=v.translatePoint(be,ye,S,b),et?f.layerClipId&&v.hideOutsideRangePoint(be,se,S,b,ct.xcalendar,ct.ycalendar):se.remove()}),qe.selectAll("text").call(v.textPointStyle,ct,u).each(function(be){var se=S.c2p(be.x),ye=b.c2p(be.y);m.select(this).selectAll("tspan.line").each(function(){x(m.select(this)).attr({x:se,y:ye})})}),qe.exit().remove()}B.datum(w),k.datum(w),Se(B,k,w);var Ue=a.cliponaxis===!1,He=Ue?null:f.layerClipId;v.setClipUrl(B,He,u),v.setClipUrl(k,He,u)}function c(u,g,f,w,h){var o=f.xaxis,d=f.yaxis,M=m.extent(i.simpleMap(o.range,o.r2c)),T=m.extent(i.simpleMap(d.range,d.r2c)),C=w[0].trace;if(p.hasMarkers(C)){var x=C.marker.maxdisplayed;if(x!==0){var S=w.filter(function(y){return y.x>=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&&z<g&&a++});var E=Math.round(a*b/3+Math.floor(a/3)*b/7.1);w.forEach(function(y){delete y.vis}),S.forEach(function(y,z){Math.round((z+E)%b)===0&&(y.vis=!0)})}}}},98002:function(G,V,e){var m=e(34098);G.exports=function(i,L){var A=i.cd,v=i.xaxis,p=i.yaxis,t=[],r=A[0].trace,s,n,l,c,u=!m.hasMarkers(r)&&!m.hasText(r);if(u)return[];if(L===!1)for(s=0;s<A.length;s++)A[s].selected=0;else for(s=0;s<A.length;s++)n=A[s],l=v.c2p(n.x),c=p.c2p(n.y),n.i!==null&&L.contains([l,c],!1,s,i)?(t.push({pointNumber:n.i,x:v.c2d(n.x),y:p.c2d(n.y)}),n.selected=1):n.selected=0;return t}},565:function(G){var V=["orientation","groupnorm","stackgaps"];G.exports=function(m,P,i,L){var A=i._scatterStackOpts,v=L("stackgroup");if(v){var p=P.xaxis+P.yaxis,t=A[p];t||(t=A[p]={});var r=t[v],s=!1;r?r.traces.push(P):(r=t[v]={traceIndices:[],traces:[P]},s=!0);for(var n={orientation:P.x&&!P.y?"h":"v"},l=0;l<V.length;l++){var c=V[l],u=c+"Found";if(!r[u]){var g=m[c]!==void 0,f=c==="orientation";if((g||s)&&(r[c]=L(c,n[c]),f&&(r.fillDflt=r[c]==="h"?"tonextx":"tonexty"),g&&(r[u]=!0,!s&&(delete r.traces[0][c],f))))for(var w=0;w<r.traces.length-1;w++){var h=r.traces[w];h._input.fill!==h.fill&&(h.fill=r.fillDflt)}}}return r}}},16296:function(G,V,e){var m=e(39898),P=e(91424),i=e(73972);function L(t){var r=m.select(t).selectAll("g.trace.scatter");r.style("opacity",function(s){return s[0].trace.opacity}),r.selectAll("g.points").each(function(s){var n=m.select(this),l=s.trace||s[0].trace;A(n,l,t)}),r.selectAll("g.text").each(function(s){var n=m.select(this),l=s.trace||s[0].trace;v(n,l,t)}),r.selectAll("g.trace path.js-line").call(P.lineGroupStyle),r.selectAll("g.trace path.js-fill").call(P.fillGroupStyle,t),i.getComponentMethod("errorbars","style")(r)}function A(t,r,s){P.pointStyle(t.selectAll("path.point"),r,s)}function v(t,r,s){P.textPointStyle(t.selectAll("text"),r,s)}function p(t,r,s){var n=r[0].trace;n.selectedpoints?(P.selectedPointStyle(s.selectAll("path.point"),n),P.selectedTextStyle(s.selectAll("text"),n)):(A(s,n,t),v(s,n,t))}G.exports={style:L,stylePoints:A,styleText:v,styleOnSelect:p}},34098:function(G,V,e){var m=e(71828);G.exports={hasLines:function(P){return P.visible&&P.mode&&P.mode.indexOf("lines")!==-1},hasMarkers:function(P){return P.visible&&(P.mode&&P.mode.indexOf("markers")!==-1||P.type==="splom")},hasText:function(P){return P.visible&&P.mode&&P.mode.indexOf("text")!==-1},isBubble:function(P){return m.isPlainObject(P.marker)&&m.isArrayOrTypedArray(P.marker.size)}}},82410:function(G,V,e){var m=e(71828);G.exports=function(P,i,L,A,v){v=v||{},A("textposition"),m.coerceFont(A,"textfont",v.font||L.font),v.noSelect||(A("selected.textfont.color"),A("unselected.textfont.color"))}},67513:function(G,V,e){var m=e(71828),P=e(73972);G.exports=function(L,A,v,p){var t=p("x"),r=p("y"),s,n=P.getComponentMethod("calendars","handleTraceDefaults");if(n(L,A,["x","y"],v),t){var l=m.minRowLength(t);r?s=Math.min(l,m.minRowLength(r)):(s=l,p("y0"),p("dy"))}else{if(!r)return 0;s=m.minRowLength(r),p("x0"),p("dx")}return A._length=s,s}},44542:function(G,V,e){var m=e(82196),P=e(50693),i=e(12663).axisHoverFormat,L=e(5386).fF,A=e(5386).si,v=e(9012),p=e(29659),t=e(87381),r=e(1426).extendFlat,s=e(30962).overrideAll,n=e(78607),l=m.line,c=m.marker,u=c.line,g=r({width:l.width,dash:{valType:"enumerated",values:n(p),dflt:"solid"}},P("line"));function f(h){return{show:{valType:"boolean",dflt:!1},opacity:{valType:"number",min:0,max:1,dflt:1},scale:{valType:"number",min:0,max:10,dflt:.6666666666666666}}}var w=G.exports=s({x:m.x,y:m.y,z:{valType:"data_array"},text:r({},m.text,{}),texttemplate:A({},{}),hovertext:r({},m.hovertext,{}),hovertemplate:L(),xhoverformat:i("x"),yhoverformat:i("y"),zhoverformat:i("z"),mode:r({},m.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:"color"},projection:{x:f(),y:f(),z:f()},connectgaps:m.connectgaps,line:g,marker:r({symbol:{valType:"enumerated",values:n(t),dflt:"circle",arrayOk:!0},size:r({},c.size,{dflt:8}),sizeref:c.sizeref,sizemin:c.sizemin,sizemode:c.sizemode,opacity:r({},c.opacity,{arrayOk:!1}),colorbar:c.colorbar,line:r({width:r({},u.width,{arrayOk:!1})},P("marker.line"))},P("marker")),textposition:r({},m.textposition,{dflt:"top center"}),textfont:{color:m.textfont.color,size:m.textfont.size,family:r({},m.textfont.family,{arrayOk:!1})},opacity:v.opacity,hoverinfo:r({},v.hoverinfo)},"calc","nested");w.x.editType=w.y.editType=w.z.editType="calc+clearAxisTypes"},36563:function(G,V,e){var m=e(75225),P=e(36922);G.exports=function(L,A){var v=[{x:!1,y:!1,trace:A,t:{}}];return m(v,A),P(L,A),v}},67336:function(G,V,e){var m=e(73972);function P(A,v,p,t){if(!v||!v.visible)return null;for(var r=m.getComponentMethod("errorbars","makeComputeError")(v),s=new Array(A.length),n=0;n<A.length;n++){var l=r(+A[n],n);if(t.type==="log"){var c=t.c2l(A[n]),u=A[n]-l[0],g=A[n]+l[1];if(s[n]=[(t.c2l(u,!0)-c)*p,(t.c2l(g,!0)-c)*p],u>0){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<A.length;v++)if(A[v])return A[v].length;return 0}function L(A,v,p){var t=[P(A.x,A.error_x,v[0],p.xaxis),P(A.y,A.error_y,v[1],p.yaxis),P(A.z,A.error_z,v[2],p.zaxis)],r=i(t);if(r===0)return null;for(var s=new Array(r),n=0;n<r;n++){for(var l=[[0,0,0],[0,0,0]],c=0;c<3;c++)if(t[c])for(var u=0;u<2;u++)l[u][c]=t[c][n][u];s[n]=l}return s}G.exports=L},58925:function(G,V,e){var m=e(9330).gl_line3d,P=e(9330).gl_scatter3d,i=e(9330).gl_error3d,L=e(9330).gl_mesh3d,A=e(9330).delaunay_triangulate,v=e(71828),p=e(78614),t=e(81697).formatColor,r=e(39984),s=e(29659),n=e(87381),l=e(89298),c=e(23469).appendArrayPointValue,u=e(67336);function g(y,z){this.scene=y,this.uid=z,this.linePlot=null,this.scatterPlot=null,this.errorBars=null,this.textMarkers=null,this.delaunayMesh=null,this.color=null,this.mode="",this.dataPoints=[],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.textLabels=null,this.data=null}var f=g.prototype;f.handlePick=function(y){if(y.object&&(y.object===this.linePlot||y.object===this.delaunayMesh||y.object===this.textMarkers||y.object===this.scatterPlot)){var z=y.index=y.data.index;return y.object.highlight&&y.object.highlight(null),this.scatterPlot&&(y.object=this.scatterPlot,this.scatterPlot.highlight(y.data)),y.textLabel="",this.textLabels&&(Array.isArray(this.textLabels)?(this.textLabels[z]||this.textLabels[z]===0)&&(y.textLabel=this.textLabels[z]):y.textLabel=this.textLabels),y.traceCoordinate=[this.data.x[z],this.data.y[z],this.data.z[z]],!0}};function w(y,z,I){var B=(I+1)%3,k=(I+2)%3,O=[],N=[],_;for(_=0;_<y.length;++_){var U=y[_];isNaN(U[B])||!isFinite(U[B])||isNaN(U[k])||!isFinite(U[k])||(O.push([U[B],U[k]]),N.push(_))}var Y=A(O);for(_=0;_<Y.length;++_)for(var J=Y[_],te=0;te<J.length;++te)J[te]=N[J[te]];return{positions:y,cells:Y,meshColor:z}}function h(y){for(var z=[0,0,0],I=[[0,0,0],[0,0,0],[0,0,0]],B=[1,1,1],k=0;k<3;k++){var O=y[k];O&&O.copy_zstyle!==!1&&y[2].visible!==!1&&(O=y[2]),!(!O||!O.visible)&&(z[k]=O.width/2,I[k]=p(O.color),B[k]=O.thickness)}return{capSize:z,color:I,lineWidth:B}}function o(y){return y==null?0:y.indexOf("left")>-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<y.length;k++)B[k]=[z,I],y[k]&&(B[k][0]=o(y[k]),B[k][1]=d(y[k]));else B[0]=o(y),B[1]=d(y);return B}function T(y,z){return z(y*4)}function C(y){return n[y]}function x(y,z,I,B,k){var O=null;if(v.isArrayOrTypedArray(y)){O=[];for(var N=0;N<z;N++)y[N]===void 0?O[N]=B:O[N]=I(y[N],k)}else O=I(y,v.identity);return O}function S(y,z){var I=[],B=y.fullSceneLayout,k=y.dataScale,O=B.xaxis,N=B.yaxis,_=B.zaxis,U=z.marker,Y=z.line,J=z.x||[],te=z.y||[],ae=z.z||[],ce=J.length,Q=z.xcalendar,Z=z.ycalendar,j=z.zcalendar,K,ee,oe,q,$,le;for($=0;$<ce;$++)K=O.d2l(J[$],0,Q)*k[0],ee=N.d2l(te[$],0,Z)*k[1],oe=_.d2l(ae[$],0,j)*k[2],I[$]=[K,ee,oe];if(Array.isArray(z.text))le=z.text;else if(z.text!==void 0)for(le=new Array(ce),$=0;$<ce;$++)le[$]=z.text;function ie(qe,$e){var et=B[qe];return l.tickText(et,et.d2l($e),!0).text}var he=z.texttemplate;if(he){var me=y.fullLayout,Me=me._d3locale,Te=Array.isArray(he),Oe=Te?Math.min(he.length,ce):ce,Ne=Te?function(qe){return he[qe]}:function(){return he};for(le=new Array(Oe),$=0;$<Oe;$++){var Ee={x:J[$],y:te[$],z:ae[$]},xe={xLabel:ie("xaxis",J[$]),yLabel:ie("yaxis",te[$]),zLabel:ie("zaxis",ae[$])},Se={};c(Se,z,$);var Ue=z._meta||{};le[$]=v.texttemplateString(Ne($),xe,Me,Se,Ee,Ue)}}if(q={position:I,mode:z.mode,text:le},"line"in z&&(q.lineColor=t(Y,1,ce),q.lineWidth=Y.width,q.lineDashes=Y.dash),"marker"in z){var He=r(z);q.scatterColor=t(U,1,ce),q.scatterSize=x(U.size,ce,T,20,He),q.scatterMarker=x(U.symbol,ce,C,"●"),q.scatterLineWidth=U.line.width,q.scatterLineColor=t(U.line,1,ce),q.scatterAngle=0}"textposition"in z&&(q.textOffset=M(z.textposition),q.textColor=t(z.textfont,1,ce),q.textSize=x(z.textfont.size,ce,v.identity,12),q.textFont=z.textfont.family,q.textAngle=0);var Fe=["x","y","z"];for(q.project=[!1,!1,!1],q.projectScale=[1,1,1],q.projectOpacity=[1,1,1],$=0;$<3;++$){var Ge=z.projection[Fe[$]];(q.project[$]=Ge.show)&&(q.projectOpacity[$]=Ge.opacity,q.projectScale[$]=Ge.scale)}q.errorBounds=u(z,k,B);var nt=h([z.error_x,z.error_y,z.error_z]);return q.errorColor=nt.color,q.errorLineWidth=nt.lineWidth,q.errorCapSize=nt.capSize,q.delaunayAxis=z.surfaceaxis,q.delaunayColor=p(z.surfacecolor),q}function b(y){if(v.isArrayOrTypedArray(y)){var z=y[0];return v.isArrayOrTypedArray(z)&&(y=z),"rgb("+y.slice(0,3).map(function(I){return Math.round(I*255)})+")"}return null}function a(y){return v.isArrayOrTypedArray(y)?y.length===4&&typeof y[0]=="number"?b(y):y.map(b):null}f.update=function(y){var z=this.scene.glplot.gl,I,B,k,O,N=s.solid;this.data=y;var _=S(this.scene,y);"mode"in _&&(this.mode=_.mode),"lineDashes"in _&&_.lineDashes in s&&(N=s[_.lineDashes]),this.color=a(_.scatterColor)||a(_.lineColor),this.dataPoints=_.position,I={gl:this.scene.glplot.gl,position:_.position,color:_.lineColor,lineWidth:_.lineWidth||1,dashes:N[0],dashScale:N[1],opacity:y.opacity,connectGaps:y.connectgaps},this.mode.indexOf("lines")!==-1?this.linePlot?this.linePlot.update(I):(this.linePlot=m(I),this.linePlot._trace=this,this.scene.glplot.add(this.linePlot)):this.linePlot&&(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose(),this.linePlot=null);var U=y.opacity;if(y.marker&&y.marker.opacity!==void 0&&(U*=y.marker.opacity),B={gl:this.scene.glplot.gl,position:_.position,color:_.scatterColor,size:_.scatterSize,glyph:_.scatterMarker,opacity:U,orthographic:!0,lineWidth:_.scatterLineWidth,lineColor:_.scatterLineColor,project:_.project,projectScale:_.projectScale,projectOpacity:_.projectOpacity},this.mode.indexOf("markers")!==-1?this.scatterPlot?this.scatterPlot.update(B):(this.scatterPlot=P(B),this.scatterPlot._trace=this,this.scatterPlot.highlightScale=1,this.scene.glplot.add(this.scatterPlot)):this.scatterPlot&&(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose(),this.scatterPlot=null),O={gl:this.scene.glplot.gl,position:_.position,glyph:_.text,color:_.textColor,size:_.textSize,angle:_.textAngle,alignment:_.textOffset,font:_.textFont,orthographic:!0,lineWidth:0,project:!1,opacity:y.opacity},this.textLabels=y.hovertext||y.text,this.mode.indexOf("text")!==-1?this.textMarkers?this.textMarkers.update(O):(this.textMarkers=P(O),this.textMarkers._trace=this,this.textMarkers.highlightScale=1,this.scene.glplot.add(this.textMarkers)):this.textMarkers&&(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose(),this.textMarkers=null),k={gl:this.scene.glplot.gl,position:_.position,color:_.errorColor,error:_.errorBounds,lineWidth:_.errorLineWidth,capSize:_.errorCapSize,opacity:y.opacity},this.errorBars?_.errorBounds?this.errorBars.update(k):(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose(),this.errorBars=null):_.errorBounds&&(this.errorBars=i(k),this.errorBars._trace=this,this.scene.glplot.add(this.errorBars)),_.delaunayAxis>=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;n<l;n++)if(u=r.a[n],g=r.b[n],m(u)&&m(g)){var w=s.ab2xy(+u,+g,!0),h=s.isVisible(+u,+g);h||(f=!0),c[n]={x:w[0],y:w[1],a:u,b:g,vis:h}}else c[n]={x:!1,y:!1};return r._needsCull=f,c[0].carpet=s,c[0].trace=r,A(r,l),P(t,r),i(c,r),L(c,r),c}}},98965:function(G,V,e){var m=e(71828),P=e(47581),i=e(34098),L=e(49508),A=e(11058),v=e(94039),p=e(82410),t=e(28908),r=e(97001);G.exports=function(n,l,c,u){function g(T,C){return m.coerce(n,l,r,T,C)}g("carpet"),l.xaxis="x",l.yaxis="y";var f=g("a"),w=g("b"),h=Math.min(f.length,w.length);if(!h){l.visible=!1;return}l._length=h,g("text"),g("texttemplate"),g("hovertext");var o=h<P.PTS_LINESONLY?"lines+markers":"lines";g("mode",o),i.hasLines(l)&&(A(n,l,c,u,g,{backoff:!0}),v(n,l,g),g("connectgaps")),i.hasMarkers(l)&&L(n,l,c,u,g,{gradient:!0}),i.hasText(l)&&p(n,l,u,g);var d=[];(i.hasMarkers(l)||i.hasText(l))&&(g("marker.maxdisplayed"),d.push("points")),g("fill"),l.fill!=="none"&&(t(n,l,c,g),i.hasLines(l)||v(n,l,g)),(l.fill==="tonext"||l.fill==="toself")&&d.push("fills");var M=g("hoveron",d.join("+")||"points");M!=="fills"&&g("hovertemplate"),m.coerceSelectionMarkerOpacity(l,g)}},16165:function(G){G.exports=function(e,m,P,i,L){var A=i[L];return e.a=A.a,e.b=A.b,e.y=A.y,e}},48953:function(G){G.exports=function(e,m){var P={},i=m._carpet,L=i.ab2ij([e.a,e.b]),A=Math.floor(L[0]),v=L[0]-A,p=Math.floor(L[1]),t=L[1]-p,r=i.evalxy([],A,p,v,t);return P.yLabel=r[1].toFixed(3),P}},22931:function(G,V,e){var m=e(33720),P=e(71828).fillText;G.exports=function(L,A,v,p){var t=m(L,A,v,p);if(!t||t[0].index===!1)return;var r=t[0];if(r.index===void 0){var s=1-r.y0/L.ya._length,n=L.xa._length,l=n*s/2,c=n-l;return r.x0=Math.max(Math.min(r.x0,c),l),r.x1=Math.max(Math.min(r.x1,c),l),t}var u=r.cd[r.index];r.a=u.a,r.b=u.b,r.xLabelVal=void 0,r.yLabelVal=void 0;var g=r.trace,f=g._carpet,w=g._module.formatLabels(u,g);r.yLabel=w.yLabel,delete r.text;var h=[];function o(T,C){var x;T.labelprefix&&T.labelprefix.length>0?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("<br>")}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<p.length;r++)s=p[r][0].trace,s._xA=c,s._yA=u;for(m(A,g,p,t),r=0;r<p.length;r++)s=p[r][0].trace,n=t.selectAll("g.trace"+s.uid+" .js-line"),i.setClipUrl(n,p[r][0].carpet._clipPathId,A)}},19316:function(G,V,e){var m=e(5386).fF,P=e(5386).si,i=e(82196),L=e(9012),A=e(50693),v=e(79952).P,p=e(1426).extendFlat,t=e(30962).overrideAll,r=i.marker,s=i.line,n=r.line;G.exports=t({lon:{valType:"data_array"},lat:{valType:"data_array"},locations:{valType:"data_array"},locationmode:{valType:"enumerated",values:["ISO-3","USA-states","country names","geojson-id"],dflt:"ISO-3"},geojson:{valType:"any",editType:"calc"},featureidkey:{valType:"string",editType:"calc",dflt:"id"},mode:p({},i.mode,{dflt:"markers"}),text:p({},i.text,{}),texttemplate:P({editType:"plot"},{keys:["lat","lon","location","text"]}),hovertext:p({},i.hovertext,{}),textfont:i.textfont,textposition:i.textposition,line:{color:s.color,width:s.width,dash:v},connectgaps:i.connectgaps,marker:p({symbol:r.symbol,opacity:r.opacity,angle:r.angle,angleref:p({},r.angleref,{values:["previous","up","north"]}),standoff:r.standoff,size:r.size,sizeref:r.sizeref,sizemin:r.sizemin,sizemode:r.sizemode,colorbar:r.colorbar,line:p({width:n.width},A("marker.line")),gradient:r.gradient},A("marker")),fill:{valType:"enumerated",values:["none","toself"],dflt:"none"},fillcolor:i.fillcolor,selected:i.selected,unselected:i.unselected,hoverinfo:p({},L.hoverinfo,{flags:["lon","lat","location","text","name"]}),hovertemplate:m()},"calc","nested")},84622:function(G,V,e){var m=e(92770),P=e(50606).BADNUM,i=e(36922),L=e(75225),A=e(66279),v=e(71828)._;function p(t){return t&&typeof t=="string"}G.exports=function(r,s){var n=Array.isArray(s.locations),l=n?s.locations.length:s._length,c=new Array(l),u;s.geojson?u=function(d){return p(d)||m(d)}:u=p;for(var g=0;g<l;g++){var f=c[g]={};if(n){var w=s.locations[g];f.loc=u(w)?w:null}else{var h=s.lon[g],o=s.lat[g];m(h)&&m(o)?f.lonlat=[+h,+o]:f.lonlat=[P,P]}}return L(c,s),i(r,s),A(c,s),l&&(c[0].t={labels:{lat:v(r,"lat:")+" ",lon:v(r,"lon:")+" "}}),c}},10659:function(G,V,e){var m=e(71828),P=e(34098),i=e(49508),L=e(11058),A=e(82410),v=e(28908),p=e(19316);G.exports=function(r,s,n,l){function c(M,T){return m.coerce(r,s,p,M,T)}var u=c("locations"),g;if(u&&u.length){var f=c("geojson"),w;(typeof f=="string"&&f!==""||m.isPlainObject(f))&&(w="geojson-id");var h=c("locationmode",w);h==="geojson-id"&&c("featureidkey"),g=u.length}else{var o=c("lon")||[],d=c("lat")||[];g=Math.min(o.length,d.length)}if(!g){s.visible=!1;return}s._length=g,c("text"),c("hovertext"),c("hovertemplate"),c("mode"),P.hasLines(s)&&(L(r,s,n,l,c),c("connectgaps")),P.hasMarkers(s)&&i(r,s,n,l,c,{gradient:!0}),P.hasText(s)&&(c("texttemplate"),A(r,s,l,c)),c("fill"),s.fill!=="none"&&v(r,s,n,c),m.coerceSelectionMarkerOpacity(s,c)}},84084:function(G){G.exports=function(e,m,P,i,L){e.lon=m.lon,e.lat=m.lat,e.location=m.loc?m.loc:null;var A=i[L];return A.fIn&&A.fIn.properties&&(e.properties=A.fIn.properties),e}},82719:function(G,V,e){var m=e(89298);G.exports=function(i,L,A){var v={},p=A[L.geo]._subplot,t=p.mockAxis,r=i.lonlat;return v.lonLabel=m.tickText(t,t.c2l(r[0]),!0).text,v.latLabel=m.tickText(t,t.c2l(r[1]),!0).text,v}},14977:function(G,V,e){var m=e(30211),P=e(50606).BADNUM,i=e(34603),L=e(71828).fillText,A=e(19316);G.exports=function(t,r,s){var n=t.cd,l=n[0].trace,c=t.xa,u=t.ya,g=t.subplot,f=g.projection.isLonLatOverEdges,w=g.project;function h(S){var b=S.lonlat;if(b[0]===P||f(b))return 1/0;var a=w(b),E=w([r,s]),y=Math.abs(a[0]-E[0]),z=Math.abs(a[1]-E[1]),I=Math.max(3,S.mrc||0);return Math.max(Math.sqrt(y*y+z*z)-I,1-3/I)}if(m.getClosest(n,h,t),t.index!==!1){var o=n[t.index],d=o.lonlat,M=[c.c2p(d),u.c2p(d)],T=o.mrc||1;t.x0=M[0]-T,t.x1=M[0]+T,t.y0=M[1]-T,t.y1=M[1]+T,t.loc=o.loc,t.lon=d[0],t.lat=d[1];var C={};C[l.geo]={_subplot:g};var x=l._module.formatLabels(o,l,C);return t.lonLabel=x.lonLabel,t.latLabel=x.latLabel,t.color=i(l,o),t.extraText=v(l,o,t,n[0].t.labels),t.hovertemplate=l.hovertemplate,[t]}};function v(p,t,r,s){if(p.hovertemplate)return;var n=t.hi||p.hoverinfo,l=n==="all"?A.hoverinfo.flags:n.split("+"),c=l.indexOf("location")!==-1&&Array.isArray(p.locations),u=l.indexOf("lon")!==-1,g=l.indexOf("lat")!==-1,f=l.indexOf("text")!==-1,w=[];function h(o){return o+"°"}return c?w.push(t.loc):u&&g?w.push("("+h(r.latLabel)+", "+h(r.lonLabel)+")"):u?w.push(s.lon+h(r.lonLabel)):g&&w.push(s.lat+h(r.latLabel)),f&&L(t,p,w),w.join("<br>")}},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<h;o++){d=c[o];var C=M==="geojson-id"?d.fOut:A.locationToFeature(M,d.loc,T);d.lonlat=C?C.properties.ct:[p,p]}}var x={padded:!0},S,b;if(f.fitbounds==="geojson"&&g.locationmode==="geojson-id"){var a=A.computeBbox(A.getTraceGeojson(g));S=[a[0],a[2]],b=[a[1],a[3]]}else{for(S=new Array(h),b=new Array(h),o=0;o<h;o++)d=c[o],S[o]=d.lonlat[0],b[o]=d.lonlat[1];x.ppad=t(g,h)}g._extremes.lon=v(f.lonaxis._ax,S,x),g._extremes.lat=v(f.lataxis._ax,b,x)}G.exports={calcGeoJSON:l,plot:n}},20548:function(G,V,e){var m=e(34098),P=e(50606).BADNUM;G.exports=function(L,A){var v=L.cd,p=L.xaxis,t=L.yaxis,r=[],s=v[0].trace,n,l,c,u,g,f=!m.hasMarkers(s)&&!m.hasText(s);if(f)return[];if(A===!1)for(g=0;g<v.length;g++)v[g].selected=0;else for(g=0;g<v.length;g++)n=v[g],l=n.lonlat,l[0]!==P&&(c=p.c2p(l),u=t.c2p(l),A.contains([c,u],null,g,L)?(r.push({pointNumber:g,lon:l[0],lat:l[1]}),n.selected=1):n.selected=0);return r}},33095:function(G,V,e){var m=e(39898),P=e(91424),i=e(7901),L=e(16296),A=L.stylePoints,v=L.styleText;G.exports=function(r,s){s&&p(r,s)};function p(t,r){var s=r[0].trace,n=r[0].node3;n.style("opacity",r[0].trace.opacity),A(n,s,t),v(n,s,t),n.selectAll("path.js-line").style("fill","none").each(function(l){var c=m.select(this),u=l.trace,g=u.line||{};c.call(i.stroke,g.color).call(P.dashLine,g.dash||"",g.width||0),u.fill!=="none"&&c.call(i.fill,u.fillcolor)})}},42341:function(G,V,e){var m=e(9012),P=e(82196),i=e(12663).axisHoverFormat,L=e(50693),A=e(78607),v=e(1426).extendFlat,p=e(30962).overrideAll,t=e(78232).DASHES,r=P.line,s=P.marker,n=s.line,l=G.exports=p({x:P.x,x0:P.x0,dx:P.dx,y:P.y,y0:P.y0,dy:P.dy,xperiod:P.xperiod,yperiod:P.yperiod,xperiod0:P.xperiod0,yperiod0:P.yperiod0,xperiodalignment:P.xperiodalignment,yperiodalignment:P.yperiodalignment,xhoverformat:i("x"),yhoverformat:i("y"),text:P.text,hovertext:P.hovertext,textposition:P.textposition,textfont:P.textfont,mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"]},line:{color:r.color,width:r.width,shape:{valType:"enumerated",values:["linear","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},dash:{valType:"enumerated",values:A(t),dflt:"solid"}},marker:v({},L("marker"),{symbol:s.symbol,angle:s.angle,size:s.size,sizeref:s.sizeref,sizemin:s.sizemin,sizemode:s.sizemode,opacity:s.opacity,colorbar:s.colorbar,line:v({},L("marker.line"),{width:n.width})}),connectgaps:P.connectgaps,fill:v({},P.fill,{dflt:"none"}),fillcolor:P.fillcolor,selected:{marker:P.selected.marker,textfont:P.selected.textfont},unselected:{marker:P.unselected.marker,textfont:P.unselected.textfont},opacity:m.opacity},"calc","nested");l.x.editType=l.y.editType=l.x0.editType=l.y0.editType="calc+clearAxisTypes",l.hovertemplate=P.hovertemplate,l.texttemplate=P.texttemplate},72156:function(G,V,e){var m=e(20794);G.exports={moduleType:"trace",name:"scattergl",basePlotModule:e(93612),categories:["gl","regl","cartesian","symbols","errorBarsOK","showLegend","scatter-like"],attributes:e(42341),supplyDefaults:e(47148),crossTraceDefaults:e(34936),colorbar:e(4898),formatLabels:e(68101),calc:e(45032),hoverPoints:m.hoverPoints,selectPoints:e(58147),meta:{}}},45032:function(G,V,e){var m=e(88294),P=e(71828),i=e(41675),L=e(71739).findExtremes,A=e(42973),v=e(47761),p=v.calcMarkerSize,t=v.calcAxisExpansion,r=v.setFirstScatter,s=e(36922),n=e(19635),l=e(38967),c=e(50606).BADNUM,u=e(78232).TOO_MANY_POINTS;G.exports=function(h,o){var d=h._fullLayout,M=o._xA=i.getFromId(h,o.xaxis,"x"),T=o._yA=i.getFromId(h,o.yaxis,"y"),C=d._plots[o.xaxis+o.yaxis],x=o._length,S=x>=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;E<x;E++)N[E*2]=k[E]===c?NaN:k[E],N[E*2+1]=O[E]===c?NaN:O[E],_[E]=E;if(M.type==="log")for(E=0;E<b;E+=2)N[E]=M.c2l(N[E]);if(T.type==="log")for(E=1;E<b;E+=2)N[E]=T.c2l(N[E]);S&&M.type!=="log"&&T.type!=="log"?a.tree=m(N):a.ids=_,s(h,o);var U=f(h,C,o,N,k,O),Y=l(h,C);r(d,o);var J;return S?U.marker&&(J=U.marker.sizeAvg||Math.max(U.marker.size,3)):J=p(o,x),t(h,o,M,T,k,O,J),U.errorX&&g(o,M,U.errorX),U.errorY&&g(o,T,U.errorY),U.fill&&!Y.fill2d&&(Y.fill2d=!0),U.marker&&!Y.scatter2d&&(Y.scatter2d=!0),U.line&&!Y.line2d&&(Y.line2d=!0),(U.errorX||U.errorY)&&!Y.error2d&&(Y.error2d=!0),U.text&&!Y.glText&&(Y.glText=!0),U.marker&&(U.marker.snap=x),Y.lineOptions.push(U.line),Y.errorXOptions.push(U.errorX),Y.errorYOptions.push(U.errorY),Y.fillOptions.push(U.fill),Y.markerOptions.push(U.marker),Y.markerSelectedOptions.push(U.markerSel),Y.markerUnselectedOptions.push(U.markerUnsel),Y.textOptions.push(U.text),Y.textSelectedOptions.push(U.textSel),Y.textUnselectedOptions.push(U.textUnsel),Y.selectBatch.push([]),Y.unselectBatch.push([]),a._scene=Y,a.index=Y.count,a.x=k,a.y=O,a.positions=N,Y.count++,[{x:!1,y:!1,t:a,trace:o}]};function g(w,h,o){var d=w._extremes[h._id],M=L(h,o._bnds,{padded:!0});d.min=d.min.concat(M.min),d.max=d.max.concat(M.max)}function f(w,h,o,d,M,T){var C=n.style(w,o);if(C.marker&&(C.marker.positions=d),C.line&&d.length>1&&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;k<U.length;++k)U[k]*=B.line.width*N;O.line.dashes=U}return B.error_x&&B.error_x.visible&&(O.errorX=M(B,B.error_x,N)),B.error_y&&B.error_y.visible&&(O.errorY=M(B,B.error_y,N)),B.fill&&B.fill!=="none"&&(O.fill={closed:!0,fill:B.fillcolor,thickness:0}),O}function w(I,B){var k=I._fullLayout,O=B._length,N=B.textfont,_=B.textposition,U=Array.isArray(_)?_:[_],Y=N.color,J=N.size,te=N.family,ae={},ce,Q=I._context.plotGlPixelRatio,Z=B.texttemplate;if(Z){ae.text=[];var j=k._d3locale,K=Array.isArray(Z),ee=K?Math.min(Z.length,O):O,oe=K?function(Me){return Z[Me]}:function(){return Z};for(ce=0;ce<ee;ce++){var q={i:ce},$=B._module.formatLabels(q,B,k),le={};g(le,B,ce);var ie=B._meta||{};ae.text.push(A.texttemplateString(oe(ce),$,j,le,q,ie))}}else Array.isArray(B.text)&&B.text.length<O?ae.text=B.text.slice():ae.text=B.text;if(Array.isArray(ae.text))for(ce=ae.text.length;ce<O;ce++)ae.text[ce]="";for(ae.opacity=B.opacity,ae.font={},ae.align=[],ae.baseline=[],ce=0;ce<U.length;ce++){var he=U[ce].split(/\s+/);switch(he[1]){case"left":ae.align.push("right");break;case"right":ae.align.push("left");break;default:ae.align.push(he[1])}switch(he[0]){case"top":ae.baseline.push("bottom");break;case"bottom":ae.baseline.push("top");break;default:ae.baseline.push(he[0])}}if(Array.isArray(Y))for(ae.color=new Array(O),ce=0;ce<O;ce++)ae.color[ce]=Y[ce];else ae.color=Y;if(A.isArrayOrTypedArray(J)||Array.isArray(te))for(ae.font=new Array(O),ce=0;ce<O;ce++){var me=ae.font[ce]={};me.size=(A.isTypedArray(J)?J[ce]:Array.isArray(J)?m(J[ce])?J[ce]:0:J)*Q,me.family=Array.isArray(te)?te[ce]:te}else ae.font={size:J*Q,family:te};return ae}function h(I,B){var k=B._length,O=B.marker,N={},_,U=A.isArrayOrTypedArray(O.symbol),Y=A.isArrayOrTypedArray(O.angle),J=A.isArrayOrTypedArray(O.color),te=A.isArrayOrTypedArray(O.line.color),ae=A.isArrayOrTypedArray(O.opacity),ce=A.isArrayOrTypedArray(O.size),Q=A.isArrayOrTypedArray(O.line.width),Z;if(U||(Z=n.isOpenSymbol(O.symbol)),U||J||te||ae||Y){N.symbols=new Array(k),N.angles=new Array(k),N.colors=new Array(k),N.borderColors=new Array(k);var j=O.symbol,K=O.angle,ee=t(O,O.opacity,k),oe=t(O.line,O.opacity,k);if(!Array.isArray(oe[0])){var q=oe;for(oe=Array(k),_=0;_<k;_++)oe[_]=q}if(!Array.isArray(ee[0])){var $=ee;for(ee=Array(k),_=0;_<k;_++)ee[_]=$}if(!Array.isArray(j)){var le=j;for(j=Array(k),_=0;_<k;_++)j[_]=le}if(!Array.isArray(K)){var ie=K;for(K=Array(k),_=0;_<k;_++)K[_]=ie}for(N.symbols=j,N.angles=K,N.colors=ee,N.borderColors=oe,_=0;_<k;_++)U&&(Z=n.isOpenSymbol(O.symbol[_])),Z&&(oe[_]=ee[_].slice(),ee[_]=ee[_].slice(),ee[_][3]=0);for(N.opacity=B.opacity,N.markers=new Array(k),_=0;_<k;_++)N.markers[_]=a({mx:N.symbols[_],ma:N.angles[_]},B)}else Z?(N.color=i(O.color,"uint8"),N.color[3]=0,N.borderColor=i(O.color,"uint8")):(N.color=i(O.color,"uint8"),N.borderColor=i(O.line.color,"uint8")),N.opacity=B.opacity*O.opacity,N.marker=a({mx:O.symbol,ma:O.angle},B);var he=1,me=s(B,he),Me;if(ce||Q){var Te=N.sizes=new Array(k),Oe=N.borderSizes=new Array(k),Ne=0,Ee;if(ce){for(_=0;_<k;_++)Te[_]=me(O.size[_]),Ne+=Te[_];Ee=Ne/k}else for(Me=me(O.size),_=0;_<k;_++)Te[_]=Me;if(Q)for(_=0;_<k;_++)Oe[_]=O.line.width[_];else for(Me=O.line.width,_=0;_<k;_++)Oe[_]=Me;N.sizeAvg=Ee}else N.size=me(O&&O.size||10),N.borderSizes=me(O.line.width);return N}function o(I,B,k){var O=B.marker,N={};return k&&(k.marker&&k.marker.symbol?N=h(I,A.extendFlat({},O,k.marker)):k.marker&&(k.marker.size&&(N.size=k.marker.size),k.marker.color&&(N.colors=k.marker.color),k.marker.opacity!==void 0&&(N.opacity=k.marker.opacity))),N}function d(I,B,k){var O={};if(!k)return O;if(k.textfont){var N={opacity:1,text:B.text,texttemplate:B.texttemplate,textposition:B.textposition,textfont:A.extendFlat({},B.textfont)};k.textfont&&A.extendFlat(N.textfont,k.textfont),O=w(I,N)}return O}function M(I,B,k){var O={capSize:B.width*2*k,lineWidth:B.thickness*k,color:B.color};return B.copy_ystyle&&(O=I.error_y),O}var T=l.SYMBOL_SDF_SIZE,C=l.SYMBOL_SIZE,x=l.SYMBOL_STROKE,S={},b=v.symbolFuncs[0](C*.05);function a(I,B){var k=I.mx;if(k==="circle")return null;var O,N,_=v.symbolNumber(k),U=v.symbolFuncs[_%100],Y=!!v.symbolNoDot[_%100],J=!!v.symbolNoFill[_%100],te=n.isDotSymbol(k);if(I.ma&&(k+="_"+I.ma),S[k])return S[k];var ae=v.getMarkerAngle(I,B);return te&&!Y?O=U(C*1.1,ae)+b:O=U(C,ae),N=P(O,{w:T,h:T,viewBox:[-C,-C,C,C],stroke:J?x:-x}),S[k]=N,N||null}function E(I,B,k){var O=k.length,N=O/2,_,U;if(r.hasLines(B)&&N)if(B.line.shape==="hv"){for(_=[],U=0;U<N-1;U++)isNaN(k[U*2])||isNaN(k[U*2+1])?_.push(NaN,NaN,NaN,NaN):(_.push(k[U*2],k[U*2+1]),!isNaN(k[U*2+2])&&!isNaN(k[U*2+3])?_.push(k[U*2+2],k[U*2+1]):_.push(NaN,NaN));_.push(k[O-2],k[O-1])}else if(B.line.shape==="hvh"){for(_=[],U=0;U<N-1;U++)if(isNaN(k[U*2])||isNaN(k[U*2+1])||isNaN(k[U*2+2])||isNaN(k[U*2+3]))!isNaN(k[U*2])&&!isNaN(k[U*2+1])?_.push(k[U*2],k[U*2+1]):_.push(NaN,NaN),_.push(NaN,NaN);else{var Y=(k[U*2]+k[U*2+2])/2;_.push(k[U*2],k[U*2+1],Y,k[U*2+1],Y,k[U*2+3])}_.push(k[O-2],k[O-1])}else if(B.line.shape==="vhv"){for(_=[],U=0;U<N-1;U++)if(isNaN(k[U*2])||isNaN(k[U*2+1])||isNaN(k[U*2+2])||isNaN(k[U*2+3]))!isNaN(k[U*2])&&!isNaN(k[U*2+1])?_.push(k[U*2],k[U*2+1]):_.push(NaN,NaN),_.push(NaN,NaN);else{var J=(k[U*2+1]+k[U*2+3])/2;_.push(k[U*2],k[U*2+1],k[U*2],J,k[U*2+2],J)}_.push(k[O-2],k[O-1])}else if(B.line.shape==="vh"){for(_=[],U=0;U<N-1;U++)isNaN(k[U*2])||isNaN(k[U*2+1])?_.push(NaN,NaN,NaN,NaN):(_.push(k[U*2],k[U*2+1]),!isNaN(k[U*2+2])&&!isNaN(k[U*2+3])?_.push(k[U*2],k[U*2+3]):_.push(NaN,NaN));_.push(k[O-2],k[O-1])}else _=k;var te=!1;for(U=0;U<_.length;U++)if(isNaN(_[U])){te=!0;break}var ae=te||_.length>l.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;ie<J;ie++,he+=4){var me=ce[ie];if(m(me)){var Me=k[ie*2+ee],Te=K(me,ie),Oe=Te[0],Ne=Te[1];if(m(Oe)&&m(Ne)){var Ee=me-Oe,xe=me+Ne;q[he+oe[0]]=Me-Q.c2l(Ee),q[he+oe[1]]=Q.c2l(xe)-Me,q[he+oe[2]]=0,q[he+oe[3]]=0,$=Math.min($,me-Oe),le=Math.max(le,me+Ne)}}}te[Z]={positions:k,errors:q,_bnds:[$,le]}}}return ae(O,U),ae(N,Y),te}function z(I,B,k,O){var N=B._length,_={},U;if(r.hasMarkers(B)){var Y=k.font,J=k.align,te=k.baseline;for(_.offset=new Array(N),U=0;U<N;U++){var ae=O.sizes?O.sizes[U]:O.size,ce=Array.isArray(Y)?Y[U].size:Y.size,Q=Array.isArray(J)?J.length>1?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=M<A.PTS_LINESONLY?"lines+markers":"lines";h("text"),h("hovertext"),h("hovertemplate"),h("mode",T),v.hasLines(g)&&(h("connectgaps"),s(u,g,f,w,h),h("line.shape")),v.hasMarkers(g)&&(r(u,g,f,w,h,{noAngleRef:!0,noStandOff:!0}),h("marker.line.width",o||d?1:0)),v.hasText(g)&&(h("texttemplate"),l(u,g,w,h));var C=(g.line||{}).color,x=(g.marker||{}).color;h("fill"),g.fill!=="none"&&n(u,g,f,h);var S=P.getComponentMethod("errorbars","supplyDefaults");S(u,g,C||x||f,{axis:"y"}),S(u,g,C||x||f,{axis:"x",inherit:"y"}),m.coerceSelectionMarkerOpacity(g,h)}},5345:function(G,V,e){var m=e(71828),P=e(7901),i=e(37822).DESELECTDIM;function L(A){var v=A[0],p=v.trace,t=v.t,r=t._scene,s=t.index,n=r.selectBatch[s],l=r.unselectBatch[s],c=r.textOptions[s],u=r.textSelectedOptions[s]||{},g=r.textUnselectedOptions[s]||{},f=m.extendFlat({},c),w,h;if(n.length||l.length){var o=u.color,d=g.color,M=c.color,T=Array.isArray(M);for(f.color=new Array(p._length),w=0;w<n.length;w++)h=n[w],f.color[h]=o||(T?M[h]:M);for(w=0;w<l.length;w++){h=l[w];var C=T?M[h]:M;f.color[h]=d||(o?C:P.addOpacity(C,i))}}r.glText[s].update(f)}G.exports={styleTextSelection:L}},68101:function(G,V,e){var m=e(8225);G.exports=function(i,L,A){var v=i.i;return"x"in i||(i.x=L._x[v]),"y"in i||(i.y=L._y[v]),m(i,L,A)}},68645:function(G,V,e){var m=e(78232);V.isOpenSymbol=function(P){return typeof P=="string"?m.OPEN_RE.test(P):P%200>100},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<d.length;y++){if(S=d[y],a=g[S],z=Math.abs(c.c2p(a)-w),N){var U=c.c2p(l._xStarts[S]),Y=c.c2p(l._xEnds[S]);z=w>=Math.min(U,Y)&&w<=Math.max(U,Y)?0:1/0}if(z<O){if(O=z,E=f[S],I=u.c2p(E)-h,_){var J=u.c2p(l._yStarts[S]),te=u.c2p(l._yEnds[S]);I=h>=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),B<O&&(O=k=B,b=S);return v.index=b,v.distance=O,v.dxy=k,b===void 0?[v]:[A(v,g,f,l)]}function A(v,p,t,r){var s=v.xa,n=v.ya,l=v.distance,c=v.dxy,u=v.index,g={pointNumber:u,x:p[u],y:t[u]};g.tx=Array.isArray(r.text)?r.text[u]:r.text,g.htx=Array.isArray(r.hovertext)?r.hovertext[u]:r.hovertext,g.data=Array.isArray(r.customdata)?r.customdata[u]:r.customdata,g.tp=Array.isArray(r.textposition)?r.textposition[u]:r.textposition;var f=r.textfont;f&&(g.ts=P.isArrayOrTypedArray(f.size)?f.size[u]:f.size,g.tc=Array.isArray(f.color)?f.color[u]:f.color,g.tf=Array.isArray(f.family)?f.family[u]:f.family);var w=r.marker;w&&(g.ms=P.isArrayOrTypedArray(w.size)?w.size[u]:w.size,g.mo=P.isArrayOrTypedArray(w.opacity)?w.opacity[u]:w.opacity,g.mx=P.isArrayOrTypedArray(w.symbol)?w.symbol[u]:w.symbol,g.ma=P.isArrayOrTypedArray(w.angle)?w.angle[u]:w.angle,g.mc=P.isArrayOrTypedArray(w.color)?w.color[u]:w.color);var h=w&&w.line;h&&(g.mlc=Array.isArray(h.color)?h.color[u]:h.color,g.mlw=P.isArrayOrTypedArray(h.width)?h.width[u]:h.width);var o=w&&w.gradient;o&&o.type!=="none"&&(g.mgt=Array.isArray(o.type)?o.type[u]:o.type,g.mgc=Array.isArray(o.color)?o.color[u]:o.color);var d=s.c2p(g.x,!0),M=n.c2p(g.y,!0),T=g.mrc||1,C=r.hoverlabel;C&&(g.hbg=Array.isArray(C.bgcolor)?C.bgcolor[u]:C.bgcolor,g.hbc=Array.isArray(C.bordercolor)?C.bordercolor[u]:C.bordercolor,g.hts=P.isArrayOrTypedArray(C.font.size)?C.font.size[u]:C.font.size,g.htc=Array.isArray(C.font.color)?C.font.color[u]:C.font.color,g.htf=Array.isArray(C.font.family)?C.font.family[u]:C.font.family,g.hnl=P.isArrayOrTypedArray(C.namelength)?C.namelength[u]:C.namelength);var x=r.hoverinfo;x&&(g.hi=Array.isArray(x)?x[u]:x);var S=r.hovertemplate;S&&(g.ht=Array.isArray(S)?S[u]:S);var b={};b[v.index]=g;var a=r._origX,E=r._origY,y=P.extendFlat({},v,{color:i(r,g),x0:d-T,x1:d+T,xLabelVal:a?a[u]:g.x,y0:M-T,y1:M+T,yLabelVal:E?E[u]:g.y,cd:b,distance:l,spikeDistance:c,hovertemplate:g.ht});return g.htx?y.text=g.htx:g.tx?y.text=g.tx:r.text&&(y.text=r.text),P.fillText(g,r,y),m.getComponentMethod("errorbars","hoverInfo")(g,r,y),y}G.exports={hoverPoints:L,calcHover:A}},68868:function(G,V,e){var m=e(72156);m.plot=e(26787),G.exports=m},26787:function(G,V,e){var m=e(11870),P=e(46075),i=e(3593),L=e(42505),A=e(71828),v=e(64505).selectMode,p=e(79749),t=e(34098),r=e(68687),s=e(5345).styleTextSelection,n={};function l(u,g,f,w){var h=u._size,o=u.width*w,d=u.height*w,M=h.l*w,T=h.b*w,C=h.r*w,x=h.t*w,S=h.w*w,b=h.h*w;return[M+g.domain[0]*S,T+f.domain[0]*b,o-C-(1-g.domain[1])*S,d-x-(1-f.domain[1])*b]}var c=G.exports=function(g,f,w){if(w.length){var h=g._fullLayout,o=f._scene,d=f.xaxis,M=f.yaxis,T,C;if(o){var x=p(g,["ANGLE_instanced_arrays","OES_element_index_uint"],n);if(!x){o.init();return}var S=o.count,b=h._glcanvas.data()[0].regl;if(r(g,f,w),o.dirty){if(o.error2d===!0&&(o.error2d=i(b)),o.line2d===!0&&(o.line2d=P(b)),o.scatter2d===!0&&(o.scatter2d=m(b)),o.fill2d===!0&&(o.fill2d=P(b)),o.glText===!0)for(o.glText=new Array(S),T=0;T<S;T++)o.glText[T]=new L(b);if(o.glText){if(S>o.glText.length){var a=S-o.glText.length;for(T=0;T<a;T++)o.glText.push(new L(b))}else if(S<o.glText.length){var E=o.glText.length-S,y=o.glText.splice(S,E);y.forEach(function(q){q.destroy()})}for(T=0;T<S;T++)o.glText[T].update(o.textOptions[T])}if(o.line2d&&(o.line2d.update(o.lineOptions),o.lineOptions=o.lineOptions.map(function(q){if(q&&q.positions){for(var $=q.positions,le=0;le<$.length&&(isNaN($[le])||isNaN($[le+1]));)le+=2;for(var ie=$.length-2;ie>le&&(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;Se<xe.length&&isNaN(xe[Se+1]);)Se+=2;for(Ue=xe.length-2;Ue>Se&&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;Se<xe.length&&isNaN(xe[Se]);)Se+=2;for(Ue=xe.length-2;Ue>Se&&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<xe.length;Oe+=2)(isNaN(xe[Oe])||isNaN(xe[Oe+1]))&&(Ee=Ee.concat(xe.slice(Te,Oe)),Ee.push(xe[Te],xe[Te+1]),Ee.push(null,null),Te=Oe+2);Ee=Ee.concat(xe.slice(Te)),Te&&Ee.push(xe[Te],xe[Te+1])}else{var He=he._nexttrace;if(He){var Fe=o.lineOptions[$+1];if(Fe){var Ge=Fe.positions;if(he.fill==="tonexty"){for(Ee=xe.slice(),$=Math.floor(Ge.length/2);$--;){var nt=Ge[$*2],qe=Ge[$*2+1];isNaN(nt)||isNaN(qe)||Ee.push(nt,qe)}q.fill=He.fillcolor}}}}if(he._prevtrace&&he._prevtrace.fill==="tonext"){var $e=o.lineOptions[$-1].positions,et=Ee.length/2;Te=et;var ct=[Te];for(Oe=0;Oe<$e.length;Oe+=2)(isNaN($e[Oe])||isNaN($e[Oe+1]))&&(ct.push(Oe/2+et+1),Te=Oe+2);Ee=Ee.concat($e),q.hole=ct}return q.fillmode=he.fill,q.opacity=he.opacity,q.positions=Ee,q}}),o.fill2d.update(o.fillOptions))}var I=h.dragmode,B=v(I),k=h.clickmode.indexOf("select")>-1;for(T=0;T<S;T++){var O=w[T][0],N=O.trace,_=O.t,U=_.index,Y=N._length,J=_.x,te=_.y;if(N.selectedpoints||B||k){if(B||(B=!0),N.selectedpoints){var ae=o.selectBatch[U]=A.selIndices2selPoints(N),ce={};for(C=0;C<ae.length;C++)ce[ae[C]]=1;var Q=[];for(C=0;C<Y;C++)ce[C]||Q.push(C);o.unselectBatch[U]=Q}var Z=_.xpx=new Array(Y),j=_.ypx=new Array(Y);for(C=0;C<Y;C++)Z[C]=d.c2p(J[C]),j[C]=M.c2p(te[C])}else _.xpx=_.ypx=null}if(B){if(o.select2d||(o.select2d=m(h._glcanvas.data()[1].regl)),o.scatter2d){var K=new Array(S);for(T=0;T<S;T++)K[T]=o.selectBatch[T].length||o.unselectBatch[T].length?o.markerUnselectedOptions[T]:{};o.scatter2d.update(K)}o.select2d&&(o.select2d.update(o.markerOptions),o.select2d.update(o.markerSelectedOptions)),o.glText&&w.forEach(function(q){var $=((q||[])[0]||{}).trace||{};t.hasText($)&&s(q)})}else o.scatter2d&&o.scatter2d.update(o.markerOptions);var ee={viewport:l(h,d,M,g._context.plotGlPixelRatio),range:[(d._rl||d.range)[0],(M._rl||M.range)[0],(d._rl||d.range)[1],(M._rl||M.range)[1]]},oe=A.repeat(ee,o.count);o.fill2d&&o.fill2d.update(oe),o.line2d&&o.line2d.update(oe),o.error2d&&o.error2d.update(oe.concat(oe)),o.scatter2d&&o.scatter2d.update(oe),o.select2d&&o.select2d.update(oe),o.glText&&o.glText.forEach(function(q){q.update(ee)})}}};c.reglPrecompiled=n},38967:function(G,V,e){var m=e(71828);G.exports=function(i,L){var A=L._scene,v={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},p={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return L._scene||(A=L._scene={},A.init=function(){m.extendFlat(A,p,v)},A.init(),A.update=function(r){var s=m.repeat(r,A.count);if(A.fill2d&&A.fill2d.update(s),A.scatter2d&&A.scatter2d.update(s),A.line2d&&A.line2d.update(s),A.error2d&&A.error2d.update(s.concat(s)),A.select2d&&A.select2d.update(s),A.glText)for(var n=0;n<A.count;n++)A.glText[n].update(r)},A.draw=function(){for(var r=A.count,s=A.fill2d,n=A.error2d,l=A.line2d,c=A.scatter2d,u=A.glText,g=A.select2d,f=A.selectBatch,w=A.unselectBatch,h=0;h<r;h++){if(s&&A.fillOrder[h]&&s.draw(A.fillOrder[h]),l&&A.lineOptions[h]&&l.draw(h),n&&(A.errorXOptions[h]&&n.draw(h),A.errorYOptions[h]&&n.draw(h+r)),c&&A.markerOptions[h])if(w[h].length){var o=m.repeat([],A.count);o[h]=w[h],c.draw(o)}else f[h].length||c.draw(h);u[h]&&A.textOptions[h]&&u[h].render()}g&&g.draw(f),A.dirty=!1},A.destroy=function(){A.fill2d&&A.fill2d.destroy&&A.fill2d.destroy(),A.scatter2d&&A.scatter2d.destroy&&A.scatter2d.destroy(),A.error2d&&A.error2d.destroy&&A.error2d.destroy(),A.line2d&&A.line2d.destroy&&A.line2d.destroy(),A.select2d&&A.select2d.destroy&&A.select2d.destroy(),A.glText&&A.glText.forEach(function(r){r.destroy&&r.destroy()}),A.lineOptions=null,A.fillOptions=null,A.markerOptions=null,A.markerSelectedOptions=null,A.markerUnselectedOptions=null,A.errorXOptions=null,A.errorYOptions=null,A.textOptions=null,A.textSelectedOptions=null,A.textUnselectedOptions=null,A.selectBatch=null,A.unselectBatch=null,L._scene=null}),A.dirty||m.extendFlat(A,v),A}},58147:function(G,V,e){var m=e(34098),P=e(5345).styleTextSelection;G.exports=function(L,A){var v=L.cd,p=L.xaxis,t=L.yaxis,r=[],s=v[0].trace,n=v[0].t,l=s._length,c=n.x,u=n.y,g=n._scene,f=n.index;if(!g)return r;var w=m.hasText(s),h=m.hasMarkers(s),o=!h&&!w;if(s.visible!==!0||o)return r;var d=[],M=[];if(A!==!1&&!A.degenerate)for(var T=0;T<l;T++)A.contains([n.xpx[T],n.ypx[T]],!1,T,L)?(d.push(T),r.push({pointNumber:T,x:p.c2d(c[T]),y:t.c2d(u[T])})):M.push(T);if(h){var C=g.scatter2d;if(!d.length&&!M.length){var x=new Array(g.count);x[f]=g.markerOptions[f],C.update.apply(C,x)}else if(!g.selectBatch[f].length&&!g.unselectBatch[f].length){var S=new Array(g.count);S[f]=g.markerUnselectedOptions[f],C.update.apply(C,S)}}return g.selectBatch[f]=d,g.unselectBatch[f]=M,w&&P(v),r}},99181:function(G,V,e){var m=e(5386).fF,P=e(5386).si,i=e(19316),L=e(82196),A=e(23585),v=e(9012),p=e(50693),t=e(1426).extendFlat,r=e(30962).overrideAll,s=e(23585),n=i.line,l=i.marker;G.exports=r({lon:i.lon,lat:i.lat,cluster:{enabled:{valType:"boolean"},maxzoom:t({},s.layers.maxzoom,{}),step:{valType:"number",arrayOk:!0,dflt:-1,min:-1},size:{valType:"number",arrayOk:!0,dflt:20,min:0},color:{valType:"color",arrayOk:!0},opacity:t({},l.opacity,{dflt:1})},mode:t({},L.mode,{dflt:"markers"}),text:t({},L.text,{}),texttemplate:P({editType:"plot"},{keys:["lat","lon","text"]}),hovertext:t({},L.hovertext,{}),line:{color:n.color,width:n.width},connectgaps:L.connectgaps,marker:t({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:l.opacity,size:l.size,sizeref:l.sizeref,sizemin:l.sizemin,sizemode:l.sizemode},p("marker")),fill:i.fill,fillcolor:L.fillcolor,textfont:A.layers.symbol.textfont,textposition:A.layers.symbol.textposition,below:{valType:"string"},selected:{marker:L.selected.marker},unselected:{marker:L.unselected.marker},hoverinfo:t({},v.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:m()},"calc","nested")},15790:function(G,V,e){var m=e(92770),P=e(71828),i=e(50606).BADNUM,L=e(18214),A=e(21081),v=e(91424),p=e(39984),t=e(34098),r=e(13056),s=e(23469).appendArrayPointValue,n=e(63893).NEWLINES,l=e(63893).BR_TAG_ALL;G.exports=function(M,T){var C=T[0].trace,x=C.visible===!0&&C._length!==0,S=C.fill!=="none",b=t.hasLines(C),a=t.hasMarkers(C),E=t.hasText(C),y=a&&C.marker.symbol==="circle",z=a&&C.marker.symbol!=="circle",I=C.cluster&&C.cluster.enabled,B=c("fill"),k=c("line"),O=c("circle"),N=c("symbol"),_={fill:B,line:k,circle:O,symbol:N};if(!x)return _;var U;if((S||b)&&(U=L.calcTraceToLineCoords(T)),S&&(B.geojson=L.makePolygon(U),B.layout.visibility="visible",P.extendFlat(B.paint,{"fill-color":C.fillcolor})),b&&(k.geojson=L.makeLine(U),k.layout.visibility="visible",P.extendFlat(k.paint,{"line-width":C.line.width,"line-color":C.line.color,"line-opacity":C.opacity})),y){var Y=u(T);O.geojson=Y.geojson,O.layout.visibility="visible",I&&(O.filter=["!",["has","point_count"]],_.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":o(C.cluster.color,C.cluster.step),"circle-radius":o(C.cluster.size,C.cluster.step),"circle-opacity":o(C.cluster.opacity,C.cluster.step)}},_.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":["Open Sans Regular","Arial Unicode MS Regular"],"text-size":12}}),P.extendFlat(O.paint,{"circle-color":Y.mcc,"circle-radius":Y.mrc,"circle-opacity":Y.mo})}if(y&&I&&(O.filter=["!",["has","point_count"]]),(z||E)&&(N.geojson=g(T,M),P.extendFlat(N.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),z&&(P.extendFlat(N.layout,{"icon-size":C.marker.size/10}),"angle"in C.marker&&C.marker.angle!=="auto"&&P.extendFlat(N.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),N.layout["icon-allow-overlap"]=C.marker.allowoverlap,P.extendFlat(N.paint,{"icon-opacity":C.opacity*C.marker.opacity,"icon-color":C.marker.color})),E)){var J=(C.marker||{}).size,te=r(C.textposition,J);P.extendFlat(N.layout,{"text-size":C.textfont.size,"text-anchor":te.anchor,"text-offset":te.offset,"text-font":C.textfont.family.split(", ")}),P.extendFlat(N.paint,{"text-color":C.textfont.color,"text-opacity":C.opacity})}return _};function c(d){return{type:d,geojson:L.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function u(d){var M=d[0].trace,T=M.marker,C=M.selectedpoints,x=P.isArrayOrTypedArray(T.color),S=P.isArrayOrTypedArray(T.size),b=P.isArrayOrTypedArray(T.opacity),a;function E(J){return M.opacity*J}function y(J){return J/2}var z;x&&(A.hasColorscale(M,"marker")?z=A.makeColorScaleFuncFromTrace(T):z=P.identity);var I;S&&(I=p(M));var B;b&&(B=function(J){var te=m(J)?+P.constrain(J,0,1):0;return E(te)});var k=[];for(a=0;a<d.length;a++){var O=d[a],N=O.lonlat;if(!h(N)){var _={};z&&(_.mcc=O.mcc=z(O.mc)),I&&(_.mrc=O.mrc=I(O.ms)),B&&(_.mo=B(O.mo)),C&&(_.selected=O.selected||0),k.push({type:"Feature",id:a+1,geometry:{type:"Point",coordinates:N},properties:_})}}var U;if(C)for(U=v.makeSelectedPointStyleFns(M),a=0;a<k.length;a++){var Y=k[a].properties;U.selectedOpacityFn&&(Y.mo=E(U.selectedOpacityFn(Y))),U.selectedColorFn&&(Y.mcc=U.selectedColorFn(Y)),U.selectedSizeFn&&(Y.mrc=U.selectedSizeFn(Y))}return{geojson:{type:"FeatureCollection",features:k},mcc:x||U&&U.selectedColorFn?{type:"identity",property:"mcc"}:T.color,mrc:S||U&&U.selectedSizeFn?{type:"identity",property:"mrc"}:y(T.size),mo:b||U&&U.selectedOpacityFn?{type:"identity",property:"mo"}:E(T.opacity)}}function g(d,M){for(var T=M._fullLayout,C=d[0].trace,x=C.marker||{},S=x.symbol,b=x.angle,a=S!=="circle"?f(S):w,E=b!=="auto"?f(b,!0):w,y=t.hasText(C)?f(C.text):w,z=[],I=0;I<d.length;I++){var B=d[I];if(!h(B.lonlat)){var k=C.texttemplate,O;if(k){var N=Array.isArray(k)?k[I]||"":k,_=C._module.formatLabels(B,C,T),U={};s(U,C,B.i);var Y=C._meta||{};O=P.texttemplateString(N,_,T._d3locale,U,B,Y)}else O=y(I);O&&(O=O.replace(n,"").replace(l,`
`)),z.push({type:"Feature",geometry:{type:"Point",coordinates:B.lonlat},properties:{symbol:a(I),angle:E(I),text:O}})}}return{type:"FeatureCollection",features:z}}function f(d,M){return P.isArrayOrTypedArray(d)?M?function(T){return m(d[T])?+d[T]:0}:function(T){return d[T]}:d?function(){return d}:w}function w(){return""}function h(d){return d[0]===i}function o(d,M){var T;if(P.isArrayOrTypedArray(d)&&P.isArrayOrTypedArray(M)){T=["step",["get","point_count"],d[0]];for(var C=1;C<d.length;C++)T.push(M[C-1],d[C])}else T=d;return T}},76645:function(G,V,e){var m=e(71828),P=e(34098),i=e(49508),L=e(11058),A=e(82410),v=e(28908),p=e(99181),t=["Metropolis Black Italic","Metropolis Black","Metropolis Bold Italic","Metropolis Bold","Metropolis Extra Bold Italic","Metropolis Extra Bold","Metropolis Extra Light Italic","Metropolis Extra Light","Metropolis Light Italic","Metropolis Light","Metropolis Medium Italic","Metropolis Medium","Metropolis Regular Italic","Metropolis Regular","Metropolis Semi Bold Italic","Metropolis Semi Bold","Metropolis Thin Italic","Metropolis Thin","Open Sans Bold Italic","Open Sans Bold","Open Sans Extra Bold Italic","Open Sans Extra Bold","Open Sans Italic","Open Sans Light Italic","Open Sans Light","Open Sans Regular","Open Sans Semibold Italic","Open Sans Semibold","Klokantech Noto Sans Bold","Klokantech Noto Sans CJK Bold","Klokantech Noto Sans CJK Regular","Klokantech Noto Sans Italic","Klokantech Noto Sans Regular"];G.exports=function(n,l,c,u){function g(S,b){return m.coerce(n,l,p,S,b)}function f(S,b){return m.coerce2(n,l,p,S,b)}var w=r(n,l,g);if(!w){l.visible=!1;return}if(g("text"),g("texttemplate"),g("hovertext"),g("hovertemplate"),g("mode"),g("below"),P.hasLines(l)&&(L(n,l,c,u,g,{noDash:!0}),g("connectgaps")),P.hasMarkers(l)){i(n,l,c,u,g,{noLine:!0,noAngle:!0}),g("marker.allowoverlap"),g("marker.angle");var h=l.marker;h.symbol!=="circle"&&(m.isArrayOrTypedArray(h.size)&&(h.size=h.size[0]),m.isArrayOrTypedArray(h.color)&&(h.color=h.color[0]))}var o=f("cluster.maxzoom"),d=f("cluster.step"),M=f("cluster.color",l.marker&&l.marker.color||c),T=f("cluster.size"),C=f("cluster.opacity"),x=o!==!1||d!==!1||M!==!1||T!==!1||C!==!1;g("cluster.enabled",x),P.hasText(l)&&A(n,l,u,g,{noSelect:!0,font:{family:t.indexOf(u.font.family)!==-1?u.font.family:"Open Sans Regular",size:u.font.size,color:u.font.color}}),g("fill"),l.fill!=="none"&&v(n,l,c,g),m.coerceSelectionMarkerOpacity(l,g)};function r(s,n,l){var c=l("lon")||[],u=l("lat")||[],g=Math.min(c.length,u.length);return n._length=g,g}},53353:function(G){G.exports=function(e,m){return e.lon=m.lon,e.lat=m.lat,e}},15636:function(G,V,e){var m=e(89298);G.exports=function(i,L,A){var v={},p=A[L.subplot]._subplot,t=p.mockAxis,r=i.lonlat;return v.lonLabel=m.tickText(t,t.c2l(r[0]),!0).text,v.latLabel=m.tickText(t,t.c2l(r[1]),!0).text,v}},28178:function(G,V,e){var m=e(30211),P=e(71828),i=e(34603),L=P.fillText,A=e(50606).BADNUM,v=e(77734).traceLayerPrefix;function p(r,s,n){var l=r.cd,c=l[0].trace,u=r.xa,g=r.ya,f=r.subplot,w=[],h=v+c.uid+"-circle",o=c.cluster&&c.cluster.enabled;if(o){var d=f.map.queryRenderedFeatures(null,{layers:[h]});w=d.map(function(k){return k.id})}var M=s>=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("<br>")}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<c.length;u++)if(c[u].id===n){l=!0;break}l?(this.subplot.setOptions(n,"setLayoutProperty",s.layout),s.layout.visibility==="visible"&&this.subplot.setOptions(n,"setPaintProperty",s.paint)):this.subplot.addLayer(s,r)},v.update=function(t){var r=t[0].trace,s=this.subplot,n=s.map,l=P(s.gd,t),c=s.belowLookup["trace-"+this.uid],u=!!(r.cluster&&r.cluster.enabled),g=!!this.clusterEnabled,f=this;function w(b){b||f.addSource("circle",l.circle,r.cluster);for(var a=L.cluster,E=0;E<a.length;E++){var y=a[E],z=l[y];f.addLayer(y,z,c)}}function h(b){for(var a=L.cluster,E=a.length-1;E>=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<a.length;E++){var y=a[E],z=l[y];b||f.addSource(y,z),f.addLayer(y,z,c)}}function d(b){for(var a=L.nonCluster,E=a.length-1;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<b.length;a++){var E=b[a],y=l[E];y&&(s.setOptions(f.layerIds[E],"setLayoutProperty",y.layout),y.layout.visibility==="visible"&&(E!=="cluster"&&f.setSourceData(E,y),s.setOptions(f.layerIds[E],"setPaintProperty",y.paint)))}}var x=this.isHidden,S=r.visible!==!0;S?x||M():x?S||T():g!==u?(M(),T()):(this.below!==c&&(M(!0),T(!0)),C()),this.clusterEnabled=u,this.isHidden=S,this.below=c,t[0].trace._glTrace=this},v.dispose=function(){for(var t=this.subplot.map,r=this.clusterEnabled?L.cluster:L.nonCluster,s=r.length-1;s>=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<L.cluster.length;f++)w=L.cluster[f],h=u[w],c.addLayer(w,h,g);else for(f=0;f<L.nonCluster.length;f++)w=L.nonCluster[f],h=u[w],c.addSource(w,h,s.cluster),c.addLayer(w,h,g);return r[0].trace._glTrace=c,c}},86387:function(G,V,e){var m=e(71828),P=e(34098),i=e(50606).BADNUM;G.exports=function(A,v){var p=A.cd,t=A.xaxis,r=A.yaxis,s=[],n=p[0].trace,l;if(!P.hasMarkers(n))return[];if(v===!1)for(l=0;l<p.length;l++)p[l].selected=0;else for(l=0;l<p.length;l++){var c=p[l],u=c.lonlat;if(u[0]!==i){var g=[m.modHalf(u[0],360),u[1]],f=[t.c2p(g),r.c2p(g)];v.contains(f,null,l,A)?(s.push({pointNumber:l,lon:u[0],lat:u[1]}),c.selected=1):c.selected=0}}return s}},81245: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,r:{valType:"data_array",editType:"calc+clearAxisTypes"},theta:{valType:"data_array",editType:"calc+clearAxisTypes"},r0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dr:{valType:"number",dflt:1,editType:"calc"},theta0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dtheta:{valType:"number",editType:"calc"},thetaunit:{valType:"enumerated",values:["radians","degrees","gradians"],dflt:"degrees",editType:"calc+clearAxisTypes"},text:L.text,texttemplate:P({editType:"plot"},{keys:["r","theta","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:["r","theta","text","name"]}),hoveron:L.hoveron,hovertemplate:m(),selected:L.selected,unselected:L.unselected}},26442:function(G,V,e){var m=e(92770),P=e(50606).BADNUM,i=e(89298),L=e(36922),A=e(75225),v=e(66279),p=e(47761).calcMarkerSize;G.exports=function(r,s){for(var n=r._fullLayout,l=s.subplot,c=n[l].radialaxis,u=n[l].angularaxis,g=c.makeCalcdata(s,"r"),f=u.makeCalcdata(s,"theta"),w=s._length,h=new Array(w),o=0;o<w;o++){var d=g[o],M=f[o],T=h[o]={};m(d)&&m(M)?(T.r=d,T.theta=M):T.r=P}var C=p(s,w);return s._extremes.x=i.findExtremes(c,g,{ppad:C}),L(r,s),A(h,s),v(h,s),h}},22184:function(G,V,e){var m=e(71828),P=e(34098),i=e(49508),L=e(11058),A=e(94039),v=e(82410),p=e(28908),t=e(47581).PTS_LINESONLY,r=e(81245);function s(l,c,u,g){function f(o,d){return m.coerce(l,c,r,o,d)}var w=n(l,c,g,f);if(!w){c.visible=!1;return}f("thetaunit"),f("mode",w<t?"lines+markers":"lines"),f("text"),f("hovertext"),c.hoveron!=="fills"&&f("hovertemplate"),P.hasLines(c)&&(L(l,c,u,g,f,{backoff:!0}),A(l,c,f),f("connectgaps")),P.hasMarkers(c)&&i(l,c,u,g,f,{gradient:!0}),P.hasText(c)&&(f("texttemplate"),v(l,c,g,f));var h=[];(P.hasMarkers(c)||P.hasText(c))&&(f("cliponaxis"),f("marker.maxdisplayed"),h.push("points")),f("fill"),c.fill!=="none"&&(p(l,c,u,f),P.hasLines(c)||A(l,c,f)),(c.fill==="tonext"||c.fill==="toself")&&h.push("fills"),f("hoveron",h.join("+")||"points"),m.coerceSelectionMarkerOpacity(c,f)}function n(l,c,u,g){var f=g("r"),w=g("theta"),h;if(f)w?h=Math.min(f.length,w.length):(h=f.length,g("theta0"),g("dtheta"));else{if(!w)return 0;h=c.theta.length,g("r0"),g("dr")}return c._length=h,h}G.exports={handleRThetaDefaults:n,supplyDefaults:s}},98608:function(G,V,e){var m=e(71828),P=e(89298);G.exports=function(L,A,v){var p={},t=v[A.subplot]._subplot,r,s;t?(r=t.radialAxis,s=t.angularAxis):(t=v[A.subplot],r=t.radialaxis,s=t.angularaxis);var n=r.c2l(L.r);p.rLabel=P.tickText(r,n,!0).text;var l=s.thetaunit==="degrees"?m.rad2deg(L.theta):L.theta;return p.thetaLabel=P.tickText(s,l,!0).text,p}},59150:function(G,V,e){var m=e(33720);function P(L,A,v,p){var t=m(L,A,v,p);if(!(!t||t[0].index===!1)){var r=t[0];if(r.index===void 0)return t;var s=L.subplot,n=r.cd[r.index],l=r.trace;if(s.isPtInside(n))return r.xLabelVal=void 0,r.yLabelVal=void 0,i(n,l,s,r),r.hovertemplate=l.hovertemplate,t}}function i(L,A,v,p){var t=v.radialAxis,r=v.angularAxis;t._hovertitle="r",r._hovertitle="θ";var s={};s[A.subplot]={_subplot:v};var n=A._module.formatLabels(L,A,s);p.rLabel=n.rLabel,p.thetaLabel=n.thetaLabel;var l=L.hi||A.hoverinfo,c=[];function u(f,w){c.push(f._hovertitle+": "+w)}if(!A.hovertemplate){var g=l.split("+");g.indexOf("all")!==-1&&(g=["r","theta","text"]),g.indexOf("r")!==-1&&u(t,p.rLabel),g.indexOf("theta")!==-1&&u(r,p.thetaLabel),g.indexOf("text")!==-1&&p.text&&(c.push(p.text),delete p.text),p.extraText=c.join("<br>")}}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<v.length;c++)for(var u=v[c],g=0;g<u.length;g++){g===0&&(u[0].trace._xA=t,u[0].trace._yA=r);var f=u[g],w=f.r;if(w===P)f.x=f.y=P;else{var h=n.c2g(w),o=l.c2g(f.theta);f.x=h*Math.cos(o),f.y=h*Math.sin(o)}}m(L,s,v,p)}},53286:function(G,V,e){var m=e(81245),P=e(42341),i=e(5386).si;G.exports={mode:m.mode,r:m.r,theta:m.theta,r0:m.r0,dr:m.dr,theta0:m.theta0,dtheta:m.dtheta,thetaunit:m.thetaunit,text:m.text,texttemplate:i({editType:"plot"},{keys:["r","theta","text"]}),hovertext:m.hovertext,hovertemplate:m.hovertemplate,line:P.line,connectgaps:P.connectgaps,marker:P.marker,fill:P.fill,fillcolor:P.fillcolor,textposition:P.textposition,textfont:P.textfont,hoverinfo:m.hoverinfo,selected:m.selected,unselected:m.unselected}},65746:function(G,V,e){G.exports={moduleType:"trace",name:"scatterpolargl",basePlotModule:e(23580),categories:["gl","regl","polar","symbols","showLegend","scatter-like"],attributes:e(53286),supplyDefaults:e(75485),colorbar:e(4898),formatLabels:e(46255),calc:e(37499),hoverPoints:e(29347).hoverPoints,selectPoints:e(58147),meta:{}}},37499:function(G,V,e){var m=e(36922),P=e(47761).calcMarkerSize,i=e(19635),L=e(89298),A=e(78232).TOO_MANY_POINTS;G.exports=function(p,t){var r=p._fullLayout,s=t.subplot,n=r[s].radialaxis,l=r[s].angularaxis,c=t._r=n.makeCalcdata(t,"r"),u=t._theta=l.makeCalcdata(t,"theta"),g=t._length,f={};g<c.length&&(c=c.slice(0,g)),g<u.length&&(u=u.slice(0,g)),f.r=c,f.theta=u,m(p,t);var w=f.opts=i.style(p,t),h;return g<A?h=P(t,g):w.marker&&(h=2*(w.marker.sizeAvg||Math.max(w.marker.size,3))),t._extremes.x=L.findExtremes(n,c,{ppad:h}),[{x:!1,y:!1,t:f,trace:t}]}},75485:function(G,V,e){var m=e(71828),P=e(34098),i=e(22184).handleRThetaDefaults,L=e(49508),A=e(11058),v=e(82410),p=e(28908),t=e(47581).PTS_LINESONLY,r=e(53286);G.exports=function(n,l,c,u){function g(w,h){return m.coerce(n,l,r,w,h)}var f=i(n,l,u,g);if(!f){l.visible=!1;return}g("thetaunit"),g("mode",f<t?"lines+markers":"lines"),g("text"),g("hovertext"),l.hoveron!=="fills"&&g("hovertemplate"),P.hasLines(l)&&(A(n,l,c,u,g),g("connectgaps")),P.hasMarkers(l)&&L(n,l,c,u,g,{noAngleRef:!0,noStandOff:!0}),P.hasText(l)&&(g("texttemplate"),v(n,l,u,g)),g("fill"),l.fill!=="none"&&p(n,l,c,g),m.coerceSelectionMarkerOpacity(l,g)}},46255:function(G,V,e){var m=e(98608);G.exports=function(i,L,A){var v=i.i;return"r"in i||(i.r=L._r[v]),"theta"in i||(i.theta=L._theta[v]),m(i,L,A)}},29347:function(G,V,e){var m=e(20794),P=e(59150).makeHoverPointText;function i(L,A,v,p){var t=L.cd,r=t[0].t,s=r.r,n=r.theta,l=m.hoverPoints(L,A,v,p);if(!(!l||l[0].index===!1)){var c=l[0];if(c.index===void 0)return l;var u=L.subplot,g=c.cd[c.index],f=c.trace;if(g.r=s[c.index],g.theta=n[c.index],!!u.isPtInside(g))return c.xLabelVal=void 0,c.yLabelVal=void 0,P(g,f,u,c),l}}G.exports={hoverPoints:i}},21461:function(G,V,e){var m=e(65746);m.plot=e(49741),G.exports=m},49741:function(G,V,e){var m=e(88294),P=e(92770),i=e(26787),L=e(38967),A=e(19635),v=e(71828),p=e(78232).TOO_MANY_POINTS,t={};G.exports=function(s,n,l){if(l.length){var c=n.radialAxis,u=n.angularAxis,g=L(s,n);return l.forEach(function(f){if(!(!f||!f[0]||!f[0].trace)){var w=f[0],h=w.trace,o=w.t,d=h._length,M=o.r,T=o.theta,C=o.opts,x,S=M.slice(),b=T.slice();for(x=0;x<M.length;x++)n.isPtInside({r:M[x],theta:T[x]})||(S[x]=NaN,b[x]=NaN);var a=new Array(d*2),E=Array(d),y=Array(d);for(x=0;x<d;x++){var z=S[x],I,B;if(P(z)){var k=c.c2g(z),O=u.c2g(b[x],h.thetaunit);I=k*Math.cos(O),B=k*Math.sin(O)}else I=B=NaN;E[x]=a[x*2]=I,y[x]=a[x*2+1]=B}o.tree=m(a),C.marker&&d>=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<f;h++){var o=u[h],d=g[h],M=w[h]={};m(o)&&m(d)?(M.real=o,M.imag=d):M.real=P}return v(r,f),i(t,r),L(w,r),A(w,r),w}},65269:function(G,V,e){var m=e(71828),P=e(34098),i=e(49508),L=e(11058),A=e(94039),v=e(82410),p=e(28908),t=e(47581).PTS_LINESONLY,r=e(48300);G.exports=function(l,c,u,g){function f(o,d){return m.coerce(l,c,r,o,d)}var w=s(l,c,g,f);if(!w){c.visible=!1;return}f("mode",w<t?"lines+markers":"lines"),f("text"),f("hovertext"),c.hoveron!=="fills"&&f("hovertemplate"),P.hasLines(c)&&(L(l,c,u,g,f,{backoff:!0}),A(l,c,f),f("connectgaps")),P.hasMarkers(c)&&i(l,c,u,g,f,{gradient:!0}),P.hasText(c)&&(f("texttemplate"),v(l,c,g,f));var h=[];(P.hasMarkers(c)||P.hasText(c))&&(f("cliponaxis"),f("marker.maxdisplayed"),h.push("points")),f("fill"),c.fill!=="none"&&(p(l,c,u,f),P.hasLines(c)||A(l,c,f)),(c.fill==="tonext"||c.fill==="toself")&&h.push("fills"),f("hoveron",h.join("+")||"points"),m.coerceSelectionMarkerOpacity(c,f)};function s(n,l,c,u){var g=u("real"),f=u("imag"),w;return g&&f&&(w=Math.min(g.length,f.length)),l._length=w,w}},62047:function(G,V,e){var m=e(89298);G.exports=function(i,L,A){var v={},p=A[L.subplot]._subplot;return v.realLabel=m.tickText(p.radialAxis,i.real,!0).text,v.imagLabel=m.tickText(p.angularAxis,i.imag,!0).text,v}},11350:function(G,V,e){var m=e(33720);function P(L,A,v,p){var t=m(L,A,v,p);if(!(!t||t[0].index===!1)){var r=t[0];if(r.index===void 0)return t;var s=L.subplot,n=r.cd[r.index],l=r.trace;if(s.isPtInside(n))return r.xLabelVal=void 0,r.yLabelVal=void 0,i(n,l,s,r),r.hovertemplate=l.hovertemplate,t}}function i(L,A,v,p){var t=v.radialAxis,r=v.angularAxis;t._hovertitle="real",r._hovertitle="imag";var s={};s[A.subplot]={_subplot:v};var n=A._module.formatLabels(L,A,s);p.realLabel=n.realLabel,p.imagLabel=n.imagLabel;var l=L.hi||A.hoverinfo,c=[];function u(f,w){c.push(f._hovertitle+": "+w)}if(!A.hovertemplate){var g=l.split("+");g.indexOf("all")!==-1&&(g=["real","imag","text"]),g.indexOf("real")!==-1&&u(t,p.realLabel),g.indexOf("imag")!==-1&&u(r,p.imagLabel),g.indexOf("text")!==-1&&p.text&&(c.push(p.text),delete p.text),p.extraText=c.join("<br>")}}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.length;c++)for(var u=t[c],g=0;g<u.length;g++){g===0&&(u[0].trace._xA=s,u[0].trace._yA=n);var f=u[g],w=f.real;if(w===P)f.x=f.y=P;else{var h=L([w,f.imag]);f.x=h[0],f.y=h[1]}}m(v,l,t,r)}},50413:function(G,V,e){var m=e(5386).fF,P=e(5386).si,i=e(82196),L=e(9012),A=e(50693),v=e(79952).P,p=e(1426).extendFlat,t=i.marker,r=i.line,s=t.line;G.exports={a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},c:{valType:"data_array",editType:"calc"},sum:{valType:"number",dflt:0,min:0,editType:"calc"},mode:p({},i.mode,{dflt:"markers"}),text:p({},i.text,{}),texttemplate:P({editType:"plot"},{keys:["a","b","c","text"]}),hovertext:p({},i.hovertext,{}),line:{color:r.color,width:r.width,dash:v,backoff:r.backoff,shape:p({},r.shape,{values:["linear","spline"]}),smoothing:r.smoothing,editType:"calc"},connectgaps:i.connectgaps,cliponaxis:i.cliponaxis,fill:p({},i.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:i.fillcolor,marker:p({symbol:t.symbol,opacity:t.opacity,angle:t.angle,angleref:t.angleref,standoff:t.standoff,maxdisplayed:t.maxdisplayed,size:t.size,sizeref:t.sizeref,sizemin:t.sizemin,sizemode:t.sizemode,line:p({width:s.width,editType:"calc"},A("marker.line")),gradient:t.gradient,editType:"calc"},A("marker")),textfont:i.textfont,textposition:i.textposition,selected:i.selected,unselected:i.unselected,hoverinfo:p({},L.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:i.hoveron,hovertemplate:m()}},54337:function(G,V,e){var m=e(92770),P=e(36922),i=e(75225),L=e(66279),A=e(47761).calcMarkerSize,v=["a","b","c"],p={a:["b","c"],b:["a","c"],c:["a","b"]};G.exports=function(r,s){var n=r._fullLayout[s.subplot],l=n.sum,c=s.sum||l,u={a:s.a,b:s.b,c:s.c},g,f,w,h,o,d;for(g=0;g<v.length;g++)if(w=v[g],!u[w]){for(o=u[p[w][0]],d=u[p[w][1]],h=new Array(o.length),f=0;f<o.length;f++)h[f]=c-o[f]-d[f];u[w]=h}var M=s._length,T=new Array(M),C,x,S,b,a,E;for(g=0;g<M;g++)C=u.a[g],x=u.b[g],S=u.c[g],m(C)&&m(x)&&m(S)?(C=+C,x=+x,S=+S,b=l/(C+x+S),b!==1&&(C*=b,x*=b,S*=b),E=C,a=S-x,T[g]={x:a,y:E,a:C,b:x,c:S}):T[g]={x:!1,y:!1};return A(s,M),P(r,s),i(T,s),L(T,s),T}},46008:function(G,V,e){var m=e(71828),P=e(47581),i=e(34098),L=e(49508),A=e(11058),v=e(94039),p=e(82410),t=e(28908),r=e(50413);G.exports=function(n,l,c,u){function g(T,C){return m.coerce(n,l,r,T,C)}var f=g("a"),w=g("b"),h=g("c"),o;if(f?(o=f.length,w?(o=Math.min(o,w.length),h&&(o=Math.min(o,h.length))):h?o=Math.min(o,h.length):o=0):w&&h&&(o=Math.min(w.length,h.length)),!o){l.visible=!1;return}l._length=o,g("sum"),g("text"),g("hovertext"),l.hoveron!=="fills"&&g("hovertemplate");var d=o<P.PTS_LINESONLY?"lines+markers":"lines";g("mode",d),i.hasLines(l)&&(A(n,l,c,u,g,{backoff:!0}),v(n,l,g),g("connectgaps")),i.hasMarkers(l)&&L(n,l,c,u,g,{gradient:!0}),i.hasText(l)&&(g("texttemplate"),p(n,l,u,g));var M=[];(i.hasMarkers(l)||i.hasText(l))&&(g("cliponaxis"),g("marker.maxdisplayed"),M.push("points")),g("fill"),l.fill!=="none"&&(t(n,l,c,g),i.hasLines(l)||v(n,l,g)),(l.fill==="tonext"||l.fill==="toself")&&M.push("fills"),g("hoveron",M.join("+")||"points"),m.coerceSelectionMarkerOpacity(l,g)}},4524:function(G){G.exports=function(e,m,P,i,L){if(m.xa&&(e.xaxis=m.xa),m.ya&&(e.yaxis=m.ya),i[L]){var A=i[L];e.a=A.a,e.b=A.b,e.c=A.c}else e.a=m.a,e.b=m.b,e.c=m.c;return e}},93645:function(G,V,e){var m=e(89298);G.exports=function(i,L,A){var v={},p=A[L.subplot]._subplot;return v.aLabel=m.tickText(p.aaxis,i.a,!0).text,v.bLabel=m.tickText(p.baxis,i.b,!0).text,v.cLabel=m.tickText(p.caxis,i.c,!0).text,v}},47250:function(G,V,e){var m=e(33720);G.exports=function(i,L,A,v){var p=m(i,L,A,v);if(!p||p[0].index===!1)return;var t=p[0];if(t.index===void 0){var r=1-t.y0/i.ya._length,s=i.xa._length,n=s*r/2,l=s-n;return t.x0=Math.max(Math.min(t.x0,l),n),t.x1=Math.max(Math.min(t.x1,l),n),p}var c=t.cd[t.index],u=t.trace,g=t.subplot;t.a=c.a,t.b=c.b,t.c=c.c,t.xLabelVal=void 0,t.yLabelVal=void 0;var f={};f[u.subplot]={_subplot:g};var w=u._module.formatLabels(c,u,f);t.aLabel=w.aLabel,t.bLabel=w.bLabel,t.cLabel=w.cLabel;var h=c.hi||u.hoverinfo,o=[];function d(T,C){o.push(T._hovertitle+": "+C)}if(!u.hovertemplate){var M=h.split("+");M.indexOf("all")!==-1&&(M=["a","b","c"]),M.indexOf("a")!==-1&&d(g.aaxis,t.aLabel),M.indexOf("b")!==-1&&d(g.baxis,t.bLabel),M.indexOf("c")!==-1&&d(g.caxis,t.cLabel)}return t.extraText=o.join("<br>"),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;n<A.length;n++){var l=A[n];l.length&&(l[0].trace._xA=p,l[0].trace._yA=t)}m(i,r,A,s)}},46880:function(G,V,e){var m=e(82196),P=e(50693),i=e(12663).axisHoverFormat,L=e(5386).fF,A=e(42341),v=e(85555).idRegex,p=e(44467).templatedArray,t=e(1426).extendFlat,r=m.marker,s=r.line,n=t(P("marker.line",{editTypeOverride:"calc"}),{width:t({},s.width,{editType:"calc"}),editType:"calc"}),l=t(P("marker"),{symbol:r.symbol,angle:r.angle,size:t({},r.size,{editType:"markerSize"}),sizeref:r.sizeref,sizemin:r.sizemin,sizemode:r.sizemode,opacity:r.opacity,colorbar:r.colorbar,line:n,editType:"calc"});l.color.editType=l.cmin.editType=l.cmax.editType="style";function c(u){return{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"subplotid",regex:v[u],editType:"plot"}}}G.exports={dimensions:p("dimension",{visible:{valType:"boolean",dflt:!0,editType:"calc"},label:{valType:"string",editType:"calc"},values:{valType:"data_array",editType:"calc+clearAxisTypes"},axis:{type:{valType:"enumerated",values:["linear","log","date","category"],editType:"calc+clearAxisTypes"},matches:{valType:"boolean",dflt:!1,editType:"calc"},editType:"calc+clearAxisTypes"},editType:"calc+clearAxisTypes"}),text:t({},A.text,{}),hovertext:t({},A.hovertext,{}),hovertemplate:L(),xhoverformat:i("x"),yhoverformat:i("y"),marker:l,xaxes:c("x"),yaxes:c("y"),diagonal:{visible:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"},showupperhalf:{valType:"boolean",dflt:!0,editType:"calc"},showlowerhalf:{valType:"boolean",dflt:!0,editType:"calc"},selected:{marker:A.selected.marker,editType:"calc"},unselected:{marker:A.unselected.marker,editType:"calc"},opacity:A.opacity}},65017:function(G,V,e){var m=e(73972),P=e(83312);G.exports={moduleType:"trace",name:"splom",categories:["gl","regl","cartesian","symbols","showLegend","scatter-like"],attributes:e(46880),supplyDefaults:e(25784),colorbar:e(4898),calc:e(87625),plot:e(79410),hoverPoints:e(8567).hoverPoints,selectPoints:e(8689),editStyle:e(28801),meta:{}},m.register(P)},16947:function(G,V,e){var m=e(46075),P=e(73972),i=e(79749),L=e(27659).a0,A=e(93612),v=e(41675).getFromId,p=e(89298).shouldShowZeroLine,t="splom",r={};function s(f){var w=f._fullLayout,h=P.getModule(t),o=L(f.calcdata,h)[0],d=i(f,["ANGLE_instanced_arrays","OES_element_index_uint"],r);d&&(w._hasOnlyLargeSploms&&c(f),h.plot(f,{},o))}function n(f){var w=f.calcdata,h=f._fullLayout;h._hasOnlyLargeSploms&&c(f);for(var o=0;o<w.length;o++){var d=w[o][0],M=d.trace,T=h._splomScenes[M.uid];M.type==="splom"&&T&&T.matrix&&l(f,M,T)}}function l(f,w,h){for(var o=h.matrixOptions.data.length,d=w._visibleDims,M=h.viewOpts.ranges=new Array(o),T=0;T<d.length;T++){var C=d[T],x=M[T]=new Array(4),S=v(f,w._diag[C][0]);S&&(x[0]=S.r2l(S.range[0]),x[2]=S.r2l(S.range[1]));var b=v(f,w._diag[C][1]);b&&(x[1]=b.r2l(b.range[0]),x[3]=b.r2l(b.range[1]))}h.selectBatch.length||h.unselectBatch.length?h.matrix.update({ranges:M},{ranges:M}):h.matrix.update({ranges:M})}function c(f){var w=f._fullLayout,h=w._glcanvas.data()[0].regl,o=w._splomGrid;o||(o=w._splomGrid=m(h)),o.update(u(f))}function u(f){var w=f._context.plotGlPixelRatio,h=f._fullLayout,o=h._size,d=[0,0,h.width*w,h.height*w],M={},T;function C(Y,J,te,ae,ce,Q){te*=w,ae*=w,ce*=w,Q*=w;var Z=J[Y+"color"],j=J[Y+"width"],K=String(Z+j);K in M?M[K].data.push(NaN,NaN,te,ae,ce,Q):M[K]={data:[te,ae,ce,Q],join:"rect",thickness:j*w,color:Z,viewport:d,range:d,overlay:!1}}for(T in h._splomSubplots){var x=h._plots[T],S=x.xaxis,b=x.yaxis,a=S._gridVals,E=b._gridVals,y=S._offset,z=S._length,I=b._length,B=o.b+b.domain[0]*o.h,k=-b._m,O=-k*b.r2l(b.range[0],b.calendar),N,_;if(S.showgrid)for(T=0;T<a.length;T++)N=y+S.l2p(a[T].x),C("grid",S,N,B,N,B+I);if(b.showgrid)for(T=0;T<E.length;T++)_=B+O+k*E[T].x,C("grid",b,y,_,y+z,_);p(f,S,b)&&(N=y+S.l2p(0),C("zeroline",S,N,B,N,B+I)),p(f,b,S)&&(_=B+O+0,C("zeroline",b,y,_,y+z,_))}var U=[];for(T in M)U.push(M[T]);return U}function g(f,w,h,o){var d={},M;if(o._splomScenes){for(M=0;M<f.length;M++){var T=f[M];T.type==="splom"&&(d[T.uid]=1)}for(M=0;M<h.length;M++){var C=h[M];if(!d[C.uid]){var x=o._splomScenes[C.uid];x&&x.destroy&&x.destroy(),o._splomScenes[C.uid]=null,delete o._splomScenes[C.uid]}}}Object.keys(o._splomScenes||{}).length===0&&delete o._splomScenes,o._splomGrid&&!w._hasOnlyLargeSploms&&o._hasOnlyLargeSploms&&(o._splomGrid.destroy(),o._splomGrid=null,delete o._splomGrid),A.clean(f,w,h,o)}G.exports={name:t,attr:A.attr,attrRegex:A.attrRegex,layoutAttributes:A.layoutAttributes,supplyLayoutDefaults:A.supplyLayoutDefaults,drawFramework:A.drawFramework,plot:s,drag:n,updateGrid:c,clean:g,updateFx:A.updateFx,toSVG:A.toSVG,reglPrecompiled:r}},87625:function(G,V,e){var m=e(71828),P=e(41675),i=e(47761).calcMarkerSize,L=e(47761).calcAxisExpansion,A=e(36922),v=e(19635).markerSelection,p=e(19635).markerStyle,t=e(10164),r=e(50606).BADNUM,s=e(78232).TOO_MANY_POINTS;G.exports=function(l,c){var u=c.dimensions,g=c._length,f={},w=f.cdata=[],h=f.data=[],o=c._visibleDims=[],d,M,T,C,x;function S(z,I){for(var B=z.makeCalcdata({v:I.values,vcalendar:c.calendar},"v"),k=0;k<B.length;k++)B[k]=B[k]===r?NaN:B[k];w.push(B),h.push(z.type==="log"?m.simpleMap(B,z.c2l):B)}for(d=0;d<u.length;d++)if(T=u[d],T.visible){if(C=P.getFromId(l,c._diag[d][0]),x=P.getFromId(l,c._diag[d][1]),C&&x&&C.type!==x.type){m.log("Skipping splom dimension "+d+" with conflicting axis types");continue}C?(S(C,T),x&&x.type==="category"&&(x._categories=C._categories.slice())):S(x,T),o.push(d)}A(l,c),m.extendFlat(f,p(l,c));var b=w.length,a=b*g>s,E;for(a?E=f.sizeAvg||Math.max(f.size,3):E=i(c,g),M=0;M<o.length;M++)d=o[M],T=u[d],C=P.getFromId(l,c._diag[d][0])||{},x=P.getFromId(l,c._diag[d][1])||{},L(l,c,C,x,w[M],w[M],E);var y=t(l,c);return y.matrix||(y.matrix=!0),y.matrixOptions=f,y.selectedOptions=v(l,c,c.selected),y.unselectedOptions=v(l,c,c.unselected),[{x:!1,y:!1,t:{},trace:c}]}},25784:function(G,V,e){var m=e(71828),P=e(85501),i=e(46880),L=e(34098),A=e(49508),v=e(94397),p=e(68645).isOpenSymbol;G.exports=function(n,l,c,u){function g(C,x){return m.coerce(n,l,i,C,x)}var f=P(n,l,{name:"dimensions",handleItemDefaults:t}),w=g("diagonal.visible"),h=g("showupperhalf"),o=g("showlowerhalf"),d=v(l,f,"values");if(!d||!w&&!h&&!o){l.visible=!1;return}g("text"),g("hovertext"),g("hovertemplate"),g("xhoverformat"),g("yhoverformat"),A(n,l,c,u,g,{noAngleRef:!0,noStandOff:!0});var M=p(l.marker.symbol),T=L.isBubble(l);g("marker.line.width",M||T?1:0),r(n,l,u,g),m.coerceSelectionMarkerOpacity(l,g)};function t(s,n){function l(u,g){return m.coerce(s,n,i.dimensions,u,g)}l("label");var c=l("values");c&&c.length?l("visible"):n.visible=!1,l("axis.type"),l("axis.matches")}function r(s,n,l,c){var u=n.dimensions,g=u.length,f=n.showupperhalf,w=n.showlowerhalf,h=n.diagonal.visible,o,d,M=new Array(g),T=new Array(g);for(o=0;o<g;o++){var C=o?o+1:"";M[o]="x"+C,T[o]="y"+C}var x=c("xaxes",M),S=c("yaxes",T),b=n._diag=new Array(g);n._xaxes={},n._yaxes={};var a=[],E=[];function y(Y,J,te,ae){if(Y){var ce=Y.charAt(0),Q=l._splomAxes[ce];if(n["_"+ce+"axes"][Y]=1,ae.push(Y),!(Y in Q)){var Z=Q[Y]={};te&&(Z.label=te.label||"",te.visible&&te.axis&&(te.axis.type&&(Z.type=te.axis.type),te.axis.matches&&(Z.matches=J)))}}}var z=!h&&!w,I=!h&&!f;for(n._axesDim={},o=0;o<g;o++){var B=u[o],k=o===0,O=o===g-1,N=k&&z||O&&I?void 0:x[o],_=k&&I||O&&z?void 0:S[o];y(N,_,B,a),y(_,N,B,E),b[o]=[N,_],n._axesDim[N]=o,n._axesDim[_]=o}for(o=0;o<a.length;o++)for(d=0;d<E.length;d++){var U=a[o]+E[d];(o>d&&f||o<d&&w||o===d&&(h||!w||!f))&&(l._splomSubplots[U]=1)}(!w||!h&&f&&w)&&(l._splomGridDflt.xside="bottom",l._splomGridDflt.yside="left")}},28801:function(G,V,e){var m=e(71828),P=e(36922),i=e(19635).markerStyle;G.exports=function(A,v){var p=v.trace,t=A._fullLayout._splomScenes[p.uid];if(t){P(A,p),m.extendFlat(t.matrixOptions,i(A,p));var r=m.extendFlat({},t.matrixOptions,t.viewOpts);t.matrix.update(r,null)}}},35948:function(G,V){V.getDimIndex=function(m,P){for(var i=P._id,L=i.charAt(0),A={x:0,y:1}[L],v=m._visibleDims,p=0;p<v.length;p++){var t=v[p];if(m._diag[t][A]===i)return p}return!1}},8567:function(G,V,e){var m=e(35948),P=e(20794).calcHover;function i(L,A,v){var p=L.cd,t=p[0].trace,r=L.scene,s=r.matrixOptions.cdata,n=L.xa,l=L.ya,c=n.c2p(A),u=l.c2p(v),g=L.distance,f=m.getDimIndex(t,n),w=m.getDimIndex(t,l);if(f===!1||w===!1)return[L];for(var h=s[f],o=s[w],d,M,T=g,C=0;C<h.length;C++){var x=h[C],S=o[C],b=n.c2p(x)-c,a=l.c2p(S)-u,E=Math.sqrt(b*b+a*a);E<T&&(T=M=E,d=C)}return L.index=d,L.distance=T,L.dxy=M,d===void 0?[L]:[P(L,h,o,t)]}G.exports={hoverPoints:i}},6419:function(G,V,e){var m=e(65017);m.basePlotModule=e(16947),G.exports=m},79410:function(G,V,e){var m=e(60487),P=e(71828),i=e(41675),L=e(64505).selectMode;G.exports=function(p,t,r){if(r.length)for(var s=0;s<r.length;s++)A(p,r[s][0])};function A(v,p){var t=v._fullLayout,r=t._size,s=p.trace,n=p.t,l=t._splomScenes[s.uid],c=l.matrixOptions,u=c.cdata,g=t._glcanvas.data()[0].regl,f=t.dragmode,w,h,o,d,M;if(u.length!==0){c.lower=s.showupperhalf,c.upper=s.showlowerhalf,c.diagonal=s.diagonal.visible;var T=s._visibleDims,C=u.length,x=l.viewOpts={};for(x.ranges=new Array(C),x.domains=new Array(C),M=0;M<T.length;M++){o=T[M];var S=x.ranges[M]=new Array(4),b=x.domains[M]=new Array(4);w=i.getFromId(v,s._diag[o][0]),w&&(S[0]=w._rl[0],S[2]=w._rl[1],b[0]=w.domain[0],b[2]=w.domain[1]),h=i.getFromId(v,s._diag[o][1]),h&&(S[1]=h._rl[0],S[3]=h._rl[1],b[1]=h.domain[0],b[3]=h.domain[1])}var a=v._context.plotGlPixelRatio,E=r.l*a,y=r.b*a,z=r.w*a,I=r.h*a;x.viewport=[E,y,z+E,I+y],l.matrix===!0&&(l.matrix=m(g));var B=t.clickmode.indexOf("select")>-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;o<N;o++)U[o]||Y.push(o);l.unselectBatch=Y}var J=n.xpx=new Array(C),te=n.ypx=new Array(C);for(M=0;M<T.length;M++){if(o=T[M],w=i.getFromId(v,s._diag[o][0]),w)for(J[M]=new Array(N),d=0;d<N;d++)J[M][d]=w.c2p(u[M][d]);if(h=i.getFromId(v,s._diag[o][1]),h)for(te[M]=new Array(N),d=0;d<N;d++)te[M][d]=h.c2p(u[M][d])}if(l.selectBatch.length||l.unselectBatch.length){var ae=P.extendFlat({},c,l.unselectedOptions,x),ce=P.extendFlat({},c,l.selectedOptions,x);l.matrix.update(ae,ce),O=!1}}else n.xpx=n.ypx=null;if(O){var Q=P.extendFlat({},c,x);l.matrix.update(Q,null)}}}},10164:function(G,V,e){var m=e(71828);G.exports=function(i,L){var A=i._fullLayout,v=L.uid,p=A._splomScenes;p||(p=A._splomScenes={});var t={dirty:!0,selectBatch:[],unselectBatch:[]},r={matrix:!1,selectBatch:[],unselectBatch:[]},s=p[L.uid];return s||(s=p[v]=m.extendFlat({},t,r),s.draw=function(){s.matrix&&s.matrix.draw&&(s.selectBatch.length||s.unselectBatch.length?s.matrix.draw(s.unselectBatch,s.selectBatch):s.matrix.draw()),s.dirty=!1},s.destroy=function(){s.matrix&&s.matrix.destroy&&s.matrix.destroy(),s.matrixOptions=null,s.selectBatch=null,s.unselectBatch=null,s=null}),s.dirty||m.extendFlat(s,t),s}},8689:function(G,V,e){var m=e(71828),P=m.pushUnique,i=e(34098),L=e(35948);G.exports=function(v,p){var t=v.cd,r=t[0].trace,s=t[0].t,n=v.scene,l=n.matrixOptions.cdata,c=v.xaxis,u=v.yaxis,g=[];if(!n)return g;var f=!i.hasMarkers(r)&&!i.hasText(r);if(r.visible!==!0||f)return g;var w=L.getDimIndex(r,c),h=L.getDimIndex(r,u);if(w===!1||h===!1)return g;var o=s.xpx[w],d=s.ypx[h],M=l[w],T=l[h],C=(v.scene.selectBatch||[]).slice(),x=[];if(p!==!1&&!p.degenerate)for(var S=0;S<M.length;S++)p.contains([o[S],d[S]],null,S,v)?(g.push({pointNumber:S,x:M[S],y:T[S]}),P(C,S)):C.indexOf(S)!==-1?P(C,S):x.push(S);var b=n.matrixOptions;return!C.length&&!x.length?n.matrix.update(b,null):!n.selectBatch.length&&!n.unselectBatch.length&&n.matrix.update(n.unselectedOptions,m.extendFlat({},b,n.selectedOptions,n.viewOpts)),n.selectBatch=C,n.unselectBatch=x,g}},21850: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"},starts:{x:{valType:"data_array",editType:"calc"},y:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},editType:"calc"},maxdisplayed:{valType:"integer",min:0,dflt:1e3,editType:"calc"},sizeref:{valType:"number",editType:"calc",min:0,dflt:1},text:{valType:"string",dflt:"",editType:"calc"},hovertext:{valType:"string",dflt:"",editType:"calc"},hovertemplate:i({editType:"calc"},{keys:["tubex","tubey","tubez","tubeu","tubev","tubew","norm","divergence"]}),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","divergence","text","name"],dflt:"x+y+z+norm+text+name"}),p.transforms=void 0,G.exports=p},88489:function(G,V,e){var m=e(71828),P=e(78803);function i(p,t){t._len=Math.min(t.u.length,t.v.length,t.w.length,t.x.length,t.y.length,t.z.length),t._u=v(t.u,t._len),t._v=v(t.v,t._len),t._w=v(t.w,t._len),t._x=v(t.x,t._len),t._y=v(t.y,t._len),t._z=v(t.z,t._len);var r=L(t);t._gridFill=r.fill,t._Xs=r.Xs,t._Ys=r.Ys,t._Zs=r.Zs,t._len=r.len;var s=0,n,l,c;t.starts&&(n=v(t.starts.x||[]),l=v(t.starts.y||[]),c=v(t.starts.z||[]),s=Math.min(n.length,l.length,c.length)),t._startsX=n||[],t._startsY=l||[],t._startsZ=c||[];var u=0,g=1/0,f;for(f=0;f<t._len;f++){var w=t._u[f],h=t._v[f],o=t._w[f],d=Math.sqrt(w*w+h*h+o*o);u=Math.max(u,d),g=Math.min(g,d)}for(P(p,t,{vals:[g,u],containerStr:"",cLetter:"c"}),f=0;f<s;f++){var M=n[f];r.xMax=Math.max(r.xMax,M),r.xMin=Math.min(r.xMin,M);var T=l[f];r.yMax=Math.max(r.yMax,T),r.yMin=Math.min(r.yMin,T);var C=c[f];r.zMax=Math.max(r.zMax,C),r.zMin=Math.min(r.zMin,C)}t._slen=s,t._normMax=u,t._xbnds=[r.xMin,r.xMax],t._ybnds=[r.yMin,r.yMax],t._zbnds=[r.zMin,r.zMax]}function L(p){var t=p._x,r=p._y,s=p._z,n=p._len,l,c,u,g=-1/0,f=1/0,w=-1/0,h=1/0,o=-1/0,d=1/0,M="",T,C,x,S,b,a,E,y,z;for(n&&(S=t[0],a=r[0],y=s[0]),n>1&&(b=t[n-1],E=r[n-1],z=s[n-1]),l=0;l<n;l++)g=Math.max(g,t[l]),f=Math.min(f,t[l]),w=Math.max(w,r[l]),h=Math.min(h,r[l]),o=Math.max(o,s[l]),d=Math.min(d,s[l]),!T&&t[l]!==S&&(T=!0,M+="x"),!C&&r[l]!==a&&(C=!0,M+="y"),!x&&s[l]!==y&&(x=!0,M+="z");T||(M+="x"),C||(M+="y"),x||(M+="z");var I=A(p._x),B=A(p._y),k=A(p._z);M=M.replace("x",(S>b?"-":"+")+"x"),M=M.replace("y",(a>E?"-":"+")+"y"),M=M.replace("z",(y>z?"-":"+")+"z");var O=function(){n=0,I=[],B=[],k=[]};(!n||n<I.length*B.length*k.length)&&O();var N=function(he){return he==="x"?t:he==="y"?r:s},_=function(he){return he==="x"?I:he==="y"?B:k},U=function(he){return he[n-1]<he[0]?-1:1},Y=N(M[1]),J=N(M[3]),te=N(M[5]),ae=_(M[1]).length,ce=_(M[3]).length,Q=_(M[5]).length,Z=!1,j=function(he,me,Me){return ae*(ce*he+me)+Me},K=U(N(M[1])),ee=U(N(M[3])),oe=U(N(M[5]));for(l=0;l<Q-1;l++){for(c=0;c<ce-1;c++){for(u=0;u<ae-1;u++){var q=j(l,c,u),$=j(l,c,u+1),le=j(l,c+1,u),ie=j(l+1,c,u);if((!(Y[q]*K<Y[$]*K)||!(J[q]*ee<J[le]*ee)||!(te[q]*oe<te[ie]*oe))&&(Z=!0),Z)break}if(Z)break}if(Z)break}return Z&&(m.warn("Encountered arbitrary coordinates! Unable to input data grid."),O()),{xMin:f,yMin:h,zMin:d,xMax:g,yMax:w,zMax:o,Xs:I,Ys:B,Zs:k,len:n,fill:M}}function A(p){return m.distinctVals(p).vals}function v(p,t){if(t===void 0&&(t=p.length),m.isTypedArray(p))return p.subarray(0,t);for(var r=[],s=0;s<t;s++)r[s]=+p[s];return r}G.exports={calc:i,filter:v,processGrid:L}},90154:function(G,V,e){var m=e(9330).gl_streamtube3d,P=m.createTubeMesh,i=e(71828),L=e(81697).parseColorScale,A=e(21081).extractOpts,v=e(90060),p={xaxis:0,yaxis:1,zaxis:2};function t(u,g){this.scene=u,this.uid=g,this.mesh=null,this.data=null}var r=t.prototype;r.handlePick=function(u){var g=this.scene.fullSceneLayout,f=this.scene.dataScale;function w(d,M){var T=g[M],C=f[p[M]];return T.l2c(d)/C}if(u.object===this.mesh){var h=u.data.position,o=u.data.velocity;return u.traceCoordinate=[w(h[0],"xaxis"),w(h[1],"yaxis"),w(h[2],"zaxis"),w(o[0],"xaxis"),w(o[1],"yaxis"),w(o[2],"zaxis"),u.data.intensity*this.data._normMax,u.data.divergence],u.textLabel=this.data.hovertext||this.data.text,!0}};function s(u){var g=u.length,f;return g>2?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<b.length;z++)for(var I=0;I<a.length;I++)E[y++]=[b[z],S,a[I]];o.startingPositions=E}o.colormap=L(g),o.tubeSize=g.sizeref,o.maxLength=g.maxdisplayed;var B=d(g._xbnds,"xaxis"),k=d(g._ybnds,"yaxis"),O=d(g._zbnds,"zaxis"),N=n(M),_=n(T),U=n(C),Y=[[B[0]-N[0],k[0]-_[0],O[0]-U[0]],[B[1]+N[1],k[1]+_[1],O[1]+U[1]]],J=m(o,Y),te=A(g);J.vertexIntensityBounds=[te.min/g._normMax,te.max/g._normMax];var ae=g.lightposition;return J.lightPosition=[ae.x,ae.y,ae.z],J.ambient=g.lighting.ambient,J.diffuse=g.lighting.diffuse,J.specular=g.lighting.specular,J.roughness=g.lighting.roughness,J.fresnel=g.lighting.fresnel,J.opacity=g.opacity,g._pad=J.tubeScale*g.sizeref*2,J}r.update=function(u){this.data=u;var g=l(this.scene,u);this.mesh.update(g)},r.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function c(u,g){var f=u.glplot.gl,w=l(u,g),h=P(f,w),o=new t(u,g.uid);return o.mesh=h,o.data=g,h._trace=o,u.glplot.add(h),o}G.exports=c},22459:function(G,V,e){var m=e(71828),P=e(1586),i=e(21850);G.exports=function(A,v,p,t){function r(f,w){return m.coerce(A,v,i,f,w)}var s=r("u"),n=r("v"),l=r("w"),c=r("x"),u=r("y"),g=r("z");if(!s||!s.length||!n||!n.length||!l||!l.length||!c||!c.length||!u||!u.length||!g||!g.length){v.visible=!1;return}r("starts.x"),r("starts.y"),r("starts.z"),r("maxdisplayed"),r("sizeref"),r("lighting.ambient"),r("lighting.diffuse"),r("lighting.specular"),r("lighting.roughness"),r("lighting.fresnel"),r("lightposition.x"),r("lightposition.y"),r("lightposition.z"),P(A,v,t,r,{prefix:"",cLetter:"c"}),r("text"),r("hovertext"),r("hovertemplate"),r("uhoverformat"),r("vhoverformat"),r("whoverformat"),r("xhoverformat"),r("yhoverformat"),r("zhoverformat"),v._length=null}},61510:function(G,V,e){G.exports={moduleType:"trace",name:"streamtube",basePlotModule:e(58547),categories:["gl3d","showLegend"],attributes:e(21850),supplyDefaults:e(22459),colorbar:{min:"cmin",max:"cmax"},calc:e(88489).calc,plot:e(90154),eventData:function(m,P){return m.tubex=m.x,m.tubey=m.y,m.tubez=m.z,m.tubeu=P.traceCoordinate[3],m.tubev=P.traceCoordinate[4],m.tubew=P.traceCoordinate[5],m.norm=P.traceCoordinate[6],m.divergence=P.traceCoordinate[7],delete m.x,delete m.y,delete m.z,m},meta:{}}},57564:function(G,V,e){var m=e(9012),P=e(5386).fF,i=e(5386).si,L=e(50693),A=e(27670).Y,v=e(34e3),p=e(7055),t=e(1426).extendFlat,r=e(79952).u;G.exports={labels:{valType:"data_array",editType:"calc"},parents:{valType:"data_array",editType:"calc"},values:{valType:"data_array",editType:"calc"},branchvalues:{valType:"enumerated",values:["remainder","total"],dflt:"remainder",editType:"calc"},count:{valType:"flaglist",flags:["branches","leaves"],dflt:"leaves",editType:"calc"},level:{valType:"any",editType:"plot",anim:!0},maxdepth:{valType:"integer",editType:"plot",dflt:-1},marker:t({colors:{valType:"data_array",editType:"calc"},line:{color:t({},v.marker.line.color,{dflt:null}),width:t({},v.marker.line.width,{dflt:1}),editType:"calc"},pattern:r,editType:"calc"},L("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1},editType:"plot"},text:v.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot"},texttemplate:i({editType:"plot"},{keys:p.eventDataKeys.concat(["label","value"])}),hovertext:v.hovertext,hoverinfo:t({},m.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:P({},{keys:p.eventDataKeys}),textfont:v.textfont,insidetextorientation:v.insidetextorientation,insidetextfont:v.insidetextfont,outsidetextfont:t({},v.outsidetextfont,{}),rotation:{valType:"angle",dflt:0,editType:"plot"},sort:v.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)"},editType:"calc"},domain:A({name:"sunburst",trace:!0,editType:"calc"})}},66888:function(G,V,e){var m=e(74875);V.name="sunburst",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)}},52147:function(G,V,e){var m=e(674),P=e(92770),i=e(71828),L=e(21081).makeColorScaleFuncFromTrace,A=e(32354).makePullColorFn,v=e(32354).generateExtendedColors,p=e(21081).calc,t=e(50606).ALMOST_EQUAL,r={},s={},n={};V.calc=function(c,u){var g=c._fullLayout,f=u.ids,w=i.isArrayOrTypedArray(f),h=u.labels,o=u.parents,d=u.values,M=i.isArrayOrTypedArray(d),T=[],C={},x={},S=function(K,ee){C[K]?C[K].push(ee):C[K]=[ee],x[ee]=1},b=function(K){return K||typeof K=="number"},a=function(K){return!M||P(d[K])&&d[K]>=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;I<E;I++)if(y(I)){var B=z(I),k=b(o[I])?String(o[I]):"",O={i:I,id:B,pid:k,label:b(h[I])?String(h[I]):""};M&&(O.v=+d[I]),T.push(O),S(k,B)}if(C[""]){if(C[""].length>1){for(var U=i.randstr(),Y=0;Y<T.length;Y++)T[Y].pid===""&&(T[Y].pid=U);T.unshift({hasMultipleRoots:!0,id:U,pid:"",label:""})}}else{var N=[],_;for(_ in C)x[_]||N.push(_);if(N.length===1)_=N[0],T.unshift({hasImpliedRoot:!0,id:_,pid:"",label:_});else return i.warn(["Multiple implied roots, cannot build",u.type,"hierarchy of",u.name+".","These roots include:",N.join(", ")].join(" "))}var J;try{J=m.stratify().id(function(K){return K.id}).parentId(function(K){return K.pid})(T)}catch(K){return i.warn(["Failed to build",u.type,"hierarchy of",u.name+".","Error:",K.message].join(" "))}var te=m.hierarchy(J),ae=!1;if(M)switch(u.branchvalues){case"remainder":te.sum(function(K){return K.data.v});break;case"total":te.each(function(K){var ee=K.data.data,oe=ee.v;if(K.children){var q=K.children.reduce(function($,le){return $+le.data.data.v},0);if((ee.hasImpliedRoot||ee.hasMultipleRoots)&&(oe=q),oe<q*t)return ae=!0,i.warn(["Total value for node",K.data.data.id,"of",u.name,"is smaller than the sum of its children.",`
parent value =`,oe,`
children sum =`,q].join(" "))}K.value=oe});break}else l(te,u,{branches:u.count.indexOf("branches")!==-1,leaves:u.count.indexOf("leaves")!==-1});if(!ae){u.sort&&te.sort(function(K,ee){return ee.value-K.value});var ce,Q,Z=u.marker.colors||[],j=!!Z.length;return u._hasColorscale?(j||(Z=M?u.values:u._values),p(c,u,{vals:Z,containerStr:"marker",cLetter:"c"}),Q=L(u.marker)):ce=A(g["_"+u.type+"colormap"]),te.each(function(K){var ee=K.data.data;ee.color=u._hasColorscale?Q(Z[ee.i]):ce(Z[ee.i],ee.id)}),T[0].hierarchy=te,T}},V._runCrossTraceCalc=function(c,u){var g=u._fullLayout,f=u.calcdata,w=g[c+"colorway"],h=g["_"+c+"colormap"];g["extend"+c+"colors"]&&(w=v(w,c==="icicle"?n:c==="treemap"?s:r));var o=0,d;function M(S){var b=S.data.data,a=b.id;b.color===!1&&(h[a]?b.color=h[a]:S.parent?S.parent.parent?b.color=S.parent.data.data.color:(h[a]=b.color=w[o%w.length],o++):b.color=d)}for(var T=0;T<f.length;T++){var C=f[T],x=C[0];x.trace.type===c&&x.hierarchy&&(d=x.trace.root.color,x.hierarchy.each(M))}},V.crossTraceCalc=function(c){return V._runCrossTraceCalc("sunburst",c)};function l(c,u,g){var f=0,w=c.children;if(w){for(var h=w.length,o=0;o<h;o++)f+=l(w[o],u,g);g.branches&&f++}else g.leaves&&f++;return c.value=c.data.data.value=f,u._values||(u._values=[]),u._values[c.data.data.i]=f,f}},7055:function(G){G.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]}},17094:function(G,V,e){var m=e(71828),P=e(57564),i=e(27670).c,L=e(90769).handleText,A=e(37434).handleMarkerDefaults,v=e(21081),p=v.hasColorscale,t=v.handleDefaults;G.exports=function(s,n,l,c){function u(M,T){return m.coerce(s,n,P,M,T)}var g=u("labels"),f=u("parents");if(!g||!g.length||!f||!f.length){n.visible=!1;return}var w=u("values");w&&w.length?u("branchvalues"):u("count"),u("level"),u("maxdepth"),A(s,n,c,u);var h=n._hasColorscale=p(s,"marker","colors")||(s.marker||{}).coloraxis;h&&t(s,n,c,u,{prefix:"marker.",cLetter:"c"}),u("leaf.opacity",h?1:.7);var o=u("text");u("texttemplate"),n.texttemplate||u("textinfo",Array.isArray(o)?"text+label":"label"),u("hovertext"),u("hovertemplate");var d="auto";L(s,n,c,u,d,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),u("insidetextorientation"),u("sort"),u("rotation"),u("root.color"),i(n,c,u),n._length=null}},43467:function(G,V,e){var m=e(91424),P=e(7901);G.exports=function(L,A,v,p,t){var r=A.data.data,s=r.i,n=t||r.color;if(s>=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("<br>"),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;f<c.length;f++){var w=c[f];w in n&&(g[w]=n[w])}return"parentString"in n&&!p.isHierarchyRoot(n)&&(g.parent=n.parentString),i(g,l,u.i),g}},2791:function(G,V,e){var m=e(71828),P=e(7901),i=e(6964),L=e(53581);V.findEntryWithLevel=function(t,r){var s;return r&&t.eachAfter(function(n){if(V.getPtId(n)===r)return s=n.copy()}),s||t},V.findEntryWithChild=function(t,r){var s;return t.eachAfter(function(n){for(var l=n.children||[],c=0;c<l.length;c++){var u=l[c];if(V.getPtId(u)===r)return s=n.copy()}}),s||t},V.isEntry=function(t){return!t.parent},V.isLeaf=function(t){return!t.children},V.getPtId=function(t){return t.data.data.id},V.getPtLabel=function(t){return t.data.data.label},V.getValue=function(t){return t.value},V.isHierarchyRoot=function(t){return p(t)===""},V.setSliceCursor=function(t,r,s){var n=s.isTransitioning;if(!n){var l=t.datum();n=s.hideOnRoot&&V.isHierarchyRoot(l)||s.hideOnLeaves&&V.isLeaf(l)}i(t,n?null:"pointer")};function A(t,r,s){return{color:V.getOutsideTextFontKey("color",t,r,s),family:V.getOutsideTextFontKey("family",t,r,s),size:V.getOutsideTextFontKey("size",t,r,s)}}function v(t,r,s,n){var l=(n||{}).onPathbar,c=r.data.data,u=c.i,g=m.castOption(t,u,(l?"pathbar.textfont":"insidetextfont")+".color");return!g&&t._input.textfont&&(g=m.castOption(t._input,u,"textfont.color")),{color:g||P.contrast(c.color),family:V.getInsideTextFontKey("family",t,r,s,n),size:V.getInsideTextFontKey("size",t,r,s,n)}}V.getInsideTextFontKey=function(t,r,s,n,l){var c=(l||{}).onPathbar,u=c?"pathbar.textfont":"insidetextfont",g=s.data.data.i;return m.castOption(r,g,u+"."+t)||m.castOption(r,g,"textfont."+t)||n.size},V.getOutsideTextFontKey=function(t,r,s,n){var l=s.data.data.i;return m.castOption(r,l,"outsidetextfont."+t)||m.castOption(r,l,"textfont."+t)||n.size},V.isOutsideText=function(t,r){return!t._hasColorscale&&V.isHierarchyRoot(r)},V.determineTextFont=function(t,r,s,n){return V.isOutsideText(t,r)?A(t,r,s):v(t,r,s,n)},V.hasTransition=function(t){return!!(t&&t.duration>0)},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("<br>")}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(a<E)return 0;for(var y=0;Math.floor(a%E)===0;)a/=E,y++;return y}function g(a){for(var E=[],y=0;y<c.length;y++){var z=c[y];E.push(u(a,z))}return E}function f(a){for(var E=g(a),y=a,z=0;z<c.length;z++)if(E[z]>0){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;B<c.length;B++)I*=Math.pow(c[B],Math.max(y[B],z[B]));return I}}function h(a){if(a.length!==0){for(var E=1,y=0;y<a.length;y++)E=w(E,a[y]);return E}}n.calcXnums=function(a){var E,y=[];for(E=1;E<a;E++){var z=this.getXat(E-1,0),I=this.getXat(E,0);I!==z&&z!==void 0&&z!==null&&I!==void 0&&I!==null?y[E-1]=Math.abs(I-z):y[E-1]=0}var B=0;for(E=1;E<a;E++)B+=y[E-1];for(E=1;E<a;E++)y[E-1]===0?y[E-1]=1:y[E-1]=Math.round(B/y[E-1]);return y},n.calcYnums=function(a){var E,y=[];for(E=1;E<a;E++){var z=this.getYat(0,E-1),I=this.getYat(0,E);I!==z&&z!==void 0&&z!==null&&I!==void 0&&I!==null?y[E-1]=Math.abs(I-z):y[E-1]=0}var B=0;for(E=1;E<a;E++)B+=y[E-1];for(E=1;E<a;E++)y[E-1]===0?y[E-1]=1:y[E-1]=Math.round(B/y[E-1]);return y};var o=[1,2,4,6,12,24,36,48,60,120,180,240,360,720,840,1260],d=o[9],M=o[13];n.estimateScale=function(a,E){for(var y=E===0?this.calcXnums(a):this.calcYnums(a),z=1+h(y);z<d;)z*=2;for(;z>M;)z--,z/=f(z),z++,z<d&&(z=M);var I=Math.round(z/a);return I>1?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;O<B;O++)for(var N=0;N<k;N++)y(I,[O,N],z),a.set(O,N,i(E,I[0],I[1]));return a}n.refineCoords=function(a){for(var E=this.dataScaleX,y=this.dataScaleY,z=a[0].shape[0],I=a[0].shape[1],B=Math.floor(a[0].shape[0]*E+1)|0,k=Math.floor(a[0].shape[1]*y+1)|0,O=1+z+1,N=1+I+1,_=P(new Float32Array(O*N),[O,N]),U=[1/E,0,0,0,1/y,0,0,0,1],Y=0;Y<a.length;++Y){this.surface.padField(_,a[Y]);var J=P(new Float32Array(B*k),[B,k]);C(J,_,U),a[Y]=J}};function S(a,E){for(var y=!1,z=0;z<a.length;z++)if(E===a[z]){y=!0;break}y===!1&&a.push(E)}n.setContourLevels=function(){var a=[[],[],[]],E=[!1,!1,!1],y=!1,z,I,B;for(z=0;z<3;++z)if(this.showContour[z]&&(y=!0,this.contourSize[z]>0&&this.contourStart[z]!==null&&this.contourEnd[z]!==null&&this.contourEnd[z]>this.contourStart[z]))for(E[z]=!0,I=this.contourStart[z];I<this.contourEnd[z];I+=this.contourSize[z])B=I*this.scene.dataScale[z],S(a[z],B);if(y){var k=[[],[],[]];for(z=0;z<3;++z)this.showContour[z]&&(k[z]=E[z]?a[z]:this.scene.contourLevels[z]);this.surface.update({levels:k})}},n.update=function(a){var E=this.scene,y=E.fullSceneLayout,z=this.surface,I=p(a),B=E.dataScale,k=a.z[0].length,O=a._ylength,N=E.contourLevels;this.data=a;var _,U,Y,J,te=[];for(_=0;_<3;_++)for(te[_]=[],U=0;U<k;U++)te[_][U]=[];for(U=0;U<k;U++)for(Y=0;Y<O;Y++)te[0][U][Y]=this.getXat(U,Y,a.xcalendar,y.xaxis),te[1][U][Y]=this.getYat(U,Y,a.ycalendar,y.yaxis),te[2][U][Y]=this.getZat(U,Y,a.zcalendar,y.zaxis);if(a.connectgaps)for(a._emptypoints=A(te[2]),L(te[2],a._emptypoints),a._interpolatedZ=[],U=0;U<k;U++)for(a._interpolatedZ[U]=[],Y=0;Y<O;Y++)a._interpolatedZ[U][Y]=te[2][U][Y];for(_=0;_<3;_++)for(U=0;U<k;U++)for(Y=0;Y<O;Y++)J=te[_][U][Y],J==null?te[_][U][Y]=NaN:J=te[_][U][Y]*=B[_];for(_=0;_<3;_++)for(U=0;U<k;U++)for(Y=0;Y<O;Y++)J=te[_][U][Y],J!=null&&(this.minValues[_]>J&&(this.minValues[_]=J),this.maxValues[_]<J&&(this.maxValues[_]=J));for(_=0;_<3;_++)this.objectOffset[_]=.5*(this.minValues[_]+this.maxValues[_]);for(_=0;_<3;_++)for(U=0;U<k;U++)for(Y=0;Y<O;Y++)J=te[_][U][Y],J!=null&&(te[_][U][Y]-=this.objectOffset[_]);var ae=[P(new Float32Array(k*O),[k,O]),P(new Float32Array(k*O),[k,O]),P(new Float32Array(k*O),[k,O])];for(_=0;_<3;_++)for(U=0;U<k;U++)for(Y=0;Y<O;Y++)ae[_].set(U,Y,te[_][U][Y]);te=[];var ce={colormap:I,levels:[[],[],[]],showContour:[!0,!0,!0],showSurface:!a.hidesurface,contourProject:[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],contourWidth:[1,1,1],contourColor:[[1,1,1,1],[1,1,1,1],[1,1,1,1]],contourTint:[1,1,1],dynamicColor:[[1,1,1,1],[1,1,1,1],[1,1,1,1]],dynamicWidth:[1,1,1],dynamicTint:[1,1,1],opacityscale:a.opacityscale,opacity:a.opacity},Q=r(a);if(ce.intensityBounds=[Q.min,Q.max],a.surfacecolor){var Z=P(new Float32Array(k*O),[k,O]);for(U=0;U<k;U++)for(Y=0;Y<O;Y++)Z.set(U,Y,a.surfacecolor[Y][U]);ae.push(Z)}else ce.intensityBounds[0]*=B[2],ce.intensityBounds[1]*=B[2];(M<ae[0].shape[0]||M<ae[0].shape[1])&&(this.refineData=!1),this.refineData===!0&&(this.dataScaleX=this.estimateScale(ae[0].shape[0],0),this.dataScaleY=this.estimateScale(ae[0].shape[1],1),(this.dataScaleX!==1||this.dataScaleY!==1)&&this.refineCoords(ae)),a.surfacecolor&&(ce.intensity=ae.pop());var j=[!0,!0,!0],K=["x","y","z"];for(_=0;_<3;++_){var ee=a.contours[K[_]];j[_]=ee.highlight,ce.showContour[_]=ee.show||ee.highlight,ce.showContour[_]&&(ce.contourProject[_]=[ee.project.x,ee.project.y,ee.project.z],ee.show?(this.showContour[_]=!0,ce.levels[_]=N[_],z.highlightColor[_]=ce.contourColor[_]=t(ee.color),ee.usecolormap?z.highlightTint[_]=ce.contourTint[_]=0:z.highlightTint[_]=ce.contourTint[_]=1,ce.contourWidth[_]=ee.width,this.contourStart[_]=ee.start,this.contourEnd[_]=ee.end,this.contourSize[_]=ee.size):(this.showContour[_]=!1,this.contourStart[_]=null,this.contourEnd[_]=null,this.contourSize[_]=0),ee.highlight&&(ce.dynamicColor[_]=t(ee.highlightcolor),ce.dynamicWidth[_]=ee.highlightwidth))}l(I)&&(ce.vertexColor=!0),ce.objectOffset=this.objectOffset,ce.coords=ae,z.update(ce),z.visible=a.visible,z.enableDynamic=j,z.enableHighlight=j,z.snapToData=!0,"lighting"in a&&(z.ambientLight=a.lighting.ambient,z.diffuseLight=a.lighting.diffuse,z.specularLight=a.lighting.specular,z.roughness=a.lighting.roughness,z.fresnel=a.lighting.fresnel),"lightposition"in a&&(z.lightPosition=[a.lightposition.x,a.lightposition.y,a.lightposition.z])},n.dispose=function(){this.scene.glplot.remove(this.surface),this.surface.dispose()};function b(a,E){var y=a.glplot.gl,z=m({gl:y}),I=new s(a,z,E.uid);return z._trace=I,I.update(E),a.glplot.add(z),I}G.exports=b},91831:function(G,V,e){var m=e(73972),P=e(71828),i=e(1586),L=e(54532),A=.1;function v(n,l){for(var c=[],u=32,g=0;g<u;g++){var f=g/(u-1),w=l+(1-l)*(1-Math.pow(Math.sin(n*f*Math.PI),2));c.push([f,Math.max(0,Math.min(1,w))])}return c}function p(n){var l=0;if(!Array.isArray(n)||n.length<2||!n[0]||!n[n.length-1]||+n[0][0]!=0||+n[n.length-1][0]!=1)return!1;for(var c=0;c<n.length;c++){var u=n[c];if(u.length!==2||+u[0]<l)return!1;l=+u[0]}return!0}function t(n,l,c,u){var g,f;function w(a,E){return P.coerce(n,l,L,a,E)}var h=w("x"),o=w("y"),d=w("z");if(!d||!d.length||h&&h.length<1||o&&o.length<1){l.visible=!1;return}l._xlength=Array.isArray(h)&&P.isArrayOrTypedArray(h[0])?d.length:d[0].length,l._ylength=d.length;var M=m.getComponentMethod("calendars","handleTraceDefaults");M(n,l,["x","y","z"],u),w("text"),w("hovertext"),w("hovertemplate"),w("xhoverformat"),w("yhoverformat"),w("zhoverformat"),["lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lightposition.x","lightposition.y","lightposition.z","hidesurface","connectgaps","opacity"].forEach(function(a){w(a)});var T=w("surfacecolor"),C=["x","y","z"];for(g=0;g<3;++g){var x="contours."+C[g],S=w(x+".show"),b=w(x+".highlight");if(S||b)for(f=0;f<3;++f)w(x+".project."+C[f]);S&&(w(x+".color"),w(x+".width"),w(x+".usecolormap")),b&&(w(x+".highlightcolor"),w(x+".highlightwidth")),w(x+".start"),w(x+".end"),w(x+".size")}T||(s(n,"zmin","cmin"),s(n,"zmax","cmax"),s(n,"zauto","cauto")),i(n,l,u,w,{prefix:"",cLetter:"c"}),r(n,l,u,w),l._length=null}function r(n,l,c,u){var g=u("opacityscale");g==="max"?l.opacityscale=[[0,A],[1,1]]:g==="min"?l.opacityscale=[[0,1],[1,A]]:g==="extremes"?l.opacityscale=v(1,A):p(g)||(l.opacityscale=void 0)}function s(n,l,c){l in n&&!(c in n)&&(n[c]=n[l])}G.exports={supplyDefaults:t,opacityscaleDefaults:r}},93601:function(G,V,e){G.exports={attributes:e(54532),supplyDefaults:e(91831).supplyDefaults,colorbar:{min:"cmin",max:"cmax"},calc:e(18396),plot:e(43768),moduleType:"trace",name:"surface",basePlotModule:e(58547),categories:["gl3d","2dMap","showLegend"],meta:{}}},44464:function(G,V,e){var m=e(50215),P=e(1426).extendFlat,i=e(30962).overrideAll,L=e(41940),A=e(27670).Y,v=e(12663).descriptionOnlyNumbers,p=G.exports=i({domain:A({name:"table",trace:!0}),columnwidth:{valType:"number",arrayOk:!0,dflt:null},columnorder:{valType:"data_array"},header:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:v("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:28},align:P({},m.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:P({},L({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:v("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:20},align:P({},m.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:P({},L({arrayOk:!0}))}},"calc","from-root");p.transforms=void 0},99469:function(G,V,e){var m=e(27659).a0,P=e(36736),i="table";V.name=i,V.plot=function(L){var A=m(L.calcdata,i)[0];A.length&&P(L,A)},V.clean=function(L,A,v,p){var t=p._has&&p._has(i),r=A._has&&A._has(i);t&&!r&&p._paperdiv.selectAll(".table").remove()}},76333:function(G,V,e){var m=e(28984).wrap;G.exports=function(){return m({})}},49850:function(G){G.exports={cellPad:8,columnExtentOffset:10,columnTitleOffset:28,emptyHeaderHeight:16,latexCheck:/^\$.*\$$/,goldenRatio:1.618,lineBreaker:"<br>",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<l.length;u++)c=Math.max(c,L(l[u]));return c}return l}function A(l,c){return l+c}function v(l){var c=l.slice(),u=1/0,g=0,f;for(f=0;f<c.length;f++)Array.isArray(c[f])||(c[f]=[c[f]]),u=Math.min(u,c[f].length),g=Math.max(g,c[f].length);if(u!==g)for(f=0;f<c.length;f++){var w=g-c[f].length;w&&(c[f]=c[f].concat(p(w)))}return c}function p(l){for(var c=new Array(l),u=0;u<l;u++)c[u]="";return c}function t(l){return l.calcdata.columns.reduce(function(c,u){return u.xIndex<l.xIndex?c+u.columnWidth:c},0)}function r(l,c){var u=Object.keys(l);return u.map(function(g){return P({},l[g],{auxiliaryBlocks:c})})}function s(l,c){for(var u={},g,f=0,w=0,h=n(),o=0,d=0,M=0;M<l.length;M++)g=l[M],h.rows.push({rowIndex:M,rowHeight:g}),w+=g,(w>=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<t;l++)n.push(l);v("columnorder",n)}G.exports=function(v,p,t,r){function s(n,l){return m.coerce(v,p,P,n,l)}i(p,r,s),s("columnwidth"),s("header.values"),s("header.format"),s("header.align"),s("header.prefix"),s("header.suffix"),s("header.height"),s("header.line.width"),s("header.line.color"),s("header.fill.color"),m.coerceFont(s,"header.font",m.extendFlat({},r.font)),L(p,s),s("cells.values"),s("cells.format"),s("cells.align"),s("cells.prefix"),s("cells.suffix"),s("cells.height"),s("cells.line.width"),s("cells.line.color"),s("cells.fill.color"),m.coerceFont(s,"cells.font",m.extendFlat({},r.font)),p._length=null}},96595:function(G,V,e){G.exports={attributes:e(44464),supplyDefaults:e(39754),calc:e(76333),plot:e(36736),moduleType:"trace",name:"table",basePlotModule:e(99469),categories:["noOpacity"],meta:{}}},36736:function(G,V,e){var m=e(49850),P=e(39898),i=e(71828),L=i.numberFormat,A=e(28984),v=e(91424),p=e(63893),t=e(71828).raiseToTop,r=e(71828).strTranslate,s=e(71828).cancelTransition,n=e(51018),l=e(56269),c=e(7901);G.exports=function(le,ie){var he=!le._context.staticPlot,me=le._fullLayout._paper.selectAll("."+m.cn.table).data(ie.map(function($e){var et=A.unwrap($e),ct=et.trace;return n(le,ct)}),A.keyFun);me.exit().remove(),me.enter().append("g").classed(m.cn.table,!0).attr("overflow","visible").style("box-sizing","content-box").style("position","absolute").style("left",0).style("overflow","visible").style("shape-rendering","crispEdges").style("pointer-events","all"),me.attr("width",function($e){return $e.width+$e.size.l+$e.size.r}).attr("height",function($e){return $e.height+$e.size.t+$e.size.b}).attr("transform",function($e){return r($e.translateX,$e.translateY)});var Me=me.selectAll("."+m.cn.tableControlView).data(A.repeat,A.keyFun),Te=Me.enter().append("g").classed(m.cn.tableControlView,!0).style("box-sizing","content-box");if(he){var Oe="onwheel"in document?"wheel":"mousewheel";Te.on("mousemove",function($e){Me.filter(function(et){return $e===et}).call(h,le)}).on(Oe,function($e){if(!$e.scrollbarState.wheeling){$e.scrollbarState.wheeling=!0;var et=$e.scrollY+P.event.deltaY,ct=J(le,Me,null,et)($e);ct||(P.event.stopPropagation(),P.event.preventDefault()),$e.scrollbarState.wheeling=!1}}).call(h,le,!0)}Me.attr("transform",function($e){return r($e.size.l,$e.size.t)});var Ne=Me.selectAll("."+m.cn.scrollBackground).data(A.repeat,A.keyFun);Ne.enter().append("rect").classed(m.cn.scrollBackground,!0).attr("fill","none"),Ne.attr("width",function($e){return $e.width}).attr("height",function($e){return $e.height}),Me.each(function($e){v.setClipUrl(P.select(this),g(le,$e),le)});var Ee=Me.selectAll("."+m.cn.yColumn).data(function($e){return $e.columns},A.keyFun);Ee.enter().append("g").classed(m.cn.yColumn,!0),Ee.exit().remove(),Ee.attr("transform",function($e){return r($e.x,0)}),he&&Ee.call(P.behavior.drag().origin(function($e){var et=P.select(this);return k(et,$e,-m.uplift),t(this),$e.calcdata.columnDragInProgress=!0,h(Me.filter(function(ct){return $e.calcdata.key===ct.key}),le),$e}).on("drag",function($e){var et=P.select(this),ct=function(At){return($e===At?P.event.x:At.x)+At.columnWidth/2};$e.x=Math.max(-m.overdrag,Math.min($e.calcdata.width+m.overdrag-$e.columnWidth,P.event.x));var dt=w(Ee).filter(function(At){return At.calcdata.key===$e.calcdata.key}),pt=dt.sort(function(At,Mt){return ct(At)-ct(Mt)});pt.forEach(function(At,Mt){At.xIndex=Mt,At.x=$e===At?At.x:At.xScale(At)}),Ee.filter(function(At){return $e!==At}).transition().ease(m.transitionEase).duration(m.transitionDuration).attr("transform",function(At){return r(At.x,0)}),et.call(s).attr("transform",r($e.x,-m.uplift))}).on("dragend",function($e){var et=P.select(this),ct=$e.calcdata;$e.x=$e.xScale($e),$e.calcdata.columnDragInProgress=!1,k(et,$e,0),I(le,ct,ct.columns.map(function(dt){return dt.xIndex}))})),Ee.each(function($e){v.setClipUrl(P.select(this),f(le,$e),le)});var xe=Ee.selectAll("."+m.cn.columnBlock).data(l.splitToPanels,A.keyFun);xe.enter().append("g").classed(m.cn.columnBlock,!0).attr("id",function($e){return $e.key}),xe.style("cursor",function($e){return $e.dragHandle?"ew-resize":$e.calcdata.scrollbarState.barWiggleRoom?"ns-resize":"default"});var Se=xe.filter(N),Ue=xe.filter(O);he&&Ue.call(P.behavior.drag().origin(function($e){return P.event.stopPropagation(),$e}).on("drag",J(le,Me,-1)).on("dragend",function(){})),o(le,Me,Se,xe),o(le,Me,Ue,xe);var He=Me.selectAll("."+m.cn.scrollAreaClip).data(A.repeat,A.keyFun);He.enter().append("clipPath").classed(m.cn.scrollAreaClip,!0).attr("id",function($e){return g(le,$e)});var Fe=He.selectAll("."+m.cn.scrollAreaClipRect).data(A.repeat,A.keyFun);Fe.enter().append("rect").classed(m.cn.scrollAreaClipRect,!0).attr("x",-m.overdrag).attr("y",-m.uplift).attr("fill","none"),Fe.attr("width",function($e){return $e.width+2*m.overdrag}).attr("height",function($e){return $e.height+m.uplift});var Ge=Ee.selectAll("."+m.cn.columnBoundary).data(A.repeat,A.keyFun);Ge.enter().append("g").classed(m.cn.columnBoundary,!0);var nt=Ee.selectAll("."+m.cn.columnBoundaryClippath).data(A.repeat,A.keyFun);nt.enter().append("clipPath").classed(m.cn.columnBoundaryClippath,!0),nt.attr("id",function($e){return f(le,$e)});var qe=nt.selectAll("."+m.cn.columnBoundaryRect).data(A.repeat,A.keyFun);qe.enter().append("rect").classed(m.cn.columnBoundaryRect,!0).attr("fill","none"),qe.attr("width",function($e){return $e.columnWidth+2*u($e)}).attr("height",function($e){return $e.calcdata.height+2*u($e)+m.uplift}).attr("x",function($e){return-u($e)}).attr("y",function($e){return-u($e)}),Y(null,Ue,Me)};function u($){return Math.ceil($.calcdata.maxLineWidth/2)}function g($,le){return"clip"+$._fullLayout._uid+"_scrollAreaBottomClip_"+le.key}function f($,le){return"clip"+$._fullLayout._uid+"_columnBoundaryClippath_"+le.calcdata.key+"_"+le.specIndex}function w($){return[].concat.apply([],$.map(function(le){return le})).map(function(le){return le.__data__})}function h($,le,ie){function he(Ee){var xe=Ee.rowBlocks;return j(xe,xe.length-1)+(xe.length?K(xe[xe.length-1],1/0):1)}var me=$.selectAll("."+m.cn.scrollbarKit).data(A.repeat,A.keyFun);me.enter().append("g").classed(m.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),me.each(function(Ee){var xe=Ee.scrollbarState;xe.totalHeight=he(Ee),xe.scrollableAreaHeight=Ee.groupHeight-_(Ee),xe.currentlyVisibleHeight=Math.min(xe.totalHeight,xe.scrollableAreaHeight),xe.ratio=xe.currentlyVisibleHeight/xe.totalHeight,xe.barLength=Math.max(xe.ratio*xe.currentlyVisibleHeight,m.goldenRatio*m.scrollbarWidth),xe.barWiggleRoom=xe.currentlyVisibleHeight-xe.barLength,xe.wiggleRoom=Math.max(0,xe.totalHeight-xe.scrollableAreaHeight),xe.topY=xe.barWiggleRoom===0?0:Ee.scrollY/xe.wiggleRoom*xe.barWiggleRoom,xe.bottomY=xe.topY+xe.barLength,xe.dragMultiplier=xe.wiggleRoom/xe.barWiggleRoom}).attr("transform",function(Ee){var xe=Ee.width+m.scrollbarWidth/2+m.scrollbarOffset;return r(xe,_(Ee))});var Me=me.selectAll("."+m.cn.scrollbar).data(A.repeat,A.keyFun);Me.enter().append("g").classed(m.cn.scrollbar,!0);var Te=Me.selectAll("."+m.cn.scrollbarSlider).data(A.repeat,A.keyFun);Te.enter().append("g").classed(m.cn.scrollbarSlider,!0),Te.attr("transform",function(Ee){return r(0,Ee.scrollbarState.topY||0)});var Oe=Te.selectAll("."+m.cn.scrollbarGlyph).data(A.repeat,A.keyFun);Oe.enter().append("line").classed(m.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",m.scrollbarWidth).attr("stroke-linecap","round").attr("y1",m.scrollbarWidth/2),Oe.attr("y2",function(Ee){return Ee.scrollbarState.barLength-m.scrollbarWidth/2}).attr("stroke-opacity",function(Ee){return Ee.columnDragInProgress||!Ee.scrollbarState.barWiggleRoom||ie?0:.4}),Oe.transition().delay(0).duration(0),Oe.transition().delay(m.scrollbarHideDelay).duration(m.scrollbarHideDuration).attr("stroke-opacity",0);var Ne=Me.selectAll("."+m.cn.scrollbarCaptureZone).data(A.repeat,A.keyFun);Ne.enter().append("line").classed(m.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",m.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(Ee){var xe=P.event.y,Se=this.getBoundingClientRect(),Ue=Ee.scrollbarState,He=xe-Se.top,Fe=P.scale.linear().domain([0,Ue.scrollableAreaHeight]).range([0,Ue.totalHeight]).clamp(!0);Ue.topY<=He&&He<=Ue.bottomY||J(le,$,null,Fe(He-Ue.barLength/2))(Ee)}).call(P.behavior.drag().origin(function(Ee){return P.event.stopPropagation(),Ee.scrollbarState.scrollbarScrollInProgress=!0,Ee}).on("drag",J(le,$)).on("dragend",function(){})),Ne.attr("y2",function(Ee){return Ee.scrollbarState.scrollableAreaHeight}),le._context.staticPlot&&(Oe.remove(),Ne.remove())}function o($,le,ie,he){var me=d(ie),Me=M(me);S(Me);var Te=T(Me);a(Te);var Oe=x(Me),Ne=C(Oe);b(Ne),E(Ne,le,he,$),Z(Me)}function d($){var le=$.selectAll("."+m.cn.columnCells).data(A.repeat,A.keyFun);return le.enter().append("g").classed(m.cn.columnCells,!0),le.exit().remove(),le}function M($){var le=$.selectAll("."+m.cn.columnCell).data(l.splitToCells,function(ie){return ie.keyWithinBlock});return le.enter().append("g").classed(m.cn.columnCell,!0),le.exit().remove(),le}function T($){var le=$.selectAll("."+m.cn.cellRect).data(A.repeat,function(ie){return ie.keyWithinBlock});return le.enter().append("rect").classed(m.cn.cellRect,!0),le}function C($){var le=$.selectAll("."+m.cn.cellText).data(A.repeat,function(ie){return ie.keyWithinBlock});return le.enter().append("text").classed(m.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){P.event.stopPropagation()}),le}function x($){var le=$.selectAll("."+m.cn.cellTextHolder).data(A.repeat,function(ie){return ie.keyWithinBlock});return le.enter().append("g").classed(m.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),le}function S($){$.each(function(le,ie){var he=le.calcdata.cells.font,me=le.column.specIndex,Me={size:B(he.size,me,ie),color:B(he.color,me,ie),family:B(he.family,me,ie)};le.rowNumber=le.key,le.align=B(le.calcdata.cells.align,me,ie),le.cellBorderWidth=B(le.calcdata.cells.line.width,me,ie),le.font=Me})}function b($){$.each(function(le){v.font(P.select(this),le.font)})}function a($){$.attr("width",function(le){return le.column.columnWidth}).attr("stroke-width",function(le){return le.cellBorderWidth}).each(function(le){var ie=P.select(this);c.stroke(ie,B(le.calcdata.cells.line.color,le.column.specIndex,le.rowNumber)),c.fill(ie,B(le.calcdata.cells.fill.color,le.column.specIndex,le.rowNumber))})}function E($,le,ie,he){$.text(function(me){var Me=me.column.specIndex,Te=me.rowNumber,Oe=me.value,Ne=typeof Oe=="string",Ee=Ne&&Oe.match(/<br>/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(/<a href=/ig,"<a_href="):Ge,et=$e.split(m.wrapSplitCharacter),ct=m.wrapSplitCharacter===" "?et.map(function(dt){return dt.replace(/<a_href=/ig,"<a href=")}):et;me.fragments=ct.map(function(dt){return{text:dt,width:null}}),me.fragments.push({fragment:m.wrapSpacer,width:null}),qe=ct.join(m.lineBreaker)+m.lineBreaker+m.wrapSpacer}else delete me.fragments,qe=Ge;return qe}).attr("dy",function(me){return me.needsConvertToTspans?0:"0.75em"}).each(function(me){var Me=this,Te=P.select(Me),Oe=me.wrappingNeeded?ae:ce;me.needsConvertToTspans?p.convertToTspans(Te,he,Oe(ie,Me,le,he,me)):P.select(Me.parentNode).attr("transform",function(Ne){return r(Q(Ne),m.cellPad)}).attr("text-anchor",function(Ne){return{left:"start",center:"middle",right:"end"}[Ne.align]})})}function y($){return typeof $=="string"&&$.match(m.latexCheck)}function z($){return $.indexOf(m.wrapSplitCharacter)!==-1}function I($,le,ie){var he=le.gdColumnsOriginalOrder;le.gdColumns.sort(function(me,Me){return ie[he.indexOf(me)]-ie[he.indexOf(Me)]}),le.columnorder=ie,$.emit("plotly_restyle")}function B($,le,ie){if(Array.isArray($)){var he=$[Math.min(le,$.length-1)];return Array.isArray(he)?he[Math.min(ie,he.length-1)]:he}else return $}function k($,le,ie){$.transition().ease(m.releaseTransitionEase).duration(m.releaseTransitionDuration).attr("transform",r(le.x,ie))}function O($){return $.type==="cells"}function N($){return $.type==="header"}function _($){var le=$.rowBlocks.length?$.rowBlocks[0].auxiliaryBlocks:[];return le.reduce(function(ie,he){return ie+K(he,1/0)},0)}function U($,le,ie){for(var he=[],me=0,Me=0;Me<$.length;Me++){for(var Te=$[Me],Oe=Te.rows,Ne=0,Ee=0;Ee<Oe.length;Ee++)Ne+=Oe[Ee].rowHeight;Te.allRowsHeight=Ne;var xe=me+Ne,Se=le,Ue=Se+ie;Se<xe&&Ue>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<le;he++)ie+=$.rows[he].rowHeight;return ie}function ee($){var le=$.allRowsHeight;if(le!==void 0)return le;for(var ie=0,he=0;he<$.rows.length;he++)ie+=$.rows[he].rowHeight;return $.allRowsHeight=ie,ie}function oe($){return $.rowBlocks[$.page]}function q($,le){return $.rows[le-$.firstRowIndex]}},45802:function(G,V,e){var m=e(5386).fF,P=e(5386).si,i=e(50693),L=e(27670).Y,A=e(34e3),v=e(57564),p=e(43473),t=e(1426).extendFlat,r=e(79952).u;G.exports={labels:v.labels,parents:v.parents,values:v.values,branchvalues:v.branchvalues,count:v.count,level:v.level,maxdepth:v.maxdepth,tiling:{packing:{valType:"enumerated",values:["squarify","binary","dice","slice","slice-dice","dice-slice"],dflt:"squarify",editType:"plot"},squarifyratio:{valType:"number",min:1,dflt:1,editType:"plot"},flip:{valType:"flaglist",flags:["x","y"],dflt:"",editType:"plot"},pad:{valType:"number",min:0,dflt:3,editType:"plot"},editType:"calc"},marker:t({pad:{t:{valType:"number",min:0,editType:"plot"},l:{valType:"number",min:0,editType:"plot"},r:{valType:"number",min:0,editType:"plot"},b:{valType:"number",min:0,editType:"plot"},editType:"calc"},colors:v.marker.colors,pattern:r,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style"},line:v.marker.line,cornerradius:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},i("marker",{colorAttr:"colors",anim:!1})),pathbar:{visible:{valType:"boolean",dflt:!0,editType:"plot"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},edgeshape:{valType:"enumerated",values:[">","<","|","/","\\"],dflt:">",editType:"plot"},thickness:{valType:"number",min:12,editType:"plot"},textfont: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("<br>").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<L.length;A++)V(L[A],m,P)}},70954:function(G,V,e){G.exports={moduleType:"trace",name:"treemap",basePlotModule:e(78018),categories:[],animatable:!0,attributes:e(45802),layoutAttributes:e(55479),supplyDefaults:e(91174),supplyLayoutDefaults:e(77182),calc:e(65039).y,crossTraceCalc:e(65039).T,plot:e(5893),style:e(96362).style,colorbar:e(4898),meta:{}}},55479:function(G){G.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}},77182:function(G,V,e){var m=e(71828),P=e(55479);G.exports=function(L,A){function v(p,t){return m.coerce(L,A,P,p,t)}v("treemapcolorway",A.colorway),v("extendtreemapcolors")}},37210:function(G,V,e){var m=e(674),P=e(14102);G.exports=function(A,v,p){var t=p.flipX,r=p.flipY,s=p.packing==="dice-slice",n=p.pad[r?"bottom":"top"],l=p.pad[t?"right":"left"],c=p.pad[t?"left":"right"],u=p.pad[r?"top":"bottom"],g;s&&(g=l,l=n,n=g,g=c,c=u,u=g);var f=m.treemap().tile(i(p.packing,p.squarifyratio)).paddingInner(p.pad.inner).paddingLeft(l).paddingRight(c).paddingTop(n).paddingBottom(u).size(s?[v[1],v[0]]:v)(A);return(s||t||r)&&P(f,v,{swapXY:s,flipX:t,flipY:r}),f};function i(L,A){switch(L){case"squarify":return m.treemapSquarify.ratio(A);case"binary":return m.treemapBinary;case"dice":return m.treemapDice;case"slice":return m.treemapSlice;default:return m.treemapSliceDice}}},5893:function(G,V,e){var m=e(80694),P=e(52583);G.exports=function(L,A,v,p){return m(L,A,v,p,{type:"treemap",drawDescendants:P})}},46650:function(G,V,e){var m=e(39898),P=e(81684).sX,i=e(2791),L=e(71828),A=e(97313).TEXTPAD,v=e(17295),p=v.toMoveInsideBar,t=e(72597),r=t.recordMinTextSize,s=e(43473),n=e(66209);function l(c){return i.isHierarchyRoot(c)?"":i.getPtId(c)}G.exports=function(u,g,f,w,h){var o=u._fullLayout,d=g[0],M=d.trace,T=M.type,C=T==="icicle",x=d.hierarchy,S=i.findEntryWithLevel(x,M.level),b=m.select(f),a=b.selectAll("g.pathbar"),E=b.selectAll("g.slice");if(!S){a.remove(),E.remove();return}var y=i.isHierarchyRoot(S),z=!o.uniformtext.mode&&i.hasTransition(w),I=i.getMaxDepth(M),B=function(Je){return Je.data.depth-S.data.depth<I},k=o._size,O=M.domain,N=k.w*(O.x[1]-O.x[0]),_=k.h*(O.y[1]-O.y[0]),U=N,Y=M.pathbar.thickness,J=M.marker.line.width+s.gapWithPathbar,te=M.pathbar.visible?M.pathbar.side.indexOf("bottom")>-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),Pe<It&&It<be&&(Pe=It)):(It=Pe+(C?Ue:Ue.t),Pe<It&&It<be&&(be=It))}var Bt=p(Ie,ze,Pe,be,se,{isHorizontal:!1,constrained:!0,angle:0,anchor:Le,leftToRight:at});return Bt.fontSize=De.fontSize,Bt.targetX=le(Bt.targetX),Bt.targetY=ie(Bt.targetY),isNaN(Bt.targetX)||isNaN(Bt.targetY)?{}:(Ie!==ze&&Pe!==be&&r(M.type,Bt,o),{scale:Bt.scale,rotate:Bt.rotate,textX:Bt.textX,textY:Bt.textY,anchorX:Bt.anchorX,anchorY:Bt.anchorY,targetX:Bt.targetX,targetY:Bt.targetY})},ct=function(Je,De){for(var Ie,ze=0,Pe=Je;!Ie&&ze<I;)ze++,Pe=Pe.parent,Pe?Ie=ee(Pe,De):ze=I;return Ie||{}},dt=function(Je,De,Ie,ze){var Pe=ee(Je,De),be;if(De)be=ae;else{var se=ee(S,De);se?be=ce(Je,se,ze):be={}}return P(Pe,be)},pt=function(Je,De,Ie,ze,Pe){var be=ee(Je,De),se;if(be)se=be;else if(De)se=ae;else if(Q)if(Je.parent){var ye=K||Ie;ye&&!De?se=ce(Je,ye,ze):(se={},L.extendFlat(se,ct(Je,De)))}else se=L.extendFlat({},Je),C&&(Pe.orientation==="h"?Pe.flipX?se.x0=Je.x1:se.x1=0:Pe.flipY?se.y0=Je.y1:se.y1=0);else se={};return P(se,{x0:Je.x0,x1:Je.x1,y0:Je.y0,y1:Je.y1})},At=function(Je,De,Ie,ze){var Pe=ee(Je,De),be={},se=oe(Je,De,Ie,ze);L.extendFlat(be,{transform:et({x0:se.x0,x1:se.x1,y0:se.y0,y1:se.y1,textBB:Je.textBB,_text:Je._text},{isHeader:i.isHeader(Je,M)})}),Pe?be=Pe:Je.parent&&L.extendFlat(be,ct(Je,De));var ye=Je.transform;return Je.x0!==Je.x1&&Je.y0!==Je.y1&&r(M.type,ye,o),P(be,{transform:{scale:ye.scale,rotate:ye.rotate,textX:ye.textX,textY:ye.textY,anchorX:ye.anchorX,anchorY:ye.anchorY,targetX:ye.targetX,targetY:ye.targetY}})},Mt=function(Je,De,Ie,ze,Pe){var be=ze[0],se=ze[1];z?Je.exit().transition().each(function(){var ye=m.select(this),Le=ye.select("path.surface");Le.transition().attrTween("d",function(ot){var at=dt(ot,De,Ie,[be,se]);return function(wt){return Pe(at(wt))}});var Be=ye.select("g.slicetext");Be.attr("opacity",0)}).remove():Je.exit().remove()},Vt=function(Je){var De=Je.transform;return Je.x0!==Je.x1&&Je.y0!==Je.y1&&r(M.type,De,o),L.getTextTransform({textX:De.textX,textY:De.textY,anchorX:De.anchorX,anchorY:De.anchorY,targetX:De.targetX,targetY:De.targetY,scale:De.scale,rotate:De.rotate})};z&&(a.each(function(Je){Z[l(Je)]={x0:Je.x0,x1:Je.x1,y0:Je.y0,y1:Je.y1},Je.transform&&(Z[l(Je)].transform={textX:Je.transform.textX,textY:Je.transform.textY,anchorX:Je.transform.anchorX,anchorY:Je.transform.anchorY,targetX:Je.transform.targetX,targetY:Je.transform.targetY,scale:Je.transform.scale,rotate:Je.transform.rotate})}),E.each(function(Je){j[l(Je)]={x0:Je.x0,x1:Je.x1,y0:Je.y0,y1:Je.y1},Je.transform&&(j[l(Je)].transform={textX:Je.transform.textX,textY:Je.transform.textY,anchorX:Je.transform.anchorX,anchorY:Je.transform.anchorY,targetX:Je.transform.targetX,targetY:Je.transform.targetY,scale:Je.transform.scale,rotate:Je.transform.rotate}),!Q&&i.isEntry(Je)&&(Q=Je)})),K=h(u,g,S,E,{width:N,height:_,viewX:le,viewY:ie,pathSlice:$e,toMoveInsideSlice:et,prevEntry:Q,makeUpdateSliceInterpolator:pt,makeUpdateTextInterpolator:At,handleSlicesExit:Mt,hasTransition:z,strTransform:Vt}),M.pathbar.visible?n(u,g,S,a,{barDifY:te,width:U,height:Y,viewX:Me,viewY:Te,pathSlice:Se,toMoveInsideSlice:et,makeUpdateSliceInterpolator:pt,makeUpdateTextInterpolator:At,handleSlicesExit:Mt,hasTransition:z,strTransform:Vt}):a.remove()}},96362:function(G,V,e){var m=e(39898),P=e(7901),i=e(71828),L=e(2791),A=e(72597).resizeText,v=e(43467);function p(r){var s=r._fullLayout._treemaplayer.selectAll(".trace");A(r,s,"treemap"),s.each(function(n){var l=m.select(this),c=n[0],u=c.trace;l.style("opacity",u.opacity),l.selectAll("path.surface").each(function(g){m.select(this).call(t,g,u,r,{hovered:!1})})})}function t(r,s,n,l,c){var u=(c||{}).hovered,g=s.data.data,f=g.i,w,h,o=g.color,d=L.isHierarchyRoot(s),M=1;if(u)w=n._hovered.marker.line.color,h=n._hovered.marker.line.width;else if(d&&o===n.root.color)M=100,w="rgba(0,0,0,0)",h=0;else if(w=i.castOption(n,f,"marker.line.color")||P.defaultLine,h=i.castOption(n,f,"marker.line.width")||0,!n._hasColorscale&&!s.onPathbar){var T=n.marker.depthfade;if(T){var C=P.combine(P.addOpacity(n._backgroundColor,.75),o),x;if(T===!0){var S=L.getMaxDepth(n);isFinite(S)?L.isLeaf(s)?x=0:x=n._maxVisibleLayers-(s.data.depth-n._entryDepth):x=s.data.height+1}else x=s.data.depth-n._entryDepth,n._atRootLevel||x++;if(x>0)for(var b=0;b<x;b++){var a=.5*b/x;o=P.combine(P.addOpacity(C,a),o)}}}r.call(v,s,n,l,o).style("stroke-width",h).call(P.stroke,w).style("opacity",M)}G.exports={style:p,styleOne:t}},68875:function(G,V,e){var m=e(53522),P=e(1426).extendFlat,i=e(12663).axisHoverFormat;G.exports={y:m.y,x:m.x,x0:m.x0,y0:m.y0,xhoverformat:i("x"),yhoverformat:i("y"),name:P({},m.name,{}),orientation:P({},m.orientation,{}),bandwidth:{valType:"number",min:0,editType:"calc"},scalegroup:{valType:"string",dflt:"",editType:"calc"},scalemode:{valType:"enumerated",values:["width","count"],dflt:"width",editType:"calc"},spanmode:{valType:"enumerated",values:["soft","hard","manual"],dflt:"soft",editType:"calc"},span:{valType:"info_array",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}],editType:"calc"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,dflt:2,editType:"style"},editType:"plot"},fillcolor:m.fillcolor,points:P({},m.boxpoints,{}),jitter:P({},m.jitter,{}),pointpos:P({},m.pointpos,{}),width:P({},m.width,{}),marker:m.marker,text:m.text,hovertext:m.hovertext,hovertemplate:m.hovertemplate,quartilemethod:m.quartilemethod,box:{visible:{valType:"boolean",dflt:!1,editType:"plot"},width:{valType:"number",min:0,max:1,dflt:.25,editType:"plot"},fillcolor:{valType:"color",editType:"style"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,editType:"style"},editType:"style"},editType:"plot"},meanline:{visible:{valType:"boolean",dflt:!1,editType:"plot"},color:{valType:"color",editType:"style"},width:{valType:"number",min:0,editType:"style"},editType:"plot"},side:{valType:"enumerated",values:["both","positive","negative"],dflt:"both",editType:"calc"},offsetgroup:m.offsetgroup,alignmentgroup:m.alignmentgroup,selected:m.selected,unselected:m.unselected,hoveron:{valType:"flaglist",flags:["violins","points","kde"],dflt:"violins+points+kde",extras:["all"],editType:"style"}}},38603:function(G,V,e){var m=e(71828),P=e(89298),i=e(48518),L=e(60168),A=e(50606).BADNUM;G.exports=function(s,n){var l=i(s,n);if(l[0].t.empty)return l;for(var c=s._fullLayout,u=P.getFromId(s,n[n.orientation==="h"?"xaxis":"yaxis"]),g=1/0,f=-1/0,w=0,h=0,o=0;o<l.length;o++){var d=l[o],M=d.pts.map(L.extractVal),T=d.bandwidth=p(n,d,M),C=d.span=t(n,d,u,T);if(d.min===d.max&&T===0)C=d.span=[d.min,d.max],d.density=[{v:1,t:C[0]}],d.bandwidth=T,w=Math.max(w,1);else{var x=C[1]-C[0],S=Math.ceil(x/(T/3)),b=x/S;if(!isFinite(b)||!isFinite(S))return m.error("Something went wrong with computing the violin span"),l[0].t.empty=!0,l;var a=L.makeKDE(d,n,M);d.density=new Array(S);for(var E=0,y=C[0];y<C[1]+b/2;E++,y+=b){var z=a(y);d.density[E]={v:z,t:y},w=Math.max(w,z)}}h=Math.max(h,M.length),g=Math.min(g,C[0]),f=Math.max(f,C[1])}var I=P.findExtremes(u,[g,f],{padded:!0});if(n._extremes[u._id]=I,n.width)l[0].t.maxKDE=w;else{var B=c._violinScaleGroupStats,k=n.scalegroup,O=B[k];O?(O.maxKDE=Math.max(O.maxKDE,w),O.maxCount=Math.max(O.maxCount,h)):B[k]={maxKDE:w,maxCount:h}}return l[0].t.labels.kde=m._(s,"kde:"),l};function v(r,s,n){var l=Math.min(s,n/1.349);return 1.059*l*Math.pow(r,-.2)}function p(r,s,n){var l=s.max-s.min;if(!l)return r.bandwidth?r.bandwidth:0;if(r.bandwidth)return Math.max(r.bandwidth,l/1e4);var c=n.length,u=m.stdev(n,c-1,s.mean);return Math.max(v(c,u,s.q3-s.q1),l/100)}function t(r,s,n,l){var c=r.spanmode,u=r.span||[],g=[s.min,s.max],f=[s.min-2*l,s.max+2*l],w;function h(d){var M=u[d],T=n.type==="multicategory"?n.r2c(M):n.d2c(M,0,r[s.valLetter+"calendar"]);return T===A?f[d]:T}c==="soft"?w=f:c==="hard"?w=g:w=[h(0),h(1)];var o={type:"linear",range:w};return P.setConvert(o),o.cleanRange(),w}},86403:function(G,V,e){var m=e(37188).setPositionOffset,P=["v","h"];G.exports=function(L,A){for(var v=L.calcdata,p=A.xaxis,t=A.yaxis,r=0;r<P.length;r++){for(var s=P[r],n=s==="h"?t:p,l=[],c=0;c<v.length;c++){var u=v[c],g=u[0].t,f=u[0].trace;f.visible===!0&&f.type==="violin"&&!g.empty&&f.orientation===s&&f.xaxis===p._id&&f.yaxis===t._id&&l.push(c)}m("violin",L,l,n)}}},15899:function(G,V,e){var m=e(71828),P=e(7901),i=e(36411),L=e(68875);G.exports=function(v,p,t,r){function s(b,a){return m.coerce(v,p,L,b,a)}function n(b,a){return m.coerce2(v,p,L,b,a)}if(i.handleSampleDefaults(v,p,s,r),p.visible!==!1){s("bandwidth"),s("side");var l=s("width");l||(s("scalegroup",p.name),s("scalemode"));var c=s("span"),u;Array.isArray(c)&&(u="manual"),s("spanmode",u);var g=s("line.color",(v.marker||{}).color||t),f=s("line.width"),w=s("fillcolor",P.addOpacity(p.line.color,.5));i.handlePointsDefaults(v,p,s,{prefix:""});var h=n("box.width"),o=n("box.fillcolor",w),d=n("box.line.color",g),M=n("box.line.width",f),T=s("box.visible",!!(h||o||d||M));T||(p.box={visible:!1});var C=n("meanline.color",g),x=n("meanline.width",f),S=s("meanline.visible",!!(C||x));S||(p.meanline={visible:!1}),s("quartilemethod")}}},60168:function(G,V,e){var m=e(71828),P={gaussian:function(i){return 1/Math.sqrt(2*Math.PI)*Math.exp(-.5*i*i)}};V.makeKDE=function(i,L,A){var v=A.length,p=P.gaussian,t=i.bandwidth,r=1/(v*t);return function(s){for(var n=0,l=0;l<v;l++)n+=p((s-A[l])/t);return r*n}},V.getPositionOnKdePath=function(i,L,A){var v,p;L.orientation==="h"?(v="y",p="x"):(v="x",p="y");var t=m.findPointOnPath(i.path,A,p,{pathLength:i.pathLength}),r=i.posCenterPx,s=t[v],n=L.side==="both"?2*r-s:r;return[s,n]},V.getKdeValue=function(i,L,A){var v=i.pts.map(V.extractVal),p=V.makeKDE(i,L,v);return p(A)/i.posDensityScale},V.extractVal=function(i){return i.v}},57634:function(G,V,e){var m=e(7901),P=e(71828),i=e(89298),L=e(41868),A=e(60168);G.exports=function(p,t,r,s,n){n||(n={});var l=n.hoverLayer,c=p.cd,u=c[0].trace,g=u.hoveron,f=g.indexOf("violins")!==-1,w=g.indexOf("kde")!==-1,h=[],o,d;if(f||w){var M=L.hoverOnBoxes(p,t,r,s);if(w&&M.length>0){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<M.length;U++)if(M[U].attr==="med"){_=U;break}z.spikeDistance=M[_].spikeDistance;var Y=x+"Spike";z[Y]=M[_][Y],M[_].spikeDistance=void 0,M[_][Y]=void 0,z.hovertemplate=!1,h.push(z),d={},d[x+"1"]=P.constrain(O+k[0],O,O+N),d[x+"2"]=P.constrain(O+k[1],O,O+N),d[S+"1"]=d[S+"2"]=a._offset+I}}f&&(h=h.concat(M))}g.indexOf("points")!==-1&&(o=L.hoverOnPoints(p,t,r));var J=l.selectAll(".violinline-"+u.uid).data(d?[0]:[]);return J.enter().append("line").classed("violinline-"+u.uid,!0).attr("stroke-width",1.5),J.exit().remove(),J.attr(d).call(m.stroke,p.color),s==="closest"?o?[o]:h:(o&&h.push(o),h)}},47462:function(G,V,e){G.exports={attributes:e(68875),layoutAttributes:e(9228),supplyDefaults:e(15899),crossTraceDefaults:e(36411).crossTraceDefaults,supplyLayoutDefaults:e(33598),calc:e(38603),crossTraceCalc:e(86403),plot:e(28443),style:e(31847),styleOnSelect:e(16296).styleOnSelect,hoverPoints:e(57634),selectPoints:e(24626),moduleType:"trace",name:"violin",basePlotModule:e(93612),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","violinLayout","zoomScale"],meta:{}}},9228:function(G,V,e){var m=e(40094),P=e(71828).extendFlat;G.exports={violinmode:P({},m.boxmode,{}),violingap:P({},m.boxgap,{}),violingroupgap:P({},m.boxgroupgap,{})}},33598:function(G,V,e){var m=e(71828),P=e(9228),i=e(4199);G.exports=function(A,v,p){function t(r,s){return m.coerce(A,v,P,r,s)}i._supply(A,v,p,t,"violin")}},28443:function(G,V,e){var m=e(39898),P=e(71828),i=e(91424),L=e(86047),A=e(34621),v=e(60168);G.exports=function(t,r,s,n){var l=t._context.staticPlot,c=t._fullLayout,u=r.xaxis,g=r.yaxis;function f(w,h){var o=A(w,{xaxis:u,yaxis:g,trace:h,connectGaps:!0,baseTolerance:.75,shape:"spline",simplify:!0,linearized:!0});return i.smoothopen(o[0],1)}P.makeTraceGroups(n,s,"trace violins").each(function(w){var h=m.select(this),o=w[0],d=o.t,M=o.trace;if(M.visible!==!0||d.empty){h.remove();return}var T=d.bPos,C=d.bdPos,x=r[d.valLetter+"axis"],S=r[d.posLetter+"axis"],b=M.side==="both",a=b||M.side==="positive",E=b||M.side==="negative",y=h.selectAll("path.violin").data(P.identity);y.enter().append("path").style("vector-effect",l?"none":"non-scaling-stroke").attr("class","violin"),y.exit().remove(),y.each(function(U){var Y=m.select(this),J=U.density,te=J.length,ae=S.c2l(U.pos+T,!0),ce=S.l2p(ae),Q;if(M.width)Q=d.maxKDE/C;else{var Z=c._violinScaleGroupStats[M.scalegroup];Q=M.scalemode==="count"?Z.maxKDE/C*(Z.maxCount/U.pts.length):Z.maxKDE/C}var j,K,ee,oe,q,$,le;if(a){for($=new Array(te),oe=0;oe<te;oe++)le=$[oe]={},le[d.posLetter]=ae+J[oe].v/Q,le[d.valLetter]=x.c2l(J[oe].t,!0);j=f($,M)}if(E){for($=new Array(te),q=0,oe=te-1;q<te;q++,oe--)le=$[q]={},le[d.posLetter]=ae-J[oe].v/Q,le[d.valLetter]=x.c2l(J[oe].t,!0);K=f($,M)}if(b)ee=j+"L"+K.substr(1)+"Z";else{var ie=[ce,x.c2p(J[0].t)],he=[ce,x.c2p(J[te-1].t)];M.orientation==="h"&&(ie.reverse(),he.reverse()),a?ee="M"+ie+"L"+j.substr(1)+"L"+he:ee="M"+he+"L"+K.substr(1)+"L"+ie}Y.attr("d",ee),U.posCenterPx=ce,U.posDensityScale=Q*C,U.path=Y.node(),U.pathLength=U.path.getTotalLength()/(b?2:1)});var z=M.box,I=z.width,B=(z.line||{}).width,k,O;b?(k=C*I,O=0):a?(k=[0,C*I/2],O=B*{x:1,y:-1}[d.posLetter]):(k=[C*I/2,0],O=B*{x:-1,y:1}[d.posLetter]),L.plotBoxAndWhiskers(h,{pos:S,val:x},M,{bPos:T,bdPos:k,bPosPxOffset:O}),L.plotBoxMean(h,{pos:S,val:x},M,{bPos:T,bdPos:k,bPosPxOffset:O});var N;!M.box.visible&&M.meanline.visible&&(N=P.identity);var _=h.selectAll("path.meanline").data(N||[]);_.enter().append("path").attr("class","meanline").style("fill","none").style("vector-effect",l?"none":"non-scaling-stroke"),_.exit().remove(),_.each(function(U){var Y=x.c2p(U.mean,!0),J=v.getPositionOnKdePath(U,M,Y);m.select(this).attr("d",M.orientation==="h"?"M"+Y+","+J[0]+"V"+J[1]:"M"+J[0]+","+Y+"H"+J[1])}),L.plotPoints(h,{x:u,y:g},M,d)})}},31847:function(G,V,e){var m=e(39898),P=e(7901),i=e(16296).stylePoints;G.exports=function(A){var v=m.select(A).selectAll("g.trace.violins");v.style("opacity",function(p){return p[0].trace.opacity}),v.each(function(p){var t=p[0].trace,r=m.select(this),s=t.box||{},n=s.line||{},l=t.meanline||{},c=l.width;r.selectAll("path.violin").style("stroke-width",t.line.width+"px").call(P.stroke,t.line.color).call(P.fill,t.fillcolor),r.selectAll("path.box").style("stroke-width",n.width+"px").call(P.stroke,n.color).call(P.fill,s.fillcolor);var u={"stroke-width":c+"px","stroke-dasharray":2*c+"px,"+c+"px"};r.selectAll("path.mean").style(u).call(P.stroke,l.color),r.selectAll("path.meanline").style(u).call(P.stroke,l.color),i(r,t,A)})}},16336:function(G,V,e){var m=e(50693),P=e(16249),i=e(54532),L=e(9012),A=e(1426).extendFlat,v=e(30962).overrideAll,p=G.exports=v(A({x:P.x,y:P.y,z:P.z,value:P.value,isomin:P.isomin,isomax:P.isomax,surface:P.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:P.slices,caps:P.caps,text:P.text,hovertext:P.hovertext,xhoverformat:P.xhoverformat,yhoverformat:P.yhoverformat,zhoverformat:P.zhoverformat,valuehoverformat:P.valuehoverformat,hovertemplate:P.hovertemplate},m("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:P.colorbar,opacity:P.opacity,opacityscale:i.opacityscale,lightposition:P.lightposition,lighting:P.lighting,flatshading:P.flatshading,contour:P.contour,hoverinfo:A({},L.hoverinfo),showlegend:A({},L.showlegend,{dflt:!1})}),"calc","nested");p.x.editType=p.y.editType=p.z.editType=p.value.editType="calc+clearAxisTypes",p.transforms=void 0},64809:function(G,V,e){var m=e(9330).gl_mesh3d,P=e(81697).parseColorScale,i=e(78614),L=e(21081).extractOpts,A=e(90060),v=e(22674).findNearestOnAxis,p=e(22674).generateIsoMeshes;function t(n,l,c){this.scene=n,this.uid=c,this.mesh=l,this.name="",this.data=null,this.showContour=!1}var r=t.prototype;r.handlePick=function(n){if(n.object===this.mesh){var l=n.data.index,c=this.data._meshX[l],u=this.data._meshY[l],g=this.data._meshZ[l],f=this.data._Ys.length,w=this.data._Zs.length,h=v(c,this.data._Xs).id,o=v(u,this.data._Ys).id,d=v(g,this.data._Zs).id,M=n.index=d+w*o+w*f*h;n.traceCoordinate=[this.data._meshX[M],this.data._meshY[M],this.data._meshZ[M],this.data._value[M]];var T=this.data.hovertext||this.data.text;return Array.isArray(T)&&T[M]!==void 0?n.textLabel=T[M]:T&&(n.textLabel=T),!0}},r.update=function(n){var l=this.scene,c=l.fullSceneLayout;this.data=p(n);function u(o,d,M,T){return d.map(function(C){return o.d2l(C,0,T)*M})}var g=A(u(c.xaxis,n._meshX,l.dataScale[0],n.xcalendar),u(c.yaxis,n._meshY,l.dataScale[1],n.ycalendar),u(c.zaxis,n._meshZ,l.dataScale[2],n.zcalendar)),f=A(n._meshI,n._meshJ,n._meshK),w={positions:g,cells:f,lightPosition:[n.lightposition.x,n.lightposition.y,n.lightposition.z],ambient:n.lighting.ambient,diffuse:n.lighting.diffuse,specular:n.lighting.specular,roughness:n.lighting.roughness,fresnel:n.lighting.fresnel,vertexNormalsEpsilon:n.lighting.vertexnormalsepsilon,faceNormalsEpsilon:n.lighting.facenormalsepsilon,opacity:n.opacity,opacityscale:n.opacityscale,contourEnable:n.contour.show,contourColor:i(n.contour.color).slice(0,3),contourWidth:n.contour.width,useFacetNormals:n.flatshading},h=L(n);w.vertexIntensity=n._meshIntensity,w.vertexIntensityBounds=[h.min,h.max],w.colormap=P(n),this.mesh.update(w)},r.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function s(n,l){var c=n.glplot.gl,u=m({gl:c}),g=new t(n,u,l.uid);return u._trace=g,g.update(l),n.glplot.add(u),g}G.exports=s},47651:function(G,V,e){var m=e(71828),P=e(16336),i=e(82738).supplyIsoDefaults,L=e(91831).opacityscaleDefaults;G.exports=function(v,p,t,r){function s(n,l){return m.coerce(v,p,P,n,l)}i(v,p,t,r,s),L(v,p,r,s)}},17659:function(G,V,e){G.exports={attributes:e(16336),supplyDefaults:e(47651),calc:e(56959),colorbar:{min:"cmin",max:"cmax"},plot:e(64809),moduleType:"trace",name:"volume",basePlotModule:e(58547),categories:["gl3d","showLegend"],meta:{}}},43037:function(G,V,e){var m=e(1486),P=e(82196).line,i=e(9012),L=e(12663).axisHoverFormat,A=e(5386).fF,v=e(5386).si,p=e(48334),t=e(1426).extendFlat,r=e(7901);function s(n){return{marker:{color:t({},m.marker.color,{arrayOk:!1,editType:"style"}),line:{color:t({},m.marker.line.color,{arrayOk:!1,editType:"style"}),width:t({},m.marker.line.width,{arrayOk:!1,editType:"style"}),editType:"style"},editType:"style"},editType:"style"}}G.exports={measure:{valType:"data_array",dflt:[],editType:"calc"},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc"},x:m.x,x0:m.x0,dx:m.dx,y:m.y,y0:m.y0,dy:m.dy,xperiod:m.xperiod,yperiod:m.yperiod,xperiod0:m.xperiod0,yperiod0:m.yperiod0,xperiodalignment:m.xperiodalignment,yperiodalignment:m.yperiodalignment,xhoverformat:L("x"),yhoverformat:L("y"),hovertext:m.hovertext,hovertemplate:A({},{keys:p.eventDataKeys}),hoverinfo:t({},i.hoverinfo,{flags:["name","x","y","text","initial","delta","final"]}),textinfo:{valType:"flaglist",flags:["label","text","initial","delta","final"],extras:["none"],editType:"plot",arrayOk:!1},texttemplate:v({editType:"plot"},{keys:p.eventDataKeys.concat(["label"])}),text:m.text,textposition:m.textposition,insidetextanchor:m.insidetextanchor,textangle:m.textangle,textfont:m.textfont,insidetextfont:m.insidetextfont,outsidetextfont:m.outsidetextfont,constraintext:m.constraintext,cliponaxis:m.cliponaxis,orientation:m.orientation,offset:m.offset,width:m.width,increasing:s(),decreasing:s(),totals:s(),connector:{line:{color:t({},P.color,{dflt:r.defaultLine}),width:t({},P.width,{editType:"plot"}),dash:P.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:m.offsetgroup,alignmentgroup:m.alignmentgroup}},52752:function(G,V,e){var m=e(89298),P=e(42973),i=e(71828).mergeArray,L=e(66279),A=e(50606).BADNUM;function v(t){return t==="a"||t==="absolute"}function p(t){return t==="t"||t==="total"}G.exports=function(r,s){var n=m.getFromId(r,s.xaxis||"x"),l=m.getFromId(r,s.yaxis||"y"),c,u,g,f,w,h;s.orientation==="h"?(c=n.makeCalcdata(s,"x"),g=l.makeCalcdata(s,"y"),f=P(s,l,"y",g),w=!!s.yperiodalignment,h="y"):(c=l.makeCalcdata(s,"y"),g=n.makeCalcdata(s,"x"),f=P(s,n,"x",g),w=!!s.xperiodalignment,h="x"),u=f.vals;for(var o=Math.min(u.length,c.length),d=new Array(o),M=0,T,C=!1,x=0;x<o;x++){var S=c[x]||0,b=!1;(c[x]!==A||p(s.measure[x])||v(s.measure[x]))&&x+1<o&&(c[x+1]!==A||p(s.measure[x+1])||v(s.measure[x+1]))&&(b=!0);var a=d[x]={i:x,p:u[x],s:S,rawS:S,cNext:b};v(s.measure[x])?(M=a.s,a.isSum=!0,a.dir="totals",a.s=M):p(s.measure[x])?(a.isSum=!0,a.dir="totals",a.s=M):(a.isSum=!1,a.dir=a.rawS<0?"decreasing":"increasing",T=a.s,a.s=M+T,M+=T),a.dir==="totals"&&(C=!0),w&&(d[x].orig_p=g[x],d[x][h+"End"]=f.ends[x],d[x][h+"Start"]=f.starts[x]),s.ids&&(a.id=String(s.ids[x])),a.v=(s.base||0)+M}return d.length&&(d[0].hasTotals=C),i(s.text,d,"tx"),i(s.hovertext,d,"htx"),L(d,s),d}},48334:function(G){G.exports={eventDataKeys:["initial","delta","final"]}},70766:function(G,V,e){var m=e(11661).setGroupPositions;G.exports=function(i,L){var A=i._fullLayout,v=i._fullData,p=i.calcdata,t=L.xaxis,r=L.yaxis,s=[],n=[],l=[],c,u;for(u=0;u<v.length;u++){var g=v[u];g.visible===!0&&g.xaxis===t._id&&g.yaxis===r._id&&g.type==="waterfall"&&(c=p[u],g.orientation==="h"?l.push(c):n.push(c),s.push(c))}var f={mode:A.waterfallmode,norm:A.waterfallnorm,gap:A.waterfallgap,groupgap:A.waterfallgroupgap};for(m(i,t,r,n,f),m(i,r,t,l,f),u=0;u<s.length;u++){c=s[u];for(var w=0;w<c.length;w++){var h=c[w];h.isSum===!1&&(h.s0+=w===0?0:c[w-1].s),w+1<c.length&&(c[w].nextP0=c[w+1].p0,c[w].nextS0=c[w+1].s0)}}}},83266:function(G,V,e){var m=e(71828),P=e(26125),i=e(90769).handleText,L=e(67513),A=e(73927),v=e(43037),p=e(7901),t=e(22372),r=t.INCREASING.COLOR,s=t.DECREASING.COLOR,n="#4499FF";function l(g,f,w){g(f+".marker.color",w),g(f+".marker.line.color",p.defaultLine),g(f+".marker.line.width")}function c(g,f,w,h){function o(x,S){return m.coerce(g,f,v,x,S)}var d=L(g,f,h,o);if(!d){f.visible=!1;return}A(g,f,h,o),o("xhoverformat"),o("yhoverformat"),o("measure"),o("orientation",f.x&&!f.y?"h":"v"),o("base"),o("offset"),o("width"),o("text"),o("hovertext"),o("hovertemplate");var M=o("textposition");i(g,f,h,o,M,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),f.textposition!=="none"&&(o("texttemplate"),f.texttemplate||o("textinfo")),l(o,"increasing",r),l(o,"decreasing",s),l(o,"totals",n);var T=o("connector.visible");if(T){o("connector.mode");var C=o("connector.line.width");C&&(o("connector.line.color"),o("connector.line.dash"))}}function u(g,f){var w,h;function o(M){return m.coerce(h._input,h,v,M)}if(f.waterfallmode==="group")for(var d=0;d<g.length;d++)h=g[d],w=h._input,P(w,h,f,o)}G.exports={supplyDefaults:c,crossTraceDefaults:u}},58593:function(G){G.exports=function(e,m){return e.x="xVal"in m?m.xVal:m.x,e.y="yVal"in m?m.yVal:m.y,"initial"in m&&(e.initial=m.initial),"delta"in m&&(e.delta=m.delta),"final"in m&&(e.final=m.final),m.xa&&(e.xaxis=m.xa),m.ya&&(e.yaxis=m.ya),e}},61326:function(G,V,e){var m=e(89298).hoverLabelText,P=e(7901).opacity,i=e(95423).hoverOnBars,L=e(22372),A={increasing:L.INCREASING.SYMBOL,decreasing:L.DECREASING.SYMBOL};G.exports=function(t,r,s,n,l){var c=i(t,r,s,n,l);if(!c)return;var u=c.cd,g=u[0].trace,f=g.orientation==="h",w=f?"x":"y",h=f?t.xa:t.ya;function o(y){return m(h,y,g[w+"hoverformat"])}var d=c.index,M=u[d],T=M.isSum?M.b+M.s:M.rawS;c.initial=M.b+M.s-T,c.delta=T,c.final=c.initial+c.delta;var C=o(Math.abs(c.delta));c.deltaLabel=T<0?"("+C+")":C,c.finalLabel=o(c.final),c.initialLabel=o(c.initial);var x=M.hi||g.hoverinfo,S=[];if(x&&x!=="none"&&x!=="skip"){var b=x==="all",a=x.split("+"),E=function(y){return b||a.indexOf(y)!==-1};M.isSum||(E("final")&&(f?!E("x"):!E("y"))&&S.push(c.finalLabel),E("delta")&&(T<0?S.push(c.deltaLabel+" "+A.decreasing):S.push(c.deltaLabel+" "+A.increasing)),E("initial")&&S.push("Initial: "+c.initialLabel))}return S.length&&(c.extraText=S.join("<br>")),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;t<A.length;t++){var r=A[t];if(r.visible&&r.type==="waterfall"){v=!0;break}}v&&(p("waterfallmode"),p("waterfallgap",.2),p("waterfallgroupgap"))}},30436:function(G,V,e){var m=e(39898),P=e(71828),i=e(91424),L=e(50606).BADNUM,A=e(17295),v=e(72597).clearMinTextSize;G.exports=function(s,n,l,c){var u=s._fullLayout;v("waterfall",u),A.plot(s,n,l,c,{mode:u.waterfallmode,norm:u.waterfallmode,gap:u.waterfallgap,groupgap:u.waterfallgroupgap}),p(s,n,l,c)};function p(r,s,n,l){var c=s.xaxis,u=s.yaxis;P.makeTraceGroups(l,n,"trace bars").each(function(g){var f=m.select(this),w=g[0].trace,h=P.ensureSingle(f,"g","lines");if(!w.connector||!w.connector.visible){h.remove();return}var o=w.orientation==="h",d=w.connector.mode,M=h.selectAll("g.line").data(P.identity);M.enter().append("g").classed("line",!0),M.exit().remove();var T=M.size();M.each(function(C,x){if(!(x!==T-1&&!C.cNext)){var S=t(C,c,u,o),b=S[0],a=S[1],E="";b[0]!==L&&a[0]!==L&&b[1]!==L&&a[1]!==L&&(d==="spanning"&&!C.isSum&&x>0&&(o?E+="M"+b[0]+","+a[1]+"V"+a[0]:E+="M"+b[1]+","+a[0]+"H"+b[0]),d!=="between"&&(C.isSum||x<T-1)&&(o?E+="M"+b[1]+","+a[0]+"V"+a[1]:E+="M"+b[0]+","+a[1]+"H"+b[1]),b[2]!==L&&a[2]!==L&&(o?E+="M"+b[1]+","+a[1]+"V"+a[2]:E+="M"+b[1]+","+a[1]+"H"+b[2])),E===""&&(E="M0,0Z"),P.ensureSingle(m.select(this),"path").attr("d",E).call(i.setClipUrl,s.layerClipId,r)}})})}function t(r,s,n,l){var c=[],u=[],g=l?s:n,f=l?n:s;return c[0]=g.c2p(r.s0,!0),u[0]=f.c2p(r.p0,!0),c[1]=g.c2p(r.s1,!0),u[1]=f.c2p(r.p1,!0),c[2]=g.c2p(r.nextS0,!0),u[2]=f.c2p(r.nextP0,!0),l?[c,u]:[u,c]}},55750:function(G,V,e){var m=e(39898),P=e(91424),i=e(7901),L=e(37822).DESELECTDIM,A=e(16688),v=e(72597).resizeText,p=A.styleTextPoints;function t(r,s,n){var l=n||m.select(r).selectAll("g.waterfalllayer").selectAll("g.trace");v(r,l,"waterfall"),l.style("opacity",function(c){return c[0].trace.opacity}),l.each(function(c){var u=m.select(this),g=c[0].trace;u.selectAll(".point > 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;f<o.length;f++)d[o[f]]=1;var M=w("groups");if(!Array.isArray(M)){if(!d[M])return g.enabled=!1,g;d[M]=0}var T=c.aggregations||[],C=g.aggregations=new Array(T.length),x;function S(y,z){return P.coerce(T[f],x,p,y,z)}for(f=0;f<T.length;f++){x={_index:f};var b=S("target"),a=S("func"),E=S("enabled");E&&b&&(d[b]||a==="count"&&d[b]===void 0)?(a==="stddev"&&S("funcmode"),d[b]=0,C[f]=x):C[f]={enabled:!1,_index:f}}for(f=0;f<o.length;f++)d[o[f]]&&C.push({target:o[f],func:p.func.dflt,enabled:!0,_index:-1});return g},V.calcTransform=function(c,u,g){if(g.enabled){var f=g.groups,w=P.getTargetArray(u,{target:f});if(w){var h,o,d,M,T={},C={},x=[],S=L(u.transforms,g),b=w.length;for(u._length&&(b=Math.min(b,u._length)),h=0;h<b;h++)o=w[h],d=T[o],d===void 0?(T[o]=x.length,M=[h],x.push(M),C[T[o]]=S(h)):(x[d].push(h),C[T[o]]=(C[T[o]]||[]).concat(S(h)));g._indexToPoints=C;var a=g.aggregations;for(h=0;h<a.length;h++)t(c,u,x,a[h]);typeof f=="string"&&t(c,u,x,{target:f,func:"first",enabled:!0}),u._length=x.length}}};function t(c,u,g,f){if(f.enabled){for(var w=f.target,h=P.nestedProperty(u,w),o=h.get(),d=m.getDataConversions(c,u,w,o),M=r(f,d),T=new Array(g.length),C=0;C<g.length;C++)T[C]=M(o,g[C]);h.set(T),f.func==="count"&&P.pushUnique(u._arrayAttrs,w)}}function r(c,u){var g=c.func,f=u.d2c,w=u.c2d;switch(g){case"count":return s;case"first":return n;case"last":return l;case"sum":return function(h,o){for(var d=0,M=0;M<o.length;M++){var T=f(h[o[M]]);T!==A&&(d+=T)}return w(d)};case"avg":return function(h,o){for(var d=0,M=0,T=0;T<o.length;T++){var C=f(h[o[T]]);C!==A&&(d+=C,M++)}return M?w(d/M):A};case"min":return function(h,o){for(var d=1/0,M=0;M<o.length;M++){var T=f(h[o[M]]);T!==A&&(d=Math.min(d,T))}return d===1/0?A:w(d)};case"max":return function(h,o){for(var d=-1/0,M=0;M<o.length;M++){var T=f(h[o[M]]);T!==A&&(d=Math.max(d,T))}return d===-1/0?A:w(d)};case"range":return function(h,o){for(var d=1/0,M=-1/0,T=0;T<o.length;T++){var C=f(h[o[T]]);C!==A&&(d=Math.min(d,C),M=Math.max(M,C))}return M===-1/0||d===1/0?A:w(M-d)};case"change":return function(h,o){var d=f(h[o[0]]),M=f(h[o[o.length-1]]);return d===A||M===A?A:w(M-d)};case"median":return function(h,o){for(var d=[],M=0;M<o.length;M++){var T=f(h[o[M]]);T!==A&&d.push(T)}if(!d.length)return A;d.sort(P.sorterAsc);var C=(d.length-1)/2;return w((d[Math.floor(C)]+d[Math.ceil(C)])/2)};case"mode":return function(h,o){for(var d={},M=0,T=A,C=0;C<o.length;C++){var x=f(h[o[C]]);if(x!==A){var S=d[x]=(d[x]||0)+1;S>M&&(M=S,T=x)}}return M?w(T):A};case"rms":return function(h,o){for(var d=0,M=0,T=0;T<o.length;T++){var C=f(h[o[T]]);C!==A&&(d+=C*C,M++)}return M?w(Math.sqrt(d/M)):A};case"stddev":return function(h,o){var d=0,M=0,T=1,C=A,x;for(x=0;x<o.length&&C===A;x++)C=f(h[o[x]]);if(C===A)return A;for(;x<o.length;x++){var S=f(h[o[x]]);if(S!==A){var b=S-C;d+=b,M+=b*b,T++}}var a=c.funcmode==="sample"?T-1:T;return a?Math.sqrt((M-d*d/T)/a):0}}}function s(c,u){return u.length}function n(c,u){return c[u[0]]}function l(c,u){return c[u[u.length-1]]}},14382:function(G,V,e){var m=e(71828),P=e(73972),i=e(89298),L=e(79344).p,A=e(74808),v=A.COMPARISON_OPS,p=A.INTERVAL_OPS,t=A.SET_OPS;V.moduleType="transform",V.name="filter",V.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc"},target:{valType:"string",strict:!0,noBlank:!0,arrayOk:!0,dflt:"x",editType:"calc"},operation:{valType:"enumerated",values:[].concat(v).concat(p).concat(t),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},preservegaps:{valType:"boolean",dflt:!1,editType:"calc"},editType:"calc"},V.supplyDefaults=function(s){var n={};function l(f,w){return m.coerce(s,n,V.attributes,f,w)}var c=l("enabled");if(c){var u=l("target");if(m.isArrayOrTypedArray(u)&&u.length===0)return n.enabled=!1,n;l("preservegaps"),l("operation"),l("value");var g=P.getComponentMethod("calendars","handleDefaults");g(s,n,"valuecalendar",null),g(s,n,"targetcalendar",null)}return n},V.calcTransform=function(s,n,l){if(!l.enabled)return;var c=m.getTargetArray(n,l);if(!c)return;var u=l.target,g=c.length;n._length&&(g=Math.min(g,n._length));var f=l.targetcalendar,w=n._arrayAttrs,h=l.preservegaps;if(typeof u=="string"){var o=m.nestedProperty(n,u+"calendar").get();o&&(f=o)}var d=i.getDataToCoordFunc(s,n,u,c),M=r(l,d,f),T={},C={},x=0;function S(I,B){for(var k=0;k<w.length;k++){var O=m.nestedProperty(n,w[k]);I(O,B)}}var b,a;h?(b=function(I){T[I.astr]=m.extendDeep([],I.get()),I.set(new Array(g))},a=function(I,B){var k=T[I.astr][B];I.get()[B]=k}):(b=function(I){T[I.astr]=m.extendDeep([],I.get()),I.set([])},a=function(I,B){var k=T[I.astr][B];I.get().push(k)}),S(b);for(var E=L(n.transforms,l),y=0;y<g;y++){var z=M(c[y]);z?(S(a,y),C[x++]=E(y)):h&&x++}l._indexToPoints=C,n._length=x};function r(s,n,l){var c=s.operation,u=s.value,g=Array.isArray(u);function f(d){return d.indexOf(c)!==-1}var w=function(d){return n(d,0,s.valuecalendar)},h=function(d){return n(d,0,l)},o;switch(f(v)?o=w(g?u[0]:u):f(p)?o=g?[w(u[0]),w(u[1])]:[w(u),w(u)]:f(t)&&(o=g?u.map(w):[w(u)]),c){case"=":return function(d){return h(d)===o};case"!=":return function(d){return h(d)!==o};case"<":return function(d){return h(d)<o};case"<=":return function(d){return h(d)<=o};case">":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[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[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 M<o[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 M<o[0]||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<c.length;r++){var g=u[r]={};m.coerce(c[r],u[r],V.attributes.styles,"target");var f=m.coerce(c[r],u[r],V.attributes.styles,"value");m.isPlainObject(f)?g.value=m.extendDeep({},f):f&&delete g.value}return s},V.transform=function(v,p){var t,r,s,n=[];for(r=0;r<v.length;r++)for(t=A(v[r],p),s=0;s<t.length;s++)n.push(t[s]);return n};function A(v,p){var t,r,s,n,l,c,u,g,f,w,h=p.transform,o=p.transformIndex,d=v.transforms[o].groups,M=L(v.transforms,h);if(!m.isArrayOrTypedArray(d)||d.length===0)return[v];var T=m.filterUnique(d),C=new Array(T.length),x=d.length,S=P.findArrayAttributes(v),b=h.styles||[],a={};for(t=0;t<b.length;t++)a[b[t].target]=b[t].value;h.styles&&(w=m.keyedContainer(h,"styles","target","value.name"));var E={},y={};for(t=0;t<T.length;t++){c=T[t],E[c]=t,y[c]=0,u=C[t]=m.extendDeepNoArrays({},v),u._group=c,u.transforms[o]._indexToPoints={};var z=null;for(w&&(z=w.get(c)),z||z===""?u.name=z:u.name=m.templateString(h.nameformat,{trace:v.name,group:c}),g=u.transforms,u.transforms=[],r=0;r<g.length;r++)u.transforms[r]=m.extendDeepNoArrays({},g[r]);for(r=0;r<S.length;r++)m.nestedProperty(u,S[r]).set([])}for(s=0;s<S.length;s++){for(n=S[s],r=0,f=[];r<T.length;r++)f[r]=m.nestedProperty(C[r],n).get();for(l=m.nestedProperty(v,n).get(),r=0;r<x;r++)f[E[d[r]]].push(l[r])}for(r=0;r<x;r++){u=C[E[d[r]]];var I=u.transforms[o]._indexToPoints;I[y[d[r]]]=M(r),y[d[r]]++}for(t=0;t<T.length;t++)c=T[t],u=C[t],i.clearExpandedTraceDefaultColors(u),u=m.extendDeepNoArrays(u,a[c]||{});return C}},79344:function(G,V){V.p=function(e,m){for(var P,i,L=0;L<e.length&&(P=e[L],P!==m);L++)!P._indexToPoints||P.enabled===!1||(i=P._indexToPoints);var A=i?function(v){return i[v]}:function(v){return[v]};return A}},32275:function(G,V,e){var m=e(71828),P=e(89298),i=e(79344).p,L=e(50606).BADNUM;V.moduleType="transform",V.name="sort",V.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc"},target:{valType:"string",strict:!0,noBlank:!0,arrayOk:!0,dflt:"x",editType:"calc"},order:{valType:"enumerated",values:["ascending","descending"],dflt:"ascending",editType:"calc"},editType:"calc"},V.supplyDefaults=function(p){var t={};function r(n,l){return m.coerce(p,t,V.attributes,n,l)}var s=r("enabled");return s&&(r("target"),r("order")),t},V.calcTransform=function(p,t,r){if(r.enabled){var s=m.getTargetArray(t,r);if(s){var n=r.target,l=s.length;t._length&&(l=Math.min(l,t._length));var c=t._arrayAttrs,u=P.getDataToCoordFunc(p,t,n,s),g=A(r,s,u,l),f=i(t.transforms,r),w={},h,o;for(h=0;h<c.length;h++){var d=m.nestedProperty(t,c[h]),M=d.get(),T=new Array(l);for(o=0;o<l;o++)T[o]=M[g[o]];d.set(T)}for(o=0;o<l;o++)w[o]=f(g[o]);r._indexToPoints=w,t._length=l}}};function A(p,t,r,s){var n=new Array(s),l=new Array(s),c;for(c=0;c<s;c++)n[c]={v:t[c],i:c};for(n.sort(v(p,r)),c=0;c<s;c++)l[c]=n[c].i;return l}function v(p,t){switch(p.order){case"ascending":return function(r,s){var n=t(r.v),l=t(s.v);return n===L?1:l===L?-1:n-l};case"descending":return function(r,s){var n=t(r.v),l=t(s.v);return n===L?1:l===L?-1:l-n}}}},11506:function(G,V){V.version="2.26.1"},9330:function(G,V,e){var m=e(90386);(function(i,L){G.exports=L()})(self,function(){return function(){var P={7386:function(v,p,t){v.exports={alpha_shape:t(2350),convex_hull:t(5537),delaunay_triangulate:t(4419),gl_cone3d:t(1140),gl_error3d:t(3110),gl_heatmap2d:t(6386),gl_line3d:t(6086),gl_mesh3d:t(8116),gl_plot2d:t(2117),gl_plot3d:t(1059),gl_pointcloud2d:t(8271),gl_scatter3d:t(2182),gl_select_box:t(6623),gl_spikes2d:t(3050),gl_streamtube3d:t(7307),gl_surface3d:t(3754),ndarray:t(5050),ndarray_linear_interpolate:t(3581)}},2146:function(v,p,t){/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @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<se.length;ye++){var Le=se[ye];Le.enumerable=Le.enumerable||!1,Le.configurable=!0,"value"in Le&&(Le.writable=!0),Object.defineProperty(be,Le.key,Le)}}function n(be,se,ye){return se&&s(be.prototype,se),ye&&s(be,ye),Object.defineProperty(be,"prototype",{writable:!1}),be}function l(be,se){if(typeof se!="function"&&se!==null)throw new TypeError("Super expression must either be null or a function");be.prototype=Object.create(se&&se.prototype,{constructor:{value:be,writable:!0,configurable:!0}}),Object.defineProperty(be,"prototype",{writable:!1}),se&&c(be,se)}function c(be,se){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(Le,Be){return Le.__proto__=Be,Le},c(be,se)}function u(be){var se=w();return function(){var Le=h(be),Be;if(se){var ot=h(this).constructor;Be=Reflect.construct(Le,arguments,ot)}else Be=Le.apply(this,arguments);return g(this,Be)}}function g(be,se){if(se&&(o(se)==="object"||typeof se=="function"))return se;if(se!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return f(be)}function f(be){if(be===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return be}function w(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}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<se;Le+=1)ye[Le]=be[Le]&255;return ye}function k(be){if(Je(be,Uint8Array)){var se=new Uint8Array(be);return O(se.buffer,se.byteOffset,se.byteLength)}return B(be)}function O(be,se,ye){if(se<0||be.byteLength<se)throw new RangeError('"offset" is outside of buffer bounds');if(be.byteLength<se+(ye||0))throw new RangeError('"length" is outside of buffer bounds');var Le;return se===void 0&&ye===void 0?Le=new Uint8Array(be):ye===void 0?Le=new Uint8Array(be,se):Le=new Uint8Array(be,se,ye),Object.setPrototypeOf(Le,b.prototype),Le}function N(be){if(b.isBuffer(be)){var se=_(be.length)|0,ye=S(se);return ye.length===0||be.copy(ye,0,0,se),ye}if(be.length!==void 0)return typeof be.length!="number"||De(be.length)?S(0):B(be);if(be.type==="Buffer"&&Array.isArray(be.data))return B(be.data)}function _(be){if(be>=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);ot<at;++ot)if(se[ot]!==ye[ot]){Le=se[ot],Be=ye[ot];break}return Le<Be?-1:Be<Le?1:0},b.isEncoding=function(se){switch(String(se).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},b.concat=function(se,ye){if(!Array.isArray(se))throw new TypeError('"list" argument must be an Array of Buffers');if(se.length===0)return b.alloc(0);var Le;if(ye===void 0)for(ye=0,Le=0;Le<se.length;++Le)ye+=se[Le].length;var Be=b.allocUnsafe(ye),ot=0;for(Le=0;Le<se.length;++Le){var at=se[Le];if(Je(at,Uint8Array))ot+at.length>Be.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;ye<se;ye+=2)J(this,ye,ye+1);return this},b.prototype.swap32=function(){var se=this.length;if(se%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var ye=0;ye<se;ye+=4)J(this,ye,ye+3),J(this,ye+1,ye+2);return this},b.prototype.swap64=function(){var se=this.length;if(se%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var ye=0;ye<se;ye+=8)J(this,ye,ye+7),J(this,ye+1,ye+6),J(this,ye+2,ye+5),J(this,ye+3,ye+4);return this},b.prototype.toString=function(){var se=this.length;return se===0?"":arguments.length===0?oe(this,0,se):Y.apply(this,arguments)},b.prototype.toLocaleString=b.prototype.toString,b.prototype.equals=function(se){if(!b.isBuffer(se))throw new TypeError("Argument must be a Buffer");return this===se?!0:b.compare(this,se)===0},b.prototype.inspect=function(){var se="",ye=p.h2;return se=this.toString("hex",0,ye).replace(/(.{2})/g,"$1 ").trim(),this.length>ye&&(se+=" ... "),"<Buffer "+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;Lt<It;++Lt)if(Bt[Lt]!==Gt[Lt]){at=Bt[Lt],wt=Gt[Lt];break}return at<wt?-1:wt<at?1:0};function te(be,se,ye,Le,Be){if(be.length===0)return-1;if(typeof ye=="string"?(Le=ye,ye=0):ye>2147483647?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;Bt<at;Bt++)if(It(be,Bt)===It(se,Gt===-1?0:Bt-Gt)){if(Gt===-1&&(Gt=Bt),Bt-Gt+1===wt)return Gt*ot}else Gt!==-1&&(Bt-=Bt-Gt),Gt=-1}else for(ye+wt>at&&(ye=at-wt),Bt=ye;Bt>=0;Bt--){for(var Lt=!0,Kt=0;Kt<wt;Kt++)if(It(be,Bt+Kt)!==It(se,Kt)){Lt=!1;break}if(Lt)return Bt}return-1}b.prototype.includes=function(se,ye,Le){return this.indexOf(se,ye,Le)!==-1},b.prototype.indexOf=function(se,ye,Le){return te(this,se,ye,Le,!0)},b.prototype.lastIndexOf=function(se,ye,Le){return te(this,se,ye,Le,!1)};function ce(be,se,ye,Le){ye=Number(ye)||0;var Be=be.length-ye;Le?(Le=Number(Le),Le>Be&&(Le=Be)):Le=Be;var ot=se.length;Le>ot/2&&(Le=ot/2);var at;for(at=0;at<Le;++at){var wt=parseInt(se.substr(at*2,2),16);if(De(wt))return at;be[ye+at]=wt}return at}function Q(be,se,ye,Le){return Vt(dt(se,be.length-ye),be,ye,Le)}function Z(be,se,ye,Le){return Vt(pt(se),be,ye,Le)}function j(be,se,ye,Le){return Vt(Mt(se),be,ye,Le)}function K(be,se,ye,Le){return Vt(At(se,be.length-ye),be,ye,Le)}b.prototype.write=function(se,ye,Le,Be){if(ye===void 0)Be="utf8",Le=this.length,ye=0;else if(Le===void 0&&typeof ye=="string")Be=ye,Le=this.length,ye=0;else if(isFinite(ye))ye=ye>>>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;Be<ye;){var ot=be[Be],at=null,wt=ot>239?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;Le<se;)ye+=String.fromCharCode.apply(String,be.slice(Le,Le+=q));return ye}function le(be,se,ye){var Le="";ye=Math.min(be.length,ye);for(var Be=se;Be<ye;++Be)Le+=String.fromCharCode(be[Be]&127);return Le}function ie(be,se,ye){var Le="";ye=Math.min(be.length,ye);for(var Be=se;Be<ye;++Be)Le+=String.fromCharCode(be[Be]);return Le}function he(be,se,ye){var Le=be.length;(!se||se<0)&&(se=0),(!ye||ye<0||ye>Le)&&(ye=Le);for(var Be="",ot=se;ot<ye;++ot)Be+=Ie[be[ot]];return Be}function me(be,se,ye){for(var Le=be.slice(se,ye),Be="",ot=0;ot<Le.length-1;ot+=2)Be+=String.fromCharCode(Le[ot]+Le[ot+1]*256);return Be}b.prototype.slice=function(se,ye){var Le=this.length;se=~~se,ye=ye===void 0?Le:~~ye,se<0?(se+=Le,se<0&&(se=0)):se>Le&&(se=Le),ye<0?(ye+=Le,ye<0&&(ye=0)):ye>Le&&(ye=Le),ye<se&&(ye=se);var Be=this.subarray(se,ye);return Object.setPrototypeOf(Be,b.prototype),Be};function Me(be,se,ye){if(be%1!==0||be<0)throw new RangeError("offset is not uint");if(be+se>ye)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<ye&&(ot*=256);)Be+=this[se+at]*ot;return Be},b.prototype.readUintBE=b.prototype.readUIntBE=function(se,ye,Le){se=se>>>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)<<BigInt(32))}),b.prototype.readBigUInt64BE=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*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)<<BigInt(32))+BigInt(ot)}),b.prototype.readIntLE=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<ye&&(ot*=256);)Be+=this[se+at]*ot;return ot*=128,Be>=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)<<BigInt(32))+BigInt(ye+this[++se]*Math.pow(2,8)+this[++se]*Math.pow(2,16)+this[++se]*Math.pow(2,24))}),b.prototype.readBigInt64BE=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<<24)+this[++se]*Math.pow(2,16)+this[++se]*Math.pow(2,8)+this[++se];return(BigInt(Be)<<BigInt(32))+BigInt(this[++se]*Math.pow(2,24)+this[++se]*Math.pow(2,16)+this[++se]*Math.pow(2,8)+Le)}),b.prototype.readFloatLE=function(se,ye){return se=se>>>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||se<ot)throw new RangeError('"value" argument is out of bounds');if(ye+Le>be.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<Le&&(at*=256);)this[ye+wt]=se/at&255;return ye+Le},b.prototype.writeUintBE=b.prototype.writeUIntBE=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=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<Le&&(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.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<Le&&(Be=Le),Be===Le||se.length===0||this.length===0)return 0;if(ye<0)throw new RangeError("targetStart out of bounds");if(Le<0||Le>=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<Be-Le&&(Be=se.length-ye+Le);var ot=Be-Le;return this===se&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(ye,Le,Be):Uint8Array.prototype.set.call(se,this.subarray(Le,Be),ye),ot},b.prototype.fill=function(se,ye,Le,Be){if(typeof se=="string"){if(typeof ye=="string"?(Be=ye,ye=0,Le=this.length):typeof Le=="string"&&(Be=Le,Le=this.length),Be!==void 0&&typeof Be!="string")throw new TypeError("encoding must be a string");if(typeof Be=="string"&&!b.isEncoding(Be))throw new TypeError("Unknown encoding: "+Be);if(se.length===1){var ot=se.charCodeAt(0);(Be==="utf8"&&ot<128||Be==="latin1")&&(se=ot)}}else typeof se=="number"?se=se&255:typeof se=="boolean"&&(se=Number(se));if(ye<0||this.length<ye||this.length<Le)throw new RangeError("Out of range index");if(Le<=ye)return this;ye=ye>>>0,Le=Le===void 0?this.length:Le>>>0,se||(se=0);var at;if(typeof se=="number")for(at=ye;at<Le;++at)this[at]=se;else{var wt=b.isBuffer(se)?se:b.from(se,Be),It=wt.length;if(It===0)throw new TypeError('The value "'+se+'" is invalid for argument "value"');for(at=0;at<Le-ye;++at)this[at+ye]=wt[at%It]}return this};var Ue={};function He(be,se,ye){Ue[be]=function(Le){l(ot,Le);var Be=u(ot);function ot(){var at;return r(this,ot),at=Be.call(this),Object.defineProperty(f(at),"message",{value:se.apply(f(at),arguments),writable:!0,configurable:!0}),at.name="".concat(at.name," [").concat(be,"]"),at.stack,delete at.name,at}return n(ot,[{key:"code",get:function(){return be},set:function(wt){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:wt,writable:!0})}},{key:"toString",value:function(){return"".concat(this.name," [").concat(be,"]: ").concat(this.message)}}]),ot}(ye)}He("ERR_BUFFER_OUT_OF_BOUNDS",function(be){return be?"".concat(be," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"},RangeError),He("ERR_INVALID_ARG_TYPE",function(be,se){return'The "'.concat(be,'" argument must be of type number. Received type ').concat(o(se))},TypeError),He("ERR_OUT_OF_RANGE",function(be,se,ye){var Le='The value of "'.concat(be,'" is out of range.'),Be=ye;return Number.isInteger(ye)&&Math.abs(ye)>Math.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||be<se){var at=typeof se=="bigint"?"n":"",wt;throw ot>3?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;at<Le;++at){if(ye=be.charCodeAt(at),ye>55295&&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<be.length;++ye)se.push(be.charCodeAt(ye)&255);return se}function At(be,se){for(var ye,Le,Be,ot=[],at=0;at<be.length&&!((se-=2)<0);++at)ye=be.charCodeAt(at),Le=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<Le&&!(Be+ye>=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;l<c;++l)t[l]=n[l],r[n.charCodeAt(l)]=l;r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63;function u(M){var T=M.length;if(T%4>0)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<E;y+=4)T=r[M.charCodeAt(y)]<<18|r[M.charCodeAt(y+1)]<<12|r[M.charCodeAt(y+2)]<<6|r[M.charCodeAt(y+3)],b[a++]=T>>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;b<C;b+=3)x=(M[b]<<16&16711680)+(M[b+1]<<8&65280)+(M[b+2]&255),S.push(h(x));return S.join("")}function d(M){for(var T,C=M.length,x=C%3,S=[],b=16383,a=0,E=C-x;a<E;a+=b)S.push(o(M,a,a+b>E?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 <https://feross.org/opensource> */p.read=function(t,r,s,n,l){var c,u,g=l*8-n-1,f=(1<<g)-1,w=f>>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<<w)-1,o=h>>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<<l|g,w+=l;w>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<f.length;++w)f[w].flush(g)},c.idle=function(g){for(var f=this._controllerList,w=0;w<f.length;++w)f[w].idle(g)},c.lookAt=function(g,f,w,h){for(var o=this._controllerList,d=0;d<o.length;++d)o[d].lookAt(g,f,w,h)},c.rotate=function(g,f,w,h){for(var o=this._controllerList,d=0;d<o.length;++d)o[d].rotate(g,f,w,h)},c.pan=function(g,f,w,h){for(var o=this._controllerList,d=0;d<o.length;++d)o[d].pan(g,f,w,h)},c.translate=function(g,f,w,h){for(var o=this._controllerList,d=0;d<o.length;++d)o[d].translate(g,f,w,h)},c.setMatrix=function(g,f){for(var w=this._controllerList,h=0;h<w.length;++h)w[h].setMatrix(g,f)},c.setDistanceLimits=function(g,f){for(var w=this._controllerList,h=0;h<w.length;++h)w[h].setDistanceLimits(g,f)},c.setDistance=function(g,f){for(var w=this._controllerList,h=0;h<w.length;++h)w[h].setDistance(g,f)},c.recalcMatrix=function(g){this._active.recalcMatrix(g)},c.getDistance=function(g){return this._active.getDistance(g)},c.getDistanceLimits=function(g){return this._active.getDistanceLimits(g)},c.lastT=function(){return this._active.lastT()},c.setMode=function(g){if(g!==this._mode){var f=this._controllerNames.indexOf(g);if(!(f<0)){var w=this._active,h=this._controllerList[f],o=Math.max(w.lastT(),h.lastT());w.recalcMatrix(o),h.setMatrix(o,w.computedMatrix),this._active=h,this._mode=g,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}}},c.getMode=function(){return this._mode};function u(g){g=g||{};var f=g.eye||[0,0,1],w=g.center||[0,0,0],h=g.up||[0,1,0],o=g.distanceLimits||[0,1/0],d=g.mode||"turntable",M=r(),T=s(),C=n();return M.setDistanceLimits(o[0],o[1]),M.lookAt(0,f,w,h),T.setDistanceLimits(o[0],o[1]),T.lookAt(0,f,w,h),C.setDistanceLimits(o[0],o[1]),C.lookAt(0,f,w,h),new l({turntable:M,orbit:T,matrix:C},d)}},8126:function(v,p,t){var r=typeof WeakMap>"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;g<l.length;++g)u[g]=l[g];for(var g=0;g<=l.length;++g){for(var f=l.length;f<=c;++f){for(var w=new Array(c),h=0;h<c;++h)w[h]=Math.pow(f+1-g,h);u[f]=w}var o=r.apply(void 0,u);if(o)return!0}return!1}function n(l){var c=l.length;if(c===0)return[];if(c===1)return[0];for(var u=l[0].length,g=[l[0]],f=[0],w=1;w<c;++w){if(g.push(l[w]),!s(g,u)){g.pop();continue}if(f.push(w),f.length===u+1)return f}return f}},4653:function(v,p,t){v.exports=n;var r=t(4419),s=t(1778);function n(l,c){return r(c).filter(function(u){for(var g=new Array(u.length),f=0;f<u.length;++f)g[f]=c[u[f]];return s(g)*l<1})}},2350:function(v,p,t){v.exports=n;var r=t(4653),s=t(8691);function n(l,c){return s(r(l,c))}},7896:function(v){v.exports=function(t){return atob(t)}},957:function(v,p,t){v.exports=n;var r=t(6606);function s(l){for(var c=0,u=0;u<l.length;++u)c+=l[u];return c}function n(l,c){for(var u=c.length,g=new Array(u+1),f=0;f<u;++f){for(var w=new Array(u+1),h=0;h<=u;++h)w[h]=l[h][f];g[f]=w}g[u]=new Array(u+1);for(var f=0;f<=u;++f)g[u][f]=1;for(var o=new Array(u+1),f=0;f<u;++f)o[f]=c[f];o[u]=1;var d=r(g,o),M=s(d[u+1]);M===0&&(M=1);for(var T=new Array(u+1),f=0;f<=u;++f)T[f]=s(d[f])/M;return T}},1539:function(v,p,t){var r=t(8524);v.exports=s;function s(n,l){return r(n[0].mul(l[1]).add(l[0].mul(n[1])),n[1].mul(l[1]))}},8846:function(v){v.exports=p;function p(t,r){return t[0].mul(r[1]).cmp(r[0].mul(t[1]))}},9189:function(v,p,t){var r=t(8524);v.exports=s;function s(n,l){return r(n[0].mul(l[1]),n[1].mul(l[0]))}},5125:function(v,p,t){var r=t(234),s=t(3218),n=t(5514),l=t(2813),c=t(8524),u=t(9189);v.exports=g;function g(f,w){if(r(f))return w?u(f,g(w)):[f[0].clone(),f[1].clone()];var h=0,o,d;if(s(f))o=f.clone();else if(typeof f=="string")o=l(f);else{if(f===0)return[n(0),n(1)];if(f===Math.floor(f))o=n(f);else{for(;f!==Math.floor(f);)f=f*Math.pow(2,256),h-=256;o=n(f)}}if(r(w))o.mul(w[1]),d=w[0].clone();else if(s(w))d=w.clone();else if(typeof w=="string")d=l(w);else if(!w)d=n(1);else if(w===Math.floor(w))d=n(w);else{for(;w!==Math.floor(w);)w=w*Math.pow(2,256),h+=256;d=n(w)}return h>0?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;g<l;g++){var f=c[g];u+=f*Math.pow(67108864,g)}return r(n)*u}},1112:function(v,p,t){var r=t(8362),s=t(2288).countTrailingZeros;v.exports=n;function n(l){var c=s(r.lo(l));if(c<32)return c;var u=s(r.hi(l));return u>20?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<<t-1,p.sign=function(n){return(n>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)&-(n<l)},p.max=function(n,l){return n^(n^l)&-(n<l)},p.isPow2=function(n){return!(n&n-1)&&!!n},p.log2=function(n){var l,c;return l=(n>65535)<<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<<g&255}})(s),p.reverse=function(n){return s[n&255]<<24|s[n>>>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<this.length;J++)this.words[J]=0;var te,ae,ce=0;if(Y==="be")for(J=_.length-1,te=0;J>=0;J-=3)ae=_[J]|_[J-1]<<8|_[J-2]<<16,this.words[te]|=ae<<ce&67108863,this.words[te+1]=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<<ce&67108863,this.words[te+1]=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<this.length;J++)this.words[J]=0;var te=0,ae=0,ce;if(Y==="be")for(J=_.length-1;J>=U;J-=2)ce=f(_,U,J)<<te,this.words[ae]|=ce&67108863,te>=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)<<te,this.words[ae]|=ce&67108863,te>=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<te;ae++){var ce=N.charCodeAt(ae)-48;J*=Y,ce>=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;j<Q;j+=J)Z=w(_,j,j+J,U),this.imuln(te),this.words[0]+Z<67108864?this.words[0]+=Z:this._iaddn(Z);if(ce!==0){var K=1;for(Z=w(_,j,_.length,U),j=0;j<ce;j++)K*=U;this.imuln(K),this.words[0]+Z<67108864?this.words[0]+=Z:this._iaddn(Z)}this.strip()},c.prototype.copy=function(_){_.words=new Array(this.length);for(var U=0;U<this.length;U++)_.words[U]=this.words[U];_.length=this.length,_.negative=this.negative,_.red=this.red},c.prototype.clone=function(){var _=new c(null);return this.copy(_),_},c.prototype._expand=function(_){for(;this.length<_;)this.words[this.length++]=0;return this},c.prototype.strip=function(){for(;this.length>1&&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?"<BN-R: ":"<BN: ")+this.toString(16)+">"};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<this.length;ae++){var ce=this.words[ae],Q=((ce<<J|te)&16777215).toString(16);te=ce>>>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<te;Z++)ce[Z]=0}else{for(Z=0;Z<te-J;Z++)ce[Z]=0;for(Z=0;!j.isZero();Z++)Q=j.andln(255),j.iushrn(8),ce[te-Z-1]=Q}return ce},Math.clz32?c.prototype._countBits=function(_){return 32-Math.clz32(_)}:c.prototype._countBits=function(_){var U=_,Y=0;return U>=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)>>>J}return _}c.prototype.zeroBits=function(){if(this.isZero())return 0;for(var _=0,U=0;U<this.length;U++){var Y=this._zeroBits(this.words[U]);if(_+=Y,Y!==26)break}return _},c.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},c.prototype.toTwos=function(_){return this.negative!==0?this.abs().inotn(_).iaddn(1):this.clone()},c.prototype.fromTwos=function(_){return this.testn(_-1)?this.notn(_).iaddn(1).ineg():this.clone()},c.prototype.isNeg=function(){return this.negative!==0},c.prototype.neg=function(){return this.clone().ineg()},c.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},c.prototype.iuor=function(_){for(;this.length<_.length;)this.words[this.length++]=0;for(var U=0;U<_.length;U++)this.words[U]=this.words[U]|_.words[U];return this.strip()},c.prototype.ior=function(_){return n((this.negative|_.negative)===0),this.iuor(_)},c.prototype.or=function(_){return this.length>_.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<U.length;Y++)this.words[Y]=this.words[Y]&_.words[Y];return this.length=U.length,this.strip()},c.prototype.iand=function(_){return n((this.negative|_.negative)===0),this.iuand(_)},c.prototype.and=function(_){return this.length>_.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<Y.length;J++)this.words[J]=U.words[J]^Y.words[J];if(this!==U)for(;J<U.length;J++)this.words[J]=U.words[J];return this.length=U.length,this.strip()},c.prototype.ixor=function(_){return n((this.negative|_.negative)===0),this.iuxor(_)},c.prototype.xor=function(_){return this.length>_.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;J<U;J++)this.words[J]=~this.words[J]&67108863;return Y>0&&(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<<J:this.words[Y]=this.words[Y]&~(1<<J),this.strip()},c.prototype.iadd=function(_){var U;if(this.negative!==0&&_.negative===0)return this.negative=0,U=this.isub(_),this.negative^=1,this._normSign();if(this.negative===0&&_.negative!==0)return _.negative=0,U=this.isub(_),_.negative=1,U._normSign();var Y,J;this.length>_.length?(Y=this,J=_):(Y=_,J=this);for(var te=0,ae=0;ae<J.length;ae++)U=(Y.words[ae]|0)+(J.words[ae]|0)+te,this.words[ae]=U&67108863,te=U>>>26;for(;te!==0&&ae<Y.length;ae++)U=(Y.words[ae]|0)+te,this.words[ae]=U&67108863,te=U>>>26;if(this.length=Y.length,te!==0)this.words[this.length]=te,this.length++;else if(Y!==this)for(;ae<Y.length;ae++)this.words[ae]=Y.words[ae];return this},c.prototype.add=function(_){var U;return _.negative!==0&&this.negative===0?(_.negative=0,U=this.sub(_),_.negative^=1,U):_.negative===0&&this.negative!==0?(this.negative=0,U=_.sub(this),this.negative=1,U):this.length>_.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<te.length;ce++)U=(J.words[ce]|0)-(te.words[ce]|0)+ae,ae=U>>26,this.words[ce]=U&67108863;for(;ae!==0&&ce<J.length;ce++)U=(J.words[ce]|0)+ae,ae=U>>26,this.words[ce]=U&67108863;if(ae===0&&ce<J.length&&J!==this)for(;ce<J.length;ce++)this.words[ce]=J.words[ce];return this.length=Math.max(this.length,ce),J!==this&&(this.negative=1),this.strip()},c.prototype.sub=function(_){return this.clone().isub(_)};function T(N,_,U){U.negative=_.negative^N.negative;var Y=N.length+_.length|0;U.length=Y,Y=Y-1|0;var J=N.words[0]|0,te=_.words[0]|0,ae=J*te,ce=ae&67108863,Q=ae/67108864|0;U.words[0]=ce;for(var Z=1;Z<Y;Z++){for(var j=Q>>>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<U.length-1;te++){var ae=J;J=0;for(var ce=Y&67108863,Q=Math.min(te,_.length-1),Z=Math.max(0,te-N.length+1);Z<=Q;Z++){var j=te-Z,K=N.words[j]|0,ee=_.words[Z]|0,oe=K*ee,q=oe&67108863;ae=ae+(oe/67108864|0)|0,q=q+ce|0,ce=q&67108863,ae=ae+(q>>>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<U;te++)J|=(_&1)<<U-te-1,_>>=1;return J},b.prototype.permute=function(_,U,Y,J,te,ae){for(var ce=0;ce<ae;ce++)J[ce]=U[_[ce]],te[ce]=Y[_[ce]]},b.prototype.transform=function(_,U,Y,J,te,ae){this.permute(ae,_,U,Y,J,te);for(var ce=1;ce<te;ce<<=1)for(var Q=ce<<1,Z=Math.cos(2*Math.PI/Q),j=Math.sin(2*Math.PI/Q),K=0;K<te;K+=Q)for(var ee=Z,oe=j,q=0;q<ce;q++){var $=Y[K+q],le=J[K+q],ie=Y[K+q+ce],he=J[K+q+ce],me=ee*ie-oe*he;he=ee*he+oe*ie,ie=me,Y[K+q]=$+ie,J[K+q]=le+he,Y[K+q+ce]=$-ie,J[K+q+ce]=le-he,q!==Q&&(me=Z*ee-j*oe,oe=Z*oe+j*ee,ee=me)}},b.prototype.guessLen13b=function(_,U){var Y=Math.max(U,_)|1,J=Y&1,te=0;for(Y=Y/2|0;Y;Y=Y>>>1)te++;return 1<<te+1+J},b.prototype.conjugate=function(_,U,Y){if(!(Y<=1))for(var J=0;J<Y/2;J++){var te=_[J];_[J]=_[Y-J-1],_[Y-J-1]=te,te=U[J],U[J]=-U[Y-J-1],U[Y-J-1]=-te}},b.prototype.normalize13b=function(_,U){for(var Y=0,J=0;J<U/2;J++){var te=Math.round(_[2*J+1]/U)*8192+Math.round(_[2*J]/U)+Y;_[J]=te&67108863,te<67108864?Y=0:Y=te/67108864|0}return _},b.prototype.convert13b=function(_,U,Y,J){for(var te=0,ae=0;ae<U;ae++)te=te+(_[ae]|0),Y[2*ae]=te&8191,te=te>>>13,Y[2*ae+1]=te&8191,te=te>>>13;for(ae=2*U;ae<J;++ae)Y[ae]=0;n(te===0),n((te&-8192)===0)},b.prototype.stub=function(_){for(var U=new Array(_),Y=0;Y<_;Y++)U[Y]=0;return U},b.prototype.mulp=function(_,U,Y){var J=2*this.guessLen13b(_.length,U.length),te=this.makeRBT(J),ae=this.stub(J),ce=new Array(J),Q=new Array(J),Z=new Array(J),j=new Array(J),K=new Array(J),ee=new Array(J),oe=Y.words;oe.length=J,this.convert13b(_.words,_.length,ce,J),this.convert13b(U.words,U.length,j,J),this.transform(ce,ae,Q,Z,J,te),this.transform(j,ae,K,ee,J,te);for(var q=0;q<J;q++){var $=Q[q]*K[q]-Z[q]*ee[q];Z[q]=Q[q]*ee[q]+Z[q]*K[q],Q[q]=$}return this.conjugate(Q,Z,J),this.transform(Q,Z,oe,ae,J,te),this.conjugate(oe,ae,J),this.normalize13b(oe,J),Y.negative=_.negative^U.negative,Y.length=_.length+U.length,Y.strip()},c.prototype.mul=function(_){var U=new c(null);return U.words=new Array(this.length+_.length),this.mulTo(_,U)},c.prototype.mulf=function(_){var U=new c(null);return U.words=new Array(this.length+_.length),S(this,_,U)},c.prototype.imul=function(_){return this.clone().mulTo(_,this)},c.prototype.imuln=function(_){n(typeof _=="number"),n(_<67108864);for(var U=0,Y=0;Y<this.length;Y++){var J=(this.words[Y]|0)*_,te=(J&67108863)+(U&67108863);U>>=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<U.length&&U[J]===0;J++,Y=Y.sqr());if(++J<U.length)for(var te=Y.sqr();J<U.length;J++,te=te.sqr())U[J]!==0&&(Y=Y.mul(te));return Y},c.prototype.iushln=function(_){n(typeof _=="number"&&_>=0);var U=_%26,Y=(_-U)/26,J=67108863>>>26-U<<26-U,te;if(U!==0){var ae=0;for(te=0;te<this.length;te++){var ce=this.words[te]&J,Q=(this.words[te]|0)-ce<<U;this.words[te]=Q|ae,ae=ce>>>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<Y;te++)this.words[te]=0;this.length+=Y}return this.strip()},c.prototype.ishln=function(_){return n(this.negative===0),this.iushln(_)},c.prototype.iushrn=function(_,U,Y){n(typeof _=="number"&&_>=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<<te,Q=Y;if(J-=ae,J=Math.max(0,J),Q){for(var Z=0;Z<ae;Z++)Q.words[Z]=this.words[Z];Q.length=ae}if(ae!==0)if(this.length>ae)for(this.length-=ae,Z=0;Z<this.length;Z++)this.words[Z]=this.words[Z+ae];else this.words[0]=0,this.length=1;var j=0;for(Z=this.length-1;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<<U;if(this.length<=Y)return!1;var te=this.words[Y];return!!(te&J)},c.prototype.imaskn=function(_){n(typeof _=="number"&&_>=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<<U;this.words[this.length-1]&=J}return this.strip()},c.prototype.maskn=function(_){return this.clone().imaskn(_)},c.prototype.iaddn=function(_){return n(typeof _=="number"),n(_<67108864),_<0?this.isubn(-_):this.negative!==0?this.length===1&&(this.words[0]|0)<_?(this.words[0]=_-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(_),this.negative=1,this):this._iaddn(_)},c.prototype._iaddn=function(_){this.words[0]+=_;for(var U=0;U<this.length&&this.words[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<this.length&&this.words[U]<0;U++)this.words[U]+=67108864,this.words[U+1]-=1;return this.strip()},c.prototype.addn=function(_){return this.clone().iaddn(_)},c.prototype.subn=function(_){return this.clone().isubn(_)},c.prototype.iabs=function(){return this.negative=0,this},c.prototype.abs=function(){return this.clone().iabs()},c.prototype._ishlnsubmul=function(_,U,Y){var J=_.length+Y,te;this._expand(J);var ae,ce=0;for(te=0;te<_.length;te++){ae=(this.words[te+Y]|0)+ce;var Q=(_.words[te]|0)*U;ae-=Q&67108863,ce=(ae>>26)-(Q/67108864|0),this.words[te+Y]=ae&67108863}for(;te<this.length-Y;te++)ae=(this.words[te+Y]|0)+ce,ce=ae>>26,this.words[te+Y]=ae&67108863;if(ce===0)return this.strip();for(n(ce===-1),ce=0,te=0;te<this.length;te++)ae=-(this.words[te]|0)+ce,ce=ae>>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<Z.length;j++)Z.words[j]=0}var K=J.clone()._ishlnsubmul(te,1,Q);K.negative===0&&(J=K,Z&&(Z.words[Q]=1));for(var ee=Q-1;ee>=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<<U;if(this.length<=Y)return this._expand(Y+1),this.words[Y]|=J,this;for(var te=J,ae=Y;te!==0&&ae<this.length;ae++){var ce=this.words[ae]|0;ce+=te,te=ce>>>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){J<te?U=-1:J>te&&(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=Y<this.n?-1:U.ucmp(this.p);return J===0?(U.words[0]=0,U.length=1):J>0?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<J;te++)U.words[te]=_.words[te];if(U.length=J,_.length<=9){_.words[0]=0,_.length=1;return}var ae=_.words[9];for(U.words[U.length++]=ae&Y,te=10;te<_.length;te++){var ce=_.words[te]|0;_.words[te-10]=(ce&Y)<<4|ae>>>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($<oe);var le=this.pow(j,new c(1).iushln(oe-$-1));K=K.redMul(le),j=le.redSqr(),ee=ee.redMul(j),oe=$}return K},k.prototype.invm=function(_){var U=_._invmp(this.m);return U.negative!==0?(U.negative=0,this.imod(U).redNeg()):this.imod(U)},k.prototype.pow=function(_,U){if(U.isZero())return new c(1).toRed(this);if(U.cmpn(1)===0)return _.clone();var Y=4,J=new Array(1<<Y);J[0]=new c(1).toRed(this),J[1]=_;for(var te=2;te<J.length;te++)J[te]=this.mul(J[te-1],_);var ae=J[0],ce=0,Q=0,Z=U.bitLength()%26;for(Z===0&&(Z=26),te=U.length-1;te>=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<l;++r)c+=t[r].length;var u=new Array(c),g=0;for(r=0;r<l;++r){var f=t[r],w=f.length;for(s=0;s<w;++s){var h=u[g++]=new Array(w-1),o=0;for(n=0;n<w;++n)n!==s&&(h[o++]=f[n]);if(s&1){var d=h[1];h[1]=h[0],h[0]=d}}}return u}},2569:function(v,p,t){v.exports=o;var r=t(5306),s=t(1390),n=t(2337);function l(d,M){for(var T=0;T<d;++T)if(!(M[T]<=M[T+d]))return!0;return!1}function c(d,M,T,C){for(var x=0,S=0,b=0,a=d.length;b<a;++b){var E=d[b];if(!l(M,E)){for(var y=0;y<2*M;++y)T[x++]=E[y];C[S++]=b}}return S}function u(d,M,T,C){var x=d.length,S=M.length;if(!(x<=0||S<=0)){var b=d[0].length>>>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;b<h;++b,a+=S){var E=o[g+a],y=o[g+a+u],z=d[b];e:for(var I=M,B=S*M;I<T;++I,B+=S){var k=C[g+B],O=C[g+B+u],N=x[I];if(!(O<E||y<k)){for(var _=g+1;_<u;++_){var U=o[_+a],Y=o[_+u+a],J=C[_+B],te=C[_+u+B];if(Y<J||te<U)continue e}var ae=f(z,N);if(ae!==void 0)return ae}}}}function l(u,g,f,w,h,o,d,M,T,C,x){for(var S=2*u,b=M,a=S*M;b<T;++b,a+=S){var E=C[g+a],y=C[g+a+u],z=x[b];e:for(var I=w,B=S*w;I<h;++I,B+=S){var k=o[g+B],O=o[g+B+u],N=d[I];if(!(y<k||O<E)){for(var _=g+1;_<u;++_){var U=o[_+B],Y=o[_+u+B],J=C[_+a],te=C[_+u+a];if(Y<J||te<U)continue e}var ae=f(N,z);if(ae!==void 0)return ae}}}}function c(u,g,f,w,h,o,d,M,T,C,x){return h-w>T-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;E<d;++E,y+=a){var z=M[w+y],I=M[w+y+f],B=T[E];e:for(var k=C,O=a*C;k<x;++k,O+=a){var N=S[w+O],_=b[k];if(!(N<=z||I<N)){for(var U=w+1;U<f;++U){var Y=M[U+y],J=M[U+f+y],te=S[U+O],ae=S[U+f+O];if(J<te||ae<Y)continue e}var ce=h(_,B);if(ce!==void 0)return ce}}}}function l(f,w,h,o,d,M,T,C,x,S,b){for(var a=2*f,E=o,y=a*o;E<d;++E,y+=a){var z=M[w+y],I=M[w+y+f],B=T[E];e:for(var k=C,O=a*C;k<x;++k,O+=a){var N=S[w+O],_=b[k];if(!(N<z||I<N)){for(var U=w+1;U<f;++U){var Y=M[U+y],J=M[U+f+y],te=S[U+O],ae=S[U+f+O];if(J<te||ae<Y)continue e}var ce=h(B,_);if(ce!==void 0)return ce}}}}function c(f,w,h,o,d,M,T,C,x,S,b){for(var a=2*f,E=C,y=a*C;E<x;++E,y+=a){var z=S[w+y],I=b[E];e:for(var B=o,k=a*o;B<d;++B,k+=a){var O=M[w+k],N=M[w+k+f],_=T[B];if(!(z<=O||N<z)){for(var U=w+1;U<f;++U){var Y=M[U+k],J=M[U+f+k],te=S[U+y],ae=S[U+f+y];if(J<te||ae<Y)continue e}var ce=h(I,_);if(ce!==void 0)return ce}}}}function u(f,w,h,o,d,M,T,C,x,S,b){for(var a=2*f,E=C,y=a*C;E<x;++E,y+=a){var z=S[w+y],I=b[E];e:for(var B=o,k=a*o;B<d;++B,k+=a){var O=M[w+k],N=M[w+k+f],_=T[B];if(!(z<O||N<z)){for(var U=w+1;U<f;++U){var Y=M[U+k],J=M[U+f+k],te=S[U+y],ae=S[U+f+y];if(J<te||ae<Y)continue e}var ce=h(_,I);if(ce!==void 0)return ce}}}}function g(f,w,h,o,d,M,T,C,x,S,b,a){return M-d>S-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("lo<p0"),C=f("hi<=p0"),x=f("lo<=p0&&p0<=hi"),S=f("lo<p0&&p0<=hi"),b=6,a=2,E=1024,y=r.mallocInt32(E),z=r.mallocDouble(E);function I(_,U){var Y=8*s.log2(U+1)*(_+1)|0,J=s.nextPow2(b*Y);y.length<J&&(r.free(y),y=r.mallocInt32(J));var te=s.nextPow2(a*Y);z.length<te&&(r.free(z),z=r.mallocDouble(te))}function B(_,U,Y,J,te,ae,ce,Q,Z){var j=b*_;y[j]=U,y[j+1]=Y,y[j+2]=J,y[j+3]=te,y[j+4]=ae,y[j+5]=ce;var K=a*_;z[K]=Q,z[K+1]=Z}function k(_,U,Y,J,te,ae,ce,Q,Z,j,K){var ee=2*_,oe=Z*ee,q=j[oe+U];e:for(var $=te,le=te*ee;$<ae;++$,le+=ee){var ie=ce[le+U],he=ce[le+U+_];if(!(q<ie||he<q)&&!(J&&q===ie)){for(var me=Q[$],Me=U+1;Me<_;++Me){var ie=ce[le+Me],he=ce[le+Me+_],Te=j[oe+Me],Oe=j[oe+Me+_];if(he<Te||Oe<ie)continue e}var Ne;if(J?Ne=Y(K,me):Ne=Y(me,K),Ne!==void 0)return Ne}}}function O(_,U,Y,J,te,ae,ce,Q,Z,j){var K=2*_,ee=Q*K,oe=Z[ee+U];e:for(var q=J,$=J*K;q<te;++q,$+=K){var le=ce[q];if(le!==j){var ie=ae[$+U],he=ae[$+U+_];if(!(oe<ie||he<oe)){for(var me=U+1;me<_;++me){var ie=ae[$+me],he=ae[$+me+_],Me=Z[ee+me],Te=Z[ee+me+_];if(he<Me||Te<ie)continue e}var Oe=Y(le,j);if(Oe!==void 0)return Oe}}}}function N(_,U,Y,J,te,ae,ce,Q,Z){I(_,J+ce);var j=0,K=2*_,ee;for(B(j++,0,0,J,0,ce,Y?16:0,-1/0,1/0),Y||B(j++,0,0,ce,0,J,1,-1/0,1/0);j>0;){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)<o){if(ee=u.scanComplete(_,q,U,$,le,xe,Se,ie,he,Ue,He),ee!==void 0)return ee;continue}}else if(_*Math.min(Fe,Ge)<w){if(ee=l(_,q,U,Ne,$,le,xe,Se,ie,he,Ue,He),ee!==void 0)return ee;continue}else if(_*Fe*Ge<h){if(ee=u.scanBipartite(_,q,U,Ne,$,le,xe,Se,ie,he,Ue,He),ee!==void 0)return ee;continue}var nt=d(_,q,$,le,xe,Se,Te,Oe);if($<nt)if(_*(nt-$)<w){if(ee=c(_,q+1,U,$,nt,xe,Se,ie,he,Ue,He),ee!==void 0)return ee}else if(q===_-2){if(Ne?ee=u.sweepBipartite(_,U,ie,he,Ue,He,$,nt,xe,Se):ee=u.sweepBipartite(_,U,$,nt,xe,Se,ie,he,Ue,He),ee!==void 0)return ee}else B(j++,q+1,$,nt,ie,he,Ne,-1/0,1/0),B(j++,q+1,ie,he,$,nt,Ne^1,-1/0,1/0);if(nt<le){var qe=g(_,q,ie,he,Ue,He),$e=Ue[K*qe+q],et=M(_,q,qe,he,Ue,He,$e);if(et<he&&B(j++,q,nt,le,et,he,(Ne|4)+(Ee?16:0),$e,Oe),ie<qe&&B(j++,q,nt,le,ie,qe,(Ne|2)+(Ee?16:0),Te,$e),qe+1===et){if(Ee?ee=O(_,q,U,nt,le,xe,Se,qe,Ue,He[qe]):ee=k(_,q,U,Ne,nt,le,xe,Se,qe,Ue,He[qe]),ee!==void 0)return ee}else if(qe<et){var ct;if(Ee){if(ct=x(_,q,nt,le,xe,Se,$e),nt<ct){var dt=M(_,q,nt,ct,xe,Se,$e);if(q===_-2){if(nt<dt&&(ee=u.sweepComplete(_,U,nt,dt,xe,Se,qe,et,Ue,He),ee!==void 0)||dt<ct&&(ee=u.sweepBipartite(_,U,dt,ct,xe,Se,qe,et,Ue,He),ee!==void 0))return ee}else nt<dt&&B(j++,q+1,nt,dt,qe,et,16,-1/0,1/0),dt<ct&&(B(j++,q+1,dt,ct,qe,et,0,-1/0,1/0),B(j++,q+1,qe,et,dt,ct,1,-1/0,1/0))}}else Ne?ct=S(_,q,nt,le,xe,Se,$e):ct=x(_,q,nt,le,xe,Se,$e),nt<ct&&(q===_-2?Ne?ee=u.sweepBipartite(_,U,qe,et,Ue,He,nt,ct,xe,Se):ee=u.sweepBipartite(_,U,nt,ct,xe,Se,qe,et,Ue,He):(B(j++,q+1,nt,ct,qe,et,Ne,-1/0,1/0),B(j++,q+1,qe,et,nt,ct,Ne^1,-1/0,1/0)))}}}}}},2464:function(v,p,t){v.exports=c;var r=t(122),s=r("lo<p0"),n=8;function l(u,g,f,w,h,o){for(var d=2*u,M=d*(f+1)+g,T=f+1;T<w;++T,M+=d)for(var C=h[M],x=T,S=d*(T-1);x>f&&h[S+g]>C;--x,S-=d){for(var b=S,a=S+d,E=0;E<d;++E,++b,++a){var y=h[b];h[b]=h[a],h[a]=y}var z=o[x];o[x]=o[x-1],o[x-1]=z}}function c(u,g,f,w,h,o){if(w<=f+1)return f;for(var d=f,M=w,T=w+f>>>1,C=2*u,x=T,S=h[C*T+g];d<M;){if(M-d<n){l(u,g,d,M,h,o),S=h[C*T+g];break}var b=M-d,a=Math.random()*b+d|0,E=h[C*a+g],y=Math.random()*b+d|0,z=h[C*y+g],I=Math.random()*b+d|0,B=h[C*I+g];E<=z?B>=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<C;++k,++N,++_){var O=h[N];h[N]=h[_],h[_]=O}var U=o[M-1];o[M-1]=o[x],o[x]=U,x=s(u,g,d,M-1,h,o,S);for(var N=C*(M-1),_=C*x,k=0;k<C;++k,++N,++_){var O=h[N];h[N]=h[_],h[_]=O}var U=o[M-1];if(o[M-1]=o[x],o[x]=U,T<x){for(M=x-1;d<M&&h[C*(M-1)+g]===S;)M-=1;M+=1}else if(x<T)for(d=x+1;d<M&&h[C*d+g]===S;)d+=1;else break}return s(u,g,f,T,h,o,h[C*T+g])}},122:function(v){v.exports=t;var p={"lo===p0":r,"lo<p0":s,"lo<=p0":n,"hi<=p0":l,"lo<p0&&p0<=hi":u,"lo<=p0&&p0<=hi":c,"!(lo>=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(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 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(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 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(b<T)break;if(b===T&&a<C)break;o[S]=b,o[S+1]=a,S-=2}o[S]=T,o[S+1]=C}}function s(w,h,o){w*=2,h*=2;var d=o[w],M=o[w+1];o[w]=o[h],o[w+1]=o[h+1],o[h]=d,o[h+1]=M}function n(w,h,o){w*=2,h*=2,o[w]=o[h],o[w+1]=o[h+1]}function l(w,h,o,d){w*=2,h*=2,o*=2;var M=d[w],T=d[w+1];d[w]=d[h],d[w+1]=d[h+1],d[h]=d[o],d[h+1]=d[o+1],d[o]=M,d[o+1]=T}function c(w,h,o,d,M){w*=2,h*=2,M[w]=M[h],M[h]=o,M[w+1]=M[h+1],M[h+1]=d}function u(w,h,o){w*=2,h*=2;var d=o[w],M=o[h];return d<M?!1:d===M?o[w+1]>o[h+1]:!0}function g(w,h,o,d){w*=2;var M=d[w];return M<h?!0:M===h?d[w+1]<o:!1}function f(w,h,o){var d=(h-w+1)/6|0,M=w+d,T=h-d,C=w+h>>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<oe)break;continue}c(w,I-1,O,N,o),c(h,B+1,_,U,o),I-2-w<=p?r(w,I-2,o):f(w,I-2,o),h-(B+2)<=p?r(B+2,h,o):f(B+2,h,o),B-I<=p?r(I,B,o):f(I,B,o)}},1390:function(v,p,t){v.exports={init:M,sweepBipartite:x,sweepComplete:S,scanBipartite:b,scanComplete:a};var r=t(5306),s=t(2288),n=t(309),l=1<<28,c=1024,u=r.mallocInt32(c),g=r.mallocInt32(c),f=r.mallocInt32(c),w=r.mallocInt32(c),h=r.mallocInt32(c),o=r.mallocInt32(c),d=r.mallocDouble(c*8);function M(E){var y=s.nextPow2(E);u.length<y&&(r.free(u),u=r.mallocInt32(y)),g.length<y&&(r.free(g),g=r.mallocInt32(y)),f.length<y&&(r.free(f),f=r.mallocInt32(y)),w.length<y&&(r.free(w),w=r.mallocInt32(y)),h.length<y&&(r.free(h),h=r.mallocInt32(y)),o.length<y&&(r.free(o),o=r.mallocInt32(y));var z=8*y;d.length<z&&(r.free(d),d=r.mallocDouble(z))}function T(E,y,z,I){var B=y[I],k=E[z-1];E[B]=k,y[k]=B}function C(E,y,z,I){E[z]=I,y[I]=z}function x(E,y,z,I,B,k,O,N,_,U){for(var Y=0,J=2*E,te=E-1,ae=J-1,ce=z;ce<I;++ce){var Q=k[ce],Z=J*ce;d[Y++]=B[Z+te],d[Y++]=-(Q+1),d[Y++]=B[Z+ae],d[Y++]=Q}for(var ce=O;ce<N;++ce){var Q=U[ce]+l,j=J*ce;d[Y++]=_[j+te],d[Y++]=-Q,d[Y++]=_[j+ae],d[Y++]=Q}var K=Y>>>1;n(d,K);for(var ee=0,oe=0,ce=0;ce<K;++ce){var q=d[2*ce+1]|0;if(q>=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;$<ee;++$){var le=y(u[$],q);if(le!==void 0)return le}C(f,w,oe++,q)}else{q=-q-1|0;for(var $=0;$<oe;++$){var le=y(q,f[$]);if(le!==void 0)return le}C(u,g,ee++,q)}}}function S(E,y,z,I,B,k,O,N,_,U){for(var Y=0,J=2*E,te=E-1,ae=J-1,ce=z;ce<I;++ce){var Q=k[ce]+1<<1,Z=J*ce;d[Y++]=B[Z+te],d[Y++]=-Q,d[Y++]=B[Z+ae],d[Y++]=Q}for(var ce=O;ce<N;++ce){var Q=U[ce]+1<<1,j=J*ce;d[Y++]=_[j+te],d[Y++]=-Q|1,d[Y++]=_[j+ae],d[Y++]=Q|1}var K=Y>>>1;n(d,K);for(var ee=0,oe=0,q=0,ce=0;ce<K;++ce){var $=d[2*ce+1]|0,le=$&1;if(ce<K-1&&$>>1===d[2*ce+3]>>1&&(le=2,ce+=1),$<0){for(var ie=-($>>1)-1,he=0;he<q;++he){var me=y(h[he],ie);if(me!==void 0)return me}if(le!==0)for(var he=0;he<ee;++he){var me=y(u[he],ie);if(me!==void 0)return me}if(le!==1)for(var he=0;he<oe;++he){var me=y(f[he],ie);if(me!==void 0)return me}le===0?C(u,g,ee++,ie):le===1?C(f,w,oe++,ie):le===2&&C(h,o,q++,ie)}else{var ie=($>>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<k;++K){var ee=K+Z,oe=ae*K;d[te++]=O[oe+ce],d[te++]=-ee,d[te++]=O[oe+Q],d[te++]=ee}for(var K=_;K<U;++K){var ee=K+j,q=ae*K;d[te++]=Y[q+ce],d[te++]=-ee}var $=te>>>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<le;++Ne){var Ee=u[Ne],xe=ae*Ee;if(!(Oe<O[xe+y+1]||O[xe+y+1+E]<Te)){for(var Se=y+2;Se<E;++Se)if(Y[Me+Se+E]<O[xe+Se]||O[xe+Se+E]<Y[Me+Se])continue e;var Ue=N[Ee],He;if(I?He=z(me,Ue):He=z(Ue,me),He!==void 0)return He}}}}else T(u,g,le--,ie-Z)}}function a(E,y,z,I,B,k,O,N,_,U,Y){for(var J=0,te=2*E,ae=y,ce=y+E,Q=I;Q<B;++Q){var Z=Q+l,j=te*Q;d[J++]=k[j+ae],d[J++]=-Z,d[J++]=k[j+ce],d[J++]=Z}for(var Q=N;Q<_;++Q){var Z=Q+1,K=te*Q;d[J++]=U[K+ae],d[J++]=-Z}var ee=J>>>1;n(d,ee);for(var oe=0,Q=0;Q<ee;++Q){var q=d[2*Q+1]|0;if(q<0){var Z=-q;if(Z>=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<oe;++me){var Me=u[me],Te=O[Me];if(Te===$)break;var Oe=te*Me;if(!(he<k[Oe+y+1]||k[Oe+y+1+E]<ie)){for(var Ne=y+2;Ne<E;++Ne)if(U[le+Ne+E]<k[Oe+Ne]||k[Oe+Ne+E]<U[le+Ne])continue e;var Ee=z(Te,$);if(Ee!==void 0)return Ee}}}}else{for(var Z=q-l,me=oe-1;me>=0;--me)if(u[me]===Z){for(var Ne=me+1;Ne<oe;++Ne)u[Ne-1]=u[Ne];break}--oe}}}},7761:function(v,p,t){var r=t(9971),s=t(743),n=t(2161),l=t(7098);v.exports=w;function c(h){return[Math.min(h[0],h[1]),Math.max(h[0],h[1])]}function u(h,o){return h[0]-o[0]||h[1]-o[1]}function g(h){return h.map(c).sort(u)}function f(h,o,d){return o in h?h[o]:d}function w(h,o,d){Array.isArray(o)?(d=d||{},o=o||[]):(d=o||{},o=[]);var M=!!f(d,"delaunay",!0),T=!!f(d,"interior",!0),C=!!f(d,"exterior",!0),x=!!f(d,"infinity",!1);if(!T&&!C||h.length===0)return[];var S=r(h,o);if(M||T!==C||x){for(var b=s(h.length,g(o)),a=0;a<S.length;++a){var E=S[a];b.addTriangle(E[0],E[1],E[2])}return M&&n(h,b),C?T?x?l(b,0,x):b.cells():l(b,1,x):l(b,-1)}else return S}},2161:function(v,p,t){var r=t(2227)[4];t(5070),v.exports=n;function s(l,c,u,g,f,w){var h=c.opposite(g,f);if(!(h<0)){if(f<g){var o=g;g=f,f=o,o=w,w=h,h=o}c.isConstraint(g,f)||r(l[g],l[f],l[w],l[h])<0&&u.push(g,f)}}function n(l,c){for(var u=[],g=l.length,f=c.stars,w=0;w<g;++w)for(var h=f[w],o=1;o<h.length;o+=2){var d=h[o];if(!(d<w)&&!c.isConstraint(w,d)){for(var M=h[o-1],T=-1,C=1;C<h.length;C+=2)if(h[C-1]===d){T=h[C];break}T<0||r(l[w],l[d],l[M],l[T])<0&&u.push(w,d)}}for(;u.length>0;){for(var d=u.pop(),w=u.pop(),M=-1,T=-1,h=f[w],x=1;x<h.length;x+=2){var S=h[x-1],b=h[x];S===d?T=b:b===d&&(M=S)}M<0||T<0||r(l[w],l[d],l[M],l[T])>=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 h<o?h<w&&(d=h,M=o,T=w):o<w&&(d=o,M=w,T=h),d<0?-1:(f[0]=d,f[1]=M,f[2]=T,r.eq(this.cells,f,l))}}();function c(f,w){for(var h=f.cells(),o=h.length,d=0;d<o;++d){var M=h[d],T=M[0],C=M[1],x=M[2];C<x?C<T&&(M[0]=C,M[1]=x,M[2]=T):x<T&&(M[0]=x,M[1]=T,M[2]=C)}h.sort(l);for(var S=new Array(o),d=0;d<S.length;++d)S[d]=0;var b=[],a=[],E=new Array(3*o),y=new Array(3*o),z=null;w&&(z=[]);for(var I=new s(h,E,y,S,b,a,z),d=0;d<o;++d)for(var M=h[d],B=0;B<3;++B){var T=M[B],C=M[(B+1)%3],k=E[3*d+B]=I.locate(C,T,f.opposite(C,T)),O=y[3*d+B]=f.isConstraint(T,C);k<0&&(O?a.push(d):(b.push(d),S[d]=1),w&&z.push([C,T,-1]))}return I}function u(f,w,h){for(var o=0,d=0;d<f.length;++d)w[d]===h&&(f[o++]=f[d]);return f.length=o,f}function g(f,w,h){var o=c(f,h);if(w===0)return h?o.cells.concat(o.boundary):o.cells;for(var d=1,M=o.active,T=o.next,C=o.flags,x=o.cells,S=o.constraint,b=o.neighbor;M.length>0||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;z<y;++z){for(var I=x[z],B=I.lowerIds,O=B.length;O>1&&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]<x.a[0]?S=s(C.a,C.b,x.a):S=s(x.b,x.a,C.a),S||(x.b[0]<C.b[0]?S=s(C.a,C.b,x.b):S=s(x.b,x.a,C.b),S||C.idx-x.idx)}function d(C,x,S){var b=r.le(C,S,o),a=C[b],E=a.upperIds,y=E[E.length-1];a.upperIds=[y],C.splice(b+1,0,new u(S.a,S.b,S.idx,[y],E))}function M(C,x,S){var b=S.a;S.a=S.b,S.b=b;var a=r.eq(C,S,o),E=C[a],y=C[a-1];y.upperIds=E.upperIds,C.splice(a,1)}function T(C,x){for(var S=C.length,b=x.length,a=[],E=0;E<S;++E)a.push(new g(C[E],null,n,E));for(var E=0;E<b;++E){var y=x[E],z=C[y[0]],I=C[y[1]];z[0]<I[0]?a.push(new g(z,I,c,E),new g(I,z,l,E)):z[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<N;++E){var _=a[E],U=_.type;U===n?h(O,k,C,_.a,_.idx):U===c?d(k,C,_):M(k,C,_)}return O}},743:function(v,p,t){var r=t(5070);v.exports=c;function s(u,g){this.stars=u,this.edges=g}var n=s.prototype;function l(u,g,f){for(var w=1,h=u.length;w<h;w+=2)if(u[w-1]===g&&u[w]===f){u[w-1]=u[h-2],u[w]=u[h-1],u.length=h-2;return}}n.isConstraint=function(){var u=[0,0];function g(f,w){return f[0]-w[0]||f[1]-w[1]}return function(f,w){return u[0]=Math.min(f,w),u[1]=Math.max(f,w),r.eq(this.edges,u,g)>=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<h;w+=2)if(f[w]===u)return f[w-1];return-1},n.flip=function(u,g){var f=this.opposite(u,g),w=this.opposite(g,u);this.removeTriangle(u,g,f),this.removeTriangle(g,u,w),this.addTriangle(u,w,f),this.addTriangle(g,f,w)},n.edges=function(){for(var u=this.stars,g=[],f=0,w=u.length;f<w;++f)for(var h=u[f],o=0,d=h.length;o<d;o+=2)g.push([h[o],h[o+1]]);return g},n.cells=function(){for(var u=this.stars,g=[],f=0,w=u.length;f<w;++f)for(var h=u[f],o=0,d=h.length;o<d;o+=2){var M=h[o],T=h[o+1];f<Math.min(M,T)&&g.push([f,M,T])}return g};function c(u,g){for(var f=new Array(u),w=0;w<u;++w)f[w]=[];return new s(f,g)}},9887:function(v){v.exports=p;function p(t){for(var r=1,s=1;s<t.length;++s)for(var n=0;n<s;++n)if(t[s]<t[n])r=-r;else if(t[n]===t[s])return 0;return r}},9243:function(v,p,t){var r=t(3094),s=t(6606);function n(u,g){for(var f=0,w=u.length,h=0;h<w;++h)f+=u[h]*g[h];return f}function l(u){var g=u.length;if(g===0)return[];u[0].length;var f=r([u.length+1,u.length+1],1),w=r([u.length+1],1);f[g][g]=0;for(var h=0;h<g;++h){for(var o=0;o<=h;++o)f[o][h]=f[h][o]=2*n(u[h],u[o]);w[h]=n(u[h],u[h])}for(var d=s(f,w),M=0,T=d[g+1],h=0;h<T.length;++h)M+=T[h];for(var C=new Array(g),h=0;h<g;++h){for(var T=d[h],x=0,o=0;o<T.length;++o)x+=T[o];C[h]=x/M}return C}function c(u){if(u.length===0)return[];for(var g=u[0].length,f=r([g]),w=l(u),h=0;h<u.length;++h)for(var o=0;o<g;++o)f[o]+=u[h][o]*w[h];return f}c.barycenetric=l,v.exports=c},1778:function(v,p,t){v.exports=s;var r=t(9243);function s(n){for(var l=r(n),c=0,u=0;u<n.length;++u)for(var g=n[u],f=0;f<l.length;++f)c+=Math.pow(g[f]-l[f],2);return Math.sqrt(c/n.length)}},197:function(v,p,t){v.exports=z;var r=t(1731),s=t(2569),n=t(4434),l=t(5125),c=t(8846),u=t(7999),g=t(2826),f=t(8551),w=t(5528);function h(I){var B=u(I);return[f(B,-1/0),f(B,1/0)]}function o(I,B){for(var k=new Array(B.length),O=0;O<B.length;++O){var N=B[O],_=I[N[0]],U=I[N[1]];k[O]=[f(Math.min(_[0],U[0]),-1/0),f(Math.min(_[1],U[1]),-1/0),f(Math.max(_[0],U[0]),1/0),f(Math.max(_[1],U[1]),1/0)]}return k}function d(I){for(var B=new Array(I.length),k=0;k<I.length;++k){var O=I[k];B[k]=[f(O[0],-1/0),f(O[1],-1/0),f(O[0],1/0),f(O[1],1/0)]}return B}function M(I,B,k){var O=[];return s(k,function(N,_){var U=B[N],Y=B[_];if(!(U[0]===Y[0]||U[0]===Y[1]||U[1]===Y[0]||U[1]===Y[1])){var J=I[U[0]],te=I[U[1]],ae=I[Y[0]],ce=I[Y[1]];n(J,te,ae,ce)&&O.push([N,_])}}),O}function T(I,B,k,O){var N=[];return s(k,O,function(_,U){var Y=B[_];if(!(Y[0]===U||Y[1]===U)){var J=I[U],te=I[Y[0]],ae=I[Y[1]];n(te,ae,J,J)&&N.push([_,U])}}),N}function C(I,B,k,O,N){var _,U,Y=I.map(function(Me){return[l(Me[0]),l(Me[1])]});for(_=0;_<k.length;++_){var J=k[_];U=J[0];var te=J[1],ae=B[U],ce=B[te],Q=w(g(I[ae[0]]),g(I[ae[1]]),g(I[ce[0]]),g(I[ce[1]]));if(Q){var Z=I.length;I.push([u(Q[0]),u(Q[1])]),Y.push(Q),O.push([U,Z],[te,Z])}}for(O.sort(function(Me,Te){if(Me[0]!==Te[0])return Me[0]-Te[0];var Oe=Y[Me[1]],Ne=Y[Te[1]];return c(Oe[0],Ne[0])||c(Oe[1],Ne[1])}),_=O.length-1;_>=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;U<B.length;++U){var Y=B[U],J=h(Y[0]),te=h(Y[1]);_.push([f(J[0],-1/0),f(te[0],-1/0),f(J[1],1/0),f(te[1],1/0)])}s(_,function(j,K){N.link(j,K)});for(var ae=!0,ce=new Array(O),U=0;U<O;++U){var Q=N.find(U);Q!==U&&(ae=!1,I[Q]=[Math.min(I[U][0],I[Q][0]),Math.min(I[U][1],I[Q][1])])}if(ae)return null;for(var Z=0,U=0;U<O;++U){var Q=N.find(U);Q===U?(ce[U]=Z,I[Z++]=I[U]):ce[U]=-1}I.length=Z;for(var U=0;U<O;++U)ce[U]<0&&(ce[U]=ce[N.find(U)]);return ce}function S(I,B){return I[0]-B[0]||I[1]-B[1]}function b(I,B){var k=I[0]-B[0]||I[1]-B[1];return k||(I[2]<B[2]?-1:I[2]>B[2]?1:0)}function a(I,B,k){if(I.length!==0){if(B)for(var O=0;O<I.length;++O){var N=I[O],_=B[N[0]],U=B[N[1]];N[0]=Math.min(_,U),N[1]=Math.max(_,U)}else for(var O=0;O<I.length;++O){var N=I[O],_=N[0],U=N[1];N[0]=Math.min(_,U),N[1]=Math.max(_,U)}k?I.sort(b):I.sort(S);for(var Y=1,O=1;O<I.length;++O){var J=I[O-1],te=I[O];te[0]===J[0]&&te[1]===J[1]&&(!k||te[2]===J[2])||(I[Y++]=te)}I.length=Y}}function E(I,B,k){var O=x(I,[],d(I));return a(B,O,k),!!O}function y(I,B,k){var O=o(I,B),N=M(I,B,O),_=d(I),U=T(I,B,O,_),Y=C(I,B,N,U,k),J=x(I,Y);return a(B,J,k),J?!0:N.length>0||U.length>0}function z(I,B,k){var O;if(k){O=B;for(var N=new Array(B.length),_=0;_<B.length;++_){var U=B[_];N[_]=[U[0],U[1],k[_]]}B=N}for(var Y=E(I,B,!!k);y(I,B,!!k);)Y=!0;if(k&&Y){O.length=0,k.length=0;for(var _=0;_<B.length;++_){var U=B[_];O.push([U[0],U[1]]),k.push(U[2])}}return Y}},5528:function(v,p,t){v.exports=w;var r=t(3962),s=t(9189),n=t(4354),l=t(4951),c=t(6695),u=t(7584),g=t(4469);function f(h,o){return n(r(h[0],o[1]),r(h[1],o[0]))}function w(h,o,d,M){var T=c(o,h),C=c(M,d),x=f(T,C);if(l(x)===0)return null;var S=c(h,d),b=f(C,S),a=s(b,x),E=g(T,a),y=u(h,E);return y}},5692:function(v){v.exports={jet:[{index:0,rgb:[0,0,131]},{index:.125,rgb:[0,60,170]},{index:.375,rgb:[5,255,255]},{index:.625,rgb:[255,255,0]},{index:.875,rgb:[250,0,0]},{index:1,rgb:[128,0,0]}],hsv:[{index:0,rgb:[255,0,0]},{index:.169,rgb:[253,255,2]},{index:.173,rgb:[247,255,2]},{index:.337,rgb:[0,252,4]},{index:.341,rgb:[0,252,10]},{index:.506,rgb:[1,249,255]},{index:.671,rgb:[2,0,253]},{index:.675,rgb:[8,0,253]},{index:.839,rgb:[255,0,251]},{index:.843,rgb:[255,0,245]},{index:1,rgb:[255,0,6]}],hot:[{index:0,rgb:[0,0,0]},{index:.3,rgb:[230,0,0]},{index:.6,rgb:[255,210,0]},{index:1,rgb:[255,255,255]}],spring:[{index:0,rgb:[255,0,255]},{index:1,rgb:[255,255,0]}],summer:[{index:0,rgb:[0,128,102]},{index:1,rgb:[255,255,102]}],autumn:[{index:0,rgb:[255,0,0]},{index:1,rgb:[255,255,0]}],winter:[{index:0,rgb:[0,0,255]},{index:1,rgb:[0,255,128]}],bone:[{index:0,rgb:[0,0,0]},{index:.376,rgb:[84,84,116]},{index:.753,rgb:[169,200,200]},{index:1,rgb:[255,255,255]}],copper:[{index:0,rgb:[0,0,0]},{index:.804,rgb:[255,160,102]},{index:1,rgb:[255,199,127]}],greys:[{index:0,rgb:[0,0,0]},{index:1,rgb:[255,255,255]}],yignbu:[{index:0,rgb:[8,29,88]},{index:.125,rgb:[37,52,148]},{index:.25,rgb:[34,94,168]},{index:.375,rgb:[29,145,192]},{index:.5,rgb:[65,182,196]},{index:.625,rgb:[127,205,187]},{index:.75,rgb:[199,233,180]},{index:.875,rgb:[237,248,217]},{index:1,rgb:[255,255,217]}],greens:[{index:0,rgb:[0,68,27]},{index:.125,rgb:[0,109,44]},{index:.25,rgb:[35,139,69]},{index:.375,rgb:[65,171,93]},{index:.5,rgb:[116,196,118]},{index:.625,rgb:[161,217,155]},{index:.75,rgb:[199,233,192]},{index:.875,rgb:[229,245,224]},{index:1,rgb:[247,252,245]}],yiorrd:[{index:0,rgb:[128,0,38]},{index:.125,rgb:[189,0,38]},{index:.25,rgb:[227,26,28]},{index:.375,rgb:[252,78,42]},{index:.5,rgb:[253,141,60]},{index:.625,rgb:[254,178,76]},{index:.75,rgb:[254,217,118]},{index:.875,rgb:[255,237,160]},{index:1,rgb:[255,255,204]}],bluered:[{index:0,rgb:[0,0,255]},{index:1,rgb:[255,0,0]}],rdbu:[{index:0,rgb:[5,10,172]},{index:.35,rgb:[106,137,247]},{index:.5,rgb:[190,190,190]},{index:.6,rgb:[220,170,132]},{index:.7,rgb:[230,145,90]},{index:1,rgb:[178,10,28]}],picnic:[{index:0,rgb:[0,0,255]},{index:.1,rgb:[51,153,255]},{index:.2,rgb:[102,204,255]},{index:.3,rgb:[153,204,255]},{index:.4,rgb:[204,204,255]},{index:.5,rgb:[255,255,255]},{index:.6,rgb:[255,204,255]},{index:.7,rgb:[255,153,255]},{index:.8,rgb:[255,102,204]},{index:.9,rgb:[255,102,102]},{index:1,rgb:[255,0,0]}],rainbow:[{index:0,rgb:[150,0,90]},{index:.125,rgb:[0,0,200]},{index:.25,rgb:[0,25,255]},{index:.375,rgb:[0,152,255]},{index:.5,rgb:[44,255,150]},{index:.625,rgb:[151,255,0]},{index:.75,rgb:[255,234,0]},{index:.875,rgb:[255,111,0]},{index:1,rgb:[255,0,0]}],portland:[{index:0,rgb:[12,51,131]},{index:.25,rgb:[10,136,186]},{index:.5,rgb:[242,211,56]},{index:.75,rgb:[242,143,56]},{index:1,rgb:[217,30,30]}],blackbody:[{index:0,rgb:[0,0,0]},{index:.2,rgb:[230,0,0]},{index:.4,rgb:[230,210,0]},{index:.7,rgb:[255,255,255]},{index:1,rgb:[160,200,255]}],earth:[{index:0,rgb:[0,0,130]},{index:.1,rgb:[0,180,180]},{index:.2,rgb:[40,210,40]},{index:.4,rgb:[230,230,50]},{index:.6,rgb:[120,70,20]},{index:1,rgb:[255,255,255]}],electric:[{index:0,rgb:[0,0,0]},{index:.15,rgb:[30,0,100]},{index:.4,rgb:[120,0,100]},{index:.6,rgb:[160,90,0]},{index:.8,rgb:[230,200,0]},{index:1,rgb:[255,250,220]}],alpha:[{index:0,rgb:[255,255,255,0]},{index:1,rgb:[255,255,255,1]}],viridis:[{index:0,rgb:[68,1,84]},{index:.13,rgb:[71,44,122]},{index:.25,rgb:[59,81,139]},{index:.38,rgb:[44,113,142]},{index:.5,rgb:[33,144,141]},{index:.63,rgb:[39,173,129]},{index:.75,rgb:[92,200,99]},{index:.88,rgb:[170,220,50]},{index:1,rgb:[253,231,37]}],inferno:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[31,12,72]},{index:.25,rgb:[85,15,109]},{index:.38,rgb:[136,34,106]},{index:.5,rgb:[186,54,85]},{index:.63,rgb:[227,89,51]},{index:.75,rgb:[249,140,10]},{index:.88,rgb:[249,201,50]},{index:1,rgb:[252,255,164]}],magma:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[28,16,68]},{index:.25,rgb:[79,18,123]},{index:.38,rgb:[129,37,129]},{index:.5,rgb:[181,54,122]},{index:.63,rgb:[229,80,100]},{index:.75,rgb:[251,135,97]},{index:.88,rgb:[254,194,135]},{index:1,rgb:[252,253,191]}],plasma:[{index:0,rgb:[13,8,135]},{index:.13,rgb:[75,3,161]},{index:.25,rgb:[125,3,168]},{index:.38,rgb:[168,34,150]},{index:.5,rgb:[203,70,121]},{index:.63,rgb:[229,107,93]},{index:.75,rgb:[248,148,65]},{index:.88,rgb:[253,195,40]},{index:1,rgb:[240,249,33]}],warm:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[172,0,187]},{index:.25,rgb:[219,0,170]},{index:.38,rgb:[255,0,130]},{index:.5,rgb:[255,63,74]},{index:.63,rgb:[255,123,0]},{index:.75,rgb:[234,176,0]},{index:.88,rgb:[190,228,0]},{index:1,rgb:[147,255,0]}],cool:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[116,0,218]},{index:.25,rgb:[98,74,237]},{index:.38,rgb:[68,146,231]},{index:.5,rgb:[0,204,197]},{index:.63,rgb:[0,247,146]},{index:.75,rgb:[0,255,88]},{index:.88,rgb:[40,255,8]},{index:1,rgb:[147,255,0]}],"rainbow-soft":[{index:0,rgb:[125,0,179]},{index:.1,rgb:[199,0,180]},{index:.2,rgb:[255,0,121]},{index:.3,rgb:[255,108,0]},{index:.4,rgb:[222,194,0]},{index:.5,rgb:[150,255,0]},{index:.6,rgb:[0,255,55]},{index:.7,rgb:[0,246,150]},{index:.8,rgb:[50,167,222]},{index:.9,rgb:[103,51,235]},{index:1,rgb:[124,0,186]}],bathymetry:[{index:0,rgb:[40,26,44]},{index:.13,rgb:[59,49,90]},{index:.25,rgb:[64,76,139]},{index:.38,rgb:[63,110,151]},{index:.5,rgb:[72,142,158]},{index:.63,rgb:[85,174,163]},{index:.75,rgb:[120,206,163]},{index:.88,rgb:[187,230,172]},{index:1,rgb:[253,254,204]}],cdom:[{index:0,rgb:[47,15,62]},{index:.13,rgb:[87,23,86]},{index:.25,rgb:[130,28,99]},{index:.38,rgb:[171,41,96]},{index:.5,rgb:[206,67,86]},{index:.63,rgb:[230,106,84]},{index:.75,rgb:[242,149,103]},{index:.88,rgb:[249,193,135]},{index:1,rgb:[254,237,176]}],chlorophyll:[{index:0,rgb:[18,36,20]},{index:.13,rgb:[25,63,41]},{index:.25,rgb:[24,91,59]},{index:.38,rgb:[13,119,72]},{index:.5,rgb:[18,148,80]},{index:.63,rgb:[80,173,89]},{index:.75,rgb:[132,196,122]},{index:.88,rgb:[175,221,162]},{index:1,rgb:[215,249,208]}],density:[{index:0,rgb:[54,14,36]},{index:.13,rgb:[89,23,80]},{index:.25,rgb:[110,45,132]},{index:.38,rgb:[120,77,178]},{index:.5,rgb:[120,113,213]},{index:.63,rgb:[115,151,228]},{index:.75,rgb:[134,185,227]},{index:.88,rgb:[177,214,227]},{index:1,rgb:[230,241,241]}],"freesurface-blue":[{index:0,rgb:[30,4,110]},{index:.13,rgb:[47,14,176]},{index:.25,rgb:[41,45,236]},{index:.38,rgb:[25,99,212]},{index:.5,rgb:[68,131,200]},{index:.63,rgb:[114,156,197]},{index:.75,rgb:[157,181,203]},{index:.88,rgb:[200,208,216]},{index:1,rgb:[241,237,236]}],"freesurface-red":[{index:0,rgb:[60,9,18]},{index:.13,rgb:[100,17,27]},{index:.25,rgb:[142,20,29]},{index:.38,rgb:[177,43,27]},{index:.5,rgb:[192,87,63]},{index:.63,rgb:[205,125,105]},{index:.75,rgb:[216,162,148]},{index:.88,rgb:[227,199,193]},{index:1,rgb:[241,237,236]}],oxygen:[{index:0,rgb:[64,5,5]},{index:.13,rgb:[106,6,15]},{index:.25,rgb:[144,26,7]},{index:.38,rgb:[168,64,3]},{index:.5,rgb:[188,100,4]},{index:.63,rgb:[206,136,11]},{index:.75,rgb:[220,174,25]},{index:.88,rgb:[231,215,44]},{index:1,rgb:[248,254,105]}],par:[{index:0,rgb:[51,20,24]},{index:.13,rgb:[90,32,35]},{index:.25,rgb:[129,44,34]},{index:.38,rgb:[159,68,25]},{index:.5,rgb:[182,99,19]},{index:.63,rgb:[199,134,22]},{index:.75,rgb:[212,171,35]},{index:.88,rgb:[221,210,54]},{index:1,rgb:[225,253,75]}],phase:[{index:0,rgb:[145,105,18]},{index:.13,rgb:[184,71,38]},{index:.25,rgb:[186,58,115]},{index:.38,rgb:[160,71,185]},{index:.5,rgb:[110,97,218]},{index:.63,rgb:[50,123,164]},{index:.75,rgb:[31,131,110]},{index:.88,rgb:[77,129,34]},{index:1,rgb:[145,105,18]}],salinity:[{index:0,rgb:[42,24,108]},{index:.13,rgb:[33,50,162]},{index:.25,rgb:[15,90,145]},{index:.38,rgb:[40,118,137]},{index:.5,rgb:[59,146,135]},{index:.63,rgb:[79,175,126]},{index:.75,rgb:[120,203,104]},{index:.88,rgb:[193,221,100]},{index:1,rgb:[253,239,154]}],temperature:[{index:0,rgb:[4,35,51]},{index:.13,rgb:[23,51,122]},{index:.25,rgb:[85,59,157]},{index:.38,rgb:[129,79,143]},{index:.5,rgb:[175,95,130]},{index:.63,rgb:[222,112,101]},{index:.75,rgb:[249,146,66]},{index:.88,rgb:[249,196,65]},{index:1,rgb:[232,250,91]}],turbidity:[{index:0,rgb:[34,31,27]},{index:.13,rgb:[65,50,41]},{index:.25,rgb:[98,69,52]},{index:.38,rgb:[131,89,57]},{index:.5,rgb:[161,112,59]},{index:.63,rgb:[185,140,66]},{index:.75,rgb:[202,174,88]},{index:.88,rgb:[216,209,126]},{index:1,rgb:[233,246,171]}],"velocity-blue":[{index:0,rgb:[17,32,64]},{index:.13,rgb:[35,52,116]},{index:.25,rgb:[29,81,156]},{index:.38,rgb:[31,113,162]},{index:.5,rgb:[50,144,169]},{index:.63,rgb:[87,173,176]},{index:.75,rgb:[149,196,189]},{index:.88,rgb:[203,221,211]},{index:1,rgb:[254,251,230]}],"velocity-green":[{index:0,rgb:[23,35,19]},{index:.13,rgb:[24,64,38]},{index:.25,rgb:[11,95,45]},{index:.38,rgb:[39,123,35]},{index:.5,rgb:[95,146,12]},{index:.63,rgb:[152,165,18]},{index:.75,rgb:[201,186,69]},{index:.88,rgb:[233,216,137]},{index:1,rgb:[255,253,205]}],cubehelix:[{index:0,rgb:[0,0,0]},{index:.07,rgb:[22,5,59]},{index:.13,rgb:[60,4,105]},{index:.2,rgb:[109,1,135]},{index:.27,rgb:[161,0,147]},{index:.33,rgb:[210,2,142]},{index:.4,rgb:[251,11,123]},{index:.47,rgb:[255,29,97]},{index:.53,rgb:[255,54,69]},{index:.6,rgb:[255,85,46]},{index:.67,rgb:[255,120,34]},{index:.73,rgb:[255,157,37]},{index:.8,rgb:[241,191,57]},{index:.87,rgb:[224,220,93]},{index:.93,rgb:[218,241,142]},{index:1,rgb:[227,253,198]}]}},9156:function(v,p,t){var r=t(5692),s=t(3578);v.exports=n;function n(g){var f,w,h,o,d,M,T,C,a,x,S;if(g||(g={}),C=(g.nshades||72)-1,T=g.format||"hex",M=g.colormap,M||(M="jet"),typeof M=="string"){if(M=M.toLowerCase(),!r[M])throw Error(M+" not a supported colorscale");d=r[M]}else if(Array.isArray(M))d=M.slice();else throw Error("unsupported colormap option",M);if(d.length>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<f.length-1;++S){o=f[S+1]-f[S],w=b[S],h=b[S+1];for(var E=0;E<o;E++){var y=E/o;a.push([Math.round(s(w[0],h[0],y)),Math.round(s(w[1],h[1],y)),Math.round(s(w[2],h[2],y)),s(w[3],h[3],y)])}}return a.push(d[d.length-1].rgb.concat(x[1])),T==="hex"?a=a.map(c):T==="rgbaString"?a=a.map(u):T==="float"&&(a=a.map(l)),a}function l(g){return[g[0]/255,g[1]/255,g[2]/255,g[3]]}function c(g){for(var f,w="#",h=0;h<3;++h)f=g[h],f=f.toString(16),w+=("00"+f).substr(f.length);return w}function u(g){return"rgba("+g.join(",")+")"}},9398:function(v,p,t){v.exports=g;var r=t(417),s=t(7538),n=t(87),l=t(2019),c=t(9662);function u(f,w,h){var o=n(f[0],-w[0]),d=n(f[1],-w[1]),M=n(h[0],-w[0]),T=n(h[1],-w[1]),C=c(l(o,M),l(d,T));return C[C.length-1]>=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;E<l;++E)if(c=b[E]-a[E],c)return c;return 0}}},1284:function(v,p,t){var r=t(9209),s=t(9887);v.exports=n;function n(l,c){return r(l,c)||s(l)-s(c)}},5537:function(v,p,t){var r=t(8950),s=t(8722),n=t(3332);v.exports=l;function l(c){var u=c.length;if(u===0)return[];if(u===1)return[[0]];var g=c[0].length;return g===0?[]:g===1?r(c):g===2?s(c):n(c,g)}},8950:function(v){v.exports=p;function p(t){for(var r=0,s=0,n=1;n<t.length;++n)t[n][0]<t[r][0]&&(r=n),t[n][0]>t[s][0]&&(s=n);return r<s?[[r],[s]]:r>s?[[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<c;++f){var w=l[f];u[f]=[g,w],g=w}return u}},3332:function(v,p,t){v.exports=c;var r=t(2183),s=t(2153);function n(u,g){for(var f=u.length,w=new Array(f),h=0;h<g.length;++h)w[h]=u[g[h]];for(var o=g.length,h=0;h<f;++h)g.indexOf(h)<0&&(w[o++]=u[h]);return w}function l(u,g){for(var f=u.length,w=g.length,h=0;h<f;++h)for(var o=u[h],d=0;d<o.length;++d){var M=o[d];if(M<w)o[d]=g[M];else{M=M-w;for(var T=0;T<w;++T)M>=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<o;++d){var M=h[d]-w[d];if(M)return M}return 0}function c(g,f,w){if(g===1)return w?[[-1,0]]:[];var h=f.map(function(C,x){return[C[0],x]});h.sort(function(C,x){return C[0]-x[0]});for(var o=new Array(g-1),d=1;d<g;++d){var M=h[d-1],T=h[d];o[d-1]=[M[1],T[1]]}return w&&o.push([-1,o[0][1]],[o[g-1][1],-1]),o}function u(g,f){var w=g.length;if(w===0)return[];var h=g[0].length;if(h<1)return[];if(h===1)return c(w,g,f);for(var o=new Array(w),d=1,M=0;M<w;++M){for(var T=g[M],C=new Array(h+1),x=0,S=0;S<h;++S){var b=T[S];C[S]=b,x+=b*b}C[h]=x,o[M]=new n(C,M),d=Math.max(x,d)}s(o,l),w=o.length;for(var a=new Array(w+h+1),E=new Array(w+h+1),y=(h+1)*(h+1)*d,z=new Array(h+1),M=0;M<=h;++M)z[M]=0;z[h]=y,a[0]=z.slice(),E[0]=-1;for(var M=0;M<=h;++M){var C=z.slice();C[M]=1,a[M+1]=C,E[M+1]=-1}for(var M=0;M<w;++M){var I=o[M];a[M+h+1]=I.point,E[M+h+1]=I.index}var B=r(a,!1);if(f?B=B.filter(function(k){for(var O=0,N=0;N<=h;++N){var _=E[k[N]];if(_<0&&++O>=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<B.length;++M){var I=B[M],C=I[0];I[0]=I[1],I[1]=C}return B}},8362:function(v){var p=!1;if(typeof Float64Array<"u"){var t=new Float64Array(1),r=new Uint32Array(t.buffer);if(t[0]=1,p=!0,r[1]===1072693248){let d=function(C,x){return r[0]=C,r[1]=x,t[0]},M=function(C){return t[0]=C,r[0]},T=function(C){return t[0]=C,r[1]};var n=d,l=M,c=T;v.exports=function(x){return t[0]=x,[r[0],r[1]]},v.exports.pack=d,v.exports.lo=M,v.exports.hi=T}else if(r[0]===1072693248){let d=function(C,x){return r[1]=C,r[0]=x,t[0]},M=function(C){return t[0]=C,r[1]},T=function(C){return t[0]=C,r[0]};var u=d,g=M,f=T;v.exports=function(x){return t[0]=x,[r[1],r[0]]},v.exports.pack=d,v.exports.lo=M,v.exports.hi=T}else p=!1}if(!p){let d=function(C,x){return s.writeUInt32LE(C,0,!0),s.writeUInt32LE(x,4,!0),s.readDoubleLE(0,!0)},M=function(C){return s.writeDoubleLE(C,0,!0),s.readUInt32LE(0,!0)},T=function(C){return s.writeDoubleLE(C,0,!0),s.readUInt32LE(4,!0)};var w=d,h=M,o=T,s=new Buffer(8);v.exports=function(x){return s.writeDoubleLE(x,0,!0),[s.readUInt32LE(0,!0),s.readUInt32LE(4,!0)]},v.exports.pack=d,v.exports.lo=M,v.exports.hi=T}v.exports.sign=function(d){return v.exports.hi(d)>>>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<c;++g)u[g]=n;else for(g=0;g<c;++g)u[g]=p(s,n,l+1);return u}function t(s,n){var l,c;for(l=new Array(s),c=0;c<s;++c)l[c]=n;return l}function r(s,n){switch(typeof n>"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<c;++u){var g=n[u];l=Math.max(l,g[0],g[1])}l=(l|0)+1}l=l|0;for(var f=new Array(l),u=0;u<l;++u)f[u]=[];for(var u=0;u<c;++u){var g=n[u];f[g[0]].push(g[1]),f[g[1]].push(g[0])}for(var w=0;w<l;++w)r(f[w],function(h,o){return h-o});return f}},5795:function(v){v.exports=p;function p(t,r,s){var n=r||0,l=s||1;return[[t[12]+t[0],t[13]+t[1],t[14]+t[2],t[15]+t[3]],[t[12]-t[0],t[13]-t[1],t[14]-t[2],t[15]-t[3]],[t[12]+t[4],t[13]+t[5],t[14]+t[6],t[15]+t[7]],[t[12]-t[4],t[13]-t[5],t[14]-t[6],t[15]-t[7]],[n*t[12]+t[8],n*t[13]+t[9],n*t[14]+t[10],n*t[15]+t[11]],[l*t[12]-t[8],l*t[13]-t[9],l*t[14]-t[10],l*t[15]-t[11]]]}},8444:function(v,p,t){v.exports=g;var r=t(9680),s=t(5070);function n(f,w,h){return Math.min(w,Math.max(f,h))}function l(f,w,h){this.dimension=f.length,this.bounds=[new Array(this.dimension),new Array(this.dimension)];for(var o=0;o<this.dimension;++o)this.bounds[0][o]=-1/0,this.bounds[1][o]=1/0;this._state=f.slice().reverse(),this._velocity=w.slice().reverse(),this._time=[h],this._scratch=[f.slice(),f.slice(),f.slice(),f.slice(),f.slice()]}var c=l.prototype;c.flush=function(f){var w=s.gt(this._time,f)-1;w<=0||(this._time.splice(0,w),this._state.splice(0,w*this.dimension),this._velocity.splice(0,w*this.dimension))},c.curve=function(f){var w=this._time,h=w.length,o=s.le(w,f),d=this._scratch[0],M=this._state,T=this._velocity,C=this.dimension,x=this.bounds;if(o<0)for(var S=C-1,b=0;b<C;++b,--S)d[b]=M[S];else if(o>=h-1)for(var S=M.length-1,a=f-w[h-1],b=0;b<C;++b,--S)d[b]=M[S]+a*T[S];else{for(var S=C*(o+1)-1,E=w[o],y=w[o+1],z=y-E||1,I=this._scratch[1],B=this._scratch[2],k=this._scratch[3],O=this._scratch[4],N=!0,b=0;b<C;++b,--S)I[b]=M[S],k[b]=T[S]*z,B[b]=M[S+C],O[b]=T[S+C]*z,N=N&&I[b]===B[b]&&k[b]===O[b]&&k[b]===0;if(N)for(var b=0;b<C;++b)d[b]=I[b];else r(I,k,B,O,(f-E)/z,d)}for(var _=x[0],U=x[1],b=0;b<C;++b)d[b]=n(_[b],U[b],d[b]);return d},c.dcurve=function(f){var w=this._time,h=w.length,o=s.le(w,f),d=this._scratch[0],M=this._state,T=this._velocity,C=this.dimension;if(o>=h-1){var x=M.length-1;f-w[h-1];for(var S=0;S<C;++S,--x)d[S]=T[x]}else{for(var x=C*(o+1)-1,b=w[o],a=w[o+1],E=a-b||1,y=this._scratch[1],z=this._scratch[2],I=this._scratch[3],B=this._scratch[4],k=!0,S=0;S<C;++S,--x)y[S]=M[x],I[S]=T[x]*E,z[S]=M[x+C],B[S]=T[x+C]*E,k=k&&y[S]===z[S]&&I[S]===B[S]&&I[S]===0;if(k)for(var S=0;S<C;++S)d[S]=0;else{r.derivative(y,I,z,B,(f-b)/E,d);for(var S=0;S<C;++S)d[S]/=E}}return d},c.lastT=function(){var f=this._time;return f[f.length-1]},c.stable=function(){for(var f=this._velocity,w=f.length,h=this.dimension-1;h>=0;--h)if(f[--w])return!1;return!0},c.jump=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];this._time.push(w,f);for(var S=0;S<2;++S)for(var b=0;b<h;++b)o.push(o[M++]),d.push(0);this._time.push(f);for(var b=h;b>0;--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(!(f<w||arguments.length!==h+1)){var o=this._state,d=this._velocity,M=o.length-this.dimension,T=f-w,C=this.bounds,x=C[0],S=C[1],b=T>1e-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(!(f<this.lastT()||arguments.length!==w+1)){var h=this._state,o=this._velocity,d=this.bounds,M=d[0],T=d[1];this._time.push(f);for(var C=w;C>0;--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<w)){var h=this.dimension,o=this._state,d=this._velocity,M=o.length-h,T=this.bounds,C=T[0],x=T[1],S=f-w;this._time.push(f);for(var b=h-1;b>=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<f;++h)w[h]=0;return w}function g(f,w,h){switch(arguments.length){case 0:return new l([0],[0],0);case 1:if(typeof f=="number"){var o=u(f);return new l(o,o,0)}else return new l(f,u(f.length),0);case 2:if(typeof w=="number"){var o=u(f.length);return new l(f,o,+w)}else h=0;case 3:if(f.length!==w.length)throw new Error("state and velocity lengths must match");return new l(f,w,h)}}},7080:function(v){v.exports=C;var p=0,t=1;function r(x,S,b,a,E,y){this._color=x,this.key=S,this.value=b,this.left=a,this.right=E,this._count=y}function s(x){return new r(x._color,x.key,x.value,x.left,x.right,x._count)}function n(x,S){return new r(x,S.key,S.value,S.left,S.right,S._count)}function l(x){x._count=1+(x.left?x.left._count:0)+(x.right?x.right._count:0)}function c(x,S){this._compare=x,this.root=S}var u=c.prototype;Object.defineProperty(u,"keys",{get:function(){var x=[];return this.forEach(function(S,b){x.push(S)}),x}}),Object.defineProperty(u,"values",{get:function(){var x=[];return this.forEach(function(S,b){x.push(b)}),x}}),Object.defineProperty(u,"length",{get:function(){return this.root?this.root._count:0}}),u.insert=function(x,S){for(var b=this._compare,a=this.root,E=[],y=[];a;){var z=b(x,a.key);E.push(a),y.push(z),z<=0?a=a.left:a=a.right}E.push(new r(p,x,S,null,null,1));for(var I=E.length-2;I>=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.left._count){S=S.left;continue}x-=S.left._count}if(!x)return new h(this,b);if(x-=1,S.right){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+1<x.length?x[y+1]=S:x.push(S),y=y+2}}else{if(a=b.left,a.left&&a.left._color===p){if(a=b.left=s(a),E=a.left=s(a.left),b.left=a.right,a.right=b,a.left=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.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<x.length?x[y+1]=S:x.push(S),y=y+2}}}}o.remove=function(){var x=this._stack;if(x.length===0)return this.tree;var S=new Array(x.length),b=x[x.length-1];S[S.length-1]=new r(b._color,b.key,b.value,b.left,b.right,b._count);for(var a=x.length-2;a>=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;a<S.length;++a)S[a]._count--;return new c(this.tree._compare,S[0])}else if(b.left||b.right){b.left?d(b,b.left):b.right&&d(b,b.right),b._color=t;for(var a=0;a<S.length-1;++a)S[a]._count--;return new c(this.tree._compare,S[0])}else{if(S.length===1)return new c(this.tree._compare,null);for(var a=0;a<S.length;++a)S[a]._count--;var I=S[S.length-2];M(S),I.left===b?I.left=null:I.right=null}return new c(this.tree._compare,S[0])},Object.defineProperty(o,"key",{get:function(){if(this._stack.length>0)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 x<S?-1:x>S?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<<Y&&(J=N,te=k,ae=_,ce=O),J[Y]=z[0][Y],te[Y]=z[1][Y],B[Y]>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;b<o.length;++b)if(S=n.positive(S,o[b]),S.length<3)return 0;for(var a=S[0],E=a[0]/a[3],y=a[1]/a[3],z=0,b=1;b+1<S.length;++b){var I=S[b],B=S[b+1],k=I[0]/I[3],O=I[1]/I[3],N=B[0]/B[3],_=B[1]/B[3],U=k-E,Y=O-y,J=N-E,te=_-y;z+=Math.abs(U*te-Y*J)}return z}var M=[1,1,1],T=[0,0,0],C={cubeEdges:M,axis:T};function x(S,b,a,E,y){s(c,b,S),s(c,a,c);for(var z=0,I=0;I<2;++I){f[2]=E[I][2];for(var B=0;B<2;++B){f[1]=E[B][1];for(var k=0;k<2;++k)f[0]=E[k][0],h(u[z],f,c),z+=1}}for(var O=-1,I=0;I<8;++I){for(var N=u[I][3],_=0;_<3;++_)g[I][_]=u[I][_]/N;y&&(g[I][2]*=-1),N<0&&(O<0||g[I][2]<g[O][2])&&(O=I)}if(O<0){O=0;for(var U=0;U<3;++U){for(var Y=(U+2)%3,J=(U+1)%3,te=-1,ae=-1,ce=0;ce<2;++ce){var Q=ce<<U,Z=Q+(ce<<Y)+(1-ce<<J),j=Q+(1-ce<<Y)+(ce<<J);l(g[Q],g[Z],g[j],w)<0||(ce?te=1:ae=1)}if(te<0||ae<0){ae>te&&(O|=1<<U);continue}for(var ce=0;ce<2;++ce){var Q=ce<<U,Z=Q+(ce<<Y)+(1-ce<<J),j=Q+(1-ce<<Y)+(ce<<J),K=d([u[Q],u[Z],u[j],u[Q+(1<<Y)+(1<<J)]]);ce?te=K:ae=K}if(ae>te){O|=1<<U;continue}}}for(var ee=7^O,oe=-1,I=0;I<8;++I)I===O||I===ee||(oe<0||g[oe][1]>g[I][1])&&(oe=I);for(var q=-1,I=0;I<3;++I){var $=oe^1<<I;if(!($===O||$===ee)){q<0&&(q=$);var J=g[$];J[0]<g[q][0]&&(q=$)}}for(var le=-1,I=0;I<3;++I){var $=oe^1<<I;if(!($===O||$===ee||$===q)){le<0&&(le=$);var J=g[$];J[0]>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&le;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<<U?me[U]=-1:me[U]=1;return C}},1681:function(v,p,t){v.exports=M;var r=t(5827),s=t(2944),n=t(1943).j,l=[0,0,0],c=[0,0,0],u=[0,0,0],g=[0,0,0],f=[1,1];function w(T){return T[0]=T[1]=T[2]=0,T}function h(T,C){return T[0]=C[0],T[1]=C[1],T[2]=C[2],T}function o(T,C,x,S,b,a,E,y){this.gl=T,this.vertBuffer=C,this.vao=x,this.shader=S,this.tickCount=b,this.tickOffset=a,this.gridCount=E,this.gridOffset=y}var d=o.prototype;d.bind=function(T,C,x){this.shader.bind(),this.shader.uniforms.model=T,this.shader.uniforms.view=C,this.shader.uniforms.projection=x,f[0]=this.gl.drawingBufferWidth,f[1]=this.gl.drawingBufferHeight,this.shader.uniforms.screenShape=f,this.vao.bind()},d.unbind=function(){this.vao.unbind()},d.drawAxisLine=function(T,C,x,S,b){var a=w(c);this.shader.uniforms.majorAxis=c,a[T]=C[1][T]-C[0][T],this.shader.uniforms.minorAxis=a;var E=h(g,x);E[T]+=C[0][T],this.shader.uniforms.offset=E,this.shader.uniforms.lineWidth=b,this.shader.uniforms.color=S;var y=w(u);y[(T+2)%3]=1,this.shader.uniforms.screenAxis=y,this.vao.draw(this.gl.TRIANGLES,6);var y=w(u);y[(T+1)%3]=1,this.shader.uniforms.screenAxis=y,this.vao.draw(this.gl.TRIANGLES,6)},d.drawAxisTicks=function(T,C,x,S,b){if(this.tickCount[T]){var a=w(l);a[T]=1,this.shader.uniforms.majorAxis=a,this.shader.uniforms.offset=C,this.shader.uniforms.minorAxis=x,this.shader.uniforms.color=S,this.shader.uniforms.lineWidth=b;var E=w(u);E[T]=1,this.shader.uniforms.screenAxis=E,this.vao.draw(this.gl.TRIANGLES,this.tickCount[T],this.tickOffset[T])}},d.drawGrid=function(T,C,x,S,b,a){if(this.gridCount[T]){var E=w(c);E[C]=x[1][C]-x[0][C],this.shader.uniforms.minorAxis=E;var y=h(g,S);y[C]+=x[0][C],this.shader.uniforms.offset=y;var z=w(l);z[T]=1,this.shader.uniforms.majorAxis=z;var I=w(u);I[T]=1,this.shader.uniforms.screenAxis=I,this.shader.uniforms.lineWidth=a,this.shader.uniforms.color=b,this.vao.draw(this.gl.TRIANGLES,this.gridCount[T],this.gridOffset[T])}},d.drawZero=function(T,C,x,S,b,a){var E=w(c);this.shader.uniforms.majorAxis=E,E[T]=x[1][T]-x[0][T],this.shader.uniforms.minorAxis=E;var y=h(g,S);y[T]+=x[0][T],this.shader.uniforms.offset=y;var z=w(u);z[C]=1,this.shader.uniforms.screenAxis=z,this.shader.uniforms.lineWidth=a,this.shader.uniforms.color=b,this.vao.draw(this.gl.TRIANGLES,6)},d.dispose=function(){this.vao.dispose(),this.vertBuffer.dispose(),this.shader.dispose()};function M(T,C,x){var S=[],b=[0,0,0],a=[0,0,0],E=[0,0,0],y=[0,0,0];S.push(0,0,1,0,1,1,0,0,-1,0,0,-1,0,1,1,0,1,-1);for(var z=0;z<3;++z){for(var k=S.length/3|0,I=0;I<x[z].length;++I){var B=+x[z][I].x;S.push(B,0,1,B,1,1,B,0,-1,B,0,-1,B,1,1,B,1,-1)}var N=S.length/3|0;b[z]=k,a[z]=N-k;for(var k=S.length/3|0,O=0;O<x[z].length;++O){var B=+x[z][O].x;S.push(B,0,1,B,1,1,B,0,-1,B,0,-1,B,1,1,B,1,-1)}var N=S.length/3|0;E[z]=k,y[z]=N-k}var _=r(T,new Float32Array(S)),U=s(T,[{buffer:_,type:T.FLOAT,size:3,stride:0,offset:0}]),Y=n(T);return Y.attributes.position.location=0,new o(T,_,U,Y,a,b,y,E)}},1943:function(v,p,t){var r=t(6832),s=t(5158),n=r([`precision highp float;
#define GLSLIFY 1
attribute vec3 position;
uniform mat4 model, view, projection;
uniform vec3 offset, majorAxis, minorAxis, screenAxis;
uniform float lineWidth;
uniform vec2 screenShape;
vec3 project(vec3 p) {
vec4 pp = projection * view * model * vec4(p, 1.0);
return pp.xyz / max(pp.w, 0.0001);
}
void main() {
vec3 major = position.x * majorAxis;
vec3 minor = position.y * minorAxis;
vec3 vPosition = major + minor + offset;
vec3 pPosition = project(vPosition);
vec3 offset = project(vPosition + screenAxis * position.z);
vec2 screen = normalize((offset - pPosition).xy * screenShape) / screenShape;
gl_Position = vec4(pPosition + vec3(0.5 * screen * lineWidth, 0), 1.0);
}
`]),l=r([`precision highp float;
#define GLSLIFY 1
uniform vec4 color;
void main() {
gl_FragColor = color;
}`]);p.j=function(w){return s(w,n,l,null,[{name:"position",type:"vec3"}])};var c=r([`precision highp float;
#define GLSLIFY 1
attribute vec3 position;
uniform mat4 model, view, projection;
uniform vec3 offset, axis, alignDir, alignOpt;
uniform float scale, angle, pixelScale;
uniform vec2 resolution;
vec3 project(vec3 p) {
vec4 pp = projection * view * model * vec4(p, 1.0);
return pp.xyz / max(pp.w, 0.0001);
}
float computeViewAngle(vec3 a, vec3 b) {
vec3 A = project(a);
vec3 B = project(b);
return atan(
(B.y - A.y) * resolution.y,
(B.x - A.x) * resolution.x
);
}
const float PI = 3.141592;
const float TWO_PI = 2.0 * PI;
const float HALF_PI = 0.5 * PI;
const float ONE_AND_HALF_PI = 1.5 * PI;
int option = int(floor(alignOpt.x + 0.001));
float hv_ratio = alignOpt.y;
bool enableAlign = (alignOpt.z != 0.0);
float mod_angle(float a) {
return mod(a, PI);
}
float positive_angle(float a) {
return mod_angle((a < 0.0) ?
a + TWO_PI :
a
);
}
float look_upwards(float a) {
float b = positive_angle(a);
return ((b > 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<oe;++ee)for(var q=K[ee],$=2;$>=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<x[O].length;++N)x[O][N].text&&a(x[O][N].x,x[O][N].text,x[O][N].font||S,x[O][N].fontSize||12,B,k);y[O]=(b.length/g|0)-E[O]}this.buffer.update(b),this.tickOffset=E,this.tickCount=y,this.labelOffset=z,this.labelCount=I},w.drawTicks=function(M,T,C,x,S,b,a,E){this.tickCount[M]&&(this.shader.uniforms.axis=b,this.shader.uniforms.color=S,this.shader.uniforms.angle=C,this.shader.uniforms.scale=T,this.shader.uniforms.offset=x,this.shader.uniforms.alignDir=a,this.shader.uniforms.alignOpt=E,this.vao.draw(this.gl.TRIANGLES,this.tickCount[M],this.tickOffset[M]))},w.drawLabel=function(M,T,C,x,S,b,a,E){this.labelCount[M]&&(this.shader.uniforms.axis=b,this.shader.uniforms.color=S,this.shader.uniforms.angle=C,this.shader.uniforms.scale=T,this.shader.uniforms.offset=x,this.shader.uniforms.alignDir=a,this.shader.uniforms.alignOpt=E,this.vao.draw(this.gl.TRIANGLES,this.labelCount[M],this.labelOffset[M]))},w.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()};function o(M,T){try{return n(M,T)}catch(C){return console.warn('error vectorizing text:"'+M+'" error:',C),{cells:[],positions:[]}}}function d(M,T,C,x,S,b){var a=r(M),E=s(M,[{buffer:a,size:3}]),y=l(M);y.attributes.position.location=0;var z=new f(M,y,a,E);return z.update(T,C,x,S,b),z}},8468:function(v,p){p.create=r,p.equal=s;function t(n,l){var c=n+"",u=c.indexOf("."),g=0;u>=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<g;)T="0"+T;return M+"."+T}else return M}function r(n,l){for(var c=[],u=0;u<3;++u){var g=[];.5*(n[0][u]+n[1][u]);for(var f=0;f*l[u]<=n[1][u];++f)g.push({x:f*l[u],text:t(l[u],f)});for(var f=-1;f*l[u]>=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;u<n[c].length;++u){var g=n[c][u],f=l[c][u];if(g.x!==f.x||g.text!==f.text||g.font!==f.font||g.fontColor!==f.fontColor||g.fontSize!==f.fontSize||g.dx!==f.dx||g.dy!==f.dy)return!1}}return!0}},2771:function(v,p,t){v.exports=C;var r=t(5795),s=t(4670),n=t(2864),l=t(104),c=t(2142),u=t(6342),g=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),f=new Float32Array(16);function w(x,S,b){this.lo=x,this.hi=S,this.pixelsPerDataUnit=b}var h=[0,0,0,1],o=[0,0,0,1];function d(x,S,b,a,E){for(var y=0;y<3;++y){for(var z=h,I=o,B=0;B<3;++B)I[B]=z[B]=b[B];I[3]=z[3]=1,I[y]+=1,u(I,I,S),I[3]<0&&(x[y]=1/0),z[y]-=1,u(z,z,S),z[3]<0&&(x[y]=1/0);var k=(z[0]/z[3]-I[0]/I[3])*a,O=(z[1]/z[3]-I[1]/I[3])*E;x[y]=.25*Math.sqrt(k*k+O*O)}return x}var M=[new w(1/0,-1/0,1/0),new w(1/0,-1/0,1/0),new w(1/0,-1/0,1/0)],T=[0,0,0];function C(x,S,b,a,O){var y=S.model||g,z=S.view||g,I=S.projection||g,B=S._ortho||!1,k=x.bounds,O=O||n(y,z,I,k,B),N=O.axis;l(f,z,y),l(f,I,f);for(var _=M,U=0;U<3;++U)_[U].lo=1/0,_[U].hi=-1/0,_[U].pixelsPerDataUnit=1/0;var Y=r(c(f,f));c(f,f);for(var J=0;J<3;++J){var te=(J+1)%3,ae=(J+2)%3,ce=T;e:for(var U=0;U<2;++U){var Q=[];if(N[J]<0!=!!U){ce[J]=k[U][J];for(var Z=0;Z<2;++Z){ce[te]=k[Z^U][te];for(var j=0;j<2;++j)ce[ae]=k[j^Z^U][ae],Q.push(ce.slice())}for(var K=B?5:4,Z=K;Z===K;++Z){if(Q.length===0)continue e;Q=s.positive(Q,Y[Z])}for(var Z=0;Z<Q.length;++Z)for(var ae=Q[Z],ee=d(T,f,ae,b,a),j=0;j<3;++j)_[j].lo=Math.min(_[j].lo,ae[j]),_[j].hi=Math.max(_[j].hi,ae[j]),j!==J&&(_[j].pixelsPerDataUnit=Math.min(_[j].pixelsPerDataUnit,Math.abs(ee[j])))}}}return _}},5827:function(v,p,t){var r=t(5306),s=t(7498),n=t(5050),l=["uint8","uint8_clamped","uint16","uint32","int8","int16","int32","float32"];function c(o,d,M,T,C){this.gl=o,this.type=d,this.handle=M,this.length=T,this.usage=C}var u=c.prototype;u.bind=function(){this.gl.bindBuffer(this.type,this.handle)},u.unbind=function(){this.gl.bindBuffer(this.type,null)},u.dispose=function(){this.gl.deleteBuffer(this.handle)};function g(o,d,M,T,C,x){var S=C.length*C.BYTES_PER_ELEMENT;if(x<0)return o.bufferData(d,C,T),S;if(S+x>M)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<T;++C)M[C]=o[C];return M}function w(o,d){for(var M=1,T=d.length-1;T>=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;E<c.length;E++){var y=c[E];w=Math.min(y[0],w),h=Math.max(y[0],h),o=Math.min(y[1],o),d=Math.max(y[1],d),M=Math.min(y[2],M),T=Math.max(y[2],T);var z=u[E];if(r.length(z)>f&&(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<c.length;E++)for(var y=c[E],U=y[0],Y=y[1],J=y[2],te=S[E],ae=r.length(te)*O,ce=0,Q=8;ce<Q;ce++){g.positions.push([U,Y,J,_++]),g.positions.push([U,Y,J,_++]),g.positions.push([U,Y,J,_++]),g.positions.push([U,Y,J,_++]),g.positions.push([U,Y,J,_++]),g.positions.push([U,Y,J,_++]),g.vectors.push(te),g.vectors.push(te),g.vectors.push(te),g.vectors.push(te),g.vectors.push(te),g.vectors.push(te),g.vertexIntensity.push(ae,ae,ae),g.vertexIntensity.push(ae,ae,ae);var Z=g.positions.length;g.cells.push([Z-6,Z-5,Z-4],[Z-3,Z-2,Z-1])}return g};var s=t(7234);v.exports.createMesh=t(5028),v.exports.createConeMesh=function(n,l){return v.exports.createMesh(n,l,{shaders:s,traceType:"cone"})}},5028:function(v,p,t){var r=t(5158),s=t(5827),n=t(2944),l=t(8931),c=t(104),u=t(7437),g=t(5050),f=t(9156),w=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function h(S,b,a,E,y,z,I,B,k,O,N){this.gl=S,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=b,this.dirty=!0,this.triShader=a,this.pickShader=E,this.trianglePositions=y,this.triangleVectors=z,this.triangleColors=B,this.triangleUVs=k,this.triangleIds=I,this.triangleVAO=O,this.triangleCount=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.traceType=N,this.tubeScale=1,this.coneScale=2,this.vectorScale=1,this.coneOffset=.25,this._model=w,this._view=w,this._projection=w,this._resolution=[1,1]}var o=h.prototype;o.isOpaque=function(){return this.opacity>=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;E<b;++E)a[E]=S[E][2];return a}o.update=function(S){S=S||{};var b=this.gl;this.dirty=!0,"lightPosition"in S&&(this.lightPosition=S.lightPosition),"opacity"in S&&(this.opacity=S.opacity),"ambient"in S&&(this.ambientLight=S.ambient),"diffuse"in S&&(this.diffuseLight=S.diffuse),"specular"in S&&(this.specularLight=S.specular),"roughness"in S&&(this.roughness=S.roughness),"fresnel"in S&&(this.fresnel=S.fresnel),S.tubeScale!==void 0&&(this.tubeScale=S.tubeScale),S.vectorScale!==void 0&&(this.vectorScale=S.vectorScale),S.coneScale!==void 0&&(this.coneScale=S.coneScale),S.coneOffset!==void 0&&(this.coneOffset=S.coneOffset),S.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=b.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=b.LINEAR,this.texture.setPixels(d(S.colormap)),this.texture.generateMipmap());var a=S.cells,E=S.positions,y=S.vectors;if(!(!E||!a||!y)){var z=[],I=[],B=[],k=[],O=[];this.cells=a,this.positions=E,this.vectors=y;var N=S.meshColor||[1,1,1,1],_=S.vertexIntensity,U=1/0,Y=-1/0;if(_)if(S.vertexIntensityBounds)U=+S.vertexIntensityBounds[0],Y=+S.vertexIntensityBounds[1];else for(var J=0;J<_.length;++J){var te=_[J];U=Math.min(U,te),Y=Math.max(Y,te)}else for(var J=0;J<E.length;++J){var te=E[J][2];U=Math.min(U,te),Y=Math.max(Y,te)}_?this.intensity=_:this.intensity=M(E),this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(var J=0;J<E.length;++J)for(var ae=E[J],ce=0;ce<3;++ce)isNaN(ae[ce])||!isFinite(ae[ce])||(this.bounds[0][ce]=Math.min(this.bounds[0][ce],ae[ce]),this.bounds[1][ce]=Math.max(this.bounds[1][ce],ae[ce]));var Q=0;e:for(var J=0;J<a.length;++J){var Z=a[J];switch(Z.length){case 3:for(var ce=0;ce<3;++ce)for(var j=Z[ce],ae=E[j],K=0;K<3;++K)if(isNaN(ae[K])||!isFinite(ae[K]))continue e;for(var ce=0;ce<3;++ce){var j=Z[2-ce],ae=E[j];z.push(ae[0],ae[1],ae[2],ae[3]);var ee=y[j];I.push(ee[0],ee[1],ee[2],ee[3]||0);var oe=N;oe.length===3?B.push(oe[0],oe[1],oe[2],1):B.push(oe[0],oe[1],oe[2],oe[3]);var q;_?q=[(_[j]-U)/(Y-U),0]:q=[(ae[2]-U)/(Y-U),0],k.push(q[0],q[1]),O.push(J)}Q+=1;break}}this.triangleCount=Q,this.trianglePositions.update(z),this.triangleVectors.update(I),this.triangleColors.update(B),this.triangleUVs.update(k),this.triangleIds.update(new Uint32Array(O))}},o.drawTransparent=o.draw=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]);var B={model:a,view:E,projection:y,inverseModel:w.slice(),clipBounds:z,kambient:this.ambientLight,kdiffuse:this.diffuseLight,kspecular:this.specularLight,roughness:this.roughness,fresnel:this.fresnel,eyePosition:[0,0,0],lightPosition:[0,0,0],opacity:this.opacity,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,texture:0};B.inverseModel=u(B.inverseModel,B.model),b.disable(b.CULL_FACE),this.texture.bind(0);var k=new Array(16);c(k,B.view,B.model),c(k,B.projection,k),u(k,k);for(var I=0;I<3;++I)B.eyePosition[I]=k[12+I]/k[15];for(var O=k[15],I=0;I<3;++I)O+=this.lightPosition[I]*k[4*I+3];for(var I=0;I<3;++I){for(var N=k[12+I],_=0;_<3;++_)N+=k[4*_+I]*this.lightPosition[_];B.lightPosition[I]=N/O}if(this.triangleCount>0){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;x<C.length;++x){var S=C[x];o.push(d[0],d[1],d[2],M[0],M[1],M[2],M[3],S[0],S[1],S[2])}return C.length}u.update=function(o){o=o||{},"lineWidth"in o&&(this.lineWidth=o.lineWidth,Array.isArray(this.lineWidth)||(this.lineWidth=[this.lineWidth,this.lineWidth,this.lineWidth])),"capSize"in o&&(this.capSize=o.capSize,Array.isArray(this.capSize)||(this.capSize=[this.capSize,this.capSize,this.capSize])),this.hasAlpha=!1,"opacity"in o&&(this.opacity=+o.opacity,this.opacity<1&&(this.hasAlpha=!0));var d=o.color||[[0,0,0],[0,0,0],[0,0,0]],M=o.position,T=o.error;if(Array.isArray(d[0])||(d=[d,d,d]),M&&T){var C=[],x=M.length,S=0;this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.lineCount=[0,0,0];for(var b=0;b<3;++b){this.lineOffset[b]=S;e:for(var a=0;a<x;++a){for(var E=M[a],y=0;y<3;++y)if(isNaN(E[y])||!isFinite(E[y]))continue e;var z=T[a],I=d[b];if(Array.isArray(I[0])&&(I=d[a]),I.length===3?I=[I[0],I[1],I[2],1]:I.length===4&&(I=[I[0],I[1],I[2],I[3]],!this.hasAlpha&&I[3]<1&&(this.hasAlpha=!0)),!(isNaN(z[0][b])||isNaN(z[1][b]))){if(z[0][b]<0){var B=E.slice();B[b]+=z[0][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)}if(z[1][b]>0){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;I<y;++I)z[I]=b.COLOR_ATTACHMENT0+I;for(var I=y;I<E;++I)z[I]=b.NONE;s[y]=z}}function h(b){switch(b){case n:throw new Error("gl-fbo: Framebuffer unsupported");case l:throw new Error("gl-fbo: Framebuffer incomplete attachment");case c:throw new Error("gl-fbo: Framebuffer incomplete dimensions");case u:throw new Error("gl-fbo: Framebuffer incomplete missing attachment");default:throw new Error("gl-fbo: Framebuffer failed for unspecified reason")}}function o(b,a,E,y,z,I){if(!y)return null;var B=r(b,a,E,z,y);return B.magFilter=b.NEAREST,B.minFilter=b.NEAREST,B.mipSamples=1,B.bind(),b.framebufferTexture2D(b.FRAMEBUFFER,I,b.TEXTURE_2D,B.handle,0),B}function d(b,a,E,y,z){var I=b.createRenderbuffer();return b.bindRenderbuffer(b.RENDERBUFFER,I),b.renderbufferStorage(b.RENDERBUFFER,y,a,E),b.framebufferRenderbuffer(b.FRAMEBUFFER,z,b.RENDERBUFFER,I),I}function M(b){var a=g(b.gl),E=b.gl,y=b.handle=E.createFramebuffer(),z=b._shape[0],I=b._shape[1],B=b.color.length,k=b._ext,O=b._useStencil,N=b._useDepth,_=b._colorType;E.bindFramebuffer(E.FRAMEBUFFER,y);for(var U=0;U<B;++U)b.color[U]=o(E,z,I,_,E.RGBA,E.COLOR_ATTACHMENT0+U);B===0?(b._color_rb=d(E,z,I,E.RGBA4,E.COLOR_ATTACHMENT0),k&&k.drawBuffersWEBGL(s[0])):B>1&&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;U<b.color.length;++U)b.color[U].dispose(),b.color[U]=null;b._color_rb&&(E.deleteRenderbuffer(b._color_rb),b._color_rb=null),f(E,a),h(J)}f(E,a)}function T(b,a,E,y,z,I,B,k){this.gl=b,this._shape=[a|0,E|0],this._destroyed=!1,this._ext=k,this.color=new Array(z);for(var O=0;O<z;++O)this.color[O]=null;this._color_rb=null,this.depth=null,this._depth_rb=null,this._colorType=y,this._useDepth=I,this._useStencil=B;var N=this,_=[a|0,E|0];Object.defineProperties(_,{0:{get:function(){return N._shape[0]},set:function(U){return N.width=U}},1:{get:function(){return N._shape[1]},set:function(U){return N.height=U}}}),this._shapeVector=_,M(this)}var C=T.prototype;function x(b,a,E){if(b._destroyed)throw new Error("gl-fbo: Can't resize destroyed FBO");if(!(b._shape[0]===a&&b._shape[1]===E)){var y=b.gl,z=y.getParameter(y.MAX_RENDERBUFFER_SIZE);if(a<0||a>z||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;B<b.color.length;++B)b.color[B].shape=b._shape;b._color_rb&&(y.bindRenderbuffer(y.RENDERBUFFER,b._color_rb),y.renderbufferStorage(y.RENDERBUFFER,y.RGBA4,b._shape[0],b._shape[1])),b.depth&&(b.depth.shape=b._shape),b._depth_rb&&(y.bindRenderbuffer(y.RENDERBUFFER,b._depth_rb),b._useDepth&&b._useStencil?y.renderbufferStorage(y.RENDERBUFFER,y.DEPTH_STENCIL,b._shape[0],b._shape[1]):b._useDepth?y.renderbufferStorage(y.RENDERBUFFER,y.DEPTH_COMPONENT16,b._shape[0],b._shape[1]):b._useStencil&&y.renderbufferStorage(y.RENDERBUFFER,y.STENCIL_INDEX,b._shape[0],b._shape[1])),y.bindFramebuffer(y.FRAMEBUFFER,b.handle);var k=y.checkFramebufferStatus(y.FRAMEBUFFER);k!==y.FRAMEBUFFER_COMPLETE&&(b.dispose(),f(y,I),h(k)),f(y,I)}}Object.defineProperties(C,{shape:{get:function(){return this._destroyed?[0,0]:this._shapeVector},set:function(b){if(Array.isArray(b)||(b=[b|0,b|0]),b.length!==2)throw new Error("gl-fbo: Shape vector must be length 2");var a=b[0]|0,E=b[1]|0;return x(this,a,E),[a,E]},enumerable:!1},width:{get:function(){return this._destroyed?0:this._shape[0]},set:function(b){return b=b|0,x(this,b,this._shape[1]),b},enumerable:!1},height:{get:function(){return this._destroyed?0:this._shape[1]},set:function(b){return b=b|0,x(this,this._shape[0],b),b},enumerable:!1}}),C.bind=function(){if(!this._destroyed){var b=this.gl;b.bindFramebuffer(b.FRAMEBUFFER,this.handle),b.viewport(0,0,this._shape[0],this._shape[1])}},C.dispose=function(){if(!this._destroyed){this._destroyed=!0;var b=this.gl;b.deleteFramebuffer(this.handle),this.handle=null,this.depth&&(this.depth.dispose(),this.depth=null),this._depth_rb&&(b.deleteRenderbuffer(this._depth_rb),this._depth_rb=null);for(var a=0;a<this.color.length;++a)this.color[a].dispose(),this.color[a]=null;this._color_rb&&(b.deleteRenderbuffer(this._color_rb),this._color_rb=null)}};function S(b,a,E,y){n||(n=b.FRAMEBUFFER_UNSUPPORTED,l=b.FRAMEBUFFER_INCOMPLETE_ATTACHMENT,c=b.FRAMEBUFFER_INCOMPLETE_DIMENSIONS,u=b.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT);var z=b.getExtension("WEBGL_draw_buffers");if(!s&&z&&w(b,z),Array.isArray(a)&&(y=E,E=a[1]|0,a=a[0]|0),typeof a!="number")throw new Error("gl-fbo: Missing shape parameter");var I=b.getParameter(b.MAX_RENDERBUFFER_SIZE);if(a<0||a>I||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<M.length;C++){var x=M[C];if(!(x===""||x==="\0")){var S=parseInt(x.split(":")[2]);if(isNaN(S))throw new Error(r("Could not parse error: %s",x));T[S]=x}}for(var b=l(g).split(`
`),C=0;C<b.length;C++)if(!(!T[C+3]&&!T[C+2]&&!T[C+1])){var a=b[C];if(o+=a+`
`,T[C+1]){var E=T[C+1];E=E.substr(E.split(":",3).join(":").length+1).trim(),o+=r(`^^^ %s
`,E)}}return{long:o.trim(),short:d.trim()}}},6386:function(v,p,t){v.exports=h;var r=t(5070),s=t(9560),n=t(5306),l=t(5158),c=t(5827),u=t(1292);function g(o,d,M,T,C,x,S){this.plot=o,this.shader=d,this.pickShader=M,this.positionBuffer=T,this.weightBuffer=C,this.colorBuffer=x,this.idBuffer=S,this.xData=[],this.yData=[],this.shape=[0,0],this.bounds=[1/0,1/0,-1/0,-1/0],this.pickOffset=0}var f=g.prototype,w=[0,0,1,0,0,1,1,0,1,1,0,1];f.draw=function(){var o=[1,0,0,0,1,0,0,0,1];return function(){var d=this.plot,M=this.shader,T=this.bounds,C=this.numVertices;if(!(C<=0)){var x=d.gl,S=d.dataBox,b=T[2]-T[0],a=T[3]-T[1],E=S[2]-S[0],y=S[3]-S[1];o[0]=2*b/E,o[4]=2*a/y,o[6]=2*(T[0]-S[0])/E-1,o[7]=2*(T[1]-S[1])/y-1,M.bind();var z=M.uniforms;z.viewTransform=o,z.shape=this.shape;var I=M.attributes;this.positionBuffer.bind(),I.position.pointer(),this.weightBuffer.bind(),I.weight.pointer(x.UNSIGNED_BYTE,!1),this.colorBuffer.bind(),I.color.pointer(x.UNSIGNED_BYTE,!0),x.drawArrays(x.TRIANGLES,0,C)}}}(),f.drawPick=function(){var o=[1,0,0,0,1,0,0,0,1],d=[0,0,0,0];return function(M){var T=this.plot,C=this.pickShader,x=this.bounds,S=this.numVertices;if(!(S<=0)){var b=T.gl,a=T.dataBox,E=x[2]-x[0],y=x[3]-x[1],z=a[2]-a[0],I=a[3]-a[1];o[0]=2*E/z,o[4]=2*y/I,o[6]=2*(x[0]-a[0])/z-1,o[7]=2*(x[1]-a[1])/I-1;for(var B=0;B<4;++B)d[B]=M>>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||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<Z;++j){var K,ee;x?(K=O*(T[j]-z),ee=O*(T[j+1]-z)):(K=j<_-1?O*(T[j]-(T[j+1]-T[j])/2-z):O*(T[j]-(T[j]-T[j-1])/2-z),ee=j<_-1?O*(T[j]+(T[j+1]-T[j])/2-z):O*(T[j]+(T[j]-T[j-1])/2-z));for(var oe=0;oe<Q;++oe){var q,$;x?(q=k*(M[oe]-y),$=k*(M[oe+1]-y)):(q=oe<N-1?k*(M[oe]-(M[oe+1]-M[oe])/2-y):k*(M[oe]-(M[oe]-M[oe-1])/2-y),$=oe<N-1?k*(M[oe]+(M[oe+1]-M[oe])/2-y):k*(M[oe]+(M[oe]-M[oe-1])/2-y));for(var le=0;le<w.length;le+=2){var ie=w[le],he=w[le+1],me=x?(j+he)*N+(oe+ie):j*N+oe,Me=C[me],Te=r.le(S,Me),Oe,Ne,Ee,xe;if(Te<0)Oe=b[0],Ne=b[1],Ee=b[2],xe=b[3];else if(Te===a-1)Oe=b[4*a-4],Ne=b[4*a-3],Ee=b[4*a-2],xe=b[4*a-1];else{var Se=(Me-S[Te])/(S[Te+1]-S[Te]),Ue=1-Se,He=4*Te,Fe=4*(Te+1);Oe=Ue*b[He]+Se*b[Fe],Ne=Ue*b[He+1]+Se*b[Fe+1],Ee=Ue*b[He+2]+Se*b[Fe+2],xe=Ue*b[He+3]+Se*b[Fe+3]}Y[4*ce]=255*Oe,Y[4*ce+1]=255*Ne,Y[4*ce+2]=255*Ee,Y[4*ce+3]=255*xe,J[2*ce]=q*.5+$*.5,J[2*ce+1]=K*.5+ee*.5,te[2*ce]=ie,te[2*ce+1]=he,ae[ce]=j*N+oe,ce+=1}}}this.positionBuffer.update(J),this.weightBuffer.update(te),this.colorBuffer.update(Y),this.idBuffer.update(ae),n.free(J),n.free(Y),n.free(te),n.free(ae)},f.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.positionBuffer.dispose(),this.weightBuffer.dispose(),this.colorBuffer.dispose(),this.idBuffer.dispose(),this.plot.removeObject(this)};function h(o,d){var M=o.gl,T=l(M,u.vertex,u.fragment),C=l(M,u.pickVertex,u.pickFragment),x=c(M),S=c(M),b=c(M),a=c(M),E=new g(o,T,C,x,S,b,a);return E.update(d),o.addObject(E),E}},1292:function(v,p,t){var r=t(6832);v.exports={fragment:r([`precision lowp float;
#define GLSLIFY 1
varying vec4 fragColor;
void main() {
gl_FragColor = vec4(fragColor.rgb * fragColor.a, fragColor.a);
}
`]),vertex:r([`precision mediump float;
#define GLSLIFY 1
attribute vec2 position;
attribute vec4 color;
attribute vec2 weight;
uniform vec2 shape;
uniform mat3 viewTransform;
varying vec4 fragColor;
void main() {
vec3 vPosition = viewTransform * vec3( position + (weight-.5)/(shape-1.) , 1.0);
fragColor = color;
gl_Position = vec4(vPosition.xy, 0, vPosition.z);
}
`]),pickFragment:r([`precision mediump float;
#define GLSLIFY 1
varying vec4 fragId;
varying vec2 vWeight;
uniform vec2 shape;
uniform vec4 pickOffset;
void main() {
vec2 d = step(.5, vWeight);
vec4 id = fragId + pickOffset;
id.x += d.x + d.y*shape.x;
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;
gl_FragColor = id/255.;
}
`]),pickVertex:r([`precision mediump float;
#define GLSLIFY 1
attribute vec2 position;
attribute vec4 pickId;
attribute vec2 weight;
uniform vec2 shape;
uniform mat3 viewTransform;
varying vec4 fragId;
varying vec2 vWeight;
void main() {
vWeight = weight;
fragId = pickId;
vec3 vPosition = viewTransform * vec3( position + (weight-.5)/(shape-1.) , 1.0);
gl_Position = vec4(vPosition.xy, 0, vPosition.z);
}
`])}},248:function(v,p,t){var r=t(6832),s=t(5158),n=r([`precision highp float;
#define GLSLIFY 1
attribute vec3 position, nextPosition;
attribute float arcLength, lineWidth;
attribute vec4 color;
uniform vec2 screenShape;
uniform float pixelRatio;
uniform mat4 model, view, projection;
varying vec4 fragColor;
varying vec3 worldPosition;
varying float pixelArcLength;
vec4 project(vec3 p) {
return projection * view * model * vec4(p, 1.0);
}
void main() {
vec4 startPoint = project(position);
vec4 endPoint = project(nextPosition);
vec2 A = startPoint.xy / startPoint.w;
vec2 B = endPoint.xy / endPoint.w;
float clipAngle = atan(
(B.y - A.y) * screenShape.y,
(B.x - A.x) * screenShape.x
);
vec2 offset = 0.5 * pixelRatio * lineWidth * vec2(
sin(clipAngle),
-cos(clipAngle)
) / screenShape;
gl_Position = vec4(startPoint.xy + startPoint.w * offset, startPoint.zw);
worldPosition = position;
pixelArcLength = arcLength;
fragColor = color;
}
`]),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 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;E<U.length;++E){var ae=U[E-1],ce=U[E];for(B.push(O),k.push(ae.slice()),y=0;y<3;++y){if(isNaN(ae[y])||isNaN(ce[y])||!isFinite(ae[y])||!isFinite(ce[y])){if(!z&&I.length>0){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;E<q.length;++E)q[E]=q[E-1]+q[E];var $=f(new Array(256*4),[256,1,4]);for(E=0;E<256;++E){for(y=0;y<4;++y)$.set(E,0,y,0);g.le(q,q[q.length-1]*E/255)&1?$.set(E,0,0,0):$.set(E,0,0,255)}this.texture.setPixels($)}},S.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()},S.pick=function(a){if(!a||a.id!==this.pickId)return null;var E=u(a.value[0],a.value[1],a.value[2],0),y=g.le(this.arcLength,E);if(y<0)return null;if(y===this.arcLength.length-1)return new C(this.arcLength[this.arcLength.length-1],this.points[this.points.length-1].slice(),y);for(var z=this.points[y],I=this.points[Math.min(y+1,this.points.length-1)],B=(E-this.arcLength[y])/(this.arcLength[y+1]-this.arcLength[y]),k=1-B,O=[0,0,0],N=0;N<3;++N)O[N]=k*z[N]+B*I[N];var _=Math.min(B<.5?y:y+1,this.points.length-1);return new C(E,O,_,this.points[_])};function b(a){var E=a.gl||a.scene&&a.scene.gl,y=h(E);y.attributes.position.location=0,y.attributes.nextPosition.location=1,y.attributes.arcLength.location=2,y.attributes.lineWidth.location=3,y.attributes.color.location=4;var z=o(E);z.attributes.position.location=0,z.attributes.nextPosition.location=1,z.attributes.arcLength.location=2,z.attributes.lineWidth.location=3,z.attributes.color.location=4;for(var I=r(E),B=s(E,[{buffer:I,size:3,offset:0,stride:48},{buffer:I,size:3,offset:12,stride:48},{buffer:I,size:1,offset:24,stride:48},{buffer:I,size:1,offset:28,stride:48},{buffer:I,size:4,offset:32,stride:48}]),k=f(new Array(256*4),[256,1,4]),O=0;O<1024;++O)k.data[O]=255;var N=n(E,k);N.wrap=E.REPEAT;var _=new x(E,y,z,I,B,N);return _.update(a),_}},7332:function(v){v.exports=p;function p(t){var r=new Float32Array(16);return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4],r[5]=t[5],r[6]=t[6],r[7]=t[7],r[8]=t[8],r[9]=t[9],r[10]=t[10],r[11]=t[11],r[12]=t[12],r[13]=t[13],r[14]=t[14],r[15]=t[15],r}},9823:function(v){v.exports=p;function p(){var t=new Float32Array(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},7787:function(v){v.exports=p;function p(t){var r=t[0],s=t[1],n=t[2],l=t[3],c=t[4],u=t[5],g=t[6],f=t[7],w=t[8],h=t[9],o=t[10],d=t[11],M=t[12],T=t[13],C=t[14],x=t[15],S=r*u-s*c,b=r*g-n*c,a=r*f-l*c,E=s*g-n*u,y=s*f-l*u,z=n*f-l*g,I=w*T-h*M,B=w*C-o*M,k=w*x-d*M,O=h*C-o*T,N=h*x-d*T,_=o*x-d*C;return S*_-b*N+a*O+E*k-y*B+z*I}},5950: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,g=n+n,f=l+l,w=s*u,h=n*u,o=n*g,d=l*u,M=l*g,T=l*f,C=c*u,x=c*g,S=c*f;return t[0]=1-o-T,t[1]=h+S,t[2]=d-x,t[3]=0,t[4]=h-S,t[5]=1-w-T,t[6]=M+C,t[7]=0,t[8]=d+x,t[9]=M-C,t[10]=1-w-o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},7280:function(v){v.exports=p;function p(t,r,s){var n=r[0],l=r[1],c=r[2],u=r[3],g=n+n,f=l+l,w=c+c,h=n*g,o=n*f,d=n*w,M=l*f,T=l*w,C=c*w,x=u*g,S=u*f,b=u*w;return t[0]=1-(M+C),t[1]=o+b,t[2]=d-S,t[3]=0,t[4]=o-b,t[5]=1-(h+C),t[6]=T+x,t[7]=0,t[8]=d+S,t[9]=T-x,t[10]=1-(h+M),t[11]=0,t[12]=s[0],t[13]=s[1],t[14]=s[2],t[15]=1,t}},9947:function(v){v.exports=p;function p(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},7437:function(v){v.exports=p;function p(t,r){var s=r[0],n=r[1],l=r[2],c=r[3],u=r[4],g=r[5],f=r[6],w=r[7],h=r[8],o=r[9],d=r[10],M=r[11],T=r[12],C=r[13],x=r[14],S=r[15],b=s*g-n*u,a=s*f-l*u,E=s*w-c*u,y=n*f-l*g,z=n*w-c*g,I=l*w-c*f,B=h*C-o*T,k=h*x-d*T,O=h*S-M*T,N=o*x-d*C,_=o*S-M*C,U=d*S-M*x,Y=b*U-a*_+E*N+y*O-z*k+I*B;return Y?(Y=1/Y,t[0]=(g*U-f*_+w*N)*Y,t[1]=(l*_-n*U-c*N)*Y,t[2]=(C*I-x*z+S*y)*Y,t[3]=(d*z-o*I-M*y)*Y,t[4]=(f*O-u*U-w*k)*Y,t[5]=(s*U-l*O+c*k)*Y,t[6]=(x*E-T*I-S*a)*Y,t[7]=(h*I-d*E+M*a)*Y,t[8]=(u*_-g*O+w*B)*Y,t[9]=(n*O-s*_-c*B)*Y,t[10]=(T*z-C*E+S*b)*Y,t[11]=(o*E-h*z-M*b)*Y,t[12]=(g*k-u*N-f*B)*Y,t[13]=(s*N-n*k+l*B)*Y,t[14]=(C*a-T*y-x*b)*Y,t[15]=(h*y-o*a+d*b)*Y,t):null}},3012:function(v,p,t){var r=t(9947);v.exports=s;function s(n,l,c,u){var g,f,w,h,o,d,M,T,C,x,S=l[0],b=l[1],a=l[2],E=u[0],y=u[1],z=u[2],I=c[0],B=c[1],k=c[2];return Math.abs(S-I)<1e-6&&Math.abs(b-B)<1e-6&&Math.abs(a-k)<1e-6?r(n):(M=S-I,T=b-B,C=a-k,x=1/Math.sqrt(M*M+T*T+C*C),M*=x,T*=x,C*=x,g=y*C-z*T,f=z*M-E*C,w=E*T-y*M,x=Math.sqrt(g*g+f*f+w*w),x?(x=1/x,g*=x,f*=x,w*=x):(g=0,f=0,w=0),h=T*w-C*f,o=C*g-M*w,d=M*f-T*g,x=Math.sqrt(h*h+o*o+d*d),x?(x=1/x,h*=x,o*=x,d*=x):(h=0,o=0,d=0),n[0]=g,n[1]=h,n[2]=M,n[3]=0,n[4]=f,n[5]=o,n[6]=T,n[7]=0,n[8]=w,n[9]=d,n[10]=C,n[11]=0,n[12]=-(g*S+f*b+w*a),n[13]=-(h*S+o*b+d*a),n[14]=-(M*S+T*b+C*a),n[15]=1,n)}},104:function(v){v.exports=p;function p(t,r,s){var n=r[0],l=r[1],c=r[2],u=r[3],g=r[4],f=r[5],w=r[6],h=r[7],o=r[8],d=r[9],M=r[10],T=r[11],C=r[12],x=r[13],S=r[14],b=r[15],a=s[0],E=s[1],y=s[2],z=s[3];return t[0]=a*n+E*g+y*o+z*C,t[1]=a*l+E*f+y*d+z*x,t[2]=a*c+E*w+y*M+z*S,t[3]=a*u+E*h+y*T+z*b,a=s[4],E=s[5],y=s[6],z=s[7],t[4]=a*n+E*g+y*o+z*C,t[5]=a*l+E*f+y*d+z*x,t[6]=a*c+E*w+y*M+z*S,t[7]=a*u+E*h+y*T+z*b,a=s[8],E=s[9],y=s[10],z=s[11],t[8]=a*n+E*g+y*o+z*C,t[9]=a*l+E*f+y*d+z*x,t[10]=a*c+E*w+y*M+z*S,t[11]=a*u+E*h+y*T+z*b,a=s[12],E=s[13],y=s[14],z=s[15],t[12]=a*n+E*g+y*o+z*C,t[13]=a*l+E*f+y*d+z*x,t[14]=a*c+E*w+y*M+z*S,t[15]=a*u+E*h+y*T+z*b,t}},5268:function(v){v.exports=p;function p(t,r,s,n,l,c,u){var g=1/(r-s),f=1/(n-l),w=1/(c-u);return t[0]=-2*g,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*f,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*w,t[11]=0,t[12]=(r+s)*g,t[13]=(l+n)*f,t[14]=(u+c)*w,t[15]=1,t}},1120:function(v){v.exports=p;function p(t,r,s,n,l){var c=1/Math.tan(r/2),u=1/(n-l);return t[0]=c/s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=c,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(l+n)*u,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*l*n*u,t[15]=0,t}},4422:function(v){v.exports=p;function p(t,r,s,n){var l=n[0],c=n[1],u=n[2],g=Math.sqrt(l*l+c*c+u*u),f,w,h,o,d,M,T,C,x,S,b,a,E,y,z,I,B,k,O,N,_,U,Y,J;return Math.abs(g)<1e-6?null:(g=1/g,l*=g,c*=g,u*=g,f=Math.sin(s),w=Math.cos(s),h=1-w,o=r[0],d=r[1],M=r[2],T=r[3],C=r[4],x=r[5],S=r[6],b=r[7],a=r[8],E=r[9],y=r[10],z=r[11],I=l*l*h+w,B=c*l*h+u*f,k=u*l*h-c*f,O=l*c*h-u*f,N=c*c*h+w,_=u*c*h+l*f,U=l*u*h+c*f,Y=c*u*h-l*f,J=u*u*h+w,t[0]=o*I+C*B+a*k,t[1]=d*I+x*B+E*k,t[2]=M*I+S*B+y*k,t[3]=T*I+b*B+z*k,t[4]=o*O+C*N+a*_,t[5]=d*O+x*N+E*_,t[6]=M*O+S*N+y*_,t[7]=T*O+b*N+z*_,t[8]=o*U+C*Y+a*J,t[9]=d*U+x*Y+E*J,t[10]=M*U+S*Y+y*J,t[11]=T*U+b*Y+z*J,r!==t&&(t[12]=r[12],t[13]=r[13],t[14]=r[14],t[15]=r[15]),t)}},6109:function(v){v.exports=p;function p(t,r,s){var n=Math.sin(s),l=Math.cos(s),c=r[4],u=r[5],g=r[6],f=r[7],w=r[8],h=r[9],o=r[10],d=r[11];return r!==t&&(t[0]=r[0],t[1]=r[1],t[2]=r[2],t[3]=r[3],t[12]=r[12],t[13]=r[13],t[14]=r[14],t[15]=r[15]),t[4]=c*l+w*n,t[5]=u*l+h*n,t[6]=g*l+o*n,t[7]=f*l+d*n,t[8]=w*l-c*n,t[9]=h*l-u*n,t[10]=o*l-g*n,t[11]=d*l-f*n,t}},7115:function(v){v.exports=p;function p(t,r,s){var n=Math.sin(s),l=Math.cos(s),c=r[0],u=r[1],g=r[2],f=r[3],w=r[8],h=r[9],o=r[10],d=r[11];return r!==t&&(t[4]=r[4],t[5]=r[5],t[6]=r[6],t[7]=r[7],t[12]=r[12],t[13]=r[13],t[14]=r[14],t[15]=r[15]),t[0]=c*l-w*n,t[1]=u*l-h*n,t[2]=g*l-o*n,t[3]=f*l-d*n,t[8]=c*n+w*l,t[9]=u*n+h*l,t[10]=g*n+o*l,t[11]=f*n+d*l,t}},5240:function(v){v.exports=p;function p(t,r,s){var n=Math.sin(s),l=Math.cos(s),c=r[0],u=r[1],g=r[2],f=r[3],w=r[4],h=r[5],o=r[6],d=r[7];return r!==t&&(t[8]=r[8],t[9]=r[9],t[10]=r[10],t[11]=r[11],t[12]=r[12],t[13]=r[13],t[14]=r[14],t[15]=r[15]),t[0]=c*l+w*n,t[1]=u*l+h*n,t[2]=g*l+o*n,t[3]=f*l+d*n,t[4]=w*l-c*n,t[5]=h*l-u*n,t[6]=o*l-g*n,t[7]=d*l-f*n,t}},3668:function(v){v.exports=p;function p(t,r,s){var n=s[0],l=s[1],c=s[2];return t[0]=r[0]*n,t[1]=r[1]*n,t[2]=r[2]*n,t[3]=r[3]*n,t[4]=r[4]*l,t[5]=r[5]*l,t[6]=r[6]*l,t[7]=r[7]*l,t[8]=r[8]*c,t[9]=r[9]*c,t[10]=r[10]*c,t[11]=r[11]*c,t[12]=r[12],t[13]=r[13],t[14]=r[14],t[15]=r[15],t}},998:function(v){v.exports=p;function p(t,r,s){var n=s[0],l=s[1],c=s[2],u,g,f,w,h,o,d,M,T,C,x,S;return r===t?(t[12]=r[0]*n+r[4]*l+r[8]*c+r[12],t[13]=r[1]*n+r[5]*l+r[9]*c+r[13],t[14]=r[2]*n+r[6]*l+r[10]*c+r[14],t[15]=r[3]*n+r[7]*l+r[11]*c+r[15]):(u=r[0],g=r[1],f=r[2],w=r[3],h=r[4],o=r[5],d=r[6],M=r[7],T=r[8],C=r[9],x=r[10],S=r[11],t[0]=u,t[1]=g,t[2]=f,t[3]=w,t[4]=h,t[5]=o,t[6]=d,t[7]=M,t[8]=T,t[9]=C,t[10]=x,t[11]=S,t[12]=u*n+h*l+T*c+r[12],t[13]=g*n+o*l+C*c+r[13],t[14]=f*n+d*l+x*c+r[14],t[15]=w*n+M*l+S*c+r[15]),t}},2142:function(v){v.exports=p;function p(t,r){if(t===r){var s=r[1],n=r[2],l=r[3],c=r[6],u=r[7],g=r[11];t[1]=r[4],t[2]=r[8],t[3]=r[12],t[4]=s,t[6]=r[9],t[7]=r[13],t[8]=n,t[9]=c,t[11]=r[14],t[12]=l,t[13]=u,t[14]=g}else t[0]=r[0],t[1]=r[4],t[2]=r[8],t[3]=r[12],t[4]=r[1],t[5]=r[5],t[6]=r[9],t[7]=r[13],t[8]=r[2],t[9]=r[6],t[10]=r[10],t[11]=r[14],t[12]=r[3],t[13]=r[7],t[14]=r[11],t[15]=r[15];return t}},4340:function(v,p,t){var r=t(957),s=t(7309);v.exports=g;function n(f,w){for(var h=[0,0,0,0],o=0;o<4;++o)for(var d=0;d<4;++d)h[d]+=f[4*o+d]*w[o];return h}function l(f,w,h,o,d){for(var M=n(o,n(h,n(w,[f[0],f[1],f[2],1]))),T=0;T<3;++T)M[T]/=M[3];return[.5*d[0]*(1+M[0]),.5*d[1]*(1-M[1])]}function c(f,w){if(f.length===2){for(var h=0,o=0,d=0;d<2;++d)h+=Math.pow(w[d]-f[0][d],2),o+=Math.pow(w[d]-f[1][d],2);return h=Math.sqrt(h),o=Math.sqrt(o),h+o<1e-6?[1,0]:[o/(h+o),h/(o+h)]}else if(f.length===3){var M=[0,0];return s(f[0],f[1],f[2],w,M),r(f,M)}return[]}function u(f,w){for(var h=[0,0,0],o=0;o<f.length;++o)for(var d=f[o],M=w[o],T=0;T<3;++T)h[T]+=M*d[T];return h}function g(f,w,h,o,d,M){if(f.length===1)return[0,f[0].slice()];for(var T=new Array(f.length),C=0;C<f.length;++C)T[C]=l(f[C],h,o,d,M);for(var x=0,S=1/0,C=0;C<T.length;++C){for(var b=0,a=0;a<2;++a)b+=Math.pow(T[C][a]-w[a],2);b<S&&(S=b,x=C)}for(var E=c(T,w),y=0,C=0;C<3;++C){if(E[C]<-.001||E[C]>1.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;j<Z.length;++j){if(Z.length<2)return 1;if(Z[j][0]===Q)return Z[j][1];if(Z[j][0]>Q&&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;K<Z;++K)j[K]=Q[K][2];return j}B.highlight=function(Q){if(!Q||!this.contourEnable){this.contourCount=0;return}for(var Z=d(this.cells,this.intensity,Q.intensity),j=Z.cells,K=Z.vertexIds,ee=Z.vertexWeights,oe=j.length,q=M.mallocFloat32(2*3*oe),$=0,le=0;le<oe;++le)for(var ie=j[le],he=0;he<2;++he){var me=ie[0];ie.length===2&&(me=ie[he]);for(var Me=K[me][0],Te=K[me][1],Oe=ee[me],Ne=1-Oe,Ee=this.positions[Me],xe=this.positions[Te],Se=0;Se<3;++Se)q[$++]=Oe*Ee[Se]+Ne*xe[Se]}this.contourCount=$/3|0,this.contourPositions.update(q.subarray(0,$)),M.free(q)},B.update=function(Q){Q=Q||{};var Z=this.gl;this.dirty=!0,"contourEnable"in Q&&(this.contourEnable=Q.contourEnable),"contourColor"in Q&&(this.contourColor=Q.contourColor),"lineWidth"in Q&&(this.lineWidth=Q.lineWidth),"lightPosition"in Q&&(this.lightPosition=Q.lightPosition),this.hasAlpha=!1,"opacity"in Q&&(this.opacity=Q.opacity,this.opacity<1&&(this.hasAlpha=!0)),"opacityscale"in Q&&(this.opacityscale=Q.opacityscale,this.hasAlpha=!0),"ambient"in Q&&(this.ambientLight=Q.ambient),"diffuse"in Q&&(this.diffuseLight=Q.diffuse),"specular"in Q&&(this.specularLight=Q.specular),"roughness"in Q&&(this.roughness=Q.roughness),"fresnel"in Q&&(this.fresnel=Q.fresnel),Q.texture?(this.texture.dispose(),this.texture=u(Z,Q.texture)):Q.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=Z.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=Z.LINEAR,this.texture.setPixels(O(Q.colormap,this.opacityscale)),this.texture.generateMipmap());var j=Q.cells,K=Q.positions;if(!(!K||!j)){var ee=[],oe=[],q=[],$=[],le=[],ie=[],he=[],me=[],Me=[],Te=[],Oe=[],Ne=[],Ee=[],xe=[];this.cells=j,this.positions=K;var Se=Q.vertexNormals,Ue=Q.cellNormals,He=Q.vertexNormalsEpsilon===void 0?r:Q.vertexNormalsEpsilon,Fe=Q.faceNormalsEpsilon===void 0?s:Q.faceNormalsEpsilon;Q.useFacetNormals&&!Ue&&(Ue=g.faceNormals(j,K,Fe)),!Ue&&!Se&&(Se=g.vertexNormals(j,K,He));var Ge=Q.vertexColors,nt=Q.cellColors,qe=Q.meshColor||[1,1,1,1],$e=Q.vertexUVs,et=Q.vertexIntensity,ct=Q.cellUVs,dt=Q.cellIntensity,pt=1/0,At=-1/0;if(!$e&&!ct)if(et)if(Q.vertexIntensityBounds)pt=+Q.vertexIntensityBounds[0],At=+Q.vertexIntensityBounds[1];else for(var Mt=0;Mt<et.length;++Mt){var Vt=et[Mt];pt=Math.min(pt,Vt),At=Math.max(At,Vt)}else if(dt)if(Q.cellIntensityBounds)pt=+Q.cellIntensityBounds[0],At=+Q.cellIntensityBounds[1];else for(var Mt=0;Mt<dt.length;++Mt){var Vt=dt[Mt];pt=Math.min(pt,Vt),At=Math.max(At,Vt)}else for(var Mt=0;Mt<K.length;++Mt){var Vt=K[Mt][2];pt=Math.min(pt,Vt),At=Math.max(At,Vt)}et?this.intensity=et:dt?this.intensity=dt:this.intensity=N(K),this.pickVertex=!(dt||nt);var Je=Q.pointSizes,De=Q.pointSize||1;this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(var Mt=0;Mt<K.length;++Mt)for(var Ie=K[Mt],ze=0;ze<3;++ze)isNaN(Ie[ze])||!isFinite(Ie[ze])||(this.bounds[0][ze]=Math.min(this.bounds[0][ze],Ie[ze]),this.bounds[1][ze]=Math.max(this.bounds[1][ze],Ie[ze]));var Pe=0,be=0,se=0;e:for(var Mt=0;Mt<j.length;++Mt){var ye=j[Mt];switch(ye.length){case 1:for(var Le=ye[0],Ie=K[Le],ze=0;ze<3;++ze)if(isNaN(Ie[ze])||!isFinite(Ie[ze]))continue e;Te.push(Ie[0],Ie[1],Ie[2]);var Be;Ge?Be=Ge[Le]:nt?Be=nt[Mt]:Be=qe,this.opacityscale&&et?oe.push(Be[0],Be[1],Be[2],this.opacity*k((et[Le]-pt)/(At-pt),this.opacityscale)):Be.length===3?Oe.push(Be[0],Be[1],Be[2],this.opacity):(Oe.push(Be[0],Be[1],Be[2],Be[3]*this.opacity),Be[3]<1&&(this.hasAlpha=!0));var ot;$e?ot=$e[Le]:et?ot=[(et[Le]-pt)/(At-pt),0]:ct?ot=ct[Mt]:dt?ot=[(dt[Mt]-pt)/(At-pt),0]:ot=[(Ie[2]-pt)/(At-pt),0],Ne.push(ot[0],ot[1]),Je?Ee.push(Je[Le]):Ee.push(De),xe.push(Mt),se+=1;break;case 2:for(var ze=0;ze<2;++ze)for(var Le=ye[ze],Ie=K[Le],at=0;at<3;++at)if(isNaN(Ie[at])||!isFinite(Ie[at]))continue e;for(var ze=0;ze<2;++ze){var Le=ye[ze],Ie=K[Le];ie.push(Ie[0],Ie[1],Ie[2]);var Be;Ge?Be=Ge[Le]:nt?Be=nt[Mt]:Be=qe,this.opacityscale&&et?oe.push(Be[0],Be[1],Be[2],this.opacity*k((et[Le]-pt)/(At-pt),this.opacityscale)):Be.length===3?he.push(Be[0],Be[1],Be[2],this.opacity):(he.push(Be[0],Be[1],Be[2],Be[3]*this.opacity),Be[3]<1&&(this.hasAlpha=!0));var ot;$e?ot=$e[Le]:et?ot=[(et[Le]-pt)/(At-pt),0]:ct?ot=ct[Mt]:dt?ot=[(dt[Mt]-pt)/(At-pt),0]:ot=[(Ie[2]-pt)/(At-pt),0],me.push(ot[0],ot[1]),Me.push(Mt)}be+=1;break;case 3:for(var ze=0;ze<3;++ze)for(var Le=ye[ze],Ie=K[Le],at=0;at<3;++at)if(isNaN(Ie[at])||!isFinite(Ie[at]))continue e;for(var ze=0;ze<3;++ze){var Le=ye[2-ze],Ie=K[Le];ee.push(Ie[0],Ie[1],Ie[2]);var Be;Ge?Be=Ge[Le]:nt?Be=nt[Mt]:Be=qe,Be?this.opacityscale&&et?oe.push(Be[0],Be[1],Be[2],this.opacity*k((et[Le]-pt)/(At-pt),this.opacityscale)):Be.length===3?oe.push(Be[0],Be[1],Be[2],this.opacity):(oe.push(Be[0],Be[1],Be[2],Be[3]*this.opacity),Be[3]<1&&(this.hasAlpha=!0)):oe.push(.5,.5,.5,1);var ot;$e?ot=$e[Le]:et?ot=[(et[Le]-pt)/(At-pt),0]:ct?ot=ct[Mt]:dt?ot=[(dt[Mt]-pt)/(At-pt),0]:ot=[(Ie[2]-pt)/(At-pt),0],$.push(ot[0],ot[1]);var wt;Se?wt=Se[Le]:wt=Ue[Mt],q.push(wt[0],wt[1],wt[2]),le.push(Mt)}Pe+=1;break}}this.pointCount=se,this.edgeCount=be,this.triangleCount=Pe,this.pointPositions.update(Te),this.pointColors.update(Oe),this.pointUVs.update(Ne),this.pointSizes.update(Ee),this.pointIds.update(new Uint32Array(xe)),this.edgePositions.update(ie),this.edgeColors.update(he),this.edgeUVs.update(me),this.edgeIds.update(new Uint32Array(Me)),this.trianglePositions.update(ee),this.triangleColors.update(oe),this.triangleUVs.update($),this.triangleNormals.update(q),this.triangleIds.update(new Uint32Array(le))}},B.drawTransparent=B.draw=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]);var $={model:j,view:K,projection:ee,inverseModel:z.slice(),clipBounds:oe,kambient:this.ambientLight,kdiffuse:this.diffuseLight,kspecular:this.specularLight,roughness:this.roughness,fresnel:this.fresnel,eyePosition:[0,0,0],lightPosition:[0,0,0],contourColor:this.contourColor,texture:0};$.inverseModel=w($.inverseModel,$.model),Z.disable(Z.CULL_FACE),this.texture.bind(0);var le=new Array(16);f(le,$.view,$.model),f(le,$.projection,le),w(le,le);for(var q=0;q<3;++q)$.eyePosition[q]=le[12+q]/le[15];for(var ie=le[15],q=0;q<3;++q)ie+=this.lightPosition[q]*le[4*q+3];for(var q=0;q<3;++q){for(var he=le[12+q],me=0;me<3;++me)he+=le[4*me+q]*this.lightPosition[me];$.lightPosition[q]=he/ie}if(this.triangleCount>0){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;oe<j.length;++oe)ee[oe]=K[j[oe]];var q=Q.coord[0],$=Q.coord[1];if(!this.pickVertex){var le=this.positions[j[0]],ie=this.positions[j[1]],he=this.positions[j[2]],me=[(le[0]+ie[0]+he[0])/3,(le[1]+ie[1]+he[1])/3,(le[2]+ie[2]+he[2])/3];return{_cellCenter:!0,position:[q,$],index:Z,cell:j,cellId:Z,intensity:this.intensity[Z],dataCoordinate:me}}var Me=C(ee,[q*this.pixelRatio,this._resolution[1]-$*this.pixelRatio],this._model,this._view,this._projection,this._resolution);if(!Me)return null;for(var Te=Me[2],Oe=0,oe=0;oe<j.length;++oe)Oe+=Te[oe]*this.intensity[j[oe]];return{position:Me[1],index:j[Me[0]],cell:j,cellId:Z,intensity:Oe,dataCoordinate:this.positions[j[Me[0]]]}},B.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.lineShader.dispose(),this.pointShader.dispose(),this.pickShader.dispose(),this.pointPickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleNormals.dispose(),this.triangleIds.dispose(),this.edgeVAO.dispose(),this.edgePositions.dispose(),this.edgeColors.dispose(),this.edgeUVs.dispose(),this.edgeIds.dispose(),this.pointVAO.dispose(),this.pointPositions.dispose(),this.pointColors.dispose(),this.pointUVs.dispose(),this.pointSizes.dispose(),this.pointIds.dispose(),this.contourVAO.dispose(),this.contourPositions.dispose(),this.contourShader.dispose()};function _(Q){var Z=n(Q,x.vertex,x.fragment);return Z.attributes.position.location=0,Z.attributes.color.location=2,Z.attributes.uv.location=3,Z.attributes.normal.location=4,Z}function U(Q){var Z=n(Q,S.vertex,S.fragment);return Z.attributes.position.location=0,Z.attributes.color.location=2,Z.attributes.uv.location=3,Z}function Y(Q){var Z=n(Q,b.vertex,b.fragment);return Z.attributes.position.location=0,Z.attributes.color.location=2,Z.attributes.uv.location=3,Z.attributes.pointSize.location=4,Z}function J(Q){var Z=n(Q,a.vertex,a.fragment);return Z.attributes.position.location=0,Z.attributes.id.location=1,Z}function te(Q){var Z=n(Q,E.vertex,E.fragment);return Z.attributes.position.location=0,Z.attributes.id.location=1,Z.attributes.pointSize.location=4,Z}function ae(Q){var Z=n(Q,y.vertex,y.fragment);return Z.attributes.position.location=0,Z}function ce(Q,Z){arguments.length===1&&(Z=Q,Q=Z.gl);var j=Q.getExtension("OES_standard_derivatives")||Q.getExtension("MOZ_OES_standard_derivatives")||Q.getExtension("WEBKIT_OES_standard_derivatives");if(!j)throw new Error("derivatives not supported");var K=_(Q),ee=U(Q),oe=Y(Q),q=J(Q),$=te(Q),le=ae(Q),ie=u(Q,h(new Uint8Array([255,255,255,255]),[1,1,4]));ie.generateMipmap(),ie.minFilter=Q.LINEAR_MIPMAP_LINEAR,ie.magFilter=Q.LINEAR;var he=l(Q),me=l(Q),Me=l(Q),Te=l(Q),Oe=l(Q),Ne=c(Q,[{buffer:he,type:Q.FLOAT,size:3},{buffer:Oe,type:Q.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:me,type:Q.FLOAT,size:4},{buffer:Me,type:Q.FLOAT,size:2},{buffer:Te,type:Q.FLOAT,size:3}]),Ee=l(Q),xe=l(Q),Se=l(Q),Ue=l(Q),He=c(Q,[{buffer:Ee,type:Q.FLOAT,size:3},{buffer:Ue,type:Q.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:xe,type:Q.FLOAT,size:4},{buffer:Se,type:Q.FLOAT,size:2}]),Fe=l(Q),Ge=l(Q),nt=l(Q),qe=l(Q),$e=l(Q),et=c(Q,[{buffer:Fe,type:Q.FLOAT,size:3},{buffer:$e,type:Q.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:Ge,type:Q.FLOAT,size:4},{buffer:nt,type:Q.FLOAT,size:2},{buffer:qe,type:Q.FLOAT,size:1}]),ct=l(Q),dt=c(Q,[{buffer:ct,type:Q.FLOAT,size:3}]),pt=new I(Q,ie,K,ee,oe,q,$,le,he,Oe,me,Me,Te,Ne,Ee,Ue,xe,Se,He,Fe,$e,Ge,nt,qe,et,ct,dt);return pt.update(Z),pt}v.exports=ce},4554:function(v,p,t){v.exports=u;var r=t(5827),s=t(5158),n=t(2709);function l(g,f,w){this.plot=g,this.vbo=f,this.shader=w}var c=l.prototype;c.bind=function(){var g=this.shader;this.vbo.bind(),this.shader.bind(),g.attributes.coord.pointer(),g.uniforms.screenBox=this.plot.screenBox},c.drawBox=function(){var g=[0,0],f=[0,0];return function(w,h,o,d,M){var T=this.plot,C=this.shader,x=T.gl;g[0]=w,g[1]=h,f[0]=o,f[1]=d,C.uniforms.lo=g,C.uniforms.hi=f,C.uniforms.color=M,x.drawArrays(x.TRIANGLE_STRIP,0,4)}}(),c.dispose=function(){this.vbo.dispose(),this.shader.dispose()};function u(g){var f=g.gl,w=r(f,[0,0,0,1,1,0,1,1]),h=s(f,n.boxVert,n.lineFrag);return new l(g,w,h)}},3016:function(v,p,t){v.exports=f;var r=t(5827),s=t(5158),n=t(5070),l=t(2709);function c(w,h,o,d){this.plot=w,this.vbo=h,this.shader=o,this.tickShader=d,this.ticks=[[],[]]}function u(w,h){return w-h}var g=c.prototype;g.draw=function(){var w=[0,0],h=[0,0],o=[0,0];return function(){for(var d=this.plot,M=this.vbo,T=this.shader,C=this.ticks,x=d.gl,S=d._tickBounds,b=d.dataBox,a=d.viewBox,E=d.gridLineWidth,y=d.gridLineColor,z=d.gridLineEnable,I=d.pixelRatio,B=0;B<2;++B){var k=S[B],O=S[B+2],N=O-k,_=.5*(b[B+2]+b[B]),U=b[B+2]-b[B];h[B]=2*N/U,w[B]=2*(k-_)/U}T.bind(),M.bind(),T.attributes.dataCoord.pointer(),T.uniforms.dataShift=w,T.uniforms.dataScale=h;for(var Y=0,B=0;B<2;++B){o[0]=o[1]=0,o[B]=1,T.uniforms.dataAxis=o,T.uniforms.lineWidth=E[B]/(a[B+2]-a[B])*I,T.uniforms.color=y[B];var J=C[B].length*6;z[B]&&J&&x.drawArrays(x.TRIANGLES,Y,J),Y+=J}}}(),g.drawTickMarks=function(){var w=[0,0],h=[0,0],o=[1,0],d=[0,1],M=[0,0],T=[0,0];return function(){for(var C=this.plot,x=this.vbo,S=this.tickShader,b=this.ticks,a=C.gl,E=C._tickBounds,y=C.dataBox,z=C.viewBox,I=C.pixelRatio,B=C.screenBox,k=B[2]-B[0],O=B[3]-B[1],N=z[2]-z[0],_=z[3]-z[1],U=0;U<2;++U){var Y=E[U],J=E[U+2],te=J-Y,ae=.5*(y[U+2]+y[U]),ce=y[U+2]-y[U];h[U]=2*te/ce,w[U]=2*(Y-ae)/ce}h[0]*=N/k,w[0]*=N/k,h[1]*=_/O,w[1]*=_/O,S.bind(),x.bind(),S.attributes.dataCoord.pointer();var Q=S.uniforms;Q.dataShift=w,Q.dataScale=h;var Z=C.tickMarkLength,j=C.tickMarkWidth,K=C.tickMarkColor,ee=0,oe=b[0].length*6,q=Math.min(n.ge(b[0],(y[0]-E[0])/(E[2]-E[0]),u),b[0].length),$=Math.min(n.gt(b[0],(y[2]-E[0])/(E[2]-E[0]),u),b[0].length),le=ee+6*q,ie=6*Math.max(0,$-q),he=Math.min(n.ge(b[1],(y[1]-E[1])/(E[3]-E[1]),u),b[1].length),me=Math.min(n.gt(b[1],(y[3]-E[1])/(E[3]-E[1]),u),b[1].length),Me=oe+6*he,Te=6*Math.max(0,me-he);M[0]=2*(z[0]-Z[1])/k-1,M[1]=(z[3]+z[1])/O-1,T[0]=Z[1]*I/k,T[1]=j[1]*I/O,Te&&(Q.color=K[1],Q.tickScale=T,Q.dataAxis=d,Q.screenOffset=M,a.drawArrays(a.TRIANGLES,Me,Te)),M[0]=(z[2]+z[0])/k-1,M[1]=2*(z[1]-Z[0])/O-1,T[0]=j[0]*I/k,T[1]=Z[0]*I/O,ie&&(Q.color=K[0],Q.tickScale=T,Q.dataAxis=o,Q.screenOffset=M,a.drawArrays(a.TRIANGLES,le,ie)),M[0]=2*(z[2]+Z[3])/k-1,M[1]=(z[3]+z[1])/O-1,T[0]=Z[3]*I/k,T[1]=j[3]*I/O,Te&&(Q.color=K[3],Q.tickScale=T,Q.dataAxis=d,Q.screenOffset=M,a.drawArrays(a.TRIANGLES,Me,Te)),M[0]=(z[2]+z[0])/k-1,M[1]=2*(z[3]+Z[2])/O-1,T[0]=j[2]*I/k,T[1]=Z[2]*I/O,ie&&(Q.color=K[2],Q.tickScale=T,Q.dataAxis=o,Q.screenOffset=M,a.drawArrays(a.TRIANGLES,le,ie))}}(),g.update=function(){var w=[1,1,-1,-1,1,-1],h=[1,-1,1,1,-1,-1];return function(o){var d=o.ticks,M=o.bounds,T=new Float32Array(6*3*(d[0].length+d[1].length));this.plot.zeroLineEnable;for(var C=0,x=[[],[]],S=0;S<2;++S)for(var b=x[S],a=d[S],E=M[S],y=M[S+2],z=0;z<a.length;++z){var I=(a[z].x-E)/(y-E);b.push(I);for(var B=0;B<6;++B)T[C++]=I,T[C++]=w[B],T[C++]=h[B]}this.ticks=x,this.vbo.update(T)}}(),g.dispose=function(){this.vbo.dispose(),this.shader.dispose(),this.tickShader.dispose()};function f(w){var h=w.gl,o=r(h),d=s(h,l.gridVert,l.gridFrag),M=s(h,l.tickVert,l.gridFrag),T=new c(w,o,d,M);return T}},1154:function(v,p,t){v.exports=u;var r=t(5827),s=t(5158),n=t(2709);function l(g,f,w){this.plot=g,this.vbo=f,this.shader=w}var c=l.prototype;c.bind=function(){var g=this.shader;this.vbo.bind(),this.shader.bind(),g.attributes.coord.pointer(),g.uniforms.screenBox=this.plot.screenBox},c.drawLine=function(){var g=[0,0],f=[0,0];return function(w,h,o,d,M,T){var C=this.plot,x=this.shader,S=C.gl;g[0]=w,g[1]=h,f[0]=o,f[1]=d,x.uniforms.start=g,x.uniforms.end=f,x.uniforms.width=M*C.pixelRatio,x.uniforms.color=T,S.drawArrays(S.TRIANGLE_STRIP,0,4)}}(),c.dispose=function(){this.vbo.dispose(),this.shader.dispose()};function u(g){var f=g.gl,w=r(f,[-1,-1,-1,1,1,-1,1,1]),h=s(f,n.lineVert,n.lineFrag),o=new l(g,w,h);return o}},2709:function(v,p,t){var r=t(6832),s=r([`precision lowp float;
#define GLSLIFY 1
uniform vec4 color;
void main() {
gl_FragColor = vec4(color.xyz * color.w, color.w);
}
`]);v.exports={lineVert:r([`precision mediump float;
#define GLSLIFY 1
attribute vec2 coord;
uniform vec4 screenBox;
uniform vec2 start, end;
uniform float width;
vec2 perp(vec2 v) {
return vec2(v.y, -v.x);
}
vec2 screen(vec2 v) {
return 2.0 * (v - screenBox.xy) / (screenBox.zw - screenBox.xy) - 1.0;
}
void main() {
vec2 delta = normalize(perp(start - end));
vec2 offset = mix(start, end, 0.5 * (coord.y+1.0));
gl_Position = vec4(screen(offset + 0.5 * width * delta * coord.x), 0, 1);
}
`]),lineFrag:s,textVert:r([`#define GLSLIFY 1
attribute vec3 textCoordinate;
uniform vec2 dataScale, dataShift, dataAxis, screenOffset, textScale;
uniform float angle;
void main() {
float dataOffset = textCoordinate.z;
vec2 glyphOffset = textCoordinate.xy;
mat2 glyphMatrix = mat2(cos(angle), sin(angle), -sin(angle), cos(angle));
vec2 screenCoordinate = dataAxis * (dataScale * dataOffset + dataShift) +
glyphMatrix * glyphOffset * textScale + screenOffset;
gl_Position = vec4(screenCoordinate, 0, 1);
}
`]),textFrag:s,gridVert:r([`precision mediump float;
#define GLSLIFY 1
attribute vec3 dataCoord;
uniform vec2 dataAxis, dataShift, dataScale;
uniform float lineWidth;
void main() {
vec2 pos = dataAxis * (dataScale * dataCoord.x + dataShift);
pos += 10.0 * dataCoord.y * vec2(dataAxis.y, -dataAxis.x) + dataCoord.z * lineWidth;
gl_Position = vec4(pos, 0, 1);
}
`]),gridFrag:s,boxVert:r([`precision mediump float;
#define GLSLIFY 1
attribute vec2 coord;
uniform vec4 screenBox;
uniform vec2 lo, hi;
vec2 screen(vec2 v) {
return 2.0 * (v - screenBox.xy) / (screenBox.zw - screenBox.xy) - 1.0;
}
void main() {
gl_Position = vec4(screen(mix(lo, hi, coord)), 0, 1);
}
`]),tickVert:r([`precision mediump float;
#define GLSLIFY 1
attribute vec3 dataCoord;
uniform vec2 dataAxis, dataShift, dataScale, screenOffset, tickScale;
void main() {
vec2 pos = dataAxis * (dataScale * dataCoord.x + dataShift);
gl_Position = vec4(pos + tickScale*dataCoord.yz + screenOffset, 0, 1);
}
`])}},5613:function(v,p,t){v.exports=f;var r=t(5827),s=t(5158),n=t(6946),l=t(5070),c=t(2709);function u(w,h,o){this.plot=w,this.vbo=h,this.shader=o,this.tickOffset=[[],[]],this.tickX=[[],[]],this.labelOffset=[0,0],this.labelCount=[0,0]}var g=u.prototype;g.drawTicks=function(){var w=[0,0],h=[0,0],o=[0,0];return function(d){var M=this.plot,T=this.shader,C=this.tickX[d],x=this.tickOffset[d],S=M.gl,b=M.viewBox,a=M.dataBox,E=M.screenBox,y=M.pixelRatio,z=M.tickEnable,I=M.tickPad,B=M.tickColor,k=M.tickAngle,O=M.labelEnable,N=M.labelPad,_=M.labelColor,U=M.labelAngle,Y=this.labelOffset[d],J=this.labelCount[d],te=l.lt(C,a[d]),ae=l.le(C,a[d+2]);w[0]=w[1]=0,w[d]=1,h[d]=(b[2+d]+b[d])/(E[2+d]-E[d])-1;var ce=2/E[2+(d^1)]-E[d^1];h[d^1]=ce*b[d^1]-1,z[d]&&(h[d^1]-=ce*y*I[d],te<ae&&x[ae]>x[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],te<ae&&x[ae]>x[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<E.length;++M){var y=E[M],z=y.x,I=y.text,B=y.font||"sans-serif";x=y.fontSize||12;for(var k=1/(d[S+2]-d[S]),O=d[S],N=I.split(`
`),_=0;_<N.length;_++)for(C=n(B,N[_]).data,T=0;T<C.length;T+=2)h.push(C[T]*x,-C[T+1]*x-_*x*1.2,(z-O)*k);b.push(Math.floor(h.length/3)),a.push(z)}this.tickOffset[S]=b,this.tickX[S]=a}for(S=0;S<2;++S){for(this.labelOffset[S]=Math.floor(h.length/3),C=n(w.labelFont[S],w.labels[S],{textAlign:"center"}).data,x=w.labelSize[S],M=0;M<C.length;M+=2)h.push(C[M]*x,-C[M+1]*x,0);this.labelCount[S]=Math.floor(h.length/3)-this.labelOffset[S]}for(this.titleOffset=Math.floor(h.length/3),C=n(w.titleFont,w.title).data,x=w.titleSize,M=0;M<C.length;M+=2)h.push(C[M]*x,-C[M+1]*x,0);this.titleCount=Math.floor(h.length/3)-this.titleOffset,this.vbo.update(h)},g.dispose=function(){this.vbo.dispose(),this.shader.dispose()};function f(w){var h=w.gl,o=r(h),d=s(h,c.textVert,c.textFrag),M=new u(w,o,d);return M}},2117:function(v,p,t){v.exports=h;var r=t(2611),s=t(3016),n=t(5613),l=t(1154),c=t(4554);function u(o,d){this.gl=o,this.pickBuffer=d,this.screenBox=[0,0,o.drawingBufferWidth,o.drawingBufferHeight],this.viewBox=[0,0,0,0],this.dataBox=[-10,-10,10,10],this.gridLineEnable=[!0,!0],this.gridLineWidth=[1,1],this.gridLineColor=[[0,0,0,1],[0,0,0,1]],this.pixelRatio=1,this.tickMarkLength=[0,0,0,0],this.tickMarkWidth=[0,0,0,0],this.tickMarkColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[15,15,15,15],this.tickAngle=[0,0,0,0],this.tickEnable=[!0,!0,!0,!0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[15,15,15,15],this.labelAngle=[0,Math.PI/2,0,3*Math.PI/2],this.labelEnable=[!0,!0,!0,!0],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.titleCenter=[0,0],this.titleEnable=!0,this.titleAngle=0,this.titleColor=[0,0,0,1],this.borderColor=[0,0,0,0],this.backgroundColor=[0,0,0,0],this.zeroLineEnable=[!0,!0],this.zeroLineWidth=[4,4],this.zeroLineColor=[[0,0,0,1],[0,0,0,1]],this.borderLineEnable=[!0,!0,!0,!0],this.borderLineWidth=[2,2,2,2],this.borderLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.grid=null,this.text=null,this.line=null,this.box=null,this.objects=[],this.overlays=[],this._tickBounds=[1/0,1/0,-1/0,-1/0],this.static=!1,this.dirty=!1,this.pickDirty=!1,this.pickDelay=120,this.pickRadius=10,this._pickTimeout=null,this._drawPick=this.drawPick.bind(this),this._depthCounter=0}var g=u.prototype;g.setDirty=function(){this.dirty=this.pickDirty=!0},g.setOverlayDirty=function(){this.dirty=!0},g.nextDepthValue=function(){return this._depthCounter++/65536},g.draw=function(){return function(){var o=this.gl,d=this.screenBox,M=this.viewBox,T=this.dataBox,C=this.pixelRatio,x=this.grid,S=this.line,b=this.text,a=this.objects;if(this._depthCounter=0,this.pickDirty&&(this._pickTimeout&&clearTimeout(this._pickTimeout),this.pickDirty=!1,this._pickTimeout=setTimeout(this._drawPick,this.pickDelay)),!!this.dirty){if(this.dirty=!1,o.bindFramebuffer(o.FRAMEBUFFER,null),o.enable(o.SCISSOR_TEST),o.disable(o.DEPTH_TEST),o.depthFunc(o.LESS),o.depthMask(!1),o.enable(o.BLEND),o.blendEquation(o.FUNC_ADD,o.FUNC_ADD),o.blendFunc(o.ONE,o.ONE_MINUS_SRC_ALPHA),this.borderColor){o.scissor(d[0],d[1],d[2]-d[0],d[3]-d[1]);var E=this.borderColor;o.clearColor(E[0]*E[3],E[1]*E[3],E[2]*E[3],E[3]),o.clear(o.COLOR_BUFFER_BIT|o.DEPTH_BUFFER_BIT)}o.scissor(M[0],M[1],M[2]-M[0],M[3]-M[1]),o.viewport(M[0],M[1],M[2]-M[0],M[3]-M[1]);var y=this.backgroundColor;o.clearColor(y[0]*y[3],y[1]*y[3],y[2]*y[3],y[3]),o.clear(o.COLOR_BUFFER_BIT),x.draw();var z=this.zeroLineEnable,I=this.zeroLineColor,B=this.zeroLineWidth;if(z[0]||z[1]){S.bind();for(var k=0;k<2;++k)if(!(!z[k]||!(T[k]<=0&&T[k+2]>=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<a.length;++k)a[k].draw();o.viewport(d[0],d[1],d[2]-d[0],d[3]-d[1]),o.scissor(d[0],d[1],d[2]-d[0],d[3]-d[1]),this.grid.drawTickMarks(),S.bind();var N=this.borderLineEnable,_=this.borderLineWidth,U=this.borderLineColor;N[1]&&S.drawLine(M[0],M[1]-.5*_[1]*C,M[0],M[3]+.5*_[3]*C,_[1],U[1]),N[0]&&S.drawLine(M[0]-.5*_[0]*C,M[1],M[2]+.5*_[2]*C,M[1],_[0],U[0]),N[3]&&S.drawLine(M[2],M[1]-.5*_[1]*C,M[2],M[3]+.5*_[3]*C,_[3],U[3]),N[2]&&S.drawLine(M[0]-.5*_[0]*C,M[3],M[2]+.5*_[2]*C,M[3],_[2],U[2]),b.bind();for(var k=0;k<2;++k)b.drawTicks(k);this.titleEnable&&b.drawTitle();for(var Y=this.overlays,k=0;k<Y.length;++k)Y[k].draw();o.disable(o.SCISSOR_TEST),o.disable(o.BLEND),o.depthMask(!0)}}}(),g.drawPick=function(){return function(){if(!this.static){var o=this.pickBuffer;this.gl,this._pickTimeout=null,o.begin();for(var d=1,M=this.objects,T=0;T<M.length;++T)d=M[T].drawPick(d);o.end()}}}(),g.pick=function(){return function(o,d){if(!this.static){var M=this.pixelRatio,T=this.pickPixelRatio,C=this.viewBox,x=Math.round((o-C[0]/M)*T)|0,S=Math.round((d-C[1]/M)*T)|0,b=this.pickBuffer.query(x,S,this.pickRadius);if(!b)return null;for(var a=b.id+(b.value[0]<<8)+(b.value[1]<<16)+(b.value[2]<<24),E=this.objects,y=0;y<E.length;++y){var z=E[y].pick(x,S,a);if(z)return z}return null}}}();function f(o){for(var d=o.slice(),M=0;M<d.length;++M)d[M]=d[M].slice();return d}function w(o,d){return o.x-d.x}g.setScreenBox=function(o){var d=this.screenBox,M=this.pixelRatio;d[0]=Math.round(o[0]*M)|0,d[1]=Math.round(o[1]*M)|0,d[2]=Math.round(o[2]*M)|0,d[3]=Math.round(o[3]*M)|0,this.setDirty()},g.setDataBox=function(o){var d=this.dataBox,M=d[0]!==o[0]||d[1]!==o[1]||d[2]!==o[2]||d[3]!==o[3];M&&(d[0]=o[0],d[1]=o[1],d[2]=o[2],d[3]=o[3],this.setDirty())},g.setViewBox=function(o){var d=this.pixelRatio,M=this.viewBox;M[0]=Math.round(o[0]*d)|0,M[1]=Math.round(o[1]*d)|0,M[2]=Math.round(o[2]*d)|0,M[3]=Math.round(o[3]*d)|0;var T=this.pickPixelRatio;this.pickBuffer.shape=[Math.round((o[2]-o[0])*T)|0,Math.round((o[3]-o[1])*T)|0],this.setDirty()},g.update=function(o){o=o||{};var d=this.gl;this.pixelRatio=o.pixelRatio||1;var M=this.pixelRatio;this.pickPixelRatio=Math.max(M,1),this.setScreenBox(o.screenBox||[0,0,d.drawingBufferWidth/M,d.drawingBufferHeight/M]),this.screenBox,this.setViewBox(o.viewBox||[.125*(this.screenBox[2]-this.screenBox[0])/M,.125*(this.screenBox[3]-this.screenBox[1])/M,.875*(this.screenBox[2]-this.screenBox[0])/M,.875*(this.screenBox[3]-this.screenBox[1])/M]);var T=this.viewBox,C=(T[2]-T[0])/(T[3]-T[1]);this.setDataBox(o.dataBox||[-10,-10/C,10,10/C]),this.borderColor=o.borderColor!==!1?(o.borderColor||[0,0,0,0]).slice():!1,this.backgroundColor=(o.backgroundColor||[0,0,0,0]).slice(),this.gridLineEnable=(o.gridLineEnable||[!0,!0]).slice(),this.gridLineWidth=(o.gridLineWidth||[1,1]).slice(),this.gridLineColor=f(o.gridLineColor||[[.5,.5,.5,1],[.5,.5,.5,1]]),this.zeroLineEnable=(o.zeroLineEnable||[!0,!0]).slice(),this.zeroLineWidth=(o.zeroLineWidth||[4,4]).slice(),this.zeroLineColor=f(o.zeroLineColor||[[0,0,0,1],[0,0,0,1]]),this.tickMarkLength=(o.tickMarkLength||[0,0,0,0]).slice(),this.tickMarkWidth=(o.tickMarkWidth||[0,0,0,0]).slice(),this.tickMarkColor=f(o.tickMarkColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]),this.titleCenter=(o.titleCenter||[.5*(T[0]+T[2])/M,(T[3]+120)/M]).slice(),this.titleEnable=!("titleEnable"in o)||!!o.titleEnable,this.titleAngle=o.titleAngle||0,this.titleColor=(o.titleColor||[0,0,0,1]).slice(),this.labelPad=(o.labelPad||[15,15,15,15]).slice(),this.labelAngle=(o.labelAngle||[0,Math.PI/2,0,3*Math.PI/2]).slice(),this.labelEnable=(o.labelEnable||[!0,!0,!0,!0]).slice(),this.labelColor=f(o.labelColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]),this.tickPad=(o.tickPad||[15,15,15,15]).slice(),this.tickAngle=(o.tickAngle||[0,0,0,0]).slice(),this.tickEnable=(o.tickEnable||[!0,!0,!0,!0]).slice(),this.tickColor=f(o.tickColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]),this.borderLineEnable=(o.borderLineEnable||[!0,!0,!0,!0]).slice(),this.borderLineWidth=(o.borderLineWidth||[2,2,2,2]).slice(),this.borderLineColor=f(o.borderLineColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]);var x=o.ticks||[[],[]],S=this._tickBounds;S[0]=S[1]=1/0,S[2]=S[3]=-1/0;for(var b=0;b<2;++b){var a=x[b].slice(0);a.length!==0&&(a.sort(w),S[b]=Math.min(S[b],a[0].x),S[b+2]=Math.max(S[b+2],a[a.length-1].x))}this.grid.update({bounds:S,ticks:x}),this.text.update({bounds:S,ticks:x,labels:o.labels||["x","y"],labelSize:o.labelSize||[12,12],labelFont:o.labelFont||["sans-serif","sans-serif"],title:o.title||"",titleSize:o.titleSize||18,titleFont:o.titleFont||"sans-serif"}),this.static=!!o.static,this.setDirty()},g.dispose=function(){this.box.dispose(),this.grid.dispose(),this.text.dispose(),this.line.dispose();for(var o=this.objects.length-1;o>=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;M<d.length;++M)if(d[M]===o){d.splice(M,1),this.setDirty();break}},g.addOverlay=function(o){this.overlays.indexOf(o)<0&&(this.overlays.push(o),this.setOverlayDirty())},g.removeOverlay=function(o){for(var d=this.overlays,M=0;M<d.length;++M)if(d[M]===o){d.splice(M,1),this.setOverlayDirty();break}};function h(o){var d=o.gl,M=r(d,[d.drawingBufferWidth,d.drawingBufferHeight]),T=new u(d,M);return T.grid=s(T),T.text=n(T),T.line=l(T),T.box=c(T),T.update(o),T}},4296:function(v,p,t){v.exports=g;var r=t(8161),s=t(1152),n=t(6145),l=t(6475),c=t(2565),u=t(5233);function g(f,w){f=f||document.body,w=w||{};var h=[.01,1/0];"distanceLimits"in w&&(h[0]=w.distanceLimits[0],h[1]=w.distanceLimits[1]),"zoomMin"in w&&(h[0]=w.zoomMin),"zoomMax"in w&&(h[1]=w.zoomMax);var o=s({center:w.center||[0,0,0],up:w.up||[0,1,0],eye:w.eye||[0,0,10],mode:w.mode||"orbit",distanceLimits:h}),d=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],M=0,T=f.clientWidth,C=f.clientHeight,x={keyBindingMode:"rotate",enableWheel:!0,view:o,element:f,delay:w.delay||16,rotateSpeed:w.rotateSpeed||1,zoomSpeed:w.zoomSpeed||1,translateSpeed:w.translateSpeed||1,flipX:!!w.flipX,flipY:!!w.flipY,modes:o.modes,_ortho:w._ortho||w.projection&&w.projection.type==="orthographic"||!1,tick:function(){var S=r(),b=this.delay,a=S-2*b;o.idle(S-b),o.recalcMatrix(a),o.flush(S-(100+b*2));for(var E=!0,y=o.computedMatrix,z=0;z<16;++z)E=E&&d[z]===y[z],d[z]=y[z];var I=f.clientWidth===T&&f.clientHeight===C;return T=f.clientWidth,C=f.clientHeight,E?!I:(M=Math.exp(o.computedRadius[0]),!0)},lookAt:function(S,b,a){o.lookAt(o.lastT(),S,b,a)},rotate:function(S,b,a){o.rotate(o.lastT(),S,b,a)},pan:function(S,b,a){o.pan(o.lastT(),S,b,a)},translate:function(S,b,a){o.translate(o.lastT(),S,b,a)}};return Object.defineProperties(x,{matrix:{get:function(){return o.computedMatrix},set:function(S){return o.setMatrix(o.lastT(),S),o.computedMatrix},enumerable:!0},mode:{get:function(){return o.getMode()},set:function(S){var b=o.computedUp.slice(),a=o.computedEye.slice(),E=o.computedCenter.slice();if(o.setMode(S),S==="turntable"){var y=r();o._active.lookAt(y,a,E,b),o._active.lookAt(y+500,a,E,[0,0,1]),o._active.flush(y)}return o.getMode()},enumerable:!0},center:{get:function(){return o.computedCenter},set:function(S){return o.lookAt(o.lastT(),null,S),o.computedCenter},enumerable:!0},eye:{get:function(){return o.computedEye},set:function(S){return o.lookAt(o.lastT(),S),o.computedEye},enumerable:!0},up:{get:function(){return o.computedUp},set:function(S){return o.lookAt(o.lastT(),null,null,S),o.computedUp},enumerable:!0},distance:{get:function(){return M},set:function(S){return o.setDistance(o.lastT(),S),S},enumerable:!0},distanceLimits:{get:function(){return o.getDistanceLimits(h)},set:function(S){return o.setDistanceLimits(S),S},enumerable:!0}}),f.addEventListener("contextmenu",function(S){return S.preventDefault(),!1}),x._lastX=-1,x._lastY=-1,x._lastMods={shift:!1,control:!1,alt:!1,meta:!1},x.enableMouseListeners=function(){x.mouseListener=n(f,S),f.addEventListener("touchstart",function(b){var a=c(b.changedTouches[0],f);S(0,a[0],a[1],x._lastMods),S(1,a[0],a[1],x._lastMods)},u?{passive:!0}:!1),f.addEventListener("touchmove",function(b){var a=c(b.changedTouches[0],f);S(1,a[0],a[1],x._lastMods),b.preventDefault()},u?{passive:!1}:!1),f.addEventListener("touchend",function(b){S(0,x._lastX,x._lastY,x._lastMods)},u?{passive:!0}:!1);function S(b,a,E,y){var z=x.keyBindingMode;if(z!==!1){var I=z==="rotate",B=z==="pan",k=z==="zoom",O=!!y.control,N=!!y.alt,_=!!y.shift,U=!!(b&1),Y=!!(b&2),J=!!(b&4),te=1/f.clientHeight,ae=te*(a-x._lastX),ce=te*(E-x._lastY),Q=x.flipX?1:-1,Z=x.flipY?1:-1,j=Math.PI*x.rotateSpeed,K=r();if(x._lastX!==-1&&x._lastY!==-1&&((I&&U&&!O&&!N&&!_||U&&!O&&!N&&_)&&o.rotate(K,Q*j*ae,-Z*j*ce,0),(B&&U&&!O&&!N&&!_||Y||U&&O&&!N&&!_)&&o.pan(K,-x.translateSpeed*ae*M,x.translateSpeed*ce*M,0),k&&U&&!O&&!N&&!_||J||U&&!O&&N&&!_)){var ee=-x.zoomSpeed*ce/window.innerHeight*(K-o.lastT())*100;o.pan(K,0,0,M*(Math.exp(ee)-1))}return x._lastX=a,x._lastY=E,x._lastMods=y,!0}}x.wheelListener=l(f,function(b,a){if(x.keyBindingMode!==!1&&x.enableWheel){var E=x.flipX?1:-1,y=x.flipY?1:-1,z=r();if(Math.abs(b)>Math.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;Fe<He;++Fe)Q[Fe]=0;e:for(var Fe=0;Fe<Ue;++Fe){var Ge=ae[Fe],nt=Ge.pickSlots;if(!nt){ce[Fe]=-1;continue}for(var qe=0;qe<He;++qe)if(Q[qe]+nt<255){ce[Fe]=qe,Ge.setPickBase(Q[qe]+1),Q[qe]+=nt;continue e}var $e=c(z,$);ce[Fe]=He,Z.push($e),Q.push(nt),Ge.setPickBase(1),He+=1}for(;He>0&&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;Ue<ae.length;++Ue)ae[Ue].dispose();k.dispose();for(var Ue=0;Ue<Z.length;++Ue)Z[Ue].dispose();O.dispose(),z=null,Y=null,te=null,ae=[]}},ie._mouseRotating=!1,ie._prevButtons=0,ie.enableMouseListeners=function(){ie.mouseListener=f(E,function(Ue,He,Fe){if(!ie._stopped){var Ge=Z.length,nt=ae.length,qe=B.object;B.distance=1/0,B.mouse[0]=He,B.mouse[1]=Fe,B.object=null,B.screen=null,B.dataCoordinate=B.dataPosition=null;var $e=!1;if(Ue&&ie._prevButtons)ie._mouseRotating=!0;else{ie._mouseRotating&&(q=!0),ie._mouseRotating=!1;for(var et=0;et<Ge;++et){var ct=Z[et].query(He,he[1]-Fe-1,ie.pickRadius);if(ct){if(ct.distance>B.distance)continue;for(var dt=0;dt<nt;++dt){var pt=ae[dt];if(ce[dt]===et){var At=pt.pick(ct);At&&(B.buttons=Ue,B.screen=ct.coord,B.distance=ct.distance,B.object=pt,B.index=At.distance,B.dataPosition=At.position,B.dataCoordinate=At.dataCoordinate,B.data=At,$e=!0)}}}}}qe&&qe!==B.object&&(qe.highlight&&qe.highlight(null),j=!0),B.object&&(B.object.highlight&&B.object.highlight(B.data),j=!0),$e=$e||B.object!==qe,$e&&ie.onselect&&ie.onselect(B),Ue&1&&!(ie._prevButtons&1)&&ie.onclick&&ie.onclick(B),ie._prevButtons=Ue}})};function Te(){if(ie.contextLost)return!0;z.isContextLost()&&(ie.contextLost=!0,ie.mouseListener.enabled=!1,ie.selection.object=null,ie.oncontextloss&&ie.oncontextloss())}E.addEventListener("webglcontextlost",Te);function Oe(){if(!Te()){z.colorMask(!0,!0,!0,!0),z.depthMask(!0),z.disable(z.BLEND),z.enable(z.DEPTH_TEST),z.depthFunc(z.LEQUAL);for(var Ue=ae.length,He=Z.length,Fe=0;Fe<He;++Fe){var Ge=Z[Fe];Ge.shape=he,Ge.begin();for(var nt=0;nt<Ue;++nt)if(ce[nt]===Fe){var qe=ae[nt];qe.drawPick&&(qe.pixelRatio=1,qe.drawPick(oe))}Ge.end()}}}var Ne=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],Ee=[Ne[0].slice(),Ne[1].slice()];function xe(){if(!Te()){me();var Ue=ie.camera.tick();oe.view=ie.camera.matrix,j=j||Ue,q=q||Ue,Y.pixelRatio=ie.pixelRatio,te.pixelRatio=ie.pixelRatio;var He=ae.length,Fe=Ne[0],Ge=Ne[1];Fe[0]=Fe[1]=Fe[2]=1/0,Ge[0]=Ge[1]=Ge[2]=-1/0;for(var nt=0;nt<He;++nt){var qe=ae[nt];qe.pixelRatio=ie.pixelRatio,qe.axes=ie.axes,j=j||!!qe.dirty,q=q||!!qe.dirty;var $e=qe.bounds;if($e)for(var et=$e[0],ct=$e[1],dt=0;dt<3;++dt)Fe[dt]=Math.min(Fe[dt],et[dt]),Ge[dt]=Math.max(Ge[dt],ct[dt])}var pt=ie.bounds;if(ie.autoBounds)for(var dt=0;dt<3;++dt){if(Ge[dt]<Fe[dt])Fe[dt]=-1,Ge[dt]=1;else{Fe[dt]===Ge[dt]&&(Fe[dt]-=1,Ge[dt]+=1);var At=.05*(Ge[dt]-Fe[dt]);Fe[dt]=Fe[dt]-At,Ge[dt]=Ge[dt]+At}pt[0][dt]=Fe[dt],pt[1][dt]=Ge[dt]}for(var Mt=!1,dt=0;dt<3;++dt)Mt=Mt||Ee[0][dt]!==pt[0][dt]||Ee[1][dt]!==pt[1][dt],Ee[0][dt]=pt[0][dt],Ee[1][dt]=pt[1][dt];if(q=q||Mt,j=j||Mt,!!j){if(Mt){for(var Vt=[0,0,0],nt=0;nt<3;++nt)Vt[nt]=C((pt[1][nt]-pt[0][nt])/10);Y.autoTicks?Y.update({bounds:pt,tickSpacing:Vt}):Y.update({bounds:pt})}var Je=z.drawingBufferWidth,De=z.drawingBufferHeight;$[0]=Je,$[1]=De,he[0]=Math.max(Je/ie.pixelRatio,1)|0,he[1]=Math.max(De/ie.pixelRatio,1)|0,b(ie,N);for(var nt=0;nt<He;++nt){var qe=ae[nt];qe.axesBounds=pt,ie.clipToBounds&&(qe.clipBounds=pt)}B.object&&(ie.snapToData?te.position=B.dataCoordinate:te.position=B.dataPosition,te.bounds=pt),q&&(q=!1,Oe()),ie.axesPixels=n(ie.axes,oe,Je,De),ie.onrender&&ie.onrender(),z.bindFramebuffer(z.FRAMEBUFFER,null),z.viewport(0,0,Je,De),ie.clearRGBA(),z.depthMask(!0),z.colorMask(!0,!0,!0,!0),z.enable(z.DEPTH_TEST),z.depthFunc(z.LEQUAL),z.disable(z.BLEND),z.disable(z.CULL_FACE);var Ie=!1;Y.enable&&(Ie=Ie||Y.isTransparent(),Y.draw(oe)),te.axes=Y,B.object&&te.draw(oe),z.disable(z.CULL_FACE);for(var nt=0;nt<He;++nt){var qe=ae[nt];qe.axes=Y,qe.pixelRatio=ie.pixelRatio,qe.isOpaque&&qe.isOpaque()&&qe.draw(oe),qe.isTransparent&&qe.isTransparent()&&(Ie=!0)}if(Ie){k.shape=$,k.bind(),z.clear(z.DEPTH_BUFFER_BIT),z.colorMask(!1,!1,!1,!1),z.depthMask(!0),z.depthFunc(z.LESS),Y.enable&&Y.isTransparent()&&Y.drawTransparent(oe);for(var nt=0;nt<He;++nt){var qe=ae[nt];qe.isOpaque&&qe.isOpaque()&&qe.draw(oe)}z.enable(z.BLEND),z.blendEquation(z.FUNC_ADD),z.blendFunc(z.ONE,z.ONE_MINUS_SRC_ALPHA),z.colorMask(!0,!0,!0,!0),z.depthMask(!1),z.clearColor(0,0,0,0),z.clear(z.COLOR_BUFFER_BIT),Y.isTransparent()&&Y.drawTransparent(oe);for(var nt=0;nt<He;++nt){var qe=ae[nt];qe.isTransparent&&qe.isTransparent()&&qe.drawTransparent(oe)}z.bindFramebuffer(z.FRAMEBUFFER,null),z.blendFunc(z.ONE,z.ONE_MINUS_SRC_ALPHA),z.disable(z.DEPTH_TEST),O.bind(),k.color[0].bind(0),O.uniforms.accumBuffer=0,g(z),z.disable(z.BLEND)}j=!1;for(var nt=0;nt<He;++nt)ae[nt].dirty=!1}}}function Se(){ie._stopped||ie.contextLost||(xe(),requestAnimationFrame(Se))}return ie.enableMouseListeners(),Se(),ie.redraw=function(){ie._stopped||(j=!0,xe())},ie}function b(a,E){var y=a.bounds,z=a.cameraParams,I=z.projection,B=z.model,k=a.gl.drawingBufferWidth,O=a.gl.drawingBufferHeight,N=a.zNear,_=a.zFar,U=a.fovy,Y=k/O;E?(h(I,-Y,Y,-1,1,N,_),z._ortho=!0):(w(I,U,Y,N,_),z._ortho=!1);for(var J=0;J<16;++J)B[J]=0;B[15]=1;for(var te=0,J=0;J<3;++J)te=Math.max(te,y[1][J]-y[0][J]);for(var J=0;J<3;++J)a.autoScale?B[5*J]=a.aspect[J]/(y[1][J]-y[0][J]):B[5*J]=1/te,a.autoCenter&&(B[12+J]=-B[5*J]*.5*(y[0][J]+y[1][J]))}},8023:function(v,p,t){var r=t(6832);p.pointVertex=r([`precision mediump float;
#define GLSLIFY 1
attribute vec2 position;
uniform mat3 matrix;
uniform float pointSize;
uniform float pointCloud;
highp float rand(vec2 co) {
highp float a = 12.9898;
highp float b = 78.233;
highp float c = 43758.5453;
highp float d = dot(co.xy, vec2(a, b));
highp float e = mod(d, 3.14);
return fract(sin(e) * c);
}
void main() {
vec3 hgPosition = matrix * vec3(position, 1);
gl_Position = vec4(hgPosition.xy, 0, hgPosition.z);
// if we don't jitter the point size a bit, overall point cloud
// saturation 'jumps' on zooming, which is disturbing and confusing
gl_PointSize = pointSize * ((19.5 + rand(position)) / 20.0);
if(pointCloud != 0.0) { // pointCloud is truthy
// get the same square surface as circle would be
gl_PointSize *= 0.886;
}
}`]),p.pointFragment=r([`precision mediump float;
#define GLSLIFY 1
uniform vec4 color, borderColor;
uniform float centerFraction;
uniform float pointCloud;
void main() {
float radius;
vec4 baseColor;
if(pointCloud != 0.0) { // pointCloud is truthy
if(centerFraction == 1.0) {
gl_FragColor = color;
} else {
gl_FragColor = mix(borderColor, color, centerFraction);
}
} else {
radius = length(2.0 * gl_PointCoord.xy - 1.0);
if(radius > 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<d;h++)S[h]=h;this.points=C,this.offsetBuffer.update(x),this.pickBuffer.update(S),M||n.free(x),T||n.free(S),this.pointCount=d,this.pickOffset=0};function g(w,h){var o=0,d=w.length>>>1,M;for(M=0;M<d;M++){var T=w[M*2],C=w[M*2+1];T>=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||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<w.positions.length;++o)for(d=0;d<w.positions[o].length;++d)w.positions[o][d]/=u;for(o=0;o<h.positions.length;++o)for(d=0;d<h.positions[o].length;++d)h.positions[o][d]/=u}var M=[[1/0,1/0],[-1/0,-1/0]],T=h.positions.length;for(o=0;o<T;++o){var C=h.positions[o];for(d=0;d<2;++d)M[0][d]=Math.min(M[0][d],C[d]),M[1][d]=Math.max(M[1][d],C[d])}return g[l]=[w,h,M]}},9282:function(v,p,t){var r=t(5158),s=t(6832),n=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 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)?Z<Q.length?ee=Q[Z]:ee=void 0:ee=Q,ee=f(ee);var oe=!0;r(ee)&&(ee="▼",oe=!1);var q=g(ee,j,K);return{mesh:q[0],lines:q[1],bounds:q[2],visible:oe}}C.update=function(Q){if(Q=Q||{},"perspective"in Q&&(this.useOrtho=!Q.perspective),"orthographic"in Q&&(this.useOrtho=!!Q.orthographic),"lineWidth"in Q&&(this.lineWidth=Q.lineWidth),"project"in Q)if(Array.isArray(Q.project))this.axesProject=Q.project;else{var Z=!!Q.project;this.axesProject=[Z,Z,Z]}if("projectScale"in Q)if(Array.isArray(Q.projectScale))this.projectScale=Q.projectScale.slice();else{var j=+Q.projectScale;this.projectScale=[j,j,j]}if(this.projectHasAlpha=!1,"projectOpacity"in Q){if(Array.isArray(Q.projectOpacity))this.projectOpacity=Q.projectOpacity.slice();else{var j=+Q.projectOpacity;this.projectOpacity=[j,j,j]}for(var K=0;K<3;++K)this.projectOpacity[K]=M(this.projectOpacity[K]),this.projectOpacity[K]<1&&(this.projectHasAlpha=!0)}this.hasAlpha=!1,"opacity"in Q&&(this.opacity=M(Q.opacity),this.opacity<1&&(this.hasAlpha=!0)),this.dirty=!0;var ee=Q.position,oe=Q.font||"normal",q=Q.alignment||[0,0],$,le;if(q.length===2)$=q[0],le=q[1];else{$=[],le=[];for(var K=0;K<q.length;++K)$[K]=q[K][0],le[K]=q[K][1]}var ie=[1/0,1/0,1/0],he=[-1/0,-1/0,-1/0],me=Q.glyph,Me=Q.color,Te=Q.size,Oe=Q.angle,Ne=Q.lineColor,Ee=-1,xe=0,Se=0,Ue=0;if(ee.length){Ue=ee.length;e:for(var K=0;K<Ue;++K){for(var He=ee[K],Fe=0;Fe<3;++Fe)if(isNaN(He[Fe])||!isFinite(He[Fe]))continue e;var Ge=ae(me,K,oe,this.pixelRatio),nt=Ge.mesh,qe=Ge.lines,$e=Ge.bounds;xe+=nt.cells.length*3,Se+=qe.edges.length*2}}var et=xe+Se,ct=l.mallocFloat(3*et),dt=l.mallocFloat(4*et),pt=l.mallocFloat(2*et),At=l.mallocUint32(et);if(et>0){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;K<Ue;++K){Ee+=1;for(var He=ee[K],Fe=0;Fe<3;++Fe){if(isNaN(He[Fe])||!isFinite(He[Fe]))continue e;he[Fe]=Math.max(he[Fe],He[Fe]),ie[Fe]=Math.min(ie[Fe],He[Fe])}var Ge=ae(me,K,oe,this.pixelRatio),nt=Ge.mesh,qe=Ge.lines,$e=Ge.bounds,Pe=Ge.visible;if(!Pe)Je=[1,1,1,0];else if(Array.isArray(Me)){var be;if(Ie?K<Me.length?be=Me[K]:be=[0,0,0,0]:be=Me,be.length===3){for(var Fe=0;Fe<3;++Fe)Je[Fe]=be[Fe];Je[3]=1}else if(be.length===4){for(var Fe=0;Fe<4;++Fe)Je[Fe]=be[Fe];!this.hasAlpha&&be[3]<1&&(this.hasAlpha=!0)}}else Je[0]=Je[1]=Je[2]=0,Je[3]=1;if(!Pe)De=[1,1,1,0];else if(Array.isArray(Ne)){var be;if(ze?K<Ne.length?be=Ne[K]:be=[0,0,0,0]:be=Ne,be.length===3){for(var Fe=0;Fe<3;++Fe)De[Fe]=be[Fe];De[Fe]=1}else if(be.length===4){for(var Fe=0;Fe<4;++Fe)De[Fe]=be[Fe];!this.hasAlpha&&be[3]<1&&(this.hasAlpha=!0)}}else De[0]=De[1]=De[2]=0,De[3]=1;var se=.5;Pe?Array.isArray(Te)?K<Te.length?se=+Te[K]:se=12:Te?se=+Te:this.useOrtho&&(se=12):se=0;var ye=0;Array.isArray(Oe)?K<Oe.length?ye=+Oe[K]:ye=0:Oe&&(ye=+Oe);for(var Le=Math.cos(ye),Be=Math.sin(ye),He=ee[K],Fe=0;Fe<3;++Fe)he[Fe]=Math.max(he[Fe],He[Fe]),ie[Fe]=Math.min(ie[Fe],He[Fe]);var ot=$,at=le,ot=0;Array.isArray($)?K<$.length?ot=$[K]:ot=0:$&&(ot=$);var at=0;Array.isArray(le)?K<le.length?at=le[K]:at=0:le&&(at=le),ot*=ot>0?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;Fe<Kt.length;++Fe)for(var It=Kt[Fe],Bt=0;Bt<3;++Bt){for(var Gt=0;Gt<3;++Gt)ct[3*Mt+Gt]=He[Gt];for(var Gt=0;Gt<4;++Gt)dt[4*Mt+Gt]=Je[Gt];At[Mt]=Ee;var Lt=ir[It[Bt]];pt[2*Mt]=se*(Le*Lt[0]-Be*Lt[1]+wt[0]),pt[2*Mt+1]=se*(Be*Lt[0]+Le*Lt[1]+wt[1]),Mt+=1}for(var Kt=qe.edges,ir=qe.positions,Fe=0;Fe<Kt.length;++Fe)for(var It=Kt[Fe],Bt=0;Bt<2;++Bt){for(var Gt=0;Gt<3;++Gt)ct[3*Vt+Gt]=He[Gt];for(var Gt=0;Gt<4;++Gt)dt[4*Vt+Gt]=De[Gt];At[Vt]=Ee;var Lt=ir[It[Bt]];pt[2*Vt]=se*(Le*Lt[0]-Be*Lt[1]+wt[0]),pt[2*Vt+1]=se*(Be*Lt[0]+Le*Lt[1]+wt[1]),Vt+=1}}}this.bounds=[ie,he],this.points=ee,this.pointCount=ee.length,this.vertexCount=xe,this.lineVertexCount=Se,this.pointBuffer.update(ct),this.colorBuffer.update(dt),this.glyphBuffer.update(pt),this.idBuffer.update(At),l.free(ct),l.free(dt),l.free(pt),l.free(At)},C.dispose=function(){this.shader.dispose(),this.orthoShader.dispose(),this.pickPerspectiveShader.dispose(),this.pickOrthoShader.dispose(),this.vao.dispose(),this.pointBuffer.dispose(),this.colorBuffer.dispose(),this.glyphBuffer.dispose(),this.idBuffer.dispose()};function ce(Q){var Z=Q.gl,j=u.createPerspective(Z),K=u.createOrtho(Z),ee=u.createProject(Z),oe=u.createPickPerspective(Z),q=u.createPickOrtho(Z),$=u.createPickProject(Z),le=s(Z),ie=s(Z),he=s(Z),me=s(Z),Me=n(Z,[{buffer:le,size:3,type:Z.FLOAT},{buffer:ie,size:4,type:Z.FLOAT},{buffer:he,size:2,type:Z.FLOAT},{buffer:me,size:4,type:Z.UNSIGNED_BYTE,normalized:!0}]),Te=new T(Z,j,K,ee,le,ie,he,me,Me,oe,q,$);return Te.update(Q),Te}},1884:function(v,p,t){var r=t(6832);p.boxVertex=r([`precision mediump float;
#define GLSLIFY 1
attribute vec2 vertex;
uniform vec2 cornerA, cornerB;
void main() {
gl_Position = vec4(mix(cornerA, cornerB, vertex), 0, 1);
}
`]),p.boxFragment=r([`precision mediump float;
#define GLSLIFY 1
uniform vec4 color;
void main() {
gl_FragColor = color;
}
`])},6623:function(v,p,t){var r=t(5158),s=t(5827),n=t(1884);v.exports=u;function l(g,f,w){this.plot=g,this.boxBuffer=f,this.boxShader=w,this.enabled=!0,this.selectBox=[1/0,1/0,-1/0,-1/0],this.borderColor=[0,0,0,1],this.innerFill=!1,this.innerColor=[0,0,0,.25],this.outerFill=!0,this.outerColor=[0,0,0,.5],this.borderWidth=10}var c=l.prototype;c.draw=function(){if(this.enabled){var g=this.plot,f=this.selectBox,w=this.borderWidth;this.innerFill;var h=this.innerColor;this.outerFill;var o=this.outerColor,d=this.borderColor,M=g.box,T=g.screenBox,C=g.dataBox,x=g.viewBox,S=g.pixelRatio,b=(f[0]-C[0])*(x[2]-x[0])/(C[2]-C[0])+x[0],a=(f[1]-C[1])*(x[3]-x[1])/(C[3]-C[1])+x[1],E=(f[2]-C[0])*(x[2]-x[0])/(C[2]-C[0])+x[0],y=(f[3]-C[1])*(x[3]-x[1])/(C[3]-C[1])+x[1];if(b=Math.max(b,x[0]),a=Math.max(a,x[1]),E=Math.min(E,x[2]),y=Math.min(y,x[3]),!(E<b||y<a)){M.bind();var z=T[2]-T[0],I=T[3]-T[1];if(this.outerFill&&(M.drawBox(0,0,z,a,o),M.drawBox(0,a,b,y,o),M.drawBox(0,y,z,I,o),M.drawBox(E,a,z,y,o)),this.innerFill&&M.drawBox(b,a,E,y,h),w>0){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;b<x;b++)for(var a=0;a<S;a++){var E=h.get(b,a,0),y=h.get(b,a,1),z=h.get(b,a,2),I=h.get(b,a,3);if(E<255||y<255||z<255||I<255){var B=o-b,k=d-a,O=B*B+k*k;O<M&&(M=O,T=b,C=a)}}return[T,C,M]};function u(h,o,d,M,T){this.coord=[h,o],this.id=d,this.value=M,this.distance=T}function g(h,o,d){this.gl=h,this.fbo=o,this.buffer=d,this._readTimeout=null;var M=this;this._readCallback=function(){M.gl&&(o.bind(),h.readPixels(0,0,o.shape[0],o.shape[1],h.RGBA,h.UNSIGNED_BYTE,M.buffer),M._readTimeout=null)}}var f=g.prototype;Object.defineProperty(f,"shape",{get:function(){return this.gl?this.fbo.shape.slice():[0,0]},set:function(h){if(this.gl){this.fbo.shape=h;var o=this.fbo.shape[0],d=this.fbo.shape[1];if(d*o*4>this.buffer.length){s.free(this.buffer);for(var M=this.buffer=s.mallocUint8(l(d*o*4)),T=0;T<d*o*4;++T)M[T]=255}return h}}}),f.begin=function(){var h=this.gl;this.shape,h&&(this.fbo.bind(),h.clearColor(1,1,1,1),h.clear(h.COLOR_BUFFER_BIT|h.DEPTH_BUFFER_BIT))},f.end=function(){var h=this.gl;h&&(h.bindFramebuffer(h.FRAMEBUFFER,null),this._readTimeout||clearTimeout(this._readTimeout),this._readTimeout=setTimeout(this._readCallback,1))},f.query=function(h,o,d){if(!this.gl)return null;var M=this.fbo.shape.slice();h=h|0,o=o|0,typeof d!="number"&&(d=1);var T=Math.min(Math.max(h-d,0),M[0])|0,C=Math.min(Math.max(h+d,0),M[0])|0,x=Math.min(Math.max(o-d,0),M[1])|0,S=Math.min(Math.max(o+d,0),M[1])|0;if(C<=T||S<=x)return null;var b=[C-T,S-x],a=n(this.buffer,[b[0],b[1],4],[4,M[0]*4,1],4*(T+M[0]*x)),E=c(a.hi(b[0],b[1],1),d,d),y=E[0],z=E[1];if(y<0||Math.pow(this.radius,2)<E[2])return null;var I=a.get(y,z,0),B=a.get(y,z,1),k=a.get(y,z,2),O=a.get(y,z,3);return new u(y+T|0,z+x|0,I,[B,k,O],Math.sqrt(E[2]))},f.dispose=function(){this.gl&&(this.fbo.dispose(),s.free(this.buffer),this.gl=null,this._readTimeout&&clearTimeout(this._readTimeout))};function w(h,o){var d=o[0],M=o[1],T={},C=r(h,d,M,T),x=s.mallocUint8(d*M*4);return new g(h,C,x)}},5158:function(v,p,t){var r=t(9016),s=t(4280),n=t(3984),l=t(1628),c=t(2631),u=t(9068);function g(o){this.gl=o,this.gl.lastAttribCount=0,this._vref=this._fref=this._relink=this.vertShader=this.fragShader=this.program=this.attributes=this.uniforms=this.types=null}var f=g.prototype;f.bind=function(){this.program||this._relink();var o,d=this.gl.getProgramParameter(this.program,this.gl.ACTIVE_ATTRIBUTES),M=this.gl.lastAttribCount;if(d>M)for(o=M;o<d;o++)this.gl.enableVertexAttribArray(o);else if(M>d)for(o=d;o<M;o++)this.gl.disableVertexAttribArray(o);this.gl.lastAttribCount=d,this.gl.useProgram(this.program)},f.dispose=function(){for(var o=this.gl.lastAttribCount,d=0;d<o;d++)this.gl.disableVertexAttribArray(d);this.gl.lastAttribCount=0,this._fref&&this._fref.dispose(),this._vref&&this._vref.dispose(),this.attributes=this.types=this.vertShader=this.fragShader=this.program=this._relink=this._fref=this._vref=null};function w(o,d){return o.name<d.name?-1:1}f.update=function(o,d,M,T){if(!d||arguments.length===1){var C=o;o=C.vertex,d=C.fragment,M=C.uniforms,T=C.attributes}var x=this,S=x.gl,b=x._vref;x._vref=l.shader(S,S.VERTEX_SHADER,o),b&&b.dispose(),x.vertShader=x._vref.shader;var a=this._fref;if(x._fref=l.shader(S,S.FRAGMENT_SHADER,d),a&&a.dispose(),x.fragShader=x._fref.shader,!M||!T){var E=S.createProgram();if(S.attachShader(E,x.fragShader),S.attachShader(E,x.vertShader),S.linkProgram(E),!S.getProgramParameter(E,S.LINK_STATUS)){var y=S.getProgramInfoLog(E);throw new u(y,"Error linking program:"+y)}M=M||c.uniforms(S,E),T=T||c.attributes(S,E),S.deleteProgram(E)}T=T.slice(),T.sort(w);var z=[],I=[],B=[],k;for(k=0;k<T.length;++k){var O=T[k];if(O.type.indexOf("mat")>=0){for(var N=O.type.charAt(O.type.length-1)|0,_=new Array(N),U=0;U<N;++U)_[U]=B.length,I.push(O.name+"["+U+"]"),typeof O.location=="number"?B.push(O.location+U):Array.isArray(O.location)&&O.location.length===N&&typeof O.location[U]=="number"?B.push(O.location[U]|0):B.push(-1);z.push({name:O.name,type:O.type,locations:_})}else z.push({name:O.name,type:O.type,locations:[B.length]}),I.push(O.name),typeof O.location=="number"?B.push(O.location|0):B.push(-1)}var Y=0;for(k=0;k<B.length;++k)if(B[k]<0){for(;B.indexOf(Y)>=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<M.length;++ae)J[ae]=S.getUniformLocation(x.program,M[ae].name)}te(),x._relink=te,x.types={uniforms:n(M),attributes:n(T)},x.attributes=s(S,x,z,B),Object.defineProperty(x,"uniforms",r(S,x,M,J))};function h(o,d,M,T,C){var x=new g(o);return x.update(d,M,T,C),x}v.exports=h},9068:function(v){function p(t,r,s){this.shortMessage=r||"",this.longMessage=s||"",this.rawError=t||"",this.message="gl-shader: "+(r||t||"")+(s?`
`+s:""),this.stack=new Error().stack}p.prototype=new Error,p.prototype.name="GLError",p.prototype.constructor=p,v.exports=p},4280:function(v,p,t){v.exports=g;var r=t(9068);function s(f,w,h,o,d,M){this._gl=f,this._wrapper=w,this._index=h,this._locations=o,this._dimension=d,this._constFunc=M}var n=s.prototype;n.pointer=function(w,h,o,d){var M=this,T=M._gl,C=M._locations[M._index];T.vertexAttribPointer(C,M._dimension,w||T.FLOAT,!!h,o||0,d||0),T.enableVertexAttribArray(C)},n.set=function(f,w,h,o){return this._constFunc(this._locations[this._index],f,w,h,o)},Object.defineProperty(n,"location",{get:function(){return this._locations[this._index]},set:function(f){return f!==this._locations[this._index]&&(this._locations[this._index]=f|0,this._wrapper.program=null),f|0}});var l=[function(f,w,h){return h.length===void 0?f.vertexAttrib1f(w,h):f.vertexAttrib1fv(w,h)},function(f,w,h,o){return h.length===void 0?f.vertexAttrib2f(w,h,o):f.vertexAttrib2fv(w,h)},function(f,w,h,o,d){return h.length===void 0?f.vertexAttrib3f(w,h,o,d):f.vertexAttrib3fv(w,h)},function(f,w,h,o,d,M){return h.length===void 0?f.vertexAttrib4f(w,h,o,d,M):f.vertexAttrib4fv(w,h)}];function c(f,w,h,o,d,M,T){var C=l[d],x=new s(f,w,h,o,d,C);Object.defineProperty(M,T,{set:function(S){return f.disableVertexAttribArray(o[h]),C(f,o[h],S),S},get:function(){return x},enumerable:!0})}function u(f,w,h,o,d,M,T){for(var C=new Array(d),x=new Array(d),S=0;S<d;++S)c(f,w,h[S],o,d,C,S),x[S]=C[S];Object.defineProperty(C,"location",{set:function(E){if(Array.isArray(E))for(var y=0;y<d;++y)x[y].location=E[y];else for(var y=0;y<d;++y)x[y].location=E+y;return E},get:function(){for(var E=new Array(d),y=0;y<d;++y)E[y]=o[h[y]];return E},enumerable:!0}),C.pointer=function(E,y,z,I){E=E||f.FLOAT,y=!!y,z=z||d*d,I=I||0;for(var B=0;B<d;++B){var k=o[h[B]];f.vertexAttribPointer(k,d,E,y,z,I+B*d),f.enableVertexAttribArray(k)}};var b=new Array(d),a=f["vertexAttrib"+d+"fv"];Object.defineProperty(M,T,{set:function(E){for(var y=0;y<d;++y){var z=o[h[y]];if(f.disableVertexAttribArray(z),Array.isArray(E[0]))a.call(f,z,E[y]);else{for(var I=0;I<d;++I)b[I]=E[d*y+I];a.call(f,z,b)}}return E},get:function(){return C},enumerable:!0})}function g(f,w,h,o){for(var d={},M=0,T=h.length;M<T;++M){var C=h[M],x=C.name,S=C.type,b=C.locations;switch(S){case"bool":case"int":case"float":c(f,w,b[0],o,1,d,x);break;default:if(S.indexOf("vec")>=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;w<u;++w)f[w]=g;return f}function c(u,g,f,w){function h(S){return function(b,a,E){return b.getUniform(a.program,E[S])}}function o(S){return function(a){for(var E=d("",S),y=0;y<E.length;++y){var z=E[y],I=z[0],B=z[1];if(w[B]){var k=a;if(typeof I=="string"&&(I.indexOf(".")===0||I.indexOf("[")===0)){var O=I;if(I.indexOf(".")===0&&(O=I.slice(1)),O.indexOf("]")===O.length-1){var N=O.indexOf("["),_=O.slice(0,N),U=O.slice(N+1,O.length-1);k=_?a[_][U]:a[U]}else k=a[O]}var Y=f[B].type,J;switch(Y){case"bool":case"int":case"sampler2D":case"samplerCube":u.uniform1i(w[B],k);break;case"float":u.uniform1f(w[B],k);break;default:var te=Y.indexOf("vec");if(0<=te&&te<=1&&Y.length===4+te){if(J=Y.charCodeAt(Y.length-1)-48,J<2||J>4)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;a<S.length;++a)T(b,a,S[a])}else{b={};for(var E in S)T(b,E,S[E])}return b}var x=r(f,!0);return{get:n(C(x)),set:o(x),enumerable:!0,configurable:!0}}},3984:function(v){v.exports=p;function p(t,r){for(var s={},n=0;n<t.length;++n)for(var l=t[n].name,c=l.split("."),u=s,g=0;g<c.length;++g){var f=c[g].split("[");if(f.length>1){f[0]in u||(u[f[0]]=[]),u=u[f[0]];for(var w=1;w<f.length;++w){var h=parseInt(f[w]);w<f.length-1||g<c.length-1?(h in u||(w<f.length-1?u[h]=[]:u[h]={}),u=u[h]):r?u[h]=n:u[h]=t[n].type}}else g<c.length-1?(f[0]in u||(u[f[0]]={}),u=u[f[0]]):r?u[f[0]]=n:u[f[0]]=t[n].type}return s}},2631:function(v,p){p.uniforms=n,p.attributes=l;var t={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube"},r=null;function s(c,u){if(!r){var g=Object.keys(t);r={};for(var f=0;f<g.length;++f){var w=g[f];r[c[w]]=t[w]}}return r[u]}function n(c,u){for(var g=c.getProgramParameter(u,c.ACTIVE_UNIFORMS),f=[],w=0;w<g;++w){var h=c.getActiveUniform(u,w);if(h){var o=s(c,h.type);if(h.size>1)for(var d=0;d<h.size;++d)f.push({name:h.name.replace("[0]","["+d+"]"),type:o});else f.push({name:h.name,type:o})}}return f}function l(c,u){for(var g=c.getProgramParameter(u,c.ACTIVE_ATTRIBUTES),f=[],w=0;w<g;++w){var h=c.getActiveAttrib(u,w);h&&f.push({name:h.name,type:s(c,h.type)})}return f}},1628:function(v,p,t){p.shader=d,p.program=M;var r=t(9068),s=t(3530),n=typeof WeakMap>"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<b;++S){var a=T.programs[x[S]];a&&(delete T.programs[S],C.deleteProgram(a))}C.deleteShader(this.shader),delete T.shaders[this.type===C.FRAGMENT_SHADER|0][this.src]}};function g(T){this.gl=T,this.shaders=[{},{}],this.programs={}}var f=g.prototype;function w(T,C,x){var S=T.createShader(C);if(T.shaderSource(S,x),T.compileShader(S),!T.getShaderParameter(S,T.COMPILE_STATUS)){var b=T.getShaderInfoLog(S);try{var a=s(b,x,C)}catch(E){throw console.warn("Failed to format compiler error: "+E),new r(b,`Error compiling shader:
`+b)}throw new r(b,a.short,a.long)}return S}f.getShaderReference=function(T,C){var x=this.gl,S=this.shaders[T===x.FRAGMENT_SHADER|0],b=S[C];if(!b||!x.isShader(b.shader)){var a=w(x,T,C);b=S[C]=new u(c++,C,T,a,[],1,this)}else b.count+=1;return b};function h(T,C,x,S,b){var a=T.createProgram();T.attachShader(a,C),T.attachShader(a,x);for(var E=0;E<S.length;++E)T.bindAttribLocation(a,b[E],S[E]);if(T.linkProgram(a),!T.getProgramParameter(a,T.LINK_STATUS)){var y=T.getProgramInfoLog(a);throw new r(y,"Error linking program: "+y)}return a}f.getProgram=function(T,C,x,S){var b=[T.id,C.id,x.join(":"),S.join(":")].join("@"),a=this.programs[b];return(!a||!this.gl.isProgram(a))&&(this.programs[b]=a=h(this.gl,T.shader,C.shader,x,S),T.programs.push(b),C.programs.push(b)),a};function o(T){var C=l.get(T);return C||(C=new g(T),l.set(T,C)),C}function d(T,C,x){return o(T).getShaderReference(C,x)}function M(T,C,x,S,b){return o(T).getProgram(C,x,S,b)}},3050:function(v){v.exports=r;function p(s){this.plot=s,this.enable=[!0,!0,!1,!1],this.width=[1,1,1,1],this.color=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.center=[1/0,1/0]}var t=p.prototype;t.update=function(s){s=s||{},this.enable=(s.enable||[!0,!0,!1,!1]).slice(),this.width=(s.width||[1,1,1,1]).slice(),this.color=(s.color||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]).map(function(n){return n.slice()}),this.center=(s.center||[1/0,1/0]).slice(),this.plot.setOverlayDirty()},t.draw=function(){var s=this.enable,n=this.width,l=this.color,c=this.center,u=this.plot,g=u.line,f=u.dataBox,w=u.viewBox;if(g.bind(),f[0]<=c[0]&&c[0]<=f[2]&&f[1]<=c[1]&&c[1]<=f[3]){var h=w[0]+(c[0]-f[0])/(f[2]-f[0])*(w[2]-w[0]),o=w[1]+(c[1]-f[1])/(f[3]-f[1])*(w[3]-w[1]);s[0]&&g.drawLine(h,o,w[0],o,n[0],l[0]),s[1]&&g.drawLine(h,o,h,w[1],n[1],l[1]),s[2]&&g.drawLine(h,o,w[2],o,n[2],l[2]),s[3]&&g.drawLine(h,o,h,w[3],n[3],l[3])}},t.dispose=function(){this.plot.removeOverlay(this)};function r(s,n){var l=new p(s);return l.update(n),s.addOverlay(l),l}},3540:function(v,p,t){var r=t(6832),s=t(5158),n=r([`precision mediump float;
#define GLSLIFY 1
attribute vec3 position, color;
attribute float weight;
uniform mat4 model, view, projection;
uniform vec3 coordinates[3];
uniform vec4 colors[3];
uniform vec2 screenShape;
uniform float lineWidth;
varying vec4 fragColor;
void main() {
vec3 vertexPosition = mix(coordinates[0],
mix(coordinates[2], coordinates[1], 0.5 * (position + 1.0)), abs(position));
vec4 clipPos = projection * view * model * vec4(vertexPosition, 1.0);
vec2 clipOffset = (projection * view * model * vec4(color, 0.0)).xy;
vec2 delta = weight * clipOffset * screenShape;
vec2 lineOffset = normalize(vec2(delta.y, -delta.x)) / screenShape;
gl_Position = vec4(clipPos.xy + clipPos.w * 0.5 * lineWidth * lineOffset, clipPos.z, clipPos.w);
fragColor = color.x * colors[0] + color.y * colors[1] + color.z * colors[2];
}
`]),l=r([`precision mediump float;
#define GLSLIFY 1
varying vec4 fragColor;
void main() {
gl_FragColor = fragColor;
}`]);v.exports=function(c){return s(c,n,l,null,[{name:"position",type:"vec3"},{name:"color",type:"vec3"},{name:"weight",type:"float"}])}},6496:function(v,p,t){var r=t(5827),s=t(2944),n=t(3540);v.exports=h;var 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.buffer=d,this.vao=M,this.shader=T,this.pixelRatio=1,this.bounds=[[-1e3,-1e3,-1e3],[1e3,1e3,1e3]],this.position=[0,0,0],this.lineWidth=[2,2,2],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.enabled=[!0,!0,!0],this.drawSides=[!0,!0,!0],this.axes=null}var u=c.prototype,g=[0,0,0],f=[0,0,0],w=[0,0];u.isTransparent=function(){return!1},u.drawTransparent=function(o){},u.draw=function(o){var d=this.gl,M=this.vao,T=this.shader;M.bind(),T.bind();var C=o.model||l,x=o.view||l,S=o.projection||l,b;this.axes&&(b=this.axes.lastCubeProps.axis);for(var a=g,E=f,y=0;y<3;++y)b&&b[y]<0?(a[y]=this.bounds[0][y],E[y]=this.bounds[1][y]):(a[y]=this.bounds[1][y],E[y]=this.bounds[0][y]);w[0]=d.drawingBufferWidth,w[1]=d.drawingBufferHeight,T.uniforms.model=C,T.uniforms.view=x,T.uniforms.projection=S,T.uniforms.coordinates=[this.position,a,E],T.uniforms.colors=this.colors,T.uniforms.screenShape=w;for(var y=0;y<3;++y)T.uniforms.lineWidth=this.lineWidth[y]*this.pixelRatio,this.enabled[y]&&(M.draw(d.TRIANGLES,6,6*y),this.drawSides[y]&&M.draw(d.TRIANGLES,12,18+12*y));M.unbind()},u.update=function(o){o&&("bounds"in o&&(this.bounds=o.bounds),"position"in o&&(this.position=o.position),"lineWidth"in o&&(this.lineWidth=o.lineWidth),"colors"in o&&(this.colors=o.colors),"enabled"in o&&(this.enabled=o.enabled),"drawSides"in o&&(this.drawSides=o.drawSides))},u.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function h(o,d){var M=[];function T(a,E,y,z,I,B){var k=[a,E,y,0,0,0,1];k[z+3]=1,k[z]=I,M.push.apply(M,k),k[6]=-1,M.push.apply(M,k),k[z]=B,M.push.apply(M,k),M.push.apply(M,k),k[6]=1,M.push.apply(M,k),k[z]=I,M.push.apply(M,k)}T(0,0,0,0,0,1),T(0,0,0,1,0,1),T(0,0,0,2,0,1),T(1,0,0,1,-1,1),T(1,0,0,2,-1,1),T(0,1,0,0,-1,1),T(0,1,0,2,-1,1),T(0,0,1,0,-1,1),T(0,0,1,1,-1,1);var C=r(o,M),x=s(o,[{type:o.FLOAT,buffer:C,size:3,offset:0,stride:28},{type:o.FLOAT,buffer:C,size:3,offset:12,stride:28},{type:o.FLOAT,buffer:C,size:1,offset:24,stride:28}]),S=n(o);S.attributes.position.location=0,S.attributes.color.location=1,S.attributes.weight.location=2;var b=new c(o,C,x,S);return b.update(d),b}},9578: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 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;J<S.length;J++){var te=S[J],ae=b[J],ce=a[J];T===0&&(ce=C*.05),N=r.length(ae)/x,_=s.create(),r.copy(_,ae),_[3]=ce;for(var Q=0;Q<Y;Q++)B[Q]=[te[0],te[1],te[2],Q];if(I.length>0)for(var Q=0;Q<Y;Q++){var Z=(Q+1)%Y;E.push(I[Q],B[Q],B[Z],B[Z],I[Z],I[Q]),z.push(U,_,_,_,U,U),k.push(O,N,N,N,O,O);var j=E.length;y.push([j-6,j-5,j-4],[j-3,j-2,j-1])}var K=I;I=B,B=K;var ee=U;U=_,_=ee;var oe=O;O=N,N=oe}return{positions:E,cells:y,vectors:z,vertexIntensity:k}},c=function(M,T,C,x){for(var S=0,b=0;b<M.length;b++)for(var a=M[b].velocities,E=0;E<a.length;E++)S=Math.max(S,r.length(a[E]));for(var y=M.map(function(J){return l(J,C,x,S)}),z=[],I=[],B=[],k=[],b=0;b<y.length;b++){var O=y[b],N=z.length;z=z.concat(O.positions),B=B.concat(O.vectors),k=k.concat(O.vertexIntensity);for(var E=0;E<O.cells.length;E++){var _=O.cells[E],U=[];I.push(U);for(var Y=0;Y<_.length;Y++)U.push(_[Y]+N)}}return{positions:z,cells:I,vectors:B,vertexIntensity:k,colormap:T}},u=function(M,T){var C=M.length,x;for(x=0;x<C;x++){var S=M[x];if(S===T)return x;if(S>T)return x-1}return x},g=function(M,T,C){return M<T?T:M>C?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;x<C;x++){var S=Math.abs(M[x]-M[x-1]);S<T&&(T=S)}return T},h=function(M){for(var T=[],C=[],x=[],S={},b={},a={},E=M.length,y=0;y<E;y++){var z=M[y],I=z[0],B=z[1],k=z[2];S[I]||(T.push(I),S[I]=!0),b[B]||(C.push(B),b[B]=!0),a[k]||(x.push(k),a[k]=!0)}var O=w(T),N=w(C),_=w(x),U=Math.min(O,N,_);return isFinite(U)?U:1};v.exports=function(M,T){var C=M.startingPositions,x=M.maxLength||1e3,S=M.tubeSize||1,b=M.absoluteTubeSize,a=M.gridFill||"+x+y+z",E={};a.indexOf("-x")!==-1&&(E.reversedX=!0),a.indexOf("-y")!==-1&&(E.reversedY=!0),a.indexOf("-z")!==-1&&(E.reversedZ=!0),E.filled=n.indexOf(a.replace(/-/g,"").replace(/\+/g,""));var y=M.getVelocity||function(Ne){return f(Ne,M,E)},z=M.getDivergence||function(Ne,Ee){var xe=r.create(),Se=1e-4;r.add(xe,Ne,[Se,0,0]);var Ue=y(xe);r.subtract(Ue,Ue,Ee),r.scale(Ue,Ue,1/Se),r.add(xe,Ne,[0,Se,0]);var He=y(xe);r.subtract(He,He,Ee),r.scale(He,He,1/Se),r.add(xe,Ne,[0,0,Se]);var Fe=y(xe);return r.subtract(Fe,Fe,Ee),r.scale(Fe,Fe,1/Se),r.add(xe,Ue,He),r.add(xe,xe,Fe),xe},I=[],B=T[0][0],k=T[0][1],O=T[0][2],N=T[1][0],_=T[1][1],U=T[1][2],Y=function(Ne){var Ee=Ne[0],xe=Ne[1],Se=Ne[2];return!(Ee<B||Ee>N||xe<k||xe>_||Se<O||Se>U)},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;j<Z;j++){var K=r.create();r.copy(K,C[j]);var ee=[K],oe=[],q=y(K),$=K;oe.push(q);var le=[],ie=z(K,q),he=r.length(ie);isFinite(he)&&he>Q&&(Q=he),le.push(he),I.push({points:ee,velocities:oe,divergences:le});for(var me=0;me<x*100&&ee.length<x&&Y(K);){me++;var Me=r.clone(q),Te=r.squaredLength(Me);if(Te===0)break;if(Te>ae&&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<this.contourLevels[he].length;++Me)Me===this.highlightLevel[he]?(xe.uniforms.contourColor=this.highlightColor[he],xe.uniforms.contourTint=this.highlightTint[he]):(Me===0||Me-1===this.highlightLevel[he])&&(xe.uniforms.contourColor=this.contourColor[he],xe.uniforms.contourTint=this.contourTint[he]),this._contourCounts[he][Me]&&(xe.uniforms.height=this.contourLevels[he][Me],Se.draw(le.LINES,this._contourCounts[he][Me],this._contourOffsets[he][Me]));for(he=0;he<3;++he)for(xe.uniforms.model=Ee.projections[he],xe.uniforms.clipBounds=Ee.clipBounds[he],Me=0;Me<3;++Me)if(this.contourProject[he][Me]){xe.uniforms.permutation=I[Me],le.lineWidth(this.contourWidth[Me]*this.pixelRatio);for(var Ue=0;Ue<this.contourLevels[Me].length;++Ue)Ue===this.highlightLevel[Me]?(xe.uniforms.contourColor=this.highlightColor[Me],xe.uniforms.contourTint=this.highlightTint[Me]):(Ue===0||Ue-1===this.highlightLevel[Me])&&(xe.uniforms.contourColor=this.contourColor[Me],xe.uniforms.contourTint=this.contourTint[Me]),this._contourCounts[Me][Ue]&&(xe.uniforms.height=this.contourLevels[Me][Ue],Se.draw(le.LINES,this._contourCounts[Me][Ue],this._contourOffsets[Me][Ue]))}for(Se.unbind(),Se=this._dynamicVAO,Se.bind(),he=0;he<3;++he)if(this._dynamicCounts[he]!==0)for(xe.uniforms.model=ie.model,xe.uniforms.clipBounds=ie.clipBounds,xe.uniforms.permutation=I[he],le.lineWidth(this.dynamicWidth[he]*this.pixelRatio),xe.uniforms.contourColor=this.dynamicColor[he],xe.uniforms.contourTint=this.dynamicTint[he],xe.uniforms.height=this.dynamicLevel[he],Se.draw(le.LINES,this._dynamicCounts[he],this._dynamicOffsets[he]),Me=0;Me<3;++Me)this.contourProject[Me][he]&&(xe.uniforms.model=Ee.projections[Me],xe.uniforms.clipBounds=Ee.clipBounds[Me],Se.draw(le.LINES,this._dynamicCounts[he],this._dynamicOffsets[he]));Se.unbind()}}N.draw=function(q){return Q.call(this,q,!1)},N.drawTransparent=function(q){return Q.call(this,q,!0)};var Z={model:y,view:y,projection:y,inverseModel:y,clipBounds:[[0,0,0],[0,0,0]],height:0,shape:[0,0],pickId:0,lowerBound:[0,0,0],upperBound:[0,0,0],zOffset:0,objectOffset:[0,0,0],permutation:[1,0,0,0,1,0,0,0,1],lightPosition:[0,0,0],eyePosition:[0,0,0]};N.drawPick=function(q){q=q||{};var $=this.gl;$.disable($.CULL_FACE);var le=Z;le.model=q.model||y,le.view=q.view||y,le.projection=q.projection||y,le.shape=this._field[2].shape,le.pickId=this.pickId/255,le.lowerBound=this.bounds[0],le.upperBound=this.bounds[1],le.objectOffset=this.objectOffset,le.permutation=ce;for(var ie=0;ie<2;++ie)for(var he=le.clipBounds[ie],me=0;me<3;++me)he[me]=Math.min(Math.max(this.clipBounds[ie][me],-1e8),1e8);var Me=J(le,this);if(Me.showSurface){for(this._pickShader.bind(),this._pickShader.uniforms=le,this._vao.bind(),this._vao.draw($.TRIANGLES,this._vertexCount),ie=0;ie<3;++ie)this.surfaceProject[ie]&&(this._pickShader.uniforms.model=Me.projections[ie],this._pickShader.uniforms.clipBounds=Me.clipBounds[ie],this._vao.draw($.TRIANGLES,this._vertexCount));this._vao.unbind()}if(Me.showContour){var Te=this._contourPickShader;Te.bind(),Te.uniforms=le;var Oe=this._contourVAO;for(Oe.bind(),me=0;me<3;++me)for($.lineWidth(this.contourWidth[me]*this.pixelRatio),Te.uniforms.permutation=I[me],ie=0;ie<this.contourLevels[me].length;++ie)this._contourCounts[me][ie]&&(Te.uniforms.height=this.contourLevels[me][ie],Oe.draw($.LINES,this._contourCounts[me][ie],this._contourOffsets[me][ie]));for(ie=0;ie<3;++ie)for(Te.uniforms.model=Me.projections[ie],Te.uniforms.clipBounds=Me.clipBounds[ie],me=0;me<3;++me)if(this.contourProject[ie][me]){Te.uniforms.permutation=I[me],$.lineWidth(this.contourWidth[me]*this.pixelRatio);for(var Ne=0;Ne<this.contourLevels[me].length;++Ne)this._contourCounts[me][Ne]&&(Te.uniforms.height=this.contourLevels[me][Ne],Oe.draw($.LINES,this._contourCounts[me][Ne],this._contourOffsets[me][Ne]))}Oe.unbind()}},N.pick=function(q){if(!q||q.id!==this.pickId)return null;var $=this._field[2].shape,le=this._pickResult,ie=$[0]*(q.value[0]+(q.value[2]>>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]<this.contourLevels[$e].length-1){var et=this.contourLevels[$e][qe[$e]],ct=this.contourLevels[$e][qe[$e]+1];Math.abs(et-Ne[$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;Se<he[0];++Se)this._field[0].set(Se+1,0,Se);for(this._field[0].set(he[0]+1,0,he[0]-1),this._field[1].set(0,0,0),Se=0;Se<he[1];++Se)this._field[1].set(0,Se+1,Se);this._field[1].set(0,he[1]+1,he[1]-1)}var Ue=this._field,He=w(c.mallocFloat(Ue[2].size*3*2),[3,he[0]+2,he[1]+2,2]);for(me=0;me<3;++me)T(He.pick(me),Ue[me],"mirror");var Fe=w(c.mallocFloat(Ue[2].size*3),[he[0]+2,he[1]+2,3]);for(me=0;me<he[0]+2;++me)for(Se=0;Se<he[1]+2;++Se){var Ge=He.get(0,me,Se,0),nt=He.get(0,me,Se,1),qe=He.get(1,me,Se,0),$e=He.get(1,me,Se,1),et=He.get(2,me,Se,0),ct=He.get(2,me,Se,1),dt=qe*ct-$e*et,pt=et*nt-ct*Ge,At=Ge*$e-nt*qe,Mt=Math.sqrt(dt*dt+pt*pt+At*At);Mt<1e-8?(Mt=Math.max(Math.abs(dt),Math.abs(pt),Math.abs(At)),Mt<1e-8?(At=1,pt=dt=0,Mt=1):Mt=1/Mt):Mt=1/Math.sqrt(Mt),Fe.set(me,Se,0,dt*Mt),Fe.set(me,Se,1,pt*Mt),Fe.set(me,Se,2,At*Mt)}c.free(He.data);var Vt=[1/0,1/0,1/0],Je=[-1/0,-1/0,-1/0],De=1/0,Ie=-1/0,ze=(he[0]-1)*(he[1]-1)*6,Pe=c.mallocFloat(r.nextPow2(10*ze)),be=0,se=0;for(me=0;me<he[0]-1;++me)e:for(Se=0;Se<he[1]-1;++Se){for(var ye=0;ye<2;++ye)for(var Le=0;Le<2;++Le)for(var Be=0;Be<3;++Be){var ot=this._field[Be].get(1+me+ye,1+Se+Le);if(isNaN(ot)||!isFinite(ot))continue e}for(Be=0;Be<6;++Be){var at=me+z[Be][0],wt=Se+z[Be][1],It=this._field[0].get(at+1,wt+1),Bt=this._field[1].get(at+1,wt+1);ot=this._field[2].get(at+1,wt+1),dt=Fe.get(at+1,wt+1,0),pt=Fe.get(at+1,wt+1,1),At=Fe.get(at+1,wt+1,2),q.intensity&&(Gt=q.intensity.get(at,wt));var Gt=q.intensity?q.intensity.get(at,wt):ot+this.objectOffset[2];Pe[be++]=at,Pe[be++]=wt,Pe[be++]=It,Pe[be++]=Bt,Pe[be++]=ot,Pe[be++]=0,Pe[be++]=Gt,Pe[be++]=dt,Pe[be++]=pt,Pe[be++]=At,Vt[0]=Math.min(Vt[0],It+this.objectOffset[0]),Vt[1]=Math.min(Vt[1],Bt+this.objectOffset[1]),Vt[2]=Math.min(Vt[2],ot+this.objectOffset[2]),De=Math.min(De,Gt),Je[0]=Math.max(Je[0],It+this.objectOffset[0]),Je[1]=Math.max(Je[1],Bt+this.objectOffset[1]),Je[2]=Math.max(Je[2],ot+this.objectOffset[2]),Ie=Math.max(Ie,Gt),se+=1}}for(q.intensityBounds&&(De=+q.intensityBounds[0],Ie=+q.intensityBounds[1]),me=6;me<be;me+=10)Pe[me]=(Pe[me]-De)/(Ie-De);this._vertexCount=se,this._coordinateBuffer.update(Pe.subarray(0,be)),c.freeFloat(Pe),c.free(Fe.data),this.bounds=[Vt,Je],this.intensity=q.intensity||this._field[2],(this.intensityBounds[0]!==De||this.intensityBounds[1]!==Ie)&&(le=!0),this.intensityBounds=[De,Ie]}if("levels"in q){var Lt=q.levels;for(Array.isArray(Lt[0])?Lt=Lt.slice():Lt=[[],[],Lt],me=0;me<3;++me)Lt[me]=Lt[me].slice(),Lt[me].sort(function(Ft,Zt){return Ft-Zt});for(me=0;me<3;++me)for(Se=0;Se<Lt[me].length;++Se)Lt[me][Se]-=this.objectOffset[me];e:for(me=0;me<3;++me){if(Lt[me].length!==this.contourLevels[me].length){le=!0;break}for(Se=0;Se<Lt[me].length;++Se)if(Lt[me][Se]!==this.contourLevels[me][Se]){le=!0;break e}}this.contourLevels=Lt}if(le){Ue=this._field,he=this.shape;for(var Kt=[],ir=0;ir<3;++ir){var _r=this.contourLevels[ir],yt=[],jt=[],Yt=[0,0,0];for(me=0;me<_r.length;++me){var br=h(this._field[ir],_r[me]);yt.push(Kt.length/5|0),se=0;e:for(Se=0;Se<br.cells.length;++Se){var hr=br.cells[Se];for(Be=0;Be<2;++Be){var ut=br.positions[hr[Be]],lt=ut[0],xt=Math.floor(lt)|0,Tt=lt-xt,Ct=ut[1],St=Math.floor(Ct)|0,_t=Ct-St,Ht=!1;t:for(var $t=0;$t<3;++$t){Yt[$t]=0;var Qt=(ir+$t+1)%3;for(ye=0;ye<2;++ye){var or=ye?Tt:1-Tt;for(at=Math.min(Math.max(xt+ye,0),he[0])|0,Le=0;Le<2;++Le){var Er=Le?_t:1-_t;if(wt=Math.min(Math.max(St+Le,0),he[1])|0,$t<2?ot=this._field[Qt].get(at,wt):ot=(this.intensity.get(at,wt)-this.intensityBounds[0])/(this.intensityBounds[1]-this.intensityBounds[0]),!isFinite(ot)||isNaN(ot)){Ht=!0;break t}var Ye=or*Er;Yt[$t]+=Ye*ot}}}if(!Ht)Kt.push(Yt[0],Yt[1],ut[0],ut[1],Yt[2]),se+=1;else{if(Be>0){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;me<Kt.length;++me)Dt[me]=Kt[me];this._contourBuffer.update(Dt),c.freeFloat(Dt)}},N.dispose=function(){this._shader.dispose(),this._vao.dispose(),this._coordinateBuffer.dispose(),this._colorMap.dispose(),this._contourBuffer.dispose(),this._contourVAO.dispose(),this._contourShader.dispose(),this._contourPickShader.dispose(),this._dynamicBuffer.dispose(),this._dynamicVAO.dispose();for(var q=0;q<3;++q)c.freeFloat(this._field[q].data)},N.highlight=function(q){var $;if(!q){this._dynamicCounts=[0,0,0],this.dyanamicLevel=[NaN,NaN,NaN],this.highlightLevel=[-1,-1,-1];return}for($=0;$<3;++$)this.enableHighlight[$]?this.highlightLevel[$]=q.level[$]:this.highlightLevel[$]=-1;var le;for(this.snapToData?le=q.dataCoordinate:le=q.position,$=0;$<3;++$)le[$]-=this.objectOffset[$];if(!((!this.enableDynamic[0]||le[0]===this.dynamicLevel[0])&&(!this.enableDynamic[1]||le[1]===this.dynamicLevel[1])&&(!this.enableDynamic[2]||le[2]===this.dynamicLevel[2]))){for(var ie=0,he=this.shape,me=c.mallocFloat(12*he[0]*he[1]),Me=0;Me<3;++Me){if(!this.enableDynamic[Me]){this.dynamicLevel[Me]=NaN,this._dynamicCounts[Me]=0;continue}this.dynamicLevel[Me]=le[Me];var Te=(Me+1)%3,Oe=(Me+2)%3,Ne=this._field[Me],Ee=this._field[Te],xe=this._field[Oe],Se=h(Ne,le[Me]),Ue=Se.cells,He=Se.positions;for(this._dynamicOffsets[Me]=ie,$=0;$<Ue.length;++$)for(var Fe=Ue[$],Ge=0;Ge<2;++Ge){var nt=He[Fe[Ge]],qe=+nt[0],$e=qe|0,et=Math.min($e+1,he[0])|0,ct=qe-$e,dt=1-ct,pt=+nt[1],At=pt|0,Mt=Math.min(At+1,he[1])|0,Vt=pt-At,Je=1-Vt,De=dt*Je,Ie=dt*Vt,ze=ct*Je,Pe=ct*Vt,be=De*Ee.get($e,At)+Ie*Ee.get($e,Mt)+ze*Ee.get(et,At)+Pe*Ee.get(et,Mt),se=De*xe.get($e,At)+Ie*xe.get($e,Mt)+ze*xe.get(et,At)+Pe*xe.get(et,Mt);if(isNaN(be)||isNaN(se)){Ge&&(ie-=1);break}me[2*ie+0]=be,me[2*ie+1]=se,ie+=1}this._dynamicCounts[Me]=ie-this._dynamicOffsets[Me]}this._dynamicBuffer.update(me.subarray(0,2*ie)),c.freeFloat(me)}};function oe(q){var $=q.gl,le=x($),ie=b($),he=S($),me=a($),Me=s($),Te=n($,[{buffer:Me,size:4,stride:E,offset:0},{buffer:Me,size:3,stride:E,offset:16},{buffer:Me,size:3,stride:E,offset:28}]),Oe=s($),Ne=n($,[{buffer:Oe,size:4,stride:20,offset:0},{buffer:Oe,size:1,stride:20,offset:16}]),Ee=s($),xe=n($,[{buffer:Ee,size:2,type:$.FLOAT}]),Se=l($,1,k,$.RGBA,$.UNSIGNED_BYTE);Se.minFilter=$.LINEAR,Se.magFilter=$.LINEAR;var Ue=new O($,[0,0],[[0,0,0],[0,0,0]],le,ie,Me,Te,Se,he,me,Oe,Ne,Ee,xe,[0,0,0]),He={levels:[[],[],[]]};for(var Fe in q)He[Fe]=q[Fe];return He.colormap=He.colormap||"jet",Ue.update(He),Ue}},8931:function(v,p,t){var r=t(5050),s=t(7498),n=t(5306);v.exports=a;var l=null,c=null,u=null;function g(E){l=[E.LINEAR,E.NEAREST_MIPMAP_LINEAR,E.LINEAR_MIPMAP_NEAREST,E.LINEAR_MIPMAP_NEAREST],c=[E.NEAREST,E.LINEAR,E.NEAREST_MIPMAP_NEAREST,E.NEAREST_MIPMAP_LINEAR,E.LINEAR_MIPMAP_NEAREST,E.LINEAR_MIPMAP_LINEAR],u=[E.REPEAT,E.CLAMP_TO_EDGE,E.MIRRORED_REPEAT]}function f(E){return typeof HTMLCanvasElement<"u"&&E instanceof HTMLCanvasElement||typeof HTMLImageElement<"u"&&E instanceof HTMLImageElement||typeof HTMLVideoElement<"u"&&E instanceof HTMLVideoElement||typeof ImageData<"u"&&E instanceof ImageData}var w=function(E,y){s.muls(E,y,255)};function h(E,y,z){var I=E.gl,B=I.getParameter(I.MAX_TEXTURE_SIZE);if(y<0||y>B||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;l<s.length;++l){var c=s[l];if(c.buffer){var u=c.buffer,g=c.size||4,f=c.type||t.FLOAT,w=!!c.normalized,h=c.stride||0,o=c.offset||0;u.bind(),t.enableVertexAttribArray(l),t.vertexAttribPointer(l,g,f,w,h,o)}else{if(typeof c=="number")t.vertexAttrib1f(l,c);else if(c.length===1)t.vertexAttrib1f(l,c[0]);else if(c.length===2)t.vertexAttrib2f(l,c[0],c[1]);else if(c.length===3)t.vertexAttrib3f(l,c[0],c[1],c[2]);else if(c.length===4)t.vertexAttrib4f(l,c[0],c[1],c[2],c[3]);else throw new Error("gl-vao: Invalid vertex attribute");t.disableVertexAttribArray(l)}}for(;l<n;++l)t.disableVertexAttribArray(l)}else{t.bindBuffer(t.ARRAY_BUFFER,null);for(var l=0;l<n;++l)t.disableVertexAttribArray(l)}}v.exports=p},7220:function(v,p,t){var r=t(3056);function s(l){this.gl=l,this._elements=null,this._attributes=null,this._elementsType=l.UNSIGNED_SHORT}s.prototype.bind=function(){r(this.gl,this._elements,this._attributes)},s.prototype.update=function(l,c,u){this._elements=c,this._attributes=l,this._elementsType=u||this.gl.UNSIGNED_SHORT},s.prototype.dispose=function(){},s.prototype.unbind=function(){},s.prototype.draw=function(l,c,u){u=u||0;var g=this.gl;this._elements?g.drawElements(l,c,this._elementsType,u):g.drawArrays(l,u,c)};function n(l){return new s(l)}v.exports=n},3778:function(v,p,t){var r=t(3056);function s(c,u,g,f,w,h){this.location=c,this.dimension=u,this.a=g,this.b=f,this.c=w,this.d=h}s.prototype.bind=function(c){switch(this.dimension){case 1:c.vertexAttrib1f(this.location,this.a);break;case 2:c.vertexAttrib2f(this.location,this.a,this.b);break;case 3:c.vertexAttrib3f(this.location,this.a,this.b,this.c);break;case 4:c.vertexAttrib4f(this.location,this.a,this.b,this.c,this.d);break}};function n(c,u,g){this.gl=c,this._ext=u,this.handle=g,this._attribs=[],this._useElements=!1,this._elementsType=c.UNSIGNED_SHORT}n.prototype.bind=function(){this._ext.bindVertexArrayOES(this.handle);for(var c=0;c<this._attribs.length;++c)this._attribs[c].bind(this.gl)},n.prototype.unbind=function(){this._ext.bindVertexArrayOES(null)},n.prototype.dispose=function(){this._ext.deleteVertexArrayOES(this.handle)},n.prototype.update=function(c,u,g){if(this.bind(),r(this.gl,u,c),this.unbind(),this._attribs.length=0,c)for(var f=0;f<c.length;++f){var w=c[f];typeof w=="number"?this._attribs.push(new s(f,1,w)):Array.isArray(w)&&this._attribs.push(new s(f,w.length,w[0],w[1],w[2],w[3]))}this._useElements=!!u,this._elementsType=g||this.gl.UNSIGNED_SHORT},n.prototype.draw=function(c,u,g){g=g||0;var f=this.gl;this._useElements?f.drawElements(c,u,this._elementsType,g):f.drawArrays(c,g,u)};function l(c,u){return new n(c,u,u.createVertexArrayOES())}v.exports=l},2944:function(v,p,t){var r=t(3778),s=t(7220);function n(c){this.bindVertexArrayOES=c.bindVertexArray.bind(c),this.createVertexArrayOES=c.createVertexArray.bind(c),this.deleteVertexArrayOES=c.deleteVertexArray.bind(c)}function l(c,u,g,f){var w=c.createVertexArray?new n(c):c.getExtension("OES_vertex_array_object"),h;return w?h=r(c,w):h=s(c),h.update(u,g,f),h}v.exports=l},2598: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}},5879:function(v,p,t){v.exports=l;var r=t(5415),s=t(899),n=t(9305);function l(c,u){var g=r(c[0],c[1],c[2]),f=r(u[0],u[1],u[2]);s(g,g),s(f,f);var w=n(g,f);return w>1?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;w<h;w+=l)r[0]=n[w],r[1]=n[w+1],r[2]=n[w+2],g(r,r,f),n[w]=r[0],n[w+1]=r[1],n[w+2]=r[2];return n}},5415:function(v){v.exports=p;function p(t,r,s){var n=new Float32Array(3);return n[0]=t,n[1]=r,n[2]=s,n}},2858:function(v,p,t){v.exports={EPSILON:t(154),create:t(8501),clone:t(7622),angle:t(5879),fromValues:t(5415),copy:t(8782),set:t(831),equals:t(4932),exactEquals:t(5777),add:t(2598),subtract:t(911),sub:t(8921),multiply:t(105),mul:t(5733),divide:t(7979),div:t(8629),min:t(3605),max:t(1716),floor:t(3306),ceil:t(8827),round:t(1624),scale:t(5685),scaleAndAdd:t(6722),distance:t(8288),dist:t(5981),squaredDistance:t(6403),sqrDist:t(5294),length:t(4693),len:t(1468),squaredLength:t(4337),sqrLen:t(3303),negate:t(435),inverse:t(2073),normalize:t(899),dot:t(9305),cross:t(903),lerp:t(1868),random:t(6660),transformMat4:t(3255),transformMat3:t(9908),transformQuat:t(6568),rotateX:t(392),rotateY:t(3222),rotateZ:t(3388),forEach:t(7447)}},2073: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}},1468:function(v,p,t){v.exports=t(4693)},4693:function(v){v.exports=p;function p(t){var r=t[0],s=t[1],n=t[2];return Math.sqrt(r*r+s*s+n*n)}},1868:function(v){v.exports=p;function p(t,r,s,n){var l=r[0],c=r[1],u=r[2];return t[0]=l+n*(s[0]-l),t[1]=c+n*(s[1]-c),t[2]=u+n*(s[2]-u),t}},1716: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}},3605: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}},5733:function(v,p,t){v.exports=t(105)},105: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}},435:function(v){v.exports=p;function p(t,r){return t[0]=-r[0],t[1]=-r[1],t[2]=-r[2],t}},899:function(v){v.exports=p;function p(t,r){var s=r[0],n=r[1],l=r[2],c=s*s+n*n+l*l;return c>0&&(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;u<c.length;u++){var g=c[u];if(g.type==="preprocessor"){var f=g.data.match(/\#define\s+SHADER_NAME(_B64)?\s+(.+)$/);if(f&&f[2]){var w=f[1],h=f[2];return(w?s(h):h).trim()}}}}},3193:function(v,p,t){v.exports=y;var r=t(399),s=t(9746),n=t(9525),l=t(9458),c=t(3585),u=999,g=9999,f=0,w=1,h=2,o=3,d=4,M=5,T=6,C=7,x=8,S=9,b=10,a=11,E=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"];function y(z){var I=0,B=0,k=u,O,N,_=[],U=[],Y=1,J=0,te=0,ae=!1,ce=!1,Q="",Z;z=z||{};var j=n,K=r;z.version==="300 es"&&(j=c,K=l);for(var ee={},oe={},I=0;I<j.length;I++)ee[j[I]]=!0;for(var I=0;I<K.length;I++)oe[K[I]]=!0;return function(He){return U=[],He!==null?$(He):le()};function q(He){He.length&&U.push({type:E[k],data:He,position:te,line:Y,column:J})}function $(He){I=0,He.toString&&(He=He.toString()),Q+=He.replace(/\r\n/g,`
`),Z=Q.length;for(var Fe;O=Q[I],I<Z;){switch(Fe=I,k){case f:I=Te();break;case w:I=Me();break;case h:I=me();break;case o:I=Oe();break;case d:I=xe();break;case a:I=Ee();break;case M:I=Se();break;case g:I=Ue();break;case S:I=he();break;case u:I=ie();break}if(Fe!==I)switch(Q[Fe]){case`
`:J=0,++Y;break;default:++J;break}}return B+=I,Q=Q.slice(I),U}function le(He){return _.length&&q(_.join("")),k=b,q("(eof)"),U}function ie(){return _=_.length?[]:_,N==="/"&&O==="*"?(te=B+I-1,k=f,N=O,I+1):N==="/"&&O==="/"?(te=B+I-1,k=w,N=O,I+1):O==="#"?(k=h,te=B+I,I):/\s/.test(O)?(k=S,te=B+I,I):(ae=/\d/.test(O),ce=/[^\w_]/.test(O),te=B+I,k=ae?d:ce?o:g,I)}function he(){return/[^\s]/g.test(O)?(q(_.join("")),k=u,I):(_.push(O),N=O,I+1)}function me(){return(O==="\r"||O===`
`)&&N!=="\\"?(q(_.join("")),k=u,I):(_.push(O),N=O,I+1)}function Me(){return me()}function Te(){return O==="/"&&N==="*"?(_.push(O),q(_.join("")),k=u,I+1):(_.push(O),N=O,I+1)}function Oe(){if(N==="."&&/\d/.test(O))return k=M,I;if(N==="/"&&O==="*")return k=f,I;if(N==="/"&&O==="/")return k=w,I;if(O==="."&&_.length){for(;Ne(_););return k=M,I}if(O===";"||O===")"||O==="("){if(_.length)for(;Ne(_););return q(O),k=u,I+1}var He=_.length===2&&O!=="=";if(/[\w_\d\s]/.test(O)||He){for(;Ne(_););return k=u,I}return _.push(O),N=O,I+1}function Ne(He){var Fe=0,Ge,nt;do{if(Ge=s.indexOf(He.slice(0,He.length+Fe).join("")),nt=s[Ge],Ge===-1){if(Fe--+He.length>0)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;s<p.length-1;s++)r.push(p[s],t[s]||"");return r.push(p[s]),r.join("")}},5233:function(v,p,t){var r=t(4846);function s(){var n=!1;try{var l=Object.defineProperty({},"passive",{get:function(){n=!0}});window.addEventListener("test",null,l),window.removeEventListener("test",null,l)}catch{n=!1}return n}v.exports=r&&s()},2183:function(v,p,t){v.exports=o;var r=t(417),s=t(8211).H;function n(d,M,T){this.vertices=d,this.adjacent=M,this.boundary=T,this.lastVisited=-1}n.prototype.flip=function(){var d=this.vertices[0];this.vertices[0]=this.vertices[1],this.vertices[1]=d;var M=this.adjacent[0];this.adjacent[0]=this.adjacent[1],this.adjacent[1]=M};function l(d,M,T){this.vertices=d,this.cell=M,this.index=T}function c(d,M){return s(d.vertices,M.vertices)}function u(d){return function(){var M=this.tuple;return d.apply(this,M)}}function g(d){var M=r[d+1];return M||(M=r),u(M)}var f=[];function w(d,M,T){this.dimension=d,this.vertices=M,this.simplices=T,this.interior=T.filter(function(S){return!S.boundary}),this.tuple=new Array(d+1);for(var C=0;C<=d;++C)this.tuple[C]=this.vertices[C];var x=f[d];x||(x=f[d]=g(d)),this.orient=x}var h=w.prototype;h.handleBoundaryDegeneracy=function(d,M){var T=this.dimension,C=this.vertices.length-1,x=this.tuple,S=this.vertices,b=[d];for(d.lastVisited=-C;b.length>0;){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<y.length;k+=2){var q=y[k],$=y[k+1],le=q.index,ie=$.index;le<0||ie<0||(q.cell.adjacent[q.index]=$.cell,$.cell.adjacent[$.index]=q.cell)}},h.insert=function(d,M){var T=this.vertices;T.push(d);var C=this.walk(d,M);if(C){for(var x=this.dimension,S=this.tuple,b=0;b<=x;++b){var a=C.vertices[b];a<0?S[b]=d:S[b]=T[a]}var E=this.orient(S);E<0||E===0&&(C=this.handleBoundaryDegeneracy(C,d),!C)||this.addPeaks(d,C)}},h.boundary=function(){for(var d=this.dimension,M=[],T=this.simplices,C=T.length,x=0;x<C;++x){var S=T[x];if(S.boundary){for(var b=new Array(d),a=S.vertices,E=0,y=0,z=0;z<=d;++z)a[z]>=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;a<T;++a)Y.insert(d[a],J);return Y.boundary()}},9014:function(v,p,t){var r=t(5070),s=0,n=1,l=2;v.exports=E;function c(y,z,I,B,k){this.mid=y,this.left=z,this.right=I,this.leftPoints=B,this.rightPoints=k,this.count=(z?z.count:0)+(I?I.count:0)+B.length}var u=c.prototype;function g(y,z){y.mid=z.mid,y.left=z.left,y.right=z.right,y.leftPoints=z.leftPoints,y.rightPoints=z.rightPoints,y.count=z.count}function f(y,z){var I=S(z);y.mid=I.mid,y.left=I.left,y.right=I.right,y.leftPoints=I.leftPoints,y.rightPoints=I.rightPoints,y.count=I.count}function w(y,z){var I=y.intervals([]);I.push(z),f(y,I)}function h(y,z){var I=y.intervals([]),B=I.indexOf(z);return B<0?s:(I.splice(B,1),f(y,I),n)}u.intervals=function(y){return y.push.apply(y,this.leftPoints),this.left&&this.left.intervals(y),this.right&&this.right.intervals(y),y},u.insert=function(y){var z=this.count-this.leftPoints.length;if(this.count+=1,y[1]<this.mid)this.left?4*(this.left.count+1)>3*(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]<this.mid){if(!this.left)return s;var I=this.right?this.right.count:0;if(4*I>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);_<this.leftPoints.length&&this.leftPoints[_][0]===y[0];++_)if(this.leftPoints[_]===y){this.count-=1,this.leftPoints.splice(_,1);for(var B=r.ge(this.rightPoints,y,x);B<this.rightPoints.length&&this.rightPoints[B][1]===y[1];++B)if(this.rightPoints[B]===y)return this.rightPoints.splice(B,1),n}return s}};function o(y,z,I){for(var B=0;B<y.length&&y[B][0]<=z;++B){var k=I(y[B]);if(k)return k}}function d(y,z,I){for(var B=y.length-1;B>=0&&y[B][1]>=z;--B){var k=I(y[B]);if(k)return k}}function M(y,z){for(var I=0;I<y.length;++I){var B=z(y[I]);if(B)return B}}u.queryPoint=function(y,z){if(y<this.mid){if(this.left){var I=this.left.queryPoint(y,z);if(I)return I}return o(this.leftPoints,y,z)}else if(y>this.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(y<this.mid&&this.left){var B=this.left.queryInterval(y,z,I);if(B)return B}if(z>this.mid&&this.right){var B=this.right.queryInterval(y,z,I);if(B)return B}return z<this.mid?o(this.leftPoints,z,I):y>this.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<y.length;++I)z.push(y[I][0],y[I][1]);z.sort(T);for(var B=z[z.length>>1],k=[],O=[],N=[],I=0;I<y.length;++I){var _=y[I];_[1]<B?k.push(_):B<_[0]?O.push(_):N.push(_)}var U=N,Y=N.slice();return U.sort(C),Y.sort(x),new c(B,S(k),S(O),U,Y)}function b(y){this.root=y}var a=b.prototype;a.insert=function(y){this.root?this.root.insert(y):this.root=new c(y[0],null,null,[y],[y])},a.remove=function(y){if(this.root){var z=this.root.remove(y);return z===l&&(this.root=null),z!==s}return!1},a.queryPoint=function(y,z){if(this.root)return this.root.queryPoint(y,z)},a.queryInterval=function(y,z,I){if(y<=z&&this.root)return this.root.queryInterval(y,z,I)},Object.defineProperty(a,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(a,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}});function E(y){return!y||y.length===0?new b(null):new b(S(y))}},9560:function(v){function p(t){for(var r=new Array(t),s=0;s<t;++s)r[s]=s;return r}v.exports=p},4846:function(v){v.exports=!0},4780:function(v){/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @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;s<t;s++)if(r=p.charCodeAt(s),(r<9||r>13)&&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(!(C<this.lastT())){for(var x=this._components,S=x.length-16,b=0;b<16;++b)x.push(x[S++]);this._time.push(C)}},d.flush=function(C){var x=r.gt(this._time,C)-2;x<0||(this._time.splice(0,x),this._components.splice(0,16*x))},d.lastT=function(){return this._time[this._time.length-1]},d.lookAt=function(C,x,S,b){this.recalcMatrix(C),x=x||this.computedEye,S=S||h,b=b||this.computedUp,this.setMatrix(C,g(this.computedMatrix,x,S,b));for(var a=0,E=0;E<3;++E)a+=Math.pow(S[E]-x[E],2);a=Math.log(Math.sqrt(a)),this.computedRadius[0]=a},d.rotate=function(C,x,S,b){this.recalcMatrix(C);var a=this.computedInverse;x&&c(a,a,x),S&&l(a,a,S),b&&u(a,a,b),this.setMatrix(C,n(this.computedMatrix,a))};var M=[0,0,0];d.pan=function(C,x,S,b){M[0]=-(x||0),M[1]=-(S||0),M[2]=-(b||0),this.recalcMatrix(C);var a=this.computedInverse;f(a,a,M),this.setMatrix(C,n(a,a))},d.translate=function(C,x,S,b){M[0]=x||0,M[1]=S||0,M[2]=b||0,this.recalcMatrix(C);var a=this.computedMatrix;f(a,a,M),this.setMatrix(C,a)},d.setMatrix=function(C,x){if(!(C<this.lastT())){this._time.push(C);for(var S=0;S<16;++S)this._components.push(x[S])}},d.setDistance=function(C,x){this.computedRadius[0]=x},d.setDistanceLimits=function(C,x){var S=this._limits;S[0]=C,S[1]=x},d.getDistanceLimits=function(C){var x=this._limits;return C?(C[0]=x[0],C[1]=x[1],C):x};function T(C){C=C||{};var x=C.matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return new o(x)}},3266:function(v,p,t){v.exports=s;var r=t(417)[3];function s(n){var l=n.length;if(l<3){for(var d=new Array(l),c=0;c<l;++c)d[c]=c;return l===2&&n[0][0]===n[1][0]&&n[0][1]===n[1][1]?[0]:d}for(var u=new Array(l),c=0;c<l;++c)u[c]=c;u.sort(function(x,S){var b=n[x][0]-n[S][0];return b||n[x][1]-n[S][1]});for(var g=[u[0],u[1]],f=[u[0],u[1]],c=2;c<l;++c){for(var w=u[c],h=n[w],o=g.length;o>1&&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;c<T;++c)d[M++]=g[c];for(var C=f.length-2;C>0;--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<<c-1}else if("button"in l){var c=l.button;if(c===1)return 4;if(c===2)return 2;if(c>=0)return 1<<c}}return 0}p.buttons=t;function r(l){return l.target||l.srcElement||window}p.element=r;function s(l){if(typeof l=="object"){if("offsetX"in l)return l.offsetX;var c=r(l),u=c.getBoundingClientRect();return l.clientX-u.left}return 0}p.x=s;function n(l){if(typeof l=="object"){if("offsetY"in l)return l.offsetY;var c=r(l),u=c.getBoundingClientRect();return l.clientY-u.top}return 0}p.y=n},6475:function(v,p,t){var r=t(14);v.exports=s;function s(n,l,c){typeof n=="function"&&(c=!!l,l=n,n=window);var u=r("ex",n),g=function(f){c&&f.preventDefault();var w=f.deltaX||0,h=f.deltaY||0,o=f.deltaZ||0,d=f.deltaMode,M=1;switch(d){case 1:M=u;break;case 2:M=window.innerHeight;break}if(w*=M,h*=M,o*=M,w||h||o)return l(w,h,o,f)};return n.addEventListener("wheel",g),g}},9284:function(v,p,t){var r=t(5306);v.exports=l;var s={"false,0,1":function(u,g,f,w,h){return function(d,M,T,C){var x=d.shape[0]|0,S=d.shape[1]|0,b=d.data,a=d.offset|0,E=d.stride[0]|0,y=d.stride[1]|0,z=a,I,B=-E|0,k=0,O=-y|0,N=0,_=-E-y|0,U=0,Y=E|0,J=y-E*x|0,te=0,ae=0,ce=0,Q=2*x|0,Z=w(Q),j=w(Q),K=0,ee=0,oe=-1,q=-1,$=0,le=-x|0,ie=x|0,he=0,me=-x-1|0,Me=x-1|0,Te=0,Oe=0,Ne=0;for(te=0;te<x;++te)Z[K++]=f(b[z],M,T,C),z+=Y;if(z+=J,S>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;te<x;++te)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!==$&&g(j[K+oe],Oe,U,k,Te,$,M,T,C)),K+=1,z+=Y;for(z+=J,K=0,Ne=oe,oe=q,q=Ne,Ne=le,le=ie,ie=Ne,Ne=me,me=Me,Me=Ne,ae=2;ae<S;++ae){if(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++,Te!==he&&g(j[K+le],Oe,N,U,he,Te,M,T,C)),K+=1,z+=Y,te=2;te<x;++te)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),Te!==$&&g(j[K+oe],Oe,U,k,Te,$,M,T,C)),K+=1,z+=Y;ae&1&&(K=0),Ne=oe,oe=q,q=Ne,Ne=le,le=ie,ie=Ne,Ne=me,me=Me,Me=Ne,z+=J}}h(j),h(Z)}},"false,1,0":function(u,g,f,w,h){return function(d,M,T,C){var x=d.shape[0]|0,S=d.shape[1]|0,b=d.data,a=d.offset|0,E=d.stride[0]|0,y=d.stride[1]|0,z=a,I,B=-E|0,k=0,O=-y|0,N=0,_=-E-y|0,U=0,Y=y|0,J=E-y*S|0,te=0,ae=0,ce=0,Q=2*S|0,Z=w(Q),j=w(Q),K=0,ee=0,oe=-1,q=-1,$=0,le=-S|0,ie=S|0,he=0,me=-S-1|0,Me=S-1|0,Te=0,Oe=0,Ne=0;for(ae=0;ae<S;++ae)Z[K++]=f(b[z],M,T,C),z+=Y;if(z+=J,x>0){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;ae<S;++ae)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!==$&&g(j[K+oe],Oe,N,U,$,Te,M,T,C)),K+=1,z+=Y;for(z+=J,K=0,Ne=le,le=ie,ie=Ne,Ne=oe,oe=q,q=Ne,Ne=me,me=Me,Me=Ne,te=2;te<x;++te){if(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++,Te!==he&&g(j[K+le],Oe,U,k,Te,he,M,T,C)),K+=1,z+=Y,ae=2;ae<S;++ae)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!==$&&g(j[K+oe],Oe,N,U,$,Te,M,T,C),Te!==he&&g(j[K+le],Oe,U,k,Te,he,M,T,C)),K+=1,z+=Y;te&1&&(K=0),Ne=le,le=ie,ie=Ne,Ne=oe,oe=q,q=Ne,Ne=me,me=Me,Me=Ne,z+=J}}h(j),h(Z)}}};function n(c,u,g,f,w,h){var o=[h,w].join(","),d=s[o];return d(c,u,g,r.mallocUint32,r.freeUint32)}function l(c){function u(M){throw new Error("ndarray-extract-contour: "+M)}typeof c!="object"&&u("Must specify arguments");var g=c.order;Array.isArray(g)||u("Must specify order");var f=c.arrayArguments||1;f<1&&u("Must have at least one array argument");var w=c.scalarArguments||0;w<0&&u("Scalar arg count must be > 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<f;++d)h.indexOf(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;E<b;++E)C[S]=0,S+=y},fdTemplate1:function(T,C,x,S,b,a,E){var y=T[0],z=x[0],I=a[0],B=-1*z,k=z;S|=0,E|=0;var O=0,N=z,_=I;for(O=0;O<y;++O)b[E]=.5*(C[S+B]-C[S+k]),S+=N,E+=_},fdTemplate2:function(T,C,x,S,b,a,E,y,z,I){var B=T[0],k=T[1],O=x[0],N=x[1],_=a[0],U=a[1],Y=z[0],J=z[1],te=-1*O,ae=O,ce=-1*N,Q=N;S|=0,E|=0,I|=0;var Z=0,j=0,K=N,ee=O-k*N,oe=U,q=_-k*U,$=J,le=Y-k*J;for(j=0;j<B;++j){for(Z=0;Z<k;++Z)b[E]=.5*(C[S+te]-C[S+ae]),y[I]=.5*(C[S+ce]-C[S+Q]),S+=K,E+=oe,I+=$;S+=ee,E+=q,I+=le}}},n={cdiff:function(T){var C={};return function(S,b,a){var E=S.dtype,y=S.order,z=b.dtype,I=b.order,B=a.dtype,k=a.order,O=[E,y.join(),z,I.join(),B,k.join()].join(),N=C[O];return N||(C[O]=N=T([E,y,z,I,B,k])),N(S.shape.slice(0),S.data,S.stride,S.offset|0,b.data,b.stride,b.offset|0,a.data,a.stride,a.offset|0)}},zero:function(T){var C={};return function(S){var b=S.dtype,a=S.order,E=[b,a.join()].join(),y=C[E];return y||(C[E]=y=T([b,a])),y(S.shape.slice(0),S.data,S.stride,S.offset|0)}},fdTemplate1:function(T){var C={};return function(S,b){var a=S.dtype,E=S.order,y=b.dtype,z=b.order,I=[a,E.join(),y,z.join()].join(),B=C[I];return B||(C[I]=B=T([a,E,y,z])),B(S.shape.slice(0),S.data,S.stride,S.offset|0,b.data,b.stride,b.offset|0)}},fdTemplate2:function(T){var C={};return function(S,b,a){var E=S.dtype,y=S.order,z=b.dtype,I=b.order,B=a.dtype,k=a.order,O=[E,y.join(),z,I.join(),B,k.join()].join(),N=C[O];return N||(C[O]=N=T([E,y,z,I,B,k])),N(S.shape.slice(0),S.data,S.stride,S.offset|0,b.data,b.stride,b.offset|0,a.data,a.stride,a.offset|0)}}};function l(T){var C=n[T.funcName];return C(c.bind(void 0,T))}function c(T){return s[T.funcName]}function u(T){return l({funcName:T.funcName})}var g={},f={},w=u({funcName:"cdiff"}),h=u({funcName:"zero"});function o(T){return T in g?g[T]:g[T]=u({funcName:"fdTemplate"+T})}function d(T,C,x,S){return function(b,a){var E=a.shape.slice();return E[0]>2&&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&&u<l.shape[0],w=0<=u+1&&u+1<l.shape[0],h=f?+l.get(u):0,o=w?+l.get(u+1):0;return(1-g)*h+g*o}function t(l,c,u){var g=Math.floor(c),f=c-g,w=0<=g&&g<l.shape[0],h=0<=g+1&&g+1<l.shape[0],o=Math.floor(u),d=u-o,M=0<=o&&o<l.shape[1],T=0<=o+1&&o+1<l.shape[1],C=w&&M?l.get(g,o):0,x=w&&T?l.get(g,o+1):0,S=h&&M?l.get(g+1,o):0,b=h&&T?l.get(g+1,o+1):0;return(1-d)*((1-f)*C+f*S)+d*((1-f)*x+f*b)}function r(l,c,u,g){var f=Math.floor(c),w=c-f,h=0<=f&&f<l.shape[0],o=0<=f+1&&f+1<l.shape[0],d=Math.floor(u),M=u-d,T=0<=d&&d<l.shape[1],C=0<=d+1&&d+1<l.shape[1],x=Math.floor(g),S=g-x,b=0<=x&&x<l.shape[2],a=0<=x+1&&x+1<l.shape[2],E=h&&T&&b?l.get(f,d,x):0,y=h&&C&&b?l.get(f,d+1,x):0,z=o&&T&&b?l.get(f+1,d,x):0,I=o&&C&&b?l.get(f+1,d+1,x):0,B=h&&T&&a?l.get(f,d,x+1):0,k=h&&C&&a?l.get(f,d+1,x+1):0,O=o&&T&&a?l.get(f+1,d,x+1):0,N=o&&C&&a?l.get(f+1,d+1,x+1):0;return(1-S)*((1-M)*((1-w)*E+w*z)+M*((1-w)*y+w*I))+S*((1-M)*((1-w)*B+w*O)+M*((1-w)*k+w*N))}function s(l){var c=l.shape.length|0,u=new Array(c),g=new Array(c),f=new Array(c),w=new Array(c),h,o;for(h=0;h<c;++h)o=+arguments[h+1],u[h]=Math.floor(o),g[h]=o-u[h],f[h]=0<=u[h]&&u[h]<l.shape[h],w[h]=0<=u[h]+1&&u[h]+1<l.shape[h];var d=0,M,T,C;e:for(h=0;h<1<<c;++h){for(T=1,C=l.offset,M=0;M<c;++M)if(h&1<<M){if(!w[M])continue e;T*=g[M],C+=l.stride[M]*(u[M]+1)}else{if(!f[M])continue e;T*=1-g[M],C+=l.stride[M]*u[M]}d+=T*l.data[C]}return d}function n(l,c,u,g){switch(l.shape.length){case 0:return 0;case 1:return p(l,c);case 2:return t(l,c,u);case 3:return r(l,c,u,g);default:return s.apply(void 0,arguments)}}v.exports=n,v.exports.d1=p,v.exports.d2=t,v.exports.d3=r},7498:function(v,p){var t={"float64,2,1,0":function(){return function(f,w,h,o,d){var M=f[0],T=f[1],C=f[2],x=h[0],S=h[1],b=h[2];o|=0;var a=0,E=0,y=0,z=b,I=S-C*b,B=x-T*S;for(y=0;y<M;++y){for(E=0;E<T;++E){for(a=0;a<C;++a)w[o]/=d,o+=z;o+=I}o+=B}}},"uint8,2,0,1,float64,2,1,0":function(){return function(f,w,h,o,d,M,T,C){var x=f[0],S=f[1],b=f[2],a=h[0],E=h[1],y=h[2],z=M[0],I=M[1],B=M[2];o|=0,T|=0;for(var k=o,O=T,N=f[0]|0;N>0;){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;J<S;++J){for(Y=0;Y<x;++Y){for(U=0;U<b;++U)w[o]=d[T]*C,o+=te,T+=Q;o+=ae,T+=Z}o+=ce,T+=j}}}}},"float32,1,0,float32,1,0":function(){return function(f,w,h,o,d,M,T){var C=f[0],x=f[1],S=h[0],b=h[1],a=M[0],E=M[1];o|=0,T|=0;var y=0,z=0,I=b,B=S-x*b,k=E,O=a-x*E;for(z=0;z<C;++z){for(y=0;y<x;++y)w[o]=d[T],o+=I,T+=k;o+=B,T+=O}}},"float32,1,0,float32,0,1":function(){return function(f,w,h,o,d,M,T){var C=f[0],x=f[1],S=h[0],b=h[1],a=M[0],E=M[1];o|=0,T|=0;for(var y=o,z=T,I=f[1]|0;I>0;){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;O<C;++O){for(k=0;k<x;++k)w[o]=d[T],o+=N,T+=U;o+=_,T+=Y}}}}},"uint8,2,0,1,uint8,1,2,0":function(){return function(f,w,h,o,d,M,T){var C=f[0],x=f[1],S=f[2],b=h[0],a=h[1],E=h[2],y=M[0],z=M[1],I=M[2];o|=0,T|=0;for(var B=o,k=T,O=f[2]|0;O>0;){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;J<x;++J){for(Y=0;Y<C;++Y){for(U=0;U<S;++U)w[o]=d[T],o+=te,T+=Q;o+=ae,T+=Z}o+=ce,T+=j}}}}}},"uint8,2,0,1,array,2,0,1":function(){return function(f,w,h,o,d,M,T){var C=f[0],x=f[1],S=f[2],b=h[0],a=h[1],E=h[2],y=M[0],z=M[1],I=M[2];o|=0,T|=0;var B=0,k=0,O=0,N=E,_=b-S*E,U=a-C*b,Y=I,J=y-S*I,te=z-C*y;for(O=0;O<x;++O){for(k=0;k<C;++k){for(B=0;B<S;++B)w[o]=d[T],o+=N,T+=Y;o+=_,T+=J}o+=U,T+=te}}}};function r(g,f){var w=f.join(","),h=t[w];return h()}var s=r,n={mul:function(g){var f={};return function(h,o,d){var M=h.dtype,T=h.order,C=o.dtype,x=o.order,S=d.dtype,b=d.order,a=[M,T.join(),C,x.join(),S,b.join()].join(),E=f[a];return E||(f[a]=E=g([M,T,C,x,S,b])),E(h.shape.slice(0),h.data,h.stride,h.offset|0,o.data,o.stride,o.offset|0,d.data,d.stride,d.offset|0)}},muls:function(g){var f={};return function(h,o,d){var M=h.dtype,T=h.order,C=o.dtype,x=o.order,S=[M,T.join(),C,x.join()].join(),b=f[S];return b||(f[S]=b=g([M,T,C,x])),b(h.shape.slice(0),h.data,h.stride,h.offset|0,o.data,o.stride,o.offset|0,d)}},mulseq:function(g){var f={};return function(h,o){var d=h.dtype,M=h.order,T=[d,M.join()].join(),C=f[T];return C||(f[T]=C=g([d,M])),C(h.shape.slice(0),h.data,h.stride,h.offset|0,o)}},div:function(g){var f={};return function(h,o,d){var M=h.dtype,T=h.order,C=o.dtype,x=o.order,S=d.dtype,b=d.order,a=[M,T.join(),C,x.join(),S,b.join()].join(),E=f[a];return E||(f[a]=E=g([M,T,C,x,S,b])),E(h.shape.slice(0),h.data,h.stride,h.offset|0,o.data,o.stride,o.offset|0,d.data,d.stride,d.offset|0)}},divs:function(g){var f={};return function(h,o,d){var M=h.dtype,T=h.order,C=o.dtype,x=o.order,S=[M,T.join(),C,x.join()].join(),b=f[S];return b||(f[S]=b=g([M,T,C,x])),b(h.shape.slice(0),h.data,h.stride,h.offset|0,o.data,o.stride,o.offset|0,d)}},divseq:function(g){var f={};return function(h,o){var d=h.dtype,M=h.order,T=[d,M.join()].join(),C=f[T];return C||(f[T]=C=g([d,M])),C(h.shape.slice(0),h.data,h.stride,h.offset|0,o)}},assign:function(g){var f={};return function(h,o){var d=h.dtype,M=h.order,T=o.dtype,C=o.order,x=[d,M.join(),T,C.join()].join(),S=f[x];return S||(f[x]=S=g([d,M,T,C])),S(h.shape.slice(0),h.data,h.stride,h.offset|0,o.data,o.stride,o.offset|0)}}};function l(g){var f=n[g.funcName];return f(s.bind(void 0,g))}function c(g){return l({funcName:g.funcName})}var u={mul:"*",div:"/"};(function(){for(var g in u)p[g]=c({funcName:g}),p[g+"s"]=c({funcName:g+"s"}),p[g+"seq"]=c({funcName:g+"seq"})})(),p.assign=c({funcName:"assign"})},7382:function(v,p,t){var r=t(5050),s=t(9262);v.exports=function(l,c){for(var u=[],g=l,f=1;Array.isArray(g);)u.push(g.length),f*=g.length,g=g[0];return u.length===0?r():(c||(c=r(new Float64Array(f),u)),s(c,l),c)}},9262:function(v){function p(){return function(c,u,g,f,w){var h=c[0],o=c[1],d=c[2],M=g[0],T=g[1],C=g[2],x=[0,0,0];f|=0;var S=0,b=0,a=0,E=C,y=T-d*C,z=M-o*T;for(a=0;a<h;++a){for(b=0;b<o;++b){for(S=0;S<d;++S){{var I=w,B;for(B=0;B<x.length-1;++B)I=I[x[B]];u[f]=I[x[x.length-1]]}f+=E,++x[2]}f+=y,x[2]-=d,++x[1]}f+=z,x[1]-=o,++x[0]}}}function t(){return p()}var r=t;function s(c){var u={};return function(f,w){var h=f.dtype,o=f.order,d=[h,o.join()].join(),M=u[d];return M||(u[d]=M=c([h,o])),M(f.shape.slice(0),f.data,f.stride,f.offset|0,w)}}function n(c){return s(r.bind(void 0,c))}function l(c){return n({funcName:c.funcName})}v.exports=l({funcName:"convert"})},8139:function(v,p,t){var r=t(5306);function s(w){switch(w){case"uint32":return[r.mallocUint32,r.freeUint32];default:return null}}var n={"uint32,1,0":function(w,h){return function(d,M,T,C,x,S,b,a,E,y,z){var I,B,k,O=d*x+C,N,_=w(a),U,Y,J,te;for(I=d+1;I<=M;++I){for(B=I,O+=x,k=O,U=0,Y=O,N=0;N<a;++N)_[U++]=T[Y],Y+=E;e:for(;B-- >d;){U=0,Y=k-x;t:for(N=0;N<a;++N){if(J=T[Y],te=_[U],J<te)break e;if(J>te)break t;Y+=y,U+=z}for(U=k,Y=k-x,N=0;N<a;++N)T[U]=T[Y],U+=E,Y+=E;k-=x}for(U=k,Y=0,N=0;N<a;++N)T[U]=_[Y++],U+=E}h(_)}}};function l(w,h){var o=s(h),d=[h,w].join(","),M=n[d];return o?M(o[0],o[1]):M()}var c={"uint32,1,0":function(w,h,o){return function d(M,T,C,x,S,b,a,E,y,z,I){var B=(T-M+1)/6|0,k=M+B,O=T-B,N=M+T>>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;Ne<E;++Ne){if(ie=Ee+At,he=xe+At,Oe=C[ie]-C[he],Oe>0){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;Ne<E;++Ne){if(ie=Ee+At,he=xe+At,Oe=C[ie]-C[he],Oe>0){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;Ne<E;++Ne){if(ie=Ee+At,he=xe+At,Oe=C[ie]-C[he],Oe>0){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;Ne<E;++Ne){if(ie=Ee+At,he=xe+At,Oe=C[ie]-C[he],Oe>0){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;Ne<E;++Ne){if(ie=Ee+At,he=xe+At,Oe=C[ie]-C[he],Oe>0){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;Ne<E;++Ne){if(ie=Ee+At,he=xe+At,Oe=C[ie]-C[he],Oe>0){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;Ne<E;++Ne){if(ie=Ee+At,he=xe+At,Oe=C[ie]-C[he],Oe>0){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;Ne<E;++Ne){if(ie=Ee+At,he=xe+At,Oe=C[ie]-C[he],Oe>0){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;Ne<E;++Ne){if(ie=Ee+At,he=xe+At,Oe=C[ie]-C[he],Oe>0){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;Ne<E;++Ne)ie=Ee+At,he=xe+At,me=Se+At,qe=Ue+At,$e=He+At,et=Fe+At,ct=Ge+At,dt=nt+At,Vt[pt]=C[he],Je[pt]=C[qe],j=j&&Vt[pt]===Je[pt],oe=C[ie],q=C[me],$=C[$e],C[et]=oe,C[ct]=q,C[dt]=$,++pt,At+=y;for(Ee=S*_,xe=S*M,At=x,Ne=0;Ne<E;++Ne)ie=Ee+At,he=xe+At,C[ie]=C[he],At+=y;for(Ee=S*U,xe=S*T,At=x,Ne=0;Ne<E;++Ne)ie=Ee+At,he=xe+At,C[ie]=C[he],At+=y;if(j)for(le=Q;le<=Z;++le){ie=x+le*S,pt=0;e:for(Ne=0;Ne<E;++Ne){if(Oe=C[ie]-Vt[pt],Oe!==0)break e;pt+=I,ie+=z}if(Oe!==0)if(Oe<0){if(le!==Q)for(Ee=S*le,xe=S*Q,At=x,Ne=0;Ne<E;++Ne)ie=Ee+At,he=xe+At,K=C[ie],C[ie]=C[he],C[he]=K,At+=y;++Q}else for(;;){ie=x+Z*S,pt=0;e:for(Ne=0;Ne<E;++Ne){if(Oe=C[ie]-Vt[pt],Oe!==0)break e;pt+=I,ie+=z}if(Oe>0)Z--;else if(Oe<0){for(Ee=S*le,xe=S*Q,Se=S*Z,At=x,Ne=0;Ne<E;++Ne)ie=Ee+At,he=xe+At,me=Se+At,K=C[ie],C[ie]=C[he],C[he]=C[me],C[me]=K,At+=y;++Q,--Z;break}else{for(Ee=S*le,xe=S*Z,At=x,Ne=0;Ne<E;++Ne)ie=Ee+At,he=xe+At,K=C[ie],C[ie]=C[he],C[he]=K,At+=y;--Z;break}}}else for(le=Q;le<=Z;++le){ie=x+le*S,pt=0;e:for(Ne=0;Ne<E;++Ne){if(Me=C[ie]-Vt[pt],Me!==0)break e;pt+=I,ie+=z}if(Me<0){if(le!==Q)for(Ee=S*le,xe=S*Q,At=x,Ne=0;Ne<E;++Ne)ie=Ee+At,he=xe+At,K=C[ie],C[ie]=C[he],C[he]=K,At+=y;++Q}else{ie=x+le*S,pt=0;e:for(Ne=0;Ne<E;++Ne){if(Te=C[ie]-Je[pt],Te!==0)break e;pt+=I,ie+=z}if(Te>0)for(;;){ie=x+Z*S,pt=0;e:for(Ne=0;Ne<E;++Ne){if(Oe=C[ie]-Je[pt],Oe!==0)break e;pt+=I,ie+=z}if(Oe>0){if(--Z<le)break;continue}else{ie=x+Z*S,pt=0;e:for(Ne=0;Ne<E;++Ne){if(Oe=C[ie]-Vt[pt],Oe!==0)break e;pt+=I,ie+=z}if(Oe<0){for(Ee=S*le,xe=S*Q,Se=S*Z,At=x,Ne=0;Ne<E;++Ne)ie=Ee+At,he=xe+At,me=Se+At,K=C[ie],C[ie]=C[he],C[he]=C[me],C[me]=K,At+=y;++Q,--Z}else{for(Ee=S*le,xe=S*Z,At=x,Ne=0;Ne<E;++Ne)ie=Ee+At,he=xe+At,K=C[ie],C[ie]=C[he],C[he]=K,At+=y;--Z}break}}}}for(Ee=S*M,xe=S*(Q-1),pt=0,At=x,Ne=0;Ne<E;++Ne)ie=Ee+At,he=xe+At,C[ie]=C[he],C[he]=Vt[pt],++pt,At+=y;for(Ee=S*T,xe=S*(Z+1),pt=0,At=x,Ne=0;Ne<E;++Ne)ie=Ee+At,he=xe+At,C[ie]=C[he],C[he]=Je[pt],++pt,At+=y;if(Q-2-M<=32?w(M,Q-2,C,x,S,b,a,E,y,z,I):d(M,Q-2,C,x,S,b,a,E,y,z,I),T-(Z+2)<=32?w(Z+2,T,C,x,S,b,a,E,y,z,I):d(Z+2,T,C,x,S,b,a,E,y,z,I),j){o(Vt),o(Je);return}if(Q<k&&Z>O){e:for(;;){for(ie=x+Q*S,pt=0,At=x,Ne=0;Ne<E;++Ne){if(C[ie]!==Vt[pt])break e;++pt,ie+=y}++Q}e:for(;;){for(ie=x+Z*S,pt=0,At=x,Ne=0;Ne<E;++Ne){if(C[ie]!==Je[pt])break e;++pt,ie+=y}--Z}for(le=Q;le<=Z;++le){ie=x+le*S,pt=0;e:for(Ne=0;Ne<E;++Ne){if(Me=C[ie]-Vt[pt],Me!==0)break e;pt+=I,ie+=z}if(Me===0){if(le!==Q)for(Ee=S*le,xe=S*Q,At=x,Ne=0;Ne<E;++Ne)ie=Ee+At,he=xe+At,K=C[ie],C[ie]=C[he],C[he]=K,At+=y;++Q}else{ie=x+le*S,pt=0;e:for(Ne=0;Ne<E;++Ne){if(Te=C[ie]-Je[pt],Te!==0)break e;pt+=I,ie+=z}if(Te===0)for(;;){ie=x+Z*S,pt=0;e:for(Ne=0;Ne<E;++Ne){if(Oe=C[ie]-Je[pt],Oe!==0)break e;pt+=I,ie+=z}if(Oe===0){if(--Z<le)break;continue}else{ie=x+Z*S,pt=0;e:for(Ne=0;Ne<E;++Ne){if(Oe=C[ie]-Vt[pt],Oe!==0)break e;pt+=I,ie+=z}if(Oe<0){for(Ee=S*le,xe=S*Q,Se=S*Z,At=x,Ne=0;Ne<E;++Ne)ie=Ee+At,he=xe+At,me=Se+At,K=C[ie],C[ie]=C[he],C[he]=C[me],C[me]=K,At+=y;++Q,--Z}else{for(Ee=S*le,xe=S*Z,At=x,Ne=0;Ne<E;++Ne)ie=Ee+At,he=xe+At,K=C[ie],C[ie]=C[he],C[he]=K,At+=y;--Z}break}}}}}o(Vt),o(Je),Z-Q<=32?w(Q,Z,C,x,S,b,a,E,y,z,I):d(Q,Z,C,x,S,b,a,E,y,z,I)}}};function u(w,h,o){var d=s(h),M=[h,w].join(","),T=c[M];return w.length>1&&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<o.length;++d)o[d]=[Math.abs(h[d]),d];o.sort(n);var M=new Array(o.length);for(d=0;d<M.length;++d)M[d]=o[d][1];return M}var c={T:function(h){function o(M){this.data=M}var d=o.prototype;return d.dtype=h,d.index=function(){return-1},d.size=0,d.dimension=-1,d.shape=d.stride=d.order=[],d.lo=d.hi=d.transpose=d.step=function(){return new o(this.data)},d.get=d.set=function(){},d.pick=function(){return null},function(T){return new o(T)}},0:function(h,o){function d(T,C){this.data=T,this.offset=C}var M=d.prototype;return M.dtype=h,M.index=function(){return this.offset},M.dimension=0,M.size=1,M.shape=M.stride=M.order=[],M.lo=M.hi=M.transpose=M.step=function(){return new d(this.data,this.offset)},M.pick=function(){return o(this.data)},M.valueOf=M.get=function(){return h==="generic"?this.data.get(this.offset):this.data[this.offset]},M.set=function(C){return h==="generic"?this.data.set(this.offset,C):this.data[this.offset]=C},function(C,x,S,b){return new d(C,b)}},1:function(h,o,d){function M(C,x,S,b){this.data=C,this.shape=[x],this.stride=[S],this.offset=b|0}var T=M.prototype;return T.dtype=h,T.dimension=1,Object.defineProperty(T,"size",{get:function(){return this.shape[0]}}),T.order=[0],T.set=function(x,S){return h==="generic"?this.data.set(this.offset+this.stride[0]*x,S):this.data[this.offset+this.stride[0]*x]=S},T.get=function(x){return h==="generic"?this.data.get(this.offset+this.stride[0]*x):this.data[this.offset+this.stride[0]*x]},T.index=function(x){return this.offset+this.stride[0]*x},T.hi=function(x){return new M(this.data,typeof x!="number"||x<0?this.shape[0]:x|0,this.stride[0],this.offset)},T.lo=function(x){var S=this.offset,b=0,a=this.shape[0],E=this.stride[0];return typeof x=="number"&&x>=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<T;++C)d[C]<0&&(M-=(o[C]-1)*d[C])}for(var S=g(h),b=f[S];b.length<=T+1;)b.push(u(S,b.length-1));var a=b[T+1];return a(h,o,d,M)}v.exports=w},8551:function(v,p,t){var r=t(8362),s=Math.pow(2,-1074),n=-1>>>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;f<c;++f)u[f]=[0,0,0];for(var f=0;f<s.length;++f)for(var w=s[f],h=0,o=w[w.length-1],d=w[0],M=0;M<w.length;++M){h=o,o=d,d=w[(M+1)%w.length];for(var T=n[h],C=n[o],x=n[d],S=new Array(3),b=0,a=new Array(3),E=0,y=0;y<3;++y)S[y]=T[y]-C[y],b+=S[y]*S[y],a[y]=x[y]-C[y],E+=a[y]*a[y];if(b*E>g)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;f<c;++f){for(var z=u[f],O=0,y=0;y<3;++y)O+=z[y]*z[y];if(O>g)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;f<c;++f){for(var w=s[f],h=new Array(3),o=0;o<3;++o)h[o]=n[w[o]];for(var d=new Array(3),M=new Array(3),o=0;o<3;++o)d[o]=h[1][o]-h[0][o],M[o]=h[2][o]-h[0][o];for(var T=new Array(3),C=0,o=0;o<3;++o){var x=(o+1)%3,S=(o+2)%3;T[o]=d[x]*M[S]-d[S]*M[x],C+=T[o]*T[o]}C>g?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 <https://github.com/jonschlinkert/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;f<c;++f)g[0][f]=[],g[1][f]=[];for(var f=0;f<u;++f){var w=n[f];g[0][w[0]].push(w),g[1][w[1]].push(w)}for(var h=[],f=0;f<c;++f)g[0][f].length+g[1][f].length===0&&h.push([f]);function o(b,a){var E=g[a][b[a]];E.splice(E.indexOf(b),1)}function d(b,a,E){for(var y,z,I,B=0;B<2;++B)if(g[B][a].length>0){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;N<O.length;++N){var _=O[N],U=_[k^1],Y=r(l[b],l[a],l[z],l[U]);Y>0&&(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;f<c;++f)for(var C=0;C<2;++C){for(var x=[];g[C][f].length>0;){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;w<l.length;++w){var h=c[w].length;g[w]=h,u[w]=!0,h<=1&&f.push(w)}for(;f.length>0;){var o=f.pop();u[o]=!1;for(var d=c[o],w=0;w<d.length;++w){var M=d[w];--g[M]===0&&f.push(M)}}for(var T=new Array(l.length),C=[],w=0;w<l.length;++w)if(u[w]){var o=C.length;T[w]=o,C.push(l[w])}else T[w]=-1;for(var x=[],w=0;w<n.length;++w){var S=n[w];u[S[0]]&&u[S[1]]&&x.push([T[S[0]],T[S[1]]])}return[x,C]}},8040:function(v,p,t){v.exports=h;var r=t(8348),s=t(4166),n=t(211),l=t(9660),c=t(9662),u=t(1215),g=t(3959);function f(o,d){for(var M=new Array(o),T=0;T<o;++T)M[T]=d;return M}function w(o){for(var d=new Array(o),M=0;M<o;++M)d[M]=[];return d}function h(o,d){var $=g(o,d);o=$[0],d=$[1];var M=d.length;o.length;for(var T=r(o,d.length),C=0;C<M;++C)if(T[C].length%2===1)throw new Error("planar-graph-to-polyline: graph must be manifold");var x=s(o,d);function S(Oe){for(var Ne=Oe.length,Ee=[0],xe=0;xe<Ne;++xe){var Se=d[Oe[xe]],Ue=d[Oe[(xe+1)%Ne]],He=l(-Se[0],Se[1]),Fe=l(-Se[0],Ue[1]),Ge=l(Ue[0],Se[1]),nt=l(Ue[0],Ue[1]);Ee=c(Ee,c(c(He,Fe),c(Ge,nt)))}return Ee[Ee.length-1]>0}x=x.filter(S);for(var b=x.length,a=new Array(b),E=new Array(b),C=0;C<b;++C){a[C]=C;var y=new Array(b),z=x[C].map(function(Ne){return d[Ne]}),I=n([z]),B=0;e:for(var k=0;k<b;++k)if(y[k]=0,C!==k){for(var O=x[k],N=O.length,_=0;_<N;++_){var U=I(d[O[_]]);if(U!==0){U<0&&(y[k]=1,B+=1);continue e}}y[k]=1,B+=1}E[C]=[B,C,y]}E.sort(function(Oe,Ne){return Ne[0]-Oe[0]});for(var C=0;C<b;++C)for(var y=E[C],Y=y[1],J=y[2],k=0;k<b;++k)J[k]&&(a[k]=Y);for(var te=w(b),C=0;C<b;++C)te[C].push(a[C]),te[a[C]].push(C);for(var ae={},ce=f(M,!1),C=0;C<b;++C)for(var O=x[C],N=O.length,k=0;k<N;++k){var Q=O[k],Z=O[(k+1)%N],j=Math.min(Q,Z)+":"+Math.max(Q,Z);if(j in ae){var K=ae[j];te[K].push(C),te[C].push(K),ce[Q]=ce[Z]=!0}else ae[j]=C}function ee(Oe){for(var Ne=Oe.length,Ee=0;Ee<Ne;++Ee)if(!ce[Oe[Ee]])return!1;return!0}for(var oe=[],q=f(b,-1),C=0;C<b;++C)a[C]===C&&!ee(x[C])?(oe.push(C),q[C]=0):q[C]=-1;for(var $=[];oe.length>0;){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<he;++C){var Te=ie[C];if(!(q[Te]>=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;C<M.length;++C){var x=M[C],S=x[0][0],b=x[0][1],a=x[1][1],E=[Math.min(b,a),Math.max(b,a)];S in T?T[S].push(E):T[S]=[E]}for(var y={},z=Object.keys(T),C=0;C<z.length;++C){var I=T[z[C]];y[z[C]]=n(I)}return u(y)}function f(M,T){return function(C){var x=l.le(T,C[0]);if(x<0)return 1;var S=M[x];if(!S)if(x>0&&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]<a[1][0])if(E<0)S=S.left;else if(E>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<T;++S)for(var b=M[S],a=b.length,E=a-1,y=0;y<a;E=y++){var z=b[E],I=b[y];z[0]===I[0]?x.push([z,I]):C.push([z,I])}if(C.length===0)return x.length===0?w:h(g(x));var B=s(C),k=f(B.slabs,B.coordinates);return x.length===0?k:o(g(x),k)}},7309:function(v){var p=new Float64Array(4),t=new Float64Array(4),r=new Float64Array(4);function s(n,l,c,u,g){p.length<u.length&&(p=new Float64Array(u.length),t=new Float64Array(u.length),r=new Float64Array(u.length));for(var f=0;f<u.length;++f)p[f]=n[f]-u[f],t[f]=l[f]-n[f],r[f]=c[f]-n[f];for(var w=0,h=0,o=0,d=0,M=0,T=0,f=0;f<u.length;++f){var C=t[f],x=r[f],S=p[f];w+=C*C,h+=C*x,o+=x*x,d+=S*C,M+=S*x,T+=S*S}var b=Math.abs(w*o-h*h),a=h*M-o*d,E=h*d-w*M,y;if(a+E<=b)if(a<0)E<0&&d<0?(E=0,-d>=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;f<u.length;++f)g[f]=N*n[f]+a*l[f]+E*c[f];return y<0?0:y}v.exports=s},1116:function(v,p,t){v.exports=t(6093)},7584:function(v,p,t){var r=t(1539);v.exports=s;function s(n,l){for(var c=n.length,u=new Array(c),g=0;g<c;++g)u[g]=r(n[g],l[g]);return u}},2826:function(v,p,t){v.exports=s;var r=t(5125);function s(n){for(var l=new Array(n.length),c=0;c<n.length;++c)l[c]=r(n[c]);return l}},4469:function(v,p,t){var r=t(5125),s=t(3962);v.exports=n;function n(l,c){for(var u=r(c),g=l.length,f=new Array(g),w=0;w<g;++w)f[w]=s(l[w],u);return f}},6695:function(v,p,t){var r=t(4354);v.exports=s;function s(n,l){for(var c=n.length,u=new Array(c),g=0;g<c;++g)u[g]=r(n[g],l[g]);return u}},7037:function(v,p,t){var r=t(9209),s=t(1284),n=t(9887);v.exports=l;function l(c){c.sort(s);for(var u=c.length,g=0,f=0;f<u;++f){var w=c[f],h=n(w);if(h!==0){if(g>0){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 <https://github.com/jonschlinkert/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;l<r;++l){var c=t[l],u=s;s=c+u;var g=s-c,f=u-g;f&&(t[w++]=f)}return t[w++]=s,t.length=w,t}},8167:function(v,p,t){var r=t(9660),s=t(9662),n=t(8289),l=t(402),c=6;function u(T,C,x,S){return function(a){return S(T(x(a[0][0],a[1][1]),x(-a[0][1],a[1][0])))}}function g(T,C,x,S){return function(a){return S(T(C(T(x(a[1][1],a[2][2]),x(-a[1][2],a[2][1])),a[0][0]),T(C(T(x(a[1][0],a[2][2]),x(-a[1][2],a[2][0])),-a[0][1]),C(T(x(a[1][0],a[2][1]),x(-a[1][1],a[2][0])),a[0][2]))))}}function f(T,C,x,S){return function(a){return S(T(T(C(T(C(T(x(a[2][2],a[3][3]),x(-a[2][3],a[3][2])),a[1][1]),T(C(T(x(a[2][1],a[3][3]),x(-a[2][3],a[3][1])),-a[1][2]),C(T(x(a[2][1],a[3][2]),x(-a[2][2],a[3][1])),a[1][3]))),a[0][0]),C(T(C(T(x(a[2][2],a[3][3]),x(-a[2][3],a[3][2])),a[1][0]),T(C(T(x(a[2][0],a[3][3]),x(-a[2][3],a[3][0])),-a[1][2]),C(T(x(a[2][0],a[3][2]),x(-a[2][2],a[3][0])),a[1][3]))),-a[0][1])),T(C(T(C(T(x(a[2][1],a[3][3]),x(-a[2][3],a[3][1])),a[1][0]),T(C(T(x(a[2][0],a[3][3]),x(-a[2][3],a[3][0])),-a[1][1]),C(T(x(a[2][0],a[3][1]),x(-a[2][1],a[3][0])),a[1][3]))),a[0][2]),C(T(C(T(x(a[2][1],a[3][2]),x(-a[2][2],a[3][1])),a[1][0]),T(C(T(x(a[2][0],a[3][2]),x(-a[2][2],a[3][0])),-a[1][1]),C(T(x(a[2][0],a[3][1]),x(-a[2][1],a[3][0])),a[1][2]))),-a[0][3]))))}}function w(T,C,x,S){return function(a){return S(T(T(C(T(T(C(T(C(T(x(a[3][3],a[4][4]),x(-a[3][4],a[4][3])),a[2][2]),T(C(T(x(a[3][2],a[4][4]),x(-a[3][4],a[4][2])),-a[2][3]),C(T(x(a[3][2],a[4][3]),x(-a[3][3],a[4][2])),a[2][4]))),a[1][1]),C(T(C(T(x(a[3][3],a[4][4]),x(-a[3][4],a[4][3])),a[2][1]),T(C(T(x(a[3][1],a[4][4]),x(-a[3][4],a[4][1])),-a[2][3]),C(T(x(a[3][1],a[4][3]),x(-a[3][3],a[4][1])),a[2][4]))),-a[1][2])),T(C(T(C(T(x(a[3][2],a[4][4]),x(-a[3][4],a[4][2])),a[2][1]),T(C(T(x(a[3][1],a[4][4]),x(-a[3][4],a[4][1])),-a[2][2]),C(T(x(a[3][1],a[4][2]),x(-a[3][2],a[4][1])),a[2][4]))),a[1][3]),C(T(C(T(x(a[3][2],a[4][3]),x(-a[3][3],a[4][2])),a[2][1]),T(C(T(x(a[3][1],a[4][3]),x(-a[3][3],a[4][1])),-a[2][2]),C(T(x(a[3][1],a[4][2]),x(-a[3][2],a[4][1])),a[2][3]))),-a[1][4]))),a[0][0]),C(T(T(C(T(C(T(x(a[3][3],a[4][4]),x(-a[3][4],a[4][3])),a[2][2]),T(C(T(x(a[3][2],a[4][4]),x(-a[3][4],a[4][2])),-a[2][3]),C(T(x(a[3][2],a[4][3]),x(-a[3][3],a[4][2])),a[2][4]))),a[1][0]),C(T(C(T(x(a[3][3],a[4][4]),x(-a[3][4],a[4][3])),a[2][0]),T(C(T(x(a[3][0],a[4][4]),x(-a[3][4],a[4][0])),-a[2][3]),C(T(x(a[3][0],a[4][3]),x(-a[3][3],a[4][0])),a[2][4]))),-a[1][2])),T(C(T(C(T(x(a[3][2],a[4][4]),x(-a[3][4],a[4][2])),a[2][0]),T(C(T(x(a[3][0],a[4][4]),x(-a[3][4],a[4][0])),-a[2][2]),C(T(x(a[3][0],a[4][2]),x(-a[3][2],a[4][0])),a[2][4]))),a[1][3]),C(T(C(T(x(a[3][2],a[4][3]),x(-a[3][3],a[4][2])),a[2][0]),T(C(T(x(a[3][0],a[4][3]),x(-a[3][3],a[4][0])),-a[2][2]),C(T(x(a[3][0],a[4][2]),x(-a[3][2],a[4][0])),a[2][3]))),-a[1][4]))),-a[0][1])),T(C(T(T(C(T(C(T(x(a[3][3],a[4][4]),x(-a[3][4],a[4][3])),a[2][1]),T(C(T(x(a[3][1],a[4][4]),x(-a[3][4],a[4][1])),-a[2][3]),C(T(x(a[3][1],a[4][3]),x(-a[3][3],a[4][1])),a[2][4]))),a[1][0]),C(T(C(T(x(a[3][3],a[4][4]),x(-a[3][4],a[4][3])),a[2][0]),T(C(T(x(a[3][0],a[4][4]),x(-a[3][4],a[4][0])),-a[2][3]),C(T(x(a[3][0],a[4][3]),x(-a[3][3],a[4][0])),a[2][4]))),-a[1][1])),T(C(T(C(T(x(a[3][1],a[4][4]),x(-a[3][4],a[4][1])),a[2][0]),T(C(T(x(a[3][0],a[4][4]),x(-a[3][4],a[4][0])),-a[2][1]),C(T(x(a[3][0],a[4][1]),x(-a[3][1],a[4][0])),a[2][4]))),a[1][3]),C(T(C(T(x(a[3][1],a[4][3]),x(-a[3][3],a[4][1])),a[2][0]),T(C(T(x(a[3][0],a[4][3]),x(-a[3][3],a[4][0])),-a[2][1]),C(T(x(a[3][0],a[4][1]),x(-a[3][1],a[4][0])),a[2][3]))),-a[1][4]))),a[0][2]),T(C(T(T(C(T(C(T(x(a[3][2],a[4][4]),x(-a[3][4],a[4][2])),a[2][1]),T(C(T(x(a[3][1],a[4][4]),x(-a[3][4],a[4][1])),-a[2][2]),C(T(x(a[3][1],a[4][2]),x(-a[3][2],a[4][1])),a[2][4]))),a[1][0]),C(T(C(T(x(a[3][2],a[4][4]),x(-a[3][4],a[4][2])),a[2][0]),T(C(T(x(a[3][0],a[4][4]),x(-a[3][4],a[4][0])),-a[2][2]),C(T(x(a[3][0],a[4][2]),x(-a[3][2],a[4][0])),a[2][4]))),-a[1][1])),T(C(T(C(T(x(a[3][1],a[4][4]),x(-a[3][4],a[4][1])),a[2][0]),T(C(T(x(a[3][0],a[4][4]),x(-a[3][4],a[4][0])),-a[2][1]),C(T(x(a[3][0],a[4][1]),x(-a[3][1],a[4][0])),a[2][4]))),a[1][2]),C(T(C(T(x(a[3][1],a[4][2]),x(-a[3][2],a[4][1])),a[2][0]),T(C(T(x(a[3][0],a[4][2]),x(-a[3][2],a[4][0])),-a[2][1]),C(T(x(a[3][0],a[4][1]),x(-a[3][1],a[4][0])),a[2][2]))),-a[1][4]))),-a[0][3]),C(T(T(C(T(C(T(x(a[3][2],a[4][3]),x(-a[3][3],a[4][2])),a[2][1]),T(C(T(x(a[3][1],a[4][3]),x(-a[3][3],a[4][1])),-a[2][2]),C(T(x(a[3][1],a[4][2]),x(-a[3][2],a[4][1])),a[2][3]))),a[1][0]),C(T(C(T(x(a[3][2],a[4][3]),x(-a[3][3],a[4][2])),a[2][0]),T(C(T(x(a[3][0],a[4][3]),x(-a[3][3],a[4][0])),-a[2][2]),C(T(x(a[3][0],a[4][2]),x(-a[3][2],a[4][0])),a[2][3]))),-a[1][1])),T(C(T(C(T(x(a[3][1],a[4][3]),x(-a[3][3],a[4][1])),a[2][0]),T(C(T(x(a[3][0],a[4][3]),x(-a[3][3],a[4][0])),-a[2][1]),C(T(x(a[3][0],a[4][1]),x(-a[3][1],a[4][0])),a[2][3]))),a[1][2]),C(T(C(T(x(a[3][1],a[4][2]),x(-a[3][2],a[4][1])),a[2][0]),T(C(T(x(a[3][0],a[4][2]),x(-a[3][2],a[4][0])),-a[2][1]),C(T(x(a[3][0],a[4][1]),x(-a[3][1],a[4][0])),a[2][2]))),-a[1][3]))),a[0][4])))))}}function h(T){var C=T===2?u:T===3?g:T===4?f:T===5?w:void 0;return C(s,n,r,l)}var o=[function(){return[0]},function(C){return[C[0][0]]}];function d(T,C,x,S,b,a,E,y){return function(I){switch(I.length){case 0:return T(I);case 1:return C(I);case 2:return x(I);case 3:return S(I);case 4:return b(I);case 5:return a(I)}var B=E[I.length];return B||(B=E[I.length]=y(I.length)),B(I)}}function M(){for(;o.length<c;)o.push(h(o.length));v.exports=d.apply(void 0,o.concat([o,h]));for(var T=0;T<o.length;++T)v.exports[T]=o[T]}M()},9130:function(v,p,t){var r=t(9660),s=t(9662);v.exports=n;function n(l,c){for(var u=r(l[0],c[0]),g=1;g<l.length;++g)u=s(u,r(l[g],c[g]));return u}},2227:function(v,p,t){var r=t(9660),s=t(9662),n=t(4078),l=t(8289),c=6;function u(b){var a=b===3?h:b===4?o:b===5?d:M;return a(s,n,r,l)}function g(){return 0}function f(){return 0}function w(){return 0}function h(b,a,E,y){function z(I,B,k){var O=E(I[0],I[0]),N=y(O,B[0]),_=y(O,k[0]),U=E(B[0],B[0]),Y=y(U,I[0]),J=y(U,k[0]),te=E(k[0],k[0]),ae=y(te,I[0]),ce=y(te,B[0]),Q=b(a(ce,J),a(Y,N)),Z=a(ae,_),j=a(Q,Z);return j[j.length-1]}return z}function o(b,a,E,y){function z(I,B,k,O){var N=b(E(I[0],I[0]),E(I[1],I[1])),_=y(N,B[0]),U=y(N,k[0]),Y=y(N,O[0]),J=b(E(B[0],B[0]),E(B[1],B[1])),te=y(J,I[0]),ae=y(J,k[0]),ce=y(J,O[0]),Q=b(E(k[0],k[0]),E(k[1],k[1])),Z=y(Q,I[0]),j=y(Q,B[0]),K=y(Q,O[0]),ee=b(E(O[0],O[0]),E(O[1],O[1])),oe=y(ee,I[0]),q=y(ee,B[0]),$=y(ee,k[0]),le=b(b(y(a($,K),B[1]),b(y(a(q,ce),-k[1]),y(a(j,ae),O[1]))),b(y(a(q,ce),I[1]),b(y(a(oe,Y),-B[1]),y(a(te,_),O[1])))),ie=b(b(y(a($,K),I[1]),b(y(a(oe,Y),-k[1]),y(a(Z,U),O[1]))),b(y(a(j,ae),I[1]),b(y(a(Z,U),-B[1]),y(a(te,_),k[1])))),he=a(le,ie);return he[he.length-1]}return z}function d(b,a,E,y){function z(I,B,k,O,N){var _=b(E(I[0],I[0]),b(E(I[1],I[1]),E(I[2],I[2]))),U=y(_,B[0]),Y=y(_,k[0]),J=y(_,O[0]),te=y(_,N[0]),ae=b(E(B[0],B[0]),b(E(B[1],B[1]),E(B[2],B[2]))),ce=y(ae,I[0]),Q=y(ae,k[0]),Z=y(ae,O[0]),j=y(ae,N[0]),K=b(E(k[0],k[0]),b(E(k[1],k[1]),E(k[2],k[2]))),ee=y(K,I[0]),oe=y(K,B[0]),q=y(K,O[0]),$=y(K,N[0]),le=b(E(O[0],O[0]),b(E(O[1],O[1]),E(O[2],O[2]))),ie=y(le,I[0]),he=y(le,B[0]),me=y(le,k[0]),Me=y(le,N[0]),Te=b(E(N[0],N[0]),b(E(N[1],N[1]),E(N[2],N[2]))),Oe=y(Te,I[0]),Ne=y(Te,B[0]),Ee=y(Te,k[0]),xe=y(Te,O[0]),Se=b(b(b(y(b(y(a(xe,Me),k[1]),b(y(a(Ee,$),-O[1]),y(a(me,q),N[1]))),B[2]),b(y(b(y(a(xe,Me),B[1]),b(y(a(Ne,j),-O[1]),y(a(he,Z),N[1]))),-k[2]),y(b(y(a(Ee,$),B[1]),b(y(a(Ne,j),-k[1]),y(a(oe,Q),N[1]))),O[2]))),b(y(b(y(a(me,q),B[1]),b(y(a(he,Z),-k[1]),y(a(oe,Q),O[1]))),-N[2]),b(y(b(y(a(xe,Me),B[1]),b(y(a(Ne,j),-O[1]),y(a(he,Z),N[1]))),I[2]),y(b(y(a(xe,Me),I[1]),b(y(a(Oe,te),-O[1]),y(a(ie,J),N[1]))),-B[2])))),b(b(y(b(y(a(Ne,j),I[1]),b(y(a(Oe,te),-B[1]),y(a(ce,U),N[1]))),O[2]),b(y(b(y(a(he,Z),I[1]),b(y(a(ie,J),-B[1]),y(a(ce,U),O[1]))),-N[2]),y(b(y(a(me,q),B[1]),b(y(a(he,Z),-k[1]),y(a(oe,Q),O[1]))),I[2]))),b(y(b(y(a(me,q),I[1]),b(y(a(ie,J),-k[1]),y(a(ee,Y),O[1]))),-B[2]),b(y(b(y(a(he,Z),I[1]),b(y(a(ie,J),-B[1]),y(a(ce,U),O[1]))),k[2]),y(b(y(a(oe,Q),I[1]),b(y(a(ee,Y),-B[1]),y(a(ce,U),k[1]))),-O[2]))))),Ue=b(b(b(y(b(y(a(xe,Me),k[1]),b(y(a(Ee,$),-O[1]),y(a(me,q),N[1]))),I[2]),y(b(y(a(xe,Me),I[1]),b(y(a(Oe,te),-O[1]),y(a(ie,J),N[1]))),-k[2])),b(y(b(y(a(Ee,$),I[1]),b(y(a(Oe,te),-k[1]),y(a(ee,Y),N[1]))),O[2]),y(b(y(a(me,q),I[1]),b(y(a(ie,J),-k[1]),y(a(ee,Y),O[1]))),-N[2]))),b(b(y(b(y(a(Ee,$),B[1]),b(y(a(Ne,j),-k[1]),y(a(oe,Q),N[1]))),I[2]),y(b(y(a(Ee,$),I[1]),b(y(a(Oe,te),-k[1]),y(a(ee,Y),N[1]))),-B[2])),b(y(b(y(a(Ne,j),I[1]),b(y(a(Oe,te),-B[1]),y(a(ce,U),N[1]))),k[2]),y(b(y(a(oe,Q),I[1]),b(y(a(ee,Y),-B[1]),y(a(ce,U),k[1]))),-N[2])))),He=a(Se,Ue);return He[He.length-1]}return z}function M(b,a,E,y){function z(I,B,k,O,N,_){var U=b(b(E(I[0],I[0]),E(I[1],I[1])),b(E(I[2],I[2]),E(I[3],I[3]))),Y=y(U,B[0]),J=y(U,k[0]),te=y(U,O[0]),ae=y(U,N[0]),ce=y(U,_[0]),Q=b(b(E(B[0],B[0]),E(B[1],B[1])),b(E(B[2],B[2]),E(B[3],B[3]))),Z=y(Q,I[0]),j=y(Q,k[0]),K=y(Q,O[0]),ee=y(Q,N[0]),oe=y(Q,_[0]),q=b(b(E(k[0],k[0]),E(k[1],k[1])),b(E(k[2],k[2]),E(k[3],k[3]))),$=y(q,I[0]),le=y(q,B[0]),ie=y(q,O[0]),he=y(q,N[0]),me=y(q,_[0]),Me=b(b(E(O[0],O[0]),E(O[1],O[1])),b(E(O[2],O[2]),E(O[3],O[3]))),Te=y(Me,I[0]),Oe=y(Me,B[0]),Ne=y(Me,k[0]),Ee=y(Me,N[0]),xe=y(Me,_[0]),Se=b(b(E(N[0],N[0]),E(N[1],N[1])),b(E(N[2],N[2]),E(N[3],N[3]))),Ue=y(Se,I[0]),He=y(Se,B[0]),Fe=y(Se,k[0]),Ge=y(Se,O[0]),nt=y(Se,_[0]),qe=b(b(E(_[0],_[0]),E(_[1],_[1])),b(E(_[2],_[2]),E(_[3],_[3]))),$e=y(qe,I[0]),et=y(qe,B[0]),ct=y(qe,k[0]),dt=y(qe,O[0]),pt=y(qe,N[0]),At=b(b(b(y(b(b(y(b(y(a(pt,nt),O[1]),b(y(a(dt,xe),-N[1]),y(a(Ge,Ee),_[1]))),k[2]),y(b(y(a(pt,nt),k[1]),b(y(a(ct,me),-N[1]),y(a(Fe,he),_[1]))),-O[2])),b(y(b(y(a(dt,xe),k[1]),b(y(a(ct,me),-O[1]),y(a(Ne,ie),_[1]))),N[2]),y(b(y(a(Ge,Ee),k[1]),b(y(a(Fe,he),-O[1]),y(a(Ne,ie),N[1]))),-_[2]))),B[3]),b(y(b(b(y(b(y(a(pt,nt),O[1]),b(y(a(dt,xe),-N[1]),y(a(Ge,Ee),_[1]))),B[2]),y(b(y(a(pt,nt),B[1]),b(y(a(et,oe),-N[1]),y(a(He,ee),_[1]))),-O[2])),b(y(b(y(a(dt,xe),B[1]),b(y(a(et,oe),-O[1]),y(a(Oe,K),_[1]))),N[2]),y(b(y(a(Ge,Ee),B[1]),b(y(a(He,ee),-O[1]),y(a(Oe,K),N[1]))),-_[2]))),-k[3]),y(b(b(y(b(y(a(pt,nt),k[1]),b(y(a(ct,me),-N[1]),y(a(Fe,he),_[1]))),B[2]),y(b(y(a(pt,nt),B[1]),b(y(a(et,oe),-N[1]),y(a(He,ee),_[1]))),-k[2])),b(y(b(y(a(ct,me),B[1]),b(y(a(et,oe),-k[1]),y(a(le,j),_[1]))),N[2]),y(b(y(a(Fe,he),B[1]),b(y(a(He,ee),-k[1]),y(a(le,j),N[1]))),-_[2]))),O[3]))),b(b(y(b(b(y(b(y(a(dt,xe),k[1]),b(y(a(ct,me),-O[1]),y(a(Ne,ie),_[1]))),B[2]),y(b(y(a(dt,xe),B[1]),b(y(a(et,oe),-O[1]),y(a(Oe,K),_[1]))),-k[2])),b(y(b(y(a(ct,me),B[1]),b(y(a(et,oe),-k[1]),y(a(le,j),_[1]))),O[2]),y(b(y(a(Ne,ie),B[1]),b(y(a(Oe,K),-k[1]),y(a(le,j),O[1]))),-_[2]))),-N[3]),y(b(b(y(b(y(a(Ge,Ee),k[1]),b(y(a(Fe,he),-O[1]),y(a(Ne,ie),N[1]))),B[2]),y(b(y(a(Ge,Ee),B[1]),b(y(a(He,ee),-O[1]),y(a(Oe,K),N[1]))),-k[2])),b(y(b(y(a(Fe,he),B[1]),b(y(a(He,ee),-k[1]),y(a(le,j),N[1]))),O[2]),y(b(y(a(Ne,ie),B[1]),b(y(a(Oe,K),-k[1]),y(a(le,j),O[1]))),-N[2]))),_[3])),b(y(b(b(y(b(y(a(pt,nt),O[1]),b(y(a(dt,xe),-N[1]),y(a(Ge,Ee),_[1]))),B[2]),y(b(y(a(pt,nt),B[1]),b(y(a(et,oe),-N[1]),y(a(He,ee),_[1]))),-O[2])),b(y(b(y(a(dt,xe),B[1]),b(y(a(et,oe),-O[1]),y(a(Oe,K),_[1]))),N[2]),y(b(y(a(Ge,Ee),B[1]),b(y(a(He,ee),-O[1]),y(a(Oe,K),N[1]))),-_[2]))),I[3]),y(b(b(y(b(y(a(pt,nt),O[1]),b(y(a(dt,xe),-N[1]),y(a(Ge,Ee),_[1]))),I[2]),y(b(y(a(pt,nt),I[1]),b(y(a($e,ce),-N[1]),y(a(Ue,ae),_[1]))),-O[2])),b(y(b(y(a(dt,xe),I[1]),b(y(a($e,ce),-O[1]),y(a(Te,te),_[1]))),N[2]),y(b(y(a(Ge,Ee),I[1]),b(y(a(Ue,ae),-O[1]),y(a(Te,te),N[1]))),-_[2]))),-B[3])))),b(b(b(y(b(b(y(b(y(a(pt,nt),B[1]),b(y(a(et,oe),-N[1]),y(a(He,ee),_[1]))),I[2]),y(b(y(a(pt,nt),I[1]),b(y(a($e,ce),-N[1]),y(a(Ue,ae),_[1]))),-B[2])),b(y(b(y(a(et,oe),I[1]),b(y(a($e,ce),-B[1]),y(a(Z,Y),_[1]))),N[2]),y(b(y(a(He,ee),I[1]),b(y(a(Ue,ae),-B[1]),y(a(Z,Y),N[1]))),-_[2]))),O[3]),y(b(b(y(b(y(a(dt,xe),B[1]),b(y(a(et,oe),-O[1]),y(a(Oe,K),_[1]))),I[2]),y(b(y(a(dt,xe),I[1]),b(y(a($e,ce),-O[1]),y(a(Te,te),_[1]))),-B[2])),b(y(b(y(a(et,oe),I[1]),b(y(a($e,ce),-B[1]),y(a(Z,Y),_[1]))),O[2]),y(b(y(a(Oe,K),I[1]),b(y(a(Te,te),-B[1]),y(a(Z,Y),O[1]))),-_[2]))),-N[3])),b(y(b(b(y(b(y(a(Ge,Ee),B[1]),b(y(a(He,ee),-O[1]),y(a(Oe,K),N[1]))),I[2]),y(b(y(a(Ge,Ee),I[1]),b(y(a(Ue,ae),-O[1]),y(a(Te,te),N[1]))),-B[2])),b(y(b(y(a(He,ee),I[1]),b(y(a(Ue,ae),-B[1]),y(a(Z,Y),N[1]))),O[2]),y(b(y(a(Oe,K),I[1]),b(y(a(Te,te),-B[1]),y(a(Z,Y),O[1]))),-N[2]))),_[3]),y(b(b(y(b(y(a(dt,xe),k[1]),b(y(a(ct,me),-O[1]),y(a(Ne,ie),_[1]))),B[2]),y(b(y(a(dt,xe),B[1]),b(y(a(et,oe),-O[1]),y(a(Oe,K),_[1]))),-k[2])),b(y(b(y(a(ct,me),B[1]),b(y(a(et,oe),-k[1]),y(a(le,j),_[1]))),O[2]),y(b(y(a(Ne,ie),B[1]),b(y(a(Oe,K),-k[1]),y(a(le,j),O[1]))),-_[2]))),I[3]))),b(b(y(b(b(y(b(y(a(dt,xe),k[1]),b(y(a(ct,me),-O[1]),y(a(Ne,ie),_[1]))),I[2]),y(b(y(a(dt,xe),I[1]),b(y(a($e,ce),-O[1]),y(a(Te,te),_[1]))),-k[2])),b(y(b(y(a(ct,me),I[1]),b(y(a($e,ce),-k[1]),y(a($,J),_[1]))),O[2]),y(b(y(a(Ne,ie),I[1]),b(y(a(Te,te),-k[1]),y(a($,J),O[1]))),-_[2]))),-B[3]),y(b(b(y(b(y(a(dt,xe),B[1]),b(y(a(et,oe),-O[1]),y(a(Oe,K),_[1]))),I[2]),y(b(y(a(dt,xe),I[1]),b(y(a($e,ce),-O[1]),y(a(Te,te),_[1]))),-B[2])),b(y(b(y(a(et,oe),I[1]),b(y(a($e,ce),-B[1]),y(a(Z,Y),_[1]))),O[2]),y(b(y(a(Oe,K),I[1]),b(y(a(Te,te),-B[1]),y(a(Z,Y),O[1]))),-_[2]))),k[3])),b(y(b(b(y(b(y(a(ct,me),B[1]),b(y(a(et,oe),-k[1]),y(a(le,j),_[1]))),I[2]),y(b(y(a(ct,me),I[1]),b(y(a($e,ce),-k[1]),y(a($,J),_[1]))),-B[2])),b(y(b(y(a(et,oe),I[1]),b(y(a($e,ce),-B[1]),y(a(Z,Y),_[1]))),k[2]),y(b(y(a(le,j),I[1]),b(y(a($,J),-B[1]),y(a(Z,Y),k[1]))),-_[2]))),-O[3]),y(b(b(y(b(y(a(Ne,ie),B[1]),b(y(a(Oe,K),-k[1]),y(a(le,j),O[1]))),I[2]),y(b(y(a(Ne,ie),I[1]),b(y(a(Te,te),-k[1]),y(a($,J),O[1]))),-B[2])),b(y(b(y(a(Oe,K),I[1]),b(y(a(Te,te),-B[1]),y(a(Z,Y),O[1]))),k[2]),y(b(y(a(le,j),I[1]),b(y(a($,J),-B[1]),y(a(Z,Y),k[1]))),-O[2]))),_[3]))))),Mt=b(b(b(y(b(b(y(b(y(a(pt,nt),O[1]),b(y(a(dt,xe),-N[1]),y(a(Ge,Ee),_[1]))),k[2]),y(b(y(a(pt,nt),k[1]),b(y(a(ct,me),-N[1]),y(a(Fe,he),_[1]))),-O[2])),b(y(b(y(a(dt,xe),k[1]),b(y(a(ct,me),-O[1]),y(a(Ne,ie),_[1]))),N[2]),y(b(y(a(Ge,Ee),k[1]),b(y(a(Fe,he),-O[1]),y(a(Ne,ie),N[1]))),-_[2]))),I[3]),b(y(b(b(y(b(y(a(pt,nt),O[1]),b(y(a(dt,xe),-N[1]),y(a(Ge,Ee),_[1]))),I[2]),y(b(y(a(pt,nt),I[1]),b(y(a($e,ce),-N[1]),y(a(Ue,ae),_[1]))),-O[2])),b(y(b(y(a(dt,xe),I[1]),b(y(a($e,ce),-O[1]),y(a(Te,te),_[1]))),N[2]),y(b(y(a(Ge,Ee),I[1]),b(y(a(Ue,ae),-O[1]),y(a(Te,te),N[1]))),-_[2]))),-k[3]),y(b(b(y(b(y(a(pt,nt),k[1]),b(y(a(ct,me),-N[1]),y(a(Fe,he),_[1]))),I[2]),y(b(y(a(pt,nt),I[1]),b(y(a($e,ce),-N[1]),y(a(Ue,ae),_[1]))),-k[2])),b(y(b(y(a(ct,me),I[1]),b(y(a($e,ce),-k[1]),y(a($,J),_[1]))),N[2]),y(b(y(a(Fe,he),I[1]),b(y(a(Ue,ae),-k[1]),y(a($,J),N[1]))),-_[2]))),O[3]))),b(b(y(b(b(y(b(y(a(dt,xe),k[1]),b(y(a(ct,me),-O[1]),y(a(Ne,ie),_[1]))),I[2]),y(b(y(a(dt,xe),I[1]),b(y(a($e,ce),-O[1]),y(a(Te,te),_[1]))),-k[2])),b(y(b(y(a(ct,me),I[1]),b(y(a($e,ce),-k[1]),y(a($,J),_[1]))),O[2]),y(b(y(a(Ne,ie),I[1]),b(y(a(Te,te),-k[1]),y(a($,J),O[1]))),-_[2]))),-N[3]),y(b(b(y(b(y(a(Ge,Ee),k[1]),b(y(a(Fe,he),-O[1]),y(a(Ne,ie),N[1]))),I[2]),y(b(y(a(Ge,Ee),I[1]),b(y(a(Ue,ae),-O[1]),y(a(Te,te),N[1]))),-k[2])),b(y(b(y(a(Fe,he),I[1]),b(y(a(Ue,ae),-k[1]),y(a($,J),N[1]))),O[2]),y(b(y(a(Ne,ie),I[1]),b(y(a(Te,te),-k[1]),y(a($,J),O[1]))),-N[2]))),_[3])),b(y(b(b(y(b(y(a(pt,nt),k[1]),b(y(a(ct,me),-N[1]),y(a(Fe,he),_[1]))),B[2]),y(b(y(a(pt,nt),B[1]),b(y(a(et,oe),-N[1]),y(a(He,ee),_[1]))),-k[2])),b(y(b(y(a(ct,me),B[1]),b(y(a(et,oe),-k[1]),y(a(le,j),_[1]))),N[2]),y(b(y(a(Fe,he),B[1]),b(y(a(He,ee),-k[1]),y(a(le,j),N[1]))),-_[2]))),I[3]),y(b(b(y(b(y(a(pt,nt),k[1]),b(y(a(ct,me),-N[1]),y(a(Fe,he),_[1]))),I[2]),y(b(y(a(pt,nt),I[1]),b(y(a($e,ce),-N[1]),y(a(Ue,ae),_[1]))),-k[2])),b(y(b(y(a(ct,me),I[1]),b(y(a($e,ce),-k[1]),y(a($,J),_[1]))),N[2]),y(b(y(a(Fe,he),I[1]),b(y(a(Ue,ae),-k[1]),y(a($,J),N[1]))),-_[2]))),-B[3])))),b(b(b(y(b(b(y(b(y(a(pt,nt),B[1]),b(y(a(et,oe),-N[1]),y(a(He,ee),_[1]))),I[2]),y(b(y(a(pt,nt),I[1]),b(y(a($e,ce),-N[1]),y(a(Ue,ae),_[1]))),-B[2])),b(y(b(y(a(et,oe),I[1]),b(y(a($e,ce),-B[1]),y(a(Z,Y),_[1]))),N[2]),y(b(y(a(He,ee),I[1]),b(y(a(Ue,ae),-B[1]),y(a(Z,Y),N[1]))),-_[2]))),k[3]),y(b(b(y(b(y(a(ct,me),B[1]),b(y(a(et,oe),-k[1]),y(a(le,j),_[1]))),I[2]),y(b(y(a(ct,me),I[1]),b(y(a($e,ce),-k[1]),y(a($,J),_[1]))),-B[2])),b(y(b(y(a(et,oe),I[1]),b(y(a($e,ce),-B[1]),y(a(Z,Y),_[1]))),k[2]),y(b(y(a(le,j),I[1]),b(y(a($,J),-B[1]),y(a(Z,Y),k[1]))),-_[2]))),-N[3])),b(y(b(b(y(b(y(a(Fe,he),B[1]),b(y(a(He,ee),-k[1]),y(a(le,j),N[1]))),I[2]),y(b(y(a(Fe,he),I[1]),b(y(a(Ue,ae),-k[1]),y(a($,J),N[1]))),-B[2])),b(y(b(y(a(He,ee),I[1]),b(y(a(Ue,ae),-B[1]),y(a(Z,Y),N[1]))),k[2]),y(b(y(a(le,j),I[1]),b(y(a($,J),-B[1]),y(a(Z,Y),k[1]))),-N[2]))),_[3]),y(b(b(y(b(y(a(Ge,Ee),k[1]),b(y(a(Fe,he),-O[1]),y(a(Ne,ie),N[1]))),B[2]),y(b(y(a(Ge,Ee),B[1]),b(y(a(He,ee),-O[1]),y(a(Oe,K),N[1]))),-k[2])),b(y(b(y(a(Fe,he),B[1]),b(y(a(He,ee),-k[1]),y(a(le,j),N[1]))),O[2]),y(b(y(a(Ne,ie),B[1]),b(y(a(Oe,K),-k[1]),y(a(le,j),O[1]))),-N[2]))),I[3]))),b(b(y(b(b(y(b(y(a(Ge,Ee),k[1]),b(y(a(Fe,he),-O[1]),y(a(Ne,ie),N[1]))),I[2]),y(b(y(a(Ge,Ee),I[1]),b(y(a(Ue,ae),-O[1]),y(a(Te,te),N[1]))),-k[2])),b(y(b(y(a(Fe,he),I[1]),b(y(a(Ue,ae),-k[1]),y(a($,J),N[1]))),O[2]),y(b(y(a(Ne,ie),I[1]),b(y(a(Te,te),-k[1]),y(a($,J),O[1]))),-N[2]))),-B[3]),y(b(b(y(b(y(a(Ge,Ee),B[1]),b(y(a(He,ee),-O[1]),y(a(Oe,K),N[1]))),I[2]),y(b(y(a(Ge,Ee),I[1]),b(y(a(Ue,ae),-O[1]),y(a(Te,te),N[1]))),-B[2])),b(y(b(y(a(He,ee),I[1]),b(y(a(Ue,ae),-B[1]),y(a(Z,Y),N[1]))),O[2]),y(b(y(a(Oe,K),I[1]),b(y(a(Te,te),-B[1]),y(a(Z,Y),O[1]))),-N[2]))),k[3])),b(y(b(b(y(b(y(a(Fe,he),B[1]),b(y(a(He,ee),-k[1]),y(a(le,j),N[1]))),I[2]),y(b(y(a(Fe,he),I[1]),b(y(a(Ue,ae),-k[1]),y(a($,J),N[1]))),-B[2])),b(y(b(y(a(He,ee),I[1]),b(y(a(Ue,ae),-B[1]),y(a(Z,Y),N[1]))),k[2]),y(b(y(a(le,j),I[1]),b(y(a($,J),-B[1]),y(a(Z,Y),k[1]))),-N[2]))),-O[3]),y(b(b(y(b(y(a(Ne,ie),B[1]),b(y(a(Oe,K),-k[1]),y(a(le,j),O[1]))),I[2]),y(b(y(a(Ne,ie),I[1]),b(y(a(Te,te),-k[1]),y(a($,J),O[1]))),-B[2])),b(y(b(y(a(Oe,K),I[1]),b(y(a(Te,te),-B[1]),y(a(Z,Y),O[1]))),k[2]),y(b(y(a(le,j),I[1]),b(y(a($,J),-B[1]),y(a(Z,Y),k[1]))),-O[2]))),N[3]))))),Vt=a(At,Mt);return Vt[Vt.length-1]}return z}var T=[g,f,w];function C(b){var a=T[b.length];return a||(a=T[b.length]=u(b.length)),a.apply(void 0,b)}function x(b,a,E,y,z,I,B,k){function O(N,_,U,Y,J,te){switch(arguments.length){case 0:case 1:return 0;case 2:return y(N,_);case 3:return z(N,_,U);case 4:return I(N,_,U,Y);case 5:return B(N,_,U,Y,J);case 6:return k(N,_,U,Y,J,te)}for(var ae=new Array(arguments.length),ce=0;ce<arguments.length;++ce)ae[ce]=arguments[ce];return b(ae)}return O}function S(){for(;T.length<=c;)T.push(u(T.length));v.exports=x.apply(void 0,[C].concat(T));for(var b=0;b<=c;++b)v.exports[b]=T[b]}S()},6606:function(v,p,t){var r=t(8167),s=6;function n(T){var C=T===2?u:T===3?g:T===4?f:T===5?w:h;return T<6?C(r[T]):C(r)}function l(){return[[0]]}function c(T,C){return[[C[0]],[T[0][0]]]}function u(T){return function(x,S){return[T([[+S[0],+x[0][1]],[+S[1],+x[1][1]]]),T([[+x[0][0],+S[0]],[+x[1][0],+S[1]]]),T(x)]}}function g(T){return function(x,S){return[T([[+S[0],+x[0][1],+x[0][2]],[+S[1],+x[1][1],+x[1][2]],[+S[2],+x[2][1],+x[2][2]]]),T([[+x[0][0],+S[0],+x[0][2]],[+x[1][0],+S[1],+x[1][2]],[+x[2][0],+S[2],+x[2][2]]]),T([[+x[0][0],+x[0][1],+S[0]],[+x[1][0],+x[1][1],+S[1]],[+x[2][0],+x[2][1],+S[2]]]),T(x)]}}function f(T){return function(x,S){return[T([[+S[0],+x[0][1],+x[0][2],+x[0][3]],[+S[1],+x[1][1],+x[1][2],+x[1][3]],[+S[2],+x[2][1],+x[2][2],+x[2][3]],[+S[3],+x[3][1],+x[3][2],+x[3][3]]]),T([[+x[0][0],+S[0],+x[0][2],+x[0][3]],[+x[1][0],+S[1],+x[1][2],+x[1][3]],[+x[2][0],+S[2],+x[2][2],+x[2][3]],[+x[3][0],+S[3],+x[3][2],+x[3][3]]]),T([[+x[0][0],+x[0][1],+S[0],+x[0][3]],[+x[1][0],+x[1][1],+S[1],+x[1][3]],[+x[2][0],+x[2][1],+S[2],+x[2][3]],[+x[3][0],+x[3][1],+S[3],+x[3][3]]]),T([[+x[0][0],+x[0][1],+x[0][2],+S[0]],[+x[1][0],+x[1][1],+x[1][2],+S[1]],[+x[2][0],+x[2][1],+x[2][2],+S[2]],[+x[3][0],+x[3][1],+x[3][2],+S[3]]]),T(x)]}}function w(T){return function(x,S){return[T([[+S[0],+x[0][1],+x[0][2],+x[0][3],+x[0][4]],[+S[1],+x[1][1],+x[1][2],+x[1][3],+x[1][4]],[+S[2],+x[2][1],+x[2][2],+x[2][3],+x[2][4]],[+S[3],+x[3][1],+x[3][2],+x[3][3],+x[3][4]],[+S[4],+x[4][1],+x[4][2],+x[4][3],+x[4][4]]]),T([[+x[0][0],+S[0],+x[0][2],+x[0][3],+x[0][4]],[+x[1][0],+S[1],+x[1][2],+x[1][3],+x[1][4]],[+x[2][0],+S[2],+x[2][2],+x[2][3],+x[2][4]],[+x[3][0],+S[3],+x[3][2],+x[3][3],+x[3][4]],[+x[4][0],+S[4],+x[4][2],+x[4][3],+x[4][4]]]),T([[+x[0][0],+x[0][1],+S[0],+x[0][3],+x[0][4]],[+x[1][0],+x[1][1],+S[1],+x[1][3],+x[1][4]],[+x[2][0],+x[2][1],+S[2],+x[2][3],+x[2][4]],[+x[3][0],+x[3][1],+S[3],+x[3][3],+x[3][4]],[+x[4][0],+x[4][1],+S[4],+x[4][3],+x[4][4]]]),T([[+x[0][0],+x[0][1],+x[0][2],+S[0],+x[0][4]],[+x[1][0],+x[1][1],+x[1][2],+S[1],+x[1][4]],[+x[2][0],+x[2][1],+x[2][2],+S[2],+x[2][4]],[+x[3][0],+x[3][1],+x[3][2],+S[3],+x[3][4]],[+x[4][0],+x[4][1],+x[4][2],+S[4],+x[4][4]]]),T([[+x[0][0],+x[0][1],+x[0][2],+x[0][3],+S[0]],[+x[1][0],+x[1][1],+x[1][2],+x[1][3],+S[1]],[+x[2][0],+x[2][1],+x[2][2],+x[2][3],+S[2]],[+x[3][0],+x[3][1],+x[3][2],+x[3][3],+S[3]],[+x[4][0],+x[4][1],+x[4][2],+x[4][3],+S[4]]]),T(x)]}}function h(T){return function(x,S){return[T([[+S[0],+x[0][1],+x[0][2],+x[0][3],+x[0][4],+x[0][5]],[+S[1],+x[1][1],+x[1][2],+x[1][3],+x[1][4],+x[1][5]],[+S[2],+x[2][1],+x[2][2],+x[2][3],+x[2][4],+x[2][5]],[+S[3],+x[3][1],+x[3][2],+x[3][3],+x[3][4],+x[3][5]],[+S[4],+x[4][1],+x[4][2],+x[4][3],+x[4][4],+x[4][5]],[+S[5],+x[5][1],+x[5][2],+x[5][3],+x[5][4],+x[5][5]]]),T([[+x[0][0],+S[0],+x[0][2],+x[0][3],+x[0][4],+x[0][5]],[+x[1][0],+S[1],+x[1][2],+x[1][3],+x[1][4],+x[1][5]],[+x[2][0],+S[2],+x[2][2],+x[2][3],+x[2][4],+x[2][5]],[+x[3][0],+S[3],+x[3][2],+x[3][3],+x[3][4],+x[3][5]],[+x[4][0],+S[4],+x[4][2],+x[4][3],+x[4][4],+x[4][5]],[+x[5][0],+S[5],+x[5][2],+x[5][3],+x[5][4],+x[5][5]]]),T([[+x[0][0],+x[0][1],+S[0],+x[0][3],+x[0][4],+x[0][5]],[+x[1][0],+x[1][1],+S[1],+x[1][3],+x[1][4],+x[1][5]],[+x[2][0],+x[2][1],+S[2],+x[2][3],+x[2][4],+x[2][5]],[+x[3][0],+x[3][1],+S[3],+x[3][3],+x[3][4],+x[3][5]],[+x[4][0],+x[4][1],+S[4],+x[4][3],+x[4][4],+x[4][5]],[+x[5][0],+x[5][1],+S[5],+x[5][3],+x[5][4],+x[5][5]]]),T([[+x[0][0],+x[0][1],+x[0][2],+S[0],+x[0][4],+x[0][5]],[+x[1][0],+x[1][1],+x[1][2],+S[1],+x[1][4],+x[1][5]],[+x[2][0],+x[2][1],+x[2][2],+S[2],+x[2][4],+x[2][5]],[+x[3][0],+x[3][1],+x[3][2],+S[3],+x[3][4],+x[3][5]],[+x[4][0],+x[4][1],+x[4][2],+S[4],+x[4][4],+x[4][5]],[+x[5][0],+x[5][1],+x[5][2],+S[5],+x[5][4],+x[5][5]]]),T([[+x[0][0],+x[0][1],+x[0][2],+x[0][3],+S[0],+x[0][5]],[+x[1][0],+x[1][1],+x[1][2],+x[1][3],+S[1],+x[1][5]],[+x[2][0],+x[2][1],+x[2][2],+x[2][3],+S[2],+x[2][5]],[+x[3][0],+x[3][1],+x[3][2],+x[3][3],+S[3],+x[3][5]],[+x[4][0],+x[4][1],+x[4][2],+x[4][3],+S[4],+x[4][5]],[+x[5][0],+x[5][1],+x[5][2],+x[5][3],+S[5],+x[5][5]]]),T([[+x[0][0],+x[0][1],+x[0][2],+x[0][3],+x[0][4],+S[0]],[+x[1][0],+x[1][1],+x[1][2],+x[1][3],+x[1][4],+S[1]],[+x[2][0],+x[2][1],+x[2][2],+x[2][3],+x[2][4],+S[2]],[+x[3][0],+x[3][1],+x[3][2],+x[3][3],+x[3][4],+S[3]],[+x[4][0],+x[4][1],+x[4][2],+x[4][3],+x[4][4],+S[4]],[+x[5][0],+x[5][1],+x[5][2],+x[5][3],+x[5][4],+S[5]]]),T(x)]}}var o=[l,c];function d(T,C,x,S,b,a,E,y){return function(I,B){switch(I.length){case 0:return T(I,B);case 1:return C(I,B);case 2:return x(I,B);case 3:return S(I,B);case 4:return b(I,B);case 5:return a(I,B)}var k=E[I.length];return k||(k=E[I.length]=y(I.length)),k(I,B)}}function M(){for(;o.length<s;)o.push(n(o.length));v.exports=d.apply(void 0,o.concat([o,n]));for(var T=0;T<s;++T)v.exports[T]=o[T]}M()},417:function(v,p,t){var r=t(9660),s=t(9662),n=t(8289),l=t(4078),c=5,u=11102230246251565e-32,g=(3+16*u)*u,f=(7+56*u)*u;function w(a,E,y,z){return function(B,k,O){var N=a(a(E(k[1],O[0]),E(-O[1],k[0])),a(E(B[1],k[0]),E(-k[1],B[0]))),_=a(E(B[1],O[0]),E(-O[1],B[0])),U=z(N,_);return U[U.length-1]}}function h(a,E,y,z){return function(B,k,O,N){var _=a(a(y(a(E(O[1],N[0]),E(-N[1],O[0])),k[2]),a(y(a(E(k[1],N[0]),E(-N[1],k[0])),-O[2]),y(a(E(k[1],O[0]),E(-O[1],k[0])),N[2]))),a(y(a(E(k[1],N[0]),E(-N[1],k[0])),B[2]),a(y(a(E(B[1],N[0]),E(-N[1],B[0])),-k[2]),y(a(E(B[1],k[0]),E(-k[1],B[0])),N[2])))),U=a(a(y(a(E(O[1],N[0]),E(-N[1],O[0])),B[2]),a(y(a(E(B[1],N[0]),E(-N[1],B[0])),-O[2]),y(a(E(B[1],O[0]),E(-O[1],B[0])),N[2]))),a(y(a(E(k[1],O[0]),E(-O[1],k[0])),B[2]),a(y(a(E(B[1],O[0]),E(-O[1],B[0])),-k[2]),y(a(E(B[1],k[0]),E(-k[1],B[0])),O[2])))),Y=z(_,U);return Y[Y.length-1]}}function o(a,E,y,z){return function(B,k,O,N,_){var U=a(a(a(y(a(y(a(E(N[1],_[0]),E(-_[1],N[0])),O[2]),a(y(a(E(O[1],_[0]),E(-_[1],O[0])),-N[2]),y(a(E(O[1],N[0]),E(-N[1],O[0])),_[2]))),k[3]),a(y(a(y(a(E(N[1],_[0]),E(-_[1],N[0])),k[2]),a(y(a(E(k[1],_[0]),E(-_[1],k[0])),-N[2]),y(a(E(k[1],N[0]),E(-N[1],k[0])),_[2]))),-O[3]),y(a(y(a(E(O[1],_[0]),E(-_[1],O[0])),k[2]),a(y(a(E(k[1],_[0]),E(-_[1],k[0])),-O[2]),y(a(E(k[1],O[0]),E(-O[1],k[0])),_[2]))),N[3]))),a(y(a(y(a(E(O[1],N[0]),E(-N[1],O[0])),k[2]),a(y(a(E(k[1],N[0]),E(-N[1],k[0])),-O[2]),y(a(E(k[1],O[0]),E(-O[1],k[0])),N[2]))),-_[3]),a(y(a(y(a(E(N[1],_[0]),E(-_[1],N[0])),k[2]),a(y(a(E(k[1],_[0]),E(-_[1],k[0])),-N[2]),y(a(E(k[1],N[0]),E(-N[1],k[0])),_[2]))),B[3]),y(a(y(a(E(N[1],_[0]),E(-_[1],N[0])),B[2]),a(y(a(E(B[1],_[0]),E(-_[1],B[0])),-N[2]),y(a(E(B[1],N[0]),E(-N[1],B[0])),_[2]))),-k[3])))),a(a(y(a(y(a(E(k[1],_[0]),E(-_[1],k[0])),B[2]),a(y(a(E(B[1],_[0]),E(-_[1],B[0])),-k[2]),y(a(E(B[1],k[0]),E(-k[1],B[0])),_[2]))),N[3]),a(y(a(y(a(E(k[1],N[0]),E(-N[1],k[0])),B[2]),a(y(a(E(B[1],N[0]),E(-N[1],B[0])),-k[2]),y(a(E(B[1],k[0]),E(-k[1],B[0])),N[2]))),-_[3]),y(a(y(a(E(O[1],N[0]),E(-N[1],O[0])),k[2]),a(y(a(E(k[1],N[0]),E(-N[1],k[0])),-O[2]),y(a(E(k[1],O[0]),E(-O[1],k[0])),N[2]))),B[3]))),a(y(a(y(a(E(O[1],N[0]),E(-N[1],O[0])),B[2]),a(y(a(E(B[1],N[0]),E(-N[1],B[0])),-O[2]),y(a(E(B[1],O[0]),E(-O[1],B[0])),N[2]))),-k[3]),a(y(a(y(a(E(k[1],N[0]),E(-N[1],k[0])),B[2]),a(y(a(E(B[1],N[0]),E(-N[1],B[0])),-k[2]),y(a(E(B[1],k[0]),E(-k[1],B[0])),N[2]))),O[3]),y(a(y(a(E(k[1],O[0]),E(-O[1],k[0])),B[2]),a(y(a(E(B[1],O[0]),E(-O[1],B[0])),-k[2]),y(a(E(B[1],k[0]),E(-k[1],B[0])),O[2]))),-N[3]))))),Y=a(a(a(y(a(y(a(E(N[1],_[0]),E(-_[1],N[0])),O[2]),a(y(a(E(O[1],_[0]),E(-_[1],O[0])),-N[2]),y(a(E(O[1],N[0]),E(-N[1],O[0])),_[2]))),B[3]),y(a(y(a(E(N[1],_[0]),E(-_[1],N[0])),B[2]),a(y(a(E(B[1],_[0]),E(-_[1],B[0])),-N[2]),y(a(E(B[1],N[0]),E(-N[1],B[0])),_[2]))),-O[3])),a(y(a(y(a(E(O[1],_[0]),E(-_[1],O[0])),B[2]),a(y(a(E(B[1],_[0]),E(-_[1],B[0])),-O[2]),y(a(E(B[1],O[0]),E(-O[1],B[0])),_[2]))),N[3]),y(a(y(a(E(O[1],N[0]),E(-N[1],O[0])),B[2]),a(y(a(E(B[1],N[0]),E(-N[1],B[0])),-O[2]),y(a(E(B[1],O[0]),E(-O[1],B[0])),N[2]))),-_[3]))),a(a(y(a(y(a(E(O[1],_[0]),E(-_[1],O[0])),k[2]),a(y(a(E(k[1],_[0]),E(-_[1],k[0])),-O[2]),y(a(E(k[1],O[0]),E(-O[1],k[0])),_[2]))),B[3]),y(a(y(a(E(O[1],_[0]),E(-_[1],O[0])),B[2]),a(y(a(E(B[1],_[0]),E(-_[1],B[0])),-O[2]),y(a(E(B[1],O[0]),E(-O[1],B[0])),_[2]))),-k[3])),a(y(a(y(a(E(k[1],_[0]),E(-_[1],k[0])),B[2]),a(y(a(E(B[1],_[0]),E(-_[1],B[0])),-k[2]),y(a(E(B[1],k[0]),E(-k[1],B[0])),_[2]))),O[3]),y(a(y(a(E(k[1],O[0]),E(-O[1],k[0])),B[2]),a(y(a(E(B[1],O[0]),E(-O[1],B[0])),-k[2]),y(a(E(B[1],k[0]),E(-k[1],B[0])),O[2]))),-_[3])))),J=z(U,Y);return J[J.length-1]}}function d(a){var E=a===3?w:a===4?h:o;return E(s,r,n,l)}var M=d(3),T=d(4),C=[function(){return 0},function(){return 0},function(E,y){return y[0]-E[0]},function(E,y,z){var I=(E[1]-z[1])*(y[0]-z[0]),B=(E[0]-z[0])*(y[1]-z[1]),k=I-B,O;if(I>0){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;ae<arguments.length;++ae)te[ae]=arguments[ae];return a(te)}}function b(){for(;C.length<=c;)C.push(d(C.length));v.exports=S.apply(void 0,[x].concat(C));for(var a=0;a<=c;++a)v.exports[a]=C[a]}b()},2019:function(v,p,t){var r=t(9662),s=t(8289);v.exports=n;function n(l,c){if(l.length===1)return s(c,l[0]);if(c.length===1)return s(l,c[0]);if(l.length===0||c.length===0)return[0];var u=[0];if(l.length<c.length)for(var g=0;g<l.length;++g)u=r(u,s(c,l[g]));else for(var g=0;g<c.length;++g)u=r(u,s(l,c[g]));return u}},8289:function(v,p,t){var r=t(9660),s=t(87);v.exports=n;function n(l,c){var u=l.length;if(u===1){var g=r(l[0],c);return g[0]?g:[g[1]]}var f=new Array(2*u),w=[.1,.1],h=[.1,.1],o=0;r(l[0],c,w),w[0]&&(f[o++]=w[0]);for(var d=1;d<u;++d){r(l[d],c,h);var M=w[1];s(M,h[0],w),w[0]&&(f[o++]=w[0]);var T=h[1],C=w[1],x=T+C,S=x-T,b=C-S;w[1]=x,b&&(f[o++]=b)}return w[1]&&(f[o++]=w[1]),o===0&&(f[o++]=0),f.length=o,f}},4434:function(v,p,t){v.exports=n;var r=t(417)[3];function s(l,c,u,g){for(var f=0;f<2;++f){var w=l[f],h=c[f],o=Math.min(w,h),d=Math.max(w,h),M=u[f],T=g[f],C=Math.min(M,T),x=Math.max(M,T);if(x<o||d<C)return!1}return!0}function n(l,c,u,g){var f=r(l,u,g),w=r(c,u,g);if(f>0&&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<T?(x=o,f+=1,f<n&&(o=r[f],d=h(o))):(x=M,w+=1,w<l&&(M=-s[w],T=h(M))),f<n&&d<T||w>=l?(C=o,f+=1,f<n&&(o=r[f],d=h(o))):(C=M,w+=1,w<l&&(M=-s[w],T=h(M)));for(var S=C+x,b=S-C,a=x-b,E=a,y=S,z,I,B,k,O;f<n&&w<l;)d<T?(C=o,f+=1,f<n&&(o=r[f],d=h(o))):(C=M,w+=1,w<l&&(M=-s[w],T=h(M))),x=E,S=C+x,b=S-C,a=x-b,a&&(u[g++]=a),z=y+S,I=z-y,B=z-I,k=S-I,O=y-B,E=O+k,y=z;for(;f<n;)C=o,x=E,S=C+x,b=S-C,a=x-b,a&&(u[g++]=a),z=y+S,I=z-y,B=z-I,k=S-I,O=y-B,E=O+k,y=z,f+=1,f<n&&(o=r[f]);for(;w<l;)C=M,x=E,S=C+x,b=S-C,a=x-b,a&&(u[g++]=a),z=y+S,I=z-y,B=z-I,k=S-I,O=y-B,E=O+k,y=z,w+=1,w<l&&(M=-s[w]);return E&&(u[g++]=E),y&&(u[g++]=y),g||(u[g++]=0),u.length=g,u}},9662: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<T?(x=o,f+=1,f<n&&(o=r[f],d=h(o))):(x=M,w+=1,w<l&&(M=s[w],T=h(M))),f<n&&d<T||w>=l?(C=o,f+=1,f<n&&(o=r[f],d=h(o))):(C=M,w+=1,w<l&&(M=s[w],T=h(M)));for(var S=C+x,b=S-C,a=x-b,E=a,y=S,z,I,B,k,O;f<n&&w<l;)d<T?(C=o,f+=1,f<n&&(o=r[f],d=h(o))):(C=M,w+=1,w<l&&(M=s[w],T=h(M))),x=E,S=C+x,b=S-C,a=x-b,a&&(u[g++]=a),z=y+S,I=z-y,B=z-I,k=S-I,O=y-B,E=O+k,y=z;for(;f<n;)C=o,x=E,S=C+x,b=S-C,a=x-b,a&&(u[g++]=a),z=y+S,I=z-y,B=z-I,k=S-I,O=y-B,E=O+k,y=z,f+=1,f<n&&(o=r[f]);for(;w<l;)C=M,x=E,S=C+x,b=S-C,a=x-b,a&&(u[g++]=a),z=y+S,I=z-y,B=z-I,k=S-I,O=y-B,E=O+k,y=z,w+=1,w<l&&(M=s[w]);return E&&(u[g++]=E),y&&(u[g++]=y),g||(u[g++]=0),u.length=g,u}},8691:function(v,p,t){v.exports=n;var r=t(2692),s=t(7037);function n(l){return s(r(l))}},7212:function(v,p,t){v.exports=o;var r=t(5050),s=t(5306),n=t(8729),l=t(1168);function c(d){for(var M=d.length,T=0,C=0;C<M;++C)T=Math.max(T,d[C].length)|0;return T-1}function u(d,M){for(var T=d.length,C=s.mallocUint8(T),x=0;x<T;++x)C[x]=d[x]<M|0;return C}function g(d,M){for(var T=d.length,C=M*(M+1)/2*T|0,x=s.mallocUint32(C*2),S=0,b=0;b<T;++b)for(var a=d[b],M=a.length,E=0;E<M;++E)for(var y=0;y<E;++y){var z=a[y],I=a[E];x[S++]=Math.min(z,I)|0,x[S++]=Math.max(z,I)|0}var B=S/2|0;n(r(x,[B,2]));for(var k=2,b=2;b<S;b+=2)x[b-2]===x[b]&&x[b-1]===x[b+1]||(x[k++]=x[b],x[k++]=x[b+1]);return r(x,[k/2|0,2])}function f(d,M,T,C){for(var x=d.data,S=d.shape[0],b=s.mallocDouble(S),a=0,E=0;E<S;++E){var y=x[2*E],z=x[2*E+1];if(T[y]!==T[z]){var I=M[y],B=M[z];x[2*a]=y,x[2*a+1]=z,b[a++]=(B-C)/(B-I)}}return d.shape[0]=a,r(b,[a])}function w(d,M){var T=s.mallocInt32(M*2),C=d.shape[0],x=d.data;T[0]=0;for(var S=0,b=0;b<C;++b){var a=x[2*b];if(a!==S){for(T[2*S+1]=b;++S<a;)T[2*S]=b,T[2*S+1]=b;T[2*S]=b}}for(T[2*S+1]=C;++S<M;)T[2*S]=T[2*S+1]=C;return T}function h(d){for(var M=d.shape[0]|0,T=d.data,C=new Array(M),x=0;x<M;++x)C[x]=[T[2*x],T[2*x+1]];return C}function o(d,M,T,C){T=T||0,typeof C>"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<g;++w){var h=n[w];h.length}return f}return s},function(){function s(l,c,u,g){for(var f=Math.min(u,g)|0,w=Math.max(u,g)|0,h=l[2*f],o=l[2*f+1];h<o;){var d=h+o>>1,M=c[2*d+1];if(M===w)return d;w<M?o=d:h=d+1}return h}function n(l,c,u,g){for(var f=l.length,w=[],h=0;h<f;++h){var o=l[h],d=o.length;if(d===2){var M=(g[o[0]]<<0)+(g[o[1]]<<1);if(M===0||M===3)continue;switch(M){case 0:break;case 1:w.push([s(u,c,o[0],o[1])]);break;case 2:w.push([s(u,c,o[1],o[0])]);break}}}return w}return n},function(){function s(l,c,u,g){for(var f=Math.min(u,g)|0,w=Math.max(u,g)|0,h=l[2*f],o=l[2*f+1];h<o;){var d=h+o>>1,M=c[2*d+1];if(M===w)return d;w<M?o=d:h=d+1}return h}function n(l,c,u,g){for(var f=l.length,w=[],h=0;h<f;++h){var o=l[h],d=o.length;if(d===3){var M=(g[o[0]]<<0)+(g[o[1]]<<1)+(g[o[2]]<<2);if(M===0||M===7)continue;switch(M){case 0:break;case 1:w.push([s(u,c,o[0],o[2]),s(u,c,o[0],o[1])]);break;case 2:w.push([s(u,c,o[1],o[0]),s(u,c,o[1],o[2])]);break;case 3:w.push([s(u,c,o[0],o[2]),s(u,c,o[1],o[2])]);break;case 4:w.push([s(u,c,o[2],o[1]),s(u,c,o[2],o[0])]);break;case 5:w.push([s(u,c,o[2],o[1]),s(u,c,o[0],o[1])]);break;case 6:w.push([s(u,c,o[1],o[0]),s(u,c,o[2],o[0])]);break}}else if(d===2){var M=(g[o[0]]<<0)+(g[o[1]]<<1);if(M===0||M===3)continue;switch(M){case 0:break;case 1:w.push([s(u,c,o[0],o[1])]);break;case 2:w.push([s(u,c,o[1],o[0])]);break}}}return w}return n},function(){function s(l,c,u,g){for(var f=Math.min(u,g)|0,w=Math.max(u,g)|0,h=l[2*f],o=l[2*f+1];h<o;){var d=h+o>>1,M=c[2*d+1];if(M===w)return d;w<M?o=d:h=d+1}return h}function n(l,c,u,g){for(var f=l.length,w=[],h=0;h<f;++h){var o=l[h],d=o.length;if(d===4){var M=(g[o[0]]<<0)+(g[o[1]]<<1)+(g[o[2]]<<2)+(g[o[3]]<<3);if(M===0||M===15)continue;switch(M){case 0:break;case 1:w.push([s(u,c,o[0],o[1]),s(u,c,o[0],o[2]),s(u,c,o[0],o[3])]);break;case 2:w.push([s(u,c,o[1],o[2]),s(u,c,o[1],o[0]),s(u,c,o[1],o[3])]);break;case 3:w.push([s(u,c,o[1],o[2]),s(u,c,o[0],o[2]),s(u,c,o[0],o[3])],[s(u,c,o[1],o[3]),s(u,c,o[1],o[2]),s(u,c,o[0],o[3])]);break;case 4:w.push([s(u,c,o[2],o[0]),s(u,c,o[2],o[1]),s(u,c,o[2],o[3])]);break;case 5:w.push([s(u,c,o[0],o[1]),s(u,c,o[2],o[1]),s(u,c,o[0],o[3])],[s(u,c,o[2],o[1]),s(u,c,o[2],o[3]),s(u,c,o[0],o[3])]);break;case 6:w.push([s(u,c,o[2],o[0]),s(u,c,o[1],o[0]),s(u,c,o[1],o[3])],[s(u,c,o[2],o[3]),s(u,c,o[2],o[0]),s(u,c,o[1],o[3])]);break;case 7:w.push([s(u,c,o[0],o[3]),s(u,c,o[1],o[3]),s(u,c,o[2],o[3])]);break;case 8:w.push([s(u,c,o[3],o[1]),s(u,c,o[3],o[0]),s(u,c,o[3],o[2])]);break;case 9:w.push([s(u,c,o[3],o[1]),s(u,c,o[0],o[1]),s(u,c,o[0],o[2])],[s(u,c,o[3],o[2]),s(u,c,o[3],o[1]),s(u,c,o[0],o[2])]);break;case 10:w.push([s(u,c,o[1],o[0]),s(u,c,o[3],o[0]),s(u,c,o[1],o[2])],[s(u,c,o[3],o[0]),s(u,c,o[3],o[2]),s(u,c,o[1],o[2])]);break;case 11:w.push([s(u,c,o[1],o[2]),s(u,c,o[0],o[2]),s(u,c,o[3],o[2])]);break;case 12:w.push([s(u,c,o[3],o[0]),s(u,c,o[2],o[0]),s(u,c,o[2],o[1])],[s(u,c,o[3],o[1]),s(u,c,o[3],o[0]),s(u,c,o[2],o[1])]);break;case 13:w.push([s(u,c,o[0],o[1]),s(u,c,o[2],o[1]),s(u,c,o[3],o[1])]);break;case 14:w.push([s(u,c,o[2],o[0]),s(u,c,o[1],o[0]),s(u,c,o[3],o[0])]);break}}else if(d===3){var M=(g[o[0]]<<0)+(g[o[1]]<<1)+(g[o[2]]<<2);if(M===0||M===7)continue;switch(M){case 0:break;case 1:w.push([s(u,c,o[0],o[2]),s(u,c,o[0],o[1])]);break;case 2:w.push([s(u,c,o[1],o[0]),s(u,c,o[1],o[2])]);break;case 3:w.push([s(u,c,o[0],o[2]),s(u,c,o[1],o[2])]);break;case 4:w.push([s(u,c,o[2],o[1]),s(u,c,o[2],o[0])]);break;case 5:w.push([s(u,c,o[2],o[1]),s(u,c,o[0],o[1])]);break;case 6:w.push([s(u,c,o[1],o[0]),s(u,c,o[2],o[0])]);break}}else if(d===2){var M=(g[o[0]]<<0)+(g[o[1]]<<1);if(M===0||M===3)continue;switch(M){case 0:break;case 1:w.push([s(u,c,o[0],o[1])]);break;case 2:w.push([s(u,c,o[1],o[0])]);break}}}return w}return n}];function t(r){return p[r]()}},8211:function(v,p,t){t(2288),t(1731);function r(s,n){var l=s.length,c=s.length-n.length,u=Math.min;if(c)return c;switch(l){case 0:return 0;case 1:return s[0]-n[0];case 2:var o=s[0]+s[1]-n[0]-n[1];return o||u(s[0],s[1])-u(n[0],n[1]);case 3:var g=s[0]+s[1],f=n[0]+n[1];if(o=g+s[2]-(f+n[2]),o)return o;var w=u(s[0],s[1]),h=u(n[0],n[1]),o=u(w,s[2])-u(h,n[2]);return o||u(w+s[2],g)-u(h+n[2],f);default:var d=s.slice(0);d.sort();var M=n.slice(0);M.sort();for(var T=0;T<l;++T)if(c=d[T]-M[T],c)return c;return 0}}p.H=r},9392:function(v,p){"use restrict";var t=32;p.INT_BITS=t,p.INT_MAX=2147483647,p.INT_MIN=-1<<t-1,p.sign=function(n){return(n>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)&-(n<l)},p.max=function(n,l){return n^(n^l)&-(n<l)},p.isPow2=function(n){return!(n&n-1)&&!!n},p.log2=function(n){var l,c;return l=(n>65535)<<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<<g&255}})(s),p.reverse=function(n){return s[n&255]<<24|s[n>>>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<I;++z)E=y(E,a[z].length);return E-1}p.dimension=n;function l(a){for(var E=-1,y=Math.max,z=0,I=a.length;z<I;++z)for(var B=a[z],k=0,O=B.length;k<O;++k)E=y(E,B[k]);return E+1}p.countVertices=l;function c(a){for(var E=new Array(a.length),y=0,z=a.length;y<z;++y)E[y]=a[y].slice(0);return E}p.cloneCells=c;function u(a,E){var y=a.length,z=a.length-E.length,I=Math.min;if(z)return z;switch(y){case 0:return 0;case 1:return a[0]-E[0];case 2:var _=a[0]+a[1]-E[0]-E[1];return _||I(a[0],a[1])-I(E[0],E[1]);case 3:var B=a[0]+a[1],k=E[0]+E[1];if(_=B+a[2]-(k+E[2]),_)return _;var O=I(a[0],a[1]),N=I(E[0],E[1]),_=I(O,a[2])-I(N,E[2]);return _||I(O+a[2],B)-I(N+E[2],k);default:var U=a.slice(0);U.sort();var Y=E.slice(0);Y.sort();for(var J=0;J<y;++J)if(z=U[J]-Y[J],z)return z;return 0}}p.compareCells=u;function g(a,E){return u(a[0],E[0])}function f(a,E){if(E){for(var y=a.length,z=new Array(y),I=0;I<y;++I)z[I]=[a[I],E[I]];z.sort(g);for(var I=0;I<y;++I)a[I]=z[I][0],E[I]=z[I][1];return a}else return a.sort(u),a}p.normalize=f;function w(a){if(a.length===0)return[];for(var E=1,y=a.length,z=1;z<y;++z){var I=a[z];if(u(I,a[z-1])){if(z===E){E++;continue}a[E++]=I}}return a.length=E,a}p.unique=w;function h(a,E){for(var y=0,z=a.length-1,I=-1;y<=z;){var B=y+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<I;++z)y[z]=[];for(var B=[],z=0,k=E.length;z<k;++z)for(var O=E[z],N=O.length,_=1,U=1<<N;_<U;++_){B.length=r.popCount(_);for(var Y=0,J=0;J<N;++J)_&1<<J&&(B[Y++]=O[J]);var te=h(a,B);if(!(te<0))for(;y[te++].push(z),!(te>=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<E;++z)y[z]=[];for(var z=0,I=a.length;z<I;++z)for(var B=a[z],k=0,O=B.length;k<O;++k)y[B[k]].push(z);return y}p.dual=d;function M(a){for(var E=[],y=0,z=a.length;y<z;++y)for(var I=a[y],B=I.length|0,k=1,O=1<<B;k<O;++k){for(var N=[],_=0;_<B;++_)k>>>_&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<<E+1)-1,I=0;I<a.length;++I)for(var B=a[I],k=z;k<1<<B.length;k=r.nextCombination(k)){for(var O=new Array(E+1),N=0,_=0;_<B.length;++_)k&1<<_&&(O[N++]=B[_]);y.push(O)}return f(y)}p.skeleton=T;function C(a){for(var E=[],y=0,z=a.length;y<z;++y)for(var I=a[y],B=0,k=I.length;B<k;++B){for(var O=new Array(I.length-1),N=0,_=0;N<k;++N)N!==B&&(O[_++]=I[N]);E.push(O)}return f(E)}p.boundary=C;function x(a,E){for(var y=new s(E),z=0;z<a.length;++z)for(var I=a[z],B=0;B<I.length;++B)for(var k=B+1;k<I.length;++k)y.link(I[B],I[k]);for(var O=[],N=y.ranks,z=0;z<N.length;++z)N[z]=-1;for(var z=0;z<a.length;++z){var _=y.find(a[z][0]);N[_]<0?(N[_]=O.length,O.push([a[z].slice(0)])):O[N[_]].push(a[z].slice(0))}return O}function S(a){for(var E=w(f(T(a,0))),y=new s(E.length),z=0;z<a.length;++z)for(var I=a[z],B=0;B<I.length;++B)for(var k=h(E,[I[B]]),O=B+1;O<I.length;++O)y.link(k,h(E,[I[O]]));for(var N=[],_=y.ranks,z=0;z<_.length;++z)_[z]=-1;for(var z=0;z<a.length;++z){var U=y.find(h(E,[a[z][0]]));_[U]<0?(_[U]=N.length,N.push([a[z].slice(0)])):N[_[U]].push(a[z].slice(0))}return N}function b(a,E){return E?x(a,E):S(a)}p.connectedComponents=b},9521:function(v){"use restrict";v.exports=p;function p(t){this.roots=new Array(t),this.ranks=new Array(t);for(var r=0;r<t;++r)this.roots[r]=r,this.ranks[r]=0}p.prototype.length=function(){return this.roots.length},p.prototype.makeSet=function(){var t=this.roots.length;return this.roots.push(t),this.ranks.push(0),t},p.prototype.find=function(t){for(var r=this.roots;r[t]!==t;){var s=r[t];r[t]=r[s],t=s}return t},p.prototype.link=function(t,r){var s=this.find(t),n=this.find(r);if(s!==n){var l=this.ranks,c=this.roots,u=l[s],g=l[n];u<g?c[s]=n:g<u?c[n]=s:(c[n]=s,++l[s])}}},8243:function(v,p,t){v.exports=l;var r=t(417),s=t(6656);function n(c,u,g){var f=Math.abs(r(c,u,g)),w=Math.sqrt(Math.pow(u[0]-g[0],2)+Math.pow(u[1]-g[1],2));return f/w}function l(c,u,g){for(var f=u.length,w=c.length,h=new Array(f),o=new Array(f),d=new Array(f),M=new Array(f),T=0;T<f;++T)h[T]=o[T]=-1,d[T]=1/0,M[T]=!1;for(var T=0;T<w;++T){var C=c[T];if(C.length!==2)throw new Error("Input must be a graph");var x=C[1],S=C[0];o[S]!==-1?o[S]=-2:o[S]=x,h[x]!==-1?h[x]=-2:h[x]=S}function b(Q){if(M[Q])return 1/0;var Z=h[Q],j=o[Q];return Z<0||j<0?1/0:n(u[Q],u[Z],u[j])}function a(Q,Z){var j=N[Q],K=N[Z];N[Q]=K,N[Z]=j,_[j]=Z,_[K]=Q}function E(Q){return d[N[Q]]}function y(Q){return Q&1?Q-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(K<Y){var q=E(K);q<j&&(oe=K,j=q)}if(ee<Y){var $=E(ee);$<j&&(oe=ee)}if(oe===Q)return Q;a(Q,oe),Q=oe}}function I(Q){for(var Z=E(Q);Q>0;){var j=y(Q);if(j>=0){var K=E(j);if(Z<K){a(Q,j),Q=j;continue}}return Q}}function B(){if(Y>0){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<f;++T){var U=d[T]=b(T);U<1/0?(_[T]=N.length,N.push(T)):_[T]=-1}for(var Y=N.length,T=Y>>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<f;++T)M[T]||(_[T]=te.length,te.push(u[T].slice()));te.length;function ae(Q,Z){if(Q[Z]<0)return Z;var j=Z,K=Z;do{var ee=Q[K];if(!M[K]||ee<0||ee===K||(K=ee,ee=Q[K],!M[K]||ee<0||ee===K))break;K=ee,j=Q[j]}while(j!==K);for(var oe=Z;oe!==K;oe=Q[oe])Q[oe]=K;return K}var ce=[];return c.forEach(function(Q){var Z=ae(h,Q[0]),j=ae(o,Q[1]);if(Z>=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[0],g=c[1];else 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 w<h?w-h:f>o?f-o:w-o}var d,M;l[0][1]<l[1][1]?(d=l[0],M=l[1]):(d=l[1],M=l[0]);var T=r(g,u,d);return T||(T=r(g,u,M),T)?T:M-g}function n(l,c){var u,g;if(c[0][0]<c[1][0])u=c[0],g=c[1];else if(c[0][0]>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[0],w=l[1];else 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]<C[1][0]?(x=C[0],S=C[1]):(x=C[1],S=C[0]);var b=n(x,S,M);if(b<0)d=d.left;else if(b>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){var E=b[a];if(d[1]===E.y){if(E.closed)return E.index;for(;a<b.length-1&&b[a+1].y===d[1];)if(a=a+1,E=b[a],E.closed)return E.index;if(E.y===d[1]&&!E.start){if(a=a+1,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;x<M;++x){var S=d[x],b=S[0][0]<S[1][0];C[2*x]=new h(S[0][0],S,b,x),C[2*x+1]=new h(S[1][0],S,!b,x)}C.sort(function(O,N){var _=O.x-N.x;return _||(_=O.create-N.create,_)?_:Math.min(O.segment[0][1],O.segment[1][1])-Math.min(N.segment[0][1],N.segment[1][1])});for(var a=s(l),E=[],y=[],z=[],x=0;x<T;){for(var I=C[x].x,B=[];x<T;){var k=C[x];if(k.x!==I)break;x+=1,k.segment[0][0]===k.x&&k.segment[1][0]===k.x?k.create&&(k.segment[0][1]<k.segment[1][1]?(B.push(new w(k.segment[0][1],k.index,!0,!0)),B.push(new w(k.segment[1][1],k.index,!1,!1))):(B.push(new w(k.segment[1][1],k.index,!0,!1)),B.push(new w(k.segment[0][1],k.index,!1,!0)))):k.create?a=a.insert(k.segment,k.index):a=a.remove(k.segment)}E.push(a.root),y.push(I),z.push(B)}return new c(E,y,z)}},4670:function(v,p,t){var r=t(9130),s=t(9662);v.exports=c,v.exports.positive=u,v.exports.negative=g;function n(f,w){var h=s(r(f,w),[w[w.length-1]]);return h[h.length-1]}function l(f,w,h,o){var d=o-w,M=-w/d;M<0?M=0:M>1&&(M=1);for(var T=1-M,C=f.length,x=new Array(C),S=0;S<C;++S)x[S]=M*f[S]+T*h[S];return x}function c(f,w){for(var h=[],o=[],d=n(f[f.length-1],w),M=f[f.length-1],T=f[0],C=0;C<f.length;++C,M=T){T=f[C];var x=n(T,w);if(d<0&&x>0||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;T<f.length;++T,d=M){M=f[T];var C=n(M,w);(o<0&&C>0||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;T<f.length;++T,d=M){M=f[T];var C=n(M,w);(o<0&&C>0||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<o;T++)if(typeof f[T]=="string")M+=f[T];else if(typeof f[T]=="object"){if(x=f[T],x.keys)for(d=w[h],C=0;C<x.keys.length;C++){if(d==null)throw new Error(n('[sprintf] Cannot access property "%s" of undefined value "%s"',x.keys[C],x.keys[C-1]));d=d[x.keys[C]]}else x.param_no?d=w[x.param_no]:d=w[h++];if(s.not_type.test(x.type)&&s.not_primitive.test(x.type)&&d instanceof Function&&(d=d()),s.numeric_arg.test(x.type)&&typeof d!="number"&&isNaN(d))throw new TypeError(n("[sprintf] expecting number but found %T",d));switch(s.number.test(x.type)&&(E=d>=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;T<o;++T)d[T]=[h[T]],M[T]=[T];return{positions:d,cells:M}}var u={};function g(f,d){if(f.dimension<=0)return{positions:[],cells:[]};if(f.dimension===1)return c(f,d);var h=f.order.join()+"-"+f.dtype,o=u[h],d=+d||0;return o||(o=u[h]=l(f.order,f.dtype)),o(f,d)}},6946:function(v,p,t){v.exports=c;var r=t(875),s=window||m.global||{},n=s.__TEXT_CACHE||{};s.__TEXT_CACHE={};function l(u){for(var g=u.cells,f=u.positions,w=new Float32Array(g.length*6),h=0,o=0,d=0;d<g.length;++d)for(var M=g[d],T=0;T<3;++T){var C=f[M[T]];w[h++]=C[0],w[h++]=C[1]+1.4,o=Math.max(C[0],o)}return{data:w,shape:o}}function c(u,g,w){var w=w||{},h=n[u];h||(h=n[u]={" ":{data:new Float32Array(0),shape:.2}});var o=h[g];if(!o)if(g.length<=1||!/\d/.test(g))o=h[g]=l(r(g,{triangles:!0,font:u,textAlign:w.textAlign||"left",textBaseline:"alphabetic",styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}}));else{for(var d=g.split(/(\d|\s)/),M=new Array(d.length),T=0,C=0,x=0;x<d.length;++x)M[x]=c(u,d[x]),T+=M[x].data.length,C+=M[x].shape,x>0&&(C+=.02);for(var S=new Float32Array(T),b=0,a=-.5*C,x=0;x<M.length;++x){for(var E=M[x].data,y=0;y<E.length;y+=2)S[b++]=E[y]+a,S[b++]=E[y+1];a+=M[x].shape+.02}o=h[g]={data:S,shape:C}}return o}},14:function(v,p,t){var r=t(4405);v.exports=c;var s=96;function n(u,g){var f=r(getComputedStyle(u).getPropertyValue(g));return f[0]*c(f[1],u)}function l(u,g){var f=document.createElement("div");f.style["font-size"]="128"+u,g.appendChild(f);var w=n(f,"font-size")/128;return g.removeChild(f),w}function c(u,g){switch(g=g||document.body,u=(u||"px").trim().toLowerCase(),(g===window||g===document)&&(g=document.body),u){case"%":return g.clientHeight/100;case"ch":case"ex":return l(u,g);case"em":return n(g,"font-size");case"rem":return n(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return s;case"cm":return s/2.54;case"mm":return s/25.4;case"pt":return s/72;case"pc":return s/6}return 1}},3440:function(v,p,t){v.exports=M;var r=t(8444),s=t(7437),n=t(4422),l=t(903),c=t(899),u=t(9305);function g(T,C,x){return Math.sqrt(Math.pow(T,2)+Math.pow(C,2)+Math.pow(x,2))}function f(T){return Math.min(1,Math.max(-1,T))}function w(T){var C=Math.abs(T[0]),x=Math.abs(T[1]),S=Math.abs(T[2]),b=[0,0,0];C>Math.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);ie<he&&($+=2*Math.PI),me<he&&($-=2*Math.PI),this.angle.jump(this.angle.lastT(),$,le),this.angle.set(T,oe,ee)}}}};function M(T){T=T||{};var C=T.center||[0,0,0],x=T.up||[0,1,0],S=T.right||w(x),b=T.radius||1,a=T.theta||0,E=T.phi||0;if(C=[].slice.call(C,0,3),x=[].slice.call(x,0,3),c(x,x),S=[].slice.call(S,0,3),c(S,S),"eye"in T){var y=T.eye,z=[y[0]-C[0],y[1]-C[1],y[2]-C[2]];l(S,z,x),g(S[0],S[1],S[2])<1e-6?S=w(x):c(S,S),b=g(z[0],z[1],z[2]);var I=u(x,z)/b,B=u(S,z)/b;E=Math.acos(I),a=Math.acos(B)}return b=Math.log(b),new h(T.zoomMin,T.zoomMax,C,x,S,b,a,E)}},9660:function(v){v.exports=t;var p=+(Math.pow(2,27)+1);function t(r,s,n){var l=r*s,c=p*r,u=c-r,g=c-u,f=r-g,w=p*s,h=w-s,o=w-h,d=s-o,M=l-g*o,T=M-f*o,C=T-g*d,x=f*d-C;return n?(n[0]=x,n[1]=l,n):[x,l]}},87:function(v){v.exports=p;function p(t,r,s){var n=t+r,l=n-t,c=n-l,u=r-l,g=t-c;return s?(s[0]=g+u,s[1]=n,s):[g+u,n]}},5306:function(v,p,t){var r=t(2288),s=t(3094),n=t(2146).lW;t.g.__TYPEDARRAY_POOL||(t.g.__TYPEDARRAY_POOL={UINT8:s([32,0]),UINT16:s([32,0]),UINT32:s([32,0]),BIGUINT64:s([32,0]),INT8:s([32,0]),INT16:s([32,0]),INT32:s([32,0]),BIGINT64:s([32,0]),FLOAT:s([32,0]),DOUBLE:s([32,0]),DATA:s([32,0]),UINT8C:s([32,0]),BUFFER:s([32,0])});var l=typeof Uint8ClampedArray<"u",c=typeof BigUint64Array<"u",u=typeof BigInt64Array<"u",g=t.g.__TYPEDARRAY_POOL;g.UINT8C||(g.UINT8C=s([32,0])),g.BIGUINT64||(g.BIGUINT64=s([32,0])),g.BIGINT64||(g.BIGINT64=s([32,0])),g.BUFFER||(g.BUFFER=s([32,0]));var f=g.DATA,w=g.BUFFER;p.free=function(N){if(n.isBuffer(N))w[r.log2(N.length)].push(N);else{if(Object.prototype.toString.call(N)!=="[object ArrayBuffer]"&&(N=N.buffer),!N)return;var _=N.length||N.byteLength,U=r.log2(_)|0;f[U].push(N)}};function h(O){if(O){var N=O.length||O.byteLength,_=r.log2(N);f[_].push(O)}}function o(O){h(O.buffer)}p.freeUint8=p.freeUint16=p.freeUint32=p.freeBigUint64=p.freeInt8=p.freeInt16=p.freeInt32=p.freeBigInt64=p.freeFloat32=p.freeFloat=p.freeFloat64=p.freeDouble=p.freeUint8Clamped=p.freeDataView=o,p.freeArrayBuffer=h,p.freeBuffer=function(N){w[r.log2(N.length)].push(N)},p.malloc=function(N,_){if(_===void 0||_==="arraybuffer")return d(N);switch(_){case"uint8":return M(N);case"uint16":return T(N);case"uint32":return C(N);case"int8":return x(N);case"int16":return S(N);case"int32":return b(N);case"float":case"float32":return a(N);case"double":case"float64":return E(N);case"uint8_clamped":return y(N);case"bigint64":return I(N);case"biguint64":return z(N);case"buffer":return k(N);case"data":case"dataview":return B(N);default:return null}return null};function d(N){var N=r.nextPow2(N),_=r.log2(N),U=f[_];return U.length>0?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<r;++s)this.roots[s]=s,this.ranks[s]=0}var t=p.prototype;Object.defineProperty(t,"length",{get:function(){return this.roots.length}}),t.makeSet=function(){var r=this.roots.length;return this.roots.push(r),this.ranks.push(0),r},t.find=function(r){for(var s=r,n=this.roots;n[r]!==r;)r=n[r];for(;n[s]!==r;){var l=n[s];n[s]=r,s=l}return r},t.link=function(r,s){var n=this.find(r),l=this.find(s);if(n!==l){var c=this.ranks,u=this.roots,g=c[n],f=c[l];g<f?u[n]=l:f<g?u[l]=n:(u[l]=n,++c[n])}}},1215:function(v){function p(s,n){for(var l=1,c=s.length,u=s[0],g=s[0],f=1;f<c;++f)if(g=u,u=s[f],n(u,g)){if(f===l){l++;continue}s[l++]=u}return s.length=l,s}function t(s){for(var n=1,l=s.length,c=s[0],u=s[0],g=1;g<l;++g,u=c)if(u=c,c=s[g],c!==u){if(g===n){n++;continue}s[n++]=c}return s.length=n,s}function r(s,n,l){return s.length===0?s:n?(l||s.sort(n),p(s,n)):(l||s.sort(),t(s))}v.exports=r},875:function(v,p,t){v.exports=l;var r=t(712),s=null,n=null;typeof document<"u"&&(s=document.createElement("canvas"),s.width=8192,s.height=1024,n=s.getContext("2d"));function l(c,u){return(typeof u!="object"||u===null)&&(u={}),r(c,u.canvas||s,u.context||n,u)}},712:function(v,p,t){v.exports=I,v.exports.processPixels=z;var r=t(4162),s=t(5050),n=t(8243),l=t(197),c=t(7761),u=t(8040),g="b",f="b|",w="i",h="i|",o="sup",d="+",M="+1",T="sub",C="-",x="-1";function S(B,k,O,N){for(var _="<"+B+">",U="</"+B+">",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+J;++Q)if(Q<ae+Y||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<J;++te)for(var ae=B[te],ce=0;ce<2;++ce)U[ce]=Math.min(U[ce],ae[ce])|0,Y[ce]=Math.max(Y[ce],ae[ce])|0;var Q=0;switch(N){case"center":Q=-.5*(U[0]+Y[0]);break;case"right":case"end":Q=-Y[0];break;case"left":case"start":Q=-U[0];break;default:throw new Error("vectorize-text: Unrecognized textAlign: '"+N+"'")}var Z=0;switch(_){case"hanging":case"top":Z=-U[1];break;case"middle":Z=-.5*(U[1]+Y[1]);break;case"alphabetic":case"ideographic":Z=-3*O;break;case"bottom":Z=-Y[1];break;default:throw new Error("vectorize-text: Unrecoginized textBaseline: '"+_+"'")}var j=1/O;return"lineHeight"in k?j*=+k.lineHeight:"width"in k?j=k.width/(Y[0]-U[0]):"height"in k&&(j=k.height/(Y[1]-U[1])),B.map(function(K){return[j*(K[0]+Q),j*(K[1]+Z)]})}function a(B,k,O,N,_,U){O=O.replace(/\n/g,""),U.breaklines===!0?O=O.replace(/\<br\>/g,`
`):O=O.replace(/\<br\>/g," ");var Y="",J=[];for($=0;$<O.length;++$)J[$]=Y;U.bolds===!0&&(J=S(g,f,O,J)),U.italics===!0&&(J=S(w,h,O,J)),U.superscripts===!0&&(J=S(o,M,O,J)),U.subscripts===!0&&(J=S(T,x,O,J));var te=[],ae="";for($=0;$<O.length;++$)J[$]!==null&&(ae+=O[$],te.push(J[$]));var ce=ae.split(`
`),Q=ce.length,Z=Math.round(_*N),j=N,K=N*2,ee=0,oe=Q*Z+K;B.height<oe&&(B.height=oe),k.fillStyle="#000",k.fillRect(0,0,B.width,B.height),k.fillStyle="#fff";var q,$,le,ie,he,me=0,Me="";function Te(){if(Me!==""){var Ge=k.measureText(Me).width;k.fillText(Me,j+le,K+ie),le+=Ge}}function Oe(){return""+Math.round(he)+"px "}function Ne(Ge,nt){var qe=""+k.font;if(U.subscripts===!0){var $e=Ge.indexOf(C),et=nt.indexOf(C),ct=$e>-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;q<Q;++q){var Ee=ce[q]+`
`;for(le=0,ie=q*Z,he=N,Me="",$=0;$<Ee.length;++$){var xe=$+me<te.length?te[$+me]:te[te.length-1];Y===xe?Me+=Ee[$]:(Te(),Me=Ee[$],xe!==void 0&&(Ne(Y,xe),Y=xe))}Te(),me+=Ee.length;var Se=Math.round(le+2*j)|0;ee<Se&&(ee=Se)}var Ue=ee,He=K+Z*Q,Fe=s(k.getImageData(0,0,Ue,He).data,[He,Ue,4]);return Fe.pick(-1,-1,0).transpose(1,0)}function E(B,k){var O=r(B,128);return k?n(O.cells,O.positions,.25):{edges:O.cells,positions:O.positions}}function y(B,k,O,N){var _=E(B,N),U=b(_.positions,k,O),Y=_.edges,J=k.orientation==="ccw";if(l(U,Y),k.polygons||k.polygon||k.polyline){for(var te=u(Y,U),ae=new Array(te.length),ce=0;ce<te.length;++ce){for(var Q=te[ce],Z=new Array(Q.length),j=0;j<Q.length;++j){for(var K=Q[j],ee=new Array(K.length),oe=0;oe<K.length;++oe)ee[oe]=U[K[oe]].slice();J&&ee.reverse(),Z[j]=ee}ae[ce]=Z}return ae}else return k.triangles||k.triangulate||k.triangle?{cells:c(U,Y,{delaunay:!1,exterior:!1,interior:!0}),positions:U}:{edges:Y,positions:U}}function z(B,k,O){try{return y(B,k,O,!0)}catch{}try{return y(B,k,O,!1)}catch{}return k.polygons||k.polyline||k.polygon?[]:k.triangles||k.triangulate||k.triangle?{cells:[],positions:[]}:{edges:[],positions:[]}}function I(B,k,O,N){var _=64,U=1.25,Y={breaklines:!1,bolds:!1,italics:!1,subscripts:!1,superscripts:!1};N&&(N.size&&N.size>0&&(_=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<o;++C){{var S=u[f]-h,b=u[f+T]-h;S>=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 <https://feross.org>
* @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<De.length;Ie++){var ze=De[Ie];ze.enumerable=ze.enumerable||!1,ze.configurable=!0,"value"in ze&&(ze.writable=!0),Object.defineProperty(Je,L(ze.key),ze)}}function i(Je,De,Ie){return De&&P(Je.prototype,De),Ie&&P(Je,Ie),Object.defineProperty(Je,"prototype",{writable:!1}),Je}function L(Je){var De=A(Je,"string");return c(De)==="symbol"?De:String(De)}function A(Je,De){if(c(Je)!=="object"||Je===null)return Je;var Ie=Je[Symbol.toPrimitive];if(Ie!==void 0){var ze=Ie.call(Je,De||"default");if(c(ze)!=="object")return ze;throw new TypeError("@@toPrimitive must return a primitive value.")}return(De==="string"?String:Number)(Je)}function v(Je,De){if(typeof De!="function"&&De!==null)throw new TypeError("Super expression must either be null or a function");Je.prototype=Object.create(De&&De.prototype,{constructor:{value:Je,writable:!0,configurable:!0}}),Object.defineProperty(Je,"prototype",{writable:!1}),De&&p(Je,De)}function p(Je,De){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(ze,Pe){return ze.__proto__=Pe,ze},p(Je,De)}function t(Je){var De=n();return function(){var ze=l(Je),Pe;if(De){var be=l(this).constructor;Pe=Reflect.construct(ze,arguments,be)}else Pe=ze.apply(this,arguments);return r(this,Pe)}}function r(Je,De){if(De&&(c(De)==="object"||typeof De=="function"))return De;if(De!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return s(Je)}function s(Je){if(Je===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Je}function n(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}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<De;ze+=1)Ie[ze]=Je[ze]&255;return Ie}function a(Je){if(dt(Je,Uint8Array)){var De=new Uint8Array(Je);return E(De.buffer,De.byteOffset,De.byteLength)}return b(Je)}function E(Je,De,Ie){if(De<0||Je.byteLength<De)throw new RangeError('"offset" is outside of buffer bounds');if(Je.byteLength<De+(Ie||0))throw new RangeError('"length" is outside of buffer bounds');var ze;return De===void 0&&Ie===void 0?ze=new Uint8Array(Je):Ie===void 0?ze=new Uint8Array(Je,De):ze=new Uint8Array(Je,De,Ie),Object.setPrototypeOf(ze,d.prototype),ze}function y(Je){if(d.isBuffer(Je)){var De=z(Je.length)|0,Ie=o(De);return Ie.length===0||Je.copy(Ie,0,0,De),Ie}if(Je.length!==void 0)return typeof Je.length!="number"||pt(Je.length)?o(0):b(Je);if(Je.type==="Buffer"&&Array.isArray(Je.data))return b(Je.data)}function z(Je){if(Je>=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);be<se;++be)if(De[be]!==Ie[be]){ze=De[be],Pe=Ie[be];break}return ze<Pe?-1:Pe<ze?1:0},d.isEncoding=function(De){switch(String(De).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},d.concat=function(De,Ie){if(!Array.isArray(De))throw new TypeError('"list" argument must be an Array of Buffers');if(De.length===0)return d.alloc(0);var ze;if(Ie===void 0)for(Ie=0,ze=0;ze<De.length;++ze)Ie+=De[ze].length;var Pe=d.allocUnsafe(Ie),be=0;for(ze=0;ze<De.length;++ze){var se=De[ze];if(dt(se,Uint8Array))be+se.length>Pe.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;Ie<De;Ie+=2)O(this,Ie,Ie+1);return this},d.prototype.swap32=function(){var De=this.length;if(De%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var Ie=0;Ie<De;Ie+=4)O(this,Ie,Ie+3),O(this,Ie+1,Ie+2);return this},d.prototype.swap64=function(){var De=this.length;if(De%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var Ie=0;Ie<De;Ie+=8)O(this,Ie,Ie+7),O(this,Ie+1,Ie+6),O(this,Ie+2,Ie+5),O(this,Ie+3,Ie+4);return this},d.prototype.toString=function(){var De=this.length;return De===0?"":arguments.length===0?Q(this,0,De):k.apply(this,arguments)},d.prototype.toLocaleString=d.prototype.toString,d.prototype.equals=function(De){if(!d.isBuffer(De))throw new TypeError("Argument must be a Buffer");return this===De?!0:d.compare(this,De)===0},d.prototype.inspect=function(){var De="",Ie=V.INSPECT_MAX_BYTES;return De=this.toString("hex",0,Ie).replace(/(.{2})/g,"$1 ").trim(),this.length>Ie&&(De+=" ... "),"<Buffer "+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;at<Le;++at)if(Be[at]!==ot[at]){se=Be[at],ye=ot[at];break}return se<ye?-1:ye<se?1:0};function N(Je,De,Ie,ze,Pe){if(Je.length===0)return-1;if(typeof Ie=="string"?(ze=Ie,Ie=0):Ie>2147483647?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;Be<se;Be++)if(Le(Je,Be)===Le(De,ot===-1?0:Be-ot)){if(ot===-1&&(ot=Be),Be-ot+1===ye)return ot*be}else ot!==-1&&(Be-=Be-ot),ot=-1}else for(Ie+ye>se&&(Ie=se-ye),Be=Ie;Be>=0;Be--){for(var at=!0,wt=0;wt<ye;wt++)if(Le(Je,Be+wt)!==Le(De,wt)){at=!1;break}if(at)return Be}return-1}d.prototype.includes=function(De,Ie,ze){return this.indexOf(De,Ie,ze)!==-1},d.prototype.indexOf=function(De,Ie,ze){return N(this,De,Ie,ze,!0)},d.prototype.lastIndexOf=function(De,Ie,ze){return N(this,De,Ie,ze,!1)};function U(Je,De,Ie,ze){Ie=Number(Ie)||0;var Pe=Je.length-Ie;ze?(ze=Number(ze),ze>Pe&&(ze=Pe)):ze=Pe;var be=De.length;ze>be/2&&(ze=be/2);var se;for(se=0;se<ze;++se){var ye=parseInt(De.substr(se*2,2),16);if(pt(ye))return se;Je[Ie+se]=ye}return se}function Y(Je,De,Ie,ze){return ct(nt(De,Je.length-Ie),Je,Ie,ze)}function J(Je,De,Ie,ze){return ct(qe(De),Je,Ie,ze)}function te(Je,De,Ie,ze){return ct(et(De),Je,Ie,ze)}function ae(Je,De,Ie,ze){return ct($e(De,Je.length-Ie),Je,Ie,ze)}d.prototype.write=function(De,Ie,ze,Pe){if(Ie===void 0)Pe="utf8",ze=this.length,Ie=0;else if(ze===void 0&&typeof Ie=="string")Pe=Ie,ze=this.length,Ie=0;else if(isFinite(Ie))Ie=Ie>>>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;Pe<Ie;){var be=Je[Pe],se=null,ye=be>239?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;ze<De;)Ie+=String.fromCharCode.apply(String,Je.slice(ze,ze+=Z));return Ie}function K(Je,De,Ie){var ze="";Ie=Math.min(Je.length,Ie);for(var Pe=De;Pe<Ie;++Pe)ze+=String.fromCharCode(Je[Pe]&127);return ze}function ee(Je,De,Ie){var ze="";Ie=Math.min(Je.length,Ie);for(var Pe=De;Pe<Ie;++Pe)ze+=String.fromCharCode(Je[Pe]);return ze}function oe(Je,De,Ie){var ze=Je.length;(!De||De<0)&&(De=0),(!Ie||Ie<0||Ie>ze)&&(Ie=ze);for(var Pe="",be=De;be<Ie;++be)Pe+=At[Je[be]];return Pe}function q(Je,De,Ie){for(var ze=Je.slice(De,Ie),Pe="",be=0;be<ze.length-1;be+=2)Pe+=String.fromCharCode(ze[be]+ze[be+1]*256);return Pe}d.prototype.slice=function(De,Ie){var ze=this.length;De=~~De,Ie=Ie===void 0?ze:~~Ie,De<0?(De+=ze,De<0&&(De=0)):De>ze&&(De=ze),Ie<0?(Ie+=ze,Ie<0&&(Ie=0)):Ie>ze&&(Ie=ze),Ie<De&&(Ie=De);var Pe=this.subarray(De,Ie);return Object.setPrototypeOf(Pe,d.prototype),Pe};function $(Je,De,Ie){if(Je%1!==0||Je<0)throw new RangeError("offset is not uint");if(Je+De>Ie)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<Ie&&(be*=256);)Pe+=this[De+se]*be;return Pe},d.prototype.readUintBE=d.prototype.readUIntBE=function(De,Ie,ze){De=De>>>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)<<BigInt(32))}),d.prototype.readBigUInt64BE=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*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)<<BigInt(32))+BigInt(be)}),d.prototype.readIntLE=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<Ie&&(be*=256);)Pe+=this[De+se]*be;return be*=128,Pe>=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)<<BigInt(32))+BigInt(Ie+this[++De]*Math.pow(2,8)+this[++De]*Math.pow(2,16)+this[++De]*Math.pow(2,24))}),d.prototype.readBigInt64BE=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<<24)+this[++De]*Math.pow(2,16)+this[++De]*Math.pow(2,8)+this[++De];return(BigInt(Pe)<<BigInt(32))+BigInt(this[++De]*Math.pow(2,24)+this[++De]*Math.pow(2,16)+this[++De]*Math.pow(2,8)+ze)}),d.prototype.readFloatLE=function(De,Ie){return De=De>>>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||De<be)throw new RangeError('"value" argument is out of bounds');if(Ie+ze>Je.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<ze&&(se*=256);)this[Ie+ye]=De/se&255;return Ie+ze},d.prototype.writeUintBE=d.prototype.writeUIntBE=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=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<ze&&(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.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<ze&&(Pe=ze),Pe===ze||De.length===0||this.length===0)return 0;if(Ie<0)throw new RangeError("targetStart out of bounds");if(ze<0||ze>=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<Pe-ze&&(Pe=De.length-Ie+ze);var be=Pe-ze;return this===De&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(Ie,ze,Pe):Uint8Array.prototype.set.call(De,this.subarray(ze,Pe),Ie),be},d.prototype.fill=function(De,Ie,ze,Pe){if(typeof De=="string"){if(typeof Ie=="string"?(Pe=Ie,Ie=0,ze=this.length):typeof ze=="string"&&(Pe=ze,ze=this.length),Pe!==void 0&&typeof Pe!="string")throw new TypeError("encoding must be a string");if(typeof Pe=="string"&&!d.isEncoding(Pe))throw new TypeError("Unknown encoding: "+Pe);if(De.length===1){var be=De.charCodeAt(0);(Pe==="utf8"&&be<128||Pe==="latin1")&&(De=be)}}else typeof De=="number"?De=De&255:typeof De=="boolean"&&(De=Number(De));if(Ie<0||this.length<Ie||this.length<ze)throw new RangeError("Out of range index");if(ze<=Ie)return this;Ie=Ie>>>0,ze=ze===void 0?this.length:ze>>>0,De||(De=0);var se;if(typeof De=="number")for(se=Ie;se<ze;++se)this[se]=De;else{var ye=d.isBuffer(De)?De:d.from(De,Pe),Le=ye.length;if(Le===0)throw new TypeError('The value "'+De+'" is invalid for argument "value"');for(se=0;se<ze-Ie;++se)this[se+Ie]=ye[se%Le]}return this};var Oe={};function Ne(Je,De,Ie){Oe[Je]=function(ze){v(be,ze);var Pe=t(be);function be(){var se;return m(this,be),se=Pe.call(this),Object.defineProperty(s(se),"message",{value:De.apply(s(se),arguments),writable:!0,configurable:!0}),se.name="".concat(se.name," [").concat(Je,"]"),se.stack,delete se.name,se}return i(be,[{key:"code",get:function(){return Je},set:function(ye){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:ye,writable:!0})}},{key:"toString",value:function(){return"".concat(this.name," [").concat(Je,"]: ").concat(this.message)}}]),be}(Ie)}Ne("ERR_BUFFER_OUT_OF_BOUNDS",function(Je){return Je?"".concat(Je," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"},RangeError),Ne("ERR_INVALID_ARG_TYPE",function(Je,De){return'The "'.concat(Je,'" argument must be of type number. Received type ').concat(c(De))},TypeError),Ne("ERR_OUT_OF_RANGE",function(Je,De,Ie){var ze='The value of "'.concat(Je,'" is out of range.'),Pe=Ie;return Number.isInteger(Ie)&&Math.abs(Ie)>Math.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||Je<De){var se=typeof De=="bigint"?"n":"",ye;throw be>3?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;se<ze;++se){if(Ie=Je.charCodeAt(se),Ie>55295&&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<Je.length;++Ie)De.push(Je.charCodeAt(Ie)&255);return De}function $e(Je,De){for(var Ie,ze,Pe,be=[],se=0;se<Je.length&&!((De-=2)<0);++se)Ie=Je.charCodeAt(se),ze=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<ze&&!(Pe+Ie>=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<ze;Pe++)$(Ie,Ee,Ue),le(Ie,Ee,Ue),ee(Ie,Oe,Ee,Ue),$(Ie,Ee,Ue),le(Ie,Ee,Ue);return Me(Ie,Oe,Ee),_(Ie,qe,Ee,Ue),Ie}ct.nodeId=function(Ie){return arguments.length?(Ue=typeof Ie=="function"?Ie:n(Ie),ct):Ue},ct.nodeAlign=function(Ie){return arguments.length?(He=typeof Ie=="function"?Ie:n(Ie),ct):He},ct.nodeWidth=function(Ie){return arguments.length?(xe=+Ie,ct):xe},ct.nodePadding=function(Ie){return arguments.length?(Se=+Ie,ct):Se},ct.nodes=function(Ie){return arguments.length?(Fe=typeof Ie=="function"?Ie:n(Ie),ct):Fe},ct.links=function(Ie){return arguments.length?(Ge=typeof Ie=="function"?Ie:n(Ie),ct):Ge},ct.size=function(Ie){return arguments.length?(Te=Oe=0,Ne=+Ie[0],Ee=+Ie[1],ct):[Ne-Te,Ee-Oe]},ct.extent=function(Ie){return arguments.length?(Te=+Ie[0][0],Ne=+Ie[1][0],Oe=+Ie[0][1],Ee=+Ie[1][1],ct):[[Te,Oe],[Ne,Ee]]},ct.iterations=function(Ie){return arguments.length?(nt=+Ie,ct):nt},ct.circularLinkGap=function(Ie){return arguments.length?(qe=+Ie,ct):qe},ct.nodePaddingRatio=function(Ie){return arguments.length?($e=+Ie,ct):$e},ct.sortNodes=function(Ie){return arguments.length?(et=Ie,ct):et},ct.update=function(Ie){return z(Ie,Ue),De(Ie),Ie.links.forEach(function(ze){ze.circular&&(ze.circularLinkType=ze.y0+ze.y1<Ee?"top":"bottom",ze.source.circularLinkType=ze.circularLinkType,ze.target.circularLinkType=ze.circularLinkType)}),$(Ie,Ee,Ue,!1),le(Ie,Ee,Ue),_(Ie,qe,Ee,Ue),Ie};function dt(Ie){Ie.nodes.forEach(function(Pe,be){Pe.index=be,Pe.sourceLinks=[],Pe.targetLinks=[]});var ze=(0,P.UI)(Ie.nodes,Ue);return Ie.links.forEach(function(Pe,be){Pe.index=be;var se=Pe.source,ye=Pe.target;(typeof se>"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=Kt<wt?Kt:wt}),Se=wt}var It=(0,m.VV)(be,function(Lt){return(Ee-Oe-(Lt.length-1)*Se)/(0,m.Sm)(Lt,f)});It=It*a,Ie.links.forEach(function(Lt){Lt.width=Lt.value*It});var Bt=At(Ie),Gt=Mt(Ie,Bt);It=It*Gt,Ie.links.forEach(function(Lt){Lt.width=Lt.value*It}),be.forEach(function(Lt){var Kt=Lt.length;Lt.forEach(function(ir,_r){ir.depth==be.length-1&&Kt==1||ir.depth==0&&Kt==1?(ir.y0=Ee/2-ir.value*It,ir.y1=ir.y0+ir.value*It):ir.partOfCycle?k(ir,at)==0?(ir.y0=Ee/2+_r,ir.y1=ir.y0+ir.value*It):ir.circularLinkType=="top"?(ir.y0=Oe+_r,ir.y1=ir.y0+ir.value*It):(ir.y0=Ee-ir.value*It-_r,ir.y1=ir.y0+ir.value*It):Bt.top==0||Bt.bottom==0?(ir.y0=(Ee-Oe)/Kt*_r,ir.y1=ir.y0+ir.value*It):(ir.y0=(Ee-Oe)/2-Kt/2+_r,ir.y1=ir.y0+ir.value*It)})})}function Be(at,wt){var It=be.length;be.forEach(function(Bt){var Gt=Bt.length,Lt=Bt[0].depth;Bt.forEach(function(Kt){var ir;if((Kt.sourceLinks.length||Kt.targetLinks.length)&&!(Kt.partOfCycle&&k(Kt,wt)>0))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;Lt<Gt;++Lt)wt=at[Lt],It=Bt-wt.y0,It>0&&(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;Se<Te.links.length;Se++){var Ue=Te.links[Se],He=Ue.source.index,Fe=Ue.target.index;xe[He]||(xe[He]=[]),xe[Fe]||(xe[Fe]=[]),xe[He].indexOf(Fe)===-1&&xe[He].push(Fe)}var Ge=A()(xe);Ge.sort(function(et,ct){return et.length-ct.length});var nt={};for(Se=0;Se<Ge.length;Se++){var qe=Ge[Se],$e=qe.slice(-2);nt[$e[0]]||(nt[$e[0]]={}),nt[$e[0]][$e[1]]=!0}Te.links.forEach(function(et){var ct=et.target.index,dt=et.source.index;ct===dt||nt[dt]&&nt[dt][ct]?(et.circular=!0,et.circularLinkID=Ee,Ee=Ee+1):et.circular=!1})}else Te.links.forEach(function(et){et.source[Ne]<et.target[Ne]?et.circular=!1:(et.circular=!0,et.circularLinkID=Ee,Ee=Ee+1)})}function z(Te,Oe){var Ne=0,Ee=0;Te.links.forEach(function(xe){xe.circular&&(xe.source.circularLinkType||xe.target.circularLinkType?xe.circularLinkType=xe.source.circularLinkType?xe.source.circularLinkType:xe.target.circularLinkType:xe.circularLinkType=Ne<Ee?"top":"bottom",xe.circularLinkType=="top"?Ne=Ne+1:Ee=Ee+1,Te.nodes.forEach(function(Se){(x(Se,Oe)==x(xe.source,Oe)||x(Se,Oe)==x(xe.target,Oe))&&(Se.circularLinkType=xe.circularLinkType)}))}),Te.links.forEach(function(xe){xe.circular&&(xe.source.circularLinkType==xe.target.circularLinkType&&(xe.circularLinkType=xe.source.circularLinkType),me(xe,Oe)&&(xe.circularLinkType=xe.source.circularLinkType))})}function I(Te){var Oe=Math.abs(Te.y1-Te.y0),Ne=Math.abs(Te.target.x0-Te.source.x1);return Math.atan(Ne/Oe)}function B(Te,Oe){return Te.source.column<Oe.target.column?!1:!(Te.target.column>Oe.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;Ue<xe;Ue++)if(B(Te[xe],Te[Ue])){var He=Te[Ue].circularPathData.verticalBuffer+Te[Ue].width/2+Oe;Se=He>Se?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&&pt<Ge.y1?(Mt=Ge.y1-pt+10,Mt=Ge.circularLinkType=="bottom"?Mt:-Mt,Ge=q(Ge,Mt,Oe,Ne),Te.nodes.forEach(function(Vt){x(Vt,Ee)==x(Ge,Ee)||Vt.column!=Ge.column||oe(Ge,Vt)&&q(Vt,Mt,Oe,Ne)})):At>Ge.y0&&At<Ge.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.y0<Ge.y1&&Vt.y1>Ge.y1&&q(Vt,Mt,Oe,Ne)})):pt<Ge.y0&&At>Ge.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.y0<Ge.y1&&Vt.y1>Ge.y1&&q(Vt,Mt,Oe,Ne)}))}})}})}function oe(Te,Oe){return Te.y0>Oe.y0&&Te.y0<Oe.y1||Te.y1>Oe.y0&&Te.y1<Oe.y1?!0:Te.y0<Oe.y0&&Te.y1>Oe.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;nt<Ue;nt++)qe=qe+Se[nt].width;Fe.y0=xe.y1-qe-Fe.width/2}})})}function le(Te,Oe,Ne){Te.nodes.forEach(function(Ee){var xe=Te.links.filter(function(He){return x(He.target,Ne)==x(Ee,Ne)}),Se=xe.length;Se>1&&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.column<He.source.column){var Ge=j(Fe,He);return He.y0-Ge}if(He.source.column<Fe.source.column){var nt=j(He,Fe);return nt-Fe.y0}}else return He.y0-Fe.y0}if(He.circular&&!Fe.circular)return He.circularLinkType=="top"?-1:1;if(Fe.circular&&!He.circular)return Fe.circularLinkType=="top"?1:-1;if(He.circular&&Fe.circular)return He.circularLinkType===Fe.circularLinkType&&He.circularLinkType=="top"?He.source.column===Fe.source.column?He.source.y1-Fe.source.y1:He.source.column-Fe.source.column:He.circularLinkType===Fe.circularLinkType&&He.circularLinkType=="bottom"?He.source.column===Fe.source.column?He.source.y1-Fe.source.y1:Fe.source.column-He.source.column:He.circularLinkType=="top"?-1:1});var Ue=Ee.y0;xe.forEach(function(He){He.y1=Ue+He.width/2,Ue=Ue+He.width}),xe.forEach(function(He,Fe){if(He.circularLinkType=="bottom"){var Ge=Fe+1,nt=0;for(Ge;Ge<Se;Ge++)nt=nt+xe[Ge].width;He.y1=Ee.y1-nt-He.width/2}})})}function ie(Te,Oe){return he(Te)==he(Oe)}function he(Te){return Te.y0-Te.y1>0?"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;Te<Me;++Te)ie=le[Te],he=me-ie.y0,he>0&&(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 fe<Ce?-1:fe>Ce?1:fe>=Ce?0:NaN}i.descending=function(fe,Ce){return Ce<fe?-1:Ce>fe?1:Ce>=fe?0:NaN},i.min=function(fe,Ce){var Ve=-1,Qe=fe.length,tt,it;if(arguments.length===1){for(;++Ve<Qe;)if((it=fe[Ve])!=null&&it>=it){tt=it;break}for(;++Ve<Qe;)(it=fe[Ve])!=null&&tt>it&&(tt=it)}else{for(;++Ve<Qe;)if((it=Ce.call(fe,fe[Ve],Ve))!=null&&it>=it){tt=it;break}for(;++Ve<Qe;)(it=Ce.call(fe,fe[Ve],Ve))!=null&&tt>it&&(tt=it)}return tt},i.max=function(fe,Ce){var Ve=-1,Qe=fe.length,tt,it;if(arguments.length===1){for(;++Ve<Qe;)if((it=fe[Ve])!=null&&it>=it){tt=it;break}for(;++Ve<Qe;)(it=fe[Ve])!=null&&it>tt&&(tt=it)}else{for(;++Ve<Qe;)if((it=Ce.call(fe,fe[Ve],Ve))!=null&&it>=it){tt=it;break}for(;++Ve<Qe;)(it=Ce.call(fe,fe[Ve],Ve))!=null&&it>tt&&(tt=it)}return tt},i.extent=function(fe,Ce){var Ve=-1,Qe=fe.length,tt,it,Rt;if(arguments.length===1){for(;++Ve<Qe;)if((it=fe[Ve])!=null&&it>=it){tt=Rt=it;break}for(;++Ve<Qe;)(it=fe[Ve])!=null&&(tt>it&&(tt=it),Rt<it&&(Rt=it))}else{for(;++Ve<Qe;)if((it=Ce.call(fe,fe[Ve],Ve))!=null&&it>=it){tt=Rt=it;break}for(;++Ve<Qe;)(it=Ce.call(fe,fe[Ve],Ve))!=null&&(tt>it&&(tt=it),Rt<it&&(Rt=it))}return[tt,Rt]};function g(fe){return fe===null?NaN:+fe}function f(fe){return!isNaN(fe)}i.sum=function(fe,Ce){var Ve=0,Qe=fe.length,tt,it=-1;if(arguments.length===1)for(;++it<Qe;)f(tt=+fe[it])&&(Ve+=tt);else for(;++it<Qe;)f(tt=+Ce.call(fe,fe[it],it))&&(Ve+=tt);return Ve},i.mean=function(fe,Ce){var Ve=0,Qe=fe.length,tt,it=-1,Rt=Qe;if(arguments.length===1)for(;++it<Qe;)f(tt=g(fe[it]))?Ve+=tt:--Rt;else for(;++it<Qe;)f(tt=g(Ce.call(fe,fe[it],it)))?Ve+=tt:--Rt;if(Rt)return Ve/Rt},i.quantile=function(fe,Ce){var Ve=(fe.length-1)*Ce+1,Qe=Math.floor(Ve),tt=+fe[Qe-1],it=Ve-Qe;return it?tt+it*(fe[Qe]-tt):tt},i.median=function(fe,Ce){var Ve=[],Qe=fe.length,tt,it=-1;if(arguments.length===1)for(;++it<Qe;)f(tt=g(fe[it]))&&Ve.push(tt);else for(;++it<Qe;)f(tt=g(Ce.call(fe,fe[it],it)))&&Ve.push(tt);if(Ve.length)return i.quantile(Ve.sort(u),.5)},i.variance=function(fe,Ce){var Ve=fe.length,Qe=0,tt,it,Rt=0,ht=-1,Ut=0;if(arguments.length===1)for(;++ht<Ve;)f(tt=g(fe[ht]))&&(it=tt-Qe,Qe+=it/++Ut,Rt+=it*(tt-Qe));else for(;++ht<Ve;)f(tt=g(Ce.call(fe,fe[ht],ht)))&&(it=tt-Qe,Qe+=it/++Ut,Rt+=it*(tt-Qe));if(Ut>1)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<tt;){var it=Qe+tt>>>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<tt;){var it=Qe+tt>>>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<Ve;)tt[Ce]=[Qe,Qe=fe[++Ce]];return tt},i.transpose=function(fe){if(!(it=fe.length))return[];for(var Ce=-1,Ve=i.min(fe,o),Qe=new Array(Ve);++Ce<Ve;)for(var tt=-1,it,Rt=Qe[Ce]=new Array(it);++tt<it;)Rt[tt]=fe[tt][Ce];return Qe};function o(fe){return fe.length}i.zip=function(){return i.transpose(arguments)},i.keys=function(fe){var Ce=[];for(var Ve in fe)Ce.push(Ve);return Ce},i.values=function(fe){var Ce=[];for(var Ve in fe)Ce.push(fe[Ve]);return Ce},i.entries=function(fe){var Ce=[];for(var Ve in fe)Ce.push({key:Ve,value:fe[Ve]});return Ce},i.merge=function(fe){for(var Ce=fe.length,Ve,Qe=-1,tt=0,it,Rt;++Qe<Ce;)tt+=fe[Qe].length;for(it=new Array(tt);--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;)Qe.push(Rt/tt);return Qe};function M(fe){for(var Ce=1;fe*Ce%1;)Ce*=10;return Ce}function T(fe,Ce){for(var Ve in Ce)Object.defineProperty(fe.prototype,Ve,{value:Ce[Ve],enumerable:!1})}i.map=function(fe,Ce){var Ve=new C;if(fe instanceof C)fe.forEach(function(ht,Ut){Ve.set(ht,Ut)});else if(Array.isArray(fe)){var Qe=-1,tt=fe.length,it;if(arguments.length===1)for(;++Qe<tt;)Ve.set(Qe,fe[Qe]);else for(;++Qe<tt;)Ve.set(Ce.call(fe,it=fe[Qe],Qe),it)}else for(var Rt in fe)Ve.set(Rt,fe[Rt]);return Ve};function C(){this._=Object.create(null)}var x="__proto__",S="\0";T(C,{has:E,get:function(fe){return this._[b(fe)]},set:function(fe,Ce){return this._[b(fe)]=Ce},remove:y,keys:z,values:function(){var fe=[];for(var Ce in this._)fe.push(this._[Ce]);return fe},entries:function(){var fe=[];for(var Ce in this._)fe.push({key:a(Ce),value:this._[Ce]});return fe},size:I,empty:B,forEach:function(fe){for(var Ce in this._)fe.call(this,a(Ce),this._[Ce])}});function b(fe){return(fe+="")===x||fe[0]===S?S+fe:fe}function a(fe){return(fe+="")[0]===S?fe.slice(1):fe}function E(fe){return b(fe)in this._}function y(fe){return(fe=b(fe))in this._&&delete this._[fe]}function z(){var fe=[];for(var Ce in this._)fe.push(a(Ce));return fe}function I(){var fe=0;for(var Ce in this._)++fe;return fe}function B(){for(var fe in this._)return!1;return!0}i.nest=function(){var fe={},Ce=[],Ve=[],Qe,tt;function it(ht,Ut,er){if(er>=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<Lr;)(Zr=Ur.get(Kr=Sr(en=Ut[tr])))?Zr.push(en):Ur.set(Kr,[en]);return ht?(en=ht(),Dr=function(tn,ln){en.set(tn,it(ht,ln,er))}):(en={},Dr=function(tn,ln){en[tn]=it(ht,ln,er)}),Ur.forEach(Dr),en}function Rt(ht,Ut){if(Ut>=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<Qe;++Ve)Ce.add(fe[Ve]);return Ce};function k(){this._=Object.create(null)}T(k,{has:E,add:function(fe){return this._[b(fe+="")]=!0,fe},remove:y,values:z,size:I,empty:B,forEach:function(fe){for(var Ce in this._)fe.call(this,a(Ce))}}),i.behavior={};function O(fe){return fe}i.rebind=function(fe,Ce){for(var Ve=1,Qe=arguments.length,tt;++Ve<Qe;)fe[tt=arguments[Ve]]=N(fe,Ce,Ce[tt]);return fe};function N(fe,Ce,Ve){return function(){var Qe=Ve.apply(Ce,arguments);return Qe===Ce?fe:Qe}}function _(fe,Ce){if(Ce in fe)return Ce;Ce=Ce.charAt(0).toUpperCase()+Ce.slice(1);for(var Ve=0,Qe=U.length;Ve<Qe;++Ve){var tt=U[Ve]+Ce;if(tt in fe)return tt}}var U=["webkit","ms","moz","Moz","o","O"];function Y(){}i.dispatch=function(){for(var fe=new J,Ce=-1,Ve=arguments.length;++Ce<Ve;)fe[arguments[Ce]]=te(fe);return fe};function J(){}J.prototype.on=function(fe,Ce){var Ve=fe.indexOf("."),Qe="";if(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<Rt;)(ht=tt[it].on)&&ht.apply(this,arguments);return fe}return Qe.on=function(tt,it){var Rt=Ve.get(tt),ht;return arguments.length<2?Rt&&Rt.on:(Rt&&(Rt.on=null,Ce=Ce.slice(0,ht=Ce.indexOf(Rt)).concat(Ce.slice(ht+1)),Ve.remove(tt)),it&&Ce.push(Ve.set(tt,{on:it})),fe)},Qe}i.event=null;function ae(){i.event.preventDefault()}function ce(){for(var fe=i.event,Ce;Ce=fe.sourceEvent;)fe=Ce;return fe}function Q(fe){for(var Ce=new J,Ve=0,Qe=arguments.length;++Ve<Qe;)Ce[arguments[Ve]]=te(Ce);return Ce.of=function(tt,it){return function(Rt){try{var ht=Rt.sourceEvent=i.event;Rt.target=fe,i.event=Rt,Ce[Rt.type].apply(tt,it)}finally{i.event=ht}}},Ce}i.requote=function(fe){return fe.replace(Z,"\\$&")};var Z=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,j={}.__proto__?function(fe,Ce){fe.__proto__=Ce}:function(fe,Ce){for(var Ve in Ce)fe[Ve]=Ce[Ve]};function K(fe){return j(fe,$),fe}var ee=function(fe,Ce){return Ce.querySelector(fe)},oe=function(fe,Ce){return Ce.querySelectorAll(fe)},q=function(fe,Ce){var Ve=fe.matches||fe[_(fe,"matchesSelector")];return q=function(Qe,tt){return Ve.call(Qe,tt)},q(fe,Ce)};typeof Sizzle=="function"&&(ee=function(fe,Ce){return Sizzle(fe,Ce)[0]||null},oe=Sizzle,q=Sizzle.matchesSelector),i.selection=function(){return i.select(v.documentElement)};var $=i.selection.prototype=[];$.select=function(fe){var Ce=[],Ve,Qe,tt,it;fe=le(fe);for(var Rt=-1,ht=this.length;++Rt<ht;){Ce.push(Ve=[]),Ve.parentNode=(tt=this[Rt]).parentNode;for(var Ut=-1,er=tt.length;++Ut<er;)(it=tt[Ut])?(Ve.push(Qe=fe.call(it,it.__data__,Ut,Rt)),Qe&&"__data__"in it&&(Qe.__data__=it.__data__)):Ve.push(null)}return K(Ce)};function le(fe){return typeof fe=="function"?fe:function(){return ee(fe,this)}}$.selectAll=function(fe){var Ce=[],Ve,Qe;fe=ie(fe);for(var tt=-1,it=this.length;++tt<it;)for(var Rt=this[tt],ht=-1,Ut=Rt.length;++ht<Ut;)(Qe=Rt[ht])&&(Ce.push(Ve=A(fe.call(Qe,Qe.__data__,ht,tt))),Ve.parentNode=Qe);return K(Ce)};function ie(fe){return typeof fe=="function"?fe:function(){return oe(fe,this)}}var he="http://www.w3.org/1999/xhtml",me={svg:"http://www.w3.org/2000/svg",xhtml:he,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};i.ns={prefix:me,qualify:function(fe){var Ce=fe.indexOf(":"),Ve=fe;return Ce>=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<Qe;)if(!Ce.contains(fe[tt]))return!1}else for(Ce=Ve.getAttribute("class");++tt<Qe;)if(!Oe(fe[tt]).test(Ce))return!1;return!0}for(Ce in fe)this.each(Ee(Ce,fe[Ce]));return this}return this.each(Ee(fe,Ce))};function Oe(fe){return new RegExp("(?:^|\\s+)"+i.requote(fe)+"(?:\\s+|$)","g")}function Ne(fe){return(fe+"").trim().split(/^|\s+/)}function Ee(fe,Ce){fe=Ne(fe).map(xe);var Ve=fe.length;function Qe(){for(var it=-1;++it<Ve;)fe[it](this,Ce)}function tt(){for(var it=-1,Rt=Ce.apply(this,arguments);++it<Ve;)fe[it](this,Rt)}return typeof Ce=="function"?tt:Qe}function xe(fe){var Ce=Oe(fe);return function(Ve,Qe){if(tt=Ve.classList)return Qe?tt.add(fe):tt.remove(fe);var tt=Ve.getAttribute("class")||"";Qe?(Ce.lastIndex=0,Ce.test(tt)||Ve.setAttribute("class",Te(tt+" "+fe))):Ve.setAttribute("class",Te(tt.replace(Ce," ")))}}$.style=function(fe,Ce,Ve){var Qe=arguments.length;if(Qe<3){if(typeof fe!="string"){Qe<2&&(Ce="");for(Ve in fe)this.each(Se(Ve,fe[Ve],Ce));return this}if(Qe<2){var tt=this.node();return t(tt).getComputedStyle(tt,null).getPropertyValue(fe)}Ve=""}return this.each(Se(fe,Ce,Ve))};function Se(fe,Ce,Ve){function Qe(){this.style.removeProperty(fe)}function tt(){this.style.setProperty(fe,Ce,Ve)}function it(){var Rt=Ce.apply(this,arguments);Rt==null?this.style.removeProperty(fe):this.style.setProperty(fe,Rt,Ve)}return Ce==null?Qe:typeof Ce=="function"?it:tt}$.property=function(fe,Ce){if(arguments.length<2){if(typeof fe=="string")return this.node()[fe];for(Ce in fe)this.each(Ue(Ce,fe[Ce]));return this}return this.each(Ue(fe,Ce))};function Ue(fe,Ce){function Ve(){delete this[fe]}function Qe(){this[fe]=Ce}function tt(){var it=Ce.apply(this,arguments);it==null?delete this[fe]:this[fe]=it}return Ce==null?Ve:typeof Ce=="function"?tt:Qe}$.text=function(fe){return arguments.length?this.each(typeof fe=="function"?function(){var Ce=fe.apply(this,arguments);this.textContent=Ce??""}:fe==null?function(){this.textContent=""}:function(){this.textContent=fe}):this.node().textContent},$.html=function(fe){return arguments.length?this.each(typeof fe=="function"?function(){var Ce=fe.apply(this,arguments);this.innerHTML=Ce??""}:fe==null?function(){this.innerHTML=""}:function(){this.innerHTML=fe}):this.node().innerHTML},$.append=function(fe){return fe=He(fe),this.select(function(){return this.appendChild(fe.apply(this,arguments))})};function He(fe){function Ce(){var Qe=this.ownerDocument,tt=this.namespaceURI;return tt===he&&Qe.documentElement.namespaceURI===he?Qe.createElement(fe):Qe.createElementNS(tt,fe)}function Ve(){return this.ownerDocument.createElementNS(fe.space,fe.local)}return typeof fe=="function"?fe:(fe=i.ns.qualify(fe)).local?Ve:Ce}$.insert=function(fe,Ce){return fe=He(fe),Ce=le(Ce),this.select(function(){return this.insertBefore(fe.apply(this,arguments),Ce.apply(this,arguments)||null)})},$.remove=function(){return this.each(Fe)};function Fe(){var fe=this.parentNode;fe&&fe.removeChild(this)}$.data=function(fe,Ce){var Ve=-1,Qe=this.length,tt,it;if(!arguments.length){for(fe=new Array(Qe=(tt=this[0]).length);++Ve<Qe;)(it=tt[Ve])&&(fe[Ve]=it.__data__);return fe}function Rt(tr,Lr){var Sr,Kr=tr.length,en=Lr.length,Dr=Math.min(Kr,en),Ur=new Array(en),Zr=new Array(en),tn=new Array(Kr),ln,Xr;if(Ce){var Nn=new C,Gn=new Array(Kr),Kn;for(Sr=-1;++Sr<Kr;)(ln=tr[Sr])&&(Nn.has(Kn=Ce.call(ln,ln.__data__,Sr))?tn[Sr]=ln:Nn.set(Kn,ln),Gn[Sr]=Kn);for(Sr=-1;++Sr<en;)(ln=Nn.get(Kn=Ce.call(Lr,Xr=Lr[Sr],Sr)))?ln!==!0&&(Ur[Sr]=ln,ln.__data__=Xr):Zr[Sr]=Ge(Xr),Nn.set(Kn,!0);for(Sr=-1;++Sr<Kr;)Sr in Gn&&Nn.get(Gn[Sr])!==!0&&(tn[Sr]=tr[Sr])}else{for(Sr=-1;++Sr<Dr;)ln=tr[Sr],Xr=Lr[Sr],ln?(ln.__data__=Xr,Ur[Sr]=ln):Zr[Sr]=Ge(Xr);for(;Sr<en;++Sr)Zr[Sr]=Ge(Lr[Sr]);for(;Sr<Kr;++Sr)tn[Sr]=tr[Sr]}Zr.update=Ur,Zr.parentNode=Ur.parentNode=tn.parentNode=tr.parentNode,ht.push(Zr),Ut.push(Ur),er.push(tn)}var ht=et([]),Ut=K([]),er=K([]);if(typeof fe=="function")for(;++Ve<Qe;)Rt(tt=this[Ve],fe.call(tt,tt.parentNode.__data__,Ve));else for(;++Ve<Qe;)Rt(tt=this[Ve],fe);return Ut.enter=function(){return ht},Ut.exit=function(){return er},Ut};function Ge(fe){return{__data__:fe}}$.datum=function(fe){return arguments.length?this.property("__data__",fe):this.property("__data__")},$.filter=function(fe){var Ce=[],Ve,Qe,tt;typeof fe!="function"&&(fe=nt(fe));for(var it=0,Rt=this.length;it<Rt;it++){Ce.push(Ve=[]),Ve.parentNode=(Qe=this[it]).parentNode;for(var ht=0,Ut=Qe.length;ht<Ut;ht++)(tt=Qe[ht])&&fe.call(tt,tt.__data__,ht,it)&&Ve.push(tt)}return K(Ce)};function nt(fe){return function(){return q(this,fe)}}$.order=function(){for(var fe=-1,Ce=this.length;++fe<Ce;)for(var Ve=this[fe],Qe=Ve.length-1,tt=Ve[Qe],it;--Qe>=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<Ve;)this[Ce].sort(fe);return this.order()};function qe(fe){return arguments.length||(fe=u),function(Ce,Ve){return Ce&&Ve?fe(Ce.__data__,Ve.__data__):!Ce-!Ve}}$.each=function(fe){return $e(this,function(Ce,Ve,Qe){fe.call(Ce,Ce.__data__,Ve,Qe)})};function $e(fe,Ce){for(var Ve=0,Qe=fe.length;Ve<Qe;Ve++)for(var tt=fe[Ve],it=0,Rt=tt.length,ht;it<Rt;it++)(ht=tt[it])&&Ce(ht,it,Ve);return fe}$.call=function(fe){var Ce=A(arguments);return fe.apply(Ce[0]=this,Ce),this},$.empty=function(){return!this.node()},$.node=function(){for(var fe=0,Ce=this.length;fe<Ce;fe++)for(var Ve=this[fe],Qe=0,tt=Ve.length;Qe<tt;Qe++){var it=Ve[Qe];if(it)return it}return null},$.size=function(){var fe=0;return $e(this,function(){++fe}),fe};function et(fe){return j(fe,ct),fe}var ct=[];i.selection.enter=et,i.selection.enter.prototype=ct,ct.append=$.append,ct.empty=$.empty,ct.node=$.node,ct.call=$.call,ct.size=$.size,ct.select=function(fe){for(var Ce=[],Ve,Qe,tt,it,Rt,ht=-1,Ut=this.length;++ht<Ut;){tt=(it=this[ht]).update,Ce.push(Ve=[]),Ve.parentNode=it.parentNode;for(var er=-1,tr=it.length;++er<tr;)(Rt=it[er])?(Ve.push(tt[er]=Qe=fe.call(it.parentNode,Rt.__data__,er,ht)),Qe.__data__=Rt.__data__):Ve.push(null)}return K(Ce)},ct.insert=function(fe,Ce){return arguments.length<2&&(Ce=dt(this)),$.insert.call(this,fe,Ce)};function dt(fe){var Ce,Ve;return function(Qe,tt,it){var Rt=fe[it].update,ht=Rt.length,Ut;for(it!=Ve&&(Ve=it,Ce=0),tt>=Ce&&(Ce=tt+1);!(Ut=Rt[Ce])&&++Ce<ht;);return Ut}}i.select=function(fe){var Ce;return typeof fe=="string"?(Ce=[ee(fe,v)],Ce.parentNode=v.documentElement):(Ce=[fe],Ce.parentNode=p(fe)),K([Ce])},i.selectAll=function(fe){var Ce;return typeof fe=="string"?(Ce=A(oe(fe,v)),Ce.parentNode=v.documentElement):(Ce=A(fe),Ce.parentNode=null),K([Ce])},$.on=function(fe,Ce,Ve){var Qe=arguments.length;if(Qe<3){if(typeof fe!="string"){Qe<2&&(Ce=!1);for(Ve in fe)this.each(pt(Ve,fe[Ve],Ce));return this}if(Qe<2)return(Qe=this.node()["__on"+fe])&&Qe._;Ve=!1}return this.each(pt(fe,Ce,Ve))};function pt(fe,Ce,Ve){var Qe="__on"+fe,tt=fe.indexOf("."),it=Mt;tt>0&&(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;Qe<tt;++Qe)if((it=Ce[Qe]).identifier===Ve)return Pe(fe,it)}},i.behavior.drag=function(){var fe=Q(tt,"drag","dragstart","dragend"),Ce=null,Ve=it(Y,i.mouse,t,"mousemove","mouseup"),Qe=it(be,i.touch,O,"touchmove","touchend");function tt(){this.on("mousedown.drag",Ve).on("touchstart.drag",Qe)}function it(Rt,ht,Ut,er,tr){return function(){var Lr=this,Sr=i.event.target.correspondingElement||i.event.target,Kr=Lr.parentNode,en=fe.of(Lr,arguments),Dr=0,Ur=Rt(),Zr=".drag"+(Ur==null?"":"-"+Ur),tn,ln=i.select(Ut(Sr)).on(er+Zr,Gn).on(tr+Zr,Kn),Xr=Ie(Sr),Nn=ht(Kr,Ur);Ce?(tn=Ce.apply(Lr,arguments),tn=[tn.x-Nn[0],tn.y-Nn[1]]):tn=[0,0],en({type:"dragstart"});function Gn(){var na=ht(Kr,Ur),ba,ma;na&&(ba=na[0]-Nn[0],ma=na[1]-Nn[1],Dr|=ba|ma,Nn=na,en({type:"drag",x:na[0]+tn[0],y:na[1]+tn[1],dx:ba,dy:ma}))}function Kn(){ht(Kr,Ur)&&(ln.on(er+Zr,null).on(tr+Zr,null),Xr(Dr),en({type:"dragend"}))}}}return tt.origin=function(Rt){return arguments.length?(Ce=Rt,tt):Ce},i.rebind(tt,fe,"on")};function be(){return i.event.changedTouches[0].identifier}i.touches=function(fe,Ce){return arguments.length<2&&(Ce=ce().touches),Ce?A(Ce).map(function(Ve){var Qe=Pe(fe,Ve);return Qe.identifier=Ve.identifier,Qe}):[]};var se=1e-6,ye=se*se,Le=Math.PI,Be=2*Le,ot=Be-se,at=Le/2,wt=Le/180,It=180/Le;function Bt(fe,Ce,Ve){return(Ce[0]-fe[0])*(Ve[1]-fe[1])-(Ce[1]-fe[1])*(Ve[0]-fe[0])}function Gt(fe){return fe>1?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(tr<ye)Sr=Math.log(ht/tt)/_r,Lr=function(tn){return[Ve+tn*Ut,Qe+tn*er,tt*Math.exp(_r*tn*Sr)]};else{var Kr=Math.sqrt(tr),en=(ht*ht-tt*tt+jt*tr)/(2*tt*yt*Kr),Dr=(ht*ht-tt*tt-jt*tr)/(2*ht*yt*Kr),Ur=Math.log(Math.sqrt(en*en+1)-en),Zr=Math.log(Math.sqrt(Dr*Dr+1)-Dr);Sr=(Zr-Ur)/_r,Lr=function(tn){var ln=tn*Sr,Xr=Kt(Ur),Nn=tt/(yt*Kr)*(Xr*ir(_r*ln+Ur)-Lt(Ur));return[Ve+Nn*Ut,Qe+Nn*er,tt*Xr/Kt(_r*ln+Ur)]}}return Lr.duration=Sr*1e3,Lr},i.behavior.zoom=function(){var fe={x:0,y:0,k:1},Ce,Ve,Qe,tt=[960,500],it=Yt,Rt=250,ht=0,Ut="mousedown.zoom",er="mousemove.zoom",tr="mouseup.zoom",Lr,Sr="touchstart.zoom",Kr,en=Q(ln,"zoomstart","zoom","zoomend"),Dr,Ur,Zr,tn;hr||(hr="onwheel"in v?(br=function(){return-i.event.deltaY*(i.event.deltaMode?120:1)},"wheel"):"onmousewheel"in v?(br=function(){return i.event.wheelDelta},"mousewheel"):(br=function(){return-i.event.detail},"MozMousePixelScroll"));function ln(Bn){Bn.on(Ut,Oa).on(hr+".zoom",ei).on("dblclick.zoom",li).on(Sr,Ja)}ln.event=function(Bn){Bn.each(function(){var Na=en.of(this,arguments),_a=fe;Pr?i.select(this).transition().each("start.zoom",function(){fe=this.__chart__||{x:0,y:0,k:1},ma(Na)}).tween("zoom:zoom",function(){var Ya=tt[0],Mi=tt[1],_i=Ve?Ve[0]:Ya/2,Bi=Ve?Ve[1]:Mi/2,xi=i.interpolateZoom([(_i-fe.x)/fe.k,(Bi-fe.y)/fe.k,Ya/fe.k],[(_i-_a.x)/_a.k,(Bi-_a.y)/_a.k,Ya/_a.k]);return function(fi){var ga=xi(fi),Ma=Ya/ga[2];this.__chart__=fe={x:_i-ga[0]*Ma,y:Bi-ga[1]*Ma,k:Ma},Ua(Na)}}).each("interrupt.zoom",function(){Ea(Na)}).each("end.zoom",function(){Ea(Na)}):(this.__chart__=fe,ma(Na),Ua(Na),Ea(Na))})},ln.translate=function(Bn){return arguments.length?(fe={x:+Bn[0],y:+Bn[1],k:fe.k},ba(),ln):[fe.x,fe.y]},ln.scale=function(Bn){return arguments.length?(fe={x:fe.x,y:fe.y,k:null},Gn(+Bn),ba(),ln):fe.k},ln.scaleExtent=function(Bn){return arguments.length?(it=Bn==null?Yt:[+Bn[0],+Bn[1]],ln):it},ln.center=function(Bn){return arguments.length?(Qe=Bn&&[+Bn[0],+Bn[1]],ln):Qe},ln.size=function(Bn){return arguments.length?(tt=Bn&&[+Bn[0],+Bn[1]],ln):tt},ln.duration=function(Bn){return arguments.length?(Rt=+Bn,ln):Rt},ln.x=function(Bn){return arguments.length?(Ur=Bn,Dr=Bn.copy(),fe={x:0,y:0,k:1},ln):Ur},ln.y=function(Bn){return arguments.length?(tn=Bn,Zr=Bn.copy(),fe={x:0,y:0,k:1},ln):tn};function Xr(Bn){return[(Bn[0]-fe.x)/fe.k,(Bn[1]-fe.y)/fe.k]}function Nn(Bn){return[Bn[0]*fe.k+fe.x,Bn[1]*fe.k+fe.y]}function Gn(Bn){fe.k=Math.max(it[0],Math.min(it[1],Bn))}function Kn(Bn,Na){Na=Nn(Na),fe.x+=Bn[0]-Na[0],fe.y+=Bn[1]-Na[1]}function na(Bn,Na,_a,Ya){Bn.__chart__={x:fe.x,y:fe.y,k:fe.k},Gn(Math.pow(2,Ya)),Kn(Ve=Na,_a),Bn=i.select(Bn),Rt>0&&(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;Go<pi;++Go)_a[Ci[Go].identifier]=null;var ys=bi(),Wo=Date.now();if(ys.length===1){if(Wo-Kr<500){var Xa=ys[0];na(Bn,Xa,_a[Xa.identifier],Math.floor(Math.log(fe.k)/Math.LN2)+1),ae()}Kr=Wo}else if(ys.length>1){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;Wo<Xa;++Wo,ys=null)if(pi=xo[Wo],ys=_a[pi.identifier]){if(Go)break;Ci=pi,Go=ys}if(ys){var wi=(wi=pi[0]-Ci[0])*wi+(wi=pi[1]-Ci[1])*wi,yc=Ya&&Math.sqrt(wi/Ya);Ci=[(Ci[0]+pi[0])/2,(Ci[1]+pi[1])/2],Go=[(Go[0]+ys[0])/2,(Go[1]+ys[1])/2],Gn(yc*Mi)}Kr=null,Kn(Ci,Go),Ua(Na)}function $i(){if(i.event.touches.length){for(var xo=i.event.changedTouches,Ci=0,Go=xo.length;Ci<Go;++Ci)delete _a[xo[Ci].identifier];for(var pi in _a)return void bi()}i.selectAll(fi).on(_i,null),ga.on(Ut,Oa).on(Sr,Ja),Ma(),Ea(Na)}}function ei(){var Bn=en.of(this,arguments);Lr?clearTimeout(Lr):(Ot.call(this),Ce=Xr(Ve=Qe||i.mouse(this)),ma(Bn)),Lr=setTimeout(function(){Lr=null,Ea(Bn)},50),ae(),Gn(Math.pow(2,br()*.002)*fe.k),Kn(Ve,Ce),Ua(Bn)}function li(){var Bn=i.mouse(this),Na=Math.log(fe.k)/Math.LN2;na(this,Bn,Xr(Bn),i.event.shiftKey?Math.ceil(Na)-1:Math.floor(Na)+1)}return i.rebind(ln,en,"on")};var Yt=[0,1/0],br,hr;i.color=ut;function ut(){}ut.prototype.toString=function(){return this.rgb()+""},i.hsl=lt;function lt(fe,Ce,Ve){return this instanceof lt?(this.h=+fe,this.s=+Ce,void(this.l=+Ve)):arguments.length<2?fe instanceof lt?new lt(fe.h,fe.s,fe.l):pr(""+fe,vr,lt):new lt(fe,Ce,Ve)}var xt=lt.prototype=new ut;xt.brighter=function(fe){return fe=Math.pow(.7,arguments.length?fe:1),new lt(this.h,this.s,this.l/fe)},xt.darker=function(fe){return fe=Math.pow(.7,arguments.length?fe:1),new lt(this.h,this.s,fe*this.l)},xt.rgb=function(){return Tt(this.h,this.s,this.l)};function Tt(fe,Ce,Ve){var Qe,tt;fe=isNaN(fe)?0:(fe%=360)<0?fe+360:fe,Ce=isNaN(Ce)||Ce<0?0:Ce>1?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<tt&&(Ce=tt),Ve&&Ve<tt&&(Ve=tt),Qe&&Qe<tt&&(Qe=tt),new lr(Math.min(255,Ce/fe),Math.min(255,Ve/fe),Math.min(255,Qe/fe)))},fr.darker=function(fe){return fe=Math.pow(.7,arguments.length?fe:1),new lr(fe*this.r,fe*this.g,fe*this.b)},fr.hsl=function(){return vr(this.r,this.g,this.b)},fr.toString=function(){return"#"+dr(this.r)+dr(this.g)+dr(this.b)};function dr(fe){return fe<16?"0"+Math.max(0,fe).toString(16):Math.min(255,fe).toString(16)}function pr(fe,Ce,Ve){var Qe=0,tt=0,it=0,Rt,ht,Ut;if(Rt=/([a-z]+)\((.*)\)/.exec(fe=fe.toLowerCase()),Rt)switch(ht=Rt[2].split(","),Rt[1]){case"hsl":return Ve(parseFloat(ht[0]),parseFloat(ht[1])/100,parseFloat(ht[2])/100);case"rgb":return Ce(kr(ht[0]),kr(ht[1]),kr(ht[2]))}return(Ut=pn.get(fe))?Ce(Ut.r,Ut.g,Ut.b):(fe!=null&&fe.charAt(0)==="#"&&!isNaN(Ut=parseInt(fe.slice(1),16))&&(fe.length===4?(Qe=(Ut&3840)>>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+(Ce<Ve?6:0):Ce==tt?Rt=(Ve-fe)/it+2:Rt=(fe-Ce)/it+4,Rt*=60):(Rt=NaN,ht=Ut>0&&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<Zr;++tn)Ur[Sr[tn]]=Dr[tn];return Ur};Lr=tr?function(Dr,Ur){return tr(en(Dr),Ur)}:en})},tt.parseRows=function(er,tr){var Lr={},Sr={},Kr=[],en=er.length,Dr=0,Ur=0,Zr,tn;function ln(){if(Dr>=en)return Sr;if(tn)return tn=!1,Lr;var Nn=Dr;if(er.charCodeAt(Nn)===34){for(var Gn=Nn;Gn++<en;)if(er.charCodeAt(Gn)===34){if(er.charCodeAt(Gn+1)!==34)break;++Gn}Dr=Gn+2;var Kn=er.charCodeAt(Gn+1);return Kn===13?(tn=!0,er.charCodeAt(Gn+2)===10&&++Dr):Kn===10&&(tn=!0),er.slice(Nn+1,Gn).replace(/""/g,'"')}for(;Dr<en;){var Kn=er.charCodeAt(Dr++),na=1;if(Kn===10)tn=!0;else if(Kn===13)tn=!0,er.charCodeAt(Dr)===10&&(++Dr,++na);else if(Kn!==Qe)continue;return er.slice(Nn,Dr-na)}return er.slice(Nn)}for(;(Zr=ln())!==Sr;){for(var Xr=[];Zr!==Lr&&Zr!==Sr;)Xr.push(Zr),Zr=ln();tr&&(Xr=tr(Xr,Ur++))==null||Kr.push(Xr)}return Kr},tt.format=function(er){if(Array.isArray(er[0]))return tt.formatRows(er);var tr=new k,Lr=[];return er.forEach(function(Sr){for(var Kr in Sr)tr.has(Kr)||Lr.push(tr.add(Kr))}),[Lr.map(Ut).join(fe)].concat(er.map(function(Sr){return Lr.map(function(Kr){return Ut(Sr[Kr])}).join(fe)})).join(`
`)},tt.formatRows=function(er){return er.map(ht).join(`
`)};function ht(er){return er.map(Ut).join(fe)}function Ut(er){return Ve.test(er)?'"'+er.replace(/\"/g,'""')+'"':er}return tt},i.csv=i.dsv(",","text/csv"),i.tsv=i.dsv(" ","text/tab-separated-values");var Or,Nr,qr,vn,fn=this[_(this,"requestAnimationFrame")]||function(fe){setTimeout(fe,17)};i.timer=function(){Tn.apply(this,arguments)};function Tn(fe,Ce,Ve){var Qe=arguments.length;Qe<2&&(Ce=0),Qe<3&&(Ve=Date.now());var tt=Ve+Ce,it={c:fe,t:tt,n:null};return Nr?Nr.n=it:Or=it,Nr=it,qr||(vn=clearTimeout(vn),qr=1,fn(Pn)),it}function Pn(){var fe=jn(),Ce=qn()-fe;Ce>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<Ve&&(Ve=Ce.t),Ce=(fe=Ce).n):Ce=fe?fe.n=Ce.n:Or=Ce.n;return Nr=fe,Ve}i.round=function(fe,Ce){return Ce?Math.round(fe*(Ce=Math.pow(10,Ce)))/Ce:Math.round(fe)},i.geom={};function sa(fe){return fe[0]}function ta(fe){return fe[1]}i.geom.hull=function(fe){var Ce=sa,Ve=ta;if(arguments.length)return Qe(fe);function Qe(tt){if(tt.length<3)return[];var it=jr(Ce),Rt=jr(Ve),ht,Ut=tt.length,er=[],tr=[];for(ht=0;ht<Ut;ht++)er.push([+it.call(this,tt[ht],ht),+Rt.call(this,tt[ht],ht),ht]);for(er.sort(Mr),ht=0;ht<Ut;ht++)tr.push([er[ht][0],-er[ht][1]]);var Lr=ea(er),Sr=ea(tr),Kr=Sr[0]===Lr[0],en=Sr[Sr.length-1]===Lr[Lr.length-1],Dr=[];for(ht=Lr.length-1;ht>=0;--ht)Dr.push(tt[er[Lr[ht]][2]]);for(ht=+Kr;ht<Sr.length-en;++ht)Dr.push(tt[er[Sr[ht]][2]]);return Dr}return Qe.x=function(tt){return arguments.length?(Ce=tt,Qe):Ce},Qe.y=function(tt){return arguments.length?(Ve=tt,Qe):Ve},Qe};function ea(fe){for(var Ce=fe.length,Ve=[0,1],Qe=2,tt=2;tt<Ce;tt++){for(;Qe>1&&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;++fe<Ce;)Ve=Qe,Qe=this[fe],tt+=Ve[1]*Qe[0]-Ve[0]*Qe[1];return tt*.5},on.centroid=function(fe){var Ce=-1,Ve=this.length,Qe=0,tt=0,it,Rt=this[Ve-1],ht;for(arguments.length||(fe=-1/(6*this.area()));++Ce<Ve;)it=Rt,Rt=this[Ce],ht=it[0]*Rt[1]-Rt[0]*it[1],Qe+=(it[0]+Rt[0])*ht,tt+=(it[1]+Rt[1])*ht;return[Qe*fe,tt*fe]},on.clip=function(fe){for(var Ce,Ve=Un(fe),Qe=-1,tt=this.length-Un(this),it,Rt,ht=this[tt-1],Ut,er,tr;++Qe<tt;){for(Ce=fe.slice(),fe.length=0,Ut=this[Qe],er=Ce[(Rt=Ce.length-Ve)-1],it=-1;++it<Rt;)tr=Ce[it],nn(tr,ht,Ut)?(nn(er,ht,Ut)||fe.push(gn(er,tr,ht,Ut)),fe.push(tr)):nn(er,ht,Ut)&&fe.push(gn(er,tr,ht,Ut)),er=tr;Ve&&fe.push(fe[0]),ht=Ut}return fe};function nn(fe,Ce,Ve){return(Ve[0]-Ce[0])*(fe[1]-Ce[1])<(Ve[1]-Ce[1])*(fe[0]-Ce[0])}function gn(fe,Ce,Ve,Qe){var tt=fe[0],it=Ve[0],Rt=Ce[0]-tt,ht=Qe[0]-it,Ut=fe[1],er=Ve[1],tr=Ce[1]-Ut,Lr=Qe[1]-er,Sr=(ht*(Ut-er)-Lr*(tt-it))/(Lr*Rt-ht*tr);return[tt+Sr*Rt,Ut+Sr*tr]}function Un(fe){var Ce=fe[0],Ve=fe[fe.length-1];return!(Ce[0]-Ve[0]||Ce[1]-Ve[1])}var En,Cn,Hn,aa=[],Pa,Za,Xt=[];function wr(){yo(this),this.edge=this.site=this.circle=null}function an(fe){var Ce=aa.pop()||new wr;return Ce.site=fe,Ce}function cn(fe){Wn(fe),Hn.remove(fe),aa.push(fe),yo(fe)}function hn(fe){var Ce=fe.circle,Ve=Ce.x,Qe=Ce.cy,tt={x:Ve,y:Qe},it=fe.P,Rt=fe.N,ht=[fe];cn(fe);for(var Ut=it;Ut.circle&&d(Ve-Ut.circle.x)<se&&d(Qe-Ut.circle.cy)<se;)it=Ut.P,ht.unshift(Ut),cn(Ut),Ut=it;ht.unshift(Ut),Wn(Ut);for(var er=Rt;er.circle&&d(Ve-er.circle.x)<se&&d(Qe-er.circle.cy)<se;)Rt=er.N,ht.push(er),cn(er),er=Rt;ht.push(er),Wn(er);var tr=ht.length,Lr;for(Lr=1;Lr<tr;++Lr)er=ht[Lr],Ut=ht[Lr-1],da(er.edge,Ut.site,er.site,tt);Ut=ht[0],er=ht[tr-1],er.edge=ia(Ut.site,er.site,null,tt),_n(Ut),_n(er)}function Ln(fe){for(var Ce=fe.x,Ve=fe.y,Qe,tt,it,Rt,ht=Hn._;ht;)if(it=wn(ht,Ve)-Ce,it>se)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;Sr<en;)Ur=Kr[Sr].end(),ht=Ur.x,Ut=Ur.y,Dr=Kr[++Sr%en].start(),it=Dr.x,Rt=Dr.y,(d(ht-it)>se||d(Ut-Rt)>se)&&(Kr.splice(Sr,0,new Ki(oa(Lr.site,Ur,d(ht-Ce)<se&&tt-Ut>se?{x:Ce,y:d(it-Ce)<se?Rt:tt}:d(Ut-tt)<se&&Ve-ht>se?{x:d(Rt-tt)<se?it:Ve,y:tt}:d(ht-Ve)<se&&Ut-Qe>se?{x:Ve,y:d(it-Ve)<se?Rt:Qe}:d(Ut-Qe)<se&&ht-Ce>se?{x:d(Rt-Qe)<se?it:Ce,y:Qe}:null),Lr.site,null)),++en)}function zr(fe,Ce){return Ce.angle-fe.angle}function dn(){yo(this),this.x=this.y=this.arc=this.site=this.cy=null}function _n(fe){var Ce=fe.P,Ve=fe.N;if(!(!Ce||!Ve)){var Qe=Ce.site,tt=fe.site,it=Ve.site;if(Qe!==it){var Rt=tt.x,ht=tt.y,Ut=Qe.x-Rt,er=Qe.y-ht,tr=it.x-Rt,Ur=it.y-ht,Lr=2*(Ut*Ur-er*tr);if(!(Lr>=-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.y<ln.y||Zr.y===ln.y&&Zr.x<=ln.x)if(ln.L)ln=ln.L;else{tn=ln.P;break}else if(ln.R)ln=ln.R;else{tn=ln;break}Za.insert(tn,Zr),tn||(Pa=Zr)}}}}function Wn(fe){var Ce=fe.circle;Ce&&(Ce.P||(Pa=Ce.N),Za.remove(Ce),Xt.push(Ce),yo(Ce),fe.circle=null)}function yn(fe,Ce,Ve,Qe){return function(tt){var it=tt.a,Rt=tt.b,ht=it.x,Ut=it.y,er=Rt.x,tr=Rt.y,Lr=0,Sr=1,Kr=er-ht,en=tr-Ut,Dr;if(Dr=fe-ht,!(!Kr&&Dr>0)){if(Dr/=Kr,Kr<0){if(Dr<Lr)return;Dr<Sr&&(Sr=Dr)}else if(Kr>0){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(Dr<Lr)return;Dr<Sr&&(Sr=Dr)}if(Dr=Ce-Ut,!(!en&&Dr>0)){if(Dr/=en,en<0){if(Dr<Lr)return;Dr<Sr&&(Sr=Dr)}else if(en>0){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(Dr<Lr)return;Dr<Sr&&(Sr=Dr)}return Lr>0&&(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)<se&&d(tt.a.y-tt.b.y)<se)&&(tt.a=tt.b=null,Ce.splice(Qe,1))}function $n(fe,Ce){var Ve=fe.b;if(Ve)return!0;var Qe=fe.a,tt=Ce[0][0],it=Ce[1][0],Rt=Ce[0][1],ht=Ce[1][1],Ut=fe.l,er=fe.r,tr=Ut.x,Lr=Ut.y,Sr=er.x,Kr=er.y,en=(tr+Sr)/2,Dr=(Lr+Kr)/2,Ur,Zr;if(Kr===Lr){if(en<tt||en>=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.y<Rt)return;Ve={x:en,y:Rt}}}else if(Ur=(tr-Sr)/(Kr-Lr),Zr=Dr-Ur*en,Ur<-1||Ur>1)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<Rt)return;Ve={x:(Rt-Zr)/Ur,y:Rt}}else if(Lr<Kr){if(!Qe)Qe={x:tt,y:Ur*tt+Zr};else if(Qe.x>=it)return;Ve={x:it,y:Ur*it+Zr}}else{if(!Qe)Qe={x:it,y:Ur*it+Zr};else if(Qe.x<tt)return;Ve={x:tt,y:Ur*tt+Zr}}return fe.a=Qe,fe.b=Ve,!0}function la(fe,Ce){this.l=fe,this.r=Ce,this.a=this.b=null}function ia(fe,Ce,Ve,Qe){var tt=new la(fe,Ce);return En.push(tt),Ve&&da(tt,fe,Ce,Ve),Qe&&da(tt,Ce,fe,Qe),Cn[fe.i].edges.push(new Ki(tt,fe,Ce)),Cn[Ce.i].edges.push(new Ki(tt,Ce,fe)),tt}function oa(fe,Ce,Ve){var Qe=new la(fe,null);return Qe.a=Ce,Qe.b=Ve,En.push(Qe),Qe}function da(fe,Ce,Ve,Qe){!fe.a&&!fe.b?(fe.a=Qe,fe.l=Ce,fe.r=Ve):fe.l===Ve?fe.b=Qe:fe.a=Qe}function Ki(fe,Ce,Ve){var Qe=fe.a,tt=fe.b;this.edge=fe,this.site=Ce,this.angle=Ve?Math.atan2(Ve.y-Ce.y,Ve.x-Ce.x):fe.l===Ce?Math.atan2(tt.x-Qe.x,Qe.y-tt.y):Math.atan2(Qe.x-tt.x,tt.y-Qe.y)}Ki.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}};function co(){this._=null}function yo(fe){fe.U=fe.C=fe.L=fe.R=fe.P=fe.N=null}co.prototype={insert:function(fe,Ce){var Ve,Qe,tt;if(fe){if(Ce.P=fe,Ce.N=fe.N,fe.N&&(fe.N.P=Ce),fe.N=Ce,fe.R){for(fe=fe.R;fe.L;)fe=fe.L;fe.L=Ce}else fe.R=Ce;Ve=fe}else this._?(fe=cf(this._),Ce.P=null,Ce.N=fe,fe.P=fe.L=Ce,Ve=fe):(Ce.P=Ce.N=null,this._=Ce,Ve=null);for(Ce.L=Ce.R=null,Ce.U=Ve,Ce.C=!0,fe=Ce;Ve&&Ve.C;)Qe=Ve.U,Ve===Qe.L?(tt=Qe.R,tt&&tt.C?(Ve.C=tt.C=!1,Qe.C=!0,fe=Qe):(fe===Ve.R&&(So(this,Ve),fe=Ve,Ve=fe.U),Ve.C=!1,Qe.C=!0,mo(this,Qe))):(tt=Qe.L,tt&&tt.C?(Ve.C=tt.C=!1,Qe.C=!0,fe=Qe):(fe===Ve.L&&(mo(this,Ve),fe=Ve,Ve=fe.U),Ve.C=!1,Qe.C=!0,So(this,Qe))),Ve=fe.U;this._.C=!1},remove:function(fe){fe.N&&(fe.N.P=fe.P),fe.P&&(fe.P.N=fe.N),fe.N=fe.P=null;var Ce=fe.U,Ve,Qe=fe.L,tt=fe.R,it,Rt;if(Qe?tt?it=cf(tt):it=Qe:it=tt,Ce?Ce.L===fe?Ce.L=it:Ce.R=it:this._=it,Qe&&tt?(Rt=it.C,it.C=fe.C,it.L=Qe,Qe.U=it,it!==tt?(Ce=it.U,it.U=fe.U,fe=it.R,Ce.L=fe,it.R=tt,tt.U=it):(it.U=Ce,Ce=it,fe=it.R)):(Rt=fe.C,fe=it),fe&&(fe.U=Ce),!Rt){if(fe&&fe.C){fe.C=!1;return}do{if(fe===this._)break;if(fe===Ce.L){if(Ve=Ce.R,Ve.C&&(Ve.C=!1,Ce.C=!0,So(this,Ce),Ve=Ce.R),Ve.L&&Ve.L.C||Ve.R&&Ve.R.C){(!Ve.R||!Ve.R.C)&&(Ve.L.C=!1,Ve.C=!0,mo(this,Ve),Ve=Ce.R),Ve.C=Ce.C,Ce.C=Ve.R.C=!1,So(this,Ce),fe=this._;break}}else if(Ve=Ce.L,Ve.C&&(Ve.C=!1,Ce.C=!0,mo(this,Ce),Ve=Ce.L),Ve.L&&Ve.L.C||Ve.R&&Ve.R.C){(!Ve.L||!Ve.L.C)&&(Ve.R.C=!1,Ve.C=!0,So(this,Ve),Ve=Ce.L),Ve.C=Ce.C,Ce.C=Ve.L.C=!1,mo(this,Ce),fe=this._;break}Ve.C=!0,fe=Ce,Ce=Ce.U}while(!fe.C);fe&&(fe.C=!1)}}};function So(fe,Ce){var Ve=Ce,Qe=Ce.R,tt=Ve.U;tt?tt.L===Ve?tt.L=Qe:tt.R=Qe:fe._=Qe,Qe.U=tt,Ve.U=Qe,Ve.R=Qe.L,Ve.R&&(Ve.R.U=Ve),Qe.L=Ve}function mo(fe,Ce){var Ve=Ce,Qe=Ce.L,tt=Ve.U;tt?tt.L===Ve?tt.L=Qe:tt.R=Qe:fe._=Qe,Qe.U=tt,Ve.U=Qe,Ve.L=Qe.R,Ve.L&&(Ve.L.U=Ve),Qe.R=Ve}function cf(fe){for(;fe.L;)fe=fe.L;return fe}function qa(fe,Ce){var Ve=fe.sort(au).pop(),Qe,tt,it;for(En=[],Cn=new Array(fe.length),Hn=new co,Za=new co;;)if(it=Pa,Ve&&(!it||Ve.y<it.y||Ve.y===it.y&&Ve.x<it.x))(Ve.x!==Qe||Ve.y!==tt)&&(Cn[Ve.i]=new Rr(Ve),Ln(Ve),Qe=Ve.x,tt=Ve.y),Ve=fe.pop();else if(it)hn(it.arc);else break;Ce&&(On(Ce),Cr(Ce));var Rt={cells:Cn,edges:En};return Hn=Za=En=Cn=null,Rt}function au(fe,Ce){return Ce.y-fe.y||Ce.x-fe.x}i.geom.voronoi=function(fe){var Ce=sa,Ve=ta,Qe=Ce,tt=Ve,it=kl;if(fe)return Rt(fe);function Rt(Ut){var er=new Array(Ut.length),tr=it[0][0],Lr=it[0][1],Sr=it[1][0],Kr=it[1][1];return qa(ht(Ut),it).cells.forEach(function(en,Dr){var Ur=en.edges,Zr=en.site,tn=er[Dr]=Ur.length?Ur.map(function(ln){var Xr=ln.start();return[Xr.x,Xr.y]}):Zr.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;++en<Dr;)Ur=tn,Zr=Kr[en].edge,tn=Zr.l===Sr?Zr.r:Zr.l,Lr<Ur.i&&Lr<tn.i&&Ji(Sr,Ur,tn)<0&&er.push([Ut[Lr],Ut[Ur.i],Ut[tn.i]])}),er},Rt.x=function(Ut){return arguments.length?(Qe=jr(Ce=Ut),Rt):Ce},Rt.y=function(Ut){return arguments.length?(tt=jr(Ve=Ut),Rt):Ve},Rt.clipExtent=function(Ut){return arguments.length?(it=Ut??kl,Rt):it===kl?null:it},Rt.size=function(Ut){return arguments.length?Rt.clipExtent(Ut&&[[0,0],Ut]):it===kl?null:it&&it[1]},Rt};var kl=[[-1e6,-1e6],[1e6,1e6]];function Ji(fe,Ce,Ve){return(fe.x-Ve.x)*(Ce.y-fe.y)-(fe.x-Ce.x)*(Ve.y-fe.y)}i.geom.delaunay=function(fe){return i.geom.voronoi().triangles(fe)},i.geom.quadtree=function(fe,Ce,Ve,Qe,tt){var it=sa,Rt=ta,ht;if(ht=arguments.length)return it=Eo,Rt=qf,ht===3&&(tt=Ve,Qe=Ce,Ve=Ce=0),Ut(fe);function Ut(er){var tr,Lr=jr(it),Sr=jr(Rt),Kr,en,Dr,Ur,Zr,tn,ln,Xr;if(Ce!=null)Zr=Ce,tn=Ve,ln=Qe,Xr=tt;else if(ln=Xr=-(Zr=tn=1/0),Kr=[],en=[],Ur=er.length,ht)for(Dr=0;Dr<Ur;++Dr)tr=er[Dr],tr.x<Zr&&(Zr=tr.x),tr.y<tn&&(tn=tr.y),tr.x>ln&&(ln=tr.x),tr.y>Xr&&(Xr=tr.y),Kr.push(tr.x),en.push(tr.y);else for(Dr=0;Dr<Ur;++Dr){var Nn=+Lr(tr=er[Dr],Dr),Gn=+Sr(tr,Dr);Nn<Zr&&(Zr=Nn),Gn<tn&&(tn=Gn),Nn>ln&&(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(;++Dr<Ur;)ba(Ua,er[Dr],Kr[Dr],en[Dr],Zr,tn,ln,Xr);--Dr}else er.forEach(Ua.add);return Kr=en=er=tr=null,Ua}return Ut.x=function(er){return arguments.length?(it=er,Ut):it},Ut.y=function(er){return arguments.length?(Rt=er,Ut):Rt},Ut.extent=function(er){return arguments.length?(er==null?Ce=Ve=Qe=tt=null:(Ce=+er[0][0],Ve=+er[0][1],Qe=+er[1][0],tt=+er[1][1]),Ut):Ce==null?null:[[Ce,Ve],[Qe,tt]]},Ut.size=function(er){return arguments.length?(er==null?Ce=Ve=Qe=tt=null:(Ce=Ve=0,Qe=+er[0],tt=+er[1]),Ut):Ce==null?null:[Qe-Ce,tt-Ve]},Ut};function Eo(fe){return fe.x}function qf(fe){return fe.y}function iu(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function Ri(fe,Ce,Ve,Qe,tt,it){if(!fe(Ce,Ve,Qe,tt,it)){var Rt=(Ve+tt)*.5,ht=(Qe+it)*.5,Ut=Ce.nodes;Ut[0]&&Ri(fe,Ut[0],Ve,Qe,Rt,ht),Ut[1]&&Ri(fe,Ut[1],Rt,Qe,tt,ht),Ut[2]&&Ri(fe,Ut[2],Ve,ht,Rt,it),Ut[3]&&Ri(fe,Ut[3],Rt,ht,tt,it)}}function ou(fe,Ce,Ve,Qe,tt,it,Rt){var ht=1/0,Ut;return function er(tr,Lr,Sr,Kr,en){if(!(Lr>it||Sr>Rt||Kr<Qe||en<tt)){if(Dr=tr.point){var Dr,Ur=Ce-tr.x,Zr=Ve-tr.y,tn=Ur*Ur+Zr*Zr;if(tn<ht){var ln=Math.sqrt(ht=tn);Qe=Ce-ln,tt=Ve-ln,it=Ce+ln,Rt=Ve+ln,Ut=Dr}}for(var Xr=tr.nodes,Nn=(Lr+Kr)*.5,Gn=(Sr+en)*.5,Kn=Ce>=Nn,na=Ve>=Gn,ba=na<<1|Kn,ma=ba+4;ba<ma;++ba)if(tr=Xr[ba&3])switch(ba&3){case 0:er(tr,Lr,Sr,Nn,Gn);break;case 1:er(tr,Nn,Sr,Kr,Gn);break;case 2:er(tr,Lr,Gn,Nn,en);break;case 3:er(tr,Nn,Gn,Kr,en);break}}}(fe,Qe,tt,it,Rt),Ut}i.interpolateRgb=ko;function ko(fe,Ce){fe=i.rgb(fe),Ce=i.rgb(Ce);var Ve=fe.r,Qe=fe.g,tt=fe.b,it=Ce.r-Ve,Rt=Ce.g-Qe,ht=Ce.b-tt;return function(Ut){return"#"+dr(Math.round(Ve+it*Ut))+dr(Math.round(Qe+Rt*Ut))+dr(Math.round(tt+ht*Ut))}}i.interpolateObject=Wi;function Wi(fe,Ce){var Ve={},Qe={},tt;for(tt in fe)tt in Ce?Ve[tt]=Ls(fe[tt],Ce[tt]):Qe[tt]=fe[tt];for(tt in Ce)tt in fe||(Qe[tt]=Ce[tt]);return function(it){for(tt in Ve)Qe[tt]=Ve[tt](it);return Qe}}i.interpolateNumber=Fo;function Fo(fe,Ce){return fe=+fe,Ce=+Ce,function(Ve){return fe*(1-Ve)+Ce*Ve}}i.interpolateString=ho;function ho(fe,Ce){var Ve=Vo.lastIndex=fs.lastIndex=0,Qe,tt,it,Rt=-1,ht=[],Ut=[];for(fe=fe+"",Ce=Ce+"";(Qe=Vo.exec(fe))&&(tt=fs.exec(Ce));)(it=tt.index)>Ve&&(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<Ce.length&&(it=Ce.slice(Ve),ht[Rt]?ht[Rt]+=it:ht[++Rt]=it),ht.length<2?Ut[0]?(Ce=Ut[0].x,function(er){return Ce(er)+""}):function(){return Ce}:(Ce=Ut.length,function(er){for(var tr=0,Lr;tr<Ce;++tr)ht[(Lr=Ut[tr]).i]=Lr.x(er);return ht.join("")})}var Vo=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,fs=new RegExp(Vo.source,"g");i.interpolate=Ls;function Ls(fe,Ce){for(var Ve=i.interpolators.length,Qe;--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<Rt;++ht)Ve.push(Ls(fe[ht],Ce[ht]));for(;ht<tt;++ht)Qe[ht]=fe[ht];for(;ht<it;++ht)Qe[ht]=Ce[ht];return function(Ut){for(ht=0;ht<Rt;++ht)Qe[ht]=Ve[ht](Ut);return Qe}}var ec=function(){return O},cs=i.map({linear:ec,poly:su,quad:function(){return vf},cubic:function(){return df},sin:function(){return th},exp:function(){return rh},circle:function(){return nh},elastic:pf,back:ah,bounce:function(){return ih}}),to=i.map({in:O,out:Ps,"in-out":hs,"out-in":function(fe){return hs(Ps(fe))}});i.ease=function(fe){var Ce=fe.indexOf("-"),Ve=Ce>=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]<Ve[0]*Ce[1]&&(Ce[0]*=-1,Ce[1]*=-1,Qe*=-1,tt*=-1),this.rotate=(Qe?Math.atan2(Ce[1],Ce[0]):Math.atan2(-Ve[0],Ve[1]))*It,this.translate=[fe.e,fe.f],this.scale=[Qe,it],this.skew=it?Math.atan2(tt,it)*It:0}hl.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};function vl(fe,Ce){return fe[0]*Ce[0]+fe[1]*Ce[1]}function Fl(fe){var Ce=Math.sqrt(vl(fe,fe));return Ce&&(fe[0]/=Ce,fe[1]/=Ce),Ce}function zu(fe,Ce,Ve){return fe[0]+=Ve*Ce[0],fe[1]+=Ve*Ce[1],fe}var lh={a:1,b:0,c:0,d:1,e:0,f:0};i.interpolateTransform=dl;function Rs(fe){return fe.length?fe.pop()+",":""}function rc(fe,Ce,Ve,Qe){if(fe[0]!==Ce[0]||fe[1]!==Ce[1]){var tt=Ve.push("translate(",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]||Ce[1])&&Ve.push("translate("+Ce+")")}function yf(fe,Ce,Ve,Qe){fe!==Ce?(fe-Ce>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;++it<Rt;)Ve[(ht=Qe[it]).i]=ht.x(tt);return Ve.join("")}}function lu(fe,Ce){return Ce=(Ce-=fe=+fe)||1/Ce,function(Ve){return(Ve-fe)/Ce}}function _l(fe,Ce){return Ce=(Ce-=fe=+fe)||1/Ce,function(Ve){return Math.max(0,Math.min(1,(Ve-fe)/Ce))}}i.layout={},i.layout.bundle=function(){return function(fe){for(var Ce=[],Ve=-1,Qe=fe.length;++Ve<Qe;)Ce.push(vs(fe[Ve]));return Ce}};function vs(fe){for(var Ce=fe.source,Ve=fe.target,Qe=mf(Ce,Ve),tt=[Ce];Ce!==Qe;)Ce=Ce.parent,tt.push(Ce);for(var it=tt.length;Ve!==Qe;)tt.splice(it,0,Ve),Ve=Ve.parent;return tt}function Ds(fe){for(var Ce=[],Ve=fe.parent;Ve!=null;)Ce.push(fe),fe=Ve,Ve=Ve.parent;return Ce.push(fe),Ce}function mf(fe,Ce){if(fe===Ce)return fe;for(var Ve=Ds(fe),Qe=Ds(Ce),tt=Ve.pop(),it=Qe.pop(),Rt=null;tt===it;)Rt=tt,tt=Ve.pop(),it=Qe.pop();return Rt}i.layout.chord=function(){var fe={},Ce,Ve,Qe,tt,it=0,Rt,ht,Ut;function er(){var Lr={},Sr=[],Kr=i.range(tt),en=[],Dr,Ur,Zr,tn,ln;for(Ce=[],Ve=[],Dr=0,tn=-1;++tn<tt;){for(Ur=0,ln=-1;++ln<tt;)Ur+=Qe[tn][ln];Sr.push(Ur),en.push(i.range(tt)),Dr+=Ur}for(Rt&&Kr.sort(function(Ua,Ea){return Rt(Sr[Ua],Sr[Ea])}),ht&&en.forEach(function(Ua,Ea){Ua.sort(function(Oa,Ja){return ht(Qe[Ea][Oa],Qe[Ea][Ja])})}),Dr=(Be-it*tt)/Dr,Ur=0,tn=-1;++tn<tt;){for(Zr=Ur,ln=-1;++ln<tt;){var Xr=Kr[tn],Nn=en[Xr][ln],Gn=Qe[Xr][Nn],Kn=Ur,na=Ur+=Gn*Dr;Lr[Xr+"-"+Nn]={index:Xr,subindex:Nn,startAngle:Kn,endAngle:na,value:Gn}}Ve[Xr]={index:Xr,startAngle:Zr,endAngle:Ur,value:Sr[Xr]},Ur+=it}for(tn=-1;++tn<tt;)for(ln=tn-1;++ln<tt;){var ba=Lr[tn+"-"+ln],ma=Lr[ln+"-"+tn];(ba.value||ma.value)&&Ce.push(ba.value<ma.value?{source:ma,target:ba}:{source:ba,target:ma})}Ut&&tr()}function tr(){Ce.sort(function(Lr,Sr){return Ut((Lr.source.value+Lr.target.value)/2,(Sr.source.value+Sr.target.value)/2)})}return fe.matrix=function(Lr){return arguments.length?(tt=(Qe=Lr)&&Qe.length,Ce=Ve=null,fe):Qe},fe.padding=function(Lr){return arguments.length?(it=Lr,Ce=Ve=null,fe):it},fe.sortGroups=function(Lr){return arguments.length?(Rt=Lr,Ce=Ve=null,fe):Rt},fe.sortSubgroups=function(Lr){return arguments.length?(ht=Lr,Ce=null,fe):ht},fe.sortChords=function(Lr){return arguments.length?(Ut=Lr,Ce&&tr(),fe):Ut},fe.chords=function(){return Ce||er(),Ce},fe.groups=function(){return Ve||er(),Ve},fe},i.layout.force=function(){var fe={},Ce=i.dispatch("start","tick","end"),Ve,Qe=[1,1],tt,it,Rt=.9,ht=Ol,Ut=nc,er=-30,tr=ac,Lr=.1,Sr=.64,Kr=[],en=[],Dr,Ur,Zr;function tn(Xr){return function(Nn,Gn,Kn,na){if(Nn.point!==Xr){var ba=Nn.cx-Xr.x,ma=Nn.cy-Xr.y,Ua=na-Gn,Ea=ba*ba+ma*ma;if(Ua*Ua/Sr<Ea){if(Ea<tr){var Oa=Nn.charge/Ea;Xr.px-=ba*Oa,Xr.py-=ma*Oa}return!0}if(Nn.point&&Ea&&Ea<tr){var Oa=Nn.pointCharge/Ea;Xr.px-=ba*Oa,Xr.py-=ma*Oa}}return!Nn.charge}}fe.tick=function(){if((it*=.99)<.005)return Ve=null,Ce.end({type:"end",alpha:it=0}),!0;var Xr=Kr.length,Nn=en.length,Gn,Kn,na,ba,ma,Ua,Ea,Oa,Ja;for(Kn=0;Kn<Nn;++Kn)na=en[Kn],ba=na.source,ma=na.target,Oa=ma.x-ba.x,Ja=ma.y-ba.y,(Ua=Oa*Oa+Ja*Ja)&&(Ua=it*Ur[Kn]*((Ua=Math.sqrt(Ua))-Dr[Kn])/Ua,Oa*=Ua,Ja*=Ua,ma.x-=Oa*(Ea=ba.weight+ma.weight?ba.weight/(ba.weight+ma.weight):.5),ma.y-=Ja*Ea,ba.x+=Oa*(Ea=1-Ea),ba.y+=Ja*Ea);if((Ea=it*Lr)&&(Oa=Qe[0]/2,Ja=Qe[1]/2,Kn=-1,Ea))for(;++Kn<Xr;)na=Kr[Kn],na.x+=(Oa-na.x)*Ea,na.y+=(Ja-na.y)*Ea;if(er)for(Ou(Gn=i.geom.quadtree(Kr),it,Zr),Kn=-1;++Kn<Xr;)(na=Kr[Kn]).fixed||Gn.visit(tn(na));for(Kn=-1;++Kn<Xr;)na=Kr[Kn],na.fixed?(na.x=na.px,na.y=na.py):(na.x-=(na.px-(na.px=na.x))*Rt,na.y-=(na.py-(na.py=na.y))*Rt);Ce.tick({type:"tick",alpha:it})},fe.nodes=function(Xr){return arguments.length?(Kr=Xr,fe):Kr},fe.links=function(Xr){return arguments.length?(en=Xr,fe):en},fe.size=function(Xr){return arguments.length?(Qe=Xr,fe):Qe},fe.linkDistance=function(Xr){return arguments.length?(ht=typeof Xr=="function"?Xr:+Xr,fe):ht},fe.distance=fe.linkDistance,fe.linkStrength=function(Xr){return arguments.length?(Ut=typeof Xr=="function"?Xr:+Xr,fe):Ut},fe.friction=function(Xr){return arguments.length?(Rt=+Xr,fe):Rt},fe.charge=function(Xr){return arguments.length?(er=typeof Xr=="function"?Xr:+Xr,fe):er},fe.chargeDistance=function(Xr){return arguments.length?(tr=Xr*Xr,fe):Math.sqrt(tr)},fe.gravity=function(Xr){return arguments.length?(Lr=+Xr,fe):Lr},fe.theta=function(Xr){return arguments.length?(Sr=Xr*Xr,fe):Math.sqrt(Sr)},fe.alpha=function(Xr){return arguments.length?(Xr=+Xr,it?Xr>0?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<Nn;++Xr)(ma=Kr[Xr]).index=Xr,ma.weight=0;for(Xr=0;Xr<Gn;++Xr)ma=en[Xr],typeof ma.source=="number"&&(ma.source=Kr[ma.source]),typeof ma.target=="number"&&(ma.target=Kr[ma.target]),++ma.source.weight,++ma.target.weight;for(Xr=0;Xr<Nn;++Xr)ma=Kr[Xr],isNaN(ma.x)&&(ma.x=Ua("x",Kn)),isNaN(ma.y)&&(ma.y=Ua("y",na)),isNaN(ma.px)&&(ma.px=ma.x),isNaN(ma.py)&&(ma.py=ma.y);if(Dr=[],typeof ht=="function")for(Xr=0;Xr<Gn;++Xr)Dr[Xr]=+ht.call(this,en[Xr],Xr);else for(Xr=0;Xr<Gn;++Xr)Dr[Xr]=ht;if(Ur=[],typeof Ut=="function")for(Xr=0;Xr<Gn;++Xr)Ur[Xr]=+Ut.call(this,en[Xr],Xr);else for(Xr=0;Xr<Gn;++Xr)Ur[Xr]=Ut;if(Zr=[],typeof er=="function")for(Xr=0;Xr<Nn;++Xr)Zr[Xr]=+er.call(this,Kr[Xr],Xr);else for(Xr=0;Xr<Nn;++Xr)Zr[Xr]=er;function Ua(Ea,Oa){if(!ba){for(ba=new Array(Nn),li=0;li<Nn;++li)ba[li]=[];for(li=0;li<Gn;++li){var Ja=en[li];ba[Ja.source.index].push(Ja.target),ba[Ja.target.index].push(Ja.source)}}for(var ei=ba[Xr],li=-1,Bn=ei.length,Na;++li<Bn;)if(!isNaN(Na=ei[li][Ea]))return Na;return Math.random()*Oa}return fe.resume()},fe.resume=function(){return fe.alpha(.1)},fe.stop=function(){return fe.alpha(0)},fe.drag=function(){if(tt||(tt=i.behavior.drag().origin(O).on("dragstart.force",zl).on("drag.force",ln).on("dragend.force",Zs)),!arguments.length)return tt;this.on("mouseover.force",Fi).on("mouseout.force",xf).call(tt)};function ln(Xr){Xr.px=i.event.x,Xr.py=i.event.y,fe.resume()}return i.rebind(fe,Ce,"on")};function zl(fe){fe.fixed|=2}function Zs(fe){fe.fixed&=-7}function Fi(fe){fe.fixed|=4,fe.px=fe.x,fe.py=fe.y}function xf(fe){fe.fixed&=-5}function Ou(fe,Ce,Ve){var Qe=0,tt=0;if(fe.charge=0,!fe.leaf)for(var it=fe.nodes,Rt=it.length,ht=-1,Ut;++ht<Rt;)Ut=it[ht],Ut!=null&&(Ou(Ut,Ce,Ve),fe.charge+=Ut.charge,Qe+=Ut.charge*Ut.cx,tt+=Ut.charge*Ut.cy);if(fe.point){fe.leaf||(fe.point.x+=Math.random()-.5,fe.point.y+=Math.random()-.5);var er=Ce*Ve[fe.point.index];fe.charge+=fe.pointCharge=er,Qe+=er*fe.point.x,tt+=er*fe.point.y}fe.cx=Qe/fe.charge,fe.cy=tt/fe.charge}var Ol=20,nc=1,ac=1/0;i.layout.hierarchy=function(){var fe=bf,Ce=Nu,Ve=fh;function Qe(tt){var it=[tt],Rt=[],ht;for(tt.depth=0;(ht=it.pop())!=null;)if(Rt.push(ht),(er=Ce.call(Qe,ht,ht.depth))&&(Ut=er.length)){for(var Ut,er,tr;--Ut>=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;++tt<it;)Ve.push(Rt[tt]);for(;(fe=Qe.pop())!=null;)Ce(fe)}function Nu(fe){return fe.children}function fh(fe){return fe.value}function bf(fe,Ce){return Ce.value-fe.value}function ch(fe){return i.merge(fe.map(function(Ce){return(Ce.children||[]).map(function(Ve){return{source:Ce,target:Ve}})}))}i.layout.partition=function(){var fe=i.layout.hierarchy(),Ce=[1,1];function Ve(it,Rt,ht,Ut){var er=it.children;if(it.x=Rt,it.y=it.depth*Ut,it.dx=ht,it.dy=Ut,er&&(Lr=er.length)){var tr=-1,Lr,Sr,Kr;for(ht=it.value?ht/it.value:0;++tr<Lr;)Ve(Sr=er[tr],Rt,Kr=Sr.value*ht,Ut),Rt+=Kr}}function Qe(it){var Rt=it.children,ht=0;if(Rt&&(er=Rt.length))for(var Ut=-1,er;++Ut<er;)ht=Math.max(ht,Qe(Rt[Ut]));return 1+ht}function tt(it,Rt){var ht=fe.call(this,it,Rt);return Ve(ht[0],0,Ce[0],Ce[1]/Qe(ht[0])),ht}return tt.size=function(it){return arguments.length?(Ce=it,tt):Ce},Nl(tt,fe)},i.layout.pie=function(){var fe=Number,Ce=Bu,Ve=0,Qe=Be,tt=0;function it(Rt){var ht=Rt.length,Ut=Rt.map(function(tn,ln){return+fe.call(it,tn,ln)}),er=+(typeof Ve=="function"?Ve.apply(this,arguments):Ve),tr=(typeof Qe=="function"?Qe.apply(this,arguments):Qe)-er,Lr=Math.min(Math.abs(tr)/ht,+(typeof tt=="function"?tt.apply(this,arguments):tt)),Sr=Lr*(tr<0?-1:1),Kr=i.sum(Ut),en=Kr?(tr-ht*Sr)/Kr:0,Dr=i.range(ht),Ur=[],Zr;return Ce!=null&&Dr.sort(Ce===Bu?function(tn,ln){return Ut[ln]-Ut[tn]}:function(tn,ln){return Ce(Rt[tn],Rt[ln])}),Dr.forEach(function(tn){Ur[tn]={data:Rt[tn],value:Zr=Ut[tn],startAngle:er,endAngle:er+=Zr*en+Sr,padAngle:Lr}}),Ur}return it.value=function(Rt){return arguments.length?(fe=Rt,it):fe},it.sort=function(Rt){return arguments.length?(Ce=Rt,it):Ce},it.startAngle=function(Rt){return arguments.length?(Ve=Rt,it):Ve},it.endAngle=function(Rt){return arguments.length?(Qe=Rt,it):Qe},it.padAngle=function(Rt){return arguments.length?(tt=Rt,it):tt},it};var Bu={};i.layout.stack=function(){var fe=O,Ce=Uu,Ve=Mf,Qe=Tf,tt=uu,it=wf;function Rt(ht,Ut){if(!(en=ht.length))return ht;var er=ht.map(function(tn,ln){return fe.call(Rt,tn,ln)}),tr=er.map(function(tn){return tn.map(function(ln,Xr){return[tt.call(Rt,ln,Xr),it.call(Rt,ln,Xr)]})}),Lr=Ce.call(Rt,tr,Ut);er=i.permute(er,Lr),tr=i.permute(tr,Lr);var Sr=Ve.call(Rt,tr,Ut),Kr=er[0].length,en,Dr,Ur,Zr;for(Ur=0;Ur<Kr;++Ur)for(Qe.call(Rt,er[0][Ur],Zr=Sr[Ur],tr[0][Ur][1]),Dr=1;Dr<en;++Dr)Qe.call(Rt,er[Dr][Ur],Zr+=tr[Dr-1][Ur][1],tr[Dr][Ur][1]);return ht}return Rt.values=function(ht){return arguments.length?(fe=ht,Rt):fe},Rt.order=function(ht){return arguments.length?(Ce=typeof ht=="function"?ht:fu.get(ht)||Uu,Rt):Ce},Rt.offset=function(ht){return arguments.length?(Ve=typeof ht=="function"?ht:Af.get(ht)||Mf,Rt):Ve},Rt.x=function(ht){return arguments.length?(tt=ht,Rt):tt},Rt.y=function(ht){return arguments.length?(it=ht,Rt):it},Rt.out=function(ht){return arguments.length?(Qe=ht,Rt):Qe},Rt};function uu(fe){return fe.x}function wf(fe){return fe.y}function Tf(fe,Ce,Ve){fe.y0=Ce,fe.y=Ve}var fu=i.map({"inside-out":function(fe){var Ce=fe.length,Ve,Qe,tt=fe.map(vi),it=fe.map(ic),Rt=i.range(Ce).sort(function(Lr,Sr){return tt[Lr]-tt[Sr]}),ht=0,Ut=0,er=[],tr=[];for(Ve=0;Ve<Ce;++Ve)Qe=Rt[Ve],ht<Ut?(ht+=it[Qe],er.push(Qe)):(Ut+=it[Qe],tr.push(Qe));return tr.reverse().concat(er)},reverse:function(fe){return i.range(fe.length).reverse()},default:Uu}),Af=i.map({silhouette:function(fe){var Ce=fe.length,Ve=fe[0].length,Qe=[],tt=0,it,Rt,ht,Ut=[];for(Rt=0;Rt<Ve;++Rt){for(it=0,ht=0;it<Ce;it++)ht+=fe[it][Rt][1];ht>tt&&(tt=ht),Qe.push(ht)}for(Rt=0;Rt<Ve;++Rt)Ut[Rt]=(tt-Qe[Rt])/2;return Ut},wiggle:function(fe){var Ce=fe.length,Ve=fe[0],Qe=Ve.length,tt,it,Rt,ht,Ut,er,tr,Lr,Sr,Kr=[];for(Kr[0]=Lr=Sr=0,it=1;it<Qe;++it){for(tt=0,ht=0;tt<Ce;++tt)ht+=fe[tt][it][1];for(tt=0,Ut=0,tr=Ve[it][0]-Ve[it-1][0];tt<Ce;++tt){for(Rt=0,er=(fe[tt][it][1]-fe[tt][it-1][1])/(2*tr);Rt<tt;++Rt)er+=(fe[Rt][it][1]-fe[Rt][it-1][1])/tr;Ut+=er*fe[tt][it][1]}Kr[it]=Lr-=ht?Ut/ht*tr:0,Lr<Sr&&(Sr=Lr)}for(it=0;it<Qe;++it)Kr[it]-=Sr;return Kr},expand:function(fe){var Ce=fe.length,Ve=fe[0].length,Qe=1/Ce,tt,it,Rt,ht=[];for(it=0;it<Ve;++it){for(tt=0,Rt=0;tt<Ce;tt++)Rt+=fe[tt][it][1];if(Rt)for(tt=0;tt<Ce;tt++)fe[tt][it][1]/=Rt;else for(tt=0;tt<Ce;tt++)fe[tt][it][1]=Qe}for(it=0;it<Ve;++it)ht[it]=0;return ht},zero:Mf});function Uu(fe){return i.range(fe.length)}function Mf(fe){for(var Ce=-1,Ve=fe[0].length,Qe=[];++Ce<Ve;)Qe[Ce]=0;return Qe}function vi(fe){for(var Ce=1,Ve=0,Qe=fe[0][1],tt,it=fe.length;Ce<it;++Ce)(tt=fe[Ce][1])>Qe&&(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;++Sr<en;)Lr=ht[Sr]=[],Lr.dx=tr[Sr+1]-(Lr.x=tr[Sr]),Lr.y=0;if(en>0)for(Sr=-1;++Sr<Kr;)Ur=Ut[Sr],Ur>=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;er<Sr;er++){qo(Rt,ht,Ut=Ce[er]);var en=0,Dr=1,Ur=1;for(tr=ht._pack_next;tr!==ht;tr=tr._pack_next,Dr++)if(Is(tr,Ut)){en=1;break}if(en==1)for(Lr=Rt._pack_prev;Lr!==tr._pack_prev&&!Is(Lr,Ut);Lr=Lr._pack_prev,Ur++);en?(Dr<Ur||Dr==Ur&&ht.r<Rt.r?Co(Rt,ht=tr):Co(Rt=Lr,ht),er--):(cu(Rt,Ut),ht=Ut,Kr(Ut))}var Zr=(Ve+Qe)/2,tn=(tt+it)/2,ln=0;for(er=0;er<Sr;er++)Ut=Ce[er],Ut.x-=Zr,Ut.y-=tn,ln=Math.max(ln,Ut.r+Math.sqrt(Ut.x*Ut.x+Ut.y*Ut.y));fe.r=ln,Ce.forEach(js)}function Xs(fe){fe._pack_next=fe._pack_prev=fe}function js(fe){delete fe._pack_next,delete fe._pack_prev}function Ks(fe,Ce,Ve,Qe){var tt=fe.children;if(fe.x=Ce+=Qe*fe.x,fe.y=Ve+=Qe*fe.y,fe.r*=Qe,tt)for(var it=-1,Rt=tt.length;++it<Rt;)Ks(tt[it],Ce,Ve,Qe)}function qo(fe,Ce,Ve){var Qe=fe.r+Ve.r,tt=Ce.x-fe.x,it=Ce.y-fe.y;if(Qe&&(tt||it)){var Rt=Ce.r+Ve.r,ht=tt*tt+it*it;Rt*=Rt,Qe*=Qe;var Ut=.5+(Qe-Rt)/(2*ht),er=Math.sqrt(Math.max(0,2*Rt*(Qe+ht)-(Qe-=ht)*Qe-Rt*Rt))/(2*ht);Ve.x=fe.x+Ut*tt+er*it,Ve.y=fe.y+Ut*it-er*tt}else Ve.x=fe.x+Qe,Ve.y=fe.y}i.layout.tree=function(){var fe=i.layout.hierarchy().sort(null).value(null),Ce=ds,Ve=[1,1],Qe=null;function tt(tr,Lr){var Sr=fe.call(this,tr,Lr),Kr=Sr[0],en=it(Kr);if(Qi(en,Rt),en.parent.m=-en.z,Bl(en,ht),Qe)Bl(Kr,er);else{var Dr=Kr,Ur=Kr,Zr=Kr;Bl(Kr,function(Nn){Nn.x<Dr.x&&(Dr=Nn),Nn.x>Ur.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;Ur<Zr;++Ur)Sr.push((en[Ur]=Dr={_:en[Ur],parent:Kr,children:(Dr=en[Ur].children)&&Dr.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:Ur}).a=Dr);return Lr.children[0]}function Rt(tr){var Lr=tr.children,Sr=tr.parent.children,Kr=tr.i?Sr[tr.i-1]:null;if(Lr.length){hh(tr);var en=(Lr[0].z+Lr[Lr.length-1].z)/2;Kr?(tr.z=Kr.z+Ce(tr._,Kr._),tr.m=tr.z-en):tr.z=en}else Kr&&(tr.z=Kr.z+Ce(tr._,Kr._));tr.parent.A=Ut(tr,Kr,tr.parent.A||Sr[0])}function ht(tr){tr._.x=tr.z+tr.parent.m,tr.m+=tr.parent.m}function Ut(tr,Lr,Sr){if(Lr){for(var Kr=tr,en=tr,Dr=Lr,Ur=Kr.parent.children[0],Zr=Kr.m,tn=en.m,ln=Dr.m,Xr=Ur.m,Nn;Dr=vu(Dr),Kr=hu(Kr),Dr&&Kr;)Ur=hu(Ur),en=vu(en),en.a=tr,Nn=Dr.z+ln-Kr.z-Zr+Ce(Dr._,Kr._),Nn>0&&(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;++Zr<tn;)Xr=(ln=Dr[Zr]).value*(Ur<0?0:Ur),ln.area=isNaN(Xr)||Xr<=0?0:Xr}function tr(Dr){var Ur=Dr.children;if(Ur&&Ur.length){var Zr=tt(Dr),tn=[],ln=Ur.slice(),Xr,Nn=1/0,Gn,Kn=ht==="slice"?Zr.dx:ht==="dice"?Zr.dy:ht==="slice-dice"?Dr.depth&1?Zr.dy:Zr.dx:Math.min(Zr.dx,Zr.dy),na;for(er(ln,Zr.dx*Zr.dy/Dr.value),tn.area=0;(na=ln.length)>0;)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;++Nn<Gn;)(tn=Dr[Nn].area)&&(tn<Xr&&(Xr=tn),tn>ln&&(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);++ln<Xr;)na=Dr[ln],na.x=Nn,na.y=Gn,na.dy=Kn,Nn+=na.dx=Math.min(Zr.x+Zr.dx-Nn,Kn?Ce(na.area/Kn):0);na.z=!0,na.dx+=Zr.x+Zr.dx-Nn,Zr.y+=Kn,Zr.dy-=Kn}else{for((tn||Kn>Zr.dx)&&(Kn=Zr.dx);++ln<Xr;)na=Dr[ln],na.x=Nn,na.y=Gn,na.dx=Kn,Gn+=na.dy=Math.min(Zr.y+Zr.dy-Gn,Kn?Ce(na.area/Kn):0);na.z=!1,na.dy+=Zr.y+Zr.dy-Gn,Zr.x+=Kn,Zr.dx-=Kn}}function en(Dr){var Ur=Rt||fe(Dr),Zr=Ur[0];return Zr.x=Zr.y=0,Zr.value?(Zr.dx=Ve[0],Zr.dy=Ve[1]):Zr.dx=Zr.dy=0,Rt&&fe.revalue(Zr),er([Zr],Zr.dx*Zr.dy/Zr.value),(Rt?Lr:tr)(Zr),it&&(Rt=Ur),Ur}return en.size=function(Dr){return arguments.length?(Ve=Dr,en):Ve},en.padding=function(Dr){if(!arguments.length)return Qe;function Ur(ln){var Xr=Dr.call(en,ln,ln.depth);return Xr==null?Vl(ln):ro(ln,typeof Xr=="number"?[Xr,Xr,Xr,Xr]:Xr)}function Zr(ln){return ro(ln,Dr)}var tn;return tt=(Qe=Dr)==null?Vl:(tn=typeof Dr)=="function"?Ur:(tn==="number"&&(Dr=[Dr,Dr,Dr,Dr]),Zr),en},en.round=function(Dr){return arguments.length?(Ce=Dr?Math.round:Number,en):Ce!=Number},en.sticky=function(Dr){return arguments.length?(it=Dr,Rt=null,en):it},en.ratio=function(Dr){return arguments.length?(Ut=Dr,en):Ut},en.mode=function(Dr){return arguments.length?(ht=Dr+"",en):ht},Nl(en,fe)};function Vl(fe){return{x:fe.x,y:fe.y,dx:fe.dx,dy:fe.dy}}function ro(fe,Ce){var Ve=fe.x+Ce[3],Qe=fe.y+Ce[0],tt=fe.dx-Ce[1]-Ce[3],it=fe.dy-Ce[0]-Ce[2];return tt<0&&(Ve+=tt/2,tt=0),it<0&&(Qe+=it/2,it=0),{x:Ve,y:Qe,dx:tt,dy:it}}i.random={normal:function(fe,Ce){var Ve=arguments.length;return Ve<2&&(Ce=1),Ve<1&&(fe=0),function(){var Qe,tt,it;do Qe=Math.random()*2-1,tt=Math.random()*2-1,it=Qe*Qe+tt*tt;while(!it||it>1);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;Ve<fe;Ve++)Ce+=Math.random();return Ce}}},i.scale={};function Lo(fe){var Ce=fe[0],Ve=fe[fe.length-1];return Ce<Ve?[Ce,Ve]:[Ve,Ce]}function du(fe){return fe.rangeExtent?fe.rangeExtent():Lo(fe.range())}function yl(fe,Ce,Ve,Qe){var tt=Ve(fe[0],fe[1]),it=Qe(Ce[0],Ce[1]);return function(Rt){return it(tt(Rt))}}function pu(fe,Ce){var Ve=0,Qe=fe.length-1,tt=fe[Ve],it=fe[Qe],Rt;return it<tt&&(Rt=Ve,Ve=Qe,Qe=Rt,Rt=tt,tt=it,it=Rt),fe[Ve]=Ce.floor(tt),fe[Qe]=Ce.ceil(it),fe}function Gu(fe){return fe?{floor:function(Ce){return Math.floor(Ce/fe)*fe},ceil:function(Ce){return Math.ceil(Ce/fe)*fe}}:gh}var gh={floor:O,ceil:O};function sc(fe,Ce,Ve,Qe){var tt=[],it=[],Rt=0,ht=Math.min(fe.length,Ce.length)-1;for(fe[ht]<fe[0]&&(fe=fe.slice().reverse(),Ce=Ce.slice().reverse());++Rt<=ht;)tt.push(Ve(fe[Rt-1],fe[Rt])),it.push(Qe(Ce[Rt-1],Ce[Rt]));return function(Ut){var er=i.bisect(fe,Ut,1,ht)-1;return it[er](tt[er](Ut))}}i.scale.linear=function(){return lc([0,1],[0,1],Ls,!1)};function lc(fe,Ce,Ve,Qe){var tt,it;function Rt(){var Ut=Math.min(fe.length,Ce.length)>2?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(;Lr<Sr;Lr++)for(var en=1;en<Kr;en++)Ut.push(it(Lr)*en);Ut.push(it(Lr))}else for(Ut.push(it(Lr));Lr++<Sr;)for(var en=Kr-1;en>0;en--)Ut.push(it(Lr)*en);for(Lr=0;Ut[Lr]<er;Lr++);for(Sr=Ut.length;Ut[Sr-1]>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;++Ut<er;)Ve.has(tr=ht[Ut])||Ve.set(tr,fe.push(tr));return it[Ce.t].apply(it,Ce.a)},it.range=function(ht){return arguments.length?(Qe=ht,tt=0,Ce={t:"range",a:arguments},it):Qe},it.rangePoints=function(ht,Ut){arguments.length<2&&(Ut=0);var er=ht[0],tr=ht[1],Lr=fe.length<2?(er=(er+tr)/2,0):(tr-er)/(fe.length-1+Ut);return Qe=Rt(er+Lr*Ut/2,Lr),tt=0,Ce={t:"rangePoints",a:arguments},it},it.rangeRoundPoints=function(ht,Ut){arguments.length<2&&(Ut=0);var er=ht[0],tr=ht[1],Lr=fe.length<2?(er=tr=Math.round((er+tr)/2),0):(tr-er)/(fe.length-1+Ut)|0;return Qe=Rt(er+Math.round(Lr*Ut/2+(tr-er-(fe.length-1+Ut)*Lr)/2),Lr),tt=0,Ce={t:"rangeRoundPoints",a:arguments},it},it.rangeBands=function(ht,Ut,er){arguments.length<2&&(Ut=0),arguments.length<3&&(er=Ut);var tr=ht[1]<ht[0],Lr=ht[tr-0],Sr=ht[1-tr],Kr=(Sr-Lr)/(fe.length-Ut+2*er);return Qe=Rt(Lr+Kr*er,Kr),tr&&Qe.reverse(),tt=Kr*(1-Ut),Ce={t:"rangeBands",a:arguments},it},it.rangeRoundBands=function(ht,Ut,er){arguments.length<2&&(Ut=0),arguments.length<3&&(er=Ut);var tr=ht[1]<ht[0],Lr=ht[tr-0],Sr=ht[1-tr],Kr=Math.floor((Sr-Lr)/(fe.length-Ut+2*er));return Qe=Rt(Lr+Math.round((Sr-Lr-(fe.length-Ut)*Kr)/2),Kr),tr&&Qe.reverse(),tt=Math.round(Kr*(1-Ut)),Ce={t:"rangeRoundBands",a:arguments},it},it.rangeBand=function(){return tt},it.rangeExtent=function(){return Lo(Ce.a[0])},it.copy=function(){return es(fe,Ce)},it.domain(fe)}i.scale.category10=function(){return i.scale.ordinal().range(Yu)},i.scale.category20=function(){return i.scale.ordinal().range(Fs)},i.scale.category20b=function(){return i.scale.ordinal().range(_s)},i.scale.category20c=function(){return i.scale.ordinal().range(Lf)};var Yu=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(zt),Fs=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(zt),_s=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(zt),Lf=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(zt);i.scale.quantile=function(){return Hl([],[])};function Hl(fe,Ce){var Ve;function Qe(){var it=0,Rt=Ce.length;for(Ve=[];++it<Rt;)Ve[it-1]=i.quantile(fe,it/Rt);return tt}function tt(it){if(!isNaN(it=+it))return Ce[i.bisect(Ve,it)]}return tt.domain=function(it){return arguments.length?(fe=it.map(g).filter(f).sort(u),Qe()):fe},tt.range=function(it){return arguments.length?(Ce=it,Qe()):Ce},tt.quantiles=function(){return Ve},tt.invertExtent=function(it){return it=Ce.indexOf(it),it<0?[NaN,NaN]:[it>0?Ve[it-1]:fe[0],it<Ve.length?Ve[it]:fe[fe.length-1]]},tt.copy=function(){return Hl(fe,Ce)},Qe()}i.scale.quantize=function(){return si(0,1,[0,1])};function si(fe,Ce,Ve){var Qe,tt;function it(ht){return Ve[Math.max(0,Math.min(tt,Math.floor(Qe*(ht-fe))))]}function Rt(){return Qe=Ve.length/(Ce-fe),tt=Ve.length-1,it}return it.domain=function(ht){return arguments.length?(fe=+ht[0],Ce=+ht[ht.length-1],Rt()):[fe,Ce]},it.range=function(ht){return arguments.length?(Ve=ht,Rt()):Ve},it.invertExtent=function(ht){return ht=Ve.indexOf(ht),ht=ht<0?NaN:ht/Qe+fe,[ht,ht+1/Qe]},it.copy=function(){return si(fe,Ce,Ve)},Rt()}i.scale.threshold=function(){return xl([.5],[0,1])};function xl(fe,Ce){function Ve(Qe){if(Qe<=Qe)return Ce[i.bisect(fe,Qe)]}return Ve.domain=function(Qe){return arguments.length?(fe=Qe,Ve):fe},Ve.range=function(Qe){return arguments.length?(Ce=Qe,Ve):Ce},Ve.invertExtent=function(Qe){return Qe=Ce.indexOf(Qe),[fe[Qe-1],fe[Qe]]},Ve.copy=function(){return xl(fe,Ce)},Ve}i.scale.identity=function(){return Zu([0,1])};function Zu(fe){function Ce(Ve){return+Ve}return Ce.invert=Ce,Ce.domain=Ce.range=function(Ve){return arguments.length?(fe=Ve.map(Ce),Ce):fe},Ce.ticks=function(Ve){return ps(fe,Ve)},Ce.tickFormat=function(Ve,Qe){return d3_scale_linearTickFormat(fe,Ve,Qe)},Ce.copy=function(){return Zu(fe)},Ce}i.svg={};function Xu(){return 0}i.svg.arc=function(){var fe=yh,Ce=Pf,Ve=Xu,Qe=Qs,tt=Gl,it=Rf,Rt=fc;function ht(){var er=Math.max(0,+fe.apply(this,arguments)),tr=Math.max(0,+Ce.apply(this,arguments)),Lr=tt.apply(this,arguments)-at,Sr=it.apply(this,arguments)-at,Kr=Math.abs(Sr-Lr),en=Lr>Sr?0:1;if(tr<er&&(Dr=tr,tr=er,er=Dr),Kr>=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=er<tr^en?0:1;var Na=Dr,_a=Dr;if(Kr<Le){var Ya=Ua==null?[ba,ma]:Kn==null?[Nn,Gn]:gn([Nn,Gn],[Ua,Ea],[Kn,na],[ba,ma]),Mi=Nn-Ya[0],_i=Gn-Ya[1],Bi=Kn-Ya[0],xi=na-Ya[1],fi=1/Math.sin(Math.acos((Mi*Bi+_i*xi)/(Math.sqrt(Mi*Mi+_i*_i)*Math.sqrt(Bi*Bi+xi*xi)))/2),ga=Math.sqrt(Ya[0]*Ya[0]+Ya[1]*Ya[1]);_a=Math.min(Dr,(er-ga)/(fi-1)),Na=Math.min(Dr,(tr-ga)/(fi+1))}if(Kn!=null){var Ma=$s(Ua==null?[ba,ma]:[Ua,Ea],[Nn,Gn],tr,Na,en),bi=$s([Kn,na],[ba,ma],tr,Na,en);Dr===Na?Oa.push("M",Ma[0],"A",Na,",",Na," 0 0,",Ur," ",Ma[1],"A",tr,",",tr," 0 ",1-en^zs(Ma[1][0],Ma[1][1],bi[1][0],bi[1][1]),",",en," ",bi[1],"A",Na,",",Na," 0 0,",Ur," ",bi[0]):Oa.push("M",Ma[0],"A",Na,",",Na," 0 1,",Ur," ",bi[0])}else Oa.push("M",Nn,",",Gn);if(Ua!=null){var Ni=$s([Nn,Gn],[Ua,Ea],er,-_a,en),zo=$s([ba,ma],Kn==null?[Nn,Gn]:[Kn,na],er,-_a,en);Dr===_a?Oa.push("L",zo[0],"A",_a,",",_a," 0 0,",Ur," ",zo[1],"A",er,",",er," 0 ",en^zs(zo[1][0],zo[1][1],Ni[1][0],Ni[1][1]),",",1-en," ",Ni[1],"A",_a,",",_a," 0 0,",Ur," ",Ni[0]):Oa.push("L",zo[0],"A",_a,",",_a," 0 0,",Ur," ",Ni[0])}else Oa.push("L",ba,",",ma)}else Oa.push("M",Nn,",",Gn),Kn!=null&&Oa.push("A",tr,",",tr," 0 ",Ja,",",en," ",Kn,",",na),Oa.push("L",ba,",",ma),Ua!=null&&Oa.push("A",er,",",er," 0 ",li,",",1-en," ",Ua,",",Ea);return Oa.push("Z"),Oa.join("")}function Ut(er,tr){return"M0,"+er+"A"+er+","+er+" 0 1,"+tr+" 0,"+-er+"A"+er+","+er+" 0 1,"+tr+" 0,"+er}return ht.innerRadius=function(er){return arguments.length?(fe=jr(er),ht):fe},ht.outerRadius=function(er){return arguments.length?(Ce=jr(er),ht):Ce},ht.cornerRadius=function(er){return arguments.length?(Ve=jr(er),ht):Ve},ht.padRadius=function(er){return arguments.length?(Qe=er==Qs?Qs:jr(er),ht):Qe},ht.startAngle=function(er){return arguments.length?(tt=jr(er),ht):tt},ht.endAngle=function(er){return arguments.length?(it=jr(er),ht):it},ht.padAngle=function(er){return arguments.length?(Rt=jr(er),ht):Rt},ht.centroid=function(){var er=(+fe.apply(this,arguments)+ +Ce.apply(this,arguments))/2,tr=(+tt.apply(this,arguments)+ +it.apply(this,arguments))/2-at;return[Math.cos(tr)*er,Math.sin(tr)*er]},ht};var Qs="auto";function yh(fe){return fe.innerRadius}function Pf(fe){return fe.outerRadius}function Gl(fe){return fe.startAngle}function Rf(fe){return fe.endAngle}function fc(fe){return fe&&fe.padAngle}function zs(fe,Ce,Ve,Qe){return(fe-Ve)*Ce-(Ce-Qe)*fe>0?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(;++Lr<Sr;)Qe.call(this,Kr=Ut[Lr],Lr)?tr.push([+en.call(this,Kr,Lr),+Dr.call(this,Kr,Lr)]):tr.length&&(Ur(),tr=[]);return tr.length&&Ur(),er.length?er.join(""):null}return ht.x=function(Ut){return arguments.length?(Ce=Ut,ht):Ce},ht.y=function(Ut){return arguments.length?(Ve=Ut,ht):Ve},ht.defined=function(Ut){return arguments.length?(Qe=Ut,ht):Qe},ht.interpolate=function(Ut){return arguments.length?(typeof Ut=="function"?it=tt=Ut:it=(tt=Po.get(Ut)||_o).key,ht):it},ht.tension=function(Ut){return arguments.length?(Rt=Ut,ht):Rt},ht}i.svg.line=function(){return wl(O)};var Po=i.map({linear:_o,"linear-closed":Tl,step:cc,"step-before":Wl,"step-after":ju,basis:Os,"basis-open":mh,"basis-closed":If,bundle:Ku,cardinal:Df,"cardinal-open":hc,"cardinal-closed":ts,monotone:kf});Po.forEach(function(fe,Ce){Ce.key=fe,Ce.closed=/-closed$/.test(fe)});function _o(fe){return fe.length>1?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]];++Ce<Ve;)tt.push("H",(Qe[0]+(Qe=fe[Ce])[0])/2,"V",Qe[1]);return Ve>1&&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]];++Ce<Ve;)tt.push("V",(Qe=fe[Ce])[1],"H",Qe[0]);return tt.join("")}function ju(fe){for(var Ce=0,Ve=fe.length,Qe=fe[0],tt=[Qe[0],",",Qe[1]];++Ce<Ve;)tt.push("H",(Qe=fe[Ce])[0],"V",Qe[1]);return tt.join("")}function hc(fe,Ce){return fe.length<4?_o(fe):fe[1]+qs(fe.slice(1,-1),gu(fe,Ce))}function ts(fe,Ce){return fe.length<3?Tl(fe):fe[0]+qs((fe.push(fe[0]),fe),gu([fe[fe.length-2]].concat(fe,[fe[1]]),Ce))}function Df(fe,Ce){return fe.length<3?_o(fe):fe[0]+qs(fe,gu(fe,Ce))}function qs(fe,Ce){if(Ce.length<1||fe.length!=Ce.length&&fe.length!=Ce.length+2)return _o(fe);var Ve=fe.length!=Ce.length,Qe="",tt=fe[0],it=fe[1],Rt=Ce[0],ht=Rt,Ut=1;if(Ve&&(Qe+="Q"+(it[0]-Rt[0]*2/3)+","+(it[1]-Rt[1]*2/3)+","+it[0]+","+it[1],tt=fe[1],Ut=2),Ce.length>1){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;er<Ce.length;er++,Ut++)it=fe[Ut],ht=Ce[er],Qe+="S"+(it[0]-ht[0])+","+(it[1]-ht[1])+","+it[0]+","+it[1]}if(Ve){var tr=fe[Ut];Qe+="Q"+(it[0]+ht[0]*2/3)+","+(it[1]+ht[1]*2/3)+","+tr[0]+","+tr[1]}return Qe}function gu(fe,Ce){for(var Ve=[],Qe=(1-Ce)/2,tt,it=fe[0],Rt=fe[1],ht=1,Ut=fe.length;++ht<Ut;)tt=it,it=Rt,Rt=fe[ht],Ve.push([Qe*(Rt[0]-tt[0]),Qe*(Rt[1]-tt[1])]);return Ve}function Os(fe){if(fe.length<3)return _o(fe);var Ce=1,Ve=fe.length,Qe=fe[0],tt=Qe[0],it=Qe[1],Rt=[tt,tt,tt,(Qe=fe[1])[0]],ht=[it,it,it,Qe[1]],Ut=[tt,",",it,"L",vo(gs,Rt),",",vo(gs,ht)];for(fe.push(fe[Ve-1]);++Ce<=Ve;)Qe=fe[Ce],Rt.shift(),Rt.push(Qe[0]),ht.shift(),ht.push(Qe[1]),mu(Ut,Rt,ht);return fe.pop(),Ut.push("L",Qe),Ut.join("")}function mh(fe){if(fe.length<4)return _o(fe);for(var Ce=[],Ve=-1,Qe=fe.length,tt,it=[0],Rt=[0];++Ve<3;)tt=fe[Ve],it.push(tt[0]),Rt.push(tt[1]);for(Ce.push(vo(gs,it)+","+vo(gs,Rt)),--Ve;++Ve<Qe;)tt=fe[Ve],it.shift(),it.push(tt[0]),Rt.shift(),Rt.push(tt[1]),mu(Ce,it,Rt);return Ce.join("")}function If(fe){for(var Ce,Ve=-1,Qe=fe.length,tt=Qe+4,it,Rt=[],ht=[];++Ve<4;)it=fe[Ve%Qe],Rt.push(it[0]),ht.push(it[1]);for(Ce=[vo(gs,Rt),",",vo(gs,ht)],--Ve;++Ve<tt;)it=fe[Ve%Qe],Rt.shift(),Rt.push(it[0]),ht.shift(),ht.push(it[1]),mu(Ce,Rt,ht);return Ce.join("")}function Ku(fe,Ce){var Ve=fe.length-1;if(Ve)for(var Qe=fe[0][0],tt=fe[0][1],it=fe[Ve][0]-Qe,Rt=fe[Ve][1]-tt,ht=-1,Ut,er;++ht<=Ve;)Ut=fe[ht],er=ht/Ve,Ut[0]=Ce*Ut[0]+(1-Ce)*(Qe+er*it),Ut[1]=Ce*Ut[1]+(1-Ce)*(tt+er*Rt);return Os(fe)}function vo(fe,Ce){return fe[0]*Ce[0]+fe[1]*Ce[1]+fe[2]*Ce[2]+fe[3]*Ce[3]}var vc=[0,2/3,1/3,0],yu=[0,1/3,2/3,0],gs=[0,1/6,2/3,1/6];function mu(fe,Ce,Ve){fe.push("C",vo(vc,Ce),",",vo(vc,Ve),",",vo(yu,Ce),",",vo(yu,Ve),",",vo(gs,Ce),",",vo(gs,Ve))}function el(fe,Ce){return(Ce[1]-fe[1])/(Ce[0]-fe[0])}function Ju(fe){for(var Ce=0,Ve=fe.length-1,Qe=[],tt=fe[0],it=fe[1],Rt=Qe[0]=el(tt,it);++Ce<Ve;)Qe[Ce]=(Rt+(Rt=el(tt=it,it=fe[Ce+1])))/2;return Qe[Ce]=Rt,Qe}function dc(fe){for(var Ce=[],Ve,Qe,tt,it,Rt=Ju(fe),ht=-1,Ut=fe.length-1;++ht<Ut;)Ve=el(fe[ht],fe[ht+1]),d(Ve)<se?Rt[ht]=Rt[ht+1]=0:(Qe=Rt[ht]/Ve,tt=Rt[ht+1]/Ve,it=Qe*Qe+tt*tt,it>9&&(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;++Ve<Qe;)Ce=fe[Ve],tt=Ce[0],it=Ce[1]-at,Ce[0]=tt*Math.cos(it),Ce[1]=tt*Math.sin(it);return fe}function Al(fe){var Ce=sa,Ve=sa,Qe=0,tt=ta,it=bl,Rt=_o,ht=Rt.key,Ut=Rt,er="L",tr=.7;function Lr(Sr){var Kr=[],en=[],Dr=[],Ur=-1,Zr=Sr.length,tn,ln=jr(Ce),Xr=jr(Qe),Nn=Ce===Ve?function(){return Kn}:jr(Ve),Gn=Qe===tt?function(){return na}:jr(tt),Kn,na;function ba(){Kr.push("M",Rt(fe(Dr),tr),er,Ut(fe(en.reverse()),tr),"Z")}for(;++Ur<Zr;)it.call(this,tn=Sr[Ur],Ur)?(en.push([Kn=+ln.call(this,tn,Ur),na=+Xr.call(this,tn,Ur)]),Dr.push([+Nn.call(this,tn,Ur),+Gn.call(this,tn,Ur)])):en.length&&(ba(),en=[],Dr=[]);return en.length&&ba(),Kr.length?Kr.join(""):null}return Lr.x=function(Sr){return arguments.length?(Ce=Ve=Sr,Lr):Ve},Lr.x0=function(Sr){return arguments.length?(Ce=Sr,Lr):Ce},Lr.x1=function(Sr){return arguments.length?(Ve=Sr,Lr):Ve},Lr.y=function(Sr){return arguments.length?(Qe=tt=Sr,Lr):tt},Lr.y0=function(Sr){return arguments.length?(Qe=Sr,Lr):Qe},Lr.y1=function(Sr){return arguments.length?(tt=Sr,Lr):tt},Lr.defined=function(Sr){return arguments.length?(it=Sr,Lr):it},Lr.interpolate=function(Sr){return arguments.length?(typeof Sr=="function"?ht=Rt=Sr:ht=(Rt=Po.get(Sr)||_o).key,Ut=Rt.reverse||Rt,er=Rt.closed?"M":"L",Lr):ht},Lr.tension=function(Sr){return arguments.length?(tr=Sr,Lr):tr},Lr}Wl.reverse=ju,ju.reverse=Wl,i.svg.area=function(){return Al(O)},i.svg.area.radial=function(){var fe=Al(Ff);return fe.radius=fe.x,delete fe.x,fe.innerRadius=fe.x0,delete fe.x0,fe.outerRadius=fe.x1,delete fe.x1,fe.angle=fe.y,delete fe.y,fe.startAngle=fe.y0,delete fe.y0,fe.endAngle=fe.y1,delete fe.y1,fe};function Qu(fe){return fe.source}function xu(fe){return fe.target}i.svg.chord=function(){var fe=Qu,Ce=xu,Ve=pc,Qe=Gl,tt=Rf;function it(tr,Lr){var Sr=Rt(this,fe,tr,Lr),Kr=Rt(this,Ce,tr,Lr);return"M"+Sr.p0+Ut(Sr.r,Sr.p1,Sr.a1-Sr.a0)+(ht(Sr,Kr)?er(Sr.r,Sr.p1,Sr.r,Sr.p0):er(Sr.r,Sr.p1,Kr.r,Kr.p0)+Ut(Kr.r,Kr.p1,Kr.a1-Kr.a0)+er(Kr.r,Kr.p1,Sr.r,Sr.p0))+"Z"}function Rt(tr,Lr,Sr,Kr){var en=Lr.call(tr,Sr,Kr),Dr=Ve.call(tr,en,Kr),Ur=Qe.call(tr,en,Kr)-at,Zr=tt.call(tr,en,Kr)-at;return{r:Dr,a0:Ur,a1:Zr,p0:[Dr*Math.cos(Ur),Dr*Math.sin(Ur)],p1:[Dr*Math.cos(Zr),Dr*Math.sin(Zr)]}}function ht(tr,Lr){return tr.a0==Lr.a0&&tr.a1==Lr.a1}function Ut(tr,Lr,Sr){return"A"+tr+","+tr+" 0 "+ +(Sr>Le)+",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;++ht<Ut;){Qe.push(tt=[]);for(var er=this[ht],tr=-1,Lr=er.length;++tr<Lr;)(it=er[tr])&&Rn(it,tr,Ve,Ce,Rt),tt.push(it)}return gr(Qe,Ve,Ce)},$.interrupt=function(fe){return this.each(fe==null?Ot:cr(bn(fe)))};var Ot=cr(bn());function cr(fe){return function(){var Ce,Ve,Qe;(Ce=this[fe])&&(Qe=Ce[Ve=Ce.active])&&(Qe.timer.c=null,Qe.timer.t=NaN,--Ce.count?delete Ce[Ve]:delete this[fe],Ce.active+=.5,Qe.event&&Qe.event.interrupt.call(this,this.__data__,Qe.index))}}function gr(fe,Ce,Ve){return j(fe,ar),fe.namespace=Ce,fe.id=Ve,fe}var ar=[],Tr=0,Pr,Yr;ar.call=$.call,ar.empty=$.empty,ar.node=$.node,ar.size=$.size,i.transition=function(fe,Ce){return fe&&fe.transition?Pr?fe.transition(Ce):fe:i.selection().transition(fe)},i.transition.prototype=ar,ar.select=function(fe){var Ce=this.id,Ve=this.namespace,Qe=[],tt,it,Rt;fe=le(fe);for(var ht=-1,Ut=this.length;++ht<Ut;){Qe.push(tt=[]);for(var er=this[ht],tr=-1,Lr=er.length;++tr<Lr;)(Rt=er[tr])&&(it=fe.call(Rt,Rt.__data__,tr,ht))?("__data__"in Rt&&(it.__data__=Rt.__data__),Rn(it,tr,Ve,Ce,Rt[Ve][Ce]),tt.push(it)):tt.push(null)}return gr(Qe,Ve,Ce)},ar.selectAll=function(fe){var Ce=this.id,Ve=this.namespace,Qe=[],tt,it,Rt,ht,Ut;fe=ie(fe);for(var er=-1,tr=this.length;++er<tr;)for(var Lr=this[er],Sr=-1,Kr=Lr.length;++Sr<Kr;)if(Rt=Lr[Sr]){Ut=Rt[Ve][Ce],it=fe.call(Rt,Rt.__data__,Sr,er),Qe.push(tt=[]);for(var en=-1,Dr=it.length;++en<Dr;)(ht=it[en])&&Rn(ht,en,Ve,Ce,Ut),tt.push(ht)}return gr(Qe,Ve,Ce)},ar.filter=function(fe){var Ce=[],Ve,Qe,tt;typeof fe!="function"&&(fe=nt(fe));for(var it=0,Rt=this.length;it<Rt;it++){Ce.push(Ve=[]);for(var Qe=this[it],ht=0,Ut=Qe.length;ht<Ut;ht++)(tt=Qe[ht])&&fe.call(tt,tt.__data__,ht,it)&&Ve.push(tt)}return gr(Ce,this.namespace,this.id)},ar.tween=function(fe,Ce){var Ve=this.id,Qe=this.namespace;return arguments.length<2?this.node()[Qe][Ve].tween.get(fe):$e(this,Ce==null?function(tt){tt[Qe][Ve].tween.remove(fe)}:function(tt){tt[Qe][Ve].tween.set(fe,Ce)})};function Jr(fe,Ce,Ve,Qe){var tt=fe.id,it=fe.namespace;return $e(fe,typeof Ve=="function"?function(Rt,ht,Ut){Rt[it][tt].tween.set(Ce,Qe(Ve.call(Rt,Rt.__data__,ht,Ut)))}:(Ve=Qe(Ve),function(Rt){Rt[it][tt].tween.set(Ce,Ve)}))}ar.attr=function(fe,Ce){if(arguments.length<2){for(Ce in fe)this.attr(Ce,fe[Ce]);return this}var Ve=fe=="transform"?dl:Ls,Qe=i.ns.qualify(fe);function tt(){this.removeAttribute(Qe)}function it(){this.removeAttributeNS(Qe.space,Qe.local)}function Rt(Ut){return Ut==null?tt:(Ut+="",function(){var er=this.getAttribute(Qe),tr;return er!==Ut&&(tr=Ve(er,Ut),function(Lr){this.setAttribute(Qe,tr(Lr))})})}function ht(Ut){return Ut==null?it:(Ut+="",function(){var er=this.getAttributeNS(Qe.space,Qe.local),tr;return er!==Ut&&(tr=Ve(er,Ut),function(Lr){this.setAttributeNS(Qe.space,Qe.local,tr(Lr))})})}return Jr(this,"attr."+fe,Ce,Qe.local?ht:Rt)},ar.attrTween=function(fe,Ce){var Ve=i.ns.qualify(fe);function Qe(it,Rt){var ht=Ce.call(this,it,Rt,this.getAttribute(Ve));return ht&&function(Ut){this.setAttribute(Ve,ht(Ut))}}function tt(it,Rt){var ht=Ce.call(this,it,Rt,this.getAttributeNS(Ve.space,Ve.local));return ht&&function(Ut){this.setAttributeNS(Ve.space,Ve.local,ht(Ut))}}return this.tween("attr."+fe,Ve.local?tt:Qe)},ar.style=function(fe,Ce,Ve){var Qe=arguments.length;if(Qe<3){if(typeof fe!="string"){Qe<2&&(Ce="");for(Ve in fe)this.style(Ve,fe[Ve],Ce);return this}Ve=""}function tt(){this.style.removeProperty(fe)}function it(Rt){return Rt==null?tt:(Rt+="",function(){var ht=t(this).getComputedStyle(this,null).getPropertyValue(fe),Ut;return ht!==Rt&&(Ut=Ls(ht,Rt),function(er){this.style.setProperty(fe,Ut(er),Ve)})})}return Jr(this,"style."+fe,Ce,it)},ar.styleTween=function(fe,Ce,Ve){arguments.length<3&&(Ve="");function Qe(tt,it){var Rt=Ce.call(this,tt,it,t(this).getComputedStyle(this,null).getPropertyValue(fe));return Rt&&function(ht){this.style.setProperty(fe,Rt(ht),Ve)}}return this.tween("style."+fe,Qe)},ar.text=function(fe){return Jr(this,"text",fe,mn)};function mn(fe){return fe==null&&(fe=""),function(){this.textContent=fe}}ar.remove=function(){var fe=this.namespace;return this.each("end.transition",function(){var Ce;this[fe].count<2&&(Ce=this.parentNode)&&Ce.removeChild(this)})},ar.ease=function(fe){var Ce=this.id,Ve=this.namespace;return arguments.length<1?this.node()[Ve][Ce].ease:(typeof fe!="function"&&(fe=i.ease.apply(i,arguments)),$e(this,function(Qe){Qe[Ve][Ce].ease=fe}))},ar.delay=function(fe){var Ce=this.id,Ve=this.namespace;return arguments.length<1?this.node()[Ve][Ce].delay:$e(this,typeof fe=="function"?function(Qe,tt,it){Qe[Ve][Ce].delay=+fe.call(Qe,Qe.__data__,tt,it)}:(fe=+fe,function(Qe){Qe[Ve][Ce].delay=fe}))},ar.duration=function(fe){var Ce=this.id,Ve=this.namespace;return arguments.length<1?this.node()[Ve][Ce].duration:$e(this,typeof fe=="function"?function(Qe,tt,it){Qe[Ve][Ce].duration=Math.max(1,fe.call(Qe,Qe.__data__,tt,it))}:(fe=Math.max(1,fe),function(Qe){Qe[Ve][Ce].duration=fe}))},ar.each=function(fe,Ce){var Ve=this.id,Qe=this.namespace;if(arguments.length<2){var tt=Yr,it=Pr;try{Pr=Ve,$e(this,function(Rt,ht,Ut){Yr=Rt[Qe][Ve],fe.call(Rt,Rt.__data__,ht,Ut)})}finally{Yr=tt,Pr=it}}else $e(this,function(Rt){var ht=Rt[Qe][Ve];(ht.event||(ht.event=i.dispatch("start","end","interrupt"))).on(fe,Ce)});return this},ar.transition=function(){for(var fe=this.id,Ce=++Tr,Ve=this.namespace,Qe=[],tt,it,Rt,ht,Ut=0,er=this.length;Ut<er;Ut++){Qe.push(tt=[]);for(var it=this[Ut],tr=0,Lr=it.length;tr<Lr;tr++)(Rt=it[tr])&&(ht=Rt[Ve][fe],Rn(Rt,tr,Ve,Ce,{time:ht.time,ease:ht.ease,delay:ht.delay+ht.duration,duration:ht.duration})),tt.push(Rt)}return gr(Qe,Ve,Ce)};function bn(fe){return fe==null?"__transition__":"__transition_"+fe+"__"}function Rn(fe,Ce,Ve,Qe,tt){var it=fe[Ve]||(fe[Ve]={active:0,count:0}),Rt=it[Qe],ht,Ut,er,tr,Lr;function Sr(Dr){var Ur=Rt.delay;if(Ut.t=Ur+ht,Ur<=Dr)return Kr(Dr-Ur);Ut.c=Kr}function Kr(Dr){var Ur=it.active,Zr=it[Ur];Zr&&(Zr.timer.c=null,Zr.timer.t=NaN,--it.count,delete it[Ur],Zr.event&&Zr.event.interrupt.call(fe,fe.__data__,Zr.index));for(var tn in it)if(+tn<Qe){var ln=it[tn];ln.timer.c=null,ln.timer.t=NaN,--it.count,delete it[tn]}Ut.c=en,Tn(function(){return Ut.c&&en(Dr||1)&&(Ut.c=null,Ut.t=NaN),1},0,ht),it.active=Qe,Rt.event&&Rt.event.start.call(fe,fe.__data__,Ce),Lr=[],Rt.tween.forEach(function(Xr,Nn){(Nn=Nn.call(fe,fe.__data__,Ce))&&Lr.push(Nn)}),tr=Rt.ease,er=Rt.duration}function en(Dr){for(var Ur=Dr/er,Zr=tr(Ur),tn=Lr.length;tn>0;)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]<na[0])],ba[1]=tt[+(_a[1]<na[1])]):na=null),Xr&&Bn(_a,Ce,0)&&(Sr(tn),Ya=!0),Nn&&Bn(_a,Ve,1)&&(Kr(tn),Ya=!0),Ya&&(Lr(tn),Zr({type:"brush",mode:Gn?"move":"resize"}))}function Bn(_a,Ya,Mi){var _i=du(Ya),Bi=_i[0],xi=_i[1],fi=ba[Mi],ga=Mi?tt:Qe,Ma=ga[1]-ga[0],bi,Ni;if(Gn&&(Bi-=fi,xi-=Ma+fi),bi=(Mi?Ut:ht)?Math.max(Bi,Math.min(xi,_a[Mi])):_a[Mi],Gn?Ni=(bi+=fi)+Ma:(na&&(fi=Math.max(Bi,Math.min(xi,2*na[Mi]-bi))),fi<bi?(Ni=bi,bi=fi):Ni=fi),ga[0]!=bi||ga[1]!=Ni)return Mi?Rt=null:it=null,ga[0]=bi,ga[1]=Ni,!0}function Na(){li(),tn.style("pointer-events","all").selectAll(".resize").style("display",tr.empty()?"none":null),i.select("body").style("cursor",null),Ua.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),Kn(),Zr({type:"brushend"})}}return tr.x=function(Dr){return arguments.length?(Ce=Dr,er=ai[!Ce<<1|!Ve],tr):Ce},tr.y=function(Dr){return arguments.length?(Ve=Dr,er=ai[!Ce<<1|!Ve],tr):Ve},tr.clamp=function(Dr){return arguments.length?(Ce&&Ve?(ht=!!Dr[0],Ut=!!Dr[1]):Ce?ht=!!Dr:Ve&&(Ut=!!Dr),tr):Ce&&Ve?[ht,Ut]:Ce?ht:Ve?Ut:null},tr.extent=function(Dr){var Ur,Zr,tn,ln,Xr;return arguments.length?(Ce&&(Ur=Dr[0],Zr=Dr[1],Ve&&(Ur=Ur[0],Zr=Zr[0]),it=[Ur,Zr],Ce.invert&&(Ur=Ce(Ur),Zr=Ce(Zr)),Zr<Ur&&(Xr=Ur,Ur=Zr,Zr=Xr),(Ur!=Qe[0]||Zr!=Qe[1])&&(Qe=[Ur,Zr])),Ve&&(tn=Dr[0],ln=Dr[1],Ce&&(tn=tn[1],ln=ln[1]),Rt=[tn,ln],Ve.invert&&(tn=Ve(tn),ln=Ve(ln)),ln<tn&&(Xr=tn,tn=ln,ln=Xr),(tn!=tt[0]||ln!=tt[1])&&(tt=[tn,ln])),tr):(Ce&&(it?(Ur=it[0],Zr=it[1]):(Ur=Qe[0],Zr=Qe[1],Ce.invert&&(Ur=Ce.invert(Ur),Zr=Ce.invert(Zr)),Zr<Ur&&(Xr=Ur,Ur=Zr,Zr=Xr))),Ve&&(Rt?(tn=Rt[0],ln=Rt[1]):(tn=tt[0],ln=tt[1],Ve.invert&&(tn=Ve.invert(tn),ln=Ve.invert(ln)),ln<tn&&(Xr=tn,tn=ln,ln=Xr))),Ce&&Ve?[[Ur,tn],[Zr,ln]]:Ce?[Ur,Zr]:Ve&&[tn,ln])},tr.clear=function(){return tr.empty()||(Qe=[0,0],tt=[0,0],it=Rt=null),tr},tr.empty=function(){return!!Ce&&Qe[0]==Qe[1]||!!Ve&&tt[0]==tt[1]},i.rebind(tr,fe,"on")};var ka={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},ai=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]];i.text=In(function(fe){return fe.responseText}),i.json=function(fe,Ce){return Dn(fe,"application/json",Di,Ce)};function Di(fe){return JSON.parse(fe.responseText)}i.html=function(fe,Ce){return Dn(fe,"text/html",di,Ce)};function di(fe){var Ce=v.createRange();return Ce.selectNode(v.body),Ce.createContextualFragment(fe.responseText)}i.xml=In(function(fe){return fe.responseXML}),m=i,P=typeof m=="function"?m.call(V,e,V,G):m,P!==void 0&&(G.exports=P)}).apply(self)},88294:function(G,V,e){G.exports=e(62849)},62849:function(G,V,e){var m=e(91358),P=e(53435),i=e(18863),L=e(21527),A=e(71299),v=e(46775),p=e(30120),t=e(64941),r=e(90660),s=e(27084),n=1073741824;G.exports=function(u,g){g||(g={}),u=p(u,"float64"),g=A(g,{bounds:"range bounds dataBox databox",maxDepth:"depth maxDepth maxdepth level maxLevel maxlevel levels",dtype:"type dtype format out dst output destination"});var f=v(g.maxDepth,255),w=v(g.bounds,L(u,2));w[0]===w[2]&&w[2]++,w[1]===w[3]&&w[3]++;var h=l(u,w),o=u.length>>>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;M<o;++M)d[M]=M;var T=[],C=[],x=[],S=[];B(0,0,1,d,0,1);for(var b=0,a=0;a<T.length;a++){var E=T[a];if(d.set)d.set(E,b);else for(var y=0,z=E.length;y<z;y++)d[y+b]=E[y];var I=b+T[a].length;S[a]=[b,I],b=I}return d.range=k,d;function B(_,U,Y,J,te,ae){if(!J.length)return null;var ce=T[te]||(T[te]=[]),Q=x[te]||(x[te]=[]),Z=C[te]||(C[te]=[]),j=ce.length;if(te++,te>f||ae>n){for(var K=0;K<J.length;K++)ce.push(J[K]),Q.push(ae),Z.push(null,null,null,null);return j}if(ce.push(J[0]),Q.push(ae),J.length<=1)return Z.push(null,null,null,null),j;for(var ee=Y*.5,oe=_+ee,q=U+ee,$=[],le=[],ie=[],he=[],me=1,Me=J.length;me<Me;me++){var Te=J[me],Oe=h[Te*2],Ne=h[Te*2+1];Oe<oe?Ne<q?$.push(Te):le.push(Te):Ne<q?ie.push(Te):he.push(Te)}return ae<<=2,Z.push(B(_,U,ee,$,te,ae),B(_,q,ee,le,te,ae+1),B(oe,U,ee,ie,te,ae+2),B(oe,q,ee,he,te,ae+3)),j}function k(){for(var _=[],U=arguments.length;U--;)_[U]=arguments[U];var Y;if(t(_[_.length-1])){var J=_.pop();!_.length&&(J.x!=null||J.l!=null||J.left!=null)&&(_=[J],Y={}),Y=A(J,{level:"level maxLevel",d:"d diam diameter r radius px pxSize pixel pixelSize maxD size minSize",lod:"lod details ranges offsets"})}else Y={};_.length||(_=w);var te=i.apply(void 0,_),ae=[Math.min(te.x,te.x+te.width),Math.min(te.y,te.y+te.height),Math.max(te.x,te.x+te.width),Math.max(te.y,te.y+te.height)],ce=ae[0],Q=ae[1],Z=ae[2],j=ae[3],K=l([ce,Q,Z,j],w),ee=K[0],oe=K[1],q=K[2],$=K[3],le=v(Y.level,T.length);if(Y.d!=null){var ie;typeof Y.d=="number"?ie=[Y.d,Y.d]:Y.d.length&&(ie=Y.d),le=Math.min(Math.max(Math.ceil(-s(Math.abs(ie[0])/(w[2]-w[0]))),Math.ceil(-s(Math.abs(ie[1])/(w[3]-w[1])))),le)}if(le=Math.min(le,T.length),Y.lod)return O(ee,oe,q,$,le);var he=[];me(0,0,1,0,0,1);function me(Te,Oe,Ne,Ee,xe,Se){if(!(xe===null||Se===null)){var Ue=Te+Ne,He=Oe+Ne;if(!(ee>Ue||oe>He||q<Te||$<Oe)&&!(Ee>=le)&&xe!==Se){var Fe=T[Ee];Se===void 0&&(Se=Fe.length);for(var Ge=xe;Ge<Se;Ge++){var nt=Fe[Ge],qe=u[nt*2],$e=u[nt*2+1];qe>=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;ce<te;ce++){var Q=x[ce],Z=S[ce][0],j=N(_,U,ce),K=N(Y,J,ce),ee=m.ge(Q,j),oe=m.gt(Q,K,ee,Q.length-1);ae[ce]=[ee+Z,oe+Z]}return ae}function N(_,U,Y){for(var J=1,te=.5,ae=.5,ce=.5,Q=0;Q<Y;Q++)J<<=2,J+=_<te?U<ae?0:1:U<ae?2:3,ce*=.5,te+=_<te?-ce:ce,ae+=U<ae?-ce:ce;return J}};function l(c,u){for(var g=u[0],f=u[1],w=u[2],h=u[3],o=1/(w-g),d=1/(h-f),M=new Array(c.length),T=0,C=c.length/2;T<C;T++)M[2*T]=P((c[2*T]-g)*o,0,1),M[2*T+1]=P((c[2*T+1]-f)*d,0,1);return M}},30774:function(G,V,e){Object.defineProperty(V,"__esModule",{value:!0});var m=e(60302),P=6378137;function i(t){return m.geomReduce(t,function(r,s){return r+L(s)},0)}V.default=i;function L(t){var r=0,s;switch(t.type){case"Polygon":return A(t.coordinates);case"MultiPolygon":for(s=0;s<t.coordinates.length;s++)r+=A(t.coordinates[s]);return r;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0}return 0}function A(t){var r=0;if(t&&t.length>0){r+=Math.abs(v(t[0]));for(var s=1;s<t.length;s++)r-=Math.abs(v(t[s]))}return r}function v(t){var r,s,n,l,c,u,g,f=0,w=t.length;if(w>2){for(g=0;g<w;g++)g===w-2?(l=w-2,c=w-1,u=0):g===w-1?(l=w-1,c=0,u=1):(l=g,c=g+1,u=g+2),r=t[l],s=t[c],n=t[u],f+=(p(n[0])-p(r[0]))*Math.sin(p(s[1]));f=f*P*P/2}return f}function p(t){return t*Math.PI/180}},23132:function(G,V){Object.defineProperty(V,"__esModule",{value:!0}),V.earthRadius=63710088e-1,V.factors={centimeters:V.earthRadius*100,centimetres:V.earthRadius*100,degrees:V.earthRadius/111325,feet:V.earthRadius*3.28084,inches:V.earthRadius*39.37,kilometers:V.earthRadius/1e3,kilometres:V.earthRadius/1e3,meters:V.earthRadius,metres:V.earthRadius,miles:V.earthRadius/1609.344,millimeters:V.earthRadius*1e3,millimetres:V.earthRadius*1e3,nauticalmiles:V.earthRadius/1852,radians:1,yards:V.earthRadius*1.0936},V.unitsFactors={centimeters:100,centimetres:100,degrees:8982708286548395e-21,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:.0006213711922373339,millimeters:1e3,millimetres:1e3,nauticalmiles:.0005399568034557236,radians:1/V.earthRadius,yards:1.0936133},V.areaFactors={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046};function e(b,a,E){E===void 0&&(E={});var y={type:"Feature"};return(E.id===0||E.id)&&(y.id=E.id),E.bbox&&(y.bbox=E.bbox),y.properties=a||{},y.geometry=b,y}V.feature=e;function m(b,a,E){switch(b){case"Point":return P(a).geometry;case"LineString":return v(a).geometry;case"Polygon":return L(a).geometry;case"MultiPoint":return s(a).geometry;case"MultiLineString":return r(a).geometry;case"MultiPolygon":return n(a).geometry;default:throw new Error(b+" is invalid")}}V.geometry=m;function P(b,a,E){if(E===void 0&&(E={}),!b)throw new Error("coordinates is required");if(!Array.isArray(b))throw new Error("coordinates must be an Array");if(b.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!T(b[0])||!T(b[1]))throw new Error("coordinates must contain numbers");var y={type:"Point",coordinates:b};return e(y,a,E)}V.point=P;function i(b,a,E){return E===void 0&&(E={}),t(b.map(function(y){return P(y,a)}),E)}V.points=i;function L(b,a,E){E===void 0&&(E={});for(var y=0,z=b;y<z.length;y++){var I=z[y];if(I.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var B=0;B<I[I.length-1].length;B++)if(I[I.length-1][B]!==I[0][B])throw new Error("First and last Position are not equivalent.")}var k={type:"Polygon",coordinates:b};return e(k,a,E)}V.polygon=L;function A(b,a,E){return E===void 0&&(E={}),t(b.map(function(y){return L(y,a)}),E)}V.polygons=A;function v(b,a,E){if(E===void 0&&(E={}),b.length<2)throw new Error("coordinates must be an array of two or more positions");var y={type:"LineString",coordinates:b};return e(y,a,E)}V.lineString=v;function p(b,a,E){return E===void 0&&(E={}),t(b.map(function(y){return v(y,a)}),E)}V.lineStrings=p;function t(b,a){a===void 0&&(a={});var E={type:"FeatureCollection"};return a.id&&(E.id=a.id),a.bbox&&(E.bbox=a.bbox),E.features=b,E}V.featureCollection=t;function r(b,a,E){E===void 0&&(E={});var y={type:"MultiLineString",coordinates:b};return e(y,a,E)}V.multiLineString=r;function s(b,a,E){E===void 0&&(E={});var y={type:"MultiPoint",coordinates:b};return e(y,a,E)}V.multiPoint=s;function n(b,a,E){E===void 0&&(E={});var y={type:"MultiPolygon",coordinates:b};return e(y,a,E)}V.multiPolygon=n;function l(b,a,E){E===void 0&&(E={});var y={type:"GeometryCollection",geometries:b};return e(y,a,E)}V.geometryCollection=l;function c(b,a){if(a===void 0&&(a=0),a&&!(a>=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;_<N;_++){E=k?o.features[_].geometry:O?o.geometry:o,I=E?E.type==="GeometryCollection":!1,b=I?E.geometries.length:1;for(var U=0;U<b;U++){var Y=0,J=0;if(S=I?E.geometries[U]:E,S!==null){a=S.coordinates;var te=S.type;switch(y=M&&(te==="Polygon"||te==="MultiPolygon")?1:0,te){case null:break;case"Point":if(d(a,z,_,Y,J)===!1)return!1;z++,Y++;break;case"LineString":case"MultiPoint":for(T=0;T<a.length;T++){if(d(a[T],z,_,Y,J)===!1)return!1;z++,te==="MultiPoint"&&Y++}te==="LineString"&&Y++;break;case"Polygon":case"MultiLineString":for(T=0;T<a.length;T++){for(C=0;C<a[T].length-y;C++){if(d(a[T][C],z,_,Y,J)===!1)return!1;z++}te==="MultiLineString"&&Y++,te==="Polygon"&&J++}te==="Polygon"&&Y++;break;case"MultiPolygon":for(T=0;T<a.length;T++){for(J=0,C=0;C<a[T].length;C++){for(x=0;x<a[T][C].length-y;x++){if(d(a[T][C][x],z,_,Y,J)===!1)return!1;z++}J++}Y++}break;case"GeometryCollection":for(T=0;T<S.geometries.length;T++)if(P(S.geometries[T],d,M)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function i(o,d,M,T){var C=M;return P(o,function(x,S,b,a,E){S===0&&M===void 0?C=x:C=d(C,x,S,b,a,E)},T),C}function L(o,d){var M;switch(o.type){case"FeatureCollection":for(M=0;M<o.features.length&&d(o.features[M].properties,M)!==!1;M++);break;case"Feature":d(o.properties,0);break}}function A(o,d,M){var T=M;return L(o,function(C,x){x===0&&M===void 0?T=C:T=d(T,C,x)}),T}function v(o,d){if(o.type==="Feature")d(o,0);else if(o.type==="FeatureCollection")for(var M=0;M<o.features.length&&d(o.features[M],M)!==!1;M++);}function p(o,d,M){var T=M;return v(o,function(C,x){x===0&&M===void 0?T=C:T=d(T,C,x)}),T}function t(o){var d=[];return P(o,function(M){d.push(M)}),d}function r(o,d){var M,T,C,x,S,b,a,E,y,z,I=0,B=o.type==="FeatureCollection",k=o.type==="Feature",O=B?o.features.length:1;for(M=0;M<O;M++){for(b=B?o.features[M].geometry:k?o.geometry:o,E=B?o.features[M].properties:k?o.properties:{},y=B?o.features[M].bbox:k?o.bbox:void 0,z=B?o.features[M].id:k?o.id:void 0,a=b?b.type==="GeometryCollection":!1,S=a?b.geometries.length:1,C=0;C<S;C++){if(x=a?b.geometries[C]:b,x===null){if(d(null,I,E,y,z)===!1)return!1;continue}switch(x.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(d(x,I,E,y,z)===!1)return!1;break}case"GeometryCollection":{for(T=0;T<x.geometries.length;T++)if(d(x.geometries[T],I,E,y,z)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}I++}}function s(o,d,M){var T=M;return r(o,function(C,x,S,b,a){x===0&&M===void 0?T=C:T=d(T,C,x,S,b,a)}),T}function n(o,d){r(o,function(M,T,C,x,S){var b=M===null?null:M.type;switch(b){case null:case"Point":case"LineString":case"Polygon":return d(m.feature(M,C,{bbox:x,id:S}),T,0)===!1?!1:void 0}var a;switch(b){case"MultiPoint":a="Point";break;case"MultiLineString":a="LineString";break;case"MultiPolygon":a="Polygon";break}for(var E=0;E<M.coordinates.length;E++){var y=M.coordinates[E],z={type:a,coordinates:y};if(d(m.feature(z,C),T,E)===!1)return!1}})}function l(o,d,M){var T=M;return n(o,function(C,x,S){x===0&&S===0&&M===void 0?T=C:T=d(T,C,x,S)}),T}function c(o,d){n(o,function(M,T,C){var x=0;if(M.geometry){var S=M.geometry.type;if(!(S==="Point"||S==="MultiPoint")){var b,a=0,E=0,y=0;if(P(M,function(z,I,B,k,O){if(b===void 0||T>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<S.length;b++)if(d(m.lineString(S[b],M.properties),T,C,b)===!1)return!1;break}}})}function f(o,d,M){var T=M;return g(o,function(C,x,S,b){x===0&&M===void 0?T=C:T=d(T,C,x,S,b)}),T}function w(o,d){if(d=d||{},!m.isObject(d))throw new Error("options is invalid");var M=d.featureIndex||0,T=d.multiFeatureIndex||0,C=d.geometryIndex||0,x=d.segmentIndex||0,S=d.properties,b;switch(o.type){case"FeatureCollection":M<0&&(M=o.features.length+M),S=S||o.features[M].properties,b=o.features[M].geometry;break;case"Feature":S=S||o.properties,b=o.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":b=o;break;default:throw new Error("geojson is invalid")}if(b===null)return null;var a=b.coordinates;switch(b.type){case"Point":case"MultiPoint":return null;case"LineString":return x<0&&(x=a.length+x-1),m.lineString([a[x],a[x+1]],S,d);case"Polygon":return C<0&&(C=a.length+C),x<0&&(x=a[C].length+x-1),m.lineString([a[C][x],a[C][x+1]],S,d);case"MultiLineString":return T<0&&(T=a.length+T),x<0&&(x=a[T].length+x-1),m.lineString([a[T][x],a[T][x+1]],S,d);case"MultiPolygon":return T<0&&(T=a.length+T),C<0&&(C=a[T].length+C),x<0&&(x=a[T][C].length-x-1),m.lineString([a[T][C][x],a[T][C][x+1]],S,d)}throw new Error("geojson is invalid")}function h(o,d){if(d=d||{},!m.isObject(d))throw new Error("options is invalid");var M=d.featureIndex||0,T=d.multiFeatureIndex||0,C=d.geometryIndex||0,x=d.coordIndex||0,S=d.properties,b;switch(o.type){case"FeatureCollection":M<0&&(M=o.features.length+M),S=S||o.features[M].properties,b=o.features[M].geometry;break;case"Feature":S=S||o.properties,b=o.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":b=o;break;default:throw new Error("geojson is invalid")}if(b===null)return null;var a=b.coordinates;switch(b.type){case"Point":return m.point(a,S,d);case"MultiPoint":return T<0&&(T=a.length+T),m.point(a[T],S,d);case"LineString":return x<0&&(x=a.length+x),m.point(a[x],S,d);case"Polygon":return C<0&&(C=a.length+C),x<0&&(x=a[C].length+x),m.point(a[C][x],S,d);case"MultiLineString":return T<0&&(T=a.length+T),x<0&&(x=a[T].length+x),m.point(a[T][x],S,d);case"MultiPolygon":return T<0&&(T=a.length+T),C<0&&(C=a[T].length+C),x<0&&(x=a[T][C].length-x),m.point(a[T][C][x],S,d)}throw new Error("geojson is invalid")}V.coordEach=P,V.coordReduce=i,V.propEach=L,V.propReduce=A,V.featureEach=v,V.featureReduce=p,V.coordAll=t,V.geomEach=r,V.geomReduce=s,V.flattenEach=n,V.flattenReduce=l,V.segmentEach=c,V.segmentReduce=u,V.lineEach=g,V.lineReduce=f,V.findSegment=w,V.findPoint=h},85268:function(G,V,e){Object.defineProperty(V,"__esModule",{value:!0});var m=e(27138);function P(i){var L=[1/0,1/0,-1/0,-1/0];return m.coordEach(i,function(A){L[0]>A[0]&&(L[0]=A[0]),L[1]>A[1]&&(L[1]=A[1]),L[2]<A[0]&&(L[2]=A[0]),L[3]<A[1]&&(L[3]=A[1])}),L}P.default=P,V.default=P},94228:function(G,V){Object.defineProperty(V,"__esModule",{value:!0}),V.earthRadius=63710088e-1,V.factors={centimeters:V.earthRadius*100,centimetres:V.earthRadius*100,degrees:V.earthRadius/111325,feet:V.earthRadius*3.28084,inches:V.earthRadius*39.37,kilometers:V.earthRadius/1e3,kilometres:V.earthRadius/1e3,meters:V.earthRadius,metres:V.earthRadius,miles:V.earthRadius/1609.344,millimeters:V.earthRadius*1e3,millimetres:V.earthRadius*1e3,nauticalmiles:V.earthRadius/1852,radians:1,yards:V.earthRadius*1.0936},V.unitsFactors={centimeters:100,centimetres:100,degrees:8982708286548395e-21,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:.0006213711922373339,millimeters:1e3,millimetres:1e3,nauticalmiles:.0005399568034557236,radians:1/V.earthRadius,yards:1.0936133},V.areaFactors={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046};function e(b,a,E){E===void 0&&(E={});var y={type:"Feature"};return(E.id===0||E.id)&&(y.id=E.id),E.bbox&&(y.bbox=E.bbox),y.properties=a||{},y.geometry=b,y}V.feature=e;function m(b,a,E){switch(b){case"Point":return P(a).geometry;case"LineString":return v(a).geometry;case"Polygon":return L(a).geometry;case"MultiPoint":return s(a).geometry;case"MultiLineString":return r(a).geometry;case"MultiPolygon":return n(a).geometry;default:throw new Error(b+" is invalid")}}V.geometry=m;function P(b,a,E){if(E===void 0&&(E={}),!b)throw new Error("coordinates is required");if(!Array.isArray(b))throw new Error("coordinates must be an Array");if(b.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!T(b[0])||!T(b[1]))throw new Error("coordinates must contain numbers");var y={type:"Point",coordinates:b};return e(y,a,E)}V.point=P;function i(b,a,E){return E===void 0&&(E={}),t(b.map(function(y){return P(y,a)}),E)}V.points=i;function L(b,a,E){E===void 0&&(E={});for(var y=0,z=b;y<z.length;y++){var I=z[y];if(I.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var B=0;B<I[I.length-1].length;B++)if(I[I.length-1][B]!==I[0][B])throw new Error("First and last Position are not equivalent.")}var k={type:"Polygon",coordinates:b};return e(k,a,E)}V.polygon=L;function A(b,a,E){return E===void 0&&(E={}),t(b.map(function(y){return L(y,a)}),E)}V.polygons=A;function v(b,a,E){if(E===void 0&&(E={}),b.length<2)throw new Error("coordinates must be an array of two or more positions");var y={type:"LineString",coordinates:b};return e(y,a,E)}V.lineString=v;function p(b,a,E){return E===void 0&&(E={}),t(b.map(function(y){return v(y,a)}),E)}V.lineStrings=p;function t(b,a){a===void 0&&(a={});var E={type:"FeatureCollection"};return a.id&&(E.id=a.id),a.bbox&&(E.bbox=a.bbox),E.features=b,E}V.featureCollection=t;function r(b,a,E){E===void 0&&(E={});var y={type:"MultiLineString",coordinates:b};return e(y,a,E)}V.multiLineString=r;function s(b,a,E){E===void 0&&(E={});var y={type:"MultiPoint",coordinates:b};return e(y,a,E)}V.multiPoint=s;function n(b,a,E){E===void 0&&(E={});var y={type:"MultiPolygon",coordinates:b};return e(y,a,E)}V.multiPolygon=n;function l(b,a,E){E===void 0&&(E={});var y={type:"GeometryCollection",geometries:b};return e(y,a,E)}V.geometryCollection=l;function c(b,a){if(a===void 0&&(a=0),a&&!(a>=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;_<N;_++){E=k?o.features[_].geometry:O?o.geometry:o,I=E?E.type==="GeometryCollection":!1,b=I?E.geometries.length:1;for(var U=0;U<b;U++){var Y=0,J=0;if(S=I?E.geometries[U]:E,S!==null){a=S.coordinates;var te=S.type;switch(y=M&&(te==="Polygon"||te==="MultiPolygon")?1:0,te){case null:break;case"Point":if(d(a,z,_,Y,J)===!1)return!1;z++,Y++;break;case"LineString":case"MultiPoint":for(T=0;T<a.length;T++){if(d(a[T],z,_,Y,J)===!1)return!1;z++,te==="MultiPoint"&&Y++}te==="LineString"&&Y++;break;case"Polygon":case"MultiLineString":for(T=0;T<a.length;T++){for(C=0;C<a[T].length-y;C++){if(d(a[T][C],z,_,Y,J)===!1)return!1;z++}te==="MultiLineString"&&Y++,te==="Polygon"&&J++}te==="Polygon"&&Y++;break;case"MultiPolygon":for(T=0;T<a.length;T++){for(J=0,C=0;C<a[T].length;C++){for(x=0;x<a[T][C].length-y;x++){if(d(a[T][C][x],z,_,Y,J)===!1)return!1;z++}J++}Y++}break;case"GeometryCollection":for(T=0;T<S.geometries.length;T++)if(P(S.geometries[T],d,M)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function i(o,d,M,T){var C=M;return P(o,function(x,S,b,a,E){S===0&&M===void 0?C=x:C=d(C,x,S,b,a,E)},T),C}function L(o,d){var M;switch(o.type){case"FeatureCollection":for(M=0;M<o.features.length&&d(o.features[M].properties,M)!==!1;M++);break;case"Feature":d(o.properties,0);break}}function A(o,d,M){var T=M;return L(o,function(C,x){x===0&&M===void 0?T=C:T=d(T,C,x)}),T}function v(o,d){if(o.type==="Feature")d(o,0);else if(o.type==="FeatureCollection")for(var M=0;M<o.features.length&&d(o.features[M],M)!==!1;M++);}function p(o,d,M){var T=M;return v(o,function(C,x){x===0&&M===void 0?T=C:T=d(T,C,x)}),T}function t(o){var d=[];return P(o,function(M){d.push(M)}),d}function r(o,d){var M,T,C,x,S,b,a,E,y,z,I=0,B=o.type==="FeatureCollection",k=o.type==="Feature",O=B?o.features.length:1;for(M=0;M<O;M++){for(b=B?o.features[M].geometry:k?o.geometry:o,E=B?o.features[M].properties:k?o.properties:{},y=B?o.features[M].bbox:k?o.bbox:void 0,z=B?o.features[M].id:k?o.id:void 0,a=b?b.type==="GeometryCollection":!1,S=a?b.geometries.length:1,C=0;C<S;C++){if(x=a?b.geometries[C]:b,x===null){if(d(null,I,E,y,z)===!1)return!1;continue}switch(x.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(d(x,I,E,y,z)===!1)return!1;break}case"GeometryCollection":{for(T=0;T<x.geometries.length;T++)if(d(x.geometries[T],I,E,y,z)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}I++}}function s(o,d,M){var T=M;return r(o,function(C,x,S,b,a){x===0&&M===void 0?T=C:T=d(T,C,x,S,b,a)}),T}function n(o,d){r(o,function(M,T,C,x,S){var b=M===null?null:M.type;switch(b){case null:case"Point":case"LineString":case"Polygon":return d(m.feature(M,C,{bbox:x,id:S}),T,0)===!1?!1:void 0}var a;switch(b){case"MultiPoint":a="Point";break;case"MultiLineString":a="LineString";break;case"MultiPolygon":a="Polygon";break}for(var E=0;E<M.coordinates.length;E++){var y=M.coordinates[E],z={type:a,coordinates:y};if(d(m.feature(z,C),T,E)===!1)return!1}})}function l(o,d,M){var T=M;return n(o,function(C,x,S){x===0&&S===0&&M===void 0?T=C:T=d(T,C,x,S)}),T}function c(o,d){n(o,function(M,T,C){var x=0;if(M.geometry){var S=M.geometry.type;if(!(S==="Point"||S==="MultiPoint")){var b,a=0,E=0,y=0;if(P(M,function(z,I,B,k,O){if(b===void 0||T>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<S.length;b++)if(d(m.lineString(S[b],M.properties),T,C,b)===!1)return!1;break}}})}function f(o,d,M){var T=M;return g(o,function(C,x,S,b){x===0&&M===void 0?T=C:T=d(T,C,x,S,b)}),T}function w(o,d){if(d=d||{},!m.isObject(d))throw new Error("options is invalid");var M=d.featureIndex||0,T=d.multiFeatureIndex||0,C=d.geometryIndex||0,x=d.segmentIndex||0,S=d.properties,b;switch(o.type){case"FeatureCollection":M<0&&(M=o.features.length+M),S=S||o.features[M].properties,b=o.features[M].geometry;break;case"Feature":S=S||o.properties,b=o.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":b=o;break;default:throw new Error("geojson is invalid")}if(b===null)return null;var a=b.coordinates;switch(b.type){case"Point":case"MultiPoint":return null;case"LineString":return x<0&&(x=a.length+x-1),m.lineString([a[x],a[x+1]],S,d);case"Polygon":return C<0&&(C=a.length+C),x<0&&(x=a[C].length+x-1),m.lineString([a[C][x],a[C][x+1]],S,d);case"MultiLineString":return T<0&&(T=a.length+T),x<0&&(x=a[T].length+x-1),m.lineString([a[T][x],a[T][x+1]],S,d);case"MultiPolygon":return T<0&&(T=a.length+T),C<0&&(C=a[T].length+C),x<0&&(x=a[T][C].length-x-1),m.lineString([a[T][C][x],a[T][C][x+1]],S,d)}throw new Error("geojson is invalid")}function h(o,d){if(d=d||{},!m.isObject(d))throw new Error("options is invalid");var M=d.featureIndex||0,T=d.multiFeatureIndex||0,C=d.geometryIndex||0,x=d.coordIndex||0,S=d.properties,b;switch(o.type){case"FeatureCollection":M<0&&(M=o.features.length+M),S=S||o.features[M].properties,b=o.features[M].geometry;break;case"Feature":S=S||o.properties,b=o.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":b=o;break;default:throw new Error("geojson is invalid")}if(b===null)return null;var a=b.coordinates;switch(b.type){case"Point":return m.point(a,S,d);case"MultiPoint":return T<0&&(T=a.length+T),m.point(a[T],S,d);case"LineString":return x<0&&(x=a.length+x),m.point(a[x],S,d);case"Polygon":return C<0&&(C=a.length+C),x<0&&(x=a[C].length+x),m.point(a[C][x],S,d);case"MultiLineString":return T<0&&(T=a.length+T),x<0&&(x=a[T].length+x),m.point(a[T][x],S,d);case"MultiPolygon":return T<0&&(T=a.length+T),C<0&&(C=a[T].length+C),x<0&&(x=a[T][C].length-x),m.point(a[T][C][x],S,d)}throw new Error("geojson is invalid")}V.coordEach=P,V.coordReduce=i,V.propEach=L,V.propReduce=A,V.featureEach=v,V.featureReduce=p,V.coordAll=t,V.geomEach=r,V.geomReduce=s,V.flattenEach=n,V.flattenReduce=l,V.segmentEach=c,V.segmentReduce=u,V.lineEach=g,V.lineReduce=f,V.findSegment=w,V.findPoint=h},29261:function(G,V,e){Object.defineProperty(V,"__esModule",{value:!0});var m=e(88553),P=e(64182);function i(L,A){A===void 0&&(A={});var v=0,p=0,t=0;return m.coordEach(L,function(r){v+=r[0],p+=r[1],t++}),P.point([v/t,p/t],A.properties)}V.default=i},64182:function(G,V){Object.defineProperty(V,"__esModule",{value:!0}),V.earthRadius=63710088e-1,V.factors={centimeters:V.earthRadius*100,centimetres:V.earthRadius*100,degrees:V.earthRadius/111325,feet:V.earthRadius*3.28084,inches:V.earthRadius*39.37,kilometers:V.earthRadius/1e3,kilometres:V.earthRadius/1e3,meters:V.earthRadius,metres:V.earthRadius,miles:V.earthRadius/1609.344,millimeters:V.earthRadius*1e3,millimetres:V.earthRadius*1e3,nauticalmiles:V.earthRadius/1852,radians:1,yards:V.earthRadius/1.0936},V.unitsFactors={centimeters:100,centimetres:100,degrees:8982708286548395e-21,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:.0006213711922373339,millimeters:1e3,millimetres:1e3,nauticalmiles:.0005399568034557236,radians:1/V.earthRadius,yards:.91441111923921},V.areaFactors={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046};function e(k,O,N){N===void 0&&(N={});var _={type:"Feature"};return(N.id===0||N.id)&&(_.id=N.id),N.bbox&&(_.bbox=N.bbox),_.properties=O||{},_.geometry=k,_}V.feature=e;function m(k,O,N){switch(k){case"Point":return P(O).geometry;case"LineString":return v(O).geometry;case"Polygon":return L(O).geometry;case"MultiPoint":return s(O).geometry;case"MultiLineString":return r(O).geometry;case"MultiPolygon":return n(O).geometry;default:throw new Error(k+" is invalid")}}V.geometry=m;function P(k,O,N){N===void 0&&(N={});var _={type:"Point",coordinates:k};return e(_,O,N)}V.point=P;function i(k,O,N){return N===void 0&&(N={}),t(k.map(function(_){return P(_,O)}),N)}V.points=i;function L(k,O,N){N===void 0&&(N={});for(var _=0,U=k;_<U.length;_++){var Y=U[_];if(Y.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var J=0;J<Y[Y.length-1].length;J++)if(Y[Y.length-1][J]!==Y[0][J])throw new Error("First and last Position are not equivalent.")}var te={type:"Polygon",coordinates:k};return e(te,O,N)}V.polygon=L;function A(k,O,N){return N===void 0&&(N={}),t(k.map(function(_){return L(_,O)}),N)}V.polygons=A;function v(k,O,N){if(N===void 0&&(N={}),k.length<2)throw new Error("coordinates must be an array of two or more positions");var _={type:"LineString",coordinates:k};return e(_,O,N)}V.lineString=v;function p(k,O,N){return N===void 0&&(N={}),t(k.map(function(_){return v(_,O)}),N)}V.lineStrings=p;function t(k,O){O===void 0&&(O={});var N={type:"FeatureCollection"};return O.id&&(N.id=O.id),O.bbox&&(N.bbox=O.bbox),N.features=k,N}V.featureCollection=t;function r(k,O,N){N===void 0&&(N={});var _={type:"MultiLineString",coordinates:k};return e(_,O,N)}V.multiLineString=r;function s(k,O,N){N===void 0&&(N={});var _={type:"MultiPoint",coordinates:k};return e(_,O,N)}V.multiPoint=s;function n(k,O,N){N===void 0&&(N={});var _={type:"MultiPolygon",coordinates:k};return e(_,O,N)}V.multiPolygon=n;function l(k,O,N){N===void 0&&(N={});var _={type:"GeometryCollection",geometries:k};return e(_,O,N)}V.geometryCollection=l;function c(k,O){if(O===void 0&&(O=0),O&&!(O>=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;_<N;_++){E=k?o.features[_].geometry:O?o.geometry:o,I=E?E.type==="GeometryCollection":!1,b=I?E.geometries.length:1;for(var U=0;U<b;U++){var Y=0,J=0;if(S=I?E.geometries[U]:E,S!==null){a=S.coordinates;var te=S.type;switch(y=M&&(te==="Polygon"||te==="MultiPolygon")?1:0,te){case null:break;case"Point":if(d(a,z,_,Y,J)===!1)return!1;z++,Y++;break;case"LineString":case"MultiPoint":for(T=0;T<a.length;T++){if(d(a[T],z,_,Y,J)===!1)return!1;z++,te==="MultiPoint"&&Y++}te==="LineString"&&Y++;break;case"Polygon":case"MultiLineString":for(T=0;T<a.length;T++){for(C=0;C<a[T].length-y;C++){if(d(a[T][C],z,_,Y,J)===!1)return!1;z++}te==="MultiLineString"&&Y++,te==="Polygon"&&J++}te==="Polygon"&&Y++;break;case"MultiPolygon":for(T=0;T<a.length;T++){for(J=0,C=0;C<a[T].length;C++){for(x=0;x<a[T][C].length-y;x++){if(d(a[T][C][x],z,_,Y,J)===!1)return!1;z++}J++}Y++}break;case"GeometryCollection":for(T=0;T<S.geometries.length;T++)if(P(S.geometries[T],d,M)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function i(o,d,M,T){var C=M;return P(o,function(x,S,b,a,E){S===0&&M===void 0?C=x:C=d(C,x,S,b,a,E)},T),C}function L(o,d){var M;switch(o.type){case"FeatureCollection":for(M=0;M<o.features.length&&d(o.features[M].properties,M)!==!1;M++);break;case"Feature":d(o.properties,0);break}}function A(o,d,M){var T=M;return L(o,function(C,x){x===0&&M===void 0?T=C:T=d(T,C,x)}),T}function v(o,d){if(o.type==="Feature")d(o,0);else if(o.type==="FeatureCollection")for(var M=0;M<o.features.length&&d(o.features[M],M)!==!1;M++);}function p(o,d,M){var T=M;return v(o,function(C,x){x===0&&M===void 0?T=C:T=d(T,C,x)}),T}function t(o){var d=[];return P(o,function(M){d.push(M)}),d}function r(o,d){var M,T,C,x,S,b,a,E,y,z,I=0,B=o.type==="FeatureCollection",k=o.type==="Feature",O=B?o.features.length:1;for(M=0;M<O;M++){for(b=B?o.features[M].geometry:k?o.geometry:o,E=B?o.features[M].properties:k?o.properties:{},y=B?o.features[M].bbox:k?o.bbox:void 0,z=B?o.features[M].id:k?o.id:void 0,a=b?b.type==="GeometryCollection":!1,S=a?b.geometries.length:1,C=0;C<S;C++){if(x=a?b.geometries[C]:b,x===null){if(d(null,I,E,y,z)===!1)return!1;continue}switch(x.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(d(x,I,E,y,z)===!1)return!1;break}case"GeometryCollection":{for(T=0;T<x.geometries.length;T++)if(d(x.geometries[T],I,E,y,z)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}I++}}function s(o,d,M){var T=M;return r(o,function(C,x,S,b,a){x===0&&M===void 0?T=C:T=d(T,C,x,S,b,a)}),T}function n(o,d){r(o,function(M,T,C,x,S){var b=M===null?null:M.type;switch(b){case null:case"Point":case"LineString":case"Polygon":return d(m.feature(M,C,{bbox:x,id:S}),T,0)===!1?!1:void 0}var a;switch(b){case"MultiPoint":a="Point";break;case"MultiLineString":a="LineString";break;case"MultiPolygon":a="Polygon";break}for(var E=0;E<M.coordinates.length;E++){var y=M.coordinates[E],z={type:a,coordinates:y};if(d(m.feature(z,C),T,E)===!1)return!1}})}function l(o,d,M){var T=M;return n(o,function(C,x,S){x===0&&S===0&&M===void 0?T=C:T=d(T,C,x,S)}),T}function c(o,d){n(o,function(M,T,C){var x=0;if(M.geometry){var S=M.geometry.type;if(!(S==="Point"||S==="MultiPoint")){var b,a=0,E=0,y=0;if(P(M,function(z,I,B,k,O){if(b===void 0||T>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<S.length;b++)if(d(m.lineString(S[b],M.properties),T,C,b)===!1)return!1;break}}})}function f(o,d,M){var T=M;return g(o,function(C,x,S,b){x===0&&M===void 0?T=C:T=d(T,C,x,S,b)}),T}function w(o,d){if(d=d||{},!m.isObject(d))throw new Error("options is invalid");var M=d.featureIndex||0,T=d.multiFeatureIndex||0,C=d.geometryIndex||0,x=d.segmentIndex||0,S=d.properties,b;switch(o.type){case"FeatureCollection":M<0&&(M=o.features.length+M),S=S||o.features[M].properties,b=o.features[M].geometry;break;case"Feature":S=S||o.properties,b=o.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":b=o;break;default:throw new Error("geojson is invalid")}if(b===null)return null;var a=b.coordinates;switch(b.type){case"Point":case"MultiPoint":return null;case"LineString":return x<0&&(x=a.length+x-1),m.lineString([a[x],a[x+1]],S,d);case"Polygon":return C<0&&(C=a.length+C),x<0&&(x=a[C].length+x-1),m.lineString([a[C][x],a[C][x+1]],S,d);case"MultiLineString":return T<0&&(T=a.length+T),x<0&&(x=a[T].length+x-1),m.lineString([a[T][x],a[T][x+1]],S,d);case"MultiPolygon":return T<0&&(T=a.length+T),C<0&&(C=a[T].length+C),x<0&&(x=a[T][C].length-x-1),m.lineString([a[T][C][x],a[T][C][x+1]],S,d)}throw new Error("geojson is invalid")}function h(o,d){if(d=d||{},!m.isObject(d))throw new Error("options is invalid");var M=d.featureIndex||0,T=d.multiFeatureIndex||0,C=d.geometryIndex||0,x=d.coordIndex||0,S=d.properties,b;switch(o.type){case"FeatureCollection":M<0&&(M=o.features.length+M),S=S||o.features[M].properties,b=o.features[M].geometry;break;case"Feature":S=S||o.properties,b=o.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":b=o;break;default:throw new Error("geojson is invalid")}if(b===null)return null;var a=b.coordinates;switch(b.type){case"Point":return m.point(a,S,d);case"MultiPoint":return T<0&&(T=a.length+T),m.point(a[T],S,d);case"LineString":return x<0&&(x=a.length+x),m.point(a[x],S,d);case"Polygon":return C<0&&(C=a.length+C),x<0&&(x=a[C].length+x),m.point(a[C][x],S,d);case"MultiLineString":return T<0&&(T=a.length+T),x<0&&(x=a[T].length+x),m.point(a[T][x],S,d);case"MultiPolygon":return T<0&&(T=a.length+T),C<0&&(C=a[T].length+C),x<0&&(x=a[T][C].length-x),m.point(a[T][C][x],S,d)}throw new Error("geojson is invalid")}V.coordEach=P,V.coordReduce=i,V.propEach=L,V.propReduce=A,V.featureEach=v,V.featureReduce=p,V.coordAll=t,V.geomEach=r,V.geomReduce=s,V.flattenEach=n,V.flattenReduce=l,V.segmentEach=c,V.segmentReduce=u,V.lineEach=g,V.lineReduce=f,V.findSegment=w,V.findPoint=h},65185:function(G){G.exports=V;function V(e){var m=0,P=0,i=0,L=0;return e.map(function(A){A=A.slice();var v=A[0],p=v.toUpperCase();if(v!=p)switch(A[0]=p,v){case"a":A[6]+=i,A[7]+=L;break;case"v":A[1]+=L;break;case"h":A[1]+=i;break;default:for(var t=1;t<A.length;)A[t++]+=i,A[t++]+=L}switch(p){case"Z":i=m,L=P;break;case"H":i=A[1];break;case"V":L=A[1];break;case"M":i=m=A[1],L=P=A[2];break;default:i=A[A.length-2],L=A[A.length-1]}return A})}},21527:function(G){G.exports=V;function V(e,m){if(!e||e.length==null)throw Error("Argument should be an array");m==null?m=1:m=Math.floor(m);for(var P=Array(m*2),i=0;i<m;i++){for(var L=-1/0,A=1/0,v=i,p=e.length;v<p;v+=m)e[v]>L&&(L=e[v]),e[v]<A&&(A=e[v]);P[i]=A,P[m+i]=L}return P}},6851:function(G){G.exports=function(V,e,m){if(typeof Array.prototype.findIndex=="function")return V.findIndex(e,m);if(typeof e!="function")throw new TypeError("predicate must be a function");var P=Object(V),i=P.length;if(i===0)return-1;for(var L=0;L<i;L++)if(e.call(m,P[L],L,P))return L;return-1}},54:function(G,V,e){var m=e(21527);G.exports=P;function P(i,L,A){if(!i||i.length==null)throw Error("Argument should be an array");L==null&&(L=1),A==null&&(A=m(i,L));for(var v=0;v<L;v++){var p=A[L+v],t=A[v],r=v,s=i.length;if(p===1/0&&t===-1/0)for(r=v;r<s;r+=L)i[r]=i[r]===p?1:i[r]===t?0:.5;else if(p===1/0)for(r=v;r<s;r+=L)i[r]=i[r]===p?1:0;else if(t===-1/0)for(r=v;r<s;r+=L)i[r]=i[r]===t?0:1;else{var n=p-t;for(r=v;r<s;r+=L)isNaN(i[r])||(i[r]=n===0?.5:(i[r]-t)/n)}}return i}},57471:function(G){G.exports=function(e,m){var P=typeof e=="number",i=typeof m=="number";P&&!i?(m=e,e=0):!P&&!i&&(e=0,m=0),e=e|0,m=m|0;var L=m-e;if(L<0)throw new Error("array length must be positive");for(var A=new Array(L),v=0,p=e;v<L;v++,p++)A[v]=p;return A}},32791:function(G,V,e){var m=e(90386);function P(J){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?P=function(ae){return typeof ae}:P=function(ae){return ae&&typeof Symbol=="function"&&ae.constructor===Symbol&&ae!==Symbol.prototype?"symbol":typeof ae},P(J)}function i(J,te){if(!(J instanceof te))throw new TypeError("Cannot call a class as a function")}var L=e(79616),A=L.codes,v=A.ERR_AMBIGUOUS_ARGUMENT,p=A.ERR_INVALID_ARG_TYPE,t=A.ERR_INVALID_ARG_VALUE,r=A.ERR_INVALID_RETURN_VALUE,s=A.ERR_MISSING_ARGS,n=e(73894),l=e(43827),c=l.inspect,u=e(43827).types,g=u.isPromise,f=u.isRegExp,w=Object.assign?Object.assign:e(73523).assign,h=Object.is?Object.is:e(64003),o,d;function M(){var J=e(74061);o=J.isDeepEqual,d=J.isDeepStrictEqual}var T=!1,C=G.exports=E,x={};function S(J){throw J.message instanceof Error?J.message:new n(J)}function b(J,te,ae,ce,Q){var Z=arguments.length,j;if(Z===0)j="Failed";else if(Z===1)ae=J,J=void 0;else{if(T===!1){T=!0;var K=m.emitWarning?m.emitWarning:console.warn.bind(console);K("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")}Z===2&&(ce="!=")}if(ae instanceof Error)throw ae;var ee={actual:J,expected:te,operator:ce===void 0?"fail":ce,stackStartFn:Q||b};ae!==void 0&&(ee.message=ae);var oe=new n(ee);throw j&&(oe.message=j,oe.generatedMessage=!0),oe}C.fail=b,C.AssertionError=n;function a(J,te,ae,ce){if(!ae){var Q=!1;if(te===0)Q=!0,ce="No value argument passed to `assert.ok()`";else if(ce instanceof Error)throw ce;var Z=new n({actual:ae,expected:!0,message:ce,operator:"==",stackStartFn:J});throw Z.generatedMessage=Q,Z}}function E(){for(var J=arguments.length,te=new Array(J),ae=0;ae<J;ae++)te[ae]=arguments[ae];a.apply(void 0,[E,te.length].concat(te))}C.ok=E,C.equal=function J(te,ae,ce){if(arguments.length<2)throw new s("actual","expected");te!=ae&&S({actual:te,expected:ae,message:ce,operator:"==",stackStartFn:J})},C.notEqual=function J(te,ae,ce){if(arguments.length<2)throw new s("actual","expected");te==ae&&S({actual:te,expected:ae,message:ce,operator:"!=",stackStartFn:J})},C.deepEqual=function J(te,ae,ce){if(arguments.length<2)throw new s("actual","expected");o===void 0&&M(),o(te,ae)||S({actual:te,expected:ae,message:ce,operator:"deepEqual",stackStartFn:J})},C.notDeepEqual=function J(te,ae,ce){if(arguments.length<2)throw new s("actual","expected");o===void 0&&M(),o(te,ae)&&S({actual:te,expected:ae,message:ce,operator:"notDeepEqual",stackStartFn:J})},C.deepStrictEqual=function J(te,ae,ce){if(arguments.length<2)throw new s("actual","expected");o===void 0&&M(),d(te,ae)||S({actual:te,expected:ae,message:ce,operator:"deepStrictEqual",stackStartFn:J})},C.notDeepStrictEqual=y;function y(J,te,ae){if(arguments.length<2)throw new s("actual","expected");o===void 0&&M(),d(J,te)&&S({actual:J,expected:te,message:ae,operator:"notDeepStrictEqual",stackStartFn:y})}C.strictEqual=function J(te,ae,ce){if(arguments.length<2)throw new s("actual","expected");h(te,ae)||S({actual:te,expected:ae,message:ce,operator:"strictEqual",stackStartFn:J})},C.notStrictEqual=function J(te,ae,ce){if(arguments.length<2)throw new s("actual","expected");h(te,ae)&&S({actual:te,expected:ae,message:ce,operator:"notStrictEqual",stackStartFn:J})};var z=function J(te,ae,ce){var Q=this;i(this,J),ae.forEach(function(Z){Z in te&&(ce!==void 0&&typeof ce[Z]=="string"&&f(te[Z])&&te[Z].test(ce[Z])?Q[Z]=ce[Z]:Q[Z]=te[Z])})};function I(J,te,ae,ce,Q,Z){if(!(ae in J)||!d(J[ae],te[ae])){if(!ce){var j=new z(J,Q),K=new z(te,Q,J),ee=new n({actual:j,expected:K,operator:"deepStrictEqual",stackStartFn:Z});throw ee.actual=J,ee.expected=te,ee.operator=Z.name,ee}S({actual:J,expected:te,message:ce,operator:Z.name,stackStartFn:Z})}}function B(J,te,ae,ce){if(typeof te!="function"){if(f(te))return te.test(J);if(arguments.length===2)throw new p("expected",["Function","RegExp"],te);if(P(J)!=="object"||J===null){var Q=new n({actual:J,expected:te,message:ae,operator:"deepStrictEqual",stackStartFn:ce});throw Q.operator=ce.name,Q}var Z=Object.keys(te);if(te instanceof Error)Z.push("name","message");else if(Z.length===0)throw new t("error",te,"may not be an empty object");return o===void 0&&M(),Z.forEach(function(j){typeof J[j]=="string"&&f(te[j])&&te[j].test(J[j])||I(J,te,j,ae,Z,ce)}),!0}return te.prototype!==void 0&&J instanceof te?!0:Error.isPrototypeOf(te)?!1:te.call({},J)===!0}function k(J){if(typeof J!="function")throw new p("fn","Function",J);try{J()}catch(te){return te}return x}function O(J){return g(J)||J!==null&&P(J)==="object"&&typeof J.then=="function"&&typeof J.catch=="function"}function N(J){return Promise.resolve().then(function(){var te;if(typeof J=="function"){if(te=J(),!O(te))throw new r("instance of Promise","promiseFn",te)}else if(O(J))te=J;else throw new p("promiseFn",["Function","Promise"],J);return Promise.resolve().then(function(){return te}).then(function(){return x}).catch(function(ae){return ae})})}function _(J,te,ae,ce){if(typeof ae=="string"){if(arguments.length===4)throw new p("error",["Object","Error","Function","RegExp"],ae);if(P(te)==="object"&&te!==null){if(te.message===ae)throw new v("error/message",'The error message "'.concat(te.message,'" is identical to the message.'))}else if(te===ae)throw new v("error/message",'The error "'.concat(te,'" is identical to the message.'));ce=ae,ae=void 0}else if(ae!=null&&P(ae)!=="object"&&typeof ae!="function")throw new p("error",["Object","Error","Function","RegExp"],ae);if(te===x){var Q="";ae&&ae.name&&(Q+=" (".concat(ae.name,")")),Q+=ce?": ".concat(ce):".";var Z=J.name==="rejects"?"rejection":"exception";S({actual:void 0,expected:ae,operator:J.name,message:"Missing expected ".concat(Z).concat(Q),stackStartFn:J})}if(ae&&!B(te,ae,ce,J))throw te}function U(J,te,ae,ce){if(te!==x){if(typeof ae=="string"&&(ce=ae,ae=void 0),!ae||B(te,ae)){var Q=ce?": ".concat(ce):".",Z=J.name==="doesNotReject"?"rejection":"exception";S({actual:te,expected:ae,operator:J.name,message:"Got unwanted ".concat(Z).concat(Q,`
`)+'Actual message: "'.concat(te&&te.message,'"'),stackStartFn:J})}throw te}}C.throws=function J(te){for(var ae=arguments.length,ce=new Array(ae>1?ae-1:0),Q=1;Q<ae;Q++)ce[Q-1]=arguments[Q];_.apply(void 0,[J,k(te)].concat(ce))},C.rejects=function J(te){for(var ae=arguments.length,ce=new Array(ae>1?ae-1:0),Q=1;Q<ae;Q++)ce[Q-1]=arguments[Q];return N(te).then(function(Z){return _.apply(void 0,[J,Z].concat(ce))})},C.doesNotThrow=function J(te){for(var ae=arguments.length,ce=new Array(ae>1?ae-1:0),Q=1;Q<ae;Q++)ce[Q-1]=arguments[Q];U.apply(void 0,[J,k(te)].concat(ce))},C.doesNotReject=function J(te){for(var ae=arguments.length,ce=new Array(ae>1?ae-1:0),Q=1;Q<ae;Q++)ce[Q-1]=arguments[Q];return N(te).then(function(Z){return U.apply(void 0,[J,Z].concat(ce))})},C.ifError=function J(te){if(te!=null){var ae="ifError got unwanted exception: ";P(te)==="object"&&typeof te.message=="string"?te.message.length===0&&te.constructor?ae+=te.constructor.name:ae+=te.message:ae+=c(te);var ce=new n({actual:te,expected:null,operator:"ifError",message:ae,stackStartFn:J}),Q=te.stack;if(typeof Q=="string"){var Z=Q.split(`
`);Z.shift();for(var j=ce.stack.split(`
`),K=0;K<Z.length;K++){var ee=j.indexOf(Z[K]);if(ee!==-1){j=j.slice(0,ee);break}}ce.stack="".concat(j.join(`
`),`
`).concat(Z.join(`
`))}throw ce}};function Y(){for(var J=arguments.length,te=new Array(J),ae=0;ae<J;ae++)te[ae]=arguments[ae];a.apply(void 0,[Y,te.length].concat(te))}C.strict=w(Y,C,{equal:C.strictEqual,deepEqual:C.deepStrictEqual,notEqual:C.notStrictEqual,notDeepEqual:C.notDeepStrictEqual}),C.strict.strict=C.strict},73894:function(G,V,e){var m=e(90386);function P(k){for(var O=1;O<arguments.length;O++){var N=arguments[O]!=null?arguments[O]:{},_=Object.keys(N);typeof Object.getOwnPropertySymbols=="function"&&(_=_.concat(Object.getOwnPropertySymbols(N).filter(function(U){return Object.getOwnPropertyDescriptor(N,U).enumerable}))),_.forEach(function(U){i(k,U,N[U])})}return k}function i(k,O,N){return O in k?Object.defineProperty(k,O,{value:N,enumerable:!0,configurable:!0,writable:!0}):k[O]=N,k}function L(k,O){if(!(k instanceof O))throw new TypeError("Cannot call a class as a function")}function A(k,O){for(var N=0;N<O.length;N++){var _=O[N];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(k,_.key,_)}}function v(k,O,N){return O&&A(k.prototype,O),N&&A(k,N),k}function p(k,O){return O&&(f(O)==="object"||typeof O=="function")?O:t(k)}function t(k){if(k===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k}function r(k,O){if(typeof O!="function"&&O!==null)throw new TypeError("Super expression must either be null or a function");k.prototype=Object.create(O&&O.prototype,{constructor:{value:k,writable:!0,configurable:!0}}),O&&u(k,O)}function s(k){var O=typeof Map=="function"?new Map:void 0;return s=function(_){if(_===null||!c(_))return _;if(typeof _!="function")throw new TypeError("Super expression must either be null or a function");if(typeof O<"u"){if(O.has(_))return O.get(_);O.set(_,U)}function U(){return l(_,arguments,g(this).constructor)}return U.prototype=Object.create(_.prototype,{constructor:{value:U,enumerable:!1,writable:!0,configurable:!0}}),u(U,_)},s(k)}function n(){if(typeof Reflect>"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(K<ee){for(;ce[0][Z]===Q[0][Z];)Z++;Z>2&&(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.length<Z+1)Me>1&&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.length<Z+1)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(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;h<f;h++)w[h]=arguments[h];r===void 0&&(r=e(32791)),r(w.length>0,"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;xe<Ee.length;xe++){var Se=Ee.charCodeAt(xe);if(Se<48||Se>57)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 <feross@feross.org> <http://feross.org>
* @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);He<Fe;++He)if(Ee[He]!==xe[He]){Se=Ee[He],Ue=xe[He];break}return Se<Ue?-1:Ue<Se?1:0}var N=!0,_=!1,U=0,Y=1,J=2,te=3;function ae(Ee,xe){return v?Ee.source===xe.source&&Ee.flags===xe.flags:RegExp.prototype.toString.call(Ee)===RegExp.prototype.toString.call(xe)}function ce(Ee,xe){if(Ee.byteLength!==xe.byteLength)return!1;for(var Se=0;Se<Ee.byteLength;Se++)if(Ee[Se]!==xe[Se])return!1;return!0}function Q(Ee,xe){return Ee.byteLength!==xe.byteLength?!1:O(new Uint8Array(Ee.buffer,Ee.byteOffset,Ee.byteLength),new Uint8Array(xe.buffer,xe.byteOffset,xe.byteLength))===0}function Z(Ee,xe){return Ee.byteLength===xe.byteLength&&O(new Uint8Array(Ee),new Uint8Array(xe))===0}function j(Ee,xe){return S(Ee)?S(xe)&&r(Number.prototype.valueOf.call(Ee),Number.prototype.valueOf.call(xe)):b(Ee)?b(xe)&&String.prototype.valueOf.call(Ee)===String.prototype.valueOf.call(xe):a(Ee)?a(xe)&&Boolean.prototype.valueOf.call(Ee)===Boolean.prototype.valueOf.call(xe):E(Ee)?E(xe)&&BigInt.prototype.valueOf.call(Ee)===BigInt.prototype.valueOf.call(xe):y(xe)&&Symbol.prototype.valueOf.call(Ee)===Symbol.prototype.valueOf.call(xe)}function K(Ee,xe,Se,Ue){if(Ee===xe)return Ee!==0?!0:Se?r(Ee,xe):!0;if(Se){if(A(Ee)!=="object")return typeof Ee=="number"&&n(Ee)&&n(xe);if(A(xe)!=="object"||Ee===null||xe===null||Object.getPrototypeOf(Ee)!==Object.getPrototypeOf(xe))return!1}else{if(Ee===null||A(Ee)!=="object")return xe===null||A(xe)!=="object"?Ee==xe:!1;if(xe===null||A(xe)!=="object")return!1}var He=g(Ee),Fe=g(xe);if(He!==Fe)return!1;if(Array.isArray(Ee)){if(Ee.length!==xe.length)return!1;var Ge=k(Ee),nt=k(xe);return Ge.length!==nt.length?!1:oe(Ee,xe,Se,Ue,Y,Ge)}if(He==="[object Object]"&&(!d(Ee)&&d(xe)||!T(Ee)&&T(xe)))return!1;if(o(Ee)){if(!o(xe)||Date.prototype.getTime.call(Ee)!==Date.prototype.getTime.call(xe))return!1}else if(M(Ee)){if(!M(xe)||!ae(Ee,xe))return!1}else if(C(Ee)||Ee instanceof Error){if(Ee.message!==xe.message||Ee.name!==xe.name)return!1}else if(h(Ee)){if(!Se&&(z(Ee)||I(Ee))){if(!ce(Ee,xe))return!1}else if(!Q(Ee,xe))return!1;var qe=k(Ee),$e=k(xe);return qe.length!==$e.length?!1:oe(Ee,xe,Se,Ue,U,qe)}else{if(T(Ee))return!T(xe)||Ee.size!==xe.size?!1:oe(Ee,xe,Se,Ue,J);if(d(Ee))return!d(xe)||Ee.size!==xe.size?!1:oe(Ee,xe,Se,Ue,te);if(w(Ee)){if(!Z(Ee,xe))return!1}else if(x(Ee)&&!j(Ee,xe))return!1}return oe(Ee,xe,Se,Ue,U)}function ee(Ee,xe){return xe.filter(function(Se){return u(Ee,Se)})}function oe(Ee,xe,Se,Ue,He,Fe){if(arguments.length===5){Fe=Object.keys(Ee);var Ge=Object.keys(xe);if(Fe.length!==Ge.length)return!1}for(var nt=0;nt<Fe.length;nt++)if(!c(xe,Fe[nt]))return!1;if(Se&&arguments.length===5){var qe=s(Ee);if(qe.length!==0){var $e=0;for(nt=0;nt<qe.length;nt++){var et=qe[nt];if(u(Ee,et)){if(!u(xe,et))return!1;Fe.push(et),$e++}else if(u(xe,et))return!1}var ct=s(xe);if(qe.length!==ct.length&&ee(xe,ct).length!==$e)return!1}else{var dt=s(xe);if(dt.length!==0&&ee(xe,dt).length!==0)return!1}}if(Fe.length===0&&(He===U||He===Y&&Ee.length===0||Ee.size===0))return!0;if(Ue===void 0)Ue={val1:new Map,val2:new Map,position:0};else{var pt=Ue.val1.get(Ee);if(pt!==void 0){var At=Ue.val2.get(xe);if(At!==void 0)return pt===At}Ue.position++}Ue.val1.set(Ee,Ue.position),Ue.val2.set(xe,Ue.position);var Mt=Te(Ee,xe,Se,Fe,Ue,He);return Ue.val1.delete(Ee),Ue.val2.delete(xe),Mt}function q(Ee,xe,Se,Ue){for(var He=p(Ee),Fe=0;Fe<He.length;Fe++){var Ge=He[Fe];if(K(xe,Ge,Se,Ue))return Ee.delete(Ge),!0}return!1}function $(Ee){switch(A(Ee)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":Ee=+Ee;case"number":if(n(Ee))return!1}return!0}function le(Ee,xe,Se){var Ue=$(Se);return Ue??(xe.has(Ue)&&!Ee.has(Ue))}function ie(Ee,xe,Se,Ue,He){var Fe=$(Se);if(Fe!=null)return Fe;var Ge=xe.get(Fe);return Ge===void 0&&!xe.has(Fe)||!K(Ue,Ge,!1,He)?!1:!Ee.has(Fe)&&K(Ue,Ge,!1,He)}function he(Ee,xe,Se,Ue){for(var He=null,Fe=p(Ee),Ge=0;Ge<Fe.length;Ge++){var nt=Fe[Ge];if(A(nt)==="object"&&nt!==null)He===null&&(He=new Set),He.add(nt);else if(!xe.has(nt)){if(Se||!le(Ee,xe,nt))return!1;He===null&&(He=new Set),He.add(nt)}}if(He!==null){for(var qe=p(xe),$e=0;$e<qe.length;$e++){var et=qe[$e];if(A(et)==="object"&&et!==null){if(!q(He,et,Se,Ue))return!1}else if(!Se&&!Ee.has(et)&&!q(He,et,Se,Ue))return!1}return He.size===0}return!0}function me(Ee,xe,Se,Ue,He,Fe){for(var Ge=p(Ee),nt=0;nt<Ge.length;nt++){var qe=Ge[nt];if(K(Se,qe,He,Fe)&&K(Ue,xe.get(qe),He,Fe))return Ee.delete(qe),!0}return!1}function Me(Ee,xe,Se,Ue){for(var He=null,Fe=t(Ee),Ge=0;Ge<Fe.length;Ge++){var nt=m(Fe[Ge],2),qe=nt[0],$e=nt[1];if(A(qe)==="object"&&qe!==null)He===null&&(He=new Set),He.add(qe);else{var et=xe.get(qe);if(et===void 0&&!xe.has(qe)||!K($e,et,Se,Ue)){if(Se||!ie(Ee,xe,qe,$e,Ue))return!1;He===null&&(He=new Set),He.add(qe)}}}if(He!==null){for(var ct=t(xe),dt=0;dt<ct.length;dt++){var pt=m(ct[dt],2),qe=pt[0],At=pt[1];if(A(qe)==="object"&&qe!==null){if(!me(He,Ee,qe,At,Se,Ue))return!1}else if(!Se&&(!Ee.has(qe)||!K(Ee.get(qe),At,!1,Ue))&&!me(He,Ee,qe,At,!1,Ue))return!1}return He.size===0}return!0}function Te(Ee,xe,Se,Ue,He,Fe){var Ge=0;if(Fe===J){if(!he(Ee,xe,Se,He))return!1}else if(Fe===te){if(!Me(Ee,xe,Se,He))return!1}else if(Fe===Y)for(;Ge<Ee.length;Ge++)if(c(Ee,Ge)){if(!c(xe,Ge)||!K(Ee[Ge],xe[Ge],Se,He))return!1}else{if(c(xe,Ge))return!1;for(var nt=Object.keys(Ee);Ge<nt.length;Ge++){var qe=nt[Ge];if(!c(xe,qe)||!K(Ee[qe],xe[qe],Se,He))return!1}return nt.length===Object.keys(xe).length}for(Ge=0;Ge<Ue.length;Ge++){var $e=Ue[Ge];if(!K(Ee[$e],xe[$e],Se,He))return!1}return!0}function Oe(Ee,xe){return K(Ee,xe,_)}function Ne(Ee,xe){return K(Ee,xe,N)}G.exports={isDeepEqual:Oe,isDeepStrictEqual:Ne}},95341:function(G,V){V.byteLength=p,V.toByteArray=r,V.fromByteArray=l;for(var e=[],m=[],P=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",L=0,A=i.length;L<A;++L)e[L]=i[L],m[i.charCodeAt(L)]=L;m["-".charCodeAt(0)]=62,m["_".charCodeAt(0)]=63;function v(c){var u=c.length;if(u%4>0)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<d;M+=4)u=m[c.charCodeAt(M)]<<18|m[c.charCodeAt(M+1)]<<12|m[c.charCodeAt(M+2)]<<6|m[c.charCodeAt(M+3)],h[o++]=u>>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;h<g;h+=3)f=(c[h]<<16&16711680)+(c[h+1]<<8&65280)+(c[h+2]&255),w.push(s(f));return w.join("")}function l(c){for(var u,g=c.length,f=g%3,w=[],h=16383,o=0,d=g-f;o<d;o+=h)w.push(n(c,o,o+h>d?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<<e-1,V.sign=function(i){return(i>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)&-(i<L)},V.max=function(i,L){return i^(i^L)&-(i<L)},V.isPow2=function(i){return!(i&i-1)&&!!i},V.log2=function(i){var L,A;return L=(i>65535)<<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<<p&255}})(P),V.reverse=function(i){return P[i&255]<<24|P[i>>>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<M;d++)u[d]=g[d*f+s]/255;else if(f!==1)throw Error("Raw data can have only 1 value per pixel");var T=Array(n*l),C=Array(n*l),x=Array(c),S=Array(c),b=Array(c+1),a=Array(c);for(d=0,M=n*l;d<M;d++){var E=u[d];T[d]=E===1?0:E===0?P:Math.pow(Math.max(0,.5-E),2),C[d]=E===1?P:E===0?0:Math.pow(Math.max(0,E-.5),2)}L(T,n,l,x,S,a,b),L(C,n,l,x,S,a,b);var y=window.Float32Array?new Float32Array(n*l):new Array(n*l);for(d=0,M=n*l;d<M;d++)y[d]=m(1-((T[d]-C[d])/r+t),0,1);return y}function L(v,p,t,r,s,n,l){for(var c=0;c<p;c++){for(var u=0;u<t;u++)r[u]=v[u*p+c];for(A(r,s,n,l,t),u=0;u<t;u++)v[u*p+c]=s[u]}for(u=0;u<t;u++){for(c=0;c<p;c++)r[c]=v[u*p+c];for(A(r,s,n,l,p),c=0;c<p;c++)v[u*p+c]=Math.sqrt(s[c])}}function A(v,p,t,r,s){t[0]=0,r[0]=-P,r[1]=+P;for(var n=1,l=0;n<s;n++){for(var c=(v[n]+n*n-(v[t[l]]+t[l]*t[l]))/(2*n-2*t[l]);c<=r[l];)l--,c=(v[n]+n*n-(v[t[l]]+t[l]*t[l]))/(2*n-2*t[l]);l++,t[l]=n,r[l]=c,r[l+1]=+P}for(n=0,l=0;n<s;n++){for(;r[l+1]<n;)l++;p[n]=(n-t[l])*(n-t[l])+v[t[l]]}}},6614:function(G,V,e){var m=e(68318),P=e(68222),i=P(m("String.prototype.indexOf"));G.exports=function(A,v){var p=m(A,!!v);return typeof p=="function"&&i(A,".prototype.")>-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 m<P?e<m?m:e>P?P:e:e<P?P:e>m?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;g<c.length;g++)u[c[g]]=1;return u}},55174:function(G,V,e){var m=e(24582),P=e(10424),i=e(82527),L=e(19012),A=e(21780),v=e(16906),p=Function.prototype.bind,t=Object.defineProperty,r=Object.prototype.hasOwnProperty,s;s=function(n,l,c){var u=P(l)&&i(l.value),g;return g=L(l),delete g.writable,delete g.value,g.get=function(){return!c.overwriteDefinition&&r.call(this,n)?u:(l.value=p.call(u,c.resolveContext?c.resolveContext(this):this),t(this,n,l),this[n])},g},G.exports=function(n){var l=A(arguments[1]);return m(l.resolveContext)&&i(l.resolveContext),v(n,function(c,u){return s(u,c,l)})}},62072:function(G,V,e){var m=e(24582),P=e(84985),i=e(95879),L=e(21780),A=e(66741),v=G.exports=function(p,t){var r,s,n,l,c;return arguments.length<2||typeof p!="string"?(l=t,t=p,p=null):l=arguments[2],m(p)?(r=A.call(p,"c"),s=A.call(p,"e"),n=A.call(p,"w")):(r=n=!0,s=!1),c={value:t,configurable:r,enumerable:s,writable:n},l?i(L(l),c):c};v.gs=function(p,t,r){var s,n,l,c;return typeof p!="string"?(l=r,r=t,t=p,p=null):l=arguments[3],m(t)?P(t)?m(r)?P(r)||(l=r,r=void 0):r=void 0:(l=t,t=r=void 0):t=void 0,m(p)?(s=A.call(p,"c"),n=A.call(p,"e")):(s=!0,n=!1),c={get:t,set:r,configurable:s,enumerable:n},l?i(L(l),c):c}},33064:function(G,V,e){e.d(V,{j2:function(){return m},Fp:function(){return L},J6:function(){return v},TS:function(){return p},VV:function(){return t},w6:function(){return r},Sm:function(){return s}});function m(n,l){return n<l?-1:n>l?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<g;){var f=u+g>>>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<g;){var f=u+g>>>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<c;)if((g=n[u])!=null&&g>=g)for(f=g;++u<c;)(g=n[u])!=null&&g>f&&(f=g)}else for(;++u<c;)if((g=l(n[u],u,n))!=null&&g>=g)for(f=g;++u<c;)(g=l(n[u],u,n))!=null&&g>f&&(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<c;)isNaN(f=A(n[g]))?--u:w+=f;else for(;++g<c;)isNaN(f=A(l(n[g],g,n)))?--u:w+=f;if(u)return w/u}function p(n){for(var l=n.length,c,u=-1,g=0,f,w;++u<l;)g+=n[u].length;for(f=new Array(g);--l>=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<c;)if((g=n[u])!=null&&g>=g)for(f=g;++u<c;)(g=n[u])!=null&&f>g&&(f=g)}else for(;++u<c;)if((g=l(n[u],u,n))!=null&&g>=g)for(f=g;++u<c;)(g=l(n[u],u,n))!=null&&f>g&&(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<g;)f[u]=n+u*c;return f}function s(n,l){var c=n.length,u=-1,g,f=0;if(l==null)for(;++u<c;)(g=+n[u])&&(f+=g);else for(;++u<c;)(g=+l(n[u],u,n))&&(f+=g);return f}},15140:function(G,V,e){e.d(V,{UI:function(){return L},b1:function(){return A}});var m="$";function P(){}P.prototype=i.prototype={constructor:P,has:function(l){return m+l in this},get:function(l){return this[m+l]},set:function(l,c){return this[m+l]=c,this},remove:function(l){var c=m+l;return c in this&&delete this[c]},clear:function(){for(var l in this)l[0]===m&&delete this[l]},keys:function(){var l=[];for(var c in this)c[0]===m&&l.push(c.slice(1));return l},values:function(){var l=[];for(var c in this)c[0]===m&&l.push(this[c]);return l},entries:function(){var l=[];for(var c in this)c[0]===m&&l.push({key:c.slice(1),value:this[c]});return l},size:function(){var l=0;for(var c in this)c[0]===m&&++l;return l},empty:function(){for(var l in this)if(l[0]===m)return!1;return!0},each:function(l){for(var c in this)c[0]===m&&l(this[c],c.slice(1),this)}};function i(l,c){var u=new P;if(l instanceof P)l.each(function(o,d){u.set(d,o)});else if(Array.isArray(l)){var g=-1,f=l.length,w;if(c==null)for(;++g<f;)u.set(g,l[g]);else for(;++g<f;)u.set(c(w=l[g],g,l),w)}else if(l)for(var h in l)u.set(h,l[h]);return u}var L=i;function A(){var l=[],c=[],u,g,f;function w(o,d,M,T){if(d>=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();++C<x;)(y=E.get(b=S(a=o[C])+""))?y.push(a):E.set(b,[a]);return E.each(function(I,B){T(z,B,w(I,d,M,T))}),z}function h(o,d){if(++d>l.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<Mt;++At)Vt=dt[At],Je+=Vt.x,De+=Vt.y;for(Je=Je/Mt-et,De=De/Mt-ct,At=0;At<Mt;++At)Vt=dt[At],Vt.x-=Je,Vt.y-=De}return pt.initialize=function(At){dt=At},pt.x=function(At){return arguments.length?(et=+At,pt):et},pt.y=function(At){return arguments.length?(ct=+At,pt):ct},pt}function P(et){return function(){return et}}function i(){return(Math.random()-.5)*1e-6}function L(et){var ct=+this._x.call(null,et),dt=+this._y.call(null,et);return A(this.cover(ct,dt),ct,dt,et)}function A(et,ct,dt,pt){if(isNaN(ct)||isNaN(dt))return et;var At,Mt=et._root,Vt={data:pt},Je=et._x0,De=et._y0,Ie=et._x1,ze=et._y1,Pe,be,se,ye,Le,Be,ot,at;if(!Mt)return et._root=Vt,et;for(;Mt.length;)if((Le=ct>=(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;dt<pt;++dt)isNaN(At=+this._x.call(null,ct=et[dt]))||isNaN(Mt=+this._y.call(null,ct))||(Vt[dt]=At,Je[dt]=Mt,At<De&&(De=At),At>ze&&(ze=At),Mt<Ie&&(Ie=Mt),Mt>Pe&&(Pe=Mt));if(De>ze||Ie>Pe)return this;for(this.cover(De,Ie).cover(ze,Pe),dt=0;dt<pt;++dt)A(this,Vt[dt],Je[dt],et[dt]);return this}function p(et,ct){if(isNaN(et=+et)||isNaN(ct=+ct))return this;var dt=this._x0,pt=this._y0,At=this._x1,Mt=this._y1;if(isNaN(dt))At=(dt=Math.floor(et))+1,Mt=(pt=Math.floor(ct))+1;else{for(var Vt=At-dt,Je=this._root,De,Ie;dt>et||et>=At||pt>ct||ct>=Mt;)switch(Ie=(ct<pt)<<1|et<dt,De=new Array(4),De[Ie]=Je,Je=De,Vt*=2,Ie){case 0:At=dt+Vt,Mt=pt+Vt;break;case 1:dt=At-Vt,Mt=pt+Vt;break;case 2:At=dt+Vt,pt=Mt-Vt;break;case 3:dt=At-Vt,pt=Mt-Vt;break}this._root&&this._root.length&&(this._root=Je)}return this._x0=dt,this._y0=pt,this._x1=At,this._y1=Mt,this}function t(){var et=[];return this.visit(function(ct){if(!ct.length)do et.push(ct.data);while(ct=ct.next)}),et}function r(et){return arguments.length?this.cover(+et[0][0],+et[0][1]).cover(+et[1][0],+et[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function s(et,ct,dt,pt,At){this.node=et,this.x0=ct,this.y0=dt,this.x1=pt,this.y1=At}function n(et,ct,dt){var pt,At=this._x0,Mt=this._y0,Vt,Je,De,Ie,ze=this._x1,Pe=this._y1,be=[],se=this._root,ye,Le;for(se&&be.push(new s(se,At,Mt,ze,Pe)),dt==null?dt=1/0:(At=et-dt,Mt=ct-dt,ze=et+dt,Pe=ct+dt,dt*=dt);ye=be.pop();)if(!(!(se=ye.node)||(Vt=ye.x0)>ze||(Je=ye.y0)>Pe||(De=ye.x1)<At||(Ie=ye.y1)<Mt))if(se.length){var Be=(Vt+De)/2,ot=(Je+Ie)/2;be.push(new s(se[3],Be,ot,De,Ie),new s(se[2],Vt,ot,Be,Ie),new s(se[1],Be,Je,De,ot),new s(se[0],Vt,Je,Be,ot)),(Le=(ct>=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<dt){var Bt=Math.sqrt(dt=It);At=et-Bt,Mt=ct-Bt,ze=et+Bt,Pe=ct+Bt,pt=se.data}}return pt}function l(et){if(isNaN(ze=+this._x.call(null,et))||isNaN(Pe=+this._y.call(null,et)))return this;var ct,dt=this._root,pt,At,Mt,Vt=this._x0,Je=this._y0,De=this._x1,Ie=this._y1,ze,Pe,be,se,ye,Le,Be,ot;if(!dt)return this;if(dt.length)for(;;){if((ye=ze>=(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;ct<dt;++ct)this.remove(et[ct]);return this}function u(){return this._root}function g(){var et=0;return this.visit(function(ct){if(!ct.length)do++et;while(ct=ct.next)}),et}function f(et){var ct=[],dt,pt=this._root,At,Mt,Vt,Je,De;for(pt&&ct.push(new s(pt,this._x0,this._y0,this._x1,this._y1));dt=ct.pop();)if(!et(pt=dt.node,Mt=dt.x0,Vt=dt.y0,Je=dt.x1,De=dt.y1)&&pt.length){var Ie=(Mt+Je)/2,ze=(Vt+De)/2;(At=pt[3])&&ct.push(new s(At,Ie,ze,Je,De)),(At=pt[2])&&ct.push(new s(At,Mt,ze,Ie,De)),(At=pt[1])&&ct.push(new s(At,Ie,Vt,Je,ze)),(At=pt[0])&&ct.push(new s(At,Mt,Vt,Ie,ze))}return this}function w(et){var ct=[],dt=[],pt;for(this._root&&ct.push(new s(this._root,this._x0,this._y0,this._x1,this._y1));pt=ct.pop();){var At=pt.node;if(At.length){var Mt,Vt=pt.x0,Je=pt.y0,De=pt.x1,Ie=pt.y1,ze=(Vt+De)/2,Pe=(Je+Ie)/2;(Mt=At[0])&&ct.push(new s(Mt,Vt,Je,ze,Pe)),(Mt=At[1])&&ct.push(new s(Mt,ze,Je,De,Pe)),(Mt=At[2])&&ct.push(new s(Mt,Vt,Pe,ze,Ie)),(Mt=At[3])&&ct.push(new s(Mt,ze,Pe,De,Ie))}dt.push(pt)}for(;pt=dt.pop();)et(pt.node,pt.x0,pt.y0,pt.x1,pt.y1);return this}function h(et){return et[0]}function o(et){return arguments.length?(this._x=et,this):this._x}function d(et){return et[1]}function M(et){return arguments.length?(this._y=et,this):this._y}function T(et,ct,dt){var pt=new C(ct??h,dt??d,NaN,NaN,NaN,NaN);return et==null?pt:pt.addAll(et)}function C(et,ct,dt,pt,At,Mt){this._x=et,this._y=ct,this._x0=dt,this._y0=pt,this._x1=At,this._y1=Mt,this._root=void 0}function x(et){for(var ct={data:et.data},dt=ct;et=et.next;)dt=dt.next={data:et.data};return ct}var S=T.prototype=C.prototype;S.copy=function(){var et=new C(this._x,this._y,this._x0,this._y0,this._x1,this._y1),ct=this._root,dt,pt;if(!ct)return et;if(!ct.length)return et._root=x(ct),et;for(dt=[{source:ct,target:et._root=new Array(4)}];ct=dt.pop();)for(var At=0;At<4;++At)(pt=ct.source[At])&&(pt.length?dt.push({source:pt,target:ct.target[At]=new Array(4)}):ct.target[At]=x(pt));return et},S.add=L,S.addAll=v,S.cover=p,S.data=t,S.extent=r,S.find=n,S.remove=l,S.removeAll=c,S.root=u,S.size=g,S.visit=f,S.visitAfter=w,S.x=o,S.y=M;function b(et){return et.x+et.vx}function a(et){return et.y+et.vy}function E(et){var ct,dt,pt=1,At=1;typeof et!="function"&&(et=P(et==null?1:+et));function Mt(){for(var De,Ie=ct.length,ze,Pe,be,se,ye,Le,Be=0;Be<At;++Be)for(ze=T(ct,b,a).visitAfter(Vt),De=0;De<Ie;++De)Pe=ct[De],ye=dt[Pe.index],Le=ye*ye,be=Pe.x+Pe.vx,se=Pe.y+Pe.vy,ze.visit(ot);function ot(at,wt,It,Bt,Gt){var Lt=at.data,Kt=at.r,ir=ye+Kt;if(Lt){if(Lt.index>Pe.index){var _r=be-Lt.x-Lt.vx,yt=se-Lt.y-Lt.vy,jt=_r*_r+yt*yt;jt<ir*ir&&(_r===0&&(_r=i(),jt+=_r*_r),yt===0&&(yt=i(),jt+=yt*yt),jt=(ir-(jt=Math.sqrt(jt)))/jt*pt,Pe.vx+=(_r*=jt)*(ir=(Kt*=Kt)/(Le+Kt)),Pe.vy+=(yt*=jt)*ir,Lt.vx-=_r*(ir=1-ir),Lt.vy-=yt*ir)}return}return wt>be+ir||Bt<be-ir||It>se+ir||Gt<se-ir}}function Vt(De){if(De.data)return De.r=dt[De.data.index];for(var Ie=De.r=0;Ie<4;++Ie)De[Ie]&&De[Ie].r>De.r&&(De.r=De[Ie].r)}function Je(){if(ct){var De,Ie=ct.length,ze;for(dt=new Array(Ie),De=0;De<Ie;++De)ze=ct[De],dt[ze.index]=+et(ze,De,ct)}}return Mt.initialize=function(De){ct=De,Je()},Mt.iterations=function(De){return arguments.length?(At=+De,Mt):At},Mt.strength=function(De){return arguments.length?(pt=+De,Mt):pt},Mt.radius=function(De){return arguments.length?(et=typeof De=="function"?De:P(+De),Je(),Mt):et},Mt}var y=e(15140);function z(et){return et.index}function I(et,ct){var dt=et.get(ct);if(!dt)throw new Error("missing: "+ct);return dt}function B(et){var ct=z,dt=ze,pt,At=P(30),Mt,Vt,Je,De,Ie=1;et==null&&(et=[]);function ze(Le){return 1/Math.min(Je[Le.source.index],Je[Le.target.index])}function Pe(Le){for(var Be=0,ot=et.length;Be<Ie;++Be)for(var at=0,wt,It,Bt,Gt,Lt,Kt,ir;at<ot;++at)wt=et[at],It=wt.source,Bt=wt.target,Gt=Bt.x+Bt.vx-It.x-It.vx||i(),Lt=Bt.y+Bt.vy-It.y-It.vy||i(),Kt=Math.sqrt(Gt*Gt+Lt*Lt),Kt=(Kt-Mt[at])/Kt*Le*pt[at],Gt*=Kt,Lt*=Kt,Bt.vx-=Gt*(ir=De[at]),Bt.vy-=Lt*ir,It.vx+=Gt*(ir=1-ir),It.vy+=Lt*ir}function be(){if(Vt){var Le,Be=Vt.length,ot=et.length,at=(0,y.UI)(Vt,ct),wt;for(Le=0,Je=new Array(Be);Le<ot;++Le)wt=et[Le],wt.index=Le,typeof wt.source!="object"&&(wt.source=I(at,wt.source)),typeof wt.target!="object"&&(wt.target=I(at,wt.target)),Je[wt.source.index]=(Je[wt.source.index]||0)+1,Je[wt.target.index]=(Je[wt.target.index]||0)+1;for(Le=0,De=new Array(ot);Le<ot;++Le)wt=et[Le],De[Le]=Je[wt.source.index]/(Je[wt.source.index]+Je[wt.target.index]);pt=new Array(ot),se(),Mt=new Array(ot),ye()}}function se(){if(Vt)for(var Le=0,Be=et.length;Le<Be;++Le)pt[Le]=+dt(et[Le],Le,et)}function ye(){if(Vt)for(var Le=0,Be=et.length;Le<Be;++Le)Mt[Le]=+At(et[Le],Le,et)}return Pe.initialize=function(Le){Vt=Le,be()},Pe.links=function(Le){return arguments.length?(et=Le,be(),Pe):et},Pe.id=function(Le){return arguments.length?(ct=Le,Pe):ct},Pe.iterations=function(Le){return arguments.length?(Ie=+Le,Pe):Ie},Pe.strength=function(Le){return arguments.length?(dt=typeof Le=="function"?Le:P(+Le),se(),Pe):dt},Pe.distance=function(Le){return arguments.length?(At=typeof Le=="function"?Le:P(+Le),ye(),Pe):At},Pe}var k={value:function(){}};function O(){for(var et=0,ct=arguments.length,dt={},pt;et<ct;++et){if(!(pt=arguments[et]+"")||pt in dt||/[\s.]/.test(pt))throw new Error("illegal type: "+pt);dt[pt]=[]}return new N(dt)}function N(et){this._=et}function _(et,ct){return et.trim().split(/^|\s+/).map(function(dt){var pt="",At=dt.indexOf(".");if(At>=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(;++Mt<Vt;)if((At=(et=pt[Mt]).type)&&(At=U(dt[At],et.name)))return At;return}if(ct!=null&&typeof ct!="function")throw new Error("invalid callback: "+ct);for(;++Mt<Vt;)if(At=(et=pt[Mt]).type)dt[At]=Y(dt[At],et.name,ct);else if(ct==null)for(At in dt)dt[At]=Y(dt[At],et.name,null);return this},copy:function(){var et={},ct=this._;for(var dt in ct)et[dt]=ct[dt].slice();return new N(et)},call:function(et,ct){if((At=arguments.length-2)>0)for(var dt=new Array(At),pt=0,At,Mt;pt<At;++pt)dt[pt]=arguments[pt+2];if(!this._.hasOwnProperty(et))throw new Error("unknown type: "+et);for(Mt=this._[et],pt=0,At=Mt.length;pt<At;++pt)Mt[pt].value.apply(ct,dt)},apply:function(et,ct,dt){if(!this._.hasOwnProperty(et))throw new Error("unknown type: "+et);for(var pt=this._[et],At=0,Mt=pt.length;At<Mt;++At)pt[At].value.apply(ct,dt)}};function U(et,ct){for(var dt=0,pt=et.length,At;dt<pt;++dt)if((At=et[dt]).name===ct)return At.value}function Y(et,ct,dt){for(var pt=0,At=et.length;pt<At;++pt)if(et[pt].name===ct){et[pt]=k,et=et.slice(0,pt).concat(et.slice(pt+1));break}return dt!=null&&et.push({name:ct,value:dt}),et}var J=O,te=0,ae=0,ce=0,Q=1e3,Z,j,K=0,ee=0,oe=0,q=typeof performance=="object"&&performance.now?performance:Date,$=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(et){setTimeout(et,17)};function le(){return ee||($(ie),ee=q.now()+oe)}function ie(){ee=0}function he(){this._call=this._time=this._next=null}he.prototype=me.prototype={constructor:he,restart:function(et,ct,dt){if(typeof et!="function")throw new TypeError("callback is not a function");dt=(dt==null?le():+dt)+(ct==null?0:+ct),!this._next&&j!==this&&(j?j._next=this:Z=this,j=this),this._call=et,this._time=dt,Ee()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ee())}};function me(et,ct,dt){var pt=new he;return pt.restart(et,ct,dt),pt}function Me(){le(),++te;for(var et=Z,ct;et;)(ct=ee-et._time)>=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),dt<pt&&(De.stop(),Ie.call("end",ct))}function Pe(ye){var Le,Be=et.length,ot;ye===void 0&&(ye=1);for(var at=0;at<ye;++at)for(dt+=(Mt-dt)*At,Je.each(function(wt){wt(dt)}),Le=0;Le<Be;++Le)ot=et[Le],ot.fx==null?ot.x+=ot.vx*=Vt:(ot.x=ot.fx,ot.vx=0),ot.fy==null?ot.y+=ot.vy*=Vt:(ot.y=ot.fy,ot.vy=0);return ct}function be(){for(var ye=0,Le=et.length,Be;ye<Le;++ye){if(Be=et[ye],Be.index=ye,Be.fx!=null&&(Be.x=Be.fx),Be.fy!=null&&(Be.y=Be.fy),isNaN(Be.x)||isNaN(Be.y)){var ot=Ue*Math.sqrt(ye),at=ye*He;Be.x=ot*Math.cos(at),Be.y=ot*Math.sin(at)}(isNaN(Be.vx)||isNaN(Be.vy))&&(Be.vx=Be.vy=0)}}function se(ye){return ye.initialize&&ye.initialize(et),ye}return be(),ct={tick:Pe,restart:function(){return De.restart(ze),ct},stop:function(){return De.stop(),ct},nodes:function(ye){return arguments.length?(et=ye,be(),Je.each(se),ct):et},alpha:function(ye){return arguments.length?(dt=+ye,ct):dt},alphaMin:function(ye){return arguments.length?(pt=+ye,ct):pt},alphaDecay:function(ye){return arguments.length?(At=+ye,ct):+At},alphaTarget:function(ye){return arguments.length?(Mt=+ye,ct):Mt},velocityDecay:function(ye){return arguments.length?(Vt=1-ye,ct):1-Vt},force:function(ye,Le){return arguments.length>1?(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;ot<at;++ot)Gt=et[ot],wt=ye-Gt.x,It=Le-Gt.y,Bt=wt*wt+It*It,Bt<Be&&(Lt=Gt,Be=Bt);return Lt},on:function(ye,Le){return arguments.length>1?(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<ye;++se)ct=et[se],Le.visit(Pe)}function Ie(){if(et){var be,se=et.length,ye;for(At=new Array(se),be=0;be<se;++be)ye=et[be],At[ye.index]=+pt(ye,be,et)}}function ze(be){var se=0,ye,Le,Be=0,ot,at,wt;if(be.length){for(ot=at=wt=0;wt<4;++wt)(ye=be[wt])&&(Le=Math.abs(ye.value))&&(se+=ye.value,Be+=Le,ot+=Le*ye.x,at+=Le*ye.y);be.x=ot/Be,be.y=at/Be}else{ye=be,ye.x=ye.data.x,ye.y=ye.data.y;do se+=At[ye.data.index];while(ye=ye.next)}be.value=se}function Pe(be,se,ye,Le){if(!be.value)return!0;var Be=be.x-ct.x,ot=be.y-ct.y,at=Le-se,wt=Be*Be+ot*ot;if(at*at/Je<wt)return wt<Vt&&(Be===0&&(Be=i(),wt+=Be*Be),ot===0&&(ot=i(),wt+=ot*ot),wt<Mt&&(wt=Math.sqrt(Mt*wt)),ct.vx+=Be*be.value*dt/wt,ct.vy+=ot*be.value*dt/wt),!0;if(be.length||wt>=Vt)return;(be.data!==ct||be.next)&&(Be===0&&(Be=i(),wt+=Be*Be),ot===0&&(ot=i(),wt+=ot*ot),wt<Mt&&(wt=Math.sqrt(Mt*wt)));do be.data!==ct&&(at=At[be.data.index]*dt/wt,ct.vx+=Be*at,ct.vy+=ot*at);while(be=be.next)}return De.initialize=function(be){et=be,Ie()},De.strength=function(be){return arguments.length?(pt=typeof be=="function"?be:P(+be),Ie(),De):pt},De.distanceMin=function(be){return arguments.length?(Mt=be*be,De):Math.sqrt(Mt)},De.distanceMax=function(be){return arguments.length?(Vt=be*be,De):Math.sqrt(Vt)},De.theta=function(be){return arguments.length?(Je=be*be,De):Math.sqrt(Je)},De}function nt(et,ct,dt){var pt,At=P(.1),Mt,Vt;typeof et!="function"&&(et=P(+et)),ct==null&&(ct=0),dt==null&&(dt=0);function Je(Ie){for(var ze=0,Pe=pt.length;ze<Pe;++ze){var be=pt[ze],se=be.x-ct||1e-6,ye=be.y-dt||1e-6,Le=Math.sqrt(se*se+ye*ye),Be=(Vt[ze]-Le)*Mt[ze]*Ie/Le;be.vx+=se*Be,be.vy+=ye*Be}}function De(){if(pt){var Ie,ze=pt.length;for(Mt=new Array(ze),Vt=new Array(ze),Ie=0;Ie<ze;++Ie)Vt[Ie]=+et(pt[Ie],Ie,pt),Mt[Ie]=isNaN(Vt[Ie])?0:+At(pt[Ie],Ie,pt)}}return Je.initialize=function(Ie){pt=Ie,De()},Je.strength=function(Ie){return arguments.length?(At=typeof Ie=="function"?Ie:P(+Ie),De(),Je):At},Je.radius=function(Ie){return arguments.length?(et=typeof Ie=="function"?Ie:P(+Ie),De(),Je):et},Je.x=function(Ie){return arguments.length?(ct=+Ie,Je):ct},Je.y=function(Ie){return arguments.length?(dt=+Ie,Je):dt},Je}function qe(et){var ct=P(.1),dt,pt,At;typeof et!="function"&&(et=P(et==null?0:+et));function Mt(Je){for(var De=0,Ie=dt.length,ze;De<Ie;++De)ze=dt[De],ze.vx+=(At[De]-ze.x)*pt[De]*Je}function Vt(){if(dt){var Je,De=dt.length;for(pt=new Array(De),At=new Array(De),Je=0;Je<De;++Je)pt[Je]=isNaN(At[Je]=+et(dt[Je],Je,dt))?0:+ct(dt[Je],Je,dt)}}return Mt.initialize=function(Je){dt=Je,Vt()},Mt.strength=function(Je){return arguments.length?(ct=typeof Je=="function"?Je:P(+Je),Vt(),Mt):ct},Mt.x=function(Je){return arguments.length?(et=typeof Je=="function"?Je:P(+Je),Vt(),Mt):et},Mt}function $e(et){var ct=P(.1),dt,pt,At;typeof et!="function"&&(et=P(et==null?0:+et));function Mt(Je){for(var De=0,Ie=dt.length,ze;De<Ie;++De)ze=dt[De],ze.vy+=(At[De]-ze.y)*pt[De]*Je}function Vt(){if(dt){var Je,De=dt.length;for(pt=new Array(De),At=new Array(De),Je=0;Je<De;++Je)pt[Je]=isNaN(At[Je]=+et(dt[Je],Je,dt))?0:+ct(dt[Je],Je,dt)}}return Mt.initialize=function(Je){dt=Je,Vt()},Mt.strength=function(Je){return arguments.length?(ct=typeof Je=="function"?Je:P(+Je),Vt(),Mt):ct},Mt.y=function(Je){return arguments.length?(et=typeof Je=="function"?Je:P(+Je),Vt(),Mt):et},Mt}},60721:function(G,V,e){e.d(V,{WU:function(){return o},FF:function(){return w}});function m(M){return Math.abs(M=Math.round(M))>=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;C<T;++C)switch(M[C]){case".":x=S=C;break;case"0":x===0&&(x=C),S=C;break;default:if(!+M[C])break e;x>0&&(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;++le<ie;)if(he=oe.charCodeAt(le),48>he||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<Y?new Array(Y-Me+1).join(k):"";switch(J&&U&&(oe=T(Te+oe,Te.length?Y-$.length:1/0),Te=""),O){case"<":oe=q+oe+$+Te;break;case"=":oe=q+Te+oe+$;break;case"^":oe=Te.slice(0,Me=Te.length>>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 vt<d?[je,t(g(d+rt/2))]:[je*A(vt)*(2*T-1/u(vt)),c(rt)*(2*T*(vt-d)-t(g(vt/2)))]}K.invert=function(je,rt){if((Pt=P(rt))<j)return[je,2*i(v(rt))-o];var vt=d,gt=25,kt,Pt;do{var Ot=A(vt/2),cr=g(vt/2);vt-=kt=(Z*(vt-d)-t(cr)-Pt)/(Z-Ot*Ot/(2*cr))}while(P(kt)>w&&--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;Pr<je;++Pr,mn-=Yr,bn-=Jr)Tr.point(L(Ot*A(bn),Pt)*S,E(Ot*u(bn))*S),mn<-90?(Tr.point(-90,-180-mn-kt),Tr.point(-90,-180-mn+kt)):(Tr.point(90,mn+kt),Tr.point(90,mn-kt));Tr.lineEnd(),Tr.polygonEnd()},ar},vt.scale(87.8076).center([0,17.1875]).clipAngle(179.999)}var le=e(12956);function ie(je,rt){if(arguments.length<2&&(rt=je),rt===1)return le.l;if(rt===1/0)return he;function vt(gt,kt){var Pt=(0,le.l)(gt/rt,kt);return Pt[0]*=je,Pt}return vt.invert=function(gt,kt){var Pt=le.l.invert(gt/je,kt);return Pt[0]*=rt,Pt},vt}function he(je,rt){return[je*A(rt)/A(rt/=2),2*u(rt)]}he.invert=function(je,rt){var vt=2*E(rt/2);return[je*A(vt/2)/A(vt),vt]};function me(){var je=2,rt=(0,m.r)(ie),vt=rt(je);return vt.coefficient=function(gt){return arguments.length?rt(je=+gt):je},vt.scale(169.529)}function Me(je,rt,vt){var gt=100,kt,Pt,Ot;vt=vt===void 0?0:+vt,rt=+rt;do Pt=je(vt),Ot=je(vt+f),Pt===Ot&&(Ot=Pt+f),vt-=kt=-1*f*(Pt-rt)/(Pt-Ot);while(gt-- >0&&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;Tr<rt;Tr++){var Pr=je(Pt,Ot),Yr=Pr[0]-gt,Jr=Pr[1]-kt;if(P(Yr)<vt&&P(Jr)<vt)break;var mn=Yr*Yr+Jr*Jr;if(mn>cr){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)<vt&&P(ar)<vt)break}return[Pt,Ot]}}function Oe(){var je=ie(1.68,2),rt=1.4,vt=12;function gt(kt,Pt){if(kt+Pt<-rt){var Ot=(kt-Pt+1.6)*(kt+Pt+rt)/8;kt+=Ot,Pt-=.8*Ot*u(Pt+h/2)}var cr=je(kt,Pt),gr=(1-A(kt*Pt))/vt;return cr[1]<0&&(cr[0]*=1+gr),cr[1]>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&&gt*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)<f?[0,gt]:kt&&[vt,gt]};function Qt(){return(0,m.Z)($t).scale(62.5271)}var or=A(35*b);function Er(je,rt){var vt=g(rt/2);return[je*or*z(1-vt*vt),(1+or)*vt]}Er.invert=function(je,rt){var vt=rt/(1+or);return[je&&je/(or*z(1-vt*vt)),2*i(vt)]};function Ye(){return(0,m.Z)(Er).scale(137.152)}function We(je,rt){var vt=rt/2,gt=A(vt);return[2*je/C*A(rt)*gt*gt,C*g(vt)]}We.invert=function(je,rt){var vt=i(rt/C),gt=A(vt),kt=2*vt;return[je*C/2/(A(kt)*gt*gt),kt]};function Dt(){return(0,m.Z)(We).scale(135.264)}function Ft(je){var rt=1-je,vt=Pt(h,0)[0]-Pt(-h,0)[0],gt=Pt(0,o)[1]-Pt(0,-o)[1],kt=z(2*gt/vt);function Pt(gr,ar){var Tr=A(ar),Pr=u(ar);return[Tr/(rt+je*Tr)*gr,rt*ar+je*Pr]}function Ot(gr,ar){var Tr=Pt(gr,ar);return[Tr[0]*kt,Tr[1]/kt]}function cr(gr){return Ot(0,gr)[1]}return Ot.invert=function(gr,ar){var Tr=Me(cr,ar),Pr=gr/kt*(je+rt/A(Tr));return[Pr,Tr]},Ot}function Zt(){var je=.5,rt=(0,m.r)(Ft),vt=rt(je);return vt.alpha=function(gt){return arguments.length?rt(je=+gt):je},vt.scale(168.725)}var nr=e(57962),lr=e(97492);function rr(je){return[je[0]/2,E(g(je[1]/2*b))*S]}function zt(je){return[je[0]*2,2*i(u(je[1]*b))*S]}function fr(je){je==null&&(je=nr.Z);var rt=je(),vt=(0,lr.Z)().scale(S).precision(0).clipAngle(null).translate([0,0]);function gt(Pt){return rt(rr(Pt))}rt.invert&&(gt.invert=function(Pt){return zt(rt.invert(Pt))}),gt.stream=function(Pt){var Ot=rt.stream(Pt),cr=vt.stream({point:function(gr,ar){Ot.point(gr/2,E(g(-ar/2*b))*S)},lineStart:function(){Ot.lineStart()},lineEnd:function(){Ot.lineEnd()},polygonStart:function(){Ot.polygonStart()},polygonEnd:function(){Ot.polygonEnd()}});return cr.sphere=Ot.sphere,cr};function kt(Pt){gt[Pt]=function(){return arguments.length?(rt[Pt].apply(rt,arguments),gt):rt[Pt]()}}return gt.rotate=function(Pt){return arguments.length?(vt.rotate(Pt),gt):vt.rotate()},gt.center=function(Pt){return arguments.length?(rt.center(rr(Pt)),gt):zt(rt.center())},kt("angle"),kt("clipAngle"),kt("clipExtent"),kt("fitExtent"),kt("fitHeight"),kt("fitSize"),kt("fitWidth"),kt("scale"),kt("translate"),kt("precision"),gt.scale(249.5)}function dr(je,rt){var vt=2*h/rt,gt=je*je;function kt(Pt,Ot){var cr=(0,oe.N)(Pt,Ot),gr=cr[0],ar=cr[1],Tr=gr*gr+ar*ar;if(Tr>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),gr<o&&(ar-=Rn*(gr-o));var ka=u(Jr),ai=A(Jr);cr[0]=gr*ai-ar*ka,cr[1]=gr*ka+ar*ai}return cr}return kt.invert=function(Pt,Ot){var cr=Pt*Pt+Ot*Ot;if(cr>gt){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=Pt<o?1/0:0,Rn=10;;){var ha=je*u(mn),Ca=je*A(mn),Ra=u(Ca),Da=o-Ca,ka=(ha-mn*Ra)/Da,ai=pr(mn,ka);if(P(bn)<w||!--Rn)break;mn-=bn=(mn*Jr-ka*Yr-Ot)/(Jr-Yr*2*(Da*(Ca+mn*ha*A(Ca)-Ra)-ha*(ha-mn*Ra))/(Da*Da))}gr=je+vr(ai,Ca,Pt)*(h-je)/vr(ai,Ca,h),ar=Tr+mn,Pt=gr*A(ar),Ot=gr*u(ar)}return oe.N.invert(Pt,Ot)},kt}function pr(je,rt){return function(vt){var gt=je*A(vt);return vt<o&&(gt-=rt),z(1+gt*gt)}}function vr(je,rt,vt){for(var gt=50,kt=(vt-rt)/gt,Pt=je(rt)+je(vt),Ot=1,cr=rt;Ot<gt;++Ot)Pt+=2*je(cr+=kt);return Pt*.5*kt}function Hr(){var je=6,rt=30*b,vt=A(rt),gt=u(rt),kt=(0,m.r)(dr),Pt=kt(rt,je),Ot=Pt.stream,cr=.01,gr=-A(cr*b),ar=u(cr*b);return Pt.radius=function(Tr){return arguments.length?(vt=A(rt=Tr*b),gt=u(rt),kt(rt,je)):rt*S},Pt.lobes=function(Tr){return arguments.length?kt(rt,je=+Tr):je},Pt.stream=function(Tr){var Pr=Pt.rotate(),Yr=Ot(Tr),Jr=(Pt.rotate([0,0]),Ot(Tr));return Pt.rotate(Pr),Yr.sphere=function(){Jr.polygonStart(),Jr.lineStart();for(var mn=0,bn=2*h/je,Rn=0;mn<je;++mn,Rn-=bn)Jr.point(L(ar*A(Rn),gr)*S,E(ar*u(Rn))*S),Jr.point(L(gt*A(Rn-bn/2),vt)*S,E(gt*u(Rn-bn/2))*S);Jr.lineEnd(),Jr.polygonEnd()},Yr},Pt.rotate([90,-40]).scale(91.7095).clipAngle(179.999)}function Ir(je,rt,vt,gt,kt,Pt,Ot,cr){arguments.length<8&&(cr=0);function gr(ar,Tr){if(!Tr)return[je*ar/h,0];var Pr=Tr*Tr,Yr=je+Pr*(rt+Pr*(vt+Pr*gt)),Jr=Tr*(kt-1+Pr*(Pt-cr+Pr*Ot)),mn=(Yr*Yr+Jr*Jr)/(2*Jr),bn=ar*E(Yr/mn)/h;return[mn*u(bn),Tr*(1+Pr*cr)+mn*(1-A(bn))]}return gr.invert=function(ar,Tr){var Pr=h*ar/je,Yr=Tr,Jr,mn,bn=50;do{var Rn=Yr*Yr,ha=je+Rn*(rt+Rn*(vt+Rn*gt)),Ca=Yr*(kt-1+Rn*(Pt-cr+Rn*Ot)),Ra=ha*ha+Ca*Ca,Da=2*Ca,ka=Ra/Da,ai=ka*ka,Di=E(ha/ka)/h,di=Pr*Di,fe=ha*ha,Ce=(2*rt+Rn*(4*vt+Rn*6*gt))*Yr,Ve=kt+Rn*(3*Pt+Rn*5*Ot),Qe=2*(ha*Ce+Ca*(Ve-1)),tt=2*(Ve-1),it=(Qe*Da-Ra*tt)/(Da*Da),Rt=A(di),ht=u(di),Ut=ka*Rt,er=ka*ht,tr=Pr/h*(1/z(1-fe/ai))*(Ce*ka-ha*it)/ai,Lr=er-ar,Sr=Yr*(1+Rn*cr)+ka-Ut-Tr,Kr=it*ht+Ut*tr,en=Ut*Di,Dr=1+it-(it*Rt-er*tr),Ur=er*Di,Zr=Kr*Ur-Dr*en;if(!Zr)break;Pr-=Jr=(Sr*Kr-Lr*Dr)/Zr,Yr-=mn=(Lr*Ur-Sr*en)/Zr}while((P(Jr)>f||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<h/4&&je>.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)<w||--Pt===0||Rn===0)break;Rn>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<f)return Pt=u(je),gt=A(je),vt=rt*(je-Pt*gt)/4,[Pt-vt*gt,gt+vt*Pt,1-rt*Pt*Pt/2,je-vt];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<ar;)Ot.point((Pr=gr[Tr])[0],Pr[1]);for(Ot.lineEnd(),gr=Pt.radius(90+cr)().coordinates[0],ar=gr.length-1,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)<cr?Rn+Da:(ha=rt+Pr*.5,Ca=ia(je,rt,ha,gt,Yr,kt,mn,cr*.5,gr,ar+1,Tr),isNaN(Ca)?(Tr.nanEncountered=!0,NaN):(Ra=ia(je,ha,vt,kt,Jr,Pt,bn,cr*.5,gr,ar+1,Tr),isNaN(Ra)?(Tr.nanEncountered=!0,NaN):Ca+Ra))}function oa(je,rt,vt,gt,kt){var Pt={maxDepthCount:0,nanEncountered:!1};gt===void 0&&(gt=1e-8),kt===void 0&&(kt=20);var Ot=je(rt),cr=je(.5*(rt+vt)),gr=je(vt),ar=(Ot+4*cr+gr)*(vt-rt)/6,Tr=ia(je,rt,vt,Ot,cr,gr,ar,gt,kt,1,Pt);return Tr}function da(je,rt,vt){function gt(Jr){return je+(1-je)*n(1-n(Jr,rt),1/rt)}function kt(Jr){return oa(gt,0,Jr,1e-4)}for(var Pt=1/kt(1),Ot=1e3,cr=(1+1e-8)*Pt,gr=[],ar=0;ar<=Ot;ar++)gr.push(kt(ar/Ot)*cr);function Tr(Jr){var mn=0,bn=Ot,Rn=Ot>>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])<f&&P(je[1]-rt[1])<f}function yo(je,rt){for(var vt=-1,gt=je.length,kt=je[0],Pt,Ot,cr,gr=[];++vt<gt;){Pt=je[vt],Ot=(Pt[0]-kt[0])/rt,cr=(Pt[1]-kt[1])/rt;for(var ar=0;ar<rt;++ar)gr.push([kt[0]+ar*Ot,kt[1]+ar*cr]);kt=Pt}return gr.push(Pt),gr}function So(je){var rt=[],vt,gt,kt,Pt,Ot,cr,gr,ar=je[0].length;for(gr=0;gr<ar;++gr)vt=je[0][gr],gt=vt[0][0],kt=vt[0][1],Pt=vt[1][1],Ot=vt[2][0],cr=vt[2][1],rt.push(yo([[gt+f,kt+f],[gt+f,Pt-f],[Ot-f,Pt-f],[Ot-f,cr+f]],30));for(gr=je[1].length-1;gr>=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;Yr<Jr&&gr>Pr[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;Yr<Jr;++Yr){var mn=Tr[Yr];if(mn[0][0]<=gr&&gr<mn[1][0]&&mn[0][1]<=ar&&ar<mn[1][1]){var bn=je.invert(gr-je(Pr[Yr][1][0],0)[0],ar);return bn[0]+=Pr[Yr][1][0],co(Pt(bn[0],bn[1]),[gr,ar])?bn:null}}});var Ot=(0,m.Z)(Pt),cr=Ot.stream;return Ot.stream=function(gr){var ar=Ot.rotate(),Tr=cr(gr),Pr=(Ot.rotate([0,0]),cr(gr));return Ot.rotate(ar),Tr.sphere=function(){(0,Pa.Z)(gt,Pr)},Tr},Ot.lobes=function(gr){return arguments.length?(gt=So(gr),rt=gr.map(function(ar){return ar.map(function(Tr){return[[Tr[0][0]*b,Tr[0][1]*b],[Tr[1][0]*b,Tr[1][1]*b],[Tr[2][0]*b,Tr[2][1]*b]]})}),kt=rt.map(function(ar){return ar.map(function(Tr){var Pr=je(Tr[0][0],Tr[0][1])[0],Yr=je(Tr[2][0],Tr[2][1])[0],Jr=je(Tr[1][0],Tr[0][1])[1],mn=je(Tr[1][0],Tr[1][1])[1],bn;return Jr>mn&&(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)<f)return[0,gt<0?-2:2];var kt=u(gt),Pt=n((1+kt)/(1-kt),je/2),Ot=.5*(Pt+1/Pt)+A(vt*=je);return[2*u(vt)/Ot,(Pt-1/Pt)/Ot]}return rt.invert=function(vt,gt){var kt=P(gt);if(P(kt-2)<f)return vt?null:[0,c(gt)*o];if(kt>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;gt<Ls?Pt*=gt/Ls:kt+=6*y(Ls/gt);for(var Ot=0;Ot<25;Ot++){var cr=u(Pt),gr=z(A(Pt)),ar=u(Pt/2),Tr=A(Pt/2),Pr=u(kt/6),Yr=A(kt/6),Jr=.5*kt*(1+gr)-vt,mn=Pt/(Tr*Yr)-gt,bn=gr?-.25*kt*cr/gr:0,Rn=.5*(1+gr),ha=(1+.5*Pt*ar/Tr)/(Tr*Yr),Ca=Pt/Tr*(Pr/6)/(Yr*Yr),Ra=bn*Ca-ha*Rn,Da=(Jr*Ca-mn*Rn)/Ra,ka=(mn*bn-Jr*ha)/Ra;if(Pt-=Da,kt-=ka,P(Da)<f&&P(ka)<f)break}return[je<0?-kt:kt,rt<0?-Pt:Pt]};function ec(){return(0,m.Z)(eo).scale(97.2672)}function cs(je,rt){var vt=je*je,gt=rt*rt;return[je*(.975534+gt*(-.119161+vt*-.0143059+gt*-.0547009)),rt*(1.00384+vt*(.0802894+gt*-.02855+vt*199025e-9)+gt*(.0998909+gt*-.0491032))]}cs.invert=function(je,rt){var vt=c(je)*h,gt=rt/2,kt=50;do{var Pt=vt*vt,Ot=gt*gt,cr=vt*gt,gr=vt*(.975534+Ot*(-.119161+Pt*-.0143059+Ot*-.0547009))-je,ar=gt*(1.00384+Pt*(.0802894+Ot*-.02855+Pt*199025e-9)+Ot*(.0998909+Ot*-.0491032))-rt,Tr=.975534-Ot*(.119161+3*Pt*.0143059+Ot*.0547009),Pr=-cr*(2*.119161+4*.0547009*Ot+2*.0143059*Pt),Yr=cr*(2*.0802894+4*199025e-9*Pt+2*-.02855*Ot),Jr=1.00384+Pt*(.0802894+199025e-9*Pt)+Ot*(3*(.0998909-.02855*Pt)-5*.0491032*Ot),mn=Pr*Yr-Jr*Tr,bn=(ar*Pr-gr*Jr)/mn,Rn=(gr*Yr-ar*Tr)/mn;vt-=bn,gt-=Rn}while((P(bn)>f||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)<f?kt*rt:P(cr=d+Pt/2)<f||P(P(cr)-o)<f?0:kt*Ot/t(g(cr)/vt);return[cr,Ot]}return gt.invert=function(kt,Pt){var Ot,cr=Pt+je;return[P(Pt)<f?kt/rt:P(Ot=d+cr/2)<f||P(P(Ot)-o)<f?0:kt*t(g(Ot)/vt)/Pt,cr]},gt}function vf(){return qe(hs).parallel(40).scale(158.837)}function df(je,rt){return[je,1.25*t(g(d+.4*rt))]}df.invert=function(je,rt){return[je,2.5*i(v(.8*rt))-.625*h]};function eh(){return(0,m.Z)(df).scale(108.318)}function su(je){var rt=je.length-1;function vt(gt,kt){for(var Pt=A(kt),Ot=2/(1+Pt*A(gt)),cr=Ot*Pt*u(gt),gr=Ot*u(kt),ar=rt,Tr=je[ar],Pr=Tr[0],Yr=Tr[1],Jr;--ar>=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)<f));kt++);return[je*(1+2*A(gt)/A(gt/2))/(3*T),2*z(3)*u(gt/2)/z(2+T)]}Rs.invert=function(je,rt){var vt=rt*z(2+T)/(2*z(3)),gt=2*E(vt);return[3*T*je/(1+2*A(gt)/A(gt/2)),E((vt+u(gt))/(1+M))]};function rc(){return(0,m.Z)(Rs).scale(188.209)}function yf(je,rt){for(var vt=z(6/(4+h)),gt=(1+h/4)*u(rt),kt=rt/2,Pt=0,Ot;Pt<25&&(kt-=Ot=(kt/2+u(kt)-gt)/(.5+A(kt)),!(P(Ot)<f));Pt++);return[vt*(.5+A(kt))*je/1.5,vt*kt]}yf.invert=function(je,rt){var vt=z(6/(4+h)),gt=rt/vt;return P(P(gt)-o)<f&&(gt=gt<0?-o:o),[1.5*je/(vt*(.5+A(gt))),E((gt/2+u(gt))/(1+h/4))]};function uh(){return(0,m.Z)(yf).scale(166.518)}var Ho=e(26867);function dl(je,rt){var vt=rt*rt,gt=vt*vt,kt=vt*gt;return[je*(.84719-.13063*vt+kt*kt*(-.04515+.05494*vt-.02326*gt+.00331*kt)),rt*(1.01183+gt*gt*(-.02625+.01926*vt-.00396*gt))]}dl.invert=function(je,rt){var vt=rt,gt=25,kt,Pt,Ot,cr;do Pt=vt*vt,Ot=Pt*Pt,vt-=kt=(vt*(1.01183+Ot*Ot*(-.02625+.01926*Pt-.00396*Ot))-rt)/(1.01183+Ot*Ot*(-.23625+.21186*Pt+-.05148*Ot));while(P(kt)>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)return[je,0];var vt=g(rt),gt=je*u(rt);return[u(gt)/vt,rt+(1-A(gt))/vt]}bf.invert=function(je,rt){if(P(rt)<f)return[je,0];var vt=je*je+rt*rt,gt=rt*.5,kt=10,Pt;do{var Ot=g(gt),cr=1/A(gt),gr=vt-2*rt*gt+gt*gt;gt-=Pt=(Ot*gr+2*(gt-rt))/(2+gr*cr*cr+2*(gt-rt)*Ot)}while(P(Pt)>f&&--kt>0);return Ot=g(gt),[(P(rt)<P(gt+1/Ot)?E(je*Ot):c(rt)*c(je)*(y(P(je*Ot))+o))/u(gt),gt]};function ch(){return(0,m.Z)(bf).scale(103.74)}var Bu=e(77338),uu=e(83074);function wf(je,rt){var vt=Af(je[1],je[0]),gt=Af(rt[1],rt[0]),kt=Mf(vt,gt),Pt=Uu(vt)/Uu(gt);return fu([1,0,je[0][0],0,1,je[0][1]],fu([Pt,0,0,0,Pt,0],fu([A(kt),u(kt),0,-u(kt),A(kt),0],[1,0,-rt[0][0],0,1,-rt[0][1]])))}function Tf(je){var rt=1/(je[0]*je[4]-je[1]*je[3]);return[rt*je[4],-rt*je[1],rt*(je[1]*je[5]-je[2]*je[4]),-rt*je[3],rt*je[0],rt*(je[2]*je[3]-je[0]*je[5])]}function fu(je,rt){return[je[0]*rt[0]+je[1]*rt[3],je[0]*rt[1]+je[1]*rt[4],je[0]*rt[2]+je[1]*rt[5]+je[2],je[3]*rt[0]+je[4]*rt[3],je[3]*rt[1]+je[4]*rt[4],je[3]*rt[2]+je[4]*rt[5]+je[5]]}function Af(je,rt){return[je[0]-rt[0],je[1]-rt[1]]}function Uu(je){return z(je[0]*je[0]+je[1]*je[1])}function Mf(je,rt){return L(je[0]*rt[1]-je[1]*rt[0],je[0]*rt[0]+je[1]*rt[1])}function vi(je,rt,vt){gt(je,{transform:null});function gt(ar,Tr){if(ar.edges=pl(ar.face),Tr.face){var Pr=ar.shared=Ul(ar.face,Tr.face),Yr=wf(Pr.map(Tr.project),Pr.map(ar.project));ar.transform=Tr.transform?fu(Tr.transform,Yr):Yr;for(var Jr=Tr.edges,mn=0,bn=Jr.length;mn<bn;++mn)$o(Pr[0],Jr[mn][1])&&$o(Pr[1],Jr[mn][0])&&(Jr[mn]=ar),$o(Pr[0],Jr[mn][0])&&$o(Pr[1],Jr[mn][1])&&(Jr[mn]=ar);for(Jr=ar.edges,mn=0,bn=Jr.length;mn<bn;++mn)$o(Pr[0],Jr[mn][0])&&$o(Pr[1],Jr[mn][1])&&(Jr[mn]=Tr),$o(Pr[0],Jr[mn][1])&&$o(Pr[1],Jr[mn][0])&&(Jr[mn]=Tr)}else ar.transform=Tr.transform;return ar.children&&ar.children.forEach(function(Rn){gt(Rn,ar)}),ar}function kt(ar,Tr){var Pr=rt(ar,Tr),Yr=Pr.project([ar*S,Tr*S]),Jr;return(Jr=Pr.transform)?[Jr[0]*Yr[0]+Jr[1]*Yr[1]+Jr[2],-(Jr[3]*Yr[0]+Jr[4]*Yr[1]+Jr[5])]:(Yr[1]=-Yr[1],Yr)}Sf(je)&&(kt.invert=function(ar,Tr){var Pr=Pt(je,[ar,-Tr]);return Pr&&(Pr[0]*=b,Pr[1]*=b,Pr)});function Pt(ar,Tr){var Pr=ar.project.invert,Yr=ar.transform,Jr=Tr;if(Yr&&(Yr=Tf(Yr),Jr=[Yr[0]*Jr[0]+Yr[1]*Jr[1]+Yr[2],Yr[3]*Jr[0]+Yr[4]*Jr[1]+Yr[5]]),Pr&&ar===Ot(mn=Pr(Jr)))return mn;for(var mn,bn=ar.children,Rn=0,ha=bn&&bn.length;Rn<ha;++Rn)if(mn=Pt(bn[Rn],Tr))return mn}function Ot(ar){return rt(ar[0]*b,ar[1]*b)}var cr=(0,m.Z)(kt),gr=cr.stream;return cr.stream=function(ar){var Tr=cr.rotate(),Pr=gr(ar),Yr=(cr.rotate([0,0]),gr(ar));return cr.rotate(Tr),Pr.sphere=function(){Yr.polygonStart(),Yr.lineStart(),ic(Yr,je),Yr.lineEnd(),Yr.polygonEnd()},Pr},cr.angle(vt==null?-30:vt*S)}function ic(je,rt,vt){var gt,kt=rt.edges,Pt=kt.length,Ot,cr={type:"MultiPoint",coordinates:rt.face},gr=rt.face.filter(function(bn){return P(bn[1])!==90}),ar=(0,Bu.Z)({type:"MultiPoint",coordinates:gr}),Tr=!1,Pr=-1,Yr=ar[1][0]-ar[0][0],Jr=Yr===180||Yr===360?[(ar[0][0]+ar[1][0])/2,(ar[0][1]+ar[1][1])/2]:(0,Je.Z)(cr);if(vt)for(;++Pr<Pt&&kt[Pr]!==vt;);++Pr;for(var mn=0;mn<Pt;++mn)Ot=kt[(mn+Pr)%Pt],Array.isArray(Ot)?(Tr||(je.point((gt=(0,uu.Z)(Ot[0],Jr)(f))[0],gt[1]),Tr=!0),je.point((gt=(0,uu.Z)(Ot[1],Jr)(f))[0],gt[1])):(Tr=!1,Ot!==vt&&ic(je,Ot,rt))}function $o(je,rt){return je&&rt&&je[0]===rt[0]&&je[1]===rt[1]}function Ul(je,rt){for(var vt,gt,kt=je.length,Pt=null,Ot=0;Ot<kt;++Ot){vt=je[Ot];for(var cr=rt.length;--cr>=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;kt<rt;++kt)vt.push([gt,gt=je[kt]]);return vt}function Sf(je){return je.project.invert||je.children&&je.children.some(Sf)}var zi=e(98936),cu=[[0,90],[-90,0],[0,0],[90,0],[180,0],[0,-90]],Co=[[0,2,1],[0,3,2],[5,1,2],[5,2,3],[0,1,4],[0,4,3],[5,4,1],[5,3,4]].map(function(je){return je.map(function(rt){return cu[rt]})});function Is(je){je=je||function(vt){var gt=(0,Je.Z)({type:"MultiPoint",coordinates:vt});return(0,zi.Z)().scale(1).translate([0,0]).rotate([-gt[0],-gt[1]])};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:vt<h/2?gt<0?3:1:gt<0?7:5]}).angle(-30).scale(101.858).center([0,45])}var ks=2/z(3);function Xs(je,rt){var vt=Be(je,rt);return[vt[0]*ks,vt[1]]}Xs.invert=function(je,rt){return Be.invert(je/ks,rt)};function js(je){je=je||function(vt){var gt=(0,Je.Z)({type:"MultiPoint",coordinates:vt});return(0,m.Z)(Xs).translate([0,0]).scale(1).rotate(gt[1]>0?[-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:vt<h/2?gt<0?3:1:gt<0?7:5]}).angle(-30).scale(121.906).center([0,48.5904])}function Ks(je){je=je||function(Ot){var cr=Ot.length===6?(0,Je.Z)({type:"MultiPoint",coordinates:Ot}):Ot[0];return(0,zi.Z)().scale(1).translate([0,0]).rotate([-cr[0],-cr[1]])};var rt=Co.map(function(Ot){for(var cr=Ot.map(vu),gr=cr.length,ar=cr[gr-1],Tr,Pr=[],Yr=0;Yr<gr;++Yr)Tr=cr[Yr],Pr.push(hu([ar[0]*.9486832980505138+Tr[0]*.31622776601683794,ar[1]*.9486832980505138+Tr[1]*.31622776601683794,ar[2]*.9486832980505138+Tr[2]*.31622776601683794]),hu([Tr[0]*.9486832980505138+ar[0]*.31622776601683794,Tr[1]*.9486832980505138+ar[1]*.31622776601683794,Tr[2]*.9486832980505138+ar[2]*.31622776601683794])),ar=Tr;return Pr}),vt=[],gt=[-1,0,0,1,0,1,4,5];rt.forEach(function(Ot,cr){for(var gr=Co[cr],ar=gr.length,Tr=vt[cr]=[],Pr=0;Pr<ar;++Pr)rt.push([gr[Pr],Ot[(Pr*2+2)%(2*ar)],Ot[(Pr*2+1)%(2*ar)]]),gt.push(cr),Tr.push(ds(vu(Ot[(Pr*2+2)%(2*ar)]),vu(Ot[(Pr*2+1)%(2*ar)])))});var kt=rt.map(function(Ot){return{project:je(Ot),face:Ot}});gt.forEach(function(Ot,cr){var gr=kt[Ot];gr&&(gr.children||(gr.children=[])).push(kt[cr])});function Pt(Ot,cr){var gr=A(cr),ar=[gr*A(Ot),gr*u(Ot),u(cr)],Tr=Ot<-h/2?cr<0?6:4:Ot<0?cr<0?2:0:Ot<h/2?cr<0?3:1:cr<0?7:5,Pr=vt[Tr];return kt[qo(Pr[0],ar)<0?8+3*Tr:qo(Pr[1],ar)<0?8+3*Tr+1:qo(Pr[2],ar)<0?8+3*Tr+2:Tr]}return vi(kt[0],Pt).angle(-30).scale(110.625).center([0,45])}function qo(je,rt){for(var vt=0,gt=je.length,kt=0;vt<gt;++vt)kt+=je[vt]*rt[vt];return kt}function ds(je,rt){return[je[1]*rt[2]-je[2]*rt[1],je[2]*rt[0]-je[0]*rt[2],je[0]*rt[1]-je[1]*rt[0]]}function hu(je){return[L(je[1],je[0])*S,E(r(-1,s(1,je[2])))*S]}function vu(je){var rt=je[0]*b,vt=je[1]*b,gt=A(vt);return[gt*A(rt),gt*u(rt),u(vt)]}function Vu(){}function hh(je){if((vt=je.length)<4)return!1;for(var rt=0,vt,gt=je[vt-1][1]*je[0][0]-je[vt-1][0]*je[0][1];++rt<vt;)gt+=je[rt-1][1]*je[rt][0]-je[rt-1][0]*je[rt][1];return gt<=0}function vh(je,rt){for(var vt=rt[0],gt=rt[1],kt=!1,Pt=0,Ot=je.length,cr=Ot-1;Pt<Ot;cr=Pt++){var gr=je[Pt],ar=gr[0],Tr=gr[1],Pr=je[cr],Yr=Pr[0],Jr=Pr[1];Tr>gt^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)<o,Ot=je(Pt?gt: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);Pr<Tr;)Yr[Pr]=ar[Pr],++Pr;return Yr}function gt(ar){return ar.map(vt)}function kt(ar){for(var Tr=vt(ar[0]),Pr=[Tr],Yr=1;Yr<ar.length;Yr++){var Jr=vt(ar[Yr]);(Jr.length>2||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)return[rt?2*i(rt*gt/2)/rt:gt,0];var Pt=gt*gt+kt*kt,Ot=0,cr=10,gr;do{var ar=g(Ot),Tr=1/A(Ot),Pr=Pt-2*kt*Ot+Ot*Ot;Ot-=gr=(ar*Pr+2*(Ot-kt))/(2+Pr*Tr*Tr+2*(Ot-kt)*ar)}while(P(gr)>f&&--cr>0);var Yr=gt*(ar=g(Ot)),Jr=g(P(kt)<P(Ot+1/ar)?E(Yr)*.5:y(Yr)*.5+h/4)/u(Ot);return[rt?2*i(rt*Jr)/rt:2*Jr,Ot]},vt}function Js(){return qe(Ef).scale(131.215)}var Oi=[[.9986,-.062],[1,0],[.9986,.062],[.9954,.124],[.99,.186],[.9822,.248],[.973,.31],[.96,.372],[.9427,.434],[.9216,.4958],[.8962,.5571],[.8679,.6176],[.835,.6769],[.7986,.7346],[.7597,.7903],[.7186,.8435],[.6732,.8936],[.6213,.9394],[.5722,.9761],[.5322,1]];Oi.forEach(function(je){je[1]*=1.0144});function ps(je,rt){var vt=s(18,P(rt)*36/h),gt=p(vt),kt=vt-gt,Pt=(Pr=Oi[gt])[0],Ot=Pr[1],cr=(Pr=Oi[++gt])[0],gr=Pr[1],ar=(Pr=Oi[s(19,++gt)])[0],Tr=Pr[1],Pr;return[je*(cr+kt*(ar-Pt)/2+kt*kt*(ar-2*cr+Pt)/2),(rt>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<kt;++gt){var Pt=je[gt].slice();vt.push({index:-1,polygon:rt,ring:Pt});for(var Ot=0,cr=Pt.length;Ot<cr;++Ot){var gr=Pt[Ot],ar=gr[0],Tr=gr[1];if(ar<=_s||ar>=Hl||Tr<=xl||Tr>=Xu){Pt[Ot]=Gl(gr);for(var Pr=Ot+1;Pr<cr;++Pr){var Yr=Pt[Pr],Jr=Yr[0],mn=Yr[1];if(Jr>_s&&Jr<Hl&&mn>xl&&mn<Xu)break}if(Pr===Ot+1)continue;if(Ot){var bn={index:-1,polygon:rt,ring:Pt.slice(0,Ot+1)};bn.ring[bn.ring.length-1]=Pf(Tr),vt[vt.length-1]=bn}else vt.pop();if(Pr>=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;rt<vt;++rt){if(Pt=je[rt],Ot=Pt.ring[0],gr=Pt.ring[Pt.ring.length-1],Ot[0]===gr[0]&&Ot[1]===gr[1]){Pt.polygon.push(Pt.ring),je[rt]=null;continue}Pt.index=rt,gt[Ot]=kt[gr]=Pt}for(rt=0;rt<vt;++rt)if(Pt=je[rt],Pt){if(Ot=Pt.ring[0],gr=Pt.ring[Pt.ring.length-1],cr=kt[Ot],ar=gt[gr],delete gt[Ot],delete kt[gr],Ot[0]===gr[0]&&Ot[1]===gr[1]){Pt.polygon.push(Pt.ring);continue}cr?(delete kt[Ot],delete gt[cr.ring[0]],cr.ring.pop(),je[cr.index]=null,Pt={index:-1,polygon:cr.polygon,ring:cr.ring.concat(Pt.ring)},cr===ar?Pt.polygon.push(Pt.ring):(Pt.index=vt++,je.push(gt[Pt.ring[0]]=kt[Pt.ring[Pt.ring.length-1]]=Pt))):ar?(delete gt[gr],delete kt[ar.ring[ar.ring.length-1]],Pt.ring.pop(),Pt={index:vt++,polygon:ar.polygon,ring:Pt.ring.concat(ar.ring)},je[ar.index]=null,je.push(gt[Pt.ring[0]]=kt[Pt.ring[Pt.ring.length-1]]=Pt)):(Pt.ring.push(Pt.ring[0]),Pt.polygon.push(Pt.ring))}}function $s(je){var rt={type:"Feature",geometry:bl(je.geometry)};return je.id!=null&&(rt.id=je.id),je.bbox!=null&&(rt.bbox=je.bbox),je.properties!=null&&(rt.properties=je.properties),rt}function bl(je){if(je==null)return je;var rt,vt,gt,kt;switch(je.type){case"GeometryCollection":rt={type:"GeometryCollection",geometries:je.geometries.map(bl)};break;case"Point":rt={type:"Point",coordinates:Gl(je.coordinates)};break;case"MultiPoint":case"LineString":rt={type:je.type,coordinates:Rf(je.coordinates)};break;case"MultiLineString":rt={type:"MultiLineString",coordinates:je.coordinates.map(Rf)};break;case"Polygon":{var Pt=[];fc(je.coordinates,Pt,vt=[]),zs(vt),rt={type:"Polygon",coordinates:Pt};break}case"MultiPolygon":{vt=[],gt=-1,kt=je.coordinates.length;for(var Ot=new Array(kt);++gt<kt;)fc(je.coordinates[gt],Ot[gt]=[],vt);zs(vt),rt={type:"MultiPolygon",coordinates:Ot.filter(Qs)};break}default:return je}return je.bbox!=null&&(rt.bbox=je.bbox),rt}function wl(je){if(je==null)return je;switch(je.type){case"Feature":return $s(je);case"FeatureCollection":{var rt={type:"FeatureCollection",features:je.features.map($s)};return je.bbox!=null&&(rt.bbox=je.bbox),rt}default:return bl(je)}}function Po(je,rt){var vt=g(rt/2),gt=u(d*vt);return[je*(.74482-.34588*gt*gt),1.70711*vt]}Po.invert=function(je,rt){var vt=rt/1.70711,gt=u(d*vt);return[je/(.74482-.34588*gt*gt),2*i(vt)]};function _o(){return(0,m.Z)(Po).scale(146.153)}function Tl(je,rt,vt){var gt=(0,uu.Z)(rt,vt),kt=gt(.5),Pt=(0,De.Z)([-kt[0],-kt[1]])(rt),Ot=gt.distance/2,cr=-E(u(Pt[1]*b)/u(Ot)),gr=[-kt[0],-kt[1],-(Pt[0]>0?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)return[je,0];var vt=P(rt/o),gt=E(vt);if(P(je)<f||P(P(rt)-o)<f)return[0,c(rt)*h*g(gt/2)];var kt=A(gt),Pt=P(h/je-je/h)/2,Ot=Pt*Pt,cr=kt/(vt+kt-1),gr=cr*(2/vt-1),ar=gr*gr,Tr=ar+Ot,Pr=cr-ar,Yr=Ot+cr;return[c(je)*h*(Pt*Pr+z(Ot*Pr*Pr-Tr*(cr*cr-ar)))/Tr,c(rt)*h*(gr*Yr-Pt*z((Ot+1)*Tr-Yr*Yr))/Tr]}qs.invert=function(je,rt){if(P(rt)<f)return[je,0];if(P(je)<f)return[0,o*u(2*i(rt/h))];var vt=(je/=h)*je,gt=(rt/=h)*rt,kt=vt+gt,Pt=kt*kt,Ot=-P(rt)*(1+kt),cr=Ot-2*gt+vt,gr=-2*Ot+1+2*gt+Pt,ar=gt/gr+(2*cr*cr*cr/(gr*gr*gr)-9*Ot*cr/(gr*gr))/27,Tr=(Ot-cr*cr/(3*gr))/gr,Pr=2*z(-Tr/3),Yr=y(3*ar/(Tr*Pr))/3;return[h*(kt-1+z(1+2*(vt-gt)+Pt))/(2*je),c(rt)*h*(-Pr*A(Yr+h/3)-cr/(3*gr))]};function gu(){return(0,m.Z)(qs).scale(79.4183)}function Os(je,rt){if(P(rt)<f)return[je,0];var vt=P(rt/o),gt=E(vt);if(P(je)<f||P(P(rt)-o)<f)return[0,c(rt)*h*g(gt/2)];var kt=A(gt),Pt=P(h/je-je/h)/2,Ot=Pt*Pt,cr=kt*(z(1+Ot)-Pt*kt)/(1+Ot*vt*vt);return[c(je)*h*cr,c(rt)*h*z(1-cr*(2*Pt+cr))]}Os.invert=function(je,rt){if(!je)return[0,o*u(2*i(rt/h))];var vt=P(je/h),gt=(1-vt*vt-(rt/=h)*rt)/(2*vt),kt=gt*gt,Pt=z(kt+1);return[c(je)*h*(Pt-gt),c(rt)*o*u(2*L(z((1-2*gt*vt)*(gt+Pt)-vt),z(Pt+gt+vt)))]};function mh(){return(0,m.Z)(Os).scale(79.4183)}function If(je,rt){if(P(rt)<f)return[je,0];var vt=rt/o,gt=E(vt);if(P(je)<f||P(P(rt)-o)<f)return[0,h*g(gt/2)];var kt=(h/je-je/h)/2,Pt=vt/(1+A(gt));return[h*(c(je)*z(kt*kt+1-Pt*Pt)-kt),h*Pt]}If.invert=function(je,rt){if(!rt)return[je,0];var vt=rt/h,gt=(h*h*(1-vt*vt)-je*je)/(2*h*je);return[je?h*(c(je)*z(gt*gt+1)-gt):0,o*u(2*i(vt))]};function Ku(){return(0,m.Z)(If).scale(79.4183)}function vo(je,rt){if(!rt)return[je,0];var vt=P(rt);if(!je||vt===o)return[0,rt];var gt=vt/o,kt=gt*gt,Pt=(8*gt-kt*(kt+2)-5)/(2*kt*(gt-1)),Ot=Pt*Pt,cr=gt*Pt,gr=kt+Ot+2*cr,ar=gt+3*Pt,Tr=je/o,Pr=Tr+1/Tr,Yr=c(P(je)-o)*z(Pr*Pr-4),Jr=Yr*Yr,mn=gr*(kt+Ot*Jr-1)+(1-kt)*(kt*(ar*ar+4*Ot)+12*cr*Ot+4*Ot*Ot),bn=(Yr*(gr+Ot-1)+2*z(mn))/(4*gr+Jr);return[c(je)*o*bn,c(rt)*o*z(1+Yr*P(bn)-bn*bn)]}vo.invert=function(je,rt){var vt;if(!je||!rt)return[je,rt];rt/=h;var gt=c(je)*je/o,kt=(gt*gt-1+4*rt*rt)/P(gt),Pt=kt*kt,Ot=2*rt,cr=50;do{var gr=Ot*Ot,ar=(8*Ot-gr*(gr+2)-5)/(2*gr*(Ot-1)),Tr=(3*Ot-gr*Ot-10)/(2*gr*Ot),Pr=ar*ar,Yr=Ot*ar,Jr=Ot+ar,mn=Jr*Jr,bn=Ot+3*ar,Rn=mn*(gr+Pr*Pt-1)+(1-gr)*(gr*(bn*bn+4*Pr)+Pr*(12*Yr+4*Pr)),ha=-2*Jr*(4*Yr*Pr+(1-4*gr+3*gr*gr)*(1+Tr)+Pr*(-6+14*gr-Pt+(-8+8*gr-2*Pt)*Tr)+Yr*(-8+12*gr+(-10+10*gr-Pt)*Tr)),Ca=z(Rn),Ra=kt*(mn+Pr-1)+2*Ca-gt*(4*mn+Pt),Da=kt*(2*ar*Tr+2*Jr*(1+Tr))+ha/Ca-8*Jr*(kt*(-1+Pr+mn)+2*Ca)*(1+Tr)/(Pt+4*mn);Ot-=vt=Ra/Da}while(vt>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]),z<p&&(p=z),z>r&&(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^(_*s<U&&U<_*y)?(Y=O[1]*L.RW,Y>r&&(r=Y)):(U=(U+360)%360-180,J^(_*s<U&&U<_*y)?(Y=-O[1]*L.RW,Y<p&&(p=Y)):(z<p&&(p=z),z>r&&(r=z))),J?y<s?S(v,y)>S(v,t)&&(t=y):S(y,t)>S(v,t)&&(v=y):t>=v?(y<v&&(v=y),y>t&&(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]);z<p&&(p=z),z>r&&(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]:z<y[0]||y[1]<z}function E(y){var z,I,B,k,O,N,_;if(r=t=-(v=p=1/0),g=[],(0,A.Z)(y,w),I=g.length){for(g.sort(b),z=1,B=g[0],O=[B];z<I;++z)k=g[z],a(B,k[0])||a(B,k[1])?(S(B[0],k[1])>S(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 _<m.aW&&(k=r,O=s,N=n,A<m.Ho&&(k=v,O=p,N=t),_=k*k+O*O+N*N,_<m.aW)?[NaN,NaN]:[(0,m.fv)(O,k)*m.RW,(0,m.ZR)(N/(0,m._b)(_))*m.RW]}},7613:function(G,V,e){e.d(V,{m:function(){return A},Z:function(){return p}});var m=e(7620);function P(t){return function(){return t}}var i=e(39695),L=e(49386);function A(t,r,s,n,l,c){if(s){var u=(0,i.mC)(r),g=(0,i.O$)(r),f=n*s;l==null?(l=r+n*i.BZ,c=r-f/2):(l=v(u,l),c=v(u,c),(n>0?l<c:l>c)&&(l+=n*i.BZ));for(var w,h=l;n>0?h>c:h<c;h-=f)w=(0,m.Y1)([u,-g*(0,i.mC)(h),-g*(0,i.O$)(h)]),t.point(w[0],w[1])}}function v(t,r){r=(0,m.Og)(r),r[0]-=t,(0,m.iJ)(r);var s=(0,i.Kh)(-r[1]);return((-r[2]<0?-s:s)+i.BZ-i.Ho)%i.BZ}function p(){var t=P([0,0]),r=P(90),s=P(6),n,l,c={point:u};function u(f,w){n.push(f=l(f,w)),f[0]*=i.RW,f[1]*=i.RW}function g(){var f=t.apply(this,arguments),w=r.apply(this,arguments)*i.uR,h=s.apply(this,arguments)*i.uR;return n=[],l=(0,L.I)(-f[0]*i.uR,-f[1]*i.uR,0).invert,A(c,w,h,1),f={type:"Polygon",coordinates:[n]},n=l=null,f}return g.center=function(f){return arguments.length?(t=typeof f=="function"?f:P([+f[0],+f[1]]),g):t},g.radius=function(f){return arguments.length?(r=typeof f=="function"?f:P(+f),g):r},g.precision=function(f){return arguments.length?(s=typeof f=="function"?f:P(+f),g):s},g}},87070:function(G,V,e){var m=e(97023),P=e(39695);V.Z=(0,m.Z)(function(){return!0},i,A,[-P.pi,-P.ou]);function i(v){var p=NaN,t=NaN,r=NaN,s;return{lineStart:function(){v.lineStart(),s=1},point:function(n,l){var c=n>0?P.pi:-P.pi,u=(0,P.Wn)(n-p);(0,P.Wn)(u-P.pi)<P.Ho?(v.point(p,t=(t+l)/2>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&&(p-=r*P.Ho),(0,P.Wn)(n-c)<P.Ho&&(n-=c*P.Ho),t=L(p,t,n,l),v.point(r,t),v.lineEnd(),v.lineStart(),v.point(c,t),s=0),v.point(p=n,t=l),r=c},lineEnd:function(){v.lineEnd(),p=t=NaN},clean:function(){return 2-s}}}function L(v,p,t,r){var s,n,l=(0,P.O$)(v-t);return(0,P.Wn)(l)>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]<p[0]?P.pi:-P.pi;s=t*n/2,r.point(-n,s),r.point(0,s),r.point(n,s)}else r.point(p[0],p[1])}},85272:function(G,V,e){e.d(V,{Z:function(){return P}});var m=e(73182);function P(){var i=[],L;return{point:function(A,v,p){L.push([A,v,p])},lineStart:function(){i.push(L=[])},lineEnd:m.Z,rejoin:function(){i.length>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;J<Y&&(ce=Y,Y=J,J=ce);var Q=J-Y,Z=(0,i.Wn)(Q-i.pi)<i.Ho,j=Z||Q<i.Ho;if(!Z&&ae<te&&(ce=te,te=ae,ae=ce),j?Z?te+ae>0^U[1]<((0,i.Wn)(U[0]-Y)<i.Ho?te:ae):te<=U[1]&&U[1]<=ae:Q>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;I<k;++I)c.point((N=O[I])[0],N[1]);c.lineEnd()}return}B>1&&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(C<o)return;C<d&&(d=C)}else if(M>0){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(C<o)return;C<d&&(d=C)}if(C=l-f,!(!T&&C>0)){if(C/=T,T<0){if(C<o)return;C<d&&(d=C)}else if(T>0){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(C<o)return;C<d&&(d=C)}return o>0&&(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)<m.Ho?o>0?0:3:(0,m.Wn)(h[0]-n)<m.Ho?o>0?2:1:(0,m.Wn)(h[1]-s)<m.Ho?o>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;ae<ce;++ae)for(var Q=T[ae],Z=1,j=Q.length,K=Q[0],ee,oe,q=K[0],$=K[1];Z<j;++Z)ee=q,oe=$,K=Q[Z],q=K[0],$=K[1],oe<=l?$>l&&(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<M;++c)s.point((T=d[c])[0],T[1]);s.lineEnd();return}C[0]+=2*P.Ho}n.push(x=new i(T,d,null,!0)),l.push(x.o=new i(T,null,x,!1)),n.push(x=new i(C,d,null,!1)),l.push(x.o=new i(C,null,x,!0))}}),!!n.length){for(l.sort(p),A(n),A(l),c=0,u=l.length;c<u;++c)l[c].e=t=!t;for(var g=n[0],f,w;;){for(var h=g,o=!0;h.v;)if((h=h.n)===g)return;f=h.z,s.lineStart();do{if(h.v=h.o.v=!0,h.e){if(o)for(c=0,u=f.length;c<u;++c)s.point((w=f[c])[0],w[1]);else r(h.x,h.n.x,1,s);h=h.n}else{if(o)for(f=h.p.z,c=f.length-1;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;++t<p;)r.n=s=v[t],s.p=r,r=s;r.n=s=v[0],s.p=r}}},96059:function(G,V,e){e.d(V,{Z:function(){return m}});function m(P,i){function L(A,v){return A=P(A,v),i(A[0],A[1])}return P.invert&&i.invert&&(L.invert=function(A,v){return A=i.invert(A,v),A&&P.invert(A[0],A[1])}),L}},8593:function(G,V,e){e.d(V,{Z:function(){return m}});function m(P){return P}},27362:function(G,V,e){e.r(V),e.d(V,{geoAlbers:function(){return br},geoAlbersUsa:function(){return lt},geoArea:function(){return m.ZP},geoAzimuthalEqualArea:function(){return xt.Z},geoAzimuthalEqualAreaRaw:function(){return xt.l},geoAzimuthalEquidistant:function(){return Tt.Z},geoAzimuthalEquidistantRaw:function(){return Tt.N},geoBounds:function(){return P.Z},geoCentroid:function(){return i.Z},geoCircle:function(){return L.Z},geoClipAntimeridian:function(){return A.Z},geoClipCircle:function(){return v.Z},geoClipExtent:function(){return t},geoClipRectangle:function(){return p.Z},geoConicConformal:function(){return or},geoConicConformalRaw:function(){return Qt},geoConicEqualArea:function(){return Yt},geoConicEqualAreaRaw:function(){return jt},geoConicEquidistant:function(){return We},geoConicEquidistantRaw:function(){return Ye},geoContains:function(){return N},geoDistance:function(){return b},geoEqualEarth:function(){return fr},geoEqualEarthRaw:function(){return zt},geoEquirectangular:function(){return Er.Z},geoEquirectangularRaw:function(){return Er.k},geoGnomonic:function(){return dr.Z},geoGnomonicRaw:function(){return dr.M},geoGraticule:function(){return J},geoGraticule10:function(){return te},geoIdentity:function(){return vr},geoInterpolate:function(){return ae.Z},geoLength:function(){return C},geoMercator:function(){return _t},geoMercatorRaw:function(){return St},geoNaturalEarth1:function(){return Hr.Z},geoNaturalEarth1Raw:function(){return Hr.K},geoOrthographic:function(){return Ir.Z},geoOrthographicRaw:function(){return Ir.I},geoPath:function(){return Kt},geoProjection:function(){return ir.Z},geoProjectionMutator:function(){return ir.r},geoRotation:function(){return Ct.Z},geoStereographic:function(){return jr},geoStereographicRaw:function(){return pn},geoStream:function(){return c.Z},geoTransform:function(){return pr.Z},geoTransverseMercator:function(){return Dn},geoTransverseMercatorRaw:function(){return In}});var m=e(97860),P=e(77338),i=e(66624),L=e(7613),A=e(87070),v=e(1457),p=e(87605);function t(){var xr=0,Ar=0,Or=960,Nr=500,qr,vn,fn;return fn={stream:function(Tn){return qr&&vn===Tn?qr:qr=(0,p.Z)(xr,Ar,Or,Nr)(vn=Tn)},extent:function(Tn){return arguments.length?(xr=+Tn[0][0],Ar=+Tn[0][1],Or=+Tn[1][0],Nr=+Tn[1][1],qr=vn=null,fn):[[xr,Ar],[Or,Nr]]}}}var r=e(23071),s=e(33940),n=e(39695),l=e(73182),c=e(72736),u=(0,s.Z)(),g,f,w,h={sphere:l.Z,point:l.Z,lineStart:o,lineEnd:l.Z,polygonStart:l.Z,polygonEnd:l.Z};function o(){h.point=M,h.lineEnd=d}function d(){h.point=h.lineEnd=l.Z}function M(xr,Ar){xr*=n.uR,Ar*=n.uR,g=xr,f=(0,n.O$)(Ar),w=(0,n.mC)(Ar),h.point=T}function T(xr,Ar){xr*=n.uR,Ar*=n.uR;var Or=(0,n.O$)(Ar),Nr=(0,n.mC)(Ar),qr=(0,n.Wn)(xr-g),vn=(0,n.mC)(qr),fn=(0,n.O$)(qr),Tn=Nr*fn,Pn=w*Or-f*Nr*vn,jn=f*Or+w*Nr*vn;u.add((0,n.fv)((0,n._b)(Tn*Tn+Pn*Pn),jn)),g=xr,f=Or,w=Nr}function C(xr){return u.reset(),(0,c.Z)(xr,h),+u}var x=[null,null],S={type:"LineString",coordinates:x};function b(xr,Ar){return x[0]=xr,x[1]=Ar,C(S)}var a={Feature:function(xr,Ar){return y(xr.geometry,Ar)},FeatureCollection:function(xr,Ar){for(var Or=xr.features,Nr=-1,qr=Or.length;++Nr<qr;)if(y(Or[Nr].geometry,Ar))return!0;return!1}},E={Sphere:function(){return!0},Point:function(xr,Ar){return z(xr.coordinates,Ar)},MultiPoint:function(xr,Ar){for(var Or=xr.coordinates,Nr=-1,qr=Or.length;++Nr<qr;)if(z(Or[Nr],Ar))return!0;return!1},LineString:function(xr,Ar){return I(xr.coordinates,Ar)},MultiLineString:function(xr,Ar){for(var Or=xr.coordinates,Nr=-1,qr=Or.length;++Nr<qr;)if(I(Or[Nr],Ar))return!0;return!1},Polygon:function(xr,Ar){return B(xr.coordinates,Ar)},MultiPolygon:function(xr,Ar){for(var Or=xr.coordinates,Nr=-1,qr=Or.length;++Nr<qr;)if(B(Or[Nr],Ar))return!0;return!1},GeometryCollection:function(xr,Ar){for(var Or=xr.geometries,Nr=-1,qr=Or.length;++Nr<qr;)if(y(Or[Nr],Ar))return!0;return!1}};function y(xr,Ar){return xr&&E.hasOwnProperty(xr.type)?E[xr.type](xr,Ar):!1}function z(xr,Ar){return b(xr,Ar)===0}function I(xr,Ar){for(var Or,Nr,qr,vn=0,fn=xr.length;vn<fn;vn++){if(Nr=b(xr[vn],Ar),Nr===0||vn>0&&(qr=b(xr[vn],xr[vn-1]),qr>0&&Or<=qr&&Nr<=qr&&(Or+Nr-qr)*(1-Math.pow((Or-Nr)/qr,2))<n.aW*qr))return!0;Or=Nr}return!1}function B(xr,Ar){return!!(0,r.Z)(xr.map(k),O(Ar))}function k(xr){return xr=xr.map(O),xr.pop(),xr}function O(xr){return[xr[0]*n.uR,xr[1]*n.uR]}function N(xr,Ar){return(xr&&a.hasOwnProperty(xr.type)?a[xr.type]:y)(xr,Ar)}var _=e(33064);function U(xr,Ar,Or){var Nr=(0,_.w6)(xr,Ar-n.Ho,Or).concat(Ar);return function(qr){return Nr.map(function(vn){return[qr,vn]})}}function Y(xr,Ar,Or){var Nr=(0,_.w6)(xr,Ar-n.Ho,Or).concat(Ar);return function(qr){return Nr.map(function(vn){return[vn,qr]})}}function J(){var xr,Ar,Or,Nr,qr,vn,fn,Tn,Pn=10,jn=Pn,qn=90,sa=360,ta,ea,Mr,on,nn=2.5;function gn(){return{type:"MultiLineString",coordinates:Un()}}function Un(){return(0,_.w6)((0,n.mD)(Nr/qn)*qn,Or,qn).map(Mr).concat((0,_.w6)((0,n.mD)(Tn/sa)*sa,fn,sa).map(on)).concat((0,_.w6)((0,n.mD)(Ar/Pn)*Pn,xr,Pn).filter(function(En){return(0,n.Wn)(En%qn)>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)<n.Ho)return yt(xr);var qr=1+Or*(2*Nr-Or),vn=(0,n._b)(qr)/Nr;function fn(Tn,Pn){var jn=(0,n._b)(qr-2*Nr*(0,n.O$)(Pn))/Nr;return[jn*(0,n.O$)(Tn*=Nr),vn-jn*(0,n.mC)(Tn)]}return fn.invert=function(Tn,Pn){var jn=vn-Pn,qn=(0,n.fv)(Tn,(0,n.Wn)(jn))*(0,n.Xx)(jn);return jn*Nr<0&&(qn-=n.pi*(0,n.Xx)(Tn)*(0,n.Xx)(jn)),[qn/Nr,(0,n.ZR)((qr-(Tn*Tn+jn*jn)*Nr*Nr)/(2*Nr))]},fn}function Yt(){return _r(jt).scale(155.424).center([0,33.6442])}function br(){return Yt().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}var hr=e(47589);function ut(xr){var Ar=xr.length;return{point:function(Or,Nr){for(var qr=-1;++qr<Ar;)xr[qr].point(Or,Nr)},sphere:function(){for(var Or=-1;++Or<Ar;)xr[Or].sphere()},lineStart:function(){for(var Or=-1;++Or<Ar;)xr[Or].lineStart()},lineEnd:function(){for(var Or=-1;++Or<Ar;)xr[Or].lineEnd()},polygonStart:function(){for(var Or=-1;++Or<Ar;)xr[Or].polygonStart()},polygonEnd:function(){for(var Or=-1;++Or<Ar;)xr[Or].polygonEnd()}}}function lt(){var xr,Ar,Or=br(),Nr,qr=Yt().rotate([154,0]).center([-2,58.5]).parallels([55,65]),vn,fn=Yt().rotate([157,0]).center([-3,19.9]).parallels([8,18]),Tn,Pn,jn={point:function(ta,ea){Pn=[ta,ea]}};function qn(ta){var ea=ta[0],Mr=ta[1];return Pn=null,Nr.point(ea,Mr),Pn||(vn.point(ea,Mr),Pn)||(Tn.point(ea,Mr),Pn)}qn.invert=function(ta){var ea=Or.scale(),Mr=Or.translate(),on=(ta[0]-Mr[0])/ea,nn=(ta[1]-Mr[1])/ea;return(nn>=.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)<n.Ho)return Er.k;function vn(fn,Tn){var Pn=qr-Tn,jn=Nr*fn;return[Pn*(0,n.O$)(jn),qr-Pn*(0,n.mC)(jn)]}return vn.invert=function(fn,Tn){var Pn=qr-Tn,jn=(0,n.fv)(fn,(0,n.Wn)(Pn))*(0,n.Xx)(Pn);return Pn*Nr<0&&(jn-=n.pi*(0,n.Xx)(fn)*(0,n.Xx)(Pn)),[jn/Nr,qr-(0,n.Xx)(Nr)*(0,n._b)(fn*fn+Pn*Pn)]},vn}function We(){return _r(Ye).scale(131.154).center([0,13.9389])}var Dt=1.340264,Ft=-.081106,Zt=893e-6,nr=.003796,lr=(0,n._b)(3)/2,rr=12;function zt(xr,Ar){var Or=(0,n.ZR)(lr*(0,n.O$)(Ar)),Nr=Or*Or,qr=Nr*Nr*Nr;return[xr*(0,n.mC)(Or)/(lr*(Dt+3*Ft*Nr+qr*(7*Zt+9*nr*Nr))),Or*(Dt+Ft*Nr+qr*(Zt+nr*Nr))]}zt.invert=function(xr,Ar){for(var Or=Ar,Nr=Or*Or,qr=Nr*Nr*Nr,vn=0,fn,Tn,Pn;vn<rr&&(Tn=Or*(Dt+Ft*Nr+qr*(Zt+nr*Nr))-Ar,Pn=Dt+3*Ft*Nr+qr*(7*Zt+9*nr*Nr),Or-=fn=Tn/Pn,Nr=Or*Or,qr=Nr*Nr*Nr,!((0,n.Wn)(fn)<n.aW));++vn);return[lr*xr*(Dt+3*Ft*Nr+qr*(7*Zt+9*nr*Nr))/(0,n.mC)(Or),(0,n.ZR)((0,n.O$)(Or)/lr)]};function fr(){return(0,ir.Z)(zt).scale(177.158)}var dr=e(98936),pr=e(64684);function vr(){var xr=1,Ar=0,Or=0,Nr=1,qr=1,vn=0,fn,Tn,Pn=null,jn,qn,sa,ta=1,ea=1,Mr=(0,pr.l)({point:function(Cn,Hn){var aa=En([Cn,Hn]);this.stream.point(aa[0],aa[1])}}),on=ce.Z,nn,gn;function Un(){return ta=xr*Nr,ea=xr*qr,nn=gn=null,En}function En(Cn){var Hn=Cn[0]*ta,aa=Cn[1]*ea;if(vn){var Pa=aa*fn-Hn*Tn;Hn=Hn*fn+aa*Tn,aa=Pa}return[Hn+Ar,aa+Or]}return En.invert=function(Cn){var Hn=Cn[0]-Ar,aa=Cn[1]-Or;if(vn){var Pa=aa*fn+Hn*Tn;Hn=Hn*fn-aa*Tn,aa=Pa}return[Hn/ta,aa/ea]},En.stream=function(Cn){return nn&&gn===Cn?nn:nn=Mr(on(gn=Cn))},En.postclip=function(Cn){return arguments.length?(on=Cn,Pn=jn=qn=sa=null,Un()):on},En.clipExtent=function(Cn){return arguments.length?(on=Cn==null?(Pn=jn=qn=sa=null,ce.Z):(0,p.Z)(Pn=+Cn[0][0],jn=+Cn[0][1],qn=+Cn[1][0],sa=+Cn[1][1]),Un()):Pn==null?null:[[Pn,jn],[qn,sa]]},En.scale=function(Cn){return arguments.length?(xr=+Cn,Un()):xr},En.translate=function(Cn){return arguments.length?(Ar=+Cn[0],Or=+Cn[1],Un()):[Ar,Or]},En.angle=function(Cn){return arguments.length?(vn=Cn%360*n.uR,Tn=(0,n.O$)(vn),fn=(0,n.mC)(vn),Un()):vn*n.RW},En.reflectX=function(Cn){return arguments.length?(Nr=Cn?-1:1,Un()):Nr<0},En.reflectY=function(Cn){return arguments.length?(qr=Cn?-1:1,Un()):qr<0},En.fitExtent=function(Cn,Hn){return(0,hr.qg)(En,Cn,Hn)},En.fitSize=function(Cn,Hn){return(0,hr.mF)(En,Cn,Hn)},En.fitWidth=function(Cn,Hn){return(0,hr.V6)(En,Cn,Hn)},En.fitHeight=function(Cn,Hn){return(0,hr.rf)(En,Cn,Hn)},En}var Hr=e(26867),Ir=e(57962),kr=e(25382);function pn(xr,Ar){var Or=(0,n.mC)(Ar),Nr=1+(0,n.mC)(xr)*Or;return[Or*(0,n.O$)(xr)/Nr,(0,n.O$)(Ar)/Nr]}pn.invert=(0,kr.O)(function(xr){return 2*(0,n.z4)(xr)});function jr(){return(0,ir.Z)(pn).scale(250).clipAngle(142)}function In(xr,Ar){return[(0,n.cM)((0,n.OR)((n.ou+Ar)/2)),-xr]}In.invert=function(xr,Ar){return[-Ar,2*(0,n.z4)((0,n.Qq)(xr))-n.ou]};function Dn(){var xr=Ht(In),Ar=xr.center,Or=xr.rotate;return xr.center=function(Nr){return arguments.length?Ar([-Nr[1],Nr[0]]):(Nr=Ar(),[Nr[1],-Nr[0]])},xr.rotate=function(Nr){return arguments.length?Or([Nr[0],Nr[1],Nr.length>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){t<P&&(P=t),t>L&&(L=t),r<i&&(i=r),r>A&&(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])<m.Ho&&(0,m.Wn)(i[1]-L[1])<m.Ho}},23071:function(G,V,e){e.d(V,{Z:function(){return v}});var m=e(33940),P=e(7620),i=e(39695),L=(0,m.Z)();function A(p){return(0,i.Wn)(p[0])<=i.pi?p[0]:(0,i.Xx)(p[0])*(((0,i.Wn)(p[0])+i.pi)%i.BZ-i.pi)}function v(p,t){var r=A(t),s=t[1],n=(0,i.O$)(s),l=[(0,i.O$)(r),-(0,i.mC)(r),0],c=0,u=0;L.reset(),n===1?s=i.ou+i.Ho:n===-1&&(s=-i.ou-i.Ho);for(var g=0,f=p.length;g<f;++g)if(h=(w=p[g]).length)for(var w,h,o=w[h-1],d=A(o),M=o[1]/2+i.pu,T=(0,i.O$)(M),C=(0,i.mC)(M),x=0;x<h;++x,d=b,T=E,C=y,o=S){var S=w[x],b=A(S),a=S[1]/2+i.pu,E=(0,i.O$)(a),y=(0,i.mC)(a),z=b-d,I=z>=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||c<i.Ho&&L<-i.Ho)^u&1}},25382:function(G,V,e){e.d(V,{O:function(){return i},W:function(){return P}});var m=e(39695);function P(L){return function(A,v){var p=(0,m.mC)(A),t=(0,m.mC)(v),r=L(p*t);return[r*t*(0,m.O$)(A),r*(0,m.O$)(v)]}}function i(L){return function(A,v){var p=(0,m._b)(A*A+v*v),t=L(p),r=(0,m.O$)(t),s=(0,m.mC)(t);return[(0,m.fv)(A*r,p*s),(0,m.ZR)(p&&v*r/p)]}}},12956:function(G,V,e){e.d(V,{Z:function(){return A},l:function(){return L}});var m=e(39695),P=e(25382),i=e(15002),L=(0,P.W)(function(v){return(0,m._b)(2/(1+v))});L.invert=(0,P.O)(function(v){return 2*(0,m.ZR)(v/2)});function A(){return(0,i.Z)(L).scale(124.75).clipAngle(179.999)}},17889:function(G,V,e){e.d(V,{N:function(){return L},Z:function(){return A}});var m=e(39695),P=e(25382),i=e(15002),L=(0,P.W)(function(v){return(v=(0,m.Kh)(v))&&v/(0,m.O$)(v)});L.invert=(0,P.O)(function(v){return v});function A(){return(0,i.Z)(L).scale(79.4188).clipAngle(179.999)}},97492:function(G,V,e){e.d(V,{Z:function(){return i},k:function(){return P}});var m=e(15002);function P(L,A){return[L,A]}P.invert=P;function i(){return(0,m.Z)(P).scale(152.63)}},47589:function(G,V,e){e.d(V,{V6:function(){return v},mF:function(){return A},qg:function(){return L},rf:function(){return p}});var m=e(72736),P=e(3559);function i(t,r,s){var n=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),n!=null&&t.clipExtent(null),(0,m.Z)(s,t.stream(P.Z)),r(P.Z.result()),n!=null&&t.clipExtent(n),t}function L(t,r,s){return i(t,function(n){var l=r[1][0]-r[0][0],c=r[1][1]-r[0][1],u=Math.min(l/(n[1][0]-n[0][0]),c/(n[1][1]-n[0][1])),g=+r[0][0]+(l-u*(n[1][0]+n[0][0]))/2,f=+r[0][1]+(c-u*(n[1][1]+n[0][1]))/2;t.scale(150*u).translate([g,f])},s)}function A(t,r,s){return L(t,[[0,0],r],s)}function v(t,r,s){return i(t,function(n){var l=+r,c=l/(n[1][0]-n[0][0]),u=(l-c*(n[1][0]+n[0][0]))/2,g=-c*n[0][1];t.scale(150*c).translate([u,g])},s)}function p(t,r,s){return i(t,function(n){var l=+r,c=l/(n[1][1]-n[0][1]),u=-c*n[0][0],g=(l-c*(n[1][1]+n[0][1]))/2;t.scale(150*c).translate([u,g])},s)}},98936:function(G,V,e){e.d(V,{M:function(){return L},Z:function(){return A}});var m=e(39695),P=e(25382),i=e(15002);function L(v,p){var t=(0,m.mC)(p),r=(0,m.mC)(v)*t;return[t*(0,m.O$)(v)/r,(0,m.O$)(p)/r]}L.invert=(0,P.O)(m.z4);function A(){return(0,i.Z)(L).scale(144.049).clipAngle(60)}},15002:function(G,V,e){e.d(V,{Z:function(){return d},r:function(){return M}});var m=e(87070),P=e(1457),i=e(87605),L=e(96059),A=e(8593),v=e(39695),p=e(49386),t=e(64684),r=e(47589),s=e(7620),n=16,l=(0,v.mC)(30*v.uR);function c(T,C){return+C?g(T,C):u(T)}function u(T){return(0,t.l)({point:function(C,x){C=T(C,x),this.stream.point(C[0],C[1])}})}function g(T,C){function x(S,b,a,E,y,z,I,B,k,O,N,_,U,Y){var J=I-S,te=B-b,ae=J*J+te*te;if(ae>4*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)<v.Ho||(0,v.Wn)(a-k)<v.Ho?(a+k)/2:(0,v.fv)(Q,ce),oe=T(ee,K),q=oe[0],$=oe[1],le=q-S,ie=$-b,he=te*le-J*ie;(he*he/ae>C||(0,v.Wn)((J*le+te*ie)/ae-.5)>.3||E*O+y*N+z*_<l)&&(x(S,b,a,E,y,z,q,$,ee,ce/=j,Q/=j,Z,U,Y),Y.point(q,$),x(q,$,ee,ce,Q,Z,I,B,k,O,N,_,U,Y))}}return function(S){var b,a,E,y,z,I,B,k,O,N,_,U,Y={point:J,lineStart:te,lineEnd:ce,polygonStart:function(){S.polygonStart(),Y.lineStart=Q},polygonEnd:function(){S.polygonEnd(),Y.lineStart=te}};function J(K,ee){K=T(K,ee),S.point(K[0],K[1])}function te(){k=NaN,Y.point=ae,S.lineStart()}function ae(K,ee){var oe=(0,s.Og)([K,ee]),q=T(K,ee);x(k,O,B,N,_,U,k=q[0],O=q[1],B=K,N=oe[0],_=oe[1],U=oe[2],n,S),S.point(k,O)}function ce(){Y.point=J,S.lineEnd()}function Q(){te(),Y.point=Z,Y.lineEnd=j}function Z(K,ee){ae(b=K,ee),a=k,E=O,y=N,z=_,I=U,Y.point=ae}function j(){x(k,O,B,N,_,U,a,E,b,y,z,I,n,S),Y.lineEnd=ce,ce()}return Y}}var f=(0,t.l)({point:function(T,C){this.stream.point(T*v.uR,C*v.uR)}});function w(T){return(0,t.l)({point:function(C,x){var S=T(C,x);return this.stream.point(S[0],S[1])}})}function h(T,C,x,S,b){function a(E,y){return E*=S,y*=b,[C+T*E,x-T*y]}return a.invert=function(E,y){return[(E-C)/T*S,(x-y)/T*b]},a}function o(T,C,x,S,b,a){var E=(0,v.mC)(a),y=(0,v.O$)(a),z=E*T,I=y*T,B=E/T,k=y/T,O=(y*x-E*C)/T,N=(y*C+E*x)/T;function _(U,Y){return U*=S,Y*=b,[z*U-I*Y+C,x-I*U-z*Y]}return _.invert=function(U,Y){return[S*(B*U-k*Y+O),b*(N-k*U-B*Y)]},_}function d(T){return M(function(){return T})()}function M(T){var C,x=150,S=480,b=250,a=0,E=0,y=0,z=0,I=0,B,k=0,O=1,N=1,_=null,U=m.Z,Y=null,J,te,ae,ce=A.Z,Q=.5,Z,j,K,ee,oe;function q(he){return K(he[0]*v.uR,he[1]*v.uR)}function $(he){return he=K.invert(he[0],he[1]),he&&[he[0]*v.RW,he[1]*v.RW]}q.stream=function(he){return ee&&oe===he?ee:ee=f(w(B)(U(Z(ce(oe=he)))))},q.preclip=function(he){return arguments.length?(U=he,_=void 0,ie()):U},q.postclip=function(he){return arguments.length?(ce=he,Y=J=te=ae=null,ie()):ce},q.clipAngle=function(he){return arguments.length?(U=+he?(0,P.Z)(_=he*v.uR):(_=null,m.Z),ie()):_*v.RW},q.clipExtent=function(he){return arguments.length?(ce=he==null?(Y=J=te=ae=null,A.Z):(0,i.Z)(Y=+he[0][0],J=+he[0][1],te=+he[1][0],ae=+he[1][1]),ie()):Y==null?null:[[Y,J],[te,ae]]},q.scale=function(he){return arguments.length?(x=+he,le()):x},q.translate=function(he){return arguments.length?(S=+he[0],b=+he[1],le()):[S,b]},q.center=function(he){return arguments.length?(a=he[0]%360*v.uR,E=he[1]%360*v.uR,le()):[a*v.RW,E*v.RW]},q.rotate=function(he){return arguments.length?(y=he[0]%360*v.uR,z=he[1]%360*v.uR,I=he.length>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<n;)m(r[s].geometry,t)}},i={Sphere:function(p,t){t.sphere()},Point:function(p,t){p=p.coordinates,t.point(p[0],p[1],p[2])},MultiPoint:function(p,t){for(var r=p.coordinates,s=-1,n=r.length;++s<n;)p=r[s],t.point(p[0],p[1],p[2])},LineString:function(p,t){L(p.coordinates,t,0)},MultiLineString:function(p,t){for(var r=p.coordinates,s=-1,n=r.length;++s<n;)L(r[s],t,0)},Polygon:function(p,t){A(p.coordinates,t)},MultiPolygon:function(p,t){for(var r=p.coordinates,s=-1,n=r.length;++s<n;)A(r[s],t)},GeometryCollection:function(p,t){for(var r=p.geometries,s=-1,n=r.length;++s<n;)m(r[s],t)}};function L(p,t,r){var s=-1,n=p.length-r,l;for(t.lineStart();++s<n;)l=p[s],t.point(l[0],l[1],l[2]);t.lineEnd()}function A(p,t){var r=-1,s=p.length;for(t.polygonStart();++r<s;)L(p[r],t,1);t.polygonEnd()}function v(p,t){p&&P.hasOwnProperty(p.type)?P[p.type](p,t):m(p,t)}},64684:function(G,V,e){e.d(V,{Z:function(){return m},l:function(){return P}});function m(L){return{stream:P(L)}}function P(L){return function(A){var v=new i;for(var p in L)v[p]=L[p];return v.stream=A,v}}function i(){}i.prototype={constructor:i,point:function(L,A){this.stream.point(L,A)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}}},674:function(G,V,e){e.r(V),e.d(V,{cluster:function(){return t},hierarchy:function(){return T},pack:function(){return $},packEnclose:function(){return z},packSiblings:function(){return Z},partition:function(){return Te},stratify:function(){return Ue},tree:function(){return dt},treemap:function(){return Je},treemapBinary:function(){return De},treemapDice:function(){return Me},treemapResquarify:function(){return ze},treemapSlice:function(){return pt},treemapSliceDice:function(){return Ie},treemapSquarify:function(){return Vt}});function m(Pe,be){return Pe.parent===be.parent?1:2}function P(Pe){return Pe.reduce(i,0)/Pe.length}function i(Pe,be){return Pe+be.x}function L(Pe){return 1+Pe.reduce(A,0)}function A(Pe,be){return Math.max(Pe,be.y)}function v(Pe){for(var be;be=Pe.children;)Pe=be[0];return Pe}function p(Pe){for(var be;be=Pe.children;)Pe=be[be.length-1];return Pe}function t(){var Pe=m,be=1,se=1,ye=!1;function Le(Be){var ot,at=0;Be.eachAfter(function(Lt){var Kt=Lt.children;Kt?(Lt.x=P(Kt),Lt.y=L(Kt)):(Lt.x=ot?at+=Pe(Lt,ot):0,Lt.y=0,ot=Lt)});var wt=v(Be),It=p(Be),Bt=wt.x-Pe(wt,It)/2,Gt=It.x+Pe(It,wt)/2;return Be.eachAfter(ye?function(Lt){Lt.x=(Lt.x-Be.x)*be,Lt.y=(Be.y-Lt.y)*se}:function(Lt){Lt.x=(Lt.x-Bt)/(Gt-Bt)*be,Lt.y=(1-(Be.y?Lt.y/Be.y:1))*se})}return Le.separation=function(Be){return arguments.length?(Pe=Be,Le):Pe},Le.size=function(Be){return arguments.length?(ye=!1,be=+Be[0],se=+Be[1],Le):ye?null:[be,se]},Le.nodeSize=function(Be){return arguments.length?(ye=!0,be=+Be[0],se=+Be[1],Le):ye?[be,se]:null},Le}function r(Pe){var be=0,se=Pe.children,ye=se&&se.length;if(!ye)be=1;else for(;--ye>=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<ot;++Be)ye.push(Le[Be]);while(ye.length);return this}function l(Pe){for(var be=this,se=[be],ye,Le;be=se.pop();)if(Pe(be),ye=be.children,ye)for(Le=ye.length-1;Le>=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<ot;++Be)se.push(Le[Be]);for(;be=ye.pop();)Pe(be);return this}function u(Pe){return this.eachAfter(function(be){for(var se=+Pe(be.data)||0,ye=be.children,Le=ye&&ye.length;--Le>=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;be<se;)Le=Pe[be],Be&&k(Be,Le)?++be:(Be=N(ye=I(ye,Le)),be=0);return Be}function I(Pe,be){var se,ye;if(O(be,Pe))return[be];for(se=0;se<Pe.length;++se)if(B(be,Pe[se])&&O(U(Pe[se],be),Pe))return[Pe[se],be];for(se=0;se<Pe.length-1;++se)for(ye=se+1;ye<Pe.length;++ye)if(B(U(Pe[se],Pe[ye]),be)&&B(U(Pe[se],be),Pe[ye])&&B(U(Pe[ye],be),Pe[se])&&O(Y(Pe[se],Pe[ye],be),Pe))return[Pe[se],Pe[ye],be];throw new Error}function B(Pe,be){var se=Pe.r-be.r,ye=be.x-Pe.x,Le=be.y-Pe.y;return se<0||se*se<ye*ye+Le*Le}function k(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 O(Pe,be){for(var se=0;se<be.length;++se)if(!k(Pe,be[se]))return!1;return!0}function N(Pe){switch(Pe.length){case 1:return _(Pe[0]);case 2:return U(Pe[0],Pe[1]);case 3:return Y(Pe[0],Pe[1],Pe[2])}}function _(Pe){return{x:Pe.x,y:Pe.y,r:Pe.r}}function U(Pe,be){var se=Pe.x,ye=Pe.y,Le=Pe.r,Be=be.x,ot=be.y,at=be.r,wt=Be-se,It=ot-ye,Bt=at-Le,Gt=Math.sqrt(wt*wt+It*It);return{x:(se+Be+wt/Gt*Bt)/2,y:(ye+ot+It/Gt*Bt)/2,r:(Gt+Le+at)/2}}function Y(Pe,be,se){var ye=Pe.x,Le=Pe.y,Be=Pe.r,ot=be.x,at=be.y,wt=be.r,It=se.x,Bt=se.y,Gt=se.r,Lt=ye-ot,Kt=ye-It,ir=Le-at,_r=Le-Bt,yt=wt-Be,jt=Gt-Be,Yt=ye*ye+Le*Le-Be*Be,br=Yt-ot*ot-at*at+wt*wt,hr=Yt-It*It-Bt*Bt+Gt*Gt,ut=Kt*ir-Lt*_r,lt=(ir*hr-_r*br)/(ut*2)-ye,xt=(_r*yt-ir*jt)/ut,Tt=(Kt*br-Lt*hr)/(ut*2)-Le,Ct=(Lt*jt-Kt*yt)/ut,St=xt*xt+Ct*Ct-1,_t=2*(Be+lt*xt+Tt*Ct),Ht=lt*lt+Tt*Tt-Be*Be,$t=-(St?(_t+Math.sqrt(_t*_t-4*St*Ht))/(2*St):Ht/_t);return{x:ye+lt+xt*$t,y:Le+Tt+Ct*$t,r:$t}}function J(Pe,be,se){var ye=Pe.x-be.x,Le,Be,ot=Pe.y-be.y,at,wt,It=ye*ye+ot*ot;It?(Be=be.r+se.r,Be*=Be,wt=Pe.r+se.r,wt*=wt,Be>wt?(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;at<Le;++at){J(be._,se._,ye=Pe[at]),ye=new ce(ye),wt=se.next,It=be.previous,Bt=se._.r,Gt=be._.r;do if(Bt<=Gt){if(te(wt._,ye._)){se=wt,be.next=se,se.previous=be,--at;continue e}Bt+=wt._.r,wt=wt.next}else{if(te(It._,ye._)){be=It,be.next=se,se.previous=be,--at;continue e}Gt+=It._.r,It=It.previous}while(wt!==It.next);for(ye.previous=be,ye.next=se,be.next=se.previous=se=ye,Be=ae(be);(ye=ye.next)!==se;)(ot=ae(ye))<Be&&(be=ye,Be=ot);se=be.next}for(be=[se._],ye=se;(ye=ye.next)!==se;)be.push(ye._);for(ye=z(be),at=0;at<Le;++at)be=Pe[at],be.x-=ye.x,be.y-=ye.y;return ye.r}function Z(Pe){return Q(Pe),Pe}function j(Pe){return Pe==null?null:K(Pe)}function K(Pe){if(typeof Pe!="function")throw new Error;return Pe}function ee(){return 0}function oe(Pe){return function(){return Pe}}function q(Pe){return Math.sqrt(Pe.value)}function $(){var Pe=null,be=1,se=1,ye=ee;function Le(Be){return Be.x=be/2,Be.y=se/2,Pe?Be.eachBefore(le(Pe)).eachAfter(ie(ye,.5)).eachBefore(he(1)):Be.eachBefore(le(q)).eachAfter(ie(ee,1)).eachAfter(ie(ye,Be.r/Math.min(be,se))).eachBefore(he(Math.min(be,se)/(2*Be.r))),Be}return Le.radius=function(Be){return arguments.length?(Pe=j(Be),Le):Pe},Le.size=function(Be){return arguments.length?(be=+Be[0],se=+Be[1],Le):[be,se]},Le.padding=function(Be){return arguments.length?(ye=typeof Be=="function"?Be:oe(+Be),Le):ye},Le}function le(Pe){return function(be){be.children||(be.r=Math.max(0,+Pe(be)||0))}}function ie(Pe,be){return function(se){if(ye=se.children){var ye,Le,Be=ye.length,ot=Pe(se)*be||0,at;if(ot)for(Le=0;Le<Be;++Le)ye[Le].r+=ot;if(at=Q(ye),ot)for(Le=0;Le<Be;++Le)ye[Le].r-=ot;se.r=at+ot}}}function he(Pe){return function(be){var se=be.parent;be.r*=Pe,se&&(be.x=se.x+Pe*be.x,be.y=se.y+Pe*be.y)}}function me(Pe){Pe.x0=Math.round(Pe.x0),Pe.y0=Math.round(Pe.y0),Pe.x1=Math.round(Pe.x1),Pe.y1=Math.round(Pe.y1)}function Me(Pe,be,se,ye,Le){for(var Be=Pe.children,ot,at=-1,wt=Be.length,It=Pe.value&&(ye-be)/Pe.value;++at<wt;)ot=Be[at],ot.y0=se,ot.y1=Le,ot.x0=be,ot.x1=be+=ot.value*It}function Te(){var Pe=1,be=1,se=0,ye=!1;function Le(ot){var at=ot.height+1;return ot.x0=ot.y0=se,ot.x1=Pe,ot.y1=be/at,ot.eachBefore(Be(be,at)),ye&&ot.eachBefore(me),ot}function Be(ot,at){return function(wt){wt.children&&Me(wt,wt.x0,ot*(wt.depth+1)/at,wt.x1,ot*(wt.depth+2)/at);var It=wt.x0,Bt=wt.y0,Gt=wt.x1-se,Lt=wt.y1-se;Gt<It&&(It=Gt=(It+Gt)/2),Lt<Bt&&(Bt=Lt=(Bt+Lt)/2),wt.x0=It,wt.y0=Bt,wt.x1=Gt,wt.y1=Lt}}return Le.round=function(ot){return arguments.length?(ye=!!ot,Le):ye},Le.size=function(ot){return arguments.length?(Pe=+ot[0],be=+ot[1],Le):[Pe,be]},Le.padding=function(ot){return arguments.length?(se=+ot,Le):se},Le}var Oe="$",Ne={depth:-1},Ee={};function xe(Pe){return Pe.id}function Se(Pe){return Pe.parentId}function Ue(){var Pe=xe,be=Se;function se(ye){var Le,Be,ot=ye.length,at,wt,It,Bt=new Array(ot),Gt,Lt,Kt={};for(Be=0;Be<ot;++Be)Le=ye[Be],It=Bt[Be]=new a(Le),(Gt=Pe(Le,Be,ye))!=null&&(Gt+="")&&(Lt=Oe+(It.id=Gt),Kt[Lt]=Lt in Kt?Ee:It);for(Be=0;Be<ot;++Be)if(It=Bt[Be],Gt=be(ye[Be],Be,ye),Gt==null||!(Gt+="")){if(at)throw new Error("multiple roots");at=It}else{if(wt=Kt[Oe+Gt],!wt)throw new Error("missing: "+Gt);if(wt===Ee)throw new Error("ambiguous: "+Gt);wt.children?wt.children.push(It):wt.children=[It],It.parent=wt}if(!at)throw new Error("no root");if(at.parent=Ne,at.eachBefore(function(ir){ir.depth=ir.parent.depth+1,--ot}).eachBefore(b),at.parent=null,ot>0)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.x<Gt.x&&(Gt=Yt),Yt.x>Lt.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&&Lt;)_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;++at<wt;)ot=Be[at],ot.x0=be,ot.x1=ye,ot.y0=se,ot.y1=se+=ot.value*It}var At=(1+Math.sqrt(5))/2;function Mt(Pe,be,se,ye,Le,Be){for(var ot=[],at=be.children,wt,It,Bt=0,Gt=0,Lt=at.length,Kt,ir,_r=be.value,yt,jt,Yt,br,hr,ut,lt;Bt<Lt;){Kt=Le-se,ir=Be-ye;do yt=at[Gt++].value;while(!yt&&Gt<Lt);for(jt=Yt=yt,ut=Math.max(ir/Kt,Kt/ir)/(_r*Pe),lt=yt*yt*ut,hr=Math.max(Yt/lt,lt/jt);Gt<Lt;++Gt){if(yt+=It=at[Gt].value,It<jt&&(jt=It),It>Yt&&(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:Kt<ir,children:at.slice(Bt,Gt)}),wt.dice?Me(wt,se,ye,Le,_r?ye+=ir*yt/_r:Be):pt(wt,se,ye,_r?se+=Kt*yt/_r:Le,Be),_r-=yt,Bt=Gt}return ot}var Vt=function Pe(be){function se(ye,Le,Be,ot,at){Mt(be,ye,Le,Be,ot,at)}return se.ratio=function(ye){return Pe((ye=+ye)>1?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<ir&&(ir=yt=(ir+yt)/2),jt<_r&&(_r=jt=(_r+jt)/2),Lt.x0=ir,Lt.y0=_r,Lt.x1=yt,Lt.y1=jt,Lt.children&&(Kt=Le[Lt.depth+1]=Be(Lt)/2,ir+=It(Lt)-Kt,_r+=ot(Lt)-Kt,yt-=at(Lt)-Kt,jt-=wt(Lt)-Kt,yt<ir&&(ir=yt=(ir+yt)/2),jt<_r&&(_r=jt=(_r+jt)/2),Pe(Lt,ir,_r,yt,jt))}return Bt.round=function(Lt){return arguments.length?(be=!!Lt,Bt):be},Bt.size=function(Lt){return arguments.length?(se=+Lt[0],ye=+Lt[1],Bt):[se,ye]},Bt.tile=function(Lt){return arguments.length?(Pe=K(Lt),Bt):Pe},Bt.padding=function(Lt){return arguments.length?Bt.paddingInner(Lt).paddingOuter(Lt):Bt.paddingInner()},Bt.paddingInner=function(Lt){return arguments.length?(Be=typeof Lt=="function"?Lt:oe(+Lt),Bt):Be},Bt.paddingOuter=function(Lt){return arguments.length?Bt.paddingTop(Lt).paddingRight(Lt).paddingBottom(Lt).paddingLeft(Lt):Bt.paddingTop()},Bt.paddingTop=function(Lt){return arguments.length?(ot=typeof Lt=="function"?Lt:oe(+Lt),Bt):ot},Bt.paddingRight=function(Lt){return arguments.length?(at=typeof Lt=="function"?Lt:oe(+Lt),Bt):at},Bt.paddingBottom=function(Lt){return arguments.length?(wt=typeof Lt=="function"?Lt:oe(+Lt),Bt):wt},Bt.paddingLeft=function(Lt){return arguments.length?(It=typeof Lt=="function"?Lt:oe(+Lt),Bt):It},Bt}function De(Pe,be,se,ye,Le){var Be=Pe.children,ot,at=Be.length,wt,It=new Array(at+1);for(It[0]=wt=ot=0;ot<at;++ot)It[ot+1]=wt+=Be[ot].value;Bt(0,at,Pe.value,be,se,ye,Le);function Bt(Gt,Lt,Kt,ir,_r,yt,jt){if(Gt>=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<lt;){var xt=ut+lt>>>1;It[xt]<hr?ut=xt+1:lt=xt}hr-It[ut-1]<It[ut]-hr&&Gt+1<ut&&--ut;var Tt=It[ut]-br,Ct=Kt-Tt;if(yt-ir>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;++Lt<ir;){for(It=wt[Lt],Bt=It.children,Gt=It.value=0,Kt=Bt.length;Gt<Kt;++Gt)It.value+=Bt[Gt].value;It.dice?Me(It,Le,Be,ot,Be+=(at-Be)*It.value/_r):pt(It,Le,Be,Le+=(ot-Le)*It.value/_r,at),_r-=It.value}else ye._squarify=wt=Mt(be,ye,Le,Be,ot,at),wt.ratio=be}return se.ratio=function(ye){return Pe((ye=+ye)>1?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));++pn<In;)vr.charCodeAt(pn)===37&&(kr.push(vr.slice(jr,pn)),(xr=n[Dn=vr.charAt(++pn)])!=null?Dn=vr.charAt(++pn):xr=Dn==="e"?" ":"0",(Ar=Hr[Dn])&&(Dn=Ar(Ir,xr)),kr.push(Dn),jr=pn+1);return kr.push(vr.slice(jr,pn)),kr.join("")}}function xt(vr,Hr){return function(Ir){var kr=r(1900,void 0,1),pn=Tt(kr,vr,Ir+="",0),jr,In;if(pn!=Ir.length)return null;if("Q"in kr)return new Date(kr.Q);if("s"in kr)return new Date(kr.s*1e3+("L"in kr?kr.L:0));if(Hr&&!("Z"in kr)&&(kr.Z=0),"p"in kr&&(kr.H=kr.H%12+kr.p*12),kr.m===void 0&&(kr.m="q"in kr?kr.q:0),"V"in kr){if(kr.V<1||kr.V>53)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<jr;){if(kr>=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+(Be<se?new Array(se-Be+1).join(be)+Le:Le)}function f(Pe){return Pe.replace(u,"\\$&")}function w(Pe){return new RegExp("^(?:"+Pe.map(f).join("|")+")","i")}function h(Pe){for(var be={},se=-1,ye=Pe.length;++se<ye;)be[Pe[se].toLowerCase()]=se;return be}function o(Pe,be,se){var ye=l.exec(be.slice(se,se+1));return ye?(Pe.w=+ye[0],se+ye[0].length):-1}function d(Pe,be,se){var ye=l.exec(be.slice(se,se+1));return ye?(Pe.u=+ye[0],se+ye[0].length):-1}function M(Pe,be,se){var ye=l.exec(be.slice(se,se+2));return ye?(Pe.U=+ye[0],se+ye[0].length):-1}function T(Pe,be,se){var ye=l.exec(be.slice(se,se+2));return ye?(Pe.V=+ye[0],se+ye[0].length):-1}function C(Pe,be,se){var ye=l.exec(be.slice(se,se+2));return ye?(Pe.W=+ye[0],se+ye[0].length):-1}function x(Pe,be,se){var ye=l.exec(be.slice(se,se+4));return ye?(Pe.y=+ye[0],se+ye[0].length):-1}function S(Pe,be,se){var ye=l.exec(be.slice(se,se+2));return ye?(Pe.y=+ye[0]+(+ye[0]>68?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-s<n-r?s:n},t.offset=function(r,s){return A(r=new Date(+r),s==null?1:Math.floor(s)),r},t.range=function(r,s,n){var l=[],c;if(r=t.ceil(r),n=n==null?1:Math.floor(n),!(r<s)||!(n>0))return l;do l.push(c=new Date(+r)),A(r,n),L(r);while(c<r&&r<s);return l},t.filter=function(r){return i(function(s){if(s>=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;g<u.length;g+=1)r(n,u[g],l[u[g]],c[u[g]])};s.supportsDescriptors=!!t,G.exports=s},46775:function(G){G.exports=function(){for(var V=0;V<arguments.length;V++)if(arguments[V]!==void 0)return arguments[V]}},53545:function(G){G.exports=P;var V=P.canvas=document.createElement("canvas"),e=V.getContext("2d"),m=i([32,126]);P.createPairs=i,P.ascii=m;function P(L,A){Array.isArray(L)&&(L=L.join(", "));var v={},p,t=16,r=.05;A&&(A.length===2&&typeof A[0]=="number"?p=i(A):Array.isArray(A)?p=A:(A.o?p=i(A.o):A.pairs&&(p=A.pairs),A.fontSize&&(t=A.fontSize),A.threshold!=null&&(r=A.threshold))),p||(p=m),e.font=t+"px "+L;for(var s=0;s<p.length;s++){var n=p[s],l=e.measureText(n[0]).width+e.measureText(n[1]).width,c=e.measureText(n).width;if(Math.abs(l-c)>t*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<L[1];t++){var r=String.fromCharCode(t),s=p+r;A.push(s)}return A}},31457:function(G,V,e){var m=e(65185),P=e(18625),i={M:"moveTo",C:"bezierCurveTo"};G.exports=function(L,A){L.beginPath(),P(m(A)).forEach(function(v){var p=v[0],t=v.slice(1);L[i[p]].apply(L,t)}),L.closePath()}},90660:function(G){G.exports=function(V){switch(V){case"int8":return Int8Array;case"int16":return Int16Array;case"int32":return Int32Array;case"uint8":return Uint8Array;case"uint16":return Uint16Array;case"uint32":return Uint32Array;case"float32":return Float32Array;case"float64":return Float64Array;case"array":return Array;case"uint8_clamped":return Uint8ClampedArray}}},12129:function(G){function V(P,i,L){var A=P[L]|0;if(A<=0)return[];var v=new Array(A),p;if(L===P.length-1)for(p=0;p<A;++p)v[p]=i;else for(p=0;p<A;++p)v[p]=V(P,i,L+1);return v}function e(P,i){var L,A;for(L=new Array(P),A=0;A<P;++A)L[A]=i;return L}function m(P,i){switch(typeof i>"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;j<N;j+=k)ce=I[j],Q=I[j+1],ce<Y&&(Y=ce),Q<J&&(J=Q),ce>te&&(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;_<k;_+=O)U=a(_,I[_],I[_+1],U);else for(_=k-O;_>=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<U.x?N.x:U.x:_.x<U.x?_.x:U.x,J=N.y<_.y?N.y<U.y?N.y:U.y:_.y<U.y?_.y:U.y,te=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;_<U;_++)Y=B[_]*O,J=_<U-1?B[_+1]*O:I.length,te=e(I,Y,J,O,!1),te===te.next&&(te.steiner=!0),N.push(g(te));for(N.sort(t),_=0;_<N.length;_++)r(N[_],k),k=m(k,k.next);return k}function t(I,B){return I.x-B.x}function r(I,B){if(B=s(I,B),B){var k=b(B,I);m(B,B.next),m(k,k.next)}}function s(I,B){var k=B,O=I.x,N=I.y,_=-1/0,U;do{if(N<=k.y&&N>=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.next.x?k:k.next}}k=k.next}while(k!==B);if(!U)return null;if(O===_)return U;var J=U,te=U.x,ae=U.y,ce=1/0,Q;k=U;do O>=k.x&&k.x>=te&&O!==k.x&&f(N<ae?O:_,N,te,ae,N<ae?_:O,N,k.x,k.y)&&(Q=Math.abs(N-k.y)/(O-k.x),x(k,I)&&(Q<ce||Q===ce&&(k.x>U.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;B<te&&(Y++,O=O.nextZ,!!O);B++);for(J=te;Y>0||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<k.x||B.x===k.x&&B.y<k.y)&&(k=B),B=B.next;while(B!==I);return k}function f(I,B,k,O,N,_,U,Y){return(N-U)*(B-Y)-(I-U)*(_-Y)>=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;Y<J;Y++){var te=B[Y]*k,ae=Y<J-1?B[Y+1]*k:I.length;U-=Math.abs(z(I,te,ae,k))}var ce=0;for(Y=0;Y<O.length;Y+=3){var Q=O[Y]*k,Z=O[Y+1]*k,j=O[Y+2]*k;ce+=Math.abs((I[Q]-I[j])*(I[Z+1]-I[Q+1])-(I[Q]-I[Z])*(I[j+1]-I[Q+1]))}return U===0&&ce===0?0:Math.abs((ce-U)/U)};function z(I,B,k,O){for(var N=0,_=B,U=k-O;_<k;_+=O)N+=(I[U]-I[_])*(I[_+1]+I[U+1]),U=_;return N}V.flatten=function(I){for(var B=I[0][0].length,k={vertices:[],holes:[],dimensions:B},O=0,N=0;N<I.length;N++){for(var _=0;_<I[N].length;_++)for(var U=0;U<B;U++)k.vertices.push(I[N][_][U]);N>0&&(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<r[M].length;C++)x=r[M][C],x===s?(c(s,v),T=!0):p[x]||(T=l(x));if(T)n(M);else for(C=0;C<r[M].length;C++){x=r[M][C];var S=t[x];S||(S={},t[x]=S),S[x]=!0}return v.pop(),T}function c(M,T){var C=[].concat(T).concat(M);L?L(l):A.push(C)}function u(M){for(var T=0;T<i.length;T++)T<M&&(i[T]=[]),i[T]=i[T].filter(function(C){return 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<x.length;a++)for(var E=0;E<x[a].length;E++)x[a][E]<S&&(S=x[a][E],b=a);var y=x[b];if(!y)return!1;var z=i.map(function(I,B){return y.indexOf(B)===-1?[]:I.filter(function(k){return y.indexOf(k)!==-1})});return{leastVertex:S,adjList:z}}s=0;for(var f=i.length;s<f;){var w=g(s);if(s=w.leastVertex,r=w.adjList,r){for(var h=0;h<r.length;h++)for(var o=0;o<r[h].length;o++){var d=r[h][o];p[+d]=!1,t[d]={}}l(s),s=s+1}else s=f}if(!L)return A}},16134:function(G,V,e){var m=e(36672);G.exports=function(){return m(this).length=0,this}},4892:function(G,V,e){G.exports=e(64404)()?Array.from:e(49441)},64404:function(G){G.exports=function(){var V=Array.from,e,m;return typeof V!="function"?!1:(e=["raz","dwa"],m=V(e),!!(m&&m!==e&&m[1]==="dwa"))}},49441:function(G,V,e){var m=e(8260).iterator,P=e(73051),i=e(33717),L=e(35976),A=e(78513),v=e(36672),p=e(95296),t=e(87963),r=Array.isArray,s=Function.prototype.call,n={configurable:!0,enumerable:!0,writable:!0,value:null},l=Object.defineProperty;G.exports=function(c){var u=arguments[1],g=arguments[2],f,w,h,o,d,M,T,C,x,S;if(c=Object(v(c)),p(u)&&A(u),!this||this===Array||!i(this)){if(!u){if(P(c))return d=c.length,d!==1?Array.apply(null,c):(o=new Array(1),o[0]=c[0],o);if(r(c)){for(o=new Array(d=c.length),w=0;w<d;++w)o[w]=c[w];return o}}o=[]}else f=this;if(!r(c)){if((x=c[m])!==void 0){for(T=A(x).call(c),f&&(o=new f),C=T.next(),w=0;!C.done;)S=u?s.call(u,g,C.value,w):C.value,f?(n.value=S,l(o,w,n)):o[w]=S,C=T.next(),++w;d=w}else if(t(c)){for(d=c.length,f&&(o=new f),w=0,h=0;w<d;++w)S=c[w],w+1<d&&(M=S.charCodeAt(0),M>=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;w<d;++w)S=u?s.call(u,g,c[w],w):c[w],f?(n.value=S,l(o,w,n)):o[w]=S;return f&&(n.value=null,o.length=d),o}},73051:function(G){var V=Object.prototype.toString,e=V.call(function(){return arguments}());G.exports=function(m){return V.call(m)===e}},33717:function(G){var V=Object.prototype.toString,e=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);G.exports=function(m){return typeof m=="function"&&e(V.call(m))}},52345:function(G){G.exports=function(){}},9953:function(G,V,e){G.exports=e(90436)()?Math.sign:e(6069)},90436:function(G){G.exports=function(){var V=Math.sign;return typeof V!="function"?!1:V(10)===1&&V(-20)===-1}},6069:function(G){G.exports=function(V){return V=Number(V),isNaN(V)||V===0?V:V>0?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<t;++p)A=arguments[p],m(A).forEach(r);if(v!==void 0)throw v;return L}},19012:function(G,V,e){var m=e(4892),P=e(95879),i=e(36672);G.exports=function(L){var A=Object(i(L)),v=arguments[1],p=Object(arguments[2]);if(A!==L&&!v)return A;var t={};return v?m(v,function(r){(p.ensure||r in L)&&(t[r]=L[r])}):P(t,L),t}},52818:function(G,V,e){var m=Object.create,P;e(33247)()||(P=e(51882)),G.exports=function(){var i,L,A;return!P||P.level!==1?m:(i={},L={},A={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach(function(v){if(v==="__proto__"){L[v]={configurable:!0,enumerable:!1,writable:!0,value:void 0};return}L[v]=A}),Object.defineProperties(i,L),Object.defineProperty(P,"nullPolyfill",{configurable:!1,enumerable:!1,writable:!1,value:i}),function(v,p){return m(v===null?i:v,p)})}()},96437:function(G,V,e){G.exports=e(67260)("forEach")},99611:function(G,V,e){var m=e(95296),P={function:!0,object:!0};G.exports=function(i){return m(i)&&P[typeof i]||!1}},95296:function(G,V,e){var m=e(52345)();G.exports=function(P){return P!==m&&P!==null}},68700:function(G,V,e){G.exports=e(13895)()?Object.keys:e(25217)},13895:function(G){G.exports=function(){try{return Object.keys("primitive"),!0}catch{return!1}}},25217:function(G,V,e){var m=e(95296),P=Object.keys;G.exports=function(i){return P(m(i)?Object(i):i)}},16906:function(G,V,e){var m=e(78513),P=e(96437),i=Function.prototype.call;G.exports=function(L,A){var v={},p=arguments[2];return m(A),P(L,function(t,r,s,n){v[r]=i.call(A,p,t,r,s,n)}),v}},21780:function(G,V,e){var m=e(95296),P=Array.prototype.forEach,i=Object.create,L=function(A,v){var p;for(p in A)v[p]=A[p]};G.exports=function(A){var v=i(null);return P.call(arguments,function(p){m(p)&&L(Object(p),v)}),v}},1496:function(G,V,e){G.exports=e(33247)()?Object.setPrototypeOf:e(51882)},33247:function(G){var V=Object.create,e=Object.getPrototypeOf,m={};G.exports=function(){var P=Object.setPrototypeOf,i=arguments[0]||V;return typeof P!="function"?!1:e(P(i(null),m))===m}},51882:function(G,V,e){var m=e(99611),P=e(36672),i=Object.prototype.isPrototypeOf,L=Object.defineProperty,A={configurable:!0,enumerable:!1,writable:!0,value:void 0},v;v=function(p,t){if(P(p),t===null||m(t))return p;throw new TypeError("Prototype must be null or an object")},G.exports=function(p){var t,r;return p?(p.level===2?p.set?(r=p.set,t=function(s,n){return r.call(v(s,n),n),s}):t=function(s,n){return v(s,n).__proto__=n,s}:t=function s(n,l){var c;return v(n,l),c=i.call(s.nullPolyfill,n),c&&delete s.nullPolyfill.__proto__,l===null&&(l=s.nullPolyfill),n.__proto__=l,c&&L(s.nullPolyfill,"__proto__",A),n},Object.defineProperty(t,"level",{configurable:!1,enumerable:!1,writable:!1,value:p.level})):null}(function(){var p=Object.create(null),t={},r,s=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__");if(s){try{r=s.set,r.call(p,t)}catch{}if(Object.getPrototypeOf(p)===t)return{set:r,level:2}}return p.__proto__=t,Object.getPrototypeOf(p)===t?{level:2}:(p={},p.__proto__=t,Object.getPrototypeOf(p)===t?{level:1}:!1)}()),e(52818)},78513:function(G){G.exports=function(V){if(typeof V!="function")throw new TypeError(V+" is not a function");return V}},98976:function(G,V,e){var m=e(99611);G.exports=function(P){if(!m(P))throw new TypeError(P+" is not an Object");return P}},36672:function(G,V,e){var m=e(95296);G.exports=function(P){if(!m(P))throw new TypeError("Cannot use null or undefined");return P}},66741:function(G,V,e){G.exports=e(17557)()?String.prototype.contains:e(60381)},17557:function(G){var V="razdwatrzy";G.exports=function(){return typeof V.contains!="function"?!1:V.contains("dwa")===!0&&V.contains("foo")===!1}},60381:function(G){var V=String.prototype.indexOf;G.exports=function(e){return V.call(this,e,arguments[1])>-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<f&&(w=t[g],g+1<f&&(h=w.charCodeAt(0),h>=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.__list__.length)return this.__nextIndex__++;this._unBind()}}),next:A(function(){return this._createResult(this._next())}),_createResult:A(function(n){return n===void 0?{done:!0,value:void 0}:{done:!1,value:this._resolve(n)}}),_resolve:A(function(n){return this.__list__[n]}),_unBind:A(function(){this.__list__=null,delete this.__redo__,this.__context__&&(this.__context__.off("_add",this._onAdd),this.__context__.off("_delete",this._onDelete),this.__context__.off("_clear",this._onClear),this.__context__=null)}),toString:A(function(){return"[object "+(this[p.toStringTag]||"Object")+"]"})},v({_onAdd:A(function(n){if(!(n>=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__<this.__length__)return this.__nextIndex__++;this._unBind()}}),_resolve:P(function(p){var t=this.__list__[p],r;return this.__nextIndex__===this.__length__?t:(r=t.charCodeAt(0),r>=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;L<arguments.length;L++){var A=arguments[L];if(A!=null)for(var v=Object.keys(Object(A)),p=0,t=v.length;p<t;p++){var r=v[p],s=Object.getOwnPropertyDescriptor(A,r);s!==void 0&&s.enumerable&&(i[r]=A[r])}}return i}function e(){Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:V})}G.exports={assign:V,polyfill:e}},8260:function(G,V,e){G.exports=e(69711)()?e(94908).Symbol:e(18415)},69711:function(G,V,e){var m=e(94908),P={object:!0,symbol:!0};G.exports=function(){var i=m.Symbol,L;if(typeof i!="function")return!1;L=i("test symbol");try{String(L)}catch{return!1}return!(!P[typeof i.iterator]||!P[typeof i.toPrimitive]||!P[typeof i.toStringTag])}},82276:function(G){G.exports=function(V){return V?typeof V=="symbol"?!0:!V.constructor||V.constructor.name!=="Symbol"?!1:V[V.constructor.toStringTag]==="Symbol":!1}},29366:function(G,V,e){var m=e(62072),P=Object.create,i=Object.defineProperty,L=Object.prototype,A=P(null);G.exports=function(v){for(var p=0,t,r;A[v+(p||"")];)++p;return v+=p||"",A[v]=!0,t="@@"+v,i(L,t,m.gs(null,function(s){r||(r=!0,i(this,t,m(s)),r=!1)})),t}},92842:function(G,V,e){var m=e(62072),P=e(94908).Symbol;G.exports=function(i){return Object.defineProperties(i,{hasInstance:m("",P&&P.hasInstance||i("hasInstance")),isConcatSpreadable:m("",P&&P.isConcatSpreadable||i("isConcatSpreadable")),iterator:m("",P&&P.iterator||i("iterator")),match:m("",P&&P.match||i("match")),replace:m("",P&&P.replace||i("replace")),search:m("",P&&P.search||i("search")),species:m("",P&&P.species||i("species")),split:m("",P&&P.split||i("split")),toPrimitive:m("",P&&P.toPrimitive||i("toPrimitive")),toStringTag:m("",P&&P.toStringTag||i("toStringTag")),unscopables:m("",P&&P.unscopables||i("unscopables"))})}},13304:function(G,V,e){var m=e(62072),P=e(53308),i=Object.create(null);G.exports=function(L){return Object.defineProperties(L,{for:m(function(A){return i[A]?i[A]:i[A]=L(String(A))}),keyFor:m(function(A){var v;P(A);for(v in i)if(i[v]===A)return v})})}},18415:function(G,V,e){var m=e(62072),P=e(53308),i=e(94908).Symbol,L=e(29366),A=e(92842),v=e(13304),p=Object.create,t=Object.defineProperties,r=Object.defineProperty,s,n,l;if(typeof i=="function")try{String(i()),l=!0}catch{}else i=null;n=function(u){if(this instanceof n)throw new TypeError("Symbol is not a constructor");return s(u)},G.exports=s=function c(u){var g;if(this instanceof c)throw new TypeError("Symbol is not a constructor");return l?i(u):(g=p(n.prototype),u=u===void 0?"":String(u),t(g,{__description__:m("",u),__name__:m("",L(u))}))},A(s),v(s),t(n.prototype,{constructor:m(s),toString:m("",function(){return this.__name__})}),t(s.prototype,{toString:m(function(){return"Symbol ("+P(this).__description__+")"}),valueOf:m(function(){return P(this)})}),r(s.prototype,s.toPrimitive,m("",function(){var c=P(this);return typeof c=="symbol"?c:c.toString()})),r(s.prototype,s.toStringTag,m("c","Symbol")),r(n.prototype,s.toStringTag,m("c",s.prototype[s.toStringTag])),r(n.prototype,s.toPrimitive,m("c",s.prototype[s.toPrimitive]))},53308:function(G,V,e){var m=e(82276);G.exports=function(P){if(!m(P))throw new TypeError(P+" is not a symbol");return P}},83522:function(G,V,e){G.exports=e(96402)()?WeakMap:e(329)},96402:function(G){G.exports=function(){var V,e;if(typeof WeakMap!="function")return!1;try{V=new WeakMap([[e={},"one"],[{},"two"],[{},"three"]])}catch{return!1}return!(String(V)!=="[object WeakMap]"||typeof V.set!="function"||V.set({},1)!==V||typeof V.delete!="function"||typeof V.has!="function"||V.get(e)!=="one")}},96416:function(G){G.exports=function(){return typeof WeakMap!="function"?!1:Object.prototype.toString.call(new WeakMap)==="[object WeakMap]"}()},329:function(G,V,e){var m=e(95296),P=e(1496),i=e(98976),L=e(36672),A=e(43043),v=e(62072),p=e(66661),t=e(27515),r=e(8260).toStringTag,s=e(96416),n=Array.isArray,l=Object.defineProperty,c=Object.prototype.hasOwnProperty,u=Object.getPrototypeOf,g;G.exports=g=function(){var f=arguments[0],w;if(!(this instanceof g))throw new TypeError("Constructor requires 'new'");return w=s&&P&&WeakMap!==g?P(new WeakMap,u(this)):this,m(f)&&(n(f)||(f=p(f))),l(w,"__weakMapData__",v("c","$weakMap$"+A())),f&&t(f,function(h){L(h),w.set(h[0],h[1])}),w},s&&(P&&P(g,WeakMap),g.prototype=Object.create(WeakMap.prototype,{constructor:v(g)})),Object.defineProperties(g.prototype,{delete:v(function(f){return c.call(i(f),this.__weakMapData__)?(delete f[this.__weakMapData__],!0):!1}),get:v(function(f){if(c.call(i(f),this.__weakMapData__))return f[this.__weakMapData__]}),has:v(function(f){return c.call(i(f),this.__weakMapData__)}),set:v(function(f,w){return l(i(f),this.__weakMapData__,v("c",w)),this}),toString:v(function(){return"[object WeakMap]"})}),l(g.prototype,r,v("c","WeakMap"))},15398:function(G){var V=typeof Reflect=="object"?Reflect:null,e=V&&typeof V.apply=="function"?V.apply:function(d,M,T){return Function.prototype.apply.call(d,M,T)},m;V&&typeof V.ownKeys=="function"?m=V.ownKeys:Object.getOwnPropertySymbols?m=function(d){return Object.getOwnPropertyNames(d).concat(Object.getOwnPropertySymbols(d))}:m=function(d){return Object.getOwnPropertyNames(d)};function P(o){console&&console.warn&&console.warn(o)}var i=Number.isNaN||function(d){return d!==d};function L(){L.init.call(this)}G.exports=L,G.exports.once=f,L.EventEmitter=L,L.prototype._events=void 0,L.prototype._eventsCount=0,L.prototype._maxListeners=void 0;var A=10;function v(o){if(typeof o!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof o)}Object.defineProperty(L,"defaultMaxListeners",{enumerable:!0,get:function(){return A},set:function(o){if(typeof o!="number"||o<0||i(o))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+o+".");A=o}}),L.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},L.prototype.setMaxListeners=function(d){if(typeof d!="number"||d<0||i(d))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+d+".");return this._maxListeners=d,this};function p(o){return o._maxListeners===void 0?L.defaultMaxListeners:o._maxListeners}L.prototype.getMaxListeners=function(){return p(this)},L.prototype.emit=function(d){for(var M=[],T=1;T<arguments.length;T++)M.push(arguments[T]);var C=d==="error",x=this._events;if(x!==void 0)C=C&&x.error===void 0;else if(!C)return!1;if(C){var S;if(M.length>0&&(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;T<E;++T)e(y[T],this,M);return!0};function t(o,d,M,T){var C,x,S;if(v(M),x=o._events,x===void 0?(x=o._events=Object.create(null),o._eventsCount=0):(x.newListener!==void 0&&(o.emit("newListener",d,M.listener?M.listener:M),x=o._events),S=x[d]),S===void 0)S=x[d]=M,++o._eventsCount;else if(typeof S=="function"?S=x[d]=T?[M,S]:[S,M]:T?S.unshift(M):S.push(M),C=p(o),C>0&&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<x.length;++C)S=x[C],S!=="removeListener"&&this.removeAllListeners(S);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(M=T[d],typeof M=="function")this.removeListener(d,M);else if(M!==void 0)for(C=M.length-1;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;T<d;++T)M[T]=o[T];return M}function u(o,d){for(;d+1<o.length;d++)o[d]=o[d+1];o.pop()}function g(o){for(var d=new Array(o.length),M=0;M<d.length;++M)d[M]=o[M].listener||o[M];return d}function f(o,d){return new Promise(function(M,T){function C(S){o.removeListener(d,x),T(S)}function x(){typeof o.removeListener=="function"&&o.removeListener("error",C),M([].slice.call(arguments))}h(o,d,x,{once:!0}),d!=="error"&&w(o,C,{once:!0})})}function w(o,d,M){typeof o.on=="function"&&h(o,"error",d,M)}function h(o,d,M,T){if(typeof o.on=="function")T.once?o.once(d,M):o.on(d,M);else if(typeof o.addEventListener=="function")o.addEventListener(d,function C(x){T.once&&o.removeEventListener(d,C),M(x)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof o)}},60774:function(G){var V=function(){if(typeof self=="object"&&self)return self;if(typeof window=="object"&&window)return window;throw new Error("Unable to resolve global `this`")};G.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch{return V()}try{return __global__||V()}finally{delete Object.prototype.__global__}}()},94908:function(G,V,e){G.exports=e(51152)()?globalThis:e(60774)},51152:function(G){G.exports=function(){return typeof globalThis!="object"||!globalThis?!1:globalThis.Array===Array}},92770:function(G,V,e){var m=e(18546);G.exports=function(P){var i=typeof P;if(i==="string"){var L=P;if(P=+P,P===0&&m(L))return!1}else if(i!=="number")return!1;return P-P<1}},30120:function(G,V,e){var m=e(90660);G.exports=P;function P(i,L,A){if(!i)throw new TypeError("must specify data as first parameter");if(A=+(A||0)|0,Array.isArray(i)&&i[0]&&typeof i[0][0]=="number"){var v=i[0].length,p=i.length*v,t,r,s,n;(!L||typeof L=="string")&&(L=new(m(L||"float32"))(p+A));var l=L.length-A;if(p!==l)throw new Error("source length "+p+" ("+v+"x"+i.length+") does not match destination length "+l);for(t=0,s=A;t<i.length;t++)for(r=0;r<v;r++)L[s++]=i[t][r]===null?NaN:i[t][r]}else if(!L||typeof L=="string"){var c=m(L||"float32");if(Array.isArray(i)||L==="array")for(L=new c(i.length+A),t=0,s=A,n=L.length;s<n;s++,t++)L[s]=i[t]===null?NaN:i[t];else A===0?L=new c(i):(L=new c(i.length+A),L.set(i,A))}else L.set(i,A);return L}},68016:function(G,V,e){var m=e(53313),P=[32,126];G.exports=i;function i(L){L=L||{};var A=L.shape?L.shape:L.canvas?[L.canvas.width,L.canvas.height]:[512,512],v=L.canvas||document.createElement("canvas"),p=L.font,t=typeof L.step=="number"?[L.step,L.step]:L.step||[32,32],r=L.chars||P;if(p&&typeof p!="string"&&(p=m(p)),!Array.isArray(r))r=String(r).split("");else if(r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"){for(var s=[],n=r[0],l=0;n<=r[1];n++)s[l++]=String.fromCharCode(n);r=s}A=A.slice(),v.width=A[0],v.height=A[1];var c=v.getContext("2d");c.fillStyle="#000",c.fillRect(0,0,v.width,v.height),c.font=p,c.textAlign="center",c.textBaseline="middle",c.fillStyle="#fff";for(var u=t[0]/2,g=t[1]/2,n=0;n<r.length;n++)c.fillText(r[n],u,g),(u+=t[0])>A[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;v<A.length;v+=4)if(A[v]!==0)return Math.floor((v-3)*.25/L)}function P(i){for(var L=i.height,A=i.data,v=A.length-1;v>0;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<c;l++)i.call(r,l)&&(n==null?s(r[l],l,r):s.call(n,r[l],l,r))},A=function(r,s,n){for(var l=0,c=r.length;l<c;l++)n==null?s(r.charAt(l),l,r):s.call(n,r.charAt(l),l,r)},v=function(r,s,n){for(var l in r)i.call(r,l)&&(n==null?s(r[l],l,r):s.call(n,r[l],l,r))},p=function(r,s,n){if(!m(s))throw new TypeError("iterator must be a function");var l;arguments.length>=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<r;n++)s.push("$"+n);if(p=Function("binder","return function ("+s.join(",")+"){ return binder.apply(this,arguments); }")(t),A.prototype){var l=function(){};l.prototype=A.prototype,p.prototype=new l,l.prototype=null}return p}},77575:function(G,V,e){var m=e(73047);G.exports=Function.prototype.bind||m},86249:function(G){G.exports=V;function V(e,m){if(typeof e!="string")throw new TypeError("must specify type string");if(m=m||{},typeof document>"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<A.length;v++)if(L=P.getContext(A[v],i),L)return L}catch{L=null}return L||null}},68318:function(G,V,e){var m,P=SyntaxError,i=Function,L=TypeError,A=function(E){try{return i('"use strict"; return ('+E+").constructor;")()}catch{}},v=Object.getOwnPropertyDescriptor;if(v)try{v({},"")}catch{v=null}var p=function(){throw new L},t=v?function(){try{return arguments.callee,p}catch{try{return v(arguments,"callee").get}catch{return p}}}():p,r=e(57877)(),s=Object.getPrototypeOf||function(E){return E.__proto__},n={},l=typeof Uint8Array>"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;Y+=1){var te=I[Y],ae=T(te,0,1),ce=T(te,-1);if((ae==='"'||ae==="'"||ae==="`"||ce==='"'||ce==="'"||ce==="`")&&ae!==ce)throw new P("property names with quotes must have matching quotes");if((te==="constructor"||!J)&&(_=!0),B+="."+te,O="%"+B+"%",h(c,O))N=c[O];else if(N!=null){if(!(te in N)){if(!z)throw new L("base intrinsic for "+y+" exists, but the property is not available.");return}if(v&&Y+1>=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;z<y.length;z++)y[z]=S.text;S.text=y}var I;if(S.text!=null||a){if(this.textOffsets=[0],Array.isArray(S.text)){this.count=S.text[0].length,this.counts=[this.count];for(var B=1;B<S.text.length;B++)this.textOffsets[B]=this.textOffsets[B-1]+S.text[B-1].length,this.count+=S.text[B].length,this.counts.push(S.text[B].length);this.text=S.text.join("")}else this.text=S.text,this.count=this.text.length,this.counts=[this.count];I=[],this.font.forEach(function(Fe,Ge){T.atlasContext.font=Fe.baseString;for(var nt=b.fontAtlas[Ge],qe=0;qe<b.text.length;qe++){var $e=b.text.charAt(qe);if(nt.ids[$e]==null&&(nt.ids[$e]=nt.chars.length,nt.chars.push($e),I.push($e)),Fe.width[$e]==null&&(Fe.width[$e]=T.atlasContext.measureText($e).width/T.baseFontSize,b.kerning)){var et=[];for(var ct in Fe.width)et.push(ct+$e,$e+ct);u(Fe.kerning,c(Fe.family,{pairs:et}))}}})}if(S.position)if(S.position.length>2){for(var k=!S.position[0].length,O=t.mallocFloat(this.count*2),N=0,_=0;N<this.counts.length;N++){var U=this.counts[N];if(k)for(var Y=0;Y<U;Y++)O[_++]=S.position[N*2],O[_++]=S.position[N*2+1];else for(var J=0;J<U;J++)O[_++]=S.position[N][0],O[_++]=S.position[N][1]}this.position.call?this.position({type:"float",data:O}):this.position=this.regl.buffer({type:"float",data:O}),t.freeFloat(O)}else this.position.destroy&&this.position.destroy(),this.position={constant:S.position};if(S.text||a){var te=t.mallocUint8(this.count),ae=t.mallocFloat(this.count*2);this.textWidth=[];for(var ce=0,Q=0;ce<this.counts.length;ce++){for(var Z=this.counts[ce],j=this.font[ce]||this.font[0],K=this.fontAtlas[ce]||this.fontAtlas[0],ee=0;ee<Z;ee++){var oe=this.text.charAt(Q),q=this.text.charAt(Q-1);if(te[Q]=K.ids[oe],ae[Q*2]=j.width[oe],ee){var $=ae[Q*2-2],le=ae[Q*2],ie=ae[Q*2-1],he=ie+$*.5+le*.5;if(this.kerning){var me=j.kerning[q+oe];me&&(he+=me*.001)}ae[Q*2+1]=he}else ae[Q*2+1]=ae[Q*2]*.5;Q++}this.textWidth.push(ae.length?ae[Q*2-2]*.5+ae[Q*2-1]:0)}S.align||(S.align=this.align),this.charBuffer({data:te,type:"uint8",usage:"stream"}),this.sizeBuffer({data:ae,type:"float",usage:"stream"}),t.freeUint8(te),t.freeFloat(ae),I.length&&this.font.forEach(function(Fe,Ge){var nt=b.fontAtlas[Ge],qe=nt.step,$e=Math.floor(T.maxAtlasSize/qe),et=Math.min($e,nt.chars.length),ct=Math.ceil(nt.chars.length/et),dt=h(et*qe),pt=h(ct*qe);nt.width=dt,nt.height=pt,nt.rows=ct,nt.cols=et,nt.em&&nt.texture({data:p({canvas:T.atlasCanvas,font:nt.fontString,chars:nt.chars,shape:[dt,pt],step:[qe,qe]})})})}if(S.align&&(this.align=S.align,this.alignOffset=this.textWidth.map(function(Fe,Ge){var nt=Array.isArray(b.align)?b.align.length>1?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;Ne<Te;Ne+=4)Me.set(v(Oe(Ne,Ne+4),"uint8"),Ne)}else{var Ee=S.color.length;Me=t.mallocUint8(Ee*4);for(var xe=0;xe<Ee;xe++)Me.set(v(S.color[xe]||0,"uint8"),xe*4)}this.color=Me}if(S.position||S.text||S.color||S.baseline||S.align||S.font||S.offset||S.opacity){var Se=this.color.length>4||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;He<this.batch.length;He++)this.batch[He]={count:this.counts.length>1?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.length-1;P++)m.push(V[P],e[P]||"");return m.push(V[P]),m.join("")}},40383:function(G,V,e){var m=e(68318),P=m("%Object.getOwnPropertyDescriptor%",!0);if(P)try{P([],"length")}catch{P=null}G.exports=P},57035:function(G,V,e){var m=e(54404),P;typeof e.g.matchMedia=="function"?P=!e.g.matchMedia("(hover: none)").matches:P=m,G.exports=P},38520:function(G,V,e){var m=e(54404);function P(){var i=!1;try{var L=Object.defineProperty({},"passive",{get:function(){i=!0}});window.addEventListener("test",null,L),window.removeEventListener("test",null,L)}catch{i=!1}return i}G.exports=m&&P()},55622:function(G,V,e){var m=e(68318),P=m("%Object.defineProperty%",!0),i=function(){if(P)try{return P({},"a",{value:1}),!0}catch{return!1}return!1};i.hasArrayLengthDefineBug=function(){if(!i())return null;try{return P([],"length",{value:1}).length!==1}catch{return!0}},G.exports=i},57877:function(G,V,e){var m=typeof Symbol<"u"&&Symbol,P=e(35638);G.exports=function(){return typeof m!="function"||typeof Symbol!="function"||typeof m("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:P()}},35638:function(G){G.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},m=Symbol("test"),P=Object(m);if(typeof m=="string"||Object.prototype.toString.call(m)!=="[object Symbol]"||Object.prototype.toString.call(P)!=="[object Symbol]")return!1;var i=42;e[m]=i;for(m in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var L=Object.getOwnPropertySymbols(e);if(L.length!==1||L[0]!==m||!Object.prototype.propertyIsEnumerable.call(e,m))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var A=Object.getOwnPropertyDescriptor(e,m);if(A.value!==i||A.enumerable!==!0)return!1}return!0}},84543:function(G,V,e){var m=e(35638);G.exports=function(){return m()&&!!Symbol.toStringTag}},35065:function(G,V,e){var m=e(77575);G.exports=m.call(Function.call,Object.prototype.hasOwnProperty)},95280:function(G,V){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */V.read=function(e,m,P,i,L){var A,v,p=L*8-i-1,t=(1<<p)-1,r=t>>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<<r)-1,n=s>>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<<L|p,r+=L;r>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;P<e;P++)if(m=V.charCodeAt(P),(m<9||m>13)&&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<g.length;w+=1)if(g[w]===f)return w;return-1},s=i("String.prototype.slice"),n={},l=Object.getPrototypeOf;A&&v&&l&&m(t,function(u){var g=new p[u];if(Symbol.toStringTag in g){var f=l(g),w=v(f,Symbol.toStringTag);if(!w){var h=l(f);w=v(h,Symbol.toStringTag)}n[u]=w.get}});var c=function(g){var f=!1;return m(n,function(w,h){if(!f)try{f=w.call(g)===h}catch{}}),f};G.exports=function(g){if(!g||typeof g!="object")return!1;if(!A||!(Symbol.toStringTag in g)){var f=s(L(g),8,-1);return r(t,f)>-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)<D)return de;var Ke=this.sampleCurveDerivativeX(de);if(Math.abs(Ke)<1e-6)break;de=de-Ae/Ke}if(H=0,ne=1,de=R,de<H)return H;if(de>ne)return ne;for(;H<ne;){if(Ae=this.sampleCurveX(de),Math.abs(Ae-R)<D)return de;R>Ae?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<R.length;H++)if(!s(R[H],D[H]))return!1;return!0}if(typeof R=="object"&&R!==null&&D!==null){if(typeof D!="object")return!1;var ne=Object.keys(R);if(ne.length!==Object.keys(D).length)return!1;for(var de in R)if(!s(R[de],D[de]))return!1;return!0}return R===D}function n(R){if(R<=0)return 0;if(R>=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<de.length;ne+=1){var Ae=de[ne];for(var Re in Ae)R[Re]=Ae[Re]}return R}function d(R,D){for(var H={},ne=0;ne<D.length;ne++){var de=D[ne];de in R&&(H[de]=R[de])}return H}var M=1;function T(){return M++}function C(){function R(D){return D?(D^Math.random()*16>>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<R.length;H++)if(D.indexOf(R[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<ne;de=H++)Ae=R[H],Re=R[de],D+=(Re.x-Ae.x)*(Ae.y+Re.y);return D}function N(R){var D=R[0],H=R[1],ne=R[2];return H+=90,H*=Math.PI/180,ne*=Math.PI/180,{x:D*Math.cos(H)*Math.sin(ne),y:D*Math.sin(H)*Math.sin(ne),z:D*Math.cos(ne)}}function _(){return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope}function U(R){var D=/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\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<Re.length;Ae+=1){var Ke=Re[Ae];Ue(Ke)?de.push(this.canonicalizeTileURL(Ke,ne)):de.push(Ke)}return de},Ee.prototype._makeAPIURL=function(D,H){var ne="See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes",de=nt(q.API_URL);if(D.protocol=de.protocol,D.authority=de.authority,de.path!=="/"&&(D.path=""+de.path+D.path),!q.REQUIRE_ACCESS_TOKEN)return qe(D);if(H=H||q.ACCESS_TOKEN,!H)throw new Error("An API access token is required to use Mapbox GL. "+ne);if(H[0]==="s")throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+ne);return D.params=D.params.filter(function(Ae){return Ae.indexOf("access_token")===-1}),D.params.push("access_token="+H),qe(D)};function xe(R){return R.indexOf("mapbox:")===0}var Se=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function Ue(R){return Se.test(R)}function He(R){return R.indexOf("sku=")>0&&Ue(R)}function Fe(R){for(var D=0,H=R;D<H.length;D+=1){var ne=H[D],de=ne.match(/^access_token=(.*)$/);if(de)return de[1]}return null}var Ge=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function nt(R){var D=R.match(Ge);if(!D)throw new Error("Unable to parse URL object");return{protocol:D[1],authority:D[2],path:D[3]||"/",params:D[4]?D[4].split("&"):[]}}function qe(R){var D=R.params.length?"?"+R.params.join("&"):"";return R.protocol+"://"+R.authority+R.path+D}var $e="mapbox.eventData";function et(R){if(!R)return null;var D=R.split(".");if(!D||D.length!==3)return null;try{var H=JSON.parse(ce(D[1]));return H}catch{return null}}var ct=function(D){this.type=D,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null};ct.prototype.getStorageKey=function(D){var H=et(q.ACCESS_TOKEN),ne="";return H&&H.u?ne=ae(H.u):ne=q.ACCESS_TOKEN||"",D?$e+"."+D+":"+ne:$e+":"+ne},ct.prototype.fetchEventData=function(){var D=te("localStorage"),H=this.getStorageKey(),ne=this.getStorageKey("uuid");if(D)try{var de=self.localStorage.getItem(H);de&&(this.eventData=JSON.parse(de));var Ae=self.localStorage.getItem(ne);Ae&&(this.anonId=Ae)}catch{B("Unable to read from LocalStorage")}},ct.prototype.saveEventData=function(){var D=te("localStorage"),H=this.getStorageKey(),ne=this.getStorageKey("uuid");if(D)try{self.localStorage.setItem(ne,this.anonId),Object.keys(this.eventData).length>=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;Ae<Pe||Le(D,function(Re){var Ke=new self.Response(Re,ne);se(),be&&be.then(function(ft){return ft.put(ot(R.url),Ke)}).catch(function(ft){return B(ft.message)})})}}}function ot(R){var D=R.indexOf("?");return D<0?R:R.slice(0,D)}function at(R,D){if(se(),!be)return D(null);var H=ot(R.url);be.then(function(ne){ne.match(H).then(function(de){var Ae=wt(de);ne.delete(H),Ae&&ne.put(H,de.clone()),D(null,de,Ae)}).catch(D)}).catch(D)}function wt(R){if(!R)return!1;var D=new Date(R.headers.get("Expires")||0),H=U(R.headers.get("Cache-Control")||"");return D>Date.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<H.length-R;ne++)D.delete(H[ne])})})}function Lt(R){var D=self.caches.delete(De);R&&D.catch(R).then(function(){return R()})}function Kt(R,D){Ie=R,ze=D}var ir;function _r(){return ir==null&&(ir=self.OffscreenCanvas&&new self.OffscreenCanvas(1,1).getContext("2d")&&typeof self.createImageBitmap=="function"),ir}var yt={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};typeof Object.freeze=="function"&&Object.freeze(yt);var jt=function(R){function D(H,ne,de){ne===401&&Ue(de)&&(H+=": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes"),R.call(this,H),this.status=ne,this.url=de,this.name=this.constructor.name,this.message=H}return R&&(D.__proto__=R),D.prototype=Object.create(R&&R.prototype),D.prototype.constructor=D,D.prototype.toString=function(){return this.name+": "+this.message+" ("+this.status+"): "+this.url},D}(Error),Yt=_()?function(){return self.worker&&self.worker.referrer}:function(){return(self.location.protocol==="blob:"?self.parent:self).location.href},br=function(R){return/^file:/.test(R)||/^file:/.test(Yt())&&!/^\w+:/.test(R)};function hr(R,D){var H=new self.AbortController,ne=new self.Request(R.url,{method:R.method||"GET",body:R.body,credentials:R.credentials,headers:R.headers,referrer:Yt(),signal:H.signal}),de=!1,Ae=!1,Re=He(ne.url);R.type==="json"&&ne.headers.set("Accept","application/json");var Ke=function(bt,Et,Wt){if(!Ae){if(bt&&bt.message!=="SecurityError"&&B(bt),Et&&Wt)return ft(Et);var sr=Date.now();self.fetch(ne).then(function(qt){if(qt.ok){var mr=Re?qt.clone():null;return ft(qt,mr,sr)}else return D(new jt(qt.statusText,qt.status,R.url))}).catch(function(qt){qt.code!==20&&D(new Error(qt.message))})}},ft=function(bt,Et,Wt){(R.type==="arrayBuffer"?bt.arrayBuffer():R.type==="json"?bt.json():bt.text()).then(function(sr){Ae||(Et&&Wt&&Be(ne,Et,Wt),de=!0,D(null,sr,bt.headers.get("Cache-Control"),bt.headers.get("Expires")))}).catch(function(sr){Ae||D(new Error(sr.message))})};return Re?at(ne,Ke):Ke(null,null),{cancel:function(){Ae=!0,de||H.abort()}}}function ut(R,D){var H=new self.XMLHttpRequest;H.open(R.method||"GET",R.url,!0),R.type==="arrayBuffer"&&(H.responseType="arraybuffer");for(var ne in R.headers)H.setRequestHeader(ne,R.headers[ne]);return R.type==="json"&&(H.responseType="text",H.setRequestHeader("Accept","application/json")),H.withCredentials=R.credentials==="include",H.onerror=function(){D(new Error(H.statusText))},H.onload=function(){if((H.status>=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&&or<q.MAX_PARALLEL_IMAGE_REQUESTS;){var Re=Qt.shift(),Ke=Re.requestParameters,ft=Re.callback,bt=Re.cancelled;bt||(Re.cancel=Ye(Ke,ft).cancel)}},Ae=Tt(R,function(Re,Ke,ft,bt){de(),Re?D(Re):Ke&&(_r()?$t(Ke,D):Ht(Ke,D,ft,bt))});return{cancel:function(){Ae.cancel(),de()}}},We=function(R,D){var H=self.document.createElement("video");H.muted=!0,H.onloadstart=function(){D(null,H)};for(var ne=0;ne<R.length;ne++){var de=self.document.createElement("source");St(R[ne])||(H.crossOrigin="Anonymous"),de.src=R[ne],H.appendChild(de)}return{cancel:function(){}}};function Dt(R,D,H){var ne=H[R]&&H[R].indexOf(D)!==-1;ne||(H[R]=H[R]||[],H[R].push(D))}function Ft(R,D,H){if(H&&H[R]){var ne=H[R].indexOf(D);ne!==-1&&H[R].splice(ne,1)}}var Zt=function(D,H){H===void 0&&(H={}),o(this,H),this.type=D},nr=function(R){function D(H,ne){ne===void 0&&(ne={}),R.call(this,"error",o({error:H},ne))}return R&&(D.__proto__=R),D.prototype=Object.create(R&&R.prototype),D.prototype.constructor=D,D}(Zt),lr=function(){};lr.prototype.on=function(D,H){return this._listeners=this._listeners||{},Dt(D,H,this._listeners),this},lr.prototype.off=function(D,H){return Ft(D,H,this._listeners),Ft(D,H,this._oneTimeListeners),this},lr.prototype.once=function(D,H){return this._oneTimeListeners=this._oneTimeListeners||{},Dt(D,H,this._oneTimeListeners),this},lr.prototype.fire=function(D,H){typeof D=="string"&&(D=new Zt(D,H||{}));var ne=D.type;if(this.listens(ne)){D.target=this;for(var de=this._listeners&&this._listeners[ne]?this._listeners[ne].slice():[],Ae=0,Re=de;Ae<Re.length;Ae+=1){var Ke=Re[Ae];Ke.call(this,D)}for(var ft=this._oneTimeListeners&&this._oneTimeListeners[ne]?this._oneTimeListeners[ne].slice():[],bt=0,Et=ft;bt<Et.length;bt+=1){var Wt=Et[bt];Ft(ne,Wt,this._oneTimeListeners),Wt.call(this,D)}var sr=this._eventedParent;sr&&(o(D,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),sr.fire(D))}else D instanceof nr&&console.error(D.error);return this},lr.prototype.listens=function(D){return this._listeners&&this._listeners[D]&&this._listeners[D].length>0||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<de.length;ne+=1){var Ae=de[ne];for(var Re in Ae)R[Re]=Ae[Re]}return R}function hn(R){return R instanceof Number||R instanceof String||R instanceof Boolean?R.valueOf():R}function Ln(R){if(Array.isArray(R))return R.map(Ln);if(R instanceof Object&&!(R instanceof Number||R instanceof String||R instanceof Boolean)){var D={};for(var H in R)D[H]=Ln(R[H]);return D}return hn(R)}var wn=function(R){function D(H,ne){R.call(this,ne),this.message=ne,this.key=H}return R&&(D.__proto__=R),D.prototype=Object.create(R&&R.prototype),D.prototype.constructor=D,D}(Error),un=function(D,H){H===void 0&&(H=[]),this.parent=D,this.bindings={};for(var ne=0,de=H;ne<de.length;ne+=1){var Ae=de[ne],Re=Ae[0],Ke=Ae[1];this.bindings[Re]=Ke}};un.prototype.concat=function(D){return new un(this,D)},un.prototype.get=function(D){if(this.bindings[D])return this.bindings[D];if(this.parent)return this.parent.get(D);throw new Error(D+" not found in scope.")},un.prototype.has=function(D){return this.bindings[D]?!0:this.parent?this.parent.has(D):!1};var Rr={kind:"null"},Cr={kind:"number"},zr={kind:"string"},dn={kind:"boolean"},_n={kind:"color"},Wn={kind:"object"},yn={kind:"value"},On={kind:"error"},$n={kind:"collator"},la={kind:"formatted"},ia={kind:"resolvedImage"};function oa(R,D){return{kind:"array",itemType:R,N:D}}function da(R){if(R.kind==="array"){var D=da(R.itemType);return typeof R.N=="number"?"array<"+D+", "+R.N+">":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;H<ne.length;H+=1){var de=ne[H];if(!co(de,D))return null}}return"Expected "+da(R)+" but found "+da(D)+" instead."}function yo(R,D){return D.some(function(H){return H.kind===R.kind})}function So(R,D){return D.some(function(H){return H==="null"?R===null:H==="array"?Array.isArray(R):H==="object"?R&&!Array.isArray(R)&&typeof R=="object":H===typeof R})}var mo=L(function(R,D){var H={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function ne(bt){return bt=Math.round(bt),bt<0?0:bt>255?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<ne.length;H+=1){var de=ne[H];if(de.image){D.push(["image",de.image.name]);continue}D.push(de.text);var Ae={};de.fontStack&&(Ae["text-font"]=["literal",de.fontStack.split(",")]),de.scale&&(Ae["font-scale"]=de.scale),de.textColor&&(Ae["text-color"]=["rgba"].concat(de.textColor.toArray())),D.push(Ae)}return D};var Eo=function(D){this.name=D.name,this.available=D.available};Eo.prototype.toString=function(){return this.name},Eo.fromString=function(D){return D?new Eo({name:D,available:!1}):null},Eo.prototype.serialize=function(){return["image",this.name]};function qf(R,D,H,ne){if(!(typeof R=="number"&&R>=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;D<H.length;D+=1){var ne=H[D];if(!iu(ne))return!1}return!0}else if(typeof R=="object"){for(var de in R)if(!iu(R[de]))return!1;return!0}else return!1}function Ri(R){if(R===null)return Rr;if(typeof R=="string")return zr;if(typeof R=="boolean")return dn;if(typeof R=="number")return Cr;if(R instanceof qa)return _n;if(R instanceof au)return $n;if(R instanceof Ji)return la;if(R instanceof Eo)return ia;if(Array.isArray(R)){for(var D=R.length,H,ne=0,de=R;ne<de.length;ne+=1){var Ae=de[ne],Re=Ri(Ae);if(!H)H=Re;else{if(H===Re)continue;H=yn;break}}return oa(H||yn,D)}else return Wn}function ou(R){var D=typeof R;return R===null?"":D==="string"||D==="number"||D==="boolean"?String(R):R instanceof qa||R instanceof Ji||R instanceof Eo?R.toString():JSON.stringify(R)}var ko=function(D,H){this.type=D,this.value=H};ko.parse=function(D,H){if(D.length!==2)return H.error("'literal' expression requires exactly one argument, but found "+(D.length-1)+" instead.");if(!iu(D[1]))return H.error("invalid value");var ne=D[1],de=Ri(ne),Ae=H.expectedType;return de.kind==="array"&&de.N===0&&Ae&&Ae.kind==="array"&&(typeof Ae.N!="number"||Ae.N===0)&&(de=Ae),new ko(de,ne)},ko.prototype.evaluate=function(){return this.value},ko.prototype.eachChild=function(){},ko.prototype.outputDefined=function(){return!0},ko.prototype.serialize=function(){return this.type.kind==="array"||this.type.kind==="object"?["literal",this.value]:this.value instanceof qa?["rgba"].concat(this.value.toArray()):this.value instanceof Ji?this.value.serialize():this.value};var Wi=function(D){this.name="ExpressionEvaluationError",this.message=D};Wi.prototype.toJSON=function(){return this.message};var Fo={string:zr,number:Cr,boolean:dn,object:Wn},ho=function(D,H){this.type=D,this.args=H};ho.parse=function(D,H){if(D.length<2)return H.error("Expected at least one argument.");var ne=1,de,Ae=D[0];if(Ae==="array"){var Re;if(D.length>2){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=[];ne<D.length;ne++){var Et=H.parse(D[ne],ne,yn);if(!Et)return null;bt.push(Et)}return new ho(de,bt)},ho.prototype.evaluate=function(D){for(var H=0;H<this.args.length;H++){var ne=this.args[H].evaluate(D),de=co(this.type,Ri(ne));if(de){if(H===this.args.length-1)throw new Wi("Expected value to be of type "+da(this.type)+", but found "+da(Ri(ne))+" instead.")}else return ne}return null},ho.prototype.eachChild=function(D){this.args.forEach(D)},ho.prototype.outputDefined=function(){return this.args.every(function(D){return D.outputDefined()})},ho.prototype.serialize=function(){var D=this.type,H=[D.kind];if(D.kind==="array"){var ne=D.itemType;if(ne.kind==="string"||ne.kind==="number"||ne.kind==="boolean"){H.push(ne.kind);var de=D.N;(typeof de=="number"||this.args.length>1)&&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<ne.length;H+=1){var de=ne[H];D(de.content),de.scale&&D(de.scale),de.font&&D(de.font),de.textColor&&D(de.textColor)}},Vo.prototype.outputDefined=function(){return!1},Vo.prototype.serialize=function(){for(var D=["format"],H=0,ne=this.sections;H<ne.length;H+=1){var de=ne[H];D.push(de.content.serialize());var Ae={};de.scale&&(Ae["font-scale"]=de.scale.serialize()),de.font&&(Ae["text-font"]=de.font.serialize()),de.textColor&&(Ae["text-color"]=de.textColor.serialize()),D.push(Ae)}return D};var fs=function(D){this.type=ia,this.input=D};fs.parse=function(D,H){if(D.length!==2)return H.error("Expected two arguments.");var ne=H.parse(D[1],1,zr);return ne?new fs(ne):H.error("No image name provided.")},fs.prototype.evaluate=function(D){var H=this.input.evaluate(D),ne=Eo.fromString(H);return ne&&D.availableImages&&(ne.available=D.availableImages.indexOf(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;Re<D.length;Re++){var Ke=H.parse(D[Re],Re,yn);if(!Ke)return null;Ae.push(Ke)}return new eo(de,Ae)},eo.prototype.evaluate=function(D){if(this.type.kind==="boolean")return!!this.args[0].evaluate(D);if(this.type.kind==="color"){for(var H,ne,de=0,Ae=this.args;de<Ae.length;de+=1){var Re=Ae[de];if(H=Re.evaluate(D),ne=null,H instanceof qa)return H;if(typeof H=="string"){var Ke=D.parseColor(H);if(Ke)return Ke}else if(Array.isArray(H)&&(H.length<3||H.length>4?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<Et.length;bt+=1){var Wt=Et[bt];if(ft=Wt.evaluate(D),ft===null)return 0;var sr=Number(ft);if(!isNaN(sr))return sr}throw new Wi("Could not convert "+JSON.stringify(ft)+" to number.")}else return this.type.kind==="formatted"?Ji.fromString(ou(this.args[0].evaluate(D))):this.type.kind==="resolvedImage"?Eo.fromString(ou(this.args[0].evaluate(D))):ou(this.args[0].evaluate(D))},eo.prototype.eachChild=function(D){this.args.forEach(D)},eo.prototype.outputDefined=function(){return this.args.every(function(D){return D.outputDefined()})},eo.prototype.serialize=function(){if(this.type.kind==="formatted")return new Vo([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if(this.type.kind==="resolvedImage")return new fs(this.args[0]).serialize();var D=["to-"+this.type.kind];return this.eachChild(function(H){D.push(H.serialize())}),D};var ec=["Unknown","Point","LineString","Polygon"],cs=function(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null};cs.prototype.id=function(){return this.feature&&"id"in this.feature?this.feature.id:null},cs.prototype.geometryType=function(){return this.feature?typeof this.feature.type=="number"?ec[this.feature.type]:this.feature.type:null},cs.prototype.geometry=function(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null},cs.prototype.canonicalID=function(){return this.canonical},cs.prototype.properties=function(){return this.feature&&this.feature.properties||{}},cs.prototype.parseColor=function(D){var H=this._parseColorCache[D];return H||(H=this._parseColorCache[D]=qa.parse(D)),H};var to=function(D,H,ne,de){this.name=D,this.type=H,this._evaluate=ne,this.args=de};to.prototype.evaluate=function(D){return this._evaluate(D,this.args)},to.prototype.eachChild=function(D){this.args.forEach(D)},to.prototype.outputDefined=function(){return!1},to.prototype.serialize=function(){return[this.name].concat(this.args.map(function(D){return D.serialize()}))},to.parse=function(D,H){var ne,de=D[0],Ae=to.definitions[de];if(!Ae)return H.error('Unknown expression "'+de+'". If you wanted a literal array, use ["literal", [...]].',0);for(var Re=Array.isArray(Ae)?Ae[0]:Ae.type,Ke=Array.isArray(Ae)?[[Ae[1],Ae[2]]]:Ae.overloads,ft=Ke.filter(function(Ta){var Aa=Ta[0];return!Array.isArray(Aa)||Aa.length===D.length-1}),bt=null,Et=0,Wt=ft;Et<Wt.length;Et+=1){var sr=Wt[Et],qt=sr[0],mr=sr[1];bt=new Ds(H.registry,H.path,null,H.scope);for(var Br=[],rn=!1,$r=1;$r<D.length;$r++){var Mn=D[$r],xn=Array.isArray(qt)?qt[$r-1]:qt.type,An=bt.parse(Mn,1+Br.length,xn);if(!An){rn=!0;break}Br.push(An)}if(!rn){if(Array.isArray(qt)&&qt.length!==Br.length){bt.error("Expected "+qt.length+" arguments, but found "+Br.length+" instead.");continue}for(var kn=0;kn<Br.length;kn++){var Vn=Array.isArray(qt)?qt[kn]:qt.type,Qn=Br[kn];bt.concat(kn+1).checkSubtype(Vn,Qn.type)}if(bt.errors.length===0)return new to(de,Re,mr,Br)}}if(ft.length===1)(ne=H.errors).push.apply(ne,bt.errors);else{for(var Jn=ft.length?ft:Ke,Sa=Jn.map(function(Ta){var Aa=Ta[0];return hf(Aa)}).join(" | "),ca=[],ya=1;ya<D.length;ya++){var Ba=H.parse(D[ya],1+ca.length);if(!Ba)return null;ca.push(da(Ba.type))}H.error("Expected arguments of type "+Sa+", but found ("+ca.join(", ")+") instead.")}return null},to.register=function(D,H){to.definitions=H;for(var ne in H)D[ne]=to};function hf(R){return Array.isArray(R)?"("+R.map(da).join(", ")+")":"("+da(R.type)+"...)"}var Ps=function(D,H,ne){this.type=$n,this.locale=ne,this.caseSensitive=D,this.diacriticSensitive=H};Ps.parse=function(D,H){if(D.length!==2)return H.error("Expected one argument.");var ne=D[1];if(typeof ne!="object"||Array.isArray(ne))return H.error("Collator options argument must be an object.");var de=H.parse(ne["case-sensitive"]===void 0?!1:ne["case-sensitive"],1,dn);if(!de)return null;var Ae=H.parse(ne["diacritic-sensitive"]===void 0?!1:ne["diacritic-sensitive"],1,dn);if(!Ae)return null;var Re=null;return ne.locale&&(Re=H.parse(ne.locale,1,zr),!Re)?null:new Ps(de,Ae,Re)},Ps.prototype.evaluate=function(D){return new au(this.caseSensitive.evaluate(D),this.diacriticSensitive.evaluate(D),this.locale?this.locale.evaluate(D):null)},Ps.prototype.eachChild=function(D){D(this.caseSensitive),D(this.diacriticSensitive),this.locale&&D(this.locale)},Ps.prototype.outputDefined=function(){return!1},Ps.prototype.serialize=function(){var D={};return D["case-sensitive"]=this.caseSensitive.serialize(),D["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(D.locale=this.locale.serialize()),["collator",D]};var hs=8192;function vf(R,D){R[0]=Math.min(R[0],D[0]),R[1]=Math.min(R[1],D[1]),R[2]=Math.max(R[2],D[0]),R[3]=Math.max(R[3],D[1])}function df(R){return(180+R)/360}function eh(R){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+R*Math.PI/360)))/360}function su(R,D){return!(R[0]<=D[0]||R[2]>=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;ne<de;ne++)for(var Ae=D[ne],Re=0,Ke=Ae.length;Re<Ke-1;Re++){if(rh(R,Ae[Re],Ae[Re+1]))return!1;nh(R,Ae[Re],Ae[Re+1])&&(H=!H)}return H}function ah(R,D){for(var H=0;H<D.length;H++)if(pf(R,D[H]))return!0;return!1}function ih(R,D){return R[0]*D[1]-R[1]*D[0]}function tc(R,D,H,ne){var de=R[0]-H[0],Ae=R[1]-H[1],Re=D[0]-H[0],Ke=D[1]-H[1],ft=ne[0]-H[0],bt=ne[1]-H[1],Et=de*bt-ft*Ae,Wt=Re*bt-ft*Ke;return Et>0&&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;ne<de.length;ne+=1)for(var Ae=de[ne],Re=0;Re<Ae.length-1;++Re)if(oh(R,D,Ae[Re],Ae[Re+1]))return!0;return!1}function gf(R,D){for(var H=0;H<R.length;++H)if(!pf(R[H],D))return!1;for(var ne=0;ne<R.length-1;++ne)if(sh(R[ne],R[ne+1],D))return!1;return!0}function hl(R,D){for(var H=0;H<D.length;H++)if(gf(R,D[H]))return!0;return!1}function vl(R,D,H){for(var ne=[],de=0;de<R.length;de++){for(var Ae=[],Re=0;Re<R[de].length;Re++){var Ke=th(R[de][Re],H);vf(D,Ke),Ae.push(Ke)}ne.push(Ae)}return ne}function Fl(R,D,H){for(var ne=[],de=0;de<R.length;de++){var Ae=vl(R[de],D,H);ne.push(Ae)}return ne}function zu(R,D,H,ne){if(R[0]<H[0]||R[0]>H[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<ft.length;Ke+=1)for(var bt=ft[Ke],Et=0,Wt=bt;Et<Wt.length;Et+=1){var sr=Wt[Et],qt=[sr.x+Ae[0],sr.y+Ae[1]];zu(qt,D,H,de),Re.push(qt)}return Re}function rc(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<ft.length;Ke+=1){for(var bt=ft[Ke],Et=[],Wt=0,sr=bt;Wt<sr.length;Wt+=1){var qt=sr[Wt],mr=[qt.x+Ae[0],qt.y+Ae[1]];vf(D,mr),Et.push(mr)}Re.push(Et)}if(D[2]-D[0]<=de/2){lh(D);for(var Br=0,rn=Re;Br<rn.length;Br+=1)for(var $r=rn[Br],Mn=0,xn=$r;Mn<xn.length;Mn+=1){var An=xn[Mn];zu(An,D,H,de)}}return Re}function yf(R,D){var H=[1/0,1/0,-1/0,-1/0],ne=[1/0,1/0,-1/0,-1/0],de=R.canonicalID();if(D.type==="Polygon"){var Ae=vl(D.coordinates,ne,de),Re=Rs(R.geometry(),H,ne,de);if(!su(H,ne))return!1;for(var Ke=0,ft=Re;Ke<ft.length;Ke+=1){var bt=ft[Ke];if(!pf(bt,Ae))return!1}}if(D.type==="MultiPolygon"){var Et=Fl(D.coordinates,ne,de),Wt=Rs(R.geometry(),H,ne,de);if(!su(H,ne))return!1;for(var sr=0,qt=Wt;sr<qt.length;sr+=1){var mr=qt[sr];if(!ah(mr,Et))return!1}}return!0}function uh(R,D){var H=[1/0,1/0,-1/0,-1/0],ne=[1/0,1/0,-1/0,-1/0],de=R.canonicalID();if(D.type==="Polygon"){var Ae=vl(D.coordinates,ne,de),Re=rc(R.geometry(),H,ne,de);if(!su(H,ne))return!1;for(var Ke=0,ft=Re;Ke<ft.length;Ke+=1){var bt=ft[Ke];if(!gf(bt,Ae))return!1}}if(D.type==="MultiPolygon"){var Et=Fl(D.coordinates,ne,de),Wt=rc(R.geometry(),H,ne,de);if(!su(H,ne))return!1;for(var sr=0,qt=Wt;sr<qt.length;sr+=1){var mr=qt[sr];if(!hl(mr,Et))return!1}}return!0}var Ho=function(D,H){this.type=dn,this.geojson=D,this.geometries=H};Ho.parse=function(D,H){if(D.length!==2)return H.error("'within' expression requires exactly one argument, but found "+(D.length-1)+" instead.");if(iu(D[1])){var ne=D[1];if(ne.type==="FeatureCollection")for(var de=0;de<ne.features.length;++de){var Ae=ne.features[de].geometry.type;if(Ae==="Polygon"||Ae==="MultiPolygon")return new Ho(ne,ne.features[de].geometry)}else if(ne.type==="Feature"){var Re=ne.geometry.type;if(Re==="Polygon"||Re==="MultiPolygon")return new Ho(ne,ne.geometry)}else if(ne.type==="Polygon"||ne.type==="MultiPolygon")return new Ho(ne,ne)}return H.error("'within' expression requires valid geojson object that contains polygon geometry type.")},Ho.prototype.evaluate=function(D){if(D.geometry()!=null&&D.canonicalID()!=null){if(D.geometryType()==="Point")return yf(D,this.geometries);if(D.geometryType()==="LineString")return uh(D,this.geometries)}return!1},Ho.prototype.eachChild=function(){},Ho.prototype.outputDefined=function(){return!0},Ho.prototype.serialize=function(){return["within",this.geojson]};function dl(R){if(R instanceof to){if(R.name==="get"&&R.args.length===1)return!1;if(R.name==="feature-state")return!1;if(R.name==="has"&&R.args.length===1)return!1;if(R.name==="properties"||R.name==="geometry-type"||R.name==="id")return!1;if(/^filter-/.test(R.name))return!1}if(R instanceof Ho)return!1;var D=!0;return R.eachChild(function(H){D&&!dl(H)&&(D=!1)}),D}function lu(R){if(R instanceof to&&R.name==="feature-state")return!1;var D=!0;return R.eachChild(function(H){D&&!lu(H)&&(D=!1)}),D}function _l(R,D){if(R instanceof to&&D.indexOf(R.name)>=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||D<Ke)return Ae;ne=Ae+1}else if(Re>D)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<Ae.length;de+=1){var Re=Ae[de],Ke=Re[0],ft=Re[1];this.labels.push(Ke),this.outputs.push(ft)}};Zs.parse=function(D,H){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.");var ne=H.parse(D[1],1,Cr);if(!ne)return null;var de=[],Ae=null;H.expectedType&&H.expectedType.kind!=="value"&&(Ae=H.expectedType);for(var Re=1;Re<D.length;Re+=2){var Ke=Re===1?-1/0:D[Re],ft=D[Re+1],bt=Re,Et=Re+1;if(typeof Ke!="number")return H.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',bt);if(de.length&&de[de.length-1][0]>=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;H<ne.length;H+=1){var de=ne[H];D(de)}},Zs.prototype.outputDefined=function(){return this.outputs.every(function(D){return D.outputDefined()})},Zs.prototype.serialize=function(){for(var D=["step",this.input.serialize()],H=0;H<this.labels.length;H++)H>0&&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;Re<Ke.length;Re+=1){var ft=Ke[Re],bt=ft[0],Et=ft[1];this.labels.push(bt),this.outputs.push(Et)}};zi.interpolationFactor=function(D,H,ne,de){var Ae=0;if(D.name==="exponential")Ae=cu(H,D.base,ne,de);else if(D.name==="linear")Ae=cu(H,1,ne,de);else if(D.name==="cubic-bezier"){var Re=D.controlPoints,Ke=new v(Re[0],Re[1],Re[2],Re[3]);Ae=Ke.solve(cu(H,1,ne,de))}return Ae},zi.parse=function(D,H){var ne=D[0],de=D[1],Ae=D[2],Re=D.slice(3);if(!Array.isArray(de)||de.length===0)return H.error("Expected an interpolation type expression.",1);if(de[0]==="linear")de={name:"linear"};else if(de[0]==="exponential"){var Ke=de[1];if(typeof Ke!="number")return H.error("Exponential interpolation requires a numeric base.",1,1);de={name:"exponential",base:Ke}}else if(de[0]==="cubic-bezier"){var ft=de.slice(1);if(ft.length!==4||ft.some(function($r){return typeof $r!="number"||$r<0||$r>1}))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<Re.length;Wt+=2){var sr=Re[Wt],qt=Re[Wt+1],mr=Wt+3,Br=Wt+4;if(typeof sr!="number")return H.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',mr);if(bt.length&&bt[bt.length-1][0]>=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;H+=1){var de=ne[H];D(de)}},zi.prototype.outputDefined=function(){return this.outputs.every(function(D){return D.outputDefined()})},zi.prototype.serialize=function(){var D;this.interpolation.name==="linear"?D=["linear"]:this.interpolation.name==="exponential"?this.interpolation.base===1?D=["linear"]:D=["exponential",this.interpolation.base]:D=["cubic-bezier"].concat(this.interpolation.controlPoints);for(var H=[this.operator,D,this.input.serialize()],ne=0;ne<this.labels.length;ne++)H.push(this.labels[ne],this.outputs[ne].serialize());return H};function cu(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 Co=function(D,H){this.type=D,this.args=H};Co.parse=function(D,H){if(D.length<2)return H.error("Expectected at least one argument.");var ne=null,de=H.expectedType;de&&de.kind!=="value"&&(ne=de);for(var Ae=[],Re=0,Ke=D.slice(1);Re<Ke.length;Re+=1){var ft=Ke[Re],bt=H.parse(ft,1+Ae.length,ne,void 0,{typeAnnotation:"omit"});if(!bt)return null;ne=ne||bt.type,Ae.push(bt)}var Et=de&&Ae.some(function(Wt){return co(de,Wt.type)});return Et?new Co(yn,Ae):new Co(ne,Ae)},Co.prototype.evaluate=function(D){for(var H=null,ne=0,de,Ae=0,Re=this.args;Ae<Re.length;Ae+=1){var Ke=Re[Ae];if(ne++,H=Ke.evaluate(D),H&&H instanceof Eo&&!H.available&&(de||(de=H.name),H=null,ne===this.args.length&&(H=de)),H!==null)break}return H},Co.prototype.eachChild=function(D){this.args.forEach(D)},Co.prototype.outputDefined=function(){return this.args.every(function(D){return D.outputDefined()})},Co.prototype.serialize=function(){var D=["coalesce"];return this.eachChild(function(H){D.push(H.serialize())}),D};var Is=function(D,H){this.type=H.type,this.bindings=[].concat(D),this.result=H};Is.prototype.evaluate=function(D){return this.result.evaluate(D)},Is.prototype.eachChild=function(D){for(var H=0,ne=this.bindings;H<ne.length;H+=1){var de=ne[H];D(de[1])}D(this.result)},Is.parse=function(D,H){if(D.length<4)return H.error("Expected at least 3 arguments, but found "+(D.length-1)+" instead.");for(var ne=[],de=1;de<D.length-1;de+=2){var Ae=D[de];if(typeof Ae!="string")return H.error("Expected string, but found "+typeof Ae+" instead.",de);if(/[^a-zA-Z0-9_]/.test(Ae))return H.error("Variable names must contain only alphanumeric characters or '_'.",de);var Re=H.parse(D[de+1],de+1);if(!Re)return null;ne.push([Ae,Re])}var Ke=H.parse(D[D.length-1],D.length-1,H.expectedType,ne);return Ke?new Is(ne,Ke):null},Is.prototype.outputDefined=function(){return this.result.outputDefined()},Is.prototype.serialize=function(){for(var D=["let"],H=0,ne=this.bindings;H<ne.length;H+=1){var de=ne[H],Ae=de[0],Re=de[1];D.push(Ae,Re.serialize())}return D.push(this.result.serialize()),D};var ks=function(D,H,ne){this.type=D,this.index=H,this.input=ne};ks.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,Cr),de=H.parse(D[2],2,oa(H.expectedType||yn));if(!ne||!de)return null;var Ae=de.type;return new ks(Ae.itemType,ne,de)},ks.prototype.evaluate=function(D){var H=this.index.evaluate(D),ne=this.input.evaluate(D);if(H<0)throw new Wi("Array index out of bounds: "+H+" < 0.");if(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;Ke<D.length-1;Ke+=2){var ft=D[Ke],bt=D[Ke+1];Array.isArray(ft)||(ft=[ft]);var Et=H.concat(Ke);if(ft.length===0)return Et.error("Expected at least one branch label.");for(var Wt=0,sr=ft;Wt<sr.length;Wt+=1){var qt=sr[Wt];if(typeof qt!="number"&&typeof qt!="string")return Et.error("Branch labels must be numbers or strings.");if(typeof qt=="number"&&Math.abs(qt)>Number.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<Ke.length;Re+=1){var ft=Ke[Re],bt=Ae[this.cases[ft]];bt===void 0?(Ae[this.cases[ft]]=de.length,de.push([this.cases[ft],[ft]])):de[bt][1].push(ft)}for(var Et=function(Br){return D.inputType.kind==="number"?Number(Br):Br},Wt=0,sr=de;Wt<sr.length;Wt+=1){var qt=sr[Wt],bt=qt[0],mr=qt[1];mr.length===1?H.push(Et(mr[0])):H.push(mr.map(Et)),H.push(this.outputs[outputIndex$1].serialize())}return H.push(this.otherwise.serialize()),H};var qo=function(D,H,ne){this.type=D,this.branches=H,this.otherwise=ne};qo.parse=function(D,H){if(D.length<4)return H.error("Expected at least 3 arguments, but found only "+(D.length-1)+".");if(D.length%2!==0)return H.error("Expected an odd number of arguments.");var ne;H.expectedType&&H.expectedType.kind!=="value"&&(ne=H.expectedType);for(var de=[],Ae=1;Ae<D.length-1;Ae+=2){var Re=H.parse(D[Ae],Ae,dn);if(!Re)return null;var Ke=H.parse(D[Ae+1],Ae+1,ne);if(!Ke)return null;de.push([Re,Ke]),ne=ne||Ke.type}var ft=H.parse(D[D.length-1],D.length-1,ne);return ft?new qo(ne,de,ft):null},qo.prototype.evaluate=function(D){for(var H=0,ne=this.branches;H<ne.length;H+=1){var de=ne[H],Ae=de[0],Re=de[1];if(Ae.evaluate(D))return Re.evaluate(D)}return this.otherwise.evaluate(D)},qo.prototype.eachChild=function(D){for(var H=0,ne=this.branches;H<ne.length;H+=1){var de=ne[H],Ae=de[0],Re=de[1];D(Ae),D(Re)}D(this.otherwise)},qo.prototype.outputDefined=function(){return this.branches.every(function(D){D[0];var H=D[1];return H.outputDefined()})&&this.otherwise.outputDefined()},qo.prototype.serialize=function(){var D=["case"];return this.eachChild(function(H){D.push(H.serialize())}),D};var ds=function(D,H,ne,de){this.type=D,this.input=H,this.beginIndex=ne,this.endIndex=de};ds.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,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 D<H}function vh(R,D,H){return D>H}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<de.length;ne+=1){var Ae=de[ne];H+=Ae.evaluate(R)}return H}],"*":[Cr,es(Cr),function(R,D){for(var H=1,ne=0,de=D;ne<de.length;ne+=1){var Ae=de[ne];H*=Ae.evaluate(R)}return H}],"-":{type:Cr,overloads:[[[Cr,Cr],function(R,D){var H=D[0],ne=D[1];return H.evaluate(R)-ne.evaluate(R)}],[[Cr],function(R,D){var H=D[0];return-H.evaluate(R)}]]},"/":[Cr,[Cr,Cr],function(R,D){var H=D[0],ne=D[1];return H.evaluate(R)/ne.evaluate(R)}],"%":[Cr,[Cr,Cr],function(R,D){var H=D[0],ne=D[1];return H.evaluate(R)%ne.evaluate(R)}],ln2:[Cr,[],function(){return Math.LN2}],pi:[Cr,[],function(){return Math.PI}],e:[Cr,[],function(){return Math.E}],"^":[Cr,[Cr,Cr],function(R,D){var H=D[0],ne=D[1];return Math.pow(H.evaluate(R),ne.evaluate(R))}],sqrt:[Cr,[Cr],function(R,D){var H=D[0];return Math.sqrt(H.evaluate(R))}],log10:[Cr,[Cr],function(R,D){var H=D[0];return Math.log(H.evaluate(R))/Math.LN10}],ln:[Cr,[Cr],function(R,D){var H=D[0];return Math.log(H.evaluate(R))}],log2:[Cr,[Cr],function(R,D){var H=D[0];return Math.log(H.evaluate(R))/Math.LN2}],sin:[Cr,[Cr],function(R,D){var H=D[0];return Math.sin(H.evaluate(R))}],cos:[Cr,[Cr],function(R,D){var H=D[0];return Math.cos(H.evaluate(R))}],tan:[Cr,[Cr],function(R,D){var H=D[0];return Math.tan(H.evaluate(R))}],asin:[Cr,[Cr],function(R,D){var H=D[0];return Math.asin(H.evaluate(R))}],acos:[Cr,[Cr],function(R,D){var H=D[0];return Math.acos(H.evaluate(R))}],atan:[Cr,[Cr],function(R,D){var H=D[0];return Math.atan(H.evaluate(R))}],min:[Cr,es(Cr),function(R,D){return Math.min.apply(Math,D.map(function(H){return H.evaluate(R)}))}],max:[Cr,es(Cr),function(R,D){return Math.max.apply(Math,D.map(function(H){return H.evaluate(R)}))}],abs:[Cr,[Cr],function(R,D){var H=D[0];return Math.abs(H.evaluate(R))}],round:[Cr,[Cr],function(R,D){var H=D[0],ne=H.evaluate(R);return ne<0?-Math.round(-ne):Math.round(ne)}],floor:[Cr,[Cr],function(R,D){var H=D[0];return Math.floor(H.evaluate(R))}],ceil:[Cr,[Cr],function(R,D){var H=D[0];return Math.ceil(H.evaluate(R))}],"filter-==":[dn,[zr,yn],function(R,D){var H=D[0],ne=D[1];return R.properties()[H.value]===ne.value}],"filter-id-==":[dn,[yn],function(R,D){var H=D[0];return R.id()===H.value}],"filter-type-==":[dn,[zr],function(R,D){var H=D[0];return R.geometryType()===H.value}],"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-<=":[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<ne.length;H+=1){var de=ne[H];if(!de.evaluate(R))return!1}return!0}]]},any:{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<ne.length;H+=1){var de=ne[H];if(de.evaluate(R))return!0}return!1}]]},"!":[dn,[dn],function(R,D){var H=D[0];return!H.evaluate(R)}],"is-supported-script":[dn,[zr],function(R,D){var H=D[0],ne=R.globals&&R.globals.isSupportedScript;return ne?ne(H.evaluate(R)):!0}],upcase:[zr,[zr],function(R,D){var H=D[0];return H.evaluate(R).toUpperCase()}],downcase:[zr,[zr],function(R,D){var H=D[0];return H.evaluate(R).toLowerCase()}],concat:[zr,es(yn),function(R,D){return D.map(function(H){return ou(H.evaluate(R))}).join("")}],"resolved-locale":[zr,[$n],function(R,D){var H=D[0];return H.evaluate(R).resolvedLocale()}]});function Yu(R){return{result:"success",value:R}}function Fs(R){return{result:"error",value:R}}function _s(R){return R["property-type"]==="data-driven"||R["property-type"]==="cross-faded-data-driven"}function Lf(R){return!!R.expression&&R.expression.parameters.indexOf("zoom")>-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<Wt.length;Et+=1){var sr=Wt[Et];ft[sr[0]]=sr[1]}bt=typeof R.stops[0][0]}else if(Re==="identity")Ke=Rf;else throw new Error('Unknown function type "'+Re+'"');if(ne){for(var qt={},mr=[],Br=0;Br<R.stops.length;Br++){var rn=R.stops[Br],$r=rn[0].zoom;qt[$r]===void 0&&(qt[$r]={zoom:$r,type:R.type,property:R.property,default:R.default,stops:[]},mr.push($r)),qt[$r].stops.push([rn[0].value,rn[1]])}for(var Mn=[],xn=0,An=mr;xn<An.length;xn+=1){var kn=An[xn];Mn.push([qt[kn].zoom,Xu(qt[kn],D)])}var Vn={name:"linear"};return{kind:"composite",interpolationType:Vn,interpolationFactor:zi.interpolationFactor.bind(void 0,Vn),zoomStops:Mn.map(function(Jn){return Jn[0]}),evaluate:function(Sa,ca){var ya=Sa.zoom;return Gl({stops:Mn,base:R.base},D,ya).evaluate(ya,ca)}}}else if(Ae){var Qn=Re==="exponential"?{name:"exponential",base:R.base!==void 0?R.base:1}:null;return{kind:"camera",interpolationType:Qn,interpolationFactor:zi.interpolationFactor.bind(void 0,Qn),zoomStops:R.stops.map(function(Jn){return Jn[0]}),evaluate:function(Jn){var Sa=Jn.zoom;return Ke(R,D,Sa,ft,bt)}}}else return{kind:"source",evaluate:function(Sa,ca){var ya=ca&&ca.properties?ca.properties[R.property]:void 0;return ya===void 0?Qs(R.default,D.default):Ke(R,D,ya,ft,bt)}}}function Qs(R,D,H){if(R!==void 0)return R;if(D!==void 0)return D;if(H!==void 0)return H}function yh(R,D,H,ne,de){var Ae=typeof H===de?ne[H]:void 0;return Qs(Ae,R.default,D.default)}function Pf(R,D,H){if(si(H)!=="number")return Qs(R.default,D.default);var ne=R.stops.length;if(ne===1||H<=R.stops[0][0])return R.stops[0][1];if(H>=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;H<ne.length;H+=1){var de=ne[H];if(D=Wl(de),D)break}else(R instanceof Zs||R instanceof zi)&&R.input instanceof to&&R.input.name==="zoom"&&(D=R);return D instanceof wn||R.eachChild(function(Ae){var Re=Wl(Ae);Re instanceof wn?D=Re:!D&&Re?D=new wn("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):D&&Re&&D!==Re&&(D=new wn("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),D}function ju(R){var D={color:_n,string:zr,number:Cr,enum:zr,boolean:dn,formatted:la,resolvedImage:ia};return R.type==="array"?oa(D[R.value]||yn,R.length):D[R.type]}function hc(R){return R.type==="color"&&xl(R.default)?new qa(0,0,0,0):R.type==="color"?qa.parse(R.default)||null:R.default===void 0?null:R.default}function ts(R){var D=R.key,H=R.value,ne=R.valueSpec||{},de=R.objectElementValidators||{},Ae=R.style,Re=R.styleSpec,Ke=[],ft=si(H);if(ft!=="object")return[new wr(D,H,"object expected, "+ft+" found")];for(var bt in H){var Et=bt.split(".")[0],Wt=ne[Et]||ne["*"],sr=void 0;if(de[Et])sr=de[Et];else if(ne[Et])sr=ar;else if(de["*"])sr=de["*"];else if(ne["*"])sr=ar;else{Ke.push(new wr(D,H[bt],'unknown property "'+bt+'"'));continue}Ke=Ke.concat(sr({key:(D&&D+".")+bt,value:H[bt],valueSpec:Wt,style:Ae,styleSpec:Re,object:H,objectKey:bt},H))}for(var qt in ne)de[qt]||ne[qt].required&&ne[qt].default===void 0&&H[qt]===void 0&&Ke.push(new wr(D,H,'missing required property "'+qt+'"'));return Ke}function Df(R){var D=R.value,H=R.valueSpec,ne=R.style,de=R.styleSpec,Ae=R.key,Re=R.arrayElementValidator||ar;if(si(D)!=="array")return[new wr(Ae,D,"array expected, "+si(D)+" found")];if(H.length&&D.length!==H.length)return[new wr(Ae,D,"array length "+H.length+" expected, length "+D.length+" found")];if(H["min-length"]&&D.length<H["min-length"])return[new wr(Ae,D,"array length at least "+H["min-length"]+" expected, length "+D.length+" found")];var Ke={type:H.value,values:H.values};de.$version<7&&(Ke.function=H.function),si(H.value)==="object"&&(Ke=H.value);for(var ft=[],bt=0;bt<D.length;bt++)ft=ft.concat(Re({array:D,arrayIndex:bt,value:D[bt],valueSpec:Ke,style:ne,styleSpec:de,key:Ae+"["+bt+"]"}));return ft}function qs(R){var D=R.key,H=R.value,ne=R.valueSpec,de=si(H);return de==="number"&&H!==H&&(de="NaN"),de!=="number"?[new wr(D,H,"number expected, "+de+" found")]:"minimum"in ne&&H<ne.minimum?[new wr(D,H,H+" is less than the minimum value "+ne.minimum)]:"maximum"in ne&&H>ne.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<Ae?[new wr(Br.key,xn,"stop domain values must appear in ascending order")]:(Ae=Mn,H==="categorical"&&Mn in de?[new wr(Br.key,xn,"stop domain values must be unique")]:(de[Mn]=!0,[]))}function mr(Br){return ar({key:Br.key,value:Br.value,valueSpec:D,style:Br.style,styleSpec:Br.styleSpec})}}function Os(R){var D=(R.expressionContext==="property"?_o:bl)(Ln(R.value),R.valueSpec);if(D.result==="error")return D.value.map(function(ne){return new wr(""+R.key+ne.key,R.value,ne.message)});var H=D.value.expression||D.value._styleExpression.expression;if(R.expressionContext==="property"&&R.propertyKey==="text-font"&&!H.outputDefined())return[new wr(R.key,R.value,'Invalid data expression for "'+R.propertyKey+'". Output values must be contained as literals within the expression.')];if(R.expressionContext==="property"&&R.propertyType==="layout"&&!lu(H))return[new wr(R.key,R.value,'"feature-state" data expressions are not supported with layout properties.')];if(R.expressionContext==="filter"&&!lu(H))return[new wr(R.key,R.value,'"feature-state" data expressions are not supported with filters.')];if(R.expressionContext&&R.expressionContext.indexOf("cluster")===0){if(!_l(H,["zoom","feature-state"]))return[new wr(R.key,R.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(R.expressionContext==="cluster-initial"&&!dl(H))return[new wr(R.key,R.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function mh(R){var D=R.value,H=R.key,ne=si(D);return ne!=="boolean"?[new wr(H,D,"boolean expected, "+ne+" found")]:[]}function If(R){var D=R.key,H=R.value,ne=si(H);return ne!=="string"?[new wr(D,H,"color expected, "+ne+" found")]:cf(H)===null?[new wr(D,H,'color expected, "'+H+'" found')]:[]}function Ku(R){var D=R.key,H=R.value,ne=R.valueSpec,de=[];return Array.isArray(ne.values)?ne.values.indexOf(hn(H))===-1&&de.push(new wr(D,H,"expected one of ["+ne.values.join(", ")+"], "+JSON.stringify(H)+" found")):Object.keys(ne.values).indexOf(hn(H))===-1&&de.push(new wr(D,H,"expected one of ["+Object.keys(ne.values).join(", ")+"], "+JSON.stringify(H)+" found")),de}function vo(R){if(R===!0||R===!1)return!0;if(!Array.isArray(R)||R.length===0)return!1;switch(R[0]){case"has":return R.length>=2&&R[1]!=="$id"&&R[1]!=="$type";case"in":return R.length>=3&&(typeof R[1]!="string"||Array.isArray(R[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return R.length!==3||Array.isArray(R[1])||Array.isArray(R[2]);case"any":case"all":for(var D=0,H=R.slice(1);D<H.length;D+=1){var ne=H[D];if(!vo(ne)&&typeof ne!="boolean")return!1}return!0;default:return!0}}var vc={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function yu(R){if(R==null)return{filter:function(){return!0},needGeometry:!1};vo(R)||(R=el(R));var D=bl(R,vc);if(D.result==="error")throw new Error(D.value.map(function(ne){return ne.key+": "+ne.message}).join(", "));var H=mu(R);return{filter:function(ne,de,Ae){return D.value.evaluate(ne,de,{},Ae)},needGeometry:H}}function gs(R,D){return R<D?-1:R>D?1:0}function mu(R){if(!Array.isArray(R))return!1;if(R[0]==="within")return!0;for(var D=1;D<R.length;D++)if(mu(R[D]))return!0;return!1}function el(R){if(!R)return!0;var D=R[0];if(R.length<=1)return D!=="any";var H=D==="=="?Ju(R[1],R[2],"=="):D==="!="?Al(Ju(R[1],R[2],"==")):D==="<"||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<D.length;Re++)de=si(D[Re]),hn(D[1])==="$type"?Ae=Ae.concat(Ku({key:H+"["+Re+"]",value:D[Re],valueSpec:ne.geometry_type,style:R.style,styleSpec:R.styleSpec})):de!=="string"&&de!=="number"&&de!=="boolean"&&Ae.push(new wr(H+"["+Re+"]",D[Re],"string, number, or boolean expected, "+de+" found"));break;case"any":case"all":case"none":for(var Ke=1;Ke<D.length;Ke++)Ae=Ae.concat(xu({key:H+"["+Ke+"]",value:D[Ke],style:R.style,styleSpec:R.styleSpec}));break;case"has":case"!has":de=si(D[1]),D.length!==2?Ae.push(new wr(H,D,'filter array for "'+D[0]+'" operator must have 2 elements')):de!=="string"&&Ae.push(new wr(H+"[1]",D[1],"string expected, "+de+" found"));break;case"within":de=si(D[1]),D.length!==2?Ae.push(new wr(H,D,'filter array for "'+D[0]+'" operator must have 2 elements')):de!=="object"&&Ae.push(new wr(H+"[1]",D[1],"object expected, "+de+" found"));break}return Ae}function pc(R,D){var H=R.key,ne=R.style,de=R.styleSpec,Ae=R.value,Re=R.objectKey,Ke=de[D+"_"+R.layerType];if(!Ke)return[];var ft=Re.match(/^(.*)-transition$/);if(D==="paint"&&ft&&Ke[ft[1]]&&Ke[ft[1]].transition)return ar({key:H,value:Ae,valueSpec:de.transition,style:ne,styleSpec:de});var bt=R.valueSpec||Ke[Re];if(!bt)return[new wr(H,Ae,'unknown property "'+Re+'"')];var Et;if(si(Ae)==="string"&&_s(bt)&&!bt.tokens&&(Et=/^{([^}]+)}$/.exec(Ae)))return[new wr(H,Ae,'"'+Re+'" does not support interpolation syntax\nUse an identity property function instead: `{ "type": "identity", "property": '+JSON.stringify(Et[1])+" }`.")];var Wt=[];return R.layerType==="symbol"&&(Re==="text-field"&&ne&&!ne.glyphs&&Wt.push(new wr(H,Ae,'use of "text-field" requires a style "glyphs" property')),Re==="text-font"&&xl(Ln(Ae))&&hn(Ae.type)==="identity"&&Wt.push(new wr(H,Ae,'"text-font" does not support identity functions'))),Wt.concat(ar({key:R.key,value:Ae,valueSpec:bt,style:ne,styleSpec:de,expressionContext:"property",propertyType:D,propertyKey:Re}))}function bu(R){return pc(R,"paint")}function gc(R){return pc(R,"layout")}function je(R){var D=[],H=R.value,ne=R.key,de=R.style,Ae=R.styleSpec;!H.type&&!H.ref&&D.push(new wr(ne,H,'either "type" or "ref" is required'));var Re=hn(H.type),Ke=hn(H.ref);if(H.id)for(var ft=hn(H.id),bt=0;bt<R.arrayIndex;bt++){var Et=de.layers[bt];hn(Et.id)===ft&&D.push(new wr(ne,H.id,'duplicate layer id "'+H.id+'", previously used at line '+Et.id.__line__))}if("ref"in H){["type","source","source-layer","filter","layout"].forEach(function(mr){mr in H&&D.push(new wr(ne,H[mr],'"'+mr+'" is prohibited for ref layers'))});var Wt;de.layers.forEach(function(mr){hn(mr.id)===Ke&&(Wt=mr)}),Wt?Wt.ref?D.push(new wr(ne,H.ref,"ref cannot reference another ref layer")):Re=hn(Wt.type):D.push(new wr(ne,H.ref,'ref layer "'+Ke+'" not found'))}else if(Re!=="background")if(!H.source)D.push(new wr(ne,H,'missing required property "source"'));else{var sr=de.sources&&de.sources[H.source],qt=sr&&hn(sr.type);sr?qt==="vector"&&Re==="raster"?D.push(new wr(ne,H.source,'layer "'+H.id+'" requires a raster source')):qt==="raster"&&Re!=="raster"?D.push(new wr(ne,H.source,'layer "'+H.id+'" requires a vector source')):qt==="vector"&&!H["source-layer"]?D.push(new wr(ne,H,'layer "'+H.id+'" must specify a "source-layer"')):qt==="raster-dem"&&Re!=="hillshade"?D.push(new wr(ne,H.source,"raster-dem source can only be used with layer type 'hillshade'.")):Re==="line"&&H.paint&&H.paint["line-gradient"]&&(qt!=="geojson"||!sr.lineMetrics)&&D.push(new wr(ne,H,'layer "'+H.id+'" specifies a line-gradient, which requires a GeoJSON source with `lineMetrics` enabled.')):D.push(new wr(ne,H.source,'source "'+H.source+'" not found'))}return D=D.concat(ts({key:ne,value:H,valueSpec:Ae.layer,style:R.style,styleSpec:R.styleSpec,objectElementValidators:{"*":function(){return[]},type:function(){return ar({key:ne+".type",value:H.type,valueSpec:Ae.layer.type,style:R.style,styleSpec:R.styleSpec,object:H,objectKey:"type"})},filter:Qu,layout:function(Br){return ts({layer:H,key:Br.key,value:Br.value,style:Br.style,styleSpec:Br.styleSpec,objectElementValidators:{"*":function($r){return gc(cn({layerType:Re},$r))}}})},paint:function(Br){return ts({layer:H,key:Br.key,value:Br.value,style:Br.style,styleSpec:Br.styleSpec,objectElementValidators:{"*":function($r){return bu(cn({layerType:Re},$r))}}})}}})),D}function rt(R){var D=R.value,H=R.key,ne=si(D);return ne!=="string"?[new wr(H,D,"string expected, "+ne+" found")]:[]}var vt={promoteId:kt};function gt(R){var D=R.value,H=R.key,ne=R.styleSpec,de=R.style;if(!D.type)return[new wr(H,D,'"type" is required')];var Ae=hn(D.type),Re;switch(Ae){case"vector":case"raster":case"raster-dem":return Re=ts({key:H,value:D,valueSpec:ne["source_"+Ae.replace("-","_")],style:R.style,styleSpec:ne,objectElementValidators:vt}),Re;case"geojson":if(Re=ts({key:H,value:D,valueSpec:ne.source_geojson,style:de,styleSpec:ne,objectElementValidators:vt}),D.cluster)for(var Ke in D.clusterProperties){var ft=D.clusterProperties[Ke],bt=ft[0],Et=ft[1],Wt=typeof bt=="string"?[bt,["accumulated"],["get",Ke]]:bt;Re.push.apply(Re,Os({key:H+"."+Ke+".map",value:Et,expressionContext:"cluster-map"})),Re.push.apply(Re,Os({key:H+"."+Ke+".reduce",value:Wt,expressionContext:"cluster-reduce"}))}return Re;case"video":return ts({key:H,value:D,valueSpec:ne.source_video,style:de,styleSpec:ne});case"image":return ts({key:H,value:D,valueSpec:ne.source_image,style:de,styleSpec:ne});case"canvas":return[new wr(H,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Ku({key:H+".type",value:D.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:de,styleSpec:ne})}}function kt(R){var D=R.key,H=R.value;if(si(H)==="string")return rt({key:D,value:H});var ne=[];for(var de in H)ne.push.apply(ne,rt({key:D+"."+de,value:H[de]}));return ne}function Pt(R){var D=R.value,H=R.styleSpec,ne=H.light,de=R.style,Ae=[],Re=si(D);if(D===void 0)return Ae;if(Re!=="object")return Ae=Ae.concat([new wr("light",D,"object expected, "+Re+" found")]),Ae;for(var Ke in D){var ft=Ke.match(/^(.*)-transition$/);ft&&ne[ft[1]]&&ne[ft[1]].transition?Ae=Ae.concat(ar({key:Ke,value:D[Ke],valueSpec:H.transition,style:de,styleSpec:H})):ne[Ke]?Ae=Ae.concat(ar({key:Ke,value:D[Ke],valueSpec:ne[Ke],style:de,styleSpec:H})):Ae=Ae.concat([new wr(Ke,D[Ke],'unknown property "'+Ke+'"')])}return Ae}function Ot(R){return rt(R).length===0?[]:Os(R)}function cr(R){return rt(R).length===0?[]:Os(R)}var gr={"*":function(){return[]},array:Df,boolean:mh,number:qs,color:If,constants:an,enum:Ku,filter:Qu,function:gu,layer:je,object:ts,source:gt,light:Pt,string:rt,formatted:Ot,resolvedImage:cr};function ar(R){var D=R.value,H=R.valueSpec,ne=R.styleSpec;if(H.expression&&xl(hn(D)))return gu(R);if(H.expression&&$s(Ln(D)))return Os(R);if(H.type&&gr[H.type])return gr[H.type](R);var de=ts(cn({},R,{valueSpec:H.type?ne[H.type]:H}));return de}function Tr(R){var D=R.value,H=R.key,ne=rt(R);return ne.length||(D.indexOf("{fontstack}")===-1&&ne.push(new wr(H,D,'"glyphs" url must include a "{fontstack}" token')),D.indexOf("{range}")===-1&&ne.push(new wr(H,D,'"glyphs" url must include a "{range}" token'))),ne}function Pr(R,D){D===void 0&&(D=Xt);var H=[];return H=H.concat(ar({key:"",value:R,valueSpec:D.$root,styleSpec:D,style:R,objectElementValidators:{glyphs:Tr,"*":function(){return[]}}})),R.constants&&(H=H.concat(an({key:"constants",value:R.constants,style:R,styleSpec:D}))),Yr(H)}Pr.source=Jr(gt),Pr.light=Jr(Pt),Pr.layer=Jr(je),Pr.filter=Jr(Qu),Pr.paintProperty=Jr(bu),Pr.layoutProperty=Jr(gc);function Yr(R){return[].concat(R).sort(function(D,H){return D.line-H.line})}function Jr(R){return function(){for(var D=[],H=arguments.length;H--;)D[H]=arguments[H];return Yr(R.apply(this,D))}}var mn=Pr,bn=mn.light,Rn=mn.paintProperty,ha=mn.layoutProperty;function Ca(R,D){var H=!1;if(D&&D.length)for(var ne=0,de=D;ne<de.length;ne+=1){var Ae=de[ne];R.fire(new nr(new Error(Ae.message))),H=!0}return H}var Ra=ka,Da=3;function ka(R,D,H){var ne=this.cells=[];if(R instanceof ArrayBuffer){this.arrayBuffer=R;var de=new Int32Array(this.arrayBuffer);R=de[0],D=de[1],H=de[2],this.d=D+2*H;for(var Ae=0;Ae<this.d*this.d;Ae++){var Re=de[Da+Ae],Ke=de[Da+Ae+1];ne.push(Re===Ke?null:de.subarray(Re,Ke))}var ft=de[Da+ne.length],bt=de[Da+ne.length+1];this.keys=de.subarray(ft,bt),this.bboxes=de.subarray(bt),this.insert=this._insertReadonly}else{this.d=D+2*H;for(var Et=0;Et<this.d*this.d;Et++)ne.push([]);this.keys=[],this.bboxes=[]}this.n=D,this.extent=R,this.padding=H,this.scale=D/R,this.uid=0;var Wt=H/D*R;this.min=-Wt,this.max=R+Wt}ka.prototype.insert=function(R,D,H,ne,de){this._forEachCell(D,H,ne,de,this._insertCell,this.uid++),this.keys.push(R),this.bboxes.push(D),this.bboxes.push(H),this.bboxes.push(ne),this.bboxes.push(de)},ka.prototype._insertReadonly=function(){throw"Cannot insert into a GridIndex created from an ArrayBuffer."},ka.prototype._insertCell=function(R,D,H,ne,de,Ae){this.cells[de].push(Ae)},ka.prototype.query=function(R,D,H,ne,de){var Ae=this.min,Re=this.max;if(R<=Ae&&D<=Ae&&Re<=H&&Re<=ne&&!de)return Array.prototype.slice.call(this.keys);var Ke=[],ft={};return this._forEachCell(R,D,H,ne,this._queryCell,Ke,ft,de),Ke},ka.prototype._queryCell=function(R,D,H,ne,de,Ae,Re,Ke){var ft=this.cells[de];if(ft!==null)for(var bt=this.keys,Et=this.bboxes,Wt=0;Wt<ft.length;Wt++){var sr=ft[Wt];if(Re[sr]===void 0){var qt=sr*4;(Ke?Ke(Et[qt+0],Et[qt+1],Et[qt+2],Et[qt+3]):R<=Et[qt+2]&&D<=Et[qt+3]&&H>=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<this.cells.length;ne++)H+=this.cells[ne].length;var de=new Int32Array(D+H+this.keys.length+this.bboxes.length);de[0]=this.extent,de[1]=this.n,de[2]=this.padding;for(var Ae=D,Re=0;Re<R.length;Re++){var Ke=R[Re];de[Da+Re]=Ae,de.set(Ke,Ae),Ae+=Ke.length}return de[Da+R.length]=Ae,de.set(this.keys,Ae),Ae+=this.keys.length,de[Da+R.length+1]=Ae,de.set(this.bboxes,Ae),Ae+=this.bboxes.length,de.buffer};var ai=self.ImageData,Di=self.ImageBitmap,di={};function fe(R,D,H){H===void 0&&(H={}),Object.defineProperty(D,"_classRegistryKey",{value:R,writeable:!1}),di[R]={klass:D,omit:H.omit||[],shallow:H.shallow||[]}}fe("Object",Object),Ra.serialize=function(D,H){var ne=D.toArrayBuffer();return H&&H.push(ne),{buffer:ne}},Ra.deserialize=function(D){return new Ra(D.buffer)},fe("Grid",Ra),fe("Color",qa),fe("Error",Error),fe("ResolvedImage",Eo),fe("StylePropertyFunction",Tl),fe("StyleExpression",zs,{omit:["_evaluator"]}),fe("ZoomDependentExpression",Po),fe("ZoomConstantExpression",wl),fe("CompoundExpression",to,{omit:["_evaluate"]});for(var Ce in ps)ps[Ce]._classRegistryKey||fe("Expression_"+Ce,ps[Ce]);function Ve(R){return R&&typeof ArrayBuffer<"u"&&(R instanceof ArrayBuffer||R.constructor&&R.constructor.name==="ArrayBuffer")}function Qe(R){return Di&&R instanceof Di}function tt(R,D){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)return R;if(Ve(R)||Qe(R))return D&&D.push(R),R;if(ArrayBuffer.isView(R)){var H=R;return D&&D.push(H.buffer),H}if(R instanceof ai)return D&&D.push(R.data.buffer),R;if(Array.isArray(R)){for(var ne=[],de=0,Ae=R;de<Ae.length;de+=1){var Re=Ae[de];ne.push(tt(Re,D))}return ne}if(typeof R=="object"){var Ke=R.constructor,ft=Ke._classRegistryKey;if(!ft)throw new Error("can't serialize object of unregistered class");var bt=Ke.serialize?Ke.serialize(R,D):{};if(!Ke.serialize){for(var Et in R)if(R.hasOwnProperty(Et)&&!(di[ft].omit.indexOf(Et)>=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<Re.length;Ae+=1){var Ke=Re[Ae];if(Ke!=="$name"){var ft=R[Ke];de[Ke]=di[D].shallow.indexOf(Ke)>=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<ne&&(this.lastIntegerZoom=ne,this.lastIntegerZoomTime=H),D!==this.lastZoom?(this.lastZoom=D,this.lastFloorZoom=ne,!0):!1)};var ht={"Latin-1 Supplement":function(R){return R>=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<H.length;D+=1){var ne=H[D];if(Sr(ne.charCodeAt(0)))return!0}return!1}function er(R){for(var D=0,H=R;D<H.length;D+=1){var ne=H[D];if(!tr(ne.charCodeAt(0)))return!1}return!0}function tr(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 Lr(R){return R<11904?!1:!!(ht["Bopomofo Extended"](R)||ht.Bopomofo(R)||ht["CJK Compatibility Forms"](R)||ht["CJK Compatibility Ideographs"](R)||ht["CJK Compatibility"](R)||ht["CJK Radicals Supplement"](R)||ht["CJK Strokes"](R)||ht["CJK Symbols and Punctuation"](R)||ht["CJK Unified Ideographs Extension A"](R)||ht["CJK Unified Ideographs"](R)||ht["Enclosed CJK Letters and Months"](R)||ht["Halfwidth and Fullwidth Forms"](R)||ht.Hiragana(R)||ht["Ideographic Description Characters"](R)||ht["Kangxi Radicals"](R)||ht["Katakana Phonetic Extensions"](R)||ht.Katakana(R)||ht["Vertical Forms"](R)||ht["Yi Radicals"](R)||ht["Yi Syllables"](R))}function Sr(R){return R===746||R===747?!0:R<4352?!1:!!(ht["Bopomofo Extended"](R)||ht.Bopomofo(R)||ht["CJK Compatibility Forms"](R)&&!(R>=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<H.length;D+=1){var ne=H[D];if(Ur(ne.charCodeAt(0)))return!0}return!1}function ln(R,D){for(var H=0,ne=R;H<ne.length;H+=1){var de=ne[H];if(!Zr(de.charCodeAt(0),D))return!1}return!0}var Xr={unavailable:"unavailable",deferred:"deferred",loading:"loading",loaded:"loaded",error:"error"},Nn=null,Gn=Xr.unavailable,Kn=null,na=function(R){R&&typeof R=="string"&&R.indexOf("NetworkError")>-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);H<ne.length;H+=1){var de=ne[H],Ae=this.getValue(de);Ae!==void 0&&(D[de]=Ae);var Re=this.getTransition(de);Re!==void 0&&(D[de+"-transition"]=Re)}return D},Ya.prototype.transitioned=function(D,H){for(var ne=new _i(this._properties),de=0,Ae=Object.keys(this._values);de<Ae.length;de+=1){var Re=Ae[de];ne._values[Re]=this._values[Re].transitioned(D,H._values[Re])}return ne},Ya.prototype.untransitioned=function(){for(var D=new _i(this._properties),H=0,ne=Object.keys(this._values);H<ne.length;H+=1){var de=ne[H];D._values[de]=this._values[de].untransitioned()}return D};var Mi=function(D,H,ne,de,Ae){this.property=D,this.value=H,this.begin=Ae+de.delay||0,this.end=this.begin+de.duration||0,D.specification.transition&&(de.delay||de.duration)&&(this.prior=ne)};Mi.prototype.possiblyEvaluate=function(D,H,ne){var de=D.now||0,Ae=this.value.possiblyEvaluate(D,H,ne),Re=this.prior;if(Re){if(de>this.end)return this.prior=null,Ae;if(this.value.isDataDriven())return this.prior=null,Ae;if(de<this.begin)return Re.possiblyEvaluate(D,H,ne);var Ke=(de-this.begin)/(this.end-this.begin);return this.property.interpolate(Re.possiblyEvaluate(D,H,ne),Ae,n(Ke))}else return Ae};var _i=function(D){this._properties=D,this._values=Object.create(D.defaultTransitioningPropertyValues)};_i.prototype.possiblyEvaluate=function(D,H,ne){for(var de=new fi(this._properties),Ae=0,Re=Object.keys(this._values);Ae<Re.length;Ae+=1){var Ke=Re[Ae];de._values[Ke]=this._values[Ke].possiblyEvaluate(D,H,ne)}return de},_i.prototype.hasTransition=function(){for(var D=0,H=Object.keys(this._values);D<H.length;D+=1){var ne=H[D];if(this._values[ne].prior)return!0}return!1};var Bi=function(D){this._properties=D,this._values=Object.create(D.defaultPropertyValues)};Bi.prototype.getValue=function(D){return y(this._values[D].value)},Bi.prototype.setValue=function(D,H){this._values[D]=new Na(this._values[D].property,H===null?void 0:y(H))},Bi.prototype.serialize=function(){for(var D={},H=0,ne=Object.keys(this._values);H<ne.length;H+=1){var de=ne[H],Ae=this.getValue(de);Ae!==void 0&&(D[de]=Ae)}return D},Bi.prototype.possiblyEvaluate=function(D,H,ne){for(var de=new fi(this._properties),Ae=0,Re=Object.keys(this._values);Ae<Re.length;Ae+=1){var Ke=Re[Ae];de._values[Ke]=this._values[Ke].possiblyEvaluate(D,H,ne)}return de};var xi=function(D,H,ne){this.property=D,this.value=H,this.parameters=ne};xi.prototype.isConstant=function(){return this.value.kind==="constant"},xi.prototype.constantOr=function(D){return this.value.kind==="constant"?this.value.value:D},xi.prototype.evaluate=function(D,H,ne,de){return this.property.evaluate(this.value,this.parameters,D,H,ne,de)};var fi=function(D){this._properties=D,this._values=Object.create(D.defaultPossiblyEvaluatedValues)};fi.prototype.get=function(D){return this._values[D]};var ga=function(D){this.specification=D};ga.prototype.possiblyEvaluate=function(D,H){return D.expression.evaluate(H)},ga.prototype.interpolate=function(D,H,ne){var de=Ol[this.specification.type];return de?de(D,H,ne):D};var Ma=function(D,H){this.specification=D,this.overrides=H};Ma.prototype.possiblyEvaluate=function(D,H,ne,de){return D.expression.kind==="constant"||D.expression.kind==="camera"?new xi(this,{kind:"constant",value:D.expression.evaluate(H,null,{},ne,de)},H):new xi(this,D.expression,H)},Ma.prototype.interpolate=function(D,H,ne){if(D.value.kind!=="constant"||H.value.kind!=="constant")return D;if(D.value.value===void 0||H.value.value===void 0)return new xi(this,{kind:"constant",value:void 0},D.parameters);var de=Ol[this.specification.type];return de?new xi(this,{kind:"constant",value:de(D.value.value,H.value.value,ne)},D.parameters):D},Ma.prototype.evaluate=function(D,H,ne,de,Ae,Re){return D.kind==="constant"?D.value:D.evaluate(H,ne,de,Ae,Re)};var bi=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,Ae,Re){if(ne.value===void 0)return new xi(this,{kind:"constant",value:void 0},de);if(ne.expression.kind==="constant"){var Ke=ne.expression.evaluate(de,null,{},Ae,Re),ft=ne.property.specification.type==="resolvedImage",bt=ft&&typeof Ke!="string"?Ke.name:Ke,Et=this._calculate(bt,bt,bt,de);return new xi(this,{kind:"constant",value:Et},de)}else if(ne.expression.kind==="camera"){var Wt=this._calculate(ne.expression.evaluate({zoom:de.zoom-1}),ne.expression.evaluate({zoom:de.zoom}),ne.expression.evaluate({zoom:de.zoom+1}),de);return new xi(this,{kind:"constant",value:Wt},de)}else return new xi(this,ne.expression,de)},D.prototype.evaluate=function(ne,de,Ae,Re,Ke,ft){if(ne.kind==="source"){var bt=ne.evaluate(de,Ae,Re,Ke,ft);return this._calculate(bt,bt,bt,de)}else return ne.kind==="composite"?this._calculate(ne.evaluate({zoom:Math.floor(de.zoom)-1},Ae,Re),ne.evaluate({zoom:Math.floor(de.zoom)},Ae,Re),ne.evaluate({zoom:Math.floor(de.zoom)+1},Ae,Re),de):ne.value},D.prototype._calculate=function(ne,de,Ae,Re){var Ke=Re.zoom;return Ke>Re.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.minzoom||this.maxzoom&&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<H.length;D+=1){var ne=H[D];for(var de in ne.vaos)ne.vaos[de].destroy()}},X.simpleSegment=function(D,H,ne,de){return new X([{vertexOffset:D,primitiveOffset:H,vertexLength:ne,primitiveLength:de,vaos:{},sortKey:0}])},X.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,fe("SegmentVector",X);function pe(R,D){return R=u(Math.floor(R),0,255),D=u(Math.floor(D),0,255),256*R+D}var re=wi([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint8"},{name:"a_pixel_ratio_to",components:1,type:"Uint8"}]),ge=L(function(R){function D(H,ne){var de,Ae,Re,Ke,ft,bt,Et,Wt;for(de=H.length&3,Ae=H.length-de,Re=ne,ft=3432918353,bt=461845907,Wt=0;Wt<Ae;)Et=H.charCodeAt(Wt)&255|(H.charCodeAt(++Wt)&255)<<8|(H.charCodeAt(++Wt)&255)<<16|(H.charCodeAt(++Wt)&255)<<24,++Wt,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,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<de;){var Ae=ne+de>>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<ne;){for(var de=R[H+ne>>1],Ae=H-1,Re=ne+1;;){do Ae++;while(R[Ae]<de);do Re--;while(R[Re]>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-H<ne-Re?(yr(R,D,H,Re),H=Re+1):(yr(R,D,Re+1,ne),ne=Re)}}function Fr(R,D,H){var ne=R[D];R[D]=R[H],R[H]=ne}fe("FeaturePositionMap",Nt);var Gr=function(D,H){this.gl=D.gl,this.location=H},Wr=function(R){function D(H,ne){R.call(this,H,ne),this.current=0}return R&&(D.__proto__=R),D.prototype=Object.create(R&&R.prototype),D.prototype.constructor=D,D.prototype.set=function(ne){this.current!==ne&&(this.current=ne,this.gl.uniform1i(this.location,ne))},D}(Gr),Vr=function(R){function D(H,ne){R.call(this,H,ne),this.current=0}return R&&(D.__proto__=R),D.prototype=Object.create(R&&R.prototype),D.prototype.constructor=D,D.prototype.set=function(ne){this.current!==ne&&(this.current=ne,this.gl.uniform1f(this.location,ne))},D}(Gr),Qr=function(R){function D(H,ne){R.call(this,H,ne),this.current=[0,0]}return R&&(D.__proto__=R),D.prototype=Object.create(R&&R.prototype),D.prototype.constructor=D,D.prototype.set=function(ne){(ne[0]!==this.current[0]||ne[1]!==this.current[1])&&(this.current=ne,this.gl.uniform2f(this.location,ne[0],ne[1]))},D}(Gr),sn=function(R){function D(H,ne){R.call(this,H,ne),this.current=[0,0,0]}return R&&(D.__proto__=R),D.prototype=Object.create(R&&R.prototype),D.prototype.constructor=D,D.prototype.set=function(ne){(ne[0]!==this.current[0]||ne[1]!==this.current[1]||ne[2]!==this.current[2])&&(this.current=ne,this.gl.uniform3f(this.location,ne[0],ne[1],ne[2]))},D}(Gr),Sn=function(R){function D(H,ne){R.call(this,H,ne),this.current=[0,0,0,0]}return R&&(D.__proto__=R),D.prototype=Object.create(R&&R.prototype),D.prototype.constructor=D,D.prototype.set=function(ne){(ne[0]!==this.current[0]||ne[1]!==this.current[1]||ne[2]!==this.current[2]||ne[3]!==this.current[3])&&(this.current=ne,this.gl.uniform4f(this.location,ne[0],ne[1],ne[2],ne[3]))},D}(Gr),zn=function(R){function D(H,ne){R.call(this,H,ne),this.current=qa.transparent}return R&&(D.__proto__=R),D.prototype=Object.create(R&&R.prototype),D.prototype.constructor=D,D.prototype.set=function(ne){(ne.r!==this.current.r||ne.g!==this.current.g||ne.b!==this.current.b||ne.a!==this.current.a)&&(this.current=ne,this.gl.uniform4f(this.location,ne.r,ne.g,ne.b,ne.a))},D}(Gr),Yn=new Float32Array(16),Xn=function(R){function D(H,ne){R.call(this,H,ne),this.current=Yn}return R&&(D.__proto__=R),D.prototype=Object.create(R&&R.prototype),D.prototype.constructor=D,D.prototype.set=function(ne){if(ne[12]!==this.current[12]||ne[0]!==this.current[0]){this.current=ne,this.gl.uniformMatrix4fv(this.location,!1,ne);return}for(var de=1;de<16;de++)if(ne[de]!==this.current[de]){this.current=ne,this.gl.uniformMatrix4fv(this.location,!1,ne);break}},D}(Gr);function Zn(R){return[pe(255*R.r,255*R.g),pe(255*R.b,255*R.a)]}var ra=function(D,H,ne){this.value=D,this.uniformNames=H.map(function(de){return"u_"+de}),this.type=ne};ra.prototype.setUniform=function(D,H,ne){D.set(ne.constantOr(this.value))},ra.prototype.getBinding=function(D,H,ne){return this.type==="color"?new zn(D,H):new Vr(D,H)};var fa=function(D,H){this.uniformNames=H.map(function(ne){return"u_"+ne}),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1};fa.prototype.setConstantPatternPositions=function(D,H){this.pixelRatioFrom=H.pixelRatio,this.pixelRatioTo=D.pixelRatio,this.patternFrom=H.tlbr,this.patternTo=D.tlbr},fa.prototype.setUniform=function(D,H,ne,de){var Ae=de==="u_pattern_to"?this.patternTo:de==="u_pattern_from"?this.patternFrom:de==="u_pixel_ratio_to"?this.pixelRatioTo:de==="u_pixel_ratio_from"?this.pixelRatioFrom:null;Ae&&D.set(Ae)},fa.prototype.getBinding=function(D,H,ne){return ne.substr(0,9)==="u_pattern"?new Sn(D,H):new Vr(D,H)};var ua=function(D,H,ne,de){this.expression=D,this.type=ne,this.maxValue=0,this.paintVertexAttributes=H.map(function(Ae){return{name:"a_"+Ae,type:"Float32",components:ne==="color"?2:1,offset:0}}),this.paintVertexArray=new de};ua.prototype.populatePaintArray=function(D,H,ne,de,Ae){var Re=this.paintVertexArray.length,Ke=this.expression.evaluate(new Bn(0),H,{},de,[],Ae);this.paintVertexArray.resize(D),this._setPaintValue(Re,D,Ke)},ua.prototype.updatePaintArray=function(D,H,ne,de){var Ae=this.expression.evaluate({zoom:0},ne,de);this._setPaintValue(D,H,Ae)},ua.prototype._setPaintValue=function(D,H,ne){if(this.type==="color")for(var de=Zn(ne),Ae=D;Ae<H;Ae++)this.paintVertexArray.emplace(Ae,de[0],de[1]);else{for(var Re=D;Re<H;Re++)this.paintVertexArray.emplace(Re,ne);this.maxValue=Math.max(this.maxValue,Math.abs(ne))}},ua.prototype.upload=function(D){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=D.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},ua.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()};var pa=function(D,H,ne,de,Ae,Re){this.expression=D,this.uniformNames=H.map(function(Ke){return"u_"+Ke+"_t"}),this.type=ne,this.useIntegerZoom=de,this.zoom=Ae,this.maxValue=0,this.paintVertexAttributes=H.map(function(Ke){return{name:"a_"+Ke,type:"Float32",components:ne==="color"?4:2,offset:0}}),this.paintVertexArray=new Re};pa.prototype.populatePaintArray=function(D,H,ne,de,Ae){var Re=this.expression.evaluate(new Bn(this.zoom),H,{},de,[],Ae),Ke=this.expression.evaluate(new Bn(this.zoom+1),H,{},de,[],Ae),ft=this.paintVertexArray.length;this.paintVertexArray.resize(D),this._setPaintValue(ft,D,Re,Ke)},pa.prototype.updatePaintArray=function(D,H,ne,de){var Ae=this.expression.evaluate({zoom:this.zoom},ne,de),Re=this.expression.evaluate({zoom:this.zoom+1},ne,de);this._setPaintValue(D,H,Ae,Re)},pa.prototype._setPaintValue=function(D,H,ne,de){if(this.type==="color")for(var Ae=Zn(ne),Re=Zn(de),Ke=D;Ke<H;Ke++)this.paintVertexArray.emplace(Ke,Ae[0],Ae[1],Re[0],Re[1]);else{for(var ft=D;ft<H;ft++)this.paintVertexArray.emplace(ft,ne,de);this.maxValue=Math.max(this.maxValue,Math.abs(ne),Math.abs(de))}},pa.prototype.upload=function(D){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=D.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},pa.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},pa.prototype.setUniform=function(D,H){var ne=this.useIntegerZoom?Math.floor(H.zoom):H.zoom,de=u(this.expression.interpolationFactor(ne,this.zoom,this.zoom+1),0,1);D.set(de)},pa.prototype.getBinding=function(D,H,ne){return new Vr(D,H)};var wa=function(D,H,ne,de,Ae,Re){this.expression=D,this.type=H,this.useIntegerZoom=ne,this.zoom=de,this.layerId=Re,this.zoomInPaintVertexArray=new Ae,this.zoomOutPaintVertexArray=new Ae};wa.prototype.populatePaintArray=function(D,H,ne){var de=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(D),this.zoomOutPaintVertexArray.resize(D),this._setPaintValues(de,D,H.patterns&&H.patterns[this.layerId],ne)},wa.prototype.updatePaintArray=function(D,H,ne,de,Ae){this._setPaintValues(D,H,ne.patterns&&ne.patterns[this.layerId],Ae)},wa.prototype._setPaintValues=function(D,H,ne,de){if(!(!de||!ne)){var Ae=ne.min,Re=ne.mid,Ke=ne.max,ft=de[Ae],bt=de[Re],Et=de[Ke];if(!(!ft||!bt||!Et))for(var Wt=D;Wt<H;Wt++)this.zoomInPaintVertexArray.emplace(Wt,bt.tl[0],bt.tl[1],bt.br[0],bt.br[1],ft.tl[0],ft.tl[1],ft.br[0],ft.br[1],bt.pixelRatio,ft.pixelRatio),this.zoomOutPaintVertexArray.emplace(Wt,bt.tl[0],bt.tl[1],bt.br[0],bt.br[1],Et.tl[0],Et.tl[1],Et.br[0],Et.br[1],bt.pixelRatio,Et.pixelRatio)}},wa.prototype.upload=function(D){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=D.createVertexBuffer(this.zoomInPaintVertexArray,re.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=D.createVertexBuffer(this.zoomOutPaintVertexArray,re.members,this.expression.isStateDependent))},wa.prototype.destroy=function(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()};var Ia=function(D,H,ne,de){this.binders={},this.layoutAttributes=de,this._buffers=[];var Ae=[];for(var Re in D.paint._values)if(ne(Re)){var Ke=D.paint.get(Re);if(!(!(Ke instanceof xi)||!_s(Ke.property.specification))){var ft=ii(Re,D.type),bt=Ke.value,Et=Ke.property.specification.type,Wt=Ke.property.useIntegerZoom,sr=Ke.property.specification["property-type"],qt=sr==="cross-faded"||sr==="cross-faded-data-driven";if(bt.kind==="constant")this.binders[Re]=qt?new fa(bt.value,ft):new ra(bt.value,ft,Et),Ae.push("/u_"+Re);else if(bt.kind==="source"||qt){var mr=ja(Re,Et,"source");this.binders[Re]=qt?new wa(bt,Et,Wt,H,mr,D.id):new ua(bt,ft,Et,mr),Ae.push("/a_"+Re)}else{var Br=ja(Re,Et,"composite");this.binders[Re]=new pa(bt,ft,Et,Wt,H,Br),Ae.push("/z_"+Re)}}}this.cacheKey=Ae.sort().join("")};Ia.prototype.getMaxValue=function(D){var H=this.binders[D];return H instanceof ua||H instanceof pa?H.maxValue:0},Ia.prototype.populatePaintArrays=function(D,H,ne,de,Ae){for(var Re in this.binders){var Ke=this.binders[Re];(Ke instanceof ua||Ke instanceof pa||Ke instanceof wa)&&Ke.populatePaintArray(D,H,ne,de,Ae)}},Ia.prototype.setConstantPatternPositions=function(D,H){for(var ne in this.binders){var de=this.binders[ne];de instanceof fa&&de.setConstantPatternPositions(D,H)}},Ia.prototype.updatePaintArrays=function(D,H,ne,de,Ae){var Re=!1;for(var Ke in D)for(var ft=H.getPositions(Ke),bt=0,Et=ft;bt<Et.length;bt+=1){var Wt=Et[bt],sr=ne.feature(Wt.index);for(var qt in this.binders){var mr=this.binders[qt];if((mr instanceof ua||mr instanceof pa||mr instanceof wa)&&mr.expression.isStateDependent===!0){var Br=de.paint.get(qt);mr.expression=Br.value,mr.updatePaintArray(Wt.start,Wt.end,sr,D[Ke],Ae),Re=!0}}}return Re},Ia.prototype.defines=function(){var D=[];for(var H in this.binders){var ne=this.binders[H];(ne instanceof ra||ne instanceof fa)&&D.push.apply(D,ne.uniformNames.map(function(de){return"#define HAS_UNIFORM_"+de}))}return D},Ia.prototype.getPaintVertexBuffers=function(){return this._buffers},Ia.prototype.getUniforms=function(D,H){var ne=[];for(var de in this.binders){var Ae=this.binders[de];if(Ae instanceof ra||Ae instanceof fa||Ae instanceof pa)for(var Re=0,Ke=Ae.uniformNames;Re<Ke.length;Re+=1){var ft=Ke[Re];if(H[ft]){var bt=Ae.getBinding(D,H[ft],ft);ne.push({name:ft,property:de,binding:bt})}}}return ne},Ia.prototype.setUniforms=function(D,H,ne,de){for(var Ae=0,Re=H;Ae<Re.length;Ae+=1){var Ke=Re[Ae],ft=Ke.name,bt=Ke.property,Et=Ke.binding;this.binders[bt].setUniform(Et,de,ne.get(bt),ft)}},Ia.prototype.updatePaintBuffers=function(D){this._buffers=[];for(var H in this.binders){var ne=this.binders[H];if(D&&ne instanceof wa){var de=D.fromScale===2?ne.zoomInPaintVertexBuffer:ne.zoomOutPaintVertexBuffer;de&&this._buffers.push(de)}else(ne instanceof ua||ne instanceof pa)&&ne.paintVertexBuffer&&this._buffers.push(ne.paintVertexBuffer)}},Ia.prototype.upload=function(D){for(var H in this.binders){var ne=this.binders[H];(ne instanceof ua||ne instanceof pa||ne instanceof wa)&&ne.upload(D)}this.updatePaintBuffers()},Ia.prototype.destroy=function(){for(var D in this.binders){var H=this.binders[D];(H instanceof ua||H instanceof pa||H instanceof wa)&&H.destroy()}};var Va=function(D,H,ne,de){de===void 0&&(de=function(){return!0}),this.programConfigurations={};for(var Ae=0,Re=H;Ae<Re.length;Ae+=1){var Ke=Re[Ae];this.programConfigurations[Ke.id]=new Ia(Ke,ne,de,D)}this.needsUpload=!1,this._featureMap=new Nt,this._bufferOffset=0};Va.prototype.populatePaintArrays=function(D,H,ne,de,Ae,Re){for(var Ke in this.programConfigurations)this.programConfigurations[Ke].populatePaintArrays(D,H,de,Ae,Re);H.id!==void 0&&this._featureMap.add(H.id,ne,this._bufferOffset,D),this._bufferOffset=D,this.needsUpload=!0},Va.prototype.updatePaintArrays=function(D,H,ne,de){for(var Ae=0,Re=ne;Ae<Re.length;Ae+=1){var Ke=Re[Ae];this.needsUpload=this.programConfigurations[Ke.id].updatePaintArrays(D,this._featureMap,H,Ke,de)||this.needsUpload}},Va.prototype.get=function(D){return this.programConfigurations[D]},Va.prototype.upload=function(D){if(this.needsUpload){for(var H in this.programConfigurations)this.programConfigurations[H].upload(D);this.needsUpload=!1}},Va.prototype.destroy=function(){for(var D in this.programConfigurations)this.programConfigurations[D].destroy()};function ii(R,D){var H={"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]};return H[R]||[R.replace(D+"-","").replace(/-/g,"_")]}function Ga(R){var D={"line-pattern":{source:rs,composite:rs},"fill-pattern":{source:rs,composite:rs},"fill-extrusion-pattern":{source:rs,composite:rs}};return D[R]}function ja(R,D,H){var ne={color:{source:tf,composite:ad},number:{source:xc,composite:tf}},de=Ga(R);return de&&de[H]||ne[D][H]}fe("ConstantBinder",ra),fe("CrossFadedConstantBinder",fa),fe("SourceExpressionBinder",ua),fe("CrossFadedCompositeBinder",wa),fe("CompositeExpressionBinder",pa),fe("ProgramConfiguration",Ia,{omit:["_buffers"]}),fe("ProgramConfigurationSet",Va);var La=8192;function oi(R){return{min:-1*Math.pow(2,R-1),max:Math.pow(2,R-1)-1}}var ui=oi(15);function ci(R){for(var D=La/R.extent,H=R.loadGeometry(),ne=0;ne<H.length;ne++)for(var de=H[ne],Ae=0;Ae<de.length;Ae++){var Re=de[Ae];Re.x=Math.round(Re.x*D),Re.y=Math.round(Re.y*D),(Re.x<ui.min||Re.x>ui.max||Re.y<ui.min||Re.y>ui.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<ft.length;Ke+=1){var bt=ft[Ke],Et=bt.feature,Wt=bt.id,sr=bt.index,qt=bt.sourceLayerIndex,mr=this.layers[0]._featureFilter.needGeometry,Br={type:Et.type,id:Wt,properties:Et.properties,geometry:mr?ci(Et):[]};if(this.layers[0]._featureFilter.filter(new Bn(this.zoom),Br,ne)){mr||(Br.geometry=ci(Et));var rn=Re?Re.evaluate(Br,{},ne):void 0,$r={id:Wt,properties:Et.properties,type:Et.type,sourceLayerIndex:qt,index:sr,geometry:Br.geometry,patterns:{},sortKey:rn};Ae.push($r)}}Re&&Ae.sort(function(ca,ya){return ca.sortKey-ya.sortKey});for(var Mn=0,xn=Ae;Mn<xn.length;Mn+=1){var An=xn[Mn],kn=An,Vn=kn.geometry,Qn=kn.index,Jn=kn.sourceLayerIndex,Sa=D[Qn].feature;this.addFeature(An,Vn,Qn,ne),H.featureIndex.insert(Sa,Vn,Qn,Jn,this.index)}},Ti.prototype.update=function(D,H,ne){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(D,H,this.stateDependentLayers,ne)},Ti.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},Ti.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Ti.prototype.upload=function(D){this.uploaded||(this.layoutVertexBuffer=D.createVertexBuffer(this.layoutVertexArray,ve),this.indexBuffer=D.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(D),this.uploaded=!0},Ti.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Ti.prototype.addFeature=function(D,H,ne,de){for(var Ae=0,Re=H;Ae<Re.length;Ae+=1)for(var Ke=Re[Ae],ft=0,bt=Ke;ft<bt.length;ft+=1){var Et=bt[ft],Wt=Et.x,sr=Et.y;if(!(Wt<0||Wt>=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<R.length;H++)if(ns(D,R[H]))return!0;for(var ne=0;ne<D.length;ne++)if(ns(R,D[ne]))return!0;return!!rl(R,D)}function Qa(R,D,H){return!!(ns(R,D)||Zl(D,R,H))}function Ui(R,D){if(R.length===1)return Xl(D,R[0]);for(var H=0;H<D.length;H++)for(var ne=D[H],de=0;de<ne.length;de++)if(ns(R,ne[de]))return!0;for(var Ae=0;Ae<R.length;Ae++)if(Xl(D,R[Ae]))return!0;for(var Re=0;Re<D.length;Re++)if(rl(R,D[Re]))return!0;return!1}function no(R,D,H){for(var ne=0;ne<D.length;ne++){var de=D[ne];if(R.length>=3){for(var Ae=0;Ae<de.length;Ae++)if(ns(R,de[Ae]))return!0}if(tl(R,de,H))return!0}return!1}function tl(R,D,H){if(R.length>1){if(rl(R,D))return!0;for(var ne=0;ne<D.length;ne++)if(Zl(D[ne],R,H))return!0}for(var de=0;de<R.length;de++)if(Zl(R[de],D,H))return!0;return!1}function rl(R,D){if(R.length===0||D.length===0)return!1;for(var H=0;H<R.length-1;H++)for(var ne=R[H],de=R[H+1],Ae=0;Ae<D.length-1;Ae++){var Re=D[Ae],Ke=D[Ae+1];if(Yl(ne,de,Re,Ke))return!0}return!1}function Yl(R,D,H,ne){return k(R,H,ne)!==k(D,H,ne)&&k(R,D,H)!==k(R,D,ne)}function Zl(R,D,H){var ne=H*H;if(D.length===1)return R.distSqr(D[0])<ne;for(var de=1;de<D.length;de++){var Ae=D[de-1],Re=D[de];if(Au(R,Ae,Re)<ne)return!0}return!1}function Au(R,D,H){var ne=D.distSqr(H);if(ne===0)return R.distSqr(D);var de=((R.x-D.x)*(H.x-D.x)+(R.y-D.y)*(H.y-D.y))/ne;return de<0?R.distSqr(D):de>1?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;Re<R.length;Re++){ne=R[Re];for(var Ke=0,ft=ne.length-1;Ke<ne.length;ft=Ke++)de=ne[Ke],Ae=ne[ft],de.y>D.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;ne<R.length;de=ne++){var Ae=R[ne],Re=R[de];Ae.y>D.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<Re.length;Ae+=1){var Ke=Re[Ae];if(D<=Ke.x&&H<=Ke.y&&ne>=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;bt<Et.length;bt+=1){var Wt=Et[bt];if(ns(R,Wt))return!0}for(var sr=0;sr<R.length-1;sr++){var qt=R[sr],mr=R[sr+1];if(Oo(qt,mr,ft))return!0}return!1}function Oo(R,D,H){var ne=H[0],de=H[2];if(R.x<ne.x&&D.x<ne.x||R.x>de.x&&D.x>de.x||R.y<ne.y&&D.y<ne.y||R.y>de.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;Ke<R.length;Ke++){var ft=R[Ke];Re.push(ft.sub(Ae))}return Re}var Kl=new $i({"circle-sort-key":new Ma(Xt.layout_circle["circle-sort-key"])}),Kh=new $i({"circle-radius":new Ma(Xt.paint_circle["circle-radius"]),"circle-color":new Ma(Xt.paint_circle["circle-color"]),"circle-blur":new Ma(Xt.paint_circle["circle-blur"]),"circle-opacity":new Ma(Xt.paint_circle["circle-opacity"]),"circle-translate":new ga(Xt.paint_circle["circle-translate"]),"circle-translate-anchor":new ga(Xt.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new ga(Xt.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new ga(Xt.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new Ma(Xt.paint_circle["circle-stroke-width"]),"circle-stroke-color":new Ma(Xt.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new Ma(Xt.paint_circle["circle-stroke-opacity"])}),zf={paint:Kh,layout:Kl},Ro=typeof Float32Array<"u"?Float32Array:Array;Math.hypot||(Math.hypot=function(){for(var R=arguments,D=0,H=arguments.length;H--;)D+=R[H]*R[H];return Math.sqrt(D)});function Ah(){var R=new Ro(4);return Ro!=Float32Array&&(R[1]=0,R[2]=0),R[0]=1,R[3]=1,R}function Yo(R,D,H){var ne=D[0],de=D[1],Ae=D[2],Re=D[3],Ke=Math.sin(H),ft=Math.cos(H);return R[0]=ne*ft+Ae*Ke,R[1]=de*ft+Re*Ke,R[2]=ne*-Ke+Ae*ft,R[3]=de*-Ke+Re*ft,R}function Mh(){var R=new Ro(9);return Ro!=Float32Array&&(R[1]=0,R[2]=0,R[3]=0,R[5]=0,R[6]=0,R[7]=0),R[0]=1,R[4]=1,R[8]=1,R}function Jh(R,D){var H=Math.sin(D),ne=Math.cos(D);return R[0]=ne,R[1]=H,R[2]=0,R[3]=-H,R[4]=ne,R[5]=0,R[6]=0,R[7]=0,R[8]=1,R}function Qh(){var R=new Ro(16);return Ro!=Float32Array&&(R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[11]=0,R[12]=0,R[13]=0,R[14]=0),R[0]=1,R[5]=1,R[10]=1,R[15]=1,R}function Rp(R){var D=new Ro(16);return D[0]=R[0],D[1]=R[1],D[2]=R[2],D[3]=R[3],D[4]=R[4],D[5]=R[5],D[6]=R[6],D[7]=R[7],D[8]=R[8],D[9]=R[9],D[10]=R[10],D[11]=R[11],D[12]=R[12],D[13]=R[13],D[14]=R[14],D[15]=R[15],D}function $h(R){return R[0]=1,R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[5]=1,R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[10]=1,R[11]=0,R[12]=0,R[13]=0,R[14]=0,R[15]=1,R}function Tc(R,D){var H=D[0],ne=D[1],de=D[2],Ae=D[3],Re=D[4],Ke=D[5],ft=D[6],bt=D[7],Et=D[8],Wt=D[9],sr=D[10],qt=D[11],mr=D[12],Br=D[13],rn=D[14],$r=D[15],Mn=H*Ke-ne*Re,xn=H*ft-de*Re,An=H*bt-Ae*Re,kn=ne*ft-de*Ke,Vn=ne*bt-Ae*Ke,Qn=de*bt-Ae*ft,Jn=Et*Br-Wt*mr,Sa=Et*rn-sr*mr,ca=Et*$r-qt*mr,ya=Wt*rn-sr*Br,Ba=Wt*$r-qt*Br,Ta=sr*$r-qt*rn,Aa=Mn*Ta-xn*Ba+An*ya+kn*ca-Vn*Sa+Qn*Jn;return Aa?(Aa=1/Aa,R[0]=(Ke*Ta-ft*Ba+bt*ya)*Aa,R[1]=(de*Ba-ne*Ta-Ae*ya)*Aa,R[2]=(Br*Qn-rn*Vn+$r*kn)*Aa,R[3]=(sr*Vn-Wt*Qn-qt*kn)*Aa,R[4]=(ft*ca-Re*Ta-bt*Sa)*Aa,R[5]=(H*Ta-de*ca+Ae*Sa)*Aa,R[6]=(rn*An-mr*Qn-$r*xn)*Aa,R[7]=(Et*Qn-sr*An+qt*xn)*Aa,R[8]=(Re*Ba-Ke*ca+bt*Jn)*Aa,R[9]=(ne*ca-H*Ba-Ae*Jn)*Aa,R[10]=(mr*Vn-Br*An+$r*Mn)*Aa,R[11]=(Wt*An-Et*Vn-qt*Mn)*Aa,R[12]=(Ke*Sa-Re*ya-ft*Jn)*Aa,R[13]=(H*ya-ne*Sa+de*Jn)*Aa,R[14]=(Br*xn-mr*kn-rn*Mn)*Aa,R[15]=(Et*kn-Wt*xn+sr*Mn)*Aa,R):null}function Ac(R,D,H){var ne=D[0],de=D[1],Ae=D[2],Re=D[3],Ke=D[4],ft=D[5],bt=D[6],Et=D[7],Wt=D[8],sr=D[9],qt=D[10],mr=D[11],Br=D[12],rn=D[13],$r=D[14],Mn=D[15],xn=H[0],An=H[1],kn=H[2],Vn=H[3];return R[0]=xn*ne+An*Ke+kn*Wt+Vn*Br,R[1]=xn*de+An*ft+kn*sr+Vn*rn,R[2]=xn*Ae+An*bt+kn*qt+Vn*$r,R[3]=xn*Re+An*Et+kn*mr+Vn*Mn,xn=H[4],An=H[5],kn=H[6],Vn=H[7],R[4]=xn*ne+An*Ke+kn*Wt+Vn*Br,R[5]=xn*de+An*ft+kn*sr+Vn*rn,R[6]=xn*Ae+An*bt+kn*qt+Vn*$r,R[7]=xn*Re+An*Et+kn*mr+Vn*Mn,xn=H[8],An=H[9],kn=H[10],Vn=H[11],R[8]=xn*ne+An*Ke+kn*Wt+Vn*Br,R[9]=xn*de+An*ft+kn*sr+Vn*rn,R[10]=xn*Ae+An*bt+kn*qt+Vn*$r,R[11]=xn*Re+An*Et+kn*mr+Vn*Mn,xn=H[12],An=H[13],kn=H[14],Vn=H[15],R[12]=xn*ne+An*Ke+kn*Wt+Vn*Br,R[13]=xn*de+An*ft+kn*sr+Vn*rn,R[14]=xn*Ae+An*bt+kn*qt+Vn*$r,R[15]=xn*Re+An*Et+kn*mr+Vn*Mn,R}function Yi(R,D,H){var ne=H[0],de=H[1],Ae=H[2],Re,Ke,ft,bt,Et,Wt,sr,qt,mr,Br,rn,$r;return D===R?(R[12]=D[0]*ne+D[4]*de+D[8]*Ae+D[12],R[13]=D[1]*ne+D[5]*de+D[9]*Ae+D[13],R[14]=D[2]*ne+D[6]*de+D[10]*Ae+D[14],R[15]=D[3]*ne+D[7]*de+D[11]*Ae+D[15]):(Re=D[0],Ke=D[1],ft=D[2],bt=D[3],Et=D[4],Wt=D[5],sr=D[6],qt=D[7],mr=D[8],Br=D[9],rn=D[10],$r=D[11],R[0]=Re,R[1]=Ke,R[2]=ft,R[3]=bt,R[4]=Et,R[5]=Wt,R[6]=sr,R[7]=qt,R[8]=mr,R[9]=Br,R[10]=rn,R[11]=$r,R[12]=Re*ne+Et*de+mr*Ae+D[12],R[13]=Ke*ne+Wt*de+Br*Ae+D[13],R[14]=ft*ne+sr*de+rn*Ae+D[14],R[15]=bt*ne+qt*de+$r*Ae+D[15]),R}function xs(R,D,H){var ne=H[0],de=H[1],Ae=H[2];return R[0]=D[0]*ne,R[1]=D[1]*ne,R[2]=D[2]*ne,R[3]=D[3]*ne,R[4]=D[4]*de,R[5]=D[5]*de,R[6]=D[6]*de,R[7]=D[7]*de,R[8]=D[8]*Ae,R[9]=D[9]*Ae,R[10]=D[10]*Ae,R[11]=D[11]*Ae,R[12]=D[12],R[13]=D[13],R[14]=D[14],R[15]=D[15],R}function bs(R,D,H){var ne=Math.sin(H),de=Math.cos(H),Ae=D[4],Re=D[5],Ke=D[6],ft=D[7],bt=D[8],Et=D[9],Wt=D[10],sr=D[11];return D!==R&&(R[0]=D[0],R[1]=D[1],R[2]=D[2],R[3]=D[3],R[12]=D[12],R[13]=D[13],R[14]=D[14],R[15]=D[15]),R[4]=Ae*de+bt*ne,R[5]=Re*de+Et*ne,R[6]=Ke*de+Wt*ne,R[7]=ft*de+sr*ne,R[8]=bt*de-Ae*ne,R[9]=Et*de-Re*ne,R[10]=Wt*de-Ke*ne,R[11]=sr*de-ft*ne,R}function qh(R,D,H){var ne=Math.sin(H),de=Math.cos(H),Ae=D[0],Re=D[1],Ke=D[2],ft=D[3],bt=D[4],Et=D[5],Wt=D[6],sr=D[7];return D!==R&&(R[8]=D[8],R[9]=D[9],R[10]=D[10],R[11]=D[11],R[12]=D[12],R[13]=D[13],R[14]=D[14],R[15]=D[15]),R[0]=Ae*de+bt*ne,R[1]=Re*de+Et*ne,R[2]=Ke*de+Wt*ne,R[3]=ft*de+sr*ne,R[4]=bt*de-Ae*ne,R[5]=Et*de-Re*ne,R[6]=Wt*de-Ke*ne,R[7]=sr*de-ft*ne,R}function sd(R,D,H,ne,de){var Ae=1/Math.tan(D/2),Re;return R[0]=Ae/H,R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[5]=Ae,R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[11]=-1,R[12]=0,R[13]=0,R[15]=0,de!=null&&de!==1/0?(Re=1/(ne-de),R[10]=(de+ne)*Re,R[14]=2*de*ne*Re):(R[10]=-1,R[14]=-2*ne),R}function Fg(R,D,H,ne,de,Ae,Re){var Ke=1/(D-H),ft=1/(ne-de),bt=1/(Ae-Re);return R[0]=-2*Ke,R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[5]=-2*ft,R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[10]=2*bt,R[11]=0,R[12]=(D+H)*Ke,R[13]=(de+ne)*ft,R[14]=(Re+Ae)*bt,R[15]=1,R}var _g=Ac;function Sh(){var R=new Ro(3);return Ro!=Float32Array&&(R[0]=0,R[1]=0,R[2]=0),R}function zg(R){var D=new Ro(3);return D[0]=R[0],D[1]=R[1],D[2]=R[2],D}function ev(R,D,H){return R[0]=D[0]+H[0],R[1]=D[1]+H[1],R[2]=D[2]+H[2],R}function Og(R,D,H){return R[0]=D[0]-H[0],R[1]=D[1]-H[1],R[2]=D[2]-H[2],R}function Ng(R,D,H){return R[0]=D[0]*H,R[1]=D[1]*H,R[2]=D[2]*H,R}function ld(R,D){var H=D[0],ne=D[1],de=D[2],Ae=H*H+ne*ne+de*de;return Ae>0&&(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;Ke<ft;Ke+=H)R[0]=D[Ke],R[1]=D[Ke+1],R[2]=D[Ke+2],Ae(R,R,Re),D[Ke]=R[0],D[Ke+1]=R[1],D[Ke+2]=R[2];return D}})();function t5(){var R=new Ro(4);return Ro!=Float32Array&&(R[0]=0,R[1]=0,R[2]=0,R[3]=0),R}function r5(R,D,H){return R[0]=D[0]*H,R[1]=D[1]*H,R[2]=D[2]*H,R[3]=D[3]*H,R}function n5(R,D){return R[0]*D[0]+R[1]*D[1]+R[2]*D[2]+R[3]*D[3]}function Dp(R,D,H){var ne=D[0],de=D[1],Ae=D[2],Re=D[3];return R[0]=H[0]*ne+H[4]*de+H[8]*Ae+H[12]*Re,R[1]=H[1]*ne+H[5]*de+H[9]*Ae+H[13]*Re,R[2]=H[2]*ne+H[6]*de+H[10]*Ae+H[14]*Re,R[3]=H[3]*ne+H[7]*de+H[11]*Ae+H[15]*Re,R}(function(){var R=t5();return function(D,H,ne,de,Ae,Re){var Ke,ft;for(H||(H=4),ne||(ne=0),de?ft=Math.min(de*H+ne,D.length):ft=D.length,Ke=ne;Ke<ft;Ke+=H)R[0]=D[Ke],R[1]=D[Ke+1],R[2]=D[Ke+2],R[3]=D[Ke+3],Ae(R,R,Re),D[Ke]=R[0],D[Ke+1]=R[1],D[Ke+2]=R[2],D[Ke+3]=R[3];return D}})();function a5(){var R=new Ro(2);return Ro!=Float32Array&&(R[0]=0,R[1]=0),R}function i5(R){var D=R[0],H=R[1];return D*D+H*H}var o5=i5;(function(){var R=a5();return function(D,H,ne,de,Ae,Re){var Ke,ft;for(H||(H=2),ne||(ne=0),de?ft=Math.min(de*H+ne,D.length):ft=D.length,Ke=ne;Ke<ft;Ke+=H)R[0]=D[Ke],R[1]=D[Ke+1],Ae(R,R,Re),D[Ke]=R[0],D[Ke+1]=R[1];return D}})();var s5=function(R){function D(H){R.call(this,H,zf)}return R&&(D.__proto__=R),D.prototype=Object.create(R&&R.prototype),D.prototype.constructor=D,D.prototype.createBucket=function(ne){return new Ti(ne)},D.prototype.queryRadius=function(ne){var de=ne;return Ns("circle-radius",this,de)+Ns("circle-stroke-width",this,de)+jl(this.paint.get("circle-translate"))},D.prototype.queryIntersectsFeature=function(ne,de,Ae,Re,Ke,ft,bt,Et){for(var Wt=Sl(ne,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),ft.angle,bt),sr=this.paint.get("circle-radius").evaluate(de,Ae),qt=this.paint.get("circle-stroke-width").evaluate(de,Ae),mr=sr+qt,Br=this.paint.get("circle-pitch-alignment")==="map",rn=Br?Wt:l5(Wt,Et),$r=Br?mr*bt:mr,Mn=0,xn=Re;Mn<xn.length;Mn+=1)for(var An=xn[Mn],kn=0,Vn=An;kn<Vn.length;kn+=1){var Qn=Vn[kn],Jn=Br?Qn:ux(Qn,Et),Sa=$r,ca=Dp([],[Qn.x,Qn.y,0,1],Et);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?Sa*=ca[3]/ft.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(Sa*=ft.cameraToCenterDistance/ca[3]),Qa(rn,Jn,Sa))return!0}return!1},D}(Ci);function ux(R,D){var H=Dp([],[R.x,R.y,0,1],D);return new t(H[0]/H[3],H[1]/H[3])}function l5(R,D){return R.map(function(H){return ux(H,D)})}var fx=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}(Ti);fe("HeatmapBucket",fx,{omit:["layers"]});function Bg(R,D,H,ne){var de=D.width,Ae=D.height;if(!ne)ne=new Uint8Array(de*Ae*H);else if(ne instanceof Uint8ClampedArray)ne=new Uint8Array(ne.buffer);else if(ne.length!==de*Ae*H)throw new RangeError("mismatched image size");return R.width=de,R.height=Ae,R.data=ne,R}function cx(R,D,H){var ne=D.width,de=D.height;if(!(ne===R.width&&de===R.height)){var Ae=Bg({},{width:ne,height:de},H);Ug(R,Ae,{x:0,y:0},{x:0,y:0},{width:Math.min(R.width,ne),height:Math.min(R.height,de)},H),R.width=ne,R.height=de,R.data=Ae.data}}function Ug(R,D,H,ne,de,Ae){if(de.width===0||de.height===0)return D;if(de.width>R.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;ft<de.height;ft++)for(var bt=((H.y+ft)*R.width+H.x)*Ae,Et=((ne.y+ft)*D.width+ne.x)*Ae,Wt=0;Wt<de.width*Ae;Wt++)Ke[Et+Wt]=Re[bt+Wt];return D}var Eh=function(D,H){Bg(this,D,1,H)};Eh.prototype.resize=function(D){cx(this,D,1)},Eh.prototype.clone=function(){return new Eh({width:this.width,height:this.height},new Uint8Array(this.data))},Eh.copy=function(D,H,ne,de,Ae){Ug(D,H,ne,de,Ae,1)};var ws=function(D,H){Bg(this,D,4,H)};ws.prototype.resize=function(D){cx(this,D,4)},ws.prototype.replace=function(D,H){H?this.data.set(D):D instanceof Uint8ClampedArray?this.data=new Uint8Array(D.buffer):this.data=D},ws.prototype.clone=function(){return new ws({width:this.width,height:this.height},new Uint8Array(this.data))},ws.copy=function(D,H,ne,de,Ae){Ug(D,H,ne,de,Ae,4)},fe("AlphaImage",Eh),fe("RGBAImage",ws);var u5=new $i({"heatmap-radius":new Ma(Xt.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Ma(Xt.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new ga(Xt.paint_heatmap["heatmap-intensity"]),"heatmap-color":new zo(Xt.paint_heatmap["heatmap-color"]),"heatmap-opacity":new ga(Xt.paint_heatmap["heatmap-opacity"])}),f5={paint:u5};function hx(R,D){for(var H=new Uint8Array(1024),ne={},de=0,Ae=0;de<256;de++,Ae+=4){ne[D]=de/255;var Re=R.evaluate(ne);H[Ae+0]=Math.floor(Re.r*255/Re.a),H[Ae+1]=Math.floor(Re.g*255/Re.a),H[Ae+2]=Math.floor(Re.b*255/Re.a),H[Ae+3]=Math.floor(Re.a*255)}return new ws({width:256,height:1},H)}var c5=function(R){function D(H){R.call(this,H,f5),this._updateColorRamp()}return R&&(D.__proto__=R),D.prototype=Object.create(R&&R.prototype),D.prototype.constructor=D,D.prototype.createBucket=function(ne){return new fx(ne)},D.prototype._handleSpecialPaintPropertyUpdate=function(ne){ne==="heatmap-color"&&this._updateColorRamp()},D.prototype._updateColorRamp=function(){var ne=this._transitionablePaint._values["heatmap-color"].value.expression;this.colorRamp=hx(ne,"heatmapDensity"),this.colorRampTexture=null},D.prototype.resize=function(){this.heatmapFbo&&(this.heatmapFbo.destroy(),this.heatmapFbo=null)},D.prototype.queryRadius=function(){return 0},D.prototype.queryIntersectsFeature=function(){return!1},D.prototype.hasOffscreenPass=function(){return this.paint.get("heatmap-opacity")!==0&&this.visibility!=="none"},D}(Ci),h5=new $i({"hillshade-illumination-direction":new ga(Xt.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new ga(Xt.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new ga(Xt.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new ga(Xt.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new ga(Xt.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new ga(Xt.paint_hillshade["hillshade-accent-color"])}),v5={paint:h5},d5=function(R){function D(H){R.call(this,H,v5)}return R&&(D.__proto__=R),D.prototype=Object.create(R&&R.prototype),D.prototype.constructor=D,D.prototype.hasOffscreenPass=function(){return this.paint.get("hillshade-exaggeration")!==0&&this.visibility!=="none"},D}(Ci),p5=wi([{name:"a_pos",components:2,type:"Int16"}],4),vx=p5.members,Vg=Ip,g5=Ip;function Ip(R,D,H){H=H||2;var ne=D&&D.length,de=ne?D[0]*H:R.length,Ae=dx(R,0,de,H,!0),Re=[];if(!Ae||Ae.next===Ae.prev)return Re;var Ke,ft,bt,Et,Wt,sr,qt;if(ne&&(Ae=w5(R,D,Ae,H)),R.length>80*H){Ke=bt=R[0],ft=Et=R[1];for(var mr=H;mr<de;mr+=H)Wt=R[mr],sr=R[mr+1],Wt<Ke&&(Ke=Wt),sr<ft&&(ft=sr),Wt>bt&&(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<H;Ae+=ne)Re=yx(Ae,R[Ae],R[Ae+1],Re);else for(Ae=H-ne;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.x<Ae.x?de.x<Re.x?de.x:Re.x:Ae.x<Re.x?Ae.x:Re.x,ft=de.y<Ae.y?de.y<Re.y?de.y:Re.y:Ae.y<Re.y?Ae.y:Re.y,bt=de.x>Ae.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<Re;Ae++)Ke=D[Ae]*ne,ft=Ae<Re-1?D[Ae+1]*ne:R.length,bt=dx(R,Ke,ft,ne,!1),bt===bt.next&&(bt.steiner=!0),de.push(L5(bt));for(de.sort(T5),Ae=0;Ae<de.length;Ae++)A5(de[Ae],H),H=Mc(H,H.next);return H}function T5(R,D){return R.x-D.x}function A5(R,D){if(D=M5(R,D),D){var H=gx(D,R);Mc(D,D.next),Mc(H,H.next)}}function M5(R,D){var H=D,ne=R.x,de=R.y,Ae=-1/0,Re;do{if(de<=H.y&&de>=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.next.x?H:H.next}}H=H.next}while(H!==D);if(!Re)return null;if(ne===Ae)return Re;var ft=Re,bt=Re.x,Et=Re.y,Wt=1/0,sr;H=Re;do ne>=H.x&&H.x>=bt&&ne!==H.x&&tv(de<Et?ne:Ae,de,bt,Et,de<Et?Ae:ne,de,H.x,H.y)&&(sr=Math.abs(de-H.y)/(ne-H.x),fd(H,R)&&(sr<Wt||sr===Wt&&(H.x>Re.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;D<bt&&(Ke++,ne=ne.nextZ,!!ne);D++);for(ft=bt;Ke>0||ft>0&&ne;)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<H.x||D.x===H.x&&D.y<H.y)&&(H=D),D=D.next;while(D!==R);return H}function tv(R,D,H,ne,de,Ae,Re,Ke){return(de-Re)*(D-Ke)-(R-Re)*(Ae-Ke)>=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;Ke<ft;Ke++){var bt=D[Ke]*H,Et=Ke<ft-1?D[Ke+1]*H:R.length;Re-=Math.abs(Wg(R,bt,Et,H))}var Wt=0;for(Ke=0;Ke<ne.length;Ke+=3){var sr=ne[Ke]*H,qt=ne[Ke+1]*H,mr=ne[Ke+2]*H;Wt+=Math.abs((R[sr]-R[mr])*(R[qt+1]-R[sr+1])-(R[sr]-R[qt])*(R[mr+1]-R[sr+1]))}return Re===0&&Wt===0?0:Math.abs((Wt-Re)/Re)};function Wg(R,D,H,ne){for(var de=0,Ae=D,Re=H-ne;Ae<H;Ae+=ne)de+=(R[Re]-R[Ae])*(R[Ae+1]+R[Re+1]),Re=Ae;return de}Ip.flatten=function(R){for(var D=R[0][0].length,H={vertices:[],holes:[],dimensions:D},ne=0,de=0;de<R.length;de++){for(var Ae=0;Ae<R[de].length;Ae++)for(var Re=0;Re<D;Re++)H.vertices.push(R[de][Ae][Re]);de>0&&(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);qt<mr;){for(hd(R,qt,mr),qt++,mr--;de(R[qt],sr)<0;)qt++;for(;de(R[mr],sr)>0;)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 R<D?-1:R>D?1:0}function Yg(R,D){var H=R.length;if(H<=1)return[R];for(var ne=[],de,Ae,Re=0;Re<H;Re++){var Ke=O(R[Re]);Ke!==0&&(R[Re].area=Math.abs(Ke),Ae===void 0&&(Ae=Ke<0),Ae===Ke<0?(de&&ne.push(de),de=[R[Re]]):de.push(R[Re]))}if(de&&ne.push(de),D>1)for(var ft=0;ft<ne.length;ft++)ne[ft].length<=D||(I5(ne[ft],D,1,ne[ft].length-1,F5),ne[ft]=ne[ft].slice(0,D));return ne}function F5(R,D){return D.area-R.area}function Zg(R,D,H){for(var ne=H.patternDependencies,de=!1,Ae=0,Re=D;Ae<Re.length;Ae+=1){var Ke=Re[Ae],ft=Ke.paint.get(R+"-pattern");ft.isConstant()||(de=!0);var bt=ft.constantOr(null);bt&&(de=!0,ne[bt.to]=!0,ne[bt.from]=!0)}return de}function Xg(R,D,H,ne,de){for(var Ae=de.patternDependencies,Re=0,Ke=D;Re<Ke.length;Re+=1){var ft=Ke[Re],bt=ft.paint.get(R+"-pattern"),Et=bt.value;if(Et.kind!=="constant"){var Wt=Et.evaluate({zoom:ne-1},H,{},de.availableImages),sr=Et.evaluate({zoom:ne},H,{},de.availableImages),qt=Et.evaluate({zoom:ne+1},H,{},de.availableImages);Wt=Wt&&Wt.name?Wt.name:Wt,sr=sr&&sr.name?sr.name:sr,qt=qt&&qt.name?qt.name:qt,Ae[Wt]=!0,Ae[sr]=!0,Ae[qt]=!0,H.patterns[ft.id]={min:Wt,mid:sr,max:qt}}}return H}var _5=500,Mu=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.patternFeatures=[],this.layoutVertexArray=new xh,this.indexArray=new Tu,this.indexArray2=new Th,this.programConfigurations=new Va(vx,D.layers,D.zoom),this.segments=new X,this.segments2=new X,this.stateDependentLayerIds=this.layers.filter(function(H){return H.isStateDependent()}).map(function(H){return H.id})};Mu.prototype.populate=function(D,H,ne){this.hasPattern=Zg("fill",this.layers,H);for(var de=this.layers[0].layout.get("fill-sort-key"),Ae=[],Re=0,Ke=D;Re<Ke.length;Re+=1){var ft=Ke[Re],bt=ft.feature,Et=ft.id,Wt=ft.index,sr=ft.sourceLayerIndex,qt=this.layers[0]._featureFilter.needGeometry,mr={type:bt.type,id:Et,properties:bt.properties,geometry:qt?ci(bt):[]};if(this.layers[0]._featureFilter.filter(new Bn(this.zoom),mr,ne)){qt||(mr.geometry=ci(bt));var Br=de?de.evaluate(mr,{},ne,H.availableImages):void 0,rn={id:Et,properties:bt.properties,type:bt.type,sourceLayerIndex:sr,index:Wt,geometry:mr.geometry,patterns:{},sortKey:Br};Ae.push(rn)}}de&&Ae.sort(function(ca,ya){return ca.sortKey-ya.sortKey});for(var $r=0,Mn=Ae;$r<Mn.length;$r+=1){var xn=Mn[$r],An=xn,kn=An.geometry,Vn=An.index,Qn=An.sourceLayerIndex;if(this.hasPattern){var Jn=Xg("fill",this.layers,xn,this.zoom,H);this.patternFeatures.push(Jn)}else this.addFeature(xn,kn,Vn,ne,{});var Sa=D[Vn].feature;H.featureIndex.insert(Sa,kn,Vn,Qn,this.index)}},Mu.prototype.update=function(D,H,ne){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(D,H,this.stateDependentLayers,ne)},Mu.prototype.addFeatures=function(D,H,ne){for(var de=0,Ae=this.patternFeatures;de<Ae.length;de+=1){var Re=Ae[de];this.addFeature(Re,Re.geometry,Re.index,H,ne)}},Mu.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},Mu.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Mu.prototype.upload=function(D){this.uploaded||(this.layoutVertexBuffer=D.createVertexBuffer(this.layoutVertexArray,vx),this.indexBuffer=D.createIndexBuffer(this.indexArray),this.indexBuffer2=D.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(D),this.uploaded=!0},Mu.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())},Mu.prototype.addFeature=function(D,H,ne,de,Ae){for(var Re=0,Ke=Yg(H,_5);Re<Ke.length;Re+=1){for(var ft=Ke[Re],bt=0,Et=0,Wt=ft;Et<Wt.length;Et+=1){var sr=Wt[Et];bt+=sr.length}for(var qt=this.segments.prepareSegment(bt,this.layoutVertexArray,this.indexArray),mr=qt.vertexLength,Br=[],rn=[],$r=0,Mn=ft;$r<Mn.length;$r+=1){var xn=Mn[$r];if(xn.length!==0){xn!==ft[0]&&rn.push(Br.length/2);var An=this.segments2.prepareSegment(xn.length,this.layoutVertexArray,this.indexArray2),kn=An.vertexLength;this.layoutVertexArray.emplaceBack(xn[0].x,xn[0].y),this.indexArray2.emplaceBack(kn+xn.length-1,kn),Br.push(xn[0].x),Br.push(xn[0].y);for(var Vn=1;Vn<xn.length;Vn++)this.layoutVertexArray.emplaceBack(xn[Vn].x,xn[Vn].y),this.indexArray2.emplaceBack(kn+Vn-1,kn+Vn),Br.push(xn[Vn].x),Br.push(xn[Vn].y);An.vertexLength+=xn.length,An.primitiveLength+=xn.length}}for(var Qn=Vg(Br,rn),Jn=0;Jn<Qn.length;Jn+=3)this.indexArray.emplaceBack(mr+Qn[Jn],mr+Qn[Jn+1],mr+Qn[Jn+2]);qt.vertexLength+=bt,qt.primitiveLength+=Qn.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,D,ne,Ae,de)},fe("FillBucket",Mu,{omit:["layers","patternFeatures"]});var z5=new $i({"fill-sort-key":new Ma(Xt.layout_fill["fill-sort-key"])}),O5=new $i({"fill-antialias":new ga(Xt.paint_fill["fill-antialias"]),"fill-opacity":new Ma(Xt.paint_fill["fill-opacity"]),"fill-color":new Ma(Xt.paint_fill["fill-color"]),"fill-outline-color":new Ma(Xt.paint_fill["fill-outline-color"]),"fill-translate":new ga(Xt.paint_fill["fill-translate"]),"fill-translate-anchor":new ga(Xt.paint_fill["fill-translate-anchor"]),"fill-pattern":new bi(Xt.paint_fill["fill-pattern"])}),N5={paint:O5,layout:z5},B5=function(R){function D(H){R.call(this,H,N5)}return R&&(D.__proto__=R),D.prototype=Object.create(R&&R.prototype),D.prototype.constructor=D,D.prototype.recalculate=function(ne,de){R.prototype.recalculate.call(this,ne,de);var Ae=this.paint._values["fill-outline-color"];Ae.value.kind==="constant"&&Ae.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])},D.prototype.createBucket=function(ne){return new Mu(ne)},D.prototype.queryRadius=function(){return jl(this.paint.get("fill-translate"))},D.prototype.queryIntersectsFeature=function(ne,de,Ae,Re,Ke,ft,bt){var Et=Sl(ne,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),ft.angle,bt);return Ui(Et,Re)},D.prototype.isTileClipped=function(){return!0},D}(Ci),U5=wi([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),xx=U5.members,bx=rv;function rv(R,D,H,ne,de){this.properties={},this.extent=H,this.type=0,this._pbf=R,this._geometry=-1,this._keys=ne,this._values=de,R.readFields(V5,this,D)}function V5(R,D,H){R==1?D.id=H.readVarint():R==2?H5(H,D):R==3?D.type=H.readVarint():R==4&&(D._geometry=H.pos)}function H5(R,D){for(var H=R.readVarint()+R.pos;R.pos<H;){var ne=D._keys[R.readVarint()],de=D._values[R.readVarint()];D.properties[ne]=de}}rv.types=["Unknown","Point","LineString","Polygon"],rv.prototype.loadGeometry=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=[],Ke;R.pos<D;){if(ne<=0){var ft=R.readVarint();H=ft&7,ne=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<D;){if(ne<=0){var Et=R.readVarint();H=Et&7,ne=Et>>3}if(ne--,H===1||H===2)de+=R.readSVarint(),Ae+=R.readSVarint(),de<Re&&(Re=de),de>Ke&&(Ke=de),Ae<ft&&(ft=Ae),Ae>bt&&(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<qt.length;mr++){var Br=qt[mr],rn=180-(Br.y+Ae)*360/ne;qt[mr]=[(Br.x+de)*360/ne-180,360/Math.PI*Math.atan(Math.exp(rn*Math.PI/180))-90]}}switch(this.type){case 1:var Wt=[];for(ft=0;ft<Re.length;ft++)Wt[ft]=Re[ft][0];Re=Wt,Et(Re);break;case 2:for(ft=0;ft<Re.length;ft++)Et(Re[ft]);break;case 3:for(Re=G5(Re),ft=0;ft<Re.length;ft++)for(bt=0;bt<Re[ft].length;bt++)Et(Re[ft][bt]);break}Re.length===1?Re=Re[0]:Ke="Multi"+Ke;var sr={type:"Feature",geometry:{type:Ke,coordinates:Re},properties:this.properties};return"id"in this&&(sr.id=this.id),sr};function G5(R){var D=R.length;if(D<=1)return[R];for(var H=[],ne,de,Ae=0;Ae<D;Ae++){var Re=W5(R[Ae]);Re!==0&&(de===void 0&&(de=Re<0),de===Re<0?(ne&&H.push(ne),ne=[R[Ae]]):ne.push(R[Ae]))}return ne&&H.push(ne),H}function W5(R){for(var D=0,H=0,ne=R.length,de=ne-1,Ae,Re;H<ne;de=H++)Ae=R[H],Re=R[de],D+=(Re.x-Ae.x)*(Ae.y+Re.y);return D}var wx=Tx;function Tx(R,D){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=R,this._keys=[],this._values=[],this._features=[],R.readFields(Y5,this,D),this.length=this._features.length}function Y5(R,D,H){R===15?D.version=H.readVarint():R===1?D.name=H.readString():R===5?D.extent=H.readVarint():R===2?D._features.push(H.pos):R===3?D._keys.push(H.readString()):R===4&&D._values.push(Z5(H))}function Z5(R){for(var D=null,H=R.readVarint()+R.pos;R.pos<H;){var ne=R.readVarint()>>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<Ae.length;de+=1){var Re=Ae[de],Ke=Re.feature,ft=Re.id,bt=Re.index,Et=Re.sourceLayerIndex,Wt=this.layers[0]._featureFilter.needGeometry,sr={type:Ke.type,id:ft,properties:Ke.properties,geometry:Wt?ci(Ke):[]};if(this.layers[0]._featureFilter.filter(new Bn(this.zoom),sr,ne)){var qt={id:ft,sourceLayerIndex:Et,index:bt,geometry:Wt?sr.geometry:ci(Ke),properties:Ke.properties,type:Ke.type,patterns:{}};typeof Ke.id<"u"&&(qt.id=Ke.id),this.hasPattern?this.features.push(Xg("fill-extrusion",this.layers,qt,this.zoom,H)):this.addFeature(qt,qt.geometry,bt,ne,{}),H.featureIndex.insert(Ke,qt.geometry,bt,Et,this.index,!0)}}},Su.prototype.addFeatures=function(D,H,ne){for(var de=0,Ae=this.features;de<Ae.length;de+=1){var Re=Ae[de],Ke=Re.geometry;this.addFeature(Re,Ke,Re.index,H,ne)}},Su.prototype.update=function(D,H,ne){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(D,H,this.stateDependentLayers,ne)},Su.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},Su.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Su.prototype.upload=function(D){this.uploaded||(this.layoutVertexBuffer=D.createVertexBuffer(this.layoutVertexArray,xx),this.indexBuffer=D.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(D),this.uploaded=!0},Su.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Su.prototype.addFeature=function(D,H,ne,de,Ae){for(var Re=0,Ke=Yg(H,eA);Re<Ke.length;Re+=1){for(var ft=Ke[Re],bt=0,Et=0,Wt=ft;Et<Wt.length;Et+=1){var sr=Wt[Et];bt+=sr.length}for(var qt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),mr=0,Br=ft;mr<Br.length;mr+=1){var rn=Br[mr];if(rn.length!==0&&!rA(rn))for(var $r=0,Mn=0;Mn<rn.length;Mn++){var xn=rn[Mn];if(Mn>=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;ya<Ba.length;ya+=1){var Ta=Ba[ya];if(Ta.length!==0){Ta!==ft[0]&&Sa.push(Jn.length/2);for(var Aa=0;Aa<Ta.length;Aa++){var Wa=Ta[Aa];vd(this.layoutVertexArray,Wa.x,Wa.y,0,0,1,1,0),Jn.push(Wa.x),Jn.push(Wa.y)}}}for(var za=Vg(Jn,Sa),ti=0;ti<za.length;ti+=3)this.indexArray.emplaceBack(ca+za[ti],ca+za[ti+2],ca+za[ti+1]);qt.primitiveLength+=za.length/3,qt.vertexLength+=bt}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,D,ne,Ae,de)},fe("FillExtrusionBucket",Su,{omit:["layers","features"]});function tA(R,D){return R.x===D.x&&(R.x<0||R.x>La)||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<D.length;H++){var Ae=D[H],Re=R[0],Ke=de.sub(ne),ft=Ae.sub(ne),bt=Re.sub(ne),Et=dd(Ke,Ke),Wt=dd(Ke,ft),sr=dd(ft,ft),qt=dd(bt,Ke),mr=dd(bt,ft),Br=Et*sr-Wt*Wt,rn=(sr*qt-Wt*mr)/Br,$r=(Et*mr-Wt*qt)/Br,Mn=1-rn-$r,xn=ne.z*Mn+de.z*rn+Ae.z*$r;if(isFinite(xn))return xn}return 1/0}else{for(var An=1/0,kn=0,Vn=D;kn<Vn.length;kn+=1){var Qn=Vn[kn];An=Math.min(An,Qn.z)}return An}}function oA(R,D,H){var ne=1/0;Ui(H,D)&&(ne=Ax(H,D[0]));for(var de=0;de<D.length;de++)for(var Ae=D[de],Re=R[de],Ke=0;Ke<Ae.length-1;Ke++){var ft=Ae[Ke],bt=Ae[Ke+1],Et=Re[Ke],Wt=Re[Ke+1],sr=[ft,bt,Wt,Et,ft];Ha(H,sr)&&(ne=Math.min(ne,Ax(H,sr)))}return ne===1/0?!1:ne}function sA(R,D,H,ne){for(var de=[],Ae=[],Re=ne[8]*D,Ke=ne[9]*D,ft=ne[10]*D,bt=ne[11]*D,Et=ne[8]*H,Wt=ne[9]*H,sr=ne[10]*H,qt=ne[11]*H,mr=0,Br=R;mr<Br.length;mr+=1){for(var rn=Br[mr],$r=[],Mn=[],xn=0,An=rn;xn<An.length;xn+=1){var kn=An[xn],Vn=kn.x,Qn=kn.y,Jn=ne[0]*Vn+ne[4]*Qn+ne[12],Sa=ne[1]*Vn+ne[5]*Qn+ne[13],ca=ne[2]*Vn+ne[6]*Qn+ne[14],ya=ne[3]*Vn+ne[7]*Qn+ne[15],Ba=Jn+Re,Ta=Sa+Ke,Aa=ca+ft,Wa=ya+bt,za=Jn+Et,ti=Sa+Wt,yi=ca+sr,ri=ya+qt,ni=new t(Ba/Wa,Ta/Wa);ni.z=Aa/Wa,$r.push(ni);var $a=new t(za/ri,ti/ri);$a.z=yi/ri,Mn.push($a)}de.push($r),Ae.push(Mn)}return[de,Ae]}function lA(R,D,H,ne){for(var de=[],Ae=0,Re=R;Ae<Re.length;Ae+=1){var Ke=Re[Ae],ft=[Ke.x,Ke.y,ne,1];Dp(ft,ft,D),de.push(new t(ft[0]/ft[3],ft[1]/ft[3]))}return de}var uA=wi([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),Mx=uA.members,fA=nv.VectorTileFeature.types,Sx=63,cA=Math.cos(75/2*(Math.PI/180)),hA=15,vA=20,dA=15,Ex=1/2,Cx=Math.pow(2,dA-1)/Ex,Ts=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.patternFeatures=[],this.layoutVertexArray=new Zh,this.indexArray=new Tu,this.programConfigurations=new Va(Mx,D.layers,D.zoom),this.segments=new X,this.stateDependentLayerIds=this.layers.filter(function(H){return H.isStateDependent()}).map(function(H){return H.id})};Ts.prototype.populate=function(D,H,ne){this.hasPattern=Zg("line",this.layers,H);for(var de=this.layers[0].layout.get("line-sort-key"),Ae=[],Re=0,Ke=D;Re<Ke.length;Re+=1){var ft=Ke[Re],bt=ft.feature,Et=ft.id,Wt=ft.index,sr=ft.sourceLayerIndex,qt=this.layers[0]._featureFilter.needGeometry,mr={type:bt.type,id:Et,properties:bt.properties,geometry:qt?ci(bt):[]};if(this.layers[0]._featureFilter.filter(new Bn(this.zoom),mr,ne)){qt||(mr.geometry=ci(bt));var Br=de?de.evaluate(mr,{},ne):void 0,rn={id:Et,properties:bt.properties,type:bt.type,sourceLayerIndex:sr,index:Wt,geometry:mr.geometry,patterns:{},sortKey:Br};Ae.push(rn)}}de&&Ae.sort(function(ca,ya){return ca.sortKey-ya.sortKey});for(var $r=0,Mn=Ae;$r<Mn.length;$r+=1){var xn=Mn[$r],An=xn,kn=An.geometry,Vn=An.index,Qn=An.sourceLayerIndex;if(this.hasPattern){var Jn=Xg("line",this.layers,xn,this.zoom,H);this.patternFeatures.push(Jn)}else this.addFeature(xn,kn,Vn,ne,{});var Sa=D[Vn].feature;H.featureIndex.insert(Sa,kn,Vn,Qn,this.index)}},Ts.prototype.update=function(D,H,ne){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(D,H,this.stateDependentLayers,ne)},Ts.prototype.addFeatures=function(D,H,ne){for(var de=0,Ae=this.patternFeatures;de<Ae.length;de+=1){var Re=Ae[de];this.addFeature(Re,Re.geometry,Re.index,H,ne)}},Ts.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},Ts.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Ts.prototype.upload=function(D){this.uploaded||(this.layoutVertexBuffer=D.createVertexBuffer(this.layoutVertexArray,Mx),this.indexBuffer=D.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(D),this.uploaded=!0},Ts.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Ts.prototype.addFeature=function(D,H,ne,de,Ae){for(var Re=this.layers[0].layout,Ke=Re.get("line-join").evaluate(D,{}),ft=Re.get("line-cap"),bt=Re.get("line-miter-limit"),Et=Re.get("line-round-limit"),Wt=0,sr=H;Wt<sr.length;Wt+=1){var qt=sr[Wt];this.addLine(qt,D,Ke,ft,bt,Et)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,D,ne,Ae,de)},Ts.prototype.addLine=function(D,H,ne,de,Ae,Re){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,H.properties&&H.properties.hasOwnProperty("mapbox_clip_start")&&H.properties.hasOwnProperty("mapbox_clip_end")){this.clipStart=+H.properties.mapbox_clip_start,this.clipEnd=+H.properties.mapbox_clip_end;for(var Ke=0;Ke<D.length-1;Ke++)this.totalDistance+=D[Ke].dist(D[Ke+1]);this.updateScaledDistance()}for(var ft=fA[H.type]==="Polygon",bt=D.length;bt>=2&&D[bt-1].equals(D[bt-2]);)bt--;for(var Et=0;Et<bt-1&&D[Et].equals(D[Et+1]);)Et++;if(!(bt<(ft?3:2))){ne==="bevel"&&(Ae=1.05);var Wt=this.overscaling<=16?hA*La/(512*this.overscaling):0,sr=this.segments.prepareSegment(bt*10,this.layoutVertexArray,this.indexArray),qt,mr=void 0,Br=void 0,rn=void 0,$r=void 0;this.e1=this.e2=-1,ft&&(qt=D[bt-2],$r=D[Et].sub(qt)._unit()._perp());for(var Mn=Et;Mn<bt;Mn++)if(Br=Mn===bt-1?ft?D[Et+1]:void 0:D[Mn+1],!(Br&&D[Mn].equals(Br))){$r&&(rn=$r),qt&&(mr=qt),qt=D[Mn],$r=Br?Br.sub(qt)._unit()._perp():rn,rn=rn||$r;var xn=rn.add($r);(xn.x!==0||xn.y!==0)&&xn._unit();var An=rn.x*$r.x+rn.y*$r.y,kn=xn.x*$r.x+xn.y*$r.y,Vn=kn!==0?1/kn:1/0,Qn=2*Math.sqrt(2-2*kn),Jn=kn<cA&&mr&&Br,Sa=rn.x*$r.y-rn.y*$r.x>0;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"&&(Vn<Re?Ta="miter":Vn<=2&&(Ta="fakeround")),Ta==="miter"&&Vn>Ae&&(Ta="bevel"),Ta==="bevel"&&(Vn>2&&(Ta="flipbevel"),Vn<Ae&&(Ta="miter")),mr&&this.updateDistance(mr,qt),Ta==="miter")xn._mult(Vn),this.addCurrentVertex(qt,xn,0,0,sr);else if(Ta==="flipbevel"){if(Vn>100)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;ri<yi;ri++){var ni=ri/yi;if(ni!==.5){var $a=ni-.5,Si=1.0904+An*(-3.2452+An*(3.55645-An*1.43519)),Pi=.848013+An*(-1.06021+An*.215638);ni=ni+ni*$a*(ni-1)*(Si*$a*$a+Pi)}var Vi=$r.sub(rn)._mult(ni)._add(rn)._unit()._mult(Sa?-1:1);this.addHalfVertex(qt,Vi.x,Vi.y,!1,Sa,0,sr)}Br&&this.addCurrentVertex(qt,$r,-za,-ti,sr)}else if(Ta==="butt")this.addCurrentVertex(qt,xn,0,0,sr);else if(Ta==="square"){var Zi=mr?1:-1;this.addCurrentVertex(qt,xn,Zi,Zi,sr)}else Ta==="round"&&(mr&&(this.addCurrentVertex(qt,rn,0,0,sr),this.addCurrentVertex(qt,rn,1,1,sr,!0)),Br&&(this.addCurrentVertex(qt,$r,-1,-1,sr,!0),this.addCurrentVertex(qt,$r,0,0,sr)));if(Jn&&Mn<bt-1){var wo=qt.dist(Br);if(wo>2*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<R.length;de++){for(var Ae=R[de],Re=[],Ke=0;Ke<Ae.length;Ke++){var ft=Ae[Ke-1],bt=Ae[Ke],Et=Ae[Ke+1],Wt=Ke===0?ne:bt.sub(ft)._unit()._perp(),sr=Ke===Ae.length-1?ne:Et.sub(bt)._unit()._perp(),qt=Wt._add(sr)._unit(),mr=qt.x*sr.x+qt.y*sr.y;qt._mult(1/mr),Re.push(qt._mult(D)._add(bt))}H.push(Re)}return H}var Kg=wi([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),bA=wi([{name:"a_projected_pos",components:3,type:"Float32"}],4);wi([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);var wA=wi([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}]);wi([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]);var Dx=wi([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),TA=wi([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);wi([{name:"triangle",components:3,type:"Uint16"}]),wi([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),wi([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",components:2,name:"textOffset"},{type:"Float32",name:"collisionCircleDiameter"}]),wi([{type:"Float32",name:"offsetX"}]),wi([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);function AA(R,D,H){var ne=D.layout.get("text-transform").evaluate(H,{});return ne==="uppercase"?R=R.toLocaleUpperCase():ne==="lowercase"&&(R=R.toLocaleLowerCase()),ei.applyArabicShaping&&(R=ei.applyArabicShaping(R)),R}function MA(R,D,H){return R.sections.forEach(function(ne){ne.text=AA(ne.text,D,H)}),R}function SA(R){var D={},H={},ne=[],de=0;function Ae($r){ne.push(R[$r]),de++}function Re($r,Mn,xn){var An=H[$r];return delete H[$r],H[Mn]=An,ne[An].geometry[0].pop(),ne[An].geometry[0]=ne[An].geometry[0].concat(xn[0]),An}function Ke($r,Mn,xn){var An=D[Mn];return delete D[Mn],D[$r]=An,ne[An].geometry[0].shift(),ne[An].geometry[0]=xn[0].concat(ne[An].geometry[0]),An}function ft($r,Mn,xn){var An=xn?Mn[0][Mn[0].length-1]:Mn[0][0];return $r+":"+An.x+":"+An.y}for(var bt=0;bt<R.length;bt++){var Et=R[bt],Wt=Et.geometry,sr=Et.text?Et.text.toString():null;if(!sr){Ae(bt);continue}var qt=ft(sr,Wt),mr=ft(sr,Wt,!0);if(qt in H&&mr in D&&H[qt]!==D[mr]){var Br=Ke(qt,mr,Wt),rn=Re(qt,mr,ne[Br].geometry);delete D[qt],delete H[mr],H[ft(sr,ne[rn].geometry,!0)]=rn,ne[Br].geometry=null}else qt in H?Re(qt,mr,Wt):mr in D?Ke(qt,mr,Wt):(Ae(bt),D[qt]=de-1,H[mr]=de-1)}return ne.filter(function($r){return $r.geometry})}var pd={"!":"︕","#":"",$:"","%":"","&":"","(":"︵",")":"︶","*":"","+":"",",":"︐","-":"︲",".":"・","/":"",":":"︓",";":"︔","<":"︿","=":"",">":"﹀","?":"︖","@":"","[":"﹇","\\":"","]":"﹈","^":"",_:"︳","`":"","{":"︷","|":"―","}":"︸","~":"","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","":"︲","—":"︱","":"﹃","":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","":"︹","":"︺","〖":"︗","〗":"︘","":"︕","":"︵","":"︶","":"︐","":"︲","":"・","":"︓","":"︔","":"︿","":"﹀","":"︖","":"﹇","":"﹈","_":"︳","":"︷","":"―","":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};function EA(R){for(var D="",H=0;H<R.length;H++){var ne=R.charCodeAt(H+1)||null,de=R.charCodeAt(H-1)||null,Ae=(!ne||!en(ne)||pd[R[H+1]])&&(!de||!en(de)||pd[R[H-1]]);Ae&&pd[R[H]]?D+=pd[R[H]]:D+=R[H]}return D}var Do=24,CA=function(R,D,H,ne,de){var Ae,Re,Ke=de*8-ne-1,ft=(1<<Ke)-1,bt=ft>>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<<bt)-1,Wt=Et>>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<<de|Ke,bt+=de;bt>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<H;){var ne=this.readVarint(),de=ne>>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.pos<H;)R.push(this.readVarint(D));return R},readPackedSVarint:function(R){if(this.type!==Li.Bytes)return R.push(this.readSVarint());var D=Of(this);for(R=R||[];this.pos<D;)R.push(this.readSVarint());return R},readPackedBoolean:function(R){if(this.type!==Li.Bytes)return R.push(this.readBoolean());var D=Of(this);for(R=R||[];this.pos<D;)R.push(this.readBoolean());return R},readPackedFloat:function(R){if(this.type!==Li.Bytes)return R.push(this.readFloat());var D=Of(this);for(R=R||[];this.pos<D;)R.push(this.readFloat());return R},readPackedDouble:function(R){if(this.type!==Li.Bytes)return R.push(this.readDouble());var D=Of(this);for(R=R||[];this.pos<D;)R.push(this.readDouble());return R},readPackedFixed32:function(R){if(this.type!==Li.Bytes)return R.push(this.readFixed32());var D=Of(this);for(R=R||[];this.pos<D;)R.push(this.readFixed32());return R},readPackedSFixed32:function(R){if(this.type!==Li.Bytes)return R.push(this.readSFixed32());var D=Of(this);for(R=R||[];this.pos<D;)R.push(this.readSFixed32());return R},readPackedFixed64:function(R){if(this.type!==Li.Bytes)return R.push(this.readFixed64());var D=Of(this);for(R=R||[];this.pos<D;)R.push(this.readFixed64());return R},readPackedSFixed64:function(R){if(this.type!==Li.Bytes)return R.push(this.readSFixed64());var D=Of(this);for(R=R||[];this.pos<D;)R.push(this.readSFixed64());return R},skip:function(R){var D=R&7;if(D===Li.Varint)for(;this.buf[this.pos++]>127;);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;D<this.pos+R;)D*=2;if(D!==this.length){var H=new Uint8Array(D);H.set(this.buf),this.buf=H,this.length=D}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(R){this.realloc(4),iv(this.buf,R,this.pos),this.pos+=4},writeSFixed32:function(R){this.realloc(4),iv(this.buf,R,this.pos),this.pos+=4},writeFixed64:function(R){this.realloc(8),iv(this.buf,R&-1,this.pos),iv(this.buf,Math.floor(R*Ix),this.pos+4),this.pos+=8},writeSFixed64:function(R){this.realloc(8),iv(this.buf,R&-1,this.pos),iv(this.buf,Math.floor(R*Ix),this.pos+4),this.pos+=8},writeVarint:function(R){if(R=+R||0,R>268435455||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<D;H++)this.buf[this.pos++]=R[H]},writeRawMessage:function(R,D){this.pos++;var H=this.pos;R(D,this);var ne=this.pos-H;ne>=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<R.length;H++)D.writeVarint(R[H])}function _A(R,D){for(var H=0;H<R.length;H++)D.writeSVarint(R[H])}function zA(R,D){for(var H=0;H<R.length;H++)D.writeFloat(R[H])}function OA(R,D){for(var H=0;H<R.length;H++)D.writeDouble(R[H])}function NA(R,D){for(var H=0;H<R.length;H++)D.writeBoolean(R[H])}function BA(R,D){for(var H=0;H<R.length;H++)D.writeFixed32(R[H])}function UA(R,D){for(var H=0;H<R.length;H++)D.writeSFixed32(R[H])}function VA(R,D){for(var H=0;H<R.length;H++)D.writeFixed64(R[H])}function HA(R,D){for(var H=0;H<R.length;H++)D.writeSFixed64(R[H])}function Np(R,D){return(R[D]|R[D+1]<<8|R[D+2]<<16)+R[D+3]*16777216}function iv(R,D,H){R[H]=D,R[H+1]=D>>>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;de<H;){var Ae=R[de],Re=null,Ke=Ae>239?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;ne<D.length;ne++){if(de=D.charCodeAt(ne),de>55295&&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<de.length;ne+=1){var Ae=de[ne];D+=Ae.w*Ae.h,H=Math.max(H,Ae.w)}R.sort(function(rn,$r){return $r.h-rn.h});for(var Re=Math.max(Math.ceil(Math.sqrt(D/.95)),H),Ke=[{x:0,y:0,w:Re,h:1/0}],ft=0,bt=0,Et=0,Wt=R;Et<Wt.length;Et+=1)for(var sr=Wt[Et],qt=Ke.length-1;qt>=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<Ke.length&&(Ke[qt]=Br)}else sr.h===mr.h?(mr.x+=sr.w,mr.w-=sr.w):sr.w===mr.w?(mr.y+=sr.h,mr.h-=sr.h):(Ke.push({x:mr.x+sr.w,y:mr.y,w:mr.w-sr.w,h:sr.h}),mr.y+=sr.h,mr.h-=sr.h);break}}return{w:ft,h:bt,fill:D/(ft*bt)||0}}var Bs=1,Bp=function(D,H){var ne=H.pixelRatio,de=H.version,Ae=H.stretchX,Re=H.stretchY,Ke=H.content;this.paddedRect=D,this.pixelRatio=ne,this.stretchX=Ae,this.stretchY=Re,this.content=Ke,this.version=de},gd={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};gd.tl.get=function(){return[this.paddedRect.x+Bs,this.paddedRect.y+Bs]},gd.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-Bs,this.paddedRect.y+this.paddedRect.h-Bs]},gd.tlbr.get=function(){return this.tl.concat(this.br)},gd.displaySize.get=function(){return[(this.paddedRect.w-Bs*2)/this.pixelRatio,(this.paddedRect.h-Bs*2)/this.pixelRatio]},Object.defineProperties(Bp.prototype,gd);var yd=function(D,H){var ne={},de={};this.haveRenderCallbacks=[];var Ae=[];this.addImages(D,ne,Ae),this.addImages(H,de,Ae);var Re=Ox(Ae),Ke=Re.w,ft=Re.h,bt=new ws({width:Ke||1,height:ft||1});for(var Et in D){var Wt=D[Et],sr=ne[Et].paddedRect;ws.copy(Wt.data,bt,{x:0,y:0},{x:sr.x+Bs,y:sr.y+Bs},Wt.data)}for(var qt in H){var mr=H[qt],Br=de[qt].paddedRect,rn=Br.x+Bs,$r=Br.y+Bs,Mn=mr.data.width,xn=mr.data.height;ws.copy(mr.data,bt,{x:0,y:0},{x:rn,y:$r},mr.data),ws.copy(mr.data,bt,{x:0,y:xn-1},{x:rn,y:$r-1},{width:Mn,height:1}),ws.copy(mr.data,bt,{x:0,y:0},{x:rn,y:$r+xn},{width:Mn,height:1}),ws.copy(mr.data,bt,{x:Mn-1,y:0},{x:rn-1,y:$r},{width:1,height:xn}),ws.copy(mr.data,bt,{x:0,y:0},{x:rn+Mn,y:$r},{width:1,height:xn})}this.image=bt,this.iconPositions=ne,this.patternPositions=de};yd.prototype.addImages=function(D,H,ne){for(var de in D){var Ae=D[de],Re={x:0,y:0,w:Ae.data.width+2*Bs,h:Ae.data.height+2*Bs};ne.push(Re),H[de]=new Bp(Re,Ae),Ae.hasRenderCallback&&this.haveRenderCallbacks.push(de)}},yd.prototype.patchUpdatedImages=function(D,H){D.dispatchRenderCallbacks(this.haveRenderCallbacks);for(var ne in D.updatedImages)this.patchUpdatedImage(this.iconPositions[ne],D.getImage(ne),H),this.patchUpdatedImage(this.patternPositions[ne],D.getImage(ne),H)},yd.prototype.patchUpdatedImage=function(D,H,ne){if(!(!D||!H)&&D.version!==H.version){D.version=H.version;var de=D.tl,Ae=de[0],Re=de[1];ne.update(H.data,void 0,{x:Ae,y:Re})}},fe("ImagePosition",Bp),fe("ImageAtlas",yd);var nl={horizontal:1,vertical:2,horizontalOnly:3},md=-17;function JA(R){for(var D=0,H=R;D<H.length;D+=1){var ne=H[D];if(ne.positionedGlyphs.length!==0)return!1}return!0}var Nx=57344,Bx=63743,ov=function(){this.scale=1,this.fontStack="",this.imageName=null};ov.forText=function(D,H){var ne=new ov;return ne.scale=D||1,ne.fontStack=H,ne},ov.forImage=function(D){var H=new ov;return H.imageName=D,H};var Zo=function(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null};Zo.fromFeature=function(D,H){for(var ne=new Zo,de=0;de<D.sections.length;de++){var Ae=D.sections[de];Ae.image?ne.addImageSection(Ae):ne.addTextSection(Ae,H)}return ne},Zo.prototype.length=function(){return this.text.length},Zo.prototype.getSection=function(D){return this.sections[this.sectionIndex[D]]},Zo.prototype.getSectionIndex=function(D){return this.sectionIndex[D]},Zo.prototype.getCharCode=function(D){return this.text.charCodeAt(D)},Zo.prototype.verticalizePunctuation=function(){this.text=EA(this.text)},Zo.prototype.trim=function(){for(var D=0,H=0;H<this.text.length&&af[this.text.charCodeAt(H)];H++)D++;for(var ne=this.text.length,de=this.text.length-1;de>=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<D.text.length;++de)this.sectionIndex.push(ne)},Zo.prototype.addImageSection=function(D){var H=D.image?D.image.name:"";if(H.length===0){B("Can't add FormattedSection with an empty image.");return}var ne=this.getNextImageSectionCharCode();if(!ne){B("Reached maximum number of images "+(Bx-Nx+2));return}this.text+=String.fromCharCode(ne),this.sections.push(ov.forImage(H)),this.sectionIndex.push(this.sections.length-1)},Zo.prototype.getNextImageSectionCharCode=function(){return this.imageSectionID?this.imageSectionID>=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<Re.length;Ae+=1){var Ke=Re[Ae];H.push(R.substring(de,Ke)),de=Ke}return de<ne.length&&H.push(R.substring(de,ne.length)),H}function Up(R,D,H,ne,de,Ae,Re,Ke,ft,bt,Et,Wt,sr,qt,mr,Br){var rn=Zo.fromFeature(R,de);Wt===nl.vertical&&rn.verticalizePunctuation();var $r,Mn=ei.processBidirectionalText,xn=ei.processStyledBidirectionalText;if(Mn&&rn.sections.length===1){$r=[];for(var An=Mn(rn.toString(),$g(rn,bt,Ae,D,ne,qt,mr)),kn=0,Vn=An;kn<Vn.length;kn+=1){var Qn=Vn[kn],Jn=new Zo;Jn.text=Qn,Jn.sections=rn.sections;for(var Sa=0;Sa<Qn.length;Sa++)Jn.sectionIndex.push(0);$r.push(Jn)}}else if(xn){$r=[];for(var ca=xn(rn.text,rn.sectionIndex,$g(rn,bt,Ae,D,ne,qt,mr)),ya=0,Ba=ca;ya<Ba.length;ya+=1){var Ta=Ba[ya],Aa=new Zo;Aa.text=Ta[0],Aa.sectionIndex=Ta[1],Aa.sections=rn.sections,$r.push(Aa)}}else $r=QA(rn,$g(rn,bt,Ae,D,ne,qt,mr));var Wa=[],za={positionedLines:Wa,text:rn.toString(),top:Et[1],bottom:Et[1],left:Et[0],right:Et[0],writingMode:Wt,iconsInText:!1,verticalizable:!1};return e4(za,D,H,ne,$r,Re,Ke,ft,Wt,bt,sr,Br),JA(Wa)?!1:za}var af={};af[9]=!0,af[10]=!0,af[11]=!0,af[12]=!0,af[13]=!0,af[32]=!0;var Us={};Us[10]=!0,Us[32]=!0,Us[38]=!0,Us[40]=!0,Us[41]=!0,Us[43]=!0,Us[45]=!0,Us[47]=!0,Us[173]=!0,Us[183]=!0,Us[8203]=!0,Us[8208]=!0,Us[8211]=!0,Us[8231]=!0;function Ux(R,D,H,ne,de,Ae){if(D.imageName){var ft=ne[D.imageName];return ft?ft.displaySize[0]*D.scale*Do/Ae+de:0}else{var Re=H[D.fontStack],Ke=Re&&Re[R];return Ke?Ke.metrics.advance*D.scale+de:0}}function $A(R,D,H,ne,de,Ae){for(var Re=0,Ke=0;Ke<R.length();Ke++){var ft=R.getSection(Ke);Re+=Ux(R.getCharCode(Ke),ft,ne,de,D,Ae)}var bt=Math.max(1,Math.ceil(Re/H));return Re/bt}function Vx(R,D,H,ne){var de=Math.pow(R-D,2);return ne?R<D?de/2:de*2:de+Math.abs(H)*H}function qA(R,D,H){var ne=0;return R===10&&(ne-=1e4),H&&(ne+=150),(R===40||R===65288)&&(ne+=50),(D===41||D===65289)&&(ne+=50),ne}function Hx(R,D,H,ne,de,Ae){for(var Re=null,Ke=Vx(D,H,de,Ae),ft=0,bt=ne;ft<bt.length;ft+=1){var Et=bt[ft],Wt=D-Et.x,sr=Vx(Wt,H,de,Ae)+Et.badness;sr<=Ke&&(Re=Et,Ke=sr)}return{index:R,x:D,priorBreak:Re,badness:Ke}}function Gx(R){return R?Gx(R.priorBreak).concat(R.index):[]}function $g(R,D,H,ne,de,Ae,Re){if(Ae!=="point")return[];if(!R)return[];for(var Ke=[],ft=$A(R,D,H,ne,de,Re),bt=R.text.indexOf("")>=0,Et=0,Wt=0;Wt<R.length();Wt++){var sr=R.getSection(Wt),qt=R.getCharCode(Wt);if(af[qt]||(Et+=Ux(qt,sr,ne,de,D,Re)),Wt<R.length()-1){var mr=Lr(qt);(Us[qt]||mr||sr.imageName)&&Ke.push(Hx(Wt+1,Et,ft,Ke,qA(qt,R.getCharCode(Wt+1),mr&&bt),!1))}}return Gx(Hx(R.length(),Et,ft,Ke,0,!0))}function qg(R){var D=.5,H=.5;switch(R){case"right":case"top-right":case"bottom-right":D=1;break;case"left":case"top-left":case"bottom-left":D=0;break}switch(R){case"bottom":case"bottom-right":case"bottom-left":H=1;break;case"top":case"top-right":case"top-left":H=0;break}return{horizontalAlign:D,verticalAlign:H}}function e4(R,D,H,ne,de,Ae,Re,Ke,ft,bt,Et,Wt){for(var sr=0,qt=md,mr=0,Br=0,rn=Ke==="right"?1:Ke==="left"?0:.5,$r=0,Mn=0,xn=de;Mn<xn.length;Mn+=1){var An=xn[Mn];An.trim();var kn=An.getMaxScale(),Vn=(kn-1)*Do,Qn={positionedGlyphs:[],lineOffset:0};R.positionedLines[$r]=Qn;var Jn=Qn.positionedGlyphs,Sa=0;if(!An.length()){qt+=Ae,++$r;continue}for(var ca=0;ca<An.length();ca++){var ya=An.getSection(ca),Ba=An.getSectionIndex(ca),Ta=An.getCharCode(ca),Aa=0,Wa=null,za=null,ti=null,yi=Do,ri=!(ft===nl.horizontal||!Et&&!Sr(Ta)||Et&&(af[Ta]||Dr(Ta)));if(ya.imageName){var Vi=ne[ya.imageName];if(!Vi)continue;ti=ya.imageName,R.iconsInText=R.iconsInText||!0,za=Vi.paddedRect;var Zi=Vi.displaySize;ya.scale=ya.scale*Do/Wt,Wa={width:Zi[0],height:Zi[1],left:Bs,top:-zx,advance:ri?Zi[1]:Zi[0]};var wo=Do-Zi[1]*ya.scale;Aa=Vn+wo,yi=Wa.advance;var so=ri?Zi[0]*ya.scale-Do*kn:Zi[1]*ya.scale-Do*kn;so>0&&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<sr.length;Wt+=1)for(var qt=sr[Wt],mr=0,Br=qt.positionedGlyphs;mr<Br.length;mr+=1){var rn=Br[mr];rn.x+=bt,rn.y+=Et}}function n4(R,D,H){var ne=qg(H),de=ne.horizontalAlign,Ae=ne.verticalAlign,Re=D[0],Ke=D[1],ft=Re-R.displaySize[0]*de,bt=ft+R.displaySize[0],Et=Ke-R.displaySize[1]*Ae,Wt=Et+R.displaySize[1];return{image:R,top:Et,bottom:Wt,left:ft,right:bt}}function Wx(R,D,H,ne,de,Ae){var Re=R.image,Ke;if(Re.content){var ft=Re.content,bt=Re.pixelRatio||1;Ke=[ft[0]/bt,ft[1]/bt,Re.displaySize[0]-ft[2]/bt,Re.displaySize[1]-ft[3]/bt]}var Et=D.left*Ae,Wt=D.right*Ae,sr,qt,mr,Br;H==="width"||H==="both"?(Br=de[0]+Et-ne[3],qt=de[0]+Wt+ne[1]):(Br=de[0]+(Et+Wt-Re.displaySize[0])/2,qt=Br+Re.displaySize[0]);var rn=D.top*Ae,$r=D.bottom*Ae;return H==="height"||H==="both"?(sr=de[1]+rn-ne[0],mr=de[1]+$r+ne[2]):(sr=de[1]+(rn+$r-Re.displaySize[1])/2,mr=sr+Re.displaySize[1]),{image:Re,top:sr,right:qt,bottom:mr,left:Br,collisionPadding:Ke}}var sv=function(R){function D(H,ne,de,Ae){R.call(this,H,ne),this.angle=de,Ae!==void 0&&(this.segment=Ae)}return R&&(D.__proto__=R),D.prototype=Object.create(R&&R.prototype),D.prototype.constructor=D,D.prototype.clone=function(){return new D(this.x,this.y,this.angle,this.segment)},D}(t);fe("Anchor",sv);var Eu=128;function ey(R,D){var H=D.expression;if(H.kind==="constant"){var ne=H.evaluate(new Bn(R+1));return{kind:"constant",layoutSize:ne}}else{if(H.kind==="source")return{kind:"source"};for(var de=H.zoomStops,Ae=H.interpolationType,Re=0;Re<de.length&&de[Re]<=R;)Re++;Re=Math.max(0,Re-1);for(var Ke=Re;Ke<de.length&&de[Ke]<R+1;)Ke++;Ke=Math.min(de.length-1,Ke);var ft=de[Re],bt=de[Ke];if(H.kind==="composite")return{kind:"composite",minZoom:ft,maxZoom:bt,interpolationType:Ae};var Et=H.evaluate(new Bn(ft)),Wt=H.evaluate(new Bn(bt));return{kind:"camera",minZoom:ft,maxZoom:bt,minSize:Et,maxSize:Wt,interpolationType:Ae}}}function Yx(R,D,H){var ne=D.uSize,de=D.uSizeT,Ae=H.lowerSize,Re=H.upperSize;return R.kind==="source"?Ae/Eu:R.kind==="composite"?Fi(Ae/Eu,Re/Eu,de):ne}function Zx(R,D){var H=0,ne=0;if(R.kind==="constant")ne=R.layoutSize;else if(R.kind!=="source"){var de=R.interpolationType,Ae=R.minZoom,Re=R.maxZoom,Ke=de?u(zi.interpolationFactor(de,D,Ae,Re),0,1):0;R.kind==="camera"?ne=Fi(R.minSize,R.maxSize,Ke):H=Ke}return{uSizeT:H,uSize:ne}}var a4=Object.freeze({__proto__:null,getSizeData:ey,evaluateSizeForFeature:Yx,evaluateSizeForZoom:Zx,SIZE_PACK_FACTOR:Eu});function Xx(R,D,H,ne,de){if(D.segment===void 0)return!0;for(var Ae=D,Re=D.segment+1,Ke=0;Ke>-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;Ke<H/2;){var Et=R[Re-1],Wt=R[Re],sr=R[Re+1];if(!sr)return!1;var qt=Et.angleTo(Wt)-Wt.angleTo(sr);for(qt=Math.abs((qt+3*Math.PI)%(Math.PI*2)-Math.PI),ft.push({distance:Ke,angleDelta:qt}),bt+=qt;Ke-ft[0].distance>ne;)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;H<R.length-1;H++)D+=R[H].dist(R[H+1]);return D}function Kx(R,D,H){return R?.6*D*H:0}function Jx(R,D){return Math.max(R?R.right-R.left:0,D?D.right-D.left:0)}function i4(R,D,H,ne,de,Ae){for(var Re=Kx(H,de,Ae),Ke=Jx(H,ne)*Ae,ft=0,bt=jx(R)/2,Et=0;Et<R.length-1;Et++){var Wt=R[Et],sr=R[Et+1],qt=Wt.dist(sr);if(ft+qt>bt){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<D/4&&(D=Wt+D/4);var qt=Ae*2,mr=sr?D/2*Ke%D:(Et/2+qt)*Re*Ke%D;return Qx(R,mr,D,bt,H,Wt,sr,!1,ft)}function Qx(R,D,H,ne,de,Ae,Re,Ke,ft){for(var bt=Ae/2,Et=jx(R),Wt=0,sr=D-H,qt=[],mr=0;mr<R.length-1;mr++){for(var Br=R[mr],rn=R[mr+1],$r=Br.dist(rn),Mn=rn.angleTo(Br);sr+H<Wt+$r;){sr+=H;var xn=(sr-Wt)/$r,An=Fi(Br.x,rn.x,xn),kn=Fi(Br.y,rn.y,xn);if(An>=0&&An<ft&&kn>=0&&kn<ft&&sr-bt>=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<R.length;Re++)for(var Ke=R[Re],ft=void 0,bt=0;bt<Ke.length-1;bt++){var Et=Ke[bt],Wt=Ke[bt+1];Et.x<D&&Wt.x<D||(Et.x<D?Et=new t(D,Et.y+(Wt.y-Et.y)*((D-Et.x)/(Wt.x-Et.x)))._round():Wt.x<D&&(Wt=new t(D,Et.y+(Wt.y-Et.y)*((D-Et.x)/(Wt.x-Et.x)))._round()),!(Et.y<H&&Wt.y<H)&&(Et.y<H?Et=new t(Et.x+(Wt.x-Et.x)*((H-Et.y)/(Wt.y-Et.y)),H)._round():Wt.y<H&&(Wt=new t(Et.x+(Wt.x-Et.x)*((H-Et.y)/(Wt.y-Et.y)),H)._round()),!(Et.x>=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;Aa<Ba.length-1;Aa++)for(var Wa=Ba[Aa],za=Ba[Aa+1],ti=0;ti<Ta.length-1;ti++){var yi=Ta[ti],ri=Ta[ti+1];de.push(ya(Wa,yi,za,ri))}return de}function Vp(R,D,H){for(var ne=0,de=0,Ae=R;de<Ae.length;de+=1){var Re=Ae[de];ne+=Math.max(D,Math.min(H,Re[1]))-Math.max(D,Math.min(H,Re[0]))}return ne}function e2(R,D,H){for(var ne=[{fixed:-lv,stretch:0}],de=0,Ae=R;de<Ae.length;de+=1){var Re=Ae[de],Ke=Re[0],ft=Re[1],bt=ne[ne.length-1];ne.push({fixed:Ke-bt.stretch,stretch:bt.stretch}),ne.push({fixed:Ke-bt.stretch,stretch:bt.stretch+(ft-Ke)})}return ne.push({fixed:D+lv,stretch:H}),ne}function Hp(R,D,H,ne){return R/D*H+ne}function Gp(R,D,H,ne){return R-D*H/ne}function s4(R,D,H,ne,de,Ae,Re,Ke){for(var ft=ne.layout.get("text-rotate").evaluate(Ae,{})*Math.PI/180,bt=[],Et=0,Wt=D.positionedLines;Et<Wt.length;Et+=1)for(var sr=Wt[Et],qt=0,mr=sr.positionedGlyphs;qt<mr.length;qt+=1){var Br=mr[qt];if(Br.rect){var rn=Br.rect||{},$r=1,Mn=zx+$r,xn=!0,An=1,kn=0,Vn=(de||Ke)&&Br.vertical,Qn=Br.metrics.advance*Br.scale/2;if(Ke&&D.verticalizable){var Jn=(Br.scale-1)*Do,Sa=(Do-Br.metrics.width*Br.scale)/2;kn=sr.lineOffset/2-(Br.imageName?-Sa:Jn)}if(Br.imageName){var ca=Re[Br.imageName];xn=ca.sdf,An=ca.pixelRatio,Mn=Bs/An}var ya=de?[Br.x+Qn,Br.y]:[0,0],Ba=de?[0,0]:[Br.x+Qn+H[0],Br.y+H[1]-kn],Ta=[0,0];Vn&&(Ta=Ba,Ba=[0,0]);var Aa=(Br.metrics.left-Mn)*Br.scale-Qn+Ba[0],Wa=(-Br.metrics.top-Mn)*Br.scale+Ba[1],za=Aa+rn.w*Br.scale/An,ti=Wa+rn.h*Br.scale/An,yi=new t(Aa,Wa),ri=new t(za,Wa),ni=new t(Aa,ti),$a=new t(za,ti);if(Vn){var Si=new t(-Qn,Qn-md),Pi=-Math.PI/2,Vi=Do/2-Qn,Zi=Br.imageName?Vi:0,wo=new t(5-md-Vi,-Zi),so=new(Function.prototype.bind.apply(t,[null].concat(Ta)));yi._rotateAround(Pi,Si)._add(wo)._add(so),ri._rotateAround(Pi,Si)._add(wo)._add(so),ni._rotateAround(Pi,Si)._add(wo)._add(so),$a._rotateAround(Pi,Si)._add(wo)._add(so)}if(ft){var Xo=Math.sin(ft),jo=Math.cos(ft),To=[jo,-Xo,Xo,jo];yi._matMult(To),ri._matMult(To),ni._matMult(To),$a._matMult(To)}var as=new t(0,0),is=new t(0,0),po=0,os=0;bt.push({tl:yi,tr:ri,bl:ni,br:$a,tex:rn,writingMode:D.writingMode,glyphOffset:ya,sectionIndex:Br.sectionIndex,isSDF:xn,pixelOffsetTL:as,pixelOffsetBR:is,minFontScaleX:po,minFontScaleY:os})}}return bt}var Wp=function(D,H,ne,de,Ae,Re,Ke,ft,bt,Et){if(this.boxStartIndex=D.length,bt){var Wt=Re.top,sr=Re.bottom,qt=Re.collisionPadding;qt&&(Wt-=qt[1],sr+=qt[3]);var mr=sr-Wt;mr>0&&(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<Ae;){var Ke=(D<<1)+1,ft=ne[Ke],bt=Ke+1;if(bt<this.length&&de(ne[bt],ft)<0&&(Ke=bt,ft=ne[bt]),de(ft,Re)>=0)break;ne[D]=ft,D=Ke}ne[D]=Re};function l4(R,D){return R<D?-1:R>D?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;ft<Ke.length;ft++){var bt=Ke[ft];(!ft||bt.x<ne)&&(ne=bt.x),(!ft||bt.y<de)&&(de=bt.y),(!ft||bt.x>Ae)&&(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<Ae;Br+=sr)for(var rn=de;rn<Re;rn+=sr)mr.push(new fv(Br+qt,rn+qt,qt,R));for(var $r=h4(R),Mn=mr.length;mr.length;){var xn=mr.pop();(xn.d>$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;de<D.length;de++)for(var Ae=D[de],Re=0,Ke=Ae.length,ft=Ke-1;Re<Ke;ft=Re++){var bt=Ae[Re],Et=Ae[ft];bt.y>R.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<Re;Ke=Ae++){var ft=de[Ae],bt=de[Ke],Et=ft.x*bt.y-bt.x*ft.y;H+=(ft.x+bt.x)*Et,ne+=(ft.y+bt.y)*Et,D+=Et*3}return new fv(H/D,ne/D,0,R)}var cv=7,ty=Number.POSITIVE_INFINITY;function t2(R,D){function H(de,Ae){var Re=0,Ke=0;Ae<0&&(Ae=0);var ft=Ae/Math.sqrt(2);switch(de){case"top-right":case"top-left":Ke=ft-cv;break;case"bottom-right":case"bottom-left":Ke=-ft+cv;break;case"bottom":Ke=-Ae+cv;break;case"top":Ke=Ae-cv;break}switch(de){case"top-right":case"bottom-right":Re=-ft;break;case"top-left":case"bottom-left":Re=ft;break;case"left":Re=Ae;break;case"right":Re=-Ae;break}return[Re,Ke]}function ne(de,Ae,Re){var Ke=0,ft=0;switch(Ae=Math.abs(Ae),Re=Math.abs(Re),de){case"top-right":case"top-left":case"top":ft=Re-cv;break;case"bottom-right":case"bottom-left":case"bottom":ft=-Re+cv;break}switch(de){case"top-right":case"bottom-right":case"right":Ke=-Ae;break;case"top-left":case"bottom-left":case"left":Ke=Ae;break}return[Ke,ft]}return D[1]!==ty?ne(R,D[0],D[1]):H(R,D[0])}function v4(R,D,H,ne,de,Ae,Re){R.createArrays();var Ke=512*R.overscaling;R.tilePixelRatio=La/Ke,R.compareText={},R.iconsNeedLinear=!1;var ft=R.layers[0].layout,bt=R.layers[0]._unevaluatedLayout._values,Et={};if(R.textSizeData.kind==="composite"){var Wt=R.textSizeData,sr=Wt.minZoom,qt=Wt.maxZoom;Et.compositeTextSizes=[bt["text-size"].possiblyEvaluate(new Bn(sr),Re),bt["text-size"].possiblyEvaluate(new Bn(qt),Re)]}if(R.iconSizeData.kind==="composite"){var mr=R.iconSizeData,Br=mr.minZoom,rn=mr.maxZoom;Et.compositeIconSizes=[bt["icon-size"].possiblyEvaluate(new Bn(Br),Re),bt["icon-size"].possiblyEvaluate(new Bn(rn),Re)]}Et.layoutTextSize=bt["text-size"].possiblyEvaluate(new Bn(R.zoom+1),Re),Et.layoutIconSize=bt["icon-size"].possiblyEvaluate(new Bn(R.zoom+1),Re),Et.textMaxSize=bt["text-size"].possiblyEvaluate(new Bn(18));for(var $r=ft.get("text-line-height")*Do,Mn=ft.get("text-rotation-alignment")==="map"&&ft.get("symbol-placement")!=="point",xn=ft.get("text-keep-upright"),An=ft.get("text-size"),kn=function(){var Jn=Qn[Vn],Sa=ft.get("text-font").evaluate(Jn,{},Re).join(","),ca=An.evaluate(Jn,{},Re),ya=Et.layoutTextSize.evaluate(Jn,{},Re),Ba=Et.layoutIconSize.evaluate(Jn,{},Re),Ta={horizontal:{},vertical:void 0},Aa=Jn.text,Wa=[0,0];if(Aa){var za=Aa.toString(),ti=ft.get("text-letter-spacing").evaluate(Jn,{},Re)*Do,yi=er(za)?ti:0,ri=ft.get("text-anchor").evaluate(Jn,{},Re),ni=ft.get("text-variable-anchor");if(!ni){var $a=ft.get("text-radial-offset").evaluate(Jn,{},Re);$a?Wa=t2(ri,[$a*Do,ty]):Wa=ft.get("text-offset").evaluate(Jn,{},Re).map(function(Uf){return Uf*Do})}var Si=Mn?"center":ft.get("text-justify").evaluate(Jn,{},Re),Pi=ft.get("symbol-placement"),Vi=Pi==="point"?ft.get("text-max-width").evaluate(Jn,{},Re)*Do:0,Zi=function(){R.allowVerticalPlacement&&Ut(za)&&(Ta.vertical=Up(Aa,D,H,de,Sa,Vi,$r,ri,"left",yi,Wa,nl.vertical,!0,Pi,ya,ca))};if(!Mn&&ni){for(var wo=Si==="auto"?ni.map(function(Uf){return ry(Uf)}):[Si],so=!1,Xo=0;Xo<wo.length;Xo++){var jo=wo[Xo];if(!Ta.horizontal[jo])if(so)Ta.horizontal[jo]=Ta.horizontal[0];else{var To=Up(Aa,D,H,de,Sa,Vi,$r,"center",jo,yi,Wa,nl.horizontal,!1,Pi,ya,ca);To&&(Ta.horizontal[jo]=To,so=To.positionedLines.length===1)}}Zi()}else{Si==="auto"&&(Si=ry(ri));var as=Up(Aa,D,H,de,Sa,Vi,$r,ri,Si,yi,Wa,nl.horizontal,!1,Pi,ya,ca);as&&(Ta.horizontal[Si]=as),Zi(),Ut(za)&&Mn&&xn&&(Ta.vertical=Up(Aa,D,H,de,Sa,Vi,$r,ri,Si,yi,Wa,nl.vertical,!1,Pi,ya,ca))}}var is=void 0,po=!1;if(Jn.icon&&Jn.icon.name){var os=ne[Jn.icon.name];os&&(is=n4(de[Jn.icon.name],ft.get("icon-offset").evaluate(Jn,{},Re),ft.get("icon-anchor").evaluate(Jn,{},Re)),po=os.sdf,R.sdfIcons===void 0?R.sdfIcons=os.sdf:R.sdfIcons!==os.sdf&&B("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(os.pixelRatio!==R.pixelRatio||ft.get("icon-rotate").constantOr(1)!==0)&&(R.iconsNeedLinear=!0))}var al=n2(Ta.horizontal)||Ta.vertical;R.iconsInText=al?al.iconsInText:!1,(al||is)&&d4(R,Jn,Ta,is,ne,Et,ya,Ba,Wa,po,Re)},Vn=0,Qn=R.features;Vn<Qn.length;Vn+=1)kn();Ae&&R.generateCollisionDebugBuffers()}function ry(R){switch(R){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function d4(R,D,H,ne,de,Ae,Re,Ke,ft,bt,Et){var Wt=Ae.textMaxSize.evaluate(D,{});Wt===void 0&&(Wt=Re);var sr=R.layers[0].layout,qt=sr.get("icon-offset").evaluate(D,{},Et),mr=n2(H.horizontal),Br=24,rn=Re/Br,$r=R.tilePixelRatio*rn,Mn=R.tilePixelRatio*Wt/Br,xn=R.tilePixelRatio*Ke,An=R.tilePixelRatio*sr.get("symbol-spacing"),kn=sr.get("text-padding")*R.tilePixelRatio,Vn=sr.get("icon-padding")*R.tilePixelRatio,Qn=sr.get("text-max-angle")/180*Math.PI,Jn=sr.get("text-rotation-alignment")==="map"&&sr.get("symbol-placement")!=="point",Sa=sr.get("icon-rotation-alignment")==="map"&&sr.get("symbol-placement")!=="point",ca=sr.get("symbol-placement"),ya=An/2,Ba=sr.get("icon-text-fit"),Ta;ne&&Ba!=="none"&&(R.allowVerticalPlacement&&H.vertical&&(Ta=Wx(ne,H.vertical,Ba,sr.get("icon-text-fit-padding"),qt,rn)),mr&&(ne=Wx(ne,mr,Ba,sr.get("icon-text-fit-padding"),qt,rn)));var Aa=function(gv,Jl){Jl.x<0||Jl.x>=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);Wa<za.length;Wa+=1)for(var ti=za[Wa],yi=o4(ti,An,Qn,H.vertical||mr,ne,Br,Mn,R.overscaling,La),ri=0,ni=yi;ri<ni.length;ri+=1){var $a=ni[ri],Si=mr;(!Si||!g4(R,Si.text,ya,$a))&&Aa(ti,$a)}else if(ca==="line-center")for(var Pi=0,Vi=D.geometry;Pi<Vi.length;Pi+=1){var Zi=Vi[Pi];if(Zi.length>1){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);so<Xo.length;so+=1){var jo=Xo[so],To=u4(jo,16);Aa(jo[0],new sv(To.x,To.y,0))}else if(D.type==="LineString")for(var as=0,is=D.geometry;as<is.length;as+=1){var po=is[as];Aa(po,new sv(po[0].x,po[0].y,0))}else if(D.type==="Point")for(var os=0,al=D.geometry;os<al.length;os+=1)for(var Uf=al[os],Cc=0,Lc=Uf;Cc<Lc.length;Cc+=1){var Pc=Lc[Cc];Aa([Pc],new sv(Pc.x,Pc.y,0))}}var xd=255,Sc=xd*Eu;function r2(R,D,H,ne,de,Ae,Re,Ke,ft,bt,Et,Wt,sr,qt,mr){var Br=s4(D,H,Ke,de,Ae,Re,ne,R.allowVerticalPlacement),rn=R.textSizeData,$r=null;rn.kind==="source"?($r=[Eu*de.layout.get("text-size").evaluate(Re,{})],$r[0]>Sc&&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;Mn<xn.length;Mn+=1){var An=xn[Mn];Wt[An]=R.text.placedSymbolArray.length-1}return Br.length*4}function n2(R){for(var D in R)return R[D];return null}function p4(R,D,H,ne,de,Ae,Re,Ke,ft,bt,Et,Wt,sr,qt,mr,Br,rn,$r,Mn,xn,An,kn,Vn,Qn,Jn){var Sa,ca=R.addToLineVertexArray(D,H),ya,Ba,Ta,Aa,Wa=0,za=0,ti=0,yi=0,ri=-1,ni=-1,$a={},Si=Ze(""),Pi=0,Vi=0;if(Ke._unevaluatedLayout.getValue("text-radial-offset")===void 0?(Sa=Ke.layout.get("text-offset").evaluate(An,{},Qn).map(function(Td){return Td*Do}),Pi=Sa[0],Vi=Sa[1]):(Pi=Ke.layout.get("text-radial-offset").evaluate(An,{},Qn)*Do,Vi=ty),R.allowVerticalPlacement&&ne.vertical){var Zi=Ke.layout.get("text-rotate").evaluate(An,{},Qn),wo=Zi+90,so=ne.vertical;Ta=new Wp(ft,D,bt,Et,Wt,so,sr,qt,mr,wo),Re&&(Aa=new Wp(ft,D,bt,Et,Wt,Re,rn,$r,mr,wo))}if(de){var Xo=Ke.layout.get("icon-rotate").evaluate(An,{}),jo=Ke.layout.get("icon-text-fit")!=="none",To=qx(de,Xo,Vn,jo),as=Re?qx(Re,Xo,Vn,jo):void 0;Ba=new Wp(ft,D,bt,Et,Wt,de,rn,$r,!1,Xo),Wa=To.length*4;var is=R.iconSizeData,po=null;is.kind==="source"?(po=[Eu*Ke.layout.get("icon-size").evaluate(An,{})],po[0]>Sc&&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])<H)return!0;return de[D].push(ne),!1}var y4=nv.VectorTileFeature.types,m4=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function Yp(R,D,H,ne,de,Ae,Re,Ke,ft,bt,Et,Wt,sr){var qt=Ke?Math.min(Sc,Math.round(Ke[0])):0,mr=Ke?Math.min(Sc,Math.round(Ke[1])):0;R.emplaceBack(D,H,Math.round(ne*32),Math.round(de*32),Ae,Re,(qt<<1)+(ft?1:0),mr,bt*16,Et*16,Wt*256,sr*256)}function ny(R,D,H){R.emplaceBack(D.x,D.y,H),R.emplaceBack(D.x,D.y,H),R.emplaceBack(D.x,D.y,H),R.emplaceBack(D.x,D.y,H)}function x4(R){for(var D=0,H=R.sections;D<H.length;D+=1){var ne=H[D];if(tn(ne.text))return!0}return!1}var hv=function(D){this.layoutVertexArray=new qu,this.indexArray=new Tu,this.programConfigurations=D,this.segments=new X,this.dynamicLayoutVertexArray=new td,this.opacityVertexArray=new rd,this.placedSymbolArray=new wc};hv.prototype.isEmpty=function(){return this.layoutVertexArray.length===0&&this.indexArray.length===0&&this.dynamicLayoutVertexArray.length===0&&this.opacityVertexArray.length===0},hv.prototype.upload=function(D,H,ne,de){this.isEmpty()||(ne&&(this.layoutVertexBuffer=D.createVertexBuffer(this.layoutVertexArray,Kg.members),this.indexBuffer=D.createIndexBuffer(this.indexArray,H),this.dynamicLayoutVertexBuffer=D.createVertexBuffer(this.dynamicLayoutVertexArray,bA.members,!0),this.opacityVertexBuffer=D.createVertexBuffer(this.opacityVertexArray,m4,!0),this.opacityVertexBuffer.itemSize=1),(ne||de)&&this.programConfigurations.upload(D))},hv.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())},fe("SymbolBuffers",hv);var bd=function(D,H,ne){this.layoutVertexArray=new D,this.layoutAttributes=H,this.indexArray=new ne,this.segments=new X,this.collisionVertexArray=new ms};bd.prototype.upload=function(D){this.layoutVertexBuffer=D.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=D.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=D.createVertexBuffer(this.collisionVertexArray,wA.members,!0)},bd.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())},fe("CollisionBuffers",bd);var gi=function(D){this.collisionBoxArray=D.collisionBoxArray,this.zoom=D.zoom,this.overscaling=D.overscaling,this.layers=D.layers,this.layerIds=this.layers.map(function(ft){return ft.id}),this.index=D.index,this.pixelRatio=D.pixelRatio,this.sourceLayerIndex=D.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=$h([]),this.placementViewportMatrix=$h([]);var H=this.layers[0],ne=H._unevaluatedLayout._values;this.textSizeData=ey(this.zoom,ne["text-size"]),this.iconSizeData=ey(this.zoom,ne["icon-size"]);var de=this.layers[0].layout,Ae=de.get("symbol-sort-key"),Re=de.get("symbol-z-order");this.sortFeaturesByKey=Re!=="viewport-y"&&Ae.constantOr(1)!==void 0;var Ke=Re==="viewport-y"||Re==="auto"&&!this.sortFeaturesByKey;this.sortFeaturesByY=Ke&&(de.get("text-allow-overlap")||de.get("icon-allow-overlap")||de.get("text-ignore-placement")||de.get("icon-ignore-placement")),de.get("symbol-placement")==="point"&&(this.writingModes=de.get("text-writing-mode").map(function(ft){return nl[ft]})),this.stateDependentLayerIds=this.layers.filter(function(ft){return ft.isStateDependent()}).map(function(ft){return ft.id}),this.sourceID=D.sourceID};gi.prototype.createArrays=function(){this.text=new hv(new Va(Kg.members,this.layers,this.zoom,function(D){return/^text/.test(D)})),this.icon=new hv(new Va(Kg.members,this.layers,this.zoom,function(D){return/^icon/.test(D)})),this.glyphOffsetArray=new Ml,this.lineVertexArray=new Cp,this.symbolInstances=new Ep},gi.prototype.calculateGlyphDependencies=function(D,H,ne,de,Ae){for(var Re=0;Re<D.length;Re++)if(H[D.charCodeAt(Re)]=!0,(ne||de)&&Ae){var Ke=pd[D.charAt(Re)];Ke&&(H[Ke.charCodeAt(0)]=!0)}},gi.prototype.populate=function(D,H,ne){var de=this.layers[0],Ae=de.layout,Re=Ae.get("text-font"),Ke=Ae.get("text-field"),ft=Ae.get("icon-image"),bt=(Ke.value.kind!=="constant"||Ke.value.value instanceof Ji&&!Ke.value.value.isEmpty()||Ke.value.value.toString().length>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<ri.length;yi+=1){var ni=ri[yi];if(ni.image)sr[ni.image.name]=!0;else{var $a=Ut(Sa.toString()),Si=ni.fontStack||za,Pi=qt[Si]=qt[Si]||{};this.calculateGlyphDependencies(ni.text,Pi,ti,this.allowVerticalPlacement,$a)}}}}}}Ae.get("symbol-placement")==="line"&&(this.features=SA(this.features)),this.sortFeaturesByKey&&this.features.sort(function(Vi,Zi){return Vi.sortKey-Zi.sortKey})}},gi.prototype.update=function(D,H,ne){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(D,H,this.layers,ne),this.icon.programConfigurations.updatePaintArrays(D,H,this.layers,ne))},gi.prototype.isEmpty=function(){return this.symbolInstances.length===0&&!this.hasRTLText},gi.prototype.uploadPending=function(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload},gi.prototype.upload=function(D){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(D),this.iconCollisionBox.upload(D)),this.text.upload(D,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(D,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0},gi.prototype.destroyDebugData=function(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()},gi.prototype.destroy=function(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()},gi.prototype.addToLineVertexArray=function(D,H){var ne=this.lineVertexArray.length;if(D.segment!==void 0){for(var de=D.dist(H[D.segment+1]),Ae=D.dist(H[D.segment]),Re={},Ke=D.segment+1;Ke<H.length;Ke++)Re[Ke]={x:H[Ke].x,y:H[Ke].y,tileUnitDistanceFromAnchor:de},Ke<H.length-1&&(de+=H[Ke+1].dist(H[Ke]));for(var ft=D.segment||0;ft>=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;bt<H.length;bt++){var Et=Re[bt];this.lineVertexArray.emplaceBack(Et.x,Et.y,Et.tileUnitDistanceFromAnchor)}}return{lineStartIndex:ne,lineLength:this.lineVertexArray.length-ne}},gi.prototype.addSymbols=function(D,H,ne,de,Ae,Re,Ke,ft,bt,Et,Wt,sr){for(var qt=D.indexArray,mr=D.layoutVertexArray,Br=D.segments.prepareSegment(4*H.length,mr,qt,Re.sortKey),rn=this.glyphOffsetArray.length,$r=Br.vertexLength,Mn=this.allowVerticalPlacement&&Ke===nl.vertical?Math.PI/2:0,xn=Re.text&&Re.text.sections,An=0;An<H.length;An++){var kn=H[An],Vn=kn.tl,Qn=kn.tr,Jn=kn.bl,Sa=kn.br,ca=kn.tex,ya=kn.pixelOffsetTL,Ba=kn.pixelOffsetBR,Ta=kn.minFontScaleX,Aa=kn.minFontScaleY,Wa=kn.glyphOffset,za=kn.isSDF,ti=kn.sectionIndex,yi=Br.vertexLength,ri=Wa[1];Yp(mr,ft.x,ft.y,Vn.x,ri+Vn.y,ca.x,ca.y,ne,za,ya.x,ya.y,Ta,Aa),Yp(mr,ft.x,ft.y,Qn.x,ri+Qn.y,ca.x+ca.w,ca.y,ne,za,Ba.x,ya.y,Ta,Aa),Yp(mr,ft.x,ft.y,Jn.x,ri+Jn.y,ca.x,ca.y+ca.h,ne,za,ya.x,Ba.y,Ta,Aa),Yp(mr,ft.x,ft.y,Sa.x,ri+Sa.y,ca.x+ca.w,ca.y+ca.h,ne,za,Ba.x,Ba.y,Ta,Aa),ny(D.dynamicLayoutVertexArray,ft,Mn),qt.emplaceBack(yi,yi+1,yi+2),qt.emplaceBack(yi+1,yi+2,yi+3),Br.vertexLength+=4,Br.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(Wa[0]),(An===H.length-1||ti!==H[An+1].sectionIndex)&&D.programConfigurations.populatePaintArrays(mr.length,Re,Re.index,{},sr,xn&&xn[ti])}D.placedSymbolArray.emplaceBack(ft.x,ft.y,rn,this.glyphOffsetArray.length-rn,$r,bt,Et,ft.segment,ne?ne[0]:0,ne?ne[1]:0,de[0],de[1],Ke,0,!1,0,Wt)},gi.prototype._addCollisionDebugVertex=function(D,H,ne,de,Ae,Re){return H.emplaceBack(0,0),D.emplaceBack(ne.x,ne.y,de,Ae,Math.round(Re.x),Math.round(Re.y))},gi.prototype.addCollisionDebugVertices=function(D,H,ne,de,Ae,Re,Ke){var ft=Ae.segments.prepareSegment(4,Ae.layoutVertexArray,Ae.indexArray),bt=ft.vertexLength,Et=Ae.layoutVertexArray,Wt=Ae.collisionVertexArray,sr=Ke.anchorX,qt=Ke.anchorY;this._addCollisionDebugVertex(Et,Wt,Re,sr,qt,new t(D,H)),this._addCollisionDebugVertex(Et,Wt,Re,sr,qt,new t(ne,H)),this._addCollisionDebugVertex(Et,Wt,Re,sr,qt,new t(ne,de)),this._addCollisionDebugVertex(Et,Wt,Re,sr,qt,new t(D,de)),ft.vertexLength+=4;var mr=Ae.indexArray;mr.emplaceBack(bt,bt+1),mr.emplaceBack(bt+1,bt+2),mr.emplaceBack(bt+2,bt+3),mr.emplaceBack(bt+3,bt),ft.primitiveLength+=4},gi.prototype.addDebugCollisionBoxes=function(D,H,ne,de){for(var Ae=D;Ae<H;Ae++){var Re=this.collisionBoxArray.get(Ae),Ke=Re.x1,ft=Re.y1,bt=Re.x2,Et=Re.y2;this.addCollisionDebugVertices(Ke,ft,bt,Et,de?this.textCollisionBox:this.iconCollisionBox,Re.anchorPoint,ne)}},gi.prototype.generateCollisionDebugBuffers=function(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new bd(Xh,Dx.members,Th),this.iconCollisionBox=new bd(Xh,Dx.members,Th);for(var D=0;D<this.symbolInstances.length;D++){var H=this.symbolInstances.get(D);this.addDebugCollisionBoxes(H.textBoxStartIndex,H.textBoxEndIndex,H,!0),this.addDebugCollisionBoxes(H.verticalTextBoxStartIndex,H.verticalTextBoxEndIndex,H,!0),this.addDebugCollisionBoxes(H.iconBoxStartIndex,H.iconBoxEndIndex,H,!1),this.addDebugCollisionBoxes(H.verticalIconBoxStartIndex,H.verticalIconBoxEndIndex,H,!1)}},gi.prototype._deserializeCollisionBoxesForSymbol=function(D,H,ne,de,Ae,Re,Ke,ft,bt){for(var Et={},Wt=H;Wt<ne;Wt++){var sr=D.get(Wt);Et.textBox={x1:sr.x1,y1:sr.y1,x2:sr.x2,y2:sr.y2,anchorPointX:sr.anchorPointX,anchorPointY:sr.anchorPointY},Et.textFeatureIndex=sr.featureIndex;break}for(var qt=de;qt<Ae;qt++){var mr=D.get(qt);Et.verticalTextBox={x1:mr.x1,y1:mr.y1,x2:mr.x2,y2:mr.y2,anchorPointX:mr.anchorPointX,anchorPointY:mr.anchorPointY},Et.verticalTextFeatureIndex=mr.featureIndex;break}for(var Br=Re;Br<Ke;Br++){var rn=D.get(Br);Et.iconBox={x1:rn.x1,y1:rn.y1,x2:rn.x2,y2:rn.y2,anchorPointX:rn.anchorPointX,anchorPointY:rn.anchorPointY},Et.iconFeatureIndex=rn.featureIndex;break}for(var $r=ft;$r<bt;$r++){var Mn=D.get($r);Et.verticalIconBox={x1:Mn.x1,y1:Mn.y1,x2:Mn.x2,y2:Mn.y2,anchorPointX:Mn.anchorPointX,anchorPointY:Mn.anchorPointY},Et.verticalIconFeatureIndex=Mn.featureIndex;break}return Et},gi.prototype.deserializeCollisionBoxes=function(D){this.collisionArrays=[];for(var H=0;H<this.symbolInstances.length;H++){var ne=this.symbolInstances.get(H);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(D,ne.textBoxStartIndex,ne.textBoxEndIndex,ne.verticalTextBoxStartIndex,ne.verticalTextBoxEndIndex,ne.iconBoxStartIndex,ne.iconBoxEndIndex,ne.verticalIconBoxStartIndex,ne.verticalIconBoxEndIndex))}},gi.prototype.hasTextData=function(){return this.text.segments.get().length>0},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;Ae<de;Ae+=4)D.indexArray.emplaceBack(Ae,Ae+1,Ae+2),D.indexArray.emplaceBack(Ae+1,Ae+2,Ae+3)},gi.prototype.getSortedSymbolIndexes=function(D){if(this.sortedAngle===D&&this.symbolInstanceIndexes!==void 0)return this.symbolInstanceIndexes;for(var H=Math.sin(D),ne=Math.cos(D),de=[],Ae=[],Re=[],Ke=0;Ke<this.symbolInstances.length;++Ke){Re.push(Ke);var ft=this.symbolInstances.get(Ke);de.push(Math.round(H*ft.anchorX+ne*ft.anchorY)|0),Ae.push(ft.featureIndex)}return Re.sort(function(bt,Et){return de[bt]-de[Et]||Ae[Et]-Ae[bt]}),Re},gi.prototype.addToSortKeyRanges=function(D,H){var ne=this.sortKeyRanges[this.sortKeyRanges.length-1];ne&&ne.sortKey===H?ne.symbolInstanceEnd=D+1:this.sortKeyRanges.push({sortKey:H,symbolInstanceStart:D,symbolInstanceEnd:D+1})},gi.prototype.sortFeatures=function(D){var H=this;if(this.sortFeaturesByY&&this.sortedAngle!==D&&!(this.text.segments.get().length>1||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<de.length;ne+=1){var Ae=de[ne],Re=this.symbolInstances.get(Ae);this.featureSortOrder.push(Re.featureIndex),[Re.rightJustifiedTextSymbolIndex,Re.centerJustifiedTextSymbolIndex,Re.leftJustifiedTextSymbolIndex].forEach(function(Ke,ft,bt){Ke>=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<ft.length;Ke+=1){var bt=ft[Ke];Re.indexOf(bt)<0&&Re.push(bt)}this.layout._values["text-writing-mode"]=Re}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()},D.prototype.getValueAndResolveTokens=function(ne,de,Ae,Re){var Ke=this.layout.get(ne).evaluate(de,{},Ae,Re),ft=this._unevaluatedLayout._values[ne];return!ft.isDataDriven()&&!$s(ft.value)&&Ke?b4(de.properties,Ke):Ke},D.prototype.createBucket=function(ne){return new gi(ne)},D.prototype.queryRadius=function(){return 0},D.prototype.queryIntersectsFeature=function(){return!1},D.prototype._setPaintOverrides=function(){for(var ne=0,de=ay.paint.overridableProperties;ne<de.length;ne+=1){var Ae=de[ne];if(D.hasPaintOverride(this.layout,Ae)){var Re=this.paint.get(Ae),Ke=new vv(Re),ft=new zs(Ke,Re.property.specification),bt=null;Re.value.kind==="constant"||Re.value.kind==="source"?bt=new wl("source",ft):bt=new Po("composite",ft,Re.value.zoomStops,Re.value._interpolationType),this.paint._values[Ae]=new xi(Re.property,bt,Re.parameters)}}},D.prototype._handleOverridablePaintPropertyUpdate=function(ne,de,Ae){return!this.layout||de.isDataDriven()||Ae.isDataDriven()?!1:D.hasPaintOverride(this.layout,ne)},D.hasPaintOverride=function(ne,de){var Ae=ne.get("text-field"),Re=ay.paint.properties[de],Ke=!1,ft=function(Wt){for(var sr=0,qt=Wt;sr<qt.length;sr+=1){var mr=qt[sr];if(Re.overrides&&Re.overrides.hasOverride(mr)){Ke=!0;return}}};if(Ae.value.kind==="constant"&&Ae.value.value instanceof Ji)ft(Ae.value.value.sections);else if(Ae.value.kind==="source"){var bt=function(Wt){if(!Ke)if(Wt instanceof ko&&Ri(Wt.value)===la){var sr=Wt.value;ft(sr.sections)}else Wt instanceof Vo?ft(Wt.sections):Wt.eachChild(bt)},Et=Ae.value;Et._styleExpression&&bt(Et._styleExpression.expression)}return Ke},D}(Ci),M4=new $i({"background-color":new ga(Xt.paint_background["background-color"]),"background-pattern":new Ni(Xt.paint_background["background-pattern"]),"background-opacity":new ga(Xt.paint_background["background-opacity"])}),S4={paint:M4},E4=function(R){function D(H){R.call(this,H,S4)}return R&&(D.__proto__=R),D.prototype=Object.create(R&&R.prototype),D.prototype.constructor=D,D}(Ci),C4=new $i({"raster-opacity":new ga(Xt.paint_raster["raster-opacity"]),"raster-hue-rotate":new ga(Xt.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new ga(Xt.paint_raster["raster-brightness-min"]),"raster-brightness-max":new ga(Xt.paint_raster["raster-brightness-max"]),"raster-saturation":new ga(Xt.paint_raster["raster-saturation"]),"raster-contrast":new ga(Xt.paint_raster["raster-contrast"]),"raster-resampling":new ga(Xt.paint_raster["raster-resampling"]),"raster-fade-duration":new ga(Xt.paint_raster["raster-fade-duration"])}),L4={paint:C4},P4=function(R){function D(H){R.call(this,H,L4)}return R&&(D.__proto__=R),D.prototype=Object.create(R&&R.prototype),D.prototype.constructor=D,D}(Ci);function R4(R){var D=[],H=R.id;return H===void 0&&D.push({message:"layers."+H+': missing required property "id"'}),R.render===void 0&&D.push({message:"layers."+H+': missing required method "render"'}),R.renderingMode&&R.renderingMode!=="2d"&&R.renderingMode!=="3d"&&D.push({message:"layers."+H+': property "renderingMode" must be either "2d" or "3d"'}),D}var D4=function(R){function D(H){R.call(this,H,{}),this.implementation=H}return R&&(D.__proto__=R),D.prototype=Object.create(R&&R.prototype),D.prototype.constructor=D,D.prototype.is3D=function(){return this.implementation.renderingMode==="3d"},D.prototype.hasOffscreenPass=function(){return this.implementation.prerender!==void 0},D.prototype.recalculate=function(){},D.prototype.updateTransitions=function(){},D.prototype.hasTransition=function(){},D.prototype.serialize=function(){},D.prototype.onAdd=function(ne){this.implementation.onAdd&&this.implementation.onAdd(ne,ne.painter.context.gl)},D.prototype.onRemove=function(ne){this.implementation.onRemove&&this.implementation.onRemove(ne,ne.painter.context.gl)},D}(Ci),I4={circle:s5,heatmap:c5,hillshade:d5,fill:B5,"fill-extrusion":iA,line:mA,symbol:A4,background:E4,raster:P4};function k4(R){return R.type==="custom"?new D4(R):new I4[R.type](R)}var a2=self.HTMLImageElement,i2=self.HTMLCanvasElement,o2=self.HTMLVideoElement,s2=self.ImageData,Zp=self.ImageBitmap,Ch=function(D,H,ne,de){this.context=D,this.format=ne,this.texture=D.gl.createTexture(),this.update(H,de)};Ch.prototype.update=function(D,H,ne){var de=D.width,Ae=D.height,Re=(!this.size||this.size[0]!==de||this.size[1]!==Ae)&&!ne,Ke=this,ft=Ke.context,bt=ft.gl;if(this.useMipmap=!!(H&&H.useMipmap),bt.bindTexture(bt.TEXTURE_2D,this.texture),ft.pixelStoreUnpackFlipY.set(!1),ft.pixelStoreUnpack.set(1),ft.pixelStoreUnpackPremultiplyAlpha.set(this.format===bt.RGBA&&(!H||H.premultiply!==!1)),Re)this.size=[de,Ae],D instanceof a2||D instanceof i2||D instanceof o2||D instanceof s2||Zp&&D instanceof Zp?bt.texImage2D(bt.TEXTURE_2D,0,this.format,this.format,bt.UNSIGNED_BYTE,D):bt.texImage2D(bt.TEXTURE_2D,0,this.format,de,Ae,0,this.format,bt.UNSIGNED_BYTE,D.data);else{var Et=ne||{x:0,y:0},Wt=Et.x,sr=Et.y;D instanceof a2||D instanceof i2||D instanceof o2||D instanceof s2||Zp&&D instanceof Zp?bt.texSubImage2D(bt.TEXTURE_2D,0,Wt,sr,bt.RGBA,bt.UNSIGNED_BYTE,D):bt.texSubImage2D(bt.TEXTURE_2D,0,Wt,sr,de,Ae,bt.RGBA,bt.UNSIGNED_BYTE,D.data)}this.useMipmap&&this.isSizePowerOfTwo()&&bt.generateMipmap(bt.TEXTURE_2D)},Ch.prototype.bind=function(D,H,ne){var de=this,Ae=de.context,Re=Ae.gl;Re.bindTexture(Re.TEXTURE_2D,this.texture),ne===Re.LINEAR_MIPMAP_NEAREST&&!this.isSizePowerOfTwo()&&(ne=Re.LINEAR),D!==this.filter&&(Re.texParameteri(Re.TEXTURE_2D,Re.TEXTURE_MAG_FILTER,D),Re.texParameteri(Re.TEXTURE_2D,Re.TEXTURE_MIN_FILTER,ne||D),this.filter=D),H!==this.wrap&&(Re.texParameteri(Re.TEXTURE_2D,Re.TEXTURE_WRAP_S,H),Re.texParameteri(Re.TEXTURE_2D,Re.TEXTURE_WRAP_T,H),this.wrap=H)},Ch.prototype.isSizePowerOfTwo=function(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1===0},Ch.prototype.destroy=function(){var D=this.context,H=D.gl;H.deleteTexture(this.texture),this.texture=null};var iy=function(D){var H=this;this._callback=D,this._triggered=!1,typeof MessageChannel<"u"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=function(){H._triggered=!1,H._callback()})};iy.prototype.trigger=function(){var D=this;this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(function(){D._triggered=!1,D._callback()},0))},iy.prototype.remove=function(){delete this._channel,this._callback=function(){}};var dv=function(D,H,ne){this.target=D,this.parent=H,this.mapId=ne,this.callbacks={},this.tasks={},this.taskQueue=[],this.cancelCallbacks={},S(["receive","process"],this),this.invoker=new iy(this.process),this.target.addEventListener("message",this.receive,!1),this.globalScope=_()?D:self};dv.prototype.send=function(D,H,ne,de,Ae){var Re=this;Ae===void 0&&(Ae=!1);var Ke=Math.round(Math.random()*1e18).toString(36).substring(0,10);ne&&(this.callbacks[Ke]=ne);var ft=J(this.globalScope)?void 0:[];return this.target.postMessage({id:Ke,type:D,hasCallback:!!ne,targetMapId:de,mustQueue:Ae,sourceMapId:this.mapId,data:tt(H,ft)},ft),{cancel:function(){ne&&delete Re.callbacks[Ke],Re.target.postMessage({id:Ke,type:"<cancel>",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==="<cancel>"){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==="<response>"){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:"<response>",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: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")};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<this.overscaledZ&&D.canonical.x===this.canonical.x>>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.wrap<D.wrap?!0:this.wrap>D.wrap?!1:this.overscaledZ<D.overscaledZ?!0:this.overscaledZ>D.overscaledZ?!1:this.canonical.x<D.canonical.x?!0:this.canonical.x>D.canonical.x?!1:this.canonical.y<D.canonical.y},oo.prototype.wrapped=function(){return new oo(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)},oo.prototype.unwrapTo=function(D){return new oo(this.overscaledZ,D,this.canonical.z,this.canonical.x,this.canonical.y)},oo.prototype.overscaleFactor=function(){return Math.pow(2,this.overscaledZ-this.canonical.z)},oo.prototype.toUnwrapped=function(){return new p2(this.wrap,this.canonical)},oo.prototype.toString=function(){return this.overscaledZ+"/"+this.canonical.x+"/"+this.canonical.y},oo.prototype.getTilePoint=function(D){return this.canonical.getTilePoint(new Lh(D.x-this.wrap,D.y))};function wd(R,D,H,ne,de){R*=2,R<0&&(R=R*-1-1);var Ae=1<<H;return(Ae*Ae*R+Ae*de+ne).toString(36)+H.toString(36)+D.toString(36)}function N4(R,D,H){for(var ne="",de,Ae=R;Ae>0;Ae--)de=1<<Ae-1,ne+=(D&de?1:0)+(H&de?2:0);return ne}fe("CanonicalTileID",Ph),fe("OverscaledTileID",oo,{omit:["posMatrix"]});var Nf=function(D,H,ne){if(this.uid=D,H.height!==H.width)throw new RangeError("DEM tiles must be square");if(ne&&ne!=="mapbox"&&ne!=="terrarium")return B('"'+ne+'" is not a valid encoding type. Valid types include "mapbox" and "terrarium".');this.stride=H.height;var de=this.dim=H.height-2;this.data=new Uint32Array(H.data.buffer),this.encoding=ne||"mapbox";for(var Ae=0;Ae<de;Ae++)this.data[this._idx(-1,Ae)]=this.data[this._idx(0,Ae)],this.data[this._idx(de,Ae)]=this.data[this._idx(de-1,Ae)],this.data[this._idx(Ae,-1)]=this.data[this._idx(Ae,0)],this.data[this._idx(Ae,de)]=this.data[this._idx(Ae,de-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(de,-1)]=this.data[this._idx(de-1,0)],this.data[this._idx(-1,de)]=this.data[this._idx(0,de-1)],this.data[this._idx(de,de)]=this.data[this._idx(de-1,de-1)]};Nf.prototype.get=function(D,H){var ne=new Uint8Array(this.data.buffer),de=this._idx(D,H)*4,Ae=this.encoding==="terrarium"?this._unpackTerrarium:this._unpackMapbox;return Ae(ne[de],ne[de+1],ne[de+2])},Nf.prototype.getUnpackVector=function(){return this.encoding==="terrarium"?[256,1,.00390625,32768]:[6553.6,25.6,.1,1e4]},Nf.prototype._idx=function(D,H){if(D<-1||D>=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<Ke;Et++)for(var Wt=de;Wt<Ae;Wt++)this.data[this._idx(Wt,Et)]=D.data[this._idx(Wt+ft,Et+bt)]},fe("DEMData",Nf);function B4(R,D){var H={};if(!D)return H;for(var ne=function(){var Re=Ae[de],Ke=Re.layerIds.map(function(Wt){return D.getLayer(Wt)}).filter(Boolean);if(Ke.length!==0){Re.layers=Ke,Re.stateDependentLayerIds&&(Re.stateDependentLayers=Re.stateDependentLayerIds.map(function(Wt){return Ke.filter(function(sr){return sr.id===Wt})[0]}));for(var ft=0,bt=Ke;ft<bt.length;ft+=1){var Et=bt[ft];H[Et.id]=Re}}},de=0,Ae=R;de<Ae.length;de+=1)ne();return H}var Xp=function(D){this._stringToNumber={},this._numberToString=[];for(var H=0;H<D.length;H++){var ne=D[H];this._stringToNumber[ne]=H,this._numberToString[H]=ne}};Xp.prototype.encode=function(D){return this._stringToNumber[D]},Xp.prototype.decode=function(D){return this._numberToString[D]};var jp=function(D,H,ne,de,Ae){this.type="Feature",this._vectorTileFeature=D,D._z=H,D._x=ne,D._y=de,this.properties=D.properties,this.id=Ae},sy={geometry:{configurable:!0}};sy.geometry.get=function(){return this._geometry===void 0&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry},sy.geometry.set=function(R){this._geometry=R},jp.prototype.toJSON=function(){var D={geometry:this.geometry};for(var H in this)H==="_geometry"||H==="_vectorTileFeature"||(D[H]=this[H]);return D},Object.defineProperties(jp.prototype,sy);var pv=function(){this.state={},this.stateChanges={},this.deletedStates={}};pv.prototype.updateState=function(D,H,ne){var de=String(H);if(this.stateChanges[D]=this.stateChanges[D]||{},this.stateChanges[D][de]=this.stateChanges[D][de]||{},o(this.stateChanges[D][de],ne),this.deletedStates[D]===null){this.deletedStates[D]={};for(var Ae in this.state[D])Ae!==de&&(this.deletedStates[D][Ae]=null)}else{var Re=this.deletedStates[D]&&this.deletedStates[D][de]===null;if(Re){this.deletedStates[D][de]={};for(var Ke in this.state[D][de])ne[Ke]||(this.deletedStates[D][de][Ke]=null)}else for(var ft in ne){var bt=this.deletedStates[D]&&this.deletedStates[D][de]&&this.deletedStates[D][de][ft]===null;bt&&delete this.deletedStates[D][de][ft]}}},pv.prototype.removeFeatureState=function(D,H,ne){var de=this.deletedStates[D]===null;if(!de){var Ae=String(H);if(this.deletedStates[D]=this.deletedStates[D]||{},ne&&H!==void 0)this.deletedStates[D][Ae]!==null&&(this.deletedStates[D][Ae]=this.deletedStates[D][Ae]||{},this.deletedStates[D][Ae][ne]=null);else if(H!==void 0){var Re=this.stateChanges[D]&&this.stateChanges[D][Ae];if(Re){this.deletedStates[D][Ae]={};for(ne in this.stateChanges[D][Ae])this.deletedStates[D][Ae][ne]=null}else this.deletedStates[D][Ae]=null}else this.deletedStates[D]=null}},pv.prototype.getState=function(D,H){var ne=String(H),de=this.state[D]||{},Ae=this.stateChanges[D]||{},Re=o({},de[ne],Ae[ne]);if(this.deletedStates[D]===null)return{};if(this.deletedStates[D]){var Ke=this.deletedStates[D][H];if(Ke===null)return{};for(var ft in Ke)delete Re[ft]}return Re},pv.prototype.initializeTileState=function(D,H){D.setFeatureState(this.state,H)},pv.prototype.coalesceChanges=function(D,H){var ne={};for(var de in this.stateChanges){this.state[de]=this.state[de]||{};var Ae={};for(var Re in this.stateChanges[de])this.state[de][Re]||(this.state[de][Re]={}),o(this.state[de][Re],this.stateChanges[de][Re]),Ae[Re]=this.state[de][Re];ne[de]=Ae}for(var Ke in this.deletedStates){this.state[Ke]=this.state[Ke]||{};var ft={};if(this.deletedStates[Ke]===null)for(var bt in this.state[Ke])ft[bt]={},this.state[Ke][bt]={};else for(var Et in this.deletedStates[Ke]){var Wt=this.deletedStates[Ke][Et]===null;if(Wt)this.state[Ke][Et]={};else for(var sr=0,qt=Object.keys(this.deletedStates[Ke][Et]);sr<qt.length;sr+=1){var mr=qt[sr];delete this.state[Ke][Et][mr]}ft[Et]=this.state[Ke][Et]}ne[Ke]=ne[Ke]||{},o(ne[Ke],ft)}if(this.stateChanges={},this.deletedStates={},Object.keys(ne).length!==0)for(var Br in D){var rn=D[Br];rn.setFeatureState(ne,H)}};var Bf=function(D,H){this.tileID=D,this.x=D.canonical.x,this.y=D.canonical.y,this.z=D.canonical.z,this.grid=new Ra(La,16,0),this.grid3D=new Ra(La,16,0),this.featureIndexArray=new od,this.promoteId=H};Bf.prototype.insert=function(D,H,ne,de,Ae,Re){var Ke=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(ne,de,Ae);for(var ft=Re?this.grid3D:this.grid,bt=0;bt<H.length;bt++){for(var Et=H[bt],Wt=[1/0,1/0,-1/0,-1/0],sr=0;sr<Et.length;sr++){var qt=Et[sr];Wt[0]=Math.min(Wt[0],qt.x),Wt[1]=Math.min(Wt[1],qt.y),Wt[2]=Math.max(Wt[2],qt.x),Wt[3]=Math.max(Wt[3],qt.y)}Wt[0]<La&&Wt[1]<La&&Wt[2]>=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;Br<rn.length;Br+=1){var $r=rn[Br];sr.push($r)}sr.sort(U4);for(var Mn={},xn,An=function(Vn){var Qn=sr[Vn];if(Qn!==xn){xn=Qn;var Jn=Ae.featureIndexArray.get(Qn),Sa=null;Ae.loadMatchingFeature(Mn,Jn.bucketIndex,Jn.sourceLayerIndex,Jn.featureIndex,ft,Re.layers,Re.availableImages,H,ne,de,function(ca,ya,Ba){return Sa||(Sa=ci(ca)),ya.queryIntersectsFeature(bt,ca,Ba,Sa,Ae.z,D.transform,Ke,D.pixelPosMatrix)})}},kn=0;kn<sr.length;kn++)An(kn);return Mn},Bf.prototype.loadMatchingFeature=function(D,H,ne,de,Ae,Re,Ke,ft,bt,Et,Wt){var sr=this.bucketLayerIDs[H];if(!(Re&&!z(Re,sr))){var qt=this.sourceLayerCoder.decode(ne),mr=this.vtLayers[qt],Br=mr.feature(de);if(Ae.filter(new Bn(this.tileID.overscaledZ),Br))for(var rn=this.getId(Br,qt),$r=0;$r<sr.length;$r++){var Mn=sr[$r];if(!(Re&&Re.indexOf(Mn)<0)){var xn=ft[Mn];if(xn){var An={};rn!==void 0&&Et&&(An=Et.getState(xn.sourceLayer||"_geojsonTileLayer",rn));var kn=bt[Mn];kn.paint=g2(kn.paint,xn.paint,Br,An,Ke),kn.layout=g2(kn.layout,xn.layout,Br,An,Ke);var Vn=!Wt||Wt(Br,xn,An);if(Vn){var Qn=new jp(Br,this.z,this.x,this.y,rn);Qn.layer=kn;var Jn=D[Mn];Jn===void 0&&(Jn=D[Mn]=[]),Jn.push({featureIndex:de,feature:Qn,intersectionZ:Vn})}}}}}},Bf.prototype.lookupSymbolFeatures=function(D,H,ne,de,Ae,Re,Ke,ft){var bt={};this.loadVTLayers();for(var Et=yu(Ae),Wt=0,sr=D;Wt<sr.length;Wt+=1){var qt=sr[Wt];this.loadMatchingFeature(bt,ne,de,qt,Et,Re,Ke,ft,H)}return bt},Bf.prototype.hasLayer=function(D){for(var H=0,ne=this.bucketLayerIDs;H<ne.length;H+=1)for(var de=ne[H],Ae=0,Re=de;Ae<Re.length;Ae+=1){var Ke=Re[Ae];if(D===Ke)return!0}return!1},Bf.prototype.getId=function(D,H){var ne=D.id;if(this.promoteId){var de=typeof this.promoteId=="string"?this.promoteId:this.promoteId[H];ne=D.properties[de],typeof ne=="boolean"&&(ne=Number(ne))}return ne},fe("FeatureIndex",Bf,{omit:["rawTileData","sourceLayerCoder"]});function g2(R,D,H,ne,de){return a(R,function(Ae,Re){var Ke=D instanceof fi?D.get(Re):null;return Ke&&Ke.evaluate?Ke.evaluate(H,ne,de):Ke})}function y2(R){for(var D=1/0,H=1/0,ne=-1/0,de=-1/0,Ae=0,Re=R;Ae<Re.length;Ae+=1){var Ke=Re[Ae];D=Math.min(D,Ke.x),H=Math.min(H,Ke.y),ne=Math.max(ne,Ke.x),de=Math.max(de,Ke.y)}return{minX:D,minY:H,maxX:ne,maxY:de}}function U4(R,D){return D-R}var V4=3e4,bo=function(D,H){this.tileID=D,this.uid=T(),this.uses=0,this.tileSize=H,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.expiredRequestCount=0,this.state="loading"};bo.prototype.registerFadeDuration=function(D){var H=D+this.timeAdded;H<oe.now()||this.fadeEndTime&&H<this.fadeEndTime||(this.fadeEndTime=H)},bo.prototype.wasRequested=function(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"},bo.prototype.loadVectorData=function(D,H,ne){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",!D){this.collisionBoxArray=new rf;return}D.featureIndex&&(this.latestFeatureIndex=D.featureIndex,D.rawTileData?(this.latestRawTileData=D.rawTileData,this.latestFeatureIndex.rawTileData=D.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=D.collisionBoxArray,this.buckets=B4(D.buckets,H.style),this.hasSymbolBuckets=!1;for(var de in this.buckets){var Ae=this.buckets[de];if(Ae instanceof gi)if(this.hasSymbolBuckets=!0,ne)Ae.justReloaded=!0;else break}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(var Re in this.buckets){var Ke=this.buckets[Re];if(Ke instanceof gi&&Ke.hasRTLText){this.hasRTLText=!0,li();break}}this.queryPadding=0;for(var ft in this.buckets){var bt=this.buckets[ft];this.queryPadding=Math.max(this.queryPadding,H.style.getLayer(ft).queryRadius(bt))}D.imageAtlas&&(this.imageAtlas=D.imageAtlas),D.glyphAtlasImage&&(this.glyphAtlasImage=D.glyphAtlasImage)},bo.prototype.unloadVectorData=function(){for(var D in this.buckets)this.buckets[D].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"},bo.prototype.getBucket=function(D){return this.buckets[D.id]},bo.prototype.upload=function(D){for(var H in this.buckets){var ne=this.buckets[H];ne.uploadPending()&&ne.upload(D)}var de=D.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new Ch(D,this.imageAtlas.image,de.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new Ch(D,this.glyphAtlasImage,de.ALPHA),this.glyphAtlasImage=null)},bo.prototype.prepare=function(D){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(D,this.imageAtlasTexture)},bo.prototype.queryRenderedFeatures=function(D,H,ne,de,Ae,Re,Ke,ft,bt,Et){return!this.latestFeatureIndex||!this.latestFeatureIndex.rawTileData?{}:this.latestFeatureIndex.query({queryGeometry:de,cameraQueryGeometry:Ae,scale:Re,tileSize:this.tileSize,pixelPosMatrix:Et,transform:ft,params:Ke,queryPadding:this.queryPadding*bt},D,H,ne)},bo.prototype.querySourceFeatures=function(D,H){var ne=this.latestFeatureIndex;if(!(!ne||!ne.rawTileData)){var de=ne.loadVTLayers(),Ae=H?H.sourceLayer:"",Re=de._geojsonTileLayer||de[Ae];if(Re)for(var Ke=yu(H&&H.filter),ft=this.tileID.canonical,bt=ft.z,Et=ft.x,Wt=ft.y,sr={z:bt,x:Et,y:Wt},qt=0;qt<Re.length;qt++){var mr=Re.feature(qt);if(Ke.filter(new Bn(this.tileID.overscaledZ),mr)){var Br=ne.getId(mr,Ae),rn=new jp(mr,bt,Et,Wt,Br);rn.tile=sr,D.push(rn)}}}},bo.prototype.hasData=function(){return this.state==="loaded"||this.state==="reloading"||this.state==="expired"},bo.prototype.patternsLoaded=function(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length},bo.prototype.setExpiryData=function(D){var H=this.expirationTime;if(D.cacheControl){var ne=U(D.cacheControl);ne["max-age"]&&(this.expirationTime=Date.now()+ne["max-age"]*1e3)}else D.expires&&(this.expirationTime=new Date(D.expires).getTime());if(this.expirationTime){var de=Date.now(),Ae=!1;if(this.expirationTime>de)Ae=!1;else if(!H)Ae=!0;else if(this.expirationTime<H)Ae=!0;else{var Re=this.expirationTime-H;Re?this.expirationTime=de+Math.max(Re,V4):Ae=!0}Ae?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}},bo.prototype.getExpiryTimeout=function(){if(this.expirationTime)return this.expiredRequestCount?1e3*(1<<Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-new Date().getTime(),Math.pow(2,31)-1)},bo.prototype.setFeatureState=function(D,H){if(!(!this.latestFeatureIndex||!this.latestFeatureIndex.rawTileData||Object.keys(D).length===0)){var ne=this.latestFeatureIndex.loadVTLayers();for(var de in this.buckets)if(H.style.hasLayer(de)){var Ae=this.buckets[de],Re=Ae.layers[0].sourceLayer||"_geojsonTileLayer",Ke=ne[Re],ft=D[Re];if(!(!Ke||!ft||Object.keys(ft).length===0)){Ae.update(ft,Ke,this.imageAtlas&&this.imageAtlas.patternPositions||{});var bt=H&&H.style&&H.style.getLayer(de);bt&&(this.queryPadding=Math.max(this.queryPadding,bt.queryRadius(Ae)))}}}},bo.prototype.holdingForFade=function(){return this.symbolFadeHoldUntil!==void 0},bo.prototype.symbolFadeFinished=function(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<oe.now()},bo.prototype.clearFadeHold=function(){this.symbolFadeHoldUntil=void 0},bo.prototype.setHoldDuration=function(D){this.symbolFadeHoldUntil=oe.now()+D},bo.prototype.setDependencies=function(D,H){for(var ne={},de=0,Ae=H;de<Ae.length;de+=1){var Re=Ae[de];ne[Re]=!0}this.dependencies[D]=ne},bo.prototype.hasDependency=function(D,H){for(var ne=0,de=D;ne<de.length;ne+=1){var Ae=de[ne],Re=this.dependencies[Ae];if(Re)for(var Ke=0,ft=H;Ke<ft.length;Ke+=1){var bt=ft[Ke];if(Re[bt])return!0}}return!1};var H4=["type","source","source-layer","minzoom","maxzoom","filter","layout"],Ec=self.performance,m2=function(D){this._marks={start:[D.url,"start"].join("#"),end:[D.url,"end"].join("#"),measure:D.url.toString()},Ec.mark(this._marks.start)};m2.prototype.finish=function(){Ec.mark(this._marks.end);var D=Ec.getEntriesByName(this._marks.measure);return D.length===0&&(Ec.measure(this._marks.measure,this._marks.start,this._marks.end),D=Ec.getEntriesByName(this._marks.measure),Ec.clearMarks(this._marks.start),Ec.clearMarks(this._marks.end),Ec.clearMeasures(this._marks.measure)),D},i.Actor=dv,i.AlphaImage=Eh,i.CanonicalTileID=Ph,i.CollisionBoxArray=rf,i.Color=qa,i.DEMData=Nf,i.DataConstantProperty=ga,i.DictionaryCoder=Xp,i.EXTENT=La,i.ErrorEvent=nr,i.EvaluationParameters=Bn,i.Event=Zt,i.Evented=lr,i.FeatureIndex=Bf,i.FillBucket=Mu,i.FillExtrusionBucket=Su,i.ImageAtlas=yd,i.ImagePosition=Bp,i.LineBucket=Ts,i.LngLat=Ii,i.LngLatBounds=io,i.MercatorCoordinate=Lh,i.ONE_EM=Do,i.OverscaledTileID=oo,i.Point=t,i.Point$1=t,i.Properties=$i,i.Protobuf=Op,i.RGBAImage=ws,i.RequestManager=Ee,i.RequestPerformance=m2,i.ResourceType=yt,i.SegmentVector=X,i.SourceFeatureState=pv,i.StructArrayLayout1ui2=bc,i.StructArrayLayout2f1f2i16=wu,i.StructArrayLayout2i4=xh,i.StructArrayLayout3ui6=Tu,i.StructArrayLayout4i8=$u,i.SymbolBucket=gi,i.Texture=Ch,i.Tile=bo,i.Transitionable=Ya,i.Uniform1f=Vr,i.Uniform1i=Wr,i.Uniform2f=Qr,i.Uniform3f=sn,i.Uniform4f=Sn,i.UniformColor=zn,i.UniformMatrix4f=Xn,i.UnwrappedTileID=p2,i.ValidationError=wr,i.WritingMode=nl,i.ZoomHistory=Rt,i.add=ev,i.addDynamicAttributes=ny,i.asyncAll=f,i.bezier=l,i.bindAll=S,i.browser=oe,i.cacheEntryPossiblyAdded=Bt,i.clamp=u,i.clearTileCache=Lt,i.clipLine=$x,i.clone=Rp,i.clone$1=y,i.clone$2=zg,i.collisionCircleLayout=TA,i.config=q,i.create=Qh,i.create$1=Mh,i.create$2=Ah,i.createCommonjsModule=L,i.createExpression=bl,i.createLayout=wi,i.createStyleLayer=k4,i.cross=$T,i.deepEqual=s,i.dot=QT,i.dot$1=n5,i.ease=c,i.emitValidationErrors=Ca,i.endsWith=b,i.enforceCacheSizeLimit=Gt,i.evaluateSizeForFeature=Yx,i.evaluateSizeForZoom=Zx,i.evaluateVariableOffset=t2,i.evented=ma,i.extend=o,i.featureFilter=yu,i.filterObject=E,i.fromRotation=Jh,i.getAnchorAlignment=qg,i.getAnchorJustification=ry,i.getArrayBuffer=Tt,i.getImage=Ye,i.getJSON=xt,i.getRTLTextPluginStatus=Ua,i.getReferrer=Yt,i.getVideo=We,i.identity=$h,i.invert=Tc,i.isChar=ht,i.isMapboxURL=xe,i.keysDifference=h,i.makeRequest=lt,i.mapObject=a,i.mercatorXfromLng=h2,i.mercatorYfromLat=v2,i.mercatorZfromAltitude=d2,i.mul=_g,i.multiply=Ac,i.mvt=nv,i.normalize=ld,i.number=Fi,i.offscreenCanvasSupported=_r,i.ortho=Fg,i.parseGlyphPBF=KA,i.pbf=Op,i.performSymbolLayout=v4,i.perspective=sd,i.pick=d,i.plugin=ei,i.polygonIntersectsPolygon=Ha,i.postMapLoadEvent=Je,i.postTurnstileEvent=Mt,i.potpack=Ox,i.refProperties=H4,i.register=fe,i.registerForPluginStateChange=Ea,i.rotate=Yo,i.rotateX=bs,i.rotateZ=qh,i.scale=xs,i.scale$1=r5,i.scale$2=Ng,i.setCacheLimits=Kt,i.setRTLTextPlugin=Oa,i.sphericalToCartesian=N,i.sqrLen=o5,i.styleSpec=Xt,i.sub=e5,i.symbolSize=a4,i.transformMat3=qT,i.transformMat4=Dp,i.translate=Yi,i.triggerPluginCompletionEvent=na,i.uniqueId=T,i.validateCustomStyleLayer=R4,i.validateLight=bn,i.validateStyle=mn,i.values=w,i.vectorTile=nv,i.version=A,i.warnOnce=B,i.webpSupported=$,i.window=self,i.wrap=g}),P(["./shared"],function(i){function L(ut){var lt=typeof ut;if(lt==="number"||lt==="boolean"||lt==="string"||ut===void 0||ut===null)return JSON.stringify(ut);if(Array.isArray(ut)){for(var xt="[",Tt=0,Ct=ut;Tt<Ct.length;Tt+=1){var St=Ct[Tt];xt+=L(St)+","}return xt+"]"}for(var _t=Object.keys(ut).sort(),Ht="{",$t=0;$t<_t.length;$t++)Ht+=JSON.stringify(_t[$t])+":"+L(ut[_t[$t]])+",";return Ht+"}"}function A(ut){for(var lt="",xt=0,Tt=i.refProperties;xt<Tt.length;xt+=1){var Ct=Tt[xt];lt+="/"+L(ut[Ct])}return lt}function v(ut,lt){for(var xt={},Tt=0;Tt<ut.length;Tt++){var Ct=lt&&lt[ut[Tt].id]||A(ut[Tt]);lt&&(lt[ut[Tt].id]=Ct);var St=xt[Ct];St||(St=xt[Ct]=[]),St.push(ut[Tt])}var _t=[];for(var Ht in xt)_t.push(xt[Ht]);return _t}var p=function(lt){this.keyCache={},lt&&this.replace(lt)};p.prototype.replace=function(lt){this._layerConfigs={},this._layers={},this.update(lt,[])},p.prototype.update=function(lt,xt){for(var Tt=this,Ct=0,St=lt;Ct<St.length;Ct+=1){var _t=St[Ct];this._layerConfigs[_t.id]=_t;var Ht=this._layers[_t.id]=i.createStyleLayer(_t);Ht._featureFilter=i.featureFilter(Ht.filter),this.keyCache[_t.id]&&delete this.keyCache[_t.id]}for(var $t=0,Qt=xt;$t<Qt.length;$t+=1){var or=Qt[$t];delete this.keyCache[or],delete this._layerConfigs[or],delete this._layers[or]}this.familiesBySource={};for(var Er=v(i.values(this._layerConfigs),this.keyCache),Ye=0,We=Er;Ye<We.length;Ye+=1){var Dt=We[Ye],Ft=Dt.map(function(fr){return Tt._layers[fr.id]}),Zt=Ft[0];if(Zt.visibility!=="none"){var nr=Zt.source||"",lr=this.familiesBySource[nr];lr||(lr=this.familiesBySource[nr]={});var rr=Zt.sourceLayer||"_geojsonTileLayer",zt=lr[rr];zt||(zt=lr[rr]=[]),zt.push(Ft)}}};var t=1,r=function(lt){var xt={},Tt=[];for(var Ct in lt){var St=lt[Ct],_t=xt[Ct]={};for(var Ht in St){var $t=St[+Ht];if(!(!$t||$t.bitmap.width===0||$t.bitmap.height===0)){var Qt={x:0,y:0,w:$t.bitmap.width+2*t,h:$t.bitmap.height+2*t};Tt.push(Qt),_t[Ht]={rect:Qt,metrics:$t.metrics}}}}var or=i.potpack(Tt),Er=or.w,Ye=or.h,We=new i.AlphaImage({width:Er||1,height:Ye||1});for(var Dt in lt){var Ft=lt[Dt];for(var Zt in Ft){var nr=Ft[+Zt];if(!(!nr||nr.bitmap.width===0||nr.bitmap.height===0)){var lr=xt[Dt][Zt].rect;i.AlphaImage.copy(nr.bitmap,We,{x:0,y:0},{x:lr.x+t,y:lr.y+t},nr.bitmap)}}}this.image=We,this.positions=xt};i.register("GlyphAtlas",r);var s=function(lt){this.tileID=new i.OverscaledTileID(lt.tileID.overscaledZ,lt.tileID.wrap,lt.tileID.canonical.z,lt.tileID.canonical.x,lt.tileID.canonical.y),this.uid=lt.uid,this.zoom=lt.zoom,this.pixelRatio=lt.pixelRatio,this.tileSize=lt.tileSize,this.source=lt.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=lt.showCollisionBoxes,this.collectResourceTiming=!!lt.collectResourceTiming,this.returnDependencies=!!lt.returnDependencies,this.promoteId=lt.promoteId};s.prototype.parse=function(lt,xt,Tt,Ct,St){var _t=this;this.status="parsing",this.data=lt,this.collisionBoxArray=new i.CollisionBoxArray;var Ht=new i.DictionaryCoder(Object.keys(lt.layers).sort()),$t=new i.FeatureIndex(this.tileID,this.promoteId);$t.bucketLayerIDs=[];var Qt={},or={featureIndex:$t,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:Tt},Er=xt.familiesBySource[this.source];for(var Ye in Er){var We=lt.layers[Ye];if(We){We.version===1&&i.warnOnce('Vector tile source "'+this.source+'" layer "'+Ye+'" does not use vector tile spec v2 and therefore may have some rendering errors.');for(var Dt=Ht.encode(Ye),Ft=[],Zt=0;Zt<We.length;Zt++){var nr=We.feature(Zt),lr=$t.getId(nr,Ye);Ft.push({feature:nr,id:lr,index:Zt,sourceLayerIndex:Dt})}for(var rr=0,zt=Er[Ye];rr<zt.length;rr+=1){var fr=zt[rr],dr=fr[0];if(!(dr.minzoom&&this.zoom<Math.floor(dr.minzoom))&&!(dr.maxzoom&&this.zoom>=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<St.length;Ct+=1){var _t=St[Ct];_t.recalculate(Tt,xt)}}function l(ut,lt){var xt=i.getArrayBuffer(ut.request,function(Tt,Ct,St,_t){Tt?lt(Tt):Ct&&lt(null,{vectorTile:new i.vectorTile.VectorTile(new i.pbf(Ct)),rawData:Ct,cacheControl:St,expires:_t})});return function(){xt.cancel(),lt()}}var c=function(lt,xt,Tt,Ct){this.actor=lt,this.layerIndex=xt,this.availableImages=Tt,this.loadVectorData=Ct||l,this.loading={},this.loaded={}};c.prototype.loadTile=function(lt,xt){var Tt=this,Ct=lt.uid;this.loading||(this.loading={});var St=lt&&lt.request&&lt.request.collectResourceTiming?new i.RequestPerformance(lt.request):!1,_t=this.loading[Ct]=new s(lt);_t.abort=this.loadVectorData(lt,function(Ht,$t){if(delete Tt.loading[Ct],Ht||!$t)return _t.status="done",Tt.loaded[Ct]=_t,xt(Ht);var Qt=$t.rawData,or={};$t.expires&&(or.expires=$t.expires),$t.cacheControl&&(or.cacheControl=$t.cacheControl);var Er={};if(St){var Ye=St.finish();Ye&&(Er.resourceTiming=JSON.parse(JSON.stringify(Ye)))}_t.vectorTile=$t.vectorTile,_t.parse($t.vectorTile,Tt.layerIndex,Tt.availableImages,Tt.actor,function(We,Dt){if(We||!Dt)return xt(We);xt(null,i.extend({rawTileData:Qt.slice(0)},Dt,or,Er))}),Tt.loaded=Tt.loaded||{},Tt.loaded[Ct]=_t})},c.prototype.reloadTile=function(lt,xt){var Tt=this,Ct=this.loaded,St=lt.uid,_t=this;if(Ct&&Ct[St]){var Ht=Ct[St];Ht.showCollisionBoxes=lt.showCollisionBoxes;var $t=function(Qt,or){var Er=Ht.reloadCallback;Er&&(delete Ht.reloadCallback,Ht.parse(Ht.vectorTile,_t.layerIndex,Tt.availableImages,_t.actor,Er)),xt(Qt,or)};Ht.status==="parsing"?Ht.reloadCallback=$t:Ht.status==="done"&&(Ht.vectorTile?Ht.parse(Ht.vectorTile,this.layerIndex,this.availableImages,this.actor,$t):$t())}},c.prototype.abortTile=function(lt,xt){var Tt=this.loading,Ct=lt.uid;Tt&&Tt[Ct]&&Tt[Ct].abort&&(Tt[Ct].abort(),delete Tt[Ct]),xt()},c.prototype.removeTile=function(lt,xt){var Tt=this.loaded,Ct=lt.uid;Tt&&Tt[Ct]&&delete Tt[Ct],xt()};var u=i.window.ImageBitmap,g=function(){this.loaded={}};g.prototype.loadTile=function(lt,xt){var Tt=lt.uid,Ct=lt.encoding,St=lt.rawImageData,_t=u&&St instanceof u?this.getImageData(St):St,Ht=new i.DEMData(Tt,_t,Ct);this.loaded=this.loaded||{},this.loaded[Tt]=Ht,xt(null,Ht)},g.prototype.getImageData=function(lt){(!this.offscreenCanvas||!this.offscreenCanvasContext)&&(this.offscreenCanvas=new OffscreenCanvas(lt.width,lt.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=lt.width,this.offscreenCanvas.height=lt.height,this.offscreenCanvasContext.drawImage(lt,0,0,lt.width,lt.height);var xt=this.offscreenCanvasContext.getImageData(-1,-1,lt.width+2,lt.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new i.RGBAImage({width:xt.width,height:xt.height},xt.data)},g.prototype.removeTile=function(lt){var xt=this.loaded,Tt=lt.uid;xt&&xt[Tt]&&delete xt[Tt]};var f=w;function w(ut,lt){var xt=ut&&ut.type,Tt;if(xt==="FeatureCollection")for(Tt=0;Tt<ut.features.length;Tt++)w(ut.features[Tt],lt);else if(xt==="GeometryCollection")for(Tt=0;Tt<ut.geometries.length;Tt++)w(ut.geometries[Tt],lt);else if(xt==="Feature")w(ut.geometry,lt);else if(xt==="Polygon")h(ut.coordinates,lt);else if(xt==="MultiPolygon")for(Tt=0;Tt<ut.coordinates.length;Tt++)h(ut.coordinates[Tt],lt);return ut}function h(ut,lt){if(ut.length!==0){o(ut[0],lt);for(var xt=1;xt<ut.length;xt++)o(ut[xt],!lt)}}function o(ut,lt){for(var xt=0,Tt=0,Ct=ut.length,St=Ct-1;Tt<Ct;St=Tt++)xt+=(ut[Tt][0]-ut[St][0])*(ut[St][1]+ut[Tt][1]);xt>=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<Tt.length;xt+=1){var Ct=Tt[xt];lt.push([new i.Point$1(Ct[0],Ct[1])])}return lt}else{for(var St=[],_t=0,Ht=this._feature.geometry;_t<Ht.length;_t+=1){for(var $t=Ht[_t],Qt=[],or=0,Er=$t;or<Er.length;or+=1){var Ye=Er[or];Qt.push(new i.Point$1(Ye[0],Ye[1]))}St.push(Qt)}return St}},M.prototype.toGeoJSON=function(lt,xt,Tt){return d.call(this,lt,xt,Tt)};var T=function(lt){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=i.EXTENT,this.length=lt.length,this._features=lt};T.prototype.feature=function(lt){return new M(this._features[lt])};var C=i.vectorTile.VectorTileFeature,x=S;function S(ut,lt){this.options=lt||{},this.features=ut,this.length=ut.length}S.prototype.feature=function(ut){return new b(this.features[ut],this.options.extent)};function b(ut,lt){this.id=typeof ut.id=="number"?ut.id:void 0,this.type=ut.type,this.rawGeometry=ut.type===1?[ut.geometry]:ut.geometry,this.properties=ut.tags,this.extent=lt||4096}b.prototype.loadGeometry=function(){var ut=this.rawGeometry;this.geometry=[];for(var lt=0;lt<ut.length;lt++){for(var xt=ut[lt],Tt=[],Ct=0;Ct<xt.length;Ct++)Tt.push(new i.Point$1(xt[Ct][0],xt[Ct][1]));this.geometry.push(Tt)}return this.geometry},b.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var ut=this.geometry,lt=1/0,xt=-1/0,Tt=1/0,Ct=-1/0,St=0;St<ut.length;St++)for(var _t=ut[St],Ht=0;Ht<_t.length;Ht++){var $t=_t[Ht];lt=Math.min(lt,$t.x),xt=Math.max(xt,$t.x),Tt=Math.min(Tt,$t.y),Ct=Math.max(Ct,$t.y)}return[lt,Tt,xt,Ct]},b.prototype.toGeoJSON=C.prototype.toGeoJSON;var a=I,E=I,y=B,z=x;function I(ut){var lt=new i.pbf;return k(ut,lt),lt.finish()}function B(ut,lt){lt=lt||{};var xt={};for(var Tt in ut)xt[Tt]=new x(ut[Tt].features,lt),xt[Tt].name=Tt,xt[Tt].version=lt.version,xt[Tt].extent=lt.extent;return I({layers:xt})}function k(ut,lt){for(var xt in ut.layers)lt.writeMessage(3,O,ut.layers[xt])}function O(ut,lt){lt.writeVarintField(15,ut.version||1),lt.writeStringField(1,ut.name||""),lt.writeVarintField(5,ut.extent||4096);var xt,Tt={keys:[],values:[],keycache:{},valuecache:{}};for(xt=0;xt<ut.length;xt++)Tt.feature=ut.feature(xt),lt.writeMessage(2,N,Tt);var Ct=Tt.keys;for(xt=0;xt<Ct.length;xt++)lt.writeStringField(3,Ct[xt]);var St=Tt.values;for(xt=0;xt<St.length;xt++)lt.writeMessage(4,te,St[xt])}function N(ut,lt){var xt=ut.feature;xt.id!==void 0&&lt.writeVarintField(1,xt.id),lt.writeMessage(2,_,ut),lt.writeVarintField(3,xt.type),lt.writeMessage(4,J,xt)}function _(ut,lt){var xt=ut.feature,Tt=ut.keys,Ct=ut.values,St=ut.keycache,_t=ut.valuecache;for(var Ht in xt.properties){var $t=St[Ht];typeof $t>"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<or;Er++){Er===1&&Tt!==1&&lt.writeVarint(U(2,or-1));var Ye=$t[Er].x-Ct,We=$t[Er].y-St;lt.writeVarint(Y(Ye)),lt.writeVarint(Y(We)),Ct+=Ye,St+=We}Tt===3&&lt.writeVarint(U(7,1))}}function te(ut,lt){var xt=typeof ut;xt==="string"?lt.writeStringField(1,ut):xt==="boolean"?lt.writeBooleanField(7,ut):xt==="number"&&(ut%1!==0?lt.writeDoubleField(3,ut):ut<0?lt.writeSVarintField(6,ut):lt.writeVarintField(5,ut))}a.fromVectorTileJs=E,a.fromGeojsonVt=y,a.GeoJSONWrapper=z;function ae(ut,lt,xt,Tt,Ct,St){if(!(Ct-Tt<=xt)){var _t=Tt+Ct>>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);Dt<Ft;){for(Q(ut,lt,Dt,Ft),Dt++,Ft--;lt[2*Dt+St]<We;)Dt++;for(;lt[2*Ft+St]>We;)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<lt.length;Qt++)Ht[Qt]=Qt,$t[2*Qt]=xt(lt[Qt]),$t[2*Qt+1]=Tt(lt[Qt]);ae(Ht,$t,Ct,0,Ht.length-1,0)};$.prototype.range=function(lt,xt,Tt,Ct){return j(this.ids,this.coords,lt,xt,Tt,Ct,this.nodeSize)},$.prototype.within=function(lt,xt,Tt){return K(this.ids,this.coords,lt,xt,Tt,this.nodeSize)};var le={minZoom:0,maxZoom:16,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(ut){return ut}},ie=function(lt){this.options=Se(Object.create(le),lt),this.trees=new Array(this.options.maxZoom+1)};ie.prototype.load=function(lt){var xt=this.options,Tt=xt.log,Ct=xt.minZoom,St=xt.maxZoom,_t=xt.nodeSize;Tt&&console.time("total time");var Ht="prepare "+lt.length+" points";Tt&&console.time(Ht),this.points=lt;for(var $t=[],Qt=0;Qt<lt.length;Qt++)lt[Qt].geometry&&$t.push(me(lt[Qt],Qt));this.trees[St+1]=new $($t,Ue,He,_t,Float32Array),Tt&&console.timeEnd(Ht);for(var or=St;or>=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;Ye<We.length;Ye+=1){var Dt=We[Ye],Ft=Qt.points[Dt];Er.push(Ft.numPoints?Me(Ft):this.points[Ft.index])}return Er},ie.prototype.getChildren=function(lt){var xt=this._getOriginId(lt),Tt=this._getOriginZoom(lt),Ct="No cluster with the specified id.",St=this.trees[Tt];if(!St)throw new Error(Ct);var _t=St.points[xt];if(!_t)throw new Error(Ct);for(var Ht=this.options.radius/(this.options.extent*Math.pow(2,Tt-1)),$t=St.within(_t.x,_t.y,Ht),Qt=[],or=0,Er=$t;or<Er.length;or+=1){var Ye=Er[or],We=St.points[Ye];We.parentId===lt&&Qt.push(We.numPoints?Me(We):this.points[We.index])}if(Qt.length===0)throw new Error(Ct);return Qt},ie.prototype.getLeaves=function(lt,xt,Tt){xt=xt||10,Tt=Tt||0;var Ct=[];return this._appendLeaves(Ct,lt,xt,Tt,0),Ct},ie.prototype.getTile=function(lt,xt,Tt){var Ct=this.trees[this._limitZoom(lt)],St=Math.pow(2,lt),_t=this.options,Ht=_t.extent,$t=_t.radius,Qt=$t/Ht,or=(Tt-Qt)/St,Er=(Tt+1+Qt)/St,Ye={features:[]};return this._addTileFeatures(Ct.range((xt-Qt)/St,or,(xt+1+Qt)/St,Er),Ct.points,xt,Tt,St,Ye),xt===0&&this._addTileFeatures(Ct.range(1-Qt/St,or,1,Er),Ct.points,St,Tt,St,Ye),xt===St-1&&this._addTileFeatures(Ct.range(0,or,Qt/St,Er),Ct.points,-1,Tt,St,Ye),Ye.features.length?Ye:null},ie.prototype.getClusterExpansionZoom=function(lt){for(var xt=this._getOriginZoom(lt)-1;xt<=this.options.maxZoom;){var Tt=this.getChildren(lt);if(xt++,Tt.length!==1)break;lt=Tt[0].properties.cluster_id}return xt},ie.prototype._appendLeaves=function(lt,xt,Tt,Ct,St){for(var _t=this.getChildren(xt),Ht=0,$t=_t;Ht<$t.length;Ht+=1){var Qt=$t[Ht],or=Qt.properties;if(or&&or.cluster?St+or.point_count<=Ct?St+=or.point_count:St=this._appendLeaves(lt,or.cluster_id,Tt,Ct,St):St<Ct?St++:lt.push(Qt),lt.length===Tt)break}return St},ie.prototype._addTileFeatures=function(lt,xt,Tt,Ct,St,_t){for(var Ht=0,$t=lt;Ht<$t.length;Ht+=1){var Qt=$t[Ht],or=xt[Qt],Er=or.numPoints,Ye={type:1,geometry:[[Math.round(this.options.extent*(or.x*St-Tt)),Math.round(this.options.extent*(or.y*St-Ct))]],tags:Er?Te(or):this.points[or.index].properties},We=void 0;Er?We=or.id:this.options.generateId?We=or.index:this.points[or.index].id&&(We=this.points[or.index].id),We!==void 0&&(Ye.id=We),_t.features.push(Ye)}},ie.prototype._limitZoom=function(lt){return Math.max(this.options.minZoom,Math.min(lt,this.options.maxZoom+1))},ie.prototype._cluster=function(lt,xt){for(var Tt=[],Ct=this.options,St=Ct.radius,_t=Ct.extent,Ht=Ct.reduce,$t=St/(_t*Math.pow(2,xt)),Qt=0;Qt<lt.length;Qt++){var or=lt[Qt];if(!(or.zoom<=xt)){or.zoom=xt;for(var Er=this.trees[xt+1],Ye=Er.within(or.x,or.y,$t),We=or.numPoints||1,Dt=or.x*We,Ft=or.y*We,Zt=Ht&&We>1?this._map(or,!0):null,nr=(Qt<<5)+(xt+1)+this.points.length,lr=0,rr=Ye;lr<rr.length;lr+=1){var zt=rr[lr],fr=Er.points[zt];if(!(fr.zoom<=xt)){fr.zoom=xt;var dr=fr.numPoints||1;Dt+=fr.x*dr,Ft+=fr.y*dr,We+=dr,fr.parentId=nr,Ht&&(Zt||(Zt=this._map(or,!0)),Ht(Zt,this._map(fr)))}}We===1?Tt.push(or):(or.parentId=nr,Tt.push(he(Dt/We,Ft/We,nr,We,Zt)))}}return Tt},ie.prototype._getOriginId=function(lt){return lt-this.points.length>>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;Ye<xt;Ye+=3){var We=Ge(ut[Ye],ut[Ye+1],$t,Qt,or,Er);if(We>Ct)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;Tt<lt.length;Tt++)$e(ut,lt[Tt]);else if(xt==="MultiPolygon")for(Tt=0;Tt<lt.length;Tt++)for(var Ct=0;Ct<lt[Tt].length;Ct++)$e(ut,lt[Tt][Ct])}function $e(ut,lt){for(var xt=0;xt<lt.length;xt+=3)ut.minX=Math.min(ut.minX,lt[xt]),ut.minY=Math.min(ut.minY,lt[xt+1]),ut.maxX=Math.max(ut.maxX,lt[xt]),ut.maxY=Math.max(ut.maxY,lt[xt+1])}function et(ut,lt){var xt=[];if(ut.type==="FeatureCollection")for(var Tt=0;Tt<ut.features.length;Tt++)ct(xt,ut.features[Tt],lt,Tt);else ut.type==="Feature"?ct(xt,ut,lt):ct(xt,{geometry:ut},lt);return xt}function ct(ut,lt,xt,Tt){if(lt.geometry){var Ct=lt.geometry.coordinates,St=lt.geometry.type,_t=Math.pow(xt.tolerance/((1<<xt.maxZoom)*xt.extent),2),Ht=[],$t=lt.id;if(xt.promoteId?$t=lt.properties[xt.promoteId]:xt.generateId&&($t=Tt||0),St==="Point")dt(Ct,Ht);else if(St==="MultiPoint")for(var Qt=0;Qt<Ct.length;Qt++)dt(Ct[Qt],Ht);else if(St==="LineString")pt(Ct,Ht,_t,!1);else if(St==="MultiLineString")if(xt.lineMetrics){for(Qt=0;Qt<Ct.length;Qt++)Ht=[],pt(Ct[Qt],Ht,_t,!1),ut.push(nt($t,"LineString",Ht,lt.properties));return}else At(Ct,Ht,_t,!1);else if(St==="Polygon")At(Ct,Ht,_t,!0);else if(St==="MultiPolygon")for(Qt=0;Qt<Ct.length;Qt++){var or=[];At(Ct[Qt],or,_t,!0),Ht.push(or)}else if(St==="GeometryCollection"){for(Qt=0;Qt<lt.geometry.geometries.length;Qt++)ct(ut,{id:$t,geometry:lt.geometry.geometries[Qt],properties:lt.properties},xt,Tt);return}else throw new Error("Input data is not a valid GeoJSON object.");ut.push(nt($t,St,Ht,lt.properties))}}function dt(ut,lt){lt.push(Mt(ut[0])),lt.push(Vt(ut[1])),lt.push(0)}function pt(ut,lt,xt,Tt){for(var Ct,St,_t=0,Ht=0;Ht<ut.length;Ht++){var $t=Mt(ut[Ht][0]),Qt=Vt(ut[Ht][1]);lt.push($t),lt.push(Qt),lt.push(0),Ht>0&&(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;Ct<ut.length;Ct++){var St=[];pt(ut[Ct],St,xt,Tt),lt.push(St)}}function Mt(ut){return ut/360+.5}function Vt(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 Je(ut,lt,xt,Tt,Ct,St,_t,Ht){if(xt/=lt,Tt/=lt,St>=xt&&_t<Tt)return ut;if(_t<xt||St>=Tt)return null;for(var $t=[],Qt=0;Qt<ut.length;Qt++){var or=ut[Qt],Er=or.geometry,Ye=or.type,We=Ct===0?or.minX:or.minY,Dt=Ct===0?or.maxX:or.maxY;if(We>=xt&&Dt<Tt){$t.push(or);continue}else if(Dt<xt||We>=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<Er.length;Zt++){var nr=[];Pe(Er[Zt],nr,xt,Tt,Ct,!0),nr.length&&Ft.push(nr)}if(Ft.length){if(Ht.lineMetrics&&Ye==="LineString"){for(Zt=0;Zt<Ft.length;Zt++)$t.push(nt(or.id,Ye,Ft[Zt],or.tags));continue}(Ye==="LineString"||Ye==="MultiLineString")&&(Ft.length===1?(Ye="LineString",Ft=Ft[0]):Ye="MultiLineString"),(Ye==="Point"||Ye==="MultiPoint")&&(Ye=Ft.length===3?"Point":"MultiPoint"),$t.push(nt(or.id,Ye,Ft,or.tags))}}return $t.length?$t:null}function De(ut,lt,xt,Tt,Ct){for(var St=0;St<ut.length;St+=3){var _t=ut[St+Ct];_t>=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;Ye<ut.length-3;Ye+=3){var We=ut[Ye],Dt=ut[Ye+1],Ft=ut[Ye+2],Zt=ut[Ye+3],nr=ut[Ye+4],lr=Ct===0?We:Dt,rr=Ct===0?Zt:nr,zt=!1;_t&&(or=Math.sqrt(Math.pow(We-Zt,2)+Math.pow(Dt-nr,2))),lr<xt?rr>xt&&(Er=$t(Ht,We,Dt,Zt,nr,xt),_t&&(Ht.start=Qt+or*Er)):lr>Tt?rr<Tt&&(Er=$t(Ht,We,Dt,Zt,nr,Tt),_t&&(Ht.start=Qt+or*Er)):be(Ht,We,Dt,Ft),rr<xt&&lr>=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&&lt.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<ut.length;_t++)Ie(ut[_t],lt,xt,Tt,Ct,St,!1)}function be(ut,lt,xt,Tt){ut.push(lt),ut.push(xt),ut.push(Tt)}function se(ut,lt,xt,Tt,Ct,St){var _t=(St-lt)/(Tt-lt);return ut.push(St),ut.push(xt+(Ct-xt)*_t),ut.push(1),_t}function ye(ut,lt,xt,Tt,Ct,St){var _t=(St-xt)/(Ct-xt);return ut.push(lt+(Tt-lt)*_t),ut.push(St),ut.push(1),_t}function Le(ut,lt){var xt=lt.buffer/lt.extent,Tt=ut,Ct=Je(ut,1,-1-xt,xt,0,-1,2,lt),St=Je(ut,1,1-xt,2+xt,0,-1,2,lt);return(Ct||St)&&(Tt=Je(ut,1,-xt,1+xt,0,-1,2,lt)||[],Ct&&(Tt=Be(Ct,1).concat(Tt)),St&&(Tt=Tt.concat(Be(St,-1)))),Tt}function Be(ut,lt){for(var xt=[],Tt=0;Tt<ut.length;Tt++){var Ct=ut[Tt],St=Ct.type,_t;if(St==="Point"||St==="MultiPoint"||St==="LineString")_t=ot(Ct.geometry,lt);else if(St==="MultiLineString"||St==="Polygon"){_t=[];for(var Ht=0;Ht<Ct.geometry.length;Ht++)_t.push(ot(Ct.geometry[Ht],lt))}else if(St==="MultiPolygon")for(_t=[],Ht=0;Ht<Ct.geometry.length;Ht++){for(var $t=[],Qt=0;Qt<Ct.geometry[Ht].length;Qt++)$t.push(ot(Ct.geometry[Ht][Qt],lt));_t.push($t)}xt.push(nt(Ct.id,St,_t,Ct.tags))}return xt}function ot(ut,lt){var xt=[];xt.size=ut.size,ut.start!==void 0&&(xt.start=ut.start,xt.end=ut.end);for(var Tt=0;Tt<ut.length;Tt+=3)xt.push(ut[Tt]+lt,ut[Tt+1],ut[Tt+2]);return xt}function at(ut,lt){if(ut.transformed)return ut;var xt=1<<ut.z,Tt=ut.x,Ct=ut.y,St,_t,Ht;for(St=0;St<ut.features.length;St++){var $t=ut.features[St],Qt=$t.geometry,or=$t.type;if($t.geometry=[],or===1)for(_t=0;_t<Qt.length;_t+=2)$t.geometry.push(wt(Qt[_t],Qt[_t+1],lt,xt,Tt,Ct));else for(_t=0;_t<Qt.length;_t++){var Er=[];for(Ht=0;Ht<Qt[_t].length;Ht+=2)Er.push(wt(Qt[_t][Ht],Qt[_t][Ht+1],lt,xt,Tt,Ct));$t.geometry.push(Er)}}return ut.transformed=!0,ut}function wt(ut,lt,xt,Tt,Ct,St){return[Math.round(xt*(ut*Tt-Ct)),Math.round(xt*(lt*Tt-St))]}function It(ut,lt,xt,Tt,Ct){for(var St=lt===Ct.maxZoom?0:Ct.tolerance/((1<<lt)*Ct.extent),_t={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:xt,y:Tt,z:lt,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},Ht=0;Ht<ut.length;Ht++){_t.numFeatures++,Bt(_t,ut[Ht],St,Ct);var $t=ut[Ht].minX,Qt=ut[Ht].minY,or=ut[Ht].maxX,Er=ut[Ht].maxY;$t<_t.minX&&(_t.minX=$t),Qt<_t.minY&&(_t.minY=Qt),or>_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;Ht<Ct.length;Ht+=3)_t.push(Ct[Ht]),_t.push(Ct[Ht+1]),ut.numPoints++,ut.numSimplified++;else if(St==="LineString")Gt(_t,Ct,ut,xt,!1,!1);else if(St==="MultiLineString"||St==="Polygon")for(Ht=0;Ht<Ct.length;Ht++)Gt(_t,Ct[Ht],ut,xt,St==="Polygon",Ht===0);else if(St==="MultiPolygon")for(var $t=0;$t<Ct.length;$t++){var Qt=Ct[$t];for(Ht=0;Ht<Qt.length;Ht++)Gt(_t,Qt[Ht],ut,xt,!0,Ht===0)}if(_t.length){var or=lt.tags||null;if(St==="LineString"&&Tt.lineMetrics){or={};for(var Er in lt.tags)or[Er]=lt.tags[Er];or.mapbox_clip_start=Ct.start/Ct.size,or.mapbox_clip_end=Ct.end/Ct.size}var Ye={geometry:_t,type:St==="Polygon"||St==="MultiPolygon"?3:St==="LineString"||St==="MultiLineString"?2:1,tags:or};lt.id!==null&&(Ye.id=lt.id),ut.features.push(Ye)}}function Gt(ut,lt,xt,Tt,Ct,St){var _t=Tt*Tt;if(Tt>0&&lt.size<(Ct?_t:Tt)){xt.numPoints+=lt.length/3;return}for(var Ht=[],$t=0;$t<lt.length;$t+=3)(Tt===0||lt[$t+2]>_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;Tt<Ct;St=Tt,Tt+=2)xt+=(ut[Tt]-ut[St])*(ut[Tt+1]+ut[St+1]);if(xt>0===lt)for(Tt=0,Ct=ut.length;Tt<Ct/2;Tt+=2){var _t=ut[Tt],Ht=ut[Tt+1];ut[Tt]=ut[Ct-2-Tt],ut[Tt+1]=ut[Ct-1-Tt],ut[Ct-2-Tt]=_t,ut[Ct-1-Tt]=Ht}}function Kt(ut,lt){return new ir(ut,lt)}function ir(ut,lt){lt=this.options=yt(Object.create(this.options),lt);var xt=lt.debug;if(xt&&console.time("preprocess data"),lt.maxZoom<0||lt.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(lt.promoteId&&lt.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<<lt,Er=_r(lt,xt,Tt),Ye=this.tiles[Er];if(!Ye&&(Qt>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<<Ct-lt;if(xt!==Math.floor(St/Dt)||Tt!==Math.floor(_t/Dt))continue}else if(lt===$t.indexMaxZoom||Ye.numPoints<=$t.indexMaxPoints)continue;if(Ye.source=null,ut.length!==0){Qt>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<<ut;lt=(lt%_t+_t)%_t;var Ht=_r(ut,lt,xt);if(this.tiles[Ht])return at(this.tiles[Ht],Ct);St>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<<ut)*xt+lt)*32+ut}function yt(ut,lt){for(var xt in lt)ut[xt]=lt[xt];return ut}function jt(ut,lt){var xt=ut.tileID.canonical;if(!this._geoJSONIndex)return lt(null,null);var Tt=this._geoJSONIndex.getTile(xt.z,xt.x,xt.y);if(!Tt)return lt(null,null);var Ct=new T(Tt.features),St=a(Ct);(St.byteOffset!==0||St.byteLength!==St.buffer.byteLength)&&(St=new Uint8Array(St)),lt(null,{vectorTile:Ct,rawData:St.buffer})}var Yt=function(ut){function lt(xt,Tt,Ct,St){ut.call(this,xt,Tt,Ct,jt),St&&(this.loadGeoJSON=St)}return ut&&(lt.__proto__=ut),lt.prototype=Object.create(ut&&ut.prototype),lt.prototype.constructor=lt,lt.prototype.loadData=function(Tt,Ct){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=Ct,this._pendingLoadDataParams=Tt,this._state&&this._state!=="Idle"?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},lt.prototype._loadData=function(){var Tt=this;if(!(!this._pendingCallback||!this._pendingLoadDataParams)){var Ct=this._pendingCallback,St=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var _t=St&&St.request&&St.request.collectResourceTiming?new i.RequestPerformance(St.request):!1;this.loadGeoJSON(St,function(Ht,$t){if(Ht||!$t)return Ct(Ht);if(typeof $t!="object")return Ct(new Error("Input data given to '"+St.source+"' is not a valid GeoJSON object."));f($t,!0);try{Tt._geoJSONIndex=St.cluster?new ie(br(St)).load($t.features):Kt($t,St.geojsonVtOptions)}catch(Er){return Ct(Er)}Tt.loaded={};var Qt={};if(_t){var or=_t.finish();or&&(Qt.resourceTiming={},Qt.resourceTiming[St.source]=JSON.parse(JSON.stringify(or)))}Ct(null,Qt)})}},lt.prototype.coalesce=function(){this._state==="Coalescing"?this._state="Idle":this._state==="NeedsLoadData"&&(this._state="Coalescing",this._loadData())},lt.prototype.reloadTile=function(Tt,Ct){var St=this.loaded,_t=Tt.uid;return St&&St[_t]?ut.prototype.reloadTile.call(this,Tt,Ct):this.loadTile(Tt,Ct)},lt.prototype.loadGeoJSON=function(Tt,Ct){if(Tt.request)i.getJSON(Tt.request,Ct);else if(typeof Tt.data=="string")try{return Ct(null,JSON.parse(Tt.data))}catch{return Ct(new Error("Input data given to '"+Tt.source+"' is not a valid GeoJSON object."))}else return Ct(new Error("Input data given to '"+Tt.source+"' is not a valid GeoJSON object."))},lt.prototype.removeSource=function(Tt,Ct){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),Ct()},lt.prototype.getClusterExpansionZoom=function(Tt,Ct){try{Ct(null,this._geoJSONIndex.getClusterExpansionZoom(Tt.clusterId))}catch(St){Ct(St)}},lt.prototype.getClusterChildren=function(Tt,Ct){try{Ct(null,this._geoJSONIndex.getChildren(Tt.clusterId))}catch(St){Ct(St)}},lt.prototype.getClusterLeaves=function(Tt,Ct){try{Ct(null,this._geoJSONIndex.getLeaves(Tt.clusterId,Tt.limit,Tt.offset))}catch(St){Ct(St)}},lt}(c);function br(ut){var lt=ut.superclusterOptions,xt=ut.clusterProperties;if(!xt||!lt)return lt;for(var Tt={},Ct={},St={accumulated:null,zoom:0},_t={properties:null},Ht=Object.keys(xt),$t=0,Qt=Ht;$t<Qt.length;$t+=1){var or=Qt[$t],Er=xt[or],Ye=Er[0],We=Er[1],Dt=i.createExpression(We),Ft=i.createExpression(typeof Ye=="string"?[Ye,["accumulated"],["get",or]]:Ye);Tt[or]=Dt.value,Ct[or]=Ft.value}return lt.map=function(Zt){_t.properties=Zt;for(var nr={},lr=0,rr=Ht;lr<rr.length;lr+=1){var zt=rr[lr];nr[zt]=Tt[zt].evaluate(St,_t)}return nr},lt.reduce=function(Zt,nr){_t.properties=nr;for(var lr=0,rr=Ht;lr<rr.length;lr+=1){var zt=rr[lr];St.accumulated=Zt[zt],Zt[zt]=Ct[zt].evaluate(St,_t)}},lt}var hr=function(lt){var xt=this;this.self=lt,this.actor=new i.Actor(lt,this),this.layerIndexes={},this.availableImages={},this.workerSourceTypes={vector:c,geojson:Yt},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=function(Tt,Ct){if(xt.workerSourceTypes[Tt])throw new Error('Worker source with name "'+Tt+'" already registered.');xt.workerSourceTypes[Tt]=Ct},this.self.registerRTLTextPlugin=function(Tt){if(i.plugin.isParsed())throw new Error("RTL text plugin already registered.");i.plugin.applyArabicShaping=Tt.applyArabicShaping,i.plugin.processBidirectionalText=Tt.processBidirectionalText,i.plugin.processStyledBidirectionalText=Tt.processStyledBidirectionalText}};return hr.prototype.setReferrer=function(lt,xt){this.referrer=xt},hr.prototype.setImages=function(lt,xt,Tt){this.availableImages[lt]=xt;for(var Ct in this.workerSources[lt]){var St=this.workerSources[lt][Ct];for(var _t in St)St[_t].availableImages=xt}Tt()},hr.prototype.setLayers=function(lt,xt,Tt){this.getLayerIndex(lt).replace(xt),Tt()},hr.prototype.updateLayers=function(lt,xt,Tt){this.getLayerIndex(lt).update(xt.layers,xt.removedIds),Tt()},hr.prototype.loadTile=function(lt,xt,Tt){this.getWorkerSource(lt,xt.type,xt.source).loadTile(xt,Tt)},hr.prototype.loadDEMTile=function(lt,xt,Tt){this.getDEMWorkerSource(lt,xt.source).loadTile(xt,Tt)},hr.prototype.reloadTile=function(lt,xt,Tt){this.getWorkerSource(lt,xt.type,xt.source).reloadTile(xt,Tt)},hr.prototype.abortTile=function(lt,xt,Tt){this.getWorkerSource(lt,xt.type,xt.source).abortTile(xt,Tt)},hr.prototype.removeTile=function(lt,xt,Tt){this.getWorkerSource(lt,xt.type,xt.source).removeTile(xt,Tt)},hr.prototype.removeDEMTile=function(lt,xt){this.getDEMWorkerSource(lt,xt.source).removeTile(xt)},hr.prototype.removeSource=function(lt,xt,Tt){if(!(!this.workerSources[lt]||!this.workerSources[lt][xt.type]||!this.workerSources[lt][xt.type][xt.source])){var Ct=this.workerSources[lt][xt.type][xt.source];delete this.workerSources[lt][xt.type][xt.source],Ct.removeSource!==void 0?Ct.removeSource(xt,Tt):Tt()}},hr.prototype.loadWorkerSource=function(lt,xt,Tt){try{this.self.importScripts(xt.url),Tt()}catch(Ct){Tt(Ct.toString())}},hr.prototype.syncRTLPluginState=function(lt,xt,Tt){try{i.plugin.setState(xt);var Ct=i.plugin.getPluginURL();if(i.plugin.isLoaded()&&!i.plugin.isParsed()&&Ct!=null){this.self.importScripts(Ct);var St=i.plugin.isParsed(),_t=St?void 0:new Error("RTL Text Plugin failed to import scripts from "+Ct);Tt(_t,St)}}catch(Ht){Tt(Ht.toString())}},hr.prototype.getAvailableImages=function(lt){var xt=this.availableImages[lt];return xt||(xt=[]),xt},hr.prototype.getLayerIndex=function(lt){var xt=this.layerIndexes[lt];return xt||(xt=this.layerIndexes[lt]=new p),xt},hr.prototype.getWorkerSource=function(lt,xt,Tt){var Ct=this;if(this.workerSources[lt]||(this.workerSources[lt]={}),this.workerSources[lt][xt]||(this.workerSources[lt][xt]={}),!this.workerSources[lt][xt][Tt]){var St={send:function(_t,Ht,$t){Ct.actor.send(_t,Ht,$t,lt)}};this.workerSources[lt][xt][Tt]=new this.workerSourceTypes[xt](St,this.getLayerIndex(lt),this.getAvailableImages(lt))}return this.workerSources[lt][xt][Tt]},hr.prototype.getDEMWorkerSource=function(lt,xt){return this.demWorkerSources[lt]||(this.demWorkerSources[lt]={}),this.demWorkerSources[lt][xt]||(this.demWorkerSources[lt][xt]=new g),this.demWorkerSources[lt][xt]},hr.prototype.enforceCacheSizeLimit=function(lt,xt){i.enforceCacheSizeLimit(xt)},typeof WorkerGlobalScope<"u"&&typeof i.window<"u"&&i.window instanceof WorkerGlobalScope&&(i.window.worker=new hr(i.window)),hr}),P(["./shared"],function(i){var L=i.createCommonjsModule(function(ve){ve.exports?ve.exports=X:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=X,window.mapboxgl.notSupportedReason=pe);function X(Vr){return!pe(Vr)}function pe(Vr){if(!re())return"not a browser";if(!ge())return"insufficent Array support";if(!_e())return"insufficient Function support";if(!Ze())return"insufficient Object support";if(!st())return"insufficient JSON support";if(!mt())return"insufficient worker support";if(!Nt())return"insufficient Uint8ClampedArray support";if(!Jt())return"insufficient ArrayBuffer support";if(!ur())return"insufficient Canvas/getImageData support";if(!Fr(Vr&&Vr.failIfMajorPerformanceCaveat))return"insufficient WebGL support"}function re(){return typeof window<"u"&&typeof document<"u"}function ge(){return Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray}function _e(){return Function.prototype&&Function.prototype.bind}function Ze(){return Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions}function st(){return"JSON"in window&&"parse"in JSON&&"stringify"in JSON}function mt(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var Vr=new Blob([""],{type:"text/javascript"}),Qr=URL.createObjectURL(Vr),sn,Sn;try{Sn=new Worker(Qr),sn=!0}catch{sn=!1}return Sn&&Sn.terminate(),URL.revokeObjectURL(Qr),sn}function Nt(){return"Uint8ClampedArray"in window}function Jt(){return ArrayBuffer.isView}function ur(){var Vr=document.createElement("canvas");Vr.width=Vr.height=1;var Qr=Vr.getContext("2d");if(!Qr)return!1;var sn=Qr.getImageData(0,0,1,1);return sn&&sn.width===Vr.width}var yr={};function Fr(Vr){return yr[Vr]===void 0&&(yr[Vr]=Wr(Vr)),yr[Vr]}X.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0};function Gr(Vr){var Qr=document.createElement("canvas"),sn=Object.create(X.webGLContextAttributes);return sn.failIfMajorPerformanceCaveat=Vr,Qr.probablySupportsContext?Qr.probablySupportsContext("webgl",sn)||Qr.probablySupportsContext("experimental-webgl",sn):Qr.supportsContext?Qr.supportsContext("webgl",sn)||Qr.supportsContext("experimental-webgl",sn):Qr.getContext("webgl",sn)||Qr.getContext("experimental-webgl",sn)}function Wr(Vr){var Qr=Gr(Vr);if(!Qr)return!1;var sn=Qr.createShader(Qr.VERTEX_SHADER);return!sn||Qr.isContextLost()?!1:(Qr.shaderSource(sn,"void main() {}"),Qr.compileShader(sn),Qr.getShaderParameter(sn,Qr.COMPILE_STATUS)===!0)}}),A={};A.create=function(ve,X,pe){var re=i.window.document.createElement(ve);return X!==void 0&&(re.className=X),pe&&pe.appendChild(re),re},A.createNS=function(ve,X){var pe=i.window.document.createElementNS(ve,X);return pe};var v=i.window.document.documentElement.style;function p(ve){if(!v)return ve[0];for(var X=0;X<ve.length;X++)if(ve[X]in v)return ve[X];return ve[0]}var t=p(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]),r;A.disableDrag=function(){v&&t&&(r=v[t],v[t]="none")},A.enableDrag=function(){v&&t&&(v[t]=r)};var s=p(["transform","WebkitTransform"]);A.setTransform=function(ve,X){ve.style[s]=X};var n=!1;try{var l=Object.defineProperty({},"passive",{get:function(){n=!0}});i.window.addEventListener("test",l,l),i.window.removeEventListener("test",l,l)}catch{n=!1}A.addEventListener=function(ve,X,pe,re){re===void 0&&(re={}),"passive"in re&&n?ve.addEventListener(X,pe,re):ve.addEventListener(X,pe,re.capture)},A.removeEventListener=function(ve,X,pe,re){re===void 0&&(re={}),"passive"in re&&n?ve.removeEventListener(X,pe,re):ve.removeEventListener(X,pe,re.capture)};var c=function(ve){ve.preventDefault(),ve.stopPropagation(),i.window.removeEventListener("click",c,!0)};A.suppressClick=function(){i.window.addEventListener("click",c,!0),i.window.setTimeout(function(){i.window.removeEventListener("click",c,!0)},0)},A.mousePos=function(ve,X){var pe=ve.getBoundingClientRect();return new i.Point(X.clientX-pe.left-ve.clientLeft,X.clientY-pe.top-ve.clientTop)},A.touchPos=function(ve,X){for(var pe=ve.getBoundingClientRect(),re=[],ge=0;ge<X.length;ge++)re.push(new i.Point(X[ge].clientX-pe.left-ve.clientLeft,X[ge].clientY-pe.top-ve.clientTop));return re},A.mouseButton=function(ve){return typeof i.window.InstallTrigger<"u"&&ve.button===2&&ve.ctrlKey&&i.window.navigator.platform.toUpperCase().indexOf("MAC")>=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<st.length;Ze+=1){var mt=st[Ze];if(mt[0]<_e||mt[1]<mt[0]||ge<mt[1])return!1;_e=mt[1]}return!0},X.prototype._validateContent=function(re,ge){return re?!(re.length!==4||re[0]<0||ge.data.width<re[0]||re[1]<0||ge.data.height<re[1]||re[2]<0||ge.data.width<re[2]||re[3]<0||ge.data.height<re[3]||re[2]<re[0]||re[3]<re[1]):!0},X.prototype.updateImage=function(re,ge){var _e=this.images[re];ge.version=_e.version+1,this.images[re]=ge,this.updatedImages[re]=!0},X.prototype.removeImage=function(re){var ge=this.images[re];delete this.images[re],delete this.patterns[re],ge.userImage&&ge.userImage.onRemove&&ge.userImage.onRemove()},X.prototype.listImages=function(){return Object.keys(this.images)},X.prototype.getImages=function(re,ge){var _e=!0;if(!this.isLoaded())for(var Ze=0,st=re;Ze<st.length;Ze+=1){var mt=st[Ze];this.images[mt]||(_e=!1)}this.isLoaded()||_e?this._notify(re,ge):this.requestors.push({ids:re,callback:ge})},X.prototype._notify=function(re,ge){for(var _e={},Ze=0,st=re;Ze<st.length;Ze+=1){var mt=st[Ze];this.images[mt]||this.fire(new i.Event("styleimagemissing",{id:mt}));var Nt=this.images[mt];Nt?_e[mt]={data:Nt.data.clone(),pixelRatio:Nt.pixelRatio,sdf:Nt.sdf,version:Nt.version,stretchX:Nt.stretchX,stretchY:Nt.stretchY,content:Nt.content,hasRenderCallback:!!(Nt.userImage&&Nt.userImage.render)}:i.warnOnce('Image "'+mt+'" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.')}ge(null,_e)},X.prototype.getPixelSize=function(){var re=this.atlasImage,ge=re.width,_e=re.height;return{width:ge,height:_e}},X.prototype.getPattern=function(re){var ge=this.patterns[re],_e=this.getImage(re);if(!_e)return null;if(ge&&ge.position.version===_e.version)return ge.position;if(ge)ge.position.version=_e.version;else{var Ze=_e.data.width+f*2,st=_e.data.height+f*2,mt={w:Ze,h:st,x:0,y:0},Nt=new i.ImagePosition(mt,_e);this.patterns[re]={bin:mt,position:Nt}}return this._updatePatternAtlas(),this.patterns[re].position},X.prototype.bind=function(re){var ge=re.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new i.Texture(re,this.atlasImage,ge.RGBA),this.atlasTexture.bind(ge.LINEAR,ge.CLAMP_TO_EDGE)},X.prototype._updatePatternAtlas=function(){var re=[];for(var ge in this.patterns)re.push(this.patterns[ge].bin);var _e=i.potpack(re),Ze=_e.w,st=_e.h,mt=this.atlasImage;mt.resize({width:Ze||1,height:st||1});for(var Nt in this.patterns){var Jt=this.patterns[Nt],ur=Jt.bin,yr=ur.x+f,Fr=ur.y+f,Gr=this.images[Nt].data,Wr=Gr.width,Vr=Gr.height;i.RGBAImage.copy(Gr,mt,{x:0,y:0},{x:yr,y:Fr},{width:Wr,height:Vr}),i.RGBAImage.copy(Gr,mt,{x:0,y:Vr-1},{x:yr,y:Fr-1},{width:Wr,height:1}),i.RGBAImage.copy(Gr,mt,{x:0,y:0},{x:yr,y:Fr+Vr},{width:Wr,height:1}),i.RGBAImage.copy(Gr,mt,{x:Wr-1,y:0},{x:yr-1,y:Fr},{width:1,height:Vr}),i.RGBAImage.copy(Gr,mt,{x:0,y:0},{x:yr+Wr,y:Fr},{width:1,height:Vr})}this.dirty=!0},X.prototype.beginFrame=function(){this.callbackDispatchedThisFrame={}},X.prototype.dispatchRenderCallbacks=function(re){for(var ge=0,_e=re;ge<_e.length;ge+=1){var Ze=_e[ge];if(!this.callbackDispatchedThisFrame[Ze]){this.callbackDispatchedThisFrame[Ze]=!0;var st=this.images[Ze],mt=g(st);mt&&this.updateImage(Ze,st)}}},X}(i.Evented);function h(ve,X,pe,re,ge){var _e=X*256,Ze=_e+255,st=re.transformRequest(re.normalizeGlyphsURL(pe).replace("{fontstack}",ve).replace("{range}",_e+"-"+Ze),i.ResourceType.Glyphs);i.getArrayBuffer(st,function(mt,Nt){if(mt)ge(mt);else if(Nt){for(var Jt={},ur=0,yr=i.parseGlyphPBF(Nt);ur<yr.length;ur+=1){var Fr=yr[ur];Jt[Fr.id]=Fr}ge(null,Jt)}})}var o=T,d=T,M=1e20;function T(ve,X,pe,re,ge,_e){this.fontSize=ve||24,this.buffer=X===void 0?3:X,this.cutoff=re||.25,this.fontFamily=ge||"sans-serif",this.fontWeight=_e||"normal",this.radius=pe||8;var Ze=this.size=this.fontSize+this.buffer*2;this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=Ze,this.ctx=this.canvas.getContext("2d"),this.ctx.font=this.fontWeight+" "+this.fontSize+"px "+this.fontFamily,this.ctx.textBaseline="middle",this.ctx.fillStyle="black",this.gridOuter=new Float64Array(Ze*Ze),this.gridInner=new Float64Array(Ze*Ze),this.f=new Float64Array(Ze),this.d=new Float64Array(Ze),this.z=new Float64Array(Ze+1),this.v=new Int16Array(Ze),this.middle=Math.round(Ze/2*(navigator.userAgent.indexOf("Gecko/")>=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;re<this.size*this.size;re++){var ge=X.data[re*4+3]/255;this.gridOuter[re]=ge===1?0:ge===0?M:Math.pow(Math.max(0,.5-ge),2),this.gridInner[re]=ge===1?M:ge===0?0:Math.pow(Math.max(0,ge-.5),2)}for(C(this.gridOuter,this.size,this.size,this.f,this.d,this.v,this.z),C(this.gridInner,this.size,this.size,this.f,this.d,this.v,this.z),re=0;re<this.size*this.size;re++){var _e=this.gridOuter[re]-this.gridInner[re];pe[re]=Math.max(0,Math.min(255,Math.round(255-255*(_e/this.radius+this.cutoff))))}return pe};function C(ve,X,pe,re,ge,_e,Ze){for(var st=0;st<X;st++){for(var mt=0;mt<pe;mt++)re[mt]=ve[mt*X+st];for(x(re,ge,_e,Ze,pe),mt=0;mt<pe;mt++)ve[mt*X+st]=ge[mt]}for(mt=0;mt<pe;mt++){for(st=0;st<X;st++)re[st]=ve[mt*X+st];for(x(re,ge,_e,Ze,X),st=0;st<X;st++)ve[mt*X+st]=Math.sqrt(ge[st])}}function x(ve,X,pe,re,ge){pe[0]=0,re[0]=-M,re[1]=+M;for(var _e=1,Ze=0;_e<ge;_e++){for(var st=(ve[_e]+_e*_e-(ve[pe[Ze]]+pe[Ze]*pe[Ze]))/(2*_e-2*pe[Ze]);st<=re[Ze];)Ze--,st=(ve[_e]+_e*_e-(ve[pe[Ze]]+pe[Ze]*pe[Ze]))/(2*_e-2*pe[Ze]);Ze++,pe[Ze]=_e,re[Ze]=st,re[Ze+1]=+M}for(_e=0,Ze=0;_e<ge;_e++){for(;re[Ze+1]<_e;)Ze++;X[_e]=(_e-pe[Ze])*(_e-pe[Ze])+ve[pe[Ze]]}}o.default=d;var S=function(X,pe){this.requestManager=X,this.localIdeographFontFamily=pe,this.entries={}};S.prototype.setURL=function(X){this.url=X},S.prototype.getGlyphs=function(X,pe){var re=this,ge=[];for(var _e in X)for(var Ze=0,st=X[_e];Ze<st.length;Ze+=1){var mt=st[Ze];ge.push({stack:_e,id:mt})}i.asyncAll(ge,function(Nt,Jt){var ur=Nt.stack,yr=Nt.id,Fr=re.entries[ur];Fr||(Fr=re.entries[ur]={glyphs:{},requests:{},ranges:{}});var Gr=Fr.glyphs[yr];if(Gr!==void 0){Jt(null,{stack:ur,id:yr,glyph:Gr});return}if(Gr=re._tinySDF(Fr,ur,yr),Gr){Fr.glyphs[yr]=Gr,Jt(null,{stack:ur,id:yr,glyph:Gr});return}var Wr=Math.floor(yr/256);if(Wr*256>65535){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;zn<Yn.length;zn+=1){var Xn=Yn[zn];Xn(Qr,sn)}delete Fr.requests[Wr]})),Vr.push(function(Qr,sn){Qr?Jt(Qr):sn&&Jt(null,{stack:ur,id:yr,glyph:sn[yr]||null})})},function(Nt,Jt){if(Nt)pe(Nt);else if(Jt){for(var ur={},yr=0,Fr=Jt;yr<Fr.length;yr+=1){var Gr=Fr[yr],Wr=Gr.stack,Vr=Gr.id,Qr=Gr.glyph;(ur[Wr]||(ur[Wr]={}))[Vr]=Qr&&{id:Qr.id,bitmap:Qr.bitmap.clone(),metrics:Qr.metrics}}pe(null,ur)}})},S.prototype._doesCharSupportLocalGlyph=function(X){return!!this.localIdeographFontFamily&&(i.isChar["CJK Unified Ideographs"](X)||i.isChar["Hangul Syllables"](X)||i.isChar.Hiragana(X)||i.isChar.Katakana(X))},S.prototype._tinySDF=function(X,pe,re){var ge=this.localIdeographFontFamily;if(ge&&this._doesCharSupportLocalGlyph(re)){var _e=X.tinySDF;if(!_e){var Ze="400";/bold/i.test(pe)?Ze="900":/medium/i.test(pe)?Ze="500":/light/i.test(pe)&&(Ze="200"),_e=X.tinySDF=new S.TinySDF(24,3,8,.25,ge,Ze)}return{id:re,bitmap:new i.AlphaImage({width:30,height:30},_e.draw(String.fromCharCode(re))),metrics:{width:24,height:24,left:0,top:-8,advance:24}}}},S.loadGlyphRange=h,S.TinySDF=o;var b=function(){this.specification=i.styleSpec.light.position};b.prototype.possiblyEvaluate=function(X,pe){return i.sphericalToCartesian(X.expression.evaluate(pe))},b.prototype.interpolate=function(X,pe,re){return{x:i.number(X.x,pe.x,re),y:i.number(X.y,pe.y,re),z:i.number(X.z,pe.z,re)}};var a=new i.Properties({anchor:new i.DataConstantProperty(i.styleSpec.light.anchor),position:new b,color:new i.DataConstantProperty(i.styleSpec.light.color),intensity:new i.DataConstantProperty(i.styleSpec.light.intensity)}),E="-transition",y=function(ve){function X(pe){ve.call(this),this._transitionable=new i.Transitionable(a),this.setLight(pe),this._transitioning=this._transitionable.untransitioned()}return ve&&(X.__proto__=ve),X.prototype=Object.create(ve&&ve.prototype),X.prototype.constructor=X,X.prototype.getLight=function(){return this._transitionable.serialize()},X.prototype.setLight=function(re,ge){if(ge===void 0&&(ge={}),!this._validate(i.validateLight,re,ge))for(var _e in re){var Ze=re[_e];i.endsWith(_e,E)?this._transitionable.setTransition(_e.slice(0,-E.length),Ze):this._transitionable.setValue(_e,Ze)}},X.prototype.updateTransitions=function(re){this._transitioning=this._transitionable.transitioned(re,this._transitioning)},X.prototype.hasTransition=function(){return this._transitioning.hasTransition()},X.prototype.recalculate=function(re){this.properties=this._transitioning.possiblyEvaluate(re)},X.prototype._validate=function(re,ge,_e){return _e&&_e.validate===!1?!1:i.emitValidationErrors(this,re.call(i.validateStyle,i.extend({value:ge,style:{glyphs:!0,sprite:!0},styleSpec:i.styleSpec})))},X}(i.Evented),z=function(X,pe){this.width=X,this.height=pe,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}};z.prototype.getDash=function(X,pe){var re=X.join(",")+String(pe);return this.dashEntry[re]||(this.dashEntry[re]=this.addDash(X,pe)),this.dashEntry[re]},z.prototype.getDashRanges=function(X,pe,re){var ge=X.length%2===1,_e=[],Ze=ge?-X[X.length-1]*re:0,st=X[0]*re,mt=!0;_e.push({left:Ze,right:st,isDash:mt,zeroLength:X[0]===0});for(var Nt=X[0],Jt=1;Jt<X.length;Jt++){mt=!mt;var ur=X[Jt];Ze=Nt*re,Nt+=ur,st=Nt*re,_e.push({left:Ze,right:st,isDash:mt,zeroLength:ur===0})}return _e},z.prototype.addRoundDash=function(X,pe,re){for(var ge=pe/2,_e=-re;_e<=re;_e++)for(var Ze=this.nextRow+re+_e,st=this.width*Ze,mt=0,Nt=X[mt],Jt=0;Jt<this.width;Jt++){Jt/Nt.right>1&&(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;Jt<this.width;Jt++){Jt/Nt.right>1&&(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<X.length;Ze++)_e+=X[Ze];if(_e!==0){var st=this.width/_e,mt=this.getDashRanges(X,this.width,st);pe?this.addRoundDash(mt,st,re):this.addRegularDash(mt)}var Nt={y:(this.nextRow+re+.5)/this.height,height:2*re/this.height,width:_e};return this.nextRow+=ge,this.dirty=!0,Nt},z.prototype.bind=function(X){var pe=X.gl;this.texture?(pe.bindTexture(pe.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,pe.texSubImage2D(pe.TEXTURE_2D,0,0,0,this.width,this.height,pe.ALPHA,pe.UNSIGNED_BYTE,this.data))):(this.texture=pe.createTexture(),pe.bindTexture(pe.TEXTURE_2D,this.texture),pe.texParameteri(pe.TEXTURE_2D,pe.TEXTURE_WRAP_S,pe.REPEAT),pe.texParameteri(pe.TEXTURE_2D,pe.TEXTURE_WRAP_T,pe.REPEAT),pe.texParameteri(pe.TEXTURE_2D,pe.TEXTURE_MIN_FILTER,pe.LINEAR),pe.texParameteri(pe.TEXTURE_2D,pe.TEXTURE_MAG_FILTER,pe.LINEAR),pe.texImage2D(pe.TEXTURE_2D,0,pe.ALPHA,this.width,this.height,0,pe.ALPHA,pe.UNSIGNED_BYTE,this.data))};var I=function ve(X,pe){this.workerPool=X,this.actors=[],this.currentActor=0,this.id=i.uniqueId();for(var re=this.workerPool.acquire(this.id),ge=0;ge<re.length;ge++){var _e=re[ge],Ze=new ve.Actor(_e,pe,this.id);Ze.name="Worker "+ge,this.actors.push(Ze)}};I.prototype.broadcast=function(X,pe,re){re=re||function(){},i.asyncAll(this.actors,function(ge,_e){ge.send(X,pe,_e)},re)},I.prototype.getActor=function(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]},I.prototype.remove=function(){this.actors.forEach(function(X){X.remove()}),this.actors=[],this.workerPool.release(this.id)},I.Actor=i.Actor;function B(ve,X,pe){var re=function(ge,_e){if(ge)return pe(ge);if(_e){var Ze=i.pick(i.extend(_e,ve),["tiles","minzoom","maxzoom","attribution","mapbox_logo","bounds","scheme","tileSize","encoding"]);_e.vector_layers&&(Ze.vectorLayers=_e.vector_layers,Ze.vectorLayerIds=Ze.vectorLayers.map(function(st){return st.id})),Ze.tiles=X.canonicalizeTileset(Ze,ve.url),pe(null,Ze)}};return ve.url?i.getJSON(X.transformRequest(X.normalizeSourceURL(ve.url),i.ResourceType.Source),re):i.browser.frame(function(){return re(null,ve)})}var k=function(X,pe,re){this.bounds=i.LngLatBounds.convert(this.validateBounds(X)),this.minzoom=pe||0,this.maxzoom=re||24};k.prototype.validateBounds=function(X){return!Array.isArray(X)||X.length!==4?[-180,-90,180,90]:[Math.max(-180,X[0]),Math.max(-90,X[1]),Math.min(180,X[2]),Math.min(90,X[3])]},k.prototype.contains=function(X){var pe=Math.pow(2,X.z),re={minX:Math.floor(i.mercatorXfromLng(this.bounds.getWest())*pe),minY:Math.floor(i.mercatorYfromLat(this.bounds.getNorth())*pe),maxX:Math.ceil(i.mercatorXfromLng(this.bounds.getEast())*pe),maxY:Math.ceil(i.mercatorYfromLat(this.bounds.getSouth())*pe)},ge=X.x>=re.minX&&X.x<re.maxX&&X.y>=re.minY&&X.y<re.maxY;return ge};var O=function(ve){function X(pe,re,ge,_e){if(ve.call(this),this.id=pe,this.dispatcher=ge,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,i.extend(this,i.pick(re,["url","scheme","tileSize","promoteId"])),this._options=i.extend({type:"vector"},re),this._collectResourceTiming=re.collectResourceTiming,this.tileSize!==512)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(_e)}return ve&&(X.__proto__=ve),X.prototype=Object.create(ve&&ve.prototype),X.prototype.constructor=X,X.prototype.load=function(){var re=this;this._loaded=!1,this.fire(new i.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=B(this._options,this.map._requestManager,function(ge,_e){re._tileJSONRequest=null,re._loaded=!0,ge?re.fire(new i.ErrorEvent(ge)):_e&&(i.extend(re,_e),_e.bounds&&(re.tileBounds=new k(_e.bounds,re.minzoom,re.maxzoom)),i.postTurnstileEvent(_e.tiles,re.map._requestManager._customAccessToken),i.postMapLoadEvent(_e.tiles,re.map._getMapId(),re.map._requestManager._skuToken,re.map._requestManager._customAccessToken),re.fire(new i.Event("data",{dataType:"source",sourceDataType:"metadata"})),re.fire(new i.Event("data",{dataType:"source",sourceDataType:"content"})))})},X.prototype.loaded=function(){return this._loaded},X.prototype.hasTile=function(re){return!this.tileBounds||this.tileBounds.contains(re.canonical)},X.prototype.onAdd=function(re){this.map=re,this.load()},X.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},X.prototype.serialize=function(){return i.extend({},this._options)},X.prototype.loadTile=function(re,ge){var _e=this.map._requestManager.normalizeTileURL(re.tileID.canonical.url(this.tiles,this.scheme)),Ze={request:this.map._requestManager.transformRequest(_e,i.ResourceType.Tile),uid:re.uid,tileID:re.tileID,zoom:re.tileID.overscaledZ,tileSize:this.tileSize*re.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:i.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};Ze.request.collectResourceTiming=this._collectResourceTiming,!re.actor||re.state==="expired"?(re.actor=this.dispatcher.getActor(),re.request=re.actor.send("loadTile",Ze,st.bind(this))):re.state==="loading"?re.reloadCallback=ge:re.request=re.actor.send("reloadTile",Ze,st.bind(this));function st(mt,Nt){if(delete re.request,re.aborted)return ge(null);if(mt&&mt.status!==404)return ge(mt);Nt&&Nt.resourceTiming&&(re.resourceTiming=Nt.resourceTiming),this.map._refreshExpiredTiles&&Nt&&re.setExpiryData(Nt),re.loadVectorData(Nt,this.map.painter),i.cacheEntryPossiblyAdded(this.dispatcher),ge(null),re.reloadCallback&&(this.loadTile(re,re.reloadCallback),re.reloadCallback=null)}},X.prototype.abortTile=function(re){re.request&&(re.request.cancel(),delete re.request),re.actor&&re.actor.send("abortTile",{uid:re.uid,type:this.type,source:this.id},void 0)},X.prototype.unloadTile=function(re){re.unloadVectorData(),re.actor&&re.actor.send("removeTile",{uid:re.uid,type:this.type,source:this.id},void 0)},X.prototype.hasTransition=function(){return!1},X}(i.Evented),N=function(ve){function X(pe,re,ge,_e){ve.call(this),this.id=pe,this.dispatcher=ge,this.setEventedParent(_e),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=i.extend({type:"raster"},re),i.extend(this,i.pick(re,["url","scheme","tileSize"]))}return ve&&(X.__proto__=ve),X.prototype=Object.create(ve&&ve.prototype),X.prototype.constructor=X,X.prototype.load=function(){var re=this;this._loaded=!1,this.fire(new i.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=B(this._options,this.map._requestManager,function(ge,_e){re._tileJSONRequest=null,re._loaded=!0,ge?re.fire(new i.ErrorEvent(ge)):_e&&(i.extend(re,_e),_e.bounds&&(re.tileBounds=new k(_e.bounds,re.minzoom,re.maxzoom)),i.postTurnstileEvent(_e.tiles),i.postMapLoadEvent(_e.tiles,re.map._getMapId(),re.map._requestManager._skuToken),re.fire(new i.Event("data",{dataType:"source",sourceDataType:"metadata"})),re.fire(new i.Event("data",{dataType:"source",sourceDataType:"content"})))})},X.prototype.loaded=function(){return this._loaded},X.prototype.onAdd=function(re){this.map=re,this.load()},X.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},X.prototype.serialize=function(){return i.extend({},this._options)},X.prototype.hasTile=function(re){return!this.tileBounds||this.tileBounds.contains(re.canonical)},X.prototype.loadTile=function(re,ge){var _e=this,Ze=this.map._requestManager.normalizeTileURL(re.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);re.request=i.getImage(this.map._requestManager.transformRequest(Ze,i.ResourceType.Tile),function(st,mt){if(delete re.request,re.aborted)re.state="unloaded",ge(null);else if(st)re.state="errored",ge(st);else if(mt){_e.map._refreshExpiredTiles&&re.setExpiryData(mt),delete mt.cacheControl,delete mt.expires;var Nt=_e.map.painter.context,Jt=Nt.gl;re.texture=_e.map.painter.getTileTexture(mt.width),re.texture?re.texture.update(mt,{useMipmap:!0}):(re.texture=new i.Texture(Nt,mt,Jt.RGBA,{useMipmap:!0}),re.texture.bind(Jt.LINEAR,Jt.CLAMP_TO_EDGE,Jt.LINEAR_MIPMAP_NEAREST),Nt.extTextureFilterAnisotropic&&Jt.texParameterf(Jt.TEXTURE_2D,Nt.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,Nt.extTextureFilterAnisotropicMax)),re.state="loaded",i.cacheEntryPossiblyAdded(_e.dispatcher),ge(null)}})},X.prototype.abortTile=function(re,ge){re.request&&(re.request.cancel(),delete re.request),ge()},X.prototype.unloadTile=function(re,ge){re.texture&&this.map.painter.saveTileTexture(re.texture),ge()},X.prototype.hasTransition=function(){return!1},X}(i.Evented),_=function(ve){function X(pe,re,ge,_e){ve.call(this,pe,re,ge,_e),this.type="raster-dem",this.maxzoom=22,this._options=i.extend({type:"raster-dem"},re),this.encoding=re.encoding||"mapbox"}return ve&&(X.__proto__=ve),X.prototype=Object.create(ve&&ve.prototype),X.prototype.constructor=X,X.prototype.serialize=function(){return{type:"raster-dem",url:this.url,tileSize:this.tileSize,tiles:this.tiles,bounds:this.bounds,encoding:this.encoding}},X.prototype.loadTile=function(re,ge){var _e=this.map._requestManager.normalizeTileURL(re.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);re.request=i.getImage(this.map._requestManager.transformRequest(_e,i.ResourceType.Tile),Ze.bind(this)),re.neighboringTiles=this._getNeighboringTiles(re.tileID);function Ze(mt,Nt){if(delete re.request,re.aborted)re.state="unloaded",ge(null);else if(mt)re.state="errored",ge(mt);else if(Nt){this.map._refreshExpiredTiles&&re.setExpiryData(Nt),delete Nt.cacheControl,delete Nt.expires;var Jt=i.window.ImageBitmap&&Nt instanceof i.window.ImageBitmap&&i.offscreenCanvasSupported(),ur=Jt?Nt:i.browser.getImageData(Nt,1),yr={uid:re.uid,coord:re.tileID,source:this.id,rawImageData:ur,encoding:this.encoding};(!re.actor||re.state==="expired")&&(re.actor=this.dispatcher.getActor(),re.actor.send("loadDEMTile",yr,st.bind(this)))}}function st(mt,Nt){mt&&(re.state="errored",ge(mt)),Nt&&(re.dem=Nt,re.needsHillshadePrepare=!0,re.state="loaded",ge(null))}},X.prototype._getNeighboringTiles=function(re){var ge=re.canonical,_e=Math.pow(2,ge.z),Ze=(ge.x-1+_e)%_e,st=ge.x===0?re.wrap-1:re.wrap,mt=(ge.x+1+_e)%_e,Nt=ge.x+1===_e?re.wrap+1:re.wrap,Jt={};return Jt[new i.OverscaledTileID(re.overscaledZ,st,ge.z,Ze,ge.y).key]={backfilled:!1},Jt[new i.OverscaledTileID(re.overscaledZ,Nt,ge.z,mt,ge.y).key]={backfilled:!1},ge.y>0&&(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;_e<Ze.length;_e+=1){var st=Ze[_e];X=Math.min(X,st.x),pe=Math.min(pe,st.y),re=Math.max(re,st.x),ge=Math.max(ge,st.y)}var mt=re-X,Nt=ge-pe,Jt=Math.max(mt,Nt),ur=Math.max(0,Math.floor(-Math.log(Jt)/Math.LN2)),yr=Math.pow(2,ur);return new i.CanonicalTileID(ur,Math.floor((X+re)/2*yr),Math.floor((pe+ge)/2*yr))}var ae=function(ve){function X(pe,re,ge,_e){ve.call(this,pe,re,ge,_e),this.roundZoom=!0,this.type="video",this.options=re}return ve&&(X.__proto__=ve),X.prototype=Object.create(ve&&ve.prototype),X.prototype.constructor=X,X.prototype.load=function(){var re=this;this._loaded=!1;var ge=this.options;this.urls=[];for(var _e=0,Ze=ge.urls;_e<Ze.length;_e+=1){var st=Ze[_e];this.urls.push(this.map._requestManager.transformRequest(st,i.ResourceType.Source).url)}i.getVideo(this.urls,function(mt,Nt){re._loaded=!0,mt?re.fire(new i.ErrorEvent(mt)):Nt&&(re.video=Nt,re.video.loop=!0,re.video.addEventListener("playing",function(){re.map.triggerRepaint()}),re.map&&re.video.play(),re._finishLoading())})},X.prototype.pause=function(){this.video&&this.video.pause()},X.prototype.play=function(){this.video&&this.video.play()},X.prototype.seek=function(re){if(this.video){var ge=this.video.seekable;re<ge.start(0)||re>ge.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];re<ge.length;re+=1){var _e=ge[re];if(isNaN(_e)||_e<=0)return!0}return!1},X}(J),Q={vector:O,raster:N,"raster-dem":_,geojson:U,video:ae,image:J,canvas:ce},Z=function(ve,X,pe,re){var ge=new Q[X.type](ve,X,pe,re);if(ge.id!==ve)throw new Error("Expected Source id to be "+ve+" instead of "+ge.id);return i.bindAll(["load","abort","unload","serialize","prepare"],ge),ge},j=function(ve){return Q[ve]},K=function(ve,X){Q[ve]=X};function ee(ve,X){var pe=i.identity([]);return i.translate(pe,pe,[1,1,0]),i.scale(pe,pe,[ve.width*.5,ve.height*.5,1]),i.multiply(pe,pe,ve.calculatePosMatrix(X.toUnwrapped()))}function oe(ve,X,pe){if(ve)for(var re=0,ge=ve;re<ge.length;re+=1){var _e=ge[re],Ze=X[_e];if(Ze&&Ze.source===pe&&Ze.type==="fill-extrusion")return!0}else for(var st in X){var mt=X[st];if(mt.source===pe&&mt.type==="fill-extrusion")return!0}return!1}function q(ve,X,pe,re,ge,_e){var Ze=oe(ge&&ge.layers,X,ve.id),st=_e.maxPitchScaleFactor(),mt=ve.tilesIn(re,st,Ze);mt.sort(ie);for(var Nt=[],Jt=0,ur=mt;Jt<ur.length;Jt+=1){var yr=ur[Jt];Nt.push({wrappedTileID:yr.tileID.wrapped().key,queryResults:yr.tile.queryRenderedFeatures(X,pe,ve._state,yr.queryGeometry,yr.cameraQueryGeometry,yr.scale,ge,_e,st,ee(ve.transform,yr.tileID))})}var Fr=he(Nt);for(var Gr in Fr)Fr[Gr].forEach(function(Wr){var Vr=Wr.feature,Qr=ve.getFeatureState(Vr.layer["source-layer"],Vr.id);Vr.source=Vr.layer.source,Vr.layer["source-layer"]&&(Vr.sourceLayer=Vr.layer["source-layer"]),Vr.state=Qr});return Fr}function $(ve,X,pe,re,ge,_e,Ze){for(var st={},mt=_e.queryRenderedSymbols(re),Nt=[],Jt=0,ur=Object.keys(mt).map(Number);Jt<ur.length;Jt+=1){var yr=ur[Jt];Nt.push(Ze[yr])}Nt.sort(ie);for(var Fr=function(){var sn=Wr[Gr],Sn=sn.featureIndex.lookupSymbolFeatures(mt[sn.bucketInstanceId],X,sn.bucketIndex,sn.sourceLayerIndex,ge.filter,ge.layers,ge.availableImages,ve);for(var zn in Sn){var Yn=st[zn]=st[zn]||[],Xn=Sn[zn];Xn.sort(function(ua,pa){var wa=sn.featureSortOrder;if(wa){var Ia=wa.indexOf(ua.featureIndex),Va=wa.indexOf(pa.featureIndex);return Va-Ia}else return pa.featureIndex-ua.featureIndex});for(var Zn=0,ra=Xn;Zn<ra.length;Zn+=1){var fa=ra[Zn];Yn.push(fa)}}},Gr=0,Wr=Nt;Gr<Wr.length;Gr+=1)Fr();var Vr=function(sn){st[sn].forEach(function(Sn){var zn=Sn.feature,Yn=ve[sn],Xn=pe[Yn.source],Zn=Xn.getFeatureState(zn.layer["source-layer"],zn.id);zn.source=zn.layer.source,zn.layer["source-layer"]&&(zn.sourceLayer=zn.layer["source-layer"]),zn.state=Zn})};for(var Qr in st)Vr(Qr);return st}function le(ve,X){for(var pe=ve.getRenderableIds().map(function(mt){return ve.getTileByID(mt)}),re=[],ge={},_e=0;_e<pe.length;_e++){var Ze=pe[_e],st=Ze.tileID.canonical.key;ge[st]||(ge[st]=!0,Ze.querySourceFeatures(re,X))}return re}function ie(ve,X){var pe=ve.tileID,re=X.tileID;return pe.overscaledZ-re.overscaledZ||pe.canonical.y-re.canonical.y||pe.wrap-re.wrap||pe.canonical.x-re.canonical.x}function he(ve){for(var X={},pe={},re=0,ge=ve;re<ge.length;re+=1){var _e=ge[re],Ze=_e.queryResults,st=_e.wrappedTileID,mt=pe[st]=pe[st]||{};for(var Nt in Ze)for(var Jt=Ze[Nt],ur=mt[Nt]=mt[Nt]||{},yr=X[Nt]=X[Nt]||[],Fr=0,Gr=Jt;Fr<Gr.length;Fr+=1){var Wr=Gr[Fr];ur[Wr.featureIndex]||(ur[Wr.featureIndex]=!0,yr.push(Wr))}}return X}var me=function(X,pe){this.max=X,this.onRemove=pe,this.reset()};me.prototype.reset=function(){for(var X in this.data)for(var pe=0,re=this.data[X];pe<re.length;pe+=1){var ge=re[pe];ge.timeout&&clearTimeout(ge.timeout),this.onRemove(ge.value)}return this.data={},this.order=[],this},me.prototype.add=function(X,pe,re){var ge=this,_e=X.wrapped().key;this.data[_e]===void 0&&(this.data[_e]=[]);var Ze={value:pe,timeout:void 0};if(re!==void 0&&(Ze.timeout=setTimeout(function(){ge.remove(X,Ze)},re)),this.data[_e].push(Ze),this.order.push(_e),this.order.length>this.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;st<mt.length;st+=1){var Nt=mt[st];this.remove(Nt.value.tileID,Nt)}};var Me=function(X,pe,re){this.context=X;var ge=X.gl;this.buffer=ge.createBuffer(),this.dynamicDraw=!!re,this.context.unbindVAO(),X.bindElementBuffer.set(this.buffer),ge.bufferData(ge.ELEMENT_ARRAY_BUFFER,pe.arrayBuffer,this.dynamicDraw?ge.DYNAMIC_DRAW:ge.STATIC_DRAW),this.dynamicDraw||delete pe.arrayBuffer};Me.prototype.bind=function(){this.context.bindElementBuffer.set(this.buffer)},Me.prototype.updateData=function(X){var pe=this.context.gl;this.context.unbindVAO(),this.bind(),pe.bufferSubData(pe.ELEMENT_ARRAY_BUFFER,0,X.arrayBuffer)},Me.prototype.destroy=function(){var X=this.context.gl;this.buffer&&(X.deleteBuffer(this.buffer),delete this.buffer)};var Te={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"},Oe=function(X,pe,re,ge){this.length=pe.length,this.attributes=re,this.itemSize=pe.bytesPerElement,this.dynamicDraw=ge,this.context=X;var _e=X.gl;this.buffer=_e.createBuffer(),X.bindVertexBuffer.set(this.buffer),_e.bufferData(_e.ARRAY_BUFFER,pe.arrayBuffer,this.dynamicDraw?_e.DYNAMIC_DRAW:_e.STATIC_DRAW),this.dynamicDraw||delete pe.arrayBuffer};Oe.prototype.bind=function(){this.context.bindVertexBuffer.set(this.buffer)},Oe.prototype.updateData=function(X){var pe=this.context.gl;this.bind(),pe.bufferSubData(pe.ARRAY_BUFFER,0,X.arrayBuffer)},Oe.prototype.enableAttributes=function(X,pe){for(var re=0;re<this.attributes.length;re++){var ge=this.attributes[re],_e=pe.attributes[ge.name];_e!==void 0&&X.enableVertexAttribArray(_e)}},Oe.prototype.setVertexAttribPointers=function(X,pe,re){for(var ge=0;ge<this.attributes.length;ge++){var _e=this.attributes[ge],Ze=pe.attributes[_e.name];Ze!==void 0&&X.vertexAttribPointer(Ze,_e.components,X[Te[_e.type]],!1,this.itemSize,_e.offset+this.itemSize*(re||0))}},Oe.prototype.destroy=function(){var X=this.context.gl;this.buffer&&(X.deleteBuffer(this.buffer),delete this.buffer)};var Ne=function(X){this.gl=X.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1};Ne.prototype.get=function(){return this.current},Ne.prototype.set=function(X){},Ne.prototype.getDefault=function(){return this.default},Ne.prototype.setDefault=function(){this.set(this.default)};var Ee=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.getDefault=function(){return i.Color.transparent},X.prototype.set=function(re){var ge=this.current;re.r===ge.r&&re.g===ge.g&&re.b===ge.b&&re.a===ge.a&&!this.dirty||(this.gl.clearColor(re.r,re.g,re.b,re.a),this.current=re,this.dirty=!1)},X}(Ne),xe=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.getDefault=function(){return 1},X.prototype.set=function(re){re===this.current&&!this.dirty||(this.gl.clearDepth(re),this.current=re,this.dirty=!1)},X}(Ne),Se=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.getDefault=function(){return 0},X.prototype.set=function(re){re===this.current&&!this.dirty||(this.gl.clearStencil(re),this.current=re,this.dirty=!1)},X}(Ne),Ue=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.getDefault=function(){return[!0,!0,!0,!0]},X.prototype.set=function(re){var ge=this.current;re[0]===ge[0]&&re[1]===ge[1]&&re[2]===ge[2]&&re[3]===ge[3]&&!this.dirty||(this.gl.colorMask(re[0],re[1],re[2],re[3]),this.current=re,this.dirty=!1)},X}(Ne),He=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.getDefault=function(){return!0},X.prototype.set=function(re){re===this.current&&!this.dirty||(this.gl.depthMask(re),this.current=re,this.dirty=!1)},X}(Ne),Fe=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.getDefault=function(){return 255},X.prototype.set=function(re){re===this.current&&!this.dirty||(this.gl.stencilMask(re),this.current=re,this.dirty=!1)},X}(Ne),Ge=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.getDefault=function(){return{func:this.gl.ALWAYS,ref:0,mask:255}},X.prototype.set=function(re){var ge=this.current;re.func===ge.func&&re.ref===ge.ref&&re.mask===ge.mask&&!this.dirty||(this.gl.stencilFunc(re.func,re.ref,re.mask),this.current=re,this.dirty=!1)},X}(Ne),nt=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.getDefault=function(){var re=this.gl;return[re.KEEP,re.KEEP,re.KEEP]},X.prototype.set=function(re){var ge=this.current;re[0]===ge[0]&&re[1]===ge[1]&&re[2]===ge[2]&&!this.dirty||(this.gl.stencilOp(re[0],re[1],re[2]),this.current=re,this.dirty=!1)},X}(Ne),qe=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.getDefault=function(){return!1},X.prototype.set=function(re){if(!(re===this.current&&!this.dirty)){var ge=this.gl;re?ge.enable(ge.STENCIL_TEST):ge.disable(ge.STENCIL_TEST),this.current=re,this.dirty=!1}},X}(Ne),$e=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.getDefault=function(){return[0,1]},X.prototype.set=function(re){var ge=this.current;re[0]===ge[0]&&re[1]===ge[1]&&!this.dirty||(this.gl.depthRange(re[0],re[1]),this.current=re,this.dirty=!1)},X}(Ne),et=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.getDefault=function(){return!1},X.prototype.set=function(re){if(!(re===this.current&&!this.dirty)){var ge=this.gl;re?ge.enable(ge.DEPTH_TEST):ge.disable(ge.DEPTH_TEST),this.current=re,this.dirty=!1}},X}(Ne),ct=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.getDefault=function(){return this.gl.LESS},X.prototype.set=function(re){re===this.current&&!this.dirty||(this.gl.depthFunc(re),this.current=re,this.dirty=!1)},X}(Ne),dt=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.getDefault=function(){return!1},X.prototype.set=function(re){if(!(re===this.current&&!this.dirty)){var ge=this.gl;re?ge.enable(ge.BLEND):ge.disable(ge.BLEND),this.current=re,this.dirty=!1}},X}(Ne),pt=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.getDefault=function(){var re=this.gl;return[re.ONE,re.ZERO]},X.prototype.set=function(re){var ge=this.current;re[0]===ge[0]&&re[1]===ge[1]&&!this.dirty||(this.gl.blendFunc(re[0],re[1]),this.current=re,this.dirty=!1)},X}(Ne),At=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.getDefault=function(){return i.Color.transparent},X.prototype.set=function(re){var ge=this.current;re.r===ge.r&&re.g===ge.g&&re.b===ge.b&&re.a===ge.a&&!this.dirty||(this.gl.blendColor(re.r,re.g,re.b,re.a),this.current=re,this.dirty=!1)},X}(Ne),Mt=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.getDefault=function(){return this.gl.FUNC_ADD},X.prototype.set=function(re){re===this.current&&!this.dirty||(this.gl.blendEquation(re),this.current=re,this.dirty=!1)},X}(Ne),Vt=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.getDefault=function(){return!1},X.prototype.set=function(re){if(!(re===this.current&&!this.dirty)){var ge=this.gl;re?ge.enable(ge.CULL_FACE):ge.disable(ge.CULL_FACE),this.current=re,this.dirty=!1}},X}(Ne),Je=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.getDefault=function(){return this.gl.BACK},X.prototype.set=function(re){re===this.current&&!this.dirty||(this.gl.cullFace(re),this.current=re,this.dirty=!1)},X}(Ne),De=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.getDefault=function(){return this.gl.CCW},X.prototype.set=function(re){re===this.current&&!this.dirty||(this.gl.frontFace(re),this.current=re,this.dirty=!1)},X}(Ne),Ie=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.getDefault=function(){return null},X.prototype.set=function(re){re===this.current&&!this.dirty||(this.gl.useProgram(re),this.current=re,this.dirty=!1)},X}(Ne),ze=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.getDefault=function(){return this.gl.TEXTURE0},X.prototype.set=function(re){re===this.current&&!this.dirty||(this.gl.activeTexture(re),this.current=re,this.dirty=!1)},X}(Ne),Pe=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.getDefault=function(){var re=this.gl;return[0,0,re.drawingBufferWidth,re.drawingBufferHeight]},X.prototype.set=function(re){var ge=this.current;re[0]===ge[0]&&re[1]===ge[1]&&re[2]===ge[2]&&re[3]===ge[3]&&!this.dirty||(this.gl.viewport(re[0],re[1],re[2],re[3]),this.current=re,this.dirty=!1)},X}(Ne),be=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.getDefault=function(){return null},X.prototype.set=function(re){if(!(re===this.current&&!this.dirty)){var ge=this.gl;ge.bindFramebuffer(ge.FRAMEBUFFER,re),this.current=re,this.dirty=!1}},X}(Ne),se=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.getDefault=function(){return null},X.prototype.set=function(re){if(!(re===this.current&&!this.dirty)){var ge=this.gl;ge.bindRenderbuffer(ge.RENDERBUFFER,re),this.current=re,this.dirty=!1}},X}(Ne),ye=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.getDefault=function(){return null},X.prototype.set=function(re){if(!(re===this.current&&!this.dirty)){var ge=this.gl;ge.bindTexture(ge.TEXTURE_2D,re),this.current=re,this.dirty=!1}},X}(Ne),Le=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.getDefault=function(){return null},X.prototype.set=function(re){if(!(re===this.current&&!this.dirty)){var ge=this.gl;ge.bindBuffer(ge.ARRAY_BUFFER,re),this.current=re,this.dirty=!1}},X}(Ne),Be=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.getDefault=function(){return null},X.prototype.set=function(re){var ge=this.gl;ge.bindBuffer(ge.ELEMENT_ARRAY_BUFFER,re),this.current=re,this.dirty=!1},X}(Ne),ot=function(ve){function X(pe){ve.call(this,pe),this.vao=pe.extVertexArrayObject}return ve&&(X.__proto__=ve),X.prototype=Object.create(ve&&ve.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){return null},X.prototype.set=function(re){!this.vao||re===this.current&&!this.dirty||(this.vao.bindVertexArrayOES(re),this.current=re,this.dirty=!1)},X}(Ne),at=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.getDefault=function(){return 4},X.prototype.set=function(re){if(!(re===this.current&&!this.dirty)){var ge=this.gl;ge.pixelStorei(ge.UNPACK_ALIGNMENT,re),this.current=re,this.dirty=!1}},X}(Ne),wt=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.getDefault=function(){return!1},X.prototype.set=function(re){if(!(re===this.current&&!this.dirty)){var ge=this.gl;ge.pixelStorei(ge.UNPACK_PREMULTIPLY_ALPHA_WEBGL,re),this.current=re,this.dirty=!1}},X}(Ne),It=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.getDefault=function(){return!1},X.prototype.set=function(re){if(!(re===this.current&&!this.dirty)){var ge=this.gl;ge.pixelStorei(ge.UNPACK_FLIP_Y_WEBGL,re),this.current=re,this.dirty=!1}},X}(Ne),Bt=function(ve){function X(pe,re){ve.call(this,pe),this.context=pe,this.parent=re}return ve&&(X.__proto__=ve),X.prototype=Object.create(ve&&ve.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){return null},X}(Ne),Gt=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.setDirty=function(){this.dirty=!0},X.prototype.set=function(re){if(!(re===this.current&&!this.dirty)){this.context.bindFramebuffer.set(this.parent);var ge=this.gl;ge.framebufferTexture2D(ge.FRAMEBUFFER,ge.COLOR_ATTACHMENT0,ge.TEXTURE_2D,re,0),this.current=re,this.dirty=!1}},X}(Bt),Lt=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.set=function(re){if(!(re===this.current&&!this.dirty)){this.context.bindFramebuffer.set(this.parent);var ge=this.gl;ge.framebufferRenderbuffer(ge.FRAMEBUFFER,ge.DEPTH_ATTACHMENT,ge.RENDERBUFFER,re),this.current=re,this.dirty=!1}},X}(Bt),Kt=function(X,pe,re,ge){this.context=X,this.width=pe,this.height=re;var _e=X.gl,Ze=this.framebuffer=_e.createFramebuffer();this.colorAttachment=new Gt(X,Ze),ge&&(this.depthAttachment=new Lt(X,Ze))};Kt.prototype.destroy=function(){var X=this.context.gl,pe=this.colorAttachment.get();if(pe&&X.deleteTexture(pe),this.depthAttachment){var re=this.depthAttachment.get();re&&X.deleteRenderbuffer(re)}X.deleteFramebuffer(this.framebuffer)};var ir=519,_r=function(X,pe,re){this.func=X,this.mask=pe,this.range=re};_r.ReadOnly=!1,_r.ReadWrite=!0,_r.disabled=new _r(ir,_r.ReadOnly,[0,1]);var yt=519,jt=7680,Yt=function(X,pe,re,ge,_e,Ze){this.test=X,this.ref=pe,this.mask=re,this.fail=ge,this.depthFail=_e,this.pass=Ze};Yt.disabled=new Yt({func:yt,mask:0},0,0,jt,jt,jt);var br=0,hr=1,ut=771,lt=function(X,pe,re){this.blendFunction=X,this.blendColor=pe,this.mask=re};lt.Replace=[hr,br],lt.disabled=new lt(lt.Replace,i.Color.transparent,[!1,!1,!1,!1]),lt.unblended=new lt(lt.Replace,i.Color.transparent,[!0,!0,!0,!0]),lt.alphaBlended=new lt([hr,ut],i.Color.transparent,[!0,!0,!0,!0]);var xt=1029,Tt=2305,Ct=function(X,pe,re){this.enable=X,this.mode=pe,this.frontFace=re};Ct.disabled=new Ct(!1,xt,Tt),Ct.backCCW=new Ct(!0,xt,Tt);var St=function(X){this.gl=X,this.extVertexArrayObject=this.gl.getExtension("OES_vertex_array_object"),this.clearColor=new Ee(this),this.clearDepth=new xe(this),this.clearStencil=new Se(this),this.colorMask=new Ue(this),this.depthMask=new He(this),this.stencilMask=new Fe(this),this.stencilFunc=new Ge(this),this.stencilOp=new nt(this),this.stencilTest=new qe(this),this.depthRange=new $e(this),this.depthTest=new et(this),this.depthFunc=new ct(this),this.blend=new dt(this),this.blendFunc=new pt(this),this.blendColor=new At(this),this.blendEquation=new Mt(this),this.cullFace=new Vt(this),this.cullFaceSide=new Je(this),this.frontFace=new De(this),this.program=new Ie(this),this.activeTexture=new ze(this),this.viewport=new Pe(this),this.bindFramebuffer=new be(this),this.bindRenderbuffer=new se(this),this.bindTexture=new ye(this),this.bindVertexBuffer=new Le(this),this.bindElementBuffer=new Be(this),this.bindVertexArrayOES=this.extVertexArrayObject&&new ot(this),this.pixelStoreUnpack=new at(this),this.pixelStoreUnpackPremultiplyAlpha=new wt(this),this.pixelStoreUnpackFlipY=new It(this),this.extTextureFilterAnisotropic=X.getExtension("EXT_texture_filter_anisotropic")||X.getExtension("MOZ_EXT_texture_filter_anisotropic")||X.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=X.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.extTextureHalfFloat=X.getExtension("OES_texture_half_float"),this.extTextureHalfFloat&&(X.getExtension("OES_texture_half_float_linear"),this.extRenderToTextureHalfFloat=X.getExtension("EXT_color_buffer_half_float")),this.extTimerQuery=X.getExtension("EXT_disjoint_timer_query")};St.prototype.setDefault=function(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()},St.prototype.setDirty=function(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.extVertexArrayObject&&(this.bindVertexArrayOES.dirty=!0),this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0},St.prototype.createIndexBuffer=function(X,pe){return new Me(this,X,pe)},St.prototype.createVertexBuffer=function(X,pe,re){return new Oe(this,X,pe,re)},St.prototype.createRenderbuffer=function(X,pe,re){var ge=this.gl,_e=ge.createRenderbuffer();return this.bindRenderbuffer.set(_e),ge.renderbufferStorage(ge.RENDERBUFFER,X,pe,re),this.bindRenderbuffer.set(null),_e},St.prototype.createFramebuffer=function(X,pe,re){return new Kt(this,X,pe,re)},St.prototype.clear=function(X){var pe=X.color,re=X.depth,ge=this.gl,_e=0;pe&&(_e|=ge.COLOR_BUFFER_BIT,this.clearColor.set(pe),this.colorMask.set([!0,!0,!0,!0])),typeof re<"u"&&(_e|=ge.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(re),this.depthMask.set(!0)),ge.clear(_e)},St.prototype.setCullFace=function(X){X.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(X.mode),this.frontFace.set(X.frontFace))},St.prototype.setDepthMode=function(X){X.func===this.gl.ALWAYS&&!X.mask?this.depthTest.set(!1):(this.depthTest.set(!0),this.depthFunc.set(X.func),this.depthMask.set(X.mask),this.depthRange.set(X.range))},St.prototype.setStencilMode=function(X){X.test.func===this.gl.ALWAYS&&!X.mask?this.stencilTest.set(!1):(this.stencilTest.set(!0),this.stencilMask.set(X.mask),this.stencilOp.set([X.fail,X.depthFail,X.pass]),this.stencilFunc.set({func:X.test.func,ref:X.ref,mask:X.test.mask}))},St.prototype.setColorMode=function(X){i.deepEqual(X.blendFunction,lt.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(X.blendFunction),this.blendColor.set(X.blendColor)),this.colorMask.set(X.mask)},St.prototype.unbindVAO=function(){this.extVertexArrayObject&&this.bindVertexArrayOES.set(null)};var _t=function(ve){function X(pe,re,ge){var _e=this;ve.call(this),this.id=pe,this.dispatcher=ge,this.on("data",function(Ze){Ze.dataType==="source"&&Ze.sourceDataType==="metadata"&&(_e._sourceLoaded=!0),_e._sourceLoaded&&!_e._paused&&Ze.dataType==="source"&&Ze.sourceDataType==="content"&&(_e.reload(),_e.transform&&_e.update(_e.transform))}),this.on("error",function(){_e._sourceErrored=!0}),this._source=Z(pe,re,ge,this),this._tiles={},this._cache=new me(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new i.SourceFeatureState}return ve&&(X.__proto__=ve),X.prototype=Object.create(ve&&ve.prototype),X.prototype.constructor=X,X.prototype.onAdd=function(re){this.map=re,this._maxTileCacheSize=re?re._maxTileCacheSize:null,this._source&&this._source.onAdd&&this._source.onAdd(re)},X.prototype.onRemove=function(re){this._source&&this._source.onRemove&&this._source.onRemove(re)},X.prototype.loaded=function(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;for(var re in this._tiles){var ge=this._tiles[re];if(ge.state!=="loaded"&&ge.state!=="errored")return!1}return!0},X.prototype.getSource=function(){return this._source},X.prototype.pause=function(){this._paused=!0},X.prototype.resume=function(){if(this._paused){var re=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,re&&this.reload(),this.transform&&this.update(this.transform)}},X.prototype._loadTile=function(re,ge){return this._source.loadTile(re,ge)},X.prototype._unloadTile=function(re){if(this._source.unloadTile)return this._source.unloadTile(re,function(){})},X.prototype._abortTile=function(re){if(this._source.abortTile)return this._source.abortTile(re,function(){})},X.prototype.serialize=function(){return this._source.serialize()},X.prototype.prepare=function(re){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(var ge in this._tiles){var _e=this._tiles[ge];_e.upload(re),_e.prepare(this.map.style.imageManager)}},X.prototype.getIds=function(){return i.values(this._tiles).map(function(re){return re.tileID}).sort(Ht).map(function(re){return re.key})},X.prototype.getRenderableIds=function(re){var ge=this,_e=[];for(var Ze in this._tiles)this._isIdRenderable(Ze,re)&&_e.push(this._tiles[Ze]);return re?_e.sort(function(st,mt){var Nt=st.tileID,Jt=mt.tileID,ur=new i.Point(Nt.canonical.x,Nt.canonical.y)._rotate(ge.transform.angle),yr=new i.Point(Jt.canonical.x,Jt.canonical.y)._rotate(ge.transform.angle);return Nt.overscaledZ-Jt.overscaledZ||yr.y-ur.y||yr.x-ur.x}).map(function(st){return st.tileID.key}):_e.map(function(st){return st.tileID}).sort(Ht).map(function(st){return st.key})},X.prototype.hasRenderableParent=function(re){var ge=this.findLoadedParent(re,0);return ge?this._isIdRenderable(ge.tileID.key):!1},X.prototype._isIdRenderable=function(re,ge){return this._tiles[re]&&this._tiles[re].hasData()&&!this._coveredTiles[re]&&(ge||!this._tiles[re].holdingForFade())},X.prototype.reload=function(){if(this._paused){this._shouldReloadOnResume=!0;return}this._cache.reset();for(var re in this._tiles)this._tiles[re].state!=="errored"&&this._reloadTile(re,"reloading")},X.prototype._reloadTile=function(re,ge){var _e=this._tiles[re];_e&&(_e.state!=="loading"&&(_e.state=ge),this._loadTile(_e,this._tileLoaded.bind(this,_e,re,ge)))},X.prototype._tileLoaded=function(re,ge,_e,Ze){if(Ze){re.state="errored",Ze.status!==404?this._source.fire(new i.ErrorEvent(Ze,{tile:re})):this.update(this.transform);return}re.timeAdded=i.browser.now(),_e==="expired"&&(re.refreshedUponExpiration=!0),this._setTileReloadTimer(ge,re),this.getSource().type==="raster-dem"&&re.dem&&this._backfillDEM(re),this._state.initializeTileState(re,this.map?this.map.painter:null),this._source.fire(new i.Event("data",{dataType:"source",tile:re,coord:re.tileID}))},X.prototype._backfillDEM=function(re){for(var ge=this.getRenderableIds(),_e=0;_e<ge.length;_e++){var Ze=ge[_e];if(re.neighboringTiles&&re.neighboringTiles[Ze]){var st=this.getTileByID(Ze);mt(re,st),mt(st,re)}}function mt(Nt,Jt){Nt.needsHillshadePrepare=!0;var ur=Jt.tileID.canonical.x-Nt.tileID.canonical.x,yr=Jt.tileID.canonical.y-Nt.tileID.canonical.y,Fr=Math.pow(2,Nt.tileID.canonical.z),Gr=Jt.tileID.key;ur===0&&yr===0||Math.abs(yr)>1||(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;Fr<Gr.length;Fr+=1){var Wr=Gr[Fr],Vr=Nt[Wr],Qr=this._tiles[Wr];if(!(!Qr||Qr.fadeEndTime&&Qr.fadeEndTime<=i.browser.now())){var sn=this.findLoadedParent(Vr,st);sn&&(this._addTile(sn.tileID),Jt[sn.tileID.key]=sn.tileID),ur[Wr]=Vr}}this._retainLoadedChildren(ur,Ze,mt,Nt);for(var Sn in Jt)Nt[Sn]||(this._coveredTiles[Sn]=!0,Nt[Sn]=Jt[Sn])}for(var zn in Nt)this._tiles[zn].clearFadeHold();for(var Yn=i.keysDifference(this._tiles,Nt),Xn=0,Zn=Yn;Xn<Zn.length;Xn+=1){var ra=Zn[Xn],fa=this._tiles[ra];fa.hasSymbolBuckets&&!fa.holdingForFade()?fa.setHoldDuration(this.map._fadeDuration):(!fa.hasSymbolBuckets||fa.symbolFadeFinished())&&this._removeTile(ra)}this._updateLoadedParentTileCache()}},X.prototype.releaseSymbolFadeTiles=function(){for(var re in this._tiles)this._tiles[re].holdingForFade()&&this._removeTile(re)},X.prototype._updateRetainedTiles=function(re,ge){for(var _e={},Ze={},st=Math.max(ge-X.maxOverzooming,this._source.minzoom),mt=Math.max(ge+X.maxUnderzooming,this._source.minzoom),Nt={},Jt=0,ur=re;Jt<ur.length;Jt+=1){var yr=ur[Jt],Fr=this._addTile(yr);_e[yr.key]=yr,!Fr.hasData()&&ge<this._source.maxzoom&&(Nt[yr.key]=yr)}this._retainLoadedChildren(Nt,ge,mt,_e);for(var Gr=0,Wr=re;Gr<Wr.length;Gr+=1){var Vr=Wr[Gr],Qr=this._tiles[Vr.key];if(!Qr.hasData()){if(ge+1>this._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;mt<Nt.length;mt+=1){var Jt=Nt[mt];this._loadedParentTiles[Jt]=_e}}},X.prototype._addTile=function(re){var ge=this._tiles[re.key];if(ge)return ge;ge=this._cache.getAndRemove(re),ge&&(this._setTileReloadTimer(re.key,ge),ge.tileID=re,this._state.initializeTileState(ge,this.map?this.map.painter:null),this._cacheTimers[re.key]&&(clearTimeout(this._cacheTimers[re.key]),delete this._cacheTimers[re.key],this._setTileReloadTimer(re.key,ge)));var _e=!!ge;return _e||(ge=new i.Tile(re,this._source.tileSize*re.overscaleFactor()),this._loadTile(ge,this._tileLoaded.bind(this,ge,re.key,ge.state))),ge?(ge.uses++,this._tiles[re.key]=ge,_e||this._source.fire(new i.Event("dataloading",{tile:ge,coord:ge.tileID,dataType:"source"})),ge):null},X.prototype._setTileReloadTimer=function(re,ge){var _e=this;re in this._timers&&(clearTimeout(this._timers[re]),delete this._timers[re]);var Ze=ge.getExpiryTimeout();Ze&&(this._timers[re]=setTimeout(function(){_e._reloadTile(re,"expired"),delete _e._timers[re]},Ze))},X.prototype._removeTile=function(re){var ge=this._tiles[re];ge&&(ge.uses--,delete this._tiles[re],this._timers[re]&&(clearTimeout(this._timers[re]),delete this._timers[re]),!(ge.uses>0)&&(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<sn.length;Qr+=1){var Sn=sn[Qr];Fr=Math.min(Fr,Sn.x),Gr=Math.min(Gr,Sn.y),Wr=Math.max(Wr,Sn.x),Vr=Math.max(Vr,Sn.y)}for(var zn=function(Xn){var Zn=Ze._tiles[yr[Xn]];if(!Zn.holdingForFade()){var ra=Zn.tileID,fa=Math.pow(2,mt.zoom-Zn.tileID.overscaledZ),ua=ge*Zn.queryPadding*i.EXTENT/Zn.tileSize/fa,pa=[ra.getTilePoint(new i.MercatorCoordinate(Fr,Gr)),ra.getTilePoint(new i.MercatorCoordinate(Wr,Vr))];if(pa[0].x-ua<i.EXTENT&&pa[0].y-ua<i.EXTENT&&pa[1].x+ua>=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<yr.length;Yn++)zn(Yn);return st},X.prototype.getVisibleCoordinates=function(re){for(var ge=this,_e=this.getRenderableIds(re).map(function(Nt){return ge._tiles[Nt].tileID}),Ze=0,st=_e;Ze<st.length;Ze+=1){var mt=st[Ze];mt.posMatrix=this.transform.calculatePosMatrix(mt.toUnwrapped())}return _e},X.prototype.hasTransition=function(){if(this._source.hasTransition())return!0;if($t(this._source.type))for(var re in this._tiles){var ge=this._tiles[re];if(ge.fadeEndTime!==void 0&&ge.fadeEndTime>=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.length<Er.workerCount;)this.workers.push(new Qt);return this.active[X]=!0,this.workers.slice()},Er.prototype.release=function(X){delete this.active[X],this.numActive()===0&&(this.workers.forEach(function(pe){pe.terminate()}),this.workers=null)},Er.prototype.isPreloaded=function(){return!!this.active[or]},Er.prototype.numActive=function(){return Object.keys(this.active).length};var Ye=Math.floor(i.browser.hardwareConcurrency/2);Er.workerCount=Math.max(Math.min(Ye,6),1);var We;function Dt(){return We||(We=new Er),We}function Ft(){var ve=Dt();ve.acquire(or)}function Zt(){var ve=We;ve&&(ve.isPreloaded()&&ve.numActive()===1?(ve.release(or),We=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))}function nr(ve,X){var pe={};for(var re in ve)re!=="ref"&&(pe[re]=ve[re]);return i.refProperties.forEach(function(ge){ge in X&&(pe[ge]=X[ge])}),pe}function lr(ve){ve=ve.slice();for(var X=Object.create(null),pe=0;pe<ve.length;pe++)X[ve[pe].id]=ve[pe];for(var re=0;re<ve.length;re++)"ref"in ve[re]&&(ve[re]=nr(ve[re],X[ve[re].ref]));return ve}function rr(){var ve={},X=i.styleSpec.$version;for(var pe in i.styleSpec.$root){var re=i.styleSpec.$root[pe];if(re.required){var ge=null;pe==="version"?ge=X:re.type==="array"?ge=[]:ge={},ge!=null&&(ve[pe]=ge)}}return ve}var zt={setStyle:"setStyle",addLayer:"addLayer",removeLayer:"removeLayer",setPaintProperty:"setPaintProperty",setLayoutProperty:"setLayoutProperty",setFilter:"setFilter",addSource:"addSource",removeSource:"removeSource",setGeoJSONSourceData:"setGeoJSONSourceData",setLayerZoomRange:"setLayerZoomRange",setLayerProperty:"setLayerProperty",setCenter:"setCenter",setZoom:"setZoom",setBearing:"setBearing",setPitch:"setPitch",setSprite:"setSprite",setGlyphs:"setGlyphs",setTransition:"setTransition",setLight:"setLight"};function fr(ve,X,pe){pe.push({command:zt.addSource,args:[ve,X[ve]]})}function dr(ve,X,pe){X.push({command:zt.removeSource,args:[ve]}),pe[ve]=!0}function pr(ve,X,pe,re){dr(ve,pe,re),fr(ve,X,pe)}function vr(ve,X,pe){var re;for(re in ve[pe])if(ve[pe].hasOwnProperty(re)&&re!=="data"&&!i.deepEqual(ve[pe][re],X[pe][re]))return!1;for(re in X[pe])if(X[pe].hasOwnProperty(re)&&re!=="data"&&!i.deepEqual(ve[pe][re],X[pe][re]))return!1;return!0}function Hr(ve,X,pe,re){ve=ve||{},X=X||{};var ge;for(ge in ve)ve.hasOwnProperty(ge)&&(X.hasOwnProperty(ge)||dr(ge,pe,re));for(ge in X)X.hasOwnProperty(ge)&&(ve.hasOwnProperty(ge)?i.deepEqual(ve[ge],X[ge])||(ve[ge].type==="geojson"&&X[ge].type==="geojson"&&vr(ve,X,ge)?pe.push({command:zt.setGeoJSONSourceData,args:[ge,X[ge].data]}):pr(ge,X,pe,re)):fr(ge,X,pe))}function Ir(ve,X,pe,re,ge,_e){ve=ve||{},X=X||{};var Ze;for(Ze in ve)ve.hasOwnProperty(Ze)&&(i.deepEqual(ve[Ze],X[Ze])||pe.push({command:_e,args:[re,Ze,X[Ze],ge]}));for(Ze in X)!X.hasOwnProperty(Ze)||ve.hasOwnProperty(Ze)||i.deepEqual(ve[Ze],X[Ze])||pe.push({command:_e,args:[re,Ze,X[Ze],ge]})}function kr(ve){return ve.id}function pn(ve,X){return ve[X.id]=X,ve}function jr(ve,X,pe){ve=ve||[],X=X||[];var re=ve.map(kr),ge=X.map(kr),_e=ve.reduce(pn,{}),Ze=X.reduce(pn,{}),st=re.slice(),mt=Object.create(null),Nt,Jt,ur,yr,Fr,Gr,Wr;for(Nt=0,Jt=0;Nt<re.length;Nt++)ur=re[Nt],Ze.hasOwnProperty(ur)?Jt++:(pe.push({command:zt.removeLayer,args:[ur]}),st.splice(st.indexOf(ur,Jt),1));for(Nt=0,Jt=0;Nt<ge.length;Nt++)ur=ge[ge.length-1-Nt],st[st.length-1-Nt]!==ur&&(_e.hasOwnProperty(ur)?(pe.push({command:zt.removeLayer,args:[ur]}),st.splice(st.lastIndexOf(ur,st.length-Jt),1)):Jt++,Gr=st[st.length-Nt],pe.push({command:zt.addLayer,args:[Ze[ur],Gr]}),st.splice(st.length-Nt,0,ur),mt[ur]=!0);for(Nt=0;Nt<ge.length;Nt++)if(ur=ge[Nt],yr=_e[ur],Fr=Ze[ur],!(mt[ur]||i.deepEqual(yr,Fr))){if(!i.deepEqual(yr.source,Fr.source)||!i.deepEqual(yr["source-layer"],Fr["source-layer"])||!i.deepEqual(yr.type,Fr.type)){pe.push({command:zt.removeLayer,args:[ur]}),Gr=st[st.lastIndexOf(ur)+1],pe.push({command:zt.addLayer,args:[Fr,Gr]});continue}Ir(yr.layout,Fr.layout,pe,ur,null,zt.setLayoutProperty),Ir(yr.paint,Fr.paint,pe,ur,null,zt.setPaintProperty),i.deepEqual(yr.filter,Fr.filter)||pe.push({command:zt.setFilter,args:[ur,Fr.filter]}),(!i.deepEqual(yr.minzoom,Fr.minzoom)||!i.deepEqual(yr.maxzoom,Fr.maxzoom))&&pe.push({command:zt.setLayerZoomRange,args:[ur,Fr.minzoom,Fr.maxzoom]});for(Wr in yr)yr.hasOwnProperty(Wr)&&(Wr==="layout"||Wr==="paint"||Wr==="filter"||Wr==="metadata"||Wr==="minzoom"||Wr==="maxzoom"||(Wr.indexOf("paint.")===0?Ir(yr[Wr],Fr[Wr],pe,ur,Wr.slice(6),zt.setPaintProperty):i.deepEqual(yr[Wr],Fr[Wr])||pe.push({command:zt.setLayerProperty,args:[ur,Wr,Fr[Wr]]})));for(Wr in Fr)!Fr.hasOwnProperty(Wr)||yr.hasOwnProperty(Wr)||Wr==="layout"||Wr==="paint"||Wr==="filter"||Wr==="metadata"||Wr==="minzoom"||Wr==="maxzoom"||(Wr.indexOf("paint.")===0?Ir(yr[Wr],Fr[Wr],pe,ur,Wr.slice(6),zt.setPaintProperty):i.deepEqual(yr[Wr],Fr[Wr])||pe.push({command:zt.setLayerProperty,args:[ur,Wr,Fr[Wr]]}))}}function In(ve,X){if(!ve)return[{command:zt.setStyle,args:[X]}];var pe=[];try{if(!i.deepEqual(ve.version,X.version))return[{command:zt.setStyle,args:[X]}];i.deepEqual(ve.center,X.center)||pe.push({command:zt.setCenter,args:[X.center]}),i.deepEqual(ve.zoom,X.zoom)||pe.push({command:zt.setZoom,args:[X.zoom]}),i.deepEqual(ve.bearing,X.bearing)||pe.push({command:zt.setBearing,args:[X.bearing]}),i.deepEqual(ve.pitch,X.pitch)||pe.push({command:zt.setPitch,args:[X.pitch]}),i.deepEqual(ve.sprite,X.sprite)||pe.push({command:zt.setSprite,args:[X.sprite]}),i.deepEqual(ve.glyphs,X.glyphs)||pe.push({command:zt.setGlyphs,args:[X.glyphs]}),i.deepEqual(ve.transition,X.transition)||pe.push({command:zt.setTransition,args:[X.transition]}),i.deepEqual(ve.light,X.light)||pe.push({command:zt.setLight,args:[X.light]});var re={},ge=[];Hr(ve.sources,X.sources,ge,re);var _e=[];ve.layers&&ve.layers.forEach(function(Ze){re[Ze.source]?pe.push({command:zt.removeLayer,args:[Ze.id]}):_e.push(Ze)}),pe=pe.concat(ge),jr(_e,X.layers,pe)}catch(Ze){console.warn("Unable to compute style diff:",Ze),pe=[{command:zt.setStyle,args:[X]}]}return pe}var Dn=function(X,pe){this.reset(X,pe)};Dn.prototype.reset=function(X,pe){this.points=X||[],this._distances=[0];for(var re=1;re<this.points.length;re++)this._distances[re]=this._distances[re-1]+this.points[re].dist(this.points[re-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(pe||0,this.length*.5),this.paddedLength=this.length-this.padding*2},Dn.prototype.lerp=function(X){if(this.points.length===1)return this.points[0];X=i.clamp(X,0,1);for(var pe=1,re=this._distances[pe],ge=X*this.paddedLength+this.padding;re<ge&&pe<this._distances.length;)re=this._distances[++pe];var _e=pe-1,Ze=this._distances[_e],st=re-Ze,mt=st>0?(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;Ze<this.xCellCount*this.yCellCount;Ze++)ge.push([]),_e.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=X,this.height=pe,this.xScale=this.xCellCount/X,this.yScale=this.yCellCount/pe,this.boxUid=0,this.circleUid=0};xr.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},xr.prototype.insert=function(X,pe,re,ge,_e){this._forEachCell(pe,re,ge,_e,this._insertBoxCell,this.boxUid++),this.boxKeys.push(X),this.bboxes.push(pe),this.bboxes.push(re),this.bboxes.push(ge),this.bboxes.push(_e)},xr.prototype.insertCircle=function(X,pe,re,ge){this._forEachCell(pe-ge,re-ge,pe+ge,re+ge,this._insertCircleCell,this.circleUid++),this.circleKeys.push(X),this.circles.push(pe),this.circles.push(re),this.circles.push(ge)},xr.prototype._insertBoxCell=function(X,pe,re,ge,_e,Ze){this.boxCells[_e].push(Ze)},xr.prototype._insertCircleCell=function(X,pe,re,ge,_e,Ze){this.circleCells[_e].push(Ze)},xr.prototype._query=function(X,pe,re,ge,_e,Ze){if(re<0||X>this.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;mt<this.boxKeys.length;mt++)st.push({key:this.boxKeys[mt],x1:this.bboxes[mt*4],y1:this.bboxes[mt*4+1],x2:this.bboxes[mt*4+2],y2:this.bboxes[mt*4+3]});for(var Nt=0;Nt<this.circleKeys.length;Nt++){var Jt=this.circles[Nt*3],ur=this.circles[Nt*3+1],yr=this.circles[Nt*3+2];st.push({key:this.circleKeys[Nt],x1:Jt-yr,y1:ur-yr,x2:Jt+yr,y2:ur+yr})}return Ze?st.filter(Ze):st}else{var Fr={hitTest:_e,seenUids:{box:{},circle:{}}};return this._forEachCell(X,pe,re,ge,this._queryCell,st,Fr,Ze),_e?st.length>0: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<Fr.length;yr+=1){var Gr=Fr[yr];if(!Nt.box[Gr]){Nt.box[Gr]=!0;var Wr=Gr*4;if(X<=ur[Wr+2]&&pe<=ur[Wr+3]&&re>=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;sn<Sn.length;sn+=1){var zn=Sn[sn];if(!Nt.circle[zn]){Nt.circle[zn]=!0;var Yn=zn*3;if(this._circleAndRectCollide(Qr[Yn],Qr[Yn+1],Qr[Yn+2],X,pe,re,ge)&&(!mt||mt(this.circleKeys[zn]))){if(st.hitTest)return Ze.push(!0),!0;var Xn=Qr[Yn],Zn=Qr[Yn+1],ra=Qr[Yn+2];Ze.push({key:this.circleKeys[zn],x1:Xn-ra,y1:Zn-ra,x2:Xn+ra,y2:Zn+ra})}}}},xr.prototype._queryCellCircle=function(X,pe,re,ge,_e,Ze,st,mt){var Nt=st.circle,Jt=st.seenUids,ur=this.boxCells[_e];if(ur!==null)for(var yr=this.bboxes,Fr=0,Gr=ur;Fr<Gr.length;Fr+=1){var Wr=Gr[Fr];if(!Jt.box[Wr]){Jt.box[Wr]=!0;var Vr=Wr*4;if(this._circleAndRectCollide(Nt.x,Nt.y,Nt.radius,yr[Vr+0],yr[Vr+1],yr[Vr+2],yr[Vr+3])&&(!mt||mt(this.boxKeys[Wr])))return Ze.push(!0),!0}}var Qr=this.circleCells[_e];if(Qr!==null)for(var sn=this.circles,Sn=0,zn=Qr;Sn<zn.length;Sn+=1){var Yn=zn[Sn];if(!Jt.circle[Yn]){Jt.circle[Yn]=!0;var Xn=Yn*3;if(this._circlesCollide(sn[Xn],sn[Xn+1],sn[Xn+2],Nt.x,Nt.y,Nt.radius)&&(!mt||mt(this.circleKeys[Yn])))return Ze.push(!0),!0}}},xr.prototype._forEachCell=function(X,pe,re,ge,_e,Ze,st,mt){for(var Nt=this._convertToXCellCoord(X),Jt=this._convertToYCellCoord(pe),ur=this._convertToXCellCoord(re),yr=this._convertToYCellCoord(ge),Fr=Nt;Fr<=ur;Fr++)for(var Gr=Jt;Gr<=yr;Gr++){var Wr=this.xCellCount*Gr+Fr;if(_e.call(this,X,pe,re,ge,Wr,Ze,st,mt))return}},xr.prototype._convertToXCellCoord=function(X){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(X*this.xScale)))},xr.prototype._convertToYCellCoord=function(X){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(X*this.yScale)))},xr.prototype._circlesCollide=function(X,pe,re,ge,_e,Ze){var st=ge-X,mt=_e-pe,Nt=re+Ze;return Nt*Nt>st*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<Fr.length;Vr++){var Qr=Fr.get(Vr);if(Qr.hidden||Qr.writingMode===i.WritingMode.vertical&&!Wr){ea(Qr.numGlyphs,ur);continue}Wr=!1;var sn=[Qr.anchorX,Qr.anchorY,0,1];if(i.transformMat4(sn,sn,X),!vn(sn,Jt)){ea(Qr.numGlyphs,ur);continue}var Sn=sn[3],zn=qr(pe.transform.cameraToCenterDistance,Sn),Yn=i.evaluateSizeForFeature(mt,Nt,Qr),Xn=Ze?Yn/zn:Yn*zn,Zn=new i.Point(Qr.anchorX,Qr.anchorY),ra=Nr(Zn,ge).point,fa={},ua=jn(Qr,Xn,!1,st,X,ge,_e,ve.glyphOffsetArray,yr,ur,ra,Zn,fa,Gr);Wr=ua.useVertical,(ua.notEnoughRoom||Wr||ua.needsFlipping&&jn(Qr,Xn,!0,st,X,ge,_e,ve.glyphOffsetArray,yr,ur,ra,Zn,fa,Gr).notEnoughRoom)&&ea(Qr.numGlyphs,ur)}re?ve.text.dynamicLayoutVertexBuffer.updateData(ur):ve.icon.dynamicLayoutVertexBuffer.updateData(ur)}function Tn(ve,X,pe,re,ge,_e,Ze,st,mt,Nt,Jt){var ur=st.glyphStartIndex+st.numGlyphs,yr=st.lineStartIndex,Fr=st.lineStartIndex+st.lineLength,Gr=X.getoffsetX(st.glyphStartIndex),Wr=X.getoffsetX(ur-1),Vr=sa(ve*Gr,pe,re,ge,_e,Ze,st.segment,yr,Fr,mt,Nt,Jt);if(!Vr)return null;var Qr=sa(ve*Wr,pe,re,ge,_e,Ze,st.segment,yr,Fr,mt,Nt,Jt);return Qr?{first:Vr,last:Qr}:null}function Pn(ve,X,pe,re){if(ve===i.WritingMode.horizontal){var ge=Math.abs(pe.y-X.y),_e=Math.abs(pe.x-X.x)*re;if(ge>_e)return{useVertical:!0}}return(ve===i.WritingMode.vertical?X.y<pe.y:X.x>pe.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;fa<sn-1;fa++)Qr.push(sa(Gr*st.getoffsetX(fa),Wr,Vr,pe,Jt,ur,ve.segment,Sn,zn,mt,_e,yr));Qr.push(Yn.last)}else{if(re&&!pe){var ua=Nr(ur,ge).point,pa=ve.lineStartIndex+ve.segment+1,wa=new i.Point(mt.getx(pa),mt.gety(pa)),Ia=Nr(wa,ge),Va=Ia.signedDistanceFromCamera>0?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;ja<La.length;ja+=1){var oi=La[ja];i.addDynamicAttributes(Nt,oi.point,oi.angle)}return{}}function qn(ve,X,pe,re,ge){var _e=Nr(ve.add(ve.sub(X)._unit()),ge).point,Ze=pe.sub(_e);return pe.add(Ze._mult(re/Ze.mag()))}function sa(ve,X,pe,re,ge,_e,Ze,st,mt,Nt,Jt,ur){var yr=re?ve-X:ve+X,Fr=yr>0?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<st||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<ve;pe++){var re=X.length;X.resize(re+4),X.float32.set(ta,re*3)}}function Mr(ve,X,pe){var re=X[0],ge=X[1];return ve[0]=pe[0]*re+pe[4]*ge+pe[12],ve[1]=pe[1]*re+pe[5]*ge+pe[13],ve[3]=pe[3]*re+pe[7]*ge+pe[15],ve}var on=100,nn=function(X,pe,re){pe===void 0&&(pe=new xr(X.width+2*on,X.height+2*on,25)),re===void 0&&(re=new xr(X.width+2*on,X.height+2*on,25)),this.transform=X,this.grid=pe,this.ignoredGrid=re,this.pitchfactor=Math.cos(X._pitch)*X.cameraToCenterDistance,this.screenRightBoundary=X.width+on,this.screenBottomBoundary=X.height+on,this.gridRightBoundary=X.width+2*on,this.gridBottomBoundary=X.height+2*on};nn.prototype.placeCollisionBox=function(X,pe,re,ge,_e){var Ze=this.projectAndGetPerspectiveRatio(ge,X.anchorPointX,X.anchorPointY),st=re*Ze.perspectiveRatio,mt=X.x1*st+Ze.point.x,Nt=X.y1*st+Ze.point.y,Jt=X.x2*st+Ze.point.x,ur=X.y2*st+Ze.point.y;return!this.isInsideGrid(mt,Nt,Jt,ur)||!pe&&this.grid.hitTest(mt,Nt,Jt,ur,_e)?{box:[],offscreen:!1}:{box:[mt,Nt,Jt,ur],offscreen:this.isOffscreen(mt,Nt,Jt,ur)}},nn.prototype.placeCollisionCircles=function(X,pe,re,ge,_e,Ze,st,mt,Nt,Jt,ur,yr,Fr){var Gr=[],Wr=new i.Point(pe.anchorX,pe.anchorY),Vr=Nr(Wr,Ze),Qr=qr(this.transform.cameraToCenterDistance,Vr.signedDistanceFromCamera),sn=Jt?_e/Qr:_e*Qr,Sn=sn/i.ONE_EM,zn=Nr(Wr,st).point,Yn={},Xn=pe.lineOffsetX*Sn,Zn=pe.lineOffsetY*Sn,ra=Tn(Sn,ge,Xn,Zn,!1,zn,Wr,pe,re,st,Yn),fa=!1,ua=!1,pa=!0;if(ra){for(var wa=yr*.5*Qr+Fr,Ia=new i.Point(-on,-on),Va=new i.Point(this.screenRightBoundary,this.screenBottomBoundary),ii=new Dn,Ga=ra.first,ja=ra.last,La=[],oi=Ga.path.length-1;oi>=1;oi--)La.push(Ga.path[oi]);for(var ui=1;ui<ja.path.length;ui++)La.push(ja.path[ui]);var ci=wa*2.5;if(mt){var Ka=La.map(function(Kl){return Nr(Kl,mt)});Ka.some(function(Kl){return Kl.signedDistanceFromCamera<=0})?La=[]:La=Ka.map(function(Kl){return Kl.point})}var Ti=[];if(La.length>0){for(var Ha=La[0].clone(),Qa=La[0].clone(),Ui=1;Ui<La.length;Ui++)Ha.x=Math.min(Ha.x,La[Ui].x),Ha.y=Math.min(Ha.y,La[Ui].y),Qa.x=Math.max(Qa.x,La[Ui].x),Qa.y=Math.max(Qa.y,La[Ui].y);Ha.x>=Ia.x&&Qa.x<=Va.x&&Ha.y>=Ia.y&&Qa.y<=Va.y?Ti=[La]:Qa.x<Ia.x||Ha.x>Va.x||Qa.y<Ia.y||Ha.y>Va.y?Ti=[]:Ti=i.clipLine([La],Ia.x,Ia.y,Va.x,Va.y)}for(var no=0,tl=Ti;no<tl.length;no+=1){var rl=tl[no];ii.reset(rl,wa*.25);var Yl=0;ii.length<=.5*wa?Yl=1:Yl=Math.ceil(ii.paddedLength/ci)+1;for(var Zl=0;Zl<Yl;Zl++){var Au=Zl/Math.max(Yl-1,1),Xl=ii.lerp(Au),ns=Xl.x+on,nf=Xl.y+on;Gr.push(ns,nf,wa,0);var Oo=ns-wa,Ns=nf-wa,jl=ns+wa,Sl=nf+wa;if(pa=pa&&this.isOffscreen(Oo,Ns,jl,Sl),ua=ua||this.isInsideGrid(Oo,Ns,jl,Sl),!X&&this.grid.hitTestCircle(ns,nf,wa,ur)&&(fa=!0,!Nt))return{circles:[],offscreen:!1,collisionDetected:fa}}}}return{circles:!Nt&&fa||!ua?[]:Gr,offscreen:pa,collisionDetected:fa}},nn.prototype.queryRenderedSymbols=function(X){if(X.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};for(var pe=[],re=1/0,ge=1/0,_e=-1/0,Ze=-1/0,st=0,mt=X;st<mt.length;st+=1){var Nt=mt[st],Jt=new i.Point(Nt.x+on,Nt.y+on);re=Math.min(re,Jt.x),ge=Math.min(ge,Jt.y),_e=Math.max(_e,Jt.x),Ze=Math.max(Ze,Jt.y),pe.push(Jt)}for(var ur=this.grid.query(re,ge,_e,Ze).concat(this.ignoredGrid.query(re,ge,_e,Ze)),yr={},Fr={},Gr=0,Wr=ur;Gr<Wr.length;Gr+=1){var Vr=Wr[Gr],Qr=Vr.key;if(yr[Qr.bucketInstanceId]===void 0&&(yr[Qr.bucketInstanceId]={}),!yr[Qr.bucketInstanceId][Qr.featureIndex]){var sn=[new i.Point(Vr.x1,Vr.y1),new i.Point(Vr.x2,Vr.y1),new i.Point(Vr.x2,Vr.y2),new i.Point(Vr.x1,Vr.y2)];i.polygonIntersectsPolygon(pe,sn)&&(yr[Qr.bucketInstanceId][Qr.featureIndex]=!0,Fr[Qr.bucketInstanceId]===void 0&&(Fr[Qr.bucketInstanceId]=[]),Fr[Qr.bucketInstanceId].push(Qr.featureIndex))}}return Fr},nn.prototype.insertCollisionBox=function(X,pe,re,ge,_e){var Ze=pe?this.ignoredGrid:this.grid,st={bucketInstanceId:re,featureIndex:ge,collisionGroupID:_e};Ze.insert(st,X[0],X[1],X[2],X[3])},nn.prototype.insertCollisionCircles=function(X,pe,re,ge,_e){for(var Ze=pe?this.ignoredGrid:this.grid,st={bucketInstanceId:re,featureIndex:ge,collisionGroupID:_e},mt=0;mt<X.length;mt+=4)Ze.insertCircle(st,X[mt],X[mt+1],X[mt+2])},nn.prototype.projectAndGetPerspectiveRatio=function(X,pe,re){var ge=[pe,re,0,1];Mr(ge,ge,X);var _e=new i.Point((ge[0]/ge[3]+1)/2*this.transform.width+on,(-ge[1]/ge[3]+1)/2*this.transform.height+on);return{point:_e,perspectiveRatio:.5+.5*(this.transform.cameraToCenterDistance/ge[3])}},nn.prototype.isOffscreen=function(X,pe,re,ge){return re<on||X>=this.screenRightBoundary||ge<on||pe>this.screenBottomBoundary},nn.prototype.isInsideGrid=function(X,pe,re,ge){return re>=0&&X<this.gridRightBoundary&&ge>=0&&pe<this.gridBottomBoundary},nn.prototype.getViewportMatrix=function(){var X=i.identity([]);return i.translate(X,X,[-on,-on,0]),X};function gn(ve,X,pe){return X*(i.EXTENT/(ve.tileSize*Math.pow(2,pe-ve.tileID.overscaledZ)))}var Un=function(X,pe,re,ge){X?this.opacity=Math.max(0,Math.min(1,X.opacity+(X.placed?pe:-pe))):this.opacity=ge&&re?1:0,this.placed=re};Un.prototype.isHidden=function(){return this.opacity===0&&!this.placed};var En=function(X,pe,re,ge,_e){this.text=new Un(X?X.text:null,pe,re,_e),this.icon=new Un(X?X.icon:null,pe,ge,_e)};En.prototype.isHidden=function(){return this.text.isHidden()&&this.icon.isHidden()};var Cn=function(X,pe,re){this.text=X,this.icon=pe,this.skipFade=re},Hn=function(){this.invProjMatrix=i.create(),this.viewportMatrix=i.create(),this.circles=[]},aa=function(X,pe,re,ge,_e){this.bucketInstanceId=X,this.featureIndex=pe,this.sourceLayerIndex=re,this.bucketIndex=ge,this.tileID=_e},Pa=function(X){this.crossSourceCollisions=X,this.maxGroupID=0,this.collisionGroups={}};Pa.prototype.get=function(X){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[X]){var pe=++this.maxGroupID;this.collisionGroups[X]={ID:pe,predicate:function(re){return re.collisionGroupID===pe}}}return this.collisionGroups[X]};function Za(ve,X,pe,re,ge){var _e=i.getAnchorAlignment(ve),Ze=_e.horizontalAlign,st=_e.verticalAlign,mt=-(Ze-.5)*X,Nt=-(st-.5)*pe,Jt=i.evaluateVariableOffset(ve,re);return new i.Point(mt+Jt[0]*ge,Nt+Jt[1]*ge)}function Xt(ve,X,pe,re,ge,_e){var Ze=ve.x1,st=ve.x2,mt=ve.y1,Nt=ve.y2,Jt=ve.anchorPointX,ur=ve.anchorPointY,yr=new i.Point(X,pe);return re&&yr._rotate(ge?_e:-_e),{x1:Ze+yr.x,y1:mt+yr.y,x2:st+yr.x,y2:Nt+yr.y,anchorPointX:Jt,anchorPointY:ur}}var wr=function(X,pe,re,ge){this.transform=X.clone(),this.collisionIndex=new nn(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=pe,this.retainedQueryData={},this.collisionGroups=new Pa(re),this.collisionCircleArrays={},this.prevPlacement=ge,ge&&(ge.prevPlacement=void 0),this.placedOrientations={}};wr.prototype.getBucketParts=function(X,pe,re,ge){var _e=re.getBucket(pe),Ze=re.latestFeatureIndex;if(!(!_e||!Ze||pe.id!==_e.layerIds[0])){var st=re.collisionBoxArray,mt=_e.layers[0].layout,Nt=Math.pow(2,this.transform.zoom-re.tileID.overscaledZ),Jt=re.tileSize/i.EXTENT,ur=this.transform.calculatePosMatrix(re.tileID.toUnwrapped()),yr=mt.get("text-pitch-alignment")==="map",Fr=mt.get("text-rotation-alignment")==="map",Gr=gn(re,1,this.transform.zoom),Wr=Ar(ur,yr,Fr,this.transform,Gr),Vr=null;if(yr){var Qr=Or(ur,yr,Fr,this.transform,Gr);Vr=i.multiply([],this.transform.labelPlaneMatrix,Qr)}this.retainedQueryData[_e.bucketInstanceId]=new aa(_e.bucketInstanceId,Ze,_e.sourceLayerIndex,_e.index,re.tileID);var sn={bucket:_e,layout:mt,posMatrix:ur,textLabelPlaneMatrix:Wr,labelToScreenMatrix:Vr,scale:Nt,textPixelRatio:Jt,holdingForFade:re.holdingForFade(),collisionBoxArray:st,partiallyEvaluatedTextSize:i.evaluateSizeForZoom(_e.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(_e.sourceID)};if(ge)for(var Sn=0,zn=_e.sortKeyRanges;Sn<zn.length;Sn+=1){var Yn=zn[Sn],Xn=Yn.sortKey,Zn=Yn.symbolInstanceStart,ra=Yn.symbolInstanceEnd;X.push({sortKey:Xn,symbolInstanceStart:Zn,symbolInstanceEnd:ra,parameters:sn})}else X.push({symbolInstanceStart:0,symbolInstanceEnd:_e.symbolInstances.length,parameters:sn})}},wr.prototype.attemptAnchorPlacement=function(X,pe,re,ge,_e,Ze,st,mt,Nt,Jt,ur,yr,Fr,Gr,Wr){var Vr=[yr.textOffset0,yr.textOffset1],Qr=Za(X,re,ge,Vr,_e),sn=this.collisionIndex.placeCollisionBox(Xt(pe,Qr.x,Qr.y,Ze,st,this.transform.angle),ur,mt,Nt,Jt.predicate);if(Wr){var Sn=this.collisionIndex.placeCollisionBox(Xt(Wr,Qr.x,Qr.y,Ze,st,this.transform.angle),ur,mt,Nt,Jt.predicate);if(Sn.box.length===0)return}if(sn.box.length>0){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;bs<qh.length;bs+=1){var sd=qh[bs];if(sd===i.WritingMode.vertical?(Ka=xs(),Ti=Ka):Ka=Yi(),Ka&&Ka.box&&Ka.box.length)break}else Ka=Yi()};if(st.get("text-variable-anchor")){var Oo=st.get("text-variable-anchor");if(ge.prevPlacement&&ge.prevPlacement.variableOffsets[Ga.crossTileID]){var Ns=ge.prevPlacement.variableOffsets[Ga.crossTileID];Oo.indexOf(Ns.anchor)>0&&(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<zg;++ev){var Og=Oo[ev%Oo.length],Ng=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<Qa.circles.length;Ac+=4)Tc.circles.push(Qa.circles[Ac+0]),Tc.circles.push(Qa.circles[Ac+1]),Tc.circles.push(Qa.circles[Ac+2]),Tc.circles.push(Qa.collisionDetected?1:0)}ge.placements[Ga.crossTileID]=new Cn(La||ra,oi||fa,ui||Ze.justReloaded),pe[Ga.crossTileID]=!0}};if(Zn)for(var pa=Ze.getSortedSymbolIndexes(this.transform.angle),wa=pa.length-1;wa>=0;--wa){var Ia=pa[wa];ua(Ze.symbolInstances.get(Ia),Ze.collisionArrays[Ia])}else for(var Va=X.symbolInstanceStart;Va<X.symbolInstanceEnd;Va++)ua(Ze.symbolInstances.get(Va),Ze.collisionArrays[Va]);if(re&&Ze.bucketInstanceId in this.collisionCircleArrays){var ii=this.collisionCircleArrays[Ze.bucketInstanceId];i.invert(ii.invProjMatrix,mt),ii.viewportMatrix=this.collisionIndex.getViewportMatrix()}Ze.justReloaded=!1},wr.prototype.markUsedJustification=function(X,pe,re,ge){var _e={left:re.leftJustifiedTextSymbolIndex,center:re.centerJustifiedTextSymbolIndex,right:re.rightJustifiedTextSymbolIndex},Ze;ge===i.WritingMode.vertical?Ze=re.verticalPlacedTextSymbolIndex:Ze=_e[i.getAnchorJustification(pe)];for(var st=[re.leftJustifiedTextSymbolIndex,re.centerJustifiedTextSymbolIndex,re.rightJustifiedTextSymbolIndex,re.verticalPlacedTextSymbolIndex],mt=0,Nt=st;mt<Nt.length;mt+=1){var Jt=Nt[mt];Jt>=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;st<mt.length;st+=1){var Nt=mt[st];X.text.placedSymbolArray.get(Nt).placedOrientation=ge}re.verticalPlacedTextSymbolIndex&&(X.text.placedSymbolArray.get(re.verticalPlacedTextSymbolIndex).placedOrientation=_e)},wr.prototype.commit=function(X){this.commitTime=X,this.zoomAtLastRecencyCheck=this.transform.zoom;var pe=this.prevPlacement,re=!1;this.prevZoomAdjustment=pe?pe.zoomAdjustment(this.transform.zoom):0;var ge=pe?pe.symbolFadeChange(X):1,_e=pe?pe.opacities:{},Ze=pe?pe.variableOffsets:{},st=pe?pe.placedOrientations:{};for(var mt in this.placements){var Nt=this.placements[mt],Jt=_e[mt];Jt?(this.opacities[mt]=new En(Jt,ge,Nt.text,Nt.icon),re=re||Nt.text!==Jt.text.placed||Nt.icon!==Jt.icon.placed):(this.opacities[mt]=new En(null,ge,Nt.text,Nt.icon,Nt.skipFade),re=re||Nt.text||Nt.icon)}for(var ur in _e){var yr=_e[ur];if(!this.opacities[ur]){var Fr=new En(yr,ge,!1,!1);Fr.isHidden()||(this.opacities[ur]=Fr,re=re||yr.text.placed||yr.icon.placed)}}for(var Gr in Ze)!this.variableOffsets[Gr]&&this.opacities[Gr]&&!this.opacities[Gr].isHidden()&&(this.variableOffsets[Gr]=Ze[Gr]);for(var Wr in st)!this.placedOrientations[Wr]&&this.opacities[Wr]&&!this.opacities[Wr].isHidden()&&(this.placedOrientations[Wr]=st[Wr]);re?this.lastPlacementChangeTime=X:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=pe?pe.lastPlacementChangeTime:X)},wr.prototype.updateLayerOpacities=function(X,pe){for(var re={},ge=0,_e=pe;ge<_e.length;ge+=1){var Ze=_e[ge],st=Ze.getBucket(X);st&&Ze.latestFeatureIndex&&X.id===st.layerIds[0]&&this.updateBucketOpacities(st,re,Ze.collisionBoxArray)}},wr.prototype.updateBucketOpacities=function(X,pe,re){var ge=this;X.hasTextData()&&X.text.opacityVertexArray.clear(),X.hasIconData()&&X.icon.opacityVertexArray.clear(),X.hasIconCollisionBoxData()&&X.iconCollisionBox.collisionVertexArray.clear(),X.hasTextCollisionBoxData()&&X.textCollisionBox.collisionVertexArray.clear();var _e=X.layers[0].layout,Ze=new En(null,0,!1,!1,!0),st=_e.get("text-allow-overlap"),mt=_e.get("icon-allow-overlap"),Nt=_e.get("text-variable-anchor"),Jt=_e.get("text-rotation-alignment")==="map",ur=_e.get("text-pitch-alignment")==="map",yr=_e.get("icon-text-fit")!=="none",Fr=new En(null,0,st&&(mt||!X.hasIconData()||_e.get("icon-optional")),mt&&(st||!X.hasTextData()||_e.get("text-optional")),!0);!X.collisionArrays&&re&&(X.hasIconCollisionBoxData()||X.hasTextCollisionBoxData())&&X.deserializeCollisionBoxes(re);for(var Gr=function(sn,Sn,zn){for(var Yn=0;Yn<Sn/4;Yn++)sn.opacityVertexArray.emplaceBack(zn)},Wr=function(sn){var Sn=X.symbolInstances.get(sn),zn=Sn.numHorizontalGlyphVertices,Yn=Sn.numVerticalGlyphVertices,Xn=Sn.crossTileID,Zn=pe[Xn],ra=ge.opacities[Xn];Zn?ra=Ze:ra||(ra=Fr,ge.opacities[Xn]=ra),pe[Xn]=!0;var fa=zn>0||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;Vr<X.symbolInstances.length;Vr++)Wr(Vr);if(X.sortFeatures(this.transform.angle),this.retainedQueryData[X.bucketInstanceId]&&(this.retainedQueryData[X.bucketInstanceId].featureSortOrder=X.featureSortOrder),X.hasTextData()&&X.text.opacityVertexBuffer&&X.text.opacityVertexBuffer.updateData(X.text.opacityVertexArray),X.hasIconData()&&X.icon.opacityVertexBuffer&&X.icon.opacityVertexBuffer.updateData(X.icon.opacityVertexArray),X.hasIconCollisionBoxData()&&X.iconCollisionBox.collisionVertexBuffer&&X.iconCollisionBox.collisionVertexBuffer.updateData(X.iconCollisionBox.collisionVertexArray),X.hasTextCollisionBoxData()&&X.textCollisionBox.collisionVertexBuffer&&X.textCollisionBox.collisionVertexBuffer.updateData(X.textCollisionBox.collisionVertexArray),X.bucketInstanceId in this.collisionCircleArrays){var Qr=this.collisionCircleArrays[X.bucketInstanceId];X.placementInvProjMatrix=Qr.invProjMatrix,X.placementViewportMatrix=Qr.viewportMatrix,X.collisionCircleArray=Qr.circles,delete this.collisionCircleArrays[X.bucketInstanceId]}},wr.prototype.symbolFadeChange=function(X){return this.fadeDuration===0?1:(X-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment},wr.prototype.zoomAdjustment=function(X){return Math.max(0,(this.transform.zoom-X)/1.5)},wr.prototype.hasTransitions=function(X){return this.stale||X-this.lastPlacementChangeTime<this.fadeDuration},wr.prototype.stillRecent=function(X,pe){var re=this.zoomAtLastRecencyCheck===pe?1-this.zoomAdjustment(pe):1;return this.zoomAtLastRecencyCheck=pe,this.commitTime+this.fadeDuration*re>X},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._currentTileIndex<X.length;){var st=X[this._currentTileIndex];if(pe.getBucketParts(Ze,ge,st,this._sortAcrossTiles),this._currentTileIndex++,_e())return!0}for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,Ze.sort(function(Nt,Jt){return Nt.sortKey-Jt.sortKey}));this._currentPartIndex<Ze.length;){var mt=Ze[this._currentPartIndex];if(pe.placeLayerBucketPart(mt,this._seenCrossTileIDs,re),this._currentPartIndex++,_e())return!0}return!1};var Wn=function(X,pe,re,ge,_e,Ze,st){this.placement=new wr(X,_e,Ze,st),this._currentPlacementIndex=pe.length-1,this._forceFullPlacement=re,this._showCollisionBoxes=ge,this._done=!1};Wn.prototype.isDone=function(){return this._done},Wn.prototype.continuePlacement=function(X,pe,re){for(var ge=this,_e=i.browser.now(),Ze=function(){var ur=i.browser.now()-_e;return ge._forceFullPlacement?!1:ur>2};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;ge<pe.length;ge++){var _e=pe.get(ge),Ze=_e.key;this.indexedSymbolInstances[Ze]||(this.indexedSymbolInstances[Ze]=[]),this.indexedSymbolInstances[Ze].push({crossTileID:_e.crossTileID,coord:this.getScaledCoordinates(_e,X)})}};On.prototype.getScaledCoordinates=function(X,pe){var re=pe.canonical.z-this.tileID.canonical.z,ge=yn/Math.pow(2,re);return{x:Math.floor((pe.canonical.x*i.EXTENT+X.anchorX)*ge),y:Math.floor((pe.canonical.y*i.EXTENT+X.anchorY)*ge)}},On.prototype.findMatches=function(X,pe,re){for(var ge=this.tileID.canonical.z<pe.canonical.z?1:Math.pow(2,this.tileID.canonical.z-pe.canonical.z),_e=0;_e<X.length;_e++){var Ze=X.get(_e);if(!Ze.crossTileID){var st=this.indexedSymbolInstances[Ze.key];if(st)for(var mt=this.getScaledCoordinates(Ze,pe),Nt=0,Jt=st;Nt<Jt.length;Nt+=1){var ur=Jt[Nt];if(Math.abs(ur.coord.x-mt.x)<=ge&&Math.abs(ur.coord.y-mt.y)<=ge&&!re[ur.crossTileID]){re[ur.crossTileID]=!0,Ze.crossTileID=ur.crossTileID;break}}}}};var $n=function(){this.maxCrossTileID=0};$n.prototype.generate=function(){return++this.maxCrossTileID};var la=function(){this.indexes={},this.usedCrossTileIDs={},this.lng=0};la.prototype.handleWrapJump=function(X){var pe=Math.round((X-this.lng)/360);if(pe!==0)for(var re in this.indexes){var ge=this.indexes[re],_e={};for(var Ze in ge){var st=ge[Ze];st.tileID=st.tileID.unwrapTo(st.tileID.wrap+pe),_e[st.tileID.key]=st}this.indexes[re]=_e}this.lng=X},la.prototype.addBucket=function(X,pe,re){if(this.indexes[X.overscaledZ]&&this.indexes[X.overscaledZ][X.key]){if(this.indexes[X.overscaledZ][X.key].bucketInstanceId===pe.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(X.overscaledZ,this.indexes[X.overscaledZ][X.key])}for(var ge=0;ge<pe.symbolInstances.length;ge++){var _e=pe.symbolInstances.get(ge);_e.crossTileID=0}this.usedCrossTileIDs[X.overscaledZ]||(this.usedCrossTileIDs[X.overscaledZ]={});var Ze=this.usedCrossTileIDs[X.overscaledZ];for(var st in this.indexes){var mt=this.indexes[st];if(Number(st)>X.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;Fr<pe.symbolInstances.length;Fr++){var Gr=pe.symbolInstances.get(Fr);Gr.crossTileID||(Gr.crossTileID=re.generate(),Ze[Gr.crossTileID]=!0)}return this.indexes[X.overscaledZ]===void 0&&(this.indexes[X.overscaledZ]={}),this.indexes[X.overscaledZ][X.key]=new On(X,pe.symbolInstances,pe.bucketInstanceId),!0},la.prototype.removeBucketCrossTileIDs=function(X,pe){for(var re in pe.indexedSymbolInstances)for(var ge=0,_e=pe.indexedSymbolInstances[re];ge<_e.length;ge+=1){var Ze=_e[ge];delete this.usedCrossTileIDs[X][Ze.crossTileID]}},la.prototype.removeStaleBuckets=function(X){var pe=!1;for(var re in this.indexes){var ge=this.indexes[re];for(var _e in ge)X[ge[_e].bucketInstanceId]||(this.removeBucketCrossTileIDs(re,ge[_e]),delete ge[_e],pe=!0)}return pe};var ia=function(){this.layerIndexes={},this.crossTileIDs=new $n,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}};ia.prototype.addLayer=function(X,pe,re){var ge=this.layerIndexes[X.id];ge===void 0&&(ge=this.layerIndexes[X.id]=new la);var _e=!1,Ze={};ge.handleWrapJump(re);for(var st=0,mt=pe;st<mt.length;st+=1){var Nt=mt[st],Jt=Nt.getBucket(X);!Jt||X.id!==Jt.layerIds[0]||(Jt.bucketInstanceId||(Jt.bucketInstanceId=++this.maxBucketInstanceId),ge.addBucket(Nt.tileID,Jt,this.crossTileIDs)&&(_e=!0),Ze[Jt.bucketInstanceId]=!0)}return ge.removeStaleBuckets(Ze)&&(_e=!0),_e},ia.prototype.pruneUnusedLayers=function(X){var pe={};X.forEach(function(ge){pe[ge]=!0});for(var re in this.layerIndexes)pe[re]||delete this.layerIndexes[re]};var oa=function(ve,X){return i.emitValidationErrors(ve,X&&X.filter(function(pe){return pe.identifier!=="source.canvas"}))},da=i.pick(zt,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData"]),Ki=i.pick(zt,["setCenter","setZoom","setBearing","setPitch"]),co=rr(),yo=function(ve){function X(pe,re){var ge=this;re===void 0&&(re={}),ve.call(this),this.map=pe,this.dispatcher=new I(Dt(),this),this.imageManager=new w,this.imageManager.setEventedParent(this),this.glyphManager=new S(pe._requestManager,re.localIdeographFontFamily),this.lineAtlas=new z(256,512),this.crossTileSymbolIndex=new ia,this._layers={},this._serializedLayers={},this._order=[],this.sourceCaches={},this.zoomHistory=new i.ZoomHistory,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("setReferrer",i.getReferrer());var _e=this;this._rtlTextPluginCallback=X.registerForPluginStateChange(function(Ze){var st={pluginStatus:Ze.pluginStatus,pluginURL:Ze.pluginURL};_e.dispatcher.broadcast("syncRTLPluginState",st,function(mt,Nt){if(i.triggerPluginCompletionEvent(mt),Nt){var Jt=Nt.every(function(yr){return yr});if(Jt)for(var ur in _e.sourceCaches)_e.sourceCaches[ur].reload()}})}),this.on("data",function(Ze){if(!(Ze.dataType!=="source"||Ze.sourceDataType!=="metadata")){var st=ge.sourceCaches[Ze.sourceId];if(st){var mt=st.getSource();if(!(!mt||!mt.vectorLayerIds))for(var Nt in ge._layers){var Jt=ge._layers[Nt];Jt.source===mt.id&&ge._validateLayer(Jt)}}}})}return ve&&(X.__proto__=ve),X.prototype=Object.create(ve&&ve.prototype),X.prototype.constructor=X,X.prototype.loadURL=function(re,ge){var _e=this;ge===void 0&&(ge={}),this.fire(new i.Event("dataloading",{dataType:"style"}));var Ze=typeof ge.validate=="boolean"?ge.validate:!i.isMapboxURL(re);re=this.map._requestManager.normalizeStyleURL(re,ge.accessToken);var st=this.map._requestManager.transformRequest(re,i.ResourceType.Style);this._request=i.getJSON(st,function(mt,Nt){_e._request=null,mt?_e.fire(new i.ErrorEvent(mt)):Nt&&_e._load(Nt,Ze)})},X.prototype.loadJSON=function(re,ge){var _e=this;ge===void 0&&(ge={}),this.fire(new i.Event("dataloading",{dataType:"style"})),this._request=i.browser.frame(function(){_e._request=null,_e._load(re,ge.validate!==!1)})},X.prototype.loadEmpty=function(){this.fire(new i.Event("dataloading",{dataType:"style"})),this._load(co,!1)},X.prototype._load=function(re,ge){if(!(ge&&oa(this,i.validateStyle(re)))){this._loaded=!0,this.stylesheet=re;for(var _e in re.sources)this.addSource(_e,re.sources[_e],{validate:!1});re.sprite?this._loadSprite(re.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(re.glyphs);var Ze=lr(this.stylesheet.layers);this._order=Ze.map(function(Jt){return Jt.id}),this._layers={},this._serializedLayers={};for(var st=0,mt=Ze;st<mt.length;st+=1){var Nt=mt[st];Nt=i.createStyleLayer(Nt),Nt.setEventedParent(this,{layer:{id:Nt.id}}),this._layers[Nt.id]=Nt,this._serializedLayers[Nt.id]=Nt.serialize()}this.dispatcher.broadcast("setLayers",this._serializeLayers(this._order)),this.light=new y(this.stylesheet.light),this.fire(new i.Event("data",{dataType:"style"})),this.fire(new i.Event("style.load"))}},X.prototype._loadSprite=function(re){var ge=this;this._spriteRequest=u(re,this.map._requestManager,function(_e,Ze){if(ge._spriteRequest=null,_e)ge.fire(new i.ErrorEvent(_e));else if(Ze)for(var st in Ze)ge.imageManager.addImage(st,Ze[st]);ge.imageManager.setLoaded(!0),ge._availableImages=ge.imageManager.listImages(),ge.dispatcher.broadcast("setImages",ge._availableImages),ge.fire(new i.Event("data",{dataType:"style"}))})},X.prototype._validateLayer=function(re){var ge=this.sourceCaches[re.source];if(ge){var _e=re.sourceLayer;if(_e){var Ze=ge.getSource();(Ze.type==="geojson"||Ze.vectorLayerIds&&Ze.vectorLayerIds.indexOf(_e)===-1)&&this.fire(new i.ErrorEvent(new Error('Source layer "'+_e+'" does not exist on source "'+Ze.id+'" as specified by style layer "'+re.id+'"')))}}},X.prototype.loaded=function(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(var re in this.sourceCaches)if(!this.sourceCaches[re].loaded())return!1;return!!this.imageManager.isLoaded()},X.prototype._serializeLayers=function(re){for(var ge=[],_e=0,Ze=re;_e<Ze.length;_e+=1){var st=Ze[_e],mt=this._layers[st];mt.type!=="custom"&&ge.push(mt.serialize())}return ge},X.prototype.hasTransitions=function(){if(this.light&&this.light.hasTransition())return!0;for(var re in this.sourceCaches)if(this.sourceCaches[re].hasTransition())return!0;for(var ge in this._layers)if(this._layers[ge].hasTransition())return!0;return!1},X.prototype._checkLoaded=function(){if(!this._loaded)throw new Error("Style is not done loading")},X.prototype.update=function(re){if(this._loaded){var ge=this._changed;if(this._changed){var _e=Object.keys(this._updatedLayers),Ze=Object.keys(this._removedLayers);(_e.length||Ze.length)&&this._updateWorkerLayers(_e,Ze);for(var st in this._updatedSources){var mt=this._updatedSources[st];mt==="reload"?this._reloadSource(st):mt==="clear"&&this._clearSource(st)}this._updateTilesForChangedImages();for(var Nt in this._updatedPaintProps)this._layers[Nt].updateTransitions(re);this.light.updateTransitions(re),this._resetUpdates()}for(var Jt in this.sourceCaches)this.sourceCaches[Jt].used=!1;for(var ur=0,yr=this._order;ur<yr.length;ur+=1){var Fr=yr[ur],Gr=this._layers[Fr];Gr.recalculate(re,this._availableImages),!Gr.isHidden(re.zoom)&&Gr.source&&(this.sourceCaches[Gr.source].used=!0)}this.light.recalculate(re),this.z=re.zoom,ge&&this.fire(new i.Event("data",{dataType:"style"}))}},X.prototype._updateTilesForChangedImages=function(){var re=Object.keys(this._changedImages);if(re.length){for(var ge in this.sourceCaches)this.sourceCaches[ge].reloadTilesForDependencies(["icons","patterns"],re);this._changedImages={}}},X.prototype._updateWorkerLayers=function(re,ge){this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(re),removedIds:ge})},X.prototype._resetUpdates=function(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={}},X.prototype.setState=function(re){var ge=this;if(this._checkLoaded(),oa(this,i.validateStyle(re)))return!1;re=i.clone$1(re),re.layers=lr(re.layers);var _e=In(this.serialize(),re).filter(function(st){return!(st.command in Ki)});if(_e.length===0)return!1;var Ze=_e.filter(function(st){return!(st.command in da)});if(Ze.length>0)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<ur.length;Jt+=1){var yr=ur[Jt],Fr=yr[Nt];if(Fr)for(var Gr=0,Wr=Fr;Gr<Wr.length;Gr+=1){var Vr=Wr[Gr];st.push(Vr)}}}}st.sort(function(Ia,Va){return Va.intersectionZ-Ia.intersectionZ});for(var Qr=[],sn=this._order.length-1;sn>=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]<sn)break;Qr.push(Yn),st.pop()}else for(var Xn=0,Zn=re;Xn<Zn.length;Xn+=1){var ra=Zn[Xn],fa=ra[Sn];if(fa)for(var ua=0,pa=fa;ua<pa.length;ua+=1){var wa=pa[ua];Qr.push(wa.feature)}}}return Qr},X.prototype.queryRenderedFeatures=function(re,ge,_e){ge&&ge.filter&&this._validate(i.validateStyle.filter,"queryRenderedFeatures.filter",ge.filter,null,ge);var Ze={};if(ge&&ge.layers){if(!Array.isArray(ge.layers))return this.fire(new i.ErrorEvent(new Error("parameters.layers must be an Array."))),[];for(var st=0,mt=ge.layers;st<mt.length;st+=1){var Nt=mt[st],Jt=this._layers[Nt];if(!Jt)return this.fire(new i.ErrorEvent(new Error("The layer '"+Nt+"' does not exist in the map's style and cannot be queried for features."))),[];Ze[Jt.source]=!0}}var ur=[];ge.availableImages=this._availableImages;for(var yr in this.sourceCaches)ge.layers&&!Ze[yr]||ur.push(q(this.sourceCaches[yr],this._layers,this._serializedLayers,re,ge,_e));return this.placement&&ur.push($(this._layers,this._serializedLayers,this.sourceCaches,re,ge,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(ur)},X.prototype.querySourceFeatures=function(re,ge){ge&&ge.filter&&this._validate(i.validateStyle.filter,"querySourceFeatures.filter",ge.filter,null,ge);var _e=this.sourceCaches[re];return _e?le(_e,ge):[]},X.prototype.addSourceType=function(re,ge,_e){if(X.getSourceType(re))return _e(new Error('A source type called "'+re+'" already exists.'));if(X.setSourceType(re,ge),!ge.workerSourceURL)return _e(null,null);this.dispatcher.broadcast("loadWorkerSource",{name:re,url:ge.workerSourceURL},_e)},X.prototype.getLight=function(){return this.light.getLight()},X.prototype.setLight=function(re,ge){ge===void 0&&(ge={}),this._checkLoaded();var _e=this.light.getLight(),Ze=!1;for(var st in re)if(!i.deepEqual(re[st],_e[st])){Ze=!0;break}if(Ze){var mt={now:i.browser.now(),transition:i.extend({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(re,ge),this.light.updateTransitions(mt)}},X.prototype._validate=function(re,ge,_e,Ze,st){return st===void 0&&(st={}),st&&st.validate===!1?!1:oa(this,re.call(i.validateStyle,i.extend({key:ge,style:this.serialize(),value:_e,styleSpec:i.styleSpec},Ze)))},X.prototype._remove=function(){this._request&&(this._request.cancel(),this._request=null),this._spriteRequest&&(this._spriteRequest.cancel(),this._spriteRequest=null),i.evented.off("pluginStateChange",this._rtlTextPluginCallback);for(var re in this._layers){var ge=this._layers[re];ge.setEventedParent(null)}for(var _e in this.sourceCaches)this.sourceCaches[_e].clearTiles(),this.sourceCaches[_e].setEventedParent(null);this.imageManager.setEventedParent(null),this.setEventedParent(null),this.dispatcher.remove()},X.prototype._clearSource=function(re){this.sourceCaches[re].clearTiles()},X.prototype._reloadSource=function(re){this.sourceCaches[re].resume(),this.sourceCaches[re].reload()},X.prototype._updateSources=function(re){for(var ge in this.sourceCaches)this.sourceCaches[ge].update(re)},X.prototype._generateCollisionBoxes=function(){for(var re in this.sourceCaches)this._reloadSource(re)},X.prototype._updatePlacement=function(re,ge,_e,Ze,st){st===void 0&&(st=!1);for(var mt=!1,Nt=!1,Jt={},ur=0,yr=this._order;ur<yr.length;ur+=1){var Fr=yr[ur],Gr=this._layers[Fr];if(Gr.type==="symbol"){if(!Jt[Gr.source]){var Wr=this.sourceCaches[Gr.source];Jt[Gr.source]=Wr.getRenderableIds(!0).map(function(Xn){return Wr.getTileByID(Xn)}).sort(function(Xn,Zn){return Zn.tileID.overscaledZ-Xn.tileID.overscaledZ||(Xn.tileID.isLessThan(Zn.tileID)?-1:1)})}var Vr=this.crossTileSymbolIndex.addLayer(Gr,Jt[Gr.source],re.center.lng);mt=mt||Vr}}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),st=st||this._layerOrderChanged||_e===0,(st||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(i.browser.now(),re.zoom))&&(this.pauseablePlacement=new Wn(re,this._order,st,ge,_e,Ze,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,Jt),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(i.browser.now()),Nt=!0),mt&&this.pauseablePlacement.placement.setStale()),Nt||mt)for(var Qr=0,sn=this._order;Qr<sn.length;Qr+=1){var Sn=sn[Qr],zn=this._layers[Sn];zn.type==="symbol"&&this.placement.updateLayerOpacities(zn,Jt[zn.source])}var Yn=!this.pauseablePlacement.isDone()||this.placement.hasTransitions(i.browser.now());return Yn},X.prototype._releaseSymbolFadeTiles=function(){for(var re in this.sourceCaches)this.sourceCaches[re].releaseSymbolFadeTiles()},X.prototype.getImages=function(re,ge,_e){this.imageManager.getImages(ge.icons,_e),this._updateTilesForChangedImages();var Ze=this.sourceCaches[ge.source];Ze&&Ze.setDependencies(ge.tileID.key,ge.type,ge.icons)},X.prototype.getGlyphs=function(re,ge,_e){this.glyphManager.getGlyphs(ge.stacks,_e)},X.prototype.getResource=function(re,ge,_e){return i.makeRequest(ge,_e)},X}(i.Evented);yo.getSourceType=j,yo.setSourceType=K,yo.registerForPluginStateChange=i.registerForPluginStateChange;var So=i.createLayout([{name:"a_pos",type:"Int16",components:2}]),mo=`#ifdef GL_ES
precision mediump float;
#else
#if !defined(lowp)
#define lowp
#endif
#if !defined(mediump)
#define mediump
#endif
#if !defined(highp)
#define highp
#endif
#endif`,cf=`#ifdef GL_ES
precision highp float;
#else
#if !defined(lowp)
#define lowp
#endif
#if !defined(mediump)
#define mediump
#endif
#if !defined(highp)
#define highp
#endif
#endif
vec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0
);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}`,qa=`uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,au="attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}",kl=`uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,Ji="uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}",Eo=`varying vec3 v_data;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define mediump float radius
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define highp vec4 stroke_color
#pragma mapbox: define mediump float stroke_width
#pragma mapbox: define lowp float stroke_opacity
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize mediump float radius
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize highp vec4 stroke_color
#pragma mapbox: initialize mediump float stroke_width
#pragma mapbox: initialize lowp float stroke_opacity
vec2 extrude=v_data.xy;float extrude_length=length(extrude);lowp float antialiasblur=v_data.z;float antialiased_blur=-max(blur,antialiasblur);float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));gl_FragColor=opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,qf=`uniform mat4 u_matrix;uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;varying vec3 v_data;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define mediump float radius
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define highp vec4 stroke_color
#pragma mapbox: define mediump float stroke_width
#pragma mapbox: define lowp float stroke_opacity
void main(void) {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize mediump float radius
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize highp vec4 stroke_color
#pragma mapbox: initialize mediump float stroke_width
#pragma mapbox: initialize lowp float stroke_opacity
vec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,0,1);} else {gl_Position=u_matrix*vec4(circle_center,0,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}lowp float antialiasblur=1.0/u_device_pixel_ratio/(radius+stroke_width);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`,iu="void main() {gl_FragColor=vec4(1.0);}",Ri="attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}",ou=`uniform highp float u_intensity;varying vec2 v_extrude;
#pragma mapbox: define highp float weight
#define GAUSS_COEF 0.3989422804014327
void main() {
#pragma mapbox: initialize highp float weight
float d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);gl_FragColor=vec4(val,1.0,1.0,1.0);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,ko=`uniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;varying vec2 v_extrude;
#pragma mapbox: define highp float weight
#pragma mapbox: define mediump float radius
const highp float ZERO=1.0/255.0/16.0;
#define GAUSS_COEF 0.3989422804014327
void main(void) {
#pragma mapbox: initialize highp float weight
#pragma mapbox: initialize mediump float radius
vec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec4 pos=vec4(floor(a_pos*0.5)+extrude,0,1);gl_Position=u_matrix*pos;}`,Wi=`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(0.0);
#endif
}`,Fo="uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}",ho="varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}",Vo="attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);gl_Position.xy+=(a_extrude+a_shift)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}",fs="varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}",Ls="attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}",eo="uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}",ec="attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,0,1);}",cs=`#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float opacity
gl_FragColor=color*opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,to=`attribute vec2 a_pos;uniform mat4 u_matrix;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float opacity
gl_Position=u_matrix*vec4(a_pos,0,1);}`,hf=`varying vec2 v_pos;
#pragma mapbox: define highp vec4 outline_color
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 outline_color
#pragma mapbox: initialize lowp float opacity
float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,Ps=`attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;
#pragma mapbox: define highp vec4 outline_color
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 outline_color
#pragma mapbox: initialize lowp float opacity
gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`,hs=`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
void main() {
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,vf=`uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`,df=`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
void main() {
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,eh=`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}`,su=`varying vec4 v_color;void main() {gl_FragColor=v_color;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,th=`uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec4 v_color;
#pragma mapbox: define highp float base
#pragma mapbox: define highp float height
#pragma mapbox: define highp vec4 color
void main() {
#pragma mapbox: initialize highp float base
#pragma mapbox: initialize highp float height
#pragma mapbox: initialize highp vec4 color
vec3 normal=a_normal_ed.xyz;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}`,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<ge.length;Jt++)this.boundPaintVertexBuffers[Jt]!==ge[Jt]&&(Nt=!0);var ur=!this.vao||this.boundProgram!==pe||this.boundLayoutVertexBuffer!==re||Nt||this.boundIndexBuffer!==_e||this.boundVertexOffset!==Ze||this.boundDynamicVertexBuffer!==st||this.boundDynamicVertexBuffer2!==mt;!X.extVertexArrayObject||ur?this.freshBind(pe,re,ge,_e,Ze,st,mt):(X.bindVertexArrayOES.set(this.vao),st&&st.bind(),_e&&_e.dynamicDraw&&_e.bind(),mt&&mt.bind())},$o.prototype.freshBind=function(X,pe,re,ge,_e,Ze,st){var mt,Nt=X.numAttributes,Jt=this.context,ur=Jt.gl;if(Jt.extVertexArrayObject)this.vao&&this.destroy(),this.vao=Jt.extVertexArrayObject.createVertexArrayOES(),Jt.bindVertexArrayOES.set(this.vao),mt=0,this.boundProgram=X,this.boundLayoutVertexBuffer=pe,this.boundPaintVertexBuffers=re,this.boundIndexBuffer=ge,this.boundVertexOffset=_e,this.boundDynamicVertexBuffer=Ze,this.boundDynamicVertexBuffer2=st;else{mt=Jt.currentNumAttributes||0;for(var yr=Nt;yr<mt;yr++)ur.disableVertexAttribArray(yr)}pe.enableAttributes(ur,X);for(var Fr=0,Gr=re;Fr<Gr.length;Fr+=1){var Wr=Gr[Fr];Wr.enableAttributes(ur,X)}Ze&&Ze.enableAttributes(ur,X),st&&st.enableAttributes(ur,X),pe.bind(),pe.setVertexAttribPointers(ur,X,_e);for(var Vr=0,Qr=re;Vr<Qr.length;Vr+=1){var sn=Qr[Vr];sn.bind(),sn.setVertexAttribPointers(ur,X,_e)}Ze&&(Ze.bind(),Ze.setVertexAttribPointers(ur,X,_e)),ge&&ge.bind(),st&&(st.bind(),st.setVertexAttribPointers(ur,X,_e)),Jt.currentNumAttributes=Nt},$o.prototype.destroy=function(){this.vao&&(this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)};var Ul=function(X,pe,re,ge,_e){var Ze=X.gl;this.program=Ze.createProgram();var st=re?re.defines():[];_e&&st.push("#define OVERDRAW_INSPECTOR;");var mt=st.concat(vs.fragmentSource,pe.fragmentSource).join(`
`),Nt=st.concat(vs.vertexSource,pe.vertexSource).join(`
`),Jt=Ze.createShader(Ze.FRAGMENT_SHADER);if(Ze.isContextLost()){this.failedToCreate=!0;return}Ze.shaderSource(Jt,mt),Ze.compileShader(Jt),Ze.attachShader(this.program,Jt);var ur=Ze.createShader(Ze.VERTEX_SHADER);if(Ze.isContextLost()){this.failedToCreate=!0;return}Ze.shaderSource(ur,Nt),Ze.compileShader(ur),Ze.attachShader(this.program,ur);for(var yr=re?re.layoutAttributes:[],Fr=0;Fr<yr.length;Fr++)Ze.bindAttribLocation(this.program,Fr,yr[Fr].name);Ze.linkProgram(this.program),Ze.deleteShader(ur),Ze.deleteShader(Jt),this.numAttributes=Ze.getProgramParameter(this.program,Ze.ACTIVE_ATTRIBUTES),this.attributes={};for(var Gr={},Wr=0;Wr<this.numAttributes;Wr++){var Vr=Ze.getActiveAttrib(this.program,Wr);Vr&&(this.attributes[Vr.name]=Ze.getAttribLocation(this.program,Vr.name))}for(var Qr=Ze.getProgramParameter(this.program,Ze.ACTIVE_UNIFORMS),sn=0;sn<Qr;sn++){var Sn=Ze.getActiveUniform(this.program,sn);Sn&&(Gr[Sn.name]=Ze.getUniformLocation(this.program,Sn.name))}this.fixedUniforms=ge(X,Gr),this.binderUniforms=re?re.getUniforms(X,Gr):[]};Ul.prototype.draw=function(X,pe,re,ge,_e,Ze,st,mt,Nt,Jt,ur,yr,Fr,Gr,Wr,Vr){var Qr,sn=X.gl;if(!this.failedToCreate){X.program.set(this.program),X.setDepthMode(re),X.setStencilMode(ge),X.setColorMode(_e),X.setCullFace(Ze);for(var Sn in this.fixedUniforms)this.fixedUniforms[Sn].set(st[Sn]);Gr&&Gr.setUniforms(X,this.binderUniforms,yr,{zoom:Fr});for(var zn=(Qr={},Qr[sn.LINES]=2,Qr[sn.TRIANGLES]=3,Qr[sn.LINE_STRIP]=1,Qr)[pe],Yn=0,Xn=ur.get();Yn<Xn.length;Yn+=1){var Zn=Xn[Yn],ra=Zn.vaos||(Zn.vaos={}),fa=ra[mt]||(ra[mt]=new $o);fa.bind(X,this,Nt,Gr?Gr.getPaintVertexBuffers():[],Jt,Zn.vertexOffset,Wr,Vr),sn.drawElements(pe,Zn.primitiveLength*zn,sn.UNSIGNED_SHORT,Zn.primitiveOffset*zn*2)}}};function pl(ve,X,pe){var re=1/gn(pe,1,X.transform.tileZoom),ge=Math.pow(2,pe.tileID.overscaledZ),_e=pe.tileSize*Math.pow(2,X.transform.tileZoom)/ge,Ze=_e*(pe.tileID.canonical.x+pe.tileID.wrap*ge),st=_e*pe.tileID.canonical.y;return{u_image:0,u_texsize:pe.imageAtlasTexture.size,u_scale:[re,ve.fromScale,ve.toScale],u_fade:ve.t,u_pixel_coord_upper:[Ze>>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;Fr<re.length;Fr++){var Gr=re[Fr],Wr=X.getTile(Gr),Vr=Wr.getBucket(pe);if(Vr){var Qr=Gr.posMatrix;(ge[0]!==0||ge[1]!==0)&&(Qr=ve.translatePosMatrix(Gr.posMatrix,Wr,ge,_e));var sn=Ze?Vr.textCollisionBox:Vr.iconCollisionBox,Sn=Vr.collisionCircleArray;if(Sn.length>0){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<ua.length;fa+=1)for(var pa=ua[fa],wa=0;wa<pa.circleArray.length/4;wa++){var Ia=wa*4,Va=pa.circleArray[Ia+0],ii=pa.circleArray[Ia+1],Ga=pa.circleArray[Ia+2],ja=pa.circleArray[Ia+3];Zn.emplace(ra++,Va,ii,Ga,ja,0),Zn.emplace(ra++,Va,ii,Ga,ja,1),Zn.emplace(ra++,Va,ii,Ga,ja,2),Zn.emplace(ra++,Va,ii,Ga,ja,3)}(!Po||Po.length<ur*2)&&(Po=Tl(ur));for(var La=st.createIndexBuffer(Po,!0),oi=st.createVertexBuffer(Zn,i.collisionCircleLayout.members,!0),ui=0,ci=Jt;ui<ci.length;ui+=1){var Ka=ci[ui],Ti=Hu(Ka.transform,Ka.invTransform,ve.transform);Xn.draw(st,mt.TRIANGLES,_r.disabled,Yt.disabled,ve.colorModeForRenderPass(),Ct.disabled,Ti,pe.id,oi,La,i.SegmentVector.simpleSegment(0,Ka.circleOffset*2,Ka.circleArray.length,Ka.circleArray.length/2),null,ve.transform.zoom,null,null,null)}oi.destroy(),La.destroy()}}function Tl(ve){var X=ve*2,pe=new i.StructArrayLayout3ui6;pe.resize(X),pe._trim();for(var re=0;re<X;re++){var ge=re*6;pe.uint16[ge+0]=re*4+0,pe.uint16[ge+1]=re*4+1,pe.uint16[ge+2]=re*4+2,pe.uint16[ge+3]=re*4+2,pe.uint16[ge+4]=re*4+3,pe.uint16[ge+5]=re*4+0}return pe}var cc=i.identity(new Float32Array(16));function Wl(ve,X,pe,re,ge){if(ve.renderPass==="translucent"){var _e=Yt.disabled,Ze=ve.colorModeForRenderPass(),st=pe.layout.get("text-variable-anchor");st&&hc(re,ve,pe,X,pe.layout.get("text-rotation-alignment"),pe.layout.get("text-pitch-alignment"),ge),pe.paint.get("icon-opacity").constantOr(1)!==0&&qs(ve,X,pe,re,!1,pe.paint.get("icon-translate"),pe.paint.get("icon-translate-anchor"),pe.layout.get("icon-rotation-alignment"),pe.layout.get("icon-pitch-alignment"),pe.layout.get("icon-keep-upright"),_e,Ze),pe.paint.get("text-opacity").constantOr(1)!==0&&qs(ve,X,pe,re,!0,pe.paint.get("text-translate"),pe.paint.get("text-translate-anchor"),pe.layout.get("text-rotation-alignment"),pe.layout.get("text-pitch-alignment"),pe.layout.get("text-keep-upright"),_e,Ze),X.map.showCollisionBoxes&&(_o(ve,X,pe,re,pe.paint.get("text-translate"),pe.paint.get("text-translate-anchor"),!0),_o(ve,X,pe,re,pe.paint.get("icon-translate"),pe.paint.get("icon-translate-anchor"),!1))}}function ju(ve,X,pe,re,ge,_e){var Ze=i.getAnchorAlignment(ve),st=Ze.horizontalAlign,mt=Ze.verticalAlign,Nt=-(st-.5)*X,Jt=-(mt-.5)*pe,ur=i.evaluateVariableOffset(ve,re);return new i.Point((Nt/ge+ur[0])*_e,(Jt/ge+ur[1])*_e)}function hc(ve,X,pe,re,ge,_e,Ze){for(var st=X.transform,mt=ge==="map",Nt=_e==="map",Jt=0,ur=ve;Jt<ur.length;Jt+=1){var yr=ur[Jt],Fr=re.getTile(yr),Gr=Fr.getBucket(pe);if(!(!Gr||!Gr.text||!Gr.text.segments.get().length)){var Wr=Gr.textSizeData,Vr=i.evaluateSizeForZoom(Wr,st.zoom),Qr=gn(Fr,1,X.transform.zoom),sn=Ar(yr.posMatrix,Nt,mt,X.transform,Qr),Sn=pe.layout.get("icon-text-fit")!=="none"&&Gr.hasIconData();if(Vr){var zn=Math.pow(2,st.zoom-Fr.tileID.overscaledZ);ts(Gr,mt,Nt,Ze,i.symbolSize,st,sn,yr.posMatrix,zn,Vr,Sn)}}}}function ts(ve,X,pe,re,ge,_e,Ze,st,mt,Nt,Jt){var ur=ve.text.placedSymbolArray,yr=ve.text.dynamicLayoutVertexArray,Fr=ve.icon.dynamicLayoutVertexArray,Gr={};yr.clear();for(var Wr=0;Wr<ur.length;Wr++){var Vr=ur.get(Wr),Qr=ve.allowVerticalPlacement&&!Vr.placedOrientation,sn=!Vr.hidden&&Vr.crossTileID&&!Qr?re[Vr.crossTileID]:null;if(!sn)ea(Vr.numGlyphs,yr);else{var Sn=new i.Point(Vr.anchorX,Vr.anchorY),zn=Nr(Sn,pe?st:Ze),Yn=qr(_e.cameraToCenterDistance,zn.signedDistanceFromCamera),Xn=ge.evaluateSizeForFeature(ve.textSizeData,Nt,Vr)*Yn/i.ONE_EM;pe&&(Xn*=ve.tilePixelRatio/mt);for(var Zn=sn.width,ra=sn.height,fa=sn.anchor,ua=sn.textOffset,pa=sn.textBoxScale,wa=ju(fa,Zn,ra,ua,pa,Xn),Ia=pe?Nr(Sn.add(wa),Ze).point:zn.point.add(X?wa.rotate(-_e.angle):wa),Va=ve.allowVerticalPlacement&&Vr.placedOrientation===i.WritingMode.vertical?Math.PI/2:0,ii=0;ii<Vr.numGlyphs;ii++)i.addDynamicAttributes(yr,Ia,Va);Jt&&Vr.associatedIconIndex>=0&&(Gr[Vr.associatedIconIndex]={shiftedAnchor:Ia,angle:Va})}}if(Jt){Fr.clear();for(var Ga=ve.icon.placedSymbolArray,ja=0;ja<Ga.length;ja++){var La=Ga.get(ja);if(La.hidden)ea(La.numGlyphs,Fr);else{var oi=Gr[ja];if(!oi)ea(La.numGlyphs,Fr);else for(var ui=0;ui<La.numGlyphs;ui++)i.addDynamicAttributes(Fr,oi.shiftedAnchor,oi.angle)}}ve.icon.dynamicLayoutVertexBuffer.updateData(Fr)}ve.text.dynamicLayoutVertexBuffer.updateData(yr)}function Df(ve,X,pe){return pe.iconsInText&&X?"symbolTextAndIcon":ve?"symbolSDF":"symbolIcon"}function qs(ve,X,pe,re,ge,_e,Ze,st,mt,Nt,Jt,ur){for(var yr=ve.context,Fr=yr.gl,Gr=ve.transform,Wr=st==="map",Vr=mt==="map",Qr=Wr&&pe.layout.get("symbol-placement")!=="point",sn=Wr&&!Vr&&!Qr,Sn=pe.layout.get("symbol-sort-key").constantOr(1)!==void 0,zn=ve.depthModeForSublayer(0,_r.ReadOnly),Yn=pe.layout.get("text-variable-anchor"),Xn=[],Zn=0,ra=re;Zn<ra.length;Zn+=1){var fa=ra[Zn],ua=X.getTile(fa),pa=ua.getBucket(pe);if(pa){var wa=ge?pa.text:pa.icon;if(!(!wa||!wa.segments.get().length)){var Ia=wa.programConfigurations.get(pe.id),Va=ge||pa.sdfIcons,ii=ge?pa.textSizeData:pa.iconSizeData,Ga=Vr||Gr.pitch!==0,ja=ve.useProgram(Df(Va,ge,pa),Ia),La=i.evaluateSizeForZoom(ii,Gr.zoom),oi=void 0,ui=[0,0],ci=void 0,Ka=void 0,Ti=null,Ha=void 0;if(ge){if(ci=ua.glyphAtlasTexture,Ka=Fr.LINEAR,oi=ua.glyphAtlasTexture.size,pa.iconsInText){ui=ua.imageAtlasTexture.size,Ti=ua.imageAtlasTexture;var Qa=ii.kind==="composite"||ii.kind==="camera";Ha=Ga||ve.options.rotating||ve.options.zooming||Qa?Fr.LINEAR:Fr.NEAREST}}else{var Ui=pe.layout.get("icon-size").constantOr(0)!==1||pa.iconsNeedLinear;ci=ua.imageAtlasTexture,Ka=Va||ve.options.rotating||ve.options.zooming||Ui||Ga?Fr.LINEAR:Fr.NEAREST,oi=ua.imageAtlasTexture.size}var no=gn(ua,1,ve.transform.zoom),tl=Ar(fa.posMatrix,Vr,Wr,ve.transform,no),rl=Or(fa.posMatrix,Vr,Wr,ve.transform,no),Yl=Yn&&pa.hasTextData(),Zl=pe.layout.get("icon-text-fit")!=="none"&&Yl&&pa.hasIconData();Qr&&fn(pa,fa.posMatrix,ve,ge,tl,rl,Vr,Nt);var Au=ve.translatePosMatrix(fa.posMatrix,ua,_e,Ze),Xl=Qr||ge&&Yn||Zl?cc:tl,ns=ve.translatePosMatrix(rl,ua,_e,Ze,!0),nf=Va&&pe.paint.get(ge?"text-halo-width":"icon-halo-width").constantOr(1)!==0,Oo=void 0;Va?pa.iconsInText?Oo=Rf(ii.kind,La,sn,Vr,ve,Au,Xl,ns,oi,ui):Oo=Gl(ii.kind,La,sn,Vr,ve,Au,Xl,ns,ge,oi,!0):Oo=Pf(ii.kind,La,sn,Vr,ve,Au,Xl,ns,ge,oi);var Ns={program:ja,buffers:wa,uniformValues:Oo,atlasTexture:ci,atlasTextureIcon:Ti,atlasInterpolation:Ka,atlasInterpolationIcon:Ha,isSDF:Va,hasHalo:nf};if(Sn)for(var jl=wa.segments.get(),Sl=0,Kl=jl;Sl<Kl.length;Sl+=1){var Kh=Kl[Sl];Xn.push({segments:new i.SegmentVector([Kh]),sortKey:Kh.sortKey,state:Ns})}else Xn.push({segments:wa.segments,sortKey:0,state:Ns})}}}Sn&&Xn.sort(function(Jh,Qh){return Jh.sortKey-Qh.sortKey});for(var zf=0,Ro=Xn;zf<Ro.length;zf+=1){var Ah=Ro[zf],Yo=Ah.state;if(yr.activeTexture.set(Fr.TEXTURE0),Yo.atlasTexture.bind(Yo.atlasInterpolation,Fr.CLAMP_TO_EDGE),Yo.atlasTextureIcon&&(yr.activeTexture.set(Fr.TEXTURE1),Yo.atlasTextureIcon&&Yo.atlasTextureIcon.bind(Yo.atlasInterpolationIcon,Fr.CLAMP_TO_EDGE)),Yo.isSDF){var Mh=Yo.uniformValues;Yo.hasHalo&&(Mh.u_is_halo=1,gu(Yo.buffers,Ah.segments,pe,ve,Yo.program,zn,Jt,ur,Mh)),Mh.u_is_halo=0}gu(Yo.buffers,Ah.segments,pe,ve,Yo.program,zn,Jt,ur,Yo.uniformValues)}}function gu(ve,X,pe,re,ge,_e,Ze,st,mt){var Nt=re.context,Jt=Nt.gl;ge.draw(Nt,Jt.TRIANGLES,_e,Ze,st,Ct.disabled,mt,pe.id,ve.layoutVertexBuffer,ve.indexBuffer,X,pe.paint,re.transform.zoom,ve.programConfigurations.get(pe.id),ve.dynamicLayoutVertexBuffer,ve.opacityVertexBuffer)}function Os(ve,X,pe,re){if(ve.renderPass==="translucent"){var ge=pe.paint.get("circle-opacity"),_e=pe.paint.get("circle-stroke-width"),Ze=pe.paint.get("circle-stroke-opacity"),st=pe.layout.get("circle-sort-key").constantOr(1)!==void 0;if(!(ge.constantOr(1)===0&&(_e.constantOr(1)===0||Ze.constantOr(1)===0))){for(var mt=ve.context,Nt=mt.gl,Jt=ve.depthModeForSublayer(0,_r.ReadOnly),ur=Yt.disabled,yr=ve.colorModeForRenderPass(),Fr=[],Gr=0;Gr<re.length;Gr++){var Wr=re[Gr],Vr=X.getTile(Wr),Qr=Vr.getBucket(pe);if(Qr){var sn=Qr.programConfigurations.get(pe.id),Sn=ve.useProgram("circle",sn),zn=Qr.layoutVertexBuffer,Yn=Qr.indexBuffer,Xn=hh(ve,Wr,Vr,pe),Zn={programConfiguration:sn,program:Sn,layoutVertexBuffer:zn,indexBuffer:Yn,uniformValues:Xn};if(st)for(var ra=Qr.segments.get(),fa=0,ua=ra;fa<ua.length;fa+=1){var pa=ua[fa];Fr.push({segments:new i.SegmentVector([pa]),sortKey:pa.sortKey,state:Zn})}else Fr.push({segments:Qr.segments,sortKey:0,state:Zn})}}st&&Fr.sort(function(Ka,Ti){return Ka.sortKey-Ti.sortKey});for(var wa=0,Ia=Fr;wa<Ia.length;wa+=1){var Va=Ia[wa],ii=Va.state,Ga=ii.programConfiguration,ja=ii.program,La=ii.layoutVertexBuffer,oi=ii.indexBuffer,ui=ii.uniformValues,ci=Va.segments;ja.draw(mt,Nt.TRIANGLES,Jt,ur,yr,Ct.disabled,ui,pe.id,La,oi,ci,pe.paint,ve.transform.zoom,Ga)}}}}function mh(ve,X,pe,re){if(pe.paint.get("heatmap-opacity")!==0)if(ve.renderPass==="offscreen"){var ge=ve.context,_e=ge.gl,Ze=Yt.disabled,st=new lt([_e.ONE,_e.ONE],i.Color.transparent,[!0,!0,!0,!0]);If(ge,ve,pe),ge.clear({color:i.Color.transparent});for(var mt=0;mt<re.length;mt++){var Nt=re[mt];if(!X.hasRenderableParent(Nt)){var Jt=X.getTile(Nt),ur=Jt.getBucket(pe);if(ur){var yr=ur.programConfigurations.get(pe.id),Fr=ve.useProgram("heatmap",yr),Gr=ve.transform,Wr=Gr.zoom;Fr.draw(ge,_e.TRIANGLES,_r.disabled,Ze,st,Ct.disabled,pu(Nt.posMatrix,Jt,Wr,pe.paint.get("heatmap-intensity")),pe.id,ur.layoutVertexBuffer,ur.indexBuffer,ur.segments,pe.paint,ve.transform.zoom,yr)}}}ge.viewport.set([0,0,ve.width,ve.height])}else ve.renderPass==="translucent"&&(ve.context.setColorMode(ve.colorModeForRenderPass()),vo(ve,pe))}function If(ve,X,pe){var re=ve.gl;ve.activeTexture.set(re.TEXTURE1),ve.viewport.set([0,0,X.width/4,X.height/4]);var ge=pe.heatmapFbo;if(ge)re.bindTexture(re.TEXTURE_2D,ge.colorAttachment.get()),ve.bindFramebuffer.set(ge.framebuffer);else{var _e=re.createTexture();re.bindTexture(re.TEXTURE_2D,_e),re.texParameteri(re.TEXTURE_2D,re.TEXTURE_WRAP_S,re.CLAMP_TO_EDGE),re.texParameteri(re.TEXTURE_2D,re.TEXTURE_WRAP_T,re.CLAMP_TO_EDGE),re.texParameteri(re.TEXTURE_2D,re.TEXTURE_MIN_FILTER,re.LINEAR),re.texParameteri(re.TEXTURE_2D,re.TEXTURE_MAG_FILTER,re.LINEAR),ge=pe.heatmapFbo=ve.createFramebuffer(X.width/4,X.height/4,!1),Ku(ve,X,_e,ge)}}function Ku(ve,X,pe,re){var ge=ve.gl,_e=ve.extRenderToTextureHalfFloat?ve.extTextureHalfFloat.HALF_FLOAT_OES:ge.UNSIGNED_BYTE;ge.texImage2D(ge.TEXTURE_2D,0,ge.RGBA,X.width/4,X.height/4,0,ge.RGBA,_e,null),re.colorAttachment.set(pe)}function vo(ve,X){var pe=ve.context,re=pe.gl,ge=X.heatmapFbo;if(ge){pe.activeTexture.set(re.TEXTURE0),re.bindTexture(re.TEXTURE_2D,ge.colorAttachment.get()),pe.activeTexture.set(re.TEXTURE1);var _e=X.colorRampTexture;_e||(_e=X.colorRampTexture=new i.Texture(pe,X.colorRamp,re.RGBA)),_e.bind(re.LINEAR,re.CLAMP_TO_EDGE),ve.useProgram("heatmapTexture").draw(pe,re.TRIANGLES,_r.disabled,Yt.disabled,ve.colorModeForRenderPass(),Ct.disabled,Gu(ve,X,0,1),X.id,ve.viewportBuffer,ve.quadTriangleIndexBuffer,ve.viewportSegments,X.paint,ve.transform.zoom)}}function vc(ve,X,pe,re){if(ve.renderPass==="translucent"){var ge=pe.paint.get("line-opacity"),_e=pe.paint.get("line-width");if(!(ge.constantOr(1)===0||_e.constantOr(1)===0)){var Ze=ve.depthModeForSublayer(0,_r.ReadOnly),st=ve.colorModeForRenderPass(),mt=pe.paint.get("line-dasharray"),Nt=pe.paint.get("line-pattern"),Jt=Nt.constantOr(1),ur=pe.paint.get("line-gradient"),yr=pe.getCrossfadeParameters(),Fr=Jt?"linePattern":mt?"lineSDF":ur?"lineGradient":"line",Gr=ve.context,Wr=Gr.gl,Vr=!0;if(ur){Gr.activeTexture.set(Wr.TEXTURE0);var Qr=pe.gradientTexture;if(!pe.gradient)return;Qr||(Qr=pe.gradientTexture=new i.Texture(Gr,pe.gradient,Wr.RGBA)),Qr.bind(Wr.LINEAR,Wr.CLAMP_TO_EDGE)}for(var sn=0,Sn=re;sn<Sn.length;sn+=1){var zn=Sn[sn],Yn=X.getTile(zn);if(!(Jt&&!Yn.patternsLoaded())){var Xn=Yn.getBucket(pe);if(Xn){var Zn=Xn.programConfigurations.get(pe.id),ra=ve.context.program.get(),fa=ve.useProgram(Fr,Zn),ua=Vr||fa.program!==ra,pa=Nt.constantOr(null);if(pa&&Yn.imageAtlas){var wa=Yn.imageAtlas,Ia=wa.patternPositions[pa.to.toString()],Va=wa.patternPositions[pa.from.toString()];Ia&&Va&&Zn.setConstantPatternPositions(Ia,Va)}var ii=Jt?es(ve,Yn,pe,yr):mt?Yu(ve,Yn,pe,mt,yr):ur?Wu(ve,Yn,pe):ml(ve,Yn,pe);Jt?(Gr.activeTexture.set(Wr.TEXTURE0),Yn.imageAtlasTexture.bind(Wr.LINEAR,Wr.CLAMP_TO_EDGE),Zn.updatePaintBuffers(yr)):mt&&(ua||ve.lineAtlas.dirty)&&(Gr.activeTexture.set(Wr.TEXTURE0),ve.lineAtlas.bind(Gr)),fa.draw(Gr,Wr.TRIANGLES,Ze,ve.stencilModeForClipping(zn),st,Ct.disabled,ii,pe.id,Xn.layoutVertexBuffer,Xn.indexBuffer,Xn.segments,pe.paint,ve.transform.zoom,Zn),Vr=!1}}}}}}function yu(ve,X,pe,re){var ge=pe.paint.get("fill-color"),_e=pe.paint.get("fill-opacity");if(_e.constantOr(1)!==0){var Ze=ve.colorModeForRenderPass(),st=pe.paint.get("fill-pattern"),mt=ve.opaquePassEnabledForLayer()&&!st.constantOr(1)&&ge.constantOr(i.Color.transparent).a===1&&_e.constantOr(0)===1?"opaque":"translucent";if(ve.renderPass===mt){var Nt=ve.depthModeForSublayer(1,ve.renderPass==="opaque"?_r.ReadWrite:_r.ReadOnly);gs(ve,X,pe,re,Nt,Ze,!1)}if(ve.renderPass==="translucent"&&pe.paint.get("fill-antialias")){var Jt=ve.depthModeForSublayer(pe.getPaintProperty("fill-outline-color")?2:0,_r.ReadOnly);gs(ve,X,pe,re,Jt,Ze,!0)}}}function gs(ve,X,pe,re,ge,_e,Ze){var st=ve.context.gl,mt=pe.paint.get("fill-pattern"),Nt=mt&&mt.constantOr(1),Jt=pe.getCrossfadeParameters(),ur,yr,Fr,Gr,Wr;Ze?(yr=Nt&&!pe.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",ur=st.LINES):(yr=Nt?"fillPattern":"fill",ur=st.TRIANGLES);for(var Vr=0,Qr=re;Vr<Qr.length;Vr+=1){var sn=Qr[Vr],Sn=X.getTile(sn);if(!(Nt&&!Sn.patternsLoaded())){var zn=Sn.getBucket(pe);if(zn){var Yn=zn.programConfigurations.get(pe.id),Xn=ve.useProgram(yr,Yn);Nt&&(ve.context.activeTexture.set(st.TEXTURE0),Sn.imageAtlasTexture.bind(st.LINEAR,st.CLAMP_TO_EDGE),Yn.updatePaintBuffers(Jt));var Zn=mt.constantOr(null);if(Zn&&Sn.imageAtlas){var ra=Sn.imageAtlas,fa=ra.patternPositions[Zn.to.toString()],ua=ra.patternPositions[Zn.from.toString()];fa&&ua&&Yn.setConstantPatternPositions(fa,ua)}var pa=ve.translatePosMatrix(sn.posMatrix,Sn,pe.paint.get("fill-translate"),pe.paint.get("fill-translate-anchor"));if(!Ze)Gr=zn.indexBuffer,Wr=zn.segments,Fr=Nt?ds(pa,ve,Jt,Sn):qo(pa);else{Gr=zn.indexBuffer2,Wr=zn.segments2;var wa=[st.drawingBufferWidth,st.drawingBufferHeight];Fr=yr==="fillOutlinePattern"&&Nt?vu(pa,ve,Jt,Sn,wa):hu(pa,wa)}Xn.draw(ve.context,ur,ge,ve.stencilModeForClipping(sn),_e,Ct.disabled,Fr,pe.id,zn.layoutVertexBuffer,Gr,Wr,pe.paint,ve.transform.zoom,Yn)}}}}function mu(ve,X,pe,re){var ge=pe.paint.get("fill-extrusion-opacity");if(ge!==0&&ve.renderPass==="translucent"){var _e=new _r(ve.context.gl.LEQUAL,_r.ReadWrite,ve.depthRangeFor3D);if(ge===1&&!pe.paint.get("fill-extrusion-pattern").constantOr(1)){var Ze=ve.colorModeForRenderPass();el(ve,X,pe,re,_e,Yt.disabled,Ze)}else el(ve,X,pe,re,_e,Yt.disabled,lt.disabled),el(ve,X,pe,re,_e,ve.stencilModeFor3D(),ve.colorModeForRenderPass())}}function el(ve,X,pe,re,ge,_e,Ze){for(var st=ve.context,mt=st.gl,Nt=pe.paint.get("fill-extrusion-pattern"),Jt=Nt.constantOr(1),ur=pe.getCrossfadeParameters(),yr=pe.paint.get("fill-extrusion-opacity"),Fr=0,Gr=re;Fr<Gr.length;Fr+=1){var Wr=Gr[Fr],Vr=X.getTile(Wr),Qr=Vr.getBucket(pe);if(Qr){var sn=Qr.programConfigurations.get(pe.id),Sn=ve.useProgram(Jt?"fillExtrusionPattern":"fillExtrusion",sn);Jt&&(ve.context.activeTexture.set(mt.TEXTURE0),Vr.imageAtlasTexture.bind(mt.LINEAR,mt.CLAMP_TO_EDGE),sn.updatePaintBuffers(ur));var zn=Nt.constantOr(null);if(zn&&Vr.imageAtlas){var Yn=Vr.imageAtlas,Xn=Yn.patternPositions[zn.to.toString()],Zn=Yn.patternPositions[zn.from.toString()];Xn&&Zn&&sn.setConstantPatternPositions(Xn,Zn)}var ra=ve.translatePosMatrix(Wr.posMatrix,Vr,pe.paint.get("fill-extrusion-translate"),pe.paint.get("fill-extrusion-translate-anchor")),fa=pe.paint.get("fill-extrusion-vertical-gradient"),ua=Jt?Is(ra,ve,fa,yr,Wr,ur,Vr):Co(ra,ve,fa,yr);Sn.draw(st,st.gl.TRIANGLES,ge,_e,Ze,Ct.backCCW,ua,pe.id,Qr.layoutVertexBuffer,Qr.indexBuffer,Qr.segments,pe.paint,ve.transform.zoom,sn)}}}function Ju(ve,X,pe,re){if(!(ve.renderPass!=="offscreen"&&ve.renderPass!=="translucent")){for(var ge=ve.context,_e=X.getSource().maxzoom,Ze=ve.depthModeForSublayer(0,_r.ReadOnly),st=ve.colorModeForRenderPass(),mt=ve.renderPass==="translucent"?ve.stencilConfigForOverlap(re):[{},re],Nt=mt[0],Jt=mt[1],ur=0,yr=Jt;ur<yr.length;ur+=1){var Fr=yr[ur],Gr=X.getTile(Fr);Gr.needsHillshadePrepare&&ve.renderPass==="offscreen"?kf(ve,Gr,pe,_e,Ze,Yt.disabled,st):ve.renderPass==="translucent"&&dc(ve,Gr,pe,Ze,Nt[Fr.overscaledZ],st)}ge.viewport.set([0,0,ve.width,ve.height])}}function dc(ve,X,pe,re,ge,_e){var Ze=ve.context,st=Ze.gl,mt=X.fbo;if(mt){var Nt=ve.useProgram("hillshade");Ze.activeTexture.set(st.TEXTURE0),st.bindTexture(st.TEXTURE_2D,mt.colorAttachment.get());var Jt=lc(ve,X,pe);Nt.draw(Ze,st.TRIANGLES,re,ge,_e,Ct.disabled,Jt,pe.id,ve.rasterBoundsBuffer,ve.quadTriangleIndexBuffer,ve.rasterBoundsSegments)}}function kf(ve,X,pe,re,ge,_e,Ze){var st=ve.context,mt=st.gl,Nt=X.dem;if(Nt&&Nt.data){var Jt=Nt.dim,ur=Nt.stride,yr=Nt.getPixels();if(st.activeTexture.set(mt.TEXTURE1),st.pixelStoreUnpackPremultiplyAlpha.set(!1),X.demTexture=X.demTexture||ve.getTileTexture(ur),X.demTexture){var Fr=X.demTexture;Fr.update(yr,{premultiply:!1}),Fr.bind(mt.NEAREST,mt.CLAMP_TO_EDGE)}else X.demTexture=new i.Texture(st,yr,mt.RGBA,{premultiply:!1}),X.demTexture.bind(mt.NEAREST,mt.CLAMP_TO_EDGE);st.activeTexture.set(mt.TEXTURE0);var Gr=X.fbo;if(!Gr){var Wr=new i.Texture(st,{width:Jt,height:Jt,data:null},mt.RGBA);Wr.bind(mt.LINEAR,mt.CLAMP_TO_EDGE),Gr=X.fbo=st.createFramebuffer(Jt,Jt,!0),Gr.colorAttachment.set(Wr.texture)}st.bindFramebuffer.set(Gr.framebuffer),st.viewport.set([0,0,Jt,Jt]),ve.useProgram("hillshadePrepare").draw(st,mt.TRIANGLES,ge,_e,Ze,Ct.disabled,Ef(X.tileID,Nt,re),pe.id,ve.rasterBoundsBuffer,ve.quadTriangleIndexBuffer,ve.rasterBoundsSegments),X.needsHillshadePrepare=!1}}function Ff(ve,X,pe,re){if(ve.renderPass==="translucent"&&pe.paint.get("raster-opacity")!==0&&re.length)for(var ge=ve.context,_e=ge.gl,Ze=X.getSource(),st=ve.useProgram("raster"),mt=ve.colorModeForRenderPass(),Nt=Ze instanceof J?[{},re]:ve.stencilConfigForOverlap(re),Jt=Nt[0],ur=Nt[1],yr=ur[ur.length-1].overscaledZ,Fr=!ve.options.moving,Gr=0,Wr=ur;Gr<Wr.length;Gr+=1){var Vr=Wr[Gr],Qr=ve.depthModeForSublayer(Vr.overscaledZ-yr,pe.paint.get("raster-opacity")===1?_r.ReadWrite:_r.ReadOnly,_e.LESS),sn=X.getTile(Vr),Sn=ve.transform.calculatePosMatrix(Vr.toUnwrapped(),Fr);sn.registerFadeDuration(pe.paint.get("raster-fade-duration"));var zn=X.findLoadedParent(Vr,0),Yn=Al(sn,zn,X,pe,ve.transform),Xn=void 0,Zn=void 0,ra=pe.paint.get("raster-resampling")==="nearest"?_e.NEAREST:_e.LINEAR;ge.activeTexture.set(_e.TEXTURE0),sn.texture.bind(ra,_e.CLAMP_TO_EDGE,_e.LINEAR_MIPMAP_NEAREST),ge.activeTexture.set(_e.TEXTURE1),zn?(zn.texture.bind(ra,_e.CLAMP_TO_EDGE,_e.LINEAR_MIPMAP_NEAREST),Xn=Math.pow(2,zn.tileID.overscaledZ-sn.tileID.overscaledZ),Zn=[sn.tileID.canonical.x*Xn%1,sn.tileID.canonical.y*Xn%1]):sn.texture.bind(ra,_e.CLAMP_TO_EDGE,_e.LINEAR_MIPMAP_NEAREST);var fa=Hl(Sn,Zn||[0,0],Xn||1,Yn,pe);Ze instanceof J?st.draw(ge,_e.TRIANGLES,Qr,Yt.disabled,mt,Ct.disabled,fa,pe.id,Ze.boundsBuffer,ve.quadTriangleIndexBuffer,Ze.boundsSegments):st.draw(ge,_e.TRIANGLES,Qr,Jt[Vr.overscaledZ],mt,Ct.disabled,fa,pe.id,ve.rasterBoundsBuffer,ve.quadTriangleIndexBuffer,ve.rasterBoundsSegments)}}function Al(ve,X,pe,re,ge){var _e=re.paint.get("raster-fade-duration");if(_e>0){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<sn.length;Qr+=1){var Sn=sn[Qr],zn=ve.transform.calculatePosMatrix(Sn.toUnwrapped()),Yn=Nt?bl(zn,ge,ve,Nt,{tileID:Sn,tileSize:mt},Vr):$s(zn,ge,re);Gr.draw(_e,Ze.TRIANGLES,yr,ur,Fr,Ct.disabled,Yn,pe.id,ve.tileExtentBuffer,ve.quadTriangleIndexBuffer,ve.tileExtentSegments)}}}}}var xu=new i.Color(1,0,0,1),pc=new i.Color(0,1,0,1),bu=new i.Color(0,0,1,1),gc=new i.Color(1,0,1,1),je=new i.Color(0,1,1,1);function rt(ve){var X=ve.transform.padding,pe=3;gt(ve,ve.transform.height-(X.top||0),pe,xu),gt(ve,X.bottom||0,pe,pc),kt(ve,X.left||0,pe,bu),kt(ve,ve.transform.width-(X.right||0),pe,gc);var re=ve.transform.centerPoint;vt(ve,re.x,ve.transform.height-re.y,je)}function vt(ve,X,pe,re){var ge=20,_e=2;Pt(ve,X-_e/2,pe-ge/2,_e,ge,re),Pt(ve,X-ge/2,pe-_e/2,ge,_e,re)}function gt(ve,X,pe,re){Pt(ve,0,X+pe/2,ve.transform.width,pe,re)}function kt(ve,X,pe,re){Pt(ve,X-pe/2,0,pe,ve.transform.height,re)}function Pt(ve,X,pe,re,ge,_e){var Ze=ve.context,st=Ze.gl;st.enable(st.SCISSOR_TEST),st.scissor(X*i.browser.devicePixelRatio,pe*i.browser.devicePixelRatio,re*i.browser.devicePixelRatio,ge*i.browser.devicePixelRatio),Ze.clear({color:_e}),st.disable(st.SCISSOR_TEST)}function Ot(ve,X,pe){for(var re=0;re<pe.length;re++)cr(ve,X,pe[re])}function cr(ve,X,pe){var re=ve.context,ge=re.gl,_e=pe.posMatrix,Ze=ve.useProgram("debug"),st=_r.disabled,mt=Yt.disabled,Nt=ve.colorModeForRenderPass(),Jt="$debug";re.activeTexture.set(ge.TEXTURE0),ve.emptyTexture.bind(ge.LINEAR,ge.CLAMP_TO_EDGE),Ze.draw(re,ge.LINE_STRIP,st,mt,Nt,Ct.disabled,Vl(_e,i.Color.red),Jt,ve.debugBuffer,ve.tileBorderIndexBuffer,ve.debugSegments);var ur=X.getTileByID(pe.key).latestRawTileData,yr=ur&&ur.byteLength||0,Fr=Math.floor(yr/1024),Gr=X.getTile(pe).tileSize,Wr=512/Math.min(Gr,512)*(pe.overscaledZ/ve.transform.zoom)*.5,Vr=pe.canonical.toString();pe.overscaledZ!==pe.canonical.z&&(Vr+=" => "+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;re<ge.length;re+=1){var _e=ge[re];this.style._layers[_e].resize()}},Pr.prototype.setup=function(){var X=this.context,pe=new i.StructArrayLayout2i4;pe.emplaceBack(0,0),pe.emplaceBack(i.EXTENT,0),pe.emplaceBack(0,i.EXTENT),pe.emplaceBack(i.EXTENT,i.EXTENT),this.tileExtentBuffer=X.createVertexBuffer(pe,So.members),this.tileExtentSegments=i.SegmentVector.simpleSegment(0,0,4,2);var re=new i.StructArrayLayout2i4;re.emplaceBack(0,0),re.emplaceBack(i.EXTENT,0),re.emplaceBack(0,i.EXTENT),re.emplaceBack(i.EXTENT,i.EXTENT),this.debugBuffer=X.createVertexBuffer(re,So.members),this.debugSegments=i.SegmentVector.simpleSegment(0,0,4,5);var ge=new i.StructArrayLayout4i8;ge.emplaceBack(0,0,0,0),ge.emplaceBack(i.EXTENT,0,i.EXTENT,0),ge.emplaceBack(0,i.EXTENT,0,i.EXTENT),ge.emplaceBack(i.EXTENT,i.EXTENT,i.EXTENT,i.EXTENT),this.rasterBoundsBuffer=X.createVertexBuffer(ge,Y.members),this.rasterBoundsSegments=i.SegmentVector.simpleSegment(0,0,4,2);var _e=new i.StructArrayLayout2i4;_e.emplaceBack(0,0),_e.emplaceBack(1,0),_e.emplaceBack(0,1),_e.emplaceBack(1,1),this.viewportBuffer=X.createVertexBuffer(_e,So.members),this.viewportSegments=i.SegmentVector.simpleSegment(0,0,4,2);var Ze=new i.StructArrayLayout1ui2;Ze.emplaceBack(0),Ze.emplaceBack(1),Ze.emplaceBack(3),Ze.emplaceBack(2),Ze.emplaceBack(0),this.tileBorderIndexBuffer=X.createIndexBuffer(Ze);var st=new i.StructArrayLayout3ui6;st.emplaceBack(0,1,2),st.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=X.createIndexBuffer(st),this.emptyTexture=new i.Texture(X,{width:1,height:1,data:new Uint8Array([0,0,0,0])},X.gl.RGBA);var mt=this.context.gl;this.stencilClearMode=new Yt({func:mt.ALWAYS,mask:0},0,255,mt.ZERO,mt.ZERO,mt.ZERO)},Pr.prototype.clearStencil=function(){var X=this.context,pe=X.gl;this.nextStencilID=1,this.currentStencilSource=void 0;var re=i.create();i.ortho(re,0,this.width,this.height,0,0,1),i.scale(re,re,[pe.drawingBufferWidth,pe.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(X,pe.TRIANGLES,_r.disabled,this.stencilClearMode,lt.disabled,Ct.disabled,Lo(re),"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)},Pr.prototype._renderTileClippingMasks=function(X,pe){if(!(this.currentStencilSource===X.source||!X.isTileClipped()||!pe||!pe.length)){this.currentStencilSource=X.source;var re=this.context,ge=re.gl;this.nextStencilID+pe.length>256&&this.clearStencil(),re.setColorMode(lt.disabled),re.setDepthMode(_r.disabled);var _e=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var Ze=0,st=pe;Ze<st.length;Ze+=1){var mt=st[Ze],Nt=this._tileClippingMaskIDs[mt.key]=this.nextStencilID++;_e.draw(re,ge.TRIANGLES,_r.disabled,new Yt({func:ge.ALWAYS,mask:0},Nt,255,ge.KEEP,ge.KEEP,ge.REPLACE),lt.disabled,Ct.disabled,Lo(mt.posMatrix),"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}},Pr.prototype.stencilModeFor3D=function(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&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<Ze;mt++)st[mt+_e]=new Yt({func:re.GEQUAL,mask:255},mt+this.nextStencilID,255,re.KEEP,re.KEEP,re.REPLACE);return this.nextStencilID+=Ze,[st,ge]}return[(pe={},pe[_e]=Yt.disabled,pe),ge]},Pr.prototype.colorModeForRenderPass=function(){var X=this.context.gl;if(this._showOverdrawInspector){var pe=8,re=1/pe;return new lt([X.CONSTANT_COLOR,X.ONE],new i.Color(re,re,re,0),[!0,!0,!0,!0])}else return this.renderPass==="opaque"?lt.unblended:lt.alphaBlended},Pr.prototype.depthModeForSublayer=function(X,pe,re){if(!this.opaquePassEnabledForLayer())return _r.disabled;var ge=1-((1+this.currentLayer)*this.numSublayers+X)*this.depthEpsilon;return new _r(re||this.context.gl.LEQUAL,pe,[ge,ge])},Pr.prototype.opaquePassEnabledForLayer=function(){return this.currentLayer<this.opaquePassCutoff},Pr.prototype.render=function(X,pe){var re=this;this.style=X,this.options=pe,this.lineAtlas=X.lineAtlas,this.imageManager=X.imageManager,this.glyphManager=X.glyphManager,this.symbolFadeChange=X.placement.symbolFadeChange(i.browser.now()),this.imageManager.beginFrame();var ge=this.style._order,_e=this.style.sourceCaches;for(var Ze in _e){var st=_e[Ze];st.used&&st.prepare(this.context)}var mt={},Nt={},Jt={};for(var ur in _e){var yr=_e[ur];mt[ur]=yr.getVisibleCoordinates(),Nt[ur]=mt[ur].slice().reverse(),Jt[ur]=yr.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(var Fr=0;Fr<ge.length;Fr++){var Gr=ge[Fr];if(this.style._layers[Gr].is3D()){this.opaquePassCutoff=Fr;break}}this.renderPass="offscreen";for(var Wr=0,Vr=ge;Wr<Vr.length;Wr+=1){var Qr=Vr[Wr],sn=this.style._layers[Qr];if(!(!sn.hasOffscreenPass()||sn.isHidden(this.transform.zoom))){var Sn=Nt[sn.source];sn.type!=="custom"&&!Sn.length||this.renderLayer(this,_e[sn.source],sn,Sn)}}for(this.context.bindFramebuffer.set(null),this.context.clear({color:pe.showOverdrawInspector?i.Color.black:i.Color.transparent,depth:1}),this.clearStencil(),this._showOverdrawInspector=pe.showOverdrawInspector,this.depthRangeFor3D=[0,1-(X._order.length+2)*this.numSublayers*this.depthEpsilon],this.renderPass="opaque",this.currentLayer=ge.length-1;this.currentLayer>=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.currentLayer<ge.length;this.currentLayer++){var Zn=this.style._layers[ge[this.currentLayer]],ra=_e[Zn.source],fa=(Zn.type==="symbol"?Jt:Nt)[Zn.source];this._renderTileClippingMasks(Zn,mt[Zn.source]),this.renderLayer(this,ra,Zn,fa)}if(this.options.showTileBoundaries){var ua,pa,wa=i.values(this.style._layers);wa.forEach(function(Ia){Ia.source&&!Ia.isHidden(re.transform.zoom)&&(Ia.source!==(pa&&pa.id)&&(pa=re.style.sourceCaches[Ia.source]),(!ua||ua.getSource().maxzoom<pa.getSource().maxzoom)&&(ua=pa))}),ua&&Tr.debug(this,ua,ua.getVisibleCoordinates())}this.options.showPadding&&rt(this),this.context.setDefault()},Pr.prototype.renderLayer=function(X,pe,re,ge){re.isHidden(this.transform.zoom)||re.type!=="background"&&re.type!=="custom"&&!ge.length||(this.id=re.id,this.gpuTimingStart(re),Tr[re.type](X,pe,re,ge,this.style.placement.variableOffsets),this.gpuTimingEnd())},Pr.prototype.gpuTimingStart=function(X){if(this.options.gpuTiming){var pe=this.context.extTimerQuery,re=this.gpuTimers[X.id];re||(re=this.gpuTimers[X.id]={calls:0,cpuTime:0,query:pe.createQueryEXT()}),re.calls++,pe.beginQueryEXT(pe.TIME_ELAPSED_EXT,re.query)}},Pr.prototype.gpuTimingEnd=function(){if(this.options.gpuTiming){var X=this.context.extTimerQuery;X.endQueryEXT(X.TIME_ELAPSED_EXT)}},Pr.prototype.collectGpuTimers=function(){var X=this.gpuTimers;return this.gpuTimers={},X},Pr.prototype.queryGpuTimers=function(X){var pe={};for(var re in X){var ge=X[re],_e=this.context.extTimerQuery,Ze=_e.getQueryObjectEXT(ge.query,_e.QUERY_RESULT_EXT)/(1e3*1e3);_e.deleteQueryEXT(ge.query),pe[re]=Ze}return pe},Pr.prototype.translatePosMatrix=function(X,pe,re,ge,_e){if(!re[0]&&!re[1])return X;var Ze=_e?ge==="map"?this.transform.angle:0:ge==="viewport"?-this.transform.angle:0;if(Ze){var st=Math.sin(Ze),mt=Math.cos(Ze);re=[re[0]*mt-re[1]*st,re[0]*st+re[1]*mt]}var Nt=[_e?re[0]:gn(pe,re[0],this.transform.zoom),_e?re[1]:gn(pe,re[1],this.transform.zoom),0],Jt=new Float32Array(16);return i.translate(Jt,X,Nt),Jt},Pr.prototype.saveTileTexture=function(X){var pe=this._tileTextures[X.size[0]];pe?pe.push(X):this._tileTextures[X.size[0]]=[X]},Pr.prototype.getTileTexture=function(X){var pe=this._tileTextures[X];return pe&&pe.length>0?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<pe.length;_e++)re[_e]=pe[_e]?this.min[_e]:this.center[_e],ge[_e]=pe[_e]?this.center[_e]:this.max[_e];return ge[2]=this.max[2],new Jr(re,ge)},Jr.prototype.distanceX=function(X){var pe=Math.max(Math.min(this.max[0],X[0]),this.min[0]);return pe-X[0]},Jr.prototype.distanceY=function(X){var pe=Math.max(Math.min(this.max[1],X[1]),this.min[1]);return pe-X[1]},Jr.prototype.intersects=function(X){for(var pe=[[this.min[0],this.min[1],0,1],[this.max[0],this.min[1],0,1],[this.max[0],this.max[1],0,1],[this.min[0],this.max[1],0,1]],re=!0,ge=0;ge<X.planes.length;ge++){for(var _e=X.planes[ge],Ze=0,st=0;st<pe.length;st++)Ze+=i.dot$1(_e,pe[st])>=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;ur<X.points.length;ur++){var yr=X.points[ur][mt]-this.min[mt];Nt=Math.min(Nt,yr),Jt=Math.max(Jt,yr)}if(Jt<0||Nt>this.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&&pe<X.minzoom)return[];X.maxzoom!==void 0&&pe>X.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<<Fr-Vr.zoom)-2;if(Vr.zoom===Fr||Zn>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-X<Nt.y?Nt.y/(pe-X):0}if(this.lngRange){var yr=this.lngRange;re=i.mercatorXfromLng(yr[0])*this.worldSize,ge=i.mercatorXfromLng(yr[1])*this.worldSize,Ze=ge-re<Nt.x?Nt.x/(ge-re):0}var Fr=this.point,Gr=Math.max(Ze||0,_e||0);if(Gr){this.center=this.unproject(new i.Point(Ze?(ge+re)/2:Fr.x,_e?(pe+X)/2:Fr.y)),this.zoom+=this.scaleZoom(Gr),this._unmodified=Jt,this._constraining=!1;return}if(this.latRange){var Wr=Fr.y,Vr=Nt.y/2;Wr-Vr<X&&(mt=X+Vr),Wr+Vr>pe&&(mt=pe-Vr)}if(this.lngRange){var Qr=Fr.x,sn=Nt.x/2;Qr-sn<re&&(st=re+sn),Qr+sn>ge&&(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<mt.length;st+=1){var Nt=mt[st];re=Math.min(re,Nt.x),ge=Math.min(ge,Nt.y),_e=Math.max(_e,Nt.x),Ze=Math.max(Ze,Nt.y)}return[new i.Point(re,ge),new i.Point(_e,ge),new i.Point(_e,Ze),new i.Point(re,Ze),new i.Point(re,ge)]},Object.defineProperties(bn.prototype,Rn);function ha(ve,X){var pe=!1,re=null,ge=function(){re=null,pe&&(ve(),re=setTimeout(ge,X),pe=!1)};return function(){return pe=!0,re||ge(),re}}var Ca=function(X){this._hashName=X&&encodeURIComponent(X),i.bindAll(["_getCurrentHash","_onHashChange","_updateHash"],this),this._updateHash=ha(this._updateHashUnthrottled.bind(this),30*1e3/100)};Ca.prototype.addTo=function(X){return this._map=X,i.window.addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this},Ca.prototype.remove=function(){return i.window.removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this},Ca.prototype.getHashString=function(X){var pe=this._map.getCenter(),re=Math.round(this._map.getZoom()*100)/100,ge=Math.ceil((re*Math.LN2+Math.log(512/360/.5))/Math.LN10),_e=Math.pow(10,ge),Ze=Math.round(pe.lng*_e)/_e,st=Math.round(pe.lat*_e)/_e,mt=this._map.getBearing(),Nt=this._map.getPitch(),Jt="";if(X?Jt+="/"+Ze+"/"+st+"/"+re:Jt+=re+"/"+st+"/"+Ze,(mt||Nt)&&(Jt+="/"+Math.round(mt*10)/10),Nt&&(Jt+="/"+Math.round(Nt)),this._hashName){var ur=this._hashName,yr=!1,Fr=i.window.location.hash.slice(1).split("&").map(function(Gr){var Wr=Gr.split("=")[0];return Wr===ur?(yr=!0,Wr+"="+Jt):Gr}).filter(function(Gr){return Gr});return yr||Fr.push(ur+"="+Jt),"#"+Fr.join("&")}return"#"+Jt},Ca.prototype._getCurrentHash=function(){var X=this,pe=i.window.location.hash.replace("#","");if(this._hashName){var re;return pe.split("&").map(function(ge){return ge.split("=")}).forEach(function(ge){ge[0]===X._hashName&&(re=ge)}),(re&&re[1]||"").split("/")}return pe.split("/")},Ca.prototype._onHashChange=function(){var X=this._getCurrentHash();if(X.length>=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<ge.length;re+=1){var _e=ge[re],Ze=_e.settings;pe.zoom+=Ze.zoomDelta||0,pe.bearing+=Ze.bearingDelta||0,pe.pitch+=Ze.pitchDelta||0,Ze.panDelta&&pe.pan._add(Ze.panDelta),Ze.around&&(pe.around=Ze.around),Ze.pinchAround&&(pe.pinchAround=Ze.pinchAround)}var st=this._inertiaBuffer[this._inertiaBuffer.length-1],mt=st.time-this._inertiaBuffer[0].time,Nt={};if(pe.pan.mag()){var Jt=Ce(pe.pan.mag(),mt,i.extend({},Da,X||{}));Nt.offset=pe.pan.mult(Jt.amount/pe.pan.mag()),Nt.center=this._map.transform.center,fe(Nt,Jt)}if(pe.zoom){var ur=Ce(pe.zoom,mt,ka);Nt.zoom=this._map.transform.zoom+ur.amount,fe(Nt,ur)}if(pe.bearing){var yr=Ce(pe.bearing,mt,ai);Nt.bearing=this._map.transform.bearing+i.clamp(yr.amount,-179,179),fe(Nt,yr)}if(pe.pitch){var Fr=Ce(pe.pitch,mt,Di);Nt.pitch=this._map.transform.pitch+Fr.amount,fe(Nt,Fr)}if(Nt.zoom||Nt.bearing){var Gr=pe.pinchAround===void 0?pe.around:pe.pinchAround;Nt.around=Gr?this._map.unproject(Gr):this._map.getCenter()}return this.clear(),i.extend(Nt,{noMoveStart:!0})}};function fe(ve,X){(!ve.duration||ve.duration<X.duration)&&(ve.duration=X.duration,ve.easing=X.easing)}function Ce(ve,X,pe){var re=pe.maxSpeed,ge=pe.linearity,_e=pe.deceleration,Ze=i.clamp(ve*ge/(X/1e3),-re,re),st=Math.abs(Ze)/(_e*ge);return{easing:pe.easing,duration:st*1e3,amount:Ze*(st/2)}}var Ve=function(ve){function X(re,ge,_e,Ze){Ze===void 0&&(Ze={});var st=A.mousePos(ge.getCanvasContainer(),_e),mt=ge.unproject(st);ve.call(this,re,i.extend({point:st,lngLat:mt,originalEvent:_e},Ze)),this._defaultPrevented=!1,this.target=ge}ve&&(X.__proto__=ve),X.prototype=Object.create(ve&&ve.prototype),X.prototype.constructor=X;var pe={defaultPrevented:{configurable:!0}};return X.prototype.preventDefault=function(){this._defaultPrevented=!0},pe.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(X.prototype,pe),X}(i.Event),Qe=function(ve){function X(re,ge,_e){var Ze=re==="touchend"?_e.changedTouches:_e.touches,st=A.touchPos(ge.getCanvasContainer(),Ze),mt=st.map(function(ur){return ge.unproject(ur)}),Nt=st.reduce(function(ur,yr,Fr,Gr){return ur.add(yr.div(Gr.length))},new i.Point(0,0)),Jt=ge.unproject(Nt);ve.call(this,re,{points:st,point:Nt,lngLats:mt,lngLat:Jt,originalEvent:_e}),this._defaultPrevented=!1}ve&&(X.__proto__=ve),X.prototype=Object.create(ve&&ve.prototype),X.prototype.constructor=X;var pe={defaultPrevented:{configurable:!0}};return X.prototype.preventDefault=function(){this._defaultPrevented=!0},pe.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(X.prototype,pe),X}(i.Event),tt=function(ve){function X(re,ge,_e){ve.call(this,re,{originalEvent:_e}),this._defaultPrevented=!1}ve&&(X.__proto__=ve),X.prototype=Object.create(ve&&ve.prototype),X.prototype.constructor=X;var pe={defaultPrevented:{configurable:!0}};return X.prototype.preventDefault=function(){this._defaultPrevented=!0},pe.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(X.prototype,pe),X}(i.Event),it=function(X,pe){this._map=X,this._clickTolerance=pe.clickTolerance};it.prototype.reset=function(){delete this._mousedownPos},it.prototype.wheel=function(X){return this._firePreventable(new tt(X.type,this._map,X))},it.prototype.mousedown=function(X,pe){return this._mousedownPos=pe,this._firePreventable(new Ve(X.type,this._map,X))},it.prototype.mouseup=function(X){this._map.fire(new Ve(X.type,this._map,X))},it.prototype.click=function(X,pe){this._mousedownPos&&this._mousedownPos.dist(pe)>=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._clickTolerance)){var ge=this._startPos;this._lastPos=re,this._box||(this._box=A.create("div","mapboxgl-boxzoom",this._container),this._container.classList.add("mapboxgl-crosshair"),this._fireEvent("boxzoomstart",X));var _e=Math.min(ge.x,re.x),Ze=Math.max(ge.x,re.x),st=Math.min(ge.y,re.y),mt=Math.max(ge.y,re.y);A.setTransform(this._box,"translate("+_e+"px,"+st+"px)"),this._box.style.width=Ze-_e+"px",this._box.style.height=mt-st+"px"}}},ht.prototype.mouseupWindow=function(X,pe){var re=this;if(this._active&&X.button===0){var ge=this._startPos,_e=pe;if(this.reset(),A.suppressClick(),ge.x===_e.x&&ge.y===_e.y)this._fireEvent("boxzoomcancel",X);else return this._map.fire(new i.Event("boxzoomend",{originalEvent:X})),{cameraAnimation:function(Ze){return Ze.fitScreenCoordinates(ge,_e,re._map.getBearing(),{linear:!0})}}}},ht.prototype.keydown=function(X){this._active&&X.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",X))},ht.prototype.reset=function(){this._active=!1,this._container.classList.remove("mapboxgl-crosshair"),this._box&&(A.remove(this._box),this._box=null),A.enableDrag(),delete this._startPos,delete this._lastPos},ht.prototype._fireEvent=function(X,pe){return this._map.fire(new i.Event(X,{originalEvent:pe}))};function Ut(ve,X){for(var pe={},re=0;re<ve.length;re++)pe[ve[re].identifier]=X[re];return pe}function er(ve){for(var X=new i.Point(0,0),pe=0,re=ve;pe<re.length;pe+=1){var ge=re[pe];X._add(ge)}return X.div(ve.length)}var tr=500,Lr=500,Sr=30,Kr=function(X){this.reset(),this.numTouches=X.numTouches};Kr.prototype.reset=function(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1},Kr.prototype.touchstart=function(X,pe,re){(this.centroid||re.length>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.lastTime<tr,Ze=!this.lastTap||this.lastTap.dist(ge)<Sr;if((!_e||!Ze)&&this.reset(),this.count++,this.lastTime=X.timeStamp,this.lastTap=ge,this.count===this.numTaps)return this.reset(),ge}};var Dr=function(){this._zoomIn=new en({numTouches:1,numTaps:2}),this._zoomOut=new en({numTouches:2,numTaps:1}),this.reset()};Dr.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},Dr.prototype.touchstart=function(X,pe,re){this._zoomIn.touchstart(X,pe,re),this._zoomOut.touchstart(X,pe,re)},Dr.prototype.touchmove=function(X,pe,re){this._zoomIn.touchmove(X,pe,re),this._zoomOut.touchmove(X,pe,re)},Dr.prototype.touchend=function(X,pe,re){var ge=this,_e=this._zoomIn.touchend(X,pe,re),Ze=this._zoomOut.touchend(X,pe,re);if(_e)return this._active=!0,X.preventDefault(),setTimeout(function(){return ge.reset()},0),{cameraAnimation:function(st){return st.easeTo({duration:300,zoom:st.getZoom()+1,around:st.unproject(_e)},{originalEvent:X})}};if(Ze)return this._active=!0,X.preventDefault(),setTimeout(function(){return ge.reset()},0),{cameraAnimation:function(st){return st.easeTo({duration:300,zoom:st.getZoom()-1,around:st.unproject(Ze)},{originalEvent:X})}}},Dr.prototype.touchcancel=function(){this.reset()},Dr.prototype.enable=function(){this._enabled=!0},Dr.prototype.disable=function(){this._enabled=!1,this.reset()},Dr.prototype.isEnabled=function(){return this._enabled},Dr.prototype.isActive=function(){return this._active};var Ur=0,Zr=2,tn=function(X){this.reset(),this._clickTolerance=X.clickTolerance||1};tn.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},tn.prototype._correctButton=function(X,pe){return!1},tn.prototype._move=function(X,pe){return{}},tn.prototype.mousedown=function(X,pe){if(!this._lastPoint){var re=A.mouseButton(X);this._correctButton(X,re)&&(this._lastPoint=pe,this._eventButton=re)}},tn.prototype.mousemoveWindow=function(X,pe){var re=this._lastPoint;if(re&&(X.preventDefault(),!(!this._moved&&pe.dist(re)<this._clickTolerance)))return this._moved=!0,this._lastPoint=pe,this._move(re,pe)},tn.prototype.mouseupWindow=function(X){var pe=A.mouseButton(X);pe===this._eventButton&&(this._moved&&A.suppressClick(),this.reset())},tn.prototype.enable=function(){this._enabled=!0},tn.prototype.disable=function(){this._enabled=!1,this.reset()},tn.prototype.isEnabled=function(){return this._enabled},tn.prototype.isActive=function(){return this._active};var ln=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.mousedown=function(re,ge){ve.prototype.mousedown.call(this,re,ge),this._lastPoint&&(this._active=!0)},X.prototype._correctButton=function(re,ge){return ge===Ur&&!re.ctrlKey},X.prototype._move=function(re,ge){return{around:ge,panDelta:ge.sub(re)}},X}(tn),Xr=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._correctButton=function(re,ge){return ge===Ur&&re.ctrlKey||ge===Zr},X.prototype._move=function(re,ge){var _e=.8,Ze=(ge.x-re.x)*_e;if(Ze)return this._active=!0,{bearingDelta:Ze}},X.prototype.contextmenu=function(re){re.preventDefault()},X}(tn),Nn=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._correctButton=function(re,ge){return ge===Ur&&re.ctrlKey||ge===Zr},X.prototype._move=function(re,ge){var _e=-.5,Ze=(ge.y-re.y)*_e;if(Ze)return this._active=!0,{pitchDelta:Ze}},X.prototype.contextmenu=function(re){re.preventDefault()},X}(tn),Gn=function(X){this._minTouches=1,this._clickTolerance=X.clickTolerance||1,this.reset()};Gn.prototype.reset=function(){this._active=!1,this._touches={},this._sum=new i.Point(0,0)},Gn.prototype.touchstart=function(X,pe,re){return this._calculateTransform(X,pe,re)},Gn.prototype.touchmove=function(X,pe,re){if(this._active)return X.preventDefault(),this._calculateTransform(X,pe,re)},Gn.prototype.touchend=function(X,pe,re){this._calculateTransform(X,pe,re),this._active&&re.length<this._minTouches&&this.reset()},Gn.prototype.touchcancel=function(){this.reset()},Gn.prototype._calculateTransform=function(X,pe,re){re.length>0&&(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,!(st<this._minTouches||!Ze.mag())){var ur=Ze.div(st);if(this._sum._add(ur),!(this._sum.mag()<this._clickTolerance)){var yr=_e.div(st);return{around:yr,panDelta:ur}}}},Gn.prototype.enable=function(){this._enabled=!0},Gn.prototype.disable=function(){this._enabled=!1,this.reset()},Gn.prototype.isEnabled=function(){return this._enabled},Gn.prototype.isActive=function(){return this._active};var Kn=function(){this.reset()};Kn.prototype.reset=function(){this._active=!1,delete this._firstTwoTouches},Kn.prototype._start=function(X){},Kn.prototype._move=function(X,pe,re){return{}},Kn.prototype.touchstart=function(X,pe,re){this._firstTwoTouches||re.length<2||(this._firstTwoTouches=[re[0].identifier,re[1].identifier],this._start([pe[0],pe[1]]))},Kn.prototype.touchmove=function(X,pe,re){if(this._firstTwoTouches){X.preventDefault();var ge=this._firstTwoTouches,_e=ge[0],Ze=ge[1],st=na(re,pe,_e),mt=na(re,pe,Ze);if(!(!st||!mt)){var Nt=this._aroundCenter?null:st.add(mt).div(2);return this._move([st,mt],Nt,X)}}},Kn.prototype.touchend=function(X,pe,re){if(this._firstTwoTouches){var ge=this._firstTwoTouches,_e=ge[0],Ze=ge[1],st=na(re,pe,_e),mt=na(re,pe,Ze);st&&mt||(this._active&&A.suppressClick(),this.reset())}},Kn.prototype.touchcancel=function(){this.reset()},Kn.prototype.enable=function(X){this._enabled=!0,this._aroundCenter=!!X&&X.around==="center"},Kn.prototype.disable=function(){this._enabled=!1,this.reset()},Kn.prototype.isEnabled=function(){return this._enabled},Kn.prototype.isActive=function(){return this._active};function na(ve,X,pe){for(var re=0;re<ve.length;re++)if(ve[re].identifier===pe)return X[re]}var ba=.1;function ma(ve,X){return Math.log(ve/X)/Math.LN2}var Ua=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),delete this._distance,delete this._startDistance},X.prototype._start=function(re){this._startDistance=this._distance=re[0].dist(re[1])},X.prototype._move=function(re,ge){var _e=this._distance;if(this._distance=re[0].dist(re[1]),!(!this._active&&Math.abs(ma(this._distance,this._startDistance))<ba))return this._active=!0,{zoomDelta:ma(this._distance,_e),pinchAround:ge}},X}(Kn),Ea=25;function Oa(ve,X){return ve.angleWith(X)*180/Math.PI}var Ja=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),delete this._minDiameter,delete this._startVector,delete this._vector},X.prototype._start=function(re){this._startVector=this._vector=re[0].sub(re[1]),this._minDiameter=re[0].dist(re[1])},X.prototype._move=function(re,ge){var _e=this._vector;if(this._vector=re[0].sub(re[1]),!(!this._active&&this._isBelowThreshold(this._vector)))return this._active=!0,{bearingDelta:Oa(this._vector,_e),pinchAround:ge}},X.prototype._isBelowThreshold=function(re){this._minDiameter=Math.min(this._minDiameter,re.mag());var ge=Math.PI*this._minDiameter,_e=Ea/ge*360,Ze=Oa(re,this._startVector);return Math.abs(Ze)<_e},X}(Kn);function ei(ve){return Math.abs(ve.y)>Math.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._firstMove<li?void 0:!1;var Nt=re.y>0==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;X<pe.length;X+=1){var re=pe[X],ge=re[0],_e=re[1],Ze=re[2];A.removeEventListener(ge,_e,ge===i.window.document?this.handleWindowEvent:this.handleEvent,Ze)}},pi.prototype._addDefaultHandlers=function(X){var pe=this._map,re=pe.getCanvasContainer();this._add("mapEvent",new it(pe,X));var ge=pe.boxZoom=new ht(pe,X);this._add("boxZoom",ge);var _e=new Dr,Ze=new Ma;pe.doubleClickZoom=new ga(Ze,_e),this._add("tapZoom",_e),this._add("clickZoom",Ze);var st=new bi;this._add("tapDragZoom",st);var mt=pe.touchPitch=new Bn;this._add("touchPitch",mt);var Nt=new Xr(X),Jt=new Nn(X);pe.dragRotate=new zo(X,Nt,Jt),this._add("mouseRotate",Nt,["mousePitch"]),this._add("mousePitch",Jt,["mouseRotate"]);var ur=new ln(X),yr=new Gn(X);pe.dragPan=new Ni(re,ur,yr),this._add("mousePan",ur),this._add("touchPan",yr,["touchZoom","touchRotate"]);var Fr=new Ja,Gr=new Ua;pe.touchZoomRotate=new $i(re,Gr,Fr,st),this._add("touchRotate",Fr,["touchPan","touchZoom"]),this._add("touchZoom",Gr,["touchPan","touchRotate"]);var Wr=pe.scrollZoom=new fi(pe,this);this._add("scrollZoom",Wr,["mousePan"]);var Vr=pe.keyboard=new _a;this._add("keyboard",Vr),this._add("blockableMapEvent",new Rt(pe));for(var Qr=0,sn=["boxZoom","doubleClickZoom","tapDragZoom","touchPitch","dragRotate","dragPan","touchZoomRotate","scrollZoom","keyboard"];Qr<sn.length;Qr+=1){var Sn=sn[Qr];X.interactive&&X[Sn]&&pe[Sn].enable(X[Sn])}},pi.prototype._add=function(X,pe,re){this._handlers.push({handlerName:X,handler:pe,allowed:re}),this._handlersById[X]=pe},pi.prototype.stop=function(){if(!this._updatingCamera){for(var X=0,pe=this._handlers;X<pe.length;X+=1){var re=pe[X],ge=re.handler;ge.reset()}this._inertia.clear(),this._fireEvents({},{}),this._changes=[]}},pi.prototype.isActive=function(){for(var X=0,pe=this._handlers;X<pe.length;X+=1){var re=pe[X],ge=re.handler;if(ge.isActive())return!0}return!1},pi.prototype.isZooming=function(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()},pi.prototype.isRotating=function(){return!!this._eventsInProgress.rotate},pi.prototype.isMoving=function(){return!!xo(this._eventsInProgress)||this.isZooming()},pi.prototype._blockedByActive=function(X,pe,re){for(var ge in X)if(ge!==re&&(!pe||pe.indexOf(ge)<0))return!0;return!1},pi.prototype.handleWindowEvent=function(X){this.handleEvent(X,X.type+"Window")},pi.prototype._getMapTouches=function(X){for(var pe=[],re=0,ge=X;re<ge.length;re+=1){var _e=ge[re],Ze=_e.target;this._el.contains(Ze)&&pe.push(_e)}return pe},pi.prototype.handleEvent=function(X,pe){if(X.type==="blur"){this.stop();return}this._updatingCamera=!0;for(var re=X.type==="renderFrame"?void 0:X,ge={needsRenderFrame:!1},_e={},Ze={},st=X.touches?this._getMapTouches(X.touches):void 0,mt=st?A.touchPos(this._el,st):A.mousePos(this._el,X),Nt=0,Jt=this._handlers;Nt<Jt.length;Nt+=1){var ur=Jt[Nt],yr=ur.handlerName,Fr=ur.handler,Gr=ur.allowed;if(Fr.isEnabled()){var Wr=void 0;this._blockedByActive(Ze,Gr,yr)?Fr.reset():Fr[pe||X.type]&&(Wr=Fr[pe||X.type](X,mt,st),this.mergeHandlerResult(ge,_e,Wr,yr,re),Wr&&Wr.needsRenderFrame&&this._triggerRenderFrame()),(Wr||Fr.isActive())&&(Ze[yr]=Fr)}}var Vr={};for(var Qr in this._previousActiveHandlers)Ze[Qr]||(Vr[Qr]=re);this._previousActiveHandlers=Ze,(Object.keys(Vr).length||Go(ge))&&(this._changes.push([ge,_e,Vr]),this._triggerRenderFrame()),(Object.keys(Ze).length||Go(ge))&&this._map._stop(!0),this._updatingCamera=!1;var sn=ge.cameraAnimation;sn&&(this._inertia.clear(),this._fireEvents({},{}),this._changes=[],sn(this._map))},pi.prototype.mergeHandlerResult=function(X,pe,re,ge,_e){if(re){i.extend(X,re);var Ze={handlerName:ge,originalEvent:re.originalEvent||_e};re.zoomDelta!==void 0&&(pe.zoom=Ze),re.panDelta!==void 0&&(pe.drag=Ze),re.pitchDelta!==void 0&&(pe.pitch=Ze),re.bearingDelta!==void 0&&(pe.rotate=Ze)}},pi.prototype._applyChanges=function(){for(var X={},pe={},re={},ge=0,_e=this._changes;ge<_e.length;ge+=1){var Ze=_e[ge],st=Ze[0],mt=Ze[1],Nt=Ze[2];st.panDelta&&(X.panDelta=(X.panDelta||new i.Point(0,0))._add(st.panDelta)),st.zoomDelta&&(X.zoomDelta=(X.zoomDelta||0)+st.zoomDelta),st.bearingDelta&&(X.bearingDelta=(X.bearingDelta||0)+st.bearingDelta),st.pitchDelta&&(X.pitchDelta=(X.pitchDelta||0)+st.pitchDelta),st.around!==void 0&&(X.around=st.around),st.pinchAround!==void 0&&(X.pinchAround=st.pinchAround),st.noInertia&&(X.noInertia=st.noInertia),i.extend(pe,mt),i.extend(re,Nt)}this._updateMapTransform(X,pe,re),this._changes=[]},pi.prototype._updateMapTransform=function(X,pe,re){var ge=this._map,_e=ge.transform;if(!Go(X))return this._fireEvents(pe,re);var Ze=X.panDelta,st=X.zoomDelta,mt=X.bearingDelta,Nt=X.pitchDelta,Jt=X.around,ur=X.pinchAround;ur!==void 0&&(Jt=ur),ge._stop(!0),Jt=Jt||ge.transform.centerPoint;var yr=_e.pointLocation(Ze?Jt.sub(Ze):Jt);mt&&(_e.bearing+=mt),Nt&&(_e.pitch+=Nt),st&&(_e.zoom+=st),_e.setLocationAtPoint(yr,Jt),this._map._update(),X.noInertia||this._inertia.record(X),this._fireEvents(pe,re)},pi.prototype._fireEvents=function(X,pe){var re=this,ge=xo(this._eventsInProgress),_e=xo(X),Ze={};for(var st in X){var mt=X[st],Nt=mt.originalEvent;this._eventsInProgress[st]||(Ze[st+"start"]=Nt),this._eventsInProgress[st]=X[st]}!ge&&_e&&this._fireEvent("movestart",_e.originalEvent);for(var Jt in Ze)this._fireEvent(Jt,Ze[Jt]);X.rotate&&(this._bearingChanged=!0),_e&&this._fireEvent("move",_e.originalEvent);for(var ur in X){var yr=X[ur],Fr=yr.originalEvent;this._fireEvent(ur,Fr)}var Gr={},Wr;for(var Vr in this._eventsInProgress){var Qr=this._eventsInProgress[Vr],sn=Qr.handlerName,Sn=Qr.originalEvent;this._handlersById[sn].isActive()||(delete this._eventsInProgress[Vr],Wr=pe[sn]||Sn,Gr[Vr+"end"]=Wr)}for(var zn in Gr)this._fireEvent(zn,Gr[zn]);var Yn=xo(this._eventsInProgress);if((ge||_e)&&!Yn){this._updatingCamera=!0;var Xn=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),Zn=function(ra){return ra!==0&&-re._bearingSnap<ra&&ra<re._bearingSnap};Xn?(Zn(Xn.bearing||this._map.getBearing())&&(Xn.bearing=0),this._map.easeTo(Xn,{originalEvent:Wr})):(this._map.fire(new i.Event("moveend",{originalEvent:Wr})),Zn(this._map.getBearing())&&this._map.resetNorth()),this._bearingChanged=!1,this._updatingCamera=!1}},pi.prototype._fireEvent=function(X,pe){this._map.fire(new i.Event(X,pe?{originalEvent:pe}:{}))},pi.prototype._triggerRenderFrame=function(){var X=this;this._frameId===void 0&&(this._frameId=this._map._requestRenderFrame(function(pe){delete X._frameId,X.handleEvent(new Ci("renderFrame",{timeStamp:pe})),X._applyChanges()}))};var ys=function(ve){function X(pe,re){ve.call(this),this._moving=!1,this._zooming=!1,this.transform=pe,this._bearingSnap=re.bearingSnap,i.bindAll(["_renderFrameCallback"],this)}return ve&&(X.__proto__=ve),X.prototype=Object.create(ve&&ve.prototype),X.prototype.constructor=X,X.prototype.getCenter=function(){return new i.LngLat(this.transform.center.lng,this.transform.center.lat)},X.prototype.setCenter=function(re,ge){return this.jumpTo({center:re},ge)},X.prototype.panBy=function(re,ge,_e){return re=i.Point.convert(re).mult(-1),this.panTo(this.transform.center,i.extend({offset:re},ge),_e)},X.prototype.panTo=function(re,ge,_e){return this.easeTo(i.extend({center:re},ge),_e)},X.prototype.getZoom=function(){return this.transform.zoom},X.prototype.setZoom=function(re,ge){return this.jumpTo({zoom:re},ge),this},X.prototype.zoomTo=function(re,ge,_e){return this.easeTo(i.extend({zoom:re},ge),_e)},X.prototype.zoomIn=function(re,ge){return this.zoomTo(this.getZoom()+1,re,ge),this},X.prototype.zoomOut=function(re,ge){return this.zoomTo(this.getZoom()-1,re,ge),this},X.prototype.getBearing=function(){return this.transform.bearing},X.prototype.setBearing=function(re,ge){return this.jumpTo({bearing:re},ge),this},X.prototype.getPadding=function(){return this.transform.padding},X.prototype.setPadding=function(re,ge){return this.jumpTo({padding:re},ge),this},X.prototype.rotateTo=function(re,ge,_e){return this.easeTo(i.extend({bearing:re},ge),_e)},X.prototype.resetNorth=function(re,ge){return this.rotateTo(0,i.extend({duration:1e3},re),ge),this},X.prototype.resetNorthPitch=function(re,ge){return this.easeTo(i.extend({bearing:0,pitch:0,duration:1e3},re),ge),this},X.prototype.snapToNorth=function(re,ge){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(re,ge):this},X.prototype.getPitch=function(){return this.transform.pitch},X.prototype.setPitch=function(re,ge){return this.jumpTo({pitch:re},ge),this},X.prototype.cameraForBounds=function(re,ge){return re=i.LngLatBounds.convert(re),this._cameraForBoxAndBearing(re.getNorthWest(),re.getSouthEast(),0,ge)},X.prototype._cameraForBoxAndBearing=function(re,ge,_e,Ze){var st={top:0,bottom:0,right:0,left:0};if(Ze=i.extend({padding:st,offset:[0,0],maxZoom:this.transform.maxZoom},Ze),typeof Ze.padding=="number"){var mt=Ze.padding;Ze.padding={top:mt,bottom:mt,right:mt,left:mt}}Ze.padding=i.extend(st,Ze.padding);var Nt=this.transform,Jt=Nt.padding,ur=Nt.project(i.LngLat.convert(re)),yr=Nt.project(i.LngLat.convert(ge)),Fr=ur.rotate(-_e*Math.PI/180),Gr=yr.rotate(-_e*Math.PI/180),Wr=new i.Point(Math.max(Fr.x,Gr.x),Math.max(Fr.y,Gr.y)),Vr=new i.Point(Math.min(Fr.x,Gr.x),Math.min(Fr.y,Gr.y)),Qr=Wr.sub(Vr),sn=(Nt.width-(Jt.left+Jt.right+Ze.padding.left+Ze.padding.right))/Qr.x,Sn=(Nt.height-(Jt.top+Jt.bottom+Ze.padding.top+Ze.padding.bottom))/Qr.y;if(Sn<0||sn<0){i.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset.");return}var zn=Math.min(Nt.scaleZoom(Nt.scale*Math.min(sn,Sn)),Ze.maxZoom),Yn=i.Point.convert(Ze.offset),Xn=(Ze.padding.left-Ze.padding.right)/2,Zn=(Ze.padding.top-Ze.padding.bottom)/2,ra=new i.Point(Yn.x+Xn,Yn.y+Zn),fa=ra.mult(Nt.scale/Nt.zoomScale(zn)),ua=Nt.unproject(ur.add(yr).div(2).sub(fa));return{center:ua,zoom:zn,bearing:_e}},X.prototype.fitBounds=function(re,ge,_e){return this._fitInternal(this.cameraForBounds(re,ge),ge,_e)},X.prototype.fitScreenCoordinates=function(re,ge,_e,Ze,st){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(i.Point.convert(re)),this.transform.pointLocation(i.Point.convert(ge)),_e,Ze),Ze,st)},X.prototype._fitInternal=function(re,ge,_e){return re?(ge=i.extend(re,ge),delete ge.padding,ge.linear?this.easeTo(ge,_e):this.flyTo(ge,_e)):this},X.prototype.jumpTo=function(re,ge){this.stop();var _e=this.transform,Ze=!1,st=!1,mt=!1;return"zoom"in re&&_e.zoom!==+re.zoom&&(Ze=!0,_e.zoom=+re.zoom),re.center!==void 0&&(_e.center=i.LngLat.convert(re.center)),"bearing"in re&&_e.bearing!==+re.bearing&&(st=!0,_e.bearing=+re.bearing),"pitch"in re&&_e.pitch!==+re.pitch&&(mt=!0,_e.pitch=+re.pitch),re.padding!=null&&!_e.isPaddingEqual(re.padding)&&(_e.padding=re.padding),this.fire(new i.Event("movestart",ge)).fire(new i.Event("move",ge)),Ze&&this.fire(new i.Event("zoomstart",ge)).fire(new i.Event("zoom",ge)).fire(new i.Event("zoomend",ge)),st&&this.fire(new i.Event("rotatestart",ge)).fire(new i.Event("rotate",ge)).fire(new i.Event("rotateend",ge)),mt&&this.fire(new i.Event("pitchstart",ge)).fire(new i.Event("pitch",ge)).fire(new i.Event("pitchend",ge)),this.fire(new i.Event("moveend",ge))},X.prototype.easeTo=function(re,ge){var _e=this;this._stop(!1,re.easeId),re=i.extend({offset:[0,0],duration:500,easing:i.ease},re),(re.animate===!1||!re.essential&&i.browser.prefersReducedMotion)&&(re.duration=0);var Ze=this.transform,st=this.getZoom(),mt=this.getBearing(),Nt=this.getPitch(),Jt=this.getPadding(),ur="zoom"in re?+re.zoom:st,yr="bearing"in re?this._normalizeBearing(re.bearing,mt):mt,Fr="pitch"in re?+re.pitch:Nt,Gr="padding"in re?re.padding:Ze.padding,Wr=i.Point.convert(re.offset),Vr=Ze.centerPoint.add(Wr),Qr=Ze.pointLocation(Vr),sn=i.LngLat.convert(re.center||Qr);this._normalizeCenter(sn);var Sn=Ze.project(Qr),zn=Ze.project(sn).sub(Sn),Yn=Ze.zoomScale(ur-st),Xn,Zn;re.around&&(Xn=i.LngLat.convert(re.around),Zn=Ze.locationPoint(Xn));var ra={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||ur!==st,this._rotating=this._rotating||mt!==yr,this._pitching=this._pitching||Fr!==Nt,this._padding=!Ze.isPaddingEqual(Gr),this._easeId=re.easeId,this._prepareEase(ge,re.noMoveStart,ra),clearTimeout(this._easeEndTimeoutID),this._ease(function(fa){if(_e._zooming&&(Ze.zoom=i.number(st,ur,fa)),_e._rotating&&(Ze.bearing=i.number(mt,yr,fa)),_e._pitching&&(Ze.pitch=i.number(Nt,Fr,fa)),_e._padding&&(Ze.interpolatePadding(Jt,Gr,fa),Vr=Ze.centerPoint.add(Wr)),Xn)Ze.setLocationAtPoint(Xn,Zn);else{var ua=Ze.zoomScale(Ze.zoom-st),pa=ur>st?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=fa<ra?-1:1;ci=Math.abs(Math.log(fa/ra))/Zn,ui=function(){return 0},oi=function(Ha){return Math.exp(Ka*Zn*Ha)}}if("duration"in re)re.duration=+re.duration;else{var Ti="screenSpeed"in re?+re.screenSpeed/Zn:+re.speed;re.duration=1e3*ci/Ti}return re.maxDuration&&re.duration>re.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<pe.length-1?"&":"")),ge},"?");X.href=i.config.FEEDBACK_URL+"/"+re+(this._map._hash?this._map._hash.getHashString(!0):""),X.rel="noopener nofollow"}},Wo.prototype._updateData=function(X){X&&(X.sourceDataType==="metadata"||X.dataType==="style")&&(this._updateAttributions(),this._updateEditLink())},Wo.prototype._updateAttributions=function(){if(this._map.style){var X=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?X=X.concat(this.options.customAttribution.map(function(mt){return typeof mt!="string"?"":mt})):typeof this.options.customAttribution=="string"&&X.push(this.options.customAttribution)),this._map.style.stylesheet){var pe=this._map.style.stylesheet;this.styleOwner=pe.owner,this.styleId=pe.id}var re=this._map.style.sourceCaches;for(var ge in re){var _e=re[ge];if(_e.used){var Ze=_e.getSource();Ze.attribution&&X.indexOf(Ze.attribution)<0&&X.push(Ze.attribution)}}X.sort(function(mt,Nt){return mt.length-Nt.length}),X=X.filter(function(mt,Nt){for(var Jt=Nt+1;Jt<X.length;Jt++)if(X[Jt].indexOf(mt)>=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;re<ge.length;re+=1){var _e=ge[re];if(!_e.cancelled&&(_e.callback(X),this._cleared))break}this._cleared=!1,this._currentlyRunning=!1},wi.prototype.clear=function(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]};var yc={"FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"Mapbox logo","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm"},_f=i.window.HTMLImageElement,xh=i.window.HTMLElement,$u=i.window.ImageBitmap,mc=-2,Zh=22,rs=0,qu=60,td={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:mc,maxZoom:Zh,minPitch:rs,maxPitch:qu,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,bearingSnap:7,clickTolerance:3,pitchWithRotate:!0,hash:!1,attributionControl:!0,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,renderWorldCopies:!0,refreshExpiredTiles:!0,maxTileCacheSize:null,localIdeographFontFamily:"sans-serif",transformRequest:null,accessToken:null,fadeDuration:300,crossSourceCollisions:!0},rd=function(ve){function X(re){var ge=this;if(re=i.extend({},td,re),re.minZoom!=null&&re.maxZoom!=null&&re.minZoom>re.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.minPitch<rs)throw new Error("minPitch must be greater than or equal to "+rs);if(re.maxPitch!=null&&re.maxPitch>qu)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()<ge&&this.setZoom(ge),this;throw new Error("minZoom must be between "+mc+" and the current maxZoom, inclusive")},X.prototype.getMinZoom=function(){return this.transform.minZoom},X.prototype.setMaxZoom=function(ge){if(ge=ge??Zh,ge>=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)throw new Error("minPitch must be greater than or equal to "+rs);if(ge>=rs&&ge<=this.transform.maxPitch)return this.transform.minPitch=ge,this._update(),this.getPitch()<ge&&this.setPitch(ge),this;throw new Error("minPitch must be between "+rs+" and the current maxPitch, inclusive")},X.prototype.getMinPitch=function(){return this.transform.minPitch},X.prototype.setMaxPitch=function(ge){if(ge=ge??qu,ge>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;ur<Jt.length;ur++){var yr=Jt[ur];if(yr.layer===_e&&yr.listener===Ze){for(var Fr in yr.delegates)st.off(Fr,yr.delegates[Fr]);return Jt.splice(ur,1),st}}};return this._delegatedListeners&&this._delegatedListeners[ge]&&mt(this._delegatedListeners),this},X.prototype.queryRenderedFeatures=function(ge,_e){if(!this.style)return[];_e===void 0&&ge!==void 0&&!(ge instanceof i.Point)&&!Array.isArray(ge)&&(_e=ge,ge=void 0),_e=_e||{},ge=ge||[[0,0],[this.transform.width,this.transform.height]];var Ze;if(ge instanceof i.Point||typeof ge[0]=="number")Ze=[i.Point.convert(ge)];else{var st=i.Point.convert(ge[0]),mt=i.Point.convert(ge[1]);Ze=[st,new i.Point(mt.x,st.y),mt,new i.Point(st.x,mt.y),st]}return this.style.queryRenderedFeatures(Ze,_e,this.transform)},X.prototype.querySourceFeatures=function(ge,_e){return this.style.querySourceFeatures(ge,_e)},X.prototype.setStyle=function(ge,_e){return _e=i.extend({},{localIdeographFontFamily:this._localIdeographFontFamily},_e),_e.diff!==!1&&_e.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&ge?(this._diffStyle(ge,_e),this):(this._localIdeographFontFamily=_e.localIdeographFontFamily,this._updateStyle(ge,_e))},X.prototype._getUIString=function(ge){var _e=this._locale[ge];if(_e==null)throw new Error("Missing UI string '"+ge+"'");return _e},X.prototype._updateStyle=function(ge,_e){if(this.style&&(this.style.setEventedParent(null),this.style._remove()),ge)this.style=new yo(this,_e||{});else return delete this.style,this;return this.style.setEventedParent(this,{style:this.style}),typeof ge=="string"?this.style.loadURL(ge):this.style.loadJSON(ge),this},X.prototype._lazyInitEmptyStyle=function(){this.style||(this.style=new yo(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())},X.prototype._diffStyle=function(ge,_e){var Ze=this;if(typeof ge=="string"){var st=this._requestManager.normalizeStyleURL(ge),mt=this._requestManager.transformRequest(st,i.ResourceType.Style);i.getJSON(mt,function(Nt,Jt){Nt?Ze.fire(new i.ErrorEvent(Nt)):Jt&&Ze._updateDiff(Jt,_e)})}else typeof ge=="object"&&this._updateDiff(ge,_e)},X.prototype._updateDiff=function(ge,_e){try{this.style.setState(ge)&&this._update(!0)}catch(Ze){i.warnOnce("Unable to perform style diff: "+(Ze.message||Ze.error||Ze)+". Rebuilding the style from scratch."),this._updateStyle(ge,_e)}},X.prototype.getStyle=function(){if(this.style)return this.style.serialize()},X.prototype.isStyleLoaded=function(){return this.style?this.style.loaded():i.warnOnce("There is no style added to the map.")},X.prototype.addSource=function(ge,_e){return this._lazyInitEmptyStyle(),this.style.addSource(ge,_e),this._update(!0)},X.prototype.isSourceLoaded=function(ge){var _e=this.style&&this.style.sourceCaches[ge];if(_e===void 0){this.fire(new i.ErrorEvent(new Error("There is no source with ID '"+ge+"'")));return}return _e.loaded()},X.prototype.areTilesLoaded=function(){var ge=this.style&&this.style.sourceCaches;for(var _e in ge){var Ze=ge[_e],st=Ze._tiles;for(var mt in st){var Nt=st[mt];if(!(Nt.state==="loaded"||Nt.state==="errored"))return!1}}return!0},X.prototype.addSourceType=function(ge,_e,Ze){return this._lazyInitEmptyStyle(),this.style.addSourceType(ge,_e,Ze)},X.prototype.removeSource=function(ge){return this.style.removeSource(ge),this._update(!0)},X.prototype.getSource=function(ge){return this.style.getSource(ge)},X.prototype.addImage=function(ge,_e,Ze){Ze===void 0&&(Ze={});var st=Ze.pixelRatio;st===void 0&&(st=1);var mt=Ze.sdf;mt===void 0&&(mt=!1);var Nt=Ze.stretchX,Jt=Ze.stretchY,ur=Ze.content;this._lazyInitEmptyStyle();var yr=0;if(_e instanceof _f||$u&&_e instanceof $u){var Fr=i.browser.getImageData(_e),Gr=Fr.width,Wr=Fr.height,Vr=Fr.data;this.style.addImage(ge,{data:new i.RGBAImage({width:Gr,height:Wr},Vr),pixelRatio:st,stretchX:Nt,stretchY:Jt,content:ur,sdf:mt,version:yr})}else{if(_e.width===void 0||_e.height===void 0)return this.fire(new i.ErrorEvent(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));var Qr=_e.width,sn=_e.height,Sn=_e.data,zn=_e;this.style.addImage(ge,{data:new i.RGBAImage({width:Qr,height:sn},new Uint8Array(Sn)),pixelRatio:st,stretchX:Nt,stretchY:Jt,content:ur,sdf:mt,version:yr,userImage:zn}),zn.onAdd&&zn.onAdd(this,ge)}},X.prototype.updateImage=function(ge,_e){var Ze=this.style.getImage(ge);if(!Ze)return this.fire(new i.ErrorEvent(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));var st=_e instanceof _f||$u&&_e instanceof $u?i.browser.getImageData(_e):_e,mt=st.width,Nt=st.height,Jt=st.data;if(mt===void 0||Nt===void 0)return this.fire(new i.ErrorEvent(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(mt!==Ze.data.width||Nt!==Ze.data.height)return this.fire(new i.ErrorEvent(new Error("The width and height of the updated image must be that same as the previous version of the image")));var ur=!(_e instanceof _f||$u&&_e instanceof $u);Ze.data.replace(Jt,ur),this.style.updateImage(ge,Ze)},X.prototype.hasImage=function(ge){return ge?!!this.style.getImage(ge):(this.fire(new i.ErrorEvent(new Error("Missing required image id"))),!1)},X.prototype.removeImage=function(ge){this.style.removeImage(ge)},X.prototype.loadImage=function(ge,_e){i.getImage(this._requestManager.transformRequest(ge,i.ResourceType.Image),_e)},X.prototype.listImages=function(){return this.style.listImages()},X.prototype.addLayer=function(ge,_e){return this._lazyInitEmptyStyle(),this.style.addLayer(ge,_e),this._update(!0)},X.prototype.moveLayer=function(ge,_e){return this.style.moveLayer(ge,_e),this._update(!0)},X.prototype.removeLayer=function(ge){return this.style.removeLayer(ge),this._update(!0)},X.prototype.getLayer=function(ge){return this.style.getLayer(ge)},X.prototype.setLayerZoomRange=function(ge,_e,Ze){return this.style.setLayerZoomRange(ge,_e,Ze),this._update(!0)},X.prototype.setFilter=function(ge,_e,Ze){return Ze===void 0&&(Ze={}),this.style.setFilter(ge,_e,Ze),this._update(!0)},X.prototype.getFilter=function(ge){return this.style.getFilter(ge)},X.prototype.setPaintProperty=function(ge,_e,Ze,st){return st===void 0&&(st={}),this.style.setPaintProperty(ge,_e,Ze,st),this._update(!0)},X.prototype.getPaintProperty=function(ge,_e){return this.style.getPaintProperty(ge,_e)},X.prototype.setLayoutProperty=function(ge,_e,Ze,st){return st===void 0&&(st={}),this.style.setLayoutProperty(ge,_e,Ze,st),this._update(!0)},X.prototype.getLayoutProperty=function(ge,_e){return this.style.getLayoutProperty(ge,_e)},X.prototype.setLight=function(ge,_e){return _e===void 0&&(_e={}),this._lazyInitEmptyStyle(),this.style.setLight(ge,_e),this._update(!0)},X.prototype.getLight=function(){return this.style.getLight()},X.prototype.setFeatureState=function(ge,_e){return this.style.setFeatureState(ge,_e),this._update()},X.prototype.removeFeatureState=function(ge,_e){return this.style.removeFeatureState(ge,_e),this._update()},X.prototype.getFeatureState=function(ge){return this.style.getFeatureState(ge)},X.prototype.getContainer=function(){return this._container},X.prototype.getCanvasContainer=function(){return this._canvasContainer},X.prototype.getCanvas=function(){return this._canvas},X.prototype._containerDimensions=function(){var ge=0,_e=0;return this._container&&(ge=this._container.clientWidth||400,_e=this._container.clientHeight||300),[ge,_e]},X.prototype._detectMissingCSS=function(){var ge=i.window.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color");ge!=="rgb(250, 128, 114)"&&i.warnOnce("This page appears to be missing CSS declarations for Mapbox GL JS, which may cause the map to display incorrectly. Please ensure your page includes mapbox-gl.css, as described in https://www.mapbox.com/mapbox-gl-js/api/.")},X.prototype._setupContainer=function(){var ge=this._container;ge.classList.add("mapboxgl-map");var _e=this._missingCSSCanary=A.create("div","mapboxgl-canary",ge);_e.style.visibility="hidden",this._detectMissingCSS();var Ze=this._canvasContainer=A.create("div","mapboxgl-canvas-container",ge);this._interactive&&Ze.classList.add("mapboxgl-interactive"),this._canvas=A.create("canvas","mapboxgl-canvas",Ze),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex","0"),this._canvas.setAttribute("aria-label","Map");var st=this._containerDimensions();this._resizeCanvas(st[0],st[1]);var mt=this._controlContainer=A.create("div","mapboxgl-control-container",ge),Nt=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(function(Jt){Nt[Jt]=A.create("div","mapboxgl-ctrl-"+Jt,mt)})},X.prototype._resizeCanvas=function(ge,_e){var Ze=i.browser.devicePixelRatio||1;this._canvas.width=Ze*ge,this._canvas.height=Ze*_e,this._canvas.style.width=ge+"px",this._canvas.style.height=_e+"px"},X.prototype._setupPainter=function(){var ge=i.extend({},L.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),_e=this._canvas.getContext("webgl",ge)||this._canvas.getContext("experimental-webgl",ge);if(!_e){this.fire(new i.ErrorEvent(new Error("Failed to initialize WebGL")));return}this.painter=new Pr(_e,this.transform),i.webpSupported.testSupport(_e)},X.prototype._contextLost=function(ge){ge.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new i.Event("webglcontextlost",{originalEvent:ge}))},X.prototype._contextRestored=function(ge){this._setupPainter(),this.resize(),this._update(),this.fire(new i.Event("webglcontextrestored",{originalEvent:ge}))},X.prototype.loaded=function(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()},X.prototype._update=function(ge){return this.style?(this._styleDirty=this._styleDirty||ge,this._sourcesDirty=!0,this.triggerRepaint(),this):this},X.prototype._requestRenderFrame=function(ge){return this._update(),this._renderTaskQueue.add(ge)},X.prototype._cancelRenderFrame=function(ge){this._renderTaskQueue.remove(ge)},X.prototype._render=function(ge){var _e=this,Ze,st=0,mt=this.painter.context.extTimerQuery;if(this.listens("gpu-timing-frame")&&(Ze=mt.createQueryEXT(),mt.beginQueryEXT(mt.TIME_ELAPSED_EXT,Ze),st=i.browser.now()),this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(ge),!this._removed){var Nt=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;var Jt=this.transform.zoom,ur=i.browser.now();this.style.zoomHistory.update(Jt,ur);var yr=new i.EvaluationParameters(Jt,{now:ur,fadeDuration:this._fadeDuration,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),Fr=yr.crossFadingFactor();(Fr!==1||Fr!==this._crossFadingFactor)&&(Nt=!0,this._crossFadingFactor=Fr),this.style.update(yr)}if(this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,this._fadeDuration,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:this._fadeDuration,showPadding:this.showPadding,gpuTiming:!!this.listens("gpu-timing-layer")}),this.fire(new i.Event("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new i.Event("load"))),this.style&&(this.style.hasTransitions()||Nt)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),this.listens("gpu-timing-frame")){var Gr=i.browser.now()-st;mt.endQueryEXT(mt.TIME_ELAPSED_EXT,Ze),setTimeout(function(){var Qr=mt.getQueryObjectEXT(Ze,mt.QUERY_RESULT_EXT)/1e6;mt.deleteQueryEXT(Ze),_e.fire(new i.Event("gpu-timing-frame",{cpuTime:Gr,gpuTime:Qr}))},50)}if(this.listens("gpu-timing-layer")){var Wr=this.painter.collectGpuTimers();setTimeout(function(){var Qr=_e.painter.queryGpuTimers(Wr);_e.fire(new i.Event("gpu-timing-layer",{layerTimes:Qr}))},50)}var Vr=this._sourcesDirty||this._styleDirty||this._placementDirty;return Vr||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&(this._fullyLoaded||(this._fullyLoaded=!0),this.fire(new i.Event("idle"))),this}},X.prototype.remove=function(){this._hash&&this._hash.remove();for(var ge=0,_e=this._controls;ge<_e.length;ge+=1){var Ze=_e[ge];Ze.onRemove(this)}this._controls=[],this._frame&&(this._frame.cancel(),this._frame=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof i.window<"u"&&(i.window.removeEventListener("resize",this._onWindowResize,!1),i.window.removeEventListener("online",this._onWindowOnline,!1));var st=this.painter.context.gl.getExtension("WEBGL_lose_context");st&&st.loseContext(),bh(this._canvasContainer),bh(this._controlContainer),bh(this._missingCSSCanary),this._container.classList.remove("mapboxgl-map"),this._removed=!0,this.fire(new i.Event("remove"))},X.prototype.triggerRepaint=function(){var ge=this;this.style&&!this._frame&&(this._frame=i.browser.frame(function(_e){ge._frame=null,ge._render(_e)}))},X.prototype._onWindowOnline=function(){this._update()},X.prototype._onWindowResize=function(ge){this._trackResize&&this.resize({originalEvent:ge})._update()},pe.showTileBoundaries.get=function(){return!!this._showTileBoundaries},pe.showTileBoundaries.set=function(re){this._showTileBoundaries!==re&&(this._showTileBoundaries=re,this._update())},pe.showPadding.get=function(){return!!this._showPadding},pe.showPadding.set=function(re){this._showPadding!==re&&(this._showPadding=re,this._update())},pe.showCollisionBoxes.get=function(){return!!this._showCollisionBoxes},pe.showCollisionBoxes.set=function(re){this._showCollisionBoxes!==re&&(this._showCollisionBoxes=re,re?this.style._generateCollisionBoxes():this._update())},pe.showOverdrawInspector.get=function(){return!!this._showOverdrawInspector},pe.showOverdrawInspector.set=function(re){this._showOverdrawInspector!==re&&(this._showOverdrawInspector=re,this._update())},pe.repaint.get=function(){return!!this._repaint},pe.repaint.set=function(re){this._repaint!==re&&(this._repaint=re,this.triggerRepaint())},pe.vertices.get=function(){return!!this._vertices},pe.vertices.set=function(re){this._vertices=re,this._update()},X.prototype._setCacheLimits=function(ge,_e){i.setCacheLimits(ge,_e)},pe.version.get=function(){return i.version},Object.defineProperties(X.prototype,pe),X}(ys);function bh(ve){ve.parentNode&&ve.parentNode.removeChild(ve)}var Xh={showCompass:!0,showZoom:!0,visualizePitch:!1},wu=function(X){var pe=this;this.options=i.extend({},Xh,X),this._container=A.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",function(re){return re.preventDefault()}),this.options.showZoom&&(i.bindAll(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("mapboxgl-ctrl-zoom-in",function(re){return pe._map.zoomIn({},{originalEvent:re})}),A.create("span","mapboxgl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden",!0),this._zoomOutButton=this._createButton("mapboxgl-ctrl-zoom-out",function(re){return pe._map.zoomOut({},{originalEvent:re})}),A.create("span","mapboxgl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden",!0)),this.options.showCompass&&(i.bindAll(["_rotateCompassArrow"],this),this._compass=this._createButton("mapboxgl-ctrl-compass",function(re){pe.options.visualizePitch?pe._map.resetNorthPitch({},{originalEvent:re}):pe._map.resetNorth({},{originalEvent:re})}),this._compassIcon=A.create("span","mapboxgl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden",!0))};wu.prototype._updateZoomButtons=function(){var X=this._map.getZoom();this._zoomInButton.disabled=X===this._map.getMaxZoom(),this._zoomOutButton.disabled=X===this._map.getMinZoom()},wu.prototype._rotateCompassArrow=function(){var X=this.options.visualizePitch?"scale("+1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)+") rotateX("+this._map.transform.pitch+"deg) rotateZ("+this._map.transform.angle*(180/Math.PI)+"deg)":"rotate("+this._map.transform.angle*(180/Math.PI)+"deg)";this._compassIcon.style.transform=X},wu.prototype.onAdd=function(X){return this._map=X,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new ms(this._map,this._compass,this.options.visualizePitch)),this._container},wu.prototype.onRemove=function(){A.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map},wu.prototype._createButton=function(X,pe){var re=A.create("button",X,this._container);return re.type="button",re.addEventListener("click",pe),re},wu.prototype._setButtonTitle=function(X,pe){var re=this._map._getUIString("NavigationControl."+pe);X.title=re,X.setAttribute("aria-label",re)};var ms=function(X,pe,re){re===void 0&&(re=!1),this._clickTolerance=10,this.element=pe,this.mouseRotate=new Xr({clickTolerance:X.dragRotate._mouseRotate._clickTolerance}),this.map=X,re&&(this.mousePitch=new Nn({clickTolerance:X.dragRotate._mousePitch._clickTolerance})),i.bindAll(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend","reset"],this),A.addEventListener(pe,"mousedown",this.mousedown),A.addEventListener(pe,"touchstart",this.touchstart,{passive:!1}),A.addEventListener(pe,"touchmove",this.touchmove),A.addEventListener(pe,"touchend",this.touchend),A.addEventListener(pe,"touchcancel",this.reset)};ms.prototype.down=function(X,pe){this.mouseRotate.mousedown(X,pe),this.mousePitch&&this.mousePitch.mousedown(X,pe),A.disableDrag()},ms.prototype.move=function(X,pe){var re=this.map,ge=this.mouseRotate.mousemoveWindow(X,pe);if(ge&&ge.bearingDelta&&re.setBearing(re.getBearing()+ge.bearingDelta),this.mousePitch){var _e=this.mousePitch.mousemoveWindow(X,pe);_e&&_e.pitchDelta&&re.setPitch(re.getPitch()+_e.pitchDelta)}},ms.prototype.off=function(){var X=this.element;A.removeEventListener(X,"mousedown",this.mousedown),A.removeEventListener(X,"touchstart",this.touchstart,{passive:!1}),A.removeEventListener(X,"touchmove",this.touchmove),A.removeEventListener(X,"touchend",this.touchend),A.removeEventListener(X,"touchcancel",this.reset),this.offTemp()},ms.prototype.offTemp=function(){A.enableDrag(),A.removeEventListener(i.window,"mousemove",this.mousemove),A.removeEventListener(i.window,"mouseup",this.mouseup)},ms.prototype.mousedown=function(X){this.down(i.extend({},X,{ctrlKey:!0,preventDefault:function(){return X.preventDefault()}}),A.mousePos(this.element,X)),A.addEventListener(i.window,"mousemove",this.mousemove),A.addEventListener(i.window,"mouseup",this.mouseup)},ms.prototype.mousemove=function(X){this.move(X,A.mousePos(this.element,X))},ms.prototype.mouseup=function(X){this.mouseRotate.mouseupWindow(X),this.mousePitch&&this.mousePitch.mouseupWindow(X),this.offTemp()},ms.prototype.touchstart=function(X){X.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=A.touchPos(this.element,X.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:function(){return X.preventDefault()}},this._startPos))},ms.prototype.touchmove=function(X){X.targetTouches.length!==1?this.reset():(this._lastPos=A.touchPos(this.element,X.targetTouches)[0],this.move({preventDefault:function(){return X.preventDefault()}},this._lastPos))},ms.prototype.touchend=function(X){X.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),this.reset()},ms.prototype.reset=function(){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()};function Tu(ve,X,pe){if(ve=new i.LngLat(ve.lng,ve.lat),X){var re=new i.LngLat(ve.lng-360,ve.lat),ge=new i.LngLat(ve.lng+360,ve.lat),_e=pe.locationPoint(ve).distSqr(X);pe.locationPoint(re).distSqr(X)<_e?ve=re:pe.locationPoint(ge).distSqr(X)<_e&&(ve=ge)}for(;Math.abs(ve.lng-pe.center.lng)>180;){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;Jt<ur.length;Jt+=1){var yr=ur[Jt],Fr=A.createNS("http://www.w3.org/2000/svg","ellipse");Fr.setAttributeNS(null,"opacity","0.04"),Fr.setAttributeNS(null,"cx","10.5"),Fr.setAttributeNS(null,"cy","5.80029008"),Fr.setAttributeNS(null,"rx",yr.rx),Fr.setAttributeNS(null,"ry",yr.ry),mt.appendChild(Fr)}var Gr=A.createNS("http://www.w3.org/2000/svg","g");Gr.setAttributeNS(null,"fill",this._color);var Wr=A.createNS("http://www.w3.org/2000/svg","path");Wr.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),Gr.appendChild(Wr);var Vr=A.createNS("http://www.w3.org/2000/svg","g");Vr.setAttributeNS(null,"opacity","0.25"),Vr.setAttributeNS(null,"fill","#000000");var Qr=A.createNS("http://www.w3.org/2000/svg","path");Qr.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),Vr.appendChild(Qr);var sn=A.createNS("http://www.w3.org/2000/svg","g");sn.setAttributeNS(null,"transform","translate(6.0, 7.0)"),sn.setAttributeNS(null,"fill","#FFFFFF");var Sn=A.createNS("http://www.w3.org/2000/svg","g");Sn.setAttributeNS(null,"transform","translate(8.0, 8.0)");var zn=A.createNS("http://www.w3.org/2000/svg","circle");zn.setAttributeNS(null,"fill","#000000"),zn.setAttributeNS(null,"opacity","0.25"),zn.setAttributeNS(null,"cx","5.5"),zn.setAttributeNS(null,"cy","5.5"),zn.setAttributeNS(null,"r","5.4999962");var Yn=A.createNS("http://www.w3.org/2000/svg","circle");Yn.setAttributeNS(null,"fill","#FFFFFF"),Yn.setAttributeNS(null,"cx","5.5"),Yn.setAttributeNS(null,"cy","5.5"),Yn.setAttributeNS(null,"r","5.4999962"),Sn.appendChild(zn),Sn.appendChild(Yn),st.appendChild(mt),st.appendChild(Gr),st.appendChild(Vr),st.appendChild(sn),st.appendChild(Sn),_e.appendChild(st),this._element.appendChild(_e),this._offset=i.Point.convert(pe&&pe.offset||[0,-14])}else this._element=pe.element,this._offset=i.Point.convert(pe&&pe.offset||[0,0]);this._element.classList.add("mapboxgl-marker"),this._element.addEventListener("dragstart",function(Xn){Xn.preventDefault()}),this._element.addEventListener("mousedown",function(Xn){Xn.preventDefault()}),this._element.addEventListener("focus",function(){var Xn=ge._map.getContainer();Xn.scrollTop=0,Xn.scrollLeft=0}),jh(this._element,this._anchor,"marker"),this._popup=null}return ve&&(X.__proto__=ve),X.prototype=Object.create(ve&&ve.prototype),X.prototype.constructor=X,X.prototype.addTo=function(re){return this.remove(),this._map=re,re.getCanvasContainer().appendChild(this._element),re.on("move",this._update),re.on("moveend",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this},X.prototype.remove=function(){return this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),A.remove(this._element),this._popup&&this._popup.remove(),this},X.prototype.getLngLat=function(){return this._lngLat},X.prototype.setLngLat=function(re){return this._lngLat=i.LngLat.convert(re),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this},X.prototype.getElement=function(){return this._element},X.prototype.setPopup=function(re){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),re){if(!("offset"in re.options)){var ge=38.1,_e=13.5,Ze=Math.sqrt(Math.pow(_e,2)/2);re.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-ge],"bottom-left":[Ze,(ge-_e+Ze)*-1],"bottom-right":[-Ze,(ge-_e+Ze)*-1],left:[_e,(ge-_e)*-1],right:[-_e,(ge-_e)*-1]}:this._offset}this._popup=re,this._lngLat&&this._popup.setLngLat(this._lngLat),this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this},X.prototype._onKeyPress=function(re){var ge=re.code,_e=re.charCode||re.keyCode;(ge==="Space"||ge==="Enter"||_e===32||_e===13)&&this.togglePopup()},X.prototype._onMapClick=function(re){var ge=re.originalEvent.target,_e=this._element;this._popup&&(ge===_e||_e.contains(ge))&&this.togglePopup()},X.prototype.getPopup=function(){return this._popup},X.prototype.togglePopup=function(){var re=this._popup;if(re)re.isOpen()?re.remove():re.addTo(this._map);else return this;return this},X.prototype._update=function(re){if(this._map){this._map.transform.renderWorldCopies&&(this._lngLat=Tu(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset);var ge="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?ge="rotateZ("+this._rotation+"deg)":this._rotationAlignment==="map"&&(ge="rotateZ("+(this._rotation-this._map.getBearing())+"deg)");var _e="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?_e="rotateX(0deg)":this._pitchAlignment==="map"&&(_e="rotateX("+this._map.getPitch()+"deg)"),(!re||re.type==="moveend")&&(this._pos=this._pos.round()),A.setTransform(this._element,wh[this._anchor]+" translate("+this._pos.x+"px, "+this._pos.y+"px) "+_e+" "+ge)}},X.prototype.getOffset=function(){return this._offset},X.prototype.setOffset=function(re){return this._offset=i.Point.convert(re),this._update(),this},X.prototype._onMove=function(re){this._pos=re.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new i.Event("dragstart"))),this.fire(new i.Event("drag"))},X.prototype._onUp=function(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new i.Event("dragend")),this._state="inactive"},X.prototype._addDragHandler=function(re){this._element.contains(re.originalEvent.target)&&(re.preventDefault(),this._positionDelta=re.point.sub(this._pos).add(this._offset),this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},X.prototype.setDraggable=function(re){return this._draggable=!!re,this._map&&(re?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this},X.prototype.isDraggable=function(){return this._draggable},X.prototype.setRotation=function(re){return this._rotation=re||0,this._update(),this},X.prototype.getRotation=function(){return this._rotation},X.prototype.setRotationAlignment=function(re){return this._rotationAlignment=re||"auto",this._update(),this},X.prototype.getRotationAlignment=function(){return this._rotationAlignment},X.prototype.setPitchAlignment=function(re){return this._pitchAlignment=re&&re!=="auto"?re:this._rotationAlignment,this._update(),this},X.prototype.getPitchAlignment=function(){return this._pitchAlignment},X}(i.Evented),nd={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},ef;function Th(ve){ef!==void 0?ve(ef):i.window.navigator.permissions!==void 0?i.window.navigator.permissions.query({name:"geolocation"}).then(function(X){ef=X.state!=="denied",ve(ef)}):(ef=!!i.window.navigator.geolocation,ve(ef))}var bc=0,tf=!1,ad=function(ve){function X(pe){ve.call(this),this.options=i.extend({},nd,pe),i.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return ve&&(X.__proto__=ve),X.prototype=Object.create(ve&&ve.prototype),X.prototype.constructor=X,X.prototype.onAdd=function(re){return this._map=re,this._container=A.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),Th(this._setupUI),this._container},X.prototype.onRemove=function(){this._geolocationWatchID!==void 0&&(i.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),A.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,bc=0,tf=!1},X.prototype._isOutOfMapMaxBounds=function(re){var ge=this._map.getMaxBounds(),_e=re.coords;return ge&&(_e.longitude<ge.getWest()||_e.longitude>ge.getEast()||_e.latitude<ge.getSouth()||_e.latitude>ge.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+"&nbsp;"+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="&#215;",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.y<Jt?ur=["top"]:Ze.y>this._map.transform.height-Jt?ur=["bottom"]:ur=[],Ze.x<Nt/2?ur.push("left"):Ze.x>this._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<<A-1}else if("button"in L){var A=L.button;if(A===1)return 4;if(A===2)return 2;if(A>=0)return 1<<A}}return 0}V.buttons=e;function m(L){return L.target||L.srcElement||window}V.element=m;function P(L){if(typeof L=="object"){if("offsetX"in L)return L.offsetX;var A=m(L),v=A.getBoundingClientRect();return L.clientX-v.left}return 0}V.x=P;function i(L){if(typeof L=="object"){if("offsetY"in L)return L.offsetY;var A=m(L),v=A.getBoundingClientRect();return L.clientY-v.top}return 0}V.y=i},1195:function(G,V,e){var m=e(75686);G.exports=P;function P(i,L,A){typeof i=="function"&&(A=!!L,L=i,i=window);var v=m("ex",i),p=function(t){A&&t.preventDefault();var r=t.deltaX||0,s=t.deltaY||0,n=t.deltaZ||0,l=t.deltaMode,c=1;switch(l){case 1:c=v;break;case 2:c=window.innerHeight;break}if(r*=c,s*=c,n*=c,r||s||n)return L(r,s,n,t)};return i.addEventListener("wheel",p),p}},7417:function(G,V,e){var m;/*! Native Promise Only
v0.8.1 (c) Kyle Simpson
MIT License: http://getify.mit-license.org
*/(function(i,L,A){L[i]=L[i]||A(),G.exports?G.exports=L[i]:(m=(function(){return L[i]}).call(V,e,V,G),m!==void 0&&(G.exports=m))})("Promise",typeof e.g<"u"?e.g:this,function(){var i,L,A,v=Object.prototype.toString,p=typeof setImmediate<"u"?function(d){return setImmediate(d)}:setTimeout;try{Object.defineProperty({},"x",{}),i=function(d,M,T,C){return Object.defineProperty(d,M,{value:T,writable:!0,configurable:C!==!1})}}catch{i=function(M,T,C){return M[T]=C,M}}A=function(){var d,M,T;function C(x,S){this.fn=x,this.self=S,this.next=void 0}return{add:function(S,b){T=new C(S,b),M?M.next=T:d=T,M=T,T=void 0},drain:function(){var S=d;for(d=M=L=void 0;S;)S.fn.call(S.self),S=S.next}}}();function t(o,d){A.add(o,d),L||(L=p(A.drain))}function r(o){var d,M=typeof o;return o!=null&&(M=="object"||M=="function")&&(d=o.then),typeof d=="function"?d:!1}function s(){for(var o=0;o<this.chain.length;o++)n(this,this.state===1?this.chain[o].success:this.chain[o].failure,this.chain[o]);this.chain.length=0}function n(o,d,M){var T,C;try{d===!1?M.reject(o.msg):(d===!0?T=o.msg:T=d.call(void 0,o.msg),T===M.promise?M.reject(TypeError("Promise-chain cycle")):(C=r(T))?C.call(T,M.resolve,M.reject):M.resolve(T))}catch(x){M.reject(x)}}function l(o){var d,M=this;if(!M.triggered){M.triggered=!0,M.def&&(M=M.def);try{(d=r(o))?t(function(){var T=new g(M);try{d.call(o,function(){l.apply(T,arguments)},function(){c.apply(T,arguments)})}catch(C){c.call(T,C)}}):(M.msg=o,M.state=1,M.chain.length>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;C<d.length;C++)(function(S){o.resolve(d[S]).then(function(a){M(S,a)},T)})(C)}function g(o){this.def=o,this.triggered=!1}function f(o){this.promise=o,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function w(o){if(typeof o!="function")throw TypeError("Not a function");if(this.__NPO__!==0)throw TypeError("Not a promise");this.__NPO__=1;var d=new f(this);this.then=function(T,C){var x={success:typeof T=="function"?T:!0,failure:typeof C=="function"?C:!1};return x.promise=new this.constructor(function(b,a){if(typeof b!="function"||typeof a!="function")throw TypeError("Not a function");x.resolve=b,x.reject=a}),d.chain.push(x),d.state!==0&&t(s,d),x.promise},this.catch=function(T){return this.then(void 0,T)};try{o.call(void 0,function(T){l.call(d,T)},function(T){c.call(d,T)})}catch(M){c.call(d,M)}}var h=i({},"constructor",w,!1);return w.prototype=h,i(h,"__NPO__",0,!1),i(w,"resolve",function(d){var M=this;return d&&typeof d=="object"&&d.__NPO__===1?d:new M(function(C,x){if(typeof C!="function"||typeof x!="function")throw TypeError("Not a function");C(d)})}),i(w,"reject",function(d){return new this(function(T,C){if(typeof T!="function"||typeof C!="function")throw TypeError("Not a function");C(d)})}),i(w,"all",function(d){var M=this;return v.call(d)!="[object Array]"?M.reject(TypeError("Not an array")):d.length===0?M.resolve([]):new M(function(C,x){if(typeof C!="function"||typeof x!="function")throw TypeError("Not a function");var S=d.length,b=Array(S),a=0;u(M,d,function(y,z){b[y]=z,++a===S&&C(b)},x)})}),i(w,"race",function(d){var M=this;return v.call(d)!="[object Array]"?M.reject(TypeError("Not an array")):new M(function(C,x){if(typeof C!="function"||typeof x!="function")throw TypeError("Not a function");u(M,d,function(b,a){C(a)},x)})}),w})},18625:function(G){var V=Math.PI,e=v(120);G.exports=m;function m(p){for(var t,r=[],s=0,n=0,l=0,c=0,u=null,g=null,f=0,w=0,h=0,o=p.length;h<o;h++){var d=p[h],M=d[0];switch(M){case"M":l=d[1],c=d[2];break;case"A":d=L(f,w,d[1],d[2],v(d[3]),d[4],d[5],d[6],d[7]),d.unshift("C"),d.length>7&&(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=p<x?V-b:b,a=u<x?V-a:a,b<0&&(b=V*2+b),a<0&&(a=V*2+a),c&&b>a&&(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;_<N.length;){var U=A(N[_],N[_+1],n);N[_++]=U.x,N[_++]=U.y}return N}function A(p,t,r){return{x:p*Math.cos(r)-t*Math.sin(r),y:p*Math.sin(r)+t*Math.cos(r)}}function v(p){return p*(V/180)}},56131:function(G){/*
object-assign
(c) Sindre Sorhus
@license MIT
*/var V=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,m=Object.prototype.propertyIsEnumerable;function P(L){if(L==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(L)}function i(){try{if(!Object.assign)return!1;var L=new String("abc");if(L[5]="de",Object.getOwnPropertyNames(L)[0]==="5")return!1;for(var A={},v=0;v<10;v++)A["_"+String.fromCharCode(v)]=v;var p=Object.getOwnPropertyNames(A).map(function(r){return A[r]});if(p.join("")!=="0123456789")return!1;var t={};return"abcdefghijklmnopqrst".split("").forEach(function(r){t[r]=r}),Object.keys(Object.assign({},t)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}G.exports=i()?Object.assign:function(L,A){for(var v,p=P(L),t,r=1;r<arguments.length;r++){v=Object(arguments[r]);for(var s in v)e.call(v,s)&&(p[s]=v[s]);if(V){t=V(v);for(var n=0;n<t.length;n++)m.call(v,t[n])&&(p[t[n]]=v[t[n]])}}return p}},65848:function(G){var V=function(e){return e!==e};G.exports=function(m,P){return m===0&&P===0?1/m===1/P:!!(m===P||V(m)&&V(P))}},64003:function(G,V,e){var m=e(17045),P=e(68222),i=e(65848),L=e(27015),A=e(55572),v=P(L(),Object);m(v,{getPolyfill:L,implementation:i,shim:A}),G.exports=v},27015:function(G,V,e){var m=e(65848);G.exports=function(){return typeof Object.is=="function"?Object.is:m}},55572:function(G,V,e){var m=e(27015),P=e(17045);G.exports=function(){var L=m();return P(Object,{is:L},{is:function(){return Object.is!==L}}),L}},99019:function(G,V,e){var m;if(!Object.keys){var P=Object.prototype.hasOwnProperty,i=Object.prototype.toString,L=e(64178),A=Object.prototype.propertyIsEnumerable,v=!A.call({toString:null},"toString"),p=A.call(function(){},"prototype"),t=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],r=function(c){var u=c.constructor;return u&&u.prototype===c},s={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},n=function(){if(typeof window>"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;M<u.length;++M)o.push(String(M));if(w&&u.length>0)for(var T=0;T<u.length;++T)o.push(String(T));else for(var C in u)!(d&&C==="prototype")&&P.call(u,C)&&o.push(String(C));if(v)for(var x=l(u),S=0;S<t.length;++S)!(x&&t[S]==="constructor")&&P.call(u,t[S])&&o.push(t[S]);return o}}G.exports=m},8709:function(G,V,e){var m=Array.prototype.slice,P=e(64178),i=Object.keys,L=i?function(p){return i(p)}:e(99019),A=Object.keys;L.shim=function(){if(Object.keys){var p=function(){var t=Object.keys(arguments);return t&&t.length===arguments.length}(1,2);p||(Object.keys=function(r){return P(r)?A(m.call(r)):A(r)})}else Object.keys=L;return Object.keys||L},G.exports=L},64178:function(G){var V=Object.prototype.toString;G.exports=function(m){var P=V.call(m),i=P==="[object Arguments]";return i||(i=P!=="[object Array]"&&m!==null&&typeof m=="object"&&typeof m.length=="number"&&m.length>=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.length<V[r])throw new Error("malformed path data");A.push([p].concat(t.splice(0,V[r])))}}),A}var P=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/ig;function i(L){var A=L.match(P);return A?A.map(Number):[]}},25677:function(G){G.exports=function(e,m){m||(m=[0,""]),e=String(e);var P=parseFloat(e,10);return m[0]=P,m[1]=e.match(/[\d.\-\+]*\s*(.*)/)[1]||"",m}},9748:function(G,V,e){var m=e(90386);(function(){var P,i,L,A,v,p;typeof performance<"u"&&performance!==null&&performance.now?G.exports=function(){return performance.now()}:typeof m<"u"&&m!==null&&m.hrtime?(G.exports=function(){return(P()-v)/1e6},i=m.hrtime,P=function(){var t;return t=i(),t[0]*1e9+t[1]},A=P(),p=m.uptime()*1e9,v=A-p):Date.now?(G.exports=function(){return Date.now()-L},L=Date.now()):(G.exports=function(){return new Date().getTime()-L},L=new Date().getTime())}).call(this)},71299:function(G){G.exports=function(P,i,L){var A={},v,p;if(typeof i=="string"&&(i=e(i)),Array.isArray(i)){var t={};for(p=0;p<i.length;p++)t[i[p]]=!0;i=t}for(v in i)i[v]=e(i[v]);var r={};for(v in i){var s=i[v];if(Array.isArray(s))for(p=0;p<s.length;p++){var n=s[p];if(L&&(r[n]=!0),n in P){if(A[v]=P[n],L)for(var l=p;l<s.length;l++)r[s[l]]=!0;break}}else v in P&&(i[v]&&(A[v]=P[v]),L&&(r[v]=!0))}if(L)for(v in P)r[v]||(A[v]=P[v]);return A};var V={};function e(m){return V[m]?V[m]:(typeof m=="string"&&(m=V[m]=m.split(/\s*,\s*|\s+/)),m)}},38258:function(G){G.exports=function(e,m,P,i){var L=e[0],A=e[1],v=!1;P===void 0&&(P=0),i===void 0&&(i=m.length);for(var p=i-P,t=0,r=p-1;t<p;r=t++){var s=m[t+P][0],n=m[t+P][1],l=m[r+P][0],c=m[r+P][1],u=n>A!=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)return!1;var s=v*v+t*t;return!(r-s>-e)},pointsSameX:function(P,i){return Math.abs(P[0]-i[0])<e},pointsSameY:function(P,i){return Math.abs(P[1]-i[1])<e},pointsSame:function(P,i){return m.pointsSameX(P,i)&&m.pointsSameY(P,i)},pointsCompare:function(P,i){return m.pointsSameX(P,i)?m.pointsSameY(P,i)?0:P[1]<i[1]?-1:1:P[0]<i[0]?-1:1},pointsCollinear:function(P,i,L){var A=P[0]-i[0],v=P[1]-i[1],p=i[0]-L[0],t=i[1]-L[1];return Math.abs(A*t-p*v)<e},linesIntersect:function(P,i,L,A){var v=i[0]-P[0],p=i[1]-P[1],t=A[0]-L[0],r=A[1]-L[1],s=v*r-p*t;if(Math.abs(s)<e)return!1;var n=P[0]-L[0],l=P[1]-L[1],c=(t*l-r*n)/s,u=(v*l-p*n)/s,g={alongA:0,alongB:0,pt:[P[0]+c*v,P[1]+c*p]};return c<=-e?g.alongA=-2:c<e?g.alongA=-1:c-1<=-e?g.alongA=0:c-1<e?g.alongA=1:g.alongA=2,u<=-e?g.alongB=-2:u<e?g.alongB=-1:u-1<=-e?g.alongB=0:u-1<e?g.alongB=1:g.alongB=2,g},pointInsideRegion:function(P,i){for(var L=P[0],A=P[1],v=i[i.length-1][0],p=i[i.length-1][1],t=!1,r=0;r<i.length;r++){var s=i[r][0],n=i[r][1];n-A>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;t<A.length;t++)p=e.selectDifference(e.combine(p,v(A[t])));return p}if(m.type==="Polygon")return e.polygon(P(m.coordinates));if(m.type==="MultiPolygon"){for(var i=e.segments({inverted:!1,regions:[]}),L=0;L<m.coordinates.length;L++)i=e.selectUnion(e.combine(i,P(m.coordinates[L])));return e.polygon(i)}throw new Error("PolyBool: Cannot convert GeoJSON object to PolyBool polygon")},fromPolygon:function(e,m,P){P=e.polygon(e.segments(P));function i(c,u){return m.pointInsideRegion([(c[0][0]+c[1][0])*.5,(c[0][1]+c[1][1])*.5],u)}function L(c){return{region:c,children:[]}}var A=L(null);function v(c,u){for(var g=0;g<c.children.length;g++){var f=c.children[g];if(i(u,f.region)){v(f,u);return}}for(var w=L(u),g=0;g<c.children.length;g++){var f=c.children[g];i(f.region,u)&&(w.children.push(f),c.children.splice(g,1),g--)}c.children.push(w)}for(var p=0;p<P.regions.length;p++){var t=P.regions[p];t.length<3||v(A,t)}function r(c,u){for(var g=0,f=c[c.length-1][0],w=c[c.length-1][1],h=[],o=0;o<c.length;o++){var d=c[o][0],M=c[o][1];h.push([d,M]),g+=M*f-d*w,f=d,w=M}var T=g<0;return T!==u&&h.reverse(),h.push([h[0][0],h[0][1]]),h}var s=[];function n(c){var u=[r(c.region,!1)];s.push(u);for(var g=0;g<c.children.length;g++)u.push(l(c.children[g]))}function l(c){for(var u=0;u<c.children.length;u++)n(c.children[u]);return r(c.region,!0)}for(var p=0;p<A.children.length;p++)n(A.children[p]);return s.length<=0?{type:"Polygon",coordinates:[]}:s.length==1?{type:"Polygon",coordinates:s[0]}:{type:"MultiPolygon",coordinates:s}}};G.exports=V},87263:function(G,V,e){var m=e(26859);function P(i,L,A){function v(w,h){return{id:A?A.segmentId():-1,start:w,end:h,myFill:{above:null,below:null},otherFill:null}}function p(w,h,o){return{id:A?A.segmentId():-1,start:w,end:h,myFill:{above:o.myFill.above,below:o.myFill.below},otherFill:null}}var t=m.create();function r(w,h,o,d,M,T){var C=L.pointsCompare(h,M);return C!==0?C:L.pointsSame(o,T)?0:w!==d?w?1:-1:L.pointAboveOrOnLine(o,d?M:T,d?T:M)?1:-1}function s(w,h){t.insertBefore(w,function(o){var d=r(w.isStart,w.pt,h,o.isStart,o.pt,o.other.pt);return d<0})}function n(w,h){var o=m.node({isStart:!0,pt:w.start,seg:w,primary:h,other:null,status:null});return s(o,w.end),o}function l(w,h,o){var d=m.node({isStart:!1,pt:h.end,seg:h,primary:o,other:w,status:null});w.other=d,s(d,w.pt)}function c(w,h){var o=n(w,h);return l(o,w,h),o}function u(w,h){A&&A.segmentChop(w.seg,h),w.other.remove(),w.seg.end=h,w.other.pt=h,s(w.other,w.pt)}function g(w,h){var o=p(h,w.seg.end,w.seg);return u(w,h),c(o,w.primary)}function f(w,h){var o=m.create();function d(O,N){var _=O.seg.start,U=O.seg.end,Y=N.seg.start,J=N.seg.end;return L.pointsCollinear(_,Y,J)?L.pointsCollinear(U,Y,J)||L.pointAboveOrOnLine(U,Y,J)?1:-1:L.pointAboveOrOnLine(_,Y,J)?1:-1}function M(O){return o.findTransition(function(N){var _=d(O,N.ev);return _>0})}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;d<w.length;d++){h=o,o=w[d];var M=L.pointsCompare(h,o);M!==0&&c(v(M<0?h:o,M<0?o:h),!0)}},calculate:function(w){return f(w,!1)}}:{calculate:function(w,h,o,d){return w.forEach(function(M){c(p(M.start,M.end,M),!0)}),o.forEach(function(M){c(p(M.start,M.end,M),!1)}),f(h,d)}}}G.exports=P},26859:function(G){var V={create:function(){var e={root:{root:!0,next:null},exists:function(m){return!(m===null||m===e.root)},isEmpty:function(){return e.root.next===null},getHead:function(){return e.root.next},insertBefore:function(m,P){for(var i=e.root,L=e.root.next;L!==null;){if(P(L)){m.prev=L.prev,m.next=L,L.prev.next=m,L.prev=m;return}i=L,L=L.next}i.next=m,m.prev=i,m.next=null},findTransition:function(m){for(var P=e.root,i=e.root.next;i!==null&&!m(i);)P=i,i=i.next;return{before:P===e.root?null:P,after:i,insert:function(L){return L.prev=P,L.next=i,P.next=L,i!==null&&(i.prev=L),L}}}};return e},node:function(e){return e.prev=null,e.next=null,e.remove=function(){e.prev.next=e.next,e.next&&(e.next.prev=e.prev),e.prev=null,e.next=null},e}};G.exports=V},11328:function(G){function V(e,m,P){var i=[],L=[];return e.forEach(function(A){var v=A.start,p=A.end;if(m.pointsSame(v,p)){console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");return}P&&P.chainStart(A);var t={index:0,matches_head:!1,matches_pt1:!1},r={index:0,matches_head:!1,matches_pt1:!1},s=t;function n(E,y,z){return s.index=E,s.matches_head=y,s.matches_pt1=z,s===t?(s=r,!1):(s=null,!0)}for(var l=0;l<i.length;l++){var c=i[l],u=c[0];c[1];var g=c[c.length-1];if(c[c.length-2],m.pointsSame(u,v)){if(n(l,!0,!0))break}else if(m.pointsSame(u,p)){if(n(l,!0,!1))break}else if(m.pointsSame(g,v)){if(n(l,!1,!0))break}else if(m.pointsSame(g,p)&&n(l,!1,!1))break}if(s===t){i.push([v,p]),P&&P.chainNew(v,p);return}if(s===r){P&&P.chainMatch(t.index);var f=t.index,w=t.matches_pt1?p:v,h=t.matches_head,c=i[f],o=h?c[0]:c[c.length-1],d=h?c[1]:c[c.length-2],M=h?c[c.length-1]:c[0],T=h?c[c.length-2]:c[1];if(m.pointsCollinear(d,o,w)&&(h?(P&&P.chainRemoveHead(t.index,w),c.shift()):(P&&P.chainRemoveTail(t.index,w),c.pop()),o=d),m.pointsSame(M,w)){i.splice(f,1),m.pointsCollinear(T,M,o)&&(h?(P&&P.chainRemoveTail(t.index,o),c.pop()):(P&&P.chainRemoveHead(t.index,o),c.shift())),P&&P.chainClose(t.index),L.push(c);return}h?(P&&P.chainAddHead(t.index,w),c.unshift(w)):(P&&P.chainAddTail(t.index,w),c.push(w));return}function C(E){P&&P.chainReverse(E),i[E].reverse()}function x(E,y){var z=i[E],I=i[y],B=z[z.length-1],k=z[z.length-2],O=I[0],N=I[1];m.pointsCollinear(k,B,O)&&(P&&P.chainRemoveTail(E,B),z.pop(),B=k),m.pointsCollinear(B,O,N)&&(P&&P.chainRemoveHead(y,O),I.shift()),P&&P.chainJoin(E,y),i[E]=z.concat(I),i.splice(y,1)}var S=t.index,b=r.index;P&&P.chainConnect(S,b);var a=i[S].length<i[b].length;t.matches_head?r.matches_head?a?(C(S),x(S,b)):(C(b),x(b,S)):x(b,S):r.matches_head?x(S,b):a?(C(S),x(b,S)):(C(b),x(S,b))}),L}G.exports=V},55968:function(G){function V(m,P,i){var L=[];return m.forEach(function(A){var v=(A.myFill.above?8:0)+(A.myFill.below?4:0)+(A.otherFill&&A.otherFill.above?2:0)+(A.otherFill&&A.otherFill.below?1:0);P[v]!==0&&L.push({id:i?i.segmentId():-1,start:A.start,end:A.end,myFill:{above:P[v]===1,below:P[v]===2},otherFill:null})}),i&&i.selected(L),L}var e={union:function(m,P){return V(m,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],P)},intersect:function(m,P){return V(m,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],P)},difference:function(m,P){return V(m,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],P)},differenceRev:function(m,P){return V(m,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],P)},xor:function(m,P){return V(m,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],P)}};G.exports=e},14847:function(G,V,e){var m=e(21630).Transform,P=e(90715);function i(){m.call(this,{readableObjectMode:!0})}i.prototype=Object.create(m.prototype),i.prototype.constructor=i,P(i.prototype),V.OF=function(A,v,p){for(var t=v,r=0;r<p.length;)if(A[t++]!==p[r++])return!1;return!0},V.eG=function(A,v){var p=[],t=0;if(v&&v==="hex")for(;t<A.length;)p.push(parseInt(A.slice(t,t+2),16)),t+=2;else for(;t<A.length;t++)p.push(A.charCodeAt(t)&255);return p},V.mP=function(A,v){return A[v]|A[v+1]<<8},V.n8=function(A,v){return A[v+1]|A[v]<<8},V.nm=function(A,v){return A[v]|A[v+1]<<8|A[v+2]<<16|A[v+3]*16777216},V.Ag=function(A,v){return A[v+3]|A[v+2]<<8|A[v+1]<<16|A[v]*16777216};function L(A,v,p){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||"",this.name=this.constructor.name,this.message=A,v&&(this.code=v),p&&(this.statusCode=p)}L.prototype=Object.create(Error.prototype),L.prototype.constructor=L},71371:function(G){function V(P,i){var L=new Error(P);return L.code=i,L}function e(P){try{return decodeURIComponent(escape(P))}catch{return P}}function m(P,i,L){this.input=P.subarray(i,L),this.start=i;var A=String.fromCharCode.apply(null,this.input.subarray(0,4));if(A!=="II*\0"&&A!=="MM\0*")throw V("invalid TIFF signature","EBADDATA");this.big_endian=A[0]==="M"}m.prototype.each=function(P){this.aborted=!1;var i=this.read_uint32(4);for(this.ifds_to_read=[{id:0,offset:i}];this.ifds_to_read.length>0&&!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;v<A;v++){var p=this.read_uint16(i),t=this.read_uint16(i+2),r=this.read_uint32(i+4),s=this.exif_format_length(t),n=r*s,l=n<=4?i+8:this.read_uint32(i+8),c=!1;if(l+n>this.input.length)throw V("unexpected EOF","EBADDATA");for(var u=[],g=l,f=0;f<r;f++,g+=s){var w=this.exif_format_read(t,g);if(w===null){u=null;break}u.push(w)}Array.isArray(u)&&t===2&&(u=e(String.fromCharCode.apply(null,u)),u&&u[u.length-1]==="\0"&&(u=u.slice(0,-1))),this.is_subifd_link(P,p)&&Array.isArray(u)&&Number.isInteger(u[0])&&u[0]>0&&(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<c+l||c<8?null:{boxtype:String.fromCharCode.apply(null,n.slice(l+4,l+8)),data:n.slice(l+8,l+c),end:l+c}}G.exports.unbox=i;function L(n,l){for(var c=0;;){var u=i(n,c);if(!u)break;switch(u.boxtype){case"ispe":l.sizes.push({width:P(u.data,4),height:P(u.data,8)});break;case"irot":l.transforms.push({type:"irot",value:u.data[0]&3});break;case"imir":l.transforms.push({type:"imir",value:u.data[0]&1});break}c=u.end}}function A(n,l,c){for(var u=0,g=0;g<c;g++)u=u*256+(n[l+g]||0);return u}function v(n,l){for(var c=n[4]>>4&15,u=n[4]&15,g=n[5]>>4&15,f=m(n,6),w=8,h=0;h<f;h++){var o=m(n,w);w+=2;var d=m(n,w);w+=2;var M=A(n,w,g);w+=g;var T=m(n,w);if(w+=2,d===0&&T===1){var C=A(n,w,c),x=A(n,w+c,u);l.item_loc[o]={length:x,offset:C+M}}w+=T*(c+u)}}function p(n,l){for(var c=m(n,4),u=6,g=0;g<c;g++){var f=i(n,u);if(!f)break;if(f.boxtype==="infe"){for(var w=m(f.data,4),h="",o=8;o<f.data.length&&f.data[o];o++)h+=String.fromCharCode(f.data[o]);l.item_inf[h]=w}u=f.end}}function t(n,l){for(var c=0;;){var u=i(n,c);if(!u)break;u.boxtype==="ipco"&&L(u.data,l),c=u.end}}function r(n,l){for(var c=4;;){var u=i(n,c);if(!u)break;u.boxtype==="iprp"&&t(u.data,l),u.boxtype==="iloc"&&v(u.data,l),u.boxtype==="iinf"&&p(u.data,l),c=u.end}}function s(n){var l=n.reduce(function(g,f){return g.width>f.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;o<f.value;o++)u=w[u]});var g=null;return l.item_inf.Exif&&(g=l.item_loc[l.item_inf.Exif]),{width:c.width,height:c.height,orientation:l.transforms.length?u:null,variants:l.sizes,exif_location:g}}},G.exports.getMimeType=function(n){var l=String.fromCharCode.apply(null,n.slice(0,4)),c={};c[l]=!0;for(var u=8;u<n.length;u+=4)c[String.fromCharCode.apply(null,n.slice(u,u+4))]=!0;if(!(!c.mif1&&!c.msf1&&!c.miaf))return l==="avif"||l==="avis"||l==="avio"?{type:"avif",mime:"image/avif"}:l==="heic"||l==="heix"?{type:"heic",mime:"image/heic"}:l==="hevc"||l==="hevx"?{type:"heic",mime:"image/heic-sequence"}:c.avif||c.avis?{type:"avif",mime:"image/avif"}:c.heic||c.heix||c.hevc||c.hevx||c.heis?c.msf1?{type:"heif",mime:"image/heif-sequence"}:{type:"heif",mime:"image/heif"}:{type:"avif",mime:"image/avif"}}},24461:function(G,V,e){var m=e(14847).eG,P=e(14847).OF,i=e(14847).Ag,L=e(76767),A=e(71371),v=m("ftyp");G.exports=function(p){if(P(p,4,v)){var t=L.unbox(p,0);if(t){var r=L.getMimeType(t.data);if(r){for(var s,n=t.end;;){var l=L.unbox(p,n);if(!l)break;if(n=l.end,l.boxtype==="mdat")return;if(l.boxtype==="meta"){s=l.data;break}}if(s){var c=L.readSizeFromMeta(s);if(c){var u={width:c.width,height:c.height,type:r.type,mime:r.mime,wUnits:"px",hUnits:"px"};if(c.variants.length>1&&(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;n<t;n++){var l=A[6+L*n]||256,c=A[6+L*n+1]||256,u={width:l,height:c};r.push(u),(l>s.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-p<r)return;var n={width:m(v,p+3),height:m(v,p+1),type:"jpg",mime:"image/jpeg",wUnits:"px",hUnits:"px"};return s>0&&(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<l&&V(s[n]);)n++;return n===l?!1:s[n]===60}var P=/<[-_.:a-zA-Z0-9][^>]*>/,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<s.length;l++)n+=String.fromCharCode(s[l]);var c=(n.match(P)||[""])[0];if(i.test(c)){var u=t(c),g=parseFloat(u.width),f=parseFloat(u.height);if(u.width&&u.height)return!e(g)||!e(f)?void 0:{width:g,height:f,type:"svg",mime:"image/svg+xml",wUnits:r(u.width),hUnits:r(u.height)};var w=(u.viewbox||"").split(" "),h={width:w[2],height:w[3]},o=parseFloat(h.width),d=parseFloat(h.height);if(!(!e(o)||!e(d))&&r(h.width)===r(h.height)){var M=o/d;return u.width?e(g)?{width:g,height:g/M,type:"svg",mime:"image/svg+xml",wUnits:r(u.width),hUnits:r(u.width)}:void 0:u.height?e(f)?{width:f*M,height:f,type:"svg",mime:"image/svg+xml",wUnits:r(u.height),hUnits:r(u.height)}:void 0:{width:o,height:d,type:"svg",mime:"image/svg+xml",wUnits:r(h.width),hUnits:r(h.height)}}}}}},66278:function(G,V,e){var m=e(14847).eG,P=e(14847).OF,i=e(14847).mP,L=e(14847).n8,A=e(14847).nm,v=e(14847).Ag,p=m("II*\0"),t=m("MM\0*");function r(l,c,u){return u?L(l,c):i(l,c)}function s(l,c,u){return u?v(l,c):A(l,c)}function n(l,c,u){var g=r(l,c+2,u),f=s(l,c+4,u);return f!==1||g!==3&&g!==4?null:g===3?r(l,c+8,u):s(l,c+8,u)}G.exports=function(l){if(!(l.length<8)&&!(!P(l,0,p)&&!P(l,0,t))){var c=l[0]===77,u=s(l,4,c)-8;if(!(u<0)){var g=u+8;if(!(l.length-g<2)){var f=r(l,g+0,c)*12;if(!(f<=0)&&(g+=2,!(l.length-g<f))){var w,h,o,d;for(w=0;w<f;w+=12)d=r(l,g+w,c),d===256?h=n(l,g+w,c):d===257&&(o=n(l,g+w,c));if(h&&o)return{width:h,height:o,type:"tiff",mime:"image/tiff",wUnits:"px",hUnits:"px"}}}}}}},90784:function(G,V,e){var m=e(14847).eG,P=e(14847).OF,i=e(14847).mP,L=e(14847).nm,A=e(71371),v=m("RIFF"),p=m("WEBP");function t(n,l){if(!(n[l+3]!==157||n[l+4]!==1||n[l+5]!==42))return{width:i(n,l+6)&16383,height:i(n,l+8)&16383,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}function r(n,l){if(n[l]===47){var c=L(n,l+1);return{width:(c&16383)+1,height:(c>>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]<<l|n[l+8]<<8|n[l+7])+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}G.exports=function(n){if(!(n.length<16)&&!(!P(n,0,v)&&!P(n,8,p))){var l=12,c=null,u=0,g=L(n,4)+8;if(!(g>n.length)){for(;l+8<g;){if(n[l]===0){l++;continue}var f=String.fromCharCode.apply(null,n.slice(l,l+4)),w=L(n,l+4);f==="VP8 "&&w>=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;A<L.length;A++){var v=m[L[A]](i);if(v)return v}return null}G.exports=function(L){return P(L)},G.exports.parsers=m},90386:function(G){var V=G.exports={},e,m;function P(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?e=setTimeout:e=P}catch{e=P}try{typeof clearTimeout=="function"?m=clearTimeout:m=i}catch{m=i}})();function L(u){if(e===setTimeout)return setTimeout(u,0);if((e===P||!e)&&setTimeout)return e=setTimeout,setTimeout(u,0);try{return e(u,0)}catch{try{return e.call(null,u,0)}catch{return e.call(this,u,0)}}}function A(u){if(m===clearTimeout)return clearTimeout(u);if((m===i||!m)&&clearTimeout)return m=clearTimeout,clearTimeout(u);try{return m(u)}catch{try{return m.call(null,u)}catch{return m.call(this,u)}}}var v=[],p=!1,t,r=-1;function s(){!p||!t||(p=!1,t.length?v=t.concat(v):r=-1,v.length&&n())}function n(){if(!p){var u=L(s);p=!0;for(var g=v.length;g;){for(t=v,v=[];++r<g;)t&&t[r].run();r=-1,g=v.length}t=null,p=!1,A(u)}}V.nextTick=function(u){var g=new Array(arguments.length-1);if(arguments.length>1)for(var f=1;f<arguments.length;f++)g[f-1]=arguments[f];v.push(new l(u,g)),v.length===1&&!p&&L(n)};function l(u,g){this.fun=u,this.array=g}l.prototype.run=function(){this.fun.apply(null,this.array)},V.title="browser",V.browser=!0,V.env={},V.argv=[],V.version="",V.versions={};function c(){}V.on=c,V.addListener=c,V.once=c,V.off=c,V.removeListener=c,V.removeAllListeners=c,V.emit=c,V.prependListener=c,V.prependOnceListener=c,V.listeners=function(u){return[]},V.binding=function(u){throw new Error("process.binding is not supported")},V.cwd=function(){return"/"},V.chdir=function(u){throw new Error("process.chdir is not supported")},V.umask=function(){return 0}},5877:function(G,V,e){for(var m=e(9748),P=typeof window>"u"?e.g:window,i=["moz","webkit"],L="AnimationFrame",A=P["request"+L],v=P["cancel"+L]||P["cancelRequest"+L],p=0;!A&&p<i.length;p++)A=P[i[p]+"Request"+L],v=P[i[p]+"Cancel"+L]||P[i[p]+"CancelRequest"+L];if(!A||!v){var t=0,r=0,s=[],n=1e3/60;A=function(l){if(s.length===0){var c=m(),u=Math.max(0,n-(c-t));t=u+c,setTimeout(function(){var g=s.slice(0);s.length=0;for(var f=0;f<g.length;f++)if(!g[f].cancelled)try{g[f].callback(t)}catch(w){setTimeout(function(){throw w},0)}},Math.round(u))}return s.push({handle:++r,callback:l,cancelled:!1}),r},v=function(l){for(var c=0;c<s.length;c++)s[c].handle===l&&(s[c].cancelled=!0)}}G.exports=function(l){return A.call(P,l)},G.exports.cancel=function(){v.apply(P,arguments)},G.exports.polyfill=function(l){l||(l=P),l.requestAnimationFrame=A,l.cancelAnimationFrame=v}},3593:function(G,V,e){var m=e(21527),P=e(25075),i=e(93447),L=e(71299),A=e(56131),v=e(30120),p=e(57060),t=p.float32,r=p.fract32;G.exports=n;var s=[[1,0,0,1,0,0],[1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,1,0,0],[1,0,0,1,0,0],[1,0,-1,0,0,1],[1,0,-1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,1],[1,0,-1,0,0,1],[-1,0,-1,0,0,1],[-1,0,-1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,1],[-1,0,-1,0,0,1],[0,1,1,0,0,0],[0,1,-1,0,0,0],[0,-1,-1,0,0,0],[0,-1,-1,0,0,0],[0,1,1,0,0,0],[0,-1,1,0,0,0],[0,1,0,-1,1,0],[0,1,0,-1,-1,0],[0,1,0,1,-1,0],[0,1,0,1,1,0],[0,1,0,-1,1,0],[0,1,0,1,-1,0],[0,-1,0,-1,1,0],[0,-1,0,-1,-1,0],[0,-1,0,1,-1,0],[0,-1,0,1,1,0],[0,-1,0,-1,1,0],[0,-1,0,1,-1,0]];function n(l,c){if(typeof l=="function"?(c||(c={}),c.regl=l):c=l,c.length&&(c.positions=c),l=c.regl,!l.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");var u=l._gl,g,f,w,h,o,d,M={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},T=[];return h=l.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),f=l.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),w=l.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),o=l.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),d=l.buffer({usage:"static",type:"float",data:s}),b(c),g=l({vert:`
precision highp float;
attribute vec2 position, positionFract;
attribute vec4 error;
attribute vec4 color;
attribute vec2 direction, lineOffset, capOffset;
uniform vec4 viewport;
uniform float lineWidth, capSize;
uniform vec2 scale, scaleFract, translate, translateFract;
varying vec4 fragColor;
void main() {
fragColor = color / 255.;
vec2 pixelOffset = lineWidth * lineOffset + (capSize + lineWidth) * capOffset;
vec2 dxy = -step(.5, direction.xy) * error.xz + step(direction.xy, vec2(-.5)) * error.yw;
vec2 position = position + dxy;
vec2 pos = (position + translate) * scale
+ (positionFract + translateFract) * scale
+ (position + translate) * scaleFract
+ (positionFract + translateFract) * scaleFract;
pos += pixelOffset / viewport.zw;
gl_Position = vec4(pos * 2. - 1., 0, 1);
}
`,frag:`
precision highp float;
varying vec4 fragColor;
uniform float opacity;
void main() {
gl_FragColor = fragColor;
gl_FragColor.a *= opacity;
}
`,uniforms:{range:l.prop("range"),lineWidth:l.prop("lineWidth"),capSize:l.prop("capSize"),opacity:l.prop("opacity"),scale:l.prop("scale"),translate:l.prop("translate"),scaleFract:l.prop("scaleFract"),translateFract:l.prop("translateFract"),viewport:function(E,y){return[y.viewport.x,y.viewport.y,E.viewportWidth,E.viewportHeight]}},attributes:{color:{buffer:h,offset:function(E,y){return y.offset*4},divisor:1},position:{buffer:f,offset:function(E,y){return y.offset*8},divisor:1},positionFract:{buffer:w,offset:function(E,y){return y.offset*8},divisor:1},error:{buffer:o,offset:function(E,y){return y.offset*16},divisor:1},direction:{buffer:d,stride:24,offset:0},lineOffset:{buffer:d,stride:24,offset:8},capOffset:{buffer:d,stride:24,offset:16}},primitive:"triangles",blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:!1},scissor:{enable:!0,box:l.prop("viewport")},viewport:l.prop("viewport"),stencil:!1,instances:l.prop("count"),count:s.length}),A(C,{update:b,draw:x,destroy:a,regl:l,gl:u,canvas:u.canvas,groups:T}),C;function C(E){E?b(E):E===null&&a(),x()}function x(E){if(typeof E=="number")return S(E);E&&!Array.isArray(E)&&(E=[E]),l._refresh(),T.forEach(function(y,z){if(y){if(E&&(E[z]?y.draw=!0:y.draw=!1),!y.draw){y.draw=!0;return}S(z)}})}function S(E){typeof E=="number"&&(E=T[E]),E!=null&&E&&E.count&&E.color&&E.opacity&&E.positions&&E.positions.length>1&&(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<ce;Z++)te[Z]=Q}if(te.length<ce)throw Error("Not enough colors");for(var j=new Uint8Array(ce*4),K=0;K<ce;K++){var ee=P(te[K],"uint8");j.set(ee,K*4)}return j},range:function(te,ae,ce){var Q=ae.bounds;return te||(te=Q),ae.scale=[1/(te[2]-te[0]),1/(te[3]-te[1])],ae.translate=[-te[0],-te[1]],ae.scaleFract=r(ae.scale),ae.translateFract=r(ae.translate),te},viewport:function(te){var ae;return Array.isArray(te)?ae={x:te[0],y:te[1],width:te[2]-te[0],height:te[3]-te[1]}:te?(ae={x:te.x||te.left||0,y:te.y||te.top||0},te.right?ae.width=te.right-ae.x:ae.width=te.w||te.width||0,te.bottom?ae.height=te.bottom-ae.y:ae.height=te.h||te.height||0):ae={x:0,y:0,width:u.drawingBufferWidth,height:u.drawingBufferHeight},ae}}]),J}),y||z){var I=T.reduce(function(U,Y,J){return U+(Y?Y.count:0)},0),B=new Float64Array(I*2),k=new Uint8Array(I*4),O=new Float32Array(I*4);T.forEach(function(U,Y){if(U){var J=U.positions,te=U.count,ae=U.offset,ce=U.color,Q=U.errors;te&&(k.set(ce,ae*4),O.set(Q,ae*4),B.set(J,ae*2))}});var N=t(B);f(N);var _=r(B,N);w(_),h(k),o(O)}}}function a(){f.destroy(),w.destroy(),h.destroy(),o.destroy(),d.destroy()}}},46075:function(G,V,e){var m=e(25075),P=e(21527),i=e(56131),L=e(56068),A=e(71299),v=e(30120),p=e(11474),t=e(54),r=e(57060),s=r.float32,n=r.fract32,l=e(83522),c=e(18863),u=e(6851);G.exports=g;function g(f,w){if(!(this instanceof g))return new g(f,w);if(typeof f=="function"?(w||(w={}),w.regl=f):w=f,w.length&&(w.positions=w),f=w.regl,!f.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");this.gl=f._gl,this.regl=f,this.passes=[],this.shaders=g.shaders.has(f)?g.shaders.get(f):g.shaders.set(f,g.createShaders(f)).get(f),this.update(w)}g.dashMult=2,g.maxPatternLength=256,g.precisionThreshold=3e6,g.maxPoints=1e4,g.maxLines=2048,g.shaders=new l,g.createShaders=function(f){var w=f.buffer({usage:"static",type:"float",data:[0,1,0,0,1,1,1,0]}),h={primitive:"triangle strip",instances:f.prop("count"),count:4,offset:0,uniforms:{miterMode:function(T,C){return C.join==="round"?2:1},miterLimit:f.prop("miterLimit"),scale:f.prop("scale"),scaleFract:f.prop("scaleFract"),translateFract:f.prop("translateFract"),translate:f.prop("translate"),thickness:f.prop("thickness"),dashTexture:f.prop("dashTexture"),opacity:f.prop("opacity"),pixelRatio:f.context("pixelRatio"),id:f.prop("id"),dashLength:f.prop("dashLength"),viewport:function(T,C){return[C.viewport.x,C.viewport.y,T.viewportWidth,T.viewportHeight]},depth:f.prop("depth")},blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:function(T,C){return!C.overlay}},stencil:{enable:!1},scissor:{enable:!0,box:f.prop("viewport")},viewport:f.prop("viewport")},o=f(i({vert:L([`precision highp float;
#define GLSLIFY 1
attribute vec2 aCoord, bCoord, aCoordFract, bCoordFract;
attribute vec4 color;
attribute float lineEnd, lineTop;
uniform vec2 scale, scaleFract, translate, translateFract;
uniform float thickness, pixelRatio, id, depth;
uniform vec4 viewport;
varying vec4 fragColor;
varying vec2 tangent;
vec2 project(vec2 position, vec2 positionFract, vec2 scale, vec2 scaleFract, vec2 translate, vec2 translateFract) {
// the order is important
return position * scale + translate
+ positionFract * scale + translateFract
+ position * scaleFract
+ positionFract * scaleFract;
}
void main() {
float lineStart = 1. - lineEnd;
float lineOffset = lineTop * 2. - 1.;
vec2 diff = (bCoord + bCoordFract - aCoord - aCoordFract);
tangent = normalize(diff * scale * viewport.zw);
vec2 normal = vec2(-tangent.y, tangent.x);
vec2 position = project(aCoord, aCoordFract, scale, scaleFract, translate, translateFract) * lineStart
+ project(bCoord, bCoordFract, scale, scaleFract, translate, translateFract) * lineEnd
+ thickness * normal * .5 * lineOffset / viewport.zw;
gl_Position = vec4(position * 2.0 - 1.0, depth, 1);
fragColor = color / 255.;
}
`]),frag:L([`precision highp float;
#define GLSLIFY 1
uniform float dashLength, pixelRatio, thickness, opacity, id;
uniform sampler2D dashTexture;
varying vec4 fragColor;
varying vec2 tangent;
void main() {
float alpha = 1.;
float t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25;
float dash = texture2D(dashTexture, vec2(t, .5)).r;
gl_FragColor = fragColor;
gl_FragColor.a *= alpha * opacity * dash;
}
`]),attributes:{lineEnd:{buffer:w,divisor:0,stride:8,offset:0},lineTop:{buffer:w,divisor:0,stride:8,offset:4},aCoord:{buffer:f.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:f.prop("positionBuffer"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:f.prop("positionFractBuffer"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:f.prop("positionFractBuffer"),stride:8,offset:16,divisor:1},color:{buffer:f.prop("colorBuffer"),stride:4,offset:0,divisor:1}}},h)),d;try{d=f(i({cull:{enable:!0,face:"back"},vert:L([`precision highp float;
#define GLSLIFY 1
attribute vec2 aCoord, bCoord, nextCoord, prevCoord;
attribute vec4 aColor, bColor;
attribute float lineEnd, lineTop;
uniform vec2 scale, translate;
uniform float thickness, pixelRatio, id, depth;
uniform vec4 viewport;
uniform float miterLimit, miterMode;
varying vec4 fragColor;
varying vec4 startCutoff, endCutoff;
varying vec2 tangent;
varying vec2 startCoord, endCoord;
varying float enableStartMiter, enableEndMiter;
const float REVERSE_THRESHOLD = -.875;
const float MIN_DIFF = 1e-6;
// TODO: possible optimizations: avoid overcalculating all for vertices and calc just one instead
// TODO: precalculate dot products, normalize things beforehead etc.
// TODO: refactor to rectangular algorithm
float distToLine(vec2 p, vec2 a, vec2 b) {
vec2 diff = b - a;
vec2 perp = normalize(vec2(-diff.y, diff.x));
return dot(p - a, perp);
}
bool isNaN( float val ){
return ( val < 0.0 || 0.0 < val || val == 0.0 ) ? false : true;
}
void main() {
vec2 aCoord = aCoord, bCoord = bCoord, prevCoord = prevCoord, nextCoord = nextCoord;
vec2 adjustedScale;
adjustedScale.x = (abs(scale.x) < MIN_DIFF) ? MIN_DIFF : scale.x;
adjustedScale.y = (abs(scale.y) < MIN_DIFF) ? MIN_DIFF : scale.y;
vec2 scaleRatio = adjustedScale * viewport.zw;
vec2 normalWidth = thickness / scaleRatio;
float lineStart = 1. - lineEnd;
float lineBot = 1. - lineTop;
fragColor = (lineStart * aColor + lineEnd * bColor) / 255.;
if (isNaN(aCoord.x) || isNaN(aCoord.y) || isNaN(bCoord.x) || isNaN(bCoord.y)) return;
if (aCoord == prevCoord) prevCoord = aCoord + normalize(bCoord - aCoord);
if (bCoord == nextCoord) nextCoord = bCoord - normalize(bCoord - aCoord);
vec2 prevDiff = aCoord - prevCoord;
vec2 currDiff = bCoord - aCoord;
vec2 nextDiff = nextCoord - bCoord;
vec2 prevTangent = normalize(prevDiff * scaleRatio);
vec2 currTangent = normalize(currDiff * scaleRatio);
vec2 nextTangent = normalize(nextDiff * scaleRatio);
vec2 prevNormal = vec2(-prevTangent.y, prevTangent.x);
vec2 currNormal = vec2(-currTangent.y, currTangent.x);
vec2 nextNormal = vec2(-nextTangent.y, nextTangent.x);
vec2 startJoinDirection = normalize(prevTangent - currTangent);
vec2 endJoinDirection = normalize(currTangent - nextTangent);
// collapsed/unidirectional segment cases
// FIXME: there should be more elegant solution
vec2 prevTanDiff = abs(prevTangent - currTangent);
vec2 nextTanDiff = abs(nextTangent - currTangent);
if (max(prevTanDiff.x, prevTanDiff.y) < MIN_DIFF) {
startJoinDirection = currNormal;
}
if (max(nextTanDiff.x, nextTanDiff.y) < MIN_DIFF) {
endJoinDirection = currNormal;
}
if (aCoord == bCoord) {
endJoinDirection = startJoinDirection;
currNormal = prevNormal;
currTangent = prevTangent;
}
tangent = currTangent;
//calculate join shifts relative to normals
float startJoinShift = dot(currNormal, startJoinDirection);
float endJoinShift = dot(currNormal, endJoinDirection);
float startMiterRatio = abs(1. / startJoinShift);
float endMiterRatio = abs(1. / endJoinShift);
vec2 startJoin = startJoinDirection * startMiterRatio;
vec2 endJoin = endJoinDirection * endMiterRatio;
vec2 startTopJoin, startBotJoin, endTopJoin, endBotJoin;
startTopJoin = sign(startJoinShift) * startJoin * .5;
startBotJoin = -startTopJoin;
endTopJoin = sign(endJoinShift) * endJoin * .5;
endBotJoin = -endTopJoin;
vec2 aTopCoord = aCoord + normalWidth * startTopJoin;
vec2 bTopCoord = bCoord + normalWidth * endTopJoin;
vec2 aBotCoord = aCoord + normalWidth * startBotJoin;
vec2 bBotCoord = bCoord + normalWidth * endBotJoin;
//miter anti-clipping
float baClipping = distToLine(bCoord, aCoord, aBotCoord) / dot(normalize(normalWidth * endBotJoin), normalize(normalWidth.yx * vec2(-startBotJoin.y, startBotJoin.x)));
float abClipping = distToLine(aCoord, bCoord, bTopCoord) / dot(normalize(normalWidth * startBotJoin), normalize(normalWidth.yx * vec2(-endBotJoin.y, endBotJoin.x)));
//prevent close to reverse direction switch
bool prevReverse = dot(currTangent, prevTangent) <= REVERSE_THRESHOLD && abs(dot(currTangent, prevNormal)) * min(length(prevDiff), length(currDiff)) < length(normalWidth * currNormal);
bool nextReverse = dot(currTangent, nextTangent) <= REVERSE_THRESHOLD && abs(dot(currTangent, nextNormal)) * min(length(nextDiff), length(currDiff)) < length(normalWidth * currNormal);
if (prevReverse) {
//make join rectangular
vec2 miterShift = normalWidth * startJoinDirection * miterLimit * .5;
float normalAdjust = 1. - min(miterLimit / startMiterRatio, 1.);
aBotCoord = aCoord + miterShift - normalAdjust * normalWidth * currNormal * .5;
aTopCoord = aCoord + miterShift + normalAdjust * normalWidth * currNormal * .5;
}
else if (!nextReverse && baClipping > 0. && baClipping < length(normalWidth * endBotJoin)) {
//handle miter clipping
bTopCoord -= normalWidth * endTopJoin;
bTopCoord += normalize(endTopJoin * normalWidth) * baClipping;
}
if (nextReverse) {
//make join rectangular
vec2 miterShift = normalWidth * endJoinDirection * miterLimit * .5;
float normalAdjust = 1. - min(miterLimit / endMiterRatio, 1.);
bBotCoord = bCoord + miterShift - normalAdjust * normalWidth * currNormal * .5;
bTopCoord = bCoord + miterShift + normalAdjust * normalWidth * currNormal * .5;
}
else if (!prevReverse && abClipping > 0. && abClipping < length(normalWidth * startBotJoin)) {
//handle miter clipping
aBotCoord -= normalWidth * startBotJoin;
aBotCoord += normalize(startBotJoin * normalWidth) * abClipping;
}
vec2 aTopPosition = (aTopCoord) * adjustedScale + translate;
vec2 aBotPosition = (aBotCoord) * adjustedScale + translate;
vec2 bTopPosition = (bTopCoord) * adjustedScale + translate;
vec2 bBotPosition = (bBotCoord) * adjustedScale + translate;
//position is normalized 0..1 coord on the screen
vec2 position = (aTopPosition * lineTop + aBotPosition * lineBot) * lineStart + (bTopPosition * lineTop + bBotPosition * lineBot) * lineEnd;
startCoord = aCoord * scaleRatio + translate * viewport.zw + viewport.xy;
endCoord = bCoord * scaleRatio + translate * viewport.zw + viewport.xy;
gl_Position = vec4(position * 2.0 - 1.0, depth, 1);
enableStartMiter = step(dot(currTangent, prevTangent), .5);
enableEndMiter = step(dot(currTangent, nextTangent), .5);
//bevel miter cutoffs
if (miterMode == 1.) {
if (enableStartMiter == 1.) {
vec2 startMiterWidth = vec2(startJoinDirection) * thickness * miterLimit * .5;
startCutoff = vec4(aCoord, aCoord);
startCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;
startCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;
startCutoff += viewport.xyxy;
startCutoff += startMiterWidth.xyxy;
}
if (enableEndMiter == 1.) {
vec2 endMiterWidth = vec2(endJoinDirection) * thickness * miterLimit * .5;
endCutoff = vec4(bCoord, bCoord);
endCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio;
endCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;
endCutoff += viewport.xyxy;
endCutoff += endMiterWidth.xyxy;
}
}
//round miter cutoffs
else if (miterMode == 2.) {
if (enableStartMiter == 1.) {
vec2 startMiterWidth = vec2(startJoinDirection) * thickness * abs(dot(startJoinDirection, currNormal)) * .5;
startCutoff = vec4(aCoord, aCoord);
startCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;
startCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;
startCutoff += viewport.xyxy;
startCutoff += startMiterWidth.xyxy;
}
if (enableEndMiter == 1.) {
vec2 endMiterWidth = vec2(endJoinDirection) * thickness * abs(dot(endJoinDirection, currNormal)) * .5;
endCutoff = vec4(bCoord, bCoord);
endCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio;
endCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;
endCutoff += viewport.xyxy;
endCutoff += endMiterWidth.xyxy;
}
}
}
`]),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<g.maxLines&&(a.depth=2*(g.maxLines-1-b%g.maxLines)/g.maxLines-1)),S.join!=null&&(a.join=S.join),S.hole!=null&&(a.hole=S.hole),S.fill!=null&&(a.fill=S.fill?m(S.fill,"uint8"):null),S.viewport!=null&&(a.viewport=c(S.viewport)),a.viewport||(a.viewport=c([d.drawingBufferWidth,d.drawingBufferHeight])),S.close!=null&&(a.close=S.close),S.positions===null&&(S.positions=[]),S.positions){var E,y;if(S.positions.x&&S.positions.y){var z=S.positions.x,I=S.positions.y;y=a.count=Math.max(z.length,I.length),E=new Float64Array(y*2);for(var B=0;B<y;B++)E[B*2]=z[B],E[B*2+1]=I[B]}else E=v(S.positions,"float64"),y=a.count=Math.floor(E.length/2);var k=a.bounds=P(E,2);if(a.fill){for(var O=[],N={},_=0,U=0,Y=0,J=a.count;U<J;U++){var te=E[U*2],ae=E[U*2+1];isNaN(te)||isNaN(ae)||te==null||ae==null?(te=E[_*2],ae=E[_*2+1],N[U]=_):_=U,O[Y++]=te,O[Y++]=ae}if(S.splitNull){a.count-1 in N||(N[a.count]=a.count-1);var ce=Object.keys(N).map(Number).sort(function(ze,Pe){return ze-Pe}),Q=[],Z=0,j=a.hole!=null?a.hole[0]:null;if(j!=null){var K=u(ce,function(ze){return ze>=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+Z<ce[ze]?0:j-ce[ze])}),Q.push.apply(Q,se),Z=ce[ze]+1},oe=0;oe<ce.length;oe++)ee(oe);for(var q=0,$=Q.length;q<$;q++)N[Q[q]]!=null&&(Q[q]=N[Q[q]]);a.triangles=Q}else{for(var le=p(O,a.hole||[]),ie=0,he=le.length;ie<he;ie++)N[le[ie]]!=null&&(le[ie]=N[le[ie]]);a.triangles=le}}var me=new Float64Array(E);t(me,2,k);var Me=new Float64Array(y*2+6);a.close?E[0]===E[y*2-2]&&E[1]===E[y*2-1]?(Me[0]=me[y*2-4],Me[1]=me[y*2-3]):(Me[0]=me[y*2-2],Me[1]=me[y*2-1]):(Me[0]=me[0],Me[1]=me[1]),Me.set(me,2),a.close?E[0]===E[y*2-2]&&E[1]===E[y*2-1]?(Me[y*2+2]=me[2],Me[y*2+3]=me[3],a.count-=1):(Me[y*2+2]=me[0],Me[y*2+3]=me[1],Me[y*2+4]=me[2],Me[y*2+5]=me[3]):(Me[y*2+2]=me[y*2-2],Me[y*2+3]=me[y*2-1],Me[y*2+4]=me[y*2-2],Me[y*2+5]=me[y*2-1]);var Te=s(Me);a.positionBuffer(Te);var Oe=n(Me,Te);a.positionFractBuffer(Oe)}if(S.range?a.range=S.range:a.range||(a.range=a.bounds),(S.range||S.positions)&&a.count){var Ne=a.bounds,Ee=Ne[2]-Ne[0],xe=Ne[3]-Ne[1],Se=a.range[2]-a.range[0],Ue=a.range[3]-a.range[1];a.scale=[Ee/Se,xe/Ue],a.translate=[-a.range[0]/Se+Ne[0]/Se||0,-a.range[1]/Ue+Ne[1]/Ue||0],a.scaleFract=n(a.scale),a.translateFract=n(a.translate)}if(S.dashes){var He=0,Fe;if(!S.dashes||S.dashes.length<2)He=1,Fe=new Uint8Array([255,255,255,255,255,255,255,255]);else{He=0;for(var Ge=0;Ge<S.dashes.length;++Ge)He+=S.dashes[Ge];Fe=new Uint8Array(He*g.dashMult);for(var nt=0,qe=255,$e=0;$e<2;$e++)for(var et=0;et<S.dashes.length;++et){for(var ct=0,dt=S.dashes[et]*g.dashMult*.5;ct<dt;++ct)Fe[nt++]=qe;qe^=255}}a.dashLength=He,a.dashTexture({channels:1,data:Fe,width:Fe.length,height:1,mag:"linear",min:"linear"},0,0)}if(S.color){var pt=a.count,At=S.color;At||(At="transparent");var Mt=new Uint8Array(pt*4+4);if(!Array.isArray(At)||typeof At[0]=="number")for(var Vt=m(At,"uint8"),Je=0;Je<pt+1;Je++)Mt.set(Vt,Je*4);else{for(var De=0;De<pt;De++){var Ie=m(At[De],"uint8");Mt.set(Ie,De*4)}Mt.set(m(At[0],"uint8"),pt*4)}a.colorBuffer({usage:"dynamic",type:"uint8",data:Mt})}}}),f.length<this.passes.length){for(var M=f.length;M<this.passes.length;M++){var T=this.passes[M];T&&(T.colorBuffer.destroy(),T.positionBuffer.destroy(),T.dashTexture.destroy())}this.passes.length=f.length}for(var C=[],x=0;x<this.passes.length;x++)this.passes[x]!==null&&C.push(this.passes[x]);return this.passes=C,this}},g.prototype.destroy=function(){return this.passes.forEach(function(f){f.colorBuffer.destroy(),f.positionBuffer.destroy(),f.dashTexture.destroy()}),this.passes.length=0,this}},11870:function(G,V,e){function m(a,E){var y=a==null?null:typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(y!=null){var z,I,B,k,O=[],N=!0,_=!1;try{if(B=(y=y.call(a)).next,E===0){if(Object(y)!==y)return;N=!1}else for(;!(N=(z=B.call(y)).done)&&(O.push(z.value),O.length!==E);N=!0);}catch(U){_=!0,I=U}finally{try{if(!N&&y.return!=null&&(k=y.return(),Object(k)!==k))return}finally{if(_)throw I}}return O}}function P(a,E){return A(a)||m(a,E)||p(a,E)||s()}function i(a){return L(a)||v(a)||p(a)||r()}function L(a){if(Array.isArray(a))return t(a)}function A(a){if(Array.isArray(a))return a}function v(a){if(typeof Symbol<"u"&&a[Symbol.iterator]!=null||a["@@iterator"]!=null)return Array.from(a)}function p(a,E){if(a){if(typeof a=="string")return t(a,E);var y=Object.prototype.toString.call(a).slice(8,-1);if(y==="Object"&&a.constructor&&(y=a.constructor.name),y==="Map"||y==="Set")return Array.from(a);if(y==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(y))return t(a,E)}}function t(a,E){(E==null||E>a.length)&&(E=a.length);for(var y=0,z=new Array(E);y<E;y++)z[y]=a[y];return z}function r(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function s(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var n=e(25075),l=e(21527),c=e(6475),u=e(88294),g=e(56131),f=e(56068),w=e(71299),h=e(93447),o=e(30120),d=e(62683),M=e(57060),T=e(18863),C=x;function x(a,E){var y=this;if(!(this instanceof x))return new x(a,E);typeof a=="function"?(E||(E={}),E.regl=a):(E=a,a=null),E&&E.length&&(E.positions=E),a=E.regl;var z=a._gl,I,B=[],k={},O=[],N=[null],_=[null],U=255,Y=100;this.tooManyColors=d,I=a.texture({data:new Uint8Array(U*4),width:U,height:1,type:"uint8",format:"rgba",wrapS:"clamp",wrapT:"clamp",mag:"nearest",min:"nearest"}),g(this,{regl:a,gl:z,groups:O,markerCache:_,markerTextures:N,palette:B,paletteIds:k,paletteTexture:I,maxColors:U,maxSize:Y,canvas:z.canvas}),this.update(E);var J={uniforms:{constPointSize:!!E.constPointSize,opacity:a.prop("opacity"),paletteSize:function(Q,Z){return[y.tooManyColors?0:U,I.height]},pixelRatio:a.context("pixelRatio"),scale:a.prop("scale"),scaleFract:a.prop("scaleFract"),translate:a.prop("translate"),translateFract:a.prop("translateFract"),markerTexture:a.prop("markerTexture"),paletteTexture:I},attributes:{x:function(Q,Z){return Z.xAttr||{buffer:Z.positionBuffer,stride:8,offset:0}},y:function(Q,Z){return Z.yAttr||{buffer:Z.positionBuffer,stride:8,offset:4}},xFract:function(Q,Z){return Z.xAttr?{constant:[0,0]}:{buffer:Z.positionFractBuffer,stride:8,offset:0}},yFract:function(Q,Z){return Z.yAttr?{constant:[0,0]}:{buffer:Z.positionFractBuffer,stride:8,offset:4}},size:function(Q,Z){return Z.size.length?{buffer:Z.sizeBuffer,stride:2,offset:0}:{constant:[Math.round(Z.size*255/y.maxSize)]}},borderSize:function(Q,Z){return Z.borderSize.length?{buffer:Z.sizeBuffer,stride:2,offset:1}:{constant:[Math.round(Z.borderSize*255/y.maxSize)]}},colorId:function(Q,Z){return Z.color.length?{buffer:Z.colorBuffer,stride:y.tooManyColors?8:4,offset:0}:{constant:y.tooManyColors?B.slice(Z.color*4,Z.color*4+4):[Z.color]}},borderColorId:function(Q,Z){return Z.borderColor.length?{buffer:Z.colorBuffer,stride:y.tooManyColors?8:4,offset:y.tooManyColors?4:2}:{constant:y.tooManyColors?B.slice(Z.borderColor*4,Z.borderColor*4+4):[Z.borderColor]}},isActive:function(Q,Z){return Z.activation===!0?{constant:[1]}:Z.activation?Z.activation:{constant:[0]}}},blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},scissor:{enable:!0,box:a.prop("viewport")},viewport:a.prop("viewport"),stencil:{enable:!1},depth:{enable:!1},elements:a.prop("elements"),count:a.prop("count"),offset:a.prop("offset"),primitive:"points"},te=g({},J);te.frag=f([`precision highp float;
#define GLSLIFY 1
uniform float opacity;
uniform sampler2D markerTexture;
varying vec4 fragColor, fragBorderColor;
varying float fragWidth, fragBorderColorLevel, fragColorLevel;
float smoothStep(float x, float y) {
return 1.0 / (1.0 + exp(50.0*(x - y)));
}
void main() {
float dist = texture2D(markerTexture, gl_PointCoord).r, delta = fragWidth;
// max-distance alpha
if (dist < 0.003) discard;
// null-border case
if (fragBorderColorLevel == fragColorLevel || fragBorderColor.a == 0.) {
float colorAmt = smoothstep(.5 - delta, .5 + delta, dist);
gl_FragColor = vec4(fragColor.rgb, colorAmt * fragColor.a * opacity);
}
else {
float borderColorAmt = smoothstep(fragBorderColorLevel - delta, fragBorderColorLevel + delta, dist);
float colorAmt = smoothstep(fragColorLevel - delta, fragColorLevel + delta, dist);
vec4 color = fragBorderColor;
color.a *= borderColorAmt;
color = mix(color, fragColor, colorAmt);
color.a *= opacity;
gl_FragColor = color;
}
}
`]),te.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 scale, scaleFract, translate, translateFract, paletteSize;
uniform sampler2D paletteTexture;
const float maxSize = 100.;
const float borderLevel = .5;
varying vec4 fragColor, fragBorderColor;
varying float fragPointSize, fragBorderRadius, fragWidth, fragBorderColorLevel, fragColorLevel;
float pointSizeScale = (constPointSize) ? 2. : pixelRatio;
bool isDirect = (paletteSize.x < 1.);
vec4 getColor(vec4 id) {
return isDirect ? id / 255. : texture2D(paletteTexture,
vec2(
(id.x + .5) / paletteSize.x,
(id.y + .5) / paletteSize.y
)
);
}
void main() {
// ignore inactive points
if (isActive == 0.) return;
vec2 position = vec2(x, y);
vec2 positionFract = vec2(xFract, yFract);
vec4 color = getColor(colorId);
vec4 borderColor = getColor(borderColorId);
float size = size * maxSize / 255.;
float borderSize = borderSize * maxSize / 255.;
gl_PointSize = 2. * size * pointSizeScale;
fragPointSize = size * pixelRatio;
vec2 pos = (position + translate) * scale
+ (positionFract + translateFract) * scale
+ (position + translate) * scaleFract
+ (positionFract + translateFract) * scaleFract;
gl_Position = vec4(pos * 2. - 1., 0., 1.);
fragColor = color;
fragBorderColor = borderColor;
fragWidth = 1. / gl_PointSize;
fragBorderColorLevel = clamp(borderLevel - borderLevel * borderSize / size, 0., 1.);
fragColorLevel = clamp(borderLevel + (1. - borderLevel) * borderSize / size, 0., 1.);
}`]),this.drawMarker=a(te);var ae=g({},J);ae.frag=f([`precision highp float;
#define GLSLIFY 1
varying vec4 fragColor, fragBorderColor;
varying float fragBorderRadius, fragWidth;
uniform float opacity;
float smoothStep(float edge0, float edge1, float x) {
float t;
t = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);
return t * t * (3.0 - 2.0 * t);
}
void main() {
float radius, alpha = 1.0, delta = fragWidth;
radius = length(2.0 * gl_PointCoord.xy - 1.0);
if (radius > 1.0 + delta) {
discard;
}
alpha -= smoothstep(1.0 - delta, 1.0 + delta, radius);
float borderRadius = fragBorderRadius;
float ratio = smoothstep(borderRadius - delta, borderRadius + delta, radius);
vec4 color = mix(fragColor, fragBorderColor, ratio);
color.a *= alpha * opacity;
gl_FragColor = color;
}
`]),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;z<E;z++)y[z]=arguments[z];var I=this.groups;if(y.length===1&&Array.isArray(y[0])&&(y[0][0]===null||Array.isArray(y[0][0]))&&(y=y[0]),this.regl._refresh(),y.length)for(var B=0;B<y.length;B++)this.drawItem(B,y[B]);else I.forEach(function(k,O){a.drawItem(O)});return this},x.prototype.drawItem=function(a,E){var y=this.groups,z=y[a];if(typeof E=="number"&&(a=E,z=y[E],E=null),!!(z&&z.count&&z.opacity)){z.activation[0]&&this.drawCircle(this.getMarkerDrawOptions(0,z,E));for(var I=[],B=1;B<z.activation.length;B++)!z.activation[B]||z.activation[B]!==!0&&!z.activation[B].data.length||I.push.apply(I,i(this.getMarkerDrawOptions(B,z,E)));I.length&&this.drawMarker(I)}},x.prototype.getMarkerDrawOptions=function(a,E,y){var z=E.range,I=E.tree,B=E.viewport,k=E.activation,O=E.selectionBuffer,N=E.count;if(this.regl,!I)return y?[g({},E,{markerTexture:this.markerTextures[a],activation:k[a],count:y.length,elements:y,offset:0})]:[g({},E,{markerTexture:this.markerTextures[a],activation:k[a],offset:0})];var _=[],U=I.range(z,{lod:!0,px:[(z[2]-z[0])/B.width,(z[3]-z[1])/B.height]});if(y){for(var Y=k[a],J=Y.data,te=new Uint8Array(N),ae=0;ae<y.length;ae++){var ce=y[ae];te[ce]=J?J[ce]:1}O.subdata(te)}for(var Q=U.length;Q--;){var Z=P(U[Q],2),j=Z[0],K=Z[1];_.push(g({},E,{markerTexture:this.markerTextures[a],activation:y?O:k[a],offset:j,count:K-j}))}return _},x.prototype.update=function(){for(var a=this,E=arguments.length,y=new Array(E),z=0;z<E;z++)y[z]=arguments[z];if(y.length){y.length===1&&Array.isArray(y[0])&&(y=y[0]);var I=this.groups,B=this.gl,k=this.regl,O=this.maxSize,N=this.maxColors,_=this.palette;this.groups=I=y.map(function(U,Y){var J=I[Y];if(U===void 0)return J;U===null?U={positions:null}:typeof U=="function"?U={ondraw:U}:typeof U[0]=="number"&&(U={positions:U}),U=w(U,{positions:"positions data points",snap:"snap cluster lod tree",size:"sizes size radius",borderSize:"borderSizes borderSize border-size bordersize borderWidth borderWidths border-width borderwidth stroke-width strokeWidth strokewidth outline",color:"colors color fill fill-color fillColor",borderColor:"borderColors borderColor stroke stroke-color strokeColor",marker:"markers marker shape",range:"range dataBox databox",viewport:"viewport viewPort viewBox viewbox",opacity:"opacity alpha transparency",bounds:"bound bounds boundaries limits",tooManyColors:"tooManyColors palette paletteMode optimizePalette enablePalette"}),U.positions===null&&(U.positions=[]),U.tooManyColors!=null&&(a.tooManyColors=U.tooManyColors),J||(I[Y]=J={id:Y,scale:null,translate:null,scaleFract:null,translateFract:null,activation:[],selectionBuffer:k.buffer({data:new Uint8Array(0),usage:"stream",type:"uint8"}),sizeBuffer:k.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),colorBuffer:k.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),positionBuffer:k.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"}),positionFractBuffer:k.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"})},U=g({},x.defaults,U)),U.positions&&!("marker"in U)&&(U.marker=J.marker,delete J.marker),U.marker&&!("positions"in U)&&(U.positions=J.positions,delete J.positions);var te=0,ae=0;if(h(J,U,[{snap:!0,size:function(xe,Se){return xe==null&&(xe=x.defaults.size),te+=xe&&xe.length?1:0,xe},borderSize:function(xe,Se){return xe==null&&(xe=x.defaults.borderSize),te+=xe&&xe.length?1:0,xe},opacity:parseFloat,color:function(xe,Se){return xe==null&&(xe=x.defaults.color),xe=a.updateColor(xe),ae++,xe},borderColor:function(xe,Se){return xe==null&&(xe=x.defaults.borderColor),xe=a.updateColor(xe),ae++,xe},bounds:function(xe,Se,Ue){return"range"in Ue||(Ue.range=null),xe},positions:function(xe,Se,Ue){var He=Se.snap,Fe=Se.positionBuffer,Ge=Se.positionFractBuffer,nt=Se.selectionBuffer;if(xe.x||xe.y)return xe.x.length?Se.xAttr={buffer:k.buffer(xe.x),offset:0,stride:4,count:xe.x.length}:Se.xAttr={buffer:xe.x.buffer,offset:xe.x.offset*4||0,stride:(xe.x.stride||1)*4,count:xe.x.count},xe.y.length?Se.yAttr={buffer:k.buffer(xe.y),offset:0,stride:4,count:xe.y.length}:Se.yAttr={buffer:xe.y.buffer,offset:xe.y.offset*4||0,stride:(xe.y.stride||1)*4,count:xe.y.count},Se.count=Math.max(Se.xAttr.count,Se.yAttr.count),xe;xe=o(xe,"float64");var qe=Se.count=Math.floor(xe.length/2),$e=Se.bounds=qe?l(xe,2):null;if(!Ue.range&&!Se.range&&(delete Se.range,Ue.range=$e),!Ue.marker&&!Se.marker&&(delete Se.marker,Ue.marker=null),He&&(He===!0||qe>He)?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<qe;nt++){var $e=a.addMarker(xe[nt]);Ge[$e]||(Ge[$e]=new Uint8Array(Se.count)),Ge[$e][nt]=1}for(var et=0;et<Ge.length;et++)if(Ge[et]){var ct={data:Ge[et],type:"uint8",usage:"static"};He[et]?He[et](ct):He[et]=k.buffer(ct),He[et].data=Ge[et]}}return xe},range:function(xe,Se,Ue){var He=Se.bounds;if(He)return xe||(xe=He),Se.scale=[1/(xe[2]-xe[0]),1/(xe[3]-xe[1])],Se.translate=[-xe[0],-xe[1]],Se.scaleFract=M.fract(Se.scale),Se.translateFract=M.fract(Se.translate),xe},viewport:function(xe){var Se=T(xe||[B.drawingBufferWidth,B.drawingBufferHeight]);return Se}}]),te){var ce=J,Q=ce.count,Z=ce.size,j=ce.borderSize,K=ce.sizeBuffer,ee=new Uint8Array(Q*2);if(Z.length||j.length)for(var oe=0;oe<Q;oe++)ee[oe*2]=Math.round((Z[oe]==null?Z:Z[oe])*255/O),ee[oe*2+1]=Math.round((j[oe]==null?j:j[oe])*255/O);K({data:ee,usage:"dynamic"})}if(ae){var q=J,$=q.count,le=q.color,ie=q.borderColor,he=q.colorBuffer,me;if(a.tooManyColors){if(le.length||ie.length){me=new Uint8Array($*8);for(var Me=0;Me<$;Me++){var Te=le[Me];me[Me*8]=_[Te*4],me[Me*8+1]=_[Te*4+1],me[Me*8+2]=_[Te*4+2],me[Me*8+3]=_[Te*4+3];var Oe=ie[Me];me[Me*8+4]=_[Oe*4],me[Me*8+5]=_[Oe*4+1],me[Me*8+6]=_[Oe*4+2],me[Me*8+7]=_[Oe*4+3]}}}else if(le.length||ie.length){me=new Uint8Array($*4+2);for(var Ne=0;Ne<$;Ne++)le[Ne]!=null&&(me[Ne*4]=le[Ne]%N,me[Ne*4+1]=Math.floor(le[Ne]/N)),ie[Ne]!=null&&(me[Ne*4+2]=ie[Ne]%N,me[Ne*4+3]=Math.floor(ie[Ne]/N))}he({data:me||new Uint8Array(0),type:"uint8",usage:"dynamic"})}return J})}},x.prototype.addMarker=function(a){var E=this.markerTextures,y=this.regl,z=this.markerCache,I=a==null?0:z.indexOf(a);if(I>=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;k<O;k++)B[k]=a[k]*255}var N=Math.floor(Math.sqrt(B.length));return I=E.length,z.push(a),E.push(y.texture({channels:1,data:B,radius:N,mag:"linear",min:"linear"})),I},x.prototype.updateColor=function(a){var E=this.paletteIds,y=this.palette,z=this.maxColors;Array.isArray(a)||(a=[a]);var I=[];if(typeof a[0]=="number"){var B=[];if(Array.isArray(a))for(var k=0;k<a.length;k+=4)B.push(a.slice(k,k+4));else for(var O=0;O<a.length;O+=4)B.push(a.subarray(O,O+4));a=B}for(var N=0;N<a.length;N++){var _=a[N];_=n(_,"uint8");var U=c(_,!1);if(E[U]==null){var Y=y.length;E[U]=Math.floor(Y/4),y[Y]=_[0],y[Y+1]=_[1],y[Y+2]=_[2],y[Y+3]=_[3]}I[N]=E[U]}return!this.tooManyColors&&y.length>z*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;I<z*E;I++)a.push(0,0,0,0)}y.height<z&&y.resize(E,z),y.subimage({width:Math.min(a.length*.25,E),height:z,data:a},0,0)}},x.prototype.destroy=function(){return this.groups.forEach(function(a){a.sizeBuffer.destroy(),a.positionBuffer.destroy(),a.positionFractBuffer.destroy(),a.colorBuffer.destroy(),a.activation.forEach(function(E){return E&&E.destroy&&E.destroy()}),a.selectionBuffer.destroy(),a.elements&&a.elements.destroy()}),this.groups.length=0,this.paletteTexture.destroy(),this.markerTextures.forEach(function(a){return a&&a.destroy&&a.destroy()}),this};var S=e(56131),b=function(E,y){var z=new C(E,y),I=z.render.bind(z);return S(I,{render:I,update:z.update.bind(z),draw:z.draw.bind(z),destroy:z.destroy.bind(z),regl:z.regl,gl:z.gl,canvas:z.gl.canvas,groups:z.groups,markers:z.markerCache,palette:z.palette}),I};G.exports=b},60487:function(G,V,e){var m=e(11870),P=e(71299),i=e(21527),L=e(5877),A=e(57471),v=e(18863),p=e(30120);G.exports=t;function t(l,c){if(!(this instanceof t))return new t(l);this.traces=[],this.passes={},this.regl=l,this.scatter=m(l),this.canvas=this.scatter.canvas}t.prototype.render=function(){for(var l=this,c,u=[],g=arguments.length;g--;)u[g]=arguments[g];return u.length&&(c=this).update.apply(c,u),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?this.planned==null&&(this.planned=L(function(){l.draw(),l.dirty=!0,l.planned=null})):(this.draw(),this.dirty=!0,L(function(){l.dirty=!1})),this)},t.prototype.update=function(){for(var l,c=[],u=arguments.length;u--;)c[u]=arguments[u];if(c.length){for(var g=0;g<c.length;g++)this.updateItem(g,c[g]);this.traces=this.traces.filter(Boolean);for(var f=[],w=0,h=0;h<this.traces.length;h++){for(var o=this.traces[h],d=this.traces[h].passes,M=0;M<d.length;M++)f.push(this.passes[d[M]]);o.passOffset=w,w+=o.passes.length}return(l=this.scatter).update.apply(l,f),this}},t.prototype.updateItem=function(l,c){var u=this,g=u.regl;if(c===null)return this.traces[l]=null,this;if(!c)return this;var f=P(c,{data:"data items columns rows values dimensions samples x",snap:"snap cluster",size:"sizes size radius",color:"colors color fill fill-color fillColor",opacity:"opacity alpha transparency opaque",borderSize:"borderSizes borderSize border-size bordersize borderWidth borderWidths border-width borderwidth stroke-width strokeWidth strokewidth outline",borderColor:"borderColors borderColor bordercolor stroke stroke-color strokeColor",marker:"markers marker shape",range:"range ranges databox dataBox",viewport:"viewport viewBox viewbox",domain:"domain domains area areas",padding:"pad padding paddings pads margin margins",transpose:"transpose transposed",diagonal:"diagonal diag showDiagonal",upper:"upper up top upperhalf upperHalf showupperhalf showUpper showUpperHalf",lower:"lower low bottom lowerhalf lowerHalf showlowerhalf showLowerHalf showLower"}),w=this.traces[l]||(this.traces[l]={id:l,buffer:g.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),color:"black",marker:null,size:12,borderColor:"transparent",borderSize:1,viewport:v([g._gl.drawingBufferWidth,g._gl.drawingBufferHeight]),padding:[0,0,0,0],opacity:1,diagonal:!0,upper:!0,lower:!0});if(f.color!=null&&(w.color=f.color),f.size!=null&&(w.size=f.size),f.marker!=null&&(w.marker=f.marker),f.borderColor!=null&&(w.borderColor=f.borderColor),f.borderSize!=null&&(w.borderSize=f.borderSize),f.opacity!=null&&(w.opacity=f.opacity),f.viewport&&(w.viewport=v(f.viewport)),f.diagonal!=null&&(w.diagonal=f.diagonal),f.upper!=null&&(w.upper=f.upper),f.lower!=null&&(w.lower=f.lower),f.data){w.buffer(p(f.data)),w.columns=f.data.length,w.count=f.data[0].length,w.bounds=[];for(var h=0;h<w.columns;h++)w.bounds[h]=i(f.data[h],1)}var o;f.range&&(w.range=f.range,o=w.range&&typeof w.range[0]!="number"),f.domain&&(w.domain=f.domain);var d=!1;f.padding!=null&&(Array.isArray(f.padding)&&f.padding.length===w.columns&&typeof f.padding[f.padding.length-1]=="number"?(w.padding=f.padding.map(n),d=!0):w.padding=n(f.padding));var M=w.columns,T=w.count,C=w.viewport.width,x=w.viewport.height,S=w.viewport.x,b=w.viewport.y,a=C/M,E=x/M;w.passes=[];for(var y=0;y<M;y++)for(var z=0;z<M;z++)if(!(!w.diagonal&&z===y)&&!(!w.upper&&y>z)&&!(!w.lower&&y<z)){var I=r(w.id,y,z),B=this.passes[I]||(this.passes[I]={});if(f.data&&(f.transpose?B.positions={x:{buffer:w.buffer,offset:z,count:T,stride:M},y:{buffer:w.buffer,offset:y,count:T,stride:M}}:B.positions={x:{buffer:w.buffer,offset:z*T,count:T},y:{buffer:w.buffer,offset:y*T,count:T}},B.bounds=s(w.bounds,y,z)),f.domain||f.viewport||f.data){var k=d?s(w.padding,y,z):w.padding;if(w.domain){var O=s(w.domain,y,z),N=O[0],_=O[1],U=O[2],Y=O[3];B.viewport=[S+N*C+k[0],b+_*x+k[1],S+U*C-k[2],b+Y*x-k[3]]}else B.viewport=[S+z*a+a*k[0],b+y*E+E*k[1],S+(z+1)*a-a*k[2],b+(y+1)*E-E*k[3]]}f.color&&(B.color=w.color),f.size&&(B.size=w.size),f.marker&&(B.marker=w.marker),f.borderSize&&(B.borderSize=w.borderSize),f.borderColor&&(B.borderColor=w.borderColor),f.opacity&&(B.opacity=w.opacity),f.range&&(B.range=o?s(w.range,y,z):w.range||B.bounds),w.passes.push(I)}return this},t.prototype.draw=function(){for(var l,c=[],u=arguments.length;u--;)c[u]=arguments[u];if(!c.length)this.scatter.draw();else{for(var g=[],f=0;f<c.length;f++)if(typeof c[f]=="number"){var w=this.traces[c[f]],h=w.passes,o=w.passOffset;g.push.apply(g,A(o,o+h.length))}else if(c[f].length){var d=c[f],M=this.traces[f],T=M.passes,C=M.passOffset;T=T.map(function(x,S){g[C+S]=d})}(l=this.scatter).draw.apply(l,g)}return this},t.prototype.destroy=function(){return this.traces.forEach(function(l){l.buffer&&l.buffer.destroy&&l.buffer.destroy()}),this.traces=null,this.passes=null,this.scatter.destroy(),this};function r(l,c,u){var g=l.id!=null?l.id:l,f=c,w=u,h=g<<16|(f&255)<<8|w&255;return h}function s(l,c,u){var g,f,w,h,o=l[c],d=l[u];return o.length>2?(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<yt.length&&jt===Yt&&(jt==='"'||jt==="'"))return['"'+yt.substr(1,yt.length-2).replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"'];if(jt=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(yt))return e(yt.substr(0,jt.index)).concat(e(jt[1])).concat(e(yt.substr(jt.index+jt[0].length)));if(jt=yt.split("."),jt.length===1)return['"'+yt.replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"'];for(yt=[],Yt=0;Yt<jt.length;++Yt)yt=yt.concat(e(jt[Yt]));return yt}function m(yt){return"["+e(yt).join("][")+"]"}function P(yt,jt){if(typeof yt=="function")return new V(0,yt);if(typeof yt=="number"||typeof yt=="boolean")return new V(5,yt);if(Array.isArray(yt))return new V(6,yt.map(function(Yt,br){return P(Yt)}));if(yt instanceof V)return yt}function i(){var yt={"":0},jt=[""];return{id:function(Yt){var br=yt[Yt];return br||(br=yt[Yt]=jt.length,jt.push(Yt),br)},str:function(Yt){return jt[Yt]}}}function L(yt,jt,Yt){function br(){var lt=window.innerWidth,xt=window.innerHeight;yt!==document.body&&(xt=hr.getBoundingClientRect(),lt=xt.right-xt.left,xt=xt.bottom-xt.top),hr.width=Yt*lt,hr.height=Yt*xt}var hr=document.createElement("canvas");ie(hr.style,{border:0,margin:0,padding:0,top:0,left:0,width:"100%",height:"100%"}),yt.appendChild(hr),yt===document.body&&(hr.style.position="absolute",ie(yt.style,{margin:0,padding:0}));var ut;return yt!==document.body&&typeof ResizeObserver=="function"?(ut=new ResizeObserver(function(){setTimeout(br)}),ut.observe(yt)):window.addEventListener("resize",br,!1),br(),{canvas:hr,onDestroy:function(){ut?ut.disconnect():window.removeEventListener("resize",br),yt.removeChild(hr)}}}function A(yt,jt){function Yt(br){try{return yt.getContext(br,jt)}catch{return null}}return Yt("webgl")||Yt("experimental-webgl")||Yt("webgl-experimental")}function v(yt){return typeof yt=="string"?yt.split():yt}function p(yt){return typeof yt=="string"?document.querySelector(yt):yt}function t(yt){var jt=yt||{},Yt,br,hr,ut;yt={};var lt=[],xt=[],Tt=typeof window>"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.extensions.length;++hr){var ut=jt.extensions[hr];if(!Yt(ut))return jt.onDestroy(),jt.onDone('"'+ut+'" extension is not supported by the current WebGL context, try upgrading your system or a different browser'),null}return jt.optionalExtensions.forEach(Yt),{extensions:br,restore:function(){Object.keys(br).forEach(function(lt){if(br[lt]&&!Yt(lt))throw Error("(regl): error restoring extension "+lt)})}}}function s(yt,jt){for(var Yt=Array(yt),br=0;br<yt;++br)Yt[br]=jt(br);return Yt}function n(yt){var jt,Yt;return jt=(65535<yt)<<4,yt>>>=jt,Yt=(255<yt)<<3,yt>>>=Yt,jt|=Yt,Yt=(15<yt)<<2,yt>>>=Yt,jt|=Yt,Yt=(3<yt)<<1,jt|Yt|yt>>>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<hr.length?hr.pop():new ArrayBuffer(br)}function jt(br){Yt[n(br.byteLength)>>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;lt<jt;++lt)for(var xt=yt[lt],Tt=0;Tt<Yt;++Tt)for(var Ct=xt[Tt],St=0;St<br;++St)hr[ut++]=Ct[St]}function g(yt,jt,Yt,br,hr){for(var ut=1,lt=Yt+1;lt<jt.length;++lt)ut*=jt[lt];var xt=jt[Yt];if(jt.length-Yt===4){var Tt=jt[Yt+1],Ct=jt[Yt+2];for(jt=jt[Yt+3],lt=0;lt<xt;++lt)u(yt[lt],Tt,Ct,jt,br,hr),hr+=ut}else for(lt=0;lt<xt;++lt)g(yt[lt],jt,Yt+1,br,hr),hr+=ut}function f(yt){return Ue[Object.prototype.toString.call(yt)]|0}function w(yt,jt){for(var Yt=0;Yt<jt.length;++Yt)yt[Yt]=jt[Yt]}function h(yt,jt,Yt,br,hr,ut,lt){for(var xt=0,Tt=0;Tt<Yt;++Tt)for(var Ct=0;Ct<br;++Ct)yt[xt++]=jt[hr*Tt+ut*Ct+lt]}function o(yt,jt,Yt,br){function hr(_t){this.id=Tt++,this.buffer=yt.createBuffer(),this.type=_t,this.usage=35044,this.byteLength=0,this.dimension=1,this.dtype=5121,this.persistentData=null,Yt.profile&&(this.stats={size:0})}function ut(_t,Ht,$t){_t.byteLength=Ht.byteLength,yt.bufferData(_t.type,Ht,$t)}function lt(_t,Ht,$t,Qt,or,Er){if(_t.usage=$t,Array.isArray(Ht)){if(_t.dtype=Qt||5126,0<Ht.length)if(Array.isArray(Ht[0])){or=nt(Ht);for(var Ye=Qt=1;Ye<or.length;++Ye)Qt*=or[Ye];_t.dimension=Qt,Ht=Ge(Ht,or,_t.dtype),ut(_t,Ht,$t),Er?_t.persistentData=Ht:Oe.freeType(Ht)}else typeof Ht[0]=="number"?(_t.dimension=or,or=Oe.allocType(_t.dtype,Ht.length),w(or,Ht),ut(_t,or,$t),Er?_t.persistentData=or:Oe.freeType(or)):Ee(Ht[0])&&(_t.dimension=Ht[0].length,_t.dtype=Qt||f(Ht[0])||5126,Ht=Ge(Ht,[Ht.length,Ht[0].length],_t.dtype),ut(_t,Ht,$t),Er?_t.persistentData=Ht:Oe.freeType(Ht))}else if(Ee(Ht))_t.dtype=Qt||f(Ht),_t.dimension=or,ut(_t,Ht,$t),Er&&(_t.persistentData=new Uint8Array(new Uint8Array(Ht.buffer)));else if(c(Ht)){or=Ht.shape;var We=Ht.stride,Ye=Ht.offset,Dt=0,Ft=0,Zt=0,nr=0;or.length===1?(Dt=or[0],Ft=1,Zt=We[0],nr=0):or.length===2&&(Dt=or[0],Ft=or[1],Zt=We[0],nr=We[1]),_t.dtype=Qt||f(Ht.data)||5126,_t.dimension=Ft,or=Oe.allocType(_t.dtype,Dt*Ft),h(or,Ht.data,Dt,Ft,Zt,nr,Ye),ut(_t,or,$t),Er?_t.persistentData=or:Oe.freeType(or)}else Ht instanceof ArrayBuffer&&(_t.dtype=5121,_t.dimension=or,ut(_t,Ht,$t),Er&&(_t.persistentData=new Uint8Array(new Uint8Array(Ht))))}function xt(_t){jt.bufferCount--,br(_t),yt.deleteBuffer(_t.buffer),_t.buffer=null,delete Ct[_t.id]}var Tt=0,Ct={};hr.prototype.bind=function(){yt.bindBuffer(this.type,this.buffer)},hr.prototype.destroy=function(){xt(this)};var St=[];return Yt.profile&&(jt.getTotalBufferSize=function(){var _t=0;return Object.keys(Ct).forEach(function(Ht){_t+=Ct[Ht].stats.size}),_t}),{create:function(_t,Ht,$t,Qt){function or(Ye){var We=35044,Dt=null,Ft=0,Zt=0,nr=1;return Array.isArray(Ye)||Ee(Ye)||c(Ye)||Ye instanceof ArrayBuffer?Dt=Ye:typeof Ye=="number"?Ft=Ye|0:Ye&&("data"in Ye&&(Dt=Ye.data),"usage"in Ye&&(We=Fe[Ye.usage]),"type"in Ye&&(Zt=He[Ye.type]),"dimension"in Ye&&(nr=Ye.dimension|0),"length"in Ye&&(Ft=Ye.length|0)),Er.bind(),Dt?lt(Er,Dt,We,Zt,nr,Qt):(Ft&&yt.bufferData(Er.type,Ft,We),Er.dtype=Zt||5121,Er.usage=We,Er.dimension=nr,Er.byteLength=Ft),Yt.profile&&(Er.stats.size=Er.byteLength*qe[Er.dtype]),or}jt.bufferCount++;var Er=new hr(Ht);return Ct[Er.id]=Er,$t||or(_t),or._reglType="buffer",or._buffer=Er,or.subdata=function(Ye,We){var Dt=(We||0)|0,Ft;if(Er.bind(),Ee(Ye)||Ye instanceof ArrayBuffer)yt.bufferSubData(Er.type,Dt,Ye);else if(Array.isArray(Ye)){if(0<Ye.length)if(typeof Ye[0]=="number"){var Zt=Oe.allocType(Er.dtype,Ye.length);w(Zt,Ye),yt.bufferSubData(Er.type,Dt,Zt),Oe.freeType(Zt)}else(Array.isArray(Ye[0])||Ee(Ye[0]))&&(Ft=nt(Ye),Zt=Ge(Ye,Ft,Er.dtype),yt.bufferSubData(Er.type,Dt,Zt),Oe.freeType(Zt))}else if(c(Ye)){Ft=Ye.shape;var nr=Ye.stride,lr=Zt=0,rr=0,zt=0;Ft.length===1?(Zt=Ft[0],lr=1,rr=nr[0],zt=0):Ft.length===2&&(Zt=Ft[0],lr=Ft[1],rr=nr[0],zt=nr[1]),Ft=Array.isArray(Ye.data)?Er.dtype:f(Ye.data),Ft=Oe.allocType(Ft,Zt*lr),h(Ft,Ye.data,Zt,lr,rr,zt,Ye.offset),yt.bufferSubData(Er.type,Dt,Ft),Oe.freeType(Ft)}return or},Yt.profile&&(or.stats=Er.stats),or.destroy=function(){xt(Er)},or},createStream:function(_t,Ht){var $t=St.pop();return $t||($t=new hr(_t)),$t.bind(),lt($t,Ht,35040,0,1,!1),$t},destroyStream:function(_t){St.push(_t)},clear:function(){xe(Ct).forEach(xt),St.forEach(xt)},getBuffer:function(_t){return _t&&_t._buffer instanceof hr?_t._buffer:null},restore:function(){xe(Ct).forEach(function(_t){_t.buffer=yt.createBuffer(),yt.bindBuffer(_t.type,_t.buffer),yt.bufferData(_t.type,_t.persistentData||_t.byteLength,_t.usage)})},_initBuffer:lt}}function d(yt,jt,Yt,br){function hr(_t){this.id=Tt++,xt[this.id]=this,this.buffer=_t,this.primType=4,this.type=this.vertCount=0}function ut(_t,Ht,$t,Qt,or,Er,Ye){_t.buffer.bind();var We;if(Ht?((We=Ye)||Ee(Ht)&&(!c(Ht)||Ee(Ht.data))||(We=jt.oes_element_index_uint?5125:5123),Yt._initBuffer(_t.buffer,Ht,$t,We,3)):(yt.bufferData(34963,Er,$t),_t.buffer.dtype=We||5121,_t.buffer.usage=$t,_t.buffer.dimension=3,_t.buffer.byteLength=Er),We=Ye,!Ye){switch(_t.buffer.dtype){case 5121:case 5120:We=5121;break;case 5123:case 5122:We=5123;break;case 5125:case 5124:We=5125}_t.buffer.dtype=We}_t.type=We,Ht=or,0>Ht&&(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<yt.length;++Yt)if(isNaN(yt[Yt]))jt[Yt]=65535;else if(yt[Yt]===1/0)jt[Yt]=31744;else if(yt[Yt]===-1/0)jt[Yt]=64512;else{et[0]=yt[Yt];var ut=ct[0],br=ut>>>31<<15,hr=(ut<<1>>>24)-127,ut=ut>>13&1023;jt[Yt]=-24>hr?br:-14>hr?br+(ut+1024>>-14-hr):15<hr?br+31744:br+(hr+15<<10)+ut}return jt}function T(yt){return Array.isArray(yt)||Ee(yt)}function C(yt){return"[object "+yt+"]"}function x(yt){return Array.isArray(yt)&&(yt.length===0||typeof yt[0]=="number")}function S(yt){return!!(Array.isArray(yt)&&yt.length!==0&&T(yt[0]))}function b(yt){return Object.prototype.toString.call(yt)}function a(yt){if(!yt)return!1;var jt=b(yt);return 0<=Pe.indexOf(jt)?!0:x(yt)||S(yt)||c(yt)}function E(yt,jt){yt.type===36193?(yt.data=M(jt),Oe.freeType(jt)):yt.data=jt}function y(yt,jt,Yt,br,hr,ut){if(yt=typeof se[yt]<"u"?se[yt]:At[yt]*be[jt],ut&&(yt*=6),hr){for(br=0;1<=Yt;)br+=yt*Yt*Yt,Yt/=2;return br}return yt*Yt*br}function z(yt,jt,Yt,br,hr,ut,lt){function xt(){this.format=this.internalformat=6408,this.type=5121,this.flipY=this.premultiplyAlpha=this.compressed=!1,this.unpackAlignment=1,this.colorSpace=37444,this.channels=this.height=this.width=0}function Tt(Mr,on){Mr.internalformat=on.internalformat,Mr.format=on.format,Mr.type=on.type,Mr.compressed=on.compressed,Mr.premultiplyAlpha=on.premultiplyAlpha,Mr.flipY=on.flipY,Mr.unpackAlignment=on.unpackAlignment,Mr.colorSpace=on.colorSpace,Mr.width=on.width,Mr.height=on.height,Mr.channels=on.channels}function Ct(Mr,on){if(typeof on=="object"&&on){"premultiplyAlpha"in on&&(Mr.premultiplyAlpha=on.premultiplyAlpha),"flipY"in on&&(Mr.flipY=on.flipY),"alignment"in on&&(Mr.unpackAlignment=on.alignment),"colorSpace"in on&&(Mr.colorSpace=pn[on.colorSpace]),"type"in on&&(Mr.type=jr[on.type]);var nn=Mr.width,gn=Mr.height,Un=Mr.channels,En=!1;"shape"in on?(nn=on.shape[0],gn=on.shape[1],on.shape.length===3&&(Un=on.shape[2],En=!0)):("radius"in on&&(nn=gn=on.radius),"width"in on&&(nn=on.width),"height"in on&&(gn=on.height),"channels"in on&&(Un=on.channels,En=!0)),Mr.width=nn|0,Mr.height=gn|0,Mr.channels=Un|0,nn=!1,"format"in on&&(nn=on.format,gn=Mr.internalformat=In[nn],Mr.format=Tn[gn],nn in jr&&!("type"in on)&&(Mr.type=jr[nn]),nn in Dn&&(Mr.compressed=!0),nn=!0),!En&&nn?Mr.channels=At[Mr.format]:En&&!nn&&Mr.channels!==pt[Mr.format]&&(Mr.format=Mr.internalformat=pt[Mr.channels])}}function St(Mr){yt.pixelStorei(37440,Mr.flipY),yt.pixelStorei(37441,Mr.premultiplyAlpha),yt.pixelStorei(37443,Mr.colorSpace),yt.pixelStorei(3317,Mr.unpackAlignment)}function _t(){xt.call(this),this.yOffset=this.xOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function Ht(Mr,on){var nn=null;if(a(on)?nn=on:on&&(Ct(Mr,on),"x"in on&&(Mr.xOffset=on.x|0),"y"in on&&(Mr.yOffset=on.y|0),a(on.data)&&(nn=on.data)),on.copy){var gn=hr.viewportWidth,Un=hr.viewportHeight;Mr.width=Mr.width||gn-Mr.xOffset,Mr.height=Mr.height||Un-Mr.yOffset,Mr.needsCopy=!0}else if(!nn)Mr.width=Mr.width||1,Mr.height=Mr.height||1,Mr.channels=Mr.channels||4;else if(Ee(nn))Mr.channels=Mr.channels||4,Mr.data=nn,"type"in on||Mr.type!==5121||(Mr.type=Ue[Object.prototype.toString.call(nn)]|0);else if(x(nn)){switch(Mr.channels=Mr.channels||4,gn=nn,Un=gn.length,Mr.type){case 5121:case 5123:case 5125:case 5126:Un=Oe.allocType(Mr.type,Un),Un.set(gn),Mr.data=Un;break;case 36193:Mr.data=M(gn)}Mr.alignment=1,Mr.needsFree=!0}else if(c(nn)){gn=nn.data,Array.isArray(gn)||Mr.type!==5121||(Mr.type=Ue[Object.prototype.toString.call(gn)]|0);var Un=nn.shape,En=nn.stride,Cn,Hn,aa,Pa;Un.length===3?(aa=Un[2],Pa=En[2]):Pa=aa=1,Cn=Un[0],Hn=Un[1],Un=En[0],En=En[1],Mr.alignment=1,Mr.width=Cn,Mr.height=Hn,Mr.channels=aa,Mr.format=Mr.internalformat=pt[aa],Mr.needsFree=!0,Cn=Pa,nn=nn.offset,aa=Mr.width,Pa=Mr.height,Hn=Mr.channels;for(var Za=Oe.allocType(Mr.type===36193?5126:Mr.type,aa*Pa*Hn),Xt=0,wr=0;wr<Pa;++wr)for(var an=0;an<aa;++an)for(var cn=0;cn<Hn;++cn)Za[Xt++]=gn[Un*an+En*wr+Cn*cn+nn];E(Mr,Za)}else if(b(nn)===Mt||b(nn)===Vt||b(nn)===Je)b(nn)===Mt||b(nn)===Vt?Mr.element=nn:Mr.element=nn.canvas,Mr.width=Mr.element.width,Mr.height=Mr.element.height,Mr.channels=4;else if(b(nn)===De)Mr.element=nn,Mr.width=nn.width,Mr.height=nn.height,Mr.channels=4;else if(b(nn)===Ie)Mr.element=nn,Mr.width=nn.naturalWidth,Mr.height=nn.naturalHeight,Mr.channels=4;else if(b(nn)===ze)Mr.element=nn,Mr.width=nn.videoWidth,Mr.height=nn.videoHeight,Mr.channels=4;else if(S(nn)){for(gn=Mr.width||nn[0].length,Un=Mr.height||nn.length,En=Mr.channels,En=T(nn[0][0])?En||nn[0][0].length:En||1,Cn=Se.shape(nn),aa=1,Pa=0;Pa<Cn.length;++Pa)aa*=Cn[Pa];aa=Oe.allocType(Mr.type===36193?5126:Mr.type,aa),Se.flatten(nn,Cn,"",aa),E(Mr,aa),Mr.alignment=1,Mr.width=gn,Mr.height=Un,Mr.channels=En,Mr.format=Mr.internalformat=pt[En],Mr.needsFree=!0}}function $t(Mr,on,nn,gn,Un){var En=Mr.element,Cn=Mr.data,Hn=Mr.internalformat,aa=Mr.format,Pa=Mr.type,Za=Mr.width,Xt=Mr.height;St(Mr),En?yt.texSubImage2D(on,Un,nn,gn,aa,Pa,En):Mr.compressed?yt.compressedTexSubImage2D(on,Un,nn,gn,Hn,Za,Xt,Cn):Mr.needsCopy?(br(),yt.copyTexSubImage2D(on,Un,nn,gn,Mr.xOffset,Mr.yOffset,Za,Xt)):yt.texSubImage2D(on,Un,nn,gn,Za,Xt,aa,Pa,Cn)}function Qt(){return Pn.pop()||new _t}function or(Mr){Mr.needsFree&&Oe.freeType(Mr.data),_t.call(Mr),Pn.push(Mr)}function Er(){xt.call(this),this.genMipmaps=!1,this.mipmapHint=4352,this.mipmask=0,this.images=Array(16)}function Ye(Mr,on,nn){var gn=Mr.images[0]=Qt();Mr.mipmask=1,gn.width=Mr.width=on,gn.height=Mr.height=nn,gn.channels=Mr.channels=4}function We(Mr,on){var nn=null;if(a(on))nn=Mr.images[0]=Qt(),Tt(nn,Mr),Ht(nn,on),Mr.mipmask=1;else if(Ct(Mr,on),Array.isArray(on.mipmap))for(var gn=on.mipmap,Un=0;Un<gn.length;++Un)nn=Mr.images[Un]=Qt(),Tt(nn,Mr),nn.width>>=Un,nn.height>>=Un,Ht(nn,gn[Un]),Mr.mipmask|=1<<Un;else nn=Mr.images[0]=Qt(),Tt(nn,Mr),Ht(nn,on),Mr.mipmask=1;Tt(Mr,Mr.images[0])}function Dt(Mr,on){for(var nn=Mr.images,gn=0;gn<nn.length&&nn[gn];++gn){var Un=nn[gn],En=on,Cn=gn,Hn=Un.element,aa=Un.data,Pa=Un.internalformat,Za=Un.format,Xt=Un.type,wr=Un.width,an=Un.height;St(Un),Hn?yt.texImage2D(En,Cn,Za,Za,Xt,Hn):Un.compressed?yt.compressedTexImage2D(En,Cn,Pa,wr,an,0,aa):Un.needsCopy?(br(),yt.copyTexImage2D(En,Cn,Za,Un.xOffset,Un.yOffset,wr,an,0)):yt.texImage2D(En,Cn,Za,wr,an,0,Za,Xt,aa||null)}}function Ft(){var Mr=jn.pop()||new Er;xt.call(Mr);for(var on=Mr.mipmask=0;16>on;++on)Mr.images[on]=null;return Mr}function Zt(Mr){for(var on=Mr.images,nn=0;nn<on.length;++nn)on[nn]&&or(on[nn]),on[nn]=null;jn.push(Mr)}function nr(){this.magFilter=this.minFilter=9728,this.wrapT=this.wrapS=33071,this.anisotropic=1,this.genMipmaps=!1,this.mipmapHint=4352}function lr(Mr,on){"min"in on&&(Mr.minFilter=kr[on.min],0<=dt.indexOf(Mr.minFilter)&&!("faces"in on)&&(Mr.genMipmaps=!0)),"mag"in on&&(Mr.magFilter=Ir[on.mag]);var nn=Mr.wrapS,gn=Mr.wrapT;if("wrap"in on){var Un=on.wrap;typeof Un=="string"?nn=gn=Hr[Un]:Array.isArray(Un)&&(nn=Hr[Un[0]],gn=Hr[Un[1]])}else"wrapS"in on&&(nn=Hr[on.wrapS]),"wrapT"in on&&(gn=Hr[on.wrapT]);if(Mr.wrapS=nn,Mr.wrapT=gn,"anisotropic"in on&&(Mr.anisotropic=on.anisotropic),"mipmap"in on){switch(nn=!1,typeof on.mipmap){case"string":Mr.mipmapHint=vr[on.mipmap],nn=Mr.genMipmaps=!0;break;case"boolean":nn=Mr.genMipmaps=on.mipmap;break;case"object":Mr.genMipmaps=!1,nn=!0}!nn||"min"in on||(Mr.minFilter=9984)}}function rr(Mr,on){yt.texParameteri(on,10241,Mr.minFilter),yt.texParameteri(on,10240,Mr.magFilter),yt.texParameteri(on,10242,Mr.wrapS),yt.texParameteri(on,10243,Mr.wrapT),jt.ext_texture_filter_anisotropic&&yt.texParameteri(on,34046,Mr.anisotropic),Mr.genMipmaps&&(yt.hint(33170,Mr.mipmapHint),yt.generateMipmap(on))}function zt(Mr){xt.call(this),this.mipmask=0,this.internalformat=6408,this.id=qn++,this.refCount=1,this.target=Mr,this.texture=yt.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new nr,lt.profile&&(this.stats={size:0})}function fr(Mr){yt.activeTexture(33984),yt.bindTexture(Mr.target,Mr.texture)}function dr(){var Mr=ea[0];Mr?yt.bindTexture(Mr.target,Mr.texture):yt.bindTexture(3553,null)}function pr(Mr){var on=Mr.texture,nn=Mr.unit,gn=Mr.target;0<=nn&&(yt.activeTexture(33984+nn),yt.bindTexture(gn,null),ea[nn]=null),yt.deleteTexture(on),Mr.texture=null,Mr.params=null,Mr.pixels=null,Mr.refCount=0,delete sa[Mr.id],ut.textureCount--}var vr={"don't care":4352,"dont care":4352,nice:4354,fast:4353},Hr={repeat:10497,clamp:33071,mirror:33648},Ir={nearest:9728,linear:9729},kr=ie({mipmap:9987,"nearest mipmap nearest":9984,"linear mipmap nearest":9985,"nearest mipmap linear":9986,"linear mipmap linear":9987},Ir),pn={none:0,browser:37444},jr={uint8:5121,rgba4:32819,rgb565:33635,"rgb5 a1":32820},In={alpha:6406,luminance:6409,"luminance alpha":6410,rgb:6407,rgba:6408,rgba4:32854,"rgb5 a1":32855,rgb565:36194},Dn={};jt.ext_srgb&&(In.srgb=35904,In.srgba=35906),jt.oes_texture_float&&(jr.float32=jr.float=5126),jt.oes_texture_half_float&&(jr.float16=jr["half float"]=36193),jt.webgl_depth_texture&&(ie(In,{depth:6402,"depth stencil":34041}),ie(jr,{uint16:5123,uint32:5125,"depth stencil":34042})),jt.webgl_compressed_texture_s3tc&&ie(Dn,{"rgb s3tc dxt1":33776,"rgba s3tc dxt1":33777,"rgba s3tc dxt3":33778,"rgba s3tc dxt5":33779}),jt.webgl_compressed_texture_atc&&ie(Dn,{"rgb atc":35986,"rgba atc explicit alpha":35987,"rgba atc interpolated alpha":34798}),jt.webgl_compressed_texture_pvrtc&&ie(Dn,{"rgb pvrtc 4bppv1":35840,"rgb pvrtc 2bppv1":35841,"rgba pvrtc 4bppv1":35842,"rgba pvrtc 2bppv1":35843}),jt.webgl_compressed_texture_etc1&&(Dn["rgb etc1"]=36196);var xr=Array.prototype.slice.call(yt.getParameter(34467));Object.keys(Dn).forEach(function(Mr){var on=Dn[Mr];0<=xr.indexOf(on)&&(In[Mr]=on)});var Ar=Object.keys(In);Yt.textureFormats=Ar;var Or=[];Object.keys(In).forEach(function(Mr){Or[In[Mr]]=Mr});var Nr=[];Object.keys(jr).forEach(function(Mr){Nr[jr[Mr]]=Mr});var qr=[];Object.keys(Ir).forEach(function(Mr){qr[Ir[Mr]]=Mr});var vn=[];Object.keys(kr).forEach(function(Mr){vn[kr[Mr]]=Mr});var fn=[];Object.keys(Hr).forEach(function(Mr){fn[Hr[Mr]]=Mr});var Tn=Ar.reduce(function(Mr,on){var nn=In[on];return nn===6409||nn===6406||nn===6409||nn===6410||nn===6402||nn===34041||jt.ext_srgb&&(nn===35904||nn===35906)?Mr[nn]=nn:nn===32855||0<=on.indexOf("rgba")?Mr[nn]=6408:Mr[nn]=6407,Mr},{}),Pn=[],jn=[],qn=0,sa={},ta=Yt.maxTextureUnits,ea=Array(ta).map(function(){return null});return ie(zt.prototype,{bind:function(){this.bindCount+=1;var Mr=this.unit;if(0>Mr){for(var on=0;on<ta;++on){var nn=ea[on];if(nn){if(0<nn.bindCount)continue;nn.unit=-1}ea[on]=this,Mr=on;break}lt.profile&&ut.maxTextureUnits<Mr+1&&(ut.maxTextureUnits=Mr+1),this.unit=Mr,yt.activeTexture(33984+Mr),yt.bindTexture(this.target,this.texture)}return Mr},unbind:function(){--this.bindCount},decRef:function(){0>=--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;Mr<ta;++Mr)yt.activeTexture(33984+Mr),yt.bindTexture(3553,null),ea[Mr]=null;xe(sa).forEach(pr),ut.cubeCount=0,ut.textureCount=0},getTexture:function(Mr){return null},restore:function(){for(var Mr=0;Mr<ta;++Mr){var on=ea[Mr];on&&(on.bindCount=0,on.unit=-1,ea[Mr]=null)}xe(sa).forEach(function(nn){nn.texture=yt.createTexture(),yt.bindTexture(nn.target,nn.texture);for(var gn=0;32>gn;++gn)if(nn.mipmask&1<<gn)if(nn.target===3553)yt.texImage2D(3553,gn,nn.internalformat,nn.width>>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;Mr<ta;++Mr){var on=ea[Mr];on&&(on.bindCount=0,on.unit=-1,ea[Mr]=null),yt.activeTexture(33984+Mr),yt.bindTexture(3553,null),yt.bindTexture(34067,null)}}}}function I(yt,jt,Yt,br,hr,ut){function lt(zt,fr,dr){this.target=zt,this.texture=fr,this.renderbuffer=dr;var pr=zt=0;fr?(zt=fr.width,pr=fr.height):dr&&(zt=dr.width,pr=dr.height),this.width=zt,this.height=pr}function xt(zt){zt&&(zt.texture&&zt.texture._texture.decRef(),zt.renderbuffer&&zt.renderbuffer._renderbuffer.decRef())}function Tt(zt,fr,dr){zt&&(zt.texture?zt.texture._texture.refCount+=1:zt.renderbuffer._renderbuffer.refCount+=1)}function Ct(zt,fr){fr&&(fr.texture?yt.framebufferTexture2D(36160,zt,fr.target,fr.texture._texture.texture,0):yt.framebufferRenderbuffer(36160,zt,36161,fr.renderbuffer._renderbuffer.renderbuffer))}function St(zt){var fr=3553,dr=null,pr=null,vr=zt;return typeof zt=="object"&&(vr=zt.data,"target"in zt&&(fr=zt.target|0)),zt=vr._reglType,zt==="texture2d"||zt==="textureCube"?dr=vr:zt==="renderbuffer"&&(pr=vr,fr=36161),new lt(fr,dr,pr)}function _t(zt,fr,dr,pr,vr){return dr?(zt=br.create2D({width:zt,height:fr,format:pr,type:vr}),zt._texture.refCount=0,new lt(3553,zt,null)):(zt=hr.create({width:zt,height:fr,format:pr}),zt._renderbuffer.refCount=0,new lt(36161,null,zt))}function Ht(zt){return zt&&(zt.texture||zt.renderbuffer)}function $t(zt,fr,dr){zt&&(zt.texture?zt.texture.resize(fr,dr):zt.renderbuffer&&zt.renderbuffer.resize(fr,dr),zt.width=fr,zt.height=dr)}function Qt(){this.id=lr++,rr[this.id]=this,this.framebuffer=yt.createFramebuffer(),this.height=this.width=0,this.colorAttachments=[],this.depthStencilAttachment=this.stencilAttachment=this.depthAttachment=null}function or(zt){zt.colorAttachments.forEach(xt),xt(zt.depthAttachment),xt(zt.stencilAttachment),xt(zt.depthStencilAttachment)}function Er(zt){yt.deleteFramebuffer(zt.framebuffer),zt.framebuffer=null,ut.framebufferCount--,delete rr[zt.id]}function Ye(zt){var fr;yt.bindFramebuffer(36160,zt.framebuffer);var dr=zt.colorAttachments;for(fr=0;fr<dr.length;++fr)Ct(36064+fr,dr[fr]);for(fr=dr.length;fr<Yt.maxColorAttachments;++fr)yt.framebufferTexture2D(36160,36064+fr,3553,null,0);yt.framebufferTexture2D(36160,33306,3553,null,0),yt.framebufferTexture2D(36160,36096,3553,null,0),yt.framebufferTexture2D(36160,36128,3553,null,0),Ct(36096,zt.depthAttachment),Ct(36128,zt.stencilAttachment),Ct(33306,zt.depthStencilAttachment),yt.checkFramebufferStatus(36160),yt.isContextLost(),yt.bindFramebuffer(36160,Dt.next?Dt.next.framebuffer:null),Dt.cur=Dt.next,yt.getError()}function We(zt,fr){function dr(vr,Hr){var Ir,kr=0,pn=0,jr=!0,In=!0;Ir=null;var Dn=!0,xr="rgba",Ar="uint8",Or=1,Nr=null,qr=null,vn=null,fn=!1;typeof vr=="number"?(kr=vr|0,pn=Hr|0||kr):vr?("shape"in vr?(pn=vr.shape,kr=pn[0],pn=pn[1]):("radius"in vr&&(kr=pn=vr.radius),"width"in vr&&(kr=vr.width),"height"in vr&&(pn=vr.height)),("color"in vr||"colors"in vr)&&(Ir=vr.color||vr.colors),Ir||("colorCount"in vr&&(Or=vr.colorCount|0),"colorTexture"in vr&&(Dn=!!vr.colorTexture,xr="rgba4"),"colorType"in vr&&(Ar=vr.colorType,!Dn)&&(Ar==="half float"||Ar==="float16"?xr="rgba16f":(Ar==="float"||Ar==="float32")&&(xr="rgba32f")),"colorFormat"in vr&&(xr=vr.colorFormat,0<=Ft.indexOf(xr)?Dn=!0:0<=Zt.indexOf(xr)&&(Dn=!1))),("depthTexture"in vr||"depthStencilTexture"in vr)&&(fn=!(!vr.depthTexture&&!vr.depthStencilTexture)),"depth"in vr&&(typeof vr.depth=="boolean"?jr=vr.depth:(Nr=vr.depth,In=!1)),"stencil"in vr&&(typeof vr.stencil=="boolean"?In=vr.stencil:(qr=vr.stencil,jr=!1)),"depthStencil"in vr&&(typeof vr.depthStencil=="boolean"?jr=In=vr.depthStencil:(vn=vr.depthStencil,In=jr=!1))):kr=pn=1;var Tn=null,Pn=null,jn=null,qn=null;if(Array.isArray(Ir))Tn=Ir.map(St);else if(Ir)Tn=[St(Ir)];else for(Tn=Array(Or),Ir=0;Ir<Or;++Ir)Tn[Ir]=_t(kr,pn,Dn,xr,Ar);for(kr=kr||Tn[0].width,pn=pn||Tn[0].height,Nr?Pn=St(Nr):jr&&!In&&(Pn=_t(kr,pn,fn,"depth","uint32")),qr?jn=St(qr):In&&!jr&&(jn=_t(kr,pn,!1,"stencil","uint8")),vn?qn=St(vn):!Nr&&!qr&&In&&jr&&(qn=_t(kr,pn,fn,"depth stencil","depth stencil")),jr=null,Ir=0;Ir<Tn.length;++Ir)Tt(Tn[Ir]),Tn[Ir]&&Tn[Ir].texture&&(In=Be[Tn[Ir].texture._texture.format]*ot[Tn[Ir].texture._texture.type],jr===null&&(jr=In));return Tt(Pn),Tt(jn),Tt(qn),or(pr),pr.width=kr,pr.height=pn,pr.colorAttachments=Tn,pr.depthAttachment=Pn,pr.stencilAttachment=jn,pr.depthStencilAttachment=qn,dr.color=Tn.map(Ht),dr.depth=Ht(Pn),dr.stencil=Ht(jn),dr.depthStencil=Ht(qn),dr.width=pr.width,dr.height=pr.height,Ye(pr),dr}var pr=new Qt;return ut.framebufferCount++,dr(zt,fr),ie(dr,{resize:function(vr,Hr){var Ir=Math.max(vr|0,1),kr=Math.max(Hr|0||Ir,1);if(Ir===pr.width&&kr===pr.height)return dr;for(var pn=pr.colorAttachments,jr=0;jr<pn.length;++jr)$t(pn[jr],Ir,kr);return $t(pr.depthAttachment,Ir,kr),$t(pr.stencilAttachment,Ir,kr),$t(pr.depthStencilAttachment,Ir,kr),pr.width=dr.width=Ir,pr.height=dr.height=kr,Ye(pr),dr},_reglType:"framebuffer",_framebuffer:pr,destroy:function(){Er(pr),or(pr)},use:function(vr){Dt.setFBO({framebuffer:dr},vr)}})}var Dt={cur:null,next:null,dirty:!1,setFBO:null},Ft=["rgba"],Zt=["rgba4","rgb565","rgb5 a1"];jt.ext_srgb&&Zt.push("srgba"),jt.ext_color_buffer_half_float&&Zt.push("rgba16f","rgb16f"),jt.webgl_color_buffer_float&&Zt.push("rgba32f");var nr=["uint8"];jt.oes_texture_half_float&&nr.push("half float","float16"),jt.oes_texture_float&&nr.push("float","float32");var lr=0,rr={};return ie(Dt,{getFramebuffer:function(zt){return typeof zt=="function"&&zt._reglType==="framebuffer"&&(zt=zt._framebuffer,zt instanceof Qt)?zt:null},create:We,createCube:function(zt){function fr(pr){var vr,Hr={color:null},Ir=0,kr=null;vr="rgba";var pn="uint8",jr=1;if(typeof pr=="number"?Ir=pr|0:pr?("shape"in pr?Ir=pr.shape[0]:("radius"in pr&&(Ir=pr.radius|0),"width"in pr?Ir=pr.width|0:"height"in pr&&(Ir=pr.height|0)),("color"in pr||"colors"in pr)&&(kr=pr.color||pr.colors),kr||("colorCount"in pr&&(jr=pr.colorCount|0),"colorType"in pr&&(pn=pr.colorType),"colorFormat"in pr&&(vr=pr.colorFormat)),"depth"in pr&&(Hr.depth=pr.depth),"stencil"in pr&&(Hr.stencil=pr.stencil),"depthStencil"in pr&&(Hr.depthStencil=pr.depthStencil)):Ir=1,kr)if(Array.isArray(kr))for(pr=[],vr=0;vr<kr.length;++vr)pr[vr]=kr[vr];else pr=[kr];else for(pr=Array(jr),kr={radius:Ir,format:vr,type:pn},vr=0;vr<jr;++vr)pr[vr]=br.createCube(kr);for(Hr.color=Array(pr.length),vr=0;vr<pr.length;++vr)jr=pr[vr],Ir=Ir||jr.width,Hr.color[vr]={target:34069,data:pr[vr]};for(vr=0;6>vr;++vr){for(jr=0;jr<pr.length;++jr)Hr.color[jr].target=34069+vr;0<vr&&(Hr.depth=dr[0].depth,Hr.stencil=dr[0].stencil,Hr.depthStencil=dr[0].depthStencil),dr[vr]?dr[vr](Hr):dr[vr]=We(Hr)}return ie(fr,{width:Ir,height:Ir,color:pr})}var dr=Array(6);return fr(zt),ie(fr,{faces:dr,resize:function(pr){var vr=pr|0;if(vr===fr.width)return fr;var Hr=fr.color;for(pr=0;pr<Hr.length;++pr)Hr[pr].resize(vr);for(pr=0;6>pr;++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<Ht;++Yt)$t[Yt]=new B;var Qt=0,or={},Er={Record:B,scope:{},state:$t,currentVAO:null,targetVAO:null,restore:jt.oes_vertex_array_object?_t:function(){},createVAO:function(Ye){function We(Ft){var Zt;Array.isArray(Ft)?(Zt=Ft,Dt.elements&&Dt.ownsElements&&Dt.elements.destroy(),Dt.elements=null,Dt.ownsElements=!1,Dt.offset=0,Dt.count=0,Dt.instances=-1,Dt.primitive=4):(Ft.elements?(Zt=Ft.elements,Dt.ownsElements?(typeof Zt=="function"&&Zt._reglType==="elements"?Dt.elements.destroy():Dt.elements(Zt),Dt.ownsElements=!1):ut.getElements(Ft.elements)?(Dt.elements=Ft.elements,Dt.ownsElements=!1):(Dt.elements=ut.create(Ft.elements),Dt.ownsElements=!0)):(Dt.elements=null,Dt.ownsElements=!1),Zt=Ft.attributes,Dt.offset=0,Dt.count=-1,Dt.instances=-1,Dt.primitive=4,Dt.elements&&(Dt.count=Dt.elements._elements.vertCount,Dt.primitive=Dt.elements._elements.primType),"offset"in Ft&&(Dt.offset=Ft.offset|0),"count"in Ft&&(Dt.count=Ft.count|0),"instances"in Ft&&(Dt.instances=Ft.instances|0),"primitive"in Ft&&(Dt.primitive=$e[Ft.primitive])),Ft={};var nr=Dt.attributes;nr.length=Zt.length;for(var lr=0;lr<Zt.length;++lr){var rr=Zt[lr],zt=nr[lr]=new B,fr=rr.data||rr;if(Array.isArray(fr)||Ee(fr)||c(fr)){var dr;Dt.buffers[lr]&&(dr=Dt.buffers[lr],Ee(fr)&&dr._buffer.byteLength>=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;dr<Dt.buffers.length;++dr)!Ft[dr]&&Dt.buffers[dr]&&(Dt.buffers[dr].destroy(),Dt.buffers[dr]=null);return Dt.refresh(),We}var Dt=new St;return br.vaoCount+=1,We.destroy=function(){for(var Ft=0;Ft<Dt.buffers.length;++Ft)Dt.buffers[Ft]&&Dt.buffers[Ft].destroy();Dt.buffers.length=0,Dt.ownsElements&&(Dt.elements.destroy(),Dt.elements=null,Dt.ownsElements=!1),Dt.destroy()},We._vao=Dt,We._reglType="vao",We(Ye)},getVAO:function(Ye){return typeof Ye=="function"&&Ye._vao?Ye._vao:null},destroyBuffer:function(Ye){for(var We=0;We<$t.length;++We){var Dt=$t[We];Dt.buffer===Ye&&(yt.disableVertexAttribArray(We),Dt.buffer=null)}},setVAO:jt.oes_vertex_array_object?xt:Tt,clear:jt.oes_vertex_array_object?Ct:function(){}};return St.prototype.bindAttrs=function(){for(var Ye=jt.angle_instanced_arrays,We=this.attributes,Dt=0;Dt<We.length;++Dt){var Ft=We[Dt];Ft.buffer?(yt.enableVertexAttribArray(Dt),yt.bindBuffer(34962,Ft.buffer.buffer),yt.vertexAttribPointer(Dt,Ft.size,Ft.type,Ft.normalized,Ft.stride,Ft.offset),Ye&&Ft.divisor&&Ye.vertexAttribDivisorANGLE(Dt,Ft.divisor)):(yt.disableVertexAttribArray(Dt),yt.vertexAttrib4f(Dt,Ft.x,Ft.y,Ft.z,Ft.w))}for(Ye=We.length;Ye<Ht;++Ye)yt.disableVertexAttribArray(Ye);(Ye=ut.getElements(this.elements))?yt.bindBuffer(34963,Ye.buffer.buffer):yt.bindBuffer(34963,null)},St.prototype.refresh=function(){var Ye=jt.oes_vertex_array_object;Ye&&(Ye.bindVertexArrayOES(this.vao),this.bindAttrs(),Er.currentVAO=null,Ye.bindVertexArrayOES(null))},St.prototype.destroy=function(){if(this.vao){var Ye=jt.oes_vertex_array_object;this===Er.currentVAO&&(Er.currentVAO=null,Ye.bindVertexArrayOES(null)),Ye.deleteVertexArrayOES(this.vao),this.vao=null}this.ownsElements&&(this.elements.destroy(),this.elements=null,this.ownsElements=!1),or[this.id]&&(delete or[this.id],--br.vaoCount)},Er}function O(yt,jt,Yt,br){function hr(Qt,or,Er,Ye){this.name=Qt,this.id=or,this.location=Er,this.info=Ye}function ut(Qt,or){for(var Er=0;Er<Qt.length;++Er)if(Qt[Er].id===or.id){Qt[Er].location=or.location;return}Qt.push(or)}function lt(Qt,or,Er){Er=Qt===35632?Ct:St;var Ye=Er[or];if(!Ye){var We=jt.str(or),Ye=yt.createShader(Qt);yt.shaderSource(Ye,We),yt.compileShader(Ye),Er[or]=Ye}return Ye}function xt(Qt,or){this.id=$t++,this.fragId=Qt,this.vertId=or,this.program=null,this.uniforms=[],this.attributes=[],this.refCount=1,br.profile&&(this.stats={uniformsCount:0,attributesCount:0})}function Tt(Qt,or,Er){var Ye;Ye=lt(35632,Qt.fragId);var We=lt(35633,Qt.vertId);if(or=Qt.program=yt.createProgram(),yt.attachShader(or,Ye),yt.attachShader(or,We),Er)for(Ye=0;Ye<Er.length;++Ye)We=Er[Ye],yt.bindAttribLocation(or,We[0],We[1]);yt.linkProgram(or),We=yt.getProgramParameter(or,35718),br.profile&&(Qt.stats.uniformsCount=We);var Dt=Qt.uniforms;for(Ye=0;Ye<We;++Ye)if(Er=yt.getActiveUniform(or,Ye))if(1<Er.size)for(var Ft=0;Ft<Er.size;++Ft){var Zt=Er.name.replace("[0]","["+Ft+"]");ut(Dt,new hr(Zt,jt.id(Zt),yt.getUniformLocation(or,Zt),Er))}else ut(Dt,new hr(Er.name,jt.id(Er.name),yt.getUniformLocation(or,Er.name),Er));for(We=yt.getProgramParameter(or,35721),br.profile&&(Qt.stats.attributesCount=We),Qt=Qt.attributes,Ye=0;Ye<We;++Ye)(Er=yt.getActiveAttrib(or,Ye))&&ut(Qt,new hr(Er.name,jt.id(Er.name),yt.getAttribLocation(or,Er.name),Er))}var Ct={},St={},_t={},Ht=[],$t=0;return br.profile&&(Yt.getMaxUniformsCount=function(){var Qt=0;return Ht.forEach(function(or){or.stats.uniformsCount>Qt&&(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<Ht.length;++Qt)Tt(Ht[Qt],null,Ht[Qt].attributes.map(function(or){return[or.location,or.name]}))},shader:lt,frag:-1,vert:-1}}function N(yt,jt,Yt,br,hr,ut,lt){function xt(Ct){var St;St=jt.next===null?5121:jt.next.colorAttachments[0].texture._texture.type;var _t=0,Ht=0,$t=br.framebufferWidth,Qt=br.framebufferHeight,or=null;return Ee(Ct)?or=Ct:Ct&&(_t=Ct.x|0,Ht=Ct.y|0,$t=(Ct.width||br.framebufferWidth-_t)|0,Qt=(Ct.height||br.framebufferHeight-Ht)|0,or=Ct.data||null),Yt(),Ct=$t*Qt*4,or||(St===5121?or=new Uint8Array(Ct):St===5126&&(or=or||new Float32Array(Ct))),yt.pixelStorei(3333,4),yt.readPixels(_t,Ht,$t,Qt,6408,St,or),or}function Tt(Ct){var St;return jt.setFBO({framebuffer:Ct.framebuffer},function(){St=xt(Ct)}),St}return function(Ct){return Ct&&"framebuffer"in Ct?Tt(Ct):xt(Ct)}}function _(yt){for(var jt=Array(yt.length>>2),br=0;br<jt.length;br++)jt[br]=0;for(br=0;br<8*yt.length;br+=8)jt[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;_t<jt.length;_t+=16){for(Yt=yt[0],hr=yt[1],ut=yt[2],lt=yt[3],xt=yt[4],Tt=yt[5],Ct=yt[6],St=yt[7],Ht=0;64>Ht;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<yt.length;br++)Yt=yt.charCodeAt(br),jt+="0123456789abcdef".charAt(Yt>>>4&15)+"0123456789abcdef".charAt(Yt&15);return jt}function Y(yt){for(var jt="",Yt=-1,br,hr;++Yt<yt.length;)br=yt.charCodeAt(Yt),hr=Yt+1<yt.length?yt.charCodeAt(Yt+1):0,55296<=br&&56319>=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<arguments.length&&(St.push(Ht,"="),St.push.apply(St,ae(arguments)),St.push(";")),Ht},toString:function(){return ce([0<_t.length?"var "+_t.join(",")+";":"",ce(St)])}})}function Yt(){function St(or,Er){Ht(or,Er,"=",_t.def(or,Er),";")}var _t=jt(),Ht=jt(),$t=_t.toString,Qt=Ht.toString;return ie(function(){_t.apply(_t,ae(arguments))},{def:_t.def,entry:_t,exit:Ht,save:St,set:function(or,Er,Ye){St(or,Er),_t(or,Er,"=",Ye,";")},toString:function(){return $t()+Qt()}})}var br=yt&&yt.cache,hr=0,ut=[],lt=[],xt=[],Tt=jt(),Ct={};return{global:Tt,link:function(St,_t){var Ht=_t&&_t.stable;if(!Ht){for(var $t=0;$t<lt.length;++$t)if(lt[$t]===St&&!xt[$t])return ut[$t]}return $t="g"+hr++,ut.push($t),lt.push(St),xt.push(Ht),$t},block:jt,proc:function(St,_t){function Ht(){var Er="a"+$t.length;return $t.push(Er),Er}var $t=[];_t=_t||0;for(var Qt=0;Qt<_t;++Qt)Ht();var Qt=Yt(),or=Qt.toString;return Ct[St]=ie(Qt,{arg:Ht,toString:function(){return ce(["function(",$t.join(),"){",or(),"}"])}})},scope:Yt,cond:function(){var St=ce(arguments),_t=Yt(),Ht=Yt(),$t=_t.toString,Qt=Ht.toString;return ie(_t,{then:function(){return _t.apply(_t,ae(arguments)),this},else:function(){return Ht.apply(Ht,ae(arguments)),this},toString:function(){var or=Qt();return or&&(or="else{"+or+"}"),ce(["if(",St,"){",$t(),"}",or])}})},compile:function(){var St=['"use strict";',Tt,"return {"];Object.keys(Ct).forEach(function($t){St.push('"',$t,'":',Ct[$t].toString(),",")}),St.push("}");var _t=ce(St).replace(/;/g,`;
`).replace(/}/g,`}
`).replace(/{/g,`{
`),Ht;return br&&(Ht=U(_(Y(_t))),br[Ht])?br[Ht].apply(null,lt):(_t=Function.apply(null,ut.concat(_t)),br&&(br[Ht]=_t),_t.apply(null,lt))}}}function Z(yt){return Array.isArray(yt)||Ee(yt)||c(yt)}function j(yt){return yt.sort(function(jt,Yt){return jt==="viewport"?-1:Yt==="viewport"?1:jt<Yt?-1:1})}function K(yt,jt,Yt,br){this.thisDep=yt,this.contextDep=jt,this.propDep=Yt,this.append=br}function ee(yt){return yt&&!(yt.thisDep||yt.contextDep||yt.propDep)}function oe(yt){return new K(!1,!1,!1,yt)}function q(yt,jt){var Yt=yt.type;if(Yt===0)return Yt=yt.data.length,new K(!0,1<=Yt,2<=Yt,jt);if(Yt===4)return Yt=yt.data,new K(Yt.thisDep,Yt.contextDep,Yt.propDep,jt);if(Yt===5)return new K(!1,!1,!1,jt);if(Yt===6){for(var br=Yt=!1,hr=!1,ut=0;ut<yt.data.length;++ut){var lt=yt.data[ut];lt.type===1?hr=!0:lt.type===2?br=!0:lt.type===3?Yt=!0:lt.type===0?(Yt=!0,lt=lt.data,1<=lt&&(br=!0),2<=lt&&(hr=!0)):lt.type===4&&(Yt=Yt||lt.data.thisDep,br=br||lt.data.contextDep,hr=hr||lt.data.propDep)}return new K(Yt,br,hr,jt)}return new K(Yt===3,Yt===2,Yt===1,jt)}function $(yt,jt,Yt,br,hr,ut,lt,xt,Tt,Ct,St,_t,Ht,$t,Qt,or){function Er(Xt){return Xt.replace(".","_")}function Ye(Xt,wr,an){var cn=Er(Xt);En.push(Xt),Un[cn]=gn[cn]=!!an,Cn[cn]=wr}function We(Xt,wr,an){var cn=Er(Xt);En.push(Xt),Array.isArray(an)?(gn[cn]=an.slice(),Un[cn]=an.slice()):gn[cn]=Un[cn]=an,Hn[cn]=wr}function Dt(){var Xt=Q({cache:Qt}),wr=Xt.link,an=Xt.global;Xt.id=Za++,Xt.batchId="0";var cn=wr(aa),hn=Xt.shared={props:"a0"};Object.keys(aa).forEach(function(Cr){hn[Cr]=an.def(cn,".",Cr)});var Ln=Xt.next={},wn=Xt.current={};Object.keys(Hn).forEach(function(Cr){Array.isArray(gn[Cr])&&(Ln[Cr]=an.def(hn.next,".",Cr),wn[Cr]=an.def(hn.current,".",Cr))});var un=Xt.constants={};Object.keys(Pa).forEach(function(Cr){un[Cr]=an.def(JSON.stringify(Pa[Cr]))}),Xt.invoke=function(Cr,zr){switch(zr.type){case 0:var dn=["this",hn.context,hn.props,Xt.batchId];return Cr.def(wr(zr.data),".call(",dn.slice(0,Math.max(zr.data.length+1,4)),")");case 1:return Cr.def(hn.props,zr.data);case 2:return Cr.def(hn.context,zr.data);case 3:return Cr.def("this",zr.data);case 4:return zr.data.append(Xt,Cr),zr.data.ref;case 5:return zr.data.toString();case 6:return zr.data.map(function(_n){return Xt.invoke(Cr,_n)})}},Xt.attribCache={};var Rr={};return Xt.scopeAttrib=function(Cr){if(Cr=jt.id(Cr),Cr in Rr)return Rr[Cr];var zr=Ct.scope[Cr];return zr||(zr=Ct.scope[Cr]=new ta),Rr[Cr]=wr(zr)},Xt}function Ft(Xt){var wr=Xt.static;Xt=Xt.dynamic;var an;if("profile"in wr){var cn=!!wr.profile;an=oe(function(Ln,wn){return cn}),an.enable=cn}else if("profile"in Xt){var hn=Xt.profile;an=q(hn,function(Ln,wn){return Ln.invoke(wn,hn)})}return an}function Zt(Xt,wr){var an=Xt.static,cn=Xt.dynamic;if("framebuffer"in an){var hn=an.framebuffer;return hn?(hn=xt.getFramebuffer(hn),oe(function(wn,un){var Rr=wn.link(hn),Cr=wn.shared;return un.set(Cr.framebuffer,".next",Rr),Cr=Cr.context,un.set(Cr,".framebufferWidth",Rr+".width"),un.set(Cr,".framebufferHeight",Rr+".height"),Rr})):oe(function(wn,un){var Rr=wn.shared;return un.set(Rr.framebuffer,".next","null"),Rr=Rr.context,un.set(Rr,".framebufferWidth",Rr+".drawingBufferWidth"),un.set(Rr,".framebufferHeight",Rr+".drawingBufferHeight"),"null"})}if("framebuffer"in cn){var Ln=cn.framebuffer;return q(Ln,function(wn,un){var zr=wn.invoke(un,Ln),Rr=wn.shared,Cr=Rr.framebuffer,zr=un.def(Cr,".getFramebuffer(",zr,")");return un.set(Cr,".next",zr),Rr=Rr.context,un.set(Rr,".framebufferWidth",zr+"?"+zr+".width:"+Rr+".drawingBufferWidth"),un.set(Rr,".framebufferHeight",zr+"?"+zr+".height:"+Rr+".drawingBufferHeight"),zr})}return null}function nr(Xt,wr,an){function cn(un){if(un in hn){var Rr=hn[un];un=!0;var Cr=Rr.x|0,zr=Rr.y|0,dn,_n;return"width"in Rr?dn=Rr.width|0:un=!1,"height"in Rr?_n=Rr.height|0:un=!1,new K(!un&&wr&&wr.thisDep,!un&&wr&&wr.contextDep,!un&&wr&&wr.propDep,function(yn,On){var $n=yn.shared.context,la=dn;"width"in Rr||(la=On.def($n,".","framebufferWidth","-",Cr));var ia=_n;return"height"in Rr||(ia=On.def($n,".","framebufferHeight","-",zr)),[Cr,zr,la,ia]})}if(un in Ln){var Wn=Ln[un];return un=q(Wn,function(yn,On){var da=yn.invoke(On,Wn),$n=yn.shared.context,la=On.def(da,".x|0"),ia=On.def(da,".y|0"),oa=On.def('"width" in ',da,"?",da,".width|0:","(",$n,".","framebufferWidth","-",la,")"),da=On.def('"height" in ',da,"?",da,".height|0:","(",$n,".","framebufferHeight","-",ia,")");return[la,ia,oa,da]}),wr&&(un.thisDep=un.thisDep||wr.thisDep,un.contextDep=un.contextDep||wr.contextDep,un.propDep=un.propDep||wr.propDep),un}return wr?new K(wr.thisDep,wr.contextDep,wr.propDep,function(yn,On){var $n=yn.shared.context;return[0,0,On.def($n,".","framebufferWidth"),On.def($n,".","framebufferHeight")]}):null}var hn=Xt.static,Ln=Xt.dynamic;if(Xt=cn("viewport")){var wn=Xt;Xt=new K(Xt.thisDep,Xt.contextDep,Xt.propDep,function(un,Rr){var Cr=wn.append(un,Rr),zr=un.shared.context;return Rr.set(zr,".viewportWidth",Cr[2]),Rr.set(zr,".viewportHeight",Cr[3]),Cr})}return{viewport:Xt,scissor_box:cn("scissor.box")}}function lr(Xt,wr){var an=Xt.static;if(typeof an.frag=="string"&&typeof an.vert=="string"){if(0<Object.keys(wr.dynamic).length)return null;var an=wr.static,cn=Object.keys(an);if(0<cn.length&&typeof an[cn[0]]=="number"){for(var hn=[],Ln=0;Ln<cn.length;++Ln)hn.push([an[cn[Ln]]|0,cn[Ln]]);return hn}}return null}function rr(Xt,wr,an){function cn(Cr){if(Cr in hn){var zr=jt.id(hn[Cr]);return Cr=oe(function(){return zr}),Cr.id=zr,Cr}if(Cr in Ln){var dn=Ln[Cr];return q(dn,function(_n,Wn){var yn=_n.invoke(Wn,dn);return Wn.def(_n.shared.strings,".id(",yn,")")})}return null}var hn=Xt.static,Ln=Xt.dynamic,wn=cn("frag"),un=cn("vert"),Rr=null;return ee(wn)&&ee(un)?(Rr=St.program(un.id,wn.id,null,an),Xt=oe(function(Cr,zr){return Cr.link(Rr)})):Xt=new K(wn&&wn.thisDep||un&&un.thisDep,wn&&wn.contextDep||un&&un.contextDep,wn&&wn.propDep||un&&un.propDep,function(Cr,zr){var dn=Cr.shared.shader,_n;_n=wn?wn.append(Cr,zr):zr.def(dn,".","frag");var Wn;return Wn=un?un.append(Cr,zr):zr.def(dn,".","vert"),zr.def(dn+".program("+Wn+","+_n+")")}),{frag:wn,vert:un,progVar:Xt,program:Rr}}function zt(Xt,wr){function an(yn,On){if(yn in cn){var $n=cn[yn]|0;return On?Ln.offset=$n:Ln.instances=$n,oe(function(ia,oa){return On&&(ia.OFFSET=$n),$n})}if(yn in hn){var la=hn[yn];return q(la,function(ia,oa){var da=ia.invoke(oa,la);return On&&(ia.OFFSET=da),da})}if(On){if(Rr)return oe(function(ia,oa){return ia.OFFSET=0});if(wn)return new K(un.thisDep,un.contextDep,un.propDep,function(ia,oa){return oa.def(ia.shared.vao+".currentVAO?"+ia.shared.vao+".currentVAO.offset:0")})}else if(wn)return new K(un.thisDep,un.contextDep,un.propDep,function(ia,oa){return oa.def(ia.shared.vao+".currentVAO?"+ia.shared.vao+".currentVAO.instances:-1")});return null}var cn=Xt.static,hn=Xt.dynamic,Ln={},wn=!1,un=function(){if("vao"in cn){var yn=cn.vao;return yn!==null&&Ct.getVAO(yn)===null&&(yn=Ct.createVAO(yn)),wn=!0,Ln.vao=yn,oe(function($n){var la=Ct.getVAO(yn);return la?$n.link(la):"null"})}if("vao"in hn){wn=!0;var On=hn.vao;return q(On,function($n,la){var ia=$n.invoke(la,On);return la.def($n.shared.vao+".getVAO("+ia+")")})}return null}(),Rr=!1,Cr=function(){if("elements"in cn){var yn=cn.elements;if(Ln.elements=yn,Z(yn)){var On=Ln.elements=ut.create(yn,!0),yn=ut.getElements(On);Rr=!0}else yn&&(yn=ut.getElements(yn),Rr=!0);return On=oe(function(la,ia){if(yn){var oa=la.link(yn);return la.ELEMENTS=oa}return la.ELEMENTS=null}),On.value=yn,On}if("elements"in hn){Rr=!0;var $n=hn.elements;return q($n,function(la,ia){var oa=la.shared,Ki=oa.isBufferArgs,oa=oa.elements,co=la.invoke(ia,$n),da=ia.def("null"),Ki=ia.def(Ki,"(",co,")"),co=la.cond(Ki).then(da,"=",oa,".createStream(",co,");").else(da,"=",oa,".getElements(",co,");");return ia.entry(co),ia.exit(la.cond(Ki).then(oa,".destroyStream(",da,");")),la.ELEMENTS=da})}return wn?new K(un.thisDep,un.contextDep,un.propDep,function(la,ia){return ia.def(la.shared.vao+".currentVAO?"+la.shared.elements+".getElements("+la.shared.vao+".currentVAO.elements):null")}):null}(),zr=an("offset",!0),dn=function(){if("primitive"in cn){var yn=cn.primitive;return Ln.primitive=yn,oe(function($n,la){return $e[yn]})}if("primitive"in hn){var On=hn.primitive;return q(On,function($n,la){var ia=$n.constants.primTypes,oa=$n.invoke(la,On);return la.def(ia,"[",oa,"]")})}return Rr?ee(Cr)?Cr.value?oe(function($n,la){return la.def($n.ELEMENTS,".primType")}):oe(function(){return 4}):new K(Cr.thisDep,Cr.contextDep,Cr.propDep,function($n,la){var ia=$n.ELEMENTS;return la.def(ia,"?",ia,".primType:",4)}):wn?new K(un.thisDep,un.contextDep,un.propDep,function($n,la){return la.def($n.shared.vao+".currentVAO?"+$n.shared.vao+".currentVAO.primitive:4")}):null}(),_n=function(){if("count"in cn){var yn=cn.count|0;return Ln.count=yn,oe(function(){return yn})}if("count"in hn){var On=hn.count;return q(On,function($n,la){return $n.invoke(la,On)})}return Rr?ee(Cr)?Cr?zr?new K(zr.thisDep,zr.contextDep,zr.propDep,function($n,la){return la.def($n.ELEMENTS,".vertCount-",$n.OFFSET)}):oe(function($n,la){return la.def($n.ELEMENTS,".vertCount")}):oe(function(){return-1}):new K(Cr.thisDep||zr.thisDep,Cr.contextDep||zr.contextDep,Cr.propDep||zr.propDep,function($n,la){var ia=$n.ELEMENTS;return $n.OFFSET?la.def(ia,"?",ia,".vertCount-",$n.OFFSET,":-1"):la.def(ia,"?",ia,".vertCount:-1")}):wn?new K(un.thisDep,un.contextDep,un.propDep,function($n,la){return la.def($n.shared.vao,".currentVAO?",$n.shared.vao,".currentVAO.count:-1")}):null}(),Wn=an("instances",!1);return{elements:Cr,primitive:dn,count:_n,instances:Wn,offset:zr,vao:un,vaoActive:wn,elementsActive:Rr,static:Ln}}function fr(Xt,wr){var an=Xt.static,cn=Xt.dynamic,hn={};return En.forEach(function(Ln){function wn(Rr,Cr){if(Ln in an){var zr=Rr(an[Ln]);hn[un]=oe(function(){return zr})}else if(Ln in cn){var dn=cn[Ln];hn[un]=q(dn,function(_n,Wn){return Cr(_n,Wn,_n.invoke(Wn,dn))})}}var un=Er(Ln);switch(Ln){case"cull.enable":case"blend.enable":case"dither":case"stencil.enable":case"depth.enable":case"scissor.enable":case"polygonOffset.enable":case"sample.alpha":case"sample.enable":case"depth.mask":return wn(function(Rr){return Rr},function(Rr,Cr,zr){return zr});case"depth.func":return wn(function(Rr){return Gt[Rr]},function(Rr,Cr,zr){return Cr.def(Rr.constants.compareFuncs,"[",zr,"]")});case"depth.range":return wn(function(Rr){return Rr},function(Rr,Cr,zr){return Rr=Cr.def("+",zr,"[0]"),Cr=Cr.def("+",zr,"[1]"),[Rr,Cr]});case"blend.func":return wn(function(Rr){return[Bt["srcRGB"in Rr?Rr.srcRGB:Rr.src],Bt["dstRGB"in Rr?Rr.dstRGB:Rr.dst],Bt["srcAlpha"in Rr?Rr.srcAlpha:Rr.src],Bt["dstAlpha"in Rr?Rr.dstAlpha:Rr.dst]]},function(Rr,Cr,zr){function dn(On,$n){return Cr.def('"',On,$n,'" in ',zr,"?",zr,".",On,$n,":",zr,".",On)}Rr=Rr.constants.blendFuncs;var _n=dn("src","RGB"),yn=dn("dst","RGB"),_n=Cr.def(Rr,"[",_n,"]"),Wn=Cr.def(Rr,"[",dn("src","Alpha"),"]"),yn=Cr.def(Rr,"[",yn,"]");return Rr=Cr.def(Rr,"[",dn("dst","Alpha"),"]"),[_n,yn,Wn,Rr]});case"blend.equation":return wn(function(Rr){if(typeof Rr=="string")return[ea[Rr],ea[Rr]];if(typeof Rr=="object")return[ea[Rr.rgb],ea[Rr.alpha]]},function(Rr,Cr,zr){var dn=Rr.constants.blendEquations,_n=Cr.def(),Wn=Cr.def();return Rr=Rr.cond("typeof ",zr,'==="string"'),Rr.then(_n,"=",Wn,"=",dn,"[",zr,"];"),Rr.else(_n,"=",dn,"[",zr,".rgb];",Wn,"=",dn,"[",zr,".alpha];"),Cr(Rr),[_n,Wn]});case"blend.color":return wn(function(Rr){return s(4,function(Cr){return+Rr[Cr]})},function(Rr,Cr,zr){return s(4,function(dn){return Cr.def("+",zr,"[",dn,"]")})});case"stencil.mask":return wn(function(Rr){return Rr|0},function(Rr,Cr,zr){return Cr.def(zr,"|0")});case"stencil.func":return wn(function(Rr){return[Gt[Rr.cmp||"keep"],Rr.ref||0,"mask"in Rr?Rr.mask:-1]},function(Rr,Cr,zr){Rr=Cr.def('"cmp" in ',zr,"?",Rr.constants.compareFuncs,"[",zr,".cmp]",":",7680);var dn=Cr.def(zr,".ref|0");return Cr=Cr.def('"mask" in ',zr,"?",zr,".mask|0:-1"),[Rr,dn,Cr]});case"stencil.opFront":case"stencil.opBack":return wn(function(Rr){return[Ln==="stencil.opBack"?1029:1028,Lt[Rr.fail||"keep"],Lt[Rr.zfail||"keep"],Lt[Rr.zpass||"keep"]]},function(Rr,Cr,zr){function dn(Wn){return Cr.def('"',Wn,'" in ',zr,"?",_n,"[",zr,".",Wn,"]:",7680)}var _n=Rr.constants.stencilOps;return[Ln==="stencil.opBack"?1029:1028,dn("fail"),dn("zfail"),dn("zpass")]});case"polygonOffset.offset":return wn(function(Rr){return[Rr.factor|0,Rr.units|0]},function(Rr,Cr,zr){return Rr=Cr.def(zr,".factor|0"),Cr=Cr.def(zr,".units|0"),[Rr,Cr]});case"cull.face":return wn(function(Rr){var Cr=0;return Rr==="front"?Cr=1028:Rr==="back"&&(Cr=1029),Cr},function(Rr,Cr,zr){return Cr.def(zr,'==="front"?',1028,":",1029)});case"lineWidth":return wn(function(Rr){return Rr},function(Rr,Cr,zr){return zr});case"frontFace":return wn(function(Rr){return Kt[Rr]},function(Rr,Cr,zr){return Cr.def(zr+'==="cw"?2304:2305')});case"colorMask":return wn(function(Rr){return Rr.map(function(Cr){return!!Cr})},function(Rr,Cr,zr){return s(4,function(dn){return"!!"+zr+"["+dn+"]"})});case"sample.coverage":return wn(function(Rr){return["value"in Rr?Rr.value:1,!!Rr.invert]},function(Rr,Cr,zr){return Rr=Cr.def('"value" in ',zr,"?+",zr,".value:1"),Cr=Cr.def("!!",zr,".invert"),[Rr,Cr]})}}),hn}function dr(Xt,wr){var an=Xt.static,cn=Xt.dynamic,hn={};return Object.keys(an).forEach(function(Ln){var wn=an[Ln],un;if(typeof wn=="number"||typeof wn=="boolean")un=oe(function(){return wn});else if(typeof wn=="function"){var Rr=wn._reglType;Rr==="texture2d"||Rr==="textureCube"?un=oe(function(Cr){return Cr.link(wn)}):(Rr==="framebuffer"||Rr==="framebufferCube")&&(un=oe(function(Cr){return Cr.link(wn.color[0])}))}else T(wn)&&(un=oe(function(Cr){return Cr.global.def("[",s(wn.length,function(zr){return wn[zr]}),"]")}));un.value=wn,hn[Ln]=un}),Object.keys(cn).forEach(function(Ln){var wn=cn[Ln];hn[Ln]=q(wn,function(un,Rr){return un.invoke(Rr,wn)})}),hn}function pr(Xt,wr){var an=Xt.static,cn=Xt.dynamic,hn={};return Object.keys(an).forEach(function(Ln){var wn=an[Ln],un=jt.id(Ln),Rr=new ta;if(Z(wn))Rr.state=1,Rr.buffer=hr.getBuffer(hr.create(wn,34962,!1,!0)),Rr.type=0;else{var Cr=hr.getBuffer(wn);if(Cr)Rr.state=1,Rr.buffer=Cr,Rr.type=0;else if("constant"in wn){var zr=wn.constant;Rr.buffer="null",Rr.state=2,typeof zr=="number"?Rr.x=zr:wt.forEach(function($n,la){la<zr.length&&(Rr[$n]=zr[la])})}else{var Cr=Z(wn.buffer)?hr.getBuffer(hr.create(wn.buffer,34962,!1,!0)):hr.getBuffer(wn.buffer),dn=wn.offset|0,_n=wn.stride|0,Wn=wn.size|0,yn=!!wn.normalized,On=0;"type"in wn&&(On=He[wn.type]),wn=wn.divisor|0,Rr.buffer=Cr,Rr.state=1,Rr.size=Wn,Rr.normalized=yn,Rr.type=On||Cr.dtype,Rr.offset=dn,Rr.stride=_n,Rr.divisor=wn}}hn[Ln]=oe(function($n,la){var ia=$n.attribCache;if(un in ia)return ia[un];var oa={isStream:!1};return Object.keys(Rr).forEach(function(da){oa[da]=Rr[da]}),Rr.buffer&&(oa.buffer=$n.link(Rr.buffer),oa.type=oa.type||oa.buffer+".dtype"),ia[un]=oa})}),Object.keys(cn).forEach(function(Ln){var wn=cn[Ln];hn[Ln]=q(wn,function(un,Rr){function Cr(ia){Rr(yn[ia],"=",zr,".",ia,"|0;")}var zr=un.invoke(Rr,wn),Wn=un.shared,dn=un.constants,_n=Wn.isBufferArgs,Wn=Wn.buffer,yn={isStream:Rr.def(!1)},On=new ta;On.state=1,Object.keys(On).forEach(function(ia){yn[ia]=Rr.def(""+On[ia])});var $n=yn.buffer,la=yn.type;return Rr("if(",_n,"(",zr,")){",yn.isStream,"=true;",$n,"=",Wn,".createStream(",34962,",",zr,");",la,"=",$n,".dtype;","}else{",$n,"=",Wn,".getBuffer(",zr,");","if(",$n,"){",la,"=",$n,".dtype;",'}else if("constant" in ',zr,"){",yn.state,"=",2,";","if(typeof "+zr+'.constant === "number"){',yn[wt[0]],"=",zr,".constant;",wt.slice(1).map(function(ia){return yn[ia]}).join("="),"=0;","}else{",wt.map(function(ia,oa){return yn[ia]+"="+zr+".constant.length>"+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<Object.keys(Cr).length,_n={framebuffer:_n,draw:Rr,shader:zr,state:Cr,dirty:dn,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(_n.profile=Ft(Xt),_n.uniforms=dr(an),_n.drawVAO=_n.scopeVAO=Rr.vao,!_n.drawVAO&&zr.program&&!wn&&Yt.angle_instanced_arrays&&Rr.static.elements){var Wn=!0;if(Xt=zr.program.attributes.map(function(On){return On=wr.static[On],Wn=Wn&&!!On,On}),Wn&&0<Xt.length){var yn=Ct.getVAO(Ct.createVAO({attributes:Xt,elements:Rr.static.elements}));_n.drawVAO=new K(null,null,null,function(On,$n){return On.link(yn)}),_n.useVAO=!0}}return wn?_n.useVAO=!0:_n.attributes=pr(wr),_n.context=vr(cn),_n}function Ir(Xt,wr,an){var cn=Xt.shared.context,hn=Xt.scope();Object.keys(an).forEach(function(Ln){wr.save(cn,"."+Ln);var wn=an[Ln].append(Xt,wr);Array.isArray(wn)?hn(cn,".",Ln,"=[",wn.join(),"];"):hn(cn,".",Ln,"=",wn,";")}),wr(hn)}function kr(Xt,wr,an,cn){var un=Xt.shared,hn=un.gl,Ln=un.framebuffer,wn;on&&(wn=wr.def(un.extensions,".webgl_draw_buffers"));var Rr=Xt.constants,un=Rr.drawBuffer,Rr=Rr.backBuffer;Xt=an?an.append(Xt,wr):wr.def(Ln,".next"),cn||wr("if(",Xt,"!==",Ln,".cur){"),wr("if(",Xt,"){",hn,".bindFramebuffer(",36160,",",Xt,".framebuffer);"),on&&wr(wn,".drawBuffersWEBGL(",un,"[",Xt,".colorAttachments.length]);"),wr("}else{",hn,".bindFramebuffer(",36160,",null);"),on&&wr(wn,".drawBuffersWEBGL(",Rr,");"),wr("}",Ln,".cur=",Xt,";"),cn||wr("}")}function pn(Xt,wr,an){var cn=Xt.shared,hn=cn.gl,Ln=Xt.current,wn=Xt.next,un=cn.current,Rr=cn.next,Cr=Xt.cond(un,".dirty");En.forEach(function(zr){if(zr=Er(zr),!(zr in an.state)){var dn,_n;if(zr in wn){dn=wn[zr],_n=Ln[zr];var Wn=s(gn[zr].length,function(yn){return Cr.def(dn,"[",yn,"]")});Cr(Xt.cond(Wn.map(function(yn,On){return yn+"!=="+_n+"["+On+"]"}).join("||")).then(hn,".",Hn[zr],"(",Wn,");",Wn.map(function(yn,On){return _n+"["+On+"]="+yn}).join(";"),";"))}else dn=Cr.def(Rr,".",zr),Wn=Xt.cond(dn,"!==",un,".",zr),Cr(Wn),zr in Cn?Wn(Xt.cond(dn).then(hn,".enable(",Cn[zr],");").else(hn,".disable(",Cn[zr],");"),un,".",zr,"=",dn,";"):Wn(hn,".",Hn[zr],"(",dn,");",un,".",zr,"=",dn,";")}}),Object.keys(an.state).length===0&&Cr(un,".dirty=false;"),wr(Cr)}function jr(Xt,wr,an,cn){var hn=Xt.shared,Ln=Xt.current,wn=hn.current,un=hn.gl,Rr;j(Object.keys(an)).forEach(function(Cr){var zr=an[Cr];if(!cn||cn(zr)){var dn=zr.append(Xt,wr);if(Cn[Cr]){var _n=Cn[Cr];ee(zr)?(Rr=Xt.link(dn,{stable:!0}),wr(Xt.cond(Rr).then(un,".enable(",_n,");").else(un,".disable(",_n,");")),wr(wn,".",Cr,"=",Rr,";")):(wr(Xt.cond(dn).then(un,".enable(",_n,");").else(un,".disable(",_n,");")),wr(wn,".",Cr,"=",dn,";"))}else if(T(dn)){var Wn=Ln[Cr];wr(un,".",Hn[Cr],"(",dn,");",dn.map(function(yn,On){return Wn+"["+On+"]="+yn}).join(";"),";")}else ee(zr)?(Rr=Xt.link(dn,{stable:!0}),wr(un,".",Hn[Cr],"(",Rr,");",wn,".",Cr,"=",Rr,";")):wr(un,".",Hn[Cr],"(",dn,");",wn,".",Cr,"=",dn,";")}})}function In(Xt,wr){Mr&&(Xt.instancing=wr.def(Xt.shared.extensions,".angle_instanced_arrays"))}function Dn(Xt,wr,an,cn,hn){function Ln(){return typeof performance>"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<cn.length;++Cr){var Wn=cn[Cr],zr=Wn.name,dn=Wn.info.type,_n=an.uniforms[zr],Wn=Xt.link(Wn)+".location",yn;if(_n){if(!hn(_n))continue;if(ee(_n)){if(zr=_n.value,dn===35678||dn===35680)dn=Xt.link(zr._texture||zr.color[0]._texture),wr(un,".uniform1i(",Wn,",",dn+".bind());"),wr.exit(dn,".unbind();");else if(dn===35674||dn===35675||dn===35676)zr=Xt.global.def("new Float32Array(["+Array.prototype.slice.call(zr)+"])"),_n=2,dn===35675?_n=3:dn===35676&&(_n=4),wr(un,".uniformMatrix",_n,"fv(",Wn,",false,",zr,");");else{switch(dn){case 5126:Rr="1f";break;case 35664:Rr="2f";break;case 35665:Rr="3f";break;case 35666:Rr="4f";break;case 35670:Rr="1i";break;case 5124:Rr="1i";break;case 35671:Rr="2i";break;case 35667:Rr="2i";break;case 35672:Rr="3i";break;case 35668:Rr="3i";break;case 35673:Rr="4i";break;case 35669:Rr="4i"}wr(un,".uniform",Rr,"(",Wn,",",T(zr)?Array.prototype.slice.call(zr):zr,");")}continue}else yn=_n.append(Xt,wr)}else{if(!hn(ir))continue;yn=wr.def(wn.uniforms,"[",jt.id(zr),"]")}switch(dn===35678?wr("if(",yn,"&&",yn,'._reglType==="framebuffer"){',yn,"=",yn,".color[0];","}"):dn===35680&&wr("if(",yn,"&&",yn,'._reglType==="framebufferCube"){',yn,"=",yn,".color[0];","}"),zr=1,dn){case 35678:case 35680:dn=wr.def(yn,"._texture"),wr(un,".uniform1i(",Wn,",",dn,".bind());"),wr.exit(dn,".unbind();");continue;case 5124:case 35670:Rr="1i";break;case 35667:case 35671:Rr="2i",zr=2;break;case 35668:case 35672:Rr="3i",zr=3;break;case 35669:case 35673:Rr="4i",zr=4;break;case 5126:Rr="1f";break;case 35664:Rr="2f",zr=2;break;case 35665:Rr="3f",zr=3;break;case 35666:Rr="4f",zr=4;break;case 35674:Rr="Matrix2fv";break;case 35675:Rr="Matrix3fv";break;case 35676:Rr="Matrix4fv"}if(Rr.charAt(0)==="M"){wr(un,".uniform",Rr,"(",Wn,",");var Wn=Math.pow(dn-35674+2,2),On=Xt.global.def("new Float32Array(",Wn,")");Array.isArray(yn)?wr("false,(",s(Wn,function(ia){return On+"["+ia+"]="+yn[ia]}),",",On,")"):wr("false,(Array.isArray(",yn,")||",yn," instanceof Float32Array)?",yn,":(",s(Wn,function(ia){return On+"["+ia+"]="+yn+"["+ia+"]"}),",",On,")"),wr(");")}else{if(1<zr){for(var dn=[],$n=[],_n=0;_n<zr;++_n)Array.isArray(yn)?$n.push(yn[_n]):$n.push(wr.def(yn+"["+_n+"]")),Ln&&dn.push(wr.def());Ln&&wr("if(!",Xt.batchId,"||",dn.map(function(la,ia){return la+"!=="+$n[ia]}).join("||"),"){",dn.map(function(la,ia){return la+"="+$n[ia]+";"}).join("")),wr(un,".uniform",Rr,"(",Wn,",",$n.join(","),");")}else Ln&&(dn=wr.def(),wr("if(!",Xt.batchId,"||",dn,"!==",yn,"){",dn,"=",yn,";")),wr(un,".uniform",Rr,"(",Wn,",",yn,");");Ln&&wr("}")}}}function Or(Xt,wr,an,cn){function hn(oa){var da=zr[oa];return da?da.contextDep&&cn.contextDynamic||da.propDep?da.append(Xt,an):da.append(Xt,wr):wr.def(Cr,".",oa)}function Ln(){function oa(){an($n,".drawElementsInstancedANGLE(",[_n,yn,la,Wn+"<<(("+la+"-5121)>>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<Object.keys(wr.state).length&&an(Xt.shared.current,".dirty=true;"),Xt.shared.vao&&an(Xt.shared.vao,".setVAO(null);")}function fn(Xt,wr,an,cn){function hn(){return!0}Xt.batchId="a1",In(Xt,wr),xr(Xt,wr,an,cn.attributes,hn),Ar(Xt,wr,an,cn.uniforms,hn,!1),Or(Xt,wr,wr,an)}function Tn(Xt,wr,an,cn){function hn(dn){return dn.contextDep&&wn||dn.propDep}function Ln(dn){return!hn(dn)}In(Xt,wr);var wn=an.contextDep,un=wr.def(),Rr=wr.def();Xt.shared.props=Rr,Xt.batchId=un;var Cr=Xt.scope(),zr=Xt.scope();wr(Cr.entry,"for(",un,"=0;",un,"<","a1",";++",un,"){",Rr,"=","a0","[",un,"];",zr,"}",Cr.exit),an.needsContext&&Ir(Xt,zr,an.context),an.needsFramebuffer&&kr(Xt,zr,an.framebuffer),jr(Xt,zr,an.state,hn),an.profile&&hn(an.profile)&&Dn(Xt,zr,an,!1,!0),cn?(an.useVAO?an.drawVAO?hn(an.drawVAO)?zr(Xt.shared.vao,".setVAO(",an.drawVAO.append(Xt,zr),");"):Cr(Xt.shared.vao,".setVAO(",an.drawVAO.append(Xt,Cr),");"):Cr(Xt.shared.vao,".setVAO(",Xt.shared.vao,".targetVAO);"):(Cr(Xt.shared.vao,".setVAO(null);"),xr(Xt,Cr,an,cn.attributes,Ln),xr(Xt,zr,an,cn.attributes,hn)),Ar(Xt,Cr,an,cn.uniforms,Ln,!1),Ar(Xt,zr,an,cn.uniforms,hn,!0),Or(Xt,Cr,zr,an)):(wr=Xt.global.def("{}"),cn=an.shader.progVar.append(Xt,zr),Rr=zr.def(cn,".id"),Cr=zr.def(wr,"[",Rr,"]"),zr(Xt.shared.gl,".useProgram(",cn,".program);","if(!",Cr,"){",Cr,"=",wr,"[",Rr,"]=",Xt.link(function(dn){return Nr(fn,Xt,an,dn,2)}),"(",cn,");}",Cr,".call(this,a0[",un,"],",un,");"))}function Pn(Xt,wr){function an(Cr){return Cr.contextDep&&hn||Cr.propDep}var cn=Xt.proc("batch",2);Xt.batchId="0",In(Xt,cn);var hn=!1,Ln=!0;Object.keys(wr.context).forEach(function(Cr){hn=hn||wr.context[Cr].propDep}),hn||(Ir(Xt,cn,wr.context),Ln=!1);var wn=wr.framebuffer,un=!1;if(wn?(wn.propDep?hn=un=!0:wn.contextDep&&hn&&(un=!0),un||kr(Xt,cn,wn)):kr(Xt,cn,null),wr.state.viewport&&wr.state.viewport.propDep&&(hn=!0),pn(Xt,cn,wr),jr(Xt,cn,wr.state,function(Cr){return!an(Cr)}),wr.profile&&an(wr.profile)||Dn(Xt,cn,wr,!1,"a1"),wr.contextDep=hn,wr.needsContext=Ln,wr.needsFramebuffer=un,Ln=wr.shader.progVar,Ln.contextDep&&hn||Ln.propDep)Tn(Xt,cn,wr,null);else if(Ln=Ln.append(Xt,cn),cn(Xt.shared.gl,".useProgram(",Ln,".program);"),wr.shader.program)Tn(Xt,cn,wr,wr.shader.program);else{cn(Xt.shared.vao,".setVAO(null);");var wn=Xt.global.def("{}"),un=cn.def(Ln,".id"),Rr=cn.def(wn,"[",un,"]");cn(Xt.cond(Rr).then(Rr,".call(this,a0,a1);").else(Rr,"=",wn,"[",un,"]=",Xt.link(function(dn){return Nr(Tn,Xt,wr,dn,2)}),"(",Ln,");",Rr,".call(this,a0,a1);"))}0<Object.keys(wr.state).length&&cn(Xt.shared.current,".dirty=true;"),Xt.shared.vao&&cn(Xt.shared.vao,".setVAO(null);")}function jn(Xt,wr){function an(un){var Rr=wr.shader[un];Rr&&(Rr=Rr.append(Xt,cn),isNaN(Rr)?cn.set(hn.shader,"."+un,Rr):cn.set(hn.shader,"."+un,Xt.link(Rr,{stable:!0})))}var cn=Xt.proc("scope",3);Xt.batchId="a2";var hn=Xt.shared,Ln=hn.current;if(Ir(Xt,cn,wr.context),wr.framebuffer&&wr.framebuffer.append(Xt,cn),j(Object.keys(wr.state)).forEach(function(un){var Rr=wr.state[un],Cr=Rr.append(Xt,cn);T(Cr)?Cr.forEach(function(zr,dn){isNaN(zr)?cn.set(Xt.next[un],"["+dn+"]",zr):cn.set(Xt.next[un],"["+dn+"]",Xt.link(zr,{stable:!0}))}):ee(Rr)?cn.set(hn.next,"."+un,Xt.link(Cr,{stable:!0})):cn.set(hn.next,"."+un,Cr)}),Dn(Xt,cn,wr,!0,!0),["elements","offset","count","instances","primitive"].forEach(function(un){var Rr=wr.draw[un];Rr&&(Rr=Rr.append(Xt,cn),isNaN(Rr)?cn.set(hn.draw,"."+un,Rr):cn.set(hn.draw,"."+un,Xt.link(Rr),{stable:!0}))}),Object.keys(wr.uniforms).forEach(function(un){var Rr=wr.uniforms[un].append(Xt,cn);Array.isArray(Rr)&&(Rr="["+Rr.map(function(Cr){return isNaN(Cr)?Cr:Xt.link(Cr,{stable:!0})})+"]"),cn.set(hn.uniforms,"["+Xt.link(jt.id(un),{stable:!0})+"]",Rr)}),Object.keys(wr.attributes).forEach(function(un){var Rr=wr.attributes[un].append(Xt,cn),Cr=Xt.scopeAttrib(un);Object.keys(new ta).forEach(function(zr){cn.set(Cr,"."+zr,Rr[zr])})}),wr.scopeVAO){var wn=wr.scopeVAO.append(Xt,cn);isNaN(wn)?cn.set(hn.vao,".targetVAO",wn):cn.set(hn.vao,".targetVAO",Xt.link(wn,{stable:!0}))}an("vert"),an("frag"),0<Object.keys(wr.state).length&&(cn(Ln,".dirty=true;"),cn.exit(Ln,".dirty=true;")),cn("a1(",Xt.shared.context,",a0,",Xt.batchId,");")}function qn(Xt){if(typeof Xt=="object"&&!T(Xt)){for(var wr=Object.keys(Xt),an=0;an<wr.length;++an)if(me.isDynamic(Xt[wr[an]]))return!0;return!1}}function sa(Xt,wr,an){function cn(dn,_n){wn.forEach(function(Wn){var yn=hn[Wn];me.isDynamic(yn)&&(yn=dn.invoke(_n,yn),_n(zr,".",Wn,"=",yn,";"))})}var hn=wr.static[an];if(hn&&qn(hn)){var Ln=Xt.global,wn=Object.keys(hn),un=!1,Rr=!1,Cr=!1,zr=Xt.global.def("{}");wn.forEach(function(dn){var _n=hn[dn];if(me.isDynamic(_n))typeof _n=="function"&&(_n=hn[dn]=me.unbox(_n)),dn=q(_n,null),un=un||dn.thisDep,Cr=Cr||dn.propDep,Rr=Rr||dn.contextDep;else{switch(Ln(zr,".",dn,"="),typeof _n){case"number":Ln(_n);break;case"string":Ln('"',_n,'"');break;case"object":Array.isArray(_n)&&Ln("[",_n.join(),"]");break;default:Ln(Xt.link(_n))}Ln(";")}}),wr.dynamic[an]=new me.DynamicVariable(4,{thisDep:un,contextDep:Rr,propDep:Cr,ref:zr,append:cn}),delete wr.static[an]}}var ta=Ct.Record,ea={add:32774,subtract:32778,"reverse subtract":32779};Yt.ext_blend_minmax&&(ea.min=32775,ea.max=32776);var Mr=Yt.angle_instanced_arrays,on=Yt.webgl_draw_buffers,nn=Yt.oes_vertex_array_object,gn={dirty:!0,profile:or.profile},Un={},En=[],Cn={},Hn={};Ye("dither",3024),Ye("blend.enable",3042),We("blend.color","blendColor",[0,0,0,0]),We("blend.equation","blendEquationSeparate",[32774,32774]),We("blend.func","blendFuncSeparate",[1,0,1,0]),Ye("depth.enable",2929,!0),We("depth.func","depthFunc",513),We("depth.range","depthRange",[0,1]),We("depth.mask","depthMask",!0),We("colorMask","colorMask",[!0,!0,!0,!0]),Ye("cull.enable",2884),We("cull.face","cullFace",1029),We("frontFace","frontFace",2305),We("lineWidth","lineWidth",1),Ye("polygonOffset.enable",32823),We("polygonOffset.offset","polygonOffset",[0,0]),Ye("sample.alpha",32926),Ye("sample.enable",32928),We("sample.coverage","sampleCoverage",[1,!1]),Ye("stencil.enable",2960),We("stencil.mask","stencilMask",-1),We("stencil.func","stencilFunc",[519,0,-1]),We("stencil.opFront","stencilOpSeparate",[1028,7680,7680,7680]),We("stencil.opBack","stencilOpSeparate",[1029,7680,7680,7680]),Ye("scissor.enable",3089),We("scissor.box","scissor",[0,0,yt.drawingBufferWidth,yt.drawingBufferHeight]),We("viewport","viewport",[0,0,yt.drawingBufferWidth,yt.drawingBufferHeight]);var aa={gl:yt,context:Ht,strings:jt,next:Un,current:gn,draw:_t,elements:ut,buffer:hr,shader:St,attributes:Ct.state,vao:Ct,uniforms:Tt,framebuffer:xt,extensions:Yt,timer:$t,isBufferArgs:Z},Pa={primTypes:$e,compareFuncs:Gt,blendFuncs:Bt,blendEquations:ea,stencilOps:Lt,glTypes:He,orientationType:Kt};on&&(Pa.backBuffer=[1029],Pa.drawBuffer=s(br.maxDrawbuffers,function(Xt){return Xt===0?[0]:s(Xt,function(wr){return 36064+wr})}));var Za=0;return{next:Un,current:gn,procs:function(){var Xt=Dt(),wr=Xt.proc("poll"),an=Xt.proc("refresh"),cn=Xt.block();wr(cn),an(cn);var Rr=Xt.shared,hn=Rr.gl,Ln=Rr.next,wn=Rr.current;cn(wn,".dirty=false;"),kr(Xt,wr),kr(Xt,an,null,!0);var un;Mr&&(un=Xt.link(Mr)),Yt.oes_vertex_array_object&&an(Xt.link(Yt.oes_vertex_array_object),".bindVertexArrayOES(null);");var Rr=an.def(Rr.attributes),Cr=an.def(0),zr=Xt.cond(Cr,".buffer");zr.then(hn,".enableVertexAttribArray(i);",hn,".bindBuffer(",34962,",",Cr,".buffer.buffer);",hn,".vertexAttribPointer(i,",Cr,".size,",Cr,".type,",Cr,".normalized,",Cr,".stride,",Cr,".offset);").else(hn,".disableVertexAttribArray(i);",hn,".vertexAttrib4f(i,",Cr,".x,",Cr,".y,",Cr,".z,",Cr,".w);",Cr,".buffer=null;");var dn=Xt.link(br.maxAttributes,{stable:!0});return an("for(var i=0;i<",dn,";++i){",Cr,"=",Rr,"[i];",zr,"}"),Mr&&an("for(var i=0;i<",dn,";++i){",un,".vertexAttribDivisorANGLE(i,",Rr,"[i].divisor);","}"),an(Xt.shared.vao,".currentVAO=null;",Xt.shared.vao,".setVAO(",Xt.shared.vao,".targetVAO);"),Object.keys(Cn).forEach(function(_n){var Wn=Cn[_n],yn=cn.def(Ln,".",_n),On=Xt.block();On("if(",yn,"){",hn,".enable(",Wn,")}else{",hn,".disable(",Wn,")}",wn,".",_n,"=",yn,";"),an(On),wr("if(",yn,"!==",wn,".",_n,"){",On,"}")}),Object.keys(Hn).forEach(function(_n){var Wn=Hn[_n],yn=gn[_n],On,$n,la=Xt.block();la(hn,".",Wn,"("),T(yn)?(Wn=yn.length,On=Xt.global.def(Ln,".",_n),$n=Xt.global.def(wn,".",_n),la(s(Wn,function(ia){return On+"["+ia+"]"}),");",s(Wn,function(ia){return $n+"["+ia+"]="+On+"["+ia+"];"}).join("")),wr("if(",s(Wn,function(ia){return On+"["+ia+"]!=="+$n+"["+ia+"]"}).join("||"),"){",la,"}")):(On=cn.def(Ln,".",_n),$n=cn.def(wn,".",_n),la(On,");",wn,".",_n,"=",On,";"),wr("if(",On,"!==",$n,"){",la,"}")),an(la)}),Xt.compile()}(),compile:function(Xt,wr,an,cn,hn){var Ln=Dt();Ln.stats=Ln.link(hn),Object.keys(wr.static).forEach(function(un){sa(Ln,wr,un)}),It.forEach(function(un){sa(Ln,Xt,un)});var wn=Hr(Xt,wr,an,cn,Ln);return wn.shader.program&&(wn.shader.program.attributes.sort(function(un,Rr){return un.name<Rr.name?-1:1}),wn.shader.program.uniforms.sort(function(un,Rr){return un.name<Rr.name?-1:1})),vn(Ln,wn),jn(Ln,wn),Pn(Ln,wn),ie(Ln.compile(),{destroy:function(){wn.shader.program.destroy()}})}}}function le(yt,jt){for(var Yt=0;Yt<yt.length;++Yt)if(yt[Yt]===jt)return Yt;return-1}var ie=function(yt,jt){for(var Yt=Object.keys(jt),br=0;br<Yt.length;++br)yt[Yt[br]]=jt[Yt[br]];return yt},he=0,me={DynamicVariable:V,define:function(yt,jt){return new V(yt,m(jt+""))},isDynamic:function(yt){return typeof yt=="function"&&!yt._reglType||yt instanceof V},unbox:P,accessor:m},Me={next:typeof requestAnimationFrame=="function"?function(yt){return requestAnimationFrame(yt)}:function(yt){return setTimeout(yt,16)},cancel:typeof cancelAnimationFrame=="function"?function(yt){return cancelAnimationFrame(yt)}:clearTimeout},Te=typeof performance<"u"&&performance.now?function(){return performance.now()}:function(){return+new Date},Oe=l();Oe.zero=l();var Ne=function(yt,jt){var Yt=1;jt.ext_texture_filter_anisotropic&&(Yt=yt.getParameter(34047));var br=1,hr=1;jt.webgl_draw_buffers&&(br=yt.getParameter(34852),hr=yt.getParameter(36063));var ut=!!jt.oes_texture_float;if(ut){ut=yt.createTexture(),yt.bindTexture(3553,ut),yt.texImage2D(3553,0,6408,1,1,0,6408,5126,null);var lt=yt.createFramebuffer();if(yt.bindFramebuffer(36160,lt),yt.framebufferTexture2D(36160,36064,3553,ut,0),yt.bindTexture(3553,null),yt.checkFramebufferStatus(36160)!==36053)ut=!1;else{yt.viewport(0,0,1,1),yt.clearColor(1,0,0,1),yt.clear(16384);var xt=Oe.allocType(5126,4);yt.readPixels(0,0,1,1,6408,5126,xt),yt.getError()?ut=!1:(yt.deleteFramebuffer(lt),yt.deleteTexture(ut),ut=xt[0]===1),Oe.freeType(xt)}}return xt=!0,typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent))||(xt=yt.createTexture(),lt=Oe.allocType(5121,36),yt.activeTexture(33984),yt.bindTexture(34067,xt),yt.texImage2D(34069,0,6408,3,3,0,6408,5121,lt),Oe.freeType(lt),yt.bindTexture(34067,null),yt.deleteTexture(xt),xt=!yt.getError()),{colorBits:[yt.getParameter(3410),yt.getParameter(3411),yt.getParameter(3412),yt.getParameter(3413)],depthBits:yt.getParameter(3414),stencilBits:yt.getParameter(3415),subpixelBits:yt.getParameter(3408),extensions:Object.keys(jt).filter(function(Tt){return!!jt[Tt]}),maxAnisotropic:Yt,maxDrawbuffers:br,maxColorAttachments:hr,pointSizeDims:yt.getParameter(33901),lineWidthDims:yt.getParameter(33902),maxViewportDims:yt.getParameter(3386),maxCombinedTextureUnits:yt.getParameter(35661),maxCubeMapSize:yt.getParameter(34076),maxRenderbufferSize:yt.getParameter(34024),maxTextureUnits:yt.getParameter(34930),maxTextureSize:yt.getParameter(3379),maxAttributes:yt.getParameter(34921),maxVertexUniforms:yt.getParameter(36347),maxVertexTextureUnits:yt.getParameter(35660),maxVaryingVectors:yt.getParameter(36348),maxFragmentUniforms:yt.getParameter(36349),glsl:yt.getParameter(35724),renderer:yt.getParameter(7937),vendor:yt.getParameter(7936),version:yt.getParameter(7938),readFloat:ut,npotTextureCube:xt}},Ee=function(yt){return yt instanceof Uint8Array||yt instanceof Uint16Array||yt instanceof Uint32Array||yt instanceof Int8Array||yt instanceof Int16Array||yt instanceof Int32Array||yt instanceof Float32Array||yt instanceof Float64Array||yt instanceof Uint8ClampedArray},xe=function(yt){return Object.keys(yt).map(function(jt){return yt[jt]})},Se={shape:function(yt){for(var jt=[];yt.length;yt=yt[0])jt.push(yt.length);return jt},flatten:function(yt,jt,Yt,br){var hr=1;if(jt.length)for(var ut=0;ut<jt.length;++ut)hr*=jt[ut];else hr=0;switch(Yt=br||Oe.allocType(Yt,hr),jt.length){case 0:break;case 1:for(br=jt[0],jt=0;jt<br;++jt)Yt[jt]=yt[jt];break;case 2:for(br=jt[0],jt=jt[1],ut=hr=0;ut<br;++ut)for(var lt=yt[ut],xt=0;xt<jt;++xt)Yt[hr++]=lt[xt];break;case 3:u(yt,jt[0],jt[1],jt[2],Yt,0);break;default:g(yt,jt,0,Yt,0)}return Yt}},Ue={"[object Int8Array]":5120,"[object Int16Array]":5122,"[object Int32Array]":5124,"[object Uint8Array]":5121,"[object Uint8ClampedArray]":5121,"[object Uint16Array]":5123,"[object Uint32Array]":5125,"[object Float32Array]":5126,"[object Float64Array]":5121,"[object ArrayBuffer]":5121},He={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},Fe={dynamic:35048,stream:35040,static:35044},Ge=Se.flatten,nt=Se.shape,qe=[];qe[5120]=1,qe[5122]=2,qe[5124]=4,qe[5121]=1,qe[5123]=2,qe[5125]=4,qe[5126]=4;var $e={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},et=new Float32Array(1),ct=new Uint32Array(et.buffer),dt=[9984,9986,9985,9987],pt=[0,6409,6410,6407,6408],At={};At[6409]=At[6406]=At[6402]=1,At[34041]=At[6410]=2,At[6407]=At[35904]=3,At[6408]=At[35906]=4;var Mt=C("HTMLCanvasElement"),Vt=C("OffscreenCanvas"),Je=C("CanvasRenderingContext2D"),De=C("ImageBitmap"),Ie=C("HTMLImageElement"),ze=C("HTMLVideoElement"),Pe=Object.keys(Ue).concat([Mt,Vt,Je,De,Ie,ze]),be=[];be[5121]=1,be[5126]=4,be[36193]=2,be[5123]=2,be[5125]=4;var se=[];se[32854]=2,se[32855]=2,se[36194]=2,se[34041]=4,se[33776]=.5,se[33777]=.5,se[33778]=1,se[33779]=1,se[35986]=.5,se[35987]=1,se[34798]=1,se[35840]=.5,se[35841]=.25,se[35842]=.5,se[35843]=.25,se[36196]=.5;var ye=[];ye[32854]=2,ye[32855]=2,ye[36194]=2,ye[33189]=2,ye[36168]=1,ye[34041]=4,ye[35907]=4,ye[34836]=16,ye[34842]=8,ye[34843]=6;var Le=function(yt,jt,Yt,br,hr){function ut(_t){this.id=Ct++,this.refCount=1,this.renderbuffer=_t,this.format=32854,this.height=this.width=0,hr.profile&&(this.stats={size:0})}function lt(_t){var Ht=_t.renderbuffer;yt.bindRenderbuffer(36161,null),yt.deleteRenderbuffer(Ht),_t.renderbuffer=null,_t.refCount=0,delete St[_t.id],br.renderbufferCount--}var xt={rgba4:32854,rgb565:36194,"rgb5 a1":32855,depth:33189,stencil:36168,"depth stencil":34041};jt.ext_srgb&&(xt.srgba=35907),jt.ext_color_buffer_half_float&&(xt.rgba16f=34842,xt.rgb16f=34843),jt.webgl_color_buffer_float&&(xt.rgba32f=34836);var Tt=[];Object.keys(xt).forEach(function(_t){Tt[xt[_t]]=_t});var Ct=0,St={};return ut.prototype.decRef=function(){0>=--this.refCount&&lt(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<ut.length;++_t){var $t=ut[_t];jt.ext_disjoint_timer_query.getQueryObjectEXT($t,34919)?(Ht+=jt.ext_disjoint_timer_query.getQueryObjectEXT($t,34918),hr.push($t)):ut[St++]=$t,Tt[_t+1]=Ht,Ct[_t+1]=St}for(ut.length=St,_t=St=0;_t<xt.length;++_t){var Ht=xt[_t],Qt=Ht.startQueryIndex,$t=Ht.endQueryIndex;Ht.sum+=Tt[$t]-Tt[Qt],Qt=Ct[Qt],$t=Ct[$t],$t===Qt?(Ht.stats.gpuTime+=Ht.sum/1e6,lt.push(Ht)):(Ht.startQueryIndex=Qt,Ht.endQueryIndex=$t,xt[St++]=Ht)}xt.length=St}},getNumPendingQueries:function(){return ut.length},clear:function(){hr.push.apply(hr,ut);for(var St=0;St<hr.length;St++)jt.ext_disjoint_timer_query.deleteQueryEXT(hr[St]);ut.length=0,hr.length=0},restore:function(){ut.length=0,hr.length=0}}};return function(yt){function jt(){if(Dn.length===0)Dt&&Dt.update(),Nr=null;else{Nr=Me.next(jt),St();for(var vn=Dn.length-1;0<=vn;--vn){var fn=Dn[vn];fn&&fn(nr,null,0)}$t.flush(),Dt&&Dt.update()}}function Yt(){!Nr&&0<Dn.length&&(Nr=Me.next(jt))}function br(){Nr&&(Me.cancel(jt),Nr=null)}function hr(vn){vn.preventDefault(),br(),xr.forEach(function(fn){fn()})}function ut(vn){$t.getError(),or.restore(),pr.restore(),zt.restore(),vr.restore(),Hr.restore(),Ir.restore(),dr.restore(),Dt&&Dt.restore(),kr.procs.refresh(),Yt(),Ar.forEach(function(fn){fn()})}function lt(vn){function fn(gn,Un){var En={},Cn={};return Object.keys(gn).forEach(function(Hn){var aa=gn[Hn];if(me.isDynamic(aa))Cn[Hn]=me.unbox(aa,Hn);else{if(Un&&Array.isArray(aa)){for(var Pa=0;Pa<aa.length;++Pa)if(me.isDynamic(aa[Pa])){Cn[Hn]=me.unbox(aa,Hn);return}}En[Hn]=aa}}),{dynamic:Cn,static:En}}function Tn(gn){for(;nn.length<gn;)nn.push(null);return nn}var Pn=fn(vn.context||{},!0),jn=fn(vn.uniforms||{},!0),qn=fn(vn.attributes||{},!1);vn=fn(function(gn){function Un(Cn){if(Cn in En){var Hn=En[Cn];delete En[Cn],Object.keys(Hn).forEach(function(aa){En[Cn+"."+aa]=Hn[aa]})}}var En=ie({},gn);return delete En.uniforms,delete En.attributes,delete En.context,delete En.vao,"stencil"in En&&En.stencil.op&&(En.stencil.opBack=En.stencil.opFront=En.stencil.op,delete En.stencil.op),Un("blend"),Un("depth"),Un("cull"),Un("stencil"),Un("polygonOffset"),Un("scissor"),Un("sample"),"vao"in gn&&(En.vao=gn.vao),En}(vn),!1);var sa={gpuTime:0,cpuTime:0,count:0},ta=kr.compile(vn,qn,jn,Pn,sa),ea=ta.draw,Mr=ta.batch,on=ta.scope,nn=[];return ie(function(gn,Un){var En;if(typeof gn=="function")return on.call(this,null,gn,0);if(typeof Un=="function")if(typeof gn=="number")for(En=0;En<gn;++En)on.call(this,null,Un,En);else if(Array.isArray(gn))for(En=0;En<gn.length;++En)on.call(this,gn[En],Un,En);else return on.call(this,gn,Un,0);else if(typeof gn=="number"){if(0<gn)return Mr.call(this,Tn(gn|0),gn|0)}else if(Array.isArray(gn)){if(gn.length)return Mr.call(this,gn,gn.length)}else return ea.call(this,gn)},{stats:sa,destroy:function(){ta.destroy()}})}function xt(vn,fn){var Tn=0;kr.procs.poll();var Pn=fn.color;Pn&&($t.clearColor(+Pn[0]||0,+Pn[1]||0,+Pn[2]||0,+Pn[3]||0),Tn|=16384),"depth"in fn&&($t.clearDepth(+fn.depth),Tn|=256),"stencil"in fn&&($t.clearStencil(fn.stencil|0),Tn|=1024),$t.clear(Tn)}function Tt(vn){return Dn.push(vn),Yt(),{cancel:function(){function fn(){var Pn=le(Dn,fn);Dn[Pn]=Dn[Dn.length-1],--Dn.length,0>=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;Pn<Tn.length;++Pn)if(Tn[Pn]===fn){Tn[Pn]=Tn[Tn.length-1],Tn.pop();break}}}},limits:rr,hasExtension:function(vn){return 0<=rr.extensions.indexOf(vn.toLowerCase())},read:pn,destroy:function(){Dn.length=0,br(),In&&(In.removeEventListener("webglcontextlost",hr),In.removeEventListener("webglcontextrestored",ut)),pr.clear(),Ir.clear(),Hr.clear(),dr.clear(),vr.clear(),fr.clear(),zt.clear(),Dt&&Dt.clear(),Or.forEach(function(vn){vn()})},_gl:$t,_refresh:_t,poll:function(){St(),Dt&&Dt.update()},now:Ht,stats:Er,getCachedCode:function(){return Ye},preloadCachedCode:function(vn){Object.entries(vn).forEach(function(fn){Ye[fn[0]]=fn[1]})}}),yt.onDone(null,Qt),Qt}})},71665:function(G,V,e){var m=e(12856),P=m.Buffer;function i(A,v){for(var p in A)v[p]=A[p]}P.from&&P.alloc&&P.allocUnsafe&&P.allocUnsafeSlow?G.exports=m:(i(m,V),V.Buffer=L);function L(A,v,p){return P(A,v,p)}L.prototype=Object.create(P.prototype),i(P,L),L.from=function(A,v,p){if(typeof A=="number")throw new TypeError("Argument must not be a number");return P(A,v,p)},L.alloc=function(A,v,p){if(typeof A!="number")throw new TypeError("Argument must be a number");var t=P(A);return v!==void 0?typeof p=="string"?t.fill(v,p):t.fill(v):t.fill(0),t},L.allocUnsafe=function(A){if(typeof A!="number")throw new TypeError("Argument must be a number");return P(A)},L.allocUnsafeSlow=function(A){if(typeof A!="number")throw new TypeError("Argument must be a number");return m.SlowBuffer(A)}},21630:function(G,V,e){G.exports=i;var m=e(15398).EventEmitter,P=e(42018);P(i,m),i.Readable=e(40410),i.Writable=e(37493),i.Duplex=e(37865),i.Transform=e(74308),i.PassThrough=e(66897),i.finished=e(12726),i.pipeline=e(10168),i.Stream=i;function i(){m.call(this)}i.prototype.pipe=function(L,A){var v=this;function p(u){L.writable&&L.write(u)===!1&&v.pause&&v.pause()}v.on("data",p);function t(){v.readable&&v.resume&&v.resume()}L.on("drain",t),!L._isStdio&&(!A||A.end!==!1)&&(v.on("end",s),v.on("close",n));var r=!1;function s(){r||(r=!0,L.end())}function n(){r||(r=!0,typeof L.destroy=="function"&&L.destroy())}function l(u){if(c(),m.listenerCount(this,"error")===0)throw u}v.on("error",l),L.on("error",l);function c(){v.removeListener("data",p),L.removeListener("drain",t),v.removeListener("end",s),v.removeListener("close",n),v.removeListener("error",l),L.removeListener("error",l),v.removeListener("end",c),v.removeListener("close",c),L.removeListener("close",c)}return v.on("end",c),v.on("close",c),L.on("close",c),L.emit("pipe",v),L}},74322:function(G){function V(v,p){v.prototype=Object.create(p.prototype),v.prototype.constructor=v,v.__proto__=p}var e={};function m(v,p,t){t||(t=Error);function r(n,l,c){return typeof p=="string"?p:p(n,l,c)}var s=function(n){V(l,n);function l(c,u,g){return n.call(this,r(c,u,g))||this}return l}(t);s.prototype.name=t.name,s.prototype.code=v,e[v]=s}function P(v,p){if(Array.isArray(v)){var t=v.length;return v=v.map(function(r){return String(r)}),t>2?"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;v<A.length;v++){var p=A[v];t.prototype[p]||(t.prototype[p]=L.prototype[p])}function t(n){if(!(this instanceof t))return new t(n);i.call(this,n),L.call(this,n),this.allowHalfOpen=!0,n&&(n.readable===!1&&(this.readable=!1),n.writable===!1&&(this.writable=!1),n.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",r)))}Object.defineProperty(t.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(t.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(t.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function r(){this._writableState.ended||m.nextTick(s,this)}function s(n){n.end()}Object.defineProperty(t.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(l){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=l,this._writableState.destroyed=l)}})},66897:function(G,V,e){G.exports=P;var m=e(74308);e(42018)(P,m);function P(i){if(!(this instanceof P))return new P(i);m.call(this,i)}P.prototype._transform=function(i,L,A){A(null,i)}},40410:function(G,V,e){var m=e(90386);G.exports=a;var P;a.ReadableState=b,e(15398).EventEmitter;var i=function($,le){return $.listeners(le).length},L=e(71405),A=e(12856).Buffer,v=e.g.Uint8Array||function(){};function p(q){return A.from(q)}function t(q){return A.isBuffer(q)||q instanceof v}var r=e(40964),s;r&&r.debuglog?s=r.debuglog("stream"):s=function(){};var n=e(31125),l=e(65756),c=e(56306),u=c.getHighWaterMark,g=e(74322).q,f=g.ERR_INVALID_ARG_TYPE,w=g.ERR_STREAM_PUSH_AFTER_EOF,h=g.ERR_METHOD_NOT_IMPLEMENTED,o=g.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,d,M,T;e(42018)(a,L);var C=l.errorOrDestroy,x=["error","close","destroy","pause","resume"];function S(q,$,le){if(typeof q.prependListener=="function")return q.prependListener($,le);!q._events||!q._events[$]?q.on($,le):Array.isArray(q._events[$])?q._events[$].unshift(le):q._events[$]=[le,q._events[$]]}function b(q,$,le){P=P||e(37865),q=q||{},typeof le!="boolean"&&(le=$ instanceof P),this.objectMode=!!q.objectMode,le&&(this.objectMode=this.objectMode||!!q.readableObjectMode),this.highWaterMark=u(this,q,"readableHighWaterMark",le),this.buffer=new n,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=q.emitClose!==!1,this.autoDestroy=!!q.autoDestroy,this.destroyed=!1,this.defaultEncoding=q.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,q.encoding&&(d||(d=e(68019).s),this.decoder=new d(q.encoding),this.encoding=q.encoding)}function a(q){if(P=P||e(37865),!(this instanceof a))return new a(q);var $=this instanceof P;this._readableState=new b(q,this,$),this.readable=!0,q&&(typeof q.read=="function"&&(this._read=q.read),typeof q.destroy=="function"&&(this._destroy=q.destroy)),L.call(this)}Object.defineProperty(a.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function($){this._readableState&&(this._readableState.destroyed=$)}}),a.prototype.destroy=l.destroy,a.prototype._undestroy=l.undestroy,a.prototype._destroy=function(q,$){$(q)},a.prototype.push=function(q,$){var le=this._readableState,ie;return le.objectMode?ie=!0:typeof q=="string"&&($=$||le.defaultEncoding,$!==le.encoding&&(q=A.from(q,$),$=""),ie=!0),E(this,q,$,!1,ie)},a.prototype.unshift=function(q){return E(this,q,null,!0,!1)};function E(q,$,le,ie,he){s("readableAddChunk",$);var me=q._readableState;if($===null)me.reading=!1,O(q,me);else{var Me;if(he||(Me=z(me,$)),Me)C(q,Me);else if(me.objectMode||$&&$.length>0)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<me.highWaterMark||me.length===0)}function y(q,$,le,ie){$.flowing&&$.length===0&&!$.sync?($.awaitDrain=0,q.emit("data",le)):($.length+=$.objectMode?1:le.length,ie?$.buffer.unshift(le):$.buffer.push(le),$.needReadable&&N(q)),U(q,$)}function z(q,$){var le;return!t($)&&typeof $!="string"&&$!==void 0&&!q.objectMode&&(le=new f("chunk",["string","Buffer","Uint8Array"],$)),le}a.prototype.isPaused=function(){return this._readableState.flowing===!1},a.prototype.setEncoding=function(q){d||(d=e(68019).s);var $=new d(q);this._readableState.decoder=$,this._readableState.encoding=this._readableState.decoder.encoding;for(var le=this._readableState.buffer.head,ie="";le!==null;)ie+=$.write(le.data),le=le.next;return this._readableState.buffer.clear(),ie!==""&&this._readableState.buffer.push(ie),this._readableState.length=ie.length,this};var I=1073741824;function B(q){return q>=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;me<he;me++)ie[me].emit("unpipe",this,{hasUnpiped:!1});return this}var Me=oe($.pipes,q);return Me===-1?this:($.pipes.splice(Me,1),$.pipesCount-=1,$.pipesCount===1&&($.pipes=$.pipes[0]),q.emit("unpipe",this,le),this)},a.prototype.on=function(q,$){var le=L.prototype.on.call(this,q,$),ie=this._readableState;return q==="data"?(ie.readableListening=this.listenerCount("readable")>0,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<x.length;me++)q.on(x[me],this.emit.bind(this,x[me]));return this._read=function(Me){s("wrapped _read",Me),ie&&(ie=!1,q.resume())},this},typeof Symbol=="function"&&(a.prototype[Symbol.asyncIterator]=function(){return M===void 0&&(M=e(68221)),M(this)}),Object.defineProperty(a.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(a.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(a.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function($){this._readableState&&(this._readableState.flowing=$)}}),a._fromList=j,Object.defineProperty(a.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function j(q,$){if($.length===0)return null;var le;return $.objectMode?le=$.buffer.shift():!q||q>=$.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<ie;le++)if(q[le]===$)return le;return-1}},74308:function(G,V,e){G.exports=t;var m=e(74322).q,P=m.ERR_METHOD_NOT_IMPLEMENTED,i=m.ERR_MULTIPLE_CALLBACK,L=m.ERR_TRANSFORM_ALREADY_TRANSFORMING,A=m.ERR_TRANSFORM_WITH_LENGTH_0,v=e(37865);e(42018)(t,v);function p(n,l){var c=this._transformState;c.transforming=!1;var u=c.writecb;if(u===null)return this.emit("error",new i);c.writechunk=null,c.writecb=null,l!=null&&this.push(l),u(n);var g=this._readableState;g.reading=!1,(g.needReadable||g.length<g.highWaterMark)&&this._read(g.highWaterMark)}function t(n){if(!(this instanceof t))return new t(n);v.call(this,n),this._transformState={afterTransform:p.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,n&&(typeof n.transform=="function"&&(this._transform=n.transform),typeof n.flush=="function"&&(this._flush=n.flush)),this.on("prefinish",r)}function r(){var n=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(l,c){s(n,l,c)}):s(this,null,null)}t.prototype.push=function(n,l){return this._transformState.needTransform=!1,v.prototype.push.call(this,n,l)},t.prototype._transform=function(n,l,c){c(new P("_transform()"))},t.prototype._write=function(n,l,c){var u=this._transformState;if(u.writecb=c,u.writechunk=n,u.writeencoding=l,!u.transforming){var g=this._readableState;(u.needTransform||g.needReadable||g.length<g.highWaterMark)&&this._read(g.highWaterMark)}},t.prototype._read=function(n){var l=this._transformState;l.writechunk!==null&&!l.transforming?(l.transforming=!0,this._transform(l.writechunk,l.writeencoding,l.afterTransform)):l.needTransform=!0},t.prototype._destroy=function(n,l){v.prototype._destroy.call(this,n,function(c){l(c)})};function s(n,l,c){if(l)return n.emit("error",l);if(c!=null&&n.push(c),n._writableState.length)throw new A;if(n._transformState.transforming)throw new L;return n.push(null)}},37493:function(G,V,e){var m=e(90386);G.exports=b;function P(Z){var j=this;this.next=null,this.entry=null,this.finish=function(){Q(j,Z)}}var i;b.WritableState=x;var L={deprecate:e(20588)},A=e(71405),v=e(12856).Buffer,p=e.g.Uint8Array||function(){};function t(Z){return v.from(Z)}function r(Z){return v.isBuffer(Z)||Z instanceof p}var s=e(65756),n=e(56306),l=n.getHighWaterMark,c=e(74322).q,u=c.ERR_INVALID_ARG_TYPE,g=c.ERR_METHOD_NOT_IMPLEMENTED,f=c.ERR_MULTIPLE_CALLBACK,w=c.ERR_STREAM_CANNOT_PIPE,h=c.ERR_STREAM_DESTROYED,o=c.ERR_STREAM_NULL_VALUES,d=c.ERR_STREAM_WRITE_AFTER_END,M=c.ERR_UNKNOWN_ENCODING,T=s.errorOrDestroy;e(42018)(b,A);function C(){}function x(Z,j,K){i=i||e(37865),Z=Z||{},typeof K!="boolean"&&(K=j instanceof i),this.objectMode=!!Z.objectMode,K&&(this.objectMode=this.objectMode||!!Z.writableObjectMode),this.highWaterMark=l(this,Z,"writableHighWaterMark",K),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var ee=Z.decodeStrings===!1;this.decodeStrings=!ee,this.defaultEncoding=Z.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(oe){O(j,oe)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=Z.emitClose!==!1,this.autoDestroy=!!Z.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new P(this)}x.prototype.getBuffer=function(){for(var j=this.bufferedRequest,K=[];j;)K.push(j),j=j.next;return K},function(){try{Object.defineProperty(x.prototype,"buffer",{get:L.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var S;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(S=Function.prototype[Symbol.hasInstance],Object.defineProperty(b,Symbol.hasInstance,{value:function(j){return S.call(this,j)?!0:this!==b?!1:j&&j._writableState instanceof x}})):S=function(j){return j instanceof this};function b(Z){i=i||e(37865);var j=this instanceof i;if(!j&&!S.call(b,this))return new b(Z);this._writableState=new x(Z,this,j),this.writable=!0,Z&&(typeof Z.write=="function"&&(this._write=Z.write),typeof Z.writev=="function"&&(this._writev=Z.writev),typeof Z.destroy=="function"&&(this._destroy=Z.destroy),typeof Z.final=="function"&&(this._final=Z.final)),A.call(this)}b.prototype.pipe=function(){T(this,new w)};function a(Z,j){var K=new d;T(Z,K),m.nextTick(j,K)}function E(Z,j,K,ee){var oe;return K===null?oe=new o:typeof K!="string"&&!j.objectMode&&(oe=new u("chunk",["string","Buffer"],K)),oe?(T(Z,oe),m.nextTick(ee,oe),!1):!0}b.prototype.write=function(Z,j,K){var ee=this._writableState,oe=!1,q=!ee.objectMode&&r(Z);return q&&!v.isBuffer(Z)&&(Z=t(Z)),typeof j=="function"&&(K=j,j=null),q?j="buffer":j||(j=ee.defaultEncoding),typeof K!="function"&&(K=C),ee.ending?a(this,K):(q||E(this,ee,Z,K))&&(ee.pendingcb++,oe=z(this,ee,q,Z,j,K)),oe},b.prototype.cork=function(){this._writableState.corked++},b.prototype.uncork=function(){var Z=this._writableState;Z.corked&&(Z.corked--,!Z.writing&&!Z.corked&&!Z.bufferProcessing&&Z.bufferedRequest&&U(this,Z))},b.prototype.setDefaultEncoding=function(j){if(typeof j=="string"&&(j=j.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((j+"").toLowerCase())>-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.length<j.highWaterMark;if(ie||(j.needDrain=!0),j.writing||j.corked){var he=j.lastBufferedRequest;j.lastBufferedRequest={chunk:ee,encoding:oe,isBuf:K,callback:q,next:null},he?he.next=j.lastBufferedRequest:j.bufferedRequest=j.lastBufferedRequest,j.bufferedRequestCount+=1}else I(Z,j,!1,le,ee,oe,q);return ie}function I(Z,j,K,ee,oe,q,$){j.writelen=ee,j.writecb=$,j.writing=!0,j.sync=!0,j.destroyed?j.onwrite(new h("write")):K?Z._writev(oe,j.onwrite):Z._write(oe,q,j.onwrite),j.sync=!1}function B(Z,j,K,ee,oe){--j.pendingcb,K?(m.nextTick(oe,ee),m.nextTick(ae,Z,j),Z._writableState.errorEmitted=!0,T(Z,ee)):(oe(ee),Z._writableState.errorEmitted=!0,T(Z,ee),ae(Z,j))}function k(Z){Z.writing=!1,Z.writecb=null,Z.length-=Z.writelen,Z.writelen=0}function O(Z,j){var K=Z._writableState,ee=K.sync,oe=K.writecb;if(typeof oe!="function")throw new f;if(k(K),j)B(Z,K,ee,j,oe);else{var q=Y(K)||Z.destroyed;!q&&!K.corked&&!K.bufferProcessing&&K.bufferedRequest&&U(Z,K),ee?m.nextTick(N,Z,K,q,oe):N(Z,K,q,oe)}}function N(Z,j,K,ee){K||_(Z,j),j.pendingcb--,ee(),ae(Z,j)}function _(Z,j){j.length===0&&j.needDrain&&(j.needDrain=!1,Z.emit("drain"))}function U(Z,j){j.bufferProcessing=!0;var K=j.bufferedRequest;if(Z._writev&&K&&K.next){var ee=j.bufferedRequestCount,oe=new Array(ee),q=j.corkedRequestsFree;q.entry=K;for(var $=0,le=!0;K;)oe[$]=K,K.isBuf||(le=!1),K=K.next,$+=1;oe.allBuffers=le,I(Z,j,!0,j.length,oe,"",q.finish),j.pendingcb++,j.lastBufferedRequest=null,q.next?(j.corkedRequestsFree=q.next,q.next=null):j.corkedRequestsFree=new P(j),j.bufferedRequestCount=0}else{for(;K;){var ie=K.chunk,he=K.encoding,me=K.callback,Me=j.objectMode?1:ie.length;if(I(Z,j,!1,Me,ie,he,me),K=K.next,j.bufferedRequestCount--,j.writing)break}K===null&&(j.lastBufferedRequest=null)}j.bufferedRequest=K,j.bufferProcessing=!1}b.prototype._write=function(Z,j,K){K(new g("_write()"))},b.prototype._writev=null,b.prototype.end=function(Z,j,K){var ee=this._writableState;return typeof Z=="function"?(K=Z,Z=null,j=null):typeof j=="function"&&(K=j,j=null),Z!=null&&this.write(Z,j),ee.corked&&(ee.corked=1,this.uncork()),ee.ending||ce(this,ee,K),this},Object.defineProperty(b.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Y(Z){return Z.ending&&Z.length===0&&Z.bufferedRequest===null&&!Z.finished&&!Z.writing}function J(Z,j){Z._final(function(K){j.pendingcb--,K&&T(Z,K),j.prefinished=!0,Z.emit("prefinish"),ae(Z,j)})}function te(Z,j){!j.prefinished&&!j.finalCalled&&(typeof Z._final=="function"&&!j.destroyed?(j.pendingcb++,j.finalCalled=!0,m.nextTick(J,Z,j)):(j.prefinished=!0,Z.emit("prefinish")))}function ae(Z,j){var K=Y(j);if(K&&(te(Z,j),j.pendingcb===0&&(j.finished=!0,Z.emit("finish"),j.autoDestroy))){var ee=Z._readableState;(!ee||ee.autoDestroy&&ee.endEmitted)&&Z.destroy()}return K}function ce(Z,j,K){j.ending=!0,ae(Z,j),K&&(j.finished?m.nextTick(K):Z.once("finish",K)),j.ended=!0,Z.writable=!1}function Q(Z,j,K){var ee=Z.entry;for(Z.entry=null;ee;){var oe=ee.callback;j.pendingcb--,oe(K),ee=ee.next}j.corkedRequestsFree.next=Z}Object.defineProperty(b.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(j){this._writableState&&(this._writableState.destroyed=j)}}),b.prototype.destroy=s.destroy,b.prototype._undestroy=s.undestroy,b.prototype._destroy=function(Z,j){j(Z)}},68221:function(G,V,e){var m=e(90386),P;function i(o,d,M){return d in o?Object.defineProperty(o,d,{value:M,enumerable:!0,configurable:!0,writable:!0}):o[d]=M,o}var L=e(12726),A=Symbol("lastResolve"),v=Symbol("lastReject"),p=Symbol("error"),t=Symbol("ended"),r=Symbol("lastPromise"),s=Symbol("handlePromise"),n=Symbol("stream");function l(o,d){return{value:o,done:d}}function c(o){var d=o[A];if(d!==null){var M=o[n].read();M!==null&&(o[r]=null,o[A]=null,o[v]=null,d(l(M,!1)))}}function u(o){m.nextTick(c,o)}function g(o,d){return function(M,T){o.then(function(){if(d[t]){M(l(void 0,!0));return}d[s](M,T)},T)}}var f=Object.getPrototypeOf(function(){}),w=Object.setPrototypeOf((P={get stream(){return this[n]},next:function(){var d=this,M=this[p];if(M!==null)return Promise.reject(M);if(this[t])return Promise.resolve(l(void 0,!0));if(this[n].destroyed)return new Promise(function(S,b){m.nextTick(function(){d[p]?b(d[p]):S(l(void 0,!0))})});var T=this[r],C;if(T)C=new Promise(g(T,this));else{var x=this[n].read();if(x!==null)return Promise.resolve(l(x,!1));C=new Promise(this[s])}return this[r]=C,C}},i(P,Symbol.asyncIterator,function(){return this}),i(P,"return",function(){var d=this;return new Promise(function(M,T){d[n].destroy(null,function(C){if(C){T(C);return}M(l(void 0,!0))})})}),P),f),h=function(d){var M,T=Object.create(w,(M={},i(M,n,{value:d,writable:!0}),i(M,A,{value:null,writable:!0}),i(M,v,{value:null,writable:!0}),i(M,p,{value:null,writable:!0}),i(M,t,{value:d._readableState.endEmitted,writable:!0}),i(M,s,{value:function(x,S){var b=T[n].read();b?(T[r]=null,T[A]=null,T[v]=null,x(l(b,!1))):(T[A]=x,T[v]=S)},writable:!0}),M));return T[r]=null,L(d,function(C){if(C&&C.code!=="ERR_STREAM_PREMATURE_CLOSE"){var x=T[v];x!==null&&(T[r]=null,T[A]=null,T[v]=null,x(C)),T[p]=C;return}var S=T[A];S!==null&&(T[r]=null,T[A]=null,T[v]=null,S(l(void 0,!0))),T[t]=!0}),d.on("readable",u.bind(null,T)),T};G.exports=h},31125:function(G,V,e){function m(c,u){var g=Object.keys(c);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(c);u&&(f=f.filter(function(w){return Object.getOwnPropertyDescriptor(c,w).enumerable})),g.push.apply(g,f)}return g}function P(c){for(var u=1;u<arguments.length;u++){var g=arguments[u]!=null?arguments[u]:{};u%2?m(Object(g),!0).forEach(function(f){i(c,f,g[f])}):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(g)):m(Object(g)).forEach(function(f){Object.defineProperty(c,f,Object.getOwnPropertyDescriptor(g,f))})}return c}function i(c,u,g){return u in c?Object.defineProperty(c,u,{value:g,enumerable:!0,configurable:!0,writable:!0}):c[u]=g,c}function L(c,u){if(!(c instanceof u))throw new TypeError("Cannot call a class as a function")}function A(c,u){for(var g=0;g<u.length;g++){var f=u[g];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(c,f.key,f)}}function v(c,u,g){return u&&A(c.prototype,u),g&&A(c,g),c}var p=e(12856),t=p.Buffer,r=e(69862),s=r.inspect,n=s&&s.custom||"inspect";function l(c,u,g){t.prototype.copy.call(c,u,g)}G.exports=function(){function c(){L(this,c),this.head=null,this.tail=null,this.length=0}return v(c,[{key:"push",value:function(g){var f={data:g,next:null};this.length>0?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 g<this.head.data.length?(w=this.head.data.slice(0,g),this.head.data=this.head.data.slice(g)):g===this.head.data.length?w=this.shift():w=f?this._getString(g):this._getBuffer(g),w}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(g){var f=this.head,w=1,h=f.data;for(g-=h.length;f=f.next;){var o=f.data,d=g>o.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;s<t;s++)r[s]=arguments[s];v.apply(this,r)}}}function i(){}function L(v){return v.setHeader&&typeof v.abort=="function"}function A(v,p,t){if(typeof p=="function")return A(v,null,p);p||(p={}),t=P(t||i);var r=p.readable||p.readable!==!1&&v.readable,s=p.writable||p.writable!==!1&&v.writable,n=function(){v.writable||c()},l=v._writableState&&v._writableState.finished,c=function(){s=!1,l=!0,r||t.call(v)},u=v._readableState&&v._readableState.endEmitted,g=function(){r=!1,u=!0,s||t.call(v)},f=function(d){t.call(v,d)},w=function(){var d;if(r&&!u)return(!v._readableState||!v._readableState.ended)&&(d=new m),t.call(v,d);if(s&&!l)return(!v._writableState||!v._writableState.ended)&&(d=new m),t.call(v,d)},h=function(){v.req.on("finish",c)};return L(v)?(v.on("complete",c),v.on("abort",w),v.req?h():v.on("request",h)):s&&!v._writableState&&(v.on("end",n),v.on("close",n)),v.on("end",g),v.on("finish",c),p.error!==!1&&v.on("error",f),v.on("close",w),function(){v.removeListener("complete",c),v.removeListener("abort",w),v.removeListener("request",h),v.req&&v.req.removeListener("finish",c),v.removeListener("end",n),v.removeListener("close",n),v.removeListener("finish",c),v.removeListener("end",g),v.removeListener("error",f),v.removeListener("close",w)}}G.exports=A},31748:function(G){G.exports=function(){throw new Error("Readable.from is not available in the browser")}},10168:function(G,V,e){var m;function P(c){var u=!1;return function(){u||(u=!0,c.apply(void 0,arguments))}}var i=e(74322).q,L=i.ERR_MISSING_ARGS,A=i.ERR_STREAM_DESTROYED;function v(c){if(c)throw c}function p(c){return c.setHeader&&typeof c.abort=="function"}function t(c,u,g,f){f=P(f);var w=!1;c.on("close",function(){w=!0}),m===void 0&&(m=e(12726)),m(c,{readable:u,writable:g},function(o){if(o)return f(o);w=!0,f()});var h=!1;return function(o){if(!w&&!h){if(h=!0,p(c))return c.abort();if(typeof c.destroy=="function")return c.destroy();f(o||new A("pipe"))}}}function r(c){c()}function s(c,u){return c.pipe(u)}function n(c){return!c.length||typeof c[c.length-1]!="function"?v:c.pop()}function l(){for(var c=arguments.length,u=new Array(c),g=0;g<c;g++)u[g]=arguments[g];var f=n(u);if(Array.isArray(u[0])&&(u=u[0]),u.length<2)throw new L("streams");var w,h=u.map(function(o,d){var M=d<u.length-1,T=d>0;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<h.length?o?o+this.text(h,d):this.text(h,d):o||""},A.prototype.end=n,A.prototype.text=s,A.prototype.fillLast=function(h){if(this.lastNeed<=h.length)return h.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);h.copy(this.lastChar,this.lastTotal-this.lastNeed,0,h.length),this.lastNeed-=h.length};function v(h){return h<=127?0:h>>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<d)return 0;var T=v(o[M]);return T>=0?(T>0&&(h.lastNeed=T-1),T):--M<d||T===-2?0:(T=v(o[M]),T>=0?(T>0&&(h.lastNeed=T-2),T):--M<d||T===-2?0:(T=v(o[M]),T>=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,"<22>";if(h.lastNeed>1&&o.length>1){if((o[1]&192)!==128)return h.lastNeed=1,"<22>";if(h.lastNeed>2&&o.length>2&&(o[2]&192)!==128)return h.lastNeed=2,"<22>"}}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+"<22>":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;u<c.length;u++)c[u]=arguments[u];c[0]=V.coerce(c[0]),typeof c[0]!="string"&&c.unshift("%O");var g=0;c[0]=c[0].replace(/%([a-zA-Z%])/g,function(w,h){if(w==="%%")return w;g++;var o=V.formatters[h];if(typeof o=="function"){var d=c[g];w=o.call(s,d),c.splice(g,1),g--}return w}),V.formatArgs.call(s,c);var f=r.log||V.log||console.log.bind(console);f.apply(s,c)}}return r.namespace=t,r.enabled=V.enabled(t),r.useColors=V.useColors(),r.color=P(t),typeof V.init=="function"&&V.init(r),r}function L(t){V.save(t),V.names=[],V.skips=[];for(var r=(typeof t=="string"?t:"").split(/[\s,]+/),s=r.length,n=0;n<s;n++)r[n]&&(t=r[n].replace(/\*/g,".*?"),t[0]==="-"?V.skips.push(new RegExp("^"+t.substr(1)+"$")):V.names.push(new RegExp("^"+t+"$")))}function A(){V.enable("")}function v(t){var r,s;for(r=0,s=V.skips.length;r<s;r++)if(V.skips[r].test(t))return!1;for(r=0,s=V.names.length;r<s;r++)if(V.names[r].test(t))return!0;return!1}function p(t){return t instanceof Error?t.stack||t.message:t}},11375:function(G){var V=1e3,e=V*60,m=e*60,P=m*24,i=P*365.25;G.exports=function(t,r){r=r||{};var s=typeof t;if(s==="string"&&t.length>0)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<r))return t<r*1.5?Math.floor(t/r)+" "+s:Math.ceil(t/r)+" "+s+"s"}},99011:function(G,V,e){var m=e(88641);G.exports=function(i,L,A){if(i==null)throw Error("First argument should be a string");if(L==null)throw Error("Separator should be a string or a RegExp");A?(typeof A=="string"||Array.isArray(A))&&(A={ignore:A}):A={},A.escape==null&&(A.escape=!0),A.ignore==null?A.ignore=["[]","()","{}","<>",'""',"''","``","“”","«»"]:(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;s<t.length;s++){var n=t[s],l=t[s+1];n[n.length-1]==="\\"&&n[n.length-2]!=="\\"?(r.push(n+L+l),s++):r.push(n)}t=r}for(var s=0;s<t.length;s++)v[0]=t[s],t[s]=m.stringify(v,{flat:!0});return t}},68664:function(G){G.exports=V;function V(e){for(var m=e.length,P=new Array(m),i=new Array(m),L=new Array(m),A=new Array(m),v=new Array(m),p=new Array(m),t=0;t<m;++t)P[t]=-1,i[t]=0,L[t]=!1,A[t]=0,v[t]=-1,p[t]=[];var r=0,s=[],n=[];function l(f){var w=[f],h=[f];for(P[f]=i[f]=r,L[f]=!0,r+=1;h.length>0;){f=h[h.length-1];var o=e[f];if(A[f]<o.length){for(var d=A[f];d<o.length;++d){var M=o[d];if(P[M]<0){P[M]=i[M]=r,L[M]=!0,r+=1,w.push(M),h.push(M);break}else L[M]&&(i[f]=Math.min(i[f],i[M])|0);v[M]>=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;d<C.length;d++)for(var a=0;a<C[d].length;a++)b[--x]=C[d][a];n.push(b)}h.pop()}}}for(var t=0;t<m;++t)P[t]<0&&l(t);for(var c,t=0;t<n.length;t++){var u=n[t];if(u.length!==0){u.sort(function(w,h){return w-h}),c=[u[0]];for(var g=1;g<u.length;g++)u[g]!==u[g-1]&&c.push(u[g]);n[t]=c}}return{components:s,adjacencyList:n}}},7095:function(G,V,e){e.r(V);var m=function(){function t(r,s){var n=[],l=!0,c=!1,u=void 0;try{for(var g=r[Symbol.iterator](),f;!(l=(f=g.next()).done)&&(n.push(f.value),!(s&&n.length===s));l=!0);}catch(w){c=!0,u=w}finally{try{!l&&g.return&&g.return()}finally{if(c)throw u}}return n}return function(r,s){if(Array.isArray(r))return r;if(Symbol.iterator in Object(r))return t(r,s);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),P=Math.PI*2,i=function(r,s,n,l,c,u,g){var f=r.x,w=r.y;f*=s,w*=n;var h=l*f-c*w,o=c*f+l*w;return{x:h+u,y:o+g}},L=function(r,s){var n=s===1.5707963267948966?.551915024494:s===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(s/4),l=Math.cos(r),c=Math.sin(r),u=Math.cos(r+s),g=Math.sin(r+s);return[{x:l-c*n,y:c+l*n},{x:u+g*n,y:g-u*n},{x:u,y:g}]},A=function(r,s,n,l){var c=r*l-s*n<0?-1:1,u=r*n+s*l;return u>1&&(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;_<N;_++)T.push(L(B,k)),B+=k;return T.map(function(U){var Y=i(U[0],u,g,x,C,z,I),J=Y.x,te=Y.y,ae=i(U[1],u,g,x,C,z,I),ce=ae.x,Q=ae.y,Z=i(U[2],u,g,x,C,z,I),j=Z.x,K=Z.y;return{x1:J,y1:te,x2:ce,y2:Q,x:j,y:K}})};V.default=p},1750:function(G,V,e){var m=e(95616),P=e(65185),i=e(29988),L=e(89546),A=e(32791);G.exports=v;function v(p){if(Array.isArray(p)&&p.length===1&&typeof p[0]=="string"&&(p=p[0]),typeof p=="string"&&(A(L(p),"String is not an SVG path."),p=m(p)),A(Array.isArray(p),"Argument should be a string or an array of path segments."),p=P(p),p=i(p),!p.length)return[0,0,0,0];for(var t=[1/0,1/0,-1/0,-1/0],r=0,s=p.length;r<s;r++)for(var n=p[r].slice(1),l=0;l<n.length;l+=2)n[l+0]<t[0]&&(t[0]=n[l+0]),n[l+1]<t[1]&&(t[1]=n[l+1]),n[l+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;f<w;f++){var h=A[f],o=h[0];switch(o){case"M":s=h[1],n=h[2];break;case"A":var d=m({px:u,py:g,cx:h[6],cy:h[7],rx:h[1],ry:h[2],xAxisRotation:h[3],largeArcFlag:h[4],sweepFlag:h[5]});if(!d.length)continue;for(var M=0,T;M<d.length;M++)T=d[M],h=["C",T.x1,T.y1,T.x2,T.y2,T.x,T.y],M<d.length-1&&p.push(h);break;case"S":var C=u,x=g;(v=="C"||v=="S")&&(C+=C-t,x+=x-r),h=["C",C,x,h[1],h[2],h[3],h[4]];break;case"T":v=="Q"||v=="T"?(l=u*2-l,c=g*2-c):(l=u,c=g),h=L(u,g,l,c,h[1],h[2]);break;case"Q":l=h[1],c=h[2],h=L(u,g,h[1],h[2],h[3],h[4]);break;case"L":h=i(u,g,h[1],h[2]);break;case"H":h=i(u,g,h[1],g);break;case"V":h=i(u,g,u,h[1]);break;case"Z":h=i(u,g,s,n);break}v=o,u=h[h.length-2],g=h[h.length-1],h.length>4?(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+(le<ie?6:0);break;case le:Me=(ie-$)/Ne+2;break;case ie:Me=($-le)/Ne+4;break}Me/=6}return{h:Me,s:Te,l:Oe}}function u($,le,ie){var he,me,Me;$=U($,360),le=U(le,100),ie=U(ie,100);function Te(Ee,xe,Se){return Se<0&&(Se+=1),Se>1&&(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<ie?6:0);break;case le:Me=(ie-$)/Ne+2;break;case ie:Me=($-le)/Ne+4;break}Me/=6}return{h:Me,s:Te,v:Oe}}function f($,le,ie){$=U($,360)*6,le=U(le,100),ie=U(ie,100);var he=P.floor($),me=$-he,Me=ie*(1-le),Te=ie*(1-me*le),Oe=ie*(1-(1-me)*le),Ne=he%6,Ee=[ie,Te,Me,Me,Oe,ie][Ne],xe=[Oe,ie,ie,Te,Me,Me][Ne],Se=[Me,Me,Oe,ie,ie,Te][Ne];return{r:Ee*255,g:xe*255,b:Se*255}}function w($,le,ie,he){var me=[ce(v($).toString(16)),ce(v(le).toString(16)),ce(v(ie).toString(16))];return he&&me[0].charAt(0)==me[0].charAt(1)&&me[1].charAt(0)==me[1].charAt(1)&&me[2].charAt(0)==me[2].charAt(1)?me[0].charAt(0)+me[1].charAt(0)+me[2].charAt(0):me.join("")}function h($,le,ie,he,me){var Me=[ce(v($).toString(16)),ce(v(le).toString(16)),ce(v(ie).toString(16)),ce(Z(he))];return me&&Me[0].charAt(0)==Me[0].charAt(1)&&Me[1].charAt(0)==Me[1].charAt(1)&&Me[2].charAt(0)==Me[2].charAt(1)&&Me[3].charAt(0)==Me[3].charAt(1)?Me[0].charAt(0)+Me[1].charAt(0)+Me[2].charAt(0)+Me[3].charAt(0):Me.join("")}function o($,le,ie,he){var me=[ce(Z(he)),ce(v($).toString(16)),ce(v(le).toString(16)),ce(v(ie).toString(16))];return me.join("")}s.equals=function($,le){return!$||!le?!1:s($).toRgbString()==s(le).toRgbString()},s.random=function(){return s.fromRatio({r:r(),g:r(),b:r()})};function d($,le){le=le===0?0:le||10;var ie=s($).toHsl();return ie.s-=le/100,ie.s=Y(ie.s),s(ie)}function M($,le){le=le===0?0:le||10;var ie=s($).toHsl();return ie.s+=le/100,ie.s=Y(ie.s),s(ie)}function T($){return s($).desaturate(100)}function C($,le){le=le===0?0:le||10;var ie=s($).toHsl();return ie.l+=le/100,ie.l=Y(ie.l),s(ie)}function x($,le){le=le===0?0:le||10;var ie=s($).toRgb();return ie.r=t(0,p(255,ie.r-v(255*-(le/100)))),ie.g=t(0,p(255,ie.g-v(255*-(le/100)))),ie.b=t(0,p(255,ie.b-v(255*-(le/100)))),s(ie)}function S($,le){le=le===0?0:le||10;var ie=s($).toHsl();return ie.l-=le/100,ie.l=Y(ie.l),s(ie)}function b($,le){var ie=s($).toHsl(),he=(ie.h+le)%360;return ie.h=he<0?360+he:he,s(ie)}function a($){var le=s($).toHsl();return le.h=(le.h+180)%360,s(le)}function E($){var le=s($).toHsl(),ie=le.h;return[s($),s({h:(ie+120)%360,s:le.s,l:le.l}),s({h:(ie+240)%360,s:le.s,l:le.l})]}function y($){var le=s($).toHsl(),ie=le.h;return[s($),s({h:(ie+90)%360,s:le.s,l:le.l}),s({h:(ie+180)%360,s:le.s,l:le.l}),s({h:(ie+270)%360,s:le.s,l:le.l})]}function z($){var le=s($).toHsl(),ie=le.h;return[s($),s({h:(ie+72)%360,s:le.s,l:le.l}),s({h:(ie+216)%360,s:le.s,l:le.l})]}function I($,le,ie){le=le||6,ie=ie||30;var he=s($).toHsl(),me=360/ie,Me=[s($)];for(he.h=(he.h-(me*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;Ee<le.length;Ee++)Me=s.readability($,le[Ee]),Me>me&&(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<A;L++)i[L]=P[L]-i[L];return i}return m(P-m(P))}function m(P){return P.length?P instanceof Float32Array?P:new Float32Array(P):(V[0]=P,V[0])}},75686:function(G,V,e){var m=e(25677);G.exports=A;var P=96;function i(v,p){var t=m(getComputedStyle(v).getPropertyValue(p));return t[0]*A(t[1],v)}function L(v,p){var t=document.createElement("div");t.style["font-size"]="128"+v,p.appendChild(t);var r=i(t,"font-size")/128;return p.removeChild(t),r}function A(v,p){switch(p=p||document.body,v=(v||"px").trim().toLowerCase(),(p===window||p===document)&&(p=document.body),v){case"%":return p.clientHeight/100;case"ch":case"ex":return L(v,p);case"em":return i(p,"font-size");case"rem":return i(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return P;case"cm":return P/2.54;case"mm":return P/25.4;case"pt":return P/72;case"pc":return P/6}return 1}},96892:function(G,V,e){e.d(V,{zL:function(){return L}});function m(p,t){for(var r,s=p.length,n=s-t;n<--s;)r=p[n],p[n++]=p[s],p[s]=r}function P(p){return p}function i(p){if(p==null)return P;var t,r,s=p.scale[0],n=p.scale[1],l=p.translate[0],c=p.translate[1];return function(u,g){g||(t=r=0);var f=2,w=u.length,h=new Array(w);for(h[0]=(t+=u[0])*s+l,h[1]=(r+=u[1])*n+c;f<w;)h[f]=u[f],++f;return h}}function L(p,t){return typeof t=="string"&&(t=p.objects[t]),t.type==="GeometryCollection"?{type:"FeatureCollection",features:t.geometries.map(function(r){return A(p,r)})}:A(p,t)}function A(p,t){var r=t.id,s=t.bbox,n=t.properties==null?{}:t.properties,l=v(p,t);return r==null&&s==null?{type:"Feature",properties:n,geometry:l}:s==null?{type:"Feature",id:r,properties:n,geometry:l}:{type:"Feature",id:r,bbox:s,properties:n,geometry:l}}function v(p,t){var r=i(p.transform),s=p.arcs;function n(w,h){h.length&&h.pop();for(var o=s[w<0?~w:w],d=0,M=o.length;d<M;++d)h.push(r(o[d],d));w<0&&m(h,M)}function l(w){return r(w)}function c(w){for(var h=[],o=0,d=w.length;o<d;++o)n(w[o],h);return h.length<2&&h.push(h[0]),h}function u(w){for(var h=c(w);h.length<4;)h.push(h[0]);return h}function g(w){return w.map(u)}function f(w){var h=w.type,o;switch(h){case"GeometryCollection":return{type:h,geometries:w.geometries.map(f)};case"Point":o=l(w.coordinates);break;case"MultiPoint":o=w.coordinates.map(l);break;case"LineString":o=c(w.arcs);break;case"MultiLineString":o=w.arcs.map(c);break;case"Polygon":o=g(w.arcs);break;case"MultiPolygon":o=w.arcs.map(g);break;default:return null}return{type:h,coordinates:o}}return f(t)}},73116:function(G,V,e){var m=e(24511);G.exports=function(P){if(typeof P!="function"||!hasOwnProperty.call(P,"length"))return!1;try{if(typeof P.length!="number"||typeof P.call!="function"||typeof P.apply!="function")return!1}catch{return!1}return!m(P)}},69190:function(G,V,e){var m=e(24582),P=e(47403),i=e(9234),L=e(6048),A=function(v,p){return v.replace("%v",L(p))};G.exports=function(v,p,t){if(!P(t))throw new TypeError(A(p,v));if(!m(v)){if("default"in t)return t.default;if(t.isOptional)return null}var r=i(t.errorMessage);throw m(r)||(r=p),new TypeError(A(r,v))}},18497:function(G){G.exports=function(V){try{return V.toString()}catch{try{return String(V)}catch{return null}}}},6048:function(G,V,e){var m=e(18497),P=/[\n\r\u2028\u2029]/g;G.exports=function(i){var L=m(i);return L===null?"<Non-coercible to string value>":(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<L;i++){var A=P[i];for(var v in A)if(!(m[v]!==void 0&&!Array.isArray(m[v])&&e[v]===m[v])&&v in m){var p;if(A[v]===!0)p=m[v];else{if(A[v]===!1)continue;if(typeof A[v]=="function"&&(p=A[v](m[v],e,m),p===void 0))continue}e[v]=p}}return e}},20588:function(G,V,e){G.exports=m;function m(i,L){if(P("noDeprecation"))return i;var A=!1;function v(){if(!A){if(P("throwDeprecation"))throw new Error(L);P("traceDeprecation")?console.trace(L):console.warn(L),A=!0}return i.apply(this,arguments)}return v}function P(i){try{if(!e.g.localStorage)return!1}catch{return!1}var L=e.g.localStorage[i];return L==null?!1:String(L).toLowerCase()==="true"}},45920:function(G){G.exports=function(e){return e&&typeof e=="object"&&typeof e.copy=="function"&&typeof e.fill=="function"&&typeof e.readUInt8=="function"}},4936:function(G,V,e){var m=e(47216),P=e(65481),i=e(21099),L=e(9187);function A(Me){return Me.call.bind(Me)}var v=typeof BigInt<"u",p=typeof Symbol<"u",t=A(Object.prototype.toString),r=A(Number.prototype.valueOf),s=A(String.prototype.valueOf),n=A(Boolean.prototype.valueOf);if(v)var l=A(BigInt.prototype.valueOf);if(p)var c=A(Symbol.prototype.valueOf);function u(Me,Te){if(typeof Me!="object")return!1;try{return Te(Me),!0}catch{return!1}}V.isArgumentsObject=m,V.isGeneratorFunction=P,V.isTypedArray=L;function g(Me){return typeof Promise<"u"&&Me instanceof Promise||Me!==null&&typeof Me=="object"&&typeof Me.then=="function"&&typeof Me.catch=="function"}V.isPromise=g;function f(Me){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(Me):L(Me)||J(Me)}V.isArrayBufferView=f;function w(Me){return i(Me)==="Uint8Array"}V.isUint8Array=w;function h(Me){return i(Me)==="Uint8ClampedArray"}V.isUint8ClampedArray=h;function o(Me){return i(Me)==="Uint16Array"}V.isUint16Array=o;function d(Me){return i(Me)==="Uint32Array"}V.isUint32Array=d;function M(Me){return i(Me)==="Int8Array"}V.isInt8Array=M;function T(Me){return i(Me)==="Int16Array"}V.isInt16Array=T;function C(Me){return i(Me)==="Int32Array"}V.isInt32Array=C;function x(Me){return i(Me)==="Float32Array"}V.isFloat32Array=x;function S(Me){return i(Me)==="Float64Array"}V.isFloat64Array=S;function b(Me){return i(Me)==="BigInt64Array"}V.isBigInt64Array=b;function a(Me){return i(Me)==="BigUint64Array"}V.isBigUint64Array=a;function E(Me){return t(Me)==="[object Map]"}E.working=typeof Map<"u"&&E(new Map);function y(Me){return typeof Map>"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<ae.length;Q++)ce[ae[Q]]=Object.getOwnPropertyDescriptor(te,ae[Q]);return ce},i=/%[sdj%]/g;V.format=function(J){if(!T(J)){for(var te=[],ae=0;ae<arguments.length;ae++)te.push(p(arguments[ae]));return te.join(" ")}for(var ae=1,ce=arguments,Q=ce.length,Z=String(J).replace(i,function(K){if(K==="%%")return"%";if(ae>=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<Q;j=ce[++ae])o(j)||!b(j)?Z+=" "+j:Z+=" "+p(j);return Z},V.deprecate=function(J,te){if(typeof m<"u"&&m.noDeprecation===!0)return J;if(typeof m>"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<K;++j)N(te,String(j))?Z.push(g(J,te,ae,ce,String(j),!0)):Z.push("");return Q.forEach(function(ee){ee.match(/^\d+$/)||Z.push(g(J,te,ae,ce,ee,!0))}),Z}function g(J,te,ae,ce,Q,Z){var j,K,ee;if(ee=Object.getOwnPropertyDescriptor(te,Q)||{value:te[Q]},ee.get?ee.set?K=J.stylize("[Getter/Setter]","special"):K=J.stylize("[Getter]","special"):ee.set&&(K=J.stylize("[Setter]","special")),N(ce,Q)||(j="["+Q+"]"),K||(J.seen.indexOf(ee.value)<0?(o(ae)?K=n(J,ee.value,null):K=n(J,ee.value,ae-1),K.indexOf(`
`)>-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<arguments.length;K++)j.push(arguments[K]);j.push(function(ee,oe){ee?Q(ee):ce(oe)});try{te.apply(this,j)}catch(ee){Q(ee)}return Z}return Object.setPrototypeOf(ae,Object.getPrototypeOf(te)),_&&Object.defineProperty(ae,_,{value:ae,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(ae,P(te))},V.promisify.custom=_;function U(J,te){if(!J){var ae=new Error("Promise was rejected with a falsy value");ae.reason=J,J=ae}return te(J)}function Y(J){if(typeof J!="function")throw new TypeError('The "original" argument must be of type Function');function te(){for(var ae=[],ce=0;ce<arguments.length;ce++)ae.push(arguments[ce]);var Q=ae.pop();if(typeof Q!="function")throw new TypeError("The last argument must be of type Function");var Z=this,j=function(){return Q.apply(Z,arguments)};J.apply(this,ae).then(function(K){m.nextTick(j.bind(null,null,K))},function(K){m.nextTick(U.bind(null,K,j))})}return Object.setPrototypeOf(te,Object.getPrototypeOf(J)),Object.defineProperties(te,P(J)),te}V.callbackify=Y},40372:function(G,V,e){var m=e(86249);G.exports=function(i){return m("webgl",i)}},21099:function(G,V,e){var m=e(31353),P=e(72077),i=e(6614),L=e(40383),A=i("Object.prototype.toString"),v=e(84543)(),p=typeof globalThis>"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<g?w=u+1:w=u:w=u+1,w},intercalaryMonth:function(c){c=this._validateYear(c);var u=r[c-r[0]],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<B)break;a-=B}var k=z>>13;return!k||I<k?(h.isIntercalary=!1,h.month=1+I):I===k?(h.isIntercalary=!0,h.month=I):(h.isIntercalary=!1,h.month=I),h.day=1+a,h}function l(c,u,g,f,w){var h,o;if(typeof c=="object")o=c,h=u||{};else{var d=typeof c=="number"&&c>=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<a;E++){var y=S&1<<12-E?30:29;x+=y}var z=s[o.year-s[0]],I=z>>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<v;n++)s+=this.daysInMonth(A,n)}else for(var n=7;n<v;n++)s+=this.daysInMonth(A,n);return s},_delay1:function(A){var v=Math.floor((235*A-234)/19),p=12084+13753*v,t=v*29+Math.floor(p/25920);return L(3*(t+1),7)<3&&t++,t},_delay2:function(A){var v=this._delay1(A-1),p=this._delay1(A),t=this._delay1(A+1);return t-p===356?2:p-v===382?1:0},fromJD:function(A){A=Math.floor(A)+.5;for(var v=Math.floor((A-this.jdEpoch)*98496/35975351)-1;A>=this.toJD(v===-1?1:v+1,7,1);)v++;for(var p=A<this.toJD(v,1,1)?7:1;A>this.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;t<v.length;t++){var r=parseInt(v[t],10);if(Math.abs(r)>19||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<t.month();n++)s+=this.daysPerMonth[n-1];return s+L.toJD(r+1468,3,13)},fromJD:function(A){A=Math.floor(A+.5);for(var v=Math.floor((A-(this.jdEpoch-1))/366);A>=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<L+2;v++)typeof this.NEPALI_CALENDAR_DATA[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-Juma","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;s<L.length;s++){if(L[s]>t)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;t<L.length&&!(L[t]>v);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(;u<h.minMonth;)c--,u+=h.monthsInYear(c);for(var o=h.monthsInYear(c);u>o-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.monthsInYear(l)&&s>=this.minDay&&s-this.minDay<this.daysInMonth(l)}return this._validateLevel--,n},toJSDate:function(t,r,s){var n=this._validate(t,r,s,p.local.invalidDate||p.regionalOptions[""].invalidDate);return p.instance().fromJD(this.toJD(n)).toJSDate()},fromJSDate:function(t){return this.fromJD(p.instance().fromJSDate(t).toJD())},_validate:function(t,r,s,n){if(t.year){if(this._validateLevel===0&&this.name!==t.calendar().name)throw(p.local.differentCalendars||p.regionalOptions[""].differentCalendars).replace(/\{0\}/,this.local.name).replace(/\{1\}/,t.calendar().local.name);return t}try{if(this._validateLevel++,this._validateLevel===1&&!this.isValid(t,r,s))throw n.replace(/\{0\}/,this.local.name);var l=this.newDate(t,r,s);return this._validateLevel--,l}catch(c){throw this._validateLevel--,c}}});function v(t){this.local=this.regionalOptions[t]||this.regionalOptions[""]}v.prototype=new A,m(v.prototype,{name:"Gregorian",jdEpoch:17214255e-1,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Gregorian",epochs:["BCE","CE"],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(s){var r=this._validate(s,this.minMonth,this.minDay,p.local.invalidYear||p.regionalOptions[""].invalidYear),s=r.year()+(r.year()<0?1:0);return s%4===0&&(s%100!==0||s%400===0)},weekOfYear:function(t,r,s){var n=this.newDate(t,r,s);return n.add(4-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,r){var s=this._validate(t,r,this.minDay,p.local.invalidMonth||p.regionalOptions[""].invalidMonth);return this.daysPerMonth[s.month()-1]+(s.month()===2&&this.leapYear(s.year())?1:0)},weekDay:function(t,r,s){return(this.dayOfWeek(t,r,s)||7)<6},toJD:function(t,r,s){var n=this._validate(t,r,s,p.local.invalidDate||p.regionalOptions[""].invalidDate);t=n.year(),r=n.month(),s=n.day(),t<0&&t++,r<3&&(r+=12,t--);var l=Math.floor(t/100),c=2-l+Math.floor(l/4);return Math.floor(365.25*(t+4716))+Math.floor(30.6001*(r+1))+s+c-1524.5},fromJD:function(t){var r=Math.floor(t+.5),s=Math.floor((r-186721625e-2)/36524.25);s=r+1+s-Math.floor(s/4);var n=s+1524,l=Math.floor((n-122.1)/365.25),c=Math.floor(365.25*l),u=Math.floor((n-c)/30.6001),g=n-c-Math.floor(u*30.6001),f=u-(u>13.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+x<i.length&&i.charAt(M+x)===T;)x++;return M+=x-1,Math.floor(x/(C||1))>1},l=function(T,C,x,S){var b=""+C;if(n(T,S))for(;b.length<x;)b="0"+b;return b},c=function(T,C,x,S){return n(T)?S[C]:x[C]},u=this,g=function(T){return typeof t=="function"?t.call(u,T,n("m")):h(l("m",T.month(),2))},f=function(T,C){return C?typeof s=="function"?s.call(u,T):s[T.month()-u.minMonth]:typeof r=="function"?r.call(u,T):r[T.month()-u.minMonth]},w=this.local.digits,h=function(T){return A.localNumbers&&w?w(T):T},o="",d=!1,M=0;M<i.length;M++)if(d)i.charAt(M)==="'"&&!n("'")?d=!1:o+=i.charAt(M);else switch(i.charAt(M)){case"d":o+=h(l("d",L.day(),2));break;case"D":o+=c("D",L.dayOfWeek(),v,p);break;case"o":o+=l("o",L.dayOfYear(),3);break;case"w":o+=l("w",L.weekOfYear(),2);break;case"m":o+=g(L);break;case"M":o+=f(L,n("M"));break;case"y":o+=n("y",2)?L.year():(L.year()%100<10?"0":"")+L.year()%100;break;case"Y":n("Y",2),o+=L.formatYear();break;case"J":o+=L.toJD();break;case"@":o+=(L.toJD()-this.UNIX_EPOCH)*this.SECS_PER_DAY;break;case"!":o+=(L.toJD()-this.TICKS_EPOCH)*this.TICKS_PER_DAY;break;case"'":n("'")?o+="'":d=!0;break;default:o+=i.charAt(M)}return o},parseDate:function(i,L,A){if(L==null)throw P.local.invalidArguments||P.regionalOptions[""].invalidArguments;if(L=typeof L=="object"?L.toString():L+"",L==="")return null;i=i||this.local.dateFormat,A=A||{};var v=A.shortYearCutoff||this.shortYearCutoff;v=typeof v!="string"?v:this.today().year()%100+parseInt(v,10);for(var p=A.dayNamesShort||this.local.dayNamesShort,t=A.dayNames||this.local.dayNames,r=A.parseMonth||this.local.parseMonth,s=A.monthNumbers||this.local.monthNumbers,n=A.monthNamesShort||this.local.monthNamesShort,l=A.monthNames||this.local.monthNames,c=-1,u=-1,g=-1,f=-1,w=-1,h=!1,o=!1,d=function(I,B){for(var k=1;E+k<i.length&&i.charAt(E+k)===I;)k++;return E+=k-1,Math.floor(k/(B||1))>1},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;_<N.length;_++)if(L.substr(a,N[_].length).toLowerCase()===N[_].toLowerCase())return a+=N[_].length,_+T.minMonth;throw(P.local.unknownNameAt||P.regionalOptions[""].unknownNameAt).replace(/\{0\}/,a)},S=function(){if(typeof l=="function"){var I=d("M")?l.call(T,L.substring(a)):n.call(T,L.substring(a));return a+=I.length,I}return x("M",n,l)},b=function(){if(L.charAt(a)!==i.charAt(E))throw(P.local.unexpectedLiteralAt||P.regionalOptions[""].unexpectedLiteralAt).replace(/\{0\}/,a);a++},a=0,E=0;E<i.length;E++)if(o)i.charAt(E)==="'"&&!d("'")?o=!1:b();else switch(i.charAt(E)){case"d":f=M("d");break;case"D":x("D",p,t);break;case"o":w=M("o");break;case"w":M("w");break;case"m":g=C();break;case"M":g=S();break;case"y":var y=E;h=!d("y",2),E=y,u=M("y",2);break;case"Y":u=M("Y",2);break;case"J":c=M("J")+.5,L.charAt(a)==="."&&(a++,M("J"));break;case"@":c=M("@")/this.SECS_PER_DAY+this.UNIX_EPOCH;break;case"!":c=M("!")/this.TICKS_PER_DAY+this.TICKS_EPOCH;break;case"*":a=L.length;break;case"'":d("'")?b():o=!0;break;default:b()}if(a<L.length)throw P.local.unexpectedText||P.regionalOptions[""].unexpectedText;if(u===-1?u=this.today().year():u<100&&h&&(u+=v===-1?1900:this.today().year()-this.today().year()%100-(u<=v?0:100)),typeof g=="string"&&(g=r.call(this,u,g)),w>-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<m.length;A++)typeof P[m[A]]=="function"&&(L[L.length]=m[A]);return L}},81684:function(G,V,e){e.d(V,{sX:function(){return Ee},k4:function(){return oe}});function m(xe,Se,Ue){xe.prototype=Se.prototype=Ue,Ue.constructor=xe}function P(xe,Se){var Ue=Object.create(xe.prototype);for(var He in Se)Ue[He]=Se[He];return Ue}function i(){}var L=.7,A=1/L,v="\\s*([+-]?\\d+)\\s*",p="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",t="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",r=/^#([0-9a-f]{3,8})$/,s=new RegExp("^rgb\\(".concat(v,",").concat(v,",").concat(v,"\\)$")),n=new RegExp("^rgb\\(".concat(t,",").concat(t,",").concat(t,"\\)$")),l=new RegExp("^rgba\\(".concat(v,",").concat(v,",").concat(v,",").concat(p,"\\)$")),c=new RegExp("^rgba\\(".concat(t,",").concat(t,",").concat(t,",").concat(p,"\\)$")),u=new RegExp("^hsl\\(".concat(p,",").concat(t,",").concat(t,"\\)$")),g=new RegExp("^hsla\\(".concat(p,",").concat(t,",").concat(t,",").concat(p,"\\)$")),f={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};m(i,M,{copy:function(Se){return Object.assign(new this.constructor,this,Se)},displayable:function(){return this.rgb().displayable()},hex:w,formatHex:w,formatHex8:h,formatHsl:o,formatRgb:d,toString:d});function w(){return this.rgb().formatHex()}function h(){return this.rgb().formatHex8()}function o(){return O(this).formatHsl()}function d(){return this.rgb().formatRgb()}function M(xe){var Se,Ue;return xe=(xe+"").trim().toLowerCase(),(Se=r.exec(xe))?(Ue=Se[1].length,Se=parseInt(Se[1],16),Ue===6?T(Se):Ue===3?new b(Se>>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+(Ue<He)*6:Ue===Ge?nt=(He-Se)/qe+2:nt=(Se-Ue)/qe+4,qe/=$e<.5?Ge+Fe:2-Ge-Fe,nt*=60):qe=$e>0&&$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;nt<He;++nt)Fe[nt]=Ee(xe[nt],Se[nt]);for(;nt<Ue;++nt)Ge[nt]=Se[nt];return function(qe){for(nt=0;nt<He;++nt)Ge[nt]=Fe[nt](qe);return Ge}}function ee(xe,Se){var Ue=new Date;return xe=+xe,Se=+Se,function(He){return Ue.setTime(xe*(1-He)+Se*He),Ue}}function oe(xe,Se){return xe=+xe,Se=+Se,function(Ue){return xe*(1-Ue)+Se*Ue}}function q(xe){"@babel/helpers - typeof";return q=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},q(xe)}function $(xe,Se){var Ue={},He={},Fe;(xe===null||q(xe)!=="object")&&(xe={}),(Se===null||q(Se)!=="object")&&(Se={});for(Fe in Se)Fe in xe?Ue[Fe]=Ee(xe[Fe],Se[Fe]):He[Fe]=Se[Fe];return function(Ge){for(Fe in Ue)He[Fe]=Ue[Fe](Ge);return He}}var le=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ie=new RegExp(le.source,"g");function he(xe){return function(){return xe}}function me(xe){return function(Se){return xe(Se)+""}}function Me(xe,Se){var Ue=le.lastIndex=ie.lastIndex=0,He,Fe,Ge,nt=-1,qe=[],$e=[];for(xe=xe+"",Se=Se+"";(He=le.exec(xe))&&(Fe=ie.exec(Se));)(Ge=Fe.index)>Ue&&(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<Se.length&&(Ge=Se.slice(Ue),qe[nt]?qe[nt]+=Ge:qe[++nt]=Ge),qe.length<2?$e[0]?me($e[0].x):he(Se):(Se=$e.length,function(et){for(var ct=0,dt;ct<Se;++ct)qe[(dt=$e[ct]).i]=dt.x(et);return qe.join("")})}function Te(xe,Se){Se||(Se=[]);var Ue=xe?Math.min(Se.length,xe.length):0,He=Se.slice(),Fe;return function(Ge){for(Fe=0;Fe<Ue;++Fe)He[Fe]=xe[Fe]*(1-Ge)+Se[Fe]*Ge;return He}}function Oe(xe){return ArrayBuffer.isView(xe)&&!(xe instanceof DataView)}function Ne(xe){"@babel/helpers - typeof";return Ne=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},Ne(xe)}function Ee(xe,Se){var Ue=Ne(Se),He;return Se==null||Ue==="boolean"?te(Se):(Ue==="number"?oe:Ue==="string"?(He=M(Se))?(Se=He,j):Me:Se instanceof M?j:Se instanceof Date?ee:Oe(Se)?Te:Array.isArray(Se)?K:typeof Se.valueOf!="function"&&typeof Se.toString!="function"||isNaN(Se)?$:oe)(xe,Se)}},40402:function(G){G.exports=JSON.parse('["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]')},83794:function(G){G.exports=JSON.parse('["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]')},96209:function(G){G.exports=JSON.parse('["normal","italic","oblique"]')},15659:function(G){G.exports=JSON.parse('["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]')},38732:function(G){G.exports=JSON.parse('["inherit","initial","unset"]')},41901:function(G){G.exports=JSON.parse('["caption","icon","menu","message-box","small-caption","status-bar"]')}},we={};function ke(G){var V=we[G];if(V!==void 0)return V.exports;var e=we[G]={exports:{}};return ue[G].call(e.exports,e,e.exports,ke),e.exports}(function(){ke.n=function(G){var V=G&&G.__esModule?function(){return G.default}:function(){return G};return ke.d(V,{a:V}),V}})(),function(){ke.d=function(G,V){for(var e in V)ke.o(V,e)&&!ke.o(G,e)&&Object.defineProperty(G,e,{enumerable:!0,get:V[e]})}}(),function(){ke.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}()}(),function(){ke.o=function(G,V){return Object.prototype.hasOwnProperty.call(G,V)}}(),function(){ke.r=function(G){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(G,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(G,"__esModule",{value:!0})}}();var Xe=ke(27909);return Xe}()})})(VT);var mE=VT.exports;const xE=fg(mE);var HT={exports:{}},GT={};/**
* @license React
* use-sync-external-store-shim.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 jv=Fn;function bE(F,W){return F===W&&(F!==0||1/F===1/W)||F!==F&&W!==W}var wE=typeof Object.is=="function"?Object.is:bE,TE=jv.useState,AE=jv.useEffect,ME=jv.useLayoutEffect,SE=jv.useDebugValue;function EE(F,W){var ue=W(),we=TE({inst:{value:ue,getSnapshot:W}}),ke=we[0].inst,Xe=we[1];return ME(function(){ke.value=ue,ke.getSnapshot=W,Wy(ke)&&Xe({inst:ke})},[F,ue,W]),AE(function(){return Wy(ke)&&Xe({inst:ke}),F(function(){Wy(ke)&&Xe({inst:ke})})},[F]),SE(ue),ue}function Wy(F){var W=F.getSnapshot;F=F.value;try{var ue=W();return!wE(F,ue)}catch{return!0}}function CE(F,W){return W()}var LE=typeof window>"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;Xe<F.length;Xe++)ke+=dp(F[Xe])+",";b0.set(F,ke)}if(ue==Yy){ke="#";const G=Yy.keys(F).sort();for(;!Ei(Xe=G.pop());)Ei(F[Xe])||(ke+=Xe+":"+dp(F[Xe])+",");b0.set(F,ke)}}else ke=we?F.toJSON():W=="symbol"?F.toString():W=="string"?JSON.stringify(F):""+F;return ke},Gf=new WeakMap,Zy={},w0={},sx="undefined",kg=typeof window!=sx,K1=typeof document!=sx,IE=()=>kg&&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,{})}));