(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const re of document.querySelectorAll('link[rel="modulepreload"]'))L(re);new MutationObserver(re=>{for(const ve of re)if(ve.type==="childList")for(const Ce of ve.addedNodes)Ce.tagName==="LINK"&&Ce.rel==="modulepreload"&&L(Ce)}).observe(document,{childList:!0,subtree:!0});function S(re){const ve={};return re.integrity&&(ve.integrity=re.integrity),re.referrerPolicy&&(ve.referrerPolicy=re.referrerPolicy),re.crossOrigin==="use-credentials"?ve.credentials="include":re.crossOrigin==="anonymous"?ve.credentials="omit":ve.credentials="same-origin",ve}function L(re){if(re.ep)return;re.ep=!0;const ve=S(re);fetch(re.href,ve)}})();var d6=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ih(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var F8={exports:{}},R5={};/**
 * @license React
 * react-jsx-runtime.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var gB;function Wae(){if(gB)return R5;gB=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function S(L,re,ve){var Ce=null;if(ve!==void 0&&(Ce=""+ve),re.key!==void 0&&(Ce=""+re.key),"key"in re){ve={};for(var Be in re)Be!=="key"&&(ve[Be]=re[Be])}else ve=re;return re=ve.ref,{$$typeof:e,type:L,key:Ce,ref:re!==void 0?re:null,props:ve}}return R5.Fragment=n,R5.jsx=S,R5.jsxs=S,R5}var yB;function Yae(){return yB||(yB=1,F8.exports=Wae()),F8.exports}var lt=Yae(),B8={exports:{}},Nu={};/**
 * @license React
 * react.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var _B;function Zae(){if(_B)return Nu;_B=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),L=Symbol.for("react.strict_mode"),re=Symbol.for("react.profiler"),ve=Symbol.for("react.consumer"),Ce=Symbol.for("react.context"),Be=Symbol.for("react.forward_ref"),Ge=Symbol.for("react.suspense"),Ke=Symbol.for("react.memo"),dt=Symbol.for("react.lazy"),gt=Symbol.for("react.activity"),Vt=Symbol.iterator;function Xt(ya){return ya===null||typeof ya!="object"?null:(ya=Vt&&ya[Vt]||ya["@@iterator"],typeof ya=="function"?ya:null)}var cr={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},sr=Object.assign,nr={};function zr(ya,Wn,Ei){this.props=ya,this.context=Wn,this.refs=nr,this.updater=Ei||cr}zr.prototype.isReactComponent={},zr.prototype.setState=function(ya,Wn){if(typeof ya!="object"&&typeof ya!="function"&&ya!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,ya,Wn,"setState")},zr.prototype.forceUpdate=function(ya){this.updater.enqueueForceUpdate(this,ya,"forceUpdate")};function Ne(){}Ne.prototype=zr.prototype;function Jr(ya,Wn,Ei){this.props=ya,this.context=Wn,this.refs=nr,this.updater=Ei||cr}var pn=Jr.prototype=new Ne;pn.constructor=Jr,sr(pn,zr.prototype),pn.isPureReactComponent=!0;var Lr=Array.isArray;function Or(){}var cn={H:null,A:null,T:null,S:null},$n=Object.prototype.hasOwnProperty;function xn(ya,Wn,Ei){var $i=Ei.ref;return{$$typeof:e,type:ya,key:Wn,ref:$i!==void 0?$i:null,props:Ei}}function Wa(ya,Wn){return xn(ya.type,Wn,ya.props)}function On(ya){return typeof ya=="object"&&ya!==null&&ya.$$typeof===e}function qn(ya){var Wn={"=":"=0",":":"=2"};return"$"+ya.replace(/[=:]/g,function(Ei){return Wn[Ei]})}var ca=/\/+/g;function Fn(ya,Wn){return typeof ya=="object"&&ya!==null&&ya.key!=null?qn(""+ya.key):Wn.toString(36)}function da(ya){switch(ya.status){case"fulfilled":return ya.value;case"rejected":throw ya.reason;default:switch(typeof ya.status=="string"?ya.then(Or,Or):(ya.status="pending",ya.then(function(Wn){ya.status==="pending"&&(ya.status="fulfilled",ya.value=Wn)},function(Wn){ya.status==="pending"&&(ya.status="rejected",ya.reason=Wn)})),ya.status){case"fulfilled":return ya.value;case"rejected":throw ya.reason}}throw ya}function ea(ya,Wn,Ei,$i,to){var fi=typeof ya;(fi==="undefined"||fi==="boolean")&&(ya=null);var bo=!1;if(ya===null)bo=!0;else switch(fi){case"bigint":case"string":case"number":bo=!0;break;case"object":switch(ya.$$typeof){case e:case n:bo=!0;break;case dt:return bo=ya._init,ea(bo(ya._payload),Wn,Ei,$i,to)}}if(bo)return to=to(ya),bo=$i===""?"."+Fn(ya,0):$i,Lr(to)?(Ei="",bo!=null&&(Ei=bo.replace(ca,"$&/")+"/"),ea(to,Wn,Ei,"",function(Hs){return Hs})):to!=null&&(On(to)&&(to=Wa(to,Ei+(to.key==null||ya&&ya.key===to.key?"":(""+to.key).replace(ca,"$&/")+"/")+bo)),Wn.push(to)),1;bo=0;var Ll=$i===""?".":$i+":";if(Lr(ya))for(var Mo=0;Mo<ya.length;Mo++)$i=ya[Mo],fi=Ll+Fn($i,Mo),bo+=ea($i,Wn,Ei,fi,to);else if(Mo=Xt(ya),typeof Mo=="function")for(ya=Mo.call(ya),Mo=0;!($i=ya.next()).done;)$i=$i.value,fi=Ll+Fn($i,Mo++),bo+=ea($i,Wn,Ei,fi,to);else if(fi==="object"){if(typeof ya.then=="function")return ea(da(ya),Wn,Ei,$i,to);throw Wn=String(ya),Error("Objects are not valid as a React child (found: "+(Wn==="[object Object]"?"object with keys {"+Object.keys(ya).join(", ")+"}":Wn)+"). If you meant to render a collection of children, use an array instead.")}return bo}function qa(ya,Wn,Ei){if(ya==null)return ya;var $i=[],to=0;return ea(ya,$i,"","",function(fi){return Wn.call(Ei,fi,to++)}),$i}function Ri(ya){if(ya._status===-1){var Wn=ya._result;Wn=Wn(),Wn.then(function(Ei){(ya._status===0||ya._status===-1)&&(ya._status=1,ya._result=Ei)},function(Ei){(ya._status===0||ya._status===-1)&&(ya._status=2,ya._result=Ei)}),ya._status===-1&&(ya._status=0,ya._result=Wn)}if(ya._status===1)return ya._result.default;throw ya._result}var mi=typeof reportError=="function"?reportError:function(ya){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Wn=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof ya=="object"&&ya!==null&&typeof ya.message=="string"?String(ya.message):String(ya),error:ya});if(!window.dispatchEvent(Wn))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",ya);return}console.error(ya)},Io={map:qa,forEach:function(ya,Wn,Ei){qa(ya,function(){Wn.apply(this,arguments)},Ei)},count:function(ya){var Wn=0;return qa(ya,function(){Wn++}),Wn},toArray:function(ya){return qa(ya,function(Wn){return Wn})||[]},only:function(ya){if(!On(ya))throw Error("React.Children.only expected to receive a single React element child.");return ya}};return Nu.Activity=gt,Nu.Children=Io,Nu.Component=zr,Nu.Fragment=S,Nu.Profiler=re,Nu.PureComponent=Jr,Nu.StrictMode=L,Nu.Suspense=Ge,Nu.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=cn,Nu.__COMPILER_RUNTIME={__proto__:null,c:function(ya){return cn.H.useMemoCache(ya)}},Nu.cache=function(ya){return function(){return ya.apply(null,arguments)}},Nu.cacheSignal=function(){return null},Nu.cloneElement=function(ya,Wn,Ei){if(ya==null)throw Error("The argument must be a React element, but you passed "+ya+".");var $i=sr({},ya.props),to=ya.key;if(Wn!=null)for(fi in Wn.key!==void 0&&(to=""+Wn.key),Wn)!$n.call(Wn,fi)||fi==="key"||fi==="__self"||fi==="__source"||fi==="ref"&&Wn.ref===void 0||($i[fi]=Wn[fi]);var fi=arguments.length-2;if(fi===1)$i.children=Ei;else if(1<fi){for(var bo=Array(fi),Ll=0;Ll<fi;Ll++)bo[Ll]=arguments[Ll+2];$i.children=bo}return xn(ya.type,to,$i)},Nu.createContext=function(ya){return ya={$$typeof:Ce,_currentValue:ya,_currentValue2:ya,_threadCount:0,Provider:null,Consumer:null},ya.Provider=ya,ya.Consumer={$$typeof:ve,_context:ya},ya},Nu.createElement=function(ya,Wn,Ei){var $i,to={},fi=null;if(Wn!=null)for($i in Wn.key!==void 0&&(fi=""+Wn.key),Wn)$n.call(Wn,$i)&&$i!=="key"&&$i!=="__self"&&$i!=="__source"&&(to[$i]=Wn[$i]);var bo=arguments.length-2;if(bo===1)to.children=Ei;else if(1<bo){for(var Ll=Array(bo),Mo=0;Mo<bo;Mo++)Ll[Mo]=arguments[Mo+2];to.children=Ll}if(ya&&ya.defaultProps)for($i in bo=ya.defaultProps,bo)to[$i]===void 0&&(to[$i]=bo[$i]);return xn(ya,fi,to)},Nu.createRef=function(){return{current:null}},Nu.forwardRef=function(ya){return{$$typeof:Be,render:ya}},Nu.isValidElement=On,Nu.lazy=function(ya){return{$$typeof:dt,_payload:{_status:-1,_result:ya},_init:Ri}},Nu.memo=function(ya,Wn){return{$$typeof:Ke,type:ya,compare:Wn===void 0?null:Wn}},Nu.startTransition=function(ya){var Wn=cn.T,Ei={};cn.T=Ei;try{var $i=ya(),to=cn.S;to!==null&&to(Ei,$i),typeof $i=="object"&&$i!==null&&typeof $i.then=="function"&&$i.then(Or,mi)}catch(fi){mi(fi)}finally{Wn!==null&&Ei.types!==null&&(Wn.types=Ei.types),cn.T=Wn}},Nu.unstable_useCacheRefresh=function(){return cn.H.useCacheRefresh()},Nu.use=function(ya){return cn.H.use(ya)},Nu.useActionState=function(ya,Wn,Ei){return cn.H.useActionState(ya,Wn,Ei)},Nu.useCallback=function(ya,Wn){return cn.H.useCallback(ya,Wn)},Nu.useContext=function(ya){return cn.H.useContext(ya)},Nu.useDebugValue=function(){},Nu.useDeferredValue=function(ya,Wn){return cn.H.useDeferredValue(ya,Wn)},Nu.useEffect=function(ya,Wn){return cn.H.useEffect(ya,Wn)},Nu.useEffectEvent=function(ya){return cn.H.useEffectEvent(ya)},Nu.useId=function(){return cn.H.useId()},Nu.useImperativeHandle=function(ya,Wn,Ei){return cn.H.useImperativeHandle(ya,Wn,Ei)},Nu.useInsertionEffect=function(ya,Wn){return cn.H.useInsertionEffect(ya,Wn)},Nu.useLayoutEffect=function(ya,Wn){return cn.H.useLayoutEffect(ya,Wn)},Nu.useMemo=function(ya,Wn){return cn.H.useMemo(ya,Wn)},Nu.useOptimistic=function(ya,Wn){return cn.H.useOptimistic(ya,Wn)},Nu.useReducer=function(ya,Wn,Ei){return cn.H.useReducer(ya,Wn,Ei)},Nu.useRef=function(ya){return cn.H.useRef(ya)},Nu.useState=function(ya){return cn.H.useState(ya)},Nu.useSyncExternalStore=function(ya,Wn,Ei){return cn.H.useSyncExternalStore(ya,Wn,Ei)},Nu.useTransition=function(){return cn.H.useTransition()},Nu.version="19.2.0",Nu}var xB;function OP(){return xB||(xB=1,B8.exports=Zae()),B8.exports}var na=OP();const la=ih(na);var j8={exports:{}},I5={},U8={exports:{}},q8={};/**
 * @license React
 * scheduler.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var bB;function $ae(){return bB||(bB=1,(function(e){function n(ea,qa){var Ri=ea.length;ea.push(qa);e:for(;0<Ri;){var mi=Ri-1>>>1,Io=ea[mi];if(0<re(Io,qa))ea[mi]=qa,ea[Ri]=Io,Ri=mi;else break e}}function S(ea){return ea.length===0?null:ea[0]}function L(ea){if(ea.length===0)return null;var qa=ea[0],Ri=ea.pop();if(Ri!==qa){ea[0]=Ri;e:for(var mi=0,Io=ea.length,ya=Io>>>1;mi<ya;){var Wn=2*(mi+1)-1,Ei=ea[Wn],$i=Wn+1,to=ea[$i];if(0>re(Ei,Ri))$i<Io&&0>re(to,Ei)?(ea[mi]=to,ea[$i]=Ri,mi=$i):(ea[mi]=Ei,ea[Wn]=Ri,mi=Wn);else if($i<Io&&0>re(to,Ri))ea[mi]=to,ea[$i]=Ri,mi=$i;else break e}}return qa}function re(ea,qa){var Ri=ea.sortIndex-qa.sortIndex;return Ri!==0?Ri:ea.id-qa.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var ve=performance;e.unstable_now=function(){return ve.now()}}else{var Ce=Date,Be=Ce.now();e.unstable_now=function(){return Ce.now()-Be}}var Ge=[],Ke=[],dt=1,gt=null,Vt=3,Xt=!1,cr=!1,sr=!1,nr=!1,zr=typeof setTimeout=="function"?setTimeout:null,Ne=typeof clearTimeout=="function"?clearTimeout:null,Jr=typeof setImmediate<"u"?setImmediate:null;function pn(ea){for(var qa=S(Ke);qa!==null;){if(qa.callback===null)L(Ke);else if(qa.startTime<=ea)L(Ke),qa.sortIndex=qa.expirationTime,n(Ge,qa);else break;qa=S(Ke)}}function Lr(ea){if(sr=!1,pn(ea),!cr)if(S(Ge)!==null)cr=!0,Or||(Or=!0,qn());else{var qa=S(Ke);qa!==null&&da(Lr,qa.startTime-ea)}}var Or=!1,cn=-1,$n=5,xn=-1;function Wa(){return nr?!0:!(e.unstable_now()-xn<$n)}function On(){if(nr=!1,Or){var ea=e.unstable_now();xn=ea;var qa=!0;try{e:{cr=!1,sr&&(sr=!1,Ne(cn),cn=-1),Xt=!0;var Ri=Vt;try{t:{for(pn(ea),gt=S(Ge);gt!==null&&!(gt.expirationTime>ea&&Wa());){var mi=gt.callback;if(typeof mi=="function"){gt.callback=null,Vt=gt.priorityLevel;var Io=mi(gt.expirationTime<=ea);if(ea=e.unstable_now(),typeof Io=="function"){gt.callback=Io,pn(ea),qa=!0;break t}gt===S(Ge)&&L(Ge),pn(ea)}else L(Ge);gt=S(Ge)}if(gt!==null)qa=!0;else{var ya=S(Ke);ya!==null&&da(Lr,ya.startTime-ea),qa=!1}}break e}finally{gt=null,Vt=Ri,Xt=!1}qa=void 0}}finally{qa?qn():Or=!1}}}var qn;if(typeof Jr=="function")qn=function(){Jr(On)};else if(typeof MessageChannel<"u"){var ca=new MessageChannel,Fn=ca.port2;ca.port1.onmessage=On,qn=function(){Fn.postMessage(null)}}else qn=function(){zr(On,0)};function da(ea,qa){cn=zr(function(){ea(e.unstable_now())},qa)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(ea){ea.callback=null},e.unstable_forceFrameRate=function(ea){0>ea||125<ea?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$n=0<ea?Math.floor(1e3/ea):5},e.unstable_getCurrentPriorityLevel=function(){return Vt},e.unstable_next=function(ea){switch(Vt){case 1:case 2:case 3:var qa=3;break;default:qa=Vt}var Ri=Vt;Vt=qa;try{return ea()}finally{Vt=Ri}},e.unstable_requestPaint=function(){nr=!0},e.unstable_runWithPriority=function(ea,qa){switch(ea){case 1:case 2:case 3:case 4:case 5:break;default:ea=3}var Ri=Vt;Vt=ea;try{return qa()}finally{Vt=Ri}},e.unstable_scheduleCallback=function(ea,qa,Ri){var mi=e.unstable_now();switch(typeof Ri=="object"&&Ri!==null?(Ri=Ri.delay,Ri=typeof Ri=="number"&&0<Ri?mi+Ri:mi):Ri=mi,ea){case 1:var Io=-1;break;case 2:Io=250;break;case 5:Io=1073741823;break;case 4:Io=1e4;break;default:Io=5e3}return Io=Ri+Io,ea={id:dt++,callback:qa,priorityLevel:ea,startTime:Ri,expirationTime:Io,sortIndex:-1},Ri>mi?(ea.sortIndex=Ri,n(Ke,ea),S(Ge)===null&&ea===S(Ke)&&(sr?(Ne(cn),cn=-1):sr=!0,da(Lr,Ri-mi))):(ea.sortIndex=Io,n(Ge,ea),cr||Xt||(cr=!0,Or||(Or=!0,qn()))),ea},e.unstable_shouldYield=Wa,e.unstable_wrapCallback=function(ea){var qa=Vt;return function(){var Ri=Vt;Vt=qa;try{return ea.apply(this,arguments)}finally{Vt=Ri}}}})(q8)),q8}var wB;function Kae(){return wB||(wB=1,U8.exports=$ae()),U8.exports}var V8={exports:{}},Op={};/**
 * @license React
 * react-dom.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var TB;function Jae(){if(TB)return Op;TB=1;var e=OP();function n(Ge){var Ke="https://react.dev/errors/"+Ge;if(1<arguments.length){Ke+="?args[]="+encodeURIComponent(arguments[1]);for(var dt=2;dt<arguments.length;dt++)Ke+="&args[]="+encodeURIComponent(arguments[dt])}return"Minified React error #"+Ge+"; visit "+Ke+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function S(){}var L={d:{f:S,r:function(){throw Error(n(522))},D:S,C:S,L:S,m:S,X:S,S,M:S},p:0,findDOMNode:null},re=Symbol.for("react.portal");function ve(Ge,Ke,dt){var gt=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:re,key:gt==null?null:""+gt,children:Ge,containerInfo:Ke,implementation:dt}}var Ce=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function Be(Ge,Ke){if(Ge==="font")return"";if(typeof Ke=="string")return Ke==="use-credentials"?Ke:""}return Op.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=L,Op.createPortal=function(Ge,Ke){var dt=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Ke||Ke.nodeType!==1&&Ke.nodeType!==9&&Ke.nodeType!==11)throw Error(n(299));return ve(Ge,Ke,null,dt)},Op.flushSync=function(Ge){var Ke=Ce.T,dt=L.p;try{if(Ce.T=null,L.p=2,Ge)return Ge()}finally{Ce.T=Ke,L.p=dt,L.d.f()}},Op.preconnect=function(Ge,Ke){typeof Ge=="string"&&(Ke?(Ke=Ke.crossOrigin,Ke=typeof Ke=="string"?Ke==="use-credentials"?Ke:"":void 0):Ke=null,L.d.C(Ge,Ke))},Op.prefetchDNS=function(Ge){typeof Ge=="string"&&L.d.D(Ge)},Op.preinit=function(Ge,Ke){if(typeof Ge=="string"&&Ke&&typeof Ke.as=="string"){var dt=Ke.as,gt=Be(dt,Ke.crossOrigin),Vt=typeof Ke.integrity=="string"?Ke.integrity:void 0,Xt=typeof Ke.fetchPriority=="string"?Ke.fetchPriority:void 0;dt==="style"?L.d.S(Ge,typeof Ke.precedence=="string"?Ke.precedence:void 0,{crossOrigin:gt,integrity:Vt,fetchPriority:Xt}):dt==="script"&&L.d.X(Ge,{crossOrigin:gt,integrity:Vt,fetchPriority:Xt,nonce:typeof Ke.nonce=="string"?Ke.nonce:void 0})}},Op.preinitModule=function(Ge,Ke){if(typeof Ge=="string")if(typeof Ke=="object"&&Ke!==null){if(Ke.as==null||Ke.as==="script"){var dt=Be(Ke.as,Ke.crossOrigin);L.d.M(Ge,{crossOrigin:dt,integrity:typeof Ke.integrity=="string"?Ke.integrity:void 0,nonce:typeof Ke.nonce=="string"?Ke.nonce:void 0})}}else Ke==null&&L.d.M(Ge)},Op.preload=function(Ge,Ke){if(typeof Ge=="string"&&typeof Ke=="object"&&Ke!==null&&typeof Ke.as=="string"){var dt=Ke.as,gt=Be(dt,Ke.crossOrigin);L.d.L(Ge,dt,{crossOrigin:gt,integrity:typeof Ke.integrity=="string"?Ke.integrity:void 0,nonce:typeof Ke.nonce=="string"?Ke.nonce:void 0,type:typeof Ke.type=="string"?Ke.type:void 0,fetchPriority:typeof Ke.fetchPriority=="string"?Ke.fetchPriority:void 0,referrerPolicy:typeof Ke.referrerPolicy=="string"?Ke.referrerPolicy:void 0,imageSrcSet:typeof Ke.imageSrcSet=="string"?Ke.imageSrcSet:void 0,imageSizes:typeof Ke.imageSizes=="string"?Ke.imageSizes:void 0,media:typeof Ke.media=="string"?Ke.media:void 0})}},Op.preloadModule=function(Ge,Ke){if(typeof Ge=="string")if(Ke){var dt=Be(Ke.as,Ke.crossOrigin);L.d.m(Ge,{as:typeof Ke.as=="string"&&Ke.as!=="script"?Ke.as:void 0,crossOrigin:dt,integrity:typeof Ke.integrity=="string"?Ke.integrity:void 0})}else L.d.m(Ge)},Op.requestFormReset=function(Ge){L.d.r(Ge)},Op.unstable_batchedUpdates=function(Ge,Ke){return Ge(Ke)},Op.useFormState=function(Ge,Ke,dt){return Ce.H.useFormState(Ge,Ke,dt)},Op.useFormStatus=function(){return Ce.H.useHostTransitionStatus()},Op.version="19.2.0",Op}var AB;function JX(){if(AB)return V8.exports;AB=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),V8.exports=Jae(),V8.exports}/**
 * @license React
 * react-dom-client.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var SB;function Qae(){if(SB)return I5;SB=1;var e=Kae(),n=OP(),S=JX();function L(j){var Q="https://react.dev/errors/"+j;if(1<arguments.length){Q+="?args[]="+encodeURIComponent(arguments[1]);for(var xe=2;xe<arguments.length;xe++)Q+="&args[]="+encodeURIComponent(arguments[xe])}return"Minified React error #"+j+"; visit "+Q+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function re(j){return!(!j||j.nodeType!==1&&j.nodeType!==9&&j.nodeType!==11)}function ve(j){var Q=j,xe=j;if(j.alternate)for(;Q.return;)Q=Q.return;else{j=Q;do Q=j,(Q.flags&4098)!==0&&(xe=Q.return),j=Q.return;while(j)}return Q.tag===3?xe:null}function Ce(j){if(j.tag===13){var Q=j.memoizedState;if(Q===null&&(j=j.alternate,j!==null&&(Q=j.memoizedState)),Q!==null)return Q.dehydrated}return null}function Be(j){if(j.tag===31){var Q=j.memoizedState;if(Q===null&&(j=j.alternate,j!==null&&(Q=j.memoizedState)),Q!==null)return Q.dehydrated}return null}function Ge(j){if(ve(j)!==j)throw Error(L(188))}function Ke(j){var Q=j.alternate;if(!Q){if(Q=ve(j),Q===null)throw Error(L(188));return Q!==j?null:j}for(var xe=j,Ue=Q;;){var bt=xe.return;if(bt===null)break;var jt=bt.alternate;if(jt===null){if(Ue=bt.return,Ue!==null){xe=Ue;continue}break}if(bt.child===jt.child){for(jt=bt.child;jt;){if(jt===xe)return Ge(bt),j;if(jt===Ue)return Ge(bt),Q;jt=jt.sibling}throw Error(L(188))}if(xe.return!==Ue.return)xe=bt,Ue=jt;else{for(var Xr=!1,Nn=bt.child;Nn;){if(Nn===xe){Xr=!0,xe=bt,Ue=jt;break}if(Nn===Ue){Xr=!0,Ue=bt,xe=jt;break}Nn=Nn.sibling}if(!Xr){for(Nn=jt.child;Nn;){if(Nn===xe){Xr=!0,xe=jt,Ue=bt;break}if(Nn===Ue){Xr=!0,Ue=jt,xe=bt;break}Nn=Nn.sibling}if(!Xr)throw Error(L(189))}}if(xe.alternate!==Ue)throw Error(L(190))}if(xe.tag!==3)throw Error(L(188));return xe.stateNode.current===xe?j:Q}function dt(j){var Q=j.tag;if(Q===5||Q===26||Q===27||Q===6)return j;for(j=j.child;j!==null;){if(Q=dt(j),Q!==null)return Q;j=j.sibling}return null}var gt=Object.assign,Vt=Symbol.for("react.element"),Xt=Symbol.for("react.transitional.element"),cr=Symbol.for("react.portal"),sr=Symbol.for("react.fragment"),nr=Symbol.for("react.strict_mode"),zr=Symbol.for("react.profiler"),Ne=Symbol.for("react.consumer"),Jr=Symbol.for("react.context"),pn=Symbol.for("react.forward_ref"),Lr=Symbol.for("react.suspense"),Or=Symbol.for("react.suspense_list"),cn=Symbol.for("react.memo"),$n=Symbol.for("react.lazy"),xn=Symbol.for("react.activity"),Wa=Symbol.for("react.memo_cache_sentinel"),On=Symbol.iterator;function qn(j){return j===null||typeof j!="object"?null:(j=On&&j[On]||j["@@iterator"],typeof j=="function"?j:null)}var ca=Symbol.for("react.client.reference");function Fn(j){if(j==null)return null;if(typeof j=="function")return j.$$typeof===ca?null:j.displayName||j.name||null;if(typeof j=="string")return j;switch(j){case sr:return"Fragment";case zr:return"Profiler";case nr:return"StrictMode";case Lr:return"Suspense";case Or:return"SuspenseList";case xn:return"Activity"}if(typeof j=="object")switch(j.$$typeof){case cr:return"Portal";case Jr:return j.displayName||"Context";case Ne:return(j._context.displayName||"Context")+".Consumer";case pn:var Q=j.render;return j=j.displayName,j||(j=Q.displayName||Q.name||"",j=j!==""?"ForwardRef("+j+")":"ForwardRef"),j;case cn:return Q=j.displayName||null,Q!==null?Q:Fn(j.type)||"Memo";case $n:Q=j._payload,j=j._init;try{return Fn(j(Q))}catch{}}return null}var da=Array.isArray,ea=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,qa=S.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ri={pending:!1,data:null,method:null,action:null},mi=[],Io=-1;function ya(j){return{current:j}}function Wn(j){0>Io||(j.current=mi[Io],mi[Io]=null,Io--)}function Ei(j,Q){Io++,mi[Io]=j.current,j.current=Q}var $i=ya(null),to=ya(null),fi=ya(null),bo=ya(null);function Ll(j,Q){switch(Ei(fi,Q),Ei(to,j),Ei($i,null),Q.nodeType){case 9:case 11:j=(j=Q.documentElement)&&(j=j.namespaceURI)?CS(j):0;break;default:if(j=Q.tagName,Q=Q.namespaceURI)Q=CS(Q),j=kS(Q,j);else switch(j){case"svg":j=1;break;case"math":j=2;break;default:j=0}}Wn($i),Ei($i,j)}function Mo(){Wn($i),Wn(to),Wn(fi)}function Hs(j){j.memoizedState!==null&&Ei(bo,j);var Q=$i.current,xe=kS(Q,j.type);Q!==xe&&(Ei(to,j),Ei($i,xe))}function qo(j){to.current===j&&(Wn($i),Wn(to)),bo.current===j&&(Wn(bo),S_._currentValue=Ri)}var Di,js;function Ha(j){if(Di===void 0)try{throw Error()}catch(xe){var Q=xe.stack.trim().match(/\n( *(at )?)/);Di=Q&&Q[1]||"",js=-1<xe.stack.indexOf(`
    at`)?" (<anonymous>)":-1<xe.stack.indexOf("@")?"@unknown:0:0":""}return`
`+Di+j+js}var El=!1;function ml(j,Q){if(!j||El)return"";El=!0;var xe=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var Ue={DetermineComponentFrameRoot:function(){try{if(Q){var Po=function(){throw Error()};if(Object.defineProperty(Po.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Po,[])}catch(so){var Qi=so}Reflect.construct(j,[],Po)}else{try{Po.call()}catch(so){Qi=so}j.call(Po.prototype)}}else{try{throw Error()}catch(so){Qi=so}(Po=j())&&typeof Po.catch=="function"&&Po.catch(function(){})}}catch(so){if(so&&Qi&&typeof so.stack=="string")return[so.stack,Qi.stack]}return[null,null]}};Ue.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var bt=Object.getOwnPropertyDescriptor(Ue.DetermineComponentFrameRoot,"name");bt&&bt.configurable&&Object.defineProperty(Ue.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var jt=Ue.DetermineComponentFrameRoot(),Xr=jt[0],Nn=jt[1];if(Xr&&Nn){var Ya=Xr.split(`
`),Wi=Nn.split(`
`);for(bt=Ue=0;Ue<Ya.length&&!Ya[Ue].includes("DetermineComponentFrameRoot");)Ue++;for(;bt<Wi.length&&!Wi[bt].includes("DetermineComponentFrameRoot");)bt++;if(Ue===Ya.length||bt===Wi.length)for(Ue=Ya.length-1,bt=Wi.length-1;1<=Ue&&0<=bt&&Ya[Ue]!==Wi[bt];)bt--;for(;1<=Ue&&0<=bt;Ue--,bt--)if(Ya[Ue]!==Wi[bt]){if(Ue!==1||bt!==1)do if(Ue--,bt--,0>bt||Ya[Ue]!==Wi[bt]){var To=`
`+Ya[Ue].replace(" at new "," at ");return j.displayName&&To.includes("<anonymous>")&&(To=To.replace("<anonymous>",j.displayName)),To}while(1<=Ue&&0<=bt);break}}}finally{El=!1,Error.prepareStackTrace=xe}return(xe=j?j.displayName||j.name:"")?Ha(xe):""}function Vu(j,Q){switch(j.tag){case 26:case 27:case 5:return Ha(j.type);case 16:return Ha("Lazy");case 13:return j.child!==Q&&Q!==null?Ha("Suspense Fallback"):Ha("Suspense");case 19:return Ha("SuspenseList");case 0:case 15:return ml(j.type,!1);case 11:return ml(j.type.render,!1);case 1:return ml(j.type,!0);case 31:return Ha("Activity");default:return""}}function Gf(j){try{var Q="",xe=null;do Q+=Vu(j,xe),xe=j,j=j.return;while(j);return Q}catch(Ue){return`
Error generating stack: `+Ue.message+`
`+Ue.stack}}var zd=Object.prototype.hasOwnProperty,Nd=e.unstable_scheduleCallback,ad=e.unstable_cancelCallback,jp=e.unstable_shouldYield,Up=e.unstable_requestPaint,ov=e.unstable_now,P1=e.unstable_getCurrentPriorityLevel,Fv=e.unstable_ImmediatePriority,I0=e.unstable_UserBlockingPriority,L1=e.unstable_NormalPriority,WT=e.unstable_LowPriority,xy=e.unstable_IdlePriority,YT=e.log,Mw=e.unstable_setDisableYieldValue,D0=null,wd=null;function Am(j){if(typeof YT=="function"&&Mw(j),wd&&typeof wd.setStrictMode=="function")try{wd.setStrictMode(D0,j)}catch{}}var Td=Math.clz32?Math.clz32:Cw,ZT=Math.log,$T=Math.LN2;function Cw(j){return j>>>=0,j===0?32:31-(ZT(j)/$T|0)|0}var by=256,R1=262144,yg=4194304;function Bv(j){var Q=j&42;if(Q!==0)return Q;switch(j&-j){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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return j&261888;case 262144:case 524288:case 1048576:case 2097152:return j&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return j&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return j}}function I1(j,Q,xe){var Ue=j.pendingLanes;if(Ue===0)return 0;var bt=0,jt=j.suspendedLanes,Xr=j.pingedLanes;j=j.warmLanes;var Nn=Ue&134217727;return Nn!==0?(Ue=Nn&~jt,Ue!==0?bt=Bv(Ue):(Xr&=Nn,Xr!==0?bt=Bv(Xr):xe||(xe=Nn&~j,xe!==0&&(bt=Bv(xe))))):(Nn=Ue&~jt,Nn!==0?bt=Bv(Nn):Xr!==0?bt=Bv(Xr):xe||(xe=Ue&~j,xe!==0&&(bt=Bv(xe)))),bt===0?0:Q!==0&&Q!==bt&&(Q&jt)===0&&(jt=bt&-bt,xe=Q&-Q,jt>=xe||jt===32&&(xe&4194048)!==0)?Q:bt}function lu(j,Q){return(j.pendingLanes&~(j.suspendedLanes&~j.pingedLanes)&Q)===0}function cf(j,Q){switch(j){case 1:case 2:case 4:case 8:case 64:return Q+250;case 16:case 32: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 Q+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Xf(){var j=yg;return yg<<=1,(yg&62914560)===0&&(yg=4194304),j}function rp(j){for(var Q=[],xe=0;31>xe;xe++)Q.push(j);return Q}function xv(j,Q){j.pendingLanes|=Q,Q!==268435456&&(j.suspendedLanes=0,j.pingedLanes=0,j.warmLanes=0)}function r0(j,Q,xe,Ue,bt,jt){var Xr=j.pendingLanes;j.pendingLanes=xe,j.suspendedLanes=0,j.pingedLanes=0,j.warmLanes=0,j.expiredLanes&=xe,j.entangledLanes&=xe,j.errorRecoveryDisabledLanes&=xe,j.shellSuspendCounter=0;var Nn=j.entanglements,Ya=j.expirationTimes,Wi=j.hiddenUpdates;for(xe=Xr&~xe;0<xe;){var To=31-Td(xe),Po=1<<To;Nn[To]=0,Ya[To]=-1;var Qi=Wi[To];if(Qi!==null)for(Wi[To]=null,To=0;To<Qi.length;To++){var so=Qi[To];so!==null&&(so.lane&=-536870913)}xe&=~Po}Ue!==0&&n0(j,Ue,0),jt!==0&&bt===0&&j.tag!==0&&(j.suspendedLanes|=jt&~(Xr&~Q))}function n0(j,Q,xe){j.pendingLanes|=Q,j.suspendedLanes&=~Q;var Ue=31-Td(Q);j.entangledLanes|=Q,j.entanglements[Ue]=j.entanglements[Ue]|1073741824|xe&261930}function np(j,Q){var xe=j.entangledLanes|=Q;for(j=j.entanglements;xe;){var Ue=31-Td(xe),bt=1<<Ue;bt&Q|j[Ue]&Q&&(j[Ue]|=Q),xe&=~bt}}function qp(j,Q){var xe=Q&-Q;return xe=(xe&42)!==0?1:D1(xe),(xe&(j.suspendedLanes|Q))!==0?0:xe}function D1(j){switch(j){case 2:j=1;break;case 8:j=4;break;case 32:j=16;break;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:j=128;break;case 268435456:j=134217728;break;default:j=0}return j}function O1(j){return j&=-j,2<j?8<j?(j&134217727)!==0?32:268435456:8:2}function ef(){var j=qa.p;return j!==0?j:(j=window.event,j===void 0?32:XS(j.type))}function Fd(j,Q){var xe=qa.p;try{return qa.p=j,Q()}finally{qa.p=xe}}var O0=Math.random().toString(36).slice(2),Fl="__reactFiber$"+O0,jv="__reactProps$"+O0,z1="__reactContainer$"+O0,KT="__reactEvents$"+O0,JT="__reactListeners$"+O0,xx="__reactHandles$"+O0,KE="__reactResources$"+O0,Yo="__reactMarker$"+O0;function QT(j){delete j[Fl],delete j[jv],delete j[KT],delete j[JT],delete j[xx]}function z0(j){var Q=j[Fl];if(Q)return Q;for(var xe=j.parentNode;xe;){if(Q=xe[z1]||xe[Fl]){if(xe=Q.alternate,Q.child!==null||xe!==null&&xe.child!==null)for(j=b_(j);j!==null;){if(xe=j[Fl])return xe;j=b_(j)}return Q}j=xe,xe=j.parentNode}return null}function _g(j){if(j=j[Fl]||j[z1]){var Q=j.tag;if(Q===5||Q===6||Q===13||Q===31||Q===26||Q===27||Q===3)return j}return null}function Sm(j){var Q=j.tag;if(Q===5||Q===26||Q===27||Q===6)return j.stateNode;throw Error(L(33))}function N1(j){var Q=j[KE];return Q||(Q=j[KE]={hoistableStyles:new Map,hoistableScripts:new Map}),Q}function sv(j){j[Yo]=!0}var JE=new Set,QE={};function N0(j,Q){F1(j,Q),F1(j+"Capture",Q)}function F1(j,Q){for(QE[j]=Q,j=0;j<Q.length;j++)JE.add(Q[j])}var wL=RegExp("^[: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]*$"),eM={},tM={};function TL(j){return zd.call(tM,j)?!0:zd.call(eM,j)?!1:wL.test(j)?tM[j]=!0:(eM[j]=!0,!1)}function bx(j,Q,xe){if(TL(Q))if(xe===null)j.removeAttribute(Q);else{switch(typeof xe){case"undefined":case"function":case"symbol":j.removeAttribute(Q);return;case"boolean":var Ue=Q.toLowerCase().slice(0,5);if(Ue!=="data-"&&Ue!=="aria-"){j.removeAttribute(Q);return}}j.setAttribute(Q,""+xe)}}function kw(j,Q,xe){if(xe===null)j.removeAttribute(Q);else{switch(typeof xe){case"undefined":case"function":case"symbol":case"boolean":j.removeAttribute(Q);return}j.setAttribute(Q,""+xe)}}function F0(j,Q,xe,Ue){if(Ue===null)j.removeAttribute(xe);else{switch(typeof Ue){case"undefined":case"function":case"symbol":case"boolean":j.removeAttribute(xe);return}j.setAttributeNS(Q,xe,""+Ue)}}function am(j){switch(typeof j){case"bigint":case"boolean":case"number":case"string":case"undefined":return j;case"object":return j;default:return""}}function In(j){var Q=j.type;return(j=j.nodeName)&&j.toLowerCase()==="input"&&(Q==="checkbox"||Q==="radio")}function AL(j,Q,xe){var Ue=Object.getOwnPropertyDescriptor(j.constructor.prototype,Q);if(!j.hasOwnProperty(Q)&&typeof Ue<"u"&&typeof Ue.get=="function"&&typeof Ue.set=="function"){var bt=Ue.get,jt=Ue.set;return Object.defineProperty(j,Q,{configurable:!0,get:function(){return bt.call(this)},set:function(Xr){xe=""+Xr,jt.call(this,Xr)}}),Object.defineProperty(j,Q,{enumerable:Ue.enumerable}),{getValue:function(){return xe},setValue:function(Xr){xe=""+Xr},stopTracking:function(){j._valueTracker=null,delete j[Q]}}}}function Pw(j){if(!j._valueTracker){var Q=In(j)?"checked":"value";j._valueTracker=AL(j,Q,""+j[Q])}}function eA(j){if(!j)return!1;var Q=j._valueTracker;if(!Q)return!0;var xe=Q.getValue(),Ue="";return j&&(Ue=In(j)?j.checked?"true":"false":j.value),j=Ue,j!==xe?(Q.setValue(j),!0):!1}function B0(j){if(j=j||(typeof document<"u"?document:void 0),typeof j>"u")return null;try{return j.activeElement||j.body}catch{return j.body}}var wx=/[\n"\\]/g;function im(j){return j.replace(wx,function(Q){return"\\"+Q.charCodeAt(0).toString(16)+" "})}function Lw(j,Q,xe,Ue,bt,jt,Xr,Nn){j.name="",Xr!=null&&typeof Xr!="function"&&typeof Xr!="symbol"&&typeof Xr!="boolean"?j.type=Xr:j.removeAttribute("type"),Q!=null?Xr==="number"?(Q===0&&j.value===""||j.value!=Q)&&(j.value=""+am(Q)):j.value!==""+am(Q)&&(j.value=""+am(Q)):Xr!=="submit"&&Xr!=="reset"||j.removeAttribute("value"),Q!=null?Cu(j,Xr,am(Q)):xe!=null?Cu(j,Xr,am(xe)):Ue!=null&&j.removeAttribute("value"),bt==null&&jt!=null&&(j.defaultChecked=!!jt),bt!=null&&(j.checked=bt&&typeof bt!="function"&&typeof bt!="symbol"),Nn!=null&&typeof Nn!="function"&&typeof Nn!="symbol"&&typeof Nn!="boolean"?j.name=""+am(Nn):j.removeAttribute("name")}function B1(j,Q,xe,Ue,bt,jt,Xr,Nn){if(jt!=null&&typeof jt!="function"&&typeof jt!="symbol"&&typeof jt!="boolean"&&(j.type=jt),Q!=null||xe!=null){if(!(jt!=="submit"&&jt!=="reset"||Q!=null)){Pw(j);return}xe=xe!=null?""+am(xe):"",Q=Q!=null?""+am(Q):xe,Nn||Q===j.value||(j.value=Q),j.defaultValue=Q}Ue=Ue??bt,Ue=typeof Ue!="function"&&typeof Ue!="symbol"&&!!Ue,j.checked=Nn?j.checked:!!Ue,j.defaultChecked=!!Ue,Xr!=null&&typeof Xr!="function"&&typeof Xr!="symbol"&&typeof Xr!="boolean"&&(j.name=Xr),Pw(j)}function Cu(j,Q,xe){Q==="number"&&B0(j.ownerDocument)===j||j.defaultValue===""+xe||(j.defaultValue=""+xe)}function wh(j,Q,xe,Ue){if(j=j.options,Q){Q={};for(var bt=0;bt<xe.length;bt++)Q["$"+xe[bt]]=!0;for(xe=0;xe<j.length;xe++)bt=Q.hasOwnProperty("$"+j[xe].value),j[xe].selected!==bt&&(j[xe].selected=bt),bt&&Ue&&(j[xe].defaultSelected=!0)}else{for(xe=""+am(xe),Q=null,bt=0;bt<j.length;bt++){if(j[bt].value===xe){j[bt].selected=!0,Ue&&(j[bt].defaultSelected=!0);return}Q!==null||j[bt].disabled||(Q=j[bt])}Q!==null&&(Q.selected=!0)}}function Wf(j,Q,xe){if(Q!=null&&(Q=""+am(Q),Q!==j.value&&(j.value=Q),xe==null)){j.defaultValue!==Q&&(j.defaultValue=Q);return}j.defaultValue=xe!=null?""+am(xe):""}function xg(j,Q,xe,Ue){if(Q==null){if(Ue!=null){if(xe!=null)throw Error(L(92));if(da(Ue)){if(1<Ue.length)throw Error(L(93));Ue=Ue[0]}xe=Ue}xe==null&&(xe=""),Q=xe}xe=am(Q),j.defaultValue=xe,Ue=j.textContent,Ue===xe&&Ue!==""&&Ue!==null&&(j.value=Ue),Pw(j)}function bg(j,Q){if(Q){var xe=j.firstChild;if(xe&&xe===j.lastChild&&xe.nodeType===3){xe.nodeValue=Q;return}}j.textContent=Q}var lv=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function rM(j,Q,xe){var Ue=Q.indexOf("--")===0;xe==null||typeof xe=="boolean"||xe===""?Ue?j.setProperty(Q,""):Q==="float"?j.cssFloat="":j[Q]="":Ue?j.setProperty(Q,xe):typeof xe!="number"||xe===0||lv.has(Q)?Q==="float"?j.cssFloat=xe:j[Q]=(""+xe).trim():j[Q]=xe+"px"}function ff(j,Q,xe){if(Q!=null&&typeof Q!="object")throw Error(L(62));if(j=j.style,xe!=null){for(var Ue in xe)!xe.hasOwnProperty(Ue)||Q!=null&&Q.hasOwnProperty(Ue)||(Ue.indexOf("--")===0?j.setProperty(Ue,""):Ue==="float"?j.cssFloat="":j[Ue]="");for(var bt in Q)Ue=Q[bt],Q.hasOwnProperty(bt)&&xe[bt]!==Ue&&rM(j,bt,Ue)}else for(var jt in Q)Q.hasOwnProperty(jt)&&rM(j,jt,Q[jt])}function hp(j){if(j.indexOf("-")===-1)return!1;switch(j){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 Ad=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),hc=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Bd(j){return hc.test(""+j)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":j}function Ac(){}var Sd=null;function Tx(j){return j=j.target||j.srcElement||window,j.correspondingUseElement&&(j=j.correspondingUseElement),j.nodeType===3?j.parentNode:j}var Wu=null,wy=null;function tA(j){var Q=_g(j);if(Q&&(j=Q.stateNode)){var xe=j[jv]||null;e:switch(j=Q.stateNode,Q.type){case"input":if(Lw(j,xe.value,xe.defaultValue,xe.defaultValue,xe.checked,xe.defaultChecked,xe.type,xe.name),Q=xe.name,xe.type==="radio"&&Q!=null){for(xe=j;xe.parentNode;)xe=xe.parentNode;for(xe=xe.querySelectorAll('input[name="'+im(""+Q)+'"][type="radio"]'),Q=0;Q<xe.length;Q++){var Ue=xe[Q];if(Ue!==j&&Ue.form===j.form){var bt=Ue[jv]||null;if(!bt)throw Error(L(90));Lw(Ue,bt.value,bt.defaultValue,bt.defaultValue,bt.checked,bt.defaultChecked,bt.type,bt.name)}}for(Q=0;Q<xe.length;Q++)Ue=xe[Q],Ue.form===j.form&&eA(Ue)}break e;case"textarea":Wf(j,xe.value,xe.defaultValue);break e;case"select":Q=xe.value,Q!=null&&wh(j,!!xe.multiple,Q,!1)}}}var Rw=!1;function Ty(j,Q,xe){if(Rw)return j(Q,xe);Rw=!0;try{var Ue=j(Q);return Ue}finally{if(Rw=!1,(Wu!==null||wy!==null)&&(B2(),Wu&&(Q=Wu,j=wy,wy=Wu=null,tA(Q),j)))for(Q=0;Q<j.length;Q++)tA(j[Q])}}function j0(j,Q){var xe=j.stateNode;if(xe===null)return null;var Ue=xe[jv]||null;if(Ue===null)return null;xe=Ue[Q];e:switch(Q){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(Ue=!Ue.disabled)||(j=j.type,Ue=!(j==="button"||j==="input"||j==="select"||j==="textarea")),j=!Ue;break e;default:j=!1}if(j)return null;if(xe&&typeof xe!="function")throw Error(L(231,Q,typeof xe));return xe}var a0=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),jd=!1;if(a0)try{var Em={};Object.defineProperty(Em,"passive",{get:function(){jd=!0}}),window.addEventListener("test",Em,Em),window.removeEventListener("test",Em,Em)}catch{jd=!1}var dp=null,Iw=null,Rh=null;function nM(){if(Rh)return Rh;var j,Q=Iw,xe=Q.length,Ue,bt="value"in dp?dp.value:dp.textContent,jt=bt.length;for(j=0;j<xe&&Q[j]===bt[j];j++);var Xr=xe-j;for(Ue=1;Ue<=Xr&&Q[xe-Ue]===bt[jt-Ue];Ue++);return Rh=bt.slice(j,1<Ue?1-Ue:void 0)}function Dw(j){var Q=j.keyCode;return"charCode"in j?(j=j.charCode,j===0&&Q===13&&(j=13)):j=Q,j===10&&(j=13),32<=j||j===13?j:0}function Ud(){return!0}function Nc(){return!1}function yu(j){function Q(xe,Ue,bt,jt,Xr){this._reactName=xe,this._targetInst=bt,this.type=Ue,this.nativeEvent=jt,this.target=Xr,this.currentTarget=null;for(var Nn in j)j.hasOwnProperty(Nn)&&(xe=j[Nn],this[Nn]=xe?xe(jt):jt[Nn]);return this.isDefaultPrevented=(jt.defaultPrevented!=null?jt.defaultPrevented:jt.returnValue===!1)?Ud:Nc,this.isPropagationStopped=Nc,this}return gt(Q.prototype,{preventDefault:function(){this.defaultPrevented=!0;var xe=this.nativeEvent;xe&&(xe.preventDefault?xe.preventDefault():typeof xe.returnValue!="unknown"&&(xe.returnValue=!1),this.isDefaultPrevented=Ud)},stopPropagation:function(){var xe=this.nativeEvent;xe&&(xe.stopPropagation?xe.stopPropagation():typeof xe.cancelBubble!="unknown"&&(xe.cancelBubble=!0),this.isPropagationStopped=Ud)},persist:function(){},isPersistent:Ud}),Q}var Mm={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(j){return j.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},bv=yu(Mm),wg=gt({},Mm,{view:0,detail:0}),SL=yu(wg),zs,Tg,Vp,Ag=gt({},wg,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:iA,button:0,buttons:0,relatedTarget:function(j){return j.relatedTarget===void 0?j.fromElement===j.srcElement?j.toElement:j.fromElement:j.relatedTarget},movementX:function(j){return"movementX"in j?j.movementX:(j!==Vp&&(Vp&&j.type==="mousemove"?(zs=j.screenX-Vp.screenX,Tg=j.screenY-Vp.screenY):Tg=zs=0,Vp=j),zs)},movementY:function(j){return"movementY"in j?j.movementY:Tg}}),Cm=yu(Ag),Os=gt({},Ag,{dataTransfer:0}),aM=yu(Os),iM=gt({},wg,{relatedTarget:0}),rA=yu(iM),nA=gt({},Mm,{animationName:0,elapsedTime:0,pseudoElement:0}),EL=yu(nA),ML=gt({},Mm,{clipboardData:function(j){return"clipboardData"in j?j.clipboardData:window.clipboardData}}),CL=yu(ML),Uv=gt({},Mm,{data:0}),km=yu(Uv),kL={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},oM={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"},aA={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function sM(j){var Q=this.nativeEvent;return Q.getModifierState?Q.getModifierState(j):(j=aA[j])?!!Q[j]:!1}function iA(){return sM}var lM=gt({},wg,{key:function(j){if(j.key){var Q=kL[j.key]||j.key;if(Q!=="Unidentified")return Q}return j.type==="keypress"?(j=Dw(j),j===13?"Enter":String.fromCharCode(j)):j.type==="keydown"||j.type==="keyup"?oM[j.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:iA,charCode:function(j){return j.type==="keypress"?Dw(j):0},keyCode:function(j){return j.type==="keydown"||j.type==="keyup"?j.keyCode:0},which:function(j){return j.type==="keypress"?Dw(j):j.type==="keydown"||j.type==="keyup"?j.keyCode:0}}),PL=yu(lM),Ay=gt({},Ag,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),uM=yu(Ay),Ax=gt({},wg,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:iA}),cM=yu(Ax),fM=gt({},Mm,{propertyName:0,elapsedTime:0,pseudoElement:0}),hM=yu(fM),Ow=gt({},Ag,{deltaX:function(j){return"deltaX"in j?j.deltaX:"wheelDeltaX"in j?-j.wheelDeltaX:0},deltaY:function(j){return"deltaY"in j?j.deltaY:"wheelDeltaY"in j?-j.wheelDeltaY:"wheelDelta"in j?-j.wheelDelta:0},deltaZ:0,deltaMode:0}),LL=yu(Ow),RL=gt({},Mm,{newState:0,oldState:0}),dM=yu(RL),IL=[9,13,27,32],oA=a0&&"CompositionEvent"in window,Sx=null;a0&&"documentMode"in document&&(Sx=document.documentMode);var oh=a0&&"TextEvent"in window&&!Sx,Pm=a0&&(!oA||Sx&&8<Sx&&11>=Sx),Ex=" ",zw=!1;function Nw(j,Q){switch(j){case"keyup":return IL.indexOf(Q.keyCode)!==-1;case"keydown":return Q.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Fw(j){return j=j.detail,typeof j=="object"&&"data"in j?j.data:null}var om=!1;function sA(j,Q){switch(j){case"compositionend":return Fw(Q);case"keypress":return Q.which!==32?null:(zw=!0,Ex);case"textInput":return j=Q.data,j===Ex&&zw?null:j;default:return null}}function vM(j,Q){if(om)return j==="compositionend"||!oA&&Nw(j,Q)?(j=nM(),Rh=Iw=dp=null,om=!1,j):null;switch(j){case"paste":return null;case"keypress":if(!(Q.ctrlKey||Q.altKey||Q.metaKey)||Q.ctrlKey&&Q.altKey){if(Q.char&&1<Q.char.length)return Q.char;if(Q.which)return String.fromCharCode(Q.which)}return null;case"compositionend":return Pm&&Q.locale!=="ko"?null:Q.data;default:return null}}var Bw={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 Sg(j){var Q=j&&j.nodeName&&j.nodeName.toLowerCase();return Q==="input"?!!Bw[j.type]:Q==="textarea"}function lA(j,Q,xe,Ue){Wu?wy?wy.push(Ue):wy=[Ue]:Wu=Ue,Q=vb(Q,"onChange"),0<Q.length&&(xe=new bv("onChange","change",null,xe,Ue),j.push({event:xe,listeners:Q}))}var Sy=null,Ey=null;function pM(j){g_(j,0)}function Mx(j){var Q=Sm(j);if(eA(Q))return j}function uA(j,Q){if(j==="change")return Q}var mM=!1;if(a0){var cA;if(a0){var fA="oninput"in document;if(!fA){var hA=document.createElement("div");hA.setAttribute("oninput","return;"),fA=typeof hA.oninput=="function"}cA=fA}else cA=!1;mM=cA&&(!document.documentMode||9<document.documentMode)}function dA(){Sy&&(Sy.detachEvent("onpropertychange",My),Ey=Sy=null)}function My(j){if(j.propertyName==="value"&&Mx(Ey)){var Q=[];lA(Q,Ey,j,Tx(j)),Ty(pM,Q)}}function jw(j,Q,xe){j==="focusin"?(dA(),Sy=Q,Ey=xe,Sy.attachEvent("onpropertychange",My)):j==="focusout"&&dA()}function gM(j){if(j==="selectionchange"||j==="keyup"||j==="keydown")return Mx(Ey)}function DL(j,Q){if(j==="click")return Mx(Q)}function OL(j,Q){if(j==="input"||j==="change")return Mx(Q)}function zL(j,Q){return j===Q&&(j!==0||1/j===1/Q)||j!==j&&Q!==Q}var Hp=typeof Object.is=="function"?Object.is:zL;function Cx(j,Q){if(Hp(j,Q))return!0;if(typeof j!="object"||j===null||typeof Q!="object"||Q===null)return!1;var xe=Object.keys(j),Ue=Object.keys(Q);if(xe.length!==Ue.length)return!1;for(Ue=0;Ue<xe.length;Ue++){var bt=xe[Ue];if(!zd.call(Q,bt)||!Hp(j[bt],Q[bt]))return!1}return!0}function yM(j){for(;j&&j.firstChild;)j=j.firstChild;return j}function _M(j,Q){var xe=yM(j);j=0;for(var Ue;xe;){if(xe.nodeType===3){if(Ue=j+xe.textContent.length,j<=Q&&Ue>=Q)return{node:xe,offset:Q-j};j=Ue}e:{for(;xe;){if(xe.nextSibling){xe=xe.nextSibling;break e}xe=xe.parentNode}xe=void 0}xe=yM(xe)}}function xM(j,Q){return j&&Q?j===Q?!0:j&&j.nodeType===3?!1:Q&&Q.nodeType===3?xM(j,Q.parentNode):"contains"in j?j.contains(Q):j.compareDocumentPosition?!!(j.compareDocumentPosition(Q)&16):!1:!1}function bM(j){j=j!=null&&j.ownerDocument!=null&&j.ownerDocument.defaultView!=null?j.ownerDocument.defaultView:window;for(var Q=B0(j.document);Q instanceof j.HTMLIFrameElement;){try{var xe=typeof Q.contentWindow.location.href=="string"}catch{xe=!1}if(xe)j=Q.contentWindow;else break;Q=B0(j.document)}return Q}function j1(j){var Q=j&&j.nodeName&&j.nodeName.toLowerCase();return Q&&(Q==="input"&&(j.type==="text"||j.type==="search"||j.type==="tel"||j.type==="url"||j.type==="password")||Q==="textarea"||j.contentEditable==="true")}var NL=a0&&"documentMode"in document&&11>=document.documentMode,U1=null,Uw=null,Eg=null,Mg=!1;function i0(j,Q,xe){var Ue=xe.window===xe?xe.document:xe.nodeType===9?xe:xe.ownerDocument;Mg||U1==null||U1!==B0(Ue)||(Ue=U1,"selectionStart"in Ue&&j1(Ue)?Ue={start:Ue.selectionStart,end:Ue.selectionEnd}:(Ue=(Ue.ownerDocument&&Ue.ownerDocument.defaultView||window).getSelection(),Ue={anchorNode:Ue.anchorNode,anchorOffset:Ue.anchorOffset,focusNode:Ue.focusNode,focusOffset:Ue.focusOffset}),Eg&&Cx(Eg,Ue)||(Eg=Ue,Ue=vb(Uw,"onSelect"),0<Ue.length&&(Q=new bv("onSelect","select",null,Q,xe),j.push({event:Q,listeners:Ue}),Q.target=U1)))}function qv(j,Q){var xe={};return xe[j.toLowerCase()]=Q.toLowerCase(),xe["Webkit"+j]="webkit"+Q,xe["Moz"+j]="moz"+Q,xe}var tf={animationend:qv("Animation","AnimationEnd"),animationiteration:qv("Animation","AnimationIteration"),animationstart:qv("Animation","AnimationStart"),transitionrun:qv("Transition","TransitionRun"),transitionstart:qv("Transition","TransitionStart"),transitioncancel:qv("Transition","TransitionCancel"),transitionend:qv("Transition","TransitionEnd")},qw={},wM={};a0&&(wM=document.createElement("div").style,"AnimationEvent"in window||(delete tf.animationend.animation,delete tf.animationiteration.animation,delete tf.animationstart.animation),"TransitionEvent"in window||delete tf.transitionend.transition);function Cy(j){if(qw[j])return qw[j];if(!tf[j])return j;var Q=tf[j],xe;for(xe in Q)if(Q.hasOwnProperty(xe)&&xe in wM)return qw[j]=Q[xe];return j}var kx=Cy("animationend"),dh=Cy("animationiteration"),vA=Cy("animationstart"),TM=Cy("transitionrun"),FL=Cy("transitionstart"),BL=Cy("transitioncancel"),AM=Cy("transitionend"),Vw=new Map,o0="abort auxClick beforeToggle 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(" ");o0.push("scrollEnd");function Gp(j,Q){Vw.set(j,Q),N0(Q,[j])}var q1=typeof reportError=="function"?reportError:function(j){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof j=="object"&&j!==null&&typeof j.message=="string"?String(j.message):String(j),error:j});if(!window.dispatchEvent(Q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",j);return}console.error(j)},Xp=[],V1=0,pA=0;function Px(){for(var j=V1,Q=pA=V1=0;Q<j;){var xe=Xp[Q];Xp[Q++]=null;var Ue=Xp[Q];Xp[Q++]=null;var bt=Xp[Q];Xp[Q++]=null;var jt=Xp[Q];if(Xp[Q++]=null,Ue!==null&&bt!==null){var Xr=Ue.pending;Xr===null?bt.next=bt:(bt.next=Xr.next,Xr.next=bt),Ue.pending=bt}jt!==0&&Rm(xe,bt,jt)}}function Hw(j,Q,xe,Ue){Xp[V1++]=j,Xp[V1++]=Q,Xp[V1++]=xe,Xp[V1++]=Ue,pA|=Ue,j.lanes|=Ue,j=j.alternate,j!==null&&(j.lanes|=Ue)}function mA(j,Q,xe,Ue){return Hw(j,Q,xe,Ue),Gw(j)}function Lm(j,Q){return Hw(j,null,null,Q),Gw(j)}function Rm(j,Q,xe){j.lanes|=xe;var Ue=j.alternate;Ue!==null&&(Ue.lanes|=xe);for(var bt=!1,jt=j.return;jt!==null;)jt.childLanes|=xe,Ue=jt.alternate,Ue!==null&&(Ue.childLanes|=xe),jt.tag===22&&(j=jt.stateNode,j===null||j._visibility&1||(bt=!0)),j=jt,jt=jt.return;return j.tag===3?(jt=j.stateNode,bt&&Q!==null&&(bt=31-Td(xe),j=jt.hiddenUpdates,Ue=j[bt],Ue===null?j[bt]=[Q]:Ue.push(Q),Q.lane=xe|536870912),jt):null}function Gw(j){if(50<u_)throw u_=0,ib=null,Error(L(185));for(var Q=j.return;Q!==null;)j=Q,Q=j.return;return j.tag===3?j.stateNode:null}var wv={};function Im(j,Q,xe,Ue){this.tag=j,this.key=xe,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=Q,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=Ue,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Tv(j,Q,xe,Ue){return new Im(j,Q,xe,Ue)}function Wp(j){return j=j.prototype,!(!j||!j.isReactComponent)}function uv(j,Q){var xe=j.alternate;return xe===null?(xe=Tv(j.tag,Q,j.key,j.mode),xe.elementType=j.elementType,xe.type=j.type,xe.stateNode=j.stateNode,xe.alternate=j,j.alternate=xe):(xe.pendingProps=Q,xe.type=j.type,xe.flags=0,xe.subtreeFlags=0,xe.deletions=null),xe.flags=j.flags&65011712,xe.childLanes=j.childLanes,xe.lanes=j.lanes,xe.child=j.child,xe.memoizedProps=j.memoizedProps,xe.memoizedState=j.memoizedState,xe.updateQueue=j.updateQueue,Q=j.dependencies,xe.dependencies=Q===null?null:{lanes:Q.lanes,firstContext:Q.firstContext},xe.sibling=j.sibling,xe.index=j.index,xe.ref=j.ref,xe.refCleanup=j.refCleanup,xe}function SM(j,Q){j.flags&=65011714;var xe=j.alternate;return xe===null?(j.childLanes=0,j.lanes=Q,j.child=null,j.subtreeFlags=0,j.memoizedProps=null,j.memoizedState=null,j.updateQueue=null,j.dependencies=null,j.stateNode=null):(j.childLanes=xe.childLanes,j.lanes=xe.lanes,j.child=xe.child,j.subtreeFlags=0,j.deletions=null,j.memoizedProps=xe.memoizedProps,j.memoizedState=xe.memoizedState,j.updateQueue=xe.updateQueue,j.type=xe.type,Q=xe.dependencies,j.dependencies=Q===null?null:{lanes:Q.lanes,firstContext:Q.firstContext}),j}function U0(j,Q,xe,Ue,bt,jt){var Xr=0;if(Ue=j,typeof j=="function")Wp(j)&&(Xr=1);else if(typeof j=="string")Xr=cR(j,xe,$i.current)?26:j==="html"||j==="head"||j==="body"?27:5;else e:switch(j){case xn:return j=Tv(31,xe,Q,bt),j.elementType=xn,j.lanes=jt,j;case sr:return Cg(xe.children,bt,jt,Q);case nr:Xr=8,bt|=24;break;case zr:return j=Tv(12,xe,Q,bt|2),j.elementType=zr,j.lanes=jt,j;case Lr:return j=Tv(13,xe,Q,bt),j.elementType=Lr,j.lanes=jt,j;case Or:return j=Tv(19,xe,Q,bt),j.elementType=Or,j.lanes=jt,j;default:if(typeof j=="object"&&j!==null)switch(j.$$typeof){case Jr:Xr=10;break e;case Ne:Xr=9;break e;case pn:Xr=11;break e;case cn:Xr=14;break e;case $n:Xr=16,Ue=null;break e}Xr=29,xe=Error(L(130,j===null?"null":typeof j,"")),Ue=null}return Q=Tv(Xr,xe,Q,bt),Q.elementType=j,Q.type=Ue,Q.lanes=jt,Q}function Cg(j,Q,xe,Ue){return j=Tv(7,j,Ue,Q),j.lanes=xe,j}function gA(j,Q,xe){return j=Tv(6,j,null,Q),j.lanes=xe,j}function Dm(j){var Q=Tv(18,null,null,0);return Q.stateNode=j,Q}function Yp(j,Q,xe){return Q=Tv(4,j.children!==null?j.children:[],j.key,Q),Q.lanes=xe,Q.stateNode={containerInfo:j.containerInfo,pendingChildren:null,implementation:j.implementation},Q}var s0=new WeakMap;function Gh(j,Q){if(typeof j=="object"&&j!==null){var xe=s0.get(j);return xe!==void 0?xe:(Q={value:j,source:Q,stack:Gf(Q)},s0.set(j,Q),Q)}return{value:j,source:Q,stack:Gf(Q)}}var Vv=[],H1=0,q0=null,Lx=0,Zp=[],$p=0,sm=null,sh=1,lm="";function Xh(j,Q){Vv[H1++]=Lx,Vv[H1++]=q0,q0=j,Lx=Q}function G1(j,Q,xe){Zp[$p++]=sh,Zp[$p++]=lm,Zp[$p++]=sm,sm=j;var Ue=sh;j=lm;var bt=32-Td(Ue)-1;Ue&=~(1<<bt),xe+=1;var jt=32-Td(Q)+bt;if(30<jt){var Xr=bt-bt%5;jt=(Ue&(1<<Xr)-1).toString(32),Ue>>=Xr,bt-=Xr,sh=1<<32-Td(Q)+bt|xe<<bt|Ue,lm=jt+j}else sh=1<<jt|xe<<bt|Ue,lm=j}function ky(j){j.return!==null&&(Xh(j,1),G1(j,1,0))}function Py(j){for(;j===q0;)q0=Vv[--H1],Vv[H1]=null,Lx=Vv[--H1],Vv[H1]=null;for(;j===sm;)sm=Zp[--$p],Zp[$p]=null,lm=Zp[--$p],Zp[$p]=null,sh=Zp[--$p],Zp[$p]=null}function EM(j,Q){Zp[$p++]=sh,Zp[$p++]=lm,Zp[$p++]=sm,sh=Q.id,lm=Q.overflow,sm=j}var cv=null,Yf=null,ec=!1,Om=null,vp=!1,yA=Error(L(519));function kg(j){var Q=Error(L(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw W1(Gh(Q,j)),yA}function Ih(j){var Q=j.stateNode,xe=j.type,Ue=j.memoizedProps;switch(Q[Fl]=j,Q[jv]=Ue,xe){case"dialog":tc("cancel",Q),tc("close",Q);break;case"iframe":case"object":case"embed":tc("load",Q);break;case"video":case"audio":for(xe=0;xe<hb.length;xe++)tc(hb[xe],Q);break;case"source":tc("error",Q);break;case"img":case"image":case"link":tc("error",Q),tc("load",Q);break;case"details":tc("toggle",Q);break;case"input":tc("invalid",Q),B1(Q,Ue.value,Ue.defaultValue,Ue.checked,Ue.defaultChecked,Ue.type,Ue.name,!0);break;case"select":tc("invalid",Q);break;case"textarea":tc("invalid",Q),xg(Q,Ue.value,Ue.defaultValue,Ue.children)}xe=Ue.children,typeof xe!="string"&&typeof xe!="number"&&typeof xe!="bigint"||Q.textContent===""+xe||Ue.suppressHydrationWarning===!0||X2(Q.textContent,xe)?(Ue.popover!=null&&(tc("beforetoggle",Q),tc("toggle",Q)),Ue.onScroll!=null&&tc("scroll",Q),Ue.onScrollEnd!=null&&tc("scrollend",Q),Ue.onClick!=null&&(Q.onclick=Ac),Q=!0):Q=!1,Q||kg(j,!0)}function MM(j){for(cv=j.return;cv;)switch(cv.tag){case 5:case 31:case 13:vp=!1;return;case 27:case 3:vp=!0;return;default:cv=cv.return}}function X1(j){if(j!==cv)return!1;if(!ec)return MM(j),ec=!0,!1;var Q=j.tag,xe;if((xe=Q!==3&&Q!==27)&&((xe=Q===5)&&(xe=j.type,xe=!(xe!=="form"&&xe!=="button")||Y2(j.type,j.memoizedProps)),xe=!xe),xe&&Yf&&kg(j),MM(j),Q===13){if(j=j.memoizedState,j=j!==null?j.dehydrated:null,!j)throw Error(L(317));Yf=zS(j)}else if(Q===31){if(j=j.memoizedState,j=j!==null?j.dehydrated:null,!j)throw Error(L(317));Yf=zS(j)}else Q===27?(Q=Yf,m0(j.type)?(j=Um,Um=null,Yf=j):Yf=Q):Yf=cv?Tp(j.stateNode.nextSibling):null;return!0}function V0(){Yf=cv=null,ec=!1}function _A(){var j=Om;return j!==null&&(xp===null?xp=j:xp.push.apply(xp,j),Om=null),j}function W1(j){Om===null?Om=[j]:Om.push(j)}var xA=ya(null),Ly=null,H0=null;function Pg(j,Q,xe){Ei(xA,Q._currentValue),Q._currentValue=xe}function zm(j){j._currentValue=xA.current,Wn(xA)}function bA(j,Q,xe){for(;j!==null;){var Ue=j.alternate;if((j.childLanes&Q)!==Q?(j.childLanes|=Q,Ue!==null&&(Ue.childLanes|=Q)):Ue!==null&&(Ue.childLanes&Q)!==Q&&(Ue.childLanes|=Q),j===xe)break;j=j.return}}function wA(j,Q,xe,Ue){var bt=j.child;for(bt!==null&&(bt.return=j);bt!==null;){var jt=bt.dependencies;if(jt!==null){var Xr=bt.child;jt=jt.firstContext;e:for(;jt!==null;){var Nn=jt;jt=bt;for(var Ya=0;Ya<Q.length;Ya++)if(Nn.context===Q[Ya]){jt.lanes|=xe,Nn=jt.alternate,Nn!==null&&(Nn.lanes|=xe),bA(jt.return,xe,j),Ue||(Xr=null);break e}jt=Nn.next}}else if(bt.tag===18){if(Xr=bt.return,Xr===null)throw Error(L(341));Xr.lanes|=xe,jt=Xr.alternate,jt!==null&&(jt.lanes|=xe),bA(Xr,xe,j),Xr=null}else Xr=bt.child;if(Xr!==null)Xr.return=bt;else for(Xr=bt;Xr!==null;){if(Xr===j){Xr=null;break}if(bt=Xr.sibling,bt!==null){bt.return=Xr.return,Xr=bt;break}Xr=Xr.return}bt=Xr}}function Ry(j,Q,xe,Ue){j=null;for(var bt=Q,jt=!1;bt!==null;){if(!jt){if((bt.flags&524288)!==0)jt=!0;else if((bt.flags&262144)!==0)break}if(bt.tag===10){var Xr=bt.alternate;if(Xr===null)throw Error(L(387));if(Xr=Xr.memoizedProps,Xr!==null){var Nn=bt.type;Hp(bt.pendingProps.value,Xr.value)||(j!==null?j.push(Nn):j=[Nn])}}else if(bt===bo.current){if(Xr=bt.alternate,Xr===null)throw Error(L(387));Xr.memoizedState.memoizedState!==bt.memoizedState.memoizedState&&(j!==null?j.push(S_):j=[S_])}bt=bt.return}j!==null&&wA(Q,j,xe,Ue),Q.flags|=262144}function Xw(j){for(j=j.firstContext;j!==null;){if(!Hp(j.context._currentValue,j.memoizedValue))return!0;j=j.next}return!1}function Iy(j){Ly=j,H0=null,j=j.dependencies,j!==null&&(j.firstContext=null)}function fv(j){return CM(Ly,j)}function Ww(j,Q){return Ly===null&&Iy(j),CM(j,Q)}function CM(j,Q){var xe=Q._currentValue;if(Q={context:Q,memoizedValue:xe,next:null},H0===null){if(j===null)throw Error(L(308));H0=Q,j.dependencies={lanes:0,firstContext:Q},j.flags|=524288}else H0=H0.next=Q;return xe}var jL=typeof AbortController<"u"?AbortController:function(){var j=[],Q=this.signal={aborted:!1,addEventListener:function(xe,Ue){j.push(Ue)}};this.abort=function(){Q.aborted=!0,j.forEach(function(xe){return xe()})}},UL=e.unstable_scheduleCallback,kM=e.unstable_NormalPriority,Ed={$$typeof:Jr,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function TA(){return{controller:new jL,data:new Map,refCount:0}}function Rx(j){j.refCount--,j.refCount===0&&UL(kM,function(){j.controller.abort()})}var Ix=null,Dx=0,Dy=0,Y1=null;function qL(j,Q){if(Ix===null){var xe=Ix=[];Dx=0,Dy=m_(),Y1={status:"pending",value:void 0,then:function(Ue){xe.push(Ue)}}}return Dx++,Q.then(PM,PM),Q}function PM(){if(--Dx===0&&Ix!==null){Y1!==null&&(Y1.status="fulfilled");var j=Ix;Ix=null,Dy=0,Y1=null;for(var Q=0;Q<j.length;Q++)(0,j[Q])()}}function VL(j,Q){var xe=[],Ue={status:"pending",value:null,reason:null,then:function(bt){xe.push(bt)}};return j.then(function(){Ue.status="fulfilled",Ue.value=Q;for(var bt=0;bt<xe.length;bt++)(0,xe[bt])(Q)},function(bt){for(Ue.status="rejected",Ue.reason=bt,bt=0;bt<xe.length;bt++)(0,xe[bt])(void 0)}),Ue}var Ox=ea.S;ea.S=function(j,Q){CC=ov(),typeof Q=="object"&&Q!==null&&typeof Q.then=="function"&&qL(j,Q),Ox!==null&&Ox(j,Q)};var Lg=ya(null);function AA(){var j=Lg.current;return j!==null?j:Zf.pooledCache}function Yw(j,Q){Q===null?Ei(Lg,Lg.current):Ei(Lg,Q.pool)}function LM(){var j=AA();return j===null?null:{parent:Ed._currentValue,pool:j}}var Rg=Error(L(460)),Zw=Error(L(474)),Z1=Error(L(542)),$w={then:function(){}};function RM(j){return j=j.status,j==="fulfilled"||j==="rejected"}function IM(j,Q,xe){switch(xe=j[xe],xe===void 0?j.push(Q):xe!==Q&&(Q.then(Ac,Ac),Q=xe),Q.status){case"fulfilled":return Q.value;case"rejected":throw j=Q.reason,SA(j),j;default:if(typeof Q.status=="string")Q.then(Ac,Ac);else{if(j=Zf,j!==null&&100<j.shellSuspendCounter)throw Error(L(482));j=Q,j.status="pending",j.then(function(Ue){if(Q.status==="pending"){var bt=Q;bt.status="fulfilled",bt.value=Ue}},function(Ue){if(Q.status==="pending"){var bt=Q;bt.status="rejected",bt.reason=Ue}})}switch(Q.status){case"fulfilled":return Q.value;case"rejected":throw j=Q.reason,SA(j),j}throw zy=Q,Rg}}function Oy(j){try{var Q=j._init;return Q(j._payload)}catch(xe){throw xe!==null&&typeof xe=="object"&&typeof xe.then=="function"?(zy=xe,Rg):xe}}var zy=null;function Kw(){if(zy===null)throw Error(L(459));var j=zy;return zy=null,j}function SA(j){if(j===Rg||j===Z1)throw Error(L(483))}var $1=null,zx=0;function Jw(j){var Q=zx;return zx+=1,$1===null&&($1=[]),IM($1,j,Q)}function Nx(j,Q){Q=Q.props.ref,j.ref=Q!==void 0?Q:null}function Fc(j,Q){throw Q.$$typeof===Vt?Error(L(525)):(j=Object.prototype.toString.call(Q),Error(L(31,j==="[object Object]"?"object with keys {"+Object.keys(Q).join(", ")+"}":j)))}function EA(j){function Q(Li,vi){if(j){var Hi=Li.deletions;Hi===null?(Li.deletions=[vi],Li.flags|=16):Hi.push(vi)}}function xe(Li,vi){if(!j)return null;for(;vi!==null;)Q(Li,vi),vi=vi.sibling;return null}function Ue(Li){for(var vi=new Map;Li!==null;)Li.key!==null?vi.set(Li.key,Li):vi.set(Li.index,Li),Li=Li.sibling;return vi}function bt(Li,vi){return Li=uv(Li,vi),Li.index=0,Li.sibling=null,Li}function jt(Li,vi,Hi){return Li.index=Hi,j?(Hi=Li.alternate,Hi!==null?(Hi=Hi.index,Hi<vi?(Li.flags|=67108866,vi):Hi):(Li.flags|=67108866,vi)):(Li.flags|=1048576,vi)}function Xr(Li){return j&&Li.alternate===null&&(Li.flags|=67108866),Li}function Nn(Li,vi,Hi,Ao){return vi===null||vi.tag!==6?(vi=gA(Hi,Li.mode,Ao),vi.return=Li,vi):(vi=bt(vi,Hi),vi.return=Li,vi)}function Ya(Li,vi,Hi,Ao){var Dl=Hi.type;return Dl===sr?To(Li,vi,Hi.props.children,Ao,Hi.key):vi!==null&&(vi.elementType===Dl||typeof Dl=="object"&&Dl!==null&&Dl.$$typeof===$n&&Oy(Dl)===vi.type)?(vi=bt(vi,Hi.props),Nx(vi,Hi),vi.return=Li,vi):(vi=U0(Hi.type,Hi.key,Hi.props,null,Li.mode,Ao),Nx(vi,Hi),vi.return=Li,vi)}function Wi(Li,vi,Hi,Ao){return vi===null||vi.tag!==4||vi.stateNode.containerInfo!==Hi.containerInfo||vi.stateNode.implementation!==Hi.implementation?(vi=Yp(Hi,Li.mode,Ao),vi.return=Li,vi):(vi=bt(vi,Hi.children||[]),vi.return=Li,vi)}function To(Li,vi,Hi,Ao,Dl){return vi===null||vi.tag!==7?(vi=Cg(Hi,Li.mode,Ao,Dl),vi.return=Li,vi):(vi=bt(vi,Hi),vi.return=Li,vi)}function Po(Li,vi,Hi){if(typeof vi=="string"&&vi!==""||typeof vi=="number"||typeof vi=="bigint")return vi=gA(""+vi,Li.mode,Hi),vi.return=Li,vi;if(typeof vi=="object"&&vi!==null){switch(vi.$$typeof){case Xt:return Hi=U0(vi.type,vi.key,vi.props,null,Li.mode,Hi),Nx(Hi,vi),Hi.return=Li,Hi;case cr:return vi=Yp(vi,Li.mode,Hi),vi.return=Li,vi;case $n:return vi=Oy(vi),Po(Li,vi,Hi)}if(da(vi)||qn(vi))return vi=Cg(vi,Li.mode,Hi,null),vi.return=Li,vi;if(typeof vi.then=="function")return Po(Li,Jw(vi),Hi);if(vi.$$typeof===Jr)return Po(Li,Ww(Li,vi),Hi);Fc(Li,vi)}return null}function Qi(Li,vi,Hi,Ao){var Dl=vi!==null?vi.key:null;if(typeof Hi=="string"&&Hi!==""||typeof Hi=="number"||typeof Hi=="bigint")return Dl!==null?null:Nn(Li,vi,""+Hi,Ao);if(typeof Hi=="object"&&Hi!==null){switch(Hi.$$typeof){case Xt:return Hi.key===Dl?Ya(Li,vi,Hi,Ao):null;case cr:return Hi.key===Dl?Wi(Li,vi,Hi,Ao):null;case $n:return Hi=Oy(Hi),Qi(Li,vi,Hi,Ao)}if(da(Hi)||qn(Hi))return Dl!==null?null:To(Li,vi,Hi,Ao,null);if(typeof Hi.then=="function")return Qi(Li,vi,Jw(Hi),Ao);if(Hi.$$typeof===Jr)return Qi(Li,vi,Ww(Li,Hi),Ao);Fc(Li,Hi)}return null}function so(Li,vi,Hi,Ao,Dl){if(typeof Ao=="string"&&Ao!==""||typeof Ao=="number"||typeof Ao=="bigint")return Li=Li.get(Hi)||null,Nn(vi,Li,""+Ao,Dl);if(typeof Ao=="object"&&Ao!==null){switch(Ao.$$typeof){case Xt:return Li=Li.get(Ao.key===null?Hi:Ao.key)||null,Ya(vi,Li,Ao,Dl);case cr:return Li=Li.get(Ao.key===null?Hi:Ao.key)||null,Wi(vi,Li,Ao,Dl);case $n:return Ao=Oy(Ao),so(Li,vi,Hi,Ao,Dl)}if(da(Ao)||qn(Ao))return Li=Li.get(Hi)||null,To(vi,Li,Ao,Dl,null);if(typeof Ao.then=="function")return so(Li,vi,Hi,Jw(Ao),Dl);if(Ao.$$typeof===Jr)return so(Li,vi,Hi,Ww(vi,Ao),Dl);Fc(vi,Ao)}return null}function ol(Li,vi,Hi,Ao){for(var Dl=null,Pc=null,Ks=vi,ku=vi=0,nc=null;Ks!==null&&ku<Hi.length;ku++){Ks.index>ku?(nc=Ks,Ks=null):nc=Ks.sibling;var qc=Qi(Li,Ks,Hi[ku],Ao);if(qc===null){Ks===null&&(Ks=nc);break}j&&Ks&&qc.alternate===null&&Q(Li,Ks),vi=jt(qc,vi,ku),Pc===null?Dl=qc:Pc.sibling=qc,Pc=qc,Ks=nc}if(ku===Hi.length)return xe(Li,Ks),ec&&Xh(Li,ku),Dl;if(Ks===null){for(;ku<Hi.length;ku++)Ks=Po(Li,Hi[ku],Ao),Ks!==null&&(vi=jt(Ks,vi,ku),Pc===null?Dl=Ks:Pc.sibling=Ks,Pc=Ks);return ec&&Xh(Li,ku),Dl}for(Ks=Ue(Ks);ku<Hi.length;ku++)nc=so(Ks,Li,ku,Hi[ku],Ao),nc!==null&&(j&&nc.alternate!==null&&Ks.delete(nc.key===null?ku:nc.key),vi=jt(nc,vi,ku),Pc===null?Dl=nc:Pc.sibling=nc,Pc=nc);return j&&Ks.forEach(function(Qg){return Q(Li,Qg)}),ec&&Xh(Li,ku),Dl}function Jl(Li,vi,Hi,Ao){if(Hi==null)throw Error(L(151));for(var Dl=null,Pc=null,Ks=vi,ku=vi=0,nc=null,qc=Hi.next();Ks!==null&&!qc.done;ku++,qc=Hi.next()){Ks.index>ku?(nc=Ks,Ks=null):nc=Ks.sibling;var Qg=Qi(Li,Ks,qc.value,Ao);if(Qg===null){Ks===null&&(Ks=nc);break}j&&Ks&&Qg.alternate===null&&Q(Li,Ks),vi=jt(Qg,vi,ku),Pc===null?Dl=Qg:Pc.sibling=Qg,Pc=Qg,Ks=nc}if(qc.done)return xe(Li,Ks),ec&&Xh(Li,ku),Dl;if(Ks===null){for(;!qc.done;ku++,qc=Hi.next())qc=Po(Li,qc.value,Ao),qc!==null&&(vi=jt(qc,vi,ku),Pc===null?Dl=qc:Pc.sibling=qc,Pc=qc);return ec&&Xh(Li,ku),Dl}for(Ks=Ue(Ks);!qc.done;ku++,qc=Hi.next())qc=so(Ks,Li,ku,qc.value,Ao),qc!==null&&(j&&qc.alternate!==null&&Ks.delete(qc.key===null?ku:qc.key),vi=jt(qc,vi,ku),Pc===null?Dl=qc:Pc.sibling=qc,Pc=qc);return j&&Ks.forEach(function(dR){return Q(Li,dR)}),ec&&Xh(Li,ku),Dl}function Of(Li,vi,Hi,Ao){if(typeof Hi=="object"&&Hi!==null&&Hi.type===sr&&Hi.key===null&&(Hi=Hi.props.children),typeof Hi=="object"&&Hi!==null){switch(Hi.$$typeof){case Xt:e:{for(var Dl=Hi.key;vi!==null;){if(vi.key===Dl){if(Dl=Hi.type,Dl===sr){if(vi.tag===7){xe(Li,vi.sibling),Ao=bt(vi,Hi.props.children),Ao.return=Li,Li=Ao;break e}}else if(vi.elementType===Dl||typeof Dl=="object"&&Dl!==null&&Dl.$$typeof===$n&&Oy(Dl)===vi.type){xe(Li,vi.sibling),Ao=bt(vi,Hi.props),Nx(Ao,Hi),Ao.return=Li,Li=Ao;break e}xe(Li,vi);break}else Q(Li,vi);vi=vi.sibling}Hi.type===sr?(Ao=Cg(Hi.props.children,Li.mode,Ao,Hi.key),Ao.return=Li,Li=Ao):(Ao=U0(Hi.type,Hi.key,Hi.props,null,Li.mode,Ao),Nx(Ao,Hi),Ao.return=Li,Li=Ao)}return Xr(Li);case cr:e:{for(Dl=Hi.key;vi!==null;){if(vi.key===Dl)if(vi.tag===4&&vi.stateNode.containerInfo===Hi.containerInfo&&vi.stateNode.implementation===Hi.implementation){xe(Li,vi.sibling),Ao=bt(vi,Hi.children||[]),Ao.return=Li,Li=Ao;break e}else{xe(Li,vi);break}else Q(Li,vi);vi=vi.sibling}Ao=Yp(Hi,Li.mode,Ao),Ao.return=Li,Li=Ao}return Xr(Li);case $n:return Hi=Oy(Hi),Of(Li,vi,Hi,Ao)}if(da(Hi))return ol(Li,vi,Hi,Ao);if(qn(Hi)){if(Dl=qn(Hi),typeof Dl!="function")throw Error(L(150));return Hi=Dl.call(Hi),Jl(Li,vi,Hi,Ao)}if(typeof Hi.then=="function")return Of(Li,vi,Jw(Hi),Ao);if(Hi.$$typeof===Jr)return Of(Li,vi,Ww(Li,Hi),Ao);Fc(Li,Hi)}return typeof Hi=="string"&&Hi!==""||typeof Hi=="number"||typeof Hi=="bigint"?(Hi=""+Hi,vi!==null&&vi.tag===6?(xe(Li,vi.sibling),Ao=bt(vi,Hi),Ao.return=Li,Li=Ao):(xe(Li,vi),Ao=gA(Hi,Li.mode,Ao),Ao.return=Li,Li=Ao),Xr(Li)):xe(Li,vi)}return function(Li,vi,Hi,Ao){try{zx=0;var Dl=Of(Li,vi,Hi,Ao);return $1=null,Dl}catch(Ks){if(Ks===Rg||Ks===Z1)throw Ks;var Pc=Tv(29,Ks,null,Li.mode);return Pc.lanes=Ao,Pc.return=Li,Pc}finally{}}}var Ig=EA(!0),DM=EA(!1),G0=!1;function MA(j){j.updateQueue={baseState:j.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function CA(j,Q){j=j.updateQueue,Q.updateQueue===j&&(Q.updateQueue={baseState:j.baseState,firstBaseUpdate:j.firstBaseUpdate,lastBaseUpdate:j.lastBaseUpdate,shared:j.shared,callbacks:null})}function Dg(j){return{lane:j,tag:0,payload:null,callback:null,next:null}}function Og(j,Q,xe){var Ue=j.updateQueue;if(Ue===null)return null;if(Ue=Ue.shared,(jc&2)!==0){var bt=Ue.pending;return bt===null?Q.next=Q:(Q.next=bt.next,bt.next=Q),Ue.pending=Q,Q=Gw(j),Rm(j,null,xe),Q}return Hw(j,Ue,Q,xe),Gw(j)}function Fx(j,Q,xe){if(Q=Q.updateQueue,Q!==null&&(Q=Q.shared,(xe&4194048)!==0)){var Ue=Q.lanes;Ue&=j.pendingLanes,xe|=Ue,Q.lanes=xe,np(j,xe)}}function kA(j,Q){var xe=j.updateQueue,Ue=j.alternate;if(Ue!==null&&(Ue=Ue.updateQueue,xe===Ue)){var bt=null,jt=null;if(xe=xe.firstBaseUpdate,xe!==null){do{var Xr={lane:xe.lane,tag:xe.tag,payload:xe.payload,callback:null,next:null};jt===null?bt=jt=Xr:jt=jt.next=Xr,xe=xe.next}while(xe!==null);jt===null?bt=jt=Q:jt=jt.next=Q}else bt=jt=Q;xe={baseState:Ue.baseState,firstBaseUpdate:bt,lastBaseUpdate:jt,shared:Ue.shared,callbacks:Ue.callbacks},j.updateQueue=xe;return}j=xe.lastBaseUpdate,j===null?xe.firstBaseUpdate=Q:j.next=Q,xe.lastBaseUpdate=Q}var PA=!1;function Bx(){if(PA){var j=Y1;if(j!==null)throw j}}function jx(j,Q,xe,Ue){PA=!1;var bt=j.updateQueue;G0=!1;var jt=bt.firstBaseUpdate,Xr=bt.lastBaseUpdate,Nn=bt.shared.pending;if(Nn!==null){bt.shared.pending=null;var Ya=Nn,Wi=Ya.next;Ya.next=null,Xr===null?jt=Wi:Xr.next=Wi,Xr=Ya;var To=j.alternate;To!==null&&(To=To.updateQueue,Nn=To.lastBaseUpdate,Nn!==Xr&&(Nn===null?To.firstBaseUpdate=Wi:Nn.next=Wi,To.lastBaseUpdate=Ya))}if(jt!==null){var Po=bt.baseState;Xr=0,To=Wi=Ya=null,Nn=jt;do{var Qi=Nn.lane&-536870913,so=Qi!==Nn.lane;if(so?(vc&Qi)===Qi:(Ue&Qi)===Qi){Qi!==0&&Qi===Dy&&(PA=!0),To!==null&&(To=To.next={lane:0,tag:Nn.tag,payload:Nn.payload,callback:null,next:null});e:{var ol=j,Jl=Nn;Qi=Q;var Of=xe;switch(Jl.tag){case 1:if(ol=Jl.payload,typeof ol=="function"){Po=ol.call(Of,Po,Qi);break e}Po=ol;break e;case 3:ol.flags=ol.flags&-65537|128;case 0:if(ol=Jl.payload,Qi=typeof ol=="function"?ol.call(Of,Po,Qi):ol,Qi==null)break e;Po=gt({},Po,Qi);break e;case 2:G0=!0}}Qi=Nn.callback,Qi!==null&&(j.flags|=64,so&&(j.flags|=8192),so=bt.callbacks,so===null?bt.callbacks=[Qi]:so.push(Qi))}else so={lane:Qi,tag:Nn.tag,payload:Nn.payload,callback:Nn.callback,next:null},To===null?(Wi=To=so,Ya=Po):To=To.next=so,Xr|=Qi;if(Nn=Nn.next,Nn===null){if(Nn=bt.shared.pending,Nn===null)break;so=Nn,Nn=so.next,so.next=null,bt.lastBaseUpdate=so,bt.shared.pending=null}}while(!0);To===null&&(Ya=Po),bt.baseState=Ya,bt.firstBaseUpdate=Wi,bt.lastBaseUpdate=To,jt===null&&(bt.shared.lanes=0),Q0|=Xr,j.lanes=Xr,j.memoizedState=Po}}function OM(j,Q){if(typeof j!="function")throw Error(L(191,j));j.call(Q)}function LA(j,Q){var xe=j.callbacks;if(xe!==null)for(j.callbacks=null,j=0;j<xe.length;j++)OM(xe[j],Q)}var K1=ya(null),Qw=ya(0);function zM(j,Q){j=h0,Ei(Qw,j),Ei(K1,Q),h0=j|Q.baseLanes}function RA(){Ei(Qw,h0),Ei(K1,K1.current)}function zg(){h0=Qw.current,Wn(K1),Wn(Qw)}var id=ya(null),pp=null;function l0(j){var Q=j.alternate;Ei(_c,_c.current&1),Ei(id,j),pp===null&&(Q===null||K1.current!==null||Q.memoizedState!==null)&&(pp=j)}function mp(j){Ei(_c,_c.current),Ei(id,j),pp===null&&(pp=j)}function IA(j){j.tag===22?(Ei(_c,_c.current),Ei(id,j),pp===null&&(pp=j)):Nm()}function Nm(){Ei(_c,_c.current),Ei(id,id.current)}function Kp(j){Wn(id),pp===j&&(pp=null),Wn(_c)}var _c=ya(0);function J1(j){for(var Q=j;Q!==null;){if(Q.tag===13){var xe=Q.memoizedState;if(xe!==null&&(xe=xe.dehydrated,xe===null||mb(xe)||gb(xe)))return Q}else if(Q.tag===19&&(Q.memoizedProps.revealOrder==="forwards"||Q.memoizedProps.revealOrder==="backwards"||Q.memoizedProps.revealOrder==="unstable_legacy-backwards"||Q.memoizedProps.revealOrder==="together")){if((Q.flags&128)!==0)return Q}else if(Q.child!==null){Q.child.return=Q,Q=Q.child;continue}if(Q===j)break;for(;Q.sibling===null;){if(Q.return===null||Q.return===j)return null;Q=Q.return}Q.sibling.return=Q.return,Q=Q.sibling}return null}var qd=0,mu=null,Bc=null,Md=null,Ng=!1,Q1=!1,Ny=!1,Fy=0,Fg=0,X0=null,DA=0;function Dh(){throw Error(L(321))}function Ux(j,Q){if(Q===null)return!1;for(var xe=0;xe<Q.length&&xe<j.length;xe++)if(!Hp(j[xe],Q[xe]))return!1;return!0}function qx(j,Q,xe,Ue,bt,jt){return qd=jt,mu=Q,Q.memoizedState=null,Q.updateQueue=null,Q.lanes=0,ea.H=j===null||j.memoizedState===null?XA:WA,Ny=!1,jt=xe(Ue,bt),Ny=!1,Q1&&(jt=OA(Q,xe,Ue,bt)),e2(j),jt}function e2(j){ea.H=$x;var Q=Bc!==null&&Bc.next!==null;if(qd=0,Md=Bc=mu=null,Ng=!1,Fg=0,X0=null,Q)throw Error(L(300));j===null||od||(j=j.dependencies,j!==null&&Xw(j)&&(od=!0))}function OA(j,Q,xe,Ue){mu=j;var bt=0;do{if(Q1&&(X0=null),Fg=0,Q1=!1,25<=bt)throw Error(L(301));if(bt+=1,Md=Bc=null,j.updateQueue!=null){var jt=j.updateQueue;jt.lastEffect=null,jt.events=null,jt.stores=null,jt.memoCache!=null&&(jt.memoCache.index=0)}ea.H=$M,jt=Q(xe,Ue)}while(Q1);return jt}function HL(){var j=ea.H,Q=j.useState()[0];return Q=typeof Q.then=="function"?e_(Q):Q,j=j.useState()[0],(Bc!==null?Bc.memoizedState:null)!==j&&(mu.flags|=1024),Q}function t2(){var j=Fy!==0;return Fy=0,j}function zA(j,Q,xe){Q.updateQueue=j.updateQueue,Q.flags&=-2053,j.lanes&=~xe}function NA(j){if(Ng){for(j=j.memoizedState;j!==null;){var Q=j.queue;Q!==null&&(Q.pending=null),j=j.next}Ng=!1}qd=0,Md=Bc=mu=null,Q1=!1,Fg=Fy=0,X0=null}function Vd(){var j={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Md===null?mu.memoizedState=Md=j:Md=Md.next=j,Md}function Oh(){if(Bc===null){var j=mu.alternate;j=j!==null?j.memoizedState:null}else j=Bc.next;var Q=Md===null?mu.memoizedState:Md.next;if(Q!==null)Md=Q,Bc=j;else{if(j===null)throw mu.alternate===null?Error(L(467)):Error(L(310));Bc=j,j={memoizedState:Bc.memoizedState,baseState:Bc.baseState,baseQueue:Bc.baseQueue,queue:Bc.queue,next:null},Md===null?mu.memoizedState=Md=j:Md=Md.next=j}return Md}function By(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function e_(j){var Q=Fg;return Fg+=1,X0===null&&(X0=[]),j=IM(X0,j,Q),Q=mu,(Md===null?Q.memoizedState:Md.next)===null&&(Q=Q.alternate,ea.H=Q===null||Q.memoizedState===null?XA:WA),j}function r2(j){if(j!==null&&typeof j=="object"){if(typeof j.then=="function")return e_(j);if(j.$$typeof===Jr)return fv(j)}throw Error(L(438,String(j)))}function n2(j){var Q=null,xe=mu.updateQueue;if(xe!==null&&(Q=xe.memoCache),Q==null){var Ue=mu.alternate;Ue!==null&&(Ue=Ue.updateQueue,Ue!==null&&(Ue=Ue.memoCache,Ue!=null&&(Q={data:Ue.data.map(function(bt){return bt.slice()}),index:0})))}if(Q==null&&(Q={data:[],index:0}),xe===null&&(xe=By(),mu.updateQueue=xe),xe.memoCache=Q,xe=Q.data[Q.index],xe===void 0)for(xe=Q.data[Q.index]=Array(j),Ue=0;Ue<j;Ue++)xe[Ue]=Wa;return Q.index++,xe}function u0(j,Q){return typeof Q=="function"?Q(j):Q}function Vx(j){var Q=Oh();return a2(Q,Bc,j)}function a2(j,Q,xe){var Ue=j.queue;if(Ue===null)throw Error(L(311));Ue.lastRenderedReducer=xe;var bt=j.baseQueue,jt=Ue.pending;if(jt!==null){if(bt!==null){var Xr=bt.next;bt.next=jt.next,jt.next=Xr}Q.baseQueue=bt=jt,Ue.pending=null}if(jt=j.baseState,bt===null)j.memoizedState=jt;else{Q=bt.next;var Nn=Xr=null,Ya=null,Wi=Q,To=!1;do{var Po=Wi.lane&-536870913;if(Po!==Wi.lane?(vc&Po)===Po:(qd&Po)===Po){var Qi=Wi.revertLane;if(Qi===0)Ya!==null&&(Ya=Ya.next={lane:0,revertLane:0,gesture:null,action:Wi.action,hasEagerState:Wi.hasEagerState,eagerState:Wi.eagerState,next:null}),Po===Dy&&(To=!0);else if((qd&Qi)===Qi){Wi=Wi.next,Qi===Dy&&(To=!0);continue}else Po={lane:0,revertLane:Wi.revertLane,gesture:null,action:Wi.action,hasEagerState:Wi.hasEagerState,eagerState:Wi.eagerState,next:null},Ya===null?(Nn=Ya=Po,Xr=jt):Ya=Ya.next=Po,mu.lanes|=Qi,Q0|=Qi;Po=Wi.action,Ny&&xe(jt,Po),jt=Wi.hasEagerState?Wi.eagerState:xe(jt,Po)}else Qi={lane:Po,revertLane:Wi.revertLane,gesture:Wi.gesture,action:Wi.action,hasEagerState:Wi.hasEagerState,eagerState:Wi.eagerState,next:null},Ya===null?(Nn=Ya=Qi,Xr=jt):Ya=Ya.next=Qi,mu.lanes|=Po,Q0|=Po;Wi=Wi.next}while(Wi!==null&&Wi!==Q);if(Ya===null?Xr=jt:Ya.next=Nn,!Hp(jt,j.memoizedState)&&(od=!0,To&&(xe=Y1,xe!==null)))throw xe;j.memoizedState=jt,j.baseState=Xr,j.baseQueue=Ya,Ue.lastRenderedState=jt}return bt===null&&(Ue.lanes=0),[j.memoizedState,Ue.dispatch]}function i2(j){var Q=Oh(),xe=Q.queue;if(xe===null)throw Error(L(311));xe.lastRenderedReducer=j;var Ue=xe.dispatch,bt=xe.pending,jt=Q.memoizedState;if(bt!==null){xe.pending=null;var Xr=bt=bt.next;do jt=j(jt,Xr.action),Xr=Xr.next;while(Xr!==bt);Hp(jt,Q.memoizedState)||(od=!0),Q.memoizedState=jt,Q.baseQueue===null&&(Q.baseState=jt),xe.lastRenderedState=jt}return[jt,Ue]}function NM(j,Q,xe){var Ue=mu,bt=Oh(),jt=ec;if(jt){if(xe===void 0)throw Error(L(407));xe=xe()}else xe=Q();var Xr=!Hp((Bc||bt).memoizedState,xe);if(Xr&&(bt.memoizedState=xe,od=!0),bt=bt.queue,y2(l2.bind(null,Ue,bt,j),[j]),bt.getSnapshot!==Q||Xr||Md!==null&&Md.memoizedState.tag&1){if(Ue.flags|=2048,t_(9,{destroy:void 0},s2.bind(null,Ue,bt,xe,Q),null),Zf===null)throw Error(L(349));jt||(qd&127)!==0||o2(Ue,Q,xe)}return xe}function o2(j,Q,xe){j.flags|=16384,j={getSnapshot:Q,value:xe},Q=mu.updateQueue,Q===null?(Q=By(),mu.updateQueue=Q,Q.stores=[j]):(xe=Q.stores,xe===null?Q.stores=[j]:xe.push(j))}function s2(j,Q,xe,Ue){Q.value=xe,Q.getSnapshot=Ue,u2(Q)&&FA(j)}function l2(j,Q,xe){return xe(function(){u2(Q)&&FA(j)})}function u2(j){var Q=j.getSnapshot;j=j.value;try{var xe=Q();return!Hp(j,xe)}catch{return!0}}function FA(j){var Q=Lm(j,2);Q!==null&&bp(Q,j,2)}function Hx(j){var Q=Vd();if(typeof j=="function"){var xe=j;if(j=xe(),Ny){Am(!0);try{xe()}finally{Am(!1)}}}return Q.memoizedState=Q.baseState=j,Q.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:u0,lastRenderedState:j},Q}function c2(j,Q,xe,Ue){return j.baseState=xe,a2(j,Bc,typeof Ue=="function"?Ue:u0)}function FM(j,Q,xe,Ue,bt){if(n_(j))throw Error(L(485));if(j=Q.action,j!==null){var jt={payload:bt,action:j,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(Xr){jt.listeners.push(Xr)}};ea.T!==null?xe(!0):jt.isTransition=!1,Ue(jt),xe=Q.pending,xe===null?(jt.next=Q.pending=jt,f2(Q,jt)):(jt.next=xe.next,Q.pending=xe.next=jt)}}function f2(j,Q){var xe=Q.action,Ue=Q.payload,bt=j.state;if(Q.isTransition){var jt=ea.T,Xr={};ea.T=Xr;try{var Nn=xe(bt,Ue),Ya=ea.S;Ya!==null&&Ya(Xr,Nn),Bg(j,Q,Nn)}catch(Wi){Gx(j,Q,Wi)}finally{jt!==null&&Xr.types!==null&&(jt.types=Xr.types),ea.T=jt}}else try{jt=xe(bt,Ue),Bg(j,Q,jt)}catch(Wi){Gx(j,Q,Wi)}}function Bg(j,Q,xe){xe!==null&&typeof xe=="object"&&typeof xe.then=="function"?xe.then(function(Ue){h2(j,Q,Ue)},function(Ue){return Gx(j,Q,Ue)}):h2(j,Q,xe)}function h2(j,Q,xe){Q.status="fulfilled",Q.value=xe,BM(Q),j.state=xe,Q=j.pending,Q!==null&&(xe=Q.next,xe===Q?j.pending=null:(xe=xe.next,Q.next=xe,f2(j,xe)))}function Gx(j,Q,xe){var Ue=j.pending;if(j.pending=null,Ue!==null){Ue=Ue.next;do Q.status="rejected",Q.reason=xe,BM(Q),Q=Q.next;while(Q!==Ue)}j.action=null}function BM(j){j=j.listeners;for(var Q=0;Q<j.length;Q++)(0,j[Q])()}function jM(j,Q){return Q}function BA(j,Q){if(ec){var xe=Zf.formState;if(xe!==null){e:{var Ue=mu;if(ec){if(Yf){t:{for(var bt=Yf,jt=vp;bt.nodeType!==8;){if(!jt){bt=null;break t}if(bt=Tp(bt.nextSibling),bt===null){bt=null;break t}}jt=bt.data,bt=jt==="F!"||jt==="F"?bt:null}if(bt){Yf=Tp(bt.nextSibling),Ue=bt.data==="F!";break e}}kg(Ue)}Ue=!1}Ue&&(Q=xe[0])}}return xe=Vd(),xe.memoizedState=xe.baseState=Q,Ue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:jM,lastRenderedState:Q},xe.queue=Ue,xe=S2.bind(null,mu,Ue),Ue.dispatch=xe,Ue=Hx(!1),jt=Zx.bind(null,mu,!1,Ue.queue),Ue=Vd(),bt={state:Q,dispatch:null,action:j,pending:null},Ue.queue=bt,xe=FM.bind(null,mu,bt,jt,xe),bt.dispatch=xe,Ue.memoizedState=j,[Q,xe,!1]}function UM(j){var Q=Oh();return d2(Q,Bc,j)}function d2(j,Q,xe){if(Q=a2(j,Q,jM)[0],j=Vx(u0)[0],typeof Q=="object"&&Q!==null&&typeof Q.then=="function")try{var Ue=e_(Q)}catch(Xr){throw Xr===Rg?Z1:Xr}else Ue=Q;Q=Oh();var bt=Q.queue,jt=bt.dispatch;return xe!==Q.memoizedState&&(mu.flags|=2048,t_(9,{destroy:void 0},GL.bind(null,bt,xe),null)),[Ue,jt,j]}function GL(j,Q){j.action=Q}function v2(j){var Q=Oh(),xe=Bc;if(xe!==null)return d2(Q,xe,j);Oh(),Q=Q.memoizedState,xe=Oh();var Ue=xe.queue.dispatch;return xe.memoizedState=j,[Q,Ue,!1]}function t_(j,Q,xe,Ue){return j={tag:j,create:xe,deps:Ue,inst:Q,next:null},Q=mu.updateQueue,Q===null&&(Q=By(),mu.updateQueue=Q),xe=Q.lastEffect,xe===null?Q.lastEffect=j.next=j:(Ue=xe.next,xe.next=j,j.next=Ue,Q.lastEffect=j),j}function jA(){return Oh().memoizedState}function p2(j,Q,xe,Ue){var bt=Vd();mu.flags|=j,bt.memoizedState=t_(1|Q,{destroy:void 0},xe,Ue===void 0?null:Ue)}function m2(j,Q,xe,Ue){var bt=Oh();Ue=Ue===void 0?null:Ue;var jt=bt.memoizedState.inst;Bc!==null&&Ue!==null&&Ux(Ue,Bc.memoizedState.deps)?bt.memoizedState=t_(Q,jt,xe,Ue):(mu.flags|=j,bt.memoizedState=t_(1|Q,jt,xe,Ue))}function g2(j,Q){p2(8390656,8,j,Q)}function y2(j,Q){m2(2048,8,j,Q)}function XL(j){mu.flags|=4;var Q=mu.updateQueue;if(Q===null)Q=By(),mu.updateQueue=Q,Q.events=[j];else{var xe=Q.events;xe===null?Q.events=[j]:xe.push(j)}}function qM(j){var Q=Oh().memoizedState;return XL({ref:Q,nextImpl:j}),function(){if((jc&2)!==0)throw Error(L(440));return Q.impl.apply(void 0,arguments)}}function VM(j,Q){return m2(4,2,j,Q)}function HM(j,Q){return m2(4,4,j,Q)}function _2(j,Q){if(typeof Q=="function"){j=j();var xe=Q(j);return function(){typeof xe=="function"?xe():Q(null)}}if(Q!=null)return j=j(),Q.current=j,function(){Q.current=null}}function Xx(j,Q,xe){xe=xe!=null?xe.concat([j]):null,m2(4,4,_2.bind(null,Q,j),xe)}function x2(){}function b2(j,Q){var xe=Oh();Q=Q===void 0?null:Q;var Ue=xe.memoizedState;return Q!==null&&Ux(Q,Ue[1])?Ue[0]:(xe.memoizedState=[j,Q],j)}function UA(j,Q){var xe=Oh();Q=Q===void 0?null:Q;var Ue=xe.memoizedState;if(Q!==null&&Ux(Q,Ue[1]))return Ue[0];if(Ue=j(),Ny){Am(!0);try{j()}finally{Am(!1)}}return xe.memoizedState=[Ue,Q],Ue}function Wx(j,Q,xe){return xe===void 0||(qd&1073741824)!==0&&(vc&261930)===0?j.memoizedState=Q:(j.memoizedState=xe,j=PC(),mu.lanes|=j,Q0|=j,xe)}function GM(j,Q,xe,Ue){return Hp(xe,Q)?xe:K1.current!==null?(j=Wx(j,xe,Ue),Hp(j,Q)||(od=!0),j):(qd&42)===0||(qd&1073741824)!==0&&(vc&261930)===0?(od=!0,j.memoizedState=xe):(j=PC(),mu.lanes|=j,Q0|=j,Q)}function qA(j,Q,xe,Ue,bt){var jt=qa.p;qa.p=jt!==0&&8>jt?jt:8;var Xr=ea.T,Nn={};ea.T=Nn,Zx(j,!1,Q,xe);try{var Ya=bt(),Wi=ea.S;if(Wi!==null&&Wi(Nn,Ya),Ya!==null&&typeof Ya=="object"&&typeof Ya.then=="function"){var To=VL(Ya,Ue);r_(j,Q,To,Hv(j))}else r_(j,Q,Ue,Hv(j))}catch(Po){r_(j,Q,{then:function(){},status:"rejected",reason:Po},Hv())}finally{qa.p=jt,Xr!==null&&Nn.types!==null&&(Xr.types=Nn.types),ea.T=Xr}}function w2(){}function T2(j,Q,xe,Ue){if(j.tag!==5)throw Error(L(476));var bt=Yx(j).queue;qA(j,bt,Q,Ri,xe===null?w2:function(){return VA(j),xe(Ue)})}function Yx(j){var Q=j.memoizedState;if(Q!==null)return Q;Q={memoizedState:Ri,baseState:Ri,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:u0,lastRenderedState:Ri},next:null};var xe={};return Q.next={memoizedState:xe,baseState:xe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:u0,lastRenderedState:xe},next:null},j.memoizedState=Q,j=j.alternate,j!==null&&(j.memoizedState=Q),Q}function VA(j){var Q=Yx(j);Q.next===null&&(Q=j.alternate.memoizedState),r_(j,Q.next.queue,{},Hv())}function A2(){return fv(S_)}function XM(){return Oh().memoizedState}function HA(){return Oh().memoizedState}function WM(j){for(var Q=j.return;Q!==null;){switch(Q.tag){case 24:case 3:var xe=Hv();j=Dg(xe);var Ue=Og(Q,j,xe);Ue!==null&&(bp(Ue,Q,xe),Fx(Ue,Q,xe)),Q={cache:TA()},j.payload=Q;return}Q=Q.return}}function YM(j,Q,xe){var Ue=Hv();xe={lane:Ue,revertLane:0,gesture:null,action:xe,hasEagerState:!1,eagerState:null,next:null},n_(j)?GA(Q,xe):(xe=mA(j,Q,xe,Ue),xe!==null&&(bp(xe,j,Ue),ZM(xe,Q,Ue)))}function S2(j,Q,xe){var Ue=Hv();r_(j,Q,xe,Ue)}function r_(j,Q,xe,Ue){var bt={lane:Ue,revertLane:0,gesture:null,action:xe,hasEagerState:!1,eagerState:null,next:null};if(n_(j))GA(Q,bt);else{var jt=j.alternate;if(j.lanes===0&&(jt===null||jt.lanes===0)&&(jt=Q.lastRenderedReducer,jt!==null))try{var Xr=Q.lastRenderedState,Nn=jt(Xr,xe);if(bt.hasEagerState=!0,bt.eagerState=Nn,Hp(Nn,Xr))return Hw(j,Q,bt,0),Zf===null&&Px(),!1}catch{}finally{}if(xe=mA(j,Q,bt,Ue),xe!==null)return bp(xe,j,Ue),ZM(xe,Q,Ue),!0}return!1}function Zx(j,Q,xe,Ue){if(Ue={lane:2,revertLane:m_(),gesture:null,action:Ue,hasEagerState:!1,eagerState:null,next:null},n_(j)){if(Q)throw Error(L(479))}else Q=mA(j,xe,Ue,2),Q!==null&&bp(Q,j,2)}function n_(j){var Q=j.alternate;return j===mu||Q!==null&&Q===mu}function GA(j,Q){Q1=Ng=!0;var xe=j.pending;xe===null?Q.next=Q:(Q.next=xe.next,xe.next=Q),j.pending=Q}function ZM(j,Q,xe){if((xe&4194048)!==0){var Ue=Q.lanes;Ue&=j.pendingLanes,xe|=Ue,Q.lanes=xe,np(j,xe)}}var $x={readContext:fv,use:r2,useCallback:Dh,useContext:Dh,useEffect:Dh,useImperativeHandle:Dh,useLayoutEffect:Dh,useInsertionEffect:Dh,useMemo:Dh,useReducer:Dh,useRef:Dh,useState:Dh,useDebugValue:Dh,useDeferredValue:Dh,useTransition:Dh,useSyncExternalStore:Dh,useId:Dh,useHostTransitionStatus:Dh,useFormState:Dh,useActionState:Dh,useOptimistic:Dh,useMemoCache:Dh,useCacheRefresh:Dh};$x.useEffectEvent=Dh;var XA={readContext:fv,use:r2,useCallback:function(j,Q){return Vd().memoizedState=[j,Q===void 0?null:Q],j},useContext:fv,useEffect:g2,useImperativeHandle:function(j,Q,xe){xe=xe!=null?xe.concat([j]):null,p2(4194308,4,_2.bind(null,Q,j),xe)},useLayoutEffect:function(j,Q){return p2(4194308,4,j,Q)},useInsertionEffect:function(j,Q){p2(4,2,j,Q)},useMemo:function(j,Q){var xe=Vd();Q=Q===void 0?null:Q;var Ue=j();if(Ny){Am(!0);try{j()}finally{Am(!1)}}return xe.memoizedState=[Ue,Q],Ue},useReducer:function(j,Q,xe){var Ue=Vd();if(xe!==void 0){var bt=xe(Q);if(Ny){Am(!0);try{xe(Q)}finally{Am(!1)}}}else bt=Q;return Ue.memoizedState=Ue.baseState=bt,j={pending:null,lanes:0,dispatch:null,lastRenderedReducer:j,lastRenderedState:bt},Ue.queue=j,j=j.dispatch=YM.bind(null,mu,j),[Ue.memoizedState,j]},useRef:function(j){var Q=Vd();return j={current:j},Q.memoizedState=j},useState:function(j){j=Hx(j);var Q=j.queue,xe=S2.bind(null,mu,Q);return Q.dispatch=xe,[j.memoizedState,xe]},useDebugValue:x2,useDeferredValue:function(j,Q){var xe=Vd();return Wx(xe,j,Q)},useTransition:function(){var j=Hx(!1);return j=qA.bind(null,mu,j.queue,!0,!1),Vd().memoizedState=j,[!1,j]},useSyncExternalStore:function(j,Q,xe){var Ue=mu,bt=Vd();if(ec){if(xe===void 0)throw Error(L(407));xe=xe()}else{if(xe=Q(),Zf===null)throw Error(L(349));(vc&127)!==0||o2(Ue,Q,xe)}bt.memoizedState=xe;var jt={value:xe,getSnapshot:Q};return bt.queue=jt,g2(l2.bind(null,Ue,jt,j),[j]),Ue.flags|=2048,t_(9,{destroy:void 0},s2.bind(null,Ue,jt,xe,Q),null),xe},useId:function(){var j=Vd(),Q=Zf.identifierPrefix;if(ec){var xe=lm,Ue=sh;xe=(Ue&~(1<<32-Td(Ue)-1)).toString(32)+xe,Q="_"+Q+"R_"+xe,xe=Fy++,0<xe&&(Q+="H"+xe.toString(32)),Q+="_"}else xe=DA++,Q="_"+Q+"r_"+xe.toString(32)+"_";return j.memoizedState=Q},useHostTransitionStatus:A2,useFormState:BA,useActionState:BA,useOptimistic:function(j){var Q=Vd();Q.memoizedState=Q.baseState=j;var xe={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return Q.queue=xe,Q=Zx.bind(null,mu,!0,xe),xe.dispatch=Q,[j,Q]},useMemoCache:n2,useCacheRefresh:function(){return Vd().memoizedState=WM.bind(null,mu)},useEffectEvent:function(j){var Q=Vd(),xe={impl:j};return Q.memoizedState=xe,function(){if((jc&2)!==0)throw Error(L(440));return xe.impl.apply(void 0,arguments)}}},WA={readContext:fv,use:r2,useCallback:b2,useContext:fv,useEffect:y2,useImperativeHandle:Xx,useInsertionEffect:VM,useLayoutEffect:HM,useMemo:UA,useReducer:Vx,useRef:jA,useState:function(){return Vx(u0)},useDebugValue:x2,useDeferredValue:function(j,Q){var xe=Oh();return GM(xe,Bc.memoizedState,j,Q)},useTransition:function(){var j=Vx(u0)[0],Q=Oh().memoizedState;return[typeof j=="boolean"?j:e_(j),Q]},useSyncExternalStore:NM,useId:XM,useHostTransitionStatus:A2,useFormState:UM,useActionState:UM,useOptimistic:function(j,Q){var xe=Oh();return c2(xe,Bc,j,Q)},useMemoCache:n2,useCacheRefresh:HA};WA.useEffectEvent=qM;var $M={readContext:fv,use:r2,useCallback:b2,useContext:fv,useEffect:y2,useImperativeHandle:Xx,useInsertionEffect:VM,useLayoutEffect:HM,useMemo:UA,useReducer:i2,useRef:jA,useState:function(){return i2(u0)},useDebugValue:x2,useDeferredValue:function(j,Q){var xe=Oh();return Bc===null?Wx(xe,j,Q):GM(xe,Bc.memoizedState,j,Q)},useTransition:function(){var j=i2(u0)[0],Q=Oh().memoizedState;return[typeof j=="boolean"?j:e_(j),Q]},useSyncExternalStore:NM,useId:XM,useHostTransitionStatus:A2,useFormState:v2,useActionState:v2,useOptimistic:function(j,Q){var xe=Oh();return Bc!==null?c2(xe,Bc,j,Q):(xe.baseState=j,[j,xe.queue.dispatch])},useMemoCache:n2,useCacheRefresh:HA};$M.useEffectEvent=qM;function YA(j,Q,xe,Ue){Q=j.memoizedState,xe=xe(Ue,Q),xe=xe==null?Q:gt({},Q,xe),j.memoizedState=xe,j.lanes===0&&(j.updateQueue.baseState=xe)}var E2={enqueueSetState:function(j,Q,xe){j=j._reactInternals;var Ue=Hv(),bt=Dg(Ue);bt.payload=Q,xe!=null&&(bt.callback=xe),Q=Og(j,bt,Ue),Q!==null&&(bp(Q,j,Ue),Fx(Q,j,Ue))},enqueueReplaceState:function(j,Q,xe){j=j._reactInternals;var Ue=Hv(),bt=Dg(Ue);bt.tag=1,bt.payload=Q,xe!=null&&(bt.callback=xe),Q=Og(j,bt,Ue),Q!==null&&(bp(Q,j,Ue),Fx(Q,j,Ue))},enqueueForceUpdate:function(j,Q){j=j._reactInternals;var xe=Hv(),Ue=Dg(xe);Ue.tag=2,Q!=null&&(Ue.callback=Q),Q=Og(j,Ue,xe),Q!==null&&(bp(Q,j,xe),Fx(Q,j,xe))}};function KM(j,Q,xe,Ue,bt,jt,Xr){return j=j.stateNode,typeof j.shouldComponentUpdate=="function"?j.shouldComponentUpdate(Ue,jt,Xr):Q.prototype&&Q.prototype.isPureReactComponent?!Cx(xe,Ue)||!Cx(bt,jt):!0}function JM(j,Q,xe,Ue){j=Q.state,typeof Q.componentWillReceiveProps=="function"&&Q.componentWillReceiveProps(xe,Ue),typeof Q.UNSAFE_componentWillReceiveProps=="function"&&Q.UNSAFE_componentWillReceiveProps(xe,Ue),Q.state!==j&&E2.enqueueReplaceState(Q,Q.state,null)}function jy(j,Q){var xe=Q;if("ref"in Q){xe={};for(var Ue in Q)Ue!=="ref"&&(xe[Ue]=Q[Ue])}if(j=j.defaultProps){xe===Q&&(xe=gt({},xe));for(var bt in j)xe[bt]===void 0&&(xe[bt]=j[bt])}return xe}function QM(j){q1(j)}function eC(j){console.error(j)}function tC(j){q1(j)}function M2(j,Q){try{var xe=j.onUncaughtError;xe(Q.value,{componentStack:Q.stack})}catch(Ue){setTimeout(function(){throw Ue})}}function ZA(j,Q,xe){try{var Ue=j.onCaughtError;Ue(xe.value,{componentStack:xe.stack,errorBoundary:Q.tag===1?Q.stateNode:null})}catch(bt){setTimeout(function(){throw bt})}}function W0(j,Q,xe){return xe=Dg(xe),xe.tag=3,xe.payload={element:null},xe.callback=function(){M2(j,Q)},xe}function rC(j){return j=Dg(j),j.tag=3,j}function nC(j,Q,xe,Ue){var bt=xe.type.getDerivedStateFromError;if(typeof bt=="function"){var jt=Ue.value;j.payload=function(){return bt(jt)},j.callback=function(){ZA(Q,xe,Ue)}}var Xr=xe.stateNode;Xr!==null&&typeof Xr.componentDidCatch=="function"&&(j.callback=function(){ZA(Q,xe,Ue),typeof bt!="function"&&(hm===null?hm=new Set([this]):hm.add(this));var Nn=Ue.stack;this.componentDidCatch(Ue.value,{componentStack:Nn!==null?Nn:""})})}function WL(j,Q,xe,Ue,bt){if(xe.flags|=32768,Ue!==null&&typeof Ue=="object"&&typeof Ue.then=="function"){if(Q=xe.alternate,Q!==null&&Ry(Q,xe,bt,!0),xe=id.current,xe!==null){switch(xe.tag){case 31:case 13:return pp===null?j2():xe.alternate===null&&Yh===0&&(Yh=3),xe.flags&=-257,xe.flags|=65536,xe.lanes=bt,Ue===$w?xe.flags|=16384:(Q=xe.updateQueue,Q===null?xe.updateQueue=new Set([Ue]):Q.add(Ue),xS(j,Ue,bt)),!1;case 22:return xe.flags|=65536,Ue===$w?xe.flags|=16384:(Q=xe.updateQueue,Q===null?(Q={transitions:null,markerInstances:null,retryQueue:new Set([Ue])},xe.updateQueue=Q):(xe=Q.retryQueue,xe===null?Q.retryQueue=new Set([Ue]):xe.add(Ue)),xS(j,Ue,bt)),!1}throw Error(L(435,xe.tag))}return xS(j,Ue,bt),j2(),!1}if(ec)return Q=id.current,Q!==null?((Q.flags&65536)===0&&(Q.flags|=256),Q.flags|=65536,Q.lanes=bt,Ue!==yA&&(j=Error(L(422),{cause:Ue}),W1(Gh(j,xe)))):(Ue!==yA&&(Q=Error(L(423),{cause:Ue}),W1(Gh(Q,xe))),j=j.current.alternate,j.flags|=65536,bt&=-bt,j.lanes|=bt,Ue=Gh(Ue,xe),bt=W0(j.stateNode,Ue,bt),kA(j,bt),Yh!==4&&(Yh=2)),!1;var jt=Error(L(520),{cause:Ue});if(jt=Gh(jt,xe),nb===null?nb=[jt]:nb.push(jt),Yh!==4&&(Yh=2),Q===null)return!0;Ue=Gh(Ue,xe),xe=Q;do{switch(xe.tag){case 3:return xe.flags|=65536,j=bt&-bt,xe.lanes|=j,j=W0(xe.stateNode,Ue,j),kA(xe,j),!1;case 1:if(Q=xe.type,jt=xe.stateNode,(xe.flags&128)===0&&(typeof Q.getDerivedStateFromError=="function"||jt!==null&&typeof jt.componentDidCatch=="function"&&(hm===null||!hm.has(jt))))return xe.flags|=65536,bt&=-bt,xe.lanes|=bt,bt=rC(bt),nC(bt,j,xe,Ue),kA(xe,bt),!1}xe=xe.return}while(xe!==null);return!1}var $A=Error(L(461)),od=!1;function hv(j,Q,xe,Ue){Q.child=j===null?DM(Q,null,xe,Ue):Ig(Q,j.child,xe,Ue)}function aC(j,Q,xe,Ue,bt){xe=xe.render;var jt=Q.ref;if("ref"in Ue){var Xr={};for(var Nn in Ue)Nn!=="ref"&&(Xr[Nn]=Ue[Nn])}else Xr=Ue;return Iy(Q),Ue=qx(j,Q,xe,Xr,jt,bt),Nn=t2(),j!==null&&!od?(zA(j,Q,bt),Y0(j,Q,bt)):(ec&&Nn&&ky(Q),Q.flags|=1,hv(j,Q,Ue,bt),Q.child)}function iC(j,Q,xe,Ue,bt){if(j===null){var jt=xe.type;return typeof jt=="function"&&!Wp(jt)&&jt.defaultProps===void 0&&xe.compare===null?(Q.tag=15,Q.type=jt,C2(j,Q,jt,Ue,bt)):(j=U0(xe.type,null,Ue,Q,Q.mode,bt),j.ref=Q.ref,j.return=Q,Q.child=j)}if(jt=j.child,!R2(j,bt)){var Xr=jt.memoizedProps;if(xe=xe.compare,xe=xe!==null?xe:Cx,xe(Xr,Ue)&&j.ref===Q.ref)return Y0(j,Q,bt)}return Q.flags|=1,j=uv(jt,Ue),j.ref=Q.ref,j.return=Q,Q.child=j}function C2(j,Q,xe,Ue,bt){if(j!==null){var jt=j.memoizedProps;if(Cx(jt,Ue)&&j.ref===Q.ref)if(od=!1,Q.pendingProps=Ue=jt,R2(j,bt))(j.flags&131072)!==0&&(od=!0);else return Q.lanes=j.lanes,Y0(j,Q,bt)}return KA(j,Q,xe,Ue,bt)}function oC(j,Q,xe,Ue){var bt=Ue.children,jt=j!==null?j.memoizedState:null;if(j===null&&Q.stateNode===null&&(Q.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),Ue.mode==="hidden"){if((Q.flags&128)!==0){if(jt=jt!==null?jt.baseLanes|xe:xe,j!==null){for(Ue=Q.child=j.child,bt=0;Ue!==null;)bt=bt|Ue.lanes|Ue.childLanes,Ue=Ue.sibling;Ue=bt&~jt}else Ue=0,Q.child=null;return sC(j,Q,jt,xe,Ue)}if((xe&536870912)!==0)Q.memoizedState={baseLanes:0,cachePool:null},j!==null&&Yw(Q,jt!==null?jt.cachePool:null),jt!==null?zM(Q,jt):RA(),IA(Q);else return Ue=Q.lanes=536870912,sC(j,Q,jt!==null?jt.baseLanes|xe:xe,xe,Ue)}else jt!==null?(Yw(Q,jt.cachePool),zM(Q,jt),Nm(),Q.memoizedState=null):(j!==null&&Yw(Q,null),RA(),Nm());return hv(j,Q,bt,xe),Q.child}function Kx(j,Q){return j!==null&&j.tag===22||Q.stateNode!==null||(Q.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),Q.sibling}function sC(j,Q,xe,Ue,bt){var jt=AA();return jt=jt===null?null:{parent:Ed._currentValue,pool:jt},Q.memoizedState={baseLanes:xe,cachePool:jt},j!==null&&Yw(Q,null),RA(),IA(Q),j!==null&&Ry(j,Q,Ue,!0),Q.childLanes=bt,null}function k2(j,Q){return Q=L2({mode:Q.mode,children:Q.children},j.mode),Q.ref=j.ref,j.child=Q,Q.return=j,Q}function lC(j,Q,xe){return Ig(Q,j.child,null,xe),j=k2(Q,Q.pendingProps),j.flags|=2,Kp(Q),Q.memoizedState=null,j}function YL(j,Q,xe){var Ue=Q.pendingProps,bt=(Q.flags&128)!==0;if(Q.flags&=-129,j===null){if(ec){if(Ue.mode==="hidden")return j=k2(Q,Ue),Q.lanes=536870912,Kx(null,j);if(mp(Q),(j=Yf)?(j=K2(j,vp),j=j!==null&&j.data==="&"?j:null,j!==null&&(Q.memoizedState={dehydrated:j,treeContext:sm!==null?{id:sh,overflow:lm}:null,retryLane:536870912,hydrationErrors:null},xe=Dm(j),xe.return=Q,Q.child=xe,cv=Q,Yf=null)):j=null,j===null)throw kg(Q);return Q.lanes=536870912,null}return k2(Q,Ue)}var jt=j.memoizedState;if(jt!==null){var Xr=jt.dehydrated;if(mp(Q),bt)if(Q.flags&256)Q.flags&=-257,Q=lC(j,Q,xe);else if(Q.memoizedState!==null)Q.child=j.child,Q.flags|=128,Q=null;else throw Error(L(558));else if(od||Ry(j,Q,xe,!1),bt=(xe&j.childLanes)!==0,od||bt){if(Ue=Zf,Ue!==null&&(Xr=qp(Ue,xe),Xr!==0&&Xr!==jt.retryLane))throw jt.retryLane=Xr,Lm(j,Xr),bp(Ue,j,Xr),$A;j2(),Q=lC(j,Q,xe)}else j=jt.treeContext,Yf=Tp(Xr.nextSibling),cv=Q,ec=!0,Om=null,vp=!1,j!==null&&EM(Q,j),Q=k2(Q,Ue),Q.flags|=4096;return Q}return j=uv(j.child,{mode:Ue.mode,children:Ue.children}),j.ref=Q.ref,Q.child=j,j.return=Q,j}function P2(j,Q){var xe=Q.ref;if(xe===null)j!==null&&j.ref!==null&&(Q.flags|=4194816);else{if(typeof xe!="function"&&typeof xe!="object")throw Error(L(284));(j===null||j.ref!==xe)&&(Q.flags|=4194816)}}function KA(j,Q,xe,Ue,bt){return Iy(Q),xe=qx(j,Q,xe,Ue,void 0,bt),Ue=t2(),j!==null&&!od?(zA(j,Q,bt),Y0(j,Q,bt)):(ec&&Ue&&ky(Q),Q.flags|=1,hv(j,Q,xe,bt),Q.child)}function JA(j,Q,xe,Ue,bt,jt){return Iy(Q),Q.updateQueue=null,xe=OA(Q,Ue,xe,bt),e2(j),Ue=t2(),j!==null&&!od?(zA(j,Q,jt),Y0(j,Q,jt)):(ec&&Ue&&ky(Q),Q.flags|=1,hv(j,Q,xe,jt),Q.child)}function QA(j,Q,xe,Ue,bt){if(Iy(Q),Q.stateNode===null){var jt=wv,Xr=xe.contextType;typeof Xr=="object"&&Xr!==null&&(jt=fv(Xr)),jt=new xe(Ue,jt),Q.memoizedState=jt.state!==null&&jt.state!==void 0?jt.state:null,jt.updater=E2,Q.stateNode=jt,jt._reactInternals=Q,jt=Q.stateNode,jt.props=Ue,jt.state=Q.memoizedState,jt.refs={},MA(Q),Xr=xe.contextType,jt.context=typeof Xr=="object"&&Xr!==null?fv(Xr):wv,jt.state=Q.memoizedState,Xr=xe.getDerivedStateFromProps,typeof Xr=="function"&&(YA(Q,xe,Xr,Ue),jt.state=Q.memoizedState),typeof xe.getDerivedStateFromProps=="function"||typeof jt.getSnapshotBeforeUpdate=="function"||typeof jt.UNSAFE_componentWillMount!="function"&&typeof jt.componentWillMount!="function"||(Xr=jt.state,typeof jt.componentWillMount=="function"&&jt.componentWillMount(),typeof jt.UNSAFE_componentWillMount=="function"&&jt.UNSAFE_componentWillMount(),Xr!==jt.state&&E2.enqueueReplaceState(jt,jt.state,null),jx(Q,Ue,jt,bt),Bx(),jt.state=Q.memoizedState),typeof jt.componentDidMount=="function"&&(Q.flags|=4194308),Ue=!0}else if(j===null){jt=Q.stateNode;var Nn=Q.memoizedProps,Ya=jy(xe,Nn);jt.props=Ya;var Wi=jt.context,To=xe.contextType;Xr=wv,typeof To=="object"&&To!==null&&(Xr=fv(To));var Po=xe.getDerivedStateFromProps;To=typeof Po=="function"||typeof jt.getSnapshotBeforeUpdate=="function",Nn=Q.pendingProps!==Nn,To||typeof jt.UNSAFE_componentWillReceiveProps!="function"&&typeof jt.componentWillReceiveProps!="function"||(Nn||Wi!==Xr)&&JM(Q,jt,Ue,Xr),G0=!1;var Qi=Q.memoizedState;jt.state=Qi,jx(Q,Ue,jt,bt),Bx(),Wi=Q.memoizedState,Nn||Qi!==Wi||G0?(typeof Po=="function"&&(YA(Q,xe,Po,Ue),Wi=Q.memoizedState),(Ya=G0||KM(Q,xe,Ya,Ue,Qi,Wi,Xr))?(To||typeof jt.UNSAFE_componentWillMount!="function"&&typeof jt.componentWillMount!="function"||(typeof jt.componentWillMount=="function"&&jt.componentWillMount(),typeof jt.UNSAFE_componentWillMount=="function"&&jt.UNSAFE_componentWillMount()),typeof jt.componentDidMount=="function"&&(Q.flags|=4194308)):(typeof jt.componentDidMount=="function"&&(Q.flags|=4194308),Q.memoizedProps=Ue,Q.memoizedState=Wi),jt.props=Ue,jt.state=Wi,jt.context=Xr,Ue=Ya):(typeof jt.componentDidMount=="function"&&(Q.flags|=4194308),Ue=!1)}else{jt=Q.stateNode,CA(j,Q),Xr=Q.memoizedProps,To=jy(xe,Xr),jt.props=To,Po=Q.pendingProps,Qi=jt.context,Wi=xe.contextType,Ya=wv,typeof Wi=="object"&&Wi!==null&&(Ya=fv(Wi)),Nn=xe.getDerivedStateFromProps,(Wi=typeof Nn=="function"||typeof jt.getSnapshotBeforeUpdate=="function")||typeof jt.UNSAFE_componentWillReceiveProps!="function"&&typeof jt.componentWillReceiveProps!="function"||(Xr!==Po||Qi!==Ya)&&JM(Q,jt,Ue,Ya),G0=!1,Qi=Q.memoizedState,jt.state=Qi,jx(Q,Ue,jt,bt),Bx();var so=Q.memoizedState;Xr!==Po||Qi!==so||G0||j!==null&&j.dependencies!==null&&Xw(j.dependencies)?(typeof Nn=="function"&&(YA(Q,xe,Nn,Ue),so=Q.memoizedState),(To=G0||KM(Q,xe,To,Ue,Qi,so,Ya)||j!==null&&j.dependencies!==null&&Xw(j.dependencies))?(Wi||typeof jt.UNSAFE_componentWillUpdate!="function"&&typeof jt.componentWillUpdate!="function"||(typeof jt.componentWillUpdate=="function"&&jt.componentWillUpdate(Ue,so,Ya),typeof jt.UNSAFE_componentWillUpdate=="function"&&jt.UNSAFE_componentWillUpdate(Ue,so,Ya)),typeof jt.componentDidUpdate=="function"&&(Q.flags|=4),typeof jt.getSnapshotBeforeUpdate=="function"&&(Q.flags|=1024)):(typeof jt.componentDidUpdate!="function"||Xr===j.memoizedProps&&Qi===j.memoizedState||(Q.flags|=4),typeof jt.getSnapshotBeforeUpdate!="function"||Xr===j.memoizedProps&&Qi===j.memoizedState||(Q.flags|=1024),Q.memoizedProps=Ue,Q.memoizedState=so),jt.props=Ue,jt.state=so,jt.context=Ya,Ue=To):(typeof jt.componentDidUpdate!="function"||Xr===j.memoizedProps&&Qi===j.memoizedState||(Q.flags|=4),typeof jt.getSnapshotBeforeUpdate!="function"||Xr===j.memoizedProps&&Qi===j.memoizedState||(Q.flags|=1024),Ue=!1)}return jt=Ue,P2(j,Q),Ue=(Q.flags&128)!==0,jt||Ue?(jt=Q.stateNode,xe=Ue&&typeof xe.getDerivedStateFromError!="function"?null:jt.render(),Q.flags|=1,j!==null&&Ue?(Q.child=Ig(Q,j.child,null,bt),Q.child=Ig(Q,null,xe,bt)):hv(j,Q,xe,bt),Q.memoizedState=jt.state,j=Q.child):j=Y0(j,Q,bt),j}function eS(j,Q,xe,Ue){return V0(),Q.flags|=256,hv(j,Q,xe,Ue),Q.child}var tS={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function rS(j){return{baseLanes:j,cachePool:LM()}}function nS(j,Q,xe){return j=j!==null?j.childLanes&~xe:0,Q&&(j|=_p),j}function uC(j,Q,xe){var Ue=Q.pendingProps,bt=!1,jt=(Q.flags&128)!==0,Xr;if((Xr=jt)||(Xr=j!==null&&j.memoizedState===null?!1:(_c.current&2)!==0),Xr&&(bt=!0,Q.flags&=-129),Xr=(Q.flags&32)!==0,Q.flags&=-33,j===null){if(ec){if(bt?l0(Q):Nm(),(j=Yf)?(j=K2(j,vp),j=j!==null&&j.data!=="&"?j:null,j!==null&&(Q.memoizedState={dehydrated:j,treeContext:sm!==null?{id:sh,overflow:lm}:null,retryLane:536870912,hydrationErrors:null},xe=Dm(j),xe.return=Q,Q.child=xe,cv=Q,Yf=null)):j=null,j===null)throw kg(Q);return gb(j)?Q.lanes=32:Q.lanes=536870912,null}var Nn=Ue.children;return Ue=Ue.fallback,bt?(Nm(),bt=Q.mode,Nn=L2({mode:"hidden",children:Nn},bt),Ue=Cg(Ue,bt,xe,null),Nn.return=Q,Ue.return=Q,Nn.sibling=Ue,Q.child=Nn,Ue=Q.child,Ue.memoizedState=rS(xe),Ue.childLanes=nS(j,Xr,xe),Q.memoizedState=tS,Kx(null,Ue)):(l0(Q),aS(Q,Nn))}var Ya=j.memoizedState;if(Ya!==null&&(Nn=Ya.dehydrated,Nn!==null)){if(jt)Q.flags&256?(l0(Q),Q.flags&=-257,Q=iS(j,Q,xe)):Q.memoizedState!==null?(Nm(),Q.child=j.child,Q.flags|=128,Q=null):(Nm(),Nn=Ue.fallback,bt=Q.mode,Ue=L2({mode:"visible",children:Ue.children},bt),Nn=Cg(Nn,bt,xe,null),Nn.flags|=2,Ue.return=Q,Nn.return=Q,Ue.sibling=Nn,Q.child=Ue,Ig(Q,j.child,null,xe),Ue=Q.child,Ue.memoizedState=rS(xe),Ue.childLanes=nS(j,Xr,xe),Q.memoizedState=tS,Q=Kx(null,Ue));else if(l0(Q),gb(Nn)){if(Xr=Nn.nextSibling&&Nn.nextSibling.dataset,Xr)var Wi=Xr.dgst;Xr=Wi,Ue=Error(L(419)),Ue.stack="",Ue.digest=Xr,W1({value:Ue,source:null,stack:null}),Q=iS(j,Q,xe)}else if(od||Ry(j,Q,xe,!1),Xr=(xe&j.childLanes)!==0,od||Xr){if(Xr=Zf,Xr!==null&&(Ue=qp(Xr,xe),Ue!==0&&Ue!==Ya.retryLane))throw Ya.retryLane=Ue,Lm(j,Ue),bp(Xr,j,Ue),$A;mb(Nn)||j2(),Q=iS(j,Q,xe)}else mb(Nn)?(Q.flags|=192,Q.child=j.child,Q=null):(j=Ya.treeContext,Yf=Tp(Nn.nextSibling),cv=Q,ec=!0,Om=null,vp=!1,j!==null&&EM(Q,j),Q=aS(Q,Ue.children),Q.flags|=4096);return Q}return bt?(Nm(),Nn=Ue.fallback,bt=Q.mode,Ya=j.child,Wi=Ya.sibling,Ue=uv(Ya,{mode:"hidden",children:Ue.children}),Ue.subtreeFlags=Ya.subtreeFlags&65011712,Wi!==null?Nn=uv(Wi,Nn):(Nn=Cg(Nn,bt,xe,null),Nn.flags|=2),Nn.return=Q,Ue.return=Q,Ue.sibling=Nn,Q.child=Ue,Kx(null,Ue),Ue=Q.child,Nn=j.child.memoizedState,Nn===null?Nn=rS(xe):(bt=Nn.cachePool,bt!==null?(Ya=Ed._currentValue,bt=bt.parent!==Ya?{parent:Ya,pool:Ya}:bt):bt=LM(),Nn={baseLanes:Nn.baseLanes|xe,cachePool:bt}),Ue.memoizedState=Nn,Ue.childLanes=nS(j,Xr,xe),Q.memoizedState=tS,Kx(j.child,Ue)):(l0(Q),xe=j.child,j=xe.sibling,xe=uv(xe,{mode:"visible",children:Ue.children}),xe.return=Q,xe.sibling=null,j!==null&&(Xr=Q.deletions,Xr===null?(Q.deletions=[j],Q.flags|=16):Xr.push(j)),Q.child=xe,Q.memoizedState=null,xe)}function aS(j,Q){return Q=L2({mode:"visible",children:Q},j.mode),Q.return=j,j.child=Q}function L2(j,Q){return j=Tv(22,j,null,Q),j.lanes=0,j}function iS(j,Q,xe){return Ig(Q,j.child,null,xe),j=aS(Q,Q.pendingProps.children),j.flags|=2,Q.memoizedState=null,j}function cC(j,Q,xe){j.lanes|=Q;var Ue=j.alternate;Ue!==null&&(Ue.lanes|=Q),bA(j.return,Q,xe)}function oS(j,Q,xe,Ue,bt,jt){var Xr=j.memoizedState;Xr===null?j.memoizedState={isBackwards:Q,rendering:null,renderingStartTime:0,last:Ue,tail:xe,tailMode:bt,treeForkCount:jt}:(Xr.isBackwards=Q,Xr.rendering=null,Xr.renderingStartTime=0,Xr.last=Ue,Xr.tail=xe,Xr.tailMode=bt,Xr.treeForkCount=jt)}function fC(j,Q,xe){var Ue=Q.pendingProps,bt=Ue.revealOrder,jt=Ue.tail;Ue=Ue.children;var Xr=_c.current,Nn=(Xr&2)!==0;if(Nn?(Xr=Xr&1|2,Q.flags|=128):Xr&=1,Ei(_c,Xr),hv(j,Q,Ue,xe),Ue=ec?Lx:0,!Nn&&j!==null&&(j.flags&128)!==0)e:for(j=Q.child;j!==null;){if(j.tag===13)j.memoizedState!==null&&cC(j,xe,Q);else if(j.tag===19)cC(j,xe,Q);else if(j.child!==null){j.child.return=j,j=j.child;continue}if(j===Q)break e;for(;j.sibling===null;){if(j.return===null||j.return===Q)break e;j=j.return}j.sibling.return=j.return,j=j.sibling}switch(bt){case"forwards":for(xe=Q.child,bt=null;xe!==null;)j=xe.alternate,j!==null&&J1(j)===null&&(bt=xe),xe=xe.sibling;xe=bt,xe===null?(bt=Q.child,Q.child=null):(bt=xe.sibling,xe.sibling=null),oS(Q,!1,bt,xe,jt,Ue);break;case"backwards":case"unstable_legacy-backwards":for(xe=null,bt=Q.child,Q.child=null;bt!==null;){if(j=bt.alternate,j!==null&&J1(j)===null){Q.child=bt;break}j=bt.sibling,bt.sibling=xe,xe=bt,bt=j}oS(Q,!0,xe,null,jt,Ue);break;case"together":oS(Q,!1,null,null,void 0,Ue);break;default:Q.memoizedState=null}return Q.child}function Y0(j,Q,xe){if(j!==null&&(Q.dependencies=j.dependencies),Q0|=Q.lanes,(xe&Q.childLanes)===0)if(j!==null){if(Ry(j,Q,xe,!1),(xe&Q.childLanes)===0)return null}else return null;if(j!==null&&Q.child!==j.child)throw Error(L(153));if(Q.child!==null){for(j=Q.child,xe=uv(j,j.pendingProps),Q.child=xe,xe.return=Q;j.sibling!==null;)j=j.sibling,xe=xe.sibling=uv(j,j.pendingProps),xe.return=Q;xe.sibling=null}return Q.child}function R2(j,Q){return(j.lanes&Q)!==0?!0:(j=j.dependencies,!!(j!==null&&Xw(j)))}function hC(j,Q,xe){switch(Q.tag){case 3:Ll(Q,Q.stateNode.containerInfo),Pg(Q,Ed,j.memoizedState.cache),V0();break;case 27:case 5:Hs(Q);break;case 4:Ll(Q,Q.stateNode.containerInfo);break;case 10:Pg(Q,Q.type,Q.memoizedProps.value);break;case 31:if(Q.memoizedState!==null)return Q.flags|=128,mp(Q),null;break;case 13:var Ue=Q.memoizedState;if(Ue!==null)return Ue.dehydrated!==null?(l0(Q),Q.flags|=128,null):(xe&Q.child.childLanes)!==0?uC(j,Q,xe):(l0(Q),j=Y0(j,Q,xe),j!==null?j.sibling:null);l0(Q);break;case 19:var bt=(j.flags&128)!==0;if(Ue=(xe&Q.childLanes)!==0,Ue||(Ry(j,Q,xe,!1),Ue=(xe&Q.childLanes)!==0),bt){if(Ue)return fC(j,Q,xe);Q.flags|=128}if(bt=Q.memoizedState,bt!==null&&(bt.rendering=null,bt.tail=null,bt.lastEffect=null),Ei(_c,_c.current),Ue)break;return null;case 22:return Q.lanes=0,oC(j,Q,xe,Q.pendingProps);case 24:Pg(Q,Ed,j.memoizedState.cache)}return Y0(j,Q,xe)}function a_(j,Q,xe){if(j!==null)if(j.memoizedProps!==Q.pendingProps)od=!0;else{if(!R2(j,xe)&&(Q.flags&128)===0)return od=!1,hC(j,Q,xe);od=(j.flags&131072)!==0}else od=!1,ec&&(Q.flags&1048576)!==0&&G1(Q,Lx,Q.index);switch(Q.lanes=0,Q.tag){case 16:e:{var Ue=Q.pendingProps;if(j=Oy(Q.elementType),Q.type=j,typeof j=="function")Wp(j)?(Ue=jy(j,Ue),Q.tag=1,Q=QA(null,Q,j,Ue,xe)):(Q.tag=0,Q=KA(null,Q,j,Ue,xe));else{if(j!=null){var bt=j.$$typeof;if(bt===pn){Q.tag=11,Q=aC(null,Q,j,Ue,xe);break e}else if(bt===cn){Q.tag=14,Q=iC(null,Q,j,Ue,xe);break e}}throw Q=Fn(j)||j,Error(L(306,Q,""))}}return Q;case 0:return KA(j,Q,Q.type,Q.pendingProps,xe);case 1:return Ue=Q.type,bt=jy(Ue,Q.pendingProps),QA(j,Q,Ue,bt,xe);case 3:e:{if(Ll(Q,Q.stateNode.containerInfo),j===null)throw Error(L(387));Ue=Q.pendingProps;var jt=Q.memoizedState;bt=jt.element,CA(j,Q),jx(Q,Ue,null,xe);var Xr=Q.memoizedState;if(Ue=Xr.cache,Pg(Q,Ed,Ue),Ue!==jt.cache&&wA(Q,[Ed],xe,!0),Bx(),Ue=Xr.element,jt.isDehydrated)if(jt={element:Ue,isDehydrated:!1,cache:Xr.cache},Q.updateQueue.baseState=jt,Q.memoizedState=jt,Q.flags&256){Q=eS(j,Q,Ue,xe);break e}else if(Ue!==bt){bt=Gh(Error(L(424)),Q),W1(bt),Q=eS(j,Q,Ue,xe);break e}else{switch(j=Q.stateNode.containerInfo,j.nodeType){case 9:j=j.body;break;default:j=j.nodeName==="HTML"?j.ownerDocument.body:j}for(Yf=Tp(j.firstChild),cv=Q,ec=!0,Om=null,vp=!0,xe=DM(Q,null,Ue,xe),Q.child=xe;xe;)xe.flags=xe.flags&-3|4096,xe=xe.sibling}else{if(V0(),Ue===bt){Q=Y0(j,Q,xe);break e}hv(j,Q,Ue,xe)}Q=Q.child}return Q;case 26:return P2(j,Q),j===null?(xe=n3(Q.type,null,Q.pendingProps,null))?Q.memoizedState=xe:ec||(xe=Q.type,j=Q.pendingProps,Ue=wp(fi.current).createElement(xe),Ue[Fl]=Q,Ue[jv]=j,Pd(Ue,xe,j),sv(Ue),Q.stateNode=Ue):Q.memoizedState=n3(Q.type,j.memoizedProps,Q.pendingProps,j.memoizedState),null;case 27:return Hs(Q),j===null&&ec&&(Ue=Q.stateNode=J2(Q.type,Q.pendingProps,fi.current),cv=Q,vp=!0,bt=Yf,m0(Q.type)?(Um=bt,Yf=Tp(Ue.firstChild)):Yf=bt),hv(j,Q,Q.pendingProps.children,xe),P2(j,Q),j===null&&(Q.flags|=4194304),Q.child;case 5:return j===null&&ec&&((bt=Ue=Yf)&&(Ue=g0(Ue,Q.type,Q.pendingProps,vp),Ue!==null?(Q.stateNode=Ue,cv=Q,Yf=Tp(Ue.firstChild),vp=!1,bt=!0):bt=!1),bt||kg(Q)),Hs(Q),bt=Q.type,jt=Q.pendingProps,Xr=j!==null?j.memoizedProps:null,Ue=jt.children,Y2(bt,jt)?Ue=null:Xr!==null&&Y2(bt,Xr)&&(Q.flags|=32),Q.memoizedState!==null&&(bt=qx(j,Q,HL,null,null,xe),S_._currentValue=bt),P2(j,Q),hv(j,Q,Ue,xe),Q.child;case 6:return j===null&&ec&&((j=xe=Yf)&&(xe=OS(xe,Q.pendingProps,vp),xe!==null?(Q.stateNode=xe,cv=Q,Yf=null,j=!0):j=!1),j||kg(Q)),null;case 13:return uC(j,Q,xe);case 4:return Ll(Q,Q.stateNode.containerInfo),Ue=Q.pendingProps,j===null?Q.child=Ig(Q,null,Ue,xe):hv(j,Q,Ue,xe),Q.child;case 11:return aC(j,Q,Q.type,Q.pendingProps,xe);case 7:return hv(j,Q,Q.pendingProps,xe),Q.child;case 8:return hv(j,Q,Q.pendingProps.children,xe),Q.child;case 12:return hv(j,Q,Q.pendingProps.children,xe),Q.child;case 10:return Ue=Q.pendingProps,Pg(Q,Q.type,Ue.value),hv(j,Q,Ue.children,xe),Q.child;case 9:return bt=Q.type._context,Ue=Q.pendingProps.children,Iy(Q),bt=fv(bt),Ue=Ue(bt),Q.flags|=1,hv(j,Q,Ue,xe),Q.child;case 14:return iC(j,Q,Q.type,Q.pendingProps,xe);case 15:return C2(j,Q,Q.type,Q.pendingProps,xe);case 19:return fC(j,Q,xe);case 31:return YL(j,Q,xe);case 22:return oC(j,Q,xe,Q.pendingProps);case 24:return Iy(Q),Ue=fv(Ed),j===null?(bt=AA(),bt===null&&(bt=Zf,jt=TA(),bt.pooledCache=jt,jt.refCount++,jt!==null&&(bt.pooledCacheLanes|=xe),bt=jt),Q.memoizedState={parent:Ue,cache:bt},MA(Q),Pg(Q,Ed,bt)):((j.lanes&xe)!==0&&(CA(j,Q),jx(Q,null,null,xe),Bx()),bt=j.memoizedState,jt=Q.memoizedState,bt.parent!==Ue?(bt={parent:Ue,cache:Ue},Q.memoizedState=bt,Q.lanes===0&&(Q.memoizedState=Q.updateQueue.baseState=bt),Pg(Q,Ed,Ue)):(Ue=jt.cache,Pg(Q,Ed,Ue),Ue!==bt.cache&&wA(Q,[Ed],xe,!0))),hv(j,Q,Q.pendingProps.children,xe),Q.child;case 29:throw Q.pendingProps}throw Error(L(156,Q.tag))}function c0(j){j.flags|=4}function sS(j,Q,xe,Ue,bt){if((Q=(j.mode&32)!==0)&&(Q=!1),Q){if(j.flags|=16777216,(bt&335544128)===bt)if(j.stateNode.complete)j.flags|=8192;else if(RC())j.flags|=8192;else throw zy=$w,Zw}else j.flags&=-16777217}function dC(j,Q){if(Q.type!=="stylesheet"||(Q.state.loading&4)!==0)j.flags&=-16777217;else if(j.flags|=16777216,!Gd(Q))if(RC())j.flags|=8192;else throw zy=$w,Zw}function I2(j,Q){Q!==null&&(j.flags|=4),j.flags&16384&&(Q=j.tag!==22?Xf():536870912,j.lanes|=Q,Vg|=Q)}function Jx(j,Q){if(!ec)switch(j.tailMode){case"hidden":Q=j.tail;for(var xe=null;Q!==null;)Q.alternate!==null&&(xe=Q),Q=Q.sibling;xe===null?j.tail=null:xe.sibling=null;break;case"collapsed":xe=j.tail;for(var Ue=null;xe!==null;)xe.alternate!==null&&(Ue=xe),xe=xe.sibling;Ue===null?Q||j.tail===null?j.tail=null:j.tail.sibling=null:Ue.sibling=null}}function vh(j){var Q=j.alternate!==null&&j.alternate.child===j.child,xe=0,Ue=0;if(Q)for(var bt=j.child;bt!==null;)xe|=bt.lanes|bt.childLanes,Ue|=bt.subtreeFlags&65011712,Ue|=bt.flags&65011712,bt.return=j,bt=bt.sibling;else for(bt=j.child;bt!==null;)xe|=bt.lanes|bt.childLanes,Ue|=bt.subtreeFlags,Ue|=bt.flags,bt.return=j,bt=bt.sibling;return j.subtreeFlags|=Ue,j.childLanes=xe,Q}function ZL(j,Q,xe){var Ue=Q.pendingProps;switch(Py(Q),Q.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return vh(Q),null;case 1:return vh(Q),null;case 3:return xe=Q.stateNode,Ue=null,j!==null&&(Ue=j.memoizedState.cache),Q.memoizedState.cache!==Ue&&(Q.flags|=2048),zm(Ed),Mo(),xe.pendingContext&&(xe.context=xe.pendingContext,xe.pendingContext=null),(j===null||j.child===null)&&(X1(Q)?c0(Q):j===null||j.memoizedState.isDehydrated&&(Q.flags&256)===0||(Q.flags|=1024,_A())),vh(Q),null;case 26:var bt=Q.type,jt=Q.memoizedState;return j===null?(c0(Q),jt!==null?(vh(Q),dC(Q,jt)):(vh(Q),sS(Q,bt,null,Ue,xe))):jt?jt!==j.memoizedState?(c0(Q),vh(Q),dC(Q,jt)):(vh(Q),Q.flags&=-16777217):(j=j.memoizedProps,j!==Ue&&c0(Q),vh(Q),sS(Q,bt,j,Ue,xe)),null;case 27:if(qo(Q),xe=fi.current,bt=Q.type,j!==null&&Q.stateNode!=null)j.memoizedProps!==Ue&&c0(Q);else{if(!Ue){if(Q.stateNode===null)throw Error(L(166));return vh(Q),null}j=$i.current,X1(Q)?Ih(Q):(j=J2(bt,Ue,xe),Q.stateNode=j,c0(Q))}return vh(Q),null;case 5:if(qo(Q),bt=Q.type,j!==null&&Q.stateNode!=null)j.memoizedProps!==Ue&&c0(Q);else{if(!Ue){if(Q.stateNode===null)throw Error(L(166));return vh(Q),null}if(jt=$i.current,X1(Q))Ih(Q);else{var Xr=wp(fi.current);switch(jt){case 1:jt=Xr.createElementNS("http://www.w3.org/2000/svg",bt);break;case 2:jt=Xr.createElementNS("http://www.w3.org/1998/Math/MathML",bt);break;default:switch(bt){case"svg":jt=Xr.createElementNS("http://www.w3.org/2000/svg",bt);break;case"math":jt=Xr.createElementNS("http://www.w3.org/1998/Math/MathML",bt);break;case"script":jt=Xr.createElement("div"),jt.innerHTML="<script><\/script>",jt=jt.removeChild(jt.firstChild);break;case"select":jt=typeof Ue.is=="string"?Xr.createElement("select",{is:Ue.is}):Xr.createElement("select"),Ue.multiple?jt.multiple=!0:Ue.size&&(jt.size=Ue.size);break;default:jt=typeof Ue.is=="string"?Xr.createElement(bt,{is:Ue.is}):Xr.createElement(bt)}}jt[Fl]=Q,jt[jv]=Ue;e:for(Xr=Q.child;Xr!==null;){if(Xr.tag===5||Xr.tag===6)jt.appendChild(Xr.stateNode);else if(Xr.tag!==4&&Xr.tag!==27&&Xr.child!==null){Xr.child.return=Xr,Xr=Xr.child;continue}if(Xr===Q)break e;for(;Xr.sibling===null;){if(Xr.return===null||Xr.return===Q)break e;Xr=Xr.return}Xr.sibling.return=Xr.return,Xr=Xr.sibling}Q.stateNode=jt;e:switch(Pd(jt,bt,Ue),bt){case"button":case"input":case"select":case"textarea":Ue=!!Ue.autoFocus;break e;case"img":Ue=!0;break e;default:Ue=!1}Ue&&c0(Q)}}return vh(Q),sS(Q,Q.type,j===null?null:j.memoizedProps,Q.pendingProps,xe),null;case 6:if(j&&Q.stateNode!=null)j.memoizedProps!==Ue&&c0(Q);else{if(typeof Ue!="string"&&Q.stateNode===null)throw Error(L(166));if(j=fi.current,X1(Q)){if(j=Q.stateNode,xe=Q.memoizedProps,Ue=null,bt=cv,bt!==null)switch(bt.tag){case 27:case 5:Ue=bt.memoizedProps}j[Fl]=Q,j=!!(j.nodeValue===xe||Ue!==null&&Ue.suppressHydrationWarning===!0||X2(j.nodeValue,xe)),j||kg(Q,!0)}else j=wp(j).createTextNode(Ue),j[Fl]=Q,Q.stateNode=j}return vh(Q),null;case 31:if(xe=Q.memoizedState,j===null||j.memoizedState!==null){if(Ue=X1(Q),xe!==null){if(j===null){if(!Ue)throw Error(L(318));if(j=Q.memoizedState,j=j!==null?j.dehydrated:null,!j)throw Error(L(557));j[Fl]=Q}else V0(),(Q.flags&128)===0&&(Q.memoizedState=null),Q.flags|=4;vh(Q),j=!1}else xe=_A(),j!==null&&j.memoizedState!==null&&(j.memoizedState.hydrationErrors=xe),j=!0;if(!j)return Q.flags&256?(Kp(Q),Q):(Kp(Q),null);if((Q.flags&128)!==0)throw Error(L(558))}return vh(Q),null;case 13:if(Ue=Q.memoizedState,j===null||j.memoizedState!==null&&j.memoizedState.dehydrated!==null){if(bt=X1(Q),Ue!==null&&Ue.dehydrated!==null){if(j===null){if(!bt)throw Error(L(318));if(bt=Q.memoizedState,bt=bt!==null?bt.dehydrated:null,!bt)throw Error(L(317));bt[Fl]=Q}else V0(),(Q.flags&128)===0&&(Q.memoizedState=null),Q.flags|=4;vh(Q),bt=!1}else bt=_A(),j!==null&&j.memoizedState!==null&&(j.memoizedState.hydrationErrors=bt),bt=!0;if(!bt)return Q.flags&256?(Kp(Q),Q):(Kp(Q),null)}return Kp(Q),(Q.flags&128)!==0?(Q.lanes=xe,Q):(xe=Ue!==null,j=j!==null&&j.memoizedState!==null,xe&&(Ue=Q.child,bt=null,Ue.alternate!==null&&Ue.alternate.memoizedState!==null&&Ue.alternate.memoizedState.cachePool!==null&&(bt=Ue.alternate.memoizedState.cachePool.pool),jt=null,Ue.memoizedState!==null&&Ue.memoizedState.cachePool!==null&&(jt=Ue.memoizedState.cachePool.pool),jt!==bt&&(Ue.flags|=2048)),xe!==j&&xe&&(Q.child.flags|=8192),I2(Q,Q.updateQueue),vh(Q),null);case 4:return Mo(),j===null&&x_(Q.stateNode.containerInfo),vh(Q),null;case 10:return zm(Q.type),vh(Q),null;case 19:if(Wn(_c),Ue=Q.memoizedState,Ue===null)return vh(Q),null;if(bt=(Q.flags&128)!==0,jt=Ue.rendering,jt===null)if(bt)Jx(Ue,!1);else{if(Yh!==0||j!==null&&(j.flags&128)!==0)for(j=Q.child;j!==null;){if(jt=J1(j),jt!==null){for(Q.flags|=128,Jx(Ue,!1),j=jt.updateQueue,Q.updateQueue=j,I2(Q,j),Q.subtreeFlags=0,j=xe,xe=Q.child;xe!==null;)SM(xe,j),xe=xe.sibling;return Ei(_c,_c.current&1|2),ec&&Xh(Q,Ue.treeForkCount),Q.child}j=j.sibling}Ue.tail!==null&&ov()>z2&&(Q.flags|=128,bt=!0,Jx(Ue,!1),Q.lanes=4194304)}else{if(!bt)if(j=J1(jt),j!==null){if(Q.flags|=128,bt=!0,j=j.updateQueue,Q.updateQueue=j,I2(Q,j),Jx(Ue,!0),Ue.tail===null&&Ue.tailMode==="hidden"&&!jt.alternate&&!ec)return vh(Q),null}else 2*ov()-Ue.renderingStartTime>z2&&xe!==536870912&&(Q.flags|=128,bt=!0,Jx(Ue,!1),Q.lanes=4194304);Ue.isBackwards?(jt.sibling=Q.child,Q.child=jt):(j=Ue.last,j!==null?j.sibling=jt:Q.child=jt,Ue.last=jt)}return Ue.tail!==null?(j=Ue.tail,Ue.rendering=j,Ue.tail=j.sibling,Ue.renderingStartTime=ov(),j.sibling=null,xe=_c.current,Ei(_c,bt?xe&1|2:xe&1),ec&&Xh(Q,Ue.treeForkCount),j):(vh(Q),null);case 22:case 23:return Kp(Q),zg(),Ue=Q.memoizedState!==null,j!==null?j.memoizedState!==null!==Ue&&(Q.flags|=8192):Ue&&(Q.flags|=8192),Ue?(xe&536870912)!==0&&(Q.flags&128)===0&&(vh(Q),Q.subtreeFlags&6&&(Q.flags|=8192)):vh(Q),xe=Q.updateQueue,xe!==null&&I2(Q,xe.retryQueue),xe=null,j!==null&&j.memoizedState!==null&&j.memoizedState.cachePool!==null&&(xe=j.memoizedState.cachePool.pool),Ue=null,Q.memoizedState!==null&&Q.memoizedState.cachePool!==null&&(Ue=Q.memoizedState.cachePool.pool),Ue!==xe&&(Q.flags|=2048),j!==null&&Wn(Lg),null;case 24:return xe=null,j!==null&&(xe=j.memoizedState.cache),Q.memoizedState.cache!==xe&&(Q.flags|=2048),zm(Ed),vh(Q),null;case 25:return null;case 30:return null}throw Error(L(156,Q.tag))}function $L(j,Q){switch(Py(Q),Q.tag){case 1:return j=Q.flags,j&65536?(Q.flags=j&-65537|128,Q):null;case 3:return zm(Ed),Mo(),j=Q.flags,(j&65536)!==0&&(j&128)===0?(Q.flags=j&-65537|128,Q):null;case 26:case 27:case 5:return qo(Q),null;case 31:if(Q.memoizedState!==null){if(Kp(Q),Q.alternate===null)throw Error(L(340));V0()}return j=Q.flags,j&65536?(Q.flags=j&-65537|128,Q):null;case 13:if(Kp(Q),j=Q.memoizedState,j!==null&&j.dehydrated!==null){if(Q.alternate===null)throw Error(L(340));V0()}return j=Q.flags,j&65536?(Q.flags=j&-65537|128,Q):null;case 19:return Wn(_c),null;case 4:return Mo(),null;case 10:return zm(Q.type),null;case 22:case 23:return Kp(Q),zg(),j!==null&&Wn(Lg),j=Q.flags,j&65536?(Q.flags=j&-65537|128,Q):null;case 24:return zm(Ed),null;case 25:return null;default:return null}}function vC(j,Q){switch(Py(Q),Q.tag){case 3:zm(Ed),Mo();break;case 26:case 27:case 5:qo(Q);break;case 4:Mo();break;case 31:Q.memoizedState!==null&&Kp(Q);break;case 13:Kp(Q);break;case 19:Wn(_c);break;case 10:zm(Q.type);break;case 22:case 23:Kp(Q),zg(),j!==null&&Wn(Lg);break;case 24:zm(Ed)}}function Qx(j,Q){try{var xe=Q.updateQueue,Ue=xe!==null?xe.lastEffect:null;if(Ue!==null){var bt=Ue.next;xe=bt;do{if((xe.tag&j)===j){Ue=void 0;var jt=xe.create,Xr=xe.inst;Ue=jt(),Xr.destroy=Ue}xe=xe.next}while(xe!==bt)}}catch(Nn){wf(Q,Q.return,Nn)}}function um(j,Q,xe){try{var Ue=Q.updateQueue,bt=Ue!==null?Ue.lastEffect:null;if(bt!==null){var jt=bt.next;Ue=jt;do{if((Ue.tag&j)===j){var Xr=Ue.inst,Nn=Xr.destroy;if(Nn!==void 0){Xr.destroy=void 0,bt=Q;var Ya=xe,Wi=Nn;try{Wi()}catch(To){wf(bt,Ya,To)}}}Ue=Ue.next}while(Ue!==jt)}}catch(To){wf(Q,Q.return,To)}}function lS(j){var Q=j.updateQueue;if(Q!==null){var xe=j.stateNode;try{LA(Q,xe)}catch(Ue){wf(j,j.return,Ue)}}}function pC(j,Q,xe){xe.props=jy(j.type,j.memoizedProps),xe.state=j.memoizedState;try{xe.componentWillUnmount()}catch(Ue){wf(j,Q,Ue)}}function cm(j,Q){try{var xe=j.ref;if(xe!==null){switch(j.tag){case 26:case 27:case 5:var Ue=j.stateNode;break;case 30:Ue=j.stateNode;break;default:Ue=j.stateNode}typeof xe=="function"?j.refCleanup=xe(Ue):xe.current=Ue}}catch(bt){wf(j,Q,bt)}}function Fm(j,Q){var xe=j.ref,Ue=j.refCleanup;if(xe!==null)if(typeof Ue=="function")try{Ue()}catch(bt){wf(j,Q,bt)}finally{j.refCleanup=null,j=j.alternate,j!=null&&(j.refCleanup=null)}else if(typeof xe=="function")try{xe(null)}catch(bt){wf(j,Q,bt)}else xe.current=null}function mC(j){var Q=j.type,xe=j.memoizedProps,Ue=j.stateNode;try{e:switch(Q){case"button":case"input":case"select":case"textarea":xe.autoFocus&&Ue.focus();break e;case"img":xe.src?Ue.src=xe.src:xe.srcSet&&(Ue.srcset=xe.srcSet)}}catch(bt){wf(j,j.return,bt)}}function uS(j,Q,xe){try{var Ue=j.stateNode;MS(Ue,j.type,xe,Q),Ue[jv]=Q}catch(bt){wf(j,j.return,bt)}}function Uy(j){return j.tag===5||j.tag===3||j.tag===26||j.tag===27&&m0(j.type)||j.tag===4}function eb(j){e:for(;;){for(;j.sibling===null;){if(j.return===null||Uy(j.return))return null;j=j.return}for(j.sibling.return=j.return,j=j.sibling;j.tag!==5&&j.tag!==6&&j.tag!==18;){if(j.tag===27&&m0(j.type)||j.flags&2||j.child===null||j.tag===4)continue e;j.child.return=j,j=j.child}if(!(j.flags&2))return j.stateNode}}function i_(j,Q,xe){var Ue=j.tag;if(Ue===5||Ue===6)j=j.stateNode,Q?(xe.nodeType===9?xe.body:xe.nodeName==="HTML"?xe.ownerDocument.body:xe).insertBefore(j,Q):(Q=xe.nodeType===9?xe.body:xe.nodeName==="HTML"?xe.ownerDocument.body:xe,Q.appendChild(j),xe=xe._reactRootContainer,xe!=null||Q.onclick!==null||(Q.onclick=Ac));else if(Ue!==4&&(Ue===27&&m0(j.type)&&(xe=j.stateNode,Q=null),j=j.child,j!==null))for(i_(j,Q,xe),j=j.sibling;j!==null;)i_(j,Q,xe),j=j.sibling}function tb(j,Q,xe){var Ue=j.tag;if(Ue===5||Ue===6)j=j.stateNode,Q?xe.insertBefore(j,Q):xe.appendChild(j);else if(Ue!==4&&(Ue===27&&m0(j.type)&&(xe=j.stateNode),j=j.child,j!==null))for(tb(j,Q,xe),j=j.sibling;j!==null;)tb(j,Q,xe),j=j.sibling}function gC(j){var Q=j.stateNode,xe=j.memoizedProps;try{for(var Ue=j.type,bt=Q.attributes;bt.length;)Q.removeAttributeNode(bt[0]);Pd(Q,Ue,xe),Q[Fl]=j,Q[jv]=xe}catch(jt){wf(j,j.return,jt)}}var Z0=!1,Cd=!1,cS=!1,fS=typeof WeakSet=="function"?WeakSet:Set,Wh=null;function KL(j,Q){if(j=j.containerInfo,rg=Mb,j=bM(j),j1(j)){if("selectionStart"in j)var xe={start:j.selectionStart,end:j.selectionEnd};else e:{xe=(xe=j.ownerDocument)&&xe.defaultView||window;var Ue=xe.getSelection&&xe.getSelection();if(Ue&&Ue.rangeCount!==0){xe=Ue.anchorNode;var bt=Ue.anchorOffset,jt=Ue.focusNode;Ue=Ue.focusOffset;try{xe.nodeType,jt.nodeType}catch{xe=null;break e}var Xr=0,Nn=-1,Ya=-1,Wi=0,To=0,Po=j,Qi=null;t:for(;;){for(var so;Po!==xe||bt!==0&&Po.nodeType!==3||(Nn=Xr+bt),Po!==jt||Ue!==0&&Po.nodeType!==3||(Ya=Xr+Ue),Po.nodeType===3&&(Xr+=Po.nodeValue.length),(so=Po.firstChild)!==null;)Qi=Po,Po=so;for(;;){if(Po===j)break t;if(Qi===xe&&++Wi===bt&&(Nn=Xr),Qi===jt&&++To===Ue&&(Ya=Xr),(so=Po.nextSibling)!==null)break;Po=Qi,Qi=Po.parentNode}Po=so}xe=Nn===-1||Ya===-1?null:{start:Nn,end:Ya}}else xe=null}xe=xe||{start:0,end:0}}else xe=null;for(Yg={focusedElem:j,selectionRange:xe},Mb=!1,Wh=Q;Wh!==null;)if(Q=Wh,j=Q.child,(Q.subtreeFlags&1028)!==0&&j!==null)j.return=Q,Wh=j;else for(;Wh!==null;){switch(Q=Wh,jt=Q.alternate,j=Q.flags,Q.tag){case 0:if((j&4)!==0&&(j=Q.updateQueue,j=j!==null?j.events:null,j!==null))for(xe=0;xe<j.length;xe++)bt=j[xe],bt.ref.impl=bt.nextImpl;break;case 11:case 15:break;case 1:if((j&1024)!==0&&jt!==null){j=void 0,xe=Q,bt=jt.memoizedProps,jt=jt.memoizedState,Ue=xe.stateNode;try{var ol=jy(xe.type,bt);j=Ue.getSnapshotBeforeUpdate(ol,jt),Ue.__reactInternalSnapshotBeforeUpdate=j}catch(Jl){wf(xe,xe.return,Jl)}}break;case 3:if((j&1024)!==0){if(j=Q.stateNode.containerInfo,xe=j.nodeType,xe===9)pb(j);else if(xe===1)switch(j.nodeName){case"HEAD":case"HTML":case"BODY":pb(j);break;default:j.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((j&1024)!==0)throw Error(L(163))}if(j=Q.sibling,j!==null){j.return=Q.return,Wh=j;break}Wh=Q.return}}function yC(j,Q,xe){var Ue=xe.flags;switch(xe.tag){case 0:case 11:case 15:Jp(j,xe),Ue&4&&Qx(5,xe);break;case 1:if(Jp(j,xe),Ue&4)if(j=xe.stateNode,Q===null)try{j.componentDidMount()}catch(Xr){wf(xe,xe.return,Xr)}else{var bt=jy(xe.type,Q.memoizedProps);Q=Q.memoizedState;try{j.componentDidUpdate(bt,Q,j.__reactInternalSnapshotBeforeUpdate)}catch(Xr){wf(xe,xe.return,Xr)}}Ue&64&&lS(xe),Ue&512&&cm(xe,xe.return);break;case 3:if(Jp(j,xe),Ue&64&&(j=xe.updateQueue,j!==null)){if(Q=null,xe.child!==null)switch(xe.child.tag){case 27:case 5:Q=xe.child.stateNode;break;case 1:Q=xe.child.stateNode}try{LA(j,Q)}catch(Xr){wf(xe,xe.return,Xr)}}break;case 27:Q===null&&Ue&4&&gC(xe);case 26:case 5:Jp(j,xe),Q===null&&Ue&4&&mC(xe),Ue&512&&cm(xe,xe.return);break;case 12:Jp(j,xe);break;case 31:Jp(j,xe),Ue&4&&bC(j,xe);break;case 13:Jp(j,xe),Ue&4&&wC(j,xe),Ue&64&&(j=xe.memoizedState,j!==null&&(j=j.dehydrated,j!==null&&(xe=d_.bind(null,xe),lR(j,xe))));break;case 22:if(Ue=xe.memoizedState!==null||Z0,!Ue){Q=Q!==null&&Q.memoizedState!==null||Cd,bt=Z0;var jt=Cd;Z0=Ue,(Cd=Q)&&!jt?f0(j,xe,(xe.subtreeFlags&8772)!==0):Jp(j,xe),Z0=bt,Cd=jt}break;case 30:break;default:Jp(j,xe)}}function _C(j){var Q=j.alternate;Q!==null&&(j.alternate=null,_C(Q)),j.child=null,j.deletions=null,j.sibling=null,j.tag===5&&(Q=j.stateNode,Q!==null&&QT(Q)),j.stateNode=null,j.return=null,j.dependencies=null,j.memoizedProps=null,j.memoizedState=null,j.pendingProps=null,j.stateNode=null,j.updateQueue=null}var Th=null,gp=!1;function $0(j,Q,xe){for(xe=xe.child;xe!==null;)xC(j,Q,xe),xe=xe.sibling}function xC(j,Q,xe){if(wd&&typeof wd.onCommitFiberUnmount=="function")try{wd.onCommitFiberUnmount(D0,xe)}catch{}switch(xe.tag){case 26:Cd||Fm(xe,Q),$0(j,Q,xe),xe.memoizedState?xe.memoizedState.count--:xe.stateNode&&(xe=xe.stateNode,xe.parentNode.removeChild(xe));break;case 27:Cd||Fm(xe,Q);var Ue=Th,bt=gp;m0(xe.type)&&(Th=xe.stateNode,gp=!1),$0(j,Q,xe),Yy(xe.stateNode),Th=Ue,gp=bt;break;case 5:Cd||Fm(xe,Q);case 6:if(Ue=Th,bt=gp,Th=null,$0(j,Q,xe),Th=Ue,gp=bt,Th!==null)if(gp)try{(Th.nodeType===9?Th.body:Th.nodeName==="HTML"?Th.ownerDocument.body:Th).removeChild(xe.stateNode)}catch(jt){wf(xe,Q,jt)}else try{Th.removeChild(xe.stateNode)}catch(jt){wf(xe,Q,jt)}break;case 18:Th!==null&&(gp?(j=Th,IS(j.nodeType===9?j.body:j.nodeName==="HTML"?j.ownerDocument.body:j,xe.stateNode),r1(j)):IS(Th,xe.stateNode));break;case 4:Ue=Th,bt=gp,Th=xe.stateNode.containerInfo,gp=!0,$0(j,Q,xe),Th=Ue,gp=bt;break;case 0:case 11:case 14:case 15:um(2,xe,Q),Cd||um(4,xe,Q),$0(j,Q,xe);break;case 1:Cd||(Fm(xe,Q),Ue=xe.stateNode,typeof Ue.componentWillUnmount=="function"&&pC(xe,Q,Ue)),$0(j,Q,xe);break;case 21:$0(j,Q,xe);break;case 22:Cd=(Ue=Cd)||xe.memoizedState!==null,$0(j,Q,xe),Cd=Ue;break;default:$0(j,Q,xe)}}function bC(j,Q){if(Q.memoizedState===null&&(j=Q.alternate,j!==null&&(j=j.memoizedState,j!==null))){j=j.dehydrated;try{r1(j)}catch(xe){wf(Q,Q.return,xe)}}}function wC(j,Q){if(Q.memoizedState===null&&(j=Q.alternate,j!==null&&(j=j.memoizedState,j!==null&&(j=j.dehydrated,j!==null))))try{r1(j)}catch(xe){wf(Q,Q.return,xe)}}function JL(j){switch(j.tag){case 31:case 13:case 19:var Q=j.stateNode;return Q===null&&(Q=j.stateNode=new fS),Q;case 22:return j=j.stateNode,Q=j._retryCache,Q===null&&(Q=j._retryCache=new fS),Q;default:throw Error(L(435,j.tag))}}function K0(j,Q){var xe=JL(j);Q.forEach(function(Ue){if(!xe.has(Ue)){xe.add(Ue);var bt=v_.bind(null,j,Ue);Ue.then(bt,bt)}})}function Av(j,Q){var xe=Q.deletions;if(xe!==null)for(var Ue=0;Ue<xe.length;Ue++){var bt=xe[Ue],jt=j,Xr=Q,Nn=Xr;e:for(;Nn!==null;){switch(Nn.tag){case 27:if(m0(Nn.type)){Th=Nn.stateNode,gp=!1;break e}break;case 5:Th=Nn.stateNode,gp=!1;break e;case 3:case 4:Th=Nn.stateNode.containerInfo,gp=!0;break e}Nn=Nn.return}if(Th===null)throw Error(L(160));xC(jt,Xr,bt),Th=null,gp=!1,jt=bt.alternate,jt!==null&&(jt.return=null),bt.return=null}if(Q.subtreeFlags&13886)for(Q=Q.child;Q!==null;)hS(Q,j),Q=Q.sibling}var Bm=null;function hS(j,Q){var xe=j.alternate,Ue=j.flags;switch(j.tag){case 0:case 11:case 14:case 15:Av(Q,j),ap(j),Ue&4&&(um(3,j,j.return),Qx(3,j),um(5,j,j.return));break;case 1:Av(Q,j),ap(j),Ue&512&&(Cd||xe===null||Fm(xe,xe.return)),Ue&64&&Z0&&(j=j.updateQueue,j!==null&&(Ue=j.callbacks,Ue!==null&&(xe=j.shared.hiddenCallbacks,j.shared.hiddenCallbacks=xe===null?Ue:xe.concat(Ue))));break;case 26:var bt=Bm;if(Av(Q,j),ap(j),Ue&512&&(Cd||xe===null||Fm(xe,xe.return)),Ue&4){var jt=xe!==null?xe.memoizedState:null;if(Ue=j.memoizedState,xe===null)if(Ue===null)if(j.stateNode===null){e:{Ue=j.type,xe=j.memoizedProps,bt=bt.ownerDocument||bt;t:switch(Ue){case"title":jt=bt.getElementsByTagName("title")[0],(!jt||jt[Yo]||jt[Fl]||jt.namespaceURI==="http://www.w3.org/2000/svg"||jt.hasAttribute("itemprop"))&&(jt=bt.createElement(Ue),bt.head.insertBefore(jt,bt.querySelector("head > title"))),Pd(jt,Ue,xe),jt[Fl]=j,sv(jt),Ue=jt;break e;case"link":var Xr=QC("link","href",bt).get(Ue+(xe.href||""));if(Xr){for(var Nn=0;Nn<Xr.length;Nn++)if(jt=Xr[Nn],jt.getAttribute("href")===(xe.href==null||xe.href===""?null:xe.href)&&jt.getAttribute("rel")===(xe.rel==null?null:xe.rel)&&jt.getAttribute("title")===(xe.title==null?null:xe.title)&&jt.getAttribute("crossorigin")===(xe.crossOrigin==null?null:xe.crossOrigin)){Xr.splice(Nn,1);break t}}jt=bt.createElement(Ue),Pd(jt,Ue,xe),bt.head.appendChild(jt);break;case"meta":if(Xr=QC("meta","content",bt).get(Ue+(xe.content||""))){for(Nn=0;Nn<Xr.length;Nn++)if(jt=Xr[Nn],jt.getAttribute("content")===(xe.content==null?null:""+xe.content)&&jt.getAttribute("name")===(xe.name==null?null:xe.name)&&jt.getAttribute("property")===(xe.property==null?null:xe.property)&&jt.getAttribute("http-equiv")===(xe.httpEquiv==null?null:xe.httpEquiv)&&jt.getAttribute("charset")===(xe.charSet==null?null:xe.charSet)){Xr.splice(Nn,1);break t}}jt=bt.createElement(Ue),Pd(jt,Ue,xe),bt.head.appendChild(jt);break;default:throw Error(L(468,Ue))}jt[Fl]=j,sv(jt),Ue=jt}j.stateNode=Ue}else wb(bt,j.type,j.stateNode);else j.stateNode=BS(bt,Ue,j.memoizedProps);else jt!==Ue?(jt===null?xe.stateNode!==null&&(xe=xe.stateNode,xe.parentNode.removeChild(xe)):jt.count--,Ue===null?wb(bt,j.type,j.stateNode):BS(bt,Ue,j.memoizedProps)):Ue===null&&j.stateNode!==null&&uS(j,j.memoizedProps,xe.memoizedProps)}break;case 27:Av(Q,j),ap(j),Ue&512&&(Cd||xe===null||Fm(xe,xe.return)),xe!==null&&Ue&4&&uS(j,j.memoizedProps,xe.memoizedProps);break;case 5:if(Av(Q,j),ap(j),Ue&512&&(Cd||xe===null||Fm(xe,xe.return)),j.flags&32){bt=j.stateNode;try{bg(bt,"")}catch(ol){wf(j,j.return,ol)}}Ue&4&&j.stateNode!=null&&(bt=j.memoizedProps,uS(j,bt,xe!==null?xe.memoizedProps:bt)),Ue&1024&&(cS=!0);break;case 6:if(Av(Q,j),ap(j),Ue&4){if(j.stateNode===null)throw Error(L(162));Ue=j.memoizedProps,xe=j.stateNode;try{xe.nodeValue=Ue}catch(ol){wf(j,j.return,ol)}}break;case 3:if(bb=null,bt=Bm,Bm=y0(Q.containerInfo),Av(Q,j),Bm=bt,ap(j),Ue&4&&xe!==null&&xe.memoizedState.isDehydrated)try{r1(Q.containerInfo)}catch(ol){wf(j,j.return,ol)}cS&&(cS=!1,TC(j));break;case 4:Ue=Bm,Bm=y0(j.stateNode.containerInfo),Av(Q,j),ap(j),Bm=Ue;break;case 12:Av(Q,j),ap(j);break;case 31:Av(Q,j),ap(j),Ue&4&&(Ue=j.updateQueue,Ue!==null&&(j.updateQueue=null,K0(j,Ue)));break;case 13:Av(Q,j),ap(j),j.child.flags&8192&&j.memoizedState!==null!=(xe!==null&&xe.memoizedState!==null)&&(ab=ov()),Ue&4&&(Ue=j.updateQueue,Ue!==null&&(j.updateQueue=null,K0(j,Ue)));break;case 22:bt=j.memoizedState!==null;var Ya=xe!==null&&xe.memoizedState!==null,Wi=Z0,To=Cd;if(Z0=Wi||bt,Cd=To||Ya,Av(Q,j),Cd=To,Z0=Wi,ap(j),Ue&8192)e:for(Q=j.stateNode,Q._visibility=bt?Q._visibility&-2:Q._visibility|1,bt&&(xe===null||Ya||Z0||Cd||J0(j)),xe=null,Q=j;;){if(Q.tag===5||Q.tag===26){if(xe===null){Ya=xe=Q;try{if(jt=Ya.stateNode,bt)Xr=jt.style,typeof Xr.setProperty=="function"?Xr.setProperty("display","none","important"):Xr.display="none";else{Nn=Ya.stateNode;var Po=Ya.memoizedProps.style,Qi=Po!=null&&Po.hasOwnProperty("display")?Po.display:null;Nn.style.display=Qi==null||typeof Qi=="boolean"?"":(""+Qi).trim()}}catch(ol){wf(Ya,Ya.return,ol)}}}else if(Q.tag===6){if(xe===null){Ya=Q;try{Ya.stateNode.nodeValue=bt?"":Ya.memoizedProps}catch(ol){wf(Ya,Ya.return,ol)}}}else if(Q.tag===18){if(xe===null){Ya=Q;try{var so=Ya.stateNode;bt?DS(so,!0):DS(Ya.stateNode,!1)}catch(ol){wf(Ya,Ya.return,ol)}}}else if((Q.tag!==22&&Q.tag!==23||Q.memoizedState===null||Q===j)&&Q.child!==null){Q.child.return=Q,Q=Q.child;continue}if(Q===j)break e;for(;Q.sibling===null;){if(Q.return===null||Q.return===j)break e;xe===Q&&(xe=null),Q=Q.return}xe===Q&&(xe=null),Q.sibling.return=Q.return,Q=Q.sibling}Ue&4&&(Ue=j.updateQueue,Ue!==null&&(xe=Ue.retryQueue,xe!==null&&(Ue.retryQueue=null,K0(j,xe))));break;case 19:Av(Q,j),ap(j),Ue&4&&(Ue=j.updateQueue,Ue!==null&&(j.updateQueue=null,K0(j,Ue)));break;case 30:break;case 21:break;default:Av(Q,j),ap(j)}}function ap(j){var Q=j.flags;if(Q&2){try{for(var xe,Ue=j.return;Ue!==null;){if(Uy(Ue)){xe=Ue;break}Ue=Ue.return}if(xe==null)throw Error(L(160));switch(xe.tag){case 27:var bt=xe.stateNode,jt=eb(j);tb(j,jt,bt);break;case 5:var Xr=xe.stateNode;xe.flags&32&&(bg(Xr,""),xe.flags&=-33);var Nn=eb(j);tb(j,Nn,Xr);break;case 3:case 4:var Ya=xe.stateNode.containerInfo,Wi=eb(j);i_(j,Wi,Ya);break;default:throw Error(L(161))}}catch(To){wf(j,j.return,To)}j.flags&=-3}Q&4096&&(j.flags&=-4097)}function TC(j){if(j.subtreeFlags&1024)for(j=j.child;j!==null;){var Q=j;TC(Q),Q.tag===5&&Q.flags&1024&&Q.stateNode.reset(),j=j.sibling}}function Jp(j,Q){if(Q.subtreeFlags&8772)for(Q=Q.child;Q!==null;)yC(j,Q.alternate,Q),Q=Q.sibling}function J0(j){for(j=j.child;j!==null;){var Q=j;switch(Q.tag){case 0:case 11:case 14:case 15:um(4,Q,Q.return),J0(Q);break;case 1:Fm(Q,Q.return);var xe=Q.stateNode;typeof xe.componentWillUnmount=="function"&&pC(Q,Q.return,xe),J0(Q);break;case 27:Yy(Q.stateNode);case 26:case 5:Fm(Q,Q.return),J0(Q);break;case 22:Q.memoizedState===null&&J0(Q);break;case 30:J0(Q);break;default:J0(Q)}j=j.sibling}}function f0(j,Q,xe){for(xe=xe&&(Q.subtreeFlags&8772)!==0,Q=Q.child;Q!==null;){var Ue=Q.alternate,bt=j,jt=Q,Xr=jt.flags;switch(jt.tag){case 0:case 11:case 15:f0(bt,jt,xe),Qx(4,jt);break;case 1:if(f0(bt,jt,xe),Ue=jt,bt=Ue.stateNode,typeof bt.componentDidMount=="function")try{bt.componentDidMount()}catch(Wi){wf(Ue,Ue.return,Wi)}if(Ue=jt,bt=Ue.updateQueue,bt!==null){var Nn=Ue.stateNode;try{var Ya=bt.shared.hiddenCallbacks;if(Ya!==null)for(bt.shared.hiddenCallbacks=null,bt=0;bt<Ya.length;bt++)OM(Ya[bt],Nn)}catch(Wi){wf(Ue,Ue.return,Wi)}}xe&&Xr&64&&lS(jt),cm(jt,jt.return);break;case 27:gC(jt);case 26:case 5:f0(bt,jt,xe),xe&&Ue===null&&Xr&4&&mC(jt),cm(jt,jt.return);break;case 12:f0(bt,jt,xe);break;case 31:f0(bt,jt,xe),xe&&Xr&4&&bC(bt,jt);break;case 13:f0(bt,jt,xe),xe&&Xr&4&&wC(bt,jt);break;case 22:jt.memoizedState===null&&f0(bt,jt,xe),cm(jt,jt.return);break;case 30:break;default:f0(bt,jt,xe)}Q=Q.sibling}}function dS(j,Q){var xe=null;j!==null&&j.memoizedState!==null&&j.memoizedState.cachePool!==null&&(xe=j.memoizedState.cachePool.pool),j=null,Q.memoizedState!==null&&Q.memoizedState.cachePool!==null&&(j=Q.memoizedState.cachePool.pool),j!==xe&&(j!=null&&j.refCount++,xe!=null&&Rx(xe))}function vS(j,Q){j=null,Q.alternate!==null&&(j=Q.alternate.memoizedState.cache),Q=Q.memoizedState.cache,Q!==j&&(Q.refCount++,j!=null&&Rx(j))}function jm(j,Q,xe,Ue){if(Q.subtreeFlags&10256)for(Q=Q.child;Q!==null;)AC(j,Q,xe,Ue),Q=Q.sibling}function AC(j,Q,xe,Ue){var bt=Q.flags;switch(Q.tag){case 0:case 11:case 15:jm(j,Q,xe,Ue),bt&2048&&Qx(9,Q);break;case 1:jm(j,Q,xe,Ue);break;case 3:jm(j,Q,xe,Ue),bt&2048&&(j=null,Q.alternate!==null&&(j=Q.alternate.memoizedState.cache),Q=Q.memoizedState.cache,Q!==j&&(Q.refCount++,j!=null&&Rx(j)));break;case 12:if(bt&2048){jm(j,Q,xe,Ue),j=Q.stateNode;try{var jt=Q.memoizedProps,Xr=jt.id,Nn=jt.onPostCommit;typeof Nn=="function"&&Nn(Xr,Q.alternate===null?"mount":"update",j.passiveEffectDuration,-0)}catch(Ya){wf(Q,Q.return,Ya)}}else jm(j,Q,xe,Ue);break;case 31:jm(j,Q,xe,Ue);break;case 13:jm(j,Q,xe,Ue);break;case 23:break;case 22:jt=Q.stateNode,Xr=Q.alternate,Q.memoizedState!==null?jt._visibility&2?jm(j,Q,xe,Ue):rb(j,Q):jt._visibility&2?jm(j,Q,xe,Ue):(jt._visibility|=2,o_(j,Q,xe,Ue,(Q.subtreeFlags&10256)!==0||!1)),bt&2048&&dS(Xr,Q);break;case 24:jm(j,Q,xe,Ue),bt&2048&&vS(Q.alternate,Q);break;default:jm(j,Q,xe,Ue)}}function o_(j,Q,xe,Ue,bt){for(bt=bt&&((Q.subtreeFlags&10256)!==0||!1),Q=Q.child;Q!==null;){var jt=j,Xr=Q,Nn=xe,Ya=Ue,Wi=Xr.flags;switch(Xr.tag){case 0:case 11:case 15:o_(jt,Xr,Nn,Ya,bt),Qx(8,Xr);break;case 23:break;case 22:var To=Xr.stateNode;Xr.memoizedState!==null?To._visibility&2?o_(jt,Xr,Nn,Ya,bt):rb(jt,Xr):(To._visibility|=2,o_(jt,Xr,Nn,Ya,bt)),bt&&Wi&2048&&dS(Xr.alternate,Xr);break;case 24:o_(jt,Xr,Nn,Ya,bt),bt&&Wi&2048&&vS(Xr.alternate,Xr);break;default:o_(jt,Xr,Nn,Ya,bt)}Q=Q.sibling}}function rb(j,Q){if(Q.subtreeFlags&10256)for(Q=Q.child;Q!==null;){var xe=j,Ue=Q,bt=Ue.flags;switch(Ue.tag){case 22:rb(xe,Ue),bt&2048&&dS(Ue.alternate,Ue);break;case 24:rb(xe,Ue),bt&2048&&vS(Ue.alternate,Ue);break;default:rb(xe,Ue)}Q=Q.sibling}}var qy=8192;function s_(j,Q,xe){if(j.subtreeFlags&qy)for(j=j.child;j!==null;)pS(j,Q,xe),j=j.sibling}function pS(j,Q,xe){switch(j.tag){case 26:s_(j,Q,xe),j.flags&qy&&j.memoizedState!==null&&A_(xe,Bm,j.memoizedState,j.memoizedProps);break;case 5:s_(j,Q,xe);break;case 3:case 4:var Ue=Bm;Bm=y0(j.stateNode.containerInfo),s_(j,Q,xe),Bm=Ue;break;case 22:j.memoizedState===null&&(Ue=j.alternate,Ue!==null&&Ue.memoizedState!==null?(Ue=qy,qy=16777216,s_(j,Q,xe),qy=Ue):s_(j,Q,xe));break;default:s_(j,Q,xe)}}function SC(j){var Q=j.alternate;if(Q!==null&&(j=Q.child,j!==null)){Q.child=null;do Q=j.sibling,j.sibling=null,j=Q;while(j!==null)}}function jg(j){var Q=j.deletions;if((j.flags&16)!==0){if(Q!==null)for(var xe=0;xe<Q.length;xe++){var Ue=Q[xe];Wh=Ue,EC(Ue,j)}SC(j)}if(j.subtreeFlags&10256)for(j=j.child;j!==null;)l_(j),j=j.sibling}function l_(j){switch(j.tag){case 0:case 11:case 15:jg(j),j.flags&2048&&um(9,j,j.return);break;case 3:jg(j);break;case 12:jg(j);break;case 22:var Q=j.stateNode;j.memoizedState!==null&&Q._visibility&2&&(j.return===null||j.return.tag!==13)?(Q._visibility&=-3,D2(j)):jg(j);break;default:jg(j)}}function D2(j){var Q=j.deletions;if((j.flags&16)!==0){if(Q!==null)for(var xe=0;xe<Q.length;xe++){var Ue=Q[xe];Wh=Ue,EC(Ue,j)}SC(j)}for(j=j.child;j!==null;){switch(Q=j,Q.tag){case 0:case 11:case 15:um(8,Q,Q.return),D2(Q);break;case 22:xe=Q.stateNode,xe._visibility&2&&(xe._visibility&=-3,D2(Q));break;default:D2(Q)}j=j.sibling}}function EC(j,Q){for(;Wh!==null;){var xe=Wh;switch(xe.tag){case 0:case 11:case 15:um(8,xe,Q);break;case 23:case 22:if(xe.memoizedState!==null&&xe.memoizedState.cachePool!==null){var Ue=xe.memoizedState.cachePool.pool;Ue!=null&&Ue.refCount++}break;case 24:Rx(xe.memoizedState.cache)}if(Ue=xe.child,Ue!==null)Ue.return=xe,Wh=Ue;else e:for(xe=j;Wh!==null;){Ue=Wh;var bt=Ue.sibling,jt=Ue.return;if(_C(Ue),Ue===xe){Wh=null;break e}if(bt!==null){bt.return=jt,Wh=bt;break e}Wh=jt}}}var QL={getCacheForType:function(j){var Q=fv(Ed),xe=Q.data.get(j);return xe===void 0&&(xe=j(),Q.data.set(j,xe)),xe},cacheSignal:function(){return fv(Ed).controller.signal}},MC=typeof WeakMap=="function"?WeakMap:Map,jc=0,Zf=null,dc=null,vc=0,hf=0,yp=null,Ug=!1,Vy=!1,qg=!1,h0=0,Yh=0,Q0=0,fm=0,mS=0,_p=0,Vg=0,nb=null,xp=null,O2=!1,ab=0,CC=0,z2=1/0,N2=null,hm=null,kd=0,Hg=null,Hy=null,eg=0,F2=0,gS=null,kC=null,u_=0,ib=null;function Hv(){return(jc&2)!==0&&vc!==0?vc&-vc:ea.T!==null?m_():ef()}function PC(){if(_p===0)if((vc&536870912)===0||ec){var j=R1;R1<<=1,(R1&3932160)===0&&(R1=262144),_p=j}else _p=536870912;return j=id.current,j!==null&&(j.flags|=32),_p}function bp(j,Q,xe){(j===Zf&&(hf===2||hf===9)||j.cancelPendingCommit!==null)&&(f_(j,0),Gg(j,vc,_p,!1)),xv(j,xe),((jc&2)===0||j!==Zf)&&(j===Zf&&((jc&2)===0&&(fm|=xe),Yh===4&&Gg(j,vc,_p,!1)),v0(j))}function yS(j,Q,xe){if((jc&6)!==0)throw Error(L(327));var Ue=!xe&&(Q&127)===0&&(Q&j.expiredLanes)===0||lu(j,Q),bt=Ue?rR(j,Q):ob(j,Q,!0),jt=Ue;do{if(bt===0){Vy&&!Ue&&Gg(j,Q,0,!1);break}else{if(xe=j.current.alternate,jt&&!eR(xe)){bt=ob(j,Q,!1),jt=!1;continue}if(bt===2){if(jt=Q,j.errorRecoveryDisabledLanes&jt)var Xr=0;else Xr=j.pendingLanes&-536870913,Xr=Xr!==0?Xr:Xr&536870912?536870912:0;if(Xr!==0){Q=Xr;e:{var Nn=j;bt=nb;var Ya=Nn.current.memoizedState.isDehydrated;if(Ya&&(f_(Nn,Xr).flags|=256),Xr=ob(Nn,Xr,!1),Xr!==2){if(qg&&!Ya){Nn.errorRecoveryDisabledLanes|=jt,fm|=jt,bt=4;break e}jt=xp,xp=bt,jt!==null&&(xp===null?xp=jt:xp.push.apply(xp,jt))}bt=Xr}if(jt=!1,bt!==2)continue}}if(bt===1){f_(j,0),Gg(j,Q,0,!0);break}e:{switch(Ue=j,jt=bt,jt){case 0:case 1:throw Error(L(345));case 4:if((Q&4194048)!==Q)break;case 6:Gg(Ue,Q,_p,!Ug);break e;case 2:xp=null;break;case 3:case 5:break;default:throw Error(L(329))}if((Q&62914560)===Q&&(bt=ab+300-ov(),10<bt)){if(Gg(Ue,Q,_p,!Ug),I1(Ue,0,!0)!==0)break e;eg=Q,Ue.timeoutHandle=PS(_S.bind(null,Ue,xe,xp,N2,O2,Q,_p,fm,Vg,Ug,jt,"Throttled",-0,0),bt);break e}_S(Ue,xe,xp,N2,O2,Q,_p,fm,Vg,Ug,jt,null,-0,0)}}break}while(!0);v0(j)}function _S(j,Q,xe,Ue,bt,jt,Xr,Nn,Ya,Wi,To,Po,Qi,so){if(j.timeoutHandle=-1,Po=Q.subtreeFlags,Po&8192||(Po&16785408)===16785408){Po={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ac},pS(Q,jt,Po);var ol=(jt&62914560)===jt?ab-ov():(jt&4194048)===jt?CC-ov():0;if(ol=o3(Po,ol),ol!==null){eg=jt,j.cancelPendingCommit=ol(NC.bind(null,j,Q,jt,xe,Ue,bt,Xr,Nn,Ya,To,Po,null,Qi,so)),Gg(j,jt,Xr,!Wi);return}}NC(j,Q,jt,xe,Ue,bt,Xr,Nn,Ya)}function eR(j){for(var Q=j;;){var xe=Q.tag;if((xe===0||xe===11||xe===15)&&Q.flags&16384&&(xe=Q.updateQueue,xe!==null&&(xe=xe.stores,xe!==null)))for(var Ue=0;Ue<xe.length;Ue++){var bt=xe[Ue],jt=bt.getSnapshot;bt=bt.value;try{if(!Hp(jt(),bt))return!1}catch{return!1}}if(xe=Q.child,Q.subtreeFlags&16384&&xe!==null)xe.return=Q,Q=xe;else{if(Q===j)break;for(;Q.sibling===null;){if(Q.return===null||Q.return===j)return!0;Q=Q.return}Q.sibling.return=Q.return,Q=Q.sibling}}return!0}function Gg(j,Q,xe,Ue){Q&=~mS,Q&=~fm,j.suspendedLanes|=Q,j.pingedLanes&=~Q,Ue&&(j.warmLanes|=Q),Ue=j.expirationTimes;for(var bt=Q;0<bt;){var jt=31-Td(bt),Xr=1<<jt;Ue[jt]=-1,bt&=~Xr}xe!==0&&n0(j,xe,Q)}function B2(){return(jc&6)===0?(sb(0),!1):!0}function c_(){if(dc!==null){if(hf===0)var j=dc.return;else j=dc,H0=Ly=null,NA(j),$1=null,zx=0,j=dc;for(;j!==null;)vC(j.alternate,j),j=j.return;dc=null}}function f_(j,Q){var xe=j.timeoutHandle;xe!==-1&&(j.timeoutHandle=-1,$C(xe)),xe=j.cancelPendingCommit,xe!==null&&(j.cancelPendingCommit=null,xe()),eg=0,c_(),Zf=j,dc=xe=uv(j.current,null),vc=Q,hf=0,yp=null,Ug=!1,Vy=lu(j,Q),qg=!1,Vg=_p=mS=fm=Q0=Yh=0,xp=nb=null,O2=!1,(Q&8)!==0&&(Q|=Q&32);var Ue=j.entangledLanes;if(Ue!==0)for(j=j.entanglements,Ue&=Q;0<Ue;){var bt=31-Td(Ue),jt=1<<bt;Q|=j[bt],Ue&=~jt}return h0=Q,Px(),xe}function LC(j,Q){mu=null,ea.H=$x,Q===Rg||Q===Z1?(Q=Kw(),hf=3):Q===Zw?(Q=Kw(),hf=4):hf=Q===$A?8:Q!==null&&typeof Q=="object"&&typeof Q.then=="function"?6:1,yp=Q,dc===null&&(Yh=1,M2(j,Gh(Q,j.current)))}function RC(){var j=id.current;return j===null?!0:(vc&4194048)===vc?pp===null:(vc&62914560)===vc||(vc&536870912)!==0?j===pp:!1}function IC(){var j=ea.H;return ea.H=$x,j===null?$x:j}function Uc(){var j=ea.A;return ea.A=QL,j}function j2(){Yh=4,Ug||(vc&4194048)!==vc&&id.current!==null||(Vy=!0),(Q0&134217727)===0&&(fm&134217727)===0||Zf===null||Gg(Zf,vc,_p,!1)}function ob(j,Q,xe){var Ue=jc;jc|=2;var bt=IC(),jt=Uc();(Zf!==j||vc!==Q)&&(N2=null,f_(j,Q)),Q=!1;var Xr=Yh;e:do try{if(hf!==0&&dc!==null){var Nn=dc,Ya=yp;switch(hf){case 8:c_(),Xr=6;break e;case 3:case 2:case 9:case 6:id.current===null&&(Q=!0);var Wi=hf;if(hf=0,yp=null,h_(j,Nn,Ya,Wi),xe&&Vy){Xr=0;break e}break;default:Wi=hf,hf=0,yp=null,h_(j,Nn,Ya,Wi)}}tR(),Xr=Yh;break}catch(To){LC(j,To)}while(!0);return Q&&j.shellSuspendCounter++,H0=Ly=null,jc=Ue,ea.H=bt,ea.A=jt,dc===null&&(Zf=null,vc=0,Px()),Xr}function tR(){for(;dc!==null;)DC(dc)}function rR(j,Q){var xe=jc;jc|=2;var Ue=IC(),bt=Uc();Zf!==j||vc!==Q?(N2=null,z2=ov()+500,f_(j,Q)):Vy=lu(j,Q);e:do try{if(hf!==0&&dc!==null){Q=dc;var jt=yp;t:switch(hf){case 1:hf=0,yp=null,h_(j,Q,jt,1);break;case 2:case 9:if(RM(jt)){hf=0,yp=null,OC(Q);break}Q=function(){hf!==2&&hf!==9||Zf!==j||(hf=7),v0(j)},jt.then(Q,Q);break e;case 3:hf=7;break e;case 4:hf=5;break e;case 7:RM(jt)?(hf=0,yp=null,OC(Q)):(hf=0,yp=null,h_(j,Q,jt,7));break;case 5:var Xr=null;switch(dc.tag){case 26:Xr=dc.memoizedState;case 5:case 27:var Nn=dc;if(Xr?Gd(Xr):Nn.stateNode.complete){hf=0,yp=null;var Ya=Nn.sibling;if(Ya!==null)dc=Ya;else{var Wi=Nn.return;Wi!==null?(dc=Wi,U2(Wi)):dc=null}break t}}hf=0,yp=null,h_(j,Q,jt,5);break;case 6:hf=0,yp=null,h_(j,Q,jt,6);break;case 8:c_(),Yh=6;break e;default:throw Error(L(462))}}nR();break}catch(To){LC(j,To)}while(!0);return H0=Ly=null,ea.H=Ue,ea.A=bt,jc=xe,dc!==null?0:(Zf=null,vc=0,Px(),Yh)}function nR(){for(;dc!==null&&!jp();)DC(dc)}function DC(j){var Q=a_(j.alternate,j,h0);j.memoizedProps=j.pendingProps,Q===null?U2(j):dc=Q}function OC(j){var Q=j,xe=Q.alternate;switch(Q.tag){case 15:case 0:Q=JA(xe,Q,Q.pendingProps,Q.type,void 0,vc);break;case 11:Q=JA(xe,Q,Q.pendingProps,Q.type.render,Q.ref,vc);break;case 5:NA(Q);default:vC(xe,Q),Q=dc=SM(Q,h0),Q=a_(xe,Q,h0)}j.memoizedProps=j.pendingProps,Q===null?U2(j):dc=Q}function h_(j,Q,xe,Ue){H0=Ly=null,NA(Q),$1=null,zx=0;var bt=Q.return;try{if(WL(j,bt,Q,xe,vc)){Yh=1,M2(j,Gh(xe,j.current)),dc=null;return}}catch(jt){if(bt!==null)throw dc=bt,jt;Yh=1,M2(j,Gh(xe,j.current)),dc=null;return}Q.flags&32768?(ec||Ue===1?j=!0:Vy||(vc&536870912)!==0?j=!1:(Ug=j=!0,(Ue===2||Ue===9||Ue===3||Ue===6)&&(Ue=id.current,Ue!==null&&Ue.tag===13&&(Ue.flags|=16384))),zC(Q,j)):U2(Q)}function U2(j){var Q=j;do{if((Q.flags&32768)!==0){zC(Q,Ug);return}j=Q.return;var xe=ZL(Q.alternate,Q,h0);if(xe!==null){dc=xe;return}if(Q=Q.sibling,Q!==null){dc=Q;return}dc=Q=j}while(Q!==null);Yh===0&&(Yh=5)}function zC(j,Q){do{var xe=$L(j.alternate,j);if(xe!==null){xe.flags&=32767,dc=xe;return}if(xe=j.return,xe!==null&&(xe.flags|=32768,xe.subtreeFlags=0,xe.deletions=null),!Q&&(j=j.sibling,j!==null)){dc=j;return}dc=j=xe}while(j!==null);Yh=6,dc=null}function NC(j,Q,xe,Ue,bt,jt,Xr,Nn,Ya){j.cancelPendingCommit=null;do q2();while(kd!==0);if((jc&6)!==0)throw Error(L(327));if(Q!==null){if(Q===j.current)throw Error(L(177));if(jt=Q.lanes|Q.childLanes,jt|=pA,r0(j,xe,jt,Xr,Nn,Ya),j===Zf&&(dc=Zf=null,vc=0),Hy=Q,Hg=j,eg=xe,F2=jt,gS=bt,kC=Ue,(Q.subtreeFlags&10256)!==0||(Q.flags&10256)!==0?(j.callbackNode=null,j.callbackPriority=0,bS(L1,function(){return qC(),null})):(j.callbackNode=null,j.callbackPriority=0),Ue=(Q.flags&13878)!==0,(Q.subtreeFlags&13878)!==0||Ue){Ue=ea.T,ea.T=null,bt=qa.p,qa.p=2,Xr=jc,jc|=4;try{KL(j,Q,xe)}finally{jc=Xr,qa.p=bt,ea.T=Ue}}kd=1,FC(),BC(),jC()}}function FC(){if(kd===1){kd=0;var j=Hg,Q=Hy,xe=(Q.flags&13878)!==0;if((Q.subtreeFlags&13878)!==0||xe){xe=ea.T,ea.T=null;var Ue=qa.p;qa.p=2;var bt=jc;jc|=4;try{hS(Q,j);var jt=Yg,Xr=bM(j.containerInfo),Nn=jt.focusedElem,Ya=jt.selectionRange;if(Xr!==Nn&&Nn&&Nn.ownerDocument&&xM(Nn.ownerDocument.documentElement,Nn)){if(Ya!==null&&j1(Nn)){var Wi=Ya.start,To=Ya.end;if(To===void 0&&(To=Wi),"selectionStart"in Nn)Nn.selectionStart=Wi,Nn.selectionEnd=Math.min(To,Nn.value.length);else{var Po=Nn.ownerDocument||document,Qi=Po&&Po.defaultView||window;if(Qi.getSelection){var so=Qi.getSelection(),ol=Nn.textContent.length,Jl=Math.min(Ya.start,ol),Of=Ya.end===void 0?Jl:Math.min(Ya.end,ol);!so.extend&&Jl>Of&&(Xr=Of,Of=Jl,Jl=Xr);var Li=_M(Nn,Jl),vi=_M(Nn,Of);if(Li&&vi&&(so.rangeCount!==1||so.anchorNode!==Li.node||so.anchorOffset!==Li.offset||so.focusNode!==vi.node||so.focusOffset!==vi.offset)){var Hi=Po.createRange();Hi.setStart(Li.node,Li.offset),so.removeAllRanges(),Jl>Of?(so.addRange(Hi),so.extend(vi.node,vi.offset)):(Hi.setEnd(vi.node,vi.offset),so.addRange(Hi))}}}}for(Po=[],so=Nn;so=so.parentNode;)so.nodeType===1&&Po.push({element:so,left:so.scrollLeft,top:so.scrollTop});for(typeof Nn.focus=="function"&&Nn.focus(),Nn=0;Nn<Po.length;Nn++){var Ao=Po[Nn];Ao.element.scrollLeft=Ao.left,Ao.element.scrollTop=Ao.top}}Mb=!!rg,Yg=rg=null}finally{jc=bt,qa.p=Ue,ea.T=xe}}j.current=Q,kd=2}}function BC(){if(kd===2){kd=0;var j=Hg,Q=Hy,xe=(Q.flags&8772)!==0;if((Q.subtreeFlags&8772)!==0||xe){xe=ea.T,ea.T=null;var Ue=qa.p;qa.p=2;var bt=jc;jc|=4;try{yC(j,Q.alternate,Q)}finally{jc=bt,qa.p=Ue,ea.T=xe}}kd=3}}function jC(){if(kd===4||kd===3){kd=0,Up();var j=Hg,Q=Hy,xe=eg,Ue=kC;(Q.subtreeFlags&10256)!==0||(Q.flags&10256)!==0?kd=5:(kd=0,Hy=Hg=null,UC(j,j.pendingLanes));var bt=j.pendingLanes;if(bt===0&&(hm=null),O1(xe),Q=Q.stateNode,wd&&typeof wd.onCommitFiberRoot=="function")try{wd.onCommitFiberRoot(D0,Q,void 0,(Q.current.flags&128)===128)}catch{}if(Ue!==null){Q=ea.T,bt=qa.p,qa.p=2,ea.T=null;try{for(var jt=j.onRecoverableError,Xr=0;Xr<Ue.length;Xr++){var Nn=Ue[Xr];jt(Nn.value,{componentStack:Nn.stack})}}finally{ea.T=Q,qa.p=bt}}(eg&3)!==0&&q2(),v0(j),bt=j.pendingLanes,(xe&261930)!==0&&(bt&42)!==0?j===ib?u_++:(u_=0,ib=j):u_=0,sb(0)}}function UC(j,Q){(j.pooledCacheLanes&=Q)===0&&(Q=j.pooledCache,Q!=null&&(j.pooledCache=null,Rx(Q)))}function q2(){return FC(),BC(),jC(),qC()}function qC(){if(kd!==5)return!1;var j=Hg,Q=F2;F2=0;var xe=O1(eg),Ue=ea.T,bt=qa.p;try{qa.p=32>xe?32:xe,ea.T=null,xe=gS,gS=null;var jt=Hg,Xr=eg;if(kd=0,Hy=Hg=null,eg=0,(jc&6)!==0)throw Error(L(331));var Nn=jc;if(jc|=4,l_(jt.current),AC(jt,jt.current,Xr,xe),jc=Nn,sb(0,!1),wd&&typeof wd.onPostCommitFiberRoot=="function")try{wd.onPostCommitFiberRoot(D0,jt)}catch{}return!0}finally{qa.p=bt,ea.T=Ue,UC(j,Q)}}function VC(j,Q,xe){Q=Gh(xe,Q),Q=W0(j.stateNode,Q,2),j=Og(j,Q,2),j!==null&&(xv(j,2),v0(j))}function wf(j,Q,xe){if(j.tag===3)VC(j,j,xe);else for(;Q!==null;){if(Q.tag===3){VC(Q,j,xe);break}else if(Q.tag===1){var Ue=Q.stateNode;if(typeof Q.type.getDerivedStateFromError=="function"||typeof Ue.componentDidCatch=="function"&&(hm===null||!hm.has(Ue))){j=Gh(xe,j),xe=rC(2),Ue=Og(Q,xe,2),Ue!==null&&(nC(xe,Ue,Q,j),xv(Ue,2),v0(Ue));break}}Q=Q.return}}function xS(j,Q,xe){var Ue=j.pingCache;if(Ue===null){Ue=j.pingCache=new MC;var bt=new Set;Ue.set(Q,bt)}else bt=Ue.get(Q),bt===void 0&&(bt=new Set,Ue.set(Q,bt));bt.has(xe)||(qg=!0,bt.add(xe),j=aR.bind(null,j,Q,xe),Q.then(j,j))}function aR(j,Q,xe){var Ue=j.pingCache;Ue!==null&&Ue.delete(Q),j.pingedLanes|=j.suspendedLanes&xe,j.warmLanes&=~xe,Zf===j&&(vc&xe)===xe&&(Yh===4||Yh===3&&(vc&62914560)===vc&&300>ov()-ab?(jc&2)===0&&f_(j,0):mS|=xe,Vg===vc&&(Vg=0)),v0(j)}function HC(j,Q){Q===0&&(Q=Xf()),j=Lm(j,Q),j!==null&&(xv(j,Q),v0(j))}function d_(j){var Q=j.memoizedState,xe=0;Q!==null&&(xe=Q.retryLane),HC(j,xe)}function v_(j,Q){var xe=0;switch(j.tag){case 31:case 13:var Ue=j.stateNode,bt=j.memoizedState;bt!==null&&(xe=bt.retryLane);break;case 19:Ue=j.stateNode;break;case 22:Ue=j.stateNode._retryCache;break;default:throw Error(L(314))}Ue!==null&&Ue.delete(Q),HC(j,xe)}function bS(j,Q){return Nd(j,Q)}var V2=null,d0=null,wS=!1,p_=!1,TS=!1,Xg=0;function v0(j){j!==d0&&j.next===null&&(d0===null?V2=d0=j:d0=d0.next=j),p_=!0,wS||(wS=!0,oR())}function sb(j,Q){if(!TS&&p_){TS=!0;do for(var xe=!1,Ue=V2;Ue!==null;){if(j!==0){var bt=Ue.pendingLanes;if(bt===0)var jt=0;else{var Xr=Ue.suspendedLanes,Nn=Ue.pingedLanes;jt=(1<<31-Td(42|j)+1)-1,jt&=bt&~(Xr&~Nn),jt=jt&201326741?jt&201326741|1:jt?jt|2:0}jt!==0&&(xe=!0,GC(Ue,jt))}else jt=vc,jt=I1(Ue,Ue===Zf?jt:0,Ue.cancelPendingCommit!==null||Ue.timeoutHandle!==-1),(jt&3)===0||lu(Ue,jt)||(xe=!0,GC(Ue,jt));Ue=Ue.next}while(xe);TS=!1}}function iR(){AS()}function AS(){p_=wS=!1;var j=0;Xg!==0&&ZC()&&(j=Xg);for(var Q=ov(),xe=null,Ue=V2;Ue!==null;){var bt=Ue.next,jt=lb(Ue,Q);jt===0?(Ue.next=null,xe===null?V2=bt:xe.next=bt,bt===null&&(d0=xe)):(xe=Ue,(j!==0||(jt&3)!==0)&&(p_=!0)),Ue=bt}kd!==0&&kd!==5||sb(j),Xg!==0&&(Xg=0)}function lb(j,Q){for(var xe=j.suspendedLanes,Ue=j.pingedLanes,bt=j.expirationTimes,jt=j.pendingLanes&-62914561;0<jt;){var Xr=31-Td(jt),Nn=1<<Xr,Ya=bt[Xr];Ya===-1?((Nn&xe)===0||(Nn&Ue)!==0)&&(bt[Xr]=cf(Nn,Q)):Ya<=Q&&(j.expiredLanes|=Nn),jt&=~Nn}if(Q=Zf,xe=vc,xe=I1(j,j===Q?xe:0,j.cancelPendingCommit!==null||j.timeoutHandle!==-1),Ue=j.callbackNode,xe===0||j===Q&&(hf===2||hf===9)||j.cancelPendingCommit!==null)return Ue!==null&&Ue!==null&&ad(Ue),j.callbackNode=null,j.callbackPriority=0;if((xe&3)===0||lu(j,xe)){if(Q=xe&-xe,Q===j.callbackPriority)return Q;switch(Ue!==null&&ad(Ue),O1(xe)){case 2:case 8:xe=I0;break;case 32:xe=L1;break;case 268435456:xe=xy;break;default:xe=L1}return Ue=SS.bind(null,j),xe=Nd(xe,Ue),j.callbackPriority=Q,j.callbackNode=xe,Q}return Ue!==null&&Ue!==null&&ad(Ue),j.callbackPriority=2,j.callbackNode=null,2}function SS(j,Q){if(kd!==0&&kd!==5)return j.callbackNode=null,j.callbackPriority=0,null;var xe=j.callbackNode;if(q2()&&j.callbackNode!==xe)return null;var Ue=vc;return Ue=I1(j,j===Zf?Ue:0,j.cancelPendingCommit!==null||j.timeoutHandle!==-1),Ue===0?null:(yS(j,Ue,Q),lb(j,ov()),j.callbackNode!=null&&j.callbackNode===xe?SS.bind(null,j):null)}function GC(j,Q){if(q2())return null;yS(j,Q,!0)}function oR(){LS(function(){(jc&6)!==0?Nd(Fv,iR):AS()})}function m_(){if(Xg===0){var j=Dy;j===0&&(j=by,by<<=1,(by&261888)===0&&(by=256)),Xg=j}return Xg}function ub(j){return j==null||typeof j=="symbol"||typeof j=="boolean"?null:typeof j=="function"?j:Bd(""+j)}function Gy(j,Q){var xe=Q.ownerDocument.createElement("input");return xe.name=Q.name,xe.value=Q.value,j.id&&xe.setAttribute("form",j.id),Q.parentNode.insertBefore(xe,Q),j=new FormData(j),xe.parentNode.removeChild(xe),j}function cb(j,Q,xe,Ue,bt){if(Q==="submit"&&xe&&xe.stateNode===bt){var jt=ub((bt[jv]||null).action),Xr=Ue.submitter;Xr&&(Q=(Q=Xr[jv]||null)?ub(Q.formAction):Xr.getAttribute("formAction"),Q!==null&&(jt=Q,Xr=null));var Nn=new bv("action","action",null,Ue,bt);j.push({event:Nn,listeners:[{instance:null,listener:function(){if(Ue.defaultPrevented){if(Xg!==0){var Ya=Xr?Gy(bt,Xr):new FormData(bt);T2(xe,{pending:!0,data:Ya,method:bt.method,action:jt},null,Ya)}}else typeof jt=="function"&&(Nn.preventDefault(),Ya=Xr?Gy(bt,Xr):new FormData(bt),T2(xe,{pending:!0,data:Ya,method:bt.method,action:jt},jt,Ya))},currentTarget:bt}]})}}for(var fb=0;fb<o0.length;fb++){var p0=o0[fb],XC=p0.toLowerCase(),sR=p0[0].toUpperCase()+p0.slice(1);Gp(XC,"on"+sR)}Gp(kx,"onAnimationEnd"),Gp(dh,"onAnimationIteration"),Gp(vA,"onAnimationStart"),Gp("dblclick","onDoubleClick"),Gp("focusin","onFocus"),Gp("focusout","onBlur"),Gp(TM,"onTransitionRun"),Gp(FL,"onTransitionStart"),Gp(BL,"onTransitionCancel"),Gp(AM,"onTransitionEnd"),F1("onMouseEnter",["mouseout","mouseover"]),F1("onMouseLeave",["mouseout","mouseover"]),F1("onPointerEnter",["pointerout","pointerover"]),F1("onPointerLeave",["pointerout","pointerover"]),N0("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),N0("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),N0("onBeforeInput",["compositionend","keypress","textInput","paste"]),N0("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),N0("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),N0("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var hb="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(" "),WC=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(hb));function g_(j,Q){Q=(Q&4)!==0;for(var xe=0;xe<j.length;xe++){var Ue=j[xe],bt=Ue.event;Ue=Ue.listeners;e:{var jt=void 0;if(Q)for(var Xr=Ue.length-1;0<=Xr;Xr--){var Nn=Ue[Xr],Ya=Nn.instance,Wi=Nn.currentTarget;if(Nn=Nn.listener,Ya!==jt&&bt.isPropagationStopped())break e;jt=Nn,bt.currentTarget=Wi;try{jt(bt)}catch(To){q1(To)}bt.currentTarget=null,jt=Ya}else for(Xr=0;Xr<Ue.length;Xr++){if(Nn=Ue[Xr],Ya=Nn.instance,Wi=Nn.currentTarget,Nn=Nn.listener,Ya!==jt&&bt.isPropagationStopped())break e;jt=Nn,bt.currentTarget=Wi;try{jt(bt)}catch(To){q1(To)}bt.currentTarget=null,jt=Ya}}}}function tc(j,Q){var xe=Q[KT];xe===void 0&&(xe=Q[KT]=new Set);var Ue=j+"__bubble";xe.has(Ue)||(Hd(Q,j,2,!1),xe.add(Ue))}function y_(j,Q,xe){var Ue=0;Q&&(Ue|=4),Hd(xe,j,Ue,Q)}var __="_reactListening"+Math.random().toString(36).slice(2);function x_(j){if(!j[__]){j[__]=!0,JE.forEach(function(xe){xe!=="selectionchange"&&(WC.has(xe)||y_(xe,!1,j),y_(xe,!0,j))});var Q=j.nodeType===9?j:j.ownerDocument;Q===null||Q[__]||(Q[__]=!0,y_("selectionchange",!1,Q))}}function Hd(j,Q,xe,Ue){switch(XS(Q)){case 2:var bt=tk;break;case 8:bt=fR;break;default:bt=GS}xe=bt.bind(null,Q,xe,j),bt=void 0,!jd||Q!=="touchstart"&&Q!=="touchmove"&&Q!=="wheel"||(bt=!0),Ue?bt!==void 0?j.addEventListener(Q,xe,{capture:!0,passive:bt}):j.addEventListener(Q,xe,!0):bt!==void 0?j.addEventListener(Q,xe,{passive:bt}):j.addEventListener(Q,xe,!1)}function H2(j,Q,xe,Ue,bt){var jt=Ue;if((Q&1)===0&&(Q&2)===0&&Ue!==null)e:for(;;){if(Ue===null)return;var Xr=Ue.tag;if(Xr===3||Xr===4){var Nn=Ue.stateNode.containerInfo;if(Nn===bt)break;if(Xr===4)for(Xr=Ue.return;Xr!==null;){var Ya=Xr.tag;if((Ya===3||Ya===4)&&Xr.stateNode.containerInfo===bt)return;Xr=Xr.return}for(;Nn!==null;){if(Xr=z0(Nn),Xr===null)return;if(Ya=Xr.tag,Ya===5||Ya===6||Ya===26||Ya===27){Ue=jt=Xr;continue e}Nn=Nn.parentNode}}Ue=Ue.return}Ty(function(){var Wi=jt,To=Tx(xe),Po=[];e:{var Qi=Vw.get(j);if(Qi!==void 0){var so=bv,ol=j;switch(j){case"keypress":if(Dw(xe)===0)break e;case"keydown":case"keyup":so=PL;break;case"focusin":ol="focus",so=rA;break;case"focusout":ol="blur",so=rA;break;case"beforeblur":case"afterblur":so=rA;break;case"click":if(xe.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":so=Cm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":so=aM;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":so=cM;break;case kx:case dh:case vA:so=EL;break;case AM:so=hM;break;case"scroll":case"scrollend":so=SL;break;case"wheel":so=LL;break;case"copy":case"cut":case"paste":so=CL;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":so=uM;break;case"toggle":case"beforetoggle":so=dM}var Jl=(Q&4)!==0,Of=!Jl&&(j==="scroll"||j==="scrollend"),Li=Jl?Qi!==null?Qi+"Capture":null:Qi;Jl=[];for(var vi=Wi,Hi;vi!==null;){var Ao=vi;if(Hi=Ao.stateNode,Ao=Ao.tag,Ao!==5&&Ao!==26&&Ao!==27||Hi===null||Li===null||(Ao=j0(vi,Li),Ao!=null&&Jl.push(db(vi,Ao,Hi))),Of)break;vi=vi.return}0<Jl.length&&(Qi=new so(Qi,ol,null,xe,To),Po.push({event:Qi,listeners:Jl}))}}if((Q&7)===0){e:{if(Qi=j==="mouseover"||j==="pointerover",so=j==="mouseout"||j==="pointerout",Qi&&xe!==Sd&&(ol=xe.relatedTarget||xe.fromElement)&&(z0(ol)||ol[z1]))break e;if((so||Qi)&&(Qi=To.window===To?To:(Qi=To.ownerDocument)?Qi.defaultView||Qi.parentWindow:window,so?(ol=xe.relatedTarget||xe.toElement,so=Wi,ol=ol?z0(ol):null,ol!==null&&(Of=ve(ol),Jl=ol.tag,ol!==Of||Jl!==5&&Jl!==27&&Jl!==6)&&(ol=null)):(so=null,ol=Wi),so!==ol)){if(Jl=Cm,Ao="onMouseLeave",Li="onMouseEnter",vi="mouse",(j==="pointerout"||j==="pointerover")&&(Jl=uM,Ao="onPointerLeave",Li="onPointerEnter",vi="pointer"),Of=so==null?Qi:Sm(so),Hi=ol==null?Qi:Sm(ol),Qi=new Jl(Ao,vi+"leave",so,xe,To),Qi.target=Of,Qi.relatedTarget=Hi,Ao=null,z0(To)===Wi&&(Jl=new Jl(Li,vi+"enter",ol,xe,To),Jl.target=Hi,Jl.relatedTarget=Of,Ao=Jl),Of=Ao,so&&ol)t:{for(Jl=G2,Li=so,vi=ol,Hi=0,Ao=Li;Ao;Ao=Jl(Ao))Hi++;Ao=0;for(var Dl=vi;Dl;Dl=Jl(Dl))Ao++;for(;0<Hi-Ao;)Li=Jl(Li),Hi--;for(;0<Ao-Hi;)vi=Jl(vi),Ao--;for(;Hi--;){if(Li===vi||vi!==null&&Li===vi.alternate){Jl=Li;break t}Li=Jl(Li),vi=Jl(vi)}Jl=null}else Jl=null;so!==null&&Wg(Po,Qi,so,Jl,!1),ol!==null&&Of!==null&&Wg(Po,Of,ol,Jl,!0)}}e:{if(Qi=Wi?Sm(Wi):window,so=Qi.nodeName&&Qi.nodeName.toLowerCase(),so==="select"||so==="input"&&Qi.type==="file")var Pc=uA;else if(Sg(Qi))if(mM)Pc=OL;else{Pc=gM;var Ks=jw}else so=Qi.nodeName,!so||so.toLowerCase()!=="input"||Qi.type!=="checkbox"&&Qi.type!=="radio"?Wi&&hp(Wi.elementType)&&(Pc=uA):Pc=DL;if(Pc&&(Pc=Pc(j,Wi))){lA(Po,Pc,xe,To);break e}Ks&&Ks(j,Qi,Wi),j==="focusout"&&Wi&&Qi.type==="number"&&Wi.memoizedProps.value!=null&&Cu(Qi,"number",Qi.value)}switch(Ks=Wi?Sm(Wi):window,j){case"focusin":(Sg(Ks)||Ks.contentEditable==="true")&&(U1=Ks,Uw=Wi,Eg=null);break;case"focusout":Eg=Uw=U1=null;break;case"mousedown":Mg=!0;break;case"contextmenu":case"mouseup":case"dragend":Mg=!1,i0(Po,xe,To);break;case"selectionchange":if(NL)break;case"keydown":case"keyup":i0(Po,xe,To)}var ku;if(oA)e:{switch(j){case"compositionstart":var nc="onCompositionStart";break e;case"compositionend":nc="onCompositionEnd";break e;case"compositionupdate":nc="onCompositionUpdate";break e}nc=void 0}else om?Nw(j,xe)&&(nc="onCompositionEnd"):j==="keydown"&&xe.keyCode===229&&(nc="onCompositionStart");nc&&(Pm&&xe.locale!=="ko"&&(om||nc!=="onCompositionStart"?nc==="onCompositionEnd"&&om&&(ku=nM()):(dp=To,Iw="value"in dp?dp.value:dp.textContent,om=!0)),Ks=vb(Wi,nc),0<Ks.length&&(nc=new km(nc,j,null,xe,To),Po.push({event:nc,listeners:Ks}),ku?nc.data=ku:(ku=Fw(xe),ku!==null&&(nc.data=ku)))),(ku=oh?sA(j,xe):vM(j,xe))&&(nc=vb(Wi,"onBeforeInput"),0<nc.length&&(Ks=new km("onBeforeInput","beforeinput",null,xe,To),Po.push({event:Ks,listeners:nc}),Ks.data=ku)),cb(Po,j,Wi,xe,To)}g_(Po,Q)})}function db(j,Q,xe){return{instance:j,listener:Q,currentTarget:xe}}function vb(j,Q){for(var xe=Q+"Capture",Ue=[];j!==null;){var bt=j,jt=bt.stateNode;if(bt=bt.tag,bt!==5&&bt!==26&&bt!==27||jt===null||(bt=j0(j,xe),bt!=null&&Ue.unshift(db(j,bt,jt)),bt=j0(j,Q),bt!=null&&Ue.push(db(j,bt,jt))),j.tag===3)return Ue;j=j.return}return[]}function G2(j){if(j===null)return null;do j=j.return;while(j&&j.tag!==5&&j.tag!==27);return j||null}function Wg(j,Q,xe,Ue,bt){for(var jt=Q._reactName,Xr=[];xe!==null&&xe!==Ue;){var Nn=xe,Ya=Nn.alternate,Wi=Nn.stateNode;if(Nn=Nn.tag,Ya!==null&&Ya===Ue)break;Nn!==5&&Nn!==26&&Nn!==27||Wi===null||(Ya=Wi,bt?(Wi=j0(xe,jt),Wi!=null&&Xr.unshift(db(xe,Wi,Ya))):bt||(Wi=j0(xe,jt),Wi!=null&&Xr.push(db(xe,Wi,Ya)))),xe=xe.return}Xr.length!==0&&j.push({event:Q,listeners:Xr})}var Xy=/\r\n?/g,YC=/\u0000|\uFFFD/g;function ES(j){return(typeof j=="string"?j:""+j).replace(Xy,`
`).replace(YC,"")}function X2(j,Q){return Q=ES(Q),ES(j)===Q}function rc(j,Q,xe,Ue,bt,jt){switch(xe){case"children":typeof Ue=="string"?Q==="body"||Q==="textarea"&&Ue===""||bg(j,Ue):(typeof Ue=="number"||typeof Ue=="bigint")&&Q!=="body"&&bg(j,""+Ue);break;case"className":kw(j,"class",Ue);break;case"tabIndex":kw(j,"tabindex",Ue);break;case"dir":case"role":case"viewBox":case"width":case"height":kw(j,xe,Ue);break;case"style":ff(j,Ue,jt);break;case"data":if(Q!=="object"){kw(j,"data",Ue);break}case"src":case"href":if(Ue===""&&(Q!=="a"||xe!=="href")){j.removeAttribute(xe);break}if(Ue==null||typeof Ue=="function"||typeof Ue=="symbol"||typeof Ue=="boolean"){j.removeAttribute(xe);break}Ue=Bd(""+Ue),j.setAttribute(xe,Ue);break;case"action":case"formAction":if(typeof Ue=="function"){j.setAttribute(xe,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof jt=="function"&&(xe==="formAction"?(Q!=="input"&&rc(j,Q,"name",bt.name,bt,null),rc(j,Q,"formEncType",bt.formEncType,bt,null),rc(j,Q,"formMethod",bt.formMethod,bt,null),rc(j,Q,"formTarget",bt.formTarget,bt,null)):(rc(j,Q,"encType",bt.encType,bt,null),rc(j,Q,"method",bt.method,bt,null),rc(j,Q,"target",bt.target,bt,null)));if(Ue==null||typeof Ue=="symbol"||typeof Ue=="boolean"){j.removeAttribute(xe);break}Ue=Bd(""+Ue),j.setAttribute(xe,Ue);break;case"onClick":Ue!=null&&(j.onclick=Ac);break;case"onScroll":Ue!=null&&tc("scroll",j);break;case"onScrollEnd":Ue!=null&&tc("scrollend",j);break;case"dangerouslySetInnerHTML":if(Ue!=null){if(typeof Ue!="object"||!("__html"in Ue))throw Error(L(61));if(xe=Ue.__html,xe!=null){if(bt.children!=null)throw Error(L(60));j.innerHTML=xe}}break;case"multiple":j.multiple=Ue&&typeof Ue!="function"&&typeof Ue!="symbol";break;case"muted":j.muted=Ue&&typeof Ue!="function"&&typeof Ue!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(Ue==null||typeof Ue=="function"||typeof Ue=="boolean"||typeof Ue=="symbol"){j.removeAttribute("xlink:href");break}xe=Bd(""+Ue),j.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",xe);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":Ue!=null&&typeof Ue!="function"&&typeof Ue!="symbol"?j.setAttribute(xe,""+Ue):j.removeAttribute(xe);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":Ue&&typeof Ue!="function"&&typeof Ue!="symbol"?j.setAttribute(xe,""):j.removeAttribute(xe);break;case"capture":case"download":Ue===!0?j.setAttribute(xe,""):Ue!==!1&&Ue!=null&&typeof Ue!="function"&&typeof Ue!="symbol"?j.setAttribute(xe,Ue):j.removeAttribute(xe);break;case"cols":case"rows":case"size":case"span":Ue!=null&&typeof Ue!="function"&&typeof Ue!="symbol"&&!isNaN(Ue)&&1<=Ue?j.setAttribute(xe,Ue):j.removeAttribute(xe);break;case"rowSpan":case"start":Ue==null||typeof Ue=="function"||typeof Ue=="symbol"||isNaN(Ue)?j.removeAttribute(xe):j.setAttribute(xe,Ue);break;case"popover":tc("beforetoggle",j),tc("toggle",j),bx(j,"popover",Ue);break;case"xlinkActuate":F0(j,"http://www.w3.org/1999/xlink","xlink:actuate",Ue);break;case"xlinkArcrole":F0(j,"http://www.w3.org/1999/xlink","xlink:arcrole",Ue);break;case"xlinkRole":F0(j,"http://www.w3.org/1999/xlink","xlink:role",Ue);break;case"xlinkShow":F0(j,"http://www.w3.org/1999/xlink","xlink:show",Ue);break;case"xlinkTitle":F0(j,"http://www.w3.org/1999/xlink","xlink:title",Ue);break;case"xlinkType":F0(j,"http://www.w3.org/1999/xlink","xlink:type",Ue);break;case"xmlBase":F0(j,"http://www.w3.org/XML/1998/namespace","xml:base",Ue);break;case"xmlLang":F0(j,"http://www.w3.org/XML/1998/namespace","xml:lang",Ue);break;case"xmlSpace":F0(j,"http://www.w3.org/XML/1998/namespace","xml:space",Ue);break;case"is":bx(j,"is",Ue);break;case"innerText":case"textContent":break;default:(!(2<xe.length)||xe[0]!=="o"&&xe[0]!=="O"||xe[1]!=="n"&&xe[1]!=="N")&&(xe=Ad.get(xe)||xe,bx(j,xe,Ue))}}function W2(j,Q,xe,Ue,bt,jt){switch(xe){case"style":ff(j,Ue,jt);break;case"dangerouslySetInnerHTML":if(Ue!=null){if(typeof Ue!="object"||!("__html"in Ue))throw Error(L(61));if(xe=Ue.__html,xe!=null){if(bt.children!=null)throw Error(L(60));j.innerHTML=xe}}break;case"children":typeof Ue=="string"?bg(j,Ue):(typeof Ue=="number"||typeof Ue=="bigint")&&bg(j,""+Ue);break;case"onScroll":Ue!=null&&tc("scroll",j);break;case"onScrollEnd":Ue!=null&&tc("scrollend",j);break;case"onClick":Ue!=null&&(j.onclick=Ac);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!QE.hasOwnProperty(xe))e:{if(xe[0]==="o"&&xe[1]==="n"&&(bt=xe.endsWith("Capture"),Q=xe.slice(2,bt?xe.length-7:void 0),jt=j[jv]||null,jt=jt!=null?jt[xe]:null,typeof jt=="function"&&j.removeEventListener(Q,jt,bt),typeof Ue=="function")){typeof jt!="function"&&jt!==null&&(xe in j?j[xe]=null:j.hasAttribute(xe)&&j.removeAttribute(xe)),j.addEventListener(Q,Ue,bt);break e}xe in j?j[xe]=Ue:Ue===!0?j.setAttribute(xe,""):bx(j,xe,Ue)}}}function Pd(j,Q,xe){switch(Q){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":tc("error",j),tc("load",j);var Ue=!1,bt=!1,jt;for(jt in xe)if(xe.hasOwnProperty(jt)){var Xr=xe[jt];if(Xr!=null)switch(jt){case"src":Ue=!0;break;case"srcSet":bt=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(L(137,Q));default:rc(j,Q,jt,Xr,xe,null)}}bt&&rc(j,Q,"srcSet",xe.srcSet,xe,null),Ue&&rc(j,Q,"src",xe.src,xe,null);return;case"input":tc("invalid",j);var Nn=jt=Xr=bt=null,Ya=null,Wi=null;for(Ue in xe)if(xe.hasOwnProperty(Ue)){var To=xe[Ue];if(To!=null)switch(Ue){case"name":bt=To;break;case"type":Xr=To;break;case"checked":Ya=To;break;case"defaultChecked":Wi=To;break;case"value":jt=To;break;case"defaultValue":Nn=To;break;case"children":case"dangerouslySetInnerHTML":if(To!=null)throw Error(L(137,Q));break;default:rc(j,Q,Ue,To,xe,null)}}B1(j,jt,Nn,Ya,Wi,Xr,bt,!1);return;case"select":tc("invalid",j),Ue=Xr=jt=null;for(bt in xe)if(xe.hasOwnProperty(bt)&&(Nn=xe[bt],Nn!=null))switch(bt){case"value":jt=Nn;break;case"defaultValue":Xr=Nn;break;case"multiple":Ue=Nn;default:rc(j,Q,bt,Nn,xe,null)}Q=jt,xe=Xr,j.multiple=!!Ue,Q!=null?wh(j,!!Ue,Q,!1):xe!=null&&wh(j,!!Ue,xe,!0);return;case"textarea":tc("invalid",j),jt=bt=Ue=null;for(Xr in xe)if(xe.hasOwnProperty(Xr)&&(Nn=xe[Xr],Nn!=null))switch(Xr){case"value":Ue=Nn;break;case"defaultValue":bt=Nn;break;case"children":jt=Nn;break;case"dangerouslySetInnerHTML":if(Nn!=null)throw Error(L(91));break;default:rc(j,Q,Xr,Nn,xe,null)}xg(j,Ue,bt,jt);return;case"option":for(Ya in xe)if(xe.hasOwnProperty(Ya)&&(Ue=xe[Ya],Ue!=null))switch(Ya){case"selected":j.selected=Ue&&typeof Ue!="function"&&typeof Ue!="symbol";break;default:rc(j,Q,Ya,Ue,xe,null)}return;case"dialog":tc("beforetoggle",j),tc("toggle",j),tc("cancel",j),tc("close",j);break;case"iframe":case"object":tc("load",j);break;case"video":case"audio":for(Ue=0;Ue<hb.length;Ue++)tc(hb[Ue],j);break;case"image":tc("error",j),tc("load",j);break;case"details":tc("toggle",j);break;case"embed":case"source":case"link":tc("error",j),tc("load",j);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Wi in xe)if(xe.hasOwnProperty(Wi)&&(Ue=xe[Wi],Ue!=null))switch(Wi){case"children":case"dangerouslySetInnerHTML":throw Error(L(137,Q));default:rc(j,Q,Wi,Ue,xe,null)}return;default:if(hp(Q)){for(To in xe)xe.hasOwnProperty(To)&&(Ue=xe[To],Ue!==void 0&&W2(j,Q,To,Ue,xe,void 0));return}}for(Nn in xe)xe.hasOwnProperty(Nn)&&(Ue=xe[Nn],Ue!=null&&rc(j,Q,Nn,Ue,xe,null))}function MS(j,Q,xe,Ue){switch(Q){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var bt=null,jt=null,Xr=null,Nn=null,Ya=null,Wi=null,To=null;for(so in xe){var Po=xe[so];if(xe.hasOwnProperty(so)&&Po!=null)switch(so){case"checked":break;case"value":break;case"defaultValue":Ya=Po;default:Ue.hasOwnProperty(so)||rc(j,Q,so,null,Ue,Po)}}for(var Qi in Ue){var so=Ue[Qi];if(Po=xe[Qi],Ue.hasOwnProperty(Qi)&&(so!=null||Po!=null))switch(Qi){case"type":jt=so;break;case"name":bt=so;break;case"checked":Wi=so;break;case"defaultChecked":To=so;break;case"value":Xr=so;break;case"defaultValue":Nn=so;break;case"children":case"dangerouslySetInnerHTML":if(so!=null)throw Error(L(137,Q));break;default:so!==Po&&rc(j,Q,Qi,so,Ue,Po)}}Lw(j,Xr,Nn,Ya,Wi,To,jt,bt);return;case"select":so=Xr=Nn=Qi=null;for(jt in xe)if(Ya=xe[jt],xe.hasOwnProperty(jt)&&Ya!=null)switch(jt){case"value":break;case"multiple":so=Ya;default:Ue.hasOwnProperty(jt)||rc(j,Q,jt,null,Ue,Ya)}for(bt in Ue)if(jt=Ue[bt],Ya=xe[bt],Ue.hasOwnProperty(bt)&&(jt!=null||Ya!=null))switch(bt){case"value":Qi=jt;break;case"defaultValue":Nn=jt;break;case"multiple":Xr=jt;default:jt!==Ya&&rc(j,Q,bt,jt,Ue,Ya)}Q=Nn,xe=Xr,Ue=so,Qi!=null?wh(j,!!xe,Qi,!1):!!Ue!=!!xe&&(Q!=null?wh(j,!!xe,Q,!0):wh(j,!!xe,xe?[]:"",!1));return;case"textarea":so=Qi=null;for(Nn in xe)if(bt=xe[Nn],xe.hasOwnProperty(Nn)&&bt!=null&&!Ue.hasOwnProperty(Nn))switch(Nn){case"value":break;case"children":break;default:rc(j,Q,Nn,null,Ue,bt)}for(Xr in Ue)if(bt=Ue[Xr],jt=xe[Xr],Ue.hasOwnProperty(Xr)&&(bt!=null||jt!=null))switch(Xr){case"value":Qi=bt;break;case"defaultValue":so=bt;break;case"children":break;case"dangerouslySetInnerHTML":if(bt!=null)throw Error(L(91));break;default:bt!==jt&&rc(j,Q,Xr,bt,Ue,jt)}Wf(j,Qi,so);return;case"option":for(var ol in xe)if(Qi=xe[ol],xe.hasOwnProperty(ol)&&Qi!=null&&!Ue.hasOwnProperty(ol))switch(ol){case"selected":j.selected=!1;break;default:rc(j,Q,ol,null,Ue,Qi)}for(Ya in Ue)if(Qi=Ue[Ya],so=xe[Ya],Ue.hasOwnProperty(Ya)&&Qi!==so&&(Qi!=null||so!=null))switch(Ya){case"selected":j.selected=Qi&&typeof Qi!="function"&&typeof Qi!="symbol";break;default:rc(j,Q,Ya,Qi,Ue,so)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Jl in xe)Qi=xe[Jl],xe.hasOwnProperty(Jl)&&Qi!=null&&!Ue.hasOwnProperty(Jl)&&rc(j,Q,Jl,null,Ue,Qi);for(Wi in Ue)if(Qi=Ue[Wi],so=xe[Wi],Ue.hasOwnProperty(Wi)&&Qi!==so&&(Qi!=null||so!=null))switch(Wi){case"children":case"dangerouslySetInnerHTML":if(Qi!=null)throw Error(L(137,Q));break;default:rc(j,Q,Wi,Qi,Ue,so)}return;default:if(hp(Q)){for(var Of in xe)Qi=xe[Of],xe.hasOwnProperty(Of)&&Qi!==void 0&&!Ue.hasOwnProperty(Of)&&W2(j,Q,Of,void 0,Ue,Qi);for(To in Ue)Qi=Ue[To],so=xe[To],!Ue.hasOwnProperty(To)||Qi===so||Qi===void 0&&so===void 0||W2(j,Q,To,Qi,Ue,so);return}}for(var Li in xe)Qi=xe[Li],xe.hasOwnProperty(Li)&&Qi!=null&&!Ue.hasOwnProperty(Li)&&rc(j,Q,Li,null,Ue,Qi);for(Po in Ue)Qi=Ue[Po],so=xe[Po],!Ue.hasOwnProperty(Po)||Qi===so||Qi==null&&so==null||rc(j,Q,Po,Qi,Ue,so)}function tg(j){switch(j){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Wy(){if(typeof performance.getEntriesByType=="function"){for(var j=0,Q=0,xe=performance.getEntriesByType("resource"),Ue=0;Ue<xe.length;Ue++){var bt=xe[Ue],jt=bt.transferSize,Xr=bt.initiatorType,Nn=bt.duration;if(jt&&Nn&&tg(Xr)){for(Xr=0,Nn=bt.responseEnd,Ue+=1;Ue<xe.length;Ue++){var Ya=xe[Ue],Wi=Ya.startTime;if(Wi>Nn)break;var To=Ya.transferSize,Po=Ya.initiatorType;To&&tg(Po)&&(Ya=Ya.responseEnd,Xr+=To*(Ya<Nn?1:(Nn-Wi)/(Ya-Wi)))}if(--Ue,Q+=8*(jt+Xr)/(bt.duration/1e3),j++,10<j)break}}if(0<j)return Q/j/1e6}return navigator.connection&&(j=navigator.connection.downlink,typeof j=="number")?j:5}var rg=null,Yg=null;function wp(j){return j.nodeType===9?j:j.ownerDocument}function CS(j){switch(j){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function kS(j,Q){if(j===0)switch(Q){case"svg":return 1;case"math":return 2;default:return 0}return j===1&&Q==="foreignObject"?0:j}function Y2(j,Q){return j==="textarea"||j==="noscript"||typeof Q.children=="string"||typeof Q.children=="number"||typeof Q.children=="bigint"||typeof Q.dangerouslySetInnerHTML=="object"&&Q.dangerouslySetInnerHTML!==null&&Q.dangerouslySetInnerHTML.__html!=null}var Z2=null;function ZC(){var j=window.event;return j&&j.type==="popstate"?j===Z2?!1:(Z2=j,!0):(Z2=null,!1)}var PS=typeof setTimeout=="function"?setTimeout:void 0,$C=typeof clearTimeout=="function"?clearTimeout:void 0,$2=typeof Promise=="function"?Promise:void 0,LS=typeof queueMicrotask=="function"?queueMicrotask:typeof $2<"u"?function(j){return $2.resolve(null).then(j).catch(RS)}:PS;function RS(j){setTimeout(function(){throw j})}function m0(j){return j==="head"}function IS(j,Q){var xe=Q,Ue=0;do{var bt=xe.nextSibling;if(j.removeChild(xe),bt&&bt.nodeType===8)if(xe=bt.data,xe==="/$"||xe==="/&"){if(Ue===0){j.removeChild(bt),r1(Q);return}Ue--}else if(xe==="$"||xe==="$?"||xe==="$~"||xe==="$!"||xe==="&")Ue++;else if(xe==="html")Yy(j.ownerDocument.documentElement);else if(xe==="head"){xe=j.ownerDocument.head,Yy(xe);for(var jt=xe.firstChild;jt;){var Xr=jt.nextSibling,Nn=jt.nodeName;jt[Yo]||Nn==="SCRIPT"||Nn==="STYLE"||Nn==="LINK"&&jt.rel.toLowerCase()==="stylesheet"||xe.removeChild(jt),jt=Xr}}else xe==="body"&&Yy(j.ownerDocument.body);xe=bt}while(xe);r1(Q)}function DS(j,Q){var xe=j;j=0;do{var Ue=xe.nextSibling;if(xe.nodeType===1?Q?(xe._stashedDisplay=xe.style.display,xe.style.display="none"):(xe.style.display=xe._stashedDisplay||"",xe.getAttribute("style")===""&&xe.removeAttribute("style")):xe.nodeType===3&&(Q?(xe._stashedText=xe.nodeValue,xe.nodeValue=""):xe.nodeValue=xe._stashedText||""),Ue&&Ue.nodeType===8)if(xe=Ue.data,xe==="/$"){if(j===0)break;j--}else xe!=="$"&&xe!=="$?"&&xe!=="$~"&&xe!=="$!"||j++;xe=Ue}while(xe)}function pb(j){var Q=j.firstChild;for(Q&&Q.nodeType===10&&(Q=Q.nextSibling);Q;){var xe=Q;switch(Q=Q.nextSibling,xe.nodeName){case"HTML":case"HEAD":case"BODY":pb(xe),QT(xe);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(xe.rel.toLowerCase()==="stylesheet")continue}j.removeChild(xe)}}function g0(j,Q,xe,Ue){for(;j.nodeType===1;){var bt=xe;if(j.nodeName.toLowerCase()!==Q.toLowerCase()){if(!Ue&&(j.nodeName!=="INPUT"||j.type!=="hidden"))break}else if(Ue){if(!j[Yo])switch(Q){case"meta":if(!j.hasAttribute("itemprop"))break;return j;case"link":if(jt=j.getAttribute("rel"),jt==="stylesheet"&&j.hasAttribute("data-precedence"))break;if(jt!==bt.rel||j.getAttribute("href")!==(bt.href==null||bt.href===""?null:bt.href)||j.getAttribute("crossorigin")!==(bt.crossOrigin==null?null:bt.crossOrigin)||j.getAttribute("title")!==(bt.title==null?null:bt.title))break;return j;case"style":if(j.hasAttribute("data-precedence"))break;return j;case"script":if(jt=j.getAttribute("src"),(jt!==(bt.src==null?null:bt.src)||j.getAttribute("type")!==(bt.type==null?null:bt.type)||j.getAttribute("crossorigin")!==(bt.crossOrigin==null?null:bt.crossOrigin))&&jt&&j.hasAttribute("async")&&!j.hasAttribute("itemprop"))break;return j;default:return j}}else if(Q==="input"&&j.type==="hidden"){var jt=bt.name==null?null:""+bt.name;if(bt.type==="hidden"&&j.getAttribute("name")===jt)return j}else return j;if(j=Tp(j.nextSibling),j===null)break}return null}function OS(j,Q,xe){if(Q==="")return null;for(;j.nodeType!==3;)if((j.nodeType!==1||j.nodeName!=="INPUT"||j.type!=="hidden")&&!xe||(j=Tp(j.nextSibling),j===null))return null;return j}function K2(j,Q){for(;j.nodeType!==8;)if((j.nodeType!==1||j.nodeName!=="INPUT"||j.type!=="hidden")&&!Q||(j=Tp(j.nextSibling),j===null))return null;return j}function mb(j){return j.data==="$?"||j.data==="$~"}function gb(j){return j.data==="$!"||j.data==="$?"&&j.ownerDocument.readyState!=="loading"}function lR(j,Q){var xe=j.ownerDocument;if(j.data==="$~")j._reactRetry=Q;else if(j.data!=="$?"||xe.readyState!=="loading")Q();else{var Ue=function(){Q(),xe.removeEventListener("DOMContentLoaded",Ue)};xe.addEventListener("DOMContentLoaded",Ue),j._reactRetry=Ue}}function Tp(j){for(;j!=null;j=j.nextSibling){var Q=j.nodeType;if(Q===1||Q===3)break;if(Q===8){if(Q=j.data,Q==="$"||Q==="$!"||Q==="$?"||Q==="$~"||Q==="&"||Q==="F!"||Q==="F")break;if(Q==="/$"||Q==="/&")return null}}return j}var Um=null;function zS(j){j=j.nextSibling;for(var Q=0;j;){if(j.nodeType===8){var xe=j.data;if(xe==="/$"||xe==="/&"){if(Q===0)return Tp(j.nextSibling);Q--}else xe!=="$"&&xe!=="$!"&&xe!=="$?"&&xe!=="$~"&&xe!=="&"||Q++}j=j.nextSibling}return null}function b_(j){j=j.previousSibling;for(var Q=0;j;){if(j.nodeType===8){var xe=j.data;if(xe==="$"||xe==="$!"||xe==="$?"||xe==="$~"||xe==="&"){if(Q===0)return j;Q--}else xe!=="/$"&&xe!=="/&"||Q++}j=j.previousSibling}return null}function J2(j,Q,xe){switch(Q=wp(xe),j){case"html":if(j=Q.documentElement,!j)throw Error(L(452));return j;case"head":if(j=Q.head,!j)throw Error(L(453));return j;case"body":if(j=Q.body,!j)throw Error(L(454));return j;default:throw Error(L(451))}}function Yy(j){for(var Q=j.attributes;Q.length;)j.removeAttributeNode(Q[0]);QT(j)}var Ap=new Map,Q2=new Set;function y0(j){return typeof j.getRootNode=="function"?j.getRootNode():j.nodeType===9?j:j.ownerDocument}var qm=qa.d;qa.d={f:KC,r:uR,D:Zy,C:NS,L:t3,m:r3,X:T_,S:yb,M:FS};function KC(){var j=qm.f(),Q=B2();return j||Q}function uR(j){var Q=_g(j);Q!==null&&Q.tag===5&&Q.type==="form"?VA(Q):qm.r(j)}var w_=typeof document>"u"?null:document;function e3(j,Q,xe){var Ue=w_;if(Ue&&typeof Q=="string"&&Q){var bt=im(Q);bt='link[rel="'+j+'"][href="'+bt+'"]',typeof xe=="string"&&(bt+='[crossorigin="'+xe+'"]'),Q2.has(bt)||(Q2.add(bt),j={rel:j,crossOrigin:xe,href:Q},Ue.querySelector(bt)===null&&(Q=Ue.createElement("link"),Pd(Q,"link",j),sv(Q),Ue.head.appendChild(Q)))}}function Zy(j){qm.D(j),e3("dns-prefetch",j,null)}function NS(j,Q){qm.C(j,Q),e3("preconnect",j,Q)}function t3(j,Q,xe){qm.L(j,Q,xe);var Ue=w_;if(Ue&&j&&Q){var bt='link[rel="preload"][as="'+im(Q)+'"]';Q==="image"&&xe&&xe.imageSrcSet?(bt+='[imagesrcset="'+im(xe.imageSrcSet)+'"]',typeof xe.imageSizes=="string"&&(bt+='[imagesizes="'+im(xe.imageSizes)+'"]')):bt+='[href="'+im(j)+'"]';var jt=bt;switch(Q){case"style":jt=Zg(j);break;case"script":jt=Ky(j)}Ap.has(jt)||(j=gt({rel:"preload",href:Q==="image"&&xe&&xe.imageSrcSet?void 0:j,as:Q},xe),Ap.set(jt,j),Ue.querySelector(bt)!==null||Q==="style"&&Ue.querySelector(_b(jt))||Q==="script"&&Ue.querySelector(Jy(jt))||(Q=Ue.createElement("link"),Pd(Q,"link",j),sv(Q),Ue.head.appendChild(Q)))}}function r3(j,Q){qm.m(j,Q);var xe=w_;if(xe&&j){var Ue=Q&&typeof Q.as=="string"?Q.as:"script",bt='link[rel="modulepreload"][as="'+im(Ue)+'"][href="'+im(j)+'"]',jt=bt;switch(Ue){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":jt=Ky(j)}if(!Ap.has(jt)&&(j=gt({rel:"modulepreload",href:j},Q),Ap.set(jt,j),xe.querySelector(bt)===null)){switch(Ue){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(xe.querySelector(Jy(jt)))return}Ue=xe.createElement("link"),Pd(Ue,"link",j),sv(Ue),xe.head.appendChild(Ue)}}}function yb(j,Q,xe){qm.S(j,Q,xe);var Ue=w_;if(Ue&&j){var bt=N1(Ue).hoistableStyles,jt=Zg(j);Q=Q||"default";var Xr=bt.get(jt);if(!Xr){var Nn={loading:0,preload:null};if(Xr=Ue.querySelector(_b(jt)))Nn.loading=5;else{j=gt({rel:"stylesheet",href:j,"data-precedence":Q},xe),(xe=Ap.get(jt))&&Qy(j,xe);var Ya=Xr=Ue.createElement("link");sv(Ya),Pd(Ya,"link",j),Ya._p=new Promise(function(Wi,To){Ya.onload=Wi,Ya.onerror=To}),Ya.addEventListener("load",function(){Nn.loading|=1}),Ya.addEventListener("error",function(){Nn.loading|=2}),Nn.loading|=4,xb(Xr,Q,Ue)}Xr={type:"stylesheet",instance:Xr,count:1,state:Nn},bt.set(jt,Xr)}}}function T_(j,Q){qm.X(j,Q);var xe=w_;if(xe&&j){var Ue=N1(xe).hoistableScripts,bt=Ky(j),jt=Ue.get(bt);jt||(jt=xe.querySelector(Jy(bt)),jt||(j=gt({src:j,async:!0},Q),(Q=Ap.get(bt))&&a3(j,Q),jt=xe.createElement("script"),sv(jt),Pd(jt,"link",j),xe.head.appendChild(jt)),jt={type:"script",instance:jt,count:1,state:null},Ue.set(bt,jt))}}function FS(j,Q){qm.M(j,Q);var xe=w_;if(xe&&j){var Ue=N1(xe).hoistableScripts,bt=Ky(j),jt=Ue.get(bt);jt||(jt=xe.querySelector(Jy(bt)),jt||(j=gt({src:j,async:!0,type:"module"},Q),(Q=Ap.get(bt))&&a3(j,Q),jt=xe.createElement("script"),sv(jt),Pd(jt,"link",j),xe.head.appendChild(jt)),jt={type:"script",instance:jt,count:1,state:null},Ue.set(bt,jt))}}function n3(j,Q,xe,Ue){var bt=(bt=fi.current)?y0(bt):null;if(!bt)throw Error(L(446));switch(j){case"meta":case"title":return null;case"style":return typeof xe.precedence=="string"&&typeof xe.href=="string"?(Q=Zg(xe.href),xe=N1(bt).hoistableStyles,Ue=xe.get(Q),Ue||(Ue={type:"style",instance:null,count:0,state:null},xe.set(Q,Ue)),Ue):{type:"void",instance:null,count:0,state:null};case"link":if(xe.rel==="stylesheet"&&typeof xe.href=="string"&&typeof xe.precedence=="string"){j=Zg(xe.href);var jt=N1(bt).hoistableStyles,Xr=jt.get(j);if(Xr||(bt=bt.ownerDocument||bt,Xr={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},jt.set(j,Xr),(jt=bt.querySelector(_b(j)))&&!jt._p&&(Xr.instance=jt,Xr.state.loading=5),Ap.has(j)||(xe={rel:"preload",as:"style",href:xe.href,crossOrigin:xe.crossOrigin,integrity:xe.integrity,media:xe.media,hrefLang:xe.hrefLang,referrerPolicy:xe.referrerPolicy},Ap.set(j,xe),jt||JC(bt,j,xe,Xr.state))),Q&&Ue===null)throw Error(L(528,""));return Xr}if(Q&&Ue!==null)throw Error(L(529,""));return null;case"script":return Q=xe.async,xe=xe.src,typeof xe=="string"&&Q&&typeof Q!="function"&&typeof Q!="symbol"?(Q=Ky(xe),xe=N1(bt).hoistableScripts,Ue=xe.get(Q),Ue||(Ue={type:"script",instance:null,count:0,state:null},xe.set(Q,Ue)),Ue):{type:"void",instance:null,count:0,state:null};default:throw Error(L(444,j))}}function Zg(j){return'href="'+im(j)+'"'}function _b(j){return'link[rel="stylesheet"]['+j+"]"}function $y(j){return gt({},j,{"data-precedence":j.precedence,precedence:null})}function JC(j,Q,xe,Ue){j.querySelector('link[rel="preload"][as="style"]['+Q+"]")?Ue.loading=1:(Q=j.createElement("link"),Ue.preload=Q,Q.addEventListener("load",function(){return Ue.loading|=1}),Q.addEventListener("error",function(){return Ue.loading|=2}),Pd(Q,"link",xe),sv(Q),j.head.appendChild(Q))}function Ky(j){return'[src="'+im(j)+'"]'}function Jy(j){return"script[async]"+j}function BS(j,Q,xe){if(Q.count++,Q.instance===null)switch(Q.type){case"style":var Ue=j.querySelector('style[data-href~="'+im(xe.href)+'"]');if(Ue)return Q.instance=Ue,sv(Ue),Ue;var bt=gt({},xe,{"data-href":xe.href,"data-precedence":xe.precedence,href:null,precedence:null});return Ue=(j.ownerDocument||j).createElement("style"),sv(Ue),Pd(Ue,"style",bt),xb(Ue,xe.precedence,j),Q.instance=Ue;case"stylesheet":bt=Zg(xe.href);var jt=j.querySelector(_b(bt));if(jt)return Q.state.loading|=4,Q.instance=jt,sv(jt),jt;Ue=$y(xe),(bt=Ap.get(bt))&&Qy(Ue,bt),jt=(j.ownerDocument||j).createElement("link"),sv(jt);var Xr=jt;return Xr._p=new Promise(function(Nn,Ya){Xr.onload=Nn,Xr.onerror=Ya}),Pd(jt,"link",Ue),Q.state.loading|=4,xb(jt,xe.precedence,j),Q.instance=jt;case"script":return jt=Ky(xe.src),(bt=j.querySelector(Jy(jt)))?(Q.instance=bt,sv(bt),bt):(Ue=xe,(bt=Ap.get(jt))&&(Ue=gt({},xe),a3(Ue,bt)),j=j.ownerDocument||j,bt=j.createElement("script"),sv(bt),Pd(bt,"link",Ue),j.head.appendChild(bt),Q.instance=bt);case"void":return null;default:throw Error(L(443,Q.type))}else Q.type==="stylesheet"&&(Q.state.loading&4)===0&&(Ue=Q.instance,Q.state.loading|=4,xb(Ue,xe.precedence,j));return Q.instance}function xb(j,Q,xe){for(var Ue=xe.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),bt=Ue.length?Ue[Ue.length-1]:null,jt=bt,Xr=0;Xr<Ue.length;Xr++){var Nn=Ue[Xr];if(Nn.dataset.precedence===Q)jt=Nn;else if(jt!==bt)break}jt?jt.parentNode.insertBefore(j,jt.nextSibling):(Q=xe.nodeType===9?xe.head:xe,Q.insertBefore(j,Q.firstChild))}function Qy(j,Q){j.crossOrigin==null&&(j.crossOrigin=Q.crossOrigin),j.referrerPolicy==null&&(j.referrerPolicy=Q.referrerPolicy),j.title==null&&(j.title=Q.title)}function a3(j,Q){j.crossOrigin==null&&(j.crossOrigin=Q.crossOrigin),j.referrerPolicy==null&&(j.referrerPolicy=Q.referrerPolicy),j.integrity==null&&(j.integrity=Q.integrity)}var bb=null;function QC(j,Q,xe){if(bb===null){var Ue=new Map,bt=bb=new Map;bt.set(xe,Ue)}else bt=bb,Ue=bt.get(xe),Ue||(Ue=new Map,bt.set(xe,Ue));if(Ue.has(j))return Ue;for(Ue.set(j,null),xe=xe.getElementsByTagName(j),bt=0;bt<xe.length;bt++){var jt=xe[bt];if(!(jt[Yo]||jt[Fl]||j==="link"&&jt.getAttribute("rel")==="stylesheet")&&jt.namespaceURI!=="http://www.w3.org/2000/svg"){var Xr=jt.getAttribute(Q)||"";Xr=j+Xr;var Nn=Ue.get(Xr);Nn?Nn.push(jt):Ue.set(Xr,[jt])}}return Ue}function wb(j,Q,xe){j=j.ownerDocument||j,j.head.insertBefore(xe,Q==="title"?j.querySelector("head > title"):null)}function cR(j,Q,xe){if(xe===1||Q.itemProp!=null)return!1;switch(j){case"meta":case"title":return!0;case"style":if(typeof Q.precedence!="string"||typeof Q.href!="string"||Q.href==="")break;return!0;case"link":if(typeof Q.rel!="string"||typeof Q.href!="string"||Q.href===""||Q.onLoad||Q.onError)break;switch(Q.rel){case"stylesheet":return j=Q.disabled,typeof Q.precedence=="string"&&j==null;default:return!0}case"script":if(Q.async&&typeof Q.async!="function"&&typeof Q.async!="symbol"&&!Q.onLoad&&!Q.onError&&Q.src&&typeof Q.src=="string")return!0}return!1}function Gd(j){return!(j.type==="stylesheet"&&(j.state.loading&3)===0)}function A_(j,Q,xe,Ue){if(xe.type==="stylesheet"&&(typeof Ue.media!="string"||matchMedia(Ue.media).matches!==!1)&&(xe.state.loading&4)===0){if(xe.instance===null){var bt=Zg(Ue.href),jt=Q.querySelector(_b(bt));if(jt){Q=jt._p,Q!==null&&typeof Q=="object"&&typeof Q.then=="function"&&(j.count++,j=Tb.bind(j),Q.then(j,j)),xe.state.loading|=4,xe.instance=jt,sv(jt);return}jt=Q.ownerDocument||Q,Ue=$y(Ue),(bt=Ap.get(bt))&&Qy(Ue,bt),jt=jt.createElement("link"),sv(jt);var Xr=jt;Xr._p=new Promise(function(Nn,Ya){Xr.onload=Nn,Xr.onerror=Ya}),Pd(jt,"link",Ue),xe.instance=jt}j.stylesheets===null&&(j.stylesheets=new Map),j.stylesheets.set(xe,Q),(Q=xe.state.preload)&&(xe.state.loading&3)===0&&(j.count++,xe=Tb.bind(j),Q.addEventListener("load",xe),Q.addEventListener("error",xe))}}var i3=0;function o3(j,Q){return j.stylesheets&&j.count===0&&Sb(j,j.stylesheets),0<j.count||0<j.imgCount?function(xe){var Ue=setTimeout(function(){if(j.stylesheets&&Sb(j,j.stylesheets),j.unsuspend){var jt=j.unsuspend;j.unsuspend=null,jt()}},6e4+Q);0<j.imgBytes&&i3===0&&(i3=62500*Wy());var bt=setTimeout(function(){if(j.waitingForImages=!1,j.count===0&&(j.stylesheets&&Sb(j,j.stylesheets),j.unsuspend)){var jt=j.unsuspend;j.unsuspend=null,jt()}},(j.imgBytes>i3?50:800)+Q);return j.unsuspend=xe,function(){j.unsuspend=null,clearTimeout(Ue),clearTimeout(bt)}}:null}function Tb(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Sb(this,this.stylesheets);else if(this.unsuspend){var j=this.unsuspend;this.unsuspend=null,j()}}}var Ab=null;function Sb(j,Q){j.stylesheets=null,j.unsuspend!==null&&(j.count++,Ab=new Map,Q.forEach(jS,j),Ab=null,Tb.call(j))}function jS(j,Q){if(!(Q.state.loading&4)){var xe=Ab.get(j);if(xe)var Ue=xe.get(null);else{xe=new Map,Ab.set(j,xe);for(var bt=j.querySelectorAll("link[data-precedence],style[data-precedence]"),jt=0;jt<bt.length;jt++){var Xr=bt[jt];(Xr.nodeName==="LINK"||Xr.getAttribute("media")!=="not all")&&(xe.set(Xr.dataset.precedence,Xr),Ue=Xr)}Ue&&xe.set(null,Ue)}bt=Q.instance,Xr=bt.getAttribute("data-precedence"),jt=xe.get(Xr)||Ue,jt===Ue&&xe.set(null,bt),xe.set(Xr,bt),this.count++,Ue=Tb.bind(this),bt.addEventListener("load",Ue),bt.addEventListener("error",Ue),jt?jt.parentNode.insertBefore(bt,jt.nextSibling):(j=j.nodeType===9?j.head:j,j.insertBefore(bt,j.firstChild)),Q.state.loading|=4}}var S_={$$typeof:Jr,Provider:null,Consumer:null,_currentValue:Ri,_currentValue2:Ri,_threadCount:0};function US(j,Q,xe,Ue,bt,jt,Xr,Nn,Ya){this.tag=1,this.containerInfo=j,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=rp(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=rp(0),this.hiddenUpdates=rp(null),this.identifierPrefix=Ue,this.onUncaughtError=bt,this.onCaughtError=jt,this.onRecoverableError=Xr,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Ya,this.incompleteTransitions=new Map}function ek(j,Q,xe,Ue,bt,jt,Xr,Nn,Ya,Wi,To,Po){return j=new US(j,Q,xe,Xr,Ya,Wi,To,Po,Nn),Q=1,jt===!0&&(Q|=24),jt=Tv(3,null,null,Q),j.current=jt,jt.stateNode=j,Q=TA(),Q.refCount++,j.pooledCache=Q,Q.refCount++,jt.memoizedState={element:Ue,isDehydrated:xe,cache:Q},MA(jt),j}function qS(j){return j?(j=wv,j):wv}function VS(j,Q,xe,Ue,bt,jt){bt=qS(bt),Ue.context===null?Ue.context=bt:Ue.pendingContext=bt,Ue=Dg(Q),Ue.payload={element:xe},jt=jt===void 0?null:jt,jt!==null&&(Ue.callback=jt),xe=Og(j,Ue,Q),xe!==null&&(bp(xe,j,Q),Fx(xe,j,Q))}function HS(j,Q){if(j=j.memoizedState,j!==null&&j.dehydrated!==null){var xe=j.retryLane;j.retryLane=xe!==0&&xe<Q?xe:Q}}function s3(j,Q){HS(j,Q),(j=j.alternate)&&HS(j,Q)}function Vm(j){if(j.tag===13||j.tag===31){var Q=Lm(j,67108864);Q!==null&&bp(Q,j,67108864),s3(j,67108864)}}function Eb(j){if(j.tag===13||j.tag===31){var Q=Hv();Q=D1(Q);var xe=Lm(j,Q);xe!==null&&bp(xe,j,Q),s3(j,Q)}}var Mb=!0;function tk(j,Q,xe,Ue){var bt=ea.T;ea.T=null;var jt=qa.p;try{qa.p=2,GS(j,Q,xe,Ue)}finally{qa.p=jt,ea.T=bt}}function fR(j,Q,xe,Ue){var bt=ea.T;ea.T=null;var jt=qa.p;try{qa.p=8,GS(j,Q,xe,Ue)}finally{qa.p=jt,ea.T=bt}}function GS(j,Q,xe,Ue){if(Mb){var bt=l3(Ue);if(bt===null)H2(j,Q,Ue,e1,xe),WS(j,Ue);else if(u3(bt,j,Q,xe,Ue))Ue.stopPropagation();else if(WS(j,Ue),Q&4&&-1<hR.indexOf(j)){for(;bt!==null;){var jt=_g(bt);if(jt!==null)switch(jt.tag){case 3:if(jt=jt.stateNode,jt.current.memoizedState.isDehydrated){var Xr=Bv(jt.pendingLanes);if(Xr!==0){var Nn=jt;for(Nn.pendingLanes|=2,Nn.entangledLanes|=2;Xr;){var Ya=1<<31-Td(Xr);Nn.entanglements[1]|=Ya,Xr&=~Ya}v0(jt),(jc&6)===0&&(z2=ov()+500,sb(0))}}break;case 31:case 13:Nn=Lm(jt,2),Nn!==null&&bp(Nn,jt,2),B2(),s3(jt,2)}if(jt=l3(Ue),jt===null&&H2(j,Q,Ue,e1,xe),jt===bt)break;bt=jt}bt!==null&&Ue.stopPropagation()}else H2(j,Q,Ue,null,xe)}}function l3(j){return j=Tx(j),E_(j)}var e1=null;function E_(j){if(e1=null,j=z0(j),j!==null){var Q=ve(j);if(Q===null)j=null;else{var xe=Q.tag;if(xe===13){if(j=Ce(Q),j!==null)return j;j=null}else if(xe===31){if(j=Be(Q),j!==null)return j;j=null}else if(xe===3){if(Q.stateNode.current.memoizedState.isDehydrated)return Q.tag===3?Q.stateNode.containerInfo:null;j=null}else Q!==j&&(j=null)}}return e1=j,null}function XS(j){switch(j){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(P1()){case Fv:return 2;case I0:return 8;case L1:case WT:return 32;case xy:return 268435456;default:return 32}default:return 32}}var M_=!1,Hm=null,$g=null,Kg=null,Cb=new Map,kb=new Map,Jg=[],hR="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".split(" ");function WS(j,Q){switch(j){case"focusin":case"focusout":Hm=null;break;case"dragenter":case"dragleave":$g=null;break;case"mouseover":case"mouseout":Kg=null;break;case"pointerover":case"pointerout":Cb.delete(Q.pointerId);break;case"gotpointercapture":case"lostpointercapture":kb.delete(Q.pointerId)}}function t1(j,Q,xe,Ue,bt,jt){return j===null||j.nativeEvent!==jt?(j={blockedOn:Q,domEventName:xe,eventSystemFlags:Ue,nativeEvent:jt,targetContainers:[bt]},Q!==null&&(Q=_g(Q),Q!==null&&Vm(Q)),j):(j.eventSystemFlags|=Ue,Q=j.targetContainers,bt!==null&&Q.indexOf(bt)===-1&&Q.push(bt),j)}function u3(j,Q,xe,Ue,bt){switch(Q){case"focusin":return Hm=t1(Hm,j,Q,xe,Ue,bt),!0;case"dragenter":return $g=t1($g,j,Q,xe,Ue,bt),!0;case"mouseover":return Kg=t1(Kg,j,Q,xe,Ue,bt),!0;case"pointerover":var jt=bt.pointerId;return Cb.set(jt,t1(Cb.get(jt)||null,j,Q,xe,Ue,bt)),!0;case"gotpointercapture":return jt=bt.pointerId,kb.set(jt,t1(kb.get(jt)||null,j,Q,xe,Ue,bt)),!0}return!1}function rk(j){var Q=z0(j.target);if(Q!==null){var xe=ve(Q);if(xe!==null){if(Q=xe.tag,Q===13){if(Q=Ce(xe),Q!==null){j.blockedOn=Q,Fd(j.priority,function(){Eb(xe)});return}}else if(Q===31){if(Q=Be(xe),Q!==null){j.blockedOn=Q,Fd(j.priority,function(){Eb(xe)});return}}else if(Q===3&&xe.stateNode.current.memoizedState.isDehydrated){j.blockedOn=xe.tag===3?xe.stateNode.containerInfo:null;return}}}j.blockedOn=null}function c3(j){if(j.blockedOn!==null)return!1;for(var Q=j.targetContainers;0<Q.length;){var xe=l3(j.nativeEvent);if(xe===null){xe=j.nativeEvent;var Ue=new xe.constructor(xe.type,xe);Sd=Ue,xe.target.dispatchEvent(Ue),Sd=null}else return Q=_g(xe),Q!==null&&Vm(Q),j.blockedOn=xe,!1;Q.shift()}return!0}function nk(j,Q,xe){c3(j)&&xe.delete(Q)}function f3(){M_=!1,Hm!==null&&c3(Hm)&&(Hm=null),$g!==null&&c3($g)&&($g=null),Kg!==null&&c3(Kg)&&(Kg=null),Cb.forEach(nk),kb.forEach(nk)}function h3(j,Q){j.blockedOn===Q&&(j.blockedOn=null,M_||(M_=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,f3)))}var Pb=null;function YS(j){Pb!==j&&(Pb=j,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Pb===j&&(Pb=null);for(var Q=0;Q<j.length;Q+=3){var xe=j[Q],Ue=j[Q+1],bt=j[Q+2];if(typeof Ue!="function"){if(E_(Ue||xe)===null)continue;break}var jt=_g(xe);jt!==null&&(j.splice(Q,3),Q-=3,T2(jt,{pending:!0,data:bt,method:xe.method,action:Ue},Ue,bt))}}))}function r1(j){function Q(Ya){return h3(Ya,j)}Hm!==null&&h3(Hm,j),$g!==null&&h3($g,j),Kg!==null&&h3(Kg,j),Cb.forEach(Q),kb.forEach(Q);for(var xe=0;xe<Jg.length;xe++){var Ue=Jg[xe];Ue.blockedOn===j&&(Ue.blockedOn=null)}for(;0<Jg.length&&(xe=Jg[0],xe.blockedOn===null);)rk(xe),xe.blockedOn===null&&Jg.shift();if(xe=(j.ownerDocument||j).$$reactFormReplay,xe!=null)for(Ue=0;Ue<xe.length;Ue+=3){var bt=xe[Ue],jt=xe[Ue+1],Xr=bt[jv]||null;if(typeof jt=="function")Xr||YS(xe);else if(Xr){var Nn=null;if(jt&&jt.hasAttribute("formAction")){if(bt=jt,Xr=jt[jv]||null)Nn=Xr.formAction;else if(E_(bt)!==null)continue}else Nn=Xr.action;typeof Nn=="function"?xe[Ue+1]=Nn:(xe.splice(Ue,3),Ue-=3),YS(xe)}}}function ak(){function j(jt){jt.canIntercept&&jt.info==="react-transition"&&jt.intercept({handler:function(){return new Promise(function(Xr){return bt=Xr})},focusReset:"manual",scroll:"manual"})}function Q(){bt!==null&&(bt(),bt=null),Ue||setTimeout(xe,20)}function xe(){if(!Ue&&!navigation.transition){var jt=navigation.currentEntry;jt&&jt.url!=null&&navigation.navigate(jt.url,{state:jt.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var Ue=!1,bt=null;return navigation.addEventListener("navigate",j),navigation.addEventListener("navigatesuccess",Q),navigation.addEventListener("navigateerror",Q),setTimeout(xe,100),function(){Ue=!0,navigation.removeEventListener("navigate",j),navigation.removeEventListener("navigatesuccess",Q),navigation.removeEventListener("navigateerror",Q),bt!==null&&(bt(),bt=null)}}}function d3(j){this._internalRoot=j}v3.prototype.render=d3.prototype.render=function(j){var Q=this._internalRoot;if(Q===null)throw Error(L(409));var xe=Q.current,Ue=Hv();VS(xe,Ue,j,Q,null,null)},v3.prototype.unmount=d3.prototype.unmount=function(){var j=this._internalRoot;if(j!==null){this._internalRoot=null;var Q=j.containerInfo;VS(j.current,2,null,j,null,null),B2(),Q[z1]=null}};function v3(j){this._internalRoot=j}v3.prototype.unstable_scheduleHydration=function(j){if(j){var Q=ef();j={blockedOn:null,target:j,priority:Q};for(var xe=0;xe<Jg.length&&Q!==0&&Q<Jg[xe].priority;xe++);Jg.splice(xe,0,j),xe===0&&rk(j)}};var ik=n.version;if(ik!=="19.2.0")throw Error(L(527,ik,"19.2.0"));qa.findDOMNode=function(j){var Q=j._reactInternals;if(Q===void 0)throw typeof j.render=="function"?Error(L(188)):(j=Object.keys(j).join(","),Error(L(268,j)));return j=Ke(Q),j=j!==null?dt(j):null,j=j===null?null:j.stateNode,j};var ok={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:ea,reconcilerVersion:"19.2.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Lb=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Lb.isDisabled&&Lb.supportsFiber)try{D0=Lb.inject(ok),wd=Lb}catch{}}return I5.createRoot=function(j,Q){if(!re(j))throw Error(L(299));var xe=!1,Ue="",bt=QM,jt=eC,Xr=tC;return Q!=null&&(Q.unstable_strictMode===!0&&(xe=!0),Q.identifierPrefix!==void 0&&(Ue=Q.identifierPrefix),Q.onUncaughtError!==void 0&&(bt=Q.onUncaughtError),Q.onCaughtError!==void 0&&(jt=Q.onCaughtError),Q.onRecoverableError!==void 0&&(Xr=Q.onRecoverableError)),Q=ek(j,1,!1,null,null,xe,Ue,null,bt,jt,Xr,ak),j[z1]=Q.current,x_(j),new d3(Q)},I5.hydrateRoot=function(j,Q,xe){if(!re(j))throw Error(L(299));var Ue=!1,bt="",jt=QM,Xr=eC,Nn=tC,Ya=null;return xe!=null&&(xe.unstable_strictMode===!0&&(Ue=!0),xe.identifierPrefix!==void 0&&(bt=xe.identifierPrefix),xe.onUncaughtError!==void 0&&(jt=xe.onUncaughtError),xe.onCaughtError!==void 0&&(Xr=xe.onCaughtError),xe.onRecoverableError!==void 0&&(Nn=xe.onRecoverableError),xe.formState!==void 0&&(Ya=xe.formState)),Q=ek(j,1,!0,Q,xe??null,Ue,bt,Ya,jt,Xr,Nn,ak),Q.context=qS(null),xe=Q.current,Ue=Hv(),Ue=D1(Ue),bt=Dg(Ue),bt.callback=null,Og(xe,bt,Ue),xe=Ue,Q.current.lanes=xe,xv(Q,xe),v0(Q),j[z1]=Q.current,x_(j),new v3(Q)},I5.version="19.2.0",I5}var EB;function eie(){if(EB)return j8.exports;EB=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),j8.exports=Qae(),j8.exports}var tie=eie(),rie=JX();const nie=ih(rie);var aie=e=>{switch(e){case"success":return sie;case"info":return uie;case"warning":return lie;case"error":return cie;default:return null}},iie=Array(12).fill(0),oie=({visible:e,className:n})=>la.createElement("div",{className:["sonner-loading-wrapper",n].filter(Boolean).join(" "),"data-visible":e},la.createElement("div",{className:"sonner-spinner"},iie.map((S,L)=>la.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${L}`})))),sie=la.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},la.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),lie=la.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},la.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),uie=la.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},la.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),cie=la.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},la.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),fie=la.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},la.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),la.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),hie=()=>{let[e,n]=la.useState(document.hidden);return la.useEffect(()=>{let S=()=>{n(document.hidden)};return document.addEventListener("visibilitychange",S),()=>window.removeEventListener("visibilitychange",S)},[]),e},ZO=1,die=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let n=this.subscribers.indexOf(e);this.subscribers.splice(n,1)}),this.publish=e=>{this.subscribers.forEach(n=>n(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var n;let{message:S,...L}=e,re=typeof e?.id=="number"||((n=e.id)==null?void 0:n.length)>0?e.id:ZO++,ve=this.toasts.find(Be=>Be.id===re),Ce=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(re)&&this.dismissedToasts.delete(re),ve?this.toasts=this.toasts.map(Be=>Be.id===re?(this.publish({...Be,...e,id:re,title:S}),{...Be,...e,id:re,dismissible:Ce,title:S}):Be):this.addToast({title:S,...L,dismissible:Ce,id:re}),re},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(n=>{this.subscribers.forEach(S=>S({id:n.id,dismiss:!0}))}),this.subscribers.forEach(n=>n({id:e,dismiss:!0})),e),this.message=(e,n)=>this.create({...n,message:e}),this.error=(e,n)=>this.create({...n,message:e,type:"error"}),this.success=(e,n)=>this.create({...n,type:"success",message:e}),this.info=(e,n)=>this.create({...n,type:"info",message:e}),this.warning=(e,n)=>this.create({...n,type:"warning",message:e}),this.loading=(e,n)=>this.create({...n,type:"loading",message:e}),this.promise=(e,n)=>{if(!n)return;let S;n.loading!==void 0&&(S=this.create({...n,promise:e,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));let L=e instanceof Promise?e:e(),re=S!==void 0,ve,Ce=L.then(async Ge=>{if(ve=["resolve",Ge],la.isValidElement(Ge))re=!1,this.create({id:S,type:"default",message:Ge});else if(pie(Ge)&&!Ge.ok){re=!1;let Ke=typeof n.error=="function"?await n.error(`HTTP error! status: ${Ge.status}`):n.error,dt=typeof n.description=="function"?await n.description(`HTTP error! status: ${Ge.status}`):n.description;this.create({id:S,type:"error",message:Ke,description:dt})}else if(n.success!==void 0){re=!1;let Ke=typeof n.success=="function"?await n.success(Ge):n.success,dt=typeof n.description=="function"?await n.description(Ge):n.description;this.create({id:S,type:"success",message:Ke,description:dt})}}).catch(async Ge=>{if(ve=["reject",Ge],n.error!==void 0){re=!1;let Ke=typeof n.error=="function"?await n.error(Ge):n.error,dt=typeof n.description=="function"?await n.description(Ge):n.description;this.create({id:S,type:"error",message:Ke,description:dt})}}).finally(()=>{var Ge;re&&(this.dismiss(S),S=void 0),(Ge=n.finally)==null||Ge.call(n)}),Be=()=>new Promise((Ge,Ke)=>Ce.then(()=>ve[0]==="reject"?Ke(ve[1]):Ge(ve[1])).catch(Ke));return typeof S!="string"&&typeof S!="number"?{unwrap:Be}:Object.assign(S,{unwrap:Be})},this.custom=(e,n)=>{let S=n?.id||ZO++;return this.create({jsx:e(S),id:S,...n}),S},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},ym=new die,vie=(e,n)=>{let S=n?.id||ZO++;return ym.addToast({title:e,...n,id:S}),S},pie=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",mie=vie,gie=()=>ym.toasts,yie=()=>ym.getActiveToasts(),Il=Object.assign(mie,{success:ym.success,info:ym.info,warning:ym.warning,error:ym.error,custom:ym.custom,message:ym.message,promise:ym.promise,dismiss:ym.dismiss,loading:ym.loading},{getHistory:gie,getToasts:yie});function _ie(e,{insertAt:n}={}){if(typeof document>"u")return;let S=document.head||document.getElementsByTagName("head")[0],L=document.createElement("style");L.type="text/css",n==="top"&&S.firstChild?S.insertBefore(L,S.firstChild):S.appendChild(L),L.styleSheet?L.styleSheet.cssText=e:L.appendChild(document.createTextNode(e))}_ie(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
`);function v6(e){return e.label!==void 0}var xie=3,bie="32px",wie="16px",MB=4e3,Tie=356,Aie=14,Sie=20,Eie=200;function lg(...e){return e.filter(Boolean).join(" ")}function Mie(e){let[n,S]=e.split("-"),L=[];return n&&L.push(n),S&&L.push(S),L}var Cie=e=>{var n,S,L,re,ve,Ce,Be,Ge,Ke,dt,gt;let{invert:Vt,toast:Xt,unstyled:cr,interacting:sr,setHeights:nr,visibleToasts:zr,heights:Ne,index:Jr,toasts:pn,expanded:Lr,removeToast:Or,defaultRichColors:cn,closeButton:$n,style:xn,cancelButtonStyle:Wa,actionButtonStyle:On,className:qn="",descriptionClassName:ca="",duration:Fn,position:da,gap:ea,loadingIcon:qa,expandByDefault:Ri,classNames:mi,icons:Io,closeButtonAriaLabel:ya="Close toast",pauseWhenPageIsHidden:Wn}=e,[Ei,$i]=la.useState(null),[to,fi]=la.useState(null),[bo,Ll]=la.useState(!1),[Mo,Hs]=la.useState(!1),[qo,Di]=la.useState(!1),[js,Ha]=la.useState(!1),[El,ml]=la.useState(!1),[Vu,Gf]=la.useState(0),[zd,Nd]=la.useState(0),ad=la.useRef(Xt.duration||Fn||MB),jp=la.useRef(null),Up=la.useRef(null),ov=Jr===0,P1=Jr+1<=zr,Fv=Xt.type,I0=Xt.dismissible!==!1,L1=Xt.className||"",WT=Xt.descriptionClassName||"",xy=la.useMemo(()=>Ne.findIndex(lu=>lu.toastId===Xt.id)||0,[Ne,Xt.id]),YT=la.useMemo(()=>{var lu;return(lu=Xt.closeButton)!=null?lu:$n},[Xt.closeButton,$n]),Mw=la.useMemo(()=>Xt.duration||Fn||MB,[Xt.duration,Fn]),D0=la.useRef(0),wd=la.useRef(0),Am=la.useRef(0),Td=la.useRef(null),[ZT,$T]=da.split("-"),Cw=la.useMemo(()=>Ne.reduce((lu,cf,Xf)=>Xf>=xy?lu:lu+cf.height,0),[Ne,xy]),by=hie(),R1=Xt.invert||Vt,yg=Fv==="loading";wd.current=la.useMemo(()=>xy*ea+Cw,[xy,Cw]),la.useEffect(()=>{ad.current=Mw},[Mw]),la.useEffect(()=>{Ll(!0)},[]),la.useEffect(()=>{let lu=Up.current;if(lu){let cf=lu.getBoundingClientRect().height;return Nd(cf),nr(Xf=>[{toastId:Xt.id,height:cf,position:Xt.position},...Xf]),()=>nr(Xf=>Xf.filter(rp=>rp.toastId!==Xt.id))}},[nr,Xt.id]),la.useLayoutEffect(()=>{if(!bo)return;let lu=Up.current,cf=lu.style.height;lu.style.height="auto";let Xf=lu.getBoundingClientRect().height;lu.style.height=cf,Nd(Xf),nr(rp=>rp.find(xv=>xv.toastId===Xt.id)?rp.map(xv=>xv.toastId===Xt.id?{...xv,height:Xf}:xv):[{toastId:Xt.id,height:Xf,position:Xt.position},...rp])},[bo,Xt.title,Xt.description,nr,Xt.id]);let Bv=la.useCallback(()=>{Hs(!0),Gf(wd.current),nr(lu=>lu.filter(cf=>cf.toastId!==Xt.id)),setTimeout(()=>{Or(Xt)},Eie)},[Xt,Or,nr,wd]);la.useEffect(()=>{if(Xt.promise&&Fv==="loading"||Xt.duration===1/0||Xt.type==="loading")return;let lu;return Lr||sr||Wn&&by?(()=>{if(Am.current<D0.current){let cf=new Date().getTime()-D0.current;ad.current=ad.current-cf}Am.current=new Date().getTime()})():ad.current!==1/0&&(D0.current=new Date().getTime(),lu=setTimeout(()=>{var cf;(cf=Xt.onAutoClose)==null||cf.call(Xt,Xt),Bv()},ad.current)),()=>clearTimeout(lu)},[Lr,sr,Xt,Fv,Wn,by,Bv]),la.useEffect(()=>{Xt.delete&&Bv()},[Bv,Xt.delete]);function I1(){var lu,cf,Xf;return Io!=null&&Io.loading?la.createElement("div",{className:lg(mi?.loader,(lu=Xt?.classNames)==null?void 0:lu.loader,"sonner-loader"),"data-visible":Fv==="loading"},Io.loading):qa?la.createElement("div",{className:lg(mi?.loader,(cf=Xt?.classNames)==null?void 0:cf.loader,"sonner-loader"),"data-visible":Fv==="loading"},qa):la.createElement(oie,{className:lg(mi?.loader,(Xf=Xt?.classNames)==null?void 0:Xf.loader),visible:Fv==="loading"})}return la.createElement("li",{tabIndex:0,ref:Up,className:lg(qn,L1,mi?.toast,(n=Xt?.classNames)==null?void 0:n.toast,mi?.default,mi?.[Fv],(S=Xt?.classNames)==null?void 0:S[Fv]),"data-sonner-toast":"","data-rich-colors":(L=Xt.richColors)!=null?L:cn,"data-styled":!(Xt.jsx||Xt.unstyled||cr),"data-mounted":bo,"data-promise":!!Xt.promise,"data-swiped":El,"data-removed":Mo,"data-visible":P1,"data-y-position":ZT,"data-x-position":$T,"data-index":Jr,"data-front":ov,"data-swiping":qo,"data-dismissible":I0,"data-type":Fv,"data-invert":R1,"data-swipe-out":js,"data-swipe-direction":to,"data-expanded":!!(Lr||Ri&&bo),style:{"--index":Jr,"--toasts-before":Jr,"--z-index":pn.length-Jr,"--offset":`${Mo?Vu:wd.current}px`,"--initial-height":Ri?"auto":`${zd}px`,...xn,...Xt.style},onDragEnd:()=>{Di(!1),$i(null),Td.current=null},onPointerDown:lu=>{yg||!I0||(jp.current=new Date,Gf(wd.current),lu.target.setPointerCapture(lu.pointerId),lu.target.tagName!=="BUTTON"&&(Di(!0),Td.current={x:lu.clientX,y:lu.clientY}))},onPointerUp:()=>{var lu,cf,Xf,rp;if(js||!I0)return;Td.current=null;let xv=Number(((lu=Up.current)==null?void 0:lu.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),r0=Number(((cf=Up.current)==null?void 0:cf.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),n0=new Date().getTime()-((Xf=jp.current)==null?void 0:Xf.getTime()),np=Ei==="x"?xv:r0,qp=Math.abs(np)/n0;if(Math.abs(np)>=Sie||qp>.11){Gf(wd.current),(rp=Xt.onDismiss)==null||rp.call(Xt,Xt),fi(Ei==="x"?xv>0?"right":"left":r0>0?"down":"up"),Bv(),Ha(!0),ml(!1);return}Di(!1),$i(null)},onPointerMove:lu=>{var cf,Xf,rp,xv;if(!Td.current||!I0||((cf=window.getSelection())==null?void 0:cf.toString().length)>0)return;let r0=lu.clientY-Td.current.y,n0=lu.clientX-Td.current.x,np=(Xf=e.swipeDirections)!=null?Xf:Mie(da);!Ei&&(Math.abs(n0)>1||Math.abs(r0)>1)&&$i(Math.abs(n0)>Math.abs(r0)?"x":"y");let qp={x:0,y:0};Ei==="y"?(np.includes("top")||np.includes("bottom"))&&(np.includes("top")&&r0<0||np.includes("bottom")&&r0>0)&&(qp.y=r0):Ei==="x"&&(np.includes("left")||np.includes("right"))&&(np.includes("left")&&n0<0||np.includes("right")&&n0>0)&&(qp.x=n0),(Math.abs(qp.x)>0||Math.abs(qp.y)>0)&&ml(!0),(rp=Up.current)==null||rp.style.setProperty("--swipe-amount-x",`${qp.x}px`),(xv=Up.current)==null||xv.style.setProperty("--swipe-amount-y",`${qp.y}px`)}},YT&&!Xt.jsx?la.createElement("button",{"aria-label":ya,"data-disabled":yg,"data-close-button":!0,onClick:yg||!I0?()=>{}:()=>{var lu;Bv(),(lu=Xt.onDismiss)==null||lu.call(Xt,Xt)},className:lg(mi?.closeButton,(re=Xt?.classNames)==null?void 0:re.closeButton)},(ve=Io?.close)!=null?ve:fie):null,Xt.jsx||na.isValidElement(Xt.title)?Xt.jsx?Xt.jsx:typeof Xt.title=="function"?Xt.title():Xt.title:la.createElement(la.Fragment,null,Fv||Xt.icon||Xt.promise?la.createElement("div",{"data-icon":"",className:lg(mi?.icon,(Ce=Xt?.classNames)==null?void 0:Ce.icon)},Xt.promise||Xt.type==="loading"&&!Xt.icon?Xt.icon||I1():null,Xt.type!=="loading"?Xt.icon||Io?.[Fv]||aie(Fv):null):null,la.createElement("div",{"data-content":"",className:lg(mi?.content,(Be=Xt?.classNames)==null?void 0:Be.content)},la.createElement("div",{"data-title":"",className:lg(mi?.title,(Ge=Xt?.classNames)==null?void 0:Ge.title)},typeof Xt.title=="function"?Xt.title():Xt.title),Xt.description?la.createElement("div",{"data-description":"",className:lg(ca,WT,mi?.description,(Ke=Xt?.classNames)==null?void 0:Ke.description)},typeof Xt.description=="function"?Xt.description():Xt.description):null),na.isValidElement(Xt.cancel)?Xt.cancel:Xt.cancel&&v6(Xt.cancel)?la.createElement("button",{"data-button":!0,"data-cancel":!0,style:Xt.cancelButtonStyle||Wa,onClick:lu=>{var cf,Xf;v6(Xt.cancel)&&I0&&((Xf=(cf=Xt.cancel).onClick)==null||Xf.call(cf,lu),Bv())},className:lg(mi?.cancelButton,(dt=Xt?.classNames)==null?void 0:dt.cancelButton)},Xt.cancel.label):null,na.isValidElement(Xt.action)?Xt.action:Xt.action&&v6(Xt.action)?la.createElement("button",{"data-button":!0,"data-action":!0,style:Xt.actionButtonStyle||On,onClick:lu=>{var cf,Xf;v6(Xt.action)&&((Xf=(cf=Xt.action).onClick)==null||Xf.call(cf,lu),!lu.defaultPrevented&&Bv())},className:lg(mi?.actionButton,(gt=Xt?.classNames)==null?void 0:gt.actionButton)},Xt.action.label):null))};function CB(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function kie(e,n){let S={};return[e,n].forEach((L,re)=>{let ve=re===1,Ce=ve?"--mobile-offset":"--offset",Be=ve?wie:bie;function Ge(Ke){["top","right","bottom","left"].forEach(dt=>{S[`${Ce}-${dt}`]=typeof Ke=="number"?`${Ke}px`:Ke})}typeof L=="number"||typeof L=="string"?Ge(L):typeof L=="object"?["top","right","bottom","left"].forEach(Ke=>{L[Ke]===void 0?S[`${Ce}-${Ke}`]=Be:S[`${Ce}-${Ke}`]=typeof L[Ke]=="number"?`${L[Ke]}px`:L[Ke]}):Ge(Be)}),S}var QX=na.forwardRef(function(e,n){let{invert:S,position:L="bottom-right",hotkey:re=["altKey","KeyT"],expand:ve,closeButton:Ce,className:Be,offset:Ge,mobileOffset:Ke,theme:dt="light",richColors:gt,duration:Vt,style:Xt,visibleToasts:cr=xie,toastOptions:sr,dir:nr=CB(),gap:zr=Aie,loadingIcon:Ne,icons:Jr,containerAriaLabel:pn="Notifications",pauseWhenPageIsHidden:Lr}=e,[Or,cn]=la.useState([]),$n=la.useMemo(()=>Array.from(new Set([L].concat(Or.filter(Wn=>Wn.position).map(Wn=>Wn.position)))),[Or,L]),[xn,Wa]=la.useState([]),[On,qn]=la.useState(!1),[ca,Fn]=la.useState(!1),[da,ea]=la.useState(dt!=="system"?dt:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),qa=la.useRef(null),Ri=re.join("+").replace(/Key/g,"").replace(/Digit/g,""),mi=la.useRef(null),Io=la.useRef(!1),ya=la.useCallback(Wn=>{cn(Ei=>{var $i;return($i=Ei.find(to=>to.id===Wn.id))!=null&&$i.delete||ym.dismiss(Wn.id),Ei.filter(({id:to})=>to!==Wn.id)})},[]);return la.useEffect(()=>ym.subscribe(Wn=>{if(Wn.dismiss){cn(Ei=>Ei.map($i=>$i.id===Wn.id?{...$i,delete:!0}:$i));return}setTimeout(()=>{nie.flushSync(()=>{cn(Ei=>{let $i=Ei.findIndex(to=>to.id===Wn.id);return $i!==-1?[...Ei.slice(0,$i),{...Ei[$i],...Wn},...Ei.slice($i+1)]:[Wn,...Ei]})})})}),[]),la.useEffect(()=>{if(dt!=="system"){ea(dt);return}if(dt==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?ea("dark"):ea("light")),typeof window>"u")return;let Wn=window.matchMedia("(prefers-color-scheme: dark)");try{Wn.addEventListener("change",({matches:Ei})=>{ea(Ei?"dark":"light")})}catch{Wn.addListener(({matches:$i})=>{try{ea($i?"dark":"light")}catch(to){console.error(to)}})}},[dt]),la.useEffect(()=>{Or.length<=1&&qn(!1)},[Or]),la.useEffect(()=>{let Wn=Ei=>{var $i,to;re.every(fi=>Ei[fi]||Ei.code===fi)&&(qn(!0),($i=qa.current)==null||$i.focus()),Ei.code==="Escape"&&(document.activeElement===qa.current||(to=qa.current)!=null&&to.contains(document.activeElement))&&qn(!1)};return document.addEventListener("keydown",Wn),()=>document.removeEventListener("keydown",Wn)},[re]),la.useEffect(()=>{if(qa.current)return()=>{mi.current&&(mi.current.focus({preventScroll:!0}),mi.current=null,Io.current=!1)}},[qa.current]),la.createElement("section",{ref:n,"aria-label":`${pn} ${Ri}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},$n.map((Wn,Ei)=>{var $i;let[to,fi]=Wn.split("-");return Or.length?la.createElement("ol",{key:Wn,dir:nr==="auto"?CB():nr,tabIndex:-1,ref:qa,className:Be,"data-sonner-toaster":!0,"data-theme":da,"data-y-position":to,"data-lifted":On&&Or.length>1&&!ve,"data-x-position":fi,style:{"--front-toast-height":`${(($i=xn[0])==null?void 0:$i.height)||0}px`,"--width":`${Tie}px`,"--gap":`${zr}px`,...Xt,...kie(Ge,Ke)},onBlur:bo=>{Io.current&&!bo.currentTarget.contains(bo.relatedTarget)&&(Io.current=!1,mi.current&&(mi.current.focus({preventScroll:!0}),mi.current=null))},onFocus:bo=>{bo.target instanceof HTMLElement&&bo.target.dataset.dismissible==="false"||Io.current||(Io.current=!0,mi.current=bo.relatedTarget)},onMouseEnter:()=>qn(!0),onMouseMove:()=>qn(!0),onMouseLeave:()=>{ca||qn(!1)},onDragEnd:()=>qn(!1),onPointerDown:bo=>{bo.target instanceof HTMLElement&&bo.target.dataset.dismissible==="false"||Fn(!0)},onPointerUp:()=>Fn(!1)},Or.filter(bo=>!bo.position&&Ei===0||bo.position===Wn).map((bo,Ll)=>{var Mo,Hs;return la.createElement(Cie,{key:bo.id,icons:Jr,index:Ll,toast:bo,defaultRichColors:gt,duration:(Mo=sr?.duration)!=null?Mo:Vt,className:sr?.className,descriptionClassName:sr?.descriptionClassName,invert:S,visibleToasts:cr,closeButton:(Hs=sr?.closeButton)!=null?Hs:Ce,interacting:ca,position:Wn,style:sr?.style,unstyled:sr?.unstyled,classNames:sr?.classNames,cancelButtonStyle:sr?.cancelButtonStyle,actionButtonStyle:sr?.actionButtonStyle,removeToast:ya,toasts:Or.filter(qo=>qo.position==bo.position),heights:xn.filter(qo=>qo.position==bo.position),setHeights:Wa,expandByDefault:ve,gap:zr,loadingIcon:Ne,expanded:On,pauseWhenPageIsHidden:Lr,swipeDirections:e.swipeDirections})})):null}))});const Pie=Object.freeze(Object.defineProperty({__proto__:null,Toaster:QX,toast:Il},Symbol.toStringTag,{value:"Module"}));var OT=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Lie={setTimeout:(e,n)=>setTimeout(e,n),clearTimeout:e=>clearTimeout(e),setInterval:(e,n)=>setInterval(e,n),clearInterval:e=>clearInterval(e)},Rie=class{#e=Lie;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,n){return this.#e.setTimeout(e,n)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,n){return this.#e.setInterval(e,n)}clearInterval(e){this.#e.clearInterval(e)}},rw=new Rie;function Iie(e){setTimeout(e,0)}var dw=typeof window>"u"||"Deno"in globalThis;function rm(){}function Die(e,n){return typeof e=="function"?e(n):e}function $O(e){return typeof e=="number"&&e>=0&&e!==1/0}function eW(e,n){return Math.max(e+(n||0)-Date.now(),0)}function sx(e,n){return typeof e=="function"?e(n):e}function C0(e,n){return typeof e=="function"?e(n):e}function kB(e,n){const{type:S="all",exact:L,fetchStatus:re,predicate:ve,queryKey:Ce,stale:Be}=e;if(Ce){if(L){if(n.queryHash!==M7(Ce,n.options))return!1}else if(!rE(n.queryKey,Ce))return!1}if(S!=="all"){const Ge=n.isActive();if(S==="active"&&!Ge||S==="inactive"&&Ge)return!1}return!(typeof Be=="boolean"&&n.isStale()!==Be||re&&re!==n.state.fetchStatus||ve&&!ve(n))}function PB(e,n){const{exact:S,status:L,predicate:re,mutationKey:ve}=e;if(ve){if(!n.options.mutationKey)return!1;if(S){if(vw(n.options.mutationKey)!==vw(ve))return!1}else if(!rE(n.options.mutationKey,ve))return!1}return!(L&&n.state.status!==L||re&&!re(n))}function M7(e,n){return(n?.queryKeyHashFn||vw)(e)}function vw(e){return JSON.stringify(e,(n,S)=>KO(S)?Object.keys(S).sort().reduce((L,re)=>(L[re]=S[re],L),{}):S)}function rE(e,n){return e===n?!0:typeof e!=typeof n?!1:e&&n&&typeof e=="object"&&typeof n=="object"?Object.keys(n).every(S=>rE(e[S],n[S])):!1}var Oie=Object.prototype.hasOwnProperty;function tW(e,n){if(e===n)return e;const S=LB(e)&&LB(n);if(!S&&!(KO(e)&&KO(n)))return n;const re=(S?e:Object.keys(e)).length,ve=S?n:Object.keys(n),Ce=ve.length,Be=S?new Array(Ce):{};let Ge=0;for(let Ke=0;Ke<Ce;Ke++){const dt=S?Ke:ve[Ke],gt=e[dt],Vt=n[dt];if(gt===Vt){Be[dt]=gt,(S?Ke<re:Oie.call(e,dt))&&Ge++;continue}if(gt===null||Vt===null||typeof gt!="object"||typeof Vt!="object"){Be[dt]=Vt;continue}const Xt=tW(gt,Vt);Be[dt]=Xt,Xt===gt&&Ge++}return re===Ce&&Ge===re?e:Be}function D6(e,n){if(!n||Object.keys(e).length!==Object.keys(n).length)return!1;for(const S in e)if(e[S]!==n[S])return!1;return!0}function LB(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function KO(e){if(!RB(e))return!1;const n=e.constructor;if(n===void 0)return!0;const S=n.prototype;return!(!RB(S)||!S.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function RB(e){return Object.prototype.toString.call(e)==="[object Object]"}function zie(e){return new Promise(n=>{rw.setTimeout(n,e)})}function JO(e,n,S){return typeof S.structuralSharing=="function"?S.structuralSharing(e,n):S.structuralSharing!==!1?tW(e,n):n}function Nie(e,n,S=0){const L=[...e,n];return S&&L.length>S?L.slice(1):L}function Fie(e,n,S=0){const L=[n,...e];return S&&L.length>S?L.slice(0,-1):L}var C7=Symbol();function rW(e,n){return!e.queryFn&&n?.initialPromise?()=>n.initialPromise:!e.queryFn||e.queryFn===C7?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function nW(e,n){return typeof e=="function"?e(...n):!!e}var Bie=class extends OT{#e;#t;#r;constructor(){super(),this.#r=e=>{if(!dw&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},k7=new Bie;function QO(){let e,n;const S=new Promise((re,ve)=>{e=re,n=ve});S.status="pending",S.catch(()=>{});function L(re){Object.assign(S,re),delete S.resolve,delete S.reject}return S.resolve=re=>{L({status:"fulfilled",value:re}),e(re)},S.reject=re=>{L({status:"rejected",reason:re}),n(re)},S}var jie=Iie;function Uie(){let e=[],n=0,S=Be=>{Be()},L=Be=>{Be()},re=jie;const ve=Be=>{n?e.push(Be):re(()=>{S(Be)})},Ce=()=>{const Be=e;e=[],Be.length&&re(()=>{L(()=>{Be.forEach(Ge=>{S(Ge)})})})};return{batch:Be=>{let Ge;n++;try{Ge=Be()}finally{n--,n||Ce()}return Ge},batchCalls:Be=>(...Ge)=>{ve(()=>{Be(...Ge)})},schedule:ve,setNotifyFunction:Be=>{S=Be},setBatchNotifyFunction:Be=>{L=Be},setScheduler:Be=>{re=Be}}}var Dv=Uie(),qie=class extends OT{#e=!0;#t;#r;constructor(){super(),this.#r=e=>{if(!dw&&window.addEventListener){const n=()=>e(!0),S=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",S,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",S)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(S=>{S(e)}))}isOnline(){return this.#e}},O6=new qie;function Vie(e){return Math.min(1e3*2**e,3e4)}function aW(e){return(e??"online")==="online"?O6.isOnline():!0}var ez=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function iW(e){let n=!1,S=0,L;const re=QO(),ve=()=>re.status!=="pending",Ce=sr=>{if(!ve()){const nr=new ez(sr);Vt(nr),e.onCancel?.(nr)}},Be=()=>{n=!0},Ge=()=>{n=!1},Ke=()=>k7.isFocused()&&(e.networkMode==="always"||O6.isOnline())&&e.canRun(),dt=()=>aW(e.networkMode)&&e.canRun(),gt=sr=>{ve()||(L?.(),re.resolve(sr))},Vt=sr=>{ve()||(L?.(),re.reject(sr))},Xt=()=>new Promise(sr=>{L=nr=>{(ve()||Ke())&&sr(nr)},e.onPause?.()}).then(()=>{L=void 0,ve()||e.onContinue?.()}),cr=()=>{if(ve())return;let sr;const nr=S===0?e.initialPromise:void 0;try{sr=nr??e.fn()}catch(zr){sr=Promise.reject(zr)}Promise.resolve(sr).then(gt).catch(zr=>{if(ve())return;const Ne=e.retry??(dw?0:3),Jr=e.retryDelay??Vie,pn=typeof Jr=="function"?Jr(S,zr):Jr,Lr=Ne===!0||typeof Ne=="number"&&S<Ne||typeof Ne=="function"&&Ne(S,zr);if(n||!Lr){Vt(zr);return}S++,e.onFail?.(S,zr),zie(pn).then(()=>Ke()?void 0:Xt()).then(()=>{n?Vt(zr):cr()})})};return{promise:re,status:()=>re.status,cancel:Ce,continue:()=>(L?.(),re),cancelRetry:Be,continueRetry:Ge,canStart:dt,start:()=>(dt()?cr():Xt().then(cr),re)}}var oW=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),$O(this.gcTime)&&(this.#e=rw.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(dw?1/0:300*1e3))}clearGcTimeout(){this.#e&&(rw.clearTimeout(this.#e),this.#e=void 0)}},Hie=class extends oW{#e;#t;#r;#a;#n;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#a=e.client,this.#r=this.#a.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=DB(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#n?.promise}setOptions(e){if(this.options={...this.#o,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=DB(this.options);n.data!==void 0&&(this.setState(IB(n.data,n.dataUpdatedAt)),this.#e=n)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(e,n){const S=JO(this.state.data,e,this.options);return this.#i({data:S,type:"success",dataUpdatedAt:n?.updatedAt,manual:n?.manual}),S}setState(e,n){this.#i({type:"setState",state:e,setStateOptions:n})}cancel(e){const n=this.#n?.promise;return this.#n?.cancel(e),n?n.then(rm).catch(rm):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>C0(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===C7||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>sx(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!eW(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(n=>n.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#n?.continue()}onOnline(){this.observers.find(n=>n.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#n?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(n=>n!==e),this.observers.length||(this.#n&&(this.#s?this.#n.cancel({revert:!0}):this.#n.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#i({type:"invalidate"})}async fetch(e,n){if(this.state.fetchStatus!=="idle"&&this.#n?.status()!=="rejected"){if(this.state.data!==void 0&&n?.cancelRefetch)this.cancel({silent:!0});else if(this.#n)return this.#n.continueRetry(),this.#n.promise}if(e&&this.setOptions(e),!this.options.queryFn){const Be=this.observers.find(Ge=>Ge.options.queryFn);Be&&this.setOptions(Be.options)}const S=new AbortController,L=Be=>{Object.defineProperty(Be,"signal",{enumerable:!0,get:()=>(this.#s=!0,S.signal)})},re=()=>{const Be=rW(this.options,n),Ke=(()=>{const dt={client:this.#a,queryKey:this.queryKey,meta:this.meta};return L(dt),dt})();return this.#s=!1,this.options.persister?this.options.persister(Be,Ke,this):Be(Ke)},Ce=(()=>{const Be={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:this.#a,state:this.state,fetchFn:re};return L(Be),Be})();this.options.behavior?.onFetch(Ce,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==Ce.fetchOptions?.meta)&&this.#i({type:"fetch",meta:Ce.fetchOptions?.meta}),this.#n=iW({initialPromise:n?.initialPromise,fn:Ce.fetchFn,onCancel:Be=>{Be instanceof ez&&Be.revert&&this.setState({...this.#t,fetchStatus:"idle"}),S.abort()},onFail:(Be,Ge)=>{this.#i({type:"failed",failureCount:Be,error:Ge})},onPause:()=>{this.#i({type:"pause"})},onContinue:()=>{this.#i({type:"continue"})},retry:Ce.options.retry,retryDelay:Ce.options.retryDelay,networkMode:Ce.options.networkMode,canRun:()=>!0});try{const Be=await this.#n.start();if(Be===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(Be),this.#r.config.onSuccess?.(Be,this),this.#r.config.onSettled?.(Be,this.state.error,this),Be}catch(Be){if(Be instanceof ez){if(Be.silent)return this.#n.promise;if(Be.revert){if(this.state.data===void 0)throw Be;return this.state.data}}throw this.#i({type:"error",error:Be}),this.#r.config.onError?.(Be,this),this.#r.config.onSettled?.(this.state.data,Be,this),Be}finally{this.scheduleGc()}}#i(e){const n=S=>{switch(e.type){case"failed":return{...S,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...S,fetchStatus:"paused"};case"continue":return{...S,fetchStatus:"fetching"};case"fetch":return{...S,...sW(S.data,this.options),fetchMeta:e.meta??null};case"success":const L={...S,...IB(e.data,e.dataUpdatedAt),dataUpdateCount:S.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?L:void 0,L;case"error":const re=e.error;return{...S,error:re,errorUpdateCount:S.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:S.fetchFailureCount+1,fetchFailureReason:re,fetchStatus:"idle",status:"error"};case"invalidate":return{...S,isInvalidated:!0};case"setState":return{...S,...e.state}}};this.state=n(this.state),Dv.batch(()=>{this.observers.forEach(S=>{S.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:e})})}};function sW(e,n){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:aW(n.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function IB(e,n){return{data:e,dataUpdatedAt:n??Date.now(),error:null,isInvalidated:!1,status:"success"}}function DB(e){const n=typeof e.initialData=="function"?e.initialData():e.initialData,S=n!==void 0,L=S?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:n,dataUpdateCount:0,dataUpdatedAt:S?L??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:S?"success":"pending",fetchStatus:"idle"}}var Gie=class extends OT{constructor(e,n){super(),this.options=n,this.#e=e,this.#i=null,this.#s=QO(),this.bindMethods(),this.setOptions(n)}#e;#t=void 0;#r=void 0;#a=void 0;#n;#o;#s;#i;#p;#h;#d;#u;#c;#l;#v=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),OB(this.#t,this.options)?this.#f():this.updateResult(),this.#_())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return tz(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return tz(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#x(),this.#b(),this.#t.removeObserver(this)}setOptions(e){const n=this.options,S=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof C0(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#w(),this.#t.setOptions(this.options),n._defaulted&&!D6(this.options,n)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const L=this.hasListeners();L&&zB(this.#t,S,this.options,n)&&this.#f(),this.updateResult(),L&&(this.#t!==S||C0(this.options.enabled,this.#t)!==C0(n.enabled,this.#t)||sx(this.options.staleTime,this.#t)!==sx(n.staleTime,this.#t))&&this.#m();const re=this.#g();L&&(this.#t!==S||C0(this.options.enabled,this.#t)!==C0(n.enabled,this.#t)||re!==this.#l)&&this.#y(re)}getOptimisticResult(e){const n=this.#e.getQueryCache().build(this.#e,e),S=this.createResult(n,e);return Wie(this,S)&&(this.#a=S,this.#o=this.options,this.#n=this.#t.state),S}getCurrentResult(){return this.#a}trackResult(e,n){return new Proxy(e,{get:(S,L)=>(this.trackProp(L),n?.(L),L==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#s.status==="pending"&&this.#s.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(S,L))})}trackProp(e){this.#v.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const n=this.#e.defaultQueryOptions(e),S=this.#e.getQueryCache().build(this.#e,n);return S.fetch().then(()=>this.createResult(S,n))}fetch(e){return this.#f({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#a))}#f(e){this.#w();let n=this.#t.fetch(this.options,e);return e?.throwOnError||(n=n.catch(rm)),n}#m(){this.#x();const e=sx(this.options.staleTime,this.#t);if(dw||this.#a.isStale||!$O(e))return;const S=eW(this.#a.dataUpdatedAt,e)+1;this.#u=rw.setTimeout(()=>{this.#a.isStale||this.updateResult()},S)}#g(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(e){this.#b(),this.#l=e,!(dw||C0(this.options.enabled,this.#t)===!1||!$O(this.#l)||this.#l===0)&&(this.#c=rw.setInterval(()=>{(this.options.refetchIntervalInBackground||k7.isFocused())&&this.#f()},this.#l))}#_(){this.#m(),this.#y(this.#g())}#x(){this.#u&&(rw.clearTimeout(this.#u),this.#u=void 0)}#b(){this.#c&&(rw.clearInterval(this.#c),this.#c=void 0)}createResult(e,n){const S=this.#t,L=this.options,re=this.#a,ve=this.#n,Ce=this.#o,Ge=e!==S?e.state:this.#r,{state:Ke}=e;let dt={...Ke},gt=!1,Vt;if(n._optimisticResults){const $n=this.hasListeners(),xn=!$n&&OB(e,n),Wa=$n&&zB(e,S,n,L);(xn||Wa)&&(dt={...dt,...sW(Ke.data,e.options)}),n._optimisticResults==="isRestoring"&&(dt.fetchStatus="idle")}let{error:Xt,errorUpdatedAt:cr,status:sr}=dt;Vt=dt.data;let nr=!1;if(n.placeholderData!==void 0&&Vt===void 0&&sr==="pending"){let $n;re?.isPlaceholderData&&n.placeholderData===Ce?.placeholderData?($n=re.data,nr=!0):$n=typeof n.placeholderData=="function"?n.placeholderData(this.#d?.state.data,this.#d):n.placeholderData,$n!==void 0&&(sr="success",Vt=JO(re?.data,$n,n),gt=!0)}if(n.select&&Vt!==void 0&&!nr)if(re&&Vt===ve?.data&&n.select===this.#p)Vt=this.#h;else try{this.#p=n.select,Vt=n.select(Vt),Vt=JO(re?.data,Vt,n),this.#h=Vt,this.#i=null}catch($n){this.#i=$n}this.#i&&(Xt=this.#i,Vt=this.#h,cr=Date.now(),sr="error");const zr=dt.fetchStatus==="fetching",Ne=sr==="pending",Jr=sr==="error",pn=Ne&&zr,Lr=Vt!==void 0,cn={status:sr,fetchStatus:dt.fetchStatus,isPending:Ne,isSuccess:sr==="success",isError:Jr,isInitialLoading:pn,isLoading:pn,data:Vt,dataUpdatedAt:dt.dataUpdatedAt,error:Xt,errorUpdatedAt:cr,failureCount:dt.fetchFailureCount,failureReason:dt.fetchFailureReason,errorUpdateCount:dt.errorUpdateCount,isFetched:dt.dataUpdateCount>0||dt.errorUpdateCount>0,isFetchedAfterMount:dt.dataUpdateCount>Ge.dataUpdateCount||dt.errorUpdateCount>Ge.errorUpdateCount,isFetching:zr,isRefetching:zr&&!Ne,isLoadingError:Jr&&!Lr,isPaused:dt.fetchStatus==="paused",isPlaceholderData:gt,isRefetchError:Jr&&Lr,isStale:P7(e,n),refetch:this.refetch,promise:this.#s,isEnabled:C0(n.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const $n=On=>{cn.status==="error"?On.reject(cn.error):cn.data!==void 0&&On.resolve(cn.data)},xn=()=>{const On=this.#s=cn.promise=QO();$n(On)},Wa=this.#s;switch(Wa.status){case"pending":e.queryHash===S.queryHash&&$n(Wa);break;case"fulfilled":(cn.status==="error"||cn.data!==Wa.value)&&xn();break;case"rejected":(cn.status!=="error"||cn.error!==Wa.reason)&&xn();break}}return cn}updateResult(){const e=this.#a,n=this.createResult(this.#t,this.options);if(this.#n=this.#t.state,this.#o=this.options,this.#n.data!==void 0&&(this.#d=this.#t),D6(n,e))return;this.#a=n;const S=()=>{if(!e)return!0;const{notifyOnChangeProps:L}=this.options,re=typeof L=="function"?L():L;if(re==="all"||!re&&!this.#v.size)return!0;const ve=new Set(re??this.#v);return this.options.throwOnError&&ve.add("error"),Object.keys(this.#a).some(Ce=>{const Be=Ce;return this.#a[Be]!==e[Be]&&ve.has(Be)})};this.#T({listeners:S()})}#w(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const n=this.#t;this.#t=e,this.#r=e.state,this.hasListeners()&&(n?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#_()}#T(e){Dv.batch(()=>{e.listeners&&this.listeners.forEach(n=>{n(this.#a)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function Xie(e,n){return C0(n.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&n.retryOnMount===!1)}function OB(e,n){return Xie(e,n)||e.state.data!==void 0&&tz(e,n,n.refetchOnMount)}function tz(e,n,S){if(C0(n.enabled,e)!==!1&&sx(n.staleTime,e)!=="static"){const L=typeof S=="function"?S(e):S;return L==="always"||L!==!1&&P7(e,n)}return!1}function zB(e,n,S,L){return(e!==n||C0(L.enabled,e)===!1)&&(!S.suspense||e.state.status!=="error")&&P7(e,S)}function P7(e,n){return C0(n.enabled,e)!==!1&&e.isStaleByTime(sx(n.staleTime,e))}function Wie(e,n){return!D6(e.getCurrentResult(),n)}function NB(e){return{onFetch:(n,S)=>{const L=n.options,re=n.fetchOptions?.meta?.fetchMore?.direction,ve=n.state.data?.pages||[],Ce=n.state.data?.pageParams||[];let Be={pages:[],pageParams:[]},Ge=0;const Ke=async()=>{let dt=!1;const gt=cr=>{Object.defineProperty(cr,"signal",{enumerable:!0,get:()=>(n.signal.aborted?dt=!0:n.signal.addEventListener("abort",()=>{dt=!0}),n.signal)})},Vt=rW(n.options,n.fetchOptions),Xt=async(cr,sr,nr)=>{if(dt)return Promise.reject();if(sr==null&&cr.pages.length)return Promise.resolve(cr);const Ne=(()=>{const Or={client:n.client,queryKey:n.queryKey,pageParam:sr,direction:nr?"backward":"forward",meta:n.options.meta};return gt(Or),Or})(),Jr=await Vt(Ne),{maxPages:pn}=n.options,Lr=nr?Fie:Nie;return{pages:Lr(cr.pages,Jr,pn),pageParams:Lr(cr.pageParams,sr,pn)}};if(re&&ve.length){const cr=re==="backward",sr=cr?Yie:FB,nr={pages:ve,pageParams:Ce},zr=sr(L,nr);Be=await Xt(nr,zr,cr)}else{const cr=e??ve.length;do{const sr=Ge===0?Ce[0]??L.initialPageParam:FB(L,Be);if(Ge>0&&sr==null)break;Be=await Xt(Be,sr),Ge++}while(Ge<cr)}return Be};n.options.persister?n.fetchFn=()=>n.options.persister?.(Ke,{client:n.client,queryKey:n.queryKey,meta:n.options.meta,signal:n.signal},S):n.fetchFn=Ke}}}function FB(e,{pages:n,pageParams:S}){const L=n.length-1;return n.length>0?e.getNextPageParam(n[L],n,S[L],S):void 0}function Yie(e,{pages:n,pageParams:S}){return n.length>0?e.getPreviousPageParam?.(n[0],n,S[0],S):void 0}var Zie=class extends oW{#e;#t;#r;#a;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#r=e.mutationCache,this.#t=[],this.state=e.state||lW(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(n=>n!==e),this.scheduleGc(),this.#r.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#r.remove(this))}continue(){return this.#a?.continue()??this.execute(this.state.variables)}async execute(e){const n=()=>{this.#n({type:"continue"})},S={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#a=iW({fn:()=>this.options.mutationFn?this.options.mutationFn(e,S):Promise.reject(new Error("No mutationFn found")),onFail:(ve,Ce)=>{this.#n({type:"failed",failureCount:ve,error:Ce})},onPause:()=>{this.#n({type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#r.canRun(this)});const L=this.state.status==="pending",re=!this.#a.canStart();try{if(L)n();else{this.#n({type:"pending",variables:e,isPaused:re}),await this.#r.config.onMutate?.(e,this,S);const Ce=await this.options.onMutate?.(e,S);Ce!==this.state.context&&this.#n({type:"pending",context:Ce,variables:e,isPaused:re})}const ve=await this.#a.start();return await this.#r.config.onSuccess?.(ve,e,this.state.context,this,S),await this.options.onSuccess?.(ve,e,this.state.context,S),await this.#r.config.onSettled?.(ve,null,this.state.variables,this.state.context,this,S),await this.options.onSettled?.(ve,null,e,this.state.context,S),this.#n({type:"success",data:ve}),ve}catch(ve){try{throw await this.#r.config.onError?.(ve,e,this.state.context,this,S),await this.options.onError?.(ve,e,this.state.context,S),await this.#r.config.onSettled?.(void 0,ve,this.state.variables,this.state.context,this,S),await this.options.onSettled?.(void 0,ve,e,this.state.context,S),ve}finally{this.#n({type:"error",error:ve})}}finally{this.#r.runNext(this)}}#n(e){const n=S=>{switch(e.type){case"failed":return{...S,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...S,isPaused:!0};case"continue":return{...S,isPaused:!1};case"pending":return{...S,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...S,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...S,data:void 0,error:e.error,failureCount:S.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Dv.batch(()=>{this.#t.forEach(S=>{S.onMutationUpdate(e)}),this.#r.notify({mutation:this,type:"updated",action:e})})}};function lW(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var $ie=class extends OT{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#r=0}#e;#t;#r;build(e,n,S){const L=new Zie({client:e,mutationCache:this,mutationId:++this.#r,options:e.defaultMutationOptions(n),state:S});return this.add(L),L}add(e){this.#e.add(e);const n=p6(e);if(typeof n=="string"){const S=this.#t.get(n);S?S.push(e):this.#t.set(n,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const n=p6(e);if(typeof n=="string"){const S=this.#t.get(n);if(S)if(S.length>1){const L=S.indexOf(e);L!==-1&&S.splice(L,1)}else S[0]===e&&this.#t.delete(n)}}this.notify({type:"removed",mutation:e})}canRun(e){const n=p6(e);if(typeof n=="string"){const L=this.#t.get(n)?.find(re=>re.state.status==="pending");return!L||L===e}else return!0}runNext(e){const n=p6(e);return typeof n=="string"?this.#t.get(n)?.find(L=>L!==e&&L.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Dv.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const n={exact:!0,...e};return this.getAll().find(S=>PB(n,S))}findAll(e={}){return this.getAll().filter(n=>PB(e,n))}notify(e){Dv.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return Dv.batch(()=>Promise.all(e.map(n=>n.continue().catch(rm))))}};function p6(e){return e.options.scope?.id}var Kie=class extends OT{#e;#t=void 0;#r;#a;constructor(n,S){super(),this.#e=n,this.setOptions(S),this.bindMethods(),this.#n()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){const S=this.options;this.options=this.#e.defaultMutationOptions(n),D6(this.options,S)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),S?.mutationKey&&this.options.mutationKey&&vw(S.mutationKey)!==vw(this.options.mutationKey)?this.reset():this.#r?.state.status==="pending"&&this.#r.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#r?.removeObserver(this)}onMutationUpdate(n){this.#n(),this.#o(n)}getCurrentResult(){return this.#t}reset(){this.#r?.removeObserver(this),this.#r=void 0,this.#n(),this.#o()}mutate(n,S){return this.#a=S,this.#r?.removeObserver(this),this.#r=this.#e.getMutationCache().build(this.#e,this.options),this.#r.addObserver(this),this.#r.execute(n)}#n(){const n=this.#r?.state??lW();this.#t={...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset}}#o(n){Dv.batch(()=>{if(this.#a&&this.hasListeners()){const S=this.#t.variables,L=this.#t.context,re={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};n?.type==="success"?(this.#a.onSuccess?.(n.data,S,L,re),this.#a.onSettled?.(n.data,null,S,L,re)):n?.type==="error"&&(this.#a.onError?.(n.error,S,L,re),this.#a.onSettled?.(void 0,n.error,S,L,re))}this.listeners.forEach(S=>{S(this.#t)})})}},Jie=class extends OT{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,n,S){const L=n.queryKey,re=n.queryHash??M7(L,n);let ve=this.get(re);return ve||(ve=new Hie({client:e,queryKey:L,queryHash:re,options:e.defaultQueryOptions(n),state:S,defaultOptions:e.getQueryDefaults(L)}),this.add(ve)),ve}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=this.#e.get(e.queryHash);n&&(e.destroy(),n===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Dv.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const n={exact:!0,...e};return this.getAll().find(S=>kB(n,S))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(S=>kB(e,S)):n}notify(e){Dv.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){Dv.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Dv.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Qie=class{#e;#t;#r;#a;#n;#o;#s;#i;constructor(e={}){this.#e=e.queryCache||new Jie,this.#t=e.mutationCache||new $ie,this.#r=e.defaultOptions||{},this.#a=new Map,this.#n=new Map,this.#o=0}mount(){this.#o++,this.#o===1&&(this.#s=k7.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#i=O6.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#o--,this.#o===0&&(this.#s?.(),this.#s=void 0,this.#i?.(),this.#i=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const n=this.defaultQueryOptions({queryKey:e});return this.#e.get(n.queryHash)?.state.data}ensureQueryData(e){const n=this.defaultQueryOptions(e),S=this.#e.build(this,n),L=S.state.data;return L===void 0?this.fetchQuery(e):(e.revalidateIfStale&&S.isStaleByTime(sx(n.staleTime,S))&&this.prefetchQuery(n),Promise.resolve(L))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:n,state:S})=>{const L=S.data;return[n,L]})}setQueryData(e,n,S){const L=this.defaultQueryOptions({queryKey:e}),ve=this.#e.get(L.queryHash)?.state.data,Ce=Die(n,ve);if(Ce!==void 0)return this.#e.build(this,L).setData(Ce,{...S,manual:!0})}setQueriesData(e,n,S){return Dv.batch(()=>this.#e.findAll(e).map(({queryKey:L})=>[L,this.setQueryData(L,n,S)]))}getQueryState(e){const n=this.defaultQueryOptions({queryKey:e});return this.#e.get(n.queryHash)?.state}removeQueries(e){const n=this.#e;Dv.batch(()=>{n.findAll(e).forEach(S=>{n.remove(S)})})}resetQueries(e,n){const S=this.#e;return Dv.batch(()=>(S.findAll(e).forEach(L=>{L.reset()}),this.refetchQueries({type:"active",...e},n)))}cancelQueries(e,n={}){const S={revert:!0,...n},L=Dv.batch(()=>this.#e.findAll(e).map(re=>re.cancel(S)));return Promise.all(L).then(rm).catch(rm)}invalidateQueries(e,n={}){return Dv.batch(()=>(this.#e.findAll(e).forEach(S=>{S.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},n)))}refetchQueries(e,n={}){const S={...n,cancelRefetch:n.cancelRefetch??!0},L=Dv.batch(()=>this.#e.findAll(e).filter(re=>!re.isDisabled()&&!re.isStatic()).map(re=>{let ve=re.fetch(void 0,S);return S.throwOnError||(ve=ve.catch(rm)),re.state.fetchStatus==="paused"?Promise.resolve():ve}));return Promise.all(L).then(rm)}fetchQuery(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const S=this.#e.build(this,n);return S.isStaleByTime(sx(n.staleTime,S))?S.fetch(n):Promise.resolve(S.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(rm).catch(rm)}fetchInfiniteQuery(e){return e.behavior=NB(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(rm).catch(rm)}ensureInfiniteQueryData(e){return e.behavior=NB(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return O6.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#r}setDefaultOptions(e){this.#r=e}setQueryDefaults(e,n){this.#a.set(vw(e),{queryKey:e,defaultOptions:n})}getQueryDefaults(e){const n=[...this.#a.values()],S={};return n.forEach(L=>{rE(e,L.queryKey)&&Object.assign(S,L.defaultOptions)}),S}setMutationDefaults(e,n){this.#n.set(vw(e),{mutationKey:e,defaultOptions:n})}getMutationDefaults(e){const n=[...this.#n.values()],S={};return n.forEach(L=>{rE(e,L.mutationKey)&&Object.assign(S,L.defaultOptions)}),S}defaultQueryOptions(e){if(e._defaulted)return e;const n={...this.#r.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return n.queryHash||(n.queryHash=M7(n.queryKey,n)),n.refetchOnReconnect===void 0&&(n.refetchOnReconnect=n.networkMode!=="always"),n.throwOnError===void 0&&(n.throwOnError=!!n.suspense),!n.networkMode&&n.persister&&(n.networkMode="offlineFirst"),n.queryFn===C7&&(n.enabled=!1),n}defaultMutationOptions(e){return e?._defaulted?e:{...this.#r.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},uW=na.createContext(void 0),t0=e=>{const n=na.useContext(uW);if(!n)throw new Error("No QueryClient set, use QueryClientProvider to set one");return n},eoe=({client:e,children:n})=>(na.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),lt.jsx(uW.Provider,{value:e,children:n})),cW=na.createContext(!1),toe=()=>na.useContext(cW);cW.Provider;function roe(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var noe=na.createContext(roe()),aoe=()=>na.useContext(noe),ioe=(e,n)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(n.isReset()||(e.retryOnMount=!1))},ooe=e=>{na.useEffect(()=>{e.clearReset()},[e])},soe=({result:e,errorResetBoundary:n,throwOnError:S,query:L,suspense:re})=>e.isError&&!n.isReset()&&!e.isFetching&&L&&(re&&e.data===void 0||nW(S,[e.error,L])),loe=e=>{if(e.suspense){const S=re=>re==="static"?re:Math.max(re??1e3,1e3),L=e.staleTime;e.staleTime=typeof L=="function"?(...re)=>S(L(...re)):S(L),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},uoe=(e,n)=>e.isLoading&&e.isFetching&&!n,coe=(e,n)=>e?.suspense&&n.isPending,BB=(e,n,S)=>n.fetchOptimistic(e).catch(()=>{S.clearReset()});function foe(e,n,S){const L=toe(),re=aoe(),ve=t0(),Ce=ve.defaultQueryOptions(e);ve.getDefaultOptions().queries?._experimental_beforeQuery?.(Ce),Ce._optimisticResults=L?"isRestoring":"optimistic",loe(Ce),ioe(Ce,re),ooe(re);const Be=!ve.getQueryCache().get(Ce.queryHash),[Ge]=na.useState(()=>new n(ve,Ce)),Ke=Ge.getOptimisticResult(Ce),dt=!L&&e.subscribed!==!1;if(na.useSyncExternalStore(na.useCallback(gt=>{const Vt=dt?Ge.subscribe(Dv.batchCalls(gt)):rm;return Ge.updateResult(),Vt},[Ge,dt]),()=>Ge.getCurrentResult(),()=>Ge.getCurrentResult()),na.useEffect(()=>{Ge.setOptions(Ce)},[Ce,Ge]),coe(Ce,Ke))throw BB(Ce,Ge,re);if(soe({result:Ke,errorResetBoundary:re,throwOnError:Ce.throwOnError,query:ve.getQueryCache().get(Ce.queryHash),suspense:Ce.suspense}))throw Ke.error;return ve.getDefaultOptions().queries?._experimental_afterQuery?.(Ce,Ke),Ce.experimental_prefetchInRender&&!dw&&uoe(Ke,L)&&(Be?BB(Ce,Ge,re):ve.getQueryCache().get(Ce.queryHash)?.promise)?.catch(rm).finally(()=>{Ge.updateResult()}),Ce.notifyOnChangeProps?Ke:Ge.trackResult(Ke)}function pg(e,n){return foe(e,Gie)}function fp(e,n){const S=t0(),[L]=na.useState(()=>new Kie(S,e));na.useEffect(()=>{L.setOptions(e)},[L,e]);const re=na.useSyncExternalStore(na.useCallback(Ce=>L.subscribe(Dv.batchCalls(Ce)),[L]),()=>L.getCurrentResult(),()=>L.getCurrentResult()),ve=na.useCallback((Ce,Be)=>{L.mutate(Ce,Be).catch(rm)},[L]);if(re.error&&nW(L.options.throwOnError,[re.error]))throw re.error;return{...re,mutate:ve,mutateAsync:re.mutate}}const hoe=new Qie({defaultOptions:{queries:{staleTime:300*1e3,gcTime:600*1e3,retry:1,refetchOnWindowFocus:!1},mutations:{retry:1}}});function doe({children:e}){return lt.jsx(eoe,{client:hoe,children:e})}const fW=na.createContext(void 0);function voe({children:e}){const[n,S]=na.useState(!1),[L,re]=na.useState(null),[ve,Ce]=na.useState(null),Be=(Ke,dt)=>{re(Ke),Ce(dt),S(!0)},Ge=()=>{S(!1)};return lt.jsx(fW.Provider,{value:{isVisualizationOpen:n,sessionId:L,modelBackend:ve,openVisualization:Be,closeVisualization:Ge},children:e})}function hW(){const e=na.useContext(fW);if(!e)throw new Error("useVisualization must be used within VisualizationProvider");return e}function dW(e,n){return function(){return e.apply(n,arguments)}}const{toString:poe}=Object.prototype,{getPrototypeOf:L7}=Object,{iterator:zP,toStringTag:vW}=Symbol,NP=(e=>n=>{const S=poe.call(n);return e[S]||(e[S]=S.slice(8,-1).toLowerCase())})(Object.create(null)),mg=e=>(e=e.toLowerCase(),n=>NP(n)===e),FP=e=>n=>typeof n===e,{isArray:zT}=Array,lT=FP("undefined");function BE(e){return e!==null&&!lT(e)&&e.constructor!==null&&!lT(e.constructor)&&xm(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const pW=mg("ArrayBuffer");function moe(e){let n;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?n=ArrayBuffer.isView(e):n=e&&e.buffer&&pW(e.buffer),n}const goe=FP("string"),xm=FP("function"),mW=FP("number"),jE=e=>e!==null&&typeof e=="object",yoe=e=>e===!0||e===!1,P6=e=>{if(NP(e)!=="object")return!1;const n=L7(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(vW in e)&&!(zP in e)},_oe=e=>{if(!jE(e)||BE(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},xoe=mg("Date"),boe=mg("File"),woe=mg("Blob"),Toe=mg("FileList"),Aoe=e=>jE(e)&&xm(e.pipe),Soe=e=>{let n;return e&&(typeof FormData=="function"&&e instanceof FormData||xm(e.append)&&((n=NP(e))==="formdata"||n==="object"&&xm(e.toString)&&e.toString()==="[object FormData]"))},Eoe=mg("URLSearchParams"),[Moe,Coe,koe,Poe]=["ReadableStream","Request","Response","Headers"].map(mg),Loe=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function UE(e,n,{allOwnKeys:S=!1}={}){if(e===null||typeof e>"u")return;let L,re;if(typeof e!="object"&&(e=[e]),zT(e))for(L=0,re=e.length;L<re;L++)n.call(null,e[L],L,e);else{if(BE(e))return;const ve=S?Object.getOwnPropertyNames(e):Object.keys(e),Ce=ve.length;let Be;for(L=0;L<Ce;L++)Be=ve[L],n.call(null,e[Be],Be,e)}}function gW(e,n){if(BE(e))return null;n=n.toLowerCase();const S=Object.keys(e);let L=S.length,re;for(;L-- >0;)if(re=S[L],n===re.toLowerCase())return re;return null}const nw=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,yW=e=>!lT(e)&&e!==nw;function rz(){const{caseless:e,skipUndefined:n}=yW(this)&&this||{},S={},L=(re,ve)=>{if(ve==="__proto__"||ve==="constructor"||ve==="prototype")return;const Ce=e&&gW(S,ve)||ve;P6(S[Ce])&&P6(re)?S[Ce]=rz(S[Ce],re):P6(re)?S[Ce]=rz({},re):zT(re)?S[Ce]=re.slice():(!n||!lT(re))&&(S[Ce]=re)};for(let re=0,ve=arguments.length;re<ve;re++)arguments[re]&&UE(arguments[re],L);return S}const Roe=(e,n,S,{allOwnKeys:L}={})=>(UE(n,(re,ve)=>{S&&xm(re)?Object.defineProperty(e,ve,{value:dW(re,S),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,ve,{value:re,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:L}),e),Ioe=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Doe=(e,n,S,L)=>{e.prototype=Object.create(n.prototype,L),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:n.prototype}),S&&Object.assign(e.prototype,S)},Ooe=(e,n,S,L)=>{let re,ve,Ce;const Be={};if(n=n||{},e==null)return n;do{for(re=Object.getOwnPropertyNames(e),ve=re.length;ve-- >0;)Ce=re[ve],(!L||L(Ce,e,n))&&!Be[Ce]&&(n[Ce]=e[Ce],Be[Ce]=!0);e=S!==!1&&L7(e)}while(e&&(!S||S(e,n))&&e!==Object.prototype);return n},zoe=(e,n,S)=>{e=String(e),(S===void 0||S>e.length)&&(S=e.length),S-=n.length;const L=e.indexOf(n,S);return L!==-1&&L===S},Noe=e=>{if(!e)return null;if(zT(e))return e;let n=e.length;if(!mW(n))return null;const S=new Array(n);for(;n-- >0;)S[n]=e[n];return S},Foe=(e=>n=>e&&n instanceof e)(typeof Uint8Array<"u"&&L7(Uint8Array)),Boe=(e,n)=>{const L=(e&&e[zP]).call(e);let re;for(;(re=L.next())&&!re.done;){const ve=re.value;n.call(e,ve[0],ve[1])}},joe=(e,n)=>{let S;const L=[];for(;(S=e.exec(n))!==null;)L.push(S);return L},Uoe=mg("HTMLFormElement"),qoe=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(S,L,re){return L.toUpperCase()+re}),jB=(({hasOwnProperty:e})=>(n,S)=>e.call(n,S))(Object.prototype),Voe=mg("RegExp"),_W=(e,n)=>{const S=Object.getOwnPropertyDescriptors(e),L={};UE(S,(re,ve)=>{let Ce;(Ce=n(re,ve,e))!==!1&&(L[ve]=Ce||re)}),Object.defineProperties(e,L)},Hoe=e=>{_W(e,(n,S)=>{if(xm(e)&&["arguments","caller","callee"].indexOf(S)!==-1)return!1;const L=e[S];if(xm(L)){if(n.enumerable=!1,"writable"in n){n.writable=!1;return}n.set||(n.set=()=>{throw Error("Can not rewrite read-only method '"+S+"'")})}})},Goe=(e,n)=>{const S={},L=re=>{re.forEach(ve=>{S[ve]=!0})};return zT(e)?L(e):L(String(e).split(n)),S},Xoe=()=>{},Woe=(e,n)=>e!=null&&Number.isFinite(e=+e)?e:n;function Yoe(e){return!!(e&&xm(e.append)&&e[vW]==="FormData"&&e[zP])}const Zoe=e=>{const n=new Array(10),S=(L,re)=>{if(jE(L)){if(n.indexOf(L)>=0)return;if(BE(L))return L;if(!("toJSON"in L)){n[re]=L;const ve=zT(L)?[]:{};return UE(L,(Ce,Be)=>{const Ge=S(Ce,re+1);!lT(Ge)&&(ve[Be]=Ge)}),n[re]=void 0,ve}}return L};return S(e,0)},$oe=mg("AsyncFunction"),Koe=e=>e&&(jE(e)||xm(e))&&xm(e.then)&&xm(e.catch),xW=((e,n)=>e?setImmediate:n?((S,L)=>(nw.addEventListener("message",({source:re,data:ve})=>{re===nw&&ve===S&&L.length&&L.shift()()},!1),re=>{L.push(re),nw.postMessage(S,"*")}))(`axios@${Math.random()}`,[]):S=>setTimeout(S))(typeof setImmediate=="function",xm(nw.postMessage)),Joe=typeof queueMicrotask<"u"?queueMicrotask.bind(nw):typeof process<"u"&&process.nextTick||xW,Qoe=e=>e!=null&&xm(e[zP]),uo={isArray:zT,isArrayBuffer:pW,isBuffer:BE,isFormData:Soe,isArrayBufferView:moe,isString:goe,isNumber:mW,isBoolean:yoe,isObject:jE,isPlainObject:P6,isEmptyObject:_oe,isReadableStream:Moe,isRequest:Coe,isResponse:koe,isHeaders:Poe,isUndefined:lT,isDate:xoe,isFile:boe,isBlob:woe,isRegExp:Voe,isFunction:xm,isStream:Aoe,isURLSearchParams:Eoe,isTypedArray:Foe,isFileList:Toe,forEach:UE,merge:rz,extend:Roe,trim:Loe,stripBOM:Ioe,inherits:Doe,toFlatObject:Ooe,kindOf:NP,kindOfTest:mg,endsWith:zoe,toArray:Noe,forEachEntry:Boe,matchAll:joe,isHTMLForm:Uoe,hasOwnProperty:jB,hasOwnProp:jB,reduceDescriptors:_W,freezeMethods:Hoe,toObjectSet:Goe,toCamelCase:qoe,noop:Xoe,toFiniteNumber:Woe,findKey:gW,global:nw,isContextDefined:yW,isSpecCompliantForm:Yoe,toJSONObject:Zoe,isAsyncFn:$oe,isThenable:Koe,setImmediate:xW,asap:Joe,isIterable:Qoe};let Tu=class bW extends Error{static from(n,S,L,re,ve,Ce){const Be=new bW(n.message,S||n.code,L,re,ve);return Be.cause=n,Be.name=n.name,Ce&&Object.assign(Be,Ce),Be}constructor(n,S,L,re,ve){super(n),this.name="AxiosError",this.isAxiosError=!0,S&&(this.code=S),L&&(this.config=L),re&&(this.request=re),ve&&(this.response=ve,this.status=ve.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:uo.toJSONObject(this.config),code:this.code,status:this.status}}};Tu.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";Tu.ERR_BAD_OPTION="ERR_BAD_OPTION";Tu.ECONNABORTED="ECONNABORTED";Tu.ETIMEDOUT="ETIMEDOUT";Tu.ERR_NETWORK="ERR_NETWORK";Tu.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";Tu.ERR_DEPRECATED="ERR_DEPRECATED";Tu.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";Tu.ERR_BAD_REQUEST="ERR_BAD_REQUEST";Tu.ERR_CANCELED="ERR_CANCELED";Tu.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";Tu.ERR_INVALID_URL="ERR_INVALID_URL";const ese=null;function nz(e){return uo.isPlainObject(e)||uo.isArray(e)}function wW(e){return uo.endsWith(e,"[]")?e.slice(0,-2):e}function UB(e,n,S){return e?e.concat(n).map(function(re,ve){return re=wW(re),!S&&ve?"["+re+"]":re}).join(S?".":""):n}function tse(e){return uo.isArray(e)&&!e.some(nz)}const rse=uo.toFlatObject(uo,{},null,function(n){return/^is[A-Z]/.test(n)});function BP(e,n,S){if(!uo.isObject(e))throw new TypeError("target must be an object");n=n||new FormData,S=uo.toFlatObject(S,{metaTokens:!0,dots:!1,indexes:!1},!1,function(sr,nr){return!uo.isUndefined(nr[sr])});const L=S.metaTokens,re=S.visitor||dt,ve=S.dots,Ce=S.indexes,Ge=(S.Blob||typeof Blob<"u"&&Blob)&&uo.isSpecCompliantForm(n);if(!uo.isFunction(re))throw new TypeError("visitor must be a function");function Ke(cr){if(cr===null)return"";if(uo.isDate(cr))return cr.toISOString();if(uo.isBoolean(cr))return cr.toString();if(!Ge&&uo.isBlob(cr))throw new Tu("Blob is not supported. Use a Buffer instead.");return uo.isArrayBuffer(cr)||uo.isTypedArray(cr)?Ge&&typeof Blob=="function"?new Blob([cr]):Buffer.from(cr):cr}function dt(cr,sr,nr){let zr=cr;if(cr&&!nr&&typeof cr=="object"){if(uo.endsWith(sr,"{}"))sr=L?sr:sr.slice(0,-2),cr=JSON.stringify(cr);else if(uo.isArray(cr)&&tse(cr)||(uo.isFileList(cr)||uo.endsWith(sr,"[]"))&&(zr=uo.toArray(cr)))return sr=wW(sr),zr.forEach(function(Jr,pn){!(uo.isUndefined(Jr)||Jr===null)&&n.append(Ce===!0?UB([sr],pn,ve):Ce===null?sr:sr+"[]",Ke(Jr))}),!1}return nz(cr)?!0:(n.append(UB(nr,sr,ve),Ke(cr)),!1)}const gt=[],Vt=Object.assign(rse,{defaultVisitor:dt,convertValue:Ke,isVisitable:nz});function Xt(cr,sr){if(!uo.isUndefined(cr)){if(gt.indexOf(cr)!==-1)throw Error("Circular reference detected in "+sr.join("."));gt.push(cr),uo.forEach(cr,function(zr,Ne){(!(uo.isUndefined(zr)||zr===null)&&re.call(n,zr,uo.isString(Ne)?Ne.trim():Ne,sr,Vt))===!0&&Xt(zr,sr?sr.concat(Ne):[Ne])}),gt.pop()}}if(!uo.isObject(e))throw new TypeError("data must be an object");return Xt(e),n}function qB(e){const n={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(L){return n[L]})}function R7(e,n){this._pairs=[],e&&BP(e,this,n)}const TW=R7.prototype;TW.append=function(n,S){this._pairs.push([n,S])};TW.toString=function(n){const S=n?function(L){return n.call(this,L,qB)}:qB;return this._pairs.map(function(re){return S(re[0])+"="+S(re[1])},"").join("&")};function nse(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function AW(e,n,S){if(!n)return e;const L=S&&S.encode||nse,re=uo.isFunction(S)?{serialize:S}:S,ve=re&&re.serialize;let Ce;if(ve?Ce=ve(n,re):Ce=uo.isURLSearchParams(n)?n.toString():new R7(n,re).toString(L),Ce){const Be=e.indexOf("#");Be!==-1&&(e=e.slice(0,Be)),e+=(e.indexOf("?")===-1?"?":"&")+Ce}return e}class VB{constructor(){this.handlers=[]}use(n,S,L){return this.handlers.push({fulfilled:n,rejected:S,synchronous:L?L.synchronous:!1,runWhen:L?L.runWhen:null}),this.handlers.length-1}eject(n){this.handlers[n]&&(this.handlers[n]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(n){uo.forEach(this.handlers,function(L){L!==null&&n(L)})}}const I7={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},ase=typeof URLSearchParams<"u"?URLSearchParams:R7,ise=typeof FormData<"u"?FormData:null,ose=typeof Blob<"u"?Blob:null,sse={isBrowser:!0,classes:{URLSearchParams:ase,FormData:ise,Blob:ose},protocols:["http","https","file","blob","url","data"]},D7=typeof window<"u"&&typeof document<"u",az=typeof navigator=="object"&&navigator||void 0,lse=D7&&(!az||["ReactNative","NativeScript","NS"].indexOf(az.product)<0),use=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",cse=D7&&window.location.href||"http://localhost",fse=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:D7,hasStandardBrowserEnv:lse,hasStandardBrowserWebWorkerEnv:use,navigator:az,origin:cse},Symbol.toStringTag,{value:"Module"})),Bp={...fse,...sse};function hse(e,n){return BP(e,new Bp.classes.URLSearchParams,{visitor:function(S,L,re,ve){return Bp.isNode&&uo.isBuffer(S)?(this.append(L,S.toString("base64")),!1):ve.defaultVisitor.apply(this,arguments)},...n})}function dse(e){return uo.matchAll(/\w+|\[(\w*)]/g,e).map(n=>n[0]==="[]"?"":n[1]||n[0])}function vse(e){const n={},S=Object.keys(e);let L;const re=S.length;let ve;for(L=0;L<re;L++)ve=S[L],n[ve]=e[ve];return n}function SW(e){function n(S,L,re,ve){let Ce=S[ve++];if(Ce==="__proto__")return!0;const Be=Number.isFinite(+Ce),Ge=ve>=S.length;return Ce=!Ce&&uo.isArray(re)?re.length:Ce,Ge?(uo.hasOwnProp(re,Ce)?re[Ce]=[re[Ce],L]:re[Ce]=L,!Be):((!re[Ce]||!uo.isObject(re[Ce]))&&(re[Ce]=[]),n(S,L,re[Ce],ve)&&uo.isArray(re[Ce])&&(re[Ce]=vse(re[Ce])),!Be)}if(uo.isFormData(e)&&uo.isFunction(e.entries)){const S={};return uo.forEachEntry(e,(L,re)=>{n(dse(L),re,S,0)}),S}return null}function pse(e,n,S){if(uo.isString(e))try{return(n||JSON.parse)(e),uo.trim(e)}catch(L){if(L.name!=="SyntaxError")throw L}return(S||JSON.stringify)(e)}const qE={transitional:I7,adapter:["xhr","http","fetch"],transformRequest:[function(n,S){const L=S.getContentType()||"",re=L.indexOf("application/json")>-1,ve=uo.isObject(n);if(ve&&uo.isHTMLForm(n)&&(n=new FormData(n)),uo.isFormData(n))return re?JSON.stringify(SW(n)):n;if(uo.isArrayBuffer(n)||uo.isBuffer(n)||uo.isStream(n)||uo.isFile(n)||uo.isBlob(n)||uo.isReadableStream(n))return n;if(uo.isArrayBufferView(n))return n.buffer;if(uo.isURLSearchParams(n))return S.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let Be;if(ve){if(L.indexOf("application/x-www-form-urlencoded")>-1)return hse(n,this.formSerializer).toString();if((Be=uo.isFileList(n))||L.indexOf("multipart/form-data")>-1){const Ge=this.env&&this.env.FormData;return BP(Be?{"files[]":n}:n,Ge&&new Ge,this.formSerializer)}}return ve||re?(S.setContentType("application/json",!1),pse(n)):n}],transformResponse:[function(n){const S=this.transitional||qE.transitional,L=S&&S.forcedJSONParsing,re=this.responseType==="json";if(uo.isResponse(n)||uo.isReadableStream(n))return n;if(n&&uo.isString(n)&&(L&&!this.responseType||re)){const Ce=!(S&&S.silentJSONParsing)&&re;try{return JSON.parse(n,this.parseReviver)}catch(Be){if(Ce)throw Be.name==="SyntaxError"?Tu.from(Be,Tu.ERR_BAD_RESPONSE,this,null,this.response):Be}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Bp.classes.FormData,Blob:Bp.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};uo.forEach(["delete","get","head","post","put","patch"],e=>{qE.headers[e]={}});const mse=uo.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),gse=e=>{const n={};let S,L,re;return e&&e.split(`
`).forEach(function(Ce){re=Ce.indexOf(":"),S=Ce.substring(0,re).trim().toLowerCase(),L=Ce.substring(re+1).trim(),!(!S||n[S]&&mse[S])&&(S==="set-cookie"?n[S]?n[S].push(L):n[S]=[L]:n[S]=n[S]?n[S]+", "+L:L)}),n},HB=Symbol("internals");function D5(e){return e&&String(e).trim().toLowerCase()}function L6(e){return e===!1||e==null?e:uo.isArray(e)?e.map(L6):String(e)}function yse(e){const n=Object.create(null),S=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let L;for(;L=S.exec(e);)n[L[1]]=L[2];return n}const _se=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function H8(e,n,S,L,re){if(uo.isFunction(L))return L.call(this,n,S);if(re&&(n=S),!!uo.isString(n)){if(uo.isString(L))return n.indexOf(L)!==-1;if(uo.isRegExp(L))return L.test(n)}}function xse(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(n,S,L)=>S.toUpperCase()+L)}function bse(e,n){const S=uo.toCamelCase(" "+n);["get","set","has"].forEach(L=>{Object.defineProperty(e,L+S,{value:function(re,ve,Ce){return this[L].call(this,n,re,ve,Ce)},configurable:!0})})}let bm=class{constructor(n){n&&this.set(n)}set(n,S,L){const re=this;function ve(Be,Ge,Ke){const dt=D5(Ge);if(!dt)throw new Error("header name must be a non-empty string");const gt=uo.findKey(re,dt);(!gt||re[gt]===void 0||Ke===!0||Ke===void 0&&re[gt]!==!1)&&(re[gt||Ge]=L6(Be))}const Ce=(Be,Ge)=>uo.forEach(Be,(Ke,dt)=>ve(Ke,dt,Ge));if(uo.isPlainObject(n)||n instanceof this.constructor)Ce(n,S);else if(uo.isString(n)&&(n=n.trim())&&!_se(n))Ce(gse(n),S);else if(uo.isObject(n)&&uo.isIterable(n)){let Be={},Ge,Ke;for(const dt of n){if(!uo.isArray(dt))throw TypeError("Object iterator must return a key-value pair");Be[Ke=dt[0]]=(Ge=Be[Ke])?uo.isArray(Ge)?[...Ge,dt[1]]:[Ge,dt[1]]:dt[1]}Ce(Be,S)}else n!=null&&ve(S,n,L);return this}get(n,S){if(n=D5(n),n){const L=uo.findKey(this,n);if(L){const re=this[L];if(!S)return re;if(S===!0)return yse(re);if(uo.isFunction(S))return S.call(this,re,L);if(uo.isRegExp(S))return S.exec(re);throw new TypeError("parser must be boolean|regexp|function")}}}has(n,S){if(n=D5(n),n){const L=uo.findKey(this,n);return!!(L&&this[L]!==void 0&&(!S||H8(this,this[L],L,S)))}return!1}delete(n,S){const L=this;let re=!1;function ve(Ce){if(Ce=D5(Ce),Ce){const Be=uo.findKey(L,Ce);Be&&(!S||H8(L,L[Be],Be,S))&&(delete L[Be],re=!0)}}return uo.isArray(n)?n.forEach(ve):ve(n),re}clear(n){const S=Object.keys(this);let L=S.length,re=!1;for(;L--;){const ve=S[L];(!n||H8(this,this[ve],ve,n,!0))&&(delete this[ve],re=!0)}return re}normalize(n){const S=this,L={};return uo.forEach(this,(re,ve)=>{const Ce=uo.findKey(L,ve);if(Ce){S[Ce]=L6(re),delete S[ve];return}const Be=n?xse(ve):String(ve).trim();Be!==ve&&delete S[ve],S[Be]=L6(re),L[Be]=!0}),this}concat(...n){return this.constructor.concat(this,...n)}toJSON(n){const S=Object.create(null);return uo.forEach(this,(L,re)=>{L!=null&&L!==!1&&(S[re]=n&&uo.isArray(L)?L.join(", "):L)}),S}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([n,S])=>n+": "+S).join(`
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(n){return n instanceof this?n:new this(n)}static concat(n,...S){const L=new this(n);return S.forEach(re=>L.set(re)),L}static accessor(n){const L=(this[HB]=this[HB]={accessors:{}}).accessors,re=this.prototype;function ve(Ce){const Be=D5(Ce);L[Be]||(bse(re,Ce),L[Be]=!0)}return uo.isArray(n)?n.forEach(ve):ve(n),this}};bm.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);uo.reduceDescriptors(bm.prototype,({value:e},n)=>{let S=n[0].toUpperCase()+n.slice(1);return{get:()=>e,set(L){this[S]=L}}});uo.freezeMethods(bm);function G8(e,n){const S=this||qE,L=n||S,re=bm.from(L.headers);let ve=L.data;return uo.forEach(e,function(Be){ve=Be.call(S,ve,re.normalize(),n?n.status:void 0)}),re.normalize(),ve}function EW(e){return!!(e&&e.__CANCEL__)}let VE=class extends Tu{constructor(n,S,L){super(n??"canceled",Tu.ERR_CANCELED,S,L),this.name="CanceledError",this.__CANCEL__=!0}};function MW(e,n,S){const L=S.config.validateStatus;!S.status||!L||L(S.status)?e(S):n(new Tu("Request failed with status code "+S.status,[Tu.ERR_BAD_REQUEST,Tu.ERR_BAD_RESPONSE][Math.floor(S.status/100)-4],S.config,S.request,S))}function wse(e){const n=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return n&&n[1]||""}function Tse(e,n){e=e||10;const S=new Array(e),L=new Array(e);let re=0,ve=0,Ce;return n=n!==void 0?n:1e3,function(Ge){const Ke=Date.now(),dt=L[ve];Ce||(Ce=Ke),S[re]=Ge,L[re]=Ke;let gt=ve,Vt=0;for(;gt!==re;)Vt+=S[gt++],gt=gt%e;if(re=(re+1)%e,re===ve&&(ve=(ve+1)%e),Ke-Ce<n)return;const Xt=dt&&Ke-dt;return Xt?Math.round(Vt*1e3/Xt):void 0}}function Ase(e,n){let S=0,L=1e3/n,re,ve;const Ce=(Ke,dt=Date.now())=>{S=dt,re=null,ve&&(clearTimeout(ve),ve=null),e(...Ke)};return[(...Ke)=>{const dt=Date.now(),gt=dt-S;gt>=L?Ce(Ke,dt):(re=Ke,ve||(ve=setTimeout(()=>{ve=null,Ce(re)},L-gt)))},()=>re&&Ce(re)]}const z6=(e,n,S=3)=>{let L=0;const re=Tse(50,250);return Ase(ve=>{const Ce=ve.loaded,Be=ve.lengthComputable?ve.total:void 0,Ge=Ce-L,Ke=re(Ge),dt=Ce<=Be;L=Ce;const gt={loaded:Ce,total:Be,progress:Be?Ce/Be:void 0,bytes:Ge,rate:Ke||void 0,estimated:Ke&&Be&&dt?(Be-Ce)/Ke:void 0,event:ve,lengthComputable:Be!=null,[n?"download":"upload"]:!0};e(gt)},S)},GB=(e,n)=>{const S=e!=null;return[L=>n[0]({lengthComputable:S,total:e,loaded:L}),n[1]]},XB=e=>(...n)=>uo.asap(()=>e(...n)),Sse=Bp.hasStandardBrowserEnv?((e,n)=>S=>(S=new URL(S,Bp.origin),e.protocol===S.protocol&&e.host===S.host&&(n||e.port===S.port)))(new URL(Bp.origin),Bp.navigator&&/(msie|trident)/i.test(Bp.navigator.userAgent)):()=>!0,Ese=Bp.hasStandardBrowserEnv?{write(e,n,S,L,re,ve,Ce){if(typeof document>"u")return;const Be=[`${e}=${encodeURIComponent(n)}`];uo.isNumber(S)&&Be.push(`expires=${new Date(S).toUTCString()}`),uo.isString(L)&&Be.push(`path=${L}`),uo.isString(re)&&Be.push(`domain=${re}`),ve===!0&&Be.push("secure"),uo.isString(Ce)&&Be.push(`SameSite=${Ce}`),document.cookie=Be.join("; ")},read(e){if(typeof document>"u")return null;const n=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return n?decodeURIComponent(n[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Mse(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Cse(e,n){return n?e.replace(/\/?\/$/,"")+"/"+n.replace(/^\/+/,""):e}function CW(e,n,S){let L=!Mse(n);return e&&(L||S==!1)?Cse(e,n):n}const WB=e=>e instanceof bm?{...e}:e;function pw(e,n){n=n||{};const S={};function L(Ke,dt,gt,Vt){return uo.isPlainObject(Ke)&&uo.isPlainObject(dt)?uo.merge.call({caseless:Vt},Ke,dt):uo.isPlainObject(dt)?uo.merge({},dt):uo.isArray(dt)?dt.slice():dt}function re(Ke,dt,gt,Vt){if(uo.isUndefined(dt)){if(!uo.isUndefined(Ke))return L(void 0,Ke,gt,Vt)}else return L(Ke,dt,gt,Vt)}function ve(Ke,dt){if(!uo.isUndefined(dt))return L(void 0,dt)}function Ce(Ke,dt){if(uo.isUndefined(dt)){if(!uo.isUndefined(Ke))return L(void 0,Ke)}else return L(void 0,dt)}function Be(Ke,dt,gt){if(gt in n)return L(Ke,dt);if(gt in e)return L(void 0,Ke)}const Ge={url:ve,method:ve,data:ve,baseURL:Ce,transformRequest:Ce,transformResponse:Ce,paramsSerializer:Ce,timeout:Ce,timeoutMessage:Ce,withCredentials:Ce,withXSRFToken:Ce,adapter:Ce,responseType:Ce,xsrfCookieName:Ce,xsrfHeaderName:Ce,onUploadProgress:Ce,onDownloadProgress:Ce,decompress:Ce,maxContentLength:Ce,maxBodyLength:Ce,beforeRedirect:Ce,transport:Ce,httpAgent:Ce,httpsAgent:Ce,cancelToken:Ce,socketPath:Ce,responseEncoding:Ce,validateStatus:Be,headers:(Ke,dt,gt)=>re(WB(Ke),WB(dt),gt,!0)};return uo.forEach(Object.keys({...e,...n}),function(dt){if(dt==="__proto__"||dt==="constructor"||dt==="prototype")return;const gt=uo.hasOwnProp(Ge,dt)?Ge[dt]:re,Vt=gt(e[dt],n[dt],dt);uo.isUndefined(Vt)&&gt!==Be||(S[dt]=Vt)}),S}const kW=e=>{const n=pw({},e);let{data:S,withXSRFToken:L,xsrfHeaderName:re,xsrfCookieName:ve,headers:Ce,auth:Be}=n;if(n.headers=Ce=bm.from(Ce),n.url=AW(CW(n.baseURL,n.url,n.allowAbsoluteUrls),e.params,e.paramsSerializer),Be&&Ce.set("Authorization","Basic "+btoa((Be.username||"")+":"+(Be.password?unescape(encodeURIComponent(Be.password)):""))),uo.isFormData(S)){if(Bp.hasStandardBrowserEnv||Bp.hasStandardBrowserWebWorkerEnv)Ce.setContentType(void 0);else if(uo.isFunction(S.getHeaders)){const Ge=S.getHeaders(),Ke=["content-type","content-length"];Object.entries(Ge).forEach(([dt,gt])=>{Ke.includes(dt.toLowerCase())&&Ce.set(dt,gt)})}}if(Bp.hasStandardBrowserEnv&&(L&&uo.isFunction(L)&&(L=L(n)),L||L!==!1&&Sse(n.url))){const Ge=re&&ve&&Ese.read(ve);Ge&&Ce.set(re,Ge)}return n},kse=typeof XMLHttpRequest<"u",Pse=kse&&function(e){return new Promise(function(S,L){const re=kW(e);let ve=re.data;const Ce=bm.from(re.headers).normalize();let{responseType:Be,onUploadProgress:Ge,onDownloadProgress:Ke}=re,dt,gt,Vt,Xt,cr;function sr(){Xt&&Xt(),cr&&cr(),re.cancelToken&&re.cancelToken.unsubscribe(dt),re.signal&&re.signal.removeEventListener("abort",dt)}let nr=new XMLHttpRequest;nr.open(re.method.toUpperCase(),re.url,!0),nr.timeout=re.timeout;function zr(){if(!nr)return;const Jr=bm.from("getAllResponseHeaders"in nr&&nr.getAllResponseHeaders()),Lr={data:!Be||Be==="text"||Be==="json"?nr.responseText:nr.response,status:nr.status,statusText:nr.statusText,headers:Jr,config:e,request:nr};MW(function(cn){S(cn),sr()},function(cn){L(cn),sr()},Lr),nr=null}"onloadend"in nr?nr.onloadend=zr:nr.onreadystatechange=function(){!nr||nr.readyState!==4||nr.status===0&&!(nr.responseURL&&nr.responseURL.indexOf("file:")===0)||setTimeout(zr)},nr.onabort=function(){nr&&(L(new Tu("Request aborted",Tu.ECONNABORTED,e,nr)),nr=null)},nr.onerror=function(pn){const Lr=pn&&pn.message?pn.message:"Network Error",Or=new Tu(Lr,Tu.ERR_NETWORK,e,nr);Or.event=pn||null,L(Or),nr=null},nr.ontimeout=function(){let pn=re.timeout?"timeout of "+re.timeout+"ms exceeded":"timeout exceeded";const Lr=re.transitional||I7;re.timeoutErrorMessage&&(pn=re.timeoutErrorMessage),L(new Tu(pn,Lr.clarifyTimeoutError?Tu.ETIMEDOUT:Tu.ECONNABORTED,e,nr)),nr=null},ve===void 0&&Ce.setContentType(null),"setRequestHeader"in nr&&uo.forEach(Ce.toJSON(),function(pn,Lr){nr.setRequestHeader(Lr,pn)}),uo.isUndefined(re.withCredentials)||(nr.withCredentials=!!re.withCredentials),Be&&Be!=="json"&&(nr.responseType=re.responseType),Ke&&([Vt,cr]=z6(Ke,!0),nr.addEventListener("progress",Vt)),Ge&&nr.upload&&([gt,Xt]=z6(Ge),nr.upload.addEventListener("progress",gt),nr.upload.addEventListener("loadend",Xt)),(re.cancelToken||re.signal)&&(dt=Jr=>{nr&&(L(!Jr||Jr.type?new VE(null,e,nr):Jr),nr.abort(),nr=null)},re.cancelToken&&re.cancelToken.subscribe(dt),re.signal&&(re.signal.aborted?dt():re.signal.addEventListener("abort",dt)));const Ne=wse(re.url);if(Ne&&Bp.protocols.indexOf(Ne)===-1){L(new Tu("Unsupported protocol "+Ne+":",Tu.ERR_BAD_REQUEST,e));return}nr.send(ve||null)})},Lse=(e,n)=>{const{length:S}=e=e?e.filter(Boolean):[];if(n||S){let L=new AbortController,re;const ve=function(Ke){if(!re){re=!0,Be();const dt=Ke instanceof Error?Ke:this.reason;L.abort(dt instanceof Tu?dt:new VE(dt instanceof Error?dt.message:dt))}};let Ce=n&&setTimeout(()=>{Ce=null,ve(new Tu(`timeout of ${n}ms exceeded`,Tu.ETIMEDOUT))},n);const Be=()=>{e&&(Ce&&clearTimeout(Ce),Ce=null,e.forEach(Ke=>{Ke.unsubscribe?Ke.unsubscribe(ve):Ke.removeEventListener("abort",ve)}),e=null)};e.forEach(Ke=>Ke.addEventListener("abort",ve));const{signal:Ge}=L;return Ge.unsubscribe=()=>uo.asap(Be),Ge}},Rse=function*(e,n){let S=e.byteLength;if(S<n){yield e;return}let L=0,re;for(;L<S;)re=L+n,yield e.slice(L,re),L=re},Ise=async function*(e,n){for await(const S of Dse(e))yield*Rse(S,n)},Dse=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const n=e.getReader();try{for(;;){const{done:S,value:L}=await n.read();if(S)break;yield L}}finally{await n.cancel()}},YB=(e,n,S,L)=>{const re=Ise(e,n);let ve=0,Ce,Be=Ge=>{Ce||(Ce=!0,L&&L(Ge))};return new ReadableStream({async pull(Ge){try{const{done:Ke,value:dt}=await re.next();if(Ke){Be(),Ge.close();return}let gt=dt.byteLength;if(S){let Vt=ve+=gt;S(Vt)}Ge.enqueue(new Uint8Array(dt))}catch(Ke){throw Be(Ke),Ke}},cancel(Ge){return Be(Ge),re.return()}},{highWaterMark:2})},ZB=64*1024,{isFunction:m6}=uo,Ose=(({Request:e,Response:n})=>({Request:e,Response:n}))(uo.global),{ReadableStream:$B,TextEncoder:KB}=uo.global,JB=(e,...n)=>{try{return!!e(...n)}catch{return!1}},zse=e=>{e=uo.merge.call({skipUndefined:!0},Ose,e);const{fetch:n,Request:S,Response:L}=e,re=n?m6(n):typeof fetch=="function",ve=m6(S),Ce=m6(L);if(!re)return!1;const Be=re&&m6($B),Ge=re&&(typeof KB=="function"?(cr=>sr=>cr.encode(sr))(new KB):async cr=>new Uint8Array(await new S(cr).arrayBuffer())),Ke=ve&&Be&&JB(()=>{let cr=!1;const sr=new S(Bp.origin,{body:new $B,method:"POST",get duplex(){return cr=!0,"half"}}).headers.has("Content-Type");return cr&&!sr}),dt=Ce&&Be&&JB(()=>uo.isReadableStream(new L("").body)),gt={stream:dt&&(cr=>cr.body)};re&&["text","arrayBuffer","blob","formData","stream"].forEach(cr=>{!gt[cr]&&(gt[cr]=(sr,nr)=>{let zr=sr&&sr[cr];if(zr)return zr.call(sr);throw new Tu(`Response type '${cr}' is not supported`,Tu.ERR_NOT_SUPPORT,nr)})});const Vt=async cr=>{if(cr==null)return 0;if(uo.isBlob(cr))return cr.size;if(uo.isSpecCompliantForm(cr))return(await new S(Bp.origin,{method:"POST",body:cr}).arrayBuffer()).byteLength;if(uo.isArrayBufferView(cr)||uo.isArrayBuffer(cr))return cr.byteLength;if(uo.isURLSearchParams(cr)&&(cr=cr+""),uo.isString(cr))return(await Ge(cr)).byteLength},Xt=async(cr,sr)=>{const nr=uo.toFiniteNumber(cr.getContentLength());return nr??Vt(sr)};return async cr=>{let{url:sr,method:nr,data:zr,signal:Ne,cancelToken:Jr,timeout:pn,onDownloadProgress:Lr,onUploadProgress:Or,responseType:cn,headers:$n,withCredentials:xn="same-origin",fetchOptions:Wa}=kW(cr),On=n||fetch;cn=cn?(cn+"").toLowerCase():"text";let qn=Lse([Ne,Jr&&Jr.toAbortSignal()],pn),ca=null;const Fn=qn&&qn.unsubscribe&&(()=>{qn.unsubscribe()});let da;try{if(Or&&Ke&&nr!=="get"&&nr!=="head"&&(da=await Xt($n,zr))!==0){let ya=new S(sr,{method:"POST",body:zr,duplex:"half"}),Wn;if(uo.isFormData(zr)&&(Wn=ya.headers.get("content-type"))&&$n.setContentType(Wn),ya.body){const[Ei,$i]=GB(da,z6(XB(Or)));zr=YB(ya.body,ZB,Ei,$i)}}uo.isString(xn)||(xn=xn?"include":"omit");const ea=ve&&"credentials"in S.prototype,qa={...Wa,signal:qn,method:nr.toUpperCase(),headers:$n.normalize().toJSON(),body:zr,duplex:"half",credentials:ea?xn:void 0};ca=ve&&new S(sr,qa);let Ri=await(ve?On(ca,Wa):On(sr,qa));const mi=dt&&(cn==="stream"||cn==="response");if(dt&&(Lr||mi&&Fn)){const ya={};["status","statusText","headers"].forEach(to=>{ya[to]=Ri[to]});const Wn=uo.toFiniteNumber(Ri.headers.get("content-length")),[Ei,$i]=Lr&&GB(Wn,z6(XB(Lr),!0))||[];Ri=new L(YB(Ri.body,ZB,Ei,()=>{$i&&$i(),Fn&&Fn()}),ya)}cn=cn||"text";let Io=await gt[uo.findKey(gt,cn)||"text"](Ri,cr);return!mi&&Fn&&Fn(),await new Promise((ya,Wn)=>{MW(ya,Wn,{data:Io,headers:bm.from(Ri.headers),status:Ri.status,statusText:Ri.statusText,config:cr,request:ca})})}catch(ea){throw Fn&&Fn(),ea&&ea.name==="TypeError"&&/Load failed|fetch/i.test(ea.message)?Object.assign(new Tu("Network Error",Tu.ERR_NETWORK,cr,ca,ea&&ea.response),{cause:ea.cause||ea}):Tu.from(ea,ea&&ea.code,cr,ca,ea&&ea.response)}}},Nse=new Map,PW=e=>{let n=e&&e.env||{};const{fetch:S,Request:L,Response:re}=n,ve=[L,re,S];let Ce=ve.length,Be=Ce,Ge,Ke,dt=Nse;for(;Be--;)Ge=ve[Be],Ke=dt.get(Ge),Ke===void 0&&dt.set(Ge,Ke=Be?new Map:zse(n)),dt=Ke;return Ke};PW();const O7={http:ese,xhr:Pse,fetch:{get:PW}};uo.forEach(O7,(e,n)=>{if(e){try{Object.defineProperty(e,"name",{value:n})}catch{}Object.defineProperty(e,"adapterName",{value:n})}});const QB=e=>`- ${e}`,Fse=e=>uo.isFunction(e)||e===null||e===!1;function Bse(e,n){e=uo.isArray(e)?e:[e];const{length:S}=e;let L,re;const ve={};for(let Ce=0;Ce<S;Ce++){L=e[Ce];let Be;if(re=L,!Fse(L)&&(re=O7[(Be=String(L)).toLowerCase()],re===void 0))throw new Tu(`Unknown adapter '${Be}'`);if(re&&(uo.isFunction(re)||(re=re.get(n))))break;ve[Be||"#"+Ce]=re}if(!re){const Ce=Object.entries(ve).map(([Ge,Ke])=>`adapter ${Ge} `+(Ke===!1?"is not supported by the environment":"is not available in the build"));let Be=S?Ce.length>1?`since :
`+Ce.map(QB).join(`
`):" "+QB(Ce[0]):"as no adapter specified";throw new Tu("There is no suitable adapter to dispatch the request "+Be,"ERR_NOT_SUPPORT")}return re}const LW={getAdapter:Bse,adapters:O7};function X8(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new VE(null,e)}function ej(e){return X8(e),e.headers=bm.from(e.headers),e.data=G8.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),LW.getAdapter(e.adapter||qE.adapter,e)(e).then(function(L){return X8(e),L.data=G8.call(e,e.transformResponse,L),L.headers=bm.from(L.headers),L},function(L){return EW(L)||(X8(e),L&&L.response&&(L.response.data=G8.call(e,e.transformResponse,L.response),L.response.headers=bm.from(L.response.headers))),Promise.reject(L)})}const RW="1.13.5",jP={};["object","boolean","number","function","string","symbol"].forEach((e,n)=>{jP[e]=function(L){return typeof L===e||"a"+(n<1?"n ":" ")+e}});const tj={};jP.transitional=function(n,S,L){function re(ve,Ce){return"[Axios v"+RW+"] Transitional option '"+ve+"'"+Ce+(L?". "+L:"")}return(ve,Ce,Be)=>{if(n===!1)throw new Tu(re(Ce," has been removed"+(S?" in "+S:"")),Tu.ERR_DEPRECATED);return S&&!tj[Ce]&&(tj[Ce]=!0,console.warn(re(Ce," has been deprecated since v"+S+" and will be removed in the near future"))),n?n(ve,Ce,Be):!0}};jP.spelling=function(n){return(S,L)=>(console.warn(`${L} is likely a misspelling of ${n}`),!0)};function jse(e,n,S){if(typeof e!="object")throw new Tu("options must be an object",Tu.ERR_BAD_OPTION_VALUE);const L=Object.keys(e);let re=L.length;for(;re-- >0;){const ve=L[re],Ce=n[ve];if(Ce){const Be=e[ve],Ge=Be===void 0||Ce(Be,ve,e);if(Ge!==!0)throw new Tu("option "+ve+" must be "+Ge,Tu.ERR_BAD_OPTION_VALUE);continue}if(S!==!0)throw new Tu("Unknown option "+ve,Tu.ERR_BAD_OPTION)}}const R6={assertOptions:jse,validators:jP},T0=R6.validators;let uw=class{constructor(n){this.defaults=n||{},this.interceptors={request:new VB,response:new VB}}async request(n,S){try{return await this._request(n,S)}catch(L){if(L instanceof Error){let re={};Error.captureStackTrace?Error.captureStackTrace(re):re=new Error;const ve=re.stack?re.stack.replace(/^.+\n/,""):"";try{L.stack?ve&&!String(L.stack).endsWith(ve.replace(/^.+\n.+\n/,""))&&(L.stack+=`
`+ve):L.stack=ve}catch{}}throw L}}_request(n,S){typeof n=="string"?(S=S||{},S.url=n):S=n||{},S=pw(this.defaults,S);const{transitional:L,paramsSerializer:re,headers:ve}=S;L!==void 0&&R6.assertOptions(L,{silentJSONParsing:T0.transitional(T0.boolean),forcedJSONParsing:T0.transitional(T0.boolean),clarifyTimeoutError:T0.transitional(T0.boolean),legacyInterceptorReqResOrdering:T0.transitional(T0.boolean)},!1),re!=null&&(uo.isFunction(re)?S.paramsSerializer={serialize:re}:R6.assertOptions(re,{encode:T0.function,serialize:T0.function},!0)),S.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?S.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:S.allowAbsoluteUrls=!0),R6.assertOptions(S,{baseUrl:T0.spelling("baseURL"),withXsrfToken:T0.spelling("withXSRFToken")},!0),S.method=(S.method||this.defaults.method||"get").toLowerCase();let Ce=ve&&uo.merge(ve.common,ve[S.method]);ve&&uo.forEach(["delete","get","head","post","put","patch","common"],cr=>{delete ve[cr]}),S.headers=bm.concat(Ce,ve);const Be=[];let Ge=!0;this.interceptors.request.forEach(function(sr){if(typeof sr.runWhen=="function"&&sr.runWhen(S)===!1)return;Ge=Ge&&sr.synchronous;const nr=S.transitional||I7;nr&&nr.legacyInterceptorReqResOrdering?Be.unshift(sr.fulfilled,sr.rejected):Be.push(sr.fulfilled,sr.rejected)});const Ke=[];this.interceptors.response.forEach(function(sr){Ke.push(sr.fulfilled,sr.rejected)});let dt,gt=0,Vt;if(!Ge){const cr=[ej.bind(this),void 0];for(cr.unshift(...Be),cr.push(...Ke),Vt=cr.length,dt=Promise.resolve(S);gt<Vt;)dt=dt.then(cr[gt++],cr[gt++]);return dt}Vt=Be.length;let Xt=S;for(;gt<Vt;){const cr=Be[gt++],sr=Be[gt++];try{Xt=cr(Xt)}catch(nr){sr.call(this,nr);break}}try{dt=ej.call(this,Xt)}catch(cr){return Promise.reject(cr)}for(gt=0,Vt=Ke.length;gt<Vt;)dt=dt.then(Ke[gt++],Ke[gt++]);return dt}getUri(n){n=pw(this.defaults,n);const S=CW(n.baseURL,n.url,n.allowAbsoluteUrls);return AW(S,n.params,n.paramsSerializer)}};uo.forEach(["delete","get","head","options"],function(n){uw.prototype[n]=function(S,L){return this.request(pw(L||{},{method:n,url:S,data:(L||{}).data}))}});uo.forEach(["post","put","patch"],function(n){function S(L){return function(ve,Ce,Be){return this.request(pw(Be||{},{method:n,headers:L?{"Content-Type":"multipart/form-data"}:{},url:ve,data:Ce}))}}uw.prototype[n]=S(),uw.prototype[n+"Form"]=S(!0)});let Use=class IW{constructor(n){if(typeof n!="function")throw new TypeError("executor must be a function.");let S;this.promise=new Promise(function(ve){S=ve});const L=this;this.promise.then(re=>{if(!L._listeners)return;let ve=L._listeners.length;for(;ve-- >0;)L._listeners[ve](re);L._listeners=null}),this.promise.then=re=>{let ve;const Ce=new Promise(Be=>{L.subscribe(Be),ve=Be}).then(re);return Ce.cancel=function(){L.unsubscribe(ve)},Ce},n(function(ve,Ce,Be){L.reason||(L.reason=new VE(ve,Ce,Be),S(L.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(n){if(this.reason){n(this.reason);return}this._listeners?this._listeners.push(n):this._listeners=[n]}unsubscribe(n){if(!this._listeners)return;const S=this._listeners.indexOf(n);S!==-1&&this._listeners.splice(S,1)}toAbortSignal(){const n=new AbortController,S=L=>{n.abort(L)};return this.subscribe(S),n.signal.unsubscribe=()=>this.unsubscribe(S),n.signal}static source(){let n;return{token:new IW(function(re){n=re}),cancel:n}}};function qse(e){return function(S){return e.apply(null,S)}}function Vse(e){return uo.isObject(e)&&e.isAxiosError===!0}const iz={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(iz).forEach(([e,n])=>{iz[n]=e});function DW(e){const n=new uw(e),S=dW(uw.prototype.request,n);return uo.extend(S,uw.prototype,n,{allOwnKeys:!0}),uo.extend(S,n,null,{allOwnKeys:!0}),S.create=function(re){return DW(pw(e,re))},S}const iv=DW(qE);iv.Axios=uw;iv.CanceledError=VE;iv.CancelToken=Use;iv.isCancel=EW;iv.VERSION=RW;iv.toFormData=BP;iv.AxiosError=Tu;iv.Cancel=iv.CanceledError;iv.all=function(n){return Promise.all(n)};iv.spread=qse;iv.isAxiosError=Vse;iv.mergeConfig=pw;iv.AxiosHeaders=bm;iv.formToJSON=e=>SW(uo.isHTMLForm(e)?new FormData(e):e);iv.getAdapter=LW.getAdapter;iv.HttpStatusCode=iz;iv.default=iv;const{Axios:fTe,AxiosError:hTe,CanceledError:dTe,isCancel:vTe,CancelToken:pTe,VERSION:mTe,all:gTe,Cancel:yTe,isAxiosError:_Te,spread:xTe,toFormData:bTe,AxiosHeaders:wTe,HttpStatusCode:TTe,formToJSON:ATe,getAdapter:STe,mergeConfig:ETe}=iv,Hse="http://localhost:8000/api/v1",Gse=parseInt("30000"),Qc=iv.create({baseURL:Hse,timeout:Gse,headers:{"Content-Type":"application/json"}});Qc.interceptors.request.use(e=>e,e=>Promise.reject(e));Qc.interceptors.response.use(e=>e,e=>(e.response?console.error(`API Error: ${e.response.status}`,e.response.data):e.request?console.error("API Error: No response received",e.request):console.error("API Error:",e.message),Promise.reject(e)));const Xse=async e=>(await Qc.post("/sessions",e||{})).data,Wse=async e=>{const S=(await Qc.get(`/sessions/${e}`)).data;return{...S,variable_count:S.search_space?.n_variables??S.variable_count??0,experiment_count:S.data?.n_experiments??S.experiment_count??0,model_trained:S.model?.is_trained??S.model_trained??!1}},Yse=async e=>(await Qc.get(`/sessions/${e}/state`)).data,Zse=async e=>(await Qc.get(`/sessions/${e}/export`,{responseType:"blob"})).data,$se=async e=>{await Qc.post(`/sessions/${e}/save`)},Kse=async e=>{const n=new FormData;return n.append("file",e),(await Qc.post("/sessions/import",n,{headers:{"Content-Type":"multipart/form-data"}})).data};function Jse(e){return pg({queryKey:["session",e],queryFn:()=>Wse(e),enabled:!!e})}function Qse(e,n){return pg({queryKey:["session-state",e],queryFn:()=>Yse(e),enabled:!!e,refetchInterval:n})}function ele(){const e=t0();return fp({mutationFn:n=>Xse(n),onSuccess:n=>{zW(n.session_id),e.invalidateQueries({queryKey:["session"]})}})}function tle(e){const n=t0();return fp({mutationFn:async S=>{if(!e)throw new Error("No session ID provided");const L=await fetch(`/api/v1/sessions/${e}/metadata`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(S)});if(!L.ok)throw new Error("Failed to update metadata");return L.json()},onSuccess:()=>{n.invalidateQueries({queryKey:["session",e]})}})}const OW="alchemist_session_id";function zW(e){localStorage.setItem(OW,e)}function rle(){localStorage.removeItem(OW)}function nle(){return fp({mutationFn:async e=>{const{sessionId:n,serverSide:S}=e;if(S)return await $se(n),{success:!0,serverSide:!0};const L=await Zse(n),re=window.URL.createObjectURL(L),ve=document.createElement("a");return ve.href=re,ve.download=`alchemist_session_${n.slice(0,8)}.json`,document.body.appendChild(ve),ve.click(),document.body.removeChild(ve),window.URL.revokeObjectURL(re),{success:!0,serverSide:!1}}})}function ale(){const e=t0();return fp({mutationFn:n=>Kse(n),onSuccess:n=>{zW(n.session_id),e.clear(),e.invalidateQueries({queryKey:["session"]})}})}function ile(e,n){const[S,L]=na.useState(null),[re,ve]=na.useState(!1),[Ce,Be]=na.useState(null),Ge=na.useRef(null),Ke=na.useRef(null),dt=na.useRef(null),gt=na.useRef(n),Vt=t0();na.useEffect(()=>{gt.current=n},[n]);const Xt=na.useCallback(()=>{if(e){Ge.current&&Ge.current.close();try{const cr=window.location.protocol==="https:"?"wss:":"ws:",sr=window.location.hostname,nr="8000",zr=new WebSocket(`${cr}//${sr}:${nr}/api/v1/ws/sessions/${e}`);zr.onopen=()=>{console.log("✓ WebSocket connected for session events"),ve(!0),Be(null)},zr.onmessage=Ne=>{try{const Jr=JSON.parse(Ne.data);if(Jr.event==="connected")console.log("✓ WebSocket connection confirmed");else if(Jr.event==="lock_status_changed"){const pn={locked:Jr.locked,locked_by:Jr.locked_by,locked_at:Jr.locked_at};L(pn);const Lr=dt.current;Lr!==null&&Lr!==Jr.locked&&(Jr.locked?Il.info(`External controller connected: ${Jr.locked_by}`,{duration:5e3}):Il.info("External controller disconnected - resuming interactive mode",{duration:3e3})),dt.current=Jr.locked,gt.current&&gt.current(Jr.locked,Jr.locked_by)}else Jr.event==="experiments_updated"?(Vt.invalidateQueries({queryKey:["experiments",e]}),Vt.invalidateQueries({queryKey:["experiments-summary",e]}),Vt.invalidateQueries({queryKey:["session",e]}),Il.info(`Experiment data updated (${Jr.n_experiments} total)`,{duration:3e3})):Jr.event==="model_trained"&&(Vt.invalidateQueries({queryKey:["model-info",e]}),Vt.invalidateQueries({queryKey:["session",e]}),Il.info("Model retrained with new data",{duration:3e3}))}catch(Jr){console.error("Failed to parse WebSocket message:",Jr)}},zr.onerror=Ne=>{console.error("WebSocket error:",Ne),Be(new Error("WebSocket connection error"))},zr.onclose=()=>{console.log("WebSocket disconnected"),ve(!1),Ge.current=null,e&&(Ke.current=setTimeout(()=>{console.log("Attempting to reconnect WebSocket..."),Xt()},5e3))},Ge.current=zr}catch(cr){const sr=cr instanceof Error?cr:new Error("Failed to create WebSocket");Be(sr),console.error("Error creating WebSocket:",sr)}}},[e,Vt]);return na.useEffect(()=>{if(!e){Ge.current&&(Ge.current.close(),Ge.current=null),Ke.current&&clearTimeout(Ke.current),ve(!1),L(null),dt.current=null;return}return Xt(),()=>{Ge.current&&(Ge.current.close(),Ge.current=null),Ke.current&&clearTimeout(Ke.current)}},[e,Xt]),{lockStatus:S,isConnected:re,error:Ce}}const ole=e=>e==="continuous"?"real":e==="discrete"?"integer":e==="discrete_numeric"?"discrete":"categorical",NW=e=>{const n={name:e.name,type:ole(e.type)};return e.unit&&(n.unit=e.unit),e.description&&(n.description=e.description),e.type==="continuous"||e.type==="discrete"?e.bounds&&(n.min=e.bounds[0],n.max=e.bounds[1]):e.type==="categorical"?n.categories=e.categories:e.type==="discrete_numeric"&&(n.allowed_values=e.allowed_values),n},FW=async(e,n)=>{const S=NW(n);return(await Qc.post(`/sessions/${e}/variables`,S)).data},BW=async(e,n,S)=>{const L=NW(S);return(await Qc.put(`/sessions/${e}/variables/${n}`,L)).data},jW=async e=>(await Qc.get(`/sessions/${e}/variables`)).data,sle=async(e,n)=>{await Qc.delete(`/sessions/${e}/variables/${n}`)},UW=async(e,n)=>{const S=new FormData;return S.append("file",n),(await Qc.post(`/sessions/${e}/variables/load`,S,{headers:{"Content-Type":"multipart/form-data"}})).data},qW=async e=>{const n=await Qc.get(`/sessions/${e}/variables/export`,{responseType:"blob"}),S=new Blob([n.data],{type:"application/json"}),L=window.URL.createObjectURL(S),re=document.createElement("a");re.href=L,re.download=`variables_${e.slice(0,8)}.json`,document.body.appendChild(re),re.click(),document.body.removeChild(re),window.URL.revokeObjectURL(L)},lle=Object.freeze(Object.defineProperty({__proto__:null,createVariable:FW,deleteVariable:sle,exportVariablesToFile:qW,getVariables:jW,loadVariablesFromFile:UW,updateVariable:BW},Symbol.toStringTag,{value:"Module"}));function UP(e){return pg({queryKey:["variables",e],queryFn:()=>jW(e),enabled:!!e})}function ule(e){const n=t0();return fp({mutationFn:S=>FW(e,S),onSuccess:()=>{n.invalidateQueries({queryKey:["variables",e]}),n.invalidateQueries({queryKey:["session",e]}),Il.success("Variable added successfully!")},onError:S=>{Il.error(S.response?.data?.detail||"Failed to add variable")}})}function cle(e){const n=t0();return fp({mutationFn:({variableName:S,variable:L})=>BW(e,S,L),onSuccess:()=>{n.invalidateQueries({queryKey:["variables",e]}),n.invalidateQueries({queryKey:["session",e]}),Il.success("Variable updated successfully!")},onError:S=>{Il.error(S.response?.data?.detail||"Failed to update variable")}})}function fle(e){const n=t0();return fp({mutationFn:async S=>{await Qc.delete(`/sessions/${e}/variables/${S}`)},onSuccess:()=>{n.invalidateQueries({queryKey:["variables",e]}),n.invalidateQueries({queryKey:["session",e]}),Il.success("Variable deleted successfully!")},onError:S=>{Il.error(S.response?.data?.detail||"Failed to delete variable")}})}function hle({variables:e,sessionId:n,onEdit:S}){const L=fle(n),re=async Be=>{if(window.confirm(`Delete variable "${Be}"?`))try{await L.mutateAsync(Be)}catch(Ge){console.error("Delete failed:",Ge)}},ve=Be=>Be.type==="categorical"&&Be.categories?Be.categories.join(", "):Be.type==="discrete"&&Be.allowed_values&&Be.allowed_values.length>0?Be.allowed_values.join(", "):Be.bounds&&Array.isArray(Be.bounds)&&Be.bounds.length===2?`${Be.bounds[0]} to ${Be.bounds[1]}`:"-",Ce=Be=>Be==="real"?"Real":Be==="integer"?"Integer":Be==="categorical"?"Categorical":Be==="discrete"?"Discrete":Be;return lt.jsxs("div",{className:"border rounded-lg overflow-hidden",children:[lt.jsxs("div",{className:"bg-muted/50 border-b px-4 py-2 grid grid-cols-12 gap-3 font-medium text-xs",children:[lt.jsx("div",{className:"col-span-2",children:"Name"}),lt.jsx("div",{className:"col-span-2",children:"Type"}),lt.jsx("div",{className:"col-span-3",children:"Range/Values"}),lt.jsx("div",{className:"col-span-1",children:"Unit"}),lt.jsx("div",{className:"col-span-2",children:"Description"}),lt.jsx("div",{className:"col-span-2 text-right",children:"Actions"})]}),lt.jsx("div",{className:"divide-y",children:e.map((Be,Ge)=>lt.jsxs("div",{className:"px-4 py-2.5 grid grid-cols-12 gap-3 items-center hover:bg-accent/50 transition-colors",children:[lt.jsx("div",{className:"col-span-2 font-medium text-xs",children:Be.name}),lt.jsx("div",{className:"col-span-2 text-xs",children:Ce(Be.type)}),lt.jsx("div",{className:"col-span-3 text-xs text-muted-foreground",children:ve(Be)}),lt.jsx("div",{className:"col-span-1 text-xs text-muted-foreground",children:Be.unit||"-"}),lt.jsx("div",{className:"col-span-2 text-xs text-muted-foreground truncate",title:Be.description||"",children:Be.description||"-"}),lt.jsxs("div",{className:"col-span-2 flex justify-end gap-2",children:[lt.jsx("button",{onClick:()=>S(Be),className:"text-xs text-primary hover:text-primary/80",title:"Edit variable",children:"Edit"}),lt.jsx("button",{onClick:()=>re(Be.name),className:"text-xs text-destructive hover:text-destructive/80",title:"Delete variable",disabled:L.isPending,children:"Delete"})]})]},`${Be.name}-${Ge}`))}),lt.jsxs("div",{className:"bg-muted/30 border-t px-4 py-2 text-sm text-muted-foreground",children:[e.length," variable",e.length!==1?"s":""," defined"]})]})}const dle="modulepreload",vle=function(e){return"/"+e},rj={},z7=function(n,S,L){let re=Promise.resolve();if(S&&S.length>0){let Ke=function(dt){return Promise.all(dt.map(gt=>Promise.resolve(gt).then(Vt=>({status:"fulfilled",value:Vt}),Vt=>({status:"rejected",reason:Vt}))))};var Ce=Ke;document.getElementsByTagName("link");const Be=document.querySelector("meta[property=csp-nonce]"),Ge=Be?.nonce||Be?.getAttribute("nonce");re=Ke(S.map(dt=>{if(dt=vle(dt),dt in rj)return;rj[dt]=!0;const gt=dt.endsWith(".css"),Vt=gt?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${dt}"]${Vt}`))return;const Xt=document.createElement("link");if(Xt.rel=gt?"stylesheet":dle,gt||(Xt.as="script"),Xt.crossOrigin="",Xt.href=dt,Ge&&Xt.setAttribute("nonce",Ge),document.head.appendChild(Xt),gt)return new Promise((cr,sr)=>{Xt.addEventListener("load",cr),Xt.addEventListener("error",()=>sr(new Error(`Unable to preload CSS for ${dt}`)))})}))}function ve(Be){const Ge=new Event("vite:preloadError",{cancelable:!0});if(Ge.payload=Be,window.dispatchEvent(Ge),!Ge.defaultPrevented)throw Be}return re.then(Be=>{for(const Ge of Be||[])Ge.status==="rejected"&&ve(Ge.reason);return n().catch(ve)})};function ple({sessionId:e,onClose:n,editingVariable:S}){const L=!!S,re=qn=>qn==="real"?"continuous":qn==="integer"?"discrete":qn==="discrete"?"discrete_numeric":qn==="categorical"?"categorical":"continuous",[ve,Ce]=na.useState(""),[Be,Ge]=na.useState("continuous"),[Ke,dt]=na.useState(""),[gt,Vt]=na.useState(""),[Xt,cr]=na.useState([]),[sr,nr]=na.useState(""),[zr,Ne]=na.useState(""),[Jr,pn]=na.useState(""),[Lr,Or]=na.useState("");na.useEffect(()=>{S&&(Ce(S.name),Ge(re(S.type)),S.bounds&&(dt(S.bounds[0].toString()),Vt(S.bounds[1].toString())),S.categories&&cr(S.categories),S.allowed_values&&Ne(S.allowed_values.join(", ")),pn(S.unit||""),Or(S.description||""))},[S]);const cn=ule(e),$n=cle(e),xn=async qn=>{if(qn.preventDefault(),!ve.trim()){Il.error("Variable name is required");return}const ca={name:ve.trim(),type:Be,unit:Jr.trim()||void 0,description:Lr.trim()||void 0};if(Be==="continuous"||Be==="discrete"){const Fn=parseFloat(Ke),da=parseFloat(gt);if(isNaN(Fn)||isNaN(da)){Il.error("Min and Max values must be numbers");return}if(Fn>=da){Il.error("Min must be less than Max");return}ca.bounds=[Fn,da]}else if(Be==="categorical"){if(Xt.length===0){Il.error("At least one category is required");return}ca.categories=Xt}else if(Be==="discrete_numeric"){const Fn=zr.split(",").map(da=>parseFloat(da.trim())).filter(da=>!isNaN(da));if(Fn.length<2){Il.error("At least 2 numeric allowed values are required (comma-separated)");return}if(new Set(Fn).size!==Fn.length){Il.error("Allowed values must not contain duplicates");return}ca.allowed_values=Fn}try{if(L&&S)if(ca.name!==S.name){const{deleteVariable:Fn}=await z7(async()=>{const{deleteVariable:da}=await Promise.resolve().then(()=>lle);return{deleteVariable:da}},void 0);await Fn(e,S.name),await cn.mutateAsync(ca)}else await $n.mutateAsync({variableName:S.name,variable:ca});else await cn.mutateAsync(ca);n()}catch(Fn){console.error("Error saving variable:",Fn)}},Wa=()=>{const qn=sr.trim();qn&&!Xt.includes(qn)&&(cr([...Xt,qn]),nr(""))},On=qn=>{cr(Xt.filter((ca,Fn)=>Fn!==qn))};return lt.jsxs("div",{className:"space-y-4",children:[lt.jsxs("div",{className:"flex items-center justify-between",children:[lt.jsx("h3",{className:"text-lg font-semibold",children:L?"Edit Variable":"Add Variable"}),lt.jsx("button",{onClick:n,className:"text-muted-foreground hover:text-foreground",children:"✕"})]}),lt.jsxs("form",{onSubmit:xn,className:"space-y-4",children:[lt.jsxs("div",{children:[lt.jsx("label",{className:"block text-sm font-medium mb-1",children:"Variable Name *"}),lt.jsx("input",{type:"text",value:ve,onChange:qn=>Ce(qn.target.value),placeholder:"e.g., temperature",className:"w-full px-3 py-2 border border-input rounded-md bg-background",required:!0})]}),lt.jsxs("div",{children:[lt.jsx("label",{className:"block text-sm font-medium mb-1",children:"Type *"}),lt.jsxs("select",{value:Be,onChange:qn=>Ge(qn.target.value),className:"w-full px-3 py-2 border border-input rounded-md bg-background",children:[lt.jsx("option",{value:"continuous",children:"Real (Continuous)"}),lt.jsx("option",{value:"discrete",children:"Integer (Range)"}),lt.jsx("option",{value:"discrete_numeric",children:"Discrete (Specific Values)"}),lt.jsx("option",{value:"categorical",children:"Categorical"})]})]}),(Be==="continuous"||Be==="discrete")&&lt.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[lt.jsxs("div",{children:[lt.jsx("label",{className:"block text-sm font-medium mb-1",children:"Min *"}),lt.jsx("input",{type:"number",step:Be==="continuous"?"any":"1",value:Ke,onChange:qn=>dt(qn.target.value),placeholder:"Min value",className:"w-full px-3 py-2 border border-input rounded-md bg-background",required:!0})]}),lt.jsxs("div",{children:[lt.jsx("label",{className:"block text-sm font-medium mb-1",children:"Max *"}),lt.jsx("input",{type:"number",step:Be==="continuous"?"any":"1",value:gt,onChange:qn=>Vt(qn.target.value),placeholder:"Max value",className:"w-full px-3 py-2 border border-input rounded-md bg-background",required:!0})]})]}),Be==="categorical"&&lt.jsxs("div",{children:[lt.jsx("label",{className:"block text-sm font-medium mb-1",children:"Categories *"}),lt.jsxs("div",{className:"flex gap-2 mb-2",children:[lt.jsx("input",{type:"text",value:sr,onChange:qn=>nr(qn.target.value),onKeyPress:qn=>qn.key==="Enter"&&(qn.preventDefault(),Wa()),placeholder:"Enter category value",className:"flex-1 px-3 py-2 border border-input rounded-md bg-background"}),lt.jsx("button",{type:"button",onClick:Wa,className:"px-4 py-2 bg-secondary text-secondary-foreground rounded-md hover:bg-secondary/80",children:"Add"})]}),lt.jsx("div",{className:"flex flex-wrap gap-2",children:Xt.map((qn,ca)=>lt.jsxs("div",{className:"flex items-center gap-1 px-3 py-1 bg-primary/10 rounded-md",children:[lt.jsx("span",{className:"text-sm",children:qn}),lt.jsx("button",{type:"button",onClick:()=>On(ca),className:"text-destructive hover:text-destructive/80 ml-1",children:"✕"})]},ca))}),Xt.length===0&&lt.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:"Add at least one category value"})]}),Be==="discrete_numeric"&&lt.jsxs("div",{children:[lt.jsxs("label",{className:"block text-sm font-medium mb-1",children:["Allowed Values * ",lt.jsx("span",{className:"text-muted-foreground font-normal",children:"(comma-separated)"})]}),lt.jsx("input",{type:"text",value:zr,onChange:qn=>Ne(qn.target.value),placeholder:"e.g., 80, 180, 280",className:"w-full px-3 py-2 border border-input rounded-md bg-background"}),lt.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Numeric values this variable can take (at least 2, no duplicates)"})]}),lt.jsxs("div",{children:[lt.jsx("label",{className:"block text-sm font-medium mb-1",children:"Unit (optional)"}),lt.jsx("input",{type:"text",value:Jr,onChange:qn=>pn(qn.target.value),placeholder:"e.g., °C, bar, mol/L",className:"w-full px-3 py-2 border border-input rounded-md bg-background"})]}),lt.jsxs("div",{children:[lt.jsx("label",{className:"block text-sm font-medium mb-1",children:"Description (optional)"}),lt.jsx("textarea",{value:Lr,onChange:qn=>Or(qn.target.value),placeholder:"Brief description of this variable",rows:2,className:"w-full px-3 py-2 border border-input rounded-md bg-background resize-none"})]}),lt.jsxs("div",{className:"flex gap-2 pt-4",children:[lt.jsx("button",{type:"submit",disabled:cn.isPending||$n.isPending,className:"flex-1 bg-primary text-primary-foreground px-4 py-2 rounded-md hover:bg-primary/90 disabled:opacity-50",children:cn.isPending||$n.isPending?"Saving...":L?"Update Variable":"Add Variable"}),lt.jsx("button",{type:"button",onClick:n,className:"px-4 py-2 border border-input rounded-md hover:bg-accent",children:"Cancel"})]})]})]})}function mle(e){const n=t0();return fp({mutationFn:S=>UW(e,S),onSuccess:S=>{n.invalidateQueries({queryKey:["variables",e]}),n.invalidateQueries({queryKey:["session",e]}),Il.success(S.message||`Loaded ${S.n_variables} variables`)},onError:S=>{Il.error(S.response?.data?.detail||"Failed to load variables from file"),console.error("Load variables error:",S)}})}function gle(e){return fp({mutationFn:()=>qW(e),onSuccess:()=>{Il.success("Variables exported successfully")},onError:n=>{Il.error(n.response?.data?.detail||"Failed to export variables"),console.error("Export variables error:",n)}})}function yle({sessionId:e}){const[n,S]=na.useState(!1),[L,re]=na.useState(null),ve=na.useRef(null),{data:Ce,isLoading:Be}=UP(e),Ge=mle(e),Ke=gle(e),dt=()=>{re(null),S(!0)},gt=sr=>{re(sr),S(!0)},Vt=()=>{ve.current?.click()},Xt=async sr=>{const nr=sr.target.files?.[0];nr&&(await Ge.mutateAsync(nr),ve.current&&(ve.current.value=""))},cr=async()=>{await Ke.mutateAsync()};return lt.jsxs("div",{className:"space-y-3",children:[lt.jsx("h3",{className:"text-sm font-semibold uppercase tracking-wide text-muted-foreground border-b pb-2",children:"Variable Management"}),Be?lt.jsx("div",{className:"text-sm text-muted-foreground",children:"Loading..."}):Ce&&Ce.n_variables>0?lt.jsx(hle,{variables:Ce.variables,sessionId:e,onEdit:gt}):lt.jsx("div",{className:"border border-dashed border-muted-foreground/20 rounded p-6 text-center",children:lt.jsx("p",{className:"text-xs text-muted-foreground",children:"No variables defined"})}),lt.jsxs("div",{className:"flex flex-col gap-1.5",children:[lt.jsx("button",{onClick:dt,className:"w-full bg-primary text-primary-foreground px-3 py-2 rounded text-sm font-medium hover:bg-primary/90 transition-colors",children:"Add Variable"}),lt.jsxs("div",{className:"flex gap-1.5",children:[lt.jsx("button",{onClick:Vt,disabled:Ge.isPending,className:"flex-1 border border-input px-3 py-1.5 rounded text-xs hover:bg-accent disabled:opacity-50",children:"Load File"}),lt.jsx("button",{onClick:cr,disabled:Ke.isPending||!Ce||Ce.n_variables===0,className:"flex-1 border border-input px-3 py-1.5 rounded text-xs hover:bg-accent disabled:opacity-50",children:"Save File"})]})]}),lt.jsx("input",{ref:ve,type:"file",accept:".json",onChange:Xt,className:"hidden"}),n&&lt.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:lt.jsx("div",{className:"bg-background rounded-lg p-6 max-w-lg w-full mx-4 max-h-[90vh] overflow-y-auto shadow-xl border",children:lt.jsx(ple,{sessionId:e,onClose:()=>S(!1),editingVariable:L})})})]})}const _le=async(e,n,S)=>{const L=new FormData;L.append("file",n);const re=S?Array.isArray(S)?S.join(","):S:void 0,ve=re?`/sessions/${e}/experiments/upload?target_columns=${encodeURIComponent(re)}`:`/sessions/${e}/experiments/upload`;return(await Qc.post(ve,L,{headers:{"Content-Type":"multipart/form-data"}})).data},xle=async(e,n)=>{const S=new FormData;return S.append("file",n),(await Qc.post(`/sessions/${e}/experiments/preview`,S,{headers:{"Content-Type":"multipart/form-data"}})).data},ble=async e=>(await Qc.get(`/sessions/${e}/experiments`)).data,wle=async e=>(await Qc.get(`/sessions/${e}/experiments/summary`)).data,Tle=async(e,n)=>(await Qc.post(`/sessions/${e}/initial-design`,n)).data,Ale=async(e,n)=>(await Qc.post(`/sessions/${e}/optimal-design/info`,n)).data,Sle=async(e,n)=>(await Qc.post(`/sessions/${e}/optimal-design`,n)).data;function Ele(e){return pg({queryKey:["experiments",e],queryFn:()=>ble(e),enabled:!!e})}function N7(e){return pg({queryKey:["experiments-summary",e],queryFn:()=>wle(e),enabled:!!e})}function Mle(e){const n=t0();return fp({mutationFn:({file:S,targetColumns:L})=>_le(e,S,L),onSuccess:S=>{n.invalidateQueries({queryKey:["experiments",e]}),n.invalidateQueries({queryKey:["experiments-summary",e]}),n.invalidateQueries({queryKey:["session",e]}),Il.success(`Loaded ${S.n_experiments||0} experiments successfully!`)},onError:S=>{Il.error(S.response?.data?.detail||"Failed to upload experiments")}})}function Cle(e){return fp({mutationFn:n=>xle(e,n),onError:n=>{Il.error(n.response?.data?.detail||"Failed to preview CSV file")}})}function kle(e){return fp({mutationFn:n=>Tle(e,n),onSuccess:n=>{Il.success(`Generated ${n.n_points} initial design points using ${n.method}`)},onError:n=>{Il.error(n.response?.data?.detail||"Failed to generate initial design")}})}function Ple(e){return fp({mutationFn:n=>Ale(e,n),onError:n=>{Il.error(n.response?.data?.detail||"Failed to preview optimal design")}})}function Lle(e){return fp({mutationFn:n=>Sle(e,n),onSuccess:n=>{const S=n.design_info?.D_eff,L=S!=null?` (D_eff=${S.toFixed(1)}%)`:"";Il.success(`Generated ${n.n_points} optimal design points${L}`)},onError:n=>{Il.error(n.response?.data?.detail||"Failed to generate optimal design")}})}/**
 * @license lucide-react v0.454.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Rle=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),VW=(...e)=>e.filter((n,S,L)=>!!n&&n.trim()!==""&&L.indexOf(n)===S).join(" ").trim();/**
 * @license lucide-react v0.454.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */var Ile={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
 * @license lucide-react v0.454.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Dle=na.forwardRef(({color:e="currentColor",size:n=24,strokeWidth:S=2,absoluteStrokeWidth:L,className:re="",children:ve,iconNode:Ce,...Be},Ge)=>na.createElement("svg",{ref:Ge,...Ile,width:n,height:n,stroke:e,strokeWidth:L?Number(S)*24/Number(n):S,className:VW("lucide",re),...Be},[...Ce.map(([Ke,dt])=>na.createElement(Ke,dt)),...Array.isArray(ve)?ve:[ve]]));/**
 * @license lucide-react v0.454.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const bd=(e,n)=>{const S=na.forwardRef(({className:L,...re},ve)=>na.createElement(Dle,{ref:ve,iconNode:n,className:VW(`lucide-${Rle(e)}`,L),...re}));return S.displayName=`${e}`,S};/**
 * @license lucide-react v0.454.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const nj=bd("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
 * @license lucide-react v0.454.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const W8=bd("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
 * @license lucide-react v0.454.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ole=bd("ChartLine",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]]);/**
 * @license lucide-react v0.454.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const zle=bd("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
 * @license lucide-react v0.454.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const H5=bd("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
 * @license lucide-react v0.454.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const G5=bd("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
 * @license lucide-react v0.454.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Nle=bd("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
 * @license lucide-react v0.454.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Fle=bd("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
 * @license lucide-react v0.454.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ble=bd("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
 * @license lucide-react v0.454.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const jle=bd("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
 * @license lucide-react v0.454.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ule=bd("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
 * @license lucide-react v0.454.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const qle=bd("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
 * @license lucide-react v0.454.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const HW=bd("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
 * @license lucide-react v0.454.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const GW=bd("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
 * @license lucide-react v0.454.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const XW=bd("ListPlus",[["path",{d:"M11 12H3",key:"51ecnj"}],["path",{d:"M16 6H3",key:"1wxfjs"}],["path",{d:"M16 18H3",key:"12xzn7"}],["path",{d:"M18 9v6",key:"1twb98"}],["path",{d:"M21 12h-6",key:"bt1uis"}]]);/**
 * @license lucide-react v0.454.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ux=bd("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
 * @license lucide-react v0.454.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Vle=bd("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
 * @license lucide-react v0.454.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Hle=bd("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
 * @license lucide-react v0.454.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const aj=bd("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
 * @license lucide-react v0.454.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Gle=bd("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
 * @license lucide-react v0.454.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Xle=bd("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);/**
 * @license lucide-react v0.454.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const qP=bd("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
 * @license lucide-react v0.454.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Wle=bd("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);function Yle({suggestion:e,index:n=0,total:S=1,iteration:L,onCancel:re,onConfirm:ve,onPrev:Ce,onNext:Be}){const Ge={};Object.keys(e||{}).forEach(xn=>{!xn.startsWith("_")&&xn!=="Output"&&xn!=="Noise"&&xn!=="Iteration"&&xn!=="Reason"&&(Ge[xn]=e[xn])});const[Ke,dt]=na.useState(Ge),[gt,Vt]=na.useState(e?.Output?.toString()??""),[Xt,cr]=na.useState(e?.Noise?.toString()??""),sr=e?._reason||e?.Reason||"Acquisition",[nr,zr]=na.useState(sr),[Ne,Jr]=na.useState(!0),[pn,Lr]=na.useState(!0),Or=e?.Iteration??L??"N/A";function cn(xn,Wa){dt(On=>({...On,[xn]:Wa}))}function $n(){const xn={inputs:{...Ke}};gt!==""&&(xn.output=Number(gt)),Xt!==""&&(xn.noise=Number(Xt)),nr&&(xn.reason=nr),ve(xn,{saveToFile:Ne,retrain:pn})}return lt.jsxs("div",{className:"bg-card border border-border rounded-lg shadow-lg w-full max-w-2xl max-h-[85vh] overflow-auto",children:[lt.jsxs("div",{className:"border-b border-border p-4 flex items-center justify-between",children:[lt.jsxs("div",{className:"flex-1",children:[lt.jsx("h3",{className:"text-lg font-semibold",children:S>1?`Pending Suggestion ${n+1} of ${S}`:"Add Experimental Result"}),S>1&&lt.jsx("p",{className:"text-sm text-green-600 dark:text-green-500 mt-1",children:sr})]}),S>1&&lt.jsxs("div",{className:"flex gap-2 ml-4",children:[lt.jsx("button",{onClick:Ce,disabled:!Ce,className:"px-3 py-1.5 text-sm rounded border border-border hover:bg-accent disabled:opacity-50 disabled:cursor-not-allowed",children:"← Previous"}),lt.jsx("button",{onClick:Be,disabled:!Be,className:"px-3 py-1.5 text-sm rounded border border-border hover:bg-accent disabled:opacity-50 disabled:cursor-not-allowed",children:"Next →"})]}),lt.jsx("button",{onClick:re,className:"ml-2 p-1.5 rounded hover:bg-accent",title:"Close",children:lt.jsx(qP,{className:"w-4 h-4"})})]}),lt.jsxs("div",{className:"p-6 space-y-4",children:[lt.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[Object.entries(Ke).map(([xn,Wa])=>lt.jsxs("div",{className:"space-y-1",children:[lt.jsx("label",{className:"block text-sm font-medium text-muted-foreground",children:xn}),lt.jsx("input",{type:"text",value:String(Wa??""),onChange:On=>cn(xn,On.target.value),className:"w-full px-3 py-2 text-sm rounded-md border border-border bg-background text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary/50"})]},xn)),lt.jsxs("div",{className:"space-y-1",children:[lt.jsx("label",{className:"block text-sm font-medium text-muted-foreground",children:"Output"}),lt.jsx("input",{type:"number",step:"any",value:gt,onChange:xn=>Vt(xn.target.value),autoFocus:!0,className:"w-full px-3 py-2 text-sm rounded-md border border-border bg-background text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary/50"})]}),lt.jsxs("div",{className:"space-y-1",children:[lt.jsx("label",{className:"block text-sm font-medium text-muted-foreground",children:"Noise (optional)"}),lt.jsx("input",{type:"number",step:"any",value:Xt,onChange:xn=>cr(xn.target.value),placeholder:"1e-6",className:"w-full px-3 py-2 text-sm rounded-md border border-border bg-background text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary/50"})]})]}),lt.jsxs("div",{className:"grid grid-cols-2 gap-4 pt-2 border-t border-border",children:[lt.jsxs("div",{className:"space-y-1",children:[lt.jsx("label",{className:"block text-sm font-medium text-muted-foreground",children:"Iteration"}),lt.jsx("div",{className:"px-3 py-2 text-sm rounded-md border border-border bg-muted text-foreground",children:Or})]}),lt.jsxs("div",{className:"space-y-1",children:[lt.jsx("label",{className:"block text-sm font-medium text-muted-foreground",children:"Reason"}),lt.jsx("input",{type:"text",value:nr,onChange:xn=>zr(xn.target.value),className:"w-full px-3 py-2 text-sm rounded-md border border-border bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-primary/50"})]})]}),lt.jsxs("div",{className:"flex items-center gap-6 pt-4 border-t border-border",children:[lt.jsxs("label",{className:"flex items-center gap-2 text-sm cursor-pointer",children:[lt.jsx("input",{type:"checkbox",checked:Ne,onChange:xn=>Jr(xn.target.checked),className:"w-4 h-4 rounded border-border text-primary focus:ring-2 focus:ring-primary/50"}),lt.jsx("span",{children:"Save to file"})]}),lt.jsxs("label",{className:"flex items-center gap-2 text-sm cursor-pointer",children:[lt.jsx("input",{type:"checkbox",checked:pn,onChange:xn=>Lr(xn.target.checked),className:"w-4 h-4 rounded border-border text-primary focus:ring-2 focus:ring-primary/50"}),lt.jsx("span",{children:"Retrain model"})]})]})]}),lt.jsxs("div",{className:"border-t border-border p-4 flex justify-end gap-3",children:[lt.jsx("button",{onClick:re,className:"px-4 py-2 text-sm rounded-md border border-border hover:bg-accent",children:"Cancel"}),lt.jsx("button",{onClick:$n,className:"px-4 py-2 text-sm rounded-md bg-primary text-primary-foreground hover:bg-primary/90",children:"Save & Close"})]})]})}function Zle({open:e,onClose:n,availableColumns:S,recommendedColumn:L,onConfirm:re}){const[ve,Ce]=na.useState("single"),[Be,Ge]=na.useState(L||S[0]||""),[Ke,dt]=na.useState(new Set),gt=()=>{if(ve==="single"){if(!Be)return;re(Be)}else{if(Ke.size<2)return;re(Array.from(Ke))}n()},Vt=cr=>{const sr=new Set(Ke);sr.has(cr)?sr.delete(cr):sr.add(cr),dt(sr)},Xt=ve==="single"?!Be:Ke.size<2;return e?lt.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:n,children:lt.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-xl w-full max-w-md mx-4",onClick:cr=>cr.stopPropagation(),children:[lt.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-gray-200 dark:border-gray-700",children:[lt.jsxs("div",{children:[lt.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Select Target Column(s)"}),lt.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 mt-1",children:"The 'Output' column was not found. Please select which column(s) to use as optimization target(s)."})]}),lt.jsx("button",{onClick:n,className:"text-gray-400 hover:text-gray-600 dark:hover:text-gray-300",children:lt.jsx(qP,{size:20})})]}),lt.jsxs("div",{className:"p-4 space-y-4",children:[lt.jsxs("div",{className:"space-y-2",children:[lt.jsx("label",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:"Optimization Type"}),lt.jsxs("div",{className:"flex gap-4",children:[lt.jsxs("label",{className:"flex items-center space-x-2 cursor-pointer",children:[lt.jsx("input",{type:"radio",name:"mode",value:"single",checked:ve==="single",onChange:()=>Ce("single"),className:"w-4 h-4 text-blue-600"}),lt.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:"Single-Objective"})]}),lt.jsxs("label",{className:"flex items-center space-x-2 cursor-pointer",children:[lt.jsx("input",{type:"radio",name:"mode",value:"multi",checked:ve==="multi",onChange:()=>Ce("multi"),className:"w-4 h-4 text-blue-600"}),lt.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:"Multi-Objective"})]})]})]}),ve==="single"&&lt.jsxs("div",{className:"space-y-2",children:[lt.jsx("label",{htmlFor:"target-column",className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:"Target Column"}),lt.jsx("select",{id:"target-column",value:Be,onChange:cr=>Ge(cr.target.value),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md bg-white dark:bg-gray-700 text-gray-900 dark:text-white focus:outline-none focus:ring-2 focus:ring-blue-500",children:S.map(cr=>lt.jsxs("option",{value:cr,children:[cr,cr===L?" (recommended)":""]},cr))})]}),ve==="multi"&&lt.jsxs("div",{className:"space-y-2",children:[lt.jsxs("label",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:["Target Columns"," ",lt.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:"(select at least 2)"})]}),lt.jsx("div",{className:"border border-gray-300 dark:border-gray-600 rounded-md max-h-48 overflow-y-auto p-3 space-y-2 bg-white dark:bg-gray-700",children:S.map(cr=>lt.jsxs("label",{className:"flex items-center space-x-2 cursor-pointer",children:[lt.jsx("input",{type:"checkbox",checked:Ke.has(cr),onChange:()=>Vt(cr),className:"w-4 h-4 text-blue-600 rounded"}),lt.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:cr})]},cr))}),ve==="multi"&&Ke.size===1&&lt.jsx("p",{className:"text-xs text-amber-600 dark:text-amber-400",children:"Select at least one more column for multi-objective optimization"})]})]}),lt.jsxs("div",{className:"flex justify-end gap-3 p-4 border-t border-gray-200 dark:border-gray-700",children:[lt.jsx("button",{onClick:n,className:"px-4 py-2 text-sm font-medium text-gray-700 dark:text-gray-300 bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded-md hover:bg-gray-50 dark:hover:bg-gray-600",children:"Cancel"}),lt.jsx("button",{onClick:gt,disabled:Xt,className:"px-4 py-2 text-sm font-medium text-white bg-blue-600 rounded-md hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed",children:"Confirm"})]})]})}):null}function $le({sessionId:e,pendingSuggestions:n=[],onStageSuggestions:S}){const[L,re]=na.useState(!1),[ve,Ce]=na.useState(0),[Be,Ge]=na.useState(!1),[Ke,dt]=na.useState([]),[gt,Vt]=na.useState(),[Xt,cr]=na.useState(null),sr=na.useRef(null),nr=t0(),{data:zr,isLoading:Ne}=Ele(e),{data:Jr}=N7(e),pn=Mle(e),Lr=Cle(e),Or=()=>{sr.current?.click()},cn=async ca=>{const Fn=ca.target.files?.[0];if(Fn){try{const da=await Lr.mutateAsync(Fn);da.has_output?await pn.mutateAsync({file:Fn}):(dt(da.available_targets),Vt(da.recommended_target||void 0),cr(Fn),Ge(!0))}catch(da){console.error("Preview failed:",da)}sr.current&&(sr.current.value="")}},$n=async ca=>{if(Xt)try{await pn.mutateAsync({file:Xt,targetColumns:ca}),cr(null)}catch(Fn){console.error("Upload failed:",Fn)}},xn=()=>{Ge(!1),cr(null)},Wa=zr?.experiments||[],On=Wa.length>0,qn=On?Object.keys(Wa[0]):[];return lt.jsxs("div",{className:"space-y-3",children:[lt.jsx("h3",{className:"text-sm font-semibold uppercase tracking-wide text-muted-foreground border-b pb-2",children:"Experiment Data"}),lt.jsx("button",{onClick:Or,disabled:pn.isPending,className:"w-full bg-primary text-primary-foreground px-3 py-2 rounded text-sm font-medium hover:bg-primary/90 disabled:opacity-50",children:pn.isPending?"Loading...":"Load CSV"}),lt.jsx("input",{ref:sr,type:"file",accept:".csv",onChange:cn,className:"hidden"}),Jr&&Jr.has_data&&lt.jsxs("div",{className:"p-3 bg-muted/30 rounded text-xs space-y-1",children:[lt.jsxs("div",{className:"flex justify-between",children:[lt.jsx("span",{className:"text-muted-foreground",children:"Experiments:"}),lt.jsx("span",{className:"font-medium tabular-nums",children:Jr.n_experiments})]}),Jr.target_stats&&lt.jsxs(lt.Fragment,{children:[lt.jsxs("div",{className:"flex justify-between",children:[lt.jsx("span",{className:"text-muted-foreground",children:"Range:"}),lt.jsxs("span",{className:"font-medium tabular-nums",children:[Jr.target_stats.min?.toFixed(2)," - ",Jr.target_stats.max?.toFixed(2)]})]}),lt.jsxs("div",{className:"flex justify-between",children:[lt.jsx("span",{className:"text-muted-foreground",children:"Mean ± Std:"}),lt.jsxs("span",{className:"font-medium tabular-nums",children:[Jr.target_stats.mean?.toFixed(2)," ± ",Jr.target_stats.std?.toFixed(2)]})]})]})]}),Ne?lt.jsx("div",{className:"text-xs text-muted-foreground",children:"Loading..."}):On?lt.jsxs("div",{className:"border rounded overflow-hidden",children:[lt.jsx("div",{className:"overflow-x-auto max-h-64",children:lt.jsxs("table",{className:"w-full text-xs",children:[lt.jsx("thead",{className:"bg-muted/50 border-b sticky top-0",children:lt.jsx("tr",{children:qn.map(ca=>lt.jsx("th",{className:"px-2 py-1.5 text-left font-medium text-xs",children:ca},ca))})}),lt.jsx("tbody",{className:"divide-y",children:Wa.map((ca,Fn)=>lt.jsx("tr",{className:"hover:bg-accent/50",children:qn.map(da=>lt.jsx("td",{className:"px-2 py-1.5 tabular-nums",children:typeof ca[da]=="number"?ca[da].toFixed(3):ca[da]??"-"},da))},Fn))})]})}),lt.jsxs("div",{className:"bg-muted/30 border-t px-2 py-1 text-xs text-muted-foreground",children:[Wa.length," row",Wa.length!==1?"s":""]})]}):lt.jsx("div",{className:"border border-dashed border-muted-foreground/20 rounded p-6 text-center",children:lt.jsx("p",{className:"text-xs text-muted-foreground",children:"No data loaded"})}),lt.jsxs("button",{onClick:()=>{re(!0),Ce(0)},disabled:!n||n.length===0,className:"w-full border border-muted px-3 py-2 rounded text-sm font-medium hover:bg-muted/5 disabled:opacity-50 disabled:cursor-not-allowed",children:["Add Point... ",n&&n.length>0?`(${n.length})`:""]}),L&&n&&n.length>0&&lt.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:()=>re(!1),children:lt.jsx("div",{onClick:ca=>ca.stopPropagation(),children:lt.jsx(Yle,{suggestion:n[ve],index:ve,total:n.length,onCancel:()=>re(!1),onConfirm:async(ca,Fn)=>{const{addExperiment:da}=await z7(async()=>{const{addExperiment:ea}=await import("./api-vcoXEqyq.js");return{addExperiment:ea}},[]);try{await da(e,ca,Fn.retrain),nr.invalidateQueries({queryKey:["experiments",e]}),nr.invalidateQueries({queryKey:["experiments-summary",e]}),nr.invalidateQueries({queryKey:["session",e]});const ea=n.filter((qa,Ri)=>Ri!==ve);S&&S(ea);try{if(await fetch(`/api/v1/sessions/${e}/experiments/staged`,{method:"DELETE"}),ea.length>0){const qa=ea.map(Ri=>{const{_reason:mi,_strategyParams:Io,...ya}=Ri;return ya});await fetch(`/api/v1/sessions/${e}/experiments/staged/batch`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({experiments:qa,reason:ea[0]?._reason||"Acquisition"})})}}catch(qa){console.warn("Failed to sync staged experiments with API:",qa)}Il.success("Experiment added successfully!"),ea.length===0?re(!1):ve>=ea.length&&Ce(ea.length-1)}catch(ea){Il.error("Failed to add point: "+(ea?.message||String(ea)))}},onPrev:ve>0?()=>Ce(ca=>ca-1):void 0,onNext:ve<n.length-1?()=>Ce(ca=>ca+1):void 0})})}),lt.jsx(Zle,{open:Be,onClose:xn,availableColumns:Ke,recommendedColumn:gt,onConfirm:$n})]})}const ij=["lhs","sobol","halton","hammersly","random"],Kle=["full_factorial","fractional_factorial","ccd","box_behnken"],Jle=["plackett_burman","gsd"],Jb={lhs:"LHS",sobol:"Sobol",halton:"Halton",hammersly:"Hammersly",random:"Random",full_factorial:"Full Factorial",fractional_factorial:"Fractional Factorial",ccd:"CCD",box_behnken:"Box-Behnken",plackett_burman:"Plackett-Burman",gsd:"GSD"};function Qle({sessionId:e,onStageSuggestions:n}){const[S,L]=na.useState("lhs"),[re,ve]=na.useState(10),[Ce,Be]=na.useState(""),[Ge,Ke]=na.useState("maximin"),[dt,gt]=na.useState(2),[Vt,Xt]=na.useState(1),[cr,sr]=na.useState(""),[nr,zr]=na.useState("orthogonal"),[Ne,Jr]=na.useState("circumscribed"),[pn,Lr]=na.useState(2),[Or,cn]=na.useState(null),[$n,xn]=na.useState(!1),{data:Wa}=UP(e),On=kle(e),qn=Wa&&Wa.variables.length>0,ca=Wa?.variables.some(Wn=>Wn.type==="categorical")??!1,Fn=ij.includes(S),da=S==="random"||S==="lhs",ea=["full_factorial","fractional_factorial","ccd","box_behnken","plackett_burman"].includes(S),Ri=ca&&["fractional_factorial","ccd","box_behnken","plackett_burman"].includes(S),mi=async()=>{const Wn={method:S,random_seed:da&&Ce?parseInt(Ce):null};Fn?(Wn.n_points=re,S==="lhs"&&(Wn.lhs_criterion=Ge)):(ea&&(Wn.n_center=Vt),S==="full_factorial"&&(Wn.n_levels=dt),S==="fractional_factorial"&&cr.trim()&&(Wn.generators=cr.trim()),S==="ccd"&&(Wn.ccd_alpha=nr,Wn.ccd_face=Ne),S==="gsd"&&(Wn.n_levels=dt,Wn.gsd_reduction=pn));const Ei=await On.mutateAsync(Wn);cn(Ei.points)},Io=()=>{if(!Or||Or.length===0)return;const Wn=Object.keys(Or[0]),$i=[Wn.join(","),...Or.map(Ll=>Wn.map(Mo=>Ll[Mo]).join(","))].join(`
`),to=new Blob([$i],{type:"text/csv"}),fi=window.URL.createObjectURL(to),bo=document.createElement("a");bo.href=fi,bo.download=`initial_design_${S}_${Or.length}pts.csv`,document.body.appendChild(bo),bo.click(),document.body.removeChild(bo),window.URL.revokeObjectURL(fi)},ya=async()=>{if(!(!Or||Or.length===0)){xn(!0);try{const Wn=Or.map($i=>({...$i,_reason:`Initial DoE (${Jb[S]})`}));if(!(await fetch(`/api/v1/sessions/${e}/experiments/staged/batch`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({experiments:Or,reason:`Initial DoE (${Jb[S]})`})})).ok)throw new Error("Failed to stage experiments");await fetch(`/api/v1/sessions/${e}/audit/lock`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({lock_type:"acquisition",strategy:`Initial DoE (${Jb[S]})`,parameters:{method:S,...Fn&&{n_points:re},...ea&&{n_center:Vt},...da&&Ce&&{random_seed:Ce},...S==="lhs"&&{lhs_criterion:Ge},...S==="full_factorial"&&{n_levels:dt},...S==="fractional_factorial"&&cr.trim()&&{generators:cr.trim()},...S==="ccd"&&{ccd_alpha:nr,ccd_face:Ne},...S==="gsd"&&{n_levels:dt,gsd_reduction:pn}},suggestions:Or,notes:"Initial design points staged for execution"})}),n&&n(Wn),Il.success(`${Or.length} DoE points staged`,{description:'Use "Add Point" in Experiments panel to add results'})}catch(Wn){Il.error("Failed to stage points: "+(Wn?.message||String(Wn))),console.error("Failed to stage DoE points:",Wn)}finally{xn(!1)}}};return lt.jsxs("div",{className:"space-y-3",children:[lt.jsx("h3",{className:"text-sm font-semibold uppercase tracking-wide text-muted-foreground border-b pb-2",children:"Initial Design (DoE)"}),qn?lt.jsxs(lt.Fragment,{children:[lt.jsxs("div",{className:"space-y-2",children:[lt.jsxs("div",{children:[lt.jsx("label",{className:"text-xs text-muted-foreground mb-1 block",children:"Method"}),lt.jsxs("select",{value:S,onChange:Wn=>L(Wn.target.value),className:"w-full px-2 py-1.5 text-sm border rounded bg-background",children:[lt.jsx("optgroup",{label:"Space-Filling",children:ij.map(Wn=>lt.jsx("option",{value:Wn,children:Jb[Wn]},Wn))}),lt.jsx("optgroup",{label:"Classical RSM",children:Kle.map(Wn=>lt.jsx("option",{value:Wn,children:Jb[Wn]},Wn))}),lt.jsx("optgroup",{label:"Screening",children:Jle.map(Wn=>lt.jsx("option",{value:Wn,children:Jb[Wn]},Wn))})]})]}),S==="ccd"&&lt.jsx("p",{className:"text-xs text-muted-foreground italic",children:"2^k factorial + 2k axial + center runs"}),S==="box_behnken"&&lt.jsx("p",{className:"text-xs text-muted-foreground italic",children:"Requires 3+ continuous variables"}),S==="fractional_factorial"&&lt.jsx("p",{className:"text-xs text-muted-foreground italic",children:"2-level screening design"}),S==="full_factorial"&&lt.jsx("p",{className:"text-xs text-muted-foreground italic",children:"All combinations of factor levels"}),S==="plackett_burman"&&lt.jsx("p",{className:"text-xs text-muted-foreground italic",children:"Ultra-efficient 2-level main-effect screening"}),S==="gsd"&&lt.jsx("p",{className:"text-xs text-muted-foreground italic",children:"Fractional design for mixed/multi-level factors"}),Ri&&lt.jsx("div",{className:"bg-amber-500/10 border border-amber-500/30 rounded px-3 py-2",children:lt.jsxs("p",{className:"text-xs text-amber-600 dark:text-amber-400",children:["⚠ ",Jb[S]," does not support categorical variables.",lt.jsx("br",{}),"Compatible methods: Random, LHS, Sobol, Halton, Hammersly, Full Factorial, GSD"]})}),Fn&&lt.jsxs("div",{className:`grid ${da?"grid-cols-2":"grid-cols-1"} gap-2`,children:[lt.jsxs("div",{children:[lt.jsx("label",{className:"text-xs text-muted-foreground mb-1 block",children:"Points"}),lt.jsx("input",{type:"number",value:re,onChange:Wn=>ve(parseInt(Wn.target.value)||10),min:5,max:100,className:"w-full px-2 py-1.5 text-sm border rounded bg-background"})]}),da&&lt.jsxs("div",{children:[lt.jsx("label",{className:"text-xs text-muted-foreground mb-1 block",children:"Seed (opt)"}),lt.jsx("input",{type:"number",value:Ce,onChange:Wn=>Be(Wn.target.value),placeholder:"Auto",className:"w-full px-2 py-1.5 text-sm border rounded bg-background"})]})]}),!Fn&&ea&&lt.jsxs("div",{children:[lt.jsx("label",{className:"text-xs text-muted-foreground mb-1 block",children:"Center points"}),lt.jsx("input",{type:"number",value:Vt,onChange:Wn=>Xt(parseInt(Wn.target.value)||0),min:0,max:10,className:"w-full px-2 py-1.5 text-sm border rounded bg-background"})]}),S==="lhs"&&lt.jsxs("div",{children:[lt.jsx("label",{className:"text-xs text-muted-foreground mb-1 block",children:"LHS Criterion"}),lt.jsxs("select",{value:Ge,onChange:Wn=>Ke(Wn.target.value),className:"w-full px-2 py-1.5 text-sm border rounded bg-background",children:[lt.jsx("option",{value:"maximin",children:"Maximin"}),lt.jsx("option",{value:"correlation",children:"Correlation"}),lt.jsx("option",{value:"ratio",children:"Ratio"})]})]}),S==="full_factorial"&&lt.jsxs("div",{children:[lt.jsx("label",{className:"text-xs text-muted-foreground mb-1 block",children:"Levels per factor"}),lt.jsxs("select",{value:dt,onChange:Wn=>gt(parseInt(Wn.target.value)),className:"w-full px-2 py-1.5 text-sm border rounded bg-background",children:[lt.jsx("option",{value:2,children:"2 (min/max)"}),lt.jsx("option",{value:3,children:"3 (min/center/max)"})]})]}),S==="fractional_factorial"&&lt.jsxs("div",{children:[lt.jsx("label",{className:"text-xs text-muted-foreground mb-1 block",children:"Generators (opt)"}),lt.jsx("input",{type:"text",value:cr,onChange:Wn=>sr(Wn.target.value),placeholder:'e.g. "a b ab" (auto if blank)',className:"w-full px-2 py-1.5 text-sm border rounded bg-background font-mono"})]}),S==="ccd"&&lt.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[lt.jsxs("div",{children:[lt.jsx("label",{className:"text-xs text-muted-foreground mb-1 block",children:"Alpha"}),lt.jsxs("select",{value:nr,onChange:Wn=>zr(Wn.target.value),className:"w-full px-2 py-1.5 text-sm border rounded bg-background",children:[lt.jsx("option",{value:"orthogonal",children:"Orthogonal"}),lt.jsx("option",{value:"rotatable",children:"Rotatable"})]})]}),lt.jsxs("div",{children:[lt.jsx("label",{className:"text-xs text-muted-foreground mb-1 block",children:"Face"}),lt.jsxs("select",{value:Ne,onChange:Wn=>Jr(Wn.target.value),className:"w-full px-2 py-1.5 text-sm border rounded bg-background",children:[lt.jsx("option",{value:"circumscribed",children:"Circumscribed"}),lt.jsx("option",{value:"inscribed",children:"Inscribed"}),lt.jsx("option",{value:"faced",children:"Faced"})]})]})]}),S==="gsd"&&lt.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[lt.jsxs("div",{children:[lt.jsx("label",{className:"text-xs text-muted-foreground mb-1 block",children:"Levels per factor"}),lt.jsxs("select",{value:dt,onChange:Wn=>gt(parseInt(Wn.target.value)),className:"w-full px-2 py-1.5 text-sm border rounded bg-background",children:[lt.jsx("option",{value:2,children:"2 (min/max)"}),lt.jsx("option",{value:3,children:"3 (min/center/max)"}),lt.jsx("option",{value:4,children:"4"}),lt.jsx("option",{value:5,children:"5"})]})]}),lt.jsxs("div",{children:[lt.jsx("label",{className:"text-xs text-muted-foreground mb-1 block",children:"Reduction"}),lt.jsxs("select",{value:pn,onChange:Wn=>Lr(parseInt(Wn.target.value)),className:"w-full px-2 py-1.5 text-sm border rounded bg-background",children:[lt.jsx("option",{value:2,children:"÷2"}),lt.jsx("option",{value:3,children:"÷3"}),lt.jsx("option",{value:4,children:"÷4"}),lt.jsx("option",{value:5,children:"÷5"})]})]})]})]}),lt.jsx("button",{onClick:mi,disabled:On.isPending||!qn||Ri,className:"w-full bg-primary text-primary-foreground px-3 py-2 rounded text-sm font-medium hover:bg-primary/90 disabled:opacity-50",children:On.isPending?"Generating...":"Generate Design"}),Or&&Or.length>0&&lt.jsxs("div",{className:"space-y-2",children:[lt.jsxs("div",{className:"flex justify-between items-center",children:[lt.jsxs("span",{className:"text-xs text-muted-foreground",children:[Or.length," points generated"]}),lt.jsxs("div",{className:"flex gap-2",children:[lt.jsxs("button",{onClick:ya,disabled:$n,className:"flex items-center gap-1 text-xs bg-green-600 text-white px-2 py-1 rounded hover:bg-green-700 disabled:opacity-50",title:"Stage points for execution via Add Point dialog",children:[lt.jsx(XW,{className:"h-3 w-3"}),$n?"Staging...":"Stage"]}),lt.jsxs("button",{onClick:Io,className:"flex items-center gap-1 text-xs border px-2 py-1 rounded hover:bg-accent",children:[lt.jsx(HW,{className:"h-3 w-3"}),"CSV"]})]})]}),lt.jsx("div",{className:"border rounded overflow-hidden",children:lt.jsx("div",{className:"overflow-x-auto max-h-48",children:lt.jsxs("table",{className:"w-full text-xs",children:[lt.jsx("thead",{className:"bg-muted/50 border-b sticky top-0",children:lt.jsx("tr",{children:Object.keys(Or[0]).map(Wn=>lt.jsx("th",{className:"px-2 py-1 text-left font-medium",children:Wn},Wn))})}),lt.jsx("tbody",{className:"divide-y",children:Or.map((Wn,Ei)=>lt.jsx("tr",{className:"hover:bg-accent/50",children:Object.values(Wn).map(($i,to)=>lt.jsx("td",{className:"px-2 py-1 tabular-nums",children:typeof $i=="number"?$i.toFixed(3):$i},to))},Ei))})]})})})]})]}):lt.jsx("div",{className:"border border-dashed border-muted-foreground/20 rounded p-4 text-center",children:lt.jsx("p",{className:"text-xs text-muted-foreground",children:"Define variables first"})})]})}function eue(e){const[n,S]=na.useState("idle"),[L,re]=na.useState(""),[ve,Ce]=na.useState(null),[Be,Ge]=na.useState(!1),[Ke,dt]=na.useState(null),[gt,Vt]=na.useState(null),Xt=na.useRef(null),cr=na.useCallback(async nr=>{Xt.current?.abort();const zr=new AbortController;Xt.current=zr,S("loading"),re("Starting…"),Ce(null),Ge(!1),Vt(null),dt(null);try{const Ne=await fetch(`/api/v1/llm/suggest-effects/${e}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(nr),signal:zr.signal});if(!Ne.ok){const Or=await Ne.text();throw new Error(Or||`HTTP ${Ne.status}`)}const Jr=Ne.body.getReader(),pn=new TextDecoder;let Lr="";for(;;){const{done:Or,value:cn}=await Jr.read();if(Or)break;Lr+=pn.decode(cn,{stream:!0});const $n=Lr.split(`

`);Lr=$n.pop()??"";for(const xn of $n){const Wa=xn.trim();if(!Wa.startsWith("data: "))continue;let On;try{On=JSON.parse(Wa.slice(6))}catch{continue}On.status==="complete"?(dt(On.result),S("success"),re("")):On.status==="error"?(Vt(On.message),S("error"),re("")):("message"in On&&re(On.message),"trajectory_url"in On&&On.trajectory_url&&Ce(On.trajectory_url),"cached"in On&&On.cached&&Ge(!0))}}}catch(Ne){Ne?.name==="AbortError"?(S("idle"),re("")):(Vt(Ne?.message??String(Ne)),S("error"),re(""))}},[e]),sr=na.useCallback(()=>{Xt.current?.abort(),S("idle"),re(""),Ce(null),Ge(!1)},[]);return{suggest:cr,cancel:sr,status:n,progressMessage:L,trajectoryUrl:ve,fromCache:Be,result:Ke,error:gt}}async function tue(){return(await Qc.get("/llm/config")).data}async function rue(e){await Qc.post("/llm/config",e)}async function nue(e="http://localhost:11434"){return(await Qc.get(`/llm/ollama/models?base_url=${encodeURIComponent(e)}`)).data.models}function aue({sessionId:e,availableEffects:n,onEffectsSuggested:S}){const[L,re]=na.useState(!1),[ve,Ce]=na.useState("openai"),[Be,Ge]=na.useState("gpt-4o"),[Ke,dt]=na.useState(""),[gt,Vt]=na.useState(!1),[Xt,cr]=na.useState("http://localhost:11434/v1"),[sr,nr]=na.useState([]),[zr,Ne]=na.useState(!1),[Jr,pn]=na.useState(!1),[Lr,Or]=na.useState(""),[cn,$n]=na.useState(!1),[xn,Wa]=na.useState("literature"),[On,qn]=na.useState(""),[ca,Fn]=na.useState(!1),[da,ea]=na.useState(!1),[qa,Ri]=na.useState(!1),{suggest:mi,cancel:Io,status:ya,progressMessage:Wn,trajectoryUrl:Ei,fromCache:$i,result:to,error:fi}=eue(e);na.useEffect(()=>{tue().then(Di=>{Di.openai?.has_api_key&&Vt(!0),Di.ollama?.base_url&&cr(Di.ollama.base_url),Di.edison?.has_api_key&&$n(!0)}).catch(()=>{})},[]),na.useEffect(()=>{if(ve!=="ollama"){ve==="openai"&&Ge("gpt-4o");return}bo(Xt)},[ve]);const bo=async Di=>{Ne(!0);try{const js=await nue(Di);nr(js),js.length>0&&Ge(Ha=>js.includes(Ha)?Ha:js[0])}catch{nr([])}finally{Ne(!1)}},Ll=async(Di=!1)=>{const js={structuring_provider:{provider:ve,model:Be,...ve==="openai"&&Ke?{api_key:Ke}:{},...ve==="ollama"?{base_url:Xt}:{}},system_context:On,...Jr?{edison_config:{job_type:xn,...Di?{force_refresh:!0}:{},...Lr?{api_key:Lr}:{}}}:{}};await mi(js),Fn(!0)},Mo=async()=>{const Di={...Ke?{openai:{api_key:Ke}}:{},ollama:{base_url:Xt},...Lr?{edison:{api_key:Lr}}:{}};try{await rue(Di),Ke&&Vt(!0),Lr&&$n(!0)}catch{}},Hs=()=>{if(!to)return;const Di=new Set([...n.mainEffects,...n.interactions,...n.quadratics]),js=to.effects.filter(Ha=>Di.has(Ha));S(js)},qo=new Set([...n.mainEffects,...n.interactions,...n.quadratics]);return lt.jsxs("div",{className:"border rounded bg-purple-50/30 dark:bg-purple-950/10 border-purple-200/50 dark:border-purple-800/30",children:[lt.jsxs("button",{onClick:()=>re(Di=>!Di),className:"w-full flex items-center justify-between px-2.5 py-1.5 text-xs font-medium text-purple-700 dark:text-purple-400 hover:bg-purple-50/50 dark:hover:bg-purple-950/20 rounded",children:[lt.jsxs("span",{className:"flex items-center gap-1.5",children:[lt.jsx(aj,{className:"h-3.5 w-3.5"}),"Suggest effects with AI",lt.jsx("span",{className:"px-1.5 py-0.5 rounded text-[10px] bg-amber-100 dark:bg-amber-900/30 text-amber-600 dark:text-amber-400 border border-amber-200 dark:border-amber-700 font-medium leading-none",children:"Beta"})]}),L?lt.jsx(H5,{className:"h-3 w-3"}):lt.jsx(G5,{className:"h-3 w-3"})]}),L&&lt.jsxs("div",{className:"px-2.5 pb-2.5 space-y-2.5 border-t border-purple-200/50 dark:border-purple-800/30 pt-2",children:[lt.jsxs("div",{className:"space-y-1.5",children:[lt.jsx("label",{className:"text-xs text-muted-foreground font-medium",children:"Provider"}),lt.jsx("div",{className:"flex gap-3",children:["openai","ollama"].map(Di=>lt.jsxs("label",{className:"inline-flex items-center gap-1.5 text-xs cursor-pointer",children:[lt.jsx("input",{type:"radio",checked:ve===Di,onChange:()=>Ce(Di),className:"h-3 w-3"}),Di==="openai"?"OpenAI":"Ollama (local)"]},Di))}),ve==="openai"?lt.jsxs(lt.Fragment,{children:[lt.jsxs("div",{children:[lt.jsx("label",{className:"text-xs text-muted-foreground block mb-0.5",children:"Model"}),lt.jsx("input",{type:"text",value:Be,onChange:Di=>Ge(Di.target.value),placeholder:"gpt-4o",className:"w-full px-2 py-1 text-xs border rounded bg-background"})]}),lt.jsxs("div",{children:[lt.jsxs("label",{className:"text-xs text-muted-foreground block mb-0.5",children:["API Key",gt&&!Ke&&lt.jsx("span",{className:"ml-1.5 text-green-600 dark:text-green-400",children:"✓ saved"})]}),lt.jsx("input",{type:"password",value:Ke,onChange:Di=>dt(Di.target.value),placeholder:gt?"Using saved key (enter to override)":"sk-... (or set OPENAI_API_KEY env var)",className:"w-full px-2 py-1 text-xs border rounded bg-background"})]})]}):lt.jsxs(lt.Fragment,{children:[lt.jsxs("div",{className:"flex gap-1.5 items-end",children:[lt.jsxs("div",{className:"flex-1",children:[lt.jsx("label",{className:"text-xs text-muted-foreground block mb-0.5",children:"Base URL"}),lt.jsx("input",{type:"text",value:Xt,onChange:Di=>cr(Di.target.value),placeholder:"http://localhost:11434/v1",className:"w-full px-2 py-1 text-xs border rounded bg-background"})]}),lt.jsx("button",{onClick:()=>bo(Xt),disabled:zr,className:"px-2 py-1 text-xs border rounded hover:bg-accent disabled:opacity-50 whitespace-nowrap",children:zr?"…":"Refresh"})]}),lt.jsxs("div",{children:[lt.jsx("label",{className:"text-xs text-muted-foreground block mb-0.5",children:"Model"}),sr.length>0?lt.jsx("select",{value:Be,onChange:Di=>Ge(Di.target.value),className:"w-full px-2 py-1.5 text-xs border rounded bg-background",children:sr.map(Di=>lt.jsx("option",{value:Di,children:Di},Di))}):lt.jsx("input",{type:"text",value:Be,onChange:Di=>Ge(Di.target.value),placeholder:"llama3.2 (Ollama not reachable)",className:"w-full px-2 py-1 text-xs border rounded bg-background"})]})]}),lt.jsx("button",{onClick:Mo,className:"text-xs text-muted-foreground hover:text-foreground underline underline-offset-2",children:"Save provider settings"})]}),lt.jsxs("div",{className:"border-t pt-2 space-y-1.5",children:[lt.jsxs("label",{className:"inline-flex items-center gap-2 text-xs cursor-pointer select-none",children:[lt.jsx("input",{type:"checkbox",checked:Jr,onChange:Di=>pn(Di.target.checked),className:"h-3 w-3"}),lt.jsx("span",{className:"font-medium",children:"Edison Scientific"}),lt.jsx("span",{className:"text-muted-foreground",children:"(literature search)"}),lt.jsx("span",{className:"text-amber-600 dark:text-amber-400 font-normal",children:"(~10–20 min)"})]}),Jr&&lt.jsxs("div",{className:"pl-4 space-y-1.5 border-l border-purple-200/50 dark:border-purple-700/30",children:[lt.jsxs("div",{children:[lt.jsxs("label",{className:"text-xs text-muted-foreground block mb-0.5",children:["Edison API Key",cn&&!Lr&&lt.jsx("span",{className:"ml-1.5 text-green-600 dark:text-green-400",children:"✓ saved"})]}),lt.jsx("input",{type:"password",value:Lr,onChange:Di=>Or(Di.target.value),placeholder:cn?"Using saved key (enter to override)":"Edison API key (or set EDISON_API_KEY env var)",className:"w-full px-2 py-1 text-xs border rounded bg-background"})]}),lt.jsxs("div",{children:[lt.jsx("label",{className:"text-xs text-muted-foreground block mb-0.5",children:"Search mode"}),lt.jsxs("select",{value:xn,onChange:Di=>Wa(Di.target.value),className:"w-full px-2 py-1.5 text-xs border rounded bg-background",children:[lt.jsx("option",{value:"literature",children:"Literature (standard)"}),lt.jsx("option",{value:"literature_high",children:"Literature (high accuracy)"}),lt.jsx("option",{value:"precedent",children:"Precedent"})]})]})]})]}),lt.jsxs("div",{className:"border-t pt-2",children:[lt.jsxs("label",{className:"text-xs text-muted-foreground block mb-0.5",children:["Experiment description"," ",lt.jsx("span",{className:"text-muted-foreground/60",children:"(used to generate search query)"})]}),lt.jsx("textarea",{value:On,onChange:Di=>qn(Di.target.value),placeholder:`Describe what you are studying.
e.g. I am optimizing the yield of biochar from biomass pyrolysis. Variables include temperature (300–700 °C), residence time, and feedstock type.`,rows:3,className:"w-full px-2 py-1 text-xs border rounded bg-background resize-none leading-relaxed"})]}),lt.jsxs("div",{className:"flex gap-2",children:[lt.jsx("button",{onClick:()=>Ll(),disabled:ya==="loading"||!On.trim(),className:"flex-1 flex items-center justify-center gap-1.5 bg-purple-600 text-white text-xs px-3 py-1.5 rounded hover:bg-purple-700 disabled:opacity-50 transition-colors",children:ya==="loading"?lt.jsxs(lt.Fragment,{children:[lt.jsx(ux,{className:"h-3 w-3 animate-spin"})," Analyzing…"]}):lt.jsxs(lt.Fragment,{children:[lt.jsx(aj,{className:"h-3 w-3"})," Suggest effects"]})}),ya==="loading"&&lt.jsx("button",{onClick:Io,className:"text-xs px-2.5 py-1.5 border rounded hover:bg-accent text-muted-foreground",children:"Cancel"})]}),ya==="loading"&&Wn&&lt.jsxs("p",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[lt.jsx(ux,{className:"h-3 w-3 animate-spin shrink-0"}),Wn]}),Ei&&lt.jsx("a",{href:Ei,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-purple-600 dark:text-purple-400 underline underline-offset-2 hover:text-purple-800 dark:hover:text-purple-300",children:ya==="loading"?"Watch Edison progress →":"View Edison trajectory →"}),ya==="error"&&fi&&lt.jsxs("div",{className:"flex items-start gap-1.5 text-xs text-red-600 dark:text-red-400 border border-red-200 dark:border-red-800 rounded p-2 bg-red-50/50 dark:bg-red-950/20",children:[lt.jsx(jle,{className:"h-3.5 w-3.5 shrink-0 mt-0.5"}),lt.jsx("span",{children:fi})]}),ya==="success"&&to&&lt.jsxs("div",{className:"space-y-2 border-t pt-2",children:[lt.jsxs("div",{className:"flex items-center justify-between gap-1.5",children:[lt.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-green-600 dark:text-green-400 font-medium",children:[lt.jsx(Fle,{className:"h-3.5 w-3.5 shrink-0"}),to.effects.length," effect",to.effects.length!==1?"s":""," suggested",$i&&lt.jsx("span",{className:"px-1.5 py-0.5 rounded text-xs bg-blue-100 dark:bg-blue-900/30 text-blue-600 dark:text-blue-400 border border-blue-200 dark:border-blue-700 font-normal",children:"cached"})]}),$i&&Jr&&lt.jsx("button",{onClick:()=>Ll(!0),title:"Re-run Edison search and ignore cached result",className:"text-xs text-muted-foreground hover:text-foreground underline underline-offset-2 whitespace-nowrap",children:"↺ Re-run Edison"})]}),lt.jsx("div",{className:"flex flex-wrap gap-1",children:to.effects.map(Di=>{const js=qo.has(Di);return lt.jsxs("span",{title:js?"Matches a variable in your design space":"Not in current variable set",className:`px-1.5 py-0.5 rounded text-xs border ${js?"bg-purple-100 dark:bg-purple-900/30 text-purple-700 dark:text-purple-300 border-purple-200 dark:border-purple-700":"bg-muted/40 text-muted-foreground border-dashed"}`,children:[Di,!js&&" ⚠"]},Di)})}),lt.jsx("button",{onClick:Hs,className:"w-full flex items-center justify-center gap-1.5 text-xs bg-purple-600 text-white px-3 py-1.5 rounded hover:bg-purple-700 transition-colors",children:"Apply to checkboxes"}),to.reasoning.length>0&&lt.jsxs("div",{children:[lt.jsxs("button",{onClick:()=>Fn(Di=>!Di),className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground",children:[ca?lt.jsx(H5,{className:"h-3 w-3"}):lt.jsx(G5,{className:"h-3 w-3"}),"Reasoning"]}),ca&&lt.jsx("div",{className:"mt-1 space-y-1 pl-3 border-l border-purple-200/50 dark:border-purple-700/30",children:to.reasoning.map((Di,js)=>lt.jsxs("div",{className:"text-xs",children:[lt.jsxs("span",{className:"font-medium",children:[Di.effect,":"]})," ",lt.jsx("span",{className:"text-muted-foreground",children:Di.reason})]},js))})]}),to.literature_context&&lt.jsxs("div",{children:[lt.jsxs("button",{onClick:()=>ea(Di=>!Di),className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground",children:[da?lt.jsx(H5,{className:"h-3 w-3"}):lt.jsx(G5,{className:"h-3 w-3"}),"Literature context (Edison)"]}),da&&lt.jsx("div",{className:"mt-1 pl-3 border-l border-purple-200/50 dark:border-purple-700/30 text-xs text-muted-foreground whitespace-pre-wrap leading-relaxed max-h-36 overflow-y-auto",children:to.literature_context})]}),to.sources.length>0&&lt.jsxs("div",{children:[lt.jsxs("button",{onClick:()=>Ri(Di=>!Di),className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground",children:[qa?lt.jsx(H5,{className:"h-3 w-3"}):lt.jsx(G5,{className:"h-3 w-3"}),"Sources (",to.sources.length,")",!to.literature_context&&lt.jsx("span",{className:"ml-1 px-1 py-0.5 rounded text-xs bg-amber-100 dark:bg-amber-900/30 text-amber-700 dark:text-amber-400 border border-amber-200 dark:border-amber-700",children:"⚠ AI-generated — verify"})]}),qa&&lt.jsxs(lt.Fragment,{children:[!to.literature_context&&lt.jsx("p",{className:"mt-1 pl-3 text-xs text-amber-600 dark:text-amber-400",children:"These citations were not retrieved from a literature database and may be inaccurate. Use Edison Scientific for verified sources."}),lt.jsx("ul",{className:"mt-1 pl-3 border-l border-purple-200/50 dark:border-purple-700/30 space-y-0.5",children:to.sources.map((Di,js)=>lt.jsx("li",{className:"text-xs text-muted-foreground break-words",children:Di},js))})]})]}),to.disclaimer&&lt.jsx("p",{className:"text-xs text-muted-foreground/60 italic",children:to.disclaimer})]})]})]})}const iue={D:"D-optimal (parameter estimation)",A:"A-optimal (min avg variance)",I:"I-optimal (min prediction variance)"},oue={fedorov:"Fedorov (recommended)",modified_fedorov:"Modified Fedorov",detmax:"DetMax (best quality)",simple_exchange:"Simple Exchange",sequential:"Sequential (fastest)"};function sue({sessionId:e,onStageSuggestions:n}){const[S,L]=na.useState("quick"),[re,ve]=na.useState("quadratic"),[Ce,Be]=na.useState(new Set),[Ge,Ke]=na.useState(""),[dt,gt]=na.useState("multiplier"),[Vt,Xt]=na.useState(2),[cr,sr]=na.useState(12),[nr,zr]=na.useState("D"),[Ne,Jr]=na.useState("fedorov"),[pn,Lr]=na.useState(!1),[Or,cn]=na.useState(5),[$n,xn]=na.useState(200),[Wa,On]=na.useState(""),[qn,ca]=na.useState(null),[Fn,da]=na.useState(null),[ea,qa]=na.useState(null),[Ri,mi]=na.useState(!1),{data:Io}=UP(e),ya=Ple(e),Wn=Lle(e),Ei=Io&&Io.variables.length>0,$i=Io?.variables??[],to=na.useMemo(()=>{const Ha=$i.map(Vu=>Vu.name),El=[];for(let Vu=0;Vu<$i.length;Vu++)for(let Gf=Vu+1;Gf<$i.length;Gf++)El.push(`${$i[Vu].name}*${$i[Gf].name}`);const ml=[];for(const Vu of $i)(Vu.type==="real"||Vu.type==="integer"||Vu.type==="discrete")&&ml.push(`${Vu.name}**2`);return{mainEffects:Ha,interactions:El,quadratics:ml}},[$i]),fi=()=>{const Ha=[...Ce];if(Ge.trim()){const El=Ge.split(",").map(ml=>ml.trim()).filter(Boolean);Ha.push(...El.filter(ml=>!Ce.has(ml)))}return Ha},bo=async()=>{const Ha={};if(S==="quick")Ha.model_type=re;else{const ml=fi();if(ml.length===0){Il.error("Select at least one effect");return}Ha.effects=ml}const El=await ya.mutateAsync(Ha);ca(El),sr(El.n_points_recommended)},Ll=async()=>{const Ha={criterion:nr,algorithm:Ne,n_levels:Or,max_iter:$n,random_seed:Wa?parseInt(Wa):null};if(S==="quick")Ha.model_type=re;else{const ml=fi();if(ml.length===0){Il.error("Select at least one effect");return}Ha.effects=ml}dt==="multiplier"?Ha.p_multiplier=Vt:Ha.n_points=cr;const El=await Wn.mutateAsync(Ha);da(El.points),qa(El.design_info)},Mo=()=>{if(!Fn||Fn.length===0)return;const Ha=Object.keys(Fn[0]),ml=[Ha.join(","),...Fn.map(Nd=>Ha.map(ad=>Nd[ad]).join(","))].join(`
`),Vu=new Blob([ml],{type:"text/csv"}),Gf=window.URL.createObjectURL(Vu),zd=document.createElement("a");zd.href=Gf,zd.download=`optimal_design_${nr}_${Fn.length}pts.csv`,document.body.appendChild(zd),zd.click(),document.body.removeChild(zd),window.URL.revokeObjectURL(Gf)},Hs=async()=>{if(!(!Fn||Fn.length===0)){mi(!0);try{const Ha=`Optimal DoE (${nr}-optimal, ${Ne})`,El=Fn.map(Vu=>({...Vu,_reason:Ha}));if(!(await fetch(`/api/v1/sessions/${e}/experiments/staged/batch`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({experiments:Fn,reason:Ha})})).ok)throw new Error("Failed to stage experiments");await fetch(`/api/v1/sessions/${e}/audit/lock`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({lock_type:"acquisition",strategy:Ha,parameters:{method:"optimal",criterion:nr,algorithm:Ne,...S==="quick"?{model_type:re}:{effects:fi()},...dt==="multiplier"?{p_multiplier:Vt}:{n_points:cr},...ea&&{D_eff:ea.D_eff,A_eff:ea.A_eff}},suggestions:Fn,notes:"Optimal design points staged for execution"})}),n&&n(El),Il.success(`${Fn.length} optimal design points staged`,{description:'Use "Add Point" in Experiments panel to add results'})}catch(Ha){Il.error("Failed to stage points: "+(Ha?.message||String(Ha)))}finally{mi(!1)}}},qo=Ha=>{Be(El=>{const ml=new Set(El);return ml.has(Ha)?ml.delete(Ha):ml.add(Ha),ml}),ca(null)},Di=Ha=>{Be(El=>{const ml=new Set(El);return Ha.forEach(Vu=>ml.add(Vu)),ml}),ca(null)},js=Ha=>{Be(El=>{const ml=new Set(El);return Ha.forEach(Vu=>ml.delete(Vu)),ml}),ca(null)};return lt.jsxs("div",{className:"space-y-3",children:[lt.jsx("h3",{className:"text-sm font-semibold uppercase tracking-wide text-muted-foreground border-b pb-2",children:"Optimal Design (OED)"}),Ei?lt.jsx(lt.Fragment,{children:lt.jsxs("div",{className:"space-y-2",children:[lt.jsxs("div",{children:[lt.jsx("label",{className:"text-xs text-muted-foreground mb-1 block",children:"Model Specification"}),lt.jsxs("div",{className:"flex gap-2 mb-2",children:[lt.jsx("button",{onClick:()=>{L("quick"),ca(null)},className:`text-xs px-2 py-1 rounded ${S==="quick"?"bg-primary text-primary-foreground":"border hover:bg-accent"}`,children:"Quick"}),lt.jsx("button",{onClick:()=>{L("custom"),ca(null)},className:`text-xs px-2 py-1 rounded ${S==="custom"?"bg-primary text-primary-foreground":"border hover:bg-accent"}`,children:"Custom Effects"})]}),S==="quick"?lt.jsxs("select",{value:re,onChange:Ha=>{ve(Ha.target.value),ca(null)},className:"w-full px-2 py-1.5 text-sm border rounded bg-background",children:[lt.jsx("option",{value:"linear",children:"Linear (main effects only)"}),lt.jsx("option",{value:"interaction",children:"Interaction (main + pairwise)"}),lt.jsx("option",{value:"quadratic",children:"Quadratic (main + pairwise + squared)"})]}):lt.jsxs("div",{className:"space-y-1.5 max-h-48 overflow-y-auto border rounded p-2 text-xs",children:[lt.jsxs("div",{className:"flex justify-between items-center",children:[lt.jsx("span",{className:"font-medium text-muted-foreground",children:"Main Effects"}),lt.jsxs("div",{className:"flex gap-1",children:[lt.jsx("button",{onClick:()=>Di(to.mainEffects),className:"text-blue-500 hover:underline",children:"all"}),lt.jsx("button",{onClick:()=>js(to.mainEffects),className:"text-red-500 hover:underline",children:"none"})]})]}),lt.jsx("div",{className:"flex flex-wrap gap-1",children:to.mainEffects.map(Ha=>lt.jsxs("label",{className:`inline-flex items-center gap-1 px-1.5 py-0.5 rounded cursor-pointer ${Ce.has(Ha)?"bg-primary/10 border-primary/30 border":"bg-muted/50 border border-transparent"}`,children:[lt.jsx("input",{type:"checkbox",checked:Ce.has(Ha),onChange:()=>qo(Ha),className:"h-3 w-3"}),Ha]},Ha))}),to.interactions.length>0&&lt.jsxs(lt.Fragment,{children:[lt.jsxs("div",{className:"flex justify-between items-center pt-1",children:[lt.jsx("span",{className:"font-medium text-muted-foreground",children:"Interactions"}),lt.jsxs("div",{className:"flex gap-1",children:[lt.jsx("button",{onClick:()=>Di(to.interactions),className:"text-blue-500 hover:underline",children:"all"}),lt.jsx("button",{onClick:()=>js(to.interactions),className:"text-red-500 hover:underline",children:"none"})]})]}),lt.jsx("div",{className:"flex flex-wrap gap-1",children:to.interactions.map(Ha=>lt.jsxs("label",{className:`inline-flex items-center gap-1 px-1.5 py-0.5 rounded cursor-pointer ${Ce.has(Ha)?"bg-primary/10 border-primary/30 border":"bg-muted/50 border border-transparent"}`,children:[lt.jsx("input",{type:"checkbox",checked:Ce.has(Ha),onChange:()=>qo(Ha),className:"h-3 w-3"}),Ha.replace("*"," × ")]},Ha))})]}),to.quadratics.length>0&&lt.jsxs(lt.Fragment,{children:[lt.jsxs("div",{className:"flex justify-between items-center pt-1",children:[lt.jsx("span",{className:"font-medium text-muted-foreground",children:"Quadratic"}),lt.jsxs("div",{className:"flex gap-1",children:[lt.jsx("button",{onClick:()=>Di(to.quadratics),className:"text-blue-500 hover:underline",children:"all"}),lt.jsx("button",{onClick:()=>js(to.quadratics),className:"text-red-500 hover:underline",children:"none"})]})]}),lt.jsx("div",{className:"flex flex-wrap gap-1",children:to.quadratics.map(Ha=>lt.jsxs("label",{className:`inline-flex items-center gap-1 px-1.5 py-0.5 rounded cursor-pointer ${Ce.has(Ha)?"bg-primary/10 border-primary/30 border":"bg-muted/50 border border-transparent"}`,children:[lt.jsx("input",{type:"checkbox",checked:Ce.has(Ha),onChange:()=>qo(Ha),className:"h-3 w-3"}),Ha.replace("**2","²")]},Ha))})]}),lt.jsx("div",{className:"pt-1",children:lt.jsx("input",{type:"text",placeholder:"Additional effects (comma-separated)",value:Ge,onChange:Ha=>{Ke(Ha.target.value),ca(null)},className:"w-full px-2 py-1 text-xs border rounded bg-background"})})]}),S==="custom"&&lt.jsx(aue,{sessionId:e,availableEffects:to,onEffectsSuggested:Ha=>{Be(new Set(Ha)),ca(null)}})]}),lt.jsxs("div",{children:[lt.jsxs("button",{onClick:bo,disabled:ya.isPending,className:"w-full text-xs border px-2 py-1.5 rounded hover:bg-accent disabled:opacity-50 flex items-center justify-center gap-1",children:[lt.jsx(GW,{className:"h-3 w-3"}),ya.isPending?"Loading...":"Preview Model Terms"]}),qn&&lt.jsxs("div",{className:"mt-1.5 border rounded p-2 bg-muted/30 text-xs space-y-1",children:[lt.jsxs("div",{className:"flex justify-between",children:[lt.jsx("span",{className:"text-muted-foreground",children:"Model columns (p):"}),lt.jsx("span",{className:"font-medium",children:qn.p_columns})]}),lt.jsxs("div",{className:"flex justify-between",children:[lt.jsx("span",{className:"text-muted-foreground",children:"Min runs:"}),lt.jsx("span",{children:qn.n_points_minimum})]}),lt.jsxs("div",{className:"flex justify-between",children:[lt.jsx("span",{className:"text-muted-foreground",children:"Recommended runs (2p):"}),lt.jsx("span",{className:"font-medium text-green-600",children:qn.n_points_recommended})]}),lt.jsxs("details",{className:"pt-1",children:[lt.jsxs("summary",{className:"text-muted-foreground cursor-pointer hover:text-foreground",children:[qn.model_terms.length," model terms"]}),lt.jsx("div",{className:"mt-1 flex flex-wrap gap-1",children:qn.model_terms.map((Ha,El)=>lt.jsx("span",{className:"px-1.5 py-0.5 bg-background border rounded text-xs",children:Ha},El))})]})]})]}),lt.jsxs("div",{className:"space-y-2",children:[lt.jsxs("div",{children:[lt.jsx("label",{className:"text-xs text-muted-foreground mb-1 block",children:"Run Count"}),lt.jsxs("div",{className:"flex gap-2 mb-1",children:[lt.jsxs("label",{className:"inline-flex items-center gap-1 text-xs cursor-pointer",children:[lt.jsx("input",{type:"radio",checked:dt==="multiplier",onChange:()=>gt("multiplier"),className:"h-3 w-3"}),"Multiplier (×p)"]}),lt.jsxs("label",{className:"inline-flex items-center gap-1 text-xs cursor-pointer",children:[lt.jsx("input",{type:"radio",checked:dt==="fixed",onChange:()=>gt("fixed"),className:"h-3 w-3"}),"Fixed count"]})]}),dt==="multiplier"?lt.jsxs("div",{className:"flex items-center gap-2",children:[lt.jsx("input",{type:"range",min:1,max:5,step:.5,value:Vt,onChange:Ha=>Xt(parseFloat(Ha.target.value)),className:"flex-1"}),lt.jsxs("span",{className:"text-xs font-medium w-10 text-right",children:[Vt,"×p"]})]}):lt.jsx("input",{type:"number",min:1,max:1e4,value:cr,onChange:Ha=>sr(parseInt(Ha.target.value)||1),className:"w-full px-2 py-1.5 text-sm border rounded bg-background"})]}),lt.jsxs("div",{children:[lt.jsx("label",{className:"text-xs text-muted-foreground mb-1 block",children:"Optimality Criterion"}),lt.jsx("select",{value:nr,onChange:Ha=>zr(Ha.target.value),className:"w-full px-2 py-1.5 text-sm border rounded bg-background",children:Object.entries(iue).map(([Ha,El])=>lt.jsx("option",{value:Ha,children:El},Ha))})]}),lt.jsxs("div",{children:[lt.jsx("label",{className:"text-xs text-muted-foreground mb-1 block",children:"Algorithm"}),lt.jsx("select",{value:Ne,onChange:Ha=>Jr(Ha.target.value),className:"w-full px-2 py-1.5 text-sm border rounded bg-background",children:Object.entries(oue).map(([Ha,El])=>lt.jsx("option",{value:Ha,children:El},Ha))})]}),lt.jsxs("div",{children:[lt.jsxs("button",{onClick:()=>Lr(!pn),className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground",children:[pn?lt.jsx(H5,{className:"h-3 w-3"}):lt.jsx(G5,{className:"h-3 w-3"}),"Advanced"]}),pn&&lt.jsxs("div",{className:"mt-1 space-y-1.5 pl-3 border-l",children:[lt.jsxs("div",{className:"flex items-center gap-2",children:[lt.jsx("label",{className:"text-xs text-muted-foreground w-24",children:"Grid levels:"}),lt.jsx("input",{type:"number",min:2,max:20,value:Or,onChange:Ha=>cn(parseInt(Ha.target.value)||5),className:"w-20 px-2 py-1 text-xs border rounded bg-background"})]}),lt.jsxs("div",{className:"flex items-center gap-2",children:[lt.jsx("label",{className:"text-xs text-muted-foreground w-24",children:"Max iterations:"}),lt.jsx("input",{type:"number",min:10,max:1e4,value:$n,onChange:Ha=>xn(parseInt(Ha.target.value)||200),className:"w-20 px-2 py-1 text-xs border rounded bg-background"})]}),lt.jsxs("div",{className:"flex items-center gap-2",children:[lt.jsx("label",{className:"text-xs text-muted-foreground w-24",children:"Random seed:"}),lt.jsx("input",{type:"text",placeholder:"Optional",value:Wa,onChange:Ha=>On(Ha.target.value),className:"w-20 px-2 py-1 text-xs border rounded bg-background"})]})]})]})]}),lt.jsx("button",{onClick:Ll,disabled:Wn.isPending||!Ei,className:"w-full bg-primary text-primary-foreground px-3 py-2 rounded text-sm font-medium hover:bg-primary/90 disabled:opacity-50",children:Wn.isPending?"Generating...":"Generate Optimal Design"}),ea&&lt.jsxs("div",{className:"border rounded p-2 bg-green-50 dark:bg-green-950/30 text-xs space-y-0.5",children:[lt.jsx("div",{className:"font-medium text-green-700 dark:text-green-400",children:"Design Quality"}),lt.jsxs("div",{className:"grid grid-cols-2 gap-x-4",children:[ea.D_eff!=null&&lt.jsxs("div",{className:"flex justify-between",children:[lt.jsx("span",{className:"text-muted-foreground",children:"D-efficiency:"}),lt.jsxs("span",{className:"font-medium",children:[ea.D_eff.toFixed(1),"%"]})]}),ea.A_eff!=null&&lt.jsxs("div",{className:"flex justify-between",children:[lt.jsx("span",{className:"text-muted-foreground",children:"A-efficiency:"}),lt.jsxs("span",{className:"font-medium",children:[ea.A_eff.toFixed(1),"%"]})]}),lt.jsxs("div",{className:"flex justify-between",children:[lt.jsx("span",{className:"text-muted-foreground",children:"Criterion:"}),lt.jsx("span",{children:ea.criterion})]}),lt.jsxs("div",{className:"flex justify-between",children:[lt.jsx("span",{className:"text-muted-foreground",children:"Runs:"}),lt.jsx("span",{children:ea.n_runs})]})]})]}),Fn&&Fn.length>0&&lt.jsxs("div",{className:"space-y-2",children:[lt.jsxs("div",{className:"flex justify-between items-center",children:[lt.jsxs("span",{className:"text-xs text-muted-foreground",children:[Fn.length," points generated"]}),lt.jsxs("div",{className:"flex gap-2",children:[lt.jsxs("button",{onClick:Hs,disabled:Ri,className:"flex items-center gap-1 text-xs bg-green-600 text-white px-2 py-1 rounded hover:bg-green-700 disabled:opacity-50",title:"Stage points for execution via Add Point dialog",children:[lt.jsx(XW,{className:"h-3 w-3"}),Ri?"Staging...":"Stage"]}),lt.jsxs("button",{onClick:Mo,className:"flex items-center gap-1 text-xs border px-2 py-1 rounded hover:bg-accent",children:[lt.jsx(HW,{className:"h-3 w-3"}),"CSV"]})]})]}),lt.jsx("div",{className:"border rounded overflow-hidden",children:lt.jsx("div",{className:"overflow-x-auto max-h-48",children:lt.jsxs("table",{className:"w-full text-xs",children:[lt.jsx("thead",{className:"bg-muted/50 border-b sticky top-0",children:lt.jsx("tr",{children:Object.keys(Fn[0]).map(Ha=>lt.jsx("th",{className:"px-2 py-1 text-left font-medium",children:Ha},Ha))})}),lt.jsx("tbody",{className:"divide-y",children:Fn.map((Ha,El)=>lt.jsx("tr",{className:"hover:bg-accent/50",children:Object.values(Ha).map((ml,Vu)=>lt.jsx("td",{className:"px-2 py-1 tabular-nums",children:typeof ml=="number"?ml.toFixed(3):ml},Vu))},El))})]})})})]})]})}):lt.jsx("div",{className:"border border-dashed border-muted-foreground/20 rounded p-4 text-center",children:lt.jsx("p",{className:"text-xs text-muted-foreground",children:"Define variables first"})})]})}function WW(e){return pg({queryKey:["model-info",e],queryFn:async()=>(await Qc.get(`/sessions/${e}/model`)).data,enabled:!!e})}function lue(e){const n=t0();return fp({mutationFn:async S=>(await Qc.post(`/sessions/${e}/model/train`,S)).data,onSuccess:S=>{n.invalidateQueries({queryKey:["model-info",e]}),n.invalidateQueries({queryKey:["session",e]}),Il.success(`Model trained successfully! R² = ${S.metrics.r2.toFixed(4)}`)},onError:S=>{Il.error(S.response?.data?.detail||"Failed to train model")}})}function uue({sessionId:e}){const[n,S]=na.useState("sklearn"),[L,re]=na.useState(!1),[ve,Ce]=na.useState("RBF"),[Be,Ge]=na.useState("1.5"),[Ke,dt]=na.useState("L-BFGS-B"),[gt,Vt]=na.useState("none"),[Xt,cr]=na.useState("none"),[sr,nr]=na.useState(!1),[zr,Ne]=na.useState("Matern"),[Jr,pn]=na.useState("2.5"),[Lr,Or]=na.useState(3),[cn,$n]=na.useState("none"),[xn,Wa]=na.useState("none"),[On,qn]=na.useState(!1),{data:ca}=WW(e),{data:Fn}=N7(e),da=lue(e),{openVisualization:ea}=hW(),qa=Fn?.has_data&&Fn.n_experiments>=5,Ri=async()=>{if(!qa){alert("Need at least 5 experiments to train a model");return}const mi={backend:n,kernel:n==="sklearn"?ve:zr};n==="sklearn"&&ve==="Matern"?mi.kernel_params={nu:parseFloat(Be)}:n==="botorch"&&zr==="Matern"?mi.kernel_params={nu:parseFloat(Jr)}:n==="botorch"&&zr==="IBNN"&&(mi.kernel_params={ibnn_depth:Lr}),n==="sklearn"?(gt!=="none"&&(mi.input_transform=gt),Xt!=="none"&&(mi.output_transform=Xt),mi.calibration_enabled=sr):(cn!=="none"&&(mi.input_transform=cn),xn!=="none"&&(mi.output_transform=xn),mi.calibration_enabled=On);try{await da.mutateAsync(mi)}catch(Io){console.error("Training failed:",Io)}};return lt.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[lt.jsx("h2",{className:"text-sm font-semibold mb-4 uppercase tracking-wide text-muted-foreground border-b pb-2",children:"Gaussian Process Model"}),lt.jsxs("div",{className:"mb-3",children:[lt.jsx("label",{className:"block text-xs font-medium mb-1.5",children:"Backend"}),lt.jsxs("div",{className:"flex gap-2",children:[lt.jsx("button",{onClick:()=>S("sklearn"),className:`flex-1 px-4 py-2 rounded-md text-sm font-medium transition-colors ${n==="sklearn"?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,children:"scikit-learn"}),lt.jsx("button",{onClick:()=>S("botorch"),className:`flex-1 px-4 py-2 rounded-md text-sm font-medium transition-colors ${n==="botorch"?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,children:"BoTorch"})]})]}),lt.jsxs("div",{className:"mb-4 p-3 border rounded-lg",children:[lt.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[lt.jsx("input",{type:"checkbox",checked:L,onChange:mi=>re(mi.target.checked),className:"w-4 h-4 rounded border-gray-300"}),lt.jsx("span",{className:"text-sm font-medium",children:"Enable Advanced Options"})]}),n==="sklearn"&&lt.jsxs("div",{className:"mt-3 space-y-2.5",children:[lt.jsxs("div",{children:[lt.jsx("label",{className:`block text-xs mb-1 ${L?"":"text-muted-foreground"}`,children:"Kernel Selection"}),lt.jsxs("select",{value:ve,onChange:mi=>Ce(mi.target.value),disabled:!L,className:"w-full px-2.5 py-1.5 text-xs border rounded-md disabled:opacity-50 disabled:cursor-not-allowed bg-background",children:[lt.jsx("option",{value:"RBF",children:"RBF"}),lt.jsx("option",{value:"Matern",children:"Matern"}),lt.jsx("option",{value:"RationalQuadratic",children:"RationalQuadratic"})]})]}),ve==="Matern"&&lt.jsxs("div",{children:[lt.jsx("label",{className:`block text-xs mb-1 ${L?"":"text-muted-foreground"}`,children:"Matern nu"}),lt.jsxs("select",{value:Be,onChange:mi=>Ge(mi.target.value),disabled:!L,className:"w-full px-2.5 py-1.5 text-xs border rounded-md disabled:opacity-50 disabled:cursor-not-allowed bg-background",children:[lt.jsx("option",{value:"0.5",children:"0.5"}),lt.jsx("option",{value:"1.5",children:"1.5"}),lt.jsx("option",{value:"2.5",children:"2.5"}),lt.jsx("option",{value:"inf",children:"inf"})]})]}),lt.jsx("div",{className:"text-xs text-muted-foreground italic",children:"Note: Kernel hyperparameters will be automatically optimized."}),lt.jsxs("div",{children:[lt.jsx("label",{className:`block text-xs mb-1 ${L?"":"text-muted-foreground"}`,children:"Optimizer"}),lt.jsxs("select",{value:Ke,onChange:mi=>dt(mi.target.value),disabled:!L,className:"w-full px-2.5 py-1.5 text-xs border rounded-md disabled:opacity-50 disabled:cursor-not-allowed bg-background",children:[lt.jsx("option",{value:"CG",children:"CG"}),lt.jsx("option",{value:"BFGS",children:"BFGS"}),lt.jsx("option",{value:"L-BFGS-B",children:"L-BFGS-B"}),lt.jsx("option",{value:"TNC",children:"TNC"})]})]}),lt.jsxs("div",{children:[lt.jsx("label",{className:`block text-xs mb-1 ${L?"":"text-muted-foreground"}`,children:"Input Scaling"}),lt.jsxs("select",{value:gt,onChange:mi=>Vt(mi.target.value),disabled:!L,className:"w-full px-2.5 py-1.5 text-xs border rounded-md disabled:opacity-50 disabled:cursor-not-allowed bg-background",children:[lt.jsx("option",{value:"none",children:"none"}),lt.jsx("option",{value:"minmax",children:"minmax"}),lt.jsx("option",{value:"standard",children:"standard"}),lt.jsx("option",{value:"robust",children:"robust"})]})]}),lt.jsxs("div",{children:[lt.jsx("label",{className:`block text-xs mb-1 ${L?"":"text-muted-foreground"}`,children:"Output Scaling"}),lt.jsxs("select",{value:Xt,onChange:mi=>cr(mi.target.value),disabled:!L,className:"w-full px-2.5 py-1.5 text-xs border rounded-md disabled:opacity-50 disabled:cursor-not-allowed bg-background",children:[lt.jsx("option",{value:"none",children:"none"}),lt.jsx("option",{value:"minmax",children:"minmax"}),lt.jsx("option",{value:"standard",children:"standard"}),lt.jsx("option",{value:"robust",children:"robust"})]})]}),lt.jsxs("label",{className:"flex items-center gap-2",children:[lt.jsx("input",{type:"checkbox",checked:sr,onChange:mi=>nr(mi.target.checked),disabled:!L,className:"w-3.5 h-3.5 rounded border-gray-300 disabled:opacity-50 disabled:cursor-not-allowed"}),lt.jsx("span",{className:`text-xs ${L?"":"text-muted-foreground"}`,children:"Calibrate Uncertainty"})]})]}),n==="botorch"&&lt.jsxs("div",{className:"mt-3 space-y-2.5",children:[lt.jsxs("div",{children:[lt.jsx("label",{className:`block text-xs mb-1 ${L?"":"text-muted-foreground"}`,children:"Continuous Kernel"}),lt.jsxs("select",{value:zr,onChange:mi=>Ne(mi.target.value),disabled:!L,className:"w-full px-2.5 py-1.5 text-xs border rounded-md disabled:opacity-50 disabled:cursor-not-allowed bg-background",children:[lt.jsx("option",{value:"RBF",children:"RBF"}),lt.jsx("option",{value:"Matern",children:"Matern"}),lt.jsx("option",{value:"IBNN",children:"IBNN (Deep Kernel)"})]})]}),zr==="Matern"&&lt.jsxs("div",{children:[lt.jsx("label",{className:`block text-xs mb-1 ${L?"":"text-muted-foreground"}`,children:"Matern nu"}),lt.jsxs("select",{value:Jr,onChange:mi=>pn(mi.target.value),disabled:!L,className:"w-full px-2.5 py-1.5 text-xs border rounded-md disabled:opacity-50 disabled:cursor-not-allowed bg-background",children:[lt.jsx("option",{value:"0.5",children:"0.5"}),lt.jsx("option",{value:"1.5",children:"1.5"}),lt.jsx("option",{value:"2.5",children:"2.5"})]})]}),zr==="IBNN"&&lt.jsxs("div",{children:[lt.jsx("label",{className:`block text-xs mb-1 ${L?"":"text-muted-foreground"}`,children:"Depth"}),lt.jsx("input",{type:"number",min:1,max:10,value:Lr,onChange:mi=>Or(parseInt(mi.target.value)||3),disabled:!L,className:"w-full px-2.5 py-1.5 text-xs border rounded-md disabled:opacity-50 disabled:cursor-not-allowed bg-background"})]}),lt.jsx("div",{className:"text-xs text-muted-foreground italic",children:"BoTorch uses sensible defaults for training parameters."}),lt.jsxs("div",{children:[lt.jsx("label",{className:`block text-xs mb-1 ${L?"":"text-muted-foreground"}`,children:"Input Scaling"}),lt.jsxs("select",{value:cn,onChange:mi=>$n(mi.target.value),disabled:!L,className:"w-full px-2.5 py-1.5 text-xs border rounded-md disabled:opacity-50 disabled:cursor-not-allowed bg-background",children:[lt.jsx("option",{value:"none",children:"none"}),lt.jsx("option",{value:"normalize",children:"normalize"}),lt.jsx("option",{value:"standardize",children:"standardize"})]})]}),lt.jsxs("div",{children:[lt.jsx("label",{className:`block text-xs mb-1 ${L?"":"text-muted-foreground"}`,children:"Output Scaling"}),lt.jsxs("select",{value:xn,onChange:mi=>Wa(mi.target.value),disabled:!L,className:"w-full px-2.5 py-1.5 text-xs border rounded-md disabled:opacity-50 disabled:cursor-not-allowed bg-background",children:[lt.jsx("option",{value:"none",children:"none"}),lt.jsx("option",{value:"standardize",children:"standardize"})]})]}),lt.jsxs("label",{className:"flex items-center gap-2",children:[lt.jsx("input",{type:"checkbox",checked:On,onChange:mi=>qn(mi.target.checked),disabled:!L,className:"w-3.5 h-3.5 rounded border-gray-300 disabled:opacity-50 disabled:cursor-not-allowed"}),lt.jsx("span",{className:`text-xs ${L?"":"text-muted-foreground"}`,children:"Calibrate Uncertainty"})]})]})]}),lt.jsxs("button",{onClick:Ri,disabled:!qa||da.isPending,className:"w-full bg-primary text-primary-foreground px-3 py-2 rounded-md text-xs hover:bg-primary/90 disabled:opacity-50 disabled:cursor-not-allowed font-medium flex items-center justify-center gap-2",children:[da.isPending&&lt.jsx(ux,{className:"w-3.5 h-3.5 animate-spin"}),da.isPending?"Training Model...":"Train Model"]}),!qa&&lt.jsxs("div",{className:"mt-2 p-2.5 bg-amber-500/10 border border-amber-500/20 rounded-md flex items-start gap-2",children:[lt.jsx(Nle,{className:"w-3.5 h-3.5 text-amber-600 mt-0.5 flex-shrink-0"}),lt.jsx("p",{className:"text-xs text-amber-700 dark:text-amber-500",children:Fn?.n_experiments?`Need at least 5 experiments (currently ${Fn.n_experiments})`:"No experimental data loaded. Please load experiments first."})]}),da.isSuccess&&da.data&&lt.jsxs("div",{className:"mt-3 p-2.5 bg-green-500/10 border border-green-500/20 rounded-md flex items-start gap-2",children:[lt.jsx(Ble,{className:"w-3.5 h-3.5 text-green-600 mt-0.5 flex-shrink-0"}),lt.jsx("div",{className:"text-xs",children:lt.jsx("p",{className:"font-medium text-green-700 dark:text-green-500",children:da.data.message})})]}),ca?.is_trained&&lt.jsxs("div",{className:"mt-4 p-3 bg-muted/50 rounded-lg space-y-2.5",children:[lt.jsx("h3",{className:"font-semibold text-xs uppercase tracking-wide text-muted-foreground",children:"Trained Model Info"}),lt.jsx("div",{className:"grid grid-cols-2 gap-x-3 gap-y-1.5 text-xs",children:lt.jsxs("div",{children:[lt.jsx("span",{className:"text-muted-foreground",children:"Backend:"})," ",lt.jsx("span",{className:"font-medium",children:ca.backend})]})}),ca.metrics&&lt.jsxs("div",{children:[lt.jsx("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5",children:"Cross-Validation Metrics"}),lt.jsxs("div",{className:"grid grid-cols-2 gap-2 text-xs",children:[lt.jsxs("div",{children:[lt.jsx("span",{className:"text-muted-foreground",children:"RMSE:"})," ",lt.jsx("span",{className:"font-medium",children:ca.metrics.rmse.toFixed(4)})]}),lt.jsxs("div",{children:[lt.jsx("span",{className:"text-muted-foreground",children:"MAE:"})," ",lt.jsx("span",{className:"font-medium",children:ca.metrics.mae.toFixed(4)})]}),lt.jsxs("div",{children:[lt.jsx("span",{className:"text-muted-foreground",children:"R²:"})," ",lt.jsx("span",{className:"font-medium",children:ca.metrics.r2.toFixed(4)})]}),ca.metrics.mape!==void 0&&lt.jsxs("div",{children:[lt.jsx("span",{className:"text-muted-foreground",children:"MAPE:"})," ",lt.jsxs("span",{className:"font-medium",children:[ca.metrics.mape.toFixed(2),"%"]})]})]})]}),lt.jsxs("details",{className:"text-xs",children:[lt.jsx("summary",{className:"cursor-pointer text-muted-foreground hover:text-foreground font-medium",children:"View Hyperparameters"}),lt.jsx("pre",{className:"mt-2 p-2 bg-background rounded text-xs overflow-x-auto",children:JSON.stringify(ca.hyperparameters,null,2)})]})]}),ca?.is_trained&&ca.backend&&lt.jsxs("button",{onClick:()=>ea(e,ca.backend),className:"w-full flex items-center justify-center gap-2 px-3 py-2 rounded-md text-xs bg-secondary text-secondary-foreground hover:bg-secondary/80 transition-colors",children:[lt.jsx(Ole,{className:"h-3.5 w-3.5"}),"Show Visualizations"]})]})}function cue(e){return fp({mutationFn:async n=>(await Qc.post(`/sessions/${e}/acquisition/suggest`,n)).data,onSuccess:n=>{Il.success(`Generated ${n.n_suggestions} suggestion${n.n_suggestions>1?"s":""}!`)},onError:n=>{Il.error(n.response?.data?.detail||"Failed to generate suggestions")}})}function fue(e){return fp({mutationFn:async n=>(await Qc.post(`/sessions/${e}/acquisition/find-optimum`,n)).data,onSuccess:n=>{Il.success(`Found model optimum: ${n.predicted_value.toFixed(4)}`)},onError:n=>{Il.error(n.response?.data?.detail||"Failed to find model optimum")}})}function hue({sessionId:e,modelBackend:n,pendingSuggestions:S,onStageSuggestions:L}){const[re,ve]=na.useState("EI"),[Ce,Be]=na.useState("maximize"),[Ge,Ke]=na.useState(.01),[dt,gt]=na.useState(1.96),[Vt,Xt]=na.useState("regular"),[cr,sr]=na.useState("EI"),[nr,zr]=na.useState("qEI"),[Ne,Jr]=na.useState(2),[pn,Lr]=na.useState(.5),[Or,cn]=na.useState("maximize"),[$n,xn]=na.useState("maximize"),{data:Wa}=WW(e),On=cue(e),qn=fue(e),[ca,Fn]=na.useState([]),da=S??ca,ea=n||Wa?.backend||"sklearn",qa=Wa?.is_trained||!1,Ri={EI:"Expected Improvement (EI) balances exploration and exploitation by calculating the expected improvement over the current best observed value.",PI:"Probability of Improvement (PI) selects points based on the probability that they will improve over the current best observed value.",UCB:"Upper Confidence Bound (UCB) balances exploration and exploitation by selecting points where the upper confidence bound is highest.",gp_hedge:"GP Hedge automatically balances between EI, PI, and UCB strategies based on their past performance.",logEI:"Log Expected Improvement is a numerically stable version of EI that calculates the log of the expected improvement.",logPI:"Log Probability of Improvement is a numerically stable version of PI that calculates the log of the probability of improvement.",qEI:"q-Expected Improvement is a batch version of EI that selects multiple points simultaneously while accounting for interactions between selections.",qUCB:"q-Upper Confidence Bound is a batch version of UCB that selects multiple points simultaneously while balancing exploration and exploitation.",qNIPV:"q-Negative Integrated Posterior Variance selects points to reduce overall model uncertainty. This is purely exploratory for active learning, not optimization."},mi=async()=>{if(!qa)return;let Wn,Ei;ea==="sklearn"?(Ei=re,Wn={strategy:re,goal:Ce,n_suggestions:1},re==="EI"||re==="PI"?Wn.xi=Ge:re==="UCB"?Wn.kappa=dt:re==="gp_hedge"&&(Wn.xi=Ge,Wn.kappa=dt)):Vt==="regular"?(Ei=cr,Wn={strategy:cr,goal:Or,n_suggestions:1}):Vt==="batch"?(Ei=nr,Wn={strategy:nr,goal:Or,n_suggestions:Ne},nr==="qUCB"&&(Wn.kappa=pn)):(Ei="qNIPV",Wn={strategy:"qNIPV",goal:Or,n_suggestions:1});try{const $i=await On.mutateAsync(Wn);if(console.log("Suggestions:",$i.suggestions),$i?.suggestions&&$i.suggestions.length>0){const to=$i.suggestions.map(fi=>({...fi,_reason:Ei,_strategyParams:Wn}));L?L(to):Fn(to)}}catch($i){console.error("Failed to get suggestions:",$i)}},Io=async()=>{if(qa)try{const Wn=await qn.mutateAsync({goal:$n});console.log("Found optimum:",Wn.optimum)}catch(Wn){console.error("Failed to find optimum:",Wn)}},ya=()=>ea==="sklearn"?re:Vt==="regular"?cr:Vt==="batch"?nr:"qNIPV";return lt.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[lt.jsx("h2",{className:"text-sm font-semibold mb-4 uppercase tracking-wide text-muted-foreground border-b pb-2",children:"Acquisition Functions"}),ea==="sklearn"&&lt.jsxs("div",{className:"space-y-2.5",children:[lt.jsxs("div",{children:[lt.jsx("label",{className:"block text-xs font-medium mb-1.5",children:"Acquisition Strategy"}),lt.jsxs("select",{value:re,onChange:Wn=>ve(Wn.target.value),disabled:!qa,className:"w-full px-2.5 py-1.5 text-xs border rounded-md disabled:opacity-50 disabled:cursor-not-allowed bg-background",children:[lt.jsx("option",{value:"EI",children:"Expected Improvement (EI)"}),lt.jsx("option",{value:"UCB",children:"Upper Confidence Bound (UCB)"}),lt.jsx("option",{value:"PI",children:"Probability of Improvement (PI)"}),lt.jsx("option",{value:"gp_hedge",children:"GP Hedge (Auto-balance)"})]})]}),lt.jsxs("div",{children:[lt.jsx("label",{className:"block text-xs font-medium mb-1.5",children:"Optimization Goal"}),lt.jsxs("div",{className:"flex gap-1.5",children:[lt.jsx("button",{onClick:()=>Be("maximize"),disabled:!qa,className:`flex-1 px-3 py-1.5 rounded-md text-xs font-medium transition-colors disabled:opacity-50 disabled:cursor-not-allowed ${Ce==="maximize"?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,children:"Maximize"}),lt.jsx("button",{onClick:()=>Be("minimize"),disabled:!qa,className:`flex-1 px-3 py-1.5 rounded-md text-xs font-medium transition-colors disabled:opacity-50 disabled:cursor-not-allowed ${Ce==="minimize"?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,children:"Minimize"})]})]}),lt.jsxs("div",{className:"border-t pt-3",children:[lt.jsx("label",{className:"block text-xs font-medium mb-2",children:"Acquisition Parameters"}),(re==="EI"||re==="PI"||re==="gp_hedge")&&lt.jsxs("div",{className:"mb-3",children:[lt.jsxs("div",{className:"flex justify-between items-center mb-1.5",children:[lt.jsx("span",{className:"text-xs",children:"ξ (xi):"}),lt.jsx("span",{className:"text-xs font-medium",children:Ge.toFixed(4)})]}),lt.jsx("input",{type:"range",min:"0.0001",max:"0.1",step:"0.0001",value:Ge,onChange:Wn=>Ke(parseFloat(Wn.target.value)),disabled:!qa,className:"w-full disabled:opacity-50 disabled:cursor-not-allowed"}),lt.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Higher values favor exploration over exploitation"})]}),(re==="UCB"||re==="gp_hedge")&&lt.jsxs("div",{className:"mb-3",children:[lt.jsxs("div",{className:"flex justify-between items-center mb-1.5",children:[lt.jsx("span",{className:"text-xs",children:"κ (kappa):"}),lt.jsx("span",{className:"text-xs font-medium",children:dt.toFixed(2)})]}),lt.jsx("input",{type:"range",min:"0.1",max:"5.0",step:"0.1",value:dt,onChange:Wn=>gt(parseFloat(Wn.target.value)),disabled:!qa,className:"w-full disabled:opacity-50 disabled:cursor-not-allowed"}),lt.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Higher values increase exploration"})]})]})]}),ea==="botorch"&&lt.jsxs("div",{className:"space-y-2.5",children:[lt.jsxs("div",{children:[lt.jsx("label",{className:"block text-xs font-medium mb-1.5",children:"Acquisition Type"}),lt.jsxs("div",{className:"flex gap-2",children:[lt.jsx("button",{onClick:()=>Xt("regular"),disabled:!qa,className:`flex-1 px-3 py-2 rounded-md text-sm font-medium transition-colors disabled:opacity-50 disabled:cursor-not-allowed ${Vt==="regular"?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,children:"Regular"}),lt.jsx("button",{onClick:()=>Xt("batch"),disabled:!qa,className:`flex-1 px-3 py-2 rounded-md text-sm font-medium transition-colors disabled:opacity-50 disabled:cursor-not-allowed ${Vt==="batch"?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,children:"Batch"}),lt.jsx("button",{onClick:()=>Xt("exploratory"),disabled:!qa,className:`flex-1 px-3 py-2 rounded-md text-sm font-medium transition-colors disabled:opacity-50 disabled:cursor-not-allowed ${Vt==="exploratory"?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,children:"Exploratory"})]})]}),Vt==="regular"&&lt.jsxs(lt.Fragment,{children:[lt.jsxs("div",{children:[lt.jsx("label",{className:"block text-xs font-medium mb-1.5",children:"Acquisition Function"}),lt.jsxs("select",{value:cr,onChange:Wn=>sr(Wn.target.value),disabled:!qa,className:"w-full px-2.5 py-1.5 text-xs border rounded-md disabled:opacity-50 disabled:cursor-not-allowed bg-background",children:[lt.jsx("option",{value:"EI",children:"Expected Improvement"}),lt.jsx("option",{value:"logEI",children:"Log Expected Improvement"}),lt.jsx("option",{value:"PI",children:"Probability of Improvement"}),lt.jsx("option",{value:"logPI",children:"Log Probability of Improvement"}),lt.jsx("option",{value:"UCB",children:"Upper Confidence Bound"})]})]}),lt.jsxs("div",{children:[lt.jsx("label",{className:"block text-xs font-medium mb-1.5",children:"Optimization Goal"}),lt.jsxs("div",{className:"flex gap-2",children:[lt.jsx("button",{onClick:()=>cn("maximize"),disabled:!qa,className:`flex-1 px-4 py-2 rounded-md text-sm font-medium transition-colors disabled:opacity-50 disabled:cursor-not-allowed ${Or==="maximize"?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,children:"Maximize"}),lt.jsx("button",{onClick:()=>cn("minimize"),disabled:!qa,className:`flex-1 px-4 py-2 rounded-md text-sm font-medium transition-colors disabled:opacity-50 disabled:cursor-not-allowed ${Or==="minimize"?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,children:"Minimize"})]})]})]}),Vt==="batch"&&lt.jsxs(lt.Fragment,{children:[lt.jsxs("div",{children:[lt.jsx("label",{className:"block text-xs font-medium mb-1.5",children:"Batch Acquisition Function"}),lt.jsxs("select",{value:nr,onChange:Wn=>zr(Wn.target.value),disabled:!qa,className:"w-full px-2.5 py-1.5 text-xs border rounded-md disabled:opacity-50 disabled:cursor-not-allowed bg-background",children:[lt.jsx("option",{value:"qEI",children:"q-Expected Improvement"}),lt.jsx("option",{value:"qUCB",children:"q-Upper Confidence Bound"})]})]}),lt.jsxs("div",{children:[lt.jsx("label",{className:"block text-xs font-medium mb-1.5",children:"Batch Size (q)"}),lt.jsx("select",{value:Ne,onChange:Wn=>Jr(parseInt(Wn.target.value)),disabled:!qa,className:"w-full px-2.5 py-1.5 text-xs border rounded-md disabled:opacity-50 disabled:cursor-not-allowed bg-background",children:[2,3,4,5,6,7,8,9,10].map(Wn=>lt.jsx("option",{value:Wn,children:Wn},Wn))})]}),nr==="qUCB"&&lt.jsxs("div",{children:[lt.jsxs("div",{className:"flex justify-between items-center mb-1.5",children:[lt.jsx("span",{className:"text-xs",children:"β (beta):"}),lt.jsx("span",{className:"text-xs font-medium",children:pn.toFixed(2)})]}),lt.jsx("input",{type:"range",min:"0.1",max:"2.0",step:"0.1",value:pn,onChange:Wn=>Lr(parseFloat(Wn.target.value)),disabled:!qa,className:"w-full disabled:opacity-50 disabled:cursor-not-allowed"})]}),lt.jsxs("div",{children:[lt.jsx("label",{className:"block text-xs font-medium mb-1.5",children:"Optimization Goal"}),lt.jsxs("div",{className:"flex gap-2",children:[lt.jsx("button",{onClick:()=>cn("maximize"),disabled:!qa,className:`flex-1 px-4 py-2 rounded-md text-sm font-medium transition-colors disabled:opacity-50 disabled:cursor-not-allowed ${Or==="maximize"?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,children:"Maximize"}),lt.jsx("button",{onClick:()=>cn("minimize"),disabled:!qa,className:`flex-1 px-4 py-2 rounded-md text-sm font-medium transition-colors disabled:opacity-50 disabled:cursor-not-allowed ${Or==="minimize"?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,children:"Minimize"})]})]})]}),Vt==="exploratory"&&lt.jsxs("div",{className:"p-3 bg-muted/30 rounded-lg",children:[lt.jsx("h3",{className:"font-semibold text-xs mb-1.5",children:"Integrated Posterior Variance"}),lt.jsx("p",{className:"text-xs text-muted-foreground",children:"This purely exploratory acquisition function selects points to reduce model uncertainty, without considering optimization goals."})]}),lt.jsx("div",{className:"p-2.5 bg-muted/20 rounded-lg border border-muted",children:lt.jsxs("div",{className:"flex items-start gap-2",children:[lt.jsx(GW,{className:"w-4 h-4 text-muted-foreground mt-0.5 flex-shrink-0"}),lt.jsx("p",{className:"text-xs text-muted-foreground",children:Ri[ya()]})]})})]}),lt.jsxs("button",{onClick:mi,disabled:!qa||On.isPending,className:"w-full mt-4 bg-primary text-primary-foreground px-3 py-2 rounded-md text-xs hover:bg-primary/90 disabled:opacity-50 disabled:cursor-not-allowed font-medium flex items-center justify-center gap-2",children:[lt.jsx(Hle,{className:"w-3.5 h-3.5"}),On.isPending?"Generating Suggestions...":"Run Acquisition Strategy"]}),!qa&&lt.jsx("p",{className:"mt-3 text-sm text-muted-foreground text-center",children:"Train a model first to enable acquisition functions"}),On.isSuccess&&On.data&&lt.jsxs("div",{className:"mt-6 p-4 bg-muted/50 rounded-lg",children:[lt.jsx("h3",{className:"font-semibold text-xs uppercase tracking-wide text-muted-foreground mb-2",children:"Suggested Experiments"}),lt.jsx("div",{className:"space-y-2",children:On.data.suggestions.map((Wn,Ei)=>lt.jsxs("div",{className:"p-2.5 bg-background rounded border text-xs",children:[lt.jsxs("div",{className:"font-medium mb-1",children:["Suggestion ",Ei+1,":"]}),lt.jsx("div",{className:"grid grid-cols-2 gap-2 text-xs",children:Object.entries(Wn).map(([$i,to])=>lt.jsxs("div",{children:[lt.jsxs("span",{className:"text-muted-foreground",children:[$i,":"]})," ",lt.jsx("span",{className:"font-medium",children:typeof to=="number"?to.toFixed(3):to})]},$i))})]},Ei))}),lt.jsxs("div",{className:"mt-3 flex flex-col gap-2",children:[lt.jsx("button",{onClick:async()=>{const{toast:Wn}=await z7(async()=>{const{toast:Ei}=await Promise.resolve().then(()=>Pie);return{toast:Ei}},void 0);try{const Ei=da[0]?._strategyParams,$i=da[0]?._reason||"Unknown",to=da.map(Ll=>{const{_reason:Mo,_strategyParams:Hs,...qo}=Ll;return qo});if(!(await fetch(`/api/v1/sessions/${e}/experiments/staged/batch`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({experiments:to,reason:$i})})).ok)throw new Error("Failed to stage experiments");(await fetch(`/api/v1/sessions/${e}/audit/lock`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({lock_type:"acquisition",strategy:$i,parameters:Ei||{},suggestions:to,notes:""})})).ok||console.warn("Audit log failed, but experiments were staged"),Wn.success(`✓ ${to.length} suggestion(s) staged`,{description:'Use "Add Point" button in Experiments panel to add results'}),console.log(`✓ Suggestions staged (${$i})`)}catch(Ei){Wn.error("Failed to stage suggestions: "+(Ei?.message||String(Ei))),console.error("Failed to stage suggestions:",Ei)}},className:"px-3 py-2 text-xs bg-green-600 text-white rounded hover:bg-green-700 font-medium flex items-center justify-center gap-2",children:"📝 Stage Suggestions"}),lt.jsx("p",{className:"text-xs text-muted-foreground text-center",children:'Staging persists suggestions across page reloads. Use "Add Point" to enter experimental results.'})]})]}),lt.jsx("div",{className:"my-8 border-t border-border"}),lt.jsxs("div",{className:"space-y-2.5",children:[lt.jsx("h3",{className:"text-lg font-semibold",children:"Model Prediction Optimum"}),lt.jsx("p",{className:"text-xs text-muted-foreground",children:"Find the point where the model predicts the optimal value."}),lt.jsxs("div",{children:[lt.jsx("label",{className:"block text-xs font-medium mb-1.5",children:"Optimization Goal"}),lt.jsxs("div",{className:"flex gap-2",children:[lt.jsx("button",{onClick:()=>xn("maximize"),disabled:!qa,className:`flex-1 px-4 py-2 rounded-md text-sm font-medium transition-colors disabled:opacity-50 disabled:cursor-not-allowed ${$n==="maximize"?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,children:"Maximize"}),lt.jsx("button",{onClick:()=>xn("minimize"),disabled:!qa,className:`flex-1 px-4 py-2 rounded-md text-sm font-medium transition-colors disabled:opacity-50 disabled:cursor-not-allowed ${$n==="minimize"?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,children:"Minimize"})]})]}),lt.jsxs("button",{onClick:Io,disabled:!qa||qn.isPending,className:"w-full bg-secondary text-secondary-foreground px-3 py-2 rounded-md text-xs hover:bg-secondary/90 disabled:opacity-50 disabled:cursor-not-allowed font-medium flex items-center justify-center gap-2",children:[lt.jsx(Xle,{className:"w-3.5 h-3.5"}),qn.isPending?"Finding Optimum...":"Find Model Optimum"]}),lt.jsx("div",{className:"p-3 bg-amber-500/10 border border-amber-500/20 rounded-md",children:lt.jsxs("p",{className:"text-xs text-amber-700 dark:text-amber-500",children:[lt.jsx("strong",{children:"Note:"})," This relies entirely on the model's prediction, not on acquisition functions that balance exploration and exploitation. Use when confident in model accuracy."]})}),qn.isSuccess&&qn.data&&lt.jsxs("div",{className:"p-4 bg-green-500/10 border border-green-500/20 rounded-lg",children:[lt.jsx("h4",{className:"font-semibold text-sm mb-3 text-green-700 dark:text-green-500",children:"Model Optimum Found"}),lt.jsxs("div",{className:"space-y-2",children:[lt.jsxs("div",{className:"p-2.5 bg-background rounded border text-xs",children:[lt.jsx("div",{className:"font-medium mb-1",children:"Optimal Point:"}),lt.jsx("div",{className:"grid grid-cols-2 gap-2 text-xs",children:Object.entries(qn.data.optimum).map(([Wn,Ei])=>lt.jsxs("div",{children:[lt.jsxs("span",{className:"text-muted-foreground",children:[Wn,":"]})," ",lt.jsx("span",{className:"font-medium",children:typeof Ei=="number"?Ei.toFixed(3):Ei})]},Wn))})]}),lt.jsxs("div",{className:"grid grid-cols-2 gap-2 text-sm",children:[lt.jsxs("div",{className:"p-2 bg-background rounded border",children:[lt.jsx("div",{className:"text-xs text-muted-foreground",children:"Predicted Value"}),lt.jsx("div",{className:"font-semibold",children:qn.data.predicted_value.toFixed(4)})]}),qn.data.predicted_std!==null&&lt.jsxs("div",{className:"p-2 bg-background rounded border",children:[lt.jsx("div",{className:"text-xs text-muted-foreground",children:"Uncertainty (±)"}),lt.jsx("div",{className:"font-semibold",children:qn.data.predicted_std.toFixed(4)})]})]})]})]})]})]})}function due({sessionId:e,pollingInterval:n=6e4}){const{data:S,isLoading:L,dataUpdatedAt:re}=Qse(e,n),{data:ve}=N7(e);na.useEffect(()=>{window.scrollTo(0,0)},[]);const Ce=new Date(re).toLocaleTimeString();return lt.jsx("div",{className:"min-h-screen bg-background",children:lt.jsxs("div",{className:"container mx-auto p-8",children:[lt.jsxs("div",{className:"mb-8 rounded-lg border-2 border-primary bg-primary/5 p-6",children:[lt.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[lt.jsx(W8,{className:"h-8 w-8 text-primary animate-pulse"}),lt.jsxs("div",{children:[lt.jsx("h1",{className:"text-3xl font-bold text-foreground",children:"Autonomous Optimization Monitor"}),lt.jsxs("p",{className:"text-muted-foreground mt-1",children:["Read-only monitoring mode • Refreshes every ",n/1e3,"s"]})]})]}),lt.jsxs("div",{className:"mt-4 flex items-center gap-2 text-sm",children:[lt.jsx(nj,{className:"h-4 w-4 text-primary"}),lt.jsxs("span",{className:"text-muted-foreground",children:["Last updated: ",Ce]})]})]}),L?lt.jsxs("div",{className:"text-center py-12",children:[lt.jsx("div",{className:"inline-block animate-spin rounded-full h-12 w-12 border-b-2 border-primary"}),lt.jsx("p",{className:"mt-4 text-muted-foreground",children:"Loading session state..."})]}):S?lt.jsxs("div",{className:"space-y-6",children:[lt.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[lt.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[lt.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[lt.jsx(qle,{className:"h-5 w-5 text-blue-500"}),lt.jsx("h3",{className:"font-semibold",children:"Session"})]}),lt.jsx("p",{className:"text-2xl font-bold",children:S.session_id.slice(0,8)}),lt.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"ID (truncated)"})]}),lt.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[lt.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[lt.jsx(Wle,{className:"h-5 w-5 text-yellow-500"}),lt.jsx("h3",{className:"font-semibold",children:"Variables"})]}),lt.jsx("p",{className:"text-2xl font-bold",children:S.n_variables}),lt.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Search dimensions"})]}),lt.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[lt.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[lt.jsx(nj,{className:"h-5 w-5 text-green-500"}),lt.jsx("h3",{className:"font-semibold",children:"Experiments"})]}),lt.jsx("p",{className:"text-2xl font-bold",children:S.n_experiments}),lt.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Data points collected"})]}),lt.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[lt.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[lt.jsx(W8,{className:"h-5 w-5 text-purple-500"}),lt.jsx("h3",{className:"font-semibold",children:"Model Status"})]}),lt.jsx("p",{className:"text-2xl font-bold",children:S.model_trained?"✓ Trained":"○ Not Trained"}),lt.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:S.model_trained?"Ready for suggestions":"Awaiting data"})]})]}),ve&&ve.has_data&&lt.jsxs("div",{className:"rounded-lg border bg-card p-6",children:[lt.jsx("h2",{className:"text-xl font-bold mb-4",children:"Experiment Summary"}),lt.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[lt.jsxs("div",{children:[lt.jsx("p",{className:"text-sm text-muted-foreground",children:"Total Experiments"}),lt.jsx("p",{className:"text-2xl font-bold",children:ve.n_experiments})]}),ve.target_stats&&lt.jsxs(lt.Fragment,{children:[lt.jsxs("div",{children:[lt.jsx("p",{className:"text-sm text-muted-foreground",children:"Mean Output"}),lt.jsx("p",{className:"text-2xl font-bold",children:ve.target_stats.mean?.toFixed(3)})]}),lt.jsxs("div",{children:[lt.jsx("p",{className:"text-sm text-muted-foreground",children:"Std Dev"}),lt.jsx("p",{className:"text-2xl font-bold",children:ve.target_stats.std?.toFixed(3)})]}),lt.jsxs("div",{children:[lt.jsx("p",{className:"text-sm text-muted-foreground",children:"Range"}),lt.jsxs("p",{className:"text-lg font-bold",children:[ve.target_stats.min?.toFixed(2)," - ",ve.target_stats.max?.toFixed(2)]})]})]})]})]}),S.last_suggestion&&lt.jsxs("div",{className:"rounded-lg border bg-card p-6",children:[lt.jsx("h2",{className:"text-xl font-bold mb-4",children:"Last Suggested Experiment"}),lt.jsx("div",{className:"bg-muted/50 rounded-lg p-4",children:lt.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4",children:Object.entries(S.last_suggestion).map(([Be,Ge])=>lt.jsxs("div",{children:[lt.jsx("p",{className:"text-sm text-muted-foreground",children:Be}),lt.jsx("p",{className:"font-semibold",children:typeof Ge=="number"?Ge.toFixed(3):Ge})]},Be))})})]}),lt.jsxs("div",{className:"rounded-lg border-2 border-blue-500/30 bg-blue-500/5 p-6",children:[lt.jsxs("h3",{className:"font-semibold mb-2 flex items-center gap-2",children:[lt.jsx(W8,{className:"h-5 w-5 text-blue-500"}),"Monitoring Mode Active"]}),lt.jsxs("p",{className:"text-sm text-muted-foreground",children:["This dashboard is in read-only mode. An autonomous controller is managing the optimization workflow. The view refreshes automatically every"," ",n/1e3," seconds to display the latest progress."]}),lt.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:"To stop autonomous optimization, use the hardware control interface (HMI) or autonomous controller directly."})]})]}):lt.jsx("div",{className:"text-center py-12",children:lt.jsx("p",{className:"text-muted-foreground",children:"Failed to load session state"})})]})})}function YW(e){var n,S,L="";if(typeof e=="string"||typeof e=="number")L+=e;else if(typeof e=="object")if(Array.isArray(e)){var re=e.length;for(n=0;n<re;n++)e[n]&&(S=YW(e[n]))&&(L&&(L+=" "),L+=S)}else for(S in e)e[S]&&(L&&(L+=" "),L+=S);return L}function kc(){for(var e,n,S=0,L="",re=arguments.length;S<re;S++)(e=arguments[S])&&(n=YW(e))&&(L&&(L+=" "),L+=n);return L}var Y8,oj;function Tm(){if(oj)return Y8;oj=1;var e=Array.isArray;return Y8=e,Y8}var Z8,sj;function ZW(){if(sj)return Z8;sj=1;var e=typeof d6=="object"&&d6&&d6.Object===Object&&d6;return Z8=e,Z8}var $8,lj;function _y(){if(lj)return $8;lj=1;var e=ZW(),n=typeof self=="object"&&self&&self.Object===Object&&self,S=e||n||Function("return this")();return $8=S,$8}var K8,uj;function HE(){if(uj)return K8;uj=1;var e=_y(),n=e.Symbol;return K8=n,K8}var J8,cj;function vue(){if(cj)return J8;cj=1;var e=HE(),n=Object.prototype,S=n.hasOwnProperty,L=n.toString,re=e?e.toStringTag:void 0;function ve(Ce){var Be=S.call(Ce,re),Ge=Ce[re];try{Ce[re]=void 0;var Ke=!0}catch{}var dt=L.call(Ce);return Ke&&(Be?Ce[re]=Ge:delete Ce[re]),dt}return J8=ve,J8}var Q8,fj;function pue(){if(fj)return Q8;fj=1;var e=Object.prototype,n=e.toString;function S(L){return n.call(L)}return Q8=S,Q8}var eI,hj;function M1(){if(hj)return eI;hj=1;var e=HE(),n=vue(),S=pue(),L="[object Null]",re="[object Undefined]",ve=e?e.toStringTag:void 0;function Ce(Be){return Be==null?Be===void 0?re:L:ve&&ve in Object(Be)?n(Be):S(Be)}return eI=Ce,eI}var tI,dj;function C1(){if(dj)return tI;dj=1;function e(n){return n!=null&&typeof n=="object"}return tI=e,tI}var rI,vj;function NT(){if(vj)return rI;vj=1;var e=M1(),n=C1(),S="[object Symbol]";function L(re){return typeof re=="symbol"||n(re)&&e(re)==S}return rI=L,rI}var nI,pj;function F7(){if(pj)return nI;pj=1;var e=Tm(),n=NT(),S=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,L=/^\w*$/;function re(ve,Ce){if(e(ve))return!1;var Be=typeof ve;return Be=="number"||Be=="symbol"||Be=="boolean"||ve==null||n(ve)?!0:L.test(ve)||!S.test(ve)||Ce!=null&&ve in Object(Ce)}return nI=re,nI}var aI,mj;function fx(){if(mj)return aI;mj=1;function e(n){var S=typeof n;return n!=null&&(S=="object"||S=="function")}return aI=e,aI}var iI,gj;function B7(){if(gj)return iI;gj=1;var e=M1(),n=fx(),S="[object AsyncFunction]",L="[object Function]",re="[object GeneratorFunction]",ve="[object Proxy]";function Ce(Be){if(!n(Be))return!1;var Ge=e(Be);return Ge==L||Ge==re||Ge==S||Ge==ve}return iI=Ce,iI}var oI,yj;function mue(){if(yj)return oI;yj=1;var e=_y(),n=e["__core-js_shared__"];return oI=n,oI}var sI,_j;function gue(){if(_j)return sI;_j=1;var e=mue(),n=(function(){var L=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return L?"Symbol(src)_1."+L:""})();function S(L){return!!n&&n in L}return sI=S,sI}var lI,xj;function $W(){if(xj)return lI;xj=1;var e=Function.prototype,n=e.toString;function S(L){if(L!=null){try{return n.call(L)}catch{}try{return L+""}catch{}}return""}return lI=S,lI}var uI,bj;function yue(){if(bj)return uI;bj=1;var e=B7(),n=gue(),S=fx(),L=$W(),re=/[\\^$.*+?()[\]{}|]/g,ve=/^\[object .+?Constructor\]$/,Ce=Function.prototype,Be=Object.prototype,Ge=Ce.toString,Ke=Be.hasOwnProperty,dt=RegExp("^"+Ge.call(Ke).replace(re,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function gt(Vt){if(!S(Vt)||n(Vt))return!1;var Xt=e(Vt)?dt:ve;return Xt.test(L(Vt))}return uI=gt,uI}var cI,wj;function _ue(){if(wj)return cI;wj=1;function e(n,S){return n?.[S]}return cI=e,cI}var fI,Tj;function ww(){if(Tj)return fI;Tj=1;var e=yue(),n=_ue();function S(L,re){var ve=n(L,re);return e(ve)?ve:void 0}return fI=S,fI}var hI,Aj;function VP(){if(Aj)return hI;Aj=1;var e=ww(),n=e(Object,"create");return hI=n,hI}var dI,Sj;function xue(){if(Sj)return dI;Sj=1;var e=VP();function n(){this.__data__=e?e(null):{},this.size=0}return dI=n,dI}var vI,Ej;function bue(){if(Ej)return vI;Ej=1;function e(n){var S=this.has(n)&&delete this.__data__[n];return this.size-=S?1:0,S}return vI=e,vI}var pI,Mj;function wue(){if(Mj)return pI;Mj=1;var e=VP(),n="__lodash_hash_undefined__",S=Object.prototype,L=S.hasOwnProperty;function re(ve){var Ce=this.__data__;if(e){var Be=Ce[ve];return Be===n?void 0:Be}return L.call(Ce,ve)?Ce[ve]:void 0}return pI=re,pI}var mI,Cj;function Tue(){if(Cj)return mI;Cj=1;var e=VP(),n=Object.prototype,S=n.hasOwnProperty;function L(re){var ve=this.__data__;return e?ve[re]!==void 0:S.call(ve,re)}return mI=L,mI}var gI,kj;function Aue(){if(kj)return gI;kj=1;var e=VP(),n="__lodash_hash_undefined__";function S(L,re){var ve=this.__data__;return this.size+=this.has(L)?0:1,ve[L]=e&&re===void 0?n:re,this}return gI=S,gI}var yI,Pj;function Sue(){if(Pj)return yI;Pj=1;var e=xue(),n=bue(),S=wue(),L=Tue(),re=Aue();function ve(Ce){var Be=-1,Ge=Ce==null?0:Ce.length;for(this.clear();++Be<Ge;){var Ke=Ce[Be];this.set(Ke[0],Ke[1])}}return ve.prototype.clear=e,ve.prototype.delete=n,ve.prototype.get=S,ve.prototype.has=L,ve.prototype.set=re,yI=ve,yI}var _I,Lj;function Eue(){if(Lj)return _I;Lj=1;function e(){this.__data__=[],this.size=0}return _I=e,_I}var xI,Rj;function j7(){if(Rj)return xI;Rj=1;function e(n,S){return n===S||n!==n&&S!==S}return xI=e,xI}var bI,Ij;function HP(){if(Ij)return bI;Ij=1;var e=j7();function n(S,L){for(var re=S.length;re--;)if(e(S[re][0],L))return re;return-1}return bI=n,bI}var wI,Dj;function Mue(){if(Dj)return wI;Dj=1;var e=HP(),n=Array.prototype,S=n.splice;function L(re){var ve=this.__data__,Ce=e(ve,re);if(Ce<0)return!1;var Be=ve.length-1;return Ce==Be?ve.pop():S.call(ve,Ce,1),--this.size,!0}return wI=L,wI}var TI,Oj;function Cue(){if(Oj)return TI;Oj=1;var e=HP();function n(S){var L=this.__data__,re=e(L,S);return re<0?void 0:L[re][1]}return TI=n,TI}var AI,zj;function kue(){if(zj)return AI;zj=1;var e=HP();function n(S){return e(this.__data__,S)>-1}return AI=n,AI}var SI,Nj;function Pue(){if(Nj)return SI;Nj=1;var e=HP();function n(S,L){var re=this.__data__,ve=e(re,S);return ve<0?(++this.size,re.push([S,L])):re[ve][1]=L,this}return SI=n,SI}var EI,Fj;function GP(){if(Fj)return EI;Fj=1;var e=Eue(),n=Mue(),S=Cue(),L=kue(),re=Pue();function ve(Ce){var Be=-1,Ge=Ce==null?0:Ce.length;for(this.clear();++Be<Ge;){var Ke=Ce[Be];this.set(Ke[0],Ke[1])}}return ve.prototype.clear=e,ve.prototype.delete=n,ve.prototype.get=S,ve.prototype.has=L,ve.prototype.set=re,EI=ve,EI}var MI,Bj;function U7(){if(Bj)return MI;Bj=1;var e=ww(),n=_y(),S=e(n,"Map");return MI=S,MI}var CI,jj;function Lue(){if(jj)return CI;jj=1;var e=Sue(),n=GP(),S=U7();function L(){this.size=0,this.__data__={hash:new e,map:new(S||n),string:new e}}return CI=L,CI}var kI,Uj;function Rue(){if(Uj)return kI;Uj=1;function e(n){var S=typeof n;return S=="string"||S=="number"||S=="symbol"||S=="boolean"?n!=="__proto__":n===null}return kI=e,kI}var PI,qj;function XP(){if(qj)return PI;qj=1;var e=Rue();function n(S,L){var re=S.__data__;return e(L)?re[typeof L=="string"?"string":"hash"]:re.map}return PI=n,PI}var LI,Vj;function Iue(){if(Vj)return LI;Vj=1;var e=XP();function n(S){var L=e(this,S).delete(S);return this.size-=L?1:0,L}return LI=n,LI}var RI,Hj;function Due(){if(Hj)return RI;Hj=1;var e=XP();function n(S){return e(this,S).get(S)}return RI=n,RI}var II,Gj;function Oue(){if(Gj)return II;Gj=1;var e=XP();function n(S){return e(this,S).has(S)}return II=n,II}var DI,Xj;function zue(){if(Xj)return DI;Xj=1;var e=XP();function n(S,L){var re=e(this,S),ve=re.size;return re.set(S,L),this.size+=re.size==ve?0:1,this}return DI=n,DI}var OI,Wj;function q7(){if(Wj)return OI;Wj=1;var e=Lue(),n=Iue(),S=Due(),L=Oue(),re=zue();function ve(Ce){var Be=-1,Ge=Ce==null?0:Ce.length;for(this.clear();++Be<Ge;){var Ke=Ce[Be];this.set(Ke[0],Ke[1])}}return ve.prototype.clear=e,ve.prototype.delete=n,ve.prototype.get=S,ve.prototype.has=L,ve.prototype.set=re,OI=ve,OI}var zI,Yj;function KW(){if(Yj)return zI;Yj=1;var e=q7(),n="Expected a function";function S(L,re){if(typeof L!="function"||re!=null&&typeof re!="function")throw new TypeError(n);var ve=function(){var Ce=arguments,Be=re?re.apply(this,Ce):Ce[0],Ge=ve.cache;if(Ge.has(Be))return Ge.get(Be);var Ke=L.apply(this,Ce);return ve.cache=Ge.set(Be,Ke)||Ge,Ke};return ve.cache=new(S.Cache||e),ve}return S.Cache=e,zI=S,zI}var NI,Zj;function Nue(){if(Zj)return NI;Zj=1;var e=KW(),n=500;function S(L){var re=e(L,function(Ce){return ve.size===n&&ve.clear(),Ce}),ve=re.cache;return re}return NI=S,NI}var FI,$j;function Fue(){if($j)return FI;$j=1;var e=Nue(),n=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,S=/\\(\\)?/g,L=e(function(re){var ve=[];return re.charCodeAt(0)===46&&ve.push(""),re.replace(n,function(Ce,Be,Ge,Ke){ve.push(Ge?Ke.replace(S,"$1"):Be||Ce)}),ve});return FI=L,FI}var BI,Kj;function V7(){if(Kj)return BI;Kj=1;function e(n,S){for(var L=-1,re=n==null?0:n.length,ve=Array(re);++L<re;)ve[L]=S(n[L],L,n);return ve}return BI=e,BI}var jI,Jj;function Bue(){if(Jj)return jI;Jj=1;var e=HE(),n=V7(),S=Tm(),L=NT(),re=e?e.prototype:void 0,ve=re?re.toString:void 0;function Ce(Be){if(typeof Be=="string")return Be;if(S(Be))return n(Be,Ce)+"";if(L(Be))return ve?ve.call(Be):"";var Ge=Be+"";return Ge=="0"&&1/Be==-1/0?"-0":Ge}return jI=Ce,jI}var UI,Qj;function JW(){if(Qj)return UI;Qj=1;var e=Bue();function n(S){return S==null?"":e(S)}return UI=n,UI}var qI,eU;function QW(){if(eU)return qI;eU=1;var e=Tm(),n=F7(),S=Fue(),L=JW();function re(ve,Ce){return e(ve)?ve:n(ve,Ce)?[ve]:S(L(ve))}return qI=re,qI}var VI,tU;function WP(){if(tU)return VI;tU=1;var e=NT();function n(S){if(typeof S=="string"||e(S))return S;var L=S+"";return L=="0"&&1/S==-1/0?"-0":L}return VI=n,VI}var HI,rU;function H7(){if(rU)return HI;rU=1;var e=QW(),n=WP();function S(L,re){re=e(re,L);for(var ve=0,Ce=re.length;L!=null&&ve<Ce;)L=L[n(re[ve++])];return ve&&ve==Ce?L:void 0}return HI=S,HI}var GI,nU;function eY(){if(nU)return GI;nU=1;var e=H7();function n(S,L,re){var ve=S==null?void 0:e(S,L);return ve===void 0?re:ve}return GI=n,GI}var jue=eY();const P0=ih(jue);var XI,aU;function Uue(){if(aU)return XI;aU=1;function e(n){return n==null}return XI=e,XI}var que=Uue();const Ru=ih(que);var WI,iU;function Vue(){if(iU)return WI;iU=1;var e=M1(),n=Tm(),S=C1(),L="[object String]";function re(ve){return typeof ve=="string"||!n(ve)&&S(ve)&&e(ve)==L}return WI=re,WI}var Hue=Vue();const mw=ih(Hue);var Gue=B7();const qu=ih(Gue);var Xue=fx();const FT=ih(Xue);var YI={exports:{}},Vf={};/**
 * @license React
 * react-is.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 oU;function Wue(){if(oU)return Vf;oU=1;var e=Symbol.for("react.element"),n=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),L=Symbol.for("react.strict_mode"),re=Symbol.for("react.profiler"),ve=Symbol.for("react.provider"),Ce=Symbol.for("react.context"),Be=Symbol.for("react.server_context"),Ge=Symbol.for("react.forward_ref"),Ke=Symbol.for("react.suspense"),dt=Symbol.for("react.suspense_list"),gt=Symbol.for("react.memo"),Vt=Symbol.for("react.lazy"),Xt=Symbol.for("react.offscreen"),cr;cr=Symbol.for("react.module.reference");function sr(nr){if(typeof nr=="object"&&nr!==null){var zr=nr.$$typeof;switch(zr){case e:switch(nr=nr.type,nr){case S:case re:case L:case Ke:case dt:return nr;default:switch(nr=nr&&nr.$$typeof,nr){case Be:case Ce:case Ge:case Vt:case gt:case ve:return nr;default:return zr}}case n:return zr}}}return Vf.ContextConsumer=Ce,Vf.ContextProvider=ve,Vf.Element=e,Vf.ForwardRef=Ge,Vf.Fragment=S,Vf.Lazy=Vt,Vf.Memo=gt,Vf.Portal=n,Vf.Profiler=re,Vf.StrictMode=L,Vf.Suspense=Ke,Vf.SuspenseList=dt,Vf.isAsyncMode=function(){return!1},Vf.isConcurrentMode=function(){return!1},Vf.isContextConsumer=function(nr){return sr(nr)===Ce},Vf.isContextProvider=function(nr){return sr(nr)===ve},Vf.isElement=function(nr){return typeof nr=="object"&&nr!==null&&nr.$$typeof===e},Vf.isForwardRef=function(nr){return sr(nr)===Ge},Vf.isFragment=function(nr){return sr(nr)===S},Vf.isLazy=function(nr){return sr(nr)===Vt},Vf.isMemo=function(nr){return sr(nr)===gt},Vf.isPortal=function(nr){return sr(nr)===n},Vf.isProfiler=function(nr){return sr(nr)===re},Vf.isStrictMode=function(nr){return sr(nr)===L},Vf.isSuspense=function(nr){return sr(nr)===Ke},Vf.isSuspenseList=function(nr){return sr(nr)===dt},Vf.isValidElementType=function(nr){return typeof nr=="string"||typeof nr=="function"||nr===S||nr===re||nr===L||nr===Ke||nr===dt||nr===Xt||typeof nr=="object"&&nr!==null&&(nr.$$typeof===Vt||nr.$$typeof===gt||nr.$$typeof===ve||nr.$$typeof===Ce||nr.$$typeof===Ge||nr.$$typeof===cr||nr.getModuleId!==void 0)},Vf.typeOf=sr,Vf}var sU;function Yue(){return sU||(sU=1,YI.exports=Wue()),YI.exports}var Zue=Yue(),ZI,lU;function tY(){if(lU)return ZI;lU=1;var e=M1(),n=C1(),S="[object Number]";function L(re){return typeof re=="number"||n(re)&&e(re)==S}return ZI=L,ZI}var $I,uU;function $ue(){if(uU)return $I;uU=1;var e=tY();function n(S){return e(S)&&S!=+S}return $I=n,$I}var Kue=$ue();const BT=ih(Kue);var Jue=tY();const Que=ih(Jue);var dg=function(n){return n===0?0:n>0?1:-1},aw=function(n){return mw(n)&&n.indexOf("%")===n.length-1},ys=function(n){return Que(n)&&!BT(n)},ece=function(n){return Ru(n)},Ov=function(n){return ys(n)||mw(n)},tce=0,Tw=function(n){var S=++tce;return"".concat(n||"").concat(S)},gw=function(n,S){var L=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,re=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!ys(n)&&!mw(n))return L;var ve;if(aw(n)){var Ce=n.indexOf("%");ve=S*parseFloat(n.slice(0,Ce))/100}else ve=+n;return BT(ve)&&(ve=L),re&&ve>S&&(ve=S),ve},nx=function(n){if(!n)return null;var S=Object.keys(n);return S&&S.length?n[S[0]]:null},rce=function(n){if(!Array.isArray(n))return!1;for(var S=n.length,L={},re=0;re<S;re++)if(!L[n[re]])L[n[re]]=!0;else return!0;return!1},av=function(n,S){return ys(n)&&ys(S)?function(L){return n+L*(S-n)}:function(){return S}};function N6(e,n,S){return!e||!e.length?null:e.find(function(L){return L&&(typeof n=="function"?n(L):P0(L,n))===S})}var nce=function(n){if(!n||!n.length)return null;for(var S=n.length,L=0,re=0,ve=0,Ce=0,Be=1/0,Ge=-1/0,Ke=0,dt=0,gt=0;gt<S;gt++)Ke=n[gt].cx||0,dt=n[gt].cy||0,L+=Ke,re+=dt,ve+=Ke*dt,Ce+=Ke*Ke,Be=Math.min(Be,Ke),Ge=Math.max(Ge,Ke);var Vt=S*Ce!==L*L?(S*ve-L*re)/(S*Ce-L*L):0;return{xmin:Be,xmax:Ge,a:Vt,b:(re-Vt*L)/S}},ace=function(n,S){return ys(n)&&ys(S)?n-S:mw(n)&&mw(S)?n.localeCompare(S):n instanceof Date&&S instanceof Date?n.getTime()-S.getTime():String(n).localeCompare(String(S))};function iT(e,n){for(var S in e)if({}.hasOwnProperty.call(e,S)&&(!{}.hasOwnProperty.call(n,S)||e[S]!==n[S]))return!1;for(var L in n)if({}.hasOwnProperty.call(n,L)&&!{}.hasOwnProperty.call(e,L))return!1;return!0}function oz(e){"@babel/helpers - typeof";return oz=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},oz(e)}var ice=["viewBox","children"],oce=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],cU=["points","pathLength"],KI={svg:ice,polygon:cU,polyline:cU},G7=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],F6=function(n,S){if(!n||typeof n=="function"||typeof n=="boolean")return null;var L=n;if(na.isValidElement(n)&&(L=n.props),!FT(L))return null;var re={};return Object.keys(L).forEach(function(ve){G7.includes(ve)&&(re[ve]=S||function(Ce){return L[ve](L,Ce)})}),re},sce=function(n,S,L){return function(re){return n(S,L,re),null}},nE=function(n,S,L){if(!FT(n)||oz(n)!=="object")return null;var re=null;return Object.keys(n).forEach(function(ve){var Ce=n[ve];G7.includes(ve)&&typeof Ce=="function"&&(re||(re={}),re[ve]=sce(Ce,S,L))}),re},lce=["children"],uce=["children"];function fU(e,n){if(e==null)return{};var S=cce(e,n),L,re;if(Object.getOwnPropertySymbols){var ve=Object.getOwnPropertySymbols(e);for(re=0;re<ve.length;re++)L=ve[re],!(n.indexOf(L)>=0)&&Object.prototype.propertyIsEnumerable.call(e,L)&&(S[L]=e[L])}return S}function cce(e,n){if(e==null)return{};var S={};for(var L in e)if(Object.prototype.hasOwnProperty.call(e,L)){if(n.indexOf(L)>=0)continue;S[L]=e[L]}return S}function sz(e){"@babel/helpers - typeof";return sz=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},sz(e)}var hU={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},b1=function(n){return typeof n=="string"?n:n?n.displayName||n.name||"Component":""},dU=null,JI=null,X7=function e(n){if(n===dU&&Array.isArray(JI))return JI;var S=[];return na.Children.forEach(n,function(L){Ru(L)||(Zue.isFragment(L)?S=S.concat(e(L.props.children)):S.push(L))}),JI=S,dU=n,S};function wm(e,n){var S=[],L=[];return Array.isArray(n)?L=n.map(function(re){return b1(re)}):L=[b1(n)],X7(e).forEach(function(re){var ve=P0(re,"type.displayName")||P0(re,"type.name");L.indexOf(ve)!==-1&&S.push(re)}),S}function Jm(e,n){var S=wm(e,n);return S&&S[0]}var vU=function(n){if(!n||!n.props)return!1;var S=n.props,L=S.width,re=S.height;return!(!ys(L)||L<=0||!ys(re)||re<=0)},fce=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],hce=function(n){return n&&n.type&&mw(n.type)&&fce.indexOf(n.type)>=0},rY=function(n){return n&&sz(n)==="object"&&"clipDot"in n},dce=function(n,S,L,re){var ve,Ce=(ve=KI?.[re])!==null&&ve!==void 0?ve:[];return S.startsWith("data-")||!qu(n)&&(re&&Ce.includes(S)||oce.includes(S))||L&&G7.includes(S)},Fu=function(n,S,L){if(!n||typeof n=="function"||typeof n=="boolean")return null;var re=n;if(na.isValidElement(n)&&(re=n.props),!FT(re))return null;var ve={};return Object.keys(re).forEach(function(Ce){var Be;dce((Be=re)===null||Be===void 0?void 0:Be[Ce],Ce,S,L)&&(ve[Ce]=re[Ce])}),ve},lz=function e(n,S){if(n===S)return!0;var L=na.Children.count(n);if(L!==na.Children.count(S))return!1;if(L===0)return!0;if(L===1)return pU(Array.isArray(n)?n[0]:n,Array.isArray(S)?S[0]:S);for(var re=0;re<L;re++){var ve=n[re],Ce=S[re];if(Array.isArray(ve)||Array.isArray(Ce)){if(!e(ve,Ce))return!1}else if(!pU(ve,Ce))return!1}return!0},pU=function(n,S){if(Ru(n)&&Ru(S))return!0;if(!Ru(n)&&!Ru(S)){var L=n.props||{},re=L.children,ve=fU(L,lce),Ce=S.props||{},Be=Ce.children,Ge=fU(Ce,uce);return re&&Be?iT(ve,Ge)&&lz(re,Be):!re&&!Be?iT(ve,Ge):!1}return!1},mU=function(n,S){var L=[],re={};return X7(n).forEach(function(ve,Ce){if(hce(ve))L.push(ve);else if(ve){var Be=b1(ve.type),Ge=S[Be]||{},Ke=Ge.handler,dt=Ge.once;if(Ke&&(!dt||!re[Be])){var gt=Ke(ve,Be,Ce);L.push(gt),re[Be]=!0}}}),L},vce=function(n){var S=n&&n.type;return S&&hU[S]?hU[S]:null},pce=function(n,S){return X7(S).indexOf(n)},mce=["children","width","height","viewBox","className","style","title","desc"];function uz(){return uz=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var S=arguments[n];for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(e[L]=S[L])}return e},uz.apply(this,arguments)}function gce(e,n){if(e==null)return{};var S=yce(e,n),L,re;if(Object.getOwnPropertySymbols){var ve=Object.getOwnPropertySymbols(e);for(re=0;re<ve.length;re++)L=ve[re],!(n.indexOf(L)>=0)&&Object.prototype.propertyIsEnumerable.call(e,L)&&(S[L]=e[L])}return S}function yce(e,n){if(e==null)return{};var S={};for(var L in e)if(Object.prototype.hasOwnProperty.call(e,L)){if(n.indexOf(L)>=0)continue;S[L]=e[L]}return S}function cz(e){var n=e.children,S=e.width,L=e.height,re=e.viewBox,ve=e.className,Ce=e.style,Be=e.title,Ge=e.desc,Ke=gce(e,mce),dt=re||{width:S,height:L,x:0,y:0},gt=kc("recharts-surface",ve);return la.createElement("svg",uz({},Fu(Ke,!0,"svg"),{className:gt,width:S,height:L,style:Ce,viewBox:"".concat(dt.x," ").concat(dt.y," ").concat(dt.width," ").concat(dt.height)}),la.createElement("title",null,Be),la.createElement("desc",null,Ge),n)}var _ce=["children","className"];function fz(){return fz=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var S=arguments[n];for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(e[L]=S[L])}return e},fz.apply(this,arguments)}function xce(e,n){if(e==null)return{};var S=bce(e,n),L,re;if(Object.getOwnPropertySymbols){var ve=Object.getOwnPropertySymbols(e);for(re=0;re<ve.length;re++)L=ve[re],!(n.indexOf(L)>=0)&&Object.prototype.propertyIsEnumerable.call(e,L)&&(S[L]=e[L])}return S}function bce(e,n){if(e==null)return{};var S={};for(var L in e)if(Object.prototype.hasOwnProperty.call(e,L)){if(n.indexOf(L)>=0)continue;S[L]=e[L]}return S}var Df=la.forwardRef(function(e,n){var S=e.children,L=e.className,re=xce(e,_ce),ve=kc("recharts-layer",L);return la.createElement("g",fz({className:ve},Fu(re,!0),{ref:n}),S)}),w1=function(n,S){for(var L=arguments.length,re=new Array(L>2?L-2:0),ve=2;ve<L;ve++)re[ve-2]=arguments[ve]},QI,gU;function wce(){if(gU)return QI;gU=1;function e(n,S,L){var re=-1,ve=n.length;S<0&&(S=-S>ve?0:ve+S),L=L>ve?ve:L,L<0&&(L+=ve),ve=S>L?0:L-S>>>0,S>>>=0;for(var Ce=Array(ve);++re<ve;)Ce[re]=n[re+S];return Ce}return QI=e,QI}var eD,yU;function Tce(){if(yU)return eD;yU=1;var e=wce();function n(S,L,re){var ve=S.length;return re=re===void 0?ve:re,!L&&re>=ve?S:e(S,L,re)}return eD=n,eD}var tD,_U;function nY(){if(_U)return tD;_U=1;var e="\\ud800-\\udfff",n="\\u0300-\\u036f",S="\\ufe20-\\ufe2f",L="\\u20d0-\\u20ff",re=n+S+L,ve="\\ufe0e\\ufe0f",Ce="\\u200d",Be=RegExp("["+Ce+e+re+ve+"]");function Ge(Ke){return Be.test(Ke)}return tD=Ge,tD}var rD,xU;function Ace(){if(xU)return rD;xU=1;function e(n){return n.split("")}return rD=e,rD}var nD,bU;function Sce(){if(bU)return nD;bU=1;var e="\\ud800-\\udfff",n="\\u0300-\\u036f",S="\\ufe20-\\ufe2f",L="\\u20d0-\\u20ff",re=n+S+L,ve="\\ufe0e\\ufe0f",Ce="["+e+"]",Be="["+re+"]",Ge="\\ud83c[\\udffb-\\udfff]",Ke="(?:"+Be+"|"+Ge+")",dt="[^"+e+"]",gt="(?:\\ud83c[\\udde6-\\uddff]){2}",Vt="[\\ud800-\\udbff][\\udc00-\\udfff]",Xt="\\u200d",cr=Ke+"?",sr="["+ve+"]?",nr="(?:"+Xt+"(?:"+[dt,gt,Vt].join("|")+")"+sr+cr+")*",zr=sr+cr+nr,Ne="(?:"+[dt+Be+"?",Be,gt,Vt,Ce].join("|")+")",Jr=RegExp(Ge+"(?="+Ge+")|"+Ne+zr,"g");function pn(Lr){return Lr.match(Jr)||[]}return nD=pn,nD}var aD,wU;function Ece(){if(wU)return aD;wU=1;var e=Ace(),n=nY(),S=Sce();function L(re){return n(re)?S(re):e(re)}return aD=L,aD}var iD,TU;function Mce(){if(TU)return iD;TU=1;var e=Tce(),n=nY(),S=Ece(),L=JW();function re(ve){return function(Ce){Ce=L(Ce);var Be=n(Ce)?S(Ce):void 0,Ge=Be?Be[0]:Ce.charAt(0),Ke=Be?e(Be,1).join(""):Ce.slice(1);return Ge[ve]()+Ke}}return iD=re,iD}var oD,AU;function Cce(){if(AU)return oD;AU=1;var e=Mce(),n=e("toUpperCase");return oD=n,oD}var kce=Cce();const YP=ih(kce);function Lh(e){return function(){return e}}const aY=Math.cos,B6=Math.sin,gg=Math.sqrt,j6=Math.PI,ZP=2*j6,hz=Math.PI,dz=2*hz,ew=1e-6,Pce=dz-ew;function iY(e){this._+=e[0];for(let n=1,S=e.length;n<S;++n)this._+=arguments[n]+e[n]}function Lce(e){let n=Math.floor(e);if(!(n>=0))throw new Error(`invalid digits: ${e}`);if(n>15)return iY;const S=10**n;return function(L){this._+=L[0];for(let re=1,ve=L.length;re<ve;++re)this._+=Math.round(arguments[re]*S)/S+L[re]}}class Rce{constructor(n){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=n==null?iY:Lce(n)}moveTo(n,S){this._append`M${this._x0=this._x1=+n},${this._y0=this._y1=+S}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(n,S){this._append`L${this._x1=+n},${this._y1=+S}`}quadraticCurveTo(n,S,L,re){this._append`Q${+n},${+S},${this._x1=+L},${this._y1=+re}`}bezierCurveTo(n,S,L,re,ve,Ce){this._append`C${+n},${+S},${+L},${+re},${this._x1=+ve},${this._y1=+Ce}`}arcTo(n,S,L,re,ve){if(n=+n,S=+S,L=+L,re=+re,ve=+ve,ve<0)throw new Error(`negative radius: ${ve}`);let Ce=this._x1,Be=this._y1,Ge=L-n,Ke=re-S,dt=Ce-n,gt=Be-S,Vt=dt*dt+gt*gt;if(this._x1===null)this._append`M${this._x1=n},${this._y1=S}`;else if(Vt>ew)if(!(Math.abs(gt*Ge-Ke*dt)>ew)||!ve)this._append`L${this._x1=n},${this._y1=S}`;else{let Xt=L-Ce,cr=re-Be,sr=Ge*Ge+Ke*Ke,nr=Xt*Xt+cr*cr,zr=Math.sqrt(sr),Ne=Math.sqrt(Vt),Jr=ve*Math.tan((hz-Math.acos((sr+Vt-nr)/(2*zr*Ne)))/2),pn=Jr/Ne,Lr=Jr/zr;Math.abs(pn-1)>ew&&this._append`L${n+pn*dt},${S+pn*gt}`,this._append`A${ve},${ve},0,0,${+(gt*Xt>dt*cr)},${this._x1=n+Lr*Ge},${this._y1=S+Lr*Ke}`}}arc(n,S,L,re,ve,Ce){if(n=+n,S=+S,L=+L,Ce=!!Ce,L<0)throw new Error(`negative radius: ${L}`);let Be=L*Math.cos(re),Ge=L*Math.sin(re),Ke=n+Be,dt=S+Ge,gt=1^Ce,Vt=Ce?re-ve:ve-re;this._x1===null?this._append`M${Ke},${dt}`:(Math.abs(this._x1-Ke)>ew||Math.abs(this._y1-dt)>ew)&&this._append`L${Ke},${dt}`,L&&(Vt<0&&(Vt=Vt%dz+dz),Vt>Pce?this._append`A${L},${L},0,1,${gt},${n-Be},${S-Ge}A${L},${L},0,1,${gt},${this._x1=Ke},${this._y1=dt}`:Vt>ew&&this._append`A${L},${L},0,${+(Vt>=hz)},${gt},${this._x1=n+L*Math.cos(ve)},${this._y1=S+L*Math.sin(ve)}`)}rect(n,S,L,re){this._append`M${this._x0=this._x1=+n},${this._y0=this._y1=+S}h${L=+L}v${+re}h${-L}Z`}toString(){return this._}}function W7(e){let n=3;return e.digits=function(S){if(!arguments.length)return n;if(S==null)n=null;else{const L=Math.floor(S);if(!(L>=0))throw new RangeError(`invalid digits: ${S}`);n=L}return e},()=>new Rce(n)}function Y7(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function oY(e){this._context=e}oY.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,n){switch(e=+e,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break;case 1:this._point=2;default:this._context.lineTo(e,n);break}}};function $P(e){return new oY(e)}function sY(e){return e[0]}function lY(e){return e[1]}function uY(e,n){var S=Lh(!0),L=null,re=$P,ve=null,Ce=W7(Be);e=typeof e=="function"?e:e===void 0?sY:Lh(e),n=typeof n=="function"?n:n===void 0?lY:Lh(n);function Be(Ge){var Ke,dt=(Ge=Y7(Ge)).length,gt,Vt=!1,Xt;for(L==null&&(ve=re(Xt=Ce())),Ke=0;Ke<=dt;++Ke)!(Ke<dt&&S(gt=Ge[Ke],Ke,Ge))===Vt&&((Vt=!Vt)?ve.lineStart():ve.lineEnd()),Vt&&ve.point(+e(gt,Ke,Ge),+n(gt,Ke,Ge));if(Xt)return ve=null,Xt+""||null}return Be.x=function(Ge){return arguments.length?(e=typeof Ge=="function"?Ge:Lh(+Ge),Be):e},Be.y=function(Ge){return arguments.length?(n=typeof Ge=="function"?Ge:Lh(+Ge),Be):n},Be.defined=function(Ge){return arguments.length?(S=typeof Ge=="function"?Ge:Lh(!!Ge),Be):S},Be.curve=function(Ge){return arguments.length?(re=Ge,L!=null&&(ve=re(L)),Be):re},Be.context=function(Ge){return arguments.length?(Ge==null?L=ve=null:ve=re(L=Ge),Be):L},Be}function g6(e,n,S){var L=null,re=Lh(!0),ve=null,Ce=$P,Be=null,Ge=W7(Ke);e=typeof e=="function"?e:e===void 0?sY:Lh(+e),n=typeof n=="function"?n:Lh(n===void 0?0:+n),S=typeof S=="function"?S:S===void 0?lY:Lh(+S);function Ke(gt){var Vt,Xt,cr,sr=(gt=Y7(gt)).length,nr,zr=!1,Ne,Jr=new Array(sr),pn=new Array(sr);for(ve==null&&(Be=Ce(Ne=Ge())),Vt=0;Vt<=sr;++Vt){if(!(Vt<sr&&re(nr=gt[Vt],Vt,gt))===zr)if(zr=!zr)Xt=Vt,Be.areaStart(),Be.lineStart();else{for(Be.lineEnd(),Be.lineStart(),cr=Vt-1;cr>=Xt;--cr)Be.point(Jr[cr],pn[cr]);Be.lineEnd(),Be.areaEnd()}zr&&(Jr[Vt]=+e(nr,Vt,gt),pn[Vt]=+n(nr,Vt,gt),Be.point(L?+L(nr,Vt,gt):Jr[Vt],S?+S(nr,Vt,gt):pn[Vt]))}if(Ne)return Be=null,Ne+""||null}function dt(){return uY().defined(re).curve(Ce).context(ve)}return Ke.x=function(gt){return arguments.length?(e=typeof gt=="function"?gt:Lh(+gt),L=null,Ke):e},Ke.x0=function(gt){return arguments.length?(e=typeof gt=="function"?gt:Lh(+gt),Ke):e},Ke.x1=function(gt){return arguments.length?(L=gt==null?null:typeof gt=="function"?gt:Lh(+gt),Ke):L},Ke.y=function(gt){return arguments.length?(n=typeof gt=="function"?gt:Lh(+gt),S=null,Ke):n},Ke.y0=function(gt){return arguments.length?(n=typeof gt=="function"?gt:Lh(+gt),Ke):n},Ke.y1=function(gt){return arguments.length?(S=gt==null?null:typeof gt=="function"?gt:Lh(+gt),Ke):S},Ke.lineX0=Ke.lineY0=function(){return dt().x(e).y(n)},Ke.lineY1=function(){return dt().x(e).y(S)},Ke.lineX1=function(){return dt().x(L).y(n)},Ke.defined=function(gt){return arguments.length?(re=typeof gt=="function"?gt:Lh(!!gt),Ke):re},Ke.curve=function(gt){return arguments.length?(Ce=gt,ve!=null&&(Be=Ce(ve)),Ke):Ce},Ke.context=function(gt){return arguments.length?(gt==null?ve=Be=null:Be=Ce(ve=gt),Ke):ve},Ke}class cY{constructor(n,S){this._context=n,this._x=S}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(n,S){switch(n=+n,S=+S,this._point){case 0:{this._point=1,this._line?this._context.lineTo(n,S):this._context.moveTo(n,S);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+n)/2,this._y0,this._x0,S,n,S):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+S)/2,n,this._y0,n,S);break}}this._x0=n,this._y0=S}}function Ice(e){return new cY(e,!0)}function Dce(e){return new cY(e,!1)}const Z7={draw(e,n){const S=gg(n/j6);e.moveTo(S,0),e.arc(0,0,S,0,ZP)}},Oce={draw(e,n){const S=gg(n/5)/2;e.moveTo(-3*S,-S),e.lineTo(-S,-S),e.lineTo(-S,-3*S),e.lineTo(S,-3*S),e.lineTo(S,-S),e.lineTo(3*S,-S),e.lineTo(3*S,S),e.lineTo(S,S),e.lineTo(S,3*S),e.lineTo(-S,3*S),e.lineTo(-S,S),e.lineTo(-3*S,S),e.closePath()}},fY=gg(1/3),zce=fY*2,Nce={draw(e,n){const S=gg(n/zce),L=S*fY;e.moveTo(0,-S),e.lineTo(L,0),e.lineTo(0,S),e.lineTo(-L,0),e.closePath()}},Fce={draw(e,n){const S=gg(n),L=-S/2;e.rect(L,L,S,S)}},Bce=.8908130915292852,hY=B6(j6/10)/B6(7*j6/10),jce=B6(ZP/10)*hY,Uce=-aY(ZP/10)*hY,qce={draw(e,n){const S=gg(n*Bce),L=jce*S,re=Uce*S;e.moveTo(0,-S),e.lineTo(L,re);for(let ve=1;ve<5;++ve){const Ce=ZP*ve/5,Be=aY(Ce),Ge=B6(Ce);e.lineTo(Ge*S,-Be*S),e.lineTo(Be*L-Ge*re,Ge*L+Be*re)}e.closePath()}},sD=gg(3),Vce={draw(e,n){const S=-gg(n/(sD*3));e.moveTo(0,S*2),e.lineTo(-sD*S,-S),e.lineTo(sD*S,-S),e.closePath()}},A0=-.5,S0=gg(3)/2,vz=1/gg(12),Hce=(vz/2+1)*3,Gce={draw(e,n){const S=gg(n/Hce),L=S/2,re=S*vz,ve=L,Ce=S*vz+S,Be=-ve,Ge=Ce;e.moveTo(L,re),e.lineTo(ve,Ce),e.lineTo(Be,Ge),e.lineTo(A0*L-S0*re,S0*L+A0*re),e.lineTo(A0*ve-S0*Ce,S0*ve+A0*Ce),e.lineTo(A0*Be-S0*Ge,S0*Be+A0*Ge),e.lineTo(A0*L+S0*re,A0*re-S0*L),e.lineTo(A0*ve+S0*Ce,A0*Ce-S0*ve),e.lineTo(A0*Be+S0*Ge,A0*Ge-S0*Be),e.closePath()}};function Xce(e,n){let S=null,L=W7(re);e=typeof e=="function"?e:Lh(e||Z7),n=typeof n=="function"?n:Lh(n===void 0?64:+n);function re(){let ve;if(S||(S=ve=L()),e.apply(this,arguments).draw(S,+n.apply(this,arguments)),ve)return S=null,ve+""||null}return re.type=function(ve){return arguments.length?(e=typeof ve=="function"?ve:Lh(ve),re):e},re.size=function(ve){return arguments.length?(n=typeof ve=="function"?ve:Lh(+ve),re):n},re.context=function(ve){return arguments.length?(S=ve??null,re):S},re}function U6(){}function q6(e,n,S){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+n)/6,(e._y0+4*e._y1+S)/6)}function dY(e){this._context=e}dY.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:q6(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,n){switch(e=+e,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:q6(this,e,n);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n}};function Wce(e){return new dY(e)}function vY(e){this._context=e}vY.prototype={areaStart:U6,areaEnd:U6,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,n){switch(e=+e,n=+n,this._point){case 0:this._point=1,this._x2=e,this._y2=n;break;case 1:this._point=2,this._x3=e,this._y3=n;break;case 2:this._point=3,this._x4=e,this._y4=n,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+n)/6);break;default:q6(this,e,n);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n}};function Yce(e){return new vY(e)}function pY(e){this._context=e}pY.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,n){switch(e=+e,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var S=(this._x0+4*this._x1+e)/6,L=(this._y0+4*this._y1+n)/6;this._line?this._context.lineTo(S,L):this._context.moveTo(S,L);break;case 3:this._point=4;default:q6(this,e,n);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n}};function Zce(e){return new pY(e)}function mY(e){this._context=e}mY.prototype={areaStart:U6,areaEnd:U6,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,n){e=+e,n=+n,this._point?this._context.lineTo(e,n):(this._point=1,this._context.moveTo(e,n))}};function $ce(e){return new mY(e)}function SU(e){return e<0?-1:1}function EU(e,n,S){var L=e._x1-e._x0,re=n-e._x1,ve=(e._y1-e._y0)/(L||re<0&&-0),Ce=(S-e._y1)/(re||L<0&&-0),Be=(ve*re+Ce*L)/(L+re);return(SU(ve)+SU(Ce))*Math.min(Math.abs(ve),Math.abs(Ce),.5*Math.abs(Be))||0}function MU(e,n){var S=e._x1-e._x0;return S?(3*(e._y1-e._y0)/S-n)/2:n}function lD(e,n,S){var L=e._x0,re=e._y0,ve=e._x1,Ce=e._y1,Be=(ve-L)/3;e._context.bezierCurveTo(L+Be,re+Be*n,ve-Be,Ce-Be*S,ve,Ce)}function V6(e){this._context=e}V6.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:lD(this,this._t0,MU(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,n){var S=NaN;if(e=+e,n=+n,!(e===this._x1&&n===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break;case 1:this._point=2;break;case 2:this._point=3,lD(this,MU(this,S=EU(this,e,n)),S);break;default:lD(this,this._t0,S=EU(this,e,n));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n,this._t0=S}}};function gY(e){this._context=new yY(e)}(gY.prototype=Object.create(V6.prototype)).point=function(e,n){V6.prototype.point.call(this,n,e)};function yY(e){this._context=e}yY.prototype={moveTo:function(e,n){this._context.moveTo(n,e)},closePath:function(){this._context.closePath()},lineTo:function(e,n){this._context.lineTo(n,e)},bezierCurveTo:function(e,n,S,L,re,ve){this._context.bezierCurveTo(n,e,L,S,ve,re)}};function Kce(e){return new V6(e)}function Jce(e){return new gY(e)}function _Y(e){this._context=e}_Y.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,n=this._y,S=e.length;if(S)if(this._line?this._context.lineTo(e[0],n[0]):this._context.moveTo(e[0],n[0]),S===2)this._context.lineTo(e[1],n[1]);else for(var L=CU(e),re=CU(n),ve=0,Ce=1;Ce<S;++ve,++Ce)this._context.bezierCurveTo(L[0][ve],re[0][ve],L[1][ve],re[1][ve],e[Ce],n[Ce]);(this._line||this._line!==0&&S===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,n){this._x.push(+e),this._y.push(+n)}};function CU(e){var n,S=e.length-1,L,re=new Array(S),ve=new Array(S),Ce=new Array(S);for(re[0]=0,ve[0]=2,Ce[0]=e[0]+2*e[1],n=1;n<S-1;++n)re[n]=1,ve[n]=4,Ce[n]=4*e[n]+2*e[n+1];for(re[S-1]=2,ve[S-1]=7,Ce[S-1]=8*e[S-1]+e[S],n=1;n<S;++n)L=re[n]/ve[n-1],ve[n]-=L,Ce[n]-=L*Ce[n-1];for(re[S-1]=Ce[S-1]/ve[S-1],n=S-2;n>=0;--n)re[n]=(Ce[n]-re[n+1])/ve[n];for(ve[S-1]=(e[S]+re[S-1])/2,n=0;n<S-1;++n)ve[n]=2*e[n+1]-re[n+1];return[re,ve]}function Qce(e){return new _Y(e)}function KP(e,n){this._context=e,this._t=n}KP.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,n){switch(e=+e,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(e,n);else{var S=this._x*(1-this._t)+e*this._t;this._context.lineTo(S,this._y),this._context.lineTo(S,n)}break}}this._x=e,this._y=n}};function efe(e){return new KP(e,.5)}function tfe(e){return new KP(e,0)}function rfe(e){return new KP(e,1)}function uT(e,n){if((Ce=e.length)>1)for(var S=1,L,re,ve=e[n[0]],Ce,Be=ve.length;S<Ce;++S)for(re=ve,ve=e[n[S]],L=0;L<Be;++L)ve[L][1]+=ve[L][0]=isNaN(re[L][1])?re[L][0]:re[L][1]}function pz(e){for(var n=e.length,S=new Array(n);--n>=0;)S[n]=n;return S}function nfe(e,n){return e[n]}function afe(e){const n=[];return n.key=e,n}function ife(){var e=Lh([]),n=pz,S=uT,L=nfe;function re(ve){var Ce=Array.from(e.apply(this,arguments),afe),Be,Ge=Ce.length,Ke=-1,dt;for(const gt of ve)for(Be=0,++Ke;Be<Ge;++Be)(Ce[Be][Ke]=[0,+L(gt,Ce[Be].key,Ke,ve)]).data=gt;for(Be=0,dt=Y7(n(Ce));Be<Ge;++Be)Ce[dt[Be]].index=Be;return S(Ce,dt),Ce}return re.keys=function(ve){return arguments.length?(e=typeof ve=="function"?ve:Lh(Array.from(ve)),re):e},re.value=function(ve){return arguments.length?(L=typeof ve=="function"?ve:Lh(+ve),re):L},re.order=function(ve){return arguments.length?(n=ve==null?pz:typeof ve=="function"?ve:Lh(Array.from(ve)),re):n},re.offset=function(ve){return arguments.length?(S=ve??uT,re):S},re}function ofe(e,n){if((L=e.length)>0){for(var S,L,re=0,ve=e[0].length,Ce;re<ve;++re){for(Ce=S=0;S<L;++S)Ce+=e[S][re][1]||0;if(Ce)for(S=0;S<L;++S)e[S][re][1]/=Ce}uT(e,n)}}function sfe(e,n){if((re=e.length)>0){for(var S=0,L=e[n[0]],re,ve=L.length;S<ve;++S){for(var Ce=0,Be=0;Ce<re;++Ce)Be+=e[Ce][S][1]||0;L[S][1]+=L[S][0]=-Be/2}uT(e,n)}}function lfe(e,n){if(!(!((Ce=e.length)>0)||!((ve=(re=e[n[0]]).length)>0))){for(var S=0,L=1,re,ve,Ce;L<ve;++L){for(var Be=0,Ge=0,Ke=0;Be<Ce;++Be){for(var dt=e[n[Be]],gt=dt[L][1]||0,Vt=dt[L-1][1]||0,Xt=(gt-Vt)/2,cr=0;cr<Be;++cr){var sr=e[n[cr]],nr=sr[L][1]||0,zr=sr[L-1][1]||0;Xt+=nr-zr}Ge+=gt,Ke+=Xt*gt}re[L-1][1]+=re[L-1][0]=S,Ge&&(S-=Ke/Ge)}re[L-1][1]+=re[L-1][0]=S,uT(e,n)}}function aE(e){"@babel/helpers - typeof";return aE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},aE(e)}var ufe=["type","size","sizeType"];function mz(){return mz=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var S=arguments[n];for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(e[L]=S[L])}return e},mz.apply(this,arguments)}function kU(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function PU(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?kU(Object(S),!0).forEach(function(L){cfe(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):kU(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function cfe(e,n,S){return n=ffe(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function ffe(e){var n=hfe(e,"string");return aE(n)=="symbol"?n:n+""}function hfe(e,n){if(aE(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(aE(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function dfe(e,n){if(e==null)return{};var S=vfe(e,n),L,re;if(Object.getOwnPropertySymbols){var ve=Object.getOwnPropertySymbols(e);for(re=0;re<ve.length;re++)L=ve[re],!(n.indexOf(L)>=0)&&Object.prototype.propertyIsEnumerable.call(e,L)&&(S[L]=e[L])}return S}function vfe(e,n){if(e==null)return{};var S={};for(var L in e)if(Object.prototype.hasOwnProperty.call(e,L)){if(n.indexOf(L)>=0)continue;S[L]=e[L]}return S}var xY={symbolCircle:Z7,symbolCross:Oce,symbolDiamond:Nce,symbolSquare:Fce,symbolStar:qce,symbolTriangle:Vce,symbolWye:Gce},pfe=Math.PI/180,mfe=function(n){var S="symbol".concat(YP(n));return xY[S]||Z7},gfe=function(n,S,L){if(S==="area")return n;switch(L){case"cross":return 5*n*n/9;case"diamond":return .5*n*n/Math.sqrt(3);case"square":return n*n;case"star":{var re=18*pfe;return 1.25*n*n*(Math.tan(re)-Math.tan(re*2)*Math.pow(Math.tan(re),2))}case"triangle":return Math.sqrt(3)*n*n/4;case"wye":return(21-10*Math.sqrt(3))*n*n/8;default:return Math.PI*n*n/4}},yfe=function(n,S){xY["symbol".concat(YP(n))]=S},JP=function(n){var S=n.type,L=S===void 0?"circle":S,re=n.size,ve=re===void 0?64:re,Ce=n.sizeType,Be=Ce===void 0?"area":Ce,Ge=dfe(n,ufe),Ke=PU(PU({},Ge),{},{type:L,size:ve,sizeType:Be}),dt=function(){var nr=mfe(L),zr=Xce().type(nr).size(gfe(ve,Be,L));return zr()},gt=Ke.className,Vt=Ke.cx,Xt=Ke.cy,cr=Fu(Ke,!0);return Vt===+Vt&&Xt===+Xt&&ve===+ve?la.createElement("path",mz({},cr,{className:kc("recharts-symbols",gt),transform:"translate(".concat(Vt,", ").concat(Xt,")"),d:dt()})):null};JP.registerSymbol=yfe;function cT(e){"@babel/helpers - typeof";return cT=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},cT(e)}function gz(){return gz=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var S=arguments[n];for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(e[L]=S[L])}return e},gz.apply(this,arguments)}function LU(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function _fe(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?LU(Object(S),!0).forEach(function(L){iE(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):LU(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function xfe(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function bfe(e,n){for(var S=0;S<n.length;S++){var L=n[S];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(e,wY(L.key),L)}}function wfe(e,n,S){return n&&bfe(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Tfe(e,n,S){return n=H6(n),Afe(e,bY()?Reflect.construct(n,S||[],H6(e).constructor):n.apply(e,S))}function Afe(e,n){if(n&&(cT(n)==="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Sfe(e)}function Sfe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function bY(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(bY=function(){return!!e})()}function H6(e){return H6=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(S){return S.__proto__||Object.getPrototypeOf(S)},H6(e)}function Efe(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&yz(e,n)}function yz(e,n){return yz=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(L,re){return L.__proto__=re,L},yz(e,n)}function iE(e,n,S){return n=wY(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function wY(e){var n=Mfe(e,"string");return cT(n)=="symbol"?n:n+""}function Mfe(e,n){if(cT(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(cT(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var E0=32,$7=(function(e){function n(){return xfe(this,n),Tfe(this,n,arguments)}return Efe(n,e),wfe(n,[{key:"renderIcon",value:function(L){var re=this.props.inactiveColor,ve=E0/2,Ce=E0/6,Be=E0/3,Ge=L.inactive?re:L.color;if(L.type==="plainline")return la.createElement("line",{strokeWidth:4,fill:"none",stroke:Ge,strokeDasharray:L.payload.strokeDasharray,x1:0,y1:ve,x2:E0,y2:ve,className:"recharts-legend-icon"});if(L.type==="line")return la.createElement("path",{strokeWidth:4,fill:"none",stroke:Ge,d:"M0,".concat(ve,"h").concat(Be,`
            A`).concat(Ce,",").concat(Ce,",0,1,1,").concat(2*Be,",").concat(ve,`
            H`).concat(E0,"M").concat(2*Be,",").concat(ve,`
            A`).concat(Ce,",").concat(Ce,",0,1,1,").concat(Be,",").concat(ve),className:"recharts-legend-icon"});if(L.type==="rect")return la.createElement("path",{stroke:"none",fill:Ge,d:"M0,".concat(E0/8,"h").concat(E0,"v").concat(E0*3/4,"h").concat(-E0,"z"),className:"recharts-legend-icon"});if(la.isValidElement(L.legendIcon)){var Ke=_fe({},L);return delete Ke.legendIcon,la.cloneElement(L.legendIcon,Ke)}return la.createElement(JP,{fill:Ge,cx:ve,cy:ve,size:E0,sizeType:"diameter",type:L.type})}},{key:"renderItems",value:function(){var L=this,re=this.props,ve=re.payload,Ce=re.iconSize,Be=re.layout,Ge=re.formatter,Ke=re.inactiveColor,dt={x:0,y:0,width:E0,height:E0},gt={display:Be==="horizontal"?"inline-block":"block",marginRight:10},Vt={display:"inline-block",verticalAlign:"middle",marginRight:4};return ve.map(function(Xt,cr){var sr=Xt.formatter||Ge,nr=kc(iE(iE({"recharts-legend-item":!0},"legend-item-".concat(cr),!0),"inactive",Xt.inactive));if(Xt.type==="none")return null;var zr=qu(Xt.value)?null:Xt.value;w1(!qu(Xt.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var Ne=Xt.inactive?Ke:Xt.color;return la.createElement("li",gz({className:nr,style:gt,key:"legend-item-".concat(cr)},nE(L.props,Xt,cr)),la.createElement(cz,{width:Ce,height:Ce,viewBox:dt,style:Vt},L.renderIcon(Xt)),la.createElement("span",{className:"recharts-legend-item-text",style:{color:Ne}},sr?sr(zr,Xt,cr):zr))})}},{key:"render",value:function(){var L=this.props,re=L.payload,ve=L.layout,Ce=L.align;if(!re||!re.length)return null;var Be={padding:0,margin:0,textAlign:ve==="horizontal"?Ce:"left"};return la.createElement("ul",{className:"recharts-default-legend",style:Be},this.renderItems())}}])})(na.PureComponent);iE($7,"displayName","Legend");iE($7,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var uD,RU;function Cfe(){if(RU)return uD;RU=1;var e=GP();function n(){this.__data__=new e,this.size=0}return uD=n,uD}var cD,IU;function kfe(){if(IU)return cD;IU=1;function e(n){var S=this.__data__,L=S.delete(n);return this.size=S.size,L}return cD=e,cD}var fD,DU;function Pfe(){if(DU)return fD;DU=1;function e(n){return this.__data__.get(n)}return fD=e,fD}var hD,OU;function Lfe(){if(OU)return hD;OU=1;function e(n){return this.__data__.has(n)}return hD=e,hD}var dD,zU;function Rfe(){if(zU)return dD;zU=1;var e=GP(),n=U7(),S=q7(),L=200;function re(ve,Ce){var Be=this.__data__;if(Be instanceof e){var Ge=Be.__data__;if(!n||Ge.length<L-1)return Ge.push([ve,Ce]),this.size=++Be.size,this;Be=this.__data__=new S(Ge)}return Be.set(ve,Ce),this.size=Be.size,this}return dD=re,dD}var vD,NU;function TY(){if(NU)return vD;NU=1;var e=GP(),n=Cfe(),S=kfe(),L=Pfe(),re=Lfe(),ve=Rfe();function Ce(Be){var Ge=this.__data__=new e(Be);this.size=Ge.size}return Ce.prototype.clear=n,Ce.prototype.delete=S,Ce.prototype.get=L,Ce.prototype.has=re,Ce.prototype.set=ve,vD=Ce,vD}var pD,FU;function Ife(){if(FU)return pD;FU=1;var e="__lodash_hash_undefined__";function n(S){return this.__data__.set(S,e),this}return pD=n,pD}var mD,BU;function Dfe(){if(BU)return mD;BU=1;function e(n){return this.__data__.has(n)}return mD=e,mD}var gD,jU;function AY(){if(jU)return gD;jU=1;var e=q7(),n=Ife(),S=Dfe();function L(re){var ve=-1,Ce=re==null?0:re.length;for(this.__data__=new e;++ve<Ce;)this.add(re[ve])}return L.prototype.add=L.prototype.push=n,L.prototype.has=S,gD=L,gD}var yD,UU;function SY(){if(UU)return yD;UU=1;function e(n,S){for(var L=-1,re=n==null?0:n.length;++L<re;)if(S(n[L],L,n))return!0;return!1}return yD=e,yD}var _D,qU;function EY(){if(qU)return _D;qU=1;function e(n,S){return n.has(S)}return _D=e,_D}var xD,VU;function MY(){if(VU)return xD;VU=1;var e=AY(),n=SY(),S=EY(),L=1,re=2;function ve(Ce,Be,Ge,Ke,dt,gt){var Vt=Ge&L,Xt=Ce.length,cr=Be.length;if(Xt!=cr&&!(Vt&&cr>Xt))return!1;var sr=gt.get(Ce),nr=gt.get(Be);if(sr&&nr)return sr==Be&&nr==Ce;var zr=-1,Ne=!0,Jr=Ge&re?new e:void 0;for(gt.set(Ce,Be),gt.set(Be,Ce);++zr<Xt;){var pn=Ce[zr],Lr=Be[zr];if(Ke)var Or=Vt?Ke(Lr,pn,zr,Be,Ce,gt):Ke(pn,Lr,zr,Ce,Be,gt);if(Or!==void 0){if(Or)continue;Ne=!1;break}if(Jr){if(!n(Be,function(cn,$n){if(!S(Jr,$n)&&(pn===cn||dt(pn,cn,Ge,Ke,gt)))return Jr.push($n)})){Ne=!1;break}}else if(!(pn===Lr||dt(pn,Lr,Ge,Ke,gt))){Ne=!1;break}}return gt.delete(Ce),gt.delete(Be),Ne}return xD=ve,xD}var bD,HU;function Ofe(){if(HU)return bD;HU=1;var e=_y(),n=e.Uint8Array;return bD=n,bD}var wD,GU;function zfe(){if(GU)return wD;GU=1;function e(n){var S=-1,L=Array(n.size);return n.forEach(function(re,ve){L[++S]=[ve,re]}),L}return wD=e,wD}var TD,XU;function K7(){if(XU)return TD;XU=1;function e(n){var S=-1,L=Array(n.size);return n.forEach(function(re){L[++S]=re}),L}return TD=e,TD}var AD,WU;function Nfe(){if(WU)return AD;WU=1;var e=HE(),n=Ofe(),S=j7(),L=MY(),re=zfe(),ve=K7(),Ce=1,Be=2,Ge="[object Boolean]",Ke="[object Date]",dt="[object Error]",gt="[object Map]",Vt="[object Number]",Xt="[object RegExp]",cr="[object Set]",sr="[object String]",nr="[object Symbol]",zr="[object ArrayBuffer]",Ne="[object DataView]",Jr=e?e.prototype:void 0,pn=Jr?Jr.valueOf:void 0;function Lr(Or,cn,$n,xn,Wa,On,qn){switch($n){case Ne:if(Or.byteLength!=cn.byteLength||Or.byteOffset!=cn.byteOffset)return!1;Or=Or.buffer,cn=cn.buffer;case zr:return!(Or.byteLength!=cn.byteLength||!On(new n(Or),new n(cn)));case Ge:case Ke:case Vt:return S(+Or,+cn);case dt:return Or.name==cn.name&&Or.message==cn.message;case Xt:case sr:return Or==cn+"";case gt:var ca=re;case cr:var Fn=xn&Ce;if(ca||(ca=ve),Or.size!=cn.size&&!Fn)return!1;var da=qn.get(Or);if(da)return da==cn;xn|=Be,qn.set(Or,cn);var ea=L(ca(Or),ca(cn),xn,Wa,On,qn);return qn.delete(Or),ea;case nr:if(pn)return pn.call(Or)==pn.call(cn)}return!1}return AD=Lr,AD}var SD,YU;function CY(){if(YU)return SD;YU=1;function e(n,S){for(var L=-1,re=S.length,ve=n.length;++L<re;)n[ve+L]=S[L];return n}return SD=e,SD}var ED,ZU;function Ffe(){if(ZU)return ED;ZU=1;var e=CY(),n=Tm();function S(L,re,ve){var Ce=re(L);return n(L)?Ce:e(Ce,ve(L))}return ED=S,ED}var MD,$U;function Bfe(){if($U)return MD;$U=1;function e(n,S){for(var L=-1,re=n==null?0:n.length,ve=0,Ce=[];++L<re;){var Be=n[L];S(Be,L,n)&&(Ce[ve++]=Be)}return Ce}return MD=e,MD}var CD,KU;function jfe(){if(KU)return CD;KU=1;function e(){return[]}return CD=e,CD}var kD,JU;function Ufe(){if(JU)return kD;JU=1;var e=Bfe(),n=jfe(),S=Object.prototype,L=S.propertyIsEnumerable,re=Object.getOwnPropertySymbols,ve=re?function(Ce){return Ce==null?[]:(Ce=Object(Ce),e(re(Ce),function(Be){return L.call(Ce,Be)}))}:n;return kD=ve,kD}var PD,QU;function qfe(){if(QU)return PD;QU=1;function e(n,S){for(var L=-1,re=Array(n);++L<n;)re[L]=S(L);return re}return PD=e,PD}var LD,eq;function Vfe(){if(eq)return LD;eq=1;var e=M1(),n=C1(),S="[object Arguments]";function L(re){return n(re)&&e(re)==S}return LD=L,LD}var RD,tq;function J7(){if(tq)return RD;tq=1;var e=Vfe(),n=C1(),S=Object.prototype,L=S.hasOwnProperty,re=S.propertyIsEnumerable,ve=e((function(){return arguments})())?e:function(Ce){return n(Ce)&&L.call(Ce,"callee")&&!re.call(Ce,"callee")};return RD=ve,RD}var X5={exports:{}},ID,rq;function Hfe(){if(rq)return ID;rq=1;function e(){return!1}return ID=e,ID}X5.exports;var nq;function kY(){return nq||(nq=1,(function(e,n){var S=_y(),L=Hfe(),re=n&&!n.nodeType&&n,ve=re&&!0&&e&&!e.nodeType&&e,Ce=ve&&ve.exports===re,Be=Ce?S.Buffer:void 0,Ge=Be?Be.isBuffer:void 0,Ke=Ge||L;e.exports=Ke})(X5,X5.exports)),X5.exports}var DD,aq;function Q7(){if(aq)return DD;aq=1;var e=9007199254740991,n=/^(?:0|[1-9]\d*)$/;function S(L,re){var ve=typeof L;return re=re??e,!!re&&(ve=="number"||ve!="symbol"&&n.test(L))&&L>-1&&L%1==0&&L<re}return DD=S,DD}var OD,iq;function e9(){if(iq)return OD;iq=1;var e=9007199254740991;function n(S){return typeof S=="number"&&S>-1&&S%1==0&&S<=e}return OD=n,OD}var zD,oq;function Gfe(){if(oq)return zD;oq=1;var e=M1(),n=e9(),S=C1(),L="[object Arguments]",re="[object Array]",ve="[object Boolean]",Ce="[object Date]",Be="[object Error]",Ge="[object Function]",Ke="[object Map]",dt="[object Number]",gt="[object Object]",Vt="[object RegExp]",Xt="[object Set]",cr="[object String]",sr="[object WeakMap]",nr="[object ArrayBuffer]",zr="[object DataView]",Ne="[object Float32Array]",Jr="[object Float64Array]",pn="[object Int8Array]",Lr="[object Int16Array]",Or="[object Int32Array]",cn="[object Uint8Array]",$n="[object Uint8ClampedArray]",xn="[object Uint16Array]",Wa="[object Uint32Array]",On={};On[Ne]=On[Jr]=On[pn]=On[Lr]=On[Or]=On[cn]=On[$n]=On[xn]=On[Wa]=!0,On[L]=On[re]=On[nr]=On[ve]=On[zr]=On[Ce]=On[Be]=On[Ge]=On[Ke]=On[dt]=On[gt]=On[Vt]=On[Xt]=On[cr]=On[sr]=!1;function qn(ca){return S(ca)&&n(ca.length)&&!!On[e(ca)]}return zD=qn,zD}var ND,sq;function PY(){if(sq)return ND;sq=1;function e(n){return function(S){return n(S)}}return ND=e,ND}var W5={exports:{}};W5.exports;var lq;function Xfe(){return lq||(lq=1,(function(e,n){var S=ZW(),L=n&&!n.nodeType&&n,re=L&&!0&&e&&!e.nodeType&&e,ve=re&&re.exports===L,Ce=ve&&S.process,Be=(function(){try{var Ge=re&&re.require&&re.require("util").types;return Ge||Ce&&Ce.binding&&Ce.binding("util")}catch{}})();e.exports=Be})(W5,W5.exports)),W5.exports}var FD,uq;function LY(){if(uq)return FD;uq=1;var e=Gfe(),n=PY(),S=Xfe(),L=S&&S.isTypedArray,re=L?n(L):e;return FD=re,FD}var BD,cq;function Wfe(){if(cq)return BD;cq=1;var e=qfe(),n=J7(),S=Tm(),L=kY(),re=Q7(),ve=LY(),Ce=Object.prototype,Be=Ce.hasOwnProperty;function Ge(Ke,dt){var gt=S(Ke),Vt=!gt&&n(Ke),Xt=!gt&&!Vt&&L(Ke),cr=!gt&&!Vt&&!Xt&&ve(Ke),sr=gt||Vt||Xt||cr,nr=sr?e(Ke.length,String):[],zr=nr.length;for(var Ne in Ke)(dt||Be.call(Ke,Ne))&&!(sr&&(Ne=="length"||Xt&&(Ne=="offset"||Ne=="parent")||cr&&(Ne=="buffer"||Ne=="byteLength"||Ne=="byteOffset")||re(Ne,zr)))&&nr.push(Ne);return nr}return BD=Ge,BD}var jD,fq;function Yfe(){if(fq)return jD;fq=1;var e=Object.prototype;function n(S){var L=S&&S.constructor,re=typeof L=="function"&&L.prototype||e;return S===re}return jD=n,jD}var UD,hq;function RY(){if(hq)return UD;hq=1;function e(n,S){return function(L){return n(S(L))}}return UD=e,UD}var qD,dq;function Zfe(){if(dq)return qD;dq=1;var e=RY(),n=e(Object.keys,Object);return qD=n,qD}var VD,vq;function $fe(){if(vq)return VD;vq=1;var e=Yfe(),n=Zfe(),S=Object.prototype,L=S.hasOwnProperty;function re(ve){if(!e(ve))return n(ve);var Ce=[];for(var Be in Object(ve))L.call(ve,Be)&&Be!="constructor"&&Ce.push(Be);return Ce}return VD=re,VD}var HD,pq;function GE(){if(pq)return HD;pq=1;var e=B7(),n=e9();function S(L){return L!=null&&n(L.length)&&!e(L)}return HD=S,HD}var GD,mq;function QP(){if(mq)return GD;mq=1;var e=Wfe(),n=$fe(),S=GE();function L(re){return S(re)?e(re):n(re)}return GD=L,GD}var XD,gq;function Kfe(){if(gq)return XD;gq=1;var e=Ffe(),n=Ufe(),S=QP();function L(re){return e(re,S,n)}return XD=L,XD}var WD,yq;function Jfe(){if(yq)return WD;yq=1;var e=Kfe(),n=1,S=Object.prototype,L=S.hasOwnProperty;function re(ve,Ce,Be,Ge,Ke,dt){var gt=Be&n,Vt=e(ve),Xt=Vt.length,cr=e(Ce),sr=cr.length;if(Xt!=sr&&!gt)return!1;for(var nr=Xt;nr--;){var zr=Vt[nr];if(!(gt?zr in Ce:L.call(Ce,zr)))return!1}var Ne=dt.get(ve),Jr=dt.get(Ce);if(Ne&&Jr)return Ne==Ce&&Jr==ve;var pn=!0;dt.set(ve,Ce),dt.set(Ce,ve);for(var Lr=gt;++nr<Xt;){zr=Vt[nr];var Or=ve[zr],cn=Ce[zr];if(Ge)var $n=gt?Ge(cn,Or,zr,Ce,ve,dt):Ge(Or,cn,zr,ve,Ce,dt);if(!($n===void 0?Or===cn||Ke(Or,cn,Be,Ge,dt):$n)){pn=!1;break}Lr||(Lr=zr=="constructor")}if(pn&&!Lr){var xn=ve.constructor,Wa=Ce.constructor;xn!=Wa&&"constructor"in ve&&"constructor"in Ce&&!(typeof xn=="function"&&xn instanceof xn&&typeof Wa=="function"&&Wa instanceof Wa)&&(pn=!1)}return dt.delete(ve),dt.delete(Ce),pn}return WD=re,WD}var YD,_q;function Qfe(){if(_q)return YD;_q=1;var e=ww(),n=_y(),S=e(n,"DataView");return YD=S,YD}var ZD,xq;function ehe(){if(xq)return ZD;xq=1;var e=ww(),n=_y(),S=e(n,"Promise");return ZD=S,ZD}var $D,bq;function IY(){if(bq)return $D;bq=1;var e=ww(),n=_y(),S=e(n,"Set");return $D=S,$D}var KD,wq;function the(){if(wq)return KD;wq=1;var e=ww(),n=_y(),S=e(n,"WeakMap");return KD=S,KD}var JD,Tq;function rhe(){if(Tq)return JD;Tq=1;var e=Qfe(),n=U7(),S=ehe(),L=IY(),re=the(),ve=M1(),Ce=$W(),Be="[object Map]",Ge="[object Object]",Ke="[object Promise]",dt="[object Set]",gt="[object WeakMap]",Vt="[object DataView]",Xt=Ce(e),cr=Ce(n),sr=Ce(S),nr=Ce(L),zr=Ce(re),Ne=ve;return(e&&Ne(new e(new ArrayBuffer(1)))!=Vt||n&&Ne(new n)!=Be||S&&Ne(S.resolve())!=Ke||L&&Ne(new L)!=dt||re&&Ne(new re)!=gt)&&(Ne=function(Jr){var pn=ve(Jr),Lr=pn==Ge?Jr.constructor:void 0,Or=Lr?Ce(Lr):"";if(Or)switch(Or){case Xt:return Vt;case cr:return Be;case sr:return Ke;case nr:return dt;case zr:return gt}return pn}),JD=Ne,JD}var QD,Aq;function nhe(){if(Aq)return QD;Aq=1;var e=TY(),n=MY(),S=Nfe(),L=Jfe(),re=rhe(),ve=Tm(),Ce=kY(),Be=LY(),Ge=1,Ke="[object Arguments]",dt="[object Array]",gt="[object Object]",Vt=Object.prototype,Xt=Vt.hasOwnProperty;function cr(sr,nr,zr,Ne,Jr,pn){var Lr=ve(sr),Or=ve(nr),cn=Lr?dt:re(sr),$n=Or?dt:re(nr);cn=cn==Ke?gt:cn,$n=$n==Ke?gt:$n;var xn=cn==gt,Wa=$n==gt,On=cn==$n;if(On&&Ce(sr)){if(!Ce(nr))return!1;Lr=!0,xn=!1}if(On&&!xn)return pn||(pn=new e),Lr||Be(sr)?n(sr,nr,zr,Ne,Jr,pn):S(sr,nr,cn,zr,Ne,Jr,pn);if(!(zr&Ge)){var qn=xn&&Xt.call(sr,"__wrapped__"),ca=Wa&&Xt.call(nr,"__wrapped__");if(qn||ca){var Fn=qn?sr.value():sr,da=ca?nr.value():nr;return pn||(pn=new e),Jr(Fn,da,zr,Ne,pn)}}return On?(pn||(pn=new e),L(sr,nr,zr,Ne,Jr,pn)):!1}return QD=cr,QD}var e4,Sq;function t9(){if(Sq)return e4;Sq=1;var e=nhe(),n=C1();function S(L,re,ve,Ce,Be){return L===re?!0:L==null||re==null||!n(L)&&!n(re)?L!==L&&re!==re:e(L,re,ve,Ce,S,Be)}return e4=S,e4}var t4,Eq;function ahe(){if(Eq)return t4;Eq=1;var e=TY(),n=t9(),S=1,L=2;function re(ve,Ce,Be,Ge){var Ke=Be.length,dt=Ke,gt=!Ge;if(ve==null)return!dt;for(ve=Object(ve);Ke--;){var Vt=Be[Ke];if(gt&&Vt[2]?Vt[1]!==ve[Vt[0]]:!(Vt[0]in ve))return!1}for(;++Ke<dt;){Vt=Be[Ke];var Xt=Vt[0],cr=ve[Xt],sr=Vt[1];if(gt&&Vt[2]){if(cr===void 0&&!(Xt in ve))return!1}else{var nr=new e;if(Ge)var zr=Ge(cr,sr,Xt,ve,Ce,nr);if(!(zr===void 0?n(sr,cr,S|L,Ge,nr):zr))return!1}}return!0}return t4=re,t4}var r4,Mq;function DY(){if(Mq)return r4;Mq=1;var e=fx();function n(S){return S===S&&!e(S)}return r4=n,r4}var n4,Cq;function ihe(){if(Cq)return n4;Cq=1;var e=DY(),n=QP();function S(L){for(var re=n(L),ve=re.length;ve--;){var Ce=re[ve],Be=L[Ce];re[ve]=[Ce,Be,e(Be)]}return re}return n4=S,n4}var a4,kq;function OY(){if(kq)return a4;kq=1;function e(n,S){return function(L){return L==null?!1:L[n]===S&&(S!==void 0||n in Object(L))}}return a4=e,a4}var i4,Pq;function ohe(){if(Pq)return i4;Pq=1;var e=ahe(),n=ihe(),S=OY();function L(re){var ve=n(re);return ve.length==1&&ve[0][2]?S(ve[0][0],ve[0][1]):function(Ce){return Ce===re||e(Ce,re,ve)}}return i4=L,i4}var o4,Lq;function she(){if(Lq)return o4;Lq=1;function e(n,S){return n!=null&&S in Object(n)}return o4=e,o4}var s4,Rq;function lhe(){if(Rq)return s4;Rq=1;var e=QW(),n=J7(),S=Tm(),L=Q7(),re=e9(),ve=WP();function Ce(Be,Ge,Ke){Ge=e(Ge,Be);for(var dt=-1,gt=Ge.length,Vt=!1;++dt<gt;){var Xt=ve(Ge[dt]);if(!(Vt=Be!=null&&Ke(Be,Xt)))break;Be=Be[Xt]}return Vt||++dt!=gt?Vt:(gt=Be==null?0:Be.length,!!gt&&re(gt)&&L(Xt,gt)&&(S(Be)||n(Be)))}return s4=Ce,s4}var l4,Iq;function uhe(){if(Iq)return l4;Iq=1;var e=she(),n=lhe();function S(L,re){return L!=null&&n(L,re,e)}return l4=S,l4}var u4,Dq;function che(){if(Dq)return u4;Dq=1;var e=t9(),n=eY(),S=uhe(),L=F7(),re=DY(),ve=OY(),Ce=WP(),Be=1,Ge=2;function Ke(dt,gt){return L(dt)&&re(gt)?ve(Ce(dt),gt):function(Vt){var Xt=n(Vt,dt);return Xt===void 0&&Xt===gt?S(Vt,dt):e(gt,Xt,Be|Ge)}}return u4=Ke,u4}var c4,Oq;function jT(){if(Oq)return c4;Oq=1;function e(n){return n}return c4=e,c4}var f4,zq;function fhe(){if(zq)return f4;zq=1;function e(n){return function(S){return S?.[n]}}return f4=e,f4}var h4,Nq;function hhe(){if(Nq)return h4;Nq=1;var e=H7();function n(S){return function(L){return e(L,S)}}return h4=n,h4}var d4,Fq;function dhe(){if(Fq)return d4;Fq=1;var e=fhe(),n=hhe(),S=F7(),L=WP();function re(ve){return S(ve)?e(L(ve)):n(ve)}return d4=re,d4}var v4,Bq;function hx(){if(Bq)return v4;Bq=1;var e=ohe(),n=che(),S=jT(),L=Tm(),re=dhe();function ve(Ce){return typeof Ce=="function"?Ce:Ce==null?S:typeof Ce=="object"?L(Ce)?n(Ce[0],Ce[1]):e(Ce):re(Ce)}return v4=ve,v4}var p4,jq;function zY(){if(jq)return p4;jq=1;function e(n,S,L,re){for(var ve=n.length,Ce=L+(re?1:-1);re?Ce--:++Ce<ve;)if(S(n[Ce],Ce,n))return Ce;return-1}return p4=e,p4}var m4,Uq;function vhe(){if(Uq)return m4;Uq=1;function e(n){return n!==n}return m4=e,m4}var g4,qq;function phe(){if(qq)return g4;qq=1;function e(n,S,L){for(var re=L-1,ve=n.length;++re<ve;)if(n[re]===S)return re;return-1}return g4=e,g4}var y4,Vq;function mhe(){if(Vq)return y4;Vq=1;var e=zY(),n=vhe(),S=phe();function L(re,ve,Ce){return ve===ve?S(re,ve,Ce):e(re,n,Ce)}return y4=L,y4}var _4,Hq;function ghe(){if(Hq)return _4;Hq=1;var e=mhe();function n(S,L){var re=S==null?0:S.length;return!!re&&e(S,L,0)>-1}return _4=n,_4}var x4,Gq;function yhe(){if(Gq)return x4;Gq=1;function e(n,S,L){for(var re=-1,ve=n==null?0:n.length;++re<ve;)if(L(S,n[re]))return!0;return!1}return x4=e,x4}var b4,Xq;function _he(){if(Xq)return b4;Xq=1;function e(){}return b4=e,b4}var w4,Wq;function xhe(){if(Wq)return w4;Wq=1;var e=IY(),n=_he(),S=K7(),L=1/0,re=e&&1/S(new e([,-0]))[1]==L?function(ve){return new e(ve)}:n;return w4=re,w4}var T4,Yq;function bhe(){if(Yq)return T4;Yq=1;var e=AY(),n=ghe(),S=yhe(),L=EY(),re=xhe(),ve=K7(),Ce=200;function Be(Ge,Ke,dt){var gt=-1,Vt=n,Xt=Ge.length,cr=!0,sr=[],nr=sr;if(dt)cr=!1,Vt=S;else if(Xt>=Ce){var zr=Ke?null:re(Ge);if(zr)return ve(zr);cr=!1,Vt=L,nr=new e}else nr=Ke?[]:sr;e:for(;++gt<Xt;){var Ne=Ge[gt],Jr=Ke?Ke(Ne):Ne;if(Ne=dt||Ne!==0?Ne:0,cr&&Jr===Jr){for(var pn=nr.length;pn--;)if(nr[pn]===Jr)continue e;Ke&&nr.push(Jr),sr.push(Ne)}else Vt(nr,Jr,dt)||(nr!==sr&&nr.push(Jr),sr.push(Ne))}return sr}return T4=Be,T4}var A4,Zq;function whe(){if(Zq)return A4;Zq=1;var e=hx(),n=bhe();function S(L,re){return L&&L.length?n(L,e(re,2)):[]}return A4=S,A4}var The=whe();const $q=ih(The);function NY(e,n,S){return n===!0?$q(e,S):qu(n)?$q(e,n):e}function fT(e){"@babel/helpers - typeof";return fT=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},fT(e)}var Ahe=["ref"];function Kq(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function g1(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?Kq(Object(S),!0).forEach(function(L){eL(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):Kq(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function She(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Jq(e,n){for(var S=0;S<n.length;S++){var L=n[S];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(e,BY(L.key),L)}}function Ehe(e,n,S){return n&&Jq(e.prototype,n),S&&Jq(e,S),Object.defineProperty(e,"prototype",{writable:!1}),e}function Mhe(e,n,S){return n=G6(n),Che(e,FY()?Reflect.construct(n,S||[],G6(e).constructor):n.apply(e,S))}function Che(e,n){if(n&&(fT(n)==="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return khe(e)}function khe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function FY(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(FY=function(){return!!e})()}function G6(e){return G6=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(S){return S.__proto__||Object.getPrototypeOf(S)},G6(e)}function Phe(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&_z(e,n)}function _z(e,n){return _z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(L,re){return L.__proto__=re,L},_z(e,n)}function eL(e,n,S){return n=BY(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function BY(e){var n=Lhe(e,"string");return fT(n)=="symbol"?n:n+""}function Lhe(e,n){if(fT(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(fT(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Rhe(e,n){if(e==null)return{};var S=Ihe(e,n),L,re;if(Object.getOwnPropertySymbols){var ve=Object.getOwnPropertySymbols(e);for(re=0;re<ve.length;re++)L=ve[re],!(n.indexOf(L)>=0)&&Object.prototype.propertyIsEnumerable.call(e,L)&&(S[L]=e[L])}return S}function Ihe(e,n){if(e==null)return{};var S={};for(var L in e)if(Object.prototype.hasOwnProperty.call(e,L)){if(n.indexOf(L)>=0)continue;S[L]=e[L]}return S}function Dhe(e){return e.value}function Ohe(e,n){if(la.isValidElement(e))return la.cloneElement(e,n);if(typeof e=="function")return la.createElement(e,n);n.ref;var S=Rhe(n,Ahe);return la.createElement($7,S)}var Qq=1,dy=(function(e){function n(){var S;She(this,n);for(var L=arguments.length,re=new Array(L),ve=0;ve<L;ve++)re[ve]=arguments[ve];return S=Mhe(this,n,[].concat(re)),eL(S,"lastBoundingBox",{width:-1,height:-1}),S}return Phe(n,e),Ehe(n,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var L=this.wrapperNode.getBoundingClientRect();return L.height=this.wrapperNode.offsetHeight,L.width=this.wrapperNode.offsetWidth,L}return null}},{key:"updateBBox",value:function(){var L=this.props.onBBoxUpdate,re=this.getBBox();re?(Math.abs(re.width-this.lastBoundingBox.width)>Qq||Math.abs(re.height-this.lastBoundingBox.height)>Qq)&&(this.lastBoundingBox.width=re.width,this.lastBoundingBox.height=re.height,L&&L(re)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,L&&L(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?g1({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(L){var re=this.props,ve=re.layout,Ce=re.align,Be=re.verticalAlign,Ge=re.margin,Ke=re.chartWidth,dt=re.chartHeight,gt,Vt;if(!L||(L.left===void 0||L.left===null)&&(L.right===void 0||L.right===null))if(Ce==="center"&&ve==="vertical"){var Xt=this.getBBoxSnapshot();gt={left:((Ke||0)-Xt.width)/2}}else gt=Ce==="right"?{right:Ge&&Ge.right||0}:{left:Ge&&Ge.left||0};if(!L||(L.top===void 0||L.top===null)&&(L.bottom===void 0||L.bottom===null))if(Be==="middle"){var cr=this.getBBoxSnapshot();Vt={top:((dt||0)-cr.height)/2}}else Vt=Be==="bottom"?{bottom:Ge&&Ge.bottom||0}:{top:Ge&&Ge.top||0};return g1(g1({},gt),Vt)}},{key:"render",value:function(){var L=this,re=this.props,ve=re.content,Ce=re.width,Be=re.height,Ge=re.wrapperStyle,Ke=re.payloadUniqBy,dt=re.payload,gt=g1(g1({position:"absolute",width:Ce||"auto",height:Be||"auto"},this.getDefaultPosition(Ge)),Ge);return la.createElement("div",{className:"recharts-legend-wrapper",style:gt,ref:function(Xt){L.wrapperNode=Xt}},Ohe(ve,g1(g1({},this.props),{},{payload:NY(dt,Ke,Dhe)})))}}],[{key:"getWithHeight",value:function(L,re){var ve=g1(g1({},this.defaultProps),L.props),Ce=ve.layout;return Ce==="vertical"&&ys(L.props.height)?{height:L.props.height}:Ce==="horizontal"?{width:L.props.width||re}:null}}])})(na.PureComponent);eL(dy,"displayName","Legend");eL(dy,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var S4,eV;function zhe(){if(eV)return S4;eV=1;var e=HE(),n=J7(),S=Tm(),L=e?e.isConcatSpreadable:void 0;function re(ve){return S(ve)||n(ve)||!!(L&&ve&&ve[L])}return S4=re,S4}var E4,tV;function jY(){if(tV)return E4;tV=1;var e=CY(),n=zhe();function S(L,re,ve,Ce,Be){var Ge=-1,Ke=L.length;for(ve||(ve=n),Be||(Be=[]);++Ge<Ke;){var dt=L[Ge];re>0&&ve(dt)?re>1?S(dt,re-1,ve,Ce,Be):e(Be,dt):Ce||(Be[Be.length]=dt)}return Be}return E4=S,E4}var M4,rV;function Nhe(){if(rV)return M4;rV=1;function e(n){return function(S,L,re){for(var ve=-1,Ce=Object(S),Be=re(S),Ge=Be.length;Ge--;){var Ke=Be[n?Ge:++ve];if(L(Ce[Ke],Ke,Ce)===!1)break}return S}}return M4=e,M4}var C4,nV;function Fhe(){if(nV)return C4;nV=1;var e=Nhe(),n=e();return C4=n,C4}var k4,aV;function UY(){if(aV)return k4;aV=1;var e=Fhe(),n=QP();function S(L,re){return L&&e(L,re,n)}return k4=S,k4}var P4,iV;function Bhe(){if(iV)return P4;iV=1;var e=GE();function n(S,L){return function(re,ve){if(re==null)return re;if(!e(re))return S(re,ve);for(var Ce=re.length,Be=L?Ce:-1,Ge=Object(re);(L?Be--:++Be<Ce)&&ve(Ge[Be],Be,Ge)!==!1;);return re}}return P4=n,P4}var L4,oV;function r9(){if(oV)return L4;oV=1;var e=UY(),n=Bhe(),S=n(e);return L4=S,L4}var R4,sV;function qY(){if(sV)return R4;sV=1;var e=r9(),n=GE();function S(L,re){var ve=-1,Ce=n(L)?Array(L.length):[];return e(L,function(Be,Ge,Ke){Ce[++ve]=re(Be,Ge,Ke)}),Ce}return R4=S,R4}var I4,lV;function jhe(){if(lV)return I4;lV=1;function e(n,S){var L=n.length;for(n.sort(S);L--;)n[L]=n[L].value;return n}return I4=e,I4}var D4,uV;function Uhe(){if(uV)return D4;uV=1;var e=NT();function n(S,L){if(S!==L){var re=S!==void 0,ve=S===null,Ce=S===S,Be=e(S),Ge=L!==void 0,Ke=L===null,dt=L===L,gt=e(L);if(!Ke&&!gt&&!Be&&S>L||Be&&Ge&&dt&&!Ke&&!gt||ve&&Ge&&dt||!re&&dt||!Ce)return 1;if(!ve&&!Be&&!gt&&S<L||gt&&re&&Ce&&!ve&&!Be||Ke&&re&&Ce||!Ge&&Ce||!dt)return-1}return 0}return D4=n,D4}var O4,cV;function qhe(){if(cV)return O4;cV=1;var e=Uhe();function n(S,L,re){for(var ve=-1,Ce=S.criteria,Be=L.criteria,Ge=Ce.length,Ke=re.length;++ve<Ge;){var dt=e(Ce[ve],Be[ve]);if(dt){if(ve>=Ke)return dt;var gt=re[ve];return dt*(gt=="desc"?-1:1)}}return S.index-L.index}return O4=n,O4}var z4,fV;function Vhe(){if(fV)return z4;fV=1;var e=V7(),n=H7(),S=hx(),L=qY(),re=jhe(),ve=PY(),Ce=qhe(),Be=jT(),Ge=Tm();function Ke(dt,gt,Vt){gt.length?gt=e(gt,function(sr){return Ge(sr)?function(nr){return n(nr,sr.length===1?sr[0]:sr)}:sr}):gt=[Be];var Xt=-1;gt=e(gt,ve(S));var cr=L(dt,function(sr,nr,zr){var Ne=e(gt,function(Jr){return Jr(sr)});return{criteria:Ne,index:++Xt,value:sr}});return re(cr,function(sr,nr){return Ce(sr,nr,Vt)})}return z4=Ke,z4}var N4,hV;function Hhe(){if(hV)return N4;hV=1;function e(n,S,L){switch(L.length){case 0:return n.call(S);case 1:return n.call(S,L[0]);case 2:return n.call(S,L[0],L[1]);case 3:return n.call(S,L[0],L[1],L[2])}return n.apply(S,L)}return N4=e,N4}var F4,dV;function Ghe(){if(dV)return F4;dV=1;var e=Hhe(),n=Math.max;function S(L,re,ve){return re=n(re===void 0?L.length-1:re,0),function(){for(var Ce=arguments,Be=-1,Ge=n(Ce.length-re,0),Ke=Array(Ge);++Be<Ge;)Ke[Be]=Ce[re+Be];Be=-1;for(var dt=Array(re+1);++Be<re;)dt[Be]=Ce[Be];return dt[re]=ve(Ke),e(L,this,dt)}}return F4=S,F4}var B4,vV;function Xhe(){if(vV)return B4;vV=1;function e(n){return function(){return n}}return B4=e,B4}var j4,pV;function VY(){if(pV)return j4;pV=1;var e=ww(),n=(function(){try{var S=e(Object,"defineProperty");return S({},"",{}),S}catch{}})();return j4=n,j4}var U4,mV;function Whe(){if(mV)return U4;mV=1;var e=Xhe(),n=VY(),S=jT(),L=n?function(re,ve){return n(re,"toString",{configurable:!0,enumerable:!1,value:e(ve),writable:!0})}:S;return U4=L,U4}var q4,gV;function Yhe(){if(gV)return q4;gV=1;var e=800,n=16,S=Date.now;function L(re){var ve=0,Ce=0;return function(){var Be=S(),Ge=n-(Be-Ce);if(Ce=Be,Ge>0){if(++ve>=e)return arguments[0]}else ve=0;return re.apply(void 0,arguments)}}return q4=L,q4}var V4,yV;function Zhe(){if(yV)return V4;yV=1;var e=Whe(),n=Yhe(),S=n(e);return V4=S,V4}var H4,_V;function $he(){if(_V)return H4;_V=1;var e=jT(),n=Ghe(),S=Zhe();function L(re,ve){return S(n(re,ve,e),re+"")}return H4=L,H4}var G4,xV;function tL(){if(xV)return G4;xV=1;var e=j7(),n=GE(),S=Q7(),L=fx();function re(ve,Ce,Be){if(!L(Be))return!1;var Ge=typeof Ce;return(Ge=="number"?n(Be)&&S(Ce,Be.length):Ge=="string"&&Ce in Be)?e(Be[Ce],ve):!1}return G4=re,G4}var X4,bV;function Khe(){if(bV)return X4;bV=1;var e=jY(),n=Vhe(),S=$he(),L=tL(),re=S(function(ve,Ce){if(ve==null)return[];var Be=Ce.length;return Be>1&&L(ve,Ce[0],Ce[1])?Ce=[]:Be>2&&L(Ce[0],Ce[1],Ce[2])&&(Ce=[Ce[0]]),n(ve,e(Ce,1),[])});return X4=re,X4}var Jhe=Khe();const n9=ih(Jhe);function oE(e){"@babel/helpers - typeof";return oE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},oE(e)}function xz(){return xz=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var S=arguments[n];for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(e[L]=S[L])}return e},xz.apply(this,arguments)}function Qhe(e,n){return nde(e)||rde(e,n)||tde(e,n)||ede()}function ede(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tde(e,n){if(e){if(typeof e=="string")return wV(e,n);var S=Object.prototype.toString.call(e).slice(8,-1);if(S==="Object"&&e.constructor&&(S=e.constructor.name),S==="Map"||S==="Set")return Array.from(e);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return wV(e,n)}}function wV(e,n){(n==null||n>e.length)&&(n=e.length);for(var S=0,L=new Array(n);S<n;S++)L[S]=e[S];return L}function rde(e,n){var S=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(S!=null){var L,re,ve,Ce,Be=[],Ge=!0,Ke=!1;try{if(ve=(S=S.call(e)).next,n!==0)for(;!(Ge=(L=ve.call(S)).done)&&(Be.push(L.value),Be.length!==n);Ge=!0);}catch(dt){Ke=!0,re=dt}finally{try{if(!Ge&&S.return!=null&&(Ce=S.return(),Object(Ce)!==Ce))return}finally{if(Ke)throw re}}return Be}}function nde(e){if(Array.isArray(e))return e}function TV(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function W4(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?TV(Object(S),!0).forEach(function(L){ade(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):TV(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function ade(e,n,S){return n=ide(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function ide(e){var n=ode(e,"string");return oE(n)=="symbol"?n:n+""}function ode(e,n){if(oE(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(oE(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function sde(e){return Array.isArray(e)&&Ov(e[0])&&Ov(e[1])?e.join(" ~ "):e}var lde=function(n){var S=n.separator,L=S===void 0?" : ":S,re=n.contentStyle,ve=re===void 0?{}:re,Ce=n.itemStyle,Be=Ce===void 0?{}:Ce,Ge=n.labelStyle,Ke=Ge===void 0?{}:Ge,dt=n.payload,gt=n.formatter,Vt=n.itemSorter,Xt=n.wrapperClassName,cr=n.labelClassName,sr=n.label,nr=n.labelFormatter,zr=n.accessibilityLayer,Ne=zr===void 0?!1:zr,Jr=function(){if(dt&&dt.length){var qn={padding:0,margin:0},ca=(Vt?n9(dt,Vt):dt).map(function(Fn,da){if(Fn.type==="none")return null;var ea=W4({display:"block",paddingTop:4,paddingBottom:4,color:Fn.color||"#000"},Be),qa=Fn.formatter||gt||sde,Ri=Fn.value,mi=Fn.name,Io=Ri,ya=mi;if(qa&&Io!=null&&ya!=null){var Wn=qa(Ri,mi,Fn,da,dt);if(Array.isArray(Wn)){var Ei=Qhe(Wn,2);Io=Ei[0],ya=Ei[1]}else Io=Wn}return la.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(da),style:ea},Ov(ya)?la.createElement("span",{className:"recharts-tooltip-item-name"},ya):null,Ov(ya)?la.createElement("span",{className:"recharts-tooltip-item-separator"},L):null,la.createElement("span",{className:"recharts-tooltip-item-value"},Io),la.createElement("span",{className:"recharts-tooltip-item-unit"},Fn.unit||""))});return la.createElement("ul",{className:"recharts-tooltip-item-list",style:qn},ca)}return null},pn=W4({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},ve),Lr=W4({margin:0},Ke),Or=!Ru(sr),cn=Or?sr:"",$n=kc("recharts-default-tooltip",Xt),xn=kc("recharts-tooltip-label",cr);Or&&nr&&dt!==void 0&&dt!==null&&(cn=nr(sr,dt));var Wa=Ne?{role:"status","aria-live":"assertive"}:{};return la.createElement("div",xz({className:$n,style:pn},Wa),la.createElement("p",{className:xn,style:Lr},la.isValidElement(cn)?cn:"".concat(cn)),Jr())};function sE(e){"@babel/helpers - typeof";return sE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},sE(e)}function y6(e,n,S){return n=ude(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function ude(e){var n=cde(e,"string");return sE(n)=="symbol"?n:n+""}function cde(e,n){if(sE(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(sE(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var O5="recharts-tooltip-wrapper",fde={visibility:"hidden"};function hde(e){var n=e.coordinate,S=e.translateX,L=e.translateY;return kc(O5,y6(y6(y6(y6({},"".concat(O5,"-right"),ys(S)&&n&&ys(n.x)&&S>=n.x),"".concat(O5,"-left"),ys(S)&&n&&ys(n.x)&&S<n.x),"".concat(O5,"-bottom"),ys(L)&&n&&ys(n.y)&&L>=n.y),"".concat(O5,"-top"),ys(L)&&n&&ys(n.y)&&L<n.y))}function AV(e){var n=e.allowEscapeViewBox,S=e.coordinate,L=e.key,re=e.offsetTopLeft,ve=e.position,Ce=e.reverseDirection,Be=e.tooltipDimension,Ge=e.viewBox,Ke=e.viewBoxDimension;if(ve&&ys(ve[L]))return ve[L];var dt=S[L]-Be-re,gt=S[L]+re;if(n[L])return Ce[L]?dt:gt;if(Ce[L]){var Vt=dt,Xt=Ge[L];return Vt<Xt?Math.max(gt,Ge[L]):Math.max(dt,Ge[L])}var cr=gt+Be,sr=Ge[L]+Ke;return cr>sr?Math.max(dt,Ge[L]):Math.max(gt,Ge[L])}function dde(e){var n=e.translateX,S=e.translateY,L=e.useTranslate3d;return{transform:L?"translate3d(".concat(n,"px, ").concat(S,"px, 0)"):"translate(".concat(n,"px, ").concat(S,"px)")}}function vde(e){var n=e.allowEscapeViewBox,S=e.coordinate,L=e.offsetTopLeft,re=e.position,ve=e.reverseDirection,Ce=e.tooltipBox,Be=e.useTranslate3d,Ge=e.viewBox,Ke,dt,gt;return Ce.height>0&&Ce.width>0&&S?(dt=AV({allowEscapeViewBox:n,coordinate:S,key:"x",offsetTopLeft:L,position:re,reverseDirection:ve,tooltipDimension:Ce.width,viewBox:Ge,viewBoxDimension:Ge.width}),gt=AV({allowEscapeViewBox:n,coordinate:S,key:"y",offsetTopLeft:L,position:re,reverseDirection:ve,tooltipDimension:Ce.height,viewBox:Ge,viewBoxDimension:Ge.height}),Ke=dde({translateX:dt,translateY:gt,useTranslate3d:Be})):Ke=fde,{cssProperties:Ke,cssClasses:hde({translateX:dt,translateY:gt,coordinate:S})}}function hT(e){"@babel/helpers - typeof";return hT=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},hT(e)}function SV(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function EV(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?SV(Object(S),!0).forEach(function(L){wz(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):SV(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function pde(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function mde(e,n){for(var S=0;S<n.length;S++){var L=n[S];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(e,GY(L.key),L)}}function gde(e,n,S){return n&&mde(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function yde(e,n,S){return n=X6(n),_de(e,HY()?Reflect.construct(n,S||[],X6(e).constructor):n.apply(e,S))}function _de(e,n){if(n&&(hT(n)==="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return xde(e)}function xde(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function HY(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(HY=function(){return!!e})()}function X6(e){return X6=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(S){return S.__proto__||Object.getPrototypeOf(S)},X6(e)}function bde(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&bz(e,n)}function bz(e,n){return bz=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(L,re){return L.__proto__=re,L},bz(e,n)}function wz(e,n,S){return n=GY(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function GY(e){var n=wde(e,"string");return hT(n)=="symbol"?n:n+""}function wde(e,n){if(hT(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(hT(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var MV=1,Tde=(function(e){function n(){var S;pde(this,n);for(var L=arguments.length,re=new Array(L),ve=0;ve<L;ve++)re[ve]=arguments[ve];return S=yde(this,n,[].concat(re)),wz(S,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),wz(S,"handleKeyDown",function(Ce){if(Ce.key==="Escape"){var Be,Ge,Ke,dt;S.setState({dismissed:!0,dismissedAtCoordinate:{x:(Be=(Ge=S.props.coordinate)===null||Ge===void 0?void 0:Ge.x)!==null&&Be!==void 0?Be:0,y:(Ke=(dt=S.props.coordinate)===null||dt===void 0?void 0:dt.y)!==null&&Ke!==void 0?Ke:0}})}}),S}return bde(n,e),gde(n,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var L=this.wrapperNode.getBoundingClientRect();(Math.abs(L.width-this.state.lastBoundingBox.width)>MV||Math.abs(L.height-this.state.lastBoundingBox.height)>MV)&&this.setState({lastBoundingBox:{width:L.width,height:L.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var L,re;this.props.active&&this.updateBBox(),this.state.dismissed&&(((L=this.props.coordinate)===null||L===void 0?void 0:L.x)!==this.state.dismissedAtCoordinate.x||((re=this.props.coordinate)===null||re===void 0?void 0:re.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var L=this,re=this.props,ve=re.active,Ce=re.allowEscapeViewBox,Be=re.animationDuration,Ge=re.animationEasing,Ke=re.children,dt=re.coordinate,gt=re.hasPayload,Vt=re.isAnimationActive,Xt=re.offset,cr=re.position,sr=re.reverseDirection,nr=re.useTranslate3d,zr=re.viewBox,Ne=re.wrapperStyle,Jr=vde({allowEscapeViewBox:Ce,coordinate:dt,offsetTopLeft:Xt,position:cr,reverseDirection:sr,tooltipBox:this.state.lastBoundingBox,useTranslate3d:nr,viewBox:zr}),pn=Jr.cssClasses,Lr=Jr.cssProperties,Or=EV(EV({transition:Vt&&ve?"transform ".concat(Be,"ms ").concat(Ge):void 0},Lr),{},{pointerEvents:"none",visibility:!this.state.dismissed&&ve&&gt?"visible":"hidden",position:"absolute",top:0,left:0},Ne);return la.createElement("div",{tabIndex:-1,className:pn,style:Or,ref:function($n){L.wrapperNode=$n}},Ke)}}])})(na.PureComponent),Ade=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},dx={isSsr:Ade()};function dT(e){"@babel/helpers - typeof";return dT=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},dT(e)}function CV(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function kV(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?CV(Object(S),!0).forEach(function(L){a9(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):CV(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function Sde(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Ede(e,n){for(var S=0;S<n.length;S++){var L=n[S];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(e,WY(L.key),L)}}function Mde(e,n,S){return n&&Ede(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Cde(e,n,S){return n=W6(n),kde(e,XY()?Reflect.construct(n,S||[],W6(e).constructor):n.apply(e,S))}function kde(e,n){if(n&&(dT(n)==="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Pde(e)}function Pde(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function XY(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(XY=function(){return!!e})()}function W6(e){return W6=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(S){return S.__proto__||Object.getPrototypeOf(S)},W6(e)}function Lde(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&Tz(e,n)}function Tz(e,n){return Tz=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(L,re){return L.__proto__=re,L},Tz(e,n)}function a9(e,n,S){return n=WY(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function WY(e){var n=Rde(e,"string");return dT(n)=="symbol"?n:n+""}function Rde(e,n){if(dT(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(dT(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Ide(e){return e.dataKey}function Dde(e,n){return la.isValidElement(e)?la.cloneElement(e,n):typeof e=="function"?la.createElement(e,n):la.createElement(lde,n)}var Qm=(function(e){function n(){return Sde(this,n),Cde(this,n,arguments)}return Lde(n,e),Mde(n,[{key:"render",value:function(){var L=this,re=this.props,ve=re.active,Ce=re.allowEscapeViewBox,Be=re.animationDuration,Ge=re.animationEasing,Ke=re.content,dt=re.coordinate,gt=re.filterNull,Vt=re.isAnimationActive,Xt=re.offset,cr=re.payload,sr=re.payloadUniqBy,nr=re.position,zr=re.reverseDirection,Ne=re.useTranslate3d,Jr=re.viewBox,pn=re.wrapperStyle,Lr=cr??[];gt&&Lr.length&&(Lr=NY(cr.filter(function(cn){return cn.value!=null&&(cn.hide!==!0||L.props.includeHidden)}),sr,Ide));var Or=Lr.length>0;return la.createElement(Tde,{allowEscapeViewBox:Ce,animationDuration:Be,animationEasing:Ge,isAnimationActive:Vt,active:ve,coordinate:dt,hasPayload:Or,offset:Xt,position:nr,reverseDirection:zr,useTranslate3d:Ne,viewBox:Jr,wrapperStyle:pn},Dde(Ke,kV(kV({},this.props),{},{payload:Lr})))}}])})(na.PureComponent);a9(Qm,"displayName","Tooltip");a9(Qm,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!dx.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var Y4,PV;function Ode(){if(PV)return Y4;PV=1;var e=_y(),n=function(){return e.Date.now()};return Y4=n,Y4}var Z4,LV;function zde(){if(LV)return Z4;LV=1;var e=/\s/;function n(S){for(var L=S.length;L--&&e.test(S.charAt(L)););return L}return Z4=n,Z4}var $4,RV;function Nde(){if(RV)return $4;RV=1;var e=zde(),n=/^\s+/;function S(L){return L&&L.slice(0,e(L)+1).replace(n,"")}return $4=S,$4}var K4,IV;function YY(){if(IV)return K4;IV=1;var e=Nde(),n=fx(),S=NT(),L=NaN,re=/^[-+]0x[0-9a-f]+$/i,ve=/^0b[01]+$/i,Ce=/^0o[0-7]+$/i,Be=parseInt;function Ge(Ke){if(typeof Ke=="number")return Ke;if(S(Ke))return L;if(n(Ke)){var dt=typeof Ke.valueOf=="function"?Ke.valueOf():Ke;Ke=n(dt)?dt+"":dt}if(typeof Ke!="string")return Ke===0?Ke:+Ke;Ke=e(Ke);var gt=ve.test(Ke);return gt||Ce.test(Ke)?Be(Ke.slice(2),gt?2:8):re.test(Ke)?L:+Ke}return K4=Ge,K4}var J4,DV;function Fde(){if(DV)return J4;DV=1;var e=fx(),n=Ode(),S=YY(),L="Expected a function",re=Math.max,ve=Math.min;function Ce(Be,Ge,Ke){var dt,gt,Vt,Xt,cr,sr,nr=0,zr=!1,Ne=!1,Jr=!0;if(typeof Be!="function")throw new TypeError(L);Ge=S(Ge)||0,e(Ke)&&(zr=!!Ke.leading,Ne="maxWait"in Ke,Vt=Ne?re(S(Ke.maxWait)||0,Ge):Vt,Jr="trailing"in Ke?!!Ke.trailing:Jr);function pn(ca){var Fn=dt,da=gt;return dt=gt=void 0,nr=ca,Xt=Be.apply(da,Fn),Xt}function Lr(ca){return nr=ca,cr=setTimeout($n,Ge),zr?pn(ca):Xt}function Or(ca){var Fn=ca-sr,da=ca-nr,ea=Ge-Fn;return Ne?ve(ea,Vt-da):ea}function cn(ca){var Fn=ca-sr,da=ca-nr;return sr===void 0||Fn>=Ge||Fn<0||Ne&&da>=Vt}function $n(){var ca=n();if(cn(ca))return xn(ca);cr=setTimeout($n,Or(ca))}function xn(ca){return cr=void 0,Jr&&dt?pn(ca):(dt=gt=void 0,Xt)}function Wa(){cr!==void 0&&clearTimeout(cr),nr=0,dt=sr=gt=cr=void 0}function On(){return cr===void 0?Xt:xn(n())}function qn(){var ca=n(),Fn=cn(ca);if(dt=arguments,gt=this,sr=ca,Fn){if(cr===void 0)return Lr(sr);if(Ne)return clearTimeout(cr),cr=setTimeout($n,Ge),pn(sr)}return cr===void 0&&(cr=setTimeout($n,Ge)),Xt}return qn.cancel=Wa,qn.flush=On,qn}return J4=Ce,J4}var Q4,OV;function Bde(){if(OV)return Q4;OV=1;var e=Fde(),n=fx(),S="Expected a function";function L(re,ve,Ce){var Be=!0,Ge=!0;if(typeof re!="function")throw new TypeError(S);return n(Ce)&&(Be="leading"in Ce?!!Ce.leading:Be,Ge="trailing"in Ce?!!Ce.trailing:Ge),e(re,ve,{leading:Be,maxWait:ve,trailing:Ge})}return Q4=L,Q4}var jde=Bde();const ZY=ih(jde);function lE(e){"@babel/helpers - typeof";return lE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},lE(e)}function zV(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function _6(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?zV(Object(S),!0).forEach(function(L){Ude(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):zV(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function Ude(e,n,S){return n=qde(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function qde(e){var n=Vde(e,"string");return lE(n)=="symbol"?n:n+""}function Vde(e,n){if(lE(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(lE(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function Hde(e,n){return Yde(e)||Wde(e,n)||Xde(e,n)||Gde()}function Gde(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Xde(e,n){if(e){if(typeof e=="string")return NV(e,n);var S=Object.prototype.toString.call(e).slice(8,-1);if(S==="Object"&&e.constructor&&(S=e.constructor.name),S==="Map"||S==="Set")return Array.from(e);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return NV(e,n)}}function NV(e,n){(n==null||n>e.length)&&(n=e.length);for(var S=0,L=new Array(n);S<n;S++)L[S]=e[S];return L}function Wde(e,n){var S=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(S!=null){var L,re,ve,Ce,Be=[],Ge=!0,Ke=!1;try{if(ve=(S=S.call(e)).next,n!==0)for(;!(Ge=(L=ve.call(S)).done)&&(Be.push(L.value),Be.length!==n);Ge=!0);}catch(dt){Ke=!0,re=dt}finally{try{if(!Ge&&S.return!=null&&(Ce=S.return(),Object(Ce)!==Ce))return}finally{if(Ke)throw re}}return Be}}function Yde(e){if(Array.isArray(e))return e}var rL=na.forwardRef(function(e,n){var S=e.aspect,L=e.initialDimension,re=L===void 0?{width:-1,height:-1}:L,ve=e.width,Ce=ve===void 0?"100%":ve,Be=e.height,Ge=Be===void 0?"100%":Be,Ke=e.minWidth,dt=Ke===void 0?0:Ke,gt=e.minHeight,Vt=e.maxHeight,Xt=e.children,cr=e.debounce,sr=cr===void 0?0:cr,nr=e.id,zr=e.className,Ne=e.onResize,Jr=e.style,pn=Jr===void 0?{}:Jr,Lr=na.useRef(null),Or=na.useRef();Or.current=Ne,na.useImperativeHandle(n,function(){return Object.defineProperty(Lr.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),Lr.current},configurable:!0})});var cn=na.useState({containerWidth:re.width,containerHeight:re.height}),$n=Hde(cn,2),xn=$n[0],Wa=$n[1],On=na.useCallback(function(ca,Fn){Wa(function(da){var ea=Math.round(ca),qa=Math.round(Fn);return da.containerWidth===ea&&da.containerHeight===qa?da:{containerWidth:ea,containerHeight:qa}})},[]);na.useEffect(function(){var ca=function(mi){var Io,ya=mi[0].contentRect,Wn=ya.width,Ei=ya.height;On(Wn,Ei),(Io=Or.current)===null||Io===void 0||Io.call(Or,Wn,Ei)};sr>0&&(ca=ZY(ca,sr,{trailing:!0,leading:!1}));var Fn=new ResizeObserver(ca),da=Lr.current.getBoundingClientRect(),ea=da.width,qa=da.height;return On(ea,qa),Fn.observe(Lr.current),function(){Fn.disconnect()}},[On,sr]);var qn=na.useMemo(function(){var ca=xn.containerWidth,Fn=xn.containerHeight;if(ca<0||Fn<0)return null;w1(aw(Ce)||aw(Ge),`The width(%s) and height(%s) are both fixed numbers,
       maybe you don't need to use a ResponsiveContainer.`,Ce,Ge),w1(!S||S>0,"The aspect(%s) must be greater than zero.",S);var da=aw(Ce)?ca:Ce,ea=aw(Ge)?Fn:Ge;S&&S>0&&(da?ea=da/S:ea&&(da=ea*S),Vt&&ea>Vt&&(ea=Vt)),w1(da>0||ea>0,`The width(%s) and height(%s) of chart should be greater than 0,
       please check the style of container, or the props width(%s) and height(%s),
       or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
       height and width.`,da,ea,Ce,Ge,dt,gt,S);var qa=!Array.isArray(Xt)&&b1(Xt.type).endsWith("Chart");return la.Children.map(Xt,function(Ri){return la.isValidElement(Ri)?na.cloneElement(Ri,_6({width:da,height:ea},qa?{style:_6({height:"100%",width:"100%",maxHeight:ea,maxWidth:da},Ri.props.style)}:{})):Ri})},[S,Xt,Ge,Vt,gt,dt,xn,Ce]);return la.createElement("div",{id:nr?"".concat(nr):void 0,className:kc("recharts-responsive-container",zr),style:_6(_6({},pn),{},{width:Ce,height:Ge,minWidth:dt,minHeight:gt,maxHeight:Vt}),ref:Lr},qn)}),i9=function(n){return null};i9.displayName="Cell";function uE(e){"@babel/helpers - typeof";return uE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},uE(e)}function FV(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function Az(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?FV(Object(S),!0).forEach(function(L){Zde(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):FV(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function Zde(e,n,S){return n=$de(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function $de(e){var n=Kde(e,"string");return uE(n)=="symbol"?n:n+""}function Kde(e,n){if(uE(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(uE(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var J3={widthCache:{},cacheCount:0},Jde=2e3,Qde={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},BV="recharts_measurement_span";function eve(e){var n=Az({},e);return Object.keys(n).forEach(function(S){n[S]||delete n[S]}),n}var Z5=function(n){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(n==null||dx.isSsr)return{width:0,height:0};var L=eve(S),re=JSON.stringify({text:n,copyStyle:L});if(J3.widthCache[re])return J3.widthCache[re];try{var ve=document.getElementById(BV);ve||(ve=document.createElement("span"),ve.setAttribute("id",BV),ve.setAttribute("aria-hidden","true"),document.body.appendChild(ve));var Ce=Az(Az({},Qde),L);Object.assign(ve.style,Ce),ve.textContent="".concat(n);var Be=ve.getBoundingClientRect(),Ge={width:Be.width,height:Be.height};return J3.widthCache[re]=Ge,++J3.cacheCount>Jde&&(J3.cacheCount=0,J3.widthCache={}),Ge}catch{return{width:0,height:0}}},tve=function(n){return{top:n.top+window.scrollY-document.documentElement.clientTop,left:n.left+window.scrollX-document.documentElement.clientLeft}};function cE(e){"@babel/helpers - typeof";return cE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},cE(e)}function Y6(e,n){return ive(e)||ave(e,n)||nve(e,n)||rve()}function rve(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nve(e,n){if(e){if(typeof e=="string")return jV(e,n);var S=Object.prototype.toString.call(e).slice(8,-1);if(S==="Object"&&e.constructor&&(S=e.constructor.name),S==="Map"||S==="Set")return Array.from(e);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return jV(e,n)}}function jV(e,n){(n==null||n>e.length)&&(n=e.length);for(var S=0,L=new Array(n);S<n;S++)L[S]=e[S];return L}function ave(e,n){var S=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(S!=null){var L,re,ve,Ce,Be=[],Ge=!0,Ke=!1;try{if(ve=(S=S.call(e)).next,n===0){if(Object(S)!==S)return;Ge=!1}else for(;!(Ge=(L=ve.call(S)).done)&&(Be.push(L.value),Be.length!==n);Ge=!0);}catch(dt){Ke=!0,re=dt}finally{try{if(!Ge&&S.return!=null&&(Ce=S.return(),Object(Ce)!==Ce))return}finally{if(Ke)throw re}}return Be}}function ive(e){if(Array.isArray(e))return e}function ove(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function UV(e,n){for(var S=0;S<n.length;S++){var L=n[S];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(e,lve(L.key),L)}}function sve(e,n,S){return n&&UV(e.prototype,n),S&&UV(e,S),Object.defineProperty(e,"prototype",{writable:!1}),e}function lve(e){var n=uve(e,"string");return cE(n)=="symbol"?n:n+""}function uve(e,n){if(cE(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(cE(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var qV=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,VV=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,cve=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,fve=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,$Y={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},hve=Object.keys($Y),rT="NaN";function dve(e,n){return e*$Y[n]}var x6=(function(){function e(n,S){ove(this,e),this.num=n,this.unit=S,this.num=n,this.unit=S,Number.isNaN(n)&&(this.unit=""),S!==""&&!cve.test(S)&&(this.num=NaN,this.unit=""),hve.includes(S)&&(this.num=dve(n,S),this.unit="px")}return sve(e,[{key:"add",value:function(S){return this.unit!==S.unit?new e(NaN,""):new e(this.num+S.num,this.unit)}},{key:"subtract",value:function(S){return this.unit!==S.unit?new e(NaN,""):new e(this.num-S.num,this.unit)}},{key:"multiply",value:function(S){return this.unit!==""&&S.unit!==""&&this.unit!==S.unit?new e(NaN,""):new e(this.num*S.num,this.unit||S.unit)}},{key:"divide",value:function(S){return this.unit!==""&&S.unit!==""&&this.unit!==S.unit?new e(NaN,""):new e(this.num/S.num,this.unit||S.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],[{key:"parse",value:function(S){var L,re=(L=fve.exec(S))!==null&&L!==void 0?L:[],ve=Y6(re,3),Ce=ve[1],Be=ve[2];return new e(parseFloat(Ce),Be??"")}}])})();function KY(e){if(e.includes(rT))return rT;for(var n=e;n.includes("*")||n.includes("/");){var S,L=(S=qV.exec(n))!==null&&S!==void 0?S:[],re=Y6(L,4),ve=re[1],Ce=re[2],Be=re[3],Ge=x6.parse(ve??""),Ke=x6.parse(Be??""),dt=Ce==="*"?Ge.multiply(Ke):Ge.divide(Ke);if(dt.isNaN())return rT;n=n.replace(qV,dt.toString())}for(;n.includes("+")||/.-\d+(?:\.\d+)?/.test(n);){var gt,Vt=(gt=VV.exec(n))!==null&&gt!==void 0?gt:[],Xt=Y6(Vt,4),cr=Xt[1],sr=Xt[2],nr=Xt[3],zr=x6.parse(cr??""),Ne=x6.parse(nr??""),Jr=sr==="+"?zr.add(Ne):zr.subtract(Ne);if(Jr.isNaN())return rT;n=n.replace(VV,Jr.toString())}return n}var HV=/\(([^()]*)\)/;function vve(e){for(var n=e;n.includes("(");){var S=HV.exec(n),L=Y6(S,2),re=L[1];n=n.replace(HV,KY(re))}return n}function pve(e){var n=e.replace(/\s+/g,"");return n=vve(n),n=KY(n),n}function mve(e){try{return pve(e)}catch{return rT}}function eO(e){var n=mve(e.slice(5,-1));return n===rT?"":n}var gve=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],yve=["dx","dy","angle","className","breakAll"];function Sz(){return Sz=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var S=arguments[n];for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(e[L]=S[L])}return e},Sz.apply(this,arguments)}function GV(e,n){if(e==null)return{};var S=_ve(e,n),L,re;if(Object.getOwnPropertySymbols){var ve=Object.getOwnPropertySymbols(e);for(re=0;re<ve.length;re++)L=ve[re],!(n.indexOf(L)>=0)&&Object.prototype.propertyIsEnumerable.call(e,L)&&(S[L]=e[L])}return S}function _ve(e,n){if(e==null)return{};var S={};for(var L in e)if(Object.prototype.hasOwnProperty.call(e,L)){if(n.indexOf(L)>=0)continue;S[L]=e[L]}return S}function XV(e,n){return Tve(e)||wve(e,n)||bve(e,n)||xve()}function xve(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bve(e,n){if(e){if(typeof e=="string")return WV(e,n);var S=Object.prototype.toString.call(e).slice(8,-1);if(S==="Object"&&e.constructor&&(S=e.constructor.name),S==="Map"||S==="Set")return Array.from(e);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return WV(e,n)}}function WV(e,n){(n==null||n>e.length)&&(n=e.length);for(var S=0,L=new Array(n);S<n;S++)L[S]=e[S];return L}function wve(e,n){var S=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(S!=null){var L,re,ve,Ce,Be=[],Ge=!0,Ke=!1;try{if(ve=(S=S.call(e)).next,n===0){if(Object(S)!==S)return;Ge=!1}else for(;!(Ge=(L=ve.call(S)).done)&&(Be.push(L.value),Be.length!==n);Ge=!0);}catch(dt){Ke=!0,re=dt}finally{try{if(!Ge&&S.return!=null&&(Ce=S.return(),Object(Ce)!==Ce))return}finally{if(Ke)throw re}}return Be}}function Tve(e){if(Array.isArray(e))return e}var JY=/[ \f\n\r\t\v\u2028\u2029]+/,QY=function(n){var S=n.children,L=n.breakAll,re=n.style;try{var ve=[];Ru(S)||(L?ve=S.toString().split(""):ve=S.toString().split(JY));var Ce=ve.map(function(Ge){return{word:Ge,width:Z5(Ge,re).width}}),Be=L?0:Z5(" ",re).width;return{wordsWithComputedWidth:Ce,spaceWidth:Be}}catch{return null}},Ave=function(n,S,L,re,ve){var Ce=n.maxLines,Be=n.children,Ge=n.style,Ke=n.breakAll,dt=ys(Ce),gt=Be,Vt=function(){var da=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return da.reduce(function(ea,qa){var Ri=qa.word,mi=qa.width,Io=ea[ea.length-1];if(Io&&(re==null||ve||Io.width+mi+L<Number(re)))Io.words.push(Ri),Io.width+=mi+L;else{var ya={words:[Ri],width:mi};ea.push(ya)}return ea},[])},Xt=Vt(S),cr=function(da){return da.reduce(function(ea,qa){return ea.width>qa.width?ea:qa})};if(!dt)return Xt;for(var sr="…",nr=function(da){var ea=gt.slice(0,da),qa=QY({breakAll:Ke,style:Ge,children:ea+sr}).wordsWithComputedWidth,Ri=Vt(qa),mi=Ri.length>Ce||cr(Ri).width>Number(re);return[mi,Ri]},zr=0,Ne=gt.length-1,Jr=0,pn;zr<=Ne&&Jr<=gt.length-1;){var Lr=Math.floor((zr+Ne)/2),Or=Lr-1,cn=nr(Or),$n=XV(cn,2),xn=$n[0],Wa=$n[1],On=nr(Lr),qn=XV(On,1),ca=qn[0];if(!xn&&!ca&&(zr=Lr+1),xn&&ca&&(Ne=Lr-1),!xn&&ca){pn=Wa;break}Jr++}return pn||Xt},YV=function(n){var S=Ru(n)?[]:n.toString().split(JY);return[{words:S}]},Sve=function(n){var S=n.width,L=n.scaleToFit,re=n.children,ve=n.style,Ce=n.breakAll,Be=n.maxLines;if((S||L)&&!dx.isSsr){var Ge,Ke,dt=QY({breakAll:Ce,children:re,style:ve});if(dt){var gt=dt.wordsWithComputedWidth,Vt=dt.spaceWidth;Ge=gt,Ke=Vt}else return YV(re);return Ave({breakAll:Ce,children:re,maxLines:Be,style:ve},Ge,Ke,S,L)}return YV(re)},ZV="#808080",Z6=function(n){var S=n.x,L=S===void 0?0:S,re=n.y,ve=re===void 0?0:re,Ce=n.lineHeight,Be=Ce===void 0?"1em":Ce,Ge=n.capHeight,Ke=Ge===void 0?"0.71em":Ge,dt=n.scaleToFit,gt=dt===void 0?!1:dt,Vt=n.textAnchor,Xt=Vt===void 0?"start":Vt,cr=n.verticalAnchor,sr=cr===void 0?"end":cr,nr=n.fill,zr=nr===void 0?ZV:nr,Ne=GV(n,gve),Jr=na.useMemo(function(){return Sve({breakAll:Ne.breakAll,children:Ne.children,maxLines:Ne.maxLines,scaleToFit:gt,style:Ne.style,width:Ne.width})},[Ne.breakAll,Ne.children,Ne.maxLines,gt,Ne.style,Ne.width]),pn=Ne.dx,Lr=Ne.dy,Or=Ne.angle,cn=Ne.className,$n=Ne.breakAll,xn=GV(Ne,yve);if(!Ov(L)||!Ov(ve))return null;var Wa=L+(ys(pn)?pn:0),On=ve+(ys(Lr)?Lr:0),qn;switch(sr){case"start":qn=eO("calc(".concat(Ke,")"));break;case"middle":qn=eO("calc(".concat((Jr.length-1)/2," * -").concat(Be," + (").concat(Ke," / 2))"));break;default:qn=eO("calc(".concat(Jr.length-1," * -").concat(Be,")"));break}var ca=[];if(gt){var Fn=Jr[0].width,da=Ne.width;ca.push("scale(".concat((ys(da)?da/Fn:1)/Fn,")"))}return Or&&ca.push("rotate(".concat(Or,", ").concat(Wa,", ").concat(On,")")),ca.length&&(xn.transform=ca.join(" ")),la.createElement("text",Sz({},Fu(xn,!0),{x:Wa,y:On,className:kc("recharts-text",cn),textAnchor:Xt,fill:zr.includes("url")?ZV:zr}),Jr.map(function(ea,qa){var Ri=ea.words.join($n?"":" ");return la.createElement("tspan",{x:Wa,dy:qa===0?qn:Be,key:"".concat(Ri,"-").concat(qa)},Ri)}))};function lx(e,n){return e==null||n==null?NaN:e<n?-1:e>n?1:e>=n?0:NaN}function Eve(e,n){return e==null||n==null?NaN:n<e?-1:n>e?1:n>=e?0:NaN}function o9(e){let n,S,L;e.length!==2?(n=lx,S=(Be,Ge)=>lx(e(Be),Ge),L=(Be,Ge)=>e(Be)-Ge):(n=e===lx||e===Eve?e:Mve,S=e,L=e);function re(Be,Ge,Ke=0,dt=Be.length){if(Ke<dt){if(n(Ge,Ge)!==0)return dt;do{const gt=Ke+dt>>>1;S(Be[gt],Ge)<0?Ke=gt+1:dt=gt}while(Ke<dt)}return Ke}function ve(Be,Ge,Ke=0,dt=Be.length){if(Ke<dt){if(n(Ge,Ge)!==0)return dt;do{const gt=Ke+dt>>>1;S(Be[gt],Ge)<=0?Ke=gt+1:dt=gt}while(Ke<dt)}return Ke}function Ce(Be,Ge,Ke=0,dt=Be.length){const gt=re(Be,Ge,Ke,dt-1);return gt>Ke&&L(Be[gt-1],Ge)>-L(Be[gt],Ge)?gt-1:gt}return{left:re,center:Ce,right:ve}}function Mve(){return 0}function eZ(e){return e===null?NaN:+e}function*Cve(e,n){for(let S of e)S!=null&&(S=+S)>=S&&(yield S)}const kve=o9(lx),XE=kve.right;o9(eZ).center;class $V extends Map{constructor(n,S=Rve){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:S}}),n!=null)for(const[L,re]of n)this.set(L,re)}get(n){return super.get(KV(this,n))}has(n){return super.has(KV(this,n))}set(n,S){return super.set(Pve(this,n),S)}delete(n){return super.delete(Lve(this,n))}}function KV({_intern:e,_key:n},S){const L=n(S);return e.has(L)?e.get(L):S}function Pve({_intern:e,_key:n},S){const L=n(S);return e.has(L)?e.get(L):(e.set(L,S),S)}function Lve({_intern:e,_key:n},S){const L=n(S);return e.has(L)&&(S=e.get(L),e.delete(L)),S}function Rve(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Ive(e=lx){if(e===lx)return tZ;if(typeof e!="function")throw new TypeError("compare is not a function");return(n,S)=>{const L=e(n,S);return L||L===0?L:(e(S,S)===0)-(e(n,n)===0)}}function tZ(e,n){return(e==null||!(e>=e))-(n==null||!(n>=n))||(e<n?-1:e>n?1:0)}const Dve=Math.sqrt(50),Ove=Math.sqrt(10),zve=Math.sqrt(2);function $6(e,n,S){const L=(n-e)/Math.max(0,S),re=Math.floor(Math.log10(L)),ve=L/Math.pow(10,re),Ce=ve>=Dve?10:ve>=Ove?5:ve>=zve?2:1;let Be,Ge,Ke;return re<0?(Ke=Math.pow(10,-re)/Ce,Be=Math.round(e*Ke),Ge=Math.round(n*Ke),Be/Ke<e&&++Be,Ge/Ke>n&&--Ge,Ke=-Ke):(Ke=Math.pow(10,re)*Ce,Be=Math.round(e/Ke),Ge=Math.round(n/Ke),Be*Ke<e&&++Be,Ge*Ke>n&&--Ge),Ge<Be&&.5<=S&&S<2?$6(e,n,S*2):[Be,Ge,Ke]}function Ez(e,n,S){if(n=+n,e=+e,S=+S,!(S>0))return[];if(e===n)return[e];const L=n<e,[re,ve,Ce]=L?$6(n,e,S):$6(e,n,S);if(!(ve>=re))return[];const Be=ve-re+1,Ge=new Array(Be);if(L)if(Ce<0)for(let Ke=0;Ke<Be;++Ke)Ge[Ke]=(ve-Ke)/-Ce;else for(let Ke=0;Ke<Be;++Ke)Ge[Ke]=(ve-Ke)*Ce;else if(Ce<0)for(let Ke=0;Ke<Be;++Ke)Ge[Ke]=(re+Ke)/-Ce;else for(let Ke=0;Ke<Be;++Ke)Ge[Ke]=(re+Ke)*Ce;return Ge}function Mz(e,n,S){return n=+n,e=+e,S=+S,$6(e,n,S)[2]}function Cz(e,n,S){n=+n,e=+e,S=+S;const L=n<e,re=L?Mz(n,e,S):Mz(e,n,S);return(L?-1:1)*(re<0?1/-re:re)}function JV(e,n){let S;for(const L of e)L!=null&&(S<L||S===void 0&&L>=L)&&(S=L);return S}function QV(e,n){let S;for(const L of e)L!=null&&(S>L||S===void 0&&L>=L)&&(S=L);return S}function rZ(e,n,S=0,L=1/0,re){if(n=Math.floor(n),S=Math.floor(Math.max(0,S)),L=Math.floor(Math.min(e.length-1,L)),!(S<=n&&n<=L))return e;for(re=re===void 0?tZ:Ive(re);L>S;){if(L-S>600){const Ge=L-S+1,Ke=n-S+1,dt=Math.log(Ge),gt=.5*Math.exp(2*dt/3),Vt=.5*Math.sqrt(dt*gt*(Ge-gt)/Ge)*(Ke-Ge/2<0?-1:1),Xt=Math.max(S,Math.floor(n-Ke*gt/Ge+Vt)),cr=Math.min(L,Math.floor(n+(Ge-Ke)*gt/Ge+Vt));rZ(e,n,Xt,cr,re)}const ve=e[n];let Ce=S,Be=L;for(z5(e,S,n),re(e[L],ve)>0&&z5(e,S,L);Ce<Be;){for(z5(e,Ce,Be),++Ce,--Be;re(e[Ce],ve)<0;)++Ce;for(;re(e[Be],ve)>0;)--Be}re(e[S],ve)===0?z5(e,S,Be):(++Be,z5(e,Be,L)),Be<=n&&(S=Be+1),n<=Be&&(L=Be-1)}return e}function z5(e,n,S){const L=e[n];e[n]=e[S],e[S]=L}function Nve(e,n,S){if(e=Float64Array.from(Cve(e)),!(!(L=e.length)||isNaN(n=+n))){if(n<=0||L<2)return QV(e);if(n>=1)return JV(e);var L,re=(L-1)*n,ve=Math.floor(re),Ce=JV(rZ(e,ve).subarray(0,ve+1)),Be=QV(e.subarray(ve+1));return Ce+(Be-Ce)*(re-ve)}}function Fve(e,n,S=eZ){if(!(!(L=e.length)||isNaN(n=+n))){if(n<=0||L<2)return+S(e[0],0,e);if(n>=1)return+S(e[L-1],L-1,e);var L,re=(L-1)*n,ve=Math.floor(re),Ce=+S(e[ve],ve,e),Be=+S(e[ve+1],ve+1,e);return Ce+(Be-Ce)*(re-ve)}}function Bve(e,n,S){e=+e,n=+n,S=(re=arguments.length)<2?(n=e,e=0,1):re<3?1:+S;for(var L=-1,re=Math.max(0,Math.ceil((n-e)/S))|0,ve=new Array(re);++L<re;)ve[L]=e+L*S;return ve}function R0(e,n){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(n).domain(e);break}return this}function k1(e,n){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof n=="function"?this.interpolator(n):this.range(n);break}}return this}const kz=Symbol("implicit");function s9(){var e=new $V,n=[],S=[],L=kz;function re(ve){let Ce=e.get(ve);if(Ce===void 0){if(L!==kz)return L;e.set(ve,Ce=n.push(ve)-1)}return S[Ce%S.length]}return re.domain=function(ve){if(!arguments.length)return n.slice();n=[],e=new $V;for(const Ce of ve)e.has(Ce)||e.set(Ce,n.push(Ce)-1);return re},re.range=function(ve){return arguments.length?(S=Array.from(ve),re):S.slice()},re.unknown=function(ve){return arguments.length?(L=ve,re):L},re.copy=function(){return s9(n,S).unknown(L)},R0.apply(re,arguments),re}function fE(){var e=s9().unknown(void 0),n=e.domain,S=e.range,L=0,re=1,ve,Ce,Be=!1,Ge=0,Ke=0,dt=.5;delete e.unknown;function gt(){var Vt=n().length,Xt=re<L,cr=Xt?re:L,sr=Xt?L:re;ve=(sr-cr)/Math.max(1,Vt-Ge+Ke*2),Be&&(ve=Math.floor(ve)),cr+=(sr-cr-ve*(Vt-Ge))*dt,Ce=ve*(1-Ge),Be&&(cr=Math.round(cr),Ce=Math.round(Ce));var nr=Bve(Vt).map(function(zr){return cr+ve*zr});return S(Xt?nr.reverse():nr)}return e.domain=function(Vt){return arguments.length?(n(Vt),gt()):n()},e.range=function(Vt){return arguments.length?([L,re]=Vt,L=+L,re=+re,gt()):[L,re]},e.rangeRound=function(Vt){return[L,re]=Vt,L=+L,re=+re,Be=!0,gt()},e.bandwidth=function(){return Ce},e.step=function(){return ve},e.round=function(Vt){return arguments.length?(Be=!!Vt,gt()):Be},e.padding=function(Vt){return arguments.length?(Ge=Math.min(1,Ke=+Vt),gt()):Ge},e.paddingInner=function(Vt){return arguments.length?(Ge=Math.min(1,Vt),gt()):Ge},e.paddingOuter=function(Vt){return arguments.length?(Ke=+Vt,gt()):Ke},e.align=function(Vt){return arguments.length?(dt=Math.max(0,Math.min(1,Vt)),gt()):dt},e.copy=function(){return fE(n(),[L,re]).round(Be).paddingInner(Ge).paddingOuter(Ke).align(dt)},R0.apply(gt(),arguments)}function nZ(e){var n=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return nZ(n())},e}function $5(){return nZ(fE.apply(null,arguments).paddingInner(1))}function l9(e,n,S){e.prototype=n.prototype=S,S.constructor=e}function aZ(e,n){var S=Object.create(e.prototype);for(var L in n)S[L]=n[L];return S}function WE(){}var hE=.7,K6=1/hE,oT="\\s*([+-]?\\d+)\\s*",dE="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",vy="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",jve=/^#([0-9a-f]{3,8})$/,Uve=new RegExp(`^rgb\\(${oT},${oT},${oT}\\)$`),qve=new RegExp(`^rgb\\(${vy},${vy},${vy}\\)$`),Vve=new RegExp(`^rgba\\(${oT},${oT},${oT},${dE}\\)$`),Hve=new RegExp(`^rgba\\(${vy},${vy},${vy},${dE}\\)$`),Gve=new RegExp(`^hsl\\(${dE},${vy},${vy}\\)$`),Xve=new RegExp(`^hsla\\(${dE},${vy},${vy},${dE}\\)$`),eH={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};l9(WE,vE,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:tH,formatHex:tH,formatHex8:Wve,formatHsl:Yve,formatRgb:rH,toString:rH});function tH(){return this.rgb().formatHex()}function Wve(){return this.rgb().formatHex8()}function Yve(){return iZ(this).formatHsl()}function rH(){return this.rgb().formatRgb()}function vE(e){var n,S;return e=(e+"").trim().toLowerCase(),(n=jve.exec(e))?(S=n[1].length,n=parseInt(n[1],16),S===6?nH(n):S===3?new _m(n>>8&15|n>>4&240,n>>4&15|n&240,(n&15)<<4|n&15,1):S===8?b6(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):S===4?b6(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|n&240,((n&15)<<4|n&15)/255):null):(n=Uve.exec(e))?new _m(n[1],n[2],n[3],1):(n=qve.exec(e))?new _m(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=Vve.exec(e))?b6(n[1],n[2],n[3],n[4]):(n=Hve.exec(e))?b6(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=Gve.exec(e))?oH(n[1],n[2]/100,n[3]/100,1):(n=Xve.exec(e))?oH(n[1],n[2]/100,n[3]/100,n[4]):eH.hasOwnProperty(e)?nH(eH[e]):e==="transparent"?new _m(NaN,NaN,NaN,0):null}function nH(e){return new _m(e>>16&255,e>>8&255,e&255,1)}function b6(e,n,S,L){return L<=0&&(e=n=S=NaN),new _m(e,n,S,L)}function Zve(e){return e instanceof WE||(e=vE(e)),e?(e=e.rgb(),new _m(e.r,e.g,e.b,e.opacity)):new _m}function Pz(e,n,S,L){return arguments.length===1?Zve(e):new _m(e,n,S,L??1)}function _m(e,n,S,L){this.r=+e,this.g=+n,this.b=+S,this.opacity=+L}l9(_m,Pz,aZ(WE,{brighter(e){return e=e==null?K6:Math.pow(K6,e),new _m(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?hE:Math.pow(hE,e),new _m(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new _m(cw(this.r),cw(this.g),cw(this.b),J6(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:aH,formatHex:aH,formatHex8:$ve,formatRgb:iH,toString:iH}));function aH(){return`#${iw(this.r)}${iw(this.g)}${iw(this.b)}`}function $ve(){return`#${iw(this.r)}${iw(this.g)}${iw(this.b)}${iw((isNaN(this.opacity)?1:this.opacity)*255)}`}function iH(){const e=J6(this.opacity);return`${e===1?"rgb(":"rgba("}${cw(this.r)}, ${cw(this.g)}, ${cw(this.b)}${e===1?")":`, ${e})`}`}function J6(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function cw(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function iw(e){return e=cw(e),(e<16?"0":"")+e.toString(16)}function oH(e,n,S,L){return L<=0?e=n=S=NaN:S<=0||S>=1?e=n=NaN:n<=0&&(e=NaN),new hg(e,n,S,L)}function iZ(e){if(e instanceof hg)return new hg(e.h,e.s,e.l,e.opacity);if(e instanceof WE||(e=vE(e)),!e)return new hg;if(e instanceof hg)return e;e=e.rgb();var n=e.r/255,S=e.g/255,L=e.b/255,re=Math.min(n,S,L),ve=Math.max(n,S,L),Ce=NaN,Be=ve-re,Ge=(ve+re)/2;return Be?(n===ve?Ce=(S-L)/Be+(S<L)*6:S===ve?Ce=(L-n)/Be+2:Ce=(n-S)/Be+4,Be/=Ge<.5?ve+re:2-ve-re,Ce*=60):Be=Ge>0&&Ge<1?0:Ce,new hg(Ce,Be,Ge,e.opacity)}function Kve(e,n,S,L){return arguments.length===1?iZ(e):new hg(e,n,S,L??1)}function hg(e,n,S,L){this.h=+e,this.s=+n,this.l=+S,this.opacity=+L}l9(hg,Kve,aZ(WE,{brighter(e){return e=e==null?K6:Math.pow(K6,e),new hg(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?hE:Math.pow(hE,e),new hg(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,n=isNaN(e)||isNaN(this.s)?0:this.s,S=this.l,L=S+(S<.5?S:1-S)*n,re=2*S-L;return new _m(tO(e>=240?e-240:e+120,re,L),tO(e,re,L),tO(e<120?e+240:e-120,re,L),this.opacity)},clamp(){return new hg(sH(this.h),w6(this.s),w6(this.l),J6(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=J6(this.opacity);return`${e===1?"hsl(":"hsla("}${sH(this.h)}, ${w6(this.s)*100}%, ${w6(this.l)*100}%${e===1?")":`, ${e})`}`}}));function sH(e){return e=(e||0)%360,e<0?e+360:e}function w6(e){return Math.max(0,Math.min(1,e||0))}function tO(e,n,S){return(e<60?n+(S-n)*e/60:e<180?S:e<240?n+(S-n)*(240-e)/60:n)*255}const u9=e=>()=>e;function Jve(e,n){return function(S){return e+S*n}}function Qve(e,n,S){return e=Math.pow(e,S),n=Math.pow(n,S)-e,S=1/S,function(L){return Math.pow(e+L*n,S)}}function epe(e){return(e=+e)==1?oZ:function(n,S){return S-n?Qve(n,S,e):u9(isNaN(n)?S:n)}}function oZ(e,n){var S=n-e;return S?Jve(e,S):u9(isNaN(e)?n:e)}const lH=(function e(n){var S=epe(n);function L(re,ve){var Ce=S((re=Pz(re)).r,(ve=Pz(ve)).r),Be=S(re.g,ve.g),Ge=S(re.b,ve.b),Ke=oZ(re.opacity,ve.opacity);return function(dt){return re.r=Ce(dt),re.g=Be(dt),re.b=Ge(dt),re.opacity=Ke(dt),re+""}}return L.gamma=e,L})(1);function tpe(e,n){n||(n=[]);var S=e?Math.min(n.length,e.length):0,L=n.slice(),re;return function(ve){for(re=0;re<S;++re)L[re]=e[re]*(1-ve)+n[re]*ve;return L}}function rpe(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function npe(e,n){var S=n?n.length:0,L=e?Math.min(S,e.length):0,re=new Array(L),ve=new Array(S),Ce;for(Ce=0;Ce<L;++Ce)re[Ce]=UT(e[Ce],n[Ce]);for(;Ce<S;++Ce)ve[Ce]=n[Ce];return function(Be){for(Ce=0;Ce<L;++Ce)ve[Ce]=re[Ce](Be);return ve}}function ape(e,n){var S=new Date;return e=+e,n=+n,function(L){return S.setTime(e*(1-L)+n*L),S}}function Q6(e,n){return e=+e,n=+n,function(S){return e*(1-S)+n*S}}function ipe(e,n){var S={},L={},re;(e===null||typeof e!="object")&&(e={}),(n===null||typeof n!="object")&&(n={});for(re in n)re in e?S[re]=UT(e[re],n[re]):L[re]=n[re];return function(ve){for(re in S)L[re]=S[re](ve);return L}}var Lz=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,rO=new RegExp(Lz.source,"g");function ope(e){return function(){return e}}function spe(e){return function(n){return e(n)+""}}function lpe(e,n){var S=Lz.lastIndex=rO.lastIndex=0,L,re,ve,Ce=-1,Be=[],Ge=[];for(e=e+"",n=n+"";(L=Lz.exec(e))&&(re=rO.exec(n));)(ve=re.index)>S&&(ve=n.slice(S,ve),Be[Ce]?Be[Ce]+=ve:Be[++Ce]=ve),(L=L[0])===(re=re[0])?Be[Ce]?Be[Ce]+=re:Be[++Ce]=re:(Be[++Ce]=null,Ge.push({i:Ce,x:Q6(L,re)})),S=rO.lastIndex;return S<n.length&&(ve=n.slice(S),Be[Ce]?Be[Ce]+=ve:Be[++Ce]=ve),Be.length<2?Ge[0]?spe(Ge[0].x):ope(n):(n=Ge.length,function(Ke){for(var dt=0,gt;dt<n;++dt)Be[(gt=Ge[dt]).i]=gt.x(Ke);return Be.join("")})}function UT(e,n){var S=typeof n,L;return n==null||S==="boolean"?u9(n):(S==="number"?Q6:S==="string"?(L=vE(n))?(n=L,lH):lpe:n instanceof vE?lH:n instanceof Date?ape:rpe(n)?tpe:Array.isArray(n)?npe:typeof n.valueOf!="function"&&typeof n.toString!="function"||isNaN(n)?ipe:Q6)(e,n)}function c9(e,n){return e=+e,n=+n,function(S){return Math.round(e*(1-S)+n*S)}}function upe(e,n){n===void 0&&(n=e,e=UT);for(var S=0,L=n.length-1,re=n[0],ve=new Array(L<0?0:L);S<L;)ve[S]=e(re,re=n[++S]);return function(Ce){var Be=Math.max(0,Math.min(L-1,Math.floor(Ce*=L)));return ve[Be](Ce-Be)}}function cpe(e){return function(){return e}}function eP(e){return+e}var uH=[0,1];function nm(e){return e}function Rz(e,n){return(n-=e=+e)?function(S){return(S-e)/n}:cpe(isNaN(n)?NaN:.5)}function fpe(e,n){var S;return e>n&&(S=e,e=n,n=S),function(L){return Math.max(e,Math.min(n,L))}}function hpe(e,n,S){var L=e[0],re=e[1],ve=n[0],Ce=n[1];return re<L?(L=Rz(re,L),ve=S(Ce,ve)):(L=Rz(L,re),ve=S(ve,Ce)),function(Be){return ve(L(Be))}}function dpe(e,n,S){var L=Math.min(e.length,n.length)-1,re=new Array(L),ve=new Array(L),Ce=-1;for(e[L]<e[0]&&(e=e.slice().reverse(),n=n.slice().reverse());++Ce<L;)re[Ce]=Rz(e[Ce],e[Ce+1]),ve[Ce]=S(n[Ce],n[Ce+1]);return function(Be){var Ge=XE(e,Be,1,L)-1;return ve[Ge](re[Ge](Be))}}function YE(e,n){return n.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function nL(){var e=uH,n=uH,S=UT,L,re,ve,Ce=nm,Be,Ge,Ke;function dt(){var Vt=Math.min(e.length,n.length);return Ce!==nm&&(Ce=fpe(e[0],e[Vt-1])),Be=Vt>2?dpe:hpe,Ge=Ke=null,gt}function gt(Vt){return Vt==null||isNaN(Vt=+Vt)?ve:(Ge||(Ge=Be(e.map(L),n,S)))(L(Ce(Vt)))}return gt.invert=function(Vt){return Ce(re((Ke||(Ke=Be(n,e.map(L),Q6)))(Vt)))},gt.domain=function(Vt){return arguments.length?(e=Array.from(Vt,eP),dt()):e.slice()},gt.range=function(Vt){return arguments.length?(n=Array.from(Vt),dt()):n.slice()},gt.rangeRound=function(Vt){return n=Array.from(Vt),S=c9,dt()},gt.clamp=function(Vt){return arguments.length?(Ce=Vt?!0:nm,dt()):Ce!==nm},gt.interpolate=function(Vt){return arguments.length?(S=Vt,dt()):S},gt.unknown=function(Vt){return arguments.length?(ve=Vt,gt):ve},function(Vt,Xt){return L=Vt,re=Xt,dt()}}function f9(){return nL()(nm,nm)}function vpe(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function tP(e,n){if((S=(e=n?e.toExponential(n-1):e.toExponential()).indexOf("e"))<0)return null;var S,L=e.slice(0,S);return[L.length>1?L[0]+L.slice(2):L,+e.slice(S+1)]}function vT(e){return e=tP(Math.abs(e)),e?e[1]:NaN}function ppe(e,n){return function(S,L){for(var re=S.length,ve=[],Ce=0,Be=e[0],Ge=0;re>0&&Be>0&&(Ge+Be+1>L&&(Be=Math.max(1,L-Ge)),ve.push(S.substring(re-=Be,re+Be)),!((Ge+=Be+1)>L));)Be=e[Ce=(Ce+1)%e.length];return ve.reverse().join(n)}}function mpe(e){return function(n){return n.replace(/[0-9]/g,function(S){return e[+S]})}}var gpe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function pE(e){if(!(n=gpe.exec(e)))throw new Error("invalid format: "+e);var n;return new h9({fill:n[1],align:n[2],sign:n[3],symbol:n[4],zero:n[5],width:n[6],comma:n[7],precision:n[8]&&n[8].slice(1),trim:n[9],type:n[10]})}pE.prototype=h9.prototype;function h9(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}h9.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 ype(e){e:for(var n=e.length,S=1,L=-1,re;S<n;++S)switch(e[S]){case".":L=re=S;break;case"0":L===0&&(L=S),re=S;break;default:if(!+e[S])break e;L>0&&(L=0);break}return L>0?e.slice(0,L)+e.slice(re+1):e}var sZ;function _pe(e,n){var S=tP(e,n);if(!S)return e+"";var L=S[0],re=S[1],ve=re-(sZ=Math.max(-8,Math.min(8,Math.floor(re/3)))*3)+1,Ce=L.length;return ve===Ce?L:ve>Ce?L+new Array(ve-Ce+1).join("0"):ve>0?L.slice(0,ve)+"."+L.slice(ve):"0."+new Array(1-ve).join("0")+tP(e,Math.max(0,n+ve-1))[0]}function cH(e,n){var S=tP(e,n);if(!S)return e+"";var L=S[0],re=S[1];return re<0?"0."+new Array(-re).join("0")+L:L.length>re+1?L.slice(0,re+1)+"."+L.slice(re+1):L+new Array(re-L.length+2).join("0")}const fH={"%":(e,n)=>(e*100).toFixed(n),b:e=>Math.round(e).toString(2),c:e=>e+"",d:vpe,e:(e,n)=>e.toExponential(n),f:(e,n)=>e.toFixed(n),g:(e,n)=>e.toPrecision(n),o:e=>Math.round(e).toString(8),p:(e,n)=>cH(e*100,n),r:cH,s:_pe,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function hH(e){return e}var dH=Array.prototype.map,vH=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function xpe(e){var n=e.grouping===void 0||e.thousands===void 0?hH:ppe(dH.call(e.grouping,Number),e.thousands+""),S=e.currency===void 0?"":e.currency[0]+"",L=e.currency===void 0?"":e.currency[1]+"",re=e.decimal===void 0?".":e.decimal+"",ve=e.numerals===void 0?hH:mpe(dH.call(e.numerals,String)),Ce=e.percent===void 0?"%":e.percent+"",Be=e.minus===void 0?"−":e.minus+"",Ge=e.nan===void 0?"NaN":e.nan+"";function Ke(gt){gt=pE(gt);var Vt=gt.fill,Xt=gt.align,cr=gt.sign,sr=gt.symbol,nr=gt.zero,zr=gt.width,Ne=gt.comma,Jr=gt.precision,pn=gt.trim,Lr=gt.type;Lr==="n"?(Ne=!0,Lr="g"):fH[Lr]||(Jr===void 0&&(Jr=12),pn=!0,Lr="g"),(nr||Vt==="0"&&Xt==="=")&&(nr=!0,Vt="0",Xt="=");var Or=sr==="$"?S:sr==="#"&&/[boxX]/.test(Lr)?"0"+Lr.toLowerCase():"",cn=sr==="$"?L:/[%p]/.test(Lr)?Ce:"",$n=fH[Lr],xn=/[defgprs%]/.test(Lr);Jr=Jr===void 0?6:/[gprs]/.test(Lr)?Math.max(1,Math.min(21,Jr)):Math.max(0,Math.min(20,Jr));function Wa(On){var qn=Or,ca=cn,Fn,da,ea;if(Lr==="c")ca=$n(On)+ca,On="";else{On=+On;var qa=On<0||1/On<0;if(On=isNaN(On)?Ge:$n(Math.abs(On),Jr),pn&&(On=ype(On)),qa&&+On==0&&cr!=="+"&&(qa=!1),qn=(qa?cr==="("?cr:Be:cr==="-"||cr==="("?"":cr)+qn,ca=(Lr==="s"?vH[8+sZ/3]:"")+ca+(qa&&cr==="("?")":""),xn){for(Fn=-1,da=On.length;++Fn<da;)if(ea=On.charCodeAt(Fn),48>ea||ea>57){ca=(ea===46?re+On.slice(Fn+1):On.slice(Fn))+ca,On=On.slice(0,Fn);break}}}Ne&&!nr&&(On=n(On,1/0));var Ri=qn.length+On.length+ca.length,mi=Ri<zr?new Array(zr-Ri+1).join(Vt):"";switch(Ne&&nr&&(On=n(mi+On,mi.length?zr-ca.length:1/0),mi=""),Xt){case"<":On=qn+On+ca+mi;break;case"=":On=qn+mi+On+ca;break;case"^":On=mi.slice(0,Ri=mi.length>>1)+qn+On+ca+mi.slice(Ri);break;default:On=mi+qn+On+ca;break}return ve(On)}return Wa.toString=function(){return gt+""},Wa}function dt(gt,Vt){var Xt=Ke((gt=pE(gt),gt.type="f",gt)),cr=Math.max(-8,Math.min(8,Math.floor(vT(Vt)/3)))*3,sr=Math.pow(10,-cr),nr=vH[8+cr/3];return function(zr){return Xt(sr*zr)+nr}}return{format:Ke,formatPrefix:dt}}var T6,d9,lZ;bpe({thousands:",",grouping:[3],currency:["$",""]});function bpe(e){return T6=xpe(e),d9=T6.format,lZ=T6.formatPrefix,T6}function wpe(e){return Math.max(0,-vT(Math.abs(e)))}function Tpe(e,n){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(vT(n)/3)))*3-vT(Math.abs(e)))}function Ape(e,n){return e=Math.abs(e),n=Math.abs(n)-e,Math.max(0,vT(n)-vT(e))+1}function uZ(e,n,S,L){var re=Cz(e,n,S),ve;switch(L=pE(L??",f"),L.type){case"s":{var Ce=Math.max(Math.abs(e),Math.abs(n));return L.precision==null&&!isNaN(ve=Tpe(re,Ce))&&(L.precision=ve),lZ(L,Ce)}case"":case"e":case"g":case"p":case"r":{L.precision==null&&!isNaN(ve=Ape(re,Math.max(Math.abs(e),Math.abs(n))))&&(L.precision=ve-(L.type==="e"));break}case"f":case"%":{L.precision==null&&!isNaN(ve=wpe(re))&&(L.precision=ve-(L.type==="%")*2);break}}return d9(L)}function vx(e){var n=e.domain;return e.ticks=function(S){var L=n();return Ez(L[0],L[L.length-1],S??10)},e.tickFormat=function(S,L){var re=n();return uZ(re[0],re[re.length-1],S??10,L)},e.nice=function(S){S==null&&(S=10);var L=n(),re=0,ve=L.length-1,Ce=L[re],Be=L[ve],Ge,Ke,dt=10;for(Be<Ce&&(Ke=Ce,Ce=Be,Be=Ke,Ke=re,re=ve,ve=Ke);dt-- >0;){if(Ke=Mz(Ce,Be,S),Ke===Ge)return L[re]=Ce,L[ve]=Be,n(L);if(Ke>0)Ce=Math.floor(Ce/Ke)*Ke,Be=Math.ceil(Be/Ke)*Ke;else if(Ke<0)Ce=Math.ceil(Ce*Ke)/Ke,Be=Math.floor(Be*Ke)/Ke;else break;Ge=Ke}return e},e}function rP(){var e=f9();return e.copy=function(){return YE(e,rP())},R0.apply(e,arguments),vx(e)}function cZ(e){var n;function S(L){return L==null||isNaN(L=+L)?n:L}return S.invert=S,S.domain=S.range=function(L){return arguments.length?(e=Array.from(L,eP),S):e.slice()},S.unknown=function(L){return arguments.length?(n=L,S):n},S.copy=function(){return cZ(e).unknown(n)},e=arguments.length?Array.from(e,eP):[0,1],vx(S)}function fZ(e,n){e=e.slice();var S=0,L=e.length-1,re=e[S],ve=e[L],Ce;return ve<re&&(Ce=S,S=L,L=Ce,Ce=re,re=ve,ve=Ce),e[S]=n.floor(re),e[L]=n.ceil(ve),e}function pH(e){return Math.log(e)}function mH(e){return Math.exp(e)}function Spe(e){return-Math.log(-e)}function Epe(e){return-Math.exp(-e)}function Mpe(e){return isFinite(e)?+("1e"+e):e<0?0:e}function Cpe(e){return e===10?Mpe:e===Math.E?Math.exp:n=>Math.pow(e,n)}function kpe(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),n=>Math.log(n)/e)}function gH(e){return(n,S)=>-e(-n,S)}function v9(e){const n=e(pH,mH),S=n.domain;let L=10,re,ve;function Ce(){return re=kpe(L),ve=Cpe(L),S()[0]<0?(re=gH(re),ve=gH(ve),e(Spe,Epe)):e(pH,mH),n}return n.base=function(Be){return arguments.length?(L=+Be,Ce()):L},n.domain=function(Be){return arguments.length?(S(Be),Ce()):S()},n.ticks=Be=>{const Ge=S();let Ke=Ge[0],dt=Ge[Ge.length-1];const gt=dt<Ke;gt&&([Ke,dt]=[dt,Ke]);let Vt=re(Ke),Xt=re(dt),cr,sr;const nr=Be==null?10:+Be;let zr=[];if(!(L%1)&&Xt-Vt<nr){if(Vt=Math.floor(Vt),Xt=Math.ceil(Xt),Ke>0){for(;Vt<=Xt;++Vt)for(cr=1;cr<L;++cr)if(sr=Vt<0?cr/ve(-Vt):cr*ve(Vt),!(sr<Ke)){if(sr>dt)break;zr.push(sr)}}else for(;Vt<=Xt;++Vt)for(cr=L-1;cr>=1;--cr)if(sr=Vt>0?cr/ve(-Vt):cr*ve(Vt),!(sr<Ke)){if(sr>dt)break;zr.push(sr)}zr.length*2<nr&&(zr=Ez(Ke,dt,nr))}else zr=Ez(Vt,Xt,Math.min(Xt-Vt,nr)).map(ve);return gt?zr.reverse():zr},n.tickFormat=(Be,Ge)=>{if(Be==null&&(Be=10),Ge==null&&(Ge=L===10?"s":","),typeof Ge!="function"&&(!(L%1)&&(Ge=pE(Ge)).precision==null&&(Ge.trim=!0),Ge=d9(Ge)),Be===1/0)return Ge;const Ke=Math.max(1,L*Be/n.ticks().length);return dt=>{let gt=dt/ve(Math.round(re(dt)));return gt*L<L-.5&&(gt*=L),gt<=Ke?Ge(dt):""}},n.nice=()=>S(fZ(S(),{floor:Be=>ve(Math.floor(re(Be))),ceil:Be=>ve(Math.ceil(re(Be)))})),n}function hZ(){const e=v9(nL()).domain([1,10]);return e.copy=()=>YE(e,hZ()).base(e.base()),R0.apply(e,arguments),e}function yH(e){return function(n){return Math.sign(n)*Math.log1p(Math.abs(n/e))}}function _H(e){return function(n){return Math.sign(n)*Math.expm1(Math.abs(n))*e}}function p9(e){var n=1,S=e(yH(n),_H(n));return S.constant=function(L){return arguments.length?e(yH(n=+L),_H(n)):n},vx(S)}function dZ(){var e=p9(nL());return e.copy=function(){return YE(e,dZ()).constant(e.constant())},R0.apply(e,arguments)}function xH(e){return function(n){return n<0?-Math.pow(-n,e):Math.pow(n,e)}}function Ppe(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Lpe(e){return e<0?-e*e:e*e}function m9(e){var n=e(nm,nm),S=1;function L(){return S===1?e(nm,nm):S===.5?e(Ppe,Lpe):e(xH(S),xH(1/S))}return n.exponent=function(re){return arguments.length?(S=+re,L()):S},vx(n)}function g9(){var e=m9(nL());return e.copy=function(){return YE(e,g9()).exponent(e.exponent())},R0.apply(e,arguments),e}function Rpe(){return g9.apply(null,arguments).exponent(.5)}function bH(e){return Math.sign(e)*e*e}function Ipe(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function vZ(){var e=f9(),n=[0,1],S=!1,L;function re(ve){var Ce=Ipe(e(ve));return isNaN(Ce)?L:S?Math.round(Ce):Ce}return re.invert=function(ve){return e.invert(bH(ve))},re.domain=function(ve){return arguments.length?(e.domain(ve),re):e.domain()},re.range=function(ve){return arguments.length?(e.range((n=Array.from(ve,eP)).map(bH)),re):n.slice()},re.rangeRound=function(ve){return re.range(ve).round(!0)},re.round=function(ve){return arguments.length?(S=!!ve,re):S},re.clamp=function(ve){return arguments.length?(e.clamp(ve),re):e.clamp()},re.unknown=function(ve){return arguments.length?(L=ve,re):L},re.copy=function(){return vZ(e.domain(),n).round(S).clamp(e.clamp()).unknown(L)},R0.apply(re,arguments),vx(re)}function pZ(){var e=[],n=[],S=[],L;function re(){var Ce=0,Be=Math.max(1,n.length);for(S=new Array(Be-1);++Ce<Be;)S[Ce-1]=Fve(e,Ce/Be);return ve}function ve(Ce){return Ce==null||isNaN(Ce=+Ce)?L:n[XE(S,Ce)]}return ve.invertExtent=function(Ce){var Be=n.indexOf(Ce);return Be<0?[NaN,NaN]:[Be>0?S[Be-1]:e[0],Be<S.length?S[Be]:e[e.length-1]]},ve.domain=function(Ce){if(!arguments.length)return e.slice();e=[];for(let Be of Ce)Be!=null&&!isNaN(Be=+Be)&&e.push(Be);return e.sort(lx),re()},ve.range=function(Ce){return arguments.length?(n=Array.from(Ce),re()):n.slice()},ve.unknown=function(Ce){return arguments.length?(L=Ce,ve):L},ve.quantiles=function(){return S.slice()},ve.copy=function(){return pZ().domain(e).range(n).unknown(L)},R0.apply(ve,arguments)}function mZ(){var e=0,n=1,S=1,L=[.5],re=[0,1],ve;function Ce(Ge){return Ge!=null&&Ge<=Ge?re[XE(L,Ge,0,S)]:ve}function Be(){var Ge=-1;for(L=new Array(S);++Ge<S;)L[Ge]=((Ge+1)*n-(Ge-S)*e)/(S+1);return Ce}return Ce.domain=function(Ge){return arguments.length?([e,n]=Ge,e=+e,n=+n,Be()):[e,n]},Ce.range=function(Ge){return arguments.length?(S=(re=Array.from(Ge)).length-1,Be()):re.slice()},Ce.invertExtent=function(Ge){var Ke=re.indexOf(Ge);return Ke<0?[NaN,NaN]:Ke<1?[e,L[0]]:Ke>=S?[L[S-1],n]:[L[Ke-1],L[Ke]]},Ce.unknown=function(Ge){return arguments.length&&(ve=Ge),Ce},Ce.thresholds=function(){return L.slice()},Ce.copy=function(){return mZ().domain([e,n]).range(re).unknown(ve)},R0.apply(vx(Ce),arguments)}function gZ(){var e=[.5],n=[0,1],S,L=1;function re(ve){return ve!=null&&ve<=ve?n[XE(e,ve,0,L)]:S}return re.domain=function(ve){return arguments.length?(e=Array.from(ve),L=Math.min(e.length,n.length-1),re):e.slice()},re.range=function(ve){return arguments.length?(n=Array.from(ve),L=Math.min(e.length,n.length-1),re):n.slice()},re.invertExtent=function(ve){var Ce=n.indexOf(ve);return[e[Ce-1],e[Ce]]},re.unknown=function(ve){return arguments.length?(S=ve,re):S},re.copy=function(){return gZ().domain(e).range(n).unknown(S)},R0.apply(re,arguments)}const nO=new Date,aO=new Date;function Nv(e,n,S,L){function re(ve){return e(ve=arguments.length===0?new Date:new Date(+ve)),ve}return re.floor=ve=>(e(ve=new Date(+ve)),ve),re.ceil=ve=>(e(ve=new Date(ve-1)),n(ve,1),e(ve),ve),re.round=ve=>{const Ce=re(ve),Be=re.ceil(ve);return ve-Ce<Be-ve?Ce:Be},re.offset=(ve,Ce)=>(n(ve=new Date(+ve),Ce==null?1:Math.floor(Ce)),ve),re.range=(ve,Ce,Be)=>{const Ge=[];if(ve=re.ceil(ve),Be=Be==null?1:Math.floor(Be),!(ve<Ce)||!(Be>0))return Ge;let Ke;do Ge.push(Ke=new Date(+ve)),n(ve,Be),e(ve);while(Ke<ve&&ve<Ce);return Ge},re.filter=ve=>Nv(Ce=>{if(Ce>=Ce)for(;e(Ce),!ve(Ce);)Ce.setTime(Ce-1)},(Ce,Be)=>{if(Ce>=Ce)if(Be<0)for(;++Be<=0;)for(;n(Ce,-1),!ve(Ce););else for(;--Be>=0;)for(;n(Ce,1),!ve(Ce););}),S&&(re.count=(ve,Ce)=>(nO.setTime(+ve),aO.setTime(+Ce),e(nO),e(aO),Math.floor(S(nO,aO))),re.every=ve=>(ve=Math.floor(ve),!isFinite(ve)||!(ve>0)?null:ve>1?re.filter(L?Ce=>L(Ce)%ve===0:Ce=>re.count(0,Ce)%ve===0):re)),re}const nP=Nv(()=>{},(e,n)=>{e.setTime(+e+n)},(e,n)=>n-e);nP.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Nv(n=>{n.setTime(Math.floor(n/e)*e)},(n,S)=>{n.setTime(+n+S*e)},(n,S)=>(S-n)/e):nP);nP.range;const y1=1e3,k0=y1*60,_1=k0*60,A1=_1*24,y9=A1*7,wH=A1*30,iO=A1*365,ow=Nv(e=>{e.setTime(e-e.getMilliseconds())},(e,n)=>{e.setTime(+e+n*y1)},(e,n)=>(n-e)/y1,e=>e.getUTCSeconds());ow.range;const _9=Nv(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*y1)},(e,n)=>{e.setTime(+e+n*k0)},(e,n)=>(n-e)/k0,e=>e.getMinutes());_9.range;const x9=Nv(e=>{e.setUTCSeconds(0,0)},(e,n)=>{e.setTime(+e+n*k0)},(e,n)=>(n-e)/k0,e=>e.getUTCMinutes());x9.range;const b9=Nv(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*y1-e.getMinutes()*k0)},(e,n)=>{e.setTime(+e+n*_1)},(e,n)=>(n-e)/_1,e=>e.getHours());b9.range;const w9=Nv(e=>{e.setUTCMinutes(0,0,0)},(e,n)=>{e.setTime(+e+n*_1)},(e,n)=>(n-e)/_1,e=>e.getUTCHours());w9.range;const ZE=Nv(e=>e.setHours(0,0,0,0),(e,n)=>e.setDate(e.getDate()+n),(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*k0)/A1,e=>e.getDate()-1);ZE.range;const aL=Nv(e=>{e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n)},(e,n)=>(n-e)/A1,e=>e.getUTCDate()-1);aL.range;const yZ=Nv(e=>{e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n)},(e,n)=>(n-e)/A1,e=>Math.floor(e/A1));yZ.range;function Aw(e){return Nv(n=>{n.setDate(n.getDate()-(n.getDay()+7-e)%7),n.setHours(0,0,0,0)},(n,S)=>{n.setDate(n.getDate()+S*7)},(n,S)=>(S-n-(S.getTimezoneOffset()-n.getTimezoneOffset())*k0)/y9)}const iL=Aw(0),aP=Aw(1),Dpe=Aw(2),Ope=Aw(3),pT=Aw(4),zpe=Aw(5),Npe=Aw(6);iL.range;aP.range;Dpe.range;Ope.range;pT.range;zpe.range;Npe.range;function Sw(e){return Nv(n=>{n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-e)%7),n.setUTCHours(0,0,0,0)},(n,S)=>{n.setUTCDate(n.getUTCDate()+S*7)},(n,S)=>(S-n)/y9)}const oL=Sw(0),iP=Sw(1),Fpe=Sw(2),Bpe=Sw(3),mT=Sw(4),jpe=Sw(5),Upe=Sw(6);oL.range;iP.range;Fpe.range;Bpe.range;mT.range;jpe.range;Upe.range;const T9=Nv(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,n)=>{e.setMonth(e.getMonth()+n)},(e,n)=>n.getMonth()-e.getMonth()+(n.getFullYear()-e.getFullYear())*12,e=>e.getMonth());T9.range;const A9=Nv(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCMonth(e.getUTCMonth()+n)},(e,n)=>n.getUTCMonth()-e.getUTCMonth()+(n.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());A9.range;const S1=Nv(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n)},(e,n)=>n.getFullYear()-e.getFullYear(),e=>e.getFullYear());S1.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Nv(n=>{n.setFullYear(Math.floor(n.getFullYear()/e)*e),n.setMonth(0,1),n.setHours(0,0,0,0)},(n,S)=>{n.setFullYear(n.getFullYear()+S*e)});S1.range;const E1=Nv(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n)},(e,n)=>n.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());E1.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Nv(n=>{n.setUTCFullYear(Math.floor(n.getUTCFullYear()/e)*e),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)},(n,S)=>{n.setUTCFullYear(n.getUTCFullYear()+S*e)});E1.range;function _Z(e,n,S,L,re,ve){const Ce=[[ow,1,y1],[ow,5,5*y1],[ow,15,15*y1],[ow,30,30*y1],[ve,1,k0],[ve,5,5*k0],[ve,15,15*k0],[ve,30,30*k0],[re,1,_1],[re,3,3*_1],[re,6,6*_1],[re,12,12*_1],[L,1,A1],[L,2,2*A1],[S,1,y9],[n,1,wH],[n,3,3*wH],[e,1,iO]];function Be(Ke,dt,gt){const Vt=dt<Ke;Vt&&([Ke,dt]=[dt,Ke]);const Xt=gt&&typeof gt.range=="function"?gt:Ge(Ke,dt,gt),cr=Xt?Xt.range(Ke,+dt+1):[];return Vt?cr.reverse():cr}function Ge(Ke,dt,gt){const Vt=Math.abs(dt-Ke)/gt,Xt=o9(([,,nr])=>nr).right(Ce,Vt);if(Xt===Ce.length)return e.every(Cz(Ke/iO,dt/iO,gt));if(Xt===0)return nP.every(Math.max(Cz(Ke,dt,gt),1));const[cr,sr]=Ce[Vt/Ce[Xt-1][2]<Ce[Xt][2]/Vt?Xt-1:Xt];return cr.every(sr)}return[Be,Ge]}const[qpe,Vpe]=_Z(E1,A9,oL,yZ,w9,x9),[Hpe,Gpe]=_Z(S1,T9,iL,ZE,b9,_9);function oO(e){if(0<=e.y&&e.y<100){var n=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return n.setFullYear(e.y),n}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function sO(e){if(0<=e.y&&e.y<100){var n=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return n.setUTCFullYear(e.y),n}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function N5(e,n,S){return{y:e,m:n,d:S,H:0,M:0,S:0,L:0}}function Xpe(e){var n=e.dateTime,S=e.date,L=e.time,re=e.periods,ve=e.days,Ce=e.shortDays,Be=e.months,Ge=e.shortMonths,Ke=F5(re),dt=B5(re),gt=F5(ve),Vt=B5(ve),Xt=F5(Ce),cr=B5(Ce),sr=F5(Be),nr=B5(Be),zr=F5(Ge),Ne=B5(Ge),Jr={a:qa,A:Ri,b:mi,B:Io,c:null,d:CH,e:CH,f:pme,g:Sme,G:Mme,H:hme,I:dme,j:vme,L:xZ,m:mme,M:gme,p:ya,q:Wn,Q:LH,s:RH,S:yme,u:_me,U:xme,V:bme,w:wme,W:Tme,x:null,X:null,y:Ame,Y:Eme,Z:Cme,"%":PH},pn={a:Ei,A:$i,b:to,B:fi,c:null,d:kH,e:kH,f:Rme,g:qme,G:Hme,H:kme,I:Pme,j:Lme,L:wZ,m:Ime,M:Dme,p:bo,q:Ll,Q:LH,s:RH,S:Ome,u:zme,U:Nme,V:Fme,w:Bme,W:jme,x:null,X:null,y:Ume,Y:Vme,Z:Gme,"%":PH},Lr={a:Wa,A:On,b:qn,B:ca,c:Fn,d:EH,e:EH,f:lme,g:SH,G:AH,H:MH,I:MH,j:ame,L:sme,m:nme,M:ime,p:xn,q:rme,Q:cme,s:fme,S:ome,u:Kpe,U:Jpe,V:Qpe,w:$pe,W:eme,x:da,X:ea,y:SH,Y:AH,Z:tme,"%":ume};Jr.x=Or(S,Jr),Jr.X=Or(L,Jr),Jr.c=Or(n,Jr),pn.x=Or(S,pn),pn.X=Or(L,pn),pn.c=Or(n,pn);function Or(Mo,Hs){return function(qo){var Di=[],js=-1,Ha=0,El=Mo.length,ml,Vu,Gf;for(qo instanceof Date||(qo=new Date(+qo));++js<El;)Mo.charCodeAt(js)===37&&(Di.push(Mo.slice(Ha,js)),(Vu=TH[ml=Mo.charAt(++js)])!=null?ml=Mo.charAt(++js):Vu=ml==="e"?" ":"0",(Gf=Hs[ml])&&(ml=Gf(qo,Vu)),Di.push(ml),Ha=js+1);return Di.push(Mo.slice(Ha,js)),Di.join("")}}function cn(Mo,Hs){return function(qo){var Di=N5(1900,void 0,1),js=$n(Di,Mo,qo+="",0),Ha,El;if(js!=qo.length)return null;if("Q"in Di)return new Date(Di.Q);if("s"in Di)return new Date(Di.s*1e3+("L"in Di?Di.L:0));if(Hs&&!("Z"in Di)&&(Di.Z=0),"p"in Di&&(Di.H=Di.H%12+Di.p*12),Di.m===void 0&&(Di.m="q"in Di?Di.q:0),"V"in Di){if(Di.V<1||Di.V>53)return null;"w"in Di||(Di.w=1),"Z"in Di?(Ha=sO(N5(Di.y,0,1)),El=Ha.getUTCDay(),Ha=El>4||El===0?iP.ceil(Ha):iP(Ha),Ha=aL.offset(Ha,(Di.V-1)*7),Di.y=Ha.getUTCFullYear(),Di.m=Ha.getUTCMonth(),Di.d=Ha.getUTCDate()+(Di.w+6)%7):(Ha=oO(N5(Di.y,0,1)),El=Ha.getDay(),Ha=El>4||El===0?aP.ceil(Ha):aP(Ha),Ha=ZE.offset(Ha,(Di.V-1)*7),Di.y=Ha.getFullYear(),Di.m=Ha.getMonth(),Di.d=Ha.getDate()+(Di.w+6)%7)}else("W"in Di||"U"in Di)&&("w"in Di||(Di.w="u"in Di?Di.u%7:"W"in Di?1:0),El="Z"in Di?sO(N5(Di.y,0,1)).getUTCDay():oO(N5(Di.y,0,1)).getDay(),Di.m=0,Di.d="W"in Di?(Di.w+6)%7+Di.W*7-(El+5)%7:Di.w+Di.U*7-(El+6)%7);return"Z"in Di?(Di.H+=Di.Z/100|0,Di.M+=Di.Z%100,sO(Di)):oO(Di)}}function $n(Mo,Hs,qo,Di){for(var js=0,Ha=Hs.length,El=qo.length,ml,Vu;js<Ha;){if(Di>=El)return-1;if(ml=Hs.charCodeAt(js++),ml===37){if(ml=Hs.charAt(js++),Vu=Lr[ml in TH?Hs.charAt(js++):ml],!Vu||(Di=Vu(Mo,qo,Di))<0)return-1}else if(ml!=qo.charCodeAt(Di++))return-1}return Di}function xn(Mo,Hs,qo){var Di=Ke.exec(Hs.slice(qo));return Di?(Mo.p=dt.get(Di[0].toLowerCase()),qo+Di[0].length):-1}function Wa(Mo,Hs,qo){var Di=Xt.exec(Hs.slice(qo));return Di?(Mo.w=cr.get(Di[0].toLowerCase()),qo+Di[0].length):-1}function On(Mo,Hs,qo){var Di=gt.exec(Hs.slice(qo));return Di?(Mo.w=Vt.get(Di[0].toLowerCase()),qo+Di[0].length):-1}function qn(Mo,Hs,qo){var Di=zr.exec(Hs.slice(qo));return Di?(Mo.m=Ne.get(Di[0].toLowerCase()),qo+Di[0].length):-1}function ca(Mo,Hs,qo){var Di=sr.exec(Hs.slice(qo));return Di?(Mo.m=nr.get(Di[0].toLowerCase()),qo+Di[0].length):-1}function Fn(Mo,Hs,qo){return $n(Mo,n,Hs,qo)}function da(Mo,Hs,qo){return $n(Mo,S,Hs,qo)}function ea(Mo,Hs,qo){return $n(Mo,L,Hs,qo)}function qa(Mo){return Ce[Mo.getDay()]}function Ri(Mo){return ve[Mo.getDay()]}function mi(Mo){return Ge[Mo.getMonth()]}function Io(Mo){return Be[Mo.getMonth()]}function ya(Mo){return re[+(Mo.getHours()>=12)]}function Wn(Mo){return 1+~~(Mo.getMonth()/3)}function Ei(Mo){return Ce[Mo.getUTCDay()]}function $i(Mo){return ve[Mo.getUTCDay()]}function to(Mo){return Ge[Mo.getUTCMonth()]}function fi(Mo){return Be[Mo.getUTCMonth()]}function bo(Mo){return re[+(Mo.getUTCHours()>=12)]}function Ll(Mo){return 1+~~(Mo.getUTCMonth()/3)}return{format:function(Mo){var Hs=Or(Mo+="",Jr);return Hs.toString=function(){return Mo},Hs},parse:function(Mo){var Hs=cn(Mo+="",!1);return Hs.toString=function(){return Mo},Hs},utcFormat:function(Mo){var Hs=Or(Mo+="",pn);return Hs.toString=function(){return Mo},Hs},utcParse:function(Mo){var Hs=cn(Mo+="",!0);return Hs.toString=function(){return Mo},Hs}}}var TH={"-":"",_:" ",0:"0"},tp=/^\s*\d+/,Wpe=/^%/,Ype=/[\\^$*+?|[\]().{}]/g;function bf(e,n,S){var L=e<0?"-":"",re=(L?-e:e)+"",ve=re.length;return L+(ve<S?new Array(S-ve+1).join(n)+re:re)}function Zpe(e){return e.replace(Ype,"\\$&")}function F5(e){return new RegExp("^(?:"+e.map(Zpe).join("|")+")","i")}function B5(e){return new Map(e.map((n,S)=>[n.toLowerCase(),S]))}function $pe(e,n,S){var L=tp.exec(n.slice(S,S+1));return L?(e.w=+L[0],S+L[0].length):-1}function Kpe(e,n,S){var L=tp.exec(n.slice(S,S+1));return L?(e.u=+L[0],S+L[0].length):-1}function Jpe(e,n,S){var L=tp.exec(n.slice(S,S+2));return L?(e.U=+L[0],S+L[0].length):-1}function Qpe(e,n,S){var L=tp.exec(n.slice(S,S+2));return L?(e.V=+L[0],S+L[0].length):-1}function eme(e,n,S){var L=tp.exec(n.slice(S,S+2));return L?(e.W=+L[0],S+L[0].length):-1}function AH(e,n,S){var L=tp.exec(n.slice(S,S+4));return L?(e.y=+L[0],S+L[0].length):-1}function SH(e,n,S){var L=tp.exec(n.slice(S,S+2));return L?(e.y=+L[0]+(+L[0]>68?1900:2e3),S+L[0].length):-1}function tme(e,n,S){var L=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(n.slice(S,S+6));return L?(e.Z=L[1]?0:-(L[2]+(L[3]||"00")),S+L[0].length):-1}function rme(e,n,S){var L=tp.exec(n.slice(S,S+1));return L?(e.q=L[0]*3-3,S+L[0].length):-1}function nme(e,n,S){var L=tp.exec(n.slice(S,S+2));return L?(e.m=L[0]-1,S+L[0].length):-1}function EH(e,n,S){var L=tp.exec(n.slice(S,S+2));return L?(e.d=+L[0],S+L[0].length):-1}function ame(e,n,S){var L=tp.exec(n.slice(S,S+3));return L?(e.m=0,e.d=+L[0],S+L[0].length):-1}function MH(e,n,S){var L=tp.exec(n.slice(S,S+2));return L?(e.H=+L[0],S+L[0].length):-1}function ime(e,n,S){var L=tp.exec(n.slice(S,S+2));return L?(e.M=+L[0],S+L[0].length):-1}function ome(e,n,S){var L=tp.exec(n.slice(S,S+2));return L?(e.S=+L[0],S+L[0].length):-1}function sme(e,n,S){var L=tp.exec(n.slice(S,S+3));return L?(e.L=+L[0],S+L[0].length):-1}function lme(e,n,S){var L=tp.exec(n.slice(S,S+6));return L?(e.L=Math.floor(L[0]/1e3),S+L[0].length):-1}function ume(e,n,S){var L=Wpe.exec(n.slice(S,S+1));return L?S+L[0].length:-1}function cme(e,n,S){var L=tp.exec(n.slice(S));return L?(e.Q=+L[0],S+L[0].length):-1}function fme(e,n,S){var L=tp.exec(n.slice(S));return L?(e.s=+L[0],S+L[0].length):-1}function CH(e,n){return bf(e.getDate(),n,2)}function hme(e,n){return bf(e.getHours(),n,2)}function dme(e,n){return bf(e.getHours()%12||12,n,2)}function vme(e,n){return bf(1+ZE.count(S1(e),e),n,3)}function xZ(e,n){return bf(e.getMilliseconds(),n,3)}function pme(e,n){return xZ(e,n)+"000"}function mme(e,n){return bf(e.getMonth()+1,n,2)}function gme(e,n){return bf(e.getMinutes(),n,2)}function yme(e,n){return bf(e.getSeconds(),n,2)}function _me(e){var n=e.getDay();return n===0?7:n}function xme(e,n){return bf(iL.count(S1(e)-1,e),n,2)}function bZ(e){var n=e.getDay();return n>=4||n===0?pT(e):pT.ceil(e)}function bme(e,n){return e=bZ(e),bf(pT.count(S1(e),e)+(S1(e).getDay()===4),n,2)}function wme(e){return e.getDay()}function Tme(e,n){return bf(aP.count(S1(e)-1,e),n,2)}function Ame(e,n){return bf(e.getFullYear()%100,n,2)}function Sme(e,n){return e=bZ(e),bf(e.getFullYear()%100,n,2)}function Eme(e,n){return bf(e.getFullYear()%1e4,n,4)}function Mme(e,n){var S=e.getDay();return e=S>=4||S===0?pT(e):pT.ceil(e),bf(e.getFullYear()%1e4,n,4)}function Cme(e){var n=e.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+bf(n/60|0,"0",2)+bf(n%60,"0",2)}function kH(e,n){return bf(e.getUTCDate(),n,2)}function kme(e,n){return bf(e.getUTCHours(),n,2)}function Pme(e,n){return bf(e.getUTCHours()%12||12,n,2)}function Lme(e,n){return bf(1+aL.count(E1(e),e),n,3)}function wZ(e,n){return bf(e.getUTCMilliseconds(),n,3)}function Rme(e,n){return wZ(e,n)+"000"}function Ime(e,n){return bf(e.getUTCMonth()+1,n,2)}function Dme(e,n){return bf(e.getUTCMinutes(),n,2)}function Ome(e,n){return bf(e.getUTCSeconds(),n,2)}function zme(e){var n=e.getUTCDay();return n===0?7:n}function Nme(e,n){return bf(oL.count(E1(e)-1,e),n,2)}function TZ(e){var n=e.getUTCDay();return n>=4||n===0?mT(e):mT.ceil(e)}function Fme(e,n){return e=TZ(e),bf(mT.count(E1(e),e)+(E1(e).getUTCDay()===4),n,2)}function Bme(e){return e.getUTCDay()}function jme(e,n){return bf(iP.count(E1(e)-1,e),n,2)}function Ume(e,n){return bf(e.getUTCFullYear()%100,n,2)}function qme(e,n){return e=TZ(e),bf(e.getUTCFullYear()%100,n,2)}function Vme(e,n){return bf(e.getUTCFullYear()%1e4,n,4)}function Hme(e,n){var S=e.getUTCDay();return e=S>=4||S===0?mT(e):mT.ceil(e),bf(e.getUTCFullYear()%1e4,n,4)}function Gme(){return"+0000"}function PH(){return"%"}function LH(e){return+e}function RH(e){return Math.floor(+e/1e3)}var Q3,AZ,SZ;Xme({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 Xme(e){return Q3=Xpe(e),AZ=Q3.format,Q3.parse,SZ=Q3.utcFormat,Q3.utcParse,Q3}function Wme(e){return new Date(e)}function Yme(e){return e instanceof Date?+e:+new Date(+e)}function S9(e,n,S,L,re,ve,Ce,Be,Ge,Ke){var dt=f9(),gt=dt.invert,Vt=dt.domain,Xt=Ke(".%L"),cr=Ke(":%S"),sr=Ke("%I:%M"),nr=Ke("%I %p"),zr=Ke("%a %d"),Ne=Ke("%b %d"),Jr=Ke("%B"),pn=Ke("%Y");function Lr(Or){return(Ge(Or)<Or?Xt:Be(Or)<Or?cr:Ce(Or)<Or?sr:ve(Or)<Or?nr:L(Or)<Or?re(Or)<Or?zr:Ne:S(Or)<Or?Jr:pn)(Or)}return dt.invert=function(Or){return new Date(gt(Or))},dt.domain=function(Or){return arguments.length?Vt(Array.from(Or,Yme)):Vt().map(Wme)},dt.ticks=function(Or){var cn=Vt();return e(cn[0],cn[cn.length-1],Or??10)},dt.tickFormat=function(Or,cn){return cn==null?Lr:Ke(cn)},dt.nice=function(Or){var cn=Vt();return(!Or||typeof Or.range!="function")&&(Or=n(cn[0],cn[cn.length-1],Or??10)),Or?Vt(fZ(cn,Or)):dt},dt.copy=function(){return YE(dt,S9(e,n,S,L,re,ve,Ce,Be,Ge,Ke))},dt}function Zme(){return R0.apply(S9(Hpe,Gpe,S1,T9,iL,ZE,b9,_9,ow,AZ).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function $me(){return R0.apply(S9(qpe,Vpe,E1,A9,oL,aL,w9,x9,ow,SZ).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function sL(){var e=0,n=1,S,L,re,ve,Ce=nm,Be=!1,Ge;function Ke(gt){return gt==null||isNaN(gt=+gt)?Ge:Ce(re===0?.5:(gt=(ve(gt)-S)*re,Be?Math.max(0,Math.min(1,gt)):gt))}Ke.domain=function(gt){return arguments.length?([e,n]=gt,S=ve(e=+e),L=ve(n=+n),re=S===L?0:1/(L-S),Ke):[e,n]},Ke.clamp=function(gt){return arguments.length?(Be=!!gt,Ke):Be},Ke.interpolator=function(gt){return arguments.length?(Ce=gt,Ke):Ce};function dt(gt){return function(Vt){var Xt,cr;return arguments.length?([Xt,cr]=Vt,Ce=gt(Xt,cr),Ke):[Ce(0),Ce(1)]}}return Ke.range=dt(UT),Ke.rangeRound=dt(c9),Ke.unknown=function(gt){return arguments.length?(Ge=gt,Ke):Ge},function(gt){return ve=gt,S=gt(e),L=gt(n),re=S===L?0:1/(L-S),Ke}}function px(e,n){return n.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function EZ(){var e=vx(sL()(nm));return e.copy=function(){return px(e,EZ())},k1.apply(e,arguments)}function MZ(){var e=v9(sL()).domain([1,10]);return e.copy=function(){return px(e,MZ()).base(e.base())},k1.apply(e,arguments)}function CZ(){var e=p9(sL());return e.copy=function(){return px(e,CZ()).constant(e.constant())},k1.apply(e,arguments)}function E9(){var e=m9(sL());return e.copy=function(){return px(e,E9()).exponent(e.exponent())},k1.apply(e,arguments)}function Kme(){return E9.apply(null,arguments).exponent(.5)}function kZ(){var e=[],n=nm;function S(L){if(L!=null&&!isNaN(L=+L))return n((XE(e,L,1)-1)/(e.length-1))}return S.domain=function(L){if(!arguments.length)return e.slice();e=[];for(let re of L)re!=null&&!isNaN(re=+re)&&e.push(re);return e.sort(lx),S},S.interpolator=function(L){return arguments.length?(n=L,S):n},S.range=function(){return e.map((L,re)=>n(re/(e.length-1)))},S.quantiles=function(L){return Array.from({length:L+1},(re,ve)=>Nve(e,ve/L))},S.copy=function(){return kZ(n).domain(e)},k1.apply(S,arguments)}function lL(){var e=0,n=.5,S=1,L=1,re,ve,Ce,Be,Ge,Ke=nm,dt,gt=!1,Vt;function Xt(sr){return isNaN(sr=+sr)?Vt:(sr=.5+((sr=+dt(sr))-ve)*(L*sr<L*ve?Be:Ge),Ke(gt?Math.max(0,Math.min(1,sr)):sr))}Xt.domain=function(sr){return arguments.length?([e,n,S]=sr,re=dt(e=+e),ve=dt(n=+n),Ce=dt(S=+S),Be=re===ve?0:.5/(ve-re),Ge=ve===Ce?0:.5/(Ce-ve),L=ve<re?-1:1,Xt):[e,n,S]},Xt.clamp=function(sr){return arguments.length?(gt=!!sr,Xt):gt},Xt.interpolator=function(sr){return arguments.length?(Ke=sr,Xt):Ke};function cr(sr){return function(nr){var zr,Ne,Jr;return arguments.length?([zr,Ne,Jr]=nr,Ke=upe(sr,[zr,Ne,Jr]),Xt):[Ke(0),Ke(.5),Ke(1)]}}return Xt.range=cr(UT),Xt.rangeRound=cr(c9),Xt.unknown=function(sr){return arguments.length?(Vt=sr,Xt):Vt},function(sr){return dt=sr,re=sr(e),ve=sr(n),Ce=sr(S),Be=re===ve?0:.5/(ve-re),Ge=ve===Ce?0:.5/(Ce-ve),L=ve<re?-1:1,Xt}}function PZ(){var e=vx(lL()(nm));return e.copy=function(){return px(e,PZ())},k1.apply(e,arguments)}function LZ(){var e=v9(lL()).domain([.1,1,10]);return e.copy=function(){return px(e,LZ()).base(e.base())},k1.apply(e,arguments)}function RZ(){var e=p9(lL());return e.copy=function(){return px(e,RZ()).constant(e.constant())},k1.apply(e,arguments)}function M9(){var e=m9(lL());return e.copy=function(){return px(e,M9()).exponent(e.exponent())},k1.apply(e,arguments)}function Jme(){return M9.apply(null,arguments).exponent(.5)}const IH=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:fE,scaleDiverging:PZ,scaleDivergingLog:LZ,scaleDivergingPow:M9,scaleDivergingSqrt:Jme,scaleDivergingSymlog:RZ,scaleIdentity:cZ,scaleImplicit:kz,scaleLinear:rP,scaleLog:hZ,scaleOrdinal:s9,scalePoint:$5,scalePow:g9,scaleQuantile:pZ,scaleQuantize:mZ,scaleRadial:vZ,scaleSequential:EZ,scaleSequentialLog:MZ,scaleSequentialPow:E9,scaleSequentialQuantile:kZ,scaleSequentialSqrt:Kme,scaleSequentialSymlog:CZ,scaleSqrt:Rpe,scaleSymlog:dZ,scaleThreshold:gZ,scaleTime:Zme,scaleUtc:$me,tickFormat:uZ},Symbol.toStringTag,{value:"Module"}));var lO,DH;function IZ(){if(DH)return lO;DH=1;var e=NT();function n(S,L,re){for(var ve=-1,Ce=S.length;++ve<Ce;){var Be=S[ve],Ge=L(Be);if(Ge!=null&&(Ke===void 0?Ge===Ge&&!e(Ge):re(Ge,Ke)))var Ke=Ge,dt=Be}return dt}return lO=n,lO}var uO,OH;function Qme(){if(OH)return uO;OH=1;function e(n,S){return n>S}return uO=e,uO}var cO,zH;function e0e(){if(zH)return cO;zH=1;var e=IZ(),n=Qme(),S=jT();function L(re){return re&&re.length?e(re,S,n):void 0}return cO=L,cO}var t0e=e0e();const ax=ih(t0e);var fO,NH;function r0e(){if(NH)return fO;NH=1;function e(n,S){return n<S}return fO=e,fO}var hO,FH;function n0e(){if(FH)return hO;FH=1;var e=IZ(),n=r0e(),S=jT();function L(re){return re&&re.length?e(re,S,n):void 0}return hO=L,hO}var a0e=n0e();const uL=ih(a0e);var dO,BH;function i0e(){if(BH)return dO;BH=1;var e=V7(),n=hx(),S=qY(),L=Tm();function re(ve,Ce){var Be=L(ve)?e:S;return Be(ve,n(Ce,3))}return dO=re,dO}var vO,jH;function o0e(){if(jH)return vO;jH=1;var e=jY(),n=i0e();function S(L,re){return e(n(L,re),1)}return vO=S,vO}var s0e=o0e();const l0e=ih(s0e);var pO,UH;function u0e(){if(UH)return pO;UH=1;var e=t9();function n(S,L){return e(S,L)}return pO=n,pO}var c0e=u0e();const yw=ih(c0e);var qT=1e9,f0e={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},k9,nd=!0,L0="[DecimalError] ",fw=L0+"Invalid argument: ",C9=L0+"Exponent out of range: ",VT=Math.floor,tw=Math.pow,h0e=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,e0,ep=1e7,Hh=7,DZ=9007199254740991,oP=VT(DZ/Hh),fl={};fl.absoluteValue=fl.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};fl.comparedTo=fl.cmp=function(e){var n,S,L,re,ve=this;if(e=new ve.constructor(e),ve.s!==e.s)return ve.s||-e.s;if(ve.e!==e.e)return ve.e>e.e^ve.s<0?1:-1;for(L=ve.d.length,re=e.d.length,n=0,S=L<re?L:re;n<S;++n)if(ve.d[n]!==e.d[n])return ve.d[n]>e.d[n]^ve.s<0?1:-1;return L===re?0:L>re^ve.s<0?1:-1};fl.decimalPlaces=fl.dp=function(){var e=this,n=e.d.length-1,S=(n-e.e)*Hh;if(n=e.d[n],n)for(;n%10==0;n/=10)S--;return S<0?0:S};fl.dividedBy=fl.div=function(e){return T1(this,new this.constructor(e))};fl.dividedToIntegerBy=fl.idiv=function(e){var n=this,S=n.constructor;return bh(T1(n,new S(e),0,1),S.precision)};fl.equals=fl.eq=function(e){return!this.cmp(e)};fl.exponent=function(){return _v(this)};fl.greaterThan=fl.gt=function(e){return this.cmp(e)>0};fl.greaterThanOrEqualTo=fl.gte=function(e){return this.cmp(e)>=0};fl.isInteger=fl.isint=function(){return this.e>this.d.length-2};fl.isNegative=fl.isneg=function(){return this.s<0};fl.isPositive=fl.ispos=function(){return this.s>0};fl.isZero=function(){return this.s===0};fl.lessThan=fl.lt=function(e){return this.cmp(e)<0};fl.lessThanOrEqualTo=fl.lte=function(e){return this.cmp(e)<1};fl.logarithm=fl.log=function(e){var n,S=this,L=S.constructor,re=L.precision,ve=re+5;if(e===void 0)e=new L(10);else if(e=new L(e),e.s<1||e.eq(e0))throw Error(L0+"NaN");if(S.s<1)throw Error(L0+(S.s?"NaN":"-Infinity"));return S.eq(e0)?new L(0):(nd=!1,n=T1(mE(S,ve),mE(e,ve),ve),nd=!0,bh(n,re))};fl.minus=fl.sub=function(e){var n=this;return e=new n.constructor(e),n.s==e.s?NZ(n,e):OZ(n,(e.s=-e.s,e))};fl.modulo=fl.mod=function(e){var n,S=this,L=S.constructor,re=L.precision;if(e=new L(e),!e.s)throw Error(L0+"NaN");return S.s?(nd=!1,n=T1(S,e,0,1).times(e),nd=!0,S.minus(n)):bh(new L(S),re)};fl.naturalExponential=fl.exp=function(){return zZ(this)};fl.naturalLogarithm=fl.ln=function(){return mE(this)};fl.negated=fl.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};fl.plus=fl.add=function(e){var n=this;return e=new n.constructor(e),n.s==e.s?OZ(n,e):NZ(n,(e.s=-e.s,e))};fl.precision=fl.sd=function(e){var n,S,L,re=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(fw+e);if(n=_v(re)+1,L=re.d.length-1,S=L*Hh+1,L=re.d[L],L){for(;L%10==0;L/=10)S--;for(L=re.d[0];L>=10;L/=10)S++}return e&&n>S?n:S};fl.squareRoot=fl.sqrt=function(){var e,n,S,L,re,ve,Ce,Be=this,Ge=Be.constructor;if(Be.s<1){if(!Be.s)return new Ge(0);throw Error(L0+"NaN")}for(e=_v(Be),nd=!1,re=Math.sqrt(+Be),re==0||re==1/0?(n=fy(Be.d),(n.length+e)%2==0&&(n+="0"),re=Math.sqrt(n),e=VT((e+1)/2)-(e<0||e%2),re==1/0?n="5e"+e:(n=re.toExponential(),n=n.slice(0,n.indexOf("e")+1)+e),L=new Ge(n)):L=new Ge(re.toString()),S=Ge.precision,re=Ce=S+3;;)if(ve=L,L=ve.plus(T1(Be,ve,Ce+2)).times(.5),fy(ve.d).slice(0,Ce)===(n=fy(L.d)).slice(0,Ce)){if(n=n.slice(Ce-3,Ce+1),re==Ce&&n=="4999"){if(bh(ve,S+1,0),ve.times(ve).eq(Be)){L=ve;break}}else if(n!="9999")break;Ce+=4}return nd=!0,bh(L,S)};fl.times=fl.mul=function(e){var n,S,L,re,ve,Ce,Be,Ge,Ke,dt=this,gt=dt.constructor,Vt=dt.d,Xt=(e=new gt(e)).d;if(!dt.s||!e.s)return new gt(0);for(e.s*=dt.s,S=dt.e+e.e,Ge=Vt.length,Ke=Xt.length,Ge<Ke&&(ve=Vt,Vt=Xt,Xt=ve,Ce=Ge,Ge=Ke,Ke=Ce),ve=[],Ce=Ge+Ke,L=Ce;L--;)ve.push(0);for(L=Ke;--L>=0;){for(n=0,re=Ge+L;re>L;)Be=ve[re]+Xt[L]*Vt[re-L-1]+n,ve[re--]=Be%ep|0,n=Be/ep|0;ve[re]=(ve[re]+n)%ep|0}for(;!ve[--Ce];)ve.pop();return n?++S:ve.shift(),e.d=ve,e.e=S,nd?bh(e,gt.precision):e};fl.toDecimalPlaces=fl.todp=function(e,n){var S=this,L=S.constructor;return S=new L(S),e===void 0?S:(gy(e,0,qT),n===void 0?n=L.rounding:gy(n,0,8),bh(S,e+_v(S)+1,n))};fl.toExponential=function(e,n){var S,L=this,re=L.constructor;return e===void 0?S=_w(L,!0):(gy(e,0,qT),n===void 0?n=re.rounding:gy(n,0,8),L=bh(new re(L),e+1,n),S=_w(L,!0,e+1)),S};fl.toFixed=function(e,n){var S,L,re=this,ve=re.constructor;return e===void 0?_w(re):(gy(e,0,qT),n===void 0?n=ve.rounding:gy(n,0,8),L=bh(new ve(re),e+_v(re)+1,n),S=_w(L.abs(),!1,e+_v(L)+1),re.isneg()&&!re.isZero()?"-"+S:S)};fl.toInteger=fl.toint=function(){var e=this,n=e.constructor;return bh(new n(e),_v(e)+1,n.rounding)};fl.toNumber=function(){return+this};fl.toPower=fl.pow=function(e){var n,S,L,re,ve,Ce,Be=this,Ge=Be.constructor,Ke=12,dt=+(e=new Ge(e));if(!e.s)return new Ge(e0);if(Be=new Ge(Be),!Be.s){if(e.s<1)throw Error(L0+"Infinity");return Be}if(Be.eq(e0))return Be;if(L=Ge.precision,e.eq(e0))return bh(Be,L);if(n=e.e,S=e.d.length-1,Ce=n>=S,ve=Be.s,Ce){if((S=dt<0?-dt:dt)<=DZ){for(re=new Ge(e0),n=Math.ceil(L/Hh+4),nd=!1;S%2&&(re=re.times(Be),VH(re.d,n)),S=VT(S/2),S!==0;)Be=Be.times(Be),VH(Be.d,n);return nd=!0,e.s<0?new Ge(e0).div(re):bh(re,L)}}else if(ve<0)throw Error(L0+"NaN");return ve=ve<0&&e.d[Math.max(n,S)]&1?-1:1,Be.s=1,nd=!1,re=e.times(mE(Be,L+Ke)),nd=!0,re=zZ(re),re.s=ve,re};fl.toPrecision=function(e,n){var S,L,re=this,ve=re.constructor;return e===void 0?(S=_v(re),L=_w(re,S<=ve.toExpNeg||S>=ve.toExpPos)):(gy(e,1,qT),n===void 0?n=ve.rounding:gy(n,0,8),re=bh(new ve(re),e,n),S=_v(re),L=_w(re,e<=S||S<=ve.toExpNeg,e)),L};fl.toSignificantDigits=fl.tosd=function(e,n){var S=this,L=S.constructor;return e===void 0?(e=L.precision,n=L.rounding):(gy(e,1,qT),n===void 0?n=L.rounding:gy(n,0,8)),bh(new L(S),e,n)};fl.toString=fl.valueOf=fl.val=fl.toJSON=fl[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,n=_v(e),S=e.constructor;return _w(e,n<=S.toExpNeg||n>=S.toExpPos)};function OZ(e,n){var S,L,re,ve,Ce,Be,Ge,Ke,dt=e.constructor,gt=dt.precision;if(!e.s||!n.s)return n.s||(n=new dt(e)),nd?bh(n,gt):n;if(Ge=e.d,Ke=n.d,Ce=e.e,re=n.e,Ge=Ge.slice(),ve=Ce-re,ve){for(ve<0?(L=Ge,ve=-ve,Be=Ke.length):(L=Ke,re=Ce,Be=Ge.length),Ce=Math.ceil(gt/Hh),Be=Ce>Be?Ce+1:Be+1,ve>Be&&(ve=Be,L.length=1),L.reverse();ve--;)L.push(0);L.reverse()}for(Be=Ge.length,ve=Ke.length,Be-ve<0&&(ve=Be,L=Ke,Ke=Ge,Ge=L),S=0;ve;)S=(Ge[--ve]=Ge[ve]+Ke[ve]+S)/ep|0,Ge[ve]%=ep;for(S&&(Ge.unshift(S),++re),Be=Ge.length;Ge[--Be]==0;)Ge.pop();return n.d=Ge,n.e=re,nd?bh(n,gt):n}function gy(e,n,S){if(e!==~~e||e<n||e>S)throw Error(fw+e)}function fy(e){var n,S,L,re=e.length-1,ve="",Ce=e[0];if(re>0){for(ve+=Ce,n=1;n<re;n++)L=e[n]+"",S=Hh-L.length,S&&(ve+=rx(S)),ve+=L;Ce=e[n],L=Ce+"",S=Hh-L.length,S&&(ve+=rx(S))}else if(Ce===0)return"0";for(;Ce%10===0;)Ce/=10;return ve+Ce}var T1=(function(){function e(L,re){var ve,Ce=0,Be=L.length;for(L=L.slice();Be--;)ve=L[Be]*re+Ce,L[Be]=ve%ep|0,Ce=ve/ep|0;return Ce&&L.unshift(Ce),L}function n(L,re,ve,Ce){var Be,Ge;if(ve!=Ce)Ge=ve>Ce?1:-1;else for(Be=Ge=0;Be<ve;Be++)if(L[Be]!=re[Be]){Ge=L[Be]>re[Be]?1:-1;break}return Ge}function S(L,re,ve){for(var Ce=0;ve--;)L[ve]-=Ce,Ce=L[ve]<re[ve]?1:0,L[ve]=Ce*ep+L[ve]-re[ve];for(;!L[0]&&L.length>1;)L.shift()}return function(L,re,ve,Ce){var Be,Ge,Ke,dt,gt,Vt,Xt,cr,sr,nr,zr,Ne,Jr,pn,Lr,Or,cn,$n,xn=L.constructor,Wa=L.s==re.s?1:-1,On=L.d,qn=re.d;if(!L.s)return new xn(L);if(!re.s)throw Error(L0+"Division by zero");for(Ge=L.e-re.e,cn=qn.length,Lr=On.length,Xt=new xn(Wa),cr=Xt.d=[],Ke=0;qn[Ke]==(On[Ke]||0);)++Ke;if(qn[Ke]>(On[Ke]||0)&&--Ge,ve==null?Ne=ve=xn.precision:Ce?Ne=ve+(_v(L)-_v(re))+1:Ne=ve,Ne<0)return new xn(0);if(Ne=Ne/Hh+2|0,Ke=0,cn==1)for(dt=0,qn=qn[0],Ne++;(Ke<Lr||dt)&&Ne--;Ke++)Jr=dt*ep+(On[Ke]||0),cr[Ke]=Jr/qn|0,dt=Jr%qn|0;else{for(dt=ep/(qn[0]+1)|0,dt>1&&(qn=e(qn,dt),On=e(On,dt),cn=qn.length,Lr=On.length),pn=cn,sr=On.slice(0,cn),nr=sr.length;nr<cn;)sr[nr++]=0;$n=qn.slice(),$n.unshift(0),Or=qn[0],qn[1]>=ep/2&&++Or;do dt=0,Be=n(qn,sr,cn,nr),Be<0?(zr=sr[0],cn!=nr&&(zr=zr*ep+(sr[1]||0)),dt=zr/Or|0,dt>1?(dt>=ep&&(dt=ep-1),gt=e(qn,dt),Vt=gt.length,nr=sr.length,Be=n(gt,sr,Vt,nr),Be==1&&(dt--,S(gt,cn<Vt?$n:qn,Vt))):(dt==0&&(Be=dt=1),gt=qn.slice()),Vt=gt.length,Vt<nr&&gt.unshift(0),S(sr,gt,nr),Be==-1&&(nr=sr.length,Be=n(qn,sr,cn,nr),Be<1&&(dt++,S(sr,cn<nr?$n:qn,nr))),nr=sr.length):Be===0&&(dt++,sr=[0]),cr[Ke++]=dt,Be&&sr[0]?sr[nr++]=On[pn]||0:(sr=[On[pn]],nr=1);while((pn++<Lr||sr[0]!==void 0)&&Ne--)}return cr[0]||cr.shift(),Xt.e=Ge,bh(Xt,Ce?ve+_v(Xt)+1:ve)}})();function zZ(e,n){var S,L,re,ve,Ce,Be,Ge=0,Ke=0,dt=e.constructor,gt=dt.precision;if(_v(e)>16)throw Error(C9+_v(e));if(!e.s)return new dt(e0);for(nd=!1,Be=gt,Ce=new dt(.03125);e.abs().gte(.1);)e=e.times(Ce),Ke+=5;for(L=Math.log(tw(2,Ke))/Math.LN10*2+5|0,Be+=L,S=re=ve=new dt(e0),dt.precision=Be;;){if(re=bh(re.times(e),Be),S=S.times(++Ge),Ce=ve.plus(T1(re,S,Be)),fy(Ce.d).slice(0,Be)===fy(ve.d).slice(0,Be)){for(;Ke--;)ve=bh(ve.times(ve),Be);return dt.precision=gt,n==null?(nd=!0,bh(ve,gt)):ve}ve=Ce}}function _v(e){for(var n=e.e*Hh,S=e.d[0];S>=10;S/=10)n++;return n}function mO(e,n,S){if(n>e.LN10.sd())throw nd=!0,S&&(e.precision=S),Error(L0+"LN10 precision limit exceeded");return bh(new e(e.LN10),n)}function rx(e){for(var n="";e--;)n+="0";return n}function mE(e,n){var S,L,re,ve,Ce,Be,Ge,Ke,dt,gt=1,Vt=10,Xt=e,cr=Xt.d,sr=Xt.constructor,nr=sr.precision;if(Xt.s<1)throw Error(L0+(Xt.s?"NaN":"-Infinity"));if(Xt.eq(e0))return new sr(0);if(n==null?(nd=!1,Ke=nr):Ke=n,Xt.eq(10))return n==null&&(nd=!0),mO(sr,Ke);if(Ke+=Vt,sr.precision=Ke,S=fy(cr),L=S.charAt(0),ve=_v(Xt),Math.abs(ve)<15e14){for(;L<7&&L!=1||L==1&&S.charAt(1)>3;)Xt=Xt.times(e),S=fy(Xt.d),L=S.charAt(0),gt++;ve=_v(Xt),L>1?(Xt=new sr("0."+S),ve++):Xt=new sr(L+"."+S.slice(1))}else return Ge=mO(sr,Ke+2,nr).times(ve+""),Xt=mE(new sr(L+"."+S.slice(1)),Ke-Vt).plus(Ge),sr.precision=nr,n==null?(nd=!0,bh(Xt,nr)):Xt;for(Be=Ce=Xt=T1(Xt.minus(e0),Xt.plus(e0),Ke),dt=bh(Xt.times(Xt),Ke),re=3;;){if(Ce=bh(Ce.times(dt),Ke),Ge=Be.plus(T1(Ce,new sr(re),Ke)),fy(Ge.d).slice(0,Ke)===fy(Be.d).slice(0,Ke))return Be=Be.times(2),ve!==0&&(Be=Be.plus(mO(sr,Ke+2,nr).times(ve+""))),Be=T1(Be,new sr(gt),Ke),sr.precision=nr,n==null?(nd=!0,bh(Be,nr)):Be;Be=Ge,re+=2}}function qH(e,n){var S,L,re;for((S=n.indexOf("."))>-1&&(n=n.replace(".","")),(L=n.search(/e/i))>0?(S<0&&(S=L),S+=+n.slice(L+1),n=n.substring(0,L)):S<0&&(S=n.length),L=0;n.charCodeAt(L)===48;)++L;for(re=n.length;n.charCodeAt(re-1)===48;)--re;if(n=n.slice(L,re),n){if(re-=L,S=S-L-1,e.e=VT(S/Hh),e.d=[],L=(S+1)%Hh,S<0&&(L+=Hh),L<re){for(L&&e.d.push(+n.slice(0,L)),re-=Hh;L<re;)e.d.push(+n.slice(L,L+=Hh));n=n.slice(L),L=Hh-n.length}else L-=re;for(;L--;)n+="0";if(e.d.push(+n),nd&&(e.e>oP||e.e<-oP))throw Error(C9+S)}else e.s=0,e.e=0,e.d=[0];return e}function bh(e,n,S){var L,re,ve,Ce,Be,Ge,Ke,dt,gt=e.d;for(Ce=1,ve=gt[0];ve>=10;ve/=10)Ce++;if(L=n-Ce,L<0)L+=Hh,re=n,Ke=gt[dt=0];else{if(dt=Math.ceil((L+1)/Hh),ve=gt.length,dt>=ve)return e;for(Ke=ve=gt[dt],Ce=1;ve>=10;ve/=10)Ce++;L%=Hh,re=L-Hh+Ce}if(S!==void 0&&(ve=tw(10,Ce-re-1),Be=Ke/ve%10|0,Ge=n<0||gt[dt+1]!==void 0||Ke%ve,Ge=S<4?(Be||Ge)&&(S==0||S==(e.s<0?3:2)):Be>5||Be==5&&(S==4||Ge||S==6&&(L>0?re>0?Ke/tw(10,Ce-re):0:gt[dt-1])%10&1||S==(e.s<0?8:7))),n<1||!gt[0])return Ge?(ve=_v(e),gt.length=1,n=n-ve-1,gt[0]=tw(10,(Hh-n%Hh)%Hh),e.e=VT(-n/Hh)||0):(gt.length=1,gt[0]=e.e=e.s=0),e;if(L==0?(gt.length=dt,ve=1,dt--):(gt.length=dt+1,ve=tw(10,Hh-L),gt[dt]=re>0?(Ke/tw(10,Ce-re)%tw(10,re)|0)*ve:0),Ge)for(;;)if(dt==0){(gt[0]+=ve)==ep&&(gt[0]=1,++e.e);break}else{if(gt[dt]+=ve,gt[dt]!=ep)break;gt[dt--]=0,ve=1}for(L=gt.length;gt[--L]===0;)gt.pop();if(nd&&(e.e>oP||e.e<-oP))throw Error(C9+_v(e));return e}function NZ(e,n){var S,L,re,ve,Ce,Be,Ge,Ke,dt,gt,Vt=e.constructor,Xt=Vt.precision;if(!e.s||!n.s)return n.s?n.s=-n.s:n=new Vt(e),nd?bh(n,Xt):n;if(Ge=e.d,gt=n.d,L=n.e,Ke=e.e,Ge=Ge.slice(),Ce=Ke-L,Ce){for(dt=Ce<0,dt?(S=Ge,Ce=-Ce,Be=gt.length):(S=gt,L=Ke,Be=Ge.length),re=Math.max(Math.ceil(Xt/Hh),Be)+2,Ce>re&&(Ce=re,S.length=1),S.reverse(),re=Ce;re--;)S.push(0);S.reverse()}else{for(re=Ge.length,Be=gt.length,dt=re<Be,dt&&(Be=re),re=0;re<Be;re++)if(Ge[re]!=gt[re]){dt=Ge[re]<gt[re];break}Ce=0}for(dt&&(S=Ge,Ge=gt,gt=S,n.s=-n.s),Be=Ge.length,re=gt.length-Be;re>0;--re)Ge[Be++]=0;for(re=gt.length;re>Ce;){if(Ge[--re]<gt[re]){for(ve=re;ve&&Ge[--ve]===0;)Ge[ve]=ep-1;--Ge[ve],Ge[re]+=ep}Ge[re]-=gt[re]}for(;Ge[--Be]===0;)Ge.pop();for(;Ge[0]===0;Ge.shift())--L;return Ge[0]?(n.d=Ge,n.e=L,nd?bh(n,Xt):n):new Vt(0)}function _w(e,n,S){var L,re=_v(e),ve=fy(e.d),Ce=ve.length;return n?(S&&(L=S-Ce)>0?ve=ve.charAt(0)+"."+ve.slice(1)+rx(L):Ce>1&&(ve=ve.charAt(0)+"."+ve.slice(1)),ve=ve+(re<0?"e":"e+")+re):re<0?(ve="0."+rx(-re-1)+ve,S&&(L=S-Ce)>0&&(ve+=rx(L))):re>=Ce?(ve+=rx(re+1-Ce),S&&(L=S-re-1)>0&&(ve=ve+"."+rx(L))):((L=re+1)<Ce&&(ve=ve.slice(0,L)+"."+ve.slice(L)),S&&(L=S-Ce)>0&&(re+1===Ce&&(ve+="."),ve+=rx(L))),e.s<0?"-"+ve:ve}function VH(e,n){if(e.length>n)return e.length=n,!0}function FZ(e){var n,S,L;function re(ve){var Ce=this;if(!(Ce instanceof re))return new re(ve);if(Ce.constructor=re,ve instanceof re){Ce.s=ve.s,Ce.e=ve.e,Ce.d=(ve=ve.d)?ve.slice():ve;return}if(typeof ve=="number"){if(ve*0!==0)throw Error(fw+ve);if(ve>0)Ce.s=1;else if(ve<0)ve=-ve,Ce.s=-1;else{Ce.s=0,Ce.e=0,Ce.d=[0];return}if(ve===~~ve&&ve<1e7){Ce.e=0,Ce.d=[ve];return}return qH(Ce,ve.toString())}else if(typeof ve!="string")throw Error(fw+ve);if(ve.charCodeAt(0)===45?(ve=ve.slice(1),Ce.s=-1):Ce.s=1,h0e.test(ve))qH(Ce,ve);else throw Error(fw+ve)}if(re.prototype=fl,re.ROUND_UP=0,re.ROUND_DOWN=1,re.ROUND_CEIL=2,re.ROUND_FLOOR=3,re.ROUND_HALF_UP=4,re.ROUND_HALF_DOWN=5,re.ROUND_HALF_EVEN=6,re.ROUND_HALF_CEIL=7,re.ROUND_HALF_FLOOR=8,re.clone=FZ,re.config=re.set=d0e,e===void 0&&(e={}),e)for(L=["precision","rounding","toExpNeg","toExpPos","LN10"],n=0;n<L.length;)e.hasOwnProperty(S=L[n++])||(e[S]=this[S]);return re.config(e),re}function d0e(e){if(!e||typeof e!="object")throw Error(L0+"Object expected");var n,S,L,re=["precision",1,qT,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(n=0;n<re.length;n+=3)if((L=e[S=re[n]])!==void 0)if(VT(L)===L&&L>=re[n+1]&&L<=re[n+2])this[S]=L;else throw Error(fw+S+": "+L);if((L=e[S="LN10"])!==void 0)if(L==Math.LN10)this[S]=new this(L);else throw Error(fw+S+": "+L);return this}var k9=FZ(f0e);e0=new k9(1);const hh=k9;function v0e(e){return y0e(e)||g0e(e)||m0e(e)||p0e()}function p0e(){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 m0e(e,n){if(e){if(typeof e=="string")return Iz(e,n);var S=Object.prototype.toString.call(e).slice(8,-1);if(S==="Object"&&e.constructor&&(S=e.constructor.name),S==="Map"||S==="Set")return Array.from(e);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return Iz(e,n)}}function g0e(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function y0e(e){if(Array.isArray(e))return Iz(e)}function Iz(e,n){(n==null||n>e.length)&&(n=e.length);for(var S=0,L=new Array(n);S<n;S++)L[S]=e[S];return L}var _0e=function(n){return n},BZ={},jZ=function(n){return n===BZ},HH=function(n){return function S(){return arguments.length===0||arguments.length===1&&jZ(arguments.length<=0?void 0:arguments[0])?S:n.apply(void 0,arguments)}},x0e=function e(n,S){return n===1?S:HH(function(){for(var L=arguments.length,re=new Array(L),ve=0;ve<L;ve++)re[ve]=arguments[ve];var Ce=re.filter(function(Be){return Be!==BZ}).length;return Ce>=n?S.apply(void 0,re):e(n-Ce,HH(function(){for(var Be=arguments.length,Ge=new Array(Be),Ke=0;Ke<Be;Ke++)Ge[Ke]=arguments[Ke];var dt=re.map(function(gt){return jZ(gt)?Ge.shift():gt});return S.apply(void 0,v0e(dt).concat(Ge))}))})},cL=function(n){return x0e(n.length,n)},Dz=function(n,S){for(var L=[],re=n;re<S;++re)L[re-n]=re;return L},b0e=cL(function(e,n){return Array.isArray(n)?n.map(e):Object.keys(n).map(function(S){return n[S]}).map(e)}),w0e=function(){for(var n=arguments.length,S=new Array(n),L=0;L<n;L++)S[L]=arguments[L];if(!S.length)return _0e;var re=S.reverse(),ve=re[0],Ce=re.slice(1);return function(){return Ce.reduce(function(Be,Ge){return Ge(Be)},ve.apply(void 0,arguments))}},Oz=function(n){return Array.isArray(n)?n.reverse():n.split("").reverse.join("")},UZ=function(n){var S=null,L=null;return function(){for(var re=arguments.length,ve=new Array(re),Ce=0;Ce<re;Ce++)ve[Ce]=arguments[Ce];return S&&ve.every(function(Be,Ge){return Be===S[Ge]})||(S=ve,L=n.apply(void 0,ve)),L}};function T0e(e){var n;return e===0?n=1:n=Math.floor(new hh(e).abs().log(10).toNumber())+1,n}function A0e(e,n,S){for(var L=new hh(e),re=0,ve=[];L.lt(n)&&re<1e5;)ve.push(L.toNumber()),L=L.add(S),re++;return ve}var S0e=cL(function(e,n,S){var L=+e,re=+n;return L+S*(re-L)}),E0e=cL(function(e,n,S){var L=n-+e;return L=L||1/0,(S-e)/L}),M0e=cL(function(e,n,S){var L=n-+e;return L=L||1/0,Math.max(0,Math.min(1,(S-e)/L))});const fL={rangeStep:A0e,getDigitCount:T0e,interpolateNumber:S0e,uninterpolateNumber:E0e,uninterpolateTruncation:M0e};function zz(e){return P0e(e)||k0e(e)||qZ(e)||C0e()}function C0e(){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 k0e(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function P0e(e){if(Array.isArray(e))return Nz(e)}function gE(e,n){return I0e(e)||R0e(e,n)||qZ(e,n)||L0e()}function L0e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qZ(e,n){if(e){if(typeof e=="string")return Nz(e,n);var S=Object.prototype.toString.call(e).slice(8,-1);if(S==="Object"&&e.constructor&&(S=e.constructor.name),S==="Map"||S==="Set")return Array.from(e);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return Nz(e,n)}}function Nz(e,n){(n==null||n>e.length)&&(n=e.length);for(var S=0,L=new Array(n);S<n;S++)L[S]=e[S];return L}function R0e(e,n){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var S=[],L=!0,re=!1,ve=void 0;try{for(var Ce=e[Symbol.iterator](),Be;!(L=(Be=Ce.next()).done)&&(S.push(Be.value),!(n&&S.length===n));L=!0);}catch(Ge){re=!0,ve=Ge}finally{try{!L&&Ce.return!=null&&Ce.return()}finally{if(re)throw ve}}return S}}function I0e(e){if(Array.isArray(e))return e}function VZ(e){var n=gE(e,2),S=n[0],L=n[1],re=S,ve=L;return S>L&&(re=L,ve=S),[re,ve]}function HZ(e,n,S){if(e.lte(0))return new hh(0);var L=fL.getDigitCount(e.toNumber()),re=new hh(10).pow(L),ve=e.div(re),Ce=L!==1?.05:.1,Be=new hh(Math.ceil(ve.div(Ce).toNumber())).add(S).mul(Ce),Ge=Be.mul(re);return n?Ge:new hh(Math.ceil(Ge))}function D0e(e,n,S){var L=1,re=new hh(e);if(!re.isint()&&S){var ve=Math.abs(e);ve<1?(L=new hh(10).pow(fL.getDigitCount(e)-1),re=new hh(Math.floor(re.div(L).toNumber())).mul(L)):ve>1&&(re=new hh(Math.floor(e)))}else e===0?re=new hh(Math.floor((n-1)/2)):S||(re=new hh(Math.floor(e)));var Ce=Math.floor((n-1)/2),Be=w0e(b0e(function(Ge){return re.add(new hh(Ge-Ce).mul(L)).toNumber()}),Dz);return Be(0,n)}function GZ(e,n,S,L){var re=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((n-e)/(S-1)))return{step:new hh(0),tickMin:new hh(0),tickMax:new hh(0)};var ve=HZ(new hh(n).sub(e).div(S-1),L,re),Ce;e<=0&&n>=0?Ce=new hh(0):(Ce=new hh(e).add(n).div(2),Ce=Ce.sub(new hh(Ce).mod(ve)));var Be=Math.ceil(Ce.sub(e).div(ve).toNumber()),Ge=Math.ceil(new hh(n).sub(Ce).div(ve).toNumber()),Ke=Be+Ge+1;return Ke>S?GZ(e,n,S,L,re+1):(Ke<S&&(Ge=n>0?Ge+(S-Ke):Ge,Be=n>0?Be:Be+(S-Ke)),{step:ve,tickMin:Ce.sub(new hh(Be).mul(ve)),tickMax:Ce.add(new hh(Ge).mul(ve))})}function O0e(e){var n=gE(e,2),S=n[0],L=n[1],re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,ve=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,Ce=Math.max(re,2),Be=VZ([S,L]),Ge=gE(Be,2),Ke=Ge[0],dt=Ge[1];if(Ke===-1/0||dt===1/0){var gt=dt===1/0?[Ke].concat(zz(Dz(0,re-1).map(function(){return 1/0}))):[].concat(zz(Dz(0,re-1).map(function(){return-1/0})),[dt]);return S>L?Oz(gt):gt}if(Ke===dt)return D0e(Ke,re,ve);var Vt=GZ(Ke,dt,Ce,ve),Xt=Vt.step,cr=Vt.tickMin,sr=Vt.tickMax,nr=fL.rangeStep(cr,sr.add(new hh(.1).mul(Xt)),Xt);return S>L?Oz(nr):nr}function z0e(e,n){var S=gE(e,2),L=S[0],re=S[1],ve=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,Ce=VZ([L,re]),Be=gE(Ce,2),Ge=Be[0],Ke=Be[1];if(Ge===-1/0||Ke===1/0)return[L,re];if(Ge===Ke)return[Ge];var dt=Math.max(n,2),gt=HZ(new hh(Ke).sub(Ge).div(dt-1),ve,0),Vt=[].concat(zz(fL.rangeStep(new hh(Ge),new hh(Ke).sub(new hh(.99).mul(gt)),gt)),[Ke]);return L>re?Oz(Vt):Vt}var N0e=UZ(O0e),F0e=UZ(z0e),B0e="Invariant failed";function xw(e,n){throw new Error(B0e)}var j0e=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function gT(e){"@babel/helpers - typeof";return gT=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},gT(e)}function sP(){return sP=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var S=arguments[n];for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(e[L]=S[L])}return e},sP.apply(this,arguments)}function U0e(e,n){return G0e(e)||H0e(e,n)||V0e(e,n)||q0e()}function q0e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function V0e(e,n){if(e){if(typeof e=="string")return GH(e,n);var S=Object.prototype.toString.call(e).slice(8,-1);if(S==="Object"&&e.constructor&&(S=e.constructor.name),S==="Map"||S==="Set")return Array.from(e);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return GH(e,n)}}function GH(e,n){(n==null||n>e.length)&&(n=e.length);for(var S=0,L=new Array(n);S<n;S++)L[S]=e[S];return L}function H0e(e,n){var S=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(S!=null){var L,re,ve,Ce,Be=[],Ge=!0,Ke=!1;try{if(ve=(S=S.call(e)).next,n!==0)for(;!(Ge=(L=ve.call(S)).done)&&(Be.push(L.value),Be.length!==n);Ge=!0);}catch(dt){Ke=!0,re=dt}finally{try{if(!Ge&&S.return!=null&&(Ce=S.return(),Object(Ce)!==Ce))return}finally{if(Ke)throw re}}return Be}}function G0e(e){if(Array.isArray(e))return e}function X0e(e,n){if(e==null)return{};var S=W0e(e,n),L,re;if(Object.getOwnPropertySymbols){var ve=Object.getOwnPropertySymbols(e);for(re=0;re<ve.length;re++)L=ve[re],!(n.indexOf(L)>=0)&&Object.prototype.propertyIsEnumerable.call(e,L)&&(S[L]=e[L])}return S}function W0e(e,n){if(e==null)return{};var S={};for(var L in e)if(Object.prototype.hasOwnProperty.call(e,L)){if(n.indexOf(L)>=0)continue;S[L]=e[L]}return S}function Y0e(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Z0e(e,n){for(var S=0;S<n.length;S++){var L=n[S];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(e,YZ(L.key),L)}}function $0e(e,n,S){return n&&Z0e(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function K0e(e,n,S){return n=lP(n),J0e(e,XZ()?Reflect.construct(n,S||[],lP(e).constructor):n.apply(e,S))}function J0e(e,n){if(n&&(gT(n)==="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Q0e(e)}function Q0e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function XZ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(XZ=function(){return!!e})()}function lP(e){return lP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(S){return S.__proto__||Object.getPrototypeOf(S)},lP(e)}function ege(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&Fz(e,n)}function Fz(e,n){return Fz=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(L,re){return L.__proto__=re,L},Fz(e,n)}function WZ(e,n,S){return n=YZ(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function YZ(e){var n=tge(e,"string");return gT(n)=="symbol"?n:n+""}function tge(e,n){if(gT(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(gT(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var cx=(function(e){function n(){return Y0e(this,n),K0e(this,n,arguments)}return ege(n,e),$0e(n,[{key:"render",value:function(){var L=this.props,re=L.offset,ve=L.layout,Ce=L.width,Be=L.dataKey,Ge=L.data,Ke=L.dataPointFormatter,dt=L.xAxis,gt=L.yAxis,Vt=X0e(L,j0e),Xt=Fu(Vt,!1);this.props.direction==="x"&&dt.type!=="number"&&xw();var cr=Ge.map(function(sr){var nr=Ke(sr,Be),zr=nr.x,Ne=nr.y,Jr=nr.value,pn=nr.errorVal;if(!pn)return null;var Lr=[],Or,cn;if(Array.isArray(pn)){var $n=U0e(pn,2);Or=$n[0],cn=$n[1]}else Or=cn=pn;if(ve==="vertical"){var xn=dt.scale,Wa=Ne+re,On=Wa+Ce,qn=Wa-Ce,ca=xn(Jr-Or),Fn=xn(Jr+cn);Lr.push({x1:Fn,y1:On,x2:Fn,y2:qn}),Lr.push({x1:ca,y1:Wa,x2:Fn,y2:Wa}),Lr.push({x1:ca,y1:On,x2:ca,y2:qn})}else if(ve==="horizontal"){var da=gt.scale,ea=zr+re,qa=ea-Ce,Ri=ea+Ce,mi=da(Jr-Or),Io=da(Jr+cn);Lr.push({x1:qa,y1:Io,x2:Ri,y2:Io}),Lr.push({x1:ea,y1:mi,x2:ea,y2:Io}),Lr.push({x1:qa,y1:mi,x2:Ri,y2:mi})}return la.createElement(Df,sP({className:"recharts-errorBar",key:"bar-".concat(Lr.map(function(ya){return"".concat(ya.x1,"-").concat(ya.x2,"-").concat(ya.y1,"-").concat(ya.y2)}))},Xt),Lr.map(function(ya){return la.createElement("line",sP({},ya,{key:"line-".concat(ya.x1,"-").concat(ya.x2,"-").concat(ya.y1,"-").concat(ya.y2)}))}))});return la.createElement(Df,{className:"recharts-errorBars"},cr)}}])})(la.Component);WZ(cx,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});WZ(cx,"displayName","ErrorBar");function yE(e){"@babel/helpers - typeof";return yE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},yE(e)}function XH(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function Qb(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?XH(Object(S),!0).forEach(function(L){rge(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):XH(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function rge(e,n,S){return n=nge(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function nge(e){var n=age(e,"string");return yE(n)=="symbol"?n:n+""}function age(e,n){if(yE(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(yE(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var ZZ=function(n){var S=n.children,L=n.formattedGraphicalItems,re=n.legendWidth,ve=n.legendContent,Ce=Jm(S,dy);if(!Ce)return null;var Be=dy.defaultProps,Ge=Be!==void 0?Qb(Qb({},Be),Ce.props):{},Ke;return Ce.props&&Ce.props.payload?Ke=Ce.props&&Ce.props.payload:ve==="children"?Ke=(L||[]).reduce(function(dt,gt){var Vt=gt.item,Xt=gt.props,cr=Xt.sectors||Xt.data||[];return dt.concat(cr.map(function(sr){return{type:Ce.props.iconType||Vt.props.legendType,value:sr.name,color:sr.fill,payload:sr}}))},[]):Ke=(L||[]).map(function(dt){var gt=dt.item,Vt=gt.type.defaultProps,Xt=Vt!==void 0?Qb(Qb({},Vt),gt.props):{},cr=Xt.dataKey,sr=Xt.name,nr=Xt.legendType,zr=Xt.hide;return{inactive:zr,dataKey:cr,type:Ge.iconType||nr||"square",color:P9(gt),value:sr||cr,payload:Xt}}),Qb(Qb(Qb({},Ge),dy.getWithHeight(Ce,re)),{},{payload:Ke,item:Ce})};function _E(e){"@babel/helpers - typeof";return _E=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},_E(e)}function WH(e){return lge(e)||sge(e)||oge(e)||ige()}function ige(){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 oge(e,n){if(e){if(typeof e=="string")return Bz(e,n);var S=Object.prototype.toString.call(e).slice(8,-1);if(S==="Object"&&e.constructor&&(S=e.constructor.name),S==="Map"||S==="Set")return Array.from(e);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return Bz(e,n)}}function sge(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function lge(e){if(Array.isArray(e))return Bz(e)}function Bz(e,n){(n==null||n>e.length)&&(n=e.length);for(var S=0,L=new Array(n);S<n;S++)L[S]=e[S];return L}function YH(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function Od(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?YH(Object(S),!0).forEach(function(L){sT(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):YH(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function sT(e,n,S){return n=uge(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function uge(e){var n=cge(e,"string");return _E(n)=="symbol"?n:n+""}function cge(e,n){if(_E(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(_E(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function zv(e,n,S){return Ru(e)||Ru(n)?S:Ov(n)?P0(e,n,S):qu(n)?n(e):S}function K5(e,n,S,L){var re=l0e(e,function(Be){return zv(Be,n)});if(S==="number"){var ve=re.filter(function(Be){return ys(Be)||parseFloat(Be)});return ve.length?[uL(ve),ax(ve)]:[1/0,-1/0]}var Ce=L?re.filter(function(Be){return!Ru(Be)}):re;return Ce.map(function(Be){return Ov(Be)||Be instanceof Date?Be:""})}var fge=function(n){var S,L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],re=arguments.length>2?arguments[2]:void 0,ve=arguments.length>3?arguments[3]:void 0,Ce=-1,Be=(S=L?.length)!==null&&S!==void 0?S:0;if(Be<=1)return 0;if(ve&&ve.axisType==="angleAxis"&&Math.abs(Math.abs(ve.range[1]-ve.range[0])-360)<=1e-6)for(var Ge=ve.range,Ke=0;Ke<Be;Ke++){var dt=Ke>0?re[Ke-1].coordinate:re[Be-1].coordinate,gt=re[Ke].coordinate,Vt=Ke>=Be-1?re[0].coordinate:re[Ke+1].coordinate,Xt=void 0;if(dg(gt-dt)!==dg(Vt-gt)){var cr=[];if(dg(Vt-gt)===dg(Ge[1]-Ge[0])){Xt=Vt;var sr=gt+Ge[1]-Ge[0];cr[0]=Math.min(sr,(sr+dt)/2),cr[1]=Math.max(sr,(sr+dt)/2)}else{Xt=dt;var nr=Vt+Ge[1]-Ge[0];cr[0]=Math.min(gt,(nr+gt)/2),cr[1]=Math.max(gt,(nr+gt)/2)}var zr=[Math.min(gt,(Xt+gt)/2),Math.max(gt,(Xt+gt)/2)];if(n>zr[0]&&n<=zr[1]||n>=cr[0]&&n<=cr[1]){Ce=re[Ke].index;break}}else{var Ne=Math.min(dt,Vt),Jr=Math.max(dt,Vt);if(n>(Ne+gt)/2&&n<=(Jr+gt)/2){Ce=re[Ke].index;break}}}else for(var pn=0;pn<Be;pn++)if(pn===0&&n<=(L[pn].coordinate+L[pn+1].coordinate)/2||pn>0&&pn<Be-1&&n>(L[pn].coordinate+L[pn-1].coordinate)/2&&n<=(L[pn].coordinate+L[pn+1].coordinate)/2||pn===Be-1&&n>(L[pn].coordinate+L[pn-1].coordinate)/2){Ce=L[pn].index;break}return Ce},P9=function(n){var S,L=n,re=L.type.displayName,ve=(S=n.type)!==null&&S!==void 0&&S.defaultProps?Od(Od({},n.type.defaultProps),n.props):n.props,Ce=ve.stroke,Be=ve.fill,Ge;switch(re){case"Line":Ge=Ce;break;case"Area":case"Radar":Ge=Ce&&Ce!=="none"?Ce:Be;break;default:Ge=Be;break}return Ge},hge=function(n){var S=n.barSize,L=n.totalSize,re=n.stackGroups,ve=re===void 0?{}:re;if(!ve)return{};for(var Ce={},Be=Object.keys(ve),Ge=0,Ke=Be.length;Ge<Ke;Ge++)for(var dt=ve[Be[Ge]].stackGroups,gt=Object.keys(dt),Vt=0,Xt=gt.length;Vt<Xt;Vt++){var cr=dt[gt[Vt]],sr=cr.items,nr=cr.cateAxisId,zr=sr.filter(function(cn){return b1(cn.type).indexOf("Bar")>=0});if(zr&&zr.length){var Ne=zr[0].type.defaultProps,Jr=Ne!==void 0?Od(Od({},Ne),zr[0].props):zr[0].props,pn=Jr.barSize,Lr=Jr[nr];Ce[Lr]||(Ce[Lr]=[]);var Or=Ru(pn)?S:pn;Ce[Lr].push({item:zr[0],stackList:zr.slice(1),barSize:Ru(Or)?void 0:gw(Or,L,0)})}}return Ce},dge=function(n){var S=n.barGap,L=n.barCategoryGap,re=n.bandSize,ve=n.sizeList,Ce=ve===void 0?[]:ve,Be=n.maxBarSize,Ge=Ce.length;if(Ge<1)return null;var Ke=gw(S,re,0,!0),dt,gt=[];if(Ce[0].barSize===+Ce[0].barSize){var Vt=!1,Xt=re/Ge,cr=Ce.reduce(function(pn,Lr){return pn+Lr.barSize||0},0);cr+=(Ge-1)*Ke,cr>=re&&(cr-=(Ge-1)*Ke,Ke=0),cr>=re&&Xt>0&&(Vt=!0,Xt*=.9,cr=Ge*Xt);var sr=(re-cr)/2>>0,nr={offset:sr-Ke,size:0};dt=Ce.reduce(function(pn,Lr){var Or={item:Lr.item,position:{offset:nr.offset+nr.size+Ke,size:Vt?Xt:Lr.barSize}},cn=[].concat(WH(pn),[Or]);return nr=cn[cn.length-1].position,Lr.stackList&&Lr.stackList.length&&Lr.stackList.forEach(function($n){cn.push({item:$n,position:nr})}),cn},gt)}else{var zr=gw(L,re,0,!0);re-2*zr-(Ge-1)*Ke<=0&&(Ke=0);var Ne=(re-2*zr-(Ge-1)*Ke)/Ge;Ne>1&&(Ne>>=0);var Jr=Be===+Be?Math.min(Ne,Be):Ne;dt=Ce.reduce(function(pn,Lr,Or){var cn=[].concat(WH(pn),[{item:Lr.item,position:{offset:zr+(Ne+Ke)*Or+(Ne-Jr)/2,size:Jr}}]);return Lr.stackList&&Lr.stackList.length&&Lr.stackList.forEach(function($n){cn.push({item:$n,position:cn[cn.length-1].position})}),cn},gt)}return dt},vge=function(n,S,L,re){var ve=L.children,Ce=L.width,Be=L.margin,Ge=Ce-(Be.left||0)-(Be.right||0),Ke=ZZ({children:ve,legendWidth:Ge});if(Ke){var dt=re||{},gt=dt.width,Vt=dt.height,Xt=Ke.align,cr=Ke.verticalAlign,sr=Ke.layout;if((sr==="vertical"||sr==="horizontal"&&cr==="middle")&&Xt!=="center"&&ys(n[Xt]))return Od(Od({},n),{},sT({},Xt,n[Xt]+(gt||0)));if((sr==="horizontal"||sr==="vertical"&&Xt==="center")&&cr!=="middle"&&ys(n[cr]))return Od(Od({},n),{},sT({},cr,n[cr]+(Vt||0)))}return n},pge=function(n,S,L){return Ru(S)?!0:n==="horizontal"?S==="yAxis":n==="vertical"||L==="x"?S==="xAxis":L==="y"?S==="yAxis":!0},$Z=function(n,S,L,re,ve){var Ce=S.props.children,Be=wm(Ce,cx).filter(function(Ke){return pge(re,ve,Ke.props.direction)});if(Be&&Be.length){var Ge=Be.map(function(Ke){return Ke.props.dataKey});return n.reduce(function(Ke,dt){var gt=zv(dt,L);if(Ru(gt))return Ke;var Vt=Array.isArray(gt)?[uL(gt),ax(gt)]:[gt,gt],Xt=Ge.reduce(function(cr,sr){var nr=zv(dt,sr,0),zr=Vt[0]-Math.abs(Array.isArray(nr)?nr[0]:nr),Ne=Vt[1]+Math.abs(Array.isArray(nr)?nr[1]:nr);return[Math.min(zr,cr[0]),Math.max(Ne,cr[1])]},[1/0,-1/0]);return[Math.min(Xt[0],Ke[0]),Math.max(Xt[1],Ke[1])]},[1/0,-1/0])}return null},mge=function(n,S,L,re,ve){var Ce=S.map(function(Be){return $Z(n,Be,L,ve,re)}).filter(function(Be){return!Ru(Be)});return Ce&&Ce.length?Ce.reduce(function(Be,Ge){return[Math.min(Be[0],Ge[0]),Math.max(Be[1],Ge[1])]},[1/0,-1/0]):null},KZ=function(n,S,L,re,ve){var Ce=S.map(function(Ge){var Ke=Ge.props.dataKey;return L==="number"&&Ke&&$Z(n,Ge,Ke,re)||K5(n,Ke,L,ve)});if(L==="number")return Ce.reduce(function(Ge,Ke){return[Math.min(Ge[0],Ke[0]),Math.max(Ge[1],Ke[1])]},[1/0,-1/0]);var Be={};return Ce.reduce(function(Ge,Ke){for(var dt=0,gt=Ke.length;dt<gt;dt++)Be[Ke[dt]]||(Be[Ke[dt]]=!0,Ge.push(Ke[dt]));return Ge},[])},JZ=function(n,S){return n==="horizontal"&&S==="xAxis"||n==="vertical"&&S==="yAxis"||n==="centric"&&S==="angleAxis"||n==="radial"&&S==="radiusAxis"},QZ=function(n,S,L,re){if(re)return n.map(function(Ge){return Ge.coordinate});var ve,Ce,Be=n.map(function(Ge){return Ge.coordinate===S&&(ve=!0),Ge.coordinate===L&&(Ce=!0),Ge.coordinate});return ve||Be.push(S),Ce||Be.push(L),Be},x1=function(n,S,L){if(!n)return null;var re=n.scale,ve=n.duplicateDomain,Ce=n.type,Be=n.range,Ge=n.realScaleType==="scaleBand"?re.bandwidth()/2:2,Ke=(S||L)&&Ce==="category"&&re.bandwidth?re.bandwidth()/Ge:0;if(Ke=n.axisType==="angleAxis"&&Be?.length>=2?dg(Be[0]-Be[1])*2*Ke:Ke,S&&(n.ticks||n.niceTicks)){var dt=(n.ticks||n.niceTicks).map(function(gt){var Vt=ve?ve.indexOf(gt):gt;return{coordinate:re(Vt)+Ke,value:gt,offset:Ke}});return dt.filter(function(gt){return!BT(gt.coordinate)})}return n.isCategorical&&n.categoricalDomain?n.categoricalDomain.map(function(gt,Vt){return{coordinate:re(gt)+Ke,value:gt,index:Vt,offset:Ke}}):re.ticks&&!L?re.ticks(n.tickCount).map(function(gt){return{coordinate:re(gt)+Ke,value:gt,offset:Ke}}):re.domain().map(function(gt,Vt){return{coordinate:re(gt)+Ke,value:ve?ve[gt]:gt,index:Vt,offset:Ke}})},gO=new WeakMap,A6=function(n,S){if(typeof S!="function")return n;gO.has(n)||gO.set(n,new WeakMap);var L=gO.get(n);if(L.has(S))return L.get(S);var re=function(){n.apply(void 0,arguments),S.apply(void 0,arguments)};return L.set(S,re),re},gge=function(n,S,L){var re=n.scale,ve=n.type,Ce=n.layout,Be=n.axisType;if(re==="auto")return Ce==="radial"&&Be==="radiusAxis"?{scale:fE(),realScaleType:"band"}:Ce==="radial"&&Be==="angleAxis"?{scale:rP(),realScaleType:"linear"}:ve==="category"&&S&&(S.indexOf("LineChart")>=0||S.indexOf("AreaChart")>=0||S.indexOf("ComposedChart")>=0&&!L)?{scale:$5(),realScaleType:"point"}:ve==="category"?{scale:fE(),realScaleType:"band"}:{scale:rP(),realScaleType:"linear"};if(mw(re)){var Ge="scale".concat(YP(re));return{scale:(IH[Ge]||$5)(),realScaleType:IH[Ge]?Ge:"point"}}return qu(re)?{scale:re}:{scale:$5(),realScaleType:"point"}},ZH=1e-4,yge=function(n){var S=n.domain();if(!(!S||S.length<=2)){var L=S.length,re=n.range(),ve=Math.min(re[0],re[1])-ZH,Ce=Math.max(re[0],re[1])+ZH,Be=n(S[0]),Ge=n(S[L-1]);(Be<ve||Be>Ce||Ge<ve||Ge>Ce)&&n.domain([S[0],S[L-1]])}},_ge=function(n,S){if(!n)return null;for(var L=0,re=n.length;L<re;L++)if(n[L].item===S)return n[L].position;return null},xge=function(n,S){if(!S||S.length!==2||!ys(S[0])||!ys(S[1]))return n;var L=Math.min(S[0],S[1]),re=Math.max(S[0],S[1]),ve=[n[0],n[1]];return(!ys(n[0])||n[0]<L)&&(ve[0]=L),(!ys(n[1])||n[1]>re)&&(ve[1]=re),ve[0]>re&&(ve[0]=re),ve[1]<L&&(ve[1]=L),ve},bge=function(n){var S=n.length;if(!(S<=0))for(var L=0,re=n[0].length;L<re;++L)for(var ve=0,Ce=0,Be=0;Be<S;++Be){var Ge=BT(n[Be][L][1])?n[Be][L][0]:n[Be][L][1];Ge>=0?(n[Be][L][0]=ve,n[Be][L][1]=ve+Ge,ve=n[Be][L][1]):(n[Be][L][0]=Ce,n[Be][L][1]=Ce+Ge,Ce=n[Be][L][1])}},wge=function(n){var S=n.length;if(!(S<=0))for(var L=0,re=n[0].length;L<re;++L)for(var ve=0,Ce=0;Ce<S;++Ce){var Be=BT(n[Ce][L][1])?n[Ce][L][0]:n[Ce][L][1];Be>=0?(n[Ce][L][0]=ve,n[Ce][L][1]=ve+Be,ve=n[Ce][L][1]):(n[Ce][L][0]=0,n[Ce][L][1]=0)}},Tge={sign:bge,expand:ofe,none:uT,silhouette:sfe,wiggle:lfe,positive:wge},Age=function(n,S,L){var re=S.map(function(Be){return Be.props.dataKey}),ve=Tge[L],Ce=ife().keys(re).value(function(Be,Ge){return+zv(Be,Ge,0)}).order(pz).offset(ve);return Ce(n)},Sge=function(n,S,L,re,ve,Ce){if(!n)return null;var Be=Ce?S.reverse():S,Ge={},Ke=Be.reduce(function(gt,Vt){var Xt,cr=(Xt=Vt.type)!==null&&Xt!==void 0&&Xt.defaultProps?Od(Od({},Vt.type.defaultProps),Vt.props):Vt.props,sr=cr.stackId,nr=cr.hide;if(nr)return gt;var zr=cr[L],Ne=gt[zr]||{hasStack:!1,stackGroups:{}};if(Ov(sr)){var Jr=Ne.stackGroups[sr]||{numericAxisId:L,cateAxisId:re,items:[]};Jr.items.push(Vt),Ne.hasStack=!0,Ne.stackGroups[sr]=Jr}else Ne.stackGroups[Tw("_stackId_")]={numericAxisId:L,cateAxisId:re,items:[Vt]};return Od(Od({},gt),{},sT({},zr,Ne))},Ge),dt={};return Object.keys(Ke).reduce(function(gt,Vt){var Xt=Ke[Vt];if(Xt.hasStack){var cr={};Xt.stackGroups=Object.keys(Xt.stackGroups).reduce(function(sr,nr){var zr=Xt.stackGroups[nr];return Od(Od({},sr),{},sT({},nr,{numericAxisId:L,cateAxisId:re,items:zr.items,stackedData:Age(n,zr.items,ve)}))},cr)}return Od(Od({},gt),{},sT({},Vt,Xt))},dt)},Ege=function(n,S){var L=S.realScaleType,re=S.type,ve=S.tickCount,Ce=S.originalDomain,Be=S.allowDecimals,Ge=L||S.scale;if(Ge!=="auto"&&Ge!=="linear")return null;if(ve&&re==="number"&&Ce&&(Ce[0]==="auto"||Ce[1]==="auto")){var Ke=n.domain();if(!Ke.length)return null;var dt=N0e(Ke,ve,Be);return n.domain([uL(dt),ax(dt)]),{niceTicks:dt}}if(ve&&re==="number"){var gt=n.domain(),Vt=F0e(gt,ve,Be);return{niceTicks:Vt}}return null};function yT(e){var n=e.axis,S=e.ticks,L=e.bandSize,re=e.entry,ve=e.index,Ce=e.dataKey;if(n.type==="category"){if(!n.allowDuplicatedCategory&&n.dataKey&&!Ru(re[n.dataKey])){var Be=N6(S,"value",re[n.dataKey]);if(Be)return Be.coordinate+L/2}return S[ve]?S[ve].coordinate+L/2:null}var Ge=zv(re,Ru(Ce)?n.dataKey:Ce);return Ru(Ge)?null:n.scale(Ge)}var $H=function(n){var S=n.axis,L=n.ticks,re=n.offset,ve=n.bandSize,Ce=n.entry,Be=n.index;if(S.type==="category")return L[Be]?L[Be].coordinate+re:null;var Ge=zv(Ce,S.dataKey,S.domain[Be]);return Ru(Ge)?null:S.scale(Ge)-ve/2+re},Mge=function(n){var S=n.numericAxis,L=S.scale.domain();if(S.type==="number"){var re=Math.min(L[0],L[1]),ve=Math.max(L[0],L[1]);return re<=0&&ve>=0?0:ve<0?ve:re}return L[0]},Cge=function(n,S){var L,re=(L=n.type)!==null&&L!==void 0&&L.defaultProps?Od(Od({},n.type.defaultProps),n.props):n.props,ve=re.stackId;if(Ov(ve)){var Ce=S[ve];if(Ce){var Be=Ce.items.indexOf(n);return Be>=0?Ce.stackedData[Be]:null}}return null},kge=function(n){return n.reduce(function(S,L){return[uL(L.concat([S[0]]).filter(ys)),ax(L.concat([S[1]]).filter(ys))]},[1/0,-1/0])},e$=function(n,S,L){return Object.keys(n).reduce(function(re,ve){var Ce=n[ve],Be=Ce.stackedData,Ge=Be.reduce(function(Ke,dt){var gt=kge(dt.slice(S,L+1));return[Math.min(Ke[0],gt[0]),Math.max(Ke[1],gt[1])]},[1/0,-1/0]);return[Math.min(Ge[0],re[0]),Math.max(Ge[1],re[1])]},[1/0,-1/0]).map(function(re){return re===1/0||re===-1/0?0:re})},KH=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,JH=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,jz=function(n,S,L){if(qu(n))return n(S,L);if(!Array.isArray(n))return S;var re=[];if(ys(n[0]))re[0]=L?n[0]:Math.min(n[0],S[0]);else if(KH.test(n[0])){var ve=+KH.exec(n[0])[1];re[0]=S[0]-ve}else qu(n[0])?re[0]=n[0](S[0]):re[0]=S[0];if(ys(n[1]))re[1]=L?n[1]:Math.max(n[1],S[1]);else if(JH.test(n[1])){var Ce=+JH.exec(n[1])[1];re[1]=S[1]+Ce}else qu(n[1])?re[1]=n[1](S[1]):re[1]=S[1];return re},uP=function(n,S,L){if(n&&n.scale&&n.scale.bandwidth){var re=n.scale.bandwidth();if(!L||re>0)return re}if(n&&S&&S.length>=2){for(var ve=n9(S,function(gt){return gt.coordinate}),Ce=1/0,Be=1,Ge=ve.length;Be<Ge;Be++){var Ke=ve[Be],dt=ve[Be-1];Ce=Math.min((Ke.coordinate||0)-(dt.coordinate||0),Ce)}return Ce===1/0?0:Ce}return L?void 0:0},QH=function(n,S,L){return!n||!n.length||yw(n,P0(L,"type.defaultProps.domain"))?S:n},t$=function(n,S){var L=n.type.defaultProps?Od(Od({},n.type.defaultProps),n.props):n.props,re=L.dataKey,ve=L.name,Ce=L.unit,Be=L.formatter,Ge=L.tooltipType,Ke=L.chartType,dt=L.hide;return Od(Od({},Fu(n,!1)),{},{dataKey:re,unit:Ce,formatter:Be,name:ve||re,color:P9(n),value:zv(S,re),type:Ge,payload:S,chartType:Ke,hide:dt})};function xE(e){"@babel/helpers - typeof";return xE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},xE(e)}function eG(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function tG(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?eG(Object(S),!0).forEach(function(L){Pge(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):eG(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function Pge(e,n,S){return n=Lge(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function Lge(e){var n=Rge(e,"string");return xE(n)=="symbol"?n:n+""}function Rge(e,n){if(xE(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(xE(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var cP=Math.PI/180,Ige=function(n){return n*180/Math.PI},cp=function(n,S,L,re){return{x:n+Math.cos(-cP*re)*L,y:S+Math.sin(-cP*re)*L}},Dge=function(n,S){var L=n.x,re=n.y,ve=S.x,Ce=S.y;return Math.sqrt(Math.pow(L-ve,2)+Math.pow(re-Ce,2))},Oge=function(n,S){var L=n.x,re=n.y,ve=S.cx,Ce=S.cy,Be=Dge({x:L,y:re},{x:ve,y:Ce});if(Be<=0)return{radius:Be};var Ge=(L-ve)/Be,Ke=Math.acos(Ge);return re>Ce&&(Ke=2*Math.PI-Ke),{radius:Be,angle:Ige(Ke),angleInRadian:Ke}},zge=function(n){var S=n.startAngle,L=n.endAngle,re=Math.floor(S/360),ve=Math.floor(L/360),Ce=Math.min(re,ve);return{startAngle:S-Ce*360,endAngle:L-Ce*360}},Nge=function(n,S){var L=S.startAngle,re=S.endAngle,ve=Math.floor(L/360),Ce=Math.floor(re/360),Be=Math.min(ve,Ce);return n+Be*360},rG=function(n,S){var L=n.x,re=n.y,ve=Oge({x:L,y:re},S),Ce=ve.radius,Be=ve.angle,Ge=S.innerRadius,Ke=S.outerRadius;if(Ce<Ge||Ce>Ke)return!1;if(Ce===0)return!0;var dt=zge(S),gt=dt.startAngle,Vt=dt.endAngle,Xt=Be,cr;if(gt<=Vt){for(;Xt>Vt;)Xt-=360;for(;Xt<gt;)Xt+=360;cr=Xt>=gt&&Xt<=Vt}else{for(;Xt>gt;)Xt-=360;for(;Xt<Vt;)Xt+=360;cr=Xt>=Vt&&Xt<=gt}return cr?tG(tG({},S),{},{radius:Ce,angle:Nge(Xt,S)}):null};function bE(e){"@babel/helpers - typeof";return bE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},bE(e)}var Fge=["offset"];function Bge(e){return Vge(e)||qge(e)||Uge(e)||jge()}function jge(){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 Uge(e,n){if(e){if(typeof e=="string")return Uz(e,n);var S=Object.prototype.toString.call(e).slice(8,-1);if(S==="Object"&&e.constructor&&(S=e.constructor.name),S==="Map"||S==="Set")return Array.from(e);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return Uz(e,n)}}function qge(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Vge(e){if(Array.isArray(e))return Uz(e)}function Uz(e,n){(n==null||n>e.length)&&(n=e.length);for(var S=0,L=new Array(n);S<n;S++)L[S]=e[S];return L}function Hge(e,n){if(e==null)return{};var S=Gge(e,n),L,re;if(Object.getOwnPropertySymbols){var ve=Object.getOwnPropertySymbols(e);for(re=0;re<ve.length;re++)L=ve[re],!(n.indexOf(L)>=0)&&Object.prototype.propertyIsEnumerable.call(e,L)&&(S[L]=e[L])}return S}function Gge(e,n){if(e==null)return{};var S={};for(var L in e)if(Object.prototype.hasOwnProperty.call(e,L)){if(n.indexOf(L)>=0)continue;S[L]=e[L]}return S}function nG(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function Iv(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?nG(Object(S),!0).forEach(function(L){Xge(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):nG(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function Xge(e,n,S){return n=Wge(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function Wge(e){var n=Yge(e,"string");return bE(n)=="symbol"?n:n+""}function Yge(e,n){if(bE(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(bE(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function wE(){return wE=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var S=arguments[n];for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(e[L]=S[L])}return e},wE.apply(this,arguments)}var Zge=function(n){var S=n.value,L=n.formatter,re=Ru(n.children)?S:n.children;return qu(L)?L(re):re},$ge=function(n,S){var L=dg(S-n),re=Math.min(Math.abs(S-n),360);return L*re},Kge=function(n,S,L){var re=n.position,ve=n.viewBox,Ce=n.offset,Be=n.className,Ge=ve,Ke=Ge.cx,dt=Ge.cy,gt=Ge.innerRadius,Vt=Ge.outerRadius,Xt=Ge.startAngle,cr=Ge.endAngle,sr=Ge.clockWise,nr=(gt+Vt)/2,zr=$ge(Xt,cr),Ne=zr>=0?1:-1,Jr,pn;re==="insideStart"?(Jr=Xt+Ne*Ce,pn=sr):re==="insideEnd"?(Jr=cr-Ne*Ce,pn=!sr):re==="end"&&(Jr=cr+Ne*Ce,pn=sr),pn=zr<=0?pn:!pn;var Lr=cp(Ke,dt,nr,Jr),Or=cp(Ke,dt,nr,Jr+(pn?1:-1)*359),cn="M".concat(Lr.x,",").concat(Lr.y,`
    A`).concat(nr,",").concat(nr,",0,1,").concat(pn?0:1,`,
    `).concat(Or.x,",").concat(Or.y),$n=Ru(n.id)?Tw("recharts-radial-line-"):n.id;return la.createElement("text",wE({},L,{dominantBaseline:"central",className:kc("recharts-radial-bar-label",Be)}),la.createElement("defs",null,la.createElement("path",{id:$n,d:cn})),la.createElement("textPath",{xlinkHref:"#".concat($n)},S))},Jge=function(n){var S=n.viewBox,L=n.offset,re=n.position,ve=S,Ce=ve.cx,Be=ve.cy,Ge=ve.innerRadius,Ke=ve.outerRadius,dt=ve.startAngle,gt=ve.endAngle,Vt=(dt+gt)/2;if(re==="outside"){var Xt=cp(Ce,Be,Ke+L,Vt),cr=Xt.x,sr=Xt.y;return{x:cr,y:sr,textAnchor:cr>=Ce?"start":"end",verticalAnchor:"middle"}}if(re==="center")return{x:Ce,y:Be,textAnchor:"middle",verticalAnchor:"middle"};if(re==="centerTop")return{x:Ce,y:Be,textAnchor:"middle",verticalAnchor:"start"};if(re==="centerBottom")return{x:Ce,y:Be,textAnchor:"middle",verticalAnchor:"end"};var nr=(Ge+Ke)/2,zr=cp(Ce,Be,nr,Vt),Ne=zr.x,Jr=zr.y;return{x:Ne,y:Jr,textAnchor:"middle",verticalAnchor:"middle"}},Qge=function(n){var S=n.viewBox,L=n.parentViewBox,re=n.offset,ve=n.position,Ce=S,Be=Ce.x,Ge=Ce.y,Ke=Ce.width,dt=Ce.height,gt=dt>=0?1:-1,Vt=gt*re,Xt=gt>0?"end":"start",cr=gt>0?"start":"end",sr=Ke>=0?1:-1,nr=sr*re,zr=sr>0?"end":"start",Ne=sr>0?"start":"end";if(ve==="top"){var Jr={x:Be+Ke/2,y:Ge-gt*re,textAnchor:"middle",verticalAnchor:Xt};return Iv(Iv({},Jr),L?{height:Math.max(Ge-L.y,0),width:Ke}:{})}if(ve==="bottom"){var pn={x:Be+Ke/2,y:Ge+dt+Vt,textAnchor:"middle",verticalAnchor:cr};return Iv(Iv({},pn),L?{height:Math.max(L.y+L.height-(Ge+dt),0),width:Ke}:{})}if(ve==="left"){var Lr={x:Be-nr,y:Ge+dt/2,textAnchor:zr,verticalAnchor:"middle"};return Iv(Iv({},Lr),L?{width:Math.max(Lr.x-L.x,0),height:dt}:{})}if(ve==="right"){var Or={x:Be+Ke+nr,y:Ge+dt/2,textAnchor:Ne,verticalAnchor:"middle"};return Iv(Iv({},Or),L?{width:Math.max(L.x+L.width-Or.x,0),height:dt}:{})}var cn=L?{width:Ke,height:dt}:{};return ve==="insideLeft"?Iv({x:Be+nr,y:Ge+dt/2,textAnchor:Ne,verticalAnchor:"middle"},cn):ve==="insideRight"?Iv({x:Be+Ke-nr,y:Ge+dt/2,textAnchor:zr,verticalAnchor:"middle"},cn):ve==="insideTop"?Iv({x:Be+Ke/2,y:Ge+Vt,textAnchor:"middle",verticalAnchor:cr},cn):ve==="insideBottom"?Iv({x:Be+Ke/2,y:Ge+dt-Vt,textAnchor:"middle",verticalAnchor:Xt},cn):ve==="insideTopLeft"?Iv({x:Be+nr,y:Ge+Vt,textAnchor:Ne,verticalAnchor:cr},cn):ve==="insideTopRight"?Iv({x:Be+Ke-nr,y:Ge+Vt,textAnchor:zr,verticalAnchor:cr},cn):ve==="insideBottomLeft"?Iv({x:Be+nr,y:Ge+dt-Vt,textAnchor:Ne,verticalAnchor:Xt},cn):ve==="insideBottomRight"?Iv({x:Be+Ke-nr,y:Ge+dt-Vt,textAnchor:zr,verticalAnchor:Xt},cn):FT(ve)&&(ys(ve.x)||aw(ve.x))&&(ys(ve.y)||aw(ve.y))?Iv({x:Be+gw(ve.x,Ke),y:Ge+gw(ve.y,dt),textAnchor:"end",verticalAnchor:"end"},cn):Iv({x:Be+Ke/2,y:Ge+dt/2,textAnchor:"middle",verticalAnchor:"middle"},cn)},eye=function(n){return"cx"in n&&ys(n.cx)};function Np(e){var n=e.offset,S=n===void 0?5:n,L=Hge(e,Fge),re=Iv({offset:S},L),ve=re.viewBox,Ce=re.position,Be=re.value,Ge=re.children,Ke=re.content,dt=re.className,gt=dt===void 0?"":dt,Vt=re.textBreakAll;if(!ve||Ru(Be)&&Ru(Ge)&&!na.isValidElement(Ke)&&!qu(Ke))return null;if(na.isValidElement(Ke))return na.cloneElement(Ke,re);var Xt;if(qu(Ke)){if(Xt=na.createElement(Ke,re),na.isValidElement(Xt))return Xt}else Xt=Zge(re);var cr=eye(ve),sr=Fu(re,!0);if(cr&&(Ce==="insideStart"||Ce==="insideEnd"||Ce==="end"))return Kge(re,Xt,sr);var nr=cr?Jge(re):Qge(re);return la.createElement(Z6,wE({className:kc("recharts-label",gt)},sr,nr,{breakAll:Vt}),Xt)}Np.displayName="Label";var r$=function(n){var S=n.cx,L=n.cy,re=n.angle,ve=n.startAngle,Ce=n.endAngle,Be=n.r,Ge=n.radius,Ke=n.innerRadius,dt=n.outerRadius,gt=n.x,Vt=n.y,Xt=n.top,cr=n.left,sr=n.width,nr=n.height,zr=n.clockWise,Ne=n.labelViewBox;if(Ne)return Ne;if(ys(sr)&&ys(nr)){if(ys(gt)&&ys(Vt))return{x:gt,y:Vt,width:sr,height:nr};if(ys(Xt)&&ys(cr))return{x:Xt,y:cr,width:sr,height:nr}}return ys(gt)&&ys(Vt)?{x:gt,y:Vt,width:0,height:0}:ys(S)&&ys(L)?{cx:S,cy:L,startAngle:ve||re||0,endAngle:Ce||re||0,innerRadius:Ke||0,outerRadius:dt||Ge||Be||0,clockWise:zr}:n.viewBox?n.viewBox:{}},tye=function(n,S){return n?n===!0?la.createElement(Np,{key:"label-implicit",viewBox:S}):Ov(n)?la.createElement(Np,{key:"label-implicit",viewBox:S,value:n}):na.isValidElement(n)?n.type===Np?na.cloneElement(n,{key:"label-implicit",viewBox:S}):la.createElement(Np,{key:"label-implicit",content:n,viewBox:S}):qu(n)?la.createElement(Np,{key:"label-implicit",content:n,viewBox:S}):FT(n)?la.createElement(Np,wE({viewBox:S},n,{key:"label-implicit"})):null:null},rye=function(n,S){var L=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!n||!n.children&&L&&!n.label)return null;var re=n.children,ve=r$(n),Ce=wm(re,Np).map(function(Ge,Ke){return na.cloneElement(Ge,{viewBox:S||ve,key:"label-".concat(Ke)})});if(!L)return Ce;var Be=tye(n.label,S||ve);return[Be].concat(Bge(Ce))};Np.parseViewBox=r$;Np.renderCallByParent=rye;var yO,aG;function nye(){if(aG)return yO;aG=1;function e(n){var S=n==null?0:n.length;return S?n[S-1]:void 0}return yO=e,yO}var aye=nye();const iye=ih(aye);function TE(e){"@babel/helpers - typeof";return TE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},TE(e)}var oye=["valueAccessor"],sye=["data","dataKey","clockWise","id","textBreakAll"];function lye(e){return hye(e)||fye(e)||cye(e)||uye()}function uye(){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 cye(e,n){if(e){if(typeof e=="string")return qz(e,n);var S=Object.prototype.toString.call(e).slice(8,-1);if(S==="Object"&&e.constructor&&(S=e.constructor.name),S==="Map"||S==="Set")return Array.from(e);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return qz(e,n)}}function fye(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function hye(e){if(Array.isArray(e))return qz(e)}function qz(e,n){(n==null||n>e.length)&&(n=e.length);for(var S=0,L=new Array(n);S<n;S++)L[S]=e[S];return L}function fP(){return fP=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var S=arguments[n];for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(e[L]=S[L])}return e},fP.apply(this,arguments)}function iG(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function oG(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?iG(Object(S),!0).forEach(function(L){dye(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):iG(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function dye(e,n,S){return n=vye(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function vye(e){var n=pye(e,"string");return TE(n)=="symbol"?n:n+""}function pye(e,n){if(TE(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(TE(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function sG(e,n){if(e==null)return{};var S=mye(e,n),L,re;if(Object.getOwnPropertySymbols){var ve=Object.getOwnPropertySymbols(e);for(re=0;re<ve.length;re++)L=ve[re],!(n.indexOf(L)>=0)&&Object.prototype.propertyIsEnumerable.call(e,L)&&(S[L]=e[L])}return S}function mye(e,n){if(e==null)return{};var S={};for(var L in e)if(Object.prototype.hasOwnProperty.call(e,L)){if(n.indexOf(L)>=0)continue;S[L]=e[L]}return S}var gye=function(n){return Array.isArray(n.value)?iye(n.value):n.value};function py(e){var n=e.valueAccessor,S=n===void 0?gye:n,L=sG(e,oye),re=L.data,ve=L.dataKey,Ce=L.clockWise,Be=L.id,Ge=L.textBreakAll,Ke=sG(L,sye);return!re||!re.length?null:la.createElement(Df,{className:"recharts-label-list"},re.map(function(dt,gt){var Vt=Ru(ve)?S(dt,gt):zv(dt&&dt.payload,ve),Xt=Ru(Be)?{}:{id:"".concat(Be,"-").concat(gt)};return la.createElement(Np,fP({},Fu(dt,!0),Ke,Xt,{parentViewBox:dt.parentViewBox,value:Vt,textBreakAll:Ge,viewBox:Np.parseViewBox(Ru(Ce)?dt:oG(oG({},dt),{},{clockWise:Ce})),key:"label-".concat(gt),index:gt}))}))}py.displayName="LabelList";function yye(e,n){return e?e===!0?la.createElement(py,{key:"labelList-implicit",data:n}):la.isValidElement(e)||qu(e)?la.createElement(py,{key:"labelList-implicit",data:n,content:e}):FT(e)?la.createElement(py,fP({data:n},e,{key:"labelList-implicit"})):null:null}function _ye(e,n){var S=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&S&&!e.label)return null;var L=e.children,re=wm(L,py).map(function(Ce,Be){return na.cloneElement(Ce,{data:n,key:"labelList-".concat(Be)})});if(!S)return re;var ve=yye(e.label,n);return[ve].concat(lye(re))}py.renderCallByParent=_ye;function AE(e){"@babel/helpers - typeof";return AE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},AE(e)}function Vz(){return Vz=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var S=arguments[n];for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(e[L]=S[L])}return e},Vz.apply(this,arguments)}function lG(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function uG(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?lG(Object(S),!0).forEach(function(L){xye(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):lG(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function xye(e,n,S){return n=bye(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function bye(e){var n=wye(e,"string");return AE(n)=="symbol"?n:n+""}function wye(e,n){if(AE(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(AE(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var Tye=function(n,S){var L=dg(S-n),re=Math.min(Math.abs(S-n),359.999);return L*re},S6=function(n){var S=n.cx,L=n.cy,re=n.radius,ve=n.angle,Ce=n.sign,Be=n.isExternal,Ge=n.cornerRadius,Ke=n.cornerIsExternal,dt=Ge*(Be?1:-1)+re,gt=Math.asin(Ge/dt)/cP,Vt=Ke?ve:ve+Ce*gt,Xt=cp(S,L,dt,Vt),cr=cp(S,L,re,Vt),sr=Ke?ve-Ce*gt:ve,nr=cp(S,L,dt*Math.cos(gt*cP),sr);return{center:Xt,circleTangency:cr,lineTangency:nr,theta:gt}},n$=function(n){var S=n.cx,L=n.cy,re=n.innerRadius,ve=n.outerRadius,Ce=n.startAngle,Be=n.endAngle,Ge=Tye(Ce,Be),Ke=Ce+Ge,dt=cp(S,L,ve,Ce),gt=cp(S,L,ve,Ke),Vt="M ".concat(dt.x,",").concat(dt.y,`
    A `).concat(ve,",").concat(ve,`,0,
    `).concat(+(Math.abs(Ge)>180),",").concat(+(Ce>Ke),`,
    `).concat(gt.x,",").concat(gt.y,`
  `);if(re>0){var Xt=cp(S,L,re,Ce),cr=cp(S,L,re,Ke);Vt+="L ".concat(cr.x,",").concat(cr.y,`
            A `).concat(re,",").concat(re,`,0,
            `).concat(+(Math.abs(Ge)>180),",").concat(+(Ce<=Ke),`,
            `).concat(Xt.x,",").concat(Xt.y," Z")}else Vt+="L ".concat(S,",").concat(L," Z");return Vt},Aye=function(n){var S=n.cx,L=n.cy,re=n.innerRadius,ve=n.outerRadius,Ce=n.cornerRadius,Be=n.forceCornerRadius,Ge=n.cornerIsExternal,Ke=n.startAngle,dt=n.endAngle,gt=dg(dt-Ke),Vt=S6({cx:S,cy:L,radius:ve,angle:Ke,sign:gt,cornerRadius:Ce,cornerIsExternal:Ge}),Xt=Vt.circleTangency,cr=Vt.lineTangency,sr=Vt.theta,nr=S6({cx:S,cy:L,radius:ve,angle:dt,sign:-gt,cornerRadius:Ce,cornerIsExternal:Ge}),zr=nr.circleTangency,Ne=nr.lineTangency,Jr=nr.theta,pn=Ge?Math.abs(Ke-dt):Math.abs(Ke-dt)-sr-Jr;if(pn<0)return Be?"M ".concat(cr.x,",").concat(cr.y,`
        a`).concat(Ce,",").concat(Ce,",0,0,1,").concat(Ce*2,`,0
        a`).concat(Ce,",").concat(Ce,",0,0,1,").concat(-Ce*2,`,0
      `):n$({cx:S,cy:L,innerRadius:re,outerRadius:ve,startAngle:Ke,endAngle:dt});var Lr="M ".concat(cr.x,",").concat(cr.y,`
    A`).concat(Ce,",").concat(Ce,",0,0,").concat(+(gt<0),",").concat(Xt.x,",").concat(Xt.y,`
    A`).concat(ve,",").concat(ve,",0,").concat(+(pn>180),",").concat(+(gt<0),",").concat(zr.x,",").concat(zr.y,`
    A`).concat(Ce,",").concat(Ce,",0,0,").concat(+(gt<0),",").concat(Ne.x,",").concat(Ne.y,`
  `);if(re>0){var Or=S6({cx:S,cy:L,radius:re,angle:Ke,sign:gt,isExternal:!0,cornerRadius:Ce,cornerIsExternal:Ge}),cn=Or.circleTangency,$n=Or.lineTangency,xn=Or.theta,Wa=S6({cx:S,cy:L,radius:re,angle:dt,sign:-gt,isExternal:!0,cornerRadius:Ce,cornerIsExternal:Ge}),On=Wa.circleTangency,qn=Wa.lineTangency,ca=Wa.theta,Fn=Ge?Math.abs(Ke-dt):Math.abs(Ke-dt)-xn-ca;if(Fn<0&&Ce===0)return"".concat(Lr,"L").concat(S,",").concat(L,"Z");Lr+="L".concat(qn.x,",").concat(qn.y,`
      A`).concat(Ce,",").concat(Ce,",0,0,").concat(+(gt<0),",").concat(On.x,",").concat(On.y,`
      A`).concat(re,",").concat(re,",0,").concat(+(Fn>180),",").concat(+(gt>0),",").concat(cn.x,",").concat(cn.y,`
      A`).concat(Ce,",").concat(Ce,",0,0,").concat(+(gt<0),",").concat($n.x,",").concat($n.y,"Z")}else Lr+="L".concat(S,",").concat(L,"Z");return Lr},Sye={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},a$=function(n){var S=uG(uG({},Sye),n),L=S.cx,re=S.cy,ve=S.innerRadius,Ce=S.outerRadius,Be=S.cornerRadius,Ge=S.forceCornerRadius,Ke=S.cornerIsExternal,dt=S.startAngle,gt=S.endAngle,Vt=S.className;if(Ce<ve||dt===gt)return null;var Xt=kc("recharts-sector",Vt),cr=Ce-ve,sr=gw(Be,cr,0,!0),nr;return sr>0&&Math.abs(dt-gt)<360?nr=Aye({cx:L,cy:re,innerRadius:ve,outerRadius:Ce,cornerRadius:Math.min(sr,cr/2),forceCornerRadius:Ge,cornerIsExternal:Ke,startAngle:dt,endAngle:gt}):nr=n$({cx:L,cy:re,innerRadius:ve,outerRadius:Ce,startAngle:dt,endAngle:gt}),la.createElement("path",Vz({},Fu(S,!0),{className:Xt,d:nr,role:"img"}))};function SE(e){"@babel/helpers - typeof";return SE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},SE(e)}function Hz(){return Hz=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var S=arguments[n];for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(e[L]=S[L])}return e},Hz.apply(this,arguments)}function cG(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function fG(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?cG(Object(S),!0).forEach(function(L){Eye(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):cG(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function Eye(e,n,S){return n=Mye(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function Mye(e){var n=Cye(e,"string");return SE(n)=="symbol"?n:n+""}function Cye(e,n){if(SE(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(SE(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var hG={curveBasisClosed:Yce,curveBasisOpen:Zce,curveBasis:Wce,curveBumpX:Ice,curveBumpY:Dce,curveLinearClosed:$ce,curveLinear:$P,curveMonotoneX:Kce,curveMonotoneY:Jce,curveNatural:Qce,curveStep:efe,curveStepAfter:rfe,curveStepBefore:tfe},E6=function(n){return n.x===+n.x&&n.y===+n.y},j5=function(n){return n.x},U5=function(n){return n.y},kye=function(n,S){if(qu(n))return n;var L="curve".concat(YP(n));return(L==="curveMonotone"||L==="curveBump")&&S?hG["".concat(L).concat(S==="vertical"?"Y":"X")]:hG[L]||$P},Pye=function(n){var S=n.type,L=S===void 0?"linear":S,re=n.points,ve=re===void 0?[]:re,Ce=n.baseLine,Be=n.layout,Ge=n.connectNulls,Ke=Ge===void 0?!1:Ge,dt=kye(L,Be),gt=Ke?ve.filter(function(sr){return E6(sr)}):ve,Vt;if(Array.isArray(Ce)){var Xt=Ke?Ce.filter(function(sr){return E6(sr)}):Ce,cr=gt.map(function(sr,nr){return fG(fG({},sr),{},{base:Xt[nr]})});return Be==="vertical"?Vt=g6().y(U5).x1(j5).x0(function(sr){return sr.base.x}):Vt=g6().x(j5).y1(U5).y0(function(sr){return sr.base.y}),Vt.defined(E6).curve(dt),Vt(cr)}return Be==="vertical"&&ys(Ce)?Vt=g6().y(U5).x1(j5).x0(Ce):ys(Ce)?Vt=g6().x(j5).y1(U5).y0(Ce):Vt=uY().x(j5).y(U5),Vt.defined(E6).curve(dt),Vt(gt)},hw=function(n){var S=n.className,L=n.points,re=n.path,ve=n.pathRef;if((!L||!L.length)&&!re)return null;var Ce=L&&L.length?Pye(n):re;return na.createElement("path",Hz({},Fu(n,!1),F6(n),{className:kc("recharts-curve",S),d:Ce,ref:ve}))},_O={exports:{}},xO,dG;function Lye(){if(dG)return xO;dG=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return xO=e,xO}var bO,vG;function Rye(){if(vG)return bO;vG=1;var e=Lye();function n(){}function S(){}return S.resetWarningCache=n,bO=function(){function L(Ce,Be,Ge,Ke,dt,gt){if(gt!==e){var Vt=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 Vt.name="Invariant Violation",Vt}}L.isRequired=L;function re(){return L}var ve={array:L,bigint:L,bool:L,func:L,number:L,object:L,string:L,symbol:L,any:L,arrayOf:re,element:L,elementType:L,instanceOf:re,node:L,objectOf:re,oneOf:re,oneOfType:re,shape:re,exact:re,checkPropTypes:S,resetWarningCache:n};return ve.PropTypes=ve,ve},bO}var pG;function i$(){return pG||(pG=1,_O.exports=Rye()()),_O.exports}var Iye=i$();const Hf=ih(Iye);var Dye=Object.getOwnPropertyNames,Oye=Object.getOwnPropertySymbols,zye=Object.prototype.hasOwnProperty;function mG(e,n){return function(L,re,ve){return e(L,re,ve)&&n(L,re,ve)}}function M6(e){return function(S,L,re){if(!S||!L||typeof S!="object"||typeof L!="object")return e(S,L,re);var ve=re.cache,Ce=ve.get(S),Be=ve.get(L);if(Ce&&Be)return Ce===L&&Be===S;ve.set(S,L),ve.set(L,S);var Ge=e(S,L,re);return ve.delete(S),ve.delete(L),Ge}}function Nye(e){return e?.[Symbol.toStringTag]}function gG(e){return Dye(e).concat(Oye(e))}var Fye=Object.hasOwn||(function(e,n){return zye.call(e,n)});function Ew(e,n){return e===n||!e&&!n&&e!==e&&n!==n}var Bye="__v",jye="__o",Uye="_owner",yG=Object.getOwnPropertyDescriptor,_G=Object.keys;function qye(e,n,S){var L=e.length;if(n.length!==L)return!1;for(;L-- >0;)if(!S.equals(e[L],n[L],L,L,e,n,S))return!1;return!0}function Vye(e,n){return Ew(e.getTime(),n.getTime())}function Hye(e,n){return e.name===n.name&&e.message===n.message&&e.cause===n.cause&&e.stack===n.stack}function Gye(e,n){return e===n}function xG(e,n,S){var L=e.size;if(L!==n.size)return!1;if(!L)return!0;for(var re=new Array(L),ve=e.entries(),Ce,Be,Ge=0;(Ce=ve.next())&&!Ce.done;){for(var Ke=n.entries(),dt=!1,gt=0;(Be=Ke.next())&&!Be.done;){if(re[gt]){gt++;continue}var Vt=Ce.value,Xt=Be.value;if(S.equals(Vt[0],Xt[0],Ge,gt,e,n,S)&&S.equals(Vt[1],Xt[1],Vt[0],Xt[0],e,n,S)){dt=re[gt]=!0;break}gt++}if(!dt)return!1;Ge++}return!0}var Xye=Ew;function Wye(e,n,S){var L=_G(e),re=L.length;if(_G(n).length!==re)return!1;for(;re-- >0;)if(!o$(e,n,S,L[re]))return!1;return!0}function q5(e,n,S){var L=gG(e),re=L.length;if(gG(n).length!==re)return!1;for(var ve,Ce,Be;re-- >0;)if(ve=L[re],!o$(e,n,S,ve)||(Ce=yG(e,ve),Be=yG(n,ve),(Ce||Be)&&(!Ce||!Be||Ce.configurable!==Be.configurable||Ce.enumerable!==Be.enumerable||Ce.writable!==Be.writable)))return!1;return!0}function Yye(e,n){return Ew(e.valueOf(),n.valueOf())}function Zye(e,n){return e.source===n.source&&e.flags===n.flags}function bG(e,n,S){var L=e.size;if(L!==n.size)return!1;if(!L)return!0;for(var re=new Array(L),ve=e.values(),Ce,Be;(Ce=ve.next())&&!Ce.done;){for(var Ge=n.values(),Ke=!1,dt=0;(Be=Ge.next())&&!Be.done;){if(!re[dt]&&S.equals(Ce.value,Be.value,Ce.value,Be.value,e,n,S)){Ke=re[dt]=!0;break}dt++}if(!Ke)return!1}return!0}function $ye(e,n){var S=e.length;if(n.length!==S)return!1;for(;S-- >0;)if(e[S]!==n[S])return!1;return!0}function Kye(e,n){return e.hostname===n.hostname&&e.pathname===n.pathname&&e.protocol===n.protocol&&e.port===n.port&&e.hash===n.hash&&e.username===n.username&&e.password===n.password}function o$(e,n,S,L){return(L===Uye||L===jye||L===Bye)&&(e.$$typeof||n.$$typeof)?!0:Fye(n,L)&&S.equals(e[L],n[L],L,L,e,n,S)}var Jye="[object Arguments]",Qye="[object Boolean]",e1e="[object Date]",t1e="[object Error]",r1e="[object Map]",n1e="[object Number]",a1e="[object Object]",i1e="[object RegExp]",o1e="[object Set]",s1e="[object String]",l1e="[object URL]",u1e=Array.isArray,wG=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,TG=Object.assign,c1e=Object.prototype.toString.call.bind(Object.prototype.toString);function f1e(e){var n=e.areArraysEqual,S=e.areDatesEqual,L=e.areErrorsEqual,re=e.areFunctionsEqual,ve=e.areMapsEqual,Ce=e.areNumbersEqual,Be=e.areObjectsEqual,Ge=e.arePrimitiveWrappersEqual,Ke=e.areRegExpsEqual,dt=e.areSetsEqual,gt=e.areTypedArraysEqual,Vt=e.areUrlsEqual,Xt=e.unknownTagComparators;return function(sr,nr,zr){if(sr===nr)return!0;if(sr==null||nr==null)return!1;var Ne=typeof sr;if(Ne!==typeof nr)return!1;if(Ne!=="object")return Ne==="number"?Ce(sr,nr,zr):Ne==="function"?re(sr,nr,zr):!1;var Jr=sr.constructor;if(Jr!==nr.constructor)return!1;if(Jr===Object)return Be(sr,nr,zr);if(u1e(sr))return n(sr,nr,zr);if(wG!=null&&wG(sr))return gt(sr,nr,zr);if(Jr===Date)return S(sr,nr,zr);if(Jr===RegExp)return Ke(sr,nr,zr);if(Jr===Map)return ve(sr,nr,zr);if(Jr===Set)return dt(sr,nr,zr);var pn=c1e(sr);if(pn===e1e)return S(sr,nr,zr);if(pn===i1e)return Ke(sr,nr,zr);if(pn===r1e)return ve(sr,nr,zr);if(pn===o1e)return dt(sr,nr,zr);if(pn===a1e)return typeof sr.then!="function"&&typeof nr.then!="function"&&Be(sr,nr,zr);if(pn===l1e)return Vt(sr,nr,zr);if(pn===t1e)return L(sr,nr,zr);if(pn===Jye)return Be(sr,nr,zr);if(pn===Qye||pn===n1e||pn===s1e)return Ge(sr,nr,zr);if(Xt){var Lr=Xt[pn];if(!Lr){var Or=Nye(sr);Or&&(Lr=Xt[Or])}if(Lr)return Lr(sr,nr,zr)}return!1}}function h1e(e){var n=e.circular,S=e.createCustomConfig,L=e.strict,re={areArraysEqual:L?q5:qye,areDatesEqual:Vye,areErrorsEqual:Hye,areFunctionsEqual:Gye,areMapsEqual:L?mG(xG,q5):xG,areNumbersEqual:Xye,areObjectsEqual:L?q5:Wye,arePrimitiveWrappersEqual:Yye,areRegExpsEqual:Zye,areSetsEqual:L?mG(bG,q5):bG,areTypedArraysEqual:L?q5:$ye,areUrlsEqual:Kye,unknownTagComparators:void 0};if(S&&(re=TG({},re,S(re))),n){var ve=M6(re.areArraysEqual),Ce=M6(re.areMapsEqual),Be=M6(re.areObjectsEqual),Ge=M6(re.areSetsEqual);re=TG({},re,{areArraysEqual:ve,areMapsEqual:Ce,areObjectsEqual:Be,areSetsEqual:Ge})}return re}function d1e(e){return function(n,S,L,re,ve,Ce,Be){return e(n,S,Be)}}function v1e(e){var n=e.circular,S=e.comparator,L=e.createState,re=e.equals,ve=e.strict;if(L)return function(Ge,Ke){var dt=L(),gt=dt.cache,Vt=gt===void 0?n?new WeakMap:void 0:gt,Xt=dt.meta;return S(Ge,Ke,{cache:Vt,equals:re,meta:Xt,strict:ve})};if(n)return function(Ge,Ke){return S(Ge,Ke,{cache:new WeakMap,equals:re,meta:void 0,strict:ve})};var Ce={cache:void 0,equals:re,meta:void 0,strict:ve};return function(Ge,Ke){return S(Ge,Ke,Ce)}}var p1e=mx();mx({strict:!0});mx({circular:!0});mx({circular:!0,strict:!0});mx({createInternalComparator:function(){return Ew}});mx({strict:!0,createInternalComparator:function(){return Ew}});mx({circular:!0,createInternalComparator:function(){return Ew}});mx({circular:!0,createInternalComparator:function(){return Ew},strict:!0});function mx(e){e===void 0&&(e={});var n=e.circular,S=n===void 0?!1:n,L=e.createInternalComparator,re=e.createState,ve=e.strict,Ce=ve===void 0?!1:ve,Be=h1e(e),Ge=f1e(Be),Ke=L?L(Ge):d1e(Ge);return v1e({circular:S,comparator:Ge,createState:re,equals:Ke,strict:Ce})}function m1e(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function AG(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,S=-1,L=function re(ve){S<0&&(S=ve),ve-S>n?(e(ve),S=-1):m1e(re)};requestAnimationFrame(L)}function Gz(e){"@babel/helpers - typeof";return Gz=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Gz(e)}function g1e(e){return b1e(e)||x1e(e)||_1e(e)||y1e()}function y1e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _1e(e,n){if(e){if(typeof e=="string")return SG(e,n);var S=Object.prototype.toString.call(e).slice(8,-1);if(S==="Object"&&e.constructor&&(S=e.constructor.name),S==="Map"||S==="Set")return Array.from(e);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return SG(e,n)}}function SG(e,n){(n==null||n>e.length)&&(n=e.length);for(var S=0,L=new Array(n);S<n;S++)L[S]=e[S];return L}function x1e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function b1e(e){if(Array.isArray(e))return e}function w1e(){var e={},n=function(){return null},S=!1,L=function re(ve){if(!S){if(Array.isArray(ve)){if(!ve.length)return;var Ce=ve,Be=g1e(Ce),Ge=Be[0],Ke=Be.slice(1);if(typeof Ge=="number"){AG(re.bind(null,Ke),Ge);return}re(Ge),AG(re.bind(null,Ke));return}Gz(ve)==="object"&&(e=ve,n(e)),typeof ve=="function"&&ve()}};return{stop:function(){S=!0},start:function(ve){S=!1,L(ve)},subscribe:function(ve){return n=ve,function(){n=function(){return null}}}}}function EE(e){"@babel/helpers - typeof";return EE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},EE(e)}function EG(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function MG(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?EG(Object(S),!0).forEach(function(L){s$(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):EG(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function s$(e,n,S){return n=T1e(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function T1e(e){var n=A1e(e,"string");return EE(n)==="symbol"?n:String(n)}function A1e(e,n){if(EE(e)!=="object"||e===null)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(EE(L)!=="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var S1e=function(n,S){return[Object.keys(n),Object.keys(S)].reduce(function(L,re){return L.filter(function(ve){return re.includes(ve)})})},E1e=function(n){return n},M1e=function(n){return n.replace(/([A-Z])/g,function(S){return"-".concat(S.toLowerCase())})},J5=function(n,S){return Object.keys(S).reduce(function(L,re){return MG(MG({},L),{},s$({},re,n(re,S[re])))},{})},CG=function(n,S,L){return n.map(function(re){return"".concat(M1e(re)," ").concat(S,"ms ").concat(L)}).join(",")};function C1e(e,n){return L1e(e)||P1e(e,n)||l$(e,n)||k1e()}function k1e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function P1e(e,n){var S=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(S!=null){var L,re,ve,Ce,Be=[],Ge=!0,Ke=!1;try{if(ve=(S=S.call(e)).next,n!==0)for(;!(Ge=(L=ve.call(S)).done)&&(Be.push(L.value),Be.length!==n);Ge=!0);}catch(dt){Ke=!0,re=dt}finally{try{if(!Ge&&S.return!=null&&(Ce=S.return(),Object(Ce)!==Ce))return}finally{if(Ke)throw re}}return Be}}function L1e(e){if(Array.isArray(e))return e}function R1e(e){return O1e(e)||D1e(e)||l$(e)||I1e()}function I1e(){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 l$(e,n){if(e){if(typeof e=="string")return Xz(e,n);var S=Object.prototype.toString.call(e).slice(8,-1);if(S==="Object"&&e.constructor&&(S=e.constructor.name),S==="Map"||S==="Set")return Array.from(e);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return Xz(e,n)}}function D1e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function O1e(e){if(Array.isArray(e))return Xz(e)}function Xz(e,n){(n==null||n>e.length)&&(n=e.length);for(var S=0,L=new Array(n);S<n;S++)L[S]=e[S];return L}var hP=1e-4,u$=function(n,S){return[0,3*n,3*S-6*n,3*n-3*S+1]},c$=function(n,S){return n.map(function(L,re){return L*Math.pow(S,re)}).reduce(function(L,re){return L+re})},kG=function(n,S){return function(L){var re=u$(n,S);return c$(re,L)}},z1e=function(n,S){return function(L){var re=u$(n,S),ve=[].concat(R1e(re.map(function(Ce,Be){return Ce*Be}).slice(1)),[0]);return c$(ve,L)}},PG=function(){for(var n=arguments.length,S=new Array(n),L=0;L<n;L++)S[L]=arguments[L];var re=S[0],ve=S[1],Ce=S[2],Be=S[3];if(S.length===1)switch(S[0]){case"linear":re=0,ve=0,Ce=1,Be=1;break;case"ease":re=.25,ve=.1,Ce=.25,Be=1;break;case"ease-in":re=.42,ve=0,Ce=1,Be=1;break;case"ease-out":re=.42,ve=0,Ce=.58,Be=1;break;case"ease-in-out":re=0,ve=0,Ce=.58,Be=1;break;default:{var Ge=S[0].split("(");if(Ge[0]==="cubic-bezier"&&Ge[1].split(")")[0].split(",").length===4){var Ke=Ge[1].split(")")[0].split(",").map(function(nr){return parseFloat(nr)}),dt=C1e(Ke,4);re=dt[0],ve=dt[1],Ce=dt[2],Be=dt[3]}}}var gt=kG(re,Ce),Vt=kG(ve,Be),Xt=z1e(re,Ce),cr=function(zr){return zr>1?1:zr<0?0:zr},sr=function(zr){for(var Ne=zr>1?1:zr,Jr=Ne,pn=0;pn<8;++pn){var Lr=gt(Jr)-Ne,Or=Xt(Jr);if(Math.abs(Lr-Ne)<hP||Or<hP)return Vt(Jr);Jr=cr(Jr-Lr/Or)}return Vt(Jr)};return sr.isStepper=!1,sr},N1e=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},S=n.stiff,L=S===void 0?100:S,re=n.damping,ve=re===void 0?8:re,Ce=n.dt,Be=Ce===void 0?17:Ce,Ge=function(dt,gt,Vt){var Xt=-(dt-gt)*L,cr=Vt*ve,sr=Vt+(Xt-cr)*Be/1e3,nr=Vt*Be/1e3+dt;return Math.abs(nr-gt)<hP&&Math.abs(sr)<hP?[gt,0]:[nr,sr]};return Ge.isStepper=!0,Ge.dt=Be,Ge},F1e=function(){for(var n=arguments.length,S=new Array(n),L=0;L<n;L++)S[L]=arguments[L];var re=S[0];if(typeof re=="string")switch(re){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return PG(re);case"spring":return N1e();default:if(re.split("(")[0]==="cubic-bezier")return PG(re)}return typeof re=="function"?re:null};function ME(e){"@babel/helpers - typeof";return ME=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ME(e)}function LG(e){return U1e(e)||j1e(e)||f$(e)||B1e()}function B1e(){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 j1e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function U1e(e){if(Array.isArray(e))return Yz(e)}function RG(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function up(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?RG(Object(S),!0).forEach(function(L){Wz(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):RG(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function Wz(e,n,S){return n=q1e(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function q1e(e){var n=V1e(e,"string");return ME(n)==="symbol"?n:String(n)}function V1e(e,n){if(ME(e)!=="object"||e===null)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(ME(L)!=="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function H1e(e,n){return W1e(e)||X1e(e,n)||f$(e,n)||G1e()}function G1e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function f$(e,n){if(e){if(typeof e=="string")return Yz(e,n);var S=Object.prototype.toString.call(e).slice(8,-1);if(S==="Object"&&e.constructor&&(S=e.constructor.name),S==="Map"||S==="Set")return Array.from(e);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return Yz(e,n)}}function Yz(e,n){(n==null||n>e.length)&&(n=e.length);for(var S=0,L=new Array(n);S<n;S++)L[S]=e[S];return L}function X1e(e,n){var S=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(S!=null){var L,re,ve,Ce,Be=[],Ge=!0,Ke=!1;try{if(ve=(S=S.call(e)).next,n!==0)for(;!(Ge=(L=ve.call(S)).done)&&(Be.push(L.value),Be.length!==n);Ge=!0);}catch(dt){Ke=!0,re=dt}finally{try{if(!Ge&&S.return!=null&&(Ce=S.return(),Object(Ce)!==Ce))return}finally{if(Ke)throw re}}return Be}}function W1e(e){if(Array.isArray(e))return e}var dP=function(n,S,L){return n+(S-n)*L},Zz=function(n){var S=n.from,L=n.to;return S!==L},Y1e=function e(n,S,L){var re=J5(function(ve,Ce){if(Zz(Ce)){var Be=n(Ce.from,Ce.to,Ce.velocity),Ge=H1e(Be,2),Ke=Ge[0],dt=Ge[1];return up(up({},Ce),{},{from:Ke,velocity:dt})}return Ce},S);return L<1?J5(function(ve,Ce){return Zz(Ce)?up(up({},Ce),{},{velocity:dP(Ce.velocity,re[ve].velocity,L),from:dP(Ce.from,re[ve].from,L)}):Ce},S):e(n,re,L-1)};const Z1e=(function(e,n,S,L,re){var ve=S1e(e,n),Ce=ve.reduce(function(nr,zr){return up(up({},nr),{},Wz({},zr,[e[zr],n[zr]]))},{}),Be=ve.reduce(function(nr,zr){return up(up({},nr),{},Wz({},zr,{from:e[zr],velocity:0,to:n[zr]}))},{}),Ge=-1,Ke,dt,gt=function(){return null},Vt=function(){return J5(function(zr,Ne){return Ne.from},Be)},Xt=function(){return!Object.values(Be).filter(Zz).length},cr=function(zr){Ke||(Ke=zr);var Ne=zr-Ke,Jr=Ne/S.dt;Be=Y1e(S,Be,Jr),re(up(up(up({},e),n),Vt())),Ke=zr,Xt()||(Ge=requestAnimationFrame(gt))},sr=function(zr){dt||(dt=zr);var Ne=(zr-dt)/L,Jr=J5(function(Lr,Or){return dP.apply(void 0,LG(Or).concat([S(Ne)]))},Ce);if(re(up(up(up({},e),n),Jr)),Ne<1)Ge=requestAnimationFrame(gt);else{var pn=J5(function(Lr,Or){return dP.apply(void 0,LG(Or).concat([S(1)]))},Ce);re(up(up(up({},e),n),pn))}};return gt=S.isStepper?cr:sr,function(){return requestAnimationFrame(gt),function(){cancelAnimationFrame(Ge)}}});function _T(e){"@babel/helpers - typeof";return _T=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},_T(e)}var $1e=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function K1e(e,n){if(e==null)return{};var S=J1e(e,n),L,re;if(Object.getOwnPropertySymbols){var ve=Object.getOwnPropertySymbols(e);for(re=0;re<ve.length;re++)L=ve[re],!(n.indexOf(L)>=0)&&Object.prototype.propertyIsEnumerable.call(e,L)&&(S[L]=e[L])}return S}function J1e(e,n){if(e==null)return{};var S={},L=Object.keys(e),re,ve;for(ve=0;ve<L.length;ve++)re=L[ve],!(n.indexOf(re)>=0)&&(S[re]=e[re]);return S}function wO(e){return r_e(e)||t_e(e)||e_e(e)||Q1e()}function Q1e(){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 e_e(e,n){if(e){if(typeof e=="string")return $z(e,n);var S=Object.prototype.toString.call(e).slice(8,-1);if(S==="Object"&&e.constructor&&(S=e.constructor.name),S==="Map"||S==="Set")return Array.from(e);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return $z(e,n)}}function t_e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function r_e(e){if(Array.isArray(e))return $z(e)}function $z(e,n){(n==null||n>e.length)&&(n=e.length);for(var S=0,L=new Array(n);S<n;S++)L[S]=e[S];return L}function IG(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function ug(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?IG(Object(S),!0).forEach(function(L){Y5(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):IG(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function Y5(e,n,S){return n=h$(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function n_e(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function a_e(e,n){for(var S=0;S<n.length;S++){var L=n[S];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(e,h$(L.key),L)}}function i_e(e,n,S){return n&&a_e(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function h$(e){var n=o_e(e,"string");return _T(n)==="symbol"?n:String(n)}function o_e(e,n){if(_T(e)!=="object"||e===null)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(_T(L)!=="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function s_e(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&Kz(e,n)}function Kz(e,n){return Kz=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(L,re){return L.__proto__=re,L},Kz(e,n)}function l_e(e){var n=u_e();return function(){var L=vP(e),re;if(n){var ve=vP(this).constructor;re=Reflect.construct(L,arguments,ve)}else re=L.apply(this,arguments);return Jz(this,re)}}function Jz(e,n){if(n&&(_T(n)==="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Qz(e)}function Qz(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function u_e(){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 vP(e){return vP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(S){return S.__proto__||Object.getPrototypeOf(S)},vP(e)}var vg=(function(e){s_e(S,e);var n=l_e(S);function S(L,re){var ve;n_e(this,S),ve=n.call(this,L,re);var Ce=ve.props,Be=Ce.isActive,Ge=Ce.attributeName,Ke=Ce.from,dt=Ce.to,gt=Ce.steps,Vt=Ce.children,Xt=Ce.duration;if(ve.handleStyleChange=ve.handleStyleChange.bind(Qz(ve)),ve.changeStyle=ve.changeStyle.bind(Qz(ve)),!Be||Xt<=0)return ve.state={style:{}},typeof Vt=="function"&&(ve.state={style:dt}),Jz(ve);if(gt&&gt.length)ve.state={style:gt[0].style};else if(Ke){if(typeof Vt=="function")return ve.state={style:Ke},Jz(ve);ve.state={style:Ge?Y5({},Ge,Ke):Ke}}else ve.state={style:{}};return ve}return i_e(S,[{key:"componentDidMount",value:function(){var re=this.props,ve=re.isActive,Ce=re.canBegin;this.mounted=!0,!(!ve||!Ce)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(re){var ve=this.props,Ce=ve.isActive,Be=ve.canBegin,Ge=ve.attributeName,Ke=ve.shouldReAnimate,dt=ve.to,gt=ve.from,Vt=this.state.style;if(Be){if(!Ce){var Xt={style:Ge?Y5({},Ge,dt):dt};this.state&&Vt&&(Ge&&Vt[Ge]!==dt||!Ge&&Vt!==dt)&&this.setState(Xt);return}if(!(p1e(re.to,dt)&&re.canBegin&&re.isActive)){var cr=!re.canBegin||!re.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var sr=cr||Ke?gt:re.to;if(this.state&&Vt){var nr={style:Ge?Y5({},Ge,sr):sr};(Ge&&Vt[Ge]!==sr||!Ge&&Vt!==sr)&&this.setState(nr)}this.runAnimation(ug(ug({},this.props),{},{from:sr,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var re=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),re&&re()}},{key:"handleStyleChange",value:function(re){this.changeStyle(re)}},{key:"changeStyle",value:function(re){this.mounted&&this.setState({style:re})}},{key:"runJSAnimation",value:function(re){var ve=this,Ce=re.from,Be=re.to,Ge=re.duration,Ke=re.easing,dt=re.begin,gt=re.onAnimationEnd,Vt=re.onAnimationStart,Xt=Z1e(Ce,Be,F1e(Ke),Ge,this.changeStyle),cr=function(){ve.stopJSAnimation=Xt()};this.manager.start([Vt,dt,cr,Ge,gt])}},{key:"runStepAnimation",value:function(re){var ve=this,Ce=re.steps,Be=re.begin,Ge=re.onAnimationStart,Ke=Ce[0],dt=Ke.style,gt=Ke.duration,Vt=gt===void 0?0:gt,Xt=function(sr,nr,zr){if(zr===0)return sr;var Ne=nr.duration,Jr=nr.easing,pn=Jr===void 0?"ease":Jr,Lr=nr.style,Or=nr.properties,cn=nr.onAnimationEnd,$n=zr>0?Ce[zr-1]:nr,xn=Or||Object.keys(Lr);if(typeof pn=="function"||pn==="spring")return[].concat(wO(sr),[ve.runJSAnimation.bind(ve,{from:$n.style,to:Lr,duration:Ne,easing:pn}),Ne]);var Wa=CG(xn,Ne,pn),On=ug(ug(ug({},$n.style),Lr),{},{transition:Wa});return[].concat(wO(sr),[On,Ne,cn]).filter(E1e)};return this.manager.start([Ge].concat(wO(Ce.reduce(Xt,[dt,Math.max(Vt,Be)])),[re.onAnimationEnd]))}},{key:"runAnimation",value:function(re){this.manager||(this.manager=w1e());var ve=re.begin,Ce=re.duration,Be=re.attributeName,Ge=re.to,Ke=re.easing,dt=re.onAnimationStart,gt=re.onAnimationEnd,Vt=re.steps,Xt=re.children,cr=this.manager;if(this.unSubscribe=cr.subscribe(this.handleStyleChange),typeof Ke=="function"||typeof Xt=="function"||Ke==="spring"){this.runJSAnimation(re);return}if(Vt.length>1){this.runStepAnimation(re);return}var sr=Be?Y5({},Be,Ge):Ge,nr=CG(Object.keys(sr),Ce,Ke);cr.start([dt,ve,ug(ug({},sr),{},{transition:nr}),Ce,gt])}},{key:"render",value:function(){var re=this.props,ve=re.children;re.begin;var Ce=re.duration;re.attributeName,re.easing;var Be=re.isActive;re.steps,re.from,re.to,re.canBegin,re.onAnimationEnd,re.shouldReAnimate,re.onAnimationReStart;var Ge=K1e(re,$1e),Ke=na.Children.count(ve),dt=this.state.style;if(typeof ve=="function")return ve(dt);if(!Be||Ke===0||Ce<=0)return ve;var gt=function(Xt){var cr=Xt.props,sr=cr.style,nr=sr===void 0?{}:sr,zr=cr.className,Ne=na.cloneElement(Xt,ug(ug({},Ge),{},{style:ug(ug({},nr),dt),className:zr}));return Ne};return Ke===1?gt(na.Children.only(ve)):la.createElement("div",null,na.Children.map(ve,function(Vt){return gt(Vt)}))}}]),S})(na.PureComponent);vg.displayName="Animate";vg.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};vg.propTypes={from:Hf.oneOfType([Hf.object,Hf.string]),to:Hf.oneOfType([Hf.object,Hf.string]),attributeName:Hf.string,duration:Hf.number,begin:Hf.number,easing:Hf.oneOfType([Hf.string,Hf.func]),steps:Hf.arrayOf(Hf.shape({duration:Hf.number.isRequired,style:Hf.object.isRequired,easing:Hf.oneOfType([Hf.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Hf.func]),properties:Hf.arrayOf("string"),onAnimationEnd:Hf.func})),children:Hf.oneOfType([Hf.node,Hf.func]),isActive:Hf.bool,canBegin:Hf.bool,onAnimationEnd:Hf.func,shouldReAnimate:Hf.bool,onAnimationStart:Hf.func,onAnimationReStart:Hf.func};function CE(e){"@babel/helpers - typeof";return CE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},CE(e)}function pP(){return pP=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var S=arguments[n];for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(e[L]=S[L])}return e},pP.apply(this,arguments)}function c_e(e,n){return v_e(e)||d_e(e,n)||h_e(e,n)||f_e()}function f_e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function h_e(e,n){if(e){if(typeof e=="string")return DG(e,n);var S=Object.prototype.toString.call(e).slice(8,-1);if(S==="Object"&&e.constructor&&(S=e.constructor.name),S==="Map"||S==="Set")return Array.from(e);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return DG(e,n)}}function DG(e,n){(n==null||n>e.length)&&(n=e.length);for(var S=0,L=new Array(n);S<n;S++)L[S]=e[S];return L}function d_e(e,n){var S=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(S!=null){var L,re,ve,Ce,Be=[],Ge=!0,Ke=!1;try{if(ve=(S=S.call(e)).next,n!==0)for(;!(Ge=(L=ve.call(S)).done)&&(Be.push(L.value),Be.length!==n);Ge=!0);}catch(dt){Ke=!0,re=dt}finally{try{if(!Ge&&S.return!=null&&(Ce=S.return(),Object(Ce)!==Ce))return}finally{if(Ke)throw re}}return Be}}function v_e(e){if(Array.isArray(e))return e}function OG(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function zG(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?OG(Object(S),!0).forEach(function(L){p_e(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):OG(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function p_e(e,n,S){return n=m_e(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function m_e(e){var n=g_e(e,"string");return CE(n)=="symbol"?n:n+""}function g_e(e,n){if(CE(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(CE(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var NG=function(n,S,L,re,ve){var Ce=Math.min(Math.abs(L)/2,Math.abs(re)/2),Be=re>=0?1:-1,Ge=L>=0?1:-1,Ke=re>=0&&L>=0||re<0&&L<0?1:0,dt;if(Ce>0&&ve instanceof Array){for(var gt=[0,0,0,0],Vt=0,Xt=4;Vt<Xt;Vt++)gt[Vt]=ve[Vt]>Ce?Ce:ve[Vt];dt="M".concat(n,",").concat(S+Be*gt[0]),gt[0]>0&&(dt+="A ".concat(gt[0],",").concat(gt[0],",0,0,").concat(Ke,",").concat(n+Ge*gt[0],",").concat(S)),dt+="L ".concat(n+L-Ge*gt[1],",").concat(S),gt[1]>0&&(dt+="A ".concat(gt[1],",").concat(gt[1],",0,0,").concat(Ke,`,
        `).concat(n+L,",").concat(S+Be*gt[1])),dt+="L ".concat(n+L,",").concat(S+re-Be*gt[2]),gt[2]>0&&(dt+="A ".concat(gt[2],",").concat(gt[2],",0,0,").concat(Ke,`,
        `).concat(n+L-Ge*gt[2],",").concat(S+re)),dt+="L ".concat(n+Ge*gt[3],",").concat(S+re),gt[3]>0&&(dt+="A ".concat(gt[3],",").concat(gt[3],",0,0,").concat(Ke,`,
        `).concat(n,",").concat(S+re-Be*gt[3])),dt+="Z"}else if(Ce>0&&ve===+ve&&ve>0){var cr=Math.min(Ce,ve);dt="M ".concat(n,",").concat(S+Be*cr,`
            A `).concat(cr,",").concat(cr,",0,0,").concat(Ke,",").concat(n+Ge*cr,",").concat(S,`
            L `).concat(n+L-Ge*cr,",").concat(S,`
            A `).concat(cr,",").concat(cr,",0,0,").concat(Ke,",").concat(n+L,",").concat(S+Be*cr,`
            L `).concat(n+L,",").concat(S+re-Be*cr,`
            A `).concat(cr,",").concat(cr,",0,0,").concat(Ke,",").concat(n+L-Ge*cr,",").concat(S+re,`
            L `).concat(n+Ge*cr,",").concat(S+re,`
            A `).concat(cr,",").concat(cr,",0,0,").concat(Ke,",").concat(n,",").concat(S+re-Be*cr," Z")}else dt="M ".concat(n,",").concat(S," h ").concat(L," v ").concat(re," h ").concat(-L," Z");return dt},y_e=function(n,S){if(!n||!S)return!1;var L=n.x,re=n.y,ve=S.x,Ce=S.y,Be=S.width,Ge=S.height;if(Math.abs(Be)>0&&Math.abs(Ge)>0){var Ke=Math.min(ve,ve+Be),dt=Math.max(ve,ve+Be),gt=Math.min(Ce,Ce+Ge),Vt=Math.max(Ce,Ce+Ge);return L>=Ke&&L<=dt&&re>=gt&&re<=Vt}return!1},__e={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},L9=function(n){var S=zG(zG({},__e),n),L=na.useRef(),re=na.useState(-1),ve=c_e(re,2),Ce=ve[0],Be=ve[1];na.useEffect(function(){if(L.current&&L.current.getTotalLength)try{var pn=L.current.getTotalLength();pn&&Be(pn)}catch{}},[]);var Ge=S.x,Ke=S.y,dt=S.width,gt=S.height,Vt=S.radius,Xt=S.className,cr=S.animationEasing,sr=S.animationDuration,nr=S.animationBegin,zr=S.isAnimationActive,Ne=S.isUpdateAnimationActive;if(Ge!==+Ge||Ke!==+Ke||dt!==+dt||gt!==+gt||dt===0||gt===0)return null;var Jr=kc("recharts-rectangle",Xt);return Ne?la.createElement(vg,{canBegin:Ce>0,from:{width:dt,height:gt,x:Ge,y:Ke},to:{width:dt,height:gt,x:Ge,y:Ke},duration:sr,animationEasing:cr,isActive:Ne},function(pn){var Lr=pn.width,Or=pn.height,cn=pn.x,$n=pn.y;return la.createElement(vg,{canBegin:Ce>0,from:"0px ".concat(Ce===-1?1:Ce,"px"),to:"".concat(Ce,"px 0px"),attributeName:"strokeDasharray",begin:nr,duration:sr,isActive:zr,easing:cr},la.createElement("path",pP({},Fu(S,!0),{className:Jr,d:NG(cn,$n,Lr,Or,Vt),ref:L})))}):la.createElement("path",pP({},Fu(S,!0),{className:Jr,d:NG(Ge,Ke,dt,gt,Vt)}))};function e7(){return e7=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var S=arguments[n];for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(e[L]=S[L])}return e},e7.apply(this,arguments)}var hL=function(n){var S=n.cx,L=n.cy,re=n.r,ve=n.className,Ce=kc("recharts-dot",ve);return S===+S&&L===+L&&re===+re?na.createElement("circle",e7({},Fu(n,!1),F6(n),{className:Ce,cx:S,cy:L,r:re})):null};function kE(e){"@babel/helpers - typeof";return kE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},kE(e)}var x_e=["x","y","top","left","width","height","className"];function t7(){return t7=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var S=arguments[n];for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(e[L]=S[L])}return e},t7.apply(this,arguments)}function FG(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function b_e(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?FG(Object(S),!0).forEach(function(L){w_e(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):FG(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function w_e(e,n,S){return n=T_e(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function T_e(e){var n=A_e(e,"string");return kE(n)=="symbol"?n:n+""}function A_e(e,n){if(kE(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(kE(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function S_e(e,n){if(e==null)return{};var S=E_e(e,n),L,re;if(Object.getOwnPropertySymbols){var ve=Object.getOwnPropertySymbols(e);for(re=0;re<ve.length;re++)L=ve[re],!(n.indexOf(L)>=0)&&Object.prototype.propertyIsEnumerable.call(e,L)&&(S[L]=e[L])}return S}function E_e(e,n){if(e==null)return{};var S={};for(var L in e)if(Object.prototype.hasOwnProperty.call(e,L)){if(n.indexOf(L)>=0)continue;S[L]=e[L]}return S}var M_e=function(n,S,L,re,ve,Ce){return"M".concat(n,",").concat(ve,"v").concat(re,"M").concat(Ce,",").concat(S,"h").concat(L)},C_e=function(n){var S=n.x,L=S===void 0?0:S,re=n.y,ve=re===void 0?0:re,Ce=n.top,Be=Ce===void 0?0:Ce,Ge=n.left,Ke=Ge===void 0?0:Ge,dt=n.width,gt=dt===void 0?0:dt,Vt=n.height,Xt=Vt===void 0?0:Vt,cr=n.className,sr=S_e(n,x_e),nr=b_e({x:L,y:ve,top:Be,left:Ke,width:gt,height:Xt},sr);return!ys(L)||!ys(ve)||!ys(gt)||!ys(Xt)||!ys(Be)||!ys(Ke)?null:la.createElement("path",t7({},Fu(nr,!0),{className:kc("recharts-cross",cr),d:M_e(L,ve,gt,Xt,Be,Ke)}))},TO,BG;function k_e(){if(BG)return TO;BG=1;var e=RY(),n=e(Object.getPrototypeOf,Object);return TO=n,TO}var AO,jG;function P_e(){if(jG)return AO;jG=1;var e=M1(),n=k_e(),S=C1(),L="[object Object]",re=Function.prototype,ve=Object.prototype,Ce=re.toString,Be=ve.hasOwnProperty,Ge=Ce.call(Object);function Ke(dt){if(!S(dt)||e(dt)!=L)return!1;var gt=n(dt);if(gt===null)return!0;var Vt=Be.call(gt,"constructor")&&gt.constructor;return typeof Vt=="function"&&Vt instanceof Vt&&Ce.call(Vt)==Ge}return AO=Ke,AO}var L_e=P_e();const R_e=ih(L_e);var SO,UG;function I_e(){if(UG)return SO;UG=1;var e=M1(),n=C1(),S="[object Boolean]";function L(re){return re===!0||re===!1||n(re)&&e(re)==S}return SO=L,SO}var D_e=I_e();const O_e=ih(D_e);function PE(e){"@babel/helpers - typeof";return PE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},PE(e)}function mP(){return mP=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var S=arguments[n];for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(e[L]=S[L])}return e},mP.apply(this,arguments)}function z_e(e,n){return j_e(e)||B_e(e,n)||F_e(e,n)||N_e()}function N_e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function F_e(e,n){if(e){if(typeof e=="string")return qG(e,n);var S=Object.prototype.toString.call(e).slice(8,-1);if(S==="Object"&&e.constructor&&(S=e.constructor.name),S==="Map"||S==="Set")return Array.from(e);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return qG(e,n)}}function qG(e,n){(n==null||n>e.length)&&(n=e.length);for(var S=0,L=new Array(n);S<n;S++)L[S]=e[S];return L}function B_e(e,n){var S=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(S!=null){var L,re,ve,Ce,Be=[],Ge=!0,Ke=!1;try{if(ve=(S=S.call(e)).next,n!==0)for(;!(Ge=(L=ve.call(S)).done)&&(Be.push(L.value),Be.length!==n);Ge=!0);}catch(dt){Ke=!0,re=dt}finally{try{if(!Ge&&S.return!=null&&(Ce=S.return(),Object(Ce)!==Ce))return}finally{if(Ke)throw re}}return Be}}function j_e(e){if(Array.isArray(e))return e}function VG(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function HG(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?VG(Object(S),!0).forEach(function(L){U_e(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):VG(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function U_e(e,n,S){return n=q_e(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function q_e(e){var n=V_e(e,"string");return PE(n)=="symbol"?n:n+""}function V_e(e,n){if(PE(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(PE(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var GG=function(n,S,L,re,ve){var Ce=L-re,Be;return Be="M ".concat(n,",").concat(S),Be+="L ".concat(n+L,",").concat(S),Be+="L ".concat(n+L-Ce/2,",").concat(S+ve),Be+="L ".concat(n+L-Ce/2-re,",").concat(S+ve),Be+="L ".concat(n,",").concat(S," Z"),Be},H_e={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},G_e=function(n){var S=HG(HG({},H_e),n),L=na.useRef(),re=na.useState(-1),ve=z_e(re,2),Ce=ve[0],Be=ve[1];na.useEffect(function(){if(L.current&&L.current.getTotalLength)try{var Jr=L.current.getTotalLength();Jr&&Be(Jr)}catch{}},[]);var Ge=S.x,Ke=S.y,dt=S.upperWidth,gt=S.lowerWidth,Vt=S.height,Xt=S.className,cr=S.animationEasing,sr=S.animationDuration,nr=S.animationBegin,zr=S.isUpdateAnimationActive;if(Ge!==+Ge||Ke!==+Ke||dt!==+dt||gt!==+gt||Vt!==+Vt||dt===0&&gt===0||Vt===0)return null;var Ne=kc("recharts-trapezoid",Xt);return zr?la.createElement(vg,{canBegin:Ce>0,from:{upperWidth:0,lowerWidth:0,height:Vt,x:Ge,y:Ke},to:{upperWidth:dt,lowerWidth:gt,height:Vt,x:Ge,y:Ke},duration:sr,animationEasing:cr,isActive:zr},function(Jr){var pn=Jr.upperWidth,Lr=Jr.lowerWidth,Or=Jr.height,cn=Jr.x,$n=Jr.y;return la.createElement(vg,{canBegin:Ce>0,from:"0px ".concat(Ce===-1?1:Ce,"px"),to:"".concat(Ce,"px 0px"),attributeName:"strokeDasharray",begin:nr,duration:sr,easing:cr},la.createElement("path",mP({},Fu(S,!0),{className:Ne,d:GG(cn,$n,pn,Lr,Or),ref:L})))}):la.createElement("g",null,la.createElement("path",mP({},Fu(S,!0),{className:Ne,d:GG(Ge,Ke,dt,gt,Vt)})))},X_e=["option","shapeType","propTransformer","activeClassName","isActive"];function LE(e){"@babel/helpers - typeof";return LE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},LE(e)}function W_e(e,n){if(e==null)return{};var S=Y_e(e,n),L,re;if(Object.getOwnPropertySymbols){var ve=Object.getOwnPropertySymbols(e);for(re=0;re<ve.length;re++)L=ve[re],!(n.indexOf(L)>=0)&&Object.prototype.propertyIsEnumerable.call(e,L)&&(S[L]=e[L])}return S}function Y_e(e,n){if(e==null)return{};var S={};for(var L in e)if(Object.prototype.hasOwnProperty.call(e,L)){if(n.indexOf(L)>=0)continue;S[L]=e[L]}return S}function XG(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function gP(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?XG(Object(S),!0).forEach(function(L){Z_e(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):XG(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function Z_e(e,n,S){return n=$_e(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function $_e(e){var n=K_e(e,"string");return LE(n)=="symbol"?n:n+""}function K_e(e,n){if(LE(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(LE(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function J_e(e,n){return gP(gP({},n),e)}function Q_e(e,n){return e==="symbols"}function WG(e){var n=e.shapeType,S=e.elementProps;switch(n){case"rectangle":return la.createElement(L9,S);case"trapezoid":return la.createElement(G_e,S);case"sector":return la.createElement(a$,S);case"symbols":if(Q_e(n))return la.createElement(JP,S);break;default:return null}}function exe(e){return na.isValidElement(e)?e.props:e}function r7(e){var n=e.option,S=e.shapeType,L=e.propTransformer,re=L===void 0?J_e:L,ve=e.activeClassName,Ce=ve===void 0?"recharts-active-shape":ve,Be=e.isActive,Ge=W_e(e,X_e),Ke;if(na.isValidElement(n))Ke=na.cloneElement(n,gP(gP({},Ge),exe(n)));else if(qu(n))Ke=n(Ge);else if(R_e(n)&&!O_e(n)){var dt=re(n,Ge);Ke=la.createElement(WG,{shapeType:S,elementProps:dt})}else{var gt=Ge;Ke=la.createElement(WG,{shapeType:S,elementProps:gt})}return Be?la.createElement(Df,{className:Ce},Ke):Ke}function dL(e,n){return n!=null&&"trapezoids"in e.props}function vL(e,n){return n!=null&&"sectors"in e.props}function RE(e,n){return n!=null&&"points"in e.props}function txe(e,n){var S,L,re=e.x===(n==null||(S=n.labelViewBox)===null||S===void 0?void 0:S.x)||e.x===n.x,ve=e.y===(n==null||(L=n.labelViewBox)===null||L===void 0?void 0:L.y)||e.y===n.y;return re&&ve}function rxe(e,n){var S=e.endAngle===n.endAngle,L=e.startAngle===n.startAngle;return S&&L}function nxe(e,n){var S=e.x===n.x,L=e.y===n.y,re=e.z===n.z;return S&&L&&re}function axe(e,n){var S;return dL(e,n)?S=txe:vL(e,n)?S=rxe:RE(e,n)&&(S=nxe),S}function ixe(e,n){var S;return dL(e,n)?S="trapezoids":vL(e,n)?S="sectors":RE(e,n)&&(S="points"),S}function oxe(e,n){if(dL(e,n)){var S;return(S=n.tooltipPayload)===null||S===void 0||(S=S[0])===null||S===void 0||(S=S.payload)===null||S===void 0?void 0:S.payload}if(vL(e,n)){var L;return(L=n.tooltipPayload)===null||L===void 0||(L=L[0])===null||L===void 0||(L=L.payload)===null||L===void 0?void 0:L.payload}return RE(e,n)?n.payload:{}}function sxe(e){var n=e.activeTooltipItem,S=e.graphicalItem,L=e.itemData,re=ixe(S,n),ve=oxe(S,n),Ce=L.filter(function(Ge,Ke){var dt=yw(ve,Ge),gt=S.props[re].filter(function(cr){var sr=axe(S,n);return sr(cr,n)}),Vt=S.props[re].indexOf(gt[gt.length-1]),Xt=Ke===Vt;return dt&&Xt}),Be=L.indexOf(Ce[Ce.length-1]);return Be}var EO,YG;function lxe(){if(YG)return EO;YG=1;var e=Math.ceil,n=Math.max;function S(L,re,ve,Ce){for(var Be=-1,Ge=n(e((re-L)/(ve||1)),0),Ke=Array(Ge);Ge--;)Ke[Ce?Ge:++Be]=L,L+=ve;return Ke}return EO=S,EO}var MO,ZG;function d$(){if(ZG)return MO;ZG=1;var e=YY(),n=1/0,S=17976931348623157e292;function L(re){if(!re)return re===0?re:0;if(re=e(re),re===n||re===-n){var ve=re<0?-1:1;return ve*S}return re===re?re:0}return MO=L,MO}var CO,$G;function uxe(){if($G)return CO;$G=1;var e=lxe(),n=tL(),S=d$();function L(re){return function(ve,Ce,Be){return Be&&typeof Be!="number"&&n(ve,Ce,Be)&&(Ce=Be=void 0),ve=S(ve),Ce===void 0?(Ce=ve,ve=0):Ce=S(Ce),Be=Be===void 0?ve<Ce?1:-1:S(Be),e(ve,Ce,Be,re)}}return CO=L,CO}var kO,KG;function cxe(){if(KG)return kO;KG=1;var e=uxe(),n=e();return kO=n,kO}var fxe=cxe();const yP=ih(fxe);function IE(e){"@babel/helpers - typeof";return IE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},IE(e)}function JG(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function QG(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?JG(Object(S),!0).forEach(function(L){v$(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):JG(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function v$(e,n,S){return n=hxe(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function hxe(e){var n=dxe(e,"string");return IE(n)=="symbol"?n:n+""}function dxe(e,n){if(IE(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(IE(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var vxe=["Webkit","Moz","O","ms"],pxe=function(n,S){var L=n.replace(/(\w)/,function(ve){return ve.toUpperCase()}),re=vxe.reduce(function(ve,Ce){return QG(QG({},ve),{},v$({},Ce+L,S))},{});return re[n]=S,re};function xT(e){"@babel/helpers - typeof";return xT=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},xT(e)}function _P(){return _P=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var S=arguments[n];for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(e[L]=S[L])}return e},_P.apply(this,arguments)}function eX(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function PO(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?eX(Object(S),!0).forEach(function(L){Km(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):eX(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function mxe(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function tX(e,n){for(var S=0;S<n.length;S++){var L=n[S];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(e,m$(L.key),L)}}function gxe(e,n,S){return n&&tX(e.prototype,n),S&&tX(e,S),Object.defineProperty(e,"prototype",{writable:!1}),e}function yxe(e,n,S){return n=xP(n),_xe(e,p$()?Reflect.construct(n,S||[],xP(e).constructor):n.apply(e,S))}function _xe(e,n){if(n&&(xT(n)==="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return xxe(e)}function xxe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(p$=function(){return!!e})()}function xP(e){return xP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(S){return S.__proto__||Object.getPrototypeOf(S)},xP(e)}function bxe(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&n7(e,n)}function n7(e,n){return n7=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(L,re){return L.__proto__=re,L},n7(e,n)}function Km(e,n,S){return n=m$(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function m$(e){var n=wxe(e,"string");return xT(n)=="symbol"?n:n+""}function wxe(e,n){if(xT(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(xT(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Txe=function(n){var S=n.data,L=n.startIndex,re=n.endIndex,ve=n.x,Ce=n.width,Be=n.travellerWidth;if(!S||!S.length)return{};var Ge=S.length,Ke=$5().domain(yP(0,Ge)).range([ve,ve+Ce-Be]),dt=Ke.domain().map(function(gt){return Ke(gt)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:Ke(L),endX:Ke(re),scale:Ke,scaleValues:dt}},rX=function(n){return n.changedTouches&&!!n.changedTouches.length},bT=(function(e){function n(S){var L;return mxe(this,n),L=yxe(this,n,[S]),Km(L,"handleDrag",function(re){L.leaveTimer&&(clearTimeout(L.leaveTimer),L.leaveTimer=null),L.state.isTravellerMoving?L.handleTravellerMove(re):L.state.isSlideMoving&&L.handleSlideDrag(re)}),Km(L,"handleTouchMove",function(re){re.changedTouches!=null&&re.changedTouches.length>0&&L.handleDrag(re.changedTouches[0])}),Km(L,"handleDragEnd",function(){L.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var re=L.props,ve=re.endIndex,Ce=re.onDragEnd,Be=re.startIndex;Ce?.({endIndex:ve,startIndex:Be})}),L.detachDragEndListener()}),Km(L,"handleLeaveWrapper",function(){(L.state.isTravellerMoving||L.state.isSlideMoving)&&(L.leaveTimer=window.setTimeout(L.handleDragEnd,L.props.leaveTimeOut))}),Km(L,"handleEnterSlideOrTraveller",function(){L.setState({isTextActive:!0})}),Km(L,"handleLeaveSlideOrTraveller",function(){L.setState({isTextActive:!1})}),Km(L,"handleSlideDragStart",function(re){var ve=rX(re)?re.changedTouches[0]:re;L.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:ve.pageX}),L.attachDragEndListener()}),L.travellerDragStartHandlers={startX:L.handleTravellerDragStart.bind(L,"startX"),endX:L.handleTravellerDragStart.bind(L,"endX")},L.state={},L}return bxe(n,e),gxe(n,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(L){var re=L.startX,ve=L.endX,Ce=this.state.scaleValues,Be=this.props,Ge=Be.gap,Ke=Be.data,dt=Ke.length-1,gt=Math.min(re,ve),Vt=Math.max(re,ve),Xt=n.getIndexInRange(Ce,gt),cr=n.getIndexInRange(Ce,Vt);return{startIndex:Xt-Xt%Ge,endIndex:cr===dt?dt:cr-cr%Ge}}},{key:"getTextOfTick",value:function(L){var re=this.props,ve=re.data,Ce=re.tickFormatter,Be=re.dataKey,Ge=zv(ve[L],Be,L);return qu(Ce)?Ce(Ge,L):Ge}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(L){var re=this.state,ve=re.slideMoveStartX,Ce=re.startX,Be=re.endX,Ge=this.props,Ke=Ge.x,dt=Ge.width,gt=Ge.travellerWidth,Vt=Ge.startIndex,Xt=Ge.endIndex,cr=Ge.onChange,sr=L.pageX-ve;sr>0?sr=Math.min(sr,Ke+dt-gt-Be,Ke+dt-gt-Ce):sr<0&&(sr=Math.max(sr,Ke-Ce,Ke-Be));var nr=this.getIndex({startX:Ce+sr,endX:Be+sr});(nr.startIndex!==Vt||nr.endIndex!==Xt)&&cr&&cr(nr),this.setState({startX:Ce+sr,endX:Be+sr,slideMoveStartX:L.pageX})}},{key:"handleTravellerDragStart",value:function(L,re){var ve=rX(re)?re.changedTouches[0]:re;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:L,brushMoveStartX:ve.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(L){var re=this.state,ve=re.brushMoveStartX,Ce=re.movingTravellerId,Be=re.endX,Ge=re.startX,Ke=this.state[Ce],dt=this.props,gt=dt.x,Vt=dt.width,Xt=dt.travellerWidth,cr=dt.onChange,sr=dt.gap,nr=dt.data,zr={startX:this.state.startX,endX:this.state.endX},Ne=L.pageX-ve;Ne>0?Ne=Math.min(Ne,gt+Vt-Xt-Ke):Ne<0&&(Ne=Math.max(Ne,gt-Ke)),zr[Ce]=Ke+Ne;var Jr=this.getIndex(zr),pn=Jr.startIndex,Lr=Jr.endIndex,Or=function(){var $n=nr.length-1;return Ce==="startX"&&(Be>Ge?pn%sr===0:Lr%sr===0)||Be<Ge&&Lr===$n||Ce==="endX"&&(Be>Ge?Lr%sr===0:pn%sr===0)||Be>Ge&&Lr===$n};this.setState(Km(Km({},Ce,Ke+Ne),"brushMoveStartX",L.pageX),function(){cr&&Or()&&cr(Jr)})}},{key:"handleTravellerMoveKeyboard",value:function(L,re){var ve=this,Ce=this.state,Be=Ce.scaleValues,Ge=Ce.startX,Ke=Ce.endX,dt=this.state[re],gt=Be.indexOf(dt);if(gt!==-1){var Vt=gt+L;if(!(Vt===-1||Vt>=Be.length)){var Xt=Be[Vt];re==="startX"&&Xt>=Ke||re==="endX"&&Xt<=Ge||this.setState(Km({},re,Xt),function(){ve.props.onChange(ve.getIndex({startX:ve.state.startX,endX:ve.state.endX}))})}}}},{key:"renderBackground",value:function(){var L=this.props,re=L.x,ve=L.y,Ce=L.width,Be=L.height,Ge=L.fill,Ke=L.stroke;return la.createElement("rect",{stroke:Ke,fill:Ge,x:re,y:ve,width:Ce,height:Be})}},{key:"renderPanorama",value:function(){var L=this.props,re=L.x,ve=L.y,Ce=L.width,Be=L.height,Ge=L.data,Ke=L.children,dt=L.padding,gt=na.Children.only(Ke);return gt?la.cloneElement(gt,{x:re,y:ve,width:Ce,height:Be,margin:dt,compact:!0,data:Ge}):null}},{key:"renderTravellerLayer",value:function(L,re){var ve,Ce,Be=this,Ge=this.props,Ke=Ge.y,dt=Ge.travellerWidth,gt=Ge.height,Vt=Ge.traveller,Xt=Ge.ariaLabel,cr=Ge.data,sr=Ge.startIndex,nr=Ge.endIndex,zr=Math.max(L,this.props.x),Ne=PO(PO({},Fu(this.props,!1)),{},{x:zr,y:Ke,width:dt,height:gt}),Jr=Xt||"Min value: ".concat((ve=cr[sr])===null||ve===void 0?void 0:ve.name,", Max value: ").concat((Ce=cr[nr])===null||Ce===void 0?void 0:Ce.name);return la.createElement(Df,{tabIndex:0,role:"slider","aria-label":Jr,"aria-valuenow":L,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[re],onTouchStart:this.travellerDragStartHandlers[re],onKeyDown:function(Lr){["ArrowLeft","ArrowRight"].includes(Lr.key)&&(Lr.preventDefault(),Lr.stopPropagation(),Be.handleTravellerMoveKeyboard(Lr.key==="ArrowRight"?1:-1,re))},onFocus:function(){Be.setState({isTravellerFocused:!0})},onBlur:function(){Be.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},n.renderTraveller(Vt,Ne))}},{key:"renderSlide",value:function(L,re){var ve=this.props,Ce=ve.y,Be=ve.height,Ge=ve.stroke,Ke=ve.travellerWidth,dt=Math.min(L,re)+Ke,gt=Math.max(Math.abs(re-L)-Ke,0);return la.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:Ge,fillOpacity:.2,x:dt,y:Ce,width:gt,height:Be})}},{key:"renderText",value:function(){var L=this.props,re=L.startIndex,ve=L.endIndex,Ce=L.y,Be=L.height,Ge=L.travellerWidth,Ke=L.stroke,dt=this.state,gt=dt.startX,Vt=dt.endX,Xt=5,cr={pointerEvents:"none",fill:Ke};return la.createElement(Df,{className:"recharts-brush-texts"},la.createElement(Z6,_P({textAnchor:"end",verticalAnchor:"middle",x:Math.min(gt,Vt)-Xt,y:Ce+Be/2},cr),this.getTextOfTick(re)),la.createElement(Z6,_P({textAnchor:"start",verticalAnchor:"middle",x:Math.max(gt,Vt)+Ge+Xt,y:Ce+Be/2},cr),this.getTextOfTick(ve)))}},{key:"render",value:function(){var L=this.props,re=L.data,ve=L.className,Ce=L.children,Be=L.x,Ge=L.y,Ke=L.width,dt=L.height,gt=L.alwaysShowText,Vt=this.state,Xt=Vt.startX,cr=Vt.endX,sr=Vt.isTextActive,nr=Vt.isSlideMoving,zr=Vt.isTravellerMoving,Ne=Vt.isTravellerFocused;if(!re||!re.length||!ys(Be)||!ys(Ge)||!ys(Ke)||!ys(dt)||Ke<=0||dt<=0)return null;var Jr=kc("recharts-brush",ve),pn=la.Children.count(Ce)===1,Lr=pxe("userSelect","none");return la.createElement(Df,{className:Jr,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:Lr},this.renderBackground(),pn&&this.renderPanorama(),this.renderSlide(Xt,cr),this.renderTravellerLayer(Xt,"startX"),this.renderTravellerLayer(cr,"endX"),(sr||nr||zr||Ne||gt)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(L){var re=L.x,ve=L.y,Ce=L.width,Be=L.height,Ge=L.stroke,Ke=Math.floor(ve+Be/2)-1;return la.createElement(la.Fragment,null,la.createElement("rect",{x:re,y:ve,width:Ce,height:Be,fill:Ge,stroke:"none"}),la.createElement("line",{x1:re+1,y1:Ke,x2:re+Ce-1,y2:Ke,fill:"none",stroke:"#fff"}),la.createElement("line",{x1:re+1,y1:Ke+2,x2:re+Ce-1,y2:Ke+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(L,re){var ve;return la.isValidElement(L)?ve=la.cloneElement(L,re):qu(L)?ve=L(re):ve=n.renderDefaultTraveller(re),ve}},{key:"getDerivedStateFromProps",value:function(L,re){var ve=L.data,Ce=L.width,Be=L.x,Ge=L.travellerWidth,Ke=L.updateId,dt=L.startIndex,gt=L.endIndex;if(ve!==re.prevData||Ke!==re.prevUpdateId)return PO({prevData:ve,prevTravellerWidth:Ge,prevUpdateId:Ke,prevX:Be,prevWidth:Ce},ve&&ve.length?Txe({data:ve,width:Ce,x:Be,travellerWidth:Ge,startIndex:dt,endIndex:gt}):{scale:null,scaleValues:null});if(re.scale&&(Ce!==re.prevWidth||Be!==re.prevX||Ge!==re.prevTravellerWidth)){re.scale.range([Be,Be+Ce-Ge]);var Vt=re.scale.domain().map(function(Xt){return re.scale(Xt)});return{prevData:ve,prevTravellerWidth:Ge,prevUpdateId:Ke,prevX:Be,prevWidth:Ce,startX:re.scale(L.startIndex),endX:re.scale(L.endIndex),scaleValues:Vt}}return null}},{key:"getIndexInRange",value:function(L,re){for(var ve=L.length,Ce=0,Be=ve-1;Be-Ce>1;){var Ge=Math.floor((Ce+Be)/2);L[Ge]>re?Be=Ge:Ce=Ge}return re>=L[Be]?Be:Ce}}])})(na.PureComponent);Km(bT,"displayName","Brush");Km(bT,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var LO,nX;function Axe(){if(nX)return LO;nX=1;var e=r9();function n(S,L){var re;return e(S,function(ve,Ce,Be){return re=L(ve,Ce,Be),!re}),!!re}return LO=n,LO}var RO,aX;function Sxe(){if(aX)return RO;aX=1;var e=SY(),n=hx(),S=Axe(),L=Tm(),re=tL();function ve(Ce,Be,Ge){var Ke=L(Ce)?e:S;return Ge&&re(Ce,Be,Ge)&&(Be=void 0),Ke(Ce,n(Be,3))}return RO=ve,RO}var Exe=Sxe();const Mxe=ih(Exe);var my=function(n,S){var L=n.alwaysShow,re=n.ifOverflow;return L&&(re="extendDomain"),re===S},IO,iX;function Cxe(){if(iX)return IO;iX=1;var e=VY();function n(S,L,re){L=="__proto__"&&e?e(S,L,{configurable:!0,enumerable:!0,value:re,writable:!0}):S[L]=re}return IO=n,IO}var DO,oX;function kxe(){if(oX)return DO;oX=1;var e=Cxe(),n=UY(),S=hx();function L(re,ve){var Ce={};return ve=S(ve,3),n(re,function(Be,Ge,Ke){e(Ce,Ge,ve(Be,Ge,Ke))}),Ce}return DO=L,DO}var Pxe=kxe();const Lxe=ih(Pxe);var OO,sX;function Rxe(){if(sX)return OO;sX=1;function e(n,S){for(var L=-1,re=n==null?0:n.length;++L<re;)if(!S(n[L],L,n))return!1;return!0}return OO=e,OO}var zO,lX;function Ixe(){if(lX)return zO;lX=1;var e=r9();function n(S,L){var re=!0;return e(S,function(ve,Ce,Be){return re=!!L(ve,Ce,Be),re}),re}return zO=n,zO}var NO,uX;function Dxe(){if(uX)return NO;uX=1;var e=Rxe(),n=Ixe(),S=hx(),L=Tm(),re=tL();function ve(Ce,Be,Ge){var Ke=L(Ce)?e:n;return Ge&&re(Ce,Be,Ge)&&(Be=void 0),Ke(Ce,S(Be,3))}return NO=ve,NO}var Oxe=Dxe();const g$=ih(Oxe);var zxe=["x","y"];function DE(e){"@babel/helpers - typeof";return DE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},DE(e)}function a7(){return a7=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var S=arguments[n];for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(e[L]=S[L])}return e},a7.apply(this,arguments)}function cX(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function V5(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?cX(Object(S),!0).forEach(function(L){Nxe(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):cX(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function Nxe(e,n,S){return n=Fxe(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function Fxe(e){var n=Bxe(e,"string");return DE(n)=="symbol"?n:n+""}function Bxe(e,n){if(DE(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(DE(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function jxe(e,n){if(e==null)return{};var S=Uxe(e,n),L,re;if(Object.getOwnPropertySymbols){var ve=Object.getOwnPropertySymbols(e);for(re=0;re<ve.length;re++)L=ve[re],!(n.indexOf(L)>=0)&&Object.prototype.propertyIsEnumerable.call(e,L)&&(S[L]=e[L])}return S}function Uxe(e,n){if(e==null)return{};var S={};for(var L in e)if(Object.prototype.hasOwnProperty.call(e,L)){if(n.indexOf(L)>=0)continue;S[L]=e[L]}return S}function qxe(e,n){var S=e.x,L=e.y,re=jxe(e,zxe),ve="".concat(S),Ce=parseInt(ve,10),Be="".concat(L),Ge=parseInt(Be,10),Ke="".concat(n.height||re.height),dt=parseInt(Ke,10),gt="".concat(n.width||re.width),Vt=parseInt(gt,10);return V5(V5(V5(V5(V5({},n),re),Ce?{x:Ce}:{}),Ge?{y:Ge}:{}),{},{height:dt,width:Vt,name:n.name,radius:n.radius})}function fX(e){return la.createElement(r7,a7({shapeType:"rectangle",propTransformer:qxe,activeClassName:"recharts-active-bar"},e))}var Vxe=function(n){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(L,re){if(typeof n=="number")return n;var ve=ys(L)||ece(L);return ve?n(L,re):(ve||xw(),S)}},Hxe=["value","background"],y$;function wT(e){"@babel/helpers - typeof";return wT=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},wT(e)}function Gxe(e,n){if(e==null)return{};var S=Xxe(e,n),L,re;if(Object.getOwnPropertySymbols){var ve=Object.getOwnPropertySymbols(e);for(re=0;re<ve.length;re++)L=ve[re],!(n.indexOf(L)>=0)&&Object.prototype.propertyIsEnumerable.call(e,L)&&(S[L]=e[L])}return S}function Xxe(e,n){if(e==null)return{};var S={};for(var L in e)if(Object.prototype.hasOwnProperty.call(e,L)){if(n.indexOf(L)>=0)continue;S[L]=e[L]}return S}function bP(){return bP=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var S=arguments[n];for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(e[L]=S[L])}return e},bP.apply(this,arguments)}function hX(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function yv(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?hX(Object(S),!0).forEach(function(L){ix(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):hX(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function Wxe(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function dX(e,n){for(var S=0;S<n.length;S++){var L=n[S];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(e,x$(L.key),L)}}function Yxe(e,n,S){return n&&dX(e.prototype,n),S&&dX(e,S),Object.defineProperty(e,"prototype",{writable:!1}),e}function Zxe(e,n,S){return n=wP(n),$xe(e,_$()?Reflect.construct(n,S||[],wP(e).constructor):n.apply(e,S))}function $xe(e,n){if(n&&(wT(n)==="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Kxe(e)}function Kxe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_$=function(){return!!e})()}function wP(e){return wP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(S){return S.__proto__||Object.getPrototypeOf(S)},wP(e)}function Jxe(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&i7(e,n)}function i7(e,n){return i7=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(L,re){return L.__proto__=re,L},i7(e,n)}function ix(e,n,S){return n=x$(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function x$(e){var n=Qxe(e,"string");return wT(n)=="symbol"?n:n+""}function Qxe(e,n){if(wT(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(wT(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var HT=(function(e){function n(){var S;Wxe(this,n);for(var L=arguments.length,re=new Array(L),ve=0;ve<L;ve++)re[ve]=arguments[ve];return S=Zxe(this,n,[].concat(re)),ix(S,"state",{isAnimationFinished:!1}),ix(S,"id",Tw("recharts-bar-")),ix(S,"handleAnimationEnd",function(){var Ce=S.props.onAnimationEnd;S.setState({isAnimationFinished:!0}),Ce&&Ce()}),ix(S,"handleAnimationStart",function(){var Ce=S.props.onAnimationStart;S.setState({isAnimationFinished:!1}),Ce&&Ce()}),S}return Jxe(n,e),Yxe(n,[{key:"renderRectanglesStatically",value:function(L){var re=this,ve=this.props,Ce=ve.shape,Be=ve.dataKey,Ge=ve.activeIndex,Ke=ve.activeBar,dt=Fu(this.props,!1);return L&&L.map(function(gt,Vt){var Xt=Vt===Ge,cr=Xt?Ke:Ce,sr=yv(yv(yv({},dt),gt),{},{isActive:Xt,option:cr,index:Vt,dataKey:Be,onAnimationStart:re.handleAnimationStart,onAnimationEnd:re.handleAnimationEnd});return la.createElement(Df,bP({className:"recharts-bar-rectangle"},nE(re.props,gt,Vt),{key:"rectangle-".concat(gt?.x,"-").concat(gt?.y,"-").concat(gt?.value,"-").concat(Vt)}),la.createElement(fX,sr))})}},{key:"renderRectanglesWithAnimation",value:function(){var L=this,re=this.props,ve=re.data,Ce=re.layout,Be=re.isAnimationActive,Ge=re.animationBegin,Ke=re.animationDuration,dt=re.animationEasing,gt=re.animationId,Vt=this.state.prevData;return la.createElement(vg,{begin:Ge,duration:Ke,isActive:Be,easing:dt,from:{t:0},to:{t:1},key:"bar-".concat(gt),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(Xt){var cr=Xt.t,sr=ve.map(function(nr,zr){var Ne=Vt&&Vt[zr];if(Ne){var Jr=av(Ne.x,nr.x),pn=av(Ne.y,nr.y),Lr=av(Ne.width,nr.width),Or=av(Ne.height,nr.height);return yv(yv({},nr),{},{x:Jr(cr),y:pn(cr),width:Lr(cr),height:Or(cr)})}if(Ce==="horizontal"){var cn=av(0,nr.height),$n=cn(cr);return yv(yv({},nr),{},{y:nr.y+nr.height-$n,height:$n})}var xn=av(0,nr.width),Wa=xn(cr);return yv(yv({},nr),{},{width:Wa})});return la.createElement(Df,null,L.renderRectanglesStatically(sr))})}},{key:"renderRectangles",value:function(){var L=this.props,re=L.data,ve=L.isAnimationActive,Ce=this.state.prevData;return ve&&re&&re.length&&(!Ce||!yw(Ce,re))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(re)}},{key:"renderBackground",value:function(){var L=this,re=this.props,ve=re.data,Ce=re.dataKey,Be=re.activeIndex,Ge=Fu(this.props.background,!1);return ve.map(function(Ke,dt){Ke.value;var gt=Ke.background,Vt=Gxe(Ke,Hxe);if(!gt)return null;var Xt=yv(yv(yv(yv(yv({},Vt),{},{fill:"#eee"},gt),Ge),nE(L.props,Ke,dt)),{},{onAnimationStart:L.handleAnimationStart,onAnimationEnd:L.handleAnimationEnd,dataKey:Ce,index:dt,className:"recharts-bar-background-rectangle"});return la.createElement(fX,bP({key:"background-bar-".concat(dt),option:L.props.background,isActive:dt===Be},Xt))})}},{key:"renderErrorBar",value:function(L,re){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var ve=this.props,Ce=ve.data,Be=ve.xAxis,Ge=ve.yAxis,Ke=ve.layout,dt=ve.children,gt=wm(dt,cx);if(!gt)return null;var Vt=Ke==="vertical"?Ce[0].height/2:Ce[0].width/2,Xt=function(nr,zr){var Ne=Array.isArray(nr.value)?nr.value[1]:nr.value;return{x:nr.x,y:nr.y,value:Ne,errorVal:zv(nr,zr)}},cr={clipPath:L?"url(#clipPath-".concat(re,")"):null};return la.createElement(Df,cr,gt.map(function(sr){return la.cloneElement(sr,{key:"error-bar-".concat(re,"-").concat(sr.props.dataKey),data:Ce,xAxis:Be,yAxis:Ge,layout:Ke,offset:Vt,dataPointFormatter:Xt})}))}},{key:"render",value:function(){var L=this.props,re=L.hide,ve=L.data,Ce=L.className,Be=L.xAxis,Ge=L.yAxis,Ke=L.left,dt=L.top,gt=L.width,Vt=L.height,Xt=L.isAnimationActive,cr=L.background,sr=L.id;if(re||!ve||!ve.length)return null;var nr=this.state.isAnimationFinished,zr=kc("recharts-bar",Ce),Ne=Be&&Be.allowDataOverflow,Jr=Ge&&Ge.allowDataOverflow,pn=Ne||Jr,Lr=Ru(sr)?this.id:sr;return la.createElement(Df,{className:zr},Ne||Jr?la.createElement("defs",null,la.createElement("clipPath",{id:"clipPath-".concat(Lr)},la.createElement("rect",{x:Ne?Ke:Ke-gt/2,y:Jr?dt:dt-Vt/2,width:Ne?gt:gt*2,height:Jr?Vt:Vt*2}))):null,la.createElement(Df,{className:"recharts-bar-rectangles",clipPath:pn?"url(#clipPath-".concat(Lr,")"):null},cr?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(pn,Lr),(!Xt||nr)&&py.renderCallByParent(this.props,ve))}}],[{key:"getDerivedStateFromProps",value:function(L,re){return L.animationId!==re.prevAnimationId?{prevAnimationId:L.animationId,curData:L.data,prevData:re.curData}:L.data!==re.curData?{curData:L.data}:null}}])})(na.PureComponent);y$=HT;ix(HT,"displayName","Bar");ix(HT,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!dx.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});ix(HT,"getComposedData",function(e){var n=e.props,S=e.item,L=e.barPosition,re=e.bandSize,ve=e.xAxis,Ce=e.yAxis,Be=e.xAxisTicks,Ge=e.yAxisTicks,Ke=e.stackedData,dt=e.dataStartIndex,gt=e.displayedData,Vt=e.offset,Xt=_ge(L,S);if(!Xt)return null;var cr=n.layout,sr=S.type.defaultProps,nr=sr!==void 0?yv(yv({},sr),S.props):S.props,zr=nr.dataKey,Ne=nr.children,Jr=nr.minPointSize,pn=cr==="horizontal"?Ce:ve,Lr=Ke?pn.scale.domain():null,Or=Mge({numericAxis:pn}),cn=wm(Ne,i9),$n=gt.map(function(xn,Wa){var On,qn,ca,Fn,da,ea;Ke?On=xge(Ke[dt+Wa],Lr):(On=zv(xn,zr),Array.isArray(On)||(On=[Or,On]));var qa=Vxe(Jr,y$.defaultProps.minPointSize)(On[1],Wa);if(cr==="horizontal"){var Ri,mi=[Ce.scale(On[0]),Ce.scale(On[1])],Io=mi[0],ya=mi[1];qn=$H({axis:ve,ticks:Be,bandSize:re,offset:Xt.offset,entry:xn,index:Wa}),ca=(Ri=ya??Io)!==null&&Ri!==void 0?Ri:void 0,Fn=Xt.size;var Wn=Io-ya;if(da=Number.isNaN(Wn)?0:Wn,ea={x:qn,y:Ce.y,width:Fn,height:Ce.height},Math.abs(qa)>0&&Math.abs(da)<Math.abs(qa)){var Ei=dg(da||qa)*(Math.abs(qa)-Math.abs(da));ca-=Ei,da+=Ei}}else{var $i=[ve.scale(On[0]),ve.scale(On[1])],to=$i[0],fi=$i[1];if(qn=to,ca=$H({axis:Ce,ticks:Ge,bandSize:re,offset:Xt.offset,entry:xn,index:Wa}),Fn=fi-to,da=Xt.size,ea={x:ve.x,y:ca,width:ve.width,height:da},Math.abs(qa)>0&&Math.abs(Fn)<Math.abs(qa)){var bo=dg(Fn||qa)*(Math.abs(qa)-Math.abs(Fn));Fn+=bo}}return yv(yv(yv({},xn),{},{x:qn,y:ca,width:Fn,height:da,value:Ke?On:On[1],payload:xn,background:ea},cn&&cn[Wa]&&cn[Wa].props),{},{tooltipPayload:[t$(S,xn)],tooltipPosition:{x:qn+Fn/2,y:ca+da/2}})});return yv({data:$n,layout:cr},Vt)});function OE(e){"@babel/helpers - typeof";return OE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},OE(e)}function ebe(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function vX(e,n){for(var S=0;S<n.length;S++){var L=n[S];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(e,b$(L.key),L)}}function tbe(e,n,S){return n&&vX(e.prototype,n),S&&vX(e,S),Object.defineProperty(e,"prototype",{writable:!1}),e}function pX(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function cg(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?pX(Object(S),!0).forEach(function(L){pL(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):pX(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function pL(e,n,S){return n=b$(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function b$(e){var n=rbe(e,"string");return OE(n)=="symbol"?n:n+""}function rbe(e,n){if(OE(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(OE(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var w$=function(n,S,L,re,ve){var Ce=n.width,Be=n.height,Ge=n.layout,Ke=n.children,dt=Object.keys(S),gt={left:L.left,leftMirror:L.left,right:Ce-L.right,rightMirror:Ce-L.right,top:L.top,topMirror:L.top,bottom:Be-L.bottom,bottomMirror:Be-L.bottom},Vt=!!Jm(Ke,HT);return dt.reduce(function(Xt,cr){var sr=S[cr],nr=sr.orientation,zr=sr.domain,Ne=sr.padding,Jr=Ne===void 0?{}:Ne,pn=sr.mirror,Lr=sr.reversed,Or="".concat(nr).concat(pn?"Mirror":""),cn,$n,xn,Wa,On;if(sr.type==="number"&&(sr.padding==="gap"||sr.padding==="no-gap")){var qn=zr[1]-zr[0],ca=1/0,Fn=sr.categoricalDomain.sort(ace);if(Fn.forEach(function($i,to){to>0&&(ca=Math.min(($i||0)-(Fn[to-1]||0),ca))}),Number.isFinite(ca)){var da=ca/qn,ea=sr.layout==="vertical"?L.height:L.width;if(sr.padding==="gap"&&(cn=da*ea/2),sr.padding==="no-gap"){var qa=gw(n.barCategoryGap,da*ea),Ri=da*ea/2;cn=Ri-qa-(Ri-qa)/ea*qa}}}re==="xAxis"?$n=[L.left+(Jr.left||0)+(cn||0),L.left+L.width-(Jr.right||0)-(cn||0)]:re==="yAxis"?$n=Ge==="horizontal"?[L.top+L.height-(Jr.bottom||0),L.top+(Jr.top||0)]:[L.top+(Jr.top||0)+(cn||0),L.top+L.height-(Jr.bottom||0)-(cn||0)]:$n=sr.range,Lr&&($n=[$n[1],$n[0]]);var mi=gge(sr,ve,Vt),Io=mi.scale,ya=mi.realScaleType;Io.domain(zr).range($n),yge(Io);var Wn=Ege(Io,cg(cg({},sr),{},{realScaleType:ya}));re==="xAxis"?(On=nr==="top"&&!pn||nr==="bottom"&&pn,xn=L.left,Wa=gt[Or]-On*sr.height):re==="yAxis"&&(On=nr==="left"&&!pn||nr==="right"&&pn,xn=gt[Or]-On*sr.width,Wa=L.top);var Ei=cg(cg(cg({},sr),Wn),{},{realScaleType:ya,x:xn,y:Wa,scale:Io,width:re==="xAxis"?L.width:sr.width,height:re==="yAxis"?L.height:sr.height});return Ei.bandSize=uP(Ei,Wn),!sr.hide&&re==="xAxis"?gt[Or]+=(On?-1:1)*Ei.height:sr.hide||(gt[Or]+=(On?-1:1)*Ei.width),cg(cg({},Xt),{},pL({},cr,Ei))},{})},T$=function(n,S){var L=n.x,re=n.y,ve=S.x,Ce=S.y;return{x:Math.min(L,ve),y:Math.min(re,Ce),width:Math.abs(ve-L),height:Math.abs(Ce-re)}},nbe=function(n){var S=n.x1,L=n.y1,re=n.x2,ve=n.y2;return T$({x:S,y:L},{x:re,y:ve})},A$=(function(){function e(n){ebe(this,e),this.scale=n}return tbe(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(S){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},re=L.bandAware,ve=L.position;if(S!==void 0){if(ve)switch(ve){case"start":return this.scale(S);case"middle":{var Ce=this.bandwidth?this.bandwidth()/2:0;return this.scale(S)+Ce}case"end":{var Be=this.bandwidth?this.bandwidth():0;return this.scale(S)+Be}default:return this.scale(S)}if(re){var Ge=this.bandwidth?this.bandwidth()/2:0;return this.scale(S)+Ge}return this.scale(S)}}},{key:"isInRange",value:function(S){var L=this.range(),re=L[0],ve=L[L.length-1];return re<=ve?S>=re&&S<=ve:S>=ve&&S<=re}}],[{key:"create",value:function(S){return new e(S)}}])})();pL(A$,"EPS",1e-4);var R9=function(n){var S=Object.keys(n).reduce(function(L,re){return cg(cg({},L),{},pL({},re,A$.create(n[re])))},{});return cg(cg({},S),{},{apply:function(re){var ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ce=ve.bandAware,Be=ve.position;return Lxe(re,function(Ge,Ke){return S[Ke].apply(Ge,{bandAware:Ce,position:Be})})},isInRange:function(re){return g$(re,function(ve,Ce){return S[Ce].isInRange(ve)})}})};function abe(e){return(e%180+180)%180}var ibe=function(n){var S=n.width,L=n.height,re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,ve=abe(re),Ce=ve*Math.PI/180,Be=Math.atan(L/S),Ge=Ce>Be&&Ce<Math.PI-Be?L/Math.sin(Ce):S/Math.cos(Ce);return Math.abs(Ge)},FO,mX;function obe(){if(mX)return FO;mX=1;var e=hx(),n=GE(),S=QP();function L(re){return function(ve,Ce,Be){var Ge=Object(ve);if(!n(ve)){var Ke=e(Ce,3);ve=S(ve),Ce=function(gt){return Ke(Ge[gt],gt,Ge)}}var dt=re(ve,Ce,Be);return dt>-1?Ge[Ke?ve[dt]:dt]:void 0}}return FO=L,FO}var BO,gX;function sbe(){if(gX)return BO;gX=1;var e=d$();function n(S){var L=e(S),re=L%1;return L===L?re?L-re:L:0}return BO=n,BO}var jO,yX;function lbe(){if(yX)return jO;yX=1;var e=zY(),n=hx(),S=sbe(),L=Math.max;function re(ve,Ce,Be){var Ge=ve==null?0:ve.length;if(!Ge)return-1;var Ke=Be==null?0:S(Be);return Ke<0&&(Ke=L(Ge+Ke,0)),e(ve,n(Ce,3),Ke)}return jO=re,jO}var UO,_X;function ube(){if(_X)return UO;_X=1;var e=obe(),n=lbe(),S=e(n);return UO=S,UO}var cbe=ube();const fbe=ih(cbe);var hbe=KW();const dbe=ih(hbe);var vbe=dbe(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),I9=na.createContext(void 0),D9=na.createContext(void 0),S$=na.createContext(void 0),E$=na.createContext({}),M$=na.createContext(void 0),C$=na.createContext(0),k$=na.createContext(0),xX=function(n){var S=n.state,L=S.xAxisMap,re=S.yAxisMap,ve=S.offset,Ce=n.clipPathId,Be=n.children,Ge=n.width,Ke=n.height,dt=vbe(ve);return la.createElement(I9.Provider,{value:L},la.createElement(D9.Provider,{value:re},la.createElement(E$.Provider,{value:ve},la.createElement(S$.Provider,{value:dt},la.createElement(M$.Provider,{value:Ce},la.createElement(C$.Provider,{value:Ke},la.createElement(k$.Provider,{value:Ge},Be)))))))},pbe=function(){return na.useContext(M$)},P$=function(n){var S=na.useContext(I9);S==null&&xw();var L=S[n];return L==null&&xw(),L},mbe=function(){var n=na.useContext(I9);return nx(n)},gbe=function(){var n=na.useContext(D9),S=fbe(n,function(L){return g$(L.domain,Number.isFinite)});return S||nx(n)},L$=function(n){var S=na.useContext(D9);S==null&&xw();var L=S[n];return L==null&&xw(),L},ybe=function(){var n=na.useContext(S$);return n},_be=function(){return na.useContext(E$)},O9=function(){return na.useContext(k$)},z9=function(){return na.useContext(C$)};function TT(e){"@babel/helpers - typeof";return TT=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},TT(e)}function xbe(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function bbe(e,n){for(var S=0;S<n.length;S++){var L=n[S];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(e,I$(L.key),L)}}function wbe(e,n,S){return n&&bbe(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Tbe(e,n,S){return n=TP(n),Abe(e,R$()?Reflect.construct(n,S||[],TP(e).constructor):n.apply(e,S))}function Abe(e,n){if(n&&(TT(n)==="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Sbe(e)}function Sbe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function R$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(R$=function(){return!!e})()}function TP(e){return TP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(S){return S.__proto__||Object.getPrototypeOf(S)},TP(e)}function Ebe(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&o7(e,n)}function o7(e,n){return o7=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(L,re){return L.__proto__=re,L},o7(e,n)}function bX(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function wX(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?bX(Object(S),!0).forEach(function(L){N9(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):bX(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function N9(e,n,S){return n=I$(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function I$(e){var n=Mbe(e,"string");return TT(n)=="symbol"?n:n+""}function Mbe(e,n){if(TT(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(TT(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Cbe(e,n){return Rbe(e)||Lbe(e,n)||Pbe(e,n)||kbe()}function kbe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Pbe(e,n){if(e){if(typeof e=="string")return TX(e,n);var S=Object.prototype.toString.call(e).slice(8,-1);if(S==="Object"&&e.constructor&&(S=e.constructor.name),S==="Map"||S==="Set")return Array.from(e);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return TX(e,n)}}function TX(e,n){(n==null||n>e.length)&&(n=e.length);for(var S=0,L=new Array(n);S<n;S++)L[S]=e[S];return L}function Lbe(e,n){var S=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(S!=null){var L,re,ve,Ce,Be=[],Ge=!0,Ke=!1;try{if(ve=(S=S.call(e)).next,n!==0)for(;!(Ge=(L=ve.call(S)).done)&&(Be.push(L.value),Be.length!==n);Ge=!0);}catch(dt){Ke=!0,re=dt}finally{try{if(!Ge&&S.return!=null&&(Ce=S.return(),Object(Ce)!==Ce))return}finally{if(Ke)throw re}}return Be}}function Rbe(e){if(Array.isArray(e))return e}function s7(){return s7=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var S=arguments[n];for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(e[L]=S[L])}return e},s7.apply(this,arguments)}var Ibe=function(n,S){var L;return la.isValidElement(n)?L=la.cloneElement(n,S):qu(n)?L=n(S):L=la.createElement("line",s7({},S,{className:"recharts-reference-line-line"})),L},Dbe=function(n,S,L,re,ve,Ce,Be,Ge,Ke){var dt=ve.x,gt=ve.y,Vt=ve.width,Xt=ve.height;if(L){var cr=Ke.y,sr=n.y.apply(cr,{position:Ce});if(my(Ke,"discard")&&!n.y.isInRange(sr))return null;var nr=[{x:dt+Vt,y:sr},{x:dt,y:sr}];return Ge==="left"?nr.reverse():nr}if(S){var zr=Ke.x,Ne=n.x.apply(zr,{position:Ce});if(my(Ke,"discard")&&!n.x.isInRange(Ne))return null;var Jr=[{x:Ne,y:gt+Xt},{x:Ne,y:gt}];return Be==="top"?Jr.reverse():Jr}if(re){var pn=Ke.segment,Lr=pn.map(function(Or){return n.apply(Or,{position:Ce})});return my(Ke,"discard")&&Mxe(Lr,function(Or){return!n.isInRange(Or)})?null:Lr}return null};function Obe(e){var n=e.x,S=e.y,L=e.segment,re=e.xAxisId,ve=e.yAxisId,Ce=e.shape,Be=e.className,Ge=e.alwaysShow,Ke=pbe(),dt=P$(re),gt=L$(ve),Vt=ybe();if(!Ke||!Vt)return null;w1(Ge===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var Xt=R9({x:dt.scale,y:gt.scale}),cr=Ov(n),sr=Ov(S),nr=L&&L.length===2,zr=Dbe(Xt,cr,sr,nr,Vt,e.position,dt.orientation,gt.orientation,e);if(!zr)return null;var Ne=Cbe(zr,2),Jr=Ne[0],pn=Jr.x,Lr=Jr.y,Or=Ne[1],cn=Or.x,$n=Or.y,xn=my(e,"hidden")?"url(#".concat(Ke,")"):void 0,Wa=wX(wX({clipPath:xn},Fu(e,!0)),{},{x1:pn,y1:Lr,x2:cn,y2:$n});return la.createElement(Df,{className:kc("recharts-reference-line",Be)},Ibe(Ce,Wa),Np.renderCallByParent(e,nbe({x1:pn,y1:Lr,x2:cn,y2:$n})))}var F9=(function(e){function n(){return xbe(this,n),Tbe(this,n,arguments)}return Ebe(n,e),wbe(n,[{key:"render",value:function(){return la.createElement(Obe,this.props)}}])})(la.Component);N9(F9,"displayName","ReferenceLine");N9(F9,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function l7(){return l7=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var S=arguments[n];for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(e[L]=S[L])}return e},l7.apply(this,arguments)}function AT(e){"@babel/helpers - typeof";return AT=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},AT(e)}function AX(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function SX(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?AX(Object(S),!0).forEach(function(L){mL(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):AX(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function zbe(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Nbe(e,n){for(var S=0;S<n.length;S++){var L=n[S];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(e,O$(L.key),L)}}function Fbe(e,n,S){return n&&Nbe(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Bbe(e,n,S){return n=AP(n),jbe(e,D$()?Reflect.construct(n,S||[],AP(e).constructor):n.apply(e,S))}function jbe(e,n){if(n&&(AT(n)==="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ube(e)}function Ube(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function D$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(D$=function(){return!!e})()}function AP(e){return AP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(S){return S.__proto__||Object.getPrototypeOf(S)},AP(e)}function qbe(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&u7(e,n)}function u7(e,n){return u7=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(L,re){return L.__proto__=re,L},u7(e,n)}function mL(e,n,S){return n=O$(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function O$(e){var n=Vbe(e,"string");return AT(n)=="symbol"?n:n+""}function Vbe(e,n){if(AT(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(AT(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Hbe=function(n){var S=n.x,L=n.y,re=n.xAxis,ve=n.yAxis,Ce=R9({x:re.scale,y:ve.scale}),Be=Ce.apply({x:S,y:L},{bandAware:!0});return my(n,"discard")&&!Ce.isInRange(Be)?null:Be},gL=(function(e){function n(){return zbe(this,n),Bbe(this,n,arguments)}return qbe(n,e),Fbe(n,[{key:"render",value:function(){var L=this.props,re=L.x,ve=L.y,Ce=L.r,Be=L.alwaysShow,Ge=L.clipPathId,Ke=Ov(re),dt=Ov(ve);if(w1(Be===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!Ke||!dt)return null;var gt=Hbe(this.props);if(!gt)return null;var Vt=gt.x,Xt=gt.y,cr=this.props,sr=cr.shape,nr=cr.className,zr=my(this.props,"hidden")?"url(#".concat(Ge,")"):void 0,Ne=SX(SX({clipPath:zr},Fu(this.props,!0)),{},{cx:Vt,cy:Xt});return la.createElement(Df,{className:kc("recharts-reference-dot",nr)},n.renderDot(sr,Ne),Np.renderCallByParent(this.props,{x:Vt-Ce,y:Xt-Ce,width:2*Ce,height:2*Ce}))}}])})(la.Component);mL(gL,"displayName","ReferenceDot");mL(gL,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});mL(gL,"renderDot",function(e,n){var S;return la.isValidElement(e)?S=la.cloneElement(e,n):qu(e)?S=e(n):S=la.createElement(hL,l7({},n,{cx:n.cx,cy:n.cy,className:"recharts-reference-dot-dot"})),S});function c7(){return c7=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var S=arguments[n];for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(e[L]=S[L])}return e},c7.apply(this,arguments)}function ST(e){"@babel/helpers - typeof";return ST=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ST(e)}function EX(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function MX(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?EX(Object(S),!0).forEach(function(L){yL(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):EX(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function Gbe(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Xbe(e,n){for(var S=0;S<n.length;S++){var L=n[S];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(e,N$(L.key),L)}}function Wbe(e,n,S){return n&&Xbe(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ybe(e,n,S){return n=SP(n),Zbe(e,z$()?Reflect.construct(n,S||[],SP(e).constructor):n.apply(e,S))}function Zbe(e,n){if(n&&(ST(n)==="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return $be(e)}function $be(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function z$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(z$=function(){return!!e})()}function SP(e){return SP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(S){return S.__proto__||Object.getPrototypeOf(S)},SP(e)}function Kbe(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&f7(e,n)}function f7(e,n){return f7=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(L,re){return L.__proto__=re,L},f7(e,n)}function yL(e,n,S){return n=N$(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function N$(e){var n=Jbe(e,"string");return ST(n)=="symbol"?n:n+""}function Jbe(e,n){if(ST(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(ST(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Qbe=function(n,S,L,re,ve){var Ce=ve.x1,Be=ve.x2,Ge=ve.y1,Ke=ve.y2,dt=ve.xAxis,gt=ve.yAxis;if(!dt||!gt)return null;var Vt=R9({x:dt.scale,y:gt.scale}),Xt={x:n?Vt.x.apply(Ce,{position:"start"}):Vt.x.rangeMin,y:L?Vt.y.apply(Ge,{position:"start"}):Vt.y.rangeMin},cr={x:S?Vt.x.apply(Be,{position:"end"}):Vt.x.rangeMax,y:re?Vt.y.apply(Ke,{position:"end"}):Vt.y.rangeMax};return my(ve,"discard")&&(!Vt.isInRange(Xt)||!Vt.isInRange(cr))?null:T$(Xt,cr)},_L=(function(e){function n(){return Gbe(this,n),Ybe(this,n,arguments)}return Kbe(n,e),Wbe(n,[{key:"render",value:function(){var L=this.props,re=L.x1,ve=L.x2,Ce=L.y1,Be=L.y2,Ge=L.className,Ke=L.alwaysShow,dt=L.clipPathId;w1(Ke===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var gt=Ov(re),Vt=Ov(ve),Xt=Ov(Ce),cr=Ov(Be),sr=this.props.shape;if(!gt&&!Vt&&!Xt&&!cr&&!sr)return null;var nr=Qbe(gt,Vt,Xt,cr,this.props);if(!nr&&!sr)return null;var zr=my(this.props,"hidden")?"url(#".concat(dt,")"):void 0;return la.createElement(Df,{className:kc("recharts-reference-area",Ge)},n.renderRect(sr,MX(MX({clipPath:zr},Fu(this.props,!0)),nr)),Np.renderCallByParent(this.props,nr))}}])})(la.Component);yL(_L,"displayName","ReferenceArea");yL(_L,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});yL(_L,"renderRect",function(e,n){var S;return la.isValidElement(e)?S=la.cloneElement(e,n):qu(e)?S=e(n):S=la.createElement(L9,c7({},n,{className:"recharts-reference-area-rect"})),S});function F$(e,n,S){if(n<1)return[];if(n===1&&S===void 0)return e;for(var L=[],re=0;re<e.length;re+=n)L.push(e[re]);return L}function ewe(e,n,S){var L={width:e.width+n.width,height:e.height+n.height};return ibe(L,S)}function twe(e,n,S){var L=S==="width",re=e.x,ve=e.y,Ce=e.width,Be=e.height;return n===1?{start:L?re:ve,end:L?re+Ce:ve+Be}:{start:L?re+Ce:ve+Be,end:L?re:ve}}function EP(e,n,S,L,re){if(e*n<e*L||e*n>e*re)return!1;var ve=S();return e*(n-e*ve/2-L)>=0&&e*(n+e*ve/2-re)<=0}function rwe(e,n){return F$(e,n+1)}function nwe(e,n,S,L,re){for(var ve=(L||[]).slice(),Ce=n.start,Be=n.end,Ge=0,Ke=1,dt=Ce,gt=function(){var cr=L?.[Ge];if(cr===void 0)return{v:F$(L,Ke)};var sr=Ge,nr,zr=function(){return nr===void 0&&(nr=S(cr,sr)),nr},Ne=cr.coordinate,Jr=Ge===0||EP(e,Ne,zr,dt,Be);Jr||(Ge=0,dt=Ce,Ke+=1),Jr&&(dt=Ne+e*(zr()/2+re),Ge+=Ke)},Vt;Ke<=ve.length;)if(Vt=gt(),Vt)return Vt.v;return[]}function zE(e){"@babel/helpers - typeof";return zE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},zE(e)}function CX(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function zp(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?CX(Object(S),!0).forEach(function(L){awe(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):CX(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function awe(e,n,S){return n=iwe(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function iwe(e){var n=owe(e,"string");return zE(n)=="symbol"?n:n+""}function owe(e,n){if(zE(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(zE(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function swe(e,n,S,L,re){for(var ve=(L||[]).slice(),Ce=ve.length,Be=n.start,Ge=n.end,Ke=function(Vt){var Xt=ve[Vt],cr,sr=function(){return cr===void 0&&(cr=S(Xt,Vt)),cr};if(Vt===Ce-1){var nr=e*(Xt.coordinate+e*sr()/2-Ge);ve[Vt]=Xt=zp(zp({},Xt),{},{tickCoord:nr>0?Xt.coordinate-nr*e:Xt.coordinate})}else ve[Vt]=Xt=zp(zp({},Xt),{},{tickCoord:Xt.coordinate});var zr=EP(e,Xt.tickCoord,sr,Be,Ge);zr&&(Ge=Xt.tickCoord-e*(sr()/2+re),ve[Vt]=zp(zp({},Xt),{},{isShow:!0}))},dt=Ce-1;dt>=0;dt--)Ke(dt);return ve}function lwe(e,n,S,L,re,ve){var Ce=(L||[]).slice(),Be=Ce.length,Ge=n.start,Ke=n.end;if(ve){var dt=L[Be-1],gt=S(dt,Be-1),Vt=e*(dt.coordinate+e*gt/2-Ke);Ce[Be-1]=dt=zp(zp({},dt),{},{tickCoord:Vt>0?dt.coordinate-Vt*e:dt.coordinate});var Xt=EP(e,dt.tickCoord,function(){return gt},Ge,Ke);Xt&&(Ke=dt.tickCoord-e*(gt/2+re),Ce[Be-1]=zp(zp({},dt),{},{isShow:!0}))}for(var cr=ve?Be-1:Be,sr=function(Ne){var Jr=Ce[Ne],pn,Lr=function(){return pn===void 0&&(pn=S(Jr,Ne)),pn};if(Ne===0){var Or=e*(Jr.coordinate-e*Lr()/2-Ge);Ce[Ne]=Jr=zp(zp({},Jr),{},{tickCoord:Or<0?Jr.coordinate-Or*e:Jr.coordinate})}else Ce[Ne]=Jr=zp(zp({},Jr),{},{tickCoord:Jr.coordinate});var cn=EP(e,Jr.tickCoord,Lr,Ge,Ke);cn&&(Ge=Jr.tickCoord+e*(Lr()/2+re),Ce[Ne]=zp(zp({},Jr),{},{isShow:!0}))},nr=0;nr<cr;nr++)sr(nr);return Ce}function B9(e,n,S){var L=e.tick,re=e.ticks,ve=e.viewBox,Ce=e.minTickGap,Be=e.orientation,Ge=e.interval,Ke=e.tickFormatter,dt=e.unit,gt=e.angle;if(!re||!re.length||!L)return[];if(ys(Ge)||dx.isSsr)return rwe(re,typeof Ge=="number"&&ys(Ge)?Ge:0);var Vt=[],Xt=Be==="top"||Be==="bottom"?"width":"height",cr=dt&&Xt==="width"?Z5(dt,{fontSize:n,letterSpacing:S}):{width:0,height:0},sr=function(Jr,pn){var Lr=qu(Ke)?Ke(Jr.value,pn):Jr.value;return Xt==="width"?ewe(Z5(Lr,{fontSize:n,letterSpacing:S}),cr,gt):Z5(Lr,{fontSize:n,letterSpacing:S})[Xt]},nr=re.length>=2?dg(re[1].coordinate-re[0].coordinate):1,zr=twe(ve,nr,Xt);return Ge==="equidistantPreserveStart"?nwe(nr,zr,sr,re,Ce):(Ge==="preserveStart"||Ge==="preserveStartEnd"?Vt=lwe(nr,zr,sr,re,Ce,Ge==="preserveStartEnd"):Vt=swe(nr,zr,sr,re,Ce),Vt.filter(function(Ne){return Ne.isShow}))}var uwe=["viewBox"],cwe=["viewBox"],fwe=["ticks"];function ET(e){"@babel/helpers - typeof";return ET=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ET(e)}function nT(){return nT=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var S=arguments[n];for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(e[L]=S[L])}return e},nT.apply(this,arguments)}function kX(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function Rv(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?kX(Object(S),!0).forEach(function(L){j9(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):kX(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function qO(e,n){if(e==null)return{};var S=hwe(e,n),L,re;if(Object.getOwnPropertySymbols){var ve=Object.getOwnPropertySymbols(e);for(re=0;re<ve.length;re++)L=ve[re],!(n.indexOf(L)>=0)&&Object.prototype.propertyIsEnumerable.call(e,L)&&(S[L]=e[L])}return S}function hwe(e,n){if(e==null)return{};var S={};for(var L in e)if(Object.prototype.hasOwnProperty.call(e,L)){if(n.indexOf(L)>=0)continue;S[L]=e[L]}return S}function dwe(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function PX(e,n){for(var S=0;S<n.length;S++){var L=n[S];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(e,j$(L.key),L)}}function vwe(e,n,S){return n&&PX(e.prototype,n),S&&PX(e,S),Object.defineProperty(e,"prototype",{writable:!1}),e}function pwe(e,n,S){return n=MP(n),mwe(e,B$()?Reflect.construct(n,S||[],MP(e).constructor):n.apply(e,S))}function mwe(e,n){if(n&&(ET(n)==="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return gwe(e)}function gwe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function B$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(B$=function(){return!!e})()}function MP(e){return MP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(S){return S.__proto__||Object.getPrototypeOf(S)},MP(e)}function ywe(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&h7(e,n)}function h7(e,n){return h7=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(L,re){return L.__proto__=re,L},h7(e,n)}function j9(e,n,S){return n=j$(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function j$(e){var n=_we(e,"string");return ET(n)=="symbol"?n:n+""}function _we(e,n){if(ET(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(ET(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var GT=(function(e){function n(S){var L;return dwe(this,n),L=pwe(this,n,[S]),L.state={fontSize:"",letterSpacing:""},L}return ywe(n,e),vwe(n,[{key:"shouldComponentUpdate",value:function(L,re){var ve=L.viewBox,Ce=qO(L,uwe),Be=this.props,Ge=Be.viewBox,Ke=qO(Be,cwe);return!iT(ve,Ge)||!iT(Ce,Ke)||!iT(re,this.state)}},{key:"componentDidMount",value:function(){var L=this.layerReference;if(L){var re=L.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];re&&this.setState({fontSize:window.getComputedStyle(re).fontSize,letterSpacing:window.getComputedStyle(re).letterSpacing})}}},{key:"getTickLineCoord",value:function(L){var re=this.props,ve=re.x,Ce=re.y,Be=re.width,Ge=re.height,Ke=re.orientation,dt=re.tickSize,gt=re.mirror,Vt=re.tickMargin,Xt,cr,sr,nr,zr,Ne,Jr=gt?-1:1,pn=L.tickSize||dt,Lr=ys(L.tickCoord)?L.tickCoord:L.coordinate;switch(Ke){case"top":Xt=cr=L.coordinate,nr=Ce+ +!gt*Ge,sr=nr-Jr*pn,Ne=sr-Jr*Vt,zr=Lr;break;case"left":sr=nr=L.coordinate,cr=ve+ +!gt*Be,Xt=cr-Jr*pn,zr=Xt-Jr*Vt,Ne=Lr;break;case"right":sr=nr=L.coordinate,cr=ve+ +gt*Be,Xt=cr+Jr*pn,zr=Xt+Jr*Vt,Ne=Lr;break;default:Xt=cr=L.coordinate,nr=Ce+ +gt*Ge,sr=nr+Jr*pn,Ne=sr+Jr*Vt,zr=Lr;break}return{line:{x1:Xt,y1:sr,x2:cr,y2:nr},tick:{x:zr,y:Ne}}}},{key:"getTickTextAnchor",value:function(){var L=this.props,re=L.orientation,ve=L.mirror,Ce;switch(re){case"left":Ce=ve?"start":"end";break;case"right":Ce=ve?"end":"start";break;default:Ce="middle";break}return Ce}},{key:"getTickVerticalAnchor",value:function(){var L=this.props,re=L.orientation,ve=L.mirror,Ce="end";switch(re){case"left":case"right":Ce="middle";break;case"top":Ce=ve?"start":"end";break;default:Ce=ve?"end":"start";break}return Ce}},{key:"renderAxisLine",value:function(){var L=this.props,re=L.x,ve=L.y,Ce=L.width,Be=L.height,Ge=L.orientation,Ke=L.mirror,dt=L.axisLine,gt=Rv(Rv(Rv({},Fu(this.props,!1)),Fu(dt,!1)),{},{fill:"none"});if(Ge==="top"||Ge==="bottom"){var Vt=+(Ge==="top"&&!Ke||Ge==="bottom"&&Ke);gt=Rv(Rv({},gt),{},{x1:re,y1:ve+Vt*Be,x2:re+Ce,y2:ve+Vt*Be})}else{var Xt=+(Ge==="left"&&!Ke||Ge==="right"&&Ke);gt=Rv(Rv({},gt),{},{x1:re+Xt*Ce,y1:ve,x2:re+Xt*Ce,y2:ve+Be})}return la.createElement("line",nT({},gt,{className:kc("recharts-cartesian-axis-line",P0(dt,"className"))}))}},{key:"renderTicks",value:function(L,re,ve){var Ce=this,Be=this.props,Ge=Be.tickLine,Ke=Be.stroke,dt=Be.tick,gt=Be.tickFormatter,Vt=Be.unit,Xt=B9(Rv(Rv({},this.props),{},{ticks:L}),re,ve),cr=this.getTickTextAnchor(),sr=this.getTickVerticalAnchor(),nr=Fu(this.props,!1),zr=Fu(dt,!1),Ne=Rv(Rv({},nr),{},{fill:"none"},Fu(Ge,!1)),Jr=Xt.map(function(pn,Lr){var Or=Ce.getTickLineCoord(pn),cn=Or.line,$n=Or.tick,xn=Rv(Rv(Rv(Rv({textAnchor:cr,verticalAnchor:sr},nr),{},{stroke:"none",fill:Ke},zr),$n),{},{index:Lr,payload:pn,visibleTicksCount:Xt.length,tickFormatter:gt});return la.createElement(Df,nT({className:"recharts-cartesian-axis-tick",key:"tick-".concat(pn.value,"-").concat(pn.coordinate,"-").concat(pn.tickCoord)},nE(Ce.props,pn,Lr)),Ge&&la.createElement("line",nT({},Ne,cn,{className:kc("recharts-cartesian-axis-tick-line",P0(Ge,"className"))})),dt&&n.renderTickItem(dt,xn,"".concat(qu(gt)?gt(pn.value,Lr):pn.value).concat(Vt||"")))});return la.createElement("g",{className:"recharts-cartesian-axis-ticks"},Jr)}},{key:"render",value:function(){var L=this,re=this.props,ve=re.axisLine,Ce=re.width,Be=re.height,Ge=re.ticksGenerator,Ke=re.className,dt=re.hide;if(dt)return null;var gt=this.props,Vt=gt.ticks,Xt=qO(gt,fwe),cr=Vt;return qu(Ge)&&(cr=Vt&&Vt.length>0?Ge(this.props):Ge(Xt)),Ce<=0||Be<=0||!cr||!cr.length?null:la.createElement(Df,{className:kc("recharts-cartesian-axis",Ke),ref:function(nr){L.layerReference=nr}},ve&&this.renderAxisLine(),this.renderTicks(cr,this.state.fontSize,this.state.letterSpacing),Np.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(L,re,ve){var Ce,Be=kc(re.className,"recharts-cartesian-axis-tick-value");return la.isValidElement(L)?Ce=la.cloneElement(L,Rv(Rv({},re),{},{className:Be})):qu(L)?Ce=L(Rv(Rv({},re),{},{className:Be})):Ce=la.createElement(Z6,nT({},re,{className:"recharts-cartesian-axis-tick-value"}),ve),Ce}}])})(na.Component);j9(GT,"displayName","CartesianAxis");j9(GT,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var xwe=["x1","y1","x2","y2","key"],bwe=["offset"];function bw(e){"@babel/helpers - typeof";return bw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},bw(e)}function LX(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function Fp(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?LX(Object(S),!0).forEach(function(L){wwe(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):LX(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function wwe(e,n,S){return n=Twe(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function Twe(e){var n=Awe(e,"string");return bw(n)=="symbol"?n:n+""}function Awe(e,n){if(bw(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(bw(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function sw(){return sw=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var S=arguments[n];for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(e[L]=S[L])}return e},sw.apply(this,arguments)}function RX(e,n){if(e==null)return{};var S=Swe(e,n),L,re;if(Object.getOwnPropertySymbols){var ve=Object.getOwnPropertySymbols(e);for(re=0;re<ve.length;re++)L=ve[re],!(n.indexOf(L)>=0)&&Object.prototype.propertyIsEnumerable.call(e,L)&&(S[L]=e[L])}return S}function Swe(e,n){if(e==null)return{};var S={};for(var L in e)if(Object.prototype.hasOwnProperty.call(e,L)){if(n.indexOf(L)>=0)continue;S[L]=e[L]}return S}var Ewe=function(n){var S=n.fill;if(!S||S==="none")return null;var L=n.fillOpacity,re=n.x,ve=n.y,Ce=n.width,Be=n.height,Ge=n.ry;return la.createElement("rect",{x:re,y:ve,ry:Ge,width:Ce,height:Be,stroke:"none",fill:S,fillOpacity:L,className:"recharts-cartesian-grid-bg"})};function U$(e,n){var S;if(la.isValidElement(e))S=la.cloneElement(e,n);else if(qu(e))S=e(n);else{var L=n.x1,re=n.y1,ve=n.x2,Ce=n.y2,Be=n.key,Ge=RX(n,xwe),Ke=Fu(Ge,!1);Ke.offset;var dt=RX(Ke,bwe);S=la.createElement("line",sw({},dt,{x1:L,y1:re,x2:ve,y2:Ce,fill:"none",key:Be}))}return S}function Mwe(e){var n=e.x,S=e.width,L=e.horizontal,re=L===void 0?!0:L,ve=e.horizontalPoints;if(!re||!ve||!ve.length)return null;var Ce=ve.map(function(Be,Ge){var Ke=Fp(Fp({},e),{},{x1:n,y1:Be,x2:n+S,y2:Be,key:"line-".concat(Ge),index:Ge});return U$(re,Ke)});return la.createElement("g",{className:"recharts-cartesian-grid-horizontal"},Ce)}function Cwe(e){var n=e.y,S=e.height,L=e.vertical,re=L===void 0?!0:L,ve=e.verticalPoints;if(!re||!ve||!ve.length)return null;var Ce=ve.map(function(Be,Ge){var Ke=Fp(Fp({},e),{},{x1:Be,y1:n,x2:Be,y2:n+S,key:"line-".concat(Ge),index:Ge});return U$(re,Ke)});return la.createElement("g",{className:"recharts-cartesian-grid-vertical"},Ce)}function kwe(e){var n=e.horizontalFill,S=e.fillOpacity,L=e.x,re=e.y,ve=e.width,Ce=e.height,Be=e.horizontalPoints,Ge=e.horizontal,Ke=Ge===void 0?!0:Ge;if(!Ke||!n||!n.length)return null;var dt=Be.map(function(Vt){return Math.round(Vt+re-re)}).sort(function(Vt,Xt){return Vt-Xt});re!==dt[0]&&dt.unshift(0);var gt=dt.map(function(Vt,Xt){var cr=!dt[Xt+1],sr=cr?re+Ce-Vt:dt[Xt+1]-Vt;if(sr<=0)return null;var nr=Xt%n.length;return la.createElement("rect",{key:"react-".concat(Xt),y:Vt,x:L,height:sr,width:ve,stroke:"none",fill:n[nr],fillOpacity:S,className:"recharts-cartesian-grid-bg"})});return la.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},gt)}function Pwe(e){var n=e.vertical,S=n===void 0?!0:n,L=e.verticalFill,re=e.fillOpacity,ve=e.x,Ce=e.y,Be=e.width,Ge=e.height,Ke=e.verticalPoints;if(!S||!L||!L.length)return null;var dt=Ke.map(function(Vt){return Math.round(Vt+ve-ve)}).sort(function(Vt,Xt){return Vt-Xt});ve!==dt[0]&&dt.unshift(0);var gt=dt.map(function(Vt,Xt){var cr=!dt[Xt+1],sr=cr?ve+Be-Vt:dt[Xt+1]-Vt;if(sr<=0)return null;var nr=Xt%L.length;return la.createElement("rect",{key:"react-".concat(Xt),x:Vt,y:Ce,width:sr,height:Ge,stroke:"none",fill:L[nr],fillOpacity:re,className:"recharts-cartesian-grid-bg"})});return la.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},gt)}var Lwe=function(n,S){var L=n.xAxis,re=n.width,ve=n.height,Ce=n.offset;return QZ(B9(Fp(Fp(Fp({},GT.defaultProps),L),{},{ticks:x1(L,!0),viewBox:{x:0,y:0,width:re,height:ve}})),Ce.left,Ce.left+Ce.width,S)},Rwe=function(n,S){var L=n.yAxis,re=n.width,ve=n.height,Ce=n.offset;return QZ(B9(Fp(Fp(Fp({},GT.defaultProps),L),{},{ticks:x1(L,!0),viewBox:{x:0,y:0,width:re,height:ve}})),Ce.top,Ce.top+Ce.height,S)},eT={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function $E(e){var n,S,L,re,ve,Ce,Be=O9(),Ge=z9(),Ke=_be(),dt=Fp(Fp({},e),{},{stroke:(n=e.stroke)!==null&&n!==void 0?n:eT.stroke,fill:(S=e.fill)!==null&&S!==void 0?S:eT.fill,horizontal:(L=e.horizontal)!==null&&L!==void 0?L:eT.horizontal,horizontalFill:(re=e.horizontalFill)!==null&&re!==void 0?re:eT.horizontalFill,vertical:(ve=e.vertical)!==null&&ve!==void 0?ve:eT.vertical,verticalFill:(Ce=e.verticalFill)!==null&&Ce!==void 0?Ce:eT.verticalFill,x:ys(e.x)?e.x:Ke.left,y:ys(e.y)?e.y:Ke.top,width:ys(e.width)?e.width:Ke.width,height:ys(e.height)?e.height:Ke.height}),gt=dt.x,Vt=dt.y,Xt=dt.width,cr=dt.height,sr=dt.syncWithTicks,nr=dt.horizontalValues,zr=dt.verticalValues,Ne=mbe(),Jr=gbe();if(!ys(Xt)||Xt<=0||!ys(cr)||cr<=0||!ys(gt)||gt!==+gt||!ys(Vt)||Vt!==+Vt)return null;var pn=dt.verticalCoordinatesGenerator||Lwe,Lr=dt.horizontalCoordinatesGenerator||Rwe,Or=dt.horizontalPoints,cn=dt.verticalPoints;if((!Or||!Or.length)&&qu(Lr)){var $n=nr&&nr.length,xn=Lr({yAxis:Jr?Fp(Fp({},Jr),{},{ticks:$n?nr:Jr.ticks}):void 0,width:Be,height:Ge,offset:Ke},$n?!0:sr);w1(Array.isArray(xn),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(bw(xn),"]")),Array.isArray(xn)&&(Or=xn)}if((!cn||!cn.length)&&qu(pn)){var Wa=zr&&zr.length,On=pn({xAxis:Ne?Fp(Fp({},Ne),{},{ticks:Wa?zr:Ne.ticks}):void 0,width:Be,height:Ge,offset:Ke},Wa?!0:sr);w1(Array.isArray(On),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(bw(On),"]")),Array.isArray(On)&&(cn=On)}return la.createElement("g",{className:"recharts-cartesian-grid"},la.createElement(Ewe,{fill:dt.fill,fillOpacity:dt.fillOpacity,x:dt.x,y:dt.y,width:dt.width,height:dt.height,ry:dt.ry}),la.createElement(Mwe,sw({},dt,{offset:Ke,horizontalPoints:Or,xAxis:Ne,yAxis:Jr})),la.createElement(Cwe,sw({},dt,{offset:Ke,verticalPoints:cn,xAxis:Ne,yAxis:Jr})),la.createElement(kwe,sw({},dt,{horizontalPoints:Or})),la.createElement(Pwe,sw({},dt,{verticalPoints:cn})))}$E.displayName="CartesianGrid";var Iwe=["type","layout","connectNulls","ref"],Dwe=["key"];function MT(e){"@babel/helpers - typeof";return MT=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},MT(e)}function IX(e,n){if(e==null)return{};var S=Owe(e,n),L,re;if(Object.getOwnPropertySymbols){var ve=Object.getOwnPropertySymbols(e);for(re=0;re<ve.length;re++)L=ve[re],!(n.indexOf(L)>=0)&&Object.prototype.propertyIsEnumerable.call(e,L)&&(S[L]=e[L])}return S}function Owe(e,n){if(e==null)return{};var S={};for(var L in e)if(Object.prototype.hasOwnProperty.call(e,L)){if(n.indexOf(L)>=0)continue;S[L]=e[L]}return S}function Q5(){return Q5=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var S=arguments[n];for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(e[L]=S[L])}return e},Q5.apply(this,arguments)}function DX(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function $m(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?DX(Object(S),!0).forEach(function(L){fg(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):DX(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function tT(e){return Bwe(e)||Fwe(e)||Nwe(e)||zwe()}function zwe(){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 Nwe(e,n){if(e){if(typeof e=="string")return d7(e,n);var S=Object.prototype.toString.call(e).slice(8,-1);if(S==="Object"&&e.constructor&&(S=e.constructor.name),S==="Map"||S==="Set")return Array.from(e);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return d7(e,n)}}function Fwe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Bwe(e){if(Array.isArray(e))return d7(e)}function d7(e,n){(n==null||n>e.length)&&(n=e.length);for(var S=0,L=new Array(n);S<n;S++)L[S]=e[S];return L}function jwe(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function OX(e,n){for(var S=0;S<n.length;S++){var L=n[S];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(e,V$(L.key),L)}}function Uwe(e,n,S){return n&&OX(e.prototype,n),S&&OX(e,S),Object.defineProperty(e,"prototype",{writable:!1}),e}function qwe(e,n,S){return n=CP(n),Vwe(e,q$()?Reflect.construct(n,S||[],CP(e).constructor):n.apply(e,S))}function Vwe(e,n){if(n&&(MT(n)==="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Hwe(e)}function Hwe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function q$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(q$=function(){return!!e})()}function CP(e){return CP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(S){return S.__proto__||Object.getPrototypeOf(S)},CP(e)}function Gwe(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&v7(e,n)}function v7(e,n){return v7=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(L,re){return L.__proto__=re,L},v7(e,n)}function fg(e,n,S){return n=V$(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function V$(e){var n=Xwe(e,"string");return MT(n)=="symbol"?n:n+""}function Xwe(e,n){if(MT(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(MT(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var yy=(function(e){function n(){var S;jwe(this,n);for(var L=arguments.length,re=new Array(L),ve=0;ve<L;ve++)re[ve]=arguments[ve];return S=qwe(this,n,[].concat(re)),fg(S,"state",{isAnimationFinished:!0,totalLength:0}),fg(S,"generateSimpleStrokeDasharray",function(Ce,Be){return"".concat(Be,"px ").concat(Ce-Be,"px")}),fg(S,"getStrokeDasharray",function(Ce,Be,Ge){var Ke=Ge.reduce(function(zr,Ne){return zr+Ne});if(!Ke)return S.generateSimpleStrokeDasharray(Be,Ce);for(var dt=Math.floor(Ce/Ke),gt=Ce%Ke,Vt=Be-Ce,Xt=[],cr=0,sr=0;cr<Ge.length;sr+=Ge[cr],++cr)if(sr+Ge[cr]>gt){Xt=[].concat(tT(Ge.slice(0,cr)),[gt-sr]);break}var nr=Xt.length%2===0?[0,Vt]:[Vt];return[].concat(tT(n.repeat(Ge,dt)),tT(Xt),nr).map(function(zr){return"".concat(zr,"px")}).join(", ")}),fg(S,"id",Tw("recharts-line-")),fg(S,"pathRef",function(Ce){S.mainCurve=Ce}),fg(S,"handleAnimationEnd",function(){S.setState({isAnimationFinished:!0}),S.props.onAnimationEnd&&S.props.onAnimationEnd()}),fg(S,"handleAnimationStart",function(){S.setState({isAnimationFinished:!1}),S.props.onAnimationStart&&S.props.onAnimationStart()}),S}return Gwe(n,e),Uwe(n,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var L=this.getTotalLength();this.setState({totalLength:L})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var L=this.getTotalLength();L!==this.state.totalLength&&this.setState({totalLength:L})}}},{key:"getTotalLength",value:function(){var L=this.mainCurve;try{return L&&L.getTotalLength&&L.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(L,re){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var ve=this.props,Ce=ve.points,Be=ve.xAxis,Ge=ve.yAxis,Ke=ve.layout,dt=ve.children,gt=wm(dt,cx);if(!gt)return null;var Vt=function(sr,nr){return{x:sr.x,y:sr.y,value:sr.value,errorVal:zv(sr.payload,nr)}},Xt={clipPath:L?"url(#clipPath-".concat(re,")"):null};return la.createElement(Df,Xt,gt.map(function(cr){return la.cloneElement(cr,{key:"bar-".concat(cr.props.dataKey),data:Ce,xAxis:Be,yAxis:Ge,layout:Ke,dataPointFormatter:Vt})}))}},{key:"renderDots",value:function(L,re,ve){var Ce=this.props.isAnimationActive;if(Ce&&!this.state.isAnimationFinished)return null;var Be=this.props,Ge=Be.dot,Ke=Be.points,dt=Be.dataKey,gt=Fu(this.props,!1),Vt=Fu(Ge,!0),Xt=Ke.map(function(sr,nr){var zr=$m($m($m({key:"dot-".concat(nr),r:3},gt),Vt),{},{index:nr,cx:sr.x,cy:sr.y,value:sr.value,dataKey:dt,payload:sr.payload,points:Ke});return n.renderDotItem(Ge,zr)}),cr={clipPath:L?"url(#clipPath-".concat(re?"":"dots-").concat(ve,")"):null};return la.createElement(Df,Q5({className:"recharts-line-dots",key:"dots"},cr),Xt)}},{key:"renderCurveStatically",value:function(L,re,ve,Ce){var Be=this.props,Ge=Be.type,Ke=Be.layout,dt=Be.connectNulls;Be.ref;var gt=IX(Be,Iwe),Vt=$m($m($m({},Fu(gt,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:re?"url(#clipPath-".concat(ve,")"):null,points:L},Ce),{},{type:Ge,layout:Ke,connectNulls:dt});return la.createElement(hw,Q5({},Vt,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(L,re){var ve=this,Ce=this.props,Be=Ce.points,Ge=Ce.strokeDasharray,Ke=Ce.isAnimationActive,dt=Ce.animationBegin,gt=Ce.animationDuration,Vt=Ce.animationEasing,Xt=Ce.animationId,cr=Ce.animateNewValues,sr=Ce.width,nr=Ce.height,zr=this.state,Ne=zr.prevPoints,Jr=zr.totalLength;return la.createElement(vg,{begin:dt,duration:gt,isActive:Ke,easing:Vt,from:{t:0},to:{t:1},key:"line-".concat(Xt),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(pn){var Lr=pn.t;if(Ne){var Or=Ne.length/Be.length,cn=Be.map(function(qn,ca){var Fn=Math.floor(ca*Or);if(Ne[Fn]){var da=Ne[Fn],ea=av(da.x,qn.x),qa=av(da.y,qn.y);return $m($m({},qn),{},{x:ea(Lr),y:qa(Lr)})}if(cr){var Ri=av(sr*2,qn.x),mi=av(nr/2,qn.y);return $m($m({},qn),{},{x:Ri(Lr),y:mi(Lr)})}return $m($m({},qn),{},{x:qn.x,y:qn.y})});return ve.renderCurveStatically(cn,L,re)}var $n=av(0,Jr),xn=$n(Lr),Wa;if(Ge){var On="".concat(Ge).split(/[,\s]+/gim).map(function(qn){return parseFloat(qn)});Wa=ve.getStrokeDasharray(xn,Jr,On)}else Wa=ve.generateSimpleStrokeDasharray(Jr,xn);return ve.renderCurveStatically(Be,L,re,{strokeDasharray:Wa})})}},{key:"renderCurve",value:function(L,re){var ve=this.props,Ce=ve.points,Be=ve.isAnimationActive,Ge=this.state,Ke=Ge.prevPoints,dt=Ge.totalLength;return Be&&Ce&&Ce.length&&(!Ke&&dt>0||!yw(Ke,Ce))?this.renderCurveWithAnimation(L,re):this.renderCurveStatically(Ce,L,re)}},{key:"render",value:function(){var L,re=this.props,ve=re.hide,Ce=re.dot,Be=re.points,Ge=re.className,Ke=re.xAxis,dt=re.yAxis,gt=re.top,Vt=re.left,Xt=re.width,cr=re.height,sr=re.isAnimationActive,nr=re.id;if(ve||!Be||!Be.length)return null;var zr=this.state.isAnimationFinished,Ne=Be.length===1,Jr=kc("recharts-line",Ge),pn=Ke&&Ke.allowDataOverflow,Lr=dt&&dt.allowDataOverflow,Or=pn||Lr,cn=Ru(nr)?this.id:nr,$n=(L=Fu(Ce,!1))!==null&&L!==void 0?L:{r:3,strokeWidth:2},xn=$n.r,Wa=xn===void 0?3:xn,On=$n.strokeWidth,qn=On===void 0?2:On,ca=rY(Ce)?Ce:{},Fn=ca.clipDot,da=Fn===void 0?!0:Fn,ea=Wa*2+qn;return la.createElement(Df,{className:Jr},pn||Lr?la.createElement("defs",null,la.createElement("clipPath",{id:"clipPath-".concat(cn)},la.createElement("rect",{x:pn?Vt:Vt-Xt/2,y:Lr?gt:gt-cr/2,width:pn?Xt:Xt*2,height:Lr?cr:cr*2})),!da&&la.createElement("clipPath",{id:"clipPath-dots-".concat(cn)},la.createElement("rect",{x:Vt-ea/2,y:gt-ea/2,width:Xt+ea,height:cr+ea}))):null,!Ne&&this.renderCurve(Or,cn),this.renderErrorBar(Or,cn),(Ne||Ce)&&this.renderDots(Or,da,cn),(!sr||zr)&&py.renderCallByParent(this.props,Be))}}],[{key:"getDerivedStateFromProps",value:function(L,re){return L.animationId!==re.prevAnimationId?{prevAnimationId:L.animationId,curPoints:L.points,prevPoints:re.curPoints}:L.points!==re.curPoints?{curPoints:L.points}:null}},{key:"repeat",value:function(L,re){for(var ve=L.length%2!==0?[].concat(tT(L),[0]):L,Ce=[],Be=0;Be<re;++Be)Ce=[].concat(tT(Ce),tT(ve));return Ce}},{key:"renderDotItem",value:function(L,re){var ve;if(la.isValidElement(L))ve=la.cloneElement(L,re);else if(qu(L))ve=L(re);else{var Ce=re.key,Be=IX(re,Dwe),Ge=kc("recharts-line-dot",typeof L!="boolean"?L.className:"");ve=la.createElement(hL,Q5({key:Ce},Be,{className:Ge}))}return ve}}])})(na.PureComponent);fg(yy,"displayName","Line");fg(yy,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!dx.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1});fg(yy,"getComposedData",function(e){var n=e.props,S=e.xAxis,L=e.yAxis,re=e.xAxisTicks,ve=e.yAxisTicks,Ce=e.dataKey,Be=e.bandSize,Ge=e.displayedData,Ke=e.offset,dt=n.layout,gt=Ge.map(function(Vt,Xt){var cr=zv(Vt,Ce);return dt==="horizontal"?{x:yT({axis:S,ticks:re,bandSize:Be,entry:Vt,index:Xt}),y:Ru(cr)?null:L.scale(cr),value:cr,payload:Vt}:{x:Ru(cr)?null:S.scale(cr),y:yT({axis:L,ticks:ve,bandSize:Be,entry:Vt,index:Xt}),value:cr,payload:Vt}});return $m({points:gt,layout:dt},Ke)});var Wwe=["layout","type","stroke","connectNulls","isRange","ref"],Ywe=["key"],H$;function CT(e){"@babel/helpers - typeof";return CT=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},CT(e)}function G$(e,n){if(e==null)return{};var S=Zwe(e,n),L,re;if(Object.getOwnPropertySymbols){var ve=Object.getOwnPropertySymbols(e);for(re=0;re<ve.length;re++)L=ve[re],!(n.indexOf(L)>=0)&&Object.prototype.propertyIsEnumerable.call(e,L)&&(S[L]=e[L])}return S}function Zwe(e,n){if(e==null)return{};var S={};for(var L in e)if(Object.prototype.hasOwnProperty.call(e,L)){if(n.indexOf(L)>=0)continue;S[L]=e[L]}return S}function lw(){return lw=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var S=arguments[n];for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(e[L]=S[L])}return e},lw.apply(this,arguments)}function zX(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function tx(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?zX(Object(S),!0).forEach(function(L){hy(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):zX(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function $we(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function NX(e,n){for(var S=0;S<n.length;S++){var L=n[S];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(e,W$(L.key),L)}}function Kwe(e,n,S){return n&&NX(e.prototype,n),S&&NX(e,S),Object.defineProperty(e,"prototype",{writable:!1}),e}function Jwe(e,n,S){return n=kP(n),Qwe(e,X$()?Reflect.construct(n,S||[],kP(e).constructor):n.apply(e,S))}function Qwe(e,n){if(n&&(CT(n)==="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return e2e(e)}function e2e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function X$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(X$=function(){return!!e})()}function kP(e){return kP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(S){return S.__proto__||Object.getPrototypeOf(S)},kP(e)}function t2e(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&p7(e,n)}function p7(e,n){return p7=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(L,re){return L.__proto__=re,L},p7(e,n)}function hy(e,n,S){return n=W$(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function W$(e){var n=r2e(e,"string");return CT(n)=="symbol"?n:n+""}function r2e(e,n){if(CT(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(CT(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var gx=(function(e){function n(){var S;$we(this,n);for(var L=arguments.length,re=new Array(L),ve=0;ve<L;ve++)re[ve]=arguments[ve];return S=Jwe(this,n,[].concat(re)),hy(S,"state",{isAnimationFinished:!0}),hy(S,"id",Tw("recharts-area-")),hy(S,"handleAnimationEnd",function(){var Ce=S.props.onAnimationEnd;S.setState({isAnimationFinished:!0}),qu(Ce)&&Ce()}),hy(S,"handleAnimationStart",function(){var Ce=S.props.onAnimationStart;S.setState({isAnimationFinished:!1}),qu(Ce)&&Ce()}),S}return t2e(n,e),Kwe(n,[{key:"renderDots",value:function(L,re,ve){var Ce=this.props.isAnimationActive,Be=this.state.isAnimationFinished;if(Ce&&!Be)return null;var Ge=this.props,Ke=Ge.dot,dt=Ge.points,gt=Ge.dataKey,Vt=Fu(this.props,!1),Xt=Fu(Ke,!0),cr=dt.map(function(nr,zr){var Ne=tx(tx(tx({key:"dot-".concat(zr),r:3},Vt),Xt),{},{index:zr,cx:nr.x,cy:nr.y,dataKey:gt,value:nr.value,payload:nr.payload,points:dt});return n.renderDotItem(Ke,Ne)}),sr={clipPath:L?"url(#clipPath-".concat(re?"":"dots-").concat(ve,")"):null};return la.createElement(Df,lw({className:"recharts-area-dots"},sr),cr)}},{key:"renderHorizontalRect",value:function(L){var re=this.props,ve=re.baseLine,Ce=re.points,Be=re.strokeWidth,Ge=Ce[0].x,Ke=Ce[Ce.length-1].x,dt=L*Math.abs(Ge-Ke),gt=ax(Ce.map(function(Vt){return Vt.y||0}));return ys(ve)&&typeof ve=="number"?gt=Math.max(ve,gt):ve&&Array.isArray(ve)&&ve.length&&(gt=Math.max(ax(ve.map(function(Vt){return Vt.y||0})),gt)),ys(gt)?la.createElement("rect",{x:Ge<Ke?Ge:Ge-dt,y:0,width:dt,height:Math.floor(gt+(Be?parseInt("".concat(Be),10):1))}):null}},{key:"renderVerticalRect",value:function(L){var re=this.props,ve=re.baseLine,Ce=re.points,Be=re.strokeWidth,Ge=Ce[0].y,Ke=Ce[Ce.length-1].y,dt=L*Math.abs(Ge-Ke),gt=ax(Ce.map(function(Vt){return Vt.x||0}));return ys(ve)&&typeof ve=="number"?gt=Math.max(ve,gt):ve&&Array.isArray(ve)&&ve.length&&(gt=Math.max(ax(ve.map(function(Vt){return Vt.x||0})),gt)),ys(gt)?la.createElement("rect",{x:0,y:Ge<Ke?Ge:Ge-dt,width:gt+(Be?parseInt("".concat(Be),10):1),height:Math.floor(dt)}):null}},{key:"renderClipRect",value:function(L){var re=this.props.layout;return re==="vertical"?this.renderVerticalRect(L):this.renderHorizontalRect(L)}},{key:"renderAreaStatically",value:function(L,re,ve,Ce){var Be=this.props,Ge=Be.layout,Ke=Be.type,dt=Be.stroke,gt=Be.connectNulls,Vt=Be.isRange;Be.ref;var Xt=G$(Be,Wwe);return la.createElement(Df,{clipPath:ve?"url(#clipPath-".concat(Ce,")"):null},la.createElement(hw,lw({},Fu(Xt,!0),{points:L,connectNulls:gt,type:Ke,baseLine:re,layout:Ge,stroke:"none",className:"recharts-area-area"})),dt!=="none"&&la.createElement(hw,lw({},Fu(this.props,!1),{className:"recharts-area-curve",layout:Ge,type:Ke,connectNulls:gt,fill:"none",points:L})),dt!=="none"&&Vt&&la.createElement(hw,lw({},Fu(this.props,!1),{className:"recharts-area-curve",layout:Ge,type:Ke,connectNulls:gt,fill:"none",points:re})))}},{key:"renderAreaWithAnimation",value:function(L,re){var ve=this,Ce=this.props,Be=Ce.points,Ge=Ce.baseLine,Ke=Ce.isAnimationActive,dt=Ce.animationBegin,gt=Ce.animationDuration,Vt=Ce.animationEasing,Xt=Ce.animationId,cr=this.state,sr=cr.prevPoints,nr=cr.prevBaseLine;return la.createElement(vg,{begin:dt,duration:gt,isActive:Ke,easing:Vt,from:{t:0},to:{t:1},key:"area-".concat(Xt),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(zr){var Ne=zr.t;if(sr){var Jr=sr.length/Be.length,pn=Be.map(function($n,xn){var Wa=Math.floor(xn*Jr);if(sr[Wa]){var On=sr[Wa],qn=av(On.x,$n.x),ca=av(On.y,$n.y);return tx(tx({},$n),{},{x:qn(Ne),y:ca(Ne)})}return $n}),Lr;if(ys(Ge)&&typeof Ge=="number"){var Or=av(nr,Ge);Lr=Or(Ne)}else if(Ru(Ge)||BT(Ge)){var cn=av(nr,0);Lr=cn(Ne)}else Lr=Ge.map(function($n,xn){var Wa=Math.floor(xn*Jr);if(nr[Wa]){var On=nr[Wa],qn=av(On.x,$n.x),ca=av(On.y,$n.y);return tx(tx({},$n),{},{x:qn(Ne),y:ca(Ne)})}return $n});return ve.renderAreaStatically(pn,Lr,L,re)}return la.createElement(Df,null,la.createElement("defs",null,la.createElement("clipPath",{id:"animationClipPath-".concat(re)},ve.renderClipRect(Ne))),la.createElement(Df,{clipPath:"url(#animationClipPath-".concat(re,")")},ve.renderAreaStatically(Be,Ge,L,re)))})}},{key:"renderArea",value:function(L,re){var ve=this.props,Ce=ve.points,Be=ve.baseLine,Ge=ve.isAnimationActive,Ke=this.state,dt=Ke.prevPoints,gt=Ke.prevBaseLine,Vt=Ke.totalLength;return Ge&&Ce&&Ce.length&&(!dt&&Vt>0||!yw(dt,Ce)||!yw(gt,Be))?this.renderAreaWithAnimation(L,re):this.renderAreaStatically(Ce,Be,L,re)}},{key:"render",value:function(){var L,re=this.props,ve=re.hide,Ce=re.dot,Be=re.points,Ge=re.className,Ke=re.top,dt=re.left,gt=re.xAxis,Vt=re.yAxis,Xt=re.width,cr=re.height,sr=re.isAnimationActive,nr=re.id;if(ve||!Be||!Be.length)return null;var zr=this.state.isAnimationFinished,Ne=Be.length===1,Jr=kc("recharts-area",Ge),pn=gt&&gt.allowDataOverflow,Lr=Vt&&Vt.allowDataOverflow,Or=pn||Lr,cn=Ru(nr)?this.id:nr,$n=(L=Fu(Ce,!1))!==null&&L!==void 0?L:{r:3,strokeWidth:2},xn=$n.r,Wa=xn===void 0?3:xn,On=$n.strokeWidth,qn=On===void 0?2:On,ca=rY(Ce)?Ce:{},Fn=ca.clipDot,da=Fn===void 0?!0:Fn,ea=Wa*2+qn;return la.createElement(Df,{className:Jr},pn||Lr?la.createElement("defs",null,la.createElement("clipPath",{id:"clipPath-".concat(cn)},la.createElement("rect",{x:pn?dt:dt-Xt/2,y:Lr?Ke:Ke-cr/2,width:pn?Xt:Xt*2,height:Lr?cr:cr*2})),!da&&la.createElement("clipPath",{id:"clipPath-dots-".concat(cn)},la.createElement("rect",{x:dt-ea/2,y:Ke-ea/2,width:Xt+ea,height:cr+ea}))):null,Ne?null:this.renderArea(Or,cn),(Ce||Ne)&&this.renderDots(Or,da,cn),(!sr||zr)&&py.renderCallByParent(this.props,Be))}}],[{key:"getDerivedStateFromProps",value:function(L,re){return L.animationId!==re.prevAnimationId?{prevAnimationId:L.animationId,curPoints:L.points,curBaseLine:L.baseLine,prevPoints:re.curPoints,prevBaseLine:re.curBaseLine}:L.points!==re.curPoints||L.baseLine!==re.curBaseLine?{curPoints:L.points,curBaseLine:L.baseLine}:null}}])})(na.PureComponent);H$=gx;hy(gx,"displayName","Area");hy(gx,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!dx.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});hy(gx,"getBaseValue",function(e,n,S,L){var re=e.layout,ve=e.baseValue,Ce=n.props.baseValue,Be=Ce??ve;if(ys(Be)&&typeof Be=="number")return Be;var Ge=re==="horizontal"?L:S,Ke=Ge.scale.domain();if(Ge.type==="number"){var dt=Math.max(Ke[0],Ke[1]),gt=Math.min(Ke[0],Ke[1]);return Be==="dataMin"?gt:Be==="dataMax"||dt<0?dt:Math.max(Math.min(Ke[0],Ke[1]),0)}return Be==="dataMin"?Ke[0]:Be==="dataMax"?Ke[1]:Ke[0]});hy(gx,"getComposedData",function(e){var n=e.props,S=e.item,L=e.xAxis,re=e.yAxis,ve=e.xAxisTicks,Ce=e.yAxisTicks,Be=e.bandSize,Ge=e.dataKey,Ke=e.stackedData,dt=e.dataStartIndex,gt=e.displayedData,Vt=e.offset,Xt=n.layout,cr=Ke&&Ke.length,sr=H$.getBaseValue(n,S,L,re),nr=Xt==="horizontal",zr=!1,Ne=gt.map(function(pn,Lr){var Or;cr?Or=Ke[dt+Lr]:(Or=zv(pn,Ge),Array.isArray(Or)?zr=!0:Or=[sr,Or]);var cn=Or[1]==null||cr&&zv(pn,Ge)==null;return nr?{x:yT({axis:L,ticks:ve,bandSize:Be,entry:pn,index:Lr}),y:cn?null:re.scale(Or[1]),value:Or,payload:pn}:{x:cn?null:L.scale(Or[1]),y:yT({axis:re,ticks:Ce,bandSize:Be,entry:pn,index:Lr}),value:Or,payload:pn}}),Jr;return cr||zr?Jr=Ne.map(function(pn){var Lr=Array.isArray(pn.value)?pn.value[0]:null;return nr?{x:pn.x,y:Lr!=null&&pn.y!=null?re.scale(Lr):null}:{x:Lr!=null?L.scale(Lr):null,y:pn.y}}):Jr=nr?re.scale(sr):L.scale(sr),tx({points:Ne,baseLine:Jr,layout:Xt,isRange:zr},Vt)});hy(gx,"renderDotItem",function(e,n){var S;if(la.isValidElement(e))S=la.cloneElement(e,n);else if(qu(e))S=e(n);else{var L=kc("recharts-area-dot",typeof e!="boolean"?e.className:""),re=n.key,ve=G$(n,Ywe);S=la.createElement(hL,lw({},ve,{key:re,className:L}))}return S});function kT(e){"@babel/helpers - typeof";return kT=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},kT(e)}function n2e(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function a2e(e,n){for(var S=0;S<n.length;S++){var L=n[S];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(e,$$(L.key),L)}}function i2e(e,n,S){return n&&a2e(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function o2e(e,n,S){return n=PP(n),s2e(e,Y$()?Reflect.construct(n,S||[],PP(e).constructor):n.apply(e,S))}function s2e(e,n){if(n&&(kT(n)==="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return l2e(e)}function l2e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Y$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Y$=function(){return!!e})()}function PP(e){return PP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(S){return S.__proto__||Object.getPrototypeOf(S)},PP(e)}function u2e(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&m7(e,n)}function m7(e,n){return m7=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(L,re){return L.__proto__=re,L},m7(e,n)}function Z$(e,n,S){return n=$$(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function $$(e){var n=c2e(e,"string");return kT(n)=="symbol"?n:n+""}function c2e(e,n){if(kT(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(kT(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var xL=(function(e){function n(){return n2e(this,n),o2e(this,n,arguments)}return u2e(n,e),i2e(n,[{key:"render",value:function(){return null}}])})(na.Component);Z$(xL,"displayName","ZAxis");Z$(xL,"defaultProps",{zAxisId:0,range:[64,64],scale:"auto",type:"number"});var f2e=["option","isActive"];function eE(){return eE=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var S=arguments[n];for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(e[L]=S[L])}return e},eE.apply(this,arguments)}function h2e(e,n){if(e==null)return{};var S=d2e(e,n),L,re;if(Object.getOwnPropertySymbols){var ve=Object.getOwnPropertySymbols(e);for(re=0;re<ve.length;re++)L=ve[re],!(n.indexOf(L)>=0)&&Object.prototype.propertyIsEnumerable.call(e,L)&&(S[L]=e[L])}return S}function d2e(e,n){if(e==null)return{};var S={};for(var L in e)if(Object.prototype.hasOwnProperty.call(e,L)){if(n.indexOf(L)>=0)continue;S[L]=e[L]}return S}function v2e(e){var n=e.option,S=e.isActive,L=h2e(e,f2e);return typeof n=="string"?na.createElement(r7,eE({option:na.createElement(JP,eE({type:n},L)),isActive:S,shapeType:"symbols"},L)):na.createElement(r7,eE({option:n,isActive:S,shapeType:"symbols"},L))}function PT(e){"@babel/helpers - typeof";return PT=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},PT(e)}function tE(){return tE=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var S=arguments[n];for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(e[L]=S[L])}return e},tE.apply(this,arguments)}function FX(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function M0(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?FX(Object(S),!0).forEach(function(L){ox(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):FX(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function p2e(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function BX(e,n){for(var S=0;S<n.length;S++){var L=n[S];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(e,J$(L.key),L)}}function m2e(e,n,S){return n&&BX(e.prototype,n),S&&BX(e,S),Object.defineProperty(e,"prototype",{writable:!1}),e}function g2e(e,n,S){return n=LP(n),y2e(e,K$()?Reflect.construct(n,S||[],LP(e).constructor):n.apply(e,S))}function y2e(e,n){if(n&&(PT(n)==="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _2e(e)}function _2e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function K$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(K$=function(){return!!e})()}function LP(e){return LP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(S){return S.__proto__||Object.getPrototypeOf(S)},LP(e)}function x2e(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&g7(e,n)}function g7(e,n){return g7=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(L,re){return L.__proto__=re,L},g7(e,n)}function ox(e,n,S){return n=J$(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function J$(e){var n=b2e(e,"string");return PT(n)=="symbol"?n:n+""}function b2e(e,n){if(PT(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(PT(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var XT=(function(e){function n(){var S;p2e(this,n);for(var L=arguments.length,re=new Array(L),ve=0;ve<L;ve++)re[ve]=arguments[ve];return S=g2e(this,n,[].concat(re)),ox(S,"state",{isAnimationFinished:!1}),ox(S,"handleAnimationEnd",function(){S.setState({isAnimationFinished:!0})}),ox(S,"handleAnimationStart",function(){S.setState({isAnimationFinished:!1})}),ox(S,"id",Tw("recharts-scatter-")),S}return x2e(n,e),m2e(n,[{key:"renderSymbolsStatically",value:function(L){var re=this,ve=this.props,Ce=ve.shape,Be=ve.activeShape,Ge=ve.activeIndex,Ke=Fu(this.props,!1);return L.map(function(dt,gt){var Vt=Ge===gt,Xt=Vt?Be:Ce,cr=M0(M0({},Ke),dt);return la.createElement(Df,tE({className:"recharts-scatter-symbol",key:"symbol-".concat(dt?.cx,"-").concat(dt?.cy,"-").concat(dt?.size,"-").concat(gt)},nE(re.props,dt,gt),{role:"img"}),la.createElement(v2e,tE({option:Xt,isActive:Vt,key:"symbol-".concat(gt)},cr)))})}},{key:"renderSymbolsWithAnimation",value:function(){var L=this,re=this.props,ve=re.points,Ce=re.isAnimationActive,Be=re.animationBegin,Ge=re.animationDuration,Ke=re.animationEasing,dt=re.animationId,gt=this.state.prevPoints;return la.createElement(vg,{begin:Be,duration:Ge,isActive:Ce,easing:Ke,from:{t:0},to:{t:1},key:"pie-".concat(dt),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(Vt){var Xt=Vt.t,cr=ve.map(function(sr,nr){var zr=gt&&gt[nr];if(zr){var Ne=av(zr.cx,sr.cx),Jr=av(zr.cy,sr.cy),pn=av(zr.size,sr.size);return M0(M0({},sr),{},{cx:Ne(Xt),cy:Jr(Xt),size:pn(Xt)})}var Lr=av(0,sr.size);return M0(M0({},sr),{},{size:Lr(Xt)})});return la.createElement(Df,null,L.renderSymbolsStatically(cr))})}},{key:"renderSymbols",value:function(){var L=this.props,re=L.points,ve=L.isAnimationActive,Ce=this.state.prevPoints;return ve&&re&&re.length&&(!Ce||!yw(Ce,re))?this.renderSymbolsWithAnimation():this.renderSymbolsStatically(re)}},{key:"renderErrorBar",value:function(){var L=this.props.isAnimationActive;if(L&&!this.state.isAnimationFinished)return null;var re=this.props,ve=re.points,Ce=re.xAxis,Be=re.yAxis,Ge=re.children,Ke=wm(Ge,cx);return Ke?Ke.map(function(dt,gt){var Vt=dt.props,Xt=Vt.direction,cr=Vt.dataKey;return la.cloneElement(dt,{key:"".concat(Xt,"-").concat(cr,"-").concat(ve[gt]),data:ve,xAxis:Ce,yAxis:Be,layout:Xt==="x"?"vertical":"horizontal",dataPointFormatter:function(nr,zr){return{x:nr.cx,y:nr.cy,value:Xt==="x"?+nr.node.x:+nr.node.y,errorVal:zv(nr,zr)}}})}):null}},{key:"renderLine",value:function(){var L=this.props,re=L.points,ve=L.line,Ce=L.lineType,Be=L.lineJointType,Ge=Fu(this.props,!1),Ke=Fu(ve,!1),dt,gt;if(Ce==="joint")dt=re.map(function(Jr){return{x:Jr.cx,y:Jr.cy}});else if(Ce==="fitting"){var Vt=nce(re),Xt=Vt.xmin,cr=Vt.xmax,sr=Vt.a,nr=Vt.b,zr=function(pn){return sr*pn+nr};dt=[{x:Xt,y:zr(Xt)},{x:cr,y:zr(cr)}]}var Ne=M0(M0(M0({},Ge),{},{fill:"none",stroke:Ge&&Ge.fill},Ke),{},{points:dt});return la.isValidElement(ve)?gt=la.cloneElement(ve,Ne):qu(ve)?gt=ve(Ne):gt=la.createElement(hw,tE({},Ne,{type:Be})),la.createElement(Df,{className:"recharts-scatter-line",key:"recharts-scatter-line"},gt)}},{key:"render",value:function(){var L=this.props,re=L.hide,ve=L.points,Ce=L.line,Be=L.className,Ge=L.xAxis,Ke=L.yAxis,dt=L.left,gt=L.top,Vt=L.width,Xt=L.height,cr=L.id,sr=L.isAnimationActive;if(re||!ve||!ve.length)return null;var nr=this.state.isAnimationFinished,zr=kc("recharts-scatter",Be),Ne=Ge&&Ge.allowDataOverflow,Jr=Ke&&Ke.allowDataOverflow,pn=Ne||Jr,Lr=Ru(cr)?this.id:cr;return la.createElement(Df,{className:zr,clipPath:pn?"url(#clipPath-".concat(Lr,")"):null},Ne||Jr?la.createElement("defs",null,la.createElement("clipPath",{id:"clipPath-".concat(Lr)},la.createElement("rect",{x:Ne?dt:dt-Vt/2,y:Jr?gt:gt-Xt/2,width:Ne?Vt:Vt*2,height:Jr?Xt:Xt*2}))):null,Ce&&this.renderLine(),this.renderErrorBar(),la.createElement(Df,{key:"recharts-scatter-symbols"},this.renderSymbols()),(!sr||nr)&&py.renderCallByParent(this.props,ve))}}],[{key:"getDerivedStateFromProps",value:function(L,re){return L.animationId!==re.prevAnimationId?{prevAnimationId:L.animationId,curPoints:L.points,prevPoints:re.curPoints}:L.points!==re.curPoints?{curPoints:L.points}:null}}])})(na.PureComponent);ox(XT,"displayName","Scatter");ox(XT,"defaultProps",{xAxisId:0,yAxisId:0,zAxisId:0,legendType:"circle",lineType:"joint",lineJointType:"linear",data:[],shape:"circle",hide:!1,isAnimationActive:!dx.isSsr,animationBegin:0,animationDuration:400,animationEasing:"linear"});ox(XT,"getComposedData",function(e){var n=e.xAxis,S=e.yAxis,L=e.zAxis,re=e.item,ve=e.displayedData,Ce=e.xAxisTicks,Be=e.yAxisTicks,Ge=e.offset,Ke=re.props.tooltipType,dt=wm(re.props.children,i9),gt=Ru(n.dataKey)?re.props.dataKey:n.dataKey,Vt=Ru(S.dataKey)?re.props.dataKey:S.dataKey,Xt=L&&L.dataKey,cr=L?L.range:xL.defaultProps.range,sr=cr&&cr[0],nr=n.scale.bandwidth?n.scale.bandwidth():0,zr=S.scale.bandwidth?S.scale.bandwidth():0,Ne=ve.map(function(Jr,pn){var Lr=zv(Jr,gt),Or=zv(Jr,Vt),cn=!Ru(Xt)&&zv(Jr,Xt)||"-",$n=[{name:Ru(n.dataKey)?re.props.name:n.name||n.dataKey,unit:n.unit||"",value:Lr,payload:Jr,dataKey:gt,type:Ke},{name:Ru(S.dataKey)?re.props.name:S.name||S.dataKey,unit:S.unit||"",value:Or,payload:Jr,dataKey:Vt,type:Ke}];cn!=="-"&&$n.push({name:L.name||L.dataKey,unit:L.unit||"",value:cn,payload:Jr,dataKey:Xt,type:Ke});var xn=yT({axis:n,ticks:Ce,bandSize:nr,entry:Jr,index:pn,dataKey:gt}),Wa=yT({axis:S,ticks:Be,bandSize:zr,entry:Jr,index:pn,dataKey:Vt}),On=cn!=="-"?L.scale(cn):sr,qn=Math.sqrt(Math.max(On,0)/Math.PI);return M0(M0({},Jr),{},{cx:xn,cy:Wa,x:xn-qn,y:Wa-qn,xAxis:n,yAxis:S,zAxis:L,width:2*qn,height:2*qn,size:On,node:{x:Lr,y:Or,z:cn},tooltipPayload:$n,tooltipPosition:{x:xn,y:Wa},payload:Jr},dt&&dt[pn]&&dt[pn].props)});return M0({points:Ne},Ge)});function LT(e){"@babel/helpers - typeof";return LT=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},LT(e)}function w2e(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function T2e(e,n){for(var S=0;S<n.length;S++){var L=n[S];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(e,tK(L.key),L)}}function A2e(e,n,S){return n&&T2e(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function S2e(e,n,S){return n=RP(n),E2e(e,Q$()?Reflect.construct(n,S||[],RP(e).constructor):n.apply(e,S))}function E2e(e,n){if(n&&(LT(n)==="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return M2e(e)}function M2e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Q$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Q$=function(){return!!e})()}function RP(e){return RP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(S){return S.__proto__||Object.getPrototypeOf(S)},RP(e)}function C2e(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&y7(e,n)}function y7(e,n){return y7=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(L,re){return L.__proto__=re,L},y7(e,n)}function eK(e,n,S){return n=tK(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function tK(e){var n=k2e(e,"string");return LT(n)=="symbol"?n:n+""}function k2e(e,n){if(LT(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(LT(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function _7(){return _7=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var S=arguments[n];for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(e[L]=S[L])}return e},_7.apply(this,arguments)}function P2e(e){var n=e.xAxisId,S=O9(),L=z9(),re=P$(n);return re==null?null:na.createElement(GT,_7({},re,{className:kc("recharts-".concat(re.axisType," ").concat(re.axisType),re.className),viewBox:{x:0,y:0,width:S,height:L},ticksGenerator:function(Ce){return x1(Ce,!0)}}))}var yx=(function(e){function n(){return w2e(this,n),S2e(this,n,arguments)}return C2e(n,e),A2e(n,[{key:"render",value:function(){return na.createElement(P2e,this.props)}}])})(na.Component);eK(yx,"displayName","XAxis");eK(yx,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});function RT(e){"@babel/helpers - typeof";return RT=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},RT(e)}function L2e(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function R2e(e,n){for(var S=0;S<n.length;S++){var L=n[S];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(e,aK(L.key),L)}}function I2e(e,n,S){return n&&R2e(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function D2e(e,n,S){return n=IP(n),O2e(e,rK()?Reflect.construct(n,S||[],IP(e).constructor):n.apply(e,S))}function O2e(e,n){if(n&&(RT(n)==="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return z2e(e)}function z2e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rK(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(rK=function(){return!!e})()}function IP(e){return IP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(S){return S.__proto__||Object.getPrototypeOf(S)},IP(e)}function N2e(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&x7(e,n)}function x7(e,n){return x7=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(L,re){return L.__proto__=re,L},x7(e,n)}function nK(e,n,S){return n=aK(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function aK(e){var n=F2e(e,"string");return RT(n)=="symbol"?n:n+""}function F2e(e,n){if(RT(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(RT(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function b7(){return b7=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var S=arguments[n];for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(e[L]=S[L])}return e},b7.apply(this,arguments)}var B2e=function(n){var S=n.yAxisId,L=O9(),re=z9(),ve=L$(S);return ve==null?null:na.createElement(GT,b7({},ve,{className:kc("recharts-".concat(ve.axisType," ").concat(ve.axisType),ve.className),viewBox:{x:0,y:0,width:L,height:re},ticksGenerator:function(Be){return x1(Be,!0)}}))},_x=(function(e){function n(){return L2e(this,n),D2e(this,n,arguments)}return N2e(n,e),I2e(n,[{key:"render",value:function(){return na.createElement(B2e,this.props)}}])})(na.Component);nK(_x,"displayName","YAxis");nK(_x,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});function jX(e){return V2e(e)||q2e(e)||U2e(e)||j2e()}function j2e(){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 U2e(e,n){if(e){if(typeof e=="string")return w7(e,n);var S=Object.prototype.toString.call(e).slice(8,-1);if(S==="Object"&&e.constructor&&(S=e.constructor.name),S==="Map"||S==="Set")return Array.from(e);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return w7(e,n)}}function q2e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function V2e(e){if(Array.isArray(e))return w7(e)}function w7(e,n){(n==null||n>e.length)&&(n=e.length);for(var S=0,L=new Array(n);S<n;S++)L[S]=e[S];return L}var T7=function(n,S,L,re,ve){var Ce=wm(n,F9),Be=wm(n,gL),Ge=[].concat(jX(Ce),jX(Be)),Ke=wm(n,_L),dt="".concat(re,"Id"),gt=re[0],Vt=S;if(Ge.length&&(Vt=Ge.reduce(function(sr,nr){if(nr.props[dt]===L&&my(nr.props,"extendDomain")&&ys(nr.props[gt])){var zr=nr.props[gt];return[Math.min(sr[0],zr),Math.max(sr[1],zr)]}return sr},Vt)),Ke.length){var Xt="".concat(gt,"1"),cr="".concat(gt,"2");Vt=Ke.reduce(function(sr,nr){if(nr.props[dt]===L&&my(nr.props,"extendDomain")&&ys(nr.props[Xt])&&ys(nr.props[cr])){var zr=nr.props[Xt],Ne=nr.props[cr];return[Math.min(sr[0],zr,Ne),Math.max(sr[1],zr,Ne)]}return sr},Vt)}return ve&&ve.length&&(Vt=ve.reduce(function(sr,nr){return ys(nr)?[Math.min(sr[0],nr),Math.max(sr[1],nr)]:sr},Vt)),Vt},VO={exports:{}},UX;function H2e(){return UX||(UX=1,(function(e){var n=Object.prototype.hasOwnProperty,S="~";function L(){}Object.create&&(L.prototype=Object.create(null),new L().__proto__||(S=!1));function re(Ge,Ke,dt){this.fn=Ge,this.context=Ke,this.once=dt||!1}function ve(Ge,Ke,dt,gt,Vt){if(typeof dt!="function")throw new TypeError("The listener must be a function");var Xt=new re(dt,gt||Ge,Vt),cr=S?S+Ke:Ke;return Ge._events[cr]?Ge._events[cr].fn?Ge._events[cr]=[Ge._events[cr],Xt]:Ge._events[cr].push(Xt):(Ge._events[cr]=Xt,Ge._eventsCount++),Ge}function Ce(Ge,Ke){--Ge._eventsCount===0?Ge._events=new L:delete Ge._events[Ke]}function Be(){this._events=new L,this._eventsCount=0}Be.prototype.eventNames=function(){var Ke=[],dt,gt;if(this._eventsCount===0)return Ke;for(gt in dt=this._events)n.call(dt,gt)&&Ke.push(S?gt.slice(1):gt);return Object.getOwnPropertySymbols?Ke.concat(Object.getOwnPropertySymbols(dt)):Ke},Be.prototype.listeners=function(Ke){var dt=S?S+Ke:Ke,gt=this._events[dt];if(!gt)return[];if(gt.fn)return[gt.fn];for(var Vt=0,Xt=gt.length,cr=new Array(Xt);Vt<Xt;Vt++)cr[Vt]=gt[Vt].fn;return cr},Be.prototype.listenerCount=function(Ke){var dt=S?S+Ke:Ke,gt=this._events[dt];return gt?gt.fn?1:gt.length:0},Be.prototype.emit=function(Ke,dt,gt,Vt,Xt,cr){var sr=S?S+Ke:Ke;if(!this._events[sr])return!1;var nr=this._events[sr],zr=arguments.length,Ne,Jr;if(nr.fn){switch(nr.once&&this.removeListener(Ke,nr.fn,void 0,!0),zr){case 1:return nr.fn.call(nr.context),!0;case 2:return nr.fn.call(nr.context,dt),!0;case 3:return nr.fn.call(nr.context,dt,gt),!0;case 4:return nr.fn.call(nr.context,dt,gt,Vt),!0;case 5:return nr.fn.call(nr.context,dt,gt,Vt,Xt),!0;case 6:return nr.fn.call(nr.context,dt,gt,Vt,Xt,cr),!0}for(Jr=1,Ne=new Array(zr-1);Jr<zr;Jr++)Ne[Jr-1]=arguments[Jr];nr.fn.apply(nr.context,Ne)}else{var pn=nr.length,Lr;for(Jr=0;Jr<pn;Jr++)switch(nr[Jr].once&&this.removeListener(Ke,nr[Jr].fn,void 0,!0),zr){case 1:nr[Jr].fn.call(nr[Jr].context);break;case 2:nr[Jr].fn.call(nr[Jr].context,dt);break;case 3:nr[Jr].fn.call(nr[Jr].context,dt,gt);break;case 4:nr[Jr].fn.call(nr[Jr].context,dt,gt,Vt);break;default:if(!Ne)for(Lr=1,Ne=new Array(zr-1);Lr<zr;Lr++)Ne[Lr-1]=arguments[Lr];nr[Jr].fn.apply(nr[Jr].context,Ne)}}return!0},Be.prototype.on=function(Ke,dt,gt){return ve(this,Ke,dt,gt,!1)},Be.prototype.once=function(Ke,dt,gt){return ve(this,Ke,dt,gt,!0)},Be.prototype.removeListener=function(Ke,dt,gt,Vt){var Xt=S?S+Ke:Ke;if(!this._events[Xt])return this;if(!dt)return Ce(this,Xt),this;var cr=this._events[Xt];if(cr.fn)cr.fn===dt&&(!Vt||cr.once)&&(!gt||cr.context===gt)&&Ce(this,Xt);else{for(var sr=0,nr=[],zr=cr.length;sr<zr;sr++)(cr[sr].fn!==dt||Vt&&!cr[sr].once||gt&&cr[sr].context!==gt)&&nr.push(cr[sr]);nr.length?this._events[Xt]=nr.length===1?nr[0]:nr:Ce(this,Xt)}return this},Be.prototype.removeAllListeners=function(Ke){var dt;return Ke?(dt=S?S+Ke:Ke,this._events[dt]&&Ce(this,dt)):(this._events=new L,this._eventsCount=0),this},Be.prototype.off=Be.prototype.removeListener,Be.prototype.addListener=Be.prototype.on,Be.prefixed=S,Be.EventEmitter=Be,e.exports=Be})(VO)),VO.exports}var G2e=H2e();const X2e=ih(G2e);var HO=new X2e,GO="recharts.syncMouseEvents";function NE(e){"@babel/helpers - typeof";return NE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},NE(e)}function W2e(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Y2e(e,n){for(var S=0;S<n.length;S++){var L=n[S];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(e,iK(L.key),L)}}function Z2e(e,n,S){return n&&Y2e(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function XO(e,n,S){return n=iK(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function iK(e){var n=$2e(e,"string");return NE(n)=="symbol"?n:n+""}function $2e(e,n){if(NE(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(NE(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var K2e=(function(){function e(){W2e(this,e),XO(this,"activeIndex",0),XO(this,"coordinateList",[]),XO(this,"layout","horizontal")}return Z2e(e,[{key:"setDetails",value:function(S){var L,re=S.coordinateList,ve=re===void 0?null:re,Ce=S.container,Be=Ce===void 0?null:Ce,Ge=S.layout,Ke=Ge===void 0?null:Ge,dt=S.offset,gt=dt===void 0?null:dt,Vt=S.mouseHandlerCallback,Xt=Vt===void 0?null:Vt;this.coordinateList=(L=ve??this.coordinateList)!==null&&L!==void 0?L:[],this.container=Be??this.container,this.layout=Ke??this.layout,this.offset=gt??this.offset,this.mouseHandlerCallback=Xt??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(S){if(this.coordinateList.length!==0)switch(S.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(S){this.activeIndex=S}},{key:"spoofMouse",value:function(){var S,L;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var re=this.container.getBoundingClientRect(),ve=re.x,Ce=re.y,Be=re.height,Ge=this.coordinateList[this.activeIndex].coordinate,Ke=((S=window)===null||S===void 0?void 0:S.scrollX)||0,dt=((L=window)===null||L===void 0?void 0:L.scrollY)||0,gt=ve+Ge+Ke,Vt=Ce+this.offset.top+Be/2+dt;this.mouseHandlerCallback({pageX:gt,pageY:Vt})}}}])})();function J2e(e,n,S){if(S==="number"&&n===!0&&Array.isArray(e)){var L=e?.[0],re=e?.[1];if(L&&re&&ys(L)&&ys(re))return!0}return!1}function Q2e(e,n,S,L){var re=L/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?n.x-re:S.left+.5,y:e==="horizontal"?S.top+.5:n.y-re,width:e==="horizontal"?L:S.width-1,height:e==="horizontal"?S.height-1:L}}function oK(e){var n=e.cx,S=e.cy,L=e.radius,re=e.startAngle,ve=e.endAngle,Ce=cp(n,S,L,re),Be=cp(n,S,L,ve);return{points:[Ce,Be],cx:n,cy:S,radius:L,startAngle:re,endAngle:ve}}function e3e(e,n,S){var L,re,ve,Ce;if(e==="horizontal")L=n.x,ve=L,re=S.top,Ce=S.top+S.height;else if(e==="vertical")re=n.y,Ce=re,L=S.left,ve=S.left+S.width;else if(n.cx!=null&&n.cy!=null)if(e==="centric"){var Be=n.cx,Ge=n.cy,Ke=n.innerRadius,dt=n.outerRadius,gt=n.angle,Vt=cp(Be,Ge,Ke,gt),Xt=cp(Be,Ge,dt,gt);L=Vt.x,re=Vt.y,ve=Xt.x,Ce=Xt.y}else return oK(n);return[{x:L,y:re},{x:ve,y:Ce}]}function FE(e){"@babel/helpers - typeof";return FE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},FE(e)}function qX(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function C6(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?qX(Object(S),!0).forEach(function(L){t3e(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):qX(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function t3e(e,n,S){return n=r3e(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function r3e(e){var n=n3e(e,"string");return FE(n)=="symbol"?n:n+""}function n3e(e,n){if(FE(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(FE(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function a3e(e){var n,S,L=e.element,re=e.tooltipEventType,ve=e.isActive,Ce=e.activeCoordinate,Be=e.activePayload,Ge=e.offset,Ke=e.activeTooltipIndex,dt=e.tooltipAxisBandSize,gt=e.layout,Vt=e.chartName,Xt=(n=L.props.cursor)!==null&&n!==void 0?n:(S=L.type.defaultProps)===null||S===void 0?void 0:S.cursor;if(!L||!Xt||!ve||!Ce||Vt!=="ScatterChart"&&re!=="axis")return null;var cr,sr=hw;if(Vt==="ScatterChart")cr=Ce,sr=C_e;else if(Vt==="BarChart")cr=Q2e(gt,Ce,Ge,dt),sr=L9;else if(gt==="radial"){var nr=oK(Ce),zr=nr.cx,Ne=nr.cy,Jr=nr.radius,pn=nr.startAngle,Lr=nr.endAngle;cr={cx:zr,cy:Ne,startAngle:pn,endAngle:Lr,innerRadius:Jr,outerRadius:Jr},sr=a$}else cr={points:e3e(gt,Ce,Ge)},sr=hw;var Or=C6(C6(C6(C6({stroke:"#ccc",pointerEvents:"none"},Ge),cr),Fu(Xt,!1)),{},{payload:Be,payloadIndex:Ke,className:kc("recharts-tooltip-cursor",Xt.className)});return na.isValidElement(Xt)?na.cloneElement(Xt,Or):na.createElement(sr,Or)}var i3e=["item"],o3e=["children","className","width","height","style","compact","title","desc"];function IT(e){"@babel/helpers - typeof";return IT=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},IT(e)}function aT(){return aT=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var S=arguments[n];for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(e[L]=S[L])}return e},aT.apply(this,arguments)}function VX(e,n){return u3e(e)||l3e(e,n)||lK(e,n)||s3e()}function s3e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function l3e(e,n){var S=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(S!=null){var L,re,ve,Ce,Be=[],Ge=!0,Ke=!1;try{if(ve=(S=S.call(e)).next,n!==0)for(;!(Ge=(L=ve.call(S)).done)&&(Be.push(L.value),Be.length!==n);Ge=!0);}catch(dt){Ke=!0,re=dt}finally{try{if(!Ge&&S.return!=null&&(Ce=S.return(),Object(Ce)!==Ce))return}finally{if(Ke)throw re}}return Be}}function u3e(e){if(Array.isArray(e))return e}function HX(e,n){if(e==null)return{};var S=c3e(e,n),L,re;if(Object.getOwnPropertySymbols){var ve=Object.getOwnPropertySymbols(e);for(re=0;re<ve.length;re++)L=ve[re],!(n.indexOf(L)>=0)&&Object.prototype.propertyIsEnumerable.call(e,L)&&(S[L]=e[L])}return S}function c3e(e,n){if(e==null)return{};var S={};for(var L in e)if(Object.prototype.hasOwnProperty.call(e,L)){if(n.indexOf(L)>=0)continue;S[L]=e[L]}return S}function f3e(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function h3e(e,n){for(var S=0;S<n.length;S++){var L=n[S];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(e,uK(L.key),L)}}function d3e(e,n,S){return n&&h3e(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function v3e(e,n,S){return n=DP(n),p3e(e,sK()?Reflect.construct(n,S||[],DP(e).constructor):n.apply(e,S))}function p3e(e,n){if(n&&(IT(n)==="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return m3e(e)}function m3e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function sK(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(sK=function(){return!!e})()}function DP(e){return DP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(S){return S.__proto__||Object.getPrototypeOf(S)},DP(e)}function g3e(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&A7(e,n)}function A7(e,n){return A7=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(L,re){return L.__proto__=re,L},A7(e,n)}function DT(e){return x3e(e)||_3e(e)||lK(e)||y3e()}function y3e(){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 lK(e,n){if(e){if(typeof e=="string")return S7(e,n);var S=Object.prototype.toString.call(e).slice(8,-1);if(S==="Object"&&e.constructor&&(S=e.constructor.name),S==="Map"||S==="Set")return Array.from(e);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return S7(e,n)}}function _3e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function x3e(e){if(Array.isArray(e))return S7(e)}function S7(e,n){(n==null||n>e.length)&&(n=e.length);for(var S=0,L=new Array(n);S<n;S++)L[S]=e[S];return L}function GX(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function Eo(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?GX(Object(S),!0).forEach(function(L){pu(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):GX(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function pu(e,n,S){return n=uK(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function uK(e){var n=b3e(e,"string");return IT(n)=="symbol"?n:n+""}function b3e(e,n){if(IT(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(IT(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var w3e={xAxis:["bottom","top"],yAxis:["left","right"]},T3e={width:"100%",height:"100%"},cK={x:0,y:0};function k6(e){return e}var A3e=function(n,S){return S==="horizontal"?n.x:S==="vertical"?n.y:S==="centric"?n.angle:n.radius},S3e=function(n,S,L,re){var ve=S.find(function(dt){return dt&&dt.index===L});if(ve){if(n==="horizontal")return{x:ve.coordinate,y:re.y};if(n==="vertical")return{x:re.x,y:ve.coordinate};if(n==="centric"){var Ce=ve.coordinate,Be=re.radius;return Eo(Eo(Eo({},re),cp(re.cx,re.cy,Be,Ce)),{},{angle:Ce,radius:Be})}var Ge=ve.coordinate,Ke=re.angle;return Eo(Eo(Eo({},re),cp(re.cx,re.cy,Ge,Ke)),{},{angle:Ke,radius:Ge})}return cK},bL=function(n,S){var L=S.graphicalItems,re=S.dataStartIndex,ve=S.dataEndIndex,Ce=(L??[]).reduce(function(Be,Ge){var Ke=Ge.props.data;return Ke&&Ke.length?[].concat(DT(Be),DT(Ke)):Be},[]);return Ce.length>0?Ce:n&&n.length&&ys(re)&&ys(ve)?n.slice(re,ve+1):[]};function fK(e){return e==="number"?[0,"auto"]:void 0}var E7=function(n,S,L,re){var ve=n.graphicalItems,Ce=n.tooltipAxis,Be=bL(S,n);return L<0||!ve||!ve.length||L>=Be.length?null:ve.reduce(function(Ge,Ke){var dt,gt=(dt=Ke.props.data)!==null&&dt!==void 0?dt:S;gt&&n.dataStartIndex+n.dataEndIndex!==0&&n.dataEndIndex-n.dataStartIndex>=L&&(gt=gt.slice(n.dataStartIndex,n.dataEndIndex+1));var Vt;if(Ce.dataKey&&!Ce.allowDuplicatedCategory){var Xt=gt===void 0?Be:gt;Vt=N6(Xt,Ce.dataKey,re)}else Vt=gt&&gt[L]||Be[L];return Vt?[].concat(DT(Ge),[t$(Ke,Vt)]):Ge},[])},XX=function(n,S,L,re){var ve=re||{x:n.chartX,y:n.chartY},Ce=A3e(ve,L),Be=n.orderedTooltipTicks,Ge=n.tooltipAxis,Ke=n.tooltipTicks,dt=fge(Ce,Be,Ke,Ge);if(dt>=0&&Ke){var gt=Ke[dt]&&Ke[dt].value,Vt=E7(n,S,dt,gt),Xt=S3e(L,Be,dt,ve);return{activeTooltipIndex:dt,activeLabel:gt,activePayload:Vt,activeCoordinate:Xt}}return null},E3e=function(n,S){var L=S.axes,re=S.graphicalItems,ve=S.axisType,Ce=S.axisIdKey,Be=S.stackGroups,Ge=S.dataStartIndex,Ke=S.dataEndIndex,dt=n.layout,gt=n.children,Vt=n.stackOffset,Xt=JZ(dt,ve);return L.reduce(function(cr,sr){var nr,zr=sr.type.defaultProps!==void 0?Eo(Eo({},sr.type.defaultProps),sr.props):sr.props,Ne=zr.type,Jr=zr.dataKey,pn=zr.allowDataOverflow,Lr=zr.allowDuplicatedCategory,Or=zr.scale,cn=zr.ticks,$n=zr.includeHidden,xn=zr[Ce];if(cr[xn])return cr;var Wa=bL(n.data,{graphicalItems:re.filter(function(Wn){var Ei,$i=Ce in Wn.props?Wn.props[Ce]:(Ei=Wn.type.defaultProps)===null||Ei===void 0?void 0:Ei[Ce];return $i===xn}),dataStartIndex:Ge,dataEndIndex:Ke}),On=Wa.length,qn,ca,Fn;J2e(zr.domain,pn,Ne)&&(qn=jz(zr.domain,null,pn),Xt&&(Ne==="number"||Or!=="auto")&&(Fn=K5(Wa,Jr,"category")));var da=fK(Ne);if(!qn||qn.length===0){var ea,qa=(ea=zr.domain)!==null&&ea!==void 0?ea:da;if(Jr){if(qn=K5(Wa,Jr,Ne),Ne==="category"&&Xt){var Ri=rce(qn);Lr&&Ri?(ca=qn,qn=yP(0,On)):Lr||(qn=QH(qa,qn,sr).reduce(function(Wn,Ei){return Wn.indexOf(Ei)>=0?Wn:[].concat(DT(Wn),[Ei])},[]))}else if(Ne==="category")Lr?qn=qn.filter(function(Wn){return Wn!==""&&!Ru(Wn)}):qn=QH(qa,qn,sr).reduce(function(Wn,Ei){return Wn.indexOf(Ei)>=0||Ei===""||Ru(Ei)?Wn:[].concat(DT(Wn),[Ei])},[]);else if(Ne==="number"){var mi=mge(Wa,re.filter(function(Wn){var Ei,$i,to=Ce in Wn.props?Wn.props[Ce]:(Ei=Wn.type.defaultProps)===null||Ei===void 0?void 0:Ei[Ce],fi="hide"in Wn.props?Wn.props.hide:($i=Wn.type.defaultProps)===null||$i===void 0?void 0:$i.hide;return to===xn&&($n||!fi)}),Jr,ve,dt);mi&&(qn=mi)}Xt&&(Ne==="number"||Or!=="auto")&&(Fn=K5(Wa,Jr,"category"))}else Xt?qn=yP(0,On):Be&&Be[xn]&&Be[xn].hasStack&&Ne==="number"?qn=Vt==="expand"?[0,1]:e$(Be[xn].stackGroups,Ge,Ke):qn=KZ(Wa,re.filter(function(Wn){var Ei=Ce in Wn.props?Wn.props[Ce]:Wn.type.defaultProps[Ce],$i="hide"in Wn.props?Wn.props.hide:Wn.type.defaultProps.hide;return Ei===xn&&($n||!$i)}),Ne,dt,!0);if(Ne==="number")qn=T7(gt,qn,xn,ve,cn),qa&&(qn=jz(qa,qn,pn));else if(Ne==="category"&&qa){var Io=qa,ya=qn.every(function(Wn){return Io.indexOf(Wn)>=0});ya&&(qn=Io)}}return Eo(Eo({},cr),{},pu({},xn,Eo(Eo({},zr),{},{axisType:ve,domain:qn,categoricalDomain:Fn,duplicateDomain:ca,originalDomain:(nr=zr.domain)!==null&&nr!==void 0?nr:da,isCategorical:Xt,layout:dt})))},{})},M3e=function(n,S){var L=S.graphicalItems,re=S.Axis,ve=S.axisType,Ce=S.axisIdKey,Be=S.stackGroups,Ge=S.dataStartIndex,Ke=S.dataEndIndex,dt=n.layout,gt=n.children,Vt=bL(n.data,{graphicalItems:L,dataStartIndex:Ge,dataEndIndex:Ke}),Xt=Vt.length,cr=JZ(dt,ve),sr=-1;return L.reduce(function(nr,zr){var Ne=zr.type.defaultProps!==void 0?Eo(Eo({},zr.type.defaultProps),zr.props):zr.props,Jr=Ne[Ce],pn=fK("number");if(!nr[Jr]){sr++;var Lr;return cr?Lr=yP(0,Xt):Be&&Be[Jr]&&Be[Jr].hasStack?(Lr=e$(Be[Jr].stackGroups,Ge,Ke),Lr=T7(gt,Lr,Jr,ve)):(Lr=jz(pn,KZ(Vt,L.filter(function(Or){var cn,$n,xn=Ce in Or.props?Or.props[Ce]:(cn=Or.type.defaultProps)===null||cn===void 0?void 0:cn[Ce],Wa="hide"in Or.props?Or.props.hide:($n=Or.type.defaultProps)===null||$n===void 0?void 0:$n.hide;return xn===Jr&&!Wa}),"number",dt),re.defaultProps.allowDataOverflow),Lr=T7(gt,Lr,Jr,ve)),Eo(Eo({},nr),{},pu({},Jr,Eo(Eo({axisType:ve},re.defaultProps),{},{hide:!0,orientation:P0(w3e,"".concat(ve,".").concat(sr%2),null),domain:Lr,originalDomain:pn,isCategorical:cr,layout:dt})))}return nr},{})},C3e=function(n,S){var L=S.axisType,re=L===void 0?"xAxis":L,ve=S.AxisComp,Ce=S.graphicalItems,Be=S.stackGroups,Ge=S.dataStartIndex,Ke=S.dataEndIndex,dt=n.children,gt="".concat(re,"Id"),Vt=wm(dt,ve),Xt={};return Vt&&Vt.length?Xt=E3e(n,{axes:Vt,graphicalItems:Ce,axisType:re,axisIdKey:gt,stackGroups:Be,dataStartIndex:Ge,dataEndIndex:Ke}):Ce&&Ce.length&&(Xt=M3e(n,{Axis:ve,graphicalItems:Ce,axisType:re,axisIdKey:gt,stackGroups:Be,dataStartIndex:Ge,dataEndIndex:Ke})),Xt},k3e=function(n){var S=nx(n),L=x1(S,!1,!0);return{tooltipTicks:L,orderedTooltipTicks:n9(L,function(re){return re.coordinate}),tooltipAxis:S,tooltipAxisBandSize:uP(S,L)}},WX=function(n){var S=n.children,L=n.defaultShowTooltip,re=Jm(S,bT),ve=0,Ce=0;return n.data&&n.data.length!==0&&(Ce=n.data.length-1),re&&re.props&&(re.props.startIndex>=0&&(ve=re.props.startIndex),re.props.endIndex>=0&&(Ce=re.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:ve,dataEndIndex:Ce,activeTooltipIndex:-1,isTooltipActive:!!L}},P3e=function(n){return!n||!n.length?!1:n.some(function(S){var L=b1(S&&S.type);return L&&L.indexOf("Bar")>=0})},YX=function(n){return n==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:n==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:n==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},L3e=function(n,S){var L=n.props,re=n.graphicalItems,ve=n.xAxisMap,Ce=ve===void 0?{}:ve,Be=n.yAxisMap,Ge=Be===void 0?{}:Be,Ke=L.width,dt=L.height,gt=L.children,Vt=L.margin||{},Xt=Jm(gt,bT),cr=Jm(gt,dy),sr=Object.keys(Ge).reduce(function(Lr,Or){var cn=Ge[Or],$n=cn.orientation;return!cn.mirror&&!cn.hide?Eo(Eo({},Lr),{},pu({},$n,Lr[$n]+cn.width)):Lr},{left:Vt.left||0,right:Vt.right||0}),nr=Object.keys(Ce).reduce(function(Lr,Or){var cn=Ce[Or],$n=cn.orientation;return!cn.mirror&&!cn.hide?Eo(Eo({},Lr),{},pu({},$n,P0(Lr,"".concat($n))+cn.height)):Lr},{top:Vt.top||0,bottom:Vt.bottom||0}),zr=Eo(Eo({},nr),sr),Ne=zr.bottom;Xt&&(zr.bottom+=Xt.props.height||bT.defaultProps.height),cr&&S&&(zr=vge(zr,re,L,S));var Jr=Ke-zr.left-zr.right,pn=dt-zr.top-zr.bottom;return Eo(Eo({brushBottom:Ne},zr),{},{width:Math.max(Jr,0),height:Math.max(pn,0)})},R3e=function(n,S){if(S==="xAxis")return n[S].width;if(S==="yAxis")return n[S].height},hK=function(n){var S=n.chartName,L=n.GraphicalChild,re=n.defaultTooltipEventType,ve=re===void 0?"axis":re,Ce=n.validateTooltipEventTypes,Be=Ce===void 0?["axis"]:Ce,Ge=n.axisComponents,Ke=n.legendContent,dt=n.formatAxisMap,gt=n.defaultProps,Vt=function(zr,Ne){var Jr=Ne.graphicalItems,pn=Ne.stackGroups,Lr=Ne.offset,Or=Ne.updateId,cn=Ne.dataStartIndex,$n=Ne.dataEndIndex,xn=zr.barSize,Wa=zr.layout,On=zr.barGap,qn=zr.barCategoryGap,ca=zr.maxBarSize,Fn=YX(Wa),da=Fn.numericAxisName,ea=Fn.cateAxisName,qa=P3e(Jr),Ri=[];return Jr.forEach(function(mi,Io){var ya=bL(zr.data,{graphicalItems:[mi],dataStartIndex:cn,dataEndIndex:$n}),Wn=mi.type.defaultProps!==void 0?Eo(Eo({},mi.type.defaultProps),mi.props):mi.props,Ei=Wn.dataKey,$i=Wn.maxBarSize,to=Wn["".concat(da,"Id")],fi=Wn["".concat(ea,"Id")],bo={},Ll=Ge.reduce(function(ad,jp){var Up=Ne["".concat(jp.axisType,"Map")],ov=Wn["".concat(jp.axisType,"Id")];Up&&Up[ov]||jp.axisType==="zAxis"||xw();var P1=Up[ov];return Eo(Eo({},ad),{},pu(pu({},jp.axisType,P1),"".concat(jp.axisType,"Ticks"),x1(P1)))},bo),Mo=Ll[ea],Hs=Ll["".concat(ea,"Ticks")],qo=pn&&pn[to]&&pn[to].hasStack&&Cge(mi,pn[to].stackGroups),Di=b1(mi.type).indexOf("Bar")>=0,js=uP(Mo,Hs),Ha=[],El=qa&&hge({barSize:xn,stackGroups:pn,totalSize:R3e(Ll,ea)});if(Di){var ml,Vu,Gf=Ru($i)?ca:$i,zd=(ml=(Vu=uP(Mo,Hs,!0))!==null&&Vu!==void 0?Vu:Gf)!==null&&ml!==void 0?ml:0;Ha=dge({barGap:On,barCategoryGap:qn,bandSize:zd!==js?zd:js,sizeList:El[fi],maxBarSize:Gf}),zd!==js&&(Ha=Ha.map(function(ad){return Eo(Eo({},ad),{},{position:Eo(Eo({},ad.position),{},{offset:ad.position.offset-zd/2})})}))}var Nd=mi&&mi.type&&mi.type.getComposedData;Nd&&Ri.push({props:Eo(Eo({},Nd(Eo(Eo({},Ll),{},{displayedData:ya,props:zr,dataKey:Ei,item:mi,bandSize:js,barPosition:Ha,offset:Lr,stackedData:qo,layout:Wa,dataStartIndex:cn,dataEndIndex:$n}))),{},pu(pu(pu({key:mi.key||"item-".concat(Io)},da,Ll[da]),ea,Ll[ea]),"animationId",Or)),childIndex:pce(mi,zr.children),item:mi})}),Ri},Xt=function(zr,Ne){var Jr=zr.props,pn=zr.dataStartIndex,Lr=zr.dataEndIndex,Or=zr.updateId;if(!vU({props:Jr}))return null;var cn=Jr.children,$n=Jr.layout,xn=Jr.stackOffset,Wa=Jr.data,On=Jr.reverseStackOrder,qn=YX($n),ca=qn.numericAxisName,Fn=qn.cateAxisName,da=wm(cn,L),ea=Sge(Wa,da,"".concat(ca,"Id"),"".concat(Fn,"Id"),xn,On),qa=Ge.reduce(function(Wn,Ei){var $i="".concat(Ei.axisType,"Map");return Eo(Eo({},Wn),{},pu({},$i,C3e(Jr,Eo(Eo({},Ei),{},{graphicalItems:da,stackGroups:Ei.axisType===ca&&ea,dataStartIndex:pn,dataEndIndex:Lr}))))},{}),Ri=L3e(Eo(Eo({},qa),{},{props:Jr,graphicalItems:da}),Ne?.legendBBox);Object.keys(qa).forEach(function(Wn){qa[Wn]=dt(Jr,qa[Wn],Ri,Wn.replace("Map",""),S)});var mi=qa["".concat(Fn,"Map")],Io=k3e(mi),ya=Vt(Jr,Eo(Eo({},qa),{},{dataStartIndex:pn,dataEndIndex:Lr,updateId:Or,graphicalItems:da,stackGroups:ea,offset:Ri}));return Eo(Eo({formattedGraphicalItems:ya,graphicalItems:da,offset:Ri,stackGroups:ea},Io),qa)},cr=(function(nr){function zr(Ne){var Jr,pn,Lr;return f3e(this,zr),Lr=v3e(this,zr,[Ne]),pu(Lr,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),pu(Lr,"accessibilityManager",new K2e),pu(Lr,"handleLegendBBoxUpdate",function(Or){if(Or){var cn=Lr.state,$n=cn.dataStartIndex,xn=cn.dataEndIndex,Wa=cn.updateId;Lr.setState(Eo({legendBBox:Or},Xt({props:Lr.props,dataStartIndex:$n,dataEndIndex:xn,updateId:Wa},Eo(Eo({},Lr.state),{},{legendBBox:Or}))))}}),pu(Lr,"handleReceiveSyncEvent",function(Or,cn,$n){if(Lr.props.syncId===Or){if($n===Lr.eventEmitterSymbol&&typeof Lr.props.syncMethod!="function")return;Lr.applySyncEvent(cn)}}),pu(Lr,"handleBrushChange",function(Or){var cn=Or.startIndex,$n=Or.endIndex;if(cn!==Lr.state.dataStartIndex||$n!==Lr.state.dataEndIndex){var xn=Lr.state.updateId;Lr.setState(function(){return Eo({dataStartIndex:cn,dataEndIndex:$n},Xt({props:Lr.props,dataStartIndex:cn,dataEndIndex:$n,updateId:xn},Lr.state))}),Lr.triggerSyncEvent({dataStartIndex:cn,dataEndIndex:$n})}}),pu(Lr,"handleMouseEnter",function(Or){var cn=Lr.getMouseInfo(Or);if(cn){var $n=Eo(Eo({},cn),{},{isTooltipActive:!0});Lr.setState($n),Lr.triggerSyncEvent($n);var xn=Lr.props.onMouseEnter;qu(xn)&&xn($n,Or)}}),pu(Lr,"triggeredAfterMouseMove",function(Or){var cn=Lr.getMouseInfo(Or),$n=cn?Eo(Eo({},cn),{},{isTooltipActive:!0}):{isTooltipActive:!1};Lr.setState($n),Lr.triggerSyncEvent($n);var xn=Lr.props.onMouseMove;qu(xn)&&xn($n,Or)}),pu(Lr,"handleItemMouseEnter",function(Or){Lr.setState(function(){return{isTooltipActive:!0,activeItem:Or,activePayload:Or.tooltipPayload,activeCoordinate:Or.tooltipPosition||{x:Or.cx,y:Or.cy}}})}),pu(Lr,"handleItemMouseLeave",function(){Lr.setState(function(){return{isTooltipActive:!1}})}),pu(Lr,"handleMouseMove",function(Or){Or.persist(),Lr.throttleTriggeredAfterMouseMove(Or)}),pu(Lr,"handleMouseLeave",function(Or){Lr.throttleTriggeredAfterMouseMove.cancel();var cn={isTooltipActive:!1};Lr.setState(cn),Lr.triggerSyncEvent(cn);var $n=Lr.props.onMouseLeave;qu($n)&&$n(cn,Or)}),pu(Lr,"handleOuterEvent",function(Or){var cn=vce(Or),$n=P0(Lr.props,"".concat(cn));if(cn&&qu($n)){var xn,Wa;/.*touch.*/i.test(cn)?Wa=Lr.getMouseInfo(Or.changedTouches[0]):Wa=Lr.getMouseInfo(Or),$n((xn=Wa)!==null&&xn!==void 0?xn:{},Or)}}),pu(Lr,"handleClick",function(Or){var cn=Lr.getMouseInfo(Or);if(cn){var $n=Eo(Eo({},cn),{},{isTooltipActive:!0});Lr.setState($n),Lr.triggerSyncEvent($n);var xn=Lr.props.onClick;qu(xn)&&xn($n,Or)}}),pu(Lr,"handleMouseDown",function(Or){var cn=Lr.props.onMouseDown;if(qu(cn)){var $n=Lr.getMouseInfo(Or);cn($n,Or)}}),pu(Lr,"handleMouseUp",function(Or){var cn=Lr.props.onMouseUp;if(qu(cn)){var $n=Lr.getMouseInfo(Or);cn($n,Or)}}),pu(Lr,"handleTouchMove",function(Or){Or.changedTouches!=null&&Or.changedTouches.length>0&&Lr.throttleTriggeredAfterMouseMove(Or.changedTouches[0])}),pu(Lr,"handleTouchStart",function(Or){Or.changedTouches!=null&&Or.changedTouches.length>0&&Lr.handleMouseDown(Or.changedTouches[0])}),pu(Lr,"handleTouchEnd",function(Or){Or.changedTouches!=null&&Or.changedTouches.length>0&&Lr.handleMouseUp(Or.changedTouches[0])}),pu(Lr,"handleDoubleClick",function(Or){var cn=Lr.props.onDoubleClick;if(qu(cn)){var $n=Lr.getMouseInfo(Or);cn($n,Or)}}),pu(Lr,"handleContextMenu",function(Or){var cn=Lr.props.onContextMenu;if(qu(cn)){var $n=Lr.getMouseInfo(Or);cn($n,Or)}}),pu(Lr,"triggerSyncEvent",function(Or){Lr.props.syncId!==void 0&&HO.emit(GO,Lr.props.syncId,Or,Lr.eventEmitterSymbol)}),pu(Lr,"applySyncEvent",function(Or){var cn=Lr.props,$n=cn.layout,xn=cn.syncMethod,Wa=Lr.state.updateId,On=Or.dataStartIndex,qn=Or.dataEndIndex;if(Or.dataStartIndex!==void 0||Or.dataEndIndex!==void 0)Lr.setState(Eo({dataStartIndex:On,dataEndIndex:qn},Xt({props:Lr.props,dataStartIndex:On,dataEndIndex:qn,updateId:Wa},Lr.state)));else if(Or.activeTooltipIndex!==void 0){var ca=Or.chartX,Fn=Or.chartY,da=Or.activeTooltipIndex,ea=Lr.state,qa=ea.offset,Ri=ea.tooltipTicks;if(!qa)return;if(typeof xn=="function")da=xn(Ri,Or);else if(xn==="value"){da=-1;for(var mi=0;mi<Ri.length;mi++)if(Ri[mi].value===Or.activeLabel){da=mi;break}}var Io=Eo(Eo({},qa),{},{x:qa.left,y:qa.top}),ya=Math.min(ca,Io.x+Io.width),Wn=Math.min(Fn,Io.y+Io.height),Ei=Ri[da]&&Ri[da].value,$i=E7(Lr.state,Lr.props.data,da),to=Ri[da]?{x:$n==="horizontal"?Ri[da].coordinate:ya,y:$n==="horizontal"?Wn:Ri[da].coordinate}:cK;Lr.setState(Eo(Eo({},Or),{},{activeLabel:Ei,activeCoordinate:to,activePayload:$i,activeTooltipIndex:da}))}else Lr.setState(Or)}),pu(Lr,"renderCursor",function(Or){var cn,$n=Lr.state,xn=$n.isTooltipActive,Wa=$n.activeCoordinate,On=$n.activePayload,qn=$n.offset,ca=$n.activeTooltipIndex,Fn=$n.tooltipAxisBandSize,da=Lr.getTooltipEventType(),ea=(cn=Or.props.active)!==null&&cn!==void 0?cn:xn,qa=Lr.props.layout,Ri=Or.key||"_recharts-cursor";return la.createElement(a3e,{key:Ri,activeCoordinate:Wa,activePayload:On,activeTooltipIndex:ca,chartName:S,element:Or,isActive:ea,layout:qa,offset:qn,tooltipAxisBandSize:Fn,tooltipEventType:da})}),pu(Lr,"renderPolarAxis",function(Or,cn,$n){var xn=P0(Or,"type.axisType"),Wa=P0(Lr.state,"".concat(xn,"Map")),On=Or.type.defaultProps,qn=On!==void 0?Eo(Eo({},On),Or.props):Or.props,ca=Wa&&Wa[qn["".concat(xn,"Id")]];return na.cloneElement(Or,Eo(Eo({},ca),{},{className:kc(xn,ca.className),key:Or.key||"".concat(cn,"-").concat($n),ticks:x1(ca,!0)}))}),pu(Lr,"renderPolarGrid",function(Or){var cn=Or.props,$n=cn.radialLines,xn=cn.polarAngles,Wa=cn.polarRadius,On=Lr.state,qn=On.radiusAxisMap,ca=On.angleAxisMap,Fn=nx(qn),da=nx(ca),ea=da.cx,qa=da.cy,Ri=da.innerRadius,mi=da.outerRadius;return na.cloneElement(Or,{polarAngles:Array.isArray(xn)?xn:x1(da,!0).map(function(Io){return Io.coordinate}),polarRadius:Array.isArray(Wa)?Wa:x1(Fn,!0).map(function(Io){return Io.coordinate}),cx:ea,cy:qa,innerRadius:Ri,outerRadius:mi,key:Or.key||"polar-grid",radialLines:$n})}),pu(Lr,"renderLegend",function(){var Or=Lr.state.formattedGraphicalItems,cn=Lr.props,$n=cn.children,xn=cn.width,Wa=cn.height,On=Lr.props.margin||{},qn=xn-(On.left||0)-(On.right||0),ca=ZZ({children:$n,formattedGraphicalItems:Or,legendWidth:qn,legendContent:Ke});if(!ca)return null;var Fn=ca.item,da=HX(ca,i3e);return na.cloneElement(Fn,Eo(Eo({},da),{},{chartWidth:xn,chartHeight:Wa,margin:On,onBBoxUpdate:Lr.handleLegendBBoxUpdate}))}),pu(Lr,"renderTooltip",function(){var Or,cn=Lr.props,$n=cn.children,xn=cn.accessibilityLayer,Wa=Jm($n,Qm);if(!Wa)return null;var On=Lr.state,qn=On.isTooltipActive,ca=On.activeCoordinate,Fn=On.activePayload,da=On.activeLabel,ea=On.offset,qa=(Or=Wa.props.active)!==null&&Or!==void 0?Or:qn;return na.cloneElement(Wa,{viewBox:Eo(Eo({},ea),{},{x:ea.left,y:ea.top}),active:qa,label:da,payload:qa?Fn:[],coordinate:ca,accessibilityLayer:xn})}),pu(Lr,"renderBrush",function(Or){var cn=Lr.props,$n=cn.margin,xn=cn.data,Wa=Lr.state,On=Wa.offset,qn=Wa.dataStartIndex,ca=Wa.dataEndIndex,Fn=Wa.updateId;return na.cloneElement(Or,{key:Or.key||"_recharts-brush",onChange:A6(Lr.handleBrushChange,Or.props.onChange),data:xn,x:ys(Or.props.x)?Or.props.x:On.left,y:ys(Or.props.y)?Or.props.y:On.top+On.height+On.brushBottom-($n.bottom||0),width:ys(Or.props.width)?Or.props.width:On.width,startIndex:qn,endIndex:ca,updateId:"brush-".concat(Fn)})}),pu(Lr,"renderReferenceElement",function(Or,cn,$n){if(!Or)return null;var xn=Lr,Wa=xn.clipPathId,On=Lr.state,qn=On.xAxisMap,ca=On.yAxisMap,Fn=On.offset,da=Or.type.defaultProps||{},ea=Or.props,qa=ea.xAxisId,Ri=qa===void 0?da.xAxisId:qa,mi=ea.yAxisId,Io=mi===void 0?da.yAxisId:mi;return na.cloneElement(Or,{key:Or.key||"".concat(cn,"-").concat($n),xAxis:qn[Ri],yAxis:ca[Io],viewBox:{x:Fn.left,y:Fn.top,width:Fn.width,height:Fn.height},clipPathId:Wa})}),pu(Lr,"renderActivePoints",function(Or){var cn=Or.item,$n=Or.activePoint,xn=Or.basePoint,Wa=Or.childIndex,On=Or.isRange,qn=[],ca=cn.props.key,Fn=cn.item.type.defaultProps!==void 0?Eo(Eo({},cn.item.type.defaultProps),cn.item.props):cn.item.props,da=Fn.activeDot,ea=Fn.dataKey,qa=Eo(Eo({index:Wa,dataKey:ea,cx:$n.x,cy:$n.y,r:4,fill:P9(cn.item),strokeWidth:2,stroke:"#fff",payload:$n.payload,value:$n.value},Fu(da,!1)),F6(da));return qn.push(zr.renderActiveDot(da,qa,"".concat(ca,"-activePoint-").concat(Wa))),xn?qn.push(zr.renderActiveDot(da,Eo(Eo({},qa),{},{cx:xn.x,cy:xn.y}),"".concat(ca,"-basePoint-").concat(Wa))):On&&qn.push(null),qn}),pu(Lr,"renderGraphicChild",function(Or,cn,$n){var xn=Lr.filterFormatItem(Or,cn,$n);if(!xn)return null;var Wa=Lr.getTooltipEventType(),On=Lr.state,qn=On.isTooltipActive,ca=On.tooltipAxis,Fn=On.activeTooltipIndex,da=On.activeLabel,ea=Lr.props.children,qa=Jm(ea,Qm),Ri=xn.props,mi=Ri.points,Io=Ri.isRange,ya=Ri.baseLine,Wn=xn.item.type.defaultProps!==void 0?Eo(Eo({},xn.item.type.defaultProps),xn.item.props):xn.item.props,Ei=Wn.activeDot,$i=Wn.hide,to=Wn.activeBar,fi=Wn.activeShape,bo=!!(!$i&&qn&&qa&&(Ei||to||fi)),Ll={};Wa!=="axis"&&qa&&qa.props.trigger==="click"?Ll={onClick:A6(Lr.handleItemMouseEnter,Or.props.onClick)}:Wa!=="axis"&&(Ll={onMouseLeave:A6(Lr.handleItemMouseLeave,Or.props.onMouseLeave),onMouseEnter:A6(Lr.handleItemMouseEnter,Or.props.onMouseEnter)});var Mo=na.cloneElement(Or,Eo(Eo({},xn.props),Ll));function Hs(jp){return typeof ca.dataKey=="function"?ca.dataKey(jp.payload):null}if(bo)if(Fn>=0){var qo,Di;if(ca.dataKey&&!ca.allowDuplicatedCategory){var js=typeof ca.dataKey=="function"?Hs:"payload.".concat(ca.dataKey.toString());qo=N6(mi,js,da),Di=Io&&ya&&N6(ya,js,da)}else qo=mi?.[Fn],Di=Io&&ya&&ya[Fn];if(fi||to){var Ha=Or.props.activeIndex!==void 0?Or.props.activeIndex:Fn;return[na.cloneElement(Or,Eo(Eo(Eo({},xn.props),Ll),{},{activeIndex:Ha})),null,null]}if(!Ru(qo))return[Mo].concat(DT(Lr.renderActivePoints({item:xn,activePoint:qo,basePoint:Di,childIndex:Fn,isRange:Io})))}else{var El,ml=(El=Lr.getItemByXY(Lr.state.activeCoordinate))!==null&&El!==void 0?El:{graphicalItem:Mo},Vu=ml.graphicalItem,Gf=Vu.item,zd=Gf===void 0?Or:Gf,Nd=Vu.childIndex,ad=Eo(Eo(Eo({},xn.props),Ll),{},{activeIndex:Nd});return[na.cloneElement(zd,ad),null,null]}return Io?[Mo,null,null]:[Mo,null]}),pu(Lr,"renderCustomized",function(Or,cn,$n){return na.cloneElement(Or,Eo(Eo({key:"recharts-customized-".concat($n)},Lr.props),Lr.state))}),pu(Lr,"renderMap",{CartesianGrid:{handler:k6,once:!0},ReferenceArea:{handler:Lr.renderReferenceElement},ReferenceLine:{handler:k6},ReferenceDot:{handler:Lr.renderReferenceElement},XAxis:{handler:k6},YAxis:{handler:k6},Brush:{handler:Lr.renderBrush,once:!0},Bar:{handler:Lr.renderGraphicChild},Line:{handler:Lr.renderGraphicChild},Area:{handler:Lr.renderGraphicChild},Radar:{handler:Lr.renderGraphicChild},RadialBar:{handler:Lr.renderGraphicChild},Scatter:{handler:Lr.renderGraphicChild},Pie:{handler:Lr.renderGraphicChild},Funnel:{handler:Lr.renderGraphicChild},Tooltip:{handler:Lr.renderCursor,once:!0},PolarGrid:{handler:Lr.renderPolarGrid,once:!0},PolarAngleAxis:{handler:Lr.renderPolarAxis},PolarRadiusAxis:{handler:Lr.renderPolarAxis},Customized:{handler:Lr.renderCustomized}}),Lr.clipPathId="".concat((Jr=Ne.id)!==null&&Jr!==void 0?Jr:Tw("recharts"),"-clip"),Lr.throttleTriggeredAfterMouseMove=ZY(Lr.triggeredAfterMouseMove,(pn=Ne.throttleDelay)!==null&&pn!==void 0?pn:1e3/60),Lr.state={},Lr}return g3e(zr,nr),d3e(zr,[{key:"componentDidMount",value:function(){var Jr,pn;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(Jr=this.props.margin.left)!==null&&Jr!==void 0?Jr:0,top:(pn=this.props.margin.top)!==null&&pn!==void 0?pn:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var Jr=this.props,pn=Jr.children,Lr=Jr.data,Or=Jr.height,cn=Jr.layout,$n=Jm(pn,Qm);if($n){var xn=$n.props.defaultIndex;if(!(typeof xn!="number"||xn<0||xn>this.state.tooltipTicks.length-1)){var Wa=this.state.tooltipTicks[xn]&&this.state.tooltipTicks[xn].value,On=E7(this.state,Lr,xn,Wa),qn=this.state.tooltipTicks[xn].coordinate,ca=(this.state.offset.top+Or)/2,Fn=cn==="horizontal",da=Fn?{x:qn,y:ca}:{y:qn,x:ca},ea=this.state.formattedGraphicalItems.find(function(Ri){var mi=Ri.item;return mi.type.name==="Scatter"});ea&&(da=Eo(Eo({},da),ea.props.points[xn].tooltipPosition),On=ea.props.points[xn].tooltipPayload);var qa={activeTooltipIndex:xn,isTooltipActive:!0,activeLabel:Wa,activePayload:On,activeCoordinate:da};this.setState(qa),this.renderCursor($n),this.accessibilityManager.setIndex(xn)}}}},{key:"getSnapshotBeforeUpdate",value:function(Jr,pn){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==pn.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==Jr.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==Jr.margin){var Lr,Or;this.accessibilityManager.setDetails({offset:{left:(Lr=this.props.margin.left)!==null&&Lr!==void 0?Lr:0,top:(Or=this.props.margin.top)!==null&&Or!==void 0?Or:0}})}return null}},{key:"componentDidUpdate",value:function(Jr){lz([Jm(Jr.children,Qm)],[Jm(this.props.children,Qm)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var Jr=Jm(this.props.children,Qm);if(Jr&&typeof Jr.props.shared=="boolean"){var pn=Jr.props.shared?"axis":"item";return Be.indexOf(pn)>=0?pn:ve}return ve}},{key:"getMouseInfo",value:function(Jr){if(!this.container)return null;var pn=this.container,Lr=pn.getBoundingClientRect(),Or=tve(Lr),cn={chartX:Math.round(Jr.pageX-Or.left),chartY:Math.round(Jr.pageY-Or.top)},$n=Lr.width/pn.offsetWidth||1,xn=this.inRange(cn.chartX,cn.chartY,$n);if(!xn)return null;var Wa=this.state,On=Wa.xAxisMap,qn=Wa.yAxisMap,ca=this.getTooltipEventType(),Fn=XX(this.state,this.props.data,this.props.layout,xn);if(ca!=="axis"&&On&&qn){var da=nx(On).scale,ea=nx(qn).scale,qa=da&&da.invert?da.invert(cn.chartX):null,Ri=ea&&ea.invert?ea.invert(cn.chartY):null;return Eo(Eo({},cn),{},{xValue:qa,yValue:Ri},Fn)}return Fn?Eo(Eo({},cn),Fn):null}},{key:"inRange",value:function(Jr,pn){var Lr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,Or=this.props.layout,cn=Jr/Lr,$n=pn/Lr;if(Or==="horizontal"||Or==="vertical"){var xn=this.state.offset,Wa=cn>=xn.left&&cn<=xn.left+xn.width&&$n>=xn.top&&$n<=xn.top+xn.height;return Wa?{x:cn,y:$n}:null}var On=this.state,qn=On.angleAxisMap,ca=On.radiusAxisMap;if(qn&&ca){var Fn=nx(qn);return rG({x:cn,y:$n},Fn)}return null}},{key:"parseEventsOfWrapper",value:function(){var Jr=this.props.children,pn=this.getTooltipEventType(),Lr=Jm(Jr,Qm),Or={};Lr&&pn==="axis"&&(Lr.props.trigger==="click"?Or={onClick:this.handleClick}:Or={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var cn=F6(this.props,this.handleOuterEvent);return Eo(Eo({},cn),Or)}},{key:"addListener",value:function(){HO.on(GO,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){HO.removeListener(GO,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(Jr,pn,Lr){for(var Or=this.state.formattedGraphicalItems,cn=0,$n=Or.length;cn<$n;cn++){var xn=Or[cn];if(xn.item===Jr||xn.props.key===Jr.key||pn===b1(xn.item.type)&&Lr===xn.childIndex)return xn}return null}},{key:"renderClipPath",value:function(){var Jr=this.clipPathId,pn=this.state.offset,Lr=pn.left,Or=pn.top,cn=pn.height,$n=pn.width;return la.createElement("defs",null,la.createElement("clipPath",{id:Jr},la.createElement("rect",{x:Lr,y:Or,height:cn,width:$n})))}},{key:"getXScales",value:function(){var Jr=this.state.xAxisMap;return Jr?Object.entries(Jr).reduce(function(pn,Lr){var Or=VX(Lr,2),cn=Or[0],$n=Or[1];return Eo(Eo({},pn),{},pu({},cn,$n.scale))},{}):null}},{key:"getYScales",value:function(){var Jr=this.state.yAxisMap;return Jr?Object.entries(Jr).reduce(function(pn,Lr){var Or=VX(Lr,2),cn=Or[0],$n=Or[1];return Eo(Eo({},pn),{},pu({},cn,$n.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(Jr){var pn;return(pn=this.state.xAxisMap)===null||pn===void 0||(pn=pn[Jr])===null||pn===void 0?void 0:pn.scale}},{key:"getYScaleByAxisId",value:function(Jr){var pn;return(pn=this.state.yAxisMap)===null||pn===void 0||(pn=pn[Jr])===null||pn===void 0?void 0:pn.scale}},{key:"getItemByXY",value:function(Jr){var pn=this.state,Lr=pn.formattedGraphicalItems,Or=pn.activeItem;if(Lr&&Lr.length)for(var cn=0,$n=Lr.length;cn<$n;cn++){var xn=Lr[cn],Wa=xn.props,On=xn.item,qn=On.type.defaultProps!==void 0?Eo(Eo({},On.type.defaultProps),On.props):On.props,ca=b1(On.type);if(ca==="Bar"){var Fn=(Wa.data||[]).find(function(Ri){return y_e(Jr,Ri)});if(Fn)return{graphicalItem:xn,payload:Fn}}else if(ca==="RadialBar"){var da=(Wa.data||[]).find(function(Ri){return rG(Jr,Ri)});if(da)return{graphicalItem:xn,payload:da}}else if(dL(xn,Or)||vL(xn,Or)||RE(xn,Or)){var ea=sxe({graphicalItem:xn,activeTooltipItem:Or,itemData:qn.data}),qa=qn.activeIndex===void 0?ea:qn.activeIndex;return{graphicalItem:Eo(Eo({},xn),{},{childIndex:qa}),payload:RE(xn,Or)?qn.data[ea]:xn.props.data[ea]}}}return null}},{key:"render",value:function(){var Jr=this;if(!vU(this))return null;var pn=this.props,Lr=pn.children,Or=pn.className,cn=pn.width,$n=pn.height,xn=pn.style,Wa=pn.compact,On=pn.title,qn=pn.desc,ca=HX(pn,o3e),Fn=Fu(ca,!1);if(Wa)return la.createElement(xX,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},la.createElement(cz,aT({},Fn,{width:cn,height:$n,title:On,desc:qn}),this.renderClipPath(),mU(Lr,this.renderMap)));if(this.props.accessibilityLayer){var da,ea;Fn.tabIndex=(da=this.props.tabIndex)!==null&&da!==void 0?da:0,Fn.role=(ea=this.props.role)!==null&&ea!==void 0?ea:"application",Fn.onKeyDown=function(Ri){Jr.accessibilityManager.keyboardEvent(Ri)},Fn.onFocus=function(){Jr.accessibilityManager.focus()}}var qa=this.parseEventsOfWrapper();return la.createElement(xX,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},la.createElement("div",aT({className:kc("recharts-wrapper",Or),style:Eo({position:"relative",cursor:"default",width:cn,height:$n},xn)},qa,{ref:function(mi){Jr.container=mi}}),la.createElement(cz,aT({},Fn,{width:cn,height:$n,title:On,desc:qn,style:T3e}),this.renderClipPath(),mU(Lr,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])})(na.Component);pu(cr,"displayName",S),pu(cr,"defaultProps",Eo({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},gt)),pu(cr,"getDerivedStateFromProps",function(nr,zr){var Ne=nr.dataKey,Jr=nr.data,pn=nr.children,Lr=nr.width,Or=nr.height,cn=nr.layout,$n=nr.stackOffset,xn=nr.margin,Wa=zr.dataStartIndex,On=zr.dataEndIndex;if(zr.updateId===void 0){var qn=WX(nr);return Eo(Eo(Eo({},qn),{},{updateId:0},Xt(Eo(Eo({props:nr},qn),{},{updateId:0}),zr)),{},{prevDataKey:Ne,prevData:Jr,prevWidth:Lr,prevHeight:Or,prevLayout:cn,prevStackOffset:$n,prevMargin:xn,prevChildren:pn})}if(Ne!==zr.prevDataKey||Jr!==zr.prevData||Lr!==zr.prevWidth||Or!==zr.prevHeight||cn!==zr.prevLayout||$n!==zr.prevStackOffset||!iT(xn,zr.prevMargin)){var ca=WX(nr),Fn={chartX:zr.chartX,chartY:zr.chartY,isTooltipActive:zr.isTooltipActive},da=Eo(Eo({},XX(zr,Jr,cn)),{},{updateId:zr.updateId+1}),ea=Eo(Eo(Eo({},ca),Fn),da);return Eo(Eo(Eo({},ea),Xt(Eo({props:nr},ea),zr)),{},{prevDataKey:Ne,prevData:Jr,prevWidth:Lr,prevHeight:Or,prevLayout:cn,prevStackOffset:$n,prevMargin:xn,prevChildren:pn})}if(!lz(pn,zr.prevChildren)){var qa,Ri,mi,Io,ya=Jm(pn,bT),Wn=ya&&(qa=(Ri=ya.props)===null||Ri===void 0?void 0:Ri.startIndex)!==null&&qa!==void 0?qa:Wa,Ei=ya&&(mi=(Io=ya.props)===null||Io===void 0?void 0:Io.endIndex)!==null&&mi!==void 0?mi:On,$i=Wn!==Wa||Ei!==On,to=!Ru(Jr),fi=to&&!$i?zr.updateId:zr.updateId+1;return Eo(Eo({updateId:fi},Xt(Eo(Eo({props:nr},zr),{},{updateId:fi,dataStartIndex:Wn,dataEndIndex:Ei}),zr)),{},{prevChildren:pn,dataStartIndex:Wn,dataEndIndex:Ei})}return null}),pu(cr,"renderActiveDot",function(nr,zr,Ne){var Jr;return na.isValidElement(nr)?Jr=na.cloneElement(nr,zr):qu(nr)?Jr=nr(zr):Jr=la.createElement(hL,zr),la.createElement(Df,{className:"recharts-active-dot",key:Ne},Jr)});var sr=na.forwardRef(function(zr,Ne){return la.createElement(cr,aT({},zr,{ref:Ne}))});return sr.displayName=cr.displayName,sr},I3e=hK({chartName:"LineChart",GraphicalChild:yy,axisComponents:[{axisType:"xAxis",AxisComp:yx},{axisType:"yAxis",AxisComp:_x}],formatAxisMap:w$}),U9=hK({chartName:"ComposedChart",GraphicalChild:[yy,gx,HT,XT],axisComponents:[{axisType:"xAxis",AxisComp:yx},{axisType:"yAxis",AxisComp:_x},{axisType:"zAxis",AxisComp:xL}],formatAxisMap:w$});async function D3e(e,n){return(await Qc.post(`/sessions/${e}/visualizations/contour`,n)).data}async function O3e(e,n=!1){return(await Qc.get(`/sessions/${e}/visualizations/parity`,{params:{use_calibrated:n}})).data}async function z3e(e,n=5){return(await Qc.get(`/sessions/${e}/visualizations/metrics`,{params:{cv_splits:n}})).data}async function N3e(e,n=!1){return(await Qc.get(`/sessions/${e}/visualizations/qq-plot`,{params:{use_calibrated:n}})).data}async function F3e(e,n=!1){return(await Qc.get(`/sessions/${e}/visualizations/calibration-curve`,{params:{use_calibrated:n}})).data}function B3e(e,n,S=!1){return pg({queryKey:["contour-data",e,n],queryFn:()=>(console.log("useContourData queryFn executing with request:",n),D3e(e,n)),enabled:S&&!!e,staleTime:1/0,gcTime:300*1e3,refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:!1})}function j3e(e,n=!1,S=!0){return pg({queryKey:["parity-data",e,n],queryFn:()=>O3e(e,n),enabled:S&&!!e,staleTime:3e4,refetchOnWindowFocus:!1})}function U3e(e,n=5,S=!0){return pg({queryKey:["metrics-data",e,n],queryFn:()=>z3e(e,n),enabled:S&&!!e,staleTime:6e4,refetchOnWindowFocus:!1})}function q3e(e,n=!1,S=!0){return pg({queryKey:["qq-plot-data",e,n],queryFn:()=>N3e(e,n),enabled:S&&!!e,staleTime:3e4,refetchOnWindowFocus:!1})}function V3e(e,n=!1,S=!0){return pg({queryKey:["calibration-curve-data",e,n],queryFn:()=>F3e(e,n),enabled:S&&!!e,staleTime:3e4,refetchOnWindowFocus:!1})}function H3e({sessionId:e,useCalibrated:n,sigmaMultiplier:S}){const{data:L,isLoading:re,error:ve}=j3e(e,n),Ce=na.useMemo(()=>{if(!L)return[];const Xt=S==="None"?0:parseFloat(S);return L.y_true.map((cr,sr)=>({actual:cr,predicted:L.y_pred[sr],errorLow:Xt>0&&L.y_std?Xt*L.y_std[sr]:0,errorHigh:Xt>0&&L.y_std?Xt*L.y_std[sr]:0}))},[L,S]),Be=na.useMemo(()=>{if(!L||L.y_true.length===0)return[];const Xt=[...L.y_true,...L.y_pred],cr=Math.min(...Xt),sr=Math.max(...Xt);return[{actual:cr,parity:cr},{actual:sr,parity:sr}]},[L]),Ke={"1.0":"68% CI","1.96":"95% CI","2.0":"95.4% CI","2.58":"99% CI","3.0":"99.7% CI"}[S]||`${S}σ`;if(re)return lt.jsx("div",{className:"flex items-center justify-center h-96",children:lt.jsx(ux,{className:"w-8 h-8 animate-spin text-primary"})});if(ve)return lt.jsx("div",{className:"flex items-center justify-center h-96",children:lt.jsxs("div",{className:"text-center",children:[lt.jsx("p",{className:"text-destructive font-medium",children:"Error loading parity plot"}),lt.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:ve.message})]})});if(!L||L.y_true.length===0)return lt.jsx("div",{className:"flex items-center justify-center h-96",children:lt.jsx("p",{className:"text-muted-foreground",children:"No data available for parity plot"})});const dt=S!=="None"&&L.y_std,gt=L.calibrated?" (Calibrated)":" (Uncalibrated)",Vt=dt?`Cross-Validation Parity Plot${gt}
RMSE: ${L.metrics.rmse.toFixed(4)}, MAE: ${L.metrics.mae.toFixed(4)}, R²: ${L.metrics.r2.toFixed(4)}
Error bars: ±${S}σ (${Ke})`:`Cross-Validation Parity Plot${gt}
RMSE: ${L.metrics.rmse.toFixed(4)}, MAE: ${L.metrics.mae.toFixed(4)}, R²: ${L.metrics.r2.toFixed(4)}`;return lt.jsxs("div",{className:"w-full h-full flex flex-col",children:[lt.jsx("div",{className:"text-center mb-3",children:lt.jsx("h3",{className:"text-sm font-medium whitespace-pre-line leading-tight",children:Vt})}),lt.jsx("div",{className:"flex-1 min-h-0 max-h-[450px]",children:lt.jsx(rL,{width:"100%",height:"100%",children:lt.jsxs(U9,{margin:{top:20,right:30,bottom:50,left:50},children:[lt.jsx($E,{strokeDasharray:"3 3"}),lt.jsx(yx,{dataKey:"actual",type:"number",domain:["auto","auto"],label:{value:"Actual Values",position:"bottom",offset:10}}),lt.jsx(_x,{type:"number",domain:["auto","auto"],label:{value:"Predicted Values",angle:-90,position:"left",offset:10}}),lt.jsx(Qm,{formatter:Xt=>Xt.toFixed(4),labelFormatter:Xt=>`Actual: ${Xt.toFixed(4)}`}),lt.jsx(dy,{verticalAlign:"top",height:36}),lt.jsx(yy,{data:Be,dataKey:"parity",stroke:"#ef4444",strokeWidth:2,strokeDasharray:"5 5",dot:!1,name:"Parity line",isAnimationActive:!1}),lt.jsxs(XT,{data:Ce,dataKey:"predicted",fill:"white",stroke:"#3b82f6",strokeWidth:2,fillOpacity:1,name:"Predictions",children:[dt&&lt.jsx(cx,{dataKey:"errorLow",direction:"y",width:0,strokeWidth:1,stroke:"#3b82f6"}),dt&&lt.jsx(cx,{dataKey:"errorHigh",direction:"y",width:0,strokeWidth:1,stroke:"#3b82f6"})]})]})})})]})}function G3e({sessionId:e,selectedMetric:n,cvSplits:S}){const{data:L,isLoading:re,error:ve}=U3e(e,S),Ce=na.useMemo(()=>{if(!L)return[];const dt={RMSE:L.rmse,MAE:L.mae,MAPE:L.mape,R2:L.r2}[n];return dt?dt.map((gt,Vt)=>({numObservations:Vt+S,value:gt!==null?gt:void 0})).filter(gt=>gt.value!==void 0):[]},[L,n,S]),Be={RMSE:"RMSE",MAE:"MAE",MAPE:"MAPE (%)",R2:"R²"},Ge={RMSE:"RMSE vs Number of Observations",MAE:"MAE vs Number of Observations",MAPE:"MAPE vs Number of Observations",R2:"R² vs Number of Observations"};return re?lt.jsx("div",{className:"flex items-center justify-center h-96",children:lt.jsxs("div",{className:"text-center",children:[lt.jsx(ux,{className:"w-8 h-8 animate-spin text-primary mx-auto"}),lt.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:"Computing metrics... This may take 5-10 seconds"})]})}):ve?lt.jsx("div",{className:"flex items-center justify-center h-96",children:lt.jsxs("div",{className:"text-center",children:[lt.jsx("p",{className:"text-destructive font-medium",children:"Error loading metrics plot"}),lt.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:ve.message})]})}):!L||Ce.length===0?lt.jsx("div",{className:"flex items-center justify-center h-96",children:lt.jsx("p",{className:"text-muted-foreground",children:"No data available for metrics plot"})}):lt.jsxs("div",{className:"w-full h-full flex flex-col",children:[lt.jsx("div",{className:"text-center mb-3",children:lt.jsx("h3",{className:"text-sm font-medium",children:Ge[n]})}),lt.jsx("div",{className:"flex-1 min-h-0 max-h-[450px]",children:lt.jsx(rL,{width:"100%",height:"100%",children:lt.jsxs(I3e,{data:Ce,margin:{top:20,right:30,bottom:50,left:50},children:[lt.jsx($E,{strokeDasharray:"3 3"}),lt.jsx(yx,{dataKey:"numObservations",type:"number",domain:["dataMin","dataMax"],label:{value:"Number of Observations",position:"bottom",offset:10}}),lt.jsx(_x,{label:{value:Be[n],angle:-90,position:"left",offset:10}}),lt.jsx(Qm,{formatter:Ke=>Ke.toFixed(4),labelFormatter:Ke=>`N = ${Ke}`}),lt.jsx(dy,{verticalAlign:"top",height:36}),lt.jsx(yy,{type:"monotone",dataKey:"value",stroke:"#3b82f6",strokeWidth:2,dot:{r:4,fill:"white",stroke:"#3b82f6",strokeWidth:2},name:Be[n]})]})})})]})}function X3e({sessionId:e,useCalibrated:n}){const{data:S,isLoading:L,error:re}=q3e(e,n),ve=na.useMemo(()=>S?S.theoretical_quantiles.map((nr,zr)=>({theoretical:nr,sample:S.sample_quantiles[zr]})):[],[S]),Ce=na.useMemo(()=>{if(!S||S.theoretical_quantiles.length===0)return[];const nr=[...S.theoretical_quantiles,...S.sample_quantiles],zr=Math.min(...nr),Ne=Math.max(...nr);return[{theoretical:zr,parity:zr},{theoretical:Ne,parity:Ne}]},[S]),Be=na.useMemo(()=>{if(!S||S.n_samples>=100)return[];const nr=1.96/Math.sqrt(S.n_samples);return S.theoretical_quantiles.map(zr=>({theoretical:zr,bounds:[zr-nr,zr+nr]}))},[S]),Ge=na.useMemo(()=>{if(!S)return{xMin:-3,xMax:3,yMin:-3,yMax:3,ticks:[-3,-2,-1,0,1,2,3]};const nr=1.96/Math.sqrt(S.n_samples),zr=Math.min(...S.theoretical_quantiles),Ne=Math.max(...S.theoretical_quantiles),Jr=Math.min(...S.sample_quantiles)-nr,pn=Math.max(...S.sample_quantiles)+nr,Lr=Math.ceil(zr),Or=Math.floor(Ne),cn=Array.from({length:Or-Lr+1},($n,xn)=>Lr+xn);return{xMin:zr,xMax:Ne,yMin:Jr,yMax:pn,ticks:cn}},[S]);if(L)return lt.jsx("div",{className:"flex items-center justify-center h-96",children:lt.jsx(ux,{className:"w-8 h-8 animate-spin text-primary"})});if(re)return lt.jsx("div",{className:"flex items-center justify-center h-96",children:lt.jsxs("div",{className:"text-center",children:[lt.jsx("p",{className:"text-destructive font-medium",children:"Error loading Q-Q plot"}),lt.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:re.message})]})});if(!S||S.theoretical_quantiles.length===0)return lt.jsx("div",{className:"flex items-center justify-center h-96",children:lt.jsx("p",{className:"text-muted-foreground",children:"No data available for Q-Q plot"})});const dt=`Q-Q Plot: Standardized Residuals vs. Normal Distribution${S.results_type==="calibrated"?" (Calibrated)":" (Uncalibrated)"}
Mean(z) = ${S.z_mean.toFixed(3)}, Std(z) = ${S.z_std.toFixed(3)}, N = ${S.n_samples}`,gt=Math.abs(S.z_mean)<.1&&Math.abs(S.z_std-1)<.2,Vt=Math.abs(S.z_mean)>.2,Xt=S.z_std<.7,cr=S.z_std>1.3;let sr="";return gt?sr="✓ Model appears well-calibrated (unbiased, good uncertainty)":Vt?sr="⚠ Model may be biased (mean(z) far from 0)":Xt?sr="⚠ Model may be under-confident (std(z) < 1)":cr&&(sr="⚠ Model may be over-confident (std(z) > 1)"),lt.jsxs("div",{className:"w-full h-full flex flex-col",children:[lt.jsxs("div",{className:"text-center mb-3",children:[lt.jsx("h3",{className:"text-sm font-medium whitespace-pre-line leading-tight",children:dt}),sr&&lt.jsx("p",{className:`text-xs mt-1.5 ${gt?"text-green-600":"text-yellow-600"}`,children:sr})]}),lt.jsx("div",{className:"flex-1 min-h-0 max-h-[450px]",children:lt.jsx(rL,{width:"100%",height:"100%",children:lt.jsxs(U9,{margin:{top:20,right:30,bottom:50,left:50},children:[lt.jsx($E,{strokeDasharray:"3 3",stroke:"#e5e7eb"}),lt.jsx(yx,{dataKey:"theoretical",type:"number",domain:[Ge.xMin,Ge.xMax],ticks:Ge.ticks,label:{value:"Theoretical Quantiles (Standard Normal)",position:"bottom",offset:10}}),lt.jsx(_x,{type:"number",domain:[Ge.yMin,Ge.yMax],ticks:Ge.ticks,label:{value:"Observed Quantiles (Standardized Residuals)",angle:-90,position:"left",offset:10}}),lt.jsx(Qm,{formatter:nr=>typeof nr=="number"?nr.toFixed(3):nr,labelFormatter:nr=>typeof nr=="number"?`Theoretical: ${nr.toFixed(3)}`:nr}),lt.jsx(dy,{verticalAlign:"top",height:36}),Be.length>0&&lt.jsx(gx,{data:Be,dataKey:"bounds",stroke:"none",fill:"#fecaca",fillOpacity:.5,name:"Approximate 95% CI",isAnimationActive:!1}),lt.jsx(yy,{data:Ce,dataKey:"parity",stroke:"#ef4444",strokeWidth:2,strokeDasharray:"5 5",dot:!1,name:"Perfect calibration",isAnimationActive:!1}),lt.jsx(XT,{data:ve,dataKey:"sample",fill:"white",stroke:"#3b82f6",strokeWidth:2,fillOpacity:1,name:"Observations"})]})})})]})}function W3e({sessionId:e,useCalibrated:n}){const{data:S,isLoading:L,error:re}=V3e(e,n),ve=na.useMemo(()=>S?S.nominal_coverage.map((dt,gt)=>({nominal:dt,empirical:S.empirical_coverage[gt],overConfident:S.empirical_coverage[gt]<dt?S.empirical_coverage[gt]:dt,underConfident:S.empirical_coverage[gt]>=dt?S.empirical_coverage[gt]:dt})):[],[S]),Ce=na.useMemo(()=>[{nominal:0,perfect:0},{nominal:1,perfect:1}],[]),Be=na.useMemo(()=>!S||!S.confidence_levels?[]:S.confidence_levels.map((dt,gt)=>{const Vt=S.nominal_probabilities?S.nominal_probabilities[gt]:S.nominal_coverage[gt],Xt=S.empirical_probabilities?S.empirical_probabilities[gt]:S.empirical_coverage[gt],cr=Xt-Vt;let sr="";return Math.abs(cr)<.05?sr="✓ Good":cr>.1?sr="⚠ Under-conf":cr<-.1?sr="⚠ Over-conf":sr="~ Acceptable",{level:dt,nominal:Vt,empirical:Xt,diff:cr,status:sr}}),[S]);if(L)return lt.jsx("div",{className:"flex items-center justify-center h-96",children:lt.jsx(ux,{className:"w-8 h-8 animate-spin text-primary"})});if(re)return lt.jsx("div",{className:"flex items-center justify-center h-96",children:lt.jsxs("div",{className:"text-center",children:[lt.jsx("p",{className:"text-destructive font-medium",children:"Error loading calibration curve"}),lt.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:re.message})]})});if(!S||S.nominal_coverage.length===0)return lt.jsx("div",{className:"flex items-center justify-center h-96",children:lt.jsx("p",{className:"text-muted-foreground",children:"No data available for calibration curve"})});const Ke=`Calibration Curve (Reliability Diagram)${S.results_type==="calibrated"?" (Calibrated)":" (Uncalibrated)"}
N = ${S.n_samples}`;return lt.jsxs("div",{className:"w-full h-full flex flex-col",children:[lt.jsxs("div",{className:"text-center mb-3",children:[lt.jsx("h3",{className:"text-sm font-medium whitespace-pre-line leading-tight",children:Ke}),S.n_samples<30&&lt.jsx("p",{className:"text-xs text-yellow-600 mt-1.5",children:"⚠ WARNING: Small sample size (N < 30). Coverage estimates may be noisy."})]}),lt.jsxs("div",{className:"flex-1 flex gap-6",children:[lt.jsx("div",{className:"flex-1 min-h-0 max-h-[450px]",children:lt.jsx(rL,{width:"100%",height:"100%",children:lt.jsxs(U9,{data:ve,margin:{top:20,right:30,bottom:50,left:50},children:[lt.jsx($E,{strokeDasharray:"3 3",stroke:"#e5e7eb"}),lt.jsx(yx,{dataKey:"nominal",type:"number",domain:[0,1],label:{value:"Nominal Coverage Probability",position:"bottom",offset:10},tickFormatter:dt=>dt.toFixed(1)}),lt.jsx(_x,{type:"number",domain:[0,1],label:{value:"Empirical Coverage Probability",angle:-90,position:"left",offset:10},tickFormatter:dt=>dt.toFixed(1)}),lt.jsx(Qm,{formatter:dt=>dt.toFixed(3),labelFormatter:dt=>`Nominal: ${dt.toFixed(3)}`}),lt.jsx(dy,{verticalAlign:"top",height:36}),lt.jsx(yy,{data:Ce,dataKey:"perfect",stroke:"#ef4444",strokeWidth:2,strokeDasharray:"5 5",dot:!1,name:"Perfect calibration",isAnimationActive:!1}),lt.jsx(yy,{dataKey:"empirical",stroke:"#3b82f6",strokeWidth:2,dot:{r:4,fill:"white",stroke:"#3b82f6",strokeWidth:2},name:"Empirical coverage"})]})})}),lt.jsxs("div",{className:"w-80 bg-muted/30 rounded-lg p-3 overflow-auto",children:[lt.jsx("h4",{className:"font-semibold text-xs uppercase tracking-wide text-muted-foreground mb-2",children:"Coverage Metrics"}),lt.jsx("div",{className:"text-xs",children:lt.jsxs("table",{className:"w-full",children:[lt.jsx("thead",{className:"border-b border-border",children:lt.jsxs("tr",{className:"text-left",children:[lt.jsx("th",{className:"pb-2",children:"Confidence"}),lt.jsx("th",{className:"pb-2 text-right",children:"Nominal"}),lt.jsx("th",{className:"pb-2 text-right",children:"Empirical"}),lt.jsx("th",{className:"pb-2 text-right",children:"Diff"}),lt.jsx("th",{className:"pb-2",children:"Status"})]})}),lt.jsx("tbody",{children:Be.map((dt,gt)=>lt.jsxs("tr",{className:"border-b border-border/50",children:[lt.jsx("td",{className:"py-1",children:dt.level}),lt.jsxs("td",{className:"py-1 text-right",children:[dt.nominal.toFixed(3)," (",(dt.nominal*100).toFixed(1),"%)"]}),lt.jsxs("td",{className:"py-1 text-right",children:[dt.empirical.toFixed(3)," (",(dt.empirical*100).toFixed(1),"%)"]}),lt.jsxs("td",{className:`py-1 text-right ${dt.diff>0?"text-blue-600":"text-orange-600"}`,children:[dt.diff>0?"+":"",dt.diff.toFixed(3)," (",dt.diff>0?"+":"",(dt.diff*100).toFixed(1),"%)"]}),lt.jsx("td",{className:"py-1 text-xs",children:dt.status})]},gt))})]})})]})]})]})}var WO={},YO={},ZX;function Y3e(){return ZX||(ZX=1,(function(e){function n(Lr){"@babel/helpers - typeof";return n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Or){return typeof Or}:function(Or){return Or&&typeof Symbol=="function"&&Or.constructor===Symbol&&Or!==Symbol.prototype?"symbol":typeof Or},n(Lr)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=pn;var S=Ce(OP()),L=re(i$());function re(Lr){return Lr&&Lr.__esModule?Lr:{default:Lr}}function ve(Lr){if(typeof WeakMap!="function")return null;var Or=new WeakMap,cn=new WeakMap;return(ve=function(xn){return xn?cn:Or})(Lr)}function Ce(Lr,Or){if(Lr&&Lr.__esModule)return Lr;if(Lr===null||n(Lr)!=="object"&&typeof Lr!="function")return{default:Lr};var cn=ve(Or);if(cn&&cn.has(Lr))return cn.get(Lr);var $n={},xn=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Wa in Lr)if(Wa!=="default"&&Object.prototype.hasOwnProperty.call(Lr,Wa)){var On=xn?Object.getOwnPropertyDescriptor(Lr,Wa):null;On&&(On.get||On.set)?Object.defineProperty($n,Wa,On):$n[Wa]=Lr[Wa]}return $n.default=Lr,cn&&cn.set(Lr,$n),$n}function Be(Lr,Or){if(!(Lr instanceof Or))throw new TypeError("Cannot call a class as a function")}function Ge(Lr,Or){for(var cn=0;cn<Or.length;cn++){var $n=Or[cn];$n.enumerable=$n.enumerable||!1,$n.configurable=!0,"value"in $n&&($n.writable=!0),Object.defineProperty(Lr,$n.key,$n)}}function Ke(Lr,Or,cn){return Or&&Ge(Lr.prototype,Or),Object.defineProperty(Lr,"prototype",{writable:!1}),Lr}function dt(Lr,Or){if(typeof Or!="function"&&Or!==null)throw new TypeError("Super expression must either be null or a function");Lr.prototype=Object.create(Or&&Or.prototype,{constructor:{value:Lr,writable:!0,configurable:!0}}),Object.defineProperty(Lr,"prototype",{writable:!1}),Or&&gt(Lr,Or)}function gt(Lr,Or){return gt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function($n,xn){return $n.__proto__=xn,$n},gt(Lr,Or)}function Vt(Lr){var Or=sr();return function(){var $n=nr(Lr),xn;if(Or){var Wa=nr(this).constructor;xn=Reflect.construct($n,arguments,Wa)}else xn=$n.apply(this,arguments);return Xt(this,xn)}}function Xt(Lr,Or){if(Or&&(n(Or)==="object"||typeof Or=="function"))return Or;if(Or!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return cr(Lr)}function cr(Lr){if(Lr===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Lr}function sr(){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 nr(Lr){return nr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(cn){return cn.__proto__||Object.getPrototypeOf(cn)},nr(Lr)}var zr=["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"],Ne=["plotly_restyle","plotly_redraw","plotly_relayout","plotly_relayouting","plotly_doubleclick","plotly_animated","plotly_sunburstclick"],Jr=typeof window<"u";function pn(Lr){var Or=(function(cn){dt(xn,cn);var $n=Vt(xn);function xn(Wa){var On;return Be(this,xn),On=$n.call(this,Wa),On.p=Promise.resolve(),On.resizeHandler=null,On.handlers={},On.syncWindowResize=On.syncWindowResize.bind(cr(On)),On.syncEventHandlers=On.syncEventHandlers.bind(cr(On)),On.attachUpdateEvents=On.attachUpdateEvents.bind(cr(On)),On.getRef=On.getRef.bind(cr(On)),On.handleUpdate=On.handleUpdate.bind(cr(On)),On.figureCallback=On.figureCallback.bind(cr(On)),On.updatePlotly=On.updatePlotly.bind(cr(On)),On}return Ke(xn,[{key:"updatePlotly",value:function(On,qn,ca){var Fn=this;this.p=this.p.then(function(){if(!Fn.unmounting){if(!Fn.el)throw new Error("Missing element reference");return Lr.react(Fn.el,{data:Fn.props.data,layout:Fn.props.layout,config:Fn.props.config,frames:Fn.props.frames})}}).then(function(){Fn.unmounting||(Fn.syncWindowResize(On),Fn.syncEventHandlers(),Fn.figureCallback(qn),ca&&Fn.attachUpdateEvents())}).catch(function(da){Fn.props.onError&&Fn.props.onError(da)})}},{key:"componentDidMount",value:function(){this.unmounting=!1,this.updatePlotly(!0,this.props.onInitialized,!0)}},{key:"componentDidUpdate",value:function(On){this.unmounting=!1;var qn=On.frames&&On.frames.length?On.frames.length:0,ca=this.props.frames&&this.props.frames.length?this.props.frames.length:0,Fn=!(On.layout===this.props.layout&&On.data===this.props.data&&On.config===this.props.config&&ca===qn),da=On.revision!==void 0,ea=On.revision!==this.props.revision;!Fn&&(!da||da&&!ea)||this.updatePlotly(!1,this.props.onUpdate,!1)}},{key:"componentWillUnmount",value:function(){this.unmounting=!0,this.figureCallback(this.props.onPurge),this.resizeHandler&&Jr&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null),this.removeUpdateEvents(),Lr.purge(this.el)}},{key:"attachUpdateEvents",value:function(){var On=this;!this.el||!this.el.removeListener||Ne.forEach(function(qn){On.el.on(qn,On.handleUpdate)})}},{key:"removeUpdateEvents",value:function(){var On=this;!this.el||!this.el.removeListener||Ne.forEach(function(qn){On.el.removeListener(qn,On.handleUpdate)})}},{key:"handleUpdate",value:function(){this.figureCallback(this.props.onUpdate)}},{key:"figureCallback",value:function(On){if(typeof On=="function"){var qn=this.el,ca=qn.data,Fn=qn.layout,da=this.el._transitionData?this.el._transitionData._frames:null,ea={data:ca,layout:Fn,frames:da};On(ea,this.el)}}},{key:"syncWindowResize",value:function(On){var qn=this;Jr&&(this.props.useResizeHandler&&!this.resizeHandler?(this.resizeHandler=function(){return Lr.Plots.resize(qn.el)},window.addEventListener("resize",this.resizeHandler),On&&this.resizeHandler()):!this.props.useResizeHandler&&this.resizeHandler&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null))}},{key:"getRef",value:function(On){this.el=On,this.props.debug&&Jr&&(window.gd=this.el)}},{key:"syncEventHandlers",value:function(){var On=this;zr.forEach(function(qn){var ca=On.props["on"+qn],Fn=On.handlers[qn],da=!!Fn;ca&&!da?On.addEventHandler(qn,ca):!ca&&da?On.removeEventHandler(qn):ca&&da&&ca!==Fn&&(On.removeEventHandler(qn),On.addEventHandler(qn,ca))})}},{key:"addEventHandler",value:function(On,qn){this.handlers[On]=qn,this.el.on(this.getPlotlyEventName(On),this.handlers[On])}},{key:"removeEventHandler",value:function(On){this.el.removeListener(this.getPlotlyEventName(On),this.handlers[On]),delete this.handlers[On]}},{key:"getPlotlyEventName",value:function(On){return"plotly_"+On.toLowerCase()}},{key:"render",value:function(){return S.default.createElement("div",{id:this.props.divId,style:this.props.style,ref:this.getRef,className:this.props.className})}}]),xn})(S.Component);return Or.propTypes={data:L.default.arrayOf(L.default.object),config:L.default.object,layout:L.default.object,frames:L.default.arrayOf(L.default.object),revision:L.default.number,onInitialized:L.default.func,onPurge:L.default.func,onError:L.default.func,onUpdate:L.default.func,debug:L.default.bool,style:L.default.object,className:L.default.string,useResizeHandler:L.default.bool,divId:L.default.string},zr.forEach(function(cn){Or.propTypes["on"+cn]=L.default.func}),Or.defaultProps={debug:!1,useResizeHandler:!1,data:[],style:{position:"relative",display:"inline-block"}},Or}})(YO)),YO}var I6={exports:{}},Z3e=I6.exports,$X;function $3e(){return $X||($X=1,(function(e){var n={};(function(S,L){e.exports?e.exports=L():S.moduleName=L()})(typeof self<"u"?self:Z3e,()=>{var S=(()=>{var L=Object.create,re=Object.defineProperty,ve=Object.defineProperties,Ce=Object.getOwnPropertyDescriptor,Be=Object.getOwnPropertyDescriptors,Ge=Object.getOwnPropertyNames,Ke=Object.getOwnPropertySymbols,dt=Object.getPrototypeOf,gt=Object.prototype.hasOwnProperty,Vt=Object.prototype.propertyIsEnumerable,Xt=(te,Z,v)=>Z in te?re(te,Z,{enumerable:!0,configurable:!0,writable:!0,value:v}):te[Z]=v,cr=(te,Z)=>{for(var v in Z||(Z={}))gt.call(Z,v)&&Xt(te,v,Z[v]);if(Ke)for(var v of Ke(Z))Vt.call(Z,v)&&Xt(te,v,Z[v]);return te},sr=(te,Z)=>ve(te,Be(Z)),nr=(te,Z)=>{var v={};for(var w in te)gt.call(te,w)&&Z.indexOf(w)<0&&(v[w]=te[w]);if(te!=null&&Ke)for(var w of Ke(te))Z.indexOf(w)<0&&Vt.call(te,w)&&(v[w]=te[w]);return v},zr=(te,Z)=>function(){return te&&(Z=(0,te[Ge(te)[0]])(te=0)),Z},Ne=(te,Z)=>function(){return Z||(0,te[Ge(te)[0]])((Z={exports:{}}).exports,Z),Z.exports},Jr=(te,Z)=>{for(var v in Z)re(te,v,{get:Z[v],enumerable:!0})},pn=(te,Z,v,w)=>{if(Z&&typeof Z=="object"||typeof Z=="function")for(let C of Ge(Z))!gt.call(te,C)&&C!==v&&re(te,C,{get:()=>Z[C],enumerable:!(w=Ce(Z,C))||w.enumerable});return te},Lr=(te,Z,v)=>(v=te!=null?L(dt(te)):{},pn(re(v,"default",{value:te,enumerable:!0}),te)),Or=te=>pn(re({},"__esModule",{value:!0}),te),cn=Ne({"src/version.js"(te){te.version="3.3.0"}}),$n=Ne({"node_modules/native-promise-only/lib/npo.src.js"(te,Z){(function(w,C,P){C[w]=C[w]||P(),typeof Z<"u"&&Z.exports&&(Z.exports=C[w])})("Promise",typeof window<"u"?window:te,function(){var w,C,P,t=Object.prototype.toString,r=typeof setImmediate<"u"?function(_){return setImmediate(_)}:setTimeout;try{Object.defineProperty({},"x",{}),w=function(_,T,M,k){return Object.defineProperty(_,T,{value:M,writable:!0,configurable:k!==!1})}}catch{w=function(T,M,k){return T[M]=k,T}}P=(function(){var _,T,M;function k(b,A){this.fn=b,this.self=A,this.next=void 0}return{add:function(A,y){M=new k(A,y),T?T.next=M:_=M,T=M,M=void 0},drain:function(){var A=_;for(_=T=C=void 0;A;)A.fn.call(A.self),A=A.next}}})();function a(c,_){P.add(c,_),C||(C=r(P.drain))}function l(c){var _,T=typeof c;return c!=null&&(T=="object"||T=="function")&&(_=c.then),typeof _=="function"?_:!1}function i(){for(var c=0;c<this.chain.length;c++)s(this,this.state===1?this.chain[c].success:this.chain[c].failure,this.chain[c]);this.chain.length=0}function s(c,_,T){var M,k;try{_===!1?T.reject(c.msg):(_===!0?M=c.msg:M=_.call(void 0,c.msg),M===T.promise?T.reject(TypeError("Promise-chain cycle")):(k=l(M))?k.call(M,T.resolve,T.reject):T.resolve(M))}catch(b){T.reject(b)}}function o(c){var _,T=this;if(!T.triggered){T.triggered=!0,T.def&&(T=T.def);try{(_=l(c))?a(function(){var M=new h(T);try{_.call(c,function(){o.apply(M,arguments)},function(){u.apply(M,arguments)})}catch(k){u.call(M,k)}}):(T.msg=c,T.state=1,T.chain.length>0&&a(i,T))}catch(M){u.call(new h(T),M)}}}function u(c){var _=this;_.triggered||(_.triggered=!0,_.def&&(_=_.def),_.msg=c,_.state=2,_.chain.length>0&&a(i,_))}function d(c,_,T,M){for(var k=0;k<_.length;k++)(function(A){c.resolve(_[A]).then(function(f){T(A,f)},M)})(k)}function h(c){this.def=c,this.triggered=!1}function g(c){this.promise=c,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function m(c){if(typeof c!="function")throw TypeError("Not a function");if(this.__NPO__!==0)throw TypeError("Not a promise");this.__NPO__=1;var _=new g(this);this.then=function(M,k){var b={success:typeof M=="function"?M:!0,failure:typeof k=="function"?k:!1};return b.promise=new this.constructor(function(y,f){if(typeof y!="function"||typeof f!="function")throw TypeError("Not a function");b.resolve=y,b.reject=f}),_.chain.push(b),_.state!==0&&a(i,_),b.promise},this.catch=function(M){return this.then(void 0,M)};try{c.call(void 0,function(M){o.call(_,M)},function(M){u.call(_,M)})}catch(T){u.call(_,T)}}var E=w({},"constructor",m,!1);return m.prototype=E,w(E,"__NPO__",0,!1),w(m,"resolve",function(_){var T=this;return _&&typeof _=="object"&&_.__NPO__===1?_:new T(function(k,b){if(typeof k!="function"||typeof b!="function")throw TypeError("Not a function");k(_)})}),w(m,"reject",function(_){return new this(function(M,k){if(typeof M!="function"||typeof k!="function")throw TypeError("Not a function");k(_)})}),w(m,"all",function(_){var T=this;return t.call(_)!="[object Array]"?T.reject(TypeError("Not an array")):_.length===0?T.resolve([]):new T(function(k,b){if(typeof k!="function"||typeof b!="function")throw TypeError("Not a function");var A=_.length,y=Array(A),f=0;d(T,_,function(x,N){y[x]=N,++f===A&&k(y)},b)})}),w(m,"race",function(_){var T=this;return t.call(_)!="[object Array]"?T.reject(TypeError("Not an array")):new T(function(k,b){if(typeof k!="function"||typeof b!="function")throw TypeError("Not a function");d(T,_,function(y,f){k(f)},b)})}),m})}}),xn=Ne({"node_modules/@plotly/d3/d3.js"(te,Z){(function(){var v={version:"3.8.2"},w=[].slice,C=function(Te){return w.call(Te)},P=self.document;function t(Te){return Te&&(Te.ownerDocument||Te.document||Te).documentElement}function r(Te){return Te&&(Te.ownerDocument&&Te.ownerDocument.defaultView||Te.document&&Te||Te.defaultView)}if(P)try{C(P.documentElement.childNodes)[0].nodeType}catch{C=function(He){for(var ft=He.length,Lt=new Array(ft);ft--;)Lt[ft]=He[ft];return Lt}}if(Date.now||(Date.now=function(){return+new Date}),P)try{P.createElement("DIV").style.setProperty("opacity",0,"")}catch{var a=this.Element.prototype,l=a.setAttribute,i=a.setAttributeNS,s=this.CSSStyleDeclaration.prototype,o=s.setProperty;a.setAttribute=function(He,ft){l.call(this,He,ft+"")},a.setAttributeNS=function(He,ft,Lt){i.call(this,He,ft,Lt+"")},s.setProperty=function(He,ft,Lt){o.call(this,He,ft+"",Lt)}}v.ascending=u;function u(Te,He){return Te<He?-1:Te>He?1:Te>=He?0:NaN}v.descending=function(Te,He){return He<Te?-1:He>Te?1:He>=Te?0:NaN},v.min=function(Te,He){var ft=-1,Lt=Te.length,Dt,qt;if(arguments.length===1){for(;++ft<Lt;)if((qt=Te[ft])!=null&&qt>=qt){Dt=qt;break}for(;++ft<Lt;)(qt=Te[ft])!=null&&Dt>qt&&(Dt=qt)}else{for(;++ft<Lt;)if((qt=He.call(Te,Te[ft],ft))!=null&&qt>=qt){Dt=qt;break}for(;++ft<Lt;)(qt=He.call(Te,Te[ft],ft))!=null&&Dt>qt&&(Dt=qt)}return Dt},v.max=function(Te,He){var ft=-1,Lt=Te.length,Dt,qt;if(arguments.length===1){for(;++ft<Lt;)if((qt=Te[ft])!=null&&qt>=qt){Dt=qt;break}for(;++ft<Lt;)(qt=Te[ft])!=null&&qt>Dt&&(Dt=qt)}else{for(;++ft<Lt;)if((qt=He.call(Te,Te[ft],ft))!=null&&qt>=qt){Dt=qt;break}for(;++ft<Lt;)(qt=He.call(Te,Te[ft],ft))!=null&&qt>Dt&&(Dt=qt)}return Dt},v.extent=function(Te,He){var ft=-1,Lt=Te.length,Dt,qt,dr;if(arguments.length===1){for(;++ft<Lt;)if((qt=Te[ft])!=null&&qt>=qt){Dt=dr=qt;break}for(;++ft<Lt;)(qt=Te[ft])!=null&&(Dt>qt&&(Dt=qt),dr<qt&&(dr=qt))}else{for(;++ft<Lt;)if((qt=He.call(Te,Te[ft],ft))!=null&&qt>=qt){Dt=dr=qt;break}for(;++ft<Lt;)(qt=He.call(Te,Te[ft],ft))!=null&&(Dt>qt&&(Dt=qt),dr<qt&&(dr=qt))}return[Dt,dr]};function d(Te){return Te===null?NaN:+Te}function h(Te){return!isNaN(Te)}v.sum=function(Te,He){var ft=0,Lt=Te.length,Dt,qt=-1;if(arguments.length===1)for(;++qt<Lt;)h(Dt=+Te[qt])&&(ft+=Dt);else for(;++qt<Lt;)h(Dt=+He.call(Te,Te[qt],qt))&&(ft+=Dt);return ft},v.mean=function(Te,He){var ft=0,Lt=Te.length,Dt,qt=-1,dr=Lt;if(arguments.length===1)for(;++qt<Lt;)h(Dt=d(Te[qt]))?ft+=Dt:--dr;else for(;++qt<Lt;)h(Dt=d(He.call(Te,Te[qt],qt)))?ft+=Dt:--dr;if(dr)return ft/dr},v.quantile=function(Te,He){var ft=(Te.length-1)*He+1,Lt=Math.floor(ft),Dt=+Te[Lt-1],qt=ft-Lt;return qt?Dt+qt*(Te[Lt]-Dt):Dt},v.median=function(Te,He){var ft=[],Lt=Te.length,Dt,qt=-1;if(arguments.length===1)for(;++qt<Lt;)h(Dt=d(Te[qt]))&&ft.push(Dt);else for(;++qt<Lt;)h(Dt=d(He.call(Te,Te[qt],qt)))&&ft.push(Dt);if(ft.length)return v.quantile(ft.sort(u),.5)},v.variance=function(Te,He){var ft=Te.length,Lt=0,Dt,qt,dr=0,hr=-1,Pr=0;if(arguments.length===1)for(;++hr<ft;)h(Dt=d(Te[hr]))&&(qt=Dt-Lt,Lt+=qt/++Pr,dr+=qt*(Dt-Lt));else for(;++hr<ft;)h(Dt=d(He.call(Te,Te[hr],hr)))&&(qt=Dt-Lt,Lt+=qt/++Pr,dr+=qt*(Dt-Lt));if(Pr>1)return dr/(Pr-1)},v.deviation=function(){var Te=v.variance.apply(this,arguments);return Te&&Math.sqrt(Te)};function g(Te){return{left:function(He,ft,Lt,Dt){for(arguments.length<3&&(Lt=0),arguments.length<4&&(Dt=He.length);Lt<Dt;){var qt=Lt+Dt>>>1;Te(He[qt],ft)<0?Lt=qt+1:Dt=qt}return Lt},right:function(He,ft,Lt,Dt){for(arguments.length<3&&(Lt=0),arguments.length<4&&(Dt=He.length);Lt<Dt;){var qt=Lt+Dt>>>1;Te(He[qt],ft)>0?Dt=qt:Lt=qt+1}return Lt}}}var m=g(u);v.bisectLeft=m.left,v.bisect=v.bisectRight=m.right,v.bisector=function(Te){return g(Te.length===1?function(He,ft){return u(Te(He),ft)}:Te)},v.shuffle=function(Te,He,ft){(Lt=arguments.length)<3&&(ft=Te.length,Lt<2&&(He=0));for(var Lt=ft-He,Dt,qt;Lt;)qt=Math.random()*Lt--|0,Dt=Te[Lt+He],Te[Lt+He]=Te[qt+He],Te[qt+He]=Dt;return Te},v.permute=function(Te,He){for(var ft=He.length,Lt=new Array(ft);ft--;)Lt[ft]=Te[He[ft]];return Lt},v.pairs=function(Te){for(var He=0,ft=Te.length-1,Lt=Te[0],Dt=new Array(ft<0?0:ft);He<ft;)Dt[He]=[Lt,Lt=Te[++He]];return Dt},v.transpose=function(Te){if(!(qt=Te.length))return[];for(var He=-1,ft=v.min(Te,E),Lt=new Array(ft);++He<ft;)for(var Dt=-1,qt,dr=Lt[He]=new Array(qt);++Dt<qt;)dr[Dt]=Te[Dt][He];return Lt};function E(Te){return Te.length}v.zip=function(){return v.transpose(arguments)},v.keys=function(Te){var He=[];for(var ft in Te)He.push(ft);return He},v.values=function(Te){var He=[];for(var ft in Te)He.push(Te[ft]);return He},v.entries=function(Te){var He=[];for(var ft in Te)He.push({key:ft,value:Te[ft]});return He},v.merge=function(Te){for(var He=Te.length,ft,Lt=-1,Dt=0,qt,dr;++Lt<He;)Dt+=Te[Lt].length;for(qt=new Array(Dt);--He>=0;)for(dr=Te[He],ft=dr.length;--ft>=0;)qt[--Dt]=dr[ft];return qt};var c=Math.abs;v.range=function(Te,He,ft){if(arguments.length<3&&(ft=1,arguments.length<2&&(He=Te,Te=0)),(He-Te)/ft===1/0)throw new Error("infinite range");var Lt=[],Dt=_(c(ft)),qt=-1,dr;if(Te*=Dt,He*=Dt,ft*=Dt,ft<0)for(;(dr=Te+ft*++qt)>He;)Lt.push(dr/Dt);else for(;(dr=Te+ft*++qt)<He;)Lt.push(dr/Dt);return Lt};function _(Te){for(var He=1;Te*He%1;)He*=10;return He}function T(Te,He){for(var ft in He)Object.defineProperty(Te.prototype,ft,{value:He[ft],enumerable:!1})}v.map=function(Te,He){var ft=new M;if(Te instanceof M)Te.forEach(function(hr,Pr){ft.set(hr,Pr)});else if(Array.isArray(Te)){var Lt=-1,Dt=Te.length,qt;if(arguments.length===1)for(;++Lt<Dt;)ft.set(Lt,Te[Lt]);else for(;++Lt<Dt;)ft.set(He.call(Te,qt=Te[Lt],Lt),qt)}else for(var dr in Te)ft.set(dr,Te[dr]);return ft};function M(){this._=Object.create(null)}var k="__proto__",b="\0";T(M,{has:f,get:function(Te){return this._[A(Te)]},set:function(Te,He){return this._[A(Te)]=He},remove:p,keys:x,values:function(){var Te=[];for(var He in this._)Te.push(this._[He]);return Te},entries:function(){var Te=[];for(var He in this._)Te.push({key:y(He),value:this._[He]});return Te},size:N,empty:D,forEach:function(Te){for(var He in this._)Te.call(this,y(He),this._[He])}});function A(Te){return(Te+="")===k||Te[0]===b?b+Te:Te}function y(Te){return(Te+="")[0]===b?Te.slice(1):Te}function f(Te){return A(Te)in this._}function p(Te){return(Te=A(Te))in this._&&delete this._[Te]}function x(){var Te=[];for(var He in this._)Te.push(y(He));return Te}function N(){var Te=0;for(var He in this._)++Te;return Te}function D(){for(var Te in this._)return!1;return!0}v.nest=function(){var Te={},He=[],ft=[],Lt,Dt;function qt(hr,Pr,ln){if(ln>=He.length)return Dt?Dt.call(Te,Pr):Lt?Pr.sort(Lt):Pr;for(var on=-1,Mn=Pr.length,Un=He[ln++],Gn,Ja,Qn,ba=new M,Ca;++on<Mn;)(Ca=ba.get(Gn=Un(Ja=Pr[on])))?Ca.push(Ja):ba.set(Gn,[Ja]);return hr?(Ja=hr(),Qn=function(Xa,ei){Ja.set(Xa,qt(hr,ei,ln))}):(Ja={},Qn=function(Xa,ei){Ja[Xa]=qt(hr,ei,ln)}),ba.forEach(Qn),Ja}function dr(hr,Pr){if(Pr>=He.length)return hr;var ln=[],on=ft[Pr++];return hr.forEach(function(Mn,Un){ln.push({key:Mn,values:dr(Un,Pr)})}),on?ln.sort(function(Mn,Un){return on(Mn.key,Un.key)}):ln}return Te.map=function(hr,Pr){return qt(Pr,hr,0)},Te.entries=function(hr){return dr(qt(v.map,hr,0),0)},Te.key=function(hr){return He.push(hr),Te},Te.sortKeys=function(hr){return ft[He.length-1]=hr,Te},Te.sortValues=function(hr){return Lt=hr,Te},Te.rollup=function(hr){return Dt=hr,Te},Te},v.set=function(Te){var He=new B;if(Te)for(var ft=0,Lt=Te.length;ft<Lt;++ft)He.add(Te[ft]);return He};function B(){this._=Object.create(null)}T(B,{has:f,add:function(Te){return this._[A(Te+="")]=!0,Te},remove:p,values:x,size:N,empty:D,forEach:function(Te){for(var He in this._)Te.call(this,y(He))}}),v.behavior={};function U(Te){return Te}v.rebind=function(Te,He){for(var ft=1,Lt=arguments.length,Dt;++ft<Lt;)Te[Dt=arguments[ft]]=V(Te,He,He[Dt]);return Te};function V(Te,He,ft){return function(){var Lt=ft.apply(He,arguments);return Lt===He?Te:Lt}}function q(Te,He){if(He in Te)return He;He=He.charAt(0).toUpperCase()+He.slice(1);for(var ft=0,Lt=z.length;ft<Lt;++ft){var Dt=z[ft]+He;if(Dt in Te)return Dt}}var z=["webkit","ms","moz","Moz","o","O"];function H(){}v.dispatch=function(){for(var Te=new G,He=-1,ft=arguments.length;++He<ft;)Te[arguments[He]]=J(Te);return Te};function G(){}G.prototype.on=function(Te,He){var ft=Te.indexOf("."),Lt="";if(ft>=0&&(Lt=Te.slice(ft+1),Te=Te.slice(0,ft)),Te)return arguments.length<2?this[Te].on(Lt):this[Te].on(Lt,He);if(arguments.length===2){if(He==null)for(Te in this)this.hasOwnProperty(Te)&&this[Te].on(Lt,null);return this}};function J(Te){var He=[],ft=new M;function Lt(){for(var Dt=He,qt=-1,dr=Dt.length,hr;++qt<dr;)(hr=Dt[qt].on)&&hr.apply(this,arguments);return Te}return Lt.on=function(Dt,qt){var dr=ft.get(Dt),hr;return arguments.length<2?dr&&dr.on:(dr&&(dr.on=null,He=He.slice(0,hr=He.indexOf(dr)).concat(He.slice(hr+1)),ft.remove(Dt)),qt&&He.push(ft.set(Dt,{on:qt})),Te)},Lt}v.event=null;function le(){v.event.preventDefault()}function ge(){for(var Te=v.event,He;He=Te.sourceEvent;)Te=He;return Te}function de(Te){for(var He=new G,ft=0,Lt=arguments.length;++ft<Lt;)He[arguments[ft]]=J(He);return He.of=function(Dt,qt){return function(dr){try{var hr=dr.sourceEvent=v.event;dr.target=Te,v.event=dr,He[dr.type].apply(Dt,qt)}finally{v.event=hr}}},He}v.requote=function(Te){return Te.replace(me,"\\$&")};var me=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,W={}.__proto__?function(Te,He){Te.__proto__=He}:function(Te,He){for(var ft in He)Te[ft]=He[ft]};function ie(Te){return W(Te,oe),Te}var se=function(Te,He){return He.querySelector(Te)},ee=function(Te,He){return He.querySelectorAll(Te)},pe=function(Te,He){var ft=Te.matches||Te[q(Te,"matchesSelector")];return pe=function(Lt,Dt){return ft.call(Lt,Dt)},pe(Te,He)};typeof Sizzle=="function"&&(se=function(Te,He){return Sizzle(Te,He)[0]||null},ee=Sizzle,pe=Sizzle.matchesSelector),v.selection=function(){return v.select(P.documentElement)};var oe=v.selection.prototype=[];oe.select=function(Te){var He=[],ft,Lt,Dt,qt;Te=Y(Te);for(var dr=-1,hr=this.length;++dr<hr;){He.push(ft=[]),ft.parentNode=(Dt=this[dr]).parentNode;for(var Pr=-1,ln=Dt.length;++Pr<ln;)(qt=Dt[Pr])?(ft.push(Lt=Te.call(qt,qt.__data__,Pr,dr)),Lt&&"__data__"in qt&&(Lt.__data__=qt.__data__)):ft.push(null)}return ie(He)};function Y(Te){return typeof Te=="function"?Te:function(){return se(Te,this)}}oe.selectAll=function(Te){var He=[],ft,Lt;Te=ce(Te);for(var Dt=-1,qt=this.length;++Dt<qt;)for(var dr=this[Dt],hr=-1,Pr=dr.length;++hr<Pr;)(Lt=dr[hr])&&(He.push(ft=C(Te.call(Lt,Lt.__data__,hr,Dt))),ft.parentNode=Lt);return ie(He)};function ce(Te){return typeof Te=="function"?Te:function(){return ee(Te,this)}}var ue="http://www.w3.org/1999/xhtml",_e={svg:"http://www.w3.org/2000/svg",xhtml:ue,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};v.ns={prefix:_e,qualify:function(Te){var He=Te.indexOf(":"),ft=Te;return He>=0&&(ft=Te.slice(0,He))!=="xmlns"&&(Te=Te.slice(He+1)),_e.hasOwnProperty(ft)?{space:_e[ft],local:Te}:Te}},oe.attr=function(Te,He){if(arguments.length<2){if(typeof Te=="string"){var ft=this.node();return Te=v.ns.qualify(Te),Te.local?ft.getAttributeNS(Te.space,Te.local):ft.getAttribute(Te)}for(He in Te)this.each(Le(He,Te[He]));return this}return this.each(Le(Te,He))};function Le(Te,He){Te=v.ns.qualify(Te);function ft(){this.removeAttribute(Te)}function Lt(){this.removeAttributeNS(Te.space,Te.local)}function Dt(){this.setAttribute(Te,He)}function qt(){this.setAttributeNS(Te.space,Te.local,He)}function dr(){var Pr=He.apply(this,arguments);Pr==null?this.removeAttribute(Te):this.setAttribute(Te,Pr)}function hr(){var Pr=He.apply(this,arguments);Pr==null?this.removeAttributeNS(Te.space,Te.local):this.setAttributeNS(Te.space,Te.local,Pr)}return He==null?Te.local?Lt:ft:typeof He=="function"?Te.local?hr:dr:Te.local?qt:Dt}function ze(Te){return Te.trim().replace(/\s+/g," ")}oe.classed=function(Te,He){if(arguments.length<2){if(typeof Te=="string"){var ft=this.node(),Lt=(Te=Ve(Te)).length,Dt=-1;if(He=ft.classList){for(;++Dt<Lt;)if(!He.contains(Te[Dt]))return!1}else for(He=ft.getAttribute("class");++Dt<Lt;)if(!Xe(Te[Dt]).test(He))return!1;return!0}for(He in Te)this.each(rt(He,Te[He]));return this}return this.each(rt(Te,He))};function Xe(Te){return new RegExp("(?:^|\\s+)"+v.requote(Te)+"(?:\\s+|$)","g")}function Ve(Te){return(Te+"").trim().split(/^|\s+/)}function rt(Te,He){Te=Ve(Te).map(mt);var ft=Te.length;function Lt(){for(var qt=-1;++qt<ft;)Te[qt](this,He)}function Dt(){for(var qt=-1,dr=He.apply(this,arguments);++qt<ft;)Te[qt](this,dr)}return typeof He=="function"?Dt:Lt}function mt(Te){var He=Xe(Te);return function(ft,Lt){if(Dt=ft.classList)return Lt?Dt.add(Te):Dt.remove(Te);var Dt=ft.getAttribute("class")||"";Lt?(He.lastIndex=0,He.test(Dt)||ft.setAttribute("class",ze(Dt+" "+Te))):ft.setAttribute("class",ze(Dt.replace(He," ")))}}oe.style=function(Te,He,ft){var Lt=arguments.length;if(Lt<3){if(typeof Te!="string"){Lt<2&&(He="");for(ft in Te)this.each(_t(ft,Te[ft],He));return this}if(Lt<2){var Dt=this.node();return r(Dt).getComputedStyle(Dt,null).getPropertyValue(Te)}ft=""}return this.each(_t(Te,He,ft))};function _t(Te,He,ft){function Lt(){this.style.removeProperty(Te)}function Dt(){this.style.setProperty(Te,He,ft)}function qt(){var dr=He.apply(this,arguments);dr==null?this.style.removeProperty(Te):this.style.setProperty(Te,dr,ft)}return He==null?Lt:typeof He=="function"?qt:Dt}oe.property=function(Te,He){if(arguments.length<2){if(typeof Te=="string")return this.node()[Te];for(He in Te)this.each(vt(He,Te[He]));return this}return this.each(vt(Te,He))};function vt(Te,He){function ft(){delete this[Te]}function Lt(){this[Te]=He}function Dt(){var qt=He.apply(this,arguments);qt==null?delete this[Te]:this[Te]=qt}return He==null?ft:typeof He=="function"?Dt:Lt}oe.text=function(Te){return arguments.length?this.each(typeof Te=="function"?function(){var He=Te.apply(this,arguments);this.textContent=He??""}:Te==null?function(){this.textContent=""}:function(){this.textContent=Te}):this.node().textContent},oe.html=function(Te){return arguments.length?this.each(typeof Te=="function"?function(){var He=Te.apply(this,arguments);this.innerHTML=He??""}:Te==null?function(){this.innerHTML=""}:function(){this.innerHTML=Te}):this.node().innerHTML},oe.append=function(Te){return Te=ut(Te),this.select(function(){return this.appendChild(Te.apply(this,arguments))})};function ut(Te){function He(){var Lt=this.ownerDocument,Dt=this.namespaceURI;return Dt===ue&&Lt.documentElement.namespaceURI===ue?Lt.createElement(Te):Lt.createElementNS(Dt,Te)}function ft(){return this.ownerDocument.createElementNS(Te.space,Te.local)}return typeof Te=="function"?Te:(Te=v.ns.qualify(Te)).local?ft:He}oe.insert=function(Te,He){return Te=ut(Te),He=Y(He),this.select(function(){return this.insertBefore(Te.apply(this,arguments),He.apply(this,arguments)||null)})},oe.remove=function(){return this.each(Fe)};function Fe(){var Te=this.parentNode;Te&&Te.removeChild(this)}oe.data=function(Te,He){var ft=-1,Lt=this.length,Dt,qt;if(!arguments.length){for(Te=new Array(Lt=(Dt=this[0]).length);++ft<Lt;)(qt=Dt[ft])&&(Te[ft]=qt.__data__);return Te}function dr(on,Mn){var Un,Gn=on.length,Ja=Mn.length,Qn=Math.min(Gn,Ja),ba=new Array(Ja),Ca=new Array(Ja),Xa=new Array(Gn),ei,Ma;if(He){var Ci=new M,po=new Array(Gn),ro;for(Un=-1;++Un<Gn;)(ei=on[Un])&&(Ci.has(ro=He.call(ei,ei.__data__,Un))?Xa[Un]=ei:Ci.set(ro,ei),po[Un]=ro);for(Un=-1;++Un<Ja;)(ei=Ci.get(ro=He.call(Mn,Ma=Mn[Un],Un)))?ei!==!0&&(ba[Un]=ei,ei.__data__=Ma):Ca[Un]=Pe(Ma),Ci.set(ro,!0);for(Un=-1;++Un<Gn;)Un in po&&Ci.get(po[Un])!==!0&&(Xa[Un]=on[Un])}else{for(Un=-1;++Un<Qn;)ei=on[Un],Ma=Mn[Un],ei?(ei.__data__=Ma,ba[Un]=ei):Ca[Un]=Pe(Ma);for(;Un<Ja;++Un)Ca[Un]=Pe(Mn[Un]);for(;Un<Gn;++Un)Xa[Un]=on[Un]}Ca.update=ba,Ca.parentNode=ba.parentNode=Xa.parentNode=on.parentNode,hr.push(Ca),Pr.push(ba),ln.push(Xa)}var hr=wt([]),Pr=ie([]),ln=ie([]);if(typeof Te=="function")for(;++ft<Lt;)dr(Dt=this[ft],Te.call(Dt,Dt.parentNode.__data__,ft));else for(;++ft<Lt;)dr(Dt=this[ft],Te);return Pr.enter=function(){return hr},Pr.exit=function(){return ln},Pr};function Pe(Te){return{__data__:Te}}oe.datum=function(Te){return arguments.length?this.property("__data__",Te):this.property("__data__")},oe.filter=function(Te){var He=[],ft,Lt,Dt;typeof Te!="function"&&(Te=be(Te));for(var qt=0,dr=this.length;qt<dr;qt++){He.push(ft=[]),ft.parentNode=(Lt=this[qt]).parentNode;for(var hr=0,Pr=Lt.length;hr<Pr;hr++)(Dt=Lt[hr])&&Te.call(Dt,Dt.__data__,hr,qt)&&ft.push(Dt)}return ie(He)};function be(Te){return function(){return pe(this,Te)}}oe.order=function(){for(var Te=-1,He=this.length;++Te<He;)for(var ft=this[Te],Lt=ft.length-1,Dt=ft[Lt],qt;--Lt>=0;)(qt=ft[Lt])&&(Dt&&Dt!==qt.nextSibling&&Dt.parentNode.insertBefore(qt,Dt),Dt=qt);return this},oe.sort=function(Te){Te=Ye.apply(this,arguments);for(var He=-1,ft=this.length;++He<ft;)this[He].sort(Te);return this.order()};function Ye(Te){return arguments.length||(Te=u),function(He,ft){return He&&ft?Te(He.__data__,ft.__data__):!He-!ft}}oe.each=function(Te){return yt(this,function(He,ft,Lt){Te.call(He,He.__data__,ft,Lt)})};function yt(Te,He){for(var ft=0,Lt=Te.length;ft<Lt;ft++)for(var Dt=Te[ft],qt=0,dr=Dt.length,hr;qt<dr;qt++)(hr=Dt[qt])&&He(hr,qt,ft);return Te}oe.call=function(Te){var He=C(arguments);return Te.apply(He[0]=this,He),this},oe.empty=function(){return!this.node()},oe.node=function(){for(var Te=0,He=this.length;Te<He;Te++)for(var ft=this[Te],Lt=0,Dt=ft.length;Lt<Dt;Lt++){var qt=ft[Lt];if(qt)return qt}return null},oe.size=function(){var Te=0;return yt(this,function(){++Te}),Te};function wt(Te){return W(Te,ht),Te}var ht=[];v.selection.enter=wt,v.selection.enter.prototype=ht,ht.append=oe.append,ht.empty=oe.empty,ht.node=oe.node,ht.call=oe.call,ht.size=oe.size,ht.select=function(Te){for(var He=[],ft,Lt,Dt,qt,dr,hr=-1,Pr=this.length;++hr<Pr;){Dt=(qt=this[hr]).update,He.push(ft=[]),ft.parentNode=qt.parentNode;for(var ln=-1,on=qt.length;++ln<on;)(dr=qt[ln])?(ft.push(Dt[ln]=Lt=Te.call(qt.parentNode,dr.__data__,ln,hr)),Lt.__data__=dr.__data__):ft.push(null)}return ie(He)},ht.insert=function(Te,He){return arguments.length<2&&(He=Yt(this)),oe.insert.call(this,Te,He)};function Yt(Te){var He,ft;return function(Lt,Dt,qt){var dr=Te[qt].update,hr=dr.length,Pr;for(qt!=ft&&(ft=qt,He=0),Dt>=He&&(He=Dt+1);!(Pr=dr[He])&&++He<hr;);return Pr}}v.select=function(Te){var He;return typeof Te=="string"?(He=[se(Te,P)],He.parentNode=P.documentElement):(He=[Te],He.parentNode=t(Te)),ie([He])},v.selectAll=function(Te){var He;return typeof Te=="string"?(He=C(ee(Te,P)),He.parentNode=P.documentElement):(He=C(Te),He.parentNode=null),ie([He])},oe.on=function(Te,He,ft){var Lt=arguments.length;if(Lt<3){if(typeof Te!="string"){Lt<2&&(He=!1);for(ft in Te)this.each($t(ft,Te[ft],He));return this}if(Lt<2)return(Lt=this.node()["__on"+Te])&&Lt._;ft=!1}return this.each($t(Te,He,ft))};function $t(Te,He,ft){var Lt="__on"+Te,Dt=Te.indexOf("."),qt=mr;Dt>0&&(Te=Te.slice(0,Dt));var dr=fr.get(Te);dr&&(Te=dr,qt=Ur);function hr(){var on=this[Lt];on&&(this.removeEventListener(Te,on,on.$),delete this[Lt])}function Pr(){var on=qt(He,C(arguments));hr.call(this),this.addEventListener(Te,this[Lt]=on,on.$=ft),on._=He}function ln(){var on=new RegExp("^__on([^.]+)"+v.requote(Te)+"$"),Mn;for(var Un in this)if(Mn=Un.match(on)){var Gn=this[Un];this.removeEventListener(Mn[1],Gn,Gn.$),delete this[Un]}}return Dt?He?Pr:hr:He?H:ln}var fr=v.map({mouseenter:"mouseover",mouseleave:"mouseout"});P&&fr.forEach(function(Te){"on"+Te in P&&fr.remove(Te)});function mr(Te,He){return function(ft){var Lt=v.event;v.event=ft,He[0]=this.__data__;try{Te.apply(this,He)}finally{v.event=Lt}}}function Ur(Te,He){var ft=mr(Te,He);return function(Lt){var Dt=this,qt=Lt.relatedTarget;(!qt||qt!==Dt&&!(qt.compareDocumentPosition(Dt)&8))&&ft.call(Dt,Lt)}}var jr,fn=0;function Br(Te){var He=".dragsuppress-"+ ++fn,ft="click"+He,Lt=v.select(r(Te)).on("touchmove"+He,le).on("dragstart"+He,le).on("selectstart"+He,le);if(jr==null&&(jr="onselectstart"in Te?!1:q(Te.style,"userSelect")),jr){var Dt=t(Te).style,qt=Dt[jr];Dt[jr]="none"}return function(dr){if(Lt.on(He,null),jr&&(Dt[jr]=qt),dr){var hr=function(){Lt.on(ft,null)};Lt.on(ft,function(){le(),hr()},!0),setTimeout(hr,0)}}}v.mouse=function(Te){return Ot(Te,ge())};var Qr=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function Ot(Te,He){He.changedTouches&&(He=He.changedTouches[0]);var ft=Te.ownerSVGElement||Te;if(ft.createSVGPoint){var Lt=ft.createSVGPoint();if(Qr<0){var Dt=r(Te);if(Dt.scrollX||Dt.scrollY){ft=v.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var qt=ft[0][0].getScreenCTM();Qr=!(qt.f||qt.e),ft.remove()}}return Qr?(Lt.x=He.pageX,Lt.y=He.pageY):(Lt.x=He.clientX,Lt.y=He.clientY),Lt=Lt.matrixTransform(Te.getScreenCTM().inverse()),[Lt.x,Lt.y]}var dr=Te.getBoundingClientRect();return[He.clientX-dr.left-Te.clientLeft,He.clientY-dr.top-Te.clientTop]}v.touch=function(Te,He,ft){if(arguments.length<3&&(ft=He,He=ge().changedTouches),He){for(var Lt=0,Dt=He.length,qt;Lt<Dt;++Lt)if((qt=He[Lt]).identifier===ft)return Ot(Te,qt)}},v.behavior.drag=function(){var Te=de(Dt,"drag","dragstart","dragend"),He=null,ft=qt(H,v.mouse,r,"mousemove","mouseup"),Lt=qt($e,v.touch,U,"touchmove","touchend");function Dt(){this.on("mousedown.drag",ft).on("touchstart.drag",Lt)}function qt(dr,hr,Pr,ln,on){return function(){var Mn=this,Un=v.event.target.correspondingElement||v.event.target,Gn=Mn.parentNode,Ja=Te.of(Mn,arguments),Qn=0,ba=dr(),Ca=".drag"+(ba==null?"":"-"+ba),Xa,ei=v.select(Pr(Un)).on(ln+Ca,po).on(on+Ca,ro),Ma=Br(Un),Ci=hr(Gn,ba);He?(Xa=He.apply(Mn,arguments),Xa=[Xa.x-Ci[0],Xa.y-Ci[1]]):Xa=[0,0],Ja({type:"dragstart"});function po(){var fo=hr(Gn,ba),Fo,Ho;fo&&(Fo=fo[0]-Ci[0],Ho=fo[1]-Ci[1],Qn|=Fo|Ho,Ci=fo,Ja({type:"drag",x:fo[0]+Xa[0],y:fo[1]+Xa[1],dx:Fo,dy:Ho}))}function ro(){hr(Gn,ba)&&(ei.on(ln+Ca,null).on(on+Ca,null),Ma(Qn),Ja({type:"dragend"}))}}}return Dt.origin=function(dr){return arguments.length?(He=dr,Dt):He},v.rebind(Dt,Te,"on")};function $e(){return v.event.changedTouches[0].identifier}v.touches=function(Te,He){return arguments.length<2&&(He=ge().touches),He?C(He).map(function(ft){var Lt=Ot(Te,ft);return Lt.identifier=ft.identifier,Lt}):[]};var ot=1e-6,De=ot*ot,Ee=Math.PI,Ae=2*Ee,Ie=Ae-ot,tt=Ee/2,st=Ee/180,Bt=180/Ee;function Ft(Te,He,ft){return(He[0]-Te[0])*(ft[1]-Te[1])-(He[1]-Te[1])*(ft[0]-Te[0])}function Wt(Te){return Te>1?tt:Te<-1?-tt:Math.asin(Te)}function lr(Te){return((Te=Math.exp(Te))-1/Te)/2}function Rr(Te){return((Te=Math.exp(Te))+1/Te)/2}function Mr(Te){return((Te=Math.exp(2*Te))-1)/(Te+1)}var Sr=Math.SQRT2,Kr=2,Hn=4;v.interpolateZoom=function(Te,He){var ft=Te[0],Lt=Te[1],Dt=Te[2],qt=He[0],dr=He[1],hr=He[2],Pr=qt-ft,ln=dr-Lt,on=Pr*Pr+ln*ln,Mn,Un;if(on<De)Un=Math.log(hr/Dt)/Sr,Mn=function(Xa){return[ft+Xa*Pr,Lt+Xa*ln,Dt*Math.exp(Sr*Xa*Un)]};else{var Gn=Math.sqrt(on),Ja=(hr*hr-Dt*Dt+Hn*on)/(2*Dt*Kr*Gn),Qn=(hr*hr-Dt*Dt-Hn*on)/(2*hr*Kr*Gn),ba=Math.log(Math.sqrt(Ja*Ja+1)-Ja),Ca=Math.log(Math.sqrt(Qn*Qn+1)-Qn);Un=(Ca-ba)/Sr,Mn=function(Xa){var ei=Xa*Un,Ma=Rr(ba),Ci=Dt/(Kr*Gn)*(Ma*Mr(Sr*ei+ba)-lr(ba));return[ft+Ci*Pr,Lt+Ci*ln,Dt*Ma/Rr(Sr*ei+ba)]}}return Mn.duration=Un*1e3,Mn},v.behavior.zoom=function(){var Te={x:0,y:0,k:1},He,ft,Lt,Dt=[960,500],qt=ga,dr=250,hr=0,Pr="mousedown.zoom",ln="mousemove.zoom",on="mouseup.zoom",Mn,Un="touchstart.zoom",Gn,Ja=de(ei,"zoomstart","zoom","zoomend"),Qn,ba,Ca,Xa;Ta||(Ta="onwheel"in P?(ua=function(){return-v.event.deltaY*(v.event.deltaMode?120:1)},"wheel"):"onmousewheel"in P?(ua=function(){return v.event.wheelDelta},"mousewheel"):(ua=function(){return-v.event.detail},"MozMousePixelScroll"));function ei(ko){ko.on(Pr,bs).on(Ta+".zoom",Gu).on("dblclick.zoom",fu).on(Un,dl)}ei.event=function(ko){ko.each(function(){var Vs=Ja.of(this,arguments),ul=Te;jo?v.select(this).transition().each("start.zoom",function(){Te=this.__chart__||{x:0,y:0,k:1},Ho(Vs)}).tween("zoom:zoom",function(){var ou=Dt[0],Yl=Dt[1],Dc=ft?ft[0]:ou/2,jl=ft?ft[1]:Yl/2,su=v.interpolateZoom([(Dc-Te.x)/Te.k,(jl-Te.y)/Te.k,ou/Te.k],[(Dc-ul.x)/ul.k,(jl-ul.y)/ul.k,ou/ul.k]);return function(lf){var Uu=su(lf),St=ou/Uu[2];this.__chart__=Te={x:Dc-Uu[0]*St,y:jl-Uu[1]*St,k:St},il(Vs)}}).each("interrupt.zoom",function(){Wo(Vs)}).each("end.zoom",function(){Wo(Vs)}):(this.__chart__=Te,Ho(Vs),il(Vs),Wo(Vs))})},ei.translate=function(ko){return arguments.length?(Te={x:+ko[0],y:+ko[1],k:Te.k},Fo(),ei):[Te.x,Te.y]},ei.scale=function(ko){return arguments.length?(Te={x:Te.x,y:Te.y,k:null},po(+ko),Fo(),ei):Te.k},ei.scaleExtent=function(ko){return arguments.length?(qt=ko==null?ga:[+ko[0],+ko[1]],ei):qt},ei.center=function(ko){return arguments.length?(Lt=ko&&[+ko[0],+ko[1]],ei):Lt},ei.size=function(ko){return arguments.length?(Dt=ko&&[+ko[0],+ko[1]],ei):Dt},ei.duration=function(ko){return arguments.length?(dr=+ko,ei):dr},ei.x=function(ko){return arguments.length?(ba=ko,Qn=ko.copy(),Te={x:0,y:0,k:1},ei):ba},ei.y=function(ko){return arguments.length?(Xa=ko,Ca=ko.copy(),Te={x:0,y:0,k:1},ei):Xa};function Ma(ko){return[(ko[0]-Te.x)/Te.k,(ko[1]-Te.y)/Te.k]}function Ci(ko){return[ko[0]*Te.k+Te.x,ko[1]*Te.k+Te.y]}function po(ko){Te.k=Math.max(qt[0],Math.min(qt[1],ko))}function ro(ko,Vs){Vs=Ci(Vs),Te.x+=ko[0]-Vs[0],Te.y+=ko[1]-Vs[1]}function fo(ko,Vs,ul,ou){ko.__chart__={x:Te.x,y:Te.y,k:Te.k},po(Math.pow(2,ou)),ro(ft=Vs,ul),ko=v.select(ko),dr>0&&(ko=ko.transition().duration(dr)),ko.call(ei.event)}function Fo(){ba&&ba.domain(Qn.range().map(function(ko){return(ko-Te.x)/Te.k}).map(Qn.invert)),Xa&&Xa.domain(Ca.range().map(function(ko){return(ko-Te.y)/Te.k}).map(Ca.invert))}function Ho(ko){hr++||ko({type:"zoomstart"})}function il(ko){Fo(),ko({type:"zoom",scale:Te.k,translate:[Te.x,Te.y]})}function Wo(ko){--hr||(ko({type:"zoomend"}),ft=null)}function bs(){var ko=this,Vs=Ja.of(ko,arguments),ul=0,ou=v.select(r(ko)).on(ln,jl).on(on,su),Yl=Ma(v.mouse(ko)),Dc=Br(ko);Va.call(ko),Ho(Vs);function jl(){ul=1,ro(v.mouse(ko),Yl),il(Vs)}function su(){ou.on(ln,null).on(on,null),Dc(ul),Wo(Vs)}}function dl(){var ko=this,Vs=Ja.of(ko,arguments),ul={},ou=0,Yl,Dc=".zoom-"+v.event.changedTouches[0].identifier,jl="touchmove"+Dc,su="touchend"+Dc,lf=[],Uu=v.select(ko),St=Br(ko);Dr(),Ho(Vs),Uu.on(Pr,null).on(Un,Dr);function kr(){var Rn=v.touches(ko);return Yl=Te.k,Rn.forEach(function(Pn){Pn.identifier in ul&&(ul[Pn.identifier]=Ma(Pn))}),Rn}function Dr(){var Rn=v.event.target;v.select(Rn).on(jl,Xn).on(su,La),lf.push(Rn);for(var Pn=v.event.changedTouches,ni=0,ti=Pn.length;ni<ti;++ni)ul[Pn[ni].identifier]=null;var ri=kr(),gi=Date.now();if(ri.length===1){if(gi-Gn<500){var io=ri[0];fo(ko,io,ul[io.identifier],Math.floor(Math.log(Te.k)/Math.LN2)+1),le()}Gn=gi}else if(ri.length>1){var io=ri[0],qi=ri[1],di=io[0]-qi[0],Na=io[1]-qi[1];ou=di*di+Na*Na}}function Xn(){var Rn=v.touches(ko),Pn,ni,ti,ri;Va.call(ko);for(var gi=0,io=Rn.length;gi<io;++gi,ri=null)if(ti=Rn[gi],ri=ul[ti.identifier]){if(ni)break;Pn=ti,ni=ri}if(ri){var qi=(qi=ti[0]-Pn[0])*qi+(qi=ti[1]-Pn[1])*qi,di=ou&&Math.sqrt(qi/ou);Pn=[(Pn[0]+ti[0])/2,(Pn[1]+ti[1])/2],ni=[(ni[0]+ri[0])/2,(ni[1]+ri[1])/2],po(di*Yl)}Gn=null,ro(Pn,ni),il(Vs)}function La(){if(v.event.touches.length){for(var Rn=v.event.changedTouches,Pn=0,ni=Rn.length;Pn<ni;++Pn)delete ul[Rn[Pn].identifier];for(var ti in ul)return void kr()}v.selectAll(lf).on(Dc,null),Uu.on(Pr,bs).on(Un,dl),St(),Wo(Vs)}}function Gu(){var ko=Ja.of(this,arguments);Mn?clearTimeout(Mn):(Va.call(this),He=Ma(ft=Lt||v.mouse(this)),Ho(ko)),Mn=setTimeout(function(){Mn=null,Wo(ko)},50),le(),po(Math.pow(2,ua()*.002)*Te.k),ro(ft,He),il(ko)}function fu(){var ko=v.mouse(this),Vs=Math.log(Te.k)/Math.LN2;fo(this,ko,Ma(ko),v.event.shiftKey?Math.ceil(Vs)-1:Math.floor(Vs)+1)}return v.rebind(ei,Ja,"on")};var ga=[0,1/0],ua,Ta;v.color=Aa;function Aa(){}Aa.prototype.toString=function(){return this.rgb()+""},v.hsl=ia;function ia(Te,He,ft){return this instanceof ia?(this.h=+Te,this.s=+He,void(this.l=+ft)):arguments.length<2?Te instanceof ia?new ia(Te.h,Te.s,Te.l):en(""+Te,rn,ia):new ia(Te,He,ft)}var $a=ia.prototype=new Aa;$a.brighter=function(Te){return Te=Math.pow(.7,arguments.length?Te:1),new ia(this.h,this.s,this.l/Te)},$a.darker=function(Te){return Te=Math.pow(.7,arguments.length?Te:1),new ia(this.h,this.s,Te*this.l)},$a.rgb=function(){return ci(this.h,this.s,this.l)};function ci(Te,He,ft){var Lt,Dt;Te=isNaN(Te)?0:(Te%=360)<0?Te+360:Te,He=isNaN(He)||He<0?0:He>1?1:He,ft=ft<0?0:ft>1?1:ft,Dt=ft<=.5?ft*(1+He):ft+He-ft*He,Lt=2*ft-Dt;function qt(hr){return hr>360?hr-=360:hr<0&&(hr+=360),hr<60?Lt+(Dt-Lt)*hr/60:hr<180?Dt:hr<240?Lt+(Dt-Lt)*(240-hr)/60:Lt}function dr(hr){return Math.round(qt(hr)*255)}return new Bi(dr(Te+120),dr(Te),dr(Te-120))}v.hcl=_r;function _r(Te,He,ft){return this instanceof _r?(this.h=+Te,this.c=+He,void(this.l=+ft)):arguments.length<2?Te instanceof _r?new _r(Te.h,Te.c,Te.l):Te instanceof br?Ia(Te.l,Te.a,Te.b):Ia((Te=Wr((Te=v.rgb(Te)).r,Te.g,Te.b)).l,Te.a,Te.b):new _r(Te,He,ft)}var Qt=_r.prototype=new Aa;Qt.brighter=function(Te){return new _r(this.h,this.c,Math.min(100,this.l+an*(arguments.length?Te:1)))},Qt.darker=function(Te){return new _r(this.h,this.c,Math.max(0,this.l-an*(arguments.length?Te:1)))},Qt.rgb=function(){return yr(this.h,this.c,this.l).rgb()};function yr(Te,He,ft){return isNaN(Te)&&(Te=0),isNaN(He)&&(He=0),new br(ft,Math.cos(Te*=st)*He,Math.sin(Te)*He)}v.lab=br;function br(Te,He,ft){return this instanceof br?(this.l=+Te,this.a=+He,void(this.b=+ft)):arguments.length<2?Te instanceof br?new br(Te.l,Te.a,Te.b):Te instanceof _r?yr(Te.h,Te.c,Te.l):Wr((Te=Bi(Te)).r,Te.g,Te.b):new br(Te,He,ft)}var an=18,wn=.95047,Ln=1,Bn=1.08883,xa=br.prototype=new Aa;xa.brighter=function(Te){return new br(Math.min(100,this.l+an*(arguments.length?Te:1)),this.a,this.b)},xa.darker=function(Te){return new br(Math.max(0,this.l-an*(arguments.length?Te:1)),this.a,this.b)},xa.rgb=function(){return za(this.l,this.a,this.b)};function za(Te,He,ft){var Lt=(Te+16)/116,Dt=Lt+He/500,qt=Lt-ft/200;return Dt=Ba(Dt)*wn,Lt=Ba(Lt)*Ln,qt=Ba(qt)*Bn,new Bi(fa(3.2404542*Dt-1.5371385*Lt-.4985314*qt),fa(-.969266*Dt+1.8760108*Lt+.041556*qt),fa(.0556434*Dt-.2040259*Lt+1.0572252*qt))}function Ia(Te,He,ft){return Te>0?new _r(Math.atan2(ft,He)*Bt,Math.sqrt(He*He+ft*ft),Te):new _r(NaN,NaN,Te)}function Ba(Te){return Te>.206893034?Te*Te*Te:(Te-4/29)/7.787037}function Ka(Te){return Te>.008856?Math.pow(Te,1/3):7.787037*Te+4/29}function fa(Te){return Math.round(255*(Te<=.00304?12.92*Te:1.055*Math.pow(Te,1/2.4)-.055))}v.rgb=Bi;function Bi(Te,He,ft){return this instanceof Bi?(this.r=~~Te,this.g=~~He,void(this.b=~~ft)):arguments.length<2?Te instanceof Bi?new Bi(Te.r,Te.g,Te.b):en(""+Te,Bi,ci):new Bi(Te,He,ft)}function Yi(Te){return new Bi(Te>>16,Te>>8&255,Te&255)}function Ht(Te){return Yi(Te)+""}var kt=Bi.prototype=new Aa;kt.brighter=function(Te){Te=Math.pow(.7,arguments.length?Te:1);var He=this.r,ft=this.g,Lt=this.b,Dt=30;return!He&&!ft&&!Lt?new Bi(Dt,Dt,Dt):(He&&He<Dt&&(He=Dt),ft&&ft<Dt&&(ft=Dt),Lt&&Lt<Dt&&(Lt=Dt),new Bi(Math.min(255,He/Te),Math.min(255,ft/Te),Math.min(255,Lt/Te)))},kt.darker=function(Te){return Te=Math.pow(.7,arguments.length?Te:1),new Bi(Te*this.r,Te*this.g,Te*this.b)},kt.hsl=function(){return rn(this.r,this.g,this.b)},kt.toString=function(){return"#"+qr(this.r)+qr(this.g)+qr(this.b)};function qr(Te){return Te<16?"0"+Math.max(0,Te).toString(16):Math.min(255,Te).toString(16)}function en(Te,He,ft){var Lt=0,Dt=0,qt=0,dr,hr,Pr;if(dr=/([a-z]+)\((.*)\)/.exec(Te=Te.toLowerCase()),dr)switch(hr=dr[2].split(","),dr[1]){case"hsl":return ft(parseFloat(hr[0]),parseFloat(hr[1])/100,parseFloat(hr[2])/100);case"rgb":return He(Tn(hr[0]),Tn(hr[1]),Tn(hr[2]))}return(Pr=dn.get(Te))?He(Pr.r,Pr.g,Pr.b):(Te!=null&&Te.charAt(0)==="#"&&!isNaN(Pr=parseInt(Te.slice(1),16))&&(Te.length===4?(Lt=(Pr&3840)>>4,Lt=Lt>>4|Lt,Dt=Pr&240,Dt=Dt>>4|Dt,qt=Pr&15,qt=qt<<4|qt):Te.length===7&&(Lt=(Pr&16711680)>>16,Dt=(Pr&65280)>>8,qt=Pr&255)),He(Lt,Dt,qt))}function rn(Te,He,ft){var Lt=Math.min(Te/=255,He/=255,ft/=255),Dt=Math.max(Te,He,ft),qt=Dt-Lt,dr,hr,Pr=(Dt+Lt)/2;return qt?(hr=Pr<.5?qt/(Dt+Lt):qt/(2-Dt-Lt),Te==Dt?dr=(He-ft)/qt+(He<ft?6:0):He==Dt?dr=(ft-Te)/qt+2:dr=(Te-He)/qt+4,dr*=60):(dr=NaN,hr=Pr>0&&Pr<1?0:dr),new ia(dr,hr,Pr)}function Wr(Te,He,ft){Te=tn(Te),He=tn(He),ft=tn(ft);var Lt=Ka((.4124564*Te+.3575761*He+.1804375*ft)/wn),Dt=Ka((.2126729*Te+.7151522*He+.072175*ft)/Ln),qt=Ka((.0193339*Te+.119192*He+.9503041*ft)/Bn);return br(116*Dt-16,500*(Lt-Dt),200*(Dt-qt))}function tn(Te){return(Te/=255)<=.04045?Te/12.92:Math.pow((Te+.055)/1.055,2.4)}function Tn(Te){var He=parseFloat(Te);return Te.charAt(Te.length-1)==="%"?Math.round(He*2.55):He}var dn=v.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});dn.forEach(function(Te,He){dn.set(Te,Yi(He))});function It(Te){return typeof Te=="function"?Te:function(){return Te}}v.functor=It,v.xhr=xr(U);function xr(Te){return function(He,ft,Lt){return arguments.length===2&&typeof ft=="function"&&(Lt=ft,ft=null),Yr(He,ft,Te,Lt)}}function Yr(Te,He,ft,Lt){var Dt={},qt=v.dispatch("beforesend","progress","load","error"),dr={},hr=new XMLHttpRequest,Pr=null;self.XDomainRequest&&!("withCredentials"in hr)&&/^(http(s)?:)?\/\//.test(Te)&&(hr=new XDomainRequest),"onload"in hr?hr.onload=hr.onerror=ln:hr.onreadystatechange=function(){hr.readyState>3&&ln()};function ln(){var on=hr.status,Mn;if(!on&&Zn(hr)||on>=200&&on<300||on===304){try{Mn=ft.call(Dt,hr)}catch(Un){qt.error.call(Dt,Un);return}qt.load.call(Dt,Mn)}else qt.error.call(Dt,hr)}return hr.onprogress=function(on){var Mn=v.event;v.event=on;try{qt.progress.call(Dt,hr)}finally{v.event=Mn}},Dt.header=function(on,Mn){return on=(on+"").toLowerCase(),arguments.length<2?dr[on]:(Mn==null?delete dr[on]:dr[on]=Mn+"",Dt)},Dt.mimeType=function(on){return arguments.length?(He=on==null?null:on+"",Dt):He},Dt.responseType=function(on){return arguments.length?(Pr=on,Dt):Pr},Dt.response=function(on){return ft=on,Dt},["get","post"].forEach(function(on){Dt[on]=function(){return Dt.send.apply(Dt,[on].concat(C(arguments)))}}),Dt.send=function(on,Mn,Un){if(arguments.length===2&&typeof Mn=="function"&&(Un=Mn,Mn=null),hr.open(on,Te,!0),He!=null&&!("accept"in dr)&&(dr.accept=He+",*/*"),hr.setRequestHeader)for(var Gn in dr)hr.setRequestHeader(Gn,dr[Gn]);return He!=null&&hr.overrideMimeType&&hr.overrideMimeType(He),Pr!=null&&(hr.responseType=Pr),Un!=null&&Dt.on("error",Un).on("load",function(Ja){Un(null,Ja)}),qt.beforesend.call(Dt,hr),hr.send(Mn??null),Dt},Dt.abort=function(){return hr.abort(),Dt},v.rebind(Dt,qt,"on"),Lt==null?Dt:Dt.get(An(Lt))}function An(Te){return Te.length===1?function(He,ft){Te(He==null?ft:null)}:Te}function Zn(Te){var He=Te.responseType;return He&&He!=="text"?Te.response:Te.responseText}v.dsv=function(Te,He){var ft=new RegExp('["'+Te+`
]`),Lt=Te.charCodeAt(0);function Dt(ln,on,Mn){arguments.length<3&&(Mn=on,on=null);var Un=Yr(ln,He,on==null?qt:dr(on),Mn);return Un.row=function(Gn){return arguments.length?Un.response((on=Gn)==null?qt:dr(Gn)):on},Un}function qt(ln){return Dt.parse(ln.responseText)}function dr(ln){return function(on){return Dt.parse(on.responseText,ln)}}Dt.parse=function(ln,on){var Mn;return Dt.parseRows(ln,function(Un,Gn){if(Mn)return Mn(Un,Gn-1);var Ja=function(Qn){for(var ba={},Ca=Un.length,Xa=0;Xa<Ca;++Xa)ba[Un[Xa]]=Qn[Xa];return ba};Mn=on?function(Qn,ba){return on(Ja(Qn),ba)}:Ja})},Dt.parseRows=function(ln,on){var Mn={},Un={},Gn=[],Ja=ln.length,Qn=0,ba=0,Ca,Xa;function ei(){if(Qn>=Ja)return Un;if(Xa)return Xa=!1,Mn;var Ci=Qn;if(ln.charCodeAt(Ci)===34){for(var po=Ci;po++<Ja;)if(ln.charCodeAt(po)===34){if(ln.charCodeAt(po+1)!==34)break;++po}Qn=po+2;var ro=ln.charCodeAt(po+1);return ro===13?(Xa=!0,ln.charCodeAt(po+2)===10&&++Qn):ro===10&&(Xa=!0),ln.slice(Ci+1,po).replace(/""/g,'"')}for(;Qn<Ja;){var ro=ln.charCodeAt(Qn++),fo=1;if(ro===10)Xa=!0;else if(ro===13)Xa=!0,ln.charCodeAt(Qn)===10&&(++Qn,++fo);else if(ro!==Lt)continue;return ln.slice(Ci,Qn-fo)}return ln.slice(Ci)}for(;(Ca=ei())!==Un;){for(var Ma=[];Ca!==Mn&&Ca!==Un;)Ma.push(Ca),Ca=ei();on&&(Ma=on(Ma,ba++))==null||Gn.push(Ma)}return Gn},Dt.format=function(ln){if(Array.isArray(ln[0]))return Dt.formatRows(ln);var on=new B,Mn=[];return ln.forEach(function(Un){for(var Gn in Un)on.has(Gn)||Mn.push(on.add(Gn))}),[Mn.map(Pr).join(Te)].concat(ln.map(function(Un){return Mn.map(function(Gn){return Pr(Un[Gn])}).join(Te)})).join(`
`)},Dt.formatRows=function(ln){return ln.map(hr).join(`
`)};function hr(ln){return ln.map(Pr).join(Te)}function Pr(ln){return ft.test(ln)?'"'+ln.replace(/\"/g,'""')+'"':ln}return Dt},v.csv=v.dsv(",","text/csv"),v.tsv=v.dsv("	","text/tab-separated-values");var sa,oa,Sn,Kn,Ui=this[q(this,"requestAnimationFrame")]||function(Te){setTimeout(Te,17)};v.timer=function(){Za.apply(this,arguments)};function Za(Te,He,ft){var Lt=arguments.length;Lt<2&&(He=0),Lt<3&&(ft=Date.now());var Dt=ft+He,qt={c:Te,t:Dt,n:null};return oa?oa.n=qt:sa=qt,oa=qt,Sn||(Kn=clearTimeout(Kn),Sn=1,Ui(Ki)),qt}function Ki(){var Te=ho(),He=Co()-Te;He>24?(isFinite(He)&&(clearTimeout(Kn),Kn=setTimeout(Ki,He)),Sn=0):(Sn=1,Ui(Ki))}v.timer.flush=function(){ho(),Co()};function ho(){for(var Te=Date.now(),He=sa;He;)Te>=He.t&&He.c(Te-He.t)&&(He.c=null),He=He.n;return Te}function Co(){for(var Te,He=sa,ft=1/0;He;)He.c?(He.t<ft&&(ft=He.t),He=(Te=He).n):He=Te?Te.n=He.n:sa=He.n;return oa=Te,ft}v.round=function(Te,He){return He?Math.round(Te*(He=Math.pow(10,He)))/He:Math.round(Te)},v.geom={};function So(Te){return Te[0]}function Vo(Te){return Te[1]}v.geom.hull=function(Te){var He=So,ft=Vo;if(arguments.length)return Lt(Te);function Lt(Dt){if(Dt.length<3)return[];var qt=It(He),dr=It(ft),hr,Pr=Dt.length,ln=[],on=[];for(hr=0;hr<Pr;hr++)ln.push([+qt.call(this,Dt[hr],hr),+dr.call(this,Dt[hr],hr),hr]);for(ln.sort(ps),hr=0;hr<Pr;hr++)on.push([ln[hr][0],-ln[hr][1]]);var Mn=Oi(ln),Un=Oi(on),Gn=Un[0]===Mn[0],Ja=Un[Un.length-1]===Mn[Mn.length-1],Qn=[];for(hr=Mn.length-1;hr>=0;--hr)Qn.push(Dt[ln[Mn[hr]][2]]);for(hr=+Gn;hr<Un.length-Ja;++hr)Qn.push(Dt[ln[Un[hr]][2]]);return Qn}return Lt.x=function(Dt){return arguments.length?(He=Dt,Lt):He},Lt.y=function(Dt){return arguments.length?(ft=Dt,Lt):ft},Lt};function Oi(Te){for(var He=Te.length,ft=[0,1],Lt=2,Dt=2;Dt<He;Dt++){for(;Lt>1&&Ft(Te[ft[Lt-2]],Te[ft[Lt-1]],Te[Dt])<=0;)--Lt;ft[Lt++]=Dt}return ft.slice(0,Lt)}function ps(Te,He){return Te[0]-He[0]||Te[1]-He[1]}v.geom.polygon=function(Te){return W(Te,as),Te};var as=v.geom.polygon.prototype=[];as.area=function(){for(var Te=-1,He=this.length,ft,Lt=this[He-1],Dt=0;++Te<He;)ft=Lt,Lt=this[Te],Dt+=ft[1]*Lt[0]-ft[0]*Lt[1];return Dt*.5},as.centroid=function(Te){var He=-1,ft=this.length,Lt=0,Dt=0,qt,dr=this[ft-1],hr;for(arguments.length||(Te=-1/(6*this.area()));++He<ft;)qt=dr,dr=this[He],hr=qt[0]*dr[1]-dr[0]*qt[1],Lt+=(qt[0]+dr[0])*hr,Dt+=(qt[1]+dr[1])*hr;return[Lt*Te,Dt*Te]},as.clip=function(Te){for(var He,ft=hs(Te),Lt=-1,Dt=this.length-hs(this),qt,dr,hr=this[Dt-1],Pr,ln,on;++Lt<Dt;){for(He=Te.slice(),Te.length=0,Pr=this[Lt],ln=He[(dr=He.length-ft)-1],qt=-1;++qt<dr;)on=He[qt],rl(on,hr,Pr)?(rl(ln,hr,Pr)||Te.push(As(ln,on,hr,Pr)),Te.push(on)):rl(ln,hr,Pr)&&Te.push(As(ln,on,hr,Pr)),ln=on;ft&&Te.push(Te[0]),hr=Pr}return Te};function rl(Te,He,ft){return(ft[0]-He[0])*(Te[1]-He[1])<(ft[1]-He[1])*(Te[0]-He[0])}function As(Te,He,ft,Lt){var Dt=Te[0],qt=ft[0],dr=He[0]-Dt,hr=Lt[0]-qt,Pr=Te[1],ln=ft[1],on=He[1]-Pr,Mn=Lt[1]-ln,Un=(hr*(Pr-ln)-Mn*(Dt-qt))/(Mn*dr-hr*on);return[Dt+Un*dr,Pr+Un*on]}function hs(Te){var He=Te[0],ft=Te[Te.length-1];return!(He[0]-ft[0]||He[1]-ft[1])}var ts,nl,Qs,_l=[],Ss,ls,Oo=[];function Es(){Ys(this),this.edge=this.site=this.circle=null}function xl(Te){var He=_l.pop()||new Es;return He.site=Te,He}function Ul(Te){bl(Te),Qs.remove(Te),_l.push(Te),Ys(Te)}function Hl(Te){var He=Te.circle,ft=He.x,Lt=He.cy,Dt={x:ft,y:Lt},qt=Te.P,dr=Te.N,hr=[Te];Ul(Te);for(var Pr=qt;Pr.circle&&c(ft-Pr.circle.x)<ot&&c(Lt-Pr.circle.cy)<ot;)qt=Pr.P,hr.unshift(Pr),Ul(Pr),Pr=qt;hr.unshift(Pr),bl(Pr);for(var ln=dr;ln.circle&&c(ft-ln.circle.x)<ot&&c(Lt-ln.circle.cy)<ot;)dr=ln.N,hr.push(ln),Ul(ln),ln=dr;hr.push(ln),bl(ln);var on=hr.length,Mn;for(Mn=1;Mn<on;++Mn)ln=hr[Mn],Pr=hr[Mn-1],Zo(ln.edge,Pr.site,ln.site,Dt);Pr=hr[0],ln=hr[on-1],ln.edge=ru(Pr.site,ln.site,null,Dt),al(Pr),al(ln)}function Fs(Te){for(var He=Te.x,ft=Te.y,Lt,Dt,qt,dr,hr=Qs._;hr;)if(qt=Ni(hr,ft)-He,qt>ot)hr=hr.L;else if(dr=He-wo(hr,ft),dr>ot){if(!hr.R){Lt=hr;break}hr=hr.R}else{qt>-ot?(Lt=hr.P,Dt=hr):dr>-ot?(Lt=hr,Dt=hr.N):Lt=Dt=hr;break}var Pr=xl(Te);if(Qs.insert(Lt,Pr),!(!Lt&&!Dt)){if(Lt===Dt){bl(Lt),Dt=xl(Lt.site),Qs.insert(Pr,Dt),Pr.edge=Dt.edge=ru(Lt.site,Pr.site),al(Lt),al(Dt);return}if(!Dt){Pr.edge=ru(Lt.site,Pr.site);return}bl(Lt),bl(Dt);var ln=Lt.site,on=ln.x,Mn=ln.y,Un=Te.x-on,Gn=Te.y-Mn,Ja=Dt.site,Qn=Ja.x-on,ba=Ja.y-Mn,Ca=2*(Un*ba-Gn*Qn),Xa=Un*Un+Gn*Gn,ei=Qn*Qn+ba*ba,Ma={x:(ba*Xa-Gn*ei)/Ca+on,y:(Un*ei-Qn*Xa)/Ca+Mn};Zo(Dt.edge,ln,Ja,Ma),Pr.edge=ru(ln,Te,null,Ma),Dt.edge=ru(Te,Ja,null,Ma),al(Lt),al(Dt)}}function Ni(Te,He){var ft=Te.site,Lt=ft.x,Dt=ft.y,qt=Dt-He;if(!qt)return Lt;var dr=Te.P;if(!dr)return-1/0;ft=dr.site;var hr=ft.x,Pr=ft.y,ln=Pr-He;if(!ln)return hr;var on=hr-Lt,Mn=1/qt-1/ln,Un=on/ln;return Mn?(-Un+Math.sqrt(Un*Un-2*Mn*(on*on/(-2*ln)-Pr+ln/2+Dt-qt/2)))/Mn+Lt:(Lt+hr)/2}function wo(Te,He){var ft=Te.N;if(ft)return Ni(ft,He);var Lt=Te.site;return Lt.y===He?Lt.x:1/0}function ql(Te){this.site=Te,this.edges=[]}ql.prototype.prepare=function(){for(var Te=this.edges,He=Te.length,ft;He--;)ft=Te[He].edge,(!ft.b||!ft.a)&&Te.splice(He,1);return Te.sort(Jo),Te.length};function Gs(Te){for(var He=Te[0][0],ft=Te[1][0],Lt=Te[0][1],Dt=Te[1][1],qt,dr,hr,Pr,ln=nl,on=ln.length,Mn,Un,Gn,Ja,Qn,ba;on--;)if(Mn=ln[on],!(!Mn||!Mn.prepare()))for(Gn=Mn.edges,Ja=Gn.length,Un=0;Un<Ja;)ba=Gn[Un].end(),hr=ba.x,Pr=ba.y,Qn=Gn[++Un%Ja].start(),qt=Qn.x,dr=Qn.y,(c(hr-qt)>ot||c(Pr-dr)>ot)&&(Gn.splice(Un,0,new _u(nu(Mn.site,ba,c(hr-He)<ot&&Dt-Pr>ot?{x:He,y:c(qt-He)<ot?dr:Dt}:c(Pr-Dt)<ot&&ft-hr>ot?{x:c(dr-Dt)<ot?qt:ft,y:Dt}:c(hr-ft)<ot&&Pr-Lt>ot?{x:ft,y:c(qt-ft)<ot?dr:Lt}:c(Pr-Lt)<ot&&hr-He>ot?{x:c(dr-Lt)<ot?qt:He,y:Lt}:null),Mn.site,null)),++Ja)}function Jo(Te,He){return He.angle-Te.angle}function Gl(){Ys(this),this.x=this.y=this.arc=this.site=this.cy=null}function al(Te){var He=Te.P,ft=Te.N;if(!(!He||!ft)){var Lt=He.site,Dt=Te.site,qt=ft.site;if(Lt!==qt){var dr=Dt.x,hr=Dt.y,Pr=Lt.x-dr,ln=Lt.y-hr,on=qt.x-dr,ba=qt.y-hr,Mn=2*(Pr*ba-ln*on);if(!(Mn>=-De)){var Un=Pr*Pr+ln*ln,Gn=on*on+ba*ba,Ja=(ba*Un-ln*Gn)/Mn,Qn=(Pr*Gn-on*Un)/Mn,ba=Qn+hr,Ca=Oo.pop()||new Gl;Ca.arc=Te,Ca.site=Dt,Ca.x=Ja+dr,Ca.y=ba+Math.sqrt(Ja*Ja+Qn*Qn),Ca.cy=ba,Te.circle=Ca;for(var Xa=null,ei=ls._;ei;)if(Ca.y<ei.y||Ca.y===ei.y&&Ca.x<=ei.x)if(ei.L)ei=ei.L;else{Xa=ei.P;break}else if(ei.R)ei=ei.R;else{Xa=ei;break}ls.insert(Xa,Ca),Xa||(Ss=Ca)}}}}function bl(Te){var He=Te.circle;He&&(He.P||(Ss=He.N),ls.remove(He),Oo.push(He),Ys(He),Te.circle=null)}function Iu(Te,He,ft,Lt){return function(Dt){var qt=Dt.a,dr=Dt.b,hr=qt.x,Pr=qt.y,ln=dr.x,on=dr.y,Mn=0,Un=1,Gn=ln-hr,Ja=on-Pr,Qn;if(Qn=Te-hr,!(!Gn&&Qn>0)){if(Qn/=Gn,Gn<0){if(Qn<Mn)return;Qn<Un&&(Un=Qn)}else if(Gn>0){if(Qn>Un)return;Qn>Mn&&(Mn=Qn)}if(Qn=ft-hr,!(!Gn&&Qn<0)){if(Qn/=Gn,Gn<0){if(Qn>Un)return;Qn>Mn&&(Mn=Qn)}else if(Gn>0){if(Qn<Mn)return;Qn<Un&&(Un=Qn)}if(Qn=He-Pr,!(!Ja&&Qn>0)){if(Qn/=Ja,Ja<0){if(Qn<Mn)return;Qn<Un&&(Un=Qn)}else if(Ja>0){if(Qn>Un)return;Qn>Mn&&(Mn=Qn)}if(Qn=Lt-Pr,!(!Ja&&Qn<0)){if(Qn/=Ja,Ja<0){if(Qn>Un)return;Qn>Mn&&(Mn=Qn)}else if(Ja>0){if(Qn<Mn)return;Qn<Un&&(Un=Qn)}return Mn>0&&(Dt.a={x:hr+Mn*Gn,y:Pr+Mn*Ja}),Un<1&&(Dt.b={x:hr+Un*Gn,y:Pr+Un*Ja}),Dt}}}}}}function _o(Te){for(var He=ts,ft=Iu(Te[0][0],Te[0][1],Te[1][0],Te[1][1]),Lt=He.length,Dt;Lt--;)Dt=He[Lt],(!Ps(Dt,Te)||!ft(Dt)||c(Dt.a.x-Dt.b.x)<ot&&c(Dt.a.y-Dt.b.y)<ot)&&(Dt.a=Dt.b=null,He.splice(Lt,1))}function Ps(Te,He){var ft=Te.b;if(ft)return!0;var Lt=Te.a,Dt=He[0][0],qt=He[1][0],dr=He[0][1],hr=He[1][1],Pr=Te.l,ln=Te.r,on=Pr.x,Mn=Pr.y,Un=ln.x,Gn=ln.y,Ja=(on+Un)/2,Qn=(Mn+Gn)/2,ba,Ca;if(Gn===Mn){if(Ja<Dt||Ja>=qt)return;if(on>Un){if(!Lt)Lt={x:Ja,y:dr};else if(Lt.y>=hr)return;ft={x:Ja,y:hr}}else{if(!Lt)Lt={x:Ja,y:hr};else if(Lt.y<dr)return;ft={x:Ja,y:dr}}}else if(ba=(on-Un)/(Gn-Mn),Ca=Qn-ba*Ja,ba<-1||ba>1)if(on>Un){if(!Lt)Lt={x:(dr-Ca)/ba,y:dr};else if(Lt.y>=hr)return;ft={x:(hr-Ca)/ba,y:hr}}else{if(!Lt)Lt={x:(hr-Ca)/ba,y:hr};else if(Lt.y<dr)return;ft={x:(dr-Ca)/ba,y:dr}}else if(Mn<Gn){if(!Lt)Lt={x:Dt,y:ba*Dt+Ca};else if(Lt.x>=qt)return;ft={x:qt,y:ba*qt+Ca}}else{if(!Lt)Lt={x:qt,y:ba*qt+Ca};else if(Lt.x<Dt)return;ft={x:Dt,y:ba*Dt+Ca}}return Te.a=Lt,Te.b=ft,!0}function ms(Te,He){this.l=Te,this.r=He,this.a=this.b=null}function ru(Te,He,ft,Lt){var Dt=new ms(Te,He);return ts.push(Dt),ft&&Zo(Dt,Te,He,ft),Lt&&Zo(Dt,He,Te,Lt),nl[Te.i].edges.push(new _u(Dt,Te,He)),nl[He.i].edges.push(new _u(Dt,He,Te)),Dt}function nu(Te,He,ft){var Lt=new ms(Te,null);return Lt.a=He,Lt.b=ft,ts.push(Lt),Lt}function Zo(Te,He,ft,Lt){!Te.a&&!Te.b?(Te.a=Lt,Te.l=He,Te.r=ft):Te.l===ft?Te.b=Lt:Te.a=Lt}function _u(Te,He,ft){var Lt=Te.a,Dt=Te.b;this.edge=Te,this.site=He,this.angle=ft?Math.atan2(ft.y-He.y,ft.x-He.x):Te.l===He?Math.atan2(Dt.x-Lt.x,Lt.y-Dt.y):Math.atan2(Lt.x-Dt.x,Dt.y-Lt.y)}_u.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 Au(){this._=null}function Ys(Te){Te.U=Te.C=Te.L=Te.R=Te.P=Te.N=null}Au.prototype={insert:function(Te,He){var ft,Lt,Dt;if(Te){if(He.P=Te,He.N=Te.N,Te.N&&(Te.N.P=He),Te.N=He,Te.R){for(Te=Te.R;Te.L;)Te=Te.L;Te.L=He}else Te.R=He;ft=Te}else this._?(Te=Ql(this._),He.P=null,He.N=Te,Te.P=Te.L=He,ft=Te):(He.P=He.N=null,this._=He,ft=null);for(He.L=He.R=null,He.U=ft,He.C=!0,Te=He;ft&&ft.C;)Lt=ft.U,ft===Lt.L?(Dt=Lt.R,Dt&&Dt.C?(ft.C=Dt.C=!1,Lt.C=!0,Te=Lt):(Te===ft.R&&(Ol(this,ft),Te=ft,ft=Te.U),ft.C=!1,Lt.C=!0,$l(this,Lt))):(Dt=Lt.L,Dt&&Dt.C?(ft.C=Dt.C=!1,Lt.C=!0,Te=Lt):(Te===ft.L&&($l(this,ft),Te=ft,ft=Te.U),ft.C=!1,Lt.C=!0,Ol(this,Lt))),ft=Te.U;this._.C=!1},remove:function(Te){Te.N&&(Te.N.P=Te.P),Te.P&&(Te.P.N=Te.N),Te.N=Te.P=null;var He=Te.U,ft,Lt=Te.L,Dt=Te.R,qt,dr;if(Lt?Dt?qt=Ql(Dt):qt=Lt:qt=Dt,He?He.L===Te?He.L=qt:He.R=qt:this._=qt,Lt&&Dt?(dr=qt.C,qt.C=Te.C,qt.L=Lt,Lt.U=qt,qt!==Dt?(He=qt.U,qt.U=Te.U,Te=qt.R,He.L=Te,qt.R=Dt,Dt.U=qt):(qt.U=He,He=qt,Te=qt.R)):(dr=Te.C,Te=qt),Te&&(Te.U=He),!dr){if(Te&&Te.C){Te.C=!1;return}do{if(Te===this._)break;if(Te===He.L){if(ft=He.R,ft.C&&(ft.C=!1,He.C=!0,Ol(this,He),ft=He.R),ft.L&&ft.L.C||ft.R&&ft.R.C){(!ft.R||!ft.R.C)&&(ft.L.C=!1,ft.C=!0,$l(this,ft),ft=He.R),ft.C=He.C,He.C=ft.R.C=!1,Ol(this,He),Te=this._;break}}else if(ft=He.L,ft.C&&(ft.C=!1,He.C=!0,$l(this,He),ft=He.L),ft.L&&ft.L.C||ft.R&&ft.R.C){(!ft.L||!ft.L.C)&&(ft.R.C=!1,ft.C=!0,Ol(this,ft),ft=He.L),ft.C=He.C,He.C=ft.L.C=!1,$l(this,He),Te=this._;break}ft.C=!0,Te=He,He=He.U}while(!Te.C);Te&&(Te.C=!1)}}};function Ol(Te,He){var ft=He,Lt=He.R,Dt=ft.U;Dt?Dt.L===ft?Dt.L=Lt:Dt.R=Lt:Te._=Lt,Lt.U=Dt,ft.U=Lt,ft.R=Lt.L,ft.R&&(ft.R.U=ft),Lt.L=ft}function $l(Te,He){var ft=He,Lt=He.L,Dt=ft.U;Dt?Dt.L===ft?Dt.L=Lt:Dt.R=Lt:Te._=Lt,Lt.U=Dt,ft.U=Lt,ft.L=Lt.R,ft.L&&(ft.L.U=ft),Lt.R=ft}function Ql(Te){for(;Te.L;)Te=Te.L;return Te}function ac(Te,He){var ft=Te.sort(Tf).pop(),Lt,Dt,qt;for(ts=[],nl=new Array(Te.length),Qs=new Au,ls=new Au;;)if(qt=Ss,ft&&(!qt||ft.y<qt.y||ft.y===qt.y&&ft.x<qt.x))(ft.x!==Lt||ft.y!==Dt)&&(nl[ft.i]=new ql(ft),Fs(ft),Lt=ft.x,Dt=ft.y),ft=Te.pop();else if(qt)Hl(qt.arc);else break;He&&(_o(He),Gs(He));var dr={cells:nl,edges:ts};return Qs=ls=ts=nl=null,dr}function Tf(Te,He){return He.y-Te.y||He.x-Te.x}v.geom.voronoi=function(Te){var He=So,ft=Vo,Lt=He,Dt=ft,qt=rf;if(Te)return dr(Te);function dr(Pr){var ln=new Array(Pr.length),on=qt[0][0],Mn=qt[0][1],Un=qt[1][0],Gn=qt[1][1];return ac(hr(Pr),qt).cells.forEach(function(Ja,Qn){var ba=Ja.edges,Ca=Ja.site,Xa=ln[Qn]=ba.length?ba.map(function(ei){var Ma=ei.start();return[Ma.x,Ma.y]}):Ca.x>=on&&Ca.x<=Un&&Ca.y>=Mn&&Ca.y<=Gn?[[on,Gn],[Un,Gn],[Un,Mn],[on,Mn]]:[];Xa.point=Pr[Qn]}),ln}function hr(Pr){return Pr.map(function(ln,on){return{x:Math.round(Lt(ln,on)/ot)*ot,y:Math.round(Dt(ln,on)/ot)*ot,i:on}})}return dr.links=function(Pr){return ac(hr(Pr)).edges.filter(function(ln){return ln.l&&ln.r}).map(function(ln){return{source:Pr[ln.l.i],target:Pr[ln.r.i]}})},dr.triangles=function(Pr){var ln=[];return ac(hr(Pr)).cells.forEach(function(on,Mn){for(var Un=on.site,Gn=on.edges.sort(Jo),Ja=-1,Qn=Gn.length,ba,Ca=Gn[Qn-1].edge,Xa=Ca.l===Un?Ca.r:Ca.l;++Ja<Qn;)ba=Xa,Ca=Gn[Ja].edge,Xa=Ca.l===Un?Ca.r:Ca.l,Mn<ba.i&&Mn<Xa.i&&df(Un,ba,Xa)<0&&ln.push([Pr[Mn],Pr[ba.i],Pr[Xa.i]])}),ln},dr.x=function(Pr){return arguments.length?(Lt=It(He=Pr),dr):He},dr.y=function(Pr){return arguments.length?(Dt=It(ft=Pr),dr):ft},dr.clipExtent=function(Pr){return arguments.length?(qt=Pr??rf,dr):qt===rf?null:qt},dr.size=function(Pr){return arguments.length?dr.clipExtent(Pr&&[[0,0],Pr]):qt===rf?null:qt&&qt[1]},dr};var rf=[[-1e6,-1e6],[1e6,1e6]];function df(Te,He,ft){return(Te.x-ft.x)*(He.y-Te.y)-(Te.x-He.x)*(ft.y-Te.y)}v.geom.delaunay=function(Te){return v.geom.voronoi().triangles(Te)},v.geom.quadtree=function(Te,He,ft,Lt,Dt){var qt=So,dr=Vo,hr;if(hr=arguments.length)return qt=Zh,dr=zh,hr===3&&(Dt=ft,Lt=He,ft=He=0),Pr(Te);function Pr(ln){var on,Mn=It(qt),Un=It(dr),Gn,Ja,Qn,ba,Ca,Xa,ei,Ma;if(He!=null)Ca=He,Xa=ft,ei=Lt,Ma=Dt;else if(ei=Ma=-(Ca=Xa=1/0),Gn=[],Ja=[],ba=ln.length,hr)for(Qn=0;Qn<ba;++Qn)on=ln[Qn],on.x<Ca&&(Ca=on.x),on.y<Xa&&(Xa=on.y),on.x>ei&&(ei=on.x),on.y>Ma&&(Ma=on.y),Gn.push(on.x),Ja.push(on.y);else for(Qn=0;Qn<ba;++Qn){var Ci=+Mn(on=ln[Qn],Qn),po=+Un(on,Qn);Ci<Ca&&(Ca=Ci),po<Xa&&(Xa=po),Ci>ei&&(ei=Ci),po>Ma&&(Ma=po),Gn.push(Ci),Ja.push(po)}var ro=ei-Ca,fo=Ma-Xa;ro>fo?Ma=Xa+ro:ei=Ca+fo;function Fo(Wo,bs,dl,Gu,fu,ko,Vs,ul){if(!(isNaN(dl)||isNaN(Gu)))if(Wo.leaf){var ou=Wo.x,Yl=Wo.y;if(ou!=null)if(c(ou-dl)+c(Yl-Gu)<.01)Ho(Wo,bs,dl,Gu,fu,ko,Vs,ul);else{var Dc=Wo.point;Wo.x=Wo.y=Wo.point=null,Ho(Wo,Dc,ou,Yl,fu,ko,Vs,ul),Ho(Wo,bs,dl,Gu,fu,ko,Vs,ul)}else Wo.x=dl,Wo.y=Gu,Wo.point=bs}else Ho(Wo,bs,dl,Gu,fu,ko,Vs,ul)}function Ho(Wo,bs,dl,Gu,fu,ko,Vs,ul){var ou=(fu+Vs)*.5,Yl=(ko+ul)*.5,Dc=dl>=ou,jl=Gu>=Yl,su=jl<<1|Dc;Wo.leaf=!1,Wo=Wo.nodes[su]||(Wo.nodes[su]=zl()),Dc?fu=ou:Vs=ou,jl?ko=Yl:ul=Yl,Fo(Wo,bs,dl,Gu,fu,ko,Vs,ul)}var il=zl();if(il.add=function(Wo){Fo(il,Wo,+Mn(Wo,++Qn),+Un(Wo,Qn),Ca,Xa,ei,Ma)},il.visit=function(Wo){Vc(Wo,il,Ca,Xa,ei,Ma)},il.find=function(Wo){return $h(il,Wo[0],Wo[1],Ca,Xa,ei,Ma)},Qn=-1,He==null){for(;++Qn<ba;)Fo(il,ln[Qn],Gn[Qn],Ja[Qn],Ca,Xa,ei,Ma);--Qn}else ln.forEach(il.add);return Gn=Ja=ln=on=null,il}return Pr.x=function(ln){return arguments.length?(qt=ln,Pr):qt},Pr.y=function(ln){return arguments.length?(dr=ln,Pr):dr},Pr.extent=function(ln){return arguments.length?(ln==null?He=ft=Lt=Dt=null:(He=+ln[0][0],ft=+ln[0][1],Lt=+ln[1][0],Dt=+ln[1][1]),Pr):He==null?null:[[He,ft],[Lt,Dt]]},Pr.size=function(ln){return arguments.length?(ln==null?He=ft=Lt=Dt=null:(He=ft=0,Lt=+ln[0],Dt=+ln[1]),Pr):He==null?null:[Lt-He,Dt-ft]},Pr};function Zh(Te){return Te.x}function zh(Te){return Te.y}function zl(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function Vc(Te,He,ft,Lt,Dt,qt){if(!Te(He,ft,Lt,Dt,qt)){var dr=(ft+Dt)*.5,hr=(Lt+qt)*.5,Pr=He.nodes;Pr[0]&&Vc(Te,Pr[0],ft,Lt,dr,hr),Pr[1]&&Vc(Te,Pr[1],dr,Lt,Dt,hr),Pr[2]&&Vc(Te,Pr[2],ft,hr,dr,qt),Pr[3]&&Vc(Te,Pr[3],dr,hr,Dt,qt)}}function $h(Te,He,ft,Lt,Dt,qt,dr){var hr=1/0,Pr;return(function ln(on,Mn,Un,Gn,Ja){if(!(Mn>qt||Un>dr||Gn<Lt||Ja<Dt)){if(Qn=on.point){var Qn,ba=He-on.x,Ca=ft-on.y,Xa=ba*ba+Ca*Ca;if(Xa<hr){var ei=Math.sqrt(hr=Xa);Lt=He-ei,Dt=ft-ei,qt=He+ei,dr=ft+ei,Pr=Qn}}for(var Ma=on.nodes,Ci=(Mn+Gn)*.5,po=(Un+Ja)*.5,ro=He>=Ci,fo=ft>=po,Fo=fo<<1|ro,Ho=Fo+4;Fo<Ho;++Fo)if(on=Ma[Fo&3])switch(Fo&3){case 0:ln(on,Mn,Un,Ci,po);break;case 1:ln(on,Ci,Un,Gn,po);break;case 2:ln(on,Mn,po,Ci,Ja);break;case 3:ln(on,Ci,po,Gn,Ja);break}}})(Te,Lt,Dt,qt,dr),Pr}v.interpolateRgb=pc;function pc(Te,He){Te=v.rgb(Te),He=v.rgb(He);var ft=Te.r,Lt=Te.g,Dt=Te.b,qt=He.r-ft,dr=He.g-Lt,hr=He.b-Dt;return function(Pr){return"#"+qr(Math.round(ft+qt*Pr))+qr(Math.round(Lt+dr*Pr))+qr(Math.round(Dt+hr*Pr))}}v.interpolateObject=ic;function ic(Te,He){var ft={},Lt={},Dt;for(Dt in Te)Dt in He?ft[Dt]=el(Te[Dt],He[Dt]):Lt[Dt]=Te[Dt];for(Dt in He)Dt in Te||(Lt[Dt]=He[Dt]);return function(qt){for(Dt in ft)Lt[Dt]=ft[Dt](qt);return Lt}}v.interpolateNumber=mc;function mc(Te,He){return Te=+Te,He=+He,function(ft){return Te*(1-ft)+He*ft}}v.interpolateString=vf;function vf(Te,He){var ft=uu.lastIndex=oc.lastIndex=0,Lt,Dt,qt,dr=-1,hr=[],Pr=[];for(Te=Te+"",He=He+"";(Lt=uu.exec(Te))&&(Dt=oc.exec(He));)(qt=Dt.index)>ft&&(qt=He.slice(ft,qt),hr[dr]?hr[dr]+=qt:hr[++dr]=qt),(Lt=Lt[0])===(Dt=Dt[0])?hr[dr]?hr[dr]+=Dt:hr[++dr]=Dt:(hr[++dr]=null,Pr.push({i:dr,x:mc(Lt,Dt)})),ft=oc.lastIndex;return ft<He.length&&(qt=He.slice(ft),hr[dr]?hr[dr]+=qt:hr[++dr]=qt),hr.length<2?Pr[0]?(He=Pr[0].x,function(ln){return He(ln)+""}):function(){return He}:(He=Pr.length,function(ln){for(var on=0,Mn;on<He;++on)hr[(Mn=Pr[on]).i]=Mn.x(ln);return hr.join("")})}var uu=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,oc=new RegExp(uu.source,"g");v.interpolate=el;function el(Te,He){for(var ft=v.interpolators.length,Lt;--ft>=0&&!(Lt=v.interpolators[ft](Te,He)););return Lt}v.interpolators=[function(Te,He){var ft=typeof He;return(ft==="string"?dn.has(He.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(He)?pc:vf:He instanceof Aa?pc:Array.isArray(He)?Xl:ft==="object"&&isNaN(He)?ic:mc)(Te,He)}],v.interpolateArray=Xl;function Xl(Te,He){var ft=[],Lt=[],Dt=Te.length,qt=He.length,dr=Math.min(Te.length,He.length),hr;for(hr=0;hr<dr;++hr)ft.push(el(Te[hr],He[hr]));for(;hr<Dt;++hr)Lt[hr]=Te[hr];for(;hr<qt;++hr)Lt[hr]=He[hr];return function(Pr){for(hr=0;hr<dr;++hr)Lt[hr]=ft[hr](Pr);return Lt}}var zf=function(){return U},Lc=v.map({linear:zf,poly:ph,quad:function(){return dv},cubic:function(){return Ml},sin:function(){return pf},exp:function(){return Yu},circle:function(){return Kh},elastic:Kf,back:Ah,bounce:function(){return sc}}),$f=v.map({in:U,out:Wd,"in-out":Zs,"out-in":function(Te){return Zs(Wd(Te))}});v.ease=function(Te){var He=Te.indexOf("-"),ft=He>=0?Te.slice(0,He):Te,Lt=He>=0?Te.slice(He+1):"in";return ft=Lc.get(ft)||zf,Lt=$f.get(Lt)||U,xu(Lt(ft.apply(null,w.call(arguments,1))))};function xu(Te){return function(He){return He<=0?0:He>=1?1:Te(He)}}function Wd(Te){return function(He){return 1-Te(1-He)}}function Zs(Te){return function(He){return .5*(He<.5?Te(2*He):2-Te(2-2*He))}}function dv(Te){return Te*Te}function Ml(Te){return Te*Te*Te}function Ko(Te){if(Te<=0)return 0;if(Te>=1)return 1;var He=Te*Te,ft=He*Te;return 4*(Te<.5?ft:3*(Te-He)+ft-.75)}function ph(Te){return function(He){return Math.pow(He,Te)}}function pf(Te){return 1-Math.cos(Te*tt)}function Yu(Te){return Math.pow(2,10*(Te-1))}function Kh(Te){return 1-Math.sqrt(1-Te*Te)}function Kf(Te,He){var ft;return arguments.length<2&&(He=.45),arguments.length?ft=He/Ae*Math.asin(1/Te):(Te=1,ft=He/4),function(Lt){return 1+Te*Math.pow(2,-10*Lt)*Math.sin((Lt-ft)*Ae/He)}}function Ah(Te){return Te||(Te=1.70158),function(He){return He*He*((Te+1)*He-Te)}}function sc(Te){return Te<1/2.75?7.5625*Te*Te:Te<2/2.75?7.5625*(Te-=1.5/2.75)*Te+.75:Te<2.5/2.75?7.5625*(Te-=2.25/2.75)*Te+.9375:7.5625*(Te-=2.625/2.75)*Te+.984375}v.interpolateHcl=Ld;function Ld(Te,He){Te=v.hcl(Te),He=v.hcl(He);var ft=Te.h,Lt=Te.c,Dt=Te.l,qt=He.h-ft,dr=He.c-Lt,hr=He.l-Dt;return isNaN(dr)&&(dr=0,Lt=isNaN(Lt)?He.c:Lt),isNaN(qt)?(qt=0,ft=isNaN(ft)?He.h:ft):qt>180?qt-=360:qt<-180&&(qt+=360),function(Pr){return yr(ft+qt*Pr,Lt+dr*Pr,Dt+hr*Pr)+""}}v.interpolateHsl=sd;function sd(Te,He){Te=v.hsl(Te),He=v.hsl(He);var ft=Te.h,Lt=Te.s,Dt=Te.l,qt=He.h-ft,dr=He.s-Lt,hr=He.l-Dt;return isNaN(dr)&&(dr=0,Lt=isNaN(Lt)?He.s:Lt),isNaN(qt)?(qt=0,ft=isNaN(ft)?He.h:ft):qt>180?qt-=360:qt<-180&&(qt+=360),function(Pr){return ci(ft+qt*Pr,Lt+dr*Pr,Dt+hr*Pr)+""}}v.interpolateLab=Sh;function Sh(Te,He){Te=v.lab(Te),He=v.lab(He);var ft=Te.l,Lt=Te.a,Dt=Te.b,qt=He.l-ft,dr=He.a-Lt,hr=He.b-Dt;return function(Pr){return za(ft+qt*Pr,Lt+dr*Pr,Dt+hr*Pr)+""}}v.interpolateRound=Jf;function Jf(Te,He){return He-=Te,function(ft){return Math.round(Te+He*ft)}}v.transform=function(Te){var He=P.createElementNS(v.ns.prefix.svg,"g");return(v.transform=function(ft){if(ft!=null){He.setAttribute("transform",ft);var Lt=He.transform.baseVal.consolidate()}return new Jh(Lt?Lt.matrix:Nf)})(Te)};function Jh(Te){var He=[Te.a,Te.b],ft=[Te.c,Te.d],Lt=mf(He),Dt=Qh(He,ft),qt=mf(ld(ft,He,-Dt))||0;He[0]*ft[1]<ft[0]*He[1]&&(He[0]*=-1,He[1]*=-1,Lt*=-1,Dt*=-1),this.rotate=(Lt?Math.atan2(He[1],He[0]):Math.atan2(-ft[0],ft[1]))*Bt,this.translate=[Te.e,Te.f],this.scale=[Lt,qt],this.skew=qt?Math.atan2(Dt,qt)*Bt:0}Jh.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};function Qh(Te,He){return Te[0]*He[0]+Te[1]*He[1]}function mf(Te){var He=Math.sqrt(Qh(Te,Te));return He&&(Te[0]/=He,Te[1]/=He),He}function ld(Te,He,ft){return Te[0]+=ft*He[0],Te[1]+=ft*He[1],Te}var Nf={a:1,b:0,c:0,d:1,e:0,f:0};v.interpolateTransform=Nh;function Af(Te){return Te.length?Te.pop()+",":""}function lc(Te,He,ft,Lt){if(Te[0]!==He[0]||Te[1]!==He[1]){var Dt=ft.push("translate(",null,",",null,")");Lt.push({i:Dt-4,x:mc(Te[0],He[0])},{i:Dt-2,x:mc(Te[1],He[1])})}else(He[0]||He[1])&&ft.push("translate("+He+")")}function lh(Te,He,ft,Lt){Te!==He?(Te-He>180?He+=360:He-Te>180&&(Te+=360),Lt.push({i:ft.push(Af(ft)+"rotate(",null,")")-2,x:mc(Te,He)})):He&&ft.push(Af(ft)+"rotate("+He+")")}function ed(Te,He,ft,Lt){Te!==He?Lt.push({i:ft.push(Af(ft)+"skewX(",null,")")-2,x:mc(Te,He)}):He&&ft.push(Af(ft)+"skewX("+He+")")}function Kl(Te,He,ft,Lt){if(Te[0]!==He[0]||Te[1]!==He[1]){var Dt=ft.push(Af(ft)+"scale(",null,",",null,")");Lt.push({i:Dt-4,x:mc(Te[0],He[0])},{i:Dt-2,x:mc(Te[1],He[1])})}else(He[0]!==1||He[1]!==1)&&ft.push(Af(ft)+"scale("+He+")")}function Nh(Te,He){var ft=[],Lt=[];return Te=v.transform(Te),He=v.transform(He),lc(Te.translate,He.translate,ft,Lt),lh(Te.rotate,He.rotate,ft,Lt),ed(Te.skew,He.skew,ft,Lt),Kl(Te.scale,He.scale,ft,Lt),Te=He=null,function(Dt){for(var qt=-1,dr=Lt.length,hr;++qt<dr;)ft[(hr=Lt[qt]).i]=hr.x(Dt);return ft.join("")}}function Yd(Te,He){return He=(He-=Te=+Te)||1/He,function(ft){return(ft-Te)/He}}function ud(Te,He){return He=(He-=Te=+Te)||1/He,function(ft){return Math.max(0,Math.min(1,(ft-Te)/He))}}v.layout={},v.layout.bundle=function(){return function(Te){for(var He=[],ft=-1,Lt=Te.length;++ft<Lt;)He.push(Eh(Te[ft]));return He}};function Eh(Te){for(var He=Te.source,ft=Te.target,Lt=Hc(He,ft),Dt=[He];He!==Lt;)He=He.parent,Dt.push(He);for(var qt=Dt.length;ft!==Lt;)Dt.splice(qt,0,ft),ft=ft.parent;return Dt}function cd(Te){for(var He=[],ft=Te.parent;ft!=null;)He.push(Te),Te=ft,ft=ft.parent;return He.push(Te),He}function Hc(Te,He){if(Te===He)return Te;for(var ft=cd(Te),Lt=cd(He),Dt=ft.pop(),qt=Lt.pop(),dr=null;Dt===qt;)dr=Dt,Dt=ft.pop(),qt=Lt.pop();return dr}v.layout.chord=function(){var Te={},He,ft,Lt,Dt,qt=0,dr,hr,Pr;function ln(){var Mn={},Un=[],Gn=v.range(Dt),Ja=[],Qn,ba,Ca,Xa,ei;for(He=[],ft=[],Qn=0,Xa=-1;++Xa<Dt;){for(ba=0,ei=-1;++ei<Dt;)ba+=Lt[Xa][ei];Un.push(ba),Ja.push(v.range(Dt)),Qn+=ba}for(dr&&Gn.sort(function(il,Wo){return dr(Un[il],Un[Wo])}),hr&&Ja.forEach(function(il,Wo){il.sort(function(bs,dl){return hr(Lt[Wo][bs],Lt[Wo][dl])})}),Qn=(Ae-qt*Dt)/Qn,ba=0,Xa=-1;++Xa<Dt;){for(Ca=ba,ei=-1;++ei<Dt;){var Ma=Gn[Xa],Ci=Ja[Ma][ei],po=Lt[Ma][Ci],ro=ba,fo=ba+=po*Qn;Mn[Ma+"-"+Ci]={index:Ma,subindex:Ci,startAngle:ro,endAngle:fo,value:po}}ft[Ma]={index:Ma,startAngle:Ca,endAngle:ba,value:Un[Ma]},ba+=qt}for(Xa=-1;++Xa<Dt;)for(ei=Xa-1;++ei<Dt;){var Fo=Mn[Xa+"-"+ei],Ho=Mn[ei+"-"+Xa];(Fo.value||Ho.value)&&He.push(Fo.value<Ho.value?{source:Ho,target:Fo}:{source:Fo,target:Ho})}Pr&&on()}function on(){He.sort(function(Mn,Un){return Pr((Mn.source.value+Mn.target.value)/2,(Un.source.value+Un.target.value)/2)})}return Te.matrix=function(Mn){return arguments.length?(Dt=(Lt=Mn)&&Lt.length,He=ft=null,Te):Lt},Te.padding=function(Mn){return arguments.length?(qt=Mn,He=ft=null,Te):qt},Te.sortGroups=function(Mn){return arguments.length?(dr=Mn,He=ft=null,Te):dr},Te.sortSubgroups=function(Mn){return arguments.length?(hr=Mn,He=null,Te):hr},Te.sortChords=function(Mn){return arguments.length?(Pr=Mn,He&&on(),Te):Pr},Te.chords=function(){return He||ln(),He},Te.groups=function(){return ft||ln(),ft},Te},v.layout.force=function(){var Te={},He=v.dispatch("start","tick","end"),ft,Lt=[1,1],Dt,qt,dr=.9,hr=Ff,Pr=Sc,ln=-30,on=Xc,Mn=.1,Un=.64,Gn=[],Ja=[],Qn,ba,Ca;function Xa(Ma){return function(Ci,po,ro,fo){if(Ci.point!==Ma){var Fo=Ci.cx-Ma.x,Ho=Ci.cy-Ma.y,il=fo-po,Wo=Fo*Fo+Ho*Ho;if(il*il/Un<Wo){if(Wo<on){var bs=Ci.charge/Wo;Ma.px-=Fo*bs,Ma.py-=Ho*bs}return!0}if(Ci.point&&Wo&&Wo<on){var bs=Ci.pointCharge/Wo;Ma.px-=Fo*bs,Ma.py-=Ho*bs}}return!Ci.charge}}Te.tick=function(){if((qt*=.99)<.005)return ft=null,He.end({type:"end",alpha:qt=0}),!0;var Ma=Gn.length,Ci=Ja.length,po,ro,fo,Fo,Ho,il,Wo,bs,dl;for(ro=0;ro<Ci;++ro)fo=Ja[ro],Fo=fo.source,Ho=fo.target,bs=Ho.x-Fo.x,dl=Ho.y-Fo.y,(il=bs*bs+dl*dl)&&(il=qt*ba[ro]*((il=Math.sqrt(il))-Qn[ro])/il,bs*=il,dl*=il,Ho.x-=bs*(Wo=Fo.weight+Ho.weight?Fo.weight/(Fo.weight+Ho.weight):.5),Ho.y-=dl*Wo,Fo.x+=bs*(Wo=1-Wo),Fo.y+=dl*Wo);if((Wo=qt*Mn)&&(bs=Lt[0]/2,dl=Lt[1]/2,ro=-1,Wo))for(;++ro<Ma;)fo=Gn[ro],fo.x+=(bs-fo.x)*Wo,fo.y+=(dl-fo.y)*Wo;if(ln)for(cu(po=v.geom.quadtree(Gn),qt,Ca),ro=-1;++ro<Ma;)(fo=Gn[ro]).fixed||po.visit(Xa(fo));for(ro=-1;++ro<Ma;)fo=Gn[ro],fo.fixed?(fo.x=fo.px,fo.y=fo.py):(fo.x-=(fo.px-(fo.px=fo.x))*dr,fo.y-=(fo.py-(fo.py=fo.y))*dr);He.tick({type:"tick",alpha:qt})},Te.nodes=function(Ma){return arguments.length?(Gn=Ma,Te):Gn},Te.links=function(Ma){return arguments.length?(Ja=Ma,Te):Ja},Te.size=function(Ma){return arguments.length?(Lt=Ma,Te):Lt},Te.linkDistance=function(Ma){return arguments.length?(hr=typeof Ma=="function"?Ma:+Ma,Te):hr},Te.distance=Te.linkDistance,Te.linkStrength=function(Ma){return arguments.length?(Pr=typeof Ma=="function"?Ma:+Ma,Te):Pr},Te.friction=function(Ma){return arguments.length?(dr=+Ma,Te):dr},Te.charge=function(Ma){return arguments.length?(ln=typeof Ma=="function"?Ma:+Ma,Te):ln},Te.chargeDistance=function(Ma){return arguments.length?(on=Ma*Ma,Te):Math.sqrt(on)},Te.gravity=function(Ma){return arguments.length?(Mn=+Ma,Te):Mn},Te.theta=function(Ma){return arguments.length?(Un=Ma*Ma,Te):Math.sqrt(Un)},Te.alpha=function(Ma){return arguments.length?(Ma=+Ma,qt?Ma>0?qt=Ma:(ft.c=null,ft.t=NaN,ft=null,He.end({type:"end",alpha:qt=0})):Ma>0&&(He.start({type:"start",alpha:qt=Ma}),ft=Za(Te.tick)),Te):qt},Te.start=function(){var Ma,Ci=Gn.length,po=Ja.length,ro=Lt[0],fo=Lt[1],Fo,Ho;for(Ma=0;Ma<Ci;++Ma)(Ho=Gn[Ma]).index=Ma,Ho.weight=0;for(Ma=0;Ma<po;++Ma)Ho=Ja[Ma],typeof Ho.source=="number"&&(Ho.source=Gn[Ho.source]),typeof Ho.target=="number"&&(Ho.target=Gn[Ho.target]),++Ho.source.weight,++Ho.target.weight;for(Ma=0;Ma<Ci;++Ma)Ho=Gn[Ma],isNaN(Ho.x)&&(Ho.x=il("x",ro)),isNaN(Ho.y)&&(Ho.y=il("y",fo)),isNaN(Ho.px)&&(Ho.px=Ho.x),isNaN(Ho.py)&&(Ho.py=Ho.y);if(Qn=[],typeof hr=="function")for(Ma=0;Ma<po;++Ma)Qn[Ma]=+hr.call(this,Ja[Ma],Ma);else for(Ma=0;Ma<po;++Ma)Qn[Ma]=hr;if(ba=[],typeof Pr=="function")for(Ma=0;Ma<po;++Ma)ba[Ma]=+Pr.call(this,Ja[Ma],Ma);else for(Ma=0;Ma<po;++Ma)ba[Ma]=Pr;if(Ca=[],typeof ln=="function")for(Ma=0;Ma<Ci;++Ma)Ca[Ma]=+ln.call(this,Gn[Ma],Ma);else for(Ma=0;Ma<Ci;++Ma)Ca[Ma]=ln;function il(Wo,bs){if(!Fo){for(Fo=new Array(Ci),fu=0;fu<Ci;++fu)Fo[fu]=[];for(fu=0;fu<po;++fu){var dl=Ja[fu];Fo[dl.source.index].push(dl.target),Fo[dl.target.index].push(dl.source)}}for(var Gu=Fo[Ma],fu=-1,ko=Gu.length,Vs;++fu<ko;)if(!isNaN(Vs=Gu[fu][Wo]))return Vs;return Math.random()*bs}return Te.resume()},Te.resume=function(){return Te.alpha(.1)},Te.stop=function(){return Te.alpha(0)},Te.drag=function(){if(Dt||(Dt=v.behavior.drag().origin(U).on("dragstart.force",fd).on("drag.force",ei).on("dragend.force",Pu)),!arguments.length)return Dt;this.on("mouseover.force",Gc).on("mouseout.force",Qf).call(Dt)};function ei(Ma){Ma.px=v.event.x,Ma.py=v.event.y,Te.resume()}return v.rebind(Te,He,"on")};function fd(Te){Te.fixed|=2}function Pu(Te){Te.fixed&=-7}function Gc(Te){Te.fixed|=4,Te.px=Te.x,Te.py=Te.y}function Qf(Te){Te.fixed&=-5}function cu(Te,He,ft){var Lt=0,Dt=0;if(Te.charge=0,!Te.leaf)for(var qt=Te.nodes,dr=qt.length,hr=-1,Pr;++hr<dr;)Pr=qt[hr],Pr!=null&&(cu(Pr,He,ft),Te.charge+=Pr.charge,Lt+=Pr.charge*Pr.cx,Dt+=Pr.charge*Pr.cy);if(Te.point){Te.leaf||(Te.point.x+=Math.random()-.5,Te.point.y+=Math.random()-.5);var ln=He*ft[Te.point.index];Te.charge+=Te.pointCharge=ln,Lt+=ln*Te.point.x,Dt+=ln*Te.point.y}Te.cx=Lt/Te.charge,Te.cy=Dt/Te.charge}var Ff=20,Sc=1,Xc=1/0;v.layout.hierarchy=function(){var Te=Zd,He=eh,ft=Fh;function Lt(Dt){var qt=[Dt],dr=[],hr;for(Dt.depth=0;(hr=qt.pop())!=null;)if(dr.push(hr),(ln=He.call(Lt,hr,hr.depth))&&(Pr=ln.length)){for(var Pr,ln,on;--Pr>=0;)qt.push(on=ln[Pr]),on.parent=hr,on.depth=hr.depth+1;ft&&(hr.value=0),hr.children=ln}else ft&&(hr.value=+ft.call(Lt,hr,hr.depth)||0),delete hr.children;return Sf(Dt,function(Mn){var Un,Gn;Te&&(Un=Mn.children)&&Un.sort(Te),ft&&(Gn=Mn.parent)&&(Gn.value+=Mn.value)}),dr}return Lt.sort=function(Dt){return arguments.length?(Te=Dt,Lt):Te},Lt.children=function(Dt){return arguments.length?(He=Dt,Lt):He},Lt.value=function(Dt){return arguments.length?(ft=Dt,Lt):ft},Lt.revalue=function(Dt){return ft&&(mh(Dt,function(qt){qt.children&&(qt.value=0)}),Sf(Dt,function(qt){var dr;qt.children||(qt.value=+ft.call(Lt,qt,qt.depth)||0),(dr=qt.parent)&&(dr.value+=qt.value)})),Dt},Lt};function bu(Te,He){return v.rebind(Te,He,"sort","children","value"),Te.nodes=Te,Te.links=Sv,Te}function mh(Te,He){for(var ft=[Te];(Te=ft.pop())!=null;)if(He(Te),(Dt=Te.children)&&(Lt=Dt.length))for(var Lt,Dt;--Lt>=0;)ft.push(Dt[Lt])}function Sf(Te,He){for(var ft=[Te],Lt=[];(Te=ft.pop())!=null;)if(Lt.push(Te),(dr=Te.children)&&(qt=dr.length))for(var Dt=-1,qt,dr;++Dt<qt;)ft.push(dr[Dt]);for(;(Te=Lt.pop())!=null;)He(Te)}function eh(Te){return Te.children}function Fh(Te){return Te.value}function Zd(Te,He){return He.value-Te.value}function Sv(Te){return v.merge(Te.map(function(He){return(He.children||[]).map(function(ft){return{source:He,target:ft}})}))}v.layout.partition=function(){var Te=v.layout.hierarchy(),He=[1,1];function ft(qt,dr,hr,Pr){var ln=qt.children;if(qt.x=dr,qt.y=qt.depth*Pr,qt.dx=hr,qt.dy=Pr,ln&&(Mn=ln.length)){var on=-1,Mn,Un,Gn;for(hr=qt.value?hr/qt.value:0;++on<Mn;)ft(Un=ln[on],dr,Gn=Un.value*hr,Pr),dr+=Gn}}function Lt(qt){var dr=qt.children,hr=0;if(dr&&(ln=dr.length))for(var Pr=-1,ln;++Pr<ln;)hr=Math.max(hr,Lt(dr[Pr]));return 1+hr}function Dt(qt,dr){var hr=Te.call(this,qt,dr);return ft(hr[0],0,He[0],He[1]/Lt(hr[0])),hr}return Dt.size=function(qt){return arguments.length?(He=qt,Dt):He},bu(Dt,Te)},v.layout.pie=function(){var Te=Number,He=gh,ft=0,Lt=Ae,Dt=0;function qt(dr){var hr=dr.length,Pr=dr.map(function(Xa,ei){return+Te.call(qt,Xa,ei)}),ln=+(typeof ft=="function"?ft.apply(this,arguments):ft),on=(typeof Lt=="function"?Lt.apply(this,arguments):Lt)-ln,Mn=Math.min(Math.abs(on)/hr,+(typeof Dt=="function"?Dt.apply(this,arguments):Dt)),Un=Mn*(on<0?-1:1),Gn=v.sum(Pr),Ja=Gn?(on-hr*Un)/Gn:0,Qn=v.range(hr),ba=[],Ca;return He!=null&&Qn.sort(He===gh?function(Xa,ei){return Pr[ei]-Pr[Xa]}:function(Xa,ei){return He(dr[Xa],dr[ei])}),Qn.forEach(function(Xa){ba[Xa]={data:dr[Xa],value:Ca=Pr[Xa],startAngle:ln,endAngle:ln+=Ca*Ja+Un,padAngle:Mn}}),ba}return qt.value=function(dr){return arguments.length?(Te=dr,qt):Te},qt.sort=function(dr){return arguments.length?(He=dr,qt):He},qt.startAngle=function(dr){return arguments.length?(ft=dr,qt):ft},qt.endAngle=function(dr){return arguments.length?(Lt=dr,qt):Lt},qt.padAngle=function(dr){return arguments.length?(Dt=dr,qt):Dt},qt};var gh={};v.layout.stack=function(){var Te=U,He=hd,ft=_h,Lt=jh,Dt=Bh,qt=nf;function dr(hr,Pr){if(!(Ja=hr.length))return hr;var ln=hr.map(function(Xa,ei){return Te.call(dr,Xa,ei)}),on=ln.map(function(Xa){return Xa.map(function(ei,Ma){return[Dt.call(dr,ei,Ma),qt.call(dr,ei,Ma)]})}),Mn=He.call(dr,on,Pr);ln=v.permute(ln,Mn),on=v.permute(on,Mn);var Un=ft.call(dr,on,Pr),Gn=ln[0].length,Ja,Qn,ba,Ca;for(ba=0;ba<Gn;++ba)for(Lt.call(dr,ln[0][ba],Ca=Un[ba],on[0][ba][1]),Qn=1;Qn<Ja;++Qn)Lt.call(dr,ln[Qn][ba],Ca+=on[Qn-1][ba][1],on[Qn][ba][1]);return hr}return dr.values=function(hr){return arguments.length?(Te=hr,dr):Te},dr.order=function(hr){return arguments.length?(He=typeof hr=="function"?hr:gc.get(hr)||hd,dr):He},dr.offset=function(hr){return arguments.length?(ft=typeof hr=="function"?hr:yh.get(hr)||_h,dr):ft},dr.x=function(hr){return arguments.length?(Dt=hr,dr):Dt},dr.y=function(hr){return arguments.length?(qt=hr,dr):qt},dr.out=function(hr){return arguments.length?(Lt=hr,dr):Lt},dr};function Bh(Te){return Te.x}function nf(Te){return Te.y}function jh(Te,He,ft){Te.y0=He,Te.y=ft}var gc=v.map({"inside-out":function(Te){var He=Te.length,ft,Lt,Dt=Te.map(du),qt=Te.map(Wc),dr=v.range(He).sort(function(Mn,Un){return Dt[Mn]-Dt[Un]}),hr=0,Pr=0,ln=[],on=[];for(ft=0;ft<He;++ft)Lt=dr[ft],hr<Pr?(hr+=qt[Lt],ln.push(Lt)):(Pr+=qt[Lt],on.push(Lt));return on.reverse().concat(ln)},reverse:function(Te){return v.range(Te.length).reverse()},default:hd}),yh=v.map({silhouette:function(Te){var He=Te.length,ft=Te[0].length,Lt=[],Dt=0,qt,dr,hr,Pr=[];for(dr=0;dr<ft;++dr){for(qt=0,hr=0;qt<He;qt++)hr+=Te[qt][dr][1];hr>Dt&&(Dt=hr),Lt.push(hr)}for(dr=0;dr<ft;++dr)Pr[dr]=(Dt-Lt[dr])/2;return Pr},wiggle:function(Te){var He=Te.length,ft=Te[0],Lt=ft.length,Dt,qt,dr,hr,Pr,ln,on,Mn,Un,Gn=[];for(Gn[0]=Mn=Un=0,qt=1;qt<Lt;++qt){for(Dt=0,hr=0;Dt<He;++Dt)hr+=Te[Dt][qt][1];for(Dt=0,Pr=0,on=ft[qt][0]-ft[qt-1][0];Dt<He;++Dt){for(dr=0,ln=(Te[Dt][qt][1]-Te[Dt][qt-1][1])/(2*on);dr<Dt;++dr)ln+=(Te[dr][qt][1]-Te[dr][qt-1][1])/on;Pr+=ln*Te[Dt][qt][1]}Gn[qt]=Mn-=hr?Pr/hr*on:0,Mn<Un&&(Un=Mn)}for(qt=0;qt<Lt;++qt)Gn[qt]-=Un;return Gn},expand:function(Te){var He=Te.length,ft=Te[0].length,Lt=1/He,Dt,qt,dr,hr=[];for(qt=0;qt<ft;++qt){for(Dt=0,dr=0;Dt<He;Dt++)dr+=Te[Dt][qt][1];if(dr)for(Dt=0;Dt<He;Dt++)Te[Dt][qt][1]/=dr;else for(Dt=0;Dt<He;Dt++)Te[Dt][qt][1]=Lt}for(qt=0;qt<ft;++qt)hr[qt]=0;return hr},zero:_h});function hd(Te){return v.range(Te.length)}function _h(Te){for(var He=-1,ft=Te[0].length,Lt=[];++He<ft;)Lt[He]=0;return Lt}function du(Te){for(var He=1,ft=0,Lt=Te[0][1],Dt,qt=Te.length;He<qt;++He)(Dt=Te[He][1])>Lt&&(ft=He,Lt=Dt);return ft}function Wc(Te){return Te.reduce(gf,0)}function gf(Te,He){return Te+He[1]}v.layout.histogram=function(){var Te=!0,He=Number,ft=Mh,Lt=td;function Dt(qt,Un){for(var hr=[],Pr=qt.map(He,this),ln=ft.call(this,Pr,Un),on=Lt.call(this,ln,Pr,Un),Mn,Un=-1,Gn=Pr.length,Ja=on.length-1,Qn=Te?1:1/Gn,ba;++Un<Ja;)Mn=hr[Un]=[],Mn.dx=on[Un+1]-(Mn.x=on[Un]),Mn.y=0;if(Ja>0)for(Un=-1;++Un<Gn;)ba=Pr[Un],ba>=ln[0]&&ba<=ln[1]&&(Mn=hr[v.bisect(on,ba,1,Ja)-1],Mn.y+=Qn,Mn.push(qt[Un]));return hr}return Dt.value=function(qt){return arguments.length?(He=qt,Dt):He},Dt.range=function(qt){return arguments.length?(ft=It(qt),Dt):ft},Dt.bins=function(qt){return arguments.length?(Lt=typeof qt=="number"?function(dr){return gu(dr,qt)}:It(qt),Dt):Lt},Dt.frequency=function(qt){return arguments.length?(Te=!!qt,Dt):Te},Dt};function td(Te,He){return gu(Te,Math.ceil(Math.log(He.length)/Math.LN2+1))}function gu(Te,He){for(var ft=-1,Lt=+Te[0],Dt=(Te[1]-Lt)/He,qt=[];++ft<=He;)qt[ft]=Dt*ft+Lt;return qt}function Mh(Te){return[v.min(Te),v.max(Te)]}v.layout.pack=function(){var Te=v.layout.hierarchy().sort(th),He=0,ft=[1,1],Lt;function Dt(qt,dr){var hr=Te.call(this,qt,dr),Pr=hr[0],ln=ft[0],on=ft[1],Mn=Lt==null?Math.sqrt:typeof Lt=="function"?Lt:function(){return Lt};if(Pr.x=Pr.y=0,Sf(Pr,function(Gn){Gn.r=+Mn(Gn.value)}),Sf(Pr,kh),He){var Un=He*(Lt?1:Math.max(2*Pr.r/ln,2*Pr.r/on))/2;Sf(Pr,function(Gn){Gn.r+=Un}),Sf(Pr,kh),Sf(Pr,function(Gn){Gn.r-=Un})}return dd(Pr,ln/2,on/2,Lt?1:1/Math.max(2*Pr.r/ln,2*Pr.r/on)),hr}return Dt.size=function(qt){return arguments.length?(ft=qt,Dt):ft},Dt.radius=function(qt){return arguments.length?(Lt=qt==null||typeof qt=="function"?qt:+qt,Dt):Lt},Dt.padding=function(qt){return arguments.length?(He=+qt,Dt):He},bu(Dt,Te)};function th(Te,He){return Te.value-He.value}function af(Te,He){var ft=Te._pack_next;Te._pack_next=He,He._pack_prev=Te,He._pack_next=ft,ft._pack_prev=He}function Ch(Te,He){Te._pack_next=He,He._pack_prev=Te}function Ef(Te,He){var ft=He.x-Te.x,Lt=He.y-Te.y,Dt=Te.r+He.r;return .999*Dt*Dt>ft*ft+Lt*Lt}function kh(Te){if(!(He=Te.children)||!(Un=He.length))return;var He,ft=1/0,Lt=-1/0,Dt=1/0,qt=-1/0,dr,hr,Pr,ln,on,Mn,Un;function Gn(Ma){ft=Math.min(Ma.x-Ma.r,ft),Lt=Math.max(Ma.x+Ma.r,Lt),Dt=Math.min(Ma.y-Ma.r,Dt),qt=Math.max(Ma.y+Ma.r,qt)}if(He.forEach($d),dr=He[0],dr.x=-dr.r,dr.y=0,Gn(dr),Un>1&&(hr=He[1],hr.x=hr.r,hr.y=0,Gn(hr),Un>2))for(Pr=He[2],of(dr,hr,Pr),Gn(Pr),af(dr,Pr),dr._pack_prev=Pr,af(Pr,hr),hr=dr._pack_next,ln=3;ln<Un;ln++){of(dr,hr,Pr=He[ln]);var Ja=0,Qn=1,ba=1;for(on=hr._pack_next;on!==hr;on=on._pack_next,Qn++)if(Ef(on,Pr)){Ja=1;break}if(Ja==1)for(Mn=dr._pack_prev;Mn!==on._pack_prev&&!Ef(Mn,Pr);Mn=Mn._pack_prev,ba++);Ja?(Qn<ba||Qn==ba&&hr.r<dr.r?Ch(dr,hr=on):Ch(dr=Mn,hr),ln--):(af(dr,Pr),hr=Pr,Gn(Pr))}var Ca=(ft+Lt)/2,Xa=(Dt+qt)/2,ei=0;for(ln=0;ln<Un;ln++)Pr=He[ln],Pr.x-=Ca,Pr.y-=Xa,ei=Math.max(ei,Pr.r+Math.sqrt(Pr.x*Pr.x+Pr.y*Pr.y));Te.r=ei,He.forEach(xc)}function $d(Te){Te._pack_next=Te._pack_prev=Te}function xc(Te){delete Te._pack_next,delete Te._pack_prev}function dd(Te,He,ft,Lt){var Dt=Te.children;if(Te.x=He+=Lt*Te.x,Te.y=ft+=Lt*Te.y,Te.r*=Lt,Dt)for(var qt=-1,dr=Dt.length;++qt<dr;)dd(Dt[qt],He,ft,Lt)}function of(Te,He,ft){var Lt=Te.r+ft.r,Dt=He.x-Te.x,qt=He.y-Te.y;if(Lt&&(Dt||qt)){var dr=He.r+ft.r,hr=Dt*Dt+qt*qt;dr*=dr,Lt*=Lt;var Pr=.5+(Lt-dr)/(2*hr),ln=Math.sqrt(Math.max(0,2*dr*(Lt+hr)-(Lt-=hr)*Lt-dr*dr))/(2*hr);ft.x=Te.x+Pr*Dt+ln*qt,ft.y=Te.y+Pr*qt-ln*Dt}else ft.x=Te.x+Lt,ft.y=Te.y}v.layout.tree=function(){var Te=v.layout.hierarchy().sort(null).value(null),He=Bf,ft=[1,1],Lt=null;function Dt(on,Mn){var Un=Te.call(this,on,Mn),Gn=Un[0],Ja=qt(Gn);if(Sf(Ja,dr),Ja.parent.m=-Ja.z,mh(Ja,hr),Lt)mh(Gn,ln);else{var Qn=Gn,ba=Gn,Ca=Gn;mh(Gn,function(Ci){Ci.x<Qn.x&&(Qn=Ci),Ci.x>ba.x&&(ba=Ci),Ci.depth>Ca.depth&&(Ca=Ci)});var Xa=He(Qn,ba)/2-Qn.x,ei=ft[0]/(ba.x+He(ba,Qn)/2+Xa),Ma=ft[1]/(Ca.depth||1);mh(Gn,function(Ci){Ci.x=(Ci.x+Xa)*ei,Ci.y=Ci.depth*Ma})}return Un}function qt(on){for(var Mn={A:null,children:[on]},Un=[Mn],Gn;(Gn=Un.pop())!=null;)for(var Ja=Gn.children,Qn,ba=0,Ca=Ja.length;ba<Ca;++ba)Un.push((Ja[ba]=Qn={_:Ja[ba],parent:Gn,children:(Qn=Ja[ba].children)&&Qn.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:ba}).a=Qn);return Mn.children[0]}function dr(on){var Mn=on.children,Un=on.parent.children,Gn=on.i?Un[on.i-1]:null;if(Mn.length){Su(on);var Ja=(Mn[0].z+Mn[Mn.length-1].z)/2;Gn?(on.z=Gn.z+He(on._,Gn._),on.m=on.z-Ja):on.z=Ja}else Gn&&(on.z=Gn.z+He(on._,Gn._));on.parent.A=Pr(on,Gn,on.parent.A||Un[0])}function hr(on){on._.x=on.z+on.parent.m,on.m+=on.parent.m}function Pr(on,Mn,Un){if(Mn){for(var Gn=on,Ja=on,Qn=Mn,ba=Gn.parent.children[0],Ca=Gn.m,Xa=Ja.m,ei=Qn.m,Ma=ba.m,Ci;Qn=Du(Qn),Gn=Mf(Gn),Qn&&Gn;)ba=Mf(ba),Ja=Du(Ja),Ja.a=on,Ci=Qn.z+ei-Gn.z-Ca+He(Qn._,Gn._),Ci>0&&(Rc(rh(Qn,on,Un),on,Ci),Ca+=Ci,Xa+=Ci),ei+=Qn.m,Ca+=Gn.m,Ma+=ba.m,Xa+=Ja.m;Qn&&!Du(Ja)&&(Ja.t=Qn,Ja.m+=ei-Xa),Gn&&!Mf(ba)&&(ba.t=Gn,ba.m+=Ca-Ma,Un=on)}return Un}function ln(on){on.x*=ft[0],on.y=on.depth*ft[1]}return Dt.separation=function(on){return arguments.length?(He=on,Dt):He},Dt.size=function(on){return arguments.length?(Lt=(ft=on)==null?ln:null,Dt):Lt?null:ft},Dt.nodeSize=function(on){return arguments.length?(Lt=(ft=on)==null?null:ln,Dt):Lt?ft:null},bu(Dt,Te)};function Bf(Te,He){return Te.parent==He.parent?1:2}function Mf(Te){var He=Te.children;return He.length?He[0]:Te.t}function Du(Te){var He=Te.children,ft;return(ft=He.length)?He[ft-1]:Te.t}function Rc(Te,He,ft){var Lt=ft/(He.i-Te.i);He.c-=Lt,He.s+=ft,Te.c+=Lt,He.z+=ft,He.m+=ft}function Su(Te){for(var He=0,ft=0,Lt=Te.children,Dt=Lt.length,qt;--Dt>=0;)qt=Lt[Dt],qt.z+=He,qt.m+=He,He+=qt.s+(ft+=qt.c)}function rh(Te,He,ft){return Te.a.parent===He.parent?Te.a:ft}v.layout.cluster=function(){var Te=v.layout.hierarchy().sort(null).value(null),He=Bf,ft=[1,1],Lt=!1;function Dt(qt,dr){var hr=Te.call(this,qt,dr),Pr=hr[0],ln,on=0;Sf(Pr,function(Qn){var ba=Qn.children;ba&&ba.length?(Qn.x=rd(ba),Qn.y=Cf(ba)):(Qn.x=ln?on+=He(Qn,ln):0,Qn.y=0,ln=Qn)});var Mn=wr(Pr),Un=Gr(Pr),Gn=Mn.x-He(Mn,Un)/2,Ja=Un.x+He(Un,Mn)/2;return Sf(Pr,Lt?function(Qn){Qn.x=(Qn.x-Pr.x)*ft[0],Qn.y=(Pr.y-Qn.y)*ft[1]}:function(Qn){Qn.x=(Qn.x-Gn)/(Ja-Gn)*ft[0],Qn.y=(1-(Pr.y?Qn.y/Pr.y:1))*ft[1]}),hr}return Dt.separation=function(qt){return arguments.length?(He=qt,Dt):He},Dt.size=function(qt){return arguments.length?(Lt=(ft=qt)==null,Dt):Lt?null:ft},Dt.nodeSize=function(qt){return arguments.length?(Lt=(ft=qt)!=null,Dt):Lt?ft:null},bu(Dt,Te)};function Cf(Te){return 1+v.max(Te,function(He){return He.y})}function rd(Te){return Te.reduce(function(He,ft){return He+ft.x},0)/Te.length}function wr(Te){var He=Te.children;return He&&He.length?wr(He[0]):Te}function Gr(Te){var He=Te.children,ft;return He&&(ft=He.length)?Gr(He[ft-1]):Te}v.layout.treemap=function(){var Te=v.layout.hierarchy(),He=Math.round,ft=[1,1],Lt=null,Dt=kn,qt=!1,dr,hr="squarify",Pr=.5*(1+Math.sqrt(5));function ln(Qn,ba){for(var Ca=-1,Xa=Qn.length,ei,Ma;++Ca<Xa;)Ma=(ei=Qn[Ca]).value*(ba<0?0:ba),ei.area=isNaN(Ma)||Ma<=0?0:Ma}function on(Qn){var ba=Qn.children;if(ba&&ba.length){var Ca=Dt(Qn),Xa=[],ei=ba.slice(),Ma,Ci=1/0,po,ro=hr==="slice"?Ca.dx:hr==="dice"?Ca.dy:hr==="slice-dice"?Qn.depth&1?Ca.dy:Ca.dx:Math.min(Ca.dx,Ca.dy),fo;for(ln(ei,Ca.dx*Ca.dy/Qn.value),Xa.area=0;(fo=ei.length)>0;)Xa.push(Ma=ei[fo-1]),Xa.area+=Ma.area,hr!=="squarify"||(po=Un(Xa,ro))<=Ci?(ei.pop(),Ci=po):(Xa.area-=Xa.pop().area,Gn(Xa,ro,Ca,!1),ro=Math.min(Ca.dx,Ca.dy),Xa.length=Xa.area=0,Ci=1/0);Xa.length&&(Gn(Xa,ro,Ca,!0),Xa.length=Xa.area=0),ba.forEach(on)}}function Mn(Qn){var ba=Qn.children;if(ba&&ba.length){var Ca=Dt(Qn),Xa=ba.slice(),ei,Ma=[];for(ln(Xa,Ca.dx*Ca.dy/Qn.value),Ma.area=0;ei=Xa.pop();)Ma.push(ei),Ma.area+=ei.area,ei.z!=null&&(Gn(Ma,ei.z?Ca.dx:Ca.dy,Ca,!Xa.length),Ma.length=Ma.area=0);ba.forEach(Mn)}}function Un(Qn,ba){for(var Ca=Qn.area,Xa,ei=0,Ma=1/0,Ci=-1,po=Qn.length;++Ci<po;)(Xa=Qn[Ci].area)&&(Xa<Ma&&(Ma=Xa),Xa>ei&&(ei=Xa));return Ca*=Ca,ba*=ba,Ca?Math.max(ba*ei*Pr/Ca,Ca/(ba*Ma*Pr)):1/0}function Gn(Qn,ba,Ca,Xa){var ei=-1,Ma=Qn.length,Ci=Ca.x,po=Ca.y,ro=ba?He(Qn.area/ba):0,fo;if(ba==Ca.dx){for((Xa||ro>Ca.dy)&&(ro=Ca.dy);++ei<Ma;)fo=Qn[ei],fo.x=Ci,fo.y=po,fo.dy=ro,Ci+=fo.dx=Math.min(Ca.x+Ca.dx-Ci,ro?He(fo.area/ro):0);fo.z=!0,fo.dx+=Ca.x+Ca.dx-Ci,Ca.y+=ro,Ca.dy-=ro}else{for((Xa||ro>Ca.dx)&&(ro=Ca.dx);++ei<Ma;)fo=Qn[ei],fo.x=Ci,fo.y=po,fo.dx=ro,po+=fo.dy=Math.min(Ca.y+Ca.dy-po,ro?He(fo.area/ro):0);fo.z=!1,fo.dy+=Ca.y+Ca.dy-po,Ca.x+=ro,Ca.dx-=ro}}function Ja(Qn){var ba=dr||Te(Qn),Ca=ba[0];return Ca.x=Ca.y=0,Ca.value?(Ca.dx=ft[0],Ca.dy=ft[1]):Ca.dx=Ca.dy=0,dr&&Te.revalue(Ca),ln([Ca],Ca.dx*Ca.dy/Ca.value),(dr?Mn:on)(Ca),qt&&(dr=ba),ba}return Ja.size=function(Qn){return arguments.length?(ft=Qn,Ja):ft},Ja.padding=function(Qn){if(!arguments.length)return Lt;function ba(ei){var Ma=Qn.call(Ja,ei,ei.depth);return Ma==null?kn(ei):_n(ei,typeof Ma=="number"?[Ma,Ma,Ma,Ma]:Ma)}function Ca(ei){return _n(ei,Qn)}var Xa;return Dt=(Lt=Qn)==null?kn:(Xa=typeof Qn)=="function"?ba:(Xa==="number"&&(Qn=[Qn,Qn,Qn,Qn]),Ca),Ja},Ja.round=function(Qn){return arguments.length?(He=Qn?Math.round:Number,Ja):He!=Number},Ja.sticky=function(Qn){return arguments.length?(qt=Qn,dr=null,Ja):qt},Ja.ratio=function(Qn){return arguments.length?(Pr=Qn,Ja):Pr},Ja.mode=function(Qn){return arguments.length?(hr=Qn+"",Ja):hr},bu(Ja,Te)};function kn(Te){return{x:Te.x,y:Te.y,dx:Te.dx,dy:Te.dy}}function _n(Te,He){var ft=Te.x+He[3],Lt=Te.y+He[0],Dt=Te.dx-He[1]-He[3],qt=Te.dy-He[0]-He[2];return Dt<0&&(ft+=Dt/2,Dt=0),qt<0&&(Lt+=qt/2,qt=0),{x:ft,y:Lt,dx:Dt,dy:qt}}v.random={normal:function(Te,He){var ft=arguments.length;return ft<2&&(He=1),ft<1&&(Te=0),function(){var Lt,Dt,qt;do Lt=Math.random()*2-1,Dt=Math.random()*2-1,qt=Lt*Lt+Dt*Dt;while(!qt||qt>1);return Te+He*Lt*Math.sqrt(-2*Math.log(qt)/qt)}},logNormal:function(){var Te=v.random.normal.apply(v,arguments);return function(){return Math.exp(Te())}},bates:function(Te){var He=v.random.irwinHall(Te);return function(){return He()/Te}},irwinHall:function(Te){return function(){for(var He=0,ft=0;ft<Te;ft++)He+=Math.random();return He}}},v.scale={};function ta(Te){var He=Te[0],ft=Te[Te.length-1];return He<ft?[He,ft]:[ft,He]}function Ga(Te){return Te.rangeExtent?Te.rangeExtent():ta(Te.range())}function ja(Te,He,ft,Lt){var Dt=ft(Te[0],Te[1]),qt=Lt(He[0],He[1]);return function(dr){return qt(Dt(dr))}}function Ai(Te,He){var ft=0,Lt=Te.length-1,Dt=Te[ft],qt=Te[Lt],dr;return qt<Dt&&(dr=ft,ft=Lt,Lt=dr,dr=Dt,Dt=qt,qt=dr),Te[ft]=He.floor(Dt),Te[Lt]=He.ceil(qt),Te}function Ii(Te){return Te?{floor:function(He){return Math.floor(He/Te)*Te},ceil:function(He){return Math.ceil(He/Te)*Te}}:oo}var oo={floor:U,ceil:U};function hi(Te,He,ft,Lt){var Dt=[],qt=[],dr=0,hr=Math.min(Te.length,He.length)-1;for(Te[hr]<Te[0]&&(Te=Te.slice().reverse(),He=He.slice().reverse());++dr<=hr;)Dt.push(ft(Te[dr-1],Te[dr])),qt.push(Lt(He[dr-1],He[dr]));return function(Pr){var ln=v.bisect(Te,Pr,1,hr)-1;return qt[ln](Dt[ln](Pr))}}v.scale.linear=function(){return Gi([0,1],[0,1],el,!1)};function Gi(Te,He,ft,Lt){var Dt,qt;function dr(){var Pr=Math.min(Te.length,He.length)>2?hi:ja,ln=Lt?ud:Yd;return Dt=Pr(Te,He,ln,ft),qt=Pr(He,Te,ln,el),hr}function hr(Pr){return Dt(Pr)}return hr.invert=function(Pr){return qt(Pr)},hr.domain=function(Pr){return arguments.length?(Te=Pr.map(Number),dr()):Te},hr.range=function(Pr){return arguments.length?(He=Pr,dr()):He},hr.rangeRound=function(Pr){return hr.range(Pr).interpolate(Jf)},hr.clamp=function(Pr){return arguments.length?(Lt=Pr,dr()):Lt},hr.interpolate=function(Pr){return arguments.length?(ft=Pr,dr()):ft},hr.ticks=function(Pr){return es(Te,Pr)},hr.tickFormat=function(Pr,ln){return d3_scale_linearTickFormat(Te,Pr,ln)},hr.nice=function(Pr){return si(Te,Pr),dr()},hr.copy=function(){return Gi(Te,He,ft,Lt)},dr()}function wi(Te,He){return v.rebind(Te,He,"range","rangeRound","interpolate","clamp")}function si(Te,He){return Ai(Te,Ii(vo(Te,He)[2])),Ai(Te,Ii(vo(Te,He)[2])),Te}function vo(Te,He){He==null&&(He=10);var ft=ta(Te),Lt=ft[1]-ft[0],Dt=Math.pow(10,Math.floor(Math.log(Lt/He)/Math.LN10)),qt=He/Lt*Dt;return qt<=.15?Dt*=10:qt<=.35?Dt*=5:qt<=.75&&(Dt*=2),ft[0]=Math.ceil(ft[0]/Dt)*Dt,ft[1]=Math.floor(ft[1]/Dt)*Dt+Dt*.5,ft[2]=Dt,ft}function es(Te,He){return v.range.apply(v,vo(Te,He))}v.scale.log=function(){return $o(v.scale.linear().domain([0,1]),10,!0,[1,10])};function $o(Te,He,ft,Lt){function Dt(hr){return(ft?Math.log(hr<0?0:hr):-Math.log(hr>0?0:-hr))/Math.log(He)}function qt(hr){return ft?Math.pow(He,hr):-Math.pow(He,-hr)}function dr(hr){return Te(Dt(hr))}return dr.invert=function(hr){return qt(Te.invert(hr))},dr.domain=function(hr){return arguments.length?(ft=hr[0]>=0,Te.domain((Lt=hr.map(Number)).map(Dt)),dr):Lt},dr.base=function(hr){return arguments.length?(He=+hr,Te.domain(Lt.map(Dt)),dr):He},dr.nice=function(){var hr=Ai(Lt.map(Dt),ft?Math:is);return Te.domain(hr),Lt=hr.map(qt),dr},dr.ticks=function(){var hr=ta(Lt),Pr=[],ln=hr[0],on=hr[1],Mn=Math.floor(Dt(ln)),Un=Math.ceil(Dt(on)),Gn=He%1?2:He;if(isFinite(Un-Mn)){if(ft){for(;Mn<Un;Mn++)for(var Ja=1;Ja<Gn;Ja++)Pr.push(qt(Mn)*Ja);Pr.push(qt(Mn))}else for(Pr.push(qt(Mn));Mn++<Un;)for(var Ja=Gn-1;Ja>0;Ja--)Pr.push(qt(Mn)*Ja);for(Mn=0;Pr[Mn]<ln;Mn++);for(Un=Pr.length;Pr[Un-1]>on;Un--);Pr=Pr.slice(Mn,Un)}return Pr},dr.copy=function(){return $o(Te.copy(),He,ft,Lt)},wi(dr,Te)}var is={floor:function(Te){return-Math.ceil(-Te)},ceil:function(Te){return-Math.floor(-Te)}};v.scale.pow=function(){return rs(v.scale.linear(),1,[0,1])};function rs(Te,He,ft){var Lt=mo(He),Dt=mo(1/He);function qt(dr){return Te(Lt(dr))}return qt.invert=function(dr){return Dt(Te.invert(dr))},qt.domain=function(dr){return arguments.length?(Te.domain((ft=dr.map(Number)).map(Lt)),qt):ft},qt.ticks=function(dr){return es(ft,dr)},qt.tickFormat=function(dr,hr){return d3_scale_linearTickFormat(ft,dr,hr)},qt.nice=function(dr){return qt.domain(si(ft,dr))},qt.exponent=function(dr){return arguments.length?(Lt=mo(He=dr),Dt=mo(1/He),Te.domain(ft.map(Lt)),qt):He},qt.copy=function(){return rs(Te.copy(),He,ft)},wi(qt,Te)}function mo(Te){return function(He){return He<0?-Math.pow(-He,Te):Math.pow(He,Te)}}v.scale.sqrt=function(){return v.scale.pow().exponent(.5)},v.scale.ordinal=function(){return Ji([],{t:"range",a:[[]]})};function Ji(Te,He){var ft,Lt,Dt;function qt(hr){return Lt[((ft.get(hr)||(He.t==="range"?ft.set(hr,Te.push(hr)):NaN))-1)%Lt.length]}function dr(hr,Pr){return v.range(Te.length).map(function(ln){return hr+Pr*ln})}return qt.domain=function(hr){if(!arguments.length)return Te;Te=[],ft=new M;for(var Pr=-1,ln=hr.length,on;++Pr<ln;)ft.has(on=hr[Pr])||ft.set(on,Te.push(on));return qt[He.t].apply(qt,He.a)},qt.range=function(hr){return arguments.length?(Lt=hr,Dt=0,He={t:"range",a:arguments},qt):Lt},qt.rangePoints=function(hr,Pr){arguments.length<2&&(Pr=0);var ln=hr[0],on=hr[1],Mn=Te.length<2?(ln=(ln+on)/2,0):(on-ln)/(Te.length-1+Pr);return Lt=dr(ln+Mn*Pr/2,Mn),Dt=0,He={t:"rangePoints",a:arguments},qt},qt.rangeRoundPoints=function(hr,Pr){arguments.length<2&&(Pr=0);var ln=hr[0],on=hr[1],Mn=Te.length<2?(ln=on=Math.round((ln+on)/2),0):(on-ln)/(Te.length-1+Pr)|0;return Lt=dr(ln+Math.round(Mn*Pr/2+(on-ln-(Te.length-1+Pr)*Mn)/2),Mn),Dt=0,He={t:"rangeRoundPoints",a:arguments},qt},qt.rangeBands=function(hr,Pr,ln){arguments.length<2&&(Pr=0),arguments.length<3&&(ln=Pr);var on=hr[1]<hr[0],Mn=hr[on-0],Un=hr[1-on],Gn=(Un-Mn)/(Te.length-Pr+2*ln);return Lt=dr(Mn+Gn*ln,Gn),on&&Lt.reverse(),Dt=Gn*(1-Pr),He={t:"rangeBands",a:arguments},qt},qt.rangeRoundBands=function(hr,Pr,ln){arguments.length<2&&(Pr=0),arguments.length<3&&(ln=Pr);var on=hr[1]<hr[0],Mn=hr[on-0],Un=hr[1-on],Gn=Math.floor((Un-Mn)/(Te.length-Pr+2*ln));return Lt=dr(Mn+Math.round((Un-Mn-(Te.length-Pr)*Gn)/2),Gn),on&&Lt.reverse(),Dt=Math.round(Gn*(1-Pr)),He={t:"rangeRoundBands",a:arguments},qt},qt.rangeBand=function(){return Dt},qt.rangeExtent=function(){return ta(He.a[0])},qt.copy=function(){return Ji(Te,He)},qt.domain(Te)}v.scale.category10=function(){return v.scale.ordinal().range(gs)},v.scale.category20=function(){return v.scale.ordinal().range($s)},v.scale.category20b=function(){return v.scale.ordinal().range(Nl)},v.scale.category20c=function(){return v.scale.ordinal().range(au)};var gs=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(Ht),$s=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(Ht),Nl=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(Ht),au=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(Ht);v.scale.quantile=function(){return Bl([],[])};function Bl(Te,He){var ft;function Lt(){var qt=0,dr=He.length;for(ft=[];++qt<dr;)ft[qt-1]=v.quantile(Te,qt/dr);return Dt}function Dt(qt){if(!isNaN(qt=+qt))return He[v.bisect(ft,qt)]}return Dt.domain=function(qt){return arguments.length?(Te=qt.map(d).filter(h).sort(u),Lt()):Te},Dt.range=function(qt){return arguments.length?(He=qt,Lt()):He},Dt.quantiles=function(){return ft},Dt.invertExtent=function(qt){return qt=He.indexOf(qt),qt<0?[NaN,NaN]:[qt>0?ft[qt-1]:Te[0],qt<ft.length?ft[qt]:Te[Te.length-1]]},Dt.copy=function(){return Bl(Te,He)},Lt()}v.scale.quantize=function(){return iu(0,1,[0,1])};function iu(Te,He,ft){var Lt,Dt;function qt(hr){return ft[Math.max(0,Math.min(Dt,Math.floor(Lt*(hr-Te))))]}function dr(){return Lt=ft.length/(He-Te),Dt=ft.length-1,qt}return qt.domain=function(hr){return arguments.length?(Te=+hr[0],He=+hr[hr.length-1],dr()):[Te,He]},qt.range=function(hr){return arguments.length?(ft=hr,dr()):ft},qt.invertExtent=function(hr){return hr=ft.indexOf(hr),hr=hr<0?NaN:hr/Lt+Te,[hr,hr+1/Lt]},qt.copy=function(){return iu(Te,He,ft)},dr()}v.scale.threshold=function(){return hl([.5],[0,1])};function hl(Te,He){function ft(Lt){if(Lt<=Lt)return He[v.bisect(Te,Lt)]}return ft.domain=function(Lt){return arguments.length?(Te=Lt,ft):Te},ft.range=function(Lt){return arguments.length?(He=Lt,ft):He},ft.invertExtent=function(Lt){return Lt=He.indexOf(Lt),[Te[Lt-1],Te[Lt]]},ft.copy=function(){return hl(Te,He)},ft}v.scale.identity=function(){return Bu([0,1])};function Bu(Te){function He(ft){return+ft}return He.invert=He,He.domain=He.range=function(ft){return arguments.length?(Te=ft.map(He),He):Te},He.ticks=function(ft){return es(Te,ft)},He.tickFormat=function(ft,Lt){return d3_scale_linearTickFormat(Te,ft,Lt)},He.copy=function(){return Bu(Te)},He}v.svg={};function Ou(){return 0}v.svg.arc=function(){var Te=No,He=Ls,ft=Ou,Lt=eu,Dt=Wl,qt=Cl,dr=Ec;function hr(){var ln=Math.max(0,+Te.apply(this,arguments)),on=Math.max(0,+He.apply(this,arguments)),Mn=Dt.apply(this,arguments)-tt,Un=qt.apply(this,arguments)-tt,Gn=Math.abs(Un-Mn),Ja=Mn>Un?0:1;if(on<ln&&(Qn=on,on=ln,ln=Qn),Gn>=Ie)return Pr(on,Ja)+(ln?Pr(ln,1-Ja):"")+"Z";var Qn,ba,Ca,Xa,ei=0,Ma=0,Ci,po,ro,fo,Fo,Ho,il,Wo,bs=[];if((Xa=(+dr.apply(this,arguments)||0)/2)&&(Ca=Lt===eu?Math.sqrt(ln*ln+on*on):+Lt.apply(this,arguments),Ja||(Ma*=-1),on&&(Ma=Wt(Ca/on*Math.sin(Xa))),ln&&(ei=Wt(Ca/ln*Math.sin(Xa)))),on){Ci=on*Math.cos(Mn+Ma),po=on*Math.sin(Mn+Ma),ro=on*Math.cos(Un-Ma),fo=on*Math.sin(Un-Ma);var dl=Math.abs(Un-Mn-2*Ma)<=Ee?0:1;if(Ma&&Mc(Ci,po,ro,fo)===Ja^dl){var Gu=(Mn+Un)/2;Ci=on*Math.cos(Gu),po=on*Math.sin(Gu),ro=fo=null}}else Ci=po=0;if(ln){Fo=ln*Math.cos(Un-ei),Ho=ln*Math.sin(Un-ei),il=ln*Math.cos(Mn+ei),Wo=ln*Math.sin(Mn+ei);var fu=Math.abs(Mn-Un+2*ei)<=Ee?0:1;if(ei&&Mc(Fo,Ho,il,Wo)===1-Ja^fu){var ko=(Mn+Un)/2;Fo=ln*Math.cos(ko),Ho=ln*Math.sin(ko),il=Wo=null}}else Fo=Ho=0;if(Gn>ot&&(Qn=Math.min(Math.abs(on-ln)/2,+ft.apply(this,arguments)))>.001){ba=ln<on^Ja?0:1;var Vs=Qn,ul=Qn;if(Gn<Ee){var ou=il==null?[Fo,Ho]:ro==null?[Ci,po]:As([Ci,po],[il,Wo],[ro,fo],[Fo,Ho]),Yl=Ci-ou[0],Dc=po-ou[1],jl=ro-ou[0],su=fo-ou[1],lf=1/Math.sin(Math.acos((Yl*jl+Dc*su)/(Math.sqrt(Yl*Yl+Dc*Dc)*Math.sqrt(jl*jl+su*su)))/2),Uu=Math.sqrt(ou[0]*ou[0]+ou[1]*ou[1]);ul=Math.min(Qn,(ln-Uu)/(lf-1)),Vs=Math.min(Qn,(on-Uu)/(lf+1))}if(ro!=null){var St=Ic(il==null?[Fo,Ho]:[il,Wo],[Ci,po],on,Vs,Ja),kr=Ic([ro,fo],[Fo,Ho],on,Vs,Ja);Qn===Vs?bs.push("M",St[0],"A",Vs,",",Vs," 0 0,",ba," ",St[1],"A",on,",",on," 0 ",1-Ja^Mc(St[1][0],St[1][1],kr[1][0],kr[1][1]),",",Ja," ",kr[1],"A",Vs,",",Vs," 0 0,",ba," ",kr[0]):bs.push("M",St[0],"A",Vs,",",Vs," 0 1,",ba," ",kr[0])}else bs.push("M",Ci,",",po);if(il!=null){var Dr=Ic([Ci,po],[il,Wo],ln,-ul,Ja),Xn=Ic([Fo,Ho],ro==null?[Ci,po]:[ro,fo],ln,-ul,Ja);Qn===ul?bs.push("L",Xn[0],"A",ul,",",ul," 0 0,",ba," ",Xn[1],"A",ln,",",ln," 0 ",Ja^Mc(Xn[1][0],Xn[1][1],Dr[1][0],Dr[1][1]),",",1-Ja," ",Dr[1],"A",ul,",",ul," 0 0,",ba," ",Dr[0]):bs.push("L",Xn[0],"A",ul,",",ul," 0 0,",ba," ",Dr[0])}else bs.push("L",Fo,",",Ho)}else bs.push("M",Ci,",",po),ro!=null&&bs.push("A",on,",",on," 0 ",dl,",",Ja," ",ro,",",fo),bs.push("L",Fo,",",Ho),il!=null&&bs.push("A",ln,",",ln," 0 ",fu,",",1-Ja," ",il,",",Wo);return bs.push("Z"),bs.join("")}function Pr(ln,on){return"M0,"+ln+"A"+ln+","+ln+" 0 1,"+on+" 0,"+-ln+"A"+ln+","+ln+" 0 1,"+on+" 0,"+ln}return hr.innerRadius=function(ln){return arguments.length?(Te=It(ln),hr):Te},hr.outerRadius=function(ln){return arguments.length?(He=It(ln),hr):He},hr.cornerRadius=function(ln){return arguments.length?(ft=It(ln),hr):ft},hr.padRadius=function(ln){return arguments.length?(Lt=ln==eu?eu:It(ln),hr):Lt},hr.startAngle=function(ln){return arguments.length?(Dt=It(ln),hr):Dt},hr.endAngle=function(ln){return arguments.length?(qt=It(ln),hr):qt},hr.padAngle=function(ln){return arguments.length?(dr=It(ln),hr):dr},hr.centroid=function(){var ln=(+Te.apply(this,arguments)+ +He.apply(this,arguments))/2,on=(+Dt.apply(this,arguments)+ +qt.apply(this,arguments))/2-tt;return[Math.cos(on)*ln,Math.sin(on)*ln]},hr};var eu="auto";function No(Te){return Te.innerRadius}function Ls(Te){return Te.outerRadius}function Wl(Te){return Te.startAngle}function Cl(Te){return Te.endAngle}function Ec(Te){return Te&&Te.padAngle}function Mc(Te,He,ft,Lt){return(Te-ft)*He-(He-Lt)*Te>0?0:1}function Ic(Te,He,ft,Lt,Dt){var qt=Te[0]-He[0],dr=Te[1]-He[1],hr=(Dt?Lt:-Lt)/Math.sqrt(qt*qt+dr*dr),Pr=hr*dr,ln=-hr*qt,on=Te[0]+Pr,Mn=Te[1]+ln,Un=He[0]+Pr,Gn=He[1]+ln,Ja=(on+Un)/2,Qn=(Mn+Gn)/2,ba=Un-on,Ca=Gn-Mn,Xa=ba*ba+Ca*Ca,ei=ft-Lt,Ma=on*Gn-Un*Mn,Ci=(Ca<0?-1:1)*Math.sqrt(Math.max(0,ei*ei*Xa-Ma*Ma)),po=(Ma*Ca-ba*Ci)/Xa,ro=(-Ma*ba-Ca*Ci)/Xa,fo=(Ma*Ca+ba*Ci)/Xa,Fo=(-Ma*ba+Ca*Ci)/Xa,Ho=po-Ja,il=ro-Qn,Wo=fo-Ja,bs=Fo-Qn;return Ho*Ho+il*il>Wo*Wo+bs*bs&&(po=fo,ro=Fo),[[po-Pr,ro-ln],[po*ft/ei,ro*ft/ei]]}function uh(){return!0}function Cc(Te){var He=So,ft=Vo,Lt=uh,Dt=ju,qt=Dt.key,dr=.7;function hr(Pr){var ln=[],on=[],Mn=-1,Un=Pr.length,Gn,Ja=It(He),Qn=It(ft);function ba(){ln.push("M",Dt(Te(on),dr))}for(;++Mn<Un;)Lt.call(this,Gn=Pr[Mn],Mn)?on.push([+Ja.call(this,Gn,Mn),+Qn.call(this,Gn,Mn)]):on.length&&(ba(),on=[]);return on.length&&ba(),ln.length?ln.join(""):null}return hr.x=function(Pr){return arguments.length?(He=Pr,hr):He},hr.y=function(Pr){return arguments.length?(ft=Pr,hr):ft},hr.defined=function(Pr){return arguments.length?(Lt=Pr,hr):Lt},hr.interpolate=function(Pr){return arguments.length?(typeof Pr=="function"?qt=Dt=Pr:qt=(Dt=jf.get(Pr)||ju).key,hr):qt},hr.tension=function(Pr){return arguments.length?(dr=Pr,hr):dr},hr}v.svg.line=function(){return Cc(U)};var jf=v.map({linear:ju,"linear-closed":Uf,step:os,"step-before":_s,"step-after":qf,basis:Re,"basis-open":Oe,"basis-closed":We,bundle:Ct,cardinal:Ze,"cardinal-open":sf,"cardinal-closed":Yc,monotone:ct});jf.forEach(function(Te,He){He.key=Te,He.closed=/-closed$/.test(Te)});function ju(Te){return Te.length>1?Te.join("L"):Te+"Z"}function Uf(Te){return Te.join("L")+"Z"}function os(Te){for(var He=0,ft=Te.length,Lt=Te[0],Dt=[Lt[0],",",Lt[1]];++He<ft;)Dt.push("H",(Lt[0]+(Lt=Te[He])[0])/2,"V",Lt[1]);return ft>1&&Dt.push("H",Lt[0]),Dt.join("")}function _s(Te){for(var He=0,ft=Te.length,Lt=Te[0],Dt=[Lt[0],",",Lt[1]];++He<ft;)Dt.push("V",(Lt=Te[He])[1],"H",Lt[0]);return Dt.join("")}function qf(Te){for(var He=0,ft=Te.length,Lt=Te[0],Dt=[Lt[0],",",Lt[1]];++He<ft;)Dt.push("H",(Lt=Te[He])[0],"V",Lt[1]);return Dt.join("")}function sf(Te,He){return Te.length<4?ju(Te):Te[1]+O(Te.slice(1,-1),fe(Te,He))}function Yc(Te,He){return Te.length<3?Uf(Te):Te[0]+O((Te.push(Te[0]),Te),fe([Te[Te.length-2]].concat(Te,[Te[1]]),He))}function Ze(Te,He){return Te.length<3?ju(Te):Te[0]+O(Te,fe(Te,He))}function O(Te,He){if(He.length<1||Te.length!=He.length&&Te.length!=He.length+2)return ju(Te);var ft=Te.length!=He.length,Lt="",Dt=Te[0],qt=Te[1],dr=He[0],hr=dr,Pr=1;if(ft&&(Lt+="Q"+(qt[0]-dr[0]*2/3)+","+(qt[1]-dr[1]*2/3)+","+qt[0]+","+qt[1],Dt=Te[1],Pr=2),He.length>1){hr=He[1],qt=Te[Pr],Pr++,Lt+="C"+(Dt[0]+dr[0])+","+(Dt[1]+dr[1])+","+(qt[0]-hr[0])+","+(qt[1]-hr[1])+","+qt[0]+","+qt[1];for(var ln=2;ln<He.length;ln++,Pr++)qt=Te[Pr],hr=He[ln],Lt+="S"+(qt[0]-hr[0])+","+(qt[1]-hr[1])+","+qt[0]+","+qt[1]}if(ft){var on=Te[Pr];Lt+="Q"+(qt[0]+hr[0]*2/3)+","+(qt[1]+hr[1]*2/3)+","+on[0]+","+on[1]}return Lt}function fe(Te,He){for(var ft=[],Lt=(1-He)/2,Dt,qt=Te[0],dr=Te[1],hr=1,Pr=Te.length;++hr<Pr;)Dt=qt,qt=dr,dr=Te[hr],ft.push([Lt*(dr[0]-Dt[0]),Lt*(dr[1]-Dt[1])]);return ft}function Re(Te){if(Te.length<3)return ju(Te);var He=1,ft=Te.length,Lt=Te[0],Dt=Lt[0],qt=Lt[1],dr=[Dt,Dt,Dt,(Lt=Te[1])[0]],hr=[qt,qt,qt,Lt[1]],Pr=[Dt,",",qt,"L",Nt(Fr,dr),",",Nt(Fr,hr)];for(Te.push(Te[ft-1]);++He<=ft;)Lt=Te[He],dr.shift(),dr.push(Lt[0]),hr.shift(),hr.push(Lt[1]),Vr(Pr,dr,hr);return Te.pop(),Pr.push("L",Lt),Pr.join("")}function Oe(Te){if(Te.length<4)return ju(Te);for(var He=[],ft=-1,Lt=Te.length,Dt,qt=[0],dr=[0];++ft<3;)Dt=Te[ft],qt.push(Dt[0]),dr.push(Dt[1]);for(He.push(Nt(Fr,qt)+","+Nt(Fr,dr)),--ft;++ft<Lt;)Dt=Te[ft],qt.shift(),qt.push(Dt[0]),dr.shift(),dr.push(Dt[1]),Vr(He,qt,dr);return He.join("")}function We(Te){for(var He,ft=-1,Lt=Te.length,Dt=Lt+4,qt,dr=[],hr=[];++ft<4;)qt=Te[ft%Lt],dr.push(qt[0]),hr.push(qt[1]);for(He=[Nt(Fr,dr),",",Nt(Fr,hr)],--ft;++ft<Dt;)qt=Te[ft%Lt],dr.shift(),dr.push(qt[0]),hr.shift(),hr.push(qt[1]),Vr(He,dr,hr);return He.join("")}function Ct(Te,He){var ft=Te.length-1;if(ft)for(var Lt=Te[0][0],Dt=Te[0][1],qt=Te[ft][0]-Lt,dr=Te[ft][1]-Dt,hr=-1,Pr,ln;++hr<=ft;)Pr=Te[hr],ln=hr/ft,Pr[0]=He*Pr[0]+(1-He)*(Lt+ln*qt),Pr[1]=He*Pr[1]+(1-He)*(Dt+ln*dr);return Re(Te)}function Nt(Te,He){return Te[0]*He[0]+Te[1]*He[1]+Te[2]*He[2]+Te[3]*He[3]}var rr=[0,2/3,1/3,0],Tr=[0,1/3,2/3,0],Fr=[0,1/6,2/3,1/6];function Vr(Te,He,ft){Te.push("C",Nt(rr,He),",",Nt(rr,ft),",",Nt(Tr,He),",",Nt(Tr,ft),",",Nt(Fr,He),",",Nt(Fr,ft))}function mn(Te,He){return(He[1]-Te[1])/(He[0]-Te[0])}function Dn(Te){for(var He=0,ft=Te.length-1,Lt=[],Dt=Te[0],qt=Te[1],dr=Lt[0]=mn(Dt,qt);++He<ft;)Lt[He]=(dr+(dr=mn(Dt=qt,qt=Te[He+1])))/2;return Lt[He]=dr,Lt}function nt(Te){for(var He=[],ft,Lt,Dt,qt,dr=Dn(Te),hr=-1,Pr=Te.length-1;++hr<Pr;)ft=mn(Te[hr],Te[hr+1]),c(ft)<ot?dr[hr]=dr[hr+1]=0:(Lt=dr[hr]/ft,Dt=dr[hr+1]/ft,qt=Lt*Lt+Dt*Dt,qt>9&&(qt=ft*3/Math.sqrt(qt),dr[hr]=qt*Lt,dr[hr+1]=qt*Dt));for(hr=-1;++hr<=Pr;)qt=(Te[Math.min(Pr,hr+1)][0]-Te[Math.max(0,hr-1)][0])/(6*(1+dr[hr]*dr[hr])),He.push([qt||0,dr[hr]*qt||0]);return He}function ct(Te){return Te.length<3?ju(Te):Te[0]+O(Te,nt(Te))}v.svg.line.radial=function(){var Te=Cc(Tt);return Te.radius=Te.x,delete Te.x,Te.angle=Te.y,delete Te.y,Te};function Tt(Te){for(var He,ft=-1,Lt=Te.length,Dt,qt;++ft<Lt;)He=Te[ft],Dt=He[0],qt=He[1]-tt,He[0]=Dt*Math.cos(qt),He[1]=Dt*Math.sin(qt);return Te}function Pt(Te){var He=So,ft=So,Lt=0,Dt=Vo,qt=uh,dr=ju,hr=dr.key,Pr=dr,ln="L",on=.7;function Mn(Un){var Gn=[],Ja=[],Qn=[],ba=-1,Ca=Un.length,Xa,ei=It(He),Ma=It(Lt),Ci=He===ft?function(){return ro}:It(ft),po=Lt===Dt?function(){return fo}:It(Dt),ro,fo;function Fo(){Gn.push("M",dr(Te(Qn),on),ln,Pr(Te(Ja.reverse()),on),"Z")}for(;++ba<Ca;)qt.call(this,Xa=Un[ba],ba)?(Ja.push([ro=+ei.call(this,Xa,ba),fo=+Ma.call(this,Xa,ba)]),Qn.push([+Ci.call(this,Xa,ba),+po.call(this,Xa,ba)])):Ja.length&&(Fo(),Ja=[],Qn=[]);return Ja.length&&Fo(),Gn.length?Gn.join(""):null}return Mn.x=function(Un){return arguments.length?(He=ft=Un,Mn):ft},Mn.x0=function(Un){return arguments.length?(He=Un,Mn):He},Mn.x1=function(Un){return arguments.length?(ft=Un,Mn):ft},Mn.y=function(Un){return arguments.length?(Lt=Dt=Un,Mn):Dt},Mn.y0=function(Un){return arguments.length?(Lt=Un,Mn):Lt},Mn.y1=function(Un){return arguments.length?(Dt=Un,Mn):Dt},Mn.defined=function(Un){return arguments.length?(qt=Un,Mn):qt},Mn.interpolate=function(Un){return arguments.length?(typeof Un=="function"?hr=dr=Un:hr=(dr=jf.get(Un)||ju).key,Pr=dr.reverse||dr,ln=dr.closed?"M":"L",Mn):hr},Mn.tension=function(Un){return arguments.length?(on=Un,Mn):on},Mn}_s.reverse=qf,qf.reverse=_s,v.svg.area=function(){return Pt(U)},v.svg.area.radial=function(){var Te=Pt(Tt);return Te.radius=Te.x,delete Te.x,Te.innerRadius=Te.x0,delete Te.x0,Te.outerRadius=Te.x1,delete Te.x1,Te.angle=Te.y,delete Te.y,Te.startAngle=Te.y0,delete Te.y0,Te.endAngle=Te.y1,delete Te.y1,Te};function Gt(Te){return Te.source}function zt(Te){return Te.target}v.svg.chord=function(){var Te=Gt,He=zt,ft=Kt,Lt=Wl,Dt=Cl;function qt(on,Mn){var Un=dr(this,Te,on,Mn),Gn=dr(this,He,on,Mn);return"M"+Un.p0+Pr(Un.r,Un.p1,Un.a1-Un.a0)+(hr(Un,Gn)?ln(Un.r,Un.p1,Un.r,Un.p0):ln(Un.r,Un.p1,Gn.r,Gn.p0)+Pr(Gn.r,Gn.p1,Gn.a1-Gn.a0)+ln(Gn.r,Gn.p1,Un.r,Un.p0))+"Z"}function dr(on,Mn,Un,Gn){var Ja=Mn.call(on,Un,Gn),Qn=ft.call(on,Ja,Gn),ba=Lt.call(on,Ja,Gn)-tt,Ca=Dt.call(on,Ja,Gn)-tt;return{r:Qn,a0:ba,a1:Ca,p0:[Qn*Math.cos(ba),Qn*Math.sin(ba)],p1:[Qn*Math.cos(Ca),Qn*Math.sin(Ca)]}}function hr(on,Mn){return on.a0==Mn.a0&&on.a1==Mn.a1}function Pr(on,Mn,Un){return"A"+on+","+on+" 0 "+ +(Un>Ee)+",1 "+Mn}function ln(on,Mn,Un,Gn){return"Q 0,0 "+Gn}return qt.radius=function(on){return arguments.length?(ft=It(on),qt):ft},qt.source=function(on){return arguments.length?(Te=It(on),qt):Te},qt.target=function(on){return arguments.length?(He=It(on),qt):He},qt.startAngle=function(on){return arguments.length?(Lt=It(on),qt):Lt},qt.endAngle=function(on){return arguments.length?(Dt=It(on),qt):Dt},qt};function Kt(Te){return Te.radius}v.svg.diagonal=function(){var Te=Gt,He=zt,ft=Cr;function Lt(Dt,qt){var dr=Te.call(this,Dt,qt),hr=He.call(this,Dt,qt),Pr=(dr.y+hr.y)/2,ln=[dr,{x:dr.x,y:Pr},{x:hr.x,y:Pr},hr];return ln=ln.map(ft),"M"+ln[0]+"C"+ln[1]+" "+ln[2]+" "+ln[3]}return Lt.source=function(Dt){return arguments.length?(Te=It(Dt),Lt):Te},Lt.target=function(Dt){return arguments.length?(He=It(Dt),Lt):He},Lt.projection=function(Dt){return arguments.length?(ft=Dt,Lt):ft},Lt};function Cr(Te){return[Te.x,Te.y]}v.svg.diagonal.radial=function(){var Te=v.svg.diagonal(),He=Cr,ft=Te.projection;return Te.projection=function(Lt){return arguments.length?ft(Nr(He=Lt)):He},Te};function Nr(Te){return function(){var He=Te.apply(this,arguments),ft=He[0],Lt=He[1]-tt;return[ft*Math.cos(Lt),ft*Math.sin(Lt)]}}v.svg.symbol=function(){var Te=sn,He=Hr;function ft(Lt,Dt){return(Vn.get(Te.call(this,Lt,Dt))||bn)(He.call(this,Lt,Dt))}return ft.type=function(Lt){return arguments.length?(Te=It(Lt),ft):Te},ft.size=function(Lt){return arguments.length?(He=It(Lt),ft):He},ft};function Hr(){return 64}function sn(){return"circle"}function bn(Te){var He=Math.sqrt(Te/Ee);return"M0,"+He+"A"+He+","+He+" 0 1,1 0,"+-He+"A"+He+","+He+" 0 1,1 0,"+He+"Z"}var Vn=v.map({circle:bn,cross:function(Te){var He=Math.sqrt(Te/5)/2;return"M"+-3*He+","+-He+"H"+-He+"V"+-3*He+"H"+He+"V"+-He+"H"+3*He+"V"+He+"H"+He+"V"+3*He+"H"+-He+"V"+He+"H"+-3*He+"Z"},diamond:function(Te){var He=Math.sqrt(Te/(2*va)),ft=He*va;return"M0,"+-He+"L"+ft+",0 0,"+He+" "+-ft+",0Z"},square:function(Te){var He=Math.sqrt(Te)/2;return"M"+-He+","+-He+"L"+He+","+-He+" "+He+","+He+" "+-He+","+He+"Z"},"triangle-down":function(Te){var He=Math.sqrt(Te/Yn),ft=He*Yn/2;return"M0,"+ft+"L"+He+","+-ft+" "+-He+","+-ft+"Z"},"triangle-up":function(Te){var He=Math.sqrt(Te/Yn),ft=He*Yn/2;return"M0,"+-ft+"L"+He+","+ft+" "+-He+","+ft+"Z"}});v.svg.symbolTypes=Vn.keys();var Yn=Math.sqrt(3),va=Math.tan(30*st);oe.transition=function(Te){for(var He=jo||++go,ft=ll(Te),Lt=[],Dt,qt,dr=Do||{time:Date.now(),ease:Ko,delay:0,duration:250},hr=-1,Pr=this.length;++hr<Pr;){Lt.push(Dt=[]);for(var ln=this[hr],on=-1,Mn=ln.length;++on<Mn;)(qt=ln[on])&&Bs(qt,on,ft,He,dr),Dt.push(qt)}return yi(Lt,ft,He)},oe.interrupt=function(Te){return this.each(Te==null?Va:Si(ll(Te)))};var Va=Si(ll());function Si(Te){return function(){var He,ft,Lt;(He=this[Te])&&(Lt=He[ft=He.active])&&(Lt.timer.c=null,Lt.timer.t=NaN,--He.count?delete He[ft]:delete this[Te],He.active+=.5,Lt.event&&Lt.event.interrupt.call(this,this.__data__,Lt.index))}}function yi(Te,He,ft){return W(Te,Mi),Te.namespace=He,Te.id=ft,Te}var Mi=[],go=0,jo,Do;Mi.call=oe.call,Mi.empty=oe.empty,Mi.node=oe.node,Mi.size=oe.size,v.transition=function(Te,He){return Te&&Te.transition?jo?Te.transition(He):Te:v.selection().transition(Te)},v.transition.prototype=Mi,Mi.select=function(Te){var He=this.id,ft=this.namespace,Lt=[],Dt,qt,dr;Te=Y(Te);for(var hr=-1,Pr=this.length;++hr<Pr;){Lt.push(Dt=[]);for(var ln=this[hr],on=-1,Mn=ln.length;++on<Mn;)(dr=ln[on])&&(qt=Te.call(dr,dr.__data__,on,hr))?("__data__"in dr&&(qt.__data__=dr.__data__),Bs(qt,on,ft,He,dr[ft][He]),Dt.push(qt)):Dt.push(null)}return yi(Lt,ft,He)},Mi.selectAll=function(Te){var He=this.id,ft=this.namespace,Lt=[],Dt,qt,dr,hr,Pr;Te=ce(Te);for(var ln=-1,on=this.length;++ln<on;)for(var Mn=this[ln],Un=-1,Gn=Mn.length;++Un<Gn;)if(dr=Mn[Un]){Pr=dr[ft][He],qt=Te.call(dr,dr.__data__,Un,ln),Lt.push(Dt=[]);for(var Ja=-1,Qn=qt.length;++Ja<Qn;)(hr=qt[Ja])&&Bs(hr,Ja,ft,He,Pr),Dt.push(hr)}return yi(Lt,ft,He)},Mi.filter=function(Te){var He=[],ft,Lt,Dt;typeof Te!="function"&&(Te=be(Te));for(var qt=0,dr=this.length;qt<dr;qt++){He.push(ft=[]);for(var Lt=this[qt],hr=0,Pr=Lt.length;hr<Pr;hr++)(Dt=Lt[hr])&&Te.call(Dt,Dt.__data__,hr,qt)&&ft.push(Dt)}return yi(He,this.namespace,this.id)},Mi.tween=function(Te,He){var ft=this.id,Lt=this.namespace;return arguments.length<2?this.node()[Lt][ft].tween.get(Te):yt(this,He==null?function(Dt){Dt[Lt][ft].tween.remove(Te)}:function(Dt){Dt[Lt][ft].tween.set(Te,He)})};function us(Te,He,ft,Lt){var Dt=Te.id,qt=Te.namespace;return yt(Te,typeof ft=="function"?function(dr,hr,Pr){dr[qt][Dt].tween.set(He,Lt(ft.call(dr,dr.__data__,hr,Pr)))}:(ft=Lt(ft),function(dr){dr[qt][Dt].tween.set(He,ft)}))}Mi.attr=function(Te,He){if(arguments.length<2){for(He in Te)this.attr(He,Te[He]);return this}var ft=Te=="transform"?Nh:el,Lt=v.ns.qualify(Te);function Dt(){this.removeAttribute(Lt)}function qt(){this.removeAttributeNS(Lt.space,Lt.local)}function dr(Pr){return Pr==null?Dt:(Pr+="",function(){var ln=this.getAttribute(Lt),on;return ln!==Pr&&(on=ft(ln,Pr),function(Mn){this.setAttribute(Lt,on(Mn))})})}function hr(Pr){return Pr==null?qt:(Pr+="",function(){var ln=this.getAttributeNS(Lt.space,Lt.local),on;return ln!==Pr&&(on=ft(ln,Pr),function(Mn){this.setAttributeNS(Lt.space,Lt.local,on(Mn))})})}return us(this,"attr."+Te,He,Lt.local?hr:dr)},Mi.attrTween=function(Te,He){var ft=v.ns.qualify(Te);function Lt(qt,dr){var hr=He.call(this,qt,dr,this.getAttribute(ft));return hr&&function(Pr){this.setAttribute(ft,hr(Pr))}}function Dt(qt,dr){var hr=He.call(this,qt,dr,this.getAttributeNS(ft.space,ft.local));return hr&&function(Pr){this.setAttributeNS(ft.space,ft.local,hr(Pr))}}return this.tween("attr."+Te,ft.local?Dt:Lt)},Mi.style=function(Te,He,ft){var Lt=arguments.length;if(Lt<3){if(typeof Te!="string"){Lt<2&&(He="");for(ft in Te)this.style(ft,Te[ft],He);return this}ft=""}function Dt(){this.style.removeProperty(Te)}function qt(dr){return dr==null?Dt:(dr+="",function(){var hr=r(this).getComputedStyle(this,null).getPropertyValue(Te),Pr;return hr!==dr&&(Pr=el(hr,dr),function(ln){this.style.setProperty(Te,Pr(ln),ft)})})}return us(this,"style."+Te,He,qt)},Mi.styleTween=function(Te,He,ft){arguments.length<3&&(ft="");function Lt(Dt,qt){var dr=He.call(this,Dt,qt,r(this).getComputedStyle(this,null).getPropertyValue(Te));return dr&&function(hr){this.style.setProperty(Te,dr(hr),ft)}}return this.tween("style."+Te,Lt)},Mi.text=function(Te){return us(this,"text",Te,sl)};function sl(Te){return Te==null&&(Te=""),function(){this.textContent=Te}}Mi.remove=function(){var Te=this.namespace;return this.each("end.transition",function(){var He;this[Te].count<2&&(He=this.parentNode)&&He.removeChild(this)})},Mi.ease=function(Te){var He=this.id,ft=this.namespace;return arguments.length<1?this.node()[ft][He].ease:(typeof Te!="function"&&(Te=v.ease.apply(v,arguments)),yt(this,function(Lt){Lt[ft][He].ease=Te}))},Mi.delay=function(Te){var He=this.id,ft=this.namespace;return arguments.length<1?this.node()[ft][He].delay:yt(this,typeof Te=="function"?function(Lt,Dt,qt){Lt[ft][He].delay=+Te.call(Lt,Lt.__data__,Dt,qt)}:(Te=+Te,function(Lt){Lt[ft][He].delay=Te}))},Mi.duration=function(Te){var He=this.id,ft=this.namespace;return arguments.length<1?this.node()[ft][He].duration:yt(this,typeof Te=="function"?function(Lt,Dt,qt){Lt[ft][He].duration=Math.max(1,Te.call(Lt,Lt.__data__,Dt,qt))}:(Te=Math.max(1,Te),function(Lt){Lt[ft][He].duration=Te}))},Mi.each=function(Te,He){var ft=this.id,Lt=this.namespace;if(arguments.length<2){var Dt=Do,qt=jo;try{jo=ft,yt(this,function(dr,hr,Pr){Do=dr[Lt][ft],Te.call(dr,dr.__data__,hr,Pr)})}finally{Do=Dt,jo=qt}}else yt(this,function(dr){var hr=dr[Lt][ft];(hr.event||(hr.event=v.dispatch("start","end","interrupt"))).on(Te,He)});return this},Mi.transition=function(){for(var Te=this.id,He=++go,ft=this.namespace,Lt=[],Dt,qt,dr,hr,Pr=0,ln=this.length;Pr<ln;Pr++){Lt.push(Dt=[]);for(var qt=this[Pr],on=0,Mn=qt.length;on<Mn;on++)(dr=qt[on])&&(hr=dr[ft][Te],Bs(dr,on,ft,He,{time:hr.time,ease:hr.ease,delay:hr.delay+hr.duration,duration:hr.duration})),Dt.push(dr)}return yi(Lt,ft,He)};function ll(Te){return Te==null?"__transition__":"__transition_"+Te+"__"}function Bs(Te,He,ft,Lt,Dt){var qt=Te[ft]||(Te[ft]={active:0,count:0}),dr=qt[Lt],hr,Pr,ln,on,Mn;function Un(Qn){var ba=dr.delay;if(Pr.t=ba+hr,ba<=Qn)return Gn(Qn-ba);Pr.c=Gn}function Gn(Qn){var ba=qt.active,Ca=qt[ba];Ca&&(Ca.timer.c=null,Ca.timer.t=NaN,--qt.count,delete qt[ba],Ca.event&&Ca.event.interrupt.call(Te,Te.__data__,Ca.index));for(var Xa in qt)if(+Xa<Lt){var ei=qt[Xa];ei.timer.c=null,ei.timer.t=NaN,--qt.count,delete qt[Xa]}Pr.c=Ja,Za(function(){return Pr.c&&Ja(Qn||1)&&(Pr.c=null,Pr.t=NaN),1},0,hr),qt.active=Lt,dr.event&&dr.event.start.call(Te,Te.__data__,He),Mn=[],dr.tween.forEach(function(Ma,Ci){(Ci=Ci.call(Te,Te.__data__,He))&&Mn.push(Ci)}),on=dr.ease,ln=dr.duration}function Ja(Qn){for(var ba=Qn/ln,Ca=on(ba),Xa=Mn.length;Xa>0;)Mn[--Xa].call(Te,Ca);if(ba>=1)return dr.event&&dr.event.end.call(Te,Te.__data__,He),--qt.count?delete qt[Lt]:delete Te[ft],1}dr||(hr=Dt.time,Pr=Za(Un,0,hr),dr=qt[Lt]={tween:new M,time:hr,timer:Pr,delay:Dt.delay,duration:Dt.duration,ease:Dt.ease,index:He},Dt=null,++qt.count)}v.svg.axis=function(){var Te=v.scale.linear(),He=vl,ft=6,Lt=6,Dt=3,qt=[10],dr=null,hr;function Pr(ln){ln.each(function(){var on=v.select(this),Mn=this.__chart__||Te,Un=this.__chart__=Te.copy(),Gn=dr??(Un.ticks?Un.ticks.apply(Un,qt):Un.domain()),Ja=hr??(Un.tickFormat?Un.tickFormat.apply(Un,qt):U),Qn=on.selectAll(".tick").data(Gn,Un),ba=Qn.enter().insert("g",".domain").attr("class","tick").style("opacity",ot),Ca=v.transition(Qn.exit()).style("opacity",ot).remove(),Xa=v.transition(Qn.order()).style("opacity",1),ei=Math.max(ft,0)+Dt,Ma,Ci=Ga(Un),po=on.selectAll(".domain").data([0]),ro=(po.enter().append("path").attr("class","domain"),v.transition(po));ba.append("line"),ba.append("text");var fo=ba.select("line"),Fo=Xa.select("line"),Ho=Qn.select("text").text(Ja),il=ba.select("text"),Wo=Xa.select("text"),bs=He==="top"||He==="left"?-1:1,dl,Gu,fu,ko;if(He==="bottom"||He==="top"?(Ma=vu,dl="x",fu="y",Gu="x2",ko="y2",Ho.attr("dy",bs<0?"0em":".71em").style("text-anchor","middle"),ro.attr("d","M"+Ci[0]+","+bs*Lt+"V0H"+Ci[1]+"V"+bs*Lt)):(Ma=Us,dl="y",fu="x",Gu="y2",ko="x2",Ho.attr("dy",".32em").style("text-anchor",bs<0?"end":"start"),ro.attr("d","M"+bs*Lt+","+Ci[0]+"H0V"+Ci[1]+"H"+bs*Lt)),fo.attr(ko,bs*ft),il.attr(fu,bs*ei),Fo.attr(Gu,0).attr(ko,bs*ft),Wo.attr(dl,0).attr(fu,bs*ei),Un.rangeBand){var Vs=Un,ul=Vs.rangeBand()/2;Mn=Un=function(ou){return Vs(ou)+ul}}else Mn.rangeBand?Mn=Un:Ca.call(Ma,Un,Mn);ba.call(Ma,Mn,Un),Xa.call(Ma,Un,Un)})}return Pr.scale=function(ln){return arguments.length?(Te=ln,Pr):Te},Pr.orient=function(ln){return arguments.length?(He=ln in Eu?ln+"":vl,Pr):He},Pr.ticks=function(){return arguments.length?(qt=C(arguments),Pr):qt},Pr.tickValues=function(ln){return arguments.length?(dr=ln,Pr):dr},Pr.tickFormat=function(ln){return arguments.length?(hr=ln,Pr):hr},Pr.tickSize=function(ln){var on=arguments.length;return on?(ft=+ln,Lt=+arguments[on-1],Pr):ft},Pr.innerTickSize=function(ln){return arguments.length?(ft=+ln,Pr):ft},Pr.outerTickSize=function(ln){return arguments.length?(Lt=+ln,Pr):Lt},Pr.tickPadding=function(ln){return arguments.length?(Dt=+ln,Pr):Dt},Pr.tickSubdivide=function(){return arguments.length&&Pr},Pr};var vl="bottom",Eu={top:1,right:1,bottom:1,left:1};function vu(Te,He,ft){Te.attr("transform",function(Lt){var Dt=He(Lt);return"translate("+(isFinite(Dt)?Dt:ft(Lt))+",0)"})}function Us(Te,He,ft){Te.attr("transform",function(Lt){var Dt=He(Lt);return"translate(0,"+(isFinite(Dt)?Dt:ft(Lt))+")"})}v.svg.brush=function(){var Te=de(on,"brushstart","brush","brushend"),He=null,ft=null,Lt=[0,0],Dt=[0,0],qt,dr,hr=!0,Pr=!0,ln=Hu[0];function on(Qn){Qn.each(function(){var ba=v.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",Ja).on("touchstart.brush",Ja),Ca=ba.selectAll(".background").data([0]);Ca.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),ba.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var Xa=ba.selectAll(".resize").data(ln,U);Xa.exit().remove(),Xa.enter().append("g").attr("class",function(po){return"resize "+po}).style("cursor",function(po){return qs[po]}).append("rect").attr("x",function(po){return/[ew]$/.test(po)?-3:null}).attr("y",function(po){return/^[ns]/.test(po)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),Xa.style("display",on.empty()?"none":null);var ei=v.transition(ba),Ma=v.transition(Ca),Ci;He&&(Ci=Ga(He),Ma.attr("x",Ci[0]).attr("width",Ci[1]-Ci[0]),Un(ei)),ft&&(Ci=Ga(ft),Ma.attr("y",Ci[0]).attr("height",Ci[1]-Ci[0]),Gn(ei)),Mn(ei)})}on.event=function(Qn){Qn.each(function(){var ba=Te.of(this,arguments),Ca={x:Lt,y:Dt,i:qt,j:dr},Xa=this.__chart__||Ca;this.__chart__=Ca,jo?v.select(this).transition().each("start.brush",function(){qt=Xa.i,dr=Xa.j,Lt=Xa.x,Dt=Xa.y,ba({type:"brushstart"})}).tween("brush:brush",function(){var ei=Xl(Lt,Ca.x),Ma=Xl(Dt,Ca.y);return qt=dr=null,function(Ci){Lt=Ca.x=ei(Ci),Dt=Ca.y=Ma(Ci),ba({type:"brush",mode:"resize"})}}).each("end.brush",function(){qt=Ca.i,dr=Ca.j,ba({type:"brush",mode:"resize"}),ba({type:"brushend"})}):(ba({type:"brushstart"}),ba({type:"brush",mode:"resize"}),ba({type:"brushend"}))})};function Mn(Qn){Qn.selectAll(".resize").attr("transform",function(ba){return"translate("+Lt[+/e$/.test(ba)]+","+Dt[+/^s/.test(ba)]+")"})}function Un(Qn){Qn.select(".extent").attr("x",Lt[0]),Qn.selectAll(".extent,.n>rect,.s>rect").attr("width",Lt[1]-Lt[0])}function Gn(Qn){Qn.select(".extent").attr("y",Dt[0]),Qn.selectAll(".extent,.e>rect,.w>rect").attr("height",Dt[1]-Dt[0])}function Ja(){var Qn=this,ba=v.select(v.event.target),Ca=Te.of(Qn,arguments),Xa=v.select(Qn),ei=ba.datum(),Ma=!/^(n|s)$/.test(ei)&&He,Ci=!/^(e|w)$/.test(ei)&&ft,po=ba.classed("extent"),ro=Br(Qn),fo,Fo=v.mouse(Qn),Ho,il=v.select(r(Qn)).on("keydown.brush",dl).on("keyup.brush",Gu);if(v.event.changedTouches?il.on("touchmove.brush",fu).on("touchend.brush",Vs):il.on("mousemove.brush",fu).on("mouseup.brush",Vs),Xa.interrupt().selectAll("*").interrupt(),po)Fo[0]=Lt[0]-Fo[0],Fo[1]=Dt[0]-Fo[1];else if(ei){var Wo=+/w$/.test(ei),bs=+/^n/.test(ei);Ho=[Lt[1-Wo]-Fo[0],Dt[1-bs]-Fo[1]],Fo[0]=Lt[Wo],Fo[1]=Dt[bs]}else v.event.altKey&&(fo=Fo.slice());Xa.style("pointer-events","none").selectAll(".resize").style("display",null),v.select("body").style("cursor",ba.style("cursor")),Ca({type:"brushstart"}),fu();function dl(){v.event.keyCode==32&&(po||(fo=null,Fo[0]-=Lt[1],Fo[1]-=Dt[1],po=2),le())}function Gu(){v.event.keyCode==32&&po==2&&(Fo[0]+=Lt[1],Fo[1]+=Dt[1],po=0,le())}function fu(){var ul=v.mouse(Qn),ou=!1;Ho&&(ul[0]+=Ho[0],ul[1]+=Ho[1]),po||(v.event.altKey?(fo||(fo=[(Lt[0]+Lt[1])/2,(Dt[0]+Dt[1])/2]),Fo[0]=Lt[+(ul[0]<fo[0])],Fo[1]=Dt[+(ul[1]<fo[1])]):fo=null),Ma&&ko(ul,He,0)&&(Un(Xa),ou=!0),Ci&&ko(ul,ft,1)&&(Gn(Xa),ou=!0),ou&&(Mn(Xa),Ca({type:"brush",mode:po?"move":"resize"}))}function ko(ul,ou,Yl){var Dc=Ga(ou),jl=Dc[0],su=Dc[1],lf=Fo[Yl],Uu=Yl?Dt:Lt,St=Uu[1]-Uu[0],kr,Dr;if(po&&(jl-=lf,su-=St+lf),kr=(Yl?Pr:hr)?Math.max(jl,Math.min(su,ul[Yl])):ul[Yl],po?Dr=(kr+=lf)+St:(fo&&(lf=Math.max(jl,Math.min(su,2*fo[Yl]-kr))),lf<kr?(Dr=kr,kr=lf):Dr=lf),Uu[0]!=kr||Uu[1]!=Dr)return Yl?dr=null:qt=null,Uu[0]=kr,Uu[1]=Dr,!0}function Vs(){fu(),Xa.style("pointer-events","all").selectAll(".resize").style("display",on.empty()?"none":null),v.select("body").style("cursor",null),il.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),ro(),Ca({type:"brushend"})}}return on.x=function(Qn){return arguments.length?(He=Qn,ln=Hu[!He<<1|!ft],on):He},on.y=function(Qn){return arguments.length?(ft=Qn,ln=Hu[!He<<1|!ft],on):ft},on.clamp=function(Qn){return arguments.length?(He&&ft?(hr=!!Qn[0],Pr=!!Qn[1]):He?hr=!!Qn:ft&&(Pr=!!Qn),on):He&&ft?[hr,Pr]:He?hr:ft?Pr:null},on.extent=function(Qn){var ba,Ca,Xa,ei,Ma;return arguments.length?(He&&(ba=Qn[0],Ca=Qn[1],ft&&(ba=ba[0],Ca=Ca[0]),qt=[ba,Ca],He.invert&&(ba=He(ba),Ca=He(Ca)),Ca<ba&&(Ma=ba,ba=Ca,Ca=Ma),(ba!=Lt[0]||Ca!=Lt[1])&&(Lt=[ba,Ca])),ft&&(Xa=Qn[0],ei=Qn[1],He&&(Xa=Xa[1],ei=ei[1]),dr=[Xa,ei],ft.invert&&(Xa=ft(Xa),ei=ft(ei)),ei<Xa&&(Ma=Xa,Xa=ei,ei=Ma),(Xa!=Dt[0]||ei!=Dt[1])&&(Dt=[Xa,ei])),on):(He&&(qt?(ba=qt[0],Ca=qt[1]):(ba=Lt[0],Ca=Lt[1],He.invert&&(ba=He.invert(ba),Ca=He.invert(Ca)),Ca<ba&&(Ma=ba,ba=Ca,Ca=Ma))),ft&&(dr?(Xa=dr[0],ei=dr[1]):(Xa=Dt[0],ei=Dt[1],ft.invert&&(Xa=ft.invert(Xa),ei=ft.invert(ei)),ei<Xa&&(Ma=Xa,Xa=ei,ei=Ma))),He&&ft?[[ba,Xa],[Ca,ei]]:He?[ba,Ca]:ft&&[Xa,ei])},on.clear=function(){return on.empty()||(Lt=[0,0],Dt=[0,0],qt=dr=null),on},on.empty=function(){return!!He&&Lt[0]==Lt[1]||!!ft&&Dt[0]==Dt[1]},v.rebind(on,Te,"on")};var qs={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Hu=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]];v.text=xr(function(Te){return Te.responseText}),v.json=function(Te,He){return Yr(Te,"application/json",yc,He)};function yc(Te){return JSON.parse(Te.responseText)}v.html=function(Te,He){return Yr(Te,"text/html",Zc,He)};function Zc(Te){var He=P.createRange();return He.selectNode(P.body),He.createContextualFragment(Te.responseText)}v.xml=xr(function(Te){return Te.responseXML}),typeof Z=="object"&&Z.exports?Z.exports=v:this.d3=v}).apply(self)}}),Wa=Ne({"node_modules/d3-time/dist/d3-time.js"(te,Z){(function(v,w){typeof te=="object"&&typeof Z<"u"?w(te):(v=v||self,w(v.d3=v.d3||{}))})(te,function(v){var w=new Date,C=new Date;function P(be,Ye,yt,wt){function ht(Yt){return be(Yt=arguments.length===0?new Date:new Date(+Yt)),Yt}return ht.floor=function(Yt){return be(Yt=new Date(+Yt)),Yt},ht.ceil=function(Yt){return be(Yt=new Date(Yt-1)),Ye(Yt,1),be(Yt),Yt},ht.round=function(Yt){var $t=ht(Yt),fr=ht.ceil(Yt);return Yt-$t<fr-Yt?$t:fr},ht.offset=function(Yt,$t){return Ye(Yt=new Date(+Yt),$t==null?1:Math.floor($t)),Yt},ht.range=function(Yt,$t,fr){var mr=[],Ur;if(Yt=ht.ceil(Yt),fr=fr==null?1:Math.floor(fr),!(Yt<$t)||!(fr>0))return mr;do mr.push(Ur=new Date(+Yt)),Ye(Yt,fr),be(Yt);while(Ur<Yt&&Yt<$t);return mr},ht.filter=function(Yt){return P(function($t){if($t>=$t)for(;be($t),!Yt($t);)$t.setTime($t-1)},function($t,fr){if($t>=$t)if(fr<0)for(;++fr<=0;)for(;Ye($t,-1),!Yt($t););else for(;--fr>=0;)for(;Ye($t,1),!Yt($t););})},yt&&(ht.count=function(Yt,$t){return w.setTime(+Yt),C.setTime(+$t),be(w),be(C),Math.floor(yt(w,C))},ht.every=function(Yt){return Yt=Math.floor(Yt),!isFinite(Yt)||!(Yt>0)?null:Yt>1?ht.filter(wt?function($t){return wt($t)%Yt===0}:function($t){return ht.count(0,$t)%Yt===0}):ht}),ht}var t=P(function(){},function(be,Ye){be.setTime(+be+Ye)},function(be,Ye){return Ye-be});t.every=function(be){return be=Math.floor(be),!isFinite(be)||!(be>0)?null:be>1?P(function(Ye){Ye.setTime(Math.floor(Ye/be)*be)},function(Ye,yt){Ye.setTime(+Ye+yt*be)},function(Ye,yt){return(yt-Ye)/be}):t};var r=t.range,a=1e3,l=6e4,i=36e5,s=864e5,o=6048e5,u=P(function(be){be.setTime(be-be.getMilliseconds())},function(be,Ye){be.setTime(+be+Ye*a)},function(be,Ye){return(Ye-be)/a},function(be){return be.getUTCSeconds()}),d=u.range,h=P(function(be){be.setTime(be-be.getMilliseconds()-be.getSeconds()*a)},function(be,Ye){be.setTime(+be+Ye*l)},function(be,Ye){return(Ye-be)/l},function(be){return be.getMinutes()}),g=h.range,m=P(function(be){be.setTime(be-be.getMilliseconds()-be.getSeconds()*a-be.getMinutes()*l)},function(be,Ye){be.setTime(+be+Ye*i)},function(be,Ye){return(Ye-be)/i},function(be){return be.getHours()}),E=m.range,c=P(function(be){be.setHours(0,0,0,0)},function(be,Ye){be.setDate(be.getDate()+Ye)},function(be,Ye){return(Ye-be-(Ye.getTimezoneOffset()-be.getTimezoneOffset())*l)/s},function(be){return be.getDate()-1}),_=c.range;function T(be){return P(function(Ye){Ye.setDate(Ye.getDate()-(Ye.getDay()+7-be)%7),Ye.setHours(0,0,0,0)},function(Ye,yt){Ye.setDate(Ye.getDate()+yt*7)},function(Ye,yt){return(yt-Ye-(yt.getTimezoneOffset()-Ye.getTimezoneOffset())*l)/o})}var M=T(0),k=T(1),b=T(2),A=T(3),y=T(4),f=T(5),p=T(6),x=M.range,N=k.range,D=b.range,B=A.range,U=y.range,V=f.range,q=p.range,z=P(function(be){be.setDate(1),be.setHours(0,0,0,0)},function(be,Ye){be.setMonth(be.getMonth()+Ye)},function(be,Ye){return Ye.getMonth()-be.getMonth()+(Ye.getFullYear()-be.getFullYear())*12},function(be){return be.getMonth()}),H=z.range,G=P(function(be){be.setMonth(0,1),be.setHours(0,0,0,0)},function(be,Ye){be.setFullYear(be.getFullYear()+Ye)},function(be,Ye){return Ye.getFullYear()-be.getFullYear()},function(be){return be.getFullYear()});G.every=function(be){return!isFinite(be=Math.floor(be))||!(be>0)?null:P(function(Ye){Ye.setFullYear(Math.floor(Ye.getFullYear()/be)*be),Ye.setMonth(0,1),Ye.setHours(0,0,0,0)},function(Ye,yt){Ye.setFullYear(Ye.getFullYear()+yt*be)})};var J=G.range,le=P(function(be){be.setUTCSeconds(0,0)},function(be,Ye){be.setTime(+be+Ye*l)},function(be,Ye){return(Ye-be)/l},function(be){return be.getUTCMinutes()}),ge=le.range,de=P(function(be){be.setUTCMinutes(0,0,0)},function(be,Ye){be.setTime(+be+Ye*i)},function(be,Ye){return(Ye-be)/i},function(be){return be.getUTCHours()}),me=de.range,W=P(function(be){be.setUTCHours(0,0,0,0)},function(be,Ye){be.setUTCDate(be.getUTCDate()+Ye)},function(be,Ye){return(Ye-be)/s},function(be){return be.getUTCDate()-1}),ie=W.range;function se(be){return P(function(Ye){Ye.setUTCDate(Ye.getUTCDate()-(Ye.getUTCDay()+7-be)%7),Ye.setUTCHours(0,0,0,0)},function(Ye,yt){Ye.setUTCDate(Ye.getUTCDate()+yt*7)},function(Ye,yt){return(yt-Ye)/o})}var ee=se(0),pe=se(1),oe=se(2),Y=se(3),ce=se(4),ue=se(5),_e=se(6),Le=ee.range,ze=pe.range,Xe=oe.range,Ve=Y.range,rt=ce.range,mt=ue.range,_t=_e.range,vt=P(function(be){be.setUTCDate(1),be.setUTCHours(0,0,0,0)},function(be,Ye){be.setUTCMonth(be.getUTCMonth()+Ye)},function(be,Ye){return Ye.getUTCMonth()-be.getUTCMonth()+(Ye.getUTCFullYear()-be.getUTCFullYear())*12},function(be){return be.getUTCMonth()}),ut=vt.range,Fe=P(function(be){be.setUTCMonth(0,1),be.setUTCHours(0,0,0,0)},function(be,Ye){be.setUTCFullYear(be.getUTCFullYear()+Ye)},function(be,Ye){return Ye.getUTCFullYear()-be.getUTCFullYear()},function(be){return be.getUTCFullYear()});Fe.every=function(be){return!isFinite(be=Math.floor(be))||!(be>0)?null:P(function(Ye){Ye.setUTCFullYear(Math.floor(Ye.getUTCFullYear()/be)*be),Ye.setUTCMonth(0,1),Ye.setUTCHours(0,0,0,0)},function(Ye,yt){Ye.setUTCFullYear(Ye.getUTCFullYear()+yt*be)})};var Pe=Fe.range;v.timeDay=c,v.timeDays=_,v.timeFriday=f,v.timeFridays=V,v.timeHour=m,v.timeHours=E,v.timeInterval=P,v.timeMillisecond=t,v.timeMilliseconds=r,v.timeMinute=h,v.timeMinutes=g,v.timeMonday=k,v.timeMondays=N,v.timeMonth=z,v.timeMonths=H,v.timeSaturday=p,v.timeSaturdays=q,v.timeSecond=u,v.timeSeconds=d,v.timeSunday=M,v.timeSundays=x,v.timeThursday=y,v.timeThursdays=U,v.timeTuesday=b,v.timeTuesdays=D,v.timeWednesday=A,v.timeWednesdays=B,v.timeWeek=M,v.timeWeeks=x,v.timeYear=G,v.timeYears=J,v.utcDay=W,v.utcDays=ie,v.utcFriday=ue,v.utcFridays=mt,v.utcHour=de,v.utcHours=me,v.utcMillisecond=t,v.utcMilliseconds=r,v.utcMinute=le,v.utcMinutes=ge,v.utcMonday=pe,v.utcMondays=ze,v.utcMonth=vt,v.utcMonths=ut,v.utcSaturday=_e,v.utcSaturdays=_t,v.utcSecond=u,v.utcSeconds=d,v.utcSunday=ee,v.utcSundays=Le,v.utcThursday=ce,v.utcThursdays=rt,v.utcTuesday=oe,v.utcTuesdays=Xe,v.utcWednesday=Y,v.utcWednesdays=Ve,v.utcWeek=ee,v.utcWeeks=Le,v.utcYear=Fe,v.utcYears=Pe,Object.defineProperty(v,"__esModule",{value:!0})})}}),On=Ne({"node_modules/d3-time-format/dist/d3-time-format.js"(te,Z){(function(v,w){typeof te=="object"&&typeof Z<"u"?w(te,Wa()):(v=v||self,w(v.d3=v.d3||{},v.d3))})(te,function(v,w){function C($e){if(0<=$e.y&&$e.y<100){var ot=new Date(-1,$e.m,$e.d,$e.H,$e.M,$e.S,$e.L);return ot.setFullYear($e.y),ot}return new Date($e.y,$e.m,$e.d,$e.H,$e.M,$e.S,$e.L)}function P($e){if(0<=$e.y&&$e.y<100){var ot=new Date(Date.UTC(-1,$e.m,$e.d,$e.H,$e.M,$e.S,$e.L));return ot.setUTCFullYear($e.y),ot}return new Date(Date.UTC($e.y,$e.m,$e.d,$e.H,$e.M,$e.S,$e.L))}function t($e,ot,De){return{y:$e,m:ot,d:De,H:0,M:0,S:0,L:0}}function r($e){var ot=$e.dateTime,De=$e.date,Ee=$e.time,Ae=$e.periods,Ie=$e.days,tt=$e.shortDays,st=$e.months,Bt=$e.shortMonths,Ft=d(Ae),Wt=h(Ae),lr=d(Ie),Rr=h(Ie),Mr=d(tt),Sr=h(tt),Kr=d(st),Hn=h(st),ga=d(Bt),ua=h(Bt),Ta={a:za,A:Ia,b:Ba,B:Ka,c:null,d:z,e:z,f:ge,H,I:G,j:J,L:le,m:de,M:me,p:fa,q:Bi,Q:$t,s:fr,S:W,u:ie,U:se,V:ee,w:pe,W:oe,x:null,X:null,y:Y,Y:ce,Z:ue,"%":Yt},Aa={a:Yi,A:Ht,b:kt,B:qr,c:null,d:_e,e:_e,f:rt,H:Le,I:ze,j:Xe,L:Ve,m:mt,M:_t,p:en,q:rn,Q:$t,s:fr,S:vt,u:ut,U:Fe,V:Pe,w:be,W:Ye,x:null,X:null,y:yt,Y:wt,Z:ht,"%":Yt},ia={a:yr,A:br,b:an,B:wn,c:Ln,d:y,e:y,f:B,H:p,I:p,j:f,L:D,m:A,M:x,p:Qt,q:b,Q:V,s:q,S:N,u:m,U:E,V:c,w:g,W:_,x:Bn,X:xa,y:M,Y:T,Z:k,"%":U};Ta.x=$a(De,Ta),Ta.X=$a(Ee,Ta),Ta.c=$a(ot,Ta),Aa.x=$a(De,Aa),Aa.X=$a(Ee,Aa),Aa.c=$a(ot,Aa);function $a(Wr,tn){return function(Tn){var dn=[],It=-1,xr=0,Yr=Wr.length,An,Zn,sa;for(Tn instanceof Date||(Tn=new Date(+Tn));++It<Yr;)Wr.charCodeAt(It)===37&&(dn.push(Wr.slice(xr,It)),(Zn=a[An=Wr.charAt(++It)])!=null?An=Wr.charAt(++It):Zn=An==="e"?" ":"0",(sa=tn[An])&&(An=sa(Tn,Zn)),dn.push(An),xr=It+1);return dn.push(Wr.slice(xr,It)),dn.join("")}}function ci(Wr,tn){return function(Tn){var dn=t(1900,void 0,1),It=_r(dn,Wr,Tn+="",0),xr,Yr;if(It!=Tn.length)return null;if("Q"in dn)return new Date(dn.Q);if("s"in dn)return new Date(dn.s*1e3+("L"in dn?dn.L:0));if(tn&&!("Z"in dn)&&(dn.Z=0),"p"in dn&&(dn.H=dn.H%12+dn.p*12),dn.m===void 0&&(dn.m="q"in dn?dn.q:0),"V"in dn){if(dn.V<1||dn.V>53)return null;"w"in dn||(dn.w=1),"Z"in dn?(xr=P(t(dn.y,0,1)),Yr=xr.getUTCDay(),xr=Yr>4||Yr===0?w.utcMonday.ceil(xr):w.utcMonday(xr),xr=w.utcDay.offset(xr,(dn.V-1)*7),dn.y=xr.getUTCFullYear(),dn.m=xr.getUTCMonth(),dn.d=xr.getUTCDate()+(dn.w+6)%7):(xr=C(t(dn.y,0,1)),Yr=xr.getDay(),xr=Yr>4||Yr===0?w.timeMonday.ceil(xr):w.timeMonday(xr),xr=w.timeDay.offset(xr,(dn.V-1)*7),dn.y=xr.getFullYear(),dn.m=xr.getMonth(),dn.d=xr.getDate()+(dn.w+6)%7)}else("W"in dn||"U"in dn)&&("w"in dn||(dn.w="u"in dn?dn.u%7:"W"in dn?1:0),Yr="Z"in dn?P(t(dn.y,0,1)).getUTCDay():C(t(dn.y,0,1)).getDay(),dn.m=0,dn.d="W"in dn?(dn.w+6)%7+dn.W*7-(Yr+5)%7:dn.w+dn.U*7-(Yr+6)%7);return"Z"in dn?(dn.H+=dn.Z/100|0,dn.M+=dn.Z%100,P(dn)):C(dn)}}function _r(Wr,tn,Tn,dn){for(var It=0,xr=tn.length,Yr=Tn.length,An,Zn;It<xr;){if(dn>=Yr)return-1;if(An=tn.charCodeAt(It++),An===37){if(An=tn.charAt(It++),Zn=ia[An in a?tn.charAt(It++):An],!Zn||(dn=Zn(Wr,Tn,dn))<0)return-1}else if(An!=Tn.charCodeAt(dn++))return-1}return dn}function Qt(Wr,tn,Tn){var dn=Ft.exec(tn.slice(Tn));return dn?(Wr.p=Wt[dn[0].toLowerCase()],Tn+dn[0].length):-1}function yr(Wr,tn,Tn){var dn=Mr.exec(tn.slice(Tn));return dn?(Wr.w=Sr[dn[0].toLowerCase()],Tn+dn[0].length):-1}function br(Wr,tn,Tn){var dn=lr.exec(tn.slice(Tn));return dn?(Wr.w=Rr[dn[0].toLowerCase()],Tn+dn[0].length):-1}function an(Wr,tn,Tn){var dn=ga.exec(tn.slice(Tn));return dn?(Wr.m=ua[dn[0].toLowerCase()],Tn+dn[0].length):-1}function wn(Wr,tn,Tn){var dn=Kr.exec(tn.slice(Tn));return dn?(Wr.m=Hn[dn[0].toLowerCase()],Tn+dn[0].length):-1}function Ln(Wr,tn,Tn){return _r(Wr,ot,tn,Tn)}function Bn(Wr,tn,Tn){return _r(Wr,De,tn,Tn)}function xa(Wr,tn,Tn){return _r(Wr,Ee,tn,Tn)}function za(Wr){return tt[Wr.getDay()]}function Ia(Wr){return Ie[Wr.getDay()]}function Ba(Wr){return Bt[Wr.getMonth()]}function Ka(Wr){return st[Wr.getMonth()]}function fa(Wr){return Ae[+(Wr.getHours()>=12)]}function Bi(Wr){return 1+~~(Wr.getMonth()/3)}function Yi(Wr){return tt[Wr.getUTCDay()]}function Ht(Wr){return Ie[Wr.getUTCDay()]}function kt(Wr){return Bt[Wr.getUTCMonth()]}function qr(Wr){return st[Wr.getUTCMonth()]}function en(Wr){return Ae[+(Wr.getUTCHours()>=12)]}function rn(Wr){return 1+~~(Wr.getUTCMonth()/3)}return{format:function(Wr){var tn=$a(Wr+="",Ta);return tn.toString=function(){return Wr},tn},parse:function(Wr){var tn=ci(Wr+="",!1);return tn.toString=function(){return Wr},tn},utcFormat:function(Wr){var tn=$a(Wr+="",Aa);return tn.toString=function(){return Wr},tn},utcParse:function(Wr){var tn=ci(Wr+="",!0);return tn.toString=function(){return Wr},tn}}}var a={"-":"",_:" ",0:"0"},l=/^\s*\d+/,i=/^%/,s=/[\\^$*+?|[\]().{}]/g;function o($e,ot,De){var Ee=$e<0?"-":"",Ae=(Ee?-$e:$e)+"",Ie=Ae.length;return Ee+(Ie<De?new Array(De-Ie+1).join(ot)+Ae:Ae)}function u($e){return $e.replace(s,"\\$&")}function d($e){return new RegExp("^(?:"+$e.map(u).join("|")+")","i")}function h($e){for(var ot={},De=-1,Ee=$e.length;++De<Ee;)ot[$e[De].toLowerCase()]=De;return ot}function g($e,ot,De){var Ee=l.exec(ot.slice(De,De+1));return Ee?($e.w=+Ee[0],De+Ee[0].length):-1}function m($e,ot,De){var Ee=l.exec(ot.slice(De,De+1));return Ee?($e.u=+Ee[0],De+Ee[0].length):-1}function E($e,ot,De){var Ee=l.exec(ot.slice(De,De+2));return Ee?($e.U=+Ee[0],De+Ee[0].length):-1}function c($e,ot,De){var Ee=l.exec(ot.slice(De,De+2));return Ee?($e.V=+Ee[0],De+Ee[0].length):-1}function _($e,ot,De){var Ee=l.exec(ot.slice(De,De+2));return Ee?($e.W=+Ee[0],De+Ee[0].length):-1}function T($e,ot,De){var Ee=l.exec(ot.slice(De,De+4));return Ee?($e.y=+Ee[0],De+Ee[0].length):-1}function M($e,ot,De){var Ee=l.exec(ot.slice(De,De+2));return Ee?($e.y=+Ee[0]+(+Ee[0]>68?1900:2e3),De+Ee[0].length):-1}function k($e,ot,De){var Ee=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(ot.slice(De,De+6));return Ee?($e.Z=Ee[1]?0:-(Ee[2]+(Ee[3]||"00")),De+Ee[0].length):-1}function b($e,ot,De){var Ee=l.exec(ot.slice(De,De+1));return Ee?($e.q=Ee[0]*3-3,De+Ee[0].length):-1}function A($e,ot,De){var Ee=l.exec(ot.slice(De,De+2));return Ee?($e.m=Ee[0]-1,De+Ee[0].length):-1}function y($e,ot,De){var Ee=l.exec(ot.slice(De,De+2));return Ee?($e.d=+Ee[0],De+Ee[0].length):-1}function f($e,ot,De){var Ee=l.exec(ot.slice(De,De+3));return Ee?($e.m=0,$e.d=+Ee[0],De+Ee[0].length):-1}function p($e,ot,De){var Ee=l.exec(ot.slice(De,De+2));return Ee?($e.H=+Ee[0],De+Ee[0].length):-1}function x($e,ot,De){var Ee=l.exec(ot.slice(De,De+2));return Ee?($e.M=+Ee[0],De+Ee[0].length):-1}function N($e,ot,De){var Ee=l.exec(ot.slice(De,De+2));return Ee?($e.S=+Ee[0],De+Ee[0].length):-1}function D($e,ot,De){var Ee=l.exec(ot.slice(De,De+3));return Ee?($e.L=+Ee[0],De+Ee[0].length):-1}function B($e,ot,De){var Ee=l.exec(ot.slice(De,De+6));return Ee?($e.L=Math.floor(Ee[0]/1e3),De+Ee[0].length):-1}function U($e,ot,De){var Ee=i.exec(ot.slice(De,De+1));return Ee?De+Ee[0].length:-1}function V($e,ot,De){var Ee=l.exec(ot.slice(De));return Ee?($e.Q=+Ee[0],De+Ee[0].length):-1}function q($e,ot,De){var Ee=l.exec(ot.slice(De));return Ee?($e.s=+Ee[0],De+Ee[0].length):-1}function z($e,ot){return o($e.getDate(),ot,2)}function H($e,ot){return o($e.getHours(),ot,2)}function G($e,ot){return o($e.getHours()%12||12,ot,2)}function J($e,ot){return o(1+w.timeDay.count(w.timeYear($e),$e),ot,3)}function le($e,ot){return o($e.getMilliseconds(),ot,3)}function ge($e,ot){return le($e,ot)+"000"}function de($e,ot){return o($e.getMonth()+1,ot,2)}function me($e,ot){return o($e.getMinutes(),ot,2)}function W($e,ot){return o($e.getSeconds(),ot,2)}function ie($e){var ot=$e.getDay();return ot===0?7:ot}function se($e,ot){return o(w.timeSunday.count(w.timeYear($e)-1,$e),ot,2)}function ee($e,ot){var De=$e.getDay();return $e=De>=4||De===0?w.timeThursday($e):w.timeThursday.ceil($e),o(w.timeThursday.count(w.timeYear($e),$e)+(w.timeYear($e).getDay()===4),ot,2)}function pe($e){return $e.getDay()}function oe($e,ot){return o(w.timeMonday.count(w.timeYear($e)-1,$e),ot,2)}function Y($e,ot){return o($e.getFullYear()%100,ot,2)}function ce($e,ot){return o($e.getFullYear()%1e4,ot,4)}function ue($e){var ot=$e.getTimezoneOffset();return(ot>0?"-":(ot*=-1,"+"))+o(ot/60|0,"0",2)+o(ot%60,"0",2)}function _e($e,ot){return o($e.getUTCDate(),ot,2)}function Le($e,ot){return o($e.getUTCHours(),ot,2)}function ze($e,ot){return o($e.getUTCHours()%12||12,ot,2)}function Xe($e,ot){return o(1+w.utcDay.count(w.utcYear($e),$e),ot,3)}function Ve($e,ot){return o($e.getUTCMilliseconds(),ot,3)}function rt($e,ot){return Ve($e,ot)+"000"}function mt($e,ot){return o($e.getUTCMonth()+1,ot,2)}function _t($e,ot){return o($e.getUTCMinutes(),ot,2)}function vt($e,ot){return o($e.getUTCSeconds(),ot,2)}function ut($e){var ot=$e.getUTCDay();return ot===0?7:ot}function Fe($e,ot){return o(w.utcSunday.count(w.utcYear($e)-1,$e),ot,2)}function Pe($e,ot){var De=$e.getUTCDay();return $e=De>=4||De===0?w.utcThursday($e):w.utcThursday.ceil($e),o(w.utcThursday.count(w.utcYear($e),$e)+(w.utcYear($e).getUTCDay()===4),ot,2)}function be($e){return $e.getUTCDay()}function Ye($e,ot){return o(w.utcMonday.count(w.utcYear($e)-1,$e),ot,2)}function yt($e,ot){return o($e.getUTCFullYear()%100,ot,2)}function wt($e,ot){return o($e.getUTCFullYear()%1e4,ot,4)}function ht(){return"+0000"}function Yt(){return"%"}function $t($e){return+$e}function fr($e){return Math.floor(+$e/1e3)}var mr;Ur({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 Ur($e){return mr=r($e),v.timeFormat=mr.format,v.timeParse=mr.parse,v.utcFormat=mr.utcFormat,v.utcParse=mr.utcParse,mr}var jr="%Y-%m-%dT%H:%M:%S.%LZ";function fn($e){return $e.toISOString()}var Br=Date.prototype.toISOString?fn:v.utcFormat(jr);function Qr($e){var ot=new Date($e);return isNaN(ot)?null:ot}var Ot=+new Date("2000-01-01T00:00:00.000Z")?Qr:v.utcParse(jr);v.isoFormat=Br,v.isoParse=Ot,v.timeFormatDefaultLocale=Ur,v.timeFormatLocale=r,Object.defineProperty(v,"__esModule",{value:!0})})}}),qn=Ne({"node_modules/d3-format/dist/d3-format.js"(te,Z){(function(v,w){typeof te=="object"&&typeof Z<"u"?w(te):(v=typeof globalThis<"u"?globalThis:v||self,w(v.d3=v.d3||{}))})(te,function(v){function w(A){return Math.abs(A=Math.round(A))>=1e21?A.toLocaleString("en").replace(/,/g,""):A.toString(10)}function C(A,y){if((f=(A=y?A.toExponential(y-1):A.toExponential()).indexOf("e"))<0)return null;var f,p=A.slice(0,f);return[p.length>1?p[0]+p.slice(2):p,+A.slice(f+1)]}function P(A){return A=C(Math.abs(A)),A?A[1]:NaN}function t(A,y){return function(f,p){for(var x=f.length,N=[],D=0,B=A[0],U=0;x>0&&B>0&&(U+B+1>p&&(B=Math.max(1,p-U)),N.push(f.substring(x-=B,x+B)),!((U+=B+1)>p));)B=A[D=(D+1)%A.length];return N.reverse().join(y)}}function r(A){return function(y){return y.replace(/[0-9]/g,function(f){return A[+f]})}}var a=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function l(A){if(!(y=a.exec(A)))throw new Error("invalid format: "+A);var y;return new i({fill:y[1],align:y[2],sign:y[3],symbol:y[4],zero:y[5],width:y[6],comma:y[7],precision:y[8]&&y[8].slice(1),trim:y[9],type:y[10]})}l.prototype=i.prototype;function i(A){this.fill=A.fill===void 0?" ":A.fill+"",this.align=A.align===void 0?">":A.align+"",this.sign=A.sign===void 0?"-":A.sign+"",this.symbol=A.symbol===void 0?"":A.symbol+"",this.zero=!!A.zero,this.width=A.width===void 0?void 0:+A.width,this.comma=!!A.comma,this.precision=A.precision===void 0?void 0:+A.precision,this.trim=!!A.trim,this.type=A.type===void 0?"":A.type+""}i.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function s(A){e:for(var y=A.length,f=1,p=-1,x;f<y;++f)switch(A[f]){case".":p=x=f;break;case"0":p===0&&(p=f),x=f;break;default:if(!+A[f])break e;p>0&&(p=0);break}return p>0?A.slice(0,p)+A.slice(x+1):A}var o;function u(A,y){var f=C(A,y);if(!f)return A+"";var p=f[0],x=f[1],N=x-(o=Math.max(-8,Math.min(8,Math.floor(x/3)))*3)+1,D=p.length;return N===D?p:N>D?p+new Array(N-D+1).join("0"):N>0?p.slice(0,N)+"."+p.slice(N):"0."+new Array(1-N).join("0")+C(A,Math.max(0,y+N-1))[0]}function d(A,y){var f=C(A,y);if(!f)return A+"";var p=f[0],x=f[1];return x<0?"0."+new Array(-x).join("0")+p:p.length>x+1?p.slice(0,x+1)+"."+p.slice(x+1):p+new Array(x-p.length+2).join("0")}var h={"%":function(A,y){return(A*100).toFixed(y)},b:function(A){return Math.round(A).toString(2)},c:function(A){return A+""},d:w,e:function(A,y){return A.toExponential(y)},f:function(A,y){return A.toFixed(y)},g:function(A,y){return A.toPrecision(y)},o:function(A){return Math.round(A).toString(8)},p:function(A,y){return d(A*100,y)},r:d,s:u,X:function(A){return Math.round(A).toString(16).toUpperCase()},x:function(A){return Math.round(A).toString(16)}};function g(A){return A}var m=Array.prototype.map,E=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function c(A){var y=A.grouping===void 0||A.thousands===void 0?g:t(m.call(A.grouping,Number),A.thousands+""),f=A.currency===void 0?"":A.currency[0]+"",p=A.currency===void 0?"":A.currency[1]+"",x=A.decimal===void 0?".":A.decimal+"",N=A.numerals===void 0?g:r(m.call(A.numerals,String)),D=A.percent===void 0?"%":A.percent+"",B=A.minus===void 0?"-":A.minus+"",U=A.nan===void 0?"NaN":A.nan+"";function V(z){z=l(z);var H=z.fill,G=z.align,J=z.sign,le=z.symbol,ge=z.zero,de=z.width,me=z.comma,W=z.precision,ie=z.trim,se=z.type;se==="n"?(me=!0,se="g"):h[se]||(W===void 0&&(W=12),ie=!0,se="g"),(ge||H==="0"&&G==="=")&&(ge=!0,H="0",G="=");var ee=le==="$"?f:le==="#"&&/[boxX]/.test(se)?"0"+se.toLowerCase():"",pe=le==="$"?p:/[%p]/.test(se)?D:"",oe=h[se],Y=/[defgprs%]/.test(se);W=W===void 0?6:/[gprs]/.test(se)?Math.max(1,Math.min(21,W)):Math.max(0,Math.min(20,W));function ce(ue){var _e=ee,Le=pe,ze,Xe,Ve;if(se==="c")Le=oe(ue)+Le,ue="";else{ue=+ue;var rt=ue<0||1/ue<0;if(ue=isNaN(ue)?U:oe(Math.abs(ue),W),ie&&(ue=s(ue)),rt&&+ue==0&&J!=="+"&&(rt=!1),_e=(rt?J==="("?J:B:J==="-"||J==="("?"":J)+_e,Le=(se==="s"?E[8+o/3]:"")+Le+(rt&&J==="("?")":""),Y){for(ze=-1,Xe=ue.length;++ze<Xe;)if(Ve=ue.charCodeAt(ze),48>Ve||Ve>57){Le=(Ve===46?x+ue.slice(ze+1):ue.slice(ze))+Le,ue=ue.slice(0,ze);break}}}me&&!ge&&(ue=y(ue,1/0));var mt=_e.length+ue.length+Le.length,_t=mt<de?new Array(de-mt+1).join(H):"";switch(me&&ge&&(ue=y(_t+ue,_t.length?de-Le.length:1/0),_t=""),G){case"<":ue=_e+ue+Le+_t;break;case"=":ue=_e+_t+ue+Le;break;case"^":ue=_t.slice(0,mt=_t.length>>1)+_e+ue+Le+_t.slice(mt);break;default:ue=_t+_e+ue+Le;break}return N(ue)}return ce.toString=function(){return z+""},ce}function q(z,H){var G=V((z=l(z),z.type="f",z)),J=Math.max(-8,Math.min(8,Math.floor(P(H)/3)))*3,le=Math.pow(10,-J),ge=E[8+J/3];return function(de){return G(le*de)+ge}}return{format:V,formatPrefix:q}}var _;T({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function T(A){return _=c(A),v.format=_.format,v.formatPrefix=_.formatPrefix,_}function M(A){return Math.max(0,-P(Math.abs(A)))}function k(A,y){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(P(y)/3)))*3-P(Math.abs(A)))}function b(A,y){return A=Math.abs(A),y=Math.abs(y)-A,Math.max(0,P(y)-P(A))+1}v.FormatSpecifier=i,v.formatDefaultLocale=T,v.formatLocale=c,v.formatSpecifier=l,v.precisionFixed=M,v.precisionPrefix=k,v.precisionRound=b,Object.defineProperty(v,"__esModule",{value:!0})})}}),ca=Ne({"node_modules/is-string-blank/index.js"(te,Z){Z.exports=function(v){for(var w=v.length,C,P=0;P<w;P++)if(C=v.charCodeAt(P),(C<9||C>13)&&C!==32&&C!==133&&C!==160&&C!==5760&&C!==6158&&(C<8192||C>8205)&&C!==8232&&C!==8233&&C!==8239&&C!==8287&&C!==8288&&C!==12288&&C!==65279)return!1;return!0}}}),Fn=Ne({"node_modules/fast-isnumeric/index.js"(te,Z){var v=ca();Z.exports=function(w){var C=typeof w;if(C==="string"){var P=w;if(w=+w,w===0&&v(P))return!1}else if(C!=="number")return!1;return w-w<1}}}),da=Ne({"src/constants/numerical.js"(te,Z){Z.exports={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE*1e-4,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,ONEMILLI:1,ONEMICROSEC:.001,EPOCHJD:24405875e-1,ALMOST_EQUAL:1-1e-6,LOG_CLIP:10,MINUS_SIGN:"−"}}}),ea=Ne({"node_modules/base64-arraybuffer/dist/base64-arraybuffer.umd.js"(te,Z){(function(v,w){typeof te=="object"&&typeof Z<"u"?w(te):(v=typeof globalThis<"u"?globalThis:v||self,w(v["base64-arraybuffer"]={}))})(te,function(v){for(var w="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",C=typeof Uint8Array>"u"?[]:new Uint8Array(256),P=0;P<w.length;P++)C[w.charCodeAt(P)]=P;var t=function(a){var l=new Uint8Array(a),i,s=l.length,o="";for(i=0;i<s;i+=3)o+=w[l[i]>>2],o+=w[(l[i]&3)<<4|l[i+1]>>4],o+=w[(l[i+1]&15)<<2|l[i+2]>>6],o+=w[l[i+2]&63];return s%3===2?o=o.substring(0,o.length-1)+"=":s%3===1&&(o=o.substring(0,o.length-2)+"=="),o},r=function(a){var l=a.length*.75,i=a.length,s,o=0,u,d,h,g;a[a.length-1]==="="&&(l--,a[a.length-2]==="="&&l--);var m=new ArrayBuffer(l),E=new Uint8Array(m);for(s=0;s<i;s+=4)u=C[a.charCodeAt(s)],d=C[a.charCodeAt(s+1)],h=C[a.charCodeAt(s+2)],g=C[a.charCodeAt(s+3)],E[o++]=u<<2|d>>4,E[o++]=(d&15)<<4|h>>2,E[o++]=(h&3)<<6|g&63;return m};v.decode=r,v.encode=t,Object.defineProperty(v,"__esModule",{value:!0})})}}),qa=Ne({"src/lib/is_plain_object.js"(te,Z){Z.exports=function(w){return window&&window.process&&window.process.versions?Object.prototype.toString.call(w)==="[object Object]":Object.prototype.toString.call(w)==="[object Object]"&&Object.getPrototypeOf(w).hasOwnProperty("hasOwnProperty")}}}),Ri=Ne({"src/lib/array.js"(te){var Z=ea().decode,v=qa(),w=Array.isArray,C=ArrayBuffer,P=DataView;function t(u){return C.isView(u)&&!(u instanceof P)}te.isTypedArray=t;function r(u){return w(u)||t(u)}te.isArrayOrTypedArray=r;function a(u){return!r(u[0])}te.isArray1D=a,te.ensureArray=function(u,d){return w(u)||(u=[]),u.length=d,u};var l={u1c:typeof Uint8ClampedArray>"u"?void 0:Uint8ClampedArray,i1:typeof Int8Array>"u"?void 0:Int8Array,u1:typeof Uint8Array>"u"?void 0:Uint8Array,i2:typeof Int16Array>"u"?void 0:Int16Array,u2:typeof Uint16Array>"u"?void 0:Uint16Array,i4:typeof Int32Array>"u"?void 0:Int32Array,u4:typeof Uint32Array>"u"?void 0:Uint32Array,f4:typeof Float32Array>"u"?void 0:Float32Array,f8:typeof Float64Array>"u"?void 0:Float64Array};l.uint8c=l.u1c,l.uint8=l.u1,l.int8=l.i1,l.uint16=l.u2,l.int16=l.i2,l.uint32=l.u4,l.int32=l.i4,l.float32=l.f4,l.float64=l.f8;function i(u){return u.constructor===ArrayBuffer}te.isArrayBuffer=i,te.decodeTypedArraySpec=function(u){var d=[],h=s(u),g=h.dtype,m=l[g];if(!m)throw new Error('Error in dtype: "'+g+'"');var E=m.BYTES_PER_ELEMENT,c=h.bdata;i(c)||(c=Z(c));var _=h.shape===void 0?[c.byteLength/E]:(""+h.shape).split(",");_.reverse();var T=_.length,M,k,b=+_[0],A=E*b,y=0;if(T===1)d=new m(c);else if(T===2)for(M=+_[1],k=0;k<M;k++)d[k]=new m(c,y,b),y+=A;else if(T===3){M=+_[1];for(var f=+_[2],p=0;p<f;p++)for(d[p]=[],k=0;k<M;k++)d[p][k]=new m(c,y,b),y+=A}else throw new Error("ndim: "+T+'is not supported with the shape:"'+h.shape+'"');return d.bdata=h.bdata,d.dtype=h.dtype,d.shape=_.reverse().join(","),u._inputArray=d,d},te.isTypedArraySpec=function(u){return v(u)&&u.hasOwnProperty("dtype")&&typeof u.dtype=="string"&&u.hasOwnProperty("bdata")&&(typeof u.bdata=="string"||i(u.bdata))&&(u.shape===void 0||u.hasOwnProperty("shape")&&(typeof u.shape=="string"||typeof u.shape=="number"))};function s(u){return{bdata:u.bdata,dtype:u.dtype,shape:u.shape}}te.concat=function(){var u=[],d=!0,h=0,g,m,E,c,_,T,M,k;for(E=0;E<arguments.length;E++)c=arguments[E],T=c.length,T&&(m?u.push(c):(m=c,_=T),w(c)?g=!1:(d=!1,h?g!==c.constructor&&(g=!1):g=c.constructor),h+=T);if(!h)return[];if(!u.length)return m;if(d)return m.concat.apply(m,u);if(g){for(M=new g(h),M.set(m),E=0;E<u.length;E++)c=u[E],M.set(c,_),_+=c.length;return M}for(M=new Array(h),k=0;k<m.length;k++)M[k]=m[k];for(E=0;E<u.length;E++){for(c=u[E],k=0;k<c.length;k++)M[_+k]=c[k];_+=k}return M},te.maxRowLength=function(u){return o(u,Math.max,0)},te.minRowLength=function(u){return o(u,Math.min,1/0)};function o(u,d,h){if(r(u))if(r(u[0])){for(var g=h,m=0;m<u.length;m++)g=d(g,u[m].length);return g}else return u.length;return 0}}}),mi=Ne({"src/lib/nested_property.js"(te,Z){var v=Fn(),w=Ri().isArrayOrTypedArray;Z.exports=function(u,d){if(v(d))d=String(d);else if(typeof d!="string"||d.substr(d.length-4)==="[-1]")throw"bad property string";var h=d.split("."),g,m,E,c;for(c=0;c<h.length;c++)if(String(h[c]).slice(0,2)==="__")throw"bad property string";for(c=0;c<h.length;){if(g=String(h[c]).match(/^([^\[\]]*)((\[\-?[0-9]*\])+)$/),g){if(g[1])h[c]=g[1];else if(c===0)h.splice(0,1);else throw"bad property string";for(m=g[2].substr(1,g[2].length-2).split("]["),E=0;E<m.length;E++)c++,h.splice(c,0,Number(m[E]))}c++}return typeof u!="object"?s(u,d,h):{set:r(u,h,d),get:C(u,h),astr:d,parts:h,obj:u}};function C(o,u){return function(d){var h=o,g,m,E,c,_;for(c=0;c<u.length-1;c++){if(g=u[c],g===-1){for(m=!0,E=[],_=0;_<h.length;_++)E[_]=C(h[_],u.slice(c+1))(d),E[_]!==E[0]&&(m=!1);return m?E[0]:E}if(typeof g=="number"&&!w(h)||(h=h[g],typeof h!="object"||h===null))return}if(!(typeof h!="object"||h===null)&&(E=h[u[c]],!(!d&&E===null)))return E}}var P=/(^|\.)args\[/;function t(o,u){return o===void 0||o===null&&!u.match(P)}function r(o,u,d){return function(h){var g=o,m="",E=t(h,d),c,_;for(_=0;_<u.length-1;_++){if(c=u[_],typeof c=="number"&&!w(g))throw"array index but container is not an array";if(c===-1){if(E=!l(g,u.slice(_+1),h,d),E)break;return}if(!i(g,c,u[_+1],E))break;if(g=g[c],typeof g!="object"||g===null)throw"container is not an object";m=a(m,c)}if(E){if(_===u.length-1&&(delete g[u[_]],Array.isArray(g)&&+u[_]===g.length-1))for(;g.length&&g[g.length-1]===void 0;)g.pop()}else g[u[_]]=h}}function a(o,u){var d=u;return v(u)?d="["+u+"]":o&&(d="."+u),o+d}function l(o,u,d,h){var g=w(d),m=!0,E=d,c=h.replace("-1",0),_=g?!1:t(d,c),T=u[0],M;for(M=0;M<o.length;M++)c=h.replace("-1",M),g&&(E=d[M%d.length],_=t(E,c)),_&&(m=!1),i(o,M,T,_)&&r(o[M],u,h.replace("-1",M))(E);return m}function i(o,u,d,h){if(o[u]===void 0){if(h)return!1;typeof d=="number"?o[u]=[]:o[u]={}}return!0}function s(o,u,d){return{set:function(){throw"bad container"},get:function(){},astr:u,parts:d,obj:o}}}}),Io=Ne({"src/lib/keyed_container.js"(te,Z){var v=mi(),w=/^\w*$/,C=0,P=1,t=2,r=3,a=4;Z.exports=function(i,s,o,u){o=o||"name",u=u||"value";var d,h,g,m={};s&&s.length?(g=v(i,s),h=g.get()):h=i,s=s||"";var E={};if(h)for(d=0;d<h.length;d++)E[h[d][o]]=d;var c=w.test(u),_={set:function(T,M){var k=M===null?a:C;if(!h){if(!g||k===a)return;h=[],g.set(h)}var b=E[T];if(b===void 0){if(k===a)return;k=k|r,b=h.length,E[T]=b}else M!==(c?h[b][u]:v(h[b],u).get())&&(k=k|t);var A=h[b]=h[b]||{};return A[o]=T,c?A[u]=M:v(A,u).set(M),M!==null&&(k=k&~a),m[b]=m[b]|k,_},get:function(T){if(h){var M=E[T];if(M!==void 0)return c?h[M][u]:v(h[M],u).get()}},rename:function(T,M){var k=E[T];return k===void 0||(m[k]=m[k]|P,E[M]=k,delete E[T],h[k][o]=M),_},remove:function(T){var M=E[T];if(M===void 0)return _;var k=h[M];if(Object.keys(k).length>2)return m[M]=m[M]|t,_.set(T,null);if(c){for(d=M;d<h.length;d++)m[d]=m[d]|r;for(d=M;d<h.length;d++)E[h[d][o]]--;h.splice(M,1),delete E[T]}else v(k,u).set(null),m[M]=m[M]|t|a;return _},constructUpdate:function(){for(var T,M,k={},b=Object.keys(m),A=0;A<b.length;A++)M=b[A],T=s+"["+M+"]",h[M]?(m[M]&P&&(k[T+"."+o]=h[M][o]),m[M]&t&&(c?k[T+"."+u]=m[M]&a?null:h[M][u]:k[T+"."+u]=m[M]&a?null:v(h[M],u).get())):k[T]=null;return k}};return _}}}),ya=Ne({"src/lib/relative_attr.js"(te,Z){var v=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,w=/^[^\.\[\]]+$/;Z.exports=function(C,P){for(;P;){var t=C.match(v);if(t)C=t[1];else if(C.match(w))C="";else throw new Error("bad relativeAttr call:"+[C,P]);if(P.charAt(0)==="^")P=P.slice(1);else break}return C&&P.charAt(0)!=="["?C+"."+P:C+P}}}),Wn=Ne({"src/lib/to_log_range.js"(te,Z){var v=Fn();Z.exports=function(C,P){if(C>0)return Math.log(C)/Math.LN10;var t=Math.log(Math.min(P[0],P[1]))/Math.LN10;return v(t)||(t=Math.log(Math.max(P[0],P[1]))/Math.LN10-6),t}}}),Ei=Ne({"src/lib/relink_private.js"(te,Z){var v=Ri().isArrayOrTypedArray,w=qa();Z.exports=function C(P,t){for(var r in t){var a=t[r],l=P[r];if(l!==a)if(r.charAt(0)==="_"||typeof a=="function"){if(r in P)continue;P[r]=a}else if(v(a)&&v(l)&&w(a[0])){if(r==="customdata"||r==="ids")continue;for(var i=Math.min(a.length,l.length),s=0;s<i;s++)l[s]!==a[s]&&w(a[s])&&w(l[s])&&C(l[s],a[s])}else w(a)&&w(l)&&(C(l,a),Object.keys(l).length||delete P[r])}}}}),$i=Ne({"src/lib/mod.js"(te,Z){function v(C,P){var t=C%P;return t<0?t+P:t}function w(C,P){return Math.abs(C)>P/2?C-Math.round(C/P)*P:C}Z.exports={mod:v,modHalf:w}}}),to=Ne({"node_modules/tinycolor2/tinycolor.js"(te,Z){(function(v){var w=/^\s+/,C=/\s+$/,P=0,t=v.round,r=v.min,a=v.max,l=v.random;function i(Y,ce){if(Y=Y||"",ce=ce||{},Y instanceof i)return Y;if(!(this instanceof i))return new i(Y,ce);var ue=s(Y);this._originalInput=Y,this._r=ue.r,this._g=ue.g,this._b=ue.b,this._a=ue.a,this._roundA=t(100*this._a)/100,this._format=ce.format||ue.format,this._gradientType=ce.gradientType,this._r<1&&(this._r=t(this._r)),this._g<1&&(this._g=t(this._g)),this._b<1&&(this._b=t(this._b)),this._ok=ue.ok,this._tc_id=P++}i.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var Y=this.toRgb();return(Y.r*299+Y.g*587+Y.b*114)/1e3},getLuminance:function(){var Y=this.toRgb(),ce,ue,_e,Le,ze,Xe;return ce=Y.r/255,ue=Y.g/255,_e=Y.b/255,ce<=.03928?Le=ce/12.92:Le=v.pow((ce+.055)/1.055,2.4),ue<=.03928?ze=ue/12.92:ze=v.pow((ue+.055)/1.055,2.4),_e<=.03928?Xe=_e/12.92:Xe=v.pow((_e+.055)/1.055,2.4),.2126*Le+.7152*ze+.0722*Xe},setAlpha:function(Y){return this._a=z(Y),this._roundA=t(100*this._a)/100,this},toHsv:function(){var Y=h(this._r,this._g,this._b);return{h:Y.h*360,s:Y.s,v:Y.v,a:this._a}},toHsvString:function(){var Y=h(this._r,this._g,this._b),ce=t(Y.h*360),ue=t(Y.s*100),_e=t(Y.v*100);return this._a==1?"hsv("+ce+", "+ue+"%, "+_e+"%)":"hsva("+ce+", "+ue+"%, "+_e+"%, "+this._roundA+")"},toHsl:function(){var Y=u(this._r,this._g,this._b);return{h:Y.h*360,s:Y.s,l:Y.l,a:this._a}},toHslString:function(){var Y=u(this._r,this._g,this._b),ce=t(Y.h*360),ue=t(Y.s*100),_e=t(Y.l*100);return this._a==1?"hsl("+ce+", "+ue+"%, "+_e+"%)":"hsla("+ce+", "+ue+"%, "+_e+"%, "+this._roundA+")"},toHex:function(Y){return m(this._r,this._g,this._b,Y)},toHexString:function(Y){return"#"+this.toHex(Y)},toHex8:function(Y){return E(this._r,this._g,this._b,this._a,Y)},toHex8String:function(Y){return"#"+this.toHex8(Y)},toRgb:function(){return{r:t(this._r),g:t(this._g),b:t(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+t(this._r)+", "+t(this._g)+", "+t(this._b)+")":"rgba("+t(this._r)+", "+t(this._g)+", "+t(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:t(H(this._r,255)*100)+"%",g:t(H(this._g,255)*100)+"%",b:t(H(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+t(H(this._r,255)*100)+"%, "+t(H(this._g,255)*100)+"%, "+t(H(this._b,255)*100)+"%)":"rgba("+t(H(this._r,255)*100)+"%, "+t(H(this._g,255)*100)+"%, "+t(H(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:V[m(this._r,this._g,this._b,!0)]||!1},toFilter:function(Y){var ce="#"+c(this._r,this._g,this._b,this._a),ue=ce,_e=this._gradientType?"GradientType = 1, ":"";if(Y){var Le=i(Y);ue="#"+c(Le._r,Le._g,Le._b,Le._a)}return"progid:DXImageTransform.Microsoft.gradient("+_e+"startColorstr="+ce+",endColorstr="+ue+")"},toString:function(Y){var ce=!!Y;Y=Y||this._format;var ue=!1,_e=this._a<1&&this._a>=0,Le=!ce&&_e&&(Y==="hex"||Y==="hex6"||Y==="hex3"||Y==="hex4"||Y==="hex8"||Y==="name");return Le?Y==="name"&&this._a===0?this.toName():this.toRgbString():(Y==="rgb"&&(ue=this.toRgbString()),Y==="prgb"&&(ue=this.toPercentageRgbString()),(Y==="hex"||Y==="hex6")&&(ue=this.toHexString()),Y==="hex3"&&(ue=this.toHexString(!0)),Y==="hex4"&&(ue=this.toHex8String(!0)),Y==="hex8"&&(ue=this.toHex8String()),Y==="name"&&(ue=this.toName()),Y==="hsl"&&(ue=this.toHslString()),Y==="hsv"&&(ue=this.toHsvString()),ue||this.toHexString())},clone:function(){return i(this.toString())},_applyModification:function(Y,ce){var ue=Y.apply(null,[this].concat([].slice.call(ce)));return this._r=ue._r,this._g=ue._g,this._b=ue._b,this.setAlpha(ue._a),this},lighten:function(){return this._applyModification(k,arguments)},brighten:function(){return this._applyModification(b,arguments)},darken:function(){return this._applyModification(A,arguments)},desaturate:function(){return this._applyModification(_,arguments)},saturate:function(){return this._applyModification(T,arguments)},greyscale:function(){return this._applyModification(M,arguments)},spin:function(){return this._applyModification(y,arguments)},_applyCombination:function(Y,ce){return Y.apply(null,[this].concat([].slice.call(ce)))},analogous:function(){return this._applyCombination(D,arguments)},complement:function(){return this._applyCombination(f,arguments)},monochromatic:function(){return this._applyCombination(B,arguments)},splitcomplement:function(){return this._applyCombination(N,arguments)},triad:function(){return this._applyCombination(p,arguments)},tetrad:function(){return this._applyCombination(x,arguments)}},i.fromRatio=function(Y,ce){if(typeof Y=="object"){var ue={};for(var _e in Y)Y.hasOwnProperty(_e)&&(_e==="a"?ue[_e]=Y[_e]:ue[_e]=me(Y[_e]));Y=ue}return i(Y,ce)};function s(Y){var ce={r:0,g:0,b:0},ue=1,_e=null,Le=null,ze=null,Xe=!1,Ve=!1;return typeof Y=="string"&&(Y=pe(Y)),typeof Y=="object"&&(ee(Y.r)&&ee(Y.g)&&ee(Y.b)?(ce=o(Y.r,Y.g,Y.b),Xe=!0,Ve=String(Y.r).substr(-1)==="%"?"prgb":"rgb"):ee(Y.h)&&ee(Y.s)&&ee(Y.v)?(_e=me(Y.s),Le=me(Y.v),ce=g(Y.h,_e,Le),Xe=!0,Ve="hsv"):ee(Y.h)&&ee(Y.s)&&ee(Y.l)&&(_e=me(Y.s),ze=me(Y.l),ce=d(Y.h,_e,ze),Xe=!0,Ve="hsl"),Y.hasOwnProperty("a")&&(ue=Y.a)),ue=z(ue),{ok:Xe,format:Y.format||Ve,r:r(255,a(ce.r,0)),g:r(255,a(ce.g,0)),b:r(255,a(ce.b,0)),a:ue}}function o(Y,ce,ue){return{r:H(Y,255)*255,g:H(ce,255)*255,b:H(ue,255)*255}}function u(Y,ce,ue){Y=H(Y,255),ce=H(ce,255),ue=H(ue,255);var _e=a(Y,ce,ue),Le=r(Y,ce,ue),ze,Xe,Ve=(_e+Le)/2;if(_e==Le)ze=Xe=0;else{var rt=_e-Le;switch(Xe=Ve>.5?rt/(2-_e-Le):rt/(_e+Le),_e){case Y:ze=(ce-ue)/rt+(ce<ue?6:0);break;case ce:ze=(ue-Y)/rt+2;break;case ue:ze=(Y-ce)/rt+4;break}ze/=6}return{h:ze,s:Xe,l:Ve}}function d(Y,ce,ue){var _e,Le,ze;Y=H(Y,360),ce=H(ce,100),ue=H(ue,100);function Xe(mt,_t,vt){return vt<0&&(vt+=1),vt>1&&(vt-=1),vt<1/6?mt+(_t-mt)*6*vt:vt<1/2?_t:vt<2/3?mt+(_t-mt)*(2/3-vt)*6:mt}if(ce===0)_e=Le=ze=ue;else{var Ve=ue<.5?ue*(1+ce):ue+ce-ue*ce,rt=2*ue-Ve;_e=Xe(rt,Ve,Y+1/3),Le=Xe(rt,Ve,Y),ze=Xe(rt,Ve,Y-1/3)}return{r:_e*255,g:Le*255,b:ze*255}}function h(Y,ce,ue){Y=H(Y,255),ce=H(ce,255),ue=H(ue,255);var _e=a(Y,ce,ue),Le=r(Y,ce,ue),ze,Xe,Ve=_e,rt=_e-Le;if(Xe=_e===0?0:rt/_e,_e==Le)ze=0;else{switch(_e){case Y:ze=(ce-ue)/rt+(ce<ue?6:0);break;case ce:ze=(ue-Y)/rt+2;break;case ue:ze=(Y-ce)/rt+4;break}ze/=6}return{h:ze,s:Xe,v:Ve}}function g(Y,ce,ue){Y=H(Y,360)*6,ce=H(ce,100),ue=H(ue,100);var _e=v.floor(Y),Le=Y-_e,ze=ue*(1-ce),Xe=ue*(1-Le*ce),Ve=ue*(1-(1-Le)*ce),rt=_e%6,mt=[ue,Xe,ze,ze,Ve,ue][rt],_t=[Ve,ue,ue,Xe,ze,ze][rt],vt=[ze,ze,Ve,ue,ue,Xe][rt];return{r:mt*255,g:_t*255,b:vt*255}}function m(Y,ce,ue,_e){var Le=[de(t(Y).toString(16)),de(t(ce).toString(16)),de(t(ue).toString(16))];return _e&&Le[0].charAt(0)==Le[0].charAt(1)&&Le[1].charAt(0)==Le[1].charAt(1)&&Le[2].charAt(0)==Le[2].charAt(1)?Le[0].charAt(0)+Le[1].charAt(0)+Le[2].charAt(0):Le.join("")}function E(Y,ce,ue,_e,Le){var ze=[de(t(Y).toString(16)),de(t(ce).toString(16)),de(t(ue).toString(16)),de(W(_e))];return Le&&ze[0].charAt(0)==ze[0].charAt(1)&&ze[1].charAt(0)==ze[1].charAt(1)&&ze[2].charAt(0)==ze[2].charAt(1)&&ze[3].charAt(0)==ze[3].charAt(1)?ze[0].charAt(0)+ze[1].charAt(0)+ze[2].charAt(0)+ze[3].charAt(0):ze.join("")}function c(Y,ce,ue,_e){var Le=[de(W(_e)),de(t(Y).toString(16)),de(t(ce).toString(16)),de(t(ue).toString(16))];return Le.join("")}i.equals=function(Y,ce){return!Y||!ce?!1:i(Y).toRgbString()==i(ce).toRgbString()},i.random=function(){return i.fromRatio({r:l(),g:l(),b:l()})};function _(Y,ce){ce=ce===0?0:ce||10;var ue=i(Y).toHsl();return ue.s-=ce/100,ue.s=G(ue.s),i(ue)}function T(Y,ce){ce=ce===0?0:ce||10;var ue=i(Y).toHsl();return ue.s+=ce/100,ue.s=G(ue.s),i(ue)}function M(Y){return i(Y).desaturate(100)}function k(Y,ce){ce=ce===0?0:ce||10;var ue=i(Y).toHsl();return ue.l+=ce/100,ue.l=G(ue.l),i(ue)}function b(Y,ce){ce=ce===0?0:ce||10;var ue=i(Y).toRgb();return ue.r=a(0,r(255,ue.r-t(255*-(ce/100)))),ue.g=a(0,r(255,ue.g-t(255*-(ce/100)))),ue.b=a(0,r(255,ue.b-t(255*-(ce/100)))),i(ue)}function A(Y,ce){ce=ce===0?0:ce||10;var ue=i(Y).toHsl();return ue.l-=ce/100,ue.l=G(ue.l),i(ue)}function y(Y,ce){var ue=i(Y).toHsl(),_e=(ue.h+ce)%360;return ue.h=_e<0?360+_e:_e,i(ue)}function f(Y){var ce=i(Y).toHsl();return ce.h=(ce.h+180)%360,i(ce)}function p(Y){var ce=i(Y).toHsl(),ue=ce.h;return[i(Y),i({h:(ue+120)%360,s:ce.s,l:ce.l}),i({h:(ue+240)%360,s:ce.s,l:ce.l})]}function x(Y){var ce=i(Y).toHsl(),ue=ce.h;return[i(Y),i({h:(ue+90)%360,s:ce.s,l:ce.l}),i({h:(ue+180)%360,s:ce.s,l:ce.l}),i({h:(ue+270)%360,s:ce.s,l:ce.l})]}function N(Y){var ce=i(Y).toHsl(),ue=ce.h;return[i(Y),i({h:(ue+72)%360,s:ce.s,l:ce.l}),i({h:(ue+216)%360,s:ce.s,l:ce.l})]}function D(Y,ce,ue){ce=ce||6,ue=ue||30;var _e=i(Y).toHsl(),Le=360/ue,ze=[i(Y)];for(_e.h=(_e.h-(Le*ce>>1)+720)%360;--ce;)_e.h=(_e.h+Le)%360,ze.push(i(_e));return ze}function B(Y,ce){ce=ce||6;for(var ue=i(Y).toHsv(),_e=ue.h,Le=ue.s,ze=ue.v,Xe=[],Ve=1/ce;ce--;)Xe.push(i({h:_e,s:Le,v:ze})),ze=(ze+Ve)%1;return Xe}i.mix=function(Y,ce,ue){ue=ue===0?0:ue||50;var _e=i(Y).toRgb(),Le=i(ce).toRgb(),ze=ue/100,Xe={r:(Le.r-_e.r)*ze+_e.r,g:(Le.g-_e.g)*ze+_e.g,b:(Le.b-_e.b)*ze+_e.b,a:(Le.a-_e.a)*ze+_e.a};return i(Xe)},i.readability=function(Y,ce){var ue=i(Y),_e=i(ce);return(v.max(ue.getLuminance(),_e.getLuminance())+.05)/(v.min(ue.getLuminance(),_e.getLuminance())+.05)},i.isReadable=function(Y,ce,ue){var _e=i.readability(Y,ce),Le,ze;switch(ze=!1,Le=oe(ue),Le.level+Le.size){case"AAsmall":case"AAAlarge":ze=_e>=4.5;break;case"AAlarge":ze=_e>=3;break;case"AAAsmall":ze=_e>=7;break}return ze},i.mostReadable=function(Y,ce,ue){var _e=null,Le=0,ze,Xe,Ve,rt;ue=ue||{},Xe=ue.includeFallbackColors,Ve=ue.level,rt=ue.size;for(var mt=0;mt<ce.length;mt++)ze=i.readability(Y,ce[mt]),ze>Le&&(Le=ze,_e=i(ce[mt]));return i.isReadable(Y,_e,{level:Ve,size:rt})||!Xe?_e:(ue.includeFallbackColors=!1,i.mostReadable(Y,["#fff","#000"],ue))};var U=i.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},V=i.hexNames=q(U);function q(Y){var ce={};for(var ue in Y)Y.hasOwnProperty(ue)&&(ce[Y[ue]]=ue);return ce}function z(Y){return Y=parseFloat(Y),(isNaN(Y)||Y<0||Y>1)&&(Y=1),Y}function H(Y,ce){le(Y)&&(Y="100%");var ue=ge(Y);return Y=r(ce,a(0,parseFloat(Y))),ue&&(Y=parseInt(Y*ce,10)/100),v.abs(Y-ce)<1e-6?1:Y%ce/parseFloat(ce)}function G(Y){return r(1,a(0,Y))}function J(Y){return parseInt(Y,16)}function le(Y){return typeof Y=="string"&&Y.indexOf(".")!=-1&&parseFloat(Y)===1}function ge(Y){return typeof Y=="string"&&Y.indexOf("%")!=-1}function de(Y){return Y.length==1?"0"+Y:""+Y}function me(Y){return Y<=1&&(Y=Y*100+"%"),Y}function W(Y){return v.round(parseFloat(Y)*255).toString(16)}function ie(Y){return J(Y)/255}var se=(function(){var Y="[-\\+]?\\d+%?",ce="[-\\+]?\\d*\\.\\d+%?",ue="(?:"+ce+")|(?:"+Y+")",_e="[\\s|\\(]+("+ue+")[,|\\s]+("+ue+")[,|\\s]+("+ue+")\\s*\\)?",Le="[\\s|\\(]+("+ue+")[,|\\s]+("+ue+")[,|\\s]+("+ue+")[,|\\s]+("+ue+")\\s*\\)?";return{CSS_UNIT:new RegExp(ue),rgb:new RegExp("rgb"+_e),rgba:new RegExp("rgba"+Le),hsl:new RegExp("hsl"+_e),hsla:new RegExp("hsla"+Le),hsv:new RegExp("hsv"+_e),hsva:new RegExp("hsva"+Le),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}})();function ee(Y){return!!se.CSS_UNIT.exec(Y)}function pe(Y){Y=Y.replace(w,"").replace(C,"").toLowerCase();var ce=!1;if(U[Y])Y=U[Y],ce=!0;else if(Y=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var ue;return(ue=se.rgb.exec(Y))?{r:ue[1],g:ue[2],b:ue[3]}:(ue=se.rgba.exec(Y))?{r:ue[1],g:ue[2],b:ue[3],a:ue[4]}:(ue=se.hsl.exec(Y))?{h:ue[1],s:ue[2],l:ue[3]}:(ue=se.hsla.exec(Y))?{h:ue[1],s:ue[2],l:ue[3],a:ue[4]}:(ue=se.hsv.exec(Y))?{h:ue[1],s:ue[2],v:ue[3]}:(ue=se.hsva.exec(Y))?{h:ue[1],s:ue[2],v:ue[3],a:ue[4]}:(ue=se.hex8.exec(Y))?{r:J(ue[1]),g:J(ue[2]),b:J(ue[3]),a:ie(ue[4]),format:ce?"name":"hex8"}:(ue=se.hex6.exec(Y))?{r:J(ue[1]),g:J(ue[2]),b:J(ue[3]),format:ce?"name":"hex"}:(ue=se.hex4.exec(Y))?{r:J(ue[1]+""+ue[1]),g:J(ue[2]+""+ue[2]),b:J(ue[3]+""+ue[3]),a:ie(ue[4]+""+ue[4]),format:ce?"name":"hex8"}:(ue=se.hex3.exec(Y))?{r:J(ue[1]+""+ue[1]),g:J(ue[2]+""+ue[2]),b:J(ue[3]+""+ue[3]),format:ce?"name":"hex"}:!1}function oe(Y){var ce,ue;return Y=Y||{level:"AA",size:"small"},ce=(Y.level||"AA").toUpperCase(),ue=(Y.size||"small").toLowerCase(),ce!=="AA"&&ce!=="AAA"&&(ce="AA"),ue!=="small"&&ue!=="large"&&(ue="small"),{level:ce,size:ue}}typeof Z<"u"&&Z.exports?Z.exports=i:window.tinycolor=i})(Math)}}),fi=Ne({"src/lib/extend.js"(te){var Z=qa(),v=Array.isArray;function w(P,t){var r,a;for(r=0;r<P.length;r++){if(a=P[r],a!==null&&typeof a=="object")return!1;a!==void 0&&(t[r]=a)}return!0}te.extendFlat=function(){return C(arguments,!1,!1,!1)},te.extendDeep=function(){return C(arguments,!0,!1,!1)},te.extendDeepAll=function(){return C(arguments,!0,!0,!1)},te.extendDeepNoArrays=function(){return C(arguments,!0,!1,!0)};function C(P,t,r,a){var l=P[0],i=P.length,s,o,u,d,h,g,m;if(i===2&&v(l)&&v(P[1])&&l.length===0){if(m=w(P[1],l),m)return l;l.splice(0,l.length)}for(var E=1;E<i;E++){s=P[E];for(o in s)u=l[o],d=s[o],a&&v(d)?l[o]=d:t&&d&&(Z(d)||(h=v(d)))?(h?(h=!1,g=u&&v(u)?u:[]):g=u&&Z(u)?u:{},l[o]=C([g,d],t,r,a)):(typeof d<"u"||r)&&(l[o]=d)}return l}}}),bo=Ne({"src/plots/font_attributes.js"(te,Z){Z.exports=function(v){var w=v.variantValues,C=v.editType,P=v.colorEditType;P===void 0&&(P=C);var t={editType:C,valType:"integer",min:1,max:1e3,extras:["normal","bold"],dflt:"normal"};v.noNumericWeightValues&&(t.valType="enumerated",t.values=t.extras,t.extras=void 0,t.min=void 0,t.max=void 0);var r={family:{valType:"string",noBlank:!0,strict:!0,editType:C},size:{valType:"number",min:1,editType:C},color:{valType:"color",editType:P},weight:t,style:{editType:C,valType:"enumerated",values:["normal","italic"],dflt:"normal"},variant:v.noFontVariant?void 0:{editType:C,valType:"enumerated",values:w||["normal","small-caps","all-small-caps","all-petite-caps","petite-caps","unicase"],dflt:"normal"},textcase:v.noFontTextcase?void 0:{editType:C,valType:"enumerated",values:["normal","word caps","upper","lower"],dflt:"normal"},lineposition:v.noFontLineposition?void 0:{editType:C,valType:"flaglist",flags:["under","over","through"],extras:["none"],dflt:"none"},shadow:v.noFontShadow?void 0:{editType:C,valType:"string",dflt:v.autoShadowDflt?"auto":"none"},editType:C};return v.autoSize&&(r.size.dflt="auto"),v.autoColor&&(r.color.dflt="auto"),v.arrayOk&&(r.family.arrayOk=!0,r.weight.arrayOk=!0,r.style.arrayOk=!0,v.noFontVariant||(r.variant.arrayOk=!0),v.noFontTextcase||(r.textcase.arrayOk=!0),v.noFontLineposition||(r.lineposition.arrayOk=!0),v.noFontShadow||(r.shadow.arrayOk=!0),r.size.arrayOk=!0,r.color.arrayOk=!0),r}}}),Ll=Ne({"src/components/fx/constants.js"(te,Z){Z.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}}}),Mo=Ne({"src/components/fx/layout_attributes.js"(te,Z){var v=Ll(),w=bo(),C=w({editType:"none"});C.family.dflt=v.HOVERFONT,C.size.dflt=v.HOVERFONTSIZE,Z.exports={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"]},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar"},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar"},hoversubplots:{valType:"enumerated",values:["single","overlaying","axis"],dflt:"overlaying",editType:"none"},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none"},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none"},hoverlabel:{bgcolor:{valType:"color",editType:"none"},bordercolor:{valType:"color",editType:"none"},font:C,grouptitlefont:w({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},showarrow:{valType:"boolean",dflt:!0,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}}}),Hs=Ne({"src/components/fx/attributes.js"(te,Z){var v=bo(),w=Mo().hoverlabel,C=fi().extendFlat;Z.exports={hoverlabel:{bgcolor:C({},w.bgcolor,{arrayOk:!0}),bordercolor:C({},w.bordercolor,{arrayOk:!0}),font:v({arrayOk:!0,editType:"none"}),align:C({},w.align,{arrayOk:!0}),namelength:C({},w.namelength,{arrayOk:!0}),showarrow:C({},w.showarrow),editType:"none"}}}}),qo=Ne({"src/plots/attributes.js"(te,Z){var v=bo(),w=Hs();Z.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:v({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:w.hoverlabel,stream:{token:{valType:"string",noBlank:!0,strict:!0,editType:"calc"},maxpoints:{valType:"number",min:0,max:1e4,dflt:500,editType:"calc"},editType:"calc"},uirevision:{valType:"any",editType:"none"}}}}),Di=Ne({"src/components/colorscale/scales.js"(te,Z){var v=to(),w={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)"]]},C=w.RdBu;function P(a,l){if(l||(l=C),!a)return l;function i(){try{a=w[a]||JSON.parse(a)}catch{a=l}}return typeof a=="string"&&(i(),typeof a=="string"&&i()),t(a)?a:l}function t(a){var l=0;if(!Array.isArray(a)||a.length<2||!a[0]||!a[a.length-1]||+a[0][0]!=0||+a[a.length-1][0]!=1)return!1;for(var i=0;i<a.length;i++){var s=a[i];if(s.length!==2||+s[0]<l||!v(s[1]).isValid())return!1;l=+s[0]}return!0}function r(a){return w[a]!==void 0?!0:t(a)}Z.exports={scales:w,defaultScale:C,get:P,isValid:r}}}),js=Ne({"src/components/color/attributes.js"(te){te.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],te.defaultLine="#444",te.lightLine="#eee",te.background="#fff",te.borderLine="#BEC8D9",te.lightFraction=1e3/11}}),Ha=Ne({"src/components/color/index.js"(te,Z){var v=to(),w=Fn(),C=Ri().isTypedArray,P=Z.exports={},t=js();P.defaults=t.defaults;var r=P.defaultLine=t.defaultLine;P.lightLine=t.lightLine;var a=P.background=t.background;P.tinyRGB=function(i){var s=i.toRgb();return"rgb("+Math.round(s.r)+", "+Math.round(s.g)+", "+Math.round(s.b)+")"},P.rgb=function(i){return P.tinyRGB(v(i))},P.opacity=function(i){return i?v(i).getAlpha():0},P.addOpacity=function(i,s){var o=v(i).toRgb();return"rgba("+Math.round(o.r)+", "+Math.round(o.g)+", "+Math.round(o.b)+", "+s+")"},P.combine=function(i,s){var o=v(i).toRgb();if(o.a===1)return v(i).toRgbString();var u=v(s||a).toRgb(),d=u.a===1?u:{r:255*(1-u.a)+u.r*u.a,g:255*(1-u.a)+u.g*u.a,b:255*(1-u.a)+u.b*u.a},h={r:d.r*(1-o.a)+o.r*o.a,g:d.g*(1-o.a)+o.g*o.a,b:d.b*(1-o.a)+o.b*o.a};return v(h).toRgbString()},P.interpolate=function(i,s,o){var u=v(i).toRgb(),d=v(s).toRgb(),h={r:o*u.r+(1-o)*d.r,g:o*u.g+(1-o)*d.g,b:o*u.b+(1-o)*d.b};return v(h).toRgbString()},P.contrast=function(i,s,o){var u=v(i);u.getAlpha()!==1&&(u=v(P.combine(i,a)));var d=u.isDark()?s?u.lighten(s):a:o?u.darken(o):r;return d.toString()},P.stroke=function(i,s){var o=v(s);i.style({stroke:P.tinyRGB(o),"stroke-opacity":o.getAlpha()})},P.fill=function(i,s){var o=v(s);i.style({fill:P.tinyRGB(o),"fill-opacity":o.getAlpha()})},P.clean=function(i){if(!(!i||typeof i!="object")){var s=Object.keys(i),o,u,d,h;for(o=0;o<s.length;o++)if(d=s[o],h=i[d],d.substr(d.length-5)==="color")if(Array.isArray(h))for(u=0;u<h.length;u++)h[u]=l(h[u]);else i[d]=l(h);else if(d.substr(d.length-10)==="colorscale"&&Array.isArray(h))for(u=0;u<h.length;u++)Array.isArray(h[u])&&(h[u][1]=l(h[u][1]));else if(Array.isArray(h)){var g=h[0];if(!Array.isArray(g)&&g&&typeof g=="object")for(u=0;u<h.length;u++)P.clean(h[u])}else h&&typeof h=="object"&&!C(h)&&P.clean(h)}};function l(i){if(w(i)||typeof i!="string")return i;var s=i.trim();if(s.substr(0,3)!=="rgb")return i;var o=s.match(/^rgba?\s*\(([^()]*)\)$/);if(!o)return i;var u=o[1].trim().split(/\s*[\s,]\s*/),d=s.charAt(3)==="a"&&u.length===4;if(!d&&u.length!==3)return i;for(var h=0;h<u.length;h++){if(!u[h].length||(u[h]=Number(u[h]),!(u[h]>=0)))return i;if(h===3)u[h]>1&&(u[h]=1);else if(u[h]>=1)return i}var g=Math.round(u[0]*255)+", "+Math.round(u[1]*255)+", "+Math.round(u[2]*255);return d?"rgba("+g+", "+u[3]+")":"rgb("+g+")"}}}),El=Ne({"src/constants/interactions.js"(te,Z){Z.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}}}),ml=Ne({"src/lib/regex.js"(te){te.counter=function(Z,v,w,C){var P=(v||"")+(w?"":"$"),t=C===!1?"":"^";return Z==="xy"?new RegExp(t+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+P):new RegExp(t+Z+"([2-9]|[1-9][0-9]+)?"+P)}}}),Vu=Ne({"src/lib/coerce.js"(te){var Z=Fn(),v=to(),w=fi().extendFlat,C=qo(),P=Di(),t=Ha(),r=El().DESELECTDIM,a=mi(),l=ml().counter,i=$i().modHalf,s=Ri().isArrayOrTypedArray,o=Ri().isTypedArraySpec,u=Ri().decodeTypedArraySpec;te.valObjectMeta={data_array:{coerceFunction:function(h,g,m){g.set(s(h)?h:o(h)?u(h):m)}},enumerated:{coerceFunction:function(h,g,m,E){E.coerceNumber&&(h=+h),E.values.indexOf(h)===-1?g.set(m):g.set(h)},validateFunction:function(h,g){g.coerceNumber&&(h=+h);for(var m=g.values,E=0;E<m.length;E++){var c=String(m[E]);if(c.charAt(0)==="/"&&c.charAt(c.length-1)==="/"){var _=new RegExp(c.substr(1,c.length-2));if(_.test(h))return!0}else if(h===m[E])return!0}return!1}},boolean:{coerceFunction:function(h,g,m){h===!0||h===!1?g.set(h):g.set(m)}},number:{coerceFunction:function(h,g,m,E){o(h)&&(h=u(h)),!Z(h)||E.min!==void 0&&h<E.min||E.max!==void 0&&h>E.max?g.set(m):g.set(+h)}},integer:{coerceFunction:function(h,g,m,E){if((E.extras||[]).indexOf(h)!==-1){g.set(h);return}o(h)&&(h=u(h)),h%1||!Z(h)||E.min!==void 0&&h<E.min||E.max!==void 0&&h>E.max?g.set(m):g.set(+h)}},string:{coerceFunction:function(h,g,m,E){if(typeof h!="string"){var c=typeof h=="number";E.strict===!0||!c?g.set(m):g.set(String(h))}else E.noBlank&&!h?g.set(m):g.set(h)}},color:{coerceFunction:function(h,g,m){o(h)&&(h=u(h)),v(h).isValid()?g.set(h):g.set(m)}},colorlist:{coerceFunction:function(h,g,m){function E(c){return v(c).isValid()}!Array.isArray(h)||!h.length?g.set(m):h.every(E)?g.set(h):g.set(m)}},colorscale:{coerceFunction:function(h,g,m){g.set(P.get(h,m))}},angle:{coerceFunction:function(h,g,m){o(h)&&(h=u(h)),h==="auto"?g.set("auto"):Z(h)?g.set(i(+h,360)):g.set(m)}},subplotid:{coerceFunction:function(h,g,m,E){var c=E.regex||l(m);if(typeof h=="string"&&c.test(h)){g.set(h);return}g.set(m)},validateFunction:function(h,g){var m=g.dflt;return h===m?!0:typeof h!="string"?!1:!!l(m).test(h)}},flaglist:{coerceFunction:function(h,g,m,E){if((E.extras||[]).indexOf(h)!==-1){g.set(h);return}if(typeof h!="string"){g.set(m);return}for(var c=h.split("+"),_=0;_<c.length;){var T=c[_];E.flags.indexOf(T)===-1||c.indexOf(T)<_?c.splice(_,1):_++}c.length?g.set(c.join("+")):g.set(m)}},any:{coerceFunction:function(h,g,m){h===void 0?g.set(m):g.set(o(h)?u(h):h)}},info_array:{coerceFunction:function(h,g,m,E){function c(U,V,q){var z,H={set:function(G){z=G}};return q===void 0&&(q=V.dflt),te.valObjectMeta[V.valType].coerceFunction(U,H,q,V),z}if(o(h)&&(h=u(h)),!s(h)){g.set(m);return}var _=E.dimensions===2||E.dimensions==="1-2"&&Array.isArray(h)&&s(h[0]),T=E.items,M=[],k=Array.isArray(T),b=k&&_&&s(T[0]),A=_&&k&&!b,y=k&&!A?T.length:h.length,f,p,x,N,D,B;if(m=Array.isArray(m)?m:[],_)for(f=0;f<y;f++)for(M[f]=[],x=s(h[f])?h[f]:[],A?D=T.length:k?D=T[f].length:D=x.length,p=0;p<D;p++)A?N=T[p]:k?N=T[f][p]:N=T,B=c(x[p],N,(m[f]||[])[p]),B!==void 0&&(M[f][p]=B);else for(f=0;f<y;f++)B=c(h[f],k?T[f]:T,m[f]),B!==void 0&&(M[f]=B);g.set(M)},validateFunction:function(h,g){if(!s(h))return!1;var m=g.items,E=Array.isArray(m),c=g.dimensions===2;if(!g.freeLength&&h.length!==m.length)return!1;for(var _=0;_<h.length;_++)if(c){if(!s(h[_])||!g.freeLength&&h[_].length!==m[_].length)return!1;for(var T=0;T<h[_].length;T++)if(!d(h[_][T],E?m[_][T]:m))return!1}else if(!d(h[_],E?m[_]:m))return!1;return!0}}},te.coerce=function(h,g,m,E,c){var _=a(m,E).get(),T=a(h,E),M=a(g,E),k=T.get(),b=g._template;if(k===void 0&&b&&(k=a(b,E).get(),b=0),c===void 0&&(c=_.dflt),_.arrayOk){if(s(k))return M.set(k),k;if(o(k))return k=u(k),M.set(k),k}var A=te.valObjectMeta[_.valType].coerceFunction;A(k,M,c,_);var y=M.get();return b&&y===c&&!d(k,_)&&(k=a(b,E).get(),A(k,M,c,_),y=M.get()),y},te.coerce2=function(h,g,m,E,c){var _=a(h,E),T=te.coerce(h,g,m,E,c),M=_.get();return M!=null?T:!1},te.coerceFont=function(h,g,m,E){E||(E={}),m=w({},m),m=w(m,E.overrideDflt||{});var c={family:h(g+".family",m.family),size:h(g+".size",m.size),color:h(g+".color",m.color),weight:h(g+".weight",m.weight),style:h(g+".style",m.style)};if(E.noFontVariant||(c.variant=h(g+".variant",m.variant)),E.noFontLineposition||(c.lineposition=h(g+".lineposition",m.lineposition)),E.noFontTextcase||(c.textcase=h(g+".textcase",m.textcase)),!E.noFontShadow){var _=m.shadow;_==="none"&&E.autoShadowDflt&&(_="auto"),c.shadow=h(g+".shadow",_)}return c},te.coercePattern=function(h,g,m,E){var c=h(g+".shape"),_;if(c||(_=h(g+".path")),c||_){c&&h(g+".solidity"),h(g+".size");var T=h(g+".fillmode"),M=T==="overlay";if(!E){var k=h(g+".bgcolor",M?m:void 0);h(g+".fgcolor",M?t.contrast(k):m)}h(g+".fgopacity",M?.5:1)}},te.coerceHoverinfo=function(h,g,m){var E=g._module.attributes,c=E.hoverinfo?E:C,_=c.hoverinfo,T;if(m._dataLength===1){var M=_.dflt==="all"?_.flags.slice():_.dflt.split("+");M.splice(M.indexOf("name"),1),T=M.join("+")}return te.coerce(h,g,c,"hoverinfo",T)},te.coerceSelectionMarkerOpacity=function(h,g){if(h.marker){var m=h.marker.opacity;if(m!==void 0){var E,c;!s(m)&&!h.selected&&!h.unselected&&(E=m,c=r*m),g("selected.marker.opacity",E),g("unselected.marker.opacity",c)}}};function d(h,g){var m=te.valObjectMeta[g.valType];if(g.arrayOk&&s(h))return!0;if(m.validateFunction)return m.validateFunction(h,g);var E={},c=E,_={set:function(T){c=T}};return m.coerceFunction(h,_,E,g),c!==E}te.validate=d}}),Gf=Ne({"src/plot_api/plot_config.js"(te,Z){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","map"],extras:[!0,!1],dflt:"gl3d+geo+map"},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize"},doubleClickDelay:{valType:"number",dflt:300,min:0},showAxisDragHandles:{valType:"boolean",dflt:!0},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0},showTips:{valType:"boolean",dflt:!0},showLink:{valType:"boolean",dflt:!1},linkText:{valType:"string",dflt:"Edit chart",noBlank:!0},sendData:{valType:"boolean",dflt:!0},showSources:{valType:"any",dflt:!1},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover"},showSendToCloud:{valType:"boolean",dflt:!1},showEditInChartStudio:{valType:"boolean",dflt:!1},modeBarButtonsToRemove:{valType:"any",dflt:[]},modeBarButtonsToAdd:{valType:"any",dflt:[]},modeBarButtons:{valType:"any",dflt:!1},toImageButtonOptions:{valType:"any",dflt:{}},displaylogo:{valType:"boolean",dflt:!0},watermark:{valType:"boolean",dflt:!1},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4},setBackground:{valType:"any",dflt:"transparent"},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/un/"},mapboxAccessToken:{valType:"string",dflt:null},logging:{valType:"integer",min:0,max:2,dflt:1},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0},queueLength:{valType:"integer",min:0,dflt:0},locale:{valType:"string",dflt:"en-US"},locales:{valType:"any",dflt:{}}},w={};function C(P,t){for(var r in P){var a=P[r];a.valType?t[r]=a.dflt:(t[r]||(t[r]={}),C(a,t[r]))}}C(v,w),Z.exports={configAttributes:v,dfltConfig:w}}}),zd=Ne({"src/lib/notifier.js"(te,Z){var v=xn(),w=Fn(),C=[];Z.exports=function(P,t){if(C.indexOf(P)!==-1)return;C.push(P);var r=1e3;w(t)?r=t:t==="long"&&(r=3e3);var a=v.select("body").selectAll(".plotly-notifier").data([0]);a.enter().append("div").classed("plotly-notifier",!0);var l=a.selectAll(".notifier-note").data(C);function i(s){s.duration(700).style("opacity",0).each("end",function(o){var u=C.indexOf(o);u!==-1&&C.splice(u,1),v.select(this).remove()})}l.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(s){var o=v.select(this);o.append("button").classed("notifier-close",!0).html("&times;").on("click",function(){o.transition().call(i)});for(var u=o.append("p"),d=s.split(/<br\s*\/?>/g),h=0;h<d.length;h++)h&&u.append("br"),u.append("span").text(d[h]);t==="stick"?o.transition().duration(350).style("opacity",1):o.transition().duration(700).style("opacity",1).transition().delay(r).call(i)})}}}),Nd=Ne({"src/lib/loggers.js"(te,Z){var v=Gf().dfltConfig,w=zd(),C=Z.exports={};C.log=function(){var P;if(v.logging>1){var t=["LOG:"];for(P=0;P<arguments.length;P++)t.push(arguments[P]);console.trace.apply(console,t)}if(v.notifyOnLogging>1){var r=[];for(P=0;P<arguments.length;P++)r.push(arguments[P]);w(r.join("<br>"),"long")}},C.warn=function(){var P;if(v.logging>0){var t=["WARN:"];for(P=0;P<arguments.length;P++)t.push(arguments[P]);console.trace.apply(console,t)}if(v.notifyOnLogging>0){var r=[];for(P=0;P<arguments.length;P++)r.push(arguments[P]);w(r.join("<br>"),"stick")}},C.error=function(){var P;if(v.logging>0){var t=["ERROR:"];for(P=0;P<arguments.length;P++)t.push(arguments[P]);console.error.apply(console,t)}if(v.notifyOnLogging>0){var r=[];for(P=0;P<arguments.length;P++)r.push(arguments[P]);w(r.join("<br>"),"stick")}}}}),ad=Ne({"src/lib/noop.js"(te,Z){Z.exports=function(){}}}),jp=Ne({"src/lib/push_unique.js"(te,Z){Z.exports=function(w,C){if(C instanceof RegExp){for(var P=C.toString(),t=0;t<w.length;t++)if(w[t]instanceof RegExp&&w[t].toString()===P)return w;w.push(C)}else(C||C===0)&&w.indexOf(C)===-1&&w.push(C);return w}}}),Up=Ne({"node_modules/gl-mat4/create.js"(te,Z){Z.exports=v;function v(){var w=new Float32Array(16);return w[0]=1,w[1]=0,w[2]=0,w[3]=0,w[4]=0,w[5]=1,w[6]=0,w[7]=0,w[8]=0,w[9]=0,w[10]=1,w[11]=0,w[12]=0,w[13]=0,w[14]=0,w[15]=1,w}}}),ov=Ne({"node_modules/gl-mat4/clone.js"(te,Z){Z.exports=v;function v(w){var C=new Float32Array(16);return C[0]=w[0],C[1]=w[1],C[2]=w[2],C[3]=w[3],C[4]=w[4],C[5]=w[5],C[6]=w[6],C[7]=w[7],C[8]=w[8],C[9]=w[9],C[10]=w[10],C[11]=w[11],C[12]=w[12],C[13]=w[13],C[14]=w[14],C[15]=w[15],C}}}),P1=Ne({"node_modules/gl-mat4/copy.js"(te,Z){Z.exports=v;function v(w,C){return w[0]=C[0],w[1]=C[1],w[2]=C[2],w[3]=C[3],w[4]=C[4],w[5]=C[5],w[6]=C[6],w[7]=C[7],w[8]=C[8],w[9]=C[9],w[10]=C[10],w[11]=C[11],w[12]=C[12],w[13]=C[13],w[14]=C[14],w[15]=C[15],w}}}),Fv=Ne({"node_modules/gl-mat4/identity.js"(te,Z){Z.exports=v;function v(w){return w[0]=1,w[1]=0,w[2]=0,w[3]=0,w[4]=0,w[5]=1,w[6]=0,w[7]=0,w[8]=0,w[9]=0,w[10]=1,w[11]=0,w[12]=0,w[13]=0,w[14]=0,w[15]=1,w}}}),I0=Ne({"node_modules/gl-mat4/transpose.js"(te,Z){Z.exports=v;function v(w,C){if(w===C){var P=C[1],t=C[2],r=C[3],a=C[6],l=C[7],i=C[11];w[1]=C[4],w[2]=C[8],w[3]=C[12],w[4]=P,w[6]=C[9],w[7]=C[13],w[8]=t,w[9]=a,w[11]=C[14],w[12]=r,w[13]=l,w[14]=i}else w[0]=C[0],w[1]=C[4],w[2]=C[8],w[3]=C[12],w[4]=C[1],w[5]=C[5],w[6]=C[9],w[7]=C[13],w[8]=C[2],w[9]=C[6],w[10]=C[10],w[11]=C[14],w[12]=C[3],w[13]=C[7],w[14]=C[11],w[15]=C[15];return w}}}),L1=Ne({"node_modules/gl-mat4/invert.js"(te,Z){Z.exports=v;function v(w,C){var P=C[0],t=C[1],r=C[2],a=C[3],l=C[4],i=C[5],s=C[6],o=C[7],u=C[8],d=C[9],h=C[10],g=C[11],m=C[12],E=C[13],c=C[14],_=C[15],T=P*i-t*l,M=P*s-r*l,k=P*o-a*l,b=t*s-r*i,A=t*o-a*i,y=r*o-a*s,f=u*E-d*m,p=u*c-h*m,x=u*_-g*m,N=d*c-h*E,D=d*_-g*E,B=h*_-g*c,U=T*B-M*D+k*N+b*x-A*p+y*f;return U?(U=1/U,w[0]=(i*B-s*D+o*N)*U,w[1]=(r*D-t*B-a*N)*U,w[2]=(E*y-c*A+_*b)*U,w[3]=(h*A-d*y-g*b)*U,w[4]=(s*x-l*B-o*p)*U,w[5]=(P*B-r*x+a*p)*U,w[6]=(c*k-m*y-_*M)*U,w[7]=(u*y-h*k+g*M)*U,w[8]=(l*D-i*x+o*f)*U,w[9]=(t*x-P*D-a*f)*U,w[10]=(m*A-E*k+_*T)*U,w[11]=(d*k-u*A-g*T)*U,w[12]=(i*p-l*N-s*f)*U,w[13]=(P*N-t*p+r*f)*U,w[14]=(E*M-m*b-c*T)*U,w[15]=(u*b-d*M+h*T)*U,w):null}}}),WT=Ne({"node_modules/gl-mat4/adjoint.js"(te,Z){Z.exports=v;function v(w,C){var P=C[0],t=C[1],r=C[2],a=C[3],l=C[4],i=C[5],s=C[6],o=C[7],u=C[8],d=C[9],h=C[10],g=C[11],m=C[12],E=C[13],c=C[14],_=C[15];return w[0]=i*(h*_-g*c)-d*(s*_-o*c)+E*(s*g-o*h),w[1]=-(t*(h*_-g*c)-d*(r*_-a*c)+E*(r*g-a*h)),w[2]=t*(s*_-o*c)-i*(r*_-a*c)+E*(r*o-a*s),w[3]=-(t*(s*g-o*h)-i*(r*g-a*h)+d*(r*o-a*s)),w[4]=-(l*(h*_-g*c)-u*(s*_-o*c)+m*(s*g-o*h)),w[5]=P*(h*_-g*c)-u*(r*_-a*c)+m*(r*g-a*h),w[6]=-(P*(s*_-o*c)-l*(r*_-a*c)+m*(r*o-a*s)),w[7]=P*(s*g-o*h)-l*(r*g-a*h)+u*(r*o-a*s),w[8]=l*(d*_-g*E)-u*(i*_-o*E)+m*(i*g-o*d),w[9]=-(P*(d*_-g*E)-u*(t*_-a*E)+m*(t*g-a*d)),w[10]=P*(i*_-o*E)-l*(t*_-a*E)+m*(t*o-a*i),w[11]=-(P*(i*g-o*d)-l*(t*g-a*d)+u*(t*o-a*i)),w[12]=-(l*(d*c-h*E)-u*(i*c-s*E)+m*(i*h-s*d)),w[13]=P*(d*c-h*E)-u*(t*c-r*E)+m*(t*h-r*d),w[14]=-(P*(i*c-s*E)-l*(t*c-r*E)+m*(t*s-r*i)),w[15]=P*(i*h-s*d)-l*(t*h-r*d)+u*(t*s-r*i),w}}}),xy=Ne({"node_modules/gl-mat4/determinant.js"(te,Z){Z.exports=v;function v(w){var C=w[0],P=w[1],t=w[2],r=w[3],a=w[4],l=w[5],i=w[6],s=w[7],o=w[8],u=w[9],d=w[10],h=w[11],g=w[12],m=w[13],E=w[14],c=w[15],_=C*l-P*a,T=C*i-t*a,M=C*s-r*a,k=P*i-t*l,b=P*s-r*l,A=t*s-r*i,y=o*m-u*g,f=o*E-d*g,p=o*c-h*g,x=u*E-d*m,N=u*c-h*m,D=d*c-h*E;return _*D-T*N+M*x+k*p-b*f+A*y}}}),YT=Ne({"node_modules/gl-mat4/multiply.js"(te,Z){Z.exports=v;function v(w,C,P){var t=C[0],r=C[1],a=C[2],l=C[3],i=C[4],s=C[5],o=C[6],u=C[7],d=C[8],h=C[9],g=C[10],m=C[11],E=C[12],c=C[13],_=C[14],T=C[15],M=P[0],k=P[1],b=P[2],A=P[3];return w[0]=M*t+k*i+b*d+A*E,w[1]=M*r+k*s+b*h+A*c,w[2]=M*a+k*o+b*g+A*_,w[3]=M*l+k*u+b*m+A*T,M=P[4],k=P[5],b=P[6],A=P[7],w[4]=M*t+k*i+b*d+A*E,w[5]=M*r+k*s+b*h+A*c,w[6]=M*a+k*o+b*g+A*_,w[7]=M*l+k*u+b*m+A*T,M=P[8],k=P[9],b=P[10],A=P[11],w[8]=M*t+k*i+b*d+A*E,w[9]=M*r+k*s+b*h+A*c,w[10]=M*a+k*o+b*g+A*_,w[11]=M*l+k*u+b*m+A*T,M=P[12],k=P[13],b=P[14],A=P[15],w[12]=M*t+k*i+b*d+A*E,w[13]=M*r+k*s+b*h+A*c,w[14]=M*a+k*o+b*g+A*_,w[15]=M*l+k*u+b*m+A*T,w}}}),Mw=Ne({"node_modules/gl-mat4/translate.js"(te,Z){Z.exports=v;function v(w,C,P){var t=P[0],r=P[1],a=P[2],l,i,s,o,u,d,h,g,m,E,c,_;return C===w?(w[12]=C[0]*t+C[4]*r+C[8]*a+C[12],w[13]=C[1]*t+C[5]*r+C[9]*a+C[13],w[14]=C[2]*t+C[6]*r+C[10]*a+C[14],w[15]=C[3]*t+C[7]*r+C[11]*a+C[15]):(l=C[0],i=C[1],s=C[2],o=C[3],u=C[4],d=C[5],h=C[6],g=C[7],m=C[8],E=C[9],c=C[10],_=C[11],w[0]=l,w[1]=i,w[2]=s,w[3]=o,w[4]=u,w[5]=d,w[6]=h,w[7]=g,w[8]=m,w[9]=E,w[10]=c,w[11]=_,w[12]=l*t+u*r+m*a+C[12],w[13]=i*t+d*r+E*a+C[13],w[14]=s*t+h*r+c*a+C[14],w[15]=o*t+g*r+_*a+C[15]),w}}}),D0=Ne({"node_modules/gl-mat4/scale.js"(te,Z){Z.exports=v;function v(w,C,P){var t=P[0],r=P[1],a=P[2];return w[0]=C[0]*t,w[1]=C[1]*t,w[2]=C[2]*t,w[3]=C[3]*t,w[4]=C[4]*r,w[5]=C[5]*r,w[6]=C[6]*r,w[7]=C[7]*r,w[8]=C[8]*a,w[9]=C[9]*a,w[10]=C[10]*a,w[11]=C[11]*a,w[12]=C[12],w[13]=C[13],w[14]=C[14],w[15]=C[15],w}}}),wd=Ne({"node_modules/gl-mat4/rotate.js"(te,Z){Z.exports=v;function v(w,C,P,t){var r=t[0],a=t[1],l=t[2],i=Math.sqrt(r*r+a*a+l*l),s,o,u,d,h,g,m,E,c,_,T,M,k,b,A,y,f,p,x,N,D,B,U,V;return Math.abs(i)<1e-6?null:(i=1/i,r*=i,a*=i,l*=i,s=Math.sin(P),o=Math.cos(P),u=1-o,d=C[0],h=C[1],g=C[2],m=C[3],E=C[4],c=C[5],_=C[6],T=C[7],M=C[8],k=C[9],b=C[10],A=C[11],y=r*r*u+o,f=a*r*u+l*s,p=l*r*u-a*s,x=r*a*u-l*s,N=a*a*u+o,D=l*a*u+r*s,B=r*l*u+a*s,U=a*l*u-r*s,V=l*l*u+o,w[0]=d*y+E*f+M*p,w[1]=h*y+c*f+k*p,w[2]=g*y+_*f+b*p,w[3]=m*y+T*f+A*p,w[4]=d*x+E*N+M*D,w[5]=h*x+c*N+k*D,w[6]=g*x+_*N+b*D,w[7]=m*x+T*N+A*D,w[8]=d*B+E*U+M*V,w[9]=h*B+c*U+k*V,w[10]=g*B+_*U+b*V,w[11]=m*B+T*U+A*V,C!==w&&(w[12]=C[12],w[13]=C[13],w[14]=C[14],w[15]=C[15]),w)}}}),Am=Ne({"node_modules/gl-mat4/rotateX.js"(te,Z){Z.exports=v;function v(w,C,P){var t=Math.sin(P),r=Math.cos(P),a=C[4],l=C[5],i=C[6],s=C[7],o=C[8],u=C[9],d=C[10],h=C[11];return C!==w&&(w[0]=C[0],w[1]=C[1],w[2]=C[2],w[3]=C[3],w[12]=C[12],w[13]=C[13],w[14]=C[14],w[15]=C[15]),w[4]=a*r+o*t,w[5]=l*r+u*t,w[6]=i*r+d*t,w[7]=s*r+h*t,w[8]=o*r-a*t,w[9]=u*r-l*t,w[10]=d*r-i*t,w[11]=h*r-s*t,w}}}),Td=Ne({"node_modules/gl-mat4/rotateY.js"(te,Z){Z.exports=v;function v(w,C,P){var t=Math.sin(P),r=Math.cos(P),a=C[0],l=C[1],i=C[2],s=C[3],o=C[8],u=C[9],d=C[10],h=C[11];return C!==w&&(w[4]=C[4],w[5]=C[5],w[6]=C[6],w[7]=C[7],w[12]=C[12],w[13]=C[13],w[14]=C[14],w[15]=C[15]),w[0]=a*r-o*t,w[1]=l*r-u*t,w[2]=i*r-d*t,w[3]=s*r-h*t,w[8]=a*t+o*r,w[9]=l*t+u*r,w[10]=i*t+d*r,w[11]=s*t+h*r,w}}}),ZT=Ne({"node_modules/gl-mat4/rotateZ.js"(te,Z){Z.exports=v;function v(w,C,P){var t=Math.sin(P),r=Math.cos(P),a=C[0],l=C[1],i=C[2],s=C[3],o=C[4],u=C[5],d=C[6],h=C[7];return C!==w&&(w[8]=C[8],w[9]=C[9],w[10]=C[10],w[11]=C[11],w[12]=C[12],w[13]=C[13],w[14]=C[14],w[15]=C[15]),w[0]=a*r+o*t,w[1]=l*r+u*t,w[2]=i*r+d*t,w[3]=s*r+h*t,w[4]=o*r-a*t,w[5]=u*r-l*t,w[6]=d*r-i*t,w[7]=h*r-s*t,w}}}),$T=Ne({"node_modules/gl-mat4/fromRotation.js"(te,Z){Z.exports=v;function v(w,C,P){var t,r,a,l=P[0],i=P[1],s=P[2],o=Math.sqrt(l*l+i*i+s*s);return Math.abs(o)<1e-6?null:(o=1/o,l*=o,i*=o,s*=o,t=Math.sin(C),r=Math.cos(C),a=1-r,w[0]=l*l*a+r,w[1]=i*l*a+s*t,w[2]=s*l*a-i*t,w[3]=0,w[4]=l*i*a-s*t,w[5]=i*i*a+r,w[6]=s*i*a+l*t,w[7]=0,w[8]=l*s*a+i*t,w[9]=i*s*a-l*t,w[10]=s*s*a+r,w[11]=0,w[12]=0,w[13]=0,w[14]=0,w[15]=1,w)}}}),Cw=Ne({"node_modules/gl-mat4/fromRotationTranslation.js"(te,Z){Z.exports=v;function v(w,C,P){var t=C[0],r=C[1],a=C[2],l=C[3],i=t+t,s=r+r,o=a+a,u=t*i,d=t*s,h=t*o,g=r*s,m=r*o,E=a*o,c=l*i,_=l*s,T=l*o;return w[0]=1-(g+E),w[1]=d+T,w[2]=h-_,w[3]=0,w[4]=d-T,w[5]=1-(u+E),w[6]=m+c,w[7]=0,w[8]=h+_,w[9]=m-c,w[10]=1-(u+g),w[11]=0,w[12]=P[0],w[13]=P[1],w[14]=P[2],w[15]=1,w}}}),by=Ne({"node_modules/gl-mat4/fromScaling.js"(te,Z){Z.exports=v;function v(w,C){return w[0]=C[0],w[1]=0,w[2]=0,w[3]=0,w[4]=0,w[5]=C[1],w[6]=0,w[7]=0,w[8]=0,w[9]=0,w[10]=C[2],w[11]=0,w[12]=0,w[13]=0,w[14]=0,w[15]=1,w}}}),R1=Ne({"node_modules/gl-mat4/fromTranslation.js"(te,Z){Z.exports=v;function v(w,C){return w[0]=1,w[1]=0,w[2]=0,w[3]=0,w[4]=0,w[5]=1,w[6]=0,w[7]=0,w[8]=0,w[9]=0,w[10]=1,w[11]=0,w[12]=C[0],w[13]=C[1],w[14]=C[2],w[15]=1,w}}}),yg=Ne({"node_modules/gl-mat4/fromXRotation.js"(te,Z){Z.exports=v;function v(w,C){var P=Math.sin(C),t=Math.cos(C);return w[0]=1,w[1]=0,w[2]=0,w[3]=0,w[4]=0,w[5]=t,w[6]=P,w[7]=0,w[8]=0,w[9]=-P,w[10]=t,w[11]=0,w[12]=0,w[13]=0,w[14]=0,w[15]=1,w}}}),Bv=Ne({"node_modules/gl-mat4/fromYRotation.js"(te,Z){Z.exports=v;function v(w,C){var P=Math.sin(C),t=Math.cos(C);return w[0]=t,w[1]=0,w[2]=-P,w[3]=0,w[4]=0,w[5]=1,w[6]=0,w[7]=0,w[8]=P,w[9]=0,w[10]=t,w[11]=0,w[12]=0,w[13]=0,w[14]=0,w[15]=1,w}}}),I1=Ne({"node_modules/gl-mat4/fromZRotation.js"(te,Z){Z.exports=v;function v(w,C){var P=Math.sin(C),t=Math.cos(C);return w[0]=t,w[1]=P,w[2]=0,w[3]=0,w[4]=-P,w[5]=t,w[6]=0,w[7]=0,w[8]=0,w[9]=0,w[10]=1,w[11]=0,w[12]=0,w[13]=0,w[14]=0,w[15]=1,w}}}),lu=Ne({"node_modules/gl-mat4/fromQuat.js"(te,Z){Z.exports=v;function v(w,C){var P=C[0],t=C[1],r=C[2],a=C[3],l=P+P,i=t+t,s=r+r,o=P*l,u=t*l,d=t*i,h=r*l,g=r*i,m=r*s,E=a*l,c=a*i,_=a*s;return w[0]=1-d-m,w[1]=u+_,w[2]=h-c,w[3]=0,w[4]=u-_,w[5]=1-o-m,w[6]=g+E,w[7]=0,w[8]=h+c,w[9]=g-E,w[10]=1-o-d,w[11]=0,w[12]=0,w[13]=0,w[14]=0,w[15]=1,w}}}),cf=Ne({"node_modules/gl-mat4/frustum.js"(te,Z){Z.exports=v;function v(w,C,P,t,r,a,l){var i=1/(P-C),s=1/(r-t),o=1/(a-l);return w[0]=a*2*i,w[1]=0,w[2]=0,w[3]=0,w[4]=0,w[5]=a*2*s,w[6]=0,w[7]=0,w[8]=(P+C)*i,w[9]=(r+t)*s,w[10]=(l+a)*o,w[11]=-1,w[12]=0,w[13]=0,w[14]=l*a*2*o,w[15]=0,w}}}),Xf=Ne({"node_modules/gl-mat4/perspective.js"(te,Z){Z.exports=v;function v(w,C,P,t,r){var a=1/Math.tan(C/2),l=1/(t-r);return w[0]=a/P,w[1]=0,w[2]=0,w[3]=0,w[4]=0,w[5]=a,w[6]=0,w[7]=0,w[8]=0,w[9]=0,w[10]=(r+t)*l,w[11]=-1,w[12]=0,w[13]=0,w[14]=2*r*t*l,w[15]=0,w}}}),rp=Ne({"node_modules/gl-mat4/perspectiveFromFieldOfView.js"(te,Z){Z.exports=v;function v(w,C,P,t){var r=Math.tan(C.upDegrees*Math.PI/180),a=Math.tan(C.downDegrees*Math.PI/180),l=Math.tan(C.leftDegrees*Math.PI/180),i=Math.tan(C.rightDegrees*Math.PI/180),s=2/(l+i),o=2/(r+a);return w[0]=s,w[1]=0,w[2]=0,w[3]=0,w[4]=0,w[5]=o,w[6]=0,w[7]=0,w[8]=-((l-i)*s*.5),w[9]=(r-a)*o*.5,w[10]=t/(P-t),w[11]=-1,w[12]=0,w[13]=0,w[14]=t*P/(P-t),w[15]=0,w}}}),xv=Ne({"node_modules/gl-mat4/ortho.js"(te,Z){Z.exports=v;function v(w,C,P,t,r,a,l){var i=1/(C-P),s=1/(t-r),o=1/(a-l);return w[0]=-2*i,w[1]=0,w[2]=0,w[3]=0,w[4]=0,w[5]=-2*s,w[6]=0,w[7]=0,w[8]=0,w[9]=0,w[10]=2*o,w[11]=0,w[12]=(C+P)*i,w[13]=(r+t)*s,w[14]=(l+a)*o,w[15]=1,w}}}),r0=Ne({"node_modules/gl-mat4/lookAt.js"(te,Z){var v=Fv();Z.exports=w;function w(C,P,t,r){var a,l,i,s,o,u,d,h,g,m,E=P[0],c=P[1],_=P[2],T=r[0],M=r[1],k=r[2],b=t[0],A=t[1],y=t[2];return Math.abs(E-b)<1e-6&&Math.abs(c-A)<1e-6&&Math.abs(_-y)<1e-6?v(C):(d=E-b,h=c-A,g=_-y,m=1/Math.sqrt(d*d+h*h+g*g),d*=m,h*=m,g*=m,a=M*g-k*h,l=k*d-T*g,i=T*h-M*d,m=Math.sqrt(a*a+l*l+i*i),m?(m=1/m,a*=m,l*=m,i*=m):(a=0,l=0,i=0),s=h*i-g*l,o=g*a-d*i,u=d*l-h*a,m=Math.sqrt(s*s+o*o+u*u),m?(m=1/m,s*=m,o*=m,u*=m):(s=0,o=0,u=0),C[0]=a,C[1]=s,C[2]=d,C[3]=0,C[4]=l,C[5]=o,C[6]=h,C[7]=0,C[8]=i,C[9]=u,C[10]=g,C[11]=0,C[12]=-(a*E+l*c+i*_),C[13]=-(s*E+o*c+u*_),C[14]=-(d*E+h*c+g*_),C[15]=1,C)}}}),n0=Ne({"node_modules/gl-mat4/str.js"(te,Z){Z.exports=v;function v(w){return"mat4("+w[0]+", "+w[1]+", "+w[2]+", "+w[3]+", "+w[4]+", "+w[5]+", "+w[6]+", "+w[7]+", "+w[8]+", "+w[9]+", "+w[10]+", "+w[11]+", "+w[12]+", "+w[13]+", "+w[14]+", "+w[15]+")"}}}),np=Ne({"node_modules/gl-mat4/index.js"(te,Z){Z.exports={create:Up(),clone:ov(),copy:P1(),identity:Fv(),transpose:I0(),invert:L1(),adjoint:WT(),determinant:xy(),multiply:YT(),translate:Mw(),scale:D0(),rotate:wd(),rotateX:Am(),rotateY:Td(),rotateZ:ZT(),fromRotation:$T(),fromRotationTranslation:Cw(),fromScaling:by(),fromTranslation:R1(),fromXRotation:yg(),fromYRotation:Bv(),fromZRotation:I1(),fromQuat:lu(),frustum:cf(),perspective:Xf(),perspectiveFromFieldOfView:rp(),ortho:xv(),lookAt:r0(),str:n0()}}}),qp=Ne({"src/lib/matrix.js"(te){var Z=np();te.init2dArray=function(v,w){for(var C=new Array(v),P=0;P<v;P++)C[P]=new Array(w);return C},te.transposeRagged=function(v){var w=0,C=v.length,P,t;for(P=0;P<C;P++)w=Math.max(w,v[P].length);var r=new Array(w);for(P=0;P<w;P++)for(r[P]=new Array(C),t=0;t<C;t++)r[P][t]=v[t][P];return r},te.dot=function(v,w){if(!(v.length&&w.length)||v.length!==w.length)return null;var C=v.length,P,t;if(v[0].length)for(P=new Array(C),t=0;t<C;t++)P[t]=te.dot(v[t],w);else if(w[0].length){var r=te.transposeRagged(w);for(P=new Array(r.length),t=0;t<r.length;t++)P[t]=te.dot(v,r[t])}else for(P=0,t=0;t<C;t++)P+=v[t]*w[t];return P},te.translationMatrix=function(v,w){return[[1,0,v],[0,1,w],[0,0,1]]},te.rotationMatrix=function(v){var w=v*Math.PI/180;return[[Math.cos(w),-Math.sin(w),0],[Math.sin(w),Math.cos(w),0],[0,0,1]]},te.rotationXYMatrix=function(v,w,C){return te.dot(te.dot(te.translationMatrix(w,C),te.rotationMatrix(v)),te.translationMatrix(-w,-C))},te.apply3DTransform=function(v){return function(){var w=arguments,C=arguments.length===1?w[0]:[w[0],w[1],w[2]||0];return te.dot(v,[C[0],C[1],C[2],1]).slice(0,3)}},te.apply2DTransform=function(v){return function(){var w=arguments;w.length===3&&(w=w[0]);var C=arguments.length===1?w[0]:[w[0],w[1]];return te.dot(v,[C[0],C[1],1]).slice(0,2)}},te.apply2DTransform2=function(v){var w=te.apply2DTransform(v);return function(C){return w(C.slice(0,2)).concat(w(C.slice(2,4)))}},te.convertCssMatrix=function(v){if(v){var w=v.length;if(w===16)return v;if(w===6)return[v[0],v[1],0,0,v[2],v[3],0,0,0,0,1,0,v[4],v[5],0,1]}return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]},te.inverseTransformMatrix=function(v){var w=[];return Z.invert(w,v),[[w[0],w[1],w[2],w[3]],[w[4],w[5],w[6],w[7]],[w[8],w[9],w[10],w[11]],[w[12],w[13],w[14],w[15]]]}}}),D1=Ne({"src/lib/dom.js"(te,Z){var v=xn(),w=Nd(),C=qp(),P=np();function t(E){var c;if(typeof E=="string"){if(c=document.getElementById(E),c===null)throw new Error("No DOM element with id '"+E+"' exists on the page.");return c}else if(E==null)throw new Error("DOM element provided is null or undefined");return E}function r(E){var c=v.select(E);return c.node()instanceof HTMLElement&&c.size()&&c.classed("js-plotly-plot")}function a(E){var c=E&&E.parentNode;c&&c.removeChild(E)}function l(E,c){i("global",E,c)}function i(E,c,_){var T="plotly.js-style-"+E,M=document.getElementById(T);if(!(M&&M.matches(".no-inline-styles"))){M||(M=document.createElement("style"),M.setAttribute("id",T),M.appendChild(document.createTextNode("")),document.head.appendChild(M));var k=M.sheet;k?k.insertRule?k.insertRule(c+"{"+_+"}",0):k.addRule?k.addRule(c,_,0):w.warn("addStyleRule failed"):w.warn("Cannot addRelatedStyleRule, probably due to strict CSP...")}}function s(E){var c="plotly.js-style-"+E,_=document.getElementById(c);_&&a(_)}function o(E,c,_,T,M,k){var b=T.split(":"),A=M.split(":"),y="data-btn-style-event-added";k||(k=document),k.querySelectorAll(E).forEach(function(f){f.getAttribute(y)||(f.addEventListener("mouseenter",function(){var p=this.querySelector(_);p&&(p.style[b[0]]=b[1])}),f.addEventListener("mouseleave",function(){var p=this.querySelector(_);p&&(c&&this.matches(c)?p.style[b[0]]=b[1]:p.style[A[0]]=A[1])}),f.setAttribute(y,!0))})}function u(E){var c=h(E),_=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return c.forEach(function(T){var M=d(T);if(M){var k=C.convertCssMatrix(M);_=P.multiply(_,_,k)}}),_}function d(E){var c=window.getComputedStyle(E,null),_=c.getPropertyValue("-webkit-transform")||c.getPropertyValue("-moz-transform")||c.getPropertyValue("-ms-transform")||c.getPropertyValue("-o-transform")||c.getPropertyValue("transform");return _==="none"?null:_.replace("matrix","").replace("3d","").slice(1,-1).split(",").map(function(T){return+T})}function h(E){for(var c=[];g(E);)c.push(E),E=E.parentNode,typeof ShadowRoot=="function"&&E instanceof ShadowRoot&&(E=E.host);return c}function g(E){return E&&(E instanceof Element||E instanceof HTMLElement)}function m(E,c){return E&&c&&E.top===c.top&&E.left===c.left&&E.right===c.right&&E.bottom===c.bottom}Z.exports={getGraphDiv:t,isPlotDiv:r,removeElement:a,addStyleRule:l,addRelatedStyleRule:i,deleteRelatedStyleRule:s,setStyleOnHover:o,getFullTransformMatrix:u,getElementTransformMatrix:d,getElementAndAncestors:h,equalDomRects:m}}}),O1=Ne({"src/plots/animation_attributes.js"(te,Z){Z.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"}}}}}),ef=Ne({"src/plot_api/edit_types.js"(te,Z){var v=fi().extendFlat,w=qa(),C={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"]},P={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"]},t=C.flags.slice().concat(["fullReplot"]),r=P.flags.slice().concat("layoutReplot");Z.exports={traces:C,layout:P,traceFlags:function(){return a(t)},layoutFlags:function(){return a(r)},update:function(s,o){var u=o.editType;if(u&&u!=="none")for(var d=u.split("+"),h=0;h<d.length;h++)s[d[h]]=!0},overrideAll:l};function a(s){for(var o={},u=0;u<s.length;u++)o[s[u]]=!1;return o}function l(s,o,u){var d=v({},s);for(var h in d){var g=d[h];w(g)&&(d[h]=i(g,o,u,h))}return u==="from-root"&&(d.editType=o),d}function i(s,o,u,d){if(s.valType){var h=v({},s);if(h.editType=o,Array.isArray(s.items)){h.items=new Array(s.items.length);for(var g=0;g<s.items.length;g++)h.items[g]=i(s.items[g],o)}return h}else return l(s,o,d.charAt(0)==="_"?"nested":"from-root")}}}),Fd=Ne({"src/components/drawing/attributes.js"(te){te.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"},te.pattern={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",arrayOk:!0,editType:"style"},path:{valType:"string",arrayOk:!0,editType:"style"},fillmode:{valType:"enumerated",values:["replace","overlay"],dflt:"replace",editType:"style"},bgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgopacity:{valType:"number",editType:"style",min:0,max:1},size:{valType:"number",min:0,dflt:8,arrayOk:!0,editType:"style"},solidity:{valType:"number",min:0,max:1,dflt:.3,arrayOk:!0,editType:"style"},editType:"style"}}}),O0=Ne({"src/constants/docs.js"(te,Z){Z.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"}}}),Fl=Ne({"src/plots/template_attributes.js"(te){var{DATE_FORMAT_LINK:Z,FORMAT_LINK:v}=O0(),w=["Variables that can't be found will be replaced with the specifier.",'For example, a template of "data: %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 and y is missing.',"Variables with an undefined value will be replaced with the fallback value."].join(" ");function C({supportOther:P}={}){return["Variables are inserted using %{variable},",'for example "y: %{y}"'+(P?" as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, *xother* will be added to those with different x positions from the first point. An underscore before or after *(x|y)other* will add a space on that side, only when this field is shown.":"."),`Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}".`,v,"for details on the formatting syntax.",`Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example "Day: %{2019-01-01|%A}".`,Z,"for details on the date formatting syntax.",w].join(" ")}te.templateFormatStringDescription=C,te.hovertemplateAttrs=({editType:P="none",arrayOk:t}={},r={})=>cr({valType:"string",dflt:"",editType:P},t!==!1?{arrayOk:!0}:{}),te.texttemplateAttrs=({editType:P="calc",arrayOk:t}={},r={})=>cr({valType:"string",dflt:"",editType:P},t!==!1?{arrayOk:!0}:{}),te.shapeTexttemplateAttrs=({editType:P="arraydraw",newshape:t}={},r={})=>({valType:"string",dflt:"",editType:P}),te.templatefallbackAttrs=({editType:P="none"}={})=>({valType:"any",dflt:"-",editType:P})}}),jv=Ne({"src/components/shapes/label_texttemplate.js"(te,Z){function v(_,T){return T?T.d2l(_):_}function w(_,T){return T?T.l2d(_):_}function C(_){return _.x0}function P(_){return _.x1}function t(_){return _.y0}function r(_){return _.y1}function a(_){return _.x0shift||0}function l(_){return _.x1shift||0}function i(_){return _.y0shift||0}function s(_){return _.y1shift||0}function o(_,T){return v(_.x1,T)+l(_)-v(_.x0,T)-a(_)}function u(_,T,M){return v(_.y1,M)+s(_)-v(_.y0,M)-i(_)}function d(_,T){return Math.abs(o(_,T))}function h(_,T,M){return Math.abs(u(_,T,M))}function g(_,T,M){return _.type!=="line"?void 0:Math.sqrt(Math.pow(o(_,T),2)+Math.pow(u(_,T,M),2))}function m(_,T){return w((v(_.x1,T)+l(_)+v(_.x0,T)+a(_))/2,T)}function E(_,T,M){return w((v(_.y1,M)+s(_)+v(_.y0,M)+i(_))/2,M)}function c(_,T,M){return _.type!=="line"?void 0:u(_,T,M)/o(_,T)}Z.exports={x0:C,x1:P,y0:t,y1:r,slope:c,dx:o,dy:u,width:d,height:h,length:g,xcenter:m,ycenter:E}}}),z1=Ne({"src/components/shapes/draw_newshape/attributes.js"(te,Z){var v=ef().overrideAll,w=qo(),C=bo(),P=Fd().dash,t=fi().extendFlat,{shapeTexttemplateAttrs:r,templatefallbackAttrs:a}=Fl(),l=jv();Z.exports=v({newshape:{visible:t({},w.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:t({},w.legend,{}),legendgroup:t({},w.legendgroup,{}),legendgrouptitle:{text:t({},w.legendgrouptitle.text,{}),font:C({})},legendrank:t({},w.legendrank,{}),legendwidth:t({},w.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:t({},P,{dflt:"solid"})},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd"},opacity:{valType:"number",min:0,max:1,dflt:1},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above"},drawdirection:{valType:"enumerated",values:["ortho","horizontal","vertical","diagonal"],dflt:"diagonal"},name:t({},w.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:r({newshape:!0},{keys:Object.keys(l)}),texttemplatefallback:a({editType:"arraydraw"}),font:C({}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)",description:"Sets the color filling the active shape' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")}}),KT=Ne({"src/components/selections/draw_newselection/attributes.js"(te,Z){var v=Fd().dash,w=fi().extendFlat;Z.exports={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none"},line:{color:{valType:"color",editType:"none"},width:{valType:"number",min:1,dflt:1,editType:"none"},dash:w({},v,{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"}}}}),JT=Ne({"src/plots/pad_attributes.js"(te,Z){Z.exports=function(v){var w=v.editType;return{t:{valType:"number",dflt:0,editType:w},r:{valType:"number",dflt:0,editType:w},b:{valType:"number",dflt:0,editType:w},l:{valType:"number",dflt:0,editType:w},editType:w}}}}),xx=Ne({"src/plots/layout_attributes.js"(te,Z){var v=bo(),w=O1(),C=js(),P=z1(),t=KT(),r=JT(),a=fi().extendFlat,l=v({editType:"calc"});l.family.dflt='"Open Sans", verdana, arial, sans-serif',l.size.dflt=12,l.color.dflt=C.defaultLine,Z.exports={font:l,title:{text:{valType:"string",editType:"layoutstyle"},font:v({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:v({editType:"layoutstyle"}),editType:"layoutstyle"},xref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},yref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},x:{valType:"number",min:0,max:1,dflt:.5,editType:"layoutstyle"},y:{valType:"number",min:0,max:1,dflt:"auto",editType:"layoutstyle"},xanchor:{valType:"enumerated",dflt:"auto",values:["auto","left","center","right"],editType:"layoutstyle"},yanchor:{valType:"enumerated",dflt:"auto",values:["auto","top","middle","bottom"],editType:"layoutstyle"},pad:a(r({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:C.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:C.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:C.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:P.newshape,activeshape:P.activeshape,newselection:t.newselection,activeselection:t.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:a({},w.transition,{editType:"none"})}}}),KE=Ne({"node_modules/maplibre-gl/dist/maplibre-gl.css"(){(function(){if(!document.getElementById("ce8d464691048653ffe3a57c6c18ab566e8366f186677868cf724621a857b4fe")){var te=document.createElement("style");te.id="ce8d464691048653ffe3a57c6c18ab566e8366f186677868cf724621a857b4fe",te.textContent=`.maplibregl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgb(0 0 0/0)}.maplibregl-canvas{left:0;position:absolute;top:0}.maplibregl-map:fullscreen{height:100%;width:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.maplibregl-ctrl-top-left{left:0;top:0}.maplibregl-ctrl-top-right{right:0;top:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{bottom:0;right:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{float:left;margin:10px 0 0 10px}.maplibregl-ctrl-top-right .maplibregl-ctrl{float:right;margin:10px 10px 0 0}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{float:left;margin:0 0 10px 10px}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{float:right;margin:0 10px 10px 0}.maplibregl-ctrl-group{background:#fff;border-radius:4px}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (forced-colors:active){.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.maplibregl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;padding:0;width:29px}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media (forced-colors:active){.maplibregl-ctrl-icon{background-color:transparent}.maplibregl-ctrl-group button+button{border-top:1px solid ButtonText}}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}.maplibregl-ctrl button:not(:disabled):hover{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.maplibregl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.maplibregl-ctrl-group button:focus:only-child{border-radius:inherit}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%23333' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%2333b5e5' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23aaa' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:maplibregl-spin 2s linear infinite}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23999' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23666' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}}@keyframes maplibregl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E");background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.maplibregl-ctrl-logo.maplibregl-compact{width:14px}@media (forced-colors:active){a.maplibregl-ctrl-logo{background-color:transparent;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}.maplibregl-ctrl.maplibregl-ctrl-attrib{background-color:hsla(0,0%,100%,.5);margin:0;padding:0 5px}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{background-color:#fff;border-radius:12px;box-sizing:content-box;color:#000;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact-show,.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{background-color:hsla(0,0%,100%,.5);background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E");border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{right:0;top:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{left:0;top:0}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;left:0}}@media screen and (forced-colors:active){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23fff' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}@media screen and (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}.maplibregl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:hsla(0,0%,100%,.75);border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px}.maplibregl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}.maplibregl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.maplibregl-popup-close-button:hover{background-color:rgb(0 0 0/5%)}.maplibregl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:15px 10px;pointer-events:auto;position:relative}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{left:0;position:absolute;top:0;transition:opacity .2s;will-change:transform}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.maplibregl-user-location-dot:before{animation:maplibregl-user-location-dot-pulse 2s infinite;content:"";position:absolute}.maplibregl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px rgba(0,0,0,.35);box-sizing:border-box;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px}@keyframes maplibregl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}.maplibregl-cooperative-gesture-screen{align-items:center;background:rgba(0,0,0,.4);color:#fff;display:flex;font-size:1.4em;inset:0;justify-content:center;line-height:1.2;opacity:0;padding:1rem;pointer-events:none;position:absolute;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(width <= 480px){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{height:100%!important;left:0!important;position:fixed!important;top:0!important;width:100%!important;z-index:99999}`,document.head.appendChild(te)}})()}}),Yo=Ne({"src/registry.js"(te){var Z=Nd(),v=ad(),w=jp(),C=qa(),P=D1().addStyleRule,t=fi(),r=qo(),a=xx(),l=t.extendFlat,i=t.extendDeepAll;te.modules={},te.allCategories={},te.allTypes=[],te.subplotsRegistry={},te.componentsRegistry={},te.layoutArrayContainers=[],te.layoutArrayRegexes=[],te.traceLayoutAttributes={},te.localeRegistry={},te.apiMethodRegistry={},te.collectableSubplotTypes=null,te.register=function(T){if(te.collectableSubplotTypes=null,T)T&&!Array.isArray(T)&&(T=[T]);else throw new Error("No argument passed to Plotly.register.");for(var M=0;M<T.length;M++){var k=T[M];if(!k)throw new Error("Invalid module was attempted to be registered!");switch(k.moduleType){case"trace":s(k);break;case"transform":d(k);break;case"component":u(k);break;case"locale":h(k);break;case"apiMethod":var b=k.name;te.apiMethodRegistry[b]=k.fn;break;default:throw new Error("Invalid module was attempted to be registered!")}}},te.getModule=function(_){var T=te.modules[c(_)];return T?T._module:!1},te.traceIs=function(_,T){if(_=c(_),_==="various")return!1;var M=te.modules[_];return M||(_&&Z.log("Unrecognized trace type "+_+"."),M=te.modules[r.type.dflt]),!!M.categories[T]},te.getComponentMethod=function(_,T){var M=te.componentsRegistry[_];return M&&M[T]||v},te.call=function(){var _=arguments[0],T=[].slice.call(arguments,1);return te.apiMethodRegistry[_].apply(null,T)};function s(_){var T=_.name,M=_.categories,k=_.meta;if(te.modules[T]){Z.log("Type "+T+" already registered");return}te.subplotsRegistry[_.basePlotModule.name]||o(_.basePlotModule);for(var b={},A=0;A<M.length;A++)b[M[A]]=!0,te.allCategories[M[A]]=!0;te.modules[T]={_module:_,categories:b},k&&Object.keys(k).length&&(te.modules[T].meta=k),te.allTypes.push(T);for(var y in te.componentsRegistry)m(y,T);_.layoutAttributes&&l(te.traceLayoutAttributes,_.layoutAttributes);var f=_.basePlotModule,p=f.name;if(p==="mapbox"){var x=f.constants.styleRules;for(var N in x)P(".js-plotly-plot .plotly .mapboxgl-"+N,x[N])}p==="map"&&KE(),(p==="geo"||p==="mapbox"||p==="map")&&window.PlotlyGeoAssets===void 0&&(window.PlotlyGeoAssets={topojson:{}})}function o(_){var T=_.name;if(te.subplotsRegistry[T]){Z.log("Plot type "+T+" already registered.");return}g(_),te.subplotsRegistry[T]=_;for(var M in te.componentsRegistry)E(M,_.name)}function u(_){if(typeof _.name!="string")throw new Error("Component module *name* must be a string.");var T=_.name;te.componentsRegistry[T]=_,_.layoutAttributes&&(_.layoutAttributes._isLinkedToArray&&w(te.layoutArrayContainers,T),g(_));for(var M in te.modules)m(T,M);for(var k in te.subplotsRegistry)E(T,k);_.schema&&_.schema.layout&&i(a,_.schema.layout)}function d(_){if(typeof _.name!="string")throw new Error("Transform module *name* must be a string.");var T="Transform module "+_.name,M=typeof _.transform=="function",k=typeof _.calcTransform=="function";if(!M&&!k)throw new Error(T+" is missing a *transform* or *calcTransform* method.");M&&k&&Z.log([T+" has both a *transform* and *calcTransform* methods.","Please note that all *transform* methods are executed","before all *calcTransform* methods."].join(" ")),C(_.attributes)||Z.log(T+" registered without an *attributes* object."),typeof _.supplyDefaults!="function"&&Z.log(T+" registered without a *supplyDefaults* method.")}function h(_){var T=_.name,M=T.split("-")[0],k=_.dictionary,b=_.format,A=k&&Object.keys(k).length,y=b&&Object.keys(b).length,f=te.localeRegistry,p=f[T];if(p||(f[T]=p={}),M!==T){var x=f[M];x||(f[M]=x={}),A&&x.dictionary===p.dictionary&&(x.dictionary=k),y&&x.format===p.format&&(x.format=b)}A&&(p.dictionary=k),y&&(p.format=b)}function g(_){if(_.layoutAttributes){var T=_.layoutAttributes._arrayAttrRegexps;if(T)for(var M=0;M<T.length;M++)w(te.layoutArrayRegexes,T[M])}}function m(_,T){var M=te.componentsRegistry[_].schema;if(!(!M||!M.traces)){var k=M.traces[T];k&&i(te.modules[T]._module.attributes,k)}}function E(_,T){var M=te.componentsRegistry[_].schema;if(!(!M||!M.subplots)){var k=te.subplotsRegistry[T],b=k.layoutAttributes,A=k.attr==="subplot"?k.name:k.attr;Array.isArray(A)&&(A=A[0]);var y=M.subplots[A];b&&y&&i(b,y)}}function c(_){return typeof _=="object"&&(_=_.type),_}}}),QT=Ne({"src/lib/dates.js"(te){var Z=On().timeFormat,v=Fn(),w=Nd(),C=$i().mod,P=da(),t=P.BADNUM,r=P.ONEDAY,a=P.ONEHOUR,l=P.ONEMIN,i=P.ONESEC,s=P.EPOCHJD,o=Yo(),u=On().utcFormat,d=/^\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,h=/^\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,g=new Date().getFullYear()-70;function m(U){return U&&o.componentsRegistry.calendars&&typeof U=="string"&&U!=="gregorian"}te.dateTick0=function(U,V){var q=E(U,!!V);if(V<2)return q;var z=te.dateTime2ms(q,U);return z+=r*(V-1),te.ms2DateTime(z,0,U)};function E(U,V){return m(U)?V?o.getComponentMethod("calendars","CANONICAL_SUNDAY")[U]:o.getComponentMethod("calendars","CANONICAL_TICK")[U]:V?"2000-01-02":"2000-01-01"}te.dfltRange=function(U){return m(U)?o.getComponentMethod("calendars","DFLTRANGE")[U]:["2000-01-01","2001-01-01"]},te.isJSDate=function(U){return typeof U=="object"&&U!==null&&typeof U.getTime=="function"};var c,_;te.dateTime2ms=function(U,V){if(te.isJSDate(U)){var q=U.getTimezoneOffset()*l,z=(U.getUTCMinutes()-U.getMinutes())*l+(U.getUTCSeconds()-U.getSeconds())*i+(U.getUTCMilliseconds()-U.getMilliseconds());if(z){var H=3*l;q=q-H/2+C(z-q+H/2,H)}return U=Number(U)-q,U>=c&&U<=_?U:t}if(typeof U!="string"&&typeof U!="number")return t;U=String(U);var G=m(V),J=U.charAt(0);G&&(J==="G"||J==="g")&&(U=U.substr(1),V="");var le=G&&V.substr(0,7)==="chinese",ge=U.match(le?h:d);if(!ge)return t;var de=ge[1],me=ge[3]||"1",W=Number(ge[5]||1),ie=Number(ge[7]||0),se=Number(ge[9]||0),ee=Number(ge[11]||0);if(G){if(de.length===2)return t;de=Number(de);var pe;try{var oe=o.getComponentMethod("calendars","getCal")(V);if(le){var Y=me.charAt(me.length-1)==="i";me=parseInt(me,10),pe=oe.newDate(de,oe.toMonthIndex(de,me,Y),W)}else pe=oe.newDate(de,Number(me),W)}catch{return t}return pe?(pe.toJD()-s)*r+ie*a+se*l+ee*i:t}de.length===2?de=(Number(de)+2e3-g)%100+g:de=Number(de),me-=1;var ce=new Date(Date.UTC(2e3,me,W,ie,se));return ce.setUTCFullYear(de),ce.getUTCMonth()!==me||ce.getUTCDate()!==W?t:ce.getTime()+ee*i},c=te.MIN_MS=te.dateTime2ms("-9999"),_=te.MAX_MS=te.dateTime2ms("9999-12-31 23:59:59.9999"),te.isDateTime=function(U,V){return te.dateTime2ms(U,V)!==t};function T(U,V){return String(U+Math.pow(10,V)).substr(1)}var M=90*r,k=3*a,b=5*l;te.ms2DateTime=function(U,V,q){if(typeof U!="number"||!(U>=c&&U<=_))return t;V||(V=0);var z=Math.floor(C(U+.05,1)*10),H=Math.round(U-z/10),G,J,le,ge,de,me;if(m(q)){var W=Math.floor(H/r)+s,ie=Math.floor(C(U,r));try{G=o.getComponentMethod("calendars","getCal")(q).fromJD(W).formatDate("yyyy-mm-dd")}catch{G=u("G%Y-%m-%d")(new Date(H))}if(G.charAt(0)==="-")for(;G.length<11;)G="-0"+G.substr(1);else for(;G.length<10;)G="0"+G;J=V<M?Math.floor(ie/a):0,le=V<M?Math.floor(ie%a/l):0,ge=V<k?Math.floor(ie%l/i):0,de=V<b?ie%i*10+z:0}else me=new Date(H),G=u("%Y-%m-%d")(me),J=V<M?me.getUTCHours():0,le=V<M?me.getUTCMinutes():0,ge=V<k?me.getUTCSeconds():0,de=V<b?me.getUTCMilliseconds()*10+z:0;return A(G,J,le,ge,de)},te.ms2DateTimeLocal=function(U){if(!(U>=c+r&&U<=_-r))return t;var V=Math.floor(C(U+.05,1)*10),q=new Date(Math.round(U-V/10)),z=Z("%Y-%m-%d")(q),H=q.getHours(),G=q.getMinutes(),J=q.getSeconds(),le=q.getUTCMilliseconds()*10+V;return A(z,H,G,J,le)};function A(U,V,q,z,H){if((V||q||z||H)&&(U+=" "+T(V,2)+":"+T(q,2),(z||H)&&(U+=":"+T(z,2),H))){for(var G=4;H%10===0;)G-=1,H/=10;U+="."+T(H,G)}return U}te.cleanDate=function(U,V,q){if(U===t)return V;if(te.isJSDate(U)||typeof U=="number"&&isFinite(U)){if(m(q))return w.error("JS Dates and milliseconds are incompatible with world calendars",U),V;if(U=te.ms2DateTimeLocal(+U),!U&&V!==void 0)return V}else if(!te.isDateTime(U,q))return w.error("unrecognized date",U),V;return U};var y=/%\d?f/g,f=/%h/g,p={1:"1",2:"1",3:"2",4:"2"};function x(U,V,q,z){U=U.replace(y,function(G){var J=Math.min(+G.charAt(1)||6,6),le=(V/1e3%1+2).toFixed(J).substr(2).replace(/0+$/,"")||"0";return le});var H=new Date(Math.floor(V+.05));if(U=U.replace(f,function(){return p[q("%q")(H)]}),m(z))try{U=o.getComponentMethod("calendars","worldCalFmt")(U,V,z)}catch{return"Invalid"}return q(U)(H)}var N=[59,59.9,59.99,59.999,59.9999];function D(U,V){var q=C(U+.05,r),z=T(Math.floor(q/a),2)+":"+T(C(Math.floor(q/l),60),2);if(V!=="M"){v(V)||(V=0);var H=Math.min(C(U/i,60),N[V]),G=(100+H).toFixed(V).substr(1);V>0&&(G=G.replace(/0+$/,"").replace(/[\.]$/,"")),z+=":"+G}return z}te.formatDate=function(U,V,q,z,H,G){if(H=m(H)&&H,!V)if(q==="y")V=G.year;else if(q==="m")V=G.month;else if(q==="d")V=G.dayMonth+`
`+G.year;else return D(U,q)+`
`+x(G.dayMonthYear,U,z,H);return x(V,U,z,H)};var B=3*r;te.incrementMonth=function(U,V,q){q=m(q)&&q;var z=C(U,r);if(U=Math.round(U-z),q)try{var H=Math.round(U/r)+s,G=o.getComponentMethod("calendars","getCal")(q),J=G.fromJD(H);return V%12?G.add(J,V,"m"):G.add(J,V/12,"y"),(J.toJD()-s)*r+z}catch{w.error("invalid ms "+U+" in calendar "+q)}var le=new Date(U+B);return le.setUTCMonth(le.getUTCMonth()+V)+z-B},te.findExactDates=function(U,V){for(var q=0,z=0,H=0,G=0,J,le,ge=m(V)&&o.getComponentMethod("calendars","getCal")(V),de=0;de<U.length;de++){if(le=U[de],!v(le)){G++;continue}if(!(le%r))if(ge)try{J=ge.fromJD(le/r+s),J.day()===1?J.month()===1?q++:z++:H++}catch{}else J=new Date(le),J.getUTCDate()===1?J.getUTCMonth()===0?q++:z++:H++}z+=q,H+=z;var me=U.length-G;return{exactYears:q/me,exactMonths:z/me,exactDays:H/me}}}}),z0=Ne({"src/lib/identity.js"(te,Z){Z.exports=function(w){return w}}}),_g=Ne({"src/lib/search.js"(te){var Z=Fn(),v=Nd(),w=z0(),C=da().BADNUM,P=1e-9;te.findBin=function(i,s,o){if(Z(s.start))return o?Math.ceil((i-s.start)/s.size-P)-1:Math.floor((i-s.start)/s.size+P);var u=0,d=s.length,h=0,g=d>1?(s[d-1]-s[0])/(d-1):1,m,E;for(g>=0?E=o?t:r:E=o?l:a,i+=g*P*(o?-1:1)*(g>=0?1:-1);u<d&&h++<100;)m=Math.floor((u+d)/2),E(s[m],i)?u=m+1:d=m;return h>90&&v.log("Long binary search..."),u-1};function t(i,s){return i<s}function r(i,s){return i<=s}function a(i,s){return i>s}function l(i,s){return i>=s}te.sorterAsc=function(i,s){return i-s},te.sorterDes=function(i,s){return s-i},te.distinctVals=function(i){var s=i.slice();s.sort(te.sorterAsc);var o;for(o=s.length-1;o>-1&&s[o]===C;o--);for(var u=s[o]-s[0]||1,d=u/(o||1)/1e4,h=[],g,m=0;m<=o;m++){var E=s[m],c=E-g;g===void 0?(h.push(E),g=E):c>d&&(u=Math.min(u,c),h.push(E),g=E)}return{vals:h,minDiff:u}},te.roundUp=function(i,s,o){for(var u=0,d=s.length-1,h,g=0,m=o?0:1,E=o?1:0,c=o?Math.ceil:Math.floor;u<d&&g++<100;)h=c((u+d)/2),s[h]<=i?u=h+m:d=h-E;return s[u]},te.sort=function(i,s){for(var o=0,u=0,d=1;d<i.length;d++){var h=s(i[d],i[d-1]);if(h<0?o=1:h>0&&(u=1),o&&u)return i.sort(s)}return u?i:i.reverse()},te.findIndexOfMin=function(i,s){s=s||w;for(var o=1/0,u,d=0;d<i.length;d++){var h=s(i[d]);h<o&&(o=h,u=d)}return u}}}),Sm=Ne({"src/lib/sort_object_keys.js"(te,Z){Z.exports=function(w){return Object.keys(w).sort()}}}),N1=Ne({"src/lib/stats.js"(te){var Z=Fn(),v=Ri().isArrayOrTypedArray;te.aggNums=function(w,C,P,t){var r,a;if((!t||t>P.length)&&(t=P.length),Z(C)||(C=!1),v(P[0])){for(a=new Array(t),r=0;r<t;r++)a[r]=te.aggNums(w,C,P[r]);P=a}for(r=0;r<t;r++)Z(C)?Z(P[r])&&(C=w(+C,+P[r])):C=P[r];return C},te.len=function(w){return te.aggNums(function(C){return C+1},0,w)},te.mean=function(w,C){return C||(C=te.len(w)),te.aggNums(function(P,t){return P+t},0,w)/C},te.geometricMean=function(w,C){return C||(C=te.len(w)),Math.pow(te.aggNums(function(P,t){return P*t},1,w),1/C)},te.midRange=function(w){if(!(w===void 0||w.length===0))return(te.aggNums(Math.max,null,w)+te.aggNums(Math.min,null,w))/2},te.variance=function(w,C,P){return C||(C=te.len(w)),Z(P)||(P=te.mean(w,C)),te.aggNums(function(t,r){return t+Math.pow(r-P,2)},0,w)/C},te.stdev=function(w,C,P){return Math.sqrt(te.variance(w,C,P))},te.median=function(w){var C=w.slice().sort();return te.interp(C,.5)},te.interp=function(w,C){if(!Z(C))throw"n should be a finite number";if(C=C*w.length-.5,C<0)return w[0];if(C>w.length-1)return w[w.length-1];var P=C%1;return P*w[Math.ceil(C)]+(1-P)*w[Math.floor(C)]}}}),sv=Ne({"src/lib/angles.js"(te,Z){var v=$i(),w=v.mod,C=v.modHalf,P=Math.PI,t=2*P;function r(E){return E/180*P}function a(E){return E/P*180}function l(E){return Math.abs(E[1]-E[0])>t-1e-14}function i(E,c){return C(c-E,t)}function s(E,c){return Math.abs(i(E,c))}function o(E,c){if(l(c))return!0;var _,T;c[0]<c[1]?(_=c[0],T=c[1]):(_=c[1],T=c[0]),_=w(_,t),T=w(T,t),_>T&&(T+=t);var M=w(E,t),k=M+t;return M>=_&&M<=T||k>=_&&k<=T}function u(E,c,_,T){if(!o(c,T))return!1;var M,k;return _[0]<_[1]?(M=_[0],k=_[1]):(M=_[1],k=_[0]),E>=M&&E<=k}function d(E,c,_,T,M,k,b){M=M||0,k=k||0;var A=l([_,T]),y,f,p,x,N;A?(y=0,f=P,p=t):_<T?(y=_,p=T):(y=T,p=_),E<c?(x=E,N=c):(x=c,N=E);function D(q,z){return[q*Math.cos(z)+M,k-q*Math.sin(z)]}var B=Math.abs(p-y)<=P?0:1;function U(q,z,H){return"A"+[q,q]+" "+[0,B,H]+" "+D(q,z)}var V;return A?x===null?V="M"+D(N,y)+U(N,f,0)+U(N,p,0)+"Z":V="M"+D(x,y)+U(x,f,0)+U(x,p,0)+"ZM"+D(N,y)+U(N,f,1)+U(N,p,1)+"Z":x===null?(V="M"+D(N,y)+U(N,p,0),b&&(V+="L0,0Z")):V="M"+D(x,y)+"L"+D(N,y)+U(N,p,0)+"L"+D(x,p)+U(x,y,1)+"Z",V}function h(E,c,_,T,M){return d(null,E,c,_,T,M,0)}function g(E,c,_,T,M){return d(null,E,c,_,T,M,1)}function m(E,c,_,T,M,k){return d(E,c,_,T,M,k,1)}Z.exports={deg2rad:r,rad2deg:a,angleDelta:i,angleDist:s,isFullCircle:l,isAngleInsideSector:o,isPtInsideSector:u,pathArc:h,pathSector:g,pathAnnulus:m}}}),JE=Ne({"src/lib/anchor_utils.js"(te){te.isLeftAnchor=function(v){return v.xanchor==="left"||v.xanchor==="auto"&&v.x<=1/3},te.isCenterAnchor=function(v){return v.xanchor==="center"||v.xanchor==="auto"&&v.x>1/3&&v.x<2/3},te.isRightAnchor=function(v){return v.xanchor==="right"||v.xanchor==="auto"&&v.x>=2/3},te.isTopAnchor=function(v){return v.yanchor==="top"||v.yanchor==="auto"&&v.y>=2/3},te.isMiddleAnchor=function(v){return v.yanchor==="middle"||v.yanchor==="auto"&&v.y>1/3&&v.y<2/3},te.isBottomAnchor=function(v){return v.yanchor==="bottom"||v.yanchor==="auto"&&v.y<=1/3}}}),QE=Ne({"src/lib/geometry2d.js"(te){var Z=$i().mod;te.segmentsIntersect=v;function v(r,a,l,i,s,o,u,d){var h=l-r,g=s-r,m=u-s,E=i-a,c=o-a,_=d-o,T=h*_-m*E;if(T===0)return null;var M=(g*_-m*c)/T,k=(g*E-h*c)/T;return k<0||k>1||M<0||M>1?null:{x:r+h*M,y:a+E*M}}te.segmentDistance=function(a,l,i,s,o,u,d,h){if(v(a,l,i,s,o,u,d,h))return 0;var g=i-a,m=s-l,E=d-o,c=h-u,_=g*g+m*m,T=E*E+c*c,M=Math.min(w(g,m,_,o-a,u-l),w(g,m,_,d-a,h-l),w(E,c,T,a-o,l-u),w(E,c,T,i-o,s-u));return Math.sqrt(M)};function w(r,a,l,i,s){var o=i*r+s*a;if(o<0)return i*i+s*s;if(o>l){var u=i-r,d=s-a;return u*u+d*d}else{var h=i*a-s*r;return h*h/l}}var C,P,t;te.getTextLocation=function(a,l,i,s){if((a!==P||s!==t)&&(C={},P=a,t=s),C[i])return C[i];var o=a.getPointAtLength(Z(i-s/2,l)),u=a.getPointAtLength(Z(i+s/2,l)),d=Math.atan((u.y-o.y)/(u.x-o.x)),h=a.getPointAtLength(Z(i,l)),g=(h.x*4+o.x+u.x)/6,m=(h.y*4+o.y+u.y)/6,E={x:g,y:m,theta:d};return C[i]=E,E},te.clearLocationCache=function(){P=null},te.getVisibleSegment=function(a,l,i){var s=l.left,o=l.right,u=l.top,d=l.bottom,h=0,g=a.getTotalLength(),m=g,E,c;function _(M){var k=a.getPointAtLength(M);M===0?E=k:M===g&&(c=k);var b=k.x<s?s-k.x:k.x>o?k.x-o:0,A=k.y<u?u-k.y:k.y>d?k.y-d:0;return Math.sqrt(b*b+A*A)}for(var T=_(h);T;){if(h+=T+i,h>m)return;T=_(h)}for(T=_(m);T;){if(m-=T+i,h>m)return;T=_(m)}return{min:h,max:m,len:m-h,total:g,isClosed:h===0&&m===g&&Math.abs(E.x-c.x)<.1&&Math.abs(E.y-c.y)<.1}},te.findPointOnPath=function(a,l,i,s){s=s||{};for(var o=s.pathLength||a.getTotalLength(),u=s.tolerance||.001,d=s.iterationLimit||30,h=a.getPointAtLength(0)[i]>a.getPointAtLength(o)[i]?-1:1,g=0,m=0,E=o,c,_,T;g<d;){if(c=(m+E)/2,_=a.getPointAtLength(c),T=_[i]-l,Math.abs(T)<u)return _;h*T>0?E=c:m=c,g++}return _}}}),N0=Ne({"src/lib/throttle.js"(te){var Z={};te.throttle=function(C,P,t){var r=Z[C],a=Date.now();if(!r){for(var l in Z)Z[l].ts<a-6e4&&delete Z[l];r=Z[C]={ts:0,timer:null}}v(r);function i(){t(),r.ts=Date.now(),r.onDone&&(r.onDone(),r.onDone=null)}if(a>r.ts+P){i();return}r.timer=setTimeout(function(){i(),r.timer=null},P)},te.done=function(w){var C=Z[w];return!C||!C.timer?Promise.resolve():new Promise(function(P){var t=C.onDone;C.onDone=function(){t&&t(),P(),C.onDone=null}})},te.clear=function(w){if(w)v(Z[w]),delete Z[w];else for(var C in Z)te.clear(C)};function v(w){w&&w.timer!==null&&(clearTimeout(w.timer),w.timer=null)}}}),F1=Ne({"src/lib/clear_responsive.js"(te,Z){Z.exports=function(w){w._responsiveChartHandler&&(window.removeEventListener("resize",w._responsiveChartHandler),delete w._responsiveChartHandler)}}}),wL=Ne({"node_modules/is-mobile/index.js"(te,Z){Z.exports=P,Z.exports.isMobile=P,Z.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,w=/CrOS/,C=/android|ipad|playbook|silk/i;function P(t){t||(t={});let r=t.ua;if(!r&&typeof navigator<"u"&&(r=navigator.userAgent),r&&r.headers&&typeof r.headers["user-agent"]=="string"&&(r=r.headers["user-agent"]),typeof r!="string")return!1;let a=v.test(r)&&!w.test(r)||!!t.tablet&&C.test(r);return!a&&t.tablet&&t.featureDetect&&navigator&&navigator.maxTouchPoints>1&&r.indexOf("Macintosh")!==-1&&r.indexOf("Safari")!==-1&&(a=!0),a}}}),eM=Ne({"src/lib/preserve_drawing_buffer.js"(te,Z){var v=Fn(),w=wL();Z.exports=function(t){var r;if(t&&t.hasOwnProperty("userAgent")?r=t.userAgent:r=C(),typeof r!="string")return!0;var a=w({ua:{headers:{"user-agent":r}},tablet:!0,featureDetect:!1});if(!a)for(var l=r.split(" "),i=1;i<l.length;i++){var s=l[i];if(s.indexOf("Safari")!==-1)for(var o=i-1;o>-1;o--){var u=l[o];if(u.substr(0,8)==="Version/"){var d=u.substr(8).split(".")[0];if(v(d)&&(d=+d),d>=13)return!0}}}return a};function C(){var P;return typeof navigator<"u"&&(P=navigator.userAgent),P&&P.headers&&typeof P.headers["user-agent"]=="string"&&(P=P.headers["user-agent"]),P}}}),tM=Ne({"src/lib/make_trace_groups.js"(te,Z){var v=xn();Z.exports=function(C,P,t){var r=C.selectAll("g."+t.replace(/\s/g,".")).data(P,function(l){return l[0].trace.uid});r.exit().remove(),r.enter().append("g").attr("class",t),r.order();var a=C.classed("rangeplot")?"nodeRangePlot3":"node3";return r.each(function(l){l[0][a]=v.select(this)}),r}}}),TL=Ne({"src/lib/localize.js"(te,Z){var v=Yo();Z.exports=function(C,P){for(var t=C._context.locale,r=0;r<2;r++){for(var a=C._context.locales,l=0;l<2;l++){var i=(a[t]||{}).dictionary;if(i){var s=i[P];if(s)return s}a=v.localeRegistry}var o=t.split("-")[0];if(o===t)break;t=o}return P}}}),bx=Ne({"src/lib/filter_unique.js"(te,Z){Z.exports=function(w){for(var C={},P=[],t=0,r=0;r<w.length;r++){var a=w[r];C[a]!==1&&(C[a]=1,P[t++]=a)}return P}}}),kw=Ne({"src/lib/filter_visible.js"(te,Z){Z.exports=function(t){for(var r=C(t)?w:v,a=[],l=0;l<t.length;l++){var i=t[l];r(i)&&a.push(i)}return a};function v(P){return P.visible===!0}function w(P){var t=P[0].trace;return t.visible===!0&&t._length!==0}function C(P){return Array.isArray(P)&&Array.isArray(P[0])&&P[0][0]&&P[0][0].trace}}}),F0=Ne({"src/lib/increment.js"(te,Z){Z.exports=function(w,C){if(!C)return w;var P=1/Math.abs(C),t=P>1?(P*w+P*C)/P:w+C,r=String(t).length;if(r>16){var a=String(C).length,l=String(w).length;if(r>=l+a){var i=parseFloat(t).toPrecision(12);i.indexOf("e+")===-1&&(t=+i)}}return t}}}),am=Ne({"src/lib/clean_number.js"(te,Z){var v=Fn(),w=da().BADNUM,C=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;Z.exports=function(t){return typeof t=="string"&&(t=t.replace(C,"")),v(t)?Number(t):w}}}),In=Ne({"src/lib/index.js"(te,Z){var v=xn(),w=On().utcFormat,C=qn().format,P=Fn(),t=da(),r=t.FP_SAFE,a=-r,l=t.BADNUM,i=Z.exports={};i.adjustFormat=function(Y){return!Y||/^\d[.]\df/.test(Y)||/[.]\d%/.test(Y)?Y:Y==="0.f"?"~f":/^\d%/.test(Y)?"~%":/^\ds/.test(Y)?"~s":!/^[~,.0$]/.test(Y)&&/[&fps]/.test(Y)?"~"+Y:Y};var s={};i.warnBadFormat=function(oe){var Y=String(oe);s[Y]||(s[Y]=1,i.warn('encountered bad format: "'+Y+'"'))},i.noFormat=function(oe){return String(oe)},i.numberFormat=function(oe){var Y;try{Y=C(i.adjustFormat(oe))}catch{return i.warnBadFormat(oe),i.noFormat}return Y},i.nestedProperty=mi(),i.keyedContainer=Io(),i.relativeAttr=ya(),i.isPlainObject=qa(),i.toLogRange=Wn(),i.relinkPrivateKeys=Ei();var o=Ri();i.isArrayBuffer=o.isArrayBuffer,i.isTypedArray=o.isTypedArray,i.isArrayOrTypedArray=o.isArrayOrTypedArray,i.isArray1D=o.isArray1D,i.ensureArray=o.ensureArray,i.concat=o.concat,i.maxRowLength=o.maxRowLength,i.minRowLength=o.minRowLength;var u=$i();i.mod=u.mod,i.modHalf=u.modHalf;var d=Vu();i.valObjectMeta=d.valObjectMeta,i.coerce=d.coerce,i.coerce2=d.coerce2,i.coerceFont=d.coerceFont,i.coercePattern=d.coercePattern,i.coerceHoverinfo=d.coerceHoverinfo,i.coerceSelectionMarkerOpacity=d.coerceSelectionMarkerOpacity,i.validate=d.validate;var h=QT();i.dateTime2ms=h.dateTime2ms,i.isDateTime=h.isDateTime,i.ms2DateTime=h.ms2DateTime,i.ms2DateTimeLocal=h.ms2DateTimeLocal,i.cleanDate=h.cleanDate,i.isJSDate=h.isJSDate,i.formatDate=h.formatDate,i.incrementMonth=h.incrementMonth,i.dateTick0=h.dateTick0,i.dfltRange=h.dfltRange,i.findExactDates=h.findExactDates,i.MIN_MS=h.MIN_MS,i.MAX_MS=h.MAX_MS;var g=_g();i.findBin=g.findBin,i.sorterAsc=g.sorterAsc,i.sorterDes=g.sorterDes,i.distinctVals=g.distinctVals,i.roundUp=g.roundUp,i.sort=g.sort,i.findIndexOfMin=g.findIndexOfMin,i.sortObjectKeys=Sm();var m=N1();i.aggNums=m.aggNums,i.len=m.len,i.mean=m.mean,i.geometricMean=m.geometricMean,i.median=m.median,i.midRange=m.midRange,i.variance=m.variance,i.stdev=m.stdev,i.interp=m.interp;var E=qp();i.init2dArray=E.init2dArray,i.transposeRagged=E.transposeRagged,i.dot=E.dot,i.translationMatrix=E.translationMatrix,i.rotationMatrix=E.rotationMatrix,i.rotationXYMatrix=E.rotationXYMatrix,i.apply3DTransform=E.apply3DTransform,i.apply2DTransform=E.apply2DTransform,i.apply2DTransform2=E.apply2DTransform2,i.convertCssMatrix=E.convertCssMatrix,i.inverseTransformMatrix=E.inverseTransformMatrix;var c=sv();i.deg2rad=c.deg2rad,i.rad2deg=c.rad2deg,i.angleDelta=c.angleDelta,i.angleDist=c.angleDist,i.isFullCircle=c.isFullCircle,i.isAngleInsideSector=c.isAngleInsideSector,i.isPtInsideSector=c.isPtInsideSector,i.pathArc=c.pathArc,i.pathSector=c.pathSector,i.pathAnnulus=c.pathAnnulus;var _=JE();i.isLeftAnchor=_.isLeftAnchor,i.isCenterAnchor=_.isCenterAnchor,i.isRightAnchor=_.isRightAnchor,i.isTopAnchor=_.isTopAnchor,i.isMiddleAnchor=_.isMiddleAnchor,i.isBottomAnchor=_.isBottomAnchor;var T=QE();i.segmentsIntersect=T.segmentsIntersect,i.segmentDistance=T.segmentDistance,i.getTextLocation=T.getTextLocation,i.clearLocationCache=T.clearLocationCache,i.getVisibleSegment=T.getVisibleSegment,i.findPointOnPath=T.findPointOnPath;var M=fi();i.extendFlat=M.extendFlat,i.extendDeep=M.extendDeep,i.extendDeepAll=M.extendDeepAll,i.extendDeepNoArrays=M.extendDeepNoArrays;var k=Nd();i.log=k.log,i.warn=k.warn,i.error=k.error;var b=ml();i.counterRegex=b.counter;var A=N0();i.throttle=A.throttle,i.throttleDone=A.done,i.clearThrottle=A.clear;var y=D1();i.getGraphDiv=y.getGraphDiv,i.isPlotDiv=y.isPlotDiv,i.removeElement=y.removeElement,i.addStyleRule=y.addStyleRule,i.addRelatedStyleRule=y.addRelatedStyleRule,i.deleteRelatedStyleRule=y.deleteRelatedStyleRule,i.setStyleOnHover=y.setStyleOnHover,i.getFullTransformMatrix=y.getFullTransformMatrix,i.getElementTransformMatrix=y.getElementTransformMatrix,i.getElementAndAncestors=y.getElementAndAncestors,i.equalDomRects=y.equalDomRects,i.clearResponsive=F1(),i.preserveDrawingBuffer=eM(),i.makeTraceGroups=tM(),i._=TL(),i.notifier=zd(),i.filterUnique=bx(),i.filterVisible=kw(),i.pushUnique=jp(),i.increment=F0(),i.cleanNumber=am(),i.ensureNumber=function(Y){return P(Y)?(Y=Number(Y),Y>r||Y<a?l:Y):l},i.isIndex=function(oe,Y){return Y!==void 0&&oe>=Y?!1:P(oe)&&oe>=0&&oe%1===0},i.noop=ad(),i.identity=z0(),i.repeat=function(oe,Y){for(var ce=new Array(Y),ue=0;ue<Y;ue++)ce[ue]=oe;return ce},i.swapAttrs=function(oe,Y,ce,ue){ce||(ce="x"),ue||(ue="y");for(var _e=0;_e<Y.length;_e++){var Le=Y[_e],ze=i.nestedProperty(oe,Le.replace("?",ce)),Xe=i.nestedProperty(oe,Le.replace("?",ue)),Ve=ze.get();ze.set(Xe.get()),Xe.set(Ve)}},i.raiseToTop=function(Y){Y.parentNode.appendChild(Y)},i.cancelTransition=function(oe){return oe.transition().duration(0)},i.constrain=function(oe,Y,ce){return Y>ce?Math.max(ce,Math.min(Y,oe)):Math.max(Y,Math.min(ce,oe))},i.bBoxIntersect=function(oe,Y,ce){return ce=ce||0,oe.left<=Y.right+ce&&Y.left<=oe.right+ce&&oe.top<=Y.bottom+ce&&Y.top<=oe.bottom+ce},i.simpleMap=function(oe,Y,ce,ue,_e){for(var Le=oe.length,ze=new Array(Le),Xe=0;Xe<Le;Xe++)ze[Xe]=Y(oe[Xe],ce,ue,_e);return ze},i.randstr=function oe(Y,ce,ue,_e){if(ue||(ue=16),ce===void 0&&(ce=24),ce<=0)return"0";var Le=Math.log(Math.pow(2,ce))/Math.log(ue),ze="",Xe,Ve,rt;for(Xe=2;Le===1/0;Xe*=2)Le=Math.log(Math.pow(2,ce/Xe))/Math.log(ue)*Xe;var mt=Le-Math.floor(Le);for(Xe=0;Xe<Math.floor(Le);Xe++)rt=Math.floor(Math.random()*ue).toString(ue),ze=rt+ze;mt&&(Ve=Math.pow(ue,mt),rt=Math.floor(Math.random()*Ve).toString(ue),ze=rt+ze);var _t=parseInt(ze,ue);return Y&&Y[ze]||_t!==1/0&&_t>=Math.pow(2,ce)?_e>10?(i.warn("randstr failed uniqueness"),ze):oe(Y,ce,ue,(_e||0)+1):ze},i.OptionControl=function(oe,Y){oe||(oe={}),Y||(Y="opt");var ce={};return ce.optionList=[],ce._newoption=function(ue){ue[Y]=oe,ce[ue.name]=ue,ce.optionList.push(ue)},ce["_"+Y]=oe,ce},i.smooth=function(oe,Y){if(Y=Math.round(Y)||0,Y<2)return oe;var ce=oe.length,ue=2*ce,_e=2*Y-1,Le=new Array(_e),ze=new Array(ce),Xe,Ve,rt,mt;for(Xe=0;Xe<_e;Xe++)Le[Xe]=(1-Math.cos(Math.PI*(Xe+1)/Y))/(2*Y);for(Xe=0;Xe<ce;Xe++){for(mt=0,Ve=0;Ve<_e;Ve++)rt=Xe+Ve+1-Y,rt<-ce?rt-=ue*Math.round(rt/ue):rt>=ue&&(rt-=ue*Math.floor(rt/ue)),rt<0?rt=-1-rt:rt>=ce&&(rt=ue-1-rt),mt+=oe[rt]*Le[Ve];ze[Xe]=mt}return ze},i.syncOrAsync=function(oe,Y,ce){var ue,_e;function Le(){return i.syncOrAsync(oe,Y,ce)}for(;oe.length;)if(_e=oe.splice(0,1)[0],ue=_e(Y),ue&&ue.then)return ue.then(Le);return ce&&ce(Y)},i.stripTrailingSlash=function(oe){return oe.substr(-1)==="/"?oe.substr(0,oe.length-1):oe},i.noneOrAll=function(oe,Y,ce){if(oe){var ue=!1,_e=!0,Le,ze;for(Le=0;Le<ce.length;Le++)ze=oe[ce[Le]],ze!=null?ue=!0:_e=!1;if(ue&&!_e)for(Le=0;Le<ce.length;Le++)oe[ce[Le]]=Y[ce[Le]]}},i.mergeArray=function(oe,Y,ce,ue){var _e=typeof ue=="function";if(i.isArrayOrTypedArray(oe))for(var Le=Math.min(oe.length,Y.length),ze=0;ze<Le;ze++){var Xe=oe[ze];Y[ze][ce]=_e?ue(Xe):Xe}},i.mergeArrayCastPositive=function(oe,Y,ce){return i.mergeArray(oe,Y,ce,function(ue){var _e=+ue;return isFinite(_e)&&_e>0?_e:0})},i.fillArray=function(oe,Y,ce,ue){if(ue=ue||i.identity,i.isArrayOrTypedArray(oe))for(var _e=0;_e<Y.length;_e++)Y[_e][ce]=ue(oe[_e])},i.castOption=function(oe,Y,ce,ue){ue=ue||i.identity;var _e=i.nestedProperty(oe,ce).get();return i.isArrayOrTypedArray(_e)?Array.isArray(Y)&&i.isArrayOrTypedArray(_e[Y[0]])?ue(_e[Y[0]][Y[1]]):ue(_e[Y]):_e},i.extractOption=function(oe,Y,ce,ue){if(ce in oe)return oe[ce];var _e=i.nestedProperty(Y,ue).get();if(!Array.isArray(_e))return _e};function f(oe){var Y={};for(var ce in oe)for(var ue=oe[ce],_e=0;_e<ue.length;_e++)Y[ue[_e]]=+ce;return Y}i.tagSelected=function(oe,Y,ce){var ue=Y.selectedpoints,_e=Y._indexToPoints,Le;_e&&(Le=f(_e));function ze(_t){return _t!==void 0&&_t<oe.length}for(var Xe=0;Xe<ue.length;Xe++){var Ve=ue[Xe];if(i.isIndex(Ve)||i.isArrayOrTypedArray(Ve)&&i.isIndex(Ve[0])&&i.isIndex(Ve[1])){var rt=Le?Le[Ve]:Ve,mt=ce?ce[rt]:rt;ze(mt)&&(oe[mt].selected=1)}}},i.selIndices2selPoints=function(oe){var Y=oe.selectedpoints,ce=oe._indexToPoints;if(ce){for(var ue=f(ce),_e=[],Le=0;Le<Y.length;Le++){var ze=Y[Le];if(i.isIndex(ze)){var Xe=ue[ze];i.isIndex(Xe)&&_e.push(Xe)}}return _e}else return Y},i.getTargetArray=function(oe,Y){var ce=Y.target;if(typeof ce=="string"&&ce){var ue=i.nestedProperty(oe,ce).get();return i.isArrayOrTypedArray(ue)?ue:!1}else if(i.isArrayOrTypedArray(ce))return ce;return!1};function p(oe,Y,ce){var ue={};typeof Y!="object"&&(Y={});var _e=ce==="pieLike"?-1:3,Le=Object.keys(oe),ze,Xe,Ve;for(ze=0;ze<Le.length;ze++)Xe=Le[ze],Ve=oe[Xe],!(Xe.charAt(0)==="_"||typeof Ve=="function")&&(Xe==="module"?ue[Xe]=Ve:Array.isArray(Ve)?Xe==="colorscale"||_e===-1?ue[Xe]=Ve.slice():ue[Xe]=Ve.slice(0,_e):i.isTypedArray(Ve)?_e===-1?ue[Xe]=Ve.subarray():ue[Xe]=Ve.subarray(0,_e):Ve&&typeof Ve=="object"?ue[Xe]=p(oe[Xe],Y[Xe],ce):ue[Xe]=Ve);for(Le=Object.keys(Y),ze=0;ze<Le.length;ze++)Xe=Le[ze],Ve=Y[Xe],(typeof Ve!="object"||!(Xe in ue)||typeof ue[Xe]!="object")&&(ue[Xe]=Ve);return ue}i.minExtend=p,i.titleCase=function(oe){return oe.charAt(0).toUpperCase()+oe.substr(1)},i.containsAny=function(oe,Y){for(var ce=0;ce<Y.length;ce++)if(oe.indexOf(Y[ce])!==-1)return!0;return!1};var x=/Version\/[\d\.]+.*Safari/;i.isSafari=function(){return x.test(window.navigator.userAgent)};var N=/iPad|iPhone|iPod/;i.isIOS=function(){return N.test(window.navigator.userAgent)};var D=/Macintosh.+AppleWebKit.+Gecko\)$/;i.isMacWKWebView=()=>D.test(window.navigator.userAgent);var B=/Firefox\/(\d+)\.\d+/;i.getFirefoxVersion=function(){var oe=B.exec(window.navigator.userAgent);if(oe&&oe.length===2){var Y=parseInt(oe[1]);if(!isNaN(Y))return Y}return null},i.isD3Selection=function(oe){return oe instanceof v.selection},i.ensureSingle=function(oe,Y,ce,ue){var _e=oe.select(Y+(ce?"."+ce:""));if(_e.size())return _e;var Le=oe.append(Y);return ce&&Le.classed(ce,!0),ue&&Le.call(ue),Le},i.ensureSingleById=function(oe,Y,ce,ue){var _e=oe.select(Y+"#"+ce);if(_e.size())return _e;var Le=oe.append(Y).attr("id",ce);return ue&&Le.call(ue),Le},i.objectFromPath=function(oe,Y){for(var ce=oe.split("."),ue,_e=ue={},Le=0;Le<ce.length;Le++){var ze=ce[Le],Xe=null,Ve=ce[Le].match(/(.*)\[([0-9]+)\]/);Ve?(ze=Ve[1],Xe=Ve[2],ue=ue[ze]=[],Le===ce.length-1?ue[Xe]=Y:ue[Xe]={},ue=ue[Xe]):(Le===ce.length-1?ue[ze]=Y:ue[ze]={},ue=ue[ze])}return _e};var U=/^([^\[\.]+)\.(.+)?/,V=/^([^\.]+)\[([0-9]+)\](\.)?(.+)?/;function q(oe){return oe.slice(0,2)==="__"}i.expandObjectPaths=function(oe){var Y,ce,ue,_e,Le,ze,Xe;if(typeof oe=="object"&&!Array.isArray(oe)){for(ce in oe)if(oe.hasOwnProperty(ce))if(Y=ce.match(U)){if(_e=oe[ce],ue=Y[1],q(ue))continue;delete oe[ce],oe[ue]=i.extendDeepNoArrays(oe[ue]||{},i.objectFromPath(ce,i.expandObjectPaths(_e))[ue])}else if(Y=ce.match(V)){if(_e=oe[ce],ue=Y[1],q(ue))continue;if(Le=parseInt(Y[2]),delete oe[ce],oe[ue]=oe[ue]||[],Y[3]===".")Xe=Y[4],ze=oe[ue][Le]=oe[ue][Le]||{},i.extendDeepNoArrays(ze,i.objectFromPath(Xe,i.expandObjectPaths(_e)));else{if(q(ue))continue;oe[ue][Le]=i.expandObjectPaths(_e)}}else{if(q(ce))continue;oe[ce]=i.expandObjectPaths(oe[ce])}}return oe},i.numSeparate=function(oe,Y,ce){if(ce||(ce=!1),typeof Y!="string"||Y.length===0)throw new Error("Separator string required for formatting!");typeof oe=="number"&&(oe=String(oe));var ue=/(\d+)(\d{3})/,_e=Y.charAt(0),Le=Y.charAt(1),ze=oe.split("."),Xe=ze[0],Ve=ze.length>1?_e+ze[1]:"";if(Le&&(ze.length>1||Xe.length>4||ce))for(;ue.test(Xe);)Xe=Xe.replace(ue,"$1"+Le+"$2");return Xe+Ve},i.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var z=/^\w*$/;i.templateString=function(oe,Y){var ce={};return oe.replace(i.TEMPLATE_STRING_REGEX,function(ue,_e){var Le;return z.test(_e)?Le=Y[_e]:(ce[_e]=ce[_e]||i.nestedProperty(Y,_e).get,Le=ce[_e](!0)),Le!==void 0?Le:""})};var H={max:10,count:0,name:"hovertemplate"};i.hovertemplateString=oe=>me(sr(cr({},oe),{opts:H}));var G={max:10,count:0,name:"texttemplate"};i.texttemplateString=oe=>me(sr(cr({},oe),{opts:G}));var J=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function le(oe){var Y=oe.match(J);return Y?{key:Y[1],op:Y[2],number:Number(Y[3])}:{key:oe,op:null,number:null}}var ge={max:10,count:0,name:"texttemplate",parseMultDiv:!0};i.texttemplateStringForShapes=oe=>me(sr(cr({},oe),{opts:ge}));var de=/^[:|\|]/;function me({data:oe=[],locale:Y,fallback:ce,labels:ue={},opts:_e,template:Le}){return Le.replace(i.TEMPLATE_STRING_REGEX,(ze,Xe,Ve)=>{const rt=["xother","yother"].includes(Xe),mt=["_xother","_yother"].includes(Xe),_t=["_xother_","_yother_"].includes(Xe),vt=["xother_","yother_"].includes(Xe),ut=rt||mt||vt||_t;(mt||_t)&&(Xe=Xe.substring(1)),(vt||_t)&&(Xe=Xe.substring(0,Xe.length-1));let Fe=null,Pe=null;if(_e.parseMultDiv){var be=le(Xe);Xe=be.key,Fe=be.op,Pe=be.number}let Ye;if(ut){if(ue[Xe]===void 0)return"";Ye=ue[Xe]}else for(const Yt of oe)if(Yt){if(Yt.hasOwnProperty(Xe)){Ye=Yt[Xe];break}if(z.test(Xe)||(Ye=i.nestedProperty(Yt,Xe).get(!0)),Ye!==void 0)break}if(Ye===void 0){const{count:Yt,max:$t,name:fr}=_e,mr=ce===!1?ze:ce;return Yt<$t&&i.warn([`Variable '${Xe}' in ${fr} could not be found!`,"Please verify that the template is correct.",`Using value: '${mr}'.`].join(" ")),Yt===$t&&i.warn(`Too many '${fr}' warnings - additional warnings will be suppressed.`),_e.count++,mr}if(Fe==="*"&&(Ye*=Pe),Fe==="/"&&(Ye/=Pe),Ve){var yt;if(Ve[0]===":"&&(yt=Y?Y.numberFormat:i.numberFormat,Ye!==""&&(Ye=yt(Ve.replace(de,""))(Ye))),Ve[0]==="|"){yt=Y?Y.timeFormat:w;var wt=i.dateTime2ms(Ye);Ye=i.formatDate(wt,Ve.replace(de,""),!1,yt)}}else{var ht=Xe+"Label";ue.hasOwnProperty(ht)&&(Ye=ue[ht])}return ut&&(Ye="("+Ye+")",(mt||_t)&&(Ye=" "+Ye),(vt||_t)&&(Ye=Ye+" ")),Ye})}var W=48,ie=57;i.subplotSort=function(oe,Y){for(var ce=Math.min(oe.length,Y.length)+1,ue=0,_e=0,Le=0;Le<ce;Le++){var ze=oe.charCodeAt(Le)||0,Xe=Y.charCodeAt(Le)||0,Ve=ze>=W&&ze<=ie,rt=Xe>=W&&Xe<=ie;if(Ve&&(ue=10*ue+ze-W),rt&&(_e=10*_e+Xe-W),!Ve||!rt){if(ue!==_e)return ue-_e;if(ze!==Xe)return ze-Xe}}return _e-ue};var se=2e9;i.seedPseudoRandom=function(){se=2e9},i.pseudoRandom=function(){var oe=se;return se=(69069*se+1)%4294967296,Math.abs(se-oe)<429496729?i.pseudoRandom():se/4294967296},i.fillText=function(oe,Y,ce){var ue=Array.isArray(ce)?function(ze){ce.push(ze)}:function(ze){ce.text=ze},_e=i.extractOption(oe,Y,"htx","hovertext");if(i.isValidTextValue(_e))return ue(_e);var Le=i.extractOption(oe,Y,"tx","text");if(i.isValidTextValue(Le))return ue(Le)},i.isValidTextValue=function(oe){return oe||oe===0},i.formatPercent=function(oe,Y){Y=Y||0;for(var ce=(Math.round(100*oe*Math.pow(10,Y))*Math.pow(.1,Y)).toFixed(Y)+"%",ue=0;ue<Y;ue++)ce.indexOf(".")!==-1&&(ce=ce.replace("0%","%"),ce=ce.replace(".%","%"));return ce},i.isHidden=function(oe){var Y=window.getComputedStyle(oe).display;return!Y||Y==="none"},i.strTranslate=function(oe,Y){return oe||Y?"translate("+oe+","+Y+")":""},i.strRotate=function(oe){return oe?"rotate("+oe+")":""},i.strScale=function(oe){return oe!==1?"scale("+oe+")":""},i.getTextTransform=function(oe){var Y=oe.noCenter,ce=oe.textX,ue=oe.textY,_e=oe.targetX,Le=oe.targetY,ze=oe.anchorX||0,Xe=oe.anchorY||0,Ve=oe.rotate,rt=oe.scale;return rt?rt>1&&(rt=1):rt=0,i.strTranslate(_e-rt*(ce+ze),Le-rt*(ue+Xe))+i.strScale(rt)+(Ve?"rotate("+Ve+(Y?"":" "+ce+" "+ue)+")":"")},i.setTransormAndDisplay=function(oe,Y){oe.attr("transform",i.getTextTransform(Y)),oe.style("display",Y.scale?null:"none")},i.ensureUniformFontSize=function(oe,Y){var ce=i.extendFlat({},Y);return ce.size=Math.max(Y.size,oe._fullLayout.uniformtext.minsize||0),ce},i.join2=function(oe,Y,ce){var ue=oe.length;return ue>1?oe.slice(0,-1).join(Y)+ce+oe[ue-1]:oe.join(Y)},i.bigFont=function(oe){return Math.round(1.2*oe)};var ee=i.getFirefoxVersion(),pe=ee!==null&&ee<86;i.getPositionFromD3Event=function(){return pe?[v.event.layerX,v.event.layerY]:[v.event.offsetX,v.event.offsetY]}}}),AL=Ne({"build/plotcss.js"(){var te=In(),Z={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;border:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X:focus-within .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-group a":"display:grid;place-content:center;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;border:none;background:rgba(0,0,0,0);","X .modebar-btn svg":"position:relative;","X .modebar-btn:focus-visible":"outline:1px solid #000;outline-offset:1px;border-radius:3px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":'content:"";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;',"Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(w in Z)v=w.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),te.addStyleRule(v,Z[w]);var v,w}}),Pw=Ne({"node_modules/is-browser/client.js"(te,Z){Z.exports=!0}}),eA=Ne({"node_modules/has-hover/index.js"(te,Z){var v=Pw(),w;typeof window.matchMedia=="function"?w=!window.matchMedia("(hover: none)").matches:w=v,Z.exports=w}}),B0=Ne({"node_modules/events/events.js"(te,Z){var v=typeof Reflect=="object"?Reflect:null,w=v&&typeof v.apply=="function"?v.apply:function(k,b,A){return Function.prototype.apply.call(k,b,A)},C;v&&typeof v.ownKeys=="function"?C=v.ownKeys:Object.getOwnPropertySymbols?C=function(k){return Object.getOwnPropertyNames(k).concat(Object.getOwnPropertySymbols(k))}:C=function(k){return Object.getOwnPropertyNames(k)};function P(M){console&&console.warn&&console.warn(M)}var t=Number.isNaN||function(k){return k!==k};function r(){r.init.call(this)}Z.exports=r,Z.exports.once=c,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._eventsCount=0,r.prototype._maxListeners=void 0;var a=10;function l(M){if(typeof M!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof M)}Object.defineProperty(r,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(M){if(typeof M!="number"||M<0||t(M))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+M+".");a=M}}),r.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},r.prototype.setMaxListeners=function(k){if(typeof k!="number"||k<0||t(k))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+k+".");return this._maxListeners=k,this};function i(M){return M._maxListeners===void 0?r.defaultMaxListeners:M._maxListeners}r.prototype.getMaxListeners=function(){return i(this)},r.prototype.emit=function(k){for(var b=[],A=1;A<arguments.length;A++)b.push(arguments[A]);var y=k==="error",f=this._events;if(f!==void 0)y=y&&f.error===void 0;else if(!y)return!1;if(y){var p;if(b.length>0&&(p=b[0]),p instanceof Error)throw p;var x=new Error("Unhandled error."+(p?" ("+p.message+")":""));throw x.context=p,x}var N=f[k];if(N===void 0)return!1;if(typeof N=="function")w(N,this,b);else for(var D=N.length,B=g(N,D),A=0;A<D;++A)w(B[A],this,b);return!0};function s(M,k,b,A){var y,f,p;if(l(b),f=M._events,f===void 0?(f=M._events=Object.create(null),M._eventsCount=0):(f.newListener!==void 0&&(M.emit("newListener",k,b.listener?b.listener:b),f=M._events),p=f[k]),p===void 0)p=f[k]=b,++M._eventsCount;else if(typeof p=="function"?p=f[k]=A?[b,p]:[p,b]:A?p.unshift(b):p.push(b),y=i(M),y>0&&p.length>y&&!p.warned){p.warned=!0;var x=new Error("Possible EventEmitter memory leak detected. "+p.length+" "+String(k)+" listeners added. Use emitter.setMaxListeners() to increase limit");x.name="MaxListenersExceededWarning",x.emitter=M,x.type=k,x.count=p.length,P(x)}return M}r.prototype.addListener=function(k,b){return s(this,k,b,!1)},r.prototype.on=r.prototype.addListener,r.prototype.prependListener=function(k,b){return s(this,k,b,!0)};function o(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function u(M,k,b){var A={fired:!1,wrapFn:void 0,target:M,type:k,listener:b},y=o.bind(A);return y.listener=b,A.wrapFn=y,y}r.prototype.once=function(k,b){return l(b),this.on(k,u(this,k,b)),this},r.prototype.prependOnceListener=function(k,b){return l(b),this.prependListener(k,u(this,k,b)),this},r.prototype.removeListener=function(k,b){var A,y,f,p,x;if(l(b),y=this._events,y===void 0)return this;if(A=y[k],A===void 0)return this;if(A===b||A.listener===b)--this._eventsCount===0?this._events=Object.create(null):(delete y[k],y.removeListener&&this.emit("removeListener",k,A.listener||b));else if(typeof A!="function"){for(f=-1,p=A.length-1;p>=0;p--)if(A[p]===b||A[p].listener===b){x=A[p].listener,f=p;break}if(f<0)return this;f===0?A.shift():m(A,f),A.length===1&&(y[k]=A[0]),y.removeListener!==void 0&&this.emit("removeListener",k,x||b)}return this},r.prototype.off=r.prototype.removeListener,r.prototype.removeAllListeners=function(k){var b,A,y;if(A=this._events,A===void 0)return this;if(A.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):A[k]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete A[k]),this;if(arguments.length===0){var f=Object.keys(A),p;for(y=0;y<f.length;++y)p=f[y],p!=="removeListener"&&this.removeAllListeners(p);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(b=A[k],typeof b=="function")this.removeListener(k,b);else if(b!==void 0)for(y=b.length-1;y>=0;y--)this.removeListener(k,b[y]);return this};function d(M,k,b){var A=M._events;if(A===void 0)return[];var y=A[k];return y===void 0?[]:typeof y=="function"?b?[y.listener||y]:[y]:b?E(y):g(y,y.length)}r.prototype.listeners=function(k){return d(this,k,!0)},r.prototype.rawListeners=function(k){return d(this,k,!1)},r.listenerCount=function(M,k){return typeof M.listenerCount=="function"?M.listenerCount(k):h.call(M,k)},r.prototype.listenerCount=h;function h(M){var k=this._events;if(k!==void 0){var b=k[M];if(typeof b=="function")return 1;if(b!==void 0)return b.length}return 0}r.prototype.eventNames=function(){return this._eventsCount>0?C(this._events):[]};function g(M,k){for(var b=new Array(k),A=0;A<k;++A)b[A]=M[A];return b}function m(M,k){for(;k+1<M.length;k++)M[k]=M[k+1];M.pop()}function E(M){for(var k=new Array(M.length),b=0;b<k.length;++b)k[b]=M[b].listener||M[b];return k}function c(M,k){return new Promise(function(b,A){function y(p){M.removeListener(k,f),A(p)}function f(){typeof M.removeListener=="function"&&M.removeListener("error",y),b([].slice.call(arguments))}T(M,k,f,{once:!0}),k!=="error"&&_(M,y,{once:!0})})}function _(M,k,b){typeof M.on=="function"&&T(M,"error",k,b)}function T(M,k,b,A){if(typeof M.on=="function")A.once?M.once(k,b):M.on(k,b);else if(typeof M.addEventListener=="function")M.addEventListener(k,function y(f){A.once&&M.removeEventListener(k,y),b(f)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof M)}}}),wx=Ne({"src/lib/events.js"(te,Z){var v=B0().EventEmitter,w={init:function(C){if(C._ev instanceof v)return C;var P=new v,t=new v;return C._ev=P,C._internalEv=t,C.on=P.on.bind(P),C.once=P.once.bind(P),C.removeListener=P.removeListener.bind(P),C.removeAllListeners=P.removeAllListeners.bind(P),C._internalOn=t.on.bind(t),C._internalOnce=t.once.bind(t),C._removeInternalListener=t.removeListener.bind(t),C._removeAllInternalListeners=t.removeAllListeners.bind(t),C.emit=function(r,a){P.emit(r,a),t.emit(r,a)},typeof C.addEventListener=="function"&&C.addEventListener("wheel",()=>{},{passive:!0}),C},triggerHandler:function(C,P,t){var r,a=C._ev;if(!a)return;var l=a._events[P];if(!l)return;function i(o){if(o.listener){if(a.removeListener(P,o.listener),!o.fired)return o.fired=!0,o.listener.apply(a,[t])}else return o.apply(a,[t])}l=Array.isArray(l)?l:[l];var s;for(s=0;s<l.length-1;s++)i(l[s]);return r=i(l[s]),r},purge:function(C){return delete C._ev,delete C.on,delete C.once,delete C.removeListener,delete C.removeAllListeners,delete C.emit,delete C._ev,delete C._internalEv,delete C._internalOn,delete C._internalOnce,delete C._removeInternalListener,delete C._removeAllInternalListeners,C}};Z.exports=w}}),im=Ne({"src/lib/queue.js"(te,Z){var v=In(),w=Gf().dfltConfig;function C(t,r){for(var a=[],l,i=0;i<r.length;i++)l=r[i],l===t?a[i]=l:typeof l=="object"?a[i]=Array.isArray(l)?v.extendDeep([],l):v.extendDeepAll({},l):a[i]=l;return a}var P={};P.add=function(t,r,a,l,i){var s,o;if(t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},o=t.undoQueue.index,t.autoplay){t.undoQueue.inSequence||(t.autoplay=!1);return}!t.undoQueue.sequence||t.undoQueue.beginSequence?(s={undo:{calls:[],args:[]},redo:{calls:[],args:[]}},t.undoQueue.queue.splice(o,t.undoQueue.queue.length-o,s),t.undoQueue.index+=1):s=t.undoQueue.queue[o-1],t.undoQueue.beginSequence=!1,s&&(s.undo.calls.unshift(r),s.undo.args.unshift(a),s.redo.calls.push(l),s.redo.args.push(i)),t.undoQueue.queue.length>w.queueLength&&(t.undoQueue.queue.shift(),t.undoQueue.index--)},P.startSequence=function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!0,t.undoQueue.beginSequence=!0},P.stopSequence=function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!1,t.undoQueue.beginSequence=!1},P.undo=function(r){var a,l;if(!(r.undoQueue===void 0||isNaN(r.undoQueue.index)||r.undoQueue.index<=0)){for(r.undoQueue.index--,a=r.undoQueue.queue[r.undoQueue.index],r.undoQueue.inSequence=!0,l=0;l<a.undo.calls.length;l++)P.plotDo(r,a.undo.calls[l],a.undo.args[l]);r.undoQueue.inSequence=!1,r.autoplay=!1}},P.redo=function(r){var a,l;if(!(r.undoQueue===void 0||isNaN(r.undoQueue.index)||r.undoQueue.index>=r.undoQueue.queue.length)){for(a=r.undoQueue.queue[r.undoQueue.index],r.undoQueue.inSequence=!0,l=0;l<a.redo.calls.length;l++)P.plotDo(r,a.redo.calls[l],a.redo.args[l]);r.undoQueue.inSequence=!1,r.autoplay=!1,r.undoQueue.index++}},P.plotDo=function(t,r,a){t.autoplay=!0,a=C(t,a),r.apply(null,a)},Z.exports=P}}),Lw=Ne({"src/plots/frame_attributes.js"(te,Z){Z.exports={_isLinkedToArray:"frames_entry",group:{valType:"string"},name:{valType:"string"},traces:{valType:"any"},baseframe:{valType:"string"},data:{valType:"any"},layout:{valType:"any"}}}}),B1=Ne({"src/plot_api/plot_schema.js"(te){var Z=Yo(),v=In(),w=qo(),C=xx(),P=Lw(),t=O1(),r=Gf().configAttributes,a=ef(),l=v.extendDeepAll,i=v.isPlainObject,s=v.isArrayOrTypedArray,o=v.nestedProperty,u=v.valObjectMeta,d="_isSubplotObj",h="_isLinkedToArray",g="_arrayAttrRegexps",m="_deprecated",E=[d,h,g,m];te.IS_SUBPLOT_OBJ=d,te.IS_LINKED_TO_ARRAY=h,te.DEPRECATED=m,te.UNDERSCORE_ATTRS=E,te.get=function(){var D={};return Z.allTypes.forEach(function(B){D[B]=M(B)}),{defs:{valObjects:u,metaKeys:E.concat(["description","role","editType","impliedEdits"]),editType:{traces:a.traces,layout:a.layout},impliedEdits:{}},traces:D,layout:k(),frames:b(),animation:A(t),config:A(r)}},te.crawl=function(D,B,U,V){var q=U||0;V=V||"",Object.keys(D).forEach(function(z){var H=D[z];if(E.indexOf(z)===-1){var G=(V?V+".":"")+z;B(H,z,D,q,G),!te.isValObject(H)&&i(H)&&z!=="impliedEdits"&&te.crawl(H,B,q+1,G)}})},te.isValObject=function(D){return D&&D.valType!==void 0},te.findArrayAttributes=function(D){var B=[],U=[],V=[],q,z;function H(J,le,ge,de){U=U.slice(0,de).concat([le]),V=V.slice(0,de).concat([J&&J._isLinkedToArray]);var me=J&&(J.valType==="data_array"||J.arrayOk===!0)&&!(U[de-1]==="colorbar"&&(le==="ticktext"||le==="tickvals"));me&&G(q,0,"")}function G(J,le,ge){var de=J[U[le]],me=ge+U[le];if(le===U.length-1)s(de)&&B.push(z+me);else if(V[le]){if(Array.isArray(de))for(var W=0;W<de.length;W++)i(de[W])&&G(de[W],le+1,me+"["+W+"].")}else i(de)&&G(de,le+1,me+".")}return q=D,z="",te.crawl(w,H),D._module&&D._module.attributes&&te.crawl(D._module.attributes,H),B},te.getTraceValObject=function(D,B){var U=B[0],V=1,q,z,H=D._module;if(H||(H=(Z.modules[D.type||w.type.dflt]||{})._module),!H)return!1;if(q=H.attributes,z=q&&q[U],!z){var G=H.basePlotModule;G&&G.attributes&&(z=G.attributes[U])}return z||(z=w[U]),_(z,B,V)},te.getLayoutValObject=function(D,B){var U=c(D,B[0]);return _(U,B,1)};function c(D,B){var U,V,q,z,H=D._basePlotModules;if(H){var G;for(U=0;U<H.length;U++){if(q=H[U],q.attrRegex&&q.attrRegex.test(B)){if(q.layoutAttrOverrides)return q.layoutAttrOverrides;!G&&q.layoutAttributes&&(G=q.layoutAttributes)}var J=q.baseLayoutAttrOverrides;if(J&&B in J)return J[B]}if(G)return G}var le=D._modules;if(le){for(U=0;U<le.length;U++)if(z=le[U].layoutAttributes,z&&B in z)return z[B]}for(V in Z.componentsRegistry){if(q=Z.componentsRegistry[V],q.name==="colorscale"&&B.indexOf("coloraxis")===0)return q.layoutAttributes[B];if(!q.schema&&B===q.name)return q.layoutAttributes}return B in C?C[B]:!1}function _(D,B,U){if(!D)return!1;if(D._isLinkedToArray){if(T(B[U]))U++;else if(U<B.length)return!1}for(;U<B.length;U++){var V=D[B[U]];if(i(V))D=V;else break;if(U===B.length-1)break;if(D._isLinkedToArray){if(U++,!T(B[U]))return!1}else if(D.valType==="info_array"){U++;var q=B[U];if(!T(q))return!1;var z=D.items;if(Array.isArray(z)){if(q>=z.length)return!1;if(D.dimensions===2){if(U++,B.length===U)return D;var H=B[U];if(!T(H))return!1;D=z[q][H]}else D=z[q]}else D=z}}return D}function T(D){return D===Math.round(D)&&D>=0}function M(D){var B,U;B=Z.modules[D]._module,U=B.basePlotModule;var V={};V.type=null;var q=l({},w),z=l({},B.attributes);te.crawl(z,function(J,le,ge,de,me){o(q,me).set(void 0),J===void 0&&o(z,me).set(void 0)}),l(V,q),Z.traceIs(D,"noOpacity")&&delete V.opacity,Z.traceIs(D,"showLegend")||(delete V.showlegend,delete V.legendgroup),Z.traceIs(D,"noHover")&&(delete V.hoverinfo,delete V.hoverlabel),B.selectPoints||delete V.selectedpoints,l(V,z),U.attributes&&l(V,U.attributes),V.type=D;var H={meta:B.meta||{},categories:B.categories||{},animatable:!!B.animatable,type:D,attributes:A(V)};if(B.layoutAttributes){var G={};l(G,B.layoutAttributes),H.layoutAttributes=A(G)}return B.animatable||te.crawl(H,function(J){te.isValObject(J)&&"anim"in J&&delete J.anim}),H}function k(){var D={},B,U;l(D,C);for(B in Z.subplotsRegistry)if(U=Z.subplotsRegistry[B],!!U.layoutAttributes)if(Array.isArray(U.attr))for(var V=0;V<U.attr.length;V++)x(D,U,U.attr[V]);else{var q=U.attr==="subplot"?U.name:U.attr;x(D,U,q)}for(B in Z.componentsRegistry){U=Z.componentsRegistry[B];var z=U.schema;if(z&&(z.subplots||z.layout)){var H=z.subplots;if(H&&H.xaxis&&!H.yaxis)for(var G in H.xaxis)delete D.yaxis[G];delete D.xaxis.shift,delete D.xaxis.autoshift}else U.name==="colorscale"?l(D,U.layoutAttributes):U.layoutAttributes&&N(D,U.layoutAttributes,U.name)}return{layoutAttributes:A(D)}}function b(){var D={frames:l({},P)};return A(D),D.frames}function A(D){return y(D),f(D),p(D),D}function y(D){function B(V){return{valType:"string",editType:"none"}}function U(V,q,z){te.isValObject(V)?(V.arrayOk===!0||V.valType==="data_array")&&(z[q+"src"]=B()):i(V)&&(V.role="object")}te.crawl(D,U)}function f(D){function B(U,V,q){if(U){var z=U[h];z&&(delete U[h],q[V]={items:{}},q[V].items[z]=U,q[V].role="object")}}te.crawl(D,B)}function p(D){function B(U){for(var V in U)if(i(U[V]))B(U[V]);else if(Array.isArray(U[V]))for(var q=0;q<U[V].length;q++)B(U[V][q]);else U[V]instanceof RegExp&&(U[V]=U[V].toString())}B(D)}function x(D,B,U){var V=o(D,U),q=l({},B.layoutAttributes);q[d]=!0,V.set(q)}function N(D,B,U){var V=o(D,U);V.set(l(V.get()||{},B))}}}),Cu=Ne({"src/plot_api/plot_template.js"(te){var Z=In(),v=qo(),w="templateitemname",C={name:{valType:"string",editType:"none"}};C[w]={valType:"string",editType:"calc"},te.templatedArray=function(r,a){return a._isLinkedToArray=r,a.name=C.name,a[w]=C[w],a},te.traceTemplater=function(r){var a={},l,i;for(l in r)i=r[l],Array.isArray(i)&&i.length&&(a[l]=0);function s(o){l=Z.coerce(o,{},v,"type");var u={type:l,_template:null};if(l in a){i=r[l];var d=a[l]%i.length;a[l]++,u._template=i[d]}return u}return{newTrace:s}},te.newContainer=function(r,a,l){var i=r._template,s=i&&(i[a]||l&&i[l]);Z.isPlainObject(s)||(s=null);var o=r[a]={_template:s};return o},te.arrayTemplater=function(r,a,l){var i=r._template,s=i&&i[t(a)],o=i&&i[a];(!Array.isArray(o)||!o.length)&&(o=[]);var u={};function d(g){var m={name:g.name,_input:g},E=m[w]=g[w];if(!P(E))return m._template=s,m;for(var c=0;c<o.length;c++){var _=o[c];if(_.name===E)return u[E]=1,m._template=_,m}return m[l]=g[l]||!1,m._template=!1,m}function h(){for(var g=[],m=0;m<o.length;m++){var E=o[m],c=E.name;if(P(c)&&!u[c]){var _={_template:E,name:c,_input:{_templateitemname:c}};_[w]=E[w],g.push(_),u[c]=1}}return g}return{newItem:d,defaultItems:h}};function P(r){return r&&typeof r=="string"}function t(r){var a=r.length-1;return r.charAt(a)!=="s"&&Z.warn("bad argument to arrayDefaultKey: "+r),r.substr(0,r.length-1)+"defaults"}te.arrayDefaultKey=t,te.arrayEditor=function(r,a,l){var i=(Z.nestedProperty(r,a).get()||[]).length,s=l._index,o=s>=i&&(l._input||{})._templateitemname;o&&(s=i);var u=a+"["+s+"]",d;function h(){d={},o&&(d[u]={},d[u][w]=o)}h();function g(_,T){d[_]=T}function m(_,T){o?Z.nestedProperty(d[u],_).set(T):d[u+"."+_]=T}function E(){var _=d;return h(),_}function c(_,T){_&&m(_,T);var M=E();for(var k in M)Z.nestedProperty(r,k).set(M[k])}return{modifyBase:g,modifyItem:m,getUpdateObj:E,applyUpdate:c}}}}),wh=Ne({"src/plots/cartesian/constants.js"(te,Z){var v=ml().counter;Z.exports={idRegex:{x:v("x","( domain)?"),y:v("y","( domain)?")},attrRegex:v("[xy]axis"),xAxisMatch:v("xaxis"),yAxisMatch:v("yaxis"),AX_ID_PATTERN:/^[xyz][0-9]*( domain)?$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,HOUR_PATTERN:"hour",WEEKDAY_PATTERN:"day of week",MINDRAG:8,MINZOOM:20,DRAGGERSIZE:20,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:["imagelayer","heatmaplayer","contourcarpetlayer","contourlayer","funnellayer","waterfalllayer","barlayer","carpetlayer","violinlayer","boxlayer","ohlclayer","scattercarpetlayer","scatterlayer"],clipOnAxisFalseQuery:[".scatterlayer",".barlayer",".funnellayer",".waterfalllayer"],layerValue2layerClass:{"above traces":"above","below traces":"below"},zindexSeparator:"z"}}}),Wf=Ne({"src/plots/cartesian/axis_ids.js"(te){var Z=Yo(),v=wh();te.id2name=function(P){if(!(typeof P!="string"||!P.match(v.AX_ID_PATTERN))){var t=P.split(" ")[0].substr(1);return t==="1"&&(t=""),P.charAt(0)+"axis"+t}},te.name2id=function(P){if(P.match(v.AX_NAME_PATTERN)){var t=P.substr(5);return t==="1"&&(t=""),P.charAt(0)+t}},te.cleanId=function(P,t,r){var a=/( domain)$/.test(P);if(!(typeof P!="string"||!P.match(v.AX_ID_PATTERN))&&!(t&&P.charAt(0)!==t)&&!(a&&!r)){var l=P.split(" ")[0].substr(1).replace(/^0+/,"");return l==="1"&&(l=""),P.charAt(0)+l+(a&&r?" domain":"")}},te.list=function(C,P,t){var r=C._fullLayout;if(!r)return[];var a=te.listIds(C,P),l=new Array(a.length),i;for(i=0;i<a.length;i++){var s=a[i];l[i]=r[s.charAt(0)+"axis"+s.substr(1)]}if(!t){var o=r._subplots.gl3d||[];for(i=0;i<o.length;i++){var u=r[o[i]];P?l.push(u[P+"axis"]):l.push(u.xaxis,u.yaxis,u.zaxis)}}return l},te.listIds=function(C,P){var t=C._fullLayout;if(!t)return[];var r=t._subplots;return P?r[P+"axis"]:r.xaxis.concat(r.yaxis)},te.getFromId=function(C,P,t){var r=C._fullLayout;return P=P===void 0||typeof P!="string"?P:P.replace(" domain",""),t==="x"?P=P.replace(/y[0-9]*/,""):t==="y"&&(P=P.replace(/x[0-9]*/,"")),r[te.id2name(P)]},te.getFromTrace=function(C,P,t){var r=C._fullLayout,a=null;if(Z.traceIs(P,"gl3d")){var l=P.scene;l.substr(0,5)==="scene"&&(a=r[l][t+"axis"])}else a=te.getFromId(C,P[t+"axis"]||t);return a},te.idSort=function(C,P){var t=C.charAt(0),r=P.charAt(0);return t!==r?t>r?1:-1:+(C.substr(1)||1)-+(P.substr(1)||1)},te.ref2id=function(C){return/^[xyz]/.test(C)?C.split(" ")[0]:!1};function w(C,P){if(P&&P.length){for(var t=0;t<P.length;t++)if(P[t][C])return!0}return!1}te.isLinked=function(C,P){return w(P,C._axisMatchGroups)||w(P,C._axisConstraintGroups)}}}),xg=Ne({"src/components/shapes/handle_outline.js"(te,Z){function v(C){var P=C._fullLayout._zoomlayer;P&&P.selectAll(".outline-controllers").remove()}function w(C){var P=C._fullLayout._zoomlayer;P&&P.selectAll(".select-outline").remove(),C._fullLayout._outlining=!1}Z.exports={clearOutlineControllers:v,clearOutline:w}}}),bg=Ne({"src/traces/scatter/layout_attributes.js"(te,Z){Z.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}}}),lv=Ne({"src/plots/get_data.js"(te){var Z=Yo();wh().SUBPLOT_PATTERN,te.getSubplotCalcData=function(v,w,C){var P=Z.subplotsRegistry[w];if(!P)return[];for(var t=P.attr,r=[],a=0;a<v.length;a++){var l=v[a],i=l[0].trace;i[t]===C&&r.push(l)}return r},te.getModuleCalcData=function(v,w,C){var P=[],t=[],r;if(typeof w=="string"?r=Z.getModule(w).plot:typeof w=="function"?r=w:r=w.plot,!r)return[P,v];for(var a=C,l=0;l<v.length;l++){var i=v[l],s=i[0].trace,o=s.zorder!==void 0;s.visible!==!0||s._length===0||(s._module&&s._module.plot===r&&(!o||s.zorder===a)?P.push(i):t.push(i))}return[P,t]},te.getSubplotData=function(w,C,P){if(!Z.subplotsRegistry[C])return[];for(var t=Z.subplotsRegistry[C].attr,r=[],a,l=0;l<w.length;l++)a=w[l],a[t]===P&&r.push(a);return r}}}),rM=Ne({"src/plots/command.js"(te){var Z=Yo(),v=In();te.manageCommandObserver=function(a,l,i,s){var o={},u=!0;l&&l._commandObserver&&(o=l._commandObserver),o.cache||(o.cache={}),o.lookupTable={};var d=te.hasSimpleAPICommandBindings(a,i,o.lookupTable);if(l&&l._commandObserver){if(d)return o;if(l._commandObserver.remove)return l._commandObserver.remove(),l._commandObserver=null,o}if(d){w(a,d,o.cache),o.check=function(){if(u){var E=w(a,d,o.cache);return E.changed&&s&&o.lookupTable[E.value]!==void 0&&(o.disable(),Promise.resolve(s({value:E.value,type:d.type,prop:d.prop,traces:d.traces,index:o.lookupTable[E.value]})).then(o.enable,o.enable)),E.changed}};for(var h=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],g=0;g<h.length;g++)a._internalOn(h[g],o.check);o.remove=function(){for(var m=0;m<h.length;m++)a._removeInternalListener(h[m],o.check)}}else v.log("Unable to automatically bind plot updates to API command"),o.lookupTable={},o.remove=function(){};return o.disable=function(){u=!1},o.enable=function(){u=!0},l&&(l._commandObserver=o),o},te.hasSimpleAPICommandBindings=function(a,l,i){var s,o=l.length,u;for(s=0;s<o;s++){var d,h=l[s],g=h.method,m=h.args;if(Array.isArray(m)||(m=[]),!g)return!1;var E=te.computeAPICommandBindings(a,g,m);if(E.length!==1)return!1;if(!u)u=E[0],Array.isArray(u.traces)&&u.traces.sort();else{if(d=E[0],d.type!==u.type||d.prop!==u.prop)return!1;if(Array.isArray(u.traces))if(Array.isArray(d.traces)){d.traces.sort();for(var c=0;c<u.traces.length;c++)if(u.traces[c]!==d.traces[c])return!1}else return!1;else if(d.prop!==u.prop)return!1}d=E[0];var _=d.value;if(Array.isArray(_))if(_.length===1)_=_[0];else return!1;i&&(i[_]=s)}return u};function w(a,l,i){var s,o,u,d=!1;if(l.type==="data")s=a._fullData[l.traces!==null?l.traces[0]:0];else if(l.type==="layout")s=a._fullLayout;else return!1;return o=v.nestedProperty(s,l.prop).get(),u=i[l.type]=i[l.type]||{},u.hasOwnProperty(l.prop)&&u[l.prop]!==o&&(d=!0),u[l.prop]=o,{changed:d,value:o}}te.executeAPICommand=function(a,l,i){if(l==="skip")return Promise.resolve();var s=Z.apiMethodRegistry[l],o=[a];Array.isArray(i)||(i=[]);for(var u=0;u<i.length;u++)o.push(i[u]);return s.apply(null,o).catch(function(d){return v.warn("API call to Plotly."+l+" rejected.",d),Promise.reject(d)})},te.computeAPICommandBindings=function(a,l,i){var s;switch(Array.isArray(i)||(i=[]),l){case"restyle":s=t(a,i);break;case"relayout":s=P(a,i);break;case"update":s=t(a,[i[0],i[2]]).concat(P(a,[i[1]]));break;case"animate":s=C(a,i);break;default:s=[]}return s};function C(a,l){return Array.isArray(l[0])&&l[0].length===1&&["string","number"].indexOf(typeof l[0][0])!==-1?[{type:"layout",prop:"_currentFrame",value:l[0][0].toString()}]:[]}function P(a,l){var i=[],s=l[0],o={};if(typeof s=="string")o[s]=l[1];else if(v.isPlainObject(s))o=s;else return i;return r(o,function(u,d,h){i.push({type:"layout",prop:u,value:h})},"",0),i}function t(a,l){var i,s,o,u,d=[];if(s=l[0],o=l[1],i=l[2],u={},typeof s=="string")u[s]=o;else if(v.isPlainObject(s))u=s,i===void 0&&(i=o);else return d;return i===void 0&&(i=null),r(u,function(h,g,m){var E,c;if(Array.isArray(m)){c=m.slice();var _=Math.min(c.length,a.data.length);i&&(_=Math.min(_,i.length)),E=[];for(var T=0;T<_;T++)E[T]=i?i[T]:T}else c=m,E=i?i.slice():null;if(E===null)Array.isArray(c)&&(c=c[0]);else if(Array.isArray(E)){if(!Array.isArray(c)){var M=c;c=[];for(var k=0;k<E.length;k++)c[k]=M}c.length=Math.min(E.length,c.length)}d.push({type:"data",prop:h,traces:E,value:c})},"",0),d}function r(a,l,i,s){Object.keys(a).forEach(function(o){var u=a[o];if(o[0]!=="_"){var d=i+(s>0?".":"")+o;v.isPlainObject(u)?r(u,l,d,s+1):l(d,o,u)}})}}}),ff=Ne({"src/plots/plots.js"(te,Z){var v=xn(),w=On().timeFormatLocale,C=qn().formatLocale,P=Fn(),t=ea(),r=Yo(),a=B1(),l=Cu(),i=In(),s=Ha(),o=da().BADNUM,u=Wf(),d=xg().clearOutline,h=bg(),g=O1(),m=Lw(),E=lv().getModuleCalcData,c=i.relinkPrivateKeys,_=i._,T=Z.exports={};i.extendFlat(T,r),T.attributes=qo(),T.attributes.type.values=T.allTypes,T.fontAttrs=bo(),T.layoutAttributes=xx();var M=rM();T.executeAPICommand=M.executeAPICommand,T.computeAPICommandBindings=M.computeAPICommandBindings,T.manageCommandObserver=M.manageCommandObserver,T.hasSimpleAPICommandBindings=M.hasSimpleAPICommandBindings,T.redrawText=function(W){return W=i.getGraphDiv(W),new Promise(function(ie){setTimeout(function(){W._fullLayout&&(r.getComponentMethod("annotations","draw")(W),r.getComponentMethod("legend","draw")(W),r.getComponentMethod("colorbar","draw")(W),ie(T.previousPromises(W)))},300)})},T.resize=function(W){W=i.getGraphDiv(W);var ie,se=new Promise(function(ee,pe){(!W||i.isHidden(W))&&pe(new Error("Resize must be passed a displayed plot div element.")),W._redrawTimer&&clearTimeout(W._redrawTimer),W._resolveResize&&(ie=W._resolveResize),W._resolveResize=ee,W._redrawTimer=setTimeout(function(){if(!W.layout||W.layout.width&&W.layout.height||i.isHidden(W)){ee(W);return}delete W.layout.width,delete W.layout.height;var oe=W.changed;W.autoplay=!0,r.call("relayout",W,{autosize:!0}).then(function(){W.changed=oe,W._resolveResize===ee&&(delete W._resolveResize,ee(W))})},100)});return ie&&ie(se),se},T.previousPromises=function(W){if((W._promises||[]).length)return Promise.all(W._promises).then(function(){W._promises=[]})},T.addLinks=function(W){if(!(!W._context.showLink&&!W._context.showSources)){var ie=W._fullLayout,se=i.ensureSingle(ie._paper,"text","js-plot-link-container",function(ue){ue.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:s.defaultLine,"pointer-events":"all"}).each(function(){var _e=v.select(this);_e.append("tspan").classed("js-link-to-tool",!0),_e.append("tspan").classed("js-link-spacer",!0),_e.append("tspan").classed("js-sourcelinks",!0)})}),ee=se.node(),pe={y:ie._paper.attr("height")-9};document.body.contains(ee)&&ee.getComputedTextLength()>=ie.width-20?(pe["text-anchor"]="start",pe.x=5):(pe["text-anchor"]="end",pe.x=ie._paper.attr("width")-7),se.attr(pe);var oe=se.select(".js-link-to-tool"),Y=se.select(".js-link-spacer"),ce=se.select(".js-sourcelinks");W._context.showSources&&W._context.showSources(W),W._context.showLink&&k(W,oe),Y.text(oe.text()&&ce.text()?" - ":"")}};function k(W,ie){ie.text("");var se=ie.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(W._context.linkText+" »");if(W._context.sendData)se.on("click",function(){T.sendDataToCloud(W)});else{var ee=window.location.pathname.split("/"),pe=window.location.search;se.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+ee[2].split(".")[0]+"/"+ee[1]+pe})}}T.sendDataToCloud=function(W){var ie=(window.PLOTLYENV||{}).BASE_URL||W._context.plotlyServerURL;if(ie){W.emit("plotly_beforeexport");var se=v.select(W).append("div").attr("id","hiddenform").style("display","none"),ee=se.append("form").attr({action:ie+"/external",method:"post",target:"_blank"}),pe=ee.append("input").attr({type:"text",name:"data"});return pe.node().value=T.graphJson(W,!1,"keepdata"),ee.node().submit(),se.remove(),W.emit("plotly_afterexport"),!1}};var b=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],A=["year","month","dayMonth","dayMonthYear"];T.supplyDefaults=function(W,ie){var se=ie&&ie.skipUpdateCalc,ee=W._fullLayout||{};if(ee._skipDefaults){delete ee._skipDefaults;return}var pe=W._fullLayout={},oe=W.layout||{},Y=W._fullData||[],ce=W._fullData=[],ue=W.data||[],_e=W.calcdata||[],Le=W._context||{},ze;W._transitionData||T.createTransitionData(W),pe._dfltTitle={plot:_(W,"Click to enter Plot title"),subtitle:_(W,"Click to enter Plot subtitle"),x:_(W,"Click to enter X axis title"),y:_(W,"Click to enter Y axis title"),colorbar:_(W,"Click to enter Colorscale title"),annotation:_(W,"new text")},pe._traceWord=_(W,"trace");var Xe=p(W,b);if(pe._mapboxAccessToken=Le.mapboxAccessToken,ee._initialAutoSizeIsDone){var Ve=ee.width,rt=ee.height;T.supplyLayoutGlobalDefaults(oe,pe,Xe),oe.width||(pe.width=Ve),oe.height||(pe.height=rt),T.sanitizeMargins(pe)}else{T.supplyLayoutGlobalDefaults(oe,pe,Xe);var mt=!oe.width||!oe.height,_t=pe.autosize,vt=Le.autosizable,ut=mt&&(_t||vt);ut?T.plotAutoSize(W,oe,pe):mt&&T.sanitizeMargins(pe),!_t&&mt&&(oe.width=pe.width,oe.height=pe.height)}pe._d3locale=x(Xe,pe.separators),pe._extraFormat=p(W,A),pe._initialAutoSizeIsDone=!0,pe._dataLength=ue.length,pe._modules=[],pe._visibleModules=[],pe._basePlotModules=[];var Fe=pe._subplots=f(),Pe=pe._splomAxes={x:{},y:{}},be=pe._splomSubplots={};pe._splomGridDflt={},pe._scatterStackOpts={},pe._firstScatter={},pe._alignmentOpts={},pe._colorAxes={},pe._requestRangeslider={},pe._traceUids=y(Y,ue),T.supplyDataDefaults(ue,ce,oe,pe);var Ye=Object.keys(Pe.x),yt=Object.keys(Pe.y);if(Ye.length>1&&yt.length>1){for(r.getComponentMethod("grid","sizeDefaults")(oe,pe),ze=0;ze<Ye.length;ze++)i.pushUnique(Fe.xaxis,Ye[ze]);for(ze=0;ze<yt.length;ze++)i.pushUnique(Fe.yaxis,yt[ze]);for(var wt in be)i.pushUnique(Fe.cartesian,wt)}if(pe._has=T._hasPlotType.bind(pe),Y.length===ce.length)for(ze=0;ze<ce.length;ze++)c(ce[ze],Y[ze]);T.supplyLayoutModuleDefaults(oe,pe,ce,W._transitionData);var ht=pe._visibleModules,Yt=[];for(ze=0;ze<ht.length;ze++){var $t=ht[ze].crossTraceDefaults;$t&&i.pushUnique(Yt,$t)}for(ze=0;ze<Yt.length;ze++)Yt[ze](ce,pe);pe._hasOnlyLargeSploms=pe._basePlotModules.length===1&&pe._basePlotModules[0].name==="splom"&&Ye.length>15&&yt.length>15&&pe.shapes.length===0&&pe.images.length===0,T.linkSubplots(ce,pe,Y,ee),T.cleanPlot(ce,pe,Y,ee);var fr=!!(ee._has&&ee._has("cartesian")),mr=!!(pe._has&&pe._has("cartesian")),Ur=fr,jr=mr;Ur&&!jr?ee._bgLayer.remove():jr&&!Ur&&(pe._shouldCreateBgLayer=!0),ee._zoomlayer&&!W._dragging&&d({_fullLayout:ee}),N(ce,pe),c(pe,ee),r.getComponentMethod("colorscale","crossTraceDefaults")(ce,pe),pe._preGUI||(pe._preGUI={}),pe._tracePreGUI||(pe._tracePreGUI={});var fn=pe._tracePreGUI,Br={},Qr;for(Qr in fn)Br[Qr]="old";for(ze=0;ze<ce.length;ze++)Qr=ce[ze]._fullInput.uid,Br[Qr]||(fn[Qr]={}),Br[Qr]="new";for(Qr in Br)Br[Qr]==="old"&&delete fn[Qr];U(pe),r.getComponentMethod("rangeslider","makeData")(pe),!se&&_e.length===ce.length&&T.supplyDefaultsUpdateCalc(_e,ce)},T.supplyDefaultsUpdateCalc=function(W,ie){for(var se=0;se<ie.length;se++){var ee=ie[se],pe=(W[se]||[])[0];if(pe&&pe.trace){var oe=pe.trace;if(oe._hasCalcTransform){var Y=oe._arrayAttrs,ce,ue,_e;for(ce=0;ce<Y.length;ce++)ue=Y[ce],_e=i.nestedProperty(oe,ue).get().slice(),i.nestedProperty(ee,ue).set(_e)}pe.trace=ee}}};function y(W,ie){var se=ie.length,ee=[],pe,oe;for(pe=0;pe<W.length;pe++){var Y=W[pe]._fullInput;Y!==oe&&ee.push(Y),oe=Y}var ce=ee.length,ue=new Array(se),_e={};function Le(Ve,rt){ue[rt]=Ve,_e[Ve]=1}function ze(Ve,rt){if(Ve&&typeof Ve=="string"&&!_e[Ve])return Le(Ve,rt),!0}for(pe=0;pe<se;pe++){var Xe=ie[pe].uid;typeof Xe=="number"&&(Xe=String(Xe)),!ze(Xe,pe)&&(pe<ce&&ze(ee[pe].uid,pe)||Le(i.randstr(_e),pe))}return ue}function f(){var W=r.collectableSubplotTypes,ie={},se,ee;if(!W){W=[];var pe=r.subplotsRegistry;for(var oe in pe){var Y=pe[oe],ce=Y.attr;if(ce&&(W.push(oe),Array.isArray(ce)))for(ee=0;ee<ce.length;ee++)i.pushUnique(W,ce[ee])}}for(se=0;se<W.length;se++)ie[W[se]]=[];return ie}function p(W,ie){var se=W._context.locale;se||(se="en-US");var ee=!1,pe={};function oe(ze){for(var Xe=!0,Ve=0;Ve<ie.length;Ve++){var rt=ie[Ve];pe[rt]||(ze[rt]?pe[rt]=ze[rt]:Xe=!1)}Xe&&(ee=!0)}for(var Y=0;Y<2;Y++){for(var ce=W._context.locales,ue=0;ue<2;ue++){var _e=(ce[se]||{}).format;if(_e&&(oe(_e),ee))break;ce=r.localeRegistry}var Le=se.split("-")[0];if(ee||Le===se)break;se=Le}return ee||oe(r.localeRegistry.en.format),pe}function x(W,ie){return W.decimal=ie.charAt(0),W.thousands=ie.charAt(1),{numberFormat:function(se){try{se=C(W).format(i.adjustFormat(se))}catch{return i.warnBadFormat(se),i.noFormat}return se},timeFormat:w(W).utcFormat}}function N(W,ie){var se,ee=[];ie.meta&&(se=ie._meta={meta:ie.meta,layout:{meta:ie.meta}});for(var pe=0;pe<W.length;pe++){var oe=W[pe];oe.meta?ee[oe.index]=oe._meta={meta:oe.meta}:ie.meta&&(oe._meta={meta:ie.meta}),ie.meta&&(oe._meta.layout={meta:ie.meta})}ee.length&&(se||(se=ie._meta={}),se.data=ee)}T.createTransitionData=function(W){W._transitionData||(W._transitionData={}),W._transitionData._frames||(W._transitionData._frames=[]),W._transitionData._frameHash||(W._transitionData._frameHash={}),W._transitionData._counter||(W._transitionData._counter=0),W._transitionData._interruptCallbacks||(W._transitionData._interruptCallbacks=[])},T._hasPlotType=function(W){var ie,se=this._basePlotModules||[];for(ie=0;ie<se.length;ie++)if(se[ie].name===W)return!0;var ee=this._modules||[];for(ie=0;ie<ee.length;ie++){var pe=ee[ie].name;if(pe===W)return!0;var oe=r.modules[pe];if(oe&&oe.categories[W])return!0}return!1},T.cleanPlot=function(W,ie,se,ee){var pe,oe,Y=ee._basePlotModules||[];for(pe=0;pe<Y.length;pe++){var ce=Y[pe];ce.clean&&ce.clean(W,ie,se,ee)}var ue=ee._has&&ee._has("gl"),_e=ie._has&&ie._has("gl");ue&&!_e&&ee._glcontainer!==void 0&&(ee._glcontainer.selectAll(".gl-canvas").remove(),ee._glcontainer.selectAll(".no-webgl").remove(),ee._glcanvas=null);var Le=!!ee._infolayer;e:for(pe=0;pe<se.length;pe++){var ze=se[pe],Xe=ze.uid;for(oe=0;oe<W.length;oe++){var Ve=W[oe];if(Xe===Ve.uid)continue e}Le&&ee._infolayer.select(".cb"+Xe).remove()}},T.linkSubplots=function(W,ie,se,ee){var pe,oe,Y=ee._plots||{},ce=ie._plots={},ue=ie._subplots,_e={_fullData:W,_fullLayout:ie},Le=ue.cartesian||[];for(pe=0;pe<Le.length;pe++){var ze=Le[pe],Xe=Y[ze],Ve=u.getFromId(_e,ze,"x"),rt=u.getFromId(_e,ze,"y"),mt;for(Xe?mt=ce[ze]=Xe:(mt=ce[ze]={},mt.id=ze),Ve._counterAxes.push(rt._id),rt._counterAxes.push(Ve._id),Ve._subplotsWith.push(ze),rt._subplotsWith.push(ze),mt.xaxis=Ve,mt.yaxis=rt,mt._hasClipOnAxisFalse=!1,oe=0;oe<W.length;oe++){var _t=W[oe];if(_t.xaxis===mt.xaxis._id&&_t.yaxis===mt.yaxis._id&&_t.cliponaxis===!1){mt._hasClipOnAxisFalse=!0;break}}}var vt=u.list(_e,null,!0),ut;for(pe=0;pe<vt.length;pe++){ut=vt[pe];var Fe=null;ut.overlaying&&(Fe=u.getFromId(_e,ut.overlaying),Fe&&Fe.overlaying&&(ut.overlaying=!1,Fe=null)),ut._mainAxis=Fe||ut,Fe&&(ut.domain=Fe.domain.slice()),ut._anchorAxis=ut.anchor==="free"?null:u.getFromId(_e,ut.anchor)}for(pe=0;pe<vt.length;pe++)if(ut=vt[pe],ut._counterAxes.sort(u.idSort),ut._subplotsWith.sort(i.subplotSort),ut._mainSubplot=D(ut,ie),ut._counterAxes.length&&(ut.spikemode&&ut.spikemode.indexOf("across")!==-1||ut.automargin&&ut.mirror&&ut.anchor!=="free"||r.getComponentMethod("rangeslider","isVisible")(ut))){var Pe=1,be=0;for(oe=0;oe<ut._counterAxes.length;oe++){var Ye=u.getFromId(_e,ut._counterAxes[oe]);Pe=Math.min(Pe,Ye.domain[0]),be=Math.max(be,Ye.domain[1])}Pe<be&&(ut._counterDomainMin=Pe,ut._counterDomainMax=be)}};function D(W,ie){var se={_fullLayout:ie},ee=W._id.charAt(0)==="x",pe=W._mainAxis._anchorAxis,oe="",Y="",ce="";if(pe&&(ce=pe._mainAxis._id,oe=ee?W._id+ce:ce+W._id),!oe||!ie._plots[oe]){oe="";for(var ue=W._counterAxes,_e=0;_e<ue.length;_e++){var Le=ue[_e],ze=ee?W._id+Le:Le+W._id;Y||(Y=ze);var Xe=u.getFromId(se,Le);if(ce&&Xe.overlaying===ce){oe=ze;break}}}return oe||Y}T.clearExpandedTraceDefaultColors=function(W){var ie,se,ee;function pe(Y,ce,ue,_e){se[_e]=ce,se.length=_e+1,Y.valType==="color"&&Y.dflt===void 0&&ie.push(se.join("."))}for(se=[],ie=W._module._colorAttrs,ie||(W._module._colorAttrs=ie=[],a.crawl(W._module.attributes,pe)),ee=0;ee<ie.length;ee++){var oe=i.nestedProperty(W,"_input."+ie[ee]);oe.get()||i.nestedProperty(W,ie[ee]).set(null)}},T.supplyDataDefaults=function(W,ie,se,ee){var pe=ee._modules,oe=ee._visibleModules,Y=ee._basePlotModules,ce=0,ue,_e,Le;ee._transformModules=[];function ze(vt){ie.push(vt);var ut=vt._module;ut&&(i.pushUnique(pe,ut),vt.visible===!0&&i.pushUnique(oe,ut),i.pushUnique(Y,vt._module.basePlotModule),vt._input.visible!==!1&&ce++)}var Xe={},Ve=[],rt=(se.template||{}).data||{},mt=l.traceTemplater(rt);for(ue=0;ue<W.length;ue++)Le=W[ue],_e=mt.newTrace(Le),_e.uid=ee._traceUids[ue],T.supplyTraceDefaults(Le,_e,ce,ee,ue),_e.index=ue,_e._input=Le,_e._fullInput=_e,ze(_e),r.traceIs(_e,"carpetAxis")&&(Xe[_e.carpet]=_e),r.traceIs(_e,"carpetDependent")&&Ve.push(ue);for(ue=0;ue<Ve.length;ue++)if(_e=ie[Ve[ue]],!!_e.visible){var _t=Xe[_e.carpet];if(_e._carpet=_t,!_t||!_t.visible){_e.visible=!1;continue}_e.xaxis=_t.xaxis,_e.yaxis=_t.yaxis}},T.supplyAnimationDefaults=function(W){W=W||{};var ie,se={};function ee(pe,oe){return i.coerce(W||{},se,g,pe,oe)}if(ee("mode"),ee("direction"),ee("fromcurrent"),Array.isArray(W.frame))for(se.frame=[],ie=0;ie<W.frame.length;ie++)se.frame[ie]=T.supplyAnimationFrameDefaults(W.frame[ie]||{});else se.frame=T.supplyAnimationFrameDefaults(W.frame||{});if(Array.isArray(W.transition))for(se.transition=[],ie=0;ie<W.transition.length;ie++)se.transition[ie]=T.supplyAnimationTransitionDefaults(W.transition[ie]||{});else se.transition=T.supplyAnimationTransitionDefaults(W.transition||{});return se},T.supplyAnimationFrameDefaults=function(W){var ie={};function se(ee,pe){return i.coerce(W||{},ie,g.frame,ee,pe)}return se("duration"),se("redraw"),ie},T.supplyAnimationTransitionDefaults=function(W){var ie={};function se(ee,pe){return i.coerce(W||{},ie,g.transition,ee,pe)}return se("duration"),se("easing"),ie},T.supplyFrameDefaults=function(W){var ie={};function se(ee,pe){return i.coerce(W,ie,m,ee,pe)}return se("group"),se("name"),se("traces"),se("baseframe"),se("data"),se("layout"),ie},T.supplyTraceDefaults=function(W,ie,se,ee,pe){var oe=ee.colorway||s.defaults,Y=oe[se%oe.length],ce;function ue(Fe,Pe){return i.coerce(W,ie,T.attributes,Fe,Pe)}var _e=ue("visible");ue("type"),ue("name",ee._traceWord+" "+pe),ue("uirevision",ee.uirevision);var Le=T.getModule(ie);if(ie._module=Le,Le){var ze=Le.basePlotModule,Xe=ze.attr,Ve=ze.attributes;if(Xe&&Ve){var rt=ee._subplots,mt="";if(Array.isArray(Xe))for(ce=0;ce<Xe.length;ce++){var _t=Xe[ce],vt=i.coerce(W,ie,Ve,_t);rt[_t]&&i.pushUnique(rt[_t],vt),mt+=vt}else mt=i.coerce(W,ie,Ve,Xe);rt[ze.name]&&i.pushUnique(rt[ze.name],mt)}}if(_e&&(ue("customdata"),ue("ids"),ue("meta"),r.traceIs(ie,"showLegend")?(i.coerce(W,ie,Le.attributes.showlegend?Le.attributes:T.attributes,"showlegend"),ue("legend"),ue("legendwidth"),ue("legendgroup"),ue("legendgrouptitle.text"),ue("legendrank"),ie._dfltShowLegend=!0):ie._dfltShowLegend=!1,Le&&Le.supplyDefaults(W,ie,Y,ee),r.traceIs(ie,"noOpacity")||ue("opacity"),r.traceIs(ie,"notLegendIsolatable")&&(ie.visible=!!ie.visible),r.traceIs(ie,"noHover")||(ie.hovertemplate||i.coerceHoverinfo(W,ie,ee),ie.type!=="parcats"&&r.getComponentMethod("fx","supplyDefaults")(W,ie,Y,ee)),Le&&Le.selectPoints)){var ut=ue("selectedpoints");i.isTypedArray(ut)&&(ie.selectedpoints=Array.from(ut))}return ie},T.supplyLayoutGlobalDefaults=function(W,ie,se){function ee(ze,Xe){return i.coerce(W,ie,T.layoutAttributes,ze,Xe)}var pe=W.template;i.isPlainObject(pe)&&(ie.template=pe,ie._template=pe.layout,ie._dataTemplate=pe.data),ee("autotypenumbers");var oe=i.coerceFont(ee,"font"),Y=oe.size;i.coerceFont(ee,"title.font",oe,{overrideDflt:{size:Math.round(Y*1.4)}}),ee("title.text",ie._dfltTitle.plot),ee("title.xref");var ce=ee("title.yref");ee("title.pad.t"),ee("title.pad.r"),ee("title.pad.b"),ee("title.pad.l");var ue=ee("title.automargin");ee("title.x"),ee("title.xanchor"),ee("title.y"),ee("title.yanchor"),ee("title.subtitle.text",ie._dfltTitle.subtitle),i.coerceFont(ee,"title.subtitle.font",oe,{overrideDflt:{size:Math.round(ie.title.font.size*.7)}}),ue&&(ce==="paper"&&(ie.title.y!==0&&(ie.title.y=1),ie.title.yanchor==="auto"&&(ie.title.yanchor=ie.title.y===0?"top":"bottom")),ce==="container"&&(ie.title.y==="auto"&&(ie.title.y=1),ie.title.yanchor==="auto"&&(ie.title.yanchor=ie.title.y<.5?"bottom":"top")));var _e=ee("uniformtext.mode");_e&&ee("uniformtext.minsize"),ee("autosize",!(W.width&&W.height)),ee("width"),ee("height"),ee("minreducedwidth"),ee("minreducedheight"),ee("margin.l"),ee("margin.r"),ee("margin.t"),ee("margin.b"),ee("margin.pad"),ee("margin.autoexpand"),W.width&&W.height&&T.sanitizeMargins(ie),r.getComponentMethod("grid","sizeDefaults")(W,ie),ee("paper_bgcolor"),ee("separators",se.decimal+se.thousands),ee("hidesources"),ee("colorway"),ee("datarevision");var Le=ee("uirevision");ee("editrevision",Le),ee("selectionrevision",Le),r.getComponentMethod("modebar","supplyLayoutDefaults")(W,ie),r.getComponentMethod("shapes","supplyDrawNewShapeDefaults")(W,ie,ee),r.getComponentMethod("selections","supplyDrawNewSelectionDefaults")(W,ie,ee),ee("meta"),i.isPlainObject(W.transition)&&(ee("transition.duration"),ee("transition.easing"),ee("transition.ordering")),r.getComponentMethod("calendars","handleDefaults")(W,ie,"calendar"),r.getComponentMethod("fx","supplyLayoutGlobalDefaults")(W,ie,ee),i.coerce(W,ie,h,"scattermode")};function B(W){return typeof W=="string"&&W.substr(W.length-2)==="px"&&parseFloat(W)}T.plotAutoSize=function(ie,se,ee){var pe=ie._context||{},oe=pe.frameMargins,Y,ce,ue=i.isPlotDiv(ie);if(ue&&ie.emit("plotly_autosize"),pe.fillFrame)Y=window.innerWidth,ce=window.innerHeight,document.body.style.overflow="hidden";else{var _e=ue?window.getComputedStyle(ie):{};if(Y=B(_e.width)||B(_e.maxWidth)||ee.width,ce=B(_e.height)||B(_e.maxHeight)||ee.height,P(oe)&&oe>0){var Le=1-2*oe;Y=Math.round(Le*Y),ce=Math.round(Le*ce)}}var ze=T.layoutAttributes.width.min,Xe=T.layoutAttributes.height.min;Y<ze&&(Y=ze),ce<Xe&&(ce=Xe);var Ve=!se.width&&Math.abs(ee.width-Y)>1,rt=!se.height&&Math.abs(ee.height-ce)>1;(rt||Ve)&&(Ve&&(ee.width=Y),rt&&(ee.height=ce)),ie._initialAutoSize||(ie._initialAutoSize={width:Y,height:ce}),T.sanitizeMargins(ee)},T.supplyLayoutModuleDefaults=function(W,ie,se,ee){var pe=r.componentsRegistry,oe=ie._basePlotModules,Y,ce,ue,_e=r.subplotsRegistry.cartesian;for(Y in pe)ue=pe[Y],ue.includeBasePlot&&ue.includeBasePlot(W,ie);oe.length||oe.push(_e),ie._has("cartesian")&&(r.getComponentMethod("grid","contentDefaults")(W,ie),_e.finalizeSubplots(W,ie));for(var Le in ie._subplots)ie._subplots[Le].sort(i.subplotSort);for(ce=0;ce<oe.length;ce++)ue=oe[ce],ue.supplyLayoutDefaults&&ue.supplyLayoutDefaults(W,ie,se);var ze=ie._modules;for(ce=0;ce<ze.length;ce++)ue=ze[ce],ue.supplyLayoutDefaults&&ue.supplyLayoutDefaults(W,ie,se);var Xe=ie._transformModules;for(ce=0;ce<Xe.length;ce++)ue=Xe[ce],ue.supplyLayoutDefaults&&ue.supplyLayoutDefaults(W,ie,se,ee);for(Y in pe)ue=pe[Y],ue.supplyLayoutDefaults&&ue.supplyLayoutDefaults(W,ie,se)},T.purge=function(W){var ie=W._fullLayout||{};ie._glcontainer!==void 0&&(ie._glcontainer.selectAll(".gl-canvas").remove(),ie._glcontainer.remove(),ie._glcanvas=null),ie._modeBar&&ie._modeBar.destroy(),W._transitionData&&(W._transitionData._interruptCallbacks&&(W._transitionData._interruptCallbacks.length=0),W._transitionData._animationRaf&&window.cancelAnimationFrame(W._transitionData._animationRaf)),i.clearThrottle(),i.clearResponsive(W),delete W.data,delete W.layout,delete W._fullData,delete W._fullLayout,delete W.calcdata,delete W.empty,delete W.fid,delete W.undoqueue,delete W.undonum,delete W.autoplay,delete W.changed,delete W._promises,delete W._redrawTimer,delete W._hmlumcount,delete W._hmpixcount,delete W._transitionData,delete W._transitioning,delete W._initialAutoSize,delete W._transitioningWithDuration,delete W._dragging,delete W._dragged,delete W._dragdata,delete W._hoverdata,delete W._snapshotInProgress,delete W._editing,delete W._mouseDownTime,delete W._legendMouseDownTime,W.removeAllListeners&&W.removeAllListeners()},T.style=function(W){var ie=W._fullLayout._visibleModules,se=[],ee;for(ee=0;ee<ie.length;ee++){var pe=ie[ee];pe.style&&i.pushUnique(se,pe.style)}for(ee=0;ee<se.length;ee++)se[ee](W)},T.sanitizeMargins=function(W){if(!(!W||!W.margin)){var ie=W.width,se=W.height,ee=W.margin,pe=ie-(ee.l+ee.r),oe=se-(ee.t+ee.b),Y;pe<0&&(Y=(ie-1)/(ee.l+ee.r),ee.l=Math.floor(Y*ee.l),ee.r=Math.floor(Y*ee.r)),oe<0&&(Y=(se-1)/(ee.t+ee.b),ee.t=Math.floor(Y*ee.t),ee.b=Math.floor(Y*ee.b))}},T.clearAutoMarginIds=function(W){W._fullLayout._pushmarginIds={}},T.allowAutoMargin=function(W,ie){W._fullLayout._pushmarginIds[ie]=1};function U(W){var ie=W.margin;if(!W._size){var se=W._size={l:Math.round(ie.l),r:Math.round(ie.r),t:Math.round(ie.t),b:Math.round(ie.b),p:Math.round(ie.pad)};se.w=Math.round(W.width)-se.l-se.r,se.h=Math.round(W.height)-se.t-se.b}W._pushmargin||(W._pushmargin={}),W._pushmarginIds||(W._pushmarginIds={}),W._reservedMargin||(W._reservedMargin={})}var V=2,q=2;T.autoMargin=function(W,ie,se){var ee=W._fullLayout,pe=ee.width,oe=ee.height,Y=ee.margin,ce=ee.minreducedwidth,ue=ee.minreducedheight,_e=i.constrain(pe-Y.l-Y.r,V,ce),Le=i.constrain(oe-Y.t-Y.b,q,ue),ze=Math.max(0,pe-_e),Xe=Math.max(0,oe-Le),Ve=ee._pushmargin,rt=ee._pushmarginIds;if(Y.autoexpand!==!1){if(!se)delete Ve[ie],delete rt[ie];else{var mt=se.pad;if(mt===void 0&&(mt=Math.min(12,Y.l,Y.r,Y.t,Y.b)),ze){var _t=(se.l+se.r)/ze;_t>1&&(se.l/=_t,se.r/=_t)}if(Xe){var vt=(se.t+se.b)/Xe;vt>1&&(se.t/=vt,se.b/=vt)}var ut=se.xl!==void 0?se.xl:se.x,Fe=se.xr!==void 0?se.xr:se.x,Pe=se.yt!==void 0?se.yt:se.y,be=se.yb!==void 0?se.yb:se.y;Ve[ie]={l:{val:ut,size:se.l+mt},r:{val:Fe,size:se.r+mt},b:{val:be,size:se.b+mt},t:{val:Pe,size:se.t+mt}},rt[ie]=1}if(!ee._replotting)return T.doAutoMargin(W)}};function z(W){if("_redrawFromAutoMarginCount"in W._fullLayout)return!1;var ie=u.list(W,"",!0);for(var se in ie)if(ie[se].autoshift||ie[se].shift)return!0;return!1}T.doAutoMargin=function(W){var ie=W._fullLayout,se=ie.width,ee=ie.height;ie._size||(ie._size={}),U(ie);var pe=ie._size,oe=ie.margin,Y={t:0,b:0,l:0,r:0},ce=i.extendFlat({},pe),ue=oe.l,_e=oe.r,Le=oe.t,ze=oe.b,Xe=ie._pushmargin,Ve=ie._pushmarginIds,rt=ie.minreducedwidth,mt=ie.minreducedheight;if(oe.autoexpand!==!1){for(var _t in Xe)Ve[_t]||delete Xe[_t];var vt=W._fullLayout._reservedMargin;for(var ut in vt)for(var Fe in vt[ut]){var Pe=vt[ut][Fe];Y[Fe]=Math.max(Y[Fe],Pe)}Xe.base={l:{val:0,size:ue},r:{val:1,size:_e},t:{val:1,size:Le},b:{val:0,size:ze}};for(var be in Y){var Ye=0;for(var yt in Xe)yt!=="base"&&P(Xe[yt][be].size)&&(Ye=Xe[yt][be].size>Ye?Xe[yt][be].size:Ye);var wt=Math.max(0,oe[be]-Ye);Y[be]=Math.max(0,Y[be]-wt)}for(var ht in Xe){var Yt=Xe[ht].l||{},$t=Xe[ht].b||{},fr=Yt.val,mr=Yt.size,Ur=$t.val,jr=$t.size,fn=se-Y.r-Y.l,Br=ee-Y.t-Y.b;for(var Qr in Xe){if(P(mr)&&Xe[Qr].r){var Ot=Xe[Qr].r.val,$e=Xe[Qr].r.size;if(Ot>fr){var ot=(mr*Ot+($e-fn)*fr)/(Ot-fr),De=($e*(1-fr)+(mr-fn)*(1-Ot))/(Ot-fr);ot+De>ue+_e&&(ue=ot,_e=De)}}if(P(jr)&&Xe[Qr].t){var Ee=Xe[Qr].t.val,Ae=Xe[Qr].t.size;if(Ee>Ur){var Ie=(jr*Ee+(Ae-Br)*Ur)/(Ee-Ur),tt=(Ae*(1-Ur)+(jr-Br)*(1-Ee))/(Ee-Ur);Ie+tt>ze+Le&&(ze=Ie,Le=tt)}}}}}var st=i.constrain(se-oe.l-oe.r,V,rt),Bt=i.constrain(ee-oe.t-oe.b,q,mt),Ft=Math.max(0,se-st),Wt=Math.max(0,ee-Bt);if(Ft){var lr=(ue+_e)/Ft;lr>1&&(ue/=lr,_e/=lr)}if(Wt){var Rr=(ze+Le)/Wt;Rr>1&&(ze/=Rr,Le/=Rr)}if(pe.l=Math.round(ue)+Y.l,pe.r=Math.round(_e)+Y.r,pe.t=Math.round(Le)+Y.t,pe.b=Math.round(ze)+Y.b,pe.p=Math.round(oe.pad),pe.w=Math.round(se)-pe.l-pe.r,pe.h=Math.round(ee)-pe.t-pe.b,!ie._replotting&&(T.didMarginChange(ce,pe)||z(W))){"_redrawFromAutoMarginCount"in ie?ie._redrawFromAutoMarginCount++:ie._redrawFromAutoMarginCount=1;var Mr=3*(1+Object.keys(Ve).length);if(ie._redrawFromAutoMarginCount<Mr)return r.call("_doPlot",W);ie._size=ce,i.warn("Too many auto-margin redraws.")}H(W)};function H(W){var ie=u.list(W,"",!0);["_adjustTickLabelsOverflow","_hideCounterAxisInsideTickLabels"].forEach(function(se){for(var ee=0;ee<ie.length;ee++){var pe=ie[ee][se];pe&&pe()}})}var G=["l","r","t","b","p","w","h"];T.didMarginChange=function(W,ie){for(var se=0;se<G.length;se++){var ee=G[se],pe=W[ee],oe=ie[ee];if(!P(pe)||Math.abs(oe-pe)>1)return!0}return!1},T.graphJson=function(W,ie,se,ee,pe,oe){(pe&&ie&&!W._fullData||pe&&!ie&&!W._fullLayout)&&T.supplyDefaults(W);var Y=pe?W._fullData:W.data,ce=pe?W._fullLayout:W.layout,ue=(W._transitionData||{})._frames;function _e(Xe,Ve){if(typeof Xe=="function")return Ve?"_function_":null;if(i.isPlainObject(Xe)){var rt={},mt;return Object.keys(Xe).sort().forEach(function(Fe){if(["_","["].indexOf(Fe.charAt(0))===-1){if(typeof Xe[Fe]=="function"){Ve&&(rt[Fe]="_function");return}if(se==="keepdata"){if(Fe.substr(Fe.length-3)==="src")return}else if(se==="keepstream"){if(mt=Xe[Fe+"src"],typeof mt=="string"&&mt.indexOf(":")>0&&!i.isPlainObject(Xe.stream))return}else if(se!=="keepall"&&(mt=Xe[Fe+"src"],typeof mt=="string"&&mt.indexOf(":")>0))return;rt[Fe]=_e(Xe[Fe],Ve)}}),rt}var _t=Array.isArray(Xe),vt=i.isTypedArray(Xe);if((_t||vt)&&Xe.dtype&&Xe.shape){var ut=Xe.bdata;return _e({dtype:Xe.dtype,shape:Xe.shape,bdata:i.isArrayBuffer(ut)?t.encode(ut):ut},Ve)}return _t?Xe.map(function(Fe){return _e(Fe,Ve)}):vt?i.simpleMap(Xe,i.identity):i.isJSDate(Xe)?i.ms2DateTimeLocal(+Xe):Xe}var Le={data:(Y||[]).map(function(Xe){var Ve=_e(Xe);return ie&&delete Ve.fit,Ve})};if(!ie&&(Le.layout=_e(ce),pe)){var ze=ce._size;Le.layout.computed={margin:{b:ze.b,l:ze.l,r:ze.r,t:ze.t}}}return ue&&(Le.frames=_e(ue)),oe&&(Le.config=_e(W._context,!0)),ee==="object"?Le:JSON.stringify(Le)},T.modifyFrames=function(W,ie){var se,ee,pe,oe=W._transitionData._frames,Y=W._transitionData._frameHash;for(se=0;se<ie.length;se++)switch(ee=ie[se],ee.type){case"replace":pe=ee.value;var ce=(oe[ee.index]||{}).name,ue=pe.name;oe[ee.index]=Y[ue]=pe,ue!==ce&&(delete Y[ce],Y[ue]=pe);break;case"insert":pe=ee.value,Y[pe.name]=pe,oe.splice(ee.index,0,pe);break;case"delete":pe=oe[ee.index],delete Y[pe.name],oe.splice(ee.index,1);break}return Promise.resolve()},T.computeFrame=function(W,ie){var se=W._transitionData._frameHash,ee,pe,oe,Y;if(!ie)throw new Error("computeFrame must be given a string frame name");var ce=se[ie.toString()];if(!ce)return!1;for(var ue=[ce],_e=[ce.name];ce.baseframe&&(ce=se[ce.baseframe.toString()])&&_e.indexOf(ce.name)===-1;)ue.push(ce),_e.push(ce.name);for(var Le={};ce=ue.pop();)if(ce.layout&&(Le.layout=T.extendLayout(Le.layout,ce.layout)),ce.data){if(Le.data||(Le.data=[]),pe=ce.traces,!pe)for(pe=[],ee=0;ee<ce.data.length;ee++)pe[ee]=ee;for(Le.traces||(Le.traces=[]),ee=0;ee<ce.data.length;ee++)oe=pe[ee],oe!=null&&(Y=Le.traces.indexOf(oe),Y===-1&&(Y=Le.data.length,Le.traces[Y]=oe),Le.data[Y]=T.extendTrace(Le.data[Y],ce.data[ee]))}return Le},T.recomputeFrameHash=function(W){for(var ie=W._transitionData._frameHash={},se=W._transitionData._frames,ee=0;ee<se.length;ee++){var pe=se[ee];pe&&pe.name&&(ie[pe.name]=pe)}},T.extendObjectWithContainers=function(W,ie,se){var ee,pe,oe,Y,ce,ue,_e,Le,ze=i.extendDeepNoArrays({},ie||{}),Xe=i.expandObjectPaths(ze),Ve={};if(se&&se.length)for(oe=0;oe<se.length;oe++)ee=i.nestedProperty(Xe,se[oe]),pe=ee.get(),pe===void 0?i.nestedProperty(Ve,se[oe]).set(null):(ee.set(null),i.nestedProperty(Ve,se[oe]).set(pe));if(W=i.extendDeepNoArrays(W||{},Xe),se&&se.length){for(oe=0;oe<se.length;oe++)if(ce=i.nestedProperty(Ve,se[oe]),_e=ce.get(),!!_e){for(ue=i.nestedProperty(W,se[oe]),Le=ue.get(),Array.isArray(Le)||(Le=[],ue.set(Le)),Y=0;Y<_e.length;Y++){var rt=_e[Y];rt===null?Le[Y]=null:Le[Y]=T.extendObjectWithContainers(Le[Y],rt)}ue.set(Le)}}return W},T.dataArrayContainers=["transforms","dimensions"],T.layoutArrayContainers=r.layoutArrayContainers,T.extendTrace=function(W,ie){return T.extendObjectWithContainers(W,ie,T.dataArrayContainers)},T.extendLayout=function(W,ie){return T.extendObjectWithContainers(W,ie,T.layoutArrayContainers)},T.transition=function(W,ie,se,ee,pe,oe){var Y={redraw:pe.redraw},ce={},ue=[];return Y.prepareFn=function(){for(var _e=Array.isArray(ie)?ie.length:0,Le=ee.slice(0,_e),ze=0;ze<Le.length;ze++){var Xe=Le[ze],Ve=W._fullData[Xe],rt=Ve._module;if(rt){if(rt.animatable){var mt=rt.basePlotModule.name;ce[mt]||(ce[mt]=[]),ce[mt].push(Xe)}W.data[Le[ze]]=T.extendTrace(W.data[Le[ze]],ie[ze])}}var _t=i.expandObjectPaths(i.extendDeepNoArrays({},se)),vt=/^[xy]axis[0-9]*$/;for(var ut in _t)vt.test(ut)&&delete _t[ut].range;T.extendLayout(W.layout,_t),delete W.calcdata,T.supplyDefaults(W),T.doCalcdata(W);var Fe=i.expandObjectPaths(se);if(Fe){var Pe=W._fullLayout._plots;for(var be in Pe){var Ye=Pe[be],yt=Ye.xaxis,wt=Ye.yaxis,ht=yt.range.slice(),Yt=wt.range.slice(),$t=null,fr=null,mr=null,Ur=null;Array.isArray(Fe[yt._name+".range"])?$t=Fe[yt._name+".range"].slice():Array.isArray((Fe[yt._name]||{}).range)&&($t=Fe[yt._name].range.slice()),Array.isArray(Fe[wt._name+".range"])?fr=Fe[wt._name+".range"].slice():Array.isArray((Fe[wt._name]||{}).range)&&(fr=Fe[wt._name].range.slice()),ht&&$t&&(yt.r2l(ht[0])!==yt.r2l($t[0])||yt.r2l(ht[1])!==yt.r2l($t[1]))&&(mr={xr0:ht,xr1:$t}),Yt&&fr&&(wt.r2l(Yt[0])!==wt.r2l(fr[0])||wt.r2l(Yt[1])!==wt.r2l(fr[1]))&&(Ur={yr0:Yt,yr1:fr}),(mr||Ur)&&ue.push(i.extendFlat({plotinfo:Ye},mr,Ur))}}return Promise.resolve()},Y.runFn=function(_e){var Le,ze=W._fullLayout._basePlotModules,Xe=ue.length,Ve;if(se)for(Ve=0;Ve<ze.length;Ve++)ze[Ve].transitionAxes&&ze[Ve].transitionAxes(W,ue,oe,_e);Xe?(Le=i.extendFlat({},oe),Le.duration=0,delete ce.cartesian):Le=oe;for(var rt in ce){var mt=ce[rt],_t=W._fullData[mt[0]]._module;_t.basePlotModule.plot(W,mt,Le,_e)}},J(W,oe,Y)},T.transitionFromReact=function(W,ie,se,ee){var pe=W._fullLayout,oe=pe.transition,Y={},ce=[];return Y.prepareFn=function(){var ue=pe._plots;Y.redraw=!1,ie.anim==="some"&&(Y.redraw=!0),se.anim==="some"&&(Y.redraw=!0);for(var _e in ue){var Le=ue[_e],ze=Le.xaxis,Xe=Le.yaxis,Ve=ee[ze._name].range.slice(),rt=ee[Xe._name].range.slice(),mt=ze.range.slice(),_t=Xe.range.slice();ze.setScale(),Xe.setScale();var vt=null,ut=null;(ze.r2l(Ve[0])!==ze.r2l(mt[0])||ze.r2l(Ve[1])!==ze.r2l(mt[1]))&&(vt={xr0:Ve,xr1:mt}),(Xe.r2l(rt[0])!==Xe.r2l(_t[0])||Xe.r2l(rt[1])!==Xe.r2l(_t[1]))&&(ut={yr0:rt,yr1:_t}),(vt||ut)&&ce.push(i.extendFlat({plotinfo:Le},vt,ut))}return Promise.resolve()},Y.runFn=function(ue){for(var _e=W._fullData,Le=W._fullLayout,ze=Le._basePlotModules,Xe,Ve,rt,mt=[],_t=0;_t<_e.length;_t++)mt.push(_t);function vt(){if(W._fullLayout)for(var Fe=0;Fe<ze.length;Fe++)ze[Fe].transitionAxes&&ze[Fe].transitionAxes(W,ce,Xe,ue)}function ut(){if(W._fullLayout)for(var Fe=0;Fe<ze.length;Fe++)ze[Fe].plot(W,rt,Ve,ue)}ce.length&&ie.anim?oe.ordering==="traces first"?(Xe=i.extendFlat({},oe,{duration:0}),rt=mt,Ve=oe,setTimeout(vt,oe.duration),ut()):(Xe=oe,rt=null,Ve=i.extendFlat({},oe,{duration:0}),setTimeout(ut,Xe.duration),vt()):ce.length?(Xe=oe,vt()):ie.anim&&(rt=mt,Ve=oe,ut())},J(W,oe,Y)};function J(W,ie,se){var ee=!1;function pe(ze){var Xe=Promise.resolve();if(!ze)return Xe;for(;ze.length;)Xe=Xe.then(ze.shift());return Xe}function oe(ze){if(ze)for(;ze.length;)ze.shift()}function Y(){return W.emit("plotly_transitioning",[]),new Promise(function(ze){W._transitioning=!0,ie.duration>0&&(W._transitioningWithDuration=!0),W._transitionData._interruptCallbacks.push(function(){ee=!0}),se.redraw&&W._transitionData._interruptCallbacks.push(function(){return r.call("redraw",W)}),W._transitionData._interruptCallbacks.push(function(){W.emit("plotly_transitioninterrupted",[])});var Xe=0,Ve=0;function rt(){return Xe++,function(){Ve++,!ee&&Ve===Xe&&ce(ze)}}se.runFn(rt),setTimeout(rt())})}function ce(ze){if(W._transitionData)return oe(W._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(se.redraw)return r.call("redraw",W)}).then(function(){W._transitioning=!1,W._transitioningWithDuration=!1,W.emit("plotly_transitioned",[])}).then(ze)}function ue(){if(W._transitionData)return W._transitioning=!1,pe(W._transitionData._interruptCallbacks)}var _e=[T.previousPromises,ue,se.prepareFn,T.rehover,T.reselect,Y],Le=i.syncOrAsync(_e,W);return(!Le||!Le.then)&&(Le=Promise.resolve()),Le.then(function(){return W})}T.doCalcdata=function(W,ie){var se=u.list(W),ee=W._fullData,pe=W._fullLayout,oe,Y,ce,ue,_e=new Array(ee.length),Le=(W.calcdata||[]).slice();for(W.calcdata=_e,pe._numBoxes=0,pe._numViolins=0,pe._violinScaleGroupStats={},W._hmpixcount=0,W._hmlumcount=0,pe._piecolormap={},pe._sunburstcolormap={},pe._treemapcolormap={},pe._iciclecolormap={},pe._funnelareacolormap={},ce=0;ce<ee.length;ce++)if(Array.isArray(ie)&&ie.indexOf(ce)===-1){_e[ce]=Le[ce];continue}for(ce=0;ce<ee.length;ce++)oe=ee[ce],oe._arrayAttrs=a.findArrayAttributes(oe),oe._extremes={};var ze=pe._subplots.polar||[];for(ce=0;ce<ze.length;ce++)se.push(pe[ze[ce]].radialaxis,pe[ze[ce]].angularaxis);for(var Xe in pe._colorAxes){var Ve=pe[Xe];Ve.cauto!==!1&&(delete Ve.cmin,delete Ve.cmax)}var rt=!1;function mt(ut){if(oe=ee[ut],Y=oe._module,oe.visible===!0&&oe.transforms){if(Y&&Y.calc){var Fe=Y.calc(W,oe);Fe[0]&&Fe[0].t&&Fe[0].t._scene&&delete Fe[0].t._scene.dirty}for(ue=0;ue<oe.transforms.length;ue++){var Pe=oe.transforms[ue];Y=transformsRegistry[Pe.type],Y&&Y.calcTransform&&(oe._hasCalcTransform=!0,rt=!0,Y.calcTransform(W,oe,Pe))}}}function _t(ut,Fe){if(oe=ee[ut],Y=oe._module,!!Y.isContainer===Fe){var Pe=[];if(oe.visible===!0&&oe._length!==0){delete oe._indexToPoints;var be=oe.transforms||[];for(ue=be.length-1;ue>=0;ue--)if(be[ue].enabled){oe._indexToPoints=be[ue]._indexToPoints;break}Y&&Y.calc&&(Pe=Y.calc(W,oe))}(!Array.isArray(Pe)||!Pe[0])&&(Pe=[{x:o,y:o}]),Pe[0].t||(Pe[0].t={}),Pe[0].trace=oe,_e[ut]=Pe}}for(de(se,ee,pe),ce=0;ce<ee.length;ce++)_t(ce,!0);for(ce=0;ce<ee.length;ce++)mt(ce);for(rt&&de(se,ee,pe),ce=0;ce<ee.length;ce++)_t(ce,!0);for(ce=0;ce<ee.length;ce++)_t(ce,!1);me(W);var vt=ge(se,W);if(vt.length){for(pe._numBoxes=0,pe._numViolins=0,ce=0;ce<vt.length;ce++)_t(vt[ce],!0);for(ce=0;ce<vt.length;ce++)_t(vt[ce],!1);me(W)}r.getComponentMethod("fx","calc")(W),r.getComponentMethod("errorbars","calc")(W)};var le=/(total|sum|min|max|mean|geometric mean|median) (ascending|descending)/;function ge(W,ie){var se=[],ee,pe,oe,Y,ce;function ue(Qr,Ot,$e){var ot=Ot._id.charAt(0);if(Qr==="histogram2dcontour"){var De=Ot._counterAxes[0],Ee=u.getFromId(ie,De),Ae=ot==="x"||De==="x"&&Ee.type==="category",Ie=ot==="y"||De==="y"&&Ee.type==="category";return function(tt,st){return tt===0||st===0||Ae&&tt===$e[st].length-1||Ie&&st===$e.length-1?-1:(ot==="y"?st:tt)-1}}else return function(tt,st){return ot==="y"?st:tt}}var _e={min:function(Qr){return i.aggNums(Math.min,null,Qr)},max:function(Qr){return i.aggNums(Math.max,null,Qr)},sum:function(Qr){return i.aggNums(function(Ot,$e){return Ot+$e},null,Qr)},total:function(Qr){return i.aggNums(function(Ot,$e){return Ot+$e},null,Qr)},mean:function(Qr){return i.mean(Qr)},"geometric mean":function(Qr){return i.geometricMean(Qr)},median:function(Qr){return i.median(Qr)}};function Le(Qr,Ot){return Qr[1]-Ot[1]}function ze(Qr,Ot){return Ot[1]-Qr[1]}for(ee=0;ee<W.length;ee++){var Xe=W[ee];if(Xe.type==="category"){var Ve=Xe.categoryorder.match(le);if(Ve){var rt=Ve[1],mt=Ve[2],_t=Xe._id.charAt(0),vt=_t==="x",ut=[];for(pe=0;pe<Xe._categories.length;pe++)ut.push([Xe._categories[pe],[]]);for(pe=0;pe<Xe._traceIndices.length;pe++){var Fe=Xe._traceIndices[pe],Pe=ie._fullData[Fe];if(Pe.visible===!0){var be=Pe.type;r.traceIs(Pe,"histogram")&&(delete Pe._xautoBinFinished,delete Pe._yautoBinFinished);var Ye=be==="splom",yt=be==="scattergl",wt=ie.calcdata[Fe];for(oe=0;oe<wt.length;oe++){var ht=wt[oe],Yt,$t;if(Ye){var fr=Pe._axesDim[Xe._id];if(!vt){var mr=Pe._diag[fr][0];mr&&(Xe=ie._fullLayout[u.id2name(mr)])}var Ur=ht.trace.dimensions[fr].values;for(Y=0;Y<Ur.length;Y++)for(Yt=Xe._categoriesMap[Ur[Y]],ce=0;ce<ht.trace.dimensions.length;ce++)if(ce!==fr){var jr=ht.trace.dimensions[ce];ut[Yt][1].push(jr.values[Y])}}else if(yt){for(Y=0;Y<ht.t.x.length;Y++)vt?(Yt=ht.t.x[Y],$t=ht.t.y[Y]):(Yt=ht.t.y[Y],$t=ht.t.x[Y]),ut[Yt][1].push($t);ht.t&&ht.t._scene&&delete ht.t._scene.dirty}else if(ht.hasOwnProperty("z")){$t=ht.z;var fn=ue(Pe.type,Xe,$t);for(Y=0;Y<$t.length;Y++)for(ce=0;ce<$t[Y].length;ce++)Yt=fn(ce,Y),Yt+1&&ut[Yt][1].push($t[Y][ce])}else for(Yt=ht.p,Yt===void 0&&(Yt=ht[_t]),$t=ht.s,$t===void 0&&($t=ht.v),$t===void 0&&($t=vt?ht.y:ht.x),Array.isArray($t)||($t===void 0?$t=[]:$t=[$t]),Y=0;Y<$t.length;Y++)ut[Yt][1].push($t[Y])}}}Xe._categoriesValue=ut;var Br=[];for(pe=0;pe<ut.length;pe++)Br.push([ut[pe][0],_e[rt](ut[pe][1])]);Br.sort(mt==="descending"?ze:Le),Xe._categoriesAggregatedValue=Br,Xe._initialCategories=Br.map(function(Qr){return Qr[0]}),se=se.concat(Xe.sortByInitialCategories())}}}return se}function de(W,ie,se){var ee={};function pe(ue){ue.clearCalc(),ue.type==="multicategory"&&ue.setupMultiCategory(ie),ee[ue._id]=1}i.simpleMap(W,pe);for(var oe=se._axisMatchGroups||[],Y=0;Y<oe.length;Y++)for(var ce in oe[Y])ee[ce]||pe(se[u.id2name(ce)])}function me(W){var ie=W._fullLayout,se=ie._visibleModules,ee={},pe,oe,Y;for(oe=0;oe<se.length;oe++){var ce=se[oe],ue=ce.crossTraceCalc;if(ue){var _e=ce.basePlotModule.name;ee[_e]?i.pushUnique(ee[_e],ue):ee[_e]=[ue]}}for(Y in ee){var Le=ee[Y],ze=ie._subplots[Y];if(Array.isArray(ze))for(pe=0;pe<ze.length;pe++){var Xe=ze[pe],Ve=Y==="cartesian"?ie._plots[Xe]:ie[Xe];for(oe=0;oe<Le.length;oe++)Le[oe](W,Ve,Xe)}else for(oe=0;oe<Le.length;oe++)Le[oe](W)}}T.rehover=function(W){W._fullLayout._rehover&&W._fullLayout._rehover()},T.redrag=function(W){W._fullLayout._redrag&&W._fullLayout._redrag()},T.reselect=function(W){var ie=W._fullLayout,se=(W.layout||{}).selections,ee=ie._previousSelections;ie._previousSelections=se;var pe=ie._reselect||JSON.stringify(se)!==JSON.stringify(ee);r.getComponentMethod("selections","reselect")(W,pe)},T.generalUpdatePerTraceModule=function(W,ie,se,ee){var pe=ie.traceHash,oe={},Y;for(Y=0;Y<se.length;Y++){var ce=se[Y],ue=ce[0].trace;ue.visible&&(oe[ue.type]=oe[ue.type]||[],oe[ue.type].push(ce))}for(var _e in pe)if(!oe[_e]){var Le=pe[_e][0],ze=Le[0].trace;ze.visible=!1,oe[_e]=[Le]}for(var Xe in oe){var Ve=oe[Xe],rt=Ve[0][0].trace._module;rt.plot(W,ie,i.filterVisible(Ve),ee)}ie.traceHash=oe},T.plotBasePlot=function(W,ie,se,ee,pe){var oe=r.getModule(W),Y=E(ie.calcdata,oe)[0];oe.plot(ie,Y,ee,pe)},T.cleanBasePlot=function(W,ie,se,ee,pe){var oe=pe._has&&pe._has(W),Y=se._has&&se._has(W);oe&&!Y&&pe["_"+W+"layer"].selectAll("g.trace").remove()}}}),hp=Ne({"src/constants/xmlns_namespaces.js"(te){te.xmlns="http://www.w3.org/2000/xmlns/",te.svg="http://www.w3.org/2000/svg",te.xlink="http://www.w3.org/1999/xlink",te.svgAttrs={xmlns:te.svg,"xmlns:xlink":te.xlink}}}),Ad=Ne({"src/constants/alignment.js"(te,Z){Z.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"}}}}),hc=Ne({"src/lib/svg_text_utils.js"(te){var Z=xn(),v=In(),w=v.strTranslate,C=hp(),P=Ad().LINE_SPACING,t=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;te.convertToTspans=function(q,z,H){var G=q.text(),J=!q.attr("data-notex")&&z&&z._context.typesetMath&&typeof MathJax<"u"&&G.match(t),le=Z.select(q.node().parentNode);if(le.empty())return;var ge=q.attr("class")?q.attr("class").split(" ")[0]:"text";ge+="-math",le.selectAll("svg."+ge).remove(),le.selectAll("g."+ge+"-group").remove(),q.style("display",null).attr({"data-unformatted":G,"data-math":"N"});function de(){le.empty()||(ge=q.attr("class")+"-math",le.select("svg."+ge).remove()),q.text("").style("white-space","pre");var me=D(q.node(),G);me&&q.style("pointer-events","all"),te.positionText(q),H&&H.call(q)}return J?(z&&z._promises||[]).push(new Promise(function(me){q.style("display","none");var W=parseInt(q.node().style.fontSize,10),ie={fontSize:W};s(J[2],ie,function(se,ee,pe){le.selectAll("svg."+ge).remove(),le.selectAll("g."+ge+"-group").remove();var oe=se&&se.select("svg");if(!oe||!oe.node()){de(),me();return}var Y=le.append("g").classed(ge+"-group",!0).attr({"pointer-events":"none","data-unformatted":G,"data-math":"Y"});Y.node().appendChild(oe.node()),ee&&ee.node()&&oe.node().insertBefore(ee.node().cloneNode(!0),oe.node().firstChild);var ce=pe.width,ue=pe.height;oe.attr({class:ge,height:ue,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var _e=q.node().style.fill||"black",Le=oe.select("g");Le.attr({fill:_e,stroke:_e});var ze=Le.node().getBoundingClientRect(),Xe=ze.width,Ve=ze.height;(Xe>ce||Ve>ue)&&(oe.style("overflow","hidden"),ze=oe.node().getBoundingClientRect(),Xe=ze.width,Ve=ze.height);var rt=+q.attr("x"),mt=+q.attr("y"),_t=W||q.node().getBoundingClientRect().height,vt=-_t/4;if(ge[0]==="y")Y.attr({transform:"rotate("+[-90,rt,mt]+")"+w(-Xe/2,vt-Ve/2)});else if(ge[0]==="l")mt=vt-Ve/2;else if(ge[0]==="a"&&ge.indexOf("atitle")!==0)rt=0,mt=vt;else{var ut=q.attr("text-anchor");rt=rt-Xe*(ut==="middle"?.5:ut==="end"?1:0),mt=mt+vt-Ve/2}oe.attr({x:rt,y:mt}),H&&H.call(q,Y),me(Y)})})):de(),q};var r=/(<|&lt;|&#60;)/g,a=/(>|&gt;|&#62;)/g;function l(q){return q.replace(r,"\\lt ").replace(a,"\\gt ")}var i=[["$","$"],["\\(","\\)"]];function s(q,z,H){var G=parseInt((MathJax.version||"").split(".")[0]);if(G!==2&&G!==3){v.warn("No MathJax version:",MathJax.version);return}var J,le,ge,de,me=function(){return le=v.extendDeepAll({},MathJax.Hub.config),ge=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:i},displayAlign:"left"})},W=function(){le=v.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=i},ie=function(){if(J=MathJax.Hub.config.menuSettings.renderer,J!=="SVG")return MathJax.Hub.setRenderer("SVG")},se=function(){J=MathJax.config.startup.output,J!=="svg"&&(MathJax.config.startup.output="svg")},ee=function(){var _e="math-output-"+v.randstr({},64);de=Z.select("body").append("div").attr({id:_e}).style({visibility:"hidden",position:"absolute","font-size":z.fontSize+"px"}).text(l(q));var Le=de.node();return G===2?MathJax.Hub.Typeset(Le):MathJax.typeset([Le])},pe=function(){var _e=de.select(G===2?".MathJax_SVG":".MathJax"),Le=!_e.empty()&&de.select("svg").node();if(!Le)v.log("There was an error in the tex syntax.",q),H();else{var ze=Le.getBoundingClientRect(),Xe;G===2?Xe=Z.select("body").select("#MathJax_SVG_glyphs"):Xe=_e.select("defs"),H(_e,Xe,ze)}de.remove()},oe=function(){if(J!=="SVG")return MathJax.Hub.setRenderer(J)},Y=function(){J!=="svg"&&(MathJax.config.startup.output=J)},ce=function(){return ge!==void 0&&(MathJax.Hub.processSectionDelay=ge),MathJax.Hub.Config(le)},ue=function(){MathJax.config=le};G===2?MathJax.Hub.Queue(me,ie,ee,pe,oe,ce):G===3&&(W(),se(),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){ee(),pe(),Y(),ue()}))}var o={sup:"font-size:70%",sub:"font-size:70%",s:"text-decoration:line-through",u:"text-decoration:underline",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},u={sub:"0.3em",sup:"-0.6em"},d={sub:"-0.21em",sup:"0.42em"},h="​",g=["http:","https:","mailto:","",void 0,":"],m=te.NEWLINES=/(\r\n?|\n)/g,E=/(<[^<>]*>)/,c=/<(\/?)([^ >]*)(\s+(.*))?>/i,_=/<br(\s+.*)?>/i;te.BR_TAG_ALL=/<br(\s+.*)?>/gi;var T=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,M=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,k=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,b=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function A(q,z){if(!q)return null;var H=q.match(z),G=H&&(H[3]||H[4]);return G&&x(G)}var y=/(^|;)\s*color:/;te.plainText=function(q,z){z=z||{};for(var H=z.len!==void 0&&z.len!==-1?z.len:1/0,G=z.allowedTags!==void 0?z.allowedTags:["br"],J="...",le=J.length,ge=q.split(E),de=[],me="",W=0,ie=0;ie<ge.length;ie++){var se=ge[ie],ee=se.match(c),pe=ee&&ee[2].toLowerCase();if(pe)G.indexOf(pe)!==-1&&(de.push(se),me=pe);else{var oe=se.length;if(W+oe<H)de.push(se),W+=oe;else if(W<H){var Y=H-W;me&&(me!=="br"||Y<=le||oe<=le)&&de.pop(),H>le?de.push(se.substr(0,Y-le)+J):de.push(se.substr(0,Y));break}me=""}}return de.join("")};var f={mu:"μ",amp:"&",lt:"<",gt:">",nbsp:" ",times:"×",plusmn:"±",deg:"°"},p=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function x(q){return q.replace(p,function(z,H){var G;return H.charAt(0)==="#"?G=N(H.charAt(1)==="x"?parseInt(H.substr(2),16):parseInt(H.substr(1),10)):G=f[H],G||z})}te.convertEntities=x;function N(q){if(!(q>1114111)){var z=String.fromCodePoint;if(z)return z(q);var H=String.fromCharCode;return q<=65535?H(q):H((q>>10)+55232,q%1024+56320)}}function D(q,z){z=z.replace(m," ");var H=!1,G=[],J,le=-1;function ge(){le++;var Ve=document.createElementNS(C.svg,"tspan");Z.select(Ve).attr({class:"line",dy:le*P+"em"}),q.appendChild(Ve),J=Ve;var rt=G;if(G=[{node:Ve}],rt.length>1)for(var mt=1;mt<rt.length;mt++)de(rt[mt])}function de(Ve){var rt=Ve.type,mt={},_t;if(rt==="a"){_t="a";var vt=Ve.target,ut=Ve.href,Fe=Ve.popup;ut&&(mt={"xlink:xlink:show":vt==="_blank"||vt.charAt(0)!=="_"?"new":"replace",target:vt,"xlink:xlink:href":ut},Fe&&(mt.onclick='window.open(this.href.baseVal,this.target.baseVal,"'+Fe+'");return false;'))}else _t="tspan";Ve.style&&(mt.style=Ve.style);var Pe=document.createElementNS(C.svg,_t);if(rt==="sup"||rt==="sub"){me(J,h),J.appendChild(Pe);var be=document.createElementNS(C.svg,"tspan");me(be,h),Z.select(be).attr("dy",d[rt]),mt.dy=u[rt],J.appendChild(Pe),J.appendChild(be)}else J.appendChild(Pe);Z.select(Pe).attr(mt),J=Ve.node=Pe,G.push(Ve)}function me(Ve,rt){Ve.appendChild(document.createTextNode(rt))}function W(Ve){if(G.length===1){v.log("Ignoring unexpected end tag </"+Ve+">.",z);return}var rt=G.pop();Ve!==rt.type&&v.log("Start tag <"+rt.type+"> doesnt match end tag <"+Ve+">. Pretending it did match.",z),J=G[G.length-1].node}var ie=_.test(z);ie?ge():(J=q,G=[{node:q}]);for(var se=z.split(E),ee=0;ee<se.length;ee++){var pe=se[ee],oe=pe.match(c),Y=oe&&oe[2].toLowerCase(),ce=o[Y];if(Y==="br")ge();else if(ce===void 0)me(J,x(pe));else if(oe[1])W(Y);else{var ue=oe[4],_e={type:Y},Le=A(ue,T);if(Le?(Le=Le.replace(y,"$1 fill:"),ce&&(Le+=";"+ce)):ce&&(Le=ce),Le&&(_e.style=Le),Y==="a"){H=!0;var ze=A(ue,M);if(ze){var Xe=B(ze);Xe&&(_e.href=Xe,_e.target=A(ue,k)||"_blank",_e.popup=A(ue,b))}}de(_e)}}return H}function B(q){var z=encodeURI(decodeURI(q)),H=document.createElement("a"),G=document.createElement("a");H.href=q,G.href=z;var J=H.protocol,le=G.protocol;return g.indexOf(J)!==-1&&g.indexOf(le)!==-1?z:""}te.sanitizeHTML=function(z){z=z.replace(m," ");for(var H=document.createElement("p"),G=H,J=[],le=z.split(E),ge=0;ge<le.length;ge++){var de=le[ge],me=de.match(c),W=me&&me[2].toLowerCase();if(W in o)if(me[1])J.length&&(G=J.pop());else{var ie=me[4],se=A(ie,T),ee=se?{style:se}:{};if(W==="a"){var pe=A(ie,M);if(pe){var oe=B(pe);if(oe){ee.href=oe;var Y=A(ie,k);Y&&(ee.target=Y)}}}var ce=document.createElement(W);G.appendChild(ce),Z.select(ce).attr(ee),G=ce,J.push(ce)}else G.appendChild(document.createTextNode(x(de)))}var ue="innerHTML";return H[ue]},te.lineCount=function(z){return z.selectAll("tspan.line").size()||1},te.positionText=function(z,H,G){return z.each(function(){var J=Z.select(this);function le(me,W){return W===void 0?(W=J.attr(me),W===null&&(J.attr(me,0),W=0)):J.attr(me,W),W}var ge=le("x",H),de=le("y",G);this.nodeName==="text"&&J.selectAll("tspan.line").attr({x:ge,y:de})})};function U(q,z,H){var G=H.horizontalAlign,J=H.verticalAlign||"top",le=q.node().getBoundingClientRect(),ge=z.node().getBoundingClientRect(),de,me,W;return J==="bottom"?me=function(){return le.bottom-de.height}:J==="middle"?me=function(){return le.top+(le.height-de.height)/2}:me=function(){return le.top},G==="right"?W=function(){return le.right-de.width}:G==="center"?W=function(){return le.left+(le.width-de.width)/2}:W=function(){return le.left},function(){de=this.node().getBoundingClientRect();var ie=W()-ge.left,se=me()-ge.top,ee=H.gd||{};if(H.gd){ee._fullLayout._calcInverseTransform(ee);var pe=v.apply3DTransform(ee._fullLayout._invTransform)(ie,se);ie=pe[0],se=pe[1]}return this.style({top:se+"px",left:ie+"px","z-index":1e3}),this}}var V="1px ";te.makeTextShadow=function(q){var z=V,H=V,G=V;return z+H+G+q+", -"+z+"-"+H+G+q+", "+z+"-"+H+G+q+", -"+z+H+G+q},te.makeEditable=function(q,z){var H=z.gd,G=z.delegate,J=Z.dispatch("edit","input","cancel"),le=G||q;if(q.style({"pointer-events":G?"none":"all"}),q.size()!==1)throw new Error("boo");function ge(){me(),q.style({opacity:0});var W=le.attr("class"),ie;W?ie="."+W.split(" ")[0]+"-math-group":ie="[class*=-math-group]",ie&&Z.select(q.node().parentNode).select(ie).style({opacity:0})}function de(W){var ie=W.node(),se=document.createRange();se.selectNodeContents(ie);var ee=window.getSelection();ee.removeAllRanges(),ee.addRange(se),ie.focus()}function me(){var W=Z.select(H),ie=W.select(".svg-container"),se=ie.append("div"),ee=q.node().style,pe=parseFloat(ee.fontSize||12),oe=z.text;oe===void 0&&(oe=q.attr("data-unformatted")),se.classed("plugin-editable editable",!0).style({position:"absolute","font-family":ee.fontFamily||"Arial","font-size":pe,color:z.fill||ee.fill||"black",opacity:1,"background-color":z.background||"transparent",outline:"#ffffff33 1px solid",margin:[-pe/8+1,0,0,-1].join("px ")+"px",padding:"0","box-sizing":"border-box"}).attr({contenteditable:!0}).text(oe).call(U(q,ie,z)).on("blur",function(){H._editing=!1,q.text(this.textContent).style({opacity:1});var Y=Z.select(this).attr("class"),ce;Y?ce="."+Y.split(" ")[0]+"-math-group":ce="[class*=-math-group]",ce&&Z.select(q.node().parentNode).select(ce).style({opacity:0});var ue=this.textContent;Z.select(this).transition().duration(0).remove(),Z.select(document).on("mouseup",null),J.edit.call(q,ue)}).on("focus",function(){var Y=this;H._editing=!0,Z.select(document).on("mouseup",function(){if(Z.event.target===Y)return!1;document.activeElement===se.node()&&se.node().blur()})}).on("keyup",function(){Z.event.which===27?(H._editing=!1,q.style({opacity:1}),Z.select(this).style({opacity:0}).on("blur",function(){return!1}).transition().remove(),J.cancel.call(q,this.textContent)):(J.input.call(q,this.textContent),Z.select(this).call(U(q,ie,z)))}).on("keydown",function(){Z.event.which===13&&this.blur()}).call(de)}return z.immediate?ge():le.on("click",ge),Z.rebind(q,J,"on")}}}),Bd=Ne({"src/components/colorscale/helpers.js"(te,Z){var v=xn(),w=to(),C=Fn(),P=In(),t=Ha(),r=Di().isValid;function a(m,E,c){var _=E?P.nestedProperty(m,E).get()||{}:m,T=_[c||"color"];T&&T._inputArray&&(T=T._inputArray);var M=!1;if(P.isArrayOrTypedArray(T)){for(var k=0;k<T.length;k++)if(C(T[k])){M=!0;break}}return P.isPlainObject(_)&&(M||_.showscale===!0||C(_.cmin)&&C(_.cmax)||r(_.colorscale)||P.isPlainObject(_.colorbar))}var l=["showscale","autocolorscale","colorscale","reversescale","colorbar"],i=["min","max","mid","auto"];function s(m){var E=m._colorAx,c=E||m,_={},T,M,k;for(M=0;M<l.length;M++)k=l[M],_[k]=c[k];if(E)for(T="c",M=0;M<i.length;M++)k=i[M],_[k]=c["c"+k];else{var b;for(M=0;M<i.length;M++){if(k=i[M],b="c"+k,b in c){_[k]=c[b];continue}b="z"+k,b in c&&(_[k]=c[b])}T=b.charAt(0)}return _._sync=function(A,y){var f=i.indexOf(A)!==-1?T+A:A;c[f]=c["_"+f]=y},_}function o(m){for(var E=s(m),c=E.min,_=E.max,T=E.reversescale?u(E.colorscale):E.colorscale,M=T.length,k=new Array(M),b=new Array(M),A=0;A<M;A++){var y=T[A];k[A]=c+y[0]*(_-c),b[A]=y[1]}return{domain:k,range:b}}function u(m){for(var E=m.length,c=new Array(E),_=E-1,T=0;_>=0;_--,T++){var M=m[_];c[T]=[1-M[0],M[1]]}return c}function d(m,E){E=E||{};for(var c=m.domain,_=m.range,T=_.length,M=new Array(T),k=0;k<T;k++){var b=w(_[k]).toRgb();M[k]=[b.r,b.g,b.b,b.a]}var A=v.scale.linear().domain(c).range(M).clamp(!0),y=E.noNumericCheck,f=E.returnArray,p;return y&&f?p=A:y?p=function(x){return g(A(x))}:f?p=function(x){return C(x)?A(x):w(x).isValid()?x:t.defaultLine}:p=function(x){return C(x)?g(A(x)):w(x).isValid()?x:t.defaultLine},p.domain=A.domain,p.range=function(){return _},p}function h(m,E){return d(o(m),E)}function g(m){var E={r:m[0],g:m[1],b:m[2],a:m[3]};return w(E).toRgbString()}Z.exports={hasColorscale:a,extractOpts:s,extractScale:o,flipScale:u,makeColorScaleFunc:d,makeColorScaleFuncFromTrace:h}}}),Ac=Ne({"src/plots/cartesian/axis_format_attributes.js"(te,Z){var v=O0(),w=v.FORMAT_LINK,C=v.DATE_FORMAT_LINK;function P(a,l){return{valType:"string",dflt:"",editType:"none",description:(l?t:r)("hover text",a)+["By default the values are formatted using "+(l?"generic number format":"`"+a+"axis.hoverformat`")+"."].join(" ")}}function t(a,l){return["Sets the "+a+" formatting rule"+(l?"for `"+l+"` ":""),"using d3 formatting mini-languages","which are very similar to those in Python. For numbers, see: "+w+"."].join(" ")}function r(a,l){return t(a,l)+[" And for dates see: "+C+".","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(" ")}Z.exports={axisHoverFormat:P,descriptionOnlyNumbers:t,descriptionWithDates:r}}}),Sd=Ne({"src/plots/cartesian/layout_attributes.js"(te,Z){var v=bo(),w=js(),C=Fd().dash,P=fi().extendFlat,t=Cu().templatedArray;Fl().templateFormatStringDescription;var r=Ac().descriptionWithDates,a=da().ONEDAY,l=wh(),i=l.HOUR_PATTERN,s=l.WEEKDAY_PATTERN,o={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0}},u=P({},o,{values:o.values.slice().concat(["sync"])});function d(y){return{valType:"integer",min:0,dflt:y?5:0,editType:"ticks"}}var h={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},g={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},m={valType:"data_array",editType:"ticks"},E={valType:"enumerated",values:["outside","inside",""],editType:"ticks"};function c(y){var f={valType:"number",min:0,editType:"ticks"};return y||(f.dflt=5),f}function _(y){var f={valType:"number",min:0,editType:"ticks"};return y||(f.dflt=1),f}var T={valType:"color",dflt:w.defaultLine,editType:"ticks"},M={valType:"color",dflt:w.lightLine,editType:"ticks"};function k(y){var f={valType:"number",min:0,editType:"ticks"};return y||(f.dflt=1),f}var b=P({},C,{editType:"ticks"}),A={valType:"boolean",editType:"ticks"};Z.exports={visible:{valType:"boolean",editType:"plot"},color:{valType:"color",dflt:w.defaultLine,editType:"ticks"},title:{text:{valType:"string",editType:"ticks"},font:v({editType:"ticks"}),standoff:{valType:"number",min:0,editType:"ticks"},editType:"ticks"},type:{valType:"enumerated",values:["-","linear","log","date","category","multicategory"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},autorange:{valType:"enumerated",values:[!0,!1,"reversed","min reversed","max reversed","min","max"],dflt:!0,editType:"axrange",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},autorangeoptions:{minallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},clipmin:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},clipmax:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},include:{valType:"any",arrayOk:!0,editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},editType:"plot"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"plot"},range:{valType:"info_array",items:[{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0},{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0}],editType:"axrange",impliedEdits:{autorange:!1},anim:!0},minallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},fixedrange:{valType:"boolean",dflt:!1,editType:"calc"},modebardisable:{valType:"flaglist",flags:["autoscale","zoominout"],extras:["none"],dflt:"none",editType:"modebar"},insiderange:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},scaleanchor:{valType:"enumerated",values:[l.idRegex.x.toString(),l.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:[l.idRegex.x.toString(),l.idRegex.y.toString()],editType:"calc"},rangebreaks:t("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,i,""],editType:"calc"},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"}},dvalue:{valType:"number",editType:"calc",min:0,dflt:a},editType:"calc"}),tickmode:u,nticks:d(),tick0:h,dtick:g,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks"},tickvals:m,ticktext:{valType:"data_array",editType:"ticks"},ticks:E,tickson:{valType:"enumerated",values:["labels","boundaries"],dflt:"labels",editType:"ticks"},ticklabelmode:{valType:"enumerated",values:["instant","period"],dflt:"instant",editType:"ticks"},ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside",editType:"calc"},ticklabeloverflow:{valType:"enumerated",values:["allow","hide past div","hide past domain"],editType:"calc"},ticklabelshift:{valType:"integer",dflt:0,editType:"ticks"},ticklabelstandoff:{valType:"integer",dflt:0,editType:"ticks"},ticklabelindex:{valType:"integer",arrayOk:!0,editType:"calc"},mirror:{valType:"enumerated",values:[!0,"ticks",!1,"all","allticks"],dflt:!1,editType:"ticks+layoutstyle"},ticklen:c(),tickwidth:_(),tickcolor:T,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:P({},C,{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:v({editType:"ticks"}),tickangle:{valType:"angle",dflt:"auto",editType:"ticks"},autotickangles:{valType:"info_array",freeLength:!0,items:{valType:"angle"},dflt:[0,30,90],editType:"ticks"},tickprefix:{valType:"string",dflt:"",editType:"ticks"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},ticksuffix:{valType:"string",dflt:"",editType:"ticks"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B","SI extended"],dflt:"B",editType:"ticks"},minexponent:{valType:"number",dflt:3,min:0,editType:"ticks"},separatethousands:{valType:"boolean",dflt:!1,editType:"ticks"},tickformat:{valType:"string",dflt:"",editType:"ticks",description:r("tick label")},tickformatstops:t("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:r("hover text")},unifiedhovertitle:{text:{valType:"string",dflt:"",editType:"none"},editType:"none"},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle"},linecolor:{valType:"color",dflt:w.defaultLine,editType:"layoutstyle"},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle"},showgrid:A,gridcolor:M,gridwidth:k(),griddash:b,zeroline:{valType:"boolean",editType:"ticks"},zerolinecolor:{valType:"color",dflt:w.defaultLine,editType:"ticks"},zerolinelayer:{valType:"enumerated",values:["above traces","below traces"],dflt:"below traces",editType:"plot"},zerolinewidth:{valType:"number",dflt:1,editType:"ticks"},showdividers:{valType:"boolean",dflt:!0,editType:"ticks"},dividercolor:{valType:"color",dflt:w.defaultLine,editType:"ticks"},dividerwidth:{valType:"number",dflt:1,editType:"ticks"},anchor:{valType:"enumerated",values:["free",l.idRegex.x.toString(),l.idRegex.y.toString()],editType:"plot"},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot"},overlaying:{valType:"enumerated",values:["free",l.idRegex.x.toString(),l.idRegex.y.toString()],editType:"plot"},minor:{tickmode:o,nticks:d("minor"),tick0:h,dtick:g,tickvals:m,ticks:E,ticklen:c("minor"),tickwidth:_("minor"),tickcolor:T,gridcolor:M,gridwidth:k("minor"),griddash:b,showgrid:A,editType:"ticks"},minorloglabels:{valType:"enumerated",values:["small digits","complete","none"],dflt:"small digits",editType:"calc"},layer:{valType:"enumerated",values:["above traces","below traces"],dflt:"above traces",editType:"plot"},domain:{valType:"info_array",items:[{valType:"number",min:0,max:1,editType:"plot"},{valType:"number",min:0,max:1,editType:"plot"}],dflt:[0,1],editType:"plot"},position:{valType:"number",min:0,max:1,dflt:0,editType:"plot"},autoshift:{valType:"boolean",dflt:!1,editType:"plot"},shift:{valType:"number",editType:"plot"},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array","total ascending","total descending","min ascending","min descending","max ascending","max descending","sum ascending","sum descending","mean ascending","mean descending","geometric mean ascending","geometric mean descending","median ascending","median descending"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},uirevision:{valType:"any",editType:"none"},editType:"calc"}}}),Tx=Ne({"src/components/colorbar/attributes.js"(te,Z){var v=Sd(),w=bo(),C=fi().extendFlat,P=ef().overrideAll;Z.exports=P({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:v.linecolor,outlinewidth:v.linewidth,bordercolor:v.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:v.minor.tickmode,nticks:v.nticks,tick0:v.tick0,dtick:v.dtick,tickvals:v.tickvals,ticktext:v.ticktext,ticks:C({},v.ticks,{dflt:""}),ticklabeloverflow:C({},v.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:v.ticklen,tickwidth:v.tickwidth,tickcolor:v.tickcolor,ticklabelstep:v.ticklabelstep,showticklabels:v.showticklabels,labelalias:v.labelalias,tickfont:w({}),tickangle:v.tickangle,tickformat:v.tickformat,tickformatstops:v.tickformatstops,tickprefix:v.tickprefix,showtickprefix:v.showtickprefix,ticksuffix:v.ticksuffix,showticksuffix:v.showticksuffix,separatethousands:v.separatethousands,exponentformat:v.exponentformat,minexponent:v.minexponent,showexponent:v.showexponent,title:{text:{valType:"string"},font:w({}),side:{valType:"enumerated",values:["right","top","bottom"]}}},"colorbars","from-root")}}),Wu=Ne({"src/components/colorscale/attributes.js"(te,Z){var v=Tx(),w=ml().counter,C=Sm(),P=Di().scales;C(P),Z.exports=function(r,a){r=r||"",a=a||{};var l=a.cLetter||"c";"onlyIfNumerical"in a&&a.onlyIfNumerical;var i="noScale"in a?a.noScale:r==="marker.line",s="showScaleDflt"in a?a.showScaleDflt:l==="z",o=typeof a.colorscaleDflt=="string"?P[a.colorscaleDflt]:null,u=a.editTypeOverride||"",d;"colorAttr"in a?(d=a.colorAttr,a.colorAttr):d={z:"z",c:"color"}[l];var h=l+"auto",g=l+"min",m=l+"max",E=l+"mid",c={};c[g]=c[m]=void 0;var _={};_[h]=!1;var T={};return d==="color"&&(T.color={valType:"color",arrayOk:!0,editType:u||"style"},a.anim&&(T.color.anim=!0)),T[h]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:c},T[g]={valType:"number",dflt:null,editType:u||"plot",impliedEdits:_},T[m]={valType:"number",dflt:null,editType:u||"plot",impliedEdits:_},T[E]={valType:"number",dflt:null,editType:"calc",impliedEdits:c},T.colorscale={valType:"colorscale",editType:"calc",dflt:o,impliedEdits:{autocolorscale:!1}},T.autocolorscale={valType:"boolean",dflt:a.autoColorDflt!==!1,editType:"calc",impliedEdits:{colorscale:void 0}},T.reversescale={valType:"boolean",dflt:!1,editType:"plot"},i||(T.showscale={valType:"boolean",dflt:s,editType:"calc"},T.colorbar=v),a.noColorAxis||(T.coloraxis={valType:"subplotid",regex:w("coloraxis"),dflt:null,editType:"calc"}),T}}}),wy=Ne({"src/components/colorscale/layout_attributes.js"(te,Z){var v=fi().extendFlat,w=Wu(),C=Di().scales;Z.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:C.Reds,editType:"calc"},sequentialminus:{valType:"colorscale",dflt:C.Blues,editType:"calc"},diverging:{valType:"colorscale",dflt:C.RdBu,editType:"calc"}},coloraxis:v({_isSubplotObj:!0,editType:"calc"},w("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}}}),tA=Ne({"src/components/colorbar/has_colorbar.js"(te,Z){var v=In();Z.exports=function(C){return v.isPlainObject(C.colorbar)}}}),Rw=Ne({"src/plots/cartesian/clean_ticks.js"(te){var Z=Fn(),v=In(),w=da(),C=w.ONEDAY,P=w.ONEWEEK;te.dtick=function(t,r){var a=r==="log",l=r==="date",i=r==="category",s=l?C:1;if(!t)return s;if(Z(t))return t=Number(t),t<=0?s:i?Math.max(1,Math.round(t)):l?Math.max(.1,t):t;if(typeof t!="string"||!(l||a))return s;var o=t.charAt(0),u=t.substr(1);return u=Z(u)?Number(u):0,u<=0||!(l&&o==="M"&&u===Math.round(u)||a&&o==="L"||a&&o==="D"&&(u===1||u===2))?s:t},te.tick0=function(t,r,a,l){if(r==="date")return v.cleanDate(t,v.dateTick0(a,l%P===0?1:0));if(!(l==="D1"||l==="D2"))return Z(t)?Number(t):0}}}),Ty=Ne({"src/plots/cartesian/tick_value_defaults.js"(te,Z){var v=Rw(),w=In().isArrayOrTypedArray,C=Ri().isTypedArraySpec,P=Ri().decodeTypedArraySpec;Z.exports=function(r,a,l,i,s){s||(s={});var o=s.isMinor,u=o?r.minor||{}:r,d=o?a.minor:a,h=o?"minor.":"";function g(b){var A=u[b];return C(A)&&(A=P(A)),A!==void 0?A:(d._template||{})[b]}var m=g("tick0"),E=g("dtick"),c=g("tickvals"),_=w(c)?"array":E?"linear":"auto",T=l(h+"tickmode",_);if(T==="auto"||T==="sync")l(h+"nticks");else if(T==="linear"){var M=d.dtick=v.dtick(E,i);d.tick0=v.tick0(m,i,a.calendar,M)}else if(i!=="multicategory"){var k=l(h+"tickvals");k===void 0?d.tickmode="auto":o||l("ticktext")}}}}),j0=Ne({"src/plots/cartesian/tick_mark_defaults.js"(te,Z){var v=In(),w=Sd();Z.exports=function(P,t,r,a){var l=a.isMinor,i=l?P.minor||{}:P,s=l?t.minor:t,o=l?w.minor:w,u=l?"minor.":"",d=v.coerce2(i,s,o,"ticklen",l?(t.ticklen||5)*.6:void 0),h=v.coerce2(i,s,o,"tickwidth",l?t.tickwidth||1:void 0),g=v.coerce2(i,s,o,"tickcolor",(l?t.tickcolor:void 0)||s.color),m=r(u+"ticks",!l&&a.outerTicks||d||h||g?"outside":"");m||(delete s.ticklen,delete s.tickwidth,delete s.tickcolor)}}}),a0=Ne({"src/plots/cartesian/show_dflt.js"(te,Z){Z.exports=function(w){var C=["showexponent","showtickprefix","showticksuffix"],P=C.filter(function(r){return w[r]!==void 0}),t=function(r){return w[r]===w[P[0]]};if(P.every(t)||P.length===1)return w[P[0]]}}}),jd=Ne({"src/plots/array_container_defaults.js"(te,Z){var v=In(),w=Cu();Z.exports=function(P,t,r){var a=r.name,l=r.inclusionAttr||"visible",i=t[a],s=v.isArrayOrTypedArray(P[a])?P[a]:[],o=t[a]=[],u=w.arrayTemplater(t,a,l),d,h;for(d=0;d<s.length;d++){var g=s[d];v.isPlainObject(g)?h=u.newItem(g):(h=u.newItem({}),h[l]=!1),h._index=d,h[l]!==!1&&r.handleItemDefaults(g,h,t,r),o.push(h)}var m=u.defaultItems();for(d=0;d<m.length;d++)h=m[d],h._index=o.length,r.handleItemDefaults({},h,t,r,{}),o.push(h);if(v.isArrayOrTypedArray(i)){var E=Math.min(i.length,o.length);for(d=0;d<E;d++)v.relinkPrivateKeys(o[d],i[d])}return o}}}),Em=Ne({"src/plots/cartesian/tick_label_defaults.js"(te,Z){var v=In(),w=Ha().contrast,C=Sd(),P=a0(),t=jd();Z.exports=function(l,i,s,o,u){u||(u={});var d=s("labelalias");v.isPlainObject(d)||delete i.labelalias;var h=P(l),g=s("showticklabels");if(g){u.noTicklabelshift||s("ticklabelshift"),u.noTicklabelstandoff||s("ticklabelstandoff");var m=u.font||{},E=i.color,c=i.ticklabelposition||"",_=c.indexOf("inside")!==-1?w(u.bgColor):E&&E!==C.color.dflt?E:m.color;if(v.coerceFont(s,"tickfont",m,{overrideDflt:{color:_}}),!u.noTicklabelstep&&o!=="multicategory"&&o!=="log"&&s("ticklabelstep"),!u.noAng){var T=s("tickangle");!u.noAutotickangles&&T==="auto"&&s("autotickangles")}if(o!=="category"){var M=s("tickformat");t(l,i,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:r}),i.tickformatstops.length||delete i.tickformatstops,!u.noExp&&!M&&o!=="date"&&(s("showexponent",h),s("exponentformat"),s("minexponent"),s("separatethousands"))}!u.noMinorloglabels&&o==="log"&&s("minorloglabels")}};function r(a,l){function i(o,u){return v.coerce(a,l,C.tickformatstops,o,u)}var s=i("enabled");s&&(i("dtickrange"),i("value"))}}}),dp=Ne({"src/plots/cartesian/prefix_suffix_defaults.js"(te,Z){var v=a0();Z.exports=function(C,P,t,r,a){a||(a={});var l=a.tickSuffixDflt,i=v(C),s=t("tickprefix");s&&t("showtickprefix",i);var o=t("ticksuffix",l);o&&t("showticksuffix",i)}}}),Iw=Ne({"src/components/colorbar/defaults.js"(te,Z){var v=In(),w=Cu(),C=Ty(),P=j0(),t=Em(),r=dp(),a=Tx();Z.exports=function(i,s,o){var u=w.newContainer(s,"colorbar"),d=i.colorbar||{};function h(z,H){return v.coerce(d,u,a,z,H)}var g=o.margin||{t:0,b:0,l:0,r:0},m=o.width-g.l-g.r,E=o.height-g.t-g.b,c=h("orientation"),_=c==="v",T=h("thicknessmode");h("thickness",T==="fraction"?30/(_?m:E):30);var M=h("lenmode");h("len",M==="fraction"?1:_?E:m);var k=h("yref"),b=h("xref"),A=k==="paper",y=b==="paper",f,p,x,N="left";_?(x="middle",N=y?"left":"right",f=y?1.02:1,p=.5):(x=A?"bottom":"top",N="center",f=.5,p=A?1.02:1),v.coerce(d,u,{x:{valType:"number",min:y?-2:0,max:y?3:1,dflt:f}},"x"),v.coerce(d,u,{y:{valType:"number",min:A?-2:0,max:A?3:1,dflt:p}},"y"),h("xanchor",N),h("xpad"),h("yanchor",x),h("ypad"),v.noneOrAll(d,u,["x","y"]),h("outlinecolor"),h("outlinewidth"),h("bordercolor"),h("borderwidth"),h("bgcolor");var D=v.coerce(d,u,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:_?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");h("ticklabeloverflow",D.indexOf("inside")!==-1?"hide past domain":"hide past div"),C(d,u,h,"linear");var B=o.font,U={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,outerTicks:!1,font:B};D.indexOf("inside")!==-1&&(U.bgColor="black"),r(d,u,h,"linear",U),t(d,u,h,"linear",U),P(d,u,h,"linear",U),h("title.text",o._dfltTitle.colorbar);var V=u.showticklabels?u.tickfont:B,q=v.extendFlat({},B,{family:V.family,size:v.bigFont(V.size)});v.coerceFont(h,"title.font",q),h("title.side",_?"top":"right")}}}),Rh=Ne({"src/components/colorscale/defaults.js"(te,Z){var v=Fn(),w=In(),C=tA(),P=Iw(),t=Di().isValid,r=Yo().traceIs;function a(l,i){var s=i.slice(0,i.length-1);return i?w.nestedProperty(l,s).get()||{}:l}Z.exports=function l(i,s,o,u,d){var h=d.prefix,g=d.cLetter,m="_module"in s,E=a(i,h),c=a(s,h),_=a(s._template||{},h)||{},T=function(){return delete i.coloraxis,delete s.coloraxis,l(i,s,o,u,d)};if(m){var M=o._colorAxes||{},k=u(h+"coloraxis");if(k){var b=r(s,"contour")&&w.nestedProperty(s,"contours.coloring").get()||"heatmap",A=M[k];A?(A[2].push(T),A[0]!==b&&(A[0]=!1,w.warn(["Ignoring coloraxis:",k,"setting","as it is linked to incompatible colorscales."].join(" ")))):M[k]=[b,s,[T]];return}}var y=E[g+"min"],f=E[g+"max"],p=v(y)&&v(f)&&y<f,x=u(h+g+"auto",!p);x?u(h+g+"mid"):(u(h+g+"min"),u(h+g+"max"));var N=E.colorscale,D=_.colorscale,B;if(N!==void 0&&(B=!t(N)),D!==void 0&&(B=!t(D)),u(h+"autocolorscale",B),u(h+"colorscale"),u(h+"reversescale"),h!=="marker.line."){var U;h&&m&&(U=C(E));var V=u(h+"showscale",U);V&&(h&&_&&(c._template=_),P(E,c,o))}}}}),nM=Ne({"src/components/colorscale/layout_defaults.js"(te,Z){var v=In(),w=Cu(),C=wy(),P=Rh();Z.exports=function(r,a){function l(m,E){return v.coerce(r,a,C,m,E)}l("colorscale.sequential"),l("colorscale.sequentialminus"),l("colorscale.diverging");var i=a._colorAxes,s,o;function u(m,E){return v.coerce(s,o,C.coloraxis,m,E)}for(var d in i){var h=i[d];if(h[0])s=r[d]||{},o=w.newContainer(a,d,"coloraxis"),o._name=d,P(s,o,a,u,{prefix:"",cLetter:"c"});else{for(var g=0;g<h[2].length;g++)h[2][g]();delete a._colorAxes[d]}}}}}),Dw=Ne({"src/components/colorscale/cross_trace_defaults.js"(te,Z){var v=In(),w=Bd().hasColorscale,C=Bd().extractOpts;Z.exports=function(t,r){function a(h,g){var m=h["_"+g];m!==void 0&&(h[g]=m)}function l(h,g){var m=g.container?v.nestedProperty(h,g.container).get():h;if(m)if(m.coloraxis)m._colorAx=r[m.coloraxis];else{var E=C(m),c=E.auto;(c||E.min===void 0)&&a(m,g.min),(c||E.max===void 0)&&a(m,g.max),E.autocolorscale&&a(m,"colorscale")}}for(var i=0;i<t.length;i++){var s=t[i],o=s._module.colorbar;if(o)if(Array.isArray(o))for(var u=0;u<o.length;u++)l(s,o[u]);else l(s,o);w(s,"marker.line")&&l(s,{container:"marker.line",min:"cmin",max:"cmax"})}for(var d in r._colorAxes)l(r[d],{min:"cmin",max:"cmax"})}}}),Ud=Ne({"src/components/colorscale/calc.js"(te,Z){var v=Fn(),w=In(),C=Bd().extractOpts;Z.exports=function(t,r,a){var l=t._fullLayout,i=a.vals,s=a.containerStr,o=s?w.nestedProperty(r,s).get():r,u=C(o),d=u.auto!==!1,h=u.min,g=u.max,m=u.mid,E=function(){return w.aggNums(Math.min,null,i)},c=function(){return w.aggNums(Math.max,null,i)};if(h===void 0?h=E():d&&(o._colorAx&&v(h)?h=Math.min(h,E()):h=E()),g===void 0?g=c():d&&(o._colorAx&&v(g)?g=Math.max(g,c()):g=c()),d&&m!==void 0&&(g-m>m-h?h=m-(g-m):g-m<m-h&&(g=m+(m-h))),h===g&&(h-=.5,g+=.5),u._sync("min",h),u._sync("max",g),u.autocolorscale){var _;h*g<0?_=l.colorscale.diverging:h>=0?_=l.colorscale.sequential:_=l.colorscale.sequentialminus,u._sync("colorscale",_)}}}}),Nc=Ne({"src/components/colorscale/index.js"(te,Z){var v=Di(),w=Bd();Z.exports={moduleType:"component",name:"colorscale",attributes:Wu(),layoutAttributes:wy(),supplyLayoutDefaults:nM(),handleDefaults:Rh(),crossTraceDefaults:Dw(),calc:Ud(),scales:v.scales,defaultScale:v.defaultScale,getScale:v.get,isValidScale:v.isValid,hasColorscale:w.hasColorscale,extractOpts:w.extractOpts,extractScale:w.extractScale,flipScale:w.flipScale,makeColorScaleFunc:w.makeColorScaleFunc,makeColorScaleFuncFromTrace:w.makeColorScaleFuncFromTrace}}}),yu=Ne({"src/traces/scatter/subtypes.js"(te,Z){var v=In(),w=Ri().isTypedArraySpec;Z.exports={hasLines:function(C){return C.visible&&C.mode&&C.mode.indexOf("lines")!==-1},hasMarkers:function(C){return C.visible&&(C.mode&&C.mode.indexOf("markers")!==-1||C.type==="splom")},hasText:function(C){return C.visible&&C.mode&&C.mode.indexOf("text")!==-1},isBubble:function(C){var P=C.marker;return v.isPlainObject(P)&&(v.isArrayOrTypedArray(P.size)||w(P.size))}}}}),Mm=Ne({"src/traces/scatter/make_bubble_size_func.js"(te,Z){var v=Fn();Z.exports=function(C,P){P||(P=2);var t=C.marker,r=t.sizeref||1,a=t.sizemin||0,l=t.sizemode==="area"?function(i){return Math.sqrt(i/r)}:function(i){return i/r};return function(i){var s=l(i/P);return v(s)&&s>0?Math.max(s,a):0}}}}),bv=Ne({"src/components/fx/helpers.js"(te){var Z=In();te.getSubplot=function(r){return r.subplot||r.xaxis+r.yaxis||r.geo},te.isTraceInSubplots=function(r,a){if(r.type==="splom"){for(var l=r.xaxes||[],i=r.yaxes||[],s=0;s<l.length;s++)for(var o=0;o<i.length;o++)if(a.indexOf(l[s]+i[o])!==-1)return!0;return!1}return a.indexOf(te.getSubplot(r))!==-1},te.flat=function(r,a){for(var l=new Array(r.length),i=0;i<r.length;i++)l[i]=a;return l},te.p2c=function(r,a){for(var l=new Array(r.length),i=0;i<r.length;i++)l[i]=r[i].p2c(a);return l},te.getDistanceFunction=function(r,a,l,i){return r==="closest"?i||te.quadrature(a,l):r.charAt(0)==="x"?a:l},te.getClosest=function(r,a,l){if(l.index!==!1)l.index>=0&&l.index<r.length?l.distance=0:l.index=!1;else for(var i=1/0,s=r.length,o=0;o<s;o++)i=a(r[o]),i<=l.distance&&(l.index=o,l.distance=i);return l},te.inbox=function(r,a,l){return r*a<0||r===0?l:1/0},te.quadrature=function(r,a){return function(l){var i=r(l),s=a(l);return Math.sqrt(i*i+s*s)}},te.makeEventData=function(r,a,l){var i="index"in r?r.index:r.pointNumber,s={data:a._input,fullData:a,curveNumber:a.index,pointNumber:i};if(a._indexToPoints){var o=a._indexToPoints[i];o.length===1?s.pointIndex=o[0]:s.pointIndices=o}else s.pointIndex=i;return a._module.eventData?s=a._module.eventData(s,r,a,l,i):("xVal"in r?s.x=r.xVal:"x"in r&&(s.x=r.x),"yVal"in r?s.y=r.yVal:"y"in r&&(s.y=r.y),r.xa&&(s.xaxis=r.xa),r.ya&&(s.yaxis=r.ya),r.zLabelVal!==void 0&&(s.z=r.zLabelVal)),te.appendArrayPointValue(s,a,i),s},te.appendArrayPointValue=function(r,a,l){var i=a._arrayAttrs;if(i)for(var s=0;s<i.length;s++){var o=i[s],u=w(o);if(r[u]===void 0){var d=Z.nestedProperty(a,o).get(),h=C(d,l);h!==void 0&&(r[u]=h)}}},te.appendArrayMultiPointValues=function(r,a,l){var i=a._arrayAttrs;if(i)for(var s=0;s<i.length;s++){var o=i[s],u=w(o);if(r[u]===void 0){for(var d=Z.nestedProperty(a,o).get(),h=new Array(l.length),g=0;g<l.length;g++)h[g]=C(d,l[g]);r[u]=h}}};var v={ids:"id",locations:"location",labels:"label",values:"value","marker.colors":"color",parents:"parent"};function w(r){return v[r]||r}function C(r,a){if(Array.isArray(a)){if(Z.isArrayOrTypedArray(r)&&Z.isArrayOrTypedArray(r[a[0]]))return r[a[0]][a[1]]}else return r[a]}var P={x:!0,y:!0},t={"x unified":!0,"y unified":!0};te.isUnifiedHover=function(r){return typeof r!="string"?!1:!!t[r]},te.isXYhover=function(r){return typeof r!="string"?!1:!!P[r]}}}),wg=Ne({"node_modules/parse-svg-path/index.js"(te,Z){Z.exports=C;var v={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},w=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function C(r){var a=[];return r.replace(w,function(l,i,s){var o=i.toLowerCase();for(s=t(s),o=="m"&&s.length>2&&(a.push([i].concat(s.splice(0,2))),o="l",i=i=="m"?"l":"L");;){if(s.length==v[o])return s.unshift(i),a.push(s);if(s.length<v[o])throw new Error("malformed path data");a.push([i].concat(s.splice(0,v[o])))}}),a}var P=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/ig;function t(r){var a=r.match(P);return a?a.map(Number):[]}}}),SL=Ne({"src/components/drawing/symbol_defs.js"(te,Z){var v=wg(),w=(function(g,m){return m?Math.round(g*(m=Math.pow(10,m)))/m:Math.round(g)}),C="M0,0Z",P=Math.sqrt(2),t=Math.sqrt(3),r=Math.PI,a=Math.cos,l=Math.sin;Z.exports={circle:{n:0,f:function(g,m,E){if(i(m))return C;var c=w(g,2),_="M"+c+",0A"+c+","+c+" 0 1,1 0,-"+c+"A"+c+","+c+" 0 0,1 "+c+",0Z";return E?h(m,E,_):_}},square:{n:1,f:function(g,m,E){if(i(m))return C;var c=w(g,2);return h(m,E,"M"+c+","+c+"H-"+c+"V-"+c+"H"+c+"Z")}},diamond:{n:2,f:function(g,m,E){if(i(m))return C;var c=w(g*1.3,2);return h(m,E,"M"+c+",0L0,"+c+"L-"+c+",0L0,-"+c+"Z")}},cross:{n:3,f:function(g,m,E){if(i(m))return C;var c=w(g*.4,2),_=w(g*1.2,2);return h(m,E,"M"+_+","+c+"H"+c+"V"+_+"H-"+c+"V"+c+"H-"+_+"V-"+c+"H-"+c+"V-"+_+"H"+c+"V-"+c+"H"+_+"Z")}},x:{n:4,f:function(g,m,E){if(i(m))return C;var c=w(g*.8/P,2),_="l"+c+","+c,T="l"+c+",-"+c,M="l-"+c+",-"+c,k="l-"+c+","+c;return h(m,E,"M0,"+c+_+T+M+T+M+k+M+k+_+k+_+"Z")}},"triangle-up":{n:5,f:function(g,m,E){if(i(m))return C;var c=w(g*2/t,2),_=w(g/2,2),T=w(g,2);return h(m,E,"M-"+c+","+_+"H"+c+"L0,-"+T+"Z")}},"triangle-down":{n:6,f:function(g,m,E){if(i(m))return C;var c=w(g*2/t,2),_=w(g/2,2),T=w(g,2);return h(m,E,"M-"+c+",-"+_+"H"+c+"L0,"+T+"Z")}},"triangle-left":{n:7,f:function(g,m,E){if(i(m))return C;var c=w(g*2/t,2),_=w(g/2,2),T=w(g,2);return h(m,E,"M"+_+",-"+c+"V"+c+"L-"+T+",0Z")}},"triangle-right":{n:8,f:function(g,m,E){if(i(m))return C;var c=w(g*2/t,2),_=w(g/2,2),T=w(g,2);return h(m,E,"M-"+_+",-"+c+"V"+c+"L"+T+",0Z")}},"triangle-ne":{n:9,f:function(g,m,E){if(i(m))return C;var c=w(g*.6,2),_=w(g*1.2,2);return h(m,E,"M-"+_+",-"+c+"H"+c+"V"+_+"Z")}},"triangle-se":{n:10,f:function(g,m,E){if(i(m))return C;var c=w(g*.6,2),_=w(g*1.2,2);return h(m,E,"M"+c+",-"+_+"V"+c+"H-"+_+"Z")}},"triangle-sw":{n:11,f:function(g,m,E){if(i(m))return C;var c=w(g*.6,2),_=w(g*1.2,2);return h(m,E,"M"+_+","+c+"H-"+c+"V-"+_+"Z")}},"triangle-nw":{n:12,f:function(g,m,E){if(i(m))return C;var c=w(g*.6,2),_=w(g*1.2,2);return h(m,E,"M-"+c+","+_+"V-"+c+"H"+_+"Z")}},pentagon:{n:13,f:function(g,m,E){if(i(m))return C;var c=w(g*.951,2),_=w(g*.588,2),T=w(-g,2),M=w(g*-.309,2),k=w(g*.809,2);return h(m,E,"M"+c+","+M+"L"+_+","+k+"H-"+_+"L-"+c+","+M+"L0,"+T+"Z")}},hexagon:{n:14,f:function(g,m,E){if(i(m))return C;var c=w(g,2),_=w(g/2,2),T=w(g*t/2,2);return h(m,E,"M"+T+",-"+_+"V"+_+"L0,"+c+"L-"+T+","+_+"V-"+_+"L0,-"+c+"Z")}},hexagon2:{n:15,f:function(g,m,E){if(i(m))return C;var c=w(g,2),_=w(g/2,2),T=w(g*t/2,2);return h(m,E,"M-"+_+","+T+"H"+_+"L"+c+",0L"+_+",-"+T+"H-"+_+"L-"+c+",0Z")}},octagon:{n:16,f:function(g,m,E){if(i(m))return C;var c=w(g*.924,2),_=w(g*.383,2);return h(m,E,"M-"+_+",-"+c+"H"+_+"L"+c+",-"+_+"V"+_+"L"+_+","+c+"H-"+_+"L-"+c+","+_+"V-"+_+"Z")}},star:{n:17,f:function(g,m,E){if(i(m))return C;var c=g*1.4,_=w(c*.225,2),T=w(c*.951,2),M=w(c*.363,2),k=w(c*.588,2),b=w(-c,2),A=w(c*-.309,2),y=w(c*.118,2),f=w(c*.809,2),p=w(c*.382,2);return h(m,E,"M"+_+","+A+"H"+T+"L"+M+","+y+"L"+k+","+f+"L0,"+p+"L-"+k+","+f+"L-"+M+","+y+"L-"+T+","+A+"H-"+_+"L0,"+b+"Z")}},hexagram:{n:18,f:function(g,m,E){if(i(m))return C;var c=w(g*.66,2),_=w(g*.38,2),T=w(g*.76,2);return h(m,E,"M-"+T+",0l-"+_+",-"+c+"h"+T+"l"+_+",-"+c+"l"+_+","+c+"h"+T+"l-"+_+","+c+"l"+_+","+c+"h-"+T+"l-"+_+","+c+"l-"+_+",-"+c+"h-"+T+"Z")}},"star-triangle-up":{n:19,f:function(g,m,E){if(i(m))return C;var c=w(g*t*.8,2),_=w(g*.8,2),T=w(g*1.6,2),M=w(g*4,2),k="A "+M+","+M+" 0 0 1 ";return h(m,E,"M-"+c+","+_+k+c+","+_+k+"0,-"+T+k+"-"+c+","+_+"Z")}},"star-triangle-down":{n:20,f:function(g,m,E){if(i(m))return C;var c=w(g*t*.8,2),_=w(g*.8,2),T=w(g*1.6,2),M=w(g*4,2),k="A "+M+","+M+" 0 0 1 ";return h(m,E,"M"+c+",-"+_+k+"-"+c+",-"+_+k+"0,"+T+k+c+",-"+_+"Z")}},"star-square":{n:21,f:function(g,m,E){if(i(m))return C;var c=w(g*1.1,2),_=w(g*2,2),T="A "+_+","+_+" 0 0 1 ";return h(m,E,"M-"+c+",-"+c+T+"-"+c+","+c+T+c+","+c+T+c+",-"+c+T+"-"+c+",-"+c+"Z")}},"star-diamond":{n:22,f:function(g,m,E){if(i(m))return C;var c=w(g*1.4,2),_=w(g*1.9,2),T="A "+_+","+_+" 0 0 1 ";return h(m,E,"M-"+c+",0"+T+"0,"+c+T+c+",0"+T+"0,-"+c+T+"-"+c+",0Z")}},"diamond-tall":{n:23,f:function(g,m,E){if(i(m))return C;var c=w(g*.7,2),_=w(g*1.4,2);return h(m,E,"M0,"+_+"L"+c+",0L0,-"+_+"L-"+c+",0Z")}},"diamond-wide":{n:24,f:function(g,m,E){if(i(m))return C;var c=w(g*1.4,2),_=w(g*.7,2);return h(m,E,"M0,"+_+"L"+c+",0L0,-"+_+"L-"+c+",0Z")}},hourglass:{n:25,f:function(g,m,E){if(i(m))return C;var c=w(g,2);return h(m,E,"M"+c+","+c+"H-"+c+"L"+c+",-"+c+"H-"+c+"Z")},noDot:!0},bowtie:{n:26,f:function(g,m,E){if(i(m))return C;var c=w(g,2);return h(m,E,"M"+c+","+c+"V-"+c+"L-"+c+","+c+"V-"+c+"Z")},noDot:!0},"circle-cross":{n:27,f:function(g,m,E){if(i(m))return C;var c=w(g,2);return h(m,E,"M0,"+c+"V-"+c+"M"+c+",0H-"+c+"M"+c+",0A"+c+","+c+" 0 1,1 0,-"+c+"A"+c+","+c+" 0 0,1 "+c+",0Z")},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(g,m,E){if(i(m))return C;var c=w(g,2),_=w(g/P,2);return h(m,E,"M"+_+","+_+"L-"+_+",-"+_+"M"+_+",-"+_+"L-"+_+","+_+"M"+c+",0A"+c+","+c+" 0 1,1 0,-"+c+"A"+c+","+c+" 0 0,1 "+c+",0Z")},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(g,m,E){if(i(m))return C;var c=w(g,2);return h(m,E,"M0,"+c+"V-"+c+"M"+c+",0H-"+c+"M"+c+","+c+"H-"+c+"V-"+c+"H"+c+"Z")},needLine:!0,noDot:!0},"square-x":{n:30,f:function(g,m,E){if(i(m))return C;var c=w(g,2);return h(m,E,"M"+c+","+c+"L-"+c+",-"+c+"M"+c+",-"+c+"L-"+c+","+c+"M"+c+","+c+"H-"+c+"V-"+c+"H"+c+"Z")},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(g,m,E){if(i(m))return C;var c=w(g*1.3,2);return h(m,E,"M"+c+",0L0,"+c+"L-"+c+",0L0,-"+c+"ZM0,-"+c+"V"+c+"M-"+c+",0H"+c)},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(g,m,E){if(i(m))return C;var c=w(g*1.3,2),_=w(g*.65,2);return h(m,E,"M"+c+",0L0,"+c+"L-"+c+",0L0,-"+c+"ZM-"+_+",-"+_+"L"+_+","+_+"M-"+_+","+_+"L"+_+",-"+_)},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(g,m,E){if(i(m))return C;var c=w(g*1.4,2);return h(m,E,"M0,"+c+"V-"+c+"M"+c+",0H-"+c)},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(g,m,E){if(i(m))return C;var c=w(g,2);return h(m,E,"M"+c+","+c+"L-"+c+",-"+c+"M"+c+",-"+c+"L-"+c+","+c)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(g,m,E){if(i(m))return C;var c=w(g*1.2,2),_=w(g*.85,2);return h(m,E,"M0,"+c+"V-"+c+"M"+c+",0H-"+c+"M"+_+","+_+"L-"+_+",-"+_+"M"+_+",-"+_+"L-"+_+","+_)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(g,m,E){if(i(m))return C;var c=w(g/2,2),_=w(g,2);return h(m,E,"M"+c+","+_+"V-"+_+"M"+(c-_)+",-"+_+"V"+_+"M"+_+","+c+"H-"+_+"M-"+_+","+(c-_)+"H"+_)},needLine:!0,noFill:!0},"y-up":{n:37,f:function(g,m,E){if(i(m))return C;var c=w(g*1.2,2),_=w(g*1.6,2),T=w(g*.8,2);return h(m,E,"M-"+c+","+T+"L0,0M"+c+","+T+"L0,0M0,-"+_+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(g,m,E){if(i(m))return C;var c=w(g*1.2,2),_=w(g*1.6,2),T=w(g*.8,2);return h(m,E,"M-"+c+",-"+T+"L0,0M"+c+",-"+T+"L0,0M0,"+_+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(g,m,E){if(i(m))return C;var c=w(g*1.2,2),_=w(g*1.6,2),T=w(g*.8,2);return h(m,E,"M"+T+","+c+"L0,0M"+T+",-"+c+"L0,0M-"+_+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(g,m,E){if(i(m))return C;var c=w(g*1.2,2),_=w(g*1.6,2),T=w(g*.8,2);return h(m,E,"M-"+T+","+c+"L0,0M-"+T+",-"+c+"L0,0M"+_+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(g,m,E){if(i(m))return C;var c=w(g*1.4,2);return h(m,E,"M"+c+",0H-"+c)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(g,m,E){if(i(m))return C;var c=w(g*1.4,2);return h(m,E,"M0,"+c+"V-"+c)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(g,m,E){if(i(m))return C;var c=w(g,2);return h(m,E,"M"+c+",-"+c+"L-"+c+","+c)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(g,m,E){if(i(m))return C;var c=w(g,2);return h(m,E,"M"+c+","+c+"L-"+c+",-"+c)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(g,m,E){if(i(m))return C;var c=w(g,2),_=w(g*2,2);return h(m,E,"M0,0L-"+c+","+_+"H"+c+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(g,m,E){if(i(m))return C;var c=w(g,2),_=w(g*2,2);return h(m,E,"M0,0L-"+c+",-"+_+"H"+c+"Z")},noDot:!0},"arrow-left":{n:47,f:function(g,m,E){if(i(m))return C;var c=w(g*2,2),_=w(g,2);return h(m,E,"M0,0L"+c+",-"+_+"V"+_+"Z")},noDot:!0},"arrow-right":{n:48,f:function(g,m,E){if(i(m))return C;var c=w(g*2,2),_=w(g,2);return h(m,E,"M0,0L-"+c+",-"+_+"V"+_+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(g,m,E){if(i(m))return C;var c=w(g,2),_=w(g*2,2);return h(m,E,"M-"+c+",0H"+c+"M0,0L-"+c+","+_+"H"+c+"Z")},backoff:1,needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(g,m,E){if(i(m))return C;var c=w(g,2),_=w(g*2,2);return h(m,E,"M-"+c+",0H"+c+"M0,0L-"+c+",-"+_+"H"+c+"Z")},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(g,m,E){if(i(m))return C;var c=w(g*2,2),_=w(g,2);return h(m,E,"M0,-"+_+"V"+_+"M0,0L"+c+",-"+_+"V"+_+"Z")},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(g,m,E){if(i(m))return C;var c=w(g*2,2),_=w(g,2);return h(m,E,"M0,-"+_+"V"+_+"M0,0L-"+c+",-"+_+"V"+_+"Z")},needLine:!0,noDot:!0},arrow:{n:53,f:function(g,m,E){if(i(m))return C;var c=r/2.5,_=2*g*a(c),T=2*g*l(c);return h(m,E,"M0,0L"+-_+","+T+"L"+_+","+T+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(g,m,E){if(i(m))return C;var c=r/4,_=2*g*a(c),T=2*g*l(c);return h(m,E,"M0,0L"+-_+","+T+"A "+2*g+","+2*g+" 0 0 1 "+_+","+T+"Z")},backoff:.4,noDot:!0}};function i(g){return g===null}var s,o,u,d;function h(g,m,E){if((!g||g%360===0)&&!m)return E;if(u===g&&d===m&&s===E)return o;u=g,d=m,s=E;function c(B,U){var V=a(B),q=l(B),z=U[0],H=U[1]+(m||0);return[z*V-H*q,z*q+H*V]}for(var _=g/180*r,T=0,M=0,k=v(E),b="",A=0;A<k.length;A++){var y=k[A],f=y[0],p=T,x=M;if(f==="M"||f==="L")T=+y[1],M=+y[2];else if(f==="m"||f==="l")T+=+y[1],M+=+y[2];else if(f==="H")T=+y[1];else if(f==="h")T+=+y[1];else if(f==="V")M=+y[1];else if(f==="v")M+=+y[1];else if(f==="A"){T=+y[1],M=+y[2];var N=c(_,[+y[6],+y[7]]);y[6]=N[0],y[7]=N[1],y[3]=+y[3]+g}(f==="H"||f==="V")&&(f="L"),(f==="h"||f==="v")&&(f="l"),(f==="m"||f==="l")&&(T-=p,M-=x);var D=c(_,[T,M]);(f==="H"||f==="V")&&(f="L"),(f==="M"||f==="L"||f==="m"||f==="l")&&(y[1]=D[0],y[2]=D[1]),y[0]=f,b+=y[0]+y.slice(1).join(",")}return o=b,b}}}),zs=Ne({"src/components/drawing/index.js"(te,Z){var v=xn(),w=In(),C=w.numberFormat,P=Fn(),t=to(),r=Yo(),a=Ha(),l=Nc(),i=w.strTranslate,s=hc(),o=hp(),u=Ad(),d=u.LINE_SPACING,h=El().DESELECTDIM,g=yu(),m=Mm(),E=bv().appendArrayPointValue,c=Z.exports={};c.font=function(Fe,Pe){var be=Pe.variant,Ye=Pe.style,yt=Pe.weight,wt=Pe.color,ht=Pe.size,Yt=Pe.family,$t=Pe.shadow,fr=Pe.lineposition,mr=Pe.textcase;Yt&&Fe.style("font-family",Yt),ht+1&&Fe.style("font-size",ht+"px"),wt&&Fe.call(a.fill,wt),yt&&Fe.style("font-weight",yt),Ye&&Fe.style("font-style",Ye),be&&Fe.style("font-variant",be),mr&&Fe.style("text-transform",_(M(mr))),$t&&Fe.style("text-shadow",$t==="auto"?s.makeTextShadow(a.contrast(wt)):_($t)),fr&&Fe.style("text-decoration-line",_(k(fr)))};function _(Fe){return Fe==="none"?void 0:Fe}var T={normal:"none",lower:"lowercase",upper:"uppercase","word caps":"capitalize"};function M(Fe){return T[Fe]}function k(Fe){return Fe.replace("under","underline").replace("over","overline").replace("through","line-through").split("+").join(" ")}c.setPosition=function(Fe,Pe,be){Fe.attr("x",Pe).attr("y",be)},c.setSize=function(Fe,Pe,be){Fe.attr("width",Pe).attr("height",be)},c.setRect=function(Fe,Pe,be,Ye,yt){Fe.call(c.setPosition,Pe,be).call(c.setSize,Ye,yt)},c.translatePoint=function(Fe,Pe,be,Ye){var yt=be.c2p(Fe.x),wt=Ye.c2p(Fe.y);if(P(yt)&&P(wt)&&Pe.node())Pe.node().nodeName==="text"?Pe.attr("x",yt).attr("y",wt):Pe.attr("transform",i(yt,wt));else return!1;return!0},c.translatePoints=function(Fe,Pe,be){Fe.each(function(Ye){var yt=v.select(this);c.translatePoint(Ye,yt,Pe,be)})},c.hideOutsideRangePoint=function(Fe,Pe,be,Ye,yt,wt){Pe.attr("display",be.isPtWithinRange(Fe,yt)&&Ye.isPtWithinRange(Fe,wt)?null:"none")},c.hideOutsideRangePoints=function(Fe,Pe){if(Pe._hasClipOnAxisFalse){var be=Pe.xaxis,Ye=Pe.yaxis;Fe.each(function(yt){var wt=yt[0].trace,ht=wt.xcalendar,Yt=wt.ycalendar,$t=r.traceIs(wt,"bar-like")?".bartext":".point,.textpoint";Fe.selectAll($t).each(function(fr){c.hideOutsideRangePoint(fr,v.select(this),be,Ye,ht,Yt)})})}},c.crispRound=function(Fe,Pe,be){return!Pe||!P(Pe)?be||0:Fe._context.staticPlot?Pe:Pe<1?1:Math.round(Pe)},c.singleLineStyle=function(Fe,Pe,be,Ye,yt){Pe.style("fill","none");var wt=(((Fe||[])[0]||{}).trace||{}).line||{},ht=be||wt.width||0,Yt=yt||wt.dash||"";a.stroke(Pe,Ye||wt.color),c.dashLine(Pe,Yt,ht)},c.lineGroupStyle=function(Fe,Pe,be,Ye){Fe.style("fill","none").each(function(yt){var wt=(((yt||[])[0]||{}).trace||{}).line||{},ht=Pe||wt.width||0,Yt=Ye||wt.dash||"";v.select(this).call(a.stroke,be||wt.color).call(c.dashLine,Yt,ht)})},c.dashLine=function(Fe,Pe,be){be=+be||0,Pe=c.dashStyle(Pe,be),Fe.style({"stroke-dasharray":Pe,"stroke-width":be+"px"})},c.dashStyle=function(Fe,Pe){Pe=+Pe||1;var be=Math.max(Pe,3);return Fe==="solid"?Fe="":Fe==="dot"?Fe=be+"px,"+be+"px":Fe==="dash"?Fe=3*be+"px,"+3*be+"px":Fe==="longdash"?Fe=5*be+"px,"+5*be+"px":Fe==="dashdot"?Fe=3*be+"px,"+be+"px,"+be+"px,"+be+"px":Fe==="longdashdot"&&(Fe=5*be+"px,"+2*be+"px,"+be+"px,"+2*be+"px"),Fe};function b(Fe,Pe,be,Ye){var yt=Pe.fillpattern,wt=Pe.fillgradient,ht=c.getPatternAttr,Yt=yt&&(ht(yt.shape,0,"")||ht(yt.path,0,""));if(Yt){var $t=ht(yt.bgcolor,0,null),fr=ht(yt.fgcolor,0,null),mr=yt.fgopacity,Ur=ht(yt.size,0,8),jr=ht(yt.solidity,0,.3),fn=Pe.uid;c.pattern(Fe,"point",be,fn,Yt,Ur,jr,void 0,yt.fillmode,$t,fr,mr)}else if(wt&&wt.type!=="none"){var Br=wt.type,Qr="scatterfill-"+Pe.uid;if(Ye&&(Qr="legendfill-"+Pe.uid),!Ye&&(wt.start!==void 0||wt.stop!==void 0)){var Ot,$e;Br==="horizontal"?(Ot={x:wt.start,y:0},$e={x:wt.stop,y:0}):Br==="vertical"&&(Ot={x:0,y:wt.start},$e={x:0,y:wt.stop}),Ot.x=Pe._xA.c2p(Ot.x===void 0?Pe._extremes.x.min[0].val:Ot.x,!0),Ot.y=Pe._yA.c2p(Ot.y===void 0?Pe._extremes.y.min[0].val:Ot.y,!0),$e.x=Pe._xA.c2p($e.x===void 0?Pe._extremes.x.max[0].val:$e.x,!0),$e.y=Pe._yA.c2p($e.y===void 0?Pe._extremes.y.max[0].val:$e.y,!0),Fe.call(D,be,Qr,"linear",wt.colorscale,"fill",Ot,$e,!0,!1)}else Br==="horizontal"&&(Br=Br+"reversed"),Fe.call(c.gradient,be,Qr,Br,wt.colorscale,"fill")}else Pe.fillcolor&&Fe.call(a.fill,Pe.fillcolor)}c.singleFillStyle=function(Fe,Pe){var be=v.select(Fe.node()),Ye=be.data(),yt=((Ye[0]||[])[0]||{}).trace||{};b(Fe,yt,Pe,!1)},c.fillGroupStyle=function(Fe,Pe,be){Fe.style("stroke-width",0).each(function(Ye){var yt=v.select(this);Ye[0].trace&&b(yt,Ye[0].trace,Pe,be)})};var A=SL();c.symbolNames=[],c.symbolFuncs=[],c.symbolBackOffs=[],c.symbolNeedLines={},c.symbolNoDot={},c.symbolNoFill={},c.symbolList=[],Object.keys(A).forEach(function(Fe){var Pe=A[Fe],be=Pe.n;c.symbolList.push(be,String(be),Fe,be+100,String(be+100),Fe+"-open"),c.symbolNames[be]=Fe,c.symbolFuncs[be]=Pe.f,c.symbolBackOffs[be]=Pe.backoff||0,Pe.needLine&&(c.symbolNeedLines[be]=!0),Pe.noDot?c.symbolNoDot[be]=!0:c.symbolList.push(be+200,String(be+200),Fe+"-dot",be+300,String(be+300),Fe+"-open-dot"),Pe.noFill&&(c.symbolNoFill[be]=!0)});var y=c.symbolNames.length,f="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";c.symbolNumber=function(Fe){if(P(Fe))Fe=+Fe;else if(typeof Fe=="string"){var Pe=0;Fe.indexOf("-open")>0&&(Pe=100,Fe=Fe.replace("-open","")),Fe.indexOf("-dot")>0&&(Pe+=200,Fe=Fe.replace("-dot","")),Fe=c.symbolNames.indexOf(Fe),Fe>=0&&(Fe+=Pe)}return Fe%100>=y||Fe>=400?0:Math.floor(Math.max(Fe,0))};function p(Fe,Pe,be,Ye){var yt=Fe%100;return c.symbolFuncs[yt](Pe,be,Ye)+(Fe>=200?f:"")}var x=C("~f"),N={radial:{type:"radial"},radialreversed:{type:"radial",reversed:!0},horizontal:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0}},horizontalreversed:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0},reversed:!0},vertical:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0}},verticalreversed:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0},reversed:!0}};c.gradient=function(Fe,Pe,be,Ye,yt,wt){var ht=N[Ye];return D(Fe,Pe,be,ht.type,yt,wt,ht.start,ht.stop,!1,ht.reversed)};function D(Fe,Pe,be,Ye,yt,wt,ht,Yt,$t,fr){var mr=yt.length,Ur;Ye==="linear"?Ur={node:"linearGradient",attrs:{x1:ht.x,y1:ht.y,x2:Yt.x,y2:Yt.y,gradientUnits:$t?"userSpaceOnUse":"objectBoundingBox"},reversed:fr}:Ye==="radial"&&(Ur={node:"radialGradient",reversed:fr});for(var jr=new Array(mr),fn=0;fn<mr;fn++)Ur.reversed?jr[mr-1-fn]=[x((1-yt[fn][0])*100),yt[fn][1]]:jr[fn]=[x(yt[fn][0]*100),yt[fn][1]];var Br=Pe._fullLayout,Qr="g"+Br._uid+"-"+be,Ot=Br._defs.select(".gradients").selectAll("#"+Qr).data([Ye+jr.join(";")],w.identity);Ot.exit().remove(),Ot.enter().append(Ur.node).each(function(){var $e=v.select(this);Ur.attrs&&$e.attr(Ur.attrs),$e.attr("id",Qr);var ot=$e.selectAll("stop").data(jr);ot.exit().remove(),ot.enter().append("stop"),ot.each(function(De){var Ee=t(De[1]);v.select(this).attr({offset:De[0]+"%","stop-color":a.tinyRGB(Ee),"stop-opacity":Ee.getAlpha()})})}),Fe.style(wt,pe(Qr,Pe)).style(wt+"-opacity",null),Fe.classed("gradient_filled",!0)}c.pattern=function(Fe,Pe,be,Ye,yt,wt,ht,Yt,$t,fr,mr,Ur){var jr=Pe==="legend";Yt&&($t==="overlay"?(fr=Yt,mr=a.contrast(fr)):(fr=void 0,mr=Yt));var fn=be._fullLayout,Br="p"+fn._uid+"-"+Ye,Qr,Ot,$e=function(Rr,Mr,Sr,Kr,Hn){return Kr+(Hn-Kr)*(Rr-Mr)/(Sr-Mr)},ot,De,Ee,Ae,Ie={},tt=t(mr),st=a.tinyRGB(tt),Bt=tt.getAlpha(),Ft=Ur*Bt;switch(yt){case"/":Qr=wt*Math.sqrt(2),Ot=wt*Math.sqrt(2),ot="M-"+Qr/4+","+Ot/4+"l"+Qr/2+",-"+Ot/2+"M0,"+Ot+"L"+Qr+",0M"+Qr/4*3+","+Ot/4*5+"l"+Qr/2+",-"+Ot/2,De=ht*wt,Ae="path",Ie={d:ot,opacity:Ft,stroke:st,"stroke-width":De+"px"};break;case"\\":Qr=wt*Math.sqrt(2),Ot=wt*Math.sqrt(2),ot="M"+Qr/4*3+",-"+Ot/4+"l"+Qr/2+","+Ot/2+"M0,0L"+Qr+","+Ot+"M-"+Qr/4+","+Ot/4*3+"l"+Qr/2+","+Ot/2,De=ht*wt,Ae="path",Ie={d:ot,opacity:Ft,stroke:st,"stroke-width":De+"px"};break;case"x":Qr=wt*Math.sqrt(2),Ot=wt*Math.sqrt(2),ot="M-"+Qr/4+","+Ot/4+"l"+Qr/2+",-"+Ot/2+"M0,"+Ot+"L"+Qr+",0M"+Qr/4*3+","+Ot/4*5+"l"+Qr/2+",-"+Ot/2+"M"+Qr/4*3+",-"+Ot/4+"l"+Qr/2+","+Ot/2+"M0,0L"+Qr+","+Ot+"M-"+Qr/4+","+Ot/4*3+"l"+Qr/2+","+Ot/2,De=wt-wt*Math.sqrt(1-ht),Ae="path",Ie={d:ot,opacity:Ft,stroke:st,"stroke-width":De+"px"};break;case"|":Qr=wt,Ot=wt,Ae="path",ot="M"+Qr/2+",0L"+Qr/2+","+Ot,De=ht*wt,Ae="path",Ie={d:ot,opacity:Ft,stroke:st,"stroke-width":De+"px"};break;case"-":Qr=wt,Ot=wt,Ae="path",ot="M0,"+Ot/2+"L"+Qr+","+Ot/2,De=ht*wt,Ae="path",Ie={d:ot,opacity:Ft,stroke:st,"stroke-width":De+"px"};break;case"+":Qr=wt,Ot=wt,Ae="path",ot="M"+Qr/2+",0L"+Qr/2+","+Ot+"M0,"+Ot/2+"L"+Qr+","+Ot/2,De=wt-wt*Math.sqrt(1-ht),Ae="path",Ie={d:ot,opacity:Ft,stroke:st,"stroke-width":De+"px"};break;case".":Qr=wt,Ot=wt,ht<Math.PI/4?Ee=Math.sqrt(ht*wt*wt/Math.PI):Ee=$e(ht,Math.PI/4,1,wt/2,wt/Math.sqrt(2)),Ae="circle",Ie={cx:Qr/2,cy:Ot/2,r:Ee,opacity:Ft,fill:st};break;default:Qr=wt,Ot=wt,Ae="path",Ie={d:yt,opacity:Ft,fill:st};break}var Wt=[yt||"noSh",fr||"noBg",mr||"noFg",wt,ht].join(";"),lr=fn._defs.select(".patterns").selectAll("#"+Br).data([Wt],w.identity);lr.exit().remove(),lr.enter().append("pattern").each(function(){var Rr=v.select(this);if(Rr.attr({id:Br,width:Qr+"px",height:Ot+"px",patternUnits:"userSpaceOnUse",patternTransform:jr?"scale(0.8)":""}),fr){var Mr=t(fr),Sr=a.tinyRGB(Mr),Kr=Mr.getAlpha(),Hn=Rr.selectAll("rect").data([0]);Hn.exit().remove(),Hn.enter().append("rect").attr({width:Qr+"px",height:Ot+"px",fill:Sr,"fill-opacity":Kr})}var ga=Rr.selectAll(Ae).data([0]);ga.exit().remove(),ga.enter().append(Ae).attr(Ie)}),Fe.style("fill",pe(Br,be)).style("fill-opacity",null),Fe.classed("pattern_filled",!0)},c.initGradients=function(Fe){var Pe=Fe._fullLayout,be=w.ensureSingle(Pe._defs,"g","gradients");be.selectAll("linearGradient,radialGradient").remove(),v.select(Fe).selectAll(".gradient_filled").classed("gradient_filled",!1)},c.initPatterns=function(Fe){var Pe=Fe._fullLayout,be=w.ensureSingle(Pe._defs,"g","patterns");be.selectAll("pattern").remove(),v.select(Fe).selectAll(".pattern_filled").classed("pattern_filled",!1)},c.getPatternAttr=function(Fe,Pe,be){return Fe&&w.isArrayOrTypedArray(Fe)?Pe<Fe.length?Fe[Pe]:be:Fe},c.pointStyle=function(Fe,Pe,be,Ye){if(Fe.size()){var yt=c.makePointStyleFns(Pe);Fe.each(function(wt){c.singlePointStyle(wt,v.select(this),Pe,yt,be,Ye)})}},c.singlePointStyle=function(Fe,Pe,be,Ye,yt,wt){var ht=be.marker,Yt=ht.line;if(wt&&wt.i>=0&&Fe.i===void 0&&(Fe.i=wt.i),Pe.style("opacity",Ye.selectedOpacityFn?Ye.selectedOpacityFn(Fe):Fe.mo===void 0?ht.opacity:Fe.mo),Ye.ms2mrc){var $t;Fe.ms==="various"||ht.size==="various"?$t=3:$t=Ye.ms2mrc(Fe.ms),Fe.mrc=$t,Ye.selectedSizeFn&&($t=Fe.mrc=Ye.selectedSizeFn(Fe));var fr=c.symbolNumber(Fe.mx||ht.symbol)||0;Fe.om=fr%200>=100;var mr=ut(Fe,be),Ur=ce(Fe,be);Pe.attr("d",p(fr,$t,mr,Ur))}var jr=!1,fn,Br,Qr;if(Fe.so)Qr=Yt.outlierwidth,Br=Yt.outliercolor,fn=ht.outliercolor;else{var Ot=(Yt||{}).width;Qr=(Fe.mlw+1||Ot+1||(Fe.trace?(Fe.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in Fe?Br=Fe.mlcc=Ye.lineScale(Fe.mlc):w.isArrayOrTypedArray(Yt.color)?Br=a.defaultLine:Br=Yt.color,w.isArrayOrTypedArray(ht.color)&&(fn=a.defaultLine,jr=!0),"mc"in Fe?fn=Fe.mcc=Ye.markerScale(Fe.mc):fn=ht.color||ht.colors||"rgba(0,0,0,0)",Ye.selectedColorFn&&(fn=Ye.selectedColorFn(Fe))}if(Fe.om)Pe.call(a.stroke,fn).style({"stroke-width":(Qr||1)+"px",fill:"none"});else{Pe.style("stroke-width",(Fe.isBlank?0:Qr)+"px");var $e=ht.gradient,ot=Fe.mgt;ot?jr=!0:ot=$e&&$e.type,w.isArrayOrTypedArray(ot)&&(ot=ot[0],N[ot]||(ot=0));var De=ht.pattern,Ee=c.getPatternAttr,Ae=De&&(Ee(De.shape,Fe.i,"")||Ee(De.path,Fe.i,""));if(ot&&ot!=="none"){var Ie=Fe.mgc;Ie?jr=!0:Ie=$e.color;var tt=be.uid;jr&&(tt+="-"+Fe.i),c.gradient(Pe,yt,tt,ot,[[0,Ie],[1,fn]],"fill")}else if(Ae){var st=!1,Bt=De.fgcolor;!Bt&&wt&&wt.color&&(Bt=wt.color,st=!0);var Ft=Ee(Bt,Fe.i,wt&&wt.color||null),Wt=Ee(De.bgcolor,Fe.i,null),lr=De.fgopacity,Rr=Ee(De.size,Fe.i,8),Mr=Ee(De.solidity,Fe.i,.3);st=st||Fe.mcc||w.isArrayOrTypedArray(De.shape)||w.isArrayOrTypedArray(De.path)||w.isArrayOrTypedArray(De.bgcolor)||w.isArrayOrTypedArray(De.fgcolor)||w.isArrayOrTypedArray(De.size)||w.isArrayOrTypedArray(De.solidity);var Sr=be.uid;st&&(Sr+="-"+Fe.i),c.pattern(Pe,"point",yt,Sr,Ae,Rr,Mr,Fe.mcc,De.fillmode,Wt,Ft,lr)}else w.isArrayOrTypedArray(fn)?a.fill(Pe,fn[Fe.i]):a.fill(Pe,fn);Qr&&a.stroke(Pe,Br)}},c.makePointStyleFns=function(Fe){var Pe={},be=Fe.marker;return Pe.markerScale=c.tryColorscale(be,""),Pe.lineScale=c.tryColorscale(be,"line"),r.traceIs(Fe,"symbols")&&(Pe.ms2mrc=g.isBubble(Fe)?m(Fe):function(){return(be.size||6)/2}),Fe.selectedpoints&&w.extendFlat(Pe,c.makeSelectedPointStyleFns(Fe)),Pe},c.makeSelectedPointStyleFns=function(Fe){var Pe={},be=Fe.selected||{},Ye=Fe.unselected||{},yt=Fe.marker||{},wt=be.marker||{},ht=Ye.marker||{},Yt=yt.opacity,$t=wt.opacity,fr=ht.opacity,mr=$t!==void 0,Ur=fr!==void 0;(w.isArrayOrTypedArray(Yt)||mr||Ur)&&(Pe.selectedOpacityFn=function(Ee){var Ae=Ee.mo===void 0?yt.opacity:Ee.mo;return Ee.selected?mr?$t:Ae:Ur?fr:h*Ae});var jr=yt.color,fn=wt.color,Br=ht.color;(fn||Br)&&(Pe.selectedColorFn=function(Ee){var Ae=Ee.mcc||jr;return Ee.selected?fn||Ae:Br||Ae});var Qr=yt.size,Ot=wt.size,$e=ht.size,ot=Ot!==void 0,De=$e!==void 0;return r.traceIs(Fe,"symbols")&&(ot||De)&&(Pe.selectedSizeFn=function(Ee){var Ae=Ee.mrc||Qr/2;return Ee.selected?ot?Ot/2:Ae:De?$e/2:Ae}),Pe},c.makeSelectedTextStyleFns=function(Fe){var Pe={},be=Fe.selected||{},Ye=Fe.unselected||{},yt=Fe.textfont||{},wt=be.textfont||{},ht=Ye.textfont||{},Yt=yt.color,$t=wt.color,fr=ht.color;return Pe.selectedTextColorFn=function(mr){var Ur=mr.tc||Yt;return mr.selected?$t||Ur:fr||($t?Ur:a.addOpacity(Ur,h))},Pe},c.selectedPointStyle=function(Fe,Pe){if(!(!Fe.size()||!Pe.selectedpoints)){var be=c.makeSelectedPointStyleFns(Pe),Ye=Pe.marker||{},yt=[];be.selectedOpacityFn&&yt.push(function(wt,ht){wt.style("opacity",be.selectedOpacityFn(ht))}),be.selectedColorFn&&yt.push(function(wt,ht){a.fill(wt,be.selectedColorFn(ht))}),be.selectedSizeFn&&yt.push(function(wt,ht){var Yt=ht.mx||Ye.symbol||0,$t=be.selectedSizeFn(ht);wt.attr("d",p(c.symbolNumber(Yt),$t,ut(ht,Pe),ce(ht,Pe))),ht.mrc2=$t}),yt.length&&Fe.each(function(wt){for(var ht=v.select(this),Yt=0;Yt<yt.length;Yt++)yt[Yt](ht,wt)})}},c.tryColorscale=function(Fe,Pe){var be=Pe?w.nestedProperty(Fe,Pe).get():Fe;if(be){var Ye=be.color;if((be.colorscale||be._colorAx)&&w.isArrayOrTypedArray(Ye))return l.makeColorScaleFuncFromTrace(be)}return w.identity};var B={start:1,end:-1,middle:0,bottom:1,top:-1};function U(Fe,Pe,be,Ye,yt){var wt=v.select(Fe.node().parentNode),ht=Pe.indexOf("top")!==-1?"top":Pe.indexOf("bottom")!==-1?"bottom":"middle",Yt=Pe.indexOf("left")!==-1?"end":Pe.indexOf("right")!==-1?"start":"middle",$t=Ye?Ye/.8+1:0,fr=(s.lineCount(Fe)-1)*d+1,mr=B[Yt]*$t,Ur=be*.75+B[ht]*$t+(B[ht]-1)*fr*be/2;Fe.attr("text-anchor",Yt),yt||wt.attr("transform",i(mr,Ur))}function V(Fe,Pe){var be=Fe.ts||Pe.textfont.size;return P(be)&&be>0?be:0}c.textPointStyle=function(Fe,Pe,be){if(Fe.size()){var Ye;if(Pe.selectedpoints){var yt=c.makeSelectedTextStyleFns(Pe);Ye=yt.selectedTextColorFn}var wt=Pe.texttemplate,ht=be._fullLayout;Fe.each(function(Yt){var $t=v.select(this),fr=wt?w.extractOption(Yt,Pe,"txt","texttemplate"):w.extractOption(Yt,Pe,"tx","text");if(!fr&&fr!==0){$t.remove();return}if(wt){var mr=Pe._module.formatLabels,Ur=mr?mr(Yt,Pe,ht):{},jr={};E(jr,Pe,Yt.i),fr=w.texttemplateString({data:[jr,Yt,Pe._meta],fallback:Pe.texttemplatefallback,labels:Ur,locale:ht._d3locale,template:fr})}var fn=Yt.tp||Pe.textposition,Br=V(Yt,Pe),Qr=Ye?Ye(Yt):Yt.tc||Pe.textfont.color;$t.call(c.font,{family:Yt.tf||Pe.textfont.family,weight:Yt.tw||Pe.textfont.weight,style:Yt.ty||Pe.textfont.style,variant:Yt.tv||Pe.textfont.variant,textcase:Yt.tC||Pe.textfont.textcase,lineposition:Yt.tE||Pe.textfont.lineposition,shadow:Yt.tS||Pe.textfont.shadow,size:Br,color:Qr}).text(fr).call(s.convertToTspans,be).call(U,fn,Br,Yt.mrc)})}},c.selectedTextStyle=function(Fe,Pe){if(!(!Fe.size()||!Pe.selectedpoints)){var be=c.makeSelectedTextStyleFns(Pe);Fe.each(function(Ye){var yt=v.select(this),wt=be.selectedTextColorFn(Ye),ht=Ye.tp||Pe.textposition,Yt=V(Ye,Pe);a.fill(yt,wt);var $t=r.traceIs(Pe,"bar-like");U(yt,ht,Yt,Ye.mrc2||Ye.mrc,$t)})}};var q=.5;c.smoothopen=function(Fe,Pe){if(Fe.length<3)return"M"+Fe.join("L");var be="M"+Fe[0],Ye=[],yt;for(yt=1;yt<Fe.length-1;yt++)Ye.push(ge(Fe[yt-1],Fe[yt],Fe[yt+1],Pe));for(be+="Q"+Ye[0][0]+" "+Fe[1],yt=2;yt<Fe.length-1;yt++)be+="C"+Ye[yt-2][1]+" "+Ye[yt-1][0]+" "+Fe[yt];return be+="Q"+Ye[Fe.length-3][1]+" "+Fe[Fe.length-1],be},c.smoothclosed=function(Fe,Pe){if(Fe.length<3)return"M"+Fe.join("L")+"Z";var be="M"+Fe[0],Ye=Fe.length-1,yt=[ge(Fe[Ye],Fe[0],Fe[1],Pe)],wt;for(wt=1;wt<Ye;wt++)yt.push(ge(Fe[wt-1],Fe[wt],Fe[wt+1],Pe));for(yt.push(ge(Fe[Ye-1],Fe[Ye],Fe[0],Pe)),wt=1;wt<=Ye;wt++)be+="C"+yt[wt-1][1]+" "+yt[wt][0]+" "+Fe[wt];return be+="C"+yt[Ye][1]+" "+yt[0][0]+" "+Fe[0]+"Z",be};var z,H;function G(Fe,Pe,be){return be&&(Fe=W(Fe)),Pe?le(Fe[1]):J(Fe[0])}function J(Fe){var Pe=v.round(Fe,2);return z=Pe,Pe}function le(Fe){var Pe=v.round(Fe,2);return H=Pe,Pe}function ge(Fe,Pe,be,Ye){var yt=Fe[0]-Pe[0],wt=Fe[1]-Pe[1],ht=be[0]-Pe[0],Yt=be[1]-Pe[1],$t=Math.pow(yt*yt+wt*wt,q/2),fr=Math.pow(ht*ht+Yt*Yt,q/2),mr=(fr*fr*yt-$t*$t*ht)*Ye,Ur=(fr*fr*wt-$t*$t*Yt)*Ye,jr=3*fr*($t+fr),fn=3*$t*($t+fr);return[[J(Pe[0]+(jr&&mr/jr)),le(Pe[1]+(jr&&Ur/jr))],[J(Pe[0]-(fn&&mr/fn)),le(Pe[1]-(fn&&Ur/fn))]]}var de={hv:function(Fe,Pe,be){return"H"+J(Pe[0])+"V"+G(Pe,1,be)},vh:function(Fe,Pe,be){return"V"+le(Pe[1])+"H"+G(Pe,0,be)},hvh:function(Fe,Pe,be){return"H"+J((Fe[0]+Pe[0])/2)+"V"+le(Pe[1])+"H"+G(Pe,0,be)},vhv:function(Fe,Pe,be){return"V"+le((Fe[1]+Pe[1])/2)+"H"+J(Pe[0])+"V"+G(Pe,1,be)}},me=function(Fe,Pe,be){return"L"+G(Pe,0,be)+","+G(Pe,1,be)};c.steps=function(Fe){var Pe=de[Fe]||me;return function(be){for(var Ye="M"+J(be[0][0])+","+le(be[0][1]),yt=be.length,wt=1;wt<yt;wt++)Ye+=Pe(be[wt-1],be[wt],wt===yt-1);return Ye}};function W(Fe,Pe){var be=Fe.backoff,Ye=Fe.trace,yt=Fe.d,wt=Fe.i;if(be&&Ye&&Ye.marker&&Ye.marker.angle%360===0&&Ye.line&&Ye.line.shape!=="spline"){var ht=w.isArrayOrTypedArray(be),Yt=Fe,$t=Pe?Pe[0]:z||0,fr=Pe?Pe[1]:H||0,mr=Yt[0],Ur=Yt[1],jr=mr-$t,fn=Ur-fr,Br=Math.atan2(fn,jr),Qr=ht?be[wt]:be;if(Qr==="auto"){var Ot=Yt.i;Ye.type==="scatter"&&Ot--;var $e=Yt.marker,ot=$e.symbol;w.isArrayOrTypedArray(ot)&&(ot=ot[Ot]);var De=$e.size;w.isArrayOrTypedArray(De)&&(De=De[Ot]),Qr=$e?c.symbolBackOffs[c.symbolNumber(ot)]*De:0,Qr+=c.getMarkerStandoff(yt[Ot],Ye)||0}var Ee=mr-Qr*Math.cos(Br),Ae=Ur-Qr*Math.sin(Br);(Ee<=mr&&Ee>=$t||Ee>=mr&&Ee<=$t)&&(Ae<=Ur&&Ae>=fr||Ae>=Ur&&Ae<=fr)&&(Fe=[Ee,Ae])}return Fe}c.applyBackoff=W,c.makeTester=function(){var Fe=w.ensureSingleById(v.select("body"),"svg","js-plotly-tester",function(be){be.attr(o.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),Pe=w.ensureSingle(Fe,"path","js-reference-point",function(be){be.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});c.tester=Fe,c.testref=Pe},c.savedBBoxes={};var ie=0,se=1e4;c.bBox=function(Fe,Pe,be){be||(be=ee(Fe));var Ye;if(be){if(Ye=c.savedBBoxes[be],Ye)return w.extendFlat({},Ye)}else if(Fe.childNodes.length===1){var yt=Fe.childNodes[0];if(be=ee(yt),be){var wt=+yt.getAttribute("x")||0,ht=+yt.getAttribute("y")||0,Yt=yt.getAttribute("transform");if(!Yt){var $t=c.bBox(yt,!1,be);return wt&&($t.left+=wt,$t.right+=wt),ht&&($t.top+=ht,$t.bottom+=ht),$t}if(be+="~"+wt+"~"+ht+"~"+Yt,Ye=c.savedBBoxes[be],Ye)return w.extendFlat({},Ye)}}var fr,mr;Pe?fr=Fe:(mr=c.tester.node(),fr=Fe.cloneNode(!0),mr.appendChild(fr)),v.select(fr).attr("transform",null).call(s.positionText,0,0);var Ur=fr.getBoundingClientRect(),jr=c.testref.node().getBoundingClientRect();Pe||mr.removeChild(fr);var fn={height:Ur.height,width:Ur.width,left:Ur.left-jr.left,top:Ur.top-jr.top,right:Ur.right-jr.left,bottom:Ur.bottom-jr.top};return ie>=se&&(c.savedBBoxes={},ie=0),be&&(c.savedBBoxes[be]=fn),ie++,w.extendFlat({},fn)};function ee(Fe){var Pe=Fe.getAttribute("data-unformatted");if(Pe!==null)return Pe+Fe.getAttribute("data-math")+Fe.getAttribute("text-anchor")+Fe.getAttribute("style")}c.setClipUrl=function(Fe,Pe,be){Fe.attr("clip-path",pe(Pe,be))};function pe(Fe,Pe){if(!Fe)return null;var be=Pe._context,Ye=be._exportedPlot?"":be._baseUrl||"";return Ye?"url('"+Ye+"#"+Fe+"')":"url(#"+Fe+")"}c.getTranslate=function(Fe){var Pe=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,be=Fe.attr?"attr":"getAttribute",Ye=Fe[be]("transform")||"",yt=Ye.replace(Pe,function(wt,ht,Yt){return[ht,Yt].join(" ")}).split(" ");return{x:+yt[0]||0,y:+yt[1]||0}},c.setTranslate=function(Fe,Pe,be){var Ye=/(\btranslate\(.*?\);?)/,yt=Fe.attr?"attr":"getAttribute",wt=Fe.attr?"attr":"setAttribute",ht=Fe[yt]("transform")||"";return Pe=Pe||0,be=be||0,ht=ht.replace(Ye,"").trim(),ht+=i(Pe,be),ht=ht.trim(),Fe[wt]("transform",ht),ht},c.getScale=function(Fe){var Pe=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,be=Fe.attr?"attr":"getAttribute",Ye=Fe[be]("transform")||"",yt=Ye.replace(Pe,function(wt,ht,Yt){return[ht,Yt].join(" ")}).split(" ");return{x:+yt[0]||1,y:+yt[1]||1}},c.setScale=function(Fe,Pe,be){var Ye=/(\bscale\(.*?\);?)/,yt=Fe.attr?"attr":"getAttribute",wt=Fe.attr?"attr":"setAttribute",ht=Fe[yt]("transform")||"";return Pe=Pe||1,be=be||1,ht=ht.replace(Ye,"").trim(),ht+="scale("+Pe+","+be+")",ht=ht.trim(),Fe[wt]("transform",ht),ht};var oe=/\s*sc.*/;c.setPointGroupScale=function(Fe,Pe,be){if(Pe=Pe||1,be=be||1,!!Fe){var Ye=Pe===1&&be===1?"":"scale("+Pe+","+be+")";Fe.each(function(){var yt=(this.getAttribute("transform")||"").replace(oe,"");yt+=Ye,yt=yt.trim(),this.setAttribute("transform",yt)})}};var Y=/translate\([^)]*\)\s*$/;c.setTextPointsScale=function(Fe,Pe,be){Fe&&Fe.each(function(){var Ye,yt=v.select(this),wt=yt.select("text");if(wt.node()){var ht=parseFloat(wt.attr("x")||0),Yt=parseFloat(wt.attr("y")||0),$t=(yt.attr("transform")||"").match(Y);Pe===1&&be===1?Ye=[]:Ye=[i(ht,Yt),"scale("+Pe+","+be+")",i(-ht,-Yt)],$t&&Ye.push($t),yt.attr("transform",Ye.join(""))}})};function ce(Fe,Pe){var be;return Fe&&(be=Fe.mf),be===void 0&&(be=Pe.marker&&Pe.marker.standoff||0),!Pe._geo&&!Pe._xA?-be:be}c.getMarkerStandoff=ce;var ue=Math.atan2,_e=Math.cos,Le=Math.sin;function ze(Fe,Pe){var be=Pe[0],Ye=Pe[1];return[be*_e(Fe)-Ye*Le(Fe),be*Le(Fe)+Ye*_e(Fe)]}var Xe,Ve,rt,mt,_t,vt;function ut(Fe,Pe){var be=Fe.ma;be===void 0&&(be=Pe.marker.angle,(!be||w.isArrayOrTypedArray(be))&&(be=0));var Ye,yt,wt=Pe.marker.angleref;if(wt==="previous"||wt==="north"){if(Pe._geo){var ht=Pe._geo.project(Fe.lonlat);Ye=ht[0],yt=ht[1]}else{var Yt=Pe._xA,$t=Pe._yA;if(Yt&&$t)Ye=Yt.c2p(Fe.x),yt=$t.c2p(Fe.y);else return 90}if(Pe._geo){var fr=Fe.lonlat[0],mr=Fe.lonlat[1],Ur=Pe._geo.project([fr,mr+1e-5]),jr=Pe._geo.project([fr+1e-5,mr]),fn=ue(jr[1]-yt,jr[0]-Ye),Br=ue(Ur[1]-yt,Ur[0]-Ye),Qr;if(wt==="north")Qr=be/180*Math.PI;else if(wt==="previous"){var Ot=fr/180*Math.PI,$e=mr/180*Math.PI,ot=Xe/180*Math.PI,De=Ve/180*Math.PI,Ee=ot-Ot,Ae=_e(De)*Le(Ee),Ie=Le(De)*_e($e)-_e(De)*Le($e)*_e(Ee);Qr=-ue(Ae,Ie)-Math.PI,Xe=fr,Ve=mr}var tt=ze(fn,[_e(Qr),0]),st=ze(Br,[Le(Qr),0]);be=ue(tt[1]+st[1],tt[0]+st[0])/Math.PI*180,wt==="previous"&&!(vt===Pe.uid&&Fe.i===_t+1)&&(be=null)}if(wt==="previous"&&!Pe._geo)if(vt===Pe.uid&&Fe.i===_t+1&&P(Ye)&&P(yt)){var Bt=Ye-rt,Ft=yt-mt,Wt=Pe.line&&Pe.line.shape||"",lr=Wt.slice(Wt.length-1);lr==="h"&&(Ft=0),lr==="v"&&(Bt=0),be+=ue(Ft,Bt)/Math.PI*180+90}else be=null}return rt=Ye,mt=yt,_t=Fe.i,vt=Pe.uid,be}c.getMarkerAngle=ut}}),Tg=Ne({"src/components/titles/index.js"(te,Z){var v=xn(),w=Fn(),C=ff(),P=Yo(),t=In(),r=t.strTranslate,a=zs(),l=Ha(),i=hc(),s=El(),o=Ad().OPPOSITE_SIDE,u=/ [XY][0-9]* /,d=1.6,h=1.6;function g(m,E,c){var _=m._fullLayout,T=c.propContainer,M=c.propName,k=c.placeholder,b=c.traceIndex,A=c.avoid||{},y=c.attributes,f=c.transform,p=c.containerGroup,x=1,N=T.title,D=(N&&N.text?N.text:"").trim(),B=!1,U=N&&N.font?N.font:{},V=U.family,q=U.size,z=U.color,H=U.weight,G=U.style,J=U.variant,le=U.textcase,ge=U.lineposition,de=U.shadow,me=c.subtitlePropName,W=!!me,ie=c.subtitlePlaceholder,se=(T.title||{}).subtitle||{text:"",font:{}},ee=(se.text||"").trim(),pe=!1,oe=1,Y=se.font,ce=Y.family,ue=Y.size,_e=Y.color,Le=Y.weight,ze=Y.style,Xe=Y.variant,Ve=Y.textcase,rt=Y.lineposition,mt=Y.shadow,_t;M==="title.text"?_t="titleText":M.indexOf("axis")!==-1?_t="axisTitleText":M.indexOf("colorbar")!==-1&&(_t="colorbarTitleText");var vt=m._context.edits[_t];function ut(jr,fn){return jr===void 0||fn===void 0?!1:jr.replace(u," % ")===fn.replace(u," % ")}D===""?x=0:ut(D,k)&&(vt||(D=""),x=.2,B=!0),W&&(ee===""?oe=0:ut(ee,ie)&&(vt||(ee=""),oe=.2,pe=!0)),c._meta?D=t.templateString(D,c._meta):_._meta&&(D=t.templateString(D,_._meta));var Fe=D||ee||vt,Pe;p||(p=t.ensureSingle(_._infolayer,"g","g-"+E),Pe=_._hColorbarMoveTitle);var be=p.selectAll("text."+E).data(Fe?[0]:[]);be.enter().append("text"),be.text(D).attr("class",E),be.exit().remove();var Ye=null,yt=E+"-subtitle",wt=ee||vt;if(W&&(Ye=p.selectAll("text."+yt).data(wt?[0]:[]),Ye.enter().append("text"),Ye.text(ee).attr("class",yt),Ye.exit().remove()),!Fe)return p;function ht(jr,fn){t.syncOrAsync([Yt,$t],{title:jr,subtitle:fn})}function Yt(jr){var fn=jr.title,Br=jr.subtitle,Qr;!f&&Pe&&(f={}),f?(Qr="",f.rotate&&(Qr+="rotate("+[f.rotate,y.x,y.y]+")"),(f.offset||Pe)&&(Qr+=r(0,(f.offset||0)-(Pe||0)))):Qr=null,fn.attr("transform",Qr);function Ot(Ie){if(Ie){var tt=v.select(Ie.node().parentNode).select("."+yt);if(!tt.empty()){var st=Ie.node().getBBox();if(st.height){var Bt=st.y+st.height+d*ue;tt.attr("y",Bt)}}}}if(fn.style("opacity",x*l.opacity(z)).call(a.font,{color:l.rgb(z),size:v.round(q,2),family:V,weight:H,style:G,variant:J,textcase:le,shadow:de,lineposition:ge}).attr(y).call(i.convertToTspans,m,Ot),Br&&!Br.empty()){var $e=p.select("."+E+"-math-group"),ot=fn.node().getBBox(),De=$e.node()?$e.node().getBBox():void 0,Ee=De?De.y+De.height+d*ue:ot.y+ot.height+h*ue,Ae=t.extendFlat({},y,{y:Ee});Br.attr("transform",Qr),Br.style("opacity",oe*l.opacity(_e)).call(a.font,{color:l.rgb(_e),size:v.round(ue,2),family:ce,weight:Le,style:ze,variant:Xe,textcase:Ve,shadow:mt,lineposition:rt}).attr(Ae).call(i.convertToTspans,m)}return C.previousPromises(m)}function $t(jr){var fn=jr.title,Br=v.select(fn.node().parentNode);if(A&&A.selection&&A.side&&D){Br.attr("transform",null);var Qr=o[A.side],Ot=A.side==="left"||A.side==="top"?-1:1,$e=w(A.pad)?A.pad:2,ot=a.bBox(Br.node()),De={t:0,b:0,l:0,r:0},Ee=m._fullLayout._reservedMargin;for(var Ae in Ee)for(var Ie in Ee[Ae]){var tt=Ee[Ae][Ie];De[Ie]=Math.max(De[Ie],tt)}var st={left:De.l,top:De.t,right:_.width-De.r,bottom:_.height-De.b},Bt=A.maxShift||Ot*(st[A.side]-ot[A.side]),Ft=0;if(Bt<0)Ft=Bt;else{var Wt=A.offsetLeft||0,lr=A.offsetTop||0;ot.left-=Wt,ot.right-=Wt,ot.top-=lr,ot.bottom-=lr,A.selection.each(function(){var Mr=a.bBox(this);t.bBoxIntersect(ot,Mr,$e)&&(Ft=Math.max(Ft,Ot*(Mr[A.side]-ot[Qr])+$e))}),Ft=Math.min(Bt,Ft),T._titleScoot=Math.abs(Ft)}if(Ft>0||Bt<0){var Rr={left:[-Ft,0],right:[Ft,0],top:[0,-Ft],bottom:[0,Ft]}[A.side];Br.attr("transform",r(Rr[0],Rr[1]))}}}be.call(ht,Ye);function fr(jr,fn){jr.text(fn).on("mouseover.opacity",function(){v.select(this).transition().duration(s.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){v.select(this).transition().duration(s.HIDE_PLACEHOLDER).style("opacity",0)})}if(vt&&(D?be.on(".opacity",null):(fr(be,k),B=!0),be.call(i.makeEditable,{gd:m}).on("edit",function(jr){b!==void 0?P.call("_guiRestyle",m,M,jr,b):P.call("_guiRelayout",m,M,jr)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(ht)}).on("input",function(jr){this.text(jr||" ").call(i.positionText,y.x,y.y)}),W)){if(W&&!D){var mr=be.node().getBBox(),Ur=mr.y+mr.height+h*ue;Ye.attr("y",Ur)}ee?Ye.on(".opacity",null):(fr(Ye,ie),pe=!0),Ye.call(i.makeEditable,{gd:m}).on("edit",function(jr){P.call("_guiRelayout",m,"title.subtitle.text",jr)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(ht)}).on("input",function(jr){this.text(jr||" ").call(i.positionText,Ye.attr("x"),Ye.attr("y"))})}return be.classed("js-placeholder",B),Ye&&!Ye.empty()&&Ye.classed("js-placeholder",pe),p}Z.exports={draw:g,SUBTITLE_PADDING_EM:h,SUBTITLE_PADDING_MATHJAX_EM:d}}}),Vp=Ne({"src/plots/cartesian/set_convert.js"(te,Z){var v=xn(),w=On().utcFormat,C=In(),P=C.numberFormat,t=Fn(),r=C.cleanNumber,a=C.ms2DateTime,l=C.dateTime2ms,i=C.ensureNumber,s=C.isArrayOrTypedArray,o=da(),u=o.FP_SAFE,d=o.BADNUM,h=o.LOG_CLIP,g=o.ONEWEEK,m=o.ONEDAY,E=o.ONEHOUR,c=o.ONEMIN,_=o.ONESEC,T=Wf(),M=wh(),k=M.HOUR_PATTERN,b=M.WEEKDAY_PATTERN;function A(f){return Math.pow(10,f)}function y(f){return f!=null}Z.exports=function(p,x){x=x||{};var N=p._id||"x",D=N.charAt(0);function B(ee,pe){if(ee>0)return Math.log(ee)/Math.LN10;if(ee<=0&&pe&&p.range&&p.range.length===2){var oe=p.range[0],Y=p.range[1];return .5*(oe+Y-2*h*Math.abs(oe-Y))}else return d}function U(ee,pe,oe,Y){if((Y||{}).msUTC&&t(ee))return+ee;var ce=l(ee,oe||p.calendar);if(ce===d)if(t(ee)){ee=+ee;var ue=Math.floor(C.mod(ee+.05,1)*10),_e=Math.round(ee-ue/10);ce=l(new Date(_e))+ue/10}else return d;return ce}function V(ee,pe,oe){return a(ee,pe,oe||p.calendar)}function q(ee){return p._categories[Math.round(ee)]}function z(ee){if(y(ee)){if(p._categoriesMap===void 0&&(p._categoriesMap={}),p._categoriesMap[ee]!==void 0)return p._categoriesMap[ee];p._categories.push(typeof ee=="number"?String(ee):ee);var pe=p._categories.length-1;return p._categoriesMap[ee]=pe,pe}return d}function H(ee,pe){for(var oe=new Array(pe),Y=0;Y<pe;Y++){var ce=(ee[0]||[])[Y],ue=(ee[1]||[])[Y];oe[Y]=G([ce,ue])}return oe}function G(ee){if(p._categoriesMap)return p._categoriesMap[ee]}function J(ee){var pe=G(ee);if(pe!==void 0)return pe;if(t(ee))return+ee}function le(ee){return t(ee)?+ee:G(ee)}function ge(ee,pe,oe){return v.round(oe+pe*ee,2)}function de(ee,pe,oe){return(ee-oe)/pe}var me=function(pe){return t(pe)?ge(pe,p._m,p._b):d},W=function(ee){return de(ee,p._m,p._b)};if(p.rangebreaks){var ie=D==="y";me=function(ee){if(!t(ee))return d;var pe=p._rangebreaks.length;if(!pe)return ge(ee,p._m,p._b);var oe=ie;p.range[0]>p.range[1]&&(oe=!oe);for(var Y=oe?-1:1,ce=Y*ee,ue=0,_e=0;_e<pe;_e++){var Le=Y*p._rangebreaks[_e].min,ze=Y*p._rangebreaks[_e].max;if(ce<Le)break;if(ce>ze)ue=_e+1;else{ue=ce<(Le+ze)/2?_e:_e+1;break}}var Xe=p._B[ue]||0;return isFinite(Xe)?ge(ee,p._m2,Xe):0},W=function(ee){var pe=p._rangebreaks.length;if(!pe)return de(ee,p._m,p._b);for(var oe=0,Y=0;Y<pe&&!(ee<p._rangebreaks[Y].pmin);Y++)ee>p._rangebreaks[Y].pmax&&(oe=Y+1);return de(ee,p._m2,p._B[oe])}}p.c2l=p.type==="log"?B:i,p.l2c=p.type==="log"?A:i,p.l2p=me,p.p2l=W,p.c2p=p.type==="log"?function(ee,pe){return me(B(ee,pe))}:me,p.p2c=p.type==="log"?function(ee){return A(W(ee))}:W,["linear","-"].indexOf(p.type)!==-1?(p.d2r=p.r2d=p.d2c=p.r2c=p.d2l=p.r2l=r,p.c2d=p.c2r=p.l2d=p.l2r=i,p.d2p=p.r2p=function(ee){return p.l2p(r(ee))},p.p2d=p.p2r=W,p.cleanPos=i):p.type==="log"?(p.d2r=p.d2l=function(ee,pe){return B(r(ee),pe)},p.r2d=p.r2c=function(ee){return A(r(ee))},p.d2c=p.r2l=r,p.c2d=p.l2r=i,p.c2r=B,p.l2d=A,p.d2p=function(ee,pe){return p.l2p(p.d2r(ee,pe))},p.p2d=function(ee){return A(W(ee))},p.r2p=function(ee){return p.l2p(r(ee))},p.p2r=W,p.cleanPos=i):p.type==="date"?(p.d2r=p.r2d=C.identity,p.d2c=p.r2c=p.d2l=p.r2l=U,p.c2d=p.c2r=p.l2d=p.l2r=V,p.d2p=p.r2p=function(ee,pe,oe){return p.l2p(U(ee,0,oe))},p.p2d=p.p2r=function(ee,pe,oe){return V(W(ee),pe,oe)},p.cleanPos=function(ee){return C.cleanDate(ee,d,p.calendar)}):p.type==="category"?(p.d2c=p.d2l=z,p.r2d=p.c2d=p.l2d=q,p.d2r=p.d2l_noadd=J,p.r2c=function(ee){var pe=le(ee);return pe!==void 0?pe:p.fraction2r(.5)},p.l2r=p.c2r=i,p.r2l=le,p.d2p=function(ee){return p.l2p(p.r2c(ee))},p.p2d=function(ee){return q(W(ee))},p.r2p=p.d2p,p.p2r=W,p.cleanPos=function(ee){return typeof ee=="string"&&ee!==""?ee:i(ee)}):p.type==="multicategory"&&(p.r2d=p.c2d=p.l2d=q,p.d2r=p.d2l_noadd=J,p.r2c=function(ee){var pe=J(ee);return pe!==void 0?pe:p.fraction2r(.5)},p.r2c_just_indices=G,p.l2r=p.c2r=i,p.r2l=J,p.d2p=function(ee){return p.l2p(p.r2c(ee))},p.p2d=function(ee){return q(W(ee))},p.r2p=p.d2p,p.p2r=W,p.cleanPos=function(ee){return Array.isArray(ee)||typeof ee=="string"&&ee!==""?ee:i(ee)},p.setupMultiCategory=function(ee){var pe=p._traceIndices,oe,Y,ce=p._matchGroup;if(ce&&p._categories.length===0){for(var ue in ce)if(ue!==N){var _e=x[T.id2name(ue)];pe=pe.concat(_e._traceIndices)}}var Le=[[0,{}],[0,{}]],ze=[];for(oe=0;oe<pe.length;oe++){var Xe=ee[pe[oe]];if(D in Xe){var Ve=Xe[D],rt=Xe._length||C.minRowLength(Ve);if(s(Ve[0])&&s(Ve[1]))for(Y=0;Y<rt;Y++){var mt=Ve[0][Y],_t=Ve[1][Y];y(mt)&&y(_t)&&(ze.push([mt,_t]),mt in Le[0][1]||(Le[0][1][mt]=Le[0][0]++),_t in Le[1][1]||(Le[1][1][_t]=Le[1][0]++))}}}for(ze.sort(function(vt,ut){var Fe=Le[0][1],Pe=Fe[vt[0]]-Fe[ut[0]];if(Pe)return Pe;var be=Le[1][1];return be[vt[1]]-be[ut[1]]}),oe=0;oe<ze.length;oe++)z(ze[oe])}),p.fraction2r=function(ee){var pe=p.r2l(p.range[0]),oe=p.r2l(p.range[1]);return p.l2r(pe+ee*(oe-pe))},p.r2fraction=function(ee){var pe=p.r2l(p.range[0]),oe=p.r2l(p.range[1]);return(p.r2l(ee)-pe)/(oe-pe)},p.limitRange=function(ee){var pe=p.minallowed,oe=p.maxallowed;if(!(pe===void 0&&oe===void 0)){ee||(ee="range");var Y=C.nestedProperty(p,ee).get(),ce=C.simpleMap(Y,p.r2l),ue=ce[1]<ce[0];ue&&ce.reverse();var _e=C.simpleMap([pe,oe],p.r2l);if(pe!==void 0&&ce[0]<_e[0]&&(Y[ue?1:0]=pe),oe!==void 0&&ce[1]>_e[1]&&(Y[ue?0:1]=oe),Y[0]===Y[1]){var Le=p.l2r(pe),ze=p.l2r(oe);if(pe!==void 0){var Xe=Le+1;oe!==void 0&&(Xe=Math.min(Xe,ze)),Y[ue?1:0]=Xe}if(oe!==void 0){var Ve=ze+1;pe!==void 0&&(Ve=Math.max(Ve,Le)),Y[ue?0:1]=Ve}}}},p.cleanRange=function(ee,pe){p._cleanRange(ee,pe),p.limitRange(ee)},p._cleanRange=function(ee,pe){pe||(pe={}),ee||(ee="range");var oe=C.nestedProperty(p,ee).get(),Y,ce;if(p.type==="date"?ce=C.dfltRange(p.calendar):D==="y"?ce=M.DFLTRANGEY:p._name==="realaxis"?ce=[0,1]:ce=pe.dfltRange||M.DFLTRANGEX,ce=ce.slice(),(p.rangemode==="tozero"||p.rangemode==="nonnegative")&&(ce[0]=0),!oe||oe.length!==2){C.nestedProperty(p,ee).set(ce);return}var ue=oe[0]===null,_e=oe[1]===null;for(p.type==="date"&&!p.autorange&&(oe[0]=C.cleanDate(oe[0],d,p.calendar),oe[1]=C.cleanDate(oe[1],d,p.calendar)),Y=0;Y<2;Y++)if(p.type==="date"){if(!C.isDateTime(oe[Y],p.calendar)){p[ee]=ce;break}if(p.r2l(oe[0])===p.r2l(oe[1])){var Le=C.constrain(p.r2l(oe[0]),C.MIN_MS+1e3,C.MAX_MS-1e3);oe[0]=p.l2r(Le-1e3),oe[1]=p.l2r(Le+1e3);break}}else{if(!t(oe[Y]))if(!(ue||_e)&&t(oe[1-Y]))oe[Y]=oe[1-Y]*(Y?10:.1);else{p[ee]=ce;break}if(oe[Y]<-u?oe[Y]=-u:oe[Y]>u&&(oe[Y]=u),oe[0]===oe[1]){var ze=Math.max(1,Math.abs(oe[0]*1e-6));oe[0]-=ze,oe[1]+=ze}}},p.setScale=function(ee){var pe=x._size;if(p.overlaying){var oe=T.getFromId({_fullLayout:x},p.overlaying);p.domain=oe.domain}var Y=ee&&p._r?"_r":"range",ce=p.calendar;p.cleanRange(Y);var ue=p.r2l(p[Y][0],ce),_e=p.r2l(p[Y][1],ce),Le=D==="y";if(Le?(p._offset=pe.t+(1-p.domain[1])*pe.h,p._length=pe.h*(p.domain[1]-p.domain[0]),p._m=p._length/(ue-_e),p._b=-p._m*_e):(p._offset=pe.l+p.domain[0]*pe.w,p._length=pe.w*(p.domain[1]-p.domain[0]),p._m=p._length/(_e-ue),p._b=-p._m*ue),p._rangebreaks=[],p._lBreaks=0,p._m2=0,p._B=[],p.rangebreaks){var ze,Xe;if(p._rangebreaks=p.locateBreaks(Math.min(ue,_e),Math.max(ue,_e)),p._rangebreaks.length){for(ze=0;ze<p._rangebreaks.length;ze++)Xe=p._rangebreaks[ze],p._lBreaks+=Math.abs(Xe.max-Xe.min);var Ve=Le;ue>_e&&(Ve=!Ve),Ve&&p._rangebreaks.reverse();var rt=Ve?-1:1;for(p._m2=rt*p._length/(Math.abs(_e-ue)-p._lBreaks),p._B.push(-p._m2*(Le?_e:ue)),ze=0;ze<p._rangebreaks.length;ze++)Xe=p._rangebreaks[ze],p._B.push(p._B[p._B.length-1]-rt*p._m2*(Xe.max-Xe.min));for(ze=0;ze<p._rangebreaks.length;ze++)Xe=p._rangebreaks[ze],Xe.pmin=me(Xe.min),Xe.pmax=me(Xe.max)}}if(!isFinite(p._m)||!isFinite(p._b)||p._length<0)throw x._replotting=!1,new Error("Something went wrong with axis scaling")},p.maskBreaks=function(ee){var pe=p.rangebreaks||[],oe,Y,ce,ue,_e;pe._cachedPatterns||(pe._cachedPatterns=pe.map(function(Fe){return Fe.enabled&&Fe.bounds?C.simpleMap(Fe.bounds,Fe.pattern?r:p.d2c):null})),pe._cachedValues||(pe._cachedValues=pe.map(function(Fe){return Fe.enabled&&Fe.values?C.simpleMap(Fe.values,p.d2c).sort(C.sorterAsc):null}));for(var Le=0;Le<pe.length;Le++){var ze=pe[Le];if(ze.enabled){if(ze.bounds){var Xe=ze.pattern;switch(oe=pe._cachedPatterns[Le],Y=oe[0],ce=oe[1],Xe){case b:_e=new Date(ee),ue=_e.getUTCDay(),Y>ce&&(ce+=7,ue<Y&&(ue+=7));break;case k:_e=new Date(ee);var Ve=_e.getUTCHours(),rt=_e.getUTCMinutes(),mt=_e.getUTCSeconds(),_t=_e.getUTCMilliseconds();ue=Ve+(rt/60+mt/3600+_t/36e5),Y>ce&&(ce+=24,ue<Y&&(ue+=24));break;case"":ue=ee;break}if(ue>=Y&&ue<ce)return d}else for(var vt=pe._cachedValues[Le],ut=0;ut<vt.length;ut++)if(Y=vt[ut],ce=Y+ze.dvalue,ee>=Y&&ee<ce)return d}}return ee},p.locateBreaks=function(ee,pe){var oe,Y,ce,ue,_e=[];if(!p.rangebreaks)return _e;var Le=p.rangebreaks.slice().sort(function(be,Ye){return be.pattern===b&&Ye.pattern===k?-1:Ye.pattern===b&&be.pattern===k?1:0}),ze=function(be,Ye){if(be=C.constrain(be,ee,pe),Ye=C.constrain(Ye,ee,pe),be!==Ye){for(var yt=!0,wt=0;wt<_e.length;wt++){var ht=_e[wt];be<ht.max&&Ye>=ht.min&&(be<ht.min&&(ht.min=be),Ye>ht.max&&(ht.max=Ye),yt=!1)}yt&&_e.push({min:be,max:Ye})}};for(oe=0;oe<Le.length;oe++){var Xe=Le[oe];if(Xe.enabled)if(Xe.bounds){var Ve=ee,rt=pe;Xe.pattern&&(Ve=Math.floor(Ve)),Y=C.simpleMap(Xe.bounds,Xe.pattern?r:p.r2l),ce=Y[0],ue=Y[1];var mt=new Date(Ve),_t,vt;switch(Xe.pattern){case b:vt=g,_t=((ue<ce?7:0)+(ue-ce))*m,Ve+=ce*m-(mt.getUTCDay()*m+mt.getUTCHours()*E+mt.getUTCMinutes()*c+mt.getUTCSeconds()*_+mt.getUTCMilliseconds());break;case k:vt=m,_t=((ue<ce?24:0)+(ue-ce))*E,Ve+=ce*E-(mt.getUTCHours()*E+mt.getUTCMinutes()*c+mt.getUTCSeconds()*_+mt.getUTCMilliseconds());break;default:Ve=Math.min(Y[0],Y[1]),rt=Math.max(Y[0],Y[1]),vt=rt-Ve,_t=vt}for(var ut=Ve;ut<rt;ut+=vt)ze(ut,ut+_t)}else for(var Fe=C.simpleMap(Xe.values,p.d2c),Pe=0;Pe<Fe.length;Pe++)ce=Fe[Pe],ue=ce+Xe.dvalue,ze(ce,ue)}return _e.sort(function(be,Ye){return be.min-Ye.min}),_e},p.makeCalcdata=function(ee,pe,oe){var Y,ce,ue,_e,Le=p.type,ze=Le==="date"&&ee[pe+"calendar"];if(pe in ee){if(Y=ee[pe],_e=ee._length||C.minRowLength(Y),C.isTypedArray(Y)&&(Le==="linear"||Le==="log")){if(_e===Y.length)return Y;if(Y.subarray)return Y.subarray(0,_e)}if(Le==="multicategory")return H(Y,_e);for(ce=new Array(_e),ue=0;ue<_e;ue++)ce[ue]=p.d2c(Y[ue],0,ze,oe)}else{var Xe=pe+"0"in ee?p.d2c(ee[pe+"0"],0,ze):0,Ve=ee["d"+pe]?Number(ee["d"+pe]):1;for(Y=ee[{x:"y",y:"x"}[pe]],_e=ee._length||Y.length,ce=new Array(_e),ue=0;ue<_e;ue++)ce[ue]=Xe+ue*Ve}if(p.rangebreaks)for(ue=0;ue<_e;ue++)ce[ue]=p.maskBreaks(ce[ue]);return ce},p.isValidRange=function(ee,pe){return Array.isArray(ee)&&ee.length===2&&(pe&&ee[0]===null||t(p.r2l(ee[0])))&&(pe&&ee[1]===null||t(p.r2l(ee[1])))},p.getAutorangeDflt=function(ee,pe){var oe=!p.isValidRange(ee,"nullOk");return oe&&pe&&pe.reverseDflt?oe="reversed":ee&&(ee[0]===null&&ee[1]===null?oe=!0:ee[0]===null&&ee[1]!==null?oe="min":ee[0]!==null&&ee[1]===null&&(oe="max")),oe},p.isReversed=function(){var ee=p.autorange;return ee==="reversed"||ee==="min reversed"||ee==="max reversed"},p.isPtWithinRange=function(ee,pe){var oe=p.c2l(ee[D],null,pe),Y=p.r2l(p.range[0]),ce=p.r2l(p.range[1]);return Y<ce?Y<=oe&&oe<=ce:ce<=oe&&oe<=Y},p._emptyCategories=function(){p._categories=[],p._categoriesMap={}},p.clearCalc=function(){var ee=p._matchGroup;if(ee){var pe=null,oe=null;for(var Y in ee){var ce=x[T.id2name(Y)];if(ce._categories){pe=ce._categories,oe=ce._categoriesMap;break}}pe&&oe?(p._categories=pe,p._categoriesMap=oe):p._emptyCategories()}else p._emptyCategories();if(p._initialCategories)for(var ue=0;ue<p._initialCategories.length;ue++)z(p._initialCategories[ue])},p.sortByInitialCategories=function(){var ee=[];if(p._emptyCategories(),p._initialCategories)for(var pe=0;pe<p._initialCategories.length;pe++)z(p._initialCategories[pe]);ee=ee.concat(p._traceIndices);var oe=p._matchGroup;for(var Y in oe)if(N!==Y){var ce=x[T.id2name(Y)];ce._categories=p._categories,ce._categoriesMap=p._categoriesMap,ee=ee.concat(ce._traceIndices)}return ee};var se=x._d3locale;p.type==="date"&&(p._dateFormat=se?se.timeFormat:w,p._extraFormat=x._extraFormat),p._separators=x.separators,p._numFormat=se?se.numberFormat:P,delete p._minDtick,delete p._forceTick0}}}),Ag=Ne({"src/plots/cartesian/axis_autotype.js"(te,Z){var v=Fn(),w=In(),C=da().BADNUM,P=w.isArrayOrTypedArray,t=w.isDateTime,r=w.cleanNumber,a=Math.round;Z.exports=function(g,m,E){var c=g,_=E.noMultiCategory;if(P(c)&&!c.length)return"-";if(!_&&d(c))return"multicategory";if(_&&Array.isArray(c[0])){for(var T=[],M=0;M<c.length;M++)if(P(c[M]))for(var k=0;k<c[M].length;k++)T.push(c[M][k]);c=T}if(s(c,m))return"date";var b=E.autotypenumbers!=="strict";return u(c,b)?"category":i(c,b)?"linear":"-"};function l(h,g){return g?v(h):typeof h=="number"}function i(h,g){for(var m=h.length,E=0;E<m;E++)if(l(h[E],g))return!0;return!1}function s(h,g){for(var m=h.length,E=o(m),c=0,_=0,T={},M=0;M<m;M+=E){var k=a(M),b=h[k],A=String(b);T[A]||(T[A]=1,t(b,g)&&c++,v(b)&&_++)}return c>_*2}function o(h){return Math.max(1,(h-1)/1e3)}function u(h,g){for(var m=h.length,E=o(m),c=0,_=0,T={},M=0;M<m;M+=E){var k=a(M),b=h[k],A=String(b);if(!T[A]){T[A]=1;var y=typeof b;y==="boolean"?_++:(g?r(b)!==C:y==="number")?c++:y==="string"&&_++}}return _>c*2}function d(h){return P(h[0])&&P(h[1])}}}),Cm=Ne({"src/plots/cartesian/autorange.js"(te,Z){var v=xn(),w=Fn(),C=In(),P=da().FP_SAFE,t=Yo(),r=zs(),a=Wf(),l=a.getFromId,i=a.isLinked;Z.exports={applyAutorangeOptions:p,getAutoRange:s,makePadFn:u,doAutoRange:m,findExtremes:E,concatExtremes:g};function s(x,N){var D,B,U=[],V=x._fullLayout,q=u(V,N,0),z=u(V,N,1),H=g(x,N),G=H.min,J=H.max;if(G.length===0||J.length===0)return C.simpleMap(N.range,N.r2l);var le=G[0].val,ge=J[0].val;for(D=1;D<G.length&&le===ge;D++)le=Math.min(le,G[D].val);for(D=1;D<J.length&&le===ge;D++)ge=Math.max(ge,J[D].val);var de=N.autorange,me=de==="reversed"||de==="min reversed"||de==="max reversed";if(!me&&N.range){var W=C.simpleMap(N.range,N.r2l);me=W[1]<W[0]}N.autorange==="reversed"&&(N.autorange=!0);var ie=N.rangemode,se=ie==="tozero",ee=ie==="nonnegative",pe=N._length,oe=pe/10,Y=0,ce,ue,_e,Le,ze,Xe;for(D=0;D<G.length;D++)for(ce=G[D],B=0;B<J.length;B++)ue=J[B],Xe=ue.val-ce.val-o(N,ce.val,ue.val),Xe>0&&(ze=pe-q(ce)-z(ue),ze>oe?Xe/ze>Y&&(_e=ce,Le=ue,Y=Xe/ze):Xe/pe>Y&&(_e={val:ce.val,nopad:1},Le={val:ue.val,nopad:1},Y=Xe/pe));function Ve(ut,Fe){return Math.max(ut,z(Fe))}if(le===ge){var rt=le-1,mt=le+1;if(se)if(le===0)U=[0,1];else{var _t=(le>0?J:G).reduce(Ve,0),vt=le/(1-Math.min(.5,_t/pe));U=le>0?[0,vt]:[vt,0]}else ee?U=[Math.max(0,rt),Math.max(1,mt)]:U=[rt,mt]}else se?(_e.val>=0&&(_e={val:0,nopad:1}),Le.val<=0&&(Le={val:0,nopad:1})):ee&&(_e.val-Y*q(_e)<0&&(_e={val:0,nopad:1}),Le.val<=0&&(Le={val:1,nopad:1})),Y=(Le.val-_e.val-o(N,ce.val,ue.val))/(pe-q(_e)-z(Le)),U=[_e.val-Y*q(_e),Le.val+Y*z(Le)];return U=p(U,N),N.limitRange&&N.limitRange(),me&&U.reverse(),C.simpleMap(U,N.l2r||Number)}function o(x,N,D){var B=0;if(x.rangebreaks)for(var U=x.locateBreaks(N,D),V=0;V<U.length;V++){var q=U[V];B+=q.max-q.min}return B}function u(x,N,D){var B=.05*N._length,U=N._anchorAxis||{};if((N.ticklabelposition||"").indexOf("inside")!==-1||(U.ticklabelposition||"").indexOf("inside")!==-1){var V=N.isReversed();if(!V){var q=C.simpleMap(N.range,N.r2l);V=q[1]<q[0]}V&&(D=!D)}var z=0;return i(x,N._id)||(z=h(x,N,D)),B=Math.max(z,B),N.constrain==="domain"&&N._inputDomain&&(B*=(N._inputDomain[1]-N._inputDomain[0])/(N.domain[1]-N.domain[0])),function(G){return G.nopad?0:G.pad+(G.extrapad?B:z)}}var d=3;function h(x,N,D){var B=0,U=N._id.charAt(0)==="x";for(var V in x._plots){var q=x._plots[V];if(!(N._id!==q.xaxis._id&&N._id!==q.yaxis._id)){var z=(U?q.yaxis:q.xaxis)||{};if((z.ticklabelposition||"").indexOf("inside")!==-1&&(!D&&(z.side==="left"||z.side==="bottom")||D&&(z.side==="top"||z.side==="right"))){if(z._vals){var H=C.deg2rad(z._tickAngles[z._id+"tick"]||0),G=Math.abs(Math.cos(H)),J=Math.abs(Math.sin(H));if(!z._vals[0].bb){var le=z._id+"tick",ge=z._selections[le];ge.each(function(ee){var pe=v.select(this),oe=pe.select(".text-math-group");oe.empty()&&(ee.bb=r.bBox(pe.node()))})}for(var de=0;de<z._vals.length;de++){var me=z._vals[de],W=me.bb;if(W){var ie=2*d+W.width,se=2*d+W.height;B=Math.max(B,U?Math.max(ie*G,se*J):Math.max(se*G,ie*J))}}}z.ticks==="inside"&&z.ticklabelposition==="inside"&&(B+=z.ticklen||0)}}}return B}function g(x,N,D){var B=N._id,U=x._fullData,V=x._fullLayout,q=[],z=[],H,G,J;function le(ie,se){for(H=0;H<se.length;H++){var ee=ie[se[H]],pe=(ee._extremes||{})[B];if(ee.visible===!0&&pe){for(G=0;G<pe.min.length;G++)J=pe.min[G],c(q,J.val,J.pad,{extrapad:J.extrapad});for(G=0;G<pe.max.length;G++)J=pe.max[G],_(z,J.val,J.pad,{extrapad:J.extrapad})}}}if(le(U,N._traceIndices),le(V.annotations||[],N._annIndices||[]),le(V.shapes||[],N._shapeIndices||[]),N._matchGroup&&!D){for(var ge in N._matchGroup)if(ge!==N._id){var de=l(x,ge),me=g(x,de,!0),W=N._length/de._length;for(G=0;G<me.min.length;G++)J=me.min[G],c(q,J.val,J.pad*W,{extrapad:J.extrapad});for(G=0;G<me.max.length;G++)J=me.max[G],_(z,J.val,J.pad*W,{extrapad:J.extrapad})}}return{min:q,max:z}}function m(x,N,D){if(N.setScale(),N.autorange){N.range=D?D.slice():s(x,N),N._r=N.range.slice(),N._rl=C.simpleMap(N._r,N.r2l);var B=N._input,U={};U[N._attr+".range"]=N.range,U[N._attr+".autorange"]=N.autorange,t.call("_storeDirectGUIEdit",x.layout,x._fullLayout._preGUI,U),B.range=N.range.slice(),B.autorange=N.autorange}var V=N._anchorAxis;if(V&&V.rangeslider){var q=V.rangeslider[N._name];q&&q.rangemode==="auto"&&(q.range=s(x,N)),V._input.rangeslider[N._name]=C.extendFlat({},q)}}function E(x,N,D){D||(D={}),x._m||x.setScale();var B=[],U=[],V=N.length,q=D.padded||!1,z=D.tozero&&(x.type==="linear"||x.type==="-"),H=x.type==="log",G=!1,J=D.vpadLinearized||!1,le,ge,de,me,W,ie,se,ee,pe;function oe(Ve){if(Array.isArray(Ve))return G=!0,function(mt){return Math.max(Number(Ve[mt]||0),0)};var rt=Math.max(Number(Ve||0),0);return function(){return rt}}var Y=oe((x._m>0?D.ppadplus:D.ppadminus)||D.ppad||0),ce=oe((x._m>0?D.ppadminus:D.ppadplus)||D.ppad||0),ue=oe(D.vpadplus||D.vpad),_e=oe(D.vpadminus||D.vpad);if(!G){if(ee=1/0,pe=-1/0,H)for(le=0;le<V;le++)ge=N[le],ge<ee&&ge>0&&(ee=ge),ge>pe&&ge<P&&(pe=ge);else for(le=0;le<V;le++)ge=N[le],ge<ee&&ge>-P&&(ee=ge),ge>pe&&ge<P&&(pe=ge);N=[ee,pe],V=2}var Le={tozero:z,extrapad:q};function ze(Ve){de=N[Ve],w(de)&&(ie=Y(Ve),se=ce(Ve),J?(me=x.c2l(de)-_e(Ve),W=x.c2l(de)+ue(Ve)):(ee=de-_e(Ve),pe=de+ue(Ve),H&&ee<pe/10&&(ee=pe/10),me=x.c2l(ee),W=x.c2l(pe)),z&&(me=Math.min(0,me),W=Math.max(0,W)),M(me)&&c(B,me,se,Le),M(W)&&_(U,W,ie,Le))}var Xe=Math.min(6,V);for(le=0;le<Xe;le++)ze(le);for(le=V-1;le>=Xe;le--)ze(le);return{min:B,max:U,opts:D}}function c(x,N,D,B){T(x,N,D,B,k)}function _(x,N,D,B){T(x,N,D,B,b)}function T(x,N,D,B,U){for(var V=B.tozero,q=B.extrapad,z=!0,H=0;H<x.length&&z;H++){var G=x[H];if(U(G.val,N)&&G.pad>=D&&(G.extrapad||!q)){z=!1;break}else U(N,G.val)&&G.pad<=D&&(q||!G.extrapad)&&(x.splice(H,1),H--)}if(z){var J=V&&N===0;x.push({val:N,pad:J?0:D,extrapad:J?!1:q})}}function M(x){return w(x)&&Math.abs(x)<P}function k(x,N){return x<=N}function b(x,N){return x>=N}function A(x,N){var D=N.autorangeoptions;return D&&D.minallowed!==void 0&&f(N,D.minallowed,D.maxallowed)?D.minallowed:D&&D.clipmin!==void 0&&f(N,D.clipmin,D.clipmax)?Math.max(x,N.d2l(D.clipmin)):x}function y(x,N){var D=N.autorangeoptions;return D&&D.maxallowed!==void 0&&f(N,D.minallowed,D.maxallowed)?D.maxallowed:D&&D.clipmax!==void 0&&f(N,D.clipmin,D.clipmax)?Math.min(x,N.d2l(D.clipmax)):x}function f(x,N,D){return N!==void 0&&D!==void 0?(N=x.d2l(N),D=x.d2l(D),N<D):!0}function p(x,N){if(!N||!N.autorangeoptions)return x;var D=x[0],B=x[1],U=N.autorangeoptions.include;if(U!==void 0){var V=N.d2l(D),q=N.d2l(B);C.isArrayOrTypedArray(U)||(U=[U]);for(var z=0;z<U.length;z++){var H=N.d2l(U[z]);V>=H&&(V=H,D=H),q<=H&&(q=H,B=H)}}return D=A(D,N),B=y(B,N),[D,B]}}}),Os=Ne({"src/plots/cartesian/axes.js"(te,Z){var v=xn(),w=Fn(),C=ff(),P=Yo(),t=In(),r=t.strTranslate,a=hc(),l=Tg(),i=Ha(),s=zs(),o=Sd(),u=Rw(),d=da(),h=d.ONEMAXYEAR,g=d.ONEAVGYEAR,m=d.ONEMINYEAR,E=d.ONEMAXQUARTER,c=d.ONEAVGQUARTER,_=d.ONEMINQUARTER,T=d.ONEMAXMONTH,M=d.ONEAVGMONTH,k=d.ONEMINMONTH,b=d.ONEWEEK,A=d.ONEDAY,y=A/2,f=d.ONEHOUR,p=d.ONEMIN,x=d.ONESEC,N=d.ONEMILLI,D=d.ONEMICROSEC,B=d.MINUS_SIGN,U=d.BADNUM,V={K:"zeroline"},q={K:"gridline",L:"path"},z={K:"minor-gridline",L:"path"},H={K:"tick",L:"path"},G={K:"tick",L:"text"},J={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},le=Ad(),ge=le.MID_SHIFT,de=le.CAP_SHIFT,me=le.LINE_SPACING,W=le.OPPOSITE_SIDE,ie=3,se=Z.exports={};se.setConvert=Vp();var ee=Ag(),pe=Wf(),oe=pe.idSort,Y=pe.isLinked;se.id2name=pe.id2name,se.name2id=pe.name2id,se.cleanId=pe.cleanId,se.list=pe.list,se.listIds=pe.listIds,se.getFromId=pe.getFromId,se.getFromTrace=pe.getFromTrace;var ce=Cm();se.getAutoRange=ce.getAutoRange,se.findExtremes=ce.findExtremes;var ue=1e-4;function _e(Ht){var kt=(Ht[1]-Ht[0])*ue;return[Ht[0]-kt,Ht[1]+kt]}se.coerceRef=function(Ht,kt,qr,en,rn,Wr){var tn=en.charAt(en.length-1),Tn=qr._fullLayout._subplots[tn+"axis"],dn=en+"ref",It={};return rn||(rn=Tn[0]||(typeof Wr=="string"?Wr:Wr[0])),Wr||(Wr=rn),Tn=Tn.concat(Tn.map(function(xr){return xr+" domain"})),It[dn]={valType:"enumerated",values:Tn.concat(Wr?typeof Wr=="string"?[Wr]:Wr:[]),dflt:rn},t.coerce(Ht,kt,It,dn)},se.getRefType=function(Ht){return Ht===void 0?Ht:Ht==="paper"?"paper":Ht==="pixel"?"pixel":/( domain)$/.test(Ht)?"domain":"range"},se.coercePosition=function(Ht,kt,qr,en,rn,Wr){var tn,Tn,dn=se.getRefType(en);if(dn!=="range")tn=t.ensureNumber,Tn=qr(rn,Wr);else{var It=se.getFromId(kt,en);Wr=It.fraction2r(Wr),Tn=qr(rn,Wr),tn=It.cleanPos}Ht[rn]=tn(Tn)},se.cleanPosition=function(Ht,kt,qr){var en=qr==="paper"||qr==="pixel"?t.ensureNumber:se.getFromId(kt,qr).cleanPos;return en(Ht)},se.redrawComponents=function(Ht,kt){kt=kt||se.listIds(Ht);var qr=Ht._fullLayout;function en(rn,Wr,tn,Tn){for(var dn=P.getComponentMethod(rn,Wr),It={},xr=0;xr<kt.length;xr++)for(var Yr=qr[se.id2name(kt[xr])],An=Yr[tn],Zn=0;Zn<An.length;Zn++){var sa=An[Zn];if(!It[sa]&&(dn(Ht,sa),It[sa]=1,Tn))return}}en("annotations","drawOne","_annIndices"),en("shapes","drawOne","_shapeIndices"),en("images","draw","_imgIndices",!0),en("selections","drawOne","_selectionIndices")};var Le=se.getDataConversions=function(Ht,kt,qr,en){var rn,Wr=qr==="x"||qr==="y"||qr==="z"?qr:en;if(t.isArrayOrTypedArray(Wr)){if(rn={type:ee(en,void 0,{autotypenumbers:Ht._fullLayout.autotypenumbers}),_categories:[]},se.setConvert(rn),rn.type==="category")for(var tn=0;tn<en.length;tn++)rn.d2c(en[tn])}else rn=se.getFromTrace(Ht,kt,Wr);return rn?{d2c:rn.d2c,c2d:rn.c2d}:Wr==="ids"?{d2c:Xe,c2d:Xe}:{d2c:ze,c2d:ze}};function ze(Ht){return+Ht}function Xe(Ht){return String(Ht)}se.getDataToCoordFunc=function(Ht,kt,qr,en){return Le(Ht,kt,qr,en).d2c},se.counterLetter=function(Ht){var kt=Ht.charAt(0);if(kt==="x")return"y";if(kt==="y")return"x"},se.minDtick=function(Ht,kt,qr,en){["log","category","multicategory"].indexOf(Ht.type)!==-1||!en?Ht._minDtick=0:Ht._minDtick===void 0?(Ht._minDtick=kt,Ht._forceTick0=qr):Ht._minDtick&&((Ht._minDtick/kt+1e-6)%1<2e-6&&((qr-Ht._forceTick0)/kt%1+1.000001)%1<2e-6?(Ht._minDtick=kt,Ht._forceTick0=qr):((kt/Ht._minDtick+1e-6)%1>2e-6||((qr-Ht._forceTick0)/Ht._minDtick%1+1.000001)%1>2e-6)&&(Ht._minDtick=0))},se.saveRangeInitial=function(Ht,kt){for(var qr=se.list(Ht,"",!0),en=!1,rn=0;rn<qr.length;rn++){var Wr=qr[rn],tn=Wr._rangeInitial0===void 0&&Wr._rangeInitial1===void 0,Tn=tn||Wr.range[0]!==Wr._rangeInitial0||Wr.range[1]!==Wr._rangeInitial1,dn=Wr.autorange;(tn&&dn!==!0||kt&&Tn)&&(Wr._rangeInitial0=dn==="min"||dn==="max reversed"?void 0:Wr.range[0],Wr._rangeInitial1=dn==="max"||dn==="min reversed"?void 0:Wr.range[1],Wr._autorangeInitial=dn,en=!0)}return en},se.saveShowSpikeInitial=function(Ht,kt){for(var qr=se.list(Ht,"",!0),en=!1,rn="on",Wr=0;Wr<qr.length;Wr++){var tn=qr[Wr],Tn=tn._showSpikeInitial===void 0,dn=Tn||tn.showspikes!==tn._showspikes;(Tn||kt&&dn)&&(tn._showSpikeInitial=tn.showspikes,en=!0),rn==="on"&&!tn.showspikes&&(rn="off")}return Ht._fullLayout._cartesianSpikesEnabled=rn,en},se.autoBin=function(Ht,kt,qr,en,rn,Wr){var tn=t.aggNums(Math.min,null,Ht),Tn=t.aggNums(Math.max,null,Ht);if(kt.type==="category"||kt.type==="multicategory")return{start:tn-.5,end:Tn+.5,size:Math.max(1,Math.round(Wr)||1),_dataSpan:Tn-tn};rn||(rn=kt.calendar);var dn;if(kt.type==="log"?dn={type:"linear",range:[tn,Tn]}:dn={type:kt.type,range:t.simpleMap([tn,Tn],kt.c2r,0,rn),calendar:rn},se.setConvert(dn),Wr=Wr&&u.dtick(Wr,dn.type),Wr)dn.dtick=Wr,dn.tick0=u.tick0(void 0,dn.type,rn);else{var It;if(qr)It=(Tn-tn)/qr;else{var xr=t.distinctVals(Ht),Yr=Math.pow(10,Math.floor(Math.log(xr.minDiff)/Math.LN10)),An=Yr*t.roundUp(xr.minDiff/Yr,[.9,1.9,4.9,9.9],!0);It=Math.max(An,2*t.stdev(Ht)/Math.pow(Ht.length,en?.25:.4)),w(It)||(It=1)}se.autoTicks(dn,It)}var Zn=dn.dtick,sa=se.tickIncrement(se.tickFirst(dn),Zn,"reverse",rn),oa,Sn;if(typeof Zn=="number")sa=Ve(sa,Ht,dn,tn,Tn),Sn=1+Math.floor((Tn-sa)/Zn),oa=sa+Sn*Zn;else for(dn.dtick.charAt(0)==="M"&&(sa=rt(sa,Ht,Zn,tn,rn)),oa=sa,Sn=0;oa<=Tn;)oa=se.tickIncrement(oa,Zn,!1,rn),Sn++;return{start:kt.c2r(sa,0,rn),end:kt.c2r(oa,0,rn),size:Zn,_dataSpan:Tn-tn}};function Ve(Ht,kt,qr,en,rn){var Wr=0,tn=0,Tn=0,dn=0;function It(Zn){return(1+(Zn-Ht)*100/qr.dtick)%100<2}for(var xr=0;xr<kt.length;xr++)kt[xr]%1===0?Tn++:w(kt[xr])||dn++,It(kt[xr])&&Wr++,It(kt[xr]+qr.dtick/2)&&tn++;var Yr=kt.length-dn;if(Tn===Yr&&qr.type!=="date")qr.dtick<1?Ht=en-.5*qr.dtick:(Ht-=.5,Ht+qr.dtick<en&&(Ht+=qr.dtick));else if(tn<Yr*.1&&(Wr>Yr*.3||It(en)||It(rn))){var An=qr.dtick/2;Ht+=Ht+An<en?An:-An}return Ht}function rt(Ht,kt,qr,en,rn){var Wr=t.findExactDates(kt,rn),tn=.8;if(Wr.exactDays>tn){var Tn=Number(qr.substr(1));Wr.exactYears>tn&&Tn%12===0?Ht=se.tickIncrement(Ht,"M6","reverse")+A*1.5:Wr.exactMonths>tn?Ht=se.tickIncrement(Ht,"M1","reverse")+A*15.5:Ht-=y;var dn=se.tickIncrement(Ht,qr);if(dn<=en)return dn}return Ht}se.prepMinorTicks=function(Ht,kt,qr){if(!kt.minor.dtick){delete Ht.dtick;var en=kt.dtick&&w(kt._tmin),rn;if(en){var Wr=se.tickIncrement(kt._tmin,kt.dtick,!0);rn=[kt._tmin,Wr*.99+kt._tmin*.01]}else{var tn=t.simpleMap(kt.range,kt.r2l);rn=[tn[0],.8*tn[0]+.2*tn[1]]}if(Ht.range=t.simpleMap(rn,kt.l2r),Ht._isMinor=!0,se.prepTicks(Ht,qr),en){var Tn=w(kt.dtick),dn=w(Ht.dtick),It=Tn?kt.dtick:+kt.dtick.substring(1),xr=dn?Ht.dtick:+Ht.dtick.substring(1);Tn&&dn?mt(It,xr)?It===2*b&&xr===2*A&&(Ht.dtick=b):It===2*b&&xr===3*A?Ht.dtick=b:It===b&&!(kt._input.minor||{}).nticks?Ht.dtick=A:_t(It/xr,2.5)?Ht.dtick=It/2:Ht.dtick=It:String(kt.dtick).charAt(0)==="M"?dn?Ht.dtick="M1":mt(It,xr)?It>=12&&xr===2&&(Ht.dtick="M3"):Ht.dtick=kt.dtick:String(Ht.dtick).charAt(0)==="L"?String(kt.dtick).charAt(0)==="L"?mt(It,xr)||(Ht.dtick=_t(It/xr,2.5)?kt.dtick/2:kt.dtick):Ht.dtick="D1":Ht.dtick==="D2"&&+kt.dtick>1&&(Ht.dtick=1)}Ht.range=kt.range}kt.minor._tick0Init===void 0&&(Ht.tick0=kt.tick0)};function mt(Ht,kt){return Math.abs((Ht/kt+.5)%1-.5)<.001}function _t(Ht,kt){return Math.abs(Ht/kt-1)<.001}se.prepTicks=function(Ht,kt){var qr=t.simpleMap(Ht.range,Ht.r2l,void 0,void 0,kt);if(Ht.tickmode==="auto"||!Ht.dtick){var en=Ht.nticks,rn;en||(Ht.type==="category"||Ht.type==="multicategory"?(rn=Ht.tickfont?t.bigFont(Ht.tickfont.size||12):15,en=Ht._length/rn):(rn=Ht._id.charAt(0)==="y"?40:80,en=t.constrain(Ht._length/rn,4,9)+1),Ht._name==="radialaxis"&&(en*=2)),Ht.minor&&Ht.minor.tickmode!=="array"||Ht.tickmode==="array"&&(en*=100),Ht._roughDTick=Math.abs(qr[1]-qr[0])/en,se.autoTicks(Ht,Ht._roughDTick),Ht._minDtick>0&&Ht.dtick<Ht._minDtick*2&&(Ht.dtick=Ht._minDtick,Ht.tick0=Ht.l2r(Ht._forceTick0))}Ht.ticklabelmode==="period"&&ut(Ht),Ht.tick0||(Ht.tick0=Ht.type==="date"?"2000-01-01":0),Ht.type==="date"&&Ht.dtick<.1&&(Ht.dtick=.1),jr(Ht)};function vt(Ht){return+Ht.substring(1)}function ut(Ht){var kt;function qr(){return!(w(Ht.dtick)||Ht.dtick.charAt(0)!=="M")}var en=qr(),rn=se.getTickFormat(Ht);if(rn){var Wr=Ht._dtickInit!==Ht.dtick;/%[fLQsSMX]/.test(rn)||(/%[HI]/.test(rn)?(kt=f,Wr&&!en&&Ht.dtick<f&&(Ht.dtick=f)):/%p/.test(rn)?(kt=y,Wr&&!en&&Ht.dtick<y&&(Ht.dtick=y)):/%[Aadejuwx]/.test(rn)?(kt=A,Wr&&!en&&Ht.dtick<A&&(Ht.dtick=A)):/%[UVW]/.test(rn)?(kt=b,Wr&&!en&&Ht.dtick<b&&(Ht.dtick=b)):/%[Bbm]/.test(rn)?(kt=M,Wr&&(en?vt(Ht.dtick)<1:Ht.dtick<k)&&(Ht.dtick="M1")):/%[q]/.test(rn)?(kt=c,Wr&&(en?vt(Ht.dtick)<3:Ht.dtick<_)&&(Ht.dtick="M3")):/%[Yy]/.test(rn)&&(kt=g,Wr&&(en?vt(Ht.dtick)<12:Ht.dtick<m)&&(Ht.dtick="M12")))}en=qr(),en&&Ht.tick0===Ht._dowTick0&&(Ht.tick0=Ht._rawTick0),Ht._definedDelta=kt}function Fe(Ht,kt,qr){for(var en=0;en<Ht.length;en++){var rn=Ht[en].value,Wr=en,tn=en+1;en<Ht.length-1?(Wr=en,tn=en+1):en>0?(Wr=en-1,tn=en):(Wr=en,tn=en);var Tn=Ht[Wr].value,dn=Ht[tn].value,It=Math.abs(dn-Tn),xr=qr||It,Yr=0;xr>=m?It>=m&&It<=h?Yr=It:Yr=g:qr===c&&xr>=_?It>=_&&It<=E?Yr=It:Yr=c:xr>=k?It>=k&&It<=T?Yr=It:Yr=M:qr===b&&xr>=b?Yr=b:xr>=A?Yr=A:qr===y&&xr>=y?Yr=y:qr===f&&xr>=f&&(Yr=f);var An;Yr>=It&&(Yr=It,An=!0);var Zn=rn+Yr;if(kt.rangebreaks&&Yr>0){for(var sa=84,oa=0,Sn=0;Sn<sa;Sn++){var Kn=(Sn+.5)/sa;kt.maskBreaks(rn*(1-Kn)+Kn*Zn)!==U&&oa++}Yr*=oa/sa,Yr||(Ht[en].drop=!0),An&&It>b&&(Yr=It)}(Yr>0||en===0)&&(Ht[en].periodX=rn+Yr/2)}}se.calcTicks=function(kt,qr){for(var en=kt.type,rn=kt.calendar,Wr=kt.ticklabelstep,tn=kt.ticklabelmode==="period",Tn=kt.range[0]>kt.range[1],dn=!kt.ticklabelindex||t.isArrayOrTypedArray(kt.ticklabelindex)?kt.ticklabelindex:[kt.ticklabelindex],It=t.simpleMap(kt.range,kt.r2l,void 0,void 0,qr),xr=It[1]<It[0],Yr=Math.min(It[0],It[1]),An=Math.max(It[0],It[1]),Zn=Math.max(1e3,kt._length||0),sa=[],oa=[],Sn=[],Kn=[],Ui=[],Za=kt.minor&&(kt.minor.ticks||kt.minor.showgrid),Ki=1;Ki>=(Za?0:1);Ki--){var ho=!Ki;Ki?(kt._dtickInit=kt.dtick,kt._tick0Init=kt.tick0):(kt.minor._dtickInit=kt.minor.dtick,kt.minor._tick0Init=kt.minor.tick0);var Co=Ki?kt:t.extendFlat({},kt,kt.minor);if(ho?se.prepMinorTicks(Co,kt,qr):se.prepTicks(Co,qr),Co.tickmode==="array"){Ki?(Sn=[],sa=Ye(kt,!ho)):(Kn=[],oa=Ye(kt,!ho));continue}if(Co.tickmode==="sync"){Sn=[],sa=be(kt);continue}var So=_e(It),Vo=So[0],Oi=So[1],ps=w(Co.dtick),as=en==="log"&&!(ps||Co.dtick.charAt(0)==="L"),rl=se.tickFirst(Co,qr);if(Ki){if(kt._tmin=rl,rl<Vo!==xr)break;(en==="category"||en==="multicategory")&&(Oi=xr?Math.max(-.5,Oi):Math.min(kt._categories.length-.5,Oi))}var As=null,hs=rl,ts;if(Ki){var nl;ps?nl=kt.dtick:en==="date"?typeof kt.dtick=="string"&&kt.dtick.charAt(0)==="M"&&(nl=M*kt.dtick.substring(1)):nl=kt._roughDTick,ts=Math.round((kt.r2l(hs)-kt.r2l(kt.tick0))/nl)-1}var Qs=Co.dtick;for(Co.rangebreaks&&Co._tick0Init!==Co.tick0&&(hs=Ia(hs,kt),xr||(hs=se.tickIncrement(hs,Qs,!xr,rn))),Ki&&tn&&(hs=se.tickIncrement(hs,Qs,!xr,rn),ts--);xr?hs>=Oi:hs<=Oi;hs=se.tickIncrement(hs,Qs,xr,rn)){if(Ki&&ts++,Co.rangebreaks&&!xr){if(hs<Vo)continue;if(Co.maskBreaks(hs)===U&&Ia(hs,Co)>=An)break}if(Sn.length>Zn||hs===As)break;As=hs;var _l={value:hs};Ki?(as&&hs!==(hs|0)&&(_l.simpleLabel=!0),Wr>1&&ts%Wr&&(_l.skipLabel=!0),Sn.push(_l)):(_l.minor=!0,Kn.push(_l))}}if(!Kn||Kn.length<2)dn=!1;else{var Ss=(Kn[1].value-Kn[0].value)*(Tn?-1:1);Yi(Ss,kt.tickformat)||(dn=!1)}if(!dn)Ui=Sn;else{var ls=Sn.concat(Kn);tn&&Sn.length&&(ls=ls.slice(1)),ls=ls.sort(function(Zo,_u){return Zo.value-_u.value}).filter(function(Zo,_u,Au){return _u===0||Zo.value!==Au[_u-1].value});var Oo=ls.map(function(Zo,_u){return Zo.minor===void 0&&!Zo.skipLabel?_u:null}).filter(function(Zo){return Zo!==null});Oo.forEach(function(Zo){dn.map(function(_u){var Au=Zo+_u;Au>=0&&Au<ls.length&&t.pushUnique(Ui,ls[Au])})})}if(Za){var Es=kt.minor.ticks==="inside"&&kt.ticks==="outside"||kt.minor.ticks==="outside"&&kt.ticks==="inside";if(!Es){for(var xl=Sn.map(function(Zo){return Zo.value}),Ul=[],Hl=0;Hl<Kn.length;Hl++){var Fs=Kn[Hl],Ni=Fs.value;if(xl.indexOf(Ni)===-1){for(var wo=!1,ql=0;!wo&&ql<Sn.length;ql++)1e7+Sn[ql].value===1e7+Ni&&(wo=!0);wo||Ul.push(Fs)}}Kn=Ul}}tn&&Fe(Ui,kt,kt._definedDelta);var Gs;if(kt.rangebreaks){var Jo=kt._id.charAt(0)==="y",Gl=1;kt.tickmode==="auto"&&(Gl=kt.tickfont?kt.tickfont.size:12);var al=NaN;for(Gs=Sn.length-1;Gs>-1;Gs--){if(Sn[Gs].drop){Sn.splice(Gs,1);continue}Sn[Gs].value=Ia(Sn[Gs].value,kt);var bl=kt.c2p(Sn[Gs].value);(Jo?al>bl-Gl:al<bl+Gl)?Sn.splice(xr?Gs+1:Gs,1):al=bl}}za(kt)&&Math.abs(It[1]-It[0])===360&&Sn.pop(),kt._tmax=(Sn[Sn.length-1]||{}).value,kt._prevDateHead="",kt._inCalcTicks=!0;var Iu,_o=function(Zo){Zo.text="",kt._prevDateHead=Iu};Sn=Sn.concat(Kn);function Ps(Zo,_u){var Au=se.tickText(Zo,_u.value,!1,_u.simpleLabel),Ys=_u.periodX;return Ys!==void 0&&(Au.periodX=Ys,(Ys>An||Ys<Yr)&&(Ys>An&&(Au.periodX=An),Ys<Yr&&(Au.periodX=Yr),_o(Au))),Au}var ms;for(Gs=0;Gs<Sn.length;Gs++){var ru=Sn[Gs].minor,nu=Sn[Gs].value;ru?(dn&&Ui.indexOf(Sn[Gs])!==-1?ms=Ps(kt,Sn[Gs]):ms={x:nu},ms.minor=!0,oa.push(ms)):(Iu=kt._prevDateHead,ms=Ps(kt,Sn[Gs]),(Sn[Gs].skipLabel||dn&&Ui.indexOf(Sn[Gs])===-1)&&_o(ms),sa.push(ms))}return sa=sa.concat(oa),kt._inCalcTicks=!1,tn&&sa.length&&(sa[0].noTick=!0),sa};function Pe(Ht,kt){return Ht.rangebreaks&&(kt=kt.filter(function(qr){return Ht.maskBreaks(qr.x)!==U})),kt}function be(Ht){var kt=Ht._mainAxis,qr=[];if(kt._vals){for(var en=0;en<kt._vals.length;en++)if(!kt._vals[en].noTick){var rn=kt.l2p(kt._vals[en].x),Wr=Ht.p2l(rn),tn=se.tickText(Ht,Wr);kt._vals[en].minor&&(tn.minor=!0,tn.text=""),qr.push(tn)}}return qr=Pe(Ht,qr),qr}function Ye(Ht,kt){var qr=t.simpleMap(Ht.range,Ht.r2l),en=_e(qr),rn=Math.min(en[0],en[1]),Wr=Math.max(en[0],en[1]),tn=Ht.type==="category"?Ht.d2l_noadd:Ht.d2l;Ht.type==="log"&&String(Ht.dtick).charAt(0)!=="L"&&(Ht.dtick="L"+Math.pow(10,Math.floor(Math.min(Ht.range[0],Ht.range[1]))-1));for(var Tn=[],dn=0;dn<=1;dn++)if(!(kt!==void 0&&(kt&&dn||kt===!1&&!dn))&&!(dn&&!Ht.minor)){var It=dn?Ht.minor.tickvals:Ht.tickvals,xr=dn?[]:Ht.ticktext;if(It){t.isArrayOrTypedArray(xr)||(xr=[]);for(var Yr=0;Yr<It.length;Yr++){var An=tn(It[Yr]);if(An>rn&&An<Wr){var Zn=se.tickText(Ht,An,!1,String(xr[Yr]));dn&&(Zn.minor=!0,Zn.text=""),Tn.push(Zn)}}}}return Tn=Pe(Ht,Tn),Tn}var yt=[2,5,10],wt=[1,2,3,6,12],ht=[1,2,5,10,15,30],Yt=[1,2,3,7,14],$t=[-.046,0,.301,.477,.602,.699,.778,.845,.903,.954,1],fr=[-.301,0,.301,.699,1],mr=[15,30,45,90,180];function Ur(Ht,kt,qr){return kt*t.roundUp(Ht/kt,qr)}se.autoTicks=function(Ht,kt,qr){var en;function rn(Yr){return Math.pow(Yr,Math.floor(Math.log(kt)/Math.LN10))}if(Ht.type==="date"){Ht.tick0=t.dateTick0(Ht.calendar,0);var Wr=2*kt;if(Wr>g)kt/=g,en=rn(10),Ht.dtick="M"+12*Ur(kt,en,yt);else if(Wr>M)kt/=M,Ht.dtick="M"+Ur(kt,1,wt);else if(Wr>A){if(Ht.dtick=Ur(kt,A,Ht._hasDayOfWeekBreaks?[1,2,7,14]:Yt),!qr){var tn=se.getTickFormat(Ht),Tn=Ht.ticklabelmode==="period";Tn&&(Ht._rawTick0=Ht.tick0),/%[uVW]/.test(tn)?Ht.tick0=t.dateTick0(Ht.calendar,2):Ht.tick0=t.dateTick0(Ht.calendar,1),Tn&&(Ht._dowTick0=Ht.tick0)}}else Wr>f?Ht.dtick=Ur(kt,f,wt):Wr>p?Ht.dtick=Ur(kt,p,ht):Wr>x?Ht.dtick=Ur(kt,x,ht):(en=rn(10),Ht.dtick=Ur(kt,en,yt))}else if(Ht.type==="log"){Ht.tick0=0;var dn=t.simpleMap(Ht.range,Ht.r2l);if(Ht._isMinor&&(kt*=1.5),kt>.7)Ht.dtick=Math.ceil(kt);else if(Math.abs(dn[1]-dn[0])<1){var It=1.5*Math.abs((dn[1]-dn[0])/kt);kt=Math.abs(Math.pow(10,dn[1])-Math.pow(10,dn[0]))/It,en=rn(10),Ht.dtick="L"+Ur(kt,en,yt)}else Ht.dtick=kt>.3?"D2":"D1"}else Ht.type==="category"||Ht.type==="multicategory"?(Ht.tick0=0,Ht.dtick=Math.ceil(Math.max(kt,1))):za(Ht)?(Ht.tick0=0,en=1,Ht.dtick=Ur(kt,en,mr)):(Ht.tick0=0,en=rn(10),Ht.dtick=Ur(kt,en,yt));if(Ht.dtick===0&&(Ht.dtick=1),!w(Ht.dtick)&&typeof Ht.dtick!="string"){var xr=Ht.dtick;throw Ht.dtick=1,"ax.dtick error: "+String(xr)}};function jr(Ht){var kt=Ht.dtick;if(Ht._tickexponent=0,!w(kt)&&typeof kt!="string"&&(kt=1),(Ht.type==="category"||Ht.type==="multicategory")&&(Ht._tickround=null),Ht.type==="date"){var qr=Ht.r2l(Ht.tick0),en=Ht.l2r(qr).replace(/(^-|i)/g,""),rn=en.length;if(String(kt).charAt(0)==="M")rn>10||en.substr(5)!=="01-01"?Ht._tickround="d":Ht._tickround=+kt.substr(1)%12===0?"y":"m";else if(kt>=A&&rn<=10||kt>=A*15)Ht._tickround="d";else if(kt>=p&&rn<=16||kt>=f)Ht._tickround="M";else if(kt>=x&&rn<=19||kt>=p)Ht._tickround="S";else{var Wr=Ht.l2r(qr+kt).replace(/^-/,"").length;Ht._tickround=Math.max(rn,Wr)-20,Ht._tickround<0&&(Ht._tickround=4)}}else if(w(kt)||kt.charAt(0)==="L"){var tn=Ht.range.map(Ht.r2d||Number);w(kt)||(kt=Number(kt.substr(1))),Ht._tickround=2-Math.floor(Math.log(kt)/Math.LN10+.01);var Tn=Math.max(Math.abs(tn[0]),Math.abs(tn[1])),dn=Math.floor(Math.log(Tn)/Math.LN10+.01),It=Ht.minexponent===void 0?3:Ht.minexponent;Math.abs(dn)>It&&(tt(Ht.exponentformat)&&Ht.exponentformat!=="SI extended"&&!st(dn)||tt(Ht.exponentformat)&&Ht.exponentformat==="SI extended"&&!Bt(dn)?Ht._tickexponent=3*Math.round((dn-1)/3):Ht._tickexponent=dn)}else Ht._tickround=null}se.tickIncrement=function(Ht,kt,qr,en){var rn=qr?-1:1;if(w(kt))return t.increment(Ht,rn*kt);var Wr=kt.charAt(0),tn=rn*Number(kt.substr(1));if(Wr==="M")return t.incrementMonth(Ht,tn,en);if(Wr==="L")return Math.log(Math.pow(10,Ht)+tn)/Math.LN10;if(Wr==="D"){var Tn=kt==="D2"?fr:$t,dn=Ht+rn*.01,It=t.roundUp(t.mod(dn,1),Tn,qr);return Math.floor(dn)+Math.log(v.round(Math.pow(10,It),1))/Math.LN10}throw"unrecognized dtick "+String(kt)},se.tickFirst=function(Ht,kt){var qr=Ht.r2l||Number,en=t.simpleMap(Ht.range,qr,void 0,void 0,kt),rn=en[1]<en[0],Wr=rn?Math.floor:Math.ceil,tn=_e(en)[0],Tn=Ht.dtick,dn=qr(Ht.tick0);if(w(Tn)){var It=Wr((tn-dn)/Tn)*Tn+dn;return(Ht.type==="category"||Ht.type==="multicategory")&&(It=t.constrain(It,0,Ht._categories.length-1)),It}var xr=Tn.charAt(0),Yr=Number(Tn.substr(1));if(xr==="M"){for(var An=0,Zn=dn,sa,oa,Sn;An<10;){if(sa=se.tickIncrement(Zn,Tn,rn,Ht.calendar),(sa-tn)*(Zn-tn)<=0)return rn?Math.min(Zn,sa):Math.max(Zn,sa);oa=(tn-(Zn+sa)/2)/(sa-Zn),Sn=xr+(Math.abs(Math.round(oa))||1)*Yr,Zn=se.tickIncrement(Zn,Sn,oa<0?!rn:rn,Ht.calendar),An++}return t.error("tickFirst did not converge",Ht),Zn}else{if(xr==="L")return Math.log(Wr((Math.pow(10,tn)-dn)/Yr)*Yr+dn)/Math.LN10;if(xr==="D"){var Kn=Tn==="D2"?fr:$t,Ui=t.roundUp(t.mod(tn,1),Kn,rn);return Math.floor(tn)+Math.log(v.round(Math.pow(10,Ui),1))/Math.LN10}else throw"unrecognized dtick "+String(Tn)}},se.tickText=function(Ht,kt,qr,en){var rn=fn(Ht,kt),Wr=Ht.tickmode==="array",tn=qr||Wr,Tn=Ht.type,dn=Tn==="category"?Ht.d2l_noadd:Ht.d2l,It,xr=function(Sn){var Kn=Ht.l2p(Sn);return Kn>=0&&Kn<=Ht._length?Sn:null};if(Wr&&t.isArrayOrTypedArray(Ht.ticktext)){var Yr=t.simpleMap(Ht.range,Ht.r2l),An=(Math.abs(Yr[1]-Yr[0])-(Ht._lBreaks||0))/1e4;for(It=0;It<Ht.ticktext.length&&!(Math.abs(kt-dn(Ht.tickvals[It]))<An);It++);if(It<Ht.ticktext.length)return rn.text=String(Ht.ticktext[It]),rn.xbnd=[xr(rn.x-.5),xr(rn.x+Ht.dtick-.5)],rn}function Zn(Sn){if(Sn===void 0)return!0;if(qr)return Sn==="none";var Kn={first:Ht._tmin,last:Ht._tmax}[Sn];return Sn!=="all"&&kt!==Kn}var sa=qr?"never":Ht.exponentformat!=="none"&&Zn(Ht.showexponent)?"hide":"";if(Tn==="date"?Br(Ht,rn,qr,tn):Tn==="log"?Qr(Ht,rn,qr,tn,sa):Tn==="category"?Ot(Ht,rn):Tn==="multicategory"?$e(Ht,rn,qr):za(Ht)?De(Ht,rn,qr,tn,sa):ot(Ht,rn,qr,tn,sa),en||(Ht.tickprefix&&!Zn(Ht.showtickprefix)&&(rn.text=Ht.tickprefix+rn.text),Ht.ticksuffix&&!Zn(Ht.showticksuffix)&&(rn.text+=Ht.ticksuffix)),Ht.labelalias&&Ht.labelalias.hasOwnProperty(rn.text)){var oa=Ht.labelalias[rn.text];typeof oa=="string"&&(rn.text=oa)}return(Ht.tickson==="boundaries"||Ht.showdividers)&&(rn.xbnd=[xr(rn.x-.5),xr(rn.x+Ht.dtick-.5)]),rn},se.hoverLabelText=function(Ht,kt,qr){qr&&(Ht=t.extendFlat({},Ht,{hoverformat:qr}));var en=t.isArrayOrTypedArray(kt)?kt[0]:kt,rn=t.isArrayOrTypedArray(kt)?kt[1]:void 0;if(rn!==void 0&&rn!==en)return se.hoverLabelText(Ht,en,qr)+" - "+se.hoverLabelText(Ht,rn,qr);var Wr=Ht.type==="log"&&en<=0,tn=se.tickText(Ht,Ht.c2l(Wr?-en:en),"hover").text;return Wr?en===0?"0":B+tn:tn};function fn(Ht,kt,qr){var en=Ht.tickfont||{};return{x:kt,dx:0,dy:0,text:qr||"",fontSize:en.size,font:en.family,fontWeight:en.weight,fontStyle:en.style,fontVariant:en.variant,fontTextcase:en.textcase,fontLineposition:en.lineposition,fontShadow:en.shadow,fontColor:en.color}}function Br(Ht,kt,qr,en){var rn=Ht._tickround,Wr=qr&&Ht.hoverformat||se.getTickFormat(Ht);en=!Wr&&en,en&&(w(rn)?rn=4:rn={y:"m",m:"d",d:"M",M:"S",S:4}[rn]);var tn=t.formatDate(kt.x,Wr,rn,Ht._dateFormat,Ht.calendar,Ht._extraFormat),Tn,dn=tn.indexOf(`
`);if(dn!==-1&&(Tn=tn.substr(dn+1),tn=tn.substr(0,dn)),en&&(Tn!==void 0&&(tn==="00:00:00"||tn==="00:00")?(tn=Tn,Tn=""):tn.length===8&&(tn=tn.replace(/:00$/,""))),Tn)if(qr)rn==="d"?tn+=", "+Tn:tn=Tn+(tn?", "+tn:"");else if(!Ht._inCalcTicks||Ht._prevDateHead!==Tn)Ht._prevDateHead=Tn,tn+="<br>"+Tn;else{var It=Ba(Ht),xr=Ht._trueSide||Ht.side;(!It&&xr==="top"||It&&xr==="bottom")&&(tn+="<br> ")}kt.text=tn}function Qr(Ht,kt,qr,en,rn){var Wr=Ht.dtick,tn=kt.x,Tn=Ht.tickformat,dn=typeof Wr=="string"&&Wr.charAt(0);if(rn==="never"&&(rn=""),en&&dn!=="L"&&(Wr="L3",dn="L"),Tn||dn==="L")kt.text=Wt(Math.pow(10,tn),Ht,rn,en);else if(w(Wr)||dn==="D"&&(Ht.minorloglabels==="complete"||t.mod(tn+.01,1)<.1)){Ht.minorloglabels==="complete"&&!(t.mod(tn+.01,1)<.1)&&(kt.fontSize*=.75);var It=Math.pow(10,tn).toExponential(0),xr=It.split("e"),Yr=+xr[1],An=Math.abs(Yr),Zn=Ht.exponentformat;Zn==="power"||tt(Zn)&&Zn!=="SI extended"&&st(Yr)||tt(Zn)&&Zn==="SI extended"&&Bt(Yr)?(kt.text=xr[0],An>0&&(kt.text+="x10"),kt.text==="1x10"&&(kt.text="10"),Yr!==0&&Yr!==1&&(kt.text+="<sup>"+(Yr>0?"":B)+An+"</sup>"),kt.fontSize*=1.25):(Zn==="e"||Zn==="E")&&An>2?kt.text=xr[0]+Zn+(Yr>0?"+":B)+An:(kt.text=Wt(Math.pow(10,tn),Ht,"","fakehover"),Wr==="D1"&&Ht._id.charAt(0)==="y"&&(kt.dy-=kt.fontSize/6))}else if(dn==="D")kt.text=Ht.minorloglabels==="none"?"":String(Math.round(Math.pow(10,t.mod(tn,1)))),kt.fontSize*=.75;else throw"unrecognized dtick "+String(Wr);if(Ht.dtick==="D1"){var sa=String(kt.text).charAt(0);(sa==="0"||sa==="1")&&(Ht._id.charAt(0)==="y"?kt.dx-=kt.fontSize/4:(kt.dy+=kt.fontSize/2,kt.dx+=(Ht.range[1]>Ht.range[0]?1:-1)*kt.fontSize*(tn<0?.5:.25)))}}function Ot(Ht,kt){var qr=Ht._categories[Math.round(kt.x)];qr===void 0&&(qr=""),kt.text=String(qr)}function $e(Ht,kt,qr){var en=Math.round(kt.x),rn=Ht._categories[en]||[],Wr=rn[1]===void 0?"":String(rn[1]),tn=rn[0]===void 0?"":String(rn[0]);qr?kt.text=tn+" - "+Wr:(kt.text=Wr,kt.text2=tn)}function ot(Ht,kt,qr,en,rn){rn==="never"?rn="":Ht.showexponent==="all"&&Math.abs(kt.x/Ht.dtick)<1e-6&&(rn="hide"),kt.text=Wt(kt.x,Ht,rn,en)}function De(Ht,kt,qr,en,rn){if(Ht.thetaunit==="radians"&&!qr){var Wr=kt.x/180;if(Wr===0)kt.text="0";else{var tn=Ee(Wr);if(tn[1]>=100)kt.text=Wt(t.deg2rad(kt.x),Ht,rn,en);else{var Tn=kt.x<0;tn[1]===1?tn[0]===1?kt.text="π":kt.text=tn[0]+"π":kt.text=["<sup>",tn[0],"</sup>","⁄","<sub>",tn[1],"</sub>","π"].join(""),Tn&&(kt.text=B+kt.text)}}}else kt.text=Wt(kt.x,Ht,rn,en)}function Ee(Ht){function kt(Tn,dn){return Math.abs(Tn-dn)<=1e-6}function qr(Tn,dn){return kt(dn,0)?Tn:qr(dn,Tn%dn)}function en(Tn){for(var dn=1;!kt(Math.round(Tn*dn)/dn,Tn);)dn*=10;return dn}var rn=en(Ht),Wr=Ht*rn,tn=Math.abs(qr(Wr,rn));return[Math.round(Wr/tn),Math.round(rn/tn)]}var Ae=["f","p","n","μ","m","","k","M","G","T"],Ie=["q","r","y","z","a",...Ae,"P","E","Z","Y","R","Q"],tt=Ht=>["SI","SI extended","B"].includes(Ht);function st(Ht){return Ht>14||Ht<-15}function Bt(Ht){return Ht>32||Ht<-30}function Ft(Ht,kt){return tt(kt)?!!(kt==="SI extended"&&Bt(Ht)||kt!=="SI extended"&&st(Ht)):!1}function Wt(Ht,kt,qr,en){var rn=Ht<0,Wr=kt._tickround,tn=qr||kt.exponentformat||"B",Tn=kt._tickexponent,dn=se.getTickFormat(kt),It=kt.separatethousands;if(en){var xr={exponentformat:tn,minexponent:kt.minexponent,dtick:kt.showexponent==="none"?kt.dtick:w(Ht)&&Math.abs(Ht)||1,range:kt.showexponent==="none"?kt.range.map(kt.r2d):[0,Ht||1]};jr(xr),Wr=(Number(xr._tickround)||0)+4,Tn=xr._tickexponent,kt.hoverformat&&(dn=kt.hoverformat)}if(dn)return kt._numFormat(dn)(Ht).replace(/-/g,B);var Yr=Math.pow(10,-Wr)/2;if(tn==="none"&&(Tn=0),Ht=Math.abs(Ht),Ht<Yr)Ht="0",rn=!1;else{if(Ht+=Yr,Tn&&(Ht*=Math.pow(10,-Tn),Wr+=Tn),Wr===0)Ht=String(Math.floor(Ht));else if(Wr<0){Ht=String(Math.round(Ht)),Ht=Ht.substr(0,Ht.length+Wr);for(var An=Wr;An<0;An++)Ht+="0"}else{Ht=String(Ht);var Zn=Ht.indexOf(".")+1;Zn&&(Ht=Ht.substr(0,Zn+Wr).replace(/\.?0+$/,""))}Ht=t.numSeparate(Ht,kt._separators,It)}if(Tn&&tn!=="hide"){Ft(Tn,tn)&&(tn="power");var sa;Tn<0?sa=B+-Tn:tn!=="power"?sa="+"+Tn:sa=String(Tn),tn==="e"||tn==="E"?Ht+=tn+sa:tn==="power"?Ht+="×10<sup>"+sa+"</sup>":tn==="B"&&Tn===9?Ht+="B":tt(tn)&&(Ht+=tn==="SI extended"?Ie[Tn/3+10]:Ae[Tn/3+5])}return rn?B+Ht:Ht}se.getTickFormat=function(Ht){var kt;function qr(dn){return typeof dn!="string"?dn:Number(dn.replace("M",""))*M}function en(dn,It){var xr=["L","D"];if(typeof dn==typeof It){if(typeof dn=="number")return dn-It;var Yr=xr.indexOf(dn.charAt(0)),An=xr.indexOf(It.charAt(0));return Yr===An?Number(dn.replace(/(L|D)/g,""))-Number(It.replace(/(L|D)/g,"")):Yr-An}else return typeof dn=="number"?1:-1}function rn(dn,It,xr){var Yr=xr||function(sa){return sa},An=It[0],Zn=It[1];return(!An&&typeof An!="number"||Yr(An)<=Yr(dn))&&(!Zn&&typeof Zn!="number"||Yr(Zn)>=Yr(dn))}function Wr(dn,It){var xr=It[0]===null,Yr=It[1]===null,An=en(dn,It[0])>=0,Zn=en(dn,It[1])<=0;return(xr||An)&&(Yr||Zn)}var tn,Tn;if(Ht.tickformatstops&&Ht.tickformatstops.length>0)switch(Ht.type){case"date":case"linear":{for(kt=0;kt<Ht.tickformatstops.length;kt++)if(Tn=Ht.tickformatstops[kt],Tn.enabled&&rn(Ht.dtick,Tn.dtickrange,qr)){tn=Tn;break}break}case"log":{for(kt=0;kt<Ht.tickformatstops.length;kt++)if(Tn=Ht.tickformatstops[kt],Tn.enabled&&Wr(Ht.dtick,Tn.dtickrange)){tn=Tn;break}break}}return tn?tn.value:Ht.tickformat},se.getSubplots=function(Ht,kt){var qr=Ht._fullLayout._subplots,en=qr.cartesian.concat(qr.gl2d||[]),rn=kt?se.findSubplotsWithAxis(en,kt):en;return rn.sort(function(Wr,tn){var Tn=Wr.substr(1).split("y"),dn=tn.substr(1).split("y");return Tn[0]===dn[0]?+Tn[1]-+dn[1]:+Tn[0]-+dn[0]}),rn},se.findSubplotsWithAxis=function(Ht,kt){for(var qr=new RegExp(kt._id.charAt(0)==="x"?"^"+kt._id+"y":kt._id+"$"),en=[],rn=0;rn<Ht.length;rn++){var Wr=Ht[rn];qr.test(Wr)&&en.push(Wr)}return en},se.makeClipPaths=function(Ht){var kt=Ht._fullLayout;if(!kt._hasOnlyLargeSploms){var qr={_offset:0,_length:kt.width,_id:""},en={_offset:0,_length:kt.height,_id:""},rn=se.list(Ht,"x",!0),Wr=se.list(Ht,"y",!0),tn=[],Tn,dn;for(Tn=0;Tn<rn.length;Tn++)for(tn.push({x:rn[Tn],y:en}),dn=0;dn<Wr.length;dn++)Tn===0&&tn.push({x:qr,y:Wr[dn]}),tn.push({x:rn[Tn],y:Wr[dn]});var It=kt._clips.selectAll(".axesclip").data(tn,function(xr){return xr.x._id+xr.y._id});It.enter().append("clipPath").classed("axesclip",!0).attr("id",function(xr){return"clip"+kt._uid+xr.x._id+xr.y._id}).append("rect"),It.exit().remove(),It.each(function(xr){v.select(this).select("rect").attr({x:xr.x._offset||0,y:xr.y._offset||0,width:xr.x._length||1,height:xr.y._length||1})})}},se.draw=function(Ht,kt,qr){var en=Ht._fullLayout;kt==="redraw"&&en._paper.selectAll("g.subplot").each(function(dn){var It=dn[0],xr=en._plots[It];if(xr){var Yr=xr.xaxis,An=xr.yaxis;xr.xaxislayer.selectAll("."+Yr._id+"tick").remove(),xr.yaxislayer.selectAll("."+An._id+"tick").remove(),xr.xaxislayer.selectAll("."+Yr._id+"tick2").remove(),xr.yaxislayer.selectAll("."+An._id+"tick2").remove(),xr.xaxislayer.selectAll("."+Yr._id+"divider").remove(),xr.yaxislayer.selectAll("."+An._id+"divider").remove(),xr.minorGridlayer&&xr.minorGridlayer.selectAll("path").remove(),xr.gridlayer&&xr.gridlayer.selectAll("path").remove(),xr.zerolinelayer&&xr.zerolinelayer.selectAll("path").remove(),xr.zerolinelayerAbove&&xr.zerolinelayerAbove.selectAll("path").remove(),en._infolayer.select(".g-"+Yr._id+"title").remove(),en._infolayer.select(".g-"+An._id+"title").remove()}});var rn=!kt||kt==="redraw"?se.listIds(Ht):kt,Wr=se.list(Ht),tn=Wr.filter(function(dn){return dn.autoshift}).map(function(dn){return dn.overlaying});rn.map(function(dn){var It=se.getFromId(Ht,dn);if(It.tickmode==="sync"&&It.overlaying){var xr=rn.findIndex(function(Yr){return Yr===It.overlaying});xr>=0&&rn.unshift(rn.splice(xr,1).shift())}});var Tn={false:{left:0,right:0}};return t.syncOrAsync(rn.map(function(dn){return function(){if(dn){var It=se.getFromId(Ht,dn);qr||(qr={}),qr.axShifts=Tn,qr.overlayingShiftedAx=tn;var xr=se.drawOne(Ht,It,qr);return It._shiftPusher&&fa(It,It._fullDepth||0,Tn,!0),It._r=It.range.slice(),It._rl=t.simpleMap(It._r,It.r2l),xr}}}))},se.drawOne=function(Ht,kt,qr){qr=qr||{};var en=qr.axShifts||{},rn=qr.overlayingShiftedAx||[],Wr,tn,Tn;kt.setScale();var dn=Ht._fullLayout,It=kt._id,xr=It.charAt(0),Yr=se.counterLetter(It),An=dn._plots[kt._mainSubplot],Zn=kt.zerolinelayer==="above traces";if(!An)return;if(kt._shiftPusher=kt.autoshift||rn.indexOf(kt._id)!==-1||rn.indexOf(kt.overlaying)!==-1,kt._shiftPusher&kt.anchor==="free"){var sa=kt.linewidth/2||0;kt.ticks==="inside"&&(sa+=kt.ticklen),fa(kt,sa,en,!0),fa(kt,kt.shift||0,en,!1)}(qr.skipTitle!==!0||kt._shift===void 0)&&(kt._shift=Bi(kt,en));var oa=An[xr+"axislayer"],Sn=kt._mainLinePosition,Kn=Sn+=kt._shift,Ui=kt._mainMirrorPosition,Za=kt._vals=se.calcTicks(kt),Ki=[kt.mirror,Kn,Ui].join("_");for(Wr=0;Wr<Za.length;Wr++)Za[Wr].axInfo=Ki;kt._selections={},kt._tickAngles&&(kt._prevTickAngles=kt._tickAngles),kt._tickAngles={},kt._depth=null;var ho={};function Co(nu){var Zo=It+(nu||"tick");return ho[Zo]||(ho[Zo]=Kr(kt,Zo,Kn)),ho[Zo]}if(kt.visible){var So=se.makeTransTickFn(kt),Vo=se.makeTransTickLabelFn(kt),Oi,ps,as=kt.ticks==="inside",rl=kt.ticks==="outside";if(kt.tickson==="boundaries"){var As=Rr(kt,Za);ps=se.clipEnds(kt,As),Oi=as?ps:As}else ps=se.clipEnds(kt,Za),Oi=as&&kt.ticklabelmode!=="period"?ps:Za;var hs=kt._gridVals=ps,ts=Sr(kt,Za);if(!dn._hasOnlyLargeSploms){var nl=kt._subplotsWith,Qs={};for(Wr=0;Wr<nl.length;Wr++){tn=nl[Wr],Tn=dn._plots[tn];var _l=Tn[Yr+"axis"],Ss=_l._mainAxis._id;if(!Qs[Ss]){Qs[Ss]=1;var ls=xr==="x"?"M0,"+_l._offset+"v"+_l._length:"M"+_l._offset+",0h"+_l._length;se.drawGrid(Ht,kt,{vals:hs,counterAxis:_l,layer:Tn.gridlayer.select("."+It),minorLayer:Tn.minorGridlayer.select("."+It),path:ls,transFn:So}),se.drawZeroLine(Ht,kt,{counterAxis:_l,layer:Zn?Tn.zerolinelayerAbove:Tn.zerolinelayer,path:ls,transFn:So})}}}var Oo,Es=se.getTickSigns(kt),xl=se.getTickSigns(kt,"minor");if(kt.ticks||kt.minor&&kt.minor.ticks){var Ul=se.makeTickPath(kt,Kn,Es[2]),Hl=se.makeTickPath(kt,Kn,xl[2],{minor:!0}),Fs,Ni,wo,ql;if(kt._anchorAxis&&kt.mirror&&kt.mirror!==!0?(Fs=se.makeTickPath(kt,Ui,Es[3]),Ni=se.makeTickPath(kt,Ui,xl[3],{minor:!0}),wo=Ul+Fs,ql=Hl+Ni):(Fs="",Ni="",wo=Ul,ql=Hl),kt.showdividers&&rl&&kt.tickson==="boundaries"){var Gs={};for(Wr=0;Wr<ts.length;Wr++)Gs[ts[Wr].x]=1;Oo=function(nu){return Gs[nu.x]?Fs:wo}}else Oo=function(nu){return nu.minor?ql:wo}}if(se.drawTicks(Ht,kt,{vals:Oi,layer:oa,path:Oo,transFn:So}),kt.mirror==="allticks"){var Jo=Object.keys(kt._linepositions||{});for(Wr=0;Wr<Jo.length;Wr++){tn=Jo[Wr],Tn=dn._plots[tn];var Gl=kt._linepositions[tn]||[],al=Gl[0],bl=Gl[1],Iu=Gl[2],_o=se.makeTickPath(kt,al,Iu?Es[0]:xl[0],{minor:Iu})+se.makeTickPath(kt,bl,Iu?Es[1]:xl[1],{minor:Iu});se.drawTicks(Ht,kt,{vals:Oi,layer:Tn[xr+"axislayer"],path:_o,transFn:So})}}var Ps=[];if(Ps.push(function(){return se.drawLabels(Ht,kt,{vals:Za,layer:oa,plotinfo:Tn,transFn:Vo,labelFns:se.makeLabelFns(kt,Kn)})}),kt.type==="multicategory"){var ms={x:2,y:10}[xr];Ps.push(function(){var nu={x:"height",y:"width"}[xr],Zo=Co()[nu]+ms+(kt._tickAngles[It+"tick"]?kt.tickfont.size*me:0);return se.drawLabels(Ht,kt,{vals:Mr(kt,Za),layer:oa,cls:It+"tick2",repositionOnUpdate:!0,secondary:!0,transFn:So,labelFns:se.makeLabelFns(kt,Kn+Zo*Es[4])})}),Ps.push(function(){return kt._depth=Es[4]*(Co("tick2")[kt.side]-Kn),Ta(Ht,kt,{vals:ts,layer:oa,path:se.makeTickPath(kt,Kn,Es[4],{len:kt._depth}),transFn:So})})}else kt.title.hasOwnProperty("standoff")&&Ps.push(function(){kt._depth=Es[4]*(Co()[kt.side]-Kn)});var ru=P.getComponentMethod("rangeslider","isVisible")(kt);return!qr.skipTitle&&!(ru&&kt.side==="bottom")&&Ps.push(function(){return ia(Ht,kt)}),Ps.push(function(){var nu=kt.side.charAt(0),Zo=W[kt.side].charAt(0),_u=se.getPxPosition(Ht,kt),Au=rl?kt.ticklen:0,Ys,Ol,$l,Ql;(kt.automargin||ru||kt._shiftPusher)&&(kt.type==="multicategory"?Ys=Co("tick2"):(Ys=Co(),xr==="x"&&nu==="b"&&(kt._depth=Math.max(Ys.width>0?Ys.bottom-_u:0,Au))));var ac=0,Tf=0;if(kt._shiftPusher&&(ac=Math.max(Au,Ys.height>0?nu==="l"?_u-Ys.left:Ys.right-_u:0),kt.title.text!==dn._dfltTitle[xr]&&(Tf=(kt._titleStandoff||0)+(kt._titleScoot||0),nu==="l"&&(Tf+=Aa(kt))),kt._fullDepth=Math.max(ac,Tf)),kt.automargin){Ol={x:0,y:0,r:0,l:0,t:0,b:0};var rf=[0,1],df=typeof kt._shift=="number"?kt._shift:0;if(xr==="x"){if(nu==="b"?Ol[nu]=kt._depth:(Ol[nu]=kt._depth=Math.max(Ys.width>0?_u-Ys.top:0,Au),rf.reverse()),Ys.width>0){var Zh=Ys.right-(kt._offset+kt._length);Zh>0&&(Ol.xr=1,Ol.r=Zh);var zh=kt._offset-Ys.left;zh>0&&(Ol.xl=0,Ol.l=zh)}}else if(nu==="l"?(kt._depth=Math.max(Ys.height>0?_u-Ys.left:0,Au),Ol[nu]=kt._depth-df):(kt._depth=Math.max(Ys.height>0?Ys.right-_u:0,Au),Ol[nu]=kt._depth+df,rf.reverse()),Ys.height>0){var zl=Ys.bottom-(kt._offset+kt._length);zl>0&&(Ol.yb=0,Ol.b=zl);var Vc=kt._offset-Ys.top;Vc>0&&(Ol.yt=1,Ol.t=Vc)}Ol[Yr]=kt.anchor==="free"?kt.position:kt._anchorAxis.domain[rf[0]],kt.title.text!==dn._dfltTitle[xr]&&(Ol[nu]+=Aa(kt)+(kt.title.standoff||0)),kt.mirror&&kt.anchor!=="free"&&($l={x:0,y:0,r:0,l:0,t:0,b:0},$l[Zo]=kt.linewidth,kt.mirror&&kt.mirror!==!0&&($l[Zo]+=Au),kt.mirror===!0||kt.mirror==="ticks"?$l[Yr]=kt._anchorAxis.domain[rf[1]]:(kt.mirror==="all"||kt.mirror==="allticks")&&($l[Yr]=[kt._counterDomainMin,kt._counterDomainMax][rf[1]]))}ru&&(Ql=P.getComponentMethod("rangeslider","autoMarginOpts")(Ht,kt)),typeof kt.automargin=="string"&&(lr(Ol,kt.automargin),lr($l,kt.automargin)),C.autoMargin(Ht,yr(kt),Ol),C.autoMargin(Ht,br(kt),$l),C.autoMargin(Ht,an(kt),Ql)}),t.syncOrAsync(Ps)}};function lr(Ht,kt){if(Ht){var qr=Object.keys(J).reduce(function(en,rn){return kt.indexOf(rn)!==-1&&J[rn].forEach(function(Wr){en[Wr]=1}),en},{});Object.keys(Ht).forEach(function(en){qr[en]||(en.length===1?Ht[en]=0:delete Ht[en])})}}function Rr(Ht,kt){var qr=[],en,rn=function(Wr,tn){var Tn=Wr.xbnd[tn];Tn!==null&&qr.push(t.extendFlat({},Wr,{x:Tn}))};if(kt.length){for(en=0;en<kt.length;en++)rn(kt[en],0);rn(kt[en-1],1)}return qr}function Mr(Ht,kt){for(var qr=[],en={},rn=0;rn<kt.length;rn++){var Wr=kt[rn];en[Wr.text2]?en[Wr.text2].push(Wr.x):en[Wr.text2]=[Wr.x]}for(var tn in en)qr.push(fn(Ht,t.interp(en[tn],.5),tn));return qr}function Sr(Ht,kt){var qr=[],en,rn,Wr=kt.length&&kt[kt.length-1].x<kt[0].x,tn=function(dn,It){var xr=dn.xbnd[It];xr!==null&&qr.push(t.extendFlat({},dn,{x:xr}))};if(Ht.showdividers&&kt.length){for(en=0;en<kt.length;en++){var Tn=kt[en];Tn.text2!==rn&&tn(Tn,Wr?1:0),rn=Tn.text2}tn(kt[en-1],Wr?0:1)}return qr}function Kr(Ht,kt,qr){var en,rn,Wr,tn;if(Ht._selections[kt].size())en=1/0,rn=-1/0,Wr=1/0,tn=-1/0,Ht._selections[kt].each(function(){var dn=Qt(this);if(dn.node().style.display!=="none"){var It=s.bBox(dn.node().parentNode);en=Math.min(en,It.top),rn=Math.max(rn,It.bottom),Wr=Math.min(Wr,It.left),tn=Math.max(tn,It.right)}});else{var Tn=se.makeLabelFns(Ht,qr);en=rn=Tn.yFn({dx:0,dy:0,fontSize:0}),Wr=tn=Tn.xFn({dx:0,dy:0,fontSize:0})}return{top:en,bottom:rn,left:Wr,right:tn,height:rn-en,width:tn-Wr}}se.getTickSigns=function(Ht,kt){var qr=Ht._id.charAt(0),en={x:"top",y:"right"}[qr],rn=Ht.side===en?1:-1,Wr=[-1,1,rn,-rn],tn=kt?(Ht.minor||{}).ticks:Ht.ticks;return tn!=="inside"==(qr==="x")&&(Wr=Wr.map(function(Tn){return-Tn})),Ht.side&&Wr.push({l:-1,t:-1,r:1,b:1}[Ht.side.charAt(0)]),Wr},se.makeTransTickFn=function(Ht){return Ht._id.charAt(0)==="x"?function(kt){return r(Ht._offset+Ht.l2p(kt.x),0)}:function(kt){return r(0,Ht._offset+Ht.l2p(kt.x))}},se.makeTransTickLabelFn=function(Ht){var kt=ga(Ht),qr=Ht.ticklabelshift||0,en=Ht.ticklabelstandoff||0,rn=kt[0],Wr=kt[1],tn=Ht.range[0]>Ht.range[1],Tn=Ht.ticklabelposition&&Ht.ticklabelposition.indexOf("inside")!==-1,dn=!Tn;if(qr){var It=tn?-1:1;qr=qr*It}if(en){var xr=Ht.side,Yr=Tn&&(xr==="top"||xr==="left")||dn&&(xr==="bottom"||xr==="right")?1:-1;en=en*Yr}return Ht._id.charAt(0)==="x"?function(An){return r(rn+Ht._offset+Ht.l2p(Hn(An))+qr,Wr+en)}:function(An){return r(Wr+en,rn+Ht._offset+Ht.l2p(Hn(An))+qr)}};function Hn(Ht){return Ht.periodX!==void 0?Ht.periodX:Ht.x}function ga(Ht){var kt=Ht.ticklabelposition||"",qr=Ht.tickson||"",en=function(sa){return kt.indexOf(sa)!==-1},rn=en("top"),Wr=en("left"),tn=en("right"),Tn=en("bottom"),dn=en("inside"),It=qr!=="boundaries"&&(Tn||Wr||rn||tn);if(!It&&!dn)return[0,0];var xr=Ht.side,Yr=It?(Ht.tickwidth||0)/2:0,An=ie,Zn=Ht.tickfont?Ht.tickfont.size:12;return(Tn||rn)&&(Yr+=Zn*de,An+=(Ht.linewidth||0)/2),(Wr||tn)&&(Yr+=(Ht.linewidth||0)/2,An+=ie),dn&&xr==="top"&&(An-=Zn*(1-de)),(Wr||rn)&&(Yr=-Yr),(xr==="bottom"||xr==="right")&&(An=-An),[It?Yr:0,dn?An:0]}se.makeTickPath=function(Ht,kt,qr,en){en||(en={});var rn=en.minor;if(rn&&!Ht.minor)return"";var Wr=en.len!==void 0?en.len:rn?Ht.minor.ticklen:Ht.ticklen,tn=Ht._id.charAt(0),Tn=(Ht.linewidth||1)/2;return tn==="x"?"M0,"+(kt+Tn*qr)+"v"+Wr*qr:"M"+(kt+Tn*qr)+",0h"+Wr*qr},se.makeLabelFns=function(Ht,kt,qr){var en=Ht.ticklabelposition||"",rn=Ht.tickson||"",Wr=function(As){return en.indexOf(As)!==-1},tn=Wr("top"),Tn=Wr("left"),dn=Wr("right"),It=Wr("bottom"),xr=rn!=="boundaries"&&(It||Tn||tn||dn),Yr=Wr("inside"),An=en==="inside"&&Ht.ticks==="inside"||!Yr&&Ht.ticks==="outside"&&rn!=="boundaries",Zn=0,sa=0,oa=An?Ht.ticklen:0;if(Yr?oa*=-1:xr&&(oa=0),An&&(Zn+=oa,qr)){var Sn=t.deg2rad(qr);Zn=oa*Math.cos(Sn)+1,sa=oa*Math.sin(Sn)}Ht.showticklabels&&(An||Ht.showline)&&(Zn+=.2*Ht.tickfont.size),Zn+=(Ht.linewidth||1)/2*(Yr?-1:1);var Kn={labelStandoff:Zn,labelShift:sa},Ui,Za,Ki,ho,Co=0,So=Ht.side,Vo=Ht._id.charAt(0),Oi=Ht.tickangle,ps;if(Vo==="x")ps=!Yr&&So==="bottom"||Yr&&So==="top",ho=ps?1:-1,Yr&&(ho*=-1),Ui=sa*ho,Za=kt+Zn*ho,Ki=ps?1:-.2,Math.abs(Oi)===90&&(Yr?Ki+=ge:Oi===-90&&So==="bottom"?Ki=de:Oi===90&&So==="top"?Ki=ge:Ki=.5,Co=ge/2*(Oi/90)),Kn.xFn=function(As){return As.dx+Ui+Co*As.fontSize},Kn.yFn=function(As){return As.dy+Za+As.fontSize*Ki},Kn.anchorFn=function(As,hs){if(xr){if(Tn)return"end";if(dn)return"start"}return!w(hs)||hs===0||hs===180?"middle":hs*ho<0!==Yr?"end":"start"},Kn.heightFn=function(As,hs,ts){return hs<-60||hs>60?-.5*ts:Ht.side==="top"!==Yr?-ts:0};else if(Vo==="y"){if(ps=!Yr&&So==="left"||Yr&&So==="right",ho=ps?1:-1,Yr&&(ho*=-1),Ui=Zn,Za=sa*ho,Ki=0,!Yr&&Math.abs(Oi)===90&&(Oi===-90&&So==="left"||Oi===90&&So==="right"?Ki=de:Ki=.5),Yr){var as=w(Oi)?+Oi:0;if(as!==0){var rl=t.deg2rad(as);Co=Math.abs(Math.sin(rl))*de*ho,Ki=0}}Kn.xFn=function(As){return As.dx+kt-(Ui+As.fontSize*Ki)*ho+Co*As.fontSize},Kn.yFn=function(As){return As.dy+Za+As.fontSize*ge},Kn.anchorFn=function(As,hs){return w(hs)&&Math.abs(hs)===90?"middle":ps?"end":"start"},Kn.heightFn=function(As,hs,ts){return Ht.side==="right"&&(hs*=-1),hs<-30?-ts:hs<30?-.5*ts:0}}return Kn};function ua(Ht){return[Ht.text,Ht.x,Ht.axInfo,Ht.font,Ht.fontSize,Ht.fontColor].join("_")}se.drawTicks=function(Ht,kt,qr){qr=qr||{};var en=kt._id+"tick",rn=[].concat(kt.minor&&kt.minor.ticks?qr.vals.filter(function(tn){return tn.minor&&!tn.noTick}):[]).concat(kt.ticks?qr.vals.filter(function(tn){return!tn.minor&&!tn.noTick}):[]),Wr=qr.layer.selectAll("path."+en).data(rn,ua);Wr.exit().remove(),Wr.enter().append("path").classed(en,1).classed("ticks",1).classed("crisp",qr.crisp!==!1).each(function(tn){return i.stroke(v.select(this),tn.minor?kt.minor.tickcolor:kt.tickcolor)}).style("stroke-width",function(tn){return s.crispRound(Ht,tn.minor?kt.minor.tickwidth:kt.tickwidth,1)+"px"}).attr("d",qr.path).style("display",null),Ka(kt,[H]),Wr.attr("transform",qr.transFn)},se.drawGrid=function(Ht,kt,qr){if(qr=qr||{},kt.tickmode!=="sync"){var en=kt._id+"grid",rn=kt.minor&&kt.minor.showgrid,Wr=rn?qr.vals.filter(function(Kn){return Kn.minor}):[],tn=kt.showgrid?qr.vals.filter(function(Kn){return!Kn.minor}):[],Tn=qr.counterAxis;if(Tn&&se.shouldShowZeroLine(Ht,kt,Tn))for(var dn=kt.tickmode==="array",It=0;It<tn.length;It++){var xr=tn[It].x;if(dn?!xr:Math.abs(xr)<kt.dtick/100)if(tn=tn.slice(0,It).concat(tn.slice(It+1)),dn)It--;else break}kt._gw=s.crispRound(Ht,kt.gridwidth,1);for(var Yr=rn?s.crispRound(Ht,kt.minor.gridwidth,1):0,An=qr.layer,Zn=qr.minorLayer,sa=1;sa>=0;sa--){var oa=sa?An:Zn;if(oa){var Sn=oa.selectAll("path."+en).data(sa?tn:Wr,ua);Sn.exit().remove(),Sn.enter().append("path").classed(en,1).classed("crisp",qr.crisp!==!1),Sn.attr("transform",qr.transFn).attr("d",qr.path).each(function(Kn){return i.stroke(v.select(this),Kn.minor?kt.minor.gridcolor:kt.gridcolor||"#ddd")}).style("stroke-dasharray",function(Kn){return s.dashStyle(Kn.minor?kt.minor.griddash:kt.griddash,Kn.minor?kt.minor.gridwidth:kt.gridwidth)}).style("stroke-width",function(Kn){return(Kn.minor?Yr:kt._gw)+"px"}).style("display",null),typeof qr.path=="function"&&Sn.attr("d",qr.path)}}Ka(kt,[q,z])}},se.drawZeroLine=function(Ht,kt,qr){qr=qr||qr;var en=kt._id+"zl",rn=se.shouldShowZeroLine(Ht,kt,qr.counterAxis),Wr=qr.layer.selectAll("path."+en).data(rn?[{x:0,id:kt._id}]:[]);Wr.exit().remove(),Wr.enter().append("path").classed(en,1).classed("zl",1).classed("crisp",qr.crisp!==!1).each(function(){qr.layer.selectAll("path").sort(function(tn,Tn){return oe(tn.id,Tn.id)})}),Wr.attr("transform",qr.transFn).attr("d",qr.path).call(i.stroke,kt.zerolinecolor||i.defaultLine).style("stroke-width",s.crispRound(Ht,kt.zerolinewidth,kt._gw||1)+"px").style("display",null),Ka(kt,[V])},se.drawLabels=function(Ht,kt,qr){qr=qr||{};var en=Ht._fullLayout,rn=kt._id,Wr=kt.zerolinelayer==="above traces",tn=qr.cls||rn+"tick",Tn=qr.vals.filter(function(Ss){return Ss.text}),dn=qr.labelFns,It=qr.secondary?0:kt.tickangle,xr=(kt._prevTickAngles||{})[tn],Yr=qr.layer.selectAll("g."+tn).data(kt.showticklabels?Tn:[],ua),An=[];Yr.enter().append("g").classed(tn,1).append("text").attr("text-anchor","middle").each(function(Ss){var ls=v.select(this),Oo=Ht._promises.length;ls.call(a.positionText,dn.xFn(Ss),dn.yFn(Ss)).call(s.font,{family:Ss.font,size:Ss.fontSize,color:Ss.fontColor,weight:Ss.fontWeight,style:Ss.fontStyle,variant:Ss.fontVariant,textcase:Ss.fontTextcase,lineposition:Ss.fontLineposition,shadow:Ss.fontShadow}).text(Ss.text).call(a.convertToTspans,Ht),Ht._promises[Oo]?An.push(Ht._promises.pop().then(function(){Zn(ls,It)})):Zn(ls,It)}),Ka(kt,[G]),Yr.exit().remove(),qr.repositionOnUpdate&&Yr.each(function(Ss){v.select(this).select("text").call(a.positionText,dn.xFn(Ss),dn.yFn(Ss))});function Zn(Ss,ls){Ss.each(function(Oo){var Es=v.select(this),xl=Es.select(".text-math-group"),Ul=dn.anchorFn(Oo,ls),Hl=qr.transFn.call(Es.node(),Oo)+(w(ls)&&+ls!=0?" rotate("+ls+","+dn.xFn(Oo)+","+(dn.yFn(Oo)-Oo.fontSize/2)+")":""),Fs=a.lineCount(Es),Ni=me*Oo.fontSize,wo=dn.heightFn(Oo,w(ls)?+ls:0,(Fs-1)*Ni);if(wo&&(Hl+=r(0,wo)),xl.empty()){var ql=Es.select("text");ql.attr({transform:Hl,"text-anchor":Ul}),ql.style("display",null),kt._adjustTickLabelsOverflow&&kt._adjustTickLabelsOverflow()}else{var Gs=s.bBox(xl.node()).width,Jo=Gs*{end:-.5,start:.5}[Ul];xl.attr("transform",Hl+r(Jo,0))}})}kt._adjustTickLabelsOverflow=function(){var Ss=kt.ticklabeloverflow;if(!(!Ss||Ss==="allow")){var ls=Ss.indexOf("hide")!==-1,Oo=kt._id.charAt(0)==="x",Es=0,xl=Oo?Ht._fullLayout.width:Ht._fullLayout.height;if(Ss.indexOf("domain")!==-1){var Ul=t.simpleMap(kt.range,kt.r2l);Es=kt.l2p(Ul[0])+kt._offset,xl=kt.l2p(Ul[1])+kt._offset}var Hl=Math.min(Es,xl),Fs=Math.max(Es,xl),Ni=kt.side,wo=1/0,ql=-1/0;Yr.each(function(al){var bl=v.select(this),Iu=bl.select(".text-math-group");if(Iu.empty()){var _o=s.bBox(bl.node()),Ps=0;Oo?(_o.right>Fs||_o.left<Hl)&&(Ps=1):(_o.bottom>Fs||_o.top+(kt.tickangle?0:al.fontSize/4)<Hl)&&(Ps=1);var ms=bl.select("text");Ps?ls&&ms.style("display","none"):ms.node().style.display!=="none"&&(ms.style("display",null),Ni==="bottom"||Ni==="right"?wo=Math.min(wo,Oo?_o.top:_o.left):wo=-1/0,Ni==="top"||Ni==="left"?ql=Math.max(ql,Oo?_o.bottom:_o.right):ql=1/0)}});for(var Gs in en._plots){var Jo=en._plots[Gs];if(!(kt._id!==Jo.xaxis._id&&kt._id!==Jo.yaxis._id)){var Gl=Oo?Jo.yaxis:Jo.xaxis;Gl&&(Gl["_visibleLabelMin_"+kt._id]=wo,Gl["_visibleLabelMax_"+kt._id]=ql)}}}},kt._hideCounterAxisInsideTickLabels=function(Ss){var ls=kt._id.charAt(0)==="x",Oo=[];for(var Es in en._plots){var xl=en._plots[Es];kt._id!==xl.xaxis._id&&kt._id!==xl.yaxis._id||Oo.push(ls?xl.yaxis:xl.xaxis)}Oo.forEach(function(Ul,Hl){Ul&&Ba(Ul)&&(Ss||[V,z,q,H,G]).forEach(function(Fs){var Ni=Fs.K==="tick"&&Fs.L==="text"&&kt.ticklabelmode==="period",wo=en._plots[kt._mainSubplot],ql;if(Fs.K===V.K){var Gs=Wr?wo.zerolinelayerAbove:wo.zerolinelayer;ql=Gs.selectAll("."+kt._id+"zl")}else Fs.K===z.K?ql=wo.minorGridlayer.selectAll("."+kt._id):Fs.K===q.K?ql=wo.gridlayer.selectAll("."+kt._id):ql=wo[kt._id.charAt(0)+"axislayer"];ql.each(function(){var Jo=v.select(this);Fs.L&&(Jo=Jo.selectAll(Fs.L)),Jo.each(function(Gl){var al=kt.l2p(Ni?Hn(Gl):Gl.x)+kt._offset,bl=v.select(this);al<kt["_visibleLabelMax_"+Ul._id]&&al>kt["_visibleLabelMin_"+Ul._id]?bl.style("display","none"):Fs.K==="tick"&&!Hl&&bl.node().style.display!=="none"&&bl.style("display",null)})})})})},Zn(Yr,xr+1?xr:It);function sa(){return An.length&&Promise.all(An)}var oa=null;function Sn(){if(Zn(Yr,It),Tn.length&&kt.autotickangles&&(kt.type!=="log"||String(kt.dtick).charAt(0)!=="D")){oa=kt.autotickangles[0];var Ss=0,ls=[],Oo,Es=1;Yr.each(function(Ol){Ss=Math.max(Ss,Ol.fontSize);var $l=kt.l2p(Ol.x),Ql=Qt(this),ac=s.bBox(Ql.node());Es=Math.max(Es,a.lineCount(Ql)),ls.push({top:0,bottom:10,height:10,left:$l-ac.width/2,right:$l+ac.width/2+2,width:ac.width+2})});var xl=(kt.tickson==="boundaries"||kt.showdividers)&&!qr.secondary,Ul=Tn.length,Hl=Math.abs((Tn[Ul-1].x-Tn[0].x)*kt._m)/(Ul-1),Fs=xl?Hl/2:Hl,Ni=xl?kt.ticklen:Ss*1.25*Es,wo=Math.sqrt(Math.pow(Fs,2)+Math.pow(Ni,2)),ql=Fs/wo,Gs=kt.autotickangles.map(function(Ol){return Ol*Math.PI/180}),Jo=Gs.find(function(Ol){return Math.abs(Math.cos(Ol))<=ql});Jo===void 0&&(Jo=Gs.reduce(function(Ol,$l){return Math.abs(Math.cos(Ol))<Math.abs(Math.cos($l))?Ol:$l},Gs[0]));var Gl=Jo*(180/Math.PI);if(xl){var al=2;for(kt.ticks&&(al+=kt.tickwidth/2),Oo=0;Oo<ls.length;Oo++){var bl=Tn[Oo].xbnd,Iu=ls[Oo];if(bl[0]!==null&&Iu.left-kt.l2p(bl[0])<al||bl[1]!==null&&kt.l2p(bl[1])-Iu.right<al){oa=Gl;break}}}else{var _o=kt.ticklabelposition||"",Ps=kt.tickson||"",ms=function(Ol){return _o.indexOf(Ol)!==-1},ru=ms("top"),nu=ms("left"),Zo=ms("right"),_u=ms("bottom"),Au=Ps!=="boundaries"&&(_u||nu||ru||Zo),Ys=Au?(kt.tickwidth||0)+2*ie:0;for(Oo=0;Oo<ls.length-1;Oo++)if(t.bBoxIntersect(ls[Oo],ls[Oo+1],Ys)){oa=Gl;break}}oa&&Zn(Yr,oa)}}kt._selections&&(kt._selections[tn]=Yr);var Kn=[sa];kt.automargin&&en._redrawFromAutoMarginCount&&xr===90?(oa=xr,Kn.push(function(){Zn(Yr,xr)})):Kn.push(Sn),kt._tickAngles&&Kn.push(function(){kt._tickAngles[tn]=oa===null?w(It)?It:0:oa});var Ui=function(){var Ss=0,ls=0;return Yr.each(function(Oo,Es){var xl=Qt(this),Ul=xl.select(".text-math-group");if(Ul.empty()){var Hl;kt._vals[Es]&&(Hl=kt._vals[Es].bb||s.bBox(xl.node()),kt._vals[Es].bb=Hl),Ss=Math.max(Ss,Hl.width),ls=Math.max(ls,Hl.height)}}),{labelsMaxW:Ss,labelsMaxH:ls}},Za=kt._anchorAxis;if(Za&&(Za.autorange||Za.insiderange)&&Ba(kt)&&!Y(en,kt._id)&&(en._insideTickLabelsUpdaterange||(en._insideTickLabelsUpdaterange={}),Za.autorange&&(en._insideTickLabelsUpdaterange[Za._name+".autorange"]=Za.autorange,Kn.push(Ui)),Za.insiderange)){var Ki=Ui(),ho=kt._id.charAt(0)==="y"?Ki.labelsMaxW:Ki.labelsMaxH;ho+=2*ie,kt.ticklabelposition==="inside"&&(ho+=kt.ticklen||0);var Co=kt.side==="right"||kt.side==="top"?1:-1,So=Co===1?1:0,Vo=Co===1?0:1,Oi=[];Oi[Vo]=Za.range[Vo];var ps=Za.range,as=Za.r2p(ps[So]),rl=Za.r2p(ps[Vo]),As=en._insideTickLabelsUpdaterange[Za._name+".range"];if(As){var hs=Za.r2p(As[So]),ts=Za.r2p(As[Vo]),nl=Co*(kt._id.charAt(0)==="y"?1:-1);nl*as<nl*hs&&(as=hs,Oi[So]=ps[So]=As[So]),nl*rl>nl*ts&&(rl=ts,Oi[Vo]=ps[Vo]=As[Vo])}var Qs=Math.abs(rl-as);Qs-ho>0?(Qs-=ho,ho*=1+ho/Qs):ho=0,kt._id.charAt(0)!=="y"&&(ho=-ho),Oi[So]=Za.p2r(Za.r2p(ps[So])+Co*ho),Za.autorange==="min"||Za.autorange==="max reversed"?(Oi[0]=null,Za._rangeInitial0=void 0,Za._rangeInitial1=void 0):(Za.autorange==="max"||Za.autorange==="min reversed")&&(Oi[1]=null,Za._rangeInitial0=void 0,Za._rangeInitial1=void 0),en._insideTickLabelsUpdaterange[Za._name+".range"]=Oi}var _l=t.syncOrAsync(Kn);return _l&&_l.then&&Ht._promises.push(_l),_l};function Ta(Ht,kt,qr){var en=kt._id+"divider",rn=qr.vals,Wr=qr.layer.selectAll("path."+en).data(rn,ua);Wr.exit().remove(),Wr.enter().insert("path",":first-child").classed(en,1).classed("crisp",1).call(i.stroke,kt.dividercolor).style("stroke-width",s.crispRound(Ht,kt.dividerwidth,1)+"px"),Wr.attr("transform",qr.transFn).attr("d",qr.path)}se.getPxPosition=function(Ht,kt){var qr=Ht._fullLayout._size,en=kt._id.charAt(0),rn=kt.side,Wr;if(kt.anchor!=="free"?Wr=kt._anchorAxis:en==="x"?Wr={_offset:qr.t+(1-(kt.position||0))*qr.h,_length:0}:en==="y"&&(Wr={_offset:qr.l+(kt.position||0)*qr.w+kt._shift,_length:0}),rn==="top"||rn==="left")return Wr._offset;if(rn==="bottom"||rn==="right")return Wr._offset+Wr._length};function Aa(Ht){var kt=Ht.title.font.size,qr=(Ht.title.text.match(a.BR_TAG_ALL)||[]).length;return Ht.title.hasOwnProperty("standoff")?kt*(de+qr*me):qr?kt*(qr+1)*me:kt}function ia(Ht,kt){var qr=Ht._fullLayout,en=kt._id,rn=en.charAt(0),Wr=kt.title.font.size,tn,Tn=(kt.title.text.match(a.BR_TAG_ALL)||[]).length;if(kt.title.hasOwnProperty("standoff"))kt.side==="bottom"||kt.side==="right"?tn=kt._depth+kt.title.standoff+Wr*de:(kt.side==="top"||kt.side==="left")&&(tn=kt._depth+kt.title.standoff+Wr*(ge+Tn*me));else{var dn=Ba(kt);if(kt.type==="multicategory")tn=kt._depth;else{var It=1.5*Wr;dn&&(It=.5*Wr,kt.ticks==="outside"&&(It+=kt.ticklen)),tn=10+It+(kt.linewidth?kt.linewidth-1:0)}dn||(rn==="x"?tn+=kt.side==="top"?Wr*(kt.showticklabels?1:0):Wr*(kt.showticklabels?1.5:.5):tn+=kt.side==="right"?Wr*(kt.showticklabels?1:.5):Wr*(kt.showticklabels?.5:0))}var xr=se.getPxPosition(Ht,kt),Yr,An,Zn;rn==="x"?(An=kt._offset+kt._length/2,Zn=kt.side==="top"?xr-tn:xr+tn):(Zn=kt._offset+kt._length/2,An=kt.side==="right"?xr+tn:xr-tn,Yr={rotate:"-90",offset:0});var sa;if(kt.type!=="multicategory"){var oa=kt._selections[kt._id+"tick"];if(sa={selection:oa,side:kt.side},oa&&oa.node()&&oa.node().parentNode){var Sn=s.getTranslate(oa.node().parentNode);sa.offsetLeft=Sn.x,sa.offsetTop=Sn.y}kt.title.hasOwnProperty("standoff")&&(sa.pad=0)}return kt._titleStandoff=tn,l.draw(Ht,en+"title",{propContainer:kt,propName:kt._name+".title.text",placeholder:qr._dfltTitle[rn],avoid:sa,transform:Yr,attributes:{x:An,y:Zn,"text-anchor":"middle"}})}se.shouldShowZeroLine=function(Ht,kt,qr){var en=t.simpleMap(kt.range,kt.r2l);return en[0]*en[1]<=0&&kt.zeroline&&(kt.type==="linear"||kt.type==="-")&&!(kt.rangebreaks&&kt.maskBreaks(0)===U)&&($a(kt,0)||!ci(Ht,kt,qr,en)||_r(Ht,kt))},se.clipEnds=function(Ht,kt){return kt.filter(function(qr){return $a(Ht,qr.x)})};function $a(Ht,kt){var qr=Ht.l2p(kt);return qr>1&&qr<Ht._length-1}function ci(Ht,kt,qr,en){var rn=qr._mainAxis;if(!rn)return;var Wr=Ht._fullLayout,tn=kt._id.charAt(0),Tn=se.counterLetter(kt._id),dn=kt._offset+(Math.abs(en[0])<Math.abs(en[1])==(tn==="x")?0:kt._length);function It(sa){if(!sa.showline||!sa.linewidth)return!1;var oa=Math.max((sa.linewidth+kt.zerolinewidth)/2,1);function Sn(Za){return typeof Za=="number"&&Math.abs(Za-dn)<oa}if(Sn(sa._mainLinePosition)||Sn(sa._mainMirrorPosition))return!0;var Kn=sa._linepositions||{};for(var Ui in Kn)if(Sn(Kn[Ui][0])||Sn(Kn[Ui][1]))return!0}var xr=Wr._plots[qr._mainSubplot];if(!(xr.mainplotinfo||xr).overlays.length)return It(qr);for(var Yr=se.list(Ht,Tn),An=0;An<Yr.length;An++){var Zn=Yr[An];if(Zn._mainAxis===rn&&It(Zn))return!0}}function _r(Ht,kt){for(var qr=Ht._fullData,en=kt._mainSubplot,rn=kt._id.charAt(0),Wr=0;Wr<qr.length;Wr++){var tn=qr[Wr];if(tn.visible===!0&&tn.xaxis+tn.yaxis===en&&(P.traceIs(tn,"bar-like")&&tn.orientation==={x:"h",y:"v"}[rn]||tn.fill&&tn.fill.charAt(tn.fill.length-1)===rn))return!0}return!1}function Qt(Ht){var kt=v.select(Ht),qr=kt.select(".text-math-group");return qr.empty()?kt.select("text"):qr}se.allowAutoMargin=function(Ht){for(var kt=se.list(Ht,"",!0),qr=0;qr<kt.length;qr++){var en=kt[qr];en.automargin&&(C.allowAutoMargin(Ht,yr(en)),en.mirror&&C.allowAutoMargin(Ht,br(en))),P.getComponentMethod("rangeslider","isVisible")(en)&&C.allowAutoMargin(Ht,an(en))}};function yr(Ht){return Ht._id+".automargin"}function br(Ht){return yr(Ht)+".mirror"}function an(Ht){return Ht._id+".rangeslider"}se.swap=function(Ht,kt){for(var qr=wn(Ht,kt),en=0;en<qr.length;en++)Bn(Ht,qr[en].x,qr[en].y)};function wn(Ht,kt){var qr=[],en,rn;for(en=0;en<kt.length;en++){var Wr=[],tn=Ht._fullData[kt[en]].xaxis,Tn=Ht._fullData[kt[en]].yaxis;if(!(!tn||!Tn)){for(rn=0;rn<qr.length;rn++)(qr[rn].x.indexOf(tn)!==-1||qr[rn].y.indexOf(Tn)!==-1)&&Wr.push(rn);if(!Wr.length){qr.push({x:[tn],y:[Tn]});continue}var dn=qr[Wr[0]],It;if(Wr.length>1)for(rn=1;rn<Wr.length;rn++)It=qr[Wr[rn]],Ln(dn.x,It.x),Ln(dn.y,It.y);Ln(dn.x,[tn]),Ln(dn.y,[Tn])}}return qr}function Ln(Ht,kt){for(var qr=0;qr<kt.length;qr++)Ht.indexOf(kt[qr])===-1&&Ht.push(kt[qr])}function Bn(Ht,kt,qr){var en=[],rn=[],Wr=Ht.layout,tn,Tn;for(tn=0;tn<kt.length;tn++)en.push(se.getFromId(Ht,kt[tn]));for(tn=0;tn<qr.length;tn++)rn.push(se.getFromId(Ht,qr[tn]));var dn=Object.keys(o),It=["anchor","domain","overlaying","position","side","tickangle","editType"],xr=["linear","log"];for(tn=0;tn<dn.length;tn++){var Yr=dn[tn],An=en[0][Yr],Zn=rn[0][Yr],sa=!0,oa=!1,Sn=!1;if(!(Yr.charAt(0)==="_"||typeof An=="function"||It.indexOf(Yr)!==-1)){for(Tn=1;Tn<en.length&&sa;Tn++){var Kn=en[Tn][Yr];Yr==="type"&&xr.indexOf(An)!==-1&&xr.indexOf(Kn)!==-1&&An!==Kn?oa=!0:Kn!==An&&(sa=!1)}for(Tn=1;Tn<rn.length&&sa;Tn++){var Ui=rn[Tn][Yr];Yr==="type"&&xr.indexOf(Zn)!==-1&&xr.indexOf(Ui)!==-1&&Zn!==Ui?Sn=!0:rn[Tn][Yr]!==Zn&&(sa=!1)}sa&&(oa&&(Wr[en[0]._name].type="linear"),Sn&&(Wr[rn[0]._name].type="linear"),xa(Wr,Yr,en,rn,Ht._fullLayout._dfltTitle))}}for(tn=0;tn<Ht._fullLayout.annotations.length;tn++){var Za=Ht._fullLayout.annotations[tn];kt.indexOf(Za.xref)!==-1&&qr.indexOf(Za.yref)!==-1&&t.swapAttrs(Wr.annotations[tn],["?"])}}function xa(Ht,kt,qr,en,rn){var Wr=t.nestedProperty,tn=Wr(Ht[qr[0]._name],kt).get(),Tn=Wr(Ht[en[0]._name],kt).get(),dn;for(kt==="title"&&(tn&&tn.text===rn.x&&(tn.text=rn.y),Tn&&Tn.text===rn.y&&(Tn.text=rn.x)),dn=0;dn<qr.length;dn++)Wr(Ht,qr[dn]._name+"."+kt).set(Tn);for(dn=0;dn<en.length;dn++)Wr(Ht,en[dn]._name+"."+kt).set(tn)}function za(Ht){return Ht._id==="angularaxis"}function Ia(Ht,kt){for(var qr=kt._rangebreaks.length,en=0;en<qr;en++){var rn=kt._rangebreaks[en];if(Ht>=rn.min&&Ht<rn.max)return rn.max}return Ht}function Ba(Ht){return(Ht.ticklabelposition||"").indexOf("inside")!==-1}function Ka(Ht,kt){Ba(Ht._anchorAxis||{})&&Ht._hideCounterAxisInsideTickLabels&&Ht._hideCounterAxisInsideTickLabels(kt)}function fa(Ht,kt,qr,en){var rn=Ht.anchor!=="free"&&(Ht.overlaying===void 0||Ht.overlaying===!1)?Ht._id:Ht.overlaying,Wr;en?Wr=Ht.side==="right"?kt:-kt:Wr=kt,rn in qr||(qr[rn]={}),Ht.side in qr[rn]||(qr[rn][Ht.side]=0),qr[rn][Ht.side]+=Wr}function Bi(Ht,kt){return Ht.autoshift?kt[Ht.overlaying][Ht.side]:Ht.shift||0}function Yi(Ht,kt){return/%f/.test(kt)?Ht>=D:/%L/.test(kt)?Ht>=N:/%[SX]/.test(kt)?Ht>=x:/%M/.test(kt)?Ht>=p:/%[HI]/.test(kt)?Ht>=f:/%p/.test(kt)?Ht>=y:/%[Aadejuwx]/.test(kt)?Ht>=A:/%[UVW]/.test(kt)?Ht>=b:/%[Bbm]/.test(kt)?Ht>=k:/%[q]/.test(kt)?Ht>=_:/%[Yy]/.test(kt)?Ht>=m:!0}}}),aM=Ne({"src/plots/cartesian/autorange_options_defaults.js"(te,Z){Z.exports=function(w,C,P){var t,r;if(P){var a=C==="reversed"||C==="min reversed"||C==="max reversed";t=P[a?1:0],r=P[a?0:1]}var l=w("autorangeoptions.minallowed",r===null?t:void 0),i=w("autorangeoptions.maxallowed",t===null?r:void 0);l===void 0&&w("autorangeoptions.clipmin"),i===void 0&&w("autorangeoptions.clipmax"),w("autorangeoptions.include")}}}),iM=Ne({"src/plots/cartesian/range_defaults.js"(te,Z){var v=aM();Z.exports=function(C,P,t,r){var a=P._template||{},l=P.type||a.type||"-";t("minallowed"),t("maxallowed");var i=t("range");if(!i){var s;!r.noInsiderange&&l!=="log"&&(s=t("insiderange"),s&&(s[0]===null||s[1]===null)&&(P.insiderange=!1,s=void 0),s&&(i=t("range",s)))}var o=P.getAutorangeDflt(i,r),u=t("autorange",o),d;i&&(i[0]===null&&i[1]===null||(i[0]===null||i[1]===null)&&(u==="reversed"||u===!0)||i[0]!==null&&(u==="min"||u==="max reversed")||i[1]!==null&&(u==="max"||u==="min reversed"))&&(i=void 0,delete P.range,P.autorange=!0,d=!0),d||(o=P.getAutorangeDflt(i,r),u=t("autorange",o)),u&&(v(t,u,i),(l==="linear"||l==="-")&&t("rangemode")),P.cleanRange()}}}),rA=Ne({"node_modules/mouse-event-offset/index.js"(te,Z){var v={left:0,top:0};Z.exports=w;function w(P,t,r){t=t||P.currentTarget||P.srcElement,Array.isArray(r)||(r=[0,0]);var a=P.clientX||0,l=P.clientY||0,i=C(t);return r[0]=a-i.left,r[1]=l-i.top,r}function C(P){return P===window||P===document||P===document.body?v:P.getBoundingClientRect()}}}),nA=Ne({"node_modules/has-passive-events/index.js"(te,Z){var v=Pw();function w(){var C=!1;try{var P=Object.defineProperty({},"passive",{get:function(){C=!0}});window.addEventListener("test",null,P),window.removeEventListener("test",null,P)}catch{C=!1}return C}Z.exports=v&&w()}}),EL=Ne({"src/components/dragelement/align.js"(te,Z){Z.exports=function(w,C,P,t,r){var a=(w-P)/(t-P),l=a+C/(t-P),i=(a+l)/2;return r==="left"||r==="bottom"?a:r==="center"||r==="middle"?i:r==="right"||r==="top"?l:a<2/3-i?a:l>4/3-i?l:i}}}),ML=Ne({"src/components/dragelement/cursor.js"(te,Z){var v=In(),w=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];Z.exports=function(P,t,r,a){return r==="left"?P=0:r==="center"?P=1:r==="right"?P=2:P=v.constrain(Math.floor(P*3),0,2),a==="bottom"?t=0:a==="middle"?t=1:a==="top"?t=2:t=v.constrain(Math.floor(t*3),0,2),w[t][P]}}}),CL=Ne({"src/components/dragelement/unhover.js"(te,Z){var v=wx(),w=N0(),C=D1().getGraphDiv,P=Ll(),t=Z.exports={};t.wrapped=function(r,a,l){r=C(r),r._fullLayout&&w.clear(r._fullLayout._uid+P.HOVERID),t.raw(r,a,l)},t.raw=function(a,l){var i=a._fullLayout,s=a._hoverdata;l||(l={}),!(l.target&&!a._dragged&&v.triggerHandler(a,"plotly_beforehover",l)===!1)&&(i._hoverlayer.selectAll("g").remove(),i._hoverlayer.selectAll("line").remove(),i._hoverlayer.selectAll("circle").remove(),a._hoverdata=void 0,l.target&&s&&a.emit("plotly_unhover",{event:l,points:s}))}}}),Uv=Ne({"src/components/dragelement/index.js"(te,Z){var v=rA(),w=eA(),C=nA(),P=In().removeElement,t=wh(),r=Z.exports={};r.align=EL(),r.getCursor=ML();var a=CL();r.unhover=a.wrapped,r.unhoverRaw=a.raw,r.init=function(o){var u=o.gd,d=1,h=u._context.doubleClickDelay,g=o.element,m,E,c,_,T,M,k,b;u._mouseDownTime||(u._mouseDownTime=0),g.style.pointerEvents="all",g.onmousedown=f,C?(g._ontouchstart&&g.removeEventListener("touchstart",g._ontouchstart),g._ontouchstart=f,g.addEventListener("touchstart",f,{passive:!1})):g.ontouchstart=f;function A(N,D,B){return Math.abs(N)<B&&(N=0),Math.abs(D)<B&&(D=0),[N,D]}var y=o.clampFn||A;function f(N){u._dragged=!1,u._dragging=!0;var D=i(N);m=D[0],E=D[1],k=N.target,M=N,b=N.buttons===2||N.ctrlKey,typeof N.clientX>"u"&&typeof N.clientY>"u"&&(N.clientX=m,N.clientY=E),c=new Date().getTime(),c-u._mouseDownTime<h?d+=1:(d=1,u._mouseDownTime=c),o.prepFn&&o.prepFn(N,m,E),w&&!b?(T=l(),T.style.cursor=window.getComputedStyle(g).cursor):w||(T=document,_=window.getComputedStyle(document.documentElement).cursor,document.documentElement.style.cursor=window.getComputedStyle(g).cursor),document.addEventListener("mouseup",x),document.addEventListener("touchend",x),o.dragmode!==!1&&(N.preventDefault(),document.addEventListener("mousemove",p),document.addEventListener("touchmove",p,{passive:!1}))}function p(N){N.preventDefault();var D=i(N),B=o.minDrag||t.MINDRAG,U=y(D[0]-m,D[1]-E,B),V=U[0],q=U[1];(V||q)&&(u._dragged=!0,r.unhover(u,N)),u._dragged&&o.moveFn&&!b&&(u._dragdata={element:g,dx:V,dy:q},o.moveFn(V,q))}function x(N){if(delete u._dragdata,o.dragmode!==!1&&(N.preventDefault(),document.removeEventListener("mousemove",p),document.removeEventListener("touchmove",p)),document.removeEventListener("mouseup",x),document.removeEventListener("touchend",x),w?P(T):_&&(T.documentElement.style.cursor=_,_=null),!u._dragging){u._dragged=!1;return}if(u._dragging=!1,new Date().getTime()-u._mouseDownTime>h&&(d=Math.max(d-1,1)),u._dragged)o.doneFn&&o.doneFn();else{var D;M.target===k?D=M:(D={target:k,srcElement:k,toElement:k},Object.keys(M).concat(Object.keys(M.__proto__)).forEach(B=>{var U=M[B];!D[B]&&typeof U!="function"&&(D[B]=U)})),o.clickFn&&o.clickFn(d,D),b||k.dispatchEvent(new MouseEvent("click",N))}u._dragging=!1,u._dragged=!1}};function l(){var s=document.createElement("div");s.className="dragcover";var o=s.style;return o.position="fixed",o.left=0,o.right=0,o.top=0,o.bottom=0,o.zIndex=999999999,o.background="none",document.body.appendChild(s),s}r.coverSlip=l;function i(s){return v(s.changedTouches?s.changedTouches[0]:s,document.body)}}}),km=Ne({"src/lib/setcursor.js"(te,Z){Z.exports=function(w,C){(w.attr("class")||"").split(" ").forEach(function(P){P.indexOf("cursor-")===0&&w.classed(P,!1)}),C&&w.classed("cursor-"+C,!0)}}}),kL=Ne({"src/lib/override_cursor.js"(te,Z){var v=km(),w="data-savedcursor",C="!!";Z.exports=function(t,r){var a=t.attr(w);if(r){if(!a){for(var l=(t.attr("class")||"").split(" "),i=0;i<l.length;i++){var s=l[i];s.indexOf("cursor-")===0&&t.attr(w,s.substr(7)).classed(s,!1)}t.attr(w)||t.attr(w,C)}v(t,r)}else a&&(t.attr(w,null),a===C?v(t):v(t,a))}}}),oM=Ne({"src/components/legend/attributes.js"(te,Z){var v=bo(),w=js();Z.exports={_isSubplotObj:!0,visible:{valType:"boolean",dflt:!0,editType:"legend"},bgcolor:{valType:"color",editType:"legend"},bordercolor:{valType:"color",dflt:w.defaultLine,editType:"legend"},maxheight:{valType:"number",min:0,editType:"legend"},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend"},font:v({editType:"legend"}),grouptitlefont:v({editType:"legend"}),orientation:{valType:"enumerated",values:["v","h"],dflt:"v",editType:"legend"},traceorder:{valType:"flaglist",flags:["reversed","grouped"],extras:["normal"],editType:"legend"},tracegroupgap:{valType:"number",min:0,dflt:10,editType:"legend"},entrywidth:{valType:"number",min:0,editType:"legend"},entrywidthmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels",editType:"legend"},indentation:{valType:"number",min:-15,dflt:0,editType:"legend"},itemsizing:{valType:"enumerated",values:["trace","constant"],dflt:"trace",editType:"legend"},itemwidth:{valType:"number",min:30,dflt:30,editType:"legend"},itemclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggle",editType:"legend"},itemdoubleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggleothers",editType:"legend"},groupclick:{valType:"enumerated",values:["toggleitem","togglegroup"],dflt:"togglegroup",editType:"legend"},x:{valType:"number",editType:"legend"},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"legend"},y:{valType:"number",editType:"legend"},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],editType:"legend"},uirevision:{valType:"any",editType:"none"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"legend"},title:{text:{valType:"string",dflt:"",editType:"legend"},font:v({editType:"legend"}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend"},editType:"legend"},editType:"legend"}}}),aA=Ne({"src/components/legend/helpers.js"(te){te.isGrouped=function(v){return(v.traceorder||"").indexOf("grouped")!==-1},te.isVertical=function(v){return v.orientation!=="h"},te.isReversed=function(v){return(v.traceorder||"").indexOf("reversed")!==-1}}}),sM=Ne({"src/components/legend/defaults.js"(te,Z){var v=Yo(),w=In(),C=Cu(),P=qo(),t=oM(),r=xx(),a=aA();function l(i,s,o,u){var d=s[i]||{},h=C.newContainer(o,i);function g(me,W){return w.coerce(d,h,t,me,W)}var m=w.coerceFont(g,"font",o.font);g("bgcolor",o.paper_bgcolor),g("bordercolor");var E=g("visible");if(E){for(var c,_=function(me,W){var ie=c._input,se=c;return w.coerce(ie,se,P,me,W)},T=o.font||{},M=w.coerceFont(g,"grouptitlefont",T,{overrideDflt:{size:Math.round(T.size*1.1)}}),k=0,b=!1,A="normal",y=(o.shapes||[]).filter(function(me){return me.showlegend}),f=u.concat(y).filter(function(me){return i===(me.legend||"legend")}),p=0;p<f.length;p++)if(c=f[p],!!c.visible){var x=c._isShape;(c.showlegend||c._dfltShowLegend&&!(c._module&&c._module.attributes&&c._module.attributes.showlegend&&c._module.attributes.showlegend.dflt===!1))&&(k++,c.showlegend&&(b=!0,(!x&&v.traceIs(c,"pie-like")||c._input.showlegend===!0)&&k++),w.coerceFont(_,"legendgrouptitle.font",M)),(!x&&v.traceIs(c,"bar")&&o.barmode==="stack"||["tonextx","tonexty"].indexOf(c.fill)!==-1)&&(A=a.isGrouped({traceorder:A})?"grouped+reversed":"reversed"),c.legendgroup!==void 0&&c.legendgroup!==""&&(A=a.isReversed({traceorder:A})?"reversed+grouped":"grouped")}var N=w.coerce(s,o,r,"showlegend",b&&k>(i==="legend"?1:0));if(N===!1&&(o[i]=void 0),!(N===!1&&!d.uirevision)&&(g("uirevision",o.uirevision),N!==!1)){g("borderwidth");var D=g("orientation"),B=g("yref"),U=g("xref"),V=D==="h",q=B==="paper",z=U==="paper",H,G,J,le="left";V?(H=0,v.getComponentMethod("rangeslider","isVisible")(s.xaxis)?q?(G=1.1,J="bottom"):(G=1,J="top"):q?(G=-.1,J="top"):(G=0,J="bottom")):(G=1,J="auto",z?H=1.02:(H=1,le="right")),w.coerce(d,h,{x:{valType:"number",editType:"legend",min:z?-2:0,max:z?3:1,dflt:H}},"x"),w.coerce(d,h,{y:{valType:"number",editType:"legend",min:q?-2:0,max:q?3:1,dflt:G}},"y"),g("traceorder",A),a.isGrouped(o[i])&&g("tracegroupgap"),g("entrywidth"),g("entrywidthmode"),g("indentation"),g("itemsizing"),g("itemwidth"),g("itemclick"),g("itemdoubleclick"),g("groupclick"),g("xanchor",le),g("yanchor",J),g("maxheight"),g("valign"),w.noneOrAll(d,h,["x","y"]);var ge=g("title.text");if(ge){g("title.side",V?"left":"top");var de=w.extendFlat({},m,{size:w.bigFont(m.size)});w.coerceFont(g,"title.font",de)}}}}Z.exports=function(s,o,u){var d,h=u.slice(),g=o.shapes;if(g)for(d=0;d<g.length;d++){var m=g[d];if(m.showlegend){var E={_input:m._input,visible:m.visible,showlegend:m.showlegend,legend:m.legend};h.push(E)}}var c=["legend"];for(d=0;d<h.length;d++)w.pushUnique(c,h[d].legend);for(o._legends=[],d=0;d<c.length;d++){var _=c[d];l(_,s,o,h),o[_]&&(o[_]._id=_),o._legends.push(_)}}}}),iA=Ne({"src/components/legend/handle_click.js"(te,Z){var v=Yo(),w=In(),C=w.pushUnique,P=!0;Z.exports=function(r,a,l){var i=a._fullLayout;if(a._dragged||a._editing)return;var s=i.legend.itemclick,o=i.legend.itemdoubleclick,u=i.legend.groupclick;l===1&&s==="toggle"&&o==="toggleothers"&&P&&a.data&&a._context.showTips&&w.notifier(w._(a,"Double-click on legend to isolate one trace"),"long"),P=!1;var d;if(l===1?d=s:l===2&&(d=o),!d)return;var h=u==="togglegroup",g=i.hiddenlabels?i.hiddenlabels.slice():[],m=r.data()[0][0];if(m.groupTitle&&m.noClick)return;var E=a._fullData,c=(i.shapes||[]).filter(function(Fe){return Fe.showlegend}),_=E.concat(c),T=m.trace;T._isShape&&(T=T._fullInput);var M=T.legendgroup,k,b,A,y,f,p,x={},N=[],D=[],B=[];function U(Fe,Pe){var be=N.indexOf(Fe),Ye=x.visible;return Ye||(Ye=x.visible=[]),N.indexOf(Fe)===-1&&(N.push(Fe),be=N.length-1),Ye[be]=Pe,be}var V=(i.shapes||[]).map(function(Fe){return Fe._input}),q=!1;function z(Fe,Pe){V[Fe].visible=Pe,q=!0}function H(Fe,Pe){if(!(m.groupTitle&&!h)){var be=Fe._fullInput||Fe,Ye=be._isShape,yt=be.index;yt===void 0&&(yt=be._index);var wt=be.visible===!1?!1:Pe;Ye?z(yt,wt):U(yt,wt)}}var G=T.legend,J=T._fullInput,le=J&&J._isShape;if(!le&&v.traceIs(T,"pie-like")){var ge=m.label,de=g.indexOf(ge);if(d==="toggle")de===-1?g.push(ge):g.splice(de,1);else if(d==="toggleothers"){var me=de!==-1,W=[];for(k=0;k<a.calcdata.length;k++){var ie=a.calcdata[k];for(b=0;b<ie.length;b++){var se=ie[b],ee=se.label;G===ie[0].trace.legend&&ge!==ee&&(g.indexOf(ee)===-1&&(me=!0),C(g,ee),W.push(ee))}}if(!me)for(var pe=0;pe<W.length;pe++){var oe=g.indexOf(W[pe]);oe!==-1&&g.splice(oe,1)}}v.call("_guiRelayout",a,"hiddenlabels",g)}else{var Y=M&&M.length,ce=[],ue;if(Y)for(k=0;k<_.length;k++)ue=_[k],ue.visible&&ue.legendgroup===M&&ce.push(k);if(d==="toggle"){var _e;switch(T.visible){case!0:_e="legendonly";break;case!1:_e=!1;break;case"legendonly":_e=!0;break}if(Y)if(h)for(k=0;k<_.length;k++){var Le=_[k];Le.visible!==!1&&Le.legendgroup===M&&H(Le,_e)}else H(T,_e);else H(T,_e)}else if(d==="toggleothers"){var ze,Xe,Ve,rt,mt,_t=!0;for(k=0;k<_.length;k++)if(mt=_[k],ze=mt===T,Ve=mt.showlegend!==!0,!(ze||Ve)&&(Xe=Y&&mt.legendgroup===M,!Xe&&mt.legend===G&&mt.visible===!0&&!v.traceIs(mt,"notLegendIsolatable"))){_t=!1;break}for(k=0;k<_.length;k++)if(mt=_[k],!(mt.visible===!1||mt.legend!==G)&&!v.traceIs(mt,"notLegendIsolatable"))switch(T.visible){case"legendonly":H(mt,!0);break;case!0:rt=_t?!0:"legendonly",ze=mt===T,Ve=mt.showlegend!==!0&&!mt.legendgroup,Xe=ze||Y&&mt.legendgroup===M,H(mt,Xe||Ve?!0:rt);break}}for(k=0;k<D.length;k++)if(A=D[k],!!A){var vt=A.constructUpdate(),ut=Object.keys(vt);for(b=0;b<ut.length;b++)y=ut[b],p=x[y]=x[y]||[],p[B[k]]=vt[y]}for(f=Object.keys(x),k=0;k<f.length;k++)for(y=f[k],b=0;b<N.length;b++)x[y].hasOwnProperty(b)||(x[y][b]=void 0);q?v.call("_guiUpdate",a,x,{shapes:V},N):v.call("_guiRestyle",a,x,N)}}}}),lM=Ne({"src/components/legend/constants.js"(te,Z){Z.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}}}),PL=Ne({"src/components/legend/get_legend_data.js"(te,Z){var v=Yo(),w=aA();Z.exports=function(P,t,r){var a=t._inHover,l=w.isGrouped(t),i=w.isReversed(t),s={},o=[],u=!1,d={},h=0,g=0,m,E;function c(H,G,J){if(t.visible!==!1&&!(r&&H!==t._id))if(G===""||!w.isGrouped(t)){var le="~~i"+h;o.push(le),s[le]=[J],h++}else o.indexOf(G)===-1?(o.push(G),u=!0,s[G]=[J]):s[G].push(J)}for(m=0;m<P.length;m++){var _=P[m],T=_[0],M=T.trace,k=M.legend,b=M.legendgroup;if(!(!a&&(!M.visible||!M.showlegend)))if(v.traceIs(M,"pie-like"))for(d[b]||(d[b]={}),E=0;E<_.length;E++){var A=_[E].label;d[b][A]||(c(k,b,{label:A,color:_[E].color,i:_[E].i,trace:M,pts:_[E].pts}),d[b][A]=!0,g=Math.max(g,(A||"").length))}else c(k,b,T),g=Math.max(g,(M.name||"").length)}if(!o.length)return[];var y=!u||!l,f=[];for(m=0;m<o.length;m++){var p=s[o[m]];y?f.push(p[0]):f.push(p)}for(y&&(f=[f]),m=0;m<f.length;m++){var x=1/0;for(E=0;E<f[m].length;E++){var N=f[m][E].trace.legendrank;x>N&&(x=N)}f[m][0]._groupMinRank=x,f[m][0]._preGroupSort=m}var D=function(H,G){return H[0]._groupMinRank-G[0]._groupMinRank||H[0]._preGroupSort-G[0]._preGroupSort},B=function(H,G){return H.trace.legendrank-G.trace.legendrank||H._preSort-G._preSort};for(f.forEach(function(H,G){H[0]._preGroupSort=G}),f.sort(D),m=0;m<f.length;m++){f[m].forEach(function(H,G){H._preSort=G}),f[m].sort(B);var U=f[m][0].trace,V=null;for(E=0;E<f[m].length;E++){var q=f[m][E].trace.legendgrouptitle;if(q&&q.text){V=q,a&&(q.font=t._groupTitleFont);break}}if(i&&f[m].reverse(),V){var z=!1;for(E=0;E<f[m].length;E++)if(v.traceIs(f[m][E].trace,"pie-like")){z=!0;break}f[m].unshift({i:-1,groupTitle:V,noClick:z,trace:{showlegend:U.showlegend,legendgroup:U.legendgroup,visible:t.groupclick==="toggleitem"?!0:U.visible}})}for(E=0;E<f[m].length;E++)f[m][E]=[f[m][E]]}return t._lgroupsLength=f.length,t._maxNameLength=g,f}}}),Ay=Ne({"src/traces/pie/helpers.js"(te){var Z=In();function v(w){return w.indexOf("e")!==-1?w.replace(/[.]?0+e/,"e"):w.indexOf(".")!==-1?w.replace(/[.]?0+$/,""):w}te.formatPiePercent=function(C,P){var t=v((C*100).toPrecision(3));return Z.numSeparate(t,P)+"%"},te.formatPieValue=function(C,P){var t=v(C.toPrecision(10));return Z.numSeparate(t,P)},te.getFirstFilled=function(C,P){if(Z.isArrayOrTypedArray(C))for(var t=0;t<P.length;t++){var r=C[P[t]];if(r||r===0||r==="")return r}},te.castOption=function(C,P){if(Z.isArrayOrTypedArray(C))return te.getFirstFilled(C,P);if(C)return C},te.getRotationAngle=function(w){return(w==="auto"?0:w)*Math.PI/180}}}),uM=Ne({"src/traces/pie/fill_one.js"(te,Z){var v=zs(),w=Ha();Z.exports=function(P,t,r,a){var l=r.marker.pattern;l&&l.shape?v.pointStyle(P,r,a,t):w.fill(P,t.color)}}}),Ax=Ne({"src/traces/pie/style_one.js"(te,Z){var v=Ha(),w=Ay().castOption,C=uM();Z.exports=function(t,r,a,l){var i=a.marker.line,s=w(i.color,r.pts)||v.defaultLine,o=w(i.width,r.pts)||0;t.call(C,r,a,l).style("stroke-width",o).call(v.stroke,s)}}}),cM=Ne({"src/components/legend/style.js"(te,Z){var v=xn(),w=Yo(),C=In(),P=C.strTranslate,t=zs(),r=Ha(),a=Bd().extractOpts,l=yu(),i=Ax(),s=Ay().castOption,o=lM(),u=12,d=5,h=2,g=10,m=5;Z.exports=function(M,k,b){var A=k._fullLayout;b||(b=A.legend);var y=b.itemsizing==="constant",f=b.itemwidth,p=(f+o.itemGap*2)/2,x=P(p,0),N=function(W,ie,se,ee){var pe;if(W+1)pe=W;else if(ie&&ie.width>0)pe=ie.width;else return 0;return y?ee:Math.min(pe,se)};M.each(function(W){var ie=v.select(this),se=C.ensureSingle(ie,"g","layers");se.style("opacity",W[0].trace.opacity);var ee=b.indentation,pe=b.valign,oe=W[0].lineHeight,Y=W[0].height;if(pe==="middle"&&ee===0||!oe||!Y)se.attr("transform",null);else{var ce={top:1,bottom:-1}[pe],ue=ce*(.5*(oe-Y+3))||0,_e=b.indentation;se.attr("transform",P(_e,ue))}var Le=se.selectAll("g.legendfill").data([W]);Le.enter().append("g").classed("legendfill",!0);var ze=se.selectAll("g.legendlines").data([W]);ze.enter().append("g").classed("legendlines",!0);var Xe=se.selectAll("g.legendsymbols").data([W]);Xe.enter().append("g").classed("legendsymbols",!0),Xe.selectAll("g.legendpoints").data([W]).enter().append("g").classed("legendpoints",!0)}).each(me).each(U).each(q).each(V).each(H).each(ge).each(le).each(D).each(B).each(G).each(J);function D(W){var ie=c(W),se=ie.showFill,ee=ie.showLine,pe=ie.showGradientLine,oe=ie.showGradientFill,Y=ie.anyFill,ce=ie.anyLine,ue=W[0],_e=ue.trace,Le,ze,Xe=a(_e),Ve=Xe.colorscale,rt=Xe.reversescale,mt=function(Ye){if(Ye.size())if(se)t.fillGroupStyle(Ye,k,!0);else{var yt="legendfill-"+_e.uid;t.gradient(Ye,k,yt,E(rt),Ve,"fill")}},_t=function(Ye){if(Ye.size()){var yt="legendline-"+_e.uid;t.lineGroupStyle(Ye),t.gradient(Ye,k,yt,E(rt),Ve,"stroke")}},vt=l.hasMarkers(_e)||!Y?"M5,0":ce?"M5,-2":"M5,-3",ut=v.select(this),Fe=ut.select(".legendfill").selectAll("path").data(se||oe?[W]:[]);if(Fe.enter().append("path").classed("js-fill",!0),Fe.exit().remove(),Fe.attr("d",vt+"h"+f+"v6h-"+f+"z").call(mt),ee||pe){var Pe=N(void 0,_e.line,g,d);ze=C.minExtend(_e,{line:{width:Pe}}),Le=[C.minExtend(ue,{trace:ze})]}var be=ut.select(".legendlines").selectAll("path").data(ee||pe?[Le]:[]);be.enter().append("path").classed("js-line",!0),be.exit().remove(),be.attr("d",vt+(pe?"l"+f+",0.0001":"h"+f)).call(ee?t.lineGroupStyle:_t)}function B(W){var ie=c(W),se=ie.anyFill,ee=ie.anyLine,pe=ie.showLine,oe=ie.showMarker,Y=W[0],ce=Y.trace,ue=!oe&&!ee&&!se&&l.hasText(ce),_e,Le;function ze(Fe,Pe,be,Ye){var yt=C.nestedProperty(ce,Fe).get(),wt=C.isArrayOrTypedArray(yt)&&Pe?Pe(yt):yt;if(y&&wt&&Ye!==void 0&&(wt=Ye),be){if(wt<be[0])return be[0];if(wt>be[1])return be[1]}return wt}function Xe(Fe){return Y._distinct&&Y.index&&Fe[Y.index]?Fe[Y.index]:Fe[0]}if(oe||ue||pe){var Ve={},rt={};if(oe){Ve.mc=ze("marker.color",Xe),Ve.mx=ze("marker.symbol",Xe),Ve.mo=ze("marker.opacity",C.mean,[.2,1]),Ve.mlc=ze("marker.line.color",Xe),Ve.mlw=ze("marker.line.width",C.mean,[0,5],h),rt.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var mt=ze("marker.size",C.mean,[2,16],u);Ve.ms=mt,rt.marker.size=mt}pe&&(rt.line={width:ze("line.width",Xe,[0,10],d)}),ue&&(Ve.tx="Aa",Ve.tp=ze("textposition",Xe),Ve.ts=10,Ve.tc=ze("textfont.color",Xe),Ve.tf=ze("textfont.family",Xe),Ve.tw=ze("textfont.weight",Xe),Ve.ty=ze("textfont.style",Xe),Ve.tv=ze("textfont.variant",Xe),Ve.tC=ze("textfont.textcase",Xe),Ve.tE=ze("textfont.lineposition",Xe),Ve.tS=ze("textfont.shadow",Xe)),_e=[C.minExtend(Y,Ve)],Le=C.minExtend(ce,rt),Le.selectedpoints=null,Le.texttemplate=null}var _t=v.select(this).select("g.legendpoints"),vt=_t.selectAll("path.scatterpts").data(oe?_e:[]);vt.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",x),vt.exit().remove(),vt.call(t.pointStyle,Le,k),oe&&(_e[0].mrc=3);var ut=_t.selectAll("g.pointtext").data(ue?_e:[]);ut.enter().append("g").classed("pointtext",!0).append("text").attr("transform",x),ut.exit().remove(),ut.selectAll("text").call(t.textPointStyle,Le,k)}function U(W){var ie=W[0].trace,se=ie.type==="waterfall";if(W[0]._distinct&&se){var ee=W[0].trace[W[0].dir].marker;return W[0].mc=ee.color,W[0].mlw=ee.line.width,W[0].mlc=ee.line.color,z(W,this,"waterfall")}var pe=[];ie.visible&&se&&(pe=W[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=v.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(pe);oe.enter().append("path").classed("legendwaterfall",!0).attr("transform",x).style("stroke-miterlimit",1),oe.exit().remove(),oe.each(function(Y){var ce=v.select(this),ue=ie[Y[0]].marker,_e=N(void 0,ue.line,m,h);ce.attr("d",Y[1]).style("stroke-width",_e+"px").call(r.fill,ue.color),_e&&ce.call(r.stroke,ue.line.color)})}function V(W){z(W,this)}function q(W){z(W,this,"funnel")}function z(W,ie,se){var ee=W[0].trace,pe=ee.marker||{},oe=pe.line||{},Y=pe.cornerradius?"M6,3a3,3,0,0,1-3,3H-3a3,3,0,0,1-3-3V-3a3,3,0,0,1,3-3H3a3,3,0,0,1,3,3Z":"M6,6H-6V-6H6Z",ce=se?ee.visible&&ee.type===se:w.traceIs(ee,"bar"),ue=v.select(ie).select("g.legendpoints").selectAll("path.legend"+se).data(ce?[W]:[]);ue.enter().append("path").classed("legend"+se,!0).attr("d",Y).attr("transform",x),ue.exit().remove(),ue.each(function(_e){var Le=v.select(this),ze=_e[0],Xe=N(ze.mlw,pe.line,m,h);Le.style("stroke-width",Xe+"px");var Ve=ze.mcc;if(!b._inHover&&"mc"in ze){var rt=a(pe),mt=rt.mid;mt===void 0&&(mt=(rt.max+rt.min)/2),Ve=t.tryColorscale(pe,"")(mt)}var _t=Ve||ze.mc||pe.color,vt=pe.pattern,ut=t.getPatternAttr,Fe=vt&&(ut(vt.shape,0,"")||ut(vt.path,0,""));if(Fe){var Pe=ut(vt.bgcolor,0,null),be=ut(vt.fgcolor,0,null),Ye=vt.fgopacity,yt=_(vt.size,8,10),wt=_(vt.solidity,.5,1),ht="legend-"+ee.uid;Le.call(t.pattern,"legend",k,ht,Fe,yt,wt,Ve,vt.fillmode,Pe,be,Ye)}else Le.call(r.fill,_t);Xe&&r.stroke(Le,ze.mlc||oe.color)})}function H(W){var ie=W[0].trace,se=v.select(this).select("g.legendpoints").selectAll("path.legendbox").data(ie.visible&&w.traceIs(ie,"box-violin")?[W]:[]);se.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",x),se.exit().remove(),se.each(function(){var ee=v.select(this);if((ie.boxpoints==="all"||ie.points==="all")&&r.opacity(ie.fillcolor)===0&&r.opacity((ie.line||{}).color)===0){var pe=C.minExtend(ie,{marker:{size:y?u:C.constrain(ie.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});se.call(t.pointStyle,pe,k)}else{var oe=N(void 0,ie.line,m,h);ee.style("stroke-width",oe+"px").call(r.fill,ie.fillcolor),oe&&r.stroke(ee,ie.line.color)}})}function G(W){var ie=W[0].trace,se=v.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(ie.visible&&ie.type==="candlestick"?[W,W]:[]);se.enter().append("path").classed("legendcandle",!0).attr("d",function(ee,pe){return pe?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",x).style("stroke-miterlimit",1),se.exit().remove(),se.each(function(ee,pe){var oe=v.select(this),Y=ie[pe?"increasing":"decreasing"],ce=N(void 0,Y.line,m,h);oe.style("stroke-width",ce+"px").call(r.fill,Y.fillcolor),ce&&r.stroke(oe,Y.line.color)})}function J(W){var ie=W[0].trace,se=v.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(ie.visible&&ie.type==="ohlc"?[W,W]:[]);se.enter().append("path").classed("legendohlc",!0).attr("d",function(ee,pe){return pe?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",x).style("stroke-miterlimit",1),se.exit().remove(),se.each(function(ee,pe){var oe=v.select(this),Y=ie[pe?"increasing":"decreasing"],ce=N(void 0,Y.line,m,h);oe.style("fill","none").call(t.dashLine,Y.line.dash,ce),ce&&r.stroke(oe,Y.line.color)})}function le(W){de(W,this,"pie")}function ge(W){de(W,this,"funnelarea")}function de(W,ie,se){var ee=W[0],pe=ee.trace,oe=se?pe.visible&&pe.type===se:w.traceIs(pe,se),Y=v.select(ie).select("g.legendpoints").selectAll("path.legend"+se).data(oe?[W]:[]);if(Y.enter().append("path").classed("legend"+se,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",x),Y.exit().remove(),Y.size()){var ce=pe.marker||{},ue=N(s(ce.line.width,ee.pts),ce.line,m,h),_e="pieLike",Le=C.minExtend(pe,{marker:{line:{width:ue}}},_e),ze=C.minExtend(ee,{trace:Le},_e);i(Y,ze,Le,k)}}function me(W){var ie=W[0].trace,se,ee=[];if(ie.visible)switch(ie.type){case"histogram2d":case"heatmap":ee=[["M-15,-2V4H15V-2Z"]],se=!0;break;case"choropleth":case"choroplethmapbox":case"choroplethmap":ee=[["M-6,-6V6H6V-6Z"]],se=!0;break;case"densitymapbox":case"densitymap":ee=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],se="radial";break;case"cone":ee=[["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"]],se=!1;break;case"streamtube":ee=[["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"]],se=!1;break;case"surface":ee=[["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"]],se=!0;break;case"mesh3d":ee=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],se=!1;break;case"volume":ee=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],se=!0;break;case"isosurface":ee=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],se=!1;break}var pe=v.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(ee);pe.enter().append("path").classed("legend3dandfriends",!0).attr("transform",x).style("stroke-miterlimit",1),pe.exit().remove(),pe.each(function(oe,Y){var ce=v.select(this),ue=a(ie),_e=ue.colorscale,Le=ue.reversescale,ze=function(mt){if(mt.size()){var _t="legendfill-"+ie.uid;t.gradient(mt,k,_t,E(Le,se==="radial"),_e,"fill")}},Xe;if(_e){if(!se){var rt=_e.length;Xe=Y===0?_e[Le?rt-1:0][1]:Y===1?_e[Le?0:rt-1][1]:_e[Math.floor((rt-1)/2)][1]}}else{var Ve=ie.vertexcolor||ie.facecolor||ie.color;Xe=C.isArrayOrTypedArray(Ve)?Ve[Y]||Ve[0]:Ve}ce.attr("d",oe[0]),Xe?ce.call(r.fill,Xe):ce.call(ze)})}};function E(T,M){var k=M?"radial":"horizontal";return k+(T?"":"reversed")}function c(T){var M=T[0].trace,k=M.contours,b=l.hasLines(M),A=l.hasMarkers(M),y=M.visible&&M.fill&&M.fill!=="none",f=!1,p=!1;if(k){var x=k.coloring;x==="lines"?f=!0:b=x==="none"||x==="heatmap"||k.showlines,k.type==="constraint"?y=k._operation!=="=":(x==="fill"||x==="heatmap")&&(p=!0)}return{showMarker:A,showLine:b,showFill:y,showGradientLine:f,showGradientFill:p,anyLine:b||f,anyFill:y||p}}function _(T,M,k){return T&&C.isArrayOrTypedArray(T)?M:T>k?k:T}}}),fM=Ne({"src/components/legend/draw.js"(te,Z){var v=xn(),w=In(),C=ff(),P=Yo(),t=wx(),r=Uv(),a=zs(),l=Ha(),i=hc(),s=iA(),o=lM(),u=Ad(),d=u.LINE_SPACING,h=u.FROM_TL,g=u.FROM_BR,m=PL(),E=cM(),c=aA(),_=1,T=/^legend[0-9]*$/;Z.exports=function(G,J){if(J)k(G,J);else{var le=G._fullLayout,ge=le._legends,de=le._infolayer.selectAll('[class^="legend"]');de.each(function(){var se=v.select(this),ee=se.attr("class"),pe=ee.split(" ")[0];pe.match(T)&&ge.indexOf(pe)===-1&&se.remove()});for(var me=0;me<ge.length;me++){var W=ge[me],ie=G._fullLayout[W];k(G,ie)}}};function M(H,G,J){if(!(G.title.side!=="top center"&&G.title.side!=="top right")){var le=G.title.font,ge=le.size*d,de=0,me=H.node(),W=a.bBox(me).width;G.title.side==="top center"?de=.5*(G._width-2*J-2*o.titlePad-W):G.title.side==="top right"&&(de=G._width-2*J-2*o.titlePad-W),i.positionText(H,J+o.titlePad+de,J+ge)}}function k(H,G){var J=G||{},le=H._fullLayout,ge=z(J),de,me,W=J._inHover;if(W?(me=J.layer,de="hover"):(me=le._infolayer,de=ge),!!me){de+=le._uid,H._legendMouseDownTime||(H._legendMouseDownTime=0);var ie;if(W){if(!J.entries)return;ie=m(J.entries,J)}else{for(var se=(H.calcdata||[]).slice(),ee=le.shapes,pe=0;pe<ee.length;pe++){var oe=ee[pe];if(oe.showlegend){var Y={_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"}};se.push([{trace:Y}])}}ie=le.showlegend&&m(se,J,le._legends.length>1)}var ce=le.hiddenlabels||[];if(!W&&(!le.showlegend||!ie.length))return me.selectAll("."+ge).remove(),le._topdefs.select("#"+de).remove(),C.autoMargin(H,ge);var ue=w.ensureSingle(me,"g",ge,function(vt){W||vt.attr("pointer-events","all")}),_e=w.ensureSingleById(le._topdefs,"clipPath",de,function(vt){vt.append("rect")}),Le=w.ensureSingle(ue,"rect","bg",function(vt){vt.attr("shape-rendering","crispEdges")});Le.call(l.stroke,J.bordercolor).call(l.fill,J.bgcolor).style("stroke-width",J.borderwidth+"px");var ze=w.ensureSingle(ue,"g","scrollbox"),Xe=J.title;J._titleWidth=0,J._titleHeight=0;var Ve;Xe.text?(Ve=w.ensureSingle(ze,"text",ge+"titletext"),Ve.attr("text-anchor","start").call(a.font,Xe.font).text(Xe.text),x(Ve,ze,H,J,_)):ze.selectAll("."+ge+"titletext").remove();var rt=w.ensureSingle(ue,"rect","scrollbar",function(vt){vt.attr(o.scrollBarEnterAttrs).call(l.fill,o.scrollBarColor)}),mt=ze.selectAll("g.groups").data(ie);mt.enter().append("g").attr("class","groups"),mt.exit().remove();var _t=mt.selectAll("g.traces").data(w.identity);_t.enter().append("g").attr("class","traces"),_t.exit().remove(),_t.style("opacity",function(vt){var ut=vt[0].trace;return P.traceIs(ut,"pie-like")?ce.indexOf(vt[0].label)!==-1?.5:1:ut.visible==="legendonly"?.5:1}).each(function(){v.select(this).call(y,H,J)}).call(E,H,J).each(function(){W||v.select(this).call(p,H,ge)}),w.syncOrAsync([C.previousPromises,function(){return B(H,mt,_t,J)},function(){var vt=le._size,ut=J.borderwidth,Fe=J.xref==="paper",Pe=J.yref==="paper";if(Xe.text&&M(Ve,J,ut),!W){var be,Ye;Fe?be=vt.l+vt.w*J.x-h[V(J)]*J._width:be=le.width*J.x-h[V(J)]*J._width,Pe?Ye=vt.t+vt.h*(1-J.y)-h[q(J)]*J._effHeight:Ye=le.height*(1-J.y)-h[q(J)]*J._effHeight;var yt=U(H,ge,be,Ye);if(yt)return;if(le.margin.autoexpand){var wt=be,ht=Ye;be=Fe?w.constrain(be,0,le.width-J._width):wt,Ye=Pe?w.constrain(Ye,0,le.height-J._effHeight):ht,be!==wt&&w.log("Constrain "+ge+".x to make legend fit inside graph"),Ye!==ht&&w.log("Constrain "+ge+".y to make legend fit inside graph")}a.setTranslate(ue,be,Ye)}if(rt.on(".drag",null),ue.on("wheel",null),W||J._height<=J._maxHeight||H._context.staticPlot){var Yt=J._effHeight;W&&(Yt=J._height),Le.attr({width:J._width-ut,height:Yt-ut,x:ut/2,y:ut/2}),a.setTranslate(ze,0,0),_e.select("rect").attr({width:J._width-2*ut,height:Yt-2*ut,x:ut,y:ut}),a.setClipUrl(ze,de,H),a.setRect(rt,0,0,0,0),delete J._scrollY}else{var $t=Math.max(o.scrollBarMinHeight,J._effHeight*J._effHeight/J._height),fr=J._effHeight-$t-2*o.scrollBarMargin,mr=J._height-J._effHeight,Ur=fr/mr,jr=Math.min(J._scrollY||0,mr);Le.attr({width:J._width-2*ut+o.scrollBarWidth+o.scrollBarMargin,height:J._effHeight-ut,x:ut/2,y:ut/2}),_e.select("rect").attr({width:J._width-2*ut+o.scrollBarWidth+o.scrollBarMargin,height:J._effHeight-2*ut,x:ut,y:ut+jr}),a.setClipUrl(ze,de,H),Ee(jr,$t,Ur),ue.on("wheel",function(){jr=w.constrain(J._scrollY+v.event.deltaY/mr*fr,0,mr),Ee(jr,$t,Ur),jr!==0&&jr!==mr&&v.event.preventDefault()});var fn,Br,Qr,Ot=function(Bt,Ft,Wt){var lr=(Wt-Ft)/Ur+Bt;return w.constrain(lr,0,mr)},$e=function(Bt,Ft,Wt){var lr=(Ft-Wt)/Ur+Bt;return w.constrain(lr,0,mr)},ot=v.behavior.drag().on("dragstart",function(){var Bt=v.event.sourceEvent;Bt.type==="touchstart"?fn=Bt.changedTouches[0].clientY:fn=Bt.clientY,Qr=jr}).on("drag",function(){var Bt=v.event.sourceEvent;Bt.buttons===2||Bt.ctrlKey||(Bt.type==="touchmove"?Br=Bt.changedTouches[0].clientY:Br=Bt.clientY,jr=Ot(Qr,fn,Br),Ee(jr,$t,Ur))});rt.call(ot);var De=v.behavior.drag().on("dragstart",function(){var Bt=v.event.sourceEvent;Bt.type==="touchstart"&&(fn=Bt.changedTouches[0].clientY,Qr=jr)}).on("drag",function(){var Bt=v.event.sourceEvent;Bt.type==="touchmove"&&(Br=Bt.changedTouches[0].clientY,jr=$e(Qr,fn,Br),Ee(jr,$t,Ur))});ze.call(De)}function Ee(Bt,Ft,Wt){J._scrollY=H._fullLayout[ge]._scrollY=Bt,a.setTranslate(ze,0,-Bt),a.setRect(rt,J._width,o.scrollBarMargin+Bt*Wt,o.scrollBarWidth,Ft),_e.select("rect").attr("y",ut+Bt)}if(H._context.edits.legendPosition){var Ae,Ie,tt,st;ue.classed("cursor-move",!0),r.init({element:ue.node(),gd:H,prepFn:function(Bt){if(Bt.target!==rt.node()){var Ft=a.getTranslate(ue);tt=Ft.x,st=Ft.y}},moveFn:function(Bt,Ft){if(tt!==void 0&&st!==void 0){var Wt=tt+Bt,lr=st+Ft;a.setTranslate(ue,Wt,lr),Ae=r.align(Wt,J._width,vt.l,vt.l+vt.w,J.xanchor),Ie=r.align(lr+J._height,-J._height,vt.t+vt.h,vt.t,J.yanchor)}},doneFn:function(){if(Ae!==void 0&&Ie!==void 0){var Bt={};Bt[ge+".x"]=Ae,Bt[ge+".y"]=Ie,P.call("_guiRelayout",H,Bt)}},clickFn:function(Bt,Ft){var Wt=me.selectAll("g.traces").filter(function(){var lr=this.getBoundingClientRect();return Ft.clientX>=lr.left&&Ft.clientX<=lr.right&&Ft.clientY>=lr.top&&Ft.clientY<=lr.bottom});Wt.size()>0&&A(H,ue,Wt,Bt,Ft)}})}}],H)}}function b(H,G,J){var le=H[0],ge=le.width,de=G.entrywidthmode,me=le.trace.legendwidth||G.entrywidth;return de==="fraction"?G._maxWidth*me:J+(me||ge)}function A(H,G,J,le,ge){var de=J.data()[0][0].trace,me={event:ge,node:J.node(),curveNumber:de.index,expandedIndex:de.index,data:H.data,layout:H.layout,frames:H._transitionData._frames,config:H._context,fullData:H._fullData,fullLayout:H._fullLayout};de._group&&(me.group=de._group),P.traceIs(de,"pie-like")&&(me.label=J.datum()[0].label);var W=t.triggerHandler(H,"plotly_legendclick",me);if(le===1){if(W===!1)return;G._clickTimeout=setTimeout(function(){H._fullLayout&&s(J,H,le)},H._context.doubleClickDelay)}else if(le===2){G._clickTimeout&&clearTimeout(G._clickTimeout),H._legendMouseDownTime=0;var ie=t.triggerHandler(H,"plotly_legenddoubleclick",me);ie!==!1&&W!==!1&&s(J,H,le)}}function y(H,G,J){var le=z(J),ge=H.data()[0][0],de=ge.trace,me=P.traceIs(de,"pie-like"),W=!J._inHover&&G._context.edits.legendText&&!me,ie=J._maxNameLength,se,ee;ge.groupTitle?(se=ge.groupTitle.text,ee=ge.groupTitle.font):(ee=J.font,J.entries?se=ge.text:(se=me?ge.label:de.name,de._meta&&(se=w.templateString(se,de._meta))));var pe=w.ensureSingle(H,"text",le+"text");pe.attr("text-anchor","start").call(a.font,ee).text(W?f(se,ie):se);var oe=J.indentation+J.itemwidth+o.itemGap*2;i.positionText(pe,oe,0),W?pe.call(i.makeEditable,{gd:G,text:se}).call(x,H,G,J).on("edit",function(Y){this.text(f(Y,ie)).call(x,H,G,J);var ce=ge.trace._fullInput||{},ue={};return ue.name=Y,ce._isShape?P.call("_guiRelayout",G,"shapes["+de.index+"].name",ue.name):P.call("_guiRestyle",G,ue,de.index)}):x(pe,H,G,J)}function f(H,G){var J=Math.max(4,G);if(H&&H.trim().length>=J/2)return H;H=H||"";for(var le=J-H.length;le>0;le--)H+=" ";return H}function p(H,G,J){var le=G._context.doubleClickDelay,ge,de=1,me=w.ensureSingle(H,"rect",J+"toggle",function(W){G._context.staticPlot||W.style("cursor","pointer").attr("pointer-events","all"),W.call(l.fill,"rgba(0,0,0,0)")});G._context.staticPlot||(me.on("mousedown",function(){ge=new Date().getTime(),ge-G._legendMouseDownTime<le?de+=1:(de=1,G._legendMouseDownTime=ge)}),me.on("mouseup",function(){if(!(G._dragged||G._editing)){var W=G._fullLayout[J];new Date().getTime()-G._legendMouseDownTime>le&&(de=Math.max(de-1,1)),A(G,W,H,de,v.event)}}))}function x(H,G,J,le,ge){le._inHover&&H.attr("data-notex",!0),i.convertToTspans(H,J,function(){N(G,J,le,ge)})}function N(H,G,J,le){var ge=H.data()[0][0];if(!J._inHover&&ge&&!ge.trace.showlegend){H.remove();return}var de=H.select("g[class*=math-group]"),me=de.node(),W=z(J);J||(J=G._fullLayout[W]);var ie=J.borderwidth,se;le===_?se=J.title.font:ge.groupTitle?se=ge.groupTitle.font:se=J.font;var ee=se.size*d,pe,oe;if(me){var Y=a.bBox(me);pe=Y.height,oe=Y.width,le===_?a.setTranslate(de,ie,ie+pe*.75):a.setTranslate(de,0,pe*.25)}else{var ce="."+W+(le===_?"title":"")+"text",ue=H.select(ce),_e=i.lineCount(ue),Le=ue.node();if(pe=ee*_e,oe=Le?a.bBox(Le).width:0,le===_)J.title.side==="left"&&(oe+=o.itemGap*2),i.positionText(ue,ie+o.titlePad,ie+ee);else{var ze=o.itemGap*2+J.indentation+J.itemwidth;ge.groupTitle&&(ze=o.itemGap,oe-=J.indentation+J.itemwidth),i.positionText(ue,ze,-ee*((_e-1)/2-.3))}}le===_?(J._titleWidth=oe,J._titleHeight=pe):(ge.lineHeight=ee,ge.height=Math.max(pe,16)+3,ge.width=oe)}function D(H){var G=0,J=0,le=H.title.side;return le&&(le.indexOf("left")!==-1&&(G=H._titleWidth),le.indexOf("top")!==-1&&(J=H._titleHeight)),[G,J]}function B(H,G,J,le){var ge=H._fullLayout,de=z(le);le||(le=ge[de]);var me=ge._size,W=c.isVertical(le),ie=c.isGrouped(le),se=le.entrywidthmode==="fraction",ee=le.borderwidth,pe=2*ee,oe=o.itemGap,Y=le.indentation+le.itemwidth+oe*2,ce=2*(ee+oe),ue=q(le),_e=le.y<0||le.y===0&&ue==="top",Le=le.y>1||le.y===1&&ue==="bottom",ze=le.tracegroupgap,Xe={};const{orientation:Ve,yref:rt}=le;let{maxheight:mt}=le;const _t=_e||Le||Ve!=="v"||rt!=="paper";mt||(mt=_t?.5:1);const vt=_t?ge.height:me.h;le._maxHeight=Math.max(mt>1?mt:mt*vt,30);var ut=0;le._width=0,le._height=0;var Fe=D(le);if(W)J.each(function(Ee){var Ae=Ee[0].height;a.setTranslate(this,ee+Fe[0],ee+Fe[1]+le._height+Ae/2+oe),le._height+=Ae,le._width=Math.max(le._width,Ee[0].width)}),ut=Y+le._width,le._width+=oe+Y+pe,le._height+=ce,ie&&(G.each(function(Ee,Ae){a.setTranslate(this,0,Ae*le.tracegroupgap)}),le._height+=(le._lgroupsLength-1)*le.tracegroupgap);else{var Pe=V(le),be=le.x<0||le.x===0&&Pe==="right",Ye=le.x>1||le.x===1&&Pe==="left",yt=Le||_e,wt=ge.width/2;le._maxWidth=Math.max(be?yt&&Pe==="left"?me.l+me.w:wt:Ye?yt&&Pe==="right"?me.r+me.w:wt:me.w,2*Y);var ht=0,Yt=0;J.each(function(Ee){var Ae=b(Ee,le,Y);ht=Math.max(ht,Ae),Yt+=Ae}),ut=null;var $t=0;if(ie){var fr=0,mr=0,Ur=0;G.each(function(){var Ee=0,Ae=0;v.select(this).selectAll("g.traces").each(function(tt){var st=b(tt,le,Y),Bt=tt[0].height;a.setTranslate(this,Fe[0],Fe[1]+ee+oe+Bt/2+Ae),Ae+=Bt,Ee=Math.max(Ee,st),Xe[tt[0].trace.legendgroup]=Ee});var Ie=Ee+oe;mr>0&&Ie+ee+mr>le._maxWidth?($t=Math.max($t,mr),mr=0,Ur+=fr+ze,fr=Ae):fr=Math.max(fr,Ae),a.setTranslate(this,mr,Ur),mr+=Ie}),le._width=Math.max($t,mr)+ee,le._height=Ur+fr+ce}else{var jr=J.size(),fn=Yt+pe+(jr-1)*oe<le._maxWidth,Br=0,Qr=0,Ot=0,$e=0;J.each(function(Ee){var Ae=Ee[0].height,Ie=b(Ee,le,Y),tt=fn?Ie:ht;se||(tt+=oe),tt+ee+Qr-oe>=le._maxWidth&&($t=Math.max($t,$e),Qr=0,Ot+=Br,le._height+=Br,Br=0),a.setTranslate(this,Fe[0]+ee+Qr,Fe[1]+ee+Ot+Ae/2+oe),$e=Qr+Ie+oe,Qr+=tt,Br=Math.max(Br,Ae)}),fn?(le._width=Qr+pe,le._height=Br+ce):(le._width=Math.max($t,$e)+pe,le._height+=Br+ce)}}le._width=Math.ceil(Math.max(le._width+Fe[0],le._titleWidth+2*(ee+o.titlePad))),le._height=Math.ceil(Math.max(le._height+Fe[1],le._titleHeight+2*(ee+o.itemGap))),le._effHeight=Math.min(le._height,le._maxHeight);var ot=H._context.edits,De=ot.legendText||ot.legendPosition;J.each(function(Ee){var Ae=v.select(this).select("."+de+"toggle"),Ie=Ee[0].height,tt=Ee[0].trace.legendgroup,st=b(Ee,le,Y);ie&&tt!==""&&(st=Xe[tt]);var Bt=De?Y:ut||st;!W&&!se&&(Bt+=oe/2),a.setRect(Ae,0,-Ie/2,Bt,Ie)})}function U(H,G,J,le){var ge=H._fullLayout,de=ge[G],me=V(de),W=q(de),ie=de.xref==="paper",se=de.yref==="paper";H._fullLayout._reservedMargin[G]={};var ee=de.y<.5?"b":"t",pe=de.x<.5?"l":"r",oe={r:ge.width-J,l:J+de._width,b:ge.height-le,t:le+de._effHeight};if(ie&&se)return C.autoMargin(H,G,{x:de.x,y:de.y,l:de._width*h[me],r:de._width*g[me],b:de._effHeight*g[W],t:de._effHeight*h[W]});ie?H._fullLayout._reservedMargin[G][ee]=oe[ee]:se||de.orientation==="v"?H._fullLayout._reservedMargin[G][pe]=oe[pe]:H._fullLayout._reservedMargin[G][ee]=oe[ee]}function V(H){return w.isRightAnchor(H)?"right":w.isCenterAnchor(H)?"center":"left"}function q(H){return w.isBottomAnchor(H)?"bottom":w.isMiddleAnchor(H)?"middle":"top"}function z(H){return H._id||"legend"}}}),hM=Ne({"src/components/fx/hover.js"(te){var Z=xn(),v=Fn(),w=to(),C=In(),P=C.pushUnique,t=C.strTranslate,r=C.strRotate,a=wx(),l=hc(),i=kL(),s=zs(),o=Ha(),u=Uv(),d=Os(),h=wh().zindexSeparator,g=Yo(),m=bv(),E=Ll(),c=sM(),_=fM(),T=E.YANGLE,M=Math.PI*T/180,k=1/Math.sin(M),b=Math.cos(M),A=Math.sin(M),y=E.HOVERARROWSIZE,f=E.HOVERTEXTPAD,p={box:!0,ohlc:!0,violin:!0,candlestick:!0},x={scatter:!0,scattergl:!0,splom:!0};function N(Y,ce){return Y.distance-ce.distance}te.hover=function(ce,ue,_e,Le){ce=C.getGraphDiv(ce);var ze=ue.target;C.throttle(ce._fullLayout._uid+E.HOVERID,E.HOVERMINTIME,function(){D(ce,ue,_e,Le,ze)})},te.loneHover=function(ce,ue){var _e=!0;Array.isArray(ce)||(_e=!1,ce=[ce]);var Le=ue.gd,ze=ee(Le),Xe=pe(Le),Ve=ce.map(function(Ye){var yt=Ye._x0||Ye.x0||Ye.x||0,wt=Ye._x1||Ye.x1||Ye.x||0,ht=Ye._y0||Ye.y0||Ye.y||0,Yt=Ye._y1||Ye.y1||Ye.y||0,$t=Ye.eventData;if($t){var fr=Math.min(yt,wt),mr=Math.max(yt,wt),Ur=Math.min(ht,Yt),jr=Math.max(ht,Yt),fn=Ye.trace;if(g.traceIs(fn,"gl3d")){var Br=Le._fullLayout[fn.scene]._scene.container,Qr=Br.offsetLeft,Ot=Br.offsetTop;fr+=Qr,mr+=Qr,Ur+=Ot,jr+=Ot}$t.bbox={x0:fr+Xe,x1:mr+Xe,y0:Ur+ze,y1:jr+ze},ue.inOut_bbox&&ue.inOut_bbox.push($t.bbox)}else $t=!1;return{color:Ye.color||o.defaultLine,x0:Ye.x0||Ye.x||0,x1:Ye.x1||Ye.x||0,y0:Ye.y0||Ye.y||0,y1:Ye.y1||Ye.y||0,xLabel:Ye.xLabel,yLabel:Ye.yLabel,zLabel:Ye.zLabel,text:Ye.text,name:Ye.name,idealAlign:Ye.idealAlign,borderColor:Ye.borderColor,fontFamily:Ye.fontFamily,fontSize:Ye.fontSize,fontColor:Ye.fontColor,fontWeight:Ye.fontWeight,fontStyle:Ye.fontStyle,fontVariant:Ye.fontVariant,nameLength:Ye.nameLength,textAlign:Ye.textAlign,trace:Ye.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:Ye.hovertemplate||!1,hovertemplateLabels:Ye.hovertemplateLabels||!1,eventData:$t}}),rt=!1,mt=V(Ve,{gd:Le,hovermode:"closest",rotateLabels:rt,bgColor:ue.bgColor||o.background,container:Z.select(ue.container),outerContainer:ue.outerContainer||ue.container}),_t=mt.hoverLabels,vt=5,ut=0,Fe=0;_t.sort(function(Ye,yt){return Ye.y0-yt.y0}).each(function(Ye,yt){var wt=Ye.y0-Ye.by/2;wt-vt<ut?Ye.offset=ut-wt+vt:Ye.offset=0,ut=wt+Ye.by+Ye.offset,yt===ue.anchorIndex&&(Fe=Ye.offset)}).each(function(Ye){Ye.offset-=Fe});var Pe=Le._fullLayout._invScaleX,be=Le._fullLayout._invScaleY;return J(_t,rt,Pe,be),_e?_t:_t.node()};function D(Y,ce,ue,_e,Le){ue||(ue="xy"),typeof ue=="string"&&(ue=ue.split(h)[0]);var ze=Array.isArray(ue)?ue:[ue],Xe,Ve=Y._fullLayout,rt=Ve.hoversubplots,mt=Ve._plots||[],_t=mt[ue],vt=Ve._has("cartesian"),ut=ce.hovermode||Ve.hovermode,Fe=(ut||"").charAt(0)==="x",Pe=(ut||"").charAt(0)==="y",be,Ye;if(vt&&(Fe||Pe)&&rt==="axis"){for(var yt=ze.length,wt=0;wt<yt;wt++)if(Xe=ze[wt],mt[Xe]){be=d.getFromId(Y,Xe,"x"),Ye=d.getFromId(Y,Xe,"y");var ht=(Fe?be:Ye)._subplotsWith;if(ht&&ht.length)for(var Yt=0;Yt<ht.length;Yt++)P(ze,ht[Yt])}}if(_t&&rt!=="single"){var $t=_t.overlays.map(function(Oi){return Oi.id});ze=ze.concat($t)}for(var fr=ze.length,mr=new Array(fr),Ur=new Array(fr),jr=!1,fn=0;fn<fr;fn++)if(Xe=ze[fn],mt[Xe])jr=!0,mr[fn]=mt[Xe].xaxis,Ur[fn]=mt[Xe].yaxis;else if(Ve[Xe]&&Ve[Xe]._subplot){var Br=Ve[Xe]._subplot;mr[fn]=Br.xaxis,Ur[fn]=Br.yaxis}else{C.warn("Unrecognized subplot: "+Xe);return}if(ut&&!jr&&(ut="closest"),["x","y","closest","x unified","y unified"].indexOf(ut)===-1||!Y.calcdata||Y.querySelector(".zoombox")||Y._dragging)return u.unhoverRaw(Y,ce);var Qr=Ve.hoverdistance;Qr===-1&&(Qr=1/0);var Ot=Ve.spikedistance;Ot===-1&&(Ot=1/0);var $e=[],ot=[],De,Ee,Ae,Ie,tt,st,Bt,Ft,Wt,lr,Rr,Mr,Sr,Kr={hLinePoint:null,vLinePoint:null},Hn=!1;if(Array.isArray(ce))for(ut="array",Ae=0;Ae<ce.length;Ae++)tt=Y.calcdata[ce[Ae].curveNumber||0],tt&&(st=tt[0].trace,tt[0].trace.hoverinfo!=="skip"&&(ot.push(tt),st.orientation==="h"&&(Hn=!0)));else{var ga=Y.calcdata.slice();for(ga.sort(function(Oi,ps){var as=Oi[0].trace.zorder||0,rl=ps[0].trace.zorder||0;return as-rl}),Ie=0;Ie<ga.length;Ie++)tt=ga[Ie],st=tt[0].trace,st.hoverinfo!=="skip"&&m.isTraceInSubplots(st,ze)&&(ot.push(tt),st.orientation==="h"&&(Hn=!0));var ua=!Le,Ta,Aa;if(ua)"xpx"in ce?Ta=ce.xpx:Ta=mr[0]._length/2,"ypx"in ce?Aa=ce.ypx:Aa=Ur[0]._length/2;else{if(a.triggerHandler(Y,"plotly_beforehover",ce)===!1)return;var ia=Le.getBoundingClientRect();Ta=ce.clientX-ia.left,Aa=ce.clientY-ia.top,Ve._calcInverseTransform(Y);var $a=C.apply3DTransform(Ve._invTransform)(Ta,Aa);if(Ta=$a[0],Aa=$a[1],Ta<0||Ta>mr[0]._length||Aa<0||Aa>Ur[0]._length)return u.unhoverRaw(Y,ce)}if(ce.pointerX=Ta+mr[0]._offset,ce.pointerY=Aa+Ur[0]._offset,"xval"in ce?De=m.flat(ze,ce.xval):De=m.p2c(mr,Ta),"yval"in ce?Ee=m.flat(ze,ce.yval):Ee=m.p2c(Ur,Aa),!v(De[0])||!v(Ee[0]))return C.warn("Fx.hover failed",ce,Y),u.unhoverRaw(Y,ce)}var ci=1/0;function _r(Oi,ps){for(Ie=0;Ie<ot.length;Ie++)if(tt=ot[Ie],!(!tt||!tt[0]||!tt[0].trace)&&(st=tt[0].trace,!(st.visible!==!0||st._length===0)&&["carpet","contourcarpet"].indexOf(st._module.name)===-1)){if(Wt=ut,m.isUnifiedHover(Wt)&&(Wt=Wt.charAt(0)),st.type==="splom"?(Ft=0,Bt=ze[Ft]):(Bt=m.getSubplot(st),Ft=ze.indexOf(Bt)),Mr={cd:tt,trace:st,xa:mr[Ft],ya:Ur[Ft],maxHoverDistance:Qr,maxSpikeDistance:Ot,index:!1,distance:Math.min(ci,Qr),spikeDistance:1/0,xSpike:void 0,ySpike:void 0,color:o.defaultLine,name:st.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},Ve[Bt]&&(Mr.subplot=Ve[Bt]._subplot),Ve._splomScenes&&Ve._splomScenes[st.uid]&&(Mr.scene=Ve._splomScenes[st.uid]),Wt==="array"){var as=ce[Ie];"pointNumber"in as?(Mr.index=as.pointNumber,Wt="closest"):(Wt="","xval"in as&&(lr=as.xval,Wt="x"),"yval"in as&&(Rr=as.yval,Wt=Wt?"closest":"y"))}else Oi!==void 0&&ps!==void 0?(lr=Oi,Rr=ps):(lr=De[Ft],Rr=Ee[Ft]);if(Sr=$e.length,Qr!==0)if(st._module&&st._module.hoverPoints){var rl=st._module.hoverPoints(Mr,lr,Rr,Wt,{finiteRange:!0,hoverLayer:Ve._hoverlayer,hoversubplots:rt,gd:Y});if(rl)for(var As,hs=0;hs<rl.length;hs++)As=rl[hs],v(As.x0)&&v(As.y0)&&$e.push(le(As,ut))}else C.log("Unrecognized trace type in hover:",st);if(ut==="closest"&&$e.length>Sr&&($e.splice(0,Sr),ci=$e[0].distance),vt&&Ot!==0&&$e.length===0){Mr.distance=Ot,Mr.index=!1;var ts=st._module.hoverPoints(Mr,lr,Rr,"closest",{hoverLayer:Ve._hoverlayer});if(ts&&(ts=ts.filter(function(Oo){return Oo.spikeDistance<=Ot})),ts&&ts.length){var nl,Qs=ts.filter(function(Oo){return Oo.xa.showspikes&&Oo.xa.spikesnap!=="hovered data"});if(Qs.length){var _l=Qs[0];v(_l.x0)&&v(_l.y0)&&(nl=yr(_l),(!Kr.vLinePoint||Kr.vLinePoint.spikeDistance>nl.spikeDistance)&&(Kr.vLinePoint=nl))}var Ss=ts.filter(function(Oo){return Oo.ya.showspikes&&Oo.ya.spikesnap!=="hovered data"});if(Ss.length){var ls=Ss[0];v(ls.x0)&&v(ls.y0)&&(nl=yr(ls),(!Kr.hLinePoint||Kr.hLinePoint.spikeDistance>nl.spikeDistance)&&(Kr.hLinePoint=nl))}}}}}_r();function Qt(Oi,ps,as){for(var rl=null,As=1/0,hs,ts=0;ts<Oi.length;ts++)be&&be._id!==Oi[ts].xa._id||Ye&&Ye._id!==Oi[ts].ya._id||(hs=Oi[ts].spikeDistance,as&&ts===0&&(hs=-1/0),hs<=As&&hs<=ps&&(rl=Oi[ts],As=hs));return rl}function yr(Oi){return Oi?{xa:Oi.xa,ya:Oi.ya,x:Oi.xSpike!==void 0?Oi.xSpike:(Oi.x0+Oi.x1)/2,y:Oi.ySpike!==void 0?Oi.ySpike:(Oi.y0+Oi.y1)/2,distance:Oi.distance,spikeDistance:Oi.spikeDistance,curveNumber:Oi.trace.index,color:Oi.color,pointNumber:Oi.index}:null}var br={fullLayout:Ve,container:Ve._hoverlayer,event:ce};Y._spikepoints;var an={vLinePoint:Kr.vLinePoint,hLinePoint:Kr.hLinePoint};Y._spikepoints=an;var wn=function(){var Oi=$e.filter(function(as){return be&&be._id===as.xa._id&&Ye&&Ye._id===as.ya._id}),ps=$e.filter(function(as){return!(be&&be._id===as.xa._id&&Ye&&Ye._id===as.ya._id)});Oi.sort(N),ps.sort(N),$e=Oi.concat(ps),$e=ie($e,ut)};wn();var Ln=ut.charAt(0),Bn=(Ln==="x"||Ln==="y")&&$e[0]&&x[$e[0].trace.type];if(vt&&Ot!==0&&$e.length!==0){var xa=$e.filter(function(Oi){return Oi.ya.showspikes}),za=Qt(xa,Ot,Bn);Kr.hLinePoint=yr(za);var Ia=$e.filter(function(Oi){return Oi.xa.showspikes}),Ba=Qt(Ia,Ot,Bn);Kr.vLinePoint=yr(Ba)}if($e.length===0){var Ka=u.unhoverRaw(Y,ce);return vt&&(Kr.hLinePoint!==null||Kr.vLinePoint!==null)&&me()&&ge(Y,Kr,br),Ka}if(vt&&me()&&ge(Y,Kr,br),m.isXYhover(Wt)&&$e[0].length!==0&&$e[0].trace.type!=="splom"){var fa=$e[0];p[fa.trace.type]?$e=$e.filter(Oi=>Oi.trace.index===fa.trace.index):$e=[fa];var Bi=$e.length,Yi=se("x",fa,Ve),Ht=se("y",fa,Ve);_r(Yi,Ht);var kt=[],qr={},en=0,rn=function(Oi){var ps=p[Oi.trace.type]?B(Oi):Oi.trace.index;if(!qr[ps])en++,qr[ps]=en,kt.push(Oi);else{var as=qr[ps]-1,rl=kt[as];as>0&&Math.abs(Oi.distance)<Math.abs(rl.distance)&&(kt[as]=Oi)}},Wr;for(Wr=0;Wr<Bi;Wr++)rn($e[Wr]);for(Wr=$e.length-1;Wr>Bi-1;Wr--)rn($e[Wr]);$e=kt,wn()}var tn=Y._hoverdata,Tn=[],dn=ee(Y),It=pe(Y);for(const Oi of $e){var xr=m.makeEventData(Oi,Oi.trace,Oi.cd);if(Oi.hovertemplate!==!1){var Yr=!1;Oi.cd[Oi.index]&&Oi.cd[Oi.index].ht&&(Yr=Oi.cd[Oi.index].ht),Oi.hovertemplate=Yr||Oi.trace.hovertemplate||!1}if(Oi.xa&&Oi.ya){var An=Oi.x0+Oi.xa._offset,Zn=Oi.x1+Oi.xa._offset,sa=Oi.y0+Oi.ya._offset,oa=Oi.y1+Oi.ya._offset,Sn=Math.min(An,Zn),Kn=Math.max(An,Zn),Ui=Math.min(sa,oa),Za=Math.max(sa,oa);xr.bbox={x0:Sn+It,x1:Kn+It,y0:Ui+dn,y1:Za+dn}}Oi.eventData=[xr],Tn.push(xr)}Y._hoverdata=Tn;var Ki=ut==="y"&&(ot.length>1||$e.length>1)||ut==="closest"&&Hn&&$e.length>1,ho=o.combine(Ve.plot_bgcolor||o.background,Ve.paper_bgcolor),Co=V($e,{gd:Y,hovermode:ut,rotateLabels:Ki,bgColor:ho,container:Ve._hoverlayer,outerContainer:Ve._paper.node(),commonLabelOpts:Ve.hoverlabel,hoverdistance:Ve.hoverdistance}),So=Co.hoverLabels;if(m.isUnifiedHover(ut)||(z(So,Ki,Ve,Co.commonLabelBoundingBox),J(So,Ki,Ve._invScaleX,Ve._invScaleY)),Le&&Le.tagName){var Vo=g.getComponentMethod("annotations","hasClickToShow")(Y,Tn);i(Z.select(Le),Vo?"pointer":"")}!Le||_e||!de(Y,ce,tn)||(tn&&Y.emit("plotly_unhover",{event:ce,points:tn}),Y.emit("plotly_hover",{event:ce,points:Y._hoverdata,xaxes:mr,yaxes:Ur,xvals:De,yvals:Ee}))}function B(Y){return[Y.trace.index,Y.index,Y.x0,Y.y0,Y.name,Y.attr,Y.xa?Y.xa._id:"",Y.ya?Y.ya._id:""].join(",")}var U=/<extra>([\s\S]*)<\/extra>/;function V(Y,ce){var ue=ce.gd,_e=ue._fullLayout,Le=ce.hovermode,ze=ce.rotateLabels,Xe=ce.bgColor,Ve=ce.container,rt=ce.outerContainer,mt=ce.commonLabelOpts||{};if(Y.length===0)return[[]];var _t=ce.fontFamily||E.HOVERFONT,vt=ce.fontSize||E.HOVERFONTSIZE,ut=ce.fontWeight||_e.font.weight,Fe=ce.fontStyle||_e.font.style,Pe=ce.fontVariant||_e.font.variant,be=ce.fontTextcase||_e.font.textcase,Ye=ce.fontLineposition||_e.font.lineposition,yt=ce.fontShadow||_e.font.shadow,wt=Y[0],ht=wt.xa,Yt=wt.ya,$t=Le.charAt(0),fr=$t+"Label",mr=wt[fr];if(mr===void 0&&ht.type==="multicategory")for(var Ur=0;Ur<Y.length&&(mr=Y[Ur][fr],mr===void 0);Ur++);var jr=oe(ue,rt),fn=jr.top,Br=jr.width,Qr=jr.height,Ot=mr!==void 0&&wt.distance<=ce.hoverdistance&&(Le==="x"||Le==="y");if(Ot){var $e=!0,ot,De;for(ot=0;ot<Y.length;ot++)if($e&&Y[ot].zLabel===void 0&&($e=!1),De=Y[ot].hoverinfo||Y[ot].trace.hoverinfo,De){var Ee=Array.isArray(De)?De:De.split("+");if(Ee.indexOf("all")===-1&&Ee.indexOf(Le)===-1){Ot=!1;break}}$e&&(Ot=!1)}var Ae=Ve.selectAll("g.axistext").data(Ot?[0]:[]);Ae.enter().append("g").classed("axistext",!0),Ae.exit().remove();var Ie={minX:0,maxX:0,minY:0,maxY:0};if(Ae.each(function(){var fa=Z.select(this),Bi=C.ensureSingle(fa,"path","",function(Ki){Ki.style({"stroke-width":"1px"})}),Yi=C.ensureSingle(fa,"text","",function(Ki){Ki.attr("data-notex",1)}),Ht=mt.bgcolor||o.defaultLine,kt=mt.bordercolor||o.contrast(Ht),qr=o.contrast(Ht),en=mt.font,rn={weight:en.weight||ut,style:en.style||Fe,variant:en.variant||Pe,textcase:en.textcase||be,lineposition:en.lineposition||Ye,shadow:en.shadow||yt,family:en.family||_t,size:en.size||vt,color:en.color||qr};Bi.style({fill:Ht,stroke:kt}),Yi.text(mr).call(s.font,rn).call(l.positionText,0,0).call(l.convertToTspans,ue),fa.attr("transform","");var Wr=oe(ue,Yi.node()),tn,Tn;if(Le==="x"){var dn=ht.side==="top"?"-":"";Yi.attr("text-anchor","middle").call(l.positionText,0,ht.side==="top"?fn-Wr.bottom-y-f:fn-Wr.top+y+f),tn=ht._offset+(wt.x0+wt.x1)/2,Tn=Yt._offset+(ht.side==="top"?0:Yt._length);var It=Wr.width/2+f,xr=tn;tn<It?xr=It:tn>_e.width-It&&(xr=_e.width-It),Bi.attr("d","M"+(tn-xr)+",0L"+(tn-xr+y)+","+dn+y+"H"+It+"v"+dn+(f*2+Wr.height)+"H"+-It+"V"+dn+y+"H"+(tn-xr-y)+"Z"),tn=xr,Ie.minX=tn-It,Ie.maxX=tn+It,ht.side==="top"?(Ie.minY=Tn-(f*2+Wr.height),Ie.maxY=Tn-f):(Ie.minY=Tn+f,Ie.maxY=Tn+(f*2+Wr.height))}else{var Yr,An,Zn;Yt.side==="right"?(Yr="start",An=1,Zn="",tn=ht._offset+ht._length):(Yr="end",An=-1,Zn="-",tn=ht._offset),Tn=Yt._offset+(wt.y0+wt.y1)/2,Yi.attr("text-anchor",Yr),Bi.attr("d","M0,0L"+Zn+y+","+y+"V"+(f+Wr.height/2)+"h"+Zn+(f*2+Wr.width)+"V-"+(f+Wr.height/2)+"H"+Zn+y+"V-"+y+"Z"),Ie.minY=Tn-(f+Wr.height/2),Ie.maxY=Tn+(f+Wr.height/2),Yt.side==="right"?(Ie.minX=tn+y,Ie.maxX=tn+y+(f*2+Wr.width)):(Ie.minX=tn-y-(f*2+Wr.width),Ie.maxX=tn-y);var sa=Wr.height/2,oa=fn-Wr.top-sa,Sn="clip"+_e._uid+"commonlabel"+Yt._id,Kn;if(tn<Wr.width+2*f+y){Kn="M-"+(y+f)+"-"+sa+"h-"+(Wr.width-f)+"V"+sa+"h"+(Wr.width-f)+"Z";var Ui=Wr.width-tn+f;l.positionText(Yi,Ui,oa),Yr==="end"&&Yi.selectAll("tspan").each(function(){var Ki=Z.select(this),ho=s.tester.append("text").text(Ki.text()).call(s.font,rn),Co=oe(ue,ho.node());Math.round(Co.width)<Math.round(Wr.width)&&Ki.attr("x",Ui-Co.width),ho.remove()})}else l.positionText(Yi,An*(f+y),oa),Kn=null;var Za=_e._topclips.selectAll("#"+Sn).data(Kn?[0]:[]);Za.enter().append("clipPath").attr("id",Sn).append("path"),Za.exit().remove(),Za.select("path").attr("d",Kn),s.setClipUrl(Yi,Kn?Sn:null,ue)}fa.attr("transform",t(tn,Tn))}),m.isUnifiedHover(Le)){Ve.selectAll("g.hovertext").remove();const fa=Y.filter(Bi=>Bi.hoverinfo!=="none");if(fa.length===0)return[];var tt=_e.hoverlabel,st=tt.font,Bt=fa[0],Ft=((Le==="x unified"?Bt.xa:Bt.ya).unifiedhovertitle||{}).text,Wt=Ft?C.hovertemplateString({data:Le==="x unified"?[{xa:Bt.xa,x:Bt.xVal}]:[{ya:Bt.ya,y:Bt.yVal}],fallback:Bt.trace.hovertemplatefallback,locale:_e._d3locale,template:Ft}):mr,lr={showlegend:!0,legend:{title:{text:Wt,font:st},font:st,bgcolor:tt.bgcolor,bordercolor:tt.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:_e.legend?_e.legend.traceorder:void 0,orientation:"v"}},Rr={font:st};c(lr,Rr,ue._fullData);var Mr=Rr.legend;Mr.entries=[];for(var Sr=0;Sr<fa.length;Sr++){var Kr=fa[Sr];if(Kr.hoverinfo!=="none"){var Hn=q(Kr,!0,Le,_e,mr),ga=Hn[0],ua=Hn[1];Kr.name=ua,ua!==""?Kr.text=ua+" : "+ga:Kr.text=ga;var Ta=Kr.cd[Kr.index];Ta&&(Ta.mc&&(Kr.mc=Ta.mc),Ta.mcc&&(Kr.mc=Ta.mcc),Ta.mlc&&(Kr.mlc=Ta.mlc),Ta.mlcc&&(Kr.mlc=Ta.mlcc),Ta.mlw&&(Kr.mlw=Ta.mlw),Ta.mrc&&(Kr.mrc=Ta.mrc),Ta.dir&&(Kr.dir=Ta.dir)),Kr._distinct=!0,Mr.entries.push([Kr])}}Mr.entries.sort(function(Bi,Yi){return Bi[0].trace.index-Yi[0].trace.index}),Mr.layer=Ve,Mr._inHover=!0,Mr._groupTitleFont=tt.grouptitlefont,_(ue,Mr);var Aa=Ve.select("g.legend"),ia=oe(ue,Aa.node()),$a=ia.width+2*f,ci=ia.height+2*f,_r=fa[0],Qt=(_r.x0+_r.x1)/2,yr=(_r.y0+_r.y1)/2,br=!(g.traceIs(_r.trace,"bar-like")||g.traceIs(_r.trace,"box-violin")),an,wn;$t==="y"?br?(wn=yr-f,an=yr+f):(wn=Math.min.apply(null,fa.map(function(Bi){return Math.min(Bi.y0,Bi.y1)})),an=Math.max.apply(null,fa.map(function(Bi){return Math.max(Bi.y0,Bi.y1)}))):wn=an=C.mean(fa.map(function(Bi){return(Bi.y0+Bi.y1)/2}))-ci/2;var Ln,Bn;$t==="x"?br?(Ln=Qt+f,Bn=Qt-f):(Ln=Math.max.apply(null,fa.map(function(Bi){return Math.max(Bi.x0,Bi.x1)})),Bn=Math.min.apply(null,fa.map(function(Bi){return Math.min(Bi.x0,Bi.x1)}))):Ln=Bn=C.mean(fa.map(function(Bi){return(Bi.x0+Bi.x1)/2}))-$a/2;var xa=ht._offset,za=Yt._offset;an+=za,Ln+=xa,Bn+=xa-$a,wn+=za-ci;var Ia,Ba;return Ln+$a<Br&&Ln>=0?Ia=Ln:Bn+$a<Br&&Bn>=0?Ia=Bn:xa+$a<Br?Ia=xa:Ln-Qt<Qt-Bn+$a?Ia=Br-$a:Ia=0,Ia+=f,an+ci<Qr&&an>=0?Ba=an:wn+ci<Qr&&wn>=0?Ba=wn:za+ci<Qr?Ba=za:an-yr<yr-wn+ci?Ba=Qr-ci:Ba=0,Ba+=f,Aa.attr("transform",t(Ia-1,Ba-1)),Aa}var Ka=Ve.selectAll("g.hovertext").data(Y,function(fa){return B(fa)});return Ka.enter().append("g").classed("hovertext",!0).each(function(){var fa=Z.select(this);fa.append("rect").call(o.fill,o.addOpacity(Xe,.8)),fa.append("text").classed("name",!0),fa.append("path").style("stroke-width","1px"),fa.append("text").classed("nums",!0).call(s.font,{weight:ut,style:Fe,variant:Pe,textcase:be,lineposition:Ye,shadow:yt,family:_t,size:vt})}),Ka.exit().remove(),Ka.each(function(fa){var Bi=Z.select(this).attr("transform",""),Yi=fa.color;Array.isArray(Yi)&&(Yi=Yi[fa.eventData[0].pointNumber]);var Ht=fa.bgcolor||Yi,kt=o.combine(o.opacity(Ht)?Ht:o.defaultLine,Xe),qr=o.combine(o.opacity(Yi)?Yi:o.defaultLine,Xe),en=fa.borderColor||o.contrast(kt),rn=q(fa,Ot,Le,_e,mr,Bi),Wr=rn[0],tn=rn[1],Tn=Bi.select("text.nums").call(s.font,{family:fa.fontFamily||_t,size:fa.fontSize||vt,color:fa.fontColor||en,weight:fa.fontWeight||ut,style:fa.fontStyle||Fe,variant:fa.fontVariant||Pe,textcase:fa.fontTextcase||be,lineposition:fa.fontLineposition||Ye,shadow:fa.fontShadow||yt}).text(Wr).attr("data-notex",1).call(l.positionText,0,0).call(l.convertToTspans,ue),dn=Bi.select("text.name"),It=0,xr=0;if(tn&&tn!==Wr){dn.call(s.font,{family:fa.fontFamily||_t,size:fa.fontSize||vt,color:qr,weight:fa.fontWeight||ut,style:fa.fontStyle||Fe,variant:fa.fontVariant||Pe,textcase:fa.fontTextcase||be,lineposition:fa.fontLineposition||Ye,shadow:fa.fontShadow||yt}).text(tn).attr("data-notex",1).call(l.positionText,0,0).call(l.convertToTspans,ue);var Yr=oe(ue,dn.node());It=Yr.width+2*f,xr=Yr.height+2*f}else dn.remove(),Bi.select("rect").remove();Bi.select("path").style({fill:kt,stroke:en});var An=fa.xa._offset+(fa.x0+fa.x1)/2,Zn=fa.ya._offset+(fa.y0+fa.y1)/2,sa=Math.abs(fa.x1-fa.x0),oa=Math.abs(fa.y1-fa.y0),Sn=oe(ue,Tn.node()),Kn=Sn.width/_e._invScaleX,Ui=Sn.height/_e._invScaleY;fa.ty0=(fn-Sn.top)/_e._invScaleY,fa.bx=Kn+2*f,fa.by=Math.max(Ui+2*f,xr),fa.anchor="start",fa.txwidth=Kn,fa.tx2width=It,fa.offset=0;var Za=(Kn+y+f+It)*_e._invScaleX,Ki,ho;if(ze)fa.pos=An,Ki=Zn+oa/2+Za<=Qr,ho=Zn-oa/2-Za>=0,(fa.idealAlign==="top"||!Ki)&&ho?(Zn-=oa/2,fa.anchor="end"):Ki?(Zn+=oa/2,fa.anchor="start"):fa.anchor="middle",fa.crossPos=Zn;else{if(fa.pos=Zn,Ki=An+sa/2+Za<=Br,ho=An-sa/2-Za>=0,(fa.idealAlign==="left"||!Ki)&&ho)An-=sa/2,fa.anchor="end";else if(Ki)An+=sa/2,fa.anchor="start";else{fa.anchor="middle";var Co=Za/2,So=An+Co-Br,Vo=An-Co;So>0&&(An-=So),Vo<0&&(An+=-Vo)}fa.crossPos=An}Tn.attr("text-anchor",fa.anchor),It&&dn.attr("text-anchor",fa.anchor),Bi.attr("transform",t(An,Zn)+(ze?r(T):""))}),{hoverLabels:Ka,commonLabelBoundingBox:Ie}}function q(Y,ce,ue,_e,Le,ze){var Xe,Ve,rt="",mt="";Y.nameOverride!==void 0&&(Y.name=Y.nameOverride),Y.name&&(Y.trace._meta&&(Y.name=C.templateString(Y.name,Y.trace._meta)),rt=W(Y.name,Y.nameLength));var _t=ue.charAt(0),vt=_t==="x"?"y":"x";Y.zLabel!==void 0?(Y.xLabel!==void 0&&(mt+="x: "+Y.xLabel+"<br>"),Y.yLabel!==void 0&&(mt+="y: "+Y.yLabel+"<br>"),Y.trace.type!=="choropleth"&&Y.trace.type!=="choroplethmapbox"&&Y.trace.type!=="choroplethmap"&&(mt+=(mt?"z: ":"")+Y.zLabel)):ce&&Y[_t+"Label"]===Le?mt=Y[vt+"Label"]||"":Y.xLabel===void 0?Y.yLabel!==void 0&&Y.trace.type!=="scattercarpet"&&(mt=Y.yLabel):Y.yLabel===void 0?mt=Y.xLabel:mt="("+Y.xLabel+", "+Y.yLabel+")",(Y.text||Y.text===0)&&!Array.isArray(Y.text)&&(mt+=(mt?"<br>":"")+Y.text),Y.extraText!==void 0&&(mt+=(mt?"<br>":"")+Y.extraText),ze&&mt===""&&!Y.hovertemplate&&(rt===""&&ze.remove(),mt=rt),(Ve=(Xe=Y.trace)==null?void 0:Xe.hoverlabel)!=null&&Ve.split&&(Y.hovertemplate="");const{hovertemplate:ut=!1}=Y;if(ut){const Fe=Y.hovertemplateLabels||Y;Y[_t+"Label"]!==Le&&(Fe[_t+"other"]=Fe[_t+"Val"],Fe[_t+"otherLabel"]=Fe[_t+"Label"]),mt=C.hovertemplateString({data:[Y.eventData[0]||{},Y.trace._meta],fallback:Y.trace.hovertemplatefallback,labels:Fe,locale:_e._d3locale,template:ut}),mt=mt.replace(U,(Pe,be)=>(rt=W(be,Y.nameLength),""))}return[mt,rt]}function z(Y,ce,ue,_e){var Le=ce?"xa":"ya",ze=ce?"ya":"xa",Xe=0,Ve=1,rt=Y.size(),mt=new Array(rt),_t=0,vt=_e.minX,ut=_e.maxX,Fe=_e.minY,Pe=_e.maxY,be=function(De){return De*ue._invScaleX},Ye=function(De){return De*ue._invScaleY};Y.each(function(De){var Ee=De[Le],Ae=De[ze],Ie=Ee._id.charAt(0)==="x",tt=Ee.range;_t===0&&tt&&tt[0]>tt[1]!==Ie&&(Ve=-1);var st=0,Bt=Ie?ue.width:ue.height;if(ue.hovermode==="x"||ue.hovermode==="y"){var Ft=H(De,ce),Wt=De.anchor,lr=Wt==="end"?-1:1,Rr,Mr;if(Wt==="middle")Rr=De.crossPos+(Ie?Ye(Ft.y-De.by/2):be(De.bx/2+De.tx2width/2)),Mr=Rr+(Ie?Ye(De.by):be(De.bx));else if(Ie)Rr=De.crossPos+Ye(y+Ft.y)-Ye(De.by/2-y),Mr=Rr+Ye(De.by);else{var Sr=be(lr*y+Ft.x),Kr=Sr+be(lr*De.bx);Rr=De.crossPos+Math.min(Sr,Kr),Mr=De.crossPos+Math.max(Sr,Kr)}Ie?Fe!==void 0&&Pe!==void 0&&Math.min(Mr,Pe)-Math.max(Rr,Fe)>1&&(Ae.side==="left"?(st=Ae._mainLinePosition,Bt=ue.width):Bt=Ae._mainLinePosition):vt!==void 0&&ut!==void 0&&Math.min(Mr,ut)-Math.max(Rr,vt)>1&&(Ae.side==="top"?(st=Ae._mainLinePosition,Bt=ue.height):Bt=Ae._mainLinePosition)}mt[_t++]=[{datum:De,traceIndex:De.trace.index,dp:0,pos:De.pos,posref:De.posref,size:De.by*(Ie?k:1)/2,pmin:st,pmax:Bt}]}),mt.sort(function(De,Ee){return De[0].posref-Ee[0].posref||Ve*(Ee[0].traceIndex-De[0].traceIndex)});var yt,wt,ht,Yt,$t,fr,mr;function Ur(De){var Ee=De[0],Ae=De[De.length-1];if(wt=Ee.pmin-Ee.pos-Ee.dp+Ee.size,ht=Ae.pos+Ae.dp+Ae.size-Ee.pmax,wt>.01){for($t=De.length-1;$t>=0;$t--)De[$t].dp+=wt;yt=!1}if(!(ht<.01)){if(wt<-.01){for($t=De.length-1;$t>=0;$t--)De[$t].dp-=ht;yt=!1}if(yt){var Ie=0;for(Yt=0;Yt<De.length;Yt++)fr=De[Yt],fr.pos+fr.dp+fr.size>Ee.pmax&&Ie++;for(Yt=De.length-1;Yt>=0&&!(Ie<=0);Yt--)fr=De[Yt],fr.pos>Ee.pmax-1&&(fr.del=!0,Ie--);for(Yt=0;Yt<De.length&&!(Ie<=0);Yt++)if(fr=De[Yt],fr.pos<Ee.pmin+1)for(fr.del=!0,Ie--,ht=fr.size*2,$t=De.length-1;$t>=0;$t--)De[$t].dp-=ht;for(Yt=De.length-1;Yt>=0&&!(Ie<=0);Yt--)fr=De[Yt],fr.pos+fr.dp+fr.size>Ee.pmax&&(fr.del=!0,Ie--)}}}for(;!yt&&Xe<=rt;){for(Xe++,yt=!0,Yt=0;Yt<mt.length-1;){var jr=mt[Yt],fn=mt[Yt+1],Br=jr[jr.length-1],Qr=fn[0];if(wt=Br.pos+Br.dp+Br.size-Qr.pos-Qr.dp+Qr.size,wt>.01){for($t=fn.length-1;$t>=0;$t--)fn[$t].dp+=wt;for(jr.push.apply(jr,fn),mt.splice(Yt+1,1),mr=0,$t=jr.length-1;$t>=0;$t--)mr+=jr[$t].dp;for(ht=mr/jr.length,$t=jr.length-1;$t>=0;$t--)jr[$t].dp-=ht;yt=!1}else Yt++}mt.forEach(Ur)}for(Yt=mt.length-1;Yt>=0;Yt--){var Ot=mt[Yt];for($t=Ot.length-1;$t>=0;$t--){var $e=Ot[$t],ot=$e.datum;ot.offset=$e.dp,ot.del=$e.del}}}function H(Y,ce){var ue=0,_e=Y.offset;return ce&&(_e*=-A,ue=Y.offset*b),{x:ue,y:_e}}function G(Y){var ce={start:1,end:-1,middle:0}[Y.anchor],ue=ce*(y+f),_e=ue+ce*(Y.txwidth+f),Le=Y.anchor==="middle";return Le&&(ue-=Y.tx2width/2,_e+=Y.txwidth/2+f),{alignShift:ce,textShiftX:ue,text2ShiftX:_e}}function J(Y,ce,ue,_e){var Le=function(Xe){return Xe*ue},ze=function(Xe){return Xe*_e};Y.each(function(Xe){var Ve=Z.select(this);if(Xe.del)return Ve.remove();var rt=Ve.select("text.nums"),mt=Xe.anchor,_t=mt==="end"?-1:1,vt=G(Xe),ut=H(Xe,ce),Fe=ut.x,Pe=ut.y,be=mt==="middle",Ye="hoverlabel"in Xe.trace?Xe.trace.hoverlabel.showarrow:!0,yt;be?yt="M-"+Le(Xe.bx/2+Xe.tx2width/2)+","+ze(Pe-Xe.by/2)+"h"+Le(Xe.bx)+"v"+ze(Xe.by)+"h-"+Le(Xe.bx)+"Z":Ye?yt="M0,0L"+Le(_t*y+Fe)+","+ze(y+Pe)+"v"+ze(Xe.by/2-y)+"h"+Le(_t*Xe.bx)+"v-"+ze(Xe.by)+"H"+Le(_t*y+Fe)+"V"+ze(Pe-y)+"Z":yt="M"+Le(_t*y+Fe)+","+ze(Pe-Xe.by/2)+"h"+Le(_t*Xe.bx)+"v"+ze(Xe.by)+"h"+Le(-_t*Xe.bx)+"Z",Ve.select("path").attr("d",yt);var wt=Fe+vt.textShiftX,ht=Pe+Xe.ty0-Xe.by/2+f,Yt=Xe.textAlign||"auto";Yt!=="auto"&&(Yt==="left"&&mt!=="start"?(rt.attr("text-anchor","start"),wt=be?-Xe.bx/2-Xe.tx2width/2+f:-Xe.bx-f):Yt==="right"&&mt!=="end"&&(rt.attr("text-anchor","end"),wt=be?Xe.bx/2-Xe.tx2width/2-f:Xe.bx+f)),rt.call(l.positionText,Le(wt),ze(ht)),Xe.tx2width&&(Ve.select("text.name").call(l.positionText,Le(vt.text2ShiftX+vt.alignShift*f+Fe),ze(Pe+Xe.ty0-Xe.by/2+f)),Ve.select("rect").call(s.setRect,Le(vt.text2ShiftX+(vt.alignShift-1)*Xe.tx2width/2+Fe),ze(Pe-Xe.by/2-1),Le(Xe.tx2width),ze(Xe.by+2)))})}function le(Y,ce){var ue=Y.index,_e=Y.trace||{},Le=Y.cd[0],ze=Y.cd[ue]||{};function Xe(ut){return ut||v(ut)&&ut===0}var Ve=Array.isArray(ue)?function(ut,Fe){var Pe=C.castOption(Le,ue,ut);return Xe(Pe)?Pe:C.extractOption({},_e,"",Fe)}:function(ut,Fe){return C.extractOption(ze,_e,ut,Fe)};function rt(ut,Fe,Pe){var be=Ve(Fe,Pe);Xe(be)&&(Y[ut]=be)}if(rt("hoverinfo","hi","hoverinfo"),rt("bgcolor","hbg","hoverlabel.bgcolor"),rt("borderColor","hbc","hoverlabel.bordercolor"),rt("fontFamily","htf","hoverlabel.font.family"),rt("fontSize","hts","hoverlabel.font.size"),rt("fontColor","htc","hoverlabel.font.color"),rt("fontWeight","htw","hoverlabel.font.weight"),rt("fontStyle","hty","hoverlabel.font.style"),rt("fontVariant","htv","hoverlabel.font.variant"),rt("nameLength","hnl","hoverlabel.namelength"),rt("textAlign","hta","hoverlabel.align"),Y.posref=ce==="y"||ce==="closest"&&_e.orientation==="h"?Y.xa._offset+(Y.x0+Y.x1)/2:Y.ya._offset+(Y.y0+Y.y1)/2,Y.x0=C.constrain(Y.x0,0,Y.xa._length),Y.x1=C.constrain(Y.x1,0,Y.xa._length),Y.y0=C.constrain(Y.y0,0,Y.ya._length),Y.y1=C.constrain(Y.y1,0,Y.ya._length),Y.xLabelVal!==void 0&&(Y.xLabel="xLabel"in Y?Y.xLabel:d.hoverLabelText(Y.xa,Y.xLabelVal,_e.xhoverformat),Y.xVal=Y.xa.c2d(Y.xLabelVal)),Y.yLabelVal!==void 0&&(Y.yLabel="yLabel"in Y?Y.yLabel:d.hoverLabelText(Y.ya,Y.yLabelVal,_e.yhoverformat),Y.yVal=Y.ya.c2d(Y.yLabelVal)),Y.zLabelVal!==void 0&&Y.zLabel===void 0&&(Y.zLabel=String(Y.zLabelVal)),!isNaN(Y.xerr)&&!(Y.xa.type==="log"&&Y.xerr<=0)){var mt=d.tickText(Y.xa,Y.xa.c2l(Y.xerr),"hover").text;Y.xerrneg!==void 0?Y.xLabel+=" +"+mt+" / -"+d.tickText(Y.xa,Y.xa.c2l(Y.xerrneg),"hover").text:Y.xLabel+=" ± "+mt,ce==="x"&&(Y.distance+=1)}if(!isNaN(Y.yerr)&&!(Y.ya.type==="log"&&Y.yerr<=0)){var _t=d.tickText(Y.ya,Y.ya.c2l(Y.yerr),"hover").text;Y.yerrneg!==void 0?Y.yLabel+=" +"+_t+" / -"+d.tickText(Y.ya,Y.ya.c2l(Y.yerrneg),"hover").text:Y.yLabel+=" ± "+_t,ce==="y"&&(Y.distance+=1)}var vt=Y.hoverinfo||Y.trace.hoverinfo;return vt&&vt!=="all"&&(vt=Array.isArray(vt)?vt:vt.split("+"),vt.indexOf("x")===-1&&(Y.xLabel=void 0),vt.indexOf("y")===-1&&(Y.yLabel=void 0),vt.indexOf("z")===-1&&(Y.zLabel=void 0),vt.indexOf("text")===-1&&(Y.text=void 0),vt.indexOf("name")===-1&&(Y.name=void 0)),Y}function ge(Y,ce,ue){var _e=ue.container,Le=ue.fullLayout,ze=Le._size,Xe=ue.event,Ve=!!ce.hLinePoint,rt=!!ce.vLinePoint,mt,_t;if(_e.selectAll(".spikeline").remove(),!!(rt||Ve)){var vt=o.combine(Le.plot_bgcolor,Le.paper_bgcolor);if(Ve){var ut=ce.hLinePoint,Fe,Pe;mt=ut&&ut.xa,_t=ut&&ut.ya;var be=_t.spikesnap;be==="cursor"?(Fe=Xe.pointerX,Pe=Xe.pointerY):(Fe=mt._offset+ut.x,Pe=_t._offset+ut.y);var Ye=w.readability(ut.color,vt)<1.5?o.contrast(vt):ut.color,yt=_t.spikemode,wt=_t.spikethickness,ht=_t.spikecolor||Ye,Yt=d.getPxPosition(Y,_t),$t,fr;if(yt.indexOf("toaxis")!==-1||yt.indexOf("across")!==-1){if(yt.indexOf("toaxis")!==-1&&($t=Yt,fr=Fe),yt.indexOf("across")!==-1){var mr=_t._counterDomainMin,Ur=_t._counterDomainMax;_t.anchor==="free"&&(mr=Math.min(mr,_t.position),Ur=Math.max(Ur,_t.position)),$t=ze.l+mr*ze.w,fr=ze.l+Ur*ze.w}_e.insert("line",":first-child").attr({x1:$t,x2:fr,y1:Pe,y2:Pe,"stroke-width":wt,stroke:ht,"stroke-dasharray":s.dashStyle(_t.spikedash,wt)}).classed("spikeline",!0).classed("crisp",!0),_e.insert("line",":first-child").attr({x1:$t,x2:fr,y1:Pe,y2:Pe,"stroke-width":wt+2,stroke:vt}).classed("spikeline",!0).classed("crisp",!0)}yt.indexOf("marker")!==-1&&_e.insert("circle",":first-child").attr({cx:Yt+(_t.side!=="right"?wt:-wt),cy:Pe,r:wt,fill:ht}).classed("spikeline",!0)}if(rt){var jr=ce.vLinePoint,fn,Br;mt=jr&&jr.xa,_t=jr&&jr.ya;var Qr=mt.spikesnap;Qr==="cursor"?(fn=Xe.pointerX,Br=Xe.pointerY):(fn=mt._offset+jr.x,Br=_t._offset+jr.y);var Ot=w.readability(jr.color,vt)<1.5?o.contrast(vt):jr.color,$e=mt.spikemode,ot=mt.spikethickness,De=mt.spikecolor||Ot,Ee=d.getPxPosition(Y,mt),Ae,Ie;if($e.indexOf("toaxis")!==-1||$e.indexOf("across")!==-1){if($e.indexOf("toaxis")!==-1&&(Ae=Ee,Ie=Br),$e.indexOf("across")!==-1){var tt=mt._counterDomainMin,st=mt._counterDomainMax;mt.anchor==="free"&&(tt=Math.min(tt,mt.position),st=Math.max(st,mt.position)),Ae=ze.t+(1-st)*ze.h,Ie=ze.t+(1-tt)*ze.h}_e.insert("line",":first-child").attr({x1:fn,x2:fn,y1:Ae,y2:Ie,"stroke-width":ot,stroke:De,"stroke-dasharray":s.dashStyle(mt.spikedash,ot)}).classed("spikeline",!0).classed("crisp",!0),_e.insert("line",":first-child").attr({x1:fn,x2:fn,y1:Ae,y2:Ie,"stroke-width":ot+2,stroke:vt}).classed("spikeline",!0).classed("crisp",!0)}$e.indexOf("marker")!==-1&&_e.insert("circle",":first-child").attr({cx:fn,cy:Ee-(mt.side!=="top"?ot:-ot),r:ot,fill:De}).classed("spikeline",!0)}}}function de(Y,ce,ue){if(!ue||ue.length!==Y._hoverdata.length)return!0;for(var _e=ue.length-1;_e>=0;_e--){var Le=ue[_e],ze=Y._hoverdata[_e];if(Le.curveNumber!==ze.curveNumber||String(Le.pointNumber)!==String(ze.pointNumber)||String(Le.pointNumbers)!==String(ze.pointNumbers)||Le.binNumber!==ze.binNumber)return!0}return!1}function me(Y,ce){return!0}function W(Y,ce){return l.plainText(Y||"",{len:ce,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function ie(Y,ce){for(var ue=ce.charAt(0),_e=[],Le=[],ze=[],Xe=0;Xe<Y.length;Xe++){var Ve=Y[Xe];g.traceIs(Ve.trace,"bar-like")||g.traceIs(Ve.trace,"box-violin")?ze.push(Ve):Ve.trace[ue+"period"]?Le.push(Ve):_e.push(Ve)}return _e.concat(Le).concat(ze)}function se(Y,ce,ue){var _e=ce[Y+"a"],Le=ce[Y+"Val"],ze=ce.cd[0];if(_e.type==="category"||_e.type==="multicategory")Le=_e._categoriesMap[Le];else if(_e.type==="date"){var Xe=ce.trace[Y+"periodalignment"];if(Xe){var Ve=ce.cd[ce.index],rt=Ve[Y+"Start"];rt===void 0&&(rt=Ve[Y]);var mt=Ve[Y+"End"];mt===void 0&&(mt=Ve[Y]);var _t=mt-rt;Xe==="end"?Le+=_t:Xe==="middle"&&(Le+=_t/2)}Le=_e.d2c(Le)}return ze&&ze.t&&ze.t.posLetter===_e._id&&(ue.boxmode==="group"||ue.violinmode==="group")&&(Le+=ze.t.dPos),Le}var ee=Y=>Y.offsetTop+Y.clientTop,pe=Y=>Y.offsetLeft+Y.clientLeft;function oe(Y,ce){var ue=Y._fullLayout,_e=ce.getBoundingClientRect(),Le=_e.left,ze=_e.top,Xe=Le+_e.width,Ve=ze+_e.height,rt=C.apply3DTransform(ue._invTransform)(Le,ze),mt=C.apply3DTransform(ue._invTransform)(Xe,Ve),_t=rt[0],vt=rt[1],ut=mt[0],Fe=mt[1];return{x:_t,y:vt,width:ut-_t,height:Fe-vt,top:Math.min(vt,Fe),left:Math.min(_t,ut),right:Math.max(_t,ut),bottom:Math.max(vt,Fe)}}}}),Ow=Ne({"src/components/fx/hoverlabel_defaults.js"(te,Z){var v=In(),w=Ha(),C=bv().isUnifiedHover;Z.exports=function(t,r,a,l){l=l||{};var i=r.legend;function s(o){l.font[o]||(l.font[o]=i?r.legend.font[o]:r.font[o])}r&&C(r.hovermode)&&(l.font||(l.font={}),s("size"),s("family"),s("color"),s("weight"),s("style"),s("variant"),i?(l.bgcolor||(l.bgcolor=w.combine(r.legend.bgcolor,r.paper_bgcolor)),l.bordercolor||(l.bordercolor=r.legend.bordercolor)):l.bgcolor||(l.bgcolor=r.paper_bgcolor)),a("hoverlabel.bgcolor",l.bgcolor),a("hoverlabel.bordercolor",l.bordercolor),a("hoverlabel.namelength",l.namelength),a("hoverlabel.showarrow",l.showarrow),v.coerceFont(a,"hoverlabel.font",l.font),a("hoverlabel.align",l.align)}}}),LL=Ne({"src/components/fx/layout_global_defaults.js"(te,Z){var v=In(),w=Ow(),C=Mo();Z.exports=function(t,r){function a(l,i){return v.coerce(t,r,C,l,i)}w(t,r,a)}}}),RL=Ne({"src/components/fx/defaults.js"(te,Z){var v=In(),w=Hs(),C=Ow();Z.exports=function(t,r,a,l){function i(o,u){return v.coerce(t,r,w,o,u)}var s=v.extendFlat({},l.hoverlabel);r.hovertemplate&&(s.namelength=-1),C(t,r,i,s)}}}),dM=Ne({"src/components/fx/hovermode_defaults.js"(te,Z){var v=In(),w=Mo();Z.exports=function(P,t){function r(a,l){return t[a]!==void 0?t[a]:v.coerce(P,t,w,a,l)}return r("clickmode"),r("hoversubplots"),r("hovermode")}}}),IL=Ne({"src/components/fx/layout_defaults.js"(te,Z){var v=In(),w=Mo(),C=dM(),P=Ow();Z.exports=function(r,a){function l(g,m){return v.coerce(r,a,w,g,m)}var i=C(r,a);i&&(l("hoverdistance"),l("spikedistance"));var s=l("dragmode");s==="select"&&l("selectdirection");var o=a._has("mapbox"),u=a._has("map"),d=a._has("geo"),h=a._basePlotModules.length;a.dragmode==="zoom"&&((o||u||d)&&h===1||(o||u)&&d&&h===2)&&(a.dragmode="pan"),P(r,a,l),v.coerceFont(l,"hoverlabel.grouptitlefont",a.hoverlabel.font)}}}),oA=Ne({"src/components/fx/calc.js"(te,Z){var v=In(),w=Yo();Z.exports=function(t){var r=t.calcdata,a=t._fullLayout;function l(d){return function(h){return v.coerceHoverinfo({hoverinfo:h},{_module:d._module},a)}}for(var i=0;i<r.length;i++){var s=r[i],o=s[0].trace;if(!w.traceIs(o,"pie-like")){var u=w.traceIs(o,"2dMap")?C:v.fillArray;u(o.hoverinfo,s,"hi",l(o)),o.hovertemplate&&u(o.hovertemplate,s,"ht"),o.hoverlabel&&(u(o.hoverlabel.bgcolor,s,"hbg"),u(o.hoverlabel.bordercolor,s,"hbc"),u(o.hoverlabel.font.size,s,"hts"),u(o.hoverlabel.font.color,s,"htc"),u(o.hoverlabel.font.family,s,"htf"),u(o.hoverlabel.font.weight,s,"htw"),u(o.hoverlabel.font.style,s,"hty"),u(o.hoverlabel.font.variant,s,"htv"),u(o.hoverlabel.namelength,s,"hnl"),u(o.hoverlabel.align,s,"hta"),u(o.hoverlabel.showarrow,s,"htsa"))}}};function C(P,t,r,a){a=a||v.identity,Array.isArray(P)&&(t[0][r]=a(P))}}}),Sx=Ne({"src/components/fx/click.js"(te,Z){var v=Yo(),w=hM().hover;Z.exports=function(P,t,r){var a=v.getComponentMethod("annotations","onClick")(P,P._hoverdata);r!==void 0&&w(P,t,r,!0);function l(){P.emit("plotly_click",{points:P._hoverdata,event:t})}P._hoverdata&&t&&t.target&&(a&&a.then?a.then(l):l(),t.stopImmediatePropagation&&t.stopImmediatePropagation())}}}),oh=Ne({"src/components/fx/index.js"(te,Z){var v=xn(),w=In(),C=Uv(),P=bv(),t=Mo(),r=hM();Z.exports={moduleType:"component",name:"fx",constants:Ll(),schema:{layout:t},attributes:Hs(),layoutAttributes:t,supplyLayoutGlobalDefaults:LL(),supplyDefaults:RL(),supplyLayoutDefaults:IL(),calc:oA(),getDistanceFunction:P.getDistanceFunction,getClosest:P.getClosest,inbox:P.inbox,quadrature:P.quadrature,appendArrayPointValue:P.appendArrayPointValue,castHoverOption:l,castHoverinfo:i,hover:r.hover,unhover:C.unhover,loneHover:r.loneHover,loneUnhover:a,click:Sx()};function a(s){var o=w.isD3Selection(s)?s:v.select(s);o.selectAll("g.hovertext").remove(),o.selectAll(".spikeline").remove()}function l(s,o,u){return w.castOption(s,o,"hoverlabel."+u)}function i(s,o,u){function d(h){return w.coerceHoverinfo({hoverinfo:h},{_module:s._module},o)}return w.castOption(s,u,"hoverinfo",d)}}}),Pm=Ne({"src/components/dragelement/helpers.js"(te){te.selectMode=function(Z){return Z==="lasso"||Z==="select"},te.drawMode=function(Z){return Z==="drawclosedpath"||Z==="drawopenpath"||Z==="drawline"||Z==="drawrect"||Z==="drawcircle"},te.openMode=function(Z){return Z==="drawline"||Z==="drawopenpath"},te.rectMode=function(Z){return Z==="select"||Z==="drawline"||Z==="drawrect"||Z==="drawcircle"},te.freeMode=function(Z){return Z==="lasso"||Z==="drawclosedpath"||Z==="drawopenpath"},te.selectingOrDrawing=function(Z){return te.freeMode(Z)||te.rectMode(Z)}}}),Ex=Ne({"src/lib/clear_gl_canvases.js"(te,Z){Z.exports=function(w){var C=w._fullLayout;C._glcanvas&&C._glcanvas.size()&&C._glcanvas.each(function(P){P.regl&&P.regl.clear({color:!0,depth:!0})})}}}),zw=Ne({"src/fonts/ploticon.js"(te,Z){Z.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'>"," <title>plotly-logomark</title>"," <g id='symbol'>","  <rect fill='#000' x='0' y='0' width='132' height='132' rx='18' ry='18'/>","  <circle fill='#9EF' cx='102' cy='30' r='6'/>","  <circle fill='#BAC' cx='78' cy='30' r='6'/>","  <circle fill='#BAC' cx='78' cy='54' r='6'/>","  <circle fill='#D69' cx='54' cy='30' r='6'/>","  <circle fill='#F26' cx='30' cy='30' r='6'/>","  <circle fill='#F26' cx='30' cy='54' r='6'/>","  <path fill='#FFF' d='M30,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,30,72Z'/>","  <path fill='#FFF' d='M78,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,78,72Z'/>","  <path fill='#FFF' d='M54,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,54,48Z'/>","  <path fill='#FFF' d='M102,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,102,48Z'/>"," </g>","</svg>"].join("")}}}}),Nw=Ne({"src/components/shapes/draw_newshape/constants.js"(te,Z){var v=32;Z.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)}}}),Fw=Ne({"src/components/selections/helpers.js"(te,Z){var v=In().strTranslate;function w(r,a){switch(r.type){case"log":return r.p2d(a);case"date":return r.p2r(a,0,r.calendar);default:return r.p2r(a)}}function C(r,a){switch(r.type){case"log":return r.d2p(a);case"date":return r.r2p(a,0,r.calendar);default:return r.r2p(a)}}function P(r){var a=r._id.charAt(0)==="y"?1:0;return function(l){return w(r,l[a])}}function t(r){return v(r.xaxis._offset,r.yaxis._offset)}Z.exports={p2r:w,r2p:C,axValue:P,getTransform:t}}}),om=Ne({"src/components/shapes/draw_newshape/helpers.js"(te){var Z=wg(),v=Nw(),w=v.CIRCLE_SIDES,C=v.SQRT2,P=Fw(),t=P.p2r,r=P.r2p,a=[0,3,4,5,6,1,2],l=[0,3,4,1,2];te.writePaths=function(o){var u=o.length;if(!u)return"M0,0Z";for(var d="",h=0;h<u;h++)for(var g=o[h].length,m=0;m<g;m++){var E=o[h][m][0];if(E==="Z")d+="Z";else for(var c=o[h][m].length,_=0;_<c;_++){var T=_;E==="Q"||E==="S"?T=l[_]:E==="C"&&(T=a[_]),d+=o[h][m][T],_>0&&_<c-1&&(d+=",")}}return d},te.readPaths=function(o,u,d,h){var g=Z(o),m=[],E=-1,c=function(){E++,m[E]=[]},_,T=0,M=0,k,b,A=function(){k=T,b=M};A();for(var y=0;y<g.length;y++){var f=[],p,x,N,D,B=g[y][0],U=B;switch(B){case"M":c(),T=+g[y][1],M=+g[y][2],f.push([U,T,M]),A();break;case"Q":case"S":p=+g[y][1],N=+g[y][2],T=+g[y][3],M=+g[y][4],f.push([U,T,M,p,N]);break;case"C":p=+g[y][1],N=+g[y][2],x=+g[y][3],D=+g[y][4],T=+g[y][5],M=+g[y][6],f.push([U,T,M,p,N,x,D]);break;case"T":case"L":T=+g[y][1],M=+g[y][2],f.push([U,T,M]);break;case"H":U="L",T=+g[y][1],f.push([U,T,M]);break;case"V":U="L",M=+g[y][1],f.push([U,T,M]);break;case"A":U="L";var V=+g[y][1],q=+g[y][2];+g[y][4]||(V=-V,q=-q);var z=T-V,H=M;for(_=1;_<=w/2;_++){var G=2*Math.PI*_/w;f.push([U,z+V*Math.cos(G),H+q*Math.sin(G)])}break;case"Z":(T!==k||M!==b)&&(T=k,M=b,f.push([U,T,M]));break}for(var J=(d||{}).domain,le=u._fullLayout._size,ge=d&&d.xsizemode==="pixel",de=d&&d.ysizemode==="pixel",me=h===!1,W=0;W<f.length;W++){for(_=0;_+2<7;_+=2){var ie=f[W][_+1],se=f[W][_+2];ie===void 0||se===void 0||(T=ie,M=se,d&&(d.xaxis&&d.xaxis.p2r?(me&&(ie-=d.xaxis._offset),ge?ie=r(d.xaxis,d.xanchor)+ie:ie=t(d.xaxis,ie)):(me&&(ie-=le.l),J?ie=J.x[0]+ie/le.w:ie=ie/le.w),d.yaxis&&d.yaxis.p2r?(me&&(se-=d.yaxis._offset),de?se=r(d.yaxis,d.yanchor)-se:se=t(d.yaxis,se)):(me&&(se-=le.t),J?se=J.y[1]-se/le.h:se=1-se/le.h)),f[W][_+1]=ie,f[W][_+2]=se)}m[E].push(f[W].slice())}}return m};function i(o,u){return Math.abs(o-u)<=1e-6}function s(o,u){var d=u[1]-o[1],h=u[2]-o[2];return Math.sqrt(d*d+h*h)}te.pointsOnRectangle=function(o){var u=o.length;if(u!==5)return!1;for(var d=1;d<3;d++){var h=o[0][d]-o[1][d],g=o[3][d]-o[2][d];if(!i(h,g))return!1;var m=o[0][d]-o[3][d],E=o[1][d]-o[2][d];if(!i(m,E))return!1}return!i(o[0][1],o[1][1])&&!i(o[0][1],o[3][1])?!1:!!(s(o[0],o[1])*s(o[0],o[3]))},te.pointsOnEllipse=function(o){var u=o.length;if(u!==w+1)return!1;u=w;for(var d=0;d<u;d++){var h=(u*2-d)%u,g=(u/2+h)%u,m=(u/2+d)%u;if(!i(s(o[d],o[m]),s(o[h],o[g])))return!1}return!0},te.handleEllipse=function(o,u,d){if(!o)return[u,d];var h=te.ellipseOver({x0:u[0],y0:u[1],x1:d[0],y1:d[1]}),g=(h.x1+h.x0)/2,m=(h.y1+h.y0)/2,E=(h.x1-h.x0)/2,c=(h.y1-h.y0)/2;E||(E=c=c/C),c||(c=E=E/C);for(var _=[],T=0;T<w;T++){var M=T*2*Math.PI/w;_.push([g+E*Math.cos(M),m+c*Math.sin(M)])}return _},te.ellipseOver=function(o){var u=o.x0,d=o.y0,h=o.x1,g=o.y1,m=h-u,E=g-d;u-=m,d-=E;var c=(u+h)/2,_=(d+g)/2,T=C;return m*=T,E*=T,{x0:c-m,y0:_-E,x1:c+m,y1:_+E}},te.fixDatesForPaths=function(o,u,d){var h=u.type==="date",g=d.type==="date";if(!h&&!g)return o;for(var m=0;m<o.length;m++)for(var E=0;E<o[m].length;E++)for(var c=0;c+2<o[m][E].length;c+=2)h&&(o[m][E][c+1]=o[m][E][c+1].replace(" ","_")),g&&(o[m][E][c+2]=o[m][E][c+2].replace(" ","_"));return o}}}),sA=Ne({"src/components/shapes/draw_newshape/newshapes.js"(te,Z){var v=Wf(),w=Pm(),C=w.drawMode,P=w.openMode,t=Nw(),r=t.i000,a=t.i090,l=t.i180,i=t.i270,s=t.cos45,o=t.sin45,u=Fw(),d=u.p2r,h=u.r2p,g=xg(),m=g.clearOutline,E=om(),c=E.readPaths,_=E.writePaths,T=E.ellipseOver,M=E.fixDatesForPaths;function k(A,y){if(A.length){var f=A[0][0];if(f){var p=y.gd,x=y.isActiveShape,N=y.dragmode,D=(p.layout||{}).shapes||[];if(!C(N)&&x!==void 0){var B=p._fullLayout._activeShapeIndex;if(B<D.length)switch(p._fullLayout.shapes[B].type){case"rect":N="drawrect";break;case"circle":N="drawcircle";break;case"line":N="drawline";break;case"path":var U=D[B].path||"";U[U.length-1]==="Z"?N="drawclosedpath":N="drawopenpath";break}}var V=b(A,y,N);m(p);for(var q=y.editHelpers,z=(q||{}).modifyItem,H=[],G=0;G<D.length;G++){var J=p._fullLayout.shapes[G];if(H[G]=J._input,x!==void 0&&G===p._fullLayout._activeShapeIndex){var le=V;switch(J.type){case"line":case"rect":case"circle":var ge=v.getFromId(p,J.xref);J.xref.charAt(0)==="x"&&ge.type.includes("category")?(z("x0",le.x0-(J.x0shift||0)),z("x1",le.x1-(J.x1shift||0))):(z("x0",le.x0),z("x1",le.x1));var de=v.getFromId(p,J.yref);J.yref.charAt(0)==="y"&&de.type.includes("category")?(z("y0",le.y0-(J.y0shift||0)),z("y1",le.y1-(J.y1shift||0))):(z("y0",le.y0),z("y1",le.y1));break;case"path":z("path",le.path);break}}}return x===void 0?(H.push(V),H):q?q.getUpdateObj():{}}}}function b(A,y,f){var p=A[0][0],x=y.gd,N=p.getAttribute("d"),D=x._fullLayout.newshape,B=y.plotinfo,U=y.isActiveShape,V=B.xaxis,q=B.yaxis,z=!!B.domain||!B.xaxis,H=!!B.domain||!B.yaxis,G=P(f),J=c(N,x,B,U),le={editable:!0,visible:D.visible,name:D.name,showlegend:D.showlegend,legend:D.legend,legendwidth:D.legendwidth,legendgroup:D.legendgroup,legendgrouptitle:{text:D.legendgrouptitle.text,font:D.legendgrouptitle.font},legendrank:D.legendrank,label:D.label,xref:z?"paper":V._id,yref:H?"paper":q._id,layer:D.layer,opacity:D.opacity,line:{color:D.line.color,width:D.line.width,dash:D.line.dash}};G||(le.fillcolor=D.fillcolor,le.fillrule=D.fillrule);var ge;if(J.length===1&&(ge=J[0]),ge&&ge.length===5&&f==="drawrect")le.type="rect",le.x0=ge[0][1],le.y0=ge[0][2],le.x1=ge[2][1],le.y1=ge[2][2];else if(ge&&f==="drawline")le.type="line",le.x0=ge[0][1],le.y0=ge[0][2],le.x1=ge[1][1],le.y1=ge[1][2];else if(ge&&f==="drawcircle"){le.type="circle";var de=ge[r][1],me=ge[a][1],W=ge[l][1],ie=ge[i][1],se=ge[r][2],ee=ge[a][2],pe=ge[l][2],oe=ge[i][2],Y=B.xaxis&&(B.xaxis.type==="date"||B.xaxis.type==="log"),ce=B.yaxis&&(B.yaxis.type==="date"||B.yaxis.type==="log");Y&&(de=h(B.xaxis,de),me=h(B.xaxis,me),W=h(B.xaxis,W),ie=h(B.xaxis,ie)),ce&&(se=h(B.yaxis,se),ee=h(B.yaxis,ee),pe=h(B.yaxis,pe),oe=h(B.yaxis,oe));var ue=(me+ie)/2,_e=(se+pe)/2,Le=(ie-me+W-de)/2,ze=(oe-ee+pe-se)/2,Xe=T({x0:ue,y0:_e,x1:ue+Le*s,y1:_e+ze*o});Y&&(Xe.x0=d(B.xaxis,Xe.x0),Xe.x1=d(B.xaxis,Xe.x1)),ce&&(Xe.y0=d(B.yaxis,Xe.y0),Xe.y1=d(B.yaxis,Xe.y1)),le.x0=Xe.x0,le.y0=Xe.y0,le.x1=Xe.x1,le.y1=Xe.y1}else le.type="path",V&&q&&M(J,V,q),le.path=_(J),ge=null;return le}Z.exports={newShapes:k,createShapeObj:b}}}),vM=Ne({"src/components/selections/draw_newselection/newselections.js"(te,Z){var v=Pm(),w=v.selectMode,C=xg(),P=C.clearOutline,t=om(),r=t.readPaths,a=t.writePaths,l=t.fixDatesForPaths;Z.exports=function(s,o){if(s.length){var u=s[0][0];if(u){var d=u.getAttribute("d"),h=o.gd,g=h._fullLayout.newselection,m=o.plotinfo,E=m.xaxis,c=m.yaxis,_=o.isActiveSelection,T=o.dragmode,M=(h.layout||{}).selections||[];if(!w(T)&&_!==void 0){var k=h._fullLayout._activeSelectionIndex;if(k<M.length)switch(h._fullLayout.selections[k].type){case"rect":T="select";break;case"path":T="lasso";break}}var b=r(d,h,m,_),A={xref:E._id,yref:c._id,opacity:g.opacity,line:{color:g.line.color,width:g.line.width,dash:g.line.dash}},y;b.length===1&&(y=b[0]),y&&y.length===5&&T==="select"?(A.type="rect",A.x0=y[0][1],A.y0=y[0][2],A.x1=y[2][1],A.y1=y[2][2]):(A.type="path",E&&c&&l(b,E,c),A.path=a(b),y=null),P(h);for(var f=o.editHelpers,p=(f||{}).modifyItem,x=[],N=0;N<M.length;N++){var D=h._fullLayout.selections[N];if(!D){x[N]=D;continue}if(x[N]=D._input,_!==void 0&&N===h._fullLayout._activeSelectionIndex){var B=A;switch(D.type){case"rect":p("x0",B.x0),p("x1",B.x1),p("y0",B.y0),p("y1",B.y1);break;case"path":p("path",B.path);break}}}return _===void 0?(x.push(A),x):f?f.getUpdateObj():{}}}}}}),Bw=Ne({"src/components/shapes/constants.js"(te,Z){Z.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}}}}),Sg=Ne({"src/components/shapes/helpers.js"(te){var Z=Bw(),v=In(),w=Os();te.rangeToShapePosition=function(t){return t.type==="log"?t.r2d:function(r){return r}},te.shapePositionToRange=function(t){return t.type==="log"?t.d2r:function(r){return r}},te.decodeDate=function(t){return function(r){return r.replace&&(r=r.replace("_"," ")),t(r)}},te.encodeDate=function(t){return function(r){return t(r).replace(" ","_")}},te.extractPathCoords=function(t,r,a){var l=[],i=t.match(Z.segmentRE);return i.forEach(function(s){var o=r[s.charAt(0)].drawn;if(o!==void 0){var u=s.substr(1).match(Z.paramRE);if(!(!u||u.length<o)){var d=u[o],h=a?d:v.cleanNumber(d);l.push(h)}}}),l},te.getDataToPixel=function(t,r,a,l,i){var s=t._fullLayout._size,o;if(r)if(i==="domain")o=function(d){return r._length*(l?1-d:d)+r._offset};else{var u=te.shapePositionToRange(r);o=function(d){var h=P(r,a);return r._offset+r.r2p(u(d,!0))+h},r.type==="date"&&(o=te.decodeDate(o))}else l?o=function(d){return s.t+s.h*(1-d)}:o=function(d){return s.l+s.w*d};return o},te.getPixelToData=function(t,r,a,l){var i=t._fullLayout._size,s;if(r)if(l==="domain")s=function(u){var d=(u-r._offset)/r._length;return a?1-d:d};else{var o=te.rangeToShapePosition(r);s=function(u){return o(r.p2r(u-r._offset))}}else a?s=function(u){return 1-(u-i.t)/i.h}:s=function(u){return(u-i.l)/i.w};return s},te.roundPositionForSharpStrokeRendering=function(t,r){var a=Math.round(r%2)===1,l=Math.round(t);return a?l+.5:l},te.makeShapesOptionsAndPlotinfo=function(t,r){var a=t._fullLayout.shapes[r]||{},l=t._fullLayout._plots[a.xref+a.yref],i=!!l;return i?l._hadPlotinfo=!0:(l={},a.xref&&a.xref!=="paper"&&(l.xaxis=t._fullLayout[a.xref+"axis"]),a.yref&&a.yref!=="paper"&&(l.yaxis=t._fullLayout[a.yref+"axis"])),l.xsizemode=a.xsizemode,l.ysizemode=a.ysizemode,l.xanchor=a.xanchor,l.yanchor=a.yanchor,{options:a,plotinfo:l}},te.makeSelectionsOptionsAndPlotinfo=function(t,r){var a=t._fullLayout.selections[r]||{},l=t._fullLayout._plots[a.xref+a.yref],i=!!l;return i?l._hadPlotinfo=!0:(l={},a.xref&&(l.xaxis=t._fullLayout[a.xref+"axis"]),a.yref&&(l.yaxis=t._fullLayout[a.yref+"axis"])),{options:a,plotinfo:l}},te.getPathString=function(t,r){var a=r.type,l=w.getRefType(r.xref),i=w.getRefType(r.yref),s=w.getFromId(t,r.xref),o=w.getFromId(t,r.yref),u=t._fullLayout._size,d,h,g,m,E=P(s,r.x0shift),c=P(s,r.x1shift),_=P(o,r.y0shift),T=P(o,r.y1shift),M,k,b,A;if(s?l==="domain"?h=function(q){return s._offset+s._length*q}:(d=te.shapePositionToRange(s),h=function(q){return s._offset+s.r2p(d(q,!0))}):h=function(q){return u.l+u.w*q},o?i==="domain"?m=function(q){return o._offset+o._length*(1-q)}:(g=te.shapePositionToRange(o),m=function(q){return o._offset+o.r2p(g(q,!0))}):m=function(q){return u.t+u.h*(1-q)},a==="path")return s&&s.type==="date"&&(h=te.decodeDate(h)),o&&o.type==="date"&&(m=te.decodeDate(m)),C(r,h,m);if(r.xsizemode==="pixel"){var y=h(r.xanchor);M=y+r.x0+E,k=y+r.x1+c}else M=h(r.x0)+E,k=h(r.x1)+c;if(r.ysizemode==="pixel"){var f=m(r.yanchor);b=f-r.y0+_,A=f-r.y1+T}else b=m(r.y0)+_,A=m(r.y1)+T;if(a==="line")return"M"+M+","+b+"L"+k+","+A;if(a==="rect")return"M"+M+","+b+"H"+k+"V"+A+"H"+M+"Z";var p=(M+k)/2,x=(b+A)/2,N=Math.abs(p-M),D=Math.abs(x-b),B="A"+N+","+D,U=p+N+","+x,V=p+","+(x-D);return"M"+U+B+" 0 1,1 "+V+B+" 0 0,1 "+U+"Z"};function C(t,r,a){var l=t.path,i=t.xsizemode,s=t.ysizemode,o=t.xanchor,u=t.yanchor;return l.replace(Z.segmentRE,function(d){var h=0,g=d.charAt(0),m=Z.paramIsX[g],E=Z.paramIsY[g],c=Z.numParams[g],_=d.substr(1).replace(Z.paramRE,function(T){return m[h]?i==="pixel"?T=r(o)+Number(T):T=r(T):E[h]&&(s==="pixel"?T=a(u)-Number(T):T=a(T)),h++,h>c&&(T="X"),T});return h>c&&(_=_.replace(/[\s,]*X.*/,""),v.log("Ignoring extra params in segment "+d)),g+_})}function P(t,r){r=r||0;var a=0;return r&&t&&(t.type==="category"||t.type==="multicategory")&&(a=(t.r2p(1)-t.r2p(0))*r),a}}}),lA=Ne({"src/components/shapes/display_labels.js"(te,Z){var v=In(),w=Os(),C=hc(),P=zs(),t=om().readPaths,r=Sg(),a=r.getPathString,l=jv(),i=Ad().FROM_TL;Z.exports=function(d,h,g,m){if(m.selectAll(".shape-label").remove(),!!(g.label.text||g.label.texttemplate)){var E;if(g.label.texttemplate){var c={};if(g.type!=="path"){var _=w.getFromId(d,g.xref),T=w.getFromId(d,g.yref);for(var M in l){var k=l[M](g,_,T);k!==void 0&&(c[M]=k)}}E=v.texttemplateStringForShapes({data:[c],fallback:g.label.texttemplatefallback,locale:d._fullLayout._d3locale,template:g.label.texttemplate})}else E=g.label.text;var b={"data-index":h},A=g.label.font,y={"data-notex":1},f=m.append("g").attr(b).classed("shape-label",!0),p=f.append("text").attr(y).classed("shape-label-text",!0).text(E),x,N,D,B;if(g.path){var U=a(d,g),V=t(U,d);x=1/0,D=1/0,N=-1/0,B=-1/0;for(var q=0;q<V.length;q++)for(var z=0;z<V[q].length;z++)for(var H=V[q][z],G=1;G<H.length;G+=2){var J=H[G],le=H[G+1];x=Math.min(x,J),N=Math.max(N,J),D=Math.min(D,le),B=Math.max(B,le)}}else{var ge=w.getFromId(d,g.xref),de=g.x0shift,me=g.x1shift,W=w.getRefType(g.xref),ie=w.getFromId(d,g.yref),se=g.y0shift,ee=g.y1shift,pe=w.getRefType(g.yref),oe=function(Ve,rt){var mt=r.getDataToPixel(d,ge,rt,!1,W);return mt(Ve)},Y=function(Ve,rt){var mt=r.getDataToPixel(d,ie,rt,!0,pe);return mt(Ve)};x=oe(g.x0,de),N=oe(g.x1,me),D=Y(g.y0,se),B=Y(g.y1,ee)}var ce=g.label.textangle;ce==="auto"&&(g.type==="line"?ce=s(x,D,N,B):ce=0),p.call(function(Ve){return Ve.call(P.font,A).attr({}),C.convertToTspans(Ve,d),Ve});var ue=P.bBox(p.node()),_e=o(x,D,N,B,g,ce,ue),Le=_e.textx,ze=_e.texty,Xe=_e.xanchor;p.attr({"text-anchor":{left:"start",center:"middle",right:"end"}[Xe],y:ze,x:Le,transform:"rotate("+ce+","+Le+","+ze+")"}).call(C.positionText,Le,ze)}};function s(u,d,h,g){var m,E;return E=Math.abs(h-u),h>=u?m=d-g:m=g-d,-180/Math.PI*Math.atan2(m,E)}function o(u,d,h,g,m,E,c){var _=m.label.textposition,T=m.label.textangle,M=m.label.padding,k=m.type,b=Math.PI/180*E,A=Math.sin(b),y=Math.cos(b),f=m.label.xanchor,p=m.label.yanchor,x,N,D,B;if(k==="line"){_==="start"?(x=u,N=d):_==="end"?(x=h,N=g):(x=(u+h)/2,N=(d+g)/2),f==="auto"&&(_==="start"?T==="auto"?h>u?f="left":h<u?f="right":f="center":h>u?f="right":h<u?f="left":f="center":_==="end"?T==="auto"?h>u?f="right":h<u?f="left":f="center":h>u?f="left":h<u?f="right":f="center":f="center");var U={left:1,center:0,right:-1},V={bottom:-1,middle:0,top:1};if(T==="auto"){var q=V[p];D=-M*A*q,B=M*y*q}else{var z=U[f],H=V[p];D=M*z,B=M*H}x=x+D,N=N+B}else D=M+3,_.indexOf("right")!==-1?(x=Math.max(u,h)-D,f==="auto"&&(f="right")):_.indexOf("left")!==-1?(x=Math.min(u,h)+D,f==="auto"&&(f="left")):(x=(u+h)/2,f==="auto"&&(f="center")),_.indexOf("top")!==-1?N=Math.min(d,g):_.indexOf("bottom")!==-1?N=Math.max(d,g):N=(d+g)/2,B=M,p==="bottom"?N=N-B:p==="top"&&(N=N+B);var G=i[p],J=m.label.font.size,le=c.height,ge=(le*G-J)*A,de=-(le*G-J)*y;return{textx:x+ge,texty:N+de,xanchor:f}}}}),Sy=Ne({"src/components/shapes/display_outlines.js"(te,Z){var v=In(),w=v.strTranslate,C=Uv(),P=Pm(),t=P.drawMode,r=P.selectMode,a=Yo(),l=Ha(),i=Nw(),s=i.i000,o=i.i090,u=i.i180,d=i.i270,h=xg(),g=h.clearOutlineControllers,m=om(),E=m.pointsOnRectangle,c=m.pointsOnEllipse,_=m.writePaths,T=sA().newShapes,M=sA().createShapeObj,k=vM(),b=lA();Z.exports=function p(x,N,D,B){B||(B=0);var U=D.gd;function V(){p(x,N,D,B++),(c(x[0])||D.hasText)&&q({redrawing:!0})}function q(vt){var ut={};D.isActiveShape!==void 0&&(D.isActiveShape=!1,ut=T(N,D)),D.isActiveSelection!==void 0&&(D.isActiveSelection=!1,ut=k(N,D),U._fullLayout._reselect=!0),Object.keys(ut).length&&a.call((vt||{}).redrawing?"relayout":"_guiRelayout",U,ut)}var z=U._fullLayout,H=z._zoomlayer,G=D.dragmode,J=t(G),le=r(G);(J||le)&&(U._fullLayout._outlining=!0),g(U),N.attr("d",_(x));var ge,de,me,W,ie;if(!B&&(D.isActiveShape||D.isActiveSelection)){ie=A([],x);var se=H.append("g").attr("class","outline-controllers");Le(se),_t()}if(J&&D.hasText){var ee=H.select(".label-temp"),pe=M(N,D,D.dragmode);b(U,"label-temp",pe,ee)}function oe(vt){me=+vt.srcElement.getAttribute("data-i"),W=+vt.srcElement.getAttribute("data-j"),ge[me][W].moveFn=Y}function Y(vt,ut){if(x.length){var Fe=ie[me][W][1],Pe=ie[me][W][2],be=x[me],Ye=be.length;if(E(be)){var yt=vt,wt=ut;if(D.isActiveSelection){var ht=y(be,W);ht[1]===be[W][1]?wt=0:yt=0}for(var Yt=0;Yt<Ye;Yt++)if(Yt!==W){var $t=be[Yt];$t[1]===be[W][1]&&($t[1]=Fe+yt),$t[2]===be[W][2]&&($t[2]=Pe+wt)}if(be[W][1]=Fe+yt,be[W][2]=Pe+wt,!E(be))for(var fr=0;fr<Ye;fr++)for(var mr=0;mr<be[fr].length;mr++)be[fr][mr]=ie[me][fr][mr]}else be[W][1]=Fe+vt,be[W][2]=Pe+ut;V()}}function ce(){q()}function ue(){if(x.length&&x[me]&&x[me].length){for(var vt=[],ut=0;ut<x[me].length;ut++)ut!==W&&vt.push(x[me][ut]);vt.length>1&&!(vt.length===2&&vt[1][0]==="Z")&&(W===0&&(vt[0][0]="M"),x[me]=vt,V(),q())}}function _e(vt,ut){if(vt===2){me=+ut.srcElement.getAttribute("data-i"),W=+ut.srcElement.getAttribute("data-j");var Fe=x[me];!E(Fe)&&!c(Fe)&&ue()}}function Le(vt){ge=[];for(var ut=0;ut<x.length;ut++){var Fe=x[ut],Pe=E(Fe),be=!Pe&&c(Fe);ge[ut]=[];for(var Ye=Fe.length,yt=0;yt<Ye;yt++)if(Fe[yt][0]!=="Z"&&!(be&&yt!==s&&yt!==o&&yt!==u&&yt!==d)){var wt=Pe&&D.isActiveSelection,ht;wt&&(ht=y(Fe,yt));var Yt=Fe[yt][1],$t=Fe[yt][2],fr=vt.append(wt?"rect":"circle").attr("data-i",ut).attr("data-j",yt).style({fill:l.background,stroke:l.defaultLine,"stroke-width":1,"shape-rendering":"crispEdges"});if(wt){var mr=ht[1]-Yt,Ur=ht[2]-$t,jr=Ur?5:Math.max(Math.min(25,Math.abs(mr)-5),5),fn=mr?5:Math.max(Math.min(25,Math.abs(Ur)-5),5);fr.classed(Ur?"cursor-ew-resize":"cursor-ns-resize",!0).attr("width",jr).attr("height",fn).attr("x",Yt-jr/2).attr("y",$t-fn/2).attr("transform",w(mr/2,Ur/2))}else fr.classed("cursor-grab",!0).attr("r",5).attr("cx",Yt).attr("cy",$t);ge[ut][yt]={element:fr.node(),gd:U,prepFn:oe,doneFn:ce,clickFn:_e},C.init(ge[ut][yt])}}}function ze(vt,ut){if(x.length)for(var Fe=0;Fe<x.length;Fe++)for(var Pe=0;Pe<x[Fe].length;Pe++)for(var be=0;be+2<x[Fe][Pe].length;be+=2)x[Fe][Pe][be+1]=ie[Fe][Pe][be+1]+vt,x[Fe][Pe][be+2]=ie[Fe][Pe][be+2]+ut}function Xe(vt,ut){ze(vt,ut),V()}function Ve(vt){me=+vt.srcElement.getAttribute("data-i"),me||(me=0),de[me].moveFn=Xe}function rt(){q()}function mt(vt){vt===2&&f(U)}function _t(){if(de=[],!!x.length){var vt=0;de[vt]={element:N[0][0],gd:U,prepFn:Ve,doneFn:rt,clickFn:mt},C.init(de[vt])}}};function A(p,x){for(var N=0;N<x.length;N++){var D=x[N];p[N]=[];for(var B=0;B<D.length;B++){p[N][B]=[];for(var U=0;U<D[B].length;U++)p[N][B][U]=D[B][U]}}return p}function y(p,x){var N=p[x][1],D=p[x][2],B=p.length,U,V,q;return U=(x+1)%B,V=p[U][1],q=p[U][2],V===N&&q===D&&(U=(x+2)%B,V=p[U][1],q=p[U][2]),[U,V,q]}function f(p){if(r(p._fullLayout.dragmode)){g(p);var x=p._fullLayout._activeSelectionIndex,N=(p.layout||{}).selections||[];if(x<N.length){for(var D=[],B=0;B<N.length;B++)B!==x&&D.push(N[B]);delete p._fullLayout._activeSelectionIndex;var U=p._fullLayout.selections[x];p._fullLayout._deselect={xref:U.xref,yref:U.yref},a.call("_guiRelayout",p,{selections:D})}}}}}),Ey=Ne({"src/components/shapes/draw.js"(te,Z){var v=xn(),w=Yo(),C=In(),P=Os(),t=om().readPaths,r=Sy(),a=lA(),l=xg().clearOutlineControllers,i=Ha(),s=zs(),o=Cu().arrayEditor,u=Uv(),d=km(),h=Bw(),g=Sg(),m=g.getPathString;Z.exports={draw:E,drawOne:T,eraseActiveShape:f,drawLabel:a};function E(p){var x=p._fullLayout;x._shapeUpperLayer.selectAll("path").remove(),x._shapeLowerLayer.selectAll("path").remove(),x._shapeUpperLayer.selectAll("text").remove(),x._shapeLowerLayer.selectAll("text").remove();for(var N in x._plots){var D=x._plots[N].shapelayer;D&&(D.selectAll("path").remove(),D.selectAll("text").remove())}for(var B=0;B<x.shapes.length;B++)x.shapes[B].visible===!0&&T(p,B)}function c(p){return!!p._fullLayout._outlining}function _(p){return!p._context.edits.shapePosition}function T(p,x){p._fullLayout._paperdiv.selectAll('.shapelayer [data-index="'+x+'"]').remove();var N=g.makeShapesOptionsAndPlotinfo(p,x),D=N.options,B=N.plotinfo;if(!D._input||D.visible!==!0)return;if(D.layer==="above")V(p._fullLayout._shapeUpperLayer);else if(D.xref==="paper"||D.yref==="paper")V(p._fullLayout._shapeLowerLayer);else if(D.layer==="between")V(B.shapelayerBetween);else if(B._hadPlotinfo){var U=B.mainplotinfo||B;V(U.shapelayer)}else V(p._fullLayout._shapeLowerLayer);function V(q){var z=m(p,D),H={"data-index":x,"fill-rule":D.fillrule,d:z},G=D.opacity,J=D.fillcolor,le=D.line.width?D.line.color:"rgba(0,0,0,0)",ge=D.line.width,de=D.line.dash;!ge&&D.editable===!0&&(ge=5,de="solid");var me=z[z.length-1]!=="Z",W=_(p)&&D.editable&&p._fullLayout._activeShapeIndex===x;W&&(J=me?"rgba(0,0,0,0)":p._fullLayout.activeshape.fillcolor,G=p._fullLayout.activeshape.opacity);var ie=q.append("g").classed("shape-group",!0).attr({"data-index":x}),se=ie.append("path").attr(H).style("opacity",G).call(i.stroke,le).call(i.fill,J).call(s.dashLine,de,ge);M(ie,p,D),a(p,x,D,ie);var ee;if((W||p._context.edits.shapePosition)&&(ee=o(p.layout,"shapes",D)),W){se.style({cursor:"move"});var pe={element:se.node(),plotinfo:B,gd:p,editHelpers:ee,hasText:D.label.text||D.label.texttemplate,isActiveShape:!0},oe=t(z,p);r(oe,se,pe)}else p._context.edits.shapePosition?k(p,se,D,x,q,ee):D.editable===!0&&se.style("pointer-events",me||i.opacity(J)*G<=.5?"stroke":"all");se.node().addEventListener("click",function(){return A(p,se)})}}function M(p,x,N){var D=(N.xref+N.yref).replace(/paper/g,"").replace(/[xyz][0-9]* *domain/g,"");s.setClipUrl(p,D?"clip"+x._fullLayout._uid+D:null,x)}function k(p,x,N,D,B,U){var V=10,q=10,z=N.xsizemode==="pixel",H=N.ysizemode==="pixel",G=N.type==="line",J=N.type==="path",le=U.modifyItem,ge,de,me,W,ie,se,ee,pe,oe,Y,ce,ue,_e,Le,ze,Xe=v.select(x.node().parentNode),Ve=P.getFromId(p,N.xref),rt=P.getRefType(N.xref),mt=P.getFromId(p,N.yref),_t=P.getRefType(N.yref),vt=N.x0shift,ut=N.x1shift,Fe=N.y0shift,Pe=N.y1shift,be=function(Ee,Ae){var Ie=g.getDataToPixel(p,Ve,Ae,!1,rt);return Ie(Ee)},Ye=function(Ee,Ae){var Ie=g.getDataToPixel(p,mt,Ae,!0,_t);return Ie(Ee)},yt=g.getPixelToData(p,Ve,!1,rt),wt=g.getPixelToData(p,mt,!0,_t),ht=fr(),Yt={element:ht.node(),gd:p,prepFn:jr,doneFn:fn,clickFn:Br},$t;u.init(Yt),ht.node().onmousemove=Ur;function fr(){return G?mr():x}function mr(){var Ee=10,Ae=Math.max(N.line.width,Ee),Ie=B.append("g").attr("data-index",D).attr("drag-helper",!0);Ie.append("path").attr("d",x.attr("d")).style({cursor:"move","stroke-width":Ae,"stroke-opacity":"0"});var tt={"fill-opacity":"0"},st=Math.max(Ae/2,Ee);return Ie.append("circle").attr({"data-line-point":"start-point",cx:z?be(N.xanchor)+N.x0:be(N.x0,vt),cy:H?Ye(N.yanchor)-N.y0:Ye(N.y0,Fe),r:st}).style(tt).classed("cursor-grab",!0),Ie.append("circle").attr({"data-line-point":"end-point",cx:z?be(N.xanchor)+N.x1:be(N.x1,ut),cy:H?Ye(N.yanchor)-N.y1:Ye(N.y1,Pe),r:st}).style(tt).classed("cursor-grab",!0),Ie}function Ur(Ee){if(c(p)){$t=null;return}if(G)Ee.target.tagName==="path"?$t="move":$t=Ee.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var Ae=Yt.element.getBoundingClientRect(),Ie=Ae.right-Ae.left,tt=Ae.bottom-Ae.top,st=Ee.clientX-Ae.left,Bt=Ee.clientY-Ae.top,Ft=!J&&Ie>V&&tt>q&&!Ee.shiftKey?u.getCursor(st/Ie,1-Bt/tt):"move";d(x,Ft),$t=Ft.split("-")[0]}}function jr(Ee){c(p)||(z&&(ie=be(N.xanchor)),H&&(se=Ye(N.yanchor)),N.type==="path"?ze=N.path:(ge=z?N.x0:be(N.x0),de=H?N.y0:Ye(N.y0),me=z?N.x1:be(N.x1),W=H?N.y1:Ye(N.y1)),ge<me?(oe=ge,_e="x0",Y=me,Le="x1"):(oe=me,_e="x1",Y=ge,Le="x0"),!H&&de<W||H&&de>W?(ee=de,ce="y0",pe=W,ue="y1"):(ee=W,ce="y1",pe=de,ue="y0"),Ur(Ee),$e(B,N),De(x,N,p),Yt.moveFn=$t==="move"?Qr:Ot,Yt.altKey=Ee.altKey)}function fn(){c(p)||(d(x),ot(B),M(x,p,N),w.call("_guiRelayout",p,U.getUpdateObj()))}function Br(){c(p)||ot(B)}function Qr(Ee,Ae){if(N.type==="path"){var Ie=function(Bt){return Bt},tt=Ie,st=Ie;z?le("xanchor",N.xanchor=yt(ie+Ee)):(tt=function(Ft){return yt(be(Ft)+Ee)},Ve&&Ve.type==="date"&&(tt=g.encodeDate(tt))),H?le("yanchor",N.yanchor=wt(se+Ae)):(st=function(Ft){return wt(Ye(Ft)+Ae)},mt&&mt.type==="date"&&(st=g.encodeDate(st))),le("path",N.path=b(ze,tt,st))}else z?le("xanchor",N.xanchor=yt(ie+Ee)):(le("x0",N.x0=yt(ge+Ee)),le("x1",N.x1=yt(me+Ee))),H?le("yanchor",N.yanchor=wt(se+Ae)):(le("y0",N.y0=wt(de+Ae)),le("y1",N.y1=wt(W+Ae)));x.attr("d",m(p,N)),$e(B,N),a(p,D,N,Xe)}function Ot(Ee,Ae){if(J){var Ie=function(ia){return ia},tt=Ie,st=Ie;z?le("xanchor",N.xanchor=yt(ie+Ee)):(tt=function($a){return yt(be($a)+Ee)},Ve&&Ve.type==="date"&&(tt=g.encodeDate(tt))),H?le("yanchor",N.yanchor=wt(se+Ae)):(st=function($a){return wt(Ye($a)+Ae)},mt&&mt.type==="date"&&(st=g.encodeDate(st))),le("path",N.path=b(ze,tt,st))}else if(G){if($t==="resize-over-start-point"){var Bt=ge+Ee,Ft=H?de-Ae:de+Ae;le("x0",N.x0=z?Bt:yt(Bt)),le("y0",N.y0=H?Ft:wt(Ft))}else if($t==="resize-over-end-point"){var Wt=me+Ee,lr=H?W-Ae:W+Ae;le("x1",N.x1=z?Wt:yt(Wt)),le("y1",N.y1=H?lr:wt(lr))}}else{var Rr=function(ia){return $t.indexOf(ia)!==-1},Mr=Rr("n"),Sr=Rr("s"),Kr=Rr("w"),Hn=Rr("e"),ga=Mr?ee+Ae:ee,ua=Sr?pe+Ae:pe,Ta=Kr?oe+Ee:oe,Aa=Hn?Y+Ee:Y;H&&(Mr&&(ga=ee-Ae),Sr&&(ua=pe-Ae)),(!H&&ua-ga>q||H&&ga-ua>q)&&(le(ce,N[ce]=H?ga:wt(ga)),le(ue,N[ue]=H?ua:wt(ua))),Aa-Ta>V&&(le(_e,N[_e]=z?Ta:yt(Ta)),le(Le,N[Le]=z?Aa:yt(Aa)))}x.attr("d",m(p,N)),$e(B,N),a(p,D,N,Xe)}function $e(Ee,Ae){(z||H)&&Ie();function Ie(){var tt=Ae.type!=="path",st=Ee.selectAll(".visual-cue").data([0]),Bt=1;st.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":Bt}).classed("visual-cue",!0);var Ft=be(z?Ae.xanchor:C.midRange(tt?[Ae.x0,Ae.x1]:g.extractPathCoords(Ae.path,h.paramIsX))),Wt=Ye(H?Ae.yanchor:C.midRange(tt?[Ae.y0,Ae.y1]:g.extractPathCoords(Ae.path,h.paramIsY)));if(Ft=g.roundPositionForSharpStrokeRendering(Ft,Bt),Wt=g.roundPositionForSharpStrokeRendering(Wt,Bt),z&&H){var lr="M"+(Ft-1-Bt)+","+(Wt-1-Bt)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";st.attr("d",lr)}else if(z){var Rr="M"+(Ft-1-Bt)+","+(Wt-9-Bt)+"v18 h2 v-18 Z";st.attr("d",Rr)}else{var Mr="M"+(Ft-9-Bt)+","+(Wt-1-Bt)+"h18 v2 h-18 Z";st.attr("d",Mr)}}}function ot(Ee){Ee.selectAll(".visual-cue").remove()}function De(Ee,Ae,Ie){var tt=Ae.xref,st=Ae.yref,Bt=P.getFromId(Ie,tt),Ft=P.getFromId(Ie,st),Wt="";tt!=="paper"&&!Bt.autorange&&(Wt+=tt),st!=="paper"&&!Ft.autorange&&(Wt+=st),s.setClipUrl(Ee,Wt?"clip"+Ie._fullLayout._uid+Wt:null,Ie)}}function b(p,x,N){return p.replace(h.segmentRE,function(D){var B=0,U=D.charAt(0),V=h.paramIsX[U],q=h.paramIsY[U],z=h.numParams[U],H=D.substr(1).replace(h.paramRE,function(G){return B>=z||(V[B]?G=x(G):q[B]&&(G=N(G)),B++),G});return U+H})}function A(p,x){if(_(p)){var N=x.node(),D=+N.getAttribute("data-index");if(D>=0){if(D===p._fullLayout._activeShapeIndex){y(p);return}p._fullLayout._activeShapeIndex=D,p._fullLayout._deactivateShape=y,E(p)}}}function y(p){if(_(p)){var x=p._fullLayout._activeShapeIndex;x>=0&&(l(p),delete p._fullLayout._activeShapeIndex,E(p))}}function f(p){if(_(p)){l(p);var x=p._fullLayout._activeShapeIndex,N=(p.layout||{}).shapes||[];if(x<N.length){for(var D=[],B=0;B<N.length;B++)B!==x&&D.push(N[B]);return delete p._fullLayout._activeShapeIndex,w.call("_guiRelayout",p,{shapes:D})}}}}}),pM=Ne({"src/components/modebar/buttons.js"(te,Z){var v=Yo(),w=ff(),C=Wf(),P=zw(),t=Ey().eraseActiveShape,r=In(),a=r._,l=Z.exports={};l.toImage={name:"toImage",title:function(k){var b=k._context.toImageButtonOptions||{},A=b.format||"png";return A==="png"?a(k,"Download plot as a PNG"):a(k,"Download plot")},icon:P.camera,click:function(k){var b=k._context.toImageButtonOptions,A={format:b.format||"png"};r.notifier(a(k,"Taking snapshot - this may take a few seconds"),"long"),["filename","width","height","scale"].forEach(function(y){y in b&&(A[y]=b[y])}),v.call("downloadImage",k,A).then(function(y){r.notifier(a(k,"Snapshot succeeded")+" - "+y,"long")}).catch(function(){r.notifier(a(k,"Sorry, there was a problem downloading your snapshot!"),"long")})}},l.sendDataToCloud={name:"sendDataToCloud",title:function(k){return a(k,"Edit in Chart Studio")},icon:P.disk,click:function(k){w.sendDataToCloud(k)}},l.editInChartStudio={name:"editInChartStudio",title:function(k){return a(k,"Edit in Chart Studio")},icon:P.pencil,click:function(k){w.sendDataToCloud(k)}},l.zoom2d={name:"zoom2d",_cat:"zoom",title:function(k){return a(k,"Zoom")},attr:"dragmode",val:"zoom",icon:P.zoombox,click:i},l.pan2d={name:"pan2d",_cat:"pan",title:function(k){return a(k,"Pan")},attr:"dragmode",val:"pan",icon:P.pan,click:i},l.select2d={name:"select2d",_cat:"select",title:function(k){return a(k,"Box Select")},attr:"dragmode",val:"select",icon:P.selectbox,click:i},l.lasso2d={name:"lasso2d",_cat:"lasso",title:function(k){return a(k,"Lasso Select")},attr:"dragmode",val:"lasso",icon:P.lasso,click:i},l.drawclosedpath={name:"drawclosedpath",title:function(k){return a(k,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:P.drawclosedpath,click:i},l.drawopenpath={name:"drawopenpath",title:function(k){return a(k,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:P.drawopenpath,click:i},l.drawline={name:"drawline",title:function(k){return a(k,"Draw line")},attr:"dragmode",val:"drawline",icon:P.drawline,click:i},l.drawrect={name:"drawrect",title:function(k){return a(k,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:P.drawrect,click:i},l.drawcircle={name:"drawcircle",title:function(k){return a(k,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:P.drawcircle,click:i},l.eraseshape={name:"eraseshape",title:function(k){return a(k,"Erase active shape")},icon:P.eraseshape,click:t},l.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(k){return a(k,"Zoom in")},attr:"zoom",val:"in",icon:P.zoom_plus,click:i},l.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(k){return a(k,"Zoom out")},attr:"zoom",val:"out",icon:P.zoom_minus,click:i},l.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(k){return a(k,"Autoscale")},attr:"zoom",val:"auto",icon:P.autoscale,click:i},l.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(k){return a(k,"Reset axes")},attr:"zoom",val:"reset",icon:P.home,click:i},l.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(k){return a(k,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:P.tooltip_basic,gravity:"ne",click:i},l.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(k){return a(k,"Compare data on hover")},attr:"hovermode",val:function(k){return k._fullLayout._isHoriz?"y":"x"},icon:P.tooltip_compare,gravity:"ne",click:i};function i(k,b){var A=b.currentTarget,y=A.getAttribute("data-attr"),f=A.getAttribute("data-val")||!0,p=k._fullLayout,x={},N=C.list(k,null,!0),D=p._cartesianSpikesEnabled,B,U;if(y==="zoom"){var V=f==="in"?.5:2,q=(1+V)/2,z=(1-V)/2,H,G;for(U=0;U<N.length;U++)if(B=N[U],G=B.modebardisable==="none"||B.modebardisable.indexOf(f==="auto"||f==="reset"?"autoscale":"zoominout")===-1,G&&!B.fixedrange)if(H=B._name,f==="auto")x[H+".autorange"]=!0;else if(f==="reset")B._rangeInitial0===void 0&&B._rangeInitial1===void 0?x[H+".autorange"]=!0:B._rangeInitial0===void 0?(x[H+".autorange"]=B._autorangeInitial,x[H+".range"]=[null,B._rangeInitial1]):B._rangeInitial1===void 0?(x[H+".range"]=[B._rangeInitial0,null],x[H+".autorange"]=B._autorangeInitial):x[H+".range"]=[B._rangeInitial0,B._rangeInitial1],B._showSpikeInitial!==void 0&&(x[H+".showspikes"]=B._showSpikeInitial,D==="on"&&!B._showSpikeInitial&&(D="off"));else{var J=[B.r2l(B.range[0]),B.r2l(B.range[1])],le=[q*J[0]+z*J[1],q*J[1]+z*J[0]];x[H+".range[0]"]=B.l2r(le[0]),x[H+".range[1]"]=B.l2r(le[1])}}else y==="hovermode"&&(f==="x"||f==="y")&&(f=p._isHoriz?"y":"x",A.setAttribute("data-val",f)),x[y]=f;p._cartesianSpikesEnabled=D,v.call("_guiRelayout",k,x)}l.zoom3d={name:"zoom3d",_cat:"zoom",title:function(k){return a(k,"Zoom")},attr:"scene.dragmode",val:"zoom",icon:P.zoombox,click:s},l.pan3d={name:"pan3d",_cat:"pan",title:function(k){return a(k,"Pan")},attr:"scene.dragmode",val:"pan",icon:P.pan,click:s},l.orbitRotation={name:"orbitRotation",title:function(k){return a(k,"Orbital rotation")},attr:"scene.dragmode",val:"orbit",icon:P["3d_rotate"],click:s},l.tableRotation={name:"tableRotation",title:function(k){return a(k,"Turntable rotation")},attr:"scene.dragmode",val:"turntable",icon:P["z-axis"],click:s};function s(k,b){for(var A=b.currentTarget,y=A.getAttribute("data-attr"),f=A.getAttribute("data-val")||!0,p=k._fullLayout._subplots.gl3d||[],x={},N=y.split("."),D=0;D<p.length;D++)x[p[D]+"."+N[1]]=f;var B=f==="pan"?f:"zoom";x.dragmode=B,v.call("_guiRelayout",k,x)}l.resetCameraDefault3d={name:"resetCameraDefault3d",_cat:"resetCameraDefault",title:function(k){return a(k,"Reset camera to default")},attr:"resetDefault",icon:P.home,click:o},l.resetCameraLastSave3d={name:"resetCameraLastSave3d",_cat:"resetCameraLastSave",title:function(k){return a(k,"Reset camera to last save")},attr:"resetLastSave",icon:P.movie,click:o};function o(k,b){for(var A=b.currentTarget,y=A.getAttribute("data-attr"),f=y==="resetLastSave",p=y==="resetDefault",x=k._fullLayout,N=x._subplots.gl3d||[],D={},B=0;B<N.length;B++){var U=N[B],V=U+".camera",q=U+".aspectratio",z=U+".aspectmode",H=x[U]._scene,G;f?(D[V+".up"]=H.viewInitial.up,D[V+".eye"]=H.viewInitial.eye,D[V+".center"]=H.viewInitial.center,G=!0):p&&(D[V+".up"]=null,D[V+".eye"]=null,D[V+".center"]=null,G=!0),G&&(D[q+".x"]=H.viewInitial.aspectratio.x,D[q+".y"]=H.viewInitial.aspectratio.y,D[q+".z"]=H.viewInitial.aspectratio.z,D[z]=H.viewInitial.aspectmode)}v.call("_guiRelayout",k,D)}l.hoverClosest3d={name:"hoverClosest3d",_cat:"hoverclosest",title:function(k){return a(k,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:P.tooltip_basic,gravity:"ne",click:d};function u(k,b){var A=b.currentTarget,y=A._previousVal,f=k._fullLayout,p=f._subplots.gl3d||[],x=["xaxis","yaxis","zaxis"],N={},D={};if(y)D=y,A._previousVal=null;else{for(var B=0;B<p.length;B++){var U=p[B],V=f[U],q=U+".hovermode";N[q]=V.hovermode,D[q]=!1;for(var z=0;z<3;z++){var H=x[z],G=U+"."+H+".showspikes";D[G]=!1,N[G]=V[H].showspikes}}A._previousVal=N}return D}function d(k,b){var A=u(k,b);v.call("_guiRelayout",k,A)}l.zoomInGeo={name:"zoomInGeo",_cat:"zoomin",title:function(k){return a(k,"Zoom in")},attr:"zoom",val:"in",icon:P.zoom_plus,click:h},l.zoomOutGeo={name:"zoomOutGeo",_cat:"zoomout",title:function(k){return a(k,"Zoom out")},attr:"zoom",val:"out",icon:P.zoom_minus,click:h},l.resetGeo={name:"resetGeo",_cat:"reset",title:function(k){return a(k,"Reset")},attr:"reset",val:null,icon:P.autoscale,click:h},l.hoverClosestGeo={name:"hoverClosestGeo",_cat:"hoverclosest",title:function(k){return a(k,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:P.tooltip_basic,gravity:"ne",click:m};function h(k,b){for(var A=b.currentTarget,y=A.getAttribute("data-attr"),f=A.getAttribute("data-val")||!0,p=k._fullLayout,x=p._subplots.geo||[],N=0;N<x.length;N++){var D=x[N],B=p[D];if(y==="zoom"){var U=B.projection.scale,V=f==="in"?2*U:.5*U;v.call("_guiRelayout",k,D+".projection.scale",V)}}y==="reset"&&M(k,"geo")}l.hoverClosestPie={name:"hoverClosestPie",_cat:"hoverclosest",title:function(k){return a(k,"Toggle show closest data on hover")},attr:"hovermode",val:"closest",icon:P.tooltip_basic,gravity:"ne",click:m};function g(k){var b=k._fullLayout;return b.hovermode?!1:b._has("cartesian")?b._isHoriz?"y":"x":"closest"}function m(k){var b=g(k);v.call("_guiRelayout",k,"hovermode",b)}l.resetViewSankey={name:"resetSankeyGroup",title:function(k){return a(k,"Reset view")},icon:P.home,click:function(k){for(var b={"node.groups":[],"node.x":[],"node.y":[]},A=0;A<k._fullData.length;A++){var y=k._fullData[A]._viewInitial;b["node.groups"].push(y.node.groups.slice()),b["node.x"].push(y.node.x.slice()),b["node.y"].push(y.node.y.slice())}v.call("restyle",k,b)}},l.toggleHover={name:"toggleHover",title:function(k){return a(k,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:P.tooltip_basic,gravity:"ne",click:function(k,b){var A=u(k,b);A.hovermode=g(k),v.call("_guiRelayout",k,A)}},l.resetViews={name:"resetViews",title:function(k){return a(k,"Reset views")},icon:P.home,click:function(k,b){var A=b.currentTarget;A.setAttribute("data-attr","zoom"),A.setAttribute("data-val","reset"),i(k,b),A.setAttribute("data-attr","resetLastSave"),o(k,b),M(k,"geo"),M(k,"mapbox"),M(k,"map")}},l.toggleSpikelines={name:"toggleSpikelines",title:function(k){return a(k,"Toggle Spike Lines")},icon:P.spikeline,attr:"_cartesianSpikesEnabled",val:"on",click:function(k){var b=k._fullLayout,A=b._cartesianSpikesEnabled;b._cartesianSpikesEnabled=A==="on"?"off":"on",v.call("_guiRelayout",k,E(k))}};function E(k){for(var b=k._fullLayout,A=b._cartesianSpikesEnabled==="on",y=C.list(k,null,!0),f={},p=0;p<y.length;p++){var x=y[p];f[x._name+".showspikes"]=A?!0:x._showSpikeInitial}return f}l.resetViewMapbox={name:"resetViewMapbox",_cat:"resetView",title:function(k){return a(k,"Reset view")},attr:"reset",icon:P.home,click:function(k){M(k,"mapbox")}},l.resetViewMap={name:"resetViewMap",_cat:"resetView",title:function(k){return a(k,"Reset view")},attr:"reset",icon:P.home,click:function(k){M(k,"map")}},l.zoomInMapbox={name:"zoomInMapbox",_cat:"zoomin",title:function(k){return a(k,"Zoom in")},attr:"zoom",val:"in",icon:P.zoom_plus,click:c},l.zoomInMap={name:"zoomInMap",_cat:"zoomin",title:function(k){return a(k,"Zoom in")},attr:"zoom",val:"in",icon:P.zoom_plus,click:_},l.zoomOutMapbox={name:"zoomOutMapbox",_cat:"zoomout",title:function(k){return a(k,"Zoom out")},attr:"zoom",val:"out",icon:P.zoom_minus,click:c},l.zoomOutMap={name:"zoomOutMap",_cat:"zoomout",title:function(k){return a(k,"Zoom out")},attr:"zoom",val:"out",icon:P.zoom_minus,click:_};function c(k,b){T(k,b,"mapbox")}function _(k,b){T(k,b,"map")}function T(k,b,A){for(var y=b.currentTarget,f=y.getAttribute("data-val"),p=k._fullLayout,x=p._subplots[A]||[],N=1.05,D={},B=0;B<x.length;B++){var U=x[B],V=p[U].zoom,q=f==="in"?N*V:V/N;D[U+".zoom"]=q}v.call("_guiRelayout",k,D)}function M(k,b){for(var A=k._fullLayout,y=A._subplots[b]||[],f={},p=0;p<y.length;p++)for(var x=y[p],N=A[x]._subplot,D=N.viewInitial,B=Object.keys(D),U=0;U<B.length;U++){var V=B[U];f[x+"."+V]=D[V]}v.call("_guiRelayout",k,f)}}}),Mx=Ne({"src/components/modebar/constants.js"(te,Z){var v=pM(),w=Object.keys(v),C=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],P=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(C),t=[],r=function(a){if(P.indexOf(a._cat||a.name)===-1){var l=a.name,i=(a._cat||a.name).toLowerCase();t.indexOf(l)===-1&&t.push(l),t.indexOf(i)===-1&&t.push(i)}};w.forEach(function(a){r(v[a])}),t.sort(),Z.exports={DRAW_MODES:C,backButtons:P,foreButtons:t}}}),uA=Ne({"src/components/modebar/attributes.js"(te,Z){Mx(),Z.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"}}}}),mM=Ne({"src/components/modebar/defaults.js"(te,Z){var v=In(),w=Ha(),C=Cu(),P=uA();Z.exports=function(r,a){var l=r.modebar||{},i=C.newContainer(a,"modebar");function s(u,d){return v.coerce(l,i,P,u,d)}s("orientation"),s("bgcolor",w.addOpacity(a.paper_bgcolor,.5));var o=w.contrast(w.rgb(a.modebar.bgcolor));s("color",w.addOpacity(o,.3)),s("activecolor",w.addOpacity(o,.7)),s("uirevision",a.uirevision),s("add"),s("remove")}}}),cA=Ne({"src/components/modebar/modebar.js"(te,Z){var v=xn(),w=Fn(),C=In(),P=zw(),t=cn().version,r=new DOMParser;function a(o){this.container=o.container,this.element=document.createElement("div"),this.update(o.graphInfo,o.buttons),this.container.appendChild(this.element)}var l=a.prototype;l.update=function(o,u){this.graphInfo=o;var d=this.graphInfo._context,h=this.graphInfo._fullLayout,g="modebar-"+h._uid;this.element.setAttribute("id",g),this.element.setAttribute("role","toolbar"),this._uid=g,this.element.className="modebar modebar--custom",d.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),h.modebar.orientation==="v"&&(this.element.className+=" vertical",u=u.reverse());var m=h.modebar,E="#"+g+" .modebar-group";document.querySelectorAll(E).forEach(function(k){k.style.backgroundColor=m.bgcolor});var c=!this.hasButtons(u),_=this.hasLogo!==d.displaylogo,T=this.locale!==d.locale;if(this.locale=d.locale,(c||_||T)&&(this.removeAllButtons(),this.updateButtons(u),d.watermark||d.displaylogo)){var M=this.getLogo();d.watermark&&(M.className=M.className+" watermark"),h.modebar.orientation==="v"?this.element.insertBefore(M,this.element.childNodes[0]):this.element.appendChild(M),this.hasLogo=!0}this.updateActiveButton(),C.setStyleOnHover("#"+g+" .modebar-btn",".active",".icon path","fill: "+m.activecolor,"fill: "+m.color,this.element)},l.updateButtons=function(o){var u=this;this.buttons=o,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(d){var h=u.createGroup();d.forEach(function(g){var m=g.name;if(!m)throw new Error("must provide button 'name' in button config");if(u.buttonsNames.indexOf(m)!==-1)throw new Error("button name '"+m+"' is taken");u.buttonsNames.push(m);var E=u.createButton(g);u.buttonElements.push(E),h.appendChild(E)}),u.element.appendChild(h)})},l.createGroup=function(){var o=document.createElement("div");o.className="modebar-group";var u=this.graphInfo._fullLayout.modebar;return o.style.backgroundColor=u.bgcolor,o},l.createButton=function(o){var u=this,d=document.createElement("button");d.setAttribute("type","button"),d.setAttribute("rel","tooltip"),d.className="modebar-btn";var h=o.title;h===void 0?h=o.name:typeof h=="function"&&(h=h(this.graphInfo)),(h||h===0)&&(d.setAttribute("data-title",h),d.setAttribute("aria-label",h)),o.attr!==void 0&&d.setAttribute("data-attr",o.attr);var g=o.val;g!==void 0&&(typeof g=="function"&&(g=g(this.graphInfo)),d.setAttribute("data-val",g));var m=o.click;if(typeof m!="function")throw new Error("must provide button 'click' function in button config");d.addEventListener("click",function(c){o.click(u.graphInfo,c),u.updateActiveButton(c.currentTarget)}),d.setAttribute("data-toggle",o.toggle||!1),o.toggle&&v.select(d).classed("active",!0);var E=o.icon;return typeof E=="function"?d.appendChild(E()):d.appendChild(this.createIcon(E||P.question)),d.setAttribute("data-gravity",o.gravity||"n"),d},l.createIcon=function(o){var u=w(o.height)?Number(o.height):o.ascent-o.descent,d="http://www.w3.org/2000/svg",h;if(o.path){h=document.createElementNS(d,"svg"),h.setAttribute("viewBox",[0,0,o.width,u].join(" ")),h.setAttribute("class","icon");var g=document.createElementNS(d,"path");g.setAttribute("d",o.path),o.transform?g.setAttribute("transform",o.transform):o.ascent!==void 0&&g.setAttribute("transform","matrix(1 0 0 -1 0 "+o.ascent+")"),h.appendChild(g)}if(o.svg){var m=r.parseFromString(o.svg,"application/xml");h=m.childNodes[0]}return h.setAttribute("height","1em"),h.setAttribute("width","1em"),h},l.updateActiveButton=function(o){var u=this.graphInfo._fullLayout,d=o!==void 0?o.getAttribute("data-attr"):null;this.buttonElements.forEach(function(h){var g=h.getAttribute("data-val")||!0,m=h.getAttribute("data-attr"),E=h.getAttribute("data-toggle")==="true",c=v.select(h),_=function(k,b){var A=u.modebar,y=k.querySelector(".icon path");y&&(b||k.matches(":hover")?y.style.fill=A.activecolor:y.style.fill=A.color)};if(E){if(m===d){var T=!c.classed("active");c.classed("active",T),_(h,T)}}else{var M=m===null?m:C.nestedProperty(u,m).get();c.classed("active",M===g),_(h,M===g)}})},l.hasButtons=function(o){var u=this.buttons;if(!u||o.length!==u.length)return!1;for(var d=0;d<o.length;++d){if(o[d].length!==u[d].length)return!1;for(var h=0;h<o[d].length;h++)if(o[d][h].name!==u[d][h].name)return!1}return!0};function i(o){return o+" (v"+t+")"}l.getLogo=function(){var o=this.createGroup(),u=document.createElement("a");return u.href="https://plotly.com/",u.target="_blank",u.setAttribute("data-title",i(C._(this.graphInfo,"Produced with Plotly.js"))),u.className="modebar-btn plotlyjsicon modebar-btn--logo",u.appendChild(this.createIcon(P.newplotlylogo)),o.appendChild(u),o},l.removeAllButtons=function(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.hasLogo=!1},l.destroy=function(){C.removeElement(this.container.querySelector(".modebar"))};function s(o,u){var d=o._fullLayout,h=new a({graphInfo:o,container:d._modebardiv.node(),buttons:u});return d._privateplot&&v.select(h.element).append("span").classed("badge-private float--left",!0).text("PRIVATE"),h}Z.exports=s}}),fA=Ne({"src/components/modebar/manage.js"(te,Z){var v=Wf(),w=yu(),C=Yo(),P=bv().isUnifiedHover,t=cA(),r=pM(),a=Mx().DRAW_MODES,l=In().extendDeep;Z.exports=function(m){var E=m._fullLayout,c=m._context,_=E._modeBar;if(!c.displayModeBar&&!c.watermark){_&&(_.destroy(),delete E._modeBar);return}if(!Array.isArray(c.modeBarButtonsToRemove))throw new Error(["*modeBarButtonsToRemove* configuration options","must be an array."].join(" "));if(!Array.isArray(c.modeBarButtonsToAdd))throw new Error(["*modeBarButtonsToAdd* configuration options","must be an array."].join(" "));var T=c.modeBarButtons,M;Array.isArray(T)&&T.length?M=h(T):!c.displayModeBar&&c.watermark?M=[]:M=i(m),_?_.update(m,M):E._modeBar=t(m,M)};function i(g){var m=g._fullLayout,E=g._fullData,c=g._context;function _(Y,ce){if(typeof ce=="string"){if(ce.toLowerCase()===Y.toLowerCase())return!0}else{var ue=ce.name,_e=ce._cat||ce.name;if(ue===Y||_e===Y.toLowerCase())return!0}return!1}var T=m.modebar.add;typeof T=="string"&&(T=[T]);var M=m.modebar.remove;typeof M=="string"&&(M=[M]);var k=c.modeBarButtonsToAdd.concat(T.filter(function(Y){for(var ce=0;ce<c.modeBarButtonsToRemove.length;ce++)if(_(Y,c.modeBarButtonsToRemove[ce]))return!1;return!0})),b=c.modeBarButtonsToRemove.concat(M.filter(function(Y){for(var ce=0;ce<c.modeBarButtonsToAdd.length;ce++)if(_(Y,c.modeBarButtonsToAdd[ce]))return!1;return!0})),A=m._has("cartesian"),y=m._has("gl3d"),f=m._has("geo"),p=m._has("pie"),x=m._has("funnelarea"),N=m._has("ternary"),D=m._has("mapbox"),B=m._has("map"),U=m._has("polar"),V=m._has("smith"),q=m._has("sankey"),z=s(m),H=P(m.hovermode),G=[];function J(Y){if(Y.length){for(var ce=[],ue=0;ue<Y.length;ue++){for(var _e=Y[ue],Le=r[_e],ze=Le.name.toLowerCase(),Xe=(Le._cat||Le.name).toLowerCase(),Ve=!1,rt=0;rt<b.length;rt++){var mt=b[rt].toLowerCase();if(mt===ze||mt===Xe){Ve=!0;break}}Ve||ce.push(r[_e])}G.push(ce)}}var le=["toImage"];c.showEditInChartStudio?le.push("editInChartStudio"):c.showSendToCloud&&le.push("sendDataToCloud"),J(le);var ge=[],de=[],me=[],W=[];(A||p||x||N)+f+y+D+B+U+V>1?(de=["toggleHover"],me=["resetViews"]):f?(ge=["zoomInGeo","zoomOutGeo"],de=["hoverClosestGeo"],me=["resetGeo"]):y?(de=["hoverClosest3d"],me=["resetCameraDefault3d","resetCameraLastSave3d"]):D?(ge=["zoomInMapbox","zoomOutMapbox"],de=["toggleHover"],me=["resetViewMapbox"]):B?(ge=["zoomInMap","zoomOutMap"],de=["toggleHover"],me=["resetViewMap"]):p?de=["hoverClosestPie"]:q?(de=["hoverClosestCartesian","hoverCompareCartesian"],me=["resetViewSankey"]):de=["toggleHover"],A&&de.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(u(E)||H)&&(de=[]),A&&!z&&(ge=["zoomIn2d","zoomOut2d","autoScale2d"],me[0]!=="resetViews"&&(me=["resetScale2d"])),y?W=["zoom3d","pan3d","orbitRotation","tableRotation"]:A&&!z||N?W=["zoom2d","pan2d"]:D||B||f?W=["pan2d"]:U&&(W=["zoom2d"]),o(E)&&W.push("select2d","lasso2d");var ie=[],se=function(Y){ie.indexOf(Y)===-1&&de.indexOf(Y)!==-1&&ie.push(Y)};if(Array.isArray(k)){for(var ee=[],pe=0;pe<k.length;pe++){var oe=k[pe];typeof oe=="string"?(oe=oe.toLowerCase(),a.indexOf(oe)!==-1?(m._has("mapbox")||m._has("map")||m._has("cartesian"))&&W.push(oe):oe==="togglespikelines"?se("toggleSpikelines"):oe==="togglehover"?se("toggleHover"):oe==="hovercompare"?se("hoverCompareCartesian"):oe==="hoverclosest"?(se("hoverClosestCartesian"),se("hoverClosestGeo"),se("hoverClosest3d"),se("hoverClosestPie")):oe==="v1hovermode"&&(se("hoverClosestCartesian"),se("hoverCompareCartesian"),se("hoverClosestGeo"),se("hoverClosest3d"),se("hoverClosestPie"))):ee.push(oe)}k=ee}return J(W),J(ge.concat(me)),J(ie),d(G,k)}function s(g){for(var m=v.list({_fullLayout:g},null,!0),E=0;E<m.length;E++){var c=m[E].modebardisable;if(!m[E].fixedrange&&c!=="autoscale+zoominout"&&c!=="zoominout+autoscale")return!1}return!0}function o(g){for(var m=!1,E=0;E<g.length&&!m;E++){var c=g[E];!c._module||!c._module.selectPoints||(C.traceIs(c,"scatter-like")?(w.hasMarkers(c)||w.hasText(c))&&(m=!0):C.traceIs(c,"box-violin")?(c.boxpoints==="all"||c.points==="all")&&(m=!0):m=!0)}return m}function u(g){for(var m=0;m<g.length;m++)if(!C.traceIs(g[m],"noHover"))return!1;return!0}function d(g,m){if(m.length)if(Array.isArray(m[0]))for(var E=0;E<m.length;E++)g.push(m[E]);else g.push(m);return g}function h(g){for(var m=l([],g),E=0;E<m.length;E++)for(var c=m[E],_=0;_<c.length;_++){var T=c[_];if(typeof T=="string")if(r[T]!==void 0)m[E][_]=r[T];else throw new Error(["*modeBarButtons* configuration options","invalid button name"].join(" "))}return m}}}),hA=Ne({"src/components/modebar/index.js"(te,Z){Z.exports={moduleType:"component",name:"modebar",layoutAttributes:uA(),supplyLayoutDefaults:mM(),manage:fA()}}}),dA=Ne({"src/plots/cartesian/scale_zoom.js"(te,Z){var v=Ad().FROM_BL;Z.exports=function(C,P,t){t===void 0&&(t=v[C.constraintoward||"center"]);var r=[C.r2l(C.range[0]),C.r2l(C.range[1])],a=r[0]+(r[1]-r[0])*t;C.range=C._input.range=[C.l2r(a+(r[0]-a)*P),C.l2r(a+(r[1]-a)*P)],C.setScale()}}}),My=Ne({"src/plots/cartesian/constraints.js"(te){var Z=In(),v=Cm(),w=Wf().id2name,C=Sd(),P=dA(),t=Vp(),r=da().ALMOST_EQUAL,a=Ad().FROM_BL;te.handleDefaults=function(g,m,E){var c=E.axIds,_=E.axHasImage,T=m._axisConstraintGroups=[],M=m._axisMatchGroups=[],k,b,A,y,f,p,x,N;for(k=0;k<c.length;k++)y=w(c[k]),f=g[y],p=m[y],l(f,p,{axIds:c,layoutOut:m,hasImage:_[y]});function D(le,ge){for(k=0;k<le.length;k++){b=le[k];for(A in b)m[w(A)][ge]=b}}for(D(M,"_matchGroup"),k=0;k<T.length;k++){b=T[k];for(A in b)if(p=m[w(A)],p.fixedrange){for(var B in b){var U=w(B);(g[U]||{}).fixedrange===!1&&Z.warn("fixedrange was specified as false for axis "+U+" but was overridden because another axis in its constraint group has fixedrange true"),m[U].fixedrange=!0}break}}for(k=0;k<T.length;){b=T[k];for(A in b){p=m[w(A)],p._matchGroup&&Object.keys(p._matchGroup).length===Object.keys(b).length&&(T.splice(k,1),k--);break}k++}D(T,"_constraintGroup");var V=["constrain","range","autorange","rangemode","rangebreaks","categoryorder","categoryarray"],q=!1,z=!1;function H(){N=p[x],x==="rangebreaks"&&(z=p._hasDayOfWeekBreaks)}for(k=0;k<M.length;k++){b=M[k];for(var G=0;G<V.length;G++){x=V[G],N=null;var J;for(A in b)if(y=w(A),f=g[y],p=m[y],x in p){if(!p.matches&&(J=p,x in f)){H();break}N===null&&x in f&&H()}if(x==="range"&&N&&f.range&&f.range.length===2&&f.range[0]!==null&&f.range[1]!==null&&(q=!0),x==="autorange"&&N===null&&q&&(N=!1),N===null&&x in J&&(N=J[x]),N!==null)for(A in b)p=m[w(A)],p[x]=x==="range"?N.slice():N,x==="rangebreaks"&&(p._hasDayOfWeekBreaks=z,t(p,m))}}};function l(g,m,E){var c=E.axIds,_=E.layoutOut,T=E.hasImage,M=_._axisConstraintGroups,k=_._axisMatchGroups,b=m._id,A=b.charAt(0),y=((_._splomAxes||{})[A]||{})[b]||{},f=m._id,p=f.charAt(0)==="x";m._matchGroup=null,m._constraintGroup=null;function x(W,ie){return Z.coerce(g,m,C,W,ie)}x("constrain",T?"domain":"range"),Z.coerce(g,m,{constraintoward:{valType:"enumerated",values:p?["left","center","right"]:["bottom","middle","top"],dflt:p?"center":"middle"}},"constraintoward");var N=m.type,D,B,U=[];for(D=0;D<c.length;D++)if(B=c[D],B!==f){var V=_[w(B)];V.type===N&&U.push(B)}var q=s(M,f);if(q){var z=[];for(D=0;D<U.length;D++)B=U[D],q[B]||z.push(B);U=z}var H=U.length,G,J;H&&(g.matches||y.matches)&&(G=Z.coerce(g,m,{matches:{valType:"enumerated",values:U,dflt:U.indexOf(y.matches)!==-1?y.matches:void 0}},"matches"));var le=T&&!p?m.anchor:void 0;if(H&&!G&&(g.scaleanchor||le)&&(J=Z.coerce(g,m,{scaleanchor:{valType:"enumerated",values:U.concat([!1])}},"scaleanchor",le)),G){m._matchGroup=o(k,f,G,1);var ge=_[w(G)],de=i(_,m)/i(_,ge);p!==(G.charAt(0)==="x")&&(de=(p?"x":"y")+de),o(M,f,G,de)}else g.matches&&c.indexOf(g.matches)!==-1&&Z.warn("ignored "+m._name+'.matches: "'+g.matches+'" to avoid an infinite loop');if(J){var me=x("scaleratio");me||(me=m.scaleratio=1),o(M,f,J,me)}else g.scaleanchor&&c.indexOf(g.scaleanchor)!==-1&&Z.warn("ignored "+m._name+'.scaleanchor: "'+g.scaleanchor+'" to avoid either an infinite loop and possibly inconsistent scaleratios, or because this axis declares a *matches* constraint.')}function i(g,m){var E=m.domain;return E||(E=g[w(m.overlaying)].domain),E[1]-E[0]}function s(g,m){for(var E=0;E<g.length;E++)if(g[E][m])return g[E];return null}function o(g,m,E,c){var _,T,M,k,b,A=s(g,m);A===null?(A={},A[m]=1,b=g.length,g.push(A)):b=g.indexOf(A);var y=Object.keys(A);for(_=0;_<g.length;_++)if(M=g[_],_!==b&&M[E]){var f=M[E];for(T=0;T<y.length;T++)k=y[T],M[k]=u(f,u(c,A[k]));g.splice(b,1);return}if(c!==1)for(T=0;T<y.length;T++){var p=y[T];A[p]=u(c,A[p])}A[E]=1}function u(g,m){var E="",c="",_,T;typeof g=="string"&&(E=g.match(/^[xy]*/)[0],_=E.length,g=+g.substr(_)),typeof m=="string"&&(c=m.match(/^[xy]*/)[0],T=c.length,m=+m.substr(T));var M=g*m;return!_&&!T?M:!_||!T||E.charAt(0)===c.charAt(0)?E+c+g*m:_===T?M:(_>T?E.substr(T):c.substr(_))+M}function d(g,m){for(var E=m._size,c=E.h/E.w,_={},T=Object.keys(g),M=0;M<T.length;M++){var k=T[M],b=g[k];if(typeof b=="string"){var A=b.match(/^[xy]*/)[0],y=A.length;b=+b.substr(y);for(var f=A.charAt(0)==="y"?c:1/c,p=0;p<y;p++)b*=f}_[k]=b}return _}te.enforce=function(m){var E=m._fullLayout,c=E._axisConstraintGroups||[],_,T,M,k,b,A,y,f;for(_=0;_<c.length;_++){M=d(c[_],E);var p=Object.keys(M),x=1/0,N=0,D=1/0,B={},U={},V=!1;for(T=0;T<p.length;T++)k=p[T],U[k]=b=E[w(k)],b._inputDomain?b.domain=b._inputDomain.slice():b._inputDomain=b.domain.slice(),b._inputRange||(b._inputRange=b.range.slice()),b.setScale(),B[k]=A=Math.abs(b._m)/M[k],x=Math.min(x,A),(b.constrain==="domain"||!b._constraintShrinkable)&&(D=Math.min(D,A)),delete b._constraintShrinkable,N=Math.max(N,A),b.constrain==="domain"&&(V=!0);if(!(x>r*N&&!V)){for(T=0;T<p.length;T++)if(k=p[T],A=B[k],b=U[k],y=b.constrain,A!==D||y==="domain")if(f=A/D,y==="range")P(b,f);else{var q=b._inputDomain,z=(b.domain[1]-b.domain[0])/(q[1]-q[0]),H=(b.r2l(b.range[1])-b.r2l(b.range[0]))/(b.r2l(b._inputRange[1])-b.r2l(b._inputRange[0]));if(f/=z,f*H<1){b.domain=b._input.domain=q.slice(),P(b,f);continue}if(H<1&&(b.range=b._input.range=b._inputRange.slice(),f*=H),b.autorange){var G=b.r2l(b.range[0]),J=b.r2l(b.range[1]),le=(G+J)/2,ge=le,de=le,me=Math.abs(J-le),W=le-me*f*1.0001,ie=le+me*f*1.0001,se=v.makePadFn(E,b,0),ee=v.makePadFn(E,b,1);h(b,f);var pe=Math.abs(b._m),oe=v.concatExtremes(m,b),Y=oe.min,ce=oe.max,ue,_e;for(_e=0;_e<Y.length;_e++)ue=Y[_e].val-se(Y[_e])/pe,ue>W&&ue<ge&&(ge=ue);for(_e=0;_e<ce.length;_e++)ue=ce[_e].val+ee(ce[_e])/pe,ue<ie&&ue>de&&(de=ue);var Le=(de-ge)/(2*me);f/=Le,ge=b.l2r(ge),de=b.l2r(de),b.range=b._input.range=G<J?[ge,de]:[de,ge]}h(b,f)}}}},te.getAxisGroup=function(m,E){for(var c=m._axisMatchGroups,_=0;_<c.length;_++){var T=c[_];if(T[E])return"g"+_}return E},te.clean=function(m,E){if(E._inputDomain){for(var c=!1,_=E._id,T=m._fullLayout._axisConstraintGroups,M=0;M<T.length;M++)if(T[M][_]){c=!0;break}(!c||E.constrain!=="domain")&&(E._input.domain=E.domain=E._inputDomain,delete E._inputDomain)}};function h(g,m){var E=g._inputDomain,c=a[g.constraintoward],_=E[0]+(E[1]-E[0])*c;g.domain=g._input.domain=[_+(E[0]-_)/m,_+(E[1]-_)/m],g.setScale()}}}),jw=Ne({"src/plot_api/subroutines.js"(te){var Z=xn(),v=Yo(),w=ff(),C=In(),P=hc(),t=Ex(),r=Ha(),a=zs(),l=Tg(),i=hA(),s=Os(),o=Ad(),u=My(),d=u.enforce,h=u.clean,g=Cm().doAutoRange,m="start",E="middle",c="end",_=wh().zindexSeparator;te.layoutStyles=function(q){return C.syncOrAsync([w.doAutoMargin,M],q)};function T(q,z,H){for(var G=0;G<H.length;G++){var J=H[G][0],le=H[G][1];if(!(J[0]>=q[1]||J[1]<=q[0])&&le[0]<z[1]&&le[1]>z[0])return!0}return!1}function M(q){var z=q._fullLayout,H=z._size,G=H.p,J=s.list(q,"",!0),le,ge,de,me,W,ie;if(z._paperdiv.style({width:q._context.responsive&&z.autosize&&!q._context._hasZeroWidth&&!q.layout.width?"100%":z.width+"px",height:q._context.responsive&&z.autosize&&!q._context._hasZeroHeight&&!q.layout.height?"100%":z.height+"px"}).selectAll(".main-svg").call(a.setSize,z.width,z.height),q._context.setBackground(q,z.paper_bgcolor),te.drawMainTitle(q),i.manage(q),!z._has("cartesian"))return w.previousPromises(q);function se(De,Ee,Ae){var Ie=De._lw/2;if(De._id.charAt(0)==="x"){if(Ee){if(Ae==="top")return Ee._offset-G-Ie}else return H.t+H.h*(1-(De.position||0))+Ie%1;return Ee._offset+Ee._length+G+Ie}if(Ee){if(Ae==="right")return Ee._offset+Ee._length+G+Ie}else return H.l+H.w*(De.position||0)+Ie%1;return Ee._offset-G-Ie}for(le=0;le<J.length;le++){me=J[le];var ee=me._anchorAxis;me._linepositions={},me._lw=a.crispRound(q,me.linewidth,1),me._mainLinePosition=se(me,ee,me.side),me._mainMirrorPosition=me.mirror&&ee?se(me,ee,o.OPPOSITE_SIDE[me.side]):null}var pe=[],oe=[],Y=[],ce=r.opacity(z.paper_bgcolor)===1&&r.opacity(z.plot_bgcolor)===1&&z.paper_bgcolor===z.plot_bgcolor;for(ge in z._plots)if(de=z._plots[ge],de.mainplot)de.bg&&de.bg.remove(),de.bg=void 0;else{var ue=de.xaxis.domain,_e=de.yaxis.domain,Le=de.plotgroup;if(T(ue,_e,Y)&&ge.indexOf(_)===-1){var ze=Le.node(),Xe=de.bg=C.ensureSingle(Le,"rect","bg");ze.insertBefore(Xe.node(),ze.childNodes[0]),oe.push(ge)}else Le.select("rect.bg").remove(),Y.push([ue,_e]),ce||(pe.push(ge),oe.push(ge))}var Ve=z._bgLayer.selectAll(".bg").data(pe);for(Ve.enter().append("rect").classed("bg",!0),Ve.exit().remove(),Ve.each(function(De){z._plots[De].bg=Z.select(this)}),le=0;le<oe.length;le++)de=z._plots[oe[le]],W=de.xaxis,ie=de.yaxis,de.bg&&W._offset!==void 0&&ie._offset!==void 0&&de.bg.call(a.setRect,W._offset-G,ie._offset-G,W._length+2*G,ie._length+2*G).call(r.fill,z.plot_bgcolor).style("stroke-width",0);if(!z._hasOnlyLargeSploms)for(ge in z._plots){de=z._plots[ge],W=de.xaxis,ie=de.yaxis;var rt=de.clipId="clip"+z._uid+ge+"plot",mt=C.ensureSingleById(z._clips,"clipPath",rt,function(De){De.classed("plotclip",!0).append("rect")});de.clipRect=mt.select("rect").attr({width:W._length,height:ie._length}),a.setTranslate(de.plot,W._offset,ie._offset);var _t,vt;de._hasClipOnAxisFalse?(_t=null,vt=rt):(_t=rt,vt=null),a.setClipUrl(de.plot,_t,q),de.layerClipId=vt}var ut,Fe,Pe,be,Ye,yt,wt,ht,Yt,$t,fr,mr,Ur;function jr(De){return"M"+ut+","+De+"H"+Fe}function fn(De){return"M"+W._offset+","+De+"h"+W._length}function Br(De){return"M"+De+","+ht+"V"+wt}function Qr(De){return ie._shift!==void 0&&(De+=ie._shift),"M"+De+","+ie._offset+"v"+ie._length}function Ot(De,Ee,Ae){if(!De.showline||ge!==De._mainSubplot)return"";if(!De._anchorAxis)return Ae(De._mainLinePosition);var Ie=Ee(De._mainLinePosition);return De.mirror&&(Ie+=Ee(De._mainMirrorPosition)),Ie}for(ge in z._plots){de=z._plots[ge],W=de.xaxis,ie=de.yaxis;var $e="M0,0";k(W,ge)&&(Ye=A(W,"left",ie,J),ut=W._offset-(Ye?G+Ye:0),yt=A(W,"right",ie,J),Fe=W._offset+W._length+(yt?G+yt:0),Pe=se(W,ie,"bottom"),be=se(W,ie,"top"),Ur=!W._anchorAxis||ge!==W._mainSubplot,Ur&&(W.mirror==="allticks"||W.mirror==="all")&&(W._linepositions[ge]=[Pe,be]),$e=Ot(W,jr,fn),Ur&&W.showline&&(W.mirror==="all"||W.mirror==="allticks")&&($e+=jr(Pe)+jr(be)),de.xlines.style("stroke-width",W._lw+"px").call(r.stroke,W.showline?W.linecolor:"rgba(0,0,0,0)")),de.xlines.attr("d",$e);var ot="M0,0";k(ie,ge)&&(fr=A(ie,"bottom",W,J),wt=ie._offset+ie._length+(fr?G:0),mr=A(ie,"top",W,J),ht=ie._offset-(mr?G:0),Yt=se(ie,W,"left"),$t=se(ie,W,"right"),Ur=!ie._anchorAxis||ge!==ie._mainSubplot,Ur&&(ie.mirror==="allticks"||ie.mirror==="all")&&(ie._linepositions[ge]=[Yt,$t]),ot=Ot(ie,Br,Qr),Ur&&ie.showline&&(ie.mirror==="all"||ie.mirror==="allticks")&&(ot+=Br(Yt)+Br($t)),de.ylines.style("stroke-width",ie._lw+"px").call(r.stroke,ie.showline?ie.linecolor:"rgba(0,0,0,0)")),de.ylines.attr("d",ot)}return s.makeClipPaths(q),w.previousPromises(q)}function k(q,z){return(q.ticks||q.showline)&&(z===q._mainSubplot||q.mirror==="all"||q.mirror==="allticks")}function b(q,z,H){if(!H.showline||!H._lw)return!1;if(H.mirror==="all"||H.mirror==="allticks")return!0;var G=H._anchorAxis;if(!G)return!1;var J=o.FROM_BL[z];return H.side===z?G.domain[J]===q.domain[J]:H.mirror&&G.domain[1-J]===q.domain[1-J]}function A(q,z,H,G){if(b(q,z,H))return H._lw;for(var J=0;J<G.length;J++){var le=G[J];if(le._mainAxis===H._mainAxis&&b(q,z,le))return le._lw}return 0}te.drawMainTitle=function(q){var z=q._fullLayout.title,H=q._fullLayout,G=U(H),J=V(H),le=D(H,J),ge=N(H,G);if(l.draw(q,"gtitle",{propContainer:H,propName:"title.text",subtitlePropName:"title.subtitle.text",placeholder:H._dfltTitle.plot,subtitlePlaceholder:H._dfltTitle.subtitle,attributes:{x:ge,y:le,"text-anchor":G,dy:J}}),z.text&&z.automargin){var de=Z.select(q).selectAll(".gtitle"),me=a.bBox(Z.select(q).selectAll(".g-gtitle").node()).height,W=p(q,z,me);if(W>0){x(q,le,W,me),de.attr({x:ge,y:le,"text-anchor":G,dy:B(z.yanchor)}).call(P.positionText,ge,le);var ie=(z.text.match(P.BR_TAG_ALL)||[]).length;if(ie){var se=o.LINE_SPACING*ie+o.MID_SHIFT;z.y===0&&(se=-se),de.selectAll(".line").each(function(){var ce=+this.getAttribute("dy").slice(0,-2)-se+"em";this.setAttribute("dy",ce)})}var ee=Z.select(q).selectAll(".gtitle-subtitle");if(ee.node()){var pe=de.node().getBBox(),oe=pe.y+pe.height,Y=oe+l.SUBTITLE_PADDING_EM*z.subtitle.font.size;ee.attr({x:ge,y:Y,"text-anchor":G,dy:B(z.yanchor)}).call(P.positionText,ge,Y)}}}};function y(q,z,H,G,J){var le=z.yref==="paper"?q._fullLayout._size.h:q._fullLayout.height,ge=C.isTopAnchor(z)?G:G-J,de=H==="b"?le-ge:ge;return C.isTopAnchor(z)&&H==="t"||C.isBottomAnchor(z)&&H==="b"?!1:de<J}function f(q,z,H,G,J){var le=0;return H==="middle"&&(le+=J/2),q==="t"?(H==="top"&&(le+=J),le+=G-z*G):(H==="bottom"&&(le+=J),le+=z*G),le}function p(q,z,H){var G=z.y,J=z.yanchor,le=G>.5?"t":"b",ge=q._fullLayout.margin[le],de=0;return z.yref==="paper"?de=H+z.pad.t+z.pad.b:z.yref==="container"&&(de=f(le,G,J,q._fullLayout.height,H)+z.pad.t+z.pad.b),de>ge?de:0}function x(q,z,H,G){var J="title.automargin",le=q._fullLayout.title,ge=le.y>.5?"t":"b",de={x:le.x,y:le.y,t:0,b:0},me={};le.yref==="paper"&&y(q,le,ge,z,G)?de[ge]=H:le.yref==="container"&&(me[ge]=H,q._fullLayout._reservedMargin[J]=me),w.allowAutoMargin(q,J),w.autoMargin(q,J,de)}function N(q,z){var H=q.title,G=q._size,J=0;switch(z===m?J=H.pad.l:z===c&&(J=-H.pad.r),H.xref){case"paper":return G.l+G.w*H.x+J;case"container":default:return q.width*H.x+J}}function D(q,z){var H=q.title,G=q._size,J=0;if(z==="0em"||!z?J=-H.pad.b:z===o.CAP_SHIFT+"em"&&(J=H.pad.t),H.y==="auto")return G.t/2;switch(H.yref){case"paper":return G.t+G.h-G.h*H.y+J;case"container":default:return q.height-q.height*H.y+J}}function B(q){return q==="top"?o.CAP_SHIFT+.3+"em":q==="bottom"?"-0.3em":o.MID_SHIFT+"em"}function U(q){var z=q.title,H=E;return C.isRightAnchor(z)?H=c:C.isLeftAnchor(z)&&(H=m),H}function V(q){var z=q.title,H="0em";return C.isTopAnchor(z)?H=o.CAP_SHIFT+"em":C.isMiddleAnchor(z)&&(H=o.MID_SHIFT+"em"),H}te.doTraceStyle=function(q){var z=q.calcdata,H=[],G;for(G=0;G<z.length;G++){var J=z[G],le=J[0]||{},ge=le.trace||{},de=ge._module||{},me=de.arraysToCalcdata;me&&me(J,ge);var W=de.editStyle;W&&H.push({fn:W,cd0:le})}if(H.length){for(G=0;G<H.length;G++){var ie=H[G];ie.fn(q,ie.cd0)}t(q),te.redrawReglTraces(q)}return w.style(q),v.getComponentMethod("legend","draw")(q),w.previousPromises(q)},te.doColorBars=function(q){return v.getComponentMethod("colorbar","draw")(q),w.previousPromises(q)},te.layoutReplot=function(q){var z=q.layout;return q.layout=void 0,v.call("_doPlot",q,"",z)},te.doLegend=function(q){return v.getComponentMethod("legend","draw")(q),w.previousPromises(q)},te.doTicksRelayout=function(q){return s.draw(q,"redraw"),q._fullLayout._hasOnlyLargeSploms&&(v.subplotsRegistry.splom.updateGrid(q),t(q),te.redrawReglTraces(q)),te.drawMainTitle(q),w.previousPromises(q)},te.doModeBar=function(q){var z=q._fullLayout;i.manage(q);for(var H=0;H<z._basePlotModules.length;H++){var G=z._basePlotModules[H].updateFx;G&&G(q)}return w.previousPromises(q)},te.doCamera=function(q){for(var z=q._fullLayout,H=z._subplots.gl3d,G=0;G<H.length;G++){var J=z[H[G]],le=J._scene;le.setViewport(J)}},te.drawData=function(q){var z=q._fullLayout;t(q);for(var H=z._basePlotModules,G=0;G<H.length;G++)H[G].plot(q);return te.redrawReglTraces(q),w.style(q),v.getComponentMethod("selections","draw")(q),v.getComponentMethod("shapes","draw")(q),v.getComponentMethod("annotations","draw")(q),v.getComponentMethod("images","draw")(q),z._replotting=!1,w.previousPromises(q)},te.redrawReglTraces=function(q){var z=q._fullLayout;if(z._has("regl")){var H=q._fullData,G=[],J=[],le,ge;for(z._hasOnlyLargeSploms&&z._splomGrid.draw(),le=0;le<H.length;le++){var de=H[le];de.visible===!0&&de._length!==0&&(de.type==="splom"?z._splomScenes[de.uid].draw():de.type==="scattergl"?C.pushUnique(G,de.xaxis+de.yaxis):de.type==="scatterpolargl"&&C.pushUnique(J,de.subplot))}for(le=0;le<G.length;le++)ge=z._plots[G[le]],ge._scene&&ge._scene.draw();for(le=0;le<J.length;le++)ge=z[J[le]]._subplot,ge._scene&&ge._scene.draw()}},te.doAutoRangeAndConstraints=function(q){for(var z=s.list(q,"",!0),H,G={},J=0;J<z.length;J++)if(H=z[J],!G[H._id]){G[H._id]=1,h(q,H),g(q,H);var le=H._matchGroup;if(le)for(var ge in le){var de=s.getFromId(q,ge);g(q,de,H.range),G[ge]=1}}d(q)},te.finalDraw=function(q){v.getComponentMethod("rangeslider","draw")(q),v.getComponentMethod("rangeselector","draw")(q)},te.drawMarginPushers=function(q){v.getComponentMethod("legend","draw")(q),v.getComponentMethod("rangeselector","draw")(q),v.getComponentMethod("sliders","draw")(q),v.getComponentMethod("updatemenus","draw")(q),v.getComponentMethod("colorbar","draw")(q)}}}),gM=Ne({"src/components/selections/draw.js"(te,Z){var v=om().readPaths,w=Sy(),C=xg().clearOutlineControllers,P=Ha(),t=zs(),r=Cu().arrayEditor,a=Sg(),l=a.getPathString;Z.exports={draw:i,drawOne:o,activateLastSelection:h};function i(m){var E=m._fullLayout;C(m),E._selectionLayer.selectAll("path").remove();for(var c in E._plots){var _=E._plots[c].selectionLayer;_&&_.selectAll("path").remove()}for(var T=0;T<E.selections.length;T++)o(m,T)}function s(m){return m._context.editSelection}function o(m,E){m._fullLayout._paperdiv.selectAll('.selectionlayer [data-index="'+E+'"]').remove();var c=a.makeSelectionsOptionsAndPlotinfo(m,E),_=c.options,T=c.plotinfo;if(!_._input)return;M(m._fullLayout._selectionLayer);function M(k){var b=l(m,_),A={"data-index":E,"fill-rule":"evenodd",d:b},y=_.opacity,f="rgba(0,0,0,0)",p=_.line.color||P.contrast(m._fullLayout.plot_bgcolor),x=_.line.width,N=_.line.dash;x||(x=5,N="solid");var D=s(m)&&m._fullLayout._activeSelectionIndex===E;D&&(f=m._fullLayout.activeselection.fillcolor,y=m._fullLayout.activeselection.opacity);for(var B=[],U=1;U>=0;U--){var V=k.append("path").attr(A).style("opacity",U?.1:y).call(P.stroke,p).call(P.fill,f).call(t.dashLine,U?"solid":N,U?4+x:x);if(u(V,m,_),D){var q=r(m.layout,"selections",_);V.style({cursor:"move"});var z={element:V.node(),plotinfo:T,gd:m,editHelpers:q,isActiveSelection:!0},H=v(b,m);w(H,V,z)}else V.style("pointer-events",U?"all":"none");B[U]=V}var G=B[0],J=B[1];J.node().addEventListener("click",function(){return d(m,G)})}}function u(m,E,c){var _=c.xref+c.yref;t.setClipUrl(m,"clip"+E._fullLayout._uid+_,E)}function d(m,E){if(s(m)){var c=E.node(),_=+c.getAttribute("data-index");if(_>=0){if(_===m._fullLayout._activeSelectionIndex){g(m);return}m._fullLayout._activeSelectionIndex=_,m._fullLayout._deactivateSelection=g,i(m)}}}function h(m){if(s(m)){var E=m._fullLayout.selections.length-1;m._fullLayout._activeSelectionIndex=E,m._fullLayout._deactivateSelection=g,i(m)}}function g(m){if(s(m)){var E=m._fullLayout._activeSelectionIndex;E>=0&&(C(m),delete m._fullLayout._activeSelectionIndex,i(m))}}}}),DL=Ne({"node_modules/polybooljs/lib/build-log.js"(te,Z){function v(){var w,C=0,P=!1;function t(r,a){return w.list.push({type:r,data:a?JSON.parse(JSON.stringify(a)):void 0}),w}return w={list:[],segmentId:function(){return C++},checkIntersection:function(r,a){return t("check",{seg1:r,seg2:a})},segmentChop:function(r,a){return t("div_seg",{seg:r,pt:a}),t("chop",{seg:r,pt:a})},statusRemove:function(r){return t("pop_seg",{seg:r})},segmentUpdate:function(r){return t("seg_update",{seg:r})},segmentNew:function(r,a){return t("new_seg",{seg:r,primary:a})},segmentRemove:function(r){return t("rem_seg",{seg:r})},tempStatus:function(r,a,l){return t("temp_status",{seg:r,above:a,below:l})},rewind:function(r){return t("rewind",{seg:r})},status:function(r,a,l){return t("status",{seg:r,above:a,below:l})},vert:function(r){return r===P?w:(P=r,t("vert",{x:r}))},log:function(r){return typeof r!="string"&&(r=JSON.stringify(r,!1,"  ")),t("log",{txt:r})},reset:function(){return t("reset")},selected:function(r){return t("selected",{segs:r})},chainStart:function(r){return t("chain_start",{seg:r})},chainRemoveHead:function(r,a){return t("chain_rem_head",{index:r,pt:a})},chainRemoveTail:function(r,a){return t("chain_rem_tail",{index:r,pt:a})},chainNew:function(r,a){return t("chain_new",{pt1:r,pt2:a})},chainMatch:function(r){return t("chain_match",{index:r})},chainClose:function(r){return t("chain_close",{index:r})},chainAddHead:function(r,a){return t("chain_add_head",{index:r,pt:a})},chainAddTail:function(r,a){return t("chain_add_tail",{index:r,pt:a})},chainConnect:function(r,a){return t("chain_con",{index1:r,index2:a})},chainReverse:function(r){return t("chain_rev",{index:r})},chainJoin:function(r,a){return t("chain_join",{index1:r,index2:a})},done:function(){return t("done")}},w}Z.exports=v}}),OL=Ne({"node_modules/polybooljs/lib/epsilon.js"(te,Z){function v(w){typeof w!="number"&&(w=1e-10);var C={epsilon:function(P){return typeof P=="number"&&(w=P),w},pointAboveOrOnLine:function(P,t,r){var a=t[0],l=t[1],i=r[0],s=r[1],o=P[0],u=P[1];return(i-a)*(u-l)-(s-l)*(o-a)>=-w},pointBetween:function(P,t,r){var a=P[1]-t[1],l=r[0]-t[0],i=P[0]-t[0],s=r[1]-t[1],o=i*l+a*s;if(o<w)return!1;var u=l*l+s*s;return!(o-u>-w)},pointsSameX:function(P,t){return Math.abs(P[0]-t[0])<w},pointsSameY:function(P,t){return Math.abs(P[1]-t[1])<w},pointsSame:function(P,t){return C.pointsSameX(P,t)&&C.pointsSameY(P,t)},pointsCompare:function(P,t){return C.pointsSameX(P,t)?C.pointsSameY(P,t)?0:P[1]<t[1]?-1:1:P[0]<t[0]?-1:1},pointsCollinear:function(P,t,r){var a=P[0]-t[0],l=P[1]-t[1],i=t[0]-r[0],s=t[1]-r[1];return Math.abs(a*s-i*l)<w},linesIntersect:function(P,t,r,a){var l=t[0]-P[0],i=t[1]-P[1],s=a[0]-r[0],o=a[1]-r[1],u=l*o-i*s;if(Math.abs(u)<w)return!1;var d=P[0]-r[0],h=P[1]-r[1],g=(s*h-o*d)/u,m=(l*h-i*d)/u,E={alongA:0,alongB:0,pt:[P[0]+g*l,P[1]+g*i]};return g<=-w?E.alongA=-2:g<w?E.alongA=-1:g-1<=-w?E.alongA=0:g-1<w?E.alongA=1:E.alongA=2,m<=-w?E.alongB=-2:m<w?E.alongB=-1:m-1<=-w?E.alongB=0:m-1<w?E.alongB=1:E.alongB=2,E},pointInsideRegion:function(P,t){for(var r=P[0],a=P[1],l=t[t.length-1][0],i=t[t.length-1][1],s=!1,o=0;o<t.length;o++){var u=t[o][0],d=t[o][1];d-a>w!=i-a>w&&(l-u)*(a-d)/(i-d)+u-r>w&&(s=!s),l=u,i=d}return s}};return C}Z.exports=v}}),zL=Ne({"node_modules/polybooljs/lib/linked-list.js"(te,Z){var v={create:function(){var w={root:{root:!0,next:null},exists:function(C){return!(C===null||C===w.root)},isEmpty:function(){return w.root.next===null},getHead:function(){return w.root.next},insertBefore:function(C,P){for(var t=w.root,r=w.root.next;r!==null;){if(P(r)){C.prev=r.prev,C.next=r,r.prev.next=C,r.prev=C;return}t=r,r=r.next}t.next=C,C.prev=t,C.next=null},findTransition:function(C){for(var P=w.root,t=w.root.next;t!==null&&!C(t);)P=t,t=t.next;return{before:P===w.root?null:P,after:t,insert:function(r){return r.prev=P,r.next=t,P.next=r,t!==null&&(t.prev=r),r}}}};return w},node:function(w){return w.prev=null,w.next=null,w.remove=function(){w.prev.next=w.next,w.next&&(w.next.prev=w.prev),w.prev=null,w.next=null},w}};Z.exports=v}}),Hp=Ne({"node_modules/polybooljs/lib/intersecter.js"(te,Z){var v=zL();function w(C,P,t){function r(E,c){return{id:t?t.segmentId():-1,start:E,end:c,myFill:{above:null,below:null},otherFill:null}}function a(E,c,_){return{id:t?t.segmentId():-1,start:E,end:c,myFill:{above:_.myFill.above,below:_.myFill.below},otherFill:null}}var l=v.create();function i(E,c,_,T,M,k){var b=P.pointsCompare(c,M);return b!==0?b:P.pointsSame(_,k)?0:E!==T?E?1:-1:P.pointAboveOrOnLine(_,T?M:k,T?k:M)?1:-1}function s(E,c){l.insertBefore(E,function(_){var T=i(E.isStart,E.pt,c,_.isStart,_.pt,_.other.pt);return T<0})}function o(E,c){var _=v.node({isStart:!0,pt:E.start,seg:E,primary:c,other:null,status:null});return s(_,E.end),_}function u(E,c,_){var T=v.node({isStart:!1,pt:c.end,seg:c,primary:_,other:E,status:null});E.other=T,s(T,E.pt)}function d(E,c){var _=o(E,c);return u(_,E,c),_}function h(E,c){t&&t.segmentChop(E.seg,c),E.other.remove(),E.seg.end=c,E.other.pt=c,s(E.other,E.pt)}function g(E,c){var _=a(c,E.seg.end,E.seg);return h(E,c),d(_,E.primary)}function m(E,c){var _=v.create();function T(V,q){var z=V.seg.start,H=V.seg.end,G=q.seg.start,J=q.seg.end;return P.pointsCollinear(z,G,J)?P.pointsCollinear(H,G,J)||P.pointAboveOrOnLine(H,G,J)?1:-1:P.pointAboveOrOnLine(z,G,J)?1:-1}function M(V){return _.findTransition(function(q){var z=T(V,q.ev);return z>0})}function k(V,q){var z=V.seg,H=q.seg,G=z.start,J=z.end,le=H.start,ge=H.end;t&&t.checkIntersection(z,H);var de=P.linesIntersect(G,J,le,ge);if(de===!1){if(!P.pointsCollinear(G,J,le)||P.pointsSame(G,ge)||P.pointsSame(J,le))return!1;var me=P.pointsSame(G,le),W=P.pointsSame(J,ge);if(me&&W)return q;var ie=!me&&P.pointBetween(G,le,ge),se=!W&&P.pointBetween(J,le,ge);if(me)return se?g(q,J):g(V,ge),q;ie&&(W||(se?g(q,J):g(V,ge)),g(q,G))}else de.alongA===0&&(de.alongB===-1?g(V,le):de.alongB===0?g(V,de.pt):de.alongB===1&&g(V,ge)),de.alongB===0&&(de.alongA===-1?g(q,G):de.alongA===0?g(q,de.pt):de.alongA===1&&g(q,J));return!1}for(var b=[];!l.isEmpty();){var A=l.getHead();if(t&&t.vert(A.pt[0]),A.isStart){let V=function(){if(f){var q=k(A,f);if(q)return q}return p?k(A,p):!1};t&&t.segmentNew(A.seg,A.primary);var y=M(A),f=y.before?y.before.ev:null,p=y.after?y.after.ev:null;t&&t.tempStatus(A.seg,f?f.seg:!1,p?p.seg:!1);var x=V();if(x){if(C){var N;A.seg.myFill.below===null?N=!0:N=A.seg.myFill.above!==A.seg.myFill.below,N&&(x.seg.myFill.above=!x.seg.myFill.above)}else x.seg.otherFill=A.seg.myFill;t&&t.segmentUpdate(x.seg),A.other.remove(),A.remove()}if(l.getHead()!==A){t&&t.rewind(A.seg);continue}if(C){var N;A.seg.myFill.below===null?N=!0:N=A.seg.myFill.above!==A.seg.myFill.below,p?A.seg.myFill.below=p.seg.myFill.above:A.seg.myFill.below=E,N?A.seg.myFill.above=!A.seg.myFill.below:A.seg.myFill.above=A.seg.myFill.below}else if(A.seg.otherFill===null){var D;p?A.primary===p.primary?D=p.seg.otherFill.above:D=p.seg.myFill.above:D=A.primary?c:E,A.seg.otherFill={above:D,below:D}}t&&t.status(A.seg,f?f.seg:!1,p?p.seg:!1),A.other.status=y.insert(v.node({ev:A}))}else{var B=A.status;if(B===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(_.exists(B.prev)&&_.exists(B.next)&&k(B.prev.ev,B.next.ev),t&&t.statusRemove(B.ev.seg),B.remove(),!A.primary){var U=A.seg.myFill;A.seg.myFill=A.seg.otherFill,A.seg.otherFill=U}b.push(A.seg)}l.getHead().remove()}return t&&t.done(),b}return C?{addRegion:function(E){for(var c,_=E[E.length-1],T=0;T<E.length;T++){c=_,_=E[T];var M=P.pointsCompare(c,_);M!==0&&d(r(M<0?c:_,M<0?_:c),!0)}},calculate:function(E){return m(E,!1)}}:{calculate:function(E,c,_,T){return E.forEach(function(M){d(a(M.start,M.end,M),!0)}),_.forEach(function(M){d(a(M.start,M.end,M),!1)}),m(c,T)}}}Z.exports=w}}),Cx=Ne({"node_modules/polybooljs/lib/segment-chainer.js"(te,Z){function v(w,C,P){var t=[],r=[];return w.forEach(function(a){var l=a.start,i=a.end;if(C.pointsSame(l,i)){console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");return}P&&P.chainStart(a);var s={index:0,matches_head:!1,matches_pt1:!1},o={index:0,matches_head:!1,matches_pt1:!1},u=s;function d(D,B,U){return u.index=D,u.matches_head=B,u.matches_pt1=U,u===s?(u=o,!1):(u=null,!0)}for(var h=0;h<t.length;h++){var g=t[h],m=g[0];g[1];var E=g[g.length-1];if(g[g.length-2],C.pointsSame(m,l)){if(d(h,!0,!0))break}else if(C.pointsSame(m,i)){if(d(h,!0,!1))break}else if(C.pointsSame(E,l)){if(d(h,!1,!0))break}else if(C.pointsSame(E,i)&&d(h,!1,!1))break}if(u===s){t.push([l,i]),P&&P.chainNew(l,i);return}if(u===o){P&&P.chainMatch(s.index);var c=s.index,_=s.matches_pt1?i:l,T=s.matches_head,g=t[c],M=T?g[0]:g[g.length-1],k=T?g[1]:g[g.length-2],b=T?g[g.length-1]:g[0],A=T?g[g.length-2]:g[1];if(C.pointsCollinear(k,M,_)&&(T?(P&&P.chainRemoveHead(s.index,_),g.shift()):(P&&P.chainRemoveTail(s.index,_),g.pop()),M=k),C.pointsSame(b,_)){t.splice(c,1),C.pointsCollinear(A,b,M)&&(T?(P&&P.chainRemoveTail(s.index,M),g.pop()):(P&&P.chainRemoveHead(s.index,M),g.shift())),P&&P.chainClose(s.index),r.push(g);return}T?(P&&P.chainAddHead(s.index,_),g.unshift(_)):(P&&P.chainAddTail(s.index,_),g.push(_));return}function y(D){P&&P.chainReverse(D),t[D].reverse()}function f(D,B){var U=t[D],V=t[B],q=U[U.length-1],z=U[U.length-2],H=V[0],G=V[1];C.pointsCollinear(z,q,H)&&(P&&P.chainRemoveTail(D,q),U.pop(),q=z),C.pointsCollinear(q,H,G)&&(P&&P.chainRemoveHead(B,H),V.shift()),P&&P.chainJoin(D,B),t[D]=U.concat(V),t.splice(B,1)}var p=s.index,x=o.index;P&&P.chainConnect(p,x);var N=t[p].length<t[x].length;s.matches_head?o.matches_head?N?(y(p),f(p,x)):(y(x),f(x,p)):f(x,p):o.matches_head?f(p,x):N?(y(p),f(x,p)):(y(x),f(p,x))}),r}Z.exports=v}}),yM=Ne({"node_modules/polybooljs/lib/segment-selector.js"(te,Z){function v(C,P,t){var r=[];return C.forEach(function(a){var l=(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[l]!==0&&r.push({id:t?t.segmentId():-1,start:a.start,end:a.end,myFill:{above:P[l]===1,below:P[l]===2},otherFill:null})}),t&&t.selected(r),r}var w={union:function(C,P){return v(C,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],P)},intersect:function(C,P){return v(C,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],P)},difference:function(C,P){return v(C,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],P)},differenceRev:function(C,P){return v(C,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],P)},xor:function(C,P){return v(C,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],P)}};Z.exports=w}}),_M=Ne({"node_modules/polybooljs/lib/geojson.js"(te,Z){var v={toPolygon:function(w,C){function P(a){if(a.length<=0)return w.segments({inverted:!1,regions:[]});function l(o){var u=o.slice(0,o.length-1);return w.segments({inverted:!1,regions:[u]})}for(var i=l(a[0]),s=1;s<a.length;s++)i=w.selectDifference(w.combine(i,l(a[s])));return i}if(C.type==="Polygon")return w.polygon(P(C.coordinates));if(C.type==="MultiPolygon"){for(var t=w.segments({inverted:!1,regions:[]}),r=0;r<C.coordinates.length;r++)t=w.selectUnion(w.combine(t,P(C.coordinates[r])));return w.polygon(t)}throw new Error("PolyBool: Cannot convert GeoJSON object to PolyBool polygon")},fromPolygon:function(w,C,P){P=w.polygon(w.segments(P));function t(g,m){return C.pointInsideRegion([(g[0][0]+g[1][0])*.5,(g[0][1]+g[1][1])*.5],m)}function r(g){return{region:g,children:[]}}var a=r(null);function l(g,m){for(var E=0;E<g.children.length;E++){var c=g.children[E];if(t(m,c.region)){l(c,m);return}}for(var _=r(m),E=0;E<g.children.length;E++){var c=g.children[E];t(c.region,m)&&(_.children.push(c),g.children.splice(E,1),E--)}g.children.push(_)}for(var i=0;i<P.regions.length;i++){var s=P.regions[i];s.length<3||l(a,s)}function o(g,m){for(var E=0,c=g[g.length-1][0],_=g[g.length-1][1],T=[],M=0;M<g.length;M++){var k=g[M][0],b=g[M][1];T.push([k,b]),E+=b*c-k*_,c=k,_=b}var A=E<0;return A!==m&&T.reverse(),T.push([T[0][0],T[0][1]]),T}var u=[];function d(g){var m=[o(g.region,!1)];u.push(m);for(var E=0;E<g.children.length;E++)m.push(h(g.children[E]))}function h(g){for(var m=0;m<g.children.length;m++)d(g.children[m]);return o(g.region,!0)}for(var i=0;i<a.children.length;i++)d(a.children[i]);return u.length<=0?{type:"Polygon",coordinates:[]}:u.length==1?{type:"Polygon",coordinates:u[0]}:{type:"MultiPolygon",coordinates:u}}};Z.exports=v}}),xM=Ne({"node_modules/polybooljs/index.js"(te,Z){var v=DL(),w=OL(),C=Hp(),P=Cx(),t=yM(),r=_M(),a=!1,l=w(),i;i={buildLog:function(o){return o===!0?a=v():o===!1&&(a=!1),a===!1?!1:a.list},epsilon:function(o){return l.epsilon(o)},segments:function(o){var u=C(!0,l,a);return o.regions.forEach(u.addRegion),{segments:u.calculate(o.inverted),inverted:o.inverted}},combine:function(o,u){var d=C(!1,l,a);return{combined:d.calculate(o.segments,o.inverted,u.segments,u.inverted),inverted1:o.inverted,inverted2:u.inverted}},selectUnion:function(o){return{segments:t.union(o.combined,a),inverted:o.inverted1||o.inverted2}},selectIntersect:function(o){return{segments:t.intersect(o.combined,a),inverted:o.inverted1&&o.inverted2}},selectDifference:function(o){return{segments:t.difference(o.combined,a),inverted:o.inverted1&&!o.inverted2}},selectDifferenceRev:function(o){return{segments:t.differenceRev(o.combined,a),inverted:!o.inverted1&&o.inverted2}},selectXor:function(o){return{segments:t.xor(o.combined,a),inverted:o.inverted1!==o.inverted2}},polygon:function(o){return{regions:P(o.segments,l,a),inverted:o.inverted}},polygonFromGeoJSON:function(o){return r.toPolygon(i,o)},polygonToGeoJSON:function(o){return r.fromPolygon(i,l,o)},union:function(o,u){return s(o,u,i.selectUnion)},intersect:function(o,u){return s(o,u,i.selectIntersect)},difference:function(o,u){return s(o,u,i.selectDifference)},differenceRev:function(o,u){return s(o,u,i.selectDifferenceRev)},xor:function(o,u){return s(o,u,i.selectXor)}};function s(o,u,d){var h=i.segments(o),g=i.segments(u),m=i.combine(h,g),E=d(m);return i.polygon(E)}typeof window=="object"&&(window.PolyBool=i),Z.exports=i}}),bM=Ne({"node_modules/point-in-polygon/nested.js"(te,Z){Z.exports=function(w,C,P,t){var r=w[0],a=w[1],l=!1;P===void 0&&(P=0),t===void 0&&(t=C.length);for(var i=t-P,s=0,o=i-1;s<i;o=s++){var u=C[s+P][0],d=C[s+P][1],h=C[o+P][0],g=C[o+P][1],m=d>a!=g>a&&r<(h-u)*(a-d)/(g-d)+u;m&&(l=!l)}return l}}}),j1=Ne({"src/lib/polygon.js"(te,Z){var v=qp().dot,w=da().BADNUM,C=Z.exports={};C.tester=function(t){var r=t.slice(),a=r[0][0],l=a,i=r[0][1],s=i,o;for((r[r.length-1][0]!==r[0][0]||r[r.length-1][1]!==r[0][1])&&r.push(r[0]),o=1;o<r.length;o++)a=Math.min(a,r[o][0]),l=Math.max(l,r[o][0]),i=Math.min(i,r[o][1]),s=Math.max(s,r[o][1]);var u=!1,d;r.length===5&&(r[0][0]===r[1][0]?r[2][0]===r[3][0]&&r[0][1]===r[3][1]&&r[1][1]===r[2][1]&&(u=!0,d=function(c){return c[0]===r[0][0]}):r[0][1]===r[1][1]&&r[2][1]===r[3][1]&&r[0][0]===r[3][0]&&r[1][0]===r[2][0]&&(u=!0,d=function(c){return c[1]===r[0][1]}));function h(c,_){var T=c[0],M=c[1];return!(T===w||T<a||T>l||M===w||M<i||M>s||_&&d(c))}function g(c,_){var T=c[0],M=c[1];if(T===w||T<a||T>l||M===w||M<i||M>s)return!1;var k=r.length,b=r[0][0],A=r[0][1],y=0,f,p,x,N,D;for(f=1;f<k;f++)if(p=b,x=A,b=r[f][0],A=r[f][1],N=Math.min(p,b),!(T<N||T>Math.max(p,b)||M>Math.max(x,A)))if(M<Math.min(x,A))T!==N&&y++;else{if(b===p?D=M:D=x+(T-p)*(A-x)/(b-p),M===D)return!(f===1&&_);M<=D&&T!==N&&y++}return y%2===1}var m=!0,E=r[0];for(o=1;o<r.length;o++)if(E[0]!==r[o][0]||E[1]!==r[o][1]){m=!1;break}return{xmin:a,xmax:l,ymin:i,ymax:s,pts:r,contains:u?h:g,isRect:u,degenerate:m}},C.isSegmentBent=function(t,r,a,l){var i=t[r],s=[t[a][0]-i[0],t[a][1]-i[1]],o=v(s,s),u=Math.sqrt(o),d=[-s[1]/u,s[0]/u],h,g,m;for(h=r+1;h<a;h++)if(g=[t[h][0]-i[0],t[h][1]-i[1]],m=v(g,s),m<0||m>o||Math.abs(v(g,d))>l)return!0;return!1},C.filter=function(t,r){var a=[t[0]],l=0,i=0;function s(u){t.push(u);var d=a.length,h=l;a.splice(i+1);for(var g=h+1;g<t.length;g++)(g===t.length-1||C.isSegmentBent(t,h,g+1,r))&&(a.push(t[g]),a.length<d-2&&(l=g,i=a.length-1),h=g)}if(t.length>1){var o=t.pop();s(o)}return{addPt:s,raw:t,filtered:a}}}}),NL=Ne({"src/components/selections/constants.js"(te,Z){Z.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}}}),U1=Ne({"src/components/selections/select.js"(te,Z){var v=xM(),w=bM(),C=Yo(),P=zs().dashStyle,t=Ha(),r=oh(),a=bv().makeEventData,l=Pm(),i=l.freeMode,s=l.rectMode,o=l.drawMode,u=l.openMode,d=l.selectMode,h=Sg(),g=Bw(),m=Sy(),E=xg().clearOutline,c=om(),_=c.handleEllipse,T=c.readPaths,M=sA().newShapes,k=vM(),b=gM().activateLastSelection,A=In(),y=A.sorterAsc,f=j1(),p=N0(),x=Wf().getFromId,N=Ex(),D=jw().redrawReglTraces,B=NL(),U=B.MINSELECT,V=f.filter,q=f.tester,z=Fw(),H=z.p2r,G=z.axValue,J=z.getTransform;function le($e){return $e.subplot!==void 0}function ge($e,ot,De,Ee,Ae){var Ie=!le(Ee),tt=i(Ae),st=s(Ae),Bt=u(Ae),Ft=o(Ae),Wt=d(Ae),lr=Ae==="drawline",Rr=Ae==="drawcircle",Mr=lr||Rr,Sr=Ee.gd,Kr=Sr._fullLayout,Hn=Wt&&Kr.newselection.mode==="immediate"&&Ie,ga=Kr._zoomlayer,ua=Ee.element.getBoundingClientRect(),Ta=Ee.plotinfo,Aa=J(Ta),ia=ot-ua.left,$a=De-ua.top;Kr._calcInverseTransform(Sr);var ci=A.apply3DTransform(Kr._invTransform)(ia,$a);ia=ci[0],$a=ci[1];var _r=Kr._invScaleX,Qt=Kr._invScaleY,yr=ia,br=$a,an="M"+ia+","+$a,wn=Ee.xaxes[0],Ln=Ee.yaxes[0],Bn=wn._length,xa=Ln._length,za=$e.altKey&&!(o(Ae)&&Bt),Ia,Ba,Ka,fa,Bi,Yi,Ht;ee($e,Sr,Ee),tt&&(Ia=V([[ia,$a]],B.BENDPX));var kt=ga.selectAll("path.select-outline-"+Ta.id).data([1]),qr=Ft?Kr.newshape:Kr.newselection;Ft&&(Ee.hasText=qr.label.text||qr.label.texttemplate);var en=Ft&&!Bt?qr.fillcolor:"rgba(0,0,0,0)",rn=qr.line.color||(Ie?t.contrast(Sr._fullLayout.plot_bgcolor):"#7f7f7f");kt.enter().append("path").attr("class","select-outline select-outline-"+Ta.id).style({opacity:Ft?qr.opacity/2:1,"stroke-dasharray":P(qr.line.dash,qr.line.width),"stroke-width":qr.line.width+"px","shape-rendering":"crispEdges"}).call(t.stroke,rn).call(t.fill,en).attr("fill-rule","evenodd").classed("cursor-move",!!Ft).attr("transform",Aa).attr("d",an+"Z");var Wr=ga.append("path").attr("class","zoombox-corners").style({fill:t.background,stroke:t.defaultLine,"stroke-width":1}).attr("transform",Aa).attr("d","M0,0Z");if(Ft&&Ee.hasText){var tn=ga.select(".label-temp");tn.empty()&&(tn=ga.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var Tn=Kr._uid+B.SELECTID,dn=[],It=ue(Sr,Ee.xaxes,Ee.yaxes,Ee.subplot);Hn&&!$e.shiftKey&&(Ee._clearSubplotSelections=function(){if(Ie){var Yr=wn._id,An=Ln._id;wt(Sr,Yr,An,It);for(var Zn=(Sr.layout||{}).selections||[],sa=[],oa=!1,Sn=0;Sn<Zn.length;Sn++){var Kn=Kr.selections[Sn];!Kn||Kn.xref!==Yr||Kn.yref!==An?sa.push(Zn[Sn]):oa=!0}oa&&(Sr._fullLayout._noEmitSelectedAtStart=!0,C.call("_guiRelayout",Sr,{selections:sa}))}});var xr=fn(Ee);Ee.moveFn=function(Yr,An){Ee._clearSubplotSelections&&(Ee._clearSubplotSelections(),Ee._clearSubplotSelections=void 0),yr=Math.max(0,Math.min(Bn,_r*Yr+ia)),br=Math.max(0,Math.min(xa,Qt*An+$a));var Zn=Math.abs(yr-ia),sa=Math.abs(br-$a);if(st){var oa,Sn,Kn;if(Wt){var Ui=Kr.selectdirection;switch(Ui==="any"?sa<Math.min(Zn*.6,U)?oa="h":Zn<Math.min(sa*.6,U)?oa="v":oa="d":oa=Ui,oa){case"h":Sn=Rr?xa/2:0,Kn=xa;break;case"v":Sn=Rr?Bn/2:0,Kn=Bn;break}}if(Ft)switch(Kr.newshape.drawdirection){case"vertical":oa="h",Sn=Rr?xa/2:0,Kn=xa;break;case"horizontal":oa="v",Sn=Rr?Bn/2:0,Kn=Bn;break;case"ortho":Zn<sa?(oa="h",Sn=$a,Kn=br):(oa="v",Sn=ia,Kn=yr);break;default:oa="d"}oa==="h"?(fa=Mr?_(Rr,[yr,Sn],[yr,Kn]):[[ia,Sn],[ia,Kn],[yr,Kn],[yr,Sn]],fa.xmin=Mr?yr:Math.min(ia,yr),fa.xmax=Mr?yr:Math.max(ia,yr),fa.ymin=Math.min(Sn,Kn),fa.ymax=Math.max(Sn,Kn),Wr.attr("d","M"+fa.xmin+","+($a-U)+"h-4v"+2*U+"h4ZM"+(fa.xmax-1)+","+($a-U)+"h4v"+2*U+"h-4Z")):oa==="v"?(fa=Mr?_(Rr,[Sn,br],[Kn,br]):[[Sn,$a],[Sn,br],[Kn,br],[Kn,$a]],fa.xmin=Math.min(Sn,Kn),fa.xmax=Math.max(Sn,Kn),fa.ymin=Mr?br:Math.min($a,br),fa.ymax=Mr?br:Math.max($a,br),Wr.attr("d","M"+(ia-U)+","+fa.ymin+"v-4h"+2*U+"v4ZM"+(ia-U)+","+(fa.ymax-1)+"v4h"+2*U+"v-4Z")):oa==="d"&&(fa=Mr?_(Rr,[ia,$a],[yr,br]):[[ia,$a],[ia,br],[yr,br],[yr,$a]],fa.xmin=Math.min(ia,yr),fa.xmax=Math.max(ia,yr),fa.ymin=Math.min($a,br),fa.ymax=Math.max($a,br),Wr.attr("d","M0,0Z"))}else tt&&(Ia.addPt([yr,br]),fa=Ia.filtered);if(Ee.selectionDefs&&Ee.selectionDefs.length?(Ka=vt(Ee.mergedPolygons,fa,za),fa.subtract=za,Ba=se(Ee.selectionDefs.concat([fa]))):(Ka=[fa],Ba=q(fa)),m(Fe(Ka,Bt),kt,Ee),Wt){var Za=be(Sr,!1),Ki=Za.eventData?Za.eventData.points.slice():[];Za=be(Sr,!1,Ba,It,Ee),Ba=Za.selectionTesters,Ht=Za.eventData;var ho;Ia?ho=Ia.filtered:ho=mr(Ka),p.throttle(Tn,B.SELECTDELAY,function(){dn=Pe(Ba,It);for(var Co=dn.slice(),So=0;So<Ki.length;So++){for(var Vo=Ki[So],Oi=!1,ps=0;ps<Co.length;ps++)if(Co[ps].curveNumber===Vo.curveNumber&&Co[ps].pointNumber===Vo.pointNumber){Oi=!0;break}Oi||Co.push(Vo)}Co.length&&(Ht||(Ht={}),Ht.points=Co),xr(Ht,ho),Br(Sr,Ht)})}},Ee.clickFn=function(Yr,An){if(Wr.remove(),Sr._fullLayout._activeShapeIndex>=0){Sr._fullLayout._deactivateShape(Sr);return}if(!Ft){var Zn=Kr.clickmode;p.done(Tn).then(function(){if(p.clear(Tn),Yr===2){for(kt.remove(),Bi=0;Bi<It.length;Bi++)Yi=It[Bi],Yi._module.selectPoints(Yi,!1);if(mt(Sr,It),Y(Ee),Ot(Sr),It.length){var sa=It[0].xaxis,oa=It[0].yaxis;if(sa&&oa){for(var Sn=[],Kn=Sr._fullLayout.selections,Ui=0;Ui<Kn.length;Ui++){var Za=Kn[Ui];Za&&(Za.xref!==sa._id||Za.yref!==oa._id)&&Sn.push(Za)}Sn.length<Kn.length&&(Sr._fullLayout._noEmitSelectedAtStart=!0,C.call("_guiRelayout",Sr,{selections:Sn}))}}}else Zn.indexOf("select")>-1&&de(An,Sr,Ee.xaxes,Ee.yaxes,Ee.subplot,Ee,kt),Zn==="event"&&Qr(Sr,void 0);r.click(Sr,An,Ta.id)}).catch(A.error)}},Ee.doneFn=function(){Wr.remove(),p.done(Tn).then(function(){p.clear(Tn),!Hn&&fa&&Ee.selectionDefs&&(fa.subtract=za,Ee.selectionDefs.push(fa),Ee.mergedPolygons.length=0,[].push.apply(Ee.mergedPolygons,Ka)),(Hn||Ft)&&Y(Ee,Hn),Ee.doneFnCompleted&&Ee.doneFnCompleted(dn),Wt&&Qr(Sr,Ht)}).catch(A.error)}}function de($e,ot,De,Ee,Ae,Ie,tt){var st=ot._hoverdata,Bt=ot._fullLayout,Ft=Bt.clickmode,Wt=Ft.indexOf("event")>-1,lr=[],Rr,Mr,Sr,Kr,Hn,ga,ua,Ta,Aa,ia;if(Le(st)){ee($e,ot,Ie),Rr=ue(ot,De,Ee,Ae);var $a=ze(st,Rr),ci=$a.pointNumbers.length>0;if(ci?Ve(Rr,$a):rt(Rr)&&(ua=Xe($a))){for(tt&&tt.remove(),ia=0;ia<Rr.length;ia++)Mr=Rr[ia],Mr._module.selectPoints(Mr,!1);mt(ot,Rr),Y(Ie),Wt&&Ot(ot)}else{Ta=$e.shiftKey&&(ua!==void 0?ua:Xe($a)),Sr=me($a.pointNumber,$a.searchInfo,Ta);var _r=Ie.selectionDefs.concat([Sr]);for(Kr=se(_r),ia=0;ia<Rr.length;ia++)if(Hn=Rr[ia]._module.selectPoints(Rr[ia],Kr),ga=ut(Hn,Rr[ia]),lr.length)for(var Qt=0;Qt<ga.length;Qt++)lr.push(ga[Qt]);else lr=ga;if(Aa={points:lr},mt(ot,Rr,Aa),Sr&&Ie&&Ie.selectionDefs.push(Sr),tt){var yr=Ie.mergedPolygons,br=u(Ie.dragmode);m(Fe(yr,br),tt,Ie)}Wt&&Qr(ot,Aa)}}}function me($e,ot,De){return{pointNumber:$e,searchInfo:ot,subtract:!!De}}function W($e){return"pointNumber"in $e&&"searchInfo"in $e}function ie($e){return{xmin:0,xmax:0,ymin:0,ymax:0,pts:[],contains:function(ot,De,Ee,Ae){var Ie=$e.searchInfo.cd[0].trace.index,tt=Ae.cd[0].trace.index;return tt===Ie&&Ee===$e.pointNumber},isRect:!1,degenerate:!1,subtract:!!$e.subtract}}function se($e){if(!$e.length)return;for(var ot=[],De=W($e[0])?0:$e[0][0][0],Ee=De,Ae=W($e[0])?0:$e[0][0][1],Ie=Ae,tt=0;tt<$e.length;tt++)if(W($e[tt]))ot.push(ie($e[tt]));else{var st=q($e[tt]);st.subtract=!!$e[tt].subtract,ot.push(st),De=Math.min(De,st.xmin),Ee=Math.max(Ee,st.xmax),Ae=Math.min(Ae,st.ymin),Ie=Math.max(Ie,st.ymax)}function Bt(Ft,Wt,lr,Rr){for(var Mr=!1,Sr=0;Sr<ot.length;Sr++)ot[Sr].contains(Ft,Wt,lr,Rr)&&(Mr=!ot[Sr].subtract);return Mr}return{xmin:De,xmax:Ee,ymin:Ae,ymax:Ie,pts:[],contains:Bt,isRect:!1,degenerate:!1}}function ee($e,ot,De){var Ee=ot._fullLayout,Ae=De.plotinfo,Ie=De.dragmode,tt=Ee._lastSelectedSubplot&&Ee._lastSelectedSubplot===Ae.id,st=($e.shiftKey||$e.altKey)&&!(o(Ie)&&u(Ie));tt&&st&&Ae.selection&&Ae.selection.selectionDefs&&!De.selectionDefs?(De.selectionDefs=Ae.selection.selectionDefs,De.mergedPolygons=Ae.selection.mergedPolygons):(!st||!Ae.selection)&&Y(De),tt||(E(ot),Ee._lastSelectedSubplot=Ae.id)}function pe($e){return $e._fullLayout._activeShapeIndex>=0}function oe($e){return $e._fullLayout._activeSelectionIndex>=0}function Y($e,ot){var De=$e.dragmode,Ee=$e.plotinfo,Ae=$e.gd;pe(Ae)&&Ae._fullLayout._deactivateShape(Ae),oe(Ae)&&Ae._fullLayout._deactivateSelection(Ae);var Ie=Ae._fullLayout,tt=Ie._zoomlayer,st=o(De),Bt=d(De);if(st||Bt){var Ft=tt.selectAll(".select-outline-"+Ee.id);if(Ft&&Ae._fullLayout._outlining){var Wt;st&&(Wt=M(Ft,$e)),Wt&&C.call("_guiRelayout",Ae,{shapes:Wt});var lr;Bt&&!le($e)&&(lr=k(Ft,$e)),lr&&(Ae._fullLayout._noEmitSelectedAtStart=!0,C.call("_guiRelayout",Ae,{selections:lr}).then(function(){ot&&b(Ae)})),Ae._fullLayout._outlining=!1}}Ee.selection={},Ee.selection.selectionDefs=$e.selectionDefs=[],Ee.selection.mergedPolygons=$e.mergedPolygons=[]}function ce($e){return $e._id}function ue($e,ot,De,Ee){if(!$e.calcdata)return[];var Ae=[],Ie=ot.map(ce),tt=De.map(ce),st,Bt,Ft;for(Ft=0;Ft<$e.calcdata.length;Ft++)if(st=$e.calcdata[Ft],Bt=st[0].trace,!(Bt.visible!==!0||!Bt._module||!Bt._module.selectPoints))if(le({subplot:Ee})&&(Bt.subplot===Ee||Bt.geo===Ee))Ae.push(_e(Bt._module,st,ot[0],De[0]));else if(Bt.type==="splom"){if(Bt._xaxes[Ie[0]]&&Bt._yaxes[tt[0]]){var Wt=_e(Bt._module,st,ot[0],De[0]);Wt.scene=$e._fullLayout._splomScenes[Bt.uid],Ae.push(Wt)}}else if(Bt.type==="sankey"){var lr=_e(Bt._module,st,ot[0],De[0]);Ae.push(lr)}else{if(Ie.indexOf(Bt.xaxis)===-1&&(!Bt._xA||!Bt._xA.overlaying)||tt.indexOf(Bt.yaxis)===-1&&(!Bt._yA||!Bt._yA.overlaying))continue;Ae.push(_e(Bt._module,st,x($e,Bt.xaxis),x($e,Bt.yaxis)))}return Ae}function _e($e,ot,De,Ee){return{_module:$e,cd:ot,xaxis:De,yaxis:Ee}}function Le($e){return $e&&Array.isArray($e)&&$e[0].hoverOnBox!==!0}function ze($e,ot){var De=$e[0],Ee=-1,Ae=[],Ie,tt;for(tt=0;tt<ot.length;tt++)if(Ie=ot[tt],De.fullData.index===Ie.cd[0].trace.index){if(De.hoverOnBox===!0)break;De.pointNumber!==void 0?Ee=De.pointNumber:De.binNumber!==void 0&&(Ee=De.binNumber,Ae=De.pointNumbers);break}return{pointNumber:Ee,pointNumbers:Ae,searchInfo:Ie}}function Xe($e){var ot=$e.searchInfo.cd[0].trace,De=$e.pointNumber,Ee=$e.pointNumbers,Ae=Ee.length>0,Ie=Ae?Ee[0]:De;return ot.selectedpoints?ot.selectedpoints.indexOf(Ie)>-1:!1}function Ve($e,ot){var De=[],Ee,Ae,Ie,tt;for(tt=0;tt<$e.length;tt++)Ee=$e[tt],Ee.cd[0].trace.selectedpoints&&Ee.cd[0].trace.selectedpoints.length>0&&De.push(Ee);if(De.length===1&&(Ie=De[0]===ot.searchInfo,Ie&&(Ae=ot.searchInfo.cd[0].trace,Ae.selectedpoints.length===ot.pointNumbers.length))){for(tt=0;tt<ot.pointNumbers.length;tt++)if(Ae.selectedpoints.indexOf(ot.pointNumbers[tt])<0)return!1;return!0}return!1}function rt($e){var ot=0,De,Ee,Ae;for(Ae=0;Ae<$e.length;Ae++)if(De=$e[Ae],Ee=De.cd[0].trace,Ee.selectedpoints&&(Ee.selectedpoints.length>1||(ot+=Ee.selectedpoints.length,ot>1)))return!1;return ot===1}function mt($e,ot,De){var Ee;for(Ee=0;Ee<ot.length;Ee++){var Ae=ot[Ee].cd[0].trace._fullInput,Ie=$e._fullLayout._tracePreGUI[Ae.uid]||{};Ie.selectedpoints===void 0&&(Ie.selectedpoints=Ae._input.selectedpoints||null)}var tt;if(De){var st=De.points||[];for(Ee=0;Ee<ot.length;Ee++)tt=ot[Ee].cd[0].trace,tt._input.selectedpoints=tt._fullInput.selectedpoints=[],tt._fullInput!==tt&&(tt.selectedpoints=[]);for(var Bt=0;Bt<st.length;Bt++){var Ft=st[Bt],Wt=Ft.data,lr=Ft.fullData,Rr=Ft.pointIndex,Mr=Ft.pointIndices;Mr?([].push.apply(Wt.selectedpoints,Mr),tt._fullInput!==tt&&[].push.apply(lr.selectedpoints,Mr)):(Wt.selectedpoints.push(Rr),tt._fullInput!==tt&&lr.selectedpoints.push(Rr))}}else for(Ee=0;Ee<ot.length;Ee++)tt=ot[Ee].cd[0].trace,delete tt.selectedpoints,delete tt._input.selectedpoints,tt._fullInput!==tt&&delete tt._fullInput.selectedpoints;_t($e,ot)}function _t($e,ot){for(var De=!1,Ee=0;Ee<ot.length;Ee++){var Ae=ot[Ee],Ie=Ae.cd;C.traceIs(Ie[0].trace,"regl")&&(De=!0);var tt=Ae._module,st=tt.styleOnSelect||tt.style;st&&(st($e,Ie,Ie[0].node3),Ie[0].nodeRangePlot3&&st($e,Ie,Ie[0].nodeRangePlot3))}De&&(N($e),D($e))}function vt($e,ot,De){for(var Ee=De?v.difference:v.union,Ae=Ee({regions:$e},{regions:[ot]}),Ie=Ae.regions.reverse(),tt=0;tt<Ie.length;tt++){var st=Ie[tt];st.subtract=$t(st,Ie.slice(0,tt))}return Ie}function ut($e,ot){if(Array.isArray($e))for(var De=ot.cd,Ee=ot.cd[0].trace,Ae=0;Ae<$e.length;Ae++)$e[Ae]=a($e[Ae],Ee,De);return $e}function Fe($e,ot){for(var De=[],Ee=0;Ee<$e.length;Ee++){De[Ee]=[];for(var Ae=0;Ae<$e[Ee].length;Ae++){De[Ee][Ae]=[],De[Ee][Ae][0]=Ae?"L":"M";for(var Ie=0;Ie<$e[Ee][Ae].length;Ie++)De[Ee][Ae].push($e[Ee][Ae][Ie])}ot||De[Ee].push(["Z",De[Ee][0][1],De[Ee][0][2]])}return De}function Pe($e,ot){for(var De=[],Ee,Ae,Ie=0;Ie<ot.length;Ie++){var tt=ot[Ie];Ae=tt._module.selectPoints(tt,$e),Ee=ut(Ae,tt),De=De.concat(Ee)}return De}function be($e,ot,De,Ee,Ae){var Ie=!!Ee,tt,st,Bt;Ae&&(tt=Ae.plotinfo,st=Ae.xaxes[0]._id,Bt=Ae.yaxes[0]._id);var Ft=[],Wt=[],lr=Yt($e),Rr=$e._fullLayout;if(tt){var Mr=Rr._zoomlayer,Sr=Rr.dragmode,Kr=o(Sr),Hn=d(Sr);if(Kr||Hn){var ga=x($e,st,"x"),ua=x($e,Bt,"y");if(ga&&ua){var Ta=Mr.selectAll(".select-outline-"+tt.id);if(Ta&&$e._fullLayout._outlining&&Ta.length){for(var Aa=Ta[0][0],ia=Aa.getAttribute("d"),$a=T(ia,$e,tt),ci=[],_r=0;_r<$a.length;_r++){for(var Qt=$a[_r],yr=[],br=0;br<Qt.length;br++)yr.push([fr(ga,Qt[br][1]),fr(ua,Qt[br][2])]);yr.xref=st,yr.yref=Bt,yr.subtract=$t(yr,ci),ci.push(yr)}lr=lr.concat(ci)}}}}var an=st&&Bt?[st+Bt]:Rr._subplots.cartesian;Ye($e);for(var wn={},Ln=0;Ln<an.length;Ln++){var Bn=an[Ln],xa=Bn.indexOf("y"),za=Bn.slice(0,xa),Ia=Bn.slice(xa),Ba=st&&Bt?De:void 0;if(Ba=ht(lr,za,Ia,Ba),Ba){var Ka=Ee;if(!Ie){var fa=x($e,za,"x"),Bi=x($e,Ia,"y");Ka=ue($e,[fa],[Bi],Bn);for(var Yi=0;Yi<Ka.length;Yi++){var Ht=Ka[Yi],kt=Ht.cd[0],qr=kt.trace;if(Ht._module.name==="scattergl"&&!kt.t.xpx){var en=qr.x,rn=qr.y,Wr=qr._length;kt.t.xpx=[],kt.t.ypx=[];for(var tn=0;tn<Wr;tn++)kt.t.xpx[tn]=fa.c2p(en[tn]),kt.t.ypx[tn]=Bi.c2p(rn[tn])}Ht._module.name==="splom"&&(wn[qr.uid]||(wn[qr.uid]=!0))}}var Tn=Pe(Ba,Ka);Ft=Ft.concat(Tn),Wt=Wt.concat(Ka)}}var dn={points:Ft};mt($e,Wt,dn);var It=Rr.clickmode,xr=It.indexOf("event")>-1&&ot;if(!tt&&ot){var Yr=Yt($e,!0);if(Yr.length){var An=Yr[0].xref,Zn=Yr[0].yref;if(An&&Zn){var sa=mr(Yr),oa=jr([x($e,An,"x"),x($e,Zn,"y")]);oa(dn,sa)}}$e._fullLayout._noEmitSelectedAtStart?$e._fullLayout._noEmitSelectedAtStart=!1:xr&&Qr($e,dn),Rr._reselect=!1}if(!tt&&Rr._deselect){var Sn=Rr._deselect;st=Sn.xref,Bt=Sn.yref,yt(st,Bt,Wt)||wt($e,st,Bt,Ee),xr&&(dn.points.length?Qr($e,dn):Ot($e)),Rr._deselect=!1}return{eventData:dn,selectionTesters:De}}function Ye($e){var ot=$e.calcdata;if(ot)for(var De=0;De<ot.length;De++){var Ee=ot[De][0],Ae=Ee.trace,Ie=$e._fullLayout._splomScenes;if(Ie){var tt=Ie[Ae.uid];tt&&(tt.selectBatch=[])}}}function yt($e,ot,De){for(var Ee=0;Ee<De.length;Ee++){var Ae=De[Ee];if(Ae.xaxis&&Ae.xaxis._id===$e&&Ae.yaxis&&Ae.yaxis._id===ot)return!0}return!1}function wt($e,ot,De,Ee){Ee=ue($e,[x($e,ot,"x")],[x($e,De,"y")],ot+De);for(var Ae=0;Ae<Ee.length;Ae++){var Ie=Ee[Ae];Ie._module.selectPoints(Ie,!1)}mt($e,Ee)}function ht($e,ot,De,Ee){for(var Ae,Ie=0;Ie<$e.length;Ie++){var tt=$e[Ie];if(!(ot!==tt.xref||De!==tt.yref))if(Ae){var st=!!tt.subtract;Ae=vt(Ae,tt,st),Ee=se(Ae)}else Ae=[tt],Ee=q(tt)}return Ee}function Yt($e,ot){for(var De=[],Ee=$e._fullLayout,Ae=Ee.selections,Ie=Ae.length,tt=0;tt<Ie;tt++)if(!(ot&&tt!==Ee._activeSelectionIndex)){var st=Ae[tt];if(st){var Bt=st.xref,Ft=st.yref,Wt=x($e,Bt,"x"),lr=x($e,Ft,"y"),Rr,Mr,Sr,Kr,Hn;if(st.type==="rect"){Hn=[];var ga=fr(Wt,st.x0),ua=fr(Wt,st.x1),Ta=fr(lr,st.y0),Aa=fr(lr,st.y1);Hn=[[ga,Ta],[ga,Aa],[ua,Aa],[ua,Ta]],Rr=Math.min(ga,ua),Mr=Math.max(ga,ua),Sr=Math.min(Ta,Aa),Kr=Math.max(Ta,Aa),Hn.xmin=Rr,Hn.xmax=Mr,Hn.ymin=Sr,Hn.ymax=Kr,Hn.xref=Bt,Hn.yref=Ft,Hn.subtract=!1,Hn.isRect=!0,De.push(Hn)}else if(st.type==="path")for(var ia=st.path.split("Z"),$a=[],ci=0;ci<ia.length;ci++){var _r=ia[ci];if(_r){_r+="Z";var Qt=h.extractPathCoords(_r,g.paramIsX,"raw"),yr=h.extractPathCoords(_r,g.paramIsY,"raw");Rr=1/0,Mr=-1/0,Sr=1/0,Kr=-1/0,Hn=[];for(var br=0;br<Qt.length;br++){var an=fr(Wt,Qt[br]),wn=fr(lr,yr[br]);Hn.push([an,wn]),Rr=Math.min(an,Rr),Mr=Math.max(an,Mr),Sr=Math.min(wn,Sr),Kr=Math.max(wn,Kr)}Hn.xmin=Rr,Hn.xmax=Mr,Hn.ymin=Sr,Hn.ymax=Kr,Hn.xref=Bt,Hn.yref=Ft,Hn.subtract=$t(Hn,$a),$a.push(Hn),De.push(Hn)}}}}return De}function $t($e,ot){for(var De=!1,Ee=0;Ee<ot.length;Ee++)for(var Ae=ot[Ee],Ie=0;Ie<$e.length;Ie++)if(w($e[Ie],Ae)){De=!De;break}return De}function fr($e,ot){return $e.type==="date"&&(ot=ot.replace("_"," ")),$e.type==="log"?$e.c2p(ot):$e.r2p(ot,null,$e.calendar)}function mr($e){for(var ot=$e.length,De=[],Ee=0;Ee<ot;Ee++){var Ae=$e[Ee];De=De.concat(Ae),De=De.concat([Ae[0]])}return Ur(De)}function Ur($e){return $e.isRect=$e.length===5&&$e[0][0]===$e[4][0]&&$e[0][1]===$e[4][1]&&$e[0][0]===$e[1][0]&&$e[2][0]===$e[3][0]&&$e[0][1]===$e[3][1]&&$e[1][1]===$e[2][1]||$e[0][1]===$e[1][1]&&$e[2][1]===$e[3][1]&&$e[0][0]===$e[3][0]&&$e[1][0]===$e[2][0],$e.isRect&&($e.xmin=Math.min($e[0][0],$e[2][0]),$e.xmax=Math.max($e[0][0],$e[2][0]),$e.ymin=Math.min($e[0][1],$e[2][1]),$e.ymax=Math.max($e[0][1],$e[2][1])),$e}function jr($e){return function(ot,De){for(var Ee,Ae,Ie=0;Ie<$e.length;Ie++){var tt=$e[Ie],st=tt._id,Bt=st.charAt(0);if(De.isRect){Ee||(Ee={});var Ft=De[Bt+"min"],Wt=De[Bt+"max"];Ft!==void 0&&Wt!==void 0&&(Ee[st]=[H(tt,Ft),H(tt,Wt)].sort(y))}else Ae||(Ae={}),Ae[st]=De.map(G(tt))}Ee&&(ot.range=Ee),Ae&&(ot.lassoPoints=Ae)}}function fn($e){var ot=$e.plotinfo;return ot.fillRangeItems||jr($e.xaxes.concat($e.yaxes))}function Br($e,ot){$e.emit("plotly_selecting",ot)}function Qr($e,ot){ot&&(ot.selections=($e.layout||{}).selections||[]),$e.emit("plotly_selected",ot)}function Ot($e){$e.emit("plotly_deselect",null)}Z.exports={reselect:be,prepSelect:ge,clearOutline:E,clearSelectionsCache:Y,selectOnClick:de}}}),Uw=Ne({"src/components/annotations/arrow_paths.js"(te,Z){Z.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}]}}),Eg=Ne({"src/constants/axis_placeable_objects.js"(te,Z){Z.exports={axisRefDescription:function(v,w,C){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",w,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",w,"("+C+"). 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",w,"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",w,"and the",C,"of the domain of the","second",v,"axis."].join(" ")}}}}),Mg=Ne({"src/components/annotations/attributes.js"(te,Z){var v=Uw(),w=bo(),C=wh(),P=Cu().templatedArray;Eg(),Z.exports=P("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:w({editType:"calc+arraydraw",colorEditType:"arraydraw"}),width:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},height:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},align:{valType:"enumerated",values:["left","center","right"],dflt:"center",editType:"arraydraw"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"arraydraw"},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},borderpad:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},borderwidth:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},showarrow:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},arrowcolor:{valType:"color",editType:"arraydraw"},arrowhead:{valType:"integer",min:0,max:v.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:v.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",C.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",C.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",C.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",C.idRegex.y.toString()],editType:"calc"},y:{valType:"any",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto",editType:"calc+arraydraw"},yshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1,editType:"arraydraw"},xclick:{valType:"any",editType:"arraydraw"},yclick:{valType:"any",editType:"arraydraw"},hovertext:{valType:"string",editType:"arraydraw"},hoverlabel:{bgcolor:{valType:"color",editType:"arraydraw"},bordercolor:{valType:"color",editType:"arraydraw"},font:w({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc"})}}),i0=Ne({"src/traces/scatter/constants.js"(te,Z){Z.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}}}),qv=Ne({"src/traces/scatter/fillcolor_attribute.js"(te,Z){Z.exports=function(w){return{valType:"color",editType:"style",anim:!0}}}}),tf=Ne({"src/traces/scatter/attributes.js"(te,Z){var v=Ac().axisHoverFormat,{hovertemplateAttrs:w,texttemplateAttrs:C,templatefallbackAttrs:P}=Fl(),t=Wu(),r=bo(),a=Fd().dash,l=Fd().pattern,i=zs(),s=i0(),o=fi().extendFlat,u=qv();function d(m){return{valType:"any",dflt:0,editType:"calc"}}function h(m){return{valType:"any",editType:"calc"}}function g(m){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"}}Z.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:d(),yperiod:d(),xperiod0:h(),yperiod0:h(),xperiodalignment:g(),yperiodalignment:g(),xhoverformat:v("x"),yhoverformat:v("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:C(),texttemplatefallback:P({editType:"calc"}),hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"],editType:"calc"},hoveron:{valType:"flaglist",flags:["points","fills"],editType:"style"},hovertemplate:w({},{keys:s.eventDataKeys}),hovertemplatefallback:P(),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:o({},a,{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:u(!0),fillgradient:o({type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],dflt:"none",editType:"calc"},start:{valType:"number",editType:"calc"},stop:{valType:"number",editType:"calc"},colorscale:{valType:"colorscale",editType:"style"},editType:"calc"}),fillpattern:l,marker:o({symbol:{valType:"enumerated",values:i.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:o({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0},editType:"calc"},t("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"},t("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:r({editType:"calc",colorEditType:"style",arrayOk:!0}),zorder:{valType:"integer",dflt:0,editType:"plot"}}}}),qw=Ne({"src/components/selections/attributes.js"(te,Z){var v=Mg(),w=tf().line,C=Fd().dash,P=fi().extendFlat,t=ef().overrideAll,r=Cu().templatedArray;Eg(),Z.exports=t(r("selection",{type:{valType:"enumerated",values:["rect","path"]},xref:P({},v.xref,{}),yref:P({},v.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:w.color,width:P({},w.width,{min:1,dflt:1}),dash:P({},C,{dflt:"dot"})}}),"arraydraw","from-root")}}),wM=Ne({"src/components/selections/defaults.js"(te,Z){var v=In(),w=Os(),C=jd(),P=qw(),t=Sg();Z.exports=function(l,i){C(l,i,{name:"selections",handleItemDefaults:r});for(var s=i.selections,o=0;o<s.length;o++){var u=s[o];u&&u.path===void 0&&(u.x0===void 0||u.x1===void 0||u.y0===void 0||u.y1===void 0)&&(i.selections[o]=null)}};function r(a,l,i){function s(N,D){return v.coerce(a,l,P,N,D)}var o=s("path"),u=o?"path":"rect",d=s("type",u),h=d!=="path";h&&delete l.path,s("opacity"),s("line.color"),s("line.width"),s("line.dash");for(var g=["x","y"],m=0;m<2;m++){var E=g[m],c={_fullLayout:i},_,T,M,k=w.coerceRef(a,l,c,E);if(_=w.getFromId(c,k),_._selectionIndices.push(l._index),M=t.rangeToShapePosition(_),T=t.shapePositionToRange(_),h){var b=E+"0",A=E+"1",y=a[b],f=a[A];a[b]=T(a[b],!0),a[A]=T(a[A],!0),w.coercePosition(l,c,s,k,b),w.coercePosition(l,c,s,k,A);var p=l[b],x=l[A];p!==void 0&&x!==void 0&&(l[b]=M(p),l[A]=M(x),a[b]=y,a[A]=f)}}h&&v.noneOrAll(a,l,["x0","x1","y0","y1"])}}}),Cy=Ne({"src/components/selections/draw_newselection/defaults.js"(te,Z){Z.exports=function(w,C,P){P("newselection.mode");var t=P("newselection.line.width");t&&(P("newselection.line.color"),P("newselection.line.dash")),P("activeselection.fillcolor"),P("activeselection.opacity")}}}),kx=Ne({"src/plots/cartesian/include_components.js"(te,Z){var v=Yo(),w=In(),C=Wf();Z.exports=function(t){return function(a,l){var i=a[t];if(Array.isArray(i))for(var s=v.subplotsRegistry.cartesian,o=s.idRegex,u=l._subplots,d=u.xaxis,h=u.yaxis,g=u.cartesian,m=l._has("cartesian"),E=0;E<i.length;E++){var c=i[E];if(w.isPlainObject(c)){var _=C.cleanId(c.xref,"x",!1),T=C.cleanId(c.yref,"y",!1),M=o.x.test(_),k=o.y.test(T);if(M||k){m||w.pushUnique(l._basePlotModules,s);var b=!1;M&&d.indexOf(_)===-1&&(d.push(_),b=!0),k&&h.indexOf(T)===-1&&(h.push(T),b=!0),b&&M&&k&&g.push(_+T)}}}}}}}),dh=Ne({"src/components/selections/index.js"(te,Z){var v=gM(),w=U1();Z.exports={moduleType:"component",name:"selections",layoutAttributes:qw(),supplyLayoutDefaults:wM(),supplyDrawNewSelectionDefaults:Cy(),includeBasePlot:kx()("selections"),draw:v.draw,drawOne:v.drawOne,reselect:w.reselect,prepSelect:w.prepSelect,clearOutline:w.clearOutline,clearSelectionsCache:w.clearSelectionsCache,selectOnClick:w.selectOnClick}}}),vA=Ne({"src/plots/cartesian/dragbox.js"(te,Z){var v=xn(),w=In(),C=w.numberFormat,P=to(),t=nA(),r=Yo(),a=w.strTranslate,l=hc(),i=Ha(),s=zs(),o=oh(),u=Os(),d=km(),h=Uv(),g=Pm(),m=g.selectingOrDrawing,E=g.freeMode,c=Ad().FROM_TL,_=Ex(),T=jw().redrawReglTraces,M=ff(),k=Wf().getFromId,b=dh().prepSelect,A=dh().clearOutline,y=dh().selectOnClick,f=dA(),p=wh(),x=p.MINDRAG,N=p.MINZOOM,D=!0;function B(_e,Le,ze,Xe,Ve,rt,mt,_t){var vt=_e._fullLayout._zoomlayer,ut=mt+_t==="nsew",Fe=(mt+_t).length===1,Pe,be,Ye,yt,wt,ht,Yt,$t,fr,mr,Ur,jr,fn,Br,Qr,Ot,$e,ot,De,Ee,Ae,Ie,tt;ze+=Le.yaxis._shift;function st(){if(Pe=Le.xaxis,be=Le.yaxis,fr=Pe._length,mr=be._length,Yt=Pe._offset,$t=be._offset,Ye={},Ye[Pe._id]=Pe,yt={},yt[be._id]=be,mt&&_t)for(var kt=Le.overlays,qr=0;qr<kt.length;qr++){var en=kt[qr].xaxis;Ye[en._id]=en;var rn=kt[qr].yaxis;yt[rn._id]=rn}wt=ue(Ye),ht=ue(yt),fn=q(wt,_t),Br=q(ht,mt),Qr=!Br&&!fn,jr=Y(_e,_e._fullLayout._axisMatchGroups,Ye,yt),Ur=Y(_e,_e._fullLayout._axisConstraintGroups,Ye,yt,jr);var Wr=Ur.isSubplotConstrained||jr.isSubplotConstrained;Ot=_t||Wr,$e=mt||Wr;var tn=_e._fullLayout;ot=tn._has("scattergl"),De=tn._has("splom"),Ee=tn._has("svg")}st();var Bt=le(Br+fn,_e._fullLayout.dragmode,ut),Ft=V(Le,mt+_t+"drag",Bt,ze,Xe,Ve,rt);if(Qr&&!ut)return Ft.onmousedown=null,Ft.style.pointerEvents="none",Ft;var Wt={element:Ft,gd:_e,plotinfo:Le};Wt.prepFn=function(kt,qr,en){var rn=Wt.dragmode,Wr=_e._fullLayout.dragmode;Wr!==rn&&(Wt.dragmode=Wr),st(),Ie=_e._fullLayout._invScaleX,tt=_e._fullLayout._invScaleY,Qr||(ut?kt.shiftKey?Wr==="pan"?Wr="zoom":m(Wr)||(Wr="pan"):kt.ctrlKey&&(Wr="pan"):Wr="pan"),E(Wr)?Wt.minDrag=1:Wt.minDrag=void 0,m(Wr)?(Wt.xaxes=wt,Wt.yaxes=ht,b(kt,qr,en,Wt,Wr)):(Wt.clickFn=Rr,m(rn)&&lr(),Qr||(Wr==="zoom"?(Wt.moveFn=_r,Wt.doneFn=yr,Wt.minDrag=1,ci(kt,qr,en)):Wr==="pan"&&(Wt.moveFn=xa,Wt.doneFn=Ka))),_e._fullLayout._redrag=function(){var tn=_e._dragdata;if(tn&&tn.element===Ft){var Tn=_e._fullLayout.dragmode;m(Tn)||(st(),fa([0,0,fr,mr]),Wt.moveFn(tn.dx,tn.dy))}}};function lr(){Wt.plotinfo.selection=!1,A(_e)}function Rr(kt,qr){var en=Wt.gd;if(en._fullLayout._activeShapeIndex>=0){en._fullLayout._deactivateShape(en);return}var rn=en._fullLayout.clickmode;if(ie(en),kt===2&&!Fe&&Ba(),ut)rn.indexOf("select")>-1&&y(qr,en,wt,ht,Le.id,Wt),rn.indexOf("event")>-1&&o.click(en,qr,Le.id);else if(kt===1&&Fe){var Wr=mt?be:Pe,tn=mt==="s"||_t==="w"?0:1,Tn=Wr._name+".range["+tn+"]",dn=z(Wr,tn),It="left",xr="middle";if(Wr.fixedrange)return;mt?(xr=mt==="n"?"top":"bottom",Wr.side==="right"&&(It="right")):_t==="e"&&(It="right"),en._context.showAxisRangeEntryBoxes&&v.select(Ft).call(l.makeEditable,{gd:en,immediate:!0,background:en._fullLayout.paper_bgcolor,text:String(dn),fill:Wr.tickfont?Wr.tickfont.color:"#444",horizontalAlign:It,verticalAlign:xr}).on("edit",function(Yr){var An=Wr.d2r(Yr);An!==void 0&&r.call("_guiRelayout",en,Tn,An)})}}h.init(Wt);var Mr,Sr,Kr,Hn,ga,ua,Ta,Aa,ia,$a;function ci(kt,qr,en){var rn=Ft.getBoundingClientRect();Mr=qr-rn.left,Sr=en-rn.top,_e._fullLayout._calcInverseTransform(_e);var Wr=w.apply3DTransform(_e._fullLayout._invTransform)(Mr,Sr);Mr=Wr[0],Sr=Wr[1],Kr={l:Mr,r:Mr,w:0,t:Sr,b:Sr,h:0},Hn=_e._hmpixcount?_e._hmlumcount/_e._hmpixcount:P(_e._fullLayout.plot_bgcolor).getLuminance(),ga="M0,0H"+fr+"V"+mr+"H0V0",ua=!1,Ta="xy",$a=!1,Aa=ge(vt,Hn,Yt,$t,ga),ia=de(vt,Yt,$t)}function _r(kt,qr){if(_e._transitioningWithDuration)return!1;var en=Math.max(0,Math.min(fr,Ie*kt+Mr)),rn=Math.max(0,Math.min(mr,tt*qr+Sr)),Wr=Math.abs(en-Mr),tn=Math.abs(rn-Sr);Kr.l=Math.min(Mr,en),Kr.r=Math.max(Mr,en),Kr.t=Math.min(Sr,rn),Kr.b=Math.max(Sr,rn);function Tn(){Ta="",Kr.r=Kr.l,Kr.t=Kr.b,ia.attr("d","M0,0Z")}if(Ur.isSubplotConstrained)Wr>N||tn>N?(Ta="xy",Wr/fr>tn/mr?(tn=Wr*mr/fr,Sr>rn?Kr.t=Sr-tn:Kr.b=Sr+tn):(Wr=tn*fr/mr,Mr>en?Kr.l=Mr-Wr:Kr.r=Mr+Wr),ia.attr("d",oe(Kr))):Tn();else if(jr.isSubplotConstrained)if(Wr>N||tn>N){Ta="xy";var dn=Math.min(Kr.l/fr,(mr-Kr.b)/mr),It=Math.max(Kr.r/fr,(mr-Kr.t)/mr);Kr.l=dn*fr,Kr.r=It*fr,Kr.b=(1-dn)*mr,Kr.t=(1-It)*mr,ia.attr("d",oe(Kr))}else Tn();else!Br||tn<Math.min(Math.max(Wr*.6,x),N)?Wr<x||!fn?Tn():(Kr.t=0,Kr.b=mr,Ta="x",ia.attr("d",ee(Kr,Sr))):!fn||Wr<Math.min(tn*.6,N)?(Kr.l=0,Kr.r=fr,Ta="y",ia.attr("d",pe(Kr,Mr))):(Ta="xy",ia.attr("d",oe(Kr)));Kr.w=Kr.r-Kr.l,Kr.h=Kr.b-Kr.t,Ta&&($a=!0),_e._dragged=$a,me(Aa,ia,Kr,ga,ua,Hn),Qt(),_e.emit("plotly_relayouting",Ae),ua=!0}function Qt(){Ae={},(Ta==="xy"||Ta==="x")&&(H(wt,Kr.l/fr,Kr.r/fr,Ae,Ur.xaxes),za("x",Ae)),(Ta==="xy"||Ta==="y")&&(H(ht,(mr-Kr.b)/mr,(mr-Kr.t)/mr,Ae,Ur.yaxes),za("y",Ae))}function yr(){Qt(),ie(_e),Ka(),se(_e)}var br=[0,0,fr,mr],an=null,wn=p.REDRAWDELAY,Ln=Le.mainplot?_e._fullLayout._plots[Le.mainplot]:Le;function Bn(kt){if(!_e._context._scrollZoom.cartesian&&!_e._fullLayout._enablescrollzoom)return;if(lr(),_e._transitioningWithDuration){kt.preventDefault(),kt.stopPropagation();return}st(),clearTimeout(an);var qr=-kt.deltaY;if(isFinite(qr)||(qr=kt.wheelDelta/10),!isFinite(qr)){w.log("Did not find wheel motion attributes: ",kt);return}var en=Math.exp(-Math.min(Math.max(qr,-20),20)/200),rn=Ln.draglayer.select(".nsewdrag").node().getBoundingClientRect(),Wr=(kt.clientX-rn.left)/rn.width,tn=(rn.bottom-kt.clientY)/rn.height,Tn;function dn(It,xr,Yr){if(It.fixedrange)return;var An=w.simpleMap(It.range,It.r2l),Zn=An[0]+(An[1]-An[0])*xr;function sa(oa){return It.l2r(Zn+(oa-Zn)*Yr)}It.range=An.map(sa)}if(Ot){for(_t||(Wr=.5),Tn=0;Tn<wt.length;Tn++)dn(wt[Tn],Wr,en);za("x"),br[2]*=en,br[0]+=br[2]*Wr*(1/en-1)}if($e){for(mt||(tn=.5),Tn=0;Tn<ht.length;Tn++)dn(ht[Tn],tn,en);za("y"),br[3]*=en,br[1]+=br[3]*(1-tn)*(1/en-1)}fa(br),Ia(),_e.emit("plotly_relayouting",Ae),an=setTimeout(function(){_e._fullLayout&&(br=[0,0,fr,mr],Ka())},wn),kt.preventDefault()}mt.length*_t.length!==1&&ce(Ft,Bn);function xa(kt,qr){if(kt=kt*Ie,qr=qr*tt,_e._transitioningWithDuration)return;if(_e._fullLayout._replotting=!0,fn==="ew"||Br==="ns"){var en=fn?-kt:0,rn=Br?-qr:0;if(jr.isSubplotConstrained){if(fn&&Br){var Wr=(kt/fr-qr/mr)/2;kt=Wr*fr,qr=-Wr*mr,en=-kt,rn=-qr}Br?en=-rn*fr/mr:rn=-en*mr/fr}fn&&(G(wt,kt),za("x")),Br&&(G(ht,qr),za("y")),fa([en,rn,fr,mr]),Ia(),_e.emit("plotly_relayouting",Ae);return}function tn(sa,oa,Sn){for(var Kn=1-oa,Ui,Za,Ki=0;Ki<sa.length;Ki++){var ho=sa[Ki];if(!ho.fixedrange){Ui=ho,Za=ho._rl[Kn]+(ho._rl[oa]-ho._rl[Kn])/J(Sn/ho._length);var Co=ho.l2r(Za);Co!==!1&&Co!==void 0&&(ho.range[oa]=Co)}}return Ui._length*(Ui._rl[oa]-Za)/(Ui._rl[oa]-Ui._rl[Kn])}var Tn=fn==="w"==(Br==="n")?1:-1;if(fn&&Br&&(Ur.isSubplotConstrained||jr.isSubplotConstrained)){var dn=(kt/fr+Tn*qr/mr)/2;kt=dn*fr,qr=Tn*dn*mr}var It,xr;if(fn==="w"?kt=tn(wt,0,kt):fn==="e"?kt=tn(wt,1,-kt):fn||(kt=0),Br==="n"?qr=tn(ht,1,qr):Br==="s"?qr=tn(ht,0,-qr):Br||(qr=0),It=fn==="w"?kt:0,xr=Br==="n"?qr:0,Ur.isSubplotConstrained&&!jr.isSubplotConstrained||jr.isSubplotConstrained&&fn&&Br&&Tn>0){var Yr;if(jr.isSubplotConstrained||!fn&&Br.length===1){for(Yr=0;Yr<wt.length;Yr++)wt[Yr].range=wt[Yr]._r.slice(),f(wt[Yr],1-qr/mr);kt=qr*fr/mr,It=kt/2}if(jr.isSubplotConstrained||!Br&&fn.length===1){for(Yr=0;Yr<ht.length;Yr++)ht[Yr].range=ht[Yr]._r.slice(),f(ht[Yr],1-kt/fr);qr=kt*mr/fr,xr=qr/2}}(!jr.isSubplotConstrained||!Br)&&za("x"),(!jr.isSubplotConstrained||!fn)&&za("y");var An=fr-kt,Zn=mr-qr;jr.isSubplotConstrained&&!(fn&&Br)&&(fn?(xr=It?0:kt*mr/fr,Zn=An*mr/fr):(It=xr?0:qr*fr/mr,An=Zn*fr/mr)),fa([It,xr,An,Zn]),Ia(),_e.emit("plotly_relayouting",Ae)}function za(kt,qr){for(var en=jr.isSubplotConstrained?{x:ht,y:wt}[kt]:jr[kt+"axes"],rn=jr.isSubplotConstrained?{x:wt,y:ht}[kt]:[],Wr=0;Wr<en.length;Wr++){var tn=en[Wr],Tn=tn._id,dn=jr.xLinks[Tn]||jr.yLinks[Tn],It=rn[0]||Ye[dn]||yt[dn];It&&(qr?(qr[tn._name+".range[0]"]=qr[It._name+".range[0]"],qr[tn._name+".range[1]"]=qr[It._name+".range[1]"]):tn.range=It.range.slice())}}function Ia(){var kt=[],qr;function en(Tn){for(qr=0;qr<Tn.length;qr++)Tn[qr].fixedrange||kt.push(Tn[qr]._id)}function rn(Tn,dn){for(qr=0;qr<Tn.length;qr++){var It=Tn[qr],xr=It[dn];!It.fixedrange&&xr.tickmode==="sync"&&kt.push(xr._id)}}for(Ot&&(en(wt),en(Ur.xaxes),en(jr.xaxes),rn(Le.overlays,"xaxis")),$e&&(en(ht),en(Ur.yaxes),en(jr.yaxes),rn(Le.overlays,"yaxis")),Ae={},qr=0;qr<kt.length;qr++){var Wr=kt[qr],tn=k(_e,Wr);u.drawOne(_e,tn,{skipTitle:!0}),Ae[tn._name+".range[0]"]=tn.range[0],Ae[tn._name+".range[1]"]=tn.range[1]}u.redrawComponents(_e,kt)}function Ba(){if(!_e._transitioningWithDuration){var kt=_e._context.doubleClick,qr=[];fn&&(qr=qr.concat(wt)),Br&&(qr=qr.concat(ht)),jr.xaxes&&(qr=qr.concat(jr.xaxes)),jr.yaxes&&(qr=qr.concat(jr.yaxes));var en={},rn,Wr;if(kt==="reset+autosize")for(kt="autosize",Wr=0;Wr<qr.length;Wr++){rn=qr[Wr];var tn=rn._rangeInitial0,Tn=rn._rangeInitial1,dn=tn!==void 0||Tn!==void 0;if(dn&&(tn!==void 0&&tn!==rn.range[0]||Tn!==void 0&&Tn!==rn.range[1])||!dn&&rn.autorange!==!0){kt="reset";break}}if(kt==="autosize")for(Wr=0;Wr<qr.length;Wr++)rn=qr[Wr],rn.fixedrange||(en[rn._name+".autorange"]=!0);else if(kt==="reset"){for((fn||Ur.isSubplotConstrained)&&(qr=qr.concat(Ur.xaxes)),Br&&!Ur.isSubplotConstrained&&(qr=qr.concat(Ur.yaxes)),Ur.isSubplotConstrained&&(fn?Br||(qr=qr.concat(ht)):qr=qr.concat(wt)),Wr=0;Wr<qr.length;Wr++)if(rn=qr[Wr],!rn.fixedrange){var It=rn._name,xr=rn._autorangeInitial;rn._rangeInitial0===void 0&&rn._rangeInitial1===void 0?en[It+".autorange"]=!0:rn._rangeInitial0===void 0?(en[It+".autorange"]=xr,en[It+".range"]=[null,rn._rangeInitial1]):rn._rangeInitial1===void 0?(en[It+".range"]=[rn._rangeInitial0,null],en[It+".autorange"]=xr):en[It+".range"]=[rn._rangeInitial0,rn._rangeInitial1]}}_e.emit("plotly_doubleclick",null),r.call("_guiRelayout",_e,en)}}function Ka(){fa([0,0,fr,mr]),w.syncOrAsync([M.previousPromises,function(){_e._fullLayout._replotting=!1,r.call("_guiRelayout",_e,Ae)}],_e)}function fa(kt){var qr=_e._fullLayout,en=qr._plots,rn=qr._subplots.cartesian,Wr,tn,Tn,dn;if(De&&r.subplotsRegistry.splom.drag(_e),ot){for(Wr=0;Wr<rn.length;Wr++)if(tn=en[rn[Wr]],Tn=tn.xaxis,dn=tn.yaxis,tn._scene){Tn.limitRange&&Tn.limitRange(),dn.limitRange&&dn.limitRange();var It=w.simpleMap(Tn.range,Tn.r2l),xr=w.simpleMap(dn.range,dn.r2l);tn._scene.update({range:[It[0],xr[0],It[1],xr[1]]})}}if((De||ot)&&(_(_e),T(_e)),Ee){var Yr=kt[2]/Pe._length,An=kt[3]/be._length;for(Wr=0;Wr<rn.length;Wr++){tn=en[rn[Wr]],Tn=tn.xaxis,dn=tn.yaxis;var Zn=(Ot||jr.isSubplotConstrained)&&!Tn.fixedrange&&Ye[Tn._id],sa=($e||jr.isSubplotConstrained)&&!dn.fixedrange&&yt[dn._id],oa,Sn,Kn,Ui;if(Zn?(oa=Yr,Kn=_t||jr.isSubplotConstrained?kt[0]:Ht(Tn,oa)):jr.xaHash[Tn._id]?(oa=Yr,Kn=kt[0]*Tn._length/Pe._length):jr.yaHash[Tn._id]?(oa=An,Kn=Br==="ns"?-kt[1]*Tn._length/be._length:Ht(Tn,oa,{n:"top",s:"bottom"}[Br])):(oa=Bi(Tn,Yr,An),Kn=Yi(Tn,oa)),oa>1&&(Tn.maxallowed!==void 0&&Ot===(Tn.range[0]<Tn.range[1]?"e":"w")||Tn.minallowed!==void 0&&Ot===(Tn.range[0]<Tn.range[1]?"w":"e"))&&(oa=1,Kn=0),sa?(Sn=An,Ui=mt||jr.isSubplotConstrained?kt[1]:Ht(dn,Sn)):jr.yaHash[dn._id]?(Sn=An,Ui=kt[1]*dn._length/be._length):jr.xaHash[dn._id]?(Sn=Yr,Ui=fn==="ew"?-kt[0]*dn._length/Pe._length:Ht(dn,Sn,{e:"right",w:"left"}[fn])):(Sn=Bi(dn,Yr,An),Ui=Yi(dn,Sn)),Sn>1&&(dn.maxallowed!==void 0&&$e===(dn.range[0]<dn.range[1]?"n":"s")||dn.minallowed!==void 0&&$e===(dn.range[0]<dn.range[1]?"s":"n"))&&(Sn=1,Ui=0),!(!oa&&!Sn)){oa||(oa=1),Sn||(Sn=1);var Za=Tn._offset-Kn/oa,Ki=dn._offset-Ui/Sn;tn.clipRect.call(s.setTranslate,Kn,Ui).call(s.setScale,oa,Sn),tn.plot.call(s.setTranslate,Za,Ki).call(s.setScale,1/oa,1/Sn),(oa!==tn.xScaleFactor||Sn!==tn.yScaleFactor)&&(s.setPointGroupScale(tn.zoomScalePts,oa,Sn),s.setTextPointsScale(tn.zoomScaleTxt,oa,Sn)),s.hideOutsideRangePoints(tn.clipOnAxisFalseTraces,tn),tn.xScaleFactor=oa,tn.yScaleFactor=Sn}}}}function Bi(kt,qr,en){return kt.fixedrange?0:Ot&&Ur.xaHash[kt._id]?qr:$e&&(Ur.isSubplotConstrained?Ur.xaHash:Ur.yaHash)[kt._id]?en:0}function Yi(kt,qr){return qr?(kt.range=kt._r.slice(),f(kt,qr),Ht(kt,qr)):0}function Ht(kt,qr,en){return kt._length*(1-qr)*c[en||kt.constraintoward||"middle"]}return Ft}function U(_e,Le,ze,Xe){var Ve=w.ensureSingle(_e.draglayer,Le,ze,function(rt){rt.classed("drag",!0).style({fill:"transparent","stroke-width":0}).attr("data-subplot",_e.id)});return Ve.call(d,Xe),Ve.node()}function V(_e,Le,ze,Xe,Ve,rt,mt){var _t=U(_e,"rect",Le,ze);return v.select(_t).call(s.setRect,Xe,Ve,rt,mt),_t}function q(_e,Le){for(var ze=0;ze<_e.length;ze++)if(!_e[ze].fixedrange)return Le;return""}function z(_e,Le){var ze=_e.range[Le],Xe=Math.abs(ze-_e.range[1-Le]),Ve;return _e.type==="date"?ze:_e.type==="log"?(Ve=Math.ceil(Math.max(0,-Math.log(Xe)/Math.LN10))+3,C("."+Ve+"g")(Math.pow(10,ze))):(Ve=Math.floor(Math.log(Math.abs(ze))/Math.LN10)-Math.floor(Math.log(Xe)/Math.LN10)+4,C("."+String(Ve)+"g")(ze))}function H(_e,Le,ze,Xe,Ve){for(var rt=0;rt<_e.length;rt++){var mt=_e[rt];if(!mt.fixedrange)if(mt.rangebreaks){var _t=mt._id.charAt(0)==="y",vt=_t?1-Le:Le,ut=_t?1-ze:ze;Xe[mt._name+".range[0]"]=mt.l2r(mt.p2l(vt*mt._length)),Xe[mt._name+".range[1]"]=mt.l2r(mt.p2l(ut*mt._length))}else{var Fe=mt._rl[0],Pe=mt._rl[1]-Fe;Xe[mt._name+".range[0]"]=mt.l2r(Fe+Pe*Le),Xe[mt._name+".range[1]"]=mt.l2r(Fe+Pe*ze)}}if(Ve&&Ve.length){var be=(Le+(1-ze))/2;H(Ve,be,1-be,Xe,[])}}function G(_e,Le){for(var ze=0;ze<_e.length;ze++){var Xe=_e[ze];if(!Xe.fixedrange){if(Xe.rangebreaks){var Ve=0,rt=Xe._length,mt=Xe.p2l(Ve+Le)-Xe.p2l(Ve),_t=Xe.p2l(rt+Le)-Xe.p2l(rt),vt=(mt+_t)/2;Xe.range=[Xe.l2r(Xe._rl[0]-vt),Xe.l2r(Xe._rl[1]-vt)]}else Xe.range=[Xe.l2r(Xe._rl[0]-Le/Xe._m),Xe.l2r(Xe._rl[1]-Le/Xe._m)];Xe.limitRange&&Xe.limitRange()}}}function J(_e){return 1-(_e>=0?Math.min(_e,.9):1/(1/Math.max(_e,-.3)+3.222))}function le(_e,Le,ze){return _e?_e==="nsew"?ze?"":Le==="pan"?"move":"crosshair":_e.toLowerCase()+"-resize":"pointer"}function ge(_e,Le,ze,Xe,Ve){return _e.append("path").attr("class","zoombox").style({fill:Le>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",a(ze,Xe)).attr("d",Ve+"Z")}function de(_e,Le,ze){return _e.append("path").attr("class","zoombox-corners").style({fill:i.background,stroke:i.defaultLine,"stroke-width":1,opacity:0}).attr("transform",a(Le,ze)).attr("d","M0,0Z")}function me(_e,Le,ze,Xe,Ve,rt){_e.attr("d",Xe+"M"+ze.l+","+ze.t+"v"+ze.h+"h"+ze.w+"v-"+ze.h+"h-"+ze.w+"Z"),W(_e,Le,Ve,rt)}function W(_e,Le,ze,Xe){ze||(_e.transition().style("fill",Xe>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),Le.transition().style("opacity",1).duration(200))}function ie(_e){v.select(_e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function se(_e){D&&_e.data&&_e._context.showTips&&(w.notifier(w._(_e,"Double-click to zoom back out"),"long"),D=!1)}function ee(_e,Le){return"M"+(_e.l-.5)+","+(Le-N-.5)+"h-3v"+(2*N+1)+"h3ZM"+(_e.r+.5)+","+(Le-N-.5)+"h3v"+(2*N+1)+"h-3Z"}function pe(_e,Le){return"M"+(Le-N-.5)+","+(_e.t-.5)+"v-3h"+(2*N+1)+"v3ZM"+(Le-N-.5)+","+(_e.b+.5)+"v3h"+(2*N+1)+"v-3Z"}function oe(_e){var Le=Math.floor(Math.min(_e.b-_e.t,_e.r-_e.l,N)/2);return"M"+(_e.l-3.5)+","+(_e.t-.5+Le)+"h3v"+-Le+"h"+Le+"v-3h-"+(Le+3)+"ZM"+(_e.r+3.5)+","+(_e.t-.5+Le)+"h-3v"+-Le+"h"+-Le+"v-3h"+(Le+3)+"ZM"+(_e.r+3.5)+","+(_e.b+.5-Le)+"h-3v"+Le+"h"+-Le+"v3h"+(Le+3)+"ZM"+(_e.l-3.5)+","+(_e.b+.5-Le)+"h3v"+Le+"h"+Le+"v3h-"+(Le+3)+"Z"}function Y(_e,Le,ze,Xe,Ve){for(var rt=!1,mt={},_t={},vt,ut,Fe,Pe,be=(Ve||{}).xaHash,Ye=(Ve||{}).yaHash,yt=0;yt<Le.length;yt++){var wt=Le[yt];for(vt in ze)if(wt[vt]){for(Fe in wt)!(Ve&&(be[Fe]||Ye[Fe]))&&!(Fe.charAt(0)==="x"?ze:Xe)[Fe]&&(mt[Fe]=vt);for(ut in Xe)!(Ve&&(be[ut]||Ye[ut]))&&wt[ut]&&(rt=!0)}for(ut in Xe)if(wt[ut])for(Pe in wt)!(Ve&&(be[Pe]||Ye[Pe]))&&!(Pe.charAt(0)==="x"?ze:Xe)[Pe]&&(_t[Pe]=ut)}rt&&(w.extendFlat(mt,_t),_t={});var ht={},Yt=[];for(Fe in mt){var $t=k(_e,Fe);Yt.push($t),ht[$t._id]=$t}var fr={},mr=[];for(Pe in _t){var Ur=k(_e,Pe);mr.push(Ur),fr[Ur._id]=Ur}return{xaHash:ht,yaHash:fr,xaxes:Yt,yaxes:mr,xLinks:mt,yLinks:_t,isSubplotConstrained:rt}}function ce(_e,Le){if(!t)_e.onwheel!==void 0?_e.onwheel=Le:_e.onmousewheel!==void 0?_e.onmousewheel=Le:_e.isAddedWheelEvent||(_e.isAddedWheelEvent=!0,_e.addEventListener("wheel",Le,{passive:!1}));else{var ze=_e.onwheel!==void 0?"wheel":"mousewheel";_e._onwheel&&_e.removeEventListener(ze,_e._onwheel),_e._onwheel=Le,_e.addEventListener(ze,Le,{passive:!1})}}function ue(_e){var Le=[];for(var ze in _e)Le.push(_e[ze]);return Le}Z.exports={makeDragBox:B,makeDragger:U,makeRectDragger:V,makeZoombox:ge,makeCorners:de,updateZoombox:me,xyCorners:oe,transitionZoombox:W,removeZoombox:ie,showDoubleClickNotifier:se,attachWheelEventHandler:ce}}}),TM=Ne({"src/plots/cartesian/graph_interact.js"(te){var Z=xn(),v=oh(),w=Uv(),C=km(),P=vA().makeDragBox,t=wh().DRAGGERSIZE;te.initInteractions=function(a){var l=a._fullLayout;if(a._context.staticPlot){Z.select(a).selectAll(".drag").remove();return}if(!(!l._has("cartesian")&&!l._has("splom"))){var i=Object.keys(l._plots||{}).sort(function(o,u){if((l._plots[o].mainplot&&!0)===(l._plots[u].mainplot&&!0)){var d=o.split("y"),h=u.split("y");return d[0]===h[0]?Number(d[1]||1)-Number(h[1]||1):Number(d[0]||1)-Number(h[0]||1)}return l._plots[o].mainplot?1:-1});i.forEach(function(o){var u=l._plots[o],d=u.xaxis,h=u.yaxis;if(!u.mainplot){var g=P(a,u,d._offset,h._offset,d._length,h._length,"ns","ew");g.onmousemove=function(c){a._fullLayout._rehover=function(){a._fullLayout._hoversubplot===o&&a._fullLayout._plots[o]&&v.hover(a,c,o)},v.hover(a,c,o),a._fullLayout._lasthover=g,a._fullLayout._hoversubplot=o},g.onmouseout=function(c){a._dragging||(a._fullLayout._hoversubplot=null,w.unhover(a,c))},a._context.showAxisDragHandles&&(P(a,u,d._offset-t,h._offset-t,t,t,"n","w"),P(a,u,d._offset+d._length,h._offset-t,t,t,"n","e"),P(a,u,d._offset-t,h._offset+h._length,t,t,"s","w"),P(a,u,d._offset+d._length,h._offset+h._length,t,t,"s","e"))}if(a._context.showAxisDragHandles){if(o===d._mainSubplot){var m=d._mainLinePosition;d.side==="top"&&(m-=t),P(a,u,d._offset+d._length*.1,m,d._length*.8,t,"","ew"),P(a,u,d._offset,m,d._length*.1,t,"","w"),P(a,u,d._offset+d._length*.9,m,d._length*.1,t,"","e")}if(o===h._mainSubplot){var E=h._mainLinePosition;h.side!=="right"&&(E-=t),P(a,u,E,h._offset+h._length*.1,t,h._length*.8,"ns",""),P(a,u,E,h._offset+h._length*.9,t,h._length*.1,"s",""),P(a,u,E,h._offset,t,h._length*.1,"n","")}}});var s=l._hoverlayer.node();s.onmousemove=function(o){o.target=a._fullLayout._lasthover,v.hover(a,o,l._hoversubplot)},s.onclick=function(o){o.target=a._fullLayout._lasthover,v.click(a,o)},s.onmousedown=function(o){a._fullLayout._lasthover.onmousedown(o)},te.updateFx(a)}},te.updateFx=function(r){var a=r._fullLayout,l=a.dragmode==="pan"?"move":"crosshair";C(a._draggers,l)}}}),FL=Ne({"src/plot_api/container_array_match.js"(te,Z){var v=Yo();Z.exports=function(C){for(var P=v.layoutArrayContainers,t=v.layoutArrayRegexes,r=C.split("[")[0],a,l,i=0;i<t.length;i++)if(l=C.match(t[i]),l&&l.index===0){a=l[0];break}if(a||(a=P[P.indexOf(r)]),!a)return!1;var s=C.substr(a.length);return s?(l=s.match(/^\[(0|[1-9][0-9]*)\](\.(.+))?$/),l?{array:a,index:Number(l[1]),property:l[3]||""}:!1):{array:a,index:"",property:""}}}}),BL=Ne({"src/plot_api/manage_arrays.js"(te){var Z=qa(),v=ad(),w=Nd(),C=_g().sorterAsc,P=Yo();te.containerArrayMatch=FL();var t=te.isAddVal=function(l){return l==="add"||Z(l)},r=te.isRemoveVal=function(l){return l===null||l==="remove"};te.applyContainerArrayChanges=function(l,i,s,o,u){var d=i.astr,h=P.getComponentMethod(d,"supplyLayoutDefaults"),g=P.getComponentMethod(d,"draw"),m=P.getComponentMethod(d,"drawOne"),E=o.replot||o.recalc||h===v||g===v,c=l.layout,_=l._fullLayout;if(s[""]){Object.keys(s).length>1&&w.warn("Full array edits are incompatible with other edits",d);var T=s[""][""];if(r(T))i.set(null);else if(Array.isArray(T))i.set(T);else return w.warn("Unrecognized full array edit value",d,T),!0;return E?!1:(h(c,_),g(l),!0)}var M=Object.keys(s).map(Number).sort(C),k=i.get(),b=k||[],A=u(_,d).get(),y=[],f=-1,p=b.length,x,N,D,B,U,V,q,z;for(x=0;x<M.length;x++){if(D=M[x],B=s[D],U=Object.keys(B),V=B[""],q=t(V),D<0||D>b.length-(q?0:1)){w.warn("index out of range",d,D);continue}if(V!==void 0)U.length>1&&w.warn("Insertion & removal are incompatible with edits to the same index.",d,D),r(V)?y.push(D):q?(V==="add"&&(V={}),b.splice(D,0,V),A&&A.splice(D,0,{})):w.warn("Unrecognized full object edit value",d,D,V),f===-1&&(f=D);else for(N=0;N<U.length;N++)z=d+"["+D+"].",u(b[D],U[N],z).set(B[U[N]])}for(x=y.length-1;x>=0;x--)b.splice(y[x],1),A&&A.splice(y[x],1);if(b.length?k||i.set(b):i.set(null),E)return!1;if(h(c,_),m!==v){var H;if(f===-1)H=M;else{for(p=Math.max(b.length,p),H=[],x=0;x<M.length&&(D=M[x],!(D>=f));x++)H.push(D);for(x=f;x<p;x++)H.push(x)}for(x=0;x<H.length;x++)m(l,H[x])}else g(l);return!0}}}),AM=Ne({"src/plot_api/helpers.js"(te){var Z=Fn(),v=Yo(),w=In(),C=ff(),P=Wf(),t=Ha(),r=P.cleanId,a=P.getFromTrace,l=v.traceIs,i=["x","y","z"];te.clearPromiseQueue=function(c){Array.isArray(c._promises)&&c._promises.length>0&&w.log("Clearing previous rejected promises from queue."),c._promises=[]},te.cleanLayout=function(c){var _;c||(c={}),c.xaxis1&&(c.xaxis||(c.xaxis=c.xaxis1),delete c.xaxis1),c.yaxis1&&(c.yaxis||(c.yaxis=c.yaxis1),delete c.yaxis1),c.scene1&&(c.scene||(c.scene=c.scene1),delete c.scene1);var T=(C.subplotsRegistry.cartesian||{}).attrRegex;(C.subplotsRegistry.polar||{}).attrRegex,(C.subplotsRegistry.ternary||{}).attrRegex,(C.subplotsRegistry.gl3d||{}).attrRegex;var M=Object.keys(c);for(_=0;_<M.length;_++){var k=M[_];if(T&&T.test(k)){var b=c[k];b.anchor&&b.anchor!=="free"&&(b.anchor=r(b.anchor)),b.overlaying&&(b.overlaying=r(b.overlaying)),b.type||(b.isdate?b.type="date":b.islog?b.type="log":b.isdate===!1&&b.islog===!1&&(b.type="linear")),(b.autorange==="withzero"||b.autorange==="tozero")&&(b.autorange=!0,b.rangemode="tozero"),b.insiderange&&delete b.range,delete b.islog,delete b.isdate,delete b.categories,h(b,"domain")&&delete b.domain}}var A=Array.isArray(c.annotations)?c.annotations.length:0;for(_=0;_<A;_++){var y=c.annotations[_];w.isPlainObject(y)&&(s(y,"xref"),s(y,"yref"))}var f=Array.isArray(c.shapes)?c.shapes.length:0;for(_=0;_<f;_++){var p=c.shapes[_];w.isPlainObject(p)&&(s(p,"xref"),s(p,"yref"))}var x=Array.isArray(c.images)?c.images.length:0;for(_=0;_<x;_++){var N=c.images[_];w.isPlainObject(N)&&(s(N,"xref"),s(N,"yref"))}var D=c.legend;return D&&(D.x>3?(D.x=1.02,D.xanchor="left"):D.x<-2&&(D.x=-.02,D.xanchor="right"),D.y>3?(D.y=1.02,D.yanchor="bottom"):D.y<-2&&(D.y=-.02,D.yanchor="top")),c.dragmode==="rotate"&&(c.dragmode="orbit"),t.clean(c),c.template&&c.template.layout&&te.cleanLayout(c.template.layout),c};function s(c,_){var T=c[_],M=_.charAt(0);T&&T!=="paper"&&(c[_]=r(T,M,!0))}te.cleanData=function(c){for(var _=0;_<c.length;_++){var T=c[_],M;if(T.type==="histogramy"&&"xbins"in T&&!("ybins"in T)&&(T.ybins=T.xbins,delete T.xbins),T.type==="histogramy"&&te.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=r(T.xaxis,"x")),T.yaxis&&(T.yaxis=r(T.yaxis,"y")),l(T,"gl3d")&&T.scene&&(T.scene=C.subplotsRegistry.gl3d.cleanId(T.scene)),!l(T,"pie-like")&&!l(T,"bar-like"))if(Array.isArray(T.textposition))for(M=0;M<T.textposition.length;M++)T.textposition[M]=d(T.textposition[M]);else T.textposition&&(T.textposition=d(T.textposition));var k=v.getModule(T);if(k&&k.colorbar){var b=k.colorbar.container,A=b?T[b]:T;A&&A.colorscale&&(A.colorscale==="YIGnBu"&&(A.colorscale="YlGnBu"),A.colorscale==="YIOrRd"&&(A.colorscale="YlOrRd"))}if(T.type==="surface"&&w.isPlainObject(T.contours)){var y=["x","y","z"];for(M=0;M<y.length;M++){var f=T.contours[y[M]];w.isPlainObject(f)&&(f.highlightColor&&(f.highlightcolor=f.highlightColor,delete f.highlightColor),f.highlightWidth&&(f.highlightwidth=f.highlightWidth,delete f.highlightWidth))}}if(T.type==="candlestick"||T.type==="ohlc"){var p=(T.increasing||{}).showlegend!==!1,x=(T.decreasing||{}).showlegend!==!1,N=o(T.increasing),D=o(T.decreasing);if(N!==!1&&D!==!1){var B=u(N,D,p,x);B&&(T.name=B)}else(N||D)&&!T.name&&(T.name=N||D)}h(T,"line")&&delete T.line,"marker"in T&&(h(T.marker,"line")&&delete T.marker.line,h(T,"marker")&&delete T.marker),t.clean(T),T.autobinx&&(delete T.autobinx,delete T.xbins),T.autobiny&&(delete T.autobiny,delete T.ybins)}};function o(c){if(!w.isPlainObject(c))return!1;var _=c.name;return delete c.name,delete c.showlegend,(typeof _=="string"||typeof _=="number")&&String(_)}function u(c,_,T,M){if(T&&!M)return c;if(M&&!T||!c.trim())return _;if(!_.trim())return c;var k=Math.min(c.length,_.length),b;for(b=0;b<k&&c.charAt(b)===_.charAt(b);b++);var A=c.substr(0,b);return A.trim()}function d(c){var _="middle",T="center";return typeof c=="string"&&(c.indexOf("top")!==-1?_="top":c.indexOf("bottom")!==-1&&(_="bottom"),c.indexOf("left")!==-1?T="left":c.indexOf("right")!==-1&&(T="right")),_+" "+T}function h(c,_){return _ in c&&typeof c[_]=="object"&&Object.keys(c[_]).length===0}te.swapXYData=function(c){var _;if(w.swapAttrs(c,["?","?0","d?","?bins","nbins?","autobin?","?src","error_?"]),Array.isArray(c.z)&&Array.isArray(c.z[0])&&(c.transpose?delete c.transpose:c.transpose=!0),c.error_x&&c.error_y){var T=c.error_y,M="copy_ystyle"in T?T.copy_ystyle:!(T.color||T.thickness||T.width);w.swapAttrs(c,["error_?.copy_ystyle"]),M&&w.swapAttrs(c,["error_?.color","error_?.thickness","error_?.width"])}if(typeof c.hoverinfo=="string"){var k=c.hoverinfo.split("+");for(_=0;_<k.length;_++)k[_]==="x"?k[_]="y":k[_]==="y"&&(k[_]="x");c.hoverinfo=k.join("+")}},te.coerceTraceIndices=function(c,_){if(Z(_))return[_];if(!Array.isArray(_)||!_.length)return c.data.map(function(k,b){return b});if(Array.isArray(_)){for(var T=[],M=0;M<_.length;M++)w.isIndex(_[M],c.data.length)?T.push(_[M]):w.warn("trace index (",_[M],") is not a number or is out of bounds");return T}return _},te.manageArrayContainers=function(c,_,T){var M=c.obj,k=c.parts,b=k.length,A=k[b-1],y=Z(A);if(y&&_===null){var f=k.slice(0,b-1).join("."),p=w.nestedProperty(M,f).get();p.splice(A,1)}else y&&c.get()===void 0&&c.get()===void 0&&(T[c.astr]=null),c.set(_)};var g=/(\.[^\[\]\.]+|\[[^\[\]\.]+\])$/;function m(c){var _=c.search(g);if(_>0)return c.substr(0,_)}te.hasParent=function(c,_){for(var T=m(_);T;){if(T in c)return!0;T=m(T)}return!1},te.clearAxisTypes=function(c,_,T){for(var M=0;M<_.length;M++)for(var k=c._fullData[M],b=0;b<3;b++){var A=a(c,k,i[b]);if(A&&A.type!=="log"){var y=A._name,f=A._id.substr(1);if(f.substr(0,5)==="scene"){if(T[f]!==void 0)continue;y=f+"."+y}var p=y+".type";T[y]===void 0&&T[p]===void 0&&w.nestedProperty(c.layout,p).set(null)}}};var E=(c,_)=>{const T=(...M)=>M.every(k=>w.isPlainObject(k))||M.every(k=>Array.isArray(k));if([c,_].every(M=>Array.isArray(M))){if(c.length!==_.length)return!1;for(let M=0;M<c.length;M++){const k=c[M],b=_[M];if(k!==b&&!(T(k,b)?E(k,b):!1))return!1}return!0}else if([c,_].every(M=>w.isPlainObject(M))){if(Object.keys(c).length!==Object.keys(_).length)return!1;for(const M in c){if(M.startsWith("_"))continue;const k=c[M],b=_[M];if(k!==b&&!(T(k,b)?E(k,b):!1))return!1}return!0}return!1};te.collectionsAreEqual=E}}),Vw=Ne({"src/plot_api/plot_api.js"(te){var Z=xn(),v=Fn(),w=eA(),C=In(),P=C.nestedProperty,t=wx(),r=im(),a=Yo(),l=B1(),i=ff(),s=Os(),o=iM(),u=Sd(),d=zs(),h=Ha(),g=TM().initInteractions,m=hp(),E=dh().clearOutline,c=Gf().dfltConfig,_=BL(),T=AM(),M=jw(),k=ef(),b=wh().AX_NAME_PATTERN,A=0,y=5;function f(De,Ee,Ae,Ie){var tt;if(De=C.getGraphDiv(De),t.init(De),C.isPlainObject(Ee)){var st=Ee;Ee=st.data,Ae=st.layout,Ie=st.config,tt=st.frames}var Bt=t.triggerHandler(De,"plotly_beforeplot",[Ee,Ae,Ie]);if(Bt===!1)return Promise.reject();!Ee&&!Ae&&!C.isPlotDiv(De)&&C.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",De);function Ft(){if(tt)return te.addFrames(De,tt)}B(De,Ie),Ae||(Ae={}),Z.select(De).classed("js-plotly-plot",!0),d.makeTester(),Array.isArray(De._promises)||(De._promises=[]);var Wt=(De.data||[]).length===0&&Array.isArray(Ee);Array.isArray(Ee)&&(T.cleanData(Ee),Wt?De.data=Ee:De.data.push.apply(De.data,Ee),De.empty=!1),(!De.layout||Wt)&&(De.layout=T.cleanLayout(Ae)),i.supplyDefaults(De);var lr=De._fullLayout,Rr=lr._has("cartesian");lr._replotting=!0,(Wt||lr._shouldCreateBgLayer)&&(ot(De),lr._shouldCreateBgLayer&&delete lr._shouldCreateBgLayer),d.initGradients(De),d.initPatterns(De),Wt&&s.saveShowSpikeInitial(De);var Mr=!De.calcdata||De.calcdata.length!==(De._fullData||[]).length;Mr&&i.doCalcdata(De);for(var Sr=0;Sr<De.calcdata.length;Sr++)De.calcdata[Sr][0].trace=De._fullData[Sr];De._context.responsive?De._responsiveChartHandler||(De._responsiveChartHandler=function(){C.isHidden(De)||i.resize(De)},window.addEventListener("resize",De._responsiveChartHandler)):C.clearResponsive(De);var Kr=C.extendFlat({},lr._size),Hn=0;function ga(){for(var Qt=lr._basePlotModules,yr=0;yr<Qt.length;yr++)Qt[yr].drawFramework&&Qt[yr].drawFramework(De);!lr._glcanvas&&lr._has("gl")&&(lr._glcanvas=lr._glcontainer.selectAll(".gl-canvas").data([{key:"contextLayer",context:!0,pick:!1},{key:"focusLayer",context:!1,pick:!1},{key:"pickLayer",context:!1,pick:!0}],function(Ln){return Ln.key}),lr._glcanvas.enter().append("canvas").attr("class",function(Ln){return"gl-canvas gl-canvas-"+Ln.key.replace("Layer","")}).style({position:"absolute",top:0,left:0,overflow:"visible","pointer-events":"none"}));var br=De._context.plotGlPixelRatio;if(lr._glcanvas){lr._glcanvas.attr("width",lr.width*br).attr("height",lr.height*br).style("width",lr.width+"px").style("height",lr.height+"px");var an=lr._glcanvas.data()[0].regl;if(an&&(Math.floor(lr.width*br)!==an._gl.drawingBufferWidth||Math.floor(lr.height*br)!==an._gl.drawingBufferHeight)){var wn="WebGL context buffer and canvas dimensions do not match due to browser/WebGL bug.";if(Hn)C.error(wn);else return C.log(wn+" Clearing graph and plotting again."),i.cleanPlot([],{},De._fullData,lr),i.supplyDefaults(De),lr=De._fullLayout,i.doCalcdata(De),Hn++,ga()}}return lr.modebar.orientation==="h"?lr._modebardiv.style("height",null).style("width","100%"):lr._modebardiv.style("width",null).style("height",lr.height+"px"),i.previousPromises(De)}function ua(){if(i.clearAutoMarginIds(De),M.drawMarginPushers(De),s.allowAutoMargin(De),De._fullLayout.title.text&&De._fullLayout.title.automargin&&i.allowAutoMargin(De,"title.automargin"),lr._has("pie"))for(var Qt=De._fullData,yr=0;yr<Qt.length;yr++){var br=Qt[yr];br.type==="pie"&&br.automargin&&i.allowAutoMargin(De,"pie."+br.uid+".automargin")}return i.doAutoMargin(De),i.previousPromises(De)}function Ta(){if(i.didMarginChange(Kr,lr._size))return C.syncOrAsync([ua,M.layoutStyles],De)}function Aa(){if(!Mr){ia();return}return C.syncOrAsync([a.getComponentMethod("shapes","calcAutorange"),a.getComponentMethod("annotations","calcAutorange"),ia],De)}function ia(){De._transitioning||(M.doAutoRangeAndConstraints(De),Wt&&s.saveRangeInitial(De),a.getComponentMethod("rangeslider","calcAutorange")(De))}function $a(){return s.draw(De,Wt?"":"redraw")}var ci=[i.previousPromises,Ft,ga,ua,Ta];Rr&&ci.push(Aa),ci.push(M.layoutStyles),Rr&&ci.push($a,function(yr){var br=yr._fullLayout._insideTickLabelsUpdaterange;if(br)return yr._fullLayout._insideTickLabelsUpdaterange=void 0,Le(yr,br).then(function(){s.saveRangeInitial(yr,!0)})}),ci.push(M.drawData,M.finalDraw,g,i.addLinks,i.rehover,i.redrag,i.reselect,i.doAutoMargin,i.previousPromises);var _r=C.syncOrAsync(ci,De);return(!_r||!_r.then)&&(_r=Promise.resolve()),_r.then(function(){return p(De),De})}function p(De){var Ee=De._fullLayout;Ee._redrawFromAutoMarginCount?Ee._redrawFromAutoMarginCount--:De.emit("plotly_afterplot")}function x(De){return C.extendFlat(c,De)}function N(De,Ee){try{De._fullLayout._paper.style("background",Ee)}catch(Ae){C.error(Ae)}}function D(De,Ee){var Ae=h.combine(Ee,"white");N(De,Ae)}function B(De,Ee){if(!De._context){De._context=C.extendDeep({},c);var Ae=Z.select("base");De._context._baseUrl=Ae.size()&&Ae.attr("href")?window.location.href.split("#")[0]:""}var Ie=De._context,tt,st,Bt;if(Ee){for(st=Object.keys(Ee),tt=0;tt<st.length;tt++)Bt=st[tt],!(Bt==="editable"||Bt==="edits")&&Bt in Ie&&(Bt==="setBackground"&&Ee[Bt]==="opaque"?Ie[Bt]=D:Ie[Bt]=Ee[Bt]);var Ft=Ee.editable;if(Ft!==void 0)for(Ie.editable=Ft,st=Object.keys(Ie.edits),tt=0;tt<st.length;tt++)Ie.edits[st[tt]]=Ft;if(Ee.edits)for(st=Object.keys(Ee.edits),tt=0;tt<st.length;tt++)Bt=st[tt],Bt in Ie.edits&&(Ie.edits[Bt]=Ee.edits[Bt]);Ie._exportedPlot=Ee._exportedPlot}Ie.staticPlot&&(Ie.editable=!1,Ie.edits={},Ie.autosizable=!1,Ie.scrollZoom=!1,Ie.doubleClick=!1,Ie.showTips=!1,Ie.showLink=!1,Ie.displayModeBar=!1),Ie.displayModeBar==="hover"&&!w&&(Ie.displayModeBar=!0),(Ie.setBackground==="transparent"||typeof Ie.setBackground!="function")&&(Ie.setBackground=N),Ie._hasZeroHeight=Ie._hasZeroHeight||De.clientHeight===0,Ie._hasZeroWidth=Ie._hasZeroWidth||De.clientWidth===0;var Wt=Ie.scrollZoom,lr=Ie._scrollZoom={};if(Wt===!0)lr.cartesian=1,lr.gl3d=1,lr.geo=1,lr.mapbox=1,lr.map=1;else if(typeof Wt=="string"){var Rr=Wt.split("+");for(tt=0;tt<Rr.length;tt++)lr[Rr[tt]]=1}else Wt!==!1&&(lr.gl3d=1,lr.geo=1,lr.mapbox=1,lr.map=1)}function U(De){if(De=C.getGraphDiv(De),!C.isPlotDiv(De))throw new Error("This element is not a Plotly plot: "+De);return T.cleanData(De.data),T.cleanLayout(De.layout),De.calcdata=void 0,te._doPlot(De).then(function(){return De.emit("plotly_redraw"),De})}function V(De,Ee,Ae,Ie){return De=C.getGraphDiv(De),i.cleanPlot([],{},De._fullData||[],De._fullLayout||{}),i.purge(De),te._doPlot(De,Ee,Ae,Ie)}function q(De,Ee){var Ae=Ee+1,Ie=[],tt,st;for(tt=0;tt<De.length;tt++)st=De[tt],st<0?Ie.push(Ae+st):Ie.push(st);return Ie}function z(De,Ee,Ae){var Ie,tt;for(Ie=0;Ie<Ee.length;Ie++){if(tt=Ee[Ie],tt!==parseInt(tt,10))throw new Error("all values in "+Ae+" must be integers");if(tt>=De.data.length||tt<-De.data.length)throw new Error(Ae+" must be valid indices for gd.data.");if(Ee.indexOf(tt,Ie+1)>-1||tt>=0&&Ee.indexOf(-De.data.length+tt)>-1||tt<0&&Ee.indexOf(De.data.length+tt)>-1)throw new Error("each index in "+Ae+" must be unique.")}}function H(De,Ee,Ae){if(!Array.isArray(De.data))throw new Error("gd.data must be an array.");if(typeof Ee>"u")throw new Error("currentIndices is a required argument.");if(Array.isArray(Ee)||(Ee=[Ee]),z(De,Ee,"currentIndices"),typeof Ae<"u"&&!Array.isArray(Ae)&&(Ae=[Ae]),typeof Ae<"u"&&z(De,Ae,"newIndices"),typeof Ae<"u"&&Ee.length!==Ae.length)throw new Error("current and new indices must be of equal length.")}function G(De,Ee,Ae){var Ie,tt;if(!Array.isArray(De.data))throw new Error("gd.data must be an array.");if(typeof Ee>"u")throw new Error("traces must be defined.");for(Array.isArray(Ee)||(Ee=[Ee]),Ie=0;Ie<Ee.length;Ie++)if(tt=Ee[Ie],typeof tt!="object"||Array.isArray(tt)||tt===null)throw new Error("all values in traces array must be non-array objects");if(typeof Ae<"u"&&!Array.isArray(Ae)&&(Ae=[Ae]),typeof Ae<"u"&&Ae.length!==Ee.length)throw new Error("if indices is specified, traces.length must equal indices.length")}function J(De,Ee,Ae,Ie){var tt=C.isPlainObject(Ie);if(!Array.isArray(De.data))throw new Error("gd.data must be an array");if(!C.isPlainObject(Ee))throw new Error("update must be a key:value object");if(typeof Ae>"u")throw new Error("indices must be an integer or array of integers");z(De,Ae,"indices");for(var st in Ee){if(!Array.isArray(Ee[st])||Ee[st].length!==Ae.length)throw new Error("attribute "+st+" must be an array of length equal to indices array length");if(tt&&(!(st in Ie)||!Array.isArray(Ie[st])||Ie[st].length!==Ee[st].length))throw new Error("when maxPoints is set as a key:value object it must contain a 1:1 correspondence with the keys and number of traces in the update object")}}function le(De,Ee,Ae,Ie){var tt=C.isPlainObject(Ie),st=[],Bt,Ft,Wt,lr,Rr;Array.isArray(Ae)||(Ae=[Ae]),Ae=q(Ae,De.data.length-1);for(var Mr in Ee)for(var Sr=0;Sr<Ae.length;Sr++){if(Bt=De.data[Ae[Sr]],Wt=P(Bt,Mr),Ft=Wt.get(),lr=Ee[Mr][Sr],!C.isArrayOrTypedArray(lr))throw new Error("attribute: "+Mr+" index: "+Sr+" must be an array");if(!C.isArrayOrTypedArray(Ft))throw new Error("cannot extend missing or non-array attribute: "+Mr);if(Ft.constructor!==lr.constructor)throw new Error("cannot extend array with an array of a different type: "+Mr);Rr=tt?Ie[Mr][Sr]:Ie,v(Rr)||(Rr=-1),st.push({prop:Wt,target:Ft,insert:lr,maxp:Math.floor(Rr)})}return st}function ge(De,Ee,Ae,Ie,tt){J(De,Ee,Ae,Ie);for(var st=le(De,Ee,Ae,Ie),Bt={},Ft={},Wt=0;Wt<st.length;Wt++){var lr=st[Wt].prop,Rr=st[Wt].maxp,Mr=tt(st[Wt].target,st[Wt].insert,Rr);lr.set(Mr[0]),Array.isArray(Bt[lr.astr])||(Bt[lr.astr]=[]),Bt[lr.astr].push(Mr[1]),Array.isArray(Ft[lr.astr])||(Ft[lr.astr]=[]),Ft[lr.astr].push(st[Wt].target.length)}return{update:Bt,maxPoints:Ft}}function de(De,Ee){var Ae=new De.constructor(De.length+Ee.length);return Ae.set(De),Ae.set(Ee,De.length),Ae}function me(De,Ee,Ae,Ie){De=C.getGraphDiv(De);function tt(Wt,lr,Rr){var Mr,Sr;if(C.isTypedArray(Wt))if(Rr<0){var Kr=new Wt.constructor(0),Hn=de(Wt,lr);Rr<0?(Mr=Hn,Sr=Kr):(Mr=Kr,Sr=Hn)}else if(Mr=new Wt.constructor(Rr),Sr=new Wt.constructor(Wt.length+lr.length-Rr),Rr===lr.length)Mr.set(lr),Sr.set(Wt);else if(Rr<lr.length){var ga=lr.length-Rr;Mr.set(lr.subarray(ga)),Sr.set(Wt),Sr.set(lr.subarray(0,ga),Wt.length)}else{var ua=Rr-lr.length,Ta=Wt.length-ua;Mr.set(Wt.subarray(Ta)),Mr.set(lr,ua),Sr.set(Wt.subarray(0,Ta))}else Mr=Wt.concat(lr),Sr=Rr>=0&&Rr<Mr.length?Mr.splice(0,Mr.length-Rr):[];return[Mr,Sr]}var st=ge(De,Ee,Ae,Ie,tt),Bt=te.redraw(De),Ft=[De,st.update,Ae,st.maxPoints];return r.add(De,te.prependTraces,Ft,me,arguments),Bt}function W(De,Ee,Ae,Ie){De=C.getGraphDiv(De);function tt(Wt,lr,Rr){var Mr,Sr;if(C.isTypedArray(Wt))if(Rr<=0){var Kr=new Wt.constructor(0),Hn=de(lr,Wt);Rr<0?(Mr=Hn,Sr=Kr):(Mr=Kr,Sr=Hn)}else if(Mr=new Wt.constructor(Rr),Sr=new Wt.constructor(Wt.length+lr.length-Rr),Rr===lr.length)Mr.set(lr),Sr.set(Wt);else if(Rr<lr.length){var ga=lr.length-Rr;Mr.set(lr.subarray(0,ga)),Sr.set(lr.subarray(ga)),Sr.set(Wt,ga)}else{var ua=Rr-lr.length;Mr.set(lr),Mr.set(Wt.subarray(0,ua),lr.length),Sr.set(Wt.subarray(ua))}else Mr=lr.concat(Wt),Sr=Rr>=0&&Rr<Mr.length?Mr.splice(Rr,Mr.length):[];return[Mr,Sr]}var st=ge(De,Ee,Ae,Ie,tt),Bt=te.redraw(De),Ft=[De,st.update,Ae,st.maxPoints];return r.add(De,te.extendTraces,Ft,W,arguments),Bt}function ie(De,Ee,Ae){De=C.getGraphDiv(De);var Ie=[],tt=te.deleteTraces,st=ie,Bt=[De,Ie],Ft=[De,Ee],Wt,lr;for(G(De,Ee,Ae),Array.isArray(Ee)||(Ee=[Ee]),Ee=Ee.map(function(Rr){return C.extendFlat({},Rr)}),T.cleanData(Ee),Wt=0;Wt<Ee.length;Wt++)De.data.push(Ee[Wt]);for(Wt=0;Wt<Ee.length;Wt++)Ie.push(-Ee.length+Wt);if(typeof Ae>"u")return lr=te.redraw(De),r.add(De,tt,Bt,st,Ft),lr;Array.isArray(Ae)||(Ae=[Ae]);try{H(De,Ie,Ae)}catch(Rr){throw De.data.splice(De.data.length-Ee.length,Ee.length),Rr}return r.startSequence(De),r.add(De,tt,Bt,st,Ft),lr=te.moveTraces(De,Ie,Ae),r.stopSequence(De),lr}function se(De,Ee){De=C.getGraphDiv(De);var Ae=[],Ie=te.addTraces,tt=se,st=[De,Ae,Ee],Bt=[De,Ee],Ft,Wt;if(typeof Ee>"u")throw new Error("indices must be an integer or array of integers.");for(Array.isArray(Ee)||(Ee=[Ee]),z(De,Ee,"indices"),Ee=q(Ee,De.data.length-1),Ee.sort(C.sorterDes),Ft=0;Ft<Ee.length;Ft+=1)Wt=De.data.splice(Ee[Ft],1)[0],Ae.push(Wt);var lr=te.redraw(De);return r.add(De,Ie,st,tt,Bt),lr}function ee(De,Ee,Ae){De=C.getGraphDiv(De);var Ie=[],tt=[],st=ee,Bt=ee,Ft=[De,Ae,Ee],Wt=[De,Ee,Ae],lr;if(H(De,Ee,Ae),Ee=Array.isArray(Ee)?Ee:[Ee],typeof Ae>"u")for(Ae=[],lr=0;lr<Ee.length;lr++)Ae.push(-Ee.length+lr);for(Ae=Array.isArray(Ae)?Ae:[Ae],Ee=q(Ee,De.data.length-1),Ae=q(Ae,De.data.length-1),lr=0;lr<De.data.length;lr++)Ee.indexOf(lr)===-1&&Ie.push(De.data[lr]);for(lr=0;lr<Ee.length;lr++)tt.push({newIndex:Ae[lr],trace:De.data[Ee[lr]]});for(tt.sort(function(Mr,Sr){return Mr.newIndex-Sr.newIndex}),lr=0;lr<tt.length;lr+=1)Ie.splice(tt[lr].newIndex,0,tt[lr].trace);De.data=Ie;var Rr=te.redraw(De);return r.add(De,st,Ft,Bt,Wt),Rr}function pe(De,Ee,Ae,Ie){De=C.getGraphDiv(De),T.clearPromiseQueue(De);var tt={};if(typeof Ee=="string")tt[Ee]=Ae;else if(C.isPlainObject(Ee))tt=C.extendFlat({},Ee),Ie===void 0&&(Ie=Ae);else return C.warn("Restyle fail.",Ee,Ae,Ie),Promise.reject();Object.keys(tt).length&&(De.changed=!0);var st=T.coerceTraceIndices(De,Ie),Bt=_e(De,tt,st),Ft=Bt.flags;Ft.calc&&(De.calcdata=void 0),Ft.clearAxisTypes&&T.clearAxisTypes(De,st,{});var Wt=[];Ft.fullReplot?Wt.push(te._doPlot):(Wt.push(i.previousPromises),i.supplyDefaults(De),Ft.markerSize&&(i.doCalcdata(De),Xe(Wt)),Ft.style&&Wt.push(M.doTraceStyle),Ft.colorbars&&Wt.push(M.doColorBars),Wt.push(p)),Wt.push(i.rehover,i.redrag,i.reselect),r.add(De,pe,[De,Bt.undoit,Bt.traces],pe,[De,Bt.redoit,Bt.traces]);var lr=C.syncOrAsync(Wt,De);return(!lr||!lr.then)&&(lr=Promise.resolve()),lr.then(function(){return De.emit("plotly_restyle",Bt.eventData),De})}function oe(De){return De===void 0?null:De}function Y(De,Ee){return Ee?function(Ae,Ie,tt){var st=P(Ae,Ie),Bt=st.set;return st.set=function(Ft){var Wt=(tt||"")+Ie;ce(Wt,st.get(),Ft,De),Bt(Ft)},st}:P}function ce(De,Ee,Ae,Ie){if(Array.isArray(Ee)||Array.isArray(Ae))for(var tt=Array.isArray(Ee)?Ee:[],st=Array.isArray(Ae)?Ae:[],Bt=Math.max(tt.length,st.length),Ft=0;Ft<Bt;Ft++)ce(De+"["+Ft+"]",tt[Ft],st[Ft],Ie);else if(C.isPlainObject(Ee)||C.isPlainObject(Ae)){var Wt=C.isPlainObject(Ee)?Ee:{},lr=C.isPlainObject(Ae)?Ae:{},Rr=C.extendFlat({},Wt,lr);for(var Mr in Rr)ce(De+"."+Mr,Wt[Mr],lr[Mr],Ie)}else Ie[De]===void 0&&(Ie[De]=oe(Ee))}function ue(De,Ee,Ae){for(var Ie in Ae){var tt=P(De,Ie);ce(Ie,tt.get(),Ae[Ie],Ee)}}function _e(De,Ee,Ae){var Ie=De._fullLayout,tt=De._fullData,st=De.data,Bt=Ie._guiEditing,Ft=Y(Ie._preGUI,Bt),Wt=C.extendDeepAll({},Ee),lr,Rr=k.traceFlags(),Mr={},Sr={},Kr;function Hn(){return Ae.map(function(){})}function ga(xr){var Yr=s.id2name(xr);Kr.indexOf(Yr)===-1&&Kr.push(Yr)}function ua(xr){return"LAYOUT"+xr+".autorange"}function Ta(xr){return"LAYOUT"+xr+".range"}function Aa(xr){for(var Yr=xr;Yr<tt.length;Yr++)if(tt[Yr]._input===st[xr])return tt[Yr]}function ia(xr,Yr,An){if(Array.isArray(xr)){xr.forEach(function(Sn){ia(Sn,Yr,An)});return}if(!(xr in Ee||T.hasParent(Ee,xr))){var Zn;if(xr.substr(0,6)==="LAYOUT")Zn=Ft(De.layout,xr.replace("LAYOUT",""));else{var sa=Ae[An],oa=Ie._tracePreGUI[Aa(sa)._fullInput.uid];Zn=Y(oa,Bt)(st[sa],xr)}xr in Sr||(Sr[xr]=Hn()),Sr[xr][An]===void 0&&(Sr[xr][An]=oe(Zn.get())),Yr!==void 0&&Zn.set(Yr)}}function $a(xr){return function(Yr){return tt[Yr][xr]}}function ci(xr){return function(Yr,An){return Yr===!1?tt[Ae[An]][xr]:null}}for(var _r in Ee){if(T.hasParent(Ee,_r))throw new Error("cannot set "+_r+" and a parent attribute simultaneously");var Qt=Ee[_r],yr,br,an,wn,Ln,Bn;if((_r==="autobinx"||_r==="autobiny")&&(_r=_r.charAt(_r.length-1)+"bins",Array.isArray(Qt)?Qt=Qt.map(ci(_r)):Qt===!1?Qt=Ae.map($a(_r)):Qt=null),Mr[_r]=Qt,_r.substr(0,6)==="LAYOUT"){an=Ft(De.layout,_r.replace("LAYOUT","")),Sr[_r]=[oe(an.get())],an.set(Array.isArray(Qt)?Qt[0]:Qt),Rr.calc=!0;continue}for(Sr[_r]=Hn(),lr=0;lr<Ae.length;lr++){yr=st[Ae[lr]],br=Aa(Ae[lr]);var xa=Ie._tracePreGUI[br._fullInput.uid];if(an=Y(xa,Bt)(yr,_r),wn=an.get(),Ln=Array.isArray(Qt)?Qt[lr%Qt.length]:Qt,Ln!==void 0){var za=an.parts[an.parts.length-1],Ia=_r.substr(0,_r.length-za.length-1),Ba=Ia?Ia+".":"",Ka=Ia?P(br,Ia).get():br;if(Bn=l.getTraceValObject(br,an.parts),Bn&&Bn.impliedEdits&&Ln!==null)for(var fa in Bn.impliedEdits)ia(C.relativeAttr(_r,fa),Bn.impliedEdits[fa],lr);else if((za==="thicknessmode"||za==="lenmode")&&wn!==Ln&&(Ln==="fraction"||Ln==="pixels")&&Ka){var Bi=Ie._size,Yi=Ka.orient,Ht=Yi==="top"||Yi==="bottom";if(za==="thicknessmode"){var kt=Ht?Bi.h:Bi.w;ia(Ba+"thickness",Ka.thickness*(Ln==="fraction"?1/kt:kt),lr)}else{var qr=Ht?Bi.w:Bi.h;ia(Ba+"len",Ka.len*(Ln==="fraction"?1/qr:qr),lr)}}else if(_r==="type"&&(Ln==="pie"!=(wn==="pie")||Ln==="funnelarea"!=(wn==="funnelarea"))){var en="x",rn="y";(Ln==="bar"||wn==="bar")&&yr.orientation==="h"&&(en="y",rn="x"),C.swapAttrs(yr,["?","?src"],"labels",en),C.swapAttrs(yr,["d?","?0"],"label",en),C.swapAttrs(yr,["?","?src"],"values",rn),wn==="pie"||wn==="funnelarea"?(P(yr,"marker.color").set(P(yr,"marker.colors").get()),Ie._pielayer.selectAll("g.trace").remove()):a.traceIs(yr,"cartesian")&&P(yr,"marker.colors").set(P(yr,"marker.color").get())}Sr[_r][lr]=oe(wn);var Wr=["swapxy","swapxyaxes","orientation","orientationaxes"];if(Wr.indexOf(_r)!==-1){if(_r==="orientation"){an.set(Ln);var tn=yr.x&&!yr.y?"h":"v";if((an.get()||tn)===br.orientation)continue}else _r==="orientationaxes"&&(yr.orientation={v:"h",h:"v"}[br.orientation]);T.swapXYData(yr),Rr.calc=Rr.clearAxisTypes=!0}else i.dataArrayContainers.indexOf(an.parts[0])!==-1?(T.manageArrayContainers(an,Ln,Sr),Rr.calc=!0):(Bn?Bn.arrayOk&&!a.traceIs(br,"regl")&&(C.isArrayOrTypedArray(Ln)||C.isArrayOrTypedArray(wn))?Rr.calc=!0:k.update(Rr,Bn):Rr.calc=!0,an.set(Ln))}}if(["swapxyaxes","orientationaxes"].indexOf(_r)!==-1&&s.swap(De,Ae),_r==="orientationaxes"){var Tn=P(De.layout,"hovermode"),dn=Tn.get();dn==="x"?Tn.set("y"):dn==="y"?Tn.set("x"):dn==="x unified"?Tn.set("y unified"):dn==="y unified"&&Tn.set("x unified")}if(["orientation","type"].indexOf(_r)!==-1){for(Kr=[],lr=0;lr<Ae.length;lr++){var It=st[Ae[lr]];a.traceIs(It,"cartesian")&&(ga(It.xaxis||"x"),ga(It.yaxis||"y"))}ia(Kr.map(ua),!0,0),ia(Kr.map(Ta),[0,1],0)}}return(Rr.calc||Rr.plot)&&(Rr.fullReplot=!0),{flags:Rr,undoit:Sr,redoit:Mr,traces:Ae,eventData:C.extendDeepNoArrays([],[Wt,Ae])}}function Le(De,Ee,Ae){De=C.getGraphDiv(De),T.clearPromiseQueue(De);var Ie={};if(typeof Ee=="string")Ie[Ee]=Ae;else if(C.isPlainObject(Ee))Ie=C.extendFlat({},Ee);else return C.warn("Relayout fail.",Ee,Ae),Promise.reject();Object.keys(Ie).length&&(De.changed=!0);var tt=_t(De,Ie),st=tt.flags;st.calc&&(De.calcdata=void 0);var Bt=[i.previousPromises];st.layoutReplot?Bt.push(M.layoutReplot):Object.keys(Ie).length&&(ze(De,st,tt)||i.supplyDefaults(De),st.legend&&Bt.push(M.doLegend),st.layoutstyle&&Bt.push(M.layoutStyles),st.axrange&&Xe(Bt,tt.rangesAltered),st.ticks&&Bt.push(M.doTicksRelayout),st.modebar&&Bt.push(M.doModeBar),st.camera&&Bt.push(M.doCamera),st.colorbars&&Bt.push(M.doColorBars),Bt.push(p)),Bt.push(i.rehover,i.redrag,i.reselect),r.add(De,Le,[De,tt.undoit],Le,[De,tt.redoit]);var Ft=C.syncOrAsync(Bt,De);return(!Ft||!Ft.then)&&(Ft=Promise.resolve(De)),Ft.then(function(){return De.emit("plotly_relayout",tt.eventData),De})}function ze(De,Ee,Ae){var Ie=De._fullLayout;if(!Ee.axrange)return!1;for(var tt in Ee)if(tt!=="axrange"&&Ee[tt])return!1;var st,Bt,Ft=function(Kr,Hn){return C.coerce(st,Bt,u,Kr,Hn)},Wt={};for(var lr in Ae.rangesAltered){var Rr=s.id2name(lr);if(st=De.layout[Rr],Bt=Ie[Rr],o(st,Bt,Ft,Wt),Bt._matchGroup){for(var Mr in Bt._matchGroup)if(Mr!==lr){var Sr=Ie[s.id2name(Mr)];Sr.autorange=Bt.autorange,Sr.range=Bt.range.slice(),Sr._input.range=Bt.range.slice()}}}return!0}function Xe(De,Ee){var Ae=Ee?function(Ie){var tt=[],st=!0;for(var Bt in Ee){var Ft=s.getFromId(Ie,Bt);if(tt.push(Bt),(Ft.ticklabelposition||"").indexOf("inside")!==-1&&Ft._anchorAxis&&tt.push(Ft._anchorAxis._id),Ft._matchGroup)for(var Wt in Ft._matchGroup)Ee[Wt]||tt.push(Wt)}return s.draw(Ie,tt,{skipTitle:st})}:function(Ie){return s.draw(Ie,"redraw")};De.push(E,M.doAutoRangeAndConstraints,Ae,M.drawData,M.finalDraw)}var Ve=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,rt=/^[xyz]axis[0-9]*\.autorange$/,mt=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function _t(De,Ee){var Ae=De.layout,Ie=De._fullLayout,tt=Ie._guiEditing,st=Y(Ie._preGUI,tt),Bt=Object.keys(Ee),Ft=s.list(De),Wt=C.extendDeepAll({},Ee),lr={},Rr,Mr,Sr;for(Bt=Object.keys(Ee),Mr=0;Mr<Bt.length;Mr++)if(Bt[Mr].indexOf("allaxes")===0){for(Sr=0;Sr<Ft.length;Sr++){var Kr=Ft[Sr]._id.substr(1),Hn=Kr.indexOf("scene")!==-1?Kr+".":"",ga=Bt[Mr].replace("allaxes",Hn+Ft[Sr]._name);Ee[ga]||(Ee[ga]=Ee[Bt[Mr]])}delete Ee[Bt[Mr]]}var ua=k.layoutFlags(),Ta={},Aa={};function ia(oa,Sn){if(Array.isArray(oa)){oa.forEach(function(Ui){ia(Ui,Sn)});return}if(!(oa in Ee||T.hasParent(Ee,oa))){var Kn=st(Ae,oa);oa in Aa||(Aa[oa]=oe(Kn.get())),Sn!==void 0&&Kn.set(Sn)}}var $a={},ci;function _r(oa){var Sn=s.name2id(oa.split(".")[0]);return $a[Sn]=1,Sn}for(var Qt in Ee){if(T.hasParent(Ee,Qt))throw new Error("cannot set "+Qt+" and a parent attribute simultaneously");for(var yr=st(Ae,Qt),br=Ee[Qt],an=yr.parts.length,wn=an-1;wn>0&&typeof yr.parts[wn]!="string";)wn--;var Ln=yr.parts[wn],Bn=yr.parts[wn-1]+"."+Ln,xa=yr.parts.slice(0,wn).join("."),za=P(De.layout,xa).get(),Ia=P(Ie,xa).get(),Ba=yr.get();if(br!==void 0){Ta[Qt]=br,Aa[Qt]=Ln==="reverse"?br:oe(Ba);var Ka=l.getLayoutValObject(Ie,yr.parts);if(Ka&&Ka.impliedEdits&&br!==null)for(var fa in Ka.impliedEdits)ia(C.relativeAttr(Qt,fa),Ka.impliedEdits[fa]);if(["width","height"].indexOf(Qt)!==-1)if(br){ia("autosize",null);var Bi=Qt==="height"?"width":"height";ia(Bi,Ie[Bi])}else Ie[Qt]=De._initialAutoSize[Qt];else if(Qt==="autosize")ia("width",br?null:Ie.width),ia("height",br?null:Ie.height);else if(Bn.match(Ve))_r(Bn),P(Ie,xa+"._inputRange").set(null);else if(Bn.match(rt)){_r(Bn),P(Ie,xa+"._inputRange").set(null);var Yi=P(Ie,xa).get();Yi._inputDomain&&(Yi._input.domain=Yi._inputDomain.slice())}else Bn.match(mt)&&P(Ie,xa+"._inputDomain").set(null);if(Ln==="type"){ci=za;var Ht=Ia.type==="linear"&&br==="log",kt=Ia.type==="log"&&br==="linear";if(Ht||kt){if(!ci||!ci.range)ia(xa+".autorange",!0);else if(Ia.autorange)Ht&&(ci.range=ci.range[1]>ci.range[0]?[1,2]:[2,1]);else{var qr=ci.range[0],en=ci.range[1];Ht?(qr<=0&&en<=0&&ia(xa+".autorange",!0),qr<=0?qr=en/1e6:en<=0&&(en=qr/1e6),ia(xa+".range[0]",Math.log(qr)/Math.LN10),ia(xa+".range[1]",Math.log(en)/Math.LN10)):(ia(xa+".range[0]",Math.pow(10,qr)),ia(xa+".range[1]",Math.pow(10,en)))}Array.isArray(Ie._subplots.polar)&&Ie._subplots.polar.length&&Ie[yr.parts[0]]&&yr.parts[1]==="radialaxis"&&delete Ie[yr.parts[0]]._subplot.viewInitial["radialaxis.range"],a.getComponentMethod("annotations","convertCoords")(De,Ia,br,ia),a.getComponentMethod("images","convertCoords")(De,Ia,br,ia)}else ia(xa+".autorange",!0),ia(xa+".range",null);P(Ie,xa+"._inputRange").set(null)}else if(Ln.match(b)){var rn=P(Ie,Qt).get(),Wr=(br||{}).type;(!Wr||Wr==="-")&&(Wr="linear"),a.getComponentMethod("annotations","convertCoords")(De,rn,Wr,ia),a.getComponentMethod("images","convertCoords")(De,rn,Wr,ia)}var tn=_.containerArrayMatch(Qt);if(tn){Rr=tn.array,Mr=tn.index;var Tn=tn.property,dn=Ka||{editType:"calc"};Mr!==""&&Tn===""&&(_.isAddVal(br)?Aa[Qt]=null:_.isRemoveVal(br)?Aa[Qt]=(P(Ae,Rr).get()||[])[Mr]:C.warn("unrecognized full object value",Ee)),k.update(ua,dn),lr[Rr]||(lr[Rr]={});var It=lr[Rr][Mr];It||(It=lr[Rr][Mr]={}),It[Tn]=br,delete Ee[Qt]}else Ln==="reverse"?(za.range?za.range.reverse():(ia(xa+".autorange",!0),za.range=[1,0]),Ia.autorange?ua.calc=!0:ua.plot=!0):(Qt==="dragmode"&&(br===!1&&Ba!==!1||br!==!1&&Ba===!1)||Ie._has("scatter-like")&&Ie._has("regl")&&Qt==="dragmode"&&(br==="lasso"||br==="select")&&!(Ba==="lasso"||Ba==="select")?ua.plot=!0:Ka?k.update(ua,Ka):ua.calc=!0,yr.set(br))}}for(Rr in lr){var xr=_.applyContainerArrayChanges(De,st(Ae,Rr),lr[Rr],ua,st);xr||(ua.plot=!0)}for(var Yr in $a){ci=s.getFromId(De,Yr);var An=ci&&ci._constraintGroup;if(An){ua.calc=!0;for(var Zn in An)$a[Zn]||(s.getFromId(De,Zn)._constraintShrinkable=!0)}}(vt(De)||Ee.height||Ee.width)&&(ua.plot=!0);var sa=Ie.shapes;for(Mr=0;Mr<sa.length;Mr++)if(sa[Mr].showlegend){ua.calc=!0;break}return(ua.plot||ua.calc)&&(ua.layoutReplot=!0),{flags:ua,rangesAltered:$a,undoit:Aa,redoit:Ta,eventData:Wt}}function vt(De){var Ee=De._fullLayout,Ae=Ee.width,Ie=Ee.height;return De.layout.autosize&&i.plotAutoSize(De,De.layout,Ee),Ee.width!==Ae||Ee.height!==Ie}function ut(De,Ee,Ae,Ie){De=C.getGraphDiv(De),T.clearPromiseQueue(De),C.isPlainObject(Ee)||(Ee={}),C.isPlainObject(Ae)||(Ae={}),Object.keys(Ee).length&&(De.changed=!0),Object.keys(Ae).length&&(De.changed=!0);var tt=T.coerceTraceIndices(De,Ie),st=_e(De,C.extendFlat({},Ee),tt),Bt=st.flags,Ft=_t(De,C.extendFlat({},Ae)),Wt=Ft.flags;(Bt.calc||Wt.calc)&&(De.calcdata=void 0),Bt.clearAxisTypes&&T.clearAxisTypes(De,tt,Ae);var lr=[];Wt.layoutReplot?lr.push(M.layoutReplot):Bt.fullReplot?lr.push(te._doPlot):(lr.push(i.previousPromises),ze(De,Wt,Ft)||i.supplyDefaults(De),Bt.style&&lr.push(M.doTraceStyle),(Bt.colorbars||Wt.colorbars)&&lr.push(M.doColorBars),Wt.legend&&lr.push(M.doLegend),Wt.layoutstyle&&lr.push(M.layoutStyles),Wt.axrange&&Xe(lr,Ft.rangesAltered),Wt.ticks&&lr.push(M.doTicksRelayout),Wt.modebar&&lr.push(M.doModeBar),Wt.camera&&lr.push(M.doCamera),lr.push(p)),lr.push(i.rehover,i.redrag,i.reselect),r.add(De,ut,[De,st.undoit,Ft.undoit,st.traces],ut,[De,st.redoit,Ft.redoit,st.traces]);var Rr=C.syncOrAsync(lr,De);return(!Rr||!Rr.then)&&(Rr=Promise.resolve(De)),Rr.then(function(){return De.emit("plotly_update",{data:st.eventData,layout:Ft.eventData}),De})}function Fe(De){return function(Ae){Ae._fullLayout._guiEditing=!0;var Ie=De.apply(null,arguments);return Ae._fullLayout._guiEditing=!1,Ie}}var Pe=[{pattern:/^hiddenlabels/,attr:"legend.uirevision"},{pattern:/^((x|y)axis\d*)\.((auto)?range|title\.text)/},{pattern:/axis\d*\.showspikes$/,attr:"modebar.uirevision"},{pattern:/(hover|drag)mode$/,attr:"modebar.uirevision"},{pattern:/^(scene\d*)\.camera/},{pattern:/^(geo\d*)\.(projection|center|fitbounds)/},{pattern:/^(ternary\d*\.[abc]axis)\.(min|title\.text)$/},{pattern:/^(polar\d*\.radialaxis)\.((auto)?range|angle|title\.text)/},{pattern:/^(polar\d*\.angularaxis)\.rotation/},{pattern:/^(mapbox\d*)\.(center|zoom|bearing|pitch)/},{pattern:/^(map\d*)\.(center|zoom|bearing|pitch)/},{pattern:/^legend\.(x|y)$/,attr:"editrevision"},{pattern:/^(shapes|annotations)/,attr:"editrevision"},{pattern:/^title\.text$/,attr:"editrevision"}],be=[{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 Ye(De,Ee){for(var Ae=0;Ae<Ee.length;Ae++){var Ie=Ee[Ae],tt=De.match(Ie.pattern);if(tt){var st=tt[1]||"";return{head:st,tail:De.substr(st.length+1),attr:Ie.attr}}}}function yt(De,Ee){var Ae=P(Ee,De).get();if(Ae!==void 0)return Ae;var Ie=De.split(".");for(Ie.pop();Ie.length>1;)if(Ie.pop(),Ae=P(Ee,Ie.join(".")+".uirevision").get(),Ae!==void 0)return Ae;return Ee.uirevision}function wt(De,Ee){for(var Ae=0;Ae<Ee.length;Ae++)if(Ee[Ae]._fullInput.uid===De)return Ae;return-1}function ht(De,Ee,Ae){for(var Ie=0;Ie<Ee.length;Ie++)if(Ee[Ie].uid===De)return Ie;return!Ee[Ae]||Ee[Ae].uid?-1:Ae}function Yt(De,Ee){var Ae=C.isPlainObject(De),Ie=Array.isArray(De);return Ae||Ie?(Ae&&C.isPlainObject(Ee)||Ie&&Array.isArray(Ee))&&JSON.stringify(De)===JSON.stringify(Ee):De===Ee}function $t(De,Ee,Ae,Ie){var tt=Ie._preGUI,st,Bt,Ft,Wt,lr,Rr,Mr,Sr,Kr,Hn,ga=[],ua={},Ta={};for(st in tt){if(lr=Ye(st,Pe),lr){if(Kr=lr.head,Hn=lr.tail,Bt=lr.attr||Kr+".uirevision",Ft=P(Ie,Bt).get(),Wt=Ft&&yt(Bt,Ee),Wt&&Wt===Ft){if(Rr=tt[st],Rr===null&&(Rr=void 0),Mr=P(Ee,st),Sr=Mr.get(),Yt(Sr,Rr)){Sr===void 0&&Hn==="autorange"&&ga.push(Kr),Mr.set(oe(P(Ie,st).get()));continue}else if(Hn==="autorange"||Hn.substr(0,6)==="range["){var Aa=tt[Kr+".range[0]"],ia=tt[Kr+".range[1]"],$a=tt[Kr+".autorange"];if($a||$a===null&&Aa===null&&ia===null){if(!(Kr in ua)){var ci=P(Ee,Kr).get();ua[Kr]=ci&&(ci.autorange||ci.autorange!==!1&&(!ci.range||ci.range.length!==2))}if(ua[Kr]){Mr.set(oe(P(Ie,st).get()));continue}}}}}else C.warn("unrecognized GUI edit: "+st);delete tt[st],lr&&lr.tail.substr(0,6)==="range["&&(Ta[lr.head]=1)}for(var _r=0;_r<ga.length;_r++){var Qt=ga[_r];if(Ta[Qt]){var yr=P(Ee,Qt).get();yr&&delete yr.autorange}}var br=Ie._tracePreGUI;for(var an in br){var wn=br[an],Ln=null,Bn;for(st in wn){if(!Ln){var xa=wt(an,Ae);if(xa<0){delete br[an];break}var za=Ae[xa];Bn=za._fullInput;var Ia=ht(an,De,Bn.index);if(Ia<0){delete br[an];break}Ln=De[Ia]}if(lr=Ye(st,be),lr){if(lr.attr?(Ft=P(Ie,lr.attr).get(),Wt=Ft&&yt(lr.attr,Ee)):(Ft=Bn.uirevision,Wt=Ln.uirevision,Wt===void 0&&(Wt=Ee.uirevision)),Wt&&Wt===Ft&&(Rr=wn[st],Rr===null&&(Rr=void 0),Mr=P(Ln,st),Sr=Mr.get(),Yt(Sr,Rr))){Mr.set(oe(P(Bn,st).get()));continue}}else C.warn("unrecognized GUI edit: "+st+" in trace uid "+an);delete wn[st]}}}function fr(De,Ee,Ae,Ie){var tt,st;function Bt(){return te.addFrames(De,tt)}De=C.getGraphDiv(De),T.clearPromiseQueue(De);var Ft=De._fullData,Wt=De._fullLayout;if(!C.isPlotDiv(De)||!Ft||!Wt)st=te.newPlot(De,Ee,Ae,Ie);else{if(C.isPlainObject(Ee)){var lr=Ee;Ee=lr.data,Ae=lr.layout,Ie=lr.config,tt=lr.frames}var Rr=!1;if(Ie){const Bn=C.extendDeepAll({},De._context);De._context=void 0,B(De,Ie),Rr=!T.collectionsAreEqual(Bn,De._context)}if(Rr){const Bn=De._ev.eventNames().map(xa=>[xa,De._ev.listeners(xa)]);st=te.newPlot(De,Ee,Ae,Ie).then(()=>{for(const[xa,za]of Bn)za.forEach(Ia=>De.on(xa,Ia));return te.react(De,Ee,Ae,Ie)})}else{De.data=Ee||[],T.cleanData(De.data),De.layout=Ae||{},T.cleanLayout(De.layout),$t(De.data,De.layout,Ft,Wt),i.supplyDefaults(De,{skipUpdateCalc:!0});var Mr=De._fullData,Sr=De._fullLayout,Kr=Sr.datarevision===void 0,Hn=Sr.transition,ga=Ur(De,Wt,Sr,Kr,Hn),ua=ga.newDataRevision,Ta=mr(De,Ft,Mr,Kr,Hn,ua);if(vt(De)&&(ga.layoutReplot=!0),Ta.calc||ga.calc){De.calcdata=void 0;for(var Aa=Object.getOwnPropertyNames(Sr),ia=0;ia<Aa.length;ia++){var $a=Aa[ia],ci=$a.substring(0,5);if(ci==="xaxis"||ci==="yaxis"){var _r=Sr[$a]._emptyCategories;_r&&_r()}}}else i.supplyDefaultsUpdateCalc(De.calcdata,Mr);var Qt=[];if(tt&&(De._transitionData={},i.createTransitionData(De),Qt.push(Bt)),Sr.transition&&(Ta.anim||ga.anim))ga.ticks&&Qt.push(M.doTicksRelayout),i.doCalcdata(De),M.doAutoRangeAndConstraints(De),Qt.push(function(){return i.transitionFromReact(De,Ta,ga,Wt)});else if(Ta.fullReplot||ga.layoutReplot)De._fullLayout._skipDefaults=!0,Qt.push(te._doPlot);else{for(var yr in ga.arrays){var br=ga.arrays[yr];if(br.length){var an=a.getComponentMethod(yr,"drawOne");if(an!==C.noop)for(var wn=0;wn<br.length;wn++)an(De,br[wn]);else{var Ln=a.getComponentMethod(yr,"draw");if(Ln===C.noop)throw new Error("cannot draw components: "+yr);Ln(De)}}}Qt.push(i.previousPromises),Ta.style&&Qt.push(M.doTraceStyle),(Ta.colorbars||ga.colorbars)&&Qt.push(M.doColorBars),ga.legend&&Qt.push(M.doLegend),ga.layoutstyle&&Qt.push(M.layoutStyles),ga.axrange&&Xe(Qt),ga.ticks&&Qt.push(M.doTicksRelayout),ga.modebar&&Qt.push(M.doModeBar),ga.camera&&Qt.push(M.doCamera),Qt.push(p)}Qt.push(i.rehover,i.redrag,i.reselect),st=C.syncOrAsync(Qt,De),(!st||!st.then)&&(st=Promise.resolve(De))}}return st.then(()=>(Rr||De.emit("plotly_react",{config:Ie,data:Ee,layout:Ae}),De))}function mr(De,Ee,Ae,Ie,tt,st){var Bt=Ee.length===Ae.length;if(!tt&&!Bt)return{fullReplot:!0,calc:!0};var Ft=k.traceFlags();Ft.arrays={},Ft.nChanges=0,Ft.nChangesAnim=0;var Wt,lr;function Rr(Kr){var Hn=l.getTraceValObject(lr,Kr);return!lr._module.animatable&&Hn.anim&&(Hn.anim=!1),Hn}var Mr={getValObject:Rr,flags:Ft,immutable:Ie,transition:tt,newDataRevision:st,gd:De},Sr={};for(Wt=0;Wt<Ee.length;Wt++)if(Ae[Wt]){if(lr=Ae[Wt]._fullInput,Sr[lr.uid])continue;Sr[lr.uid]=1,jr(Ee[Wt]._fullInput,lr,[],Mr)}return(Ft.calc||Ft.plot)&&(Ft.fullReplot=!0),tt&&Ft.nChanges&&Ft.nChangesAnim&&(Ft.anim=Ft.nChanges===Ft.nChangesAnim&&Bt?"all":"some"),Ft}function Ur(De,Ee,Ae,Ie,tt){var st=k.layoutFlags();st.arrays={},st.rangesAltered={},st.nChanges=0,st.nChangesAnim=0;function Bt(Sr){return l.getLayoutValObject(Ae,Sr)}for(var Ft in Ae)if(!(!Ft.startsWith("xaxis")&&!Ft.startsWith("yaxis"))&&Ee[Ft]){var Wt=Ae[Ft].domain,lr=Ee[Ft].domain,Rr=Ee[Ft]._inputDomain;Ee[Ft]._inputDomain&&(Wt[0]===Rr[0]&&Wt[1]===Rr[1]?Ae[Ft].domain=Ee[Ft].domain:(Wt[0]!==lr[0]||Wt[1]!==lr[1])&&(Ae[Ft]._inputDomain=null))}var Mr={getValObject:Bt,flags:st,immutable:Ie,transition:tt,gd:De};return jr(Ee,Ae,[],Mr),(st.plot||st.calc)&&(st.layoutReplot=!0),tt&&st.nChanges&&st.nChangesAnim&&(st.anim=st.nChanges===st.nChangesAnim?"all":"some"),st}function jr(De,Ee,Ae,Ie){var tt,st,Bt,Ft=Ie.getValObject,Wt=Ie.flags,lr=Ie.immutable,Rr=Ie.inArray,Mr=Ie.arrayIndex;function Sr(){var xa=tt.editType;if(Rr&&xa.indexOf("arraydraw")!==-1){C.pushUnique(Wt.arrays[Rr],Mr);return}k.update(Wt,tt),xa!=="none"&&Wt.nChanges++,Ie.transition&&tt.anim&&Wt.nChangesAnim++,(Ve.test(Bt)||rt.test(Bt))&&(Wt.rangesAltered[Ae[0]]=1),st==="datarevision"&&(Wt.newDataRevision=1)}function Kr(xa){return xa.valType==="data_array"||xa.arrayOk}for(st in De){if(Wt.calc&&!Ie.transition)return;var Hn=De[st],ga=Ee[st],ua=Ae.concat(st);if(Bt=ua.join("."),!(st.charAt(0)==="_"||typeof Hn=="function"||Hn===ga)){if((st==="tick0"||st==="dtick")&&Ae[0]!=="geo"){var Ta=Ee.tickmode;if(Ta==="auto"||Ta==="array"||!Ta)continue}if(!(st==="range"&&Ee.autorange)&&!((st==="zmin"||st==="zmax")&&Ee.type==="contourcarpet")&&(tt=Ft(ua),!!tt&&!(tt._compareAsJSON&&JSON.stringify(Hn)===JSON.stringify(ga)))){var Aa=tt.valType,ia,$a=Kr(tt),ci=Array.isArray(Hn),_r=Array.isArray(ga);if(ci&&_r){var Qt="_input_"+st,yr=De[Qt],br=Ee[Qt];if(Array.isArray(yr)&&yr===br)continue}if(ga===void 0)$a&&ci?Wt.calc=!0:Sr();else if(tt._isLinkedToArray){var an=[],wn=!1;Rr||(Wt.arrays[st]=an);var Ln=Math.min(Hn.length,ga.length),Bn=Math.max(Hn.length,ga.length);if(Ln!==Bn)if(tt.editType==="arraydraw")wn=!0;else{Sr();continue}for(ia=0;ia<Ln;ia++)jr(Hn[ia],ga[ia],ua.concat(ia),C.extendFlat({inArray:st,arrayIndex:ia},Ie));if(wn)for(ia=Ln;ia<Bn;ia++)an.push(ia)}else!Aa&&C.isPlainObject(Hn)?jr(Hn,ga,ua,Ie):$a?ci&&_r?(lr&&(Wt.calc=!0),(lr||Ie.newDataRevision)&&Sr()):ci!==_r?Wt.calc=!0:Sr():ci&&_r?(Hn.length!==ga.length||String(Hn)!==String(ga))&&Sr():Sr()}}}for(st in Ee)if(!(st in De||st.charAt(0)==="_"||typeof Ee[st]=="function"))if(tt=Ft(Ae.concat(st)),Kr(tt)&&Array.isArray(Ee[st])){Wt.calc=!0;return}else Sr()}function fn(De,Ee,Ae){if(De=C.getGraphDiv(De),!C.isPlotDiv(De))throw new Error("This element is not a Plotly plot: "+De+". It's likely that you've failed to create a plot before animating it. For more details, see https://plotly.com/javascript/animations/");var Ie=De._transitionData;Ie._frameQueue||(Ie._frameQueue=[]),Ae=i.supplyAnimationDefaults(Ae);var tt=Ae.transition,st=Ae.frame;Ie._frameWaitingCnt===void 0&&(Ie._frameWaitingCnt=0);function Bt(lr){return Array.isArray(tt)?lr>=tt.length?tt[0]:tt[lr]:tt}function Ft(lr){return Array.isArray(st)?lr>=st.length?st[0]:st[lr]:st}function Wt(lr,Rr){var Mr=0;return function(){if(lr&&++Mr===Rr)return lr()}}return new Promise(function(lr,Rr){function Mr(){if(Ie._frameQueue.length!==0){for(;Ie._frameQueue.length;){var Ln=Ie._frameQueue.pop();Ln.onInterrupt&&Ln.onInterrupt()}De.emit("plotly_animationinterrupted",[])}}function Sr(Ln){if(Ln.length!==0){for(var Bn=0;Bn<Ln.length;Bn++){var xa;Ln[Bn].type==="byname"?xa=i.computeFrame(De,Ln[Bn].name):xa=Ln[Bn].data;var za=Ft(Bn),Ia=Bt(Bn);Ia.duration=Math.min(Ia.duration,za.duration);var Ba={frame:xa,name:Ln[Bn].name,frameOpts:za,transitionOpts:Ia};Bn===Ln.length-1&&(Ba.onComplete=Wt(lr,2),Ba.onInterrupt=Rr),Ie._frameQueue.push(Ba)}Ae.mode==="immediate"&&(Ie._lastFrameAt=-1/0),Ie._animationRaf||ga()}}function Kr(){De.emit("plotly_animated"),window.cancelAnimationFrame(Ie._animationRaf),Ie._animationRaf=null}function Hn(){Ie._currentFrame&&Ie._currentFrame.onComplete&&Ie._currentFrame.onComplete();var Ln=Ie._currentFrame=Ie._frameQueue.shift();if(Ln){var Bn=Ln.name?Ln.name.toString():null;De._fullLayout._currentFrame=Bn,Ie._lastFrameAt=Date.now(),Ie._timeToNext=Ln.frameOpts.duration,i.transition(De,Ln.frame.data,Ln.frame.layout,T.coerceTraceIndices(De,Ln.frame.traces),Ln.frameOpts,Ln.transitionOpts).then(function(){Ln.onComplete&&Ln.onComplete()}),De.emit("plotly_animatingframe",{name:Bn,frame:Ln.frame,animation:{frame:Ln.frameOpts,transition:Ln.transitionOpts}})}else Kr()}function ga(){De.emit("plotly_animating"),Ie._lastFrameAt=-1/0,Ie._timeToNext=0,Ie._runningTransitions=0,Ie._currentFrame=null;var Ln=function(){Ie._animationRaf=window.requestAnimationFrame(Ln),Date.now()-Ie._lastFrameAt>Ie._timeToNext&&Hn()};Ln()}var ua=0;function Ta(Ln){return Array.isArray(tt)?ua>=tt.length?Ln.transitionOpts=tt[ua]:Ln.transitionOpts=tt[0]:Ln.transitionOpts=tt,ua++,Ln}var Aa,ia,$a=[],ci=Ee==null,_r=Array.isArray(Ee),Qt=!ci&&!_r&&C.isPlainObject(Ee);if(Qt)$a.push({type:"object",data:Ta(C.extendFlat({},Ee))});else if(ci||["string","number"].indexOf(typeof Ee)!==-1)for(Aa=0;Aa<Ie._frames.length;Aa++)ia=Ie._frames[Aa],ia&&(ci||String(ia.group)===String(Ee))&&$a.push({type:"byname",name:String(ia.name),data:Ta({name:ia.name})});else if(_r)for(Aa=0;Aa<Ee.length;Aa++){var yr=Ee[Aa];["number","string"].indexOf(typeof yr)!==-1?(yr=String(yr),$a.push({type:"byname",name:yr,data:Ta({name:yr})})):C.isPlainObject(yr)&&$a.push({type:"object",data:Ta(C.extendFlat({},yr))})}for(Aa=0;Aa<$a.length;Aa++)if(ia=$a[Aa],ia.type==="byname"&&!Ie._frameHash[ia.data.name]){C.warn('animate failure: frame not found: "'+ia.data.name+'"'),Rr();return}["next","immediate"].indexOf(Ae.mode)!==-1&&Mr(),Ae.direction==="reverse"&&$a.reverse();var br=De._fullLayout._currentFrame;if(br&&Ae.fromcurrent){var an=-1;for(Aa=0;Aa<$a.length;Aa++)if(ia=$a[Aa],ia.type==="byname"&&ia.name===br){an=Aa;break}if(an>0&&an<$a.length-1){var wn=[];for(Aa=0;Aa<$a.length;Aa++)ia=$a[Aa],($a[Aa].type!=="byname"||Aa>an)&&wn.push(ia);$a=wn}}$a.length>0?Sr($a):(De.emit("plotly_animated"),lr())})}function Br(De,Ee,Ae){if(De=C.getGraphDiv(De),Ee==null)return Promise.resolve();if(!C.isPlotDiv(De))throw new Error("This element is not a Plotly plot: "+De+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var Ie,tt,st,Bt,Ft=De._transitionData._frames,Wt=De._transitionData._frameHash;if(!Array.isArray(Ee))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+Ee);var lr=Ft.length+Ee.length*2,Rr=[],Mr={};for(Ie=Ee.length-1;Ie>=0;Ie--)if(C.isPlainObject(Ee[Ie])){var Sr=Ee[Ie].name,Kr=(Wt[Sr]||Mr[Sr]||{}).name,Hn=Ee[Ie].name,ga=Wt[Kr]||Mr[Kr];Kr&&Hn&&typeof Hn=="number"&&ga&&A<y&&(A++,C.warn('addFrames: overwriting frame "'+(Wt[Kr]||Mr[Kr]).name+'" with a frame whose name of type "number" also equates to "'+Kr+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),A===y&&C.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.")),Mr[Sr]={name:Sr},Rr.push({frame:i.supplyFrameDefaults(Ee[Ie]),index:Ae&&Ae[Ie]!==void 0&&Ae[Ie]!==null?Ae[Ie]:lr+Ie})}Rr.sort(function(Qt,yr){return Qt.index>yr.index?-1:Qt.index<yr.index?1:0});var ua=[],Ta=[],Aa=Ft.length;for(Ie=Rr.length-1;Ie>=0;Ie--){if(tt=Rr[Ie].frame,typeof tt.name=="number"&&C.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!tt.name)for(;Wt[tt.name="frame "+De._transitionData._counter++];);if(Wt[tt.name]){for(st=0;st<Ft.length&&(Ft[st]||{}).name!==tt.name;st++);ua.push({type:"replace",index:st,value:tt}),Ta.unshift({type:"replace",index:st,value:Ft[st]})}else Bt=Math.max(0,Math.min(Rr[Ie].index,Aa)),ua.push({type:"insert",index:Bt,value:tt}),Ta.unshift({type:"delete",index:Bt}),Aa++}var ia=i.modifyFrames,$a=i.modifyFrames,ci=[De,Ta],_r=[De,ua];return r&&r.add(De,ia,ci,$a,_r),i.modifyFrames(De,ua)}function Qr(De,Ee){if(De=C.getGraphDiv(De),!C.isPlotDiv(De))throw new Error("This element is not a Plotly plot: "+De);var Ae,Ie,tt=De._transitionData._frames,st=[],Bt=[];if(!Ee)for(Ee=[],Ae=0;Ae<tt.length;Ae++)Ee.push(Ae);for(Ee=Ee.slice(),Ee.sort(),Ae=Ee.length-1;Ae>=0;Ae--)Ie=Ee[Ae],st.push({type:"delete",index:Ie}),Bt.unshift({type:"insert",index:Ie,value:tt[Ie]});var Ft=i.modifyFrames,Wt=i.modifyFrames,lr=[De,Bt],Rr=[De,st];return r&&r.add(De,Ft,lr,Wt,Rr),i.modifyFrames(De,st)}function Ot(De){De=C.getGraphDiv(De);var Ee=De._fullLayout||{},Ae=De._fullData||[];return i.cleanPlot([],{},Ae,Ee),i.purge(De),t.purge(De),Ee._container&&Ee._container.remove(),delete De._context,De}function $e(De){var Ee=De._fullLayout,Ae=De.getBoundingClientRect();if(!C.equalDomRects(Ae,Ee._lastBBox)){var Ie=Ee._invTransform=C.inverseTransformMatrix(C.getFullTransformMatrix(De));Ee._invScaleX=Math.sqrt(Ie[0][0]*Ie[0][0]+Ie[0][1]*Ie[0][1]+Ie[0][2]*Ie[0][2]),Ee._invScaleY=Math.sqrt(Ie[1][0]*Ie[1][0]+Ie[1][1]*Ie[1][1]+Ie[1][2]*Ie[1][2]),Ee._lastBBox=Ae}}function ot(De){var Ee=Z.select(De),Ae=De._fullLayout;if(Ae._calcInverseTransform=$e,Ae._calcInverseTransform(De),Ae._container=Ee.selectAll(".plot-container").data([0]),Ae._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0).style({width:"100%",height:"100%"}),Ae._paperdiv=Ae._container.selectAll(".svg-container").data([0]),Ae._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),Ae._glcontainer=Ae._paperdiv.selectAll(".gl-container").data([{}]),Ae._glcontainer.enter().append("div").classed("gl-container",!0),Ae._paperdiv.selectAll(".main-svg").remove(),Ae._paperdiv.select(".modebar-container").remove(),Ae._paper=Ae._paperdiv.insert("svg",":first-child").classed("main-svg",!0),Ae._toppaper=Ae._paperdiv.append("svg").classed("main-svg",!0),Ae._modebardiv=Ae._paperdiv.append("div"),delete Ae._modeBar,Ae._hoverpaper=Ae._paperdiv.append("svg").classed("main-svg",!0),!Ae._uid){var Ie={};Z.selectAll("defs").each(function(){this.id&&(Ie[this.id.split("-")[1]]=1)}),Ae._uid=C.randstr(Ie)}Ae._paperdiv.selectAll(".main-svg").attr(m.svgAttrs),Ae._defs=Ae._paper.append("defs").attr("id","defs-"+Ae._uid),Ae._clips=Ae._defs.append("g").classed("clips",!0),Ae._topdefs=Ae._toppaper.append("defs").attr("id","topdefs-"+Ae._uid),Ae._topclips=Ae._topdefs.append("g").classed("clips",!0),Ae._bgLayer=Ae._paper.append("g").classed("bglayer",!0),Ae._draggers=Ae._paper.append("g").classed("draglayer",!0);var tt=Ae._paper.append("g").classed("layer-below",!0);Ae._imageLowerLayer=tt.append("g").classed("imagelayer",!0),Ae._shapeLowerLayer=tt.append("g").classed("shapelayer",!0),Ae._cartesianlayer=Ae._paper.append("g").classed("cartesianlayer",!0),Ae._polarlayer=Ae._paper.append("g").classed("polarlayer",!0),Ae._smithlayer=Ae._paper.append("g").classed("smithlayer",!0),Ae._ternarylayer=Ae._paper.append("g").classed("ternarylayer",!0),Ae._geolayer=Ae._paper.append("g").classed("geolayer",!0),Ae._funnelarealayer=Ae._paper.append("g").classed("funnelarealayer",!0),Ae._pielayer=Ae._paper.append("g").classed("pielayer",!0),Ae._iciclelayer=Ae._paper.append("g").classed("iciclelayer",!0),Ae._treemaplayer=Ae._paper.append("g").classed("treemaplayer",!0),Ae._sunburstlayer=Ae._paper.append("g").classed("sunburstlayer",!0),Ae._indicatorlayer=Ae._toppaper.append("g").classed("indicatorlayer",!0),Ae._glimages=Ae._paper.append("g").classed("glimages",!0);var st=Ae._toppaper.append("g").classed("layer-above",!0);Ae._imageUpperLayer=st.append("g").classed("imagelayer",!0),Ae._shapeUpperLayer=st.append("g").classed("shapelayer",!0),Ae._selectionLayer=Ae._toppaper.append("g").classed("selectionlayer",!0),Ae._infolayer=Ae._toppaper.append("g").classed("infolayer",!0),Ae._menulayer=Ae._toppaper.append("g").classed("menulayer",!0),Ae._zoomlayer=Ae._toppaper.append("g").classed("zoomlayer",!0),Ae._hoverlayer=Ae._hoverpaper.append("g").classed("hoverlayer",!0),Ae._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),De.emit("plotly_framework")}te.animate=fn,te.addFrames=Br,te.deleteFrames=Qr,te.addTraces=ie,te.deleteTraces=se,te.extendTraces=me,te.moveTraces=ee,te.prependTraces=W,te.newPlot=V,te._doPlot=f,te.purge=Ot,te.react=fr,te.redraw=U,te.relayout=Le,te.restyle=pe,te.setPlotConfig=x,te.update=ut,te._guiRelayout=Fe(Le),te._guiRestyle=Fe(pe),te._guiUpdate=Fe(ut),te._storeDirectGUIEdit=ue}}),o0=Ne({"src/snapshot/helpers.js"(te){var Z=Yo();te.getDelay=function(C){return C._has&&(C._has("gl3d")||C._has("mapbox")||C._has("map"))?500:0},te.getRedrawFunc=function(C){return function(){Z.getComponentMethod("colorbar","draw")(C)}},te.encodeSVG=function(C){return"data:image/svg+xml,"+encodeURIComponent(C)},te.encodeJSON=function(C){return"data:application/json,"+encodeURIComponent(C)};var v=window.URL||window.webkitURL;te.createObjectURL=function(C){return v.createObjectURL(C)},te.revokeObjectURL=function(C){return v.revokeObjectURL(C)},te.createBlob=function(C,P){if(P==="svg")return new window.Blob([C],{type:"image/svg+xml;charset=utf-8"});if(P==="full-json")return new window.Blob([C],{type:"application/json;charset=utf-8"});var t=w(window.atob(C));return new window.Blob([t],{type:"image/"+P})},te.octetStream=function(C){document.location.href="data:application/octet-stream"+C};function w(C){for(var P=C.length,t=new ArrayBuffer(P),r=new Uint8Array(t),a=0;a<P;a++)r[a]=C.charCodeAt(a);return t}te.IMAGE_URL_PREFIX=/^data:image\/\w+;base64,/}}),Gp=Ne({"src/snapshot/tosvg.js"(te,Z){var v=xn();In();var w=zs(),C=Ha();hp();var P=/"/g,t="TOBESTRIPPED",r=new RegExp('("'+t+")|("+t+'")',"g");function a(i){var s=v.select("body").append("div").style({display:"none"}).html(""),o=i.replace(/(&[^;]*;)/gi,function(u){return u==="&lt;"?"&#60;":u==="&rt;"?"&#62;":u.indexOf("<")!==-1||u.indexOf(">")!==-1?"":s.html(u).text()});return s.remove(),o}function l(i){return i.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&amp;")}Z.exports=function(s,o,u){var d=s._fullLayout,h=d._paper,g=d._toppaper,m=d.width,E=d.height,c;h.insert("rect",":first-child").call(w.setRect,0,0,m,E).call(C.fill,d.paper_bgcolor);var _=d._basePlotModules||[];for(c=0;c<_.length;c++){var T=_[c];T.toSVG&&T.toSVG(s)}if(g){var M=g.node().childNodes,k=Array.prototype.slice.call(M);for(c=0;c<k.length;c++){var b=k[c];b.childNodes.length&&h.node().appendChild(b)}}d._draggers&&d._draggers.remove(),h.node().style.background="",h.selectAll("text").attr({"data-unformatted":null,"data-math":null}).each(function(){var y=v.select(this);if(this.style.visibility==="hidden"||this.style.display==="none"){y.remove();return}else y.style({visibility:null,display:null});var f=this.style.fontFamily;f&&f.indexOf('"')!==-1&&y.style("font-family",f.replace(P,t));var p=this.style.fontWeight;p&&(p==="normal"||p==="400")&&y.style("font-weight",void 0);var x=this.style.fontStyle;x&&x==="normal"&&y.style("font-style",void 0);var N=this.style.fontVariant;N&&N==="normal"&&y.style("font-variant",void 0)}),h.selectAll(".gradient_filled,.pattern_filled").each(function(){var y=v.select(this),f=this.style.fill;f&&f.indexOf("url(")!==-1&&y.style("fill",f.replace(P,t));var p=this.style.stroke;p&&p.indexOf("url(")!==-1&&y.style("stroke",p.replace(P,t))}),(o==="pdf"||o==="eps")&&h.selectAll("#MathJax_SVG_glyphs path").attr("stroke-width",0),o==="svg"&&u&&(h.attr("width",u*m),h.attr("height",u*E),h.attr("viewBox","0 0 "+m+" "+E));var A=new window.XMLSerializer().serializeToString(h.node());return A=a(A),A=l(A),A=A.replace(r,"'"),A}}}),q1=Ne({"src/snapshot/svgtoimg.js"(te,Z){var v=In(),w=B0().EventEmitter,C=o0();function P(t){var r=t.emitter||new w,a=new Promise(function(l,i){var s=window.Image,o=t.svg,u=t.format||"png",d=t.canvas,h=t.scale||1,g=t.width||300,m=t.height||150,E=h*g,c=h*m,_=d.getContext("2d",{willReadFrequently:!0}),T=new s,M,k;u==="svg"||v.isSafari()?k=C.encodeSVG(o):(M=C.createBlob(o,"svg"),k=C.createObjectURL(M)),d.width=E,d.height=c,T.onload=function(){var b;switch(M=null,C.revokeObjectURL(k),u!=="svg"&&_.drawImage(T,0,0,E,c),u){case"jpeg":b=d.toDataURL("image/jpeg");break;case"png":b=d.toDataURL("image/png");break;case"webp":b=d.toDataURL("image/webp");break;case"svg":b=k;break;default:var A="Image format is not jpeg, png, svg or webp.";if(i(new Error(A)),!t.promise)return r.emit("error",A)}l(b),t.promise||r.emit("success",b)},T.onerror=function(b){if(M=null,C.revokeObjectURL(k),i(b),!t.promise)return r.emit("error",b)},T.src=k});return t.promise?a:r}Z.exports=P}}),Xp=Ne({"src/plot_api/to_image.js"(te,Z){var v=Fn(),w=Vw(),C=ff(),P=In(),t=o0(),r=Gp(),a=q1(),l=cn().version,i={format:{valType:"enumerated",values:["png","jpeg","webp","svg","full-json"],dflt:"png"},width:{valType:"number",min:1},height:{valType:"number",min:1},scale:{valType:"number",min:0,dflt:1},setBackground:{valType:"any",dflt:!1},imageDataOnly:{valType:"boolean",dflt:!1}};function s(o,u){u=u||{};var d,h,g,m;P.isPlainObject(o)?(d=o.data||[],h=o.layout||{},g=o.config||{},m={}):(o=P.getGraphDiv(o),d=P.extendDeep([],o.data),h=P.extendDeep({},o.layout),g=o._context,m=o._fullLayout||{});function E(V){return!(V in u)||P.validate(u[V],i[V])}if(!E("width")&&u.width!==null||!E("height")&&u.height!==null)throw new Error("Height and width should be pixel values.");if(!E("format"))throw new Error("Export format is not "+P.join2(i.format.values,", "," or ")+".");var c={};function _(V,q){return P.coerce(u,c,i,V,q)}var T=_("format"),M=_("width"),k=_("height"),b=_("scale"),A=_("setBackground"),y=_("imageDataOnly"),f=document.createElement("div");f.style.position="absolute",f.style.left="-5000px",document.body.appendChild(f);var p=P.extendFlat({},h);M?p.width=M:u.width===null&&v(m.width)&&(p.width=m.width),k?p.height=k:u.height===null&&v(m.height)&&(p.height=m.height);var x=P.extendFlat({},g,{_exportedPlot:!0,staticPlot:!0,setBackground:A}),N=t.getRedrawFunc(f);function D(){return new Promise(function(V){setTimeout(V,t.getDelay(f._fullLayout))})}function B(){return new Promise(function(V,q){var z=r(f,T,b),H=f._fullLayout.width,G=f._fullLayout.height;function J(){w.purge(f),document.body.removeChild(f)}if(T==="full-json"){var le=C.graphJson(f,!1,"keepdata","object",!0,!0);return le.version=l,le=JSON.stringify(le),J(),V(y?le:t.encodeJSON(le))}if(J(),T==="svg")return V(y?z:t.encodeSVG(z));var ge=document.createElement("canvas");ge.id=P.randstr(),a({format:T,width:H,height:G,scale:b,canvas:ge,svg:z,promise:!0}).then(V).catch(q)})}function U(V){return y?V.replace(t.IMAGE_URL_PREFIX,""):V}return new Promise(function(V,q){w.newPlot(f,d,p,x).then(N).then(D).then(B).then(function(z){V(U(z))}).catch(function(z){q(z)})})}Z.exports=s}}),V1=Ne({"src/plot_api/validate.js"(te,Z){var v=In(),w=ff(),C=B1(),P=Gf().dfltConfig,t=v.isPlainObject,r=Array.isArray,a=v.isArrayOrTypedArray;Z.exports=function(_,T){_===void 0&&(_=[]),T===void 0&&(T={});var M=C.get(),k=[],b={_context:v.extendFlat({},P)},A,y;r(_)?(b.data=v.extendDeep([],_),A=_):(b.data=[],A=[],k.push(u("array","data"))),t(T)?(b.layout=v.extendDeep({},T),y=T):(b.layout={},y={},arguments.length>1&&k.push(u("object","layout"))),w.supplyDefaults(b);for(var f=b._fullData,p=A.length,x=0;x<p;x++){var N=A[x],D=["data",x];if(!t(N)){k.push(u("object",D));continue}var B=f[x],U=B.type,V=M.traces[U].attributes;V.type={valType:"enumerated",values:[U]},B.visible===!1&&N.visible!==!1&&k.push(u("invisible",D)),l(N,B,V,k,D)}var q=b._fullLayout,z=i(M,f);return l(y,q,z,k,"layout"),k.length===0?void 0:k};function l(c,_,T,M,k,b){b=b||[];for(var A=Object.keys(c),y=0;y<A.length;y++){var f=A[y],p=b.slice();p.push(f);var x=c[f],N=_[f],D=h(T,f),B=(D||{}).valType,U=B==="info_array",V=B==="colorscale",q=(D||{}).items;if(!d(T,f))M.push(u("schema",k,p));else if(t(x)&&t(N)&&B!=="any")l(x,N,D,M,k,p);else if(U&&r(x)){x.length>N.length&&M.push(u("unused",k,p.concat(N.length)));var z=N.length,H=Array.isArray(q);H&&(z=Math.min(z,q.length));var G,J,le,ge,de;if(D.dimensions===2)for(J=0;J<z;J++)if(r(x[J])){x[J].length>N[J].length&&M.push(u("unused",k,p.concat(J,N[J].length)));var me=N[J].length;for(G=0;G<(H?Math.min(me,q[J].length):me);G++)le=H?q[J][G]:q,ge=x[J][G],de=N[J][G],v.validate(ge,le)?de!==ge&&de!==+ge&&M.push(u("dynamic",k,p.concat(J,G),ge,de)):M.push(u("value",k,p.concat(J,G),ge))}else M.push(u("array",k,p.concat(J),x[J]));else for(J=0;J<z;J++)le=H?q[J]:q,ge=x[J],de=N[J],v.validate(ge,le)?de!==ge&&de!==+ge&&M.push(u("dynamic",k,p.concat(J),ge,de)):M.push(u("value",k,p.concat(J),ge))}else if(D.items&&!U&&r(x)){var W=q[Object.keys(q)[0]],ie=[],se,ee;for(se=0;se<N.length;se++){var pe=N[se]._index||se;if(ee=p.slice(),ee.push(pe),t(x[pe])&&t(N[se])){ie.push(pe);var oe=x[pe],Y=N[se];t(oe)&&oe.visible!==!1&&Y.visible===!1?M.push(u("invisible",k,ee)):l(oe,Y,W,M,k,ee)}}for(se=0;se<x.length;se++)ee=p.slice(),ee.push(se),t(x[se])?ie.indexOf(se)===-1&&M.push(u("unused",k,ee)):M.push(u("object",k,ee,x[se]))}else!t(x)&&t(N)?M.push(u("object",k,p,x)):!a(x)&&a(N)&&!U&&!V?M.push(u("array",k,p,x)):f in _?v.validate(x,D)?D.valType==="enumerated"&&(D.coerceNumber&&x!==+N||!a(x)&&x!==N||String(x)!==String(N))&&M.push(u("dynamic",k,p,x,N)):M.push(u("value",k,p,x)):M.push(u("unused",k,p,x))}return M}function i(c,_){for(var T=c.layout.layoutAttributes,M=0;M<_.length;M++){var k=_[M],b=c.traces[k.type],A=b.layoutAttributes;A&&(k.subplot?v.extendFlat(T[b.attributes.subplot.dflt],A):v.extendFlat(T,A))}return T}var s={object:function(c,_){var T;return c==="layout"&&_===""?T="The layout argument":c[0]==="data"&&_===""?T="Trace "+c[1]+" in the data argument":T=o(c)+"key "+_,T+" must be linked to an object container"},array:function(c,_){var T;return c==="data"?T="The data argument":T=o(c)+"key "+_,T+" must be linked to an array container"},schema:function(c,_){return o(c)+"key "+_+" is not part of the schema"},unused:function(c,_,T){var M=t(T)?"container":"key";return o(c)+M+" "+_+" did not get coerced"},dynamic:function(c,_,T,M){return[o(c)+"key",_,"(set to '"+T+"')","got reset to","'"+M+"'","during defaults."].join(" ")},invisible:function(c,_){return(_?o(c)+"item "+_:"Trace "+c[1])+" got defaulted to be not visible"},value:function(c,_,T){return[o(c)+"key "+_,"is set to an invalid value ("+T+")"].join(" ")}};function o(c){return r(c)?"In data trace "+c[1]+", ":"In "+c+", "}function u(c,_,T,M,k){T=T||"";var b,A;r(_)?(b=_[0],A=_[1]):(b=_,A=null);var y=E(T),f=s[c](_,y,M,k);return v.log(f),{code:c,container:b,trace:A,path:T,astr:y,msg:f}}function d(c,_){var T=m(_),M=T.keyMinusId,k=T.id;return M in c&&c[M]._isSubplotObj&&k?!0:_ in c}function h(c,_){if(_ in c)return c[_];var T=m(_);return c[T.keyMinusId]}var g=v.counterRegex("([a-z]+)");function m(c){var _=c.match(g);return{keyMinusId:_&&_[1],id:_&&_[2]}}function E(c){if(!r(c))return String(c);for(var _="",T=0;T<c.length;T++){var M=c[T];typeof M=="number"?_=_.substr(0,_.length-1)+"["+M+"]":_+=M,T<c.length-1&&(_+=".")}return _}}}),pA=Ne({"src/snapshot/filesaver.js"(te,Z){var v=In(),w=o0();function C(P,t,r){var a=document.createElement("a"),l="download"in a,i=new Promise(function(s,o){var u,d;if(l)return u=w.createBlob(P,r),d=w.createObjectURL(u),a.href=d,a.download=t,document.body.appendChild(a),a.click(),document.body.removeChild(a),w.revokeObjectURL(d),u=null,s(t);if(v.isSafari()){var h=r==="svg"?",":";base64,";return w.octetStream(h+encodeURIComponent(P)),s(t)}o(new Error("download error"))});return i}Z.exports=C}}),Px=Ne({"src/snapshot/download.js"(te,Z){var v=In(),w=Xp(),C=pA();o0();function P(t,r){var a;return v.isPlainObject(t)||(a=v.getGraphDiv(t)),r=r||{},r.format=r.format||"png",r.width=r.width||null,r.height=r.height||null,r.imageDataOnly=!0,new Promise(function(l,i){a&&a._snapshotInProgress&&i(new Error("Snapshotting already in progress.")),a&&(a._snapshotInProgress=!0);var s=w(t,r),o=r.filename||t.fn||"newplot";o+="."+r.format.replace("-","."),s.then(function(u){return a&&(a._snapshotInProgress=!1),C(u,o,r.format)}).then(function(u){l(u)}).catch(function(u){a&&(a._snapshotInProgress=!1),i(u)})})}Z.exports=P}}),Hw=Ne({"src/plot_api/template_api.js"(te){var Z=In(),v=Z.isPlainObject,w=B1(),C=ff(),P=qo(),t=Cu(),r=Gf().dfltConfig;te.makeTemplate=function(g){g=Z.isPlainObject(g)?g:Z.getGraphDiv(g),g=Z.extendDeep({_context:r},{data:g.data,layout:g.layout}),C.supplyDefaults(g);var m=g.data||[],E=g.layout||{};E._basePlotModules=g._fullLayout._basePlotModules,E._modules=g._fullLayout._modules;var c={data:{},layout:{}};m.forEach(function(x){var N={};i(x,N,o.bind(null,x));var D=Z.coerce(x,{},P,"type"),B=c.data[D];B||(B=c.data[D]=[]),B.push(N)}),i(E,c.layout,s.bind(null,E)),delete c.layout.template;var _=E.template;if(v(_)){var T=_.layout,M,k,b,A,y,f;v(T)&&a(T,c.layout);var p=_.data;if(v(p)){for(k in c.data)if(b=p[k],Array.isArray(b)){for(y=c.data[k],f=y.length,A=b.length,M=0;M<f;M++)a(b[M%A],y[M]);for(M=f;M<A;M++)y.push(Z.extendDeep({},b[M]))}for(k in p)k in c.data||(c.data[k]=Z.extendDeep([],p[k]))}}return c};function a(g,m){g=Z.extendDeep({},g);var E=Object.keys(g).sort(),c,_;function T(y,f,p){if(v(f)&&v(y))a(y,f);else if(Array.isArray(f)&&Array.isArray(y)){var x=t.arrayTemplater({_template:g},p);for(_=0;_<f.length;_++){var N=f[_],D=x.newItem(N)._template;D&&a(D,N)}var B=x.defaultItems();for(_=0;_<B.length;_++)f.push(B[_]._template);for(_=0;_<f.length;_++)delete f[_].templateitemname}}for(c=0;c<E.length;c++){var M=E[c],k=g[M];if(M in m?T(k,m[M],M):m[M]=k,l(M)===M)for(var b in m){var A=l(b);b!==A&&A===M&&!(b in g)&&T(k,m[b],M)}}}function l(g){return g.replace(/[0-9]+$/,"")}function i(g,m,E,c,_){var T=_&&E(_);for(var M in g){var k=g[M],b=u(g,M,c),A=u(g,M,_),y=E(A);if(!y){var f=l(M);f!==M&&(A=u(g,f,_),y=E(A))}if(!(T&&T===y)&&!(!y||y._noTemplating||y.valType==="data_array"||y.arrayOk&&Array.isArray(k)))if(!y.valType&&v(k))i(k,m,E,b,A);else if(y._isLinkedToArray&&Array.isArray(k))for(var p=!1,x=0,N={},D=0;D<k.length;D++){var B=k[D];if(v(B)){var U=B.name;if(U)N[U]||(i(B,m,E,u(k,x,b),u(k,x,A)),x++,N[U]=1);else if(!p){var V=t.arrayDefaultKey(M),q=u(g,V,c),z=u(k,x,b);i(B,m,E,z,u(k,x,A));var H=Z.nestedProperty(m,z),G=Z.nestedProperty(m,q);G.set(H.get()),H.set(null),p=!0}}}else{var J=Z.nestedProperty(m,b);J.set(k)}}}function s(g,m){return w.getLayoutValObject(g,Z.nestedProperty({},m).parts)}function o(g,m){return w.getTraceValObject(g,Z.nestedProperty({},m).parts)}function u(g,m,E){var c;return E?Array.isArray(g)?c=E+"["+m+"]":c=E+"."+m:c=m,c}te.validateTemplate=function(g,m){var E=Z.extendDeep({},{_context:r,data:g.data,layout:g.layout}),c=E.layout||{};v(m)||(m=c.template||{});var _=m.layout,T=m.data,M=[];E.layout=c,E.layout.template=m,C.supplyDefaults(E);var k=E._fullLayout,b=E._fullData,A={};function y(q,z){for(var H in q)if(H.charAt(0)!=="_"&&v(q[H])){var G=l(H),J=[],le;for(le=0;le<z.length;le++)J.push(u(q,H,z[le])),G!==H&&J.push(u(q,G,z[le]));for(le=0;le<J.length;le++)A[J[le]]=1;y(q[H],J)}}function f(q,z){for(var H in q)if(H.indexOf("defaults")===-1&&v(q[H])){var G=u(q,H,z);A[G]?f(q[H],G):M.push({code:"unused",path:G})}}if(v(_)?(y(k,["layout"]),f(_,"layout")):M.push({code:"layout"}),!v(T))M.push({code:"data"});else{for(var p={},x,N=0;N<b.length;N++){var D=b[N];x=D.type,p[x]=(p[x]||0)+1,D._fullInput._template||M.push({code:"missing",index:D.index,traceType:x})}for(x in T){var B=T[x].length,U=p[x]||0;B>U?M.push({code:"unused",traceType:x,templateCount:B,dataCount:U}):U>B&&M.push({code:"reused",traceType:x,templateCount:B,dataCount:U})}}function V(q,z){for(var H in q)if(H.charAt(0)!=="_"){var G=q[H],J=u(q,H,z);v(G)?(Array.isArray(q)&&G._template===!1&&G.templateitemname&&M.push({code:"missing",path:J,templateitemname:G.templateitemname}),V(G,J)):Array.isArray(G)&&d(G)&&V(G,J)}}if(V({data:b,layout:k},""),M.length)return M.map(h)};function d(g){for(var m=0;m<g.length;m++)if(v(g[m]))return!0}function h(g){var m;switch(g.code){case"data":m="The template has no key data.";break;case"layout":m="The template has no key layout.";break;case"missing":g.path?m="There are no templates for item "+g.path+" with name "+g.templateitemname:m="There are no templates for trace "+g.index+", of type "+g.traceType+".";break;case"unused":g.path?m="The template item at "+g.path+" was not used in constructing the plot.":g.dataCount?m="Some of the templates of type "+g.traceType+" were not used. The template has "+g.templateCount+" traces, the data only has "+g.dataCount+" of this type.":m="The template has "+g.templateCount+" traces of type "+g.traceType+" but there are none in the data.";break;case"reused":m="Some of the templates of type "+g.traceType+" were used more than once. The template has "+g.templateCount+" traces, the data has "+g.dataCount+" of this type.";break}return g.msg=m,g}}}),mA=Ne({"src/plot_api/index.js"(te){var Z=Vw();te._doPlot=Z._doPlot,te.newPlot=Z.newPlot,te.restyle=Z.restyle,te.relayout=Z.relayout,te.redraw=Z.redraw,te.update=Z.update,te._guiRestyle=Z._guiRestyle,te._guiRelayout=Z._guiRelayout,te._guiUpdate=Z._guiUpdate,te._storeDirectGUIEdit=Z._storeDirectGUIEdit,te.react=Z.react,te.extendTraces=Z.extendTraces,te.prependTraces=Z.prependTraces,te.addTraces=Z.addTraces,te.deleteTraces=Z.deleteTraces,te.moveTraces=Z.moveTraces,te.purge=Z.purge,te.addFrames=Z.addFrames,te.deleteFrames=Z.deleteFrames,te.animate=Z.animate,te.setPlotConfig=Z.setPlotConfig;var v=D1().getGraphDiv,w=Ey().eraseActiveShape;te.deleteActiveShape=function(P){return w(v(P))},te.toImage=Xp(),te.validate=V1(),te.downloadImage=Px();var C=Hw();te.makeTemplate=C.makeTemplate,te.validateTemplate=C.validateTemplate}}),Lm=Ne({"src/traces/scatter/xy_defaults.js"(te,Z){var v=In(),w=Yo();Z.exports=function(P,t,r,a){var l=a("x"),i=a("y"),s,o=w.getComponentMethod("calendars","handleTraceDefaults");if(o(P,t,["x","y"],r),l){var u=v.minRowLength(l);i?s=Math.min(u,v.minRowLength(i)):(s=u,a("y0"),a("dy"))}else{if(!i)return 0;s=v.minRowLength(i),a("x0"),a("dx")}return t._length=s,s}}}),Rm=Ne({"src/traces/scatter/period_defaults.js"(te,Z){var v=In().dateTick0,w=da(),C=w.ONEWEEK;function P(t,r){return t%C===0?v(r,1):v(r,0)}Z.exports=function(r,a,l,i,s){if(s||(s={x:!0,y:!0}),s.x){var o=i("xperiod");o&&(i("xperiod0",P(o,a.xcalendar)),i("xperiodalignment"))}if(s.y){var u=i("yperiod");u&&(i("yperiod0",P(u,a.ycalendar)),i("yperiodalignment"))}}}}),Gw=Ne({"src/traces/scatter/stack_defaults.js"(te,Z){var v=["orientation","groupnorm","stackgaps"];Z.exports=function(C,P,t,r){var a=t._scatterStackOpts,l=r("stackgroup");if(l){var i=P.xaxis+P.yaxis,s=a[i];s||(s=a[i]={});var o=s[l],u=!1;o?o.traces.push(P):(o=s[l]={traceIndices:[],traces:[P]},u=!0);for(var d={orientation:P.x&&!P.y?"h":"v"},h=0;h<v.length;h++){var g=v[h],m=g+"Found";if(!o[m]){var E=C[g]!==void 0,c=g==="orientation";if((E||u)&&(o[g]=r(g,d[g]),c&&(o.fillDflt=o[g]==="h"?"tonextx":"tonexty"),E&&(o[m]=!0,!u&&(delete o.traces[0][g],c))))for(var _=0;_<o.traces.length-1;_++){var T=o.traces[_];T._input.fill!==T.fill&&(T.fill=o.fillDflt)}}}return o}}}}),wv=Ne({"src/traces/scatter/marker_defaults.js"(te,Z){var v=Ha(),w=Bd().hasColorscale,C=Rh(),P=yu();Z.exports=function(r,a,l,i,s,o){var u=P.isBubble(r),d=(r.line||{}).color,h;if(o=o||{},d&&(l=d),s("marker.symbol"),s("marker.opacity",u?.7:1),s("marker.size"),o.noAngle||(s("marker.angle"),o.noAngleRef||s("marker.angleref"),o.noStandOff||s("marker.standoff")),s("marker.color",l),w(r,"marker")&&C(r,a,i,s,{prefix:"marker.",cLetter:"c"}),o.noSelect||(s("selected.marker.color"),s("unselected.marker.color"),s("selected.marker.size"),s("unselected.marker.size")),o.noLine||(d&&!Array.isArray(d)&&a.marker.color!==d?h=d:u?h=v.background:h=v.defaultLine,s("marker.line.color",h),w(r,"marker.line")&&C(r,a,i,s,{prefix:"marker.line.",cLetter:"c"}),s("marker.line.width",u?1:0)),u&&(s("marker.sizeref"),s("marker.sizemin"),s("marker.sizemode")),o.gradient){var g=s("marker.gradient.type");g!=="none"&&s("marker.gradient.color")}}}}),Im=Ne({"src/traces/scatter/line_defaults.js"(te,Z){var v=In().isArrayOrTypedArray,w=Bd().hasColorscale,C=Rh();Z.exports=function(t,r,a,l,i,s){s||(s={});var o=(t.marker||{}).color;if(o&&o._inputArray&&(o=o._inputArray),i("line.color",a),w(t,"line"))C(t,r,l,i,{prefix:"line.",cLetter:"c"});else{var u=(v(o)?!1:o)||a;i("line.color",u)}i("line.width"),s.noDash||i("line.dash"),s.backoff&&i("line.backoff")}}}),Tv=Ne({"src/traces/scatter/line_shape_defaults.js"(te,Z){Z.exports=function(w,C,P){var t=P("line.shape");t==="spline"&&P("line.smoothing")}}}),Wp=Ne({"src/traces/scatter/text_defaults.js"(te,Z){var v=In();Z.exports=function(w,C,P,t,r){r=r||{},t("textposition"),v.coerceFont(t,"textfont",r.font||P.font,r),r.noSelect||(t("selected.textfont.color"),t("unselected.textfont.color"))}}}),uv=Ne({"src/traces/scatter/fillcolor_defaults.js"(te,Z){var v=Ha(),w=In().isArrayOrTypedArray;function C(P){for(var t=v.interpolate(P[0][1],P[1][1],.5),r=2;r<P.length;r++){var a=v.interpolate(P[r-1][1],P[r][1],.5);t=v.interpolate(t,a,P[r-1][0]/P[r][0])}return t}Z.exports=function(t,r,a,l,i){i||(i={});var s=!1;if(r.marker){var o=r.marker.color,u=(r.marker.line||{}).color;o&&!w(o)?s=o:u&&!w(u)&&(s=u)}var d;if(i.moduleHasFillgradient){var h=l("fillgradient.type");if(h!=="none"){l("fillgradient.start"),l("fillgradient.stop");var g=l("fillgradient.colorscale");g&&(d=C(g))}}l("fillcolor",v.addOpacity((r.line||{}).color||s||d||a,.5))}}}),SM=Ne({"src/traces/scatter/defaults.js"(te,Z){var v=In(),w=Yo(),C=tf(),P=i0(),t=yu(),r=Lm(),a=Rm(),l=Gw(),i=wv(),s=Im(),o=Tv(),u=Wp(),d=uv(),h=In().coercePattern;Z.exports=function(m,E,c,_){function T(x,N){return v.coerce(m,E,C,x,N)}var M=r(m,E,_,T);if(M||(E.visible=!1),!!E.visible){a(m,E,_,T),T("xhoverformat"),T("yhoverformat"),T("zorder");var k=l(m,E,_,T);_.scattermode==="group"&&E.orientation===void 0&&T("orientation","v");var b=!k&&M<P.PTS_LINESONLY?"lines+markers":"lines";T("text"),T("hovertext"),T("mode",b),t.hasMarkers(E)&&i(m,E,c,_,T,{gradient:!0}),t.hasLines(E)&&(s(m,E,c,_,T,{backoff:!0}),o(m,E,T),T("connectgaps"),T("line.simplify")),t.hasText(E)&&(T("texttemplate"),T("texttemplatefallback"),u(m,E,_,T));var A=[];(t.hasMarkers(E)||t.hasText(E))&&(T("cliponaxis"),T("marker.maxdisplayed"),A.push("points")),T("fill",k?k.fillDflt:"none"),E.fill!=="none"&&(d(m,E,c,T,{moduleHasFillgradient:!0}),t.hasLines(E)||o(m,E,T),h(T,"fillpattern",E.fillcolor,!1));var y=(E.line||{}).color,f=(E.marker||{}).color;(E.fill==="tonext"||E.fill==="toself")&&A.push("fills"),T("hoveron",A.join("+")||"points"),E.hoveron!=="fills"&&(T("hovertemplate"),T("hovertemplatefallback"));var p=w.getComponentMethod("errorbars","supplyDefaults");p(m,E,y||f||c,{axis:"y"}),p(m,E,y||f||c,{axis:"x",inherit:"y"}),v.coerceSelectionMarkerOpacity(E,T)}}}}),U0=Ne({"src/traces/scatter/grouping_defaults.js"(te,Z){var v=My().getAxisGroup;Z.exports=function(C,P,t,r,a){var l=P.orientation,i=P[{v:"x",h:"y"}[l]+"axis"],s=v(t,i)+l,o=t._alignmentOpts||{},u=r("alignmentgroup"),d=o[s];d||(d=o[s]={});var h=d[u];h?h.traces.push(P):h=d[u]={traces:[P],alignmentIndex:Object.keys(d).length,offsetGroups:{}};var g=r("offsetgroup")||"",m=h.offsetGroups,E=m[g];P._offsetIndex=0,(a!=="group"||g)&&(E||(E=m[g]={offsetIndex:Object.keys(m).length}),P._offsetIndex=E.offsetIndex)}}}),Cg=Ne({"src/traces/scatter/cross_trace_defaults.js"(te,Z){var v=In(),w=U0(),C=tf();Z.exports=function(t,r){var a,l,i,s=r.scattermode;function o(m){return v.coerce(l._input,l,C,m)}if(r.scattermode==="group")for(i=0;i<t.length;i++)l=t[i],l.type==="scatter"&&(a=l._input,w(a,l,r,o,s));for(i=0;i<t.length;i++){var u=t[i];if(u.type==="scatter"){var d=u.fill;if(!(d==="none"||d==="toself")&&(u.opacity=void 0,d==="tonexty"||d==="tonextx"))for(var h=i-1;h>=0;h--){var g=t[h];if(g.type==="scatter"&&g.xaxis===u.xaxis&&g.yaxis===u.yaxis){g.opacity=void 0;break}}}}}}}),gA=Ne({"src/traces/scatter/layout_defaults.js"(te,Z){var v=In(),w=bg();Z.exports=function(C,P){function t(a,l){return v.coerce(C,P,w,a,l)}var r=P.barmode==="group";P.scattermode==="group"&&t("scattergap",r?P.bargap:.2)}}}),Dm=Ne({"src/plots/cartesian/align_period.js"(te,Z){var v=Fn(),w=In(),C=w.dateTime2ms,P=w.incrementMonth,t=da(),r=t.ONEAVGMONTH;Z.exports=function(l,i,s,o){if(i.type!=="date")return{vals:o};var u=l[s+"periodalignment"];if(!u)return{vals:o};var d=l[s+"period"],h;if(v(d)){if(d=+d,d<=0)return{vals:o}}else if(typeof d=="string"&&d.charAt(0)==="M"){var g=+d.substring(1);if(g>0&&Math.round(g)===g)h=g;else return{vals:o}}for(var m=i.calendar,E=u==="start",c=u==="end",_=l[s+"period0"],T=C(_,m)||0,M=[],k=[],b=[],A=o.length,y=0;y<A;y++){var f=o[y],p,x,N;if(h){for(p=Math.round((f-T)/(h*r)),N=P(T,h*p,m);N>f;)N=P(N,-h,m);for(;N<=f;)N=P(N,h,m);x=P(N,-h,m)}else{for(p=Math.round((f-T)/d),N=T+p*d;N>f;)N-=d;for(;N<=f;)N+=d;x=N-d}M[y]=E?x:c?N:(x+N)/2,k[y]=x,b[y]=N}return{vals:M,starts:k,ends:b}}}}),Yp=Ne({"src/traces/scatter/colorscale_calc.js"(te,Z){var v=Bd().hasColorscale,w=Ud(),C=yu();Z.exports=function(t,r){C.hasLines(r)&&v(r,"line")&&w(t,r,{vals:r.line.color,containerStr:"line",cLetter:"c"}),C.hasMarkers(r)&&(v(r,"marker")&&w(t,r,{vals:r.marker.color,containerStr:"marker",cLetter:"c"}),v(r,"marker.line")&&w(t,r,{vals:r.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}}}),s0=Ne({"src/traces/scatter/arrays_to_calcdata.js"(te,Z){var v=In();Z.exports=function(C,P){for(var t=0;t<C.length;t++)C[t].i=t;v.mergeArray(P.text,C,"tx"),v.mergeArray(P.texttemplate,C,"txt"),v.mergeArray(P.hovertext,C,"htx"),v.mergeArray(P.customdata,C,"data"),v.mergeArray(P.textposition,C,"tp"),P.textfont&&(v.mergeArrayCastPositive(P.textfont.size,C,"ts"),v.mergeArray(P.textfont.color,C,"tc"),v.mergeArray(P.textfont.family,C,"tf"),v.mergeArray(P.textfont.weight,C,"tw"),v.mergeArray(P.textfont.style,C,"ty"),v.mergeArray(P.textfont.variant,C,"tv"),v.mergeArray(P.textfont.textcase,C,"tC"),v.mergeArray(P.textfont.lineposition,C,"tE"),v.mergeArray(P.textfont.shadow,C,"tS"));var r=P.marker;if(r){v.mergeArrayCastPositive(r.size,C,"ms"),v.mergeArrayCastPositive(r.opacity,C,"mo"),v.mergeArray(r.symbol,C,"mx"),v.mergeArray(r.angle,C,"ma"),v.mergeArray(r.standoff,C,"mf"),v.mergeArray(r.color,C,"mc");var a=r.line;r.line&&(v.mergeArray(a.color,C,"mlc"),v.mergeArrayCastPositive(a.width,C,"mlw"));var l=r.gradient;l&&l.type!=="none"&&(v.mergeArray(l.type,C,"mgt"),v.mergeArray(l.color,C,"mgc"))}}}}),Gh=Ne({"src/traces/scatter/calc_selection.js"(te,Z){var v=In();Z.exports=function(C,P){v.isArrayOrTypedArray(P.selectedpoints)&&v.tagSelected(C,P)}}}),Vv=Ne({"src/traces/scatter/calc.js"(te,Z){var v=Fn(),w=In(),C=Os(),P=Dm(),t=da().BADNUM,r=yu(),a=Yp(),l=s0(),i=Gh();function s(m,E){var c=m._fullLayout,_=E._xA=C.getFromId(m,E.xaxis||"x","x"),T=E._yA=C.getFromId(m,E.yaxis||"y","y"),M=_.makeCalcdata(E,"x"),k=T.makeCalcdata(E,"y"),b=P(E,_,"x",M),A=P(E,T,"y",k),y=b.vals,f=A.vals,p=E._length,x=new Array(p),N=E.ids,D=g(E,c,_,T),B=!1,U,V,q,z,H,G;d(c,E);var J="x",le="y",ge;if(D)w.pushUnique(D.traceIndices,E.index),U=D.orientation==="v",U?(le="s",ge="x"):(J="s",ge="y"),H=D.stackgaps==="interpolate";else{var de=u(E,p);o(m,E,_,T,y,f,de)}var me=!!E.xperiodalignment,W=!!E.yperiodalignment;for(V=0;V<p;V++){var ie=x[V]={},se=v(y[V]),ee=v(f[V]);se&&ee?(ie[J]=y[V],ie[le]=f[V],me&&(ie.orig_x=M[V],ie.xEnd=b.ends[V],ie.xStart=b.starts[V]),W&&(ie.orig_y=k[V],ie.yEnd=A.ends[V],ie.yStart=A.starts[V])):D&&(U?se:ee)?(ie[ge]=U?y[V]:f[V],ie.gap=!0,H?(ie.s=t,B=!0):ie.s=0):ie[J]=ie[le]=t,N&&(ie.id=String(N[V]))}if(l(x,E),a(m,E),i(x,E),D){for(V=0;V<x.length;)x[V][ge]===t?x.splice(V,1):V++;if(w.sort(x,function(ce,ue){return ce[ge]-ue[ge]||ce.i-ue.i}),B){for(V=0;V<x.length-1&&x[V].gap;)V++;for(G=x[V].s,G||(G=x[V].s=0),q=0;q<V;q++)x[q].s=G;for(z=x.length-1;z>V&&x[z].gap;)z--;for(G=x[z].s,q=x.length-1;q>z;q--)x[q].s=G;for(;V<z;)if(V++,x[V].gap){for(q=V+1;x[q].gap;)q++;for(var pe=x[V-1][ge],oe=x[V-1].s,Y=(x[q].s-oe)/(x[q][ge]-pe);V<q;)x[V].s=oe+(x[V][ge]-pe)*Y,V++}}}return x}function o(m,E,c,_,T,M,k){var b=E._length,A=m._fullLayout,y=c._id,f=_._id,p=A._firstScatter[h(E)]===E.uid,x=(g(E,A,c,_)||{}).orientation,N=E.fill;c._minDtick=0,_._minDtick=0;var D={padded:!0},B={padded:!0};k&&(D.ppad=B.ppad=k);var U=b<2||T[0]!==T[b-1]||M[0]!==M[b-1];U&&(N==="tozerox"||N==="tonextx"&&(p||x==="h"))?D.tozero=!0:!(E.error_y||{}).visible&&(N==="tonexty"||N==="tozeroy"||!r.hasMarkers(E)&&!r.hasText(E))&&(D.padded=!1,D.ppad=0),U&&(N==="tozeroy"||N==="tonexty"&&(p||x==="v"))?B.tozero=!0:(N==="tonextx"||N==="tozerox")&&(B.padded=!1),y&&(E._extremes[y]=C.findExtremes(c,T,D)),f&&(E._extremes[f]=C.findExtremes(_,M,B))}function u(m,E){if(r.hasMarkers(m)){var c=m.marker,_=1.6*(m.marker.sizeref||1),T;if(m.marker.sizemode==="area"?T=function(y){return Math.max(Math.sqrt((y||0)/_),3)}:T=function(y){return Math.max((y||0)/_,3)},w.isArrayOrTypedArray(c.size)){var M={type:"linear"};C.setConvert(M);for(var k=M.makeCalcdata(m.marker,"size"),b=new Array(E),A=0;A<E;A++)b[A]=T(k[A]);return b}else return T(c.size)}}function d(m,E){var c=h(E),_=m._firstScatter;_[c]||(_[c]=E.uid)}function h(m){var E=m.stackgroup;return m.xaxis+m.yaxis+m.type+(E?"-"+E:"")}function g(m,E,c,_){var T=m.stackgroup;if(T){var M=E._scatterStackOpts[c._id+_._id][T],k=M.orientation==="v"?_:c;if(k.type==="linear"||k.type==="log")return M}}Z.exports={calc:s,calcMarkerSize:u,calcAxisExpansion:o,setFirstScatter:d,getStackOpts:g}}}),H1=Ne({"src/traces/bar/sieve.js"(te,Z){Z.exports=w;var v=In().distinctVals;function w(C,P){this.traces=C,this.sepNegVal=P.sepNegVal,this.overlapNoMerge=P.overlapNoMerge;for(var t=1/0,r=P.posAxis._id.charAt(0),a=[],l=0;l<C.length;l++){for(var i=C[l],s=0;s<i.length;s++){var o=i[s],u=o.p;u===void 0&&(u=o[r]),u!==void 0&&a.push(u)}i[0]&&i[0].width1&&(t=Math.min(i[0].width1,t))}this.positions=a;var d=v(a);this.distinctPositions=d.vals,d.vals.length===1&&t!==1/0?this.minDiff=t:this.minDiff=Math.min(d.minDiff,t);var h=(P.posAxis||{}).type;(h==="category"||h==="multicategory")&&(this.minDiff=1),this.binWidth=this.minDiff,this.bins={}}w.prototype.put=function(P,t,r){var a=this.getLabel(P,t,r),l=this.bins[a]||0;return this.bins[a]=l+r,l},w.prototype.get=function(P,t,r){var a=this.getLabel(P,t,r);return this.bins[a]||0},w.prototype.getLabel=function(P,t,r){var a=r<0&&this.sepNegVal?"v":"^",l=this.overlapNoMerge?P:Math.round(P/this.binWidth);return a+l+"g"+t}}}),q0=Ne({"src/traces/bar/cross_trace_calc.js"(te,Z){var v=Fn(),w=In().isArrayOrTypedArray,C=da().BADNUM,P=Yo(),t=Os(),r=My().getAxisGroup,a=H1();function l(x,N){for(var D=N.xaxis,B=N.yaxis,U=x._fullLayout,V=x._fullData,q=x.calcdata,z=[],H=[],G=0;G<V.length;G++){var J=V[G];if(J.visible===!0&&P.traceIs(J,"bar")&&J.xaxis===D._id&&J.yaxis===B._id&&(J.orientation==="h"?z.push(q[G]):H.push(q[G]),J._computePh))for(var le=x.calcdata[G],ge=0;ge<le.length;ge++)typeof le[ge].ph0=="function"&&(le[ge].ph0=le[ge].ph0()),typeof le[ge].ph1=="function"&&(le[ge].ph1=le[ge].ph1())}var de={xCat:D.type==="category"||D.type==="multicategory",yCat:B.type==="category"||B.type==="multicategory",mode:U.barmode,norm:U.barnorm,gap:U.bargap,groupgap:U.bargroupgap};i(x,D,B,H,de),i(x,B,D,z,de)}function i(x,N,D,B,U){if(B.length){var V,q,z,H,G;switch(u(D,B),U.mode){case"overlay":d(x,N,D,B,U);break;case"group":for(V=[],q=[],z=0;z<B.length;z++)H=B[z],G=H[0].trace,G.offset===void 0?q.push(H):V.push(H);q.length&&h(x,N,D,q,U),V.length&&d(x,N,D,V,U);break;case"stack":case"relative":for(V=[],q=[],z=0;z<B.length;z++)H=B[z],G=H[0].trace,G.base===void 0?q.push(H):V.push(H);o(q),q.length&&g(x,N,D,q,U),V.length&&d(x,N,D,V,U);break}s(B),f(B,N)}}function s(x){var N,D,B,U,V,q,z;for(N=0;N<x.length;N++)D=x[N],B=D[0].trace,U=D[0].t,U.cornerradiusvalue===void 0&&(V=B.marker?B.marker.cornerradius:void 0,V!==void 0&&(q=v(V)?+V:+V.slice(0,-1),z=v(V)?"px":"%",U.cornerradiusvalue=q,U.cornerradiusform=z))}function o(x){if(!(x.length<2)){var N,D,B,U,V,q,z;for(N=0;N<x.length&&(D=x[N],B=D[0].trace,V=B.marker?B.marker.cornerradius:void 0,V===void 0);N++);if(V!==void 0)for(q=v(V)?+V:+V.slice(0,-1),z=v(V)?"px":"%",N=0;N<x.length;N++)D=x[N],U=D[0].t,U.cornerradiusvalue=q,U.cornerradiusform=z}}function u(x,N){var D,B;for(D=0;D<N.length;D++){var U=N[D],V=U[0].trace,q=V.type==="funnel"?V._base:V.base,z,H=V.orientation==="h"?V.xcalendar:V.ycalendar,G=x.type==="category"||x.type==="multicategory"?function(){return null}:x.d2c;if(w(q)){for(B=0;B<Math.min(q.length,U.length);B++)z=G(q[B],0,H),v(z)?(U[B].b=+z,U[B].hasB=1):U[B].b=0;for(;B<U.length;B++)U[B].b=0}else{z=G(q,0,H);var J=v(z);for(z=J?z:0,B=0;B<U.length;B++)U[B].b=z,J&&(U[B].hasB=1)}}}function d(x,N,D,B,U){for(var V=0;V<B.length;V++){var q=B[V],z=new a([q],{posAxis:N,sepNegVal:!1,overlapNoMerge:!U.norm});m(x,N,z,U),U.norm?(k(z),A(D,z,U)):T(D,z)}}function h(x,N,D,B,U){var V=new a(B,{posAxis:N,sepNegVal:!1,overlapNoMerge:!U.norm});m(x,N,V,U),b(V,N),U.norm?(k(V),A(D,V,U)):T(D,V)}function g(x,N,D,B,U){var V=new a(B,{posAxis:N,sepNegVal:U.mode==="relative",overlapNoMerge:!(U.norm||U.mode==="stack"||U.mode==="relative")});m(x,N,V,U),M(D,V,U);for(var q=0;q<B.length;q++)for(var z=B[q],H=z[0].t.offsetindex,G=0;G<z.length;G++){var J=z[G];if(J.s!==C){var le=J.b+J.s===V.get(J.p,H,J.s);le&&(J._outmost=!0)}}U.norm&&A(D,V,U)}function m(x,N,D,B){var U=x._fullLayout,V=D.positions,q=D.distinctPositions,z=D.minDiff,H=D.traces,G=H.length,J=V.length!==q.length,le=z*(1-B.gap),ge,de,me,W;if(N._id==="angularaxis")ge=le,de=ge*(1-(B.groupgap||0)),me=-de/2;else{var ie=r(U,N._id)+H[0][0].trace.orientation;W=U._alignmentOpts[ie]||{}}for(var se=0;se<G;se++){var ee=H[se],pe=ee[0].trace;if(N._id!=="angularaxis"){var oe=W[pe.alignmentgroup]||{},Y=Object.keys(oe.offsetGroups||{}).length;Y?ge=le/Y:ge=J?le/G:le,de=ge*(1-(B.groupgap||0)),Y?me=((2*pe._offsetIndex+1-Y)*ge-de)/2:me=J?((2*se+1-G)*ge-de)/2:-de/2}var ce=ee[0].t;ce.barwidth=de,ce.offsetindex=pe._offsetIndex||0,ce.poffset=me,ce.bargroupwidth=le,ce.bardelta=z}D.binWidth=H[0][0].t.barwidth/100,E(D),c(N,D),N._id==="angularaxis"?_(N,D):_(N,D,J)}function E(x){var N=x.traces,D,B;for(D=0;D<N.length;D++){var U=N[D],V=U[0],q=V.trace,z=V.t,H=q._offset||q.offset,G=z.poffset,J;if(w(H)){for(J=Array.prototype.slice.call(H,0,U.length),B=0;B<J.length;B++)v(J[B])||(J[B]=G);for(B=J.length;B<U.length;B++)J.push(G);z.poffset=J}else H!==void 0&&(z.poffset=H);var le=q._width||q.width,ge=z.barwidth;if(w(le)){var de=Array.prototype.slice.call(le,0,U.length);for(B=0;B<de.length;B++)v(de[B])||(de[B]=ge);for(B=de.length;B<U.length;B++)de.push(ge);if(z.barwidth=de,H===void 0){for(J=[],B=0;B<U.length;B++)J.push(G+(ge-de[B])/2);z.poffset=J}}else le!==void 0&&(z.barwidth=le,H===void 0&&(z.poffset=G+(ge-le)/2))}}function c(x,N){for(var D=N.traces,B=p(x),U=0;U<D.length;U++)for(var V=D[U],q=V[0].t,z=q.poffset,H=w(z),G=q.barwidth,J=w(G),le=0;le<V.length;le++){var ge=V[le],de=ge.w=J?G[le]:G;ge.p===void 0&&(ge.p=ge[B],ge["orig_"+B]=ge[B]);var me=(H?z[le]:z)+de/2;ge[B]=ge.p+me}}function _(x,N,D){var B=N.traces,U=N.minDiff,V=U/2;t.minDtick(x,N.minDiff,N.distinctPositions[0],D);for(var q=0;q<B.length;q++){var z=B[q],H=z[0],G=H.trace,J=[],le,ge,de,me;for(me=0;me<z.length;me++)le=z[me],ge=le.p-V,de=le.p+V,J.push(ge,de);if(G.width||G.offset){var W=H.t,ie=W.poffset,se=W.barwidth,ee=w(ie),pe=w(se);for(me=0;me<z.length;me++){le=z[me];var oe=ee?ie[me]:ie,Y=pe?se[me]:se;ge=le.p+oe,de=ge+Y,J.push(ge,de)}}G._extremes[x._id]=t.findExtremes(x,J,{padded:!1})}}function T(x,N){for(var D=N.traces,B=p(x),U=0;U<D.length;U++){for(var V=D[U],q=V[0].trace,z=q.type==="scatter",H=q.orientation==="v",G=[],J=!1,le=0;le<V.length;le++){var ge=V[le],de=z?0:ge.b,me=z?H?ge.y:ge.x:de+ge.s;ge[B]=me,G.push(me),ge.hasB&&G.push(de),(!ge.hasB||!ge.b)&&(J=!0)}q._extremes[x._id]=t.findExtremes(x,G,{tozero:J,padded:!0})}}function M(x,N,D){var B=p(x),U=N.traces,V,q,z,H,G,J,le;for(H=0;H<U.length;H++)if(V=U[H],q=V[0].trace,q.type==="funnel")for(le=V[0].t.offsetindex,G=0;G<V.length;G++)J=V[G],J.s!==C&&N.put(J.p,le,-.5*J.s);for(H=0;H<U.length;H++){V=U[H],q=V[0].trace,z=q.type==="funnel",le=q.type==="barpolar"?0:V[0].t.offsetindex;var ge=[];for(G=0;G<V.length;G++)if(J=V[G],J.s!==C){var de;z?de=J.s:de=J.s+J.b;var me=N.put(J.p,le,de),W=me+de;J.b=me,J[B]=W,D.norm||(ge.push(W),J.hasB&&ge.push(me))}D.norm||(q._extremes[x._id]=t.findExtremes(x,ge,{tozero:!0,padded:!0}))}}function k(x){for(var N=x.traces,D=0;D<N.length;D++)for(var B=N[D],U=B[0].t.offsetindex,V=0;V<B.length;V++){var q=B[V];q.s!==C&&x.put(q.p,U,q.b+q.s)}}function b(x,N){for(var D=x.traces,B=0;B<D.length;B++){var U=D[B],V=U[0].trace,q=U[0].t.offsetindex;if(V.base===void 0)for(var z=new a([U],{posAxis:N,sepNegVal:!0,overlapNoMerge:!0}),H=0;H<U.length;H++){var G=U[H];if(G.p!==C){var J=z.put(G.p,q,G.b+G.s);J&&(G.b=J)}}}}function A(x,N,D){var B=N.traces,U=p(x),V=D.norm==="fraction"?1:100,q=V/1e9,z=x.l2c(x.c2l(0)),H=D.mode==="stack"?V:z;function G(ce){return v(x.c2l(ce))&&(ce<z-q||ce>H+q||!v(z))}for(var J=0;J<B.length;J++){for(var le=B[J],ge=le[0].t.offsetindex,de=le[0].trace,me=[],W=!1,ie=!1,se=0;se<le.length;se++){var ee=le[se];if(ee.s!==C){var pe=Math.abs(V/N.get(ee.p,ge,ee.s));ee.b*=pe,ee.s*=pe;var oe=ee.b,Y=oe+ee.s;ee[U]=Y,me.push(Y),ie=ie||G(Y),ee.hasB&&(me.push(oe),ie=ie||G(oe)),(!ee.hasB||!ee.b)&&(W=!0)}}de._extremes[x._id]=t.findExtremes(x,me,{tozero:W,padded:ie})}}function y(x,N,D,B){for(var U=p(B),V=0;V<x.length;V++)for(var q=x[V],z=0;z<q.length;z++){var H=q[z],G=H[U];H._sMin=N[G],H._sMax=D[G]}}function f(x,N){var D=p(N),B={},U,V,q,z=1/0,H=-1/0;for(U=0;U<x.length;U++)for(q=x[U],V=0;V<q.length;V++){var G=q[V].p;v(G)&&(z=Math.min(z,G),H=Math.max(H,G))}var J=1e4/(H-z),le=B.round=function(_e){return String(Math.round(J*(_e-z)))},ge={},de={},me=x.some(function(_e){var Le=_e[0].trace;return"marker"in Le&&Le.marker.cornerradius});for(U=0;U<x.length;U++){q=x[U],q[0].t.extents=B;var W=q[0].t.poffset,ie=w(W);for(V=0;V<q.length;V++){var se=q[V],ee=se[D]-se.w/2;if(v(ee)){var pe=se[D]+se.w/2,oe=le(se.p);B[oe]?B[oe]=[Math.min(ee,B[oe][0]),Math.max(pe,B[oe][1])]:B[oe]=[ee,pe]}if(se.p0=se.p+(ie?W[V]:W),se.p1=se.p0+se.w,se.s0=se.b,se.s1=se.s0+se.s,me){var Y=Math.min(se.s0,se.s1)||0,ce=Math.max(se.s0,se.s1)||0,ue=se[D];ge[ue]=ue in ge?Math.min(ge[ue],Y):Y,de[ue]=ue in de?Math.max(de[ue],ce):ce}}}me&&y(x,ge,de,N)}function p(x){return x._id.charAt(0)}Z.exports={crossTraceCalc:l,setGroupPositions:i}}}),Lx=Ne({"src/traces/scatter/cross_trace_calc.js"(te,Z){var v=Vv(),w=q0().setGroupPositions;function C(r,a){for(var l=a.xaxis,i=a.yaxis,s=r._fullLayout,o=r._fullData,u=r.calcdata,d=[],h=[],g=0;g<o.length;g++){var m=o[g];m.visible===!0&&m.type==="scatter"&&m.xaxis===l._id&&m.yaxis===i._id&&(m.orientation==="h"?d.push(u[g]):m.orientation==="v"&&h.push(u[g]))}var E={mode:s.scattermode,gap:s.scattergap};w(r,l,i,h,E),w(r,i,l,d,E)}Z.exports=function(a,l){a._fullLayout.scattermode==="group"&&C(a,l);var i=l.xaxis,s=l.yaxis,o=i._id+s._id,u=a._fullLayout._scatterStackOpts[o];if(u){var d=a.calcdata,h,g,m,E,c,_,T,M,k,b,A,y,f,p,x;for(var N in u){b=u[N];var D=b.traceIndices;if(D.length){for(A=b.stackgaps==="interpolate",y=b.groupnorm,b.orientation==="v"?(f="x",p="y"):(f="y",p="x"),x=new Array(D.length),h=0;h<x.length;h++)x[h]=!1;_=d[D[0]];var B=new Array(_.length);for(h=0;h<_.length;h++)B[h]=_[h][f];for(h=1;h<D.length;h++){for(c=d[D[h]],g=m=0;g<c.length;g++){for(T=c[g][f];T>B[m]&&m<B.length;m++)P(c,g,B[m],h,x,A,f),g++;if(T!==B[m]){for(E=0;E<h;E++)P(d[D[E]],m,T,E,x,A,f);B.splice(m,0,T)}m++}for(;m<B.length;m++)P(c,g,B[m],h,x,A,f),g++}var U=B.length;for(g=0;g<_.length;g++){for(M=_[g][p]=_[g].s,h=1;h<D.length;h++)c=d[D[h]],c[0].trace._rawLength=c[0].trace._length,c[0].trace._length=U,M+=c[g].s,c[g][p]=M;if(y)for(k=(y==="fraction"?M:M/100)||1,h=0;h<D.length;h++){var V=d[D[h]][g];V[p]/=k,V.sNorm=V.s/k}}for(h=0;h<D.length;h++){c=d[D[h]];var q=c[0].trace,z=v.calcMarkerSize(q,q._rawLength),H=Array.isArray(z);if(z&&x[h]||H){var G=z;for(z=new Array(U),g=0;g<U;g++)z[g]=c[g].gap?0:H?G[c[g].i]:G}var J=new Array(U),le=new Array(U);for(g=0;g<U;g++)J[g]=c[g].x,le[g]=c[g].y;v.calcAxisExpansion(a,q,i,s,J,le,z),c[0].t.orientation=b.orientation}}}}};function P(r,a,l,i,s,o,u){s[i]=!0;var d={i:null,gap:!0,s:0};if(d[u]=l,r.splice(a,0,d),a&&l===r[a-1][u]){var h=r[a-1];d.s=h.s,d.i=h.i,d.gap=h.gap}else o&&(d.s=t(r,a,l,u));a||(r[0].t=r[1].t,r[0].trace=r[1].trace,delete r[1].t,delete r[1].trace)}function t(r,a,l,i){var s=r[a-1],o=r[a+1];return o?s?s.s+(o.s-s.s)*(l-s[i])/(o[i]-s[i]):o.s:s.s}}}),Zp=Ne({"src/traces/scatter/line_points.js"(te,Z){var v=zs(),w=da(),C=w.BADNUM,P=w.LOG_CLIP,t=P+.5,r=P-.5,a=In(),l=a.segmentsIntersect,i=a.constrain,s=i0();Z.exports=function(u,d){var h=d.trace||{},g=d.xaxis,m=d.yaxis,E=g.type==="log",c=m.type==="log",_=g._length,T=m._length,M=d.backoff,k=h.marker,b=d.connectGaps,A=d.baseTolerance,y=d.shape,f=y==="linear",p=h.fill&&h.fill!=="none",x=[],N=s.minTolerance,D=u.length,B=new Array(D),U=0,V,q,z,H,G,J,le,ge,de,me,W,ie,se,ee,pe,oe;function Y(Ft){var Wt=u[Ft];if(!Wt)return!1;var lr=d.linearized?g.l2p(Wt.x):g.c2p(Wt.x),Rr=d.linearized?m.l2p(Wt.y):m.c2p(Wt.y);if(lr===C){if(E&&(lr=g.c2p(Wt.x,!0)),lr===C)return!1;c&&Rr===C&&(lr*=Math.abs(g._m*T*(g._m>0?t:r)/(m._m*_*(m._m>0?t:r)))),lr*=1e3}if(Rr===C){if(c&&(Rr=m.c2p(Wt.y,!0)),Rr===C)return!1;Rr*=1e3}return[lr,Rr]}function ce(Ft,Wt,lr,Rr){var Mr=lr-Ft,Sr=Rr-Wt,Kr=.5-Ft,Hn=.5-Wt,ga=Mr*Mr+Sr*Sr,ua=Mr*Kr+Sr*Hn;if(ua>0&&ua<ga){var Ta=Kr*Sr-Hn*Mr;if(Ta*Ta<ga)return!0}}var ue,_e;function Le(Ft,Wt){var lr=Ft[0]/_,Rr=Ft[1]/T,Mr=Math.max(0,-lr,lr-1,-Rr,Rr-1);return Mr&&ue!==void 0&&ce(lr,Rr,ue,_e)&&(Mr=0),Mr&&Wt&&ce(lr,Rr,Wt[0]/_,Wt[1]/T)&&(Mr=0),(1+s.toleranceGrowth*Mr)*A}function ze(Ft,Wt){var lr=Ft[0]-Wt[0],Rr=Ft[1]-Wt[1];return Math.sqrt(lr*lr+Rr*Rr)}var Xe=s.maxScreensAway,Ve=-_*Xe,rt=_*(1+Xe),mt=-T*Xe,_t=T*(1+Xe),vt=[[Ve,mt,rt,mt],[rt,mt,rt,_t],[rt,_t,Ve,_t],[Ve,_t,Ve,mt]],ut,Fe,Pe,be,Ye,yt;function wt(Ft,Wt){for(var lr=[],Rr=0,Mr=0;Mr<4;Mr++){var Sr=vt[Mr],Kr=l(Ft[0],Ft[1],Wt[0],Wt[1],Sr[0],Sr[1],Sr[2],Sr[3]);Kr&&(!Rr||Math.abs(Kr.x-lr[0][0])>1||Math.abs(Kr.y-lr[0][1])>1)&&(Kr=[Kr.x,Kr.y],Rr&&ze(Kr,Ft)<ze(lr[0],Ft)?lr.unshift(Kr):lr.push(Kr),Rr++)}return lr}function ht(Ft){if(Ft[0]<Ve||Ft[0]>rt||Ft[1]<mt||Ft[1]>_t)return[i(Ft[0],Ve,rt),i(Ft[1],mt,_t)]}function Yt(Ft,Wt){if(Ft[0]===Wt[0]&&(Ft[0]===Ve||Ft[0]===rt)||Ft[1]===Wt[1]&&(Ft[1]===mt||Ft[1]===_t))return!0}function $t(Ft,Wt){var lr=[],Rr=ht(Ft),Mr=ht(Wt);return Rr&&Mr&&Yt(Rr,Mr)||(Rr&&lr.push(Rr),Mr&&lr.push(Mr)),lr}function fr(Ft,Wt,lr){return function(Rr,Mr){var Sr=ht(Rr),Kr=ht(Mr),Hn=[];if(Sr&&Kr&&Yt(Sr,Kr))return Hn;Sr&&Hn.push(Sr),Kr&&Hn.push(Kr);var ga=2*a.constrain((Rr[Ft]+Mr[Ft])/2,Wt,lr)-((Sr||Rr)[Ft]+(Kr||Mr)[Ft]);if(ga){var ua;Sr&&Kr?ua=ga>0==Sr[Ft]>Kr[Ft]?Sr:Kr:ua=Sr||Kr,ua[Ft]+=ga}return Hn}}var mr;y==="linear"||y==="spline"?mr=wt:y==="hv"||y==="vh"?mr=$t:y==="hvh"?mr=fr(0,Ve,rt):y==="vhv"&&(mr=fr(1,mt,_t));function Ur(Ft,Wt){var lr=Wt[0]-Ft[0],Rr=(Wt[1]-Ft[1])/lr,Mr=(Ft[1]*Wt[0]-Wt[1]*Ft[0])/lr;return Mr>0?[Rr>0?Ve:rt,_t]:[Rr>0?rt:Ve,mt]}function jr(Ft){var Wt=Ft[0],lr=Ft[1],Rr=Wt===B[U-1][0],Mr=lr===B[U-1][1];if(!(Rr&&Mr))if(U>1){var Sr=Wt===B[U-2][0],Kr=lr===B[U-2][1];Rr&&(Wt===Ve||Wt===rt)&&Sr?Kr?U--:B[U-1]=Ft:Mr&&(lr===mt||lr===_t)&&Kr?Sr?U--:B[U-1]=Ft:B[U++]=Ft}else B[U++]=Ft}function fn(Ft){B[U-1][0]!==Ft[0]&&B[U-1][1]!==Ft[1]&&jr([Pe,be]),jr(Ft),Ye=null,Pe=be=0}var Br=a.isArrayOrTypedArray(k);function Qr(Ft){if(Ft&&M&&(Ft.i=V,Ft.d=u,Ft.trace=h,Ft.marker=Br?k[Ft.i]:k,Ft.backoff=M),ue=Ft[0]/_,_e=Ft[1]/T,ut=Ft[0]<Ve?Ve:Ft[0]>rt?rt:0,Fe=Ft[1]<mt?mt:Ft[1]>_t?_t:0,ut||Fe){if(!U)B[U++]=[ut||Ft[0],Fe||Ft[1]];else if(Ye){var Wt=mr(Ye,Ft);Wt.length>1&&(fn(Wt[0]),B[U++]=Wt[1])}else yt=mr(B[U-1],Ft)[0],B[U++]=yt;var lr=B[U-1];ut&&Fe&&(lr[0]!==ut||lr[1]!==Fe)?(Ye&&(Pe!==ut&&be!==Fe?jr(Pe&&be?Ur(Ye,Ft):[Pe||ut,be||Fe]):Pe&&be&&jr([Pe,be])),jr([ut,Fe])):Pe-ut&&be-Fe&&jr([ut||Pe,Fe||be]),Ye=Ft,Pe=ut,be=Fe}else Ye&&fn(mr(Ye,Ft)[0]),B[U++]=Ft}for(V=0;V<D;V++)if(q=Y(V),!!q){for(U=0,Ye=null,Qr(q),V++;V<D;V++){if(H=Y(V),!H){if(b)continue;break}if(!f||!d.simplify){Qr(H);continue}var Ot=Y(V+1);if(me=ze(H,q),!(!(p&&(U===0||U===D-1))&&me<Le(H,Ot)*N)){for(ge=[(H[0]-q[0])/me,(H[1]-q[1])/me],G=q,W=me,ie=ee=pe=0,le=!1,z=H,V++;V<u.length;V++){if(J=Ot,Ot=Y(V+1),!J){if(b)continue;break}if(de=[J[0]-q[0],J[1]-q[1]],oe=de[0]*ge[1]-de[1]*ge[0],ee=Math.min(ee,oe),pe=Math.max(pe,oe),pe-ee>Le(J,Ot))break;z=J,se=de[0]*ge[0]+de[1]*ge[1],se>W?(W=se,H=J,le=!1):se<ie&&(ie=se,G=J,le=!0)}if(le?(Qr(H),z!==G&&Qr(G)):(G!==q&&Qr(G),z!==H&&Qr(H)),Qr(z),V>=u.length||!J)break;Qr(J),q=J}}Ye&&jr([Pe||Ye[0],be||Ye[1]]),x.push(B.slice(0,U))}var $e=y.slice(y.length-1);if(M&&$e!=="h"&&$e!=="v"){for(var ot=!1,De=-1,Ee=[],Ae=0;Ae<x.length;Ae++)for(var Ie=0;Ie<x[Ae].length-1;Ie++){var tt=x[Ae][Ie],st=x[Ae][Ie+1],Bt=v.applyBackoff(st,tt);(Bt[0]!==st[0]||Bt[1]!==st[1])&&(ot=!0),Ee[De+1]||(De++,Ee[De]=[tt,[Bt[0],Bt[1]]])}return ot?Ee:x}return x}}}),$p=Ne({"src/traces/scatter/link_traces.js"(te,Z){var v={tonextx:1,tonexty:1,tonext:1};Z.exports=function(C,P,t){var r,a,l,i,s,o={},u=!1,d=-1,h=0,g=-1;for(a=0;a<t.length;a++)r=t[a][0].trace,l=r.stackgroup||"",l?l in o?s=o[l]:(s=o[l]=h,h++):r.fill in v&&g>=0?s=g:(s=g=h,h++),s<d&&(u=!0),r._groupIndex=d=s;var m=t.slice();u&&m.sort(function(c,_){var T=c[0].trace,M=_[0].trace;return T._groupIndex-M._groupIndex||T.index-M.index});var E={};for(a=0;a<m.length;a++)r=m[a][0].trace,l=r.stackgroup||"",r.visible===!0?(r._nexttrace=null,r.fill in v&&(i=E[l],r._prevtrace=i||null,i&&(i._nexttrace=r)),r._ownfill=r.fill&&(r.fill.substr(0,6)==="tozero"||r.fill==="toself"||r.fill.substr(0,2)==="to"&&!r._prevtrace),E[l]=r):r._prevtrace=r._nexttrace=r._ownfill=null;return m}}}),sm=Ne({"src/traces/scatter/plot.js"(te,Z){var v=xn(),w=Yo(),C=In(),P=C.ensureSingle,t=C.identity,r=zs(),a=yu(),l=Zp(),i=$p(),s=j1().tester;Z.exports=function(g,m,E,c,_,T){var M,k,b=!_,A=!!_&&_.duration>0,y=i(g,m,E);if(M=c.selectAll("g.trace").data(y,function(p){return p[0].trace.uid}),M.enter().append("g").attr("class",function(p){return"trace scatter trace"+p[0].trace.uid}).style("stroke-miterlimit",2),M.order(),o(g,M,m),A){T&&(k=T());var f=v.transition().duration(_.duration).ease(_.easing).each("end",function(){k&&k()}).each("interrupt",function(){k&&k()});f.each(function(){c.selectAll("g.trace").each(function(p,x){u(g,x,m,p,y,this,_)})})}else M.each(function(p,x){u(g,x,m,p,y,this,_)});b&&M.exit().remove(),c.selectAll("path:not([d])").remove()};function o(h,g,m){g.each(function(E){var c=P(v.select(this),"g","fills");r.setClipUrl(c,m.layerClipId,h);var _=E[0].trace,T=[];_._ownfill&&T.push("_ownFill"),_._nexttrace&&T.push("_nextFill");var M=c.selectAll("g").data(T,t);M.enter().append("g"),M.exit().each(function(k){_[k]=null}).remove(),M.order().each(function(k){_[k]=P(v.select(this),"path","js-fill")})})}function u(h,g,m,E,c,_,T){var M=h._context.staticPlot,k;d(h,g,m,E,c);var b=!!T&&T.duration>0;function A(jr){return b?jr.transition():jr}var y=m.xaxis,f=m.yaxis,p=E[0].trace,x=p.line,N=v.select(_),D=P(N,"g","errorbars"),B=P(N,"g","lines"),U=P(N,"g","points"),V=P(N,"g","text");if(w.getComponentMethod("errorbars","plot")(h,D,m,T),p.visible!==!0)return;A(N).style("opacity",p.opacity);var q,z,H=p.fill.charAt(p.fill.length-1);H!=="x"&&H!=="y"&&(H="");var G,J;H==="y"?(G=1,J=f.c2p(0,!0)):H==="x"&&(G=0,J=y.c2p(0,!0)),E[0][m.isRangePlot?"nodeRangePlot3":"node3"]=N;var le="",ge=[],de=p._prevtrace,me=null,W=null;de&&(le=de._prevRevpath||"",z=de._nextFill,ge=de._ownPolygons,me=de._fillsegments,W=de._fillElement);var ie,se,ee="",pe="",oe,Y,ce,ue,_e,Le,ze=[];p._polygons=[];var Xe=[],Ve=[],rt=C.noop;if(q=p._ownFill,a.hasLines(p)||p.fill!=="none"){z&&z.datum(E),["hv","vh","hvh","vhv"].indexOf(x.shape)!==-1?(oe=r.steps(x.shape),Y=r.steps(x.shape.split("").reverse().join(""))):x.shape==="spline"?oe=Y=function(jr){var fn=jr[jr.length-1];return jr.length>1&&jr[0][0]===fn[0]&&jr[0][1]===fn[1]?r.smoothclosed(jr.slice(1),x.smoothing):r.smoothopen(jr,x.smoothing)}:oe=Y=function(jr){return"M"+jr.join("L")},ce=function(jr){return Y(jr.reverse())},Ve=l(E,{xaxis:y,yaxis:f,trace:p,connectGaps:p.connectgaps,baseTolerance:Math.max(x.width||1,3)/4,shape:x.shape,backoff:x.backoff,simplify:x.simplify,fill:p.fill}),Xe=new Array(Ve.length);var mt=0;for(k=0;k<Ve.length;k++){var _t,vt=Ve[k];!_t||!H?(_t=vt.slice(),Xe[mt]=_t,mt++):_t.push.apply(_t,vt)}p._fillElement=null,p._fillExclusionElement=W,p._fillsegments=Xe.slice(0,mt),Xe=p._fillsegments,Ve.length&&(ue=Ve[0][0].slice(),_e=Ve[Ve.length-1],Le=_e[_e.length-1].slice()),rt=function(jr){return function(fn){if(ie=oe(fn),se=ce(fn),ee?H?(ee+="L"+ie.substr(1),pe=se+("L"+pe.substr(1))):(ee+="Z"+ie,pe=se+"Z"+pe):(ee=ie,pe=se),a.hasLines(p)){var Br=v.select(this);if(Br.datum(E),jr)A(Br.style("opacity",0).attr("d",ie).call(r.lineGroupStyle)).style("opacity",1);else{var Qr=A(Br);Qr.attr("d",ie),r.singleLineStyle(E,Qr)}}}}}var ut=B.selectAll(".js-line").data(Ve);A(ut.exit()).style("opacity",0).remove(),ut.each(rt(!1)),ut.enter().append("path").classed("js-line",!0).style("vector-effect",M?"none":"non-scaling-stroke").call(r.lineGroupStyle).each(rt(!0)),r.setClipUrl(ut,m.layerClipId,h);function Fe(jr){A(jr).attr("d","M0,0Z")}var Pe=function(){var jr=new Array(Xe.length);for(k=0;k<Xe.length;k++)jr[k]=s(Xe[k]);return jr},be=function(jr){var fn,Br;if(!jr||jr.length===0)for(fn=new Array(Xe.length),Br=0;Br<Xe.length;Br++){var Qr=Xe[Br][0].slice(),Ot=Xe[Br][Xe[Br].length-1].slice();Qr[G]=Ot[G]=J;var $e=[Ot,Qr],ot=$e.concat(Xe[Br]);fn[Br]=s(ot)}else{for(fn=new Array(jr.length-1+Xe.length),Br=0;Br<jr.length-1;Br++)fn[Br]=s(jr[Br]);var De=jr[jr.length-1].slice();for(De.reverse(),Br=0;Br<Xe.length;Br++)fn[jr.length-1+Br]=s(Xe[Br].concat(De))}return fn};Ve.length?(q?(q.datum(E),ue&&Le&&(H?(ue[G]=Le[G]=J,A(q).attr("d","M"+Le+"L"+ue+"L"+ee.substr(1)).call(r.singleFillStyle,h),ze=be(null)):(A(q).attr("d",ee+"Z").call(r.singleFillStyle,h),ze=Pe())),p._polygons=ze,p._fillElement=q):z&&(p.fill.substr(0,6)==="tonext"&&ee&&le?(p.fill==="tonext"?(A(z).attr("d",ee+"Z"+le+"Z").call(r.singleFillStyle,h),ze=Pe(),p._polygons=ze.concat(ge)):(A(z).attr("d",ee+"L"+le.substr(1)+"Z").call(r.singleFillStyle,h),ze=be(me),p._polygons=ze),p._fillElement=z):Fe(z)),p._prevRevpath=pe):(q?Fe(q):z&&Fe(z),p._prevRevpath=null),p._ownPolygons=ze;function Ye(jr){return jr.filter(function(fn){return!fn.gap&&fn.vis})}function yt(jr){return jr.filter(function(fn){return fn.vis})}function wt(jr){return jr.filter(function(fn){return!fn.gap})}function ht(jr){return jr.id}function Yt(jr){if(jr.ids)return ht}function $t(){return!1}function fr(jr,fn,Br){var Qr,Ot,$e,ot=Br[0].trace,De=a.hasMarkers(ot),Ee=a.hasText(ot),Ae=Yt(ot),Ie=$t,tt=$t;if(De||Ee){var st=t,Bt=ot.stackgroup,Ft=Bt&&h._fullLayout._scatterStackOpts[y._id+f._id][Bt].stackgaps==="infer zero";ot.marker.maxdisplayed||ot._needsCull?st=Ft?yt:Ye:Bt&&!Ft&&(st=wt),De&&(Ie=st),Ee&&(tt=st)}Ot=jr.selectAll("path.point"),Qr=Ot.data(Ie,Ae);var Wt=Qr.enter().append("path").classed("point",!0);b&&Wt.call(r.pointStyle,ot,h).call(r.translatePoints,y,f).style("opacity",0).transition().style("opacity",1),Qr.order();var lr;De&&(lr=r.makePointStyleFns(ot)),Qr.each(function(Rr){var Mr=v.select(this),Sr=A(Mr);$e=r.translatePoint(Rr,Sr,y,f),$e?(r.singlePointStyle(Rr,Sr,ot,lr,h),m.layerClipId&&r.hideOutsideRangePoint(Rr,Sr,y,f,ot.xcalendar,ot.ycalendar),ot.customdata&&Mr.classed("plotly-customdata",Rr.data!==null&&Rr.data!==void 0)):Sr.remove()}),b?Qr.exit().transition().style("opacity",0).remove():Qr.exit().remove(),Ot=fn.selectAll("g"),Qr=Ot.data(tt,Ae),Qr.enter().append("g").classed("textpoint",!0).append("text"),Qr.order(),Qr.each(function(Rr){var Mr=v.select(this),Sr=A(Mr.select("text"));$e=r.translatePoint(Rr,Sr,y,f),$e?m.layerClipId&&r.hideOutsideRangePoint(Rr,Mr,y,f,ot.xcalendar,ot.ycalendar):Mr.remove()}),Qr.selectAll("text").call(r.textPointStyle,ot,h).each(function(Rr){var Mr=y.c2p(Rr.x),Sr=f.c2p(Rr.y);v.select(this).selectAll("tspan.line").each(function(){A(v.select(this)).attr({x:Mr,y:Sr})})}),Qr.exit().remove()}U.datum(E),V.datum(E),fr(U,V,E);var mr=p.cliponaxis===!1,Ur=mr?null:m.layerClipId;r.setClipUrl(U,Ur,h),r.setClipUrl(V,Ur,h)}function d(h,g,m,E,c){var _=m.xaxis,T=m.yaxis,M=v.extent(C.simpleMap(_.range,_.r2c)),k=v.extent(C.simpleMap(T.range,T.r2c)),b=E[0].trace;if(a.hasMarkers(b)){var A=b.marker.maxdisplayed;if(A!==0){var y=E.filter(function(N){return N.x>=M[0]&&N.x<=M[1]&&N.y>=k[0]&&N.y<=k[1]}),f=Math.ceil(y.length/A),p=0;c.forEach(function(N,D){var B=N[0].trace;a.hasMarkers(B)&&B.marker.maxdisplayed>0&&D<g&&p++});var x=Math.round(p*f/3+Math.floor(p/3)*f/7.1);E.forEach(function(N){delete N.vis}),y.forEach(function(N,D){Math.round((D+x)%f)===0&&(N.vis=!0)})}}}}}),sh=Ne({"src/traces/scatter/marker_colorbar.js"(te,Z){Z.exports={container:"marker",min:"cmin",max:"cmax"}}}),lm=Ne({"src/traces/scatter/format_labels.js"(te,Z){var v=Os();Z.exports=function(C,P,t){var r={},a={_fullLayout:t},l=v.getFromTrace(a,P,"x"),i=v.getFromTrace(a,P,"y"),s=C.orig_x;s===void 0&&(s=C.x);var o=C.orig_y;return o===void 0&&(o=C.y),r.xLabel=v.tickText(l,l.c2l(s),!0).text,r.yLabel=v.tickText(i,i.c2l(o),!0).text,r}}}),Xh=Ne({"src/traces/scatter/style.js"(te,Z){var v=xn(),w=zs(),C=Yo();function P(l){var i=v.select(l).selectAll("g.trace.scatter");i.style("opacity",function(s){return s[0].trace.opacity}),i.selectAll("g.points").each(function(s){var o=v.select(this),u=s.trace||s[0].trace;t(o,u,l)}),i.selectAll("g.text").each(function(s){var o=v.select(this),u=s.trace||s[0].trace;r(o,u,l)}),i.selectAll("g.trace path.js-line").call(w.lineGroupStyle),i.selectAll("g.trace path.js-fill").call(w.fillGroupStyle,l,!1),C.getComponentMethod("errorbars","style")(i)}function t(l,i,s){w.pointStyle(l.selectAll("path.point"),i,s)}function r(l,i,s){w.textPointStyle(l.selectAll("text"),i,s)}function a(l,i,s){var o=i[0].trace;o.selectedpoints?(w.selectedPointStyle(s.selectAll("path.point"),o),w.selectedTextStyle(s.selectAll("text"),o)):(t(s,o,l),r(s,o,l))}Z.exports={style:P,stylePoints:t,styleText:r,styleOnSelect:a}}}),G1=Ne({"src/traces/scatter/get_trace_color.js"(te,Z){var v=Ha(),w=yu();Z.exports=function(P,t){var r,a;if(P.mode==="lines")return r=P.line.color,r&&v.opacity(r)?r:P.fillcolor;if(P.mode==="none")return P.fill?P.fillcolor:"";var l=t.mcc||(P.marker||{}).color,i=t.mlcc||((P.marker||{}).line||{}).color;return a=l&&v.opacity(l)?l:i&&v.opacity(i)&&(t.mlw||((P.marker||{}).line||{}).width)?i:"",a?v.opacity(a)<.3?v.addOpacity(a,.3):a:(r=(P.line||{}).color,r&&v.opacity(r)&&w.hasLines(P)&&P.line.width?r:P.fillcolor)}}}),ky=Ne({"src/traces/scatter/hover.js"(te,Z){var v=In(),w=oh(),C=Yo(),P=G1(),t=Ha(),r=v.fillText;Z.exports=function(l,i,s,o){var u=l.cd,d=u[0].trace,h=l.xa,g=l.ya,m=h.c2p(i),E=g.c2p(s),c=[m,E],_=d.hoveron||"",T=d.mode.indexOf("markers")!==-1?3:.5,M=!!d.xperiodalignment,k=!!d.yperiodalignment;if(_.indexOf("points")!==-1){var b=function(ge){if(M){var de=h.c2p(ge.xStart),me=h.c2p(ge.xEnd);return m>=Math.min(de,me)&&m<=Math.max(de,me)?0:1/0}var W=Math.max(3,ge.mrc||0),ie=1-1/W,se=Math.abs(h.c2p(ge.x)-m);return se<W?ie*se/W:se-W+ie},A=function(ge){if(k){var de=g.c2p(ge.yStart),me=g.c2p(ge.yEnd);return E>=Math.min(de,me)&&E<=Math.max(de,me)?0:1/0}var W=Math.max(3,ge.mrc||0),ie=1-1/W,se=Math.abs(g.c2p(ge.y)-E);return se<W?ie*se/W:se-W+ie},y=function(ge){var de=Math.max(T,ge.mrc||0),me=h.c2p(ge.x)-m,W=g.c2p(ge.y)-E;return Math.max(Math.sqrt(me*me+W*W)-de,1-T/de)},f=w.getDistanceFunction(o,b,A,y);if(w.getClosest(u,f,l),l.index!==!1){var p=u[l.index],x=h.c2p(p.x,!0),N=g.c2p(p.y,!0),D=p.mrc||1;l.index=p.i;var B=u[0].t.orientation,U=B&&(p.sNorm||p.s),V=B==="h"?U:p.orig_x!==void 0?p.orig_x:p.x,q=B==="v"?U:p.orig_y!==void 0?p.orig_y:p.y;return v.extendFlat(l,{color:P(d,p),x0:x-D,x1:x+D,xLabelVal:V,y0:N-D,y1:N+D,yLabelVal:q,spikeDistance:y(p),hovertemplate:d.hovertemplate}),r(p,d,l),C.getComponentMethod("errorbars","hoverInfo")(p,d,l),[l]}}function z(ge){if(!ge)return!1;var de=ge.node();try{var me=new DOMPoint(c[0],c[1]);return de.isPointInFill(me)}catch{var W=de.ownerSVGElement.createSVGPoint();return W.x=c[0],W.y=c[1],de.isPointInFill(W)}}function H(ge){var de,me=[],W=1/0,ie=-1/0,se=1/0,ee=-1/0,pe;for(de=0;de<ge.length;de++){var oe=ge[de];oe.contains(c)&&(me.push(oe),se=Math.min(se,oe.ymin),ee=Math.max(ee,oe.ymax))}if(me.length===0)return null;se=Math.max(se,0),ee=Math.min(ee,g._length),pe=(se+ee)/2;var Y,ce,ue,_e,Le,ze,Xe;for(de=0;de<me.length;de++)for(ce=me[de].pts,Y=1;Y<ce.length;Y++)ze=ce[Y-1][1],Xe=ce[Y][1],ze>pe!=Xe>=pe&&(_e=ce[Y-1][0],Le=ce[Y][0],Xe-ze&&(ue=_e+(Le-_e)*(pe-ze)/(Xe-ze),W=Math.min(W,ue),ie=Math.max(ie,ue)));return W=Math.max(W,0),ie=Math.min(ie,h._length),{x0:W,x1:ie,y0:pe,y1:pe}}if(_.indexOf("fills")!==-1&&d._fillElement){var G=z(d._fillElement)&&!z(d._fillExclusionElement);if(G){var J=H(d._polygons);J===null&&(J={x0:c[0],x1:c[0],y0:c[1],y1:c[1]});var le=t.defaultLine;return t.opacity(d.fillcolor)?le=d.fillcolor:t.opacity((d.line||{}).color)&&(le=d.line.color),v.extendFlat(l,{distance:l.maxHoverDistance,x0:J.x0,x1:J.x1,y0:J.y0,y1:J.y1,color:le,hovertemplate:!1}),delete l.index,d.text&&!v.isArrayOrTypedArray(d.text)?l.text=String(d.text):l.text=d.name,[l]}}}}}),Py=Ne({"src/traces/scatter/select.js"(te,Z){var v=yu();Z.exports=function(C,P){var t=C.cd,r=C.xaxis,a=C.yaxis,l=[],i=t[0].trace,s,o,u,d,h=!v.hasMarkers(i)&&!v.hasText(i);if(h)return[];if(P===!1)for(s=0;s<t.length;s++)t[s].selected=0;else for(s=0;s<t.length;s++)o=t[s],u=r.c2p(o.x),d=a.c2p(o.y),o.i!==null&&P.contains([u,d],!1,s,C)?(l.push({pointNumber:o.i,x:r.c2d(o.x),y:a.c2d(o.y)}),o.selected=1):o.selected=0;return l}}}),EM=Ne({"src/plots/cartesian/attributes.js"(te,Z){Z.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}}}),cv=Ne({"src/plots/cartesian/type_defaults.js"(te,Z){var v=Yo().traceIs,w=Ag();Z.exports=function(l,i,s,o){s("autotypenumbers",o.autotypenumbersDflt);var u=s("type",(o.splomStash||{}).type);u==="-"&&(C(i,o.data),i.type==="-"?i.type="linear":l.type=i.type)};function C(a,l){if(a.type==="-"){var i=a._id,s=i.charAt(0),o;i.indexOf("scene")!==-1&&(i=s);var u=P(l,i,s);if(u){if(u.type==="histogram"&&s==={v:"y",h:"x"}[u.orientation||"v"]){a.type="linear";return}var d=s+"calendar",h=u[d],g={noMultiCategory:!v(u,"cartesian")||v(u,"noMultiCategory")};if(u.type==="box"&&u._hasPreCompStats&&s==={h:"x",v:"y"}[u.orientation||"v"]&&(g.noMultiCategory=!0),g.autotypenumbers=a.autotypenumbers,r(u,s)){var m=t(u),E=[];for(o=0;o<l.length;o++){var c=l[o];!v(c,"box-violin")||(c[s+"axis"]||s)!==i||(c[m]!==void 0?E.push(c[m][0]):c.name!==void 0?E.push(c.name):E.push("text"),c[d]!==h&&(h=void 0))}a.type=w(E,h,g)}else if(u.type==="splom"){var _=u.dimensions,T=_[u._axesDim[i]];T.visible&&(a.type=w(T.values,h,g))}else a.type=w(u[s]||[u[s+"0"]],h,g)}}}function P(a,l,i){for(var s=0;s<a.length;s++){var o=a[s];if(o.type==="splom"&&o._length>0&&(o["_"+i+"axes"]||{})[l])return o;if((o[i+"axis"]||i)===l){if(r(o,i))return o;if((o[i]||[]).length||o[i+"0"])return o}}}function t(a){return{v:"x",h:"y"}[a.orientation||"v"]}function r(a,l){var i=t(a),s=v(a,"box-violin"),o=v(a._fullInput||{},"candlestick");return s&&!o&&l===i&&a[i]===void 0&&a[i+"0"]===void 0}}}),Yf=Ne({"src/plots/cartesian/category_order_defaults.js"(te,Z){var v=Ri().isTypedArraySpec;function w(C,P){var t=P.dataAttr||C._id.charAt(0),r={},a,l,i;if(P.axData)a=P.axData;else for(a=[],l=0;l<P.data.length;l++){var s=P.data[l];s[t+"axis"]===C._id&&a.push(s)}for(l=0;l<a.length;l++){var o=a[l][t];for(i=0;i<o.length;i++){var u=o[i];u!=null&&(r[u]=1)}}return Object.keys(r)}Z.exports=function(P,t,r,a){if(t.type==="category"){var l=P.categoryarray,i=Array.isArray(l)&&l.length>0||v(l),s;i&&(s="array");var o=r("categoryorder",s),u;o==="array"&&(u=r("categoryarray")),!i&&o==="array"&&(o=t.categoryorder="trace"),o==="trace"?t._initialCategories=[]:o==="array"?t._initialCategories=u.slice():(u=w(t,a).sort(),o==="category ascending"?t._initialCategories=u:o==="category descending"&&(t._initialCategories=u.reverse()))}}}}),ec=Ne({"src/plots/cartesian/line_grid_defaults.js"(te,Z){var v=to().mix,w=js(),C=In();Z.exports=function(t,r,a,l){l=l||{};var i=l.dfltColor;function s(p,x){return C.coerce2(t,r,l.attributes,p,x)}var o=s("linecolor",i),u=s("linewidth"),d=a("showline",l.showLine||!!o||!!u);d||(delete r.linecolor,delete r.linewidth);var h=v(i,l.bgColor,l.blend||w.lightFraction).toRgbString(),g=s("gridcolor",h),m=s("gridwidth"),E=s("griddash"),c=a("showgrid",l.showGrid||!!g||!!m||!!E);if(c||(delete r.gridcolor,delete r.gridwidth,delete r.griddash),l.hasMinor){var _=v(r.gridcolor,l.bgColor,67).toRgbString(),T=s("minor.gridcolor",_),M=s("minor.gridwidth",r.gridwidth||1),k=s("minor.griddash",r.griddash||"solid"),b=a("minor.showgrid",!!T||!!M||!!k);b||(delete r.minor.gridcolor,delete r.minor.gridwidth,delete r.minor.griddash)}if(!l.noZeroLine){s("zerolinelayer");var A=s("zerolinecolor",i),y=s("zerolinewidth"),f=a("zeroline",l.showGrid||!!A||!!y);f||(delete r.zerolinelayer,delete r.zerolinecolor,delete r.zerolinewidth)}}}}),Om=Ne({"src/plots/cartesian/axis_defaults.js"(te,Z){var v=Fn(),w=Yo(),C=In(),P=Cu(),t=jd(),r=Sd(),a=Ty(),l=j0(),i=Em(),s=dp(),o=Yf(),u=ec(),d=iM(),h=Vp(),g=wh().WEEKDAY_PATTERN,m=wh().HOUR_PATTERN;Z.exports=function(M,k,b,A,y){var f=A.letter,p=A.font||{},x=A.splomStash||{},N=b("visible",!A.visibleDflt),D=k._template||{},B=k.type||D.type||"-",U;if(B==="date"){var V=w.getComponentMethod("calendars","handleDefaults");V(M,k,"calendar",A.calendar),A.noTicklabelmode||(U=b("ticklabelmode"))}!A.noTicklabelindex&&(B==="date"||B==="linear")&&b("ticklabelindex");var q="";(!A.noTicklabelposition||B==="multicategory")&&(q=C.coerce(M,k,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:U==="period"?["outside","inside"]:f==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),A.noTicklabeloverflow||b("ticklabeloverflow",q.indexOf("inside")!==-1?"hide past domain":B==="category"||B==="multicategory"?"allow":"hide past div"),h(k,y),d(M,k,b,A),o(M,k,b,A),A.noHover||(B!=="category"&&b("hoverformat"),A.noUnifiedhovertitle||b("unifiedhovertitle.text"));var z=b("color"),H=z!==r.color.dflt?z:p.color,G=x.label||y._dfltTitle[f];if(s(M,k,b,B,A),!N)return k;b("title.text",G),C.coerceFont(b,"title.font",p,{overrideDflt:{size:C.bigFont(p.size),color:H}}),a(M,k,b,B);var J=A.hasMinor;if(J&&(P.newContainer(k,"minor"),a(M,k,b,B,{isMinor:!0})),i(M,k,b,B,A),l(M,k,b,A),J){var le=A.isMinor;A.isMinor=!0,l(M,k,b,A),A.isMinor=le}u(M,k,b,{dfltColor:z,bgColor:A.bgColor,showGrid:A.showGrid,hasMinor:J,attributes:r}),J&&!k.minor.ticks&&!k.minor.showgrid&&delete k.minor,(k.showline||k.ticks)&&b("mirror");var ge=B==="multicategory";if(!A.noTickson&&(B==="category"||ge)&&(k.ticks||k.showgrid)&&(ge?(b("tickson","boundaries"),delete k.ticklabelposition):b("tickson")),ge){var de=b("showdividers");de&&(b("dividercolor"),b("dividerwidth"))}if(B==="date")if(t(M,k,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:E}),!k.rangebreaks.length)delete k.rangebreaks;else{for(var me=0;me<k.rangebreaks.length;me++)if(k.rangebreaks[me].pattern===g){k._hasDayOfWeekBreaks=!0;break}if(h(k,y),y._has("scattergl")||y._has("splom"))for(var W=0;W<A.data.length;W++){var ie=A.data[W];(ie.type==="scattergl"||ie.type==="splom")&&(ie.visible=!1,C.warn(ie.type+" traces do not work on axes with rangebreaks. Setting trace "+ie.index+" to `visible: false`."))}}return k};function E(T,M,k){function b(U,V){return C.coerce(T,M,r.rangebreaks,U,V)}var A=b("enabled");if(A){var y=b("bounds");if(y&&y.length>=2){var f="",p,x;if(y.length===2){for(p=0;p<2;p++)if(x=_(y[p]),x){f=g;break}}var N=b("pattern",f);if(N===g)for(p=0;p<2;p++)x=_(y[p]),x&&(M.bounds[p]=y[p]=x-1);if(N)for(p=0;p<2;p++)switch(x=y[p],N){case g:if(!v(x)){M.enabled=!1;return}if(x=+x,x!==Math.floor(x)||x<0||x>=7){M.enabled=!1;return}M.bounds[p]=y[p]=x;break;case m:if(!v(x)){M.enabled=!1;return}if(x=+x,x<0||x>24){M.enabled=!1;return}M.bounds[p]=y[p]=x;break}if(k.autorange===!1){var D=k.range;if(D[0]<D[1]){if(y[0]<D[0]&&y[1]>D[1]){M.enabled=!1;return}}else if(y[0]>D[0]&&y[1]<D[1]){M.enabled=!1;return}}}else{var B=b("values");if(B&&B.length)b("dvalue");else{M.enabled=!1;return}}}}var c={sun:1,mon:2,tue:3,wed:4,thu:5,fri:6,sat:7};function _(T){if(typeof T=="string")return c[T.substr(0,3).toLowerCase()]}}}),vp=Ne({"src/plots/cartesian/position_defaults.js"(te,Z){var v=Fn(),w=In();Z.exports=function(P,t,r,a){var l=a.counterAxes||[],i=a.overlayableAxes||[],s=a.letter,o=a.grid,u=a.overlayingDomain,d,h,g,m,E,c;o&&(h=o._domains[s][o._axisMap[t._id]],d=o._anchors[t._id],h&&(g=o[s+"side"].split(" ")[0],m=o.domain[s][g==="right"||g==="top"?1:0])),h=h||[0,1],d=d||(v(P.position)?"free":l[0]||"free"),g=g||(s==="x"?"bottom":"left"),m=m||0,E=0,c=!1;var _=w.coerce(P,t,{anchor:{valType:"enumerated",values:["free"].concat(l),dflt:d}},"anchor"),T=w.coerce(P,t,{side:{valType:"enumerated",values:s==="x"?["bottom","top"]:["left","right"],dflt:g}},"side");if(_==="free"){if(s==="y"){var M=r("autoshift");M&&(m=T==="left"?u[0]:u[1],c=t.automargin?t.automargin:!0,E=T==="left"?-3:3),r("shift",E)}r("position",m)}r("automargin",c);var k=!1;if(i.length&&(k=w.coerce(P,t,{overlaying:{valType:"enumerated",values:[!1].concat(i),dflt:!1}},"overlaying")),!k){var b=r("domain",h);b[0]>b[1]-1/4096&&(t.domain=h),w.noneOrAll(P.domain,t.domain,h),t.tickmode==="sync"&&(t.tickmode="auto")}return r("layer"),t}}}),yA=Ne({"src/plots/cartesian/layout_defaults.js"(te,Z){var v=In(),w=Ha(),C=bv().isUnifiedHover,P=dM(),t=Cu(),r=xx(),a=Sd(),l=cv(),i=Om(),s=My(),o=vp(),u=Wf(),d=u.id2name,h=u.name2id,g=wh().AX_ID_PATTERN,m=Yo(),E=m.traceIs,c=m.getComponentMethod;function _(T,M,k){Array.isArray(T[M])?T[M].push(k):T[M]=[k]}Z.exports=function(M,k,b){var A=k.autotypenumbers,y={},f={},p={},x={},N={},D={},B={},U={},V={},q={},z,H;for(z=0;z<b.length;z++){var G=b[z];if(E(G,"cartesian")){var J;if(G.xaxis)J=d(G.xaxis),_(y,J,G);else if(G.xaxes)for(H=0;H<G.xaxes.length;H++)_(y,d(G.xaxes[H]),G);var le;if(G.yaxis)le=d(G.yaxis),_(y,le,G);else if(G.yaxes)for(H=0;H<G.yaxes.length;H++)_(y,d(G.yaxes[H]),G);if(G.type==="funnel"?G.orientation==="h"?(J&&(f[J]=!0),le&&(B[le]=!0)):le&&(p[le]=!0):G.type==="image"?(le&&(U[le]=!0),J&&(U[J]=!0)):(le&&(N[le]=!0,D[le]=!0),(!E(G,"carpet")||G.type==="carpet"&&!G._cheater)&&J&&(x[J]=!0)),G.type==="carpet"&&G._cheater&&J&&(f[J]=!0),E(G,"2dMap")&&(V[J]=!0,V[le]=!0),E(G,"oriented")){var ge=G.orientation==="h"?le:J;q[ge]=!0}}}var de=k._subplots,me=de.xaxis,W=de.yaxis,ie=v.simpleMap(me,d),se=v.simpleMap(W,d),ee=ie.concat(se),pe=w.background;me.length&&W.length&&(pe=v.coerce(M,k,r,"plot_bgcolor"));var oe=w.combine(pe,k.paper_bgcolor),Y,ce,ue,_e,Le;function ze(){var Ie=y[Y]||[];Le._traceIndices=Ie.map(function(tt){return tt.index}),Le._annIndices=[],Le._shapeIndices=[],Le._selectionIndices=[],Le._imgIndices=[],Le._subplotsWith=[],Le._counterAxes=[],Le._name=Le._attr=Y,Le._id=ce}function Xe(Ie,tt){return v.coerce(_e,Le,a,Ie,tt)}function Ve(Ie,tt){return v.coerce2(_e,Le,a,Ie,tt)}function rt(Ie){return Ie==="x"?W:me}function mt(Ie,tt){for(var st=Ie==="x"?ie:se,Bt=[],Ft=0;Ft<st.length;Ft++){var Wt=st[Ft];Wt!==tt&&!(M[Wt]||{}).overlaying&&Bt.push(h(Wt))}return Bt}var _t={x:rt("x"),y:rt("y")},vt=_t.x.concat(_t.y),ut={},Fe=[];function Pe(){var Ie=_e.matches;g.test(Ie)&&vt.indexOf(Ie)===-1&&(ut[Ie]=_e.type,Fe=Object.keys(ut))}var be=P(M,k),Ye=C(be);for(z=0;z<ee.length;z++){Y=ee[z],ce=h(Y),ue=Y.charAt(0),v.isPlainObject(M[Y])||(M[Y]={}),_e=M[Y],Le=t.newContainer(k,Y,ue+"axis"),ze();var yt=ue==="x"&&!x[Y]&&f[Y]||ue==="y"&&!N[Y]&&p[Y],wt=ue==="y"&&(!D[Y]&&B[Y]||U[Y]),ht={hasMinor:!0,letter:ue,font:k.font,outerTicks:V[Y],showGrid:!q[Y],data:y[Y]||[],bgColor:oe,calendar:k.calendar,automargin:!0,visibleDflt:yt,reverseDflt:wt,autotypenumbersDflt:A,splomStash:((k._splomAxes||{})[ue]||{})[ce],noAutotickangles:ue==="y"};Xe("uirevision",k.uirevision),l(_e,Le,Xe,ht),i(_e,Le,Xe,ht,k);var Yt=Ye&&ue===be.charAt(0),$t=Ve("spikecolor",Ye?Le.color:void 0),fr=Ve("spikethickness",Ye?1.5:void 0),mr=Ve("spikedash",Ye?"dot":void 0),Ur=Ve("spikemode",Ye?"across":void 0),jr=Ve("spikesnap"),fn=Xe("showspikes",!!Yt||!!$t||!!fr||!!mr||!!Ur||!!jr);fn||(delete Le.spikecolor,delete Le.spikethickness,delete Le.spikedash,delete Le.spikemode,delete Le.spikesnap);var Br=d(_e.overlaying),Qr=[0,1];if(k[Br]!==void 0){var Ot=d(k[Br].anchor);k[Ot]!==void 0&&(Qr=k[Ot].domain)}o(_e,Le,Xe,{letter:ue,counterAxes:_t[ue],overlayableAxes:mt(ue,Y),grid:k.grid,overlayingDomain:Qr}),Xe("title.standoff"),Pe(),Le._input=_e}for(z=0;z<Fe.length;){ce=Fe[z++],Y=d(ce),ue=Y.charAt(0),v.isPlainObject(M[Y])||(M[Y]={}),_e=M[Y],Le=t.newContainer(k,Y,ue+"axis"),ze();var $e={letter:ue,font:k.font,outerTicks:V[Y],showGrid:!q[Y],data:[],bgColor:oe,calendar:k.calendar,automargin:!0,visibleDflt:!1,reverseDflt:!1,autotypenumbersDflt:A,splomStash:((k._splomAxes||{})[ue]||{})[ce]};Xe("uirevision",k.uirevision),Le.type=ut[ce]||"linear",i(_e,Le,Xe,$e,k),o(_e,Le,Xe,{letter:ue,counterAxes:_t[ue],overlayableAxes:mt(ue,Y),grid:k.grid}),Xe("fixedrange"),Xe("modebardisable"),Pe(),Le._input=_e}var ot=c("rangeslider","handleDefaults"),De=c("rangeselector","handleDefaults");for(z=0;z<ie.length;z++)Y=ie[z],_e=M[Y],Le=k[Y],ot(M,k,Y),Le.type==="date"&&De(_e,Le,k,se,Le.calendar),Xe("fixedrange"),Xe("modebardisable");for(z=0;z<se.length;z++){Y=se[z],_e=M[Y],Le=k[Y];var Ee=k[d(Le.anchor)],Ae=c("rangeslider","isVisible")(Ee);Xe("fixedrange",Ae),Xe("modebardisable")}s.handleDefaults(M,k,{axIds:vt.concat(Fe).sort(u.idSort),axHasImage:U})}}}),kg=Ne({"src/plots/cartesian/transition_axes.js"(te,Z){var v=xn(),w=Yo(),C=In(),P=zs(),t=Os();Z.exports=function(a,l,i,s){var o=a._fullLayout;if(l.length===0){t.redrawComponents(a);return}function u(k){var b=k.xaxis,A=k.yaxis;o._defs.select("#"+k.clipId+"> rect").call(P.setTranslate,0,0).call(P.setScale,1,1),k.plot.call(P.setTranslate,b._offset,A._offset).call(P.setScale,1,1);var y=k.plot.selectAll(".scatterlayer .trace");y.selectAll(".point").call(P.setPointGroupScale,1,1),y.selectAll(".textpoint").call(P.setTextPointsScale,1,1),y.call(P.hideOutsideRangePoints,k)}function d(k,b){var A=k.plotinfo,y=A.xaxis,f=A.yaxis,p=y._length,x=f._length,N=!!k.xr1,D=!!k.yr1,B=[];if(N){var U=C.simpleMap(k.xr0,y.r2l),V=C.simpleMap(k.xr1,y.r2l),q=U[1]-U[0],z=V[1]-V[0];B[0]=(U[0]*(1-b)+b*V[0]-U[0])/(U[1]-U[0])*p,B[2]=p*(1-b+b*z/q),y.range[0]=y.l2r(U[0]*(1-b)+b*V[0]),y.range[1]=y.l2r(U[1]*(1-b)+b*V[1])}else B[0]=0,B[2]=p;if(D){var H=C.simpleMap(k.yr0,f.r2l),G=C.simpleMap(k.yr1,f.r2l),J=H[1]-H[0],le=G[1]-G[0];B[1]=(H[1]*(1-b)+b*G[1]-H[1])/(H[0]-H[1])*x,B[3]=x*(1-b+b*le/J),f.range[0]=y.l2r(H[0]*(1-b)+b*G[0]),f.range[1]=f.l2r(H[1]*(1-b)+b*G[1])}else B[1]=0,B[3]=x;t.drawOne(a,y,{skipTitle:!0}),t.drawOne(a,f,{skipTitle:!0}),t.redrawComponents(a,[y._id,f._id]);var ge=N?p/B[2]:1,de=D?x/B[3]:1,me=N?B[0]:0,W=D?B[1]:0,ie=N?B[0]/B[2]*p:0,se=D?B[1]/B[3]*x:0,ee=y._offset-ie,pe=f._offset-se;A.clipRect.call(P.setTranslate,me,W).call(P.setScale,1/ge,1/de),A.plot.call(P.setTranslate,ee,pe).call(P.setScale,ge,de),P.setPointGroupScale(A.zoomScalePts,1/ge,1/de),P.setTextPointsScale(A.zoomScaleTxt,1/ge,1/de)}var h;s&&(h=s());function g(){for(var k={},b=0;b<l.length;b++){var A=l[b],y=A.plotinfo.xaxis,f=A.plotinfo.yaxis;A.xr1&&(k[y._name+".range"]=A.xr1.slice()),A.yr1&&(k[f._name+".range"]=A.yr1.slice())}return h&&h(),w.call("relayout",a,k).then(function(){for(var p=0;p<l.length;p++)u(l[p].plotinfo)})}function m(){for(var k={},b=0;b<l.length;b++){var A=l[b],y=A.plotinfo.xaxis,f=A.plotinfo.yaxis;A.xr0&&(k[y._name+".range"]=A.xr0.slice()),A.yr0&&(k[f._name+".range"]=A.yr0.slice())}return w.call("relayout",a,k).then(function(){for(var p=0;p<l.length;p++)u(l[p].plotinfo)})}var E,c,_,T=v.ease(i.easing);a._transitionData._interruptCallbacks.push(function(){return window.cancelAnimationFrame(_),_=null,m()});function M(){c=Date.now();for(var k=Math.min(1,(c-E)/i.duration),b=T(k),A=0;A<l.length;A++)d(l[A],b);c-E>i.duration?(g(),_=window.cancelAnimationFrame(M)):_=window.requestAnimationFrame(M)}return E=Date.now(),_=window.requestAnimationFrame(M),Promise.resolve()}}}),Ih=Ne({"src/plots/cartesian/index.js"(te){var Z=xn(),v=Yo(),w=In(),C=ff(),P=zs(),t=lv().getModuleCalcData,r=Wf(),a=wh(),l=hp(),i=w.ensureSingle;function s(E,c,_){return w.ensureSingle(E,c,_,function(T){T.datum(_)})}var o=a.zindexSeparator;te.name="cartesian",te.attr=["xaxis","yaxis"],te.idRoot=["x","y"],te.idRegex=a.idRegex,te.attrRegex=a.attrRegex,te.attributes=EM(),te.layoutAttributes=Sd(),te.supplyLayoutDefaults=yA(),te.transitionAxes=kg(),te.finalizeSubplots=function(E,c){var _=c._subplots,T=_.xaxis,M=_.yaxis,k=_.cartesian,b=k,A={},y={},f,p,x;for(f=0;f<b.length;f++){var N=b[f].split("y");A[N[0]]=1,y["y"+N[1]]=1}for(f=0;f<T.length;f++)p=T[f],A[p]||(x=(E[r.id2name(p)]||{}).anchor,a.idRegex.y.test(x)||(x="y"),k.push(p+x),b.push(p+x),y[x]||(y[x]=1,w.pushUnique(M,x)));for(f=0;f<M.length;f++)x=M[f],y[x]||(p=(E[r.id2name(x)]||{}).anchor,a.idRegex.x.test(p)||(p="x"),k.push(p+x),b.push(p+x),A[p]||(A[p]=1,w.pushUnique(T,p)));if(!b.length){p="",x="";for(var D in E)if(a.attrRegex.test(D)){var B=D.charAt(0);B==="x"?(!p||+D.substr(5)<+p.substr(5))&&(p=D):(!x||+D.substr(5)<+x.substr(5))&&(x=D)}p=p?r.name2id(p):"x",x=x?r.name2id(x):"y",T.push(p),M.push(x),k.push(p+x)}},te.plot=function(E,c,_,T){var M=E._fullLayout,k=M._subplots.cartesian,b=E.calcdata,A;if(!Array.isArray(c))for(c=[],A=0;A<b.length;A++)c.push(A);for(var y=M._zindices,f=0;f<y.length;f++){var p=y[f];for(A=0;A<k.length;A++){var x=k[A],N=M._plots[x];if(f>0){var D=N.id;if(D.indexOf(o)!==-1)continue;D+=o+(f+1),N=w.extendFlat({},N,{id:D,plot:M._cartesianlayer.selectAll(".subplot").select("."+D)})}for(var B=[],U,V=0;V<b.length;V++){var q=b[V],z=q[0].trace;p===(z.zorder||0)&&z.xaxis+z.yaxis===x&&((c.indexOf(z.index)!==-1||z.carpet)&&(U&&U[0].trace.xaxis+U[0].trace.yaxis===x&&["tonextx","tonexty","tonext"].indexOf(z.fill)!==-1&&B.indexOf(U)===-1&&B.push(U),B.push(q)),U=q)}u(E,N,B,_,T)}}};function u(E,c,_,T,M){for(var k=a.traceLayerClasses,b=E._fullLayout,A=b._zindices,y=b._modules,f,p,x,N=[],D=[],B=0;B<A.length;B++)for(var U=A[B],V=0;V<y.length;V++){f=y[V];var q=f.name,z=v.modules[q].categories;if(z.svg){var H=f.layerName||q+"layer",G=H+(B?Number(B)+1:""),J=f.plot;p=t(_,J,U),x=p[0],_=p[1],x.length&&N.push({i:k.indexOf(H),zindex:B,className:G,plotMethod:J,cdModule:x}),z.zoomScale&&D.push("."+G)}}N.sort(function(de,me){return(de.zindex||0)-(me.zindex||0)||de.i-me.i});var le=c.plot.selectAll("g.mlayer").data(N,function(de){return de.className});if(le.enter().append("g").attr("class",function(de){return de.className}).classed("mlayer",!0).classed("rangeplot",c.isRangePlot),le.exit().remove(),le.order(),le.each(function(de){var me=Z.select(this),W=de.className;de.plotMethod(E,c,de.cdModule,me,T,M),a.clipOnAxisFalseQuery.indexOf("."+W)===-1&&P.setClipUrl(me,c.layerClipId,E)}),b._has("scattergl")&&(f=v.getModule("scattergl"),x=t(_,f)[0],f.plot(E,c,x)),!E._context.staticPlot&&(c._hasClipOnAxisFalse&&(c.clipOnAxisFalseTraces=c.plot.selectAll(a.clipOnAxisFalseQuery.join(",")).selectAll(".trace")),D.length)){var ge=c.plot.selectAll(D.join(",")).selectAll(".trace");c.zoomScalePts=ge.selectAll("path.point"),c.zoomScaleTxt=ge.selectAll(".textpoint")}}te.clean=function(E,c,_,T){var M=T._plots||{},k=c._plots||{},b=T._subplots||{},A,y,f;if(T._hasOnlyLargeSploms&&!c._hasOnlyLargeSploms)for(f in M)A=M[f],A.plotgroup&&A.plotgroup.remove();var p=T._has&&T._has("gl"),x=c._has&&c._has("gl");if(p&&!x)for(f in M)A=M[f],A._scene&&A._scene.destroy();if(b.xaxis&&b.yaxis){var N=r.listIds({_fullLayout:T});for(y=0;y<N.length;y++){var D=N[y];c[r.id2name(D)]||T._infolayer.selectAll(".g-"+D+"title").remove()}}var B=T._has&&T._has("cartesian"),U=c._has&&c._has("cartesian");if(B&&!U)g(T._cartesianlayer.selectAll(".subplot"),T),T._defs.selectAll(".axesclip").remove(),delete T._axisConstraintGroups,delete T._axisMatchGroups;else if(b.cartesian)for(y=0;y<b.cartesian.length;y++){var V=b.cartesian[y];if(V.indexOf(o)===-1&&!k[V]){var q="."+V+",."+V+"-x,."+V+"-y";T._cartesianlayer.selectAll(q).remove(),m(V,T)}}},te.drawFramework=function(E){var c=E._fullLayout,_=E.calcdata,T,M={};for(T=0;T<_.length;T++){var k=_[T][0],b=k.trace,A=b.zorder||0;M[A]||(M[A]=[]),M[A].push(k)}var y=Object.keys(M).map(Number).sort(w.sorterAsc);y.length||(y=[0]),c._zindices=y;var f=d(E),p=f.length,x=[];for(T=0;T<p;T++)x[T]=f[T].slice();for(var N=1;N<y.length;N++){var D=[];for(T=0;T<p;T++)D[T]=f[T].slice(),D[T][0]+=o+(N+1);x=x.concat(D)}var B=c._cartesianlayer.selectAll(".subplot").data(x,String);B.enter().append("g").attr("class",function(U){return"subplot "+U[0]}),B.order(),B.exit().call(g,c),B.each(function(U){var V=U[0],q=V.indexOf(o),z=q!==-1,H=z?V.slice(0,q):V,G=c._plots[V];G||(G=w.extendFlat({},c._plots[H]),G&&(G.id=V,c._plots[V]=G,c._subplots.cartesian.push(V))),G&&(G.plotgroup=Z.select(this),h(E,G),z||(G.draglayer=i(c._draggers,"g",V)))})},te.rangePlot=function(E,c,_){h(E,c),u(E,c,_),C.style(E)};function d(E){var c=E._fullLayout,_=c._zindices.length,T=c._subplots.cartesian,M=T.length,k,b,A,y,f,p,x=[],N=[];for(k=0;k<M;k++){A=T[k],y=c._plots[A],f=y.xaxis,p=y.yaxis;var D=f._mainAxis,B=p._mainAxis,U=D._id+B._id,V=c._plots[U];y.overlays=[],U!==A&&V?(y.mainplot=U,y.mainplotinfo=V,N.push(A)):(y.mainplot=void 0,y.mainplotinfo=void 0,x.push(A))}for(k=0;k<N.length;k++)A=N[k],y=c._plots[A],y.mainplotinfo.overlays.push(y);var q=x.concat(N),z=[];for(k=0;k<M;k++){A=q[k],y=c._plots[A],f=y.xaxis,p=y.yaxis;for(var H=[],G=1;G<=_;G++){var J="";for(G>1&&(J+=o+G),H.push(A+J),b=0;b<y.overlays.length;b++)H.push(y.overlays[b].id+J)}H=H.concat([f.layer,p.layer,f.overlaying||"",p.overlaying||""]),z.push(H)}return z}function h(E,c){var _=E._fullLayout,T=c.plotgroup,M=c.id,k=M.indexOf(o),b=k!==-1,A=a.layerValue2layerClass[c.xaxis.layer],y=a.layerValue2layerClass[c.yaxis.layer],f=_._hasOnlyLargeSploms,p=_._zindices.length>1,x=c.mainplotinfo;if(!c.mainplot||p)if(f)c.xlines=i(T,"path","xlines-above"),c.ylines=i(T,"path","ylines-above"),c.xaxislayer=i(T,"g","xaxislayer-above"),c.yaxislayer=i(T,"g","yaxislayer-above");else{if(!b){var N=i(T,"g","layer-subplot");c.shapelayer=i(N,"g","shapelayer"),c.imagelayer=i(N,"g","imagelayer"),x&&p?(c.minorGridlayer=x.minorGridlayer,c.gridlayer=x.gridlayer,c.zerolinelayer=x.zerolinelayer):(c.minorGridlayer=i(T,"g","minor-gridlayer"),c.gridlayer=i(T,"g","gridlayer"),c.zerolinelayer=i(T,"g","zerolinelayer"));var D=i(T,"g","layer-between");c.shapelayerBetween=i(D,"g","shapelayer"),c.imagelayerBetween=i(D,"g","imagelayer"),i(T,"path","xlines-below"),i(T,"path","ylines-below"),c.overlinesBelow=i(T,"g","overlines-below"),i(T,"g","xaxislayer-below"),i(T,"g","yaxislayer-below"),c.overaxesBelow=i(T,"g","overaxes-below")}c.overplot=i(T,"g","overplot"),c.plot=i(c.overplot,"g",M),x&&p?c.zerolinelayerAbove=x.zerolinelayerAbove:c.zerolinelayerAbove=i(T,"g","zerolinelayer-above"),b||(c.xlines=i(T,"path","xlines-above"),c.ylines=i(T,"path","ylines-above"),c.overlinesAbove=i(T,"g","overlines-above"),i(T,"g","xaxislayer-above"),i(T,"g","yaxislayer-above"),c.overaxesAbove=i(T,"g","overaxes-above"),c.xlines=T.select(".xlines-"+A),c.ylines=T.select(".ylines-"+y),c.xaxislayer=T.select(".xaxislayer-"+A),c.yaxislayer=T.select(".yaxislayer-"+y))}else{var B=x.plotgroup,U=M+"-x",V=M+"-y";c.minorGridlayer=x.minorGridlayer,c.gridlayer=x.gridlayer,c.zerolinelayer=x.zerolinelayer,c.zerolinelayerAbove=x.zerolinelayerAbove,i(x.overlinesBelow,"path",U),i(x.overlinesBelow,"path",V),i(x.overaxesBelow,"g",U),i(x.overaxesBelow,"g",V),c.plot=i(x.overplot,"g",M),i(x.overlinesAbove,"path",U),i(x.overlinesAbove,"path",V),i(x.overaxesAbove,"g",U),i(x.overaxesAbove,"g",V),c.xlines=B.select(".overlines-"+A).select("."+U),c.ylines=B.select(".overlines-"+y).select("."+V),c.xaxislayer=B.select(".overaxes-"+A).select("."+U),c.yaxislayer=B.select(".overaxes-"+y).select("."+V)}b||(f||(s(c.minorGridlayer,"g",c.xaxis._id),s(c.minorGridlayer,"g",c.yaxis._id),c.minorGridlayer.selectAll("g").map(function(q){return q[0]}).sort(r.idSort),s(c.gridlayer,"g",c.xaxis._id),s(c.gridlayer,"g",c.yaxis._id),c.gridlayer.selectAll("g").map(function(q){return q[0]}).sort(r.idSort)),c.xlines.style("fill","none").classed("crisp",!0),c.ylines.style("fill","none").classed("crisp",!0))}function g(E,c){if(E){var _={};E.each(function(y){var f=y[0],p=Z.select(this);p.remove(),m(f,c),_[f]=!0});for(var T in c._plots)for(var M=c._plots[T],k=M.overlays||[],b=0;b<k.length;b++){var A=k[b];_[A.id]&&A.plot.selectAll(".trace").remove()}}}function m(E,c){c._draggers.selectAll("g."+E).remove(),c._defs.select("#clip"+c._uid+E+"plot").remove()}te.toSVG=function(E){var c=E._fullLayout._glimages,_=Z.select(E).selectAll(".svg-container"),T=_.filter(function(k,b){return b===_.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function M(){var k=this,b=k.toDataURL("image/png"),A=c.append("svg:image");A.attr({xmlns:l.svg,"xlink:href":b,preserveAspectRatio:"none",x:0,y:0,width:k.style.width,height:k.style.height})}T.each(M)},te.updateFx=TM().updateFx}}),MM=Ne({"src/traces/scatter/index.js"(te,Z){var v=yu();Z.exports={hasLines:v.hasLines,hasMarkers:v.hasMarkers,hasText:v.hasText,isBubble:v.isBubble,attributes:tf(),layoutAttributes:bg(),supplyDefaults:SM(),crossTraceDefaults:Cg(),supplyLayoutDefaults:gA(),calc:Vv().calc,crossTraceCalc:Lx(),arraysToCalcdata:s0(),plot:sm(),colorbar:sh(),formatLabels:lm(),style:Xh().style,styleOnSelect:Xh().styleOnSelect,hoverPoints:ky(),selectPoints:Py(),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:Ih(),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}}}),X1=Ne({"src/components/annotations/draw_arrow_head.js"(te,Z){var v=xn(),w=Ha(),C=Uw(),P=In(),t=P.strScale,r=P.strRotate,a=P.strTranslate;Z.exports=function(i,s,o){var u=i.node(),d=C[o.arrowhead||0],h=C[o.startarrowhead||0],g=(o.arrowwidth||1)*(o.arrowsize||1),m=(o.arrowwidth||1)*(o.startarrowsize||1),E=s.indexOf("start")>=0,c=s.indexOf("end")>=0,_=d.backoff*g+o.standoff,T=h.backoff*m+o.startstandoff,M,k,b,A;if(u.nodeName==="line"){M={x:+i.attr("x1"),y:+i.attr("y1")},k={x:+i.attr("x2"),y:+i.attr("y2")};var y=M.x-k.x,f=M.y-k.y;if(b=Math.atan2(f,y),A=b+Math.PI,_&&T&&_+T>Math.sqrt(y*y+f*f)){J();return}if(_){if(_*_>y*y+f*f){J();return}var p=_*Math.cos(b),x=_*Math.sin(b);k.x+=p,k.y+=x,i.attr({x2:k.x,y2:k.y})}if(T){if(T*T>y*y+f*f){J();return}var N=T*Math.cos(b),D=T*Math.sin(b);M.x-=N,M.y-=D,i.attr({x1:M.x,y1:M.y})}}else if(u.nodeName==="path"){var B=u.getTotalLength(),U="";if(B<_+T){J();return}var V=u.getPointAtLength(0),q=u.getPointAtLength(.1);b=Math.atan2(V.y-q.y,V.x-q.x),M=u.getPointAtLength(Math.min(T,B)),U="0px,"+T+"px,";var z=u.getPointAtLength(B),H=u.getPointAtLength(B-.1);A=Math.atan2(z.y-H.y,z.x-H.x),k=u.getPointAtLength(Math.max(0,B-_));var G=U?T+_:_;U+=B-G+"px,"+B+"px",i.style("stroke-dasharray",U)}function J(){i.style("stroke-dasharray","0px,100px")}function le(ge,de,me,W){ge.path&&(ge.noRotate&&(me=0),v.select(u.parentNode).append("path").attr({class:i.attr("class"),d:ge.path,transform:a(de.x,de.y)+r(me*180/Math.PI)+t(W)}).style({fill:w.rgb(o.arrowcolor),"stroke-width":0}))}E&&le(h,M,b,m),c&&le(d,k,A,g)}}}),V0=Ne({"src/components/annotations/draw.js"(te,Z){var v=xn(),w=Yo(),C=ff(),P=In(),t=P.strTranslate,r=Os(),a=Ha(),l=zs(),i=oh(),s=hc(),o=km(),u=Uv(),d=Cu().arrayEditor,h=X1();Z.exports={draw:g,drawOne:m,drawRaw:c};function g(_){var T=_._fullLayout;T._infolayer.selectAll(".annotation").remove();for(var M=0;M<T.annotations.length;M++)T.annotations[M].visible&&m(_,M);return C.previousPromises(_)}function m(_,T){var M=_._fullLayout,k=M.annotations[T]||{},b=r.getFromId(_,k.xref),A=r.getFromId(_,k.yref);b&&b.setScale(),A&&A.setScale(),c(_,k,T,!1,b,A)}function E(_,T,M,k,b){var A=b[M],y=b[M+"ref"],f=M.indexOf("y")!==-1,p=r.getRefType(y)==="domain",x=f?k.h:k.w;return _?p?A+(f?-T:T)/_._length:_.p2r(_.r2p(A)+T):A+(f?-T:T)/x}function c(_,T,M,k,b,A){var y=_._fullLayout,f=_._fullLayout._size,p=_._context.edits,x,N;k?(x="annotation-"+k,N=k+".annotations"):(x="annotation",N="annotations");var D=d(_.layout,N,T),B=D.modifyBase,U=D.modifyItem,V=D.getUpdateObj;y._infolayer.selectAll("."+x+'[data-index="'+M+'"]').remove();var q="clip"+y._uid+"_ann"+M;if(!T._input||T.visible===!1){v.selectAll("#"+q).remove();return}var z={x:{},y:{}},H=+T.textangle||0,G=y._infolayer.append("g").classed(x,!0).attr("data-index",String(M)).style("opacity",T.opacity),J=G.append("g").classed("annotation-text-g",!0),le=p[T.showarrow?"annotationTail":"annotationPosition"],ge=T.captureevents||p.annotationText||le;function de(ze){var Xe={index:M,annotation:T._input,fullAnnotation:T,event:ze};return k&&(Xe.subplotId=k),Xe}var me=J.append("g").style("pointer-events",ge?"all":null).call(o,"pointer").on("click",function(){_._dragging=!1,_.emit("plotly_clickannotation",de(v.event))});T.hovertext&&me.on("mouseover",function(){var ze=T.hoverlabel,Xe=ze.font,Ve=this.getBoundingClientRect(),rt=_.getBoundingClientRect();i.loneHover({x0:Ve.left-rt.left,x1:Ve.right-rt.left,y:(Ve.top+Ve.bottom)/2-rt.top,text:T.hovertext,color:ze.bgcolor,borderColor:ze.bordercolor,fontFamily:Xe.family,fontSize:Xe.size,fontColor:Xe.color,fontWeight:Xe.weight,fontStyle:Xe.style,fontVariant:Xe.variant,fontShadow:Xe.fontShadow,fontLineposition:Xe.fontLineposition,fontTextcase:Xe.fontTextcase},{container:y._hoverlayer.node(),outerContainer:y._paper.node(),gd:_})}).on("mouseout",function(){i.loneUnhover(y._hoverlayer.node())});var W=T.borderwidth,ie=T.borderpad,se=W+ie,ee=me.append("rect").attr("class","bg").style("stroke-width",W+"px").call(a.stroke,T.bordercolor).call(a.fill,T.bgcolor),pe=T.width||T.height,oe=y._topclips.selectAll("#"+q).data(pe?[0]:[]);oe.enter().append("clipPath").classed("annclip",!0).attr("id",q).append("rect"),oe.exit().remove();var Y=T.font,ce=y._meta?P.templateString(T.text,y._meta):T.text,ue=me.append("text").classed("annotation-text",!0).text(ce);function _e(ze){return ze.call(l.font,Y).attr({"text-anchor":{left:"start",right:"end"}[T.align]||"middle"}),s.convertToTspans(ze,_,Le),ze}function Le(){var ze=ue.selectAll("a");if(ze.size()===1&&ze.text()===ue.text()){var Xe=me.insert("a",":first-child").attr({"xlink:xlink:href":ze.attr("xlink:href"),"xlink:xlink:show":ze.attr("xlink:show")}).style({cursor:"pointer"});Xe.node().appendChild(ee.node())}var Ve=me.select(".annotation-text-math-group"),rt=!Ve.empty(),mt=l.bBox((rt?Ve:ue).node()),_t=mt.width,vt=mt.height,ut=T.width||_t,Fe=T.height||vt,Pe=Math.round(ut+2*se),be=Math.round(Fe+2*se);function Ye(Aa,ia){return ia==="auto"&&(Aa<1/3?ia="left":Aa>2/3?ia="right":ia="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[ia]}for(var yt=!1,wt=["x","y"],ht=0;ht<wt.length;ht++){var Yt=wt[ht],$t=T[Yt+"ref"]||Yt,fr=T["a"+Yt+"ref"],mr={x:b,y:A}[Yt],Ur=(H+(Yt==="x"?0:-90))*Math.PI/180,jr=Pe*Math.cos(Ur),fn=be*Math.sin(Ur),Br=Math.abs(jr)+Math.abs(fn),Qr=T[Yt+"anchor"],Ot=T[Yt+"shift"]*(Yt==="x"?1:-1),$e=z[Yt],ot,De,Ee,Ae,Ie,tt=r.getRefType($t);if(mr&&tt!=="domain"){var st=mr.r2fraction(T[Yt]);(st<0||st>1)&&(fr===$t?(st=mr.r2fraction(T["a"+Yt]),(st<0||st>1)&&(yt=!0)):yt=!0),ot=mr._offset+mr.r2p(T[Yt]),Ae=.5}else{var Bt=tt==="domain";Yt==="x"?(Ee=T[Yt],ot=Bt?mr._offset+mr._length*Ee:ot=f.l+f.w*Ee):(Ee=1-T[Yt],ot=Bt?mr._offset+mr._length*Ee:ot=f.t+f.h*Ee),Ae=T.showarrow?.5:Ee}if(T.showarrow){$e.head=ot;var Ft=T["a"+Yt];if(Ie=jr*Ye(.5,T.xanchor)-fn*Ye(.5,T.yanchor),fr===$t){var Wt=r.getRefType(fr);Wt==="domain"?(Yt==="y"&&(Ft=1-Ft),$e.tail=mr._offset+mr._length*Ft):Wt==="paper"?Yt==="y"?(Ft=1-Ft,$e.tail=f.t+f.h*Ft):$e.tail=f.l+f.w*Ft:$e.tail=mr._offset+mr.r2p(Ft),De=Ie}else $e.tail=ot+Ft,De=Ie+Ft;$e.text=$e.tail+Ie;var lr=y[Yt==="x"?"width":"height"];if($t==="paper"&&($e.head=P.constrain($e.head,1,lr-1)),fr==="pixel"){var Rr=-Math.max($e.tail-3,$e.text),Mr=Math.min($e.tail+3,$e.text)-lr;Rr>0?($e.tail+=Rr,$e.text+=Rr):Mr>0&&($e.tail-=Mr,$e.text-=Mr)}$e.tail+=Ot,$e.head+=Ot}else Ie=Br*Ye(Ae,Qr),De=Ie,$e.text=ot+Ie;$e.text+=Ot,Ie+=Ot,De+=Ot,T["_"+Yt+"padplus"]=Br/2+De,T["_"+Yt+"padminus"]=Br/2-De,T["_"+Yt+"size"]=Br,T["_"+Yt+"shift"]=Ie}if(yt){me.remove();return}var Sr=0,Kr=0;if(T.align!=="left"&&(Sr=(ut-_t)*(T.align==="center"?.5:1)),T.valign!=="top"&&(Kr=(Fe-vt)*(T.valign==="middle"?.5:1)),rt)Ve.select("svg").attr({x:se+Sr-1,y:se+Kr}).call(l.setClipUrl,pe?q:null,_);else{var Hn=se+Kr-mt.top,ga=se+Sr-mt.left;ue.call(s.positionText,ga,Hn).call(l.setClipUrl,pe?q:null,_)}oe.select("rect").call(l.setRect,se,se,ut,Fe),ee.call(l.setRect,W/2,W/2,Pe-W,be-W),me.call(l.setTranslate,Math.round(z.x.text-Pe/2),Math.round(z.y.text-be/2)),J.attr({transform:"rotate("+H+","+z.x.text+","+z.y.text+")"});var ua=function(Aa,ia){G.selectAll(".annotation-arrow-g").remove();var $a=z.x.head,ci=z.y.head,_r=z.x.tail+Aa,Qt=z.y.tail+ia,yr=z.x.text+Aa,br=z.y.text+ia,an=P.rotationXYMatrix(H,yr,br),wn=P.apply2DTransform(an),Ln=P.apply2DTransform2(an),Bn=+ee.attr("width"),xa=+ee.attr("height"),za=yr-.5*Bn,Ia=za+Bn,Ba=br-.5*xa,Ka=Ba+xa,fa=[[za,Ba,za,Ka],[za,Ka,Ia,Ka],[Ia,Ka,Ia,Ba],[Ia,Ba,za,Ba]].map(Ln);if(!fa.reduce(function(It,xr){return It^!!P.segmentsIntersect($a,ci,$a+1e6,ci+1e6,xr[0],xr[1],xr[2],xr[3])},!1)){fa.forEach(function(It){var xr=P.segmentsIntersect(_r,Qt,$a,ci,It[0],It[1],It[2],It[3]);xr&&(_r=xr.x,Qt=xr.y)});var Bi=T.arrowwidth,Yi=T.arrowcolor,Ht=T.arrowside,kt=G.append("g").style({opacity:a.opacity(Yi)}).classed("annotation-arrow-g",!0),qr=kt.append("path").attr("d","M"+_r+","+Qt+"L"+$a+","+ci).style("stroke-width",Bi+"px").call(a.stroke,a.rgb(Yi));if(h(qr,Ht,T),p.annotationPosition&&qr.node().parentNode&&!k){var en=$a,rn=ci;if(T.standoff){var Wr=Math.sqrt(Math.pow($a-_r,2)+Math.pow(ci-Qt,2));en+=T.standoff*(_r-$a)/Wr,rn+=T.standoff*(Qt-ci)/Wr}var tn=kt.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(_r-en)+","+(Qt-rn),transform:t(en,rn)}).style("stroke-width",Bi+6+"px").call(a.stroke,"rgba(0,0,0,0)").call(a.fill,"rgba(0,0,0,0)"),Tn,dn;u.init({element:tn.node(),gd:_,prepFn:function(){var It=l.getTranslate(me);Tn=It.x,dn=It.y,b&&b.autorange&&B(b._name+".autorange",!0),A&&A.autorange&&B(A._name+".autorange",!0)},moveFn:function(It,xr){var Yr=wn(Tn,dn),An=Yr[0]+It,Zn=Yr[1]+xr;me.call(l.setTranslate,An,Zn),U("x",E(b,It,"x",f,T)),U("y",E(A,xr,"y",f,T)),T.axref===T.xref&&U("ax",E(b,It,"ax",f,T)),T.ayref===T.yref&&U("ay",E(A,xr,"ay",f,T)),kt.attr("transform",t(It,xr)),J.attr({transform:"rotate("+H+","+An+","+Zn+")"})},doneFn:function(){w.call("_guiRelayout",_,V());var It=document.querySelector(".js-notes-box-panel");It&&It.redraw(It.selectedObj)}})}}};if(T.showarrow&&ua(0,0),le){var Ta;u.init({element:me.node(),gd:_,prepFn:function(){Ta=J.attr("transform")},moveFn:function(Aa,ia){var $a="pointer";if(T.showarrow)T.axref===T.xref?U("ax",E(b,Aa,"ax",f,T)):U("ax",T.ax+Aa),T.ayref===T.yref?U("ay",E(A,ia,"ay",f.w,T)):U("ay",T.ay+ia),ua(Aa,ia);else{if(k)return;var ci,_r;if(b)ci=E(b,Aa,"x",f,T);else{var Qt=T._xsize/f.w,yr=T.x+(T._xshift-T.xshift)/f.w-Qt/2;ci=u.align(yr+Aa/f.w,Qt,0,1,T.xanchor)}if(A)_r=E(A,ia,"y",f,T);else{var br=T._ysize/f.h,an=T.y-(T._yshift+T.yshift)/f.h-br/2;_r=u.align(an-ia/f.h,br,0,1,T.yanchor)}U("x",ci),U("y",_r),(!b||!A)&&($a=u.getCursor(b?.5:ci,A?.5:_r,T.xanchor,T.yanchor))}J.attr({transform:t(Aa,ia)+Ta}),o(me,$a)},clickFn:function(Aa,ia){T.captureevents&&_.emit("plotly_clickannotation",de(ia))},doneFn:function(){o(me),w.call("_guiRelayout",_,V());var Aa=document.querySelector(".js-notes-box-panel");Aa&&Aa.redraw(Aa.selectedObj)}})}}p.annotationText?ue.call(s.makeEditable,{delegate:me,gd:_}).call(_e).on("edit",function(ze){T.text=ze,this.call(_e),U("text",ze),b&&b.autorange&&B(b._name+".autorange",!0),A&&A.autorange&&B(A._name+".autorange",!0),w.call("_guiRelayout",_,V())}):ue.call(_e)}}}),_A=Ne({"src/components/annotations/click.js"(te,Z){var v=In(),w=Yo(),C=Cu().arrayEditor;Z.exports={hasClickToShow:P,onClick:t};function P(l,i){var s=r(l,i);return s.on.length>0||s.explicitOff.length>0}function t(l,i){var s=r(l,i),o=s.on,u=s.off.concat(s.explicitOff),d={},h=l._fullLayout.annotations,g,m;if(o.length||u.length){for(g=0;g<o.length;g++)m=C(l.layout,"annotations",h[o[g]]),m.modifyItem("visible",!0),v.extendFlat(d,m.getUpdateObj());for(g=0;g<u.length;g++)m=C(l.layout,"annotations",h[u[g]]),m.modifyItem("visible",!1),v.extendFlat(d,m.getUpdateObj());return w.call("update",l,{},d)}}function r(l,i){var s=l._fullLayout.annotations,o=[],u=[],d=[],h=(i||[]).length,g,m,E,c,_,T,M,k;for(g=0;g<s.length;g++)if(E=s[g],c=E.clicktoshow,c){for(m=0;m<h;m++)if(_=i[m],T=_.xaxis,M=_.yaxis,T._id===E.xref&&M._id===E.yref&&T.d2r(_.x)===a(E._xclick,T)&&M.d2r(_.y)===a(E._yclick,M)){E.visible?c==="onout"?k=u:k=d:k=o,k.push(g);break}m===h&&E.visible&&c==="onout"&&u.push(g)}return{on:o,off:u,explicitOff:d}}function a(l,i){return i.type==="log"?i.l2r(l):i.d2r(l)}}}),W1=Ne({"src/components/annotations/common_defaults.js"(te,Z){var v=In(),w=Ha();Z.exports=function(P,t,r,a){a("opacity");var l=a("bgcolor"),i=a("bordercolor"),s=w.opacity(i);a("borderpad");var o=a("borderwidth"),u=a("showarrow");a("text",u?" ":r._dfltTitle.annotation),a("textangle"),v.coerceFont(a,"font",r.font),a("width"),a("align");var d=a("height");if(d&&a("valign"),u){var h=a("arrowside"),g,m;h.indexOf("end")!==-1&&(g=a("arrowhead"),m=a("arrowsize")),h.indexOf("start")!==-1&&(a("startarrowhead",g),a("startarrowsize",m)),a("arrowcolor",s?t.bordercolor:w.defaultLine),a("arrowwidth",(s&&o||1)*2),a("standoff"),a("startstandoff")}var E=a("hovertext"),c=r.hoverlabel||{};if(E){var _=a("hoverlabel.bgcolor",c.bgcolor||(w.opacity(l)?w.rgb(l):w.defaultLine)),T=a("hoverlabel.bordercolor",c.bordercolor||w.contrast(_)),M=v.extendFlat({},c.font);M.color||(M.color=T),v.coerceFont(a,"hoverlabel.font",M)}a("captureevents",!!E)}}}),xA=Ne({"src/components/annotations/defaults.js"(te,Z){var v=In(),w=Os(),C=jd(),P=W1(),t=Mg();Z.exports=function(l,i){C(l,i,{name:"annotations",handleItemDefaults:r})};function r(a,l,i){function s(f,p){return v.coerce(a,l,t,f,p)}var o=s("visible"),u=s("clicktoshow");if(o||u){P(a,l,i,s);for(var d=l.showarrow,h=["x","y"],g=[-10,-30],m={_fullLayout:i},E=0;E<2;E++){var c=h[E],_=w.coerceRef(a,l,m,c,"","paper");if(_!=="paper"){var T=w.getFromId(m,_);T._annIndices.push(l._index)}if(w.coercePosition(l,m,s,_,c,.5),d){var M="a"+c,k=w.coerceRef(a,l,m,M,"pixel",["pixel","paper"]);k!=="pixel"&&k!==_&&(k=l[M]="pixel");var b=k==="pixel"?g[E]:.4;w.coercePosition(l,m,s,k,M,b)}s(c+"anchor"),s(c+"shift")}if(v.noneOrAll(a,l,["x","y"]),d&&v.noneOrAll(a,l,["ax","ay"]),u){var A=s("xclick"),y=s("yclick");l._xclick=A===void 0?l.x:w.cleanPosition(A,m,l.xref),l._yclick=y===void 0?l.y:w.cleanPosition(y,m,l.yref)}}}}}),Ly=Ne({"src/components/annotations/calc_autorange.js"(te,Z){var v=In(),w=Os(),C=V0().draw;Z.exports=function(a){var l=a._fullLayout,i=v.filterVisible(l.annotations);if(i.length&&a._fullData.length)return v.syncOrAsync([C,P],a)};function P(r){var a=r._fullLayout;v.filterVisible(a.annotations).forEach(function(l){var i=w.getFromId(r,l.xref),s=w.getFromId(r,l.yref),o=w.getRefType(l.xref),u=w.getRefType(l.yref);l._extremes={},o==="range"&&t(l,i),u==="range"&&t(l,s)})}function t(r,a){var l=a._id,i=l.charAt(0),s=r[i],o=r["a"+i],u=r[i+"ref"],d=r["a"+i+"ref"],h=r["_"+i+"padplus"],g=r["_"+i+"padminus"],m={x:1,y:-1}[i]*r[i+"shift"],E=3*r.arrowsize*r.arrowwidth||0,c=E+m,_=E-m,T=3*r.startarrowsize*r.arrowwidth||0,M=T+m,k=T-m,b;if(d===u){var A=w.findExtremes(a,[a.r2c(s)],{ppadplus:c,ppadminus:_}),y=w.findExtremes(a,[a.r2c(o)],{ppadplus:Math.max(h,M),ppadminus:Math.max(g,k)});b={min:[A.min[0],y.min[0]],max:[A.max[0],y.max[0]]}}else M=o?M+o:M,k=o?k-o:k,b=w.findExtremes(a,[a.r2c(s)],{ppadplus:Math.max(h,c,M),ppadminus:Math.max(g,_,k)});r._extremes[l]=b}}}),H0=Ne({"src/components/annotations/convert_coords.js"(te,Z){var v=Fn(),w=Wn();Z.exports=function(P,t,r,a){t=t||{};var l=r==="log"&&t.type==="linear",i=r==="linear"&&t.type==="log";if(!(l||i))return;var s=P._fullLayout.annotations,o=t._id.charAt(0),u,d;function h(m){var E=u[m],c=null;l?c=w(E,t.range):c=Math.pow(10,E),v(c)||(c=null),a(d+m,c)}for(var g=0;g<s.length;g++)u=s[g],d="annotations["+g+"].",u[o+"ref"]===t._id&&h(o),u["a"+o+"ref"]===t._id&&h("a"+o)}}}),Pg=Ne({"src/components/annotations/index.js"(te,Z){var v=V0(),w=_A();Z.exports={moduleType:"component",name:"annotations",layoutAttributes:Mg(),supplyLayoutDefaults:xA(),includeBasePlot:kx()("annotations"),calcAutorange:Ly(),draw:v.draw,drawOne:v.drawOne,drawRaw:v.drawRaw,hasClickToShow:w.hasClickToShow,onClick:w.onClick,convertCoords:H0()}}}),zm=Ne({"src/components/annotations3d/attributes.js"(te,Z){var v=Mg(),w=ef().overrideAll,C=Cu().templatedArray;Z.exports=w(C("annotation",{visible:v.visible,x:{valType:"any"},y:{valType:"any"},z:{valType:"any"},ax:{valType:"number"},ay:{valType:"number"},xanchor:v.xanchor,xshift:v.xshift,yanchor:v.yanchor,yshift:v.yshift,text:v.text,textangle:v.textangle,font:v.font,width:v.width,height:v.height,opacity:v.opacity,align:v.align,valign:v.valign,bgcolor:v.bgcolor,bordercolor:v.bordercolor,borderpad:v.borderpad,borderwidth:v.borderwidth,showarrow:v.showarrow,arrowcolor:v.arrowcolor,arrowhead:v.arrowhead,startarrowhead:v.startarrowhead,arrowside:v.arrowside,arrowsize:v.arrowsize,startarrowsize:v.startarrowsize,arrowwidth:v.arrowwidth,standoff:v.standoff,startstandoff:v.startstandoff,hovertext:v.hovertext,hoverlabel:v.hoverlabel,captureevents:v.captureevents}),"calc","from-root")}}),bA=Ne({"src/components/annotations3d/defaults.js"(te,Z){var v=In(),w=Os(),C=jd(),P=W1(),t=zm();Z.exports=function(l,i,s){C(l,i,{name:"annotations",handleItemDefaults:r,fullLayout:s.fullLayout})};function r(a,l,i,s){function o(h,g){return v.coerce(a,l,t,h,g)}function u(h){var g=h+"axis",m={_fullLayout:{}};return m._fullLayout[g]=i[g],w.coercePosition(l,m,o,h,h,.5)}var d=o("visible");d&&(P(a,l,s.fullLayout,o),u("x"),u("y"),u("z"),v.noneOrAll(a,l,["x","y","z"]),l.xref="x",l.yref="y",l.zref="z",o("xanchor"),o("yanchor"),o("xshift"),o("yshift"),l.showarrow&&(l.axref="pixel",l.ayref="pixel",o("ax",-10),o("ay",-30),v.noneOrAll(a,l,["ax","ay"])))}}}),wA=Ne({"src/components/annotations3d/convert.js"(te,Z){var v=In(),w=Os();Z.exports=function(t){for(var r=t.fullSceneLayout,a=r.annotations,l=0;l<a.length;l++)C(a[l],t);t.fullLayout._infolayer.selectAll(".annotation-"+t.id).remove()};function C(P,t){var r=t.fullSceneLayout,a=r.domain,l=t.fullLayout._size,i={pdata:null,type:"linear",autorange:!1,range:[-1/0,1/0]};P._xa={},v.extendFlat(P._xa,i),w.setConvert(P._xa),P._xa._offset=l.l+a.x[0]*l.w,P._xa.l2p=function(){return .5*(1+P._pdata[0]/P._pdata[3])*l.w*(a.x[1]-a.x[0])},P._ya={},v.extendFlat(P._ya,i),w.setConvert(P._ya),P._ya._offset=l.t+(1-a.y[1])*l.h,P._ya.l2p=function(){return .5*(1-P._pdata[1]/P._pdata[3])*l.h*(a.y[1]-a.y[0])}}}}),Ry=Ne({"src/plots/gl3d/project.js"(te,Z){function v(C,P){var t=[0,0,0,0],r,a;for(r=0;r<4;++r)for(a=0;a<4;++a)t[a]+=C[4*r+a]*P[r];return t}function w(C,P){var t=v(C.projection,v(C.view,v(C.model,[P[0],P[1],P[2],1])));return t}Z.exports=w}}),Xw=Ne({"src/components/annotations3d/draw.js"(te,Z){var v=V0().drawRaw,w=Ry(),C=["x","y","z"];Z.exports=function(t){for(var r=t.fullSceneLayout,a=t.dataScale,l=r.annotations,i=0;i<l.length;i++){for(var s=l[i],o=!1,u=0;u<3;u++){var d=C[u],h=s[d],g=r[d+"axis"],m=g.r2fraction(h);if(m<0||m>1){o=!0;break}}o?t.fullLayout._infolayer.select(".annotation-"+t.id+'[data-index="'+i+'"]').remove():(s._pdata=w(t.glplot.cameraParams,[r.xaxis.r2l(s.x)*a[0],r.yaxis.r2l(s.y)*a[1],r.zaxis.r2l(s.z)*a[2]]),v(t.graphDiv,s,i,t.id,s._xa,s._ya))}}}}),Iy=Ne({"src/components/annotations3d/index.js"(te,Z){var v=Yo(),w=In();Z.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:zm()}}},layoutAttributes:zm(),handleDefaults:bA(),includeBasePlot:C,convert:wA(),draw:Xw()};function C(P,t){var r=v.subplotsRegistry.gl3d;if(r)for(var a=r.attrRegex,l=Object.keys(P),i=0;i<l.length;i++){var s=l[i];a.test(s)&&(P[s].annotations||[]).length&&(w.pushUnique(t._basePlotModules,r),w.pushUnique(t._subplots.gl3d,s))}}}}),fv=Ne({"src/components/shapes/attributes.js"(te,Z){var v=Mg(),w=bo(),C=tf().line,P=Fd().dash,t=fi().extendFlat,r=Cu().templatedArray;Eg();var a=qo(),{shapeTexttemplateAttrs:l,templatefallbackAttrs:i}=Fl(),s=jv();Z.exports=r("shape",{visible:t({},a.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:t({},a.legend,{editType:"calc+arraydraw"}),legendgroup:t({},a.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:t({},a.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:w({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:t({},a.legendrank,{editType:"calc+arraydraw"}),legendwidth:t({},a.legendwidth,{editType:"calc+arraydraw"}),type:{valType:"enumerated",values:["circle","rect","path","line"],editType:"calc+arraydraw"},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above",editType:"arraydraw"},xref:t({},v.xref,{}),xsizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},xanchor:{valType:"any",editType:"calc+arraydraw"},x0:{valType:"any",editType:"calc+arraydraw"},x1:{valType:"any",editType:"calc+arraydraw"},x0shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},x1shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},yref:t({},v.yref,{}),ysizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},yanchor:{valType:"any",editType:"calc+arraydraw"},y0:{valType:"any",editType:"calc+arraydraw"},y1:{valType:"any",editType:"calc+arraydraw"},y0shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},y1shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},path:{valType:"string",editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},line:{color:t({},C.color,{editType:"arraydraw"}),width:t({},C.width,{editType:"calc+arraydraw"}),dash:t({},P,{editType:"arraydraw"}),editType:"calc+arraydraw"},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",editType:"arraydraw"},editable:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},label:{text:{valType:"string",dflt:"",editType:"arraydraw"},texttemplate:l({},{keys:Object.keys(s)}),texttemplatefallback:i({editType:"arraydraw"}),font:w({editType:"calc+arraydraw",colorEditType:"arraydraw"}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"],editType:"arraydraw"},textangle:{valType:"angle",dflt:"auto",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],editType:"calc+arraydraw"},padding:{valType:"number",dflt:3,min:0,editType:"arraydraw"},editType:"arraydraw"},editType:"arraydraw"})}}),Ww=Ne({"src/components/shapes/defaults.js"(te,Z){var v=In(),w=Os(),C=jd(),P=fv(),t=Sg();Z.exports=function(i,s){C(i,s,{name:"shapes",handleItemDefaults:a})};function r(l,i){return l?"bottom":i.indexOf("top")!==-1?"top":i.indexOf("bottom")!==-1?"bottom":"middle"}function a(l,i,s){function o(W,ie){return v.coerce(l,i,P,W,ie)}i._isShape=!0;var u=o("visible");if(u){var d=o("showlegend");d&&(o("legend"),o("legendwidth"),o("legendgroup"),o("legendgrouptitle.text"),v.coerceFont(o,"legendgrouptitle.font"),o("legendrank"));var h=o("path"),g=h?"path":"rect",m=o("type",g),E=m!=="path";E&&delete i.path,o("editable"),o("layer"),o("opacity"),o("fillcolor"),o("fillrule");var c=o("line.width");c&&(o("line.color"),o("line.dash"));for(var _=o("xsizemode"),T=o("ysizemode"),M=["x","y"],k=0;k<2;k++){var b=M[k],A=b+"anchor",y=b==="x"?_:T,f={_fullLayout:s},p,x,N,D=w.coerceRef(l,i,f,b,void 0,"paper"),B=w.getRefType(D);if(B==="range"?(p=w.getFromId(f,D),p._shapeIndices.push(i._index),N=t.rangeToShapePosition(p),x=t.shapePositionToRange(p),(p.type==="category"||p.type==="multicategory")&&(o(b+"0shift"),o(b+"1shift"))):x=N=v.identity,E){var U=.25,V=.75,q=b+"0",z=b+"1",H=l[q],G=l[z];l[q]=x(l[q],!0),l[z]=x(l[z],!0),y==="pixel"?(o(q,0),o(z,10)):(w.coercePosition(i,f,o,D,q,U),w.coercePosition(i,f,o,D,z,V)),i[q]=N(i[q]),i[z]=N(i[z]),l[q]=H,l[z]=G}if(y==="pixel"){var J=l[A];l[A]=x(l[A],!0),w.coercePosition(i,f,o,D,A,.25),i[A]=N(i[A]),l[A]=J}}E&&v.noneOrAll(l,i,["x0","x1","y0","y1"]);var le=m==="line",ge,de;if(E&&(ge=o("label.texttemplate"),o("label.texttemplatefallback")),ge||(de=o("label.text")),de||ge){o("label.textangle");var me=o("label.textposition",le?"middle":"middle center");o("label.xanchor"),o("label.yanchor",r(le,me)),o("label.padding"),v.coerceFont(o,"label.font",s.font)}}}}}),CM=Ne({"src/components/shapes/draw_newshape/defaults.js"(te,Z){var v=Ha(),w=In();function C(P,t){return P?"bottom":t.indexOf("top")!==-1?"top":t.indexOf("bottom")!==-1?"bottom":"middle"}Z.exports=function(t,r,a){a("newshape.visible"),a("newshape.name"),a("newshape.showlegend"),a("newshape.legend"),a("newshape.legendwidth"),a("newshape.legendgroup"),a("newshape.legendgrouptitle.text"),w.coerceFont(a,"newshape.legendgrouptitle.font"),a("newshape.legendrank"),a("newshape.drawdirection"),a("newshape.layer"),a("newshape.fillcolor"),a("newshape.fillrule"),a("newshape.opacity");var l=a("newshape.line.width");if(l){var i=(t||{}).plot_bgcolor||"#FFF";a("newshape.line.color",v.contrast(i)),a("newshape.line.dash")}var s=t.dragmode==="drawline",o=a("newshape.label.text"),u=a("newshape.label.texttemplate");if(a("newshape.label.texttemplatefallback"),o||u){a("newshape.label.textangle");var d=a("newshape.label.textposition",s?"middle":"middle center");a("newshape.label.xanchor"),a("newshape.label.yanchor",C(s,d)),a("newshape.label.padding"),w.coerceFont(a,"newshape.label.font",r.font)}a("activeshape.fillcolor"),a("activeshape.opacity")}}}),jL=Ne({"src/components/shapes/calc_autorange.js"(te,Z){var v=In(),w=Os(),C=Bw(),P=Sg();Z.exports=function(s){var o=s._fullLayout,u=v.filterVisible(o.shapes);if(!(!u.length||!s._fullData.length))for(var d=0;d<u.length;d++){var h=u[d];h._extremes={};var g,m,E=w.getRefType(h.xref),c=w.getRefType(h.yref);h.xref!=="paper"&&E!=="domain"&&(g=w.getFromId(s,h.xref),m=l(g,h,C.paramIsX),m&&(h._extremes[g._id]=w.findExtremes(g,m,t(h)))),h.yref!=="paper"&&c!=="domain"&&(g=w.getFromId(s,h.yref),m=l(g,h,C.paramIsY),m&&(h._extremes[g._id]=w.findExtremes(g,m,r(h))))}};function t(i){return a(i.line.width,i.xsizemode,i.x0,i.x1,i.path,!1)}function r(i){return a(i.line.width,i.ysizemode,i.y0,i.y1,i.path,!0)}function a(i,s,o,u,d,h){var g=i/2,m=h;if(s==="pixel"){var E=d?P.extractPathCoords(d,h?C.paramIsY:C.paramIsX):[o,u],c=v.aggNums(Math.max,null,E),_=v.aggNums(Math.min,null,E),T=_<0?Math.abs(_)+g:g,M=c>0?c+g:g;return{ppad:g,ppadplus:m?T:M,ppadminus:m?M:T}}else return{ppad:g}}function l(i,s,o){var u=i._id.charAt(0)==="x"?"x":"y",d=i.type==="category"||i.type==="multicategory",h,g,m=0,E=0,c=d?i.r2c:i.d2c,_=s[u+"sizemode"]==="scaled";if(_?(h=s[u+"0"],g=s[u+"1"],d&&(m=s[u+"0shift"],E=s[u+"1shift"])):(h=s[u+"anchor"],g=s[u+"anchor"]),h!==void 0)return[c(h)+m,c(g)+E];if(s.path){var T=1/0,M=-1/0,k=s.path.match(C.segmentRE),b,A,y,f,p;for(i.type==="date"&&(c=P.decodeDate(c)),b=0;b<k.length;b++)A=k[b],y=o[A.charAt(0)].drawn,y!==void 0&&(f=k[b].substr(1).match(C.paramRE),!(!f||f.length<y)&&(p=c(f[y]),p<T&&(T=p),p>M&&(M=p)));if(M>=T)return[T,M]}}}}),UL=Ne({"src/components/shapes/index.js"(te,Z){var v=Ey();Z.exports={moduleType:"component",name:"shapes",layoutAttributes:fv(),supplyLayoutDefaults:Ww(),supplyDrawNewShapeDefaults:CM(),includeBasePlot:kx()("shapes"),calcAutorange:jL(),draw:v.draw,drawOne:v.drawOne}}}),kM=Ne({"src/components/images/attributes.js"(te,Z){var v=wh(),w=Cu().templatedArray;Eg(),Z.exports=w("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",v.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",v.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})}}),Ed=Ne({"src/components/images/defaults.js"(te,Z){var v=In(),w=Os(),C=jd(),P=kM(),t="images";Z.exports=function(l,i){var s={name:t,handleItemDefaults:r};C(l,i,s)};function r(a,l,i){function s(_,T){return v.coerce(a,l,P,_,T)}var o=s("source"),u=s("visible",!!o);if(!u)return l;s("layer"),s("xanchor"),s("yanchor"),s("sizex"),s("sizey"),s("sizing"),s("opacity");for(var d={_fullLayout:i},h=["x","y"],g=0;g<2;g++){var m=h[g],E=w.coerceRef(a,l,d,m,"paper",void 0);if(E!=="paper"){var c=w.getFromId(d,E);c._imgIndices.push(l._index)}w.coercePosition(l,d,s,E,m,0)}return l}}}),TA=Ne({"src/components/images/draw.js"(te,Z){var v=xn(),w=zs(),C=Os(),P=Wf(),t=hp();Z.exports=function(a){var l=a._fullLayout,i=[],s={},o=[],u,d;for(d=0;d<l.images.length;d++){var h=l.images[d];if(h.visible)if(h.layer==="below"&&h.xref!=="paper"&&h.yref!=="paper"){u=P.ref2id(h.xref)+P.ref2id(h.yref);var g=l._plots[u];if(!g){o.push(h);continue}g.mainplot&&(u=g.mainplot.id),s[u]||(s[u]=[]),s[u].push(h)}else h.layer==="above"?i.push(h):o.push(h)}var m={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 E(f){var p=v.select(this);if(this._imgSrc!==f.source)if(p.attr("xmlns",t.svg),!a._context.staticPlot||f.source&&f.source.slice(0,5)==="data:")p.attr("xlink:href",f.source),this._imgSrc=f.source;else{var x=new Promise((function(N){var D=new Image;this.img=D,D.setAttribute("crossOrigin","anonymous"),D.onerror=B,D.onload=function(){var U=document.createElement("canvas");U.width=this.width,U.height=this.height;var V=U.getContext("2d",{willReadFrequently:!0});V.drawImage(this,0,0);var q=U.toDataURL("image/png");p.attr("xlink:href",q),N()},p.on("error",B),D.src=f.source,this._imgSrc=f.source;function B(){p.remove(),N()}}).bind(this));a._promises.push(x)}}function c(f){var p=v.select(this),x=C.getFromId(a,f.xref),N=C.getFromId(a,f.yref),D=C.getRefType(f.xref)==="domain",B=C.getRefType(f.yref)==="domain",U=l._size,V,q;x!==void 0?V=typeof f.xref=="string"&&D?x._length*f.sizex:Math.abs(x.l2p(f.sizex)-x.l2p(0)):V=f.sizex*U.w,N!==void 0?q=typeof f.yref=="string"&&B?N._length*f.sizey:Math.abs(N.l2p(f.sizey)-N.l2p(0)):q=f.sizey*U.h;var z=V*m.x[f.xanchor].offset,H=q*m.y[f.yanchor].offset,G=m.x[f.xanchor].sizing+m.y[f.yanchor].sizing,J,le;switch(x!==void 0?J=typeof f.xref=="string"&&D?x._length*f.x+x._offset:x.r2p(f.x)+x._offset:J=f.x*U.w+U.l,J+=z,N!==void 0?le=typeof f.yref=="string"&&B?N._length*(1-f.y)+N._offset:N.r2p(f.y)+N._offset:le=U.h-f.y*U.h+U.t,le+=H,f.sizing){case"fill":G+=" slice";break;case"stretch":G="none";break}p.attr({x:J,y:le,width:V,height:q,preserveAspectRatio:G,opacity:f.opacity});var ge=x&&C.getRefType(f.xref)!=="domain"?x._id:"",de=N&&C.getRefType(f.yref)!=="domain"?N._id:"",me=ge+de;w.setClipUrl(p,me?"clip"+l._uid+me:null,a)}function _(f){return[f.xref,f.x,f.sizex,f.yref,f.y,f.sizey].join("_")}function T(f,p){return f._index-p._index}var M=l._imageLowerLayer.selectAll("image").data(o,_),k=l._imageUpperLayer.selectAll("image").data(i,_);M.enter().append("image"),k.enter().append("image"),M.exit().remove(),k.exit().remove(),M.each(function(f){E.bind(this)(f),c.bind(this)(f)}),k.each(function(f){E.bind(this)(f),c.bind(this)(f)}),M.sort(T),k.sort(T);var b=Object.keys(l._plots);for(d=0;d<b.length;d++){u=b[d];var A=l._plots[u];if(A.imagelayer){var y=A.imagelayer.selectAll("image").data(s[u]||[],_);y.enter().append("image"),y.exit().remove(),y.each(function(f){E.bind(this)(f),c.bind(this)(f)}),y.sort(T)}}}}}),Rx=Ne({"src/components/images/convert_coords.js"(te,Z){var v=Fn(),w=Wn();Z.exports=function(P,t,r,a){t=t||{};var l=r==="log"&&t.type==="linear",i=r==="linear"&&t.type==="log";if(l||i){for(var s=P._fullLayout.images,o=t._id.charAt(0),u,d,h=0;h<s.length;h++)if(u=s[h],d="images["+h+"].",u[o+"ref"]===t._id){var g=u[o],m=u["size"+o],E=null,c=null;if(l){E=w(g,t.range);var _=m/Math.pow(10,E)/2;c=2*Math.log(_+Math.sqrt(1+_*_))/Math.LN10}else E=Math.pow(10,g),c=E*(Math.pow(10,m/2)-Math.pow(10,-m/2));v(E)?v(c)||(c=null):(E=null,c=null),a(d+o,E),a(d+"size"+o,c)}}}}}),Ix=Ne({"src/components/images/index.js"(te,Z){Z.exports={moduleType:"component",name:"images",layoutAttributes:kM(),supplyLayoutDefaults:Ed(),includeBasePlot:kx()("images"),draw:TA(),convertCoords:Rx()}}}),Dx=Ne({"src/components/updatemenus/constants.js"(te,Z){Z.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:"▼"}}}}),Dy=Ne({"src/components/updatemenus/attributes.js"(te,Z){var v=bo(),w=js(),C=fi().extendFlat,P=ef().overrideAll,t=JT(),r=Cu().templatedArray,a=r("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}});Z.exports=P(r("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:a,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:C(t({editType:"arraydraw"}),{}),font:v({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:w.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")}}),Y1=Ne({"src/components/updatemenus/defaults.js"(te,Z){var v=In(),w=jd(),C=Dy(),P=Dx(),t=P.name,r=C.buttons;Z.exports=function(s,o){var u={name:t,handleItemDefaults:a};w(s,o,u)};function a(i,s,o){function u(g,m){return v.coerce(i,s,C,g,m)}var d=w(i,s,{name:"buttons",handleItemDefaults:l}),h=u("visible",d.length>0);h&&(u("active"),u("direction"),u("type"),u("showactive"),u("x"),u("y"),v.noneOrAll(i,s,["x","y"]),u("xanchor"),u("yanchor"),u("pad.t"),u("pad.r"),u("pad.b"),u("pad.l"),v.coerceFont(u,"font",o.font),u("bgcolor",o.paper_bgcolor),u("bordercolor"),u("borderwidth"))}function l(i,s){function o(d,h){return v.coerce(i,s,r,d,h)}var u=o("visible",i.method==="skip"||Array.isArray(i.args));u&&(o("method"),o("args"),o("args2"),o("label"),o("execute"))}}}),qL=Ne({"src/components/updatemenus/scrollbox.js"(te,Z){Z.exports=t;var v=xn(),w=Ha(),C=zs(),P=In();function t(r,a,l){this.gd=r,this.container=a,this.id=l,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})}t.barWidth=2,t.barLength=20,t.barRadius=2,t.barPad=1,t.barColor="#808BA4",t.prototype.enable=function(a,l,i){var s=this.gd._fullLayout,o=s.width,u=s.height;this.position=a;var d=this.position.l,h=this.position.w,g=this.position.t,m=this.position.h,E=this.position.direction,c=E==="down",_=E==="left",T=E==="right",M=E==="up",k=h,b=m,A,y,f,p;!c&&!_&&!T&&!M&&(this.position.direction="down",c=!0);var x=c||M;x?(A=d,y=A+k,c?(f=g,p=Math.min(f+b,u),b=p-f):(p=g+b,f=Math.max(p-b,0),b=p-f)):(f=g,p=f+b,_?(y=d+k,A=Math.max(y-k,0),k=y-A):(A=d,y=Math.min(A+k,o),k=y-A)),this._box={l:A,t:f,w:k,h:b};var N=h>k,D=t.barLength+2*t.barPad,B=t.barWidth+2*t.barPad,U=d,V=g+m;V+B>u&&(V=u-B);var q=this.container.selectAll("rect.scrollbar-horizontal").data(N?[0]:[]);q.exit().on(".drag",null).remove(),q.enter().append("rect").classed("scrollbar-horizontal",!0).call(w.fill,t.barColor),N?(this.hbar=q.attr({rx:t.barRadius,ry:t.barRadius,x:U,y:V,width:D,height:B}),this._hbarXMin=U+D/2,this._hbarTranslateMax=k-D):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var z=m>b,H=t.barWidth+2*t.barPad,G=t.barLength+2*t.barPad,J=d+h,le=g;J+H>o&&(J=o-H);var ge=this.container.selectAll("rect.scrollbar-vertical").data(z?[0]:[]);ge.exit().on(".drag",null).remove(),ge.enter().append("rect").classed("scrollbar-vertical",!0).call(w.fill,t.barColor),z?(this.vbar=ge.attr({rx:t.barRadius,ry:t.barRadius,x:J,y:le,width:H,height:G}),this._vbarYMin=le+G/2,this._vbarTranslateMax=b-G):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var de=this.id,me=A-.5,W=z?y+H+.5:y+.5,ie=f-.5,se=N?p+B+.5:p+.5,ee=s._topdefs.selectAll("#"+de).data(N||z?[0]:[]);if(ee.exit().remove(),ee.enter().append("clipPath").attr("id",de).append("rect"),N||z?(this._clipRect=ee.select("rect").attr({x:Math.floor(me),y:Math.floor(ie),width:Math.ceil(W)-Math.floor(me),height:Math.ceil(se)-Math.floor(ie)}),this.container.call(C.setClipUrl,de,this.gd),this.bg.attr({x:d,y:g,width:h,height:m})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(C.setClipUrl,null),delete this._clipRect),N||z){var pe=v.behavior.drag().on("dragstart",function(){v.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(pe);var oe=v.behavior.drag().on("dragstart",function(){v.event.sourceEvent.preventDefault(),v.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));N&&this.hbar.on(".drag",null).call(oe),z&&this.vbar.on(".drag",null).call(oe)}this.setTranslate(l,i)},t.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(C.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)},t.prototype._onBoxDrag=function(){var a=this.translateX,l=this.translateY;this.hbar&&(a-=v.event.dx),this.vbar&&(l-=v.event.dy),this.setTranslate(a,l)},t.prototype._onBoxWheel=function(){var a=this.translateX,l=this.translateY;this.hbar&&(a+=v.event.deltaY),this.vbar&&(l+=v.event.deltaY),this.setTranslate(a,l)},t.prototype._onBarDrag=function(){var a=this.translateX,l=this.translateY;if(this.hbar){var i=a+this._hbarXMin,s=i+this._hbarTranslateMax,o=P.constrain(v.event.x,i,s),u=(o-i)/(s-i),d=this.position.w-this._box.w;a=u*d}if(this.vbar){var h=l+this._vbarYMin,g=h+this._vbarTranslateMax,m=P.constrain(v.event.y,h,g),E=(m-h)/(g-h),c=this.position.h-this._box.h;l=E*c}this.setTranslate(a,l)},t.prototype.setTranslate=function(a,l){var i=this.position.w-this._box.w,s=this.position.h-this._box.h;if(a=P.constrain(a||0,0,i),l=P.constrain(l||0,0,s),this.translateX=a,this.translateY=l,this.container.call(C.setTranslate,this._box.l-this.position.l-a,this._box.t-this.position.t-l),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+a-.5),y:Math.floor(this.position.t+l-.5)}),this.hbar){var o=a/i;this.hbar.call(C.setTranslate,a+o*this._hbarTranslateMax,l)}if(this.vbar){var u=l/s;this.vbar.call(C.setTranslate,a,l+u*this._vbarTranslateMax)}}}}),PM=Ne({"src/components/updatemenus/draw.js"(te,Z){var v=xn(),w=ff(),C=Ha(),P=zs(),t=In(),r=hc(),a=Cu().arrayEditor,l=Ad().LINE_SPACING,i=Dx(),s=qL();Z.exports=function(D){var B=D._fullLayout,U=t.filterVisible(B[i.name]);function V(de){w.autoMargin(D,f(de))}var q=B._menulayer.selectAll("g."+i.containerClassName).data(U.length>0?[0]:[]);if(q.enter().append("g").classed(i.containerClassName,!0).style("cursor","pointer"),q.exit().each(function(){v.select(this).selectAll("g."+i.headerGroupClassName).each(V)}).remove(),U.length!==0){var z=q.selectAll("g."+i.headerGroupClassName).data(U,o);z.enter().append("g").classed(i.headerGroupClassName,!0);for(var H=t.ensureSingle(q,"g",i.dropdownButtonGroupClassName,function(de){de.style("pointer-events","all")}),G=0;G<U.length;G++){var J=U[G];y(D,J)}var le="updatemenus"+B._uid,ge=new s(D,H,le);z.enter().size()&&(H.node().parentNode.appendChild(H.node()),H.call(x)),z.exit().each(function(de){H.call(x),V(de)}).remove(),z.each(function(de){var me=v.select(this),W=de.type==="dropdown"?H:null;w.manageCommandObserver(D,de,de.buttons,function(ie){h(D,de,de.buttons[ie.index],me,W,ge,ie.index,!0)}),de.type==="dropdown"?(g(D,me,H,ge,de),d(H,de)&&m(D,me,H,ge,de)):m(D,me,null,null,de)})}};function o(N){return N._index}function u(N){return+N.attr(i.menuIndexAttrName)==-1}function d(N,D){return+N.attr(i.menuIndexAttrName)===D._index}function h(N,D,B,U,V,q,z,H){D.active=z,a(N.layout,i.name,D).applyUpdate("active",z),D.type==="buttons"?m(N,U,null,null,D):D.type==="dropdown"&&(V.attr(i.menuIndexAttrName,"-1"),g(N,U,V,q,D),H||m(N,U,V,q,D))}function g(N,D,B,U,V){var q=t.ensureSingle(D,"g",i.headerClassName,function(de){de.style("pointer-events","all")}),z=V._dims,H=V.active,G=V.buttons[H]||i.blankHeaderOpts,J={y:V.pad.t,yPad:0,x:V.pad.l,xPad:0,index:0},le={width:z.headerWidth,height:z.headerHeight};q.call(_,V,G,N).call(p,V,J,le);var ge=t.ensureSingle(D,"text",i.headerArrowClassName,function(de){de.attr("text-anchor","end").call(P.font,V.font).text(i.arrowSymbol[V.direction])});ge.attr({x:z.headerWidth-i.arrowOffsetX+V.pad.l,y:z.headerHeight/2+i.textOffsetY+V.pad.t}),q.on("click",function(){B.call(x,String(d(B,V)?-1:V._index)),m(N,D,B,U,V)}),q.on("mouseover",function(){q.call(b)}),q.on("mouseout",function(){q.call(A,V)}),P.setTranslate(D,z.lx,z.ly)}function m(N,D,B,U,V){B||(B=D,B.attr("pointer-events","all"));var q=!u(B)||V.type==="buttons"?V.buttons:[],z=V.type==="dropdown"?i.dropdownButtonClassName:i.buttonClassName,H=B.selectAll("g."+z).data(t.filterVisible(q)),G=H.enter().append("g").classed(z,!0),J=H.exit();V.type==="dropdown"?(G.attr("opacity","0").transition().attr("opacity","1"),J.transition().attr("opacity","0").remove()):J.remove();var le=0,ge=0,de=V._dims,me=["up","down"].indexOf(V.direction)!==-1;V.type==="dropdown"&&(me?ge=de.headerHeight+i.gapButtonHeader:le=de.headerWidth+i.gapButtonHeader),V.type==="dropdown"&&V.direction==="up"&&(ge=-i.gapButtonHeader+i.gapButton-de.openHeight),V.type==="dropdown"&&V.direction==="left"&&(le=-i.gapButtonHeader+i.gapButton-de.openWidth);var W={x:de.lx+le+V.pad.l,y:de.ly+ge+V.pad.t,yPad:i.gapButton,xPad:i.gapButton,index:0},ie={l:W.x+V.borderwidth,t:W.y+V.borderwidth};H.each(function(se,ee){var pe=v.select(this);pe.call(_,V,se,N).call(p,V,W),pe.on("click",function(){v.event.defaultPrevented||(se.execute&&(se.args2&&V.active===ee?(h(N,V,se,D,B,U,-1),w.executeAPICommand(N,se.method,se.args2)):(h(N,V,se,D,B,U,ee),w.executeAPICommand(N,se.method,se.args))),N.emit("plotly_buttonclicked",{menu:V,button:se,active:V.active}))}),pe.on("mouseover",function(){pe.call(b)}),pe.on("mouseout",function(){pe.call(A,V),H.call(k,V)})}),H.call(k,V),me?(ie.w=Math.max(de.openWidth,de.headerWidth),ie.h=W.y-ie.t):(ie.w=W.x-ie.l,ie.h=Math.max(de.openHeight,de.headerHeight)),ie.direction=V.direction,U&&(H.size()?E(N,D,B,U,V,ie):c(U))}function E(N,D,B,U,V,q){var z=V.direction,H=z==="up"||z==="down",G=V._dims,J=V.active,le,ge,de;if(H)for(ge=0,de=0;de<J;de++)ge+=G.heights[de]+i.gapButton;else for(le=0,de=0;de<J;de++)le+=G.widths[de]+i.gapButton;U.enable(q,le,ge),U.hbar&&U.hbar.attr("opacity","0").transition().attr("opacity","1"),U.vbar&&U.vbar.attr("opacity","0").transition().attr("opacity","1")}function c(N){var D=!!N.hbar,B=!!N.vbar;D&&N.hbar.transition().attr("opacity","0").each("end",function(){D=!1,B||N.disable()}),B&&N.vbar.transition().attr("opacity","0").each("end",function(){B=!1,D||N.disable()})}function _(N,D,B,U){N.call(T,D).call(M,D,B,U)}function T(N,D){var B=t.ensureSingle(N,"rect",i.itemRectClassName,function(U){U.attr({rx:i.rx,ry:i.ry,"shape-rendering":"crispEdges"})});B.call(C.stroke,D.bordercolor).call(C.fill,D.bgcolor).style("stroke-width",D.borderwidth+"px")}function M(N,D,B,U){var V=t.ensureSingle(N,"text",i.itemTextClassName,function(H){H.attr({"text-anchor":"start","data-notex":1})}),q=B.label,z=U._fullLayout._meta;z&&(q=t.templateString(q,z)),V.call(P.font,D.font).text(q).call(r.convertToTspans,U)}function k(N,D){var B=D.active;N.each(function(U,V){var q=v.select(this);V===B&&D.showactive&&q.select("rect."+i.itemRectClassName).call(C.fill,i.activeColor)})}function b(N){N.select("rect."+i.itemRectClassName).call(C.fill,i.hoverColor)}function A(N,D){N.select("rect."+i.itemRectClassName).call(C.fill,D.bgcolor)}function y(N,D){var B=D._dims={width1:0,height1:0,heights:[],widths:[],totalWidth:0,totalHeight:0,openWidth:0,openHeight:0,lx:0,ly:0},U=P.tester.selectAll("g."+i.dropdownButtonClassName).data(t.filterVisible(D.buttons));U.enter().append("g").classed(i.dropdownButtonClassName,!0);var V=["up","down"].indexOf(D.direction)!==-1;U.each(function(le,ge){var de=v.select(this);de.call(_,D,le,N);var me=de.select("."+i.itemTextClassName),W=me.node()&&P.bBox(me.node()).width,ie=Math.max(W+i.textPadX,i.minWidth),se=D.font.size*l,ee=r.lineCount(me),pe=Math.max(se*ee,i.minHeight)+i.textOffsetY;pe=Math.ceil(pe),ie=Math.ceil(ie),B.widths[ge]=ie,B.heights[ge]=pe,B.height1=Math.max(B.height1,pe),B.width1=Math.max(B.width1,ie),V?(B.totalWidth=Math.max(B.totalWidth,ie),B.openWidth=B.totalWidth,B.totalHeight+=pe+i.gapButton,B.openHeight+=pe+i.gapButton):(B.totalWidth+=ie+i.gapButton,B.openWidth+=ie+i.gapButton,B.totalHeight=Math.max(B.totalHeight,pe),B.openHeight=B.totalHeight)}),V?B.totalHeight-=i.gapButton:B.totalWidth-=i.gapButton,B.headerWidth=B.width1+i.arrowPadX,B.headerHeight=B.height1,D.type==="dropdown"&&(V?(B.width1+=i.arrowPadX,B.totalHeight=B.height1):B.totalWidth=B.width1,B.totalWidth+=i.arrowPadX),U.remove();var q=B.totalWidth+D.pad.l+D.pad.r,z=B.totalHeight+D.pad.t+D.pad.b,H=N._fullLayout._size;B.lx=H.l+H.w*D.x,B.ly=H.t+H.h*(1-D.y);var G="left";t.isRightAnchor(D)&&(B.lx-=q,G="right"),t.isCenterAnchor(D)&&(B.lx-=q/2,G="center");var J="top";t.isBottomAnchor(D)&&(B.ly-=z,J="bottom"),t.isMiddleAnchor(D)&&(B.ly-=z/2,J="middle"),B.totalWidth=Math.ceil(B.totalWidth),B.totalHeight=Math.ceil(B.totalHeight),B.lx=Math.round(B.lx),B.ly=Math.round(B.ly),w.autoMargin(N,f(D),{x:D.x,y:D.y,l:q*({right:1,center:.5}[G]||0),r:q*({left:1,center:.5}[G]||0),b:z*({top:1,middle:.5}[J]||0),t:z*({bottom:1,middle:.5}[J]||0)})}function f(N){return i.autoMarginIdRoot+N._index}function p(N,D,B,U){U=U||{};var V=N.select("."+i.itemRectClassName),q=N.select("."+i.itemTextClassName),z=D.borderwidth,H=B.index,G=D._dims;P.setTranslate(N,z+B.x,z+B.y);var J=["up","down"].indexOf(D.direction)!==-1,le=U.height||(J?G.heights[H]:G.height1);V.attr({x:0,y:0,width:U.width||(J?G.width1:G.widths[H]),height:le});var ge=D.font.size*l,de=r.lineCount(q),me=(de-1)*ge/2;r.positionText(q,i.textOffsetX,le/2-me+i.textOffsetY),J?B.y+=G.heights[H]+B.yPad:B.x+=G.widths[H]+B.xPad,B.index++}function x(N,D){N.attr(i.menuIndexAttrName,D||"-1").selectAll("g."+i.dropdownButtonClassName).remove()}}}),VL=Ne({"src/components/updatemenus/index.js"(te,Z){var v=Dx();Z.exports={moduleType:"component",name:v.name,layoutAttributes:Dy(),supplyLayoutDefaults:Y1(),draw:PM()}}}),Ox=Ne({"src/components/sliders/constants.js"(te,Z){Z.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}}}),Lg=Ne({"src/components/sliders/attributes.js"(te,Z){var v=bo(),w=JT(),C=fi().extendDeepAll,P=ef().overrideAll,t=O1(),r=Cu().templatedArray,a=Ox(),l=r("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}});Z.exports=P(r("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:l,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:C(w({editType:"arraydraw"}),{},{t:{dflt:20}}),xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left"},y:{valType:"number",min:-2,max:3,dflt:0},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},transition:{duration:{valType:"number",min:0,dflt:150},easing:{valType:"enumerated",values:t.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:v({})},font:v({}),activebgcolor:{valType:"color",dflt:a.gripBgActiveColor},bgcolor:{valType:"color",dflt:a.railBgColor},bordercolor:{valType:"color",dflt:a.railBorderColor},borderwidth:{valType:"number",min:0,dflt:a.railBorderWidth},ticklen:{valType:"number",min:0,dflt:a.tickLength},tickcolor:{valType:"color",dflt:a.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:a.minorTickLength}}),"arraydraw","from-root")}}),AA=Ne({"src/components/sliders/defaults.js"(te,Z){var v=In(),w=jd(),C=Lg(),P=Ox(),t=P.name,r=C.steps;Z.exports=function(s,o){w(s,o,{name:t,handleItemDefaults:a})};function a(i,s,o){function u(T,M){return v.coerce(i,s,C,T,M)}for(var d=w(i,s,{name:"steps",handleItemDefaults:l}),h=0,g=0;g<d.length;g++)d[g].visible&&h++;var m;if(h<2?m=s.visible=!1:m=u("visible"),!!m){s._stepCount=h;var E=s._visibleSteps=v.filterVisible(d),c=u("active");(d[c]||{}).visible||(s.active=E[0]._index),u("x"),u("y"),v.noneOrAll(i,s,["x","y"]),u("xanchor"),u("yanchor"),u("len"),u("lenmode"),u("pad.t"),u("pad.r"),u("pad.b"),u("pad.l"),v.coerceFont(u,"font",o.font);var _=u("currentvalue.visible");_&&(u("currentvalue.xanchor"),u("currentvalue.prefix"),u("currentvalue.suffix"),u("currentvalue.offset"),v.coerceFont(u,"currentvalue.font",s.font)),u("transition.duration"),u("transition.easing"),u("bgcolor"),u("activebgcolor"),u("bordercolor"),u("borderwidth"),u("ticklen"),u("tickwidth"),u("tickcolor"),u("minorticklen")}}function l(i,s){function o(h,g){return v.coerce(i,s,r,h,g)}var u;if(i.method!=="skip"&&!Array.isArray(i.args)?u=s.visible=!1:u=o("visible"),u){o("method"),o("args");var d=o("label","step-"+s._index);o("value",d),o("execute")}}}}),Yw=Ne({"src/components/sliders/draw.js"(te,Z){var v=xn(),w=ff(),C=Ha(),P=zs(),t=In(),r=t.strTranslate,a=hc(),l=Cu().arrayEditor,i=Ox(),s=Ad(),o=s.LINE_SPACING,u=s.FROM_TL,d=s.FROM_BR;Z.exports=function(q){var z=q._context.staticPlot,H=q._fullLayout,G=g(H,q),J=H._infolayer.selectAll("g."+i.containerClassName).data(G.length>0?[0]:[]);J.enter().append("g").classed(i.containerClassName,!0).style("cursor",z?null:"ew-resize");function le(W){W._commandObserver&&(W._commandObserver.remove(),delete W._commandObserver),w.autoMargin(q,h(W))}if(J.exit().each(function(){v.select(this).selectAll("g."+i.groupClassName).each(le)}).remove(),G.length!==0){var ge=J.selectAll("g."+i.groupClassName).data(G,m);ge.enter().append("g").classed(i.groupClassName,!0),ge.exit().each(le).remove();for(var de=0;de<G.length;de++){var me=G[de];E(q,me)}ge.each(function(W){var ie=v.select(this);p(W),w.manageCommandObserver(q,W,W._visibleSteps,function(se){var ee=ie.data()[0];ee.active!==se.index&&(ee._dragging||A(q,ie,ee,se.index,!1,!0))}),c(q,v.select(this),W)})}};function h(V){return i.autoMarginIdRoot+V._index}function g(V,q){for(var z=V[i.name],H=[],G=0;G<z.length;G++){var J=z[G];J.visible&&(J._gd=q,H.push(J))}return H}function m(V){return V._index}function E(V,q){var z=P.tester.selectAll("g."+i.labelGroupClass).data(q._visibleSteps);z.enter().append("g").classed(i.labelGroupClass,!0);var H=0,G=0;z.each(function(pe){var oe=v.select(this),Y=M(oe,{step:pe},q),ce=Y.node();if(ce){var ue=P.bBox(ce);G=Math.max(G,ue.height),H=Math.max(H,ue.width)}}),z.remove();var J=q._dims={};J.inputAreaWidth=Math.max(i.railWidth,i.gripHeight);var le=V._fullLayout._size;J.lx=le.l+le.w*q.x,J.ly=le.t+le.h*(1-q.y),q.lenmode==="fraction"?J.outerLength=Math.round(le.w*q.len):J.outerLength=q.len,J.inputAreaStart=0,J.inputAreaLength=Math.round(J.outerLength-q.pad.l-q.pad.r);var ge=J.inputAreaLength-2*i.stepInset,de=ge/(q._stepCount-1),me=H+i.labelPadding;if(J.labelStride=Math.max(1,Math.ceil(me/de)),J.labelHeight=G,J.currentValueMaxWidth=0,J.currentValueHeight=0,J.currentValueTotalHeight=0,J.currentValueMaxLines=1,q.currentvalue.visible){var W=P.tester.append("g");z.each(function(pe){var oe=_(W,q,pe.label),Y=oe.node()&&P.bBox(oe.node())||{width:0,height:0},ce=a.lineCount(oe);J.currentValueMaxWidth=Math.max(J.currentValueMaxWidth,Math.ceil(Y.width)),J.currentValueHeight=Math.max(J.currentValueHeight,Math.ceil(Y.height)),J.currentValueMaxLines=Math.max(J.currentValueMaxLines,ce)}),J.currentValueTotalHeight=J.currentValueHeight+q.currentvalue.offset,W.remove()}J.height=J.currentValueTotalHeight+i.tickOffset+q.ticklen+i.labelOffset+J.labelHeight+q.pad.t+q.pad.b;var ie="left";t.isRightAnchor(q)&&(J.lx-=J.outerLength,ie="right"),t.isCenterAnchor(q)&&(J.lx-=J.outerLength/2,ie="center");var se="top";t.isBottomAnchor(q)&&(J.ly-=J.height,se="bottom"),t.isMiddleAnchor(q)&&(J.ly-=J.height/2,se="middle"),J.outerLength=Math.ceil(J.outerLength),J.height=Math.ceil(J.height),J.lx=Math.round(J.lx),J.ly=Math.round(J.ly);var ee={y:q.y,b:J.height*d[se],t:J.height*u[se]};q.lenmode==="fraction"?(ee.l=0,ee.xl=q.x-q.len*u[ie],ee.r=0,ee.xr=q.x+q.len*d[ie]):(ee.x=q.x,ee.l=J.outerLength*u[ie],ee.r=J.outerLength*d[ie]),w.autoMargin(V,h(q),ee)}function c(V,q,z){(z.steps[z.active]||{}).visible||(z.active=z._visibleSteps[0]._index),q.call(_,z).call(U,z).call(k,z).call(f,z).call(B,V,z).call(T,V,z);var H=z._dims;P.setTranslate(q,H.lx+z.pad.l,H.ly+z.pad.t),q.call(x,z,!1),q.call(_,z)}function _(V,q,z){if(q.currentvalue.visible){var H=q._dims,G,J;switch(q.currentvalue.xanchor){case"right":G=H.inputAreaLength-i.currentValueInset-H.currentValueMaxWidth,J="left";break;case"center":G=H.inputAreaLength*.5,J="middle";break;default:G=i.currentValueInset,J="left"}var le=t.ensureSingle(V,"text",i.labelClass,function(se){se.attr({"text-anchor":J,"data-notex":1})}),ge=q.currentvalue.prefix?q.currentvalue.prefix:"";if(typeof z=="string")ge+=z;else{var de=q.steps[q.active].label,me=q._gd._fullLayout._meta;me&&(de=t.templateString(de,me)),ge+=de}q.currentvalue.suffix&&(ge+=q.currentvalue.suffix),le.call(P.font,q.currentvalue.font).text(ge).call(a.convertToTspans,q._gd);var W=a.lineCount(le),ie=(H.currentValueMaxLines+1-W)*q.currentvalue.font.size*o;return a.positionText(le,G,ie),le}}function T(V,q,z){var H=t.ensureSingle(V,"rect",i.gripRectClass,function(G){G.call(y,q,V,z).style("pointer-events","all")});H.attr({width:i.gripWidth,height:i.gripHeight,rx:i.gripRadius,ry:i.gripRadius}).call(C.stroke,z.bordercolor).call(C.fill,z.bgcolor).style("stroke-width",z.borderwidth+"px")}function M(V,q,z){var H=t.ensureSingle(V,"text",i.labelClass,function(le){le.attr({"text-anchor":"middle","data-notex":1})}),G=q.step.label,J=z._gd._fullLayout._meta;return J&&(G=t.templateString(G,J)),H.call(P.font,z.font).text(G).call(a.convertToTspans,z._gd),H}function k(V,q){var z=t.ensureSingle(V,"g",i.labelsClass),H=q._dims,G=z.selectAll("g."+i.labelGroupClass).data(H.labelSteps);G.enter().append("g").classed(i.labelGroupClass,!0),G.exit().remove(),G.each(function(J){var le=v.select(this);le.call(M,J,q),P.setTranslate(le,N(q,J.fraction),i.tickOffset+q.ticklen+q.font.size*o+i.labelOffset+H.currentValueTotalHeight)})}function b(V,q,z,H,G){var J=Math.round(H*(z._stepCount-1)),le=z._visibleSteps[J]._index;le!==z.active&&A(V,q,z,le,!0,G)}function A(V,q,z,H,G,J){var le=z.active;z.active=H,l(V.layout,i.name,z).applyUpdate("active",H);var ge=z.steps[z.active];q.call(x,z,J),q.call(_,z),V.emit("plotly_sliderchange",{slider:z,step:z.steps[z.active],interaction:G,previousActive:le}),ge&&ge.method&&G&&(q._nextMethod?(q._nextMethod.step=ge,q._nextMethod.doCallback=G,q._nextMethod.doTransition=J):(q._nextMethod={step:ge,doCallback:G,doTransition:J},q._nextMethodRaf=window.requestAnimationFrame(function(){var de=q._nextMethod.step;de.method&&(de.execute&&w.executeAPICommand(V,de.method,de.args),q._nextMethod=null,q._nextMethodRaf=null)})))}function y(V,q,z){if(q._context.staticPlot)return;var H=z.node(),G=v.select(q);function J(){return z.data()[0]}function le(){var ge=J();q.emit("plotly_sliderstart",{slider:ge});var de=z.select("."+i.gripRectClass);v.event.stopPropagation(),v.event.preventDefault(),de.call(C.fill,ge.activebgcolor);var me=D(ge,v.mouse(H)[0]);b(q,z,ge,me,!0),ge._dragging=!0;function W(){var se=J(),ee=D(se,v.mouse(H)[0]);b(q,z,se,ee,!1)}G.on("mousemove",W),G.on("touchmove",W);function ie(){var se=J();se._dragging=!1,de.call(C.fill,se.bgcolor),G.on("mouseup",null),G.on("mousemove",null),G.on("touchend",null),G.on("touchmove",null),q.emit("plotly_sliderend",{slider:se,step:se.steps[se.active]})}G.on("mouseup",ie),G.on("touchend",ie)}V.on("mousedown",le),V.on("touchstart",le)}function f(V,q){var z=V.selectAll("rect."+i.tickRectClass).data(q._visibleSteps),H=q._dims;z.enter().append("rect").classed(i.tickRectClass,!0),z.exit().remove(),z.attr({width:q.tickwidth+"px","shape-rendering":"crispEdges"}),z.each(function(G,J){var le=J%H.labelStride===0,ge=v.select(this);ge.attr({height:le?q.ticklen:q.minorticklen}).call(C.fill,q.tickcolor),P.setTranslate(ge,N(q,J/(q._stepCount-1))-.5*q.tickwidth,(le?i.tickOffset:i.minorTickOffset)+H.currentValueTotalHeight)})}function p(V){var q=V._dims;q.labelSteps=[];for(var z=V._stepCount,H=0;H<z;H+=q.labelStride)q.labelSteps.push({fraction:H/(z-1),step:V._visibleSteps[H]})}function x(V,q,z){for(var H=V.select("rect."+i.gripRectClass),G=0,J=0;J<q._stepCount;J++)if(q._visibleSteps[J]._index===q.active){G=J;break}var le=N(q,G/(q._stepCount-1));if(!q._invokingCommand){var ge=H;z&&q.transition.duration>0&&(ge=ge.transition().duration(q.transition.duration).ease(q.transition.easing)),ge.attr("transform",r(le-i.gripWidth*.5,q._dims.currentValueTotalHeight))}}function N(V,q){var z=V._dims;return z.inputAreaStart+i.stepInset+(z.inputAreaLength-2*i.stepInset)*Math.min(1,Math.max(0,q))}function D(V,q){var z=V._dims;return Math.min(1,Math.max(0,(q-i.stepInset-z.inputAreaStart)/(z.inputAreaLength-2*i.stepInset-2*z.inputAreaStart)))}function B(V,q,z){var H=z._dims,G=t.ensureSingle(V,"rect",i.railTouchRectClass,function(J){J.call(y,q,V,z).style("pointer-events","all")});G.attr({width:H.inputAreaLength,height:Math.max(H.inputAreaWidth,i.tickOffset+z.ticklen+H.labelHeight)}).call(C.fill,z.bgcolor).attr("opacity",0),P.setTranslate(G,0,H.currentValueTotalHeight)}function U(V,q){var z=q._dims,H=z.inputAreaLength-i.railInset*2,G=t.ensureSingle(V,"rect",i.railRectClass);G.attr({width:H,height:i.railWidth,rx:i.railRadius,ry:i.railRadius,"shape-rendering":"crispEdges"}).call(C.stroke,q.bordercolor).call(C.fill,q.bgcolor).style("stroke-width",q.borderwidth+"px"),P.setTranslate(G,i.railInset,(z.inputAreaWidth-i.railWidth)*.5+z.currentValueTotalHeight)}}}),LM=Ne({"src/components/sliders/index.js"(te,Z){var v=Ox();Z.exports={moduleType:"component",name:v.name,layoutAttributes:Lg(),supplyLayoutDefaults:AA(),draw:Yw()}}}),Rg=Ne({"src/components/rangeslider/attributes.js"(te,Z){var v=js();Z.exports={bgcolor:{valType:"color",dflt:v.background,editType:"plot"},bordercolor:{valType:"color",dflt:v.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"}}}),Zw=Ne({"src/components/rangeslider/oppaxis_attributes.js"(te,Z){Z.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"}}}),Z1=Ne({"src/components/rangeslider/constants.js"(te,Z){Z.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}}}),$w=Ne({"src/components/rangeslider/helpers.js"(te){var Z=Wf(),v=hc(),w=Z1(),C=Ad().LINE_SPACING,P=w.name;function t(r){var a=r&&r[P];return a&&a.visible}te.isVisible=t,te.makeData=function(r){for(var a=Z.list({_fullLayout:r},"x",!0),l=r.margin,i=[],s=0;s<a.length;s++){var o=a[s];if(t(o)){i.push(o);var u=o[P];u._id=P+o._id,u._height=(r.height-l.b-l.t)*u.thickness,u._offsetShift=Math.floor(u.borderwidth/2)}}r._rangeSliderData=i},te.autoMarginOpts=function(r,a){var l=r._fullLayout,i=a[P],s=a._id.charAt(0),o=0,u=0;if(a.side==="bottom"&&(o=a._depth,a.title.text!==l._dfltTitle[s])){u=1.5*a.title.font.size+10+i._offsetShift;var d=(a.title.text.match(v.BR_TAG_ALL)||[]).length;u+=d*a.title.font.size*C}return{x:0,y:a._counterDomainMin,l:0,r:0,t:0,b:i._height+o+Math.max(l.margin.b,u),pad:w.extraPad+i._offsetShift*2}}}}),RM=Ne({"src/components/rangeslider/defaults.js"(te,Z){var v=In(),w=Cu(),C=Wf(),P=Rg(),t=Zw();Z.exports=function(a,l,i){var s=a[i],o=l[i];if(!(s.rangeslider||l._requestRangeslider[o._id]))return;v.isPlainObject(s.rangeslider)||(s.rangeslider={});var u=s.rangeslider,d=w.newContainer(o,"rangeslider");function h(p,x){return v.coerce(u,d,P,p,x)}var g,m;function E(p,x){return v.coerce(g,m,t,p,x)}var c=h("visible");if(c){h("bgcolor",l.plot_bgcolor),h("bordercolor"),h("borderwidth"),h("thickness"),h("autorange",!o.isValidRange(u.range)),h("range");var _=l._subplots;if(_)for(var T=_.cartesian.filter(function(p){return p.substr(0,p.indexOf("y"))===C.name2id(i)}).map(function(p){return p.substr(p.indexOf("y"),p.length)}),M=v.simpleMap(T,C.id2name),k=0;k<M.length;k++){var b=M[k];g=u[b]||{},m=w.newContainer(d,b,"yaxis");var A=l[b],y;g.range&&A.isValidRange(g.range)&&(y="fixed");var f=E("rangemode",y);f!=="match"&&E("range",A.range.slice())}d._input=u}}}}),IM=Ne({"src/components/rangeslider/calc_autorange.js"(te,Z){var v=Wf().list,w=Cm().getAutoRange,C=Z1();Z.exports=function(t){for(var r=v(t,"x",!0),a=0;a<r.length;a++){var l=r[a],i=l[C.name];i&&i.visible&&i.autorange&&(i._input.autorange=!0,i._input.range=i.range=w(t,l))}}}}),Oy=Ne({"src/components/rangeslider/draw.js"(te,Z){var v=xn(),w=Yo(),C=ff(),P=In(),t=P.strTranslate,r=zs(),a=Ha(),l=Tg(),i=Ih(),s=Wf(),o=Uv(),u=km(),d=Z1();Z.exports=function(y){for(var f=y._fullLayout,p=f._rangeSliderData,x=0;x<p.length;x++){var N=p[x][d.name];N._clipId=N._id+"-"+f._uid}function D(U){return U._name}var B=f._infolayer.selectAll("g."+d.containerClassName).data(p,D);B.exit().each(function(U){var V=U[d.name];f._topdefs.select("#"+V._clipId).remove()}).remove(),p.length!==0&&(B.enter().append("g").classed(d.containerClassName,!0).attr("pointer-events","all"),B.each(function(U){var V=v.select(this),q=U[d.name],z=f[s.id2name(U.anchor)],H=q[s.id2name(U.anchor)];if(q.range){var G=P.simpleMap(q.range,U.r2l),J=P.simpleMap(U.range,U.r2l),le;J[0]<J[1]?le=[Math.min(G[0],J[0]),Math.max(G[1],J[1])]:le=[Math.max(G[0],J[0]),Math.min(G[1],J[1])],q.range=q._input.range=P.simpleMap(le,U.l2r)}U.cleanRange("rangeslider.range");var ge=f._size,de=U.domain;q._width=ge.w*(de[1]-de[0]);var me=Math.round(ge.l+ge.w*de[0]),W=Math.round(ge.t+ge.h*(1-U._counterDomainMin)+(U.side==="bottom"?U._depth:0)+q._offsetShift+d.extraPad);V.attr("transform",t(me,W)),q._rl=P.simpleMap(q.range,U.r2l);var ie=q._rl[0],se=q._rl[1],ee=se-ie;if(q.p2d=function(Ve){return Ve/q._width*ee+ie},q.d2p=function(Ve){return(Ve-ie)/ee*q._width},U.rangebreaks){var pe=U.locateBreaks(ie,se);if(pe.length){var oe,Y,ce=0;for(oe=0;oe<pe.length;oe++)Y=pe[oe],ce+=Y.max-Y.min;var ue=q._width/(se-ie-ce),_e=[-ue*ie];for(oe=0;oe<pe.length;oe++)Y=pe[oe],_e.push(_e[_e.length-1]-ue*(Y.max-Y.min));for(q.d2p=function(Ve){for(var rt=_e[0],mt=0;mt<pe.length;mt++){var _t=pe[mt];if(Ve>=_t.max)rt=_e[mt+1];else if(Ve<_t.min)break}return rt+ue*Ve},oe=0;oe<pe.length;oe++)Y=pe[oe],Y.pmin=q.d2p(Y.min),Y.pmax=q.d2p(Y.max);q.p2d=function(Ve){for(var rt=_e[0],mt=0;mt<pe.length;mt++){var _t=pe[mt];if(Ve>=_t.pmax)rt=_e[mt+1];else if(Ve<_t.pmin)break}return(Ve-rt)/ue}}}if(H.rangemode!=="match"){var Le=z.r2l(H.range[0]),ze=z.r2l(H.range[1]),Xe=ze-Le;q.d2pOppAxis=function(Ve){return(Ve-Le)/Xe*q._height}}V.call(c,y,U,q).call(_,y,U,q).call(T,y,U,q).call(k,y,U,q,H).call(b,y,U,q).call(A,y,U,q),g(V,y,U,q),E(V,y,U,q,z,H),U.side==="bottom"&&l.draw(y,U._id+"title",{propContainer:U,propName:U._name+".title.text",placeholder:f._dfltTitle.x,attributes:{x:U._offset+U._length/2,y:W+q._height+q._offsetShift+10+1.5*U.title.font.size,"text-anchor":"middle"}})}))};function h(y){return typeof y.clientX=="number"?y.clientX:y.touches&&y.touches.length>0?y.touches[0].clientX:0}function g(y,f,p,x){if(f._context.staticPlot)return;var N=y.select("rect."+d.slideBoxClassName).node(),D=y.select("rect."+d.grabAreaMinClassName).node(),B=y.select("rect."+d.grabAreaMaxClassName).node();function U(){var V=v.event,q=V.target,z=h(V),H=z-y.node().getBoundingClientRect().left,G=x.d2p(p._rl[0]),J=x.d2p(p._rl[1]),le=o.coverSlip();this.addEventListener("touchmove",ge),this.addEventListener("touchend",de),le.addEventListener("mousemove",ge),le.addEventListener("mouseup",de);function ge(me){var W=h(me),ie=+W-z,se,ee,pe;switch(q){case N:if(pe="ew-resize",G+ie>p._length||J+ie<0)return;se=G+ie,ee=J+ie;break;case D:if(pe="col-resize",G+ie>p._length)return;se=G+ie,ee=J;break;case B:if(pe="col-resize",J+ie<0)return;se=G,ee=J+ie;break;default:pe="ew-resize",se=H,ee=H+ie;break}if(ee<se){var oe=ee;ee=se,se=oe}x._pixelMin=se,x._pixelMax=ee,u(v.select(le),pe),m(y,f,p,x)}function de(){le.removeEventListener("mousemove",ge),le.removeEventListener("mouseup",de),this.removeEventListener("touchmove",ge),this.removeEventListener("touchend",de),P.removeElement(le)}}y.on("mousedown",U),y.on("touchstart",U)}function m(y,f,p,x){function N(U){return p.l2r(P.constrain(U,x._rl[0],x._rl[1]))}var D=N(x.p2d(x._pixelMin)),B=N(x.p2d(x._pixelMax));window.requestAnimationFrame(function(){w.call("_guiRelayout",f,p._name+".range",[D,B])})}function E(y,f,p,x,N,D){var B=d.handleWidth/2;function U(me){return P.constrain(me,0,x._width)}function V(me){return P.constrain(me,0,x._height)}function q(me){return P.constrain(me,-B,x._width+B)}var z=U(x.d2p(p._rl[0])),H=U(x.d2p(p._rl[1]));if(y.select("rect."+d.slideBoxClassName).attr("x",z).attr("width",H-z),y.select("rect."+d.maskMinClassName).attr("width",z),y.select("rect."+d.maskMaxClassName).attr("x",H).attr("width",x._width-H),D.rangemode!=="match"){var G=x._height-V(x.d2pOppAxis(N._rl[1])),J=x._height-V(x.d2pOppAxis(N._rl[0]));y.select("rect."+d.maskMinOppAxisClassName).attr("x",z).attr("height",G).attr("width",H-z),y.select("rect."+d.maskMaxOppAxisClassName).attr("x",z).attr("y",J).attr("height",x._height-J).attr("width",H-z),y.select("rect."+d.slideBoxClassName).attr("y",G).attr("height",J-G)}var le=.5,ge=Math.round(q(z-B))-le,de=Math.round(q(H-B))+le;y.select("g."+d.grabberMinClassName).attr("transform",t(ge,le)),y.select("g."+d.grabberMaxClassName).attr("transform",t(de,le))}function c(y,f,p,x){var N=P.ensureSingle(y,"rect",d.bgClassName,function(V){V.attr({x:0,y:0,"shape-rendering":"crispEdges"})}),D=x.borderwidth%2===0?x.borderwidth:x.borderwidth-1,B=-x._offsetShift,U=r.crispRound(f,x.borderwidth);N.attr({width:x._width+D,height:x._height+D,transform:t(B,B),"stroke-width":U}).call(a.stroke,x.bordercolor).call(a.fill,x.bgcolor)}function _(y,f,p,x){var N=f._fullLayout,D=P.ensureSingleById(N._topdefs,"clipPath",x._clipId,function(B){B.append("rect").attr({x:0,y:0})});D.select("rect").attr({width:x._width,height:x._height})}function T(y,f,p,x){var N=f.calcdata,D=y.selectAll("g."+d.rangePlotClassName).data(p._subplotsWith,P.identity);D.enter().append("g").attr("class",function(U){return d.rangePlotClassName+" "+U}).call(r.setClipUrl,x._clipId,f),D.order(),D.exit().remove();var B;D.each(function(U,V){var q=v.select(this),z=V===0,H=s.getFromId(f,U,"y"),G=H._name,J=x[G],le={data:[],layout:{xaxis:{type:p.type,domain:[0,1],range:x.range.slice(),calendar:p.calendar},width:x._width,height:x._height,margin:{t:0,b:0,l:0,r:0}},_context:f._context};p.rangebreaks&&(le.layout.xaxis.rangebreaks=p.rangebreaks),le.layout[G]={type:H.type,domain:[0,1],range:J.rangemode!=="match"?J.range.slice():H.range.slice(),calendar:H.calendar},H.rangebreaks&&(le.layout[G].rangebreaks=H.rangebreaks),C.supplyDefaults(le);var ge=le._fullLayout.xaxis,de=le._fullLayout[G];ge.clearCalc(),ge.setScale(),de.clearCalc(),de.setScale();var me={id:U,plotgroup:q,xaxis:ge,yaxis:de,isRangePlot:!0};z?B=me:(me.mainplot="xy",me.mainplotinfo=B),i.rangePlot(f,me,M(N,U))})}function M(y,f){for(var p=[],x=0;x<y.length;x++){var N=y[x],D=N[0].trace;D.xaxis+D.yaxis===f&&p.push(N)}return p}function k(y,f,p,x,N){var D=P.ensureSingle(y,"rect",d.maskMinClassName,function(q){q.attr({x:0,y:0,"shape-rendering":"crispEdges"})});D.attr("height",x._height).call(a.fill,d.maskColor);var B=P.ensureSingle(y,"rect",d.maskMaxClassName,function(q){q.attr({y:0,"shape-rendering":"crispEdges"})});if(B.attr("height",x._height).call(a.fill,d.maskColor),N.rangemode!=="match"){var U=P.ensureSingle(y,"rect",d.maskMinOppAxisClassName,function(q){q.attr({y:0,"shape-rendering":"crispEdges"})});U.attr("width",x._width).call(a.fill,d.maskOppAxisColor);var V=P.ensureSingle(y,"rect",d.maskMaxOppAxisClassName,function(q){q.attr({y:0,"shape-rendering":"crispEdges"})});V.attr("width",x._width).style("border-top",d.maskOppBorder).call(a.fill,d.maskOppAxisColor)}}function b(y,f,p,x){if(!f._context.staticPlot){var N=P.ensureSingle(y,"rect",d.slideBoxClassName,function(D){D.attr({y:0,cursor:d.slideBoxCursor,"shape-rendering":"crispEdges"})});N.attr({height:x._height,fill:d.slideBoxFill})}}function A(y,f,p,x){var N=P.ensureSingle(y,"g",d.grabberMinClassName),D=P.ensureSingle(y,"g",d.grabberMaxClassName),B={x:0,width:d.handleWidth,rx:d.handleRadius,fill:a.background,stroke:a.defaultLine,"stroke-width":d.handleStrokeWidth,"shape-rendering":"crispEdges"},U={y:Math.round(x._height/4),height:Math.round(x._height/2)},V=P.ensureSingle(N,"rect",d.handleMinClassName,function(J){J.attr(B)});V.attr(U);var q=P.ensureSingle(D,"rect",d.handleMaxClassName,function(J){J.attr(B)});q.attr(U);var z={width:d.grabAreaWidth,x:0,y:0,fill:d.grabAreaFill,cursor:f._context.staticPlot?void 0:d.grabAreaCursor},H=P.ensureSingle(N,"rect",d.grabAreaMinClassName,function(J){J.attr(z)});H.attr("height",x._height);var G=P.ensureSingle(D,"rect",d.grabAreaMaxClassName,function(J){J.attr(z)});G.attr("height",x._height)}}}),zy=Ne({"src/components/rangeslider/index.js"(te,Z){var v=In(),w=Rg(),C=Zw(),P=$w();Z.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:v.extendFlat({},w,{yaxis:C})}}},layoutAttributes:Rg(),handleDefaults:RM(),calcAutorange:IM(),draw:Oy(),isVisible:P.isVisible,makeData:P.makeData,autoMarginOpts:P.autoMarginOpts}}}),Kw=Ne({"src/components/rangeselector/attributes.js"(te,Z){var v=bo(),w=js(),C=Cu().templatedArray,P=C("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"});Z.exports={visible:{valType:"boolean",editType:"plot"},buttons:P,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:v({editType:"plot"}),bgcolor:{valType:"color",dflt:w.lightLine,editType:"plot"},activecolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:w.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"}}}),SA=Ne({"src/components/rangeselector/constants.js"(te,Z){Z.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}}}),$1=Ne({"src/components/rangeselector/defaults.js"(te,Z){var v=In(),w=Ha(),C=Cu(),P=jd(),t=Kw(),r=SA();Z.exports=function(s,o,u,d,h){var g=s.rangeselector||{},m=C.newContainer(o,"rangeselector");function E(k,b){return v.coerce(g,m,t,k,b)}var c=P(g,m,{name:"buttons",handleItemDefaults:a,calendar:h}),_=E("visible",c.length>0);if(_){var T=l(o,u,d);E("x",T[0]),E("y",T[1]),v.noneOrAll(s,o,["x","y"]),E("xanchor"),E("yanchor"),v.coerceFont(E,"font",u.font);var M=E("bgcolor");E("activecolor",w.contrast(M,r.lightAmount,r.darkAmount)),E("bordercolor"),E("borderwidth")}};function a(i,s,o,u){var d=u.calendar;function h(E,c){return v.coerce(i,s,t.buttons,E,c)}var g=h("visible");if(g){var m=h("step");m!=="all"&&(d&&d!=="gregorian"&&(m==="month"||m==="year")?s.stepmode="backward":h("stepmode"),h("count")),h("label")}}function l(i,s,o){for(var u=o.filter(function(m){return s[m].anchor===i._id}),d=0,h=0;h<u.length;h++){var g=s[u[h]].domain;g&&(d=Math.max(g[1],d))}return[i.domain[0],d+r.yPad]}}}),zx=Ne({"src/components/rangeselector/get_update_object.js"(te,Z){var v=Wa(),w=In().titleCase;Z.exports=function(t,r){var a=t._name,l={};if(r.step==="all")l[a+".autorange"]=!0;else{var i=C(t,r);l[a+".range[0]"]=i[0],l[a+".range[1]"]=i[1]}return l};function C(P,t){var r=P.range,a=new Date(P.r2l(r[1])),l=t.step,i=v["utc"+w(l)],s=t.count,o;switch(t.stepmode){case"backward":o=P.l2r(+i.offset(a,-s));break;case"todate":var u=i.offset(a,-s);o=P.l2r(+i.ceil(u));break}var d=r[1];return[o,d]}}}),Jw=Ne({"src/components/rangeselector/draw.js"(te,Z){var v=xn(),w=Yo(),C=ff(),P=Ha(),t=zs(),r=In(),a=r.strTranslate,l=hc(),i=Wf(),s=Ad(),o=s.LINE_SPACING,u=s.FROM_TL,d=s.FROM_BR,h=SA(),g=zx();Z.exports=function(y){var f=y._fullLayout,p=f._infolayer.selectAll(".rangeselector").data(m(y),E);p.enter().append("g").classed("rangeselector",!0),p.exit().remove(),p.style({cursor:"pointer","pointer-events":"all"}),p.each(function(x){var N=v.select(this),D=x,B=D.rangeselector,U=N.selectAll("g.button").data(r.filterVisible(B.buttons));U.enter().append("g").classed("button",!0),U.exit().remove(),U.each(function(V){var q=v.select(this),z=g(D,V);V._isActive=c(D,V,z),q.call(_,B,V),q.call(M,B,V,y),q.on("click",function(){y._dragged||w.call("_guiRelayout",y,z)}),q.on("mouseover",function(){V._isHovered=!0,q.call(_,B,V)}),q.on("mouseout",function(){V._isHovered=!1,q.call(_,B,V)})}),b(y,U,B,D._name,N)})};function m(A){for(var y=i.list(A,"x",!0),f=[],p=0;p<y.length;p++){var x=y[p];x.rangeselector&&x.rangeselector.visible&&f.push(x)}return f}function E(A){return A._id}function c(A,y,f){if(y.step==="all")return A.autorange===!0;var p=Object.keys(f);return A.range[0]===f[p[0]]&&A.range[1]===f[p[1]]}function _(A,y,f){var p=r.ensureSingle(A,"rect","selector-rect",function(x){x.attr("shape-rendering","crispEdges")});p.attr({rx:h.rx,ry:h.ry}),p.call(P.stroke,y.bordercolor).call(P.fill,T(y,f)).style("stroke-width",y.borderwidth+"px")}function T(A,y){return y._isActive||y._isHovered?A.activecolor:A.bgcolor}function M(A,y,f,p){function x(D){l.convertToTspans(D,p)}var N=r.ensureSingle(A,"text","selector-text",function(D){D.attr("text-anchor","middle")});N.call(t.font,y.font).text(k(f,p._fullLayout._meta)).call(x)}function k(A,y){return A.label?y?r.templateString(A.label,y):A.label:A.step==="all"?"all":A.count+A.step.charAt(0)}function b(A,y,f,p,x){var N=0,D=0,B=f.borderwidth;y.each(function(){var G=v.select(this),J=G.select(".selector-text"),le=f.font.size*o,ge=Math.max(le*l.lineCount(J),16)+3;D=Math.max(D,ge)}),y.each(function(){var G=v.select(this),J=G.select(".selector-rect"),le=G.select(".selector-text"),ge=le.node()&&t.bBox(le.node()).width,de=f.font.size*o,me=l.lineCount(le),W=Math.max(ge+10,h.minButtonWidth);G.attr("transform",a(B+N,B)),J.attr({x:0,y:0,width:W,height:D}),l.positionText(le,W/2,D/2-(me-1)*de/2+3),N+=W+5});var U=A._fullLayout._size,V=U.l+U.w*f.x,q=U.t+U.h*(1-f.y),z="left";r.isRightAnchor(f)&&(V-=N,z="right"),r.isCenterAnchor(f)&&(V-=N/2,z="center");var H="top";r.isBottomAnchor(f)&&(q-=D,H="bottom"),r.isMiddleAnchor(f)&&(q-=D/2,H="middle"),N=Math.ceil(N),D=Math.ceil(D),V=Math.round(V),q=Math.round(q),C.autoMargin(A,p+"-range-selector",{x:f.x,y:f.y,l:N*u[z],r:N*d[z],b:D*d[H],t:D*u[H]}),x.attr("transform",a(V,q))}}}),Nx=Ne({"src/components/rangeselector/index.js"(te,Z){Z.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:Kw()}}},layoutAttributes:Kw(),handleDefaults:$1(),draw:Jw()}}}),Fc=Ne({"src/plots/domain.js"(te){var Z=fi().extendFlat;te.attributes=function(v,w){v=v||{},w=w||{};var C={valType:"info_array",editType:v.editType,items:[{valType:"number",min:0,max:1,editType:v.editType},{valType:"number",min:0,max:1,editType:v.editType}],dflt:[0,1]};v.name&&v.name+"",v.trace,w.description&&""+w.description;var P={x:Z({},C,{}),y:Z({},C,{}),editType:v.editType};return v.noGridCell||(P.row={valType:"integer",min:0,dflt:0,editType:v.editType},P.column={valType:"integer",min:0,dflt:0,editType:v.editType}),P},te.defaults=function(v,w,C,P){var t=P&&P.x||[0,1],r=P&&P.y||[0,1],a=w.grid;if(a){var l=C("domain.column");l!==void 0&&(l<a.columns?t=a._domains.x[l]:delete v.domain.column);var i=C("domain.row");i!==void 0&&(i<a.rows?r=a._domains.y[i]:delete v.domain.row)}var s=C("domain.x",t),o=C("domain.y",r);s[0]<s[1]||(v.domain.x=t.slice()),o[0]<o[1]||(v.domain.y=r.slice())}}}),EA=Ne({"src/components/grid/index.js"(te,Z){var v=In(),w=ml().counter,C=Fc().attributes,P=wh().idRegex,t=Cu(),r={rows:{valType:"integer",min:1,editType:"plot"},roworder:{valType:"enumerated",values:["top to bottom","bottom to top"],dflt:"top to bottom",editType:"plot"},columns:{valType:"integer",min:1,editType:"plot"},subplots:{valType:"info_array",freeLength:!0,dimensions:2,items:{valType:"enumerated",values:[w("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[P.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[P.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:C({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 a(u,d,h){var g=d[h+"axes"],m=Object.keys((u._splomAxes||{})[h]||{});if(Array.isArray(g))return g;if(m.length)return m}function l(u,d){var h=u.grid||{},g=a(d,h,"x"),m=a(d,h,"y");if(!u.grid&&!g&&!m)return;var E=Array.isArray(h.subplots)&&Array.isArray(h.subplots[0]),c=Array.isArray(g),_=Array.isArray(m),T=c&&g!==h.xaxes&&_&&m!==h.yaxes,M,k;E?(M=h.subplots.length,k=h.subplots[0].length):(_&&(M=m.length),c&&(k=g.length));var b=t.newContainer(d,"grid");function A(q,z){return v.coerce(h,b,r,q,z)}var y=A("rows",M),f=A("columns",k);if(!(y*f>1)){delete d.grid;return}if(!E&&!c&&!_){var p=A("pattern")==="independent";p&&(E=!0)}b._hasSubplotGrid=E;var x=A("roworder"),N=x==="top to bottom",D=E?.2:.1,B=E?.3:.1,U,V;T&&d._splomGridDflt&&(U=d._splomGridDflt.xside,V=d._splomGridDflt.yside),b._domains={x:i("x",A,D,U,f),y:i("y",A,B,V,y,N)}}function i(u,d,h,g,m,E){var c=d(u+"gap",h),_=d("domain."+u);d(u+"side",g);for(var T=new Array(m),M=_[0],k=(_[1]-M)/(m-c),b=k*(1-c),A=0;A<m;A++){var y=M+k*A;T[E?m-1-A:A]=[y,y+b]}return T}function s(u,d){var h=d.grid;if(!(!h||!h._domains)){var g=u.grid||{},m=d._subplots,E=h._hasSubplotGrid,c=h.rows,_=h.columns,T=h.pattern==="independent",M,k,b,A,y,f,p,x=h._axisMap={};if(E){var N=g.subplots||[];f=h.subplots=new Array(c);var D=1;for(M=0;M<c;M++){var B=f[M]=new Array(_),U=N[M]||[];for(k=0;k<_;k++)if(T?(y=D===1?"xy":"x"+D+"y"+D,D++):y=U[k],B[k]="",m.cartesian.indexOf(y)!==-1){if(p=y.indexOf("y"),b=y.slice(0,p),A=y.slice(p),x[b]!==void 0&&x[b]!==k||x[A]!==void 0&&x[A]!==M)continue;B[k]=y,x[b]=k,x[A]=M}}}else{var V=a(d,g,"x"),q=a(d,g,"y");h.xaxes=o(V,m.xaxis,_,x,"x"),h.yaxes=o(q,m.yaxis,c,x,"y")}var z=h._anchors={},H=h.roworder==="top to bottom";for(var G in x){var J=G.charAt(0),le=h[J+"side"],ge,de,me;if(le.length<8)z[G]="free";else if(J==="x"){if(le.charAt(0)==="t"===H?(ge=0,de=1,me=c):(ge=c-1,de=-1,me=-1),E){var W=x[G];for(M=ge;M!==me;M+=de)if(y=f[M][W],!!y&&(p=y.indexOf("y"),y.slice(0,p)===G)){z[G]=y.slice(p);break}}else for(M=ge;M!==me;M+=de)if(A=h.yaxes[M],m.cartesian.indexOf(G+A)!==-1){z[G]=A;break}}else if(le.charAt(0)==="l"?(ge=0,de=1,me=_):(ge=_-1,de=-1,me=-1),E){var ie=x[G];for(M=ge;M!==me;M+=de)if(y=f[ie][M],!!y&&(p=y.indexOf("y"),y.slice(p)===G)){z[G]=y.slice(0,p);break}}else for(M=ge;M!==me;M+=de)if(b=h.xaxes[M],m.cartesian.indexOf(b+G)!==-1){z[G]=b;break}}}}function o(u,d,h,g,m){var E=new Array(h),c;function _(T,M){d.indexOf(M)!==-1&&g[M]===void 0?(E[T]=M,g[M]=T):E[T]=""}if(Array.isArray(u))for(c=0;c<h;c++)_(c,u[c]);else for(_(0,m),c=1;c<h;c++)_(c,m+(c+1));return E}Z.exports={moduleType:"component",name:"grid",schema:{layout:{grid:r}},layoutAttributes:r,sizeDefaults:l,contentDefaults:s}}}),Ig=Ne({"src/components/errorbars/attributes.js"(te,Z){Z.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"}}}),DM=Ne({"src/components/errorbars/defaults.js"(te,Z){var v=Fn(),w=Yo(),C=In(),P=Cu(),t=Ig();Z.exports=function(r,a,l,i){var s="error_"+i.axis,o=P.newContainer(a,s),u=r[s]||{};function d(T,M){return C.coerce(u,o,t,T,M)}var h=u.array!==void 0||u.value!==void 0||u.type==="sqrt",g=d("visible",h);if(g!==!1){var m=d("type","array"in u?"data":"percent"),E=!0;m!=="sqrt"&&(E=d("symmetric",!((m==="data"?"arrayminus":"valueminus")in u))),m==="data"?(d("array"),d("traceref"),E||(d("arrayminus"),d("tracerefminus"))):(m==="percent"||m==="constant")&&(d("value"),E||d("valueminus"));var c="copy_"+i.inherit+"style";if(i.inherit){var _=a["error_"+i.inherit];(_||{}).visible&&d(c,!(u.color||v(u.thickness)||v(u.width)))}(!i.inherit||!o[c])&&(d("color",l),d("thickness"),d("width",w.traceIs(a,"gl3d")?0:4))}}}}),G0=Ne({"src/components/errorbars/compute_error.js"(te,Z){Z.exports=function(C){var P=C.type,t=C.symmetric;if(P==="data"){var r=C.array||[];if(t)return function(o,u){var d=+r[u];return[d,d]};var a=C.arrayminus||[];return function(o,u){var d=+r[u],h=+a[u];return!isNaN(d)||!isNaN(h)?[h||0,d||0]:[NaN,NaN]}}else{var l=v(P,C.value),i=v(P,C.valueminus);return t||C.valueminus===void 0?function(o){var u=l(o);return[u,u]}:function(o){return[i(o),l(o)]}}};function v(w,C){if(w==="percent")return function(P){return Math.abs(P*C/100)};if(w==="constant")return function(){return Math.abs(C)};if(w==="sqrt")return function(P){return Math.sqrt(Math.abs(P))}}}}),MA=Ne({"src/components/errorbars/calc.js"(te,Z){var v=Fn(),w=Yo(),C=Os(),P=In(),t=G0();Z.exports=function(l){for(var i=l.calcdata,s=0;s<i.length;s++){var o=i[s],u=o[0].trace;if(u.visible===!0&&w.traceIs(u,"errorBarsOK")){var d=C.getFromId(l,u.xaxis),h=C.getFromId(l,u.yaxis);r(o,u,d,"x"),r(o,u,h,"y")}}};function r(a,l,i,s){var o=l["error_"+s]||{},u=o.visible&&["linear","log"].indexOf(i.type)!==-1,d=[];if(u){for(var h=t(o),g=0;g<a.length;g++){var m=a[g],E=m.i;if(E===void 0)E=g;else if(E===null)continue;var c=m[s];if(v(i.c2l(c))){var _=h(c,E);if(v(_[0])&&v(_[1])){var T=m[s+"s"]=c-_[0],M=m[s+"h"]=c+_[1];d.push(T,M)}}}var k=i._id,b=l._extremes[k],A=C.findExtremes(i,d,P.extendFlat({tozero:b.opts.tozero},{padded:!0}));b.min=b.min.concat(A.min),b.max=b.max.concat(A.max)}}}}),CA=Ne({"src/components/errorbars/plot.js"(te,Z){var v=xn(),w=Fn(),C=zs(),P=yu();Z.exports=function(a,l,i,s){var o,u=i.xaxis,d=i.yaxis,h=s&&s.duration>0,g=a._context.staticPlot;l.each(function(m){var E=m[0].trace,c=E.error_x||{},_=E.error_y||{},T;E.ids&&(T=function(A){return A.id});var M=P.hasMarkers(E)&&E.marker.maxdisplayed>0;!_.visible&&!c.visible&&(m=[]);var k=v.select(this).selectAll("g.errorbar").data(m,T);if(k.exit().remove(),!!m.length){c.visible||k.selectAll("path.xerror").remove(),_.visible||k.selectAll("path.yerror").remove(),k.style("opacity",1);var b=k.enter().append("g").classed("errorbar",!0);h&&b.style("opacity",0).transition().duration(s.duration).style("opacity",1),C.setClipUrl(k,i.layerClipId,a),k.each(function(A){var y=v.select(this),f=t(A,u,d);if(!(M&&!A.vis)){var p,x=y.select("path.yerror");if(_.visible&&w(f.x)&&w(f.yh)&&w(f.ys)){var N=_.width;p="M"+(f.x-N)+","+f.yh+"h"+2*N+"m-"+N+",0V"+f.ys,f.noYS||(p+="m-"+N+",0h"+2*N),o=!x.size(),o?x=y.append("path").style("vector-effect",g?"none":"non-scaling-stroke").classed("yerror",!0):h&&(x=x.transition().duration(s.duration).ease(s.easing)),x.attr("d",p)}else x.remove();var D=y.select("path.xerror");if(c.visible&&w(f.y)&&w(f.xh)&&w(f.xs)){var B=(c.copy_ystyle?_:c).width;p="M"+f.xh+","+(f.y-B)+"v"+2*B+"m0,-"+B+"H"+f.xs,f.noXS||(p+="m0,-"+B+"v"+2*B),o=!D.size(),o?D=y.append("path").style("vector-effect",g?"none":"non-scaling-stroke").classed("xerror",!0):h&&(D=D.transition().duration(s.duration).ease(s.easing)),D.attr("d",p)}else D.remove()}})}})};function t(r,a,l){var i={x:a.c2p(r.x),y:l.c2p(r.y)};return r.yh!==void 0&&(i.yh=l.c2p(r.yh),i.ys=l.c2p(r.ys),w(i.ys)||(i.noYS=!0,i.ys=l.c2p(r.ys,!0))),r.xh!==void 0&&(i.xh=a.c2p(r.xh),i.xs=a.c2p(r.xs),w(i.xs)||(i.noXS=!0,i.xs=a.c2p(r.xs,!0))),i}}}),Dg=Ne({"src/components/errorbars/style.js"(te,Z){var v=xn(),w=Ha();Z.exports=function(P){P.each(function(t){var r=t[0].trace,a=r.error_y||{},l=r.error_x||{},i=v.select(this);i.selectAll("path.yerror").style("stroke-width",a.thickness+"px").call(w.stroke,a.color),l.copy_ystyle&&(l=a),i.selectAll("path.xerror").style("stroke-width",l.thickness+"px").call(w.stroke,l.color)})}}}),Og=Ne({"src/components/errorbars/index.js"(te,Z){var v=In(),w=ef().overrideAll,C=Ig(),P={error_x:v.extendFlat({},C),error_y:v.extendFlat({},C)};delete P.error_x.copy_zstyle,delete P.error_y.copy_zstyle,delete P.error_y.copy_ystyle;var t={error_x:v.extendFlat({},C),error_y:v.extendFlat({},C),error_z:v.extendFlat({},C)};delete t.error_x.copy_ystyle,delete t.error_y.copy_ystyle,delete t.error_z.copy_ystyle,delete t.error_z.copy_zstyle,Z.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:P,bar:P,histogram:P,scatter3d:w(t,"calc","nested"),scattergl:w(P,"calc","nested")}},supplyDefaults:DM(),calc:MA(),makeComputeError:G0(),plot:CA(),style:Dg(),hoverInfo:r};function r(a,l,i){(l.error_y||{}).visible&&(i.yerr=a.yh-a.y,l.error_y.symmetric||(i.yerrneg=a.y-a.ys)),(l.error_x||{}).visible&&(i.xerr=a.xh-a.x,l.error_x.symmetric||(i.xerrneg=a.x-a.xs))}}}),Fx=Ne({"src/components/colorbar/constants.js"(te,Z){Z.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"}}}}),kA=Ne({"src/components/colorbar/draw.js"(te,Z){var v=xn(),w=to(),C=ff(),P=Yo(),t=Os(),r=Uv(),a=In(),l=a.strTranslate,i=fi().extendFlat,s=km(),o=zs(),u=Ha(),d=Tg(),h=hc(),g=Bd().flipScale,m=Om(),E=vp(),c=Sd(),_=Ad(),T=_.LINE_SPACING,M=_.FROM_TL,k=_.FROM_BR,b=Fx().cn;function A(D){var B=D._fullLayout,U=B._infolayer.selectAll("g."+b.colorbar).data(y(D),function(V){return V._id});U.enter().append("g").attr("class",function(V){return V._id}).classed(b.colorbar,!0),U.each(function(V){var q=v.select(this);a.ensureSingle(q,"rect",b.cbbg),a.ensureSingle(q,"g",b.cbfills),a.ensureSingle(q,"g",b.cblines),a.ensureSingle(q,"g",b.cbaxis,function(H){H.classed(b.crisp,!0)}),a.ensureSingle(q,"g",b.cbtitleunshift,function(H){H.append("g").classed(b.cbtitle,!0)}),a.ensureSingle(q,"rect",b.cboutline);var z=f(q,V,D);z&&z.then&&(D._promises||[]).push(z),D._context.edits.colorbarPosition&&p(q,V,D)}),U.exit().each(function(V){C.autoMargin(D,V._id)}).remove(),U.order()}function y(D){var B=D._fullLayout,U=D.calcdata,V=[],q,z,H,G;function J(Y){return i(Y,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function le(){typeof G.calc=="function"?G.calc(D,H,q):(q._fillgradient=z.reversescale?g(z.colorscale):z.colorscale,q._zrange=[z[G.min],z[G.max]])}for(var ge=0;ge<U.length;ge++){var de=U[ge];if(H=de[0].trace,!!H._module){var me=H._module.colorbar;if(H.visible===!0&&me)for(var W=Array.isArray(me),ie=W?me:[me],se=0;se<ie.length;se++){G=ie[se];var ee=G.container;z=ee?H[ee]:H,z&&z.showscale&&(q=J(z.colorbar),q._id="cb"+H.uid+(W&&ee?"-"+ee:""),q._traceIndex=H.index,q._propPrefix=(ee?ee+".":"")+"colorbar.",q._meta=H._meta,le(),V.push(q))}}}for(var pe in B._colorAxes)if(z=B[pe],z.showscale){var oe=B._colorAxes[pe];q=J(z.colorbar),q._id="cb"+pe,q._propPrefix=pe+".colorbar.",q._meta=B._meta,G={min:"cmin",max:"cmax"},oe[0]!=="heatmap"&&(H=oe[1],G.calc=H._module.colorbar.calc),le(),V.push(q)}return V}function f(D,B,U){var V=B.orientation==="v",q=B.len,z=B.lenmode,H=B.thickness,G=B.thicknessmode,J=B.outlinewidth,le=B.borderwidth,ge=B.bgcolor,de=B.xanchor,me=B.yanchor,W=B.xpad,ie=B.ypad,se=B.x,ee=V?B.y:1-B.y,pe=B.yref==="paper",oe=B.xref==="paper",Y=U._fullLayout,ce=Y._size,ue=B._fillcolor,_e=B._line,Le=B.title,ze=Le.side,Xe=B._zrange||v.extent((typeof ue=="function"?ue:_e.color).domain()),Ve=typeof _e.color=="function"?_e.color:function(){return _e.color},rt=typeof ue=="function"?ue:function(){return ue},mt=B._levels,_t=x(U,B,Xe),vt=_t.fill,ut=_t.line,Fe=Math.round(H*(G==="fraction"?V?ce.w:ce.h:1)),Pe=Fe/(V?ce.w:ce.h),be=Math.round(q*(z==="fraction"?V?ce.h:ce.w:1)),Ye=be/(V?ce.h:ce.w),yt=oe?ce.w:U._fullLayout.width,wt=pe?ce.h:U._fullLayout.height,ht=Math.round(V?se*yt+W:ee*wt+ie),Yt={center:.5,right:1}[de]||0,$t={top:1,middle:.5}[me]||0,fr=V?se-Yt*Pe:ee-$t*Pe,mr=V?ee-$t*Ye:se-Yt*Ye,Ur=Math.round(V?wt*(1-mr):yt*mr);B._lenFrac=Ye,B._thickFrac=Pe,B._uFrac=fr,B._vFrac=mr;var jr=B._axis=N(U,B,Xe);jr.position=Pe+(V?se+W/ce.w:ee+ie/ce.h);var fn=["top","bottom"].indexOf(ze)!==-1;if(V&&fn&&(jr.title.side=ze,jr.titlex=se+W/ce.w,jr.titley=mr+(Le.side==="top"?Ye-ie/ce.h:ie/ce.h)),!V&&!fn&&(jr.title.side=ze,jr.titley=ee+ie/ce.h,jr.titlex=mr+W/ce.w),_e.color&&B.tickmode==="auto"){jr.tickmode="linear",jr.tick0=mt.start;var Br=mt.size,Qr=a.constrain(be/50,4,15)+1,Ot=(Xe[1]-Xe[0])/((B.nticks||Qr)*Br);if(Ot>1){var $e=Math.pow(10,Math.floor(Math.log(Ot)/Math.LN10));Br*=$e*a.roundUp(Ot/$e,[2,5,10]),(Math.abs(mt.start)/mt.size+1e-6)%1<2e-6&&(jr.tick0=0)}jr.dtick=Br}jr.domain=V?[mr+ie/ce.h,mr+Ye-ie/ce.h]:[mr+W/ce.w,mr+Ye-W/ce.w],jr.setScale(),D.attr("transform",l(Math.round(ce.l),Math.round(ce.t)));var ot=D.select("."+b.cbtitleunshift).attr("transform",l(-Math.round(ce.l),-Math.round(ce.t))),De=jr.ticklabelposition,Ee=jr.title.font.size,Ae=D.select("."+b.cbaxis),Ie,tt=0,st=0;function Bt(Mr,Sr){var Kr={propContainer:jr,propName:B._propPrefix+"title.text",traceIndex:B._traceIndex,_meta:B._meta,placeholder:Y._dfltTitle.colorbar,containerGroup:D.select("."+b.cbtitle)},Hn=Mr.charAt(0)==="h"?Mr.substr(1):"h"+Mr;D.selectAll("."+Hn+",."+Hn+"-math-group").remove(),d.draw(U,Mr,i(Kr,Sr||{}))}function Ft(){if(V&&fn||!V&&!fn){var Mr,Sr;ze==="top"&&(Mr=W+ce.l+yt*se,Sr=ie+ce.t+wt*(1-mr-Ye)+3+Ee*.75),ze==="bottom"&&(Mr=W+ce.l+yt*se,Sr=ie+ce.t+wt*(1-mr)-3-Ee*.25),ze==="right"&&(Sr=ie+ce.t+wt*ee+3+Ee*.75,Mr=W+ce.l+yt*mr),Bt(jr._id+"title",{attributes:{x:Mr,y:Sr,"text-anchor":V?"start":"middle"}})}}function Wt(){if(V&&!fn||!V&&fn){var Mr=jr.position||0,Sr=jr._offset+jr._length/2,Kr,Hn;if(ze==="right")Hn=Sr,Kr=ce.l+yt*Mr+10+Ee*(jr.showticklabels?1:.5);else if(Kr=Sr,ze==="bottom"&&(Hn=ce.t+wt*Mr+10+(De.indexOf("inside")===-1?jr.tickfont.size:0)+(jr.ticks!=="inside"&&B.ticklen||0)),ze==="top"){var ga=Le.text.split("<br>").length;Hn=ce.t+wt*Mr+10-Fe-T*Ee*ga}Bt((V?"h":"v")+jr._id+"title",{avoid:{selection:v.select(U).selectAll("g."+jr._id+"tick"),side:ze,offsetTop:V?0:ce.t,offsetLeft:V?ce.l:0,maxShift:V?Y.width:Y.height},attributes:{x:Kr,y:Hn,"text-anchor":"middle"},transform:{rotate:V?-90:0,offset:0}})}}function lr(){if(!V&&!fn||V&&fn){var Mr=D.select("."+b.cbtitle),Sr=Mr.select("text"),Kr=[-J/2,J/2],Hn=Mr.select(".h"+jr._id+"title-math-group").node(),ga=15.6;Sr.node()&&(ga=parseInt(Sr.node().style.fontSize,10)*T);var ua;if(Hn?(ua=o.bBox(Hn),st=ua.width,tt=ua.height,tt>ga&&(Kr[1]-=(tt-ga)/2)):Sr.node()&&!Sr.classed(b.jsPlaceholder)&&(ua=o.bBox(Sr.node()),st=ua.width,tt=ua.height),V){if(tt){if(tt+=5,ze==="top")jr.domain[1]-=tt/ce.h,Kr[1]*=-1;else{jr.domain[0]+=tt/ce.h;var Ta=h.lineCount(Sr);Kr[1]+=(1-Ta)*ga}Mr.attr("transform",l(Kr[0],Kr[1])),jr.setScale()}}else st&&(ze==="right"&&(jr.domain[0]+=(st+Ee/2)/ce.w),Mr.attr("transform",l(Kr[0],Kr[1])),jr.setScale())}D.selectAll("."+b.cbfills+",."+b.cblines).attr("transform",V?l(0,Math.round(ce.h*(1-jr.domain[1]))):l(Math.round(ce.w*jr.domain[0]),0)),Ae.attr("transform",V?l(0,Math.round(-ce.t)):l(Math.round(-ce.l),0));var Aa=D.select("."+b.cbfills).selectAll("rect."+b.cbfill).attr("style","").data(vt);Aa.enter().append("rect").classed(b.cbfill,!0).attr("style",""),Aa.exit().remove();var ia=Xe.map(jr.c2p).map(Math.round).sort(function(yr,br){return yr-br});Aa.each(function(yr,br){var an=[br===0?Xe[0]:(vt[br]+vt[br-1])/2,br===vt.length-1?Xe[1]:(vt[br]+vt[br+1])/2].map(jr.c2p).map(Math.round);V&&(an[1]=a.constrain(an[1]+(an[1]>an[0])?1:-1,ia[0],ia[1]));var wn=v.select(this).attr(V?"x":"y",ht).attr(V?"y":"x",v.min(an)).attr(V?"width":"height",Math.max(Fe,2)).attr(V?"height":"width",Math.max(v.max(an)-v.min(an),2));if(B._fillgradient)o.gradient(wn,U,B._id,V?"vertical":"horizontalreversed",B._fillgradient,"fill");else{var Ln=rt(yr).replace("e-","");wn.attr("fill",w(Ln).toHexString())}});var $a=D.select("."+b.cblines).selectAll("path."+b.cbline).data(_e.color&&_e.width?ut:[]);$a.enter().append("path").classed(b.cbline,!0),$a.exit().remove(),$a.each(function(yr){var br=ht,an=Math.round(jr.c2p(yr))+_e.width/2%1;v.select(this).attr("d","M"+(V?br+","+an:an+","+br)+(V?"h":"v")+Fe).call(o.lineGroupStyle,_e.width,Ve(yr),_e.dash)}),Ae.selectAll("g."+jr._id+"tick,path").remove();var ci=ht+Fe+(J||0)/2-(B.ticks==="outside"?1:0),_r=t.calcTicks(jr),Qt=t.getTickSigns(jr)[2];return t.drawTicks(U,jr,{vals:jr.ticks==="inside"?t.clipEnds(jr,_r):_r,layer:Ae,path:t.makeTickPath(jr,ci,Qt),transFn:t.makeTransTickFn(jr)}),t.drawLabels(U,jr,{vals:_r,layer:Ae,transFn:t.makeTransTickLabelFn(jr),labelFns:t.makeLabelFns(jr,ci)})}function Rr(){var Mr,Sr=Fe+J/2;De.indexOf("inside")===-1&&(Mr=o.bBox(Ae.node()),Sr+=V?Mr.width:Mr.height),Ie=ot.select("text");var Kr=0,Hn=V&&ze==="top",ga=!V&&ze==="right",ua=0;if(Ie.node()&&!Ie.classed(b.jsPlaceholder)){var Ta,Aa=ot.select(".h"+jr._id+"title-math-group").node();Aa&&(V&&fn||!V&&!fn)?(Mr=o.bBox(Aa),Kr=Mr.width,Ta=Mr.height):(Mr=o.bBox(ot.node()),Kr=Mr.right-ce.l-(V?ht:Ur),Ta=Mr.bottom-ce.t-(V?Ur:ht),!V&&ze==="top"&&(Sr+=Mr.height,ua=Mr.height)),ga&&(Ie.attr("transform",l(Kr/2+Ee/2,0)),Kr*=2),Sr=Math.max(Sr,V?Kr:Ta)}var ia=(V?W:ie)*2+Sr+le+J/2,$a=0;!V&&Le.text&&me==="bottom"&&ee<=0&&($a=ia/2,ia+=$a,ua+=$a),Y._hColorbarMoveTitle=$a,Y._hColorbarMoveCBTitle=ua;var ci=le+J,_r=(V?ht:Ur)-ci/2-(V?W:0),Qt=(V?Ur:ht)-(V?be:ie+ua-$a);D.select("."+b.cbbg).attr("x",_r).attr("y",Qt).attr(V?"width":"height",Math.max(ia-$a,2)).attr(V?"height":"width",Math.max(be+ci,2)).call(u.fill,ge).call(u.stroke,B.bordercolor).style("stroke-width",le);var yr=ga?Math.max(Kr-10,0):0;D.selectAll("."+b.cboutline).attr("x",(V?ht:Ur+W)+yr).attr("y",(V?Ur+ie-be:ht)+(Hn?tt:0)).attr(V?"width":"height",Math.max(Fe,2)).attr(V?"height":"width",Math.max(be-(V?2*ie+tt:2*W+yr),2)).call(u.stroke,B.outlinecolor).style({fill:"none","stroke-width":J});var br=V?Yt*ia:0,an=V?0:(1-$t)*ia-ua;if(br=oe?ce.l-br:-br,an=pe?ce.t-an:-an,D.attr("transform",l(br,an)),!V&&(le||w(ge).getAlpha()&&!w.equals(Y.paper_bgcolor,ge))){var wn=Ae.selectAll("text"),Ln=wn[0].length,Bn=D.select("."+b.cbbg).node(),xa=o.bBox(Bn),za=o.getTranslate(D),Ia=2;wn.each(function(rn,Wr){var tn=0,Tn=Ln-1;if(Wr===tn||Wr===Tn){var dn=o.bBox(this),It=o.getTranslate(this),xr;if(Wr===Tn){var Yr=dn.right+It.x,An=xa.right+za.x+Ur-le-Ia+se;xr=An-Yr,xr>0&&(xr=0)}else if(Wr===tn){var Zn=dn.left+It.x,sa=xa.left+za.x+Ur+le+Ia;xr=sa-Zn,xr<0&&(xr=0)}xr&&(Ln<3?this.setAttribute("transform","translate("+xr+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var Ba={},Ka=M[de],fa=k[de],Bi=M[me],Yi=k[me],Ht=ia-Fe;V?(z==="pixels"?(Ba.y=ee,Ba.t=be*Bi,Ba.b=be*Yi):(Ba.t=Ba.b=0,Ba.yt=ee+q*Bi,Ba.yb=ee-q*Yi),G==="pixels"?(Ba.x=se,Ba.l=ia*Ka,Ba.r=ia*fa):(Ba.l=Ht*Ka,Ba.r=Ht*fa,Ba.xl=se-H*Ka,Ba.xr=se+H*fa)):(z==="pixels"?(Ba.x=se,Ba.l=be*Ka,Ba.r=be*fa):(Ba.l=Ba.r=0,Ba.xl=se+q*Ka,Ba.xr=se-q*fa),G==="pixels"?(Ba.y=1-ee,Ba.t=ia*Bi,Ba.b=ia*Yi):(Ba.t=Ht*Bi,Ba.b=Ht*Yi,Ba.yt=ee-H*Bi,Ba.yb=ee+H*Yi));var kt=B.y<.5?"b":"t",qr=B.x<.5?"l":"r";U._fullLayout._reservedMargin[B._id]={};var en={r:Y.width-_r-br,l:_r+Ba.r,b:Y.height-Qt-an,t:Qt+Ba.b};oe&&pe?C.autoMargin(U,B._id,Ba):oe?U._fullLayout._reservedMargin[B._id][kt]=en[kt]:pe||V?U._fullLayout._reservedMargin[B._id][qr]=en[qr]:U._fullLayout._reservedMargin[B._id][kt]=en[kt]}return a.syncOrAsync([C.previousPromises,Ft,lr,Wt,C.previousPromises,Rr],U)}function p(D,B,U){var V=B.orientation==="v",q=U._fullLayout,z=q._size,H,G,J;r.init({element:D.node(),gd:U,prepFn:function(){H=D.attr("transform"),s(D)},moveFn:function(le,ge){D.attr("transform",H+l(le,ge)),G=r.align((V?B._uFrac:B._vFrac)+le/z.w,V?B._thickFrac:B._lenFrac,0,1,B.xanchor),J=r.align((V?B._vFrac:1-B._uFrac)-ge/z.h,V?B._lenFrac:B._thickFrac,0,1,B.yanchor);var de=r.getCursor(G,J,B.xanchor,B.yanchor);s(D,de)},doneFn:function(){if(s(D),G!==void 0&&J!==void 0){var le={};le[B._propPrefix+"x"]=G,le[B._propPrefix+"y"]=J,B._traceIndex!==void 0?P.call("_guiRestyle",U,le,B._traceIndex):P.call("_guiRelayout",U,le)}}})}function x(D,B,U){var V=B._levels,q=[],z=[],H,G,J=V.end+V.size/100,le=V.size,ge=1.001*U[0]-.001*U[1],de=1.001*U[1]-.001*U[0];for(G=0;G<1e5&&(H=V.start+G*le,!(le>0?H>=J:H<=J));G++)H>ge&&H<de&&q.push(H);if(B._fillgradient)z=[0];else if(typeof B._fillcolor=="function"){var me=B._filllevels;if(me)for(J=me.end+me.size/100,le=me.size,G=0;G<1e5&&(H=me.start+G*le,!(le>0?H>=J:H<=J));G++)H>U[0]&&H<U[1]&&z.push(H);else z=q.map(function(W){return W-V.size/2}),z.push(z[z.length-1]+V.size)}else B._fillcolor&&typeof B._fillcolor=="string"&&(z=[0]);return V.size<0&&(q.reverse(),z.reverse()),{line:q,fill:z}}function N(D,B,U){var V=D._fullLayout,q=B.orientation==="v",z={type:"linear",range:U,tickmode:B.tickmode,nticks:B.nticks,tick0:B.tick0,dtick:B.dtick,tickvals:B.tickvals,ticktext:B.ticktext,ticks:B.ticks,ticklen:B.ticklen,tickwidth:B.tickwidth,tickcolor:B.tickcolor,showticklabels:B.showticklabels,labelalias:B.labelalias,ticklabelposition:B.ticklabelposition,ticklabeloverflow:B.ticklabeloverflow,ticklabelstep:B.ticklabelstep,tickfont:B.tickfont,tickangle:B.tickangle,tickformat:B.tickformat,exponentformat:B.exponentformat,minexponent:B.minexponent,separatethousands:B.separatethousands,showexponent:B.showexponent,showtickprefix:B.showtickprefix,tickprefix:B.tickprefix,showticksuffix:B.showticksuffix,ticksuffix:B.ticksuffix,title:B.title,showline:!0,anchor:"free",side:q?"right":"bottom",position:1},H=q?"y":"x",G={type:"linear",_id:H+B._id},J={letter:H,font:V.font,noAutotickangles:H==="y",noHover:!0,noTickson:!0,noTicklabelmode:!0,noInsideRange:!0,calendar:V.calendar};function le(ge,de){return a.coerce(z,G,c,ge,de)}return m(z,G,le,J,V),E(z,G,le,J),G}Z.exports={draw:A}}}),PA=Ne({"src/components/colorbar/index.js"(te,Z){Z.exports={moduleType:"component",name:"colorbar",attributes:Tx(),supplyDefaults:Iw(),draw:kA().draw,hasColorbar:tA()}}}),Bx=Ne({"src/components/legend/index.js"(te,Z){Z.exports={moduleType:"component",name:"legend",layoutAttributes:oM(),supplyLayoutDefaults:sM(),draw:fM(),style:cM()}}}),jx=Ne({"src/locale-en.js"(te,Z){Z.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"}}}}),OM=Ne({"src/locale-en-us.js"(te,Z){Z.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}}}),LA=Ne({"src/snapshot/cloneplot.js"(te,Z){var v=Yo(),w=In(),C=w.extendFlat,P=w.extendDeep;function t(a){var l;switch(a){case"themes__thumb":l={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":l={title:{text:""},hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:l={}}return l}function r(a){var l=["xaxis","yaxis","zaxis"];return l.indexOf(a.slice(0,5))>-1}Z.exports=function(l,i){var s,o=l.data,u=l.layout,d=P([],o),h=P({},u,t(i.tileClass)),g=l._context||{};if(i.width&&(h.width=i.width),i.height&&(h.height=i.height),i.tileClass==="thumbnail"||i.tileClass==="themes__thumb"){h.annotations=[];var m=Object.keys(h);for(s=0;s<m.length;s++)r(m[s])&&(h[m[s]].title={text:""});for(s=0;s<d.length;s++){var E=d[s];E.showscale=!1,E.marker&&(E.marker.showscale=!1),v.traceIs(E,"pie-like")&&(E.textposition="none")}}if(Array.isArray(i.annotations))for(s=0;s<i.annotations.length;s++)h.annotations.push(i.annotations[s]);var c=Object.keys(h).filter(function(b){return b.match(/^scene\d*$/)});if(c.length){var _={};for(i.tileClass==="thumbnail"&&(_={title:{text:""},showaxeslabels:!1,showticklabels:!1,linetickenable:!1}),s=0;s<c.length;s++){var T=h[c[s]];T.xaxis||(T.xaxis={}),T.yaxis||(T.yaxis={}),T.zaxis||(T.zaxis={}),C(T.xaxis,_),C(T.yaxis,_),C(T.zaxis,_),T._scene=null}}var M=document.createElement("div");i.tileClass&&(M.className=i.tileClass);var k={gd:M,td:M,layout:h,data:d,config:{staticPlot:i.staticPlot===void 0?!0:i.staticPlot,plotGlPixelRatio:i.plotGlPixelRatio===void 0?2:i.plotGlPixelRatio,displaylogo:i.displaylogo||!1,showLink:i.showLink||!1,showTips:i.showTips||!1,mapboxAccessToken:g.mapboxAccessToken}};return i.setBackground!=="transparent"&&(k.config.setBackground=i.setBackground||"opaque"),k.gd.defaultLayout=t(i.tileClass),k}}}),K1=Ne({"src/snapshot/toimage.js"(te,Z){var v=B0().EventEmitter,w=Yo(),C=In(),P=o0(),t=LA(),r=Gp(),a=q1();function l(i,s){var o=new v,u=t(i,{format:"png"}),d=u.gd;d.style.position="absolute",d.style.left="-5000px",document.body.appendChild(d);function h(){var m=P.getDelay(d._fullLayout);setTimeout(function(){var E=r(d),c=document.createElement("canvas");c.id=C.randstr(),o=a({format:s.format,width:d._fullLayout.width,height:d._fullLayout.height,canvas:c,emitter:o,svg:E}),o.clean=function(){d&&document.body.removeChild(d)}},m)}var g=P.getRedrawFunc(d);return w.call("_doPlot",d,u.data,u.layout,u.config).then(g).then(h).catch(function(m){o.emit("error",m)}),o}Z.exports=l}}),Qw=Ne({"src/snapshot/index.js"(te,Z){var v=o0(),w={getDelay:v.getDelay,getRedrawFunc:v.getRedrawFunc,clone:LA(),toSVG:Gp(),svgToImg:q1(),toImage:K1(),downloadImage:Px()};Z.exports=w}}),zM=Ne({"src/core.js"(te){te.version=cn().version,$n(),AL();var Z=Yo(),v=te.register=Z.register,w=mA(),C=Object.keys(w);for(t=0;t<C.length;t++)P=C[t],P.charAt(0)!=="_"&&(te[P]=w[P]),v({moduleType:"apiMethod",name:P,fn:w[P]});var P,t;v(MM()),v([Pg(),Iy(),dh(),UL(),Ix(),VL(),LM(),zy(),Nx(),EA(),Og(),Nc(),PA(),Bx(),oh(),hA()]),v([jx(),OM()]),window.PlotlyLocales&&Array.isArray(window.PlotlyLocales)&&(v(window.PlotlyLocales),delete window.PlotlyLocales),te.Icons=zw();var r=oh(),a=ff();te.Plots={resize:a.resize,graphJson:a.graphJson,sendDataToCloud:a.sendDataToCloud},te.Fx={hover:r.hover,unhover:r.unhover,loneHover:r.loneHover,loneUnhover:r.loneUnhover},te.Snapshot=Qw(),te.PlotSchema=B1()}}),RA=Ne({"lib/core.js"(te,Z){Z.exports=zM()}}),zg=Ne({"src/traces/bar/constants.js"(te,Z){Z.exports={TEXTPAD:3,eventDataKeys:["value","label"]}}}),id=Ne({"src/traces/bar/attributes.js"(te,Z){var v=tf(),w=Ac().axisHoverFormat,{hovertemplateAttrs:C,texttemplateAttrs:P,templatefallbackAttrs:t}=Fl(),r=Wu(),a=bo(),l=zg(),i=Fd().pattern,s=fi().extendFlat,o=a({editType:"calc",arrayOk:!0,colorEditType:"style"}),u=v.marker,d=u.line,h=s({},d.width,{dflt:0}),g=s({width:h,editType:"calc"},r("marker.line")),m=s({line:g,editType:"calc"},r("marker"),{opacity:{valType:"number",arrayOk:!0,dflt:1,min:0,max:1,editType:"style"},pattern:i,cornerradius:{valType:"any",editType:"calc"}});Z.exports={x:v.x,x0:v.x0,dx:v.dx,y:v.y,y0:v.y0,dy:v.dy,xperiod:v.xperiod,yperiod:v.yperiod,xperiod0:v.xperiod0,yperiod0:v.yperiod0,xperiodalignment:v.xperiodalignment,yperiodalignment:v.yperiodalignment,xhoverformat:w("x"),yhoverformat:w("y"),text:v.text,texttemplate:P({editType:"plot"},{keys:l.eventDataKeys}),texttemplatefallback:t({editType:"plot"}),hovertext:v.hovertext,hovertemplate:C({},{keys:l.eventDataKeys}),hovertemplatefallback:t(),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:s({},o,{}),insidetextfont:s({},o,{}),outsidetextfont:s({},o,{}),constraintext:{valType:"enumerated",values:["inside","outside","both","none"],dflt:"both",editType:"calc"},cliponaxis:s({},v.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:m,offsetgroup:v.offsetgroup,alignmentgroup:v.alignmentgroup,selected:{marker:{opacity:v.selected.marker.opacity,color:v.selected.marker.color,editType:"style"},textfont:v.selected.textfont,editType:"style"},unselected:{marker:{opacity:v.unselected.marker.opacity,color:v.unselected.marker.color,editType:"style"},textfont:v.unselected.textfont,editType:"style"},zorder:v.zorder}}}),pp=Ne({"src/traces/bar/layout_attributes.js"(te,Z){Z.exports={barmode:{valType:"enumerated",values:["stack","group","overlay","relative"],dflt:"group",editType:"calc"},barnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},bargap:{valType:"number",min:0,max:1,editType:"calc"},bargroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},barcornerradius:{valType:"any",editType:"calc"}}}}),l0=Ne({"src/traces/bar/style_defaults.js"(te,Z){var v=Ha(),w=Bd().hasColorscale,C=Rh(),P=In().coercePattern;Z.exports=function(r,a,l,i,s){var o=l("marker.color",i),u=w(r,"marker");u&&C(r,a,s,l,{prefix:"marker.",cLetter:"c"}),l("marker.line.color",v.defaultLine),w(r,"marker.line")&&C(r,a,s,l,{prefix:"marker.line.",cLetter:"c"}),l("marker.line.width"),l("marker.opacity"),P(l,"marker.pattern",o,u),l("selected.marker.color"),l("unselected.marker.color")}}}),mp=Ne({"src/traces/bar/defaults.js"(te,Z){var v=Fn(),w=In(),C=Ha(),P=Yo(),t=Lm(),r=Rm(),a=l0(),l=U0(),i=id(),s=w.coerceFont;function o(g,m,E,c){function _(A,y){return w.coerce(g,m,i,A,y)}var T=t(g,m,c,_);if(!T){m.visible=!1;return}r(g,m,c,_),_("xhoverformat"),_("yhoverformat"),_("zorder"),_("orientation",m.x&&!m.y?"h":"v"),_("base"),_("offset"),_("width"),_("text"),_("hovertext"),_("hovertemplate"),_("hovertemplatefallback");var M=_("textposition");h(g,m,c,_,M,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),a(g,m,_,E,c);var k=(m.marker.line||{}).color,b=P.getComponentMethod("errorbars","supplyDefaults");b(g,m,k||C.defaultLine,{axis:"y"}),b(g,m,k||C.defaultLine,{axis:"x",inherit:"y"}),w.coerceSelectionMarkerOpacity(m,_)}function u(g,m){var E,c;function _(k,b){return w.coerce(c._input,c,i,k,b)}for(var T=0;T<g.length;T++)if(c=g[T],c.type==="bar"){E=c._input;var M=_("marker.cornerradius",m.barcornerradius);c.marker&&(c.marker.cornerradius=d(M)),l(E,c,m,_,m.barmode)}}function d(g){if(v(g)){if(g=+g,g>=0)return g}else if(typeof g=="string"&&(g=g.trim(),g.slice(-1)==="%"&&v(g.slice(0,-1))&&(g=+g.slice(0,-1),g>=0)))return g+"%"}function h(g,m,E,c,_,T){T=T||{};var M=T.moduleHasSelected!==!1,k=T.moduleHasUnselected!==!1,b=T.moduleHasConstrain!==!1,A=T.moduleHasCliponaxis!==!1,y=T.moduleHasTextangle!==!1,f=T.moduleHasInsideanchor!==!1,p=!!T.hasPathbar,x=Array.isArray(_)||_==="auto",N=x||_==="inside",D=x||_==="outside";if(N||D){var B=s(c,"textfont",E.font),U=w.extendFlat({},B),V=g.textfont&&g.textfont.color,q=!V;if(q&&delete U.color,s(c,"insidetextfont",U),p){var z=w.extendFlat({},B);q&&delete z.color,s(c,"pathbar.textfont",z)}D&&s(c,"outsidetextfont",B),M&&c("selected.textfont.color"),k&&c("unselected.textfont.color"),b&&c("constraintext"),A&&c("cliponaxis"),y&&c("textangle"),c("texttemplate"),c("texttemplatefallback")}N&&f&&c("insidetextanchor")}Z.exports={supplyDefaults:o,crossTraceDefaults:u,handleText:h,validateCornerradius:d}}}),IA=Ne({"src/traces/bar/layout_defaults.js"(te,Z){var v=Yo(),w=Os(),C=In(),P=pp(),t=mp().validateCornerradius;Z.exports=function(r,a,l){function i(M,k){return C.coerce(r,a,P,M,k)}for(var s=!1,o=!1,u=!1,d={},h=i("barmode"),g=h==="group",m=0;m<l.length;m++){var E=l[m];if(v.traceIs(E,"bar")&&E.visible)s=!0;else continue;var c=E.xaxis+E.yaxis;if(g?(d[c]&&(u=!0),d[c]=!0):(c+=E._input.offsetgroup,d.length>0&&!d[c]&&(u=!0),d[c]=!0),E.visible&&E.type==="histogram"){var _=w.getFromId({_fullLayout:a},E[E.orientation==="v"?"xaxis":"yaxis"]);_.type!=="category"&&(o=!0)}}if(!s){delete a.barmode;return}h!=="overlay"&&i("barnorm"),i("bargap",o&&!u?0:.2),i("bargroupgap");var T=i("barcornerradius");a.barcornerradius=t(T)}}}),Nm=Ne({"src/traces/bar/arrays_to_calcdata.js"(te,Z){var v=In();Z.exports=function(C,P){for(var t=0;t<C.length;t++)C[t].i=t;v.mergeArray(P.text,C,"tx"),v.mergeArray(P.hovertext,C,"htx");var r=P.marker;if(r){v.mergeArray(r.opacity,C,"mo",!0),v.mergeArray(r.color,C,"mc");var a=r.line;a&&(v.mergeArray(a.color,C,"mlc"),v.mergeArrayCastPositive(a.width,C,"mlw"))}}}}),Kp=Ne({"src/traces/bar/calc.js"(te,Z){var v=Os(),w=Dm(),C=Bd().hasColorscale,P=Ud(),t=Nm(),r=Gh();Z.exports=function(l,i){var s=v.getFromId(l,i.xaxis||"x"),o=v.getFromId(l,i.yaxis||"y"),u,d,h,g,m,E,c={msUTC:!!(i.base||i.base===0)};i.orientation==="h"?(u=s.makeCalcdata(i,"x",c),h=o.makeCalcdata(i,"y"),g=w(i,o,"y",h),m=!!i.yperiodalignment,E="y"):(u=o.makeCalcdata(i,"y",c),h=s.makeCalcdata(i,"x"),g=w(i,s,"x",h),m=!!i.xperiodalignment,E="x"),d=g.vals;for(var _=Math.min(d.length,u.length),T=new Array(_),M=0;M<_;M++)T[M]={p:d[M],s:u[M]},m&&(T[M].orig_p=h[M],T[M][E+"End"]=g.ends[M],T[M][E+"Start"]=g.starts[M]),i.ids&&(T[M].id=String(i.ids[M]));return C(i,"marker")&&P(l,i,{vals:i.marker.color,containerStr:"marker",cLetter:"c"}),C(i,"marker.line")&&P(l,i,{vals:i.marker.line.color,containerStr:"marker.line",cLetter:"c"}),t(T,i),r(T,i),T}}}),_c=Ne({"src/traces/bar/uniform_text.js"(te,Z){var v=xn(),w=In();function C(a,l,i){var s=a._fullLayout,o=s["_"+i+"Text_minsize"];if(o){var u=s.uniformtext.mode==="hide",d;switch(i){case"funnelarea":case"pie":case"sunburst":d="g.slice";break;case"treemap":case"icicle":d="g.slice, g.pathbar";break;default:d="g.points > g.point"}l.selectAll(d).each(function(h){var g=h.transform;if(g){g.scale=u&&g.hide?0:o/g.fontSize;var m=v.select(this).select("text");w.setTransormAndDisplay(m,g)}})}}function P(a,l,i){if(i.uniformtext.mode){var s=r(a),o=i.uniformtext.minsize,u=l.scale*l.fontSize;l.hide=u<o,i[s]=i[s]||1/0,l.hide||(i[s]=Math.min(i[s],Math.max(u,o)))}}function t(a,l){var i=r(a);l[i]=void 0}function r(a){return"_"+a+"Text_minsize"}Z.exports={recordMinTextSize:P,clearMinTextSize:t,resizeText:C}}}),J1=Ne({"src/traces/bar/helpers.js"(te){var Z=Fn(),v=to(),w=In().isArrayOrTypedArray;te.coerceString=function(C,P,t){if(typeof P=="string"){if(P||!C.noBlank)return P}else if((typeof P=="number"||P===!0)&&!C.strict)return String(P);return t!==void 0?t:C.dflt},te.coerceNumber=function(C,P,t){if(Z(P)){P=+P;var r=C.min,a=C.max,l=r!==void 0&&P<r||a!==void 0&&P>a;if(!l)return P}return t!==void 0?t:C.dflt},te.coerceColor=function(C,P,t){return v(P).isValid()?P:t!==void 0?t:C.dflt},te.coerceEnumerated=function(C,P,t){return C.coerceNumber&&(P=+P),C.values.indexOf(P)!==-1?P:t!==void 0?t:C.dflt},te.getValue=function(C,P){var t;return w(C)?P<C.length&&(t=C[P]):t=C,t},te.getLineWidth=function(C,P){var t=0<P.mlw?P.mlw:w(C.marker.line.width)?0:C.marker.line.width;return t}}}),qd=Ne({"src/traces/bar/style.js"(te,Z){var v=xn(),w=Ha(),C=zs(),P=In(),t=Yo(),r=_c().resizeText,a=id(),l=a.textfont,i=a.insidetextfont,s=a.outsidetextfont,o=J1();function u(A){var y=v.select(A).selectAll('g[class^="barlayer"]').selectAll("g.trace");r(A,y,"bar");var f=y.size(),p=A._fullLayout;y.style("opacity",function(x){return x[0].trace.opacity}).each(function(x){(p.barmode==="stack"&&f>1||p.bargap===0&&p.bargroupgap===0&&!x[0].trace.marker.line.width)&&v.select(this).attr("shape-rendering","crispEdges")}),y.selectAll("g.points").each(function(x){var N=v.select(this),D=x[0].trace;d(N,D,A)}),t.getComponentMethod("errorbars","style")(y)}function d(A,y,f){C.pointStyle(A.selectAll("path"),y,f),h(A,y,f)}function h(A,y,f){A.selectAll("text").each(function(p){var x=v.select(this),N=P.ensureUniformFontSize(f,c(x,p,y,f));C.font(x,N)})}function g(A,y,f){var p=y[0].trace;p.selectedpoints?m(f,p,A):(d(f,p,A),t.getComponentMethod("errorbars","style")(f))}function m(A,y,f){C.selectedPointStyle(A.selectAll("path"),y),E(A.selectAll("text"),y,f)}function E(A,y,f){A.each(function(p){var x=v.select(this),N;if(p.selected){N=P.ensureUniformFontSize(f,c(x,p,y,f));var D=y.selected.textfont&&y.selected.textfont.color;D&&(N.color=D),C.font(x,N)}else C.selectedTextStyle(x,y)})}function c(A,y,f,p){var x=p._fullLayout.font,N=f.textfont;if(A.classed("bartext-inside")){var D=b(y,f);N=T(f,y.i,x,D)}else A.classed("bartext-outside")&&(N=M(f,y.i,x));return N}function _(A,y,f){return k(l,A.textfont,y,f)}function T(A,y,f,p){var x=_(A,y,f),N=A._input.textfont===void 0||A._input.textfont.color===void 0||Array.isArray(A.textfont.color)&&A.textfont.color[y]===void 0;return N&&(x={color:w.contrast(p),family:x.family,size:x.size,weight:x.weight,style:x.style,variant:x.variant,textcase:x.textcase,lineposition:x.lineposition,shadow:x.shadow}),k(i,A.insidetextfont,y,x)}function M(A,y,f){var p=_(A,y,f);return k(s,A.outsidetextfont,y,p)}function k(A,y,f,p){y=y||{};var x=o.getValue(y.family,f),N=o.getValue(y.size,f),D=o.getValue(y.color,f),B=o.getValue(y.weight,f),U=o.getValue(y.style,f),V=o.getValue(y.variant,f),q=o.getValue(y.textcase,f),z=o.getValue(y.lineposition,f),H=o.getValue(y.shadow,f);return{family:o.coerceString(A.family,x,p.family),size:o.coerceNumber(A.size,N,p.size),color:o.coerceColor(A.color,D,p.color),weight:o.coerceString(A.weight,B,p.weight),style:o.coerceString(A.style,U,p.style),variant:o.coerceString(A.variant,V,p.variant),textcase:o.coerceString(A.variant,q,p.textcase),lineposition:o.coerceString(A.variant,z,p.lineposition),shadow:o.coerceString(A.variant,H,p.shadow)}}function b(A,y){return y.type==="waterfall"?y[A.dir].marker.color:A.mcc||A.mc||y.marker.color}Z.exports={style:u,styleTextPoints:h,styleOnSelect:g,getInsideTextFont:T,getOutsideTextFont:M,getBarColor:b,resizeText:r}}}),mu=Ne({"src/traces/bar/plot.js"(te,Z){var v=xn(),w=Fn(),C=In(),P=hc(),t=Ha(),r=zs(),a=Yo(),l=Os().tickText,i=_c(),s=i.recordMinTextSize,o=i.clearMinTextSize,u=qd(),d=J1(),h=zg(),g=id(),m=g.text,E=g.textposition,c=bv().appendArrayPointValue,_=h.TEXTPAD;function T(le){return le.id}function M(le){if(le.ids)return T}function k(le){return(le>0)-(le<0)}function b(le,ge){return le<ge?1:-1}function A(le,ge,de,me){var W=[],ie=[],se=me?ge:de,ee=me?de:ge;return W[0]=se.c2p(le.s0,!0),ie[0]=ee.c2p(le.p0,!0),W[1]=se.c2p(le.s1,!0),ie[1]=ee.c2p(le.p1,!0),me?[W,ie]:[ie,W]}function y(le,ge,de,me){if(!ge.uniformtext.mode&&f(de)){var W;return me&&(W=me()),le.transition().duration(de.duration).ease(de.easing).each("end",function(){W&&W()}).each("interrupt",function(){W&&W()})}else return le}function f(le){return le&&le.duration>0}function p(le,ge,de,me,W,ie){var se=ge.xaxis,ee=ge.yaxis,pe=le._fullLayout,oe=le._context.staticPlot;W||(W={mode:pe.barmode,norm:pe.barmode,gap:pe.bargap,groupgap:pe.bargroupgap},o("bar",pe));var Y=C.makeTraceGroups(me,de,"trace bars").each(function(ce){var ue=v.select(this),_e=ce[0].trace,Le=ce[0].t,ze=_e.type==="waterfall",Xe=_e.type==="funnel",Ve=_e.type==="histogram",rt=_e.type==="bar",mt=rt||Xe,_t=0;ze&&_e.connector.visible&&_e.connector.mode==="between"&&(_t=_e.connector.line.width/2);var vt=_e.orientation==="h",ut=f(W),Fe=C.ensureSingle(ue,"g","points"),Pe=M(_e),be=Fe.selectAll("g.point").data(C.identity,Pe);be.enter().append("g").classed("point",!0),be.exit().remove(),be.each(function(yt,wt){var ht=v.select(this),Yt=A(yt,se,ee,vt),$t=Yt[0][0],fr=Yt[0][1],mr=Yt[1][0],Ur=Yt[1][1],jr=(vt?fr-$t:Ur-mr)===0;jr&&mt&&d.getLineWidth(_e,yt)&&(jr=!1),jr||(jr=!w($t)||!w(fr)||!w(mr)||!w(Ur)),yt.isBlank=jr,jr&&(vt?fr=$t:Ur=mr),_t&&!jr&&(vt?($t-=b($t,fr)*_t,fr+=b($t,fr)*_t):(mr-=b(mr,Ur)*_t,Ur+=b(mr,Ur)*_t));var fn,Br;if(_e.type==="waterfall"){if(!jr){var Qr=_e[yt.dir].marker;fn=Qr.line.width,Br=Qr.color}}else fn=d.getLineWidth(_e,yt),Br=yt.mc||_e.marker.color;function Ot(ci){var _r=v.round(fn/2%1,2);return W.gap===0&&W.groupgap===0?v.round(Math.round(ci)-_r,2):ci}function $e(ci,_r,Qt){return Qt&&ci===_r?ci:Math.abs(ci-_r)>=2?Ot(ci):ci>_r?Math.ceil(ci):Math.floor(ci)}var ot=t.opacity(Br),De=ot<1||fn>.01?Ot:$e;le._context.staticPlot||($t=De($t,fr,vt),fr=De(fr,$t,vt),mr=De(mr,Ur,!vt),Ur=De(Ur,mr,!vt));var Ee=vt?se.c2p:ee.c2p,Ae;yt.s0>0?Ae=yt._sMax:yt.s0<0?Ae=yt._sMin:Ae=yt.s1>0?yt._sMax:yt._sMin;function Ie(ci,_r){if(!ci)return 0;var Qt=Math.abs(vt?Ur-mr:fr-$t),yr=Math.abs(vt?fr-$t:Ur-mr),br=De(Math.abs(Ee(Ae,!0)-Ee(0,!0))),an=yt.hasB?Math.min(Qt/2,yr/2):Math.min(Qt/2,br),wn;if(_r==="%"){var Ln=Math.min(50,ci);wn=Qt*(Ln/100)}else wn=ci;return De(Math.max(Math.min(wn,an),0))}var tt=rt||Ve?Ie(Le.cornerradiusvalue,Le.cornerradiusform):0,st,Bt,Ft="M"+$t+","+mr+"V"+Ur+"H"+fr+"V"+mr+"Z",Wt=0;if(tt&&yt.s){var lr=k(yt.s0)===0||k(yt.s)===k(yt.s0)?yt.s1:yt.s0;if(Wt=De(yt.hasB?0:Math.abs(Ee(Ae,!0)-Ee(lr,!0))),Wt<tt){var Rr=b($t,fr),Mr=b(mr,Ur),Sr=Rr===-Mr?1:0;if(vt)if(yt.hasB)st="M"+($t+tt*Rr)+","+mr+"A "+tt+","+tt+" 0 0 "+Sr+" "+$t+","+(mr+tt*Mr)+"V"+(Ur-tt*Mr)+"A "+tt+","+tt+" 0 0 "+Sr+" "+($t+tt*Rr)+","+Ur+"H"+(fr-tt*Rr)+"A "+tt+","+tt+" 0 0 "+Sr+" "+fr+","+(Ur-tt*Mr)+"V"+(mr+tt*Mr)+"A "+tt+","+tt+" 0 0 "+Sr+" "+(fr-tt*Rr)+","+mr+"Z";else{Bt=Math.abs(fr-$t)+Wt;var Kr=Bt<tt?tt-Math.sqrt(Bt*(2*tt-Bt)):0,Hn=Wt>0?Math.sqrt(Wt*(2*tt-Wt)):0,ga=Rr>0?Math.max:Math.min;st="M"+$t+","+mr+"V"+(Ur-Kr*Mr)+"H"+ga(fr-(tt-Wt)*Rr,$t)+"A "+tt+","+tt+" 0 0 "+Sr+" "+fr+","+(Ur-tt*Mr-Hn)+"V"+(mr+tt*Mr+Hn)+"A "+tt+","+tt+" 0 0 "+Sr+" "+ga(fr-(tt-Wt)*Rr,$t)+","+(mr+Kr*Mr)+"Z"}else if(yt.hasB)st="M"+($t+tt*Rr)+","+mr+"A "+tt+","+tt+" 0 0 "+Sr+" "+$t+","+(mr+tt*Mr)+"V"+(Ur-tt*Mr)+"A "+tt+","+tt+" 0 0 "+Sr+" "+($t+tt*Rr)+","+Ur+"H"+(fr-tt*Rr)+"A "+tt+","+tt+" 0 0 "+Sr+" "+fr+","+(Ur-tt*Mr)+"V"+(mr+tt*Mr)+"A "+tt+","+tt+" 0 0 "+Sr+" "+(fr-tt*Rr)+","+mr+"Z";else{Bt=Math.abs(Ur-mr)+Wt;var ua=Bt<tt?tt-Math.sqrt(Bt*(2*tt-Bt)):0,Ta=Wt>0?Math.sqrt(Wt*(2*tt-Wt)):0,Aa=Mr>0?Math.max:Math.min;st="M"+($t+ua*Rr)+","+mr+"V"+Aa(Ur-(tt-Wt)*Mr,mr)+"A "+tt+","+tt+" 0 0 "+Sr+" "+($t+tt*Rr-Ta)+","+Ur+"H"+(fr-tt*Rr+Ta)+"A "+tt+","+tt+" 0 0 "+Sr+" "+(fr-ua*Rr)+","+Aa(Ur-(tt-Wt)*Mr,mr)+"V"+mr+"Z"}}else st=Ft}else st=Ft;var ia=y(C.ensureSingle(ht,"path"),pe,W,ie);if(ia.style("vector-effect",oe?"none":"non-scaling-stroke").attr("d",isNaN((fr-$t)*(Ur-mr))||jr&&le._context.staticPlot?"M0,0Z":st).call(r.setClipUrl,ge.layerClipId,le),!pe.uniformtext.mode&&ut){var $a=r.makePointStyleFns(_e);r.singlePointStyle(yt,ia,_e,$a,le)}x(le,ge,ht,ce,wt,$t,fr,mr,Ur,tt,Wt,W,ie),ge.layerClipId&&r.hideOutsideRangePoint(yt,ht.select("text"),se,ee,_e.xcalendar,_e.ycalendar)});var Ye=_e.cliponaxis===!1;r.setClipUrl(ue,Ye?null:ge.layerClipId,le)});a.getComponentMethod("errorbars","plot")(le,Y,ge,W)}function x(le,ge,de,me,W,ie,se,ee,pe,oe,Y,ce,ue){var _e=ge.xaxis,Le=ge.yaxis,ze=le._fullLayout,Xe;function Ve(Bt,Ft,Wt){var lr=C.ensureSingle(Bt,"text").text(Ft).attr({class:"bartext bartext-"+Xe,"text-anchor":"middle","data-notex":1}).call(r.font,Wt).call(P.convertToTspans,le);return lr}var rt=me[0].trace,mt=rt.orientation==="h",_t=z(ze,me,W,_e,Le);Xe=H(rt,W);var vt=ce.mode==="stack"||ce.mode==="relative",ut=me[W],Fe=!vt||ut._outmost,Pe=ut.hasB,be=oe&&oe-Y>_;if(!_t||Xe==="none"||(ut.isBlank||ie===se||ee===pe)&&(Xe==="auto"||Xe==="inside")){de.select("text").remove();return}var Ye=ze.font,yt=u.getBarColor(me[W],rt),wt=u.getInsideTextFont(rt,W,Ye,yt),ht=u.getOutsideTextFont(rt,W,Ye),Yt=rt.insidetextanchor||"end",$t=de.datum();mt?_e.type==="log"&&$t.s0<=0&&(_e.range[0]<_e.range[1]?ie=0:ie=_e._length):Le.type==="log"&&$t.s0<=0&&(Le.range[0]<Le.range[1]?ee=Le._length:ee=0);var fr=Math.abs(se-ie),mr=Math.abs(pe-ee),Ur=fr-2*_,jr=mr-2*_,fn,Br,Qr,Ot,$e;if(Xe==="outside"&&!Fe&&!ut.hasB&&(Xe="inside"),Xe==="auto")if(Fe){Xe="inside",$e=C.ensureUniformFontSize(le,wt),fn=Ve(de,_t,$e),Br=r.bBox(fn.node()),Qr=Br.width,Ot=Br.height;var ot=Qr>0&&Ot>0,De;be?Pe?De=N(Ur-2*oe,jr,Qr,Ot,mt)||N(Ur,jr-2*oe,Qr,Ot,mt):mt?De=N(Ur-(oe-Y),jr,Qr,Ot,mt)||N(Ur,jr-2*(oe-Y),Qr,Ot,mt):De=N(Ur,jr-(oe-Y),Qr,Ot,mt)||N(Ur-2*(oe-Y),jr,Qr,Ot,mt):De=N(Ur,jr,Qr,Ot,mt),ot&&De?Xe="inside":(Xe="outside",fn.remove(),fn=null)}else Xe="inside";if(!fn){$e=C.ensureUniformFontSize(le,Xe==="outside"?ht:wt),fn=Ve(de,_t,$e);var Ee=fn.attr("transform");if(fn.attr("transform",""),Br=r.bBox(fn.node()),Qr=Br.width,Ot=Br.height,fn.attr("transform",Ee),Qr<=0||Ot<=0){fn.remove();return}}var Ae=rt.textangle,Ie,tt;Xe==="outside"?(tt=rt.constraintext==="both"||rt.constraintext==="outside",Ie=q(ie,se,ee,pe,Br,{isHorizontal:mt,constrained:tt,angle:Ae})):(tt=rt.constraintext==="both"||rt.constraintext==="inside",Ie=U(ie,se,ee,pe,Br,{isHorizontal:mt,constrained:tt,angle:Ae,anchor:Yt,hasB:Pe,r:oe,overhead:Y})),Ie.fontSize=$e.size,s(rt.type==="histogram"?"bar":rt.type,Ie,ze),ut.transform=Ie;var st=y(fn,ze,ce,ue);C.setTransormAndDisplay(st,Ie)}function N(le,ge,de,me,W){if(le<0||ge<0)return!1;var ie=de<=le&&me<=ge,se=de<=ge&&me<=le,ee=W?le>=de*(ge/me):ge>=me*(le/de);return ie||se||ee}function D(le){return le==="auto"?0:le}function B(le,ge){var de=Math.PI/180*ge,me=Math.abs(Math.sin(de)),W=Math.abs(Math.cos(de));return{x:le.width*W+le.height*me,y:le.width*me+le.height*W}}function U(le,ge,de,me,W,ie){var se=!!ie.isHorizontal,ee=!!ie.constrained,pe=ie.angle||0,oe=ie.anchor,Y=oe==="end",ce=oe==="start",ue=ie.leftToRight||0,_e=(ue+1)/2,Le=1-_e,ze=ie.hasB,Xe=ie.r,Ve=ie.overhead,rt=W.width,mt=W.height,_t=Math.abs(ge-le),vt=Math.abs(me-de),ut=_t>2*_&&vt>2*_?_:0;_t-=2*ut,vt-=2*ut;var Fe=D(pe);pe==="auto"&&!(rt<=_t&&mt<=vt)&&(rt>_t||mt>vt)&&(!(rt>vt||mt>_t)||rt<mt!=_t<vt)&&(Fe+=90);var Pe=B(W,Fe),be,Ye;if(Xe&&Xe-Ve>_){var yt=V(le,ge,de,me,Pe,Xe,Ve,se,ze);be=yt.scale,Ye=yt.pad}else be=1,ee&&(be=Math.min(1,_t/Pe.x,vt/Pe.y)),Ye=0;var wt=W.left*Le+W.right*_e,ht=(W.top+W.bottom)/2,Yt=(le+_)*Le+(ge-_)*_e,$t=(de+me)/2,fr=0,mr=0;if(ce||Y){var Ur=(se?Pe.x:Pe.y)/2;Xe&&(Y||ze)&&(ut+=Ye);var jr=se?b(le,ge):b(de,me);se?ce?(Yt=le+jr*ut,fr=-jr*Ur):(Yt=ge-jr*ut,fr=jr*Ur):ce?($t=de+jr*ut,mr=-jr*Ur):($t=me-jr*ut,mr=jr*Ur)}return{textX:wt,textY:ht,targetX:Yt,targetY:$t,anchorX:fr,anchorY:mr,scale:be,rotate:Fe}}function V(le,ge,de,me,W,ie,se,ee,pe){var oe=Math.max(0,Math.abs(ge-le)-2*_),Y=Math.max(0,Math.abs(me-de)-2*_),ce=ie-_,ue=se?ce-Math.sqrt(ce*ce-(ce-se)*(ce-se)):ce,_e=pe?ce*2:ee?ce-se:2*ue,Le=pe?ce*2:ee?2*ue:ce-se,ze,Xe,Ve,rt,mt;return W.y/W.x>=Y/(oe-_e)?rt=Y/W.y:W.y/W.x<=(Y-Le)/oe?rt=oe/W.x:!pe&&ee?(ze=W.x*W.x+W.y*W.y/4,Xe=-2*W.x*(oe-ce)-W.y*(Y/2-ce),Ve=(oe-ce)*(oe-ce)+(Y/2-ce)*(Y/2-ce)-ce*ce,rt=(-Xe+Math.sqrt(Xe*Xe-4*ze*Ve))/(2*ze)):pe?(ze=(W.x*W.x+W.y*W.y)/4,Xe=-W.x*(oe/2-ce)-W.y*(Y/2-ce),Ve=(oe/2-ce)*(oe/2-ce)+(Y/2-ce)*(Y/2-ce)-ce*ce,rt=(-Xe+Math.sqrt(Xe*Xe-4*ze*Ve))/(2*ze)):(ze=W.x*W.x/4+W.y*W.y,Xe=-W.x*(oe/2-ce)-2*W.y*(Y-ce),Ve=(oe/2-ce)*(oe/2-ce)+(Y-ce)*(Y-ce)-ce*ce,rt=(-Xe+Math.sqrt(Xe*Xe-4*ze*Ve))/(2*ze)),rt=Math.min(1,rt),ee?mt=Math.max(0,ce-Math.sqrt(Math.max(0,ce*ce-(ce-(Y-W.y*rt)/2)*(ce-(Y-W.y*rt)/2)))-se):mt=Math.max(0,ce-Math.sqrt(Math.max(0,ce*ce-(ce-(oe-W.x*rt)/2)*(ce-(oe-W.x*rt)/2)))-se),{scale:rt,pad:mt}}function q(le,ge,de,me,W,ie){var se=!!ie.isHorizontal,ee=!!ie.constrained,pe=ie.angle||0,oe=W.width,Y=W.height,ce=Math.abs(ge-le),ue=Math.abs(me-de),_e;se?_e=ue>2*_?_:0:_e=ce>2*_?_:0;var Le=1;ee&&(Le=se?Math.min(1,ue/Y):Math.min(1,ce/oe));var ze=D(pe),Xe=B(W,ze),Ve=(se?Xe.x:Xe.y)/2,rt=(W.left+W.right)/2,mt=(W.top+W.bottom)/2,_t=(le+ge)/2,vt=(de+me)/2,ut=0,Fe=0,Pe=se?b(ge,le):b(de,me);return se?(_t=ge-Pe*_e,ut=Pe*Ve):(vt=me+Pe*_e,Fe=-Pe*Ve),{textX:rt,textY:mt,targetX:_t,targetY:vt,anchorX:ut,anchorY:Fe,scale:Le,rotate:ze}}function z(le,ge,de,me,W){var ie=ge[0].trace,se=ie.texttemplate,ee;return se?ee=G(le,ge,de,me,W):ie.textinfo?ee=J(ge,de,me,W):ee=d.getValue(ie.text,de),d.coerceString(m,ee)}function H(le,ge){var de=d.getValue(le.textposition,ge);return d.coerceEnumerated(E,de)}function G(le,ge,de,me,W){var ie=ge[0].trace,se=C.castOption(ie,de,"texttemplate");if(!se)return"";var ee=ie.type==="histogram",pe=ie.type==="waterfall",oe=ie.type==="funnel",Y=ie.orientation==="h",ce,ue,_e,Le;Y?(ce="y",ue=W,_e="x",Le=me):(ce="x",ue=me,_e="y",Le=W);function ze(ut){return l(ue,ue.c2l(ut),!0).text}function Xe(ut){return l(Le,Le.c2l(ut),!0).text}var Ve=ge[de],rt={};rt.label=Ve.p,rt.labelLabel=rt[ce+"Label"]=ze(Ve.p);var mt=C.castOption(ie,Ve.i,"text");(mt===0||mt)&&(rt.text=mt),rt.value=Ve.s,rt.valueLabel=rt[_e+"Label"]=Xe(Ve.s);var _t={};c(_t,ie,Ve.i),(ee||_t.x===void 0)&&(_t.x=Y?rt.value:rt.label),(ee||_t.y===void 0)&&(_t.y=Y?rt.label:rt.value),(ee||_t.xLabel===void 0)&&(_t.xLabel=Y?rt.valueLabel:rt.labelLabel),(ee||_t.yLabel===void 0)&&(_t.yLabel=Y?rt.labelLabel:rt.valueLabel),pe&&(rt.delta=+Ve.rawS||Ve.s,rt.deltaLabel=Xe(rt.delta),rt.final=Ve.v,rt.finalLabel=Xe(rt.final),rt.initial=rt.final-rt.delta,rt.initialLabel=Xe(rt.initial)),oe&&(rt.value=Ve.s,rt.valueLabel=Xe(rt.value),rt.percentInitial=Ve.begR,rt.percentInitialLabel=C.formatPercent(Ve.begR),rt.percentPrevious=Ve.difR,rt.percentPreviousLabel=C.formatPercent(Ve.difR),rt.percentTotal=Ve.sumR,rt.percenTotalLabel=C.formatPercent(Ve.sumR));var vt=C.castOption(ie,Ve.i,"customdata");return vt&&(rt.customdata=vt),C.texttemplateString({data:[_t,rt,ie._meta],fallback:ie.texttemplatefallback,labels:rt,locale:le._d3locale,template:se})}function J(le,ge,de,me){var W=le[0].trace,ie=W.orientation==="h",se=W.type==="waterfall",ee=W.type==="funnel";function pe(vt){var ut=ie?me:de;return l(ut,vt,!0).text}function oe(vt){var ut=ie?de:me;return l(ut,+vt,!0).text}var Y=W.textinfo,ce=le[ge],ue=Y.split("+"),_e=[],Le,ze=function(vt){return ue.indexOf(vt)!==-1};if(ze("label")&&_e.push(pe(le[ge].p)),ze("text")&&(Le=C.castOption(W,ce.i,"text"),(Le===0||Le)&&_e.push(Le)),se){var Xe=+ce.rawS||ce.s,Ve=ce.v,rt=Ve-Xe;ze("initial")&&_e.push(oe(rt)),ze("delta")&&_e.push(oe(Xe)),ze("final")&&_e.push(oe(Ve))}if(ee){ze("value")&&_e.push(oe(ce.s));var mt=0;ze("percent initial")&&mt++,ze("percent previous")&&mt++,ze("percent total")&&mt++;var _t=mt>1;ze("percent initial")&&(Le=C.formatPercent(ce.begR),_t&&(Le+=" of initial"),_e.push(Le)),ze("percent previous")&&(Le=C.formatPercent(ce.difR),_t&&(Le+=" of previous"),_e.push(Le)),ze("percent total")&&(Le=C.formatPercent(ce.sumR),_t&&(Le+=" of total"),_e.push(Le))}return _e.join("<br>")}Z.exports={plot:p,toMoveInsideBar:U}}}),Bc=Ne({"src/traces/bar/hover.js"(te,Z){var v=oh(),w=Yo(),C=Ha(),P=In().fillText,t=J1().getLineWidth,r=Os().hoverLabelText,a=da().BADNUM;function l(o,u,d,h,g){var m=i(o,u,d,h,g);if(m){var E=m.cd,c=E[0].trace,_=E[m.index];return m.color=s(c,_),w.getComponentMethod("errorbars","hoverInfo")(_,c,m),[m]}}function i(o,u,d,h,g){var m=o.cd,E=m[0].trace,c=m[0].t,_=h==="closest",T=E.type==="waterfall",M=o.maxHoverDistance,k=o.maxSpikeDistance,b,A,y,f,p,x,N;E.orientation==="h"?(b=d,A=u,y="y",f="x",p=me,x=le):(b=u,A=d,y="x",f="y",x=me,p=le);var D=E[y+"period"],B=_||D;function U(Le){return q(Le,-1)}function V(Le){return q(Le,1)}function q(Le,ze){var Xe=Le.w;return Le[y]+ze*Xe/2}function z(Le){return Le[y+"End"]-Le[y+"Start"]}var H=_?U:D?function(Le){return Le.p-z(Le)/2}:function(Le){return Math.min(U(Le),Le.p-c.bardelta/2)},G=_?V:D?function(Le){return Le.p+z(Le)/2}:function(Le){return Math.max(V(Le),Le.p+c.bardelta/2)};function J(Le,ze,Xe){return g.finiteRange&&(Xe=0),v.inbox(Le-b,ze-b,Xe+Math.min(1,Math.abs(ze-Le)/N)-1)}function le(Le){return J(H(Le),G(Le),M)}function ge(Le){return J(U(Le),V(Le),k)}function de(Le){var ze=Le[f];if(T){var Xe=Math.abs(Le.rawS)||0;A>0?ze+=Xe:A<0&&(ze-=Xe)}return ze}function me(Le){var ze=A,Xe=Le.b,Ve=de(Le);return v.inbox(Xe-ze,Ve-ze,M+(Ve-ze)/(Ve-Xe)-1)}function W(Le){var ze=A,Xe=Le.b,Ve=de(Le);return v.inbox(Xe-ze,Ve-ze,k+(Ve-ze)/(Ve-Xe)-1)}var ie=o[y+"a"],se=o[f+"a"];N=Math.abs(ie.r2c(ie.range[1])-ie.r2c(ie.range[0]));function ee(Le){return(p(Le)+x(Le))/2}var pe=v.getDistanceFunction(h,p,x,ee);if(v.getClosest(m,pe,o),o.index!==!1&&m[o.index].p!==a){B||(H=function(Le){return Math.min(U(Le),Le.p-c.bargroupwidth/2)},G=function(Le){return Math.max(V(Le),Le.p+c.bargroupwidth/2)});var oe=o.index,Y=m[oe],ce=E.base?Y.b+Y.s:Y.s;o[f+"0"]=o[f+"1"]=se.c2p(Y[f],!0),o[f+"LabelVal"]=ce;var ue=c.extents[c.extents.round(Y.p)];o[y+"0"]=ie.c2p(_?H(Y):ue[0],!0),o[y+"1"]=ie.c2p(_?G(Y):ue[1],!0);var _e=Y.orig_p!==void 0;return o[y+"LabelVal"]=_e?Y.orig_p:Y.p,o.labelLabel=r(ie,o[y+"LabelVal"],E[y+"hoverformat"]),o.valueLabel=r(se,o[f+"LabelVal"],E[f+"hoverformat"]),o.baseLabel=r(se,Y.b,E[f+"hoverformat"]),o.spikeDistance=(W(Y)+ge(Y))/2,o[y+"Spike"]=ie.c2p(Y.p,!0),P(Y,E,o),o.hovertemplate=E.hovertemplate,o}}function s(o,u){var d=u.mcc||o.marker.color,h=u.mlcc||o.marker.line.color,g=t(o,u);if(C.opacity(d))return d;if(C.opacity(h)&&g)return h}Z.exports={hoverPoints:l,hoverOnBars:i,getTraceColor:s}}}),Md=Ne({"src/traces/bar/event_data.js"(te,Z){Z.exports=function(w,C,P){return w.x="xVal"in C?C.xVal:C.x,w.y="yVal"in C?C.yVal:C.y,C.xa&&(w.xaxis=C.xa),C.ya&&(w.yaxis=C.ya),P.orientation==="h"?(w.label=w.y,w.value=w.x):(w.label=w.x,w.value=w.y),w}}}),Ng=Ne({"src/traces/bar/select.js"(te,Z){Z.exports=function(C,P){var t=C.cd,r=C.xaxis,a=C.yaxis,l=t[0].trace,i=l.type==="funnel",s=l.orientation==="h",o=[],u;if(P===!1)for(u=0;u<t.length;u++)t[u].selected=0;else for(u=0;u<t.length;u++){var d=t[u],h="ct"in d?d.ct:v(d,r,a,s,i);P.contains(h,!1,u,C)?(o.push({pointNumber:u,x:r.c2d(d.x),y:a.c2d(d.y)}),d.selected=1):d.selected=0}return o};function v(w,C,P,t,r){var a=C.c2p(t?w.s0:w.p0,!0),l=C.c2p(t?w.s1:w.p1,!0),i=P.c2p(t?w.p0:w.s0,!0),s=P.c2p(t?w.p1:w.s1,!0);return r?[(a+l)/2,(i+s)/2]:t?[l,(i+s)/2]:[(a+l)/2,s]}}}),Q1=Ne({"src/traces/bar/index.js"(te,Z){Z.exports={attributes:id(),layoutAttributes:pp(),supplyDefaults:mp().supplyDefaults,crossTraceDefaults:mp().crossTraceDefaults,supplyLayoutDefaults:IA(),calc:Kp(),crossTraceCalc:q0().crossTraceCalc,colorbar:sh(),arraysToCalcdata:Nm(),plot:mu().plot,style:qd().style,styleOnSelect:qd().styleOnSelect,hoverPoints:Bc().hoverPoints,eventData:Md(),selectPoints:Ng(),moduleType:"trace",name:"bar",basePlotModule:Ih(),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}}}),Ny=Ne({"lib/bar.js"(te,Z){Z.exports=Q1()}}),Fy=Ne({"src/traces/box/attributes.js"(te,Z){var v=qv(),w=tf(),C=id(),P=js(),t=Ac().axisHoverFormat,{hovertemplateAttrs:r,templatefallbackAttrs:a}=Fl(),l=fi().extendFlat,i=w.marker,s=i.line;Z.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:w.xperiod,yperiod:w.yperiod,xperiod0:w.xperiod0,yperiod0:w.yperiod0,xperiodalignment:w.xperiodalignment,yperiodalignment:w.yperiodalignment,xhoverformat:t("x"),yhoverformat:t("y"),name:{valType:"string",editType:"calc+clearAxisTypes"},q1:{valType:"data_array",editType:"calc+clearAxisTypes"},median:{valType:"data_array",editType:"calc+clearAxisTypes"},q3:{valType:"data_array",editType:"calc+clearAxisTypes"},lowerfence:{valType:"data_array",editType:"calc"},upperfence:{valType:"data_array",editType:"calc"},notched:{valType:"boolean",editType:"calc"},notchwidth:{valType:"number",min:0,max:.5,dflt:.25,editType:"calc"},notchspan:{valType:"data_array",editType:"calc"},boxpoints:{valType:"enumerated",values:["all","outliers","suspectedoutliers",!1],editType:"calc"},jitter:{valType:"number",min:0,max:1,editType:"calc"},pointpos:{valType:"number",min:-2,max:2,editType:"calc"},sdmultiple:{valType:"number",min:0,editType:"calc",dflt:1},sizemode:{valType:"enumerated",values:["quartiles","sd"],editType:"calc",dflt:"quartiles"},boxmean:{valType:"enumerated",values:[!0,"sd",!1],editType:"calc"},mean:{valType:"data_array",editType:"calc"},sd:{valType:"data_array",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},quartilemethod:{valType:"enumerated",values:["linear","exclusive","inclusive"],dflt:"linear",editType:"calc"},width:{valType:"number",min:0,dflt:0,editType:"calc"},marker:{outliercolor:{valType:"color",dflt:"rgba(0, 0, 0, 0)",editType:"style"},symbol:l({},i.symbol,{arrayOk:!1,editType:"plot"}),opacity:l({},i.opacity,{arrayOk:!1,dflt:1,editType:"style"}),angle:l({},i.angle,{arrayOk:!1,editType:"calc"}),size:l({},i.size,{arrayOk:!1,editType:"calc"}),color:l({},i.color,{arrayOk:!1,editType:"style"}),line:{color:l({},s.color,{arrayOk:!1,dflt:P.defaultLine,editType:"style"}),width:l({},s.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:v(),whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},showwhiskers:{valType:"boolean",editType:"calc"},offsetgroup:C.offsetgroup,alignmentgroup:C.alignmentgroup,selected:{marker:w.selected.marker,editType:"style"},unselected:{marker:w.unselected.marker,editType:"style"},text:l({},w.text,{}),hovertext:l({},w.hovertext,{}),hovertemplate:r({}),hovertemplatefallback:a(),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"},zorder:w.zorder}}}),Fg=Ne({"src/traces/box/layout_attributes.js"(te,Z){Z.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"}}}}),X0=Ne({"src/traces/box/defaults.js"(te,Z){var v=In(),w=Yo(),C=Ha(),P=Rm(),t=U0(),r=Ag(),a=Fy();function l(u,d,h,g){function m(f,p){return v.coerce(u,d,a,f,p)}if(i(u,d,m,g),d.visible!==!1){P(u,d,g,m),m("xhoverformat"),m("yhoverformat");var E=d._hasPreCompStats;E&&(m("lowerfence"),m("upperfence")),m("line.color",(u.marker||{}).color||h),m("line.width"),m("fillcolor",C.addOpacity(d.line.color,.5));var c=!1;if(E){var _=m("mean"),T=m("sd");_&&_.length&&(c=!0,T&&T.length&&(c="sd"))}m("whiskerwidth");var M=m("sizemode"),k;M==="quartiles"&&(k=m("boxmean",c)),m("showwhiskers",M==="quartiles"),(M==="sd"||k==="sd")&&m("sdmultiple"),m("width"),m("quartilemethod");var b=!1;if(E){var A=m("notchspan");A&&A.length&&(b=!0)}else v.validate(u.notchwidth,a.notchwidth)&&(b=!0);var y=m("notched",b);y&&m("notchwidth"),s(u,d,m,{prefix:"box"}),m("zorder")}}function i(u,d,h,g){function m(J){var le=0;return J&&J.length&&(le+=1,v.isArrayOrTypedArray(J[0])&&J[0].length&&(le+=1)),le}function E(J){return v.validate(u[J],a[J])}var c=h("y"),_=h("x"),T;if(d.type==="box"){var M=h("q1"),k=h("median"),b=h("q3");d._hasPreCompStats=M&&M.length&&k&&k.length&&b&&b.length,T=Math.min(v.minRowLength(M),v.minRowLength(k),v.minRowLength(b))}var A=m(c),y=m(_),f=A&&v.minRowLength(c),p=y&&v.minRowLength(_),x=g.calendar,N={autotypenumbers:g.autotypenumbers},D,B;if(d._hasPreCompStats)switch(String(y)+String(A)){case"00":var U=E("x0")||E("dx"),V=E("y0")||E("dy");V&&!U?D="h":D="v",B=T;break;case"10":D="v",B=Math.min(T,p);break;case"20":D="h",B=Math.min(T,_.length);break;case"01":D="h",B=Math.min(T,f);break;case"02":D="v",B=Math.min(T,c.length);break;case"12":D="v",B=Math.min(T,p,c.length);break;case"21":D="h",B=Math.min(T,_.length,f);break;case"11":B=0;break;case"22":var q=!1,z;for(z=0;z<_.length;z++)if(r(_[z],x,N)==="category"){q=!0;break}if(q)D="v",B=Math.min(T,p,c.length);else{for(z=0;z<c.length;z++)if(r(c[z],x,N)==="category"){q=!0;break}q?(D="h",B=Math.min(T,_.length,f)):(D="v",B=Math.min(T,p,c.length))}break}else A>0?(D="v",y>0?B=Math.min(p,f):B=Math.min(f)):y>0?(D="h",B=Math.min(p)):B=0;if(!B){d.visible=!1;return}d._length=B;var H=h("orientation",D);d._hasPreCompStats?H==="v"&&y===0?(h("x0",0),h("dx",1)):H==="h"&&A===0&&(h("y0",0),h("dy",1)):H==="v"&&y===0?h("x0"):H==="h"&&A===0&&h("y0");var G=w.getComponentMethod("calendars","handleTraceDefaults");G(u,d,["x","y"],g)}function s(u,d,h,g){var m=g.prefix,E=v.coerce2(u,d,a,"marker.outliercolor"),c=h("marker.line.outliercolor"),_="outliers";d._hasPreCompStats?_="all":(E||c)&&(_="suspectedoutliers");var T=h(m+"points",_);T?(h("jitter",T==="all"?.3:0),h("pointpos",T==="all"?-1.5:0),h("marker.symbol"),h("marker.opacity"),h("marker.size"),h("marker.angle"),h("marker.color",d.line.color),h("marker.line.color"),h("marker.line.width"),T==="suspectedoutliers"&&(h("marker.line.outliercolor",d.marker.color),h("marker.line.outlierwidth")),h("selected.marker.color"),h("unselected.marker.color"),h("selected.marker.size"),h("unselected.marker.size"),h("text"),h("hovertext")):delete d.marker;var M=h("hoveron");(M==="all"||M.indexOf("points")!==-1)&&(h("hovertemplate"),h("hovertemplatefallback")),v.coerceSelectionMarkerOpacity(d,h)}function o(u,d){var h,g;function m(T){return v.coerce(g._input,g,a,T)}for(var E=0;E<u.length;E++){g=u[E];var c=g.type;if(c==="box"||c==="violin"){h=g._input;var _=d[c+"mode"];_==="group"&&t(h,g,d,m,_)}}}Z.exports={supplyDefaults:l,crossTraceDefaults:o,handleSampleDefaults:i,handlePointsDefaults:s}}}),DA=Ne({"src/traces/box/layout_defaults.js"(te,Z){var v=Yo(),w=In(),C=Fg();function P(r,a,l,i,s){for(var o=s+"Layout",u=!1,d=0;d<l.length;d++){var h=l[d];if(v.traceIs(h,o)){u=!0;break}}u&&(i(s+"mode"),i(s+"gap"),i(s+"groupgap"))}function t(r,a,l){function i(s,o){return w.coerce(r,a,C,s,o)}P(r,a,l,i,"box")}Z.exports={supplyLayoutDefaults:t,_supply:P}}}),Dh=Ne({"src/traces/box/calc.js"(te,Z){var v=Fn(),w=Os(),C=Dm(),P=In(),t=da().BADNUM,r=P._;Z.exports=function(M,k){var b=M._fullLayout,A=w.getFromId(M,k.xaxis||"x"),y=w.getFromId(M,k.yaxis||"y"),f=[],p=k.type==="violin"?"_numViolins":"_numBoxes",x,N,D,B,U,V,q;k.orientation==="h"?(D=A,B="x",U=y,V="y",q=!!k.yperiodalignment):(D=y,B="y",U=A,V="x",q=!!k.xperiodalignment);var z=a(k,V,U,b[p]),H=z[0],G=z[1],J=P.distinctVals(H,U),le=J.vals,ge=J.minDiff/2,de,me,W,ie,se,ee,pe=(k.boxpoints||k.points)==="all"?P.identity:function(jr){return jr.v<de.lf||jr.v>de.uf};if(k._hasPreCompStats){var oe=k[B],Y=function(jr){return D.d2c((k[jr]||[])[x])},ce=1/0,ue=-1/0;for(x=0;x<k._length;x++){var _e=H[x];if(v(_e)){if(de={},de.pos=de[V]=_e,q&&G&&(de.orig_p=G[x]),de.q1=Y("q1"),de.med=Y("median"),de.q3=Y("q3"),me=[],oe&&P.isArrayOrTypedArray(oe[x]))for(N=0;N<oe[x].length;N++)ee=D.d2c(oe[x][N]),ee!==t&&(se={v:ee,i:[x,N]},o(se,k,[x,N]),me.push(se));if(de.pts=me.sort(d),W=de[B]=me.map(h),ie=W.length,de.med!==t&&de.q1!==t&&de.q3!==t&&de.med>=de.q1&&de.q3>=de.med){var Le=Y("lowerfence");de.lf=Le!==t&&Le<=de.q1?Le:g(de,W,ie);var ze=Y("upperfence");de.uf=ze!==t&&ze>=de.q3?ze:m(de,W,ie);var Xe=Y("mean");de.mean=Xe!==t?Xe:ie?P.mean(W,ie):(de.q1+de.q3)/2;var Ve=Y("sd");de.sd=Xe!==t&&Ve>=0?Ve:ie?P.stdev(W,ie,de.mean):de.q3-de.q1,de.lo=E(de),de.uo=c(de);var rt=Y("notchspan");rt=rt!==t&&rt>0?rt:_(de,ie),de.ln=de.med-rt,de.un=de.med+rt;var mt=de.lf,_t=de.uf;k.boxpoints&&W.length&&(mt=Math.min(mt,W[0]),_t=Math.max(_t,W[ie-1])),k.notched&&(mt=Math.min(mt,de.ln),_t=Math.max(_t,de.un)),de.min=mt,de.max=_t}else{P.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+de.q1,"median = "+de.med,"q3 = "+de.q3].join(`
`));var vt;de.med!==t?vt=de.med:de.q1!==t?de.q3!==t?vt=(de.q1+de.q3)/2:vt=de.q1:de.q3!==t?vt=de.q3:vt=0,de.med=vt,de.q1=de.q3=vt,de.lf=de.uf=vt,de.mean=de.sd=vt,de.ln=de.un=vt,de.min=de.max=vt}ce=Math.min(ce,de.min),ue=Math.max(ue,de.max),de.pts2=me.filter(pe),f.push(de)}}k._extremes[D._id]=w.findExtremes(D,[ce,ue],{padded:!0})}else{var ut=D.makeCalcdata(k,B),Fe=l(le,ge),Pe=le.length,be=i(Pe);for(x=0;x<k._length;x++)if(ee=ut[x],!!v(ee)){var Ye=P.findBin(H[x],Fe);Ye>=0&&Ye<Pe&&(se={v:ee,i:x},o(se,k,x),be[Ye].push(se))}var yt=1/0,wt=-1/0,ht=k.quartilemethod,Yt=ht==="exclusive",$t=ht==="inclusive";for(x=0;x<Pe;x++)if(be[x].length>0){if(de={},de.pos=de[V]=le[x],me=de.pts=be[x].sort(d),W=de[B]=me.map(h),ie=W.length,de.min=W[0],de.max=W[ie-1],de.mean=P.mean(W,ie),de.sd=P.stdev(W,ie,de.mean)*k.sdmultiple,de.med=P.interp(W,.5),ie%2&&(Yt||$t)){var fr,mr;Yt?(fr=W.slice(0,ie/2),mr=W.slice(ie/2+1)):$t&&(fr=W.slice(0,ie/2+1),mr=W.slice(ie/2)),de.q1=P.interp(fr,.5),de.q3=P.interp(mr,.5)}else de.q1=P.interp(W,.25),de.q3=P.interp(W,.75);de.lf=g(de,W,ie),de.uf=m(de,W,ie),de.lo=E(de),de.uo=c(de);var Ur=_(de,ie);de.ln=de.med-Ur,de.un=de.med+Ur,yt=Math.min(yt,de.ln),wt=Math.max(wt,de.un),de.pts2=me.filter(pe),f.push(de)}k.notched&&P.isTypedArray(ut)&&(ut=Array.from(ut)),k._extremes[D._id]=w.findExtremes(D,k.notched?ut.concat([yt,wt]):ut,{padded:!0})}return u(f,k),f.length>0?(f[0].t={num:b[p],dPos:ge,posLetter:V,valLetter:B,labels:{med:r(M,"median:"),min:r(M,"min:"),q1:r(M,"q1:"),q3:r(M,"q3:"),max:r(M,"max:"),mean:k.boxmean==="sd"||k.sizemode==="sd"?r(M,"mean ± σ:").replace("σ",k.sdmultiple===1?"σ":k.sdmultiple+"σ"):r(M,"mean:"),lf:r(M,"lower fence:"),uf:r(M,"upper fence:")}},b[p]++,f):[{t:{empty:!0}}]};function a(T,M,k,b){var A=M in T,y=M+"0"in T,f="d"+M in T;if(A||y&&f){var p=k.makeCalcdata(T,M),x=C(T,k,M,p).vals;return[x,p]}var N;y?N=T[M+"0"]:"name"in T&&(k.type==="category"||v(T.name)&&["linear","log"].indexOf(k.type)!==-1||P.isDateTime(T.name)&&k.type==="date")?N=T.name:N=b;for(var D=k.type==="multicategory"?k.r2c_just_indices(N):k.d2c(N,0,T[M+"calendar"]),B=T._length,U=new Array(B),V=0;V<B;V++)U[V]=D;return[U]}function l(T,M){for(var k=T.length,b=new Array(k+1),A=0;A<k;A++)b[A]=T[A]-M;return b[k]=T[k-1]+M,b}function i(T){for(var M=new Array(T),k=0;k<T;k++)M[k]=[];return M}var s={text:"tx",hovertext:"htx"};function o(T,M,k){for(var b in s)P.isArrayOrTypedArray(M[b])&&(Array.isArray(k)?P.isArrayOrTypedArray(M[b][k[0]])&&(T[s[b]]=M[b][k[0]][k[1]]):T[s[b]]=M[b][k])}function u(T,M){if(P.isArrayOrTypedArray(M.selectedpoints))for(var k=0;k<T.length;k++){for(var b=T[k].pts||[],A={},y=0;y<b.length;y++)A[b[y].i]=y;P.tagSelected(b,M,A)}}function d(T,M){return T.v-M.v}function h(T){return T.v}function g(T,M,k){return k===0?T.q1:Math.min(T.q1,M[Math.min(P.findBin(2.5*T.q1-1.5*T.q3,M,!0)+1,k-1)])}function m(T,M,k){return k===0?T.q3:Math.max(T.q3,M[Math.max(P.findBin(2.5*T.q3-1.5*T.q1,M),0)])}function E(T){return 4*T.q1-3*T.q3}function c(T){return 4*T.q3-3*T.q1}function _(T,M){return M===0?0:1.57*(T.q3-T.q1)/Math.sqrt(M)}}}),Ux=Ne({"src/traces/box/cross_trace_calc.js"(te,Z){var v=Os(),w=In(),C=My().getAxisGroup,P=["v","h"];function t(a,l){for(var i=a.calcdata,s=l.xaxis,o=l.yaxis,u=0;u<P.length;u++){for(var d=P[u],h=d==="h"?o:s,g=[],m=0;m<i.length;m++){var E=i[m],c=E[0].t,_=E[0].trace;_.visible===!0&&(_.type==="box"||_.type==="candlestick")&&!c.empty&&(_.orientation||"v")===d&&_.xaxis===s._id&&_.yaxis===o._id&&g.push(m)}r("box",a,g,h)}}function r(a,l,i,s){var o=l.calcdata,u=l._fullLayout,d=s._id,h=d.charAt(0),g,m,E,c=[],_=0;for(g=0;g<i.length;g++)for(E=o[i[g]],m=0;m<E.length;m++)c.push(s.c2l(E[m].pos,!0)),_+=(E[m].pts2||[]).length;if(c.length){var T=w.distinctVals(c);(s.type==="category"||s.type==="multicategory")&&(T.minDiff=1);var M=T.minDiff/2;v.minDtick(s,T.minDiff,T.vals[0],!0);var k=a==="violin"?"_numViolins":"_numBoxes",b=u[k],A=u[a+"mode"]==="group"&&b>1,y=1-u[a+"gap"],f=1-u[a+"groupgap"];for(g=0;g<i.length;g++){E=o[i[g]];var p=E[0].trace,x=E[0].t,N=p.width,D=p.side,B,U,V,q;if(N)B=U=q=N/2,V=0;else if(B=M,A){var z=C(u,s._id)+p.orientation,H=u._alignmentOpts[z]||{},G=H[p.alignmentgroup]||{},J=Object.keys(G.offsetGroups||{}).length,le=J||b,ge=J?p._offsetIndex:x.num;U=B*y*f/le,V=2*B*(-.5+(ge+.5)/le)*y,q=B*y/le}else U=B*y*f,V=0,q=B;x.dPos=B,x.bPos=V,x.bdPos=U,x.wHover=q;var de,me,W=V+U,ie,se,ee,pe,oe,Y,ce=!!N,ue=(p.boxpoints||p.points)&&_>0;if(D==="positive"?(de=B*(N?1:.5),ie=W,me=ie=V):D==="negative"?(de=ie=V,me=B*(N?1:.5),se=W):(de=me=B,ie=se=W),ue){var _e=p.pointpos,Le=p.jitter,ze=p.marker.size/2,Xe=0;_e+Le>=0&&(Xe=W*(_e+Le),Xe>de?(ce=!0,oe=ze,ee=Xe):Xe>ie&&(oe=ze,ee=de)),Xe<=de&&(ee=de);var Ve=0;_e-Le<=0&&(Ve=-W*(_e-Le),Ve>me?(ce=!0,Y=ze,pe=Ve):Ve>se&&(Y=ze,pe=me)),Ve<=me&&(pe=me)}else ee=de,pe=me;var rt=new Array(E.length);for(m=0;m<E.length;m++)rt[m]=E[m].pos;p._extremes[d]=v.findExtremes(s,rt,{padded:ce,vpadminus:pe,vpadplus:ee,vpadLinearized:!0,ppadminus:{x:Y,y:oe}[h],ppadplus:{x:oe,y:Y}[h]})}}}Z.exports={crossTraceCalc:t,setPositionOffset:r}}}),qx=Ne({"src/traces/box/plot.js"(te,Z){var v=xn(),w=In(),C=zs(),P=5,t=.01;function r(s,o,u,d){var h=s._context.staticPlot,g=o.xaxis,m=o.yaxis;w.makeTraceGroups(d,u,"trace boxes").each(function(E){var c=v.select(this),_=E[0],T=_.t,M=_.trace;if(T.wdPos=T.bdPos*M.whiskerwidth,M.visible!==!0||T.empty){c.remove();return}var k,b;M.orientation==="h"?(k=m,b=g):(k=g,b=m),a(c,{pos:k,val:b},M,T,h),l(c,{x:g,y:m},M,T),i(c,{pos:k,val:b},M,T)})}function a(s,o,u,d,h){var g=u.orientation==="h",m=o.val,E=o.pos,c=!!E.rangebreaks,_=d.bPos,T=d.wdPos||0,M=d.bPosPxOffset||0,k=u.whiskerwidth||0,b=u.showwhiskers!==!1,A=u.notched||!1,y=A?1-2*u.notchwidth:1,f,p;Array.isArray(d.bdPos)?(f=d.bdPos[0],p=d.bdPos[1]):(f=d.bdPos,p=d.bdPos);var x=s.selectAll("path.box").data(u.type!=="violin"||u.box.visible?w.identity:[]);x.enter().append("path").style("vector-effect",h?"none":"non-scaling-stroke").attr("class","box"),x.exit().remove(),x.each(function(N){if(N.empty)return v.select(this).attr("d","M0,0Z");var D=E.c2l(N.pos+_,!0),B=E.l2p(D-f)+M,U=E.l2p(D+p)+M,V=c?(B+U)/2:E.l2p(D)+M,q=u.whiskerwidth,z=c?B*q+(1-q)*V:E.l2p(D-T)+M,H=c?U*q+(1-q)*V:E.l2p(D+T)+M,G=E.l2p(D-f*y)+M,J=E.l2p(D+p*y)+M,le=u.sizemode==="sd",ge=m.c2p(le?N.mean-N.sd:N.q1,!0),de=le?m.c2p(N.mean+N.sd,!0):m.c2p(N.q3,!0),me=w.constrain(le?m.c2p(N.mean,!0):m.c2p(N.med,!0),Math.min(ge,de)+1,Math.max(ge,de)-1),W=N.lf===void 0||u.boxpoints===!1||le,ie=m.c2p(W?N.min:N.lf,!0),se=m.c2p(W?N.max:N.uf,!0),ee=m.c2p(N.ln,!0),pe=m.c2p(N.un,!0);g?v.select(this).attr("d","M"+me+","+G+"V"+J+"M"+ge+","+B+"V"+U+(A?"H"+ee+"L"+me+","+J+"L"+pe+","+U:"")+"H"+de+"V"+B+(A?"H"+pe+"L"+me+","+G+"L"+ee+","+B:"")+"Z"+(b?"M"+ge+","+V+"H"+ie+"M"+de+","+V+"H"+se+(k===0?"":"M"+ie+","+z+"V"+H+"M"+se+","+z+"V"+H):"")):v.select(this).attr("d","M"+G+","+me+"H"+J+"M"+B+","+ge+"H"+U+(A?"V"+ee+"L"+J+","+me+"L"+U+","+pe:"")+"V"+de+"H"+B+(A?"V"+pe+"L"+G+","+me+"L"+B+","+ee:"")+"Z"+(b?"M"+V+","+ge+"V"+ie+"M"+V+","+de+"V"+se+(k===0?"":"M"+z+","+ie+"H"+H+"M"+z+","+se+"H"+H):""))})}function l(s,o,u,d){var h=o.x,g=o.y,m=d.bdPos,E=d.bPos,c=u.boxpoints||u.points;w.seedPseudoRandom();var _=function(k){return k.forEach(function(b){b.t=d,b.trace=u}),k},T=s.selectAll("g.points").data(c?_:[]);T.enter().append("g").attr("class","points"),T.exit().remove();var M=T.selectAll("path").data(function(k){var b,A=k.pts2,y=Math.max((k.max-k.min)/10,k.q3-k.q1),f=y*1e-9,p=y*t,x=[],N=0,D;if(u.jitter){if(y===0)for(N=1,x=new Array(A.length),b=0;b<A.length;b++)x[b]=1;else for(b=0;b<A.length;b++){var B=Math.max(0,b-P),U=A[B].v,V=Math.min(A.length-1,b+P),q=A[V].v;c!=="all"&&(A[b].v<k.lf?q=Math.min(q,k.lf):U=Math.max(U,k.uf));var z=Math.sqrt(p*(V-B)/(q-U+f))||0;z=w.constrain(Math.abs(z),0,1),x.push(z),N=Math.max(z,N)}D=u.jitter*2/(N||1)}for(b=0;b<A.length;b++){var H=A[b],G=H.v,J=u.jitter?D*x[b]*(w.pseudoRandom()-.5):0,le=k.pos+E+m*(u.pointpos+J);u.orientation==="h"?(H.y=le,H.x=G):(H.x=le,H.y=G),c==="suspectedoutliers"&&G<k.uo&&G>k.lo&&(H.so=!0)}return A});M.enter().append("path").classed("point",!0),M.exit().remove(),M.call(C.translatePoints,h,g)}function i(s,o,u,d){var h=o.val,g=o.pos,m=!!g.rangebreaks,E=d.bPos,c=d.bPosPxOffset||0,_=u.boxmean||(u.meanline||{}).visible,T,M;Array.isArray(d.bdPos)?(T=d.bdPos[0],M=d.bdPos[1]):(T=d.bdPos,M=d.bdPos);var k=s.selectAll("path.mean").data(u.type==="box"&&u.boxmean||u.type==="violin"&&u.box.visible&&u.meanline.visible?w.identity:[]);k.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),k.exit().remove(),k.each(function(b){var A=g.c2l(b.pos+E,!0),y=g.l2p(A-T)+c,f=g.l2p(A+M)+c,p=m?(y+f)/2:g.l2p(A)+c,x=h.c2p(b.mean,!0),N=h.c2p(b.mean-b.sd,!0),D=h.c2p(b.mean+b.sd,!0);u.orientation==="h"?v.select(this).attr("d","M"+x+","+y+"V"+f+(_==="sd"?"m0,0L"+N+","+p+"L"+x+","+y+"L"+D+","+p+"Z":"")):v.select(this).attr("d","M"+y+","+x+"H"+f+(_==="sd"?"m0,0L"+p+","+N+"L"+y+","+x+"L"+p+","+D+"Z":""))})}Z.exports={plot:r,plotBoxAndWhiskers:a,plotPoints:l,plotBoxMean:i}}}),e2=Ne({"src/traces/box/style.js"(te,Z){var v=xn(),w=Ha(),C=zs();function P(r,a,l){var i=l||v.select(r).selectAll("g.trace.boxes");i.style("opacity",function(s){return s[0].trace.opacity}),i.each(function(s){var o=v.select(this),u=s[0].trace,d=u.line.width;function h(E,c,_,T){E.style("stroke-width",c+"px").call(w.stroke,_).call(w.fill,T)}var g=o.selectAll("path.box");if(u.type==="candlestick")g.each(function(E){if(!E.empty){var c=v.select(this),_=u[E.dir];h(c,_.line.width,_.line.color,_.fillcolor),c.style("opacity",u.selectedpoints&&!E.selected?.3:1)}});else{h(g,d,u.line.color,u.fillcolor),o.selectAll("path.mean").style({"stroke-width":d,"stroke-dasharray":2*d+"px,"+d+"px"}).call(w.stroke,u.line.color);var m=o.selectAll("path.point");C.pointStyle(m,u,r)}})}function t(r,a,l){var i=a[0].trace,s=l.selectAll("path.point");i.selectedpoints?C.selectedPointStyle(s,i):C.pointStyle(s,i,r)}Z.exports={style:P,styleOnSelect:t}}}),OA=Ne({"src/traces/box/hover.js"(te,Z){var v=Os(),w=In(),C=oh(),P=Ha(),t=w.fillText;function r(i,s,o,u){var d=i.cd,h=d[0].trace,g=h.hoveron,m=[],E;return g.indexOf("boxes")!==-1&&(m=m.concat(a(i,s,o,u))),g.indexOf("points")!==-1&&(E=l(i,s,o)),u==="closest"?E?[E]:m:(E&&m.push(E),m)}function a(i,s,o,u){var d=i.cd,h=i.xa,g=i.ya,m=d[0].trace,E=d[0].t,c=m.type==="violin",_,T,M,k,b,A,y,f,p,x,N,D=E.bdPos,B,U,V=E.wHover,q=function(Ve){return M.c2l(Ve.pos)+E.bPos-M.c2l(A)};c&&m.side!=="both"?(m.side==="positive"&&(p=function(Ve){var rt=q(Ve);return C.inbox(rt,rt+V,x)},B=D,U=0),m.side==="negative"&&(p=function(Ve){var rt=q(Ve);return C.inbox(rt-V,rt,x)},B=0,U=D)):(p=function(Ve){var rt=q(Ve);return C.inbox(rt-V,rt+V,x)},B=U=D);var z;c?z=function(Ve){return C.inbox(Ve.span[0]-b,Ve.span[1]-b,x)}:z=function(Ve){return C.inbox(Ve.min-b,Ve.max-b,x)},m.orientation==="h"?(b=s,A=o,y=z,f=p,_="y",M=g,T="x",k=h):(b=o,A=s,y=p,f=z,_="x",M=h,T="y",k=g);var H=Math.min(1,D/Math.abs(M.r2c(M.range[1])-M.r2c(M.range[0])));x=i.maxHoverDistance-H,N=i.maxSpikeDistance-H;function G(Ve){return(y(Ve)+f(Ve))/2}var J=C.getDistanceFunction(u,y,f,G);if(C.getClosest(d,J,i),i.index===!1)return[];var le=d[i.index],ge=m.line.color,de=(m.marker||{}).color;P.opacity(ge)&&m.line.width?i.color=ge:P.opacity(de)&&m.boxpoints?i.color=de:i.color=m.fillcolor,i[_+"0"]=M.c2p(le.pos+E.bPos-U,!0),i[_+"1"]=M.c2p(le.pos+E.bPos+B,!0),i[_+"LabelVal"]=le.orig_p!==void 0?le.orig_p:le.pos;var me=_+"Spike";i.spikeDistance=G(le)*N/x,i[me]=M.c2p(le.pos,!0);var W=m.boxmean||m.sizemode==="sd"||(m.meanline||{}).visible,ie=m.boxpoints||m.points,se=ie&&W?["max","uf","q3","med","mean","q1","lf","min"]:ie&&!W?["max","uf","q3","med","q1","lf","min"]:!ie&&W?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],ee=k.range[1]<k.range[0];m.orientation===(ee?"v":"h")&&se.reverse();for(var pe=i.spikeDistance,oe=i[me],Y=[],ce=0;ce<se.length;ce++){var ue=se[ce];if(ue in le){var _e=le[ue],Le=k.c2p(_e,!0),ze=w.extendFlat({},i);ze.attr=ue,ze[T+"0"]=ze[T+"1"]=Le,ze[T+"LabelVal"]=_e,ze[T+"Label"]=(E.labels?E.labels[ue]+" ":"")+v.hoverLabelText(k,_e,m[T+"hoverformat"]),ze.hoverOnBox=!0,ue==="mean"&&"sd"in le&&(m.boxmean==="sd"||m.sizemode==="sd")&&(ze[T+"err"]=le.sd),ze.hovertemplate=!1,Y.push(ze)}}i.name="",i.spikeDistance=void 0,i[me]=void 0;for(var Xe=0;Xe<Y.length;Xe++)Y[Xe].attr!=="med"?(Y[Xe].name="",Y[Xe].spikeDistance=void 0,Y[Xe][me]=void 0):(Y[Xe].spikeDistance=pe,Y[Xe][me]=oe);return Y}function l(i,s,o){for(var u=i.cd,d=i.xa,h=i.ya,g=u[0].trace,m=d.c2p(s),E=h.c2p(o),c,_=function(z){var H=Math.max(3,z.mrc||0);return Math.max(Math.abs(d.c2p(z.x)-m)-H,1-3/H)},T=function(z){var H=Math.max(3,z.mrc||0);return Math.max(Math.abs(h.c2p(z.y)-E)-H,1-3/H)},M=C.quadrature(_,T),k=!1,b,A,y=0;y<u.length;y++){b=u[y];for(var f=0;f<(b.pts||[]).length;f++){A=b.pts[f];var p=M(A);p<=i.distance&&(i.distance=p,k=[y,f])}}if(!k)return!1;b=u[k[0]],A=b.pts[k[1]];var x=d.c2p(A.x,!0),N=h.c2p(A.y,!0),D=A.mrc||1;c=w.extendFlat({},i,{index:A.i,color:(g.marker||{}).color,name:g.name,x0:x-D,x1:x+D,y0:N-D,y1:N+D,spikeDistance:i.distance,hovertemplate:g.hovertemplate});var B=b.orig_p,U=B!==void 0?B:b.pos,V;g.orientation==="h"?(V=h,c.xLabelVal=A.x,c.yLabelVal=U):(V=d,c.xLabelVal=U,c.yLabelVal=A.y);var q=V._id.charAt(0);return c[q+"Spike"]=V.c2p(b.pos,!0),t(A,g,c),c}Z.exports={hoverPoints:r,hoverOnBoxes:a,hoverOnPoints:l}}}),HL=Ne({"src/traces/box/event_data.js"(te,Z){Z.exports=function(w,C){return C.hoverOnBox&&(w.hoverOnBox=C.hoverOnBox),"xVal"in C&&(w.x=C.xVal),"yVal"in C&&(w.y=C.yVal),C.xa&&(w.xaxis=C.xa),C.ya&&(w.yaxis=C.ya),w}}}),t2=Ne({"src/traces/box/select.js"(te,Z){Z.exports=function(w,C){var P=w.cd,t=w.xaxis,r=w.yaxis,a=[],l,i;if(C===!1)for(l=0;l<P.length;l++)for(i=0;i<(P[l].pts||[]).length;i++)P[l].pts[i].selected=0;else for(l=0;l<P.length;l++)for(i=0;i<(P[l].pts||[]).length;i++){var s=P[l].pts[i],o=t.c2p(s.x),u=r.c2p(s.y);C.contains([o,u],null,s.i,w)?(a.push({pointNumber:s.i,x:t.c2d(s.x),y:r.c2d(s.y)}),s.selected=1):s.selected=0}return a}}}),zA=Ne({"src/traces/box/index.js"(te,Z){Z.exports={attributes:Fy(),layoutAttributes:Fg(),supplyDefaults:X0().supplyDefaults,crossTraceDefaults:X0().crossTraceDefaults,supplyLayoutDefaults:DA().supplyLayoutDefaults,calc:Dh(),crossTraceCalc:Ux().crossTraceCalc,plot:qx().plot,style:e2().style,styleOnSelect:e2().styleOnSelect,hoverPoints:OA().hoverPoints,eventData:HL(),selectPoints:t2(),moduleType:"trace",name:"box",basePlotModule:Ih(),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","boxLayout","zoomScale"],meta:{}}}}),NA=Ne({"lib/box.js"(te,Z){Z.exports=zA()}}),Vd=Ne({"src/traces/heatmap/attributes.js"(te,Z){var v=Wu(),{extendFlat:w}=fi(),C=qo(),{axisHoverFormat:P}=Ac(),t=bo(),{hovertemplateAttrs:r,templatefallbackAttrs:a,texttemplateAttrs:l}=Fl(),i=tf();Z.exports=w({z:{valType:"data_array",editType:"calc"},x:w({},i.x,{impliedEdits:{xtype:"array"}}),x0:w({},i.x0,{impliedEdits:{xtype:"scaled"}}),dx:w({},i.dx,{impliedEdits:{xtype:"scaled"}}),y:w({},i.y,{impliedEdits:{ytype:"array"}}),y0:w({},i.y0,{impliedEdits:{ytype:"scaled"}}),dy:w({},i.dy,{impliedEdits:{ytype:"scaled"}}),xperiod:w({},i.xperiod,{impliedEdits:{xtype:"scaled"}}),yperiod:w({},i.yperiod,{impliedEdits:{ytype:"scaled"}}),xperiod0:w({},i.xperiod0,{impliedEdits:{xtype:"scaled"}}),yperiod0:w({},i.yperiod0,{impliedEdits:{ytype:"scaled"}}),xperiodalignment:w({},i.xperiodalignment,{impliedEdits:{xtype:"scaled"}}),yperiodalignment:w({},i.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:P("x"),yhoverformat:P("y"),zhoverformat:P("z",1),hovertemplate:r(),hovertemplatefallback:a(),texttemplate:l({arrayOk:!1,editType:"plot"},{keys:["x","y","z","text"]}),texttemplatefallback:a({editType:"plot"}),textfont:t({editType:"plot",autoSize:!0,autoColor:!0,colorEditType:"style"}),showlegend:w({},C.showlegend,{dflt:!1}),zorder:i.zorder},v("",{cLetter:"z",autoColorDflt:!1}))}}),Oh=Ne({"src/traces/heatmap/xyz_defaults.js"(te,Z){var v=Fn(),w=In(),C=Yo();Z.exports=function(a,l,i,s,o,u){var d=i("z");o=o||"x",u=u||"y";var h,g;if(d===void 0||!d.length)return 0;if(w.isArray1D(d)){h=i(o),g=i(u);var m=w.minRowLength(h),E=w.minRowLength(g);if(m===0||E===0)return 0;l._length=Math.min(m,E,d.length)}else{if(h=P(o,i),g=P(u,i),!t(d))return 0;i("transpose"),l._length=null}var c=C.getComponentMethod("calendars","handleTraceDefaults");return c(a,l,[o,u],s),!0};function P(r,a){var l=a(r),i=l?a(r+"type","array"):"scaled";return i==="scaled"&&(a(r+"0"),a("d"+r)),l}function t(r){for(var a=!0,l=!1,i=!1,s,o=0;o<r.length;o++){if(s=r[o],!w.isArrayOrTypedArray(s)){a=!1;break}s.length>0&&(l=!0);for(var u=0;u<s.length;u++)if(v(s[u])){i=!0;break}}return a&&l&&i}}}),By=Ne({"src/traces/heatmap/label_defaults.js"(te,Z){var v=In();Z.exports=function(C,P){C("texttemplate"),C("texttemplatefallback");var t=v.extendFlat({},P.font,{color:"auto",size:"auto"});v.coerceFont(C,"textfont",t)}}}),e_=Ne({"src/traces/heatmap/style_defaults.js"(te,Z){Z.exports=function(w,C,P){var t=P("zsmooth");t===!1&&(P("xgap"),P("ygap")),P("zhoverformat")}}}),r2=Ne({"src/traces/heatmap/defaults.js"(te,Z){var v=In(),w=Oh(),C=By(),P=Rm(),t=e_(),r=Rh(),a=Vd();Z.exports=function(i,s,o,u){function d(g,m){return v.coerce(i,s,a,g,m)}var h=w(i,s,d,u);if(!h){s.visible=!1;return}P(i,s,u,d),d("xhoverformat"),d("yhoverformat"),d("text"),d("hovertext"),d("hovertemplate"),d("hovertemplatefallback"),C(d,u),t(i,s,d,u),d("hoverongaps"),d("connectgaps",v.isArray1D(s.z)&&s.zsmooth!==!1),r(i,s,u,d,{prefix:"",cLetter:"z"}),d("zorder")}}}),n2=Ne({"src/traces/histogram/bin_functions.js"(te,Z){var v=Fn();Z.exports={count:function(w,C,P){return P[w]++,1},sum:function(w,C,P,t){var r=t[C];return v(r)?(r=Number(r),P[w]+=r,r):0},avg:function(w,C,P,t,r){var a=t[C];return v(a)&&(a=Number(a),P[w]+=a,r[w]++),0},min:function(w,C,P,t){var r=t[C];if(v(r))if(r=Number(r),v(P[w])){if(P[w]>r){var a=r-P[w];return P[w]=r,a}}else return P[w]=r,r;return 0},max:function(w,C,P,t){var r=t[C];if(v(r))if(r=Number(r),v(P[w])){if(P[w]<r){var a=r-P[w];return P[w]=r,a}}else return P[w]=r,r;return 0}}}}),u0=Ne({"src/traces/histogram/norm_functions.js"(te,Z){Z.exports={percent:function(v,w){for(var C=v.length,P=100/w,t=0;t<C;t++)v[t]*=P},probability:function(v,w){for(var C=v.length,P=0;P<C;P++)v[P]/=w},density:function(v,w,C,P){var t=v.length;P=P||1;for(var r=0;r<t;r++)v[r]*=C[r]*P},"probability density":function(v,w,C,P){var t=v.length;P&&(w/=P);for(var r=0;r<t;r++)v[r]*=C[r]/w}}}}),Vx=Ne({"src/traces/histogram/average.js"(te,Z){Z.exports=function(w,C){for(var P=w.length,t=0,r=0;r<P;r++)C[r]?(w[r]/=C[r],t+=w[r]):w[r]=null;return t}}}),a2=Ne({"src/traces/histogram/bin_label_vals.js"(te,Z){var v=da(),w=v.ONEAVGYEAR,C=v.ONEAVGMONTH,P=v.ONEDAY,t=v.ONEHOUR,r=v.ONEMIN,a=v.ONESEC,l=Os().tickIncrement;Z.exports=function(h,g,m,E,c){var _=-1.1*g,T=-.1*g,M=h-T,k=m[0],b=m[1],A=Math.min(i(k+T,k+M,E,c),i(b+T,b+M,E,c)),y=Math.min(i(k+_,k+T,E,c),i(b+_,b+T,E,c)),f,p;if(A>y&&y<Math.abs(b-k)/4e3?(f=A,p=!1):(f=Math.min(A,y),p=!0),E.type==="date"&&f>P){var x=f===w?1:6,N=f===w?"M12":"M1";return function(D,B){var U=E.c2d(D,w,c),V=U.indexOf("-",x);V>0&&(U=U.substr(0,V));var q=E.d2c(U,0,c);if(q<D){var z=l(q,N,!1,c);(q+z)/2<D+h&&(q=z)}return B&&p?l(q,N,!0,c):q}}return function(D,B){var U=f*Math.round(D/f);return U+f/10<D&&U+f*.9<D+h&&(U+=f),B&&p&&(U-=f),U}};function i(d,h,g,m){if(d*h<=0)return 1/0;for(var E=Math.abs(h-d),c=g.type==="date",_=s(E,c),T=0;T<10;T++){var M=s(_*80,c);if(_===M)break;if(o(M,d,h,c,g,m))_=M;else break}return _}function s(d,h){return h&&d>a?d>P?d>w*1.1?w:d>C*1.1?C:P:d>t?t:d>r?r:a:Math.pow(10,Math.floor(Math.log(d)/Math.LN10))}function o(d,h,g,m,E,c){if(m&&d>P){var _=u(h,E,c),T=u(g,E,c),M=d===w?0:1;return _[M]!==T[M]}return Math.floor(g/d)-Math.floor(h/d)>.1}function u(d,h,g){var m=h.c2d(d,w,g).split("-");return m[0]===""&&(m.unshift(),m[0]="-"+m[0]),m}}}),i2=Ne({"src/traces/histogram/calc.js"(te,Z){var v=Fn(),w=In(),C=Yo(),P=Os(),{hasColorscale:t}=Bd(),r=Ud(),a=Nm(),l=n2(),i=u0(),s=Vx(),o=a2();function u(E,c){var _=[],T=[],M=c.orientation==="h",k=P.getFromId(E,M?c.yaxis:c.xaxis),b=M?"y":"x",A={x:"y",y:"x"}[b],y=c[b+"calendar"],f=c.cumulative,p,x=d(E,c,k,b),N=x[0],D=x[1],B=typeof N.size=="string",U=[],V=B?U:N,q=[],z=[],H=[],G=0,J=c.histnorm,le=c.histfunc,ge=J.indexOf("density")!==-1,de,me,W;f.enabled&&ge&&(J=J.replace(/ ?density$/,""),ge=!1);var ie=le==="max"||le==="min",se=ie?null:0,ee=l.count,pe=i[J],oe=!1,Y=function(Ye){return k.r2c(Ye,0,y)},ce;for(w.isArrayOrTypedArray(c[A])&&le!=="count"&&(ce=c[A],oe=le==="avg",ee=l[le]),p=Y(N.start),me=Y(N.end)+(p-P.tickIncrement(p,N.size,!1,y))/1e6;p<me&&_.length<1e6&&(de=P.tickIncrement(p,N.size,!1,y),_.push((p+de)/2),T.push(se),H.push([]),U.push(p),ge&&q.push(1/(de-p)),oe&&z.push(0),!(de<=p));)p=de;U.push(p),!B&&k.type==="date"&&(V={start:Y(V.start),end:Y(V.end),size:V.size}),E._fullLayout._roundFnOpts||(E._fullLayout._roundFnOpts={});var ue=c["_"+b+"bingroup"],_e={leftGap:1/0,rightGap:1/0};ue&&(E._fullLayout._roundFnOpts[ue]||(E._fullLayout._roundFnOpts[ue]=_e),_e=E._fullLayout._roundFnOpts[ue]);var Le=T.length,ze=!0,Xe=_e.leftGap,Ve=_e.rightGap,rt={};for(p=0;p<D.length;p++){var mt=D[p];W=w.findBin(mt,V),W>=0&&W<Le&&(G+=ee(W,p,T,ce,z),ze&&H[W].length&&mt!==D[H[W][0]]&&(ze=!1),H[W].push(p),rt[p]=W,Xe=Math.min(Xe,mt-U[W]),Ve=Math.min(Ve,U[W+1]-mt))}_e.leftGap=Xe,_e.rightGap=Ve;var _t;ze||(_t=function(Ye,yt){return function(){var wt=E._fullLayout._roundFnOpts[ue];return o(wt.leftGap,wt.rightGap,U,k,y)(Ye,yt)}}),oe&&(G=s(T,z)),pe&&pe(T,G,q),f.enabled&&m(T,f.direction,f.currentbin);var vt=Math.min(_.length,T.length),ut=[],Fe=0,Pe=vt-1;for(p=0;p<vt;p++)if(T[p]){Fe=p;break}for(p=vt-1;p>=Fe;p--)if(T[p]){Pe=p;break}for(p=Fe;p<=Pe;p++)if(v(_[p])&&v(T[p])){var be={p:_[p],s:T[p],b:0};f.enabled||(be.pts=H[p],ze?be.ph0=be.ph1=H[p].length?D[H[p][0]]:_[p]:(c._computePh=!0,be.ph0=_t(U[p]),be.ph1=_t(U[p+1],!0))),ut.push(be)}return ut.length===1&&(ut[0].width1=P.tickIncrement(ut[0].p,N.size,!1,y)-ut[0].p),t(c,"marker")&&r(E,c,{vals:c.marker.color,containerStr:"marker",cLetter:"c"}),t(c,"marker.line")&&r(E,c,{vals:c.marker.line.color,containerStr:"marker.line",cLetter:"c"}),a(ut,c),w.isArrayOrTypedArray(c.selectedpoints)&&w.tagSelected(ut,c,rt),ut}function d(E,c,_,T,M){var k=T+"bins",b=E._fullLayout,A=c["_"+T+"bingroup"],y=b._histogramBinOpts[A],f=b.barmode==="overlay",p,x,N,D,B,U,V,q=function(mt){return _.r2c(mt,0,D)},z=function(mt){return _.c2r(mt,0,D)},H=_.type==="date"?function(mt){return mt||mt===0?w.cleanDate(mt,null,D):null}:function(mt){return v(mt)?Number(mt):null};function G(mt,_t,vt){_t[mt+"Found"]?(_t[mt]=H(_t[mt]),_t[mt]===null&&(_t[mt]=vt[mt])):(U[mt]=_t[mt]=vt[mt],w.nestedProperty(x[0],k+"."+mt).set(vt[mt]))}if(c["_"+T+"autoBinFinished"])delete c["_"+T+"autoBinFinished"];else{x=y.traces;var J=[],le=!0,ge=!1,de=!1;for(p=0;p<x.length;p++)if(N=x[p],N.visible){var me=y.dirs[p];B=N["_"+me+"pos0"]=_.makeCalcdata(N,me),J=w.concat(J,B),delete N["_"+T+"autoBinFinished"],c.visible===!0&&(le?le=!1:(delete N._autoBin,N["_"+T+"autoBinFinished"]=1),C.traceIs(N,"2dMap")&&(ge=!0),N.type==="histogram2dcontour"&&(de=!0))}D=x[0][T+"calendar"];var W=P.autoBin(J,_,y.nbins,ge,D,y.sizeFound&&y.size),ie=x[0]._autoBin={};if(U=ie[y.dirs[0]]={},de&&(y.size||(W.start=z(P.tickIncrement(q(W.start),W.size,!0,D))),y.end===void 0&&(W.end=z(P.tickIncrement(q(W.end),W.size,!1,D)))),f&&!C.traceIs(c,"2dMap")&&W._dataSpan===0&&_.type!=="category"&&_.type!=="multicategory"&&c.bingroup===""&&typeof c.xbins>"u"){if(M)return[W,B,!0];W=h(E,c,_,T,k)}V=N.cumulative||{},V.enabled&&V.currentbin!=="include"&&(V.direction==="decreasing"?W.start=z(P.tickIncrement(q(W.start),W.size,!0,D)):W.end=z(P.tickIncrement(q(W.end),W.size,!1,D))),y.size=W.size,y.sizeFound||(U.size=W.size,w.nestedProperty(x[0],k+".size").set(W.size)),G("start",y,W),G("end",y,W)}B=c["_"+T+"pos0"],delete c["_"+T+"pos0"];var se=c._input[k]||{},ee=w.extendFlat({},y),pe=y.start,oe=_.r2l(se.start),Y=oe!==void 0;if((y.startFound||Y)&&oe!==_.r2l(pe)){var ce=Y?oe:w.aggNums(Math.min,null,B),ue={type:_.type==="category"||_.type==="multicategory"?"linear":_.type,r2l:_.r2l,dtick:y.size,tick0:pe,calendar:D,range:[ce,P.tickIncrement(ce,y.size,!1,D)].map(_.l2r)},_e=P.tickFirst(ue);_e>_.r2l(ce)&&(_e=P.tickIncrement(_e,y.size,!0,D)),ee.start=_.l2r(_e),Y||w.nestedProperty(c,k+".start").set(ee.start)}var Le=y.end,ze=_.r2l(se.end),Xe=ze!==void 0;if((y.endFound||Xe)&&ze!==_.r2l(Le)){var Ve=Xe?ze:w.aggNums(Math.max,null,B);ee.end=_.l2r(Ve),Xe||w.nestedProperty(c,k+".start").set(ee.end)}var rt="autobin"+T;return c._input[rt]===!1&&(c._input[k]=w.extendFlat({},c[k]||{}),delete c._input[rt],delete c[rt]),[ee,B]}function h(E,c,_,T,M){var k=E._fullLayout,b=g(E,c),A=!1,y=1/0,f=[c],p,x,N;for(p=0;p<b.length;p++)if(x=b[p],x===c)A=!0;else if(!A)N=k._histogramBinOpts[x["_"+T+"bingroup"]],y=Math.min(y,N.size||x[M].size);else{var D=d(E,x,_,T,!0),B=D[0],U=D[2];x["_"+T+"autoBinFinished"]=1,x["_"+T+"pos0"]=D[1],U?f.push(x):y=Math.min(y,B.size)}var V=new Array(f.length);for(p=0;p<f.length;p++)for(var q=f[p]["_"+T+"pos0"],z=0;z<q.length;z++)if(q[z]!==void 0){V[p]=q[z];break}for(isFinite(y)||(y=w.distinctVals(V).minDiff),p=0;p<f.length;p++){x=f[p];var H=x[T+"calendar"],G={start:_.c2r(V[p]-y/2,0,H),end:_.c2r(V[p]+y/2,0,H),size:y};x._input[M]=x[M]=G,N=k._histogramBinOpts[x["_"+T+"bingroup"]],N&&w.extendFlat(N,G)}return c[M]}function g(E,c){for(var _=c.xaxis,T=c.yaxis,M=c.orientation,k=[],b=E._fullData,A=0;A<b.length;A++){var y=b[A];y.type==="histogram"&&y.visible===!0&&y.orientation===M&&y.xaxis===_&&y.yaxis===T&&k.push(y)}return k}function m(E,c,_){var T,M,k;function b(y){k=E[y],E[y]/=2}function A(y){M=E[y],E[y]=k+M/2,k+=M}if(_==="half")if(c==="increasing")for(b(0),T=1;T<E.length;T++)A(T);else for(b(E.length-1),T=E.length-2;T>=0;T--)A(T);else if(c==="increasing"){for(T=1;T<E.length;T++)E[T]+=E[T-1];_==="exclude"&&(E.unshift(0),E.pop())}else{for(T=E.length-2;T>=0;T--)E[T]+=E[T+1];_==="exclude"&&(E.push(0),E.shift())}}Z.exports={calc:u,calcAllAutoBins:d}}}),NM=Ne({"src/traces/histogram2d/calc.js"(te,Z){var v=In(),w=Os(),C=n2(),P=u0(),t=Vx(),r=a2(),a=i2().calcAllAutoBins;Z.exports=function(u,d){var h=w.getFromId(u,d.xaxis),g=w.getFromId(u,d.yaxis),m=d.xcalendar,E=d.ycalendar,c=function($e){return h.r2c($e,0,m)},_=function($e){return g.r2c($e,0,E)},T=function($e){return h.c2r($e,0,m)},M=function($e){return g.c2r($e,0,E)},k,b,A,y,f=a(u,d,h,"x"),p=f[0],x=f[1],N=a(u,d,g,"y"),D=N[0],B=N[1],U=d._length;x.length>U&&x.splice(U,x.length-U),B.length>U&&B.splice(U,B.length-U);var V=[],q=[],z=[],H=typeof p.size=="string",G=typeof D.size=="string",J=[],le=[],ge=H?J:p,de=G?le:D,me=0,W=[],ie=[],se=d.histnorm,ee=d.histfunc,pe=se.indexOf("density")!==-1,oe=ee==="max"||ee==="min",Y=oe?null:0,ce=C.count,ue=P[se],_e=!1,Le=[],ze=[],Xe="z"in d?d.z:"marker"in d&&Array.isArray(d.marker.color)?d.marker.color:"";Xe&&ee!=="count"&&(_e=ee==="avg",ce=C[ee]);var Ve=p.size,rt=c(p.start),mt=c(p.end)+(rt-w.tickIncrement(rt,Ve,!1,m))/1e6;for(k=rt;k<mt;k=w.tickIncrement(k,Ve,!1,m))q.push(Y),J.push(k),_e&&z.push(0);J.push(k);var _t=q.length,vt=(k-rt)/_t,ut=T(rt+vt/2),Fe=D.size,Pe=_(D.start),be=_(D.end)+(Pe-w.tickIncrement(Pe,Fe,!1,E))/1e6;for(k=Pe;k<be;k=w.tickIncrement(k,Fe,!1,E)){V.push(q.slice()),le.push(k);var Ye=new Array(_t);for(b=0;b<_t;b++)Ye[b]=[];ie.push(Ye),_e&&W.push(z.slice())}le.push(k);var yt=V.length,wt=(k-Pe)/yt,ht=M(Pe+wt/2);pe&&(Le=l(q.length,ge,vt,H),ze=l(V.length,de,wt,G)),!H&&h.type==="date"&&(ge=i(c,ge)),!G&&g.type==="date"&&(de=i(_,de));var Yt=!0,$t=!0,fr=new Array(_t),mr=new Array(yt),Ur=1/0,jr=1/0,fn=1/0,Br=1/0;for(k=0;k<U;k++){var Qr=x[k],Ot=B[k];A=v.findBin(Qr,ge),y=v.findBin(Ot,de),A>=0&&A<_t&&y>=0&&y<yt&&(me+=ce(A,k,V[y],Xe,W[y]),ie[y][A].push(k),Yt&&(fr[A]===void 0?fr[A]=Qr:fr[A]!==Qr&&(Yt=!1)),$t&&(mr[y]===void 0?mr[y]=Ot:mr[y]!==Ot&&($t=!1)),Ur=Math.min(Ur,Qr-J[A]),jr=Math.min(jr,J[A+1]-Qr),fn=Math.min(fn,Ot-le[y]),Br=Math.min(Br,le[y+1]-Ot))}if(_e)for(y=0;y<yt;y++)me+=t(V[y],W[y]);if(ue)for(y=0;y<yt;y++)ue(V[y],me,Le,ze[y]);return{x,xRanges:s(J,Yt&&fr,Ur,jr,h,m),x0:ut,dx:vt,y:B,yRanges:s(le,$t&&mr,fn,Br,g,E),y0:ht,dy:wt,z:V,pts:ie}};function l(o,u,d,h){var g=new Array(o),m;if(h)for(m=0;m<o;m++)g[m]=1/(u[m+1]-u[m]);else{var E=1/d;for(m=0;m<o;m++)g[m]=E}return g}function i(o,u){return{start:o(u.start),end:o(u.end),size:u.size}}function s(o,u,d,h,g,m){var E,c=o.length-1,_=new Array(c),T=r(d,h,o,g,m);for(E=0;E<c;E++){var M=(u||[])[E];_[E]=M===void 0?[T(o[E]),T(o[E+1],!0)]:[M,M]}return _}}}),o2=Ne({"src/traces/heatmap/convert_column_xyz.js"(te,Z){var v=In(),w=da().BADNUM,C=Dm();Z.exports=function(t,r,a,l,i,s){var o=t._length,u=r.makeCalcdata(t,l),d=a.makeCalcdata(t,i);u=C(t,r,l,u).vals,d=C(t,a,i,d).vals;var h=t.text,g=h!==void 0&&v.isArray1D(h),m=t.hovertext,E=m!==void 0&&v.isArray1D(m),c,_,T=v.distinctVals(u),M=T.vals,k=v.distinctVals(d),b=k.vals,A=[],y,f,p=b.length,x=M.length;for(c=0;c<s.length;c++)A[c]=v.init2dArray(p,x);g&&(y=v.init2dArray(p,x)),E&&(f=v.init2dArray(p,x));var N=v.init2dArray(p,x);for(c=0;c<o;c++)if(u[c]!==w&&d[c]!==w){var D=v.findBin(u[c]+T.minDiff/2,M),B=v.findBin(d[c]+k.minDiff/2,b);for(_=0;_<s.length;_++){var U=s[_],V=t[U],q=A[_];q[B][D]=V[c],N[B][D]=c}g&&(y[B][D]=h[c]),E&&(f[B][D]=m[c])}for(t["_"+l]=M,t["_"+i]=b,_=0;_<s.length;_++)t["_"+s[_]]=A[_];g&&(t._text=y),E&&(t._hovertext=f),r&&r.type==="category"&&(t["_"+l+"CategoryMap"]=M.map(function(z){return r._categories[z]})),a&&a.type==="category"&&(t["_"+i+"CategoryMap"]=b.map(function(z){return a._categories[z]})),t._after2before=N}}}),s2=Ne({"src/traces/heatmap/clean_2d_array.js"(te,Z){var v=Fn(),w=In(),C=da().BADNUM;Z.exports=function(t,r,a,l){var i,s,o,u,d,h;function g(M){if(v(M))return+M}if(r&&r.transpose){for(i=0,d=0;d<t.length;d++)i=Math.max(i,t[d].length);if(i===0)return!1;o=function(M){return M.length},u=function(M,k,b){return(M[b]||[])[k]}}else i=t.length,o=function(M,k){return M[k].length},u=function(M,k,b){return(M[k]||[])[b]};var m=function(M,k,b){return k===C||b===C?C:u(M,k,b)};function E(M){if(r&&r.type!=="carpet"&&r.type!=="contourcarpet"&&M&&M.type==="category"&&r["_"+M._id.charAt(0)].length){var k=M._id.charAt(0),b={},A=r["_"+k+"CategoryMap"]||r[k];for(d=0;d<A.length;d++)b[A[d]]=d;return function(y){var f=b[M._categories[y]];return f+1?f:C}}else return w.identity}var c=E(a),_=E(l);l&&l.type==="category"&&(i=l._categories.length);var T=new Array(i);for(d=0;d<i;d++)for(a&&a.type==="category"?s=a._categories.length:s=o(t,d),T[d]=new Array(s),h=0;h<s;h++)T[d][h]=g(m(t,_(d),c(h)));return T}}}),l2=Ne({"src/traces/heatmap/interp2d.js"(te,Z){var v=In(),w=.01,C=[[-1,0],[1,0],[0,-1],[0,1]];function P(r){return .5-.25*Math.min(1,r*.5)}Z.exports=function(a,l){var i=1,s;for(t(a,l),s=0;s<l.length&&!(l[s][2]<4);s++);for(l=l.slice(s),s=0;s<100&&i>w;s++)i=t(a,l,P(i));return i>w&&v.log("interp2d didn't converge quickly",i),a};function t(r,a,l){var i=0,s,o,u,d,h,g,m,E,c,_,T,M,k;for(d=0;d<a.length;d++){for(s=a[d],o=s[0],u=s[1],T=r[o][u],_=0,c=0,h=0;h<4;h++)g=C[h],m=r[o+g[0]],m&&(E=m[u+g[1]],E!==void 0&&(_===0?M=k=E:(M=Math.min(M,E),k=Math.max(k,E)),c++,_+=E));if(c===0)throw"iterateInterp2d order is wrong: no defined neighbors";r[o][u]=_/c,T===void 0?c<4&&(i=1):(r[o][u]=(1+l)*r[o][u]-l*T,k>M&&(i=Math.max(i,Math.abs(r[o][u]-T)/(k-M))))}return i}}}),u2=Ne({"src/traces/heatmap/find_empties.js"(te,Z){var v=In().maxRowLength;Z.exports=function(C){var P=[],t={},r=[],a=C[0],l=[],i=[0,0,0],s=v(C),o,u,d,h,g,m,E,c;for(u=0;u<C.length;u++)for(o=l,l=a,a=C[u+1]||[],d=0;d<s;d++)l[d]===void 0&&(m=(l[d-1]!==void 0?1:0)+(l[d+1]!==void 0?1:0)+(o[d]!==void 0?1:0)+(a[d]!==void 0?1:0),m?(u===0&&m++,d===0&&m++,u===C.length-1&&m++,d===l.length-1&&m++,m<4&&(t[[u,d]]=[u,d,m]),P.push([u,d,m])):r.push([u,d]));for(;r.length;){for(E={},c=!1,g=r.length-1;g>=0;g--)h=r[g],u=h[0],d=h[1],m=((t[[u-1,d]]||i)[2]+(t[[u+1,d]]||i)[2]+(t[[u,d-1]]||i)[2]+(t[[u,d+1]]||i)[2])/20,m&&(E[h]=[u,d,m],r.splice(g,1),c=!0);if(!c)throw"findEmpties iterated with no new neighbors";for(h in E)t[h]=E[h],P.push(E[h])}return P.sort(function(_,T){return T[2]-_[2]})}}}),FA=Ne({"src/traces/heatmap/make_bound_array.js"(te,Z){var v=Yo(),w=In().isArrayOrTypedArray;Z.exports=function(P,t,r,a,l,i){var s=[],o=v.traceIs(P,"contour"),u=v.traceIs(P,"histogram"),d,h,g,m=w(t)&&t.length>1;if(m&&!u&&i.type!=="category"){var E=t.length;if(E<=l){if(o)s=Array.from(t).slice(0,l);else if(l===1)i.type==="log"?s=[.5*t[0],2*t[0]]:s=[t[0]-.5,t[0]+.5];else if(i.type==="log"){for(s=[Math.pow(t[0],1.5)/Math.pow(t[1],.5)],g=1;g<E;g++)s.push(Math.sqrt(t[g-1]*t[g]));s.push(Math.pow(t[E-1],1.5)/Math.pow(t[E-2],.5))}else{for(s=[1.5*t[0]-.5*t[1]],g=1;g<E;g++)s.push((t[g-1]+t[g])*.5);s.push(1.5*t[E-1]-.5*t[E-2])}if(E<l){var c=s[s.length-1],_;if(i.type==="log")for(_=c/s[s.length-2],g=E;g<l;g++)c*=_,s.push(c);else for(_=c-s[s.length-2],g=E;g<l;g++)c+=_,s.push(c)}}else return o?t.slice(0,l):t.slice(0,l+1)}else{var T=P[i._id.charAt(0)+"calendar"];if(u)d=i.r2c(r,0,T);else if(w(t)&&t.length===1)d=t[0];else if(r===void 0)d=0;else{var M=i.type==="log"?i.d2c:i.r2c;d=M(r,0,T)}for(h=a||1,g=o?0:-.5;g<l;g++)s.push(d+h*g)}return s}}}),Hx=Ne({"src/traces/heatmap/calc.js"(te,Z){var v=Yo(),w=In(),C=Os(),P=Dm(),t=NM(),r=Ud(),a=o2(),l=s2(),i=l2(),s=u2(),o=FA(),u=da().BADNUM;Z.exports=function(m,E){var c=C.getFromId(m,E.xaxis||"x"),_=C.getFromId(m,E.yaxis||"y"),T=v.traceIs(E,"contour"),M=v.traceIs(E,"histogram"),k=T?"best":E.zsmooth,b,A,y,f,p,x,N,D,B,U,V;if(c._minDtick=0,_._minDtick=0,M)V=t(m,E),f=V.orig_x,b=V.x,A=V.x0,y=V.dx,D=V.orig_y,p=V.y,x=V.y0,N=V.dy,B=V.z;else{var q=E.z;w.isArray1D(q)?(a(E,c,_,"x","y",["z"]),b=E._x,p=E._y,q=E._z):(f=E.x?c.makeCalcdata(E,"x"):[],D=E.y?_.makeCalcdata(E,"y"):[],b=P(E,c,"x",f).vals,p=P(E,_,"y",D).vals,E._x=b,E._y=p),A=E.x0,y=E.dx,x=E.y0,N=E.dy,B=l(q,E,c,_)}(c.rangebreaks||_.rangebreaks)&&(B=h(b,p,B),M||(b=d(b),p=d(p),E._x=b,E._y=p)),!M&&(T||E.connectgaps)&&(E._emptypoints=s(B),i(B,E._emptypoints));function z(ie){k=E._input.zsmooth=E.zsmooth=!1,w.warn('cannot use zsmooth: "fast": '+ie)}function H(ie){if(ie.length>1){var se=(ie[ie.length-1]-ie[0])/(ie.length-1),ee=Math.abs(se/100);for(U=0;U<ie.length-1;U++)if(Math.abs(ie[U+1]-ie[U]-se)>ee)return!1}return!0}E._islinear=!1,c.type==="log"||_.type==="log"?k==="fast"&&z("log axis found"):H(b)?H(p)?E._islinear=!0:k==="fast"&&z("y scale is not linear"):k==="fast"&&z("x scale is not linear");var G=w.maxRowLength(B),J=E.xtype==="scaled"?"":b,le=o(E,J,A,y,G,c),ge=E.ytype==="scaled"?"":p,de=o(E,ge,x,N,B.length,_);E._extremes[c._id]=C.findExtremes(c,le),E._extremes[_._id]=C.findExtremes(_,de);var me={x:le,y:de,z:B,text:E._text||E.text,hovertext:E._hovertext||E.hovertext};if(E.xperiodalignment&&f&&(me.orig_x=f),E.yperiodalignment&&D&&(me.orig_y=D),J&&J.length===le.length-1&&(me.xCenter=J),ge&&ge.length===de.length-1&&(me.yCenter=ge),M&&(me.xRanges=V.xRanges,me.yRanges=V.yRanges,me.pts=V.pts),T||r(m,E,{vals:B,cLetter:"z"}),T&&E.contours&&E.contours.coloring==="heatmap"){var W={type:E.type==="contour"?"heatmap":"histogram2d",xcalendar:E.xcalendar,ycalendar:E.ycalendar};me.xfill=o(W,J,A,y,G,c),me.yfill=o(W,ge,x,N,B.length,_)}return[me]};function d(g){for(var m=[],E=g.length,c=0;c<E;c++){var _=g[c];_!==u&&m.push(_)}return m}function h(g,m,E){for(var c=[],_=-1,T=0;T<E.length;T++)if(m[T]!==u){_++,c[_]=[];for(var M=0;M<E[T].length;M++)g[M]!==u&&c[_].push(E[T][M])}return c}}}),c2=Ne({"src/constants/pixelated_image.js"(te){te.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"]],te.STYLE=te.CSS_DECLARATIONS.map(function(Z){return Z.join(": ")+"; "}).join("")}}),FM=Ne({"src/lib/supports_pixelated_image.js"(te,Z){var v=c2(),w=zs(),C=In(),P=null;function t(){if(P!==null)return P;P=!1;var r=C.isSafari()||C.isMacWKWebView()||C.isIOS();if(window.navigator.userAgent&&!r){var a=Array.from(v.CSS_DECLARATIONS).reverse(),l=window.CSS&&window.CSS.supports||window.supportsCSS;if(typeof l=="function")P=a.some(function(u){return l.apply(null,u)});else{var i=w.tester.append("image").attr("style",v.STYLE),s=window.getComputedStyle(i.node()),o=s.imageRendering;P=a.some(function(u){var d=u[1];return o===d||o===d.toLowerCase()}),i.remove()}}return P}Z.exports=t}}),f2=Ne({"src/traces/heatmap/plot.js"(te,Z){var v=xn(),w=to(),C=Yo(),P=zs(),t=Os(),r=In(),a=hc(),l=lm(),i=Ha(),s=Nc().extractOpts,o=Nc().makeColorScaleFuncFromTrace,u=hp(),d=Ad(),h=d.LINE_SPACING,g=FM(),m=c2().STYLE,E="heatmap-label";function c(b){return b.selectAll("g."+E)}function _(b){c(b).remove()}Z.exports=function(b,A,y,f){var p=A.xaxis,x=A.yaxis;r.makeTraceGroups(f,y,"hm").each(function(N){var D=v.select(this),B=N[0],U=B.trace,V=U.xgap||0,q=U.ygap||0,z=B.z,H=B.x,G=B.y,J=B.xCenter,le=B.yCenter,ge=C.traceIs(U,"contour"),de=ge?"best":U.zsmooth,me=z.length,W=r.maxRowLength(z),ie=!1,se=!1,ee,pe,oe,Y,ce,ue,_e,Le;for(ue=0;ee===void 0&&ue<H.length-1;)ee=p.c2p(H[ue]),ue++;for(ue=H.length-1;pe===void 0&&ue>0;)pe=p.c2p(H[ue]),ue--;for(pe<ee&&(oe=pe,pe=ee,ee=oe,ie=!0),ue=0;Y===void 0&&ue<G.length-1;)Y=x.c2p(G[ue]),ue++;for(ue=G.length-1;ce===void 0&&ue>0;)ce=x.c2p(G[ue]),ue--;ce<Y&&(oe=Y,Y=ce,ce=oe,se=!0),ge&&(J=H,le=G,H=B.xfill,G=B.yfill);var ze="default";if(de?ze=de==="best"?"smooth":"fast":U._islinear&&V===0&&q===0&&g()&&(ze="fast"),ze!=="fast"){var Xe=de==="best"?0:.5;ee=Math.max(-Xe*p._length,ee),pe=Math.min((1+Xe)*p._length,pe),Y=Math.max(-Xe*x._length,Y),ce=Math.min((1+Xe)*x._length,ce)}var Ve=Math.round(pe-ee),rt=Math.round(ce-Y),mt=ee>=p._length||pe<=0||Y>=x._length||ce<=0;if(mt){var _t=D.selectAll("image").data([]);_t.exit().remove(),_(D);return}var vt,ut;ze==="fast"?(vt=W,ut=me):(vt=Ve,ut=rt);var Fe=document.createElement("canvas");Fe.width=vt,Fe.height=ut;var Pe=Fe.getContext("2d",{willReadFrequently:!0}),be=o(U,{noNumericCheck:!0,returnArray:!0}),Ye,yt;ze==="fast"?(Ye=ie?function(Kn){return W-1-Kn}:r.identity,yt=se?function(Kn){return me-1-Kn}:r.identity):(Ye=function(Kn){return r.constrain(Math.round(p.c2p(H[Kn])-ee),0,Ve)},yt=function(Kn){return r.constrain(Math.round(x.c2p(G[Kn])-Y),0,rt)});var wt=yt(0),ht=[wt,wt],Yt=ie?0:1,$t=se?0:1,fr=0,mr=0,Ur=0,jr=0,fn,Br,Qr,Ot,$e;function ot(Kn,Ui){if(Kn!==void 0){var Za=be(Kn);return Za[0]=Math.round(Za[0]),Za[1]=Math.round(Za[1]),Za[2]=Math.round(Za[2]),fr+=Ui,mr+=Za[0]*Ui,Ur+=Za[1]*Ui,jr+=Za[2]*Ui,Za}return[0,0,0,0]}function De(Kn,Ui,Za,Ki){var ho=Kn[Za.bin0];if(ho===void 0)return ot(void 0,1);var Co=Kn[Za.bin1],So=Ui[Za.bin0],Vo=Ui[Za.bin1],Oi=Co-ho||0,ps=So-ho||0,as;return Co===void 0?Vo===void 0?as=0:So===void 0?as=2*(Vo-ho):as=(2*Vo-So-ho)*2/3:Vo===void 0?So===void 0?as=0:as=(2*ho-Co-So)*2/3:So===void 0?as=(2*Vo-Co-ho)*2/3:as=Vo+ho-Co-So,ot(ho+Za.frac*Oi+Ki.frac*(ps+Za.frac*as))}if(ze!=="default"){var Ee=0,Ae;try{Ae=new Uint8Array(vt*ut*4)}catch{Ae=new Array(vt*ut*4)}if(ze==="smooth"){var Ie=J||H,tt=le||G,st=new Array(Ie.length),Bt=new Array(tt.length),Ft=new Array(Ve),Wt=J?M:T,lr=le?M:T,Rr,Mr,Sr;for(ue=0;ue<Ie.length;ue++)st[ue]=Math.round(p.c2p(Ie[ue])-ee);for(ue=0;ue<tt.length;ue++)Bt[ue]=Math.round(x.c2p(tt[ue])-Y);for(ue=0;ue<Ve;ue++)Ft[ue]=Wt(ue,st);for(_e=0;_e<rt;_e++)for(Rr=lr(_e,Bt),Mr=z[Rr.bin0],Sr=z[Rr.bin1],ue=0;ue<Ve;ue++,Ee+=4)$e=De(Mr,Sr,Ft[ue],Rr),k(Ae,Ee,$e)}else for(_e=0;_e<me;_e++)for(Ot=z[_e],ht=yt(_e),ue=0;ue<W;ue++)$e=ot(Ot[ue],1),Ee=(ht*W+Ye(ue))*4,k(Ae,Ee,$e);var Kr=Pe.createImageData(vt,ut);try{Kr.data.set(Ae)}catch{var Hn=Kr.data,ga=Hn.length;for(_e=0;_e<ga;_e++)Hn[_e]=Ae[_e]}Pe.putImageData(Kr,0,0)}else{var ua=Math.floor(V/2),Ta=Math.floor(q/2);for(_e=0;_e<me;_e++)if(Ot=z[_e],ht.reverse(),ht[$t]=yt(_e+1),!(ht[0]===ht[1]||ht[0]===void 0||ht[1]===void 0))for(Br=Ye(0),fn=[Br,Br],ue=0;ue<W;ue++)fn.reverse(),fn[Yt]=Ye(ue+1),!(fn[0]===fn[1]||fn[0]===void 0||fn[1]===void 0)&&(Qr=Ot[ue],$e=ot(Qr,(fn[1]-fn[0])*(ht[1]-ht[0])),Pe.fillStyle="rgba("+$e.join(",")+")",Pe.fillRect(fn[0]+ua,ht[0]+Ta,fn[1]-fn[0]-V,ht[1]-ht[0]-q))}mr=Math.round(mr/fr),Ur=Math.round(Ur/fr),jr=Math.round(jr/fr);var Aa=w("rgb("+mr+","+Ur+","+jr+")");b._hmpixcount=(b._hmpixcount||0)+fr,b._hmlumcount=(b._hmlumcount||0)+fr*Aa.getLuminance();var ia=D.selectAll("image").data(N);ia.enter().append("svg:image").attr({xmlns:u.svg,preserveAspectRatio:"none"}),ia.attr({height:rt,width:Ve,x:ee,y:Y,"xlink:href":Fe.toDataURL("image/png")}),ze==="fast"&&!de&&ia.attr("style",m),_(D);var $a=U.texttemplate;if($a){var ci=s(U),_r={type:"linear",range:[ci.min,ci.max],_separators:p._separators,_numFormat:p._numFormat},Qt=U.type==="histogram2dcontour",yr=U.type==="contour",br=yr?1:0,an=yr?me-1:me,wn=yr?1:0,Ln=yr?W-1:W,Bn=[];for(ue=br;ue<an;ue++){var xa;if(yr)xa=B.y[ue];else if(Qt){if(ue===0||ue===me-1)continue;xa=B.y[ue]}else if(B.yCenter)xa=B.yCenter[ue];else{if(ue+1===me&&B.y[ue+1]===void 0)continue;xa=(B.y[ue]+B.y[ue+1])/2}var za=Math.round(x.c2p(xa));if(!(0>za||za>x._length))for(_e=wn;_e<Ln;_e++){var Ia;if(yr)Ia=B.x[_e];else if(Qt){if(_e===0||_e===W-1)continue;Ia=B.x[_e]}else if(B.xCenter)Ia=B.xCenter[_e];else{if(_e+1===W&&B.x[_e+1]===void 0)continue;Ia=(B.x[_e]+B.x[_e+1])/2}var Ba=Math.round(p.c2p(Ia));if(!(0>Ba||Ba>p._length)){var Ka=l({x:Ia,y:xa},U,b._fullLayout);Ka.x=Ia,Ka.y=xa;var fa=B.z[ue][_e];fa===void 0?(Ka.z="",Ka.zLabel=""):(Ka.z=fa,Ka.zLabel=t.tickText(_r,fa,"hover").text);var Bi=B.text&&B.text[ue]&&B.text[ue][_e];(Bi===void 0||Bi===!1)&&(Bi=""),Ka.text=Bi;var Yi=r.texttemplateString({data:[Ka,U._meta],fallback:U.texttemplatefallback,labels:Ka,locale:b._fullLayout._d3locale,template:$a});if(Yi){var Ht=Yi.split("<br>"),kt=Ht.length,qr=0;for(Le=0;Le<kt;Le++)qr=Math.max(qr,Ht[Le].length);Bn.push({l:kt,c:qr,t:Yi,x:Ba,y:za,z:fa})}}}}var en=U.textfont,rn=en.size,Wr=b._fullLayout.font.size;if(!rn||rn==="auto"){var tn=1/0,Tn=1/0,dn=0,It=0;for(Le=0;Le<Bn.length;Le++){var xr=Bn[Le];if(dn=Math.max(dn,xr.l),It=Math.max(It,xr.c),Le<Bn.length-1){var Yr=Bn[Le+1],An=Math.abs(Yr.x-xr.x),Zn=Math.abs(Yr.y-xr.y);An&&(tn=Math.min(tn,An)),Zn&&(Tn=Math.min(Tn,Zn))}}!isFinite(tn)||!isFinite(Tn)?rn=Wr:(tn-=V,Tn-=q,tn/=It,Tn/=dn,tn/=h/2,Tn/=h,rn=Math.min(Math.floor(tn),Math.floor(Tn),Wr))}if(rn<=0||!isFinite(rn))return;var sa=function(Kn){return Kn.x},oa=function(Kn){return Kn.y-rn*(Kn.l*h/2-1)},Sn=c(D).data(Bn);Sn.enter().append("g").classed(E,1).append("text").attr("text-anchor","middle").each(function(Kn){var Ui=v.select(this),Za=en.color;(!Za||Za==="auto")&&(Za=i.contrast(Kn.z===void 0?b._fullLayout.plot_bgcolor:"rgba("+be(Kn.z).join()+")")),Ui.attr("data-notex",1).call(a.positionText,sa(Kn),oa(Kn)).call(P.font,{family:en.family,size:rn,color:Za,weight:en.weight,style:en.style,variant:en.variant,textcase:en.textcase,lineposition:en.lineposition,shadow:en.shadow}).text(Kn.t).call(a.convertToTspans,b)})}})};function T(b,A){var y=A.length-2,f=r.constrain(r.findBin(b,A),0,y),p=A[f],x=A[f+1],N=r.constrain(f+(b-p)/(x-p)-.5,0,y),D=Math.round(N),B=Math.abs(N-D);return!N||N===y||!B?{bin0:D,bin1:D,frac:0}:{bin0:D,frac:B,bin1:Math.round(D+B/(N-D))}}function M(b,A){var y=A.length-1,f=r.constrain(r.findBin(b,A),0,y),p=A[f],x=A[f+1],N=(b-p)/(x-p)||0;return N<=0?{bin0:f,bin1:f,frac:0}:N<.5?{bin0:f,bin1:f+1,frac:N}:{bin0:f+1,bin1:f,frac:1-N}}function k(b,A,y){b[A]=y[0],b[A+1]=y[1],b[A+2]=y[2],b[A+3]=Math.round(y[3]*255)}}}),Bg=Ne({"src/traces/heatmap/colorbar.js"(te,Z){Z.exports={min:"zmin",max:"zmax"}}}),h2=Ne({"src/traces/heatmap/style.js"(te,Z){var v=xn();Z.exports=function(C){v.select(C).selectAll(".hm image").style("opacity",function(P){return P.trace.opacity})}}}),Gx=Ne({"src/traces/heatmap/hover.js"(te,Z){var v=oh(),w=In(),C=w.isArrayOrTypedArray,P=Os(),t=Nc().extractOpts;Z.exports=function(a,l,i,s,o){o||(o={});var u=o.isContour,d=a.cd[0],h=d.trace,g=a.xa,m=a.ya,E=d.x,c=d.y,_=d.z,T=d.xCenter,M=d.yCenter,k=d.zmask,b=h.zhoverformat,A=E,y=c,f,p,x,N;if(a.index!==!1){try{x=Math.round(a.index[1]),N=Math.round(a.index[0])}catch{w.error("Error hovering on heatmap, pointNumber must be [row,col], found:",a.index);return}if(x<0||x>=_[0].length||N<0||N>_.length)return}else{if(v.inbox(l-E[0],l-E[E.length-1],0)>0||v.inbox(i-c[0],i-c[c.length-1],0)>0)return;if(u){var D;for(A=[2*E[0]-E[1]],D=1;D<E.length;D++)A.push((E[D]+E[D-1])/2);for(A.push([2*E[E.length-1]-E[E.length-2]]),y=[2*c[0]-c[1]],D=1;D<c.length;D++)y.push((c[D]+c[D-1])/2);y.push([2*c[c.length-1]-c[c.length-2]])}x=Math.max(0,Math.min(A.length-2,w.findBin(l,A))),N=Math.max(0,Math.min(y.length-2,w.findBin(i,y)))}var B=g.c2p(E[x]),U=g.c2p(E[x+1]),V=m.c2p(c[N]),q=m.c2p(c[N+1]),z,H;u?(z=d.orig_x||E,H=d.orig_y||c,U=B,f=z[x],q=V,p=H[N]):(z=d.orig_x||T||E,H=d.orig_y||M||c,f=T?z[x]:(z[x]+z[x+1])/2,p=M?H[N]:(H[N]+H[N+1])/2,g&&g.type==="category"&&(f=E[x]),m&&m.type==="category"&&(p=c[N]),h.zsmooth&&(B=U=g.c2p(f),V=q=m.c2p(p)));var G=_[N][x];if(k&&!k[N][x]&&(G=void 0),!(G===void 0&&!h.hoverongaps)){var J;C(d.hovertext)&&C(d.hovertext[N])?J=d.hovertext[N][x]:C(d.text)&&C(d.text[N])&&(J=d.text[N][x]);var le=t(h),ge={type:"linear",range:[le.min,le.max],hoverformat:b,_separators:g._separators,_numFormat:g._numFormat},de=P.tickText(ge,G,"hover").text;return[w.extendFlat(a,{index:h._after2before?h._after2before[N][x]:[N,x],distance:a.maxHoverDistance,spikeDistance:a.maxSpikeDistance,x0:B,x1:U,y0:V,y1:q,xLabelVal:f,yLabelVal:p,zLabelVal:G,zLabel:de,text:J})]}}}}),BM=Ne({"src/traces/heatmap/index.js"(te,Z){Z.exports={attributes:Vd(),supplyDefaults:r2(),calc:Hx(),plot:f2(),colorbar:Bg(),style:h2(),hoverPoints:Gx(),moduleType:"trace",name:"heatmap",basePlotModule:Ih(),categories:["cartesian","svg","2dMap","showLegend"],meta:{}}}}),jM=Ne({"lib/heatmap.js"(te,Z){Z.exports=BM()}}),BA=Ne({"src/traces/histogram/bin_attributes.js"(te,Z){Z.exports=function(w,C){return{start:{valType:"any",editType:"calc"},end:{valType:"any",editType:"calc"},size:{valType:"any",editType:"calc"},editType:"calc"}}}}),UM=Ne({"src/traces/histogram/constants.js"(te,Z){Z.exports={eventDataKeys:["binNumber"]}}}),d2=Ne({"src/traces/histogram/attributes.js"(te,Z){var v=id(),w=Ac().axisHoverFormat,{hovertemplateAttrs:C,texttemplateAttrs:P,templatefallbackAttrs:t}=Fl(),r=bo(),a=BA(),l=UM(),i=fi().extendFlat;Z.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},xhoverformat:w("x"),yhoverformat:w("y"),text:i({},v.text,{}),hovertext:i({},v.hovertext,{}),orientation:v.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:a("x",!0),nbinsy:{valType:"integer",min:0,dflt:0,editType:"calc"},ybins:a("y",!0),autobinx:{valType:"boolean",dflt:null,editType:"calc"},autobiny:{valType:"boolean",dflt:null,editType:"calc"},bingroup:{valType:"string",dflt:"",editType:"calc"},hovertemplate:C({},{keys:l.eventDataKeys}),hovertemplatefallback:t(),texttemplate:P({arrayOk:!1,editType:"plot"},{keys:["label","value"]}),texttemplatefallback:t({editType:"plot"}),textposition:i({},v.textposition,{arrayOk:!1}),textfont:r({arrayOk:!1,editType:"plot",colorEditType:"style"}),outsidetextfont:r({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextfont:r({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextanchor:v.insidetextanchor,textangle:v.textangle,cliponaxis:v.cliponaxis,constraintext:v.constraintext,marker:v.marker,offsetgroup:v.offsetgroup,alignmentgroup:v.alignmentgroup,selected:v.selected,unselected:v.unselected,zorder:v.zorder}}}),GL=Ne({"src/traces/histogram/defaults.js"(te,Z){var v=Yo(),w=In(),C=Ha(),P=mp().handleText,t=l0(),r=d2();Z.exports=function(l,i,s,o){function u(y,f){return w.coerce(l,i,r,y,f)}var d=u("x"),h=u("y"),g=u("cumulative.enabled");g&&(u("cumulative.direction"),u("cumulative.currentbin")),u("text");var m=u("textposition");P(l,i,o,u,m,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),u("hovertext"),u("hovertemplate"),u("hovertemplatefallback"),u("xhoverformat"),u("yhoverformat");var E=u("orientation",h&&!d?"h":"v"),c=E==="v"?"x":"y",_=E==="v"?"y":"x",T=d&&h?Math.min(w.minRowLength(d)&&w.minRowLength(h)):w.minRowLength(i[c]||[]);if(!T){i.visible=!1;return}i._length=T;var M=v.getComponentMethod("calendars","handleTraceDefaults");M(l,i,["x","y"],o);var k=i[_];k&&u("histfunc"),u("histnorm"),u("autobin"+c),t(l,i,u,s,o),w.coerceSelectionMarkerOpacity(i,u);var b=(i.marker.line||{}).color,A=v.getComponentMethod("errorbars","supplyDefaults");A(l,i,b||C.defaultLine,{axis:"y"}),A(l,i,b||C.defaultLine,{axis:"x",inherit:"y"}),u("zorder")}}}),v2=Ne({"src/traces/histogram/cross_trace_defaults.js"(te,Z){var v=In(),w=Wf(),C=Yo().traceIs,P=U0(),t=mp().validateCornerradius,r=v.nestedProperty,a=My().getAxisGroup,l=[{aStr:{x:"xbins.start",y:"ybins.start"},name:"start"},{aStr:{x:"xbins.end",y:"ybins.end"},name:"end"},{aStr:{x:"xbins.size",y:"ybins.size"},name:"size"},{aStr:{x:"nbinsx",y:"nbinsy"},name:"nbins"}],i=["x","y"];Z.exports=function(o,u){var d=u._histogramBinOpts={},h=[],g={},m=[],E,c,_,T,M,k,b;function A(de,me){return v.coerce(E._input,E,E._module.attributes,de,me)}function y(de){return de.orientation==="v"?"x":"y"}function f(de,me){var W=w.getFromTrace({_fullLayout:u},de,me);return W.type}function p(de,me,W){var ie=de.uid+"__"+W;me||(me=ie);var se=f(de,W),ee=de[W+"calendar"]||"",pe=d[me],oe=!0;pe&&(se===pe.axType&&ee===pe.calendar?(oe=!1,pe.traces.push(de),pe.dirs.push(W)):(me=ie,se!==pe.axType&&v.warn(["Attempted to group the bins of trace",de.index,"set on a","type:"+se,"axis","with bins on","type:"+pe.axType,"axis."].join(" ")),ee!==pe.calendar&&v.warn(["Attempted to group the bins of trace",de.index,"set with a",ee,"calendar","with bins",pe.calendar?"on a "+pe.calendar+" calendar":"w/o a set calendar"].join(" ")))),oe&&(d[me]={traces:[de],dirs:[W],axType:se,calendar:de[W+"calendar"]||""}),de["_"+W+"bingroup"]=me}for(M=0;M<o.length;M++)if(E=o[M],C(E,"histogram")){if(h.push(E),delete E._xautoBinFinished,delete E._yautoBinFinished,E.type==="histogram"){var x=A("marker.cornerradius",u.barcornerradius);E.marker&&(E.marker.cornerradius=t(x))}C(E,"2dMap")||P(E._input,E,u,A,u.barmode)}var N=u._alignmentOpts||{};for(M=0;M<h.length;M++){if(E=h[M],_="",!C(E,"2dMap")){if(T=y(E),u.barmode==="group"&&E.alignmentgroup){var D=E[T+"axis"],B=a(u,D)+E.orientation;(N[B]||{})[E.alignmentgroup]&&(_=B)}!_&&u.barmode!=="overlay"&&(_=a(u,E.xaxis)+a(u,E.yaxis)+y(E))}_?(g[_]||(g[_]=[]),g[_].push(E)):m.push(E)}for(_ in g){if(c=g[_],c.length===1){m.push(c[0]);continue}var U=!1;for(c.length&&(E=c[0],U=A("bingroup")),_=U||_,M=0;M<c.length;M++){E=c[M];var V=E._input.bingroup;V&&V!==_&&v.warn(["Trace",E.index,"must match","within bingroup",_+".","Ignoring its bingroup:",V,"setting."].join(" ")),E.bingroup=_,p(E,_,y(E))}}for(M=0;M<m.length;M++){E=m[M];var q=A("bingroup");if(C(E,"2dMap"))for(b=0;b<2;b++){T=i[b];var z=A(T+"bingroup",q?q+"__"+T:null);p(E,z,T)}else p(E,q,y(E))}for(_ in d){var H=d[_];for(c=H.traces,k=0;k<l.length;k++){var G=l[k],J=G.name,le,ge;if(!(J==="nbins"&&H.sizeFound)){for(M=0;M<c.length;M++){if(E=c[M],T=H.dirs[M],le=G.aStr[T],r(E._input,le).get()!==void 0){H[J]=A(le),H[J+"Found"]=!0;break}ge=(E._autoBin||{})[T]||{},ge[J]&&r(E,le).set(ge[J])}if(J==="start"||J==="end")for(;M<c.length;M++)E=c[M],E["_"+T+"bingroup"]&&(ge=(E._autoBin||{})[T]||{},A(le,ge[J]));J==="nbins"&&!H.sizeFound&&!H.nbinsFound&&(E=c[0],H[J]=A(le))}}}}}}),t_=Ne({"src/traces/histogram/hover.js"(te,Z){var v=Bc().hoverPoints,w=Os().hoverLabelText;Z.exports=function(P,t,r,a,l){var i=v(P,t,r,a,l);if(i){P=i[0];var s=P.cd[P.index],o=P.cd[0].trace;if(!o.cumulative.enabled){var u=o.orientation==="h"?"y":"x";P[u+"Label"]=w(P[u+"a"],[s.ph0,s.ph1],o[u+"hoverformat"])}return i}}}}),jA=Ne({"src/traces/histogram/event_data.js"(te,Z){Z.exports=function(w,C,P,t,r){if(w.x="xVal"in C?C.xVal:C.x,w.y="yVal"in C?C.yVal:C.y,"zLabelVal"in C&&(w.z=C.zLabelVal),C.xa&&(w.xaxis=C.xa),C.ya&&(w.yaxis=C.ya),!(P.cumulative||{}).enabled){var a=Array.isArray(r)?t[0].pts[r[0]][r[1]]:t[r].pts;w.pointNumbers=a,w.binNumber=w.pointNumber,delete w.pointNumber,delete w.pointIndex;var l;if(P._indexToPoints){l=[];for(var i=0;i<a.length;i++)l=l.concat(P._indexToPoints[a[i]])}else l=a;w.pointIndices=l}return w}}}),p2=Ne({"src/traces/histogram/index.js"(te,Z){Z.exports={attributes:d2(),layoutAttributes:pp(),supplyDefaults:GL(),crossTraceDefaults:v2(),supplyLayoutDefaults:IA(),calc:i2().calc,crossTraceCalc:q0().crossTraceCalc,plot:mu().plot,layerName:"barlayer",style:qd().style,styleOnSelect:qd().styleOnSelect,colorbar:sh(),hoverPoints:t_(),selectPoints:Ng(),eventData:jA(),moduleType:"trace",name:"histogram",basePlotModule:Ih(),categories:["bar-like","cartesian","svg","bar","histogram","oriented","errorBarsOK","showLegend"],meta:{}}}}),m2=Ne({"lib/histogram.js"(te,Z){Z.exports=p2()}}),g2=Ne({"src/traces/histogram2d/attributes.js"(te,Z){var v=d2(),w=BA(),C=Vd(),P=qo(),t=Ac().axisHoverFormat,{hovertemplateAttrs:r,texttemplateAttrs:a,templatefallbackAttrs:l}=Fl(),i=Wu(),s=fi().extendFlat;Z.exports=s({x:v.x,y:v.y,z:{valType:"data_array",editType:"calc"},marker:{color:{valType:"data_array",editType:"calc"},editType:"calc"},histnorm:v.histnorm,histfunc:v.histfunc,nbinsx:v.nbinsx,xbins:w("x"),nbinsy:v.nbinsy,ybins:w("y"),autobinx:v.autobinx,autobiny:v.autobiny,bingroup:s({},v.bingroup,{}),xbingroup:s({},v.bingroup,{}),ybingroup:s({},v.bingroup,{}),xgap:C.xgap,ygap:C.ygap,zsmooth:C.zsmooth,xhoverformat:t("x"),yhoverformat:t("y"),zhoverformat:t("z",1),hovertemplate:r({},{keys:["z"]}),hovertemplatefallback:l(),texttemplate:a({arrayOk:!1,editType:"plot"},{keys:["z"]}),texttemplatefallback:l({editType:"plot"}),textfont:C.textfont,showlegend:s({},P.showlegend,{dflt:!1})},i("",{cLetter:"z",autoColorDflt:!1}))}}),y2=Ne({"src/traces/histogram2d/sample_defaults.js"(te,Z){var v=Yo(),w=In();Z.exports=function(P,t,r,a){var l=r("x"),i=r("y"),s=w.minRowLength(l),o=w.minRowLength(i);if(!s||!o){t.visible=!1;return}t._length=Math.min(s,o);var u=v.getComponentMethod("calendars","handleTraceDefaults");u(P,t,["x","y"],a);var d=r("z")||r("marker.color");d&&r("histfunc"),r("histnorm"),r("autobinx"),r("autobiny")}}}),XL=Ne({"src/traces/histogram2d/defaults.js"(te,Z){var v=In(),w=y2(),C=e_(),P=Rh(),t=By(),r=g2();Z.exports=function(l,i,s,o){function u(d,h){return v.coerce(l,i,r,d,h)}w(l,i,u,o),i.visible!==!1&&(C(l,i,u,o),P(l,i,o,u,{prefix:"",cLetter:"z"}),u("hovertemplate"),u("hovertemplatefallback"),t(u,o),u("xhoverformat"),u("yhoverformat"))}}}),qM=Ne({"src/traces/histogram2d/hover.js"(te,Z){var v=Gx(),w=Os().hoverLabelText;Z.exports=function(P,t,r,a,l){var i=v(P,t,r,a,l);if(i){P=i[0];var s=P.index,o=s[0],u=s[1],d=P.cd[0],h=d.trace,g=d.xRanges[u],m=d.yRanges[o];return P.xLabel=w(P.xa,[g[0],g[1]],h.xhoverformat),P.yLabel=w(P.ya,[m[0],m[1]],h.yhoverformat),i}}}}),VM=Ne({"src/traces/histogram2d/index.js"(te,Z){Z.exports={attributes:g2(),supplyDefaults:XL(),crossTraceDefaults:v2(),calc:Hx(),plot:f2(),layerName:"heatmaplayer",colorbar:Bg(),style:h2(),hoverPoints:qM(),eventData:jA(),moduleType:"trace",name:"histogram2d",basePlotModule:Ih(),categories:["cartesian","svg","2dMap","histogram","showLegend"],meta:{}}}}),HM=Ne({"lib/histogram2d.js"(te,Z){Z.exports=VM()}}),_2=Ne({"src/constants/filter_ops.js"(te,Z){Z.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}}}),Xx=Ne({"src/traces/contour/attributes.js"(te,Z){var v=Vd(),w=tf(),C=Ac(),P=C.axisHoverFormat,t=C.descriptionOnlyNumbers,r=Wu(),a=Fd().dash,l=bo(),i=fi().extendFlat,s=_2(),o=s.COMPARISON_OPS2,u=s.INTERVAL_OPS,d=w.line;Z.exports=i({z:v.z,x:v.x,x0:v.x0,dx:v.dx,y:v.y,y0:v.y0,dy:v.dy,xperiod:v.xperiod,yperiod:v.yperiod,xperiod0:w.xperiod0,yperiod0:w.yperiod0,xperiodalignment:v.xperiodalignment,yperiodalignment:v.yperiodalignment,text:v.text,hovertext:v.hovertext,transpose:v.transpose,xtype:v.xtype,ytype:v.ytype,xhoverformat:P("x"),yhoverformat:P("y"),zhoverformat:P("z",1),hovertemplate:v.hovertemplate,hovertemplatefallback:v.hovertemplatefallback,texttemplate:i({},v.texttemplate,{}),texttemplatefallback:v.texttemplatefallback,textfont:i({},v.textfont,{}),hoverongaps:v.hoverongaps,connectgaps:i({},v.connectgaps,{}),fillcolor:{valType:"color",editType:"calc"},autocontour:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"contours.start":void 0,"contours.end":void 0,"contours.size":void 0}},ncontours:{valType:"integer",dflt:15,min:1,editType:"calc"},contours:{type:{valType:"enumerated",values:["levels","constraint"],dflt:"levels",editType:"calc"},start:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},end:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},size:{valType:"number",dflt:null,min:0,editType:"plot",impliedEdits:{"^autocontour":!1}},coloring:{valType:"enumerated",values:["fill","heatmap","lines","none"],dflt:"fill",editType:"calc"},showlines:{valType:"boolean",dflt:!0,editType:"plot"},showlabels:{valType:"boolean",dflt:!1,editType:"plot"},labelfont:l({editType:"plot",colorEditType:"style"}),labelformat:{valType:"string",dflt:"",editType:"plot",description:t("contour label")},operation:{valType:"enumerated",values:[].concat(o).concat(u),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:i({},d.color,{editType:"style+colorbars"}),width:{valType:"number",min:0,editType:"style+colorbars"},dash:a,smoothing:i({},d.smoothing,{}),editType:"plot"},zorder:w.zorder},r("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))}}),x2=Ne({"src/traces/histogram2dcontour/attributes.js"(te,Z){var v=g2(),w=Xx(),C=Wu(),P=Ac().axisHoverFormat,t=fi().extendFlat;Z.exports=t({x:v.x,y:v.y,z:v.z,marker:v.marker,histnorm:v.histnorm,histfunc:v.histfunc,nbinsx:v.nbinsx,xbins:v.xbins,nbinsy:v.nbinsy,ybins:v.ybins,autobinx:v.autobinx,autobiny:v.autobiny,bingroup:v.bingroup,xbingroup:v.xbingroup,ybingroup:v.ybingroup,autocontour:w.autocontour,ncontours:w.ncontours,contours:w.contours,line:{color:w.line.color,width:t({},w.line.width,{dflt:.5}),dash:w.line.dash,smoothing:w.line.smoothing,editType:"plot"},xhoverformat:P("x"),yhoverformat:P("y"),zhoverformat:P("z",1),hovertemplate:v.hovertemplate,hovertemplatefallback:v.hovertemplatefallback,texttemplate:w.texttemplate,texttemplatefallback:w.texttemplatefallback,textfont:w.textfont},C("",{cLetter:"z",editTypeOverride:"calc"}))}}),b2=Ne({"src/traces/contour/contours_defaults.js"(te,Z){Z.exports=function(w,C,P,t){var r=t("contours.start"),a=t("contours.end"),l=r===!1||a===!1,i=P("contours.size"),s;l?s=C.autocontour=!0:s=P("autocontour",!1),(s||!i)&&P("ncontours")}}}),UA=Ne({"src/traces/contour/label_defaults.js"(te,Z){var v=In();Z.exports=function(C,P,t,r){r||(r={});var a=C("contours.showlabels");if(a){var l=P.font;v.coerceFont(C,"contours.labelfont",l,{overrideDflt:{color:t}}),C("contours.labelformat")}r.hasHover!==!1&&C("zhoverformat")}}}),Wx=Ne({"src/traces/contour/style_defaults.js"(te,Z){var v=Rh(),w=UA();Z.exports=function(P,t,r,a,l){var i=r("contours.coloring"),s,o="";i==="fill"&&(s=r("contours.showlines")),s!==!1&&(i!=="lines"&&(o=r("line.color","#000")),r("line.width",.5),r("line.dash")),i!=="none"&&(P.showlegend!==!0&&(t.showlegend=!1),t._dfltShowLegend=!1,v(P,t,a,r,{prefix:"",cLetter:"z"})),r("line.smoothing"),w(r,a,o,l)}}}),GM=Ne({"src/traces/histogram2dcontour/defaults.js"(te,Z){var v=In(),w=y2(),C=b2(),P=Wx(),t=By(),r=x2();Z.exports=function(l,i,s,o){function u(h,g){return v.coerce(l,i,r,h,g)}function d(h){return v.coerce2(l,i,r,h)}w(l,i,u,o),i.visible!==!1&&(C(l,i,u,d),P(l,i,u,o),u("xhoverformat"),u("yhoverformat"),u("hovertemplate"),u("hovertemplatefallback"),i.contours&&i.contours.coloring==="heatmap"&&t(u,o))}}}),qA=Ne({"src/traces/contour/set_contours.js"(te,Z){var v=Os(),w=In();Z.exports=function(t,r){var a=t.contours;if(t.autocontour){var l=t.zmin,i=t.zmax;(t.zauto||l===void 0)&&(l=w.aggNums(Math.min,null,r)),(t.zauto||i===void 0)&&(i=w.aggNums(Math.max,null,r));var s=C(l,i,t.ncontours);a.size=s.dtick,a.start=v.tickFirst(s),s.range.reverse(),a.end=v.tickFirst(s),a.start===l&&(a.start+=a.size),a.end===i&&(a.end-=a.size),a.start>a.end&&(a.start=a.end=(a.start+a.end)/2),t._input.contours||(t._input.contours={}),w.extendFlat(t._input.contours,{start:a.start,end:a.end,size:a.size}),t._input.autocontour=!0}else if(a.type!=="constraint"){var o=a.start,u=a.end,d=t._input.contours;if(o>u&&(a.start=d.start=u,u=a.end=d.end=o,o=a.start),!(a.size>0)){var h;o===u?h=1:h=C(o,u,t.ncontours).dtick,d.size=a.size=h}}};function C(P,t,r){var a={type:"linear",range:[P,t]};return v.autoTicks(a,(t-P)/(r||15)),a}}}),w2=Ne({"src/traces/contour/end_plus.js"(te,Z){Z.exports=function(w){return w.end+w.size/1e6}}}),T2=Ne({"src/traces/contour/calc.js"(te,Z){var v=Nc(),w=Hx(),C=qA(),P=w2();Z.exports=function(r,a){var l=w(r,a),i=l[0].z;C(a,i);var s=a.contours,o=v.extractOpts(a),u;if(s.coloring==="heatmap"&&o.auto&&a.autocontour===!1){var d=s.start,h=P(s),g=s.size||1,m=Math.floor((h-d)/g)+1;isFinite(g)||(g=1,m=1);var E=d-g/2,c=E+m*g;u=[E,c]}else u=i;return v.calc(r,a,{vals:u,cLetter:"z"}),l}}}),Yx=Ne({"src/traces/contour/constants.js"(te,Z){Z.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}}}}),VA=Ne({"src/traces/contour/make_crossings.js"(te,Z){var v=Yx();Z.exports=function(P){var t=P[0].z,r=t.length,a=t[0].length,l=r===2||a===2,i,s,o,u,d,h,g,m,E;for(s=0;s<r-1;s++)for(u=[],s===0&&(u=u.concat(v.BOTTOMSTART)),s===r-2&&(u=u.concat(v.TOPSTART)),i=0;i<a-1;i++)for(o=u.slice(),i===0&&(o=o.concat(v.LEFTSTART)),i===a-2&&(o=o.concat(v.RIGHTSTART)),d=i+","+s,h=[[t[s][i],t[s][i+1]],[t[s+1][i],t[s+1][i+1]]],E=0;E<P.length;E++)m=P[E],g=w(m.level,h),g&&(m.crossings[d]=g,o.indexOf(g)!==-1&&(m.starts.push([i,s]),l&&o.indexOf(g,o.indexOf(g)+1)!==-1&&m.starts.push([i,s])))};function w(C,P){var t=(P[0][0]>C?0:1)+(P[0][1]>C?0:2)+(P[1][1]>C?0:4)+(P[1][0]>C?0:8);if(t===5||t===10){var r=(P[0][0]+P[0][1]+P[1][0]+P[1][1])/4;return C>r?t===5?713:1114:t===5?104:208}return t===15?0:t}}}),A2=Ne({"src/traces/contour/find_all_paths.js"(te,Z){var v=In(),w=Yx();Z.exports=function(i,s,o){var u,d,h,g,m;for(s=s||.01,o=o||.01,h=0;h<i.length;h++){for(g=i[h],m=0;m<g.starts.length;m++)d=g.starts[m],t(g,d,"edge",s,o);for(u=0;Object.keys(g.crossings).length&&u<1e4;)u++,d=Object.keys(g.crossings)[0].split(",").map(Number),t(g,d,void 0,s,o);u===1e4&&v.log("Infinite loop in contour?")}};function C(l,i,s,o){return Math.abs(l[0]-i[0])<s&&Math.abs(l[1]-i[1])<o}function P(l,i){var s=l[2]-i[2],o=l[3]-i[3];return Math.sqrt(s*s+o*o)}function t(l,i,s,o,u){var d=i.join(","),h=l.crossings[d],g=r(h,s,i),m=[a(l,i,[-g[0],-g[1]])],E=l.z.length,c=l.z[0].length,_=i.slice(),T=g.slice(),M;for(M=0;M<1e4;M++){if(h>20?(h=w.CHOOSESADDLE[h][(g[0]||g[1])<0?0:1],l.crossings[d]=w.SADDLEREMAINDER[h]):delete l.crossings[d],g=w.NEWDELTA[h],!g){v.log("Found bad marching index:",h,i,l.level);break}m.push(a(l,i,g)),i[0]+=g[0],i[1]+=g[1],d=i.join(","),C(m[m.length-1],m[m.length-2],o,u)&&m.pop();var k=g[0]&&(i[0]<0||i[0]>c-2)||g[1]&&(i[1]<0||i[1]>E-2),b=i[0]===_[0]&&i[1]===_[1]&&g[0]===T[0]&&g[1]===T[1];if(b||s&&k)break;h=l.crossings[d]}M===1e4&&v.log("Infinite loop in contour?");var A=C(m[0],m[m.length-1],o,u),y=0,f=.2*l.smoothing,p=[],x=0,N,D,B,U,V,q,z,H,G,J,le;for(M=1;M<m.length;M++)z=P(m[M],m[M-1]),y+=z,p.push(z);var ge=y/p.length*f;function de(ie){return m[ie%m.length]}for(M=m.length-2;M>=x;M--)if(N=p[M],N<ge){for(B=0,D=M-1;D>=x&&N+p[D]<ge;D--)N+=p[D];if(A&&M===m.length-2)for(B=0;B<D&&N+p[B]<ge;B++)N+=p[B];V=M-D+B+1,q=Math.floor((M+D+B+2)/2),!A&&M===m.length-2?U=m[m.length-1]:!A&&D===-1?U=m[0]:V%2?U=de(q):U=[(de(q)[0]+de(q+1)[0])/2,(de(q)[1]+de(q+1)[1])/2],m.splice(D+1,M-D+1,U),M=D+1,B&&(x=B),A&&(M===m.length-2?m[B]=m[m.length-1]:M===0&&(m[m.length-1]=m[0]))}for(m.splice(0,x),M=0;M<m.length;M++)m[M].length=2;if(!(m.length<2))if(A)m.pop(),l.paths.push(m);else{s||v.log("Unclosed interior contour?",l.level,_.join(","),m.join("L"));var me=!1;for(H=0;H<l.edgepaths.length;H++)if(J=l.edgepaths[H],!me&&C(J[0],m[m.length-1],o,u)){m.pop(),me=!0;var W=!1;for(G=0;G<l.edgepaths.length;G++)if(le=l.edgepaths[G],C(le[le.length-1],m[0],o,u)){W=!0,m.shift(),l.edgepaths.splice(H,1),G===H?l.paths.push(m.concat(le)):(G>H&&G--,l.edgepaths[G]=le.concat(m,J));break}W||(l.edgepaths[H]=m.concat(J))}for(H=0;H<l.edgepaths.length&&!me;H++)J=l.edgepaths[H],C(J[J.length-1],m[0],o,u)&&(m.shift(),l.edgepaths[H]=J.concat(m),me=!0);me||l.edgepaths.push(m)}}function r(l,i,s){var o=0,u=0;return l>20&&i?l===208||l===1114?o=s[0]===0?1:-1:u=s[1]===0?1:-1:w.BOTTOMSTART.indexOf(l)!==-1?u=1:w.LEFTSTART.indexOf(l)!==-1?o=1:w.TOPSTART.indexOf(l)!==-1?u=-1:o=-1,[o,u]}function a(l,i,s){var o=i[0]+Math.max(s[0],0),u=i[1]+Math.max(s[1],0),d=l.z[u][o],h=l.xaxis,g=l.yaxis;if(s[1]){var m=(l.level-d)/(l.z[u][o+1]-d),E=(m!==1?(1-m)*h.c2l(l.x[o]):0)+(m!==0?m*h.c2l(l.x[o+1]):0);return[h.c2p(h.l2c(E),!0),g.c2p(l.y[u],!0),o+m,u]}else{var c=(l.level-d)/(l.z[u+1][o]-d),_=(c!==1?(1-c)*g.c2l(l.y[u]):0)+(c!==0?c*g.c2l(l.y[u+1]):0);return[h.c2p(l.x[o],!0),g.c2p(g.l2c(_),!0),o,u+c]}}}}),XM=Ne({"src/traces/contour/constraint_mapping.js"(te,Z){var v=_2(),w=Fn();Z.exports={"[]":P("[]"),"][":P("]["),">":t(">"),"<":t("<"),"=":t("=")};function C(r,a){var l=Array.isArray(a),i;function s(o){return w(o)?+o:null}return v.COMPARISON_OPS2.indexOf(r)!==-1?i=s(l?a[0]:a):v.INTERVAL_OPS.indexOf(r)!==-1?i=l?[s(a[0]),s(a[1])]:[s(a),s(a)]:v.SET_OPS.indexOf(r)!==-1&&(i=l?a.map(s):[s(a)]),i}function P(r){return function(a){a=C(r,a);var l=Math.min(a[0],a[1]),i=Math.max(a[0],a[1]);return{start:l,end:i,size:i-l}}}function t(r){return function(a){return a=C(r,a),{start:a,end:1/0,size:1/0}}}}}),HA=Ne({"src/traces/contour/empty_pathinfo.js"(te,Z){var v=In(),w=XM(),C=w2();Z.exports=function(t,r,a){for(var l=t.type==="constraint"?w[t._operation](t.value):t,i=l.size,s=[],o=C(l),u=a.trace._carpetTrace,d=u?{xaxis:u.aaxis,yaxis:u.baxis,x:a.a,y:a.b}:{xaxis:r.xaxis,yaxis:r.yaxis,x:a.x,y:a.y},h=l.start;h<o;h+=i)if(s.push(v.extendFlat({level:h,crossings:{},starts:[],edgepaths:[],paths:[],z:a.z,smoothing:a.trace.line.smoothing},d)),s.length>1e3){v.warn("Too many contours, clipping at 1000",t);break}return s}}}),WM=Ne({"src/traces/contour/convert_to_constraints.js"(te,Z){var v=In();Z.exports=function(C,P){var t,r,a,l=function(o){return o.reverse()},i=function(o){return o};switch(P){case"=":case"<":return C;case">":for(C.length!==1&&v.warn("Contour data invalid for the specified inequality operation."),r=C[0],t=0;t<r.edgepaths.length;t++)r.edgepaths[t]=l(r.edgepaths[t]);for(t=0;t<r.paths.length;t++)r.paths[t]=l(r.paths[t]);for(t=0;t<r.starts.length;t++)r.starts[t]=l(r.starts[t]);return C;case"][":var s=l;l=i,i=s;case"[]":for(C.length!==2&&v.warn("Contour data invalid for the specified inequality range operation."),r=w(C[0]),a=w(C[1]),t=0;t<r.edgepaths.length;t++)r.edgepaths[t]=l(r.edgepaths[t]);for(t=0;t<r.paths.length;t++)r.paths[t]=l(r.paths[t]);for(t=0;t<r.starts.length;t++)r.starts[t]=l(r.starts[t]);for(;a.edgepaths.length;)r.edgepaths.push(i(a.edgepaths.shift()));for(;a.paths.length;)r.paths.push(i(a.paths.shift()));for(;a.starts.length;)r.starts.push(i(a.starts.shift()));return[r]}};function w(C){return v.extendFlat({},C,{edgepaths:v.extendDeep([],C.edgepaths),paths:v.extendDeep([],C.paths),starts:v.extendDeep([],C.starts)})}}}),YM=Ne({"src/traces/contour/close_boundaries.js"(te,Z){Z.exports=function(v,w){var C=v[0],P=C.z,t;switch(w.type){case"levels":var r=Math.min(P[0][0],P[0][1]);for(t=0;t<v.length;t++){var a=v[t];a.prefixBoundary=!a.edgepaths.length&&(r>a.level||a.starts.length&&r===a.level)}break;case"constraint":if(C.prefixBoundary=!1,C.edgepaths.length)return;var l=C.x.length,i=C.y.length,s=-1/0,o=1/0;for(t=0;t<i;t++)o=Math.min(o,P[t][0]),o=Math.min(o,P[t][l-1]),s=Math.max(s,P[t][0]),s=Math.max(s,P[t][l-1]);for(t=1;t<l-1;t++)o=Math.min(o,P[0][t]),o=Math.min(o,P[i-1][t]),s=Math.max(s,P[0][t]),s=Math.max(s,P[i-1][t]);var u=w.value,d,h;switch(w._operation){case">":u>s&&(C.prefixBoundary=!0);break;case"<":(u<o||C.starts.length&&u===o)&&(C.prefixBoundary=!0);break;case"[]":d=Math.min(u[0],u[1]),h=Math.max(u[0],u[1]),(h<o||d>s||C.starts.length&&h===o)&&(C.prefixBoundary=!0);break;case"][":d=Math.min(u[0],u[1]),h=Math.max(u[0],u[1]),d<o&&h>s&&(C.prefixBoundary=!0);break}break}}}}),S2=Ne({"src/traces/contour/plot.js"(te){var Z=xn(),v=In(),w=zs(),C=Nc(),P=hc(),t=Os(),r=Vp(),a=f2(),l=VA(),i=A2(),s=HA(),o=WM(),u=YM(),d=Yx(),h=d.LABELOPTIMIZER;te.plot=function(b,A,y,f){var p=A.xaxis,x=A.yaxis;v.makeTraceGroups(f,y,"contour").each(function(N){var D=Z.select(this),B=N[0],U=B.trace,V=B.x,q=B.y,z=U.contours,H=s(z,A,B),G=v.ensureSingle(D,"g","heatmapcoloring"),J=[];z.coloring==="heatmap"&&(J=[N]),a(b,A,J,G),l(H),i(H);var le=p.c2p(V[0],!0),ge=p.c2p(V[V.length-1],!0),de=x.c2p(q[0],!0),me=x.c2p(q[q.length-1],!0),W=[[le,me],[ge,me],[ge,de],[le,de]],ie=H;z.type==="constraint"&&(ie=o(H,z._operation)),g(D,W,z),m(D,ie,W,z),c(D,H,b,B,z),T(D,A,b,B,W)})};function g(k,b,A){var y=v.ensureSingle(k,"g","contourbg"),f=y.selectAll("path").data(A.coloring==="fill"?[0]:[]);f.enter().append("path"),f.exit().remove(),f.attr("d","M"+b.join("L")+"Z").style("stroke","none")}function m(k,b,A,y){var f=y.coloring==="fill"||y.type==="constraint"&&y._operation!=="=",p="M"+A.join("L")+"Z";f&&u(b,y);var x=v.ensureSingle(k,"g","contourfill"),N=x.selectAll("path").data(f?b:[]);N.enter().append("path"),N.exit().remove(),N.each(function(D){var B=(D.prefixBoundary?p:"")+E(D,A);B?Z.select(this).attr("d",B).style("stroke","none"):Z.select(this).remove()})}function E(k,b){var A="",y=0,f=k.edgepaths.map(function(le,ge){return ge}),p=!0,x,N,D,B,U,V;function q(le){return Math.abs(le[1]-b[0][1])<.01}function z(le){return Math.abs(le[1]-b[2][1])<.01}function H(le){return Math.abs(le[0]-b[0][0])<.01}function G(le){return Math.abs(le[0]-b[2][0])<.01}for(;f.length;){for(V=w.smoothopen(k.edgepaths[y],k.smoothing),A+=p?V:V.replace(/^M/,"L"),f.splice(f.indexOf(y),1),x=k.edgepaths[y][k.edgepaths[y].length-1],B=-1,D=0;D<4;D++){if(!x){v.log("Missing end?",y,k);break}for(q(x)&&!G(x)?N=b[1]:H(x)?N=b[0]:z(x)?N=b[3]:G(x)&&(N=b[2]),U=0;U<k.edgepaths.length;U++){var J=k.edgepaths[U][0];Math.abs(x[0]-N[0])<.01?Math.abs(x[0]-J[0])<.01&&(J[1]-x[1])*(N[1]-J[1])>=0&&(N=J,B=U):Math.abs(x[1]-N[1])<.01?Math.abs(x[1]-J[1])<.01&&(J[0]-x[0])*(N[0]-J[0])>=0&&(N=J,B=U):v.log("endpt to newendpt is not vert. or horz.",x,N,J)}if(x=N,B>=0)break;A+="L"+N}if(B===k.edgepaths.length){v.log("unclosed perimeter path");break}y=B,p=f.indexOf(y)===-1,p&&(y=f[0],A+="Z")}for(y=0;y<k.paths.length;y++)A+=w.smoothclosed(k.paths[y],k.smoothing);return A}function c(k,b,A,y,f){var p=A._context.staticPlot,x=v.ensureSingle(k,"g","contourlines"),N=f.showlines!==!1,D=f.showlabels,B=N&&D,U=te.createLines(x,N||D,b,p),V=te.createLineClip(x,B,A,y.trace.uid),q=k.selectAll("g.contourlabels").data(D?[0]:[]);if(q.exit().remove(),q.enter().append("g").classed("contourlabels",!0),D){var z=[],H=[];v.clearLocationCache();var G=te.labelFormatter(A,y),J=w.tester.append("text").attr("data-notex",1).call(w.font,f.labelfont),le=b[0].xaxis,ge=b[0].yaxis,de=le._length,me=ge._length,W=le.range,ie=ge.range,se=v.aggNums(Math.min,null,y.x),ee=v.aggNums(Math.max,null,y.x),pe=v.aggNums(Math.min,null,y.y),oe=v.aggNums(Math.max,null,y.y),Y=Math.max(le.c2p(se,!0),0),ce=Math.min(le.c2p(ee,!0),de),ue=Math.max(ge.c2p(oe,!0),0),_e=Math.min(ge.c2p(pe,!0),me),Le={};W[0]<W[1]?(Le.left=Y,Le.right=ce):(Le.left=ce,Le.right=Y),ie[0]<ie[1]?(Le.top=ue,Le.bottom=_e):(Le.top=_e,Le.bottom=ue),Le.middle=(Le.top+Le.bottom)/2,Le.center=(Le.left+Le.right)/2,z.push([[Le.left,Le.top],[Le.right,Le.top],[Le.right,Le.bottom],[Le.left,Le.bottom]]);var ze=Math.sqrt(de*de+me*me),Xe=d.LABELDISTANCE*ze/Math.max(1,b.length/d.LABELINCREASE);U.each(function(Ve){var rt=te.calcTextOpts(Ve.level,G,J,A);Z.select(this).selectAll("path").each(function(){var mt=this,_t=v.getVisibleSegment(mt,Le,rt.height/2);if(_t&&!(_t.len<(rt.width+rt.height)*d.LABELMIN))for(var vt=Math.min(Math.ceil(_t.len/Xe),d.LABELMAX),ut=0;ut<vt;ut++){var Fe=te.findBestTextLocation(mt,_t,rt,H,Le);if(!Fe)break;te.addLabelData(Fe,rt,H,z)}})}),J.remove(),te.drawLabels(q,H,A,V,B?z:null)}D&&!N&&U.remove()}te.createLines=function(k,b,A,y){var f=A[0].smoothing,p=k.selectAll("g.contourlevel").data(b?A:[]);if(p.exit().remove(),p.enter().append("g").classed("contourlevel",!0),b){var x=p.selectAll("path.openline").data(function(D){return D.pedgepaths||D.edgepaths});x.exit().remove(),x.enter().append("path").classed("openline",!0),x.attr("d",function(D){return w.smoothopen(D,f)}).style("stroke-miterlimit",1).style("vector-effect",y?"none":"non-scaling-stroke");var N=p.selectAll("path.closedline").data(function(D){return D.ppaths||D.paths});N.exit().remove(),N.enter().append("path").classed("closedline",!0),N.attr("d",function(D){return w.smoothclosed(D,f)}).style("stroke-miterlimit",1).style("vector-effect",y?"none":"non-scaling-stroke")}return p},te.createLineClip=function(k,b,A,y){var f=A._fullLayout._clips,p=b?"clipline"+y:null,x=f.selectAll("#"+p).data(b?[0]:[]);return x.exit().remove(),x.enter().append("clipPath").classed("contourlineclip",!0).attr("id",p),w.setClipUrl(k,p,A),x},te.labelFormatter=function(k,b){var A=k._fullLayout,y=b.trace,f=y.contours,p={type:"linear",_id:"ycontour",showexponent:"all",exponentformat:"B"};if(f.labelformat)p.tickformat=f.labelformat,r(p,A);else{var x=C.extractOpts(y);if(x&&x.colorbar&&x.colorbar._axis)p=x.colorbar._axis;else{if(f.type==="constraint"){var N=f.value;v.isArrayOrTypedArray(N)?p.range=[N[0],N[N.length-1]]:p.range=[N,N]}else p.range=[f.start,f.end],p.nticks=(f.end-f.start)/f.size;p.range[0]===p.range[1]&&(p.range[1]+=p.range[0]||1),p.nticks||(p.nticks=1e3),r(p,A),t.prepTicks(p),p._tmin=null,p._tmax=null}}return function(D){return t.tickText(p,D).text}},te.calcTextOpts=function(k,b,A,y){var f=b(k);A.text(f).call(P.convertToTspans,y);var p=A.node(),x=w.bBox(p,!0);return{text:f,width:x.width,height:x.height,fontSize:+p.style["font-size"].replace("px",""),level:k,dy:(x.top+x.bottom)/2}},te.findBestTextLocation=function(k,b,A,y,f){var p=A.width,x,N,D,B,U;b.isClosed?(N=b.len/h.INITIALSEARCHPOINTS,x=b.min+N/2,D=b.max):(N=(b.len-p)/(h.INITIALSEARCHPOINTS+1),x=b.min+N+p/2,D=b.max-(N+p)/2);for(var V=1/0,q=0;q<h.ITERATIONS;q++){for(var z=x;z<D;z+=N){var H=v.getTextLocation(k,b.total,z,p),G=_(H,A,y,f);G<V&&(V=G,U=H,B=z)}if(V>h.MAXCOST*2)break;q&&(N/=2),x=B-N/2,D=x+N*1.5}if(V<=h.MAXCOST)return U};function _(k,b,A,y){var f=b.width/2,p=b.height/2,x=k.x,N=k.y,D=k.theta,B=Math.cos(D)*f,U=Math.sin(D)*f,V=(x>y.center?y.right-x:x-y.left)/(B+Math.abs(Math.sin(D)*p)),q=(N>y.middle?y.bottom-N:N-y.top)/(Math.abs(U)+Math.cos(D)*p);if(V<1||q<1)return 1/0;var z=h.EDGECOST*(1/(V-1)+1/(q-1));z+=h.ANGLECOST*D*D;for(var H=x-B,G=N-U,J=x+B,le=N+U,ge=0;ge<A.length;ge++){var de=A[ge],me=Math.cos(de.theta)*de.width/2,W=Math.sin(de.theta)*de.width/2,ie=v.segmentDistance(H,G,J,le,de.x-me,de.y-W,de.x+me,de.y+W)*2/(b.height+de.height),se=de.level===b.level,ee=se?h.SAMELEVELDISTANCE:1;if(ie<=ee)return 1/0;var pe=h.NEIGHBORCOST*(se?h.SAMELEVELFACTOR:1);z+=pe/(ie-ee)}return z}te.addLabelData=function(k,b,A,y){var f=b.fontSize,p=b.width+f/3,x=Math.max(0,b.height-f/3),N=k.x,D=k.y,B=k.theta,U=Math.sin(B),V=Math.cos(B),q=function(H,G){return[N+H*V-G*U,D+H*U+G*V]},z=[q(-p/2,-x/2),q(-p/2,x/2),q(p/2,x/2),q(p/2,-x/2)];A.push({text:b.text,x:N,y:D,dy:b.dy,theta:B,level:b.level,width:p,height:x}),y.push(z)},te.drawLabels=function(k,b,A,y,f){var p=k.selectAll("text").data(b,function(B){return B.text+","+B.x+","+B.y+","+B.theta});if(p.exit().remove(),p.enter().append("text").attr({"data-notex":1,"text-anchor":"middle"}).each(function(B){var U=B.x+Math.sin(B.theta)*B.dy,V=B.y-Math.cos(B.theta)*B.dy;Z.select(this).text(B.text).attr({x:U,y:V,transform:"rotate("+180*B.theta/Math.PI+" "+U+" "+V+")"}).call(P.convertToTspans,A)}),f){for(var x="",N=0;N<f.length;N++)x+="M"+f[N].join("L")+"Z";var D=v.ensureSingle(y,"path","");D.attr("d",x)}};function T(k,b,A,y,f){var p=y.trace,x=A._fullLayout._clips,N="clip"+p.uid,D=x.selectAll("#"+N).data(p.connectgaps?[]:[0]);if(D.enter().append("clipPath").classed("contourclip",!0).attr("id",N),D.exit().remove(),p.connectgaps===!1){var B={level:.9,crossings:{},starts:[],edgepaths:[],paths:[],xaxis:b.xaxis,yaxis:b.yaxis,x:y.x,y:y.y,z:M(y),smoothing:0};l([B]),i([B]),u([B],{type:"levels"});var U=v.ensureSingle(D,"path","");U.attr("d",(B.prefixBoundary?"M"+f.join("L")+"Z":"")+E(B,f))}else N=null;w.setClipUrl(k,N,A)}function M(k){var b=k.trace._emptypoints,A=[],y=k.z.length,f=k.z[0].length,p,x=[],N;for(p=0;p<f;p++)x.push(1);for(p=0;p<y;p++)A.push(x.slice());for(p=0;p<b.length;p++)N=b[p],A[N[0]][N[1]]=0;return k.zmask=A,A}}}),r_=Ne({"src/traces/contour/make_color_map.js"(te,Z){var v=xn(),w=Nc(),C=w2();Z.exports=function(t){var r=t.contours,a=r.start,l=C(r),i=r.size||1,s=Math.floor((l-a)/i)+1,o=r.coloring==="lines"?0:1,u=w.extractOpts(t);isFinite(i)||(i=1,s=1);var d=u.reversescale?w.flipScale(u.colorscale):u.colorscale,h=d.length,g=new Array(h),m=new Array(h),E,c,_=u.min,T=u.max;if(r.coloring==="heatmap"){for(c=0;c<h;c++)E=d[c],g[c]=E[0]*(T-_)+_,m[c]=E[1];var M=v.extent([_,T,r.start,r.start+i*(s-1)]),k=M[_<T?0:1],b=M[_<T?1:0];k!==_&&(g.splice(0,0,k),m.splice(0,0,m[0])),b!==T&&(g.push(b),m.push(m[m.length-1]))}else{var A=t._input&&typeof t._input.zmin=="number"&&typeof t._input.zmax=="number";for(A&&(a<=_||l>=T)&&(a<=_&&(a=_),l>=T&&(l=T),s=Math.floor((l-a)/i)+1,o=0),c=0;c<h;c++)E=d[c],g[c]=(E[0]*(s+o-1)-o/2)*i+a,m[c]=E[1];(A||t.autocontour)&&(g[0]>_&&(g.unshift(_),m.unshift(m[0])),g[g.length-1]<T&&(g.push(T),m.push(m[m.length-1])))}return w.makeColorScaleFunc({domain:g,range:m},{noNumericCheck:!0})}}}),Zx=Ne({"src/traces/contour/style.js"(te,Z){var v=xn(),w=zs(),C=h2(),P=r_();Z.exports=function(r){var a=v.select(r).selectAll("g.contour");a.style("opacity",function(l){return l[0].trace.opacity}),a.each(function(l){var i=v.select(this),s=l[0].trace,o=s.contours,u=s.line,d=o.size||1,h=o.start,g=o.type==="constraint",m=!g&&o.coloring==="lines",E=!g&&o.coloring==="fill",c=m||E?P(s):null;i.selectAll("g.contourlevel").each(function(M){v.select(this).selectAll("path").call(w.lineGroupStyle,u.width,m?c(M.level):u.color,u.dash)});var _=o.labelfont;if(i.selectAll("g.contourlabels text").each(function(M){w.font(v.select(this),{weight:_.weight,style:_.style,variant:_.variant,textcase:_.textcase,lineposition:_.lineposition,shadow:_.shadow,family:_.family,size:_.size,color:_.color||(m?c(M.level):u.color)})}),g)i.selectAll("g.contourfill path").style("fill",s.fillcolor);else if(E){var T;i.selectAll("g.contourfill path").style("fill",function(M){return T===void 0&&(T=M.level),c(M.level+.5*d)}),T===void 0&&(T=h),i.selectAll("g.contourbg path").style("fill",c(T-.5*d))}}),C(r)}}}),n_=Ne({"src/traces/contour/colorbar.js"(te,Z){var v=Nc(),w=r_(),C=w2();function P(t,r,a){var l=r.contours,i=r.line,s=l.size||1,o=l.coloring,u=w(r,{isColorbar:!0});if(o==="heatmap"){var d=v.extractOpts(r);a._fillgradient=d.reversescale?v.flipScale(d.colorscale):d.colorscale,a._zrange=[d.min,d.max]}else o==="fill"&&(a._fillcolor=u);a._line={color:o==="lines"?u:i.color,width:l.showlines!==!1?i.width:0,dash:i.dash},a._levels={start:l.start,end:C(l),size:s}}Z.exports={min:"zmin",max:"zmax",calc:P}}}),GA=Ne({"src/traces/contour/hover.js"(te,Z){var v=Ha(),w=Gx();Z.exports=function(P,t,r,a,l){l||(l={}),l.isContour=!0;var i=w(P,t,r,a,l);return i&&i.forEach(function(s){var o=s.trace;o.contours.type==="constraint"&&(o.fillcolor&&v.opacity(o.fillcolor)?s.color=v.addOpacity(o.fillcolor,1):o.contours.showlines&&v.opacity(o.line.color)&&(s.color=v.addOpacity(o.line.color,1)))}),i}}}),ZM=Ne({"src/traces/histogram2dcontour/index.js"(te,Z){Z.exports={attributes:x2(),supplyDefaults:GM(),crossTraceDefaults:v2(),calc:T2(),plot:S2().plot,layerName:"contourlayer",style:Zx(),colorbar:n_(),hoverPoints:GA(),moduleType:"trace",name:"histogram2dcontour",basePlotModule:Ih(),categories:["cartesian","svg","2dMap","contour","histogram","showLegend"],meta:{}}}}),$x=Ne({"lib/histogram2dcontour.js"(te,Z){Z.exports=ZM()}}),XA=Ne({"src/traces/contour/constraint_defaults.js"(te,Z){var v=Fn(),w=UA(),C=Ha(),P=C.addOpacity,t=C.opacity,r=_2(),a=In().isArrayOrTypedArray,l=r.CONSTRAINT_REDUCTION,i=r.COMPARISON_OPS2;Z.exports=function(u,d,h,g,m,E){var c=d.contours,_,T,M,k=h("contours.operation");if(c._operation=l[k],s(h,c),k==="="?_=c.showlines=!0:(_=h("contours.showlines"),M=h("fillcolor",P((u.line||{}).color||m,.5))),_){var b=M&&t(M)?P(d.fillcolor,1):m;T=h("line.color",b),h("line.width",2),h("line.dash")}h("line.smoothing"),w(h,g,T,E)};function s(o,u){var d;i.indexOf(u.operation)===-1?(o("contours.value",[0,1]),a(u.value)?u.value.length>2?u.value=u.value.slice(2):u.length===0?u.value=[0,1]:u.length<2?(d=parseFloat(u.value[0]),u.value=[d,d+1]):u.value=[parseFloat(u.value[0]),parseFloat(u.value[1])]:v(u.value)&&(d=parseFloat(u.value),u.value=[d,d+1])):(o("contours.value",0),v(u.value)||(a(u.value)?u.value=parseFloat(u.value[0]):u.value=0))}}}),WA=Ne({"src/traces/contour/defaults.js"(te,Z){var v=In(),w=Oh(),C=Rm(),P=XA(),t=b2(),r=Wx(),a=By(),l=Xx();Z.exports=function(s,o,u,d){function h(c,_){return v.coerce(s,o,l,c,_)}function g(c){return v.coerce2(s,o,l,c)}var m=w(s,o,h,d);if(!m){o.visible=!1;return}C(s,o,d,h),h("xhoverformat"),h("yhoverformat"),h("text"),h("hovertext"),h("hoverongaps"),h("hovertemplate"),h("hovertemplatefallback");var E=h("contours.type")==="constraint";h("connectgaps",v.isArray1D(o.z)),E?P(s,o,h,d,u):(t(s,o,h,g),r(s,o,h,d)),o.contours&&o.contours.coloring==="heatmap"&&a(h,d),h("zorder")}}}),$M=Ne({"src/traces/contour/index.js"(te,Z){Z.exports={attributes:Xx(),supplyDefaults:WA(),calc:T2(),plot:S2().plot,style:Zx(),colorbar:n_(),hoverPoints:GA(),moduleType:"trace",name:"contour",basePlotModule:Ih(),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}}}),YA=Ne({"lib/contour.js"(te,Z){Z.exports=$M()}}),E2=Ne({"src/traces/scatterternary/attributes.js"(te,Z){var{hovertemplateAttrs:v,texttemplateAttrs:w,templatefallbackAttrs:C}=Fl(),P=qv(),t=tf(),r=qo(),a=Wu(),l=Fd().dash,i=fi().extendFlat,s=t.marker,o=t.line,u=s.line;Z.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:i({},t.mode,{dflt:"markers"}),text:i({},t.text,{}),texttemplate:w({editType:"plot"},{keys:["a","b","c","text"]}),texttemplatefallback:C({editType:"plot"}),hovertext:i({},t.hovertext,{}),line:{color:o.color,width:o.width,dash:l,backoff:o.backoff,shape:i({},o.shape,{values:["linear","spline"]}),smoothing:o.smoothing,editType:"calc"},connectgaps:t.connectgaps,cliponaxis:t.cliponaxis,fill:i({},t.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:P(),marker:i({symbol:s.symbol,opacity:s.opacity,angle:s.angle,angleref:s.angleref,standoff:s.standoff,maxdisplayed:s.maxdisplayed,size:s.size,sizeref:s.sizeref,sizemin:s.sizemin,sizemode:s.sizemode,line:i({width:u.width,editType:"calc"},a("marker.line")),gradient:s.gradient,editType:"calc"},a("marker")),textfont:t.textfont,textposition:t.textposition,selected:t.selected,unselected:t.unselected,hoverinfo:i({},r.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:t.hoveron,hovertemplate:v(),hovertemplatefallback:C()}}}),KM=Ne({"src/traces/scatterternary/defaults.js"(te,Z){var v=In(),w=i0(),C=yu(),P=wv(),t=Im(),r=Tv(),a=Wp(),l=uv(),i=E2();Z.exports=function(o,u,d,h){function g(k,b){return v.coerce(o,u,i,k,b)}var m=g("a"),E=g("b"),c=g("c"),_;if(m?(_=m.length,E?(_=Math.min(_,E.length),c&&(_=Math.min(_,c.length))):c?_=Math.min(_,c.length):_=0):E&&c&&(_=Math.min(E.length,c.length)),!_){u.visible=!1;return}u._length=_,g("sum"),g("text"),g("hovertext"),u.hoveron!=="fills"&&(g("hovertemplate"),g("hovertemplatefallback"));var T=_<w.PTS_LINESONLY?"lines+markers":"lines";g("mode",T),C.hasMarkers(u)&&P(o,u,d,h,g,{gradient:!0}),C.hasLines(u)&&(t(o,u,d,h,g,{backoff:!0}),r(o,u,g),g("connectgaps")),C.hasText(u)&&(g("texttemplate"),g("texttemplatefallback"),a(o,u,h,g));var M=[];(C.hasMarkers(u)||C.hasText(u))&&(g("cliponaxis"),g("marker.maxdisplayed"),M.push("points")),g("fill"),u.fill!=="none"&&(l(o,u,d,g),C.hasLines(u)||r(o,u,g)),(u.fill==="tonext"||u.fill==="toself")&&M.push("fills"),g("hoveron",M.join("+")||"points"),v.coerceSelectionMarkerOpacity(u,g)}}}),JM=Ne({"src/traces/scatterternary/format_labels.js"(te,Z){var v=Os();Z.exports=function(C,P,t){var r={},a=t[P.subplot]._subplot;return r.aLabel=v.tickText(a.aaxis,C.a,!0).text,r.bLabel=v.tickText(a.baxis,C.b,!0).text,r.cLabel=v.tickText(a.caxis,C.c,!0).text,r}}}),jy=Ne({"src/traces/scatterternary/calc.js"(te,Z){var v=Fn(),w=Yp(),C=s0(),P=Gh(),t=Vv().calcMarkerSize,r=["a","b","c"],a={a:["b","c"],b:["a","c"],c:["a","b"]};Z.exports=function(i,s){var o=i._fullLayout[s.subplot],u=o.sum,d=s.sum||u,h={a:s.a,b:s.b,c:s.c},g=s.ids,m,E,c,_,T,M;for(m=0;m<r.length;m++)if(c=r[m],!h[c]){for(T=h[a[c][0]],M=h[a[c][1]],_=new Array(T.length),E=0;E<T.length;E++)_[E]=d-T[E]-M[E];h[c]=_}var k=s._length,b=new Array(k),A,y,f,p,x,N;for(m=0;m<k;m++)A=h.a[m],y=h.b[m],f=h.c[m],v(A)&&v(y)&&v(f)?(A=+A,y=+y,f=+f,p=u/(A+y+f),p!==1&&(A*=p,y*=p,f*=p),N=A,x=f-y,b[m]={x,y:N,a:A,b:y,c:f},g&&(b[m].id=g[m])):b[m]={x:!1,y:!1};return t(s,k),w(i,s),C(b,s),P(b,s),b}}}),QM=Ne({"src/traces/scatterternary/plot.js"(te,Z){var v=sm();Z.exports=function(C,P,t){var r=P.plotContainer;r.select(".scatterlayer").selectAll("*").remove();for(var a=P.xaxis,l=P.yaxis,i={xaxis:a,yaxis:l,plot:r,layerClipId:P._hasClipOnAxisFalse?P.clipIdRelative:null},s=P.layers.frontplot.select("g.scatterlayer"),o=0;o<t.length;o++){var u=t[o];u.length&&(u[0].trace._xA=a,u[0].trace._yA=l)}v(C,i,t,s)}}}),eC=Ne({"src/traces/scatterternary/hover.js"(te,Z){var v=ky();Z.exports=function(C,P,t,r){var a=v(C,P,t,r);if(!a||a[0].index===!1)return;var l=a[0];if(l.index===void 0){var i=1-l.y0/C.ya._length,s=C.xa._length,o=s*i/2,u=s-o;return l.x0=Math.max(Math.min(l.x0,u),o),l.x1=Math.max(Math.min(l.x1,u),o),a}var d=l.cd[l.index],h=l.trace,g=l.subplot;l.a=d.a,l.b=d.b,l.c=d.c,l.xLabelVal=void 0,l.yLabelVal=void 0;var m={};m[h.subplot]={_subplot:g};var E=h._module.formatLabels(d,h,m);l.aLabel=E.aLabel,l.bLabel=E.bLabel,l.cLabel=E.cLabel;var c=d.hi||h.hoverinfo,_=[];function T(k,b){_.push(k._hovertitle+": "+b)}if(!h.hovertemplate){var M=c.split("+");M.indexOf("all")!==-1&&(M=["a","b","c"]),M.indexOf("a")!==-1&&T(g.aaxis,l.aLabel),M.indexOf("b")!==-1&&T(g.baxis,l.bLabel),M.indexOf("c")!==-1&&T(g.caxis,l.cLabel)}return l.extraText=_.join("<br>"),l.hovertemplate=h.hovertemplate,a}}}),tC=Ne({"src/traces/scatterternary/event_data.js"(te,Z){Z.exports=function(w,C,P,t,r){if(C.xa&&(w.xaxis=C.xa),C.ya&&(w.yaxis=C.ya),t[r]){var a=t[r];w.a=a.a,w.b=a.b,w.c=a.c}else w.a=C.a,w.b=C.b,w.c=C.c;return w}}}),M2=Ne({"src/plots/ternary/ternary.js"(te,Z){var v=xn(),w=to(),C=Yo(),P=In(),t=P.strTranslate,r=P._,a=Ha(),l=zs(),i=Vp(),s=fi().extendFlat,o=ff(),u=Os(),d=Uv(),h=oh(),g=Pm(),m=g.freeMode,E=g.rectMode,c=Tg(),_=dh().prepSelect,T=dh().selectOnClick,M=dh().clearOutline,k=dh().clearSelectionsCache,b=wh();function A(z,H){this.id=z.id,this.graphDiv=z.graphDiv,this.init(H),this.makeFramework(H),this.updateFx(H),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}Z.exports=A;var y=A.prototype;y.init=function(z){this.container=z._ternarylayer,this.defs=z._defs,this.layoutId=z._uid,this.traceHash={},this.layers={}},y.plot=function(z,H){var G=this,J=H[G.id],le=H._size;G._hasClipOnAxisFalse=!1;for(var ge=0;ge<z.length;ge++){var de=z[ge][0].trace;if(de.cliponaxis===!1){G._hasClipOnAxisFalse=!0;break}}G.updateLayers(J),G.adjustLayout(J,le),o.generalUpdatePerTraceModule(G.graphDiv,G,z,J),G.layers.plotbg.select("path").call(a.fill,J.bgcolor)},y.makeFramework=function(z){var H=this,G=H.graphDiv,J=z[H.id],le=H.clipId="clip"+H.layoutId+H.id,ge=H.clipIdRelative="clip-relative"+H.layoutId+H.id;H.clipDef=P.ensureSingleById(z._clips,"clipPath",le,function(de){de.append("path").attr("d","M0,0Z")}),H.clipDefRelative=P.ensureSingleById(z._clips,"clipPath",ge,function(de){de.append("path").attr("d","M0,0Z")}),H.plotContainer=P.ensureSingle(H.container,"g",H.id),H.updateLayers(J),l.setClipUrl(H.layers.backplot,le,G),l.setClipUrl(H.layers.grids,le,G)},y.updateFx=function(z){z._ternarylayer.selectAll("g.toplevel").style("cursor",z.dragmode==="pan"?"move":"crosshair")},y.updateLayers=function(z){var H=this,G=H.layers,J=["draglayer","plotbg","backplot","grids"];z.aaxis.layer==="below traces"&&J.push("aaxis","aline"),z.baxis.layer==="below traces"&&J.push("baxis","bline"),z.caxis.layer==="below traces"&&J.push("caxis","cline"),J.push("frontplot"),z.aaxis.layer==="above traces"&&J.push("aaxis","aline"),z.baxis.layer==="above traces"&&J.push("baxis","bline"),z.caxis.layer==="above traces"&&J.push("caxis","cline");var le=H.plotContainer.selectAll("g.toplevel").data(J,String),ge=["agrid","bgrid","cgrid"];le.enter().append("g").attr("class",function(de){return"toplevel "+de}).each(function(de){var me=v.select(this);G[de]=me,de==="frontplot"?me.append("g").classed("scatterlayer",!0):de==="backplot"?me.append("g").classed("maplayer",!0):de==="plotbg"?me.append("path").attr("d","M0,0Z"):de==="aline"||de==="bline"||de==="cline"?me.append("path"):de==="grids"&&ge.forEach(function(W){G[W]=me.append("g").classed("grid "+W,!0)})}),le.order()};var f=Math.sqrt(4/3);y.adjustLayout=function(z,H){var G=this,J=z.domain,le=(J.x[0]+J.x[1])/2,ge=(J.y[0]+J.y[1])/2,de=J.x[1]-J.x[0],me=J.y[1]-J.y[0],W=de*H.w,ie=me*H.h,se=z.sum,ee=z.aaxis.min,pe=z.baxis.min,oe=z.caxis.min,Y,ce,ue,_e,Le,ze;W>f*ie?(_e=ie,ue=_e*f):(ue=W,_e=ue/f),Le=de*ue/W,ze=me*_e/ie,Y=H.l+H.w*le-ue/2,ce=H.t+H.h*(1-ge)-_e/2,G.x0=Y,G.y0=ce,G.w=ue,G.h=_e,G.sum=se,G.xaxis={type:"linear",range:[ee+2*oe-se,se-ee-2*pe],domain:[le-Le/2,le+Le/2],_id:"x"},i(G.xaxis,G.graphDiv._fullLayout),G.xaxis.setScale(),G.xaxis.isPtWithinRange=function(Ye){return Ye.a>=G.aaxis.range[0]&&Ye.a<=G.aaxis.range[1]&&Ye.b>=G.baxis.range[1]&&Ye.b<=G.baxis.range[0]&&Ye.c>=G.caxis.range[1]&&Ye.c<=G.caxis.range[0]},G.yaxis={type:"linear",range:[ee,se-pe-oe],domain:[ge-ze/2,ge+ze/2],_id:"y"},i(G.yaxis,G.graphDiv._fullLayout),G.yaxis.setScale(),G.yaxis.isPtWithinRange=function(){return!0};var Xe=G.yaxis.domain[0],Ve=G.aaxis=s({},z.aaxis,{range:[ee,se-pe-oe],side:"left",tickangle:(+z.aaxis.tickangle||0)-30,domain:[Xe,Xe+ze*f],anchor:"free",position:0,_id:"y",_length:ue});i(Ve,G.graphDiv._fullLayout),Ve.setScale();var rt=G.baxis=s({},z.baxis,{range:[se-ee-oe,pe],side:"bottom",domain:G.xaxis.domain,anchor:"free",position:0,_id:"x",_length:ue});i(rt,G.graphDiv._fullLayout),rt.setScale();var mt=G.caxis=s({},z.caxis,{range:[se-ee-pe,oe],side:"right",tickangle:(+z.caxis.tickangle||0)+30,domain:[Xe,Xe+ze*f],anchor:"free",position:0,_id:"y",_length:ue});i(mt,G.graphDiv._fullLayout),mt.setScale();var _t="M"+Y+","+(ce+_e)+"h"+ue+"l-"+ue/2+",-"+_e+"Z";G.clipDef.select("path").attr("d",_t),G.layers.plotbg.select("path").attr("d",_t);var vt="M0,"+_e+"h"+ue+"l-"+ue/2+",-"+_e+"Z";G.clipDefRelative.select("path").attr("d",vt);var ut=t(Y,ce);G.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",ut),G.clipDefRelative.select("path").attr("transform",null);var Fe=t(Y-rt._offset,ce+_e);G.layers.baxis.attr("transform",Fe),G.layers.bgrid.attr("transform",Fe);var Pe=t(Y+ue/2,ce)+"rotate(30)"+t(0,-Ve._offset);G.layers.aaxis.attr("transform",Pe),G.layers.agrid.attr("transform",Pe);var be=t(Y+ue/2,ce)+"rotate(-30)"+t(0,-mt._offset);G.layers.caxis.attr("transform",be),G.layers.cgrid.attr("transform",be),G.drawAxes(!0),G.layers.aline.select("path").attr("d",Ve.showline?"M"+Y+","+(ce+_e)+"l"+ue/2+",-"+_e:"M0,0").call(a.stroke,Ve.linecolor||"#000").style("stroke-width",(Ve.linewidth||0)+"px"),G.layers.bline.select("path").attr("d",rt.showline?"M"+Y+","+(ce+_e)+"h"+ue:"M0,0").call(a.stroke,rt.linecolor||"#000").style("stroke-width",(rt.linewidth||0)+"px"),G.layers.cline.select("path").attr("d",mt.showline?"M"+(Y+ue/2)+","+ce+"l"+ue/2+","+_e:"M0,0").call(a.stroke,mt.linecolor||"#000").style("stroke-width",(mt.linewidth||0)+"px"),G.graphDiv._context.staticPlot||G.initInteractions(),l.setClipUrl(G.layers.frontplot,G._hasClipOnAxisFalse?null:G.clipId,G.graphDiv)},y.drawAxes=function(z){var H=this,G=H.graphDiv,J=H.id.substr(7)+"title",le=H.layers,ge=H.aaxis,de=H.baxis,me=H.caxis;if(H.drawAx(ge),H.drawAx(de),H.drawAx(me),z){var W=Math.max(ge.showticklabels?ge.tickfont.size/2:0,(me.showticklabels?me.tickfont.size*.75:0)+(me.ticks==="outside"?me.ticklen*.87:0)),ie=(de.showticklabels?de.tickfont.size:0)+(de.ticks==="outside"?de.ticklen:0)+3;le["a-title"]=c.draw(G,"a"+J,{propContainer:ge,propName:H.id+".aaxis.title.text",placeholder:r(G,"Click to enter Component A title"),attributes:{x:H.x0+H.w/2,y:H.y0-ge.title.font.size/3-W,"text-anchor":"middle"}}),le["b-title"]=c.draw(G,"b"+J,{propContainer:de,propName:H.id+".baxis.title.text",placeholder:r(G,"Click to enter Component B title"),attributes:{x:H.x0-ie,y:H.y0+H.h+de.title.font.size*.83+ie,"text-anchor":"middle"}}),le["c-title"]=c.draw(G,"c"+J,{propContainer:me,propName:H.id+".caxis.title.text",placeholder:r(G,"Click to enter Component C title"),attributes:{x:H.x0+H.w+ie,y:H.y0+H.h+me.title.font.size*.83+ie,"text-anchor":"middle"}})}},y.drawAx=function(z){var H=this,G=H.graphDiv,J=z._name,le=J.charAt(0),ge=z._id,de=H.layers[J],me=30,W=le+"tickLayout",ie=p(z);H[W]!==ie&&(de.selectAll("."+ge+"tick").remove(),H[W]=ie),z.setScale();var se=u.calcTicks(z),ee=u.clipEnds(z,se),pe=u.makeTransTickFn(z),oe=u.getTickSigns(z)[2],Y=P.deg2rad(me),ce=oe*(z.linewidth||1)/2,ue=oe*z.ticklen,_e=H.w,Le=H.h,ze=le==="b"?"M0,"+ce+"l"+Math.sin(Y)*ue+","+Math.cos(Y)*ue:"M"+ce+",0l"+Math.cos(Y)*ue+","+-Math.sin(Y)*ue,Xe={a:"M0,0l"+Le+",-"+_e/2,b:"M0,0l-"+_e/2+",-"+Le,c:"M0,0l-"+Le+","+_e/2}[le];u.drawTicks(G,z,{vals:z.ticks==="inside"?ee:se,layer:de,path:ze,transFn:pe,crisp:!1}),u.drawGrid(G,z,{vals:ee,layer:H.layers[le+"grid"],path:Xe,transFn:pe,crisp:!1}),u.drawLabels(G,z,{vals:se,layer:de,transFn:pe,labelFns:u.makeLabelFns(z,0,me)})};function p(z){return z.ticks+String(z.ticklen)+String(z.showticklabels)}var x=b.MINZOOM/2+.87,N="m-0.87,.5h"+x+"v3h-"+(x+5.2)+"l"+(x/2+2.6)+",-"+(x*.87+4.5)+"l2.6,1.5l-"+x/2+","+x*.87+"Z",D="m0.87,.5h-"+x+"v3h"+(x+5.2)+"l-"+(x/2+2.6)+",-"+(x*.87+4.5)+"l-2.6,1.5l"+x/2+","+x*.87+"Z",B="m0,1l"+x/2+","+x*.87+"l2.6,-1.5l-"+(x/2+2.6)+",-"+(x*.87+4.5)+"l-"+(x/2+2.6)+","+(x*.87+4.5)+"l2.6,1.5l"+x/2+",-"+x*.87+"Z",U="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",V=!0;y.clearOutline=function(){k(this.dragOptions),M(this.dragOptions.gd)},y.initInteractions=function(){var z=this,H=z.layers.plotbg.select("path").node(),G=z.graphDiv,J=G._fullLayout._zoomlayer,le,ge;this.dragOptions={element:H,gd:G,plotinfo:{id:z.id,domain:G._fullLayout[z.id].domain,xaxis:z.xaxis,yaxis:z.yaxis},subplot:z.id,prepFn:function(Fe,Pe,be){z.dragOptions.xaxes=[z.xaxis],z.dragOptions.yaxes=[z.yaxis],le=G._fullLayout._invScaleX,ge=G._fullLayout._invScaleY;var Ye=z.dragOptions.dragmode=G._fullLayout.dragmode;m(Ye)?z.dragOptions.minDrag=1:z.dragOptions.minDrag=void 0,Ye==="zoom"?(z.dragOptions.moveFn=rt,z.dragOptions.clickFn=_e,z.dragOptions.doneFn=mt,Le(Fe,Pe,be)):Ye==="pan"?(z.dragOptions.moveFn=vt,z.dragOptions.clickFn=_e,z.dragOptions.doneFn=ut,_t(),z.clearOutline(G)):(E(Ye)||m(Ye))&&_(Fe,Pe,be,z.dragOptions,Ye)}};var de,me,W,ie,se,ee,pe,oe,Y,ce;function ue(Fe){var Pe={};return Pe[z.id+".aaxis.min"]=Fe.a,Pe[z.id+".baxis.min"]=Fe.b,Pe[z.id+".caxis.min"]=Fe.c,Pe}function _e(Fe,Pe){var be=G._fullLayout.clickmode;q(G),Fe===2&&(G.emit("plotly_doubleclick",null),C.call("_guiRelayout",G,ue({a:0,b:0,c:0}))),be.indexOf("select")>-1&&Fe===1&&T(Pe,G,[z.xaxis],[z.yaxis],z.id,z.dragOptions),be.indexOf("event")>-1&&h.click(G,Pe,z.id)}function Le(Fe,Pe,be){var Ye=H.getBoundingClientRect();de=Pe-Ye.left,me=be-Ye.top,G._fullLayout._calcInverseTransform(G);var yt=G._fullLayout._invTransform,wt=P.apply3DTransform(yt)(de,me);de=wt[0],me=wt[1],W={a:z.aaxis.range[0],b:z.baxis.range[1],c:z.caxis.range[1]},se=W,ie=z.aaxis.range[1]-W.a,ee=w(z.graphDiv._fullLayout[z.id].bgcolor).getLuminance(),pe="M0,"+z.h+"L"+z.w/2+", 0L"+z.w+","+z.h+"Z",oe=!1,Y=J.append("path").attr("class","zoombox").attr("transform",t(z.x0,z.y0)).style({fill:ee>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",pe),ce=J.append("path").attr("class","zoombox-corners").attr("transform",t(z.x0,z.y0)).style({fill:a.background,stroke:a.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),z.clearOutline(G)}function ze(Fe,Pe){return 1-Pe/z.h}function Xe(Fe,Pe){return 1-(Fe+(z.h-Pe)/Math.sqrt(3))/z.w}function Ve(Fe,Pe){return(Fe-(z.h-Pe)/Math.sqrt(3))/z.w}function rt(Fe,Pe){var be=de+Fe*le,Ye=me+Pe*ge,yt=Math.max(0,Math.min(1,ze(de,me),ze(be,Ye))),wt=Math.max(0,Math.min(1,Xe(de,me),Xe(be,Ye))),ht=Math.max(0,Math.min(1,Ve(de,me),Ve(be,Ye))),Yt=(yt/2+ht)*z.w,$t=(1-yt/2-wt)*z.w,fr=(Yt+$t)/2,mr=$t-Yt,Ur=(1-yt)*z.h,jr=Ur-mr/f;mr<b.MINZOOM?(se=W,Y.attr("d",pe),ce.attr("d","M0,0Z")):(se={a:W.a+yt*ie,b:W.b+wt*ie,c:W.c+ht*ie},Y.attr("d",pe+"M"+Yt+","+Ur+"H"+$t+"L"+fr+","+jr+"L"+Yt+","+Ur+"Z"),ce.attr("d","M"+de+","+me+U+"M"+Yt+","+Ur+N+"M"+$t+","+Ur+D+"M"+fr+","+jr+B)),oe||(Y.transition().style("fill",ee>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),ce.transition().style("opacity",1).duration(200),oe=!0),G.emit("plotly_relayouting",ue(se))}function mt(){q(G),se!==W&&(C.call("_guiRelayout",G,ue(se)),V&&G.data&&G._context.showTips&&(P.notifier(r(G,"Double-click to zoom back out"),"long"),V=!1))}function _t(){W={a:z.aaxis.range[0],b:z.baxis.range[1],c:z.caxis.range[1]},se=W}function vt(Fe,Pe){var be=Fe/z.xaxis._m,Ye=Pe/z.yaxis._m;se={a:W.a-Ye,b:W.b+(be+Ye)/2,c:W.c-(be-Ye)/2};var yt=[se.a,se.b,se.c].sort(P.sorterAsc),wt={a:yt.indexOf(se.a),b:yt.indexOf(se.b),c:yt.indexOf(se.c)};yt[0]<0&&(yt[1]+yt[0]/2<0?(yt[2]+=yt[0]+yt[1],yt[0]=yt[1]=0):(yt[2]+=yt[0]/2,yt[1]+=yt[0]/2,yt[0]=0),se={a:yt[wt.a],b:yt[wt.b],c:yt[wt.c]},Pe=(W.a-se.a)*z.yaxis._m,Fe=(W.c-se.c-W.b+se.b)*z.xaxis._m);var ht=t(z.x0+Fe,z.y0+Pe);z.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",ht);var Yt=t(-Fe,-Pe);z.clipDefRelative.select("path").attr("transform",Yt),z.aaxis.range=[se.a,z.sum-se.b-se.c],z.baxis.range=[z.sum-se.a-se.c,se.b],z.caxis.range=[z.sum-se.a-se.b,se.c],z.drawAxes(!1),z._hasClipOnAxisFalse&&z.plotContainer.select(".scatterlayer").selectAll(".trace").call(l.hideOutsideRangePoints,z),G.emit("plotly_relayouting",ue(se))}function ut(){C.call("_guiRelayout",G,ue(se))}H.onmousemove=function(Fe){h.hover(G,Fe,z.id),G._fullLayout._lasthover=H,G._fullLayout._hoversubplot=z.id},H.onmouseout=function(Fe){G._dragging||d.unhover(G,Fe)},d.init(this.dragOptions)};function q(z){v.select(z).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}}}),ZA=Ne({"src/plots/ternary/layout_attributes.js"(te,Z){var v=js(),w=Fc().attributes,C=Sd(),P=ef().overrideAll,t=fi().extendFlat,r={title:{text:C.title.text,font:C.title.font},color:C.color,tickmode:C.minor.tickmode,nticks:t({},C.nticks,{dflt:6,min:1}),tick0:C.tick0,dtick:C.dtick,tickvals:C.tickvals,ticktext:C.ticktext,ticks:C.ticks,ticklen:C.ticklen,tickwidth:C.tickwidth,tickcolor:C.tickcolor,ticklabelstep:C.ticklabelstep,showticklabels:C.showticklabels,labelalias:C.labelalias,showtickprefix:C.showtickprefix,tickprefix:C.tickprefix,showticksuffix:C.showticksuffix,ticksuffix:C.ticksuffix,showexponent:C.showexponent,exponentformat:C.exponentformat,minexponent:C.minexponent,separatethousands:C.separatethousands,tickfont:C.tickfont,tickangle:C.tickangle,tickformat:C.tickformat,tickformatstops:C.tickformatstops,hoverformat:C.hoverformat,showline:t({},C.showline,{dflt:!0}),linecolor:C.linecolor,linewidth:C.linewidth,showgrid:t({},C.showgrid,{dflt:!0}),gridcolor:C.gridcolor,gridwidth:C.gridwidth,griddash:C.griddash,layer:C.layer,min:{valType:"number",dflt:0,min:0}},a=Z.exports=P({domain:w({name:"ternary"}),bgcolor:{valType:"color",dflt:v.background},sum:{valType:"number",dflt:1,min:0},aaxis:r,baxis:r,caxis:r},"plot","from-root");a.uirevision={valType:"any",editType:"none"},a.aaxis.uirevision=a.baxis.uirevision=a.caxis.uirevision={valType:"any",editType:"none"}}}),W0=Ne({"src/plots/subplot_defaults.js"(te,Z){var v=In(),w=Cu(),C=Fc().defaults;Z.exports=function(t,r,a,l){var i=l.type,s=l.attributes,o=l.handleDefaults,u=l.partition||"x",d=r._subplots[i],h=d.length,g=h&&d[0].replace(/\d+$/,""),m,E;function c(k,b){return v.coerce(m,E,s,k,b)}for(var _=0;_<h;_++){var T=d[_];t[T]?m=t[T]:m=t[T]={},E=w.newContainer(r,T,g),l.noUirevision||c("uirevision",r.uirevision);var M={};M[u]=[_/h,(_+1)/h],C(E,r,c,M),l.id=T,o(m,E,c,l)}}}}),rC=Ne({"src/plots/ternary/layout_defaults.js"(te,Z){var v=Ha(),w=Cu(),C=In(),P=W0(),t=Em(),r=dp(),a=j0(),l=Ty(),i=ec(),s=ZA(),o=["aaxis","baxis","caxis"];Z.exports=function(g,m,E){P(g,m,E,{type:"ternary",attributes:s,handleDefaults:u,font:m.font,paper_bgcolor:m.paper_bgcolor})};function u(h,g,m,E){var c=m("bgcolor"),_=m("sum");E.bgColor=v.combine(c,E.paper_bgcolor);for(var T,M,k,b=0;b<o.length;b++)T=o[b],M=h[T]||{},k=w.newContainer(g,T),k._name=T,d(M,k,E,g);var A=g.aaxis,y=g.baxis,f=g.caxis;A.min+y.min+f.min>=_&&(A.min=0,y.min=0,f.min=0,h.aaxis&&delete h.aaxis.min,h.baxis&&delete h.baxis.min,h.caxis&&delete h.caxis.min)}function d(h,g,m,E){var c=s[g._name];function _(p,x){return C.coerce(h,g,c,p,x)}_("uirevision",E.uirevision),g.type="linear";var T=_("color"),M=T!==c.color.dflt?T:m.font.color,k=g._name,b=k.charAt(0).toUpperCase(),A="Component "+b,y=_("title.text",A);g._hovertitle=y===A?y:b,C.coerceFont(_,"title.font",m.font,{overrideDflt:{size:C.bigFont(m.font.size),color:M}}),_("min"),l(h,g,_,"linear"),r(h,g,_,"linear"),t(h,g,_,"linear",{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0}),a(h,g,_,{outerTicks:!0});var f=_("showticklabels");f&&(C.coerceFont(_,"tickfont",m.font,{overrideDflt:{color:M}}),_("tickangle"),_("tickformat")),i(h,g,_,{dfltColor:T,bgColor:m.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:c}),_("hoverformat"),_("layer")}}}),nC=Ne({"src/plots/ternary/index.js"(te){var Z=M2(),v=lv().getSubplotCalcData,w=In().counterRegex,C="ternary";te.name=C;var P=te.attr="subplot";te.idRoot=C,te.idRegex=te.attrRegex=w(C);var t=te.attributes={};t[P]={valType:"subplotid",dflt:"ternary",editType:"calc"},te.layoutAttributes=ZA(),te.supplyLayoutDefaults=rC(),te.plot=function(a){for(var l=a._fullLayout,i=a.calcdata,s=l._subplots[C],o=0;o<s.length;o++){var u=s[o],d=v(i,C,u),h=l[u]._subplot;h||(h=new Z({id:u,graphDiv:a,container:l._ternarylayer.node()},l),l[u]._subplot=h),h.plot(d,l,a._promises)}},te.clean=function(r,a,l,i){for(var s=i._subplots[C]||[],o=0;o<s.length;o++){var u=s[o],d=i[u]._subplot;!a[u]&&d&&(d.plotContainer.remove(),d.clipDef.remove(),d.clipDefRelative.remove(),d.layers["a-title"].remove(),d.layers["b-title"].remove(),d.layers["c-title"].remove())}},te.updateFx=function(r){var a=r._fullLayout;a._ternarylayer.selectAll("g.toplevel").style("cursor",a.dragmode==="pan"?"move":"crosshair")}}}),WL=Ne({"src/traces/scatterternary/index.js"(te,Z){Z.exports={attributes:E2(),supplyDefaults:KM(),colorbar:sh(),formatLabels:JM(),calc:jy(),plot:QM(),style:Xh().style,styleOnSelect:Xh().styleOnSelect,hoverPoints:eC(),selectPoints:Py(),eventData:tC(),moduleType:"trace",name:"scatterternary",basePlotModule:nC(),categories:["ternary","symbols","showLegend","scatter-like"],meta:{}}}}),$A=Ne({"lib/scatterternary.js"(te,Z){Z.exports=WL()}}),od=Ne({"src/traces/violin/attributes.js"(te,Z){var v=Fy(),w=fi().extendFlat,C=Ac().axisHoverFormat;Z.exports={y:v.y,x:v.x,x0:v.x0,y0:v.y0,xhoverformat:C("x"),yhoverformat:C("y"),name:w({},v.name,{}),orientation:w({},v.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:v.fillcolor,points:w({},v.boxpoints,{}),jitter:w({},v.jitter,{}),pointpos:w({},v.pointpos,{}),width:w({},v.width,{}),marker:v.marker,text:v.text,hovertext:v.hovertext,hovertemplate:v.hovertemplate,hovertemplatefallback:v.hovertemplatefallback,quartilemethod:v.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:v.offsetgroup,alignmentgroup:v.alignmentgroup,selected:v.selected,unselected:v.unselected,hoveron:{valType:"flaglist",flags:["violins","points","kde"],dflt:"violins+points+kde",extras:["all"],editType:"style"},zorder:v.zorder}}}),hv=Ne({"src/traces/violin/layout_attributes.js"(te,Z){var v=Fg(),w=In().extendFlat;Z.exports={violinmode:w({},v.boxmode,{}),violingap:w({},v.boxgap,{}),violingroupgap:w({},v.boxgroupgap,{})}}}),aC=Ne({"src/traces/violin/defaults.js"(te,Z){var v=In(),w=Ha(),C=X0(),P=od();Z.exports=function(r,a,l,i){function s(f,p){return v.coerce(r,a,P,f,p)}function o(f,p){return v.coerce2(r,a,P,f,p)}if(C.handleSampleDefaults(r,a,s,i),a.visible!==!1){s("bandwidth"),s("side");var u=s("width");u||(s("scalegroup",a.name),s("scalemode"));var d=s("span"),h;Array.isArray(d)&&(h="manual"),s("spanmode",h);var g=s("line.color",(r.marker||{}).color||l),m=s("line.width"),E=s("fillcolor",w.addOpacity(a.line.color,.5));C.handlePointsDefaults(r,a,s,{prefix:""});var c=o("box.width"),_=o("box.fillcolor",E),T=o("box.line.color",g),M=o("box.line.width",m),k=s("box.visible",!!(c||_||T||M));k||(a.box={visible:!1});var b=o("meanline.color",g),A=o("meanline.width",m),y=s("meanline.visible",!!(b||A));y||(a.meanline={visible:!1}),s("quartilemethod"),s("zorder")}}}}),iC=Ne({"src/traces/violin/layout_defaults.js"(te,Z){var v=In(),w=hv(),C=DA();Z.exports=function(t,r,a){function l(i,s){return v.coerce(t,r,w,i,s)}C._supply(t,r,a,l,"violin")}}}),C2=Ne({"src/traces/violin/helpers.js"(te){var Z=In(),v={gaussian:function(w){return 1/Math.sqrt(2*Math.PI)*Math.exp(-.5*w*w)}};te.makeKDE=function(w,C,P){var t=P.length,r=v.gaussian,a=w.bandwidth,l=1/(t*a);return function(i){for(var s=0,o=0;o<t;o++)s+=r((i-P[o])/a);return l*s}},te.getPositionOnKdePath=function(w,C,P){var t,r;C.orientation==="h"?(t="y",r="x"):(t="x",r="y");var a=Z.findPointOnPath(w.path,P,r,{pathLength:w.pathLength}),l=w.posCenterPx,i=a[t],s=C.side==="both"?2*l-i:l;return[i,s]},te.getKdeValue=function(w,C,P){var t=w.pts.map(te.extractVal),r=te.makeKDE(w,C,t);return r(P)/w.posDensityScale},te.extractVal=function(w){return w.v}}}),oC=Ne({"src/traces/violin/calc.js"(te,Z){var v=In(),w=Os(),C=Dh(),P=C2(),t=da().BADNUM;Z.exports=function(s,o){var u=C(s,o);if(u[0].t.empty)return u;for(var d=s._fullLayout,h=w.getFromId(s,o[o.orientation==="h"?"xaxis":"yaxis"]),g=1/0,m=-1/0,E=0,c=0,_=0;_<u.length;_++){var T=u[_],M=T.pts.map(P.extractVal),k=T.bandwidth=a(o,T,M),b=T.span=l(o,T,h,k);if(T.min===T.max&&k===0)b=T.span=[T.min,T.max],T.density=[{v:1,t:b[0]}],T.bandwidth=k,E=Math.max(E,1);else{var A=b[1]-b[0],y=Math.ceil(A/(k/3)),f=A/y;if(!isFinite(f)||!isFinite(y))return v.error("Something went wrong with computing the violin span"),u[0].t.empty=!0,u;var p=P.makeKDE(T,o,M);T.density=new Array(y+1);for(var x=0;x<T.density.length;x++){var N=b[0]+x*f,D=p(N);T.density[x]={v:D,t:N},E=Math.max(E,D)}}c=Math.max(c,M.length),g=Math.min(g,b[0]),m=Math.max(m,b[1])}var B=w.findExtremes(h,[g,m],{padded:!0});if(o._extremes[h._id]=B,o.width)u[0].t.maxKDE=E;else{var U=d._violinScaleGroupStats,V=o.scalegroup,q=U[V];q?(q.maxKDE=Math.max(q.maxKDE,E),q.maxCount=Math.max(q.maxCount,c)):U[V]={maxKDE:E,maxCount:c}}return u[0].t.labels.kde=v._(s,"kde:"),u};function r(i,s,o){var u=Math.min(s,o/1.349);return 1.059*u*Math.pow(i,-.2)}function a(i,s,o){var u=s.max-s.min;if(!u)return i.bandwidth?i.bandwidth:0;if(i.bandwidth)return Math.max(i.bandwidth,u/1e4);var d=o.length,h=v.stdev(o,d-1,s.mean);return Math.max(r(d,h,s.q3-s.q1),u/100)}function l(i,s,o,u){var d=i.spanmode,h=i.span||[],g=[s.min,s.max],m=[s.min-2*u,s.max+2*u],E;function c(T){var M=h[T],k=o.type==="multicategory"?o.r2c(M):o.d2c(M,0,i[s.valLetter+"calendar"]);return k===t?m[T]:k}d==="soft"?E=m:d==="hard"?E=g:E=[c(0),c(1)];var _={type:"linear",range:E};return w.setConvert(_),_.cleanRange(),E}}}),Kx=Ne({"src/traces/violin/cross_trace_calc.js"(te,Z){var v=Ux().setPositionOffset,w=["v","h"];Z.exports=function(P,t){for(var r=P.calcdata,a=t.xaxis,l=t.yaxis,i=0;i<w.length;i++){for(var s=w[i],o=s==="h"?l:a,u=[],d=0;d<r.length;d++){var h=r[d],g=h[0].t,m=h[0].trace;m.visible===!0&&m.type==="violin"&&!g.empty&&m.orientation===s&&m.xaxis===a._id&&m.yaxis===l._id&&u.push(d)}v("violin",P,u,o)}}}}),sC=Ne({"src/traces/violin/plot.js"(te,Z){var v=xn(),w=In(),C=zs(),P=qx(),t=Zp(),r=C2();Z.exports=function(l,i,s,o){var u=l._context.staticPlot,d=l._fullLayout,h=i.xaxis,g=i.yaxis;function m(E,c){var _=t(E,{xaxis:h,yaxis:g,trace:c,connectGaps:!0,baseTolerance:.75,shape:"spline",simplify:!0,linearized:!0});return C.smoothopen(_[0],1)}w.makeTraceGroups(o,s,"trace violins").each(function(E){var c=v.select(this),_=E[0],T=_.t,M=_.trace;if(M.visible!==!0||T.empty){c.remove();return}var k=T.bPos,b=T.bdPos,A=i[T.valLetter+"axis"],y=i[T.posLetter+"axis"],f=M.side==="both",p=f||M.side==="positive",x=f||M.side==="negative",N=c.selectAll("path.violin").data(w.identity);N.enter().append("path").style("vector-effect",u?"none":"non-scaling-stroke").attr("class","violin"),N.exit().remove(),N.each(function(G){var J=v.select(this),le=G.density,ge=le.length,de=y.c2l(G.pos+k,!0),me=y.l2p(de),W;if(M.width)W=T.maxKDE/b;else{var ie=d._violinScaleGroupStats[M.scalegroup];W=M.scalemode==="count"?ie.maxKDE/b*(ie.maxCount/G.pts.length):ie.maxKDE/b}var se,ee,pe,oe,Y,ce,ue;if(p){for(ce=new Array(ge),oe=0;oe<ge;oe++)ue=ce[oe]={},ue[T.posLetter]=de+le[oe].v/W,ue[T.valLetter]=A.c2l(le[oe].t,!0);se=m(ce,M)}if(x){for(ce=new Array(ge),Y=0,oe=ge-1;Y<ge;Y++,oe--)ue=ce[Y]={},ue[T.posLetter]=de-le[oe].v/W,ue[T.valLetter]=A.c2l(le[oe].t,!0);ee=m(ce,M)}if(f)pe=se+"L"+ee.substr(1)+"Z";else{var _e=[me,A.c2p(le[0].t)],Le=[me,A.c2p(le[ge-1].t)];M.orientation==="h"&&(_e.reverse(),Le.reverse()),p?pe="M"+_e+"L"+se.substr(1)+"L"+Le:pe="M"+Le+"L"+ee.substr(1)+"L"+_e}J.attr("d",pe),G.posCenterPx=me,G.posDensityScale=W*b,G.path=J.node(),G.pathLength=G.path.getTotalLength()/(f?2:1)});var D=M.box,B=D.width,U=(D.line||{}).width,V,q;f?(V=b*B,q=0):p?(V=[0,b*B/2],q=U*{x:1,y:-1}[T.posLetter]):(V=[b*B/2,0],q=U*{x:-1,y:1}[T.posLetter]),P.plotBoxAndWhiskers(c,{pos:y,val:A},M,{bPos:k,bdPos:V,bPosPxOffset:q}),P.plotBoxMean(c,{pos:y,val:A},M,{bPos:k,bdPos:V,bPosPxOffset:q});var z;!M.box.visible&&M.meanline.visible&&(z=w.identity);var H=c.selectAll("path.meanline").data(z||[]);H.enter().append("path").attr("class","meanline").style("fill","none").style("vector-effect",u?"none":"non-scaling-stroke"),H.exit().remove(),H.each(function(G){var J=A.c2p(G.mean,!0),le=r.getPositionOnKdePath(G,M,J);v.select(this).attr("d",M.orientation==="h"?"M"+J+","+le[0]+"V"+le[1]:"M"+le[0]+","+J+"H"+le[1])}),P.plotPoints(c,{x:h,y:g},M,T)})}}}),k2=Ne({"src/traces/violin/style.js"(te,Z){var v=xn(),w=Ha(),C=Xh().stylePoints;Z.exports=function(t){var r=v.select(t).selectAll("g.trace.violins");r.style("opacity",function(a){return a[0].trace.opacity}),r.each(function(a){var l=a[0].trace,i=v.select(this),s=l.box||{},o=s.line||{},u=l.meanline||{},d=u.width;i.selectAll("path.violin").style("stroke-width",l.line.width+"px").call(w.stroke,l.line.color).call(w.fill,l.fillcolor),i.selectAll("path.box").style("stroke-width",o.width+"px").call(w.stroke,o.color).call(w.fill,s.fillcolor);var h={"stroke-width":d+"px","stroke-dasharray":2*d+"px,"+d+"px"};i.selectAll("path.mean").style(h).call(w.stroke,u.color),i.selectAll("path.meanline").style(h).call(w.stroke,u.color),C(i,l,t)})}}}),lC=Ne({"src/traces/violin/hover.js"(te,Z){var v=Ha(),w=In(),C=Os(),P=OA(),t=C2();Z.exports=function(a,l,i,s,o){o||(o={});var u=o.hoverLayer,d=a.cd,h=d[0].trace,g=h.hoveron,m=g.indexOf("violins")!==-1,E=g.indexOf("kde")!==-1,c=[],_,T;if(m||E){var M=P.hoverOnBoxes(a,l,i,s);if(E&&M.length>0){var k=a.xa,b=a.ya,A,y,f,p,x;h.orientation==="h"?(x=l,A="y",f=b,y="x",p=k):(x=i,A="x",f=k,y="y",p=b);var N=d[a.index];if(x>=N.span[0]&&x<=N.span[1]){var D=w.extendFlat({},a),B=p.c2p(x,!0),U=t.getKdeValue(N,h,x),V=t.getPositionOnKdePath(N,h,B),q=f._offset,z=f._length;D[A+"0"]=V[0],D[A+"1"]=V[1],D[y+"0"]=D[y+"1"]=B,D[y+"Label"]=y+": "+C.hoverLabelText(p,x,h[y+"hoverformat"])+", "+d[0].t.labels.kde+" "+U.toFixed(3);for(var H=0,G=0;G<M.length;G++)if(M[G].attr==="med"){H=G;break}D.spikeDistance=M[H].spikeDistance;var J=A+"Spike";D[J]=M[H][J],M[H].spikeDistance=void 0,M[H][J]=void 0,D.hovertemplate=!1,c.push(D),T={},T[A+"1"]=w.constrain(q+V[0],q,q+z),T[A+"2"]=w.constrain(q+V[1],q,q+z),T[y+"1"]=T[y+"2"]=p._offset+B}}m&&(c=c.concat(M))}g.indexOf("points")!==-1&&(_=P.hoverOnPoints(a,l,i));var le=u.selectAll(".violinline-"+h.uid).data(T?[0]:[]);return le.enter().append("line").classed("violinline-"+h.uid,!0).attr("stroke-width",1.5),le.exit().remove(),le.attr(T).call(v.stroke,a.color),s==="closest"?_?[_]:c:(_&&c.push(_),c)}}}),YL=Ne({"src/traces/violin/index.js"(te,Z){Z.exports={attributes:od(),layoutAttributes:hv(),supplyDefaults:aC(),crossTraceDefaults:X0().crossTraceDefaults,supplyLayoutDefaults:iC(),calc:oC(),crossTraceCalc:Kx(),plot:sC(),style:k2(),styleOnSelect:Xh().styleOnSelect,hoverPoints:lC(),selectPoints:t2(),moduleType:"trace",name:"violin",basePlotModule:Ih(),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","violinLayout","zoomScale"],meta:{}}}}),P2=Ne({"lib/violin.js"(te,Z){Z.exports=YL()}}),KA=Ne({"src/traces/funnel/constants.js"(te,Z){Z.exports={eventDataKeys:["percentInitial","percentPrevious","percentTotal"]}}}),JA=Ne({"src/traces/funnel/attributes.js"(te,Z){var v=id(),w=tf().line,C=qo(),P=Ac().axisHoverFormat,{hovertemplateAttrs:t,texttemplateAttrs:r,templatefallbackAttrs:a}=Fl(),l=KA(),i=fi().extendFlat,s=Ha();Z.exports={x:v.x,x0:v.x0,dx:v.dx,y:v.y,y0:v.y0,dy:v.dy,xperiod:v.xperiod,yperiod:v.yperiod,xperiod0:v.xperiod0,yperiod0:v.yperiod0,xperiodalignment:v.xperiodalignment,yperiodalignment:v.yperiodalignment,xhoverformat:P("x"),yhoverformat:P("y"),hovertext:v.hovertext,hovertemplate:t({},{keys:l.eventDataKeys}),hovertemplatefallback:a(),hoverinfo:i({},C.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:r({editType:"plot"},{keys:l.eventDataKeys.concat(["label","value"])}),texttemplatefallback:a({editType:"plot"}),text:v.text,textposition:v.textposition,insidetextanchor:i({},v.insidetextanchor,{dflt:"middle"}),textangle:i({},v.textangle,{dflt:0}),textfont:v.textfont,insidetextfont:v.insidetextfont,outsidetextfont:v.outsidetextfont,constraintext:v.constraintext,cliponaxis:v.cliponaxis,orientation:i({},v.orientation,{}),offset:i({},v.offset,{arrayOk:!1}),width:i({},v.width,{arrayOk:!1}),marker:o(),connector:{fillcolor:{valType:"color",editType:"style"},line:{color:i({},w.color,{dflt:s.defaultLine}),width:i({},w.width,{dflt:0,editType:"plot"}),dash:w.dash,editType:"style"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:v.offsetgroup,alignmentgroup:v.alignmentgroup,zorder:v.zorder};function o(){var u=i({},v.marker);return delete u.pattern,delete u.cornerradius,u}}}),QA=Ne({"src/traces/funnel/layout_attributes.js"(te,Z){Z.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"}}}}),eS=Ne({"src/traces/funnel/defaults.js"(te,Z){var v=In(),w=U0(),C=mp().handleText,P=Lm(),t=Rm(),r=JA(),a=Ha();function l(o,u,d,h){function g(k,b){return v.coerce(o,u,r,k,b)}var m=P(o,u,h,g);if(!m){u.visible=!1;return}t(o,u,h,g),g("xhoverformat"),g("yhoverformat"),g("orientation",u.y&&!u.x?"v":"h"),g("offset"),g("width");var E=g("text");g("hovertext"),g("hovertemplate"),g("hovertemplatefallback");var c=g("textposition");C(o,u,h,g,c,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),u.textposition!=="none"&&!u.texttemplate&&g("textinfo",v.isArrayOrTypedArray(E)?"text+value":"value");var _=g("marker.color",d);g("marker.line.color",a.defaultLine),g("marker.line.width");var T=g("connector.visible");if(T){g("connector.fillcolor",i(_));var M=g("connector.line.width");M&&(g("connector.line.color"),g("connector.line.dash"))}g("zorder")}function i(o){var u=v.isArrayOrTypedArray(o)?"#000":o;return a.addOpacity(u,.5*a.opacity(u))}function s(o,u){var d,h;function g(E){return v.coerce(h._input,h,r,E)}for(var m=0;m<o.length;m++)h=o[m],h.type==="funnel"&&(d=h._input,w(d,h,u,g,u.funnelmode))}Z.exports={supplyDefaults:l,crossTraceDefaults:s}}}),tS=Ne({"src/traces/funnel/layout_defaults.js"(te,Z){var v=In(),w=QA();Z.exports=function(C,P,t){var r=!1;function a(s,o){return v.coerce(C,P,w,s,o)}for(var l=0;l<t.length;l++){var i=t[l];if(i.visible&&i.type==="funnel"){r=!0;break}}r&&(a("funnelmode"),a("funnelgap",.2),a("funnelgroupgap"))}}}),rS=Ne({"src/traces/funnel/arrays_to_calcdata.js"(te,Z){var v=In();Z.exports=function(C,P){for(var t=0;t<C.length;t++)C[t].i=t;v.mergeArray(P.text,C,"tx"),v.mergeArray(P.hovertext,C,"htx");var r=P.marker;if(r){v.mergeArray(r.opacity,C,"mo"),v.mergeArray(r.color,C,"mc");var a=r.line;a&&(v.mergeArray(a.color,C,"mlc"),v.mergeArrayCastPositive(a.width,C,"mlw"))}}}}),nS=Ne({"src/traces/funnel/calc.js"(te,Z){var v=Os(),w=Dm(),C=rS(),P=Gh(),t=da().BADNUM;Z.exports=function(l,i){var s=v.getFromId(l,i.xaxis||"x"),o=v.getFromId(l,i.yaxis||"y"),u,d,h,g,m,E,c,_;i.orientation==="h"?(u=s.makeCalcdata(i,"x"),h=o.makeCalcdata(i,"y"),g=w(i,o,"y",h),m=!!i.yperiodalignment,E="y"):(u=o.makeCalcdata(i,"y"),h=s.makeCalcdata(i,"x"),g=w(i,s,"x",h),m=!!i.xperiodalignment,E="x"),d=g.vals;var T=Math.min(d.length,u.length),M=new Array(T);for(i._base=[],c=0;c<T;c++){u[c]<0&&(u[c]=t);var k=!1;u[c]!==t&&c+1<T&&u[c+1]!==t&&(k=!0),_=M[c]={p:d[c],s:u[c],cNext:k},i._base[c]=-.5*_.s,m&&(M[c].orig_p=h[c],M[c][E+"End"]=g.ends[c],M[c][E+"Start"]=g.starts[c]),i.ids&&(_.id=String(i.ids[c])),c===0&&(M[0].vTotal=0),M[0].vTotal+=r(_.s),_.begR=r(_.s)/r(M[0].s)}var b;for(c=0;c<T;c++)_=M[c],_.s!==t&&(_.sumR=_.s/M[0].vTotal,_.difR=b!==void 0?_.s/b:1,b=_.s);return C(M,i),P(M,i),M};function r(a){return a===t?0:a}}}),uC=Ne({"src/traces/funnel/cross_trace_calc.js"(te,Z){var v=q0().setGroupPositions;Z.exports=function(C,P){var t=C._fullLayout,r=C._fullData,a=C.calcdata,l=P.xaxis,i=P.yaxis,s=[],o=[],u=[],d,h;for(h=0;h<r.length;h++){var g=r[h],m=g.orientation==="h";g.visible===!0&&g.xaxis===l._id&&g.yaxis===i._id&&g.type==="funnel"&&(d=a[h],m?u.push(d):o.push(d),s.push(d))}var E={mode:t.funnelmode,norm:t.funnelnorm,gap:t.funnelgap,groupgap:t.funnelgroupgap};for(v(C,l,i,o,E),v(C,i,l,u,E),h=0;h<s.length;h++){d=s[h];for(var c=0;c<d.length;c++)c+1<d.length&&(d[c].nextP0=d[c+1].p0,d[c].nextS0=d[c+1].s0,d[c].nextP1=d[c+1].p1,d[c].nextS1=d[c+1].s1)}}}}),aS=Ne({"src/traces/funnel/plot.js"(te,Z){var v=xn(),w=In(),C=zs(),P=da().BADNUM,t=mu(),r=_c().clearMinTextSize;Z.exports=function(o,u,d,h){var g=o._fullLayout;r("funnel",g),a(o,u,d,h),l(o,u,d,h),t.plot(o,u,d,h,{mode:g.funnelmode,norm:g.funnelmode,gap:g.funnelgap,groupgap:g.funnelgroupgap})};function a(s,o,u,d){var h=o.xaxis,g=o.yaxis;w.makeTraceGroups(d,u,"trace bars").each(function(m){var E=v.select(this),c=m[0].trace,_=w.ensureSingle(E,"g","regions");if(!c.connector||!c.connector.visible){_.remove();return}var T=c.orientation==="h",M=_.selectAll("g.region").data(w.identity);M.enter().append("g").classed("region",!0),M.exit().remove();var k=M.size();M.each(function(b,A){if(!(A!==k-1&&!b.cNext)){var y=i(b,h,g,T),f=y[0],p=y[1],x="";f[0]!==P&&p[0]!==P&&f[1]!==P&&p[1]!==P&&f[2]!==P&&p[2]!==P&&f[3]!==P&&p[3]!==P&&(T?x+="M"+f[0]+","+p[1]+"L"+f[2]+","+p[2]+"H"+f[3]+"L"+f[1]+","+p[1]+"Z":x+="M"+f[1]+","+p[1]+"L"+f[2]+","+p[3]+"V"+p[2]+"L"+f[1]+","+p[0]+"Z"),x===""&&(x="M0,0Z"),w.ensureSingle(v.select(this),"path").attr("d",x).call(C.setClipUrl,o.layerClipId,s)}})})}function l(s,o,u,d){var h=o.xaxis,g=o.yaxis;w.makeTraceGroups(d,u,"trace bars").each(function(m){var E=v.select(this),c=m[0].trace,_=w.ensureSingle(E,"g","lines");if(!c.connector||!c.connector.visible||!c.connector.line.width){_.remove();return}var T=c.orientation==="h",M=_.selectAll("g.line").data(w.identity);M.enter().append("g").classed("line",!0),M.exit().remove();var k=M.size();M.each(function(b,A){if(!(A!==k-1&&!b.cNext)){var y=i(b,h,g,T),f=y[0],p=y[1],x="";f[3]!==void 0&&p[3]!==void 0&&(T?(x+="M"+f[0]+","+p[1]+"L"+f[2]+","+p[2],x+="M"+f[1]+","+p[1]+"L"+f[3]+","+p[2]):(x+="M"+f[1]+","+p[1]+"L"+f[2]+","+p[3],x+="M"+f[1]+","+p[0]+"L"+f[2]+","+p[2])),x===""&&(x="M0,0Z"),w.ensureSingle(v.select(this),"path").attr("d",x).call(C.setClipUrl,o.layerClipId,s)}})})}function i(s,o,u,d){var h=[],g=[],m=d?o:u,E=d?u:o;return h[0]=m.c2p(s.s0,!0),g[0]=E.c2p(s.p0,!0),h[1]=m.c2p(s.s1,!0),g[1]=E.c2p(s.p1,!0),h[2]=m.c2p(s.nextS0,!0),g[2]=E.c2p(s.nextP0,!0),h[3]=m.c2p(s.nextS1,!0),g[3]=E.c2p(s.nextP1,!0),d?[h,g]:[g,h]}}}),L2=Ne({"src/traces/funnel/style.js"(te,Z){var v=xn(),w=zs(),C=Ha(),P=El().DESELECTDIM,t=qd(),r=_c().resizeText,a=t.styleTextPoints;function l(i,s,o){var u=o||v.select(i).selectAll('g[class^="funnellayer"]').selectAll("g.trace");r(i,u,"funnel"),u.style("opacity",function(d){return d[0].trace.opacity}),u.each(function(d){var h=v.select(this),g=d[0].trace;h.selectAll(".point > path").each(function(m){if(!m.isBlank){var E=g.marker;v.select(this).call(C.fill,m.mc||E.color).call(C.stroke,m.mlc||E.line.color).call(w.dashLine,E.line.dash,m.mlw||E.line.width).style("opacity",g.selectedpoints&&!m.selected?P:1)}}),a(h,g,i),h.selectAll(".regions").each(function(){v.select(this).selectAll("path").style("stroke-width",0).call(C.fill,g.connector.fillcolor)}),h.selectAll(".lines").each(function(){var m=g.connector.line;w.lineGroupStyle(v.select(this).selectAll("path"),m.width,m.color,m.dash)})})}Z.exports={style:l}}}),iS=Ne({"src/traces/funnel/hover.js"(te,Z){var v=Ha().opacity,w=Bc().hoverOnBars,C=In().formatPercent;Z.exports=function(r,a,l,i,s){var o=w(r,a,l,i,s);if(o){var u=o.cd,d=u[0].trace,h=d.orientation==="h",g=o.index,m=u[g],E=h?"x":"y";o[E+"LabelVal"]=m.s,o.percentInitial=m.begR,o.percentInitialLabel=C(m.begR,1),o.percentPrevious=m.difR,o.percentPreviousLabel=C(m.difR,1),o.percentTotal=m.sumR,o.percentTotalLabel=C(m.sumR,1);var c=m.hi||d.hoverinfo,_=[];if(c&&c!=="none"&&c!=="skip"){var T=c==="all",M=c.split("+"),k=function(b){return T||M.indexOf(b)!==-1};k("percent initial")&&_.push(o.percentInitialLabel+" of initial"),k("percent previous")&&_.push(o.percentPreviousLabel+" of previous"),k("percent total")&&_.push(o.percentTotalLabel+" of total")}return o.extraText=_.join("<br>"),o.color=P(d,m),[o]}};function P(t,r){var a=t.marker,l=r.mc||a.color,i=r.mlc||a.line.color,s=r.mlw||a.line.width;if(v(l))return l;if(v(i)&&s)return i}}}),cC=Ne({"src/traces/funnel/event_data.js"(te,Z){Z.exports=function(w,C){return w.x="xVal"in C?C.xVal:C.x,w.y="yVal"in C?C.yVal:C.y,"percentInitial"in C&&(w.percentInitial=C.percentInitial),"percentPrevious"in C&&(w.percentPrevious=C.percentPrevious),"percentTotal"in C&&(w.percentTotal=C.percentTotal),C.xa&&(w.xaxis=C.xa),C.ya&&(w.yaxis=C.ya),w}}}),oS=Ne({"src/traces/funnel/index.js"(te,Z){Z.exports={attributes:JA(),layoutAttributes:QA(),supplyDefaults:eS().supplyDefaults,crossTraceDefaults:eS().crossTraceDefaults,supplyLayoutDefaults:tS(),calc:nS(),crossTraceCalc:uC(),plot:aS(),style:L2().style,hoverPoints:iS(),eventData:cC(),selectPoints:Ng(),moduleType:"trace",name:"funnel",basePlotModule:Ih(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}}),fC=Ne({"lib/funnel.js"(te,Z){Z.exports=oS()}}),Y0=Ne({"src/traces/waterfall/constants.js"(te,Z){Z.exports={eventDataKeys:["initial","delta","final"]}}}),R2=Ne({"src/traces/waterfall/attributes.js"(te,Z){var v=id(),w=tf().line,C=qo(),P=Ac().axisHoverFormat,{hovertemplateAttrs:t,texttemplateAttrs:r,templatefallbackAttrs:a}=Fl(),l=Y0(),i=fi().extendFlat,s=Ha();function o(u){return{marker:{color:i({},v.marker.color,{arrayOk:!1,editType:"style"}),line:{color:i({},v.marker.line.color,{arrayOk:!1,editType:"style"}),width:i({},v.marker.line.width,{arrayOk:!1,editType:"style"}),editType:"style"},editType:"style"},editType:"style"}}Z.exports={measure:{valType:"data_array",dflt:[],editType:"calc"},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc"},x:v.x,x0:v.x0,dx:v.dx,y:v.y,y0:v.y0,dy:v.dy,xperiod:v.xperiod,yperiod:v.yperiod,xperiod0:v.xperiod0,yperiod0:v.yperiod0,xperiodalignment:v.xperiodalignment,yperiodalignment:v.yperiodalignment,xhoverformat:P("x"),yhoverformat:P("y"),hovertext:v.hovertext,hovertemplate:t({},{keys:l.eventDataKeys}),hovertemplatefallback:a(),hoverinfo:i({},C.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:r({editType:"plot"},{keys:l.eventDataKeys.concat(["label"])}),texttemplatefallback:a({editType:"plot"}),text:v.text,textposition:v.textposition,insidetextanchor:v.insidetextanchor,textangle:v.textangle,textfont:v.textfont,insidetextfont:v.insidetextfont,outsidetextfont:v.outsidetextfont,constraintext:v.constraintext,cliponaxis:v.cliponaxis,orientation:v.orientation,offset:v.offset,width:v.width,increasing:o(),decreasing:o(),totals:o(),connector:{line:{color:i({},w.color,{dflt:s.defaultLine}),width:i({},w.width,{editType:"plot"}),dash:w.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:v.offsetgroup,alignmentgroup:v.alignmentgroup,zorder:v.zorder}}}),hC=Ne({"src/traces/waterfall/layout_attributes.js"(te,Z){Z.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"}}}}),a_=Ne({"src/constants/delta.js"(te,Z){Z.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"▲"},DECREASING:{COLOR:"#FF4136",SYMBOL:"▼"}}}}),c0=Ne({"src/traces/waterfall/defaults.js"(te,Z){var v=In(),w=U0(),C=mp().handleText,P=Lm(),t=Rm(),r=R2(),a=Ha(),l=a_(),i=l.INCREASING.COLOR,s=l.DECREASING.COLOR,o="#4499FF";function u(g,m,E){g(m+".marker.color",E),g(m+".marker.line.color",a.defaultLine),g(m+".marker.line.width")}function d(g,m,E,c){function _(A,y){return v.coerce(g,m,r,A,y)}var T=P(g,m,c,_);if(!T){m.visible=!1;return}t(g,m,c,_),_("xhoverformat"),_("yhoverformat"),_("measure"),_("orientation",m.x&&!m.y?"h":"v"),_("base"),_("offset"),_("width"),_("text"),_("hovertext"),_("hovertemplate"),_("hovertemplatefallback");var M=_("textposition");C(g,m,c,_,M,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),m.textposition!=="none"&&(_("texttemplate"),_("texttemplatefallback"),m.texttemplate||_("textinfo")),u(_,"increasing",i),u(_,"decreasing",s),u(_,"totals",o);var k=_("connector.visible");if(k){_("connector.mode");var b=_("connector.line.width");b&&(_("connector.line.color"),_("connector.line.dash"))}_("zorder")}function h(g,m){var E,c;function _(M){return v.coerce(c._input,c,r,M)}if(m.waterfallmode==="group")for(var T=0;T<g.length;T++)c=g[T],E=c._input,w(E,c,m,_,m.waterfallmode)}Z.exports={supplyDefaults:d,crossTraceDefaults:h}}}),sS=Ne({"src/traces/waterfall/layout_defaults.js"(te,Z){var v=In(),w=hC();Z.exports=function(C,P,t){var r=!1;function a(s,o){return v.coerce(C,P,w,s,o)}for(var l=0;l<t.length;l++){var i=t[l];if(i.visible&&i.type==="waterfall"){r=!0;break}}r&&(a("waterfallmode"),a("waterfallgap",.2),a("waterfallgroupgap"))}}}),dC=Ne({"src/traces/waterfall/calc.js"(te,Z){var v=Os(),w=Dm(),C=In().mergeArray,P=Gh(),t=da().BADNUM;function r(l){return l==="a"||l==="absolute"}function a(l){return l==="t"||l==="total"}Z.exports=function(i,s){var o=v.getFromId(i,s.xaxis||"x"),u=v.getFromId(i,s.yaxis||"y"),d,h,g,m,E,c;s.orientation==="h"?(d=o.makeCalcdata(s,"x"),g=u.makeCalcdata(s,"y"),m=w(s,u,"y",g),E=!!s.yperiodalignment,c="y"):(d=u.makeCalcdata(s,"y"),g=o.makeCalcdata(s,"x"),m=w(s,o,"x",g),E=!!s.xperiodalignment,c="x"),h=m.vals;for(var _=Math.min(h.length,d.length),T=new Array(_),M=0,k,b=!1,A=0;A<_;A++){var y=d[A]||0,f=!1;(d[A]!==t||a(s.measure[A])||r(s.measure[A]))&&A+1<_&&(d[A+1]!==t||a(s.measure[A+1])||r(s.measure[A+1]))&&(f=!0);var p=T[A]={i:A,p:h[A],s:y,rawS:y,cNext:f};r(s.measure[A])?(M=p.s,p.isSum=!0,p.dir="totals",p.s=M):a(s.measure[A])?(p.isSum=!0,p.dir="totals",p.s=M):(p.isSum=!1,p.dir=p.rawS<0?"decreasing":"increasing",k=p.s,p.s=M+k,M+=k),p.dir==="totals"&&(b=!0),E&&(T[A].orig_p=g[A],T[A][c+"End"]=m.ends[A],T[A][c+"Start"]=m.starts[A]),s.ids&&(p.id=String(s.ids[A])),p.v=(s.base||0)+M}return T.length&&(T[0].hasTotals=b),C(s.text,T,"tx"),C(s.hovertext,T,"htx"),P(T,s),T}}}),I2=Ne({"src/traces/waterfall/cross_trace_calc.js"(te,Z){var v=q0().setGroupPositions;Z.exports=function(C,P){var t=C._fullLayout,r=C._fullData,a=C.calcdata,l=P.xaxis,i=P.yaxis,s=[],o=[],u=[],d,h;for(h=0;h<r.length;h++){var g=r[h];g.visible===!0&&g.xaxis===l._id&&g.yaxis===i._id&&g.type==="waterfall"&&(d=a[h],g.orientation==="h"?u.push(d):o.push(d),s.push(d))}var m={mode:t.waterfallmode,norm:t.waterfallnorm,gap:t.waterfallgap,groupgap:t.waterfallgroupgap};for(v(C,l,i,o,m),v(C,i,l,u,m),h=0;h<s.length;h++){d=s[h];for(var E=0;E<d.length;E++){var c=d[E];c.isSum===!1&&(c.s0+=E===0?0:d[E-1].s),E+1<d.length&&(d[E].nextP0=d[E+1].p0,d[E].nextS0=d[E+1].s0)}}}}}),Jx=Ne({"src/traces/waterfall/plot.js"(te,Z){var v=xn(),w=In(),C=zs(),P=da().BADNUM,t=mu(),r=_c().clearMinTextSize;Z.exports=function(s,o,u,d){var h=s._fullLayout;r("waterfall",h),t.plot(s,o,u,d,{mode:h.waterfallmode,norm:h.waterfallmode,gap:h.waterfallgap,groupgap:h.waterfallgroupgap}),a(s,o,u,d)};function a(i,s,o,u){var d=s.xaxis,h=s.yaxis;w.makeTraceGroups(u,o,"trace bars").each(function(g){var m=v.select(this),E=g[0].trace,c=w.ensureSingle(m,"g","lines");if(!E.connector||!E.connector.visible){c.remove();return}var _=E.orientation==="h",T=E.connector.mode,M=c.selectAll("g.line").data(w.identity);M.enter().append("g").classed("line",!0),M.exit().remove();var k=M.size();M.each(function(b,A){if(!(A!==k-1&&!b.cNext)){var y=l(b,d,h,_),f=y[0],p=y[1],x="";f[0]!==P&&p[0]!==P&&f[1]!==P&&p[1]!==P&&(T==="spanning"&&!b.isSum&&A>0&&(_?x+="M"+f[0]+","+p[1]+"V"+p[0]:x+="M"+f[1]+","+p[0]+"H"+f[0]),T!=="between"&&(b.isSum||A<k-1)&&(_?x+="M"+f[1]+","+p[0]+"V"+p[1]:x+="M"+f[0]+","+p[1]+"H"+f[1]),f[2]!==P&&p[2]!==P&&(_?x+="M"+f[1]+","+p[1]+"V"+p[2]:x+="M"+f[1]+","+p[1]+"H"+f[2])),x===""&&(x="M0,0Z"),w.ensureSingle(v.select(this),"path").attr("d",x).call(C.setClipUrl,s.layerClipId,i)}})})}function l(i,s,o,u){var d=[],h=[],g=u?s:o,m=u?o:s;return d[0]=g.c2p(i.s0,!0),h[0]=m.c2p(i.p0,!0),d[1]=g.c2p(i.s1,!0),h[1]=m.c2p(i.p1,!0),d[2]=g.c2p(i.nextS0,!0),h[2]=m.c2p(i.nextP0,!0),u?[d,h]:[h,d]}}}),vh=Ne({"src/traces/waterfall/style.js"(te,Z){var v=xn(),w=zs(),C=Ha(),P=El().DESELECTDIM,t=qd(),r=_c().resizeText,a=t.styleTextPoints;function l(i,s,o){var u=o||v.select(i).selectAll('g[class^="waterfalllayer"]').selectAll("g.trace");r(i,u,"waterfall"),u.style("opacity",function(d){return d[0].trace.opacity}),u.each(function(d){var h=v.select(this),g=d[0].trace;h.selectAll(".point > path").each(function(m){if(!m.isBlank){var E=g[m.dir].marker;v.select(this).call(C.fill,E.color).call(C.stroke,E.line.color).call(w.dashLine,E.line.dash,E.line.width).style("opacity",g.selectedpoints&&!m.selected?P:1)}}),a(h,g,i),h.selectAll(".lines").each(function(){var m=g.connector.line;w.lineGroupStyle(v.select(this).selectAll("path"),m.width,m.color,m.dash)})})}Z.exports={style:l}}}),ZL=Ne({"src/traces/waterfall/hover.js"(te,Z){var v=Os().hoverLabelText,w=Ha().opacity,C=Bc().hoverOnBars,P=a_(),t={increasing:P.INCREASING.SYMBOL,decreasing:P.DECREASING.SYMBOL};Z.exports=function(l,i,s,o,u){var d=C(l,i,s,o,u);if(!d)return;var h=d.cd,g=h[0].trace,m=g.orientation==="h",E=m?"x":"y",c=m?l.xa:l.ya;function _(N){return v(c,N,g[E+"hoverformat"])}var T=d.index,M=h[T],k=M.isSum?M.b+M.s:M.rawS;d.initial=M.b+M.s-k,d.delta=k,d.final=d.initial+d.delta;var b=_(Math.abs(d.delta));d.deltaLabel=k<0?"("+b+")":b,d.finalLabel=_(d.final),d.initialLabel=_(d.initial);var A=M.hi||g.hoverinfo,y=[];if(A&&A!=="none"&&A!=="skip"){var f=A==="all",p=A.split("+"),x=function(N){return f||p.indexOf(N)!==-1};M.isSum||(x("final")&&(m?!x("x"):!x("y"))&&y.push(d.finalLabel),x("delta")&&(k<0?y.push(d.deltaLabel+" "+t.decreasing):y.push(d.deltaLabel+" "+t.increasing)),x("initial")&&y.push("Initial: "+d.initialLabel))}return y.length&&(d.extraText=y.join("<br>")),d.color=r(g,M),[d]};function r(a,l){var i=a[l.dir].marker,s=i.color,o=i.line.color,u=i.line.width;if(w(s))return s;if(w(o)&&u)return o}}}),$L=Ne({"src/traces/waterfall/event_data.js"(te,Z){Z.exports=function(w,C){return w.x="xVal"in C?C.xVal:C.x,w.y="yVal"in C?C.yVal:C.y,"initial"in C&&(w.initial=C.initial),"delta"in C&&(w.delta=C.delta),"final"in C&&(w.final=C.final),C.xa&&(w.xaxis=C.xa),C.ya&&(w.yaxis=C.ya),w}}}),vC=Ne({"src/traces/waterfall/index.js"(te,Z){Z.exports={attributes:R2(),layoutAttributes:hC(),supplyDefaults:c0().supplyDefaults,crossTraceDefaults:c0().crossTraceDefaults,supplyLayoutDefaults:sS(),calc:dC(),crossTraceCalc:I2(),plot:Jx(),style:vh().style,hoverPoints:ZL(),eventData:$L(),selectPoints:Ng(),moduleType:"trace",name:"waterfall",basePlotModule:Ih(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}}),Qx=Ne({"lib/waterfall.js"(te,Z){Z.exports=vC()}}),um=Ne({"src/traces/image/constants.js"(te,Z){Z.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 w=v.slice(0,3);return w[1]=w[1]+"%",w[2]=w[2]+"%",w},suffix:["°","%","%"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(v){var w=v.slice(0,4);return w[1]=w[1]+"%",w[2]=w[2]+"%",w},suffix:["°","%","%",""]}}}}}),lS=Ne({"src/traces/image/attributes.js"(te,Z){var v=qo(),w=tf().zorder,{hovertemplateAttrs:C,templatefallbackAttrs:P}=Fl(),t=fi().extendFlat,r=um().colormodel,a=["rgb","rgba","rgba256","hsl","hsla"],l=[],i=[];for(o=0;o<a.length;o++)s=r[a[o]],l.push("For the `"+a[o]+"` colormodel, it is ["+(s.zminDflt||s.min).join(", ")+"]."),i.push("For the `"+a[o]+"` colormodel, it is ["+(s.zmaxDflt||s.max).join(", ")+"].");var s,o;Z.exports=t({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",description:"Set the pixel's horizontal size."},dy:{valType:"number",dflt:1,editType:"calc",description:"Set the pixel's vertical size"},text:{valType:"data_array",editType:"plot"},hovertext:{valType:"data_array",editType:"plot"},hoverinfo:t({},v.hoverinfo,{flags:["x","y","z","color","name","text"],dflt:"x+y+z+text+name"}),hovertemplate:C({},{keys:["z","color","colormodel"]}),hovertemplatefallback:P(),zorder:w})}}),pC=Ne({"src/traces/image/defaults.js"(te,Z){var v=In(),w=lS(),C=um(),P=o0().IMAGE_URL_PREFIX;Z.exports=function(r,a){function l(o,u){return v.coerce(r,a,w,o,u)}l("source"),a.source&&!a.source.match(P)&&delete a.source,a._hasSource=!!a.source;var i=l("z");if(a._hasZ=!(i===void 0||!i.length||!i[0]||!i[0].length),!a._hasZ&&!a._hasSource){a.visible=!1;return}l("x0"),l("y0"),l("dx"),l("dy");var s;a._hasZ?(l("colormodel","rgb"),s=C.colormodel[a.colormodel],l("zmin",s.zminDflt||s.min),l("zmax",s.zmaxDflt||s.max)):a._hasSource&&(a.colormodel="rgba256",s=C.colormodel[a.colormodel],a.zmin=s.zminDflt,a.zmax=s.zmaxDflt),l("zsmooth"),l("text"),l("hovertext"),l("hovertemplate"),l("hovertemplatefallback"),a._length=null,l("zorder")}}}),cm=Ne({"node_modules/inherits/inherits_browser.js"(te,Z){typeof Object.create=="function"?Z.exports=function(w,C){C&&(w.super_=C,w.prototype=Object.create(C.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}))}:Z.exports=function(w,C){if(C){w.super_=C;var P=function(){};P.prototype=C.prototype,w.prototype=new P,w.prototype.constructor=w}}}}),Fm=Ne({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/stream-browser.js"(te,Z){Z.exports=B0().EventEmitter}}),mC=Ne({"node_modules/base64-js/index.js"(te){te.byteLength=a,te.toByteArray=i,te.fromByteArray=u;var Z=[],v=[],w=typeof Uint8Array<"u"?Uint8Array:Array,C="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(P=0,t=C.length;P<t;++P)Z[P]=C[P],v[C.charCodeAt(P)]=P;var P,t;v[45]=62,v[95]=63;function r(d){var h=d.length;if(h%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var g=d.indexOf("=");g===-1&&(g=h);var m=g===h?0:4-g%4;return[g,m]}function a(d){var h=r(d),g=h[0],m=h[1];return(g+m)*3/4-m}function l(d,h,g){return(h+g)*3/4-g}function i(d){var h,g=r(d),m=g[0],E=g[1],c=new w(l(d,m,E)),_=0,T=E>0?m-4:m,M;for(M=0;M<T;M+=4)h=v[d.charCodeAt(M)]<<18|v[d.charCodeAt(M+1)]<<12|v[d.charCodeAt(M+2)]<<6|v[d.charCodeAt(M+3)],c[_++]=h>>16&255,c[_++]=h>>8&255,c[_++]=h&255;return E===2&&(h=v[d.charCodeAt(M)]<<2|v[d.charCodeAt(M+1)]>>4,c[_++]=h&255),E===1&&(h=v[d.charCodeAt(M)]<<10|v[d.charCodeAt(M+1)]<<4|v[d.charCodeAt(M+2)]>>2,c[_++]=h>>8&255,c[_++]=h&255),c}function s(d){return Z[d>>18&63]+Z[d>>12&63]+Z[d>>6&63]+Z[d&63]}function o(d,h,g){for(var m,E=[],c=h;c<g;c+=3)m=(d[c]<<16&16711680)+(d[c+1]<<8&65280)+(d[c+2]&255),E.push(s(m));return E.join("")}function u(d){for(var h,g=d.length,m=g%3,E=[],c=16383,_=0,T=g-m;_<T;_+=c)E.push(o(d,_,_+c>T?T:_+c));return m===1?(h=d[g-1],E.push(Z[h>>2]+Z[h<<4&63]+"==")):m===2&&(h=(d[g-2]<<8)+d[g-1],E.push(Z[h>>10]+Z[h>>4&63]+Z[h<<2&63]+"=")),E.join("")}}}),uS=Ne({"node_modules/ieee754/index.js"(te){te.read=function(Z,v,w,C,P){var t,r,a=P*8-C-1,l=(1<<a)-1,i=l>>1,s=-7,o=w?P-1:0,u=w?-1:1,d=Z[v+o];for(o+=u,t=d&(1<<-s)-1,d>>=-s,s+=a;s>0;t=t*256+Z[v+o],o+=u,s-=8);for(r=t&(1<<-s)-1,t>>=-s,s+=C;s>0;r=r*256+Z[v+o],o+=u,s-=8);if(t===0)t=1-i;else{if(t===l)return r?NaN:(d?-1:1)*(1/0);r=r+Math.pow(2,C),t=t-i}return(d?-1:1)*r*Math.pow(2,t-C)},te.write=function(Z,v,w,C,P,t){var r,a,l,i=t*8-P-1,s=(1<<i)-1,o=s>>1,u=P===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=C?0:t-1,h=C?1:-1,g=v<0||v===0&&1/v<0?1:0;for(v=Math.abs(v),isNaN(v)||v===1/0?(a=isNaN(v)?1:0,r=s):(r=Math.floor(Math.log(v)/Math.LN2),v*(l=Math.pow(2,-r))<1&&(r--,l*=2),r+o>=1?v+=u/l:v+=u*Math.pow(2,1-o),v*l>=2&&(r++,l/=2),r+o>=s?(a=0,r=s):r+o>=1?(a=(v*l-1)*Math.pow(2,P),r=r+o):(a=v*Math.pow(2,o-1)*Math.pow(2,P),r=0));P>=8;Z[w+d]=a&255,d+=h,a/=256,P-=8);for(r=r<<P|a,i+=P;i>0;Z[w+d]=r&255,d+=h,r/=256,i-=8);Z[w+d-h]|=g*128}}}),Uy=Ne({"node_modules/buffer/index.js"(te){var Z=mC(),v=uS(),w=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;te.Buffer=r,te.SlowBuffer=E,te.INSPECT_MAX_BYTES=50;var C=2147483647;te.kMaxLength=C,r.TYPED_ARRAY_SUPPORT=P(),!r.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 P(){try{const Fe=new Uint8Array(1),Pe={foo:function(){return 42}};return Object.setPrototypeOf(Pe,Uint8Array.prototype),Object.setPrototypeOf(Fe,Pe),Fe.foo()===42}catch{return!1}}Object.defineProperty(r.prototype,"parent",{enumerable:!0,get:function(){if(r.isBuffer(this))return this.buffer}}),Object.defineProperty(r.prototype,"offset",{enumerable:!0,get:function(){if(r.isBuffer(this))return this.byteOffset}});function t(Fe){if(Fe>C)throw new RangeError('The value "'+Fe+'" is invalid for option "size"');const Pe=new Uint8Array(Fe);return Object.setPrototypeOf(Pe,r.prototype),Pe}function r(Fe,Pe,be){if(typeof Fe=="number"){if(typeof Pe=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return s(Fe)}return a(Fe,Pe,be)}r.poolSize=8192;function a(Fe,Pe,be){if(typeof Fe=="string")return o(Fe,Pe);if(ArrayBuffer.isView(Fe))return d(Fe);if(Fe==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Fe);if(rt(Fe,ArrayBuffer)||Fe&&rt(Fe.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(rt(Fe,SharedArrayBuffer)||Fe&&rt(Fe.buffer,SharedArrayBuffer)))return h(Fe,Pe,be);if(typeof Fe=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const Ye=Fe.valueOf&&Fe.valueOf();if(Ye!=null&&Ye!==Fe)return r.from(Ye,Pe,be);const yt=g(Fe);if(yt)return yt;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof Fe[Symbol.toPrimitive]=="function")return r.from(Fe[Symbol.toPrimitive]("string"),Pe,be);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Fe)}r.from=function(Fe,Pe,be){return a(Fe,Pe,be)},Object.setPrototypeOf(r.prototype,Uint8Array.prototype),Object.setPrototypeOf(r,Uint8Array);function l(Fe){if(typeof Fe!="number")throw new TypeError('"size" argument must be of type number');if(Fe<0)throw new RangeError('The value "'+Fe+'" is invalid for option "size"')}function i(Fe,Pe,be){return l(Fe),Fe<=0?t(Fe):Pe!==void 0?typeof be=="string"?t(Fe).fill(Pe,be):t(Fe).fill(Pe):t(Fe)}r.alloc=function(Fe,Pe,be){return i(Fe,Pe,be)};function s(Fe){return l(Fe),t(Fe<0?0:m(Fe)|0)}r.allocUnsafe=function(Fe){return s(Fe)},r.allocUnsafeSlow=function(Fe){return s(Fe)};function o(Fe,Pe){if((typeof Pe!="string"||Pe==="")&&(Pe="utf8"),!r.isEncoding(Pe))throw new TypeError("Unknown encoding: "+Pe);const be=c(Fe,Pe)|0;let Ye=t(be);const yt=Ye.write(Fe,Pe);return yt!==be&&(Ye=Ye.slice(0,yt)),Ye}function u(Fe){const Pe=Fe.length<0?0:m(Fe.length)|0,be=t(Pe);for(let Ye=0;Ye<Pe;Ye+=1)be[Ye]=Fe[Ye]&255;return be}function d(Fe){if(rt(Fe,Uint8Array)){const Pe=new Uint8Array(Fe);return h(Pe.buffer,Pe.byteOffset,Pe.byteLength)}return u(Fe)}function h(Fe,Pe,be){if(Pe<0||Fe.byteLength<Pe)throw new RangeError('"offset" is outside of buffer bounds');if(Fe.byteLength<Pe+(be||0))throw new RangeError('"length" is outside of buffer bounds');let Ye;return Pe===void 0&&be===void 0?Ye=new Uint8Array(Fe):be===void 0?Ye=new Uint8Array(Fe,Pe):Ye=new Uint8Array(Fe,Pe,be),Object.setPrototypeOf(Ye,r.prototype),Ye}function g(Fe){if(r.isBuffer(Fe)){const Pe=m(Fe.length)|0,be=t(Pe);return be.length===0||Fe.copy(be,0,0,Pe),be}if(Fe.length!==void 0)return typeof Fe.length!="number"||mt(Fe.length)?t(0):u(Fe);if(Fe.type==="Buffer"&&Array.isArray(Fe.data))return u(Fe.data)}function m(Fe){if(Fe>=C)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+C.toString(16)+" bytes");return Fe|0}function E(Fe){return+Fe!=Fe&&(Fe=0),r.alloc(+Fe)}r.isBuffer=function(Pe){return Pe!=null&&Pe._isBuffer===!0&&Pe!==r.prototype},r.compare=function(Pe,be){if(rt(Pe,Uint8Array)&&(Pe=r.from(Pe,Pe.offset,Pe.byteLength)),rt(be,Uint8Array)&&(be=r.from(be,be.offset,be.byteLength)),!r.isBuffer(Pe)||!r.isBuffer(be))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Pe===be)return 0;let Ye=Pe.length,yt=be.length;for(let wt=0,ht=Math.min(Ye,yt);wt<ht;++wt)if(Pe[wt]!==be[wt]){Ye=Pe[wt],yt=be[wt];break}return Ye<yt?-1:yt<Ye?1:0},r.isEncoding=function(Pe){switch(String(Pe).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}},r.concat=function(Pe,be){if(!Array.isArray(Pe))throw new TypeError('"list" argument must be an Array of Buffers');if(Pe.length===0)return r.alloc(0);let Ye;if(be===void 0)for(be=0,Ye=0;Ye<Pe.length;++Ye)be+=Pe[Ye].length;const yt=r.allocUnsafe(be);let wt=0;for(Ye=0;Ye<Pe.length;++Ye){let ht=Pe[Ye];if(rt(ht,Uint8Array))wt+ht.length>yt.length?(r.isBuffer(ht)||(ht=r.from(ht)),ht.copy(yt,wt)):Uint8Array.prototype.set.call(yt,ht,wt);else if(r.isBuffer(ht))ht.copy(yt,wt);else throw new TypeError('"list" argument must be an Array of Buffers');wt+=ht.length}return yt};function c(Fe,Pe){if(r.isBuffer(Fe))return Fe.length;if(ArrayBuffer.isView(Fe)||rt(Fe,ArrayBuffer))return Fe.byteLength;if(typeof Fe!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof Fe);const be=Fe.length,Ye=arguments.length>2&&arguments[2]===!0;if(!Ye&&be===0)return 0;let yt=!1;for(;;)switch(Pe){case"ascii":case"latin1":case"binary":return be;case"utf8":case"utf-8":return _e(Fe).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return be*2;case"hex":return be>>>1;case"base64":return Xe(Fe).length;default:if(yt)return Ye?-1:_e(Fe).length;Pe=(""+Pe).toLowerCase(),yt=!0}}r.byteLength=c;function _(Fe,Pe,be){let Ye=!1;if((Pe===void 0||Pe<0)&&(Pe=0),Pe>this.length||((be===void 0||be>this.length)&&(be=this.length),be<=0)||(be>>>=0,Pe>>>=0,be<=Pe))return"";for(Fe||(Fe="utf8");;)switch(Fe){case"hex":return q(this,Pe,be);case"utf8":case"utf-8":return N(this,Pe,be);case"ascii":return U(this,Pe,be);case"latin1":case"binary":return V(this,Pe,be);case"base64":return x(this,Pe,be);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return z(this,Pe,be);default:if(Ye)throw new TypeError("Unknown encoding: "+Fe);Fe=(Fe+"").toLowerCase(),Ye=!0}}r.prototype._isBuffer=!0;function T(Fe,Pe,be){const Ye=Fe[Pe];Fe[Pe]=Fe[be],Fe[be]=Ye}r.prototype.swap16=function(){const Pe=this.length;if(Pe%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let be=0;be<Pe;be+=2)T(this,be,be+1);return this},r.prototype.swap32=function(){const Pe=this.length;if(Pe%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let be=0;be<Pe;be+=4)T(this,be,be+3),T(this,be+1,be+2);return this},r.prototype.swap64=function(){const Pe=this.length;if(Pe%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let be=0;be<Pe;be+=8)T(this,be,be+7),T(this,be+1,be+6),T(this,be+2,be+5),T(this,be+3,be+4);return this},r.prototype.toString=function(){const Pe=this.length;return Pe===0?"":arguments.length===0?N(this,0,Pe):_.apply(this,arguments)},r.prototype.toLocaleString=r.prototype.toString,r.prototype.equals=function(Pe){if(!r.isBuffer(Pe))throw new TypeError("Argument must be a Buffer");return this===Pe?!0:r.compare(this,Pe)===0},r.prototype.inspect=function(){let Pe="";const be=te.INSPECT_MAX_BYTES;return Pe=this.toString("hex",0,be).replace(/(.{2})/g,"$1 ").trim(),this.length>be&&(Pe+=" ... "),"<Buffer "+Pe+">"},w&&(r.prototype[w]=r.prototype.inspect),r.prototype.compare=function(Pe,be,Ye,yt,wt){if(rt(Pe,Uint8Array)&&(Pe=r.from(Pe,Pe.offset,Pe.byteLength)),!r.isBuffer(Pe))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof Pe);if(be===void 0&&(be=0),Ye===void 0&&(Ye=Pe?Pe.length:0),yt===void 0&&(yt=0),wt===void 0&&(wt=this.length),be<0||Ye>Pe.length||yt<0||wt>this.length)throw new RangeError("out of range index");if(yt>=wt&&be>=Ye)return 0;if(yt>=wt)return-1;if(be>=Ye)return 1;if(be>>>=0,Ye>>>=0,yt>>>=0,wt>>>=0,this===Pe)return 0;let ht=wt-yt,Yt=Ye-be;const $t=Math.min(ht,Yt),fr=this.slice(yt,wt),mr=Pe.slice(be,Ye);for(let Ur=0;Ur<$t;++Ur)if(fr[Ur]!==mr[Ur]){ht=fr[Ur],Yt=mr[Ur];break}return ht<Yt?-1:Yt<ht?1:0};function M(Fe,Pe,be,Ye,yt){if(Fe.length===0)return-1;if(typeof be=="string"?(Ye=be,be=0):be>2147483647?be=2147483647:be<-2147483648&&(be=-2147483648),be=+be,mt(be)&&(be=yt?0:Fe.length-1),be<0&&(be=Fe.length+be),be>=Fe.length){if(yt)return-1;be=Fe.length-1}else if(be<0)if(yt)be=0;else return-1;if(typeof Pe=="string"&&(Pe=r.from(Pe,Ye)),r.isBuffer(Pe))return Pe.length===0?-1:k(Fe,Pe,be,Ye,yt);if(typeof Pe=="number")return Pe=Pe&255,typeof Uint8Array.prototype.indexOf=="function"?yt?Uint8Array.prototype.indexOf.call(Fe,Pe,be):Uint8Array.prototype.lastIndexOf.call(Fe,Pe,be):k(Fe,[Pe],be,Ye,yt);throw new TypeError("val must be string, number or Buffer")}function k(Fe,Pe,be,Ye,yt){let wt=1,ht=Fe.length,Yt=Pe.length;if(Ye!==void 0&&(Ye=String(Ye).toLowerCase(),Ye==="ucs2"||Ye==="ucs-2"||Ye==="utf16le"||Ye==="utf-16le")){if(Fe.length<2||Pe.length<2)return-1;wt=2,ht/=2,Yt/=2,be/=2}function $t(mr,Ur){return wt===1?mr[Ur]:mr.readUInt16BE(Ur*wt)}let fr;if(yt){let mr=-1;for(fr=be;fr<ht;fr++)if($t(Fe,fr)===$t(Pe,mr===-1?0:fr-mr)){if(mr===-1&&(mr=fr),fr-mr+1===Yt)return mr*wt}else mr!==-1&&(fr-=fr-mr),mr=-1}else for(be+Yt>ht&&(be=ht-Yt),fr=be;fr>=0;fr--){let mr=!0;for(let Ur=0;Ur<Yt;Ur++)if($t(Fe,fr+Ur)!==$t(Pe,Ur)){mr=!1;break}if(mr)return fr}return-1}r.prototype.includes=function(Pe,be,Ye){return this.indexOf(Pe,be,Ye)!==-1},r.prototype.indexOf=function(Pe,be,Ye){return M(this,Pe,be,Ye,!0)},r.prototype.lastIndexOf=function(Pe,be,Ye){return M(this,Pe,be,Ye,!1)};function b(Fe,Pe,be,Ye){be=Number(be)||0;const yt=Fe.length-be;Ye?(Ye=Number(Ye),Ye>yt&&(Ye=yt)):Ye=yt;const wt=Pe.length;Ye>wt/2&&(Ye=wt/2);let ht;for(ht=0;ht<Ye;++ht){const Yt=parseInt(Pe.substr(ht*2,2),16);if(mt(Yt))return ht;Fe[be+ht]=Yt}return ht}function A(Fe,Pe,be,Ye){return Ve(_e(Pe,Fe.length-be),Fe,be,Ye)}function y(Fe,Pe,be,Ye){return Ve(Le(Pe),Fe,be,Ye)}function f(Fe,Pe,be,Ye){return Ve(Xe(Pe),Fe,be,Ye)}function p(Fe,Pe,be,Ye){return Ve(ze(Pe,Fe.length-be),Fe,be,Ye)}r.prototype.write=function(Pe,be,Ye,yt){if(be===void 0)yt="utf8",Ye=this.length,be=0;else if(Ye===void 0&&typeof be=="string")yt=be,Ye=this.length,be=0;else if(isFinite(be))be=be>>>0,isFinite(Ye)?(Ye=Ye>>>0,yt===void 0&&(yt="utf8")):(yt=Ye,Ye=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const wt=this.length-be;if((Ye===void 0||Ye>wt)&&(Ye=wt),Pe.length>0&&(Ye<0||be<0)||be>this.length)throw new RangeError("Attempt to write outside buffer bounds");yt||(yt="utf8");let ht=!1;for(;;)switch(yt){case"hex":return b(this,Pe,be,Ye);case"utf8":case"utf-8":return A(this,Pe,be,Ye);case"ascii":case"latin1":case"binary":return y(this,Pe,be,Ye);case"base64":return f(this,Pe,be,Ye);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return p(this,Pe,be,Ye);default:if(ht)throw new TypeError("Unknown encoding: "+yt);yt=(""+yt).toLowerCase(),ht=!0}},r.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function x(Fe,Pe,be){return Pe===0&&be===Fe.length?Z.fromByteArray(Fe):Z.fromByteArray(Fe.slice(Pe,be))}function N(Fe,Pe,be){be=Math.min(Fe.length,be);const Ye=[];let yt=Pe;for(;yt<be;){const wt=Fe[yt];let ht=null,Yt=wt>239?4:wt>223?3:wt>191?2:1;if(yt+Yt<=be){let $t,fr,mr,Ur;switch(Yt){case 1:wt<128&&(ht=wt);break;case 2:$t=Fe[yt+1],($t&192)===128&&(Ur=(wt&31)<<6|$t&63,Ur>127&&(ht=Ur));break;case 3:$t=Fe[yt+1],fr=Fe[yt+2],($t&192)===128&&(fr&192)===128&&(Ur=(wt&15)<<12|($t&63)<<6|fr&63,Ur>2047&&(Ur<55296||Ur>57343)&&(ht=Ur));break;case 4:$t=Fe[yt+1],fr=Fe[yt+2],mr=Fe[yt+3],($t&192)===128&&(fr&192)===128&&(mr&192)===128&&(Ur=(wt&15)<<18|($t&63)<<12|(fr&63)<<6|mr&63,Ur>65535&&Ur<1114112&&(ht=Ur))}}ht===null?(ht=65533,Yt=1):ht>65535&&(ht-=65536,Ye.push(ht>>>10&1023|55296),ht=56320|ht&1023),Ye.push(ht),yt+=Yt}return B(Ye)}var D=4096;function B(Fe){const Pe=Fe.length;if(Pe<=D)return String.fromCharCode.apply(String,Fe);let be="",Ye=0;for(;Ye<Pe;)be+=String.fromCharCode.apply(String,Fe.slice(Ye,Ye+=D));return be}function U(Fe,Pe,be){let Ye="";be=Math.min(Fe.length,be);for(let yt=Pe;yt<be;++yt)Ye+=String.fromCharCode(Fe[yt]&127);return Ye}function V(Fe,Pe,be){let Ye="";be=Math.min(Fe.length,be);for(let yt=Pe;yt<be;++yt)Ye+=String.fromCharCode(Fe[yt]);return Ye}function q(Fe,Pe,be){const Ye=Fe.length;(!Pe||Pe<0)&&(Pe=0),(!be||be<0||be>Ye)&&(be=Ye);let yt="";for(let wt=Pe;wt<be;++wt)yt+=_t[Fe[wt]];return yt}function z(Fe,Pe,be){const Ye=Fe.slice(Pe,be);let yt="";for(let wt=0;wt<Ye.length-1;wt+=2)yt+=String.fromCharCode(Ye[wt]+Ye[wt+1]*256);return yt}r.prototype.slice=function(Pe,be){const Ye=this.length;Pe=~~Pe,be=be===void 0?Ye:~~be,Pe<0?(Pe+=Ye,Pe<0&&(Pe=0)):Pe>Ye&&(Pe=Ye),be<0?(be+=Ye,be<0&&(be=0)):be>Ye&&(be=Ye),be<Pe&&(be=Pe);const yt=this.subarray(Pe,be);return Object.setPrototypeOf(yt,r.prototype),yt};function H(Fe,Pe,be){if(Fe%1!==0||Fe<0)throw new RangeError("offset is not uint");if(Fe+Pe>be)throw new RangeError("Trying to access beyond buffer length")}r.prototype.readUintLE=r.prototype.readUIntLE=function(Pe,be,Ye){Pe=Pe>>>0,be=be>>>0,Ye||H(Pe,be,this.length);let yt=this[Pe],wt=1,ht=0;for(;++ht<be&&(wt*=256);)yt+=this[Pe+ht]*wt;return yt},r.prototype.readUintBE=r.prototype.readUIntBE=function(Pe,be,Ye){Pe=Pe>>>0,be=be>>>0,Ye||H(Pe,be,this.length);let yt=this[Pe+--be],wt=1;for(;be>0&&(wt*=256);)yt+=this[Pe+--be]*wt;return yt},r.prototype.readUint8=r.prototype.readUInt8=function(Pe,be){return Pe=Pe>>>0,be||H(Pe,1,this.length),this[Pe]},r.prototype.readUint16LE=r.prototype.readUInt16LE=function(Pe,be){return Pe=Pe>>>0,be||H(Pe,2,this.length),this[Pe]|this[Pe+1]<<8},r.prototype.readUint16BE=r.prototype.readUInt16BE=function(Pe,be){return Pe=Pe>>>0,be||H(Pe,2,this.length),this[Pe]<<8|this[Pe+1]},r.prototype.readUint32LE=r.prototype.readUInt32LE=function(Pe,be){return Pe=Pe>>>0,be||H(Pe,4,this.length),(this[Pe]|this[Pe+1]<<8|this[Pe+2]<<16)+this[Pe+3]*16777216},r.prototype.readUint32BE=r.prototype.readUInt32BE=function(Pe,be){return Pe=Pe>>>0,be||H(Pe,4,this.length),this[Pe]*16777216+(this[Pe+1]<<16|this[Pe+2]<<8|this[Pe+3])},r.prototype.readBigUInt64LE=vt(function(Pe){Pe=Pe>>>0,oe(Pe,"offset");const be=this[Pe],Ye=this[Pe+7];(be===void 0||Ye===void 0)&&Y(Pe,this.length-8);const yt=be+this[++Pe]*2**8+this[++Pe]*2**16+this[++Pe]*2**24,wt=this[++Pe]+this[++Pe]*2**8+this[++Pe]*2**16+Ye*2**24;return BigInt(yt)+(BigInt(wt)<<BigInt(32))}),r.prototype.readBigUInt64BE=vt(function(Pe){Pe=Pe>>>0,oe(Pe,"offset");const be=this[Pe],Ye=this[Pe+7];(be===void 0||Ye===void 0)&&Y(Pe,this.length-8);const yt=be*2**24+this[++Pe]*2**16+this[++Pe]*2**8+this[++Pe],wt=this[++Pe]*2**24+this[++Pe]*2**16+this[++Pe]*2**8+Ye;return(BigInt(yt)<<BigInt(32))+BigInt(wt)}),r.prototype.readIntLE=function(Pe,be,Ye){Pe=Pe>>>0,be=be>>>0,Ye||H(Pe,be,this.length);let yt=this[Pe],wt=1,ht=0;for(;++ht<be&&(wt*=256);)yt+=this[Pe+ht]*wt;return wt*=128,yt>=wt&&(yt-=Math.pow(2,8*be)),yt},r.prototype.readIntBE=function(Pe,be,Ye){Pe=Pe>>>0,be=be>>>0,Ye||H(Pe,be,this.length);let yt=be,wt=1,ht=this[Pe+--yt];for(;yt>0&&(wt*=256);)ht+=this[Pe+--yt]*wt;return wt*=128,ht>=wt&&(ht-=Math.pow(2,8*be)),ht},r.prototype.readInt8=function(Pe,be){return Pe=Pe>>>0,be||H(Pe,1,this.length),this[Pe]&128?(255-this[Pe]+1)*-1:this[Pe]},r.prototype.readInt16LE=function(Pe,be){Pe=Pe>>>0,be||H(Pe,2,this.length);const Ye=this[Pe]|this[Pe+1]<<8;return Ye&32768?Ye|4294901760:Ye},r.prototype.readInt16BE=function(Pe,be){Pe=Pe>>>0,be||H(Pe,2,this.length);const Ye=this[Pe+1]|this[Pe]<<8;return Ye&32768?Ye|4294901760:Ye},r.prototype.readInt32LE=function(Pe,be){return Pe=Pe>>>0,be||H(Pe,4,this.length),this[Pe]|this[Pe+1]<<8|this[Pe+2]<<16|this[Pe+3]<<24},r.prototype.readInt32BE=function(Pe,be){return Pe=Pe>>>0,be||H(Pe,4,this.length),this[Pe]<<24|this[Pe+1]<<16|this[Pe+2]<<8|this[Pe+3]},r.prototype.readBigInt64LE=vt(function(Pe){Pe=Pe>>>0,oe(Pe,"offset");const be=this[Pe],Ye=this[Pe+7];(be===void 0||Ye===void 0)&&Y(Pe,this.length-8);const yt=this[Pe+4]+this[Pe+5]*2**8+this[Pe+6]*2**16+(Ye<<24);return(BigInt(yt)<<BigInt(32))+BigInt(be+this[++Pe]*2**8+this[++Pe]*2**16+this[++Pe]*2**24)}),r.prototype.readBigInt64BE=vt(function(Pe){Pe=Pe>>>0,oe(Pe,"offset");const be=this[Pe],Ye=this[Pe+7];(be===void 0||Ye===void 0)&&Y(Pe,this.length-8);const yt=(be<<24)+this[++Pe]*2**16+this[++Pe]*2**8+this[++Pe];return(BigInt(yt)<<BigInt(32))+BigInt(this[++Pe]*2**24+this[++Pe]*2**16+this[++Pe]*2**8+Ye)}),r.prototype.readFloatLE=function(Pe,be){return Pe=Pe>>>0,be||H(Pe,4,this.length),v.read(this,Pe,!0,23,4)},r.prototype.readFloatBE=function(Pe,be){return Pe=Pe>>>0,be||H(Pe,4,this.length),v.read(this,Pe,!1,23,4)},r.prototype.readDoubleLE=function(Pe,be){return Pe=Pe>>>0,be||H(Pe,8,this.length),v.read(this,Pe,!0,52,8)},r.prototype.readDoubleBE=function(Pe,be){return Pe=Pe>>>0,be||H(Pe,8,this.length),v.read(this,Pe,!1,52,8)};function G(Fe,Pe,be,Ye,yt,wt){if(!r.isBuffer(Fe))throw new TypeError('"buffer" argument must be a Buffer instance');if(Pe>yt||Pe<wt)throw new RangeError('"value" argument is out of bounds');if(be+Ye>Fe.length)throw new RangeError("Index out of range")}r.prototype.writeUintLE=r.prototype.writeUIntLE=function(Pe,be,Ye,yt){if(Pe=+Pe,be=be>>>0,Ye=Ye>>>0,!yt){const Yt=Math.pow(2,8*Ye)-1;G(this,Pe,be,Ye,Yt,0)}let wt=1,ht=0;for(this[be]=Pe&255;++ht<Ye&&(wt*=256);)this[be+ht]=Pe/wt&255;return be+Ye},r.prototype.writeUintBE=r.prototype.writeUIntBE=function(Pe,be,Ye,yt){if(Pe=+Pe,be=be>>>0,Ye=Ye>>>0,!yt){const Yt=Math.pow(2,8*Ye)-1;G(this,Pe,be,Ye,Yt,0)}let wt=Ye-1,ht=1;for(this[be+wt]=Pe&255;--wt>=0&&(ht*=256);)this[be+wt]=Pe/ht&255;return be+Ye},r.prototype.writeUint8=r.prototype.writeUInt8=function(Pe,be,Ye){return Pe=+Pe,be=be>>>0,Ye||G(this,Pe,be,1,255,0),this[be]=Pe&255,be+1},r.prototype.writeUint16LE=r.prototype.writeUInt16LE=function(Pe,be,Ye){return Pe=+Pe,be=be>>>0,Ye||G(this,Pe,be,2,65535,0),this[be]=Pe&255,this[be+1]=Pe>>>8,be+2},r.prototype.writeUint16BE=r.prototype.writeUInt16BE=function(Pe,be,Ye){return Pe=+Pe,be=be>>>0,Ye||G(this,Pe,be,2,65535,0),this[be]=Pe>>>8,this[be+1]=Pe&255,be+2},r.prototype.writeUint32LE=r.prototype.writeUInt32LE=function(Pe,be,Ye){return Pe=+Pe,be=be>>>0,Ye||G(this,Pe,be,4,4294967295,0),this[be+3]=Pe>>>24,this[be+2]=Pe>>>16,this[be+1]=Pe>>>8,this[be]=Pe&255,be+4},r.prototype.writeUint32BE=r.prototype.writeUInt32BE=function(Pe,be,Ye){return Pe=+Pe,be=be>>>0,Ye||G(this,Pe,be,4,4294967295,0),this[be]=Pe>>>24,this[be+1]=Pe>>>16,this[be+2]=Pe>>>8,this[be+3]=Pe&255,be+4};function J(Fe,Pe,be,Ye,yt){pe(Pe,Ye,yt,Fe,be,7);let wt=Number(Pe&BigInt(4294967295));Fe[be++]=wt,wt=wt>>8,Fe[be++]=wt,wt=wt>>8,Fe[be++]=wt,wt=wt>>8,Fe[be++]=wt;let ht=Number(Pe>>BigInt(32)&BigInt(4294967295));return Fe[be++]=ht,ht=ht>>8,Fe[be++]=ht,ht=ht>>8,Fe[be++]=ht,ht=ht>>8,Fe[be++]=ht,be}function le(Fe,Pe,be,Ye,yt){pe(Pe,Ye,yt,Fe,be,7);let wt=Number(Pe&BigInt(4294967295));Fe[be+7]=wt,wt=wt>>8,Fe[be+6]=wt,wt=wt>>8,Fe[be+5]=wt,wt=wt>>8,Fe[be+4]=wt;let ht=Number(Pe>>BigInt(32)&BigInt(4294967295));return Fe[be+3]=ht,ht=ht>>8,Fe[be+2]=ht,ht=ht>>8,Fe[be+1]=ht,ht=ht>>8,Fe[be]=ht,be+8}r.prototype.writeBigUInt64LE=vt(function(Pe,be=0){return J(this,Pe,be,BigInt(0),BigInt("0xffffffffffffffff"))}),r.prototype.writeBigUInt64BE=vt(function(Pe,be=0){return le(this,Pe,be,BigInt(0),BigInt("0xffffffffffffffff"))}),r.prototype.writeIntLE=function(Pe,be,Ye,yt){if(Pe=+Pe,be=be>>>0,!yt){const $t=Math.pow(2,8*Ye-1);G(this,Pe,be,Ye,$t-1,-$t)}let wt=0,ht=1,Yt=0;for(this[be]=Pe&255;++wt<Ye&&(ht*=256);)Pe<0&&Yt===0&&this[be+wt-1]!==0&&(Yt=1),this[be+wt]=(Pe/ht>>0)-Yt&255;return be+Ye},r.prototype.writeIntBE=function(Pe,be,Ye,yt){if(Pe=+Pe,be=be>>>0,!yt){const $t=Math.pow(2,8*Ye-1);G(this,Pe,be,Ye,$t-1,-$t)}let wt=Ye-1,ht=1,Yt=0;for(this[be+wt]=Pe&255;--wt>=0&&(ht*=256);)Pe<0&&Yt===0&&this[be+wt+1]!==0&&(Yt=1),this[be+wt]=(Pe/ht>>0)-Yt&255;return be+Ye},r.prototype.writeInt8=function(Pe,be,Ye){return Pe=+Pe,be=be>>>0,Ye||G(this,Pe,be,1,127,-128),Pe<0&&(Pe=255+Pe+1),this[be]=Pe&255,be+1},r.prototype.writeInt16LE=function(Pe,be,Ye){return Pe=+Pe,be=be>>>0,Ye||G(this,Pe,be,2,32767,-32768),this[be]=Pe&255,this[be+1]=Pe>>>8,be+2},r.prototype.writeInt16BE=function(Pe,be,Ye){return Pe=+Pe,be=be>>>0,Ye||G(this,Pe,be,2,32767,-32768),this[be]=Pe>>>8,this[be+1]=Pe&255,be+2},r.prototype.writeInt32LE=function(Pe,be,Ye){return Pe=+Pe,be=be>>>0,Ye||G(this,Pe,be,4,2147483647,-2147483648),this[be]=Pe&255,this[be+1]=Pe>>>8,this[be+2]=Pe>>>16,this[be+3]=Pe>>>24,be+4},r.prototype.writeInt32BE=function(Pe,be,Ye){return Pe=+Pe,be=be>>>0,Ye||G(this,Pe,be,4,2147483647,-2147483648),Pe<0&&(Pe=4294967295+Pe+1),this[be]=Pe>>>24,this[be+1]=Pe>>>16,this[be+2]=Pe>>>8,this[be+3]=Pe&255,be+4},r.prototype.writeBigInt64LE=vt(function(Pe,be=0){return J(this,Pe,be,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),r.prototype.writeBigInt64BE=vt(function(Pe,be=0){return le(this,Pe,be,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ge(Fe,Pe,be,Ye,yt,wt){if(be+Ye>Fe.length)throw new RangeError("Index out of range");if(be<0)throw new RangeError("Index out of range")}function de(Fe,Pe,be,Ye,yt){return Pe=+Pe,be=be>>>0,yt||ge(Fe,Pe,be,4),v.write(Fe,Pe,be,Ye,23,4),be+4}r.prototype.writeFloatLE=function(Pe,be,Ye){return de(this,Pe,be,!0,Ye)},r.prototype.writeFloatBE=function(Pe,be,Ye){return de(this,Pe,be,!1,Ye)};function me(Fe,Pe,be,Ye,yt){return Pe=+Pe,be=be>>>0,yt||ge(Fe,Pe,be,8),v.write(Fe,Pe,be,Ye,52,8),be+8}r.prototype.writeDoubleLE=function(Pe,be,Ye){return me(this,Pe,be,!0,Ye)},r.prototype.writeDoubleBE=function(Pe,be,Ye){return me(this,Pe,be,!1,Ye)},r.prototype.copy=function(Pe,be,Ye,yt){if(!r.isBuffer(Pe))throw new TypeError("argument should be a Buffer");if(Ye||(Ye=0),!yt&&yt!==0&&(yt=this.length),be>=Pe.length&&(be=Pe.length),be||(be=0),yt>0&&yt<Ye&&(yt=Ye),yt===Ye||Pe.length===0||this.length===0)return 0;if(be<0)throw new RangeError("targetStart out of bounds");if(Ye<0||Ye>=this.length)throw new RangeError("Index out of range");if(yt<0)throw new RangeError("sourceEnd out of bounds");yt>this.length&&(yt=this.length),Pe.length-be<yt-Ye&&(yt=Pe.length-be+Ye);const wt=yt-Ye;return this===Pe&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(be,Ye,yt):Uint8Array.prototype.set.call(Pe,this.subarray(Ye,yt),be),wt},r.prototype.fill=function(Pe,be,Ye,yt){if(typeof Pe=="string"){if(typeof be=="string"?(yt=be,be=0,Ye=this.length):typeof Ye=="string"&&(yt=Ye,Ye=this.length),yt!==void 0&&typeof yt!="string")throw new TypeError("encoding must be a string");if(typeof yt=="string"&&!r.isEncoding(yt))throw new TypeError("Unknown encoding: "+yt);if(Pe.length===1){const ht=Pe.charCodeAt(0);(yt==="utf8"&&ht<128||yt==="latin1")&&(Pe=ht)}}else typeof Pe=="number"?Pe=Pe&255:typeof Pe=="boolean"&&(Pe=Number(Pe));if(be<0||this.length<be||this.length<Ye)throw new RangeError("Out of range index");if(Ye<=be)return this;be=be>>>0,Ye=Ye===void 0?this.length:Ye>>>0,Pe||(Pe=0);let wt;if(typeof Pe=="number")for(wt=be;wt<Ye;++wt)this[wt]=Pe;else{const ht=r.isBuffer(Pe)?Pe:r.from(Pe,yt),Yt=ht.length;if(Yt===0)throw new TypeError('The value "'+Pe+'" is invalid for argument "value"');for(wt=0;wt<Ye-be;++wt)this[wt+be]=ht[wt%Yt]}return this};var W={};function ie(Fe,Pe,be){W[Fe]=class extends be{constructor(){super(),Object.defineProperty(this,"message",{value:Pe.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${Fe}]`,this.stack,delete this.name}get code(){return Fe}set code(yt){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:yt,writable:!0})}toString(){return`${this.name} [${Fe}]: ${this.message}`}}}ie("ERR_BUFFER_OUT_OF_BOUNDS",function(Fe){return Fe?`${Fe} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),ie("ERR_INVALID_ARG_TYPE",function(Fe,Pe){return`The "${Fe}" argument must be of type number. Received type ${typeof Pe}`},TypeError),ie("ERR_OUT_OF_RANGE",function(Fe,Pe,be){let Ye=`The value of "${Fe}" is out of range.`,yt=be;return Number.isInteger(be)&&Math.abs(be)>2**32?yt=se(String(be)):typeof be=="bigint"&&(yt=String(be),(be>BigInt(2)**BigInt(32)||be<-(BigInt(2)**BigInt(32)))&&(yt=se(yt)),yt+="n"),Ye+=` It must be ${Pe}. Received ${yt}`,Ye},RangeError);function se(Fe){let Pe="",be=Fe.length;const Ye=Fe[0]==="-"?1:0;for(;be>=Ye+4;be-=3)Pe=`_${Fe.slice(be-3,be)}${Pe}`;return`${Fe.slice(0,be)}${Pe}`}function ee(Fe,Pe,be){oe(Pe,"offset"),(Fe[Pe]===void 0||Fe[Pe+be]===void 0)&&Y(Pe,Fe.length-(be+1))}function pe(Fe,Pe,be,Ye,yt,wt){if(Fe>be||Fe<Pe){const ht=typeof Pe=="bigint"?"n":"";let Yt;throw Pe===0||Pe===BigInt(0)?Yt=`>= 0${ht} and < 2${ht} ** ${(wt+1)*8}${ht}`:Yt=`>= -(2${ht} ** ${(wt+1)*8-1}${ht}) and < 2 ** ${(wt+1)*8-1}${ht}`,new W.ERR_OUT_OF_RANGE("value",Yt,Fe)}ee(Ye,yt,wt)}function oe(Fe,Pe){if(typeof Fe!="number")throw new W.ERR_INVALID_ARG_TYPE(Pe,"number",Fe)}function Y(Fe,Pe,be){throw Math.floor(Fe)!==Fe?(oe(Fe,be),new W.ERR_OUT_OF_RANGE("offset","an integer",Fe)):Pe<0?new W.ERR_BUFFER_OUT_OF_BOUNDS:new W.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${Pe}`,Fe)}var ce=/[^+/0-9A-Za-z-_]/g;function ue(Fe){if(Fe=Fe.split("=")[0],Fe=Fe.trim().replace(ce,""),Fe.length<2)return"";for(;Fe.length%4!==0;)Fe=Fe+"=";return Fe}function _e(Fe,Pe){Pe=Pe||1/0;let be;const Ye=Fe.length;let yt=null;const wt=[];for(let ht=0;ht<Ye;++ht){if(be=Fe.charCodeAt(ht),be>55295&&be<57344){if(!yt){if(be>56319){(Pe-=3)>-1&&wt.push(239,191,189);continue}else if(ht+1===Ye){(Pe-=3)>-1&&wt.push(239,191,189);continue}yt=be;continue}if(be<56320){(Pe-=3)>-1&&wt.push(239,191,189),yt=be;continue}be=(yt-55296<<10|be-56320)+65536}else yt&&(Pe-=3)>-1&&wt.push(239,191,189);if(yt=null,be<128){if((Pe-=1)<0)break;wt.push(be)}else if(be<2048){if((Pe-=2)<0)break;wt.push(be>>6|192,be&63|128)}else if(be<65536){if((Pe-=3)<0)break;wt.push(be>>12|224,be>>6&63|128,be&63|128)}else if(be<1114112){if((Pe-=4)<0)break;wt.push(be>>18|240,be>>12&63|128,be>>6&63|128,be&63|128)}else throw new Error("Invalid code point")}return wt}function Le(Fe){const Pe=[];for(let be=0;be<Fe.length;++be)Pe.push(Fe.charCodeAt(be)&255);return Pe}function ze(Fe,Pe){let be,Ye,yt;const wt=[];for(let ht=0;ht<Fe.length&&!((Pe-=2)<0);++ht)be=Fe.charCodeAt(ht),Ye=be>>8,yt=be%256,wt.push(yt),wt.push(Ye);return wt}function Xe(Fe){return Z.toByteArray(ue(Fe))}function Ve(Fe,Pe,be,Ye){let yt;for(yt=0;yt<Ye&&!(yt+be>=Pe.length||yt>=Fe.length);++yt)Pe[yt+be]=Fe[yt];return yt}function rt(Fe,Pe){return Fe instanceof Pe||Fe!=null&&Fe.constructor!=null&&Fe.constructor.name!=null&&Fe.constructor.name===Pe.name}function mt(Fe){return Fe!==Fe}var _t=(function(){const Fe="0123456789abcdef",Pe=new Array(256);for(let be=0;be<16;++be){const Ye=be*16;for(let yt=0;yt<16;++yt)Pe[Ye+yt]=Fe[be]+Fe[yt]}return Pe})();function vt(Fe){return typeof BigInt>"u"?ut:Fe}function ut(){throw new Error("BigInt not supported")}}}),eb=Ne({"node_modules/has-symbols/shams.js"(te,Z){Z.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var w={},C=Symbol("test"),P=Object(C);if(typeof C=="string"||Object.prototype.toString.call(C)!=="[object Symbol]"||Object.prototype.toString.call(P)!=="[object Symbol]")return!1;var t=42;w[C]=t;for(var r in w)return!1;if(typeof Object.keys=="function"&&Object.keys(w).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(w).length!==0)return!1;var a=Object.getOwnPropertySymbols(w);if(a.length!==1||a[0]!==C||!Object.prototype.propertyIsEnumerable.call(w,C))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var l=Object.getOwnPropertyDescriptor(w,C);if(l.value!==t||l.enumerable!==!0)return!1}return!0}}}),i_=Ne({"node_modules/has-tostringtag/shams.js"(te,Z){var v=eb();Z.exports=function(){return v()&&!!Symbol.toStringTag}}}),tb=Ne({"node_modules/es-object-atoms/index.js"(te,Z){Z.exports=Object}}),gC=Ne({"node_modules/es-errors/index.js"(te,Z){Z.exports=Error}}),Z0=Ne({"node_modules/es-errors/eval.js"(te,Z){Z.exports=EvalError}}),Cd=Ne({"node_modules/es-errors/range.js"(te,Z){Z.exports=RangeError}}),cS=Ne({"node_modules/es-errors/ref.js"(te,Z){Z.exports=ReferenceError}}),fS=Ne({"node_modules/es-errors/syntax.js"(te,Z){Z.exports=SyntaxError}}),Wh=Ne({"node_modules/es-errors/type.js"(te,Z){Z.exports=TypeError}}),KL=Ne({"node_modules/es-errors/uri.js"(te,Z){Z.exports=URIError}}),yC=Ne({"node_modules/math-intrinsics/abs.js"(te,Z){Z.exports=Math.abs}}),_C=Ne({"node_modules/math-intrinsics/floor.js"(te,Z){Z.exports=Math.floor}}),Th=Ne({"node_modules/math-intrinsics/max.js"(te,Z){Z.exports=Math.max}}),gp=Ne({"node_modules/math-intrinsics/min.js"(te,Z){Z.exports=Math.min}}),$0=Ne({"node_modules/math-intrinsics/pow.js"(te,Z){Z.exports=Math.pow}}),xC=Ne({"node_modules/math-intrinsics/round.js"(te,Z){Z.exports=Math.round}}),bC=Ne({"node_modules/math-intrinsics/isNaN.js"(te,Z){Z.exports=Number.isNaN||function(w){return w!==w}}}),wC=Ne({"node_modules/math-intrinsics/sign.js"(te,Z){var v=bC();Z.exports=function(C){return v(C)||C===0?C:C<0?-1:1}}}),JL=Ne({"node_modules/gopd/gOPD.js"(te,Z){Z.exports=Object.getOwnPropertyDescriptor}}),K0=Ne({"node_modules/gopd/index.js"(te,Z){var v=JL();if(v)try{v([],"length")}catch{v=null}Z.exports=v}}),Av=Ne({"node_modules/es-define-property/index.js"(te,Z){var v=Object.defineProperty||!1;if(v)try{v({},"a",{value:1})}catch{v=!1}Z.exports=v}}),Bm=Ne({"node_modules/has-symbols/index.js"(te,Z){var v=typeof Symbol<"u"&&Symbol,w=eb();Z.exports=function(){return typeof v!="function"||typeof Symbol!="function"||typeof v("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:w()}}}),hS=Ne({"node_modules/get-proto/Reflect.getPrototypeOf.js"(te,Z){Z.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null}}),ap=Ne({"node_modules/get-proto/Object.getPrototypeOf.js"(te,Z){var v=tb();Z.exports=v.getPrototypeOf||null}}),TC=Ne({"node_modules/function-bind/implementation.js"(te,Z){var v="Function.prototype.bind called on incompatible ",w=Object.prototype.toString,C=Math.max,P="[object Function]",t=function(i,s){for(var o=[],u=0;u<i.length;u+=1)o[u]=i[u];for(var d=0;d<s.length;d+=1)o[d+i.length]=s[d];return o},r=function(i,s){for(var o=[],u=s,d=0;u<i.length;u+=1,d+=1)o[d]=i[u];return o},a=function(l,i){for(var s="",o=0;o<l.length;o+=1)s+=l[o],o+1<l.length&&(s+=i);return s};Z.exports=function(i){var s=this;if(typeof s!="function"||w.apply(s)!==P)throw new TypeError(v+s);for(var o=r(arguments,1),u,d=function(){if(this instanceof u){var c=s.apply(this,t(o,arguments));return Object(c)===c?c:this}return s.apply(i,t(o,arguments))},h=C(0,s.length-o.length),g=[],m=0;m<h;m++)g[m]="$"+m;if(u=Function("binder","return function ("+a(g,",")+"){ return binder.apply(this,arguments); }")(d),s.prototype){var E=function(){};E.prototype=s.prototype,u.prototype=new E,E.prototype=null}return u}}}),Jp=Ne({"node_modules/function-bind/index.js"(te,Z){var v=TC();Z.exports=Function.prototype.bind||v}}),J0=Ne({"node_modules/call-bind-apply-helpers/functionCall.js"(te,Z){Z.exports=Function.prototype.call}}),f0=Ne({"node_modules/call-bind-apply-helpers/functionApply.js"(te,Z){Z.exports=Function.prototype.apply}}),dS=Ne({"node_modules/call-bind-apply-helpers/reflectApply.js"(te,Z){Z.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply}}),vS=Ne({"node_modules/call-bind-apply-helpers/actualApply.js"(te,Z){var v=Jp(),w=f0(),C=J0(),P=dS();Z.exports=P||v.call(C,w)}}),jm=Ne({"node_modules/call-bind-apply-helpers/index.js"(te,Z){var v=Jp(),w=Wh(),C=J0(),P=vS();Z.exports=function(r){if(r.length<1||typeof r[0]!="function")throw new w("a function is required");return P(v,C,r)}}}),AC=Ne({"node_modules/dunder-proto/get.js"(te,Z){var v=jm(),w=K0(),C;try{C=[].__proto__===Array.prototype}catch(a){if(!a||typeof a!="object"||!("code"in a)||a.code!=="ERR_PROTO_ACCESS")throw a}var P=!!C&&w&&w(Object.prototype,"__proto__"),t=Object,r=t.getPrototypeOf;Z.exports=P&&typeof P.get=="function"?v([P.get]):typeof r=="function"?(function(l){return r(l==null?l:t(l))}):!1}}),o_=Ne({"node_modules/get-proto/index.js"(te,Z){var v=hS(),w=ap(),C=AC();Z.exports=v?function(t){return v(t)}:w?function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return w(t)}:C?function(t){return C(t)}:null}}),rb=Ne({"node_modules/hasown/index.js"(te,Z){var v=Function.prototype.call,w=Object.prototype.hasOwnProperty,C=Jp();Z.exports=C.call(v,w)}}),qy=Ne({"node_modules/get-intrinsic/index.js"(te,Z){var v,w=tb(),C=gC(),P=Z0(),t=Cd(),r=cS(),a=fS(),l=Wh(),i=KL(),s=yC(),o=_C(),u=Th(),d=gp(),h=$0(),g=xC(),m=wC(),E=Function,c=function(ee){try{return E('"use strict"; return ('+ee+").constructor;")()}catch{}},_=K0(),T=Av(),M=function(){throw new l},k=_?(function(){try{return arguments.callee,M}catch{try{return _(arguments,"callee").get}catch{return M}}})():M,b=Bm()(),A=o_(),y=ap(),f=hS(),p=f0(),x=J0(),N={},D=typeof Uint8Array>"u"||!A?v:A(Uint8Array),B={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?v:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?v:ArrayBuffer,"%ArrayIteratorPrototype%":b&&A?A([][Symbol.iterator]()):v,"%AsyncFromSyncIteratorPrototype%":v,"%AsyncFunction%":N,"%AsyncGenerator%":N,"%AsyncGeneratorFunction%":N,"%AsyncIteratorPrototype%":N,"%Atomics%":typeof Atomics>"u"?v:Atomics,"%BigInt%":typeof BigInt>"u"?v:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?v:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?v:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?v:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":C,"%eval%":eval,"%EvalError%":P,"%Float16Array%":typeof Float16Array>"u"?v:Float16Array,"%Float32Array%":typeof Float32Array>"u"?v:Float32Array,"%Float64Array%":typeof Float64Array>"u"?v:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?v:FinalizationRegistry,"%Function%":E,"%GeneratorFunction%":N,"%Int8Array%":typeof Int8Array>"u"?v:Int8Array,"%Int16Array%":typeof Int16Array>"u"?v:Int16Array,"%Int32Array%":typeof Int32Array>"u"?v:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":b&&A?A(A([][Symbol.iterator]())):v,"%JSON%":typeof JSON=="object"?JSON:v,"%Map%":typeof Map>"u"?v:Map,"%MapIteratorPrototype%":typeof Map>"u"||!b||!A?v:A(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":w,"%Object.getOwnPropertyDescriptor%":_,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?v:Promise,"%Proxy%":typeof Proxy>"u"?v:Proxy,"%RangeError%":t,"%ReferenceError%":r,"%Reflect%":typeof Reflect>"u"?v:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?v:Set,"%SetIteratorPrototype%":typeof Set>"u"||!b||!A?v:A(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?v:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":b&&A?A(""[Symbol.iterator]()):v,"%Symbol%":b?Symbol:v,"%SyntaxError%":a,"%ThrowTypeError%":k,"%TypedArray%":D,"%TypeError%":l,"%Uint8Array%":typeof Uint8Array>"u"?v:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?v:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?v:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?v:Uint32Array,"%URIError%":i,"%WeakMap%":typeof WeakMap>"u"?v:WeakMap,"%WeakRef%":typeof WeakRef>"u"?v:WeakRef,"%WeakSet%":typeof WeakSet>"u"?v:WeakSet,"%Function.prototype.call%":x,"%Function.prototype.apply%":p,"%Object.defineProperty%":T,"%Object.getPrototypeOf%":y,"%Math.abs%":s,"%Math.floor%":o,"%Math.max%":u,"%Math.min%":d,"%Math.pow%":h,"%Math.round%":g,"%Math.sign%":m,"%Reflect.getPrototypeOf%":f};if(A)try{null.error}catch(ee){U=A(A(ee)),B["%Error.prototype%"]=U}var U,V=function ee(pe){var oe;if(pe==="%AsyncFunction%")oe=c("async function () {}");else if(pe==="%GeneratorFunction%")oe=c("function* () {}");else if(pe==="%AsyncGeneratorFunction%")oe=c("async function* () {}");else if(pe==="%AsyncGenerator%"){var Y=ee("%AsyncGeneratorFunction%");Y&&(oe=Y.prototype)}else if(pe==="%AsyncIteratorPrototype%"){var ce=ee("%AsyncGenerator%");ce&&A&&(oe=A(ce.prototype))}return B[pe]=oe,oe},q={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},z=Jp(),H=rb(),G=z.call(x,Array.prototype.concat),J=z.call(p,Array.prototype.splice),le=z.call(x,String.prototype.replace),ge=z.call(x,String.prototype.slice),de=z.call(x,RegExp.prototype.exec),me=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,W=/\\(\\)?/g,ie=function(pe){var oe=ge(pe,0,1),Y=ge(pe,-1);if(oe==="%"&&Y!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(Y==="%"&&oe!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var ce=[];return le(pe,me,function(ue,_e,Le,ze){ce[ce.length]=Le?le(ze,W,"$1"):_e||ue}),ce},se=function(pe,oe){var Y=pe,ce;if(H(q,Y)&&(ce=q[Y],Y="%"+ce[0]+"%"),H(B,Y)){var ue=B[Y];if(ue===N&&(ue=V(Y)),typeof ue>"u"&&!oe)throw new l("intrinsic "+pe+" exists, but is not available. Please file an issue!");return{alias:ce,name:Y,value:ue}}throw new a("intrinsic "+pe+" does not exist!")};Z.exports=function(pe,oe){if(typeof pe!="string"||pe.length===0)throw new l("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof oe!="boolean")throw new l('"allowMissing" argument must be a boolean');if(de(/^%?[^%]*%?$/,pe)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var Y=ie(pe),ce=Y.length>0?Y[0]:"",ue=se("%"+ce+"%",oe),_e=ue.name,Le=ue.value,ze=!1,Xe=ue.alias;Xe&&(ce=Xe[0],J(Y,G([0,1],Xe)));for(var Ve=1,rt=!0;Ve<Y.length;Ve+=1){var mt=Y[Ve],_t=ge(mt,0,1),vt=ge(mt,-1);if((_t==='"'||_t==="'"||_t==="`"||vt==='"'||vt==="'"||vt==="`")&&_t!==vt)throw new a("property names with quotes must have matching quotes");if((mt==="constructor"||!rt)&&(ze=!0),ce+="."+mt,_e="%"+ce+"%",H(B,_e))Le=B[_e];else if(Le!=null){if(!(mt in Le)){if(!oe)throw new l("base intrinsic for "+pe+" exists, but the property is not available.");return}if(_&&Ve+1>=Y.length){var ut=_(Le,mt);rt=!!ut,rt&&"get"in ut&&!("originalValue"in ut.get)?Le=ut.get:Le=Le[mt]}else rt=H(Le,mt),Le=Le[mt];rt&&!ze&&(B[_e]=Le)}}return Le}}}),s_=Ne({"node_modules/define-data-property/index.js"(te,Z){var v=Av(),w=fS(),C=Wh(),P=K0();Z.exports=function(r,a,l){if(!r||typeof r!="object"&&typeof r!="function")throw new C("`obj` must be an object or a function`");if(typeof a!="string"&&typeof a!="symbol")throw new C("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new C("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new C("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new C("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new C("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,u=arguments.length>6?arguments[6]:!1,d=!!P&&P(r,a);if(v)v(r,a,{configurable:o===null&&d?d.configurable:!o,enumerable:i===null&&d?d.enumerable:!i,value:l,writable:s===null&&d?d.writable:!s});else if(u||!i&&!s&&!o)r[a]=l;else throw new w("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}}}),pS=Ne({"node_modules/has-property-descriptors/index.js"(te,Z){var v=Av(),w=function(){return!!v};w.hasArrayLengthDefineBug=function(){if(!v)return null;try{return v([],"length",{value:1}).length!==1}catch{return!0}},Z.exports=w}}),SC=Ne({"node_modules/set-function-length/index.js"(te,Z){var v=qy(),w=s_(),C=pS()(),P=K0(),t=Wh(),r=v("%Math.floor%");Z.exports=function(l,i){if(typeof l!="function")throw new t("`fn` is not a function");if(typeof i!="number"||i<0||i>4294967295||r(i)!==i)throw new t("`length` must be a positive 32-bit integer");var s=arguments.length>2&&!!arguments[2],o=!0,u=!0;if("length"in l&&P){var d=P(l,"length");d&&!d.configurable&&(o=!1),d&&!d.writable&&(u=!1)}return(o||u||!s)&&(C?w(l,"length",i,!0,!0):w(l,"length",i)),l}}}),jg=Ne({"node_modules/call-bind/index.js"(te,Z){var v=Jp(),w=qy(),C=SC(),P=Wh(),t=w("%Function.prototype.apply%"),r=w("%Function.prototype.call%"),a=w("%Reflect.apply%",!0)||v.call(r,t),l=Av(),i=w("%Math.max%");Z.exports=function(u){if(typeof u!="function")throw new P("a function is required");var d=a(v,r,arguments);return C(d,1+i(0,u.length-(arguments.length-1)),!0)};var s=function(){return a(v,t,arguments)};l?l(Z.exports,"apply",{value:s}):Z.exports.apply=s}}),l_=Ne({"node_modules/call-bind/callBound.js"(te,Z){var v=qy(),w=jg(),C=w(v("String.prototype.indexOf"));Z.exports=function(t,r){var a=v(t,!!r);return typeof a=="function"&&C(t,".prototype.")>-1?w(a):a}}}),D2=Ne({"node_modules/is-arguments/index.js"(te,Z){var v=i_()(),w=l_(),C=w("Object.prototype.toString"),P=function(l){return v&&l&&typeof l=="object"&&Symbol.toStringTag in l?!1:C(l)==="[object Arguments]"},t=function(l){return P(l)?!0:l!==null&&typeof l=="object"&&typeof l.length=="number"&&l.length>=0&&C(l)!=="[object Array]"&&C(l.callee)==="[object Function]"},r=(function(){return P(arguments)})();P.isLegacyArguments=t,Z.exports=r?P:t}}),EC=Ne({"node_modules/is-generator-function/index.js"(te,Z){var v=Object.prototype.toString,w=Function.prototype.toString,C=/^\s*(?:function)?\*/,P=i_()(),t=Object.getPrototypeOf,r=function(){if(!P)return!1;try{return Function("return function*() {}")()}catch{}},a;Z.exports=function(i){if(typeof i!="function")return!1;if(C.test(w.call(i)))return!0;if(!P){var s=v.call(i);return s==="[object GeneratorFunction]"}if(!t)return!1;if(typeof a>"u"){var o=r();a=o?t(o):!1}return t(i)===a}}}),QL=Ne({"node_modules/is-callable/index.js"(te,Z){var v=Function.prototype.toString,w=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,C,P;if(typeof w=="function"&&typeof Object.defineProperty=="function")try{C=Object.defineProperty({},"length",{get:function(){throw P}}),P={},w(function(){throw 42},null,C)}catch(_){_!==P&&(w=null)}else w=null;var t=/^\s*class\b/,r=function(T){try{var M=v.call(T);return t.test(M)}catch{return!1}},a=function(T){try{return r(T)?!1:(v.call(T),!0)}catch{return!1}},l=Object.prototype.toString,i="[object Object]",s="[object Function]",o="[object GeneratorFunction]",u="[object HTMLAllCollection]",d="[object HTML document.all class]",h="[object HTMLCollection]",g=typeof Symbol=="function"&&!!Symbol.toStringTag,m=!(0 in[,]),E=function(){return!1};typeof document=="object"&&(c=document.all,l.call(c)===l.call(document.all)&&(E=function(T){if((m||!T)&&(typeof T>"u"||typeof T=="object"))try{var M=l.call(T);return(M===u||M===d||M===h||M===i)&&T("")==null}catch{}return!1}));var c;Z.exports=w?function(T){if(E(T))return!0;if(!T||typeof T!="function"&&typeof T!="object")return!1;try{w(T,null,C)}catch(M){if(M!==P)return!1}return!r(T)&&a(T)}:function(T){if(E(T))return!0;if(!T||typeof T!="function"&&typeof T!="object")return!1;if(g)return a(T);if(r(T))return!1;var M=l.call(T);return M!==s&&M!==o&&!/^\[object HTML/.test(M)?!1:a(T)}}}),MC=Ne({"node_modules/for-each/index.js"(te,Z){var v=QL(),w=Object.prototype.toString,C=Object.prototype.hasOwnProperty,P=function(i,s,o){for(var u=0,d=i.length;u<d;u++)C.call(i,u)&&(o==null?s(i[u],u,i):s.call(o,i[u],u,i))},t=function(i,s,o){for(var u=0,d=i.length;u<d;u++)o==null?s(i.charAt(u),u,i):s.call(o,i.charAt(u),u,i)},r=function(i,s,o){for(var u in i)C.call(i,u)&&(o==null?s(i[u],u,i):s.call(o,i[u],u,i))},a=function(i,s,o){if(!v(s))throw new TypeError("iterator must be a function");var u;arguments.length>=3&&(u=o),w.call(i)==="[object Array]"?P(i,s,u):typeof i=="string"?t(i,s,u):r(i,s,u)};Z.exports=a}}),jc=Ne({"node_modules/available-typed-arrays/index.js"(te,Z){var v=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],w=typeof globalThis>"u"?window:globalThis;Z.exports=function(){for(var P=[],t=0;t<v.length;t++)typeof w[v[t]]=="function"&&(P[P.length]=v[t]);return P}}}),Zf=Ne({"node_modules/which-typed-array/index.js"(te,Z){var v=MC(),w=jc(),C=jg(),P=l_(),t=K0(),r=P("Object.prototype.toString"),a=i_()(),l=typeof globalThis>"u"?window:globalThis,i=w(),s=P("String.prototype.slice"),o=Object.getPrototypeOf,u=P("Array.prototype.indexOf",!0)||function(E,c){for(var _=0;_<E.length;_+=1)if(E[_]===c)return _;return-1},d={__proto__:null};a&&t&&o?v(i,function(m){var E=new l[m];if(Symbol.toStringTag in E){var c=o(E),_=t(c,Symbol.toStringTag);if(!_){var T=o(c);_=t(T,Symbol.toStringTag)}d["$"+m]=C(_.get)}}):v(i,function(m){var E=new l[m],c=E.slice||E.set;c&&(d["$"+m]=C(c))});var h=function(E){var c=!1;return v(d,function(_,T){if(!c)try{"$"+_(E)===T&&(c=s(T,1))}catch{}}),c},g=function(E){var c=!1;return v(d,function(_,T){if(!c)try{_(E),c=s(T,1)}catch{}}),c};Z.exports=function(E){if(!E||typeof E!="object")return!1;if(!a){var c=s(r(E),8,-1);return u(i,c)>-1?c:c!=="Object"?!1:g(E)}return t?h(E):null}}}),dc=Ne({"node_modules/is-typed-array/index.js"(te,Z){var v=MC(),w=jc(),C=l_(),P=C("Object.prototype.toString"),t=i_()(),r=K0(),a=typeof globalThis>"u"?window:globalThis,l=w(),i=C("Array.prototype.indexOf",!0)||function(g,m){for(var E=0;E<g.length;E+=1)if(g[E]===m)return E;return-1},s=C("String.prototype.slice"),o={},u=Object.getPrototypeOf;t&&r&&u&&v(l,function(h){var g=new a[h];if(Symbol.toStringTag in g){var m=u(g),E=r(m,Symbol.toStringTag);if(!E){var c=u(m);E=r(c,Symbol.toStringTag)}o[h]=E.get}});var d=function(g){var m=!1;return v(o,function(E,c){if(!m)try{m=E.call(g)===c}catch{}}),m};Z.exports=function(g){if(!g||typeof g!="object")return!1;if(!t||!(Symbol.toStringTag in g)){var m=s(P(g),8,-1);return i(l,m)>-1}return r?d(g):!1}}}),vc=Ne({"node_modules/util/support/types.js"(te){var Z=D2(),v=EC(),w=Zf(),C=dc();function P(ze){return ze.call.bind(ze)}var t=typeof BigInt<"u",r=typeof Symbol<"u",a=P(Object.prototype.toString),l=P(Number.prototype.valueOf),i=P(String.prototype.valueOf),s=P(Boolean.prototype.valueOf);t&&(o=P(BigInt.prototype.valueOf));var o;r&&(u=P(Symbol.prototype.valueOf));var u;function d(ze,Xe){if(typeof ze!="object")return!1;try{return Xe(ze),!0}catch{return!1}}te.isArgumentsObject=Z,te.isGeneratorFunction=v,te.isTypedArray=C;function h(ze){return typeof Promise<"u"&&ze instanceof Promise||ze!==null&&typeof ze=="object"&&typeof ze.then=="function"&&typeof ze.catch=="function"}te.isPromise=h;function g(ze){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(ze):C(ze)||J(ze)}te.isArrayBufferView=g;function m(ze){return w(ze)==="Uint8Array"}te.isUint8Array=m;function E(ze){return w(ze)==="Uint8ClampedArray"}te.isUint8ClampedArray=E;function c(ze){return w(ze)==="Uint16Array"}te.isUint16Array=c;function _(ze){return w(ze)==="Uint32Array"}te.isUint32Array=_;function T(ze){return w(ze)==="Int8Array"}te.isInt8Array=T;function M(ze){return w(ze)==="Int16Array"}te.isInt16Array=M;function k(ze){return w(ze)==="Int32Array"}te.isInt32Array=k;function b(ze){return w(ze)==="Float32Array"}te.isFloat32Array=b;function A(ze){return w(ze)==="Float64Array"}te.isFloat64Array=A;function y(ze){return w(ze)==="BigInt64Array"}te.isBigInt64Array=y;function f(ze){return w(ze)==="BigUint64Array"}te.isBigUint64Array=f;function p(ze){return a(ze)==="[object Map]"}p.working=typeof Map<"u"&&p(new Map);function x(ze){return typeof Map>"u"?!1:p.working?p(ze):ze instanceof Map}te.isMap=x;function N(ze){return a(ze)==="[object Set]"}N.working=typeof Set<"u"&&N(new Set);function D(ze){return typeof Set>"u"?!1:N.working?N(ze):ze instanceof Set}te.isSet=D;function B(ze){return a(ze)==="[object WeakMap]"}B.working=typeof WeakMap<"u"&&B(new WeakMap);function U(ze){return typeof WeakMap>"u"?!1:B.working?B(ze):ze instanceof WeakMap}te.isWeakMap=U;function V(ze){return a(ze)==="[object WeakSet]"}V.working=typeof WeakSet<"u"&&V(new WeakSet);function q(ze){return V(ze)}te.isWeakSet=q;function z(ze){return a(ze)==="[object ArrayBuffer]"}z.working=typeof ArrayBuffer<"u"&&z(new ArrayBuffer);function H(ze){return typeof ArrayBuffer>"u"?!1:z.working?z(ze):ze instanceof ArrayBuffer}te.isArrayBuffer=H;function G(ze){return a(ze)==="[object DataView]"}G.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&G(new DataView(new ArrayBuffer(1),0,1));function J(ze){return typeof DataView>"u"?!1:G.working?G(ze):ze instanceof DataView}te.isDataView=J;var le=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function ge(ze){return a(ze)==="[object SharedArrayBuffer]"}function de(ze){return typeof le>"u"?!1:(typeof ge.working>"u"&&(ge.working=ge(new le)),ge.working?ge(ze):ze instanceof le)}te.isSharedArrayBuffer=de;function me(ze){return a(ze)==="[object AsyncFunction]"}te.isAsyncFunction=me;function W(ze){return a(ze)==="[object Map Iterator]"}te.isMapIterator=W;function ie(ze){return a(ze)==="[object Set Iterator]"}te.isSetIterator=ie;function se(ze){return a(ze)==="[object Generator]"}te.isGeneratorObject=se;function ee(ze){return a(ze)==="[object WebAssembly.Module]"}te.isWebAssemblyCompiledModule=ee;function pe(ze){return d(ze,l)}te.isNumberObject=pe;function oe(ze){return d(ze,i)}te.isStringObject=oe;function Y(ze){return d(ze,s)}te.isBooleanObject=Y;function ce(ze){return t&&d(ze,o)}te.isBigIntObject=ce;function ue(ze){return r&&d(ze,u)}te.isSymbolObject=ue;function _e(ze){return pe(ze)||oe(ze)||Y(ze)||ce(ze)||ue(ze)}te.isBoxedPrimitive=_e;function Le(ze){return typeof Uint8Array<"u"&&(H(ze)||de(ze))}te.isAnyArrayBuffer=Le,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(ze){Object.defineProperty(te,ze,{enumerable:!1,value:function(){throw new Error(ze+" is not supported in userland")}})})}}),hf=Ne({"node_modules/util/support/isBufferBrowser.js"(te,Z){Z.exports=function(w){return w&&typeof w=="object"&&typeof w.copy=="function"&&typeof w.fill=="function"&&typeof w.readUInt8=="function"}}}),yp=Ne({"(disabled):node_modules/util/util.js"(te){var Z=Object.getOwnPropertyDescriptors||function(J){for(var le=Object.keys(J),ge={},de=0;de<le.length;de++)ge[le[de]]=Object.getOwnPropertyDescriptor(J,le[de]);return ge},v=/%[sdj%]/g;te.format=function(G){if(!T(G)){for(var J=[],le=0;le<arguments.length;le++)J.push(t(arguments[le]));return J.join(" ")}for(var le=1,ge=arguments,de=ge.length,me=String(G).replace(v,function(ie){if(ie==="%%")return"%";if(le>=de)return ie;switch(ie){case"%s":return String(ge[le++]);case"%d":return Number(ge[le++]);case"%j":try{return JSON.stringify(ge[le++])}catch{return"[Circular]"}default:return ie}}),W=ge[le];le<de;W=ge[++le])E(W)||!A(W)?me+=" "+W:me+=" "+t(W);return me},te.deprecate=function(G,J){if(typeof process<"u"&&process.noDeprecation===!0)return G;if(typeof process>"u")return function(){return te.deprecate(G,J).apply(this,arguments)};var le=!1;function ge(){if(!le){if(process.throwDeprecation)throw new Error(J);process.traceDeprecation?console.trace(J):console.error(J),le=!0}return G.apply(this,arguments)}return ge};var w={},C=/^$/;P="false",P=P.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),C=new RegExp("^"+P+"$","i");var P;te.debuglog=function(G){if(G=G.toUpperCase(),!w[G])if(C.test(G)){var J=process.pid;w[G]=function(){var le=te.format.apply(te,arguments);console.error("%s %d: %s",G,J,le)}}else w[G]=function(){};return w[G]};function t(G,J){var le={seen:[],stylize:a};return arguments.length>=3&&(le.depth=arguments[2]),arguments.length>=4&&(le.colors=arguments[3]),m(J)?le.showHidden=J:J&&te._extend(le,J),k(le.showHidden)&&(le.showHidden=!1),k(le.depth)&&(le.depth=2),k(le.colors)&&(le.colors=!1),k(le.customInspect)&&(le.customInspect=!0),le.colors&&(le.stylize=r),i(le,G,le.depth)}te.inspect=t,t.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]},t.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function r(G,J){var le=t.styles[J];return le?"\x1B["+t.colors[le][0]+"m"+G+"\x1B["+t.colors[le][1]+"m":G}function a(G,J){return G}function l(G){var J={};return G.forEach(function(le,ge){J[le]=!0}),J}function i(G,J,le){if(G.customInspect&&J&&p(J.inspect)&&J.inspect!==te.inspect&&!(J.constructor&&J.constructor.prototype===J)){var ge=J.inspect(le,G);return T(ge)||(ge=i(G,ge,le)),ge}var de=s(G,J);if(de)return de;var me=Object.keys(J),W=l(me);if(G.showHidden&&(me=Object.getOwnPropertyNames(J)),f(J)&&(me.indexOf("message")>=0||me.indexOf("description")>=0))return o(J);if(me.length===0){if(p(J)){var ie=J.name?": "+J.name:"";return G.stylize("[Function"+ie+"]","special")}if(b(J))return G.stylize(RegExp.prototype.toString.call(J),"regexp");if(y(J))return G.stylize(Date.prototype.toString.call(J),"date");if(f(J))return o(J)}var se="",ee=!1,pe=["{","}"];if(g(J)&&(ee=!0,pe=["[","]"]),p(J)){var oe=J.name?": "+J.name:"";se=" [Function"+oe+"]"}if(b(J)&&(se=" "+RegExp.prototype.toString.call(J)),y(J)&&(se=" "+Date.prototype.toUTCString.call(J)),f(J)&&(se=" "+o(J)),me.length===0&&(!ee||J.length==0))return pe[0]+se+pe[1];if(le<0)return b(J)?G.stylize(RegExp.prototype.toString.call(J),"regexp"):G.stylize("[Object]","special");G.seen.push(J);var Y;return ee?Y=u(G,J,le,W,me):Y=me.map(function(ce){return d(G,J,le,W,ce,ee)}),G.seen.pop(),h(Y,se,pe)}function s(G,J){if(k(J))return G.stylize("undefined","undefined");if(T(J)){var le="'"+JSON.stringify(J).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return G.stylize(le,"string")}if(_(J))return G.stylize(""+J,"number");if(m(J))return G.stylize(""+J,"boolean");if(E(J))return G.stylize("null","null")}function o(G){return"["+Error.prototype.toString.call(G)+"]"}function u(G,J,le,ge,de){for(var me=[],W=0,ie=J.length;W<ie;++W)V(J,String(W))?me.push(d(G,J,le,ge,String(W),!0)):me.push("");return de.forEach(function(se){se.match(/^\d+$/)||me.push(d(G,J,le,ge,se,!0))}),me}function d(G,J,le,ge,de,me){var W,ie,se;if(se=Object.getOwnPropertyDescriptor(J,de)||{value:J[de]},se.get?se.set?ie=G.stylize("[Getter/Setter]","special"):ie=G.stylize("[Getter]","special"):se.set&&(ie=G.stylize("[Setter]","special")),V(ge,de)||(W="["+de+"]"),ie||(G.seen.indexOf(se.value)<0?(E(le)?ie=i(G,se.value,null):ie=i(G,se.value,le-1),ie.indexOf(`
`)>-1&&(me?ie=ie.split(`
`).map(function(ee){return"  "+ee}).join(`
`).slice(2):ie=`
`+ie.split(`
`).map(function(ee){return"   "+ee}).join(`
`))):ie=G.stylize("[Circular]","special")),k(W)){if(me&&de.match(/^\d+$/))return ie;W=JSON.stringify(""+de),W.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(W=W.slice(1,-1),W=G.stylize(W,"name")):(W=W.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),W=G.stylize(W,"string"))}return W+": "+ie}function h(G,J,le){var ge=G.reduce(function(de,me){return me.indexOf(`
`)>=0,de+me.replace(/\u001b\[\d\d?m/g,"").length+1},0);return ge>60?le[0]+(J===""?"":J+`
 `)+" "+G.join(`,
  `)+" "+le[1]:le[0]+J+" "+G.join(", ")+" "+le[1]}te.types=vc();function g(G){return Array.isArray(G)}te.isArray=g;function m(G){return typeof G=="boolean"}te.isBoolean=m;function E(G){return G===null}te.isNull=E;function c(G){return G==null}te.isNullOrUndefined=c;function _(G){return typeof G=="number"}te.isNumber=_;function T(G){return typeof G=="string"}te.isString=T;function M(G){return typeof G=="symbol"}te.isSymbol=M;function k(G){return G===void 0}te.isUndefined=k;function b(G){return A(G)&&N(G)==="[object RegExp]"}te.isRegExp=b,te.types.isRegExp=b;function A(G){return typeof G=="object"&&G!==null}te.isObject=A;function y(G){return A(G)&&N(G)==="[object Date]"}te.isDate=y,te.types.isDate=y;function f(G){return A(G)&&(N(G)==="[object Error]"||G instanceof Error)}te.isError=f,te.types.isNativeError=f;function p(G){return typeof G=="function"}te.isFunction=p;function x(G){return G===null||typeof G=="boolean"||typeof G=="number"||typeof G=="string"||typeof G=="symbol"||typeof G>"u"}te.isPrimitive=x,te.isBuffer=hf();function N(G){return Object.prototype.toString.call(G)}function D(G){return G<10?"0"+G.toString(10):G.toString(10)}var B=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function U(){var G=new Date,J=[D(G.getHours()),D(G.getMinutes()),D(G.getSeconds())].join(":");return[G.getDate(),B[G.getMonth()],J].join(" ")}te.log=function(){console.log("%s - %s",U(),te.format.apply(te,arguments))},te.inherits=cm(),te._extend=function(G,J){if(!J||!A(J))return G;for(var le=Object.keys(J),ge=le.length;ge--;)G[le[ge]]=J[le[ge]];return G};function V(G,J){return Object.prototype.hasOwnProperty.call(G,J)}var q=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;te.promisify=function(J){if(typeof J!="function")throw new TypeError('The "original" argument must be of type Function');if(q&&J[q]){var le=J[q];if(typeof le!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(le,q,{value:le,enumerable:!1,writable:!1,configurable:!0}),le}function le(){for(var ge,de,me=new Promise(function(se,ee){ge=se,de=ee}),W=[],ie=0;ie<arguments.length;ie++)W.push(arguments[ie]);W.push(function(se,ee){se?de(se):ge(ee)});try{J.apply(this,W)}catch(se){de(se)}return me}return Object.setPrototypeOf(le,Object.getPrototypeOf(J)),q&&Object.defineProperty(le,q,{value:le,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(le,Z(J))},te.promisify.custom=q;function z(G,J){if(!G){var le=new Error("Promise was rejected with a falsy value");le.reason=G,G=le}return J(G)}function H(G){if(typeof G!="function")throw new TypeError('The "original" argument must be of type Function');function J(){for(var le=[],ge=0;ge<arguments.length;ge++)le.push(arguments[ge]);var de=le.pop();if(typeof de!="function")throw new TypeError("The last argument must be of type Function");var me=this,W=function(){return de.apply(me,arguments)};G.apply(this,le).then(function(ie){process.nextTick(W.bind(null,null,ie))},function(ie){process.nextTick(z.bind(null,ie,W))})}return Object.setPrototypeOf(J,Object.getPrototypeOf(G)),Object.defineProperties(J,Z(G)),J}te.callbackify=H}}),Ug=Ne({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/buffer_list.js"(te,Z){function v(d,h){var g=Object.keys(d);if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(d);h&&(m=m.filter(function(E){return Object.getOwnPropertyDescriptor(d,E).enumerable})),g.push.apply(g,m)}return g}function w(d){for(var h=1;h<arguments.length;h++){var g=arguments[h]!=null?arguments[h]:{};h%2?v(Object(g),!0).forEach(function(m){C(d,m,g[m])}):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(g)):v(Object(g)).forEach(function(m){Object.defineProperty(d,m,Object.getOwnPropertyDescriptor(g,m))})}return d}function C(d,h,g){return h in d?Object.defineProperty(d,h,{value:g,enumerable:!0,configurable:!0,writable:!0}):d[h]=g,d}function P(d,h){if(!(d instanceof h))throw new TypeError("Cannot call a class as a function")}function t(d,h){for(var g=0;g<h.length;g++){var m=h[g];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(d,m.key,m)}}function r(d,h,g){return h&&t(d.prototype,h),d}var a=Uy(),l=a.Buffer,i=yp(),s=i.inspect,o=s&&s.custom||"inspect";function u(d,h,g){l.prototype.copy.call(d,h,g)}Z.exports=(function(){function d(){P(this,d),this.head=null,this.tail=null,this.length=0}return r(d,[{key:"push",value:function(g){var m={data:g,next:null};this.length>0?this.tail.next=m:this.head=m,this.tail=m,++this.length}},{key:"unshift",value:function(g){var m={data:g,next:this.head};this.length===0&&(this.tail=m),this.head=m,++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 m=this.head,E=""+m.data;m=m.next;)E+=g+m.data;return E}},{key:"concat",value:function(g){if(this.length===0)return l.alloc(0);for(var m=l.allocUnsafe(g>>>0),E=this.head,c=0;E;)u(E.data,m,c),c+=E.data.length,E=E.next;return m}},{key:"consume",value:function(g,m){var E;return g<this.head.data.length?(E=this.head.data.slice(0,g),this.head.data=this.head.data.slice(g)):g===this.head.data.length?E=this.shift():E=m?this._getString(g):this._getBuffer(g),E}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(g){var m=this.head,E=1,c=m.data;for(g-=c.length;m=m.next;){var _=m.data,T=g>_.length?_.length:g;if(T===_.length?c+=_:c+=_.slice(0,g),g-=T,g===0){T===_.length?(++E,m.next?this.head=m.next:this.head=this.tail=null):(this.head=m,m.data=_.slice(T));break}++E}return this.length-=E,c}},{key:"_getBuffer",value:function(g){var m=l.allocUnsafe(g),E=this.head,c=1;for(E.data.copy(m),g-=E.data.length;E=E.next;){var _=E.data,T=g>_.length?_.length:g;if(_.copy(m,m.length-g,0,T),g-=T,g===0){T===_.length?(++c,E.next?this.head=E.next:this.head=this.tail=null):(this.head=E,E.data=_.slice(T));break}++c}return this.length-=c,m}},{key:o,value:function(g,m){return s(this,w({},m,{depth:0,customInspect:!1}))}}]),d})()}}),Vy=Ne({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/destroy.js"(te,Z){function v(a,l){var i=this,s=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return s||o?(l?l(a):a&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(t,this,a)):process.nextTick(t,this,a)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(a||null,function(u){!l&&u?i._writableState?i._writableState.errorEmitted?process.nextTick(C,i):(i._writableState.errorEmitted=!0,process.nextTick(w,i,u)):process.nextTick(w,i,u):l?(process.nextTick(C,i),l(u)):process.nextTick(C,i)}),this)}function w(a,l){t(a,l),C(a)}function C(a){a._writableState&&!a._writableState.emitClose||a._readableState&&!a._readableState.emitClose||a.emit("close")}function P(){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 t(a,l){a.emit("error",l)}function r(a,l){var i=a._readableState,s=a._writableState;i&&i.autoDestroy||s&&s.autoDestroy?a.destroy(l):a.emit("error",l)}Z.exports={destroy:v,undestroy:P,errorOrDestroy:r}}}),qg=Ne({"node_modules/stream-browserify/node_modules/readable-stream/errors-browser.js"(te,Z){function v(l,i){l.prototype=Object.create(i.prototype),l.prototype.constructor=l,l.__proto__=i}var w={};function C(l,i,s){s||(s=Error);function o(d,h,g){return typeof i=="string"?i:i(d,h,g)}var u=(function(d){v(h,d);function h(g,m,E){return d.call(this,o(g,m,E))||this}return h})(s);u.prototype.name=s.name,u.prototype.code=l,w[l]=u}function P(l,i){if(Array.isArray(l)){var s=l.length;return l=l.map(function(o){return String(o)}),s>2?"one of ".concat(i," ").concat(l.slice(0,s-1).join(", "),", or ")+l[s-1]:s===2?"one of ".concat(i," ").concat(l[0]," or ").concat(l[1]):"of ".concat(i," ").concat(l[0])}else return"of ".concat(i," ").concat(String(l))}function t(l,i,s){return l.substr(0,i.length)===i}function r(l,i,s){return(s===void 0||s>l.length)&&(s=l.length),l.substring(s-i.length,s)===i}function a(l,i,s){return typeof s!="number"&&(s=0),s+i.length>l.length?!1:l.indexOf(i,s)!==-1}C("ERR_INVALID_OPT_VALUE",function(l,i){return'The value "'+i+'" is invalid for option "'+l+'"'},TypeError),C("ERR_INVALID_ARG_TYPE",function(l,i,s){var o;typeof i=="string"&&t(i,"not ")?(o="must not be",i=i.replace(/^not /,"")):o="must be";var u;if(r(l," argument"))u="The ".concat(l," ").concat(o," ").concat(P(i,"type"));else{var d=a(l,".")?"property":"argument";u='The "'.concat(l,'" ').concat(d," ").concat(o," ").concat(P(i,"type"))}return u+=". Received type ".concat(typeof s),u},TypeError),C("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),C("ERR_METHOD_NOT_IMPLEMENTED",function(l){return"The "+l+" method is not implemented"}),C("ERR_STREAM_PREMATURE_CLOSE","Premature close"),C("ERR_STREAM_DESTROYED",function(l){return"Cannot call "+l+" after a stream was destroyed"}),C("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),C("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),C("ERR_STREAM_WRITE_AFTER_END","write after end"),C("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),C("ERR_UNKNOWN_ENCODING",function(l){return"Unknown encoding: "+l},TypeError),C("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),Z.exports.codes=w}}),h0=Ne({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/state.js"(te,Z){var v=qg().codes.ERR_INVALID_OPT_VALUE;function w(P,t,r){return P.highWaterMark!=null?P.highWaterMark:t?P[r]:null}function C(P,t,r,a){var l=w(t,a,r);if(l!=null){if(!(isFinite(l)&&Math.floor(l)===l)||l<0){var i=a?r:"highWaterMark";throw new v(i,l)}return Math.floor(l)}return P.objectMode?16:16*1024}Z.exports={getHighWaterMark:C}}}),Yh=Ne({"node_modules/util-deprecate/browser.js"(te,Z){Z.exports=v;function v(C,P){if(w("noDeprecation"))return C;var t=!1;function r(){if(!t){if(w("throwDeprecation"))throw new Error(P);w("traceDeprecation")?console.trace(P):console.warn(P),t=!0}return C.apply(this,arguments)}return r}function w(C){try{if(!window.localStorage)return!1}catch{return!1}var P=window.localStorage[C];return P==null?!1:String(P).toLowerCase()==="true"}}}),Q0=Ne({"node_modules/stream-browserify/node_modules/readable-stream/lib/_stream_writable.js"(te,Z){Z.exports=y;function v(W){var ie=this;this.next=null,this.entry=null,this.finish=function(){me(ie,W)}}var w;y.WritableState=b;var C={deprecate:Yh()},P=Fm(),t=Uy().Buffer,r=window.Uint8Array||function(){};function a(W){return t.from(W)}function l(W){return t.isBuffer(W)||W instanceof r}var i=Vy(),s=h0(),o=s.getHighWaterMark,u=qg().codes,d=u.ERR_INVALID_ARG_TYPE,h=u.ERR_METHOD_NOT_IMPLEMENTED,g=u.ERR_MULTIPLE_CALLBACK,m=u.ERR_STREAM_CANNOT_PIPE,E=u.ERR_STREAM_DESTROYED,c=u.ERR_STREAM_NULL_VALUES,_=u.ERR_STREAM_WRITE_AFTER_END,T=u.ERR_UNKNOWN_ENCODING,M=i.errorOrDestroy;cm()(y,P);function k(){}function b(W,ie,se){w=w||fm(),W=W||{},typeof se!="boolean"&&(se=ie instanceof w),this.objectMode=!!W.objectMode,se&&(this.objectMode=this.objectMode||!!W.writableObjectMode),this.highWaterMark=o(this,W,"writableHighWaterMark",se),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var ee=W.decodeStrings===!1;this.decodeStrings=!ee,this.defaultEncoding=W.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(pe){V(ie,pe)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=W.emitClose!==!1,this.autoDestroy=!!W.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new v(this)}b.prototype.getBuffer=function(){for(var ie=this.bufferedRequest,se=[];ie;)se.push(ie),ie=ie.next;return se},(function(){try{Object.defineProperty(b.prototype,"buffer",{get:C.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var A;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(A=Function.prototype[Symbol.hasInstance],Object.defineProperty(y,Symbol.hasInstance,{value:function(ie){return A.call(this,ie)?!0:this!==y?!1:ie&&ie._writableState instanceof b}})):A=function(ie){return ie instanceof this};function y(W){w=w||fm();var ie=this instanceof w;if(!ie&&!A.call(y,this))return new y(W);this._writableState=new b(W,this,ie),this.writable=!0,W&&(typeof W.write=="function"&&(this._write=W.write),typeof W.writev=="function"&&(this._writev=W.writev),typeof W.destroy=="function"&&(this._destroy=W.destroy),typeof W.final=="function"&&(this._final=W.final)),P.call(this)}y.prototype.pipe=function(){M(this,new m)};function f(W,ie){var se=new _;M(W,se),process.nextTick(ie,se)}function p(W,ie,se,ee){var pe;return se===null?pe=new c:typeof se!="string"&&!ie.objectMode&&(pe=new d("chunk",["string","Buffer"],se)),pe?(M(W,pe),process.nextTick(ee,pe),!1):!0}y.prototype.write=function(W,ie,se){var ee=this._writableState,pe=!1,oe=!ee.objectMode&&l(W);return oe&&!t.isBuffer(W)&&(W=a(W)),typeof ie=="function"&&(se=ie,ie=null),oe?ie="buffer":ie||(ie=ee.defaultEncoding),typeof se!="function"&&(se=k),ee.ending?f(this,se):(oe||p(this,ee,W,se))&&(ee.pendingcb++,pe=N(this,ee,oe,W,ie,se)),pe},y.prototype.cork=function(){this._writableState.corked++},y.prototype.uncork=function(){var W=this._writableState;W.corked&&(W.corked--,!W.writing&&!W.corked&&!W.bufferProcessing&&W.bufferedRequest&&H(this,W))},y.prototype.setDefaultEncoding=function(ie){if(typeof ie=="string"&&(ie=ie.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((ie+"").toLowerCase())>-1))throw new T(ie);return this._writableState.defaultEncoding=ie,this},Object.defineProperty(y.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function x(W,ie,se){return!W.objectMode&&W.decodeStrings!==!1&&typeof ie=="string"&&(ie=t.from(ie,se)),ie}Object.defineProperty(y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function N(W,ie,se,ee,pe,oe){if(!se){var Y=x(ie,ee,pe);ee!==Y&&(se=!0,pe="buffer",ee=Y)}var ce=ie.objectMode?1:ee.length;ie.length+=ce;var ue=ie.length<ie.highWaterMark;if(ue||(ie.needDrain=!0),ie.writing||ie.corked){var _e=ie.lastBufferedRequest;ie.lastBufferedRequest={chunk:ee,encoding:pe,isBuf:se,callback:oe,next:null},_e?_e.next=ie.lastBufferedRequest:ie.bufferedRequest=ie.lastBufferedRequest,ie.bufferedRequestCount+=1}else D(W,ie,!1,ce,ee,pe,oe);return ue}function D(W,ie,se,ee,pe,oe,Y){ie.writelen=ee,ie.writecb=Y,ie.writing=!0,ie.sync=!0,ie.destroyed?ie.onwrite(new E("write")):se?W._writev(pe,ie.onwrite):W._write(pe,oe,ie.onwrite),ie.sync=!1}function B(W,ie,se,ee,pe){--ie.pendingcb,se?(process.nextTick(pe,ee),process.nextTick(ge,W,ie),W._writableState.errorEmitted=!0,M(W,ee)):(pe(ee),W._writableState.errorEmitted=!0,M(W,ee),ge(W,ie))}function U(W){W.writing=!1,W.writecb=null,W.length-=W.writelen,W.writelen=0}function V(W,ie){var se=W._writableState,ee=se.sync,pe=se.writecb;if(typeof pe!="function")throw new g;if(U(se),ie)B(W,se,ee,ie,pe);else{var oe=G(se)||W.destroyed;!oe&&!se.corked&&!se.bufferProcessing&&se.bufferedRequest&&H(W,se),ee?process.nextTick(q,W,se,oe,pe):q(W,se,oe,pe)}}function q(W,ie,se,ee){se||z(W,ie),ie.pendingcb--,ee(),ge(W,ie)}function z(W,ie){ie.length===0&&ie.needDrain&&(ie.needDrain=!1,W.emit("drain"))}function H(W,ie){ie.bufferProcessing=!0;var se=ie.bufferedRequest;if(W._writev&&se&&se.next){var ee=ie.bufferedRequestCount,pe=new Array(ee),oe=ie.corkedRequestsFree;oe.entry=se;for(var Y=0,ce=!0;se;)pe[Y]=se,se.isBuf||(ce=!1),se=se.next,Y+=1;pe.allBuffers=ce,D(W,ie,!0,ie.length,pe,"",oe.finish),ie.pendingcb++,ie.lastBufferedRequest=null,oe.next?(ie.corkedRequestsFree=oe.next,oe.next=null):ie.corkedRequestsFree=new v(ie),ie.bufferedRequestCount=0}else{for(;se;){var ue=se.chunk,_e=se.encoding,Le=se.callback,ze=ie.objectMode?1:ue.length;if(D(W,ie,!1,ze,ue,_e,Le),se=se.next,ie.bufferedRequestCount--,ie.writing)break}se===null&&(ie.lastBufferedRequest=null)}ie.bufferedRequest=se,ie.bufferProcessing=!1}y.prototype._write=function(W,ie,se){se(new h("_write()"))},y.prototype._writev=null,y.prototype.end=function(W,ie,se){var ee=this._writableState;return typeof W=="function"?(se=W,W=null,ie=null):typeof ie=="function"&&(se=ie,ie=null),W!=null&&this.write(W,ie),ee.corked&&(ee.corked=1,this.uncork()),ee.ending||de(this,ee,se),this},Object.defineProperty(y.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function G(W){return W.ending&&W.length===0&&W.bufferedRequest===null&&!W.finished&&!W.writing}function J(W,ie){W._final(function(se){ie.pendingcb--,se&&M(W,se),ie.prefinished=!0,W.emit("prefinish"),ge(W,ie)})}function le(W,ie){!ie.prefinished&&!ie.finalCalled&&(typeof W._final=="function"&&!ie.destroyed?(ie.pendingcb++,ie.finalCalled=!0,process.nextTick(J,W,ie)):(ie.prefinished=!0,W.emit("prefinish")))}function ge(W,ie){var se=G(ie);if(se&&(le(W,ie),ie.pendingcb===0&&(ie.finished=!0,W.emit("finish"),ie.autoDestroy))){var ee=W._readableState;(!ee||ee.autoDestroy&&ee.endEmitted)&&W.destroy()}return se}function de(W,ie,se){ie.ending=!0,ge(W,ie),se&&(ie.finished?process.nextTick(se):W.once("finish",se)),ie.ended=!0,W.writable=!1}function me(W,ie,se){var ee=W.entry;for(W.entry=null;ee;){var pe=ee.callback;ie.pendingcb--,pe(se),ee=ee.next}ie.corkedRequestsFree.next=W}Object.defineProperty(y.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(ie){this._writableState&&(this._writableState.destroyed=ie)}}),y.prototype.destroy=i.destroy,y.prototype._undestroy=i.undestroy,y.prototype._destroy=function(W,ie){ie(W)}}}),fm=Ne({"node_modules/stream-browserify/node_modules/readable-stream/lib/_stream_duplex.js"(te,Z){var v=Object.keys||function(s){var o=[];for(var u in s)o.push(u);return o};Z.exports=a;var w=O2(),C=Q0();for(cm()(a,w),P=v(C.prototype),r=0;r<P.length;r++)t=P[r],a.prototype[t]||(a.prototype[t]=C.prototype[t]);var P,t,r;function a(s){if(!(this instanceof a))return new a(s);w.call(this,s),C.call(this,s),this.allowHalfOpen=!0,s&&(s.readable===!1&&(this.readable=!1),s.writable===!1&&(this.writable=!1),s.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",l)))}Object.defineProperty(a.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(a.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(a.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function l(){this._writableState.ended||process.nextTick(i,this)}function i(s){s.end()}Object.defineProperty(a.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(o){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=o,this._writableState.destroyed=o)}})}}),mS=Ne({"node_modules/safe-buffer/index.js"(te,Z){var v=Uy(),w=v.Buffer;function C(t,r){for(var a in t)r[a]=t[a]}w.from&&w.alloc&&w.allocUnsafe&&w.allocUnsafeSlow?Z.exports=v:(C(v,te),te.Buffer=P);function P(t,r,a){return w(t,r,a)}P.prototype=Object.create(w.prototype),C(w,P),P.from=function(t,r,a){if(typeof t=="number")throw new TypeError("Argument must not be a number");return w(t,r,a)},P.alloc=function(t,r,a){if(typeof t!="number")throw new TypeError("Argument must be a number");var l=w(t);return r!==void 0?typeof a=="string"?l.fill(r,a):l.fill(r):l.fill(0),l},P.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return w(t)},P.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return v.SlowBuffer(t)}}}),_p=Ne({"node_modules/stream-browserify/node_modules/string_decoder/lib/string_decoder.js"(te){var Z=mS().Buffer,v=Z.isEncoding||function(E){switch(E=""+E,E&&E.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function w(E){if(!E)return"utf8";for(var c;;)switch(E){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return E;default:if(c)return;E=(""+E).toLowerCase(),c=!0}}function C(E){var c=w(E);if(typeof c!="string"&&(Z.isEncoding===v||!v(E)))throw new Error("Unknown encoding: "+E);return c||E}te.StringDecoder=P;function P(E){this.encoding=C(E);var c;switch(this.encoding){case"utf16le":this.text=o,this.end=u,c=4;break;case"utf8":this.fillLast=l,c=4;break;case"base64":this.text=d,this.end=h,c=3;break;default:this.write=g,this.end=m;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Z.allocUnsafe(c)}P.prototype.write=function(E){if(E.length===0)return"";var c,_;if(this.lastNeed){if(c=this.fillLast(E),c===void 0)return"";_=this.lastNeed,this.lastNeed=0}else _=0;return _<E.length?c?c+this.text(E,_):this.text(E,_):c||""},P.prototype.end=s,P.prototype.text=i,P.prototype.fillLast=function(E){if(this.lastNeed<=E.length)return E.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);E.copy(this.lastChar,this.lastTotal-this.lastNeed,0,E.length),this.lastNeed-=E.length};function t(E){return E<=127?0:E>>5===6?2:E>>4===14?3:E>>3===30?4:E>>6===2?-1:-2}function r(E,c,_){var T=c.length-1;if(T<_)return 0;var M=t(c[T]);return M>=0?(M>0&&(E.lastNeed=M-1),M):--T<_||M===-2?0:(M=t(c[T]),M>=0?(M>0&&(E.lastNeed=M-2),M):--T<_||M===-2?0:(M=t(c[T]),M>=0?(M>0&&(M===2?M=0:E.lastNeed=M-3),M):0))}function a(E,c,_){if((c[0]&192)!==128)return E.lastNeed=0,"�";if(E.lastNeed>1&&c.length>1){if((c[1]&192)!==128)return E.lastNeed=1,"�";if(E.lastNeed>2&&c.length>2&&(c[2]&192)!==128)return E.lastNeed=2,"�"}}function l(E){var c=this.lastTotal-this.lastNeed,_=a(this,E);if(_!==void 0)return _;if(this.lastNeed<=E.length)return E.copy(this.lastChar,c,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);E.copy(this.lastChar,c,0,E.length),this.lastNeed-=E.length}function i(E,c){var _=r(this,E,c);if(!this.lastNeed)return E.toString("utf8",c);this.lastTotal=_;var T=E.length-(_-this.lastNeed);return E.copy(this.lastChar,0,T),E.toString("utf8",c,T)}function s(E){var c=E&&E.length?this.write(E):"";return this.lastNeed?c+"�":c}function o(E,c){if((E.length-c)%2===0){var _=E.toString("utf16le",c);if(_){var T=_.charCodeAt(_.length-1);if(T>=55296&&T<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=E[E.length-2],this.lastChar[1]=E[E.length-1],_.slice(0,-1)}return _}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=E[E.length-1],E.toString("utf16le",c,E.length-1)}function u(E){var c=E&&E.length?this.write(E):"";if(this.lastNeed){var _=this.lastTotal-this.lastNeed;return c+this.lastChar.toString("utf16le",0,_)}return c}function d(E,c){var _=(E.length-c)%3;return _===0?E.toString("base64",c):(this.lastNeed=3-_,this.lastTotal=3,_===1?this.lastChar[0]=E[E.length-1]:(this.lastChar[0]=E[E.length-2],this.lastChar[1]=E[E.length-1]),E.toString("base64",c,E.length-_))}function h(E){var c=E&&E.length?this.write(E):"";return this.lastNeed?c+this.lastChar.toString("base64",0,3-this.lastNeed):c}function g(E){return E.toString(this.encoding)}function m(E){return E&&E.length?this.write(E):""}}}),Vg=Ne({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/end-of-stream.js"(te,Z){var v=qg().codes.ERR_STREAM_PREMATURE_CLOSE;function w(r){var a=!1;return function(){if(!a){a=!0;for(var l=arguments.length,i=new Array(l),s=0;s<l;s++)i[s]=arguments[s];r.apply(this,i)}}}function C(){}function P(r){return r.setHeader&&typeof r.abort=="function"}function t(r,a,l){if(typeof a=="function")return t(r,null,a);a||(a={}),l=w(l||C);var i=a.readable||a.readable!==!1&&r.readable,s=a.writable||a.writable!==!1&&r.writable,o=function(){r.writable||d()},u=r._writableState&&r._writableState.finished,d=function(){s=!1,u=!0,i||l.call(r)},h=r._readableState&&r._readableState.endEmitted,g=function(){i=!1,h=!0,s||l.call(r)},m=function(T){l.call(r,T)},E=function(){var T;if(i&&!h)return(!r._readableState||!r._readableState.ended)&&(T=new v),l.call(r,T);if(s&&!u)return(!r._writableState||!r._writableState.ended)&&(T=new v),l.call(r,T)},c=function(){r.req.on("finish",d)};return P(r)?(r.on("complete",d),r.on("abort",E),r.req?c():r.on("request",c)):s&&!r._writableState&&(r.on("end",o),r.on("close",o)),r.on("end",g),r.on("finish",d),a.error!==!1&&r.on("error",m),r.on("close",E),function(){r.removeListener("complete",d),r.removeListener("abort",E),r.removeListener("request",c),r.req&&r.req.removeListener("finish",d),r.removeListener("end",o),r.removeListener("close",o),r.removeListener("finish",d),r.removeListener("end",g),r.removeListener("error",m),r.removeListener("close",E)}}Z.exports=t}}),nb=Ne({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/async_iterator.js"(te,Z){var v;function w(c,_,T){return _ in c?Object.defineProperty(c,_,{value:T,enumerable:!0,configurable:!0,writable:!0}):c[_]=T,c}var C=Vg(),P=Symbol("lastResolve"),t=Symbol("lastReject"),r=Symbol("error"),a=Symbol("ended"),l=Symbol("lastPromise"),i=Symbol("handlePromise"),s=Symbol("stream");function o(c,_){return{value:c,done:_}}function u(c){var _=c[P];if(_!==null){var T=c[s].read();T!==null&&(c[l]=null,c[P]=null,c[t]=null,_(o(T,!1)))}}function d(c){process.nextTick(u,c)}function h(c,_){return function(T,M){c.then(function(){if(_[a]){T(o(void 0,!0));return}_[i](T,M)},M)}}var g=Object.getPrototypeOf(function(){}),m=Object.setPrototypeOf((v={get stream(){return this[s]},next:function(){var _=this,T=this[r];if(T!==null)return Promise.reject(T);if(this[a])return Promise.resolve(o(void 0,!0));if(this[s].destroyed)return new Promise(function(A,y){process.nextTick(function(){_[r]?y(_[r]):A(o(void 0,!0))})});var M=this[l],k;if(M)k=new Promise(h(M,this));else{var b=this[s].read();if(b!==null)return Promise.resolve(o(b,!1));k=new Promise(this[i])}return this[l]=k,k}},w(v,Symbol.asyncIterator,function(){return this}),w(v,"return",function(){var _=this;return new Promise(function(T,M){_[s].destroy(null,function(k){if(k){M(k);return}T(o(void 0,!0))})})}),v),g),E=function(_){var T,M=Object.create(m,(T={},w(T,s,{value:_,writable:!0}),w(T,P,{value:null,writable:!0}),w(T,t,{value:null,writable:!0}),w(T,r,{value:null,writable:!0}),w(T,a,{value:_._readableState.endEmitted,writable:!0}),w(T,i,{value:function(b,A){var y=M[s].read();y?(M[l]=null,M[P]=null,M[t]=null,b(o(y,!1))):(M[P]=b,M[t]=A)},writable:!0}),T));return M[l]=null,C(_,function(k){if(k&&k.code!=="ERR_STREAM_PREMATURE_CLOSE"){var b=M[t];b!==null&&(M[l]=null,M[P]=null,M[t]=null,b(k)),M[r]=k;return}var A=M[P];A!==null&&(M[l]=null,M[P]=null,M[t]=null,A(o(void 0,!0))),M[a]=!0}),_.on("readable",d.bind(null,M)),M};Z.exports=E}}),xp=Ne({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/from-browser.js"(te,Z){Z.exports=function(){throw new Error("Readable.from is not available in the browser")}}}),O2=Ne({"node_modules/stream-browserify/node_modules/readable-stream/lib/_stream_readable.js"(te,Z){Z.exports=f;var v;f.ReadableState=y,B0().EventEmitter;var w=function(Y,ce){return Y.listeners(ce).length},C=Fm(),P=Uy().Buffer,t=window.Uint8Array||function(){};function r(oe){return P.from(oe)}function a(oe){return P.isBuffer(oe)||oe instanceof t}var l=yp(),i;l&&l.debuglog?i=l.debuglog("stream"):i=function(){};var s=Ug(),o=Vy(),u=h0(),d=u.getHighWaterMark,h=qg().codes,g=h.ERR_INVALID_ARG_TYPE,m=h.ERR_STREAM_PUSH_AFTER_EOF,E=h.ERR_METHOD_NOT_IMPLEMENTED,c=h.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,_,T,M;cm()(f,C);var k=o.errorOrDestroy,b=["error","close","destroy","pause","resume"];function A(oe,Y,ce){if(typeof oe.prependListener=="function")return oe.prependListener(Y,ce);!oe._events||!oe._events[Y]?oe.on(Y,ce):Array.isArray(oe._events[Y])?oe._events[Y].unshift(ce):oe._events[Y]=[ce,oe._events[Y]]}function y(oe,Y,ce){v=v||fm(),oe=oe||{},typeof ce!="boolean"&&(ce=Y instanceof v),this.objectMode=!!oe.objectMode,ce&&(this.objectMode=this.objectMode||!!oe.readableObjectMode),this.highWaterMark=d(this,oe,"readableHighWaterMark",ce),this.buffer=new s,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=oe.emitClose!==!1,this.autoDestroy=!!oe.autoDestroy,this.destroyed=!1,this.defaultEncoding=oe.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,oe.encoding&&(_||(_=_p().StringDecoder),this.decoder=new _(oe.encoding),this.encoding=oe.encoding)}function f(oe){if(v=v||fm(),!(this instanceof f))return new f(oe);var Y=this instanceof v;this._readableState=new y(oe,this,Y),this.readable=!0,oe&&(typeof oe.read=="function"&&(this._read=oe.read),typeof oe.destroy=="function"&&(this._destroy=oe.destroy)),C.call(this)}Object.defineProperty(f.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(Y){this._readableState&&(this._readableState.destroyed=Y)}}),f.prototype.destroy=o.destroy,f.prototype._undestroy=o.undestroy,f.prototype._destroy=function(oe,Y){Y(oe)},f.prototype.push=function(oe,Y){var ce=this._readableState,ue;return ce.objectMode?ue=!0:typeof oe=="string"&&(Y=Y||ce.defaultEncoding,Y!==ce.encoding&&(oe=P.from(oe,Y),Y=""),ue=!0),p(this,oe,Y,!1,ue)},f.prototype.unshift=function(oe){return p(this,oe,null,!0,!1)};function p(oe,Y,ce,ue,_e){i("readableAddChunk",Y);var Le=oe._readableState;if(Y===null)Le.reading=!1,V(oe,Le);else{var ze;if(_e||(ze=N(Le,Y)),ze)k(oe,ze);else if(Le.objectMode||Y&&Y.length>0)if(typeof Y!="string"&&!Le.objectMode&&Object.getPrototypeOf(Y)!==P.prototype&&(Y=r(Y)),ue)Le.endEmitted?k(oe,new c):x(oe,Le,Y,!0);else if(Le.ended)k(oe,new m);else{if(Le.destroyed)return!1;Le.reading=!1,Le.decoder&&!ce?(Y=Le.decoder.write(Y),Le.objectMode||Y.length!==0?x(oe,Le,Y,!1):H(oe,Le)):x(oe,Le,Y,!1)}else ue||(Le.reading=!1,H(oe,Le))}return!Le.ended&&(Le.length<Le.highWaterMark||Le.length===0)}function x(oe,Y,ce,ue){Y.flowing&&Y.length===0&&!Y.sync?(Y.awaitDrain=0,oe.emit("data",ce)):(Y.length+=Y.objectMode?1:ce.length,ue?Y.buffer.unshift(ce):Y.buffer.push(ce),Y.needReadable&&q(oe)),H(oe,Y)}function N(oe,Y){var ce;return!a(Y)&&typeof Y!="string"&&Y!==void 0&&!oe.objectMode&&(ce=new g("chunk",["string","Buffer","Uint8Array"],Y)),ce}f.prototype.isPaused=function(){return this._readableState.flowing===!1},f.prototype.setEncoding=function(oe){_||(_=_p().StringDecoder);var Y=new _(oe);this._readableState.decoder=Y,this._readableState.encoding=this._readableState.decoder.encoding;for(var ce=this._readableState.buffer.head,ue="";ce!==null;)ue+=Y.write(ce.data),ce=ce.next;return this._readableState.buffer.clear(),ue!==""&&this._readableState.buffer.push(ue),this._readableState.length=ue.length,this};var D=1073741824;function B(oe){return oe>=D?oe=D:(oe--,oe|=oe>>>1,oe|=oe>>>2,oe|=oe>>>4,oe|=oe>>>8,oe|=oe>>>16,oe++),oe}function U(oe,Y){return oe<=0||Y.length===0&&Y.ended?0:Y.objectMode?1:oe!==oe?Y.flowing&&Y.length?Y.buffer.head.data.length:Y.length:(oe>Y.highWaterMark&&(Y.highWaterMark=B(oe)),oe<=Y.length?oe:Y.ended?Y.length:(Y.needReadable=!0,0))}f.prototype.read=function(oe){i("read",oe),oe=parseInt(oe,10);var Y=this._readableState,ce=oe;if(oe!==0&&(Y.emittedReadable=!1),oe===0&&Y.needReadable&&((Y.highWaterMark!==0?Y.length>=Y.highWaterMark:Y.length>0)||Y.ended))return i("read: emitReadable",Y.length,Y.ended),Y.length===0&&Y.ended?se(this):q(this),null;if(oe=U(oe,Y),oe===0&&Y.ended)return Y.length===0&&se(this),null;var ue=Y.needReadable;i("need readable",ue),(Y.length===0||Y.length-oe<Y.highWaterMark)&&(ue=!0,i("length less than watermark",ue)),Y.ended||Y.reading?(ue=!1,i("reading or ended",ue)):ue&&(i("do read"),Y.reading=!0,Y.sync=!0,Y.length===0&&(Y.needReadable=!0),this._read(Y.highWaterMark),Y.sync=!1,Y.reading||(oe=U(ce,Y)));var _e;return oe>0?_e=ie(oe,Y):_e=null,_e===null?(Y.needReadable=Y.length<=Y.highWaterMark,oe=0):(Y.length-=oe,Y.awaitDrain=0),Y.length===0&&(Y.ended||(Y.needReadable=!0),ce!==oe&&Y.ended&&se(this)),_e!==null&&this.emit("data",_e),_e};function V(oe,Y){if(i("onEofChunk"),!Y.ended){if(Y.decoder){var ce=Y.decoder.end();ce&&ce.length&&(Y.buffer.push(ce),Y.length+=Y.objectMode?1:ce.length)}Y.ended=!0,Y.sync?q(oe):(Y.needReadable=!1,Y.emittedReadable||(Y.emittedReadable=!0,z(oe)))}}function q(oe){var Y=oe._readableState;i("emitReadable",Y.needReadable,Y.emittedReadable),Y.needReadable=!1,Y.emittedReadable||(i("emitReadable",Y.flowing),Y.emittedReadable=!0,process.nextTick(z,oe))}function z(oe){var Y=oe._readableState;i("emitReadable_",Y.destroyed,Y.length,Y.ended),!Y.destroyed&&(Y.length||Y.ended)&&(oe.emit("readable"),Y.emittedReadable=!1),Y.needReadable=!Y.flowing&&!Y.ended&&Y.length<=Y.highWaterMark,W(oe)}function H(oe,Y){Y.readingMore||(Y.readingMore=!0,process.nextTick(G,oe,Y))}function G(oe,Y){for(;!Y.reading&&!Y.ended&&(Y.length<Y.highWaterMark||Y.flowing&&Y.length===0);){var ce=Y.length;if(i("maybeReadMore read 0"),oe.read(0),ce===Y.length)break}Y.readingMore=!1}f.prototype._read=function(oe){k(this,new E("_read()"))},f.prototype.pipe=function(oe,Y){var ce=this,ue=this._readableState;switch(ue.pipesCount){case 0:ue.pipes=oe;break;case 1:ue.pipes=[ue.pipes,oe];break;default:ue.pipes.push(oe);break}ue.pipesCount+=1,i("pipe count=%d opts=%j",ue.pipesCount,Y);var _e=(!Y||Y.end!==!1)&&oe!==process.stdout&&oe!==process.stderr,Le=_e?Xe:Pe;ue.endEmitted?process.nextTick(Le):ce.once("end",Le),oe.on("unpipe",ze);function ze(be,Ye){i("onunpipe"),be===ce&&Ye&&Ye.hasUnpiped===!1&&(Ye.hasUnpiped=!0,mt())}function Xe(){i("onend"),oe.end()}var Ve=J(ce);oe.on("drain",Ve);var rt=!1;function mt(){i("cleanup"),oe.removeListener("close",ut),oe.removeListener("finish",Fe),oe.removeListener("drain",Ve),oe.removeListener("error",vt),oe.removeListener("unpipe",ze),ce.removeListener("end",Xe),ce.removeListener("end",Pe),ce.removeListener("data",_t),rt=!0,ue.awaitDrain&&(!oe._writableState||oe._writableState.needDrain)&&Ve()}ce.on("data",_t);function _t(be){i("ondata");var Ye=oe.write(be);i("dest.write",Ye),Ye===!1&&((ue.pipesCount===1&&ue.pipes===oe||ue.pipesCount>1&&pe(ue.pipes,oe)!==-1)&&!rt&&(i("false write response, pause",ue.awaitDrain),ue.awaitDrain++),ce.pause())}function vt(be){i("onerror",be),Pe(),oe.removeListener("error",vt),w(oe,"error")===0&&k(oe,be)}A(oe,"error",vt);function ut(){oe.removeListener("finish",Fe),Pe()}oe.once("close",ut);function Fe(){i("onfinish"),oe.removeListener("close",ut),Pe()}oe.once("finish",Fe);function Pe(){i("unpipe"),ce.unpipe(oe)}return oe.emit("pipe",ce),ue.flowing||(i("pipe resume"),ce.resume()),oe};function J(oe){return function(){var ce=oe._readableState;i("pipeOnDrain",ce.awaitDrain),ce.awaitDrain&&ce.awaitDrain--,ce.awaitDrain===0&&w(oe,"data")&&(ce.flowing=!0,W(oe))}}f.prototype.unpipe=function(oe){var Y=this._readableState,ce={hasUnpiped:!1};if(Y.pipesCount===0)return this;if(Y.pipesCount===1)return oe&&oe!==Y.pipes?this:(oe||(oe=Y.pipes),Y.pipes=null,Y.pipesCount=0,Y.flowing=!1,oe&&oe.emit("unpipe",this,ce),this);if(!oe){var ue=Y.pipes,_e=Y.pipesCount;Y.pipes=null,Y.pipesCount=0,Y.flowing=!1;for(var Le=0;Le<_e;Le++)ue[Le].emit("unpipe",this,{hasUnpiped:!1});return this}var ze=pe(Y.pipes,oe);return ze===-1?this:(Y.pipes.splice(ze,1),Y.pipesCount-=1,Y.pipesCount===1&&(Y.pipes=Y.pipes[0]),oe.emit("unpipe",this,ce),this)},f.prototype.on=function(oe,Y){var ce=C.prototype.on.call(this,oe,Y),ue=this._readableState;return oe==="data"?(ue.readableListening=this.listenerCount("readable")>0,ue.flowing!==!1&&this.resume()):oe==="readable"&&!ue.endEmitted&&!ue.readableListening&&(ue.readableListening=ue.needReadable=!0,ue.flowing=!1,ue.emittedReadable=!1,i("on readable",ue.length,ue.reading),ue.length?q(this):ue.reading||process.nextTick(ge,this)),ce},f.prototype.addListener=f.prototype.on,f.prototype.removeListener=function(oe,Y){var ce=C.prototype.removeListener.call(this,oe,Y);return oe==="readable"&&process.nextTick(le,this),ce},f.prototype.removeAllListeners=function(oe){var Y=C.prototype.removeAllListeners.apply(this,arguments);return(oe==="readable"||oe===void 0)&&process.nextTick(le,this),Y};function le(oe){var Y=oe._readableState;Y.readableListening=oe.listenerCount("readable")>0,Y.resumeScheduled&&!Y.paused?Y.flowing=!0:oe.listenerCount("data")>0&&oe.resume()}function ge(oe){i("readable nexttick read 0"),oe.read(0)}f.prototype.resume=function(){var oe=this._readableState;return oe.flowing||(i("resume"),oe.flowing=!oe.readableListening,de(this,oe)),oe.paused=!1,this};function de(oe,Y){Y.resumeScheduled||(Y.resumeScheduled=!0,process.nextTick(me,oe,Y))}function me(oe,Y){i("resume",Y.reading),Y.reading||oe.read(0),Y.resumeScheduled=!1,oe.emit("resume"),W(oe),Y.flowing&&!Y.reading&&oe.read(0)}f.prototype.pause=function(){return i("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(i("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function W(oe){var Y=oe._readableState;for(i("flow",Y.flowing);Y.flowing&&oe.read()!==null;);}f.prototype.wrap=function(oe){var Y=this,ce=this._readableState,ue=!1;oe.on("end",function(){if(i("wrapped end"),ce.decoder&&!ce.ended){var ze=ce.decoder.end();ze&&ze.length&&Y.push(ze)}Y.push(null)}),oe.on("data",function(ze){if(i("wrapped data"),ce.decoder&&(ze=ce.decoder.write(ze)),!(ce.objectMode&&ze==null)&&!(!ce.objectMode&&(!ze||!ze.length))){var Xe=Y.push(ze);Xe||(ue=!0,oe.pause())}});for(var _e in oe)this[_e]===void 0&&typeof oe[_e]=="function"&&(this[_e]=(function(Xe){return function(){return oe[Xe].apply(oe,arguments)}})(_e));for(var Le=0;Le<b.length;Le++)oe.on(b[Le],this.emit.bind(this,b[Le]));return this._read=function(ze){i("wrapped _read",ze),ue&&(ue=!1,oe.resume())},this},typeof Symbol=="function"&&(f.prototype[Symbol.asyncIterator]=function(){return T===void 0&&(T=nb()),T(this)}),Object.defineProperty(f.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(f.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(f.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(Y){this._readableState&&(this._readableState.flowing=Y)}}),f._fromList=ie,Object.defineProperty(f.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function ie(oe,Y){if(Y.length===0)return null;var ce;return Y.objectMode?ce=Y.buffer.shift():!oe||oe>=Y.length?(Y.decoder?ce=Y.buffer.join(""):Y.buffer.length===1?ce=Y.buffer.first():ce=Y.buffer.concat(Y.length),Y.buffer.clear()):ce=Y.buffer.consume(oe,Y.decoder),ce}function se(oe){var Y=oe._readableState;i("endReadable",Y.endEmitted),Y.endEmitted||(Y.ended=!0,process.nextTick(ee,Y,oe))}function ee(oe,Y){if(i("endReadableNT",oe.endEmitted,oe.length),!oe.endEmitted&&oe.length===0&&(oe.endEmitted=!0,Y.readable=!1,Y.emit("end"),oe.autoDestroy)){var ce=Y._writableState;(!ce||ce.autoDestroy&&ce.finished)&&Y.destroy()}}typeof Symbol=="function"&&(f.from=function(oe,Y){return M===void 0&&(M=xp()),M(f,oe,Y)});function pe(oe,Y){for(var ce=0,ue=oe.length;ce<ue;ce++)if(oe[ce]===Y)return ce;return-1}}}),ab=Ne({"node_modules/stream-browserify/node_modules/readable-stream/lib/_stream_transform.js"(te,Z){Z.exports=l;var v=qg().codes,w=v.ERR_METHOD_NOT_IMPLEMENTED,C=v.ERR_MULTIPLE_CALLBACK,P=v.ERR_TRANSFORM_ALREADY_TRANSFORMING,t=v.ERR_TRANSFORM_WITH_LENGTH_0,r=fm();cm()(l,r);function a(o,u){var d=this._transformState;d.transforming=!1;var h=d.writecb;if(h===null)return this.emit("error",new C);d.writechunk=null,d.writecb=null,u!=null&&this.push(u),h(o);var g=this._readableState;g.reading=!1,(g.needReadable||g.length<g.highWaterMark)&&this._read(g.highWaterMark)}function l(o){if(!(this instanceof l))return new l(o);r.call(this,o),this._transformState={afterTransform:a.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,o&&(typeof o.transform=="function"&&(this._transform=o.transform),typeof o.flush=="function"&&(this._flush=o.flush)),this.on("prefinish",i)}function i(){var o=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(u,d){s(o,u,d)}):s(this,null,null)}l.prototype.push=function(o,u){return this._transformState.needTransform=!1,r.prototype.push.call(this,o,u)},l.prototype._transform=function(o,u,d){d(new w("_transform()"))},l.prototype._write=function(o,u,d){var h=this._transformState;if(h.writecb=d,h.writechunk=o,h.writeencoding=u,!h.transforming){var g=this._readableState;(h.needTransform||g.needReadable||g.length<g.highWaterMark)&&this._read(g.highWaterMark)}},l.prototype._read=function(o){var u=this._transformState;u.writechunk!==null&&!u.transforming?(u.transforming=!0,this._transform(u.writechunk,u.writeencoding,u.afterTransform)):u.needTransform=!0},l.prototype._destroy=function(o,u){r.prototype._destroy.call(this,o,function(d){u(d)})};function s(o,u,d){if(u)return o.emit("error",u);if(d!=null&&o.push(d),o._writableState.length)throw new t;if(o._transformState.transforming)throw new P;return o.push(null)}}}),CC=Ne({"node_modules/stream-browserify/node_modules/readable-stream/lib/_stream_passthrough.js"(te,Z){Z.exports=w;var v=ab();cm()(w,v);function w(C){if(!(this instanceof w))return new w(C);v.call(this,C)}w.prototype._transform=function(C,P,t){t(null,C)}}}),z2=Ne({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/pipeline.js"(te,Z){var v;function w(d){var h=!1;return function(){h||(h=!0,d.apply(void 0,arguments))}}var C=qg().codes,P=C.ERR_MISSING_ARGS,t=C.ERR_STREAM_DESTROYED;function r(d){if(d)throw d}function a(d){return d.setHeader&&typeof d.abort=="function"}function l(d,h,g,m){m=w(m);var E=!1;d.on("close",function(){E=!0}),v===void 0&&(v=Vg()),v(d,{readable:h,writable:g},function(_){if(_)return m(_);E=!0,m()});var c=!1;return function(_){if(!E&&!c){if(c=!0,a(d))return d.abort();if(typeof d.destroy=="function")return d.destroy();m(_||new t("pipe"))}}}function i(d){d()}function s(d,h){return d.pipe(h)}function o(d){return!d.length||typeof d[d.length-1]!="function"?r:d.pop()}function u(){for(var d=arguments.length,h=new Array(d),g=0;g<d;g++)h[g]=arguments[g];var m=o(h);if(Array.isArray(h[0])&&(h=h[0]),h.length<2)throw new P("streams");var E,c=h.map(function(_,T){var M=T<h.length-1,k=T>0;return l(_,M,k,function(b){E||(E=b),b&&c.forEach(i),!M&&(c.forEach(i),m(E))})});return h.reduce(s)}Z.exports=u}}),N2=Ne({"node_modules/stream-browserify/index.js"(te,Z){Z.exports=C;var v=B0().EventEmitter,w=cm();w(C,v),C.Readable=O2(),C.Writable=Q0(),C.Duplex=fm(),C.Transform=ab(),C.PassThrough=CC(),C.finished=Vg(),C.pipeline=z2(),C.Stream=C;function C(){v.call(this)}C.prototype.pipe=function(P,t){var r=this;function a(h){P.writable&&P.write(h)===!1&&r.pause&&r.pause()}r.on("data",a);function l(){r.readable&&r.resume&&r.resume()}P.on("drain",l),!P._isStdio&&(!t||t.end!==!1)&&(r.on("end",s),r.on("close",o));var i=!1;function s(){i||(i=!0,P.end())}function o(){i||(i=!0,typeof P.destroy=="function"&&P.destroy())}function u(h){if(d(),v.listenerCount(this,"error")===0)throw h}r.on("error",u),P.on("error",u);function d(){r.removeListener("data",a),P.removeListener("drain",l),r.removeListener("end",s),r.removeListener("close",o),r.removeListener("error",u),P.removeListener("error",u),r.removeListener("end",d),r.removeListener("close",d),P.removeListener("close",d)}return r.on("end",d),r.on("close",d),P.on("close",d),P.emit("pipe",r),P}}}),hm=Ne({"node_modules/util/util.js"(te){var Z=Object.getOwnPropertyDescriptors||function(J){for(var le=Object.keys(J),ge={},de=0;de<le.length;de++)ge[le[de]]=Object.getOwnPropertyDescriptor(J,le[de]);return ge},v=/%[sdj%]/g;te.format=function(G){if(!T(G)){for(var J=[],le=0;le<arguments.length;le++)J.push(t(arguments[le]));return J.join(" ")}for(var le=1,ge=arguments,de=ge.length,me=String(G).replace(v,function(ie){if(ie==="%%")return"%";if(le>=de)return ie;switch(ie){case"%s":return String(ge[le++]);case"%d":return Number(ge[le++]);case"%j":try{return JSON.stringify(ge[le++])}catch{return"[Circular]"}default:return ie}}),W=ge[le];le<de;W=ge[++le])E(W)||!A(W)?me+=" "+W:me+=" "+t(W);return me},te.deprecate=function(G,J){if(typeof process<"u"&&process.noDeprecation===!0)return G;if(typeof process>"u")return function(){return te.deprecate(G,J).apply(this,arguments)};var le=!1;function ge(){if(!le){if(process.throwDeprecation)throw new Error(J);process.traceDeprecation?console.trace(J):console.error(J),le=!0}return G.apply(this,arguments)}return ge};var w={},C=/^$/;P="false",P=P.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),C=new RegExp("^"+P+"$","i");var P;te.debuglog=function(G){if(G=G.toUpperCase(),!w[G])if(C.test(G)){var J=process.pid;w[G]=function(){var le=te.format.apply(te,arguments);console.error("%s %d: %s",G,J,le)}}else w[G]=function(){};return w[G]};function t(G,J){var le={seen:[],stylize:a};return arguments.length>=3&&(le.depth=arguments[2]),arguments.length>=4&&(le.colors=arguments[3]),m(J)?le.showHidden=J:J&&te._extend(le,J),k(le.showHidden)&&(le.showHidden=!1),k(le.depth)&&(le.depth=2),k(le.colors)&&(le.colors=!1),k(le.customInspect)&&(le.customInspect=!0),le.colors&&(le.stylize=r),i(le,G,le.depth)}te.inspect=t,t.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]},t.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function r(G,J){var le=t.styles[J];return le?"\x1B["+t.colors[le][0]+"m"+G+"\x1B["+t.colors[le][1]+"m":G}function a(G,J){return G}function l(G){var J={};return G.forEach(function(le,ge){J[le]=!0}),J}function i(G,J,le){if(G.customInspect&&J&&p(J.inspect)&&J.inspect!==te.inspect&&!(J.constructor&&J.constructor.prototype===J)){var ge=J.inspect(le,G);return T(ge)||(ge=i(G,ge,le)),ge}var de=s(G,J);if(de)return de;var me=Object.keys(J),W=l(me);if(G.showHidden&&(me=Object.getOwnPropertyNames(J)),f(J)&&(me.indexOf("message")>=0||me.indexOf("description")>=0))return o(J);if(me.length===0){if(p(J)){var ie=J.name?": "+J.name:"";return G.stylize("[Function"+ie+"]","special")}if(b(J))return G.stylize(RegExp.prototype.toString.call(J),"regexp");if(y(J))return G.stylize(Date.prototype.toString.call(J),"date");if(f(J))return o(J)}var se="",ee=!1,pe=["{","}"];if(g(J)&&(ee=!0,pe=["[","]"]),p(J)){var oe=J.name?": "+J.name:"";se=" [Function"+oe+"]"}if(b(J)&&(se=" "+RegExp.prototype.toString.call(J)),y(J)&&(se=" "+Date.prototype.toUTCString.call(J)),f(J)&&(se=" "+o(J)),me.length===0&&(!ee||J.length==0))return pe[0]+se+pe[1];if(le<0)return b(J)?G.stylize(RegExp.prototype.toString.call(J),"regexp"):G.stylize("[Object]","special");G.seen.push(J);var Y;return ee?Y=u(G,J,le,W,me):Y=me.map(function(ce){return d(G,J,le,W,ce,ee)}),G.seen.pop(),h(Y,se,pe)}function s(G,J){if(k(J))return G.stylize("undefined","undefined");if(T(J)){var le="'"+JSON.stringify(J).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return G.stylize(le,"string")}if(_(J))return G.stylize(""+J,"number");if(m(J))return G.stylize(""+J,"boolean");if(E(J))return G.stylize("null","null")}function o(G){return"["+Error.prototype.toString.call(G)+"]"}function u(G,J,le,ge,de){for(var me=[],W=0,ie=J.length;W<ie;++W)V(J,String(W))?me.push(d(G,J,le,ge,String(W),!0)):me.push("");return de.forEach(function(se){se.match(/^\d+$/)||me.push(d(G,J,le,ge,se,!0))}),me}function d(G,J,le,ge,de,me){var W,ie,se;if(se=Object.getOwnPropertyDescriptor(J,de)||{value:J[de]},se.get?se.set?ie=G.stylize("[Getter/Setter]","special"):ie=G.stylize("[Getter]","special"):se.set&&(ie=G.stylize("[Setter]","special")),V(ge,de)||(W="["+de+"]"),ie||(G.seen.indexOf(se.value)<0?(E(le)?ie=i(G,se.value,null):ie=i(G,se.value,le-1),ie.indexOf(`
`)>-1&&(me?ie=ie.split(`
`).map(function(ee){return"  "+ee}).join(`
`).slice(2):ie=`
`+ie.split(`
`).map(function(ee){return"   "+ee}).join(`
`))):ie=G.stylize("[Circular]","special")),k(W)){if(me&&de.match(/^\d+$/))return ie;W=JSON.stringify(""+de),W.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(W=W.slice(1,-1),W=G.stylize(W,"name")):(W=W.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),W=G.stylize(W,"string"))}return W+": "+ie}function h(G,J,le){var ge=G.reduce(function(de,me){return me.indexOf(`
`)>=0,de+me.replace(/\u001b\[\d\d?m/g,"").length+1},0);return ge>60?le[0]+(J===""?"":J+`
 `)+" "+G.join(`,
  `)+" "+le[1]:le[0]+J+" "+G.join(", ")+" "+le[1]}te.types=vc();function g(G){return Array.isArray(G)}te.isArray=g;function m(G){return typeof G=="boolean"}te.isBoolean=m;function E(G){return G===null}te.isNull=E;function c(G){return G==null}te.isNullOrUndefined=c;function _(G){return typeof G=="number"}te.isNumber=_;function T(G){return typeof G=="string"}te.isString=T;function M(G){return typeof G=="symbol"}te.isSymbol=M;function k(G){return G===void 0}te.isUndefined=k;function b(G){return A(G)&&N(G)==="[object RegExp]"}te.isRegExp=b,te.types.isRegExp=b;function A(G){return typeof G=="object"&&G!==null}te.isObject=A;function y(G){return A(G)&&N(G)==="[object Date]"}te.isDate=y,te.types.isDate=y;function f(G){return A(G)&&(N(G)==="[object Error]"||G instanceof Error)}te.isError=f,te.types.isNativeError=f;function p(G){return typeof G=="function"}te.isFunction=p;function x(G){return G===null||typeof G=="boolean"||typeof G=="number"||typeof G=="string"||typeof G=="symbol"||typeof G>"u"}te.isPrimitive=x,te.isBuffer=hf();function N(G){return Object.prototype.toString.call(G)}function D(G){return G<10?"0"+G.toString(10):G.toString(10)}var B=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function U(){var G=new Date,J=[D(G.getHours()),D(G.getMinutes()),D(G.getSeconds())].join(":");return[G.getDate(),B[G.getMonth()],J].join(" ")}te.log=function(){console.log("%s - %s",U(),te.format.apply(te,arguments))},te.inherits=cm(),te._extend=function(G,J){if(!J||!A(J))return G;for(var le=Object.keys(J),ge=le.length;ge--;)G[le[ge]]=J[le[ge]];return G};function V(G,J){return Object.prototype.hasOwnProperty.call(G,J)}var q=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;te.promisify=function(J){if(typeof J!="function")throw new TypeError('The "original" argument must be of type Function');if(q&&J[q]){var le=J[q];if(typeof le!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(le,q,{value:le,enumerable:!1,writable:!1,configurable:!0}),le}function le(){for(var ge,de,me=new Promise(function(se,ee){ge=se,de=ee}),W=[],ie=0;ie<arguments.length;ie++)W.push(arguments[ie]);W.push(function(se,ee){se?de(se):ge(ee)});try{J.apply(this,W)}catch(se){de(se)}return me}return Object.setPrototypeOf(le,Object.getPrototypeOf(J)),q&&Object.defineProperty(le,q,{value:le,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(le,Z(J))},te.promisify.custom=q;function z(G,J){if(!G){var le=new Error("Promise was rejected with a falsy value");le.reason=G,G=le}return J(G)}function H(G){if(typeof G!="function")throw new TypeError('The "original" argument must be of type Function');function J(){for(var le=[],ge=0;ge<arguments.length;ge++)le.push(arguments[ge]);var de=le.pop();if(typeof de!="function")throw new TypeError("The last argument must be of type Function");var me=this,W=function(){return de.apply(me,arguments)};G.apply(this,le).then(function(ie){process.nextTick(W.bind(null,null,ie))},function(ie){process.nextTick(z.bind(null,ie,W))})}return Object.setPrototypeOf(J,Object.getPrototypeOf(G)),Object.defineProperties(J,Z(G)),J}te.callbackify=H}}),kd=Ne({"node_modules/assert/build/internal/errors.js"(te,Z){function v(_){"@babel/helpers - typeof";return v=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(T){return typeof T}:function(T){return T&&typeof Symbol=="function"&&T.constructor===Symbol&&T!==Symbol.prototype?"symbol":typeof T},v(_)}function w(_,T,M){return Object.defineProperty(_,"prototype",{writable:!1}),_}function C(_,T){if(!(_ instanceof T))throw new TypeError("Cannot call a class as a function")}function P(_,T){if(typeof T!="function"&&T!==null)throw new TypeError("Super expression must either be null or a function");_.prototype=Object.create(T&&T.prototype,{constructor:{value:_,writable:!0,configurable:!0}}),Object.defineProperty(_,"prototype",{writable:!1}),T&&t(_,T)}function t(_,T){return t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(k,b){return k.__proto__=b,k},t(_,T)}function r(_){var T=i();return function(){var k=s(_),b;if(T){var A=s(this).constructor;b=Reflect.construct(k,arguments,A)}else b=k.apply(this,arguments);return a(this,b)}}function a(_,T){if(T&&(v(T)==="object"||typeof T=="function"))return T;if(T!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return l(_)}function l(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}function i(){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 s(_){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(M){return M.__proto__||Object.getPrototypeOf(M)},s(_)}var o={},u,d;function h(_,T,M){M||(M=Error);function k(A,y,f){return typeof T=="string"?T:T(A,y,f)}var b=(function(A){P(f,A);var y=r(f);function f(p,x,N){var D;return C(this,f),D=y.call(this,k(p,x,N)),D.code=_,D}return w(f)})(M);o[_]=b}function g(_,T){if(Array.isArray(_)){var M=_.length;return _=_.map(function(k){return String(k)}),M>2?"one of ".concat(T," ").concat(_.slice(0,M-1).join(", "),", or ")+_[M-1]:M===2?"one of ".concat(T," ").concat(_[0]," or ").concat(_[1]):"of ".concat(T," ").concat(_[0])}else return"of ".concat(T," ").concat(String(_))}function m(_,T,M){return _.substr(0,T.length)===T}function E(_,T,M){return(M===void 0||M>_.length)&&(M=_.length),_.substring(M-T.length,M)===T}function c(_,T,M){return typeof M!="number"&&(M=0),M+T.length>_.length?!1:_.indexOf(T,M)!==-1}h("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),h("ERR_INVALID_ARG_TYPE",function(_,T,M){u===void 0&&(u=c_()),u(typeof _=="string","'name' must be a string");var k;typeof T=="string"&&m(T,"not ")?(k="must not be",T=T.replace(/^not /,"")):k="must be";var b;if(E(_," argument"))b="The ".concat(_," ").concat(k," ").concat(g(T,"type"));else{var A=c(_,".")?"property":"argument";b='The "'.concat(_,'" ').concat(A," ").concat(k," ").concat(g(T,"type"))}return b+=". Received type ".concat(v(M)),b},TypeError),h("ERR_INVALID_ARG_VALUE",function(_,T){var M=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";d===void 0&&(d=hm());var k=d.inspect(T);return k.length>128&&(k="".concat(k.slice(0,128),"...")),"The argument '".concat(_,"' ").concat(M,". Received ").concat(k)},TypeError),h("ERR_INVALID_RETURN_VALUE",function(_,T,M){var k;return M&&M.constructor&&M.constructor.name?k="instance of ".concat(M.constructor.name):k="type ".concat(v(M)),"Expected ".concat(_,' to be returned from the "').concat(T,'"')+" function but got ".concat(k,".")},TypeError),h("ERR_MISSING_ARGS",function(){for(var _=arguments.length,T=new Array(_),M=0;M<_;M++)T[M]=arguments[M];u===void 0&&(u=c_()),u(T.length>0,"At least one arg needs to be specified");var k="The ",b=T.length;switch(T=T.map(function(A){return'"'.concat(A,'"')}),b){case 1:k+="".concat(T[0]," argument");break;case 2:k+="".concat(T[0]," and ").concat(T[1]," arguments");break;default:k+=T.slice(0,b-1).join(", "),k+=", and ".concat(T[b-1]," arguments");break}return"".concat(k," must be specified")},TypeError),Z.exports.codes=o}}),Hg=Ne({"node_modules/assert/build/internal/assert/assertion_error.js"(te,Z){function v(H,G){var J=Object.keys(H);if(Object.getOwnPropertySymbols){var le=Object.getOwnPropertySymbols(H);G&&(le=le.filter(function(ge){return Object.getOwnPropertyDescriptor(H,ge).enumerable})),J.push.apply(J,le)}return J}function w(H){for(var G=1;G<arguments.length;G++){var J=arguments[G]!=null?arguments[G]:{};G%2?v(Object(J),!0).forEach(function(le){C(H,le,J[le])}):Object.getOwnPropertyDescriptors?Object.defineProperties(H,Object.getOwnPropertyDescriptors(J)):v(Object(J)).forEach(function(le){Object.defineProperty(H,le,Object.getOwnPropertyDescriptor(J,le))})}return H}function C(H,G,J){return G=a(G),G in H?Object.defineProperty(H,G,{value:J,enumerable:!0,configurable:!0,writable:!0}):H[G]=J,H}function P(H,G){if(!(H instanceof G))throw new TypeError("Cannot call a class as a function")}function t(H,G){for(var J=0;J<G.length;J++){var le=G[J];le.enumerable=le.enumerable||!1,le.configurable=!0,"value"in le&&(le.writable=!0),Object.defineProperty(H,a(le.key),le)}}function r(H,G,J){return G&&t(H.prototype,G),Object.defineProperty(H,"prototype",{writable:!1}),H}function a(H){var G=l(H,"string");return _(G)==="symbol"?G:String(G)}function l(H,G){if(_(H)!=="object"||H===null)return H;var J=H[Symbol.toPrimitive];if(J!==void 0){var le=J.call(H,G);if(_(le)!=="object")return le;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(H)}function i(H,G){if(typeof G!="function"&&G!==null)throw new TypeError("Super expression must either be null or a function");H.prototype=Object.create(G&&G.prototype,{constructor:{value:H,writable:!0,configurable:!0}}),Object.defineProperty(H,"prototype",{writable:!1}),G&&E(H,G)}function s(H){var G=g();return function(){var le=c(H),ge;if(G){var de=c(this).constructor;ge=Reflect.construct(le,arguments,de)}else ge=le.apply(this,arguments);return o(this,ge)}}function o(H,G){if(G&&(_(G)==="object"||typeof G=="function"))return G;if(G!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return u(H)}function u(H){if(H===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return H}function d(H){var G=typeof Map=="function"?new Map:void 0;return d=function(le){if(le===null||!m(le))return le;if(typeof le!="function")throw new TypeError("Super expression must either be null or a function");if(typeof G<"u"){if(G.has(le))return G.get(le);G.set(le,ge)}function ge(){return h(le,arguments,c(this).constructor)}return ge.prototype=Object.create(le.prototype,{constructor:{value:ge,enumerable:!1,writable:!0,configurable:!0}}),E(ge,le)},d(H)}function h(H,G,J){return g()?h=Reflect.construct.bind():h=function(ge,de,me){var W=[null];W.push.apply(W,de);var ie=Function.bind.apply(ge,W),se=new ie;return me&&E(se,me.prototype),se},h.apply(null,arguments)}function g(){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 m(H){return Function.toString.call(H).indexOf("[native code]")!==-1}function E(H,G){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(le,ge){return le.__proto__=ge,le},E(H,G)}function c(H){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(J){return J.__proto__||Object.getPrototypeOf(J)},c(H)}function _(H){"@babel/helpers - typeof";return _=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(G){return typeof G}:function(G){return G&&typeof Symbol=="function"&&G.constructor===Symbol&&G!==Symbol.prototype?"symbol":typeof G},_(H)}var T=hm(),M=T.inspect,k=kd(),b=k.codes.ERR_INVALID_ARG_TYPE;function A(H,G,J){return(J===void 0||J>H.length)&&(J=H.length),H.substring(J-G.length,J)===G}function y(H,G){if(G=Math.floor(G),H.length==0||G==0)return"";var J=H.length*G;for(G=Math.floor(Math.log(G)/Math.log(2));G;)H+=H,G--;return H+=H.substring(0,J-H.length),H}var f="",p="",x="",N="",D={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:"},B=10;function U(H){var G=Object.keys(H),J=Object.create(Object.getPrototypeOf(H));return G.forEach(function(le){J[le]=H[le]}),Object.defineProperty(J,"message",{value:H.message}),J}function V(H){return M(H,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function q(H,G,J){var le="",ge="",de=0,me="",W=!1,ie=V(H),se=ie.split(`
`),ee=V(G).split(`
`),pe=0,oe="";if(J==="strictEqual"&&_(H)==="object"&&_(G)==="object"&&H!==null&&G!==null&&(J="strictEqualObject"),se.length===1&&ee.length===1&&se[0]!==ee[0]){var Y=se[0].length+ee[0].length;if(Y<=B){if((_(H)!=="object"||H===null)&&(_(G)!=="object"||G===null)&&(H!==0||G!==0))return"".concat(D[J],`

`)+"".concat(se[0]," !== ").concat(ee[0],`
`)}else if(J!=="strictEqualObject"){var ce=process.stderr&&process.stderr.isTTY?process.stderr.columns:80;if(Y<ce){for(;se[0][pe]===ee[0][pe];)pe++;pe>2&&(oe=`
  `.concat(y(" ",pe),"^"),pe=0)}}}for(var ue=se[se.length-1],_e=ee[ee.length-1];ue===_e&&(pe++<2?me=`
  `.concat(ue).concat(me):le=ue,se.pop(),ee.pop(),!(se.length===0||ee.length===0));)ue=se[se.length-1],_e=ee[ee.length-1];var Le=Math.max(se.length,ee.length);if(Le===0){var ze=ie.split(`
`);if(ze.length>30)for(ze[26]="".concat(f,"...").concat(N);ze.length>27;)ze.pop();return"".concat(D.notIdentical,`

`).concat(ze.join(`
`),`
`)}pe>3&&(me=`
`.concat(f,"...").concat(N).concat(me),W=!0),le!==""&&(me=`
  `.concat(le).concat(me),le="");var Xe=0,Ve=D[J]+`
`.concat(p,"+ actual").concat(N," ").concat(x,"- expected").concat(N),rt=" ".concat(f,"...").concat(N," Lines skipped");for(pe=0;pe<Le;pe++){var mt=pe-de;if(se.length<pe+1)mt>1&&pe>2&&(mt>4?(ge+=`
`.concat(f,"...").concat(N),W=!0):mt>3&&(ge+=`
  `.concat(ee[pe-2]),Xe++),ge+=`
  `.concat(ee[pe-1]),Xe++),de=pe,le+=`
`.concat(x,"-").concat(N," ").concat(ee[pe]),Xe++;else if(ee.length<pe+1)mt>1&&pe>2&&(mt>4?(ge+=`
`.concat(f,"...").concat(N),W=!0):mt>3&&(ge+=`
  `.concat(se[pe-2]),Xe++),ge+=`
  `.concat(se[pe-1]),Xe++),de=pe,ge+=`
`.concat(p,"+").concat(N," ").concat(se[pe]),Xe++;else{var _t=ee[pe],vt=se[pe],ut=vt!==_t&&(!A(vt,",")||vt.slice(0,-1)!==_t);ut&&A(_t,",")&&_t.slice(0,-1)===vt&&(ut=!1,vt+=","),ut?(mt>1&&pe>2&&(mt>4?(ge+=`
`.concat(f,"...").concat(N),W=!0):mt>3&&(ge+=`
  `.concat(se[pe-2]),Xe++),ge+=`
  `.concat(se[pe-1]),Xe++),de=pe,ge+=`
`.concat(p,"+").concat(N," ").concat(vt),le+=`
`.concat(x,"-").concat(N," ").concat(_t),Xe+=2):(ge+=le,le="",(mt===1||pe===0)&&(ge+=`
  `.concat(vt),Xe++))}if(Xe>20&&pe<Le-2)return"".concat(Ve).concat(rt,`
`).concat(ge,`
`).concat(f,"...").concat(N).concat(le,`
`)+"".concat(f,"...").concat(N)}return"".concat(Ve).concat(W?rt:"",`
`).concat(ge).concat(le).concat(me).concat(oe)}var z=(function(H,G){i(le,H);var J=s(le);function le(ge){var de;if(P(this,le),_(ge)!=="object"||ge===null)throw new b("options","Object",ge);var me=ge.message,W=ge.operator,ie=ge.stackStartFn,se=ge.actual,ee=ge.expected,pe=Error.stackTraceLimit;if(Error.stackTraceLimit=0,me!=null)de=J.call(this,String(me));else if(process.stderr&&process.stderr.isTTY&&(process.stderr&&process.stderr.getColorDepth&&process.stderr.getColorDepth()!==1?(f="\x1B[34m",p="\x1B[32m",N="\x1B[39m",x="\x1B[31m"):(f="",p="",N="",x="")),_(se)==="object"&&se!==null&&_(ee)==="object"&&ee!==null&&"stack"in se&&se instanceof Error&&"stack"in ee&&ee instanceof Error&&(se=U(se),ee=U(ee)),W==="deepStrictEqual"||W==="strictEqual")de=J.call(this,q(se,ee,W));else if(W==="notDeepStrictEqual"||W==="notStrictEqual"){var oe=D[W],Y=V(se).split(`
`);if(W==="notStrictEqual"&&_(se)==="object"&&se!==null&&(oe=D.notStrictEqualObject),Y.length>30)for(Y[26]="".concat(f,"...").concat(N);Y.length>27;)Y.pop();Y.length===1?de=J.call(this,"".concat(oe," ").concat(Y[0])):de=J.call(this,"".concat(oe,`

`).concat(Y.join(`
`),`
`))}else{var ce=V(se),ue="",_e=D[W];W==="notDeepEqual"||W==="notEqual"?(ce="".concat(D[W],`

`).concat(ce),ce.length>1024&&(ce="".concat(ce.slice(0,1021),"..."))):(ue="".concat(V(ee)),ce.length>512&&(ce="".concat(ce.slice(0,509),"...")),ue.length>512&&(ue="".concat(ue.slice(0,509),"...")),W==="deepEqual"||W==="equal"?ce="".concat(_e,`

`).concat(ce,`

should equal

`):ue=" ".concat(W," ").concat(ue)),de=J.call(this,"".concat(ce).concat(ue))}return Error.stackTraceLimit=pe,de.generatedMessage=!me,Object.defineProperty(u(de),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),de.code="ERR_ASSERTION",de.actual=se,de.expected=ee,de.operator=W,Error.captureStackTrace&&Error.captureStackTrace(u(de),ie),de.stack,de.name="AssertionError",o(de)}return r(le,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:G,value:function(de,me){return M(this,w(w({},me),{},{customInspect:!1,depth:0}))}}]),le})(d(Error),M.custom);Z.exports=z}}),Hy=Ne({"node_modules/object-keys/isArguments.js"(te,Z){var v=Object.prototype.toString;Z.exports=function(C){var P=v.call(C),t=P==="[object Arguments]";return t||(t=P!=="[object Array]"&&C!==null&&typeof C=="object"&&typeof C.length=="number"&&C.length>=0&&v.call(C.callee)==="[object Function]"),t}}}),eg=Ne({"node_modules/object-keys/implementation.js"(te,Z){var v;Object.keys||(w=Object.prototype.hasOwnProperty,C=Object.prototype.toString,P=Hy(),t=Object.prototype.propertyIsEnumerable,r=!t.call({toString:null},"toString"),a=t.call(function(){},"prototype"),l=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],i=function(d){var h=d.constructor;return h&&h.prototype===d},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},o=(function(){if(typeof window>"u")return!1;for(var d in window)try{if(!s["$"+d]&&w.call(window,d)&&window[d]!==null&&typeof window[d]=="object")try{i(window[d])}catch{return!0}}catch{return!0}return!1})(),u=function(d){if(typeof window>"u"||!o)return i(d);try{return i(d)}catch{return!1}},v=function(h){var g=h!==null&&typeof h=="object",m=C.call(h)==="[object Function]",E=P(h),c=g&&C.call(h)==="[object String]",_=[];if(!g&&!m&&!E)throw new TypeError("Object.keys called on a non-object");var T=a&&m;if(c&&h.length>0&&!w.call(h,0))for(var M=0;M<h.length;++M)_.push(String(M));if(E&&h.length>0)for(var k=0;k<h.length;++k)_.push(String(k));else for(var b in h)!(T&&b==="prototype")&&w.call(h,b)&&_.push(String(b));if(r)for(var A=u(h),y=0;y<l.length;++y)!(A&&l[y]==="constructor")&&w.call(h,l[y])&&_.push(l[y]);return _});var w,C,P,t,r,a,l,i,s,o,u;Z.exports=v}}),F2=Ne({"node_modules/object-keys/index.js"(te,Z){var v=Array.prototype.slice,w=Hy(),C=Object.keys,P=C?function(a){return C(a)}:eg(),t=Object.keys;P.shim=function(){if(Object.keys){var a=(function(){var l=Object.keys(arguments);return l&&l.length===arguments.length})(1,2);a||(Object.keys=function(i){return w(i)?t(v.call(i)):t(i)})}else Object.keys=P;return Object.keys||P},Z.exports=P}}),gS=Ne({"node_modules/object.assign/implementation.js"(te,Z){var v=F2(),w=eb()(),C=l_(),P=Object,t=C("Array.prototype.push"),r=C("Object.prototype.propertyIsEnumerable"),a=w?Object.getOwnPropertySymbols:null;Z.exports=function(i,s){if(i==null)throw new TypeError("target must be an object");var o=P(i);if(arguments.length===1)return o;for(var u=1;u<arguments.length;++u){var d=P(arguments[u]),h=v(d),g=w&&(Object.getOwnPropertySymbols||a);if(g)for(var m=g(d),E=0;E<m.length;++E){var c=m[E];r(d,c)&&t(h,c)}for(var _=0;_<h.length;++_){var T=h[_];if(r(d,T)){var M=d[T];o[T]=M}}}return o}}}),kC=Ne({"node_modules/object.assign/polyfill.js"(te,Z){var v=gS(),w=function(){if(!Object.assign)return!1;for(var P="abcdefghijklmnopqrst",t=P.split(""),r={},a=0;a<t.length;++a)r[t[a]]=t[a];var l=Object.assign({},r),i="";for(var s in l)i+=s;return P!==i},C=function(){if(!Object.assign||!Object.preventExtensions)return!1;var P=Object.preventExtensions({1:2});try{Object.assign(P,"xy")}catch{return P[1]==="y"}return!1};Z.exports=function(){return!Object.assign||w()||C()?v:Object.assign}}}),u_=Ne({"node_modules/object-is/implementation.js"(te,Z){var v=function(w){return w!==w};Z.exports=function(C,P){return C===0&&P===0?1/C===1/P:!!(C===P||v(C)&&v(P))}}}),ib=Ne({"node_modules/object-is/polyfill.js"(te,Z){var v=u_();Z.exports=function(){return typeof Object.is=="function"?Object.is:v}}}),Hv=Ne({"node_modules/define-properties/index.js"(te,Z){var v=F2(),w=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",C=Object.prototype.toString,P=Array.prototype.concat,t=Object.defineProperty,r=function(o){return typeof o=="function"&&C.call(o)==="[object Function]"},a=pS()(),l=t&&a,i=function(o,u,d,h){if(u in o){if(h===!0){if(o[u]===d)return}else if(!r(h)||!h())return}l?t(o,u,{configurable:!0,enumerable:!1,value:d,writable:!0}):o[u]=d},s=function(o,u){var d=arguments.length>2?arguments[2]:{},h=v(u);w&&(h=P.call(h,Object.getOwnPropertySymbols(u)));for(var g=0;g<h.length;g+=1)i(o,h[g],u[h[g]],d[h[g]])};s.supportsDescriptors=!!l,Z.exports=s}}),PC=Ne({"node_modules/object-is/shim.js"(te,Z){var v=ib(),w=Hv();Z.exports=function(){var P=v();return w(Object,{is:P},{is:function(){return Object.is!==P}}),P}}}),bp=Ne({"node_modules/object-is/index.js"(te,Z){var v=Hv(),w=jg(),C=u_(),P=ib(),t=PC(),r=w(P(),Object);v(r,{getPolyfill:P,implementation:C,shim:t}),Z.exports=r}}),yS=Ne({"node_modules/is-nan/implementation.js"(te,Z){Z.exports=function(w){return w!==w}}}),_S=Ne({"node_modules/is-nan/polyfill.js"(te,Z){var v=yS();Z.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:v}}}),eR=Ne({"node_modules/is-nan/shim.js"(te,Z){var v=Hv(),w=_S();Z.exports=function(){var P=w();return v(Number,{isNaN:P},{isNaN:function(){return Number.isNaN!==P}}),P}}}),Gg=Ne({"node_modules/is-nan/index.js"(te,Z){var v=jg(),w=Hv(),C=yS(),P=_S(),t=eR(),r=v(P(),Number);w(r,{getPolyfill:P,implementation:C,shim:t}),Z.exports=r}}),B2=Ne({"node_modules/assert/build/internal/util/comparisons.js"(te,Z){function v(ut,Fe){return r(ut)||t(ut,Fe)||C(ut,Fe)||w()}function w(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function C(ut,Fe){if(ut){if(typeof ut=="string")return P(ut,Fe);var Pe=Object.prototype.toString.call(ut).slice(8,-1);if(Pe==="Object"&&ut.constructor&&(Pe=ut.constructor.name),Pe==="Map"||Pe==="Set")return Array.from(ut);if(Pe==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Pe))return P(ut,Fe)}}function P(ut,Fe){(Fe==null||Fe>ut.length)&&(Fe=ut.length);for(var Pe=0,be=new Array(Fe);Pe<Fe;Pe++)be[Pe]=ut[Pe];return be}function t(ut,Fe){var Pe=ut==null?null:typeof Symbol<"u"&&ut[Symbol.iterator]||ut["@@iterator"];if(Pe!=null){var be,Ye,yt,wt,ht=[],Yt=!0,$t=!1;try{if(yt=(Pe=Pe.call(ut)).next,Fe!==0)for(;!(Yt=(be=yt.call(Pe)).done)&&(ht.push(be.value),ht.length!==Fe);Yt=!0);}catch(fr){$t=!0,Ye=fr}finally{try{if(!Yt&&Pe.return!=null&&(wt=Pe.return(),Object(wt)!==wt))return}finally{if($t)throw Ye}}return ht}}function r(ut){if(Array.isArray(ut))return ut}function a(ut){"@babel/helpers - typeof";return a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Fe){return typeof Fe}:function(Fe){return Fe&&typeof Symbol=="function"&&Fe.constructor===Symbol&&Fe!==Symbol.prototype?"symbol":typeof Fe},a(ut)}var l=/a/g.flags!==void 0,i=function(Fe){var Pe=[];return Fe.forEach(function(be){return Pe.push(be)}),Pe},s=function(Fe){var Pe=[];return Fe.forEach(function(be,Ye){return Pe.push([Ye,be])}),Pe},o=Object.is?Object.is:bp(),u=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},d=Number.isNaN?Number.isNaN:Gg();function h(ut){return ut.call.bind(ut)}var g=h(Object.prototype.hasOwnProperty),m=h(Object.prototype.propertyIsEnumerable),E=h(Object.prototype.toString),c=hm().types,_=c.isAnyArrayBuffer,T=c.isArrayBufferView,M=c.isDate,k=c.isMap,b=c.isRegExp,A=c.isSet,y=c.isNativeError,f=c.isBoxedPrimitive,p=c.isNumberObject,x=c.isStringObject,N=c.isBooleanObject,D=c.isBigIntObject,B=c.isSymbolObject,U=c.isFloat32Array,V=c.isFloat64Array;function q(ut){if(ut.length===0||ut.length>10)return!0;for(var Fe=0;Fe<ut.length;Fe++){var Pe=ut.charCodeAt(Fe);if(Pe<48||Pe>57)return!0}return ut.length===10&&ut>=Math.pow(2,32)}function z(ut){return Object.keys(ut).filter(q).concat(u(ut).filter(Object.prototype.propertyIsEnumerable.bind(ut)))}function H(ut,Fe){if(ut===Fe)return 0;for(var Pe=ut.length,be=Fe.length,Ye=0,yt=Math.min(Pe,be);Ye<yt;++Ye)if(ut[Ye]!==Fe[Ye]){Pe=ut[Ye],be=Fe[Ye];break}return Pe<be?-1:be<Pe?1:0}var G=!0,J=!1,le=0,ge=1,de=2,me=3;function W(ut,Fe){return l?ut.source===Fe.source&&ut.flags===Fe.flags:RegExp.prototype.toString.call(ut)===RegExp.prototype.toString.call(Fe)}function ie(ut,Fe){if(ut.byteLength!==Fe.byteLength)return!1;for(var Pe=0;Pe<ut.byteLength;Pe++)if(ut[Pe]!==Fe[Pe])return!1;return!0}function se(ut,Fe){return ut.byteLength!==Fe.byteLength?!1:H(new Uint8Array(ut.buffer,ut.byteOffset,ut.byteLength),new Uint8Array(Fe.buffer,Fe.byteOffset,Fe.byteLength))===0}function ee(ut,Fe){return ut.byteLength===Fe.byteLength&&H(new Uint8Array(ut),new Uint8Array(Fe))===0}function pe(ut,Fe){return p(ut)?p(Fe)&&o(Number.prototype.valueOf.call(ut),Number.prototype.valueOf.call(Fe)):x(ut)?x(Fe)&&String.prototype.valueOf.call(ut)===String.prototype.valueOf.call(Fe):N(ut)?N(Fe)&&Boolean.prototype.valueOf.call(ut)===Boolean.prototype.valueOf.call(Fe):D(ut)?D(Fe)&&BigInt.prototype.valueOf.call(ut)===BigInt.prototype.valueOf.call(Fe):B(Fe)&&Symbol.prototype.valueOf.call(ut)===Symbol.prototype.valueOf.call(Fe)}function oe(ut,Fe,Pe,be){if(ut===Fe)return ut!==0?!0:Pe?o(ut,Fe):!0;if(Pe){if(a(ut)!=="object")return typeof ut=="number"&&d(ut)&&d(Fe);if(a(Fe)!=="object"||ut===null||Fe===null||Object.getPrototypeOf(ut)!==Object.getPrototypeOf(Fe))return!1}else{if(ut===null||a(ut)!=="object")return Fe===null||a(Fe)!=="object"?ut==Fe:!1;if(Fe===null||a(Fe)!=="object")return!1}var Ye=E(ut),yt=E(Fe);if(Ye!==yt)return!1;if(Array.isArray(ut)){if(ut.length!==Fe.length)return!1;var wt=z(ut),ht=z(Fe);return wt.length!==ht.length?!1:ce(ut,Fe,Pe,be,ge,wt)}if(Ye==="[object Object]"&&(!k(ut)&&k(Fe)||!A(ut)&&A(Fe)))return!1;if(M(ut)){if(!M(Fe)||Date.prototype.getTime.call(ut)!==Date.prototype.getTime.call(Fe))return!1}else if(b(ut)){if(!b(Fe)||!W(ut,Fe))return!1}else if(y(ut)||ut instanceof Error){if(ut.message!==Fe.message||ut.name!==Fe.name)return!1}else if(T(ut)){if(!Pe&&(U(ut)||V(ut))){if(!ie(ut,Fe))return!1}else if(!se(ut,Fe))return!1;var Yt=z(ut),$t=z(Fe);return Yt.length!==$t.length?!1:ce(ut,Fe,Pe,be,le,Yt)}else{if(A(ut))return!A(Fe)||ut.size!==Fe.size?!1:ce(ut,Fe,Pe,be,de);if(k(ut))return!k(Fe)||ut.size!==Fe.size?!1:ce(ut,Fe,Pe,be,me);if(_(ut)){if(!ee(ut,Fe))return!1}else if(f(ut)&&!pe(ut,Fe))return!1}return ce(ut,Fe,Pe,be,le)}function Y(ut,Fe){return Fe.filter(function(Pe){return m(ut,Pe)})}function ce(ut,Fe,Pe,be,Ye,yt){if(arguments.length===5){yt=Object.keys(ut);var wt=Object.keys(Fe);if(yt.length!==wt.length)return!1}for(var ht=0;ht<yt.length;ht++)if(!g(Fe,yt[ht]))return!1;if(Pe&&arguments.length===5){var Yt=u(ut);if(Yt.length!==0){var $t=0;for(ht=0;ht<Yt.length;ht++){var fr=Yt[ht];if(m(ut,fr)){if(!m(Fe,fr))return!1;yt.push(fr),$t++}else if(m(Fe,fr))return!1}var mr=u(Fe);if(Yt.length!==mr.length&&Y(Fe,mr).length!==$t)return!1}else{var Ur=u(Fe);if(Ur.length!==0&&Y(Fe,Ur).length!==0)return!1}}if(yt.length===0&&(Ye===le||Ye===ge&&ut.length===0||ut.size===0))return!0;if(be===void 0)be={val1:new Map,val2:new Map,position:0};else{var jr=be.val1.get(ut);if(jr!==void 0){var fn=be.val2.get(Fe);if(fn!==void 0)return jr===fn}be.position++}be.val1.set(ut,be.position),be.val2.set(Fe,be.position);var Br=mt(ut,Fe,Pe,yt,be,Ye);return be.val1.delete(ut),be.val2.delete(Fe),Br}function ue(ut,Fe,Pe,be){for(var Ye=i(ut),yt=0;yt<Ye.length;yt++){var wt=Ye[yt];if(oe(Fe,wt,Pe,be))return ut.delete(wt),!0}return!1}function _e(ut){switch(a(ut)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":ut=+ut;case"number":if(d(ut))return!1}return!0}function Le(ut,Fe,Pe){var be=_e(Pe);return be??(Fe.has(be)&&!ut.has(be))}function ze(ut,Fe,Pe,be,Ye){var yt=_e(Pe);if(yt!=null)return yt;var wt=Fe.get(yt);return wt===void 0&&!Fe.has(yt)||!oe(be,wt,!1,Ye)?!1:!ut.has(yt)&&oe(be,wt,!1,Ye)}function Xe(ut,Fe,Pe,be){for(var Ye=null,yt=i(ut),wt=0;wt<yt.length;wt++){var ht=yt[wt];if(a(ht)==="object"&&ht!==null)Ye===null&&(Ye=new Set),Ye.add(ht);else if(!Fe.has(ht)){if(Pe||!Le(ut,Fe,ht))return!1;Ye===null&&(Ye=new Set),Ye.add(ht)}}if(Ye!==null){for(var Yt=i(Fe),$t=0;$t<Yt.length;$t++){var fr=Yt[$t];if(a(fr)==="object"&&fr!==null){if(!ue(Ye,fr,Pe,be))return!1}else if(!Pe&&!ut.has(fr)&&!ue(Ye,fr,Pe,be))return!1}return Ye.size===0}return!0}function Ve(ut,Fe,Pe,be,Ye,yt){for(var wt=i(ut),ht=0;ht<wt.length;ht++){var Yt=wt[ht];if(oe(Pe,Yt,Ye,yt)&&oe(be,Fe.get(Yt),Ye,yt))return ut.delete(Yt),!0}return!1}function rt(ut,Fe,Pe,be){for(var Ye=null,yt=s(ut),wt=0;wt<yt.length;wt++){var ht=v(yt[wt],2),Yt=ht[0],$t=ht[1];if(a(Yt)==="object"&&Yt!==null)Ye===null&&(Ye=new Set),Ye.add(Yt);else{var fr=Fe.get(Yt);if(fr===void 0&&!Fe.has(Yt)||!oe($t,fr,Pe,be)){if(Pe||!ze(ut,Fe,Yt,$t,be))return!1;Ye===null&&(Ye=new Set),Ye.add(Yt)}}}if(Ye!==null){for(var mr=s(Fe),Ur=0;Ur<mr.length;Ur++){var jr=v(mr[Ur],2),fn=jr[0],Br=jr[1];if(a(fn)==="object"&&fn!==null){if(!Ve(Ye,ut,fn,Br,Pe,be))return!1}else if(!Pe&&(!ut.has(fn)||!oe(ut.get(fn),Br,!1,be))&&!Ve(Ye,ut,fn,Br,!1,be))return!1}return Ye.size===0}return!0}function mt(ut,Fe,Pe,be,Ye,yt){var wt=0;if(yt===de){if(!Xe(ut,Fe,Pe,Ye))return!1}else if(yt===me){if(!rt(ut,Fe,Pe,Ye))return!1}else if(yt===ge)for(;wt<ut.length;wt++)if(g(ut,wt)){if(!g(Fe,wt)||!oe(ut[wt],Fe[wt],Pe,Ye))return!1}else{if(g(Fe,wt))return!1;for(var ht=Object.keys(ut);wt<ht.length;wt++){var Yt=ht[wt];if(!g(Fe,Yt)||!oe(ut[Yt],Fe[Yt],Pe,Ye))return!1}return ht.length===Object.keys(Fe).length}for(wt=0;wt<be.length;wt++){var $t=be[wt];if(!oe(ut[$t],Fe[$t],Pe,Ye))return!1}return!0}function _t(ut,Fe){return oe(ut,Fe,J)}function vt(ut,Fe){return oe(ut,Fe,G)}Z.exports={isDeepEqual:_t,isDeepStrictEqual:vt}}}),c_=Ne({"node_modules/assert/build/assert.js"(te,Z){function v(de){"@babel/helpers - typeof";return v=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(me){return typeof me}:function(me){return me&&typeof Symbol=="function"&&me.constructor===Symbol&&me!==Symbol.prototype?"symbol":typeof me},v(de)}function w(de,me,W){return Object.defineProperty(de,"prototype",{writable:!1}),de}function C(de,me){if(!(de instanceof me))throw new TypeError("Cannot call a class as a function")}var P=kd(),t=P.codes,r=t.ERR_AMBIGUOUS_ARGUMENT,a=t.ERR_INVALID_ARG_TYPE,l=t.ERR_INVALID_ARG_VALUE,i=t.ERR_INVALID_RETURN_VALUE,s=t.ERR_MISSING_ARGS,o=Hg(),u=hm(),d=u.inspect,h=hm().types,g=h.isPromise,m=h.isRegExp,E=kC()(),c=ib()(),_=l_()("RegExp.prototype.test"),T,M;function k(){var de=B2();T=de.isDeepEqual,M=de.isDeepStrictEqual}var b=!1,A=Z.exports=N,y={};function f(de){throw de.message instanceof Error?de.message:new o(de)}function p(de,me,W,ie,se){var ee=arguments.length,pe;if(ee===0)pe="Failed";else if(ee===1)W=de,de=void 0;else{if(b===!1){b=!0;var oe=process.emitWarning?process.emitWarning:console.warn.bind(console);oe("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")}ee===2&&(ie="!=")}if(W instanceof Error)throw W;var Y={actual:de,expected:me,operator:ie===void 0?"fail":ie,stackStartFn:se||p};W!==void 0&&(Y.message=W);var ce=new o(Y);throw pe&&(ce.message=pe,ce.generatedMessage=!0),ce}A.fail=p,A.AssertionError=o;function x(de,me,W,ie){if(!W){var se=!1;if(me===0)se=!0,ie="No value argument passed to `assert.ok()`";else if(ie instanceof Error)throw ie;var ee=new o({actual:W,expected:!0,message:ie,operator:"==",stackStartFn:de});throw ee.generatedMessage=se,ee}}function N(){for(var de=arguments.length,me=new Array(de),W=0;W<de;W++)me[W]=arguments[W];x.apply(void 0,[N,me.length].concat(me))}A.ok=N,A.equal=function de(me,W,ie){if(arguments.length<2)throw new s("actual","expected");me!=W&&f({actual:me,expected:W,message:ie,operator:"==",stackStartFn:de})},A.notEqual=function de(me,W,ie){if(arguments.length<2)throw new s("actual","expected");me==W&&f({actual:me,expected:W,message:ie,operator:"!=",stackStartFn:de})},A.deepEqual=function de(me,W,ie){if(arguments.length<2)throw new s("actual","expected");T===void 0&&k(),T(me,W)||f({actual:me,expected:W,message:ie,operator:"deepEqual",stackStartFn:de})},A.notDeepEqual=function de(me,W,ie){if(arguments.length<2)throw new s("actual","expected");T===void 0&&k(),T(me,W)&&f({actual:me,expected:W,message:ie,operator:"notDeepEqual",stackStartFn:de})},A.deepStrictEqual=function de(me,W,ie){if(arguments.length<2)throw new s("actual","expected");T===void 0&&k(),M(me,W)||f({actual:me,expected:W,message:ie,operator:"deepStrictEqual",stackStartFn:de})},A.notDeepStrictEqual=D;function D(de,me,W){if(arguments.length<2)throw new s("actual","expected");T===void 0&&k(),M(de,me)&&f({actual:de,expected:me,message:W,operator:"notDeepStrictEqual",stackStartFn:D})}A.strictEqual=function de(me,W,ie){if(arguments.length<2)throw new s("actual","expected");c(me,W)||f({actual:me,expected:W,message:ie,operator:"strictEqual",stackStartFn:de})},A.notStrictEqual=function de(me,W,ie){if(arguments.length<2)throw new s("actual","expected");c(me,W)&&f({actual:me,expected:W,message:ie,operator:"notStrictEqual",stackStartFn:de})};var B=w(function de(me,W,ie){var se=this;C(this,de),W.forEach(function(ee){ee in me&&(ie!==void 0&&typeof ie[ee]=="string"&&m(me[ee])&&_(me[ee],ie[ee])?se[ee]=ie[ee]:se[ee]=me[ee])})});function U(de,me,W,ie,se,ee){if(!(W in de)||!M(de[W],me[W])){if(!ie){var pe=new B(de,se),oe=new B(me,se,de),Y=new o({actual:pe,expected:oe,operator:"deepStrictEqual",stackStartFn:ee});throw Y.actual=de,Y.expected=me,Y.operator=ee.name,Y}f({actual:de,expected:me,message:ie,operator:ee.name,stackStartFn:ee})}}function V(de,me,W,ie){if(typeof me!="function"){if(m(me))return _(me,de);if(arguments.length===2)throw new a("expected",["Function","RegExp"],me);if(v(de)!=="object"||de===null){var se=new o({actual:de,expected:me,message:W,operator:"deepStrictEqual",stackStartFn:ie});throw se.operator=ie.name,se}var ee=Object.keys(me);if(me instanceof Error)ee.push("name","message");else if(ee.length===0)throw new l("error",me,"may not be an empty object");return T===void 0&&k(),ee.forEach(function(pe){typeof de[pe]=="string"&&m(me[pe])&&_(me[pe],de[pe])||U(de,me,pe,W,ee,ie)}),!0}return me.prototype!==void 0&&de instanceof me?!0:Error.isPrototypeOf(me)?!1:me.call({},de)===!0}function q(de){if(typeof de!="function")throw new a("fn","Function",de);try{de()}catch(me){return me}return y}function z(de){return g(de)||de!==null&&v(de)==="object"&&typeof de.then=="function"&&typeof de.catch=="function"}function H(de){return Promise.resolve().then(function(){var me;if(typeof de=="function"){if(me=de(),!z(me))throw new i("instance of Promise","promiseFn",me)}else if(z(de))me=de;else throw new a("promiseFn",["Function","Promise"],de);return Promise.resolve().then(function(){return me}).then(function(){return y}).catch(function(W){return W})})}function G(de,me,W,ie){if(typeof W=="string"){if(arguments.length===4)throw new a("error",["Object","Error","Function","RegExp"],W);if(v(me)==="object"&&me!==null){if(me.message===W)throw new r("error/message",'The error message "'.concat(me.message,'" is identical to the message.'))}else if(me===W)throw new r("error/message",'The error "'.concat(me,'" is identical to the message.'));ie=W,W=void 0}else if(W!=null&&v(W)!=="object"&&typeof W!="function")throw new a("error",["Object","Error","Function","RegExp"],W);if(me===y){var se="";W&&W.name&&(se+=" (".concat(W.name,")")),se+=ie?": ".concat(ie):".";var ee=de.name==="rejects"?"rejection":"exception";f({actual:void 0,expected:W,operator:de.name,message:"Missing expected ".concat(ee).concat(se),stackStartFn:de})}if(W&&!V(me,W,ie,de))throw me}function J(de,me,W,ie){if(me!==y){if(typeof W=="string"&&(ie=W,W=void 0),!W||V(me,W)){var se=ie?": ".concat(ie):".",ee=de.name==="doesNotReject"?"rejection":"exception";f({actual:me,expected:W,operator:de.name,message:"Got unwanted ".concat(ee).concat(se,`
`)+'Actual message: "'.concat(me&&me.message,'"'),stackStartFn:de})}throw me}}A.throws=function de(me){for(var W=arguments.length,ie=new Array(W>1?W-1:0),se=1;se<W;se++)ie[se-1]=arguments[se];G.apply(void 0,[de,q(me)].concat(ie))},A.rejects=function de(me){for(var W=arguments.length,ie=new Array(W>1?W-1:0),se=1;se<W;se++)ie[se-1]=arguments[se];return H(me).then(function(ee){return G.apply(void 0,[de,ee].concat(ie))})},A.doesNotThrow=function de(me){for(var W=arguments.length,ie=new Array(W>1?W-1:0),se=1;se<W;se++)ie[se-1]=arguments[se];J.apply(void 0,[de,q(me)].concat(ie))},A.doesNotReject=function de(me){for(var W=arguments.length,ie=new Array(W>1?W-1:0),se=1;se<W;se++)ie[se-1]=arguments[se];return H(me).then(function(ee){return J.apply(void 0,[de,ee].concat(ie))})},A.ifError=function de(me){if(me!=null){var W="ifError got unwanted exception: ";v(me)==="object"&&typeof me.message=="string"?me.message.length===0&&me.constructor?W+=me.constructor.name:W+=me.message:W+=d(me);var ie=new o({actual:me,expected:null,operator:"ifError",message:W,stackStartFn:de}),se=me.stack;if(typeof se=="string"){var ee=se.split(`
`);ee.shift();for(var pe=ie.stack.split(`
`),oe=0;oe<ee.length;oe++){var Y=pe.indexOf(ee[oe]);if(Y!==-1){pe=pe.slice(0,Y);break}}ie.stack="".concat(pe.join(`
`),`
`).concat(ee.join(`
`))}throw ie}};function le(de,me,W,ie,se){if(!m(me))throw new a("regexp","RegExp",me);var ee=se==="match";if(typeof de!="string"||_(me,de)!==ee){if(W instanceof Error)throw W;var pe=!W;W=W||(typeof de!="string"?'The "string" argument must be of type string. Received type '+"".concat(v(de)," (").concat(d(de),")"):(ee?"The input did not match the regular expression ":"The input was expected to not match the regular expression ")+"".concat(d(me),`. Input:

`).concat(d(de),`
`));var oe=new o({actual:de,expected:me,message:W,operator:se,stackStartFn:ie});throw oe.generatedMessage=pe,oe}}A.match=function de(me,W,ie){le(me,W,ie,de,"match")},A.doesNotMatch=function de(me,W,ie){le(me,W,ie,de,"doesNotMatch")};function ge(){for(var de=arguments.length,me=new Array(de),W=0;W<de;W++)me[W]=arguments[W];x.apply(void 0,[ge,me.length].concat(me))}A.strict=E(ge,A,{equal:A.strictEqual,deepEqual:A.deepStrictEqual,notEqual:A.notStrictEqual,notDeepEqual:A.notDeepStrictEqual}),A.strict.strict=A.strict}}),f_=Ne({"node_modules/stream-parser/node_modules/ms/index.js"(te,Z){var v=1e3,w=v*60,C=w*60,P=C*24,t=P*365.25;Z.exports=function(s,o){o=o||{};var u=typeof s;if(u==="string"&&s.length>0)return r(s);if(u==="number"&&isNaN(s)===!1)return o.long?l(s):a(s);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(s))};function r(s){if(s=String(s),!(s.length>100)){var o=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(s);if(o){var u=parseFloat(o[1]),d=(o[2]||"ms").toLowerCase();switch(d){case"years":case"year":case"yrs":case"yr":case"y":return u*t;case"days":case"day":case"d":return u*P;case"hours":case"hour":case"hrs":case"hr":case"h":return u*C;case"minutes":case"minute":case"mins":case"min":case"m":return u*w;case"seconds":case"second":case"secs":case"sec":case"s":return u*v;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:return}}}}function a(s){return s>=P?Math.round(s/P)+"d":s>=C?Math.round(s/C)+"h":s>=w?Math.round(s/w)+"m":s>=v?Math.round(s/v)+"s":s+"ms"}function l(s){return i(s,P,"day")||i(s,C,"hour")||i(s,w,"minute")||i(s,v,"second")||s+" ms"}function i(s,o,u){if(!(s<o))return s<o*1.5?Math.floor(s/o)+" "+u:Math.ceil(s/o)+" "+u+"s"}}}),LC=Ne({"node_modules/stream-parser/node_modules/debug/src/debug.js"(te,Z){te=Z.exports=C.debug=C.default=C,te.coerce=a,te.disable=t,te.enable=P,te.enabled=r,te.humanize=f_(),te.names=[],te.skips=[],te.formatters={};var v;function w(l){var i=0,s;for(s in l)i=(i<<5)-i+l.charCodeAt(s),i|=0;return te.colors[Math.abs(i)%te.colors.length]}function C(l){function i(){if(i.enabled){var s=i,o=+new Date,u=o-(v||o);s.diff=u,s.prev=v,s.curr=o,v=o;for(var d=new Array(arguments.length),h=0;h<d.length;h++)d[h]=arguments[h];d[0]=te.coerce(d[0]),typeof d[0]!="string"&&d.unshift("%O");var g=0;d[0]=d[0].replace(/%([a-zA-Z%])/g,function(E,c){if(E==="%%")return E;g++;var _=te.formatters[c];if(typeof _=="function"){var T=d[g];E=_.call(s,T),d.splice(g,1),g--}return E}),te.formatArgs.call(s,d);var m=i.log||te.log||console.log.bind(console);m.apply(s,d)}}return i.namespace=l,i.enabled=te.enabled(l),i.useColors=te.useColors(),i.color=w(l),typeof te.init=="function"&&te.init(i),i}function P(l){te.save(l),te.names=[],te.skips=[];for(var i=(typeof l=="string"?l:"").split(/[\s,]+/),s=i.length,o=0;o<s;o++)i[o]&&(l=i[o].replace(/\*/g,".*?"),l[0]==="-"?te.skips.push(new RegExp("^"+l.substr(1)+"$")):te.names.push(new RegExp("^"+l+"$")))}function t(){te.enable("")}function r(l){var i,s;for(i=0,s=te.skips.length;i<s;i++)if(te.skips[i].test(l))return!1;for(i=0,s=te.names.length;i<s;i++)if(te.names[i].test(l))return!0;return!1}function a(l){return l instanceof Error?l.stack||l.message:l}}}),RC=Ne({"node_modules/stream-parser/node_modules/debug/src/browser.js"(te,Z){te=Z.exports=LC(),te.log=C,te.formatArgs=w,te.save=P,te.load=t,te.useColors=v,te.storage=typeof chrome<"u"&&typeof chrome.storage<"u"?chrome.storage.local:r(),te.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"];function v(){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+)/)}te.formatters.j=function(a){try{return JSON.stringify(a)}catch(l){return"[UnexpectedJSONParseError]: "+l.message}};function w(a){var l=this.useColors;if(a[0]=(l?"%c":"")+this.namespace+(l?" %c":" ")+a[0]+(l?"%c ":" ")+"+"+te.humanize(this.diff),!!l){var i="color: "+this.color;a.splice(1,0,i,"color: inherit");var s=0,o=0;a[0].replace(/%[a-zA-Z%]/g,function(u){u!=="%%"&&(s++,u==="%c"&&(o=s))}),a.splice(o,0,i)}}function C(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function P(a){try{a==null?te.storage.removeItem("debug"):te.storage.debug=a}catch{}}function t(){var a;try{a=te.storage.debug}catch{}return!a&&typeof process<"u"&&"env"in process&&(a=n.DEBUG),a}te.enable(t());function r(){try{return window.localStorage}catch{}}}}),IC=Ne({"node_modules/stream-parser/index.js"(te,Z){var v=c_(),w=RC()("stream-parser");Z.exports=a;var C=-1,P=0,t=1,r=2;function a(c){var _=c&&typeof c._transform=="function",T=c&&typeof c._write=="function";if(!_&&!T)throw new Error("must pass a Writable or Transform stream in");w("extending Parser into stream"),c._bytes=i,c._skipBytes=s,_&&(c._passthrough=o),_?c._transform=d:c._write=u}function l(c){w("initializing parser stream"),c._parserBytesLeft=0,c._parserBuffers=[],c._parserBuffered=0,c._parserState=C,c._parserCallback=null,typeof c.push=="function"&&(c._parserOutput=c.push.bind(c)),c._parserInit=!0}function i(c,_){v(!this._parserCallback,'there is already a "callback" set!'),v(isFinite(c)&&c>0,'can only buffer a finite number of bytes > 0, got "'+c+'"'),this._parserInit||l(this),w("buffering %o bytes",c),this._parserBytesLeft=c,this._parserCallback=_,this._parserState=P}function s(c,_){v(!this._parserCallback,'there is already a "callback" set!'),v(c>0,'can only skip > 0 bytes, got "'+c+'"'),this._parserInit||l(this),w("skipping %o bytes",c),this._parserBytesLeft=c,this._parserCallback=_,this._parserState=t}function o(c,_){v(!this._parserCallback,'There is already a "callback" set!'),v(c>0,'can only pass through > 0 bytes, got "'+c+'"'),this._parserInit||l(this),w("passing through %o bytes",c),this._parserBytesLeft=c,this._parserCallback=_,this._parserState=r}function u(c,_,T){this._parserInit||l(this),w("write(%o bytes)",c.length),typeof _=="function"&&(T=_),m(this,c,null,T)}function d(c,_,T){this._parserInit||l(this),w("transform(%o bytes)",c.length),typeof _!="function"&&(_=this._parserOutput),m(this,c,_,T)}function h(c,_,T,M){return c._parserBytesLeft<=0?M(new Error("got data but not currently parsing anything")):_.length<=c._parserBytesLeft?function(){return g(c,_,T,M)}:function(){var k=_.slice(0,c._parserBytesLeft);return g(c,k,T,function(b){if(b)return M(b);if(_.length>k.length)return function(){return h(c,_.slice(k.length),T,M)}})}}function g(c,_,T,M){if(c._parserBytesLeft-=_.length,w("%o bytes left for stream piece",c._parserBytesLeft),c._parserState===P?(c._parserBuffers.push(_),c._parserBuffered+=_.length):c._parserState===r&&T(_),c._parserBytesLeft===0){var k=c._parserCallback;if(k&&c._parserState===P&&c._parserBuffers.length>1&&(_=Buffer.concat(c._parserBuffers,c._parserBuffered)),c._parserState!==P&&(_=null),c._parserCallback=null,c._parserBuffered=0,c._parserState=C,c._parserBuffers.splice(0),k){var b=[];_&&b.push(_),T&&b.push(T);var A=k.length>b.length;A&&b.push(E(M));var y=k.apply(c,b);if(!A||M===y)return M}}else return M}var m=E(h);function E(c){return function(){for(var _=c.apply(this,arguments);typeof _=="function";)_=_();return _}}}}),Uc=Ne({"node_modules/probe-image-size/lib/common.js"(te){var Z=N2().Transform,v=IC();function w(){Z.call(this,{readableObjectMode:!0})}w.prototype=Object.create(Z.prototype),w.prototype.constructor=w,v(w.prototype),te.ParserStream=w,te.sliceEq=function(P,t,r){for(var a=t,l=0;l<r.length;)if(P[a++]!==r[l++])return!1;return!0},te.str2arr=function(P,t){var r=[],a=0;if(t&&t==="hex")for(;a<P.length;)r.push(parseInt(P.slice(a,a+2),16)),a+=2;else for(;a<P.length;a++)r.push(P.charCodeAt(a)&255);return r},te.readUInt16LE=function(P,t){return P[t]|P[t+1]<<8},te.readUInt16BE=function(P,t){return P[t+1]|P[t]<<8},te.readUInt32LE=function(P,t){return P[t]|P[t+1]<<8|P[t+2]<<16|P[t+3]*16777216},te.readUInt32BE=function(P,t){return P[t+3]|P[t+2]<<8|P[t+1]<<16|P[t]*16777216};function C(P,t,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||"",this.name=this.constructor.name,this.message=P,t&&(this.code=t),r&&(this.statusCode=r)}C.prototype=Object.create(Error.prototype),C.prototype.constructor=C,te.ProbeError=C}}),j2=Ne({"node_modules/probe-image-size/lib/miaf_utils.js"(te,Z){var v=Uc().readUInt16BE,w=Uc().readUInt32BE;function C(o,u){if(o.length<4+u)return null;var d=w(o,u);return o.length<d+u||d<8?null:{boxtype:String.fromCharCode.apply(null,o.slice(u+4,u+8)),data:o.slice(u+8,u+d),end:u+d}}Z.exports.unbox=C;function P(o,u){for(var d=0;;){var h=C(o,d);if(!h)break;switch(h.boxtype){case"ispe":u.sizes.push({width:w(h.data,4),height:w(h.data,8)});break;case"irot":u.transforms.push({type:"irot",value:h.data[0]&3});break;case"imir":u.transforms.push({type:"imir",value:h.data[0]&1});break}d=h.end}}function t(o,u,d){for(var h=0,g=0;g<d;g++)h=h*256+(o[u+g]||0);return h}function r(o,u){for(var d=o[4]>>4&15,h=o[4]&15,g=o[5]>>4&15,m=v(o,6),E=8,c=0;c<m;c++){var _=v(o,E);E+=2;var T=v(o,E);E+=2;var M=t(o,E,g);E+=g;var k=v(o,E);if(E+=2,T===0&&k===1){var b=t(o,E,d),A=t(o,E+d,h);u.item_loc[_]={length:A,offset:b+M}}E+=k*(d+h)}}function a(o,u){for(var d=v(o,4),h=6,g=0;g<d;g++){var m=C(o,h);if(!m)break;if(m.boxtype==="infe"){for(var E=v(m.data,4),c="",_=8;_<m.data.length&&m.data[_];_++)c+=String.fromCharCode(m.data[_]);u.item_inf[c]=E}h=m.end}}function l(o,u){for(var d=0;;){var h=C(o,d);if(!h)break;h.boxtype==="ipco"&&P(h.data,u),d=h.end}}function i(o,u){for(var d=4;;){var h=C(o,d);if(!h)break;h.boxtype==="iprp"&&l(h.data,u),h.boxtype==="iloc"&&r(h.data,u),h.boxtype==="iinf"&&a(h.data,u),d=h.end}}function s(o){var u=o.reduce(function(g,m){return g.width>m.width||g.width===m.width&&g.height>m.height?g:m}),d=o.reduce(function(g,m){return g.height>m.height||g.height===m.height&&g.width>m.width?g:m}),h;return u.width>d.height||u.width===d.height&&u.height>d.width?h=u:h=d,h}Z.exports.readSizeFromMeta=function(o){var u={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(i(o,u),!!u.sizes.length){var d=s(u.sizes),h=1;u.transforms.forEach(function(m){var E={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},c={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(m.type==="imir"&&(m.value===0?h=c[h]:(h=c[h],h=E[h],h=E[h])),m.type==="irot")for(var _=0;_<m.value;_++)h=E[h]});var g=null;return u.item_inf.Exif&&(g=u.item_loc[u.item_inf.Exif]),{width:d.width,height:d.height,orientation:u.transforms.length?h:null,variants:u.sizes,exif_location:g}}},Z.exports.getMimeType=function(o){var u=String.fromCharCode.apply(null,o.slice(0,4)),d={};d[u]=!0;for(var h=8;h<o.length;h+=4)d[String.fromCharCode.apply(null,o.slice(h,h+4))]=!0;if(!(!d.mif1&&!d.msf1&&!d.miaf))return u==="avif"||u==="avis"||u==="avio"?{type:"avif",mime:"image/avif"}:u==="heic"||u==="heix"?{type:"heic",mime:"image/heic"}:u==="hevc"||u==="hevx"?{type:"heic",mime:"image/heic-sequence"}:d.avif||d.avis?{type:"avif",mime:"image/avif"}:d.heic||d.heix||d.hevc||d.hevx||d.heis?d.msf1?{type:"heif",mime:"image/heif-sequence"}:{type:"heif",mime:"image/heif"}:{type:"avif",mime:"image/avif"}}}}),ob=Ne({"node_modules/probe-image-size/lib/exif_utils.js"(te,Z){function v(P,t){var r=new Error(P);return r.code=t,r}function w(P){try{return decodeURIComponent(escape(P))}catch{return P}}function C(P,t,r){this.input=P.subarray(t,r),this.start=t;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"}C.prototype.each=function(P){this.aborted=!1;var t=this.read_uint32(4);for(this.ifds_to_read=[{id:0,offset:t}];this.ifds_to_read.length>0&&!this.aborted;){var r=this.ifds_to_read.shift();r.offset&&this.scan_ifd(r.id,r.offset,P)}},C.prototype.read_uint16=function(P){var t=this.input;if(P+2>t.length)throw v("unexpected EOF","EBADDATA");return this.big_endian?t[P]*256+t[P+1]:t[P]+t[P+1]*256},C.prototype.read_uint32=function(P){var t=this.input;if(P+4>t.length)throw v("unexpected EOF","EBADDATA");return this.big_endian?t[P]*16777216+t[P+1]*65536+t[P+2]*256+t[P+3]:t[P]+t[P+1]*256+t[P+2]*65536+t[P+3]*16777216},C.prototype.is_subifd_link=function(P,t){return P===0&&t===34665||P===0&&t===34853||P===34665&&t===40965},C.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}},C.prototype.exif_format_read=function(P,t){var r;switch(P){case 1:case 2:return r=this.input[t],r;case 6:return r=this.input[t],r|(r&128)*33554430;case 3:return r=this.read_uint16(t),r;case 8:return r=this.read_uint16(t),r|(r&32768)*131070;case 4:return r=this.read_uint32(t),r;case 9:return r=this.read_uint32(t),r|0;case 5:case 10:case 11:case 12:return null;case 7:return null;default:return null}},C.prototype.scan_ifd=function(P,t,r){var a=this.read_uint16(t);t+=2;for(var l=0;l<a;l++){var i=this.read_uint16(t),s=this.read_uint16(t+2),o=this.read_uint32(t+4),u=this.exif_format_length(s),d=o*u,h=d<=4?t+8:this.read_uint32(t+8),g=!1;if(h+d>this.input.length)throw v("unexpected EOF","EBADDATA");for(var m=[],E=h,c=0;c<o;c++,E+=u){var _=this.exif_format_read(s,E);if(_===null){m=null;break}m.push(_)}Array.isArray(m)&&s===2&&(m=w(String.fromCharCode.apply(null,m)),m&&m[m.length-1]==="\0"&&(m=m.slice(0,-1))),this.is_subifd_link(P,i)&&Array.isArray(m)&&Number.isInteger(m[0])&&m[0]>0&&(this.ifds_to_read.push({id:i,offset:m[0]}),g=!0);var T={is_big_endian:this.big_endian,ifd:P,tag:i,format:s,count:o,entry_offset:t+this.start,data_length:d,data_offset:h+this.start,value:m,is_subifd_link:g};if(r(T)===!1){this.aborted=!0;return}t+=12}P===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(t)})},Z.exports.ExifParser=C,Z.exports.get_orientation=function(P){var t=0;try{return new C(P,0,P.length).each(function(r){if(r.ifd===0&&r.tag===274&&Array.isArray(r.value))return t=r.value[0],!1}),t}catch{return-1}}}}),tR=Ne({"node_modules/probe-image-size/lib/parse_sync/avif.js"(te,Z){var v=Uc().str2arr,w=Uc().sliceEq,C=Uc().readUInt32BE,P=j2(),t=ob(),r=v("ftyp");Z.exports=function(a){if(w(a,4,r)){var l=P.unbox(a,0);if(l){var i=P.getMimeType(l.data);if(i){for(var s,o=l.end;;){var u=P.unbox(a,o);if(!u)break;if(o=u.end,u.boxtype==="mdat")return;if(u.boxtype==="meta"){s=u.data;break}}if(s){var d=P.readSizeFromMeta(s);if(d){var h={width:d.width,height:d.height,type:i.type,mime:i.mime,wUnits:"px",hUnits:"px"};if(d.variants.length>1&&(h.variants=d.variants),d.orientation&&(h.orientation=d.orientation),d.exif_location&&d.exif_location.offset+d.exif_location.length<=a.length){var g=C(a,d.exif_location.offset),m=a.slice(d.exif_location.offset+g+4,d.exif_location.offset+d.exif_location.length),E=t.get_orientation(m);E>0&&(h.orientation=E)}return h}}}}}}}}),rR=Ne({"node_modules/probe-image-size/lib/parse_sync/bmp.js"(te,Z){var v=Uc().str2arr,w=Uc().sliceEq,C=Uc().readUInt16LE,P=v("BM");Z.exports=function(t){if(!(t.length<26)&&w(t,0,P))return{width:C(t,18),height:C(t,22),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}}}),nR=Ne({"node_modules/probe-image-size/lib/parse_sync/gif.js"(te,Z){var v=Uc().str2arr,w=Uc().sliceEq,C=Uc().readUInt16LE,P=v("GIF87a"),t=v("GIF89a");Z.exports=function(r){if(!(r.length<10)&&!(!w(r,0,P)&&!w(r,0,t)))return{width:C(r,6),height:C(r,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}}}),DC=Ne({"node_modules/probe-image-size/lib/parse_sync/ico.js"(te,Z){var v=Uc().readUInt16LE,w=0,C=1,P=16;Z.exports=function(t){var r=v(t,0),a=v(t,2),l=v(t,4);if(!(r!==w||a!==C||!l)){for(var i=[],s={width:0,height:0},o=0;o<l;o++){var u=t[6+P*o]||256,d=t[6+P*o+1]||256,h={width:u,height:d};i.push(h),(u>s.width||d>s.height)&&(s=h)}return{width:s.width,height:s.height,variants:i,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}}}),OC=Ne({"node_modules/probe-image-size/lib/parse_sync/jpeg.js"(te,Z){var v=Uc().readUInt16BE,w=Uc().str2arr,C=Uc().sliceEq,P=ob(),t=w("Exif\0\0");Z.exports=function(r){if(!(r.length<2)&&!(r[0]!==255||r[1]!==216||r[2]!==255))for(var a=2;;){for(;;){if(r.length-a<2)return;if(r[a++]===255)break}for(var l=r[a++],i;l===255;)l=r[a++];if(208<=l&&l<=217||l===1)i=0;else if(192<=l&&l<=254){if(r.length-a<2)return;i=v(r,a)-2,a+=2}else return;if(l===217||l===218)return;var s;if(l===225&&i>=10&&C(r,a,t)&&(s=P.get_orientation(r.slice(a+6,a+i))),i>=5&&192<=l&&l<=207&&l!==196&&l!==200&&l!==204){if(r.length-a<i)return;var o={width:v(r,a+3),height:v(r,a+1),type:"jpg",mime:"image/jpeg",wUnits:"px",hUnits:"px"};return s>0&&(o.orientation=s),o}a+=i}}}}),h_=Ne({"node_modules/probe-image-size/lib/parse_sync/png.js"(te,Z){var v=Uc().str2arr,w=Uc().sliceEq,C=Uc().readUInt32BE,P=v(`PNG\r

`),t=v("IHDR");Z.exports=function(r){if(!(r.length<24)&&w(r,0,P)&&w(r,12,t))return{width:C(r,16),height:C(r,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}}}),U2=Ne({"node_modules/probe-image-size/lib/parse_sync/psd.js"(te,Z){var v=Uc().str2arr,w=Uc().sliceEq,C=Uc().readUInt32BE,P=v("8BPS\0");Z.exports=function(t){if(!(t.length<22)&&w(t,0,P))return{width:C(t,18),height:C(t,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}}}),zC=Ne({"node_modules/probe-image-size/lib/parse_sync/svg.js"(te,Z){function v(u){return u===32||u===9||u===13||u===10}function w(u){return typeof u=="number"&&isFinite(u)&&u>0}function C(u){var d=0,h=u.length;for(u[0]===239&&u[1]===187&&u[2]===191&&(d=3);d<h&&v(u[d]);)d++;return d===h?!1:u[d]===60}var P=/<[-_.:a-zA-Z0-9][^>]*>/,t=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,r=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,a=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,l=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,i=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function s(u){var d=u.match(r),h=u.match(a),g=u.match(l);return{width:d&&(d[1]||d[2]),height:h&&(h[1]||h[2]),viewbox:g&&(g[1]||g[2])}}function o(u){return i.test(u)?u.match(i)[0]:"px"}Z.exports=function(u){if(C(u)){for(var d="",h=0;h<u.length;h++)d+=String.fromCharCode(u[h]);var g=(d.match(P)||[""])[0];if(t.test(g)){var m=s(g),E=parseFloat(m.width),c=parseFloat(m.height);if(m.width&&m.height)return!w(E)||!w(c)?void 0:{width:E,height:c,type:"svg",mime:"image/svg+xml",wUnits:o(m.width),hUnits:o(m.height)};var _=(m.viewbox||"").split(" "),T={width:_[2],height:_[3]},M=parseFloat(T.width),k=parseFloat(T.height);if(!(!w(M)||!w(k))&&o(T.width)===o(T.height)){var b=M/k;return m.width?w(E)?{width:E,height:E/b,type:"svg",mime:"image/svg+xml",wUnits:o(m.width),hUnits:o(m.width)}:void 0:m.height?w(c)?{width:c*b,height:c,type:"svg",mime:"image/svg+xml",wUnits:o(m.height),hUnits:o(m.height)}:void 0:{width:M,height:k,type:"svg",mime:"image/svg+xml",wUnits:o(T.width),hUnits:o(T.height)}}}}}}}),NC=Ne({"node_modules/probe-image-size/lib/parse_sync/tiff.js"(te,Z){var v=Uc().str2arr,w=Uc().sliceEq,C=Uc().readUInt16LE,P=Uc().readUInt16BE,t=Uc().readUInt32LE,r=Uc().readUInt32BE,a=v("II*\0"),l=v("MM\0*");function i(u,d,h){return h?P(u,d):C(u,d)}function s(u,d,h){return h?r(u,d):t(u,d)}function o(u,d,h){var g=i(u,d+2,h),m=s(u,d+4,h);return m!==1||g!==3&&g!==4?null:g===3?i(u,d+8,h):s(u,d+8,h)}Z.exports=function(u){if(!(u.length<8)&&!(!w(u,0,a)&&!w(u,0,l))){var d=u[0]===77,h=s(u,4,d)-8;if(!(h<0)){var g=h+8;if(!(u.length-g<2)){var m=i(u,g+0,d)*12;if(!(m<=0)&&(g+=2,!(u.length-g<m))){var E,c,_,T;for(E=0;E<m;E+=12)T=i(u,g+E,d),T===256?c=o(u,g+E,d):T===257&&(_=o(u,g+E,d));if(c&&_)return{width:c,height:_,type:"tiff",mime:"image/tiff",wUnits:"px",hUnits:"px"}}}}}}}}),FC=Ne({"node_modules/probe-image-size/lib/parse_sync/webp.js"(te,Z){var v=Uc().str2arr,w=Uc().sliceEq,C=Uc().readUInt16LE,P=Uc().readUInt32LE,t=ob(),r=v("RIFF"),a=v("WEBP");function l(o,u){if(!(o[u+3]!==157||o[u+4]!==1||o[u+5]!==42))return{width:C(o,u+6)&16383,height:C(o,u+8)&16383,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}function i(o,u){if(o[u]===47){var d=P(o,u+1);return{width:(d&16383)+1,height:(d>>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function s(o,u){return{width:(o[u+6]<<16|o[u+5]<<8|o[u+4])+1,height:(o[u+9]<<u|o[u+8]<<8|o[u+7])+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}Z.exports=function(o){if(!(o.length<16)&&!(!w(o,0,r)&&!w(o,8,a))){var u=12,d=null,h=0,g=P(o,4)+8;if(!(g>o.length)){for(;u+8<g;){if(o[u]===0){u++;continue}var m=String.fromCharCode.apply(null,o.slice(u,u+4)),E=P(o,u+4);m==="VP8 "&&E>=10?d=d||l(o,u+8):m==="VP8L"&&E>=9?d=d||i(o,u+8):m==="VP8X"&&E>=10?d=d||s(o,u+8):m==="EXIF"&&(h=t.get_orientation(o.slice(u+8,u+8+E)),u=1/0),u+=8+E}if(d)return h>0&&(d.orientation=h),d}}}}}),BC=Ne({"node_modules/probe-image-size/lib/parsers_sync.js"(te,Z){Z.exports={avif:tR(),bmp:rR(),gif:nR(),ico:DC(),jpeg:OC(),png:h_(),psd:U2(),svg:zC(),tiff:NC(),webp:FC()}}}),jC=Ne({"node_modules/probe-image-size/sync.js"(te,Z){var v=BC();function w(C){for(var P=Object.keys(v),t=0;t<P.length;t++){var r=v[P[t]](C);if(r)return r}return null}Z.exports=function(P){return w(P)},Z.exports.parsers=v}}),UC=Ne({"src/traces/image/helpers.js"(te){var Z=jC(),v=o0().IMAGE_URL_PREFIX,w=Uy().Buffer;te.getImageSize=function(C){var P=C.replace(v,""),t=new w(P,"base64");return Z(t)}}}),q2=Ne({"src/traces/image/calc.js"(te,Z){var v=In(),w=um(),C=Fn(),P=Os(),t=In().maxRowLength,r=UC().getImageSize;Z.exports=function(o,u){var d,h;if(u._hasZ)d=u.z.length,h=t(u.z);else if(u._hasSource){var g=r(u.source);d=g.height,h=g.width}var m=P.getFromId(o,u.xaxis||"x"),E=P.getFromId(o,u.yaxis||"y"),c=m.d2c(u.x0)-u.dx/2,_=E.d2c(u.y0)-u.dy/2,T,M=[c,c+h*u.dx],k=[_,_+d*u.dy];if(m&&m.type==="log")for(T=0;T<h;T++)M.push(c+T*u.dx);if(E&&E.type==="log")for(T=0;T<d;T++)k.push(_+T*u.dy);u._extremes[m._id]=P.findExtremes(m,M),u._extremes[E._id]=P.findExtremes(E,k),u._scaler=i(u);var b={x0:c,y0:_,z:u.z,w:h,h:d};return[b]};function a(s,o,u,d){return function(h){return v.constrain((h-s)*o,u,d)}}function l(s,o){return function(u){return v.constrain(u,s,o)}}function i(s){var o=w.colormodel[s.colormodel],u=o.colormodel||s.colormodel,d=u.length;s._sArray=[];for(var h=0;h<d;h++)o.min[h]!==s.zmin[h]||o.max[h]!==s.zmax[h]?s._sArray.push(a(s.zmin[h],(o.max[h]-o.min[h])/(s.zmax[h]-s.zmin[h]),o.min[h],o.max[h])):s._sArray.push(l(o.min[h],o.max[h]));return function(g){for(var m=g.slice(0,d),E=0;E<d;E++){var c=m[E];if(!C(c))return!1;m[E]=s._sArray[E](c)}return m}}}}),qC=Ne({"src/traces/image/plot.js"(te,Z){var v=xn(),w=In(),C=w.strTranslate,P=hp(),t=um(),r=FM(),a=c2().STYLE;Z.exports=function(i,s,o,u){var d=s.xaxis,h=s.yaxis,g=!i._context._exportedPlot&&r();w.makeTraceGroups(u,o,"im").each(function(m){var E=v.select(this),c=m[0],_=c.trace,T=(_.zsmooth==="fast"||_.zsmooth===!1&&g)&&!_._hasZ&&_._hasSource&&d.type==="linear"&&h.type==="linear";_._realImage=T;var M=c.z,k=c.x0,b=c.y0,A=c.w,y=c.h,f=_.dx,p=_.dy,x,N,D,B,U,V;for(V=0;x===void 0&&V<A;)x=d.c2p(k+V*f),V++;for(V=A;N===void 0&&V>0;)N=d.c2p(k+V*f),V--;for(V=0;B===void 0&&V<y;)B=h.c2p(b+V*p),V++;for(V=y;U===void 0&&V>0;)U=h.c2p(b+V*p),V--;if(N<x&&(D=N,N=x,x=D),U<B&&(D=B,B=U,U=D),!T){var q=.5;x=Math.max(-q*d._length,x),N=Math.min((1+q)*d._length,N),B=Math.max(-q*h._length,B),U=Math.min((1+q)*h._length,U)}var z=Math.round(N-x),H=Math.round(U-B),G=z<=0||H<=0;if(G){var J=E.selectAll("image").data([]);J.exit().remove();return}function le(Y){var ce=document.createElement("canvas");ce.width=z,ce.height=H;var ue=ce.getContext("2d",{willReadFrequently:!0}),_e=function(Pe){return w.constrain(Math.round(d.c2p(k+Pe*f)-x),0,z)},Le=function(Pe){return w.constrain(Math.round(h.c2p(b+Pe*p)-B),0,H)},ze=t.colormodel[_.colormodel],Xe=ze.colormodel||_.colormodel,Ve=ze.fmt,rt;for(V=0;V<c.w;V++){var mt=_e(V),_t=_e(V+1);if(!(_t===mt||isNaN(_t)||isNaN(mt)))for(var vt=0;vt<c.h;vt++){var ut=Le(vt),Fe=Le(vt+1);Fe===ut||isNaN(Fe)||isNaN(ut)||!Y(V,vt)||(rt=_._scaler(Y(V,vt)),rt?ue.fillStyle=Xe+"("+Ve(rt).join(",")+")":ue.fillStyle="rgba(0,0,0,0)",ue.fillRect(mt,ut,_t-mt,Fe-ut))}}return ce}var ge=E.selectAll("image").data([m]);ge.enter().append("svg:image").attr({xmlns:P.svg,preserveAspectRatio:"none"}),ge.exit().remove();var de=_.zsmooth===!1?a:"";if(T){var me=w.simpleMap(d.range,d.r2l),W=w.simpleMap(h.range,h.r2l),ie=me[1]<me[0],se=W[1]>W[0];if(ie||se){var ee=x+z/2,pe=B+H/2;de+="transform:"+C(ee+"px",pe+"px")+"scale("+(ie?-1:1)+","+(se?-1:1)+")"+C(-ee+"px",-pe+"px")+";"}}ge.attr("style",de);var oe=new Promise(function(Y){if(_._hasZ)Y();else if(_._hasSource)if(_._canvas&&_._canvas.el.width===A&&_._canvas.el.height===y&&_._canvas.source===_.source)Y();else{var ce=document.createElement("canvas");ce.width=A,ce.height=y;var ue=ce.getContext("2d",{willReadFrequently:!0});_._image=_._image||new Image;var _e=_._image;_e.onload=function(){ue.drawImage(_e,0,0),_._canvas={el:ce,source:_.source},Y()},_e.setAttribute("src",_.source)}}).then(function(){var Y,ce;if(_._hasZ)ce=le(function(Le,ze){var Xe=M[ze][Le];return w.isTypedArray(Xe)&&(Xe=Array.from(Xe)),Xe}),Y=ce.toDataURL("image/png");else if(_._hasSource)if(T)Y=_.source;else{var ue=_._canvas.el.getContext("2d",{willReadFrequently:!0}),_e=ue.getImageData(0,0,A,y).data;ce=le(function(Le,ze){var Xe=4*(ze*A+Le);return[_e[Xe],_e[Xe+1],_e[Xe+2],_e[Xe+3]]}),Y=ce.toDataURL("image/png")}ge.attr({"xlink:href":Y,height:H,width:z,x,y:B})});i._promises.push(oe)})}}}),VC=Ne({"src/traces/image/style.js"(te,Z){var v=xn();Z.exports=function(C){v.select(C).selectAll(".im image").style("opacity",function(P){return P[0].trace.opacity})}}}),wf=Ne({"src/traces/image/hover.js"(te,Z){var v=oh(),w=In(),C=w.isArrayOrTypedArray,P=um();Z.exports=function(r,a,l){var i=r.cd[0],s=i.trace,o=r.xa,u=r.ya;if(!(v.inbox(a-i.x0,a-(i.x0+i.w*s.dx),0)>0||v.inbox(l-i.y0,l-(i.y0+i.h*s.dy),0)>0)){var d=Math.floor((a-i.x0)/s.dx),h=Math.floor(Math.abs(l-i.y0)/s.dy),g;if(s._hasZ?g=i.z[h][d]:s._hasSource&&(g=s._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(d,h,1,1).data),!!g){var m=i.hi||s.hoverinfo,E;if(m){var c=m.split("+");c.indexOf("all")!==-1&&(c=["color"]),c.indexOf("color")!==-1&&(E=!0)}var _=P.colormodel[s.colormodel],T=_.colormodel||s.colormodel,M=T.length,k=s._scaler(g),b=_.suffix,A=[];(s.hovertemplate||E)&&(A.push("["+[k[0]+b[0],k[1]+b[1],k[2]+b[2]].join(", ")),M===4&&A.push(", "+k[3]+b[3]),A.push("]"),A=A.join(""),r.extraText=T.toUpperCase()+": "+A);var y;C(s.hovertext)&&C(s.hovertext[h])?y=s.hovertext[h][d]:C(s.text)&&C(s.text[h])&&(y=s.text[h][d]);var f=u.c2p(i.y0+(h+.5)*s.dy),p=i.x0+(d+.5)*s.dx,x=i.y0+(h+.5)*s.dy,N="["+g.slice(0,s.colormodel.length).join(", ")+"]";return[w.extendFlat(r,{index:[h,d],x0:o.c2p(i.x0+d*s.dx),x1:o.c2p(i.x0+(d+1)*s.dx),y0:f,y1:f,color:k,xVal:p,xLabelVal:p,yVal:x,yLabelVal:x,zLabelVal:N,text:y,hovertemplateLabels:{zLabel:N,colorLabel:A,"color[0]Label":k[0]+b[0],"color[1]Label":k[1]+b[1],"color[2]Label":k[2]+b[2],"color[3]Label":k[3]+b[3]}})]}}}}}),xS=Ne({"src/traces/image/event_data.js"(te,Z){Z.exports=function(w,C){return"xVal"in C&&(w.x=C.xVal),"yVal"in C&&(w.y=C.yVal),C.xa&&(w.xaxis=C.xa),C.ya&&(w.yaxis=C.ya),w.color=C.color,w.colormodel=C.trace.colormodel,w.z||(w.z=C.color),w}}}),aR=Ne({"src/traces/image/index.js"(te,Z){Z.exports={attributes:lS(),supplyDefaults:pC(),calc:q2(),plot:qC(),style:VC(),hoverPoints:wf(),eventData:xS(),moduleType:"trace",name:"image",basePlotModule:Ih(),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}}}),HC=Ne({"lib/image.js"(te,Z){Z.exports=aR()}}),d_=Ne({"src/traces/pie/attributes.js"(te,Z){var v=qo(),w=Fc().attributes,C=bo(),P=js(),{hovertemplateAttrs:t,texttemplateAttrs:r,templatefallbackAttrs:a}=Fl(),l=fi().extendFlat,i=Fd().pattern,s=C({editType:"plot",arrayOk:!0,colorEditType:"plot"});Z.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:P.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:i,editType:"calc"},text:{valType:"data_array",editType:"plot"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},scalegroup:{valType:"string",dflt:"",editType:"calc"},textinfo:{valType:"flaglist",flags:["label","text","value","percent"],extras:["none"],editType:"calc"},hoverinfo:l({},v.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:t({},{keys:["label","color","value","percent","text"]}),hovertemplatefallback:a(),texttemplate:r({editType:"plot"},{keys:["label","color","value","percent","text"]}),texttemplatefallback:a({editType:"plot"}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:l({},s,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:l({},s,{}),outsidetextfont:l({},s,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},title:{text:{valType:"string",dflt:"",editType:"plot"},font:l({},s,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:w({name:"pie",trace:!0,editType:"calc"}),hole:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},sort:{valType:"boolean",dflt:!0,editType:"calc"},direction:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",dflt:0,editType:"calc"},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0,editType:"calc"}}}}),v_=Ne({"src/traces/pie/defaults.js"(te,Z){var v=Fn(),w=In(),C=d_(),P=Fc().defaults,t=mp().handleText,r=In().coercePattern;function a(s,o){var u=w.isArrayOrTypedArray(s),d=w.isArrayOrTypedArray(o),h=Math.min(u?s.length:1/0,d?o.length:1/0);if(isFinite(h)||(h=0),h&&d){for(var g,m=0;m<h;m++){var E=o[m];if(v(E)&&E>0){g=!0;break}}g||(h=0)}return{hasLabels:u,hasValues:d,len:h}}function l(s,o,u,d,h){var g=d("marker.line.width");g&&d("marker.line.color",h?void 0:u.paper_bgcolor);var m=d("marker.colors");r(d,"marker.pattern",m),s.marker&&!o.marker.pattern.fgcolor&&(o.marker.pattern.fgcolor=s.marker.colors),o.marker.pattern.bgcolor||(o.marker.pattern.bgcolor=u.paper_bgcolor)}function i(s,o,u,d){function h(x,N){return w.coerce(s,o,C,x,N)}var g=h("labels"),m=h("values"),E=a(g,m),c=E.len;if(o._hasLabels=E.hasLabels,o._hasValues=E.hasValues,!o._hasLabels&&o._hasValues&&(h("label0"),h("dlabel")),!c){o.visible=!1;return}o._length=c,l(s,o,d,h,!0),h("scalegroup");var _=h("text"),T=h("texttemplate");h("texttemplatefallback");var M;if(T||(M=h("textinfo",w.isArrayOrTypedArray(_)?"text+percent":"percent")),h("hovertext"),h("hovertemplate"),h("hovertemplatefallback"),T||M&&M!=="none"){var k=h("textposition");t(s,o,d,h,k,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var b=Array.isArray(k)||k==="auto",A=b||k==="outside";A&&h("automargin"),(k==="inside"||k==="auto"||Array.isArray(k))&&h("insidetextorientation")}else M==="none"&&h("textposition","none");P(o,d,h);var y=h("hole"),f=h("title.text");if(f){var p=h("title.position",y?"middle center":"top center");!y&&p==="middle center"&&(o.title.position="top center"),w.coerceFont(h,"title.font",d.font)}h("sort"),h("direction"),h("rotation"),h("pull")}Z.exports={handleLabelsAndValues:a,handleMarkerDefaults:l,supplyDefaults:i}}}),bS=Ne({"src/traces/pie/layout_attributes.js"(te,Z){Z.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),V2=Ne({"src/traces/pie/layout_defaults.js"(te,Z){var v=In(),w=bS();Z.exports=function(P,t){function r(a,l){return v.coerce(P,t,w,a,l)}r("hiddenlabels"),r("piecolorway",t.colorway),r("extendpiecolors")}}}),d0=Ne({"src/traces/pie/calc.js"(te,Z){var v=Fn(),w=to(),C=Ha(),P={};function t(i,s){var o=[],u=i._fullLayout,d=u.hiddenlabels||[],h=s.labels,g=s.marker.colors||[],m=s.values,E=s._length,c=s._hasValues&&E,_,T;if(s.dlabel)for(h=new Array(E),_=0;_<E;_++)h[_]=String(s.label0+_*s.dlabel);var M={},k=r(u["_"+s.type+"colormap"]),b=0,A=!1;for(_=0;_<E;_++){var y,f,p;if(c){if(y=m[_],!v(y))continue;y=+y}else y=1;f=h[_],(f===void 0||f==="")&&(f=_),f=String(f);var x=M[f];x===void 0?(M[f]=o.length,p=d.indexOf(f)!==-1,p||(b+=y),o.push({v:y,label:f,color:k(g[_],f),i:_,pts:[_],hidden:p})):(A=!0,T=o[x],T.v+=y,T.pts.push(_),T.hidden||(b+=y),T.color===!1&&g[_]&&(T.color=k(g[_],f)))}o=o.filter(function(D){return D.v>=0});var N=s.type==="funnelarea"?A:s.sort;return N&&o.sort(function(D,B){return B.v-D.v}),o[0]&&(o[0].vTotal=b),o}function r(i){return function(o,u){return!o||(o=w(o),!o.isValid())?!1:(o=C.addOpacity(o,o.getAlpha()),i[u]||(i[u]=o),o)}}function a(i,s){var o=(s||{}).type;o||(o="pie");var u=i._fullLayout,d=i.calcdata,h=u[o+"colorway"],g=u["_"+o+"colormap"];u["extend"+o+"colors"]&&(h=l(h,P));for(var m=0,E=0;E<d.length;E++){var c=d[E],_=c[0].trace.type;if(_===o)for(var T=0;T<c.length;T++){var M=c[T];M.color===!1&&(g[M.label]?M.color=g[M.label]:(g[M.label]=M.color=h[m%h.length],m++))}}}function l(i,s){var o,u=JSON.stringify(i),d=s[u];if(!d){for(d=i.slice(),o=0;o<i.length;o++)d.push(w(i[o]).lighten(20).toHexString());for(o=0;o<i.length;o++)d.push(w(i[o]).darken(20).toHexString());s[u]=d}return d}Z.exports={calc:t,crossTraceCalc:a,makePullColorFn:r,generateExtendedColors:l}}}),wS=Ne({"src/traces/pie/event_data.js"(te,Z){var v=bv().appendArrayMultiPointValues;Z.exports=function(C,P){var t={curveNumber:P.index,pointNumbers:C.pts,data:P._input,fullData:P,label:C.label,color:C.color,value:C.v,percent:C.percent,text:C.text,bbox:C.bbox,v:C.v};return C.pts.length===1&&(t.pointNumber=t.i=C.pts[0]),v(t,P,C.pts),P.type==="funnelarea"&&(delete t.v,delete t.i),t}}}),p_=Ne({"src/traces/pie/plot.js"(te,Z){var v=xn(),w=ff(),C=oh(),P=Ha(),t=zs(),r=In(),a=r.strScale,l=r.strTranslate,i=hc(),s=_c(),o=s.recordMinTextSize,u=s.clearMinTextSize,d=zg().TEXTPAD,h=Ay(),g=wS(),m=In().isValidTextValue;function E(ie,se){var ee=ie._context.staticPlot,pe=ie._fullLayout,oe=pe._size;u("pie",pe),k(se,ie),J(se,oe);var Y=r.makeTraceGroups(pe._pielayer,se,"trace").each(function(ce){var ue=v.select(this),_e=ce[0],Le=_e.trace;ge(ce),ue.attr("stroke-linejoin","round"),ue.each(function(){var ze=v.select(this).selectAll("g.slice").data(ce);ze.enter().append("g").classed("slice",!0),ze.exit().remove();var Xe=[[[],[]],[[],[]]],Ve=!1;ze.each(function(be,Ye){if(be.hidden){v.select(this).selectAll("path,g").remove();return}be.pointNumber=be.i,be.curveNumber=Le.index,Xe[be.pxmid[1]<0?0:1][be.pxmid[0]<0?0:1].push(be);var yt=_e.cx,wt=_e.cy,ht=v.select(this),Yt=ht.selectAll("path.surface").data([be]);if(Yt.enter().append("path").classed("surface",!0).style({"pointer-events":ee?"none":"all"}),ht.call(_,ie,ce),Le.pull){var $t=+h.castOption(Le.pull,be.pts)||0;$t>0&&(yt+=$t*be.pxmid[0],wt+=$t*be.pxmid[1])}be.cxFinal=yt,be.cyFinal=wt;function fr(Ot,$e,ot,De){var Ee=De*($e[0]-Ot[0]),Ae=De*($e[1]-Ot[1]);return"a"+De*_e.r+","+De*_e.r+" 0 "+be.largeArc+(ot?" 1 ":" 0 ")+Ee+","+Ae}var mr=Le.hole;if(be.v===_e.vTotal){var Ur="M"+(yt+be.px0[0])+","+(wt+be.px0[1])+fr(be.px0,be.pxmid,!0,1)+fr(be.pxmid,be.px0,!0,1)+"Z";mr?Yt.attr("d","M"+(yt+mr*be.px0[0])+","+(wt+mr*be.px0[1])+fr(be.px0,be.pxmid,!1,mr)+fr(be.pxmid,be.px0,!1,mr)+"Z"+Ur):Yt.attr("d",Ur)}else{var jr=fr(be.px0,be.px1,!0,1);if(mr){var fn=1-mr;Yt.attr("d","M"+(yt+mr*be.px1[0])+","+(wt+mr*be.px1[1])+fr(be.px1,be.px0,!1,mr)+"l"+fn*be.px0[0]+","+fn*be.px0[1]+jr+"Z")}else Yt.attr("d","M"+yt+","+wt+"l"+be.px0[0]+","+be.px0[1]+jr+"Z")}me(ie,be,_e);var Br=h.castOption(Le.textposition,be.pts),Qr=ht.selectAll("g.slicetext").data(be.text&&Br!=="none"?[0]:[]);Qr.enter().append("g").classed("slicetext",!0),Qr.exit().remove(),Qr.each(function(){var Ot=r.ensureSingle(v.select(this),"text","",function(st){st.attr("data-notex",1)}),$e=r.ensureUniformFontSize(ie,Br==="outside"?T(Le,be,pe.font):M(Le,be,pe.font));Ot.text(be.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(t.font,$e).call(i.convertToTspans,ie);var ot=t.bBox(Ot.node()),De;if(Br==="outside")De=B(ot,be);else if(De=b(ot,be,_e),Br==="auto"&&De.scale<1){var Ee=r.ensureUniformFontSize(ie,Le.outsidetextfont);Ot.call(t.font,Ee),ot=t.bBox(Ot.node()),De=B(ot,be)}var Ae=De.textPosAngle,Ie=Ae===void 0?be.pxmid:de(_e.r,Ae);if(De.targetX=yt+Ie[0]*De.rCenter+(De.x||0),De.targetY=wt+Ie[1]*De.rCenter+(De.y||0),W(De,ot),De.outside){var tt=De.targetY;be.yLabelMin=tt-ot.height/2,be.yLabelMid=tt,be.yLabelMax=tt+ot.height/2,be.labelExtraX=0,be.labelExtraY=0,Ve=!0}De.fontSize=$e.size,o(Le.type,De,pe),ce[Ye].transform=De,r.setTransormAndDisplay(Ot,De)})});var rt=v.select(this).selectAll("g.titletext").data(Le.title.text?[0]:[]);if(rt.enter().append("g").classed("titletext",!0),rt.exit().remove(),rt.each(function(){var be=r.ensureSingle(v.select(this),"text","",function(wt){wt.attr("data-notex",1)}),Ye=Le.title.text;Le._meta&&(Ye=r.templateString(Ye,Le._meta)),be.text(Ye).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(t.font,Le.title.font).call(i.convertToTspans,ie);var yt;Le.title.position==="middle center"?yt=U(_e):yt=V(_e,oe),be.attr("transform",l(yt.x,yt.y)+a(Math.min(1,yt.scale))+l(yt.tx,yt.ty))}),Ve&&G(Xe,Le),c(ze,Le),Ve&&Le.automargin){var mt=t.bBox(ue.node()),_t=Le.domain,vt=oe.w*(_t.x[1]-_t.x[0]),ut=oe.h*(_t.y[1]-_t.y[0]),Fe=(.5*vt-_e.r)/oe.w,Pe=(.5*ut-_e.r)/oe.h;w.autoMargin(ie,"pie."+Le.uid+".automargin",{xl:_t.x[0]-Fe,xr:_t.x[1]+Fe,yb:_t.y[0]-Pe,yt:_t.y[1]+Pe,l:Math.max(_e.cx-_e.r-mt.left,0),r:Math.max(mt.right-(_e.cx+_e.r),0),b:Math.max(mt.bottom-(_e.cy+_e.r),0),t:Math.max(_e.cy-_e.r-mt.top,0),pad:5})}})});setTimeout(function(){Y.selectAll("tspan").each(function(){var ce=v.select(this);ce.attr("dy")&&ce.attr("dy",ce.attr("dy"))})},0)}function c(ie,se){ie.each(function(ee){var pe=v.select(this);if(!ee.labelExtraX&&!ee.labelExtraY){pe.select("path.textline").remove();return}var oe=pe.select("g.slicetext text");ee.transform.targetX+=ee.labelExtraX,ee.transform.targetY+=ee.labelExtraY,r.setTransormAndDisplay(oe,ee.transform);var Y=ee.cxFinal+ee.pxmid[0],ce=ee.cyFinal+ee.pxmid[1],ue="M"+Y+","+ce,_e=(ee.yLabelMax-ee.yLabelMin)*(ee.pxmid[0]<0?-1:1)/4;if(ee.labelExtraX){var Le=ee.labelExtraX*ee.pxmid[1]/ee.pxmid[0],ze=ee.yLabelMid+ee.labelExtraY-(ee.cyFinal+ee.pxmid[1]);Math.abs(Le)>Math.abs(ze)?ue+="l"+ze*ee.pxmid[0]/ee.pxmid[1]+","+ze+"H"+(Y+ee.labelExtraX+_e):ue+="l"+ee.labelExtraX+","+Le+"v"+(ze-Le)+"h"+_e}else ue+="V"+(ee.yLabelMid+ee.labelExtraY)+"h"+_e;r.ensureSingle(pe,"path","textline").call(P.stroke,se.outsidetextfont.color).attr({"stroke-width":Math.min(2,se.outsidetextfont.size/8),d:ue,fill:"none"})})}function _(ie,se,ee){var pe=ee[0],oe=pe.cx,Y=pe.cy,ce=pe.trace,ue=ce.type==="funnelarea";"_hasHoverLabel"in ce||(ce._hasHoverLabel=!1),"_hasHoverEvent"in ce||(ce._hasHoverEvent=!1),ie.on("mouseover",function(_e){var Le=se._fullLayout,ze=se._fullData[ce.index];if(!(se._dragging||Le.hovermode===!1)){var Xe=ze.hoverinfo;if(Array.isArray(Xe)&&(Xe=C.castHoverinfo({hoverinfo:[h.castOption(Xe,_e.pts)],_module:ce._module},Le,0)),Xe==="all"&&(Xe="label+text+value+percent+name"),ze.hovertemplate||Xe!=="none"&&Xe!=="skip"&&Xe){var Ve=_e.rInscribed||0,rt=oe+_e.pxmid[0]*(1-Ve),mt=Y+_e.pxmid[1]*(1-Ve),_t=Le.separators,vt=[];if(Xe&&Xe.indexOf("label")!==-1&&vt.push(_e.label),_e.text=h.castOption(ze.hovertext||ze.text,_e.pts),Xe&&Xe.indexOf("text")!==-1){var ut=_e.text;r.isValidTextValue(ut)&&vt.push(ut)}_e.value=_e.v,_e.valueLabel=h.formatPieValue(_e.v,_t),Xe&&Xe.indexOf("value")!==-1&&vt.push(_e.valueLabel),_e.percent=_e.v/pe.vTotal,_e.percentLabel=h.formatPiePercent(_e.percent,_t),Xe&&Xe.indexOf("percent")!==-1&&vt.push(_e.percentLabel);var Fe=ze.hoverlabel,Pe=Fe.font,be=[];C.loneHover({trace:ce,x0:rt-Ve*pe.r,x1:rt+Ve*pe.r,y:mt,_x0:ue?oe+_e.TL[0]:rt-Ve*pe.r,_x1:ue?oe+_e.TR[0]:rt+Ve*pe.r,_y0:ue?Y+_e.TL[1]:mt-Ve*pe.r,_y1:ue?Y+_e.BL[1]:mt+Ve*pe.r,text:vt.join("<br>"),name:ze.hovertemplate||Xe.indexOf("name")!==-1?ze.name:void 0,idealAlign:_e.pxmid[0]<0?"left":"right",color:h.castOption(Fe.bgcolor,_e.pts)||_e.color,borderColor:h.castOption(Fe.bordercolor,_e.pts),fontFamily:h.castOption(Pe.family,_e.pts),fontSize:h.castOption(Pe.size,_e.pts),fontColor:h.castOption(Pe.color,_e.pts),nameLength:h.castOption(Fe.namelength,_e.pts),textAlign:h.castOption(Fe.align,_e.pts),hovertemplate:h.castOption(ze.hovertemplate,_e.pts),hovertemplateLabels:_e,eventData:[g(_e,ze)]},{container:Le._hoverlayer.node(),outerContainer:Le._paper.node(),gd:se,inOut_bbox:be}),_e.bbox=be[0],ce._hasHoverLabel=!0}ce._hasHoverEvent=!0,se.emit("plotly_hover",{points:[g(_e,ze)],event:v.event})}}),ie.on("mouseout",function(_e){var Le=se._fullLayout,ze=se._fullData[ce.index],Xe=v.select(this).datum();ce._hasHoverEvent&&(_e.originalEvent=v.event,se.emit("plotly_unhover",{points:[g(Xe,ze)],event:v.event}),ce._hasHoverEvent=!1),ce._hasHoverLabel&&(C.loneUnhover(Le._hoverlayer.node()),ce._hasHoverLabel=!1)}),ie.on("click",function(_e){var Le=se._fullLayout,ze=se._fullData[ce.index];se._dragging||Le.hovermode===!1||(se._hoverdata=[g(_e,ze)],C.click(se,v.event))})}function T(ie,se,ee){var pe=h.castOption(ie.outsidetextfont.color,se.pts)||h.castOption(ie.textfont.color,se.pts)||ee.color,oe=h.castOption(ie.outsidetextfont.family,se.pts)||h.castOption(ie.textfont.family,se.pts)||ee.family,Y=h.castOption(ie.outsidetextfont.size,se.pts)||h.castOption(ie.textfont.size,se.pts)||ee.size,ce=h.castOption(ie.outsidetextfont.weight,se.pts)||h.castOption(ie.textfont.weight,se.pts)||ee.weight,ue=h.castOption(ie.outsidetextfont.style,se.pts)||h.castOption(ie.textfont.style,se.pts)||ee.style,_e=h.castOption(ie.outsidetextfont.variant,se.pts)||h.castOption(ie.textfont.variant,se.pts)||ee.variant,Le=h.castOption(ie.outsidetextfont.textcase,se.pts)||h.castOption(ie.textfont.textcase,se.pts)||ee.textcase,ze=h.castOption(ie.outsidetextfont.lineposition,se.pts)||h.castOption(ie.textfont.lineposition,se.pts)||ee.lineposition,Xe=h.castOption(ie.outsidetextfont.shadow,se.pts)||h.castOption(ie.textfont.shadow,se.pts)||ee.shadow;return{color:pe,family:oe,size:Y,weight:ce,style:ue,variant:_e,textcase:Le,lineposition:ze,shadow:Xe}}function M(ie,se,ee){var pe=h.castOption(ie.insidetextfont.color,se.pts);!pe&&ie._input.textfont&&(pe=h.castOption(ie._input.textfont.color,se.pts));var oe=h.castOption(ie.insidetextfont.family,se.pts)||h.castOption(ie.textfont.family,se.pts)||ee.family,Y=h.castOption(ie.insidetextfont.size,se.pts)||h.castOption(ie.textfont.size,se.pts)||ee.size,ce=h.castOption(ie.insidetextfont.weight,se.pts)||h.castOption(ie.textfont.weight,se.pts)||ee.weight,ue=h.castOption(ie.insidetextfont.style,se.pts)||h.castOption(ie.textfont.style,se.pts)||ee.style,_e=h.castOption(ie.insidetextfont.variant,se.pts)||h.castOption(ie.textfont.variant,se.pts)||ee.variant,Le=h.castOption(ie.insidetextfont.textcase,se.pts)||h.castOption(ie.textfont.textcase,se.pts)||ee.textcase,ze=h.castOption(ie.insidetextfont.lineposition,se.pts)||h.castOption(ie.textfont.lineposition,se.pts)||ee.lineposition,Xe=h.castOption(ie.insidetextfont.shadow,se.pts)||h.castOption(ie.textfont.shadow,se.pts)||ee.shadow;return{color:pe||P.contrast(se.color),family:oe,size:Y,weight:ce,style:ue,variant:_e,textcase:Le,lineposition:ze,shadow:Xe}}function k(ie,se){for(var ee,pe,oe=0;oe<ie.length;oe++)if(ee=ie[oe][0],pe=ee.trace,pe.title.text){var Y=pe.title.text;pe._meta&&(Y=r.templateString(Y,pe._meta));var ce=t.tester.append("text").attr("data-notex",1).text(Y).call(t.font,pe.title.font).call(i.convertToTspans,se),ue=t.bBox(ce.node(),!0);ee.titleBox={width:ue.width,height:ue.height},ce.remove()}}function b(ie,se,ee){var pe=ee.r||se.rpx1,oe=se.rInscribed,Y=se.startangle===se.stopangle;if(Y)return{rCenter:1-oe,scale:0,rotate:0,textPosAngle:0};var ce=se.ring,ue=ce===1&&Math.abs(se.startangle-se.stopangle)===Math.PI*2,_e=se.halfangle,Le=se.midangle,ze=ee.trace.insidetextorientation,Xe=ze==="horizontal",Ve=ze==="tangential",rt=ze==="radial",mt=ze==="auto",_t=[],vt;if(!mt){var ut=function(ht,Yt){if(A(se,ht)){var $t=Math.abs(ht-se.startangle),fr=Math.abs(ht-se.stopangle),mr=$t<fr?$t:fr;Yt==="tan"?vt=f(ie,pe,ce,mr,0):vt=y(ie,pe,ce,mr,Math.PI/2),vt.textPosAngle=ht,_t.push(vt)}},Fe;if(Xe||Ve){for(Fe=4;Fe>=-4;Fe-=2)ut(Math.PI*Fe,"tan");for(Fe=4;Fe>=-4;Fe-=2)ut(Math.PI*(Fe+1),"tan")}if(Xe||rt){for(Fe=4;Fe>=-4;Fe-=2)ut(Math.PI*(Fe+1.5),"rad");for(Fe=4;Fe>=-4;Fe-=2)ut(Math.PI*(Fe+.5),"rad")}}if(ue||mt||Xe){var Pe=Math.sqrt(ie.width*ie.width+ie.height*ie.height);if(vt={scale:oe*pe*2/Pe,rCenter:1-oe,rotate:0},vt.textPosAngle=(se.startangle+se.stopangle)/2,vt.scale>=1)return vt;_t.push(vt)}(mt||rt)&&(vt=y(ie,pe,ce,_e,Le),vt.textPosAngle=(se.startangle+se.stopangle)/2,_t.push(vt)),(mt||Ve)&&(vt=f(ie,pe,ce,_e,Le),vt.textPosAngle=(se.startangle+se.stopangle)/2,_t.push(vt));for(var be=0,Ye=0,yt=0;yt<_t.length;yt++){var wt=_t[yt].scale;if(Ye<wt&&(Ye=wt,be=yt),!mt&&Ye>=1)break}return _t[be]}function A(ie,se){var ee=ie.startangle,pe=ie.stopangle;return ee>se&&se>pe||ee<se&&se<pe}function y(ie,se,ee,pe,oe){se=Math.max(0,se-2*d);var Y=ie.width/ie.height,ce=N(Y,pe,se,ee);return{scale:ce*2/ie.height,rCenter:p(Y,ce/se),rotate:x(oe)}}function f(ie,se,ee,pe,oe){se=Math.max(0,se-2*d);var Y=ie.height/ie.width,ce=N(Y,pe,se,ee);return{scale:ce*2/ie.width,rCenter:p(Y,ce/se),rotate:x(oe+Math.PI/2)}}function p(ie,se){return Math.cos(se)-ie*se}function x(ie){return(180/Math.PI*ie+720)%180-90}function N(ie,se,ee,pe){var oe=ie+1/(2*Math.tan(se));return ee*Math.min(1/(Math.sqrt(oe*oe+.5)+oe),pe/(Math.sqrt(ie*ie+pe/2)+ie))}function D(ie,se){return ie.v===se.vTotal&&!se.trace.hole?1:Math.min(1/(1+1/Math.sin(ie.halfangle)),ie.ring/2)}function B(ie,se){var ee=se.pxmid[0],pe=se.pxmid[1],oe=ie.width/2,Y=ie.height/2;return ee<0&&(oe*=-1),pe<0&&(Y*=-1),{scale:1,rCenter:1,rotate:0,x:oe+Math.abs(Y)*(oe>0?1:-1)/2,y:Y/(1+ee*ee/(pe*pe)),outside:!0}}function U(ie){var se=Math.sqrt(ie.titleBox.width*ie.titleBox.width+ie.titleBox.height*ie.titleBox.height);return{x:ie.cx,y:ie.cy,scale:ie.trace.hole*ie.r*2/se,tx:0,ty:-ie.titleBox.height/2+ie.trace.title.font.size}}function V(ie,se){var ee=1,pe=1,oe,Y=ie.trace,ce={x:ie.cx,y:ie.cy},ue={tx:0,ty:0};ue.ty+=Y.title.font.size,oe=H(Y),Y.title.position.indexOf("top")!==-1?(ce.y-=(1+oe)*ie.r,ue.ty-=ie.titleBox.height):Y.title.position.indexOf("bottom")!==-1&&(ce.y+=(1+oe)*ie.r);var _e=q(ie.r,ie.trace.aspectratio),Le=se.w*(Y.domain.x[1]-Y.domain.x[0])/2;return Y.title.position.indexOf("left")!==-1?(Le=Le+_e,ce.x-=(1+oe)*_e,ue.tx+=ie.titleBox.width/2):Y.title.position.indexOf("center")!==-1?Le*=2:Y.title.position.indexOf("right")!==-1&&(Le=Le+_e,ce.x+=(1+oe)*_e,ue.tx-=ie.titleBox.width/2),ee=Le/ie.titleBox.width,pe=z(ie,se)/ie.titleBox.height,{x:ce.x,y:ce.y,scale:Math.min(ee,pe),tx:ue.tx,ty:ue.ty}}function q(ie,se){return ie/(se===void 0?1:se)}function z(ie,se){var ee=ie.trace,pe=se.h*(ee.domain.y[1]-ee.domain.y[0]);return Math.min(ie.titleBox.height,pe/2)}function H(ie){var se=ie.pull;if(!se)return 0;var ee;if(r.isArrayOrTypedArray(se))for(se=0,ee=0;ee<ie.pull.length;ee++)ie.pull[ee]>se&&(se=ie.pull[ee]);return se}function G(ie,se){var ee,pe,oe,Y,ce,ue,_e,Le,ze,Xe,Ve,rt,mt;function _t(Pe,be){return Pe.pxmid[1]-be.pxmid[1]}function vt(Pe,be){return be.pxmid[1]-Pe.pxmid[1]}function ut(Pe,be){be||(be={});var Ye=be.labelExtraY+(pe?be.yLabelMax:be.yLabelMin),yt=pe?Pe.yLabelMin:Pe.yLabelMax,wt=pe?Pe.yLabelMax:Pe.yLabelMin,ht=Pe.cyFinal+ce(Pe.px0[1],Pe.px1[1]),Yt=Ye-yt,$t,fr,mr,Ur,jr,fn;if(Yt*_e>0&&(Pe.labelExtraY=Yt),!!r.isArrayOrTypedArray(se.pull))for(fr=0;fr<Xe.length;fr++)mr=Xe[fr],!(mr===Pe||(h.castOption(se.pull,Pe.pts)||0)>=(h.castOption(se.pull,mr.pts)||0))&&((Pe.pxmid[1]-mr.pxmid[1])*_e>0?(Ur=mr.cyFinal+ce(mr.px0[1],mr.px1[1]),Yt=Ur-yt-Pe.labelExtraY,Yt*_e>0&&(Pe.labelExtraY+=Yt)):(wt+Pe.labelExtraY-ht)*_e>0&&($t=3*ue*Math.abs(fr-Xe.indexOf(Pe)),jr=mr.cxFinal+Y(mr.px0[0],mr.px1[0]),fn=jr+$t-(Pe.cxFinal+Pe.pxmid[0])-Pe.labelExtraX,fn*ue>0&&(Pe.labelExtraX+=fn)))}for(pe=0;pe<2;pe++)for(oe=pe?_t:vt,ce=pe?Math.max:Math.min,_e=pe?1:-1,ee=0;ee<2;ee++){for(Y=ee?Math.max:Math.min,ue=ee?1:-1,Le=ie[pe][ee],Le.sort(oe),ze=ie[1-pe][ee],Xe=ze.concat(Le),rt=[],Ve=0;Ve<Le.length;Ve++)Le[Ve].yLabelMid!==void 0&&rt.push(Le[Ve]);for(mt=!1,Ve=0;pe&&Ve<ze.length;Ve++)if(ze[Ve].yLabelMid!==void 0){mt=ze[Ve];break}for(Ve=0;Ve<rt.length;Ve++){var Fe=Ve&&rt[Ve-1];mt&&!Ve&&(Fe=mt),ut(rt[Ve],Fe)}}}function J(ie,se){for(var ee=[],pe=0;pe<ie.length;pe++){var oe=ie[pe][0],Y=oe.trace,ce=Y.domain,ue=se.w*(ce.x[1]-ce.x[0]),_e=se.h*(ce.y[1]-ce.y[0]);Y.title.text&&Y.title.position!=="middle center"&&(_e-=z(oe,se));var Le=ue/2,ze=_e/2;Y.type==="funnelarea"&&!Y.scalegroup&&(ze/=Y.aspectratio),oe.r=Math.min(Le,ze)/(1+H(Y)),oe.cx=se.l+se.w*(Y.domain.x[1]+Y.domain.x[0])/2,oe.cy=se.t+se.h*(1-Y.domain.y[0])-_e/2,Y.title.text&&Y.title.position.indexOf("bottom")!==-1&&(oe.cy-=z(oe,se)),Y.scalegroup&&ee.indexOf(Y.scalegroup)===-1&&ee.push(Y.scalegroup)}le(ie,ee)}function le(ie,se){for(var ee,pe,oe,Y=0;Y<se.length;Y++){var ce=1/0,ue=se[Y];for(pe=0;pe<ie.length;pe++)if(ee=ie[pe][0],oe=ee.trace,oe.scalegroup===ue){var _e;if(oe.type==="pie")_e=ee.r*ee.r;else if(oe.type==="funnelarea"){var Le,ze;oe.aspectratio>1?(Le=ee.r,ze=Le/oe.aspectratio):(ze=ee.r,Le=ze*oe.aspectratio),Le*=(1+oe.baseratio)/2,_e=Le*ze}ce=Math.min(ce,_e/ee.vTotal)}for(pe=0;pe<ie.length;pe++)if(ee=ie[pe][0],oe=ee.trace,oe.scalegroup===ue){var Xe=ce*ee.vTotal;oe.type==="funnelarea"&&(Xe/=(1+oe.baseratio)/2,Xe/=oe.aspectratio),ee.r=Math.sqrt(Xe)}}}function ge(ie){var se=ie[0],ee=se.r,pe=se.trace,oe=h.getRotationAngle(pe.rotation),Y=2*Math.PI/se.vTotal,ce="px0",ue="px1",_e,Le,ze;if(pe.direction==="counterclockwise"){for(_e=0;_e<ie.length&&ie[_e].hidden;_e++);if(_e===ie.length)return;oe+=Y*ie[_e].v,Y*=-1,ce="px1",ue="px0"}for(ze=de(ee,oe),_e=0;_e<ie.length;_e++)Le=ie[_e],!Le.hidden&&(Le[ce]=ze,Le.startangle=oe,oe+=Y*Le.v/2,Le.pxmid=de(ee,oe),Le.midangle=oe,oe+=Y*Le.v/2,ze=de(ee,oe),Le.stopangle=oe,Le[ue]=ze,Le.largeArc=Le.v>se.vTotal/2?1:0,Le.halfangle=Math.PI*Math.min(Le.v/se.vTotal,.5),Le.ring=1-pe.hole,Le.rInscribed=D(Le,se))}function de(ie,se){return[ie*Math.sin(se),-ie*Math.cos(se)]}function me(ie,se,ee){var pe=ie._fullLayout,oe=ee.trace,Y=oe.texttemplate,ce=oe.textinfo;if(!Y&&ce&&ce!=="none"){var ue=ce.split("+"),_e=function(be){return ue.indexOf(be)!==-1},Le=_e("label"),ze=_e("text"),Xe=_e("value"),Ve=_e("percent"),rt=pe.separators,mt;if(mt=Le?[se.label]:[],ze){var _t=h.getFirstFilled(oe.text,se.pts);m(_t)&&mt.push(_t)}Xe&&mt.push(h.formatPieValue(se.v,rt)),Ve&&mt.push(h.formatPiePercent(se.v/ee.vTotal,rt)),se.text=mt.join("<br>")}function vt(be){return{label:be.label,value:be.v,valueLabel:h.formatPieValue(be.v,pe.separators),percent:be.v/ee.vTotal,percentLabel:h.formatPiePercent(be.v/ee.vTotal,pe.separators),color:be.color,text:be.text,customdata:r.castOption(oe,be.i,"customdata")}}if(Y){var ut=r.castOption(oe,se.i,"texttemplate");if(!ut)se.text="";else{var Fe=vt(se),Pe=h.getFirstFilled(oe.text,se.pts);(m(Pe)||Pe==="")&&(Fe.text=Pe),se.text=r.texttemplateString({data:[Fe,oe._meta],fallback:oe.texttemplatefallback,labels:Fe,locale:ie._fullLayout._d3locale,template:ut})}}}function W(ie,se){var ee=ie.rotate*Math.PI/180,pe=Math.cos(ee),oe=Math.sin(ee),Y=(se.left+se.right)/2,ce=(se.top+se.bottom)/2;ie.textX=Y*pe-ce*oe,ie.textY=Y*oe+ce*pe,ie.noCenter=!0}Z.exports={plot:E,formatSliceLabel:me,transformInsideText:b,determineInsideTextFont:M,positionTitleOutside:V,prerenderTitles:k,layoutAreas:J,attachFxHandlers:_,computeTransform:W}}}),TS=Ne({"src/traces/pie/style.js"(te,Z){var v=xn(),w=Ax(),C=_c().resizeText;Z.exports=function(t){var r=t._fullLayout._pielayer.selectAll(".trace");C(t,r,"pie"),r.each(function(a){var l=a[0],i=l.trace,s=v.select(this);s.style({opacity:i.opacity}),s.selectAll("path.surface").each(function(o){v.select(this).call(w,o,i,t)})})}}}),Xg=Ne({"src/traces/pie/base_plot.js"(te){var Z=ff();te.name="pie",te.plot=function(v,w,C,P){Z.plotBasePlot(te.name,v,w,C,P)},te.clean=function(v,w,C,P){Z.cleanBasePlot(te.name,v,w,C,P)}}}),v0=Ne({"src/traces/pie/index.js"(te,Z){Z.exports={attributes:d_(),supplyDefaults:v_().supplyDefaults,supplyLayoutDefaults:V2(),layoutAttributes:bS(),calc:d0().calc,crossTraceCalc:d0().crossTraceCalc,plot:p_().plot,style:TS(),styleOne:Ax(),moduleType:"trace",name:"pie",basePlotModule:Xg(),categories:["pie-like","pie","showLegend"],meta:{}}}}),sb=Ne({"lib/pie.js"(te,Z){Z.exports=v0()}}),iR=Ne({"src/traces/sunburst/base_plot.js"(te){var Z=ff();te.name="sunburst",te.plot=function(v,w,C,P){Z.plotBasePlot(te.name,v,w,C,P)},te.clean=function(v,w,C,P){Z.cleanBasePlot(te.name,v,w,C,P)}}}),AS=Ne({"src/traces/sunburst/constants.js"(te,Z){Z.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]}}}),lb=Ne({"src/traces/sunburst/attributes.js"(te,Z){var v=qo(),{hovertemplateAttrs:w,texttemplateAttrs:C,templatefallbackAttrs:P}=Fl(),t=Wu(),r=Fc().attributes,a=d_(),l=AS(),i=fi().extendFlat,s=Fd().pattern;Z.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:i({colors:{valType:"data_array",editType:"calc"},line:{color:i({},a.marker.line.color,{dflt:null}),width:i({},a.marker.line.width,{dflt:1}),editType:"calc"},pattern:s,editType:"calc"},t("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1},editType:"plot"},text:a.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot"},texttemplate:C({editType:"plot"},{keys:l.eventDataKeys.concat(["label","value"])}),texttemplatefallback:P({editType:"plot"}),hovertext:a.hovertext,hoverinfo:i({},v.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:w({},{keys:l.eventDataKeys}),hovertemplatefallback:P(),textfont:a.textfont,insidetextorientation:a.insidetextorientation,insidetextfont:a.insidetextfont,outsidetextfont:i({},a.outsidetextfont,{}),rotation:{valType:"angle",dflt:0,editType:"plot"},sort:a.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)"},editType:"calc"},domain:r({name:"sunburst",trace:!0,editType:"calc"})}}}),SS=Ne({"src/traces/sunburst/layout_attributes.js"(te,Z){Z.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),GC=Ne({"src/traces/sunburst/defaults.js"(te,Z){var v=In(),w=lb(),C=Fc().defaults,P=mp().handleText,t=v_().handleMarkerDefaults,r=Nc(),a=r.hasColorscale,l=r.handleDefaults;Z.exports=function(s,o,u,d){function h(M,k){return v.coerce(s,o,w,M,k)}var g=h("labels"),m=h("parents");if(!g||!g.length||!m||!m.length){o.visible=!1;return}var E=h("values");E&&E.length?h("branchvalues"):h("count"),h("level"),h("maxdepth"),t(s,o,d,h);var c=o._hasColorscale=a(s,"marker","colors")||(s.marker||{}).coloraxis;c&&l(s,o,d,h,{prefix:"marker.",cLetter:"c"}),h("leaf.opacity",c?1:.7);var _=h("text");h("texttemplate"),h("texttemplatefallback"),o.texttemplate||h("textinfo",v.isArrayOrTypedArray(_)?"text+label":"label"),h("hovertext"),h("hovertemplate"),h("hovertemplatefallback");var T="auto";P(s,o,d,h,T,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),h("insidetextorientation"),h("sort"),h("rotation"),h("root.color"),C(o,d,h),o._length=null}}}),oR=Ne({"src/traces/sunburst/layout_defaults.js"(te,Z){var v=In(),w=SS();Z.exports=function(P,t){function r(a,l){return v.coerce(P,t,w,a,l)}r("sunburstcolorway",t.colorway),r("extendsunburstcolors")}}}),m_=Ne({"node_modules/d3-hierarchy/dist/d3-hierarchy.js"(te,Z){(function(v,w){typeof te=="object"&&typeof Z<"u"?w(te):(v=v||self,w(v.d3=v.d3||{}))})(te,function(v){function w(De,Ee){return De.parent===Ee.parent?1:2}function C(De){return De.reduce(P,0)/De.length}function P(De,Ee){return De+Ee.x}function t(De){return 1+De.reduce(r,0)}function r(De,Ee){return Math.max(De,Ee.y)}function a(De){for(var Ee;Ee=De.children;)De=Ee[0];return De}function l(De){for(var Ee;Ee=De.children;)De=Ee[Ee.length-1];return De}function i(){var De=w,Ee=1,Ae=1,Ie=!1;function tt(st){var Bt,Ft=0;st.eachAfter(function(Sr){var Kr=Sr.children;Kr?(Sr.x=C(Kr),Sr.y=t(Kr)):(Sr.x=Bt?Ft+=De(Sr,Bt):0,Sr.y=0,Bt=Sr)});var Wt=a(st),lr=l(st),Rr=Wt.x-De(Wt,lr)/2,Mr=lr.x+De(lr,Wt)/2;return st.eachAfter(Ie?function(Sr){Sr.x=(Sr.x-st.x)*Ee,Sr.y=(st.y-Sr.y)*Ae}:function(Sr){Sr.x=(Sr.x-Rr)/(Mr-Rr)*Ee,Sr.y=(1-(st.y?Sr.y/st.y:1))*Ae})}return tt.separation=function(st){return arguments.length?(De=st,tt):De},tt.size=function(st){return arguments.length?(Ie=!1,Ee=+st[0],Ae=+st[1],tt):Ie?null:[Ee,Ae]},tt.nodeSize=function(st){return arguments.length?(Ie=!0,Ee=+st[0],Ae=+st[1],tt):Ie?[Ee,Ae]:null},tt}function s(De){var Ee=0,Ae=De.children,Ie=Ae&&Ae.length;if(!Ie)Ee=1;else for(;--Ie>=0;)Ee+=Ae[Ie].value;De.value=Ee}function o(){return this.eachAfter(s)}function u(De){var Ee=this,Ae,Ie=[Ee],tt,st,Bt;do for(Ae=Ie.reverse(),Ie=[];Ee=Ae.pop();)if(De(Ee),tt=Ee.children,tt)for(st=0,Bt=tt.length;st<Bt;++st)Ie.push(tt[st]);while(Ie.length);return this}function d(De){for(var Ee=this,Ae=[Ee],Ie,tt;Ee=Ae.pop();)if(De(Ee),Ie=Ee.children,Ie)for(tt=Ie.length-1;tt>=0;--tt)Ae.push(Ie[tt]);return this}function h(De){for(var Ee=this,Ae=[Ee],Ie=[],tt,st,Bt;Ee=Ae.pop();)if(Ie.push(Ee),tt=Ee.children,tt)for(st=0,Bt=tt.length;st<Bt;++st)Ae.push(tt[st]);for(;Ee=Ie.pop();)De(Ee);return this}function g(De){return this.eachAfter(function(Ee){for(var Ae=+De(Ee.data)||0,Ie=Ee.children,tt=Ie&&Ie.length;--tt>=0;)Ae+=Ie[tt].value;Ee.value=Ae})}function m(De){return this.eachBefore(function(Ee){Ee.children&&Ee.children.sort(De)})}function E(De){for(var Ee=this,Ae=c(Ee,De),Ie=[Ee];Ee!==Ae;)Ee=Ee.parent,Ie.push(Ee);for(var tt=Ie.length;De!==Ae;)Ie.splice(tt,0,De),De=De.parent;return Ie}function c(De,Ee){if(De===Ee)return De;var Ae=De.ancestors(),Ie=Ee.ancestors(),tt=null;for(De=Ae.pop(),Ee=Ie.pop();De===Ee;)tt=De,De=Ae.pop(),Ee=Ie.pop();return tt}function _(){for(var De=this,Ee=[De];De=De.parent;)Ee.push(De);return Ee}function T(){var De=[];return this.each(function(Ee){De.push(Ee)}),De}function M(){var De=[];return this.eachBefore(function(Ee){Ee.children||De.push(Ee)}),De}function k(){var De=this,Ee=[];return De.each(function(Ae){Ae!==De&&Ee.push({source:Ae.parent,target:Ae})}),Ee}function b(De,Ee){var Ae=new x(De),Ie=+De.value&&(Ae.value=De.value),tt,st=[Ae],Bt,Ft,Wt,lr;for(Ee==null&&(Ee=y);tt=st.pop();)if(Ie&&(tt.value=+tt.data.value),(Ft=Ee(tt.data))&&(lr=Ft.length))for(tt.children=new Array(lr),Wt=lr-1;Wt>=0;--Wt)st.push(Bt=tt.children[Wt]=new x(Ft[Wt])),Bt.parent=tt,Bt.depth=tt.depth+1;return Ae.eachBefore(p)}function A(){return b(this).eachBefore(f)}function y(De){return De.children}function f(De){De.data=De.data.data}function p(De){var Ee=0;do De.height=Ee;while((De=De.parent)&&De.height<++Ee)}function x(De){this.data=De,this.depth=this.height=0,this.parent=null}x.prototype=b.prototype={constructor:x,count:o,each:u,eachAfter:h,eachBefore:d,sum:g,sort:m,path:E,ancestors:_,descendants:T,leaves:M,links:k,copy:A};var N=Array.prototype.slice;function D(De){for(var Ee=De.length,Ae,Ie;Ee;)Ie=Math.random()*Ee--|0,Ae=De[Ee],De[Ee]=De[Ie],De[Ie]=Ae;return De}function B(De){for(var Ee=0,Ae=(De=D(N.call(De))).length,Ie=[],tt,st;Ee<Ae;)tt=De[Ee],st&&q(st,tt)?++Ee:(st=H(Ie=U(Ie,tt)),Ee=0);return st}function U(De,Ee){var Ae,Ie;if(z(Ee,De))return[Ee];for(Ae=0;Ae<De.length;++Ae)if(V(Ee,De[Ae])&&z(J(De[Ae],Ee),De))return[De[Ae],Ee];for(Ae=0;Ae<De.length-1;++Ae)for(Ie=Ae+1;Ie<De.length;++Ie)if(V(J(De[Ae],De[Ie]),Ee)&&V(J(De[Ae],Ee),De[Ie])&&V(J(De[Ie],Ee),De[Ae])&&z(le(De[Ae],De[Ie],Ee),De))return[De[Ae],De[Ie],Ee];throw new Error}function V(De,Ee){var Ae=De.r-Ee.r,Ie=Ee.x-De.x,tt=Ee.y-De.y;return Ae<0||Ae*Ae<Ie*Ie+tt*tt}function q(De,Ee){var Ae=De.r-Ee.r+1e-6,Ie=Ee.x-De.x,tt=Ee.y-De.y;return Ae>0&&Ae*Ae>Ie*Ie+tt*tt}function z(De,Ee){for(var Ae=0;Ae<Ee.length;++Ae)if(!q(De,Ee[Ae]))return!1;return!0}function H(De){switch(De.length){case 1:return G(De[0]);case 2:return J(De[0],De[1]);case 3:return le(De[0],De[1],De[2])}}function G(De){return{x:De.x,y:De.y,r:De.r}}function J(De,Ee){var Ae=De.x,Ie=De.y,tt=De.r,st=Ee.x,Bt=Ee.y,Ft=Ee.r,Wt=st-Ae,lr=Bt-Ie,Rr=Ft-tt,Mr=Math.sqrt(Wt*Wt+lr*lr);return{x:(Ae+st+Wt/Mr*Rr)/2,y:(Ie+Bt+lr/Mr*Rr)/2,r:(Mr+tt+Ft)/2}}function le(De,Ee,Ae){var Ie=De.x,tt=De.y,st=De.r,Bt=Ee.x,Ft=Ee.y,Wt=Ee.r,lr=Ae.x,Rr=Ae.y,Mr=Ae.r,Sr=Ie-Bt,Kr=Ie-lr,Hn=tt-Ft,ga=tt-Rr,ua=Wt-st,Ta=Mr-st,Aa=Ie*Ie+tt*tt-st*st,ia=Aa-Bt*Bt-Ft*Ft+Wt*Wt,$a=Aa-lr*lr-Rr*Rr+Mr*Mr,ci=Kr*Hn-Sr*ga,_r=(Hn*$a-ga*ia)/(ci*2)-Ie,Qt=(ga*ua-Hn*Ta)/ci,yr=(Kr*ia-Sr*$a)/(ci*2)-tt,br=(Sr*Ta-Kr*ua)/ci,an=Qt*Qt+br*br-1,wn=2*(st+_r*Qt+yr*br),Ln=_r*_r+yr*yr-st*st,Bn=-(an?(wn+Math.sqrt(wn*wn-4*an*Ln))/(2*an):Ln/wn);return{x:Ie+_r+Qt*Bn,y:tt+yr+br*Bn,r:Bn}}function ge(De,Ee,Ae){var Ie=De.x-Ee.x,tt,st,Bt=De.y-Ee.y,Ft,Wt,lr=Ie*Ie+Bt*Bt;lr?(st=Ee.r+Ae.r,st*=st,Wt=De.r+Ae.r,Wt*=Wt,st>Wt?(tt=(lr+Wt-st)/(2*lr),Ft=Math.sqrt(Math.max(0,Wt/lr-tt*tt)),Ae.x=De.x-tt*Ie-Ft*Bt,Ae.y=De.y-tt*Bt+Ft*Ie):(tt=(lr+st-Wt)/(2*lr),Ft=Math.sqrt(Math.max(0,st/lr-tt*tt)),Ae.x=Ee.x+tt*Ie-Ft*Bt,Ae.y=Ee.y+tt*Bt+Ft*Ie)):(Ae.x=Ee.x+Ae.r,Ae.y=Ee.y)}function de(De,Ee){var Ae=De.r+Ee.r-1e-6,Ie=Ee.x-De.x,tt=Ee.y-De.y;return Ae>0&&Ae*Ae>Ie*Ie+tt*tt}function me(De){var Ee=De._,Ae=De.next._,Ie=Ee.r+Ae.r,tt=(Ee.x*Ae.r+Ae.x*Ee.r)/Ie,st=(Ee.y*Ae.r+Ae.y*Ee.r)/Ie;return tt*tt+st*st}function W(De){this._=De,this.next=null,this.previous=null}function ie(De){if(!(tt=De.length))return 0;var Ee,Ae,Ie,tt,st,Bt,Ft,Wt,lr,Rr,Mr;if(Ee=De[0],Ee.x=0,Ee.y=0,!(tt>1))return Ee.r;if(Ae=De[1],Ee.x=-Ae.r,Ae.x=Ee.r,Ae.y=0,!(tt>2))return Ee.r+Ae.r;ge(Ae,Ee,Ie=De[2]),Ee=new W(Ee),Ae=new W(Ae),Ie=new W(Ie),Ee.next=Ie.previous=Ae,Ae.next=Ee.previous=Ie,Ie.next=Ae.previous=Ee;e:for(Ft=3;Ft<tt;++Ft){ge(Ee._,Ae._,Ie=De[Ft]),Ie=new W(Ie),Wt=Ae.next,lr=Ee.previous,Rr=Ae._.r,Mr=Ee._.r;do if(Rr<=Mr){if(de(Wt._,Ie._)){Ae=Wt,Ee.next=Ae,Ae.previous=Ee,--Ft;continue e}Rr+=Wt._.r,Wt=Wt.next}else{if(de(lr._,Ie._)){Ee=lr,Ee.next=Ae,Ae.previous=Ee,--Ft;continue e}Mr+=lr._.r,lr=lr.previous}while(Wt!==lr.next);for(Ie.previous=Ee,Ie.next=Ae,Ee.next=Ae.previous=Ae=Ie,st=me(Ee);(Ie=Ie.next)!==Ae;)(Bt=me(Ie))<st&&(Ee=Ie,st=Bt);Ae=Ee.next}for(Ee=[Ae._],Ie=Ae;(Ie=Ie.next)!==Ae;)Ee.push(Ie._);for(Ie=B(Ee),Ft=0;Ft<tt;++Ft)Ee=De[Ft],Ee.x-=Ie.x,Ee.y-=Ie.y;return Ie.r}function se(De){return ie(De),De}function ee(De){return De==null?null:pe(De)}function pe(De){if(typeof De!="function")throw new Error;return De}function oe(){return 0}function Y(De){return function(){return De}}function ce(De){return Math.sqrt(De.value)}function ue(){var De=null,Ee=1,Ae=1,Ie=oe;function tt(st){return st.x=Ee/2,st.y=Ae/2,De?st.eachBefore(_e(De)).eachAfter(Le(Ie,.5)).eachBefore(ze(1)):st.eachBefore(_e(ce)).eachAfter(Le(oe,1)).eachAfter(Le(Ie,st.r/Math.min(Ee,Ae))).eachBefore(ze(Math.min(Ee,Ae)/(2*st.r))),st}return tt.radius=function(st){return arguments.length?(De=ee(st),tt):De},tt.size=function(st){return arguments.length?(Ee=+st[0],Ae=+st[1],tt):[Ee,Ae]},tt.padding=function(st){return arguments.length?(Ie=typeof st=="function"?st:Y(+st),tt):Ie},tt}function _e(De){return function(Ee){Ee.children||(Ee.r=Math.max(0,+De(Ee)||0))}}function Le(De,Ee){return function(Ae){if(Ie=Ae.children){var Ie,tt,st=Ie.length,Bt=De(Ae)*Ee||0,Ft;if(Bt)for(tt=0;tt<st;++tt)Ie[tt].r+=Bt;if(Ft=ie(Ie),Bt)for(tt=0;tt<st;++tt)Ie[tt].r-=Bt;Ae.r=Ft+Bt}}}function ze(De){return function(Ee){var Ae=Ee.parent;Ee.r*=De,Ae&&(Ee.x=Ae.x+De*Ee.x,Ee.y=Ae.y+De*Ee.y)}}function Xe(De){De.x0=Math.round(De.x0),De.y0=Math.round(De.y0),De.x1=Math.round(De.x1),De.y1=Math.round(De.y1)}function Ve(De,Ee,Ae,Ie,tt){for(var st=De.children,Bt,Ft=-1,Wt=st.length,lr=De.value&&(Ie-Ee)/De.value;++Ft<Wt;)Bt=st[Ft],Bt.y0=Ae,Bt.y1=tt,Bt.x0=Ee,Bt.x1=Ee+=Bt.value*lr}function rt(){var De=1,Ee=1,Ae=0,Ie=!1;function tt(Bt){var Ft=Bt.height+1;return Bt.x0=Bt.y0=Ae,Bt.x1=De,Bt.y1=Ee/Ft,Bt.eachBefore(st(Ee,Ft)),Ie&&Bt.eachBefore(Xe),Bt}function st(Bt,Ft){return function(Wt){Wt.children&&Ve(Wt,Wt.x0,Bt*(Wt.depth+1)/Ft,Wt.x1,Bt*(Wt.depth+2)/Ft);var lr=Wt.x0,Rr=Wt.y0,Mr=Wt.x1-Ae,Sr=Wt.y1-Ae;Mr<lr&&(lr=Mr=(lr+Mr)/2),Sr<Rr&&(Rr=Sr=(Rr+Sr)/2),Wt.x0=lr,Wt.y0=Rr,Wt.x1=Mr,Wt.y1=Sr}}return tt.round=function(Bt){return arguments.length?(Ie=!!Bt,tt):Ie},tt.size=function(Bt){return arguments.length?(De=+Bt[0],Ee=+Bt[1],tt):[De,Ee]},tt.padding=function(Bt){return arguments.length?(Ae=+Bt,tt):Ae},tt}var mt="$",_t={depth:-1},vt={};function ut(De){return De.id}function Fe(De){return De.parentId}function Pe(){var De=ut,Ee=Fe;function Ae(Ie){var tt,st,Bt=Ie.length,Ft,Wt,lr,Rr=new Array(Bt),Mr,Sr,Kr={};for(st=0;st<Bt;++st)tt=Ie[st],lr=Rr[st]=new x(tt),(Mr=De(tt,st,Ie))!=null&&(Mr+="")&&(Sr=mt+(lr.id=Mr),Kr[Sr]=Sr in Kr?vt:lr);for(st=0;st<Bt;++st)if(lr=Rr[st],Mr=Ee(Ie[st],st,Ie),Mr==null||!(Mr+="")){if(Ft)throw new Error("multiple roots");Ft=lr}else{if(Wt=Kr[mt+Mr],!Wt)throw new Error("missing: "+Mr);if(Wt===vt)throw new Error("ambiguous: "+Mr);Wt.children?Wt.children.push(lr):Wt.children=[lr],lr.parent=Wt}if(!Ft)throw new Error("no root");if(Ft.parent=_t,Ft.eachBefore(function(Hn){Hn.depth=Hn.parent.depth+1,--Bt}).eachBefore(p),Ft.parent=null,Bt>0)throw new Error("cycle");return Ft}return Ae.id=function(Ie){return arguments.length?(De=pe(Ie),Ae):De},Ae.parentId=function(Ie){return arguments.length?(Ee=pe(Ie),Ae):Ee},Ae}function be(De,Ee){return De.parent===Ee.parent?1:2}function Ye(De){var Ee=De.children;return Ee?Ee[0]:De.t}function yt(De){var Ee=De.children;return Ee?Ee[Ee.length-1]:De.t}function wt(De,Ee,Ae){var Ie=Ae/(Ee.i-De.i);Ee.c-=Ie,Ee.s+=Ae,De.c+=Ie,Ee.z+=Ae,Ee.m+=Ae}function ht(De){for(var Ee=0,Ae=0,Ie=De.children,tt=Ie.length,st;--tt>=0;)st=Ie[tt],st.z+=Ee,st.m+=Ee,Ee+=st.s+(Ae+=st.c)}function Yt(De,Ee,Ae){return De.a.parent===Ee.parent?De.a:Ae}function $t(De,Ee){this._=De,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=Ee}$t.prototype=Object.create(x.prototype);function fr(De){for(var Ee=new $t(De,0),Ae,Ie=[Ee],tt,st,Bt,Ft;Ae=Ie.pop();)if(st=Ae._.children)for(Ae.children=new Array(Ft=st.length),Bt=Ft-1;Bt>=0;--Bt)Ie.push(tt=Ae.children[Bt]=new $t(st[Bt],Bt)),tt.parent=Ae;return(Ee.parent=new $t(null,0)).children=[Ee],Ee}function mr(){var De=be,Ee=1,Ae=1,Ie=null;function tt(lr){var Rr=fr(lr);if(Rr.eachAfter(st),Rr.parent.m=-Rr.z,Rr.eachBefore(Bt),Ie)lr.eachBefore(Wt);else{var Mr=lr,Sr=lr,Kr=lr;lr.eachBefore(function(Aa){Aa.x<Mr.x&&(Mr=Aa),Aa.x>Sr.x&&(Sr=Aa),Aa.depth>Kr.depth&&(Kr=Aa)});var Hn=Mr===Sr?1:De(Mr,Sr)/2,ga=Hn-Mr.x,ua=Ee/(Sr.x+Hn+ga),Ta=Ae/(Kr.depth||1);lr.eachBefore(function(Aa){Aa.x=(Aa.x+ga)*ua,Aa.y=Aa.depth*Ta})}return lr}function st(lr){var Rr=lr.children,Mr=lr.parent.children,Sr=lr.i?Mr[lr.i-1]:null;if(Rr){ht(lr);var Kr=(Rr[0].z+Rr[Rr.length-1].z)/2;Sr?(lr.z=Sr.z+De(lr._,Sr._),lr.m=lr.z-Kr):lr.z=Kr}else Sr&&(lr.z=Sr.z+De(lr._,Sr._));lr.parent.A=Ft(lr,Sr,lr.parent.A||Mr[0])}function Bt(lr){lr._.x=lr.z+lr.parent.m,lr.m+=lr.parent.m}function Ft(lr,Rr,Mr){if(Rr){for(var Sr=lr,Kr=lr,Hn=Rr,ga=Sr.parent.children[0],ua=Sr.m,Ta=Kr.m,Aa=Hn.m,ia=ga.m,$a;Hn=yt(Hn),Sr=Ye(Sr),Hn&&Sr;)ga=Ye(ga),Kr=yt(Kr),Kr.a=lr,$a=Hn.z+Aa-Sr.z-ua+De(Hn._,Sr._),$a>0&&(wt(Yt(Hn,lr,Mr),lr,$a),ua+=$a,Ta+=$a),Aa+=Hn.m,ua+=Sr.m,ia+=ga.m,Ta+=Kr.m;Hn&&!yt(Kr)&&(Kr.t=Hn,Kr.m+=Aa-Ta),Sr&&!Ye(ga)&&(ga.t=Sr,ga.m+=ua-ia,Mr=lr)}return Mr}function Wt(lr){lr.x*=Ee,lr.y=lr.depth*Ae}return tt.separation=function(lr){return arguments.length?(De=lr,tt):De},tt.size=function(lr){return arguments.length?(Ie=!1,Ee=+lr[0],Ae=+lr[1],tt):Ie?null:[Ee,Ae]},tt.nodeSize=function(lr){return arguments.length?(Ie=!0,Ee=+lr[0],Ae=+lr[1],tt):Ie?[Ee,Ae]:null},tt}function Ur(De,Ee,Ae,Ie,tt){for(var st=De.children,Bt,Ft=-1,Wt=st.length,lr=De.value&&(tt-Ae)/De.value;++Ft<Wt;)Bt=st[Ft],Bt.x0=Ee,Bt.x1=Ie,Bt.y0=Ae,Bt.y1=Ae+=Bt.value*lr}var jr=(1+Math.sqrt(5))/2;function fn(De,Ee,Ae,Ie,tt,st){for(var Bt=[],Ft=Ee.children,Wt,lr,Rr=0,Mr=0,Sr=Ft.length,Kr,Hn,ga=Ee.value,ua,Ta,Aa,ia,$a,ci,_r;Rr<Sr;){Kr=tt-Ae,Hn=st-Ie;do ua=Ft[Mr++].value;while(!ua&&Mr<Sr);for(Ta=Aa=ua,ci=Math.max(Hn/Kr,Kr/Hn)/(ga*De),_r=ua*ua*ci,$a=Math.max(Aa/_r,_r/Ta);Mr<Sr;++Mr){if(ua+=lr=Ft[Mr].value,lr<Ta&&(Ta=lr),lr>Aa&&(Aa=lr),_r=ua*ua*ci,ia=Math.max(Aa/_r,_r/Ta),ia>$a){ua-=lr;break}$a=ia}Bt.push(Wt={value:ua,dice:Kr<Hn,children:Ft.slice(Rr,Mr)}),Wt.dice?Ve(Wt,Ae,Ie,tt,ga?Ie+=Hn*ua/ga:st):Ur(Wt,Ae,Ie,ga?Ae+=Kr*ua/ga:tt,st),ga-=ua,Rr=Mr}return Bt}var Br=(function De(Ee){function Ae(Ie,tt,st,Bt,Ft){fn(Ee,Ie,tt,st,Bt,Ft)}return Ae.ratio=function(Ie){return De((Ie=+Ie)>1?Ie:1)},Ae})(jr);function Qr(){var De=Br,Ee=!1,Ae=1,Ie=1,tt=[0],st=oe,Bt=oe,Ft=oe,Wt=oe,lr=oe;function Rr(Sr){return Sr.x0=Sr.y0=0,Sr.x1=Ae,Sr.y1=Ie,Sr.eachBefore(Mr),tt=[0],Ee&&Sr.eachBefore(Xe),Sr}function Mr(Sr){var Kr=tt[Sr.depth],Hn=Sr.x0+Kr,ga=Sr.y0+Kr,ua=Sr.x1-Kr,Ta=Sr.y1-Kr;ua<Hn&&(Hn=ua=(Hn+ua)/2),Ta<ga&&(ga=Ta=(ga+Ta)/2),Sr.x0=Hn,Sr.y0=ga,Sr.x1=ua,Sr.y1=Ta,Sr.children&&(Kr=tt[Sr.depth+1]=st(Sr)/2,Hn+=lr(Sr)-Kr,ga+=Bt(Sr)-Kr,ua-=Ft(Sr)-Kr,Ta-=Wt(Sr)-Kr,ua<Hn&&(Hn=ua=(Hn+ua)/2),Ta<ga&&(ga=Ta=(ga+Ta)/2),De(Sr,Hn,ga,ua,Ta))}return Rr.round=function(Sr){return arguments.length?(Ee=!!Sr,Rr):Ee},Rr.size=function(Sr){return arguments.length?(Ae=+Sr[0],Ie=+Sr[1],Rr):[Ae,Ie]},Rr.tile=function(Sr){return arguments.length?(De=pe(Sr),Rr):De},Rr.padding=function(Sr){return arguments.length?Rr.paddingInner(Sr).paddingOuter(Sr):Rr.paddingInner()},Rr.paddingInner=function(Sr){return arguments.length?(st=typeof Sr=="function"?Sr:Y(+Sr),Rr):st},Rr.paddingOuter=function(Sr){return arguments.length?Rr.paddingTop(Sr).paddingRight(Sr).paddingBottom(Sr).paddingLeft(Sr):Rr.paddingTop()},Rr.paddingTop=function(Sr){return arguments.length?(Bt=typeof Sr=="function"?Sr:Y(+Sr),Rr):Bt},Rr.paddingRight=function(Sr){return arguments.length?(Ft=typeof Sr=="function"?Sr:Y(+Sr),Rr):Ft},Rr.paddingBottom=function(Sr){return arguments.length?(Wt=typeof Sr=="function"?Sr:Y(+Sr),Rr):Wt},Rr.paddingLeft=function(Sr){return arguments.length?(lr=typeof Sr=="function"?Sr:Y(+Sr),Rr):lr},Rr}function Ot(De,Ee,Ae,Ie,tt){var st=De.children,Bt,Ft=st.length,Wt,lr=new Array(Ft+1);for(lr[0]=Wt=Bt=0;Bt<Ft;++Bt)lr[Bt+1]=Wt+=st[Bt].value;Rr(0,Ft,De.value,Ee,Ae,Ie,tt);function Rr(Mr,Sr,Kr,Hn,ga,ua,Ta){if(Mr>=Sr-1){var Aa=st[Mr];Aa.x0=Hn,Aa.y0=ga,Aa.x1=ua,Aa.y1=Ta;return}for(var ia=lr[Mr],$a=Kr/2+ia,ci=Mr+1,_r=Sr-1;ci<_r;){var Qt=ci+_r>>>1;lr[Qt]<$a?ci=Qt+1:_r=Qt}$a-lr[ci-1]<lr[ci]-$a&&Mr+1<ci&&--ci;var yr=lr[ci]-ia,br=Kr-yr;if(ua-Hn>Ta-ga){var an=(Hn*br+ua*yr)/Kr;Rr(Mr,ci,yr,Hn,ga,an,Ta),Rr(ci,Sr,br,an,ga,ua,Ta)}else{var wn=(ga*br+Ta*yr)/Kr;Rr(Mr,ci,yr,Hn,ga,ua,wn),Rr(ci,Sr,br,Hn,wn,ua,Ta)}}}function $e(De,Ee,Ae,Ie,tt){(De.depth&1?Ur:Ve)(De,Ee,Ae,Ie,tt)}var ot=(function De(Ee){function Ae(Ie,tt,st,Bt,Ft){if((Wt=Ie._squarify)&&Wt.ratio===Ee)for(var Wt,lr,Rr,Mr,Sr=-1,Kr,Hn=Wt.length,ga=Ie.value;++Sr<Hn;){for(lr=Wt[Sr],Rr=lr.children,Mr=lr.value=0,Kr=Rr.length;Mr<Kr;++Mr)lr.value+=Rr[Mr].value;lr.dice?Ve(lr,tt,st,Bt,st+=(Ft-st)*lr.value/ga):Ur(lr,tt,st,tt+=(Bt-tt)*lr.value/ga,Ft),ga-=lr.value}else Ie._squarify=Wt=fn(Ee,Ie,tt,st,Bt,Ft),Wt.ratio=Ee}return Ae.ratio=function(Ie){return De((Ie=+Ie)>1?Ie:1)},Ae})(jr);v.cluster=i,v.hierarchy=b,v.pack=ue,v.packEnclose=B,v.packSiblings=se,v.partition=rt,v.stratify=Pe,v.tree=mr,v.treemap=Qr,v.treemapBinary=Ot,v.treemapDice=Ve,v.treemapResquarify=ot,v.treemapSlice=Ur,v.treemapSliceDice=$e,v.treemapSquarify=Br,Object.defineProperty(v,"__esModule",{value:!0})})}}),ub=Ne({"src/traces/sunburst/calc.js"(te){var Z=m_(),v=Fn(),w=In(),C=Nc().makeColorScaleFuncFromTrace,P=d0().makePullColorFn,t=d0().generateExtendedColors,r=Nc().calc,a=da().ALMOST_EQUAL,l={},i={},s={};te.calc=function(u,d){var h=u._fullLayout,g=d.ids,m=w.isArrayOrTypedArray(g),E=d.labels,c=d.parents,_=d.values,T=w.isArrayOrTypedArray(_),M=[],k={},b={},A=function(se,ee){k[se]?k[se].push(ee):k[se]=[ee],b[ee]=1},y=function(se){return se||typeof se=="number"},f=function(se){return!T||v(_[se])&&_[se]>=0},p,x,N;m?(p=Math.min(g.length,c.length),x=function(se){return y(g[se])&&f(se)},N=function(se){return String(g[se])}):(p=Math.min(E.length,c.length),x=function(se){return y(E[se])&&f(se)},N=function(se){return String(E[se])}),T&&(p=Math.min(p,_.length));for(var D=0;D<p;D++)if(x(D)){var B=N(D),U=y(c[D])?String(c[D]):"",V={i:D,id:B,pid:U,label:y(E[D])?String(E[D]):""};T&&(V.v=+_[D]),M.push(V),A(U,B)}if(k[""]){if(k[""].length>1){for(var H=w.randstr(),G=0;G<M.length;G++)M[G].pid===""&&(M[G].pid=H);M.unshift({hasMultipleRoots:!0,id:H,pid:"",label:""})}}else{var q=[],z;for(z in k)b[z]||q.push(z);if(q.length===1)z=q[0],M.unshift({hasImpliedRoot:!0,id:z,pid:"",label:z});else return w.warn(["Multiple implied roots, cannot build",d.type,"hierarchy of",d.name+".","These roots include:",q.join(", ")].join(" "))}var J;try{J=Z.stratify().id(function(se){return se.id}).parentId(function(se){return se.pid})(M)}catch(se){return w.warn(["Failed to build",d.type,"hierarchy of",d.name+".","Error:",se.message].join(" "))}var le=Z.hierarchy(J),ge=!1;if(T)switch(d.branchvalues){case"remainder":le.sum(function(se){return se.data.v});break;case"total":le.each(function(se){var ee=se.data.data,pe=ee.v;if(se.children){var oe=se.children.reduce(function(Y,ce){return Y+ce.data.data.v},0);if((ee.hasImpliedRoot||ee.hasMultipleRoots)&&(pe=oe),pe<oe*a)return ge=!0,w.warn(["Total value for node",se.data.data.id,"of",d.name,"is smaller than the sum of its children.",`
parent value =`,pe,`
children sum =`,oe].join(" "))}se.value=pe});break}else o(le,d,{branches:d.count.indexOf("branches")!==-1,leaves:d.count.indexOf("leaves")!==-1});if(!ge){d.sort&&le.sort(function(se,ee){return ee.value-se.value});var de,me,W=d.marker.colors||[],ie=!!W.length;return d._hasColorscale?(ie||(W=T?d.values:d._values),r(u,d,{vals:W,containerStr:"marker",cLetter:"c"}),me=C(d.marker)):de=P(h["_"+d.type+"colormap"]),le.each(function(se){var ee=se.data.data;ee.color=d._hasColorscale?me(W[ee.i]):de(W[ee.i],ee.id)}),M[0].hierarchy=le,M}},te._runCrossTraceCalc=function(u,d){var h=d._fullLayout,g=d.calcdata,m=h[u+"colorway"],E=h["_"+u+"colormap"];h["extend"+u+"colors"]&&(m=t(m,u==="icicle"?s:u==="treemap"?i:l));var c=0,_;function T(A){var y=A.data.data,f=y.id;y.color===!1&&(E[f]?y.color=E[f]:A.parent?A.parent.parent?y.color=A.parent.data.data.color:(E[f]=y.color=m[c%m.length],c++):y.color=_)}for(var M=0;M<g.length;M++){var k=g[M],b=k[0];b.trace.type===u&&b.hierarchy&&(_=b.trace.root.color,b.hierarchy.each(T))}},te.crossTraceCalc=function(u){return te._runCrossTraceCalc("sunburst",u)};function o(u,d,h){var g=0,m=u.children;if(m){for(var E=m.length,c=0;c<E;c++)g+=o(m[c],d,h);h.branches&&g++}else h.leaves&&g++;return u.value=u.data.data.value=g,d._values||(d._values=[]),d._values[u.data.data.i]=g,g}}});function Gy(te,Z,v){te.prototype=Z.prototype=v,v.constructor=te}function cb(te,Z){var v=Object.create(te.prototype);for(var w in Z)v[w]=Z[w];return v}var fb=zr({"node_modules/d3-color/src/define.js"(){}});function p0(){}function XC(){return this.rgb().formatHex()}function sR(){return this.rgb().formatHex8()}function hb(){return ES(this).formatHsl()}function WC(){return this.rgb().formatRgb()}function g_(te){var Z,v;return te=(te+"").trim().toLowerCase(),(Z=CS.exec(te))?(v=Z[1].length,Z=parseInt(Z[1],16),v===6?tc(Z):v===3?new Hd(Z>>8&15|Z>>4&240,Z>>4&15|Z&240,(Z&15)<<4|Z&15,1):v===8?y_(Z>>24&255,Z>>16&255,Z>>8&255,(Z&255)/255):v===4?y_(Z>>12&15|Z>>8&240,Z>>8&15|Z>>4&240,Z>>4&15|Z&240,((Z&15)<<4|Z&15)/255):null):(Z=kS.exec(te))?new Hd(Z[1],Z[2],Z[3],1):(Z=Y2.exec(te))?new Hd(Z[1]*255/100,Z[2]*255/100,Z[3]*255/100,1):(Z=Z2.exec(te))?y_(Z[1],Z[2],Z[3],Z[4]):(Z=ZC.exec(te))?y_(Z[1]*255/100,Z[2]*255/100,Z[3]*255/100,Z[4]):(Z=PS.exec(te))?YC(Z[1],Z[2]/100,Z[3]/100,1):(Z=$C.exec(te))?YC(Z[1],Z[2]/100,Z[3]/100,Z[4]):$2.hasOwnProperty(te)?tc($2[te]):te==="transparent"?new Hd(NaN,NaN,NaN,0):null}function tc(te){return new Hd(te>>16&255,te>>8&255,te&255,1)}function y_(te,Z,v,w){return w<=0&&(te=Z=v=NaN),new Hd(te,Z,v,w)}function __(te){return te instanceof p0||(te=g_(te)),te?(te=te.rgb(),new Hd(te.r,te.g,te.b,te.opacity)):new Hd}function x_(te,Z,v,w){return arguments.length===1?__(te):new Hd(te,Z,v,w??1)}function Hd(te,Z,v,w){this.r=+te,this.g=+Z,this.b=+v,this.opacity=+w}function H2(){return`#${Xy(this.r)}${Xy(this.g)}${Xy(this.b)}`}function db(){return`#${Xy(this.r)}${Xy(this.g)}${Xy(this.b)}${Xy((isNaN(this.opacity)?1:this.opacity)*255)}`}function vb(){const te=G2(this.opacity);return`${te===1?"rgb(":"rgba("}${Wg(this.r)}, ${Wg(this.g)}, ${Wg(this.b)}${te===1?")":`, ${te})`}`}function G2(te){return isNaN(te)?1:Math.max(0,Math.min(1,te))}function Wg(te){return Math.max(0,Math.min(255,Math.round(te)||0))}function Xy(te){return te=Wg(te),(te<16?"0":"")+te.toString(16)}function YC(te,Z,v,w){return w<=0?te=Z=v=NaN:v<=0||v>=1?te=Z=NaN:Z<=0&&(te=NaN),new rc(te,Z,v,w)}function ES(te){if(te instanceof rc)return new rc(te.h,te.s,te.l,te.opacity);if(te instanceof p0||(te=g_(te)),!te)return new rc;if(te instanceof rc)return te;te=te.rgb();var Z=te.r/255,v=te.g/255,w=te.b/255,C=Math.min(Z,v,w),P=Math.max(Z,v,w),t=NaN,r=P-C,a=(P+C)/2;return r?(Z===P?t=(v-w)/r+(v<w)*6:v===P?t=(w-Z)/r+2:t=(Z-v)/r+4,r/=a<.5?P+C:2-P-C,t*=60):r=a>0&&a<1?0:t,new rc(t,r,a,te.opacity)}function X2(te,Z,v,w){return arguments.length===1?ES(te):new rc(te,Z,v,w??1)}function rc(te,Z,v,w){this.h=+te,this.s=+Z,this.l=+v,this.opacity=+w}function W2(te){return te=(te||0)%360,te<0?te+360:te}function Pd(te){return Math.max(0,Math.min(1,te||0))}function MS(te,Z,v){return(te<60?Z+(v-Z)*te/60:te<180?v:te<240?Z+(v-Z)*(240-te)/60:Z)*255}var tg,Wy,rg,Yg,wp,CS,kS,Y2,Z2,ZC,PS,$C,$2,LS=zr({"node_modules/d3-color/src/color.js"(){fb(),tg=.7,Wy=1/tg,rg="\\s*([+-]?\\d+)\\s*",Yg="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",wp="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",CS=/^#([0-9a-f]{3,8})$/,kS=new RegExp(`^rgb\\(${rg},${rg},${rg}\\)$`),Y2=new RegExp(`^rgb\\(${wp},${wp},${wp}\\)$`),Z2=new RegExp(`^rgba\\(${rg},${rg},${rg},${Yg}\\)$`),ZC=new RegExp(`^rgba\\(${wp},${wp},${wp},${Yg}\\)$`),PS=new RegExp(`^hsl\\(${Yg},${wp},${wp}\\)$`),$C=new RegExp(`^hsla\\(${Yg},${wp},${wp},${Yg}\\)$`),$2={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},Gy(p0,g_,{copy(te){return Object.assign(new this.constructor,this,te)},displayable(){return this.rgb().displayable()},hex:XC,formatHex:XC,formatHex8:sR,formatHsl:hb,formatRgb:WC,toString:WC}),Gy(Hd,x_,cb(p0,{brighter(te){return te=te==null?Wy:Math.pow(Wy,te),new Hd(this.r*te,this.g*te,this.b*te,this.opacity)},darker(te){return te=te==null?tg:Math.pow(tg,te),new Hd(this.r*te,this.g*te,this.b*te,this.opacity)},rgb(){return this},clamp(){return new Hd(Wg(this.r),Wg(this.g),Wg(this.b),G2(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:H2,formatHex:H2,formatHex8:db,formatRgb:vb,toString:vb})),Gy(rc,X2,cb(p0,{brighter(te){return te=te==null?Wy:Math.pow(Wy,te),new rc(this.h,this.s,this.l*te,this.opacity)},darker(te){return te=te==null?tg:Math.pow(tg,te),new rc(this.h,this.s,this.l*te,this.opacity)},rgb(){var te=this.h%360+(this.h<0)*360,Z=isNaN(te)||isNaN(this.s)?0:this.s,v=this.l,w=v+(v<.5?v:1-v)*Z,C=2*v-w;return new Hd(MS(te>=240?te-240:te+120,C,w),MS(te,C,w),MS(te<120?te+240:te-120,C,w),this.opacity)},clamp(){return new rc(W2(this.h),Pd(this.s),Pd(this.l),G2(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const te=G2(this.opacity);return`${te===1?"hsl(":"hsla("}${W2(this.h)}, ${Pd(this.s)*100}%, ${Pd(this.l)*100}%${te===1?")":`, ${te})`}`}}))}}),RS,m0,IS=zr({"node_modules/d3-color/src/math.js"(){RS=Math.PI/180,m0=180/Math.PI}});function DS(te){if(te instanceof g0)return new g0(te.l,te.a,te.b,te.opacity);if(te instanceof Um)return zS(te);te instanceof Hd||(te=__(te));var Z=gb(te.r),v=gb(te.g),w=gb(te.b),C=OS((.2225045*Z+.7168786*v+.0606169*w)/Yy),P,t;return Z===v&&v===w?P=t=C:(P=OS((.4360747*Z+.3850649*v+.1430804*w)/J2),t=OS((.0139322*Z+.0971045*v+.7141733*w)/Ap)),new g0(116*C-16,500*(P-C),200*(C-t),te.opacity)}function pb(te,Z,v,w){return arguments.length===1?DS(te):new g0(te,Z,v,w??1)}function g0(te,Z,v,w){this.l=+te,this.a=+Z,this.b=+v,this.opacity=+w}function OS(te){return te>KC?Math.pow(te,.3333333333333333):te/qm+Q2}function K2(te){return te>y0?te*te*te:qm*(te-Q2)}function mb(te){return 255*(te<=.0031308?12.92*te:1.055*Math.pow(te,.4166666666666667)-.055)}function gb(te){return(te/=255)<=.04045?te/12.92:Math.pow((te+.055)/1.055,2.4)}function lR(te){if(te instanceof Um)return new Um(te.h,te.c,te.l,te.opacity);if(te instanceof g0||(te=DS(te)),te.a===0&&te.b===0)return new Um(NaN,0<te.l&&te.l<100?0:NaN,te.l,te.opacity);var Z=Math.atan2(te.b,te.a)*m0;return new Um(Z<0?Z+360:Z,Math.sqrt(te.a*te.a+te.b*te.b),te.l,te.opacity)}function Tp(te,Z,v,w){return arguments.length===1?lR(te):new Um(te,Z,v,w??1)}function Um(te,Z,v,w){this.h=+te,this.c=+Z,this.l=+v,this.opacity=+w}function zS(te){if(isNaN(te.h))return new g0(te.l,0,0,te.opacity);var Z=te.h*RS;return new g0(te.l,Math.cos(Z)*te.c,Math.sin(Z)*te.c,te.opacity)}var b_,J2,Yy,Ap,Q2,y0,qm,KC,uR=zr({"node_modules/d3-color/src/lab.js"(){fb(),LS(),IS(),b_=18,J2=.96422,Yy=1,Ap=.82521,Q2=4/29,y0=6/29,qm=3*y0*y0,KC=y0*y0*y0,Gy(g0,pb,cb(p0,{brighter(te){return new g0(this.l+b_*(te??1),this.a,this.b,this.opacity)},darker(te){return new g0(this.l-b_*(te??1),this.a,this.b,this.opacity)},rgb(){var te=(this.l+16)/116,Z=isNaN(this.a)?te:te+this.a/500,v=isNaN(this.b)?te:te-this.b/200;return Z=J2*K2(Z),te=Yy*K2(te),v=Ap*K2(v),new Hd(mb(3.1338561*Z-1.6168667*te-.4906146*v),mb(-.9787684*Z+1.9161415*te+.033454*v),mb(.0719453*Z-.2289914*te+1.4052427*v),this.opacity)}})),Gy(Um,Tp,cb(p0,{brighter(te){return new Um(this.h,this.c,this.l+b_*(te??1),this.opacity)},darker(te){return new Um(this.h,this.c,this.l-b_*(te??1),this.opacity)},rgb(){return zS(this).rgb()}}))}});function w_(te){if(te instanceof Zy)return new Zy(te.h,te.s,te.l,te.opacity);te instanceof Hd||(te=__(te));var Z=te.r/255,v=te.g/255,w=te.b/255,C=(Zg*w+FS*Z-n3*v)/(Zg+FS-n3),P=w-C,t=(T_*(v-C)-r3*P)/yb,r=Math.sqrt(t*t+P*P)/(T_*C*(1-C)),a=r?Math.atan2(t,P)*m0-120:NaN;return new Zy(a<0?a+360:a,r,C,te.opacity)}function e3(te,Z,v,w){return arguments.length===1?w_(te):new Zy(te,Z,v,w??1)}function Zy(te,Z,v,w){this.h=+te,this.s=+Z,this.l=+v,this.opacity=+w}var NS,t3,r3,yb,T_,FS,n3,Zg,_b=zr({"node_modules/d3-color/src/cubehelix.js"(){fb(),LS(),IS(),NS=-.14861,t3=1.78277,r3=-.29227,yb=-.90649,T_=1.97294,FS=T_*yb,n3=T_*t3,Zg=t3*r3-yb*NS,Gy(Zy,e3,cb(p0,{brighter(te){return te=te==null?Wy:Math.pow(Wy,te),new Zy(this.h,this.s,this.l*te,this.opacity)},darker(te){return te=te==null?tg:Math.pow(tg,te),new Zy(this.h,this.s,this.l*te,this.opacity)},rgb(){var te=isNaN(this.h)?0:(this.h+120)*RS,Z=+this.l,v=isNaN(this.s)?0:this.s*Z*(1-Z),w=Math.cos(te),C=Math.sin(te);return new Hd(255*(Z+v*(NS*w+t3*C)),255*(Z+v*(r3*w+yb*C)),255*(Z+v*(T_*w)),this.opacity)}}))}}),$y=zr({"node_modules/d3-color/src/index.js"(){LS(),uR(),_b()}});function JC(te,Z,v,w,C){var P=te*te,t=P*te;return((1-3*te+3*P-t)*Z+(4-6*P+3*t)*v+(1+3*te+3*P-3*t)*w+t*C)/6}function Ky(te){var Z=te.length-1;return function(v){var w=v<=0?v=0:v>=1?(v=1,Z-1):Math.floor(v*Z),C=te[w],P=te[w+1],t=w>0?te[w-1]:2*C-P,r=w<Z-1?te[w+2]:2*P-C;return JC((v-w/Z)*Z,t,C,P,r)}}var Jy=zr({"node_modules/d3-interpolate/src/basis.js"(){}});function BS(te){var Z=te.length;return function(v){var w=Math.floor(((v%=1)<0?++v:v)*Z),C=te[(w+Z-1)%Z],P=te[w%Z],t=te[(w+1)%Z],r=te[(w+2)%Z];return JC((v-w/Z)*Z,C,P,t,r)}}var xb=zr({"node_modules/d3-interpolate/src/basisClosed.js"(){Jy()}}),Qy,a3=zr({"node_modules/d3-interpolate/src/constant.js"(){Qy=te=>()=>te}});function bb(te,Z){return function(v){return te+v*Z}}function QC(te,Z,v){return te=Math.pow(te,v),Z=Math.pow(Z,v)-te,v=1/v,function(w){return Math.pow(te+w*Z,v)}}function wb(te,Z){var v=Z-te;return v?bb(te,v>180||v<-180?v-360*Math.round(v/360):v):Qy(isNaN(te)?Z:te)}function cR(te){return(te=+te)==1?Gd:function(Z,v){return v-Z?QC(Z,v,te):Qy(isNaN(Z)?v:Z)}}function Gd(te,Z){var v=Z-te;return v?bb(te,v):Qy(isNaN(te)?Z:te)}var A_=zr({"node_modules/d3-interpolate/src/color.js"(){a3()}});function i3(te){return function(Z){var v=Z.length,w=new Array(v),C=new Array(v),P=new Array(v),t,r;for(t=0;t<v;++t)r=x_(Z[t]),w[t]=r.r||0,C[t]=r.g||0,P[t]=r.b||0;return w=te(w),C=te(C),P=te(P),r.opacity=1,function(a){return r.r=w(a),r.g=C(a),r.b=P(a),r+""}}}var o3,Tb,Ab,Sb=zr({"node_modules/d3-interpolate/src/rgb.js"(){$y(),Jy(),xb(),A_(),o3=(function te(Z){var v=cR(Z);function w(C,P){var t=v((C=x_(C)).r,(P=x_(P)).r),r=v(C.g,P.g),a=v(C.b,P.b),l=Gd(C.opacity,P.opacity);return function(i){return C.r=t(i),C.g=r(i),C.b=a(i),C.opacity=l(i),C+""}}return w.gamma=te,w})(1),Tb=i3(Ky),Ab=i3(BS)}});function jS(te,Z){Z||(Z=[]);var v=te?Math.min(Z.length,te.length):0,w=Z.slice(),C;return function(P){for(C=0;C<v;++C)w[C]=te[C]*(1-P)+Z[C]*P;return w}}function S_(te){return ArrayBuffer.isView(te)&&!(te instanceof DataView)}var US=zr({"node_modules/d3-interpolate/src/numberArray.js"(){}});function ek(te,Z){return(S_(Z)?jS:qS)(te,Z)}function qS(te,Z){var v=Z?Z.length:0,w=te?Math.min(v,te.length):0,C=new Array(w),P=new Array(v),t;for(t=0;t<w;++t)C[t]=M_(te[t],Z[t]);for(;t<v;++t)P[t]=Z[t];return function(r){for(t=0;t<w;++t)P[t]=C[t](r);return P}}var VS=zr({"node_modules/d3-interpolate/src/array.js"(){Hm(),US()}});function HS(te,Z){var v=new Date;return te=+te,Z=+Z,function(w){return v.setTime(te*(1-w)+Z*w),v}}var s3=zr({"node_modules/d3-interpolate/src/date.js"(){}});function Vm(te,Z){return te=+te,Z=+Z,function(v){return te*(1-v)+Z*v}}var Eb=zr({"node_modules/d3-interpolate/src/number.js"(){}});function Mb(te,Z){var v={},w={},C;(te===null||typeof te!="object")&&(te={}),(Z===null||typeof Z!="object")&&(Z={});for(C in Z)C in te?v[C]=M_(te[C],Z[C]):w[C]=Z[C];return function(P){for(C in v)w[C]=v[C](P);return w}}var tk=zr({"node_modules/d3-interpolate/src/object.js"(){Hm()}});function fR(te){return function(){return te}}function GS(te){return function(Z){return te(Z)+""}}function l3(te,Z){var v=e1.lastIndex=E_.lastIndex=0,w,C,P,t=-1,r=[],a=[];for(te=te+"",Z=Z+"";(w=e1.exec(te))&&(C=E_.exec(Z));)(P=C.index)>v&&(P=Z.slice(v,P),r[t]?r[t]+=P:r[++t]=P),(w=w[0])===(C=C[0])?r[t]?r[t]+=C:r[++t]=C:(r[++t]=null,a.push({i:t,x:Vm(w,C)})),v=E_.lastIndex;return v<Z.length&&(P=Z.slice(v),r[t]?r[t]+=P:r[++t]=P),r.length<2?a[0]?GS(a[0].x):fR(Z):(Z=a.length,function(l){for(var i=0,s;i<Z;++i)r[(s=a[i]).i]=s.x(l);return r.join("")})}var e1,E_,XS=zr({"node_modules/d3-interpolate/src/string.js"(){Eb(),e1=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,E_=new RegExp(e1.source,"g")}});function M_(te,Z){var v=typeof Z,w;return Z==null||v==="boolean"?Qy(Z):(v==="number"?Vm:v==="string"?(w=g_(Z))?(Z=w,o3):l3:Z instanceof g_?o3:Z instanceof Date?HS:S_(Z)?jS:Array.isArray(Z)?qS:typeof Z.valueOf!="function"&&typeof Z.toString!="function"||isNaN(Z)?Mb:Vm)(te,Z)}var Hm=zr({"node_modules/d3-interpolate/src/value.js"(){$y(),Sb(),VS(),s3(),Eb(),tk(),XS(),a3(),US()}});function $g(te){var Z=te.length;return function(v){return te[Math.max(0,Math.min(Z-1,Math.floor(v*Z)))]}}var Kg=zr({"node_modules/d3-interpolate/src/discrete.js"(){}});function Cb(te,Z){var v=wb(+te,+Z);return function(w){var C=v(w);return C-360*Math.floor(C/360)}}var kb=zr({"node_modules/d3-interpolate/src/hue.js"(){A_()}});function Jg(te,Z){return te=+te,Z=+Z,function(v){return Math.round(te*(1-v)+Z*v)}}var hR=zr({"node_modules/d3-interpolate/src/round.js"(){}});function WS(te,Z,v,w,C,P){var t,r,a;return(t=Math.sqrt(te*te+Z*Z))&&(te/=t,Z/=t),(a=te*v+Z*w)&&(v-=te*a,w-=Z*a),(r=Math.sqrt(v*v+w*w))&&(v/=r,w/=r,a/=r),te*w<Z*v&&(te=-te,Z=-Z,a=-a,t=-t),{translateX:C,translateY:P,rotate:Math.atan2(Z,te)*t1,skewX:Math.atan(a)*t1,scaleX:t,scaleY:r}}var t1,u3,rk=zr({"node_modules/d3-interpolate/src/transform/decompose.js"(){t1=180/Math.PI,u3={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}}});function c3(te){const Z=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(te+"");return Z.isIdentity?u3:WS(Z.a,Z.b,Z.c,Z.d,Z.e,Z.f)}function nk(te){return te==null||(f3||(f3=document.createElementNS("http://www.w3.org/2000/svg","g")),f3.setAttribute("transform",te),!(te=f3.transform.baseVal.consolidate()))?u3:(te=te.matrix,WS(te.a,te.b,te.c,te.d,te.e,te.f))}var f3,h3=zr({"node_modules/d3-interpolate/src/transform/parse.js"(){rk()}});function Pb(te,Z,v,w){function C(l){return l.length?l.pop()+" ":""}function P(l,i,s,o,u,d){if(l!==s||i!==o){var h=u.push("translate(",null,Z,null,v);d.push({i:h-4,x:Vm(l,s)},{i:h-2,x:Vm(i,o)})}else(s||o)&&u.push("translate("+s+Z+o+v)}function t(l,i,s,o){l!==i?(l-i>180?i+=360:i-l>180&&(l+=360),o.push({i:s.push(C(s)+"rotate(",null,w)-2,x:Vm(l,i)})):i&&s.push(C(s)+"rotate("+i+w)}function r(l,i,s,o){l!==i?o.push({i:s.push(C(s)+"skewX(",null,w)-2,x:Vm(l,i)}):i&&s.push(C(s)+"skewX("+i+w)}function a(l,i,s,o,u,d){if(l!==s||i!==o){var h=u.push(C(u)+"scale(",null,",",null,")");d.push({i:h-4,x:Vm(l,s)},{i:h-2,x:Vm(i,o)})}else(s!==1||o!==1)&&u.push(C(u)+"scale("+s+","+o+")")}return function(l,i){var s=[],o=[];return l=te(l),i=te(i),P(l.translateX,l.translateY,i.translateX,i.translateY,s,o),t(l.rotate,i.rotate,s,o),r(l.skewX,i.skewX,s,o),a(l.scaleX,l.scaleY,i.scaleX,i.scaleY,s,o),l=i=null,function(u){for(var d=-1,h=o.length,g;++d<h;)s[(g=o[d]).i]=g.x(u);return s.join("")}}}var YS,r1,ak=zr({"node_modules/d3-interpolate/src/transform/index.js"(){Eb(),h3(),YS=Pb(c3,"px, ","px)","deg)"),r1=Pb(nk,", ",")",")")}});function d3(te){return((te=Math.exp(te))+1/te)/2}function v3(te){return((te=Math.exp(te))-1/te)/2}function ik(te){return((te=Math.exp(2*te))-1)/(te+1)}var ok,Lb,j=zr({"node_modules/d3-interpolate/src/zoom.js"(){ok=1e-12,Lb=(function te(Z,v,w){function C(P,t){var r=P[0],a=P[1],l=P[2],i=t[0],s=t[1],o=t[2],u=i-r,d=s-a,h=u*u+d*d,g,m;if(h<ok)m=Math.log(o/l)/Z,g=function(k){return[r+k*u,a+k*d,l*Math.exp(Z*k*m)]};else{var E=Math.sqrt(h),c=(o*o-l*l+w*h)/(2*l*v*E),_=(o*o-l*l-w*h)/(2*o*v*E),T=Math.log(Math.sqrt(c*c+1)-c),M=Math.log(Math.sqrt(_*_+1)-_);m=(M-T)/Z,g=function(k){var b=k*m,A=d3(T),y=l/(v*E)*(A*ik(Z*b+T)-v3(T));return[r+y*u,a+y*d,l*A/d3(Z*b+T)]}}return g.duration=m*1e3*Z/Math.SQRT2,g}return C.rho=function(P){var t=Math.max(.001,+P),r=t*t,a=r*r;return te(t,r,a)},C})(Math.SQRT2,2,4)}});function Q(te){return function(Z,v){var w=te((Z=X2(Z)).h,(v=X2(v)).h),C=Gd(Z.s,v.s),P=Gd(Z.l,v.l),t=Gd(Z.opacity,v.opacity);return function(r){return Z.h=w(r),Z.s=C(r),Z.l=P(r),Z.opacity=t(r),Z+""}}}var xe,Ue,bt=zr({"node_modules/d3-interpolate/src/hsl.js"(){$y(),A_(),xe=Q(wb),Ue=Q(Gd)}});function jt(te,Z){var v=Gd((te=pb(te)).l,(Z=pb(Z)).l),w=Gd(te.a,Z.a),C=Gd(te.b,Z.b),P=Gd(te.opacity,Z.opacity);return function(t){return te.l=v(t),te.a=w(t),te.b=C(t),te.opacity=P(t),te+""}}var Xr=zr({"node_modules/d3-interpolate/src/lab.js"(){$y(),A_()}});function Nn(te){return function(Z,v){var w=te((Z=Tp(Z)).h,(v=Tp(v)).h),C=Gd(Z.c,v.c),P=Gd(Z.l,v.l),t=Gd(Z.opacity,v.opacity);return function(r){return Z.h=w(r),Z.c=C(r),Z.l=P(r),Z.opacity=t(r),Z+""}}}var Ya,Wi,To=zr({"node_modules/d3-interpolate/src/hcl.js"(){$y(),A_(),Ya=Nn(wb),Wi=Nn(Gd)}});function Po(te){return(function Z(v){v=+v;function w(C,P){var t=te((C=e3(C)).h,(P=e3(P)).h),r=Gd(C.s,P.s),a=Gd(C.l,P.l),l=Gd(C.opacity,P.opacity);return function(i){return C.h=t(i),C.s=r(i),C.l=a(Math.pow(i,v)),C.opacity=l(i),C+""}}return w.gamma=Z,w})(1)}var Qi,so,ol=zr({"node_modules/d3-interpolate/src/cubehelix.js"(){$y(),A_(),Qi=Po(wb),so=Po(Gd)}});function Jl(te,Z){Z===void 0&&(Z=te,te=M_);for(var v=0,w=Z.length-1,C=Z[0],P=new Array(w<0?0:w);v<w;)P[v]=te(C,C=Z[++v]);return function(t){var r=Math.max(0,Math.min(w-1,Math.floor(t*=w)));return P[r](t-r)}}var Of=zr({"node_modules/d3-interpolate/src/piecewise.js"(){Hm()}});function Li(te,Z){for(var v=new Array(Z),w=0;w<Z;++w)v[w]=te(w/(Z-1));return v}var vi=zr({"node_modules/d3-interpolate/src/quantize.js"(){}}),Hi={};Jr(Hi,{interpolate:()=>M_,interpolateArray:()=>ek,interpolateBasis:()=>Ky,interpolateBasisClosed:()=>BS,interpolateCubehelix:()=>Qi,interpolateCubehelixLong:()=>so,interpolateDate:()=>HS,interpolateDiscrete:()=>$g,interpolateHcl:()=>Ya,interpolateHclLong:()=>Wi,interpolateHsl:()=>xe,interpolateHslLong:()=>Ue,interpolateHue:()=>Cb,interpolateLab:()=>jt,interpolateNumber:()=>Vm,interpolateNumberArray:()=>jS,interpolateObject:()=>Mb,interpolateRgb:()=>o3,interpolateRgbBasis:()=>Tb,interpolateRgbBasisClosed:()=>Ab,interpolateRound:()=>Jg,interpolateString:()=>l3,interpolateTransformCss:()=>YS,interpolateTransformSvg:()=>r1,interpolateZoom:()=>Lb,piecewise:()=>Jl,quantize:()=>Li});var Ao=zr({"node_modules/d3-interpolate/src/index.js"(){Hm(),VS(),Jy(),xb(),s3(),Kg(),kb(),Eb(),US(),tk(),hR(),XS(),ak(),j(),Sb(),bt(),Xr(),To(),ol(),Of(),vi()}}),Dl=Ne({"src/traces/sunburst/fill_one.js"(te,Z){var v=zs(),w=Ha();Z.exports=function(P,t,r,a,l){var i=t.data.data,s=i.i,o=l||i.color;if(s>=0){t.i=i.i;var u=r.marker;u.pattern?(!u.colors||!u.pattern.shape)&&(u.color=o,t.color=o):(u.color=o,t.color=o),v.pointStyle(P,r,a,t)}else w.fill(P,o)}}}),Pc=Ne({"src/traces/sunburst/style.js"(te,Z){var v=xn(),w=Ha(),C=In(),P=_c().resizeText,t=Dl();function r(l){var i=l._fullLayout._sunburstlayer.selectAll(".trace");P(l,i,"sunburst"),i.each(function(s){var o=v.select(this),u=s[0],d=u.trace;o.style("opacity",d.opacity),o.selectAll("path.surface").each(function(h){v.select(this).call(a,h,d,l)})})}function a(l,i,s,o){var u=i.data.data,d=!i.children,h=u.i,g=C.castOption(s,h,"marker.line.color")||w.defaultLine,m=C.castOption(s,h,"marker.line.width")||0;l.call(t,i,s,o).style("stroke-width",m).call(w.stroke,g).style("opacity",d?s.leaf.opacity:null)}Z.exports={style:r,styleOne:a}}}),Ks=Ne({"src/traces/sunburst/helpers.js"(te){var Z=In(),v=Ha(),w=km(),C=Ay();te.findEntryWithLevel=function(a,l){var i;return l&&a.eachAfter(function(s){if(te.getPtId(s)===l)return i=s.copy()}),i||a},te.findEntryWithChild=function(a,l){var i;return a.eachAfter(function(s){for(var o=s.children||[],u=0;u<o.length;u++){var d=o[u];if(te.getPtId(d)===l)return i=s.copy()}}),i||a},te.isEntry=function(a){return!a.parent},te.isLeaf=function(a){return!a.children},te.getPtId=function(a){return a.data.data.id},te.getPtLabel=function(a){return a.data.data.label},te.getValue=function(a){return a.value},te.isHierarchyRoot=function(a){return r(a)===""},te.setSliceCursor=function(a,l,i){var s=i.isTransitioning;if(!s){var o=a.datum();s=i.hideOnRoot&&te.isHierarchyRoot(o)||i.hideOnLeaves&&te.isLeaf(o)}w(a,s?null:"pointer")};function P(a,l,i){return{color:te.getOutsideTextFontKey("color",a,l,i),family:te.getOutsideTextFontKey("family",a,l,i),size:te.getOutsideTextFontKey("size",a,l,i),weight:te.getOutsideTextFontKey("weight",a,l,i),style:te.getOutsideTextFontKey("style",a,l,i),variant:te.getOutsideTextFontKey("variant",a,l,i),textcase:te.getOutsideTextFontKey("textcase",a,l,i),lineposition:te.getOutsideTextFontKey("lineposition",a,l,i),shadow:te.getOutsideTextFontKey("shadow",a,l,i)}}function t(a,l,i,s){var o=(s||{}).onPathbar,u=l.data.data,d=u.i,h=Z.castOption(a,d,(o?"pathbar.textfont":"insidetextfont")+".color");return!h&&a._input.textfont&&(h=Z.castOption(a._input,d,"textfont.color")),{color:h||v.contrast(u.color),family:te.getInsideTextFontKey("family",a,l,i,s),size:te.getInsideTextFontKey("size",a,l,i,s),weight:te.getInsideTextFontKey("weight",a,l,i,s),style:te.getInsideTextFontKey("style",a,l,i,s),variant:te.getInsideTextFontKey("variant",a,l,i,s),textcase:te.getInsideTextFontKey("textcase",a,l,i,s),lineposition:te.getInsideTextFontKey("lineposition",a,l,i,s),shadow:te.getInsideTextFontKey("shadow",a,l,i,s)}}te.getInsideTextFontKey=function(a,l,i,s,o){var u=(o||{}).onPathbar,d=u?"pathbar.textfont":"insidetextfont",h=i.data.data.i;return Z.castOption(l,h,d+"."+a)||Z.castOption(l,h,"textfont."+a)||s.size},te.getOutsideTextFontKey=function(a,l,i,s){var o=i.data.data.i;return Z.castOption(l,o,"outsidetextfont."+a)||Z.castOption(l,o,"textfont."+a)||s.size},te.isOutsideText=function(a,l){return!a._hasColorscale&&te.isHierarchyRoot(l)},te.determineTextFont=function(a,l,i,s){return te.isOutsideText(a,l)?P(a,l,i):t(a,l,i,s)},te.hasTransition=function(a){return!!(a&&a.duration>0)},te.getMaxDepth=function(a){return a.maxdepth>=0?a.maxdepth:1/0},te.isHeader=function(a,l){return!(te.isLeaf(a)||a.depth===l._maxDepth-1)};function r(a){return a.data.data.pid}te.getParent=function(a,l){return te.findEntryWithLevel(a,r(l))},te.listPath=function(a,l){var i=a.parent;if(!i)return[];var s=l?[i.data[l]]:[i];return te.listPath(i,l).concat(s)},te.getPath=function(a){return te.listPath(a,"label").join("/")+"/"},te.formatValue=C.formatPieValue,te.formatPercent=function(a,l){var i=Z.formatPercent(a,0);return i==="0%"&&(i=C.formatPiePercent(a,l)),i}}}),ku=Ne({"src/traces/sunburst/fx.js"(te,Z){var v=xn(),w=Yo(),C=bv().appendArrayPointValue,P=oh(),t=In(),r=wx(),a=Ks(),l=Ay(),i=l.formatPieValue;Z.exports=function(u,d,h,g,m){var E=g[0],c=E.trace,_=E.hierarchy,T=c.type==="sunburst",M=c.type==="treemap"||c.type==="icicle";"_hasHoverLabel"in c||(c._hasHoverLabel=!1),"_hasHoverEvent"in c||(c._hasHoverEvent=!1);var k=function(y){var f=h._fullLayout;if(!(h._dragging||f.hovermode===!1)){var p=h._fullData[c.index],x=y.data.data,N=x.i,D=a.isHierarchyRoot(y),B=a.getParent(_,y),U=a.getValue(y),V=function(ce){return t.castOption(p,N,ce)},q=V("hovertemplate"),z=P.castHoverinfo(p,f,N),H=f.separators,G;if(q||z&&z!=="none"&&z!=="skip"){var J,le;T&&(J=E.cx+y.pxmid[0]*(1-y.rInscribed),le=E.cy+y.pxmid[1]*(1-y.rInscribed)),M&&(J=y._hoverX,le=y._hoverY);var ge={},de=[],me=[],W=function(ce){return de.indexOf(ce)!==-1};z&&(de=z==="all"?p._module.attributes.hoverinfo.flags:z.split("+")),ge.label=x.label,W("label")&&ge.label&&me.push(ge.label),x.hasOwnProperty("v")&&(ge.value=x.v,ge.valueLabel=i(ge.value,H),W("value")&&me.push(ge.valueLabel)),ge.currentPath=y.currentPath=a.getPath(y.data),W("current path")&&!D&&me.push(ge.currentPath);var ie,se=[],ee=function(){se.indexOf(ie)===-1&&(me.push(ie),se.push(ie))};ge.percentParent=y.percentParent=U/a.getValue(B),ge.parent=y.parentString=a.getPtLabel(B),W("percent parent")&&(ie=a.formatPercent(ge.percentParent,H)+" of "+ge.parent,ee()),ge.percentEntry=y.percentEntry=U/a.getValue(d),ge.entry=y.entry=a.getPtLabel(d),W("percent entry")&&!D&&!y.onPathbar&&(ie=a.formatPercent(ge.percentEntry,H)+" of "+ge.entry,ee()),ge.percentRoot=y.percentRoot=U/a.getValue(_),ge.root=y.root=a.getPtLabel(_),W("percent root")&&!D&&(ie=a.formatPercent(ge.percentRoot,H)+" of "+ge.root,ee()),ge.text=V("hovertext")||V("text"),W("text")&&(ie=ge.text,t.isValidTextValue(ie)&&me.push(ie)),G=[s(y,p,m.eventDataKeys)];var pe={trace:p,y:le,_x0:y._x0,_x1:y._x1,_y0:y._y0,_y1:y._y1,text:me.join("<br>"),name:q||W("name")?p.name:void 0,color:V("hoverlabel.bgcolor")||x.color,borderColor:V("hoverlabel.bordercolor"),fontFamily:V("hoverlabel.font.family"),fontSize:V("hoverlabel.font.size"),fontColor:V("hoverlabel.font.color"),fontWeight:V("hoverlabel.font.weight"),fontStyle:V("hoverlabel.font.style"),fontVariant:V("hoverlabel.font.variant"),nameLength:V("hoverlabel.namelength"),textAlign:V("hoverlabel.align"),hovertemplate:q,hovertemplateLabels:ge,eventData:G};T&&(pe.x0=J-y.rInscribed*y.rpx1,pe.x1=J+y.rInscribed*y.rpx1,pe.idealAlign=y.pxmid[0]<0?"left":"right"),M&&(pe.x=J,pe.idealAlign=J<0?"left":"right");var oe=[];P.loneHover(pe,{container:f._hoverlayer.node(),outerContainer:f._paper.node(),gd:h,inOut_bbox:oe}),G[0].bbox=oe[0],c._hasHoverLabel=!0}if(M){var Y=u.select("path.surface");m.styleOne(Y,y,p,h,{hovered:!0})}c._hasHoverEvent=!0,h.emit("plotly_hover",{points:G||[s(y,p,m.eventDataKeys)],event:v.event})}},b=function(y){var f=h._fullLayout,p=h._fullData[c.index],x=v.select(this).datum();if(c._hasHoverEvent&&(y.originalEvent=v.event,h.emit("plotly_unhover",{points:[s(x,p,m.eventDataKeys)],event:v.event}),c._hasHoverEvent=!1),c._hasHoverLabel&&(P.loneUnhover(f._hoverlayer.node()),c._hasHoverLabel=!1),M){var N=u.select("path.surface");m.styleOne(N,x,p,h,{hovered:!1})}},A=function(y){var f=h._fullLayout,p=h._fullData[c.index],x=T&&(a.isHierarchyRoot(y)||a.isLeaf(y)),N=a.getPtId(y),D=a.isEntry(y)?a.findEntryWithChild(_,N):a.findEntryWithLevel(_,N),B=a.getPtId(D),U={points:[s(y,p,m.eventDataKeys)],event:v.event};x||(U.nextLevel=B);var V=r.triggerHandler(h,"plotly_"+c.type+"click",U);if(V!==!1&&f.hovermode&&(h._hoverdata=[s(y,p,m.eventDataKeys)],P.click(h,v.event)),!x&&V!==!1&&!h._dragging&&!h._transitioning){w.call("_storeDirectGUIEdit",p,f._tracePreGUI[p.uid],{level:p.level});var q={data:[{level:B}],traces:[c.index]},z={frame:{redraw:!1,duration:m.transitionTime},transition:{duration:m.transitionTime,easing:m.transitionEasing},mode:"immediate",fromcurrent:!0};P.loneUnhover(f._hoverlayer.node()),w.call("animate",h,q,z)}};u.on("mouseover",k),u.on("mouseout",b),u.on("click",A)};function s(o,u,d){for(var h=o.data.data,g={curveNumber:u.index,pointNumber:h.i,data:u._input,fullData:u},m=0;m<d.length;m++){var E=d[m];E in o&&(g[E]=o[E])}return"parentString"in o&&!a.isHierarchyRoot(o)&&(g.parent=o.parentString),C(g,u,h.i),g}}}),nc=Ne({"src/traces/sunburst/plot.js"(te){var Z=xn(),v=m_(),w=(Ao(),Or(Hi)).interpolate,C=zs(),P=In(),t=hc(),r=_c(),a=r.recordMinTextSize,l=r.clearMinTextSize,i=p_(),s=Ay().getRotationAngle,o=i.computeTransform,u=i.transformInsideText,d=Pc().styleOne,h=qd().resizeText,g=ku(),m=AS(),E=Ks();te.plot=function(b,A,y,f){var p=b._fullLayout,x=p._sunburstlayer,N,D,B=!y,U=!p.uniformtext.mode&&E.hasTransition(y);if(l("sunburst",p),N=x.selectAll("g.trace.sunburst").data(A,function(q){return q[0].trace.uid}),N.enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),N.order(),U){f&&(D=f());var V=Z.transition().duration(y.duration).ease(y.easing).each("end",function(){D&&D()}).each("interrupt",function(){D&&D()});V.each(function(){x.selectAll("g.trace").each(function(q){c(b,q,this,y)})})}else N.each(function(q){c(b,q,this,y)}),p.uniformtext.mode&&h(b,p._sunburstlayer.selectAll(".trace"),"sunburst");B&&N.exit().remove()};function c(b,A,y,f){var p=b._context.staticPlot,x=b._fullLayout,N=!x.uniformtext.mode&&E.hasTransition(f),D=Z.select(y),B=D.selectAll("g.slice"),U=A[0],V=U.trace,q=U.hierarchy,z=E.findEntryWithLevel(q,V.level),H=E.getMaxDepth(V),G=x._size,J=V.domain,le=G.w*(J.x[1]-J.x[0]),ge=G.h*(J.y[1]-J.y[0]),de=.5*Math.min(le,ge),me=U.cx=G.l+G.w*(J.x[1]+J.x[0])/2,W=U.cy=G.t+G.h*(1-J.y[0])-ge/2;if(!z)return B.remove();var ie=null,se={};N&&B.each(function(be){se[E.getPtId(be)]={rpx0:be.rpx0,rpx1:be.rpx1,x0:be.x0,x1:be.x1,transform:be.transform},!ie&&E.isEntry(be)&&(ie=be)});var ee=_(z).descendants(),pe=z.height+1,oe=0,Y=H;U.hasMultipleRoots&&E.isHierarchyRoot(z)&&(ee=ee.slice(1),pe-=1,oe=1,Y+=1),ee=ee.filter(function(be){return be.y1<=Y});var ce=s(V.rotation);ce&&ee.forEach(function(be){be.x0+=ce,be.x1+=ce});var ue=Math.min(pe,H),_e=function(be){return(be-oe)/ue*de},Le=function(be,Ye){return[be*Math.cos(Ye),-be*Math.sin(Ye)]},ze=function(be){return P.pathAnnulus(be.rpx0,be.rpx1,be.x0,be.x1,me,W)},Xe=function(be){return me+M(be)[0]*(be.transform.rCenter||0)+(be.transform.x||0)},Ve=function(be){return W+M(be)[1]*(be.transform.rCenter||0)+(be.transform.y||0)};B=B.data(ee,E.getPtId),B.enter().append("g").classed("slice",!0),N?B.exit().transition().each(function(){var be=Z.select(this),Ye=be.select("path.surface");Ye.transition().attrTween("d",function(wt){var ht=vt(wt);return function(Yt){return ze(ht(Yt))}});var yt=be.select("g.slicetext");yt.attr("opacity",0)}).remove():B.exit().remove(),B.order();var rt=null;if(N&&ie){var mt=E.getPtId(ie);B.each(function(be){rt===null&&E.getPtId(be)===mt&&(rt=be.x1)})}var _t=B;N&&(_t=_t.transition().each("end",function(){var be=Z.select(this);E.setSliceCursor(be,b,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:!1})})),_t.each(function(be){var Ye=Z.select(this),yt=P.ensureSingle(Ye,"path","surface",function(mr){mr.style("pointer-events",p?"none":"all")});be.rpx0=_e(be.y0),be.rpx1=_e(be.y1),be.xmid=(be.x0+be.x1)/2,be.pxmid=Le(be.rpx1,be.xmid),be.midangle=-(be.xmid-Math.PI/2),be.startangle=-(be.x0-Math.PI/2),be.stopangle=-(be.x1-Math.PI/2),be.halfangle=.5*Math.min(P.angleDelta(be.x0,be.x1)||Math.PI,Math.PI),be.ring=1-be.rpx0/be.rpx1,be.rInscribed=T(be),N?yt.transition().attrTween("d",function(mr){var Ur=ut(mr);return function(jr){return ze(Ur(jr))}}):yt.attr("d",ze),Ye.call(g,z,b,A,{eventDataKeys:m.eventDataKeys,transitionTime:m.CLICK_TRANSITION_TIME,transitionEasing:m.CLICK_TRANSITION_EASING}).call(E.setSliceCursor,b,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:b._transitioning}),yt.call(d,be,V,b);var wt=P.ensureSingle(Ye,"g","slicetext"),ht=P.ensureSingle(wt,"text","",function(mr){mr.attr("data-notex",1)}),Yt=P.ensureUniformFontSize(b,E.determineTextFont(V,be,x.font));ht.text(te.formatSliceLabel(be,z,V,A,x)).classed("slicetext",!0).attr("text-anchor","middle").call(C.font,Yt).call(t.convertToTspans,b);var $t=C.bBox(ht.node());be.transform=u($t,be,U),be.transform.targetX=Xe(be),be.transform.targetY=Ve(be);var fr=function(mr,Ur){var jr=mr.transform;return o(jr,Ur),jr.fontSize=Yt.size,a(V.type,jr,x),P.getTextTransform(jr)};N?ht.transition().attrTween("transform",function(mr){var Ur=Fe(mr);return function(jr){return fr(Ur(jr),$t)}}):ht.attr("transform",fr(be,$t))});function vt(be){var Ye=E.getPtId(be),yt=se[Ye],wt=se[E.getPtId(z)],ht;if(wt){var Yt=(be.x1>wt.x1?2*Math.PI:0)+ce;ht=be.rpx1<wt.rpx1?{x0:be.x0,x1:be.x1,rpx0:0,rpx1:0}:{x0:Yt,x1:Yt,rpx0:be.rpx0,rpx1:be.rpx1}}else{var $t,fr=E.getPtId(be.parent);B.each(function(Br){if(E.getPtId(Br)===fr)return $t=Br});var mr=$t.children,Ur;mr.forEach(function(Br,Qr){if(E.getPtId(Br)===Ye)return Ur=Qr});var jr=mr.length,fn=w($t.x0,$t.x1);ht={rpx0:de,rpx1:de,x0:fn(Ur/jr),x1:fn((Ur+1)/jr)}}return w(yt,ht)}function ut(be){var Ye=se[E.getPtId(be)],yt,wt={x0:be.x0,x1:be.x1,rpx0:be.rpx0,rpx1:be.rpx1};if(Ye)yt=Ye;else if(ie)if(be.parent)if(rt){var ht=(be.x1>rt?2*Math.PI:0)+ce;yt={x0:ht,x1:ht}}else yt={rpx0:de,rpx1:de},P.extendFlat(yt,Pe(be));else yt={rpx0:0,rpx1:0};else yt={x0:ce,x1:ce};return w(yt,wt)}function Fe(be){var Ye=se[E.getPtId(be)],yt,wt=be.transform;if(Ye)yt=Ye;else if(yt={rpx1:be.rpx1,transform:{textPosAngle:wt.textPosAngle,scale:0,rotate:wt.rotate,rCenter:wt.rCenter,x:wt.x,y:wt.y}},ie)if(be.parent)if(rt){var ht=be.x1>rt?2*Math.PI:0;yt.x0=yt.x1=ht}else P.extendFlat(yt,Pe(be));else yt.x0=yt.x1=ce;else yt.x0=yt.x1=ce;var Yt=w(yt.transform.textPosAngle,be.transform.textPosAngle),$t=w(yt.rpx1,be.rpx1),fr=w(yt.x0,be.x0),mr=w(yt.x1,be.x1),Ur=w(yt.transform.scale,wt.scale),jr=w(yt.transform.rotate,wt.rotate),fn=wt.rCenter===0?3:yt.transform.rCenter===0?1/3:1,Br=w(yt.transform.rCenter,wt.rCenter),Qr=function(Ot){return Br(Math.pow(Ot,fn))};return function(Ot){var $e=$t(Ot);fr(Ot),mr(Ot);var ot=Qr(Ot),De=Yt(Ot),Ee={rpx1:$e,transform:{textPosAngle:De,rCenter:ot,x:wt.x,y:wt.y}};return a(V.type,wt,x),{transform:{targetX:Xe(Ee),targetY:Ve(Ee),scale:Ur(Ot),rotate:jr(Ot),rCenter:ot}}}}function Pe(be){var Ye=be.parent,yt=se[E.getPtId(Ye)],wt={};if(yt){var ht=Ye.children,Yt=ht.indexOf(be),$t=ht.length,fr=w(yt.x0,yt.x1);wt.x0=fr(Yt/$t),wt.x1=fr(Yt/$t)}else wt.x0=wt.x1=0;return wt}}function _(b){return v.partition().size([2*Math.PI,b.height+1])(b)}te.formatSliceLabel=function(b,A,y,f,p){var x=y.texttemplate,N=y.textinfo;if(!x&&(!N||N==="none"))return"";var D=p.separators,B=f[0],U=b.data.data,V=B.hierarchy,q=E.isHierarchyRoot(b),z=E.getParent(V,b),H=E.getValue(b);if(!x){var G=N.split("+"),J=function(oe){return G.indexOf(oe)!==-1},le=[],ge;if(J("label")&&U.label&&le.push(U.label),U.hasOwnProperty("v")&&J("value")&&le.push(E.formatValue(U.v,D)),!q){J("current path")&&le.push(E.getPath(b.data));var de=0;J("percent parent")&&de++,J("percent entry")&&de++,J("percent root")&&de++;var me=de>1;if(de){var W,ie=function(oe){ge=E.formatPercent(W,D),me&&(ge+=" of "+oe),le.push(ge)};J("percent parent")&&!q&&(W=H/E.getValue(z),ie("parent")),J("percent entry")&&(W=H/E.getValue(A),ie("entry")),J("percent root")&&(W=H/E.getValue(V),ie("root"))}}return J("text")&&(ge=P.castOption(y,U.i,"text"),P.isValidTextValue(ge)&&le.push(ge)),le.join("<br>")}var se=P.castOption(y,U.i,"texttemplate");if(!se)return"";var ee={};U.label&&(ee.label=U.label),U.hasOwnProperty("v")&&(ee.value=U.v,ee.valueLabel=E.formatValue(U.v,D)),ee.currentPath=E.getPath(b.data),q||(ee.percentParent=H/E.getValue(z),ee.percentParentLabel=E.formatPercent(ee.percentParent,D),ee.parent=E.getPtLabel(z)),ee.percentEntry=H/E.getValue(A),ee.percentEntryLabel=E.formatPercent(ee.percentEntry,D),ee.entry=E.getPtLabel(A),ee.percentRoot=H/E.getValue(V),ee.percentRootLabel=E.formatPercent(ee.percentRoot,D),ee.root=E.getPtLabel(V),U.hasOwnProperty("color")&&(ee.color=U.color);var pe=P.castOption(y,U.i,"text");return(P.isValidTextValue(pe)||pe==="")&&(ee.text=pe),ee.customdata=P.castOption(y,U.i,"customdata"),P.texttemplateString({data:[ee,y._meta],fallback:y.texttemplatefallback,labels:ee,locale:p._d3locale,template:se})};function T(b){return b.rpx0===0&&P.isFullCircle([b.x0,b.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(b.halfangle)),b.ring/2))}function M(b){return k(b.rpx1,b.transform.textPosAngle)}function k(b,A){return[b*Math.sin(A),-b*Math.cos(A)]}}}),qc=Ne({"src/traces/sunburst/index.js"(te,Z){Z.exports={moduleType:"trace",name:"sunburst",basePlotModule:iR(),categories:[],animatable:!0,attributes:lb(),layoutAttributes:SS(),supplyDefaults:GC(),supplyLayoutDefaults:oR(),calc:ub().calc,crossTraceCalc:ub().crossTraceCalc,plot:nc().plot,style:Pc().style,colorbar:sh(),meta:{}}}}),Qg=Ne({"lib/sunburst.js"(te,Z){Z.exports=qc()}}),dR=Ne({"src/traces/treemap/base_plot.js"(te){var Z=ff();te.name="treemap",te.plot=function(v,w,C,P){Z.plotBasePlot(te.name,v,w,C,P)},te.clean=function(v,w,C,P){Z.cleanBasePlot(te.name,v,w,C,P)}}}),p3=Ne({"src/traces/treemap/constants.js"(te,Z){Z.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}}}),vR=Ne({"src/traces/treemap/attributes.js"(te,Z){var{hovertemplateAttrs:v,texttemplateAttrs:w,templatefallbackAttrs:C}=Fl(),P=Wu(),t=Fc().attributes,r=d_(),a=lb(),l=p3(),i=fi().extendFlat,s=Fd().pattern;Z.exports={labels:a.labels,parents:a.parents,values:a.values,branchvalues:a.branchvalues,count:a.count,level:a.level,maxdepth:a.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:i({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:a.marker.colors,pattern:s,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style"},line:a.marker.line,cornerradius:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},P("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:i({},r.textfont,{}),editType:"calc"},text:r.text,textinfo:a.textinfo,texttemplate:w({editType:"plot"},{keys:l.eventDataKeys.concat(["label","value"])}),texttemplatefallback:C({editType:"plot"}),hovertext:r.hovertext,hoverinfo:a.hoverinfo,hovertemplate:v({},{keys:l.eventDataKeys}),hovertemplatefallback:C(),textfont:r.textfont,insidetextfont:r.insidetextfont,outsidetextfont:i({},r.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:r.sort,root:a.root,domain:t({name:"treemap",trace:!0,editType:"calc"})}}}),q9=Ne({"src/traces/treemap/layout_attributes.js"(te,Z){Z.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),pK=Ne({"src/traces/treemap/defaults.js"(te,Z){var v=In(),w=vR(),C=Ha(),P=Fc().defaults,t=mp().handleText,r=zg().TEXTPAD,a=v_().handleMarkerDefaults,l=Nc(),i=l.hasColorscale,s=l.handleDefaults;Z.exports=function(u,d,h,g){function m(p,x){return v.coerce(u,d,w,p,x)}var E=m("labels"),c=m("parents");if(!E||!E.length||!c||!c.length){d.visible=!1;return}var _=m("values");_&&_.length?m("branchvalues"):m("count"),m("level"),m("maxdepth");var T=m("tiling.packing");T==="squarify"&&m("tiling.squarifyratio"),m("tiling.flip"),m("tiling.pad");var M=m("text");m("texttemplate"),m("texttemplatefallback"),d.texttemplate||m("textinfo",v.isArrayOrTypedArray(M)?"text+label":"label"),m("hovertext"),m("hovertemplate"),m("hovertemplatefallback");var k=m("pathbar.visible"),b="auto";t(u,d,g,m,b,{hasPathbar:k,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),m("textposition");var A=d.textposition.indexOf("bottom")!==-1;a(u,d,g,m);var y=d._hasColorscale=i(u,"marker","colors")||(u.marker||{}).coloraxis;y?s(u,d,g,m,{prefix:"marker.",cLetter:"c"}):m("marker.depthfade",!(d.marker.colors||[]).length);var f=d.textfont.size*2;m("marker.pad.t",A?f/4:f),m("marker.pad.l",f/4),m("marker.pad.r",f/4),m("marker.pad.b",A?f:f/4),m("marker.cornerradius"),d._hovered={marker:{line:{width:2,color:C.contrast(g.paper_bgcolor)}}},k&&(m("pathbar.thickness",d.pathbar.textfont.size+2*r),m("pathbar.side"),m("pathbar.edgeshape")),m("sort"),m("root.color"),P(d,g,m),d._length=null}}}),mK=Ne({"src/traces/treemap/layout_defaults.js"(te,Z){var v=In(),w=q9();Z.exports=function(P,t){function r(a,l){return v.coerce(P,t,w,a,l)}r("treemapcolorway",t.colorway),r("extendtreemapcolors")}}}),V9=Ne({"src/traces/treemap/calc.js"(te){var Z=ub();te.calc=function(v,w){return Z.calc(v,w)},te.crossTraceCalc=function(v){return Z._runCrossTraceCalc("treemap",v)}}}),H9=Ne({"src/traces/treemap/flip_tree.js"(te,Z){Z.exports=function v(w,C,P){var t;P.swapXY&&(t=w.x0,w.x0=w.y0,w.y0=t,t=w.x1,w.x1=w.y1,w.y1=t),P.flipX&&(t=w.x0,w.x0=C[0]-w.x1,w.x1=C[0]-t),P.flipY&&(t=w.y0,w.y0=C[1]-w.y1,w.y1=C[1]-t);var r=w.children;if(r)for(var a=0;a<r.length;a++)v(r[a],C,P)}}}),G9=Ne({"src/traces/treemap/partition.js"(te,Z){var v=m_(),w=H9();Z.exports=function(t,r,a){var l=a.flipX,i=a.flipY,s=a.packing==="dice-slice",o=a.pad[i?"bottom":"top"],u=a.pad[l?"right":"left"],d=a.pad[l?"left":"right"],h=a.pad[i?"top":"bottom"],g;s&&(g=u,u=o,o=g,g=d,d=h,h=g);var m=v.treemap().tile(C(a.packing,a.squarifyratio)).paddingInner(a.pad.inner).paddingLeft(u).paddingRight(d).paddingTop(o).paddingBottom(h).size(s?[r[1],r[0]]:r)(t);return(s||l||i)&&w(m,r,{swapXY:s,flipX:l,flipY:i}),m};function C(P,t){switch(P){case"squarify":return v.treemapSquarify.ratio(t);case"binary":return v.treemapBinary;case"dice":return v.treemapDice;case"slice":return v.treemapSlice;default:return v.treemapSliceDice}}}}),pR=Ne({"src/traces/treemap/style.js"(te,Z){var v=xn(),w=Ha(),C=In(),P=Ks(),t=_c().resizeText,r=Dl();function a(i){var s=i._fullLayout._treemaplayer.selectAll(".trace");t(i,s,"treemap"),s.each(function(o){var u=v.select(this),d=o[0],h=d.trace;u.style("opacity",h.opacity),u.selectAll("path.surface").each(function(g){v.select(this).call(l,g,h,i,{hovered:!1})})})}function l(i,s,o,u,d){var h=(d||{}).hovered,g=s.data.data,m=g.i,E,c,_=g.color,T=P.isHierarchyRoot(s),M=1;if(h)E=o._hovered.marker.line.color,c=o._hovered.marker.line.width;else if(T&&_===o.root.color)M=100,E="rgba(0,0,0,0)",c=0;else if(E=C.castOption(o,m,"marker.line.color")||w.defaultLine,c=C.castOption(o,m,"marker.line.width")||0,!o._hasColorscale&&!s.onPathbar){var k=o.marker.depthfade;if(k){var b=w.combine(w.addOpacity(o._backgroundColor,.75),_),A;if(k===!0){var y=P.getMaxDepth(o);isFinite(y)?P.isLeaf(s)?A=0:A=o._maxVisibleLayers-(s.data.depth-o._entryDepth):A=s.data.height+1}else A=s.data.depth-o._entryDepth,o._atRootLevel||A++;if(A>0)for(var f=0;f<A;f++){var p=.5*f/A;_=w.combine(w.addOpacity(b,p),_)}}}i.call(r,s,o,u,_).style("stroke-width",c).call(w.stroke,E).style("opacity",M)}Z.exports={style:a,styleOne:l}}}),gK=Ne({"src/traces/treemap/draw_ancestors.js"(te,Z){var v=xn(),w=In(),C=zs(),P=hc(),t=G9(),r=pR().styleOne,a=p3(),l=Ks(),i=ku(),s=!0;Z.exports=function(u,d,h,g,m){var E=m.barDifY,c=m.width,_=m.height,T=m.viewX,M=m.viewY,k=m.pathSlice,b=m.toMoveInsideSlice,A=m.strTransform,y=m.hasTransition,f=m.handleSlicesExit,p=m.makeUpdateSliceInterpolator,x=m.makeUpdateTextInterpolator,N={},D=u._context.staticPlot,B=u._fullLayout,U=d[0],V=U.trace,q=U.hierarchy,z=c/V._entryDepth,H=l.listPath(h.data,"id"),G=t(q.copy(),[c,_],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();G=G.filter(function(le){var ge=H.indexOf(le.data.id);return ge===-1?!1:(le.x0=z*ge,le.x1=z*(ge+1),le.y0=E,le.y1=E+_,le.onPathbar=!0,!0)}),G.reverse(),g=g.data(G,l.getPtId),g.enter().append("g").classed("pathbar",!0),f(g,s,N,[c,_],k),g.order();var J=g;y&&(J=J.transition().each("end",function(){var le=v.select(this);l.setSliceCursor(le,u,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})})),J.each(function(le){le._x0=T(le.x0),le._x1=T(le.x1),le._y0=M(le.y0),le._y1=M(le.y1),le._hoverX=T(le.x1-Math.min(c,_)/2),le._hoverY=M(le.y1-_/2);var ge=v.select(this),de=w.ensureSingle(ge,"path","surface",function(se){se.style("pointer-events",D?"none":"all")});y?de.transition().attrTween("d",function(se){var ee=p(se,s,N,[c,_]);return function(pe){return k(ee(pe))}}):de.attr("d",k),ge.call(i,h,u,d,{styleOne:r,eventDataKeys:a.eventDataKeys,transitionTime:a.CLICK_TRANSITION_TIME,transitionEasing:a.CLICK_TRANSITION_EASING}).call(l.setSliceCursor,u,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:u._transitioning}),de.call(r,le,V,u,{hovered:!1}),le._text=(l.getPtLabel(le)||"").split("<br>").join(" ")||"";var me=w.ensureSingle(ge,"g","slicetext"),W=w.ensureSingle(me,"text","",function(se){se.attr("data-notex",1)}),ie=w.ensureUniformFontSize(u,l.determineTextFont(V,le,B.font,{onPathbar:!0}));W.text(le._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(C.font,ie).call(P.convertToTspans,u),le.textBB=C.bBox(W.node()),le.transform=b(le,{fontSize:ie.size,onPathbar:!0}),le.transform.fontSize=ie.size,y?W.transition().attrTween("transform",function(se){var ee=x(se,s,N,[c,_]);return function(pe){return A(ee(pe))}}):W.attr("transform",A(le))})}}}),yK=Ne({"src/traces/treemap/plot_one.js"(te,Z){var v=xn(),w=(Ao(),Or(Hi)).interpolate,C=Ks(),P=In(),t=zg().TEXTPAD,r=mu(),a=r.toMoveInsideBar,l=_c(),i=l.recordMinTextSize,s=p3(),o=gK();function u(d){return C.isHierarchyRoot(d)?"":C.getPtId(d)}Z.exports=function(h,g,m,E,c){var _=h._fullLayout,T=g[0],M=T.trace,k=M.type,b=k==="icicle",A=T.hierarchy,y=C.findEntryWithLevel(A,M.level),f=v.select(m),p=f.selectAll("g.pathbar"),x=f.selectAll("g.slice");if(!y){p.remove(),x.remove();return}var N=C.isHierarchyRoot(y),D=!_.uniformtext.mode&&C.hasTransition(E),B=C.getMaxDepth(M),U=function(Br){return Br.data.depth-y.data.depth<B},V=_._size,q=M.domain,z=V.w*(q.x[1]-q.x[0]),H=V.h*(q.y[1]-q.y[0]),G=z,J=M.pathbar.thickness,le=M.marker.line.width+s.gapWithPathbar,ge=M.pathbar.visible?M.pathbar.side.indexOf("bottom")>-1?H+le:-(J+le):0,de={x0:G,x1:G,y0:ge,y1:ge+J},me=function(Br,Qr,Ot){var $e=M.tiling.pad,ot=function(Ie){return Ie-$e<=Qr.x0},De=function(Ie){return Ie+$e>=Qr.x1},Ee=function(Ie){return Ie-$e<=Qr.y0},Ae=function(Ie){return Ie+$e>=Qr.y1};return Br.x0===Qr.x0&&Br.x1===Qr.x1&&Br.y0===Qr.y0&&Br.y1===Qr.y1?{x0:Br.x0,x1:Br.x1,y0:Br.y0,y1:Br.y1}:{x0:ot(Br.x0-$e)?0:De(Br.x0-$e)?Ot[0]:Br.x0,x1:ot(Br.x1+$e)?0:De(Br.x1+$e)?Ot[0]:Br.x1,y0:Ee(Br.y0-$e)?0:Ae(Br.y0-$e)?Ot[1]:Br.y0,y1:Ee(Br.y1+$e)?0:Ae(Br.y1+$e)?Ot[1]:Br.y1}},W=null,ie={},se={},ee=null,pe=function(Br,Qr){return Qr?ie[u(Br)]:se[u(Br)]},oe=function(Br,Qr,Ot,$e){if(Qr)return ie[u(A)]||de;var ot=se[M.level]||Ot;return U(Br)?me(Br,ot,$e):{}};T.hasMultipleRoots&&N&&B++,M._maxDepth=B,M._backgroundColor=_.paper_bgcolor,M._entryDepth=y.data.depth,M._atRootLevel=N;var Y=-z/2+V.l+V.w*(q.x[1]+q.x[0])/2,ce=-H/2+V.t+V.h*(1-(q.y[1]+q.y[0])/2),ue=function(Br){return Y+Br},_e=function(Br){return ce+Br},Le=_e(0),ze=ue(0),Xe=function(Br){return ze+Br},Ve=function(Br){return Le+Br};function rt(Br,Qr){return Br+","+Qr}var mt=Xe(0),_t=function(Br){Br.x=Math.max(mt,Br.x)},vt=M.pathbar.edgeshape,ut=function(Br){var Qr=Xe(Math.max(Math.min(Br.x0,Br.x0),0)),Ot=Xe(Math.min(Math.max(Br.x1,Br.x1),G)),$e=Ve(Br.y0),ot=Ve(Br.y1),De=J/2,Ee={},Ae={};Ee.x=Qr,Ae.x=Ot,Ee.y=Ae.y=($e+ot)/2;var Ie={x:Qr,y:$e},tt={x:Ot,y:$e},st={x:Ot,y:ot},Bt={x:Qr,y:ot};return vt===">"?(Ie.x-=De,tt.x-=De,st.x-=De,Bt.x-=De):vt==="/"?(st.x-=De,Bt.x-=De,Ee.x-=De/2,Ae.x-=De/2):vt==="\\"?(Ie.x-=De,tt.x-=De,Ee.x-=De/2,Ae.x-=De/2):vt==="<"&&(Ee.x-=De,Ae.x-=De),_t(Ie),_t(Bt),_t(Ee),_t(tt),_t(st),_t(Ae),"M"+rt(Ie.x,Ie.y)+"L"+rt(tt.x,tt.y)+"L"+rt(Ae.x,Ae.y)+"L"+rt(st.x,st.y)+"L"+rt(Bt.x,Bt.y)+"L"+rt(Ee.x,Ee.y)+"Z"},Fe=M[b?"tiling":"marker"].pad,Pe=function(Br){return M.textposition.indexOf(Br)!==-1},be=Pe("top"),Ye=Pe("left"),yt=Pe("right"),wt=Pe("bottom"),ht=function(Br){var Qr=ue(Br.x0),Ot=ue(Br.x1),$e=_e(Br.y0),ot=_e(Br.y1),De=Ot-Qr,Ee=ot-$e;if(!De||!Ee)return"";var Ae=M.marker.cornerradius||0,Ie=Math.min(Ae,De/2,Ee/2);Ie&&Br.data&&Br.data.data&&Br.data.data.label&&(be&&(Ie=Math.min(Ie,Fe.t)),Ye&&(Ie=Math.min(Ie,Fe.l)),yt&&(Ie=Math.min(Ie,Fe.r)),wt&&(Ie=Math.min(Ie,Fe.b)));var tt=function(st,Bt){return Ie?"a"+rt(Ie,Ie)+" 0 0 1 "+rt(st,Bt):""};return"M"+rt(Qr,$e+Ie)+tt(Ie,-Ie)+"L"+rt(Ot-Ie,$e)+tt(Ie,Ie)+"L"+rt(Ot,ot-Ie)+tt(-Ie,Ie)+"L"+rt(Qr+Ie,ot)+tt(-Ie,-Ie)+"Z"},Yt=function(Br,Qr){var Ot=Br.x0,$e=Br.x1,ot=Br.y0,De=Br.y1,Ee=Br.textBB,Ae=be||Qr.isHeader&&!wt,Ie=Ae?"start":wt?"end":"middle",tt=Pe("right"),st=Pe("left")||Qr.onPathbar,Bt=st?-1:tt?1:0;if(Qr.isHeader){if(Ot+=(b?Fe:Fe.l)-t,$e-=(b?Fe:Fe.r)-t,Ot>=$e){var Ft=(Ot+$e)/2;Ot=Ft,$e=Ft}var Wt;wt?(Wt=De-(b?Fe:Fe.b),ot<Wt&&Wt<De&&(ot=Wt)):(Wt=ot+(b?Fe:Fe.t),ot<Wt&&Wt<De&&(De=Wt))}var lr=a(Ot,$e,ot,De,Ee,{isHorizontal:!1,constrained:!0,angle:0,anchor:Ie,leftToRight:Bt});return lr.fontSize=Qr.fontSize,lr.targetX=ue(lr.targetX),lr.targetY=_e(lr.targetY),isNaN(lr.targetX)||isNaN(lr.targetY)?{}:(Ot!==$e&&ot!==De&&i(M.type,lr,_),{scale:lr.scale,rotate:lr.rotate,textX:lr.textX,textY:lr.textY,anchorX:lr.anchorX,anchorY:lr.anchorY,targetX:lr.targetX,targetY:lr.targetY})},$t=function(Br,Qr){for(var Ot,$e=0,ot=Br;!Ot&&$e<B;)$e++,ot=ot.parent,ot?Ot=pe(ot,Qr):$e=B;return Ot||{}},fr=function(Br,Qr,Ot,$e){var ot=pe(Br,Qr),De;if(Qr)De=de;else{var Ee=pe(y,Qr);Ee?De=me(Br,Ee,$e):De={}}return w(ot,De)},mr=function(Br,Qr,Ot,$e,ot){var De=pe(Br,Qr),Ee;if(De)Ee=De;else if(Qr)Ee=de;else if(W)if(Br.parent){var Ae=ee||Ot;Ae&&!Qr?Ee=me(Br,Ae,$e):(Ee={},P.extendFlat(Ee,$t(Br,Qr)))}else Ee=P.extendFlat({},Br),b&&(ot.orientation==="h"?ot.flipX?Ee.x0=Br.x1:Ee.x1=0:ot.flipY?Ee.y0=Br.y1:Ee.y1=0);else Ee={};return w(Ee,{x0:Br.x0,x1:Br.x1,y0:Br.y0,y1:Br.y1})},Ur=function(Br,Qr,Ot,$e){var ot=pe(Br,Qr),De={},Ee=oe(Br,Qr,Ot,$e);P.extendFlat(De,{transform:Yt({x0:Ee.x0,x1:Ee.x1,y0:Ee.y0,y1:Ee.y1,textBB:Br.textBB,_text:Br._text},{isHeader:C.isHeader(Br,M)})}),ot?De=ot:Br.parent&&P.extendFlat(De,$t(Br,Qr));var Ae=Br.transform;return Br.x0!==Br.x1&&Br.y0!==Br.y1&&i(M.type,Ae,_),w(De,{transform:{scale:Ae.scale,rotate:Ae.rotate,textX:Ae.textX,textY:Ae.textY,anchorX:Ae.anchorX,anchorY:Ae.anchorY,targetX:Ae.targetX,targetY:Ae.targetY}})},jr=function(Br,Qr,Ot,$e,ot){var De=$e[0],Ee=$e[1];D?Br.exit().transition().each(function(){var Ae=v.select(this),Ie=Ae.select("path.surface");Ie.transition().attrTween("d",function(st){var Bt=fr(st,Qr,Ot,[De,Ee]);return function(Ft){return ot(Bt(Ft))}});var tt=Ae.select("g.slicetext");tt.attr("opacity",0)}).remove():Br.exit().remove()},fn=function(Br){var Qr=Br.transform;return Br.x0!==Br.x1&&Br.y0!==Br.y1&&i(M.type,Qr,_),P.getTextTransform({textX:Qr.textX,textY:Qr.textY,anchorX:Qr.anchorX,anchorY:Qr.anchorY,targetX:Qr.targetX,targetY:Qr.targetY,scale:Qr.scale,rotate:Qr.rotate})};D&&(p.each(function(Br){ie[u(Br)]={x0:Br.x0,x1:Br.x1,y0:Br.y0,y1:Br.y1},Br.transform&&(ie[u(Br)].transform={textX:Br.transform.textX,textY:Br.transform.textY,anchorX:Br.transform.anchorX,anchorY:Br.transform.anchorY,targetX:Br.transform.targetX,targetY:Br.transform.targetY,scale:Br.transform.scale,rotate:Br.transform.rotate})}),x.each(function(Br){se[u(Br)]={x0:Br.x0,x1:Br.x1,y0:Br.y0,y1:Br.y1},Br.transform&&(se[u(Br)].transform={textX:Br.transform.textX,textY:Br.transform.textY,anchorX:Br.transform.anchorX,anchorY:Br.transform.anchorY,targetX:Br.transform.targetX,targetY:Br.transform.targetY,scale:Br.transform.scale,rotate:Br.transform.rotate}),!W&&C.isEntry(Br)&&(W=Br)})),ee=c(h,g,y,x,{width:z,height:H,viewX:ue,viewY:_e,pathSlice:ht,toMoveInsideSlice:Yt,prevEntry:W,makeUpdateSliceInterpolator:mr,makeUpdateTextInterpolator:Ur,handleSlicesExit:jr,hasTransition:D,strTransform:fn}),M.pathbar.visible?o(h,g,y,p,{barDifY:ge,width:G,height:J,viewX:Xe,viewY:Ve,pathSlice:ut,toMoveInsideSlice:Yt,makeUpdateSliceInterpolator:mr,makeUpdateTextInterpolator:Ur,handleSlicesExit:jr,hasTransition:D,strTransform:fn}):p.remove()}}}),X9=Ne({"src/traces/treemap/draw.js"(te,Z){var v=xn(),w=Ks(),C=_c(),P=C.clearMinTextSize,t=qd().resizeText,r=yK();Z.exports=function(l,i,s,o,u){var d=u.type,h=u.drawDescendants,g=l._fullLayout,m=g["_"+d+"layer"],E,c,_=!s;if(P(d,g),E=m.selectAll("g.trace."+d).data(i,function(M){return M[0].trace.uid}),E.enter().append("g").classed("trace",!0).classed(d,!0),E.order(),!g.uniformtext.mode&&w.hasTransition(s)){o&&(c=o());var T=v.transition().duration(s.duration).ease(s.easing).each("end",function(){c&&c()}).each("interrupt",function(){c&&c()});T.each(function(){m.selectAll("g.trace").each(function(M){r(l,M,this,s,h)})})}else E.each(function(M){r(l,M,this,s,h)}),g.uniformtext.mode&&t(l,m.selectAll(".trace"),d);_&&E.exit().remove()}}}),_K=Ne({"src/traces/treemap/draw_descendants.js"(te,Z){var v=xn(),w=In(),C=zs(),P=hc(),t=G9(),r=pR().styleOne,a=p3(),l=Ks(),i=ku(),s=nc().formatSliceLabel,o=!1;Z.exports=function(d,h,g,m,E){var c=E.width,_=E.height,T=E.viewX,M=E.viewY,k=E.pathSlice,b=E.toMoveInsideSlice,A=E.strTransform,y=E.hasTransition,f=E.handleSlicesExit,p=E.makeUpdateSliceInterpolator,x=E.makeUpdateTextInterpolator,N=E.prevEntry,D={},B=d._context.staticPlot,U=d._fullLayout,V=h[0],q=V.trace,z=q.textposition.indexOf("left")!==-1,H=q.textposition.indexOf("right")!==-1,G=q.textposition.indexOf("bottom")!==-1,J=!G&&!q.marker.pad.t||G&&!q.marker.pad.b,le=t(g,[c,_],{packing:q.tiling.packing,squarifyratio:q.tiling.squarifyratio,flipX:q.tiling.flip.indexOf("x")>-1,flipY:q.tiling.flip.indexOf("y")>-1,pad:{inner:q.tiling.pad,top:q.marker.pad.t,left:q.marker.pad.l,right:q.marker.pad.r,bottom:q.marker.pad.b}}),ge=le.descendants(),de=1/0,me=-1/0;ge.forEach(function(pe){var oe=pe.depth;oe>=q._maxDepth?(pe.x0=pe.x1=(pe.x0+pe.x1)/2,pe.y0=pe.y1=(pe.y0+pe.y1)/2):(de=Math.min(de,oe),me=Math.max(me,oe))}),m=m.data(ge,l.getPtId),q._maxVisibleLayers=isFinite(me)?me-de+1:0,m.enter().append("g").classed("slice",!0),f(m,o,D,[c,_],k),m.order();var W=null;if(y&&N){var ie=l.getPtId(N);m.each(function(pe){W===null&&l.getPtId(pe)===ie&&(W={x0:pe.x0,x1:pe.x1,y0:pe.y0,y1:pe.y1})})}var se=function(){return W||{x0:0,x1:c,y0:0,y1:_}},ee=m;return y&&(ee=ee.transition().each("end",function(){var pe=v.select(this);l.setSliceCursor(pe,d,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),ee.each(function(pe){var oe=l.isHeader(pe,q);pe._x0=T(pe.x0),pe._x1=T(pe.x1),pe._y0=M(pe.y0),pe._y1=M(pe.y1),pe._hoverX=T(pe.x1-q.marker.pad.r),pe._hoverY=M(G?pe.y1-q.marker.pad.b/2:pe.y0+q.marker.pad.t/2);var Y=v.select(this),ce=w.ensureSingle(Y,"path","surface",function(Ve){Ve.style("pointer-events",B?"none":"all")});y?ce.transition().attrTween("d",function(Ve){var rt=p(Ve,o,se(),[c,_]);return function(mt){return k(rt(mt))}}):ce.attr("d",k),Y.call(i,g,d,h,{styleOne:r,eventDataKeys:a.eventDataKeys,transitionTime:a.CLICK_TRANSITION_TIME,transitionEasing:a.CLICK_TRANSITION_EASING}).call(l.setSliceCursor,d,{isTransitioning:d._transitioning}),ce.call(r,pe,q,d,{hovered:!1}),pe.x0===pe.x1||pe.y0===pe.y1?pe._text="":oe?pe._text=J?"":l.getPtLabel(pe)||"":pe._text=s(pe,g,q,h,U)||"";var ue=w.ensureSingle(Y,"g","slicetext"),_e=w.ensureSingle(ue,"text","",function(Ve){Ve.attr("data-notex",1)}),Le=w.ensureUniformFontSize(d,l.determineTextFont(q,pe,U.font)),ze=pe._text||" ",Xe=oe&&ze.indexOf("<br>")===-1;_e.text(ze).classed("slicetext",!0).attr("text-anchor",H?"end":z||Xe?"start":"middle").call(C.font,Le).call(P.convertToTspans,d),pe.textBB=C.bBox(_e.node()),pe.transform=b(pe,{fontSize:Le.size,isHeader:oe}),pe.transform.fontSize=Le.size,y?_e.transition().attrTween("transform",function(Ve){var rt=x(Ve,o,se(),[c,_]);return function(mt){return A(rt(mt))}}):_e.attr("transform",A(pe))}),W}}}),xK=Ne({"src/traces/treemap/plot.js"(te,Z){var v=X9(),w=_K();Z.exports=function(P,t,r,a){return v(P,t,r,a,{type:"treemap",drawDescendants:w})}}}),bK=Ne({"src/traces/treemap/index.js"(te,Z){Z.exports={moduleType:"trace",name:"treemap",basePlotModule:dR(),categories:[],animatable:!0,attributes:vR(),layoutAttributes:q9(),supplyDefaults:pK(),supplyLayoutDefaults:mK(),calc:V9().calc,crossTraceCalc:V9().crossTraceCalc,plot:xK(),style:pR().style,colorbar:sh(),meta:{}}}}),wK=Ne({"lib/treemap.js"(te,Z){Z.exports=bK()}}),TK=Ne({"src/traces/icicle/base_plot.js"(te){var Z=ff();te.name="icicle",te.plot=function(v,w,C,P){Z.plotBasePlot(te.name,v,w,C,P)},te.clean=function(v,w,C,P){Z.cleanBasePlot(te.name,v,w,C,P)}}}),W9=Ne({"src/traces/icicle/attributes.js"(te,Z){var{hovertemplateAttrs:v,texttemplateAttrs:w,templatefallbackAttrs:C}=Fl(),P=Wu(),t=Fc().attributes,r=d_(),a=lb(),l=vR(),i=p3(),s=fi().extendFlat,o=Fd().pattern;Z.exports={labels:a.labels,parents:a.parents,values:a.values,branchvalues:a.branchvalues,count:a.count,level:a.level,maxdepth:a.maxdepth,tiling:{orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"plot"},flip:l.tiling.flip,pad:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},marker:s({colors:a.marker.colors,line:a.marker.line,pattern:o,editType:"calc"},P("marker",{colorAttr:"colors",anim:!1})),leaf:a.leaf,pathbar:l.pathbar,text:r.text,textinfo:a.textinfo,texttemplate:w({editType:"plot"},{keys:i.eventDataKeys.concat(["label","value"])}),texttemplatefallback:C({editType:"plot"}),hovertext:r.hovertext,hoverinfo:a.hoverinfo,hovertemplate:v({},{keys:i.eventDataKeys}),hovertemplatefallback:C(),textfont:r.textfont,insidetextfont:r.insidetextfont,outsidetextfont:l.outsidetextfont,textposition:l.textposition,sort:r.sort,root:a.root,domain:t({name:"icicle",trace:!0,editType:"calc"})}}}),Y9=Ne({"src/traces/icicle/layout_attributes.js"(te,Z){Z.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),AK=Ne({"src/traces/icicle/defaults.js"(te,Z){var v=In(),w=W9(),C=Ha(),P=Fc().defaults,t=mp().handleText,r=zg().TEXTPAD,a=v_().handleMarkerDefaults,l=Nc(),i=l.hasColorscale,s=l.handleDefaults;Z.exports=function(u,d,h,g){function m(A,y){return v.coerce(u,d,w,A,y)}var E=m("labels"),c=m("parents");if(!E||!E.length||!c||!c.length){d.visible=!1;return}var _=m("values");_&&_.length?m("branchvalues"):m("count"),m("level"),m("maxdepth"),m("tiling.orientation"),m("tiling.flip"),m("tiling.pad");var T=m("text");m("texttemplate"),m("texttemplatefallback"),d.texttemplate||m("textinfo",v.isArrayOrTypedArray(T)?"text+label":"label"),m("hovertext"),m("hovertemplate"),m("hovertemplatefallback");var M=m("pathbar.visible"),k="auto";t(u,d,g,m,k,{hasPathbar:M,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),m("textposition"),a(u,d,g,m);var b=d._hasColorscale=i(u,"marker","colors")||(u.marker||{}).coloraxis;b&&s(u,d,g,m,{prefix:"marker.",cLetter:"c"}),m("leaf.opacity",b?1:.7),d._hovered={marker:{line:{width:2,color:C.contrast(g.paper_bgcolor)}}},M&&(m("pathbar.thickness",d.pathbar.textfont.size+2*r),m("pathbar.side"),m("pathbar.edgeshape")),m("sort"),m("root.color"),P(d,g,m),d._length=null}}}),SK=Ne({"src/traces/icicle/layout_defaults.js"(te,Z){var v=In(),w=Y9();Z.exports=function(P,t){function r(a,l){return v.coerce(P,t,w,a,l)}r("iciclecolorway",t.colorway),r("extendiciclecolors")}}}),Z9=Ne({"src/traces/icicle/calc.js"(te){var Z=ub();te.calc=function(v,w){return Z.calc(v,w)},te.crossTraceCalc=function(v){return Z._runCrossTraceCalc("icicle",v)}}}),EK=Ne({"src/traces/icicle/partition.js"(te,Z){var v=m_(),w=H9();Z.exports=function(P,t,r){var a=r.flipX,l=r.flipY,i=r.orientation==="h",s=r.maxDepth,o=t[0],u=t[1];s&&(o=(P.height+1)*t[0]/Math.min(P.height+1,s),u=(P.height+1)*t[1]/Math.min(P.height+1,s));var d=v.partition().padding(r.pad.inner).size(i?[t[1],o]:[t[0],u])(P);return(i||a||l)&&w(d,t,{swapXY:i,flipX:a,flipY:l}),d}}}),$9=Ne({"src/traces/icicle/style.js"(te,Z){var v=xn(),w=Ha(),C=In(),P=_c().resizeText,t=Dl();function r(l){var i=l._fullLayout._iciclelayer.selectAll(".trace");P(l,i,"icicle"),i.each(function(s){var o=v.select(this),u=s[0],d=u.trace;o.style("opacity",d.opacity),o.selectAll("path.surface").each(function(h){v.select(this).call(a,h,d,l)})})}function a(l,i,s,o){var u=i.data.data,d=!i.children,h=u.i,g=C.castOption(s,h,"marker.line.color")||w.defaultLine,m=C.castOption(s,h,"marker.line.width")||0;l.call(t,i,s,o).style("stroke-width",m).call(w.stroke,g).style("opacity",d?s.leaf.opacity:null)}Z.exports={style:r,styleOne:a}}}),MK=Ne({"src/traces/icicle/draw_descendants.js"(te,Z){var v=xn(),w=In(),C=zs(),P=hc(),t=EK(),r=$9().styleOne,a=p3(),l=Ks(),i=ku(),s=nc().formatSliceLabel,o=!1;Z.exports=function(d,h,g,m,E){var c=E.width,_=E.height,T=E.viewX,M=E.viewY,k=E.pathSlice,b=E.toMoveInsideSlice,A=E.strTransform,y=E.hasTransition,f=E.handleSlicesExit,p=E.makeUpdateSliceInterpolator,x=E.makeUpdateTextInterpolator,N=E.prevEntry,D={},B=d._context.staticPlot,U=d._fullLayout,V=h[0],q=V.trace,z=q.textposition.indexOf("left")!==-1,H=q.textposition.indexOf("right")!==-1,G=q.textposition.indexOf("bottom")!==-1,J=t(g,[c,_],{flipX:q.tiling.flip.indexOf("x")>-1,flipY:q.tiling.flip.indexOf("y")>-1,orientation:q.tiling.orientation,pad:{inner:q.tiling.pad},maxDepth:q._maxDepth}),le=J.descendants(),ge=1/0,de=-1/0;le.forEach(function(ee){var pe=ee.depth;pe>=q._maxDepth?(ee.x0=ee.x1=(ee.x0+ee.x1)/2,ee.y0=ee.y1=(ee.y0+ee.y1)/2):(ge=Math.min(ge,pe),de=Math.max(de,pe))}),m=m.data(le,l.getPtId),q._maxVisibleLayers=isFinite(de)?de-ge+1:0,m.enter().append("g").classed("slice",!0),f(m,o,D,[c,_],k),m.order();var me=null;if(y&&N){var W=l.getPtId(N);m.each(function(ee){me===null&&l.getPtId(ee)===W&&(me={x0:ee.x0,x1:ee.x1,y0:ee.y0,y1:ee.y1})})}var ie=function(){return me||{x0:0,x1:c,y0:0,y1:_}},se=m;return y&&(se=se.transition().each("end",function(){var ee=v.select(this);l.setSliceCursor(ee,d,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),se.each(function(ee){ee._x0=T(ee.x0),ee._x1=T(ee.x1),ee._y0=M(ee.y0),ee._y1=M(ee.y1),ee._hoverX=T(ee.x1-q.tiling.pad),ee._hoverY=M(G?ee.y1-q.tiling.pad/2:ee.y0+q.tiling.pad/2);var pe=v.select(this),oe=w.ensureSingle(pe,"path","surface",function(_e){_e.style("pointer-events",B?"none":"all")});y?oe.transition().attrTween("d",function(_e){var Le=p(_e,o,ie(),[c,_],{orientation:q.tiling.orientation,flipX:q.tiling.flip.indexOf("x")>-1,flipY:q.tiling.flip.indexOf("y")>-1});return function(ze){return k(Le(ze))}}):oe.attr("d",k),pe.call(i,g,d,h,{styleOne:r,eventDataKeys:a.eventDataKeys,transitionTime:a.CLICK_TRANSITION_TIME,transitionEasing:a.CLICK_TRANSITION_EASING}).call(l.setSliceCursor,d,{isTransitioning:d._transitioning}),oe.call(r,ee,q,d,{hovered:!1}),ee.x0===ee.x1||ee.y0===ee.y1?ee._text="":ee._text=s(ee,g,q,h,U)||"";var Y=w.ensureSingle(pe,"g","slicetext"),ce=w.ensureSingle(Y,"text","",function(_e){_e.attr("data-notex",1)}),ue=w.ensureUniformFontSize(d,l.determineTextFont(q,ee,U.font));ce.text(ee._text||" ").classed("slicetext",!0).attr("text-anchor",H?"end":z?"start":"middle").call(C.font,ue).call(P.convertToTspans,d),ee.textBB=C.bBox(ce.node()),ee.transform=b(ee,{fontSize:ue.size}),ee.transform.fontSize=ue.size,y?ce.transition().attrTween("transform",function(_e){var Le=x(_e,o,ie(),[c,_]);return function(ze){return A(Le(ze))}}):ce.attr("transform",A(ee))}),me}}}),CK=Ne({"src/traces/icicle/plot.js"(te,Z){var v=X9(),w=MK();Z.exports=function(P,t,r,a){return v(P,t,r,a,{type:"icicle",drawDescendants:w})}}}),kK=Ne({"src/traces/icicle/index.js"(te,Z){Z.exports={moduleType:"trace",name:"icicle",basePlotModule:TK(),categories:[],animatable:!0,attributes:W9(),layoutAttributes:Y9(),supplyDefaults:AK(),supplyLayoutDefaults:SK(),calc:Z9().calc,crossTraceCalc:Z9().crossTraceCalc,plot:CK(),style:$9().style,colorbar:sh(),meta:{}}}}),PK=Ne({"lib/icicle.js"(te,Z){Z.exports=kK()}}),LK=Ne({"src/traces/funnelarea/base_plot.js"(te){var Z=ff();te.name="funnelarea",te.plot=function(v,w,C,P){Z.plotBasePlot(te.name,v,w,C,P)},te.clean=function(v,w,C,P){Z.cleanBasePlot(te.name,v,w,C,P)}}}),K9=Ne({"src/traces/funnelarea/attributes.js"(te,Z){var v=d_(),w=qo(),C=Fc().attributes,{hovertemplateAttrs:P,texttemplateAttrs:t,templatefallbackAttrs:r}=Fl(),a=fi().extendFlat;Z.exports={labels:v.labels,label0:v.label0,dlabel:v.dlabel,values:v.values,marker:{colors:v.marker.colors,line:{color:a({},v.marker.line.color,{dflt:null}),width:a({},v.marker.line.width,{dflt:1}),editType:"calc"},pattern:v.marker.pattern,editType:"calc"},text:v.text,hovertext:v.hovertext,scalegroup:a({},v.scalegroup,{}),textinfo:a({},v.textinfo,{flags:["label","text","value","percent"]}),texttemplate:t({editType:"plot"},{keys:["label","color","value","text","percent"]}),texttemplatefallback:r({editType:"plot"}),hoverinfo:a({},w.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:P({},{keys:["label","color","value","text","percent"]}),hovertemplatefallback:r(),textposition:a({},v.textposition,{values:["inside","none"],dflt:"inside"}),textfont:v.textfont,insidetextfont:v.insidetextfont,title:{text:v.title.text,font:v.title.font,position:a({},v.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:C({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"}}}}),J9=Ne({"src/traces/funnelarea/layout_attributes.js"(te,Z){var v=bS().hiddenlabels;Z.exports={hiddenlabels:v,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),RK=Ne({"src/traces/funnelarea/defaults.js"(te,Z){var v=In(),w=K9(),C=Fc().defaults,P=mp().handleText,t=v_().handleLabelsAndValues,r=v_().handleMarkerDefaults;Z.exports=function(l,i,s,o){function u(k,b){return v.coerce(l,i,w,k,b)}var d=u("labels"),h=u("values"),g=t(d,h),m=g.len;if(i._hasLabels=g.hasLabels,i._hasValues=g.hasValues,!i._hasLabels&&i._hasValues&&(u("label0"),u("dlabel")),!m){i.visible=!1;return}i._length=m,r(l,i,o,u),u("scalegroup");var E=u("text"),c=u("texttemplate");u("texttemplatefallback");var _;if(c||(_=u("textinfo",Array.isArray(E)?"text+percent":"percent")),u("hovertext"),u("hovertemplate"),u("hovertemplatefallback"),c||_&&_!=="none"){var T=u("textposition");P(l,i,o,u,T,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else _==="none"&&u("textposition","none");C(i,o,u);var M=u("title.text");M&&(u("title.position"),v.coerceFont(u,"title.font",o.font)),u("aspectratio"),u("baseratio")}}}),IK=Ne({"src/traces/funnelarea/layout_defaults.js"(te,Z){var v=In(),w=J9();Z.exports=function(P,t){function r(a,l){return v.coerce(P,t,w,a,l)}r("hiddenlabels"),r("funnelareacolorway",t.colorway),r("extendfunnelareacolors")}}}),Q9=Ne({"src/traces/funnelarea/calc.js"(te,Z){var v=d0();function w(P,t){return v.calc(P,t)}function C(P){v.crossTraceCalc(P,{type:"funnelarea"})}Z.exports={calc:w,crossTraceCalc:C}}}),DK=Ne({"src/traces/funnelarea/plot.js"(te,Z){var v=xn(),w=zs(),C=In(),P=C.strScale,t=C.strTranslate,r=hc(),a=mu(),l=a.toMoveInsideBar,i=_c(),s=i.recordMinTextSize,o=i.clearMinTextSize,u=Ay(),d=p_(),h=d.attachFxHandlers,g=d.determineInsideTextFont,m=d.layoutAreas,E=d.prerenderTitles,c=d.positionTitleOutside,_=d.formatSliceLabel;Z.exports=function(A,y){var f=A._context.staticPlot,p=A._fullLayout;o("funnelarea",p),E(y,A),m(y,p._size),C.makeTraceGroups(p._funnelarealayer,y,"trace").each(function(x){var N=v.select(this),D=x[0],B=D.trace;k(x),N.each(function(){var U=v.select(this).selectAll("g.slice").data(x);U.enter().append("g").classed("slice",!0),U.exit().remove(),U.each(function(q,z){if(q.hidden){v.select(this).selectAll("path,g").remove();return}q.pointNumber=q.i,q.curveNumber=B.index;var H=D.cx,G=D.cy,J=v.select(this),le=J.selectAll("path.surface").data([q]);le.enter().append("path").classed("surface",!0).style({"pointer-events":f?"none":"all"}),J.call(h,A,x);var ge="M"+(H+q.TR[0])+","+(G+q.TR[1])+T(q.TR,q.BR)+T(q.BR,q.BL)+T(q.BL,q.TL)+"Z";le.attr("d",ge),_(A,q,D);var de=u.castOption(B.textposition,q.pts),me=J.selectAll("g.slicetext").data(q.text&&de!=="none"?[0]:[]);me.enter().append("g").classed("slicetext",!0),me.exit().remove(),me.each(function(){var W=C.ensureSingle(v.select(this),"text","",function(ue){ue.attr("data-notex",1)}),ie=C.ensureUniformFontSize(A,g(B,q,p.font));W.text(q.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(w.font,ie).call(r.convertToTspans,A);var se=w.bBox(W.node()),ee,pe,oe,Y=Math.min(q.BL[1],q.BR[1])+G,ce=Math.max(q.TL[1],q.TR[1])+G;pe=Math.max(q.TL[0],q.BL[0])+H,oe=Math.min(q.TR[0],q.BR[0])+H,ee=l(pe,oe,Y,ce,se,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"}),ee.fontSize=ie.size,s(B.type,ee,p),x[z].transform=ee,C.setTransormAndDisplay(W,ee)})});var V=v.select(this).selectAll("g.titletext").data(B.title.text?[0]:[]);V.enter().append("g").classed("titletext",!0),V.exit().remove(),V.each(function(){var q=C.ensureSingle(v.select(this),"text","",function(G){G.attr("data-notex",1)}),z=B.title.text;B._meta&&(z=C.templateString(z,B._meta)),q.text(z).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(w.font,B.title.font).call(r.convertToTspans,A);var H=c(D,p._size);q.attr("transform",t(H.x,H.y)+P(Math.min(1,H.scale))+t(H.tx,H.ty))})})})};function T(b,A){var y=A[0]-b[0],f=A[1]-b[1];return"l"+y+","+f}function M(b,A){return[.5*(b[0]+A[0]),.5*(b[1]+A[1])]}function k(b){if(!b.length)return;var A=b[0],y=A.trace,f=y.aspectratio,p=y.baseratio;p>.999&&(p=.999);var x=Math.pow(p,2),N=A.vTotal,D=N*x/(1-x),B=N,U=D/N;function V(){var _e=Math.sqrt(U);return{x:_e,y:-_e}}function q(){var _e=V();return[_e.x,_e.y]}var z,H=[];H.push(q());var G,J;for(G=b.length-1;G>-1;G--)if(J=b[G],!J.hidden){var le=J.v/B;U+=le,H.push(q())}var ge=1/0,de=-1/0;for(G=0;G<H.length;G++)z=H[G],ge=Math.min(ge,z[1]),de=Math.max(de,z[1]);for(G=0;G<H.length;G++)H[G][1]-=(de+ge)/2;var me=H[H.length-1][0],W=A.r,ie=(de-ge)/2,se=W/me,ee=W/ie*f;for(A.r=ee*ie,G=0;G<H.length;G++)H[G][0]*=se,H[G][1]*=ee;z=H[0];var pe=[-z[0],z[1]],oe=[z[0],z[1]],Y=0;for(G=b.length-1;G>-1;G--)if(J=b[G],!J.hidden){Y+=1;var ce=H[Y][0],ue=H[Y][1];J.TL=[-ce,ue],J.TR=[ce,ue],J.BL=pe,J.BR=oe,J.pxmid=M(J.TR,J.BR),pe=J.TL,oe=J.TR}}}}),OK=Ne({"src/traces/funnelarea/style.js"(te,Z){var v=xn(),w=Ax(),C=_c().resizeText;Z.exports=function(t){var r=t._fullLayout._funnelarealayer.selectAll(".trace");C(t,r,"funnelarea"),r.each(function(a){var l=a[0],i=l.trace,s=v.select(this);s.style({opacity:i.opacity}),s.selectAll("path.surface").each(function(o){v.select(this).call(w,o,i,t)})})}}}),zK=Ne({"src/traces/funnelarea/index.js"(te,Z){Z.exports={moduleType:"trace",name:"funnelarea",basePlotModule:LK(),categories:["pie-like","funnelarea","showLegend"],attributes:K9(),layoutAttributes:J9(),supplyDefaults:RK(),supplyLayoutDefaults:IK(),calc:Q9().calc,crossTraceCalc:Q9().crossTraceCalc,plot:DK(),style:OK(),styleOne:Ax(),meta:{}}}}),NK=Ne({"lib/funnelarea.js"(te,Z){Z.exports=zK()}}),Gv=Ne({"stackgl_modules/index.js"(te,Z){(function(){var v={24:(function(t){var r={left:0,top:0};t.exports=a;function a(i,s,o){s=s||i.currentTarget||i.srcElement,Array.isArray(o)||(o=[0,0]);var u=i.clientX||0,d=i.clientY||0,h=l(s);return o[0]=u-h.left,o[1]=d-h.top,o}function l(i){return i===window||i===document||i===document.body?r:i.getBoundingClientRect()}}),109:(function(t){t.exports=r;function r(a,l,i,s){var o=i[0],u=i[2],d=l[0]-o,h=l[2]-u,g=Math.sin(s),m=Math.cos(s);return a[0]=o+h*g+d*m,a[1]=l[1],a[2]=u+h*m-d*g,a}}),160:(function(t){t.exports=r;function r(a,l,i){return a[0]=Math.max(l[0],i[0]),a[1]=Math.max(l[1],i[1]),a[2]=Math.max(l[2],i[2]),a[3]=Math.max(l[3],i[3]),a}}),216:(function(t){t.exports=r;function r(a,l){for(var i={},s=0;s<a.length;++s)for(var o=a[s].name,u=o.split("."),d=i,h=0;h<u.length;++h){var g=u[h].split("[");if(g.length>1){g[0]in d||(d[g[0]]=[]),d=d[g[0]];for(var m=1;m<g.length;++m){var E=parseInt(g[m]);m<g.length-1||h<u.length-1?(E in d||(m<g.length-1?d[E]=[]:d[E]={}),d=d[E]):l?d[E]=s:d[E]=a[s].type}}else h<u.length-1?(g[0]in d||(d[g[0]]={}),d=d[g[0]]):l?d[g[0]]=s:d[g[0]]=a[s].type}return i}}),236:(function(t,r,a){var l=a(8284);t.exports=i;function i(){var s={};return function(o){if((typeof o!="object"||o===null)&&typeof o!="function")throw new Error("Weakmap-shim: Key must be object");var u=o.valueOf(s);return u&&u.identity===s?u:l(o,s)}}}),244:(function(t){t.exports=r;function r(a,l){return a[0]*l[0]+a[1]*l[1]+a[2]*l[2]}}),264:(function(t){t.exports=r;function r(a,l,i){var s=l[0],o=l[1],u=l[2],d=i[0],h=i[1],g=i[2],m=i[3],E=m*s+h*u-g*o,c=m*o+g*s-d*u,_=m*u+d*o-h*s,T=-d*s-h*o-g*u;return a[0]=E*m+T*-d+c*-g-_*-h,a[1]=c*m+T*-h+_*-d-E*-g,a[2]=_*m+T*-g+E*-h-c*-d,a}}),332:(function(t,r,a){t.exports=N;var l=a(1755),i=a(6867),s=a(1125),o=a(7842),u=a(1318),d=a(946),h=a(5838),g=a(1278),m=a(3637);function E(D){var B=d(D);return[g(B,-1/0),g(B,1/0)]}function c(D,B){for(var U=new Array(B.length),V=0;V<B.length;++V){var q=B[V],z=D[q[0]],H=D[q[1]];U[V]=[g(Math.min(z[0],H[0]),-1/0),g(Math.min(z[1],H[1]),-1/0),g(Math.max(z[0],H[0]),1/0),g(Math.max(z[1],H[1]),1/0)]}return U}function _(D){for(var B=new Array(D.length),U=0;U<D.length;++U){var V=D[U];B[U]=[g(V[0],-1/0),g(V[1],-1/0),g(V[0],1/0),g(V[1],1/0)]}return B}function T(D,B,U){var V=[];return i(U,function(q,z){var H=B[q],G=B[z];if(!(H[0]===G[0]||H[0]===G[1]||H[1]===G[0]||H[1]===G[1])){var J=D[H[0]],le=D[H[1]],ge=D[G[0]],de=D[G[1]];s(J,le,ge,de)&&V.push([q,z])}}),V}function M(D,B,U,V){var q=[];return i(U,V,function(z,H){var G=B[z];if(!(G[0]===H||G[1]===H)){var J=D[H],le=D[G[0]],ge=D[G[1]];s(le,ge,J,J)&&q.push([z,H])}}),q}function k(D,B,U,V,q){var z,H,G=D.map(function(ze){return[o(ze[0]),o(ze[1])]});for(z=0;z<U.length;++z){var J=U[z];H=J[0];var le=J[1],ge=B[H],de=B[le],me=m(h(D[ge[0]]),h(D[ge[1]]),h(D[de[0]]),h(D[de[1]]));if(me){var W=D.length;D.push([d(me[0]),d(me[1])]),G.push(me),V.push([H,W],[le,W])}}for(V.sort(function(ze,Xe){if(ze[0]!==Xe[0])return ze[0]-Xe[0];var Ve=G[ze[1]],rt=G[Xe[1]];return u(Ve[0],rt[0])||u(Ve[1],rt[1])}),z=V.length-1;z>=0;--z){var ie=V[z];H=ie[0];var se=B[H],ee=se[0],pe=se[1],oe=D[ee],Y=D[pe];if((oe[0]-Y[0]||oe[1]-Y[1])<0){var ce=ee;ee=pe,pe=ce}se[0]=ee;var ue=se[1]=ie[1],_e;for(q&&(_e=se[2]);z>0&&V[z-1][0]===H;){var ie=V[--z],Le=ie[1];q?B.push([ue,Le,_e]):B.push([ue,Le]),ue=Le}q?B.push([ue,pe,_e]):B.push([ue,pe])}return G}function b(D,B,U){for(var V=B.length,q=new l(V),z=[],H=0;H<B.length;++H){var G=B[H],J=E(G[0]),le=E(G[1]);z.push([g(J[0],-1/0),g(le[0],-1/0),g(J[1],1/0),g(le[1],1/0)])}i(z,function(ie,se){q.link(ie,se)});for(var ge=!0,de=new Array(V),H=0;H<V;++H){var me=q.find(H);me!==H&&(ge=!1,D[me]=[Math.min(D[H][0],D[me][0]),Math.min(D[H][1],D[me][1])])}if(ge)return null;for(var W=0,H=0;H<V;++H){var me=q.find(H);me===H?(de[H]=W,D[W++]=D[H]):de[H]=-1}D.length=W;for(var H=0;H<V;++H)de[H]<0&&(de[H]=de[q.find(H)]);return de}function A(D,B){return D[0]-B[0]||D[1]-B[1]}function y(D,B){var U=D[0]-B[0]||D[1]-B[1];return U||(D[2]<B[2]?-1:D[2]>B[2]?1:0)}function f(D,B,U){if(D.length!==0){if(B)for(var V=0;V<D.length;++V){var q=D[V],z=B[q[0]],H=B[q[1]];q[0]=Math.min(z,H),q[1]=Math.max(z,H)}else for(var V=0;V<D.length;++V){var q=D[V],z=q[0],H=q[1];q[0]=Math.min(z,H),q[1]=Math.max(z,H)}U?D.sort(y):D.sort(A);for(var G=1,V=1;V<D.length;++V){var J=D[V-1],le=D[V];le[0]===J[0]&&le[1]===J[1]&&(!U||le[2]===J[2])||(D[G++]=le)}D.length=G}}function p(D,B,U){var V=b(D,[],_(D));return f(B,V,U),!!V}function x(D,B,U){var V=c(D,B),q=T(D,B,V),z=_(D),H=M(D,B,V,z),G=k(D,B,q,H,U),J=b(D,G);return f(B,J,U),J?!0:q.length>0||H.length>0}function N(D,B,U){var V;if(U){V=B;for(var q=new Array(B.length),z=0;z<B.length;++z){var H=B[z];q[z]=[H[0],H[1],U[z]]}B=q}for(var G=p(D,B,!!U);x(D,B,!!U);)G=!0;if(U&&G){V.length=0,U.length=0;for(var z=0;z<B.length;++z){var H=B[z];V.push([H[0],H[1]]),U.push(H[2])}}return G}}),351:(function(t,r,a){t.exports=i;var l=a(4687);function i(s,o){o||(o=s,s=window);var u=0,d=0,h=0,g={shift:!1,alt:!1,control:!1,meta:!1},m=!1;function E(x){var N=!1;return"altKey"in x&&(N=N||x.altKey!==g.alt,g.alt=!!x.altKey),"shiftKey"in x&&(N=N||x.shiftKey!==g.shift,g.shift=!!x.shiftKey),"ctrlKey"in x&&(N=N||x.ctrlKey!==g.control,g.control=!!x.ctrlKey),"metaKey"in x&&(N=N||x.metaKey!==g.meta,g.meta=!!x.metaKey),N}function c(x,N){var D=l.x(N),B=l.y(N);"buttons"in N&&(x=N.buttons|0),(x!==u||D!==d||B!==h||E(N))&&(u=x|0,d=D||0,h=B||0,o&&o(u,d,h,g))}function _(x){c(0,x)}function T(){(u||d||h||g.shift||g.alt||g.meta||g.control)&&(d=h=0,u=0,g.shift=g.alt=g.control=g.meta=!1,o&&o(0,0,0,g))}function M(x){E(x)&&o&&o(u,d,h,g)}function k(x){l.buttons(x)===0?c(0,x):c(u,x)}function b(x){c(u|l.buttons(x),x)}function A(x){c(u&~l.buttons(x),x)}function y(){m||(m=!0,s.addEventListener("mousemove",k),s.addEventListener("mousedown",b),s.addEventListener("mouseup",A),s.addEventListener("mouseleave",_),s.addEventListener("mouseenter",_),s.addEventListener("mouseout",_),s.addEventListener("mouseover",_),s.addEventListener("blur",T),s.addEventListener("keyup",M),s.addEventListener("keydown",M),s.addEventListener("keypress",M),s!==window&&(window.addEventListener("blur",T),window.addEventListener("keyup",M),window.addEventListener("keydown",M),window.addEventListener("keypress",M)))}function f(){m&&(m=!1,s.removeEventListener("mousemove",k),s.removeEventListener("mousedown",b),s.removeEventListener("mouseup",A),s.removeEventListener("mouseleave",_),s.removeEventListener("mouseenter",_),s.removeEventListener("mouseout",_),s.removeEventListener("mouseover",_),s.removeEventListener("blur",T),s.removeEventListener("keyup",M),s.removeEventListener("keydown",M),s.removeEventListener("keypress",M),s!==window&&(window.removeEventListener("blur",T),window.removeEventListener("keyup",M),window.removeEventListener("keydown",M),window.removeEventListener("keypress",M)))}y();var p={element:s};return Object.defineProperties(p,{enabled:{get:function(){return m},set:function(x){x?y():f()},enumerable:!0},buttons:{get:function(){return u},enumerable:!0},x:{get:function(){return d},enumerable:!0},y:{get:function(){return h},enumerable:!0},mods:{get:function(){return g},enumerable:!0}}),p}}),395:(function(t){function r(a,l,i){return a*(1-i)+l*i}t.exports=r}),446:(function(t,r,a){var l=a(7640),i={};function s(o){var u=o.order,d=o.dtype,h=[u,d],g=h.join(":"),m=i[g];return m||(i[g]=m=l(u,d)),m(o),o}t.exports=s}),483:(function(t){t.exports=r;function r(a){var l=a[0],i=a[1],s=a[2],o=a[3];return l*l+i*i+s*s+o*o}}),492:(function(t){t.exports=r;function r(a,l,i){var s=l[0],o=l[1],u=l[2];return a[0]=s*i[0]+o*i[3]+u*i[6],a[1]=s*i[1]+o*i[4]+u*i[7],a[2]=s*i[2]+o*i[5]+u*i[8],a}}),501:(function(t,r,a){t.exports=T;var l=a(2762),i=a(8116),s=a(1879).n,o=[0,0,0],u=[0,0,0],d=[0,0,0],h=[0,0,0],g=[1,1];function m(M){return M[0]=M[1]=M[2]=0,M}function E(M,k){return M[0]=k[0],M[1]=k[1],M[2]=k[2],M}function c(M,k,b,A,y,f,p,x){this.gl=M,this.vertBuffer=k,this.vao=b,this.shader=A,this.tickCount=y,this.tickOffset=f,this.gridCount=p,this.gridOffset=x}var _=c.prototype;_.bind=function(M,k,b){this.shader.bind(),this.shader.uniforms.model=M,this.shader.uniforms.view=k,this.shader.uniforms.projection=b,g[0]=this.gl.drawingBufferWidth,g[1]=this.gl.drawingBufferHeight,this.shader.uniforms.screenShape=g,this.vao.bind()},_.unbind=function(){this.vao.unbind()},_.drawAxisLine=function(M,k,b,A,y){var f=m(u);this.shader.uniforms.majorAxis=u,f[M]=k[1][M]-k[0][M],this.shader.uniforms.minorAxis=f;var p=E(h,b);p[M]+=k[0][M],this.shader.uniforms.offset=p,this.shader.uniforms.lineWidth=y,this.shader.uniforms.color=A;var x=m(d);x[(M+2)%3]=1,this.shader.uniforms.screenAxis=x,this.vao.draw(this.gl.TRIANGLES,6);var x=m(d);x[(M+1)%3]=1,this.shader.uniforms.screenAxis=x,this.vao.draw(this.gl.TRIANGLES,6)},_.drawAxisTicks=function(M,k,b,A,y){if(this.tickCount[M]){var f=m(o);f[M]=1,this.shader.uniforms.majorAxis=f,this.shader.uniforms.offset=k,this.shader.uniforms.minorAxis=b,this.shader.uniforms.color=A,this.shader.uniforms.lineWidth=y;var p=m(d);p[M]=1,this.shader.uniforms.screenAxis=p,this.vao.draw(this.gl.TRIANGLES,this.tickCount[M],this.tickOffset[M])}},_.drawGrid=function(M,k,b,A,y,f){if(this.gridCount[M]){var p=m(u);p[k]=b[1][k]-b[0][k],this.shader.uniforms.minorAxis=p;var x=E(h,A);x[k]+=b[0][k],this.shader.uniforms.offset=x;var N=m(o);N[M]=1,this.shader.uniforms.majorAxis=N;var D=m(d);D[M]=1,this.shader.uniforms.screenAxis=D,this.shader.uniforms.lineWidth=f,this.shader.uniforms.color=y,this.vao.draw(this.gl.TRIANGLES,this.gridCount[M],this.gridOffset[M])}},_.drawZero=function(M,k,b,A,y,f){var p=m(u);this.shader.uniforms.majorAxis=p,p[M]=b[1][M]-b[0][M],this.shader.uniforms.minorAxis=p;var x=E(h,A);x[M]+=b[0][M],this.shader.uniforms.offset=x;var N=m(d);N[k]=1,this.shader.uniforms.screenAxis=N,this.shader.uniforms.lineWidth=f,this.shader.uniforms.color=y,this.vao.draw(this.gl.TRIANGLES,6)},_.dispose=function(){this.vao.dispose(),this.vertBuffer.dispose(),this.shader.dispose()};function T(M,k,b){var A=[],y=[0,0,0],f=[0,0,0],p=[0,0,0],x=[0,0,0];A.push(0,0,1,0,1,1,0,0,-1,0,0,-1,0,1,1,0,1,-1);for(var N=0;N<3;++N){for(var U=A.length/3|0,D=0;D<b[N].length;++D){var B=+b[N][D].x;A.push(B,0,1,B,1,1,B,0,-1,B,0,-1,B,1,1,B,1,-1)}var q=A.length/3|0;y[N]=U,f[N]=q-U;for(var U=A.length/3|0,V=0;V<b[N].length;++V){var B=+b[N][V].x;A.push(B,0,1,B,1,1,B,0,-1,B,0,-1,B,1,1,B,1,-1)}var q=A.length/3|0;p[N]=U,x[N]=q-U}var z=l(M,new Float32Array(A)),H=i(M,[{buffer:z,type:M.FLOAT,size:3,stride:0,offset:0}]),G=s(M);return G.attributes.position.location=0,new c(M,z,H,G,f,y,x,p)}}),544:(function(t,r,a){var l=a(5572);t.exports=i;function i(s,o){for(var u=s.length,d=new Array(u),h=0;h<u;++h)d[h]=l(s[h],o[h]);return d}}),606:(function(t,r,a){var l=a(236);t.exports=i;function i(){var s=l();return{get:function(o,u){var d=s(o);return d.hasOwnProperty("value")?d.value:u},set:function(o,u){return s(o).value=u,this},has:function(o){return"value"in s(o)},delete:function(o){return delete s(o).value}}}}),614:(function(t,r,a){var l=a(3236),i=l([`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;
}
`]),s=l([`#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;
}
`]),o=l([`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;
}
`]),u=l([`precision highp float;
#define GLSLIFY 1

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

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);
}`]);r.meshShader={vertex:i,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},r.pickShader={vertex:o,fragment:u,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}}),620:(function(t){t.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]}),665:(function(t,r,a){var l=a(3202);t.exports=u;var i=96;function s(d,h){var g=l(getComputedStyle(d).getPropertyValue(h));return g[0]*u(g[1],d)}function o(d,h){var g=document.createElement("div");g.style["font-size"]="128"+d,h.appendChild(g);var m=s(g,"font-size")/128;return h.removeChild(g),m}function u(d,h){switch(h=h||document.body,d=(d||"px").trim().toLowerCase(),(h===window||h===document)&&(h=document.body),d){case"%":return h.clientHeight/100;case"ch":case"ex":return o(d,h);case"em":return s(h,"font-size");case"rem":return s(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 i;case"cm":return i/2.54;case"mm":return i/25.4;case"pt":return i/72;case"pc":return i/6}return 1}}),727:(function(t,r,a){var l=a(2962),i=6;function s(M){var k=M===2?d:M===3?h:M===4?g:M===5?m:E;return M<6?k(l[M]):k(l)}function o(){return[[0]]}function u(M,k){return[[k[0]],[M[0][0]]]}function d(M){return function(b,A){return[M([[+A[0],+b[0][1]],[+A[1],+b[1][1]]]),M([[+b[0][0],+A[0]],[+b[1][0],+A[1]]]),M(b)]}}function h(M){return function(b,A){return[M([[+A[0],+b[0][1],+b[0][2]],[+A[1],+b[1][1],+b[1][2]],[+A[2],+b[2][1],+b[2][2]]]),M([[+b[0][0],+A[0],+b[0][2]],[+b[1][0],+A[1],+b[1][2]],[+b[2][0],+A[2],+b[2][2]]]),M([[+b[0][0],+b[0][1],+A[0]],[+b[1][0],+b[1][1],+A[1]],[+b[2][0],+b[2][1],+A[2]]]),M(b)]}}function g(M){return function(b,A){return[M([[+A[0],+b[0][1],+b[0][2],+b[0][3]],[+A[1],+b[1][1],+b[1][2],+b[1][3]],[+A[2],+b[2][1],+b[2][2],+b[2][3]],[+A[3],+b[3][1],+b[3][2],+b[3][3]]]),M([[+b[0][0],+A[0],+b[0][2],+b[0][3]],[+b[1][0],+A[1],+b[1][2],+b[1][3]],[+b[2][0],+A[2],+b[2][2],+b[2][3]],[+b[3][0],+A[3],+b[3][2],+b[3][3]]]),M([[+b[0][0],+b[0][1],+A[0],+b[0][3]],[+b[1][0],+b[1][1],+A[1],+b[1][3]],[+b[2][0],+b[2][1],+A[2],+b[2][3]],[+b[3][0],+b[3][1],+A[3],+b[3][3]]]),M([[+b[0][0],+b[0][1],+b[0][2],+A[0]],[+b[1][0],+b[1][1],+b[1][2],+A[1]],[+b[2][0],+b[2][1],+b[2][2],+A[2]],[+b[3][0],+b[3][1],+b[3][2],+A[3]]]),M(b)]}}function m(M){return function(b,A){return[M([[+A[0],+b[0][1],+b[0][2],+b[0][3],+b[0][4]],[+A[1],+b[1][1],+b[1][2],+b[1][3],+b[1][4]],[+A[2],+b[2][1],+b[2][2],+b[2][3],+b[2][4]],[+A[3],+b[3][1],+b[3][2],+b[3][3],+b[3][4]],[+A[4],+b[4][1],+b[4][2],+b[4][3],+b[4][4]]]),M([[+b[0][0],+A[0],+b[0][2],+b[0][3],+b[0][4]],[+b[1][0],+A[1],+b[1][2],+b[1][3],+b[1][4]],[+b[2][0],+A[2],+b[2][2],+b[2][3],+b[2][4]],[+b[3][0],+A[3],+b[3][2],+b[3][3],+b[3][4]],[+b[4][0],+A[4],+b[4][2],+b[4][3],+b[4][4]]]),M([[+b[0][0],+b[0][1],+A[0],+b[0][3],+b[0][4]],[+b[1][0],+b[1][1],+A[1],+b[1][3],+b[1][4]],[+b[2][0],+b[2][1],+A[2],+b[2][3],+b[2][4]],[+b[3][0],+b[3][1],+A[3],+b[3][3],+b[3][4]],[+b[4][0],+b[4][1],+A[4],+b[4][3],+b[4][4]]]),M([[+b[0][0],+b[0][1],+b[0][2],+A[0],+b[0][4]],[+b[1][0],+b[1][1],+b[1][2],+A[1],+b[1][4]],[+b[2][0],+b[2][1],+b[2][2],+A[2],+b[2][4]],[+b[3][0],+b[3][1],+b[3][2],+A[3],+b[3][4]],[+b[4][0],+b[4][1],+b[4][2],+A[4],+b[4][4]]]),M([[+b[0][0],+b[0][1],+b[0][2],+b[0][3],+A[0]],[+b[1][0],+b[1][1],+b[1][2],+b[1][3],+A[1]],[+b[2][0],+b[2][1],+b[2][2],+b[2][3],+A[2]],[+b[3][0],+b[3][1],+b[3][2],+b[3][3],+A[3]],[+b[4][0],+b[4][1],+b[4][2],+b[4][3],+A[4]]]),M(b)]}}function E(M){return function(b,A){return[M([[+A[0],+b[0][1],+b[0][2],+b[0][3],+b[0][4],+b[0][5]],[+A[1],+b[1][1],+b[1][2],+b[1][3],+b[1][4],+b[1][5]],[+A[2],+b[2][1],+b[2][2],+b[2][3],+b[2][4],+b[2][5]],[+A[3],+b[3][1],+b[3][2],+b[3][3],+b[3][4],+b[3][5]],[+A[4],+b[4][1],+b[4][2],+b[4][3],+b[4][4],+b[4][5]],[+A[5],+b[5][1],+b[5][2],+b[5][3],+b[5][4],+b[5][5]]]),M([[+b[0][0],+A[0],+b[0][2],+b[0][3],+b[0][4],+b[0][5]],[+b[1][0],+A[1],+b[1][2],+b[1][3],+b[1][4],+b[1][5]],[+b[2][0],+A[2],+b[2][2],+b[2][3],+b[2][4],+b[2][5]],[+b[3][0],+A[3],+b[3][2],+b[3][3],+b[3][4],+b[3][5]],[+b[4][0],+A[4],+b[4][2],+b[4][3],+b[4][4],+b[4][5]],[+b[5][0],+A[5],+b[5][2],+b[5][3],+b[5][4],+b[5][5]]]),M([[+b[0][0],+b[0][1],+A[0],+b[0][3],+b[0][4],+b[0][5]],[+b[1][0],+b[1][1],+A[1],+b[1][3],+b[1][4],+b[1][5]],[+b[2][0],+b[2][1],+A[2],+b[2][3],+b[2][4],+b[2][5]],[+b[3][0],+b[3][1],+A[3],+b[3][3],+b[3][4],+b[3][5]],[+b[4][0],+b[4][1],+A[4],+b[4][3],+b[4][4],+b[4][5]],[+b[5][0],+b[5][1],+A[5],+b[5][3],+b[5][4],+b[5][5]]]),M([[+b[0][0],+b[0][1],+b[0][2],+A[0],+b[0][4],+b[0][5]],[+b[1][0],+b[1][1],+b[1][2],+A[1],+b[1][4],+b[1][5]],[+b[2][0],+b[2][1],+b[2][2],+A[2],+b[2][4],+b[2][5]],[+b[3][0],+b[3][1],+b[3][2],+A[3],+b[3][4],+b[3][5]],[+b[4][0],+b[4][1],+b[4][2],+A[4],+b[4][4],+b[4][5]],[+b[5][0],+b[5][1],+b[5][2],+A[5],+b[5][4],+b[5][5]]]),M([[+b[0][0],+b[0][1],+b[0][2],+b[0][3],+A[0],+b[0][5]],[+b[1][0],+b[1][1],+b[1][2],+b[1][3],+A[1],+b[1][5]],[+b[2][0],+b[2][1],+b[2][2],+b[2][3],+A[2],+b[2][5]],[+b[3][0],+b[3][1],+b[3][2],+b[3][3],+A[3],+b[3][5]],[+b[4][0],+b[4][1],+b[4][2],+b[4][3],+A[4],+b[4][5]],[+b[5][0],+b[5][1],+b[5][2],+b[5][3],+A[5],+b[5][5]]]),M([[+b[0][0],+b[0][1],+b[0][2],+b[0][3],+b[0][4],+A[0]],[+b[1][0],+b[1][1],+b[1][2],+b[1][3],+b[1][4],+A[1]],[+b[2][0],+b[2][1],+b[2][2],+b[2][3],+b[2][4],+A[2]],[+b[3][0],+b[3][1],+b[3][2],+b[3][3],+b[3][4],+A[3]],[+b[4][0],+b[4][1],+b[4][2],+b[4][3],+b[4][4],+A[4]],[+b[5][0],+b[5][1],+b[5][2],+b[5][3],+b[5][4],+A[5]]]),M(b)]}}var c=[o,u];function _(M,k,b,A,y,f,p,x){return function(D,B){switch(D.length){case 0:return M(D,B);case 1:return k(D,B);case 2:return b(D,B);case 3:return A(D,B);case 4:return y(D,B);case 5:return f(D,B)}var U=p[D.length];return U||(U=p[D.length]=x(D.length)),U(D,B)}}function T(){for(;c.length<i;)c.push(s(c.length));t.exports=_.apply(void 0,c.concat([c,s]));for(var M=0;M<i;++M)t.exports[M]=c[M]}T()}),737:(function(t){t.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"}}),781:(function(t,r,a){t.exports=i;var l=a(3349);function i(s,o){var u=[];return o=+o||0,l(s.hi(s.shape[0]-1),u,o),u}}),783:(function(t){t.exports=r;function r(a,l,i,s){var o=l[0],u=l[1],d=l[2],h=l[3],g=i[0],m=i[1],E=i[2],c=i[3],_,T,M,k,b;return T=o*g+u*m+d*E+h*c,T<0&&(T=-T,g=-g,m=-m,E=-E,c=-c),1-T>1e-6?(_=Math.acos(T),M=Math.sin(_),k=Math.sin((1-s)*_)/M,b=Math.sin(s*_)/M):(k=1-s,b=s),a[0]=k*o+b*g,a[1]=k*u+b*m,a[2]=k*d+b*E,a[3]=k*h+b*c,a}}),799:(function(t,r,a){var l=a(3236),i=a(9405),s=l([`precision mediump float;
#define GLSLIFY 1
attribute vec2 position;
varying vec2 uv;
void main() {
  uv = position;
  gl_Position = vec4(position, 0, 1);
}`]),o=l([`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);
}`]);t.exports=function(u){return i(u,s,o,null,[{name:"position",type:"vec2"}])}}),811:(function(t){t.exports=r;function r(a,l){return a[0]=1/l[0],a[1]=1/l[1],a[2]=1/l[2],a}}),840:(function(t,r,a){var l=a(3236),i=l([`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;
}
`]),s=l([`#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;
}
`]),o=l([`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;
}`]),u=l([`precision highp float;
#define GLSLIFY 1

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

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;
}`]),d=l([`precision highp float;
#define GLSLIFY 1

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

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;
}`]),h=l([`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;
}`]),g=l([`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;
}`]),m=l([`precision highp float;
#define GLSLIFY 1

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

uniform vec3  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);
}`]),E=l([`precision highp float;
#define GLSLIFY 1

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

attribute vec3  position;
attribute 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;
}`]),c=l([`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)));
}`]),_=l([`precision highp float;
#define GLSLIFY 1

uniform vec3 contourColor;

void main() {
  gl_FragColor = vec4(contourColor, 1.0);
}
`]);r.meshShader={vertex:i,fragment:s,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},r.wireShader={vertex:o,fragment:u,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},r.pointShader={vertex:d,fragment:h,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},r.pickShader={vertex:g,fragment:m,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},r.pointPickShader={vertex:E,fragment:m,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},r.contourShader={vertex:c,fragment:_,attributes:[{name:"position",type:"vec3"}]}}),855:(function(t,r,a){t.exports={init:T,sweepBipartite:b,sweepComplete:A,scanBipartite:y,scanComplete:f};var l=a(1888),i=a(8828),s=a(4192),o=1<<28,u=1024,d=l.mallocInt32(u),h=l.mallocInt32(u),g=l.mallocInt32(u),m=l.mallocInt32(u),E=l.mallocInt32(u),c=l.mallocInt32(u),_=l.mallocDouble(u*8);function T(p){var x=i.nextPow2(p);d.length<x&&(l.free(d),d=l.mallocInt32(x)),h.length<x&&(l.free(h),h=l.mallocInt32(x)),g.length<x&&(l.free(g),g=l.mallocInt32(x)),m.length<x&&(l.free(m),m=l.mallocInt32(x)),E.length<x&&(l.free(E),E=l.mallocInt32(x)),c.length<x&&(l.free(c),c=l.mallocInt32(x));var N=8*x;_.length<N&&(l.free(_),_=l.mallocDouble(N))}function M(p,x,N,D){var B=x[D],U=p[N-1];p[B]=U,x[U]=B}function k(p,x,N,D){p[N]=D,x[D]=N}function b(p,x,N,D,B,U,V,q,z,H){for(var G=0,J=2*p,le=p-1,ge=J-1,de=N;de<D;++de){var me=U[de],W=J*de;_[G++]=B[W+le],_[G++]=-(me+1),_[G++]=B[W+ge],_[G++]=me}for(var de=V;de<q;++de){var me=H[de]+o,ie=J*de;_[G++]=z[ie+le],_[G++]=-me,_[G++]=z[ie+ge],_[G++]=me}var se=G>>>1;s(_,se);for(var ee=0,pe=0,de=0;de<se;++de){var oe=_[2*de+1]|0;if(oe>=o)oe=oe-o|0,M(g,m,pe--,oe);else if(oe>=0)M(d,h,ee--,oe);else if(oe<=-o){oe=-oe-o|0;for(var Y=0;Y<ee;++Y){var ce=x(d[Y],oe);if(ce!==void 0)return ce}k(g,m,pe++,oe)}else{oe=-oe-1|0;for(var Y=0;Y<pe;++Y){var ce=x(oe,g[Y]);if(ce!==void 0)return ce}k(d,h,ee++,oe)}}}function A(p,x,N,D,B,U,V,q,z,H){for(var G=0,J=2*p,le=p-1,ge=J-1,de=N;de<D;++de){var me=U[de]+1<<1,W=J*de;_[G++]=B[W+le],_[G++]=-me,_[G++]=B[W+ge],_[G++]=me}for(var de=V;de<q;++de){var me=H[de]+1<<1,ie=J*de;_[G++]=z[ie+le],_[G++]=-me|1,_[G++]=z[ie+ge],_[G++]=me|1}var se=G>>>1;s(_,se);for(var ee=0,pe=0,oe=0,de=0;de<se;++de){var Y=_[2*de+1]|0,ce=Y&1;if(de<se-1&&Y>>1===_[2*de+3]>>1&&(ce=2,de+=1),Y<0){for(var ue=-(Y>>1)-1,_e=0;_e<oe;++_e){var Le=x(E[_e],ue);if(Le!==void 0)return Le}if(ce!==0)for(var _e=0;_e<ee;++_e){var Le=x(d[_e],ue);if(Le!==void 0)return Le}if(ce!==1)for(var _e=0;_e<pe;++_e){var Le=x(g[_e],ue);if(Le!==void 0)return Le}ce===0?k(d,h,ee++,ue):ce===1?k(g,m,pe++,ue):ce===2&&k(E,c,oe++,ue)}else{var ue=(Y>>1)-1;ce===0?M(d,h,ee--,ue):ce===1?M(g,m,pe--,ue):ce===2&&M(E,c,oe--,ue)}}}function y(p,x,N,D,B,U,V,q,z,H,G,J){var le=0,ge=2*p,de=x,me=x+p,W=1,ie=1;D?ie=o:W=o;for(var se=B;se<U;++se){var ee=se+W,pe=ge*se;_[le++]=V[pe+de],_[le++]=-ee,_[le++]=V[pe+me],_[le++]=ee}for(var se=z;se<H;++se){var ee=se+ie,oe=ge*se;_[le++]=G[oe+de],_[le++]=-ee}var Y=le>>>1;s(_,Y);for(var ce=0,se=0;se<Y;++se){var ue=_[2*se+1]|0;if(ue<0){var ee=-ue,_e=!1;if(ee>=o?(_e=!D,ee-=o):(_e=!!D,ee-=1),_e)k(d,h,ce++,ee);else{var Le=J[ee],ze=ge*ee,Xe=G[ze+x+1],Ve=G[ze+x+1+p];e:for(var rt=0;rt<ce;++rt){var mt=d[rt],_t=ge*mt;if(!(Ve<V[_t+x+1]||V[_t+x+1+p]<Xe)){for(var vt=x+2;vt<p;++vt)if(G[ze+vt+p]<V[_t+vt]||V[_t+vt+p]<G[ze+vt])continue e;var ut=q[mt],Fe;if(D?Fe=N(Le,ut):Fe=N(ut,Le),Fe!==void 0)return Fe}}}}else M(d,h,ce--,ue-W)}}function f(p,x,N,D,B,U,V,q,z,H,G){for(var J=0,le=2*p,ge=x,de=x+p,me=D;me<B;++me){var W=me+o,ie=le*me;_[J++]=U[ie+ge],_[J++]=-W,_[J++]=U[ie+de],_[J++]=W}for(var me=q;me<z;++me){var W=me+1,se=le*me;_[J++]=H[se+ge],_[J++]=-W}var ee=J>>>1;s(_,ee);for(var pe=0,me=0;me<ee;++me){var oe=_[2*me+1]|0;if(oe<0){var W=-oe;if(W>=o)d[pe++]=W-o;else{W-=1;var Y=G[W],ce=le*W,ue=H[ce+x+1],_e=H[ce+x+1+p];e:for(var Le=0;Le<pe;++Le){var ze=d[Le],Xe=V[ze];if(Xe===Y)break;var Ve=le*ze;if(!(_e<U[Ve+x+1]||U[Ve+x+1+p]<ue)){for(var rt=x+2;rt<p;++rt)if(H[ce+rt+p]<U[Ve+rt]||U[Ve+rt+p]<H[ce+rt])continue e;var mt=N(Xe,Y);if(mt!==void 0)return mt}}}}else{for(var W=oe-o,Le=pe-1;Le>=0;--Le)if(d[Le]===W){for(var rt=Le+1;rt<pe;++rt)d[rt-1]=d[rt];break}--pe}}}}),868:(function(t,r,a){t.exports=a(1387)}),869:(function(t,r,a){var l=a(2651),i=a(5716);t.exports=s;function s(o,u){var d=i(o),h=i(u);if(d===0)return[l(0),l(1)];if(h===0)return[l(0),l(0)];h<0&&(o=o.neg(),u=u.neg());var g=o.gcd(u);return g.cmpn(1)?[o.div(g),u.div(g)]:[o,u]}}),870:(function(t,r,a){var l=a(1433);function i(o){this.gl=o,this._elements=null,this._attributes=null,this._elementsType=o.UNSIGNED_SHORT}i.prototype.bind=function(){l(this.gl,this._elements,this._attributes)},i.prototype.update=function(o,u,d){this._elements=u,this._attributes=o,this._elementsType=d||this.gl.UNSIGNED_SHORT},i.prototype.dispose=function(){},i.prototype.unbind=function(){},i.prototype.draw=function(o,u,d){d=d||0;var h=this.gl;this._elements?h.drawElements(o,u,this._elementsType,d):h.drawArrays(o,d,u)};function s(o){return new i(o)}t.exports=s}),946:(function(t,r,a){var l=a(1369),i=a(4025);t.exports=s;function s(o){var u=o[0],d=o[1];if(u.cmpn(0)===0)return 0;var h=u.abs().divmod(d.abs()),g=h.div,m=l(g),E=h.mod,c=u.negative!==d.negative?-1:1;if(E.cmpn(0)===0)return c*m;if(m){var _=i(m)+4,T=l(E.ushln(_).divRound(d));return c*(m+T*Math.pow(2,-_))}else{var M=d.bitLength()-E.bitLength()+53,T=l(E.ushln(M).divRound(d));return M<1023?c*T*Math.pow(2,-M):(T*=Math.pow(2,-1023),c*T*Math.pow(2,1023-M))}}}),990:(function(t,r,a){var l=a(9405),i=a(3236),s=i([`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;
  mat4 objectOffsetTranslation = mat4(1.0) + mat4(vec4(0), vec4(0), vec4(0), vec4(objectOffset, 0));
  vec4 worldPosition = (model * objectOffsetTranslation) * vec4(localCoordinate, 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);
}
`]),o=i([`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;
}
`]),u=i([`precision highp float;
#define GLSLIFY 1

attribute vec4 uv;
attribute float f;

uniform vec3 objectOffset;
uniform mat3 permutation;
uniform mat4 model, view, projection;
uniform float height, zOffset;
uniform sampler2D colormap;

varying float value, kill;
varying vec3 worldCoordinate;
varying vec2 planeCoordinate;
varying vec3 lightDirection, eyeDirection, surfaceNormal;
varying vec4 vColor;

void main() {
  vec3 dataCoordinate = permutation * vec3(uv.xy, height);
  worldCoordinate = objectOffset + dataCoordinate;
  mat4 objectOffsetTranslation = mat4(1.0) + mat4(vec4(0), vec4(0), vec4(0), vec4(objectOffset, 0));
  vec4 worldPosition = (model * objectOffsetTranslation) * vec4(dataCoordinate, 1.0);

  vec4 clipPosition = projection * (view * worldPosition);
  clipPosition.z += zOffset;

  gl_Position = clipPosition;
  value = f + objectOffset.z;
  kill = -1.0;
  planeCoordinate = uv.zw;

  vColor = texture2D(colormap, vec2(value, value));

  //Don't do lighting for contours
  surfaceNormal   = vec3(1,0,0);
  eyeDirection    = vec3(0,1,0);
  lightDirection  = vec3(0,0,1);
}
`]),d=i([`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));
}
`]);r.createShader=function(h){var g=l(h,s,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return g.attributes.uv.location=0,g.attributes.f.location=1,g.attributes.normal.location=2,g},r.createPickShader=function(h){var g=l(h,s,d,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return g.attributes.uv.location=0,g.attributes.f.location=1,g.attributes.normal.location=2,g},r.createContourShader=function(h){var g=l(h,u,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return g.attributes.uv.location=0,g.attributes.f.location=1,g},r.createPickContourShader=function(h){var g=l(h,u,d,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return g.attributes.uv.location=0,g.attributes.f.location=1,g}}),1085:(function(t,r,a){var l=a(1371);t.exports=i;function i(s,o,u){o=typeof o=="number"?o:1,u=u||": ";var d=s.split(/\r?\n/),h=String(d.length+o-1).length;return d.map(function(g,m){var E=m+o,c=String(E).length,_=l(E,h-c);return _+u+g}).join(`
`)}}),1091:(function(t){t.exports=r;function r(){var a=new Float32Array(3);return a[0]=0,a[1]=0,a[2]=0,a}}),1125:(function(t,r,a){t.exports=s;var l=a(3250)[3];function i(o,u,d,h){for(var g=0;g<2;++g){var m=o[g],E=u[g],c=Math.min(m,E),_=Math.max(m,E),T=d[g],M=h[g],k=Math.min(T,M),b=Math.max(T,M);if(b<c||_<k)return!1}return!0}function s(o,u,d,h){var g=l(o,d,h),m=l(u,d,h);if(g>0&&m>0||g<0&&m<0)return!1;var E=l(d,o,u),c=l(h,o,u);return E>0&&c>0||E<0&&c<0?!1:g===0&&m===0&&E===0&&c===0?i(o,u,d,h):!0}}),1278:(function(t,r,a){var l=a(2361),i=Math.pow(2,-1074),s=-1>>>0;t.exports=o;function o(u,d){if(isNaN(u)||isNaN(d))return NaN;if(u===d)return u;if(u===0)return d<0?-i:i;var h=l.hi(u),g=l.lo(u);return d>u==u>0?g===s?(h+=1,g=0):g+=1:g===0?(g=s,h-=1):g-=1,l.pack(g,h)}}),1283:(function(t,r,a){var l=a(9405),i=a(3236),s=i([`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;
  }
}`]),o=i([`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;
  }
}`]),u=i([`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;
  }
}
`]),d=i([`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;
}
`]),h=i([`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);
}`]),g=[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"glyph",type:"vec2"},{name:"id",type:"vec4"}],m={vertex:s,fragment:d,attributes:g},E={vertex:o,fragment:d,attributes:g},c={vertex:u,fragment:d,attributes:g},_={vertex:s,fragment:h,attributes:g},T={vertex:o,fragment:h,attributes:g},M={vertex:u,fragment:h,attributes:g};function k(b,A){var y=l(b,A),f=y.attributes;return f.position.location=0,f.color.location=1,f.glyph.location=2,f.id.location=3,y}r.createPerspective=function(b){return k(b,m)},r.createOrtho=function(b){return k(b,E)},r.createProject=function(b){return k(b,c)},r.createPickPerspective=function(b){return k(b,_)},r.createPickOrtho=function(b){return k(b,T)},r.createPickProject=function(b){return k(b,M)}}),1303:(function(t,r,a){t.exports=s;var l=a(3250);function i(o,u){var d,h;if(u[0][0]<u[1][0])d=u[0],h=u[1];else if(u[0][0]>u[1][0])d=u[1],h=u[0];else{var g=Math.min(o[0][1],o[1][1]),m=Math.max(o[0][1],o[1][1]),E=Math.min(u[0][1],u[1][1]),c=Math.max(u[0][1],u[1][1]);return m<E?m-E:g>c?g-c:m-c}var _,T;o[0][1]<o[1][1]?(_=o[0],T=o[1]):(_=o[1],T=o[0]);var M=l(h,d,_);return M||(M=l(h,d,T),M)?M:T-h}function s(o,u){var d,h;if(u[0][0]<u[1][0])d=u[0],h=u[1];else if(u[0][0]>u[1][0])d=u[1],h=u[0];else return i(u,o);var g,m;if(o[0][0]<o[1][0])g=o[0],m=o[1];else if(o[0][0]>o[1][0])g=o[1],m=o[0];else return-i(o,u);var E=l(d,h,m),c=l(d,h,g);if(E<0){if(c<=0)return E}else if(E>0){if(c>=0)return E}else if(c)return c;if(E=l(m,g,h),c=l(m,g,d),E<0){if(c<=0)return E}else if(E>0){if(c>=0)return E}else if(c)return c;return h[0]-m[0]}}),1318:(function(t){t.exports=r;function r(a,l){return a[0].mul(l[1]).cmp(l[0].mul(a[1]))}}),1338:(function(t){function r(i,s,o){var u=i[o]|0;if(u<=0)return[];var d=new Array(u),h;if(o===i.length-1)for(h=0;h<u;++h)d[h]=s;else for(h=0;h<u;++h)d[h]=r(i,s,o+1);return d}function a(i,s){var o,u;for(o=new Array(i),u=0;u<i;++u)o[u]=s;return o}function l(i,s){switch(typeof s>"u"&&(s=0),typeof i){case"number":if(i>0)return a(i|0,s);break;case"object":if(typeof i.length=="number")return r(i,s,0);break}return[]}t.exports=l}),1369:(function(t,r,a){var l=a(5716);t.exports=i;function i(s){var o=s.length,u=s.words,d=0;if(o===1)d=u[0];else if(o===2)d=u[0]+u[1]*67108864;else for(var h=0;h<o;h++){var g=u[h];d+=g*Math.pow(67108864,h)}return l(s)*d}}),1371:(function(t,r,a){var l=a(3233);t.exports=function(s,o,u){return u=typeof u<"u"?u+"":" ",l(u,o)+s}}),1373:(function(t){t.exports=r;function r(a,l,i){return a[0]=l[0]/i[0],a[1]=l[1]/i[1],a[2]=l[2]/i[2],a[3]=l[3]/i[3],a}}),1387:(function(t){t.exports=r;function r(a){var l=a[0],i=a[1],s=a[2];return Math.sqrt(l*l+i*i+s*s)}}),1433:(function(t){function r(a,l,i){l?l.bind():a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,null);var s=a.getParameter(a.MAX_VERTEX_ATTRIBS)|0;if(i){if(i.length>s)throw new Error("gl-vao: Too many vertex attributes");for(var o=0;o<i.length;++o){var u=i[o];if(u.buffer){var d=u.buffer,h=u.size||4,g=u.type||a.FLOAT,m=!!u.normalized,E=u.stride||0,c=u.offset||0;d.bind(),a.enableVertexAttribArray(o),a.vertexAttribPointer(o,h,g,m,E,c)}else{if(typeof u=="number")a.vertexAttrib1f(o,u);else if(u.length===1)a.vertexAttrib1f(o,u[0]);else if(u.length===2)a.vertexAttrib2f(o,u[0],u[1]);else if(u.length===3)a.vertexAttrib3f(o,u[0],u[1],u[2]);else if(u.length===4)a.vertexAttrib4f(o,u[0],u[1],u[2],u[3]);else throw new Error("gl-vao: Invalid vertex attribute");a.disableVertexAttribArray(o)}}for(;o<s;++o)a.disableVertexAttribArray(o)}else{a.bindBuffer(a.ARRAY_BUFFER,null);for(var o=0;o<s;++o)a.disableVertexAttribArray(o)}}t.exports=r}),1463:(function(t){t.exports=r;function r(a,l,i,s){return a[0]=l,a[1]=i,a[2]=s,a}}),1493:(function(t,r,a){var l=a(3236),i=a(9405),s=l([`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];
}
`]),o=l([`precision mediump float;
#define GLSLIFY 1

varying vec4 fragColor;

void main() {
  gl_FragColor = fragColor;
}`]);t.exports=function(u){return i(u,s,o,null,[{name:"position",type:"vec3"},{name:"color",type:"vec3"},{name:"weight",type:"float"}])}}),1498:(function(t){t.exports=r;function r(a,l){return a[0]=-l[0],a[1]=-l[1],a[2]=-l[2],a[3]=-l[3],a}}),1533:(function(t,r,a){a(6859),t.exports=l;function l(i){return i&&typeof i=="object"&&!!i.words}}),1538:(function(t){(function(){if(typeof ses<"u"&&ses.ok&&!ses.ok())return;function a(p){p.permitHostObjects___&&p.permitHostObjects___(a)}typeof ses<"u"&&(ses.weakMapPermitHostObjects=a);var l=!1;if(typeof WeakMap=="function"){var i=WeakMap;if(!(typeof navigator<"u"&&/Firefox/.test(navigator.userAgent))){var s=new i,o=Object.freeze({});if(s.set(o,1),s.get(o)!==1)l=!0;else{t.exports=WeakMap;return}}}var u=Object.getOwnPropertyNames,d=Object.defineProperty,h=Object.isExtensible,g="weakmap:",m=g+"ident:"+Math.random()+"___";if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function"&&typeof ArrayBuffer=="function"&&typeof Uint8Array=="function"){var E=new ArrayBuffer(25),c=new Uint8Array(E);crypto.getRandomValues(c),m=g+"rand:"+Array.prototype.map.call(c,function(p){return(p%36).toString(36)}).join("")+"___"}function _(p){return!(p.substr(0,g.length)==g&&p.substr(p.length-3)==="___")}if(d(Object,"getOwnPropertyNames",{value:function(x){return u(x).filter(_)}}),"getPropertyNames"in Object){var T=Object.getPropertyNames;d(Object,"getPropertyNames",{value:function(x){return T(x).filter(_)}})}function M(p){if(p!==Object(p))throw new TypeError("Not an object: "+p);var x=p[m];if(x&&x.key===p)return x;if(h(p)){x={key:p};try{return d(p,m,{value:x,writable:!1,enumerable:!1,configurable:!1}),x}catch{return}}}(function(){var p=Object.freeze;d(Object,"freeze",{value:function(B){return M(B),p(B)}});var x=Object.seal;d(Object,"seal",{value:function(B){return M(B),x(B)}});var N=Object.preventExtensions;d(Object,"preventExtensions",{value:function(B){return M(B),N(B)}})})();function k(p){return p.prototype=null,Object.freeze(p)}var b=!1;function A(){!b&&typeof console<"u"&&(b=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}var y=0,f=function(){this instanceof f||A();var p=[],x=[],N=y++;function D(q,z){var H,G=M(q);return G?N in G?G[N]:z:(H=p.indexOf(q),H>=0?x[H]:z)}function B(q){var z=M(q);return z?N in z:p.indexOf(q)>=0}function U(q,z){var H,G=M(q);return G?G[N]=z:(H=p.indexOf(q),H>=0?x[H]=z:(H=p.length,x[H]=z,p[H]=q)),this}function V(q){var z=M(q),H,G;return z?N in z&&delete z[N]:(H=p.indexOf(q),H<0?!1:(G=p.length-1,p[H]=void 0,x[H]=x[G],p[H]=p[G],p.length=G,x.length=G,!0))}return Object.create(f.prototype,{get___:{value:k(D)},has___:{value:k(B)},set___:{value:k(U)},delete___:{value:k(V)}})};f.prototype=Object.create(Object.prototype,{get:{value:function(x,N){return this.get___(x,N)},writable:!0,configurable:!0},has:{value:function(x){return this.has___(x)},writable:!0,configurable:!0},set:{value:function(x,N){return this.set___(x,N)},writable:!0,configurable:!0},delete:{value:function(x){return this.delete___(x)},writable:!0,configurable:!0}}),typeof i=="function"?(function(){l&&typeof Proxy<"u"&&(Proxy=void 0);function p(){this instanceof f||A();var x=new i,N=void 0,D=!1;function B(z,H){return N?x.has(z)?x.get(z):N.get___(z,H):x.get(z,H)}function U(z){return x.has(z)||(N?N.has___(z):!1)}var V;l?V=function(z,H){return x.set(z,H),x.has(z)||(N||(N=new f),N.set(z,H)),this}:V=function(z,H){if(D)try{x.set(z,H)}catch{N||(N=new f),N.set___(z,H)}else x.set(z,H);return this};function q(z){var H=!!x.delete(z);return N&&N.delete___(z)||H}return Object.create(f.prototype,{get___:{value:k(B)},has___:{value:k(U)},set___:{value:k(V)},delete___:{value:k(q)},permitHostObjects___:{value:k(function(z){if(z===a)D=!0;else throw new Error("bogus call to permitHostObjects___")})}})}p.prototype=f.prototype,t.exports=p,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})})():(typeof Proxy<"u"&&(Proxy=void 0),t.exports=f)})()}),1570:(function(t){t.exports=a;var r=[function(){function i(s,o,u,d){for(var h=s.length,g=[],m=0;m<h;++m){var E=s[m];E.length}return g}return i},function(){function i(o,u,d,h){for(var g=Math.min(d,h)|0,m=Math.max(d,h)|0,E=o[2*g],c=o[2*g+1];E<c;){var _=E+c>>1,T=u[2*_+1];if(T===m)return _;m<T?c=_:E=_+1}return E}function s(o,u,d,h){for(var g=o.length,m=[],E=0;E<g;++E){var c=o[E],_=c.length;if(_===2){var T=(h[c[0]]<<0)+(h[c[1]]<<1);if(T===0||T===3)continue;switch(T){case 0:break;case 1:m.push([i(d,u,c[0],c[1])]);break;case 2:m.push([i(d,u,c[1],c[0])]);break}}}return m}return s},function(){function i(o,u,d,h){for(var g=Math.min(d,h)|0,m=Math.max(d,h)|0,E=o[2*g],c=o[2*g+1];E<c;){var _=E+c>>1,T=u[2*_+1];if(T===m)return _;m<T?c=_:E=_+1}return E}function s(o,u,d,h){for(var g=o.length,m=[],E=0;E<g;++E){var c=o[E],_=c.length;if(_===3){var T=(h[c[0]]<<0)+(h[c[1]]<<1)+(h[c[2]]<<2);if(T===0||T===7)continue;switch(T){case 0:break;case 1:m.push([i(d,u,c[0],c[2]),i(d,u,c[0],c[1])]);break;case 2:m.push([i(d,u,c[1],c[0]),i(d,u,c[1],c[2])]);break;case 3:m.push([i(d,u,c[0],c[2]),i(d,u,c[1],c[2])]);break;case 4:m.push([i(d,u,c[2],c[1]),i(d,u,c[2],c[0])]);break;case 5:m.push([i(d,u,c[2],c[1]),i(d,u,c[0],c[1])]);break;case 6:m.push([i(d,u,c[1],c[0]),i(d,u,c[2],c[0])]);break}}else if(_===2){var T=(h[c[0]]<<0)+(h[c[1]]<<1);if(T===0||T===3)continue;switch(T){case 0:break;case 1:m.push([i(d,u,c[0],c[1])]);break;case 2:m.push([i(d,u,c[1],c[0])]);break}}}return m}return s},function(){function i(o,u,d,h){for(var g=Math.min(d,h)|0,m=Math.max(d,h)|0,E=o[2*g],c=o[2*g+1];E<c;){var _=E+c>>1,T=u[2*_+1];if(T===m)return _;m<T?c=_:E=_+1}return E}function s(o,u,d,h){for(var g=o.length,m=[],E=0;E<g;++E){var c=o[E],_=c.length;if(_===4){var T=(h[c[0]]<<0)+(h[c[1]]<<1)+(h[c[2]]<<2)+(h[c[3]]<<3);if(T===0||T===15)continue;switch(T){case 0:break;case 1:m.push([i(d,u,c[0],c[1]),i(d,u,c[0],c[2]),i(d,u,c[0],c[3])]);break;case 2:m.push([i(d,u,c[1],c[2]),i(d,u,c[1],c[0]),i(d,u,c[1],c[3])]);break;case 3:m.push([i(d,u,c[1],c[2]),i(d,u,c[0],c[2]),i(d,u,c[0],c[3])],[i(d,u,c[1],c[3]),i(d,u,c[1],c[2]),i(d,u,c[0],c[3])]);break;case 4:m.push([i(d,u,c[2],c[0]),i(d,u,c[2],c[1]),i(d,u,c[2],c[3])]);break;case 5:m.push([i(d,u,c[0],c[1]),i(d,u,c[2],c[1]),i(d,u,c[0],c[3])],[i(d,u,c[2],c[1]),i(d,u,c[2],c[3]),i(d,u,c[0],c[3])]);break;case 6:m.push([i(d,u,c[2],c[0]),i(d,u,c[1],c[0]),i(d,u,c[1],c[3])],[i(d,u,c[2],c[3]),i(d,u,c[2],c[0]),i(d,u,c[1],c[3])]);break;case 7:m.push([i(d,u,c[0],c[3]),i(d,u,c[1],c[3]),i(d,u,c[2],c[3])]);break;case 8:m.push([i(d,u,c[3],c[1]),i(d,u,c[3],c[0]),i(d,u,c[3],c[2])]);break;case 9:m.push([i(d,u,c[3],c[1]),i(d,u,c[0],c[1]),i(d,u,c[0],c[2])],[i(d,u,c[3],c[2]),i(d,u,c[3],c[1]),i(d,u,c[0],c[2])]);break;case 10:m.push([i(d,u,c[1],c[0]),i(d,u,c[3],c[0]),i(d,u,c[1],c[2])],[i(d,u,c[3],c[0]),i(d,u,c[3],c[2]),i(d,u,c[1],c[2])]);break;case 11:m.push([i(d,u,c[1],c[2]),i(d,u,c[0],c[2]),i(d,u,c[3],c[2])]);break;case 12:m.push([i(d,u,c[3],c[0]),i(d,u,c[2],c[0]),i(d,u,c[2],c[1])],[i(d,u,c[3],c[1]),i(d,u,c[3],c[0]),i(d,u,c[2],c[1])]);break;case 13:m.push([i(d,u,c[0],c[1]),i(d,u,c[2],c[1]),i(d,u,c[3],c[1])]);break;case 14:m.push([i(d,u,c[2],c[0]),i(d,u,c[1],c[0]),i(d,u,c[3],c[0])]);break}}else if(_===3){var T=(h[c[0]]<<0)+(h[c[1]]<<1)+(h[c[2]]<<2);if(T===0||T===7)continue;switch(T){case 0:break;case 1:m.push([i(d,u,c[0],c[2]),i(d,u,c[0],c[1])]);break;case 2:m.push([i(d,u,c[1],c[0]),i(d,u,c[1],c[2])]);break;case 3:m.push([i(d,u,c[0],c[2]),i(d,u,c[1],c[2])]);break;case 4:m.push([i(d,u,c[2],c[1]),i(d,u,c[2],c[0])]);break;case 5:m.push([i(d,u,c[2],c[1]),i(d,u,c[0],c[1])]);break;case 6:m.push([i(d,u,c[1],c[0]),i(d,u,c[2],c[0])]);break}}else if(_===2){var T=(h[c[0]]<<0)+(h[c[1]]<<1);if(T===0||T===3)continue;switch(T){case 0:break;case 1:m.push([i(d,u,c[0],c[1])]);break;case 2:m.push([i(d,u,c[1],c[0])]);break}}}return m}return s}];function a(l){return r[l]()}}),1682:(function(t){function r(i,s){for(var o=1,u=i.length,d=i[0],h=i[0],g=1;g<u;++g)if(h=d,d=i[g],s(d,h)){if(g===o){o++;continue}i[o++]=d}return i.length=o,i}function a(i){for(var s=1,o=i.length,u=i[0],d=i[0],h=1;h<o;++h,d=u)if(d=u,u=i[h],u!==d){if(h===s){s++;continue}i[s++]=u}return i.length=s,i}function l(i,s,o){return i.length===0?i:s?(o||i.sort(s),r(i,s)):(o||i.sort(),a(i))}t.exports=l}),1755:(function(t){"use restrict";t.exports=r;function r(l){this.roots=new Array(l),this.ranks=new Array(l);for(var i=0;i<l;++i)this.roots[i]=i,this.ranks[i]=0}var a=r.prototype;Object.defineProperty(a,"length",{get:function(){return this.roots.length}}),a.makeSet=function(){var l=this.roots.length;return this.roots.push(l),this.ranks.push(0),l},a.find=function(l){for(var i=l,s=this.roots;s[l]!==l;)l=s[l];for(;s[i]!==l;){var o=s[i];s[i]=l,i=o}return l},a.link=function(l,i){var s=this.find(l),o=this.find(i);if(s!==o){var u=this.ranks,d=this.roots,h=u[s],g=u[o];h<g?d[s]=o:g<h?d[o]=s:(d[o]=s,++u[s])}}}),1811:(function(t,r,a){var l=a(2478),i=a(7442),s=a(7608),o=a(5567),u=a(2408),d=a(7089),h=a(6582),g=a(7656);a(2504);var m=a(3536),E=[0,0,0];t.exports=M;function c(k){this._components=k.slice(),this._time=[0],this.prevMatrix=k.slice(),this.nextMatrix=k.slice(),this.computedMatrix=k.slice(),this.computedInverse=k.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 _=c.prototype;_.recalcMatrix=function(k){var b=this._time,A=l.le(b,k),y=this.computedMatrix;if(!(A<0)){var f=this._components;if(A===b.length-1)for(var p=16*A,x=0;x<16;++x)y[x]=f[p++];else{for(var N=b[A+1]-b[A],p=16*A,D=this.prevMatrix,B=!0,x=0;x<16;++x)D[x]=f[p++];for(var U=this.nextMatrix,x=0;x<16;++x)U[x]=f[p++],B=B&&D[x]===U[x];if(N<1e-6||B)for(var x=0;x<16;++x)y[x]=D[x];else i(y,D,U,(k-b[A])/N)}var V=this.computedUp;V[0]=y[1],V[1]=y[5],V[2]=y[9],m(V,V);var q=this.computedInverse;s(q,y);var z=this.computedEye,H=q[15];z[0]=q[12]/H,z[1]=q[13]/H,z[2]=q[14]/H;for(var G=this.computedCenter,J=Math.exp(this.computedRadius[0]),x=0;x<3;++x)G[x]=z[x]-y[2+4*x]*J}},_.idle=function(k){if(!(k<this.lastT())){for(var b=this._components,A=b.length-16,y=0;y<16;++y)b.push(b[A++]);this._time.push(k)}},_.flush=function(k){var b=l.gt(this._time,k)-2;b<0||(this._time.splice(0,b),this._components.splice(0,16*b))},_.lastT=function(){return this._time[this._time.length-1]},_.lookAt=function(k,b,A,y){this.recalcMatrix(k),b=b||this.computedEye,A=A||E,y=y||this.computedUp,this.setMatrix(k,h(this.computedMatrix,b,A,y));for(var f=0,p=0;p<3;++p)f+=Math.pow(A[p]-b[p],2);f=Math.log(Math.sqrt(f)),this.computedRadius[0]=f},_.rotate=function(k,b,A,y){this.recalcMatrix(k);var f=this.computedInverse;b&&u(f,f,b),A&&o(f,f,A),y&&d(f,f,y),this.setMatrix(k,s(this.computedMatrix,f))};var T=[0,0,0];_.pan=function(k,b,A,y){T[0]=-(b||0),T[1]=-(A||0),T[2]=-(y||0),this.recalcMatrix(k);var f=this.computedInverse;g(f,f,T),this.setMatrix(k,s(f,f))},_.translate=function(k,b,A,y){T[0]=b||0,T[1]=A||0,T[2]=y||0,this.recalcMatrix(k);var f=this.computedMatrix;g(f,f,T),this.setMatrix(k,f)},_.setMatrix=function(k,b){if(!(k<this.lastT())){this._time.push(k);for(var A=0;A<16;++A)this._components.push(b[A])}},_.setDistance=function(k,b){this.computedRadius[0]=b},_.setDistanceLimits=function(k,b){var A=this._limits;A[0]=k,A[1]=b},_.getDistanceLimits=function(k){var b=this._limits;return k?(k[0]=b[0],k[1]=b[1],k):b};function M(k){k=k||{};var b=k.matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return new c(b)}}),1848:(function(t,r,a){var l=a(4905),i=a(6468);t.exports=s;function s(o){for(var u=Array.isArray(o)?o:l(o),d=0;d<u.length;d++){var h=u[d];if(h.type==="preprocessor"){var g=h.data.match(/\#define\s+SHADER_NAME(_B64)?\s+(.+)$/);if(g&&g[2]){var m=g[1],E=g[2];return(m?i(E):E).trim()}}}}}),1879:(function(t,r,a){var l=a(3236),i=a(9405),s=l([`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);
}
`]),o=l([`precision highp float;
#define GLSLIFY 1

uniform vec4 color;
void main() {
  gl_FragColor = color;
}`]);r.n=function(m){return i(m,s,o,null,[{name:"position",type:"vec3"}])};var u=l([`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);
}
`]),d=l([`precision highp float;
#define GLSLIFY 1

uniform vec4 color;
void main() {
  gl_FragColor = color;
}`]);r.Q=function(m){return i(m,u,d,null,[{name:"position",type:"vec3"}])};var h=l([`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);
}
`]),g=l([`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];
}`]);r.bg=function(m){return i(m,h,g,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}}),1888:(function(t,r,a){var l=a(8828),i=a(1338),s=a(4793).hp;a.g.__TYPEDARRAY_POOL||(a.g.__TYPEDARRAY_POOL={UINT8:i([32,0]),UINT16:i([32,0]),UINT32:i([32,0]),BIGUINT64:i([32,0]),INT8:i([32,0]),INT16:i([32,0]),INT32:i([32,0]),BIGINT64:i([32,0]),FLOAT:i([32,0]),DOUBLE:i([32,0]),DATA:i([32,0]),UINT8C:i([32,0]),BUFFER:i([32,0])});var o=typeof Uint8ClampedArray<"u",u=typeof BigUint64Array<"u",d=typeof BigInt64Array<"u",h=a.g.__TYPEDARRAY_POOL;h.UINT8C||(h.UINT8C=i([32,0])),h.BIGUINT64||(h.BIGUINT64=i([32,0])),h.BIGINT64||(h.BIGINT64=i([32,0])),h.BUFFER||(h.BUFFER=i([32,0]));var g=h.DATA,m=h.BUFFER;r.free=function(q){if(s.isBuffer(q))m[l.log2(q.length)].push(q);else{if(Object.prototype.toString.call(q)!=="[object ArrayBuffer]"&&(q=q.buffer),!q)return;var z=q.length||q.byteLength,H=l.log2(z)|0;g[H].push(q)}};function E(V){if(V){var q=V.length||V.byteLength,z=l.log2(q);g[z].push(V)}}function c(V){E(V.buffer)}r.freeUint8=r.freeUint16=r.freeUint32=r.freeBigUint64=r.freeInt8=r.freeInt16=r.freeInt32=r.freeBigInt64=r.freeFloat32=r.freeFloat=r.freeFloat64=r.freeDouble=r.freeUint8Clamped=r.freeDataView=c,r.freeArrayBuffer=E,r.freeBuffer=function(q){m[l.log2(q.length)].push(q)},r.malloc=function(q,z){if(z===void 0||z==="arraybuffer")return _(q);switch(z){case"uint8":return T(q);case"uint16":return M(q);case"uint32":return k(q);case"int8":return b(q);case"int16":return A(q);case"int32":return y(q);case"float":case"float32":return f(q);case"double":case"float64":return p(q);case"uint8_clamped":return x(q);case"bigint64":return D(q);case"biguint64":return N(q);case"buffer":return U(q);case"data":case"dataview":return B(q);default:return null}return null};function _(q){var q=l.nextPow2(q),z=l.log2(q),H=g[z];return H.length>0?H.pop():new ArrayBuffer(q)}r.mallocArrayBuffer=_;function T(V){return new Uint8Array(_(V),0,V)}r.mallocUint8=T;function M(V){return new Uint16Array(_(2*V),0,V)}r.mallocUint16=M;function k(V){return new Uint32Array(_(4*V),0,V)}r.mallocUint32=k;function b(V){return new Int8Array(_(V),0,V)}r.mallocInt8=b;function A(V){return new Int16Array(_(2*V),0,V)}r.mallocInt16=A;function y(V){return new Int32Array(_(4*V),0,V)}r.mallocInt32=y;function f(V){return new Float32Array(_(4*V),0,V)}r.mallocFloat32=r.mallocFloat=f;function p(V){return new Float64Array(_(8*V),0,V)}r.mallocFloat64=r.mallocDouble=p;function x(V){return o?new Uint8ClampedArray(_(V),0,V):T(V)}r.mallocUint8Clamped=x;function N(V){return u?new BigUint64Array(_(8*V),0,V):null}r.mallocBigUint64=N;function D(V){return d?new BigInt64Array(_(8*V),0,V):null}r.mallocBigInt64=D;function B(V){return new DataView(_(V),0,V)}r.mallocDataView=B;function U(V){V=l.nextPow2(V);var q=l.log2(V),z=m[q];return z.length>0?z.pop():new s(V)}r.mallocBuffer=U,r.clearCache=function(){for(var q=0;q<32;++q)h.UINT8[q].length=0,h.UINT16[q].length=0,h.UINT32[q].length=0,h.INT8[q].length=0,h.INT16[q].length=0,h.INT32[q].length=0,h.FLOAT[q].length=0,h.DOUBLE[q].length=0,h.BIGUINT64[q].length=0,h.BIGINT64[q].length=0,h.UINT8C[q].length=0,g[q].length=0,m[q].length=0}}),1903:(function(t){t.exports=r;function r(a){var l=new Float32Array(16);return l[0]=a[0],l[1]=a[1],l[2]=a[2],l[3]=a[3],l[4]=a[4],l[5]=a[5],l[6]=a[6],l[7]=a[7],l[8]=a[8],l[9]=a[9],l[10]=a[10],l[11]=a[11],l[12]=a[12],l[13]=a[13],l[14]=a[14],l[15]=a[15],l}}),1944:(function(t,r,a){var l=a(5250),i=a(8210);t.exports=s;function s(o,u){for(var d=l(o[0],u[0]),h=1;h<o.length;++h)d=i(d,l(o[h],u[h]));return d}}),1964:(function(t,r,a){t.exports={alpha_shape:a(3502),convex_hull:a(7352),delaunay_triangulate:a(7642),gl_cone3d:a(6405),gl_error3d:a(9165),gl_line3d:a(5714),gl_mesh3d:a(7201),gl_plot3d:a(4100),gl_scatter3d:a(8418),gl_streamtube3d:a(7815),gl_surface3d:a(9499),ndarray:a(9618),ndarray_linear_interpolate:a(4317)}}),2014:(function(t,r,a){"use restrict";var l=a(3105),i=a(4623);function s(f){for(var p=0,x=Math.max,N=0,D=f.length;N<D;++N)p=x(p,f[N].length);return p-1}r.dimension=s;function o(f){for(var p=-1,x=Math.max,N=0,D=f.length;N<D;++N)for(var B=f[N],U=0,V=B.length;U<V;++U)p=x(p,B[U]);return p+1}r.countVertices=o;function u(f){for(var p=new Array(f.length),x=0,N=f.length;x<N;++x)p[x]=f[x].slice(0);return p}r.cloneCells=u;function d(f,p){var x=f.length,N=f.length-p.length,D=Math.min;if(N)return N;switch(x){case 0:return 0;case 1:return f[0]-p[0];case 2:var z=f[0]+f[1]-p[0]-p[1];return z||D(f[0],f[1])-D(p[0],p[1]);case 3:var B=f[0]+f[1],U=p[0]+p[1];if(z=B+f[2]-(U+p[2]),z)return z;var V=D(f[0],f[1]),q=D(p[0],p[1]),z=D(V,f[2])-D(q,p[2]);return z||D(V+f[2],B)-D(q+p[2],U);default:var H=f.slice(0);H.sort();var G=p.slice(0);G.sort();for(var J=0;J<x;++J)if(N=H[J]-G[J],N)return N;return 0}}r.compareCells=d;function h(f,p){return d(f[0],p[0])}function g(f,p){if(p){for(var x=f.length,N=new Array(x),D=0;D<x;++D)N[D]=[f[D],p[D]];N.sort(h);for(var D=0;D<x;++D)f[D]=N[D][0],p[D]=N[D][1];return f}else return f.sort(d),f}r.normalize=g;function m(f){if(f.length===0)return[];for(var p=1,x=f.length,N=1;N<x;++N){var D=f[N];if(d(D,f[N-1])){if(N===p){p++;continue}f[p++]=D}}return f.length=p,f}r.unique=m;function E(f,p){for(var x=0,N=f.length-1,D=-1;x<=N;){var B=x+N>>1,U=d(f[B],p);U<=0?(U===0&&(D=B),x=B+1):U>0&&(N=B-1)}return D}r.findCell=E;function c(f,p){for(var x=new Array(f.length),N=0,D=x.length;N<D;++N)x[N]=[];for(var B=[],N=0,U=p.length;N<U;++N)for(var V=p[N],q=V.length,z=1,H=1<<q;z<H;++z){B.length=l.popCount(z);for(var G=0,J=0;J<q;++J)z&1<<J&&(B[G++]=V[J]);var le=E(f,B);if(!(le<0))for(;x[le++].push(N),!(le>=f.length||d(f[le],B)!==0););}return x}r.incidence=c;function _(f,p){if(!p)return c(m(M(f,0)),f);for(var x=new Array(p),N=0;N<p;++N)x[N]=[];for(var N=0,D=f.length;N<D;++N)for(var B=f[N],U=0,V=B.length;U<V;++U)x[B[U]].push(N);return x}r.dual=_;function T(f){for(var p=[],x=0,N=f.length;x<N;++x)for(var D=f[x],B=D.length|0,U=1,V=1<<B;U<V;++U){for(var q=[],z=0;z<B;++z)U>>>z&1&&q.push(D[z]);p.push(q)}return g(p)}r.explode=T;function M(f,p){if(p<0)return[];for(var x=[],N=(1<<p+1)-1,D=0;D<f.length;++D)for(var B=f[D],U=N;U<1<<B.length;U=l.nextCombination(U)){for(var V=new Array(p+1),q=0,z=0;z<B.length;++z)U&1<<z&&(V[q++]=B[z]);x.push(V)}return g(x)}r.skeleton=M;function k(f){for(var p=[],x=0,N=f.length;x<N;++x)for(var D=f[x],B=0,U=D.length;B<U;++B){for(var V=new Array(D.length-1),q=0,z=0;q<U;++q)q!==B&&(V[z++]=D[q]);p.push(V)}return g(p)}r.boundary=k;function b(f,p){for(var x=new i(p),N=0;N<f.length;++N)for(var D=f[N],B=0;B<D.length;++B)for(var U=B+1;U<D.length;++U)x.link(D[B],D[U]);for(var V=[],q=x.ranks,N=0;N<q.length;++N)q[N]=-1;for(var N=0;N<f.length;++N){var z=x.find(f[N][0]);q[z]<0?(q[z]=V.length,V.push([f[N].slice(0)])):V[q[z]].push(f[N].slice(0))}return V}function A(f){for(var p=m(g(M(f,0))),x=new i(p.length),N=0;N<f.length;++N)for(var D=f[N],B=0;B<D.length;++B)for(var U=E(p,[D[B]]),V=B+1;V<D.length;++V)x.link(U,E(p,[D[V]]));for(var q=[],z=x.ranks,N=0;N<z.length;++N)z[N]=-1;for(var N=0;N<f.length;++N){var H=x.find(E(p,[f[N][0]]));z[H]<0?(z[H]=q.length,q.push([f[N].slice(0)])):q[z[H]].push(f[N].slice(0))}return q}function y(f,p){return p?b(f,p):A(f)}r.connectedComponents=y}),2095:(function(t,r,a){t.exports=E;var l=a(3134),i=a(3088),s=a(5085),o=a(5250),u=a(8210),d=a(1682),h=a(5609);function g(c,_){for(var T=new Array(c),M=0;M<c;++M)T[M]=_;return T}function m(c){for(var _=new Array(c),T=0;T<c;++T)_[T]=[];return _}function E(c,_){var Y=h(c,_);c=Y[0],_=Y[1];var T=_.length;c.length;for(var M=l(c,_.length),k=0;k<T;++k)if(M[k].length%2===1)throw new Error("planar-graph-to-polyline: graph must be manifold");var b=i(c,_);function A(Ve){for(var rt=Ve.length,mt=[0],_t=0;_t<rt;++_t){var vt=_[Ve[_t]],ut=_[Ve[(_t+1)%rt]],Fe=o(-vt[0],vt[1]),Pe=o(-vt[0],ut[1]),be=o(ut[0],vt[1]),Ye=o(ut[0],ut[1]);mt=u(mt,u(u(Fe,Pe),u(be,Ye)))}return mt[mt.length-1]>0}b=b.filter(A);for(var y=b.length,f=new Array(y),p=new Array(y),k=0;k<y;++k){f[k]=k;var x=new Array(y),N=b[k].map(function(rt){return _[rt]}),D=s([N]),B=0;e:for(var U=0;U<y;++U)if(x[U]=0,k!==U){for(var V=b[U],q=V.length,z=0;z<q;++z){var H=D(_[V[z]]);if(H!==0){H<0&&(x[U]=1,B+=1);continue e}}x[U]=1,B+=1}p[k]=[B,k,x]}p.sort(function(Ve,rt){return rt[0]-Ve[0]});for(var k=0;k<y;++k)for(var x=p[k],G=x[1],J=x[2],U=0;U<y;++U)J[U]&&(f[U]=G);for(var le=m(y),k=0;k<y;++k)le[k].push(f[k]),le[f[k]].push(k);for(var ge={},de=g(T,!1),k=0;k<y;++k)for(var V=b[k],q=V.length,U=0;U<q;++U){var me=V[U],W=V[(U+1)%q],ie=Math.min(me,W)+":"+Math.max(me,W);if(ie in ge){var se=ge[ie];le[se].push(k),le[k].push(se),de[me]=de[W]=!0}else ge[ie]=k}function ee(Ve){for(var rt=Ve.length,mt=0;mt<rt;++mt)if(!de[Ve[mt]])return!1;return!0}for(var pe=[],oe=g(y,-1),k=0;k<y;++k)f[k]===k&&!ee(b[k])?(pe.push(k),oe[k]=0):oe[k]=-1;for(var Y=[];pe.length>0;){var ce=pe.pop(),ue=le[ce];d(ue,function(Ve,rt){return Ve-rt});var _e=ue.length,Le=oe[ce],ze;if(Le===0){var V=b[ce];ze=[V]}for(var k=0;k<_e;++k){var Xe=ue[k];if(!(oe[Xe]>=0)&&(oe[Xe]=Le^1,pe.push(Xe),Le===0)){var V=b[Xe];ee(V)||(V.reverse(),ze.push(V))}}Le===0&&Y.push(ze)}return Y}}),2145:(function(t,r){r.uniforms=s,r.attributes=o;var a={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"},l=null;function i(u,d){if(!l){var h=Object.keys(a);l={};for(var g=0;g<h.length;++g){var m=h[g];l[u[m]]=a[m]}}return l[d]}function s(u,d){for(var h=u.getProgramParameter(d,u.ACTIVE_UNIFORMS),g=[],m=0;m<h;++m){var E=u.getActiveUniform(d,m);if(E){var c=i(u,E.type);if(E.size>1)for(var _=0;_<E.size;++_)g.push({name:E.name.replace("[0]","["+_+"]"),type:c});else g.push({name:E.name,type:c})}}return g}function o(u,d){for(var h=u.getProgramParameter(d,u.ACTIVE_ATTRIBUTES),g=[],m=0;m<h;++m){var E=u.getActiveAttrib(d,m);E&&g.push({name:E.name,type:i(u,E.type)})}return g}}),2229:(function(t,r,a){t.exports=a(6843)}),2260:(function(t,r,a){var l=a(7766);t.exports=A;var i=null,s,o,u,d;function h(y){var f=y.getParameter(y.FRAMEBUFFER_BINDING),p=y.getParameter(y.RENDERBUFFER_BINDING),x=y.getParameter(y.TEXTURE_BINDING_2D);return[f,p,x]}function g(y,f){y.bindFramebuffer(y.FRAMEBUFFER,f[0]),y.bindRenderbuffer(y.RENDERBUFFER,f[1]),y.bindTexture(y.TEXTURE_2D,f[2])}function m(y,f){var p=y.getParameter(f.MAX_COLOR_ATTACHMENTS_WEBGL);i=new Array(p+1);for(var x=0;x<=p;++x){for(var N=new Array(p),D=0;D<x;++D)N[D]=y.COLOR_ATTACHMENT0+D;for(var D=x;D<p;++D)N[D]=y.NONE;i[x]=N}}function E(y){switch(y){case s:throw new Error("gl-fbo: Framebuffer unsupported");case o:throw new Error("gl-fbo: Framebuffer incomplete attachment");case u:throw new Error("gl-fbo: Framebuffer incomplete dimensions");case d:throw new Error("gl-fbo: Framebuffer incomplete missing attachment");default:throw new Error("gl-fbo: Framebuffer failed for unspecified reason")}}function c(y,f,p,x,N,D){if(!x)return null;var B=l(y,f,p,N,x);return B.magFilter=y.NEAREST,B.minFilter=y.NEAREST,B.mipSamples=1,B.bind(),y.framebufferTexture2D(y.FRAMEBUFFER,D,y.TEXTURE_2D,B.handle,0),B}function _(y,f,p,x,N){var D=y.createRenderbuffer();return y.bindRenderbuffer(y.RENDERBUFFER,D),y.renderbufferStorage(y.RENDERBUFFER,x,f,p),y.framebufferRenderbuffer(y.FRAMEBUFFER,N,y.RENDERBUFFER,D),D}function T(y){var f=h(y.gl),p=y.gl,x=y.handle=p.createFramebuffer(),N=y._shape[0],D=y._shape[1],B=y.color.length,U=y._ext,V=y._useStencil,q=y._useDepth,z=y._colorType;p.bindFramebuffer(p.FRAMEBUFFER,x);for(var H=0;H<B;++H)y.color[H]=c(p,N,D,z,p.RGBA,p.COLOR_ATTACHMENT0+H);B===0?(y._color_rb=_(p,N,D,p.RGBA4,p.COLOR_ATTACHMENT0),U&&U.drawBuffersWEBGL(i[0])):B>1&&U.drawBuffersWEBGL(i[B]);var G=p.getExtension("WEBGL_depth_texture");G?V?y.depth=c(p,N,D,G.UNSIGNED_INT_24_8_WEBGL,p.DEPTH_STENCIL,p.DEPTH_STENCIL_ATTACHMENT):q&&(y.depth=c(p,N,D,p.UNSIGNED_SHORT,p.DEPTH_COMPONENT,p.DEPTH_ATTACHMENT)):q&&V?y._depth_rb=_(p,N,D,p.DEPTH_STENCIL,p.DEPTH_STENCIL_ATTACHMENT):q?y._depth_rb=_(p,N,D,p.DEPTH_COMPONENT16,p.DEPTH_ATTACHMENT):V&&(y._depth_rb=_(p,N,D,p.STENCIL_INDEX,p.STENCIL_ATTACHMENT));var J=p.checkFramebufferStatus(p.FRAMEBUFFER);if(J!==p.FRAMEBUFFER_COMPLETE){y._destroyed=!0,p.bindFramebuffer(p.FRAMEBUFFER,null),p.deleteFramebuffer(y.handle),y.handle=null,y.depth&&(y.depth.dispose(),y.depth=null),y._depth_rb&&(p.deleteRenderbuffer(y._depth_rb),y._depth_rb=null);for(var H=0;H<y.color.length;++H)y.color[H].dispose(),y.color[H]=null;y._color_rb&&(p.deleteRenderbuffer(y._color_rb),y._color_rb=null),g(p,f),E(J)}g(p,f)}function M(y,f,p,x,N,D,B,U){this.gl=y,this._shape=[f|0,p|0],this._destroyed=!1,this._ext=U,this.color=new Array(N);for(var V=0;V<N;++V)this.color[V]=null;this._color_rb=null,this.depth=null,this._depth_rb=null,this._colorType=x,this._useDepth=D,this._useStencil=B;var q=this,z=[f|0,p|0];Object.defineProperties(z,{0:{get:function(){return q._shape[0]},set:function(H){return q.width=H}},1:{get:function(){return q._shape[1]},set:function(H){return q.height=H}}}),this._shapeVector=z,T(this)}var k=M.prototype;function b(y,f,p){if(y._destroyed)throw new Error("gl-fbo: Can't resize destroyed FBO");if(!(y._shape[0]===f&&y._shape[1]===p)){var x=y.gl,N=x.getParameter(x.MAX_RENDERBUFFER_SIZE);if(f<0||f>N||p<0||p>N)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");y._shape[0]=f,y._shape[1]=p;for(var D=h(x),B=0;B<y.color.length;++B)y.color[B].shape=y._shape;y._color_rb&&(x.bindRenderbuffer(x.RENDERBUFFER,y._color_rb),x.renderbufferStorage(x.RENDERBUFFER,x.RGBA4,y._shape[0],y._shape[1])),y.depth&&(y.depth.shape=y._shape),y._depth_rb&&(x.bindRenderbuffer(x.RENDERBUFFER,y._depth_rb),y._useDepth&&y._useStencil?x.renderbufferStorage(x.RENDERBUFFER,x.DEPTH_STENCIL,y._shape[0],y._shape[1]):y._useDepth?x.renderbufferStorage(x.RENDERBUFFER,x.DEPTH_COMPONENT16,y._shape[0],y._shape[1]):y._useStencil&&x.renderbufferStorage(x.RENDERBUFFER,x.STENCIL_INDEX,y._shape[0],y._shape[1])),x.bindFramebuffer(x.FRAMEBUFFER,y.handle);var U=x.checkFramebufferStatus(x.FRAMEBUFFER);U!==x.FRAMEBUFFER_COMPLETE&&(y.dispose(),g(x,D),E(U)),g(x,D)}}Object.defineProperties(k,{shape:{get:function(){return this._destroyed?[0,0]:this._shapeVector},set:function(y){if(Array.isArray(y)||(y=[y|0,y|0]),y.length!==2)throw new Error("gl-fbo: Shape vector must be length 2");var f=y[0]|0,p=y[1]|0;return b(this,f,p),[f,p]},enumerable:!1},width:{get:function(){return this._destroyed?0:this._shape[0]},set:function(y){return y=y|0,b(this,y,this._shape[1]),y},enumerable:!1},height:{get:function(){return this._destroyed?0:this._shape[1]},set:function(y){return y=y|0,b(this,this._shape[0],y),y},enumerable:!1}}),k.bind=function(){if(!this._destroyed){var y=this.gl;y.bindFramebuffer(y.FRAMEBUFFER,this.handle),y.viewport(0,0,this._shape[0],this._shape[1])}},k.dispose=function(){if(!this._destroyed){this._destroyed=!0;var y=this.gl;y.deleteFramebuffer(this.handle),this.handle=null,this.depth&&(this.depth.dispose(),this.depth=null),this._depth_rb&&(y.deleteRenderbuffer(this._depth_rb),this._depth_rb=null);for(var f=0;f<this.color.length;++f)this.color[f].dispose(),this.color[f]=null;this._color_rb&&(y.deleteRenderbuffer(this._color_rb),this._color_rb=null)}};function A(y,f,p,x){s||(s=y.FRAMEBUFFER_UNSUPPORTED,o=y.FRAMEBUFFER_INCOMPLETE_ATTACHMENT,u=y.FRAMEBUFFER_INCOMPLETE_DIMENSIONS,d=y.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT);var N=y.getExtension("WEBGL_draw_buffers");if(!i&&N&&m(y,N),Array.isArray(f)&&(x=p,p=f[1]|0,f=f[0]|0),typeof f!="number")throw new Error("gl-fbo: Missing shape parameter");var D=y.getParameter(y.MAX_RENDERBUFFER_SIZE);if(f<0||f>D||p<0||p>D)throw new Error("gl-fbo: Parameters are too large for FBO");x=x||{};var B=1;if("color"in x){if(B=Math.max(x.color|0,0),B<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(B>1)if(N){if(B>y.getParameter(N.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 U=y.UNSIGNED_BYTE,V=y.getExtension("OES_texture_float");if(x.float&&B>0){if(!V)throw new Error("gl-fbo: Context does not support floating point textures");U=y.FLOAT}else x.preferFloat&&B>0&&V&&(U=y.FLOAT);var q=!0;"depth"in x&&(q=!!x.depth);var z=!1;return"stencil"in x&&(z=!!x.stencil),new M(y,f,p,U,B,q,z,N)}}),2272:(function(t,r,a){var l=a(2646)[4];a(2478),t.exports=s;function i(o,u,d,h,g,m){var E=u.opposite(h,g);if(!(E<0)){if(g<h){var c=h;h=g,g=c,c=m,m=E,E=c}u.isConstraint(h,g)||l(o[h],o[g],o[m],o[E])<0&&d.push(h,g)}}function s(o,u){for(var d=[],h=o.length,g=u.stars,m=0;m<h;++m)for(var E=g[m],c=1;c<E.length;c+=2){var _=E[c];if(!(_<m)&&!u.isConstraint(m,_)){for(var T=E[c-1],M=-1,k=1;k<E.length;k+=2)if(E[k-1]===_){M=E[k];break}M<0||l(o[m],o[_],o[T],o[M])<0&&d.push(m,_)}}for(;d.length>0;){for(var _=d.pop(),m=d.pop(),T=-1,M=-1,E=g[m],b=1;b<E.length;b+=2){var A=E[b-1],y=E[b];A===_?M=y:y===_&&(T=A)}T<0||M<0||l(o[m],o[_],o[T],o[M])>=0||(u.flip(m,_),i(o,u,d,T,m,M),i(o,u,d,m,M,T),i(o,u,d,M,_,T),i(o,u,d,_,T,M))}}}),2334:(function(t){t.exports=r;function r(a,l,i){return a[0]=Math.min(l[0],i[0]),a[1]=Math.min(l[1],i[1]),a[2]=Math.min(l[2],i[2]),a[3]=Math.min(l[3],i[3]),a}}),2335:(function(t){t.exports=r;function r(a){var l=new Float32Array(4);return l[0]=a[0],l[1]=a[1],l[2]=a[2],l[3]=a[3],l}}),2361:(function(t){var r=!1;if(typeof Float64Array<"u"){var a=new Float64Array(1),l=new Uint32Array(a.buffer);if(a[0]=1,r=!0,l[1]===1072693248){let s=function(d,h){return l[0]=d,l[1]=h,a[0]},o=function(d){return a[0]=d,l[0]},u=function(d){return a[0]=d,l[1]};t.exports=function(h){return a[0]=h,[l[0],l[1]]},t.exports.pack=s,t.exports.lo=o,t.exports.hi=u}else if(l[0]===1072693248){let s=function(d,h){return l[1]=d,l[0]=h,a[0]},o=function(d){return a[0]=d,l[1]},u=function(d){return a[0]=d,l[0]};t.exports=function(h){return a[0]=h,[l[1],l[0]]},t.exports.pack=s,t.exports.lo=o,t.exports.hi=u}else r=!1}if(!r){let s=function(d,h){return i.writeUInt32LE(d,0,!0),i.writeUInt32LE(h,4,!0),i.readDoubleLE(0,!0)},o=function(d){return i.writeDoubleLE(d,0,!0),i.readUInt32LE(0,!0)},u=function(d){return i.writeDoubleLE(d,0,!0),i.readUInt32LE(4,!0)};var i=new Buffer(8);t.exports=function(h){return i.writeDoubleLE(h,0,!0),[i.readUInt32LE(0,!0),i.readUInt32LE(4,!0)]},t.exports.pack=s,t.exports.lo=o,t.exports.hi=u}t.exports.sign=function(s){return t.exports.hi(s)>>>31},t.exports.exponent=function(s){var o=t.exports.hi(s);return(o<<1>>>21)-1023},t.exports.fraction=function(s){var o=t.exports.lo(s),u=t.exports.hi(s),d=u&(1<<20)-1;return u&2146435072&&(d+=1048576),[o,d]},t.exports.denormalized=function(s){var o=t.exports.hi(s);return!(o&2146435072)}}),2408:(function(t){t.exports=r;function r(a,l,i){var s=Math.sin(i),o=Math.cos(i),u=l[0],d=l[1],h=l[2],g=l[3],m=l[8],E=l[9],c=l[10],_=l[11];return l!==a&&(a[4]=l[4],a[5]=l[5],a[6]=l[6],a[7]=l[7],a[12]=l[12],a[13]=l[13],a[14]=l[14],a[15]=l[15]),a[0]=u*o-m*s,a[1]=d*o-E*s,a[2]=h*o-c*s,a[3]=g*o-_*s,a[8]=u*s+m*o,a[9]=d*s+E*o,a[10]=h*s+c*o,a[11]=g*s+_*o,a}}),2419:(function(t){t.exports=r;function r(a){for(var l=1,i=1;i<a.length;++i)for(var s=0;s<i;++s)if(a[i]<a[s])l=-l;else if(a[s]===a[i])return 0;return l}}),2447:(function(t){t.exports=r;function r(a,l){return a[0]=Math.round(l[0]),a[1]=Math.round(l[1]),a[2]=Math.round(l[2]),a}}),2455:(function(t,r){function a(){function s(d,h,g,m,E,c,_,T,M,k,b){for(var A=2*d,y=m,f=A*m;y<E;++y,f+=A){var p=c[h+f],x=c[h+f+d],N=_[y];e:for(var D=T,B=A*T;D<M;++D,B+=A){var U=k[h+B],V=k[h+B+d],q=b[D];if(!(V<p||x<U)){for(var z=h+1;z<d;++z){var H=c[z+f],G=c[z+d+f],J=k[z+B],le=k[z+d+B];if(G<J||le<H)continue e}var ge=g(N,q);if(ge!==void 0)return ge}}}}function o(d,h,g,m,E,c,_,T,M,k,b){for(var A=2*d,y=T,f=A*T;y<M;++y,f+=A){var p=k[h+f],x=k[h+f+d],N=b[y];e:for(var D=m,B=A*m;D<E;++D,B+=A){var U=c[h+B],V=c[h+B+d],q=_[D];if(!(x<U||V<p)){for(var z=h+1;z<d;++z){var H=c[z+B],G=c[z+d+B],J=k[z+f],le=k[z+d+f];if(G<J||le<H)continue e}var ge=g(q,N);if(ge!==void 0)return ge}}}}function u(d,h,g,m,E,c,_,T,M,k,b){return E-m>M-T?s(d,h,g,m,E,c,_,T,M,k,b):o(d,h,g,m,E,c,_,T,M,k,b)}return u}function l(){function s(g,m,E,c,_,T,M,k,b,A,y){for(var f=2*g,p=c,x=f*c;p<_;++p,x+=f){var N=T[m+x],D=T[m+x+g],B=M[p];e:for(var U=k,V=f*k;U<b;++U,V+=f){var q=A[m+V],z=y[U];if(!(q<=N||D<q)){for(var H=m+1;H<g;++H){var G=T[H+x],J=T[H+g+x],le=A[H+V],ge=A[H+g+V];if(J<le||ge<G)continue e}var de=E(z,B);if(de!==void 0)return de}}}}function o(g,m,E,c,_,T,M,k,b,A,y){for(var f=2*g,p=c,x=f*c;p<_;++p,x+=f){var N=T[m+x],D=T[m+x+g],B=M[p];e:for(var U=k,V=f*k;U<b;++U,V+=f){var q=A[m+V],z=y[U];if(!(q<N||D<q)){for(var H=m+1;H<g;++H){var G=T[H+x],J=T[H+g+x],le=A[H+V],ge=A[H+g+V];if(J<le||ge<G)continue e}var de=E(B,z);if(de!==void 0)return de}}}}function u(g,m,E,c,_,T,M,k,b,A,y){for(var f=2*g,p=k,x=f*k;p<b;++p,x+=f){var N=A[m+x],D=y[p];e:for(var B=c,U=f*c;B<_;++B,U+=f){var V=T[m+U],q=T[m+U+g],z=M[B];if(!(N<=V||q<N)){for(var H=m+1;H<g;++H){var G=T[H+U],J=T[H+g+U],le=A[H+x],ge=A[H+g+x];if(J<le||ge<G)continue e}var de=E(D,z);if(de!==void 0)return de}}}}function d(g,m,E,c,_,T,M,k,b,A,y){for(var f=2*g,p=k,x=f*k;p<b;++p,x+=f){var N=A[m+x],D=y[p];e:for(var B=c,U=f*c;B<_;++B,U+=f){var V=T[m+U],q=T[m+U+g],z=M[B];if(!(N<V||q<N)){for(var H=m+1;H<g;++H){var G=T[H+U],J=T[H+g+U],le=A[H+x],ge=A[H+g+x];if(J<le||ge<G)continue e}var de=E(z,D);if(de!==void 0)return de}}}}function h(g,m,E,c,_,T,M,k,b,A,y,f){return T-_>A-b?c?s(g,m,E,_,T,M,k,b,A,y,f):o(g,m,E,_,T,M,k,b,A,y,f):c?u(g,m,E,_,T,M,k,b,A,y,f):d(g,m,E,_,T,M,k,b,A,y,f)}return h}function i(s){return s?a():l()}r.partial=i(!1),r.full=i(!0)}),2478:(function(t){function r(u,d,h,g,m){for(var E=m+1;g<=m;){var c=g+m>>>1,_=u[c],T=h!==void 0?h(_,d):_-d;T>=0?(E=c,m=c-1):g=c+1}return E}function a(u,d,h,g,m){for(var E=m+1;g<=m;){var c=g+m>>>1,_=u[c],T=h!==void 0?h(_,d):_-d;T>0?(E=c,m=c-1):g=c+1}return E}function l(u,d,h,g,m){for(var E=g-1;g<=m;){var c=g+m>>>1,_=u[c],T=h!==void 0?h(_,d):_-d;T<0?(E=c,g=c+1):m=c-1}return E}function i(u,d,h,g,m){for(var E=g-1;g<=m;){var c=g+m>>>1,_=u[c],T=h!==void 0?h(_,d):_-d;T<=0?(E=c,g=c+1):m=c-1}return E}function s(u,d,h,g,m){for(;g<=m;){var E=g+m>>>1,c=u[E],_=h!==void 0?h(c,d):c-d;if(_===0)return E;_<=0?g=E+1:m=E-1}return-1}function o(u,d,h,g,m,E){return typeof h=="function"?E(u,d,h,g===void 0?0:g|0,m===void 0?u.length-1:m|0):E(u,d,void 0,h===void 0?0:h|0,g===void 0?u.length-1:g|0)}t.exports={ge:function(u,d,h,g,m){return o(u,d,h,g,m,r)},gt:function(u,d,h,g,m){return o(u,d,h,g,m,a)},lt:function(u,d,h,g,m){return o(u,d,h,g,m,l)},le:function(u,d,h,g,m){return o(u,d,h,g,m,i)},eq:function(u,d,h,g,m){return o(u,d,h,g,m,s)}}}),2504:(function(t){t.exports=r;function r(a,l,i){var s=i[0],o=i[1],u=i[2];return a[0]=l[0]*s,a[1]=l[1]*s,a[2]=l[2]*s,a[3]=l[3]*s,a[4]=l[4]*o,a[5]=l[5]*o,a[6]=l[6]*o,a[7]=l[7]*o,a[8]=l[8]*u,a[9]=l[9]*u,a[10]=l[10]*u,a[11]=l[11]*u,a[12]=l[12],a[13]=l[13],a[14]=l[14],a[15]=l[15],a}}),2538:(function(t,r,a){var l=a(8902),i=a(5542),s=a(2272),o=a(5023);t.exports=m;function u(E){return[Math.min(E[0],E[1]),Math.max(E[0],E[1])]}function d(E,c){return E[0]-c[0]||E[1]-c[1]}function h(E){return E.map(u).sort(d)}function g(E,c,_){return c in E?E[c]:_}function m(E,c,_){Array.isArray(c)?(_=_||{},c=c||[]):(_=c||{},c=[]);var T=!!g(_,"delaunay",!0),M=!!g(_,"interior",!0),k=!!g(_,"exterior",!0),b=!!g(_,"infinity",!1);if(!M&&!k||E.length===0)return[];var A=l(E,c);if(T||M!==k||b){for(var y=i(E.length,h(c)),f=0;f<A.length;++f){var p=A[f];y.addTriangle(p[0],p[1],p[2])}return T&&s(E,y),k?M?b?o(y,0,b):y.cells():o(y,1,b):o(y,-1)}else return A}}),2573:(function(t){t.exports=r;function r(a,l,i,s){var o=l[0],u=l[1],d=l[2],h=l[3];return a[0]=o+s*(i[0]-o),a[1]=u+s*(i[1]-u),a[2]=d+s*(i[2]-d),a[3]=h+s*(i[3]-h),a}}),2613:(function(t){t.exports=1e-6}),2640:(function(t,r,a){var l=a(1888);t.exports=o;var i={"false,0,1":function(d,h,g,m,E){return function(_,T,M,k){var b=_.shape[0]|0,A=_.shape[1]|0,y=_.data,f=_.offset|0,p=_.stride[0]|0,x=_.stride[1]|0,N=f,D,B=-p|0,U=0,V=-x|0,q=0,z=-p-x|0,H=0,G=p|0,J=x-p*b|0,le=0,ge=0,de=0,me=2*b|0,W=m(me),ie=m(me),se=0,ee=0,pe=-1,oe=-1,Y=0,ce=-b|0,ue=b|0,_e=0,Le=-b-1|0,ze=b-1|0,Xe=0,Ve=0,rt=0;for(le=0;le<b;++le)W[se++]=g(y[N],T,M,k),N+=G;if(N+=J,A>0){if(ge=1,W[se++]=g(y[N],T,M,k),N+=G,b>0)for(le=1,D=y[N],ee=W[se]=g(D,T,M,k),Y=W[se+pe],_e=W[se+ce],Xe=W[se+Le],(ee!==Y||ee!==_e||ee!==Xe)&&(U=y[N+B],q=y[N+V],H=y[N+z],d(le,ge,D,U,q,H,ee,Y,_e,Xe,T,M,k),Ve=ie[se]=de++),se+=1,N+=G,le=2;le<b;++le)D=y[N],ee=W[se]=g(D,T,M,k),Y=W[se+pe],_e=W[se+ce],Xe=W[se+Le],(ee!==Y||ee!==_e||ee!==Xe)&&(U=y[N+B],q=y[N+V],H=y[N+z],d(le,ge,D,U,q,H,ee,Y,_e,Xe,T,M,k),Ve=ie[se]=de++,Xe!==Y&&h(ie[se+pe],Ve,H,U,Xe,Y,T,M,k)),se+=1,N+=G;for(N+=J,se=0,rt=pe,pe=oe,oe=rt,rt=ce,ce=ue,ue=rt,rt=Le,Le=ze,ze=rt,ge=2;ge<A;++ge){if(W[se++]=g(y[N],T,M,k),N+=G,b>0)for(le=1,D=y[N],ee=W[se]=g(D,T,M,k),Y=W[se+pe],_e=W[se+ce],Xe=W[se+Le],(ee!==Y||ee!==_e||ee!==Xe)&&(U=y[N+B],q=y[N+V],H=y[N+z],d(le,ge,D,U,q,H,ee,Y,_e,Xe,T,M,k),Ve=ie[se]=de++,Xe!==_e&&h(ie[se+ce],Ve,q,H,_e,Xe,T,M,k)),se+=1,N+=G,le=2;le<b;++le)D=y[N],ee=W[se]=g(D,T,M,k),Y=W[se+pe],_e=W[se+ce],Xe=W[se+Le],(ee!==Y||ee!==_e||ee!==Xe)&&(U=y[N+B],q=y[N+V],H=y[N+z],d(le,ge,D,U,q,H,ee,Y,_e,Xe,T,M,k),Ve=ie[se]=de++,Xe!==_e&&h(ie[se+ce],Ve,q,H,_e,Xe,T,M,k),Xe!==Y&&h(ie[se+pe],Ve,H,U,Xe,Y,T,M,k)),se+=1,N+=G;ge&1&&(se=0),rt=pe,pe=oe,oe=rt,rt=ce,ce=ue,ue=rt,rt=Le,Le=ze,ze=rt,N+=J}}E(ie),E(W)}},"false,1,0":function(d,h,g,m,E){return function(_,T,M,k){var b=_.shape[0]|0,A=_.shape[1]|0,y=_.data,f=_.offset|0,p=_.stride[0]|0,x=_.stride[1]|0,N=f,D,B=-p|0,U=0,V=-x|0,q=0,z=-p-x|0,H=0,G=x|0,J=p-x*A|0,le=0,ge=0,de=0,me=2*A|0,W=m(me),ie=m(me),se=0,ee=0,pe=-1,oe=-1,Y=0,ce=-A|0,ue=A|0,_e=0,Le=-A-1|0,ze=A-1|0,Xe=0,Ve=0,rt=0;for(ge=0;ge<A;++ge)W[se++]=g(y[N],T,M,k),N+=G;if(N+=J,b>0){if(le=1,W[se++]=g(y[N],T,M,k),N+=G,A>0)for(ge=1,D=y[N],ee=W[se]=g(D,T,M,k),_e=W[se+ce],Y=W[se+pe],Xe=W[se+Le],(ee!==_e||ee!==Y||ee!==Xe)&&(U=y[N+B],q=y[N+V],H=y[N+z],d(le,ge,D,U,q,H,ee,_e,Y,Xe,T,M,k),Ve=ie[se]=de++),se+=1,N+=G,ge=2;ge<A;++ge)D=y[N],ee=W[se]=g(D,T,M,k),_e=W[se+ce],Y=W[se+pe],Xe=W[se+Le],(ee!==_e||ee!==Y||ee!==Xe)&&(U=y[N+B],q=y[N+V],H=y[N+z],d(le,ge,D,U,q,H,ee,_e,Y,Xe,T,M,k),Ve=ie[se]=de++,Xe!==Y&&h(ie[se+pe],Ve,q,H,Y,Xe,T,M,k)),se+=1,N+=G;for(N+=J,se=0,rt=ce,ce=ue,ue=rt,rt=pe,pe=oe,oe=rt,rt=Le,Le=ze,ze=rt,le=2;le<b;++le){if(W[se++]=g(y[N],T,M,k),N+=G,A>0)for(ge=1,D=y[N],ee=W[se]=g(D,T,M,k),_e=W[se+ce],Y=W[se+pe],Xe=W[se+Le],(ee!==_e||ee!==Y||ee!==Xe)&&(U=y[N+B],q=y[N+V],H=y[N+z],d(le,ge,D,U,q,H,ee,_e,Y,Xe,T,M,k),Ve=ie[se]=de++,Xe!==_e&&h(ie[se+ce],Ve,H,U,Xe,_e,T,M,k)),se+=1,N+=G,ge=2;ge<A;++ge)D=y[N],ee=W[se]=g(D,T,M,k),_e=W[se+ce],Y=W[se+pe],Xe=W[se+Le],(ee!==_e||ee!==Y||ee!==Xe)&&(U=y[N+B],q=y[N+V],H=y[N+z],d(le,ge,D,U,q,H,ee,_e,Y,Xe,T,M,k),Ve=ie[se]=de++,Xe!==Y&&h(ie[se+pe],Ve,q,H,Y,Xe,T,M,k),Xe!==_e&&h(ie[se+ce],Ve,H,U,Xe,_e,T,M,k)),se+=1,N+=G;le&1&&(se=0),rt=ce,ce=ue,ue=rt,rt=pe,pe=oe,oe=rt,rt=Le,Le=ze,ze=rt,N+=J}}E(ie),E(W)}}};function s(u,d,h,g,m,E){var c=[E,m].join(","),_=i[c];return _(u,d,h,l.mallocUint32,l.freeUint32)}function o(u){function d(T){throw new Error("ndarray-extract-contour: "+T)}typeof u!="object"&&d("Must specify arguments");var h=u.order;Array.isArray(h)||d("Must specify order");var g=u.arrayArguments||1;g<1&&d("Must have at least one array argument");var m=u.scalarArguments||0;m<0&&d("Scalar arg count must be > 0"),typeof u.vertex!="function"&&d("Must specify vertex creation function"),typeof u.cell!="function"&&d("Must specify cell creation function"),typeof u.phase!="function"&&d("Must specify phase function");for(var E=u.getters||[],c=new Array(g),_=0;_<g;++_)E.indexOf(_)>=0?c[_]=!0:c[_]=!1;return s(u.vertex,u.cell,u.phase,m,h,c)}}),2642:(function(t,r,a){t.exports=s;var l=a(727);function i(o){for(var u=0,d=0;d<o.length;++d)u+=o[d];return u}function s(o,u){for(var d=u.length,h=new Array(d+1),g=0;g<d;++g){for(var m=new Array(d+1),E=0;E<=d;++E)m[E]=o[E][g];h[g]=m}h[d]=new Array(d+1);for(var g=0;g<=d;++g)h[d][g]=1;for(var c=new Array(d+1),g=0;g<d;++g)c[g]=u[g];c[d]=1;var _=l(h,c),T=i(_[d+1]);T===0&&(T=1);for(var M=new Array(d+1),g=0;g<=d;++g)M[g]=i(_[g])/T;return M}}),2646:(function(t,r,a){var l=a(5250),i=a(8210),s=a(8545),o=a(3012),u=6;function d(y){var f=y===3?E:y===4?c:y===5?_:T;return f(i,s,l,o)}function h(){return 0}function g(){return 0}function m(){return 0}function E(y,f,p,x){function N(D,B,U){var V=p(D[0],D[0]),q=x(V,B[0]),z=x(V,U[0]),H=p(B[0],B[0]),G=x(H,D[0]),J=x(H,U[0]),le=p(U[0],U[0]),ge=x(le,D[0]),de=x(le,B[0]),me=y(f(de,J),f(G,q)),W=f(ge,z),ie=f(me,W);return ie[ie.length-1]}return N}function c(y,f,p,x){function N(D,B,U,V){var q=y(p(D[0],D[0]),p(D[1],D[1])),z=x(q,B[0]),H=x(q,U[0]),G=x(q,V[0]),J=y(p(B[0],B[0]),p(B[1],B[1])),le=x(J,D[0]),ge=x(J,U[0]),de=x(J,V[0]),me=y(p(U[0],U[0]),p(U[1],U[1])),W=x(me,D[0]),ie=x(me,B[0]),se=x(me,V[0]),ee=y(p(V[0],V[0]),p(V[1],V[1])),pe=x(ee,D[0]),oe=x(ee,B[0]),Y=x(ee,U[0]),ce=y(y(x(f(Y,se),B[1]),y(x(f(oe,de),-U[1]),x(f(ie,ge),V[1]))),y(x(f(oe,de),D[1]),y(x(f(pe,G),-B[1]),x(f(le,z),V[1])))),ue=y(y(x(f(Y,se),D[1]),y(x(f(pe,G),-U[1]),x(f(W,H),V[1]))),y(x(f(ie,ge),D[1]),y(x(f(W,H),-B[1]),x(f(le,z),U[1])))),_e=f(ce,ue);return _e[_e.length-1]}return N}function _(y,f,p,x){function N(D,B,U,V,q){var z=y(p(D[0],D[0]),y(p(D[1],D[1]),p(D[2],D[2]))),H=x(z,B[0]),G=x(z,U[0]),J=x(z,V[0]),le=x(z,q[0]),ge=y(p(B[0],B[0]),y(p(B[1],B[1]),p(B[2],B[2]))),de=x(ge,D[0]),me=x(ge,U[0]),W=x(ge,V[0]),ie=x(ge,q[0]),se=y(p(U[0],U[0]),y(p(U[1],U[1]),p(U[2],U[2]))),ee=x(se,D[0]),pe=x(se,B[0]),oe=x(se,V[0]),Y=x(se,q[0]),ce=y(p(V[0],V[0]),y(p(V[1],V[1]),p(V[2],V[2]))),ue=x(ce,D[0]),_e=x(ce,B[0]),Le=x(ce,U[0]),ze=x(ce,q[0]),Xe=y(p(q[0],q[0]),y(p(q[1],q[1]),p(q[2],q[2]))),Ve=x(Xe,D[0]),rt=x(Xe,B[0]),mt=x(Xe,U[0]),_t=x(Xe,V[0]),vt=y(y(y(x(y(x(f(_t,ze),U[1]),y(x(f(mt,Y),-V[1]),x(f(Le,oe),q[1]))),B[2]),y(x(y(x(f(_t,ze),B[1]),y(x(f(rt,ie),-V[1]),x(f(_e,W),q[1]))),-U[2]),x(y(x(f(mt,Y),B[1]),y(x(f(rt,ie),-U[1]),x(f(pe,me),q[1]))),V[2]))),y(x(y(x(f(Le,oe),B[1]),y(x(f(_e,W),-U[1]),x(f(pe,me),V[1]))),-q[2]),y(x(y(x(f(_t,ze),B[1]),y(x(f(rt,ie),-V[1]),x(f(_e,W),q[1]))),D[2]),x(y(x(f(_t,ze),D[1]),y(x(f(Ve,le),-V[1]),x(f(ue,J),q[1]))),-B[2])))),y(y(x(y(x(f(rt,ie),D[1]),y(x(f(Ve,le),-B[1]),x(f(de,H),q[1]))),V[2]),y(x(y(x(f(_e,W),D[1]),y(x(f(ue,J),-B[1]),x(f(de,H),V[1]))),-q[2]),x(y(x(f(Le,oe),B[1]),y(x(f(_e,W),-U[1]),x(f(pe,me),V[1]))),D[2]))),y(x(y(x(f(Le,oe),D[1]),y(x(f(ue,J),-U[1]),x(f(ee,G),V[1]))),-B[2]),y(x(y(x(f(_e,W),D[1]),y(x(f(ue,J),-B[1]),x(f(de,H),V[1]))),U[2]),x(y(x(f(pe,me),D[1]),y(x(f(ee,G),-B[1]),x(f(de,H),U[1]))),-V[2]))))),ut=y(y(y(x(y(x(f(_t,ze),U[1]),y(x(f(mt,Y),-V[1]),x(f(Le,oe),q[1]))),D[2]),x(y(x(f(_t,ze),D[1]),y(x(f(Ve,le),-V[1]),x(f(ue,J),q[1]))),-U[2])),y(x(y(x(f(mt,Y),D[1]),y(x(f(Ve,le),-U[1]),x(f(ee,G),q[1]))),V[2]),x(y(x(f(Le,oe),D[1]),y(x(f(ue,J),-U[1]),x(f(ee,G),V[1]))),-q[2]))),y(y(x(y(x(f(mt,Y),B[1]),y(x(f(rt,ie),-U[1]),x(f(pe,me),q[1]))),D[2]),x(y(x(f(mt,Y),D[1]),y(x(f(Ve,le),-U[1]),x(f(ee,G),q[1]))),-B[2])),y(x(y(x(f(rt,ie),D[1]),y(x(f(Ve,le),-B[1]),x(f(de,H),q[1]))),U[2]),x(y(x(f(pe,me),D[1]),y(x(f(ee,G),-B[1]),x(f(de,H),U[1]))),-q[2])))),Fe=f(vt,ut);return Fe[Fe.length-1]}return N}function T(y,f,p,x){function N(D,B,U,V,q,z){var H=y(y(p(D[0],D[0]),p(D[1],D[1])),y(p(D[2],D[2]),p(D[3],D[3]))),G=x(H,B[0]),J=x(H,U[0]),le=x(H,V[0]),ge=x(H,q[0]),de=x(H,z[0]),me=y(y(p(B[0],B[0]),p(B[1],B[1])),y(p(B[2],B[2]),p(B[3],B[3]))),W=x(me,D[0]),ie=x(me,U[0]),se=x(me,V[0]),ee=x(me,q[0]),pe=x(me,z[0]),oe=y(y(p(U[0],U[0]),p(U[1],U[1])),y(p(U[2],U[2]),p(U[3],U[3]))),Y=x(oe,D[0]),ce=x(oe,B[0]),ue=x(oe,V[0]),_e=x(oe,q[0]),Le=x(oe,z[0]),ze=y(y(p(V[0],V[0]),p(V[1],V[1])),y(p(V[2],V[2]),p(V[3],V[3]))),Xe=x(ze,D[0]),Ve=x(ze,B[0]),rt=x(ze,U[0]),mt=x(ze,q[0]),_t=x(ze,z[0]),vt=y(y(p(q[0],q[0]),p(q[1],q[1])),y(p(q[2],q[2]),p(q[3],q[3]))),ut=x(vt,D[0]),Fe=x(vt,B[0]),Pe=x(vt,U[0]),be=x(vt,V[0]),Ye=x(vt,z[0]),yt=y(y(p(z[0],z[0]),p(z[1],z[1])),y(p(z[2],z[2]),p(z[3],z[3]))),wt=x(yt,D[0]),ht=x(yt,B[0]),Yt=x(yt,U[0]),$t=x(yt,V[0]),fr=x(yt,q[0]),mr=y(y(y(x(y(y(x(y(x(f(fr,Ye),V[1]),y(x(f($t,_t),-q[1]),x(f(be,mt),z[1]))),U[2]),x(y(x(f(fr,Ye),U[1]),y(x(f(Yt,Le),-q[1]),x(f(Pe,_e),z[1]))),-V[2])),y(x(y(x(f($t,_t),U[1]),y(x(f(Yt,Le),-V[1]),x(f(rt,ue),z[1]))),q[2]),x(y(x(f(be,mt),U[1]),y(x(f(Pe,_e),-V[1]),x(f(rt,ue),q[1]))),-z[2]))),B[3]),y(x(y(y(x(y(x(f(fr,Ye),V[1]),y(x(f($t,_t),-q[1]),x(f(be,mt),z[1]))),B[2]),x(y(x(f(fr,Ye),B[1]),y(x(f(ht,pe),-q[1]),x(f(Fe,ee),z[1]))),-V[2])),y(x(y(x(f($t,_t),B[1]),y(x(f(ht,pe),-V[1]),x(f(Ve,se),z[1]))),q[2]),x(y(x(f(be,mt),B[1]),y(x(f(Fe,ee),-V[1]),x(f(Ve,se),q[1]))),-z[2]))),-U[3]),x(y(y(x(y(x(f(fr,Ye),U[1]),y(x(f(Yt,Le),-q[1]),x(f(Pe,_e),z[1]))),B[2]),x(y(x(f(fr,Ye),B[1]),y(x(f(ht,pe),-q[1]),x(f(Fe,ee),z[1]))),-U[2])),y(x(y(x(f(Yt,Le),B[1]),y(x(f(ht,pe),-U[1]),x(f(ce,ie),z[1]))),q[2]),x(y(x(f(Pe,_e),B[1]),y(x(f(Fe,ee),-U[1]),x(f(ce,ie),q[1]))),-z[2]))),V[3]))),y(y(x(y(y(x(y(x(f($t,_t),U[1]),y(x(f(Yt,Le),-V[1]),x(f(rt,ue),z[1]))),B[2]),x(y(x(f($t,_t),B[1]),y(x(f(ht,pe),-V[1]),x(f(Ve,se),z[1]))),-U[2])),y(x(y(x(f(Yt,Le),B[1]),y(x(f(ht,pe),-U[1]),x(f(ce,ie),z[1]))),V[2]),x(y(x(f(rt,ue),B[1]),y(x(f(Ve,se),-U[1]),x(f(ce,ie),V[1]))),-z[2]))),-q[3]),x(y(y(x(y(x(f(be,mt),U[1]),y(x(f(Pe,_e),-V[1]),x(f(rt,ue),q[1]))),B[2]),x(y(x(f(be,mt),B[1]),y(x(f(Fe,ee),-V[1]),x(f(Ve,se),q[1]))),-U[2])),y(x(y(x(f(Pe,_e),B[1]),y(x(f(Fe,ee),-U[1]),x(f(ce,ie),q[1]))),V[2]),x(y(x(f(rt,ue),B[1]),y(x(f(Ve,se),-U[1]),x(f(ce,ie),V[1]))),-q[2]))),z[3])),y(x(y(y(x(y(x(f(fr,Ye),V[1]),y(x(f($t,_t),-q[1]),x(f(be,mt),z[1]))),B[2]),x(y(x(f(fr,Ye),B[1]),y(x(f(ht,pe),-q[1]),x(f(Fe,ee),z[1]))),-V[2])),y(x(y(x(f($t,_t),B[1]),y(x(f(ht,pe),-V[1]),x(f(Ve,se),z[1]))),q[2]),x(y(x(f(be,mt),B[1]),y(x(f(Fe,ee),-V[1]),x(f(Ve,se),q[1]))),-z[2]))),D[3]),x(y(y(x(y(x(f(fr,Ye),V[1]),y(x(f($t,_t),-q[1]),x(f(be,mt),z[1]))),D[2]),x(y(x(f(fr,Ye),D[1]),y(x(f(wt,de),-q[1]),x(f(ut,ge),z[1]))),-V[2])),y(x(y(x(f($t,_t),D[1]),y(x(f(wt,de),-V[1]),x(f(Xe,le),z[1]))),q[2]),x(y(x(f(be,mt),D[1]),y(x(f(ut,ge),-V[1]),x(f(Xe,le),q[1]))),-z[2]))),-B[3])))),y(y(y(x(y(y(x(y(x(f(fr,Ye),B[1]),y(x(f(ht,pe),-q[1]),x(f(Fe,ee),z[1]))),D[2]),x(y(x(f(fr,Ye),D[1]),y(x(f(wt,de),-q[1]),x(f(ut,ge),z[1]))),-B[2])),y(x(y(x(f(ht,pe),D[1]),y(x(f(wt,de),-B[1]),x(f(W,G),z[1]))),q[2]),x(y(x(f(Fe,ee),D[1]),y(x(f(ut,ge),-B[1]),x(f(W,G),q[1]))),-z[2]))),V[3]),x(y(y(x(y(x(f($t,_t),B[1]),y(x(f(ht,pe),-V[1]),x(f(Ve,se),z[1]))),D[2]),x(y(x(f($t,_t),D[1]),y(x(f(wt,de),-V[1]),x(f(Xe,le),z[1]))),-B[2])),y(x(y(x(f(ht,pe),D[1]),y(x(f(wt,de),-B[1]),x(f(W,G),z[1]))),V[2]),x(y(x(f(Ve,se),D[1]),y(x(f(Xe,le),-B[1]),x(f(W,G),V[1]))),-z[2]))),-q[3])),y(x(y(y(x(y(x(f(be,mt),B[1]),y(x(f(Fe,ee),-V[1]),x(f(Ve,se),q[1]))),D[2]),x(y(x(f(be,mt),D[1]),y(x(f(ut,ge),-V[1]),x(f(Xe,le),q[1]))),-B[2])),y(x(y(x(f(Fe,ee),D[1]),y(x(f(ut,ge),-B[1]),x(f(W,G),q[1]))),V[2]),x(y(x(f(Ve,se),D[1]),y(x(f(Xe,le),-B[1]),x(f(W,G),V[1]))),-q[2]))),z[3]),x(y(y(x(y(x(f($t,_t),U[1]),y(x(f(Yt,Le),-V[1]),x(f(rt,ue),z[1]))),B[2]),x(y(x(f($t,_t),B[1]),y(x(f(ht,pe),-V[1]),x(f(Ve,se),z[1]))),-U[2])),y(x(y(x(f(Yt,Le),B[1]),y(x(f(ht,pe),-U[1]),x(f(ce,ie),z[1]))),V[2]),x(y(x(f(rt,ue),B[1]),y(x(f(Ve,se),-U[1]),x(f(ce,ie),V[1]))),-z[2]))),D[3]))),y(y(x(y(y(x(y(x(f($t,_t),U[1]),y(x(f(Yt,Le),-V[1]),x(f(rt,ue),z[1]))),D[2]),x(y(x(f($t,_t),D[1]),y(x(f(wt,de),-V[1]),x(f(Xe,le),z[1]))),-U[2])),y(x(y(x(f(Yt,Le),D[1]),y(x(f(wt,de),-U[1]),x(f(Y,J),z[1]))),V[2]),x(y(x(f(rt,ue),D[1]),y(x(f(Xe,le),-U[1]),x(f(Y,J),V[1]))),-z[2]))),-B[3]),x(y(y(x(y(x(f($t,_t),B[1]),y(x(f(ht,pe),-V[1]),x(f(Ve,se),z[1]))),D[2]),x(y(x(f($t,_t),D[1]),y(x(f(wt,de),-V[1]),x(f(Xe,le),z[1]))),-B[2])),y(x(y(x(f(ht,pe),D[1]),y(x(f(wt,de),-B[1]),x(f(W,G),z[1]))),V[2]),x(y(x(f(Ve,se),D[1]),y(x(f(Xe,le),-B[1]),x(f(W,G),V[1]))),-z[2]))),U[3])),y(x(y(y(x(y(x(f(Yt,Le),B[1]),y(x(f(ht,pe),-U[1]),x(f(ce,ie),z[1]))),D[2]),x(y(x(f(Yt,Le),D[1]),y(x(f(wt,de),-U[1]),x(f(Y,J),z[1]))),-B[2])),y(x(y(x(f(ht,pe),D[1]),y(x(f(wt,de),-B[1]),x(f(W,G),z[1]))),U[2]),x(y(x(f(ce,ie),D[1]),y(x(f(Y,J),-B[1]),x(f(W,G),U[1]))),-z[2]))),-V[3]),x(y(y(x(y(x(f(rt,ue),B[1]),y(x(f(Ve,se),-U[1]),x(f(ce,ie),V[1]))),D[2]),x(y(x(f(rt,ue),D[1]),y(x(f(Xe,le),-U[1]),x(f(Y,J),V[1]))),-B[2])),y(x(y(x(f(Ve,se),D[1]),y(x(f(Xe,le),-B[1]),x(f(W,G),V[1]))),U[2]),x(y(x(f(ce,ie),D[1]),y(x(f(Y,J),-B[1]),x(f(W,G),U[1]))),-V[2]))),z[3]))))),Ur=y(y(y(x(y(y(x(y(x(f(fr,Ye),V[1]),y(x(f($t,_t),-q[1]),x(f(be,mt),z[1]))),U[2]),x(y(x(f(fr,Ye),U[1]),y(x(f(Yt,Le),-q[1]),x(f(Pe,_e),z[1]))),-V[2])),y(x(y(x(f($t,_t),U[1]),y(x(f(Yt,Le),-V[1]),x(f(rt,ue),z[1]))),q[2]),x(y(x(f(be,mt),U[1]),y(x(f(Pe,_e),-V[1]),x(f(rt,ue),q[1]))),-z[2]))),D[3]),y(x(y(y(x(y(x(f(fr,Ye),V[1]),y(x(f($t,_t),-q[1]),x(f(be,mt),z[1]))),D[2]),x(y(x(f(fr,Ye),D[1]),y(x(f(wt,de),-q[1]),x(f(ut,ge),z[1]))),-V[2])),y(x(y(x(f($t,_t),D[1]),y(x(f(wt,de),-V[1]),x(f(Xe,le),z[1]))),q[2]),x(y(x(f(be,mt),D[1]),y(x(f(ut,ge),-V[1]),x(f(Xe,le),q[1]))),-z[2]))),-U[3]),x(y(y(x(y(x(f(fr,Ye),U[1]),y(x(f(Yt,Le),-q[1]),x(f(Pe,_e),z[1]))),D[2]),x(y(x(f(fr,Ye),D[1]),y(x(f(wt,de),-q[1]),x(f(ut,ge),z[1]))),-U[2])),y(x(y(x(f(Yt,Le),D[1]),y(x(f(wt,de),-U[1]),x(f(Y,J),z[1]))),q[2]),x(y(x(f(Pe,_e),D[1]),y(x(f(ut,ge),-U[1]),x(f(Y,J),q[1]))),-z[2]))),V[3]))),y(y(x(y(y(x(y(x(f($t,_t),U[1]),y(x(f(Yt,Le),-V[1]),x(f(rt,ue),z[1]))),D[2]),x(y(x(f($t,_t),D[1]),y(x(f(wt,de),-V[1]),x(f(Xe,le),z[1]))),-U[2])),y(x(y(x(f(Yt,Le),D[1]),y(x(f(wt,de),-U[1]),x(f(Y,J),z[1]))),V[2]),x(y(x(f(rt,ue),D[1]),y(x(f(Xe,le),-U[1]),x(f(Y,J),V[1]))),-z[2]))),-q[3]),x(y(y(x(y(x(f(be,mt),U[1]),y(x(f(Pe,_e),-V[1]),x(f(rt,ue),q[1]))),D[2]),x(y(x(f(be,mt),D[1]),y(x(f(ut,ge),-V[1]),x(f(Xe,le),q[1]))),-U[2])),y(x(y(x(f(Pe,_e),D[1]),y(x(f(ut,ge),-U[1]),x(f(Y,J),q[1]))),V[2]),x(y(x(f(rt,ue),D[1]),y(x(f(Xe,le),-U[1]),x(f(Y,J),V[1]))),-q[2]))),z[3])),y(x(y(y(x(y(x(f(fr,Ye),U[1]),y(x(f(Yt,Le),-q[1]),x(f(Pe,_e),z[1]))),B[2]),x(y(x(f(fr,Ye),B[1]),y(x(f(ht,pe),-q[1]),x(f(Fe,ee),z[1]))),-U[2])),y(x(y(x(f(Yt,Le),B[1]),y(x(f(ht,pe),-U[1]),x(f(ce,ie),z[1]))),q[2]),x(y(x(f(Pe,_e),B[1]),y(x(f(Fe,ee),-U[1]),x(f(ce,ie),q[1]))),-z[2]))),D[3]),x(y(y(x(y(x(f(fr,Ye),U[1]),y(x(f(Yt,Le),-q[1]),x(f(Pe,_e),z[1]))),D[2]),x(y(x(f(fr,Ye),D[1]),y(x(f(wt,de),-q[1]),x(f(ut,ge),z[1]))),-U[2])),y(x(y(x(f(Yt,Le),D[1]),y(x(f(wt,de),-U[1]),x(f(Y,J),z[1]))),q[2]),x(y(x(f(Pe,_e),D[1]),y(x(f(ut,ge),-U[1]),x(f(Y,J),q[1]))),-z[2]))),-B[3])))),y(y(y(x(y(y(x(y(x(f(fr,Ye),B[1]),y(x(f(ht,pe),-q[1]),x(f(Fe,ee),z[1]))),D[2]),x(y(x(f(fr,Ye),D[1]),y(x(f(wt,de),-q[1]),x(f(ut,ge),z[1]))),-B[2])),y(x(y(x(f(ht,pe),D[1]),y(x(f(wt,de),-B[1]),x(f(W,G),z[1]))),q[2]),x(y(x(f(Fe,ee),D[1]),y(x(f(ut,ge),-B[1]),x(f(W,G),q[1]))),-z[2]))),U[3]),x(y(y(x(y(x(f(Yt,Le),B[1]),y(x(f(ht,pe),-U[1]),x(f(ce,ie),z[1]))),D[2]),x(y(x(f(Yt,Le),D[1]),y(x(f(wt,de),-U[1]),x(f(Y,J),z[1]))),-B[2])),y(x(y(x(f(ht,pe),D[1]),y(x(f(wt,de),-B[1]),x(f(W,G),z[1]))),U[2]),x(y(x(f(ce,ie),D[1]),y(x(f(Y,J),-B[1]),x(f(W,G),U[1]))),-z[2]))),-q[3])),y(x(y(y(x(y(x(f(Pe,_e),B[1]),y(x(f(Fe,ee),-U[1]),x(f(ce,ie),q[1]))),D[2]),x(y(x(f(Pe,_e),D[1]),y(x(f(ut,ge),-U[1]),x(f(Y,J),q[1]))),-B[2])),y(x(y(x(f(Fe,ee),D[1]),y(x(f(ut,ge),-B[1]),x(f(W,G),q[1]))),U[2]),x(y(x(f(ce,ie),D[1]),y(x(f(Y,J),-B[1]),x(f(W,G),U[1]))),-q[2]))),z[3]),x(y(y(x(y(x(f(be,mt),U[1]),y(x(f(Pe,_e),-V[1]),x(f(rt,ue),q[1]))),B[2]),x(y(x(f(be,mt),B[1]),y(x(f(Fe,ee),-V[1]),x(f(Ve,se),q[1]))),-U[2])),y(x(y(x(f(Pe,_e),B[1]),y(x(f(Fe,ee),-U[1]),x(f(ce,ie),q[1]))),V[2]),x(y(x(f(rt,ue),B[1]),y(x(f(Ve,se),-U[1]),x(f(ce,ie),V[1]))),-q[2]))),D[3]))),y(y(x(y(y(x(y(x(f(be,mt),U[1]),y(x(f(Pe,_e),-V[1]),x(f(rt,ue),q[1]))),D[2]),x(y(x(f(be,mt),D[1]),y(x(f(ut,ge),-V[1]),x(f(Xe,le),q[1]))),-U[2])),y(x(y(x(f(Pe,_e),D[1]),y(x(f(ut,ge),-U[1]),x(f(Y,J),q[1]))),V[2]),x(y(x(f(rt,ue),D[1]),y(x(f(Xe,le),-U[1]),x(f(Y,J),V[1]))),-q[2]))),-B[3]),x(y(y(x(y(x(f(be,mt),B[1]),y(x(f(Fe,ee),-V[1]),x(f(Ve,se),q[1]))),D[2]),x(y(x(f(be,mt),D[1]),y(x(f(ut,ge),-V[1]),x(f(Xe,le),q[1]))),-B[2])),y(x(y(x(f(Fe,ee),D[1]),y(x(f(ut,ge),-B[1]),x(f(W,G),q[1]))),V[2]),x(y(x(f(Ve,se),D[1]),y(x(f(Xe,le),-B[1]),x(f(W,G),V[1]))),-q[2]))),U[3])),y(x(y(y(x(y(x(f(Pe,_e),B[1]),y(x(f(Fe,ee),-U[1]),x(f(ce,ie),q[1]))),D[2]),x(y(x(f(Pe,_e),D[1]),y(x(f(ut,ge),-U[1]),x(f(Y,J),q[1]))),-B[2])),y(x(y(x(f(Fe,ee),D[1]),y(x(f(ut,ge),-B[1]),x(f(W,G),q[1]))),U[2]),x(y(x(f(ce,ie),D[1]),y(x(f(Y,J),-B[1]),x(f(W,G),U[1]))),-q[2]))),-V[3]),x(y(y(x(y(x(f(rt,ue),B[1]),y(x(f(Ve,se),-U[1]),x(f(ce,ie),V[1]))),D[2]),x(y(x(f(rt,ue),D[1]),y(x(f(Xe,le),-U[1]),x(f(Y,J),V[1]))),-B[2])),y(x(y(x(f(Ve,se),D[1]),y(x(f(Xe,le),-B[1]),x(f(W,G),V[1]))),U[2]),x(y(x(f(ce,ie),D[1]),y(x(f(Y,J),-B[1]),x(f(W,G),U[1]))),-V[2]))),q[3]))))),jr=f(mr,Ur);return jr[jr.length-1]}return N}var M=[h,g,m];function k(y){var f=M[y.length];return f||(f=M[y.length]=d(y.length)),f.apply(void 0,y)}function b(y,f,p,x,N,D,B,U){function V(q,z,H,G,J,le){switch(arguments.length){case 0:case 1:return 0;case 2:return x(q,z);case 3:return N(q,z,H);case 4:return D(q,z,H,G);case 5:return B(q,z,H,G,J);case 6:return U(q,z,H,G,J,le)}for(var ge=new Array(arguments.length),de=0;de<arguments.length;++de)ge[de]=arguments[de];return y(ge)}return V}function A(){for(;M.length<=u;)M.push(d(M.length));t.exports=b.apply(void 0,[k].concat(M));for(var y=0;y<=u;++y)t.exports[y]=M[y]}A()}),2651:(function(t,r,a){var l=a(6859),i=a(2361);t.exports=s;function s(o){var u=i.exponent(o);return u<52?new l(o):new l(o*Math.pow(2,52-u)).ushln(u-52)}}),2652:(function(t,r,a){var l=a(4335),i=a(6864),s=a(1903),o=a(9921),u=a(7608),d=a(5665),h={length:a(1387),normalize:a(3536),dot:a(244),cross:a(5911)},g=i(),m=i(),E=[0,0,0,0],c=[[0,0,0],[0,0,0],[0,0,0]],_=[0,0,0];t.exports=function(A,y,f,p,x,N){if(y||(y=[0,0,0]),f||(f=[0,0,0]),p||(p=[0,0,0]),x||(x=[0,0,0,1]),N||(N=[0,0,0,1]),!l(g,A)||(s(m,g),m[3]=0,m[7]=0,m[11]=0,m[15]=1,Math.abs(o(m)<1e-8)))return!1;var D=g[3],B=g[7],U=g[11],V=g[12],q=g[13],z=g[14],H=g[15];if(D!==0||B!==0||U!==0){E[0]=D,E[1]=B,E[2]=U,E[3]=H;var G=u(m,m);if(!G)return!1;d(m,m),T(x,E,m)}else x[0]=x[1]=x[2]=0,x[3]=1;if(y[0]=V,y[1]=q,y[2]=z,M(c,g),f[0]=h.length(c[0]),h.normalize(c[0],c[0]),p[0]=h.dot(c[0],c[1]),k(c[1],c[1],c[0],1,-p[0]),f[1]=h.length(c[1]),h.normalize(c[1],c[1]),p[0]/=f[1],p[1]=h.dot(c[0],c[2]),k(c[2],c[2],c[0],1,-p[1]),p[2]=h.dot(c[1],c[2]),k(c[2],c[2],c[1],1,-p[2]),f[2]=h.length(c[2]),h.normalize(c[2],c[2]),p[1]/=f[2],p[2]/=f[2],h.cross(_,c[1],c[2]),h.dot(c[0],_)<0)for(var J=0;J<3;J++)f[J]*=-1,c[J][0]*=-1,c[J][1]*=-1,c[J][2]*=-1;return N[0]=.5*Math.sqrt(Math.max(1+c[0][0]-c[1][1]-c[2][2],0)),N[1]=.5*Math.sqrt(Math.max(1-c[0][0]+c[1][1]-c[2][2],0)),N[2]=.5*Math.sqrt(Math.max(1-c[0][0]-c[1][1]+c[2][2],0)),N[3]=.5*Math.sqrt(Math.max(1+c[0][0]+c[1][1]+c[2][2],0)),c[2][1]>c[1][2]&&(N[0]=-N[0]),c[0][2]>c[2][0]&&(N[1]=-N[1]),c[1][0]>c[0][1]&&(N[2]=-N[2]),!0};function T(b,A,y){var f=A[0],p=A[1],x=A[2],N=A[3];return b[0]=y[0]*f+y[4]*p+y[8]*x+y[12]*N,b[1]=y[1]*f+y[5]*p+y[9]*x+y[13]*N,b[2]=y[2]*f+y[6]*p+y[10]*x+y[14]*N,b[3]=y[3]*f+y[7]*p+y[11]*x+y[15]*N,b}function M(b,A){b[0][0]=A[0],b[0][1]=A[1],b[0][2]=A[2],b[1][0]=A[4],b[1][1]=A[5],b[1][2]=A[6],b[2][0]=A[8],b[2][1]=A[9],b[2][2]=A[10]}function k(b,A,y,f,p){b[0]=A[0]*f+y[0]*p,b[1]=A[1]*f+y[1]*p,b[2]=A[2]*f+y[2]*p}}),2653:(function(t,r,a){var l=a(3865);t.exports=i;function i(s,o){for(var u=s.length,d=new Array(u),h=0;h<u;++h)d[h]=l(s[h],o[h]);return d}}),2681:(function(t){t.exports=r;function r(a,l){return a[0]=Math.floor(l[0]),a[1]=Math.floor(l[1]),a[2]=Math.floor(l[2]),a}}),2690:(function(t,r,a){t.exports=u;var l=a(8954),i=a(3952);function s(d,h){for(var g=d.length,m=new Array(g),E=0;E<h.length;++E)m[E]=d[h[E]];for(var c=h.length,E=0;E<g;++E)h.indexOf(E)<0&&(m[c++]=d[E]);return m}function o(d,h){for(var g=d.length,m=h.length,E=0;E<g;++E)for(var c=d[E],_=0;_<c.length;++_){var T=c[_];if(T<m)c[_]=h[T];else{T=T-m;for(var M=0;M<m;++M)T>=h[M]&&(T+=1);c[_]=T}}return d}function u(d,h){try{return l(d,!0)}catch{var g=i(d);if(g.length<=h)return[];var m=s(d,g),E=l(m,!0);return o(E,g)}}}),2762:(function(t,r,a){var l=a(1888),i=a(5298),s=a(9618),o=["uint8","uint8_clamped","uint16","uint32","int8","int16","int32","float32"];function u(c,_,T,M,k){this.gl=c,this.type=_,this.handle=T,this.length=M,this.usage=k}var d=u.prototype;d.bind=function(){this.gl.bindBuffer(this.type,this.handle)},d.unbind=function(){this.gl.bindBuffer(this.type,null)},d.dispose=function(){this.gl.deleteBuffer(this.handle)};function h(c,_,T,M,k,b){var A=k.length*k.BYTES_PER_ELEMENT;if(b<0)return c.bufferData(_,k,M),A;if(A+b>T)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return c.bufferSubData(_,b,k),T}function g(c,_){for(var T=l.malloc(c.length,_),M=c.length,k=0;k<M;++k)T[k]=c[k];return T}function m(c,_){for(var T=1,M=_.length-1;M>=0;--M){if(_[M]!==T)return!1;T*=c[M]}return!0}d.update=function(c,_){if(typeof _!="number"&&(_=-1),this.bind(),typeof c=="object"&&typeof c.shape<"u"){var T=c.dtype;if(o.indexOf(T)<0&&(T="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){var M=gl.getExtension("OES_element_index_uint");M&&T!=="uint16"?T="uint32":T="uint16"}if(T===c.dtype&&m(c.shape,c.stride))c.offset===0&&c.data.length===c.shape[0]?this.length=h(this.gl,this.type,this.length,this.usage,c.data,_):this.length=h(this.gl,this.type,this.length,this.usage,c.data.subarray(c.offset,c.shape[0]),_);else{var k=l.malloc(c.size,T),b=s(k,c.shape);i.assign(b,c),_<0?this.length=h(this.gl,this.type,this.length,this.usage,k,_):this.length=h(this.gl,this.type,this.length,this.usage,k.subarray(0,c.size),_),l.free(k)}}else if(Array.isArray(c)){var A;this.type===this.gl.ELEMENT_ARRAY_BUFFER?A=g(c,"uint16"):A=g(c,"float32"),_<0?this.length=h(this.gl,this.type,this.length,this.usage,A,_):this.length=h(this.gl,this.type,this.length,this.usage,A.subarray(0,c.length),_),l.free(A)}else if(typeof c=="object"&&typeof c.length=="number")this.length=h(this.gl,this.type,this.length,this.usage,c,_);else if(typeof c=="number"||c===void 0){if(_>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");c=c|0,c<=0&&(c=1),this.gl.bufferData(this.type,c|0,this.usage),this.length=c}else throw new Error("gl-buffer: Invalid data type")};function E(c,_,T,M){if(T=T||c.ARRAY_BUFFER,M=M||c.DYNAMIC_DRAW,T!==c.ARRAY_BUFFER&&T!==c.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(M!==c.DYNAMIC_DRAW&&M!==c.STATIC_DRAW&&M!==c.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 k=c.createBuffer(),b=new u(c,T,k,0,M);return b.update(_),b}t.exports=E}),2825:(function(t){t.exports=r;function r(a,l,i){var s=new Float32Array(3);return s[0]=a,s[1]=l,s[2]=i,s}}),2931:(function(t,r,a){t.exports={EPSILON:a(2613),create:a(1091),clone:a(3126),angle:a(8192),fromValues:a(2825),copy:a(3990),set:a(1463),equals:a(9922),exactEquals:a(9265),add:a(5632),subtract:a(6843),sub:a(2229),multiply:a(5847),mul:a(4505),divide:a(6690),div:a(4008),min:a(8107),max:a(7417),floor:a(2681),ceil:a(9226),round:a(2447),scale:a(6621),scaleAndAdd:a(8489),distance:a(7056),dist:a(5455),squaredDistance:a(2953),sqrDist:a(6141),length:a(1387),len:a(868),squaredLength:a(3066),sqrLen:a(5486),negate:a(5093),inverse:a(811),normalize:a(3536),dot:a(244),cross:a(5911),lerp:a(6658),random:a(7636),transformMat4:a(5673),transformMat3:a(492),transformQuat:a(264),rotateX:a(6894),rotateY:a(109),rotateZ:a(8692),forEach:a(5137)}}),2933:(function(t){t.exports=r;function r(a,l){return a[0]=l[0],a[1]=l[1],a[2]=l[2],a[3]=l[3],a}}),2953:(function(t){t.exports=r;function r(a,l){var i=l[0]-a[0],s=l[1]-a[1],o=l[2]-a[2];return i*i+s*s+o*o}}),2962:(function(t,r,a){var l=a(5250),i=a(8210),s=a(3012),o=a(7004),u=6;function d(M,k,b,A){return function(f){return A(M(b(f[0][0],f[1][1]),b(-f[0][1],f[1][0])))}}function h(M,k,b,A){return function(f){return A(M(k(M(b(f[1][1],f[2][2]),b(-f[1][2],f[2][1])),f[0][0]),M(k(M(b(f[1][0],f[2][2]),b(-f[1][2],f[2][0])),-f[0][1]),k(M(b(f[1][0],f[2][1]),b(-f[1][1],f[2][0])),f[0][2]))))}}function g(M,k,b,A){return function(f){return A(M(M(k(M(k(M(b(f[2][2],f[3][3]),b(-f[2][3],f[3][2])),f[1][1]),M(k(M(b(f[2][1],f[3][3]),b(-f[2][3],f[3][1])),-f[1][2]),k(M(b(f[2][1],f[3][2]),b(-f[2][2],f[3][1])),f[1][3]))),f[0][0]),k(M(k(M(b(f[2][2],f[3][3]),b(-f[2][3],f[3][2])),f[1][0]),M(k(M(b(f[2][0],f[3][3]),b(-f[2][3],f[3][0])),-f[1][2]),k(M(b(f[2][0],f[3][2]),b(-f[2][2],f[3][0])),f[1][3]))),-f[0][1])),M(k(M(k(M(b(f[2][1],f[3][3]),b(-f[2][3],f[3][1])),f[1][0]),M(k(M(b(f[2][0],f[3][3]),b(-f[2][3],f[3][0])),-f[1][1]),k(M(b(f[2][0],f[3][1]),b(-f[2][1],f[3][0])),f[1][3]))),f[0][2]),k(M(k(M(b(f[2][1],f[3][2]),b(-f[2][2],f[3][1])),f[1][0]),M(k(M(b(f[2][0],f[3][2]),b(-f[2][2],f[3][0])),-f[1][1]),k(M(b(f[2][0],f[3][1]),b(-f[2][1],f[3][0])),f[1][2]))),-f[0][3]))))}}function m(M,k,b,A){return function(f){return A(M(M(k(M(M(k(M(k(M(b(f[3][3],f[4][4]),b(-f[3][4],f[4][3])),f[2][2]),M(k(M(b(f[3][2],f[4][4]),b(-f[3][4],f[4][2])),-f[2][3]),k(M(b(f[3][2],f[4][3]),b(-f[3][3],f[4][2])),f[2][4]))),f[1][1]),k(M(k(M(b(f[3][3],f[4][4]),b(-f[3][4],f[4][3])),f[2][1]),M(k(M(b(f[3][1],f[4][4]),b(-f[3][4],f[4][1])),-f[2][3]),k(M(b(f[3][1],f[4][3]),b(-f[3][3],f[4][1])),f[2][4]))),-f[1][2])),M(k(M(k(M(b(f[3][2],f[4][4]),b(-f[3][4],f[4][2])),f[2][1]),M(k(M(b(f[3][1],f[4][4]),b(-f[3][4],f[4][1])),-f[2][2]),k(M(b(f[3][1],f[4][2]),b(-f[3][2],f[4][1])),f[2][4]))),f[1][3]),k(M(k(M(b(f[3][2],f[4][3]),b(-f[3][3],f[4][2])),f[2][1]),M(k(M(b(f[3][1],f[4][3]),b(-f[3][3],f[4][1])),-f[2][2]),k(M(b(f[3][1],f[4][2]),b(-f[3][2],f[4][1])),f[2][3]))),-f[1][4]))),f[0][0]),k(M(M(k(M(k(M(b(f[3][3],f[4][4]),b(-f[3][4],f[4][3])),f[2][2]),M(k(M(b(f[3][2],f[4][4]),b(-f[3][4],f[4][2])),-f[2][3]),k(M(b(f[3][2],f[4][3]),b(-f[3][3],f[4][2])),f[2][4]))),f[1][0]),k(M(k(M(b(f[3][3],f[4][4]),b(-f[3][4],f[4][3])),f[2][0]),M(k(M(b(f[3][0],f[4][4]),b(-f[3][4],f[4][0])),-f[2][3]),k(M(b(f[3][0],f[4][3]),b(-f[3][3],f[4][0])),f[2][4]))),-f[1][2])),M(k(M(k(M(b(f[3][2],f[4][4]),b(-f[3][4],f[4][2])),f[2][0]),M(k(M(b(f[3][0],f[4][4]),b(-f[3][4],f[4][0])),-f[2][2]),k(M(b(f[3][0],f[4][2]),b(-f[3][2],f[4][0])),f[2][4]))),f[1][3]),k(M(k(M(b(f[3][2],f[4][3]),b(-f[3][3],f[4][2])),f[2][0]),M(k(M(b(f[3][0],f[4][3]),b(-f[3][3],f[4][0])),-f[2][2]),k(M(b(f[3][0],f[4][2]),b(-f[3][2],f[4][0])),f[2][3]))),-f[1][4]))),-f[0][1])),M(k(M(M(k(M(k(M(b(f[3][3],f[4][4]),b(-f[3][4],f[4][3])),f[2][1]),M(k(M(b(f[3][1],f[4][4]),b(-f[3][4],f[4][1])),-f[2][3]),k(M(b(f[3][1],f[4][3]),b(-f[3][3],f[4][1])),f[2][4]))),f[1][0]),k(M(k(M(b(f[3][3],f[4][4]),b(-f[3][4],f[4][3])),f[2][0]),M(k(M(b(f[3][0],f[4][4]),b(-f[3][4],f[4][0])),-f[2][3]),k(M(b(f[3][0],f[4][3]),b(-f[3][3],f[4][0])),f[2][4]))),-f[1][1])),M(k(M(k(M(b(f[3][1],f[4][4]),b(-f[3][4],f[4][1])),f[2][0]),M(k(M(b(f[3][0],f[4][4]),b(-f[3][4],f[4][0])),-f[2][1]),k(M(b(f[3][0],f[4][1]),b(-f[3][1],f[4][0])),f[2][4]))),f[1][3]),k(M(k(M(b(f[3][1],f[4][3]),b(-f[3][3],f[4][1])),f[2][0]),M(k(M(b(f[3][0],f[4][3]),b(-f[3][3],f[4][0])),-f[2][1]),k(M(b(f[3][0],f[4][1]),b(-f[3][1],f[4][0])),f[2][3]))),-f[1][4]))),f[0][2]),M(k(M(M(k(M(k(M(b(f[3][2],f[4][4]),b(-f[3][4],f[4][2])),f[2][1]),M(k(M(b(f[3][1],f[4][4]),b(-f[3][4],f[4][1])),-f[2][2]),k(M(b(f[3][1],f[4][2]),b(-f[3][2],f[4][1])),f[2][4]))),f[1][0]),k(M(k(M(b(f[3][2],f[4][4]),b(-f[3][4],f[4][2])),f[2][0]),M(k(M(b(f[3][0],f[4][4]),b(-f[3][4],f[4][0])),-f[2][2]),k(M(b(f[3][0],f[4][2]),b(-f[3][2],f[4][0])),f[2][4]))),-f[1][1])),M(k(M(k(M(b(f[3][1],f[4][4]),b(-f[3][4],f[4][1])),f[2][0]),M(k(M(b(f[3][0],f[4][4]),b(-f[3][4],f[4][0])),-f[2][1]),k(M(b(f[3][0],f[4][1]),b(-f[3][1],f[4][0])),f[2][4]))),f[1][2]),k(M(k(M(b(f[3][1],f[4][2]),b(-f[3][2],f[4][1])),f[2][0]),M(k(M(b(f[3][0],f[4][2]),b(-f[3][2],f[4][0])),-f[2][1]),k(M(b(f[3][0],f[4][1]),b(-f[3][1],f[4][0])),f[2][2]))),-f[1][4]))),-f[0][3]),k(M(M(k(M(k(M(b(f[3][2],f[4][3]),b(-f[3][3],f[4][2])),f[2][1]),M(k(M(b(f[3][1],f[4][3]),b(-f[3][3],f[4][1])),-f[2][2]),k(M(b(f[3][1],f[4][2]),b(-f[3][2],f[4][1])),f[2][3]))),f[1][0]),k(M(k(M(b(f[3][2],f[4][3]),b(-f[3][3],f[4][2])),f[2][0]),M(k(M(b(f[3][0],f[4][3]),b(-f[3][3],f[4][0])),-f[2][2]),k(M(b(f[3][0],f[4][2]),b(-f[3][2],f[4][0])),f[2][3]))),-f[1][1])),M(k(M(k(M(b(f[3][1],f[4][3]),b(-f[3][3],f[4][1])),f[2][0]),M(k(M(b(f[3][0],f[4][3]),b(-f[3][3],f[4][0])),-f[2][1]),k(M(b(f[3][0],f[4][1]),b(-f[3][1],f[4][0])),f[2][3]))),f[1][2]),k(M(k(M(b(f[3][1],f[4][2]),b(-f[3][2],f[4][1])),f[2][0]),M(k(M(b(f[3][0],f[4][2]),b(-f[3][2],f[4][0])),-f[2][1]),k(M(b(f[3][0],f[4][1]),b(-f[3][1],f[4][0])),f[2][2]))),-f[1][3]))),f[0][4])))))}}function E(M){var k=M===2?d:M===3?h:M===4?g:M===5?m:void 0;return k(i,s,l,o)}var c=[function(){return[0]},function(k){return[k[0][0]]}];function _(M,k,b,A,y,f,p,x){return function(D){switch(D.length){case 0:return M(D);case 1:return k(D);case 2:return b(D);case 3:return A(D);case 4:return y(D);case 5:return f(D)}var B=p[D.length];return B||(B=p[D.length]=x(D.length)),B(D)}}function T(){for(;c.length<u;)c.push(E(c.length));t.exports=_.apply(void 0,c.concat([c,E]));for(var M=0;M<c.length;++M)t.exports[M]=c[M]}T()}),2992:(function(t,r,a){var l=a(3387).sprintf,i=a(5171),s=a(1848),o=a(1085);t.exports=u;function u(d,h,g){var m=s(h)||"of unknown name (see npm glsl-shader-name)",E="unknown type";g!==void 0&&(E=g===i.FRAGMENT_SHADER?"fragment":"vertex");for(var c=l(`Error compiling %s shader %s:
`,E,m),_=l("%s%s",c,d),T=d.split(`
`),M={},k=0;k<T.length;k++){var b=T[k];if(!(b===""||b==="\0")){var A=parseInt(b.split(":")[2]);if(isNaN(A))throw new Error(l("Could not parse error: %s",b));M[A]=b}}for(var y=o(h).split(`
`),k=0;k<y.length;k++)if(!(!M[k+3]&&!M[k+2]&&!M[k+1])){var f=y[k];if(c+=f+`
`,M[k+1]){var p=M[k+1];p=p.substr(p.split(":",3).join(":").length+1).trim(),c+=l(`^^^ %s

`,p)}}return{long:c.trim(),short:_.trim()}}}),3012:(function(t,r,a){var l=a(5250),i=a(9362);t.exports=s;function s(o,u){var d=o.length;if(d===1){var h=l(o[0],u);return h[0]?h:[h[1]]}var g=new Array(2*d),m=[.1,.1],E=[.1,.1],c=0;l(o[0],u,m),m[0]&&(g[c++]=m[0]);for(var _=1;_<d;++_){l(o[_],u,E);var T=m[1];i(T,E[0],m),m[0]&&(g[c++]=m[0]);var M=E[1],k=m[1],b=M+k,A=b-M,y=k-A;m[1]=b,y&&(g[c++]=y)}return m[1]&&(g[c++]=m[1]),c===0&&(g[c++]=0),g.length=c,g}}),3025:(function(t,r,a){t.exports=a.g.performance&&a.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}}),3066:(function(t){t.exports=r;function r(a){var l=a[0],i=a[1],s=a[2];return l*l+i*i+s*s}}),3088:(function(t,r,a){t.exports=i;var l=a(3140);function i(s,o){for(var u=o.length|0,d=s.length,h=[new Array(u),new Array(u)],g=0;g<u;++g)h[0][g]=[],h[1][g]=[];for(var g=0;g<d;++g){var m=s[g];h[0][m[0]].push(m),h[1][m[1]].push(m)}for(var E=[],g=0;g<u;++g)h[0][g].length+h[1][g].length===0&&E.push([g]);function c(y,f){var p=h[f][y[f]];p.splice(p.indexOf(y),1)}function _(y,f,p){for(var x,N,D,B=0;B<2;++B)if(h[B][f].length>0){x=h[B][f][0],D=B;break}N=x[D^1];for(var U=0;U<2;++U)for(var V=h[U][f],q=0;q<V.length;++q){var z=V[q],H=z[U^1],G=l(o[y],o[f],o[N],o[H]);G>0&&(x=z,N=H,D=U)}return p||x&&c(x,D),N}function T(y,f){var p=h[f][y][0],x=[y];c(p,f);for(var N=p[f^1];;){for(;N!==y;)x.push(N),N=_(x[x.length-2],N,!1);if(h[0][y].length+h[1][y].length===0)break;var D=x[x.length-1],B=y,U=x[1],V=_(D,B,!0);if(l(o[D],o[B],o[U],o[V])<0)break;x.push(y),N=_(D,B)}return x}function M(y,f){return f[1]===f[f.length-1]}for(var g=0;g<u;++g)for(var k=0;k<2;++k){for(var b=[];h[k][g].length>0;){h[0][g].length;var A=T(g,k);M(b,A)?b.push.apply(b,A):(b.length>0&&E.push(b),b=A)}b.length>0&&E.push(b)}return E}}),3090:(function(t,r,a){t.exports=i;var l=a(3250)[3];function i(s){var o=s.length;if(o<3){for(var _=new Array(o),u=0;u<o;++u)_[u]=u;return o===2&&s[0][0]===s[1][0]&&s[0][1]===s[1][1]?[0]:_}for(var d=new Array(o),u=0;u<o;++u)d[u]=u;d.sort(function(b,A){var y=s[b][0]-s[A][0];return y||s[b][1]-s[A][1]});for(var h=[d[0],d[1]],g=[d[0],d[1]],u=2;u<o;++u){for(var m=d[u],E=s[m],c=h.length;c>1&&l(s[h[c-2]],s[h[c-1]],E)<=0;)c-=1,h.pop();for(h.push(m),c=g.length;c>1&&l(s[g[c-2]],s[g[c-1]],E)>=0;)c-=1,g.pop();g.push(m)}for(var _=new Array(g.length+h.length-2),T=0,u=0,M=h.length;u<M;++u)_[T++]=h[u];for(var k=g.length-2;k>0;--k)_[T++]=g[k];return _}}),3105:(function(t,r){"use restrict";var a=32;r.INT_BITS=a,r.INT_MAX=2147483647,r.INT_MIN=-1<<a-1,r.sign=function(s){return(s>0)-(s<0)},r.abs=function(s){var o=s>>a-1;return(s^o)-o},r.min=function(s,o){return o^(s^o)&-(s<o)},r.max=function(s,o){return s^(s^o)&-(s<o)},r.isPow2=function(s){return!(s&s-1)&&!!s},r.log2=function(s){var o,u;return o=(s>65535)<<4,s>>>=o,u=(s>255)<<3,s>>>=u,o|=u,u=(s>15)<<2,s>>>=u,o|=u,u=(s>3)<<1,s>>>=u,o|=u,o|s>>1},r.log10=function(s){return s>=1e9?9:s>=1e8?8:s>=1e7?7:s>=1e6?6:s>=1e5?5:s>=1e4?4:s>=1e3?3:s>=100?2:s>=10?1:0},r.popCount=function(s){return s=s-(s>>>1&1431655765),s=(s&858993459)+(s>>>2&858993459),(s+(s>>>4)&252645135)*16843009>>>24};function l(s){var o=32;return s&=-s,s&&o--,s&65535&&(o-=16),s&16711935&&(o-=8),s&252645135&&(o-=4),s&858993459&&(o-=2),s&1431655765&&(o-=1),o}r.countTrailingZeros=l,r.nextPow2=function(s){return s+=s===0,--s,s|=s>>>1,s|=s>>>2,s|=s>>>4,s|=s>>>8,s|=s>>>16,s+1},r.prevPow2=function(s){return s|=s>>>1,s|=s>>>2,s|=s>>>4,s|=s>>>8,s|=s>>>16,s-(s>>>1)},r.parity=function(s){return s^=s>>>16,s^=s>>>8,s^=s>>>4,s&=15,27030>>>s&1};var i=new Array(256);(function(s){for(var o=0;o<256;++o){var u=o,d=o,h=7;for(u>>>=1;u;u>>>=1)d<<=1,d|=u&1,--h;s[o]=d<<h&255}})(i),r.reverse=function(s){return i[s&255]<<24|i[s>>>8&255]<<16|i[s>>>16&255]<<8|i[s>>>24&255]},r.interleave2=function(s,o){return s&=65535,s=(s|s<<8)&16711935,s=(s|s<<4)&252645135,s=(s|s<<2)&858993459,s=(s|s<<1)&1431655765,o&=65535,o=(o|o<<8)&16711935,o=(o|o<<4)&252645135,o=(o|o<<2)&858993459,o=(o|o<<1)&1431655765,s|o<<1},r.deinterleave2=function(s,o){return s=s>>>o&1431655765,s=(s|s>>>1)&858993459,s=(s|s>>>2)&252645135,s=(s|s>>>4)&16711935,s=(s|s>>>16)&65535,s<<16>>16},r.interleave3=function(s,o,u){return s&=1023,s=(s|s<<16)&4278190335,s=(s|s<<8)&251719695,s=(s|s<<4)&3272356035,s=(s|s<<2)&1227133513,o&=1023,o=(o|o<<16)&4278190335,o=(o|o<<8)&251719695,o=(o|o<<4)&3272356035,o=(o|o<<2)&1227133513,s|=o<<1,u&=1023,u=(u|u<<16)&4278190335,u=(u|u<<8)&251719695,u=(u|u<<4)&3272356035,u=(u|u<<2)&1227133513,s|u<<2},r.deinterleave3=function(s,o){return s=s>>>o&1227133513,s=(s|s>>>2)&3272356035,s=(s|s>>>4)&251719695,s=(s|s>>>8)&4278190335,s=(s|s>>>16)&1023,s<<22>>22},r.nextCombination=function(s){var o=s|s-1;return o+1|(~o&-~o)-1>>>l(s)+1}}),3126:(function(t){t.exports=r;function r(a){var l=new Float32Array(3);return l[0]=a[0],l[1]=a[1],l[2]=a[2],l}}),3134:(function(t,r,a){t.exports=i;var l=a(1682);function i(s,o){var u=s.length;if(typeof o!="number"){o=0;for(var d=0;d<u;++d){var h=s[d];o=Math.max(o,h[0],h[1])}o=(o|0)+1}o=o|0;for(var g=new Array(o),d=0;d<o;++d)g[d]=[];for(var d=0;d<u;++d){var h=s[d];g[h[0]].push(h[1]),g[h[1]].push(h[0])}for(var m=0;m<o;++m)l(g[m],function(E,c){return E-c});return g}}),3140:(function(t,r,a){t.exports=h;var l=a(3250),i=a(8572),s=a(9362),o=a(5382),u=a(8210);function d(g,m,E){var c=s(g[0],-m[0]),_=s(g[1],-m[1]),T=s(E[0],-m[0]),M=s(E[1],-m[1]),k=u(o(c,T),o(_,M));return k[k.length-1]>=0}function h(g,m,E,c){var _=l(m,E,c);if(_===0){var T=i(l(g,m,E)),M=i(l(g,m,c));if(T===M){if(T===0){var k=d(g,m,E),b=d(g,m,c);return k===b?0:k?1:-1}return 0}else{if(M===0)return T>0||d(g,m,c)?-1:1;if(T===0)return M>0||d(g,m,E)?1:-1}return i(M-T)}var A=l(g,m,E);if(A>0)return _>0&&l(g,m,c)>0?1:-1;if(A<0)return _>0||l(g,m,c)>0?1:-1;var y=l(g,m,c);return y>0||d(g,m,E)?1:-1}}),3202:(function(t){t.exports=function(a,l){l||(l=[0,""]),a=String(a);var i=parseFloat(a,10);return l[0]=i,l[1]=a.match(/[\d.\-\+]*\s*(.*)/)[1]||"",l}}),3233:(function(t){var r="",a;t.exports=l;function l(i,s){if(typeof i!="string")throw new TypeError("expected a string");if(s===1)return i;if(s===2)return i+i;var o=i.length*s;if(a!==i||typeof a>"u")a=i,r="";else if(r.length>=o)return r.substr(0,o);for(;o>r.length&&s>1;)s&1&&(r+=i),s>>=1,i+=i;return r+=i,r=r.substr(0,o),r}}),3236:(function(t){t.exports=function(r){typeof r=="string"&&(r=[r]);for(var a=[].slice.call(arguments,1),l=[],i=0;i<r.length-1;i++)l.push(r[i],a[i]||"");return l.push(r[i]),l.join("")}}),3250:(function(t,r,a){var l=a(5250),i=a(8210),s=a(3012),o=a(8545),u=5,d=11102230246251565e-32,h=(3+16*d)*d,g=(7+56*d)*d;function m(f,p,x,N){return function(B,U,V){var q=f(f(p(U[1],V[0]),p(-V[1],U[0])),f(p(B[1],U[0]),p(-U[1],B[0]))),z=f(p(B[1],V[0]),p(-V[1],B[0])),H=N(q,z);return H[H.length-1]}}function E(f,p,x,N){return function(B,U,V,q){var z=f(f(x(f(p(V[1],q[0]),p(-q[1],V[0])),U[2]),f(x(f(p(U[1],q[0]),p(-q[1],U[0])),-V[2]),x(f(p(U[1],V[0]),p(-V[1],U[0])),q[2]))),f(x(f(p(U[1],q[0]),p(-q[1],U[0])),B[2]),f(x(f(p(B[1],q[0]),p(-q[1],B[0])),-U[2]),x(f(p(B[1],U[0]),p(-U[1],B[0])),q[2])))),H=f(f(x(f(p(V[1],q[0]),p(-q[1],V[0])),B[2]),f(x(f(p(B[1],q[0]),p(-q[1],B[0])),-V[2]),x(f(p(B[1],V[0]),p(-V[1],B[0])),q[2]))),f(x(f(p(U[1],V[0]),p(-V[1],U[0])),B[2]),f(x(f(p(B[1],V[0]),p(-V[1],B[0])),-U[2]),x(f(p(B[1],U[0]),p(-U[1],B[0])),V[2])))),G=N(z,H);return G[G.length-1]}}function c(f,p,x,N){return function(B,U,V,q,z){var H=f(f(f(x(f(x(f(p(q[1],z[0]),p(-z[1],q[0])),V[2]),f(x(f(p(V[1],z[0]),p(-z[1],V[0])),-q[2]),x(f(p(V[1],q[0]),p(-q[1],V[0])),z[2]))),U[3]),f(x(f(x(f(p(q[1],z[0]),p(-z[1],q[0])),U[2]),f(x(f(p(U[1],z[0]),p(-z[1],U[0])),-q[2]),x(f(p(U[1],q[0]),p(-q[1],U[0])),z[2]))),-V[3]),x(f(x(f(p(V[1],z[0]),p(-z[1],V[0])),U[2]),f(x(f(p(U[1],z[0]),p(-z[1],U[0])),-V[2]),x(f(p(U[1],V[0]),p(-V[1],U[0])),z[2]))),q[3]))),f(x(f(x(f(p(V[1],q[0]),p(-q[1],V[0])),U[2]),f(x(f(p(U[1],q[0]),p(-q[1],U[0])),-V[2]),x(f(p(U[1],V[0]),p(-V[1],U[0])),q[2]))),-z[3]),f(x(f(x(f(p(q[1],z[0]),p(-z[1],q[0])),U[2]),f(x(f(p(U[1],z[0]),p(-z[1],U[0])),-q[2]),x(f(p(U[1],q[0]),p(-q[1],U[0])),z[2]))),B[3]),x(f(x(f(p(q[1],z[0]),p(-z[1],q[0])),B[2]),f(x(f(p(B[1],z[0]),p(-z[1],B[0])),-q[2]),x(f(p(B[1],q[0]),p(-q[1],B[0])),z[2]))),-U[3])))),f(f(x(f(x(f(p(U[1],z[0]),p(-z[1],U[0])),B[2]),f(x(f(p(B[1],z[0]),p(-z[1],B[0])),-U[2]),x(f(p(B[1],U[0]),p(-U[1],B[0])),z[2]))),q[3]),f(x(f(x(f(p(U[1],q[0]),p(-q[1],U[0])),B[2]),f(x(f(p(B[1],q[0]),p(-q[1],B[0])),-U[2]),x(f(p(B[1],U[0]),p(-U[1],B[0])),q[2]))),-z[3]),x(f(x(f(p(V[1],q[0]),p(-q[1],V[0])),U[2]),f(x(f(p(U[1],q[0]),p(-q[1],U[0])),-V[2]),x(f(p(U[1],V[0]),p(-V[1],U[0])),q[2]))),B[3]))),f(x(f(x(f(p(V[1],q[0]),p(-q[1],V[0])),B[2]),f(x(f(p(B[1],q[0]),p(-q[1],B[0])),-V[2]),x(f(p(B[1],V[0]),p(-V[1],B[0])),q[2]))),-U[3]),f(x(f(x(f(p(U[1],q[0]),p(-q[1],U[0])),B[2]),f(x(f(p(B[1],q[0]),p(-q[1],B[0])),-U[2]),x(f(p(B[1],U[0]),p(-U[1],B[0])),q[2]))),V[3]),x(f(x(f(p(U[1],V[0]),p(-V[1],U[0])),B[2]),f(x(f(p(B[1],V[0]),p(-V[1],B[0])),-U[2]),x(f(p(B[1],U[0]),p(-U[1],B[0])),V[2]))),-q[3]))))),G=f(f(f(x(f(x(f(p(q[1],z[0]),p(-z[1],q[0])),V[2]),f(x(f(p(V[1],z[0]),p(-z[1],V[0])),-q[2]),x(f(p(V[1],q[0]),p(-q[1],V[0])),z[2]))),B[3]),x(f(x(f(p(q[1],z[0]),p(-z[1],q[0])),B[2]),f(x(f(p(B[1],z[0]),p(-z[1],B[0])),-q[2]),x(f(p(B[1],q[0]),p(-q[1],B[0])),z[2]))),-V[3])),f(x(f(x(f(p(V[1],z[0]),p(-z[1],V[0])),B[2]),f(x(f(p(B[1],z[0]),p(-z[1],B[0])),-V[2]),x(f(p(B[1],V[0]),p(-V[1],B[0])),z[2]))),q[3]),x(f(x(f(p(V[1],q[0]),p(-q[1],V[0])),B[2]),f(x(f(p(B[1],q[0]),p(-q[1],B[0])),-V[2]),x(f(p(B[1],V[0]),p(-V[1],B[0])),q[2]))),-z[3]))),f(f(x(f(x(f(p(V[1],z[0]),p(-z[1],V[0])),U[2]),f(x(f(p(U[1],z[0]),p(-z[1],U[0])),-V[2]),x(f(p(U[1],V[0]),p(-V[1],U[0])),z[2]))),B[3]),x(f(x(f(p(V[1],z[0]),p(-z[1],V[0])),B[2]),f(x(f(p(B[1],z[0]),p(-z[1],B[0])),-V[2]),x(f(p(B[1],V[0]),p(-V[1],B[0])),z[2]))),-U[3])),f(x(f(x(f(p(U[1],z[0]),p(-z[1],U[0])),B[2]),f(x(f(p(B[1],z[0]),p(-z[1],B[0])),-U[2]),x(f(p(B[1],U[0]),p(-U[1],B[0])),z[2]))),V[3]),x(f(x(f(p(U[1],V[0]),p(-V[1],U[0])),B[2]),f(x(f(p(B[1],V[0]),p(-V[1],B[0])),-U[2]),x(f(p(B[1],U[0]),p(-U[1],B[0])),V[2]))),-z[3])))),J=N(H,G);return J[J.length-1]}}function _(f){var p=f===3?m:f===4?E:c;return p(i,l,s,o)}var T=_(3),M=_(4),k=[function(){return 0},function(){return 0},function(p,x){return x[0]-p[0]},function(p,x,N){var D=(p[1]-N[1])*(x[0]-N[0]),B=(p[0]-N[0])*(x[1]-N[1]),U=D-B,V;if(D>0){if(B<=0)return U;V=D+B}else if(D<0){if(B>=0)return U;V=-(D+B)}else return U;var q=h*V;return U>=q||U<=-q?U:T(p,x,N)},function(p,x,N,D){var B=p[0]-D[0],U=x[0]-D[0],V=N[0]-D[0],q=p[1]-D[1],z=x[1]-D[1],H=N[1]-D[1],G=p[2]-D[2],J=x[2]-D[2],le=N[2]-D[2],ge=U*H,de=V*z,me=V*q,W=B*H,ie=B*z,se=U*q,ee=G*(ge-de)+J*(me-W)+le*(ie-se),pe=(Math.abs(ge)+Math.abs(de))*Math.abs(G)+(Math.abs(me)+Math.abs(W))*Math.abs(J)+(Math.abs(ie)+Math.abs(se))*Math.abs(le),oe=g*pe;return ee>oe||-ee>oe?ee:M(p,x,N,D)}];function b(f){var p=k[f.length];return p||(p=k[f.length]=_(f.length)),p.apply(void 0,f)}function A(f,p,x,N,D,B,U){return function(q,z,H,G,J){switch(arguments.length){case 0:case 1:return 0;case 2:return N(q,z);case 3:return D(q,z,H);case 4:return B(q,z,H,G);case 5:return U(q,z,H,G,J)}for(var le=new Array(arguments.length),ge=0;ge<arguments.length;++ge)le[ge]=arguments[ge];return f(le)}}function y(){for(;k.length<=u;)k.push(_(k.length));t.exports=A.apply(void 0,[b].concat(k));for(var f=0;f<=u;++f)t.exports[f]=k[f]}y()}),3327:(function(t,r,a){var l=a(216),i=a(8866);t.exports=u;function s(d){return function(){return d}}function o(d,h){for(var g=new Array(d),m=0;m<d;++m)g[m]=h;return g}function u(d,h,g,m){function E(A){return function(y,f,p){return y.getUniform(f.program,p[A])}}function c(A){return function(f){for(var p=_("",A),x=0;x<p.length;++x){var N=p[x],D=N[0],B=N[1];if(m[B]){var U=f;if(typeof D=="string"&&(D.indexOf(".")===0||D.indexOf("[")===0)){var V=D;if(D.indexOf(".")===0&&(V=D.slice(1)),V.indexOf("]")===V.length-1){var q=V.indexOf("["),z=V.slice(0,q),H=V.slice(q+1,V.length-1);U=z?f[z][H]:f[H]}else U=f[V]}var G=g[B].type,J;switch(G){case"bool":case"int":case"sampler2D":case"samplerCube":d.uniform1i(m[B],U);break;case"float":d.uniform1f(m[B],U);break;default:var le=G.indexOf("vec");if(0<=le&&le<=1&&G.length===4+le){if(J=G.charCodeAt(G.length-1)-48,J<2||J>4)throw new i("","Invalid data type");switch(G.charAt(0)){case"b":case"i":d["uniform"+J+"iv"](m[B],U);break;case"v":d["uniform"+J+"fv"](m[B],U);break;default:throw new i("","Unrecognized data type for vector "+name+": "+G)}}else if(G.indexOf("mat")===0&&G.length===4){if(J=G.charCodeAt(G.length-1)-48,J<2||J>4)throw new i("","Invalid uniform dimension type for matrix "+name+": "+G);d["uniformMatrix"+J+"fv"](m[B],!1,U);break}else throw new i("","Unknown uniform data type for "+name+": "+G)}}}}}function _(A,y){if(typeof y!="object")return[[A,y]];var f=[];for(var p in y){var x=y[p],N=A;parseInt(p)+""===p?N+="["+p+"]":N+="."+p,typeof x=="object"?f.push.apply(f,_(N,x)):f.push([N,x])}return f}function T(A){switch(A){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":return 0;case"float":return 0;default:var y=A.indexOf("vec");if(0<=y&&y<=1&&A.length===4+y){var f=A.charCodeAt(A.length-1)-48;if(f<2||f>4)throw new i("","Invalid data type");return A.charAt(0)==="b"?o(f,!1):o(f,0)}else if(A.indexOf("mat")===0&&A.length===4){var f=A.charCodeAt(A.length-1)-48;if(f<2||f>4)throw new i("","Invalid uniform dimension type for matrix "+name+": "+A);return o(f*f,0)}else throw new i("","Unknown uniform data type for "+name+": "+A)}}function M(A,y,f){if(typeof f=="object"){var p=k(f);Object.defineProperty(A,y,{get:s(p),set:c(f),enumerable:!0,configurable:!1})}else m[f]?Object.defineProperty(A,y,{get:E(f),set:c(f),enumerable:!0,configurable:!1}):A[y]=T(g[f].type)}function k(A){var y;if(Array.isArray(A)){y=new Array(A.length);for(var f=0;f<A.length;++f)M(y,f,A[f])}else{y={};for(var p in A)M(y,p,A[p])}return y}var b=l(g,!0);return{get:s(k(b)),set:c(b),enumerable:!0,configurable:!0}}}),3349:(function(t){function r(){return function(u,d,h,g,m,E){var c=u[0],_=h[0],T=[0],M=_;g|=0;var k=0,b=_;for(k=0;k<c;++k){{var A=d[g]-E,y=d[g+M]-E;A>=0!=y>=0&&m.push(T[0]+.5+.5*(A+y)/(A-y))}g+=b,++T[0]}}}function a(){return r()}var l=a;function i(u){var d={};return function(g,m,E){var c=g.dtype,_=g.order,T=[c,_.join()].join(),M=d[T];return M||(d[T]=M=u([c,_])),M(g.shape.slice(0),g.data,g.stride,g.offset|0,m,E)}}function s(u){return i(l.bind(void 0,u))}function o(u){return s({funcName:u.funcName})}t.exports=o({funcName:"zeroCrossings"})}),3352:(function(t,r,a){var l=a(2478),i=0,s=1,o=2;t.exports=p;function u(x,N,D,B,U){this.mid=x,this.left=N,this.right=D,this.leftPoints=B,this.rightPoints=U,this.count=(N?N.count:0)+(D?D.count:0)+B.length}var d=u.prototype;function h(x,N){x.mid=N.mid,x.left=N.left,x.right=N.right,x.leftPoints=N.leftPoints,x.rightPoints=N.rightPoints,x.count=N.count}function g(x,N){var D=A(N);x.mid=D.mid,x.left=D.left,x.right=D.right,x.leftPoints=D.leftPoints,x.rightPoints=D.rightPoints,x.count=D.count}function m(x,N){var D=x.intervals([]);D.push(N),g(x,D)}function E(x,N){var D=x.intervals([]),B=D.indexOf(N);return B<0?i:(D.splice(B,1),g(x,D),s)}d.intervals=function(x){return x.push.apply(x,this.leftPoints),this.left&&this.left.intervals(x),this.right&&this.right.intervals(x),x},d.insert=function(x){var N=this.count-this.leftPoints.length;if(this.count+=1,x[1]<this.mid)this.left?4*(this.left.count+1)>3*(N+1)?m(this,x):this.left.insert(x):this.left=A([x]);else if(x[0]>this.mid)this.right?4*(this.right.count+1)>3*(N+1)?m(this,x):this.right.insert(x):this.right=A([x]);else{var D=l.ge(this.leftPoints,x,k),B=l.ge(this.rightPoints,x,b);this.leftPoints.splice(D,0,x),this.rightPoints.splice(B,0,x)}},d.remove=function(x){var N=this.count-this.leftPoints;if(x[1]<this.mid){if(!this.left)return i;var D=this.right?this.right.count:0;if(4*D>3*(N-1))return E(this,x);var B=this.left.remove(x);return B===o?(this.left=null,this.count-=1,s):(B===s&&(this.count-=1),B)}else if(x[0]>this.mid){if(!this.right)return i;var U=this.left?this.left.count:0;if(4*U>3*(N-1))return E(this,x);var B=this.right.remove(x);return B===o?(this.right=null,this.count-=1,s):(B===s&&(this.count-=1),B)}else{if(this.count===1)return this.leftPoints[0]===x?o:i;if(this.leftPoints.length===1&&this.leftPoints[0]===x){if(this.left&&this.right){for(var V=this,q=this.left;q.right;)V=q,q=q.right;if(V===this)q.right=this.right;else{var z=this.left,B=this.right;V.count-=q.count,V.right=q.left,q.left=z,q.right=B}h(this,q),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?h(this,this.left):h(this,this.right);return s}for(var z=l.ge(this.leftPoints,x,k);z<this.leftPoints.length&&this.leftPoints[z][0]===x[0];++z)if(this.leftPoints[z]===x){this.count-=1,this.leftPoints.splice(z,1);for(var B=l.ge(this.rightPoints,x,b);B<this.rightPoints.length&&this.rightPoints[B][1]===x[1];++B)if(this.rightPoints[B]===x)return this.rightPoints.splice(B,1),s}return i}};function c(x,N,D){for(var B=0;B<x.length&&x[B][0]<=N;++B){var U=D(x[B]);if(U)return U}}function _(x,N,D){for(var B=x.length-1;B>=0&&x[B][1]>=N;--B){var U=D(x[B]);if(U)return U}}function T(x,N){for(var D=0;D<x.length;++D){var B=N(x[D]);if(B)return B}}d.queryPoint=function(x,N){if(x<this.mid){if(this.left){var D=this.left.queryPoint(x,N);if(D)return D}return c(this.leftPoints,x,N)}else if(x>this.mid){if(this.right){var D=this.right.queryPoint(x,N);if(D)return D}return _(this.rightPoints,x,N)}else return T(this.leftPoints,N)},d.queryInterval=function(x,N,D){if(x<this.mid&&this.left){var B=this.left.queryInterval(x,N,D);if(B)return B}if(N>this.mid&&this.right){var B=this.right.queryInterval(x,N,D);if(B)return B}return N<this.mid?c(this.leftPoints,N,D):x>this.mid?_(this.rightPoints,x,D):T(this.leftPoints,D)};function M(x,N){return x-N}function k(x,N){var D=x[0]-N[0];return D||x[1]-N[1]}function b(x,N){var D=x[1]-N[1];return D||x[0]-N[0]}function A(x){if(x.length===0)return null;for(var N=[],D=0;D<x.length;++D)N.push(x[D][0],x[D][1]);N.sort(M);for(var B=N[N.length>>1],U=[],V=[],q=[],D=0;D<x.length;++D){var z=x[D];z[1]<B?U.push(z):B<z[0]?V.push(z):q.push(z)}var H=q,G=q.slice();return H.sort(k),G.sort(b),new u(B,A(U),A(V),H,G)}function y(x){this.root=x}var f=y.prototype;f.insert=function(x){this.root?this.root.insert(x):this.root=new u(x[0],null,null,[x],[x])},f.remove=function(x){if(this.root){var N=this.root.remove(x);return N===o&&(this.root=null),N!==i}return!1},f.queryPoint=function(x,N){if(this.root)return this.root.queryPoint(x,N)},f.queryInterval=function(x,N,D){if(x<=N&&this.root)return this.root.queryInterval(x,N,D)},Object.defineProperty(f,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(f,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}});function p(x){return!x||x.length===0?new y(null):new y(A(x))}}),3387:(function(t,r,a){var l;(function(){var i={not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function s(g){return u(h(g),arguments)}function o(g,m){return s.apply(null,[g].concat(m||[]))}function u(g,m){var E=1,c=g.length,_,T="",M,k,b,A,y,f,p,x;for(M=0;M<c;M++)if(typeof g[M]=="string")T+=g[M];else if(typeof g[M]=="object"){if(b=g[M],b.keys)for(_=m[E],k=0;k<b.keys.length;k++){if(_==null)throw new Error(s('[sprintf] Cannot access property "%s" of undefined value "%s"',b.keys[k],b.keys[k-1]));_=_[b.keys[k]]}else b.param_no?_=m[b.param_no]:_=m[E++];if(i.not_type.test(b.type)&&i.not_primitive.test(b.type)&&_ instanceof Function&&(_=_()),i.numeric_arg.test(b.type)&&typeof _!="number"&&isNaN(_))throw new TypeError(s("[sprintf] expecting number but found %T",_));switch(i.number.test(b.type)&&(p=_>=0),b.type){case"b":_=parseInt(_,10).toString(2);break;case"c":_=String.fromCharCode(parseInt(_,10));break;case"d":case"i":_=parseInt(_,10);break;case"j":_=JSON.stringify(_,null,b.width?parseInt(b.width):0);break;case"e":_=b.precision?parseFloat(_).toExponential(b.precision):parseFloat(_).toExponential();break;case"f":_=b.precision?parseFloat(_).toFixed(b.precision):parseFloat(_);break;case"g":_=b.precision?String(Number(_.toPrecision(b.precision))):parseFloat(_);break;case"o":_=(parseInt(_,10)>>>0).toString(8);break;case"s":_=String(_),_=b.precision?_.substring(0,b.precision):_;break;case"t":_=String(!!_),_=b.precision?_.substring(0,b.precision):_;break;case"T":_=Object.prototype.toString.call(_).slice(8,-1).toLowerCase(),_=b.precision?_.substring(0,b.precision):_;break;case"u":_=parseInt(_,10)>>>0;break;case"v":_=_.valueOf(),_=b.precision?_.substring(0,b.precision):_;break;case"x":_=(parseInt(_,10)>>>0).toString(16);break;case"X":_=(parseInt(_,10)>>>0).toString(16).toUpperCase();break}i.json.test(b.type)?T+=_:(i.number.test(b.type)&&(!p||b.sign)?(x=p?"+":"-",_=_.toString().replace(i.sign,"")):x="",y=b.pad_char?b.pad_char==="0"?"0":b.pad_char.charAt(1):" ",f=b.width-(x+_).length,A=b.width&&f>0?y.repeat(f):"",T+=b.align?x+_+A:y==="0"?x+A+_:A+x+_)}return T}var d=Object.create(null);function h(g){if(d[g])return d[g];for(var m=g,E,c=[],_=0;m;){if((E=i.text.exec(m))!==null)c.push(E[0]);else if((E=i.modulo.exec(m))!==null)c.push("%");else if((E=i.placeholder.exec(m))!==null){if(E[2]){_|=1;var T=[],M=E[2],k=[];if((k=i.key.exec(M))!==null)for(T.push(k[1]);(M=M.substring(k[0].length))!=="";)if((k=i.key_access.exec(M))!==null)T.push(k[1]);else if((k=i.index_access.exec(M))!==null)T.push(k[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");E[2]=T}else _|=2;if(_===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");c.push({placeholder:E[0],param_no:E[1],keys:E[2],sign:E[3],pad_char:E[4],align:E[5],width:E[6],precision:E[7],type:E[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");m=m.substring(E[0].length)}return d[g]=c}r.sprintf=s,r.vsprintf=o,typeof window<"u"&&(window.sprintf=s,window.vsprintf=o,l=(function(){return{sprintf:s,vsprintf:o}}).call(r,a,r,t),l!==void 0&&(t.exports=l))})()}),3390:(function(t){t.exports=r;function r(a,l,i,s){var o=new Float32Array(4);return o[0]=a,o[1]=l,o[2]=i,o[3]=s,o}}),3436:(function(t,r,a){var l=a(3236),i=a(9405),s=l([`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;
}`]),o=l([`precision highp float;
#define GLSLIFY 1

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

uniform vec3 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;
}`]);t.exports=function(u){return i(u,s,o,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}}),3502:(function(t,r,a){t.exports=s;var l=a(5995),i=a(9127);function s(o,u){return i(l(o,u))}}),3508:(function(t,r,a){var l=a(6852);l=l.slice().filter(function(i){return!/^(gl\_|texture)/.test(i)}),t.exports=l.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])}),3536:(function(t){t.exports=r;function r(a,l){var i=l[0],s=l[1],o=l[2],u=i*i+s*s+o*o;return u>0&&(u=1/Math.sqrt(u),a[0]=l[0]*u,a[1]=l[1]*u,a[2]=l[2]*u),a}}),3545:(function(t,r,a){t.exports=u;var l=a(8105),i=l("lo<p0"),s=8;function o(d,h,g,m,E,c){for(var _=2*d,T=_*(g+1)+h,M=g+1;M<m;++M,T+=_)for(var k=E[T],b=M,A=_*(M-1);b>g&&E[A+h]>k;--b,A-=_){for(var y=A,f=A+_,p=0;p<_;++p,++y,++f){var x=E[y];E[y]=E[f],E[f]=x}var N=c[b];c[b]=c[b-1],c[b-1]=N}}function u(d,h,g,m,E,c){if(m<=g+1)return g;for(var _=g,T=m,M=m+g>>>1,k=2*d,b=M,A=E[k*M+h];_<T;){if(T-_<s){o(d,h,_,T,E,c),A=E[k*M+h];break}var y=T-_,f=Math.random()*y+_|0,p=E[k*f+h],x=Math.random()*y+_|0,N=E[k*x+h],D=Math.random()*y+_|0,B=E[k*D+h];p<=N?B>=N?(b=x,A=N):p>=B?(b=f,A=p):(b=D,A=B):N>=B?(b=x,A=N):B>=p?(b=f,A=p):(b=D,A=B);for(var q=k*(T-1),z=k*b,U=0;U<k;++U,++q,++z){var V=E[q];E[q]=E[z],E[z]=V}var H=c[T-1];c[T-1]=c[b],c[b]=H,b=i(d,h,_,T-1,E,c,A);for(var q=k*(T-1),z=k*b,U=0;U<k;++U,++q,++z){var V=E[q];E[q]=E[z],E[z]=V}var H=c[T-1];if(c[T-1]=c[b],c[b]=H,M<b){for(T=b-1;_<T&&E[k*(T-1)+h]===A;)T-=1;T+=1}else if(b<M)for(_=b+1;_<T&&E[k*_+h]===A;)_+=1;else break}return i(d,h,g,M,E,c,E[k*M+h])}}),3576:(function(t){t.exports=r;function r(a,l,i){return a[0]=l[0]*i[0],a[1]=l[1]*i[1],a[2]=l[2]*i[2],a[3]=l[3]*i[3],a}}),3589:(function(t,r,a){t.exports=m;var l=a(2260),i=a(1888),s=a(9618),o=a(8828).nextPow2,u=function(E,c,_){for(var T=1e8,M=-1,k=-1,b=E.shape[0],A=E.shape[1],y=0;y<b;y++)for(var f=0;f<A;f++){var p=E.get(y,f,0),x=E.get(y,f,1),N=E.get(y,f,2),D=E.get(y,f,3);if(p<255||x<255||N<255||D<255){var B=c-y,U=_-f,V=B*B+U*U;V<T&&(T=V,M=y,k=f)}}return[M,k,T]};function d(E,c,_,T,M){this.coord=[E,c],this.id=_,this.value=T,this.distance=M}function h(E,c,_){this.gl=E,this.fbo=c,this.buffer=_,this._readTimeout=null;var T=this;this._readCallback=function(){T.gl&&(c.bind(),E.readPixels(0,0,c.shape[0],c.shape[1],E.RGBA,E.UNSIGNED_BYTE,T.buffer),T._readTimeout=null)}}var g=h.prototype;Object.defineProperty(g,"shape",{get:function(){return this.gl?this.fbo.shape.slice():[0,0]},set:function(E){if(this.gl){this.fbo.shape=E;var c=this.fbo.shape[0],_=this.fbo.shape[1];if(_*c*4>this.buffer.length){i.free(this.buffer);for(var T=this.buffer=i.mallocUint8(o(_*c*4)),M=0;M<_*c*4;++M)T[M]=255}return E}}}),g.begin=function(){var E=this.gl;this.shape,E&&(this.fbo.bind(),E.clearColor(1,1,1,1),E.clear(E.COLOR_BUFFER_BIT|E.DEPTH_BUFFER_BIT))},g.end=function(){var E=this.gl;E&&(E.bindFramebuffer(E.FRAMEBUFFER,null),this._readTimeout||clearTimeout(this._readTimeout),this._readTimeout=setTimeout(this._readCallback,1))},g.query=function(E,c,_){if(!this.gl)return null;var T=this.fbo.shape.slice();E=E|0,c=c|0,typeof _!="number"&&(_=1);var M=Math.min(Math.max(E-_,0),T[0])|0,k=Math.min(Math.max(E+_,0),T[0])|0,b=Math.min(Math.max(c-_,0),T[1])|0,A=Math.min(Math.max(c+_,0),T[1])|0;if(k<=M||A<=b)return null;var y=[k-M,A-b],f=s(this.buffer,[y[0],y[1],4],[4,T[0]*4,1],4*(M+T[0]*b)),p=u(f.hi(y[0],y[1],1),_,_),x=p[0],N=p[1];if(x<0||Math.pow(this.radius,2)<p[2])return null;var D=f.get(x,N,0),B=f.get(x,N,1),U=f.get(x,N,2),V=f.get(x,N,3);return new d(x+M|0,N+b|0,D,[B,U,V],Math.sqrt(p[2]))},g.dispose=function(){this.gl&&(this.fbo.dispose(),i.free(this.buffer),this.gl=null,this._readTimeout&&clearTimeout(this._readTimeout))};function m(E,c){var _=c[0],T=c[1],M={},k=l(E,_,T,M),b=i.mallocUint8(_*T*4);return new h(E,k,b)}}),3628:(function(t,r,a){var l=a(1338),i=a(727);function s(d,h){for(var g=0,m=d.length,E=0;E<m;++E)g+=d[E]*h[E];return g}function o(d){var h=d.length;if(h===0)return[];d[0].length;var g=l([d.length+1,d.length+1],1),m=l([d.length+1],1);g[h][h]=0;for(var E=0;E<h;++E){for(var c=0;c<=E;++c)g[c][E]=g[E][c]=2*s(d[E],d[c]);m[E]=s(d[E],d[E])}for(var _=i(g,m),T=0,M=_[h+1],E=0;E<M.length;++E)T+=M[E];for(var k=new Array(h),E=0;E<h;++E){for(var M=_[E],b=0,c=0;c<M.length;++c)b+=M[c];k[E]=b/T}return k}function u(d){if(d.length===0)return[];for(var h=d[0].length,g=l([h]),m=o(d),E=0;E<d.length;++E)for(var c=0;c<h;++c)g[c]+=d[E][c]*m[E];return g}u.barycenetric=o,t.exports=u}),3637:(function(t,r,a){t.exports=m;var l=a(6504),i=a(8697),s=a(5572),o=a(7721),u=a(544),d=a(2653),h=a(8987);function g(E,c){return s(l(E[0],c[1]),l(E[1],c[0]))}function m(E,c,_,T){var M=u(c,E),k=u(T,_),b=g(M,k);if(o(b)===0)return null;var A=u(E,_),y=g(k,A),f=i(y,b),p=h(M,f),x=d(E,p);return x}}),3642:(function(t){t.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]}]}}),3711:(function(t,r,a){t.exports=h;var l=a(2640),i=a(781),s={"2d":function(g,m,E){var c=g({order:m,scalarArguments:3,getters:E==="generic"?[0]:void 0,phase:function(T,M,k,b){return T>b|0},vertex:function(T,M,k,b,A,y,f,p,x,N,D,B,U){var V=(f<<0)+(p<<1)+(x<<2)+(N<<3)|0;if(!(V===0||V===15))switch(V){case 0:D.push([T-.5,M-.5]);break;case 1:D.push([T-.25-.25*(b+k-2*U)/(k-b),M-.25-.25*(A+k-2*U)/(k-A)]);break;case 2:D.push([T-.75-.25*(-b-k+2*U)/(b-k),M-.25-.25*(y+b-2*U)/(b-y)]);break;case 3:D.push([T-.5,M-.5-.5*(A+k+y+b-4*U)/(k-A+b-y)]);break;case 4:D.push([T-.25-.25*(y+A-2*U)/(A-y),M-.75-.25*(-A-k+2*U)/(A-k)]);break;case 5:D.push([T-.5-.5*(b+k+y+A-4*U)/(k-b+A-y),M-.5]);break;case 6:D.push([T-.5-.25*(-b-k+y+A)/(b-k+A-y),M-.5-.25*(-A-k+y+b)/(A-k+b-y)]);break;case 7:D.push([T-.75-.25*(y+A-2*U)/(A-y),M-.75-.25*(y+b-2*U)/(b-y)]);break;case 8:D.push([T-.75-.25*(-y-A+2*U)/(y-A),M-.75-.25*(-y-b+2*U)/(y-b)]);break;case 9:D.push([T-.5-.25*(b+k+-y-A)/(k-b+y-A),M-.5-.25*(A+k+-y-b)/(k-A+y-b)]);break;case 10:D.push([T-.5-.5*(-b-k+-y-A+4*U)/(b-k+y-A),M-.5]);break;case 11:D.push([T-.25-.25*(-y-A+2*U)/(y-A),M-.75-.25*(A+k-2*U)/(k-A)]);break;case 12:D.push([T-.5,M-.5-.5*(-A-k+-y-b+4*U)/(A-k+y-b)]);break;case 13:D.push([T-.75-.25*(b+k-2*U)/(k-b),M-.25-.25*(-y-b+2*U)/(y-b)]);break;case 14:D.push([T-.25-.25*(-b-k+2*U)/(b-k),M-.25-.25*(-A-k+2*U)/(A-k)]);break;case 15:D.push([T-.5,M-.5]);break}},cell:function(T,M,k,b,A,y,f,p,x){A?p.push([T,M]):p.push([M,T])}});return function(_,T){var M=[],k=[];return c(_,M,k,T),{positions:M,cells:k}}}};function o(g,m){var E=g.length+"d",c=s[E];if(c)return c(l,g,m)}function u(g,m){for(var E=i(g,m),c=E.length,_=new Array(c),T=new Array(c),M=0;M<c;++M)_[M]=[E[M]],T[M]=[M];return{positions:_,cells:T}}var d={};function h(g,_){if(g.dimension<=0)return{positions:[],cells:[]};if(g.dimension===1)return u(g,_);var E=g.order.join()+"-"+g.dtype,c=d[E],_=+_||0;return c||(c=d[E]=o(g.order,g.dtype)),c(g,_)}}),3750:(function(t){t.exports=r;function r(a,l){return a[0]*l[0]+a[1]*l[1]+a[2]*l[2]+a[3]*l[3]}}),3778:(function(t,r){r.read=function(a,l,i,s,o){var u,d,h=o*8-s-1,g=(1<<h)-1,m=g>>1,E=-7,c=i?o-1:0,_=i?-1:1,T=a[l+c];for(c+=_,u=T&(1<<-E)-1,T>>=-E,E+=h;E>0;u=u*256+a[l+c],c+=_,E-=8);for(d=u&(1<<-E)-1,u>>=-E,E+=s;E>0;d=d*256+a[l+c],c+=_,E-=8);if(u===0)u=1-m;else{if(u===g)return d?NaN:(T?-1:1)*(1/0);d=d+Math.pow(2,s),u=u-m}return(T?-1:1)*d*Math.pow(2,u-s)},r.write=function(a,l,i,s,o,u){var d,h,g,m=u*8-o-1,E=(1<<m)-1,c=E>>1,_=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,T=s?0:u-1,M=s?1:-1,k=l<0||l===0&&1/l<0?1:0;for(l=Math.abs(l),isNaN(l)||l===1/0?(h=isNaN(l)?1:0,d=E):(d=Math.floor(Math.log(l)/Math.LN2),l*(g=Math.pow(2,-d))<1&&(d--,g*=2),d+c>=1?l+=_/g:l+=_*Math.pow(2,1-c),l*g>=2&&(d++,g/=2),d+c>=E?(h=0,d=E):d+c>=1?(h=(l*g-1)*Math.pow(2,o),d=d+c):(h=l*Math.pow(2,c-1)*Math.pow(2,o),d=0));o>=8;a[i+T]=h&255,T+=M,h/=256,o-=8);for(d=d<<o|h,m+=o;m>0;a[i+T]=d&255,T+=M,d/=256,m-=8);a[i+T-M]|=k*128}}),3788:(function(t,r,a){var l=a(8507),i=a(2419);t.exports=s;function s(o,u){return l(o,u)||i(o)-i(u)}}),3837:(function(t,r,a){t.exports=D;var l=a(4935),i=a(501),s=a(5304),o=a(6429),u=a(6444),d=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),h=ArrayBuffer,g=DataView;function m(B){return h.isView(B)&&!(B instanceof g)}function E(B){return Array.isArray(B)||m(B)}function c(B,U){return B[0]=U[0],B[1]=U[1],B[2]=U[2],B}function _(B){this.gl=B,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickFontStyle=["normal","normal","normal"],this.tickFontWeight=["normal","normal","normal"],this.tickFontVariant=["normal","normal","normal"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickAlign=["auto","auto","auto"],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["sans-serif","sans-serif","sans-serif"],this.labelFontStyle=["normal","normal","normal"],this.labelFontWeight=["normal","normal","normal"],this.labelFontVariant=["normal","normal","normal"],this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelAlign=["auto","auto","auto"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=s(B)}var T=_.prototype;T.update=function(B){B=B||{};function U(ee,pe,oe){if(oe in B){var Y=B[oe],ce=this[oe],ue;(ee?E(Y)&&E(Y[0]):E(Y))?this[oe]=ue=[pe(Y[0]),pe(Y[1]),pe(Y[2])]:this[oe]=ue=[pe(Y),pe(Y),pe(Y)];for(var _e=0;_e<3;++_e)if(ue[_e]!==ce[_e])return!0}return!1}var V=U.bind(this,!1,Number),q=U.bind(this,!1,Boolean),z=U.bind(this,!1,String),H=U.bind(this,!0,function(ee){if(E(ee)){if(ee.length===3)return[+ee[0],+ee[1],+ee[2],1];if(ee.length===4)return[+ee[0],+ee[1],+ee[2],+ee[3]]}return[0,0,0,1]}),G,J=!1,le=!1;if("bounds"in B)for(var ge=B.bounds,de=0;de<2;++de)for(var me=0;me<3;++me)ge[de][me]!==this.bounds[de][me]&&(le=!0),this.bounds[de][me]=ge[de][me];if("ticks"in B){G=B.ticks,J=!0,this.autoTicks=!1;for(var de=0;de<3;++de)this.tickSpacing[de]=0}else V("tickSpacing")&&(this.autoTicks=!0,le=!0);if(this._firstInit&&("ticks"in B||"tickSpacing"in B||(this.autoTicks=!0),le=!0,J=!0,this._firstInit=!1),le&&this.autoTicks&&(G=u.create(this.bounds,this.tickSpacing),J=!0),J){for(var de=0;de<3;++de)G[de].sort(function(pe,oe){return pe.x-oe.x});u.equal(G,this.ticks)?J=!1:this.ticks=G}q("tickEnable"),z("tickFont")&&(J=!0),z("tickFontStyle")&&(J=!0),z("tickFontWeight")&&(J=!0),z("tickFontVariant")&&(J=!0),V("tickSize"),V("tickAngle"),V("tickPad"),H("tickColor");var W=z("labels");z("labelFont")&&(W=!0),z("labelFontStyle")&&(W=!0),z("labelFontWeight")&&(W=!0),z("labelFontVariant")&&(W=!0),q("labelEnable"),V("labelSize"),V("labelPad"),H("labelColor"),q("lineEnable"),q("lineMirror"),V("lineWidth"),H("lineColor"),q("lineTickEnable"),q("lineTickMirror"),V("lineTickLength"),V("lineTickWidth"),H("lineTickColor"),q("gridEnable"),V("gridWidth"),H("gridColor"),q("zeroEnable"),H("zeroLineColor"),V("zeroLineWidth"),q("backgroundEnable"),H("backgroundColor");var ie=[{family:this.labelFont[0],style:this.labelFontStyle[0],weight:this.labelFontWeight[0],variant:this.labelFontVariant[0]},{family:this.labelFont[1],style:this.labelFontStyle[1],weight:this.labelFontWeight[1],variant:this.labelFontVariant[1]},{family:this.labelFont[2],style:this.labelFontStyle[2],weight:this.labelFontWeight[2],variant:this.labelFontVariant[2]}],se=[{family:this.tickFont[0],style:this.tickFontStyle[0],weight:this.tickFontWeight[0],variant:this.tickFontVariant[0]},{family:this.tickFont[1],style:this.tickFontStyle[1],weight:this.tickFontWeight[1],variant:this.tickFontVariant[1]},{family:this.tickFont[2],style:this.tickFontStyle[2],weight:this.tickFontWeight[2],variant:this.tickFontVariant[2]}];this._text?this._text&&(W||J)&&this._text.update(this.bounds,this.labels,ie,this.ticks,se):this._text=l(this.gl,this.bounds,this.labels,ie,this.ticks,se),this._lines&&J&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=i(this.gl,this.bounds,this.ticks))};function M(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}var k=[new M,new M,new M];function b(B,U,V,q,z){for(var H=B.primalOffset,G=B.primalMinor,J=B.mirrorOffset,le=B.mirrorMinor,ge=q[U],de=0;de<3;++de)if(U!==de){var me=H,W=J,ie=G,se=le;ge&1<<de&&(me=J,W=H,ie=le,se=G),me[de]=V[0][de],W[de]=V[1][de],z[de]>0?(ie[de]=-1,se[de]=0):(ie[de]=0,se[de]=1)}}var A=[0,0,0],y={model:d,view:d,projection:d,_ortho:!1};T.isOpaque=function(){return!0},T.isTransparent=function(){return!1},T.drawTransparent=function(B){};var f=0,p=[0,0,0],x=[0,0,0],N=[0,0,0];T.draw=function(B){B=B||y;for(var oe=this.gl,U=B.model||d,V=B.view||d,q=B.projection||d,z=this.bounds,H=B._ortho||!1,G=o(U,V,q,z,H),J=G.cubeEdges,le=G.axis,ge=V[12],de=V[13],me=V[14],W=V[15],ie=H?2:1,se=ie*this.pixelRatio*(q[3]*ge+q[7]*de+q[11]*me+q[15]*W)/oe.drawingBufferHeight,ee=0;ee<3;++ee)this.lastCubeProps.cubeEdges[ee]=J[ee],this.lastCubeProps.axis[ee]=le[ee];for(var pe=k,ee=0;ee<3;++ee)b(k[ee],ee,this.bounds,J,le);for(var oe=this.gl,Y=A,ee=0;ee<3;++ee)this.backgroundEnable[ee]?Y[ee]=le[ee]:Y[ee]=0;this._background.draw(U,V,q,z,Y,this.backgroundColor),this._lines.bind(U,V,q,this);for(var ee=0;ee<3;++ee){var ce=[0,0,0];le[ee]>0?ce[ee]=z[1][ee]:ce[ee]=z[0][ee];for(var ue=0;ue<2;++ue){var _e=(ee+1+ue)%3,Le=(ee+1+(ue^1))%3;this.gridEnable[_e]&&this._lines.drawGrid(_e,Le,this.bounds,ce,this.gridColor[_e],this.gridWidth[_e]*this.pixelRatio)}for(var ue=0;ue<2;++ue){var _e=(ee+1+ue)%3,Le=(ee+1+(ue^1))%3;this.zeroEnable[Le]&&Math.min(z[0][Le],z[1][Le])<=0&&Math.max(z[0][Le],z[1][Le])>=0&&this._lines.drawZero(_e,Le,this.bounds,ce,this.zeroLineColor[Le],this.zeroLineWidth[Le]*this.pixelRatio)}}for(var ee=0;ee<3;++ee){this.lineEnable[ee]&&this._lines.drawAxisLine(ee,this.bounds,pe[ee].primalOffset,this.lineColor[ee],this.lineWidth[ee]*this.pixelRatio),this.lineMirror[ee]&&this._lines.drawAxisLine(ee,this.bounds,pe[ee].mirrorOffset,this.lineColor[ee],this.lineWidth[ee]*this.pixelRatio);for(var ze=c(p,pe[ee].primalMinor),Xe=c(x,pe[ee].mirrorMinor),Ve=this.lineTickLength,ue=0;ue<3;++ue){var rt=se/U[5*ue];ze[ue]*=Ve[ue]*rt,Xe[ue]*=Ve[ue]*rt}this.lineTickEnable[ee]&&this._lines.drawAxisTicks(ee,pe[ee].primalOffset,ze,this.lineTickColor[ee],this.lineTickWidth[ee]*this.pixelRatio),this.lineTickMirror[ee]&&this._lines.drawAxisTicks(ee,pe[ee].mirrorOffset,Xe,this.lineTickColor[ee],this.lineTickWidth[ee]*this.pixelRatio)}this._lines.unbind(),this._text.bind(U,V,q,this.pixelRatio);var mt,_t=.5,vt,ut;function Fe(ht){ut=[0,0,0],ut[ht]=1}function Pe(ht,Yt,$t){var fr=(ht+1)%3,mr=(ht+2)%3,Ur=Yt[fr],jr=Yt[mr],fn=$t[fr],Br=$t[mr];if(Ur>0&&Br>0){Fe(fr);return}else if(Ur>0&&Br<0){Fe(fr);return}else if(Ur<0&&Br>0){Fe(fr);return}else if(Ur<0&&Br<0){Fe(fr);return}else if(jr>0&&fn>0){Fe(mr);return}else if(jr>0&&fn<0){Fe(mr);return}else if(jr<0&&fn>0){Fe(mr);return}else if(jr<0&&fn<0){Fe(mr);return}}for(var ee=0;ee<3;++ee){for(var be=pe[ee].primalMinor,Ye=pe[ee].mirrorMinor,yt=c(N,pe[ee].primalOffset),ue=0;ue<3;++ue)this.lineTickEnable[ee]&&(yt[ue]+=se*be[ue]*Math.max(this.lineTickLength[ue],0)/U[5*ue]);var wt=[0,0,0];if(wt[ee]=1,this.tickEnable[ee]){this.tickAngle[ee]===-3600?(this.tickAngle[ee]=0,this.tickAlign[ee]="auto"):this.tickAlign[ee]=-1,vt=1,mt=[this.tickAlign[ee],_t,vt],mt[0]==="auto"?mt[0]=f:mt[0]=parseInt(""+mt[0]),ut=[0,0,0],Pe(ee,be,Ye);for(var ue=0;ue<3;++ue)yt[ue]+=se*be[ue]*this.tickPad[ue]/U[5*ue];this._text.drawTicks(ee,this.tickSize[ee],this.tickAngle[ee],yt,this.tickColor[ee],wt,ut,mt)}if(this.labelEnable[ee]){vt=0,ut=[0,0,0],this.labels[ee].length>4&&(Fe(ee),vt=1),mt=[this.labelAlign[ee],_t,vt],mt[0]==="auto"?mt[0]=f:mt[0]=parseInt(""+mt[0]);for(var ue=0;ue<3;++ue)yt[ue]+=se*be[ue]*this.labelPad[ue]/U[5*ue];yt[ee]+=.5*(z[0][ee]+z[1][ee]),this._text.drawLabel(ee,this.labelSize[ee],this.labelAngle[ee],yt,this.labelColor[ee],[0,0,0],ut,mt)}}this._text.unbind()},T.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null};function D(B,U){var V=new _(B);return V.update(U),V}}),3840:(function(t){t.exports=k;var r=0,a=1;function l(b,A,y,f,p,x){this._color=b,this.key=A,this.value=y,this.left=f,this.right=p,this._count=x}function i(b){return new l(b._color,b.key,b.value,b.left,b.right,b._count)}function s(b,A){return new l(b,A.key,A.value,A.left,A.right,A._count)}function o(b){b._count=1+(b.left?b.left._count:0)+(b.right?b.right._count:0)}function u(b,A){this._compare=b,this.root=A}var d=u.prototype;Object.defineProperty(d,"keys",{get:function(){var b=[];return this.forEach(function(A,y){b.push(A)}),b}}),Object.defineProperty(d,"values",{get:function(){var b=[];return this.forEach(function(A,y){b.push(y)}),b}}),Object.defineProperty(d,"length",{get:function(){return this.root?this.root._count:0}}),d.insert=function(b,A){for(var y=this._compare,f=this.root,p=[],x=[];f;){var N=y(b,f.key);p.push(f),x.push(N),N<=0?f=f.left:f=f.right}p.push(new l(r,b,A,null,null,1));for(var D=p.length-2;D>=0;--D){var f=p[D];x[D]<=0?p[D]=new l(f._color,f.key,f.value,p[D+1],f.right,f._count+1):p[D]=new l(f._color,f.key,f.value,f.left,p[D+1],f._count+1)}for(var D=p.length-1;D>1;--D){var B=p[D-1],f=p[D];if(B._color===a||f._color===a)break;var U=p[D-2];if(U.left===B)if(B.left===f){var V=U.right;if(V&&V._color===r)B._color=a,U.right=s(a,V),U._color=r,D-=1;else{if(U._color=r,U.left=B.right,B._color=a,B.right=U,p[D-2]=B,p[D-1]=f,o(U),o(B),D>=3){var q=p[D-3];q.left===U?q.left=B:q.right=B}break}}else{var V=U.right;if(V&&V._color===r)B._color=a,U.right=s(a,V),U._color=r,D-=1;else{if(B.right=f.left,U._color=r,U.left=f.right,f._color=a,f.left=B,f.right=U,p[D-2]=f,p[D-1]=B,o(U),o(B),o(f),D>=3){var q=p[D-3];q.left===U?q.left=f:q.right=f}break}}else if(B.right===f){var V=U.left;if(V&&V._color===r)B._color=a,U.left=s(a,V),U._color=r,D-=1;else{if(U._color=r,U.right=B.left,B._color=a,B.left=U,p[D-2]=B,p[D-1]=f,o(U),o(B),D>=3){var q=p[D-3];q.right===U?q.right=B:q.left=B}break}}else{var V=U.left;if(V&&V._color===r)B._color=a,U.left=s(a,V),U._color=r,D-=1;else{if(B.left=f.right,U._color=r,U.right=f.left,f._color=a,f.right=B,f.left=U,p[D-2]=f,p[D-1]=B,o(U),o(B),o(f),D>=3){var q=p[D-3];q.right===U?q.right=f:q.left=f}break}}}return p[0]._color=a,new u(y,p[0])};function h(b,A){if(A.left){var y=h(b,A.left);if(y)return y}var y=b(A.key,A.value);if(y)return y;if(A.right)return h(b,A.right)}function g(b,A,y,f){var p=A(b,f.key);if(p<=0){if(f.left){var x=g(b,A,y,f.left);if(x)return x}var x=y(f.key,f.value);if(x)return x}if(f.right)return g(b,A,y,f.right)}function m(b,A,y,f,p){var x=y(b,p.key),N=y(A,p.key),D;if(x<=0&&(p.left&&(D=m(b,A,y,f,p.left),D)||N>0&&(D=f(p.key,p.value),D)))return D;if(N>0&&p.right)return m(b,A,y,f,p.right)}d.forEach=function(A,y,f){if(this.root)switch(arguments.length){case 1:return h(A,this.root);case 2:return g(y,this._compare,A,this.root);case 3:return this._compare(y,f)>=0?void 0:m(y,f,this._compare,A,this.root)}},Object.defineProperty(d,"begin",{get:function(){for(var b=[],A=this.root;A;)b.push(A),A=A.left;return new E(this,b)}}),Object.defineProperty(d,"end",{get:function(){for(var b=[],A=this.root;A;)b.push(A),A=A.right;return new E(this,b)}}),d.at=function(b){if(b<0)return new E(this,[]);for(var A=this.root,y=[];;){if(y.push(A),A.left){if(b<A.left._count){A=A.left;continue}b-=A.left._count}if(!b)return new E(this,y);if(b-=1,A.right){if(b>=A.right._count)break;A=A.right}else break}return new E(this,[])},d.ge=function(b){for(var A=this._compare,y=this.root,f=[],p=0;y;){var x=A(b,y.key);f.push(y),x<=0&&(p=f.length),x<=0?y=y.left:y=y.right}return f.length=p,new E(this,f)},d.gt=function(b){for(var A=this._compare,y=this.root,f=[],p=0;y;){var x=A(b,y.key);f.push(y),x<0&&(p=f.length),x<0?y=y.left:y=y.right}return f.length=p,new E(this,f)},d.lt=function(b){for(var A=this._compare,y=this.root,f=[],p=0;y;){var x=A(b,y.key);f.push(y),x>0&&(p=f.length),x<=0?y=y.left:y=y.right}return f.length=p,new E(this,f)},d.le=function(b){for(var A=this._compare,y=this.root,f=[],p=0;y;){var x=A(b,y.key);f.push(y),x>=0&&(p=f.length),x<0?y=y.left:y=y.right}return f.length=p,new E(this,f)},d.find=function(b){for(var A=this._compare,y=this.root,f=[];y;){var p=A(b,y.key);if(f.push(y),p===0)return new E(this,f);p<=0?y=y.left:y=y.right}return new E(this,[])},d.remove=function(b){var A=this.find(b);return A?A.remove():this},d.get=function(b){for(var A=this._compare,y=this.root;y;){var f=A(b,y.key);if(f===0)return y.value;f<=0?y=y.left:y=y.right}};function E(b,A){this.tree=b,this._stack=A}var c=E.prototype;Object.defineProperty(c,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(c,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),c.clone=function(){return new E(this.tree,this._stack.slice())};function _(b,A){b.key=A.key,b.value=A.value,b.left=A.left,b.right=A.right,b._color=A._color,b._count=A._count}function T(b){for(var A,y,f,p,x=b.length-1;x>=0;--x){if(A=b[x],x===0){A._color=a;return}if(y=b[x-1],y.left===A){if(f=y.right,f.right&&f.right._color===r){if(f=y.right=i(f),p=f.right=i(f.right),y.right=f.left,f.left=y,f.right=p,f._color=y._color,A._color=a,y._color=a,p._color=a,o(y),o(f),x>1){var N=b[x-2];N.left===y?N.left=f:N.right=f}b[x-1]=f;return}else if(f.left&&f.left._color===r){if(f=y.right=i(f),p=f.left=i(f.left),y.right=p.left,f.left=p.right,p.left=y,p.right=f,p._color=y._color,y._color=a,f._color=a,A._color=a,o(y),o(f),o(p),x>1){var N=b[x-2];N.left===y?N.left=p:N.right=p}b[x-1]=p;return}if(f._color===a)if(y._color===r){y._color=a,y.right=s(r,f);return}else{y.right=s(r,f);continue}else{if(f=i(f),y.right=f.left,f.left=y,f._color=y._color,y._color=r,o(y),o(f),x>1){var N=b[x-2];N.left===y?N.left=f:N.right=f}b[x-1]=f,b[x]=y,x+1<b.length?b[x+1]=A:b.push(A),x=x+2}}else{if(f=y.left,f.left&&f.left._color===r){if(f=y.left=i(f),p=f.left=i(f.left),y.left=f.right,f.right=y,f.left=p,f._color=y._color,A._color=a,y._color=a,p._color=a,o(y),o(f),x>1){var N=b[x-2];N.right===y?N.right=f:N.left=f}b[x-1]=f;return}else if(f.right&&f.right._color===r){if(f=y.left=i(f),p=f.right=i(f.right),y.left=p.right,f.right=p.left,p.right=y,p.left=f,p._color=y._color,y._color=a,f._color=a,A._color=a,o(y),o(f),o(p),x>1){var N=b[x-2];N.right===y?N.right=p:N.left=p}b[x-1]=p;return}if(f._color===a)if(y._color===r){y._color=a,y.left=s(r,f);return}else{y.left=s(r,f);continue}else{if(f=i(f),y.left=f.right,f.right=y,f._color=y._color,y._color=r,o(y),o(f),x>1){var N=b[x-2];N.right===y?N.right=f:N.left=f}b[x-1]=f,b[x]=y,x+1<b.length?b[x+1]=A:b.push(A),x=x+2}}}}c.remove=function(){var b=this._stack;if(b.length===0)return this.tree;var A=new Array(b.length),y=b[b.length-1];A[A.length-1]=new l(y._color,y.key,y.value,y.left,y.right,y._count);for(var f=b.length-2;f>=0;--f){var y=b[f];y.left===b[f+1]?A[f]=new l(y._color,y.key,y.value,A[f+1],y.right,y._count):A[f]=new l(y._color,y.key,y.value,y.left,A[f+1],y._count)}if(y=A[A.length-1],y.left&&y.right){var p=A.length;for(y=y.left;y.right;)A.push(y),y=y.right;var x=A[p-1];A.push(new l(y._color,x.key,x.value,y.left,y.right,y._count)),A[p-1].key=y.key,A[p-1].value=y.value;for(var f=A.length-2;f>=p;--f)y=A[f],A[f]=new l(y._color,y.key,y.value,y.left,A[f+1],y._count);A[p-1].left=A[p]}if(y=A[A.length-1],y._color===r){var N=A[A.length-2];N.left===y?N.left=null:N.right===y&&(N.right=null),A.pop();for(var f=0;f<A.length;++f)A[f]._count--;return new u(this.tree._compare,A[0])}else if(y.left||y.right){y.left?_(y,y.left):y.right&&_(y,y.right),y._color=a;for(var f=0;f<A.length-1;++f)A[f]._count--;return new u(this.tree._compare,A[0])}else{if(A.length===1)return new u(this.tree._compare,null);for(var f=0;f<A.length;++f)A[f]._count--;var D=A[A.length-2];T(A),D.left===y?D.left=null:D.right=null}return new u(this.tree._compare,A[0])},Object.defineProperty(c,"key",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(c,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(c,"index",{get:function(){var b=0,A=this._stack;if(A.length===0){var y=this.tree.root;return y?y._count:0}else A[A.length-1].left&&(b=A[A.length-1].left._count);for(var f=A.length-2;f>=0;--f)A[f+1]===A[f].right&&(++b,A[f].left&&(b+=A[f].left._count));return b},enumerable:!0}),c.next=function(){var b=this._stack;if(b.length!==0){var A=b[b.length-1];if(A.right)for(A=A.right;A;)b.push(A),A=A.left;else for(b.pop();b.length>0&&b[b.length-1].right===A;)A=b[b.length-1],b.pop()}},Object.defineProperty(c,"hasNext",{get:function(){var b=this._stack;if(b.length===0)return!1;if(b[b.length-1].right)return!0;for(var A=b.length-1;A>0;--A)if(b[A-1].left===b[A])return!0;return!1}}),c.update=function(b){var A=this._stack;if(A.length===0)throw new Error("Can't update empty node!");var y=new Array(A.length),f=A[A.length-1];y[y.length-1]=new l(f._color,f.key,b,f.left,f.right,f._count);for(var p=A.length-2;p>=0;--p)f=A[p],f.left===A[p+1]?y[p]=new l(f._color,f.key,f.value,y[p+1],f.right,f._count):y[p]=new l(f._color,f.key,f.value,f.left,y[p+1],f._count);return new u(this.tree._compare,y[0])},c.prev=function(){var b=this._stack;if(b.length!==0){var A=b[b.length-1];if(A.left)for(A=A.left;A;)b.push(A),A=A.right;else for(b.pop();b.length>0&&b[b.length-1].left===A;)A=b[b.length-1],b.pop()}},Object.defineProperty(c,"hasPrev",{get:function(){var b=this._stack;if(b.length===0)return!1;if(b[b.length-1].left)return!0;for(var A=b.length-1;A>0;--A)if(b[A-1].right===b[A])return!0;return!1}});function M(b,A){return b<A?-1:b>A?1:0}function k(b){return new u(b||M,null)}}),3865:(function(t,r,a){var l=a(869);t.exports=i;function i(s,o){return l(s[0].mul(o[1]).add(o[0].mul(s[1])),s[1].mul(o[1]))}}),3952:(function(t,r,a){t.exports=s;var l=a(3250);function i(o,u){for(var d=new Array(u+1),h=0;h<o.length;++h)d[h]=o[h];for(var h=0;h<=o.length;++h){for(var g=o.length;g<=u;++g){for(var m=new Array(u),E=0;E<u;++E)m[E]=Math.pow(g+1-h,E);d[g]=m}var c=l.apply(void 0,d);if(c)return!0}return!1}function s(o){var u=o.length;if(u===0)return[];if(u===1)return[0];for(var d=o[0].length,h=[o[0]],g=[0],m=1;m<u;++m){if(h.push(o[m]),!i(h,d)){h.pop();continue}if(g.push(m),g.length===d+1)return g}return g}}),3990:(function(t){t.exports=r;function r(a,l){return a[0]=l[0],a[1]=l[1],a[2]=l[2],a}}),4008:(function(t,r,a){t.exports=a(6690)}),4025:(function(t,r,a){var l=a(2361),i=a(8828).countTrailingZeros;t.exports=s;function s(o){var u=i(l.lo(o));if(u<32)return u;var d=i(l.hi(o));return d>20?52:d+32}}),4040:(function(t){t.exports=r;function r(a,l,i,s,o,u,d){var h=1/(l-i),g=1/(s-o),m=1/(u-d);return a[0]=-2*h,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=-2*g,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=2*m,a[11]=0,a[12]=(l+i)*h,a[13]=(o+s)*g,a[14]=(d+u)*m,a[15]=1,a}}),4041:(function(t){t.exports=r;function r(a,l,i){var s=l[0],o=l[1],u=l[2],d=i[0],h=i[1],g=i[2],m=i[3],E=m*s+h*u-g*o,c=m*o+g*s-d*u,_=m*u+d*o-h*s,T=-d*s-h*o-g*u;return a[0]=E*m+T*-d+c*-g-_*-h,a[1]=c*m+T*-h+_*-d-E*-g,a[2]=_*m+T*-g+E*-h-c*-d,a[3]=l[3],a}}),4081:(function(t){t.exports=r;function r(a,l,i,s,o,u,d,h,g,m){var E=l+u+m;if(c>0){var c=Math.sqrt(E+1);a[0]=.5*(d-g)/c,a[1]=.5*(h-s)/c,a[2]=.5*(i-u)/c,a[3]=.5*c}else{var _=Math.max(l,u,m),c=Math.sqrt(2*_-E+1);l>=_?(a[0]=.5*c,a[1]=.5*(o+i)/c,a[2]=.5*(h+s)/c,a[3]=.5*(d-g)/c):u>=_?(a[0]=.5*(i+o)/c,a[1]=.5*c,a[2]=.5*(g+d)/c,a[3]=.5*(h-s)/c):(a[0]=.5*(s+h)/c,a[1]=.5*(d+g)/c,a[2]=.5*c,a[3]=.5*(i-o)/c)}return a}}),4100:(function(t,r,a){var l=a(4437),i=a(3837),s=a(5445),o=a(4449),u=a(3589),d=a(2260),h=a(7169),g=a(351),m=a(4772),E=a(4040),c=a(799),_=a(9216)({tablet:!0,featureDetect:!0});t.exports={createScene:A,createCamera:l};function T(){this.mouse=[-1,-1],this.screen=null,this.distance=1/0,this.index=null,this.dataCoordinate=null,this.dataPosition=null,this.object=null,this.data=null}function M(f,p){var x=null;try{x=f.getContext("webgl",p),x||(x=f.getContext("experimental-webgl",p))}catch{return null}return x}function k(f){var p=Math.round(Math.log(Math.abs(f))/Math.log(10));if(p<0){var x=Math.round(Math.pow(10,-p));return Math.ceil(f*x)/x}else if(p>0){var x=Math.round(Math.pow(10,p));return Math.ceil(f/x)*x}return Math.ceil(f)}function b(f){return typeof f=="boolean"?f:!0}function A(f){f=f||{},f.camera=f.camera||{};var p=f.canvas;if(!p)if(p=document.createElement("canvas"),f.container){var x=f.container;x.appendChild(p)}else document.body.appendChild(p);var N=f.gl;if(N||(f.glOptions&&(_=!!f.glOptions.preserveDrawingBuffer),N=M(p,f.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:_})),!N)throw new Error("webgl not supported");var D=f.bounds||[[-10,-10,-10],[10,10,10]],B=new T,U=d(N,N.drawingBufferWidth,N.drawingBufferHeight,{preferFloat:!_}),V=c(N),q=f.cameraObject&&f.cameraObject._ortho===!0||f.camera.projection&&f.camera.projection.type==="orthographic"||!1,z={eye:f.camera.eye||[2,0,0],center:f.camera.center||[0,0,0],up:f.camera.up||[0,1,0],zoomMin:f.camera.zoomMax||.1,zoomMax:f.camera.zoomMin||100,mode:f.camera.mode||"turntable",_ortho:q},H=f.axes||{},G=i(N,H);G.enable=!H.disable;var J=f.spikes||{},le=o(N,J),ge=[],de=[],me=[],W=[],ie=!0,oe=!0,se=new Array(16),ee=new Array(16),pe={view:null,projection:se,model:ee,_ortho:!1},oe=!0,Y=[N.drawingBufferWidth,N.drawingBufferHeight],ce=f.cameraObject||l(p,z),ue={gl:N,contextLost:!1,pixelRatio:f.pixelRatio||1,canvas:p,selection:B,camera:ce,axes:G,axesPixels:null,spikes:le,bounds:D,objects:ge,shape:Y,aspect:f.aspectRatio||[1,1,1],pickRadius:f.pickRadius||10,zNear:f.zNear||.01,zFar:f.zFar||1e3,fovy:f.fovy||Math.PI/4,clearColor:f.clearColor||[0,0,0,0],autoResize:b(f.autoResize),autoBounds:b(f.autoBounds),autoScale:!!f.autoScale,autoCenter:b(f.autoCenter),clipToBounds:b(f.clipToBounds),snapToData:!!f.snapToData,onselect:f.onselect||null,onrender:f.onrender||null,onclick:f.onclick||null,cameraParams:pe,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(ut){this.aspect[0]=ut.x,this.aspect[1]=ut.y,this.aspect[2]=ut.z,oe=!0},setBounds:function(ut,Fe){this.bounds[0][ut]=Fe.min,this.bounds[1][ut]=Fe.max},setClearColor:function(ut){this.clearColor=ut},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)}},_e=[N.drawingBufferWidth/ue.pixelRatio|0,N.drawingBufferHeight/ue.pixelRatio|0];function Le(){if(!ue._stopped&&ue.autoResize){var ut=p.parentNode,Fe=1,Pe=1;ut&&ut!==document.body?(Fe=ut.clientWidth,Pe=ut.clientHeight):(Fe=window.innerWidth,Pe=window.innerHeight);var be=Math.ceil(Fe*ue.pixelRatio)|0,Ye=Math.ceil(Pe*ue.pixelRatio)|0;if(be!==p.width||Ye!==p.height){p.width=be,p.height=Ye;var yt=p.style;yt.position=yt.position||"absolute",yt.left="0px",yt.top="0px",yt.width=Fe+"px",yt.height=Pe+"px",ie=!0}}}ue.autoResize&&Le(),window.addEventListener("resize",Le);function ze(){for(var ut=ge.length,Fe=W.length,Pe=0;Pe<Fe;++Pe)me[Pe]=0;e:for(var Pe=0;Pe<ut;++Pe){var be=ge[Pe],Ye=be.pickSlots;if(!Ye){de[Pe]=-1;continue}for(var yt=0;yt<Fe;++yt)if(me[yt]+Ye<255){de[Pe]=yt,be.setPickBase(me[yt]+1),me[yt]+=Ye;continue e}var wt=u(N,Y);de[Pe]=Fe,W.push(wt),me.push(Ye),be.setPickBase(1),Fe+=1}for(;Fe>0&&me[Fe-1]===0;)me.pop(),W.pop().dispose()}ue.update=function(ut){ue._stopped||(ie=!0,oe=!0)},ue.add=function(ut){ue._stopped||(ut.axes=G,ge.push(ut),de.push(-1),ie=!0,oe=!0,ze())},ue.remove=function(ut){if(!ue._stopped){var Fe=ge.indexOf(ut);Fe<0||(ge.splice(Fe,1),de.pop(),ie=!0,oe=!0,ze())}},ue.dispose=function(){if(!ue._stopped&&(ue._stopped=!0,window.removeEventListener("resize",Le),p.removeEventListener("webglcontextlost",Xe),ue.mouseListener.enabled=!1,!ue.contextLost)){G.dispose(),le.dispose();for(var ut=0;ut<ge.length;++ut)ge[ut].dispose();U.dispose();for(var ut=0;ut<W.length;++ut)W[ut].dispose();V.dispose(),N=null,G=null,le=null,ge=[]}},ue._mouseRotating=!1,ue._prevButtons=0,ue.enableMouseListeners=function(){ue.mouseListener=g(p,function(ut,Fe,Pe){if(!ue._stopped){var be=W.length,Ye=ge.length,yt=B.object;B.distance=1/0,B.mouse[0]=Fe,B.mouse[1]=Pe,B.object=null,B.screen=null,B.dataCoordinate=B.dataPosition=null;var wt=!1;if(ut&&ue._prevButtons)ue._mouseRotating=!0;else{ue._mouseRotating&&(oe=!0),ue._mouseRotating=!1;for(var ht=0;ht<be;++ht){var Yt=W[ht].query(Fe,_e[1]-Pe-1,ue.pickRadius);if(Yt){if(Yt.distance>B.distance)continue;for(var $t=0;$t<Ye;++$t){var fr=ge[$t];if(de[$t]===ht){var mr=fr.pick(Yt);mr&&(B.buttons=ut,B.screen=Yt.coord,B.distance=Yt.distance,B.object=fr,B.index=mr.distance,B.dataPosition=mr.position,B.dataCoordinate=mr.dataCoordinate,B.data=mr,wt=!0)}}}}}yt&&yt!==B.object&&(yt.highlight&&yt.highlight(null),ie=!0),B.object&&(B.object.highlight&&B.object.highlight(B.data),ie=!0),wt=wt||B.object!==yt,wt&&ue.onselect&&ue.onselect(B),ut&1&&!(ue._prevButtons&1)&&ue.onclick&&ue.onclick(B),ue._prevButtons=ut}})};function Xe(){if(ue.contextLost)return!0;N.isContextLost()&&(ue.contextLost=!0,ue.mouseListener.enabled=!1,ue.selection.object=null,ue.oncontextloss&&ue.oncontextloss())}p.addEventListener("webglcontextlost",Xe);function Ve(){if(!Xe()){N.colorMask(!0,!0,!0,!0),N.depthMask(!0),N.disable(N.BLEND),N.enable(N.DEPTH_TEST),N.depthFunc(N.LEQUAL);for(var ut=ge.length,Fe=W.length,Pe=0;Pe<Fe;++Pe){var be=W[Pe];be.shape=_e,be.begin();for(var Ye=0;Ye<ut;++Ye)if(de[Ye]===Pe){var yt=ge[Ye];yt.drawPick&&(yt.pixelRatio=1,yt.drawPick(pe))}be.end()}}}var rt=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],mt=[rt[0].slice(),rt[1].slice()];function _t(){if(!Xe()){Le();var ut=ue.camera.tick();pe.view=ue.camera.matrix,ie=ie||ut,oe=oe||ut,G.pixelRatio=ue.pixelRatio,le.pixelRatio=ue.pixelRatio;var Fe=ge.length,Pe=rt[0],be=rt[1];Pe[0]=Pe[1]=Pe[2]=1/0,be[0]=be[1]=be[2]=-1/0;for(var Ye=0;Ye<Fe;++Ye){var yt=ge[Ye];yt.pixelRatio=ue.pixelRatio,yt.axes=ue.axes,ie=ie||!!yt.dirty,oe=oe||!!yt.dirty;var wt=yt.bounds;if(wt)for(var ht=wt[0],Yt=wt[1],$t=0;$t<3;++$t)Pe[$t]=Math.min(Pe[$t],ht[$t]),be[$t]=Math.max(be[$t],Yt[$t])}var fr=ue.bounds;if(ue.autoBounds)for(var $t=0;$t<3;++$t){if(be[$t]<Pe[$t])Pe[$t]=-1,be[$t]=1;else{Pe[$t]===be[$t]&&(Pe[$t]-=1,be[$t]+=1);var mr=.05*(be[$t]-Pe[$t]);Pe[$t]=Pe[$t]-mr,be[$t]=be[$t]+mr}fr[0][$t]=Pe[$t],fr[1][$t]=be[$t]}for(var Ur=!1,$t=0;$t<3;++$t)Ur=Ur||mt[0][$t]!==fr[0][$t]||mt[1][$t]!==fr[1][$t],mt[0][$t]=fr[0][$t],mt[1][$t]=fr[1][$t];if(oe=oe||Ur,ie=ie||Ur,!!ie){if(Ur){for(var jr=[0,0,0],Ye=0;Ye<3;++Ye)jr[Ye]=k((fr[1][Ye]-fr[0][Ye])/10);G.autoTicks?G.update({bounds:fr,tickSpacing:jr}):G.update({bounds:fr})}var fn=N.drawingBufferWidth,Br=N.drawingBufferHeight;Y[0]=fn,Y[1]=Br,_e[0]=Math.max(fn/ue.pixelRatio,1)|0,_e[1]=Math.max(Br/ue.pixelRatio,1)|0,y(ue,q);for(var Ye=0;Ye<Fe;++Ye){var yt=ge[Ye];yt.axesBounds=fr,ue.clipToBounds&&(yt.clipBounds=fr)}B.object&&(ue.snapToData?le.position=B.dataCoordinate:le.position=B.dataPosition,le.bounds=fr),oe&&(oe=!1,Ve()),ue.axesPixels=s(ue.axes,pe,fn,Br),ue.onrender&&ue.onrender(),N.bindFramebuffer(N.FRAMEBUFFER,null),N.viewport(0,0,fn,Br),ue.clearRGBA(),N.depthMask(!0),N.colorMask(!0,!0,!0,!0),N.enable(N.DEPTH_TEST),N.depthFunc(N.LEQUAL),N.disable(N.BLEND),N.disable(N.CULL_FACE);var Qr=!1;G.enable&&(Qr=Qr||G.isTransparent(),G.draw(pe)),le.axes=G,B.object&&le.draw(pe),N.disable(N.CULL_FACE);for(var Ye=0;Ye<Fe;++Ye){var yt=ge[Ye];yt.axes=G,yt.pixelRatio=ue.pixelRatio,yt.isOpaque&&yt.isOpaque()&&yt.draw(pe),yt.isTransparent&&yt.isTransparent()&&(Qr=!0)}if(Qr){U.shape=Y,U.bind(),N.clear(N.DEPTH_BUFFER_BIT),N.colorMask(!1,!1,!1,!1),N.depthMask(!0),N.depthFunc(N.LESS),G.enable&&G.isTransparent()&&G.drawTransparent(pe);for(var Ye=0;Ye<Fe;++Ye){var yt=ge[Ye];yt.isOpaque&&yt.isOpaque()&&yt.draw(pe)}N.enable(N.BLEND),N.blendEquation(N.FUNC_ADD),N.blendFunc(N.ONE,N.ONE_MINUS_SRC_ALPHA),N.colorMask(!0,!0,!0,!0),N.depthMask(!1),N.clearColor(0,0,0,0),N.clear(N.COLOR_BUFFER_BIT),G.isTransparent()&&G.drawTransparent(pe);for(var Ye=0;Ye<Fe;++Ye){var yt=ge[Ye];yt.isTransparent&&yt.isTransparent()&&yt.drawTransparent(pe)}N.bindFramebuffer(N.FRAMEBUFFER,null),N.blendFunc(N.ONE,N.ONE_MINUS_SRC_ALPHA),N.disable(N.DEPTH_TEST),V.bind(),U.color[0].bind(0),V.uniforms.accumBuffer=0,h(N),N.disable(N.BLEND)}ie=!1;for(var Ye=0;Ye<Fe;++Ye)ge[Ye].dirty=!1}}}function vt(){ue._stopped||ue.contextLost||(_t(),requestAnimationFrame(vt))}return ue.enableMouseListeners(),vt(),ue.redraw=function(){ue._stopped||(ie=!0,_t())},ue}function y(f,p){var x=f.bounds,N=f.cameraParams,D=N.projection,B=N.model,U=f.gl.drawingBufferWidth,V=f.gl.drawingBufferHeight,q=f.zNear,z=f.zFar,H=f.fovy,G=U/V;p?(E(D,-G,G,-1,1,q,z),N._ortho=!0):(m(D,H,G,q,z),N._ortho=!1);for(var J=0;J<16;++J)B[J]=0;B[15]=1;for(var le=0,J=0;J<3;++J)le=Math.max(le,x[1][J]-x[0][J]);for(var J=0;J<3;++J)f.autoScale?B[5*J]=f.aspect[J]/(x[1][J]-x[0][J]):B[5*J]=1/le,f.autoCenter&&(B[12+J]=-B[5*J]*.5*(x[0][J]+x[1][J]))}}),4192:(function(t){t.exports=a;var r=32;function a(m,E){E<=4*r?l(0,E-1,m):g(0,E-1,m)}function l(m,E,c){for(var _=2*(m+1),T=m+1;T<=E;++T){for(var M=c[_++],k=c[_++],b=T,A=_-2;b-- >m;){var y=c[A-2],f=c[A-1];if(y<M)break;if(y===M&&f<k)break;c[A]=y,c[A+1]=f,A-=2}c[A]=M,c[A+1]=k}}function i(m,E,c){m*=2,E*=2;var _=c[m],T=c[m+1];c[m]=c[E],c[m+1]=c[E+1],c[E]=_,c[E+1]=T}function s(m,E,c){m*=2,E*=2,c[m]=c[E],c[m+1]=c[E+1]}function o(m,E,c,_){m*=2,E*=2,c*=2;var T=_[m],M=_[m+1];_[m]=_[E],_[m+1]=_[E+1],_[E]=_[c],_[E+1]=_[c+1],_[c]=T,_[c+1]=M}function u(m,E,c,_,T){m*=2,E*=2,T[m]=T[E],T[E]=c,T[m+1]=T[E+1],T[E+1]=_}function d(m,E,c){m*=2,E*=2;var _=c[m],T=c[E];return _<T?!1:_===T?c[m+1]>c[E+1]:!0}function h(m,E,c,_){m*=2;var T=_[m];return T<E?!0:T===E?_[m+1]<c:!1}function g(m,E,c){var _=(E-m+1)/6|0,T=m+_,M=E-_,k=m+E>>1,b=k-_,A=k+_,y=T,f=b,p=k,x=A,N=M,D=m+1,B=E-1,U=0;d(y,f,c)&&(U=y,y=f,f=U),d(x,N,c)&&(U=x,x=N,N=U),d(y,p,c)&&(U=y,y=p,p=U),d(f,p,c)&&(U=f,f=p,p=U),d(y,x,c)&&(U=y,y=x,x=U),d(p,x,c)&&(U=p,p=x,x=U),d(f,N,c)&&(U=f,f=N,N=U),d(f,p,c)&&(U=f,f=p,p=U),d(x,N,c)&&(U=x,x=N,N=U);for(var V=c[2*f],q=c[2*f+1],z=c[2*x],H=c[2*x+1],G=2*y,J=2*p,le=2*N,ge=2*T,de=2*k,me=2*M,W=0;W<2;++W){var ie=c[G+W],se=c[J+W],ee=c[le+W];c[ge+W]=ie,c[de+W]=se,c[me+W]=ee}s(b,m,c),s(A,E,c);for(var pe=D;pe<=B;++pe)if(h(pe,V,q,c))pe!==D&&i(pe,D,c),++D;else if(!h(pe,z,H,c))for(;;)if(h(B,z,H,c)){h(B,V,q,c)?(o(pe,D,B,c),++D,--B):(i(pe,B,c),--B);break}else{if(--B<pe)break;continue}u(m,D-1,V,q,c),u(E,B+1,z,H,c),D-2-m<=r?l(m,D-2,c):g(m,D-2,c),E-(B+2)<=r?l(B+2,E,c):g(B+2,E,c),B-D<=r?l(D,B,c):g(D,B,c)}}),4209:(function(t,r,a){t.exports=c;var l=a(2478),i=a(3840),s=a(3250),o=a(1303);function u(_,T,M){this.slabs=_,this.coordinates=T,this.horizontal=M}var d=u.prototype;function h(_,T){return _.y-T}function g(_,T){for(var M=null;_;){var k=_.key,b,A;k[0][0]<k[1][0]?(b=k[0],A=k[1]):(b=k[1],A=k[0]);var y=s(b,A,T);if(y<0)_=_.left;else if(y>0)if(T[0]!==k[1][0])M=_,_=_.right;else{var f=g(_.right,T);if(f)return f;_=_.left}else{if(T[0]!==k[1][0])return _;var f=g(_.right,T);if(f)return f;_=_.left}}return M}d.castUp=function(_){var T=l.le(this.coordinates,_[0]);if(T<0)return-1;this.slabs[T];var M=g(this.slabs[T],_),k=-1;if(M&&(k=M.value),this.coordinates[T]===_[0]){var b=null;if(M&&(b=M.key),T>0){var A=g(this.slabs[T-1],_);A&&(b?o(A.key,b)>0&&(b=A.key,k=A.value):(k=A.value,b=A.key))}var y=this.horizontal[T];if(y.length>0){var f=l.ge(y,_[1],h);if(f<y.length){var p=y[f];if(_[1]===p.y){if(p.closed)return p.index;for(;f<y.length-1&&y[f+1].y===_[1];)if(f=f+1,p=y[f],p.closed)return p.index;if(p.y===_[1]&&!p.start){if(f=f+1,f>=y.length)return k;p=y[f]}}if(p.start)if(b){var x=s(b[0],b[1],[_[0],p.y]);b[0][0]>b[1][0]&&(x=-x),x>0&&(k=p.index)}else k=p.index;else p.y!==_[1]&&(k=p.index)}}}return k};function m(_,T,M,k){this.y=_,this.index=T,this.start=M,this.closed=k}function E(_,T,M,k){this.x=_,this.segment=T,this.create=M,this.index=k}function c(_){for(var T=_.length,M=2*T,k=new Array(M),b=0;b<T;++b){var A=_[b],y=A[0][0]<A[1][0];k[2*b]=new E(A[0][0],A,y,b),k[2*b+1]=new E(A[1][0],A,!y,b)}k.sort(function(V,q){var z=V.x-q.x;return z||(z=V.create-q.create,z)?z:Math.min(V.segment[0][1],V.segment[1][1])-Math.min(q.segment[0][1],q.segment[1][1])});for(var f=i(o),p=[],x=[],N=[],b=0;b<M;){for(var D=k[b].x,B=[];b<M;){var U=k[b];if(U.x!==D)break;b+=1,U.segment[0][0]===U.x&&U.segment[1][0]===U.x?U.create&&(U.segment[0][1]<U.segment[1][1]?(B.push(new m(U.segment[0][1],U.index,!0,!0)),B.push(new m(U.segment[1][1],U.index,!1,!1))):(B.push(new m(U.segment[1][1],U.index,!0,!1)),B.push(new m(U.segment[0][1],U.index,!1,!0)))):U.create?f=f.insert(U.segment,U.index):f=f.remove(U.segment)}p.push(f.root),x.push(D),N.push(B)}return new u(p,x,N)}}),4317:(function(t){function r(o,u){var d=Math.floor(u),h=u-d,g=0<=d&&d<o.shape[0],m=0<=d+1&&d+1<o.shape[0],E=g?+o.get(d):0,c=m?+o.get(d+1):0;return(1-h)*E+h*c}function a(o,u,d){var h=Math.floor(u),g=u-h,m=0<=h&&h<o.shape[0],E=0<=h+1&&h+1<o.shape[0],c=Math.floor(d),_=d-c,T=0<=c&&c<o.shape[1],M=0<=c+1&&c+1<o.shape[1],k=m&&T?o.get(h,c):0,b=m&&M?o.get(h,c+1):0,A=E&&T?o.get(h+1,c):0,y=E&&M?o.get(h+1,c+1):0;return(1-_)*((1-g)*k+g*A)+_*((1-g)*b+g*y)}function l(o,u,d,h){var g=Math.floor(u),m=u-g,E=0<=g&&g<o.shape[0],c=0<=g+1&&g+1<o.shape[0],_=Math.floor(d),T=d-_,M=0<=_&&_<o.shape[1],k=0<=_+1&&_+1<o.shape[1],b=Math.floor(h),A=h-b,y=0<=b&&b<o.shape[2],f=0<=b+1&&b+1<o.shape[2],p=E&&M&&y?o.get(g,_,b):0,x=E&&k&&y?o.get(g,_+1,b):0,N=c&&M&&y?o.get(g+1,_,b):0,D=c&&k&&y?o.get(g+1,_+1,b):0,B=E&&M&&f?o.get(g,_,b+1):0,U=E&&k&&f?o.get(g,_+1,b+1):0,V=c&&M&&f?o.get(g+1,_,b+1):0,q=c&&k&&f?o.get(g+1,_+1,b+1):0;return(1-A)*((1-T)*((1-m)*p+m*N)+T*((1-m)*x+m*D))+A*((1-T)*((1-m)*B+m*V)+T*((1-m)*U+m*q))}function i(o){var u=o.shape.length|0,d=new Array(u),h=new Array(u),g=new Array(u),m=new Array(u),E,c;for(E=0;E<u;++E)c=+arguments[E+1],d[E]=Math.floor(c),h[E]=c-d[E],g[E]=0<=d[E]&&d[E]<o.shape[E],m[E]=0<=d[E]+1&&d[E]+1<o.shape[E];var _=0,T,M,k;e:for(E=0;E<1<<u;++E){for(M=1,k=o.offset,T=0;T<u;++T)if(E&1<<T){if(!m[T])continue e;M*=h[T],k+=o.stride[T]*(d[T]+1)}else{if(!g[T])continue e;M*=1-h[T],k+=o.stride[T]*d[T]}_+=M*o.data[k]}return _}function s(o,u,d,h){switch(o.shape.length){case 0:return 0;case 1:return r(o,u);case 2:return a(o,u,d);case 3:return l(o,u,d,h);default:return i.apply(void 0,arguments)}}t.exports=s,t.exports.d1=r,t.exports.d2=a,t.exports.d3=l}),4335:(function(t){t.exports=function(a,l){var i=l[15];if(i===0)return!1;for(var s=1/i,o=0;o<16;o++)a[o]=l[o]*s;return!0}}),4359:(function(t,r,a){t.exports=o;var l=a(7718),i=null,s=null;typeof document<"u"&&(i=document.createElement("canvas"),i.width=8192,i.height=1024,s=i.getContext("2d"));function o(u,d){return(typeof d!="object"||d===null)&&(d={}),l(u,d.canvas||i,d.context||s,d)}}),4361:(function(t){t.exports=r;function r(a,l,i){return a[0]=l[0]+i[0],a[1]=l[1]+i[1],a[2]=l[2]+i[2],a[3]=l[3]+i[3],a}}),4437:(function(t,r,a){t.exports=h;var l=a(3025),i=a(6296),s=a(351),o=a(8512),u=a(24),d=a(7520);function h(g,m){g=g||document.body,m=m||{};var E=[.01,1/0];"distanceLimits"in m&&(E[0]=m.distanceLimits[0],E[1]=m.distanceLimits[1]),"zoomMin"in m&&(E[0]=m.zoomMin),"zoomMax"in m&&(E[1]=m.zoomMax);var c=i({center:m.center||[0,0,0],up:m.up||[0,1,0],eye:m.eye||[0,0,10],mode:m.mode||"orbit",distanceLimits:E}),_=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],T=0,M=g.clientWidth,k=g.clientHeight,b={keyBindingMode:"rotate",enableWheel:!0,view:c,element:g,delay:m.delay||16,rotateSpeed:m.rotateSpeed||1,zoomSpeed:m.zoomSpeed||1,translateSpeed:m.translateSpeed||1,flipX:!!m.flipX,flipY:!!m.flipY,modes:c.modes,_ortho:m._ortho||m.projection&&m.projection.type==="orthographic"||!1,tick:function(){var A=l(),y=this.delay,f=A-2*y;c.idle(A-y),c.recalcMatrix(f),c.flush(A-(100+y*2));for(var p=!0,x=c.computedMatrix,N=0;N<16;++N)p=p&&_[N]===x[N],_[N]=x[N];var D=g.clientWidth===M&&g.clientHeight===k;return M=g.clientWidth,k=g.clientHeight,p?!D:(T=Math.exp(c.computedRadius[0]),!0)},lookAt:function(A,y,f){c.lookAt(c.lastT(),A,y,f)},rotate:function(A,y,f){c.rotate(c.lastT(),A,y,f)},pan:function(A,y,f){c.pan(c.lastT(),A,y,f)},translate:function(A,y,f){c.translate(c.lastT(),A,y,f)}};return Object.defineProperties(b,{matrix:{get:function(){return c.computedMatrix},set:function(A){return c.setMatrix(c.lastT(),A),c.computedMatrix},enumerable:!0},mode:{get:function(){return c.getMode()},set:function(A){var y=c.computedUp.slice(),f=c.computedEye.slice(),p=c.computedCenter.slice();if(c.setMode(A),A==="turntable"){var x=l();c._active.lookAt(x,f,p,y),c._active.lookAt(x+500,f,p,[0,0,1]),c._active.flush(x)}return c.getMode()},enumerable:!0},center:{get:function(){return c.computedCenter},set:function(A){return c.lookAt(c.lastT(),null,A),c.computedCenter},enumerable:!0},eye:{get:function(){return c.computedEye},set:function(A){return c.lookAt(c.lastT(),A),c.computedEye},enumerable:!0},up:{get:function(){return c.computedUp},set:function(A){return c.lookAt(c.lastT(),null,null,A),c.computedUp},enumerable:!0},distance:{get:function(){return T},set:function(A){return c.setDistance(c.lastT(),A),A},enumerable:!0},distanceLimits:{get:function(){return c.getDistanceLimits(E)},set:function(A){return c.setDistanceLimits(A),A},enumerable:!0}}),g.addEventListener("contextmenu",function(A){return A.preventDefault(),!1}),b._lastX=-1,b._lastY=-1,b._lastMods={shift:!1,control:!1,alt:!1,meta:!1},b.enableMouseListeners=function(){b.mouseListener=s(g,A),g.addEventListener("touchstart",function(y){var f=u(y.changedTouches[0],g);A(0,f[0],f[1],b._lastMods),A(1,f[0],f[1],b._lastMods)},d?{passive:!0}:!1),g.addEventListener("touchmove",function(y){var f=u(y.changedTouches[0],g);A(1,f[0],f[1],b._lastMods),y.preventDefault()},d?{passive:!1}:!1),g.addEventListener("touchend",function(y){A(0,b._lastX,b._lastY,b._lastMods)},d?{passive:!0}:!1);function A(y,f,p,x){var N=b.keyBindingMode;if(N!==!1){var D=N==="rotate",B=N==="pan",U=N==="zoom",V=!!x.control,q=!!x.alt,z=!!x.shift,H=!!(y&1),G=!!(y&2),J=!!(y&4),le=1/g.clientHeight,ge=le*(f-b._lastX),de=le*(p-b._lastY),me=b.flipX?1:-1,W=b.flipY?1:-1,ie=Math.PI*b.rotateSpeed,se=l();if(b._lastX!==-1&&b._lastY!==-1&&((D&&H&&!V&&!q&&!z||H&&!V&&!q&&z)&&c.rotate(se,me*ie*ge,-W*ie*de,0),(B&&H&&!V&&!q&&!z||G||H&&V&&!q&&!z)&&c.pan(se,-b.translateSpeed*ge*T,b.translateSpeed*de*T,0),U&&H&&!V&&!q&&!z||J||H&&!V&&q&&!z)){var ee=-b.zoomSpeed*de/window.innerHeight*(se-c.lastT())*100;c.pan(se,0,0,T*(Math.exp(ee)-1))}return b._lastX=f,b._lastY=p,b._lastMods=x,!0}}b.wheelListener=o(g,function(y,f){if(b.keyBindingMode!==!1&&b.enableWheel){var p=b.flipX?1:-1,x=b.flipY?1:-1,N=l();if(Math.abs(y)>Math.abs(f))c.rotate(N,0,0,-y*p*Math.PI*b.rotateSpeed/window.innerWidth);else if(!b._ortho){var D=-b.zoomSpeed*x*f/window.innerHeight*(N-c.lastT())/20;c.pan(N,0,0,T*(Math.exp(D)-1))}}},!0)},b.enableMouseListeners(),b}}),4449:(function(t,r,a){var l=a(2762),i=a(8116),s=a(1493);t.exports=E;var o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function u(c,_,T,M){this.gl=c,this.buffer=_,this.vao=T,this.shader=M,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 d=u.prototype,h=[0,0,0],g=[0,0,0],m=[0,0];d.isTransparent=function(){return!1},d.drawTransparent=function(c){},d.draw=function(c){var _=this.gl,T=this.vao,M=this.shader;T.bind(),M.bind();var k=c.model||o,b=c.view||o,A=c.projection||o,y;this.axes&&(y=this.axes.lastCubeProps.axis);for(var f=h,p=g,x=0;x<3;++x)y&&y[x]<0?(f[x]=this.bounds[0][x],p[x]=this.bounds[1][x]):(f[x]=this.bounds[1][x],p[x]=this.bounds[0][x]);m[0]=_.drawingBufferWidth,m[1]=_.drawingBufferHeight,M.uniforms.model=k,M.uniforms.view=b,M.uniforms.projection=A,M.uniforms.coordinates=[this.position,f,p],M.uniforms.colors=this.colors,M.uniforms.screenShape=m;for(var x=0;x<3;++x)M.uniforms.lineWidth=this.lineWidth[x]*this.pixelRatio,this.enabled[x]&&(T.draw(_.TRIANGLES,6,6*x),this.drawSides[x]&&T.draw(_.TRIANGLES,12,18+12*x));T.unbind()},d.update=function(c){c&&("bounds"in c&&(this.bounds=c.bounds),"position"in c&&(this.position=c.position),"lineWidth"in c&&(this.lineWidth=c.lineWidth),"colors"in c&&(this.colors=c.colors),"enabled"in c&&(this.enabled=c.enabled),"drawSides"in c&&(this.drawSides=c.drawSides))},d.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function E(c,_){var T=[];function M(f,p,x,N,D,B){var U=[f,p,x,0,0,0,1];U[N+3]=1,U[N]=D,T.push.apply(T,U),U[6]=-1,T.push.apply(T,U),U[N]=B,T.push.apply(T,U),T.push.apply(T,U),U[6]=1,T.push.apply(T,U),U[N]=D,T.push.apply(T,U)}M(0,0,0,0,0,1),M(0,0,0,1,0,1),M(0,0,0,2,0,1),M(1,0,0,1,-1,1),M(1,0,0,2,-1,1),M(0,1,0,0,-1,1),M(0,1,0,2,-1,1),M(0,0,1,0,-1,1),M(0,0,1,1,-1,1);var k=l(c,T),b=i(c,[{type:c.FLOAT,buffer:k,size:3,offset:0,stride:28},{type:c.FLOAT,buffer:k,size:3,offset:12,stride:28},{type:c.FLOAT,buffer:k,size:1,offset:24,stride:28}]),A=s(c);A.attributes.position.location=0,A.attributes.color.location=1,A.attributes.weight.location=2;var y=new u(c,k,b,A);return y.update(_),y}}),4494:(function(t){t.exports=r;function r(a,l){return a[0]=1/l[0],a[1]=1/l[1],a[2]=1/l[2],a[3]=1/l[3],a}}),4505:(function(t,r,a){t.exports=a(5847)}),4578:(function(t){t.exports=r;function r(a,l,i,s,o){return a[0]=l,a[1]=i,a[2]=s,a[3]=o,a}}),4623:(function(t){"use restrict";t.exports=r;function r(a){this.roots=new Array(a),this.ranks=new Array(a);for(var l=0;l<a;++l)this.roots[l]=l,this.ranks[l]=0}r.prototype.length=function(){return this.roots.length},r.prototype.makeSet=function(){var a=this.roots.length;return this.roots.push(a),this.ranks.push(0),a},r.prototype.find=function(a){for(var l=this.roots;l[a]!==a;){var i=l[a];l[a]=l[i],a=i}return a},r.prototype.link=function(a,l){var i=this.find(a),s=this.find(l);if(i!==s){var o=this.ranks,u=this.roots,d=o[i],h=o[s];d<h?u[i]=s:h<d?u[s]=i:(u[s]=i,++o[i])}}}),4687:(function(t,r){function a(o){if(typeof o=="object"){if("buttons"in o)return o.buttons;if("which"in o){var u=o.which;if(u===2)return 4;if(u===3)return 2;if(u>0)return 1<<u-1}else if("button"in o){var u=o.button;if(u===1)return 4;if(u===2)return 2;if(u>=0)return 1<<u}}return 0}r.buttons=a;function l(o){return o.target||o.srcElement||window}r.element=l;function i(o){if(typeof o=="object"){if("offsetX"in o)return o.offsetX;var u=l(o),d=u.getBoundingClientRect();return o.clientX-d.left}return 0}r.x=i;function s(o){if(typeof o=="object"){if("offsetY"in o)return o.offsetY;var u=l(o),d=u.getBoundingClientRect();return o.clientY-d.top}return 0}r.y=s}),4691:(function(t){t.exports=r;function r(a,l){var i=l[0]-a[0],s=l[1]-a[1],o=l[2]-a[2],u=l[3]-a[3];return Math.sqrt(i*i+s*s+o*o+u*u)}}),4750:(function(t,r,a){t.exports=i;var l=a(3090);function i(s){var o=l(s),u=o.length;if(u<=2)return[];for(var d=new Array(u),h=o[u-1],g=0;g<u;++g){var m=o[g];d[g]=[h,m],h=m}return d}}),4769:(function(t){function r(l,i,s,o,u,d){var h=6*u*u-6*u,g=3*u*u-4*u+1,m=-6*u*u+6*u,E=3*u*u-2*u;if(l.length){d||(d=new Array(l.length));for(var c=l.length-1;c>=0;--c)d[c]=h*l[c]+g*i[c]+m*s[c]+E*o[c];return d}return h*l+g*i+m*s[c]+E*o}function a(l,i,s,o,u,d){var h=u-1,g=u*u,m=h*h,E=(1+2*u)*m,c=u*m,_=g*(3-2*u),T=g*h;if(l.length){d||(d=new Array(l.length));for(var M=l.length-1;M>=0;--M)d[M]=E*l[M]+c*i[M]+_*s[M]+T*o[M];return d}return E*l+c*i+_*s+T*o}t.exports=a,t.exports.derivative=r}),4772:(function(t){t.exports=r;function r(a,l,i,s,o){var u=1/Math.tan(l/2),d=1/(s-o);return a[0]=u/i,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=u,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=(o+s)*d,a[11]=-1,a[12]=0,a[13]=0,a[14]=2*o*s*d,a[15]=0,a}}),4793:(function(t,r,a){function l(Ee,Ae){if(!(Ee instanceof Ae))throw new TypeError("Cannot call a class as a function")}function i(Ee,Ae){for(var Ie=0;Ie<Ae.length;Ie++){var tt=Ae[Ie];tt.enumerable=tt.enumerable||!1,tt.configurable=!0,"value"in tt&&(tt.writable=!0),Object.defineProperty(Ee,o(tt.key),tt)}}function s(Ee,Ae,Ie){return Ae&&i(Ee.prototype,Ae),Object.defineProperty(Ee,"prototype",{writable:!1}),Ee}function o(Ee){var Ae=u(Ee,"string");return T(Ae)=="symbol"?Ae:Ae+""}function u(Ee,Ae){if(T(Ee)!="object"||!Ee)return Ee;var Ie=Ee[Symbol.toPrimitive];if(Ie!==void 0){var tt=Ie.call(Ee,Ae);if(T(tt)!="object")return tt;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(Ee)}function d(Ee,Ae,Ie){return Ae=E(Ae),h(Ee,m()?Reflect.construct(Ae,[],E(Ee).constructor):Ae.apply(Ee,Ie))}function h(Ee,Ae){if(Ae&&(T(Ae)=="object"||typeof Ae=="function"))return Ae;if(Ae!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return g(Ee)}function g(Ee){if(Ee===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Ee}function m(){try{var Ee=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(m=function(){return!!Ee})()}function E(Ee){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Ae){return Ae.__proto__||Object.getPrototypeOf(Ae)},E(Ee)}function c(Ee,Ae){if(typeof Ae!="function"&&Ae!==null)throw new TypeError("Super expression must either be null or a function");Ee.prototype=Object.create(Ae&&Ae.prototype,{constructor:{value:Ee,writable:!0,configurable:!0}}),Object.defineProperty(Ee,"prototype",{writable:!1}),Ae&&_(Ee,Ae)}function _(Ee,Ae){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(Ie,tt){return Ie.__proto__=tt,Ie},_(Ee,Ae)}function T(Ee){"@babel/helpers - typeof";return T=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Ae){return typeof Ae}:function(Ae){return Ae&&typeof Symbol=="function"&&Ae.constructor===Symbol&&Ae!==Symbol.prototype?"symbol":typeof Ae},T(Ee)}var M=a(7507),k=a(3778),b=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;r.hp=p,r.IS=50;var A=2147483647;p.TYPED_ARRAY_SUPPORT=y(),!p.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 y(){try{var Ee=new Uint8Array(1),Ae={foo:function(){return 42}};return Object.setPrototypeOf(Ae,Uint8Array.prototype),Object.setPrototypeOf(Ee,Ae),Ee.foo()===42}catch{return!1}}Object.defineProperty(p.prototype,"parent",{enumerable:!0,get:function(){if(p.isBuffer(this))return this.buffer}}),Object.defineProperty(p.prototype,"offset",{enumerable:!0,get:function(){if(p.isBuffer(this))return this.byteOffset}});function f(Ee){if(Ee>A)throw new RangeError('The value "'+Ee+'" is invalid for option "size"');var Ae=new Uint8Array(Ee);return Object.setPrototypeOf(Ae,p.prototype),Ae}function p(Ee,Ae,Ie){if(typeof Ee=="number"){if(typeof Ae=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return B(Ee)}return x(Ee,Ae,Ie)}p.poolSize=8192;function x(Ee,Ae,Ie){if(typeof Ee=="string")return U(Ee,Ae);if(ArrayBuffer.isView(Ee))return q(Ee);if(Ee==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+T(Ee));if(Qr(Ee,ArrayBuffer)||Ee&&Qr(Ee.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Qr(Ee,SharedArrayBuffer)||Ee&&Qr(Ee.buffer,SharedArrayBuffer)))return z(Ee,Ae,Ie);if(typeof Ee=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var tt=Ee.valueOf&&Ee.valueOf();if(tt!=null&&tt!==Ee)return p.from(tt,Ae,Ie);var st=H(Ee);if(st)return st;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof Ee[Symbol.toPrimitive]=="function")return p.from(Ee[Symbol.toPrimitive]("string"),Ae,Ie);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+T(Ee))}p.from=function(Ee,Ae,Ie){return x(Ee,Ae,Ie)},Object.setPrototypeOf(p.prototype,Uint8Array.prototype),Object.setPrototypeOf(p,Uint8Array);function N(Ee){if(typeof Ee!="number")throw new TypeError('"size" argument must be of type number');if(Ee<0)throw new RangeError('The value "'+Ee+'" is invalid for option "size"')}function D(Ee,Ae,Ie){return N(Ee),Ee<=0?f(Ee):Ae!==void 0?typeof Ie=="string"?f(Ee).fill(Ae,Ie):f(Ee).fill(Ae):f(Ee)}p.alloc=function(Ee,Ae,Ie){return D(Ee,Ae,Ie)};function B(Ee){return N(Ee),f(Ee<0?0:G(Ee)|0)}p.allocUnsafe=function(Ee){return B(Ee)},p.allocUnsafeSlow=function(Ee){return B(Ee)};function U(Ee,Ae){if((typeof Ae!="string"||Ae==="")&&(Ae="utf8"),!p.isEncoding(Ae))throw new TypeError("Unknown encoding: "+Ae);var Ie=J(Ee,Ae)|0,tt=f(Ie),st=tt.write(Ee,Ae);return st!==Ie&&(tt=tt.slice(0,st)),tt}function V(Ee){for(var Ae=Ee.length<0?0:G(Ee.length)|0,Ie=f(Ae),tt=0;tt<Ae;tt+=1)Ie[tt]=Ee[tt]&255;return Ie}function q(Ee){if(Qr(Ee,Uint8Array)){var Ae=new Uint8Array(Ee);return z(Ae.buffer,Ae.byteOffset,Ae.byteLength)}return V(Ee)}function z(Ee,Ae,Ie){if(Ae<0||Ee.byteLength<Ae)throw new RangeError('"offset" is outside of buffer bounds');if(Ee.byteLength<Ae+(Ie||0))throw new RangeError('"length" is outside of buffer bounds');var tt;return Ae===void 0&&Ie===void 0?tt=new Uint8Array(Ee):Ie===void 0?tt=new Uint8Array(Ee,Ae):tt=new Uint8Array(Ee,Ae,Ie),Object.setPrototypeOf(tt,p.prototype),tt}function H(Ee){if(p.isBuffer(Ee)){var Ae=G(Ee.length)|0,Ie=f(Ae);return Ie.length===0||Ee.copy(Ie,0,0,Ae),Ie}if(Ee.length!==void 0)return typeof Ee.length!="number"||Ot(Ee.length)?f(0):V(Ee);if(Ee.type==="Buffer"&&Array.isArray(Ee.data))return V(Ee.data)}function G(Ee){if(Ee>=A)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+A.toString(16)+" bytes");return Ee|0}p.isBuffer=function(Ae){return Ae!=null&&Ae._isBuffer===!0&&Ae!==p.prototype},p.compare=function(Ae,Ie){if(Qr(Ae,Uint8Array)&&(Ae=p.from(Ae,Ae.offset,Ae.byteLength)),Qr(Ie,Uint8Array)&&(Ie=p.from(Ie,Ie.offset,Ie.byteLength)),!p.isBuffer(Ae)||!p.isBuffer(Ie))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Ae===Ie)return 0;for(var tt=Ae.length,st=Ie.length,Bt=0,Ft=Math.min(tt,st);Bt<Ft;++Bt)if(Ae[Bt]!==Ie[Bt]){tt=Ae[Bt],st=Ie[Bt];break}return tt<st?-1:st<tt?1:0},p.isEncoding=function(Ae){switch(String(Ae).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}},p.concat=function(Ae,Ie){if(!Array.isArray(Ae))throw new TypeError('"list" argument must be an Array of Buffers');if(Ae.length===0)return p.alloc(0);var tt;if(Ie===void 0)for(Ie=0,tt=0;tt<Ae.length;++tt)Ie+=Ae[tt].length;var st=p.allocUnsafe(Ie),Bt=0;for(tt=0;tt<Ae.length;++tt){var Ft=Ae[tt];if(Qr(Ft,Uint8Array))Bt+Ft.length>st.length?(p.isBuffer(Ft)||(Ft=p.from(Ft)),Ft.copy(st,Bt)):Uint8Array.prototype.set.call(st,Ft,Bt);else if(p.isBuffer(Ft))Ft.copy(st,Bt);else throw new TypeError('"list" argument must be an Array of Buffers');Bt+=Ft.length}return st};function J(Ee,Ae){if(p.isBuffer(Ee))return Ee.length;if(ArrayBuffer.isView(Ee)||Qr(Ee,ArrayBuffer))return Ee.byteLength;if(typeof Ee!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+T(Ee));var Ie=Ee.length,tt=arguments.length>2&&arguments[2]===!0;if(!tt&&Ie===0)return 0;for(var st=!1;;)switch(Ae){case"ascii":case"latin1":case"binary":return Ie;case"utf8":case"utf-8":return mr(Ee).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ie*2;case"hex":return Ie>>>1;case"base64":return fn(Ee).length;default:if(st)return tt?-1:mr(Ee).length;Ae=(""+Ae).toLowerCase(),st=!0}}p.byteLength=J;function le(Ee,Ae,Ie){var tt=!1;if((Ae===void 0||Ae<0)&&(Ae=0),Ae>this.length||((Ie===void 0||Ie>this.length)&&(Ie=this.length),Ie<=0)||(Ie>>>=0,Ae>>>=0,Ie<=Ae))return"";for(Ee||(Ee="utf8");;)switch(Ee){case"hex":return ze(this,Ae,Ie);case"utf8":case"utf-8":return Y(this,Ae,Ie);case"ascii":return _e(this,Ae,Ie);case"latin1":case"binary":return Le(this,Ae,Ie);case"base64":return oe(this,Ae,Ie);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Xe(this,Ae,Ie);default:if(tt)throw new TypeError("Unknown encoding: "+Ee);Ee=(Ee+"").toLowerCase(),tt=!0}}p.prototype._isBuffer=!0;function ge(Ee,Ae,Ie){var tt=Ee[Ae];Ee[Ae]=Ee[Ie],Ee[Ie]=tt}p.prototype.swap16=function(){var Ae=this.length;if(Ae%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var Ie=0;Ie<Ae;Ie+=2)ge(this,Ie,Ie+1);return this},p.prototype.swap32=function(){var Ae=this.length;if(Ae%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var Ie=0;Ie<Ae;Ie+=4)ge(this,Ie,Ie+3),ge(this,Ie+1,Ie+2);return this},p.prototype.swap64=function(){var Ae=this.length;if(Ae%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var Ie=0;Ie<Ae;Ie+=8)ge(this,Ie,Ie+7),ge(this,Ie+1,Ie+6),ge(this,Ie+2,Ie+5),ge(this,Ie+3,Ie+4);return this},p.prototype.toString=function(){var Ae=this.length;return Ae===0?"":arguments.length===0?Y(this,0,Ae):le.apply(this,arguments)},p.prototype.toLocaleString=p.prototype.toString,p.prototype.equals=function(Ae){if(!p.isBuffer(Ae))throw new TypeError("Argument must be a Buffer");return this===Ae?!0:p.compare(this,Ae)===0},p.prototype.inspect=function(){var Ae="",Ie=r.IS;return Ae=this.toString("hex",0,Ie).replace(/(.{2})/g,"$1 ").trim(),this.length>Ie&&(Ae+=" ... "),"<Buffer "+Ae+">"},b&&(p.prototype[b]=p.prototype.inspect),p.prototype.compare=function(Ae,Ie,tt,st,Bt){if(Qr(Ae,Uint8Array)&&(Ae=p.from(Ae,Ae.offset,Ae.byteLength)),!p.isBuffer(Ae))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+T(Ae));if(Ie===void 0&&(Ie=0),tt===void 0&&(tt=Ae?Ae.length:0),st===void 0&&(st=0),Bt===void 0&&(Bt=this.length),Ie<0||tt>Ae.length||st<0||Bt>this.length)throw new RangeError("out of range index");if(st>=Bt&&Ie>=tt)return 0;if(st>=Bt)return-1;if(Ie>=tt)return 1;if(Ie>>>=0,tt>>>=0,st>>>=0,Bt>>>=0,this===Ae)return 0;for(var Ft=Bt-st,Wt=tt-Ie,lr=Math.min(Ft,Wt),Rr=this.slice(st,Bt),Mr=Ae.slice(Ie,tt),Sr=0;Sr<lr;++Sr)if(Rr[Sr]!==Mr[Sr]){Ft=Rr[Sr],Wt=Mr[Sr];break}return Ft<Wt?-1:Wt<Ft?1:0};function de(Ee,Ae,Ie,tt,st){if(Ee.length===0)return-1;if(typeof Ie=="string"?(tt=Ie,Ie=0):Ie>2147483647?Ie=2147483647:Ie<-2147483648&&(Ie=-2147483648),Ie=+Ie,Ot(Ie)&&(Ie=st?0:Ee.length-1),Ie<0&&(Ie=Ee.length+Ie),Ie>=Ee.length){if(st)return-1;Ie=Ee.length-1}else if(Ie<0)if(st)Ie=0;else return-1;if(typeof Ae=="string"&&(Ae=p.from(Ae,tt)),p.isBuffer(Ae))return Ae.length===0?-1:me(Ee,Ae,Ie,tt,st);if(typeof Ae=="number")return Ae=Ae&255,typeof Uint8Array.prototype.indexOf=="function"?st?Uint8Array.prototype.indexOf.call(Ee,Ae,Ie):Uint8Array.prototype.lastIndexOf.call(Ee,Ae,Ie):me(Ee,[Ae],Ie,tt,st);throw new TypeError("val must be string, number or Buffer")}function me(Ee,Ae,Ie,tt,st){var Bt=1,Ft=Ee.length,Wt=Ae.length;if(tt!==void 0&&(tt=String(tt).toLowerCase(),tt==="ucs2"||tt==="ucs-2"||tt==="utf16le"||tt==="utf-16le")){if(Ee.length<2||Ae.length<2)return-1;Bt=2,Ft/=2,Wt/=2,Ie/=2}function lr(Hn,ga){return Bt===1?Hn[ga]:Hn.readUInt16BE(ga*Bt)}var Rr;if(st){var Mr=-1;for(Rr=Ie;Rr<Ft;Rr++)if(lr(Ee,Rr)===lr(Ae,Mr===-1?0:Rr-Mr)){if(Mr===-1&&(Mr=Rr),Rr-Mr+1===Wt)return Mr*Bt}else Mr!==-1&&(Rr-=Rr-Mr),Mr=-1}else for(Ie+Wt>Ft&&(Ie=Ft-Wt),Rr=Ie;Rr>=0;Rr--){for(var Sr=!0,Kr=0;Kr<Wt;Kr++)if(lr(Ee,Rr+Kr)!==lr(Ae,Kr)){Sr=!1;break}if(Sr)return Rr}return-1}p.prototype.includes=function(Ae,Ie,tt){return this.indexOf(Ae,Ie,tt)!==-1},p.prototype.indexOf=function(Ae,Ie,tt){return de(this,Ae,Ie,tt,!0)},p.prototype.lastIndexOf=function(Ae,Ie,tt){return de(this,Ae,Ie,tt,!1)};function W(Ee,Ae,Ie,tt){Ie=Number(Ie)||0;var st=Ee.length-Ie;tt?(tt=Number(tt),tt>st&&(tt=st)):tt=st;var Bt=Ae.length;tt>Bt/2&&(tt=Bt/2);var Ft;for(Ft=0;Ft<tt;++Ft){var Wt=parseInt(Ae.substr(Ft*2,2),16);if(Ot(Wt))return Ft;Ee[Ie+Ft]=Wt}return Ft}function ie(Ee,Ae,Ie,tt){return Br(mr(Ae,Ee.length-Ie),Ee,Ie,tt)}function se(Ee,Ae,Ie,tt){return Br(Ur(Ae),Ee,Ie,tt)}function ee(Ee,Ae,Ie,tt){return Br(fn(Ae),Ee,Ie,tt)}function pe(Ee,Ae,Ie,tt){return Br(jr(Ae,Ee.length-Ie),Ee,Ie,tt)}p.prototype.write=function(Ae,Ie,tt,st){if(Ie===void 0)st="utf8",tt=this.length,Ie=0;else if(tt===void 0&&typeof Ie=="string")st=Ie,tt=this.length,Ie=0;else if(isFinite(Ie))Ie=Ie>>>0,isFinite(tt)?(tt=tt>>>0,st===void 0&&(st="utf8")):(st=tt,tt=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Bt=this.length-Ie;if((tt===void 0||tt>Bt)&&(tt=Bt),Ae.length>0&&(tt<0||Ie<0)||Ie>this.length)throw new RangeError("Attempt to write outside buffer bounds");st||(st="utf8");for(var Ft=!1;;)switch(st){case"hex":return W(this,Ae,Ie,tt);case"utf8":case"utf-8":return ie(this,Ae,Ie,tt);case"ascii":case"latin1":case"binary":return se(this,Ae,Ie,tt);case"base64":return ee(this,Ae,Ie,tt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return pe(this,Ae,Ie,tt);default:if(Ft)throw new TypeError("Unknown encoding: "+st);st=(""+st).toLowerCase(),Ft=!0}},p.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function oe(Ee,Ae,Ie){return Ae===0&&Ie===Ee.length?M.fromByteArray(Ee):M.fromByteArray(Ee.slice(Ae,Ie))}function Y(Ee,Ae,Ie){Ie=Math.min(Ee.length,Ie);for(var tt=[],st=Ae;st<Ie;){var Bt=Ee[st],Ft=null,Wt=Bt>239?4:Bt>223?3:Bt>191?2:1;if(st+Wt<=Ie){var lr=void 0,Rr=void 0,Mr=void 0,Sr=void 0;switch(Wt){case 1:Bt<128&&(Ft=Bt);break;case 2:lr=Ee[st+1],(lr&192)===128&&(Sr=(Bt&31)<<6|lr&63,Sr>127&&(Ft=Sr));break;case 3:lr=Ee[st+1],Rr=Ee[st+2],(lr&192)===128&&(Rr&192)===128&&(Sr=(Bt&15)<<12|(lr&63)<<6|Rr&63,Sr>2047&&(Sr<55296||Sr>57343)&&(Ft=Sr));break;case 4:lr=Ee[st+1],Rr=Ee[st+2],Mr=Ee[st+3],(lr&192)===128&&(Rr&192)===128&&(Mr&192)===128&&(Sr=(Bt&15)<<18|(lr&63)<<12|(Rr&63)<<6|Mr&63,Sr>65535&&Sr<1114112&&(Ft=Sr))}}Ft===null?(Ft=65533,Wt=1):Ft>65535&&(Ft-=65536,tt.push(Ft>>>10&1023|55296),Ft=56320|Ft&1023),tt.push(Ft),st+=Wt}return ue(tt)}var ce=4096;function ue(Ee){var Ae=Ee.length;if(Ae<=ce)return String.fromCharCode.apply(String,Ee);for(var Ie="",tt=0;tt<Ae;)Ie+=String.fromCharCode.apply(String,Ee.slice(tt,tt+=ce));return Ie}function _e(Ee,Ae,Ie){var tt="";Ie=Math.min(Ee.length,Ie);for(var st=Ae;st<Ie;++st)tt+=String.fromCharCode(Ee[st]&127);return tt}function Le(Ee,Ae,Ie){var tt="";Ie=Math.min(Ee.length,Ie);for(var st=Ae;st<Ie;++st)tt+=String.fromCharCode(Ee[st]);return tt}function ze(Ee,Ae,Ie){var tt=Ee.length;(!Ae||Ae<0)&&(Ae=0),(!Ie||Ie<0||Ie>tt)&&(Ie=tt);for(var st="",Bt=Ae;Bt<Ie;++Bt)st+=$e[Ee[Bt]];return st}function Xe(Ee,Ae,Ie){for(var tt=Ee.slice(Ae,Ie),st="",Bt=0;Bt<tt.length-1;Bt+=2)st+=String.fromCharCode(tt[Bt]+tt[Bt+1]*256);return st}p.prototype.slice=function(Ae,Ie){var tt=this.length;Ae=~~Ae,Ie=Ie===void 0?tt:~~Ie,Ae<0?(Ae+=tt,Ae<0&&(Ae=0)):Ae>tt&&(Ae=tt),Ie<0?(Ie+=tt,Ie<0&&(Ie=0)):Ie>tt&&(Ie=tt),Ie<Ae&&(Ie=Ae);var st=this.subarray(Ae,Ie);return Object.setPrototypeOf(st,p.prototype),st};function Ve(Ee,Ae,Ie){if(Ee%1!==0||Ee<0)throw new RangeError("offset is not uint");if(Ee+Ae>Ie)throw new RangeError("Trying to access beyond buffer length")}p.prototype.readUintLE=p.prototype.readUIntLE=function(Ae,Ie,tt){Ae=Ae>>>0,Ie=Ie>>>0,tt||Ve(Ae,Ie,this.length);for(var st=this[Ae],Bt=1,Ft=0;++Ft<Ie&&(Bt*=256);)st+=this[Ae+Ft]*Bt;return st},p.prototype.readUintBE=p.prototype.readUIntBE=function(Ae,Ie,tt){Ae=Ae>>>0,Ie=Ie>>>0,tt||Ve(Ae,Ie,this.length);for(var st=this[Ae+--Ie],Bt=1;Ie>0&&(Bt*=256);)st+=this[Ae+--Ie]*Bt;return st},p.prototype.readUint8=p.prototype.readUInt8=function(Ae,Ie){return Ae=Ae>>>0,Ie||Ve(Ae,1,this.length),this[Ae]},p.prototype.readUint16LE=p.prototype.readUInt16LE=function(Ae,Ie){return Ae=Ae>>>0,Ie||Ve(Ae,2,this.length),this[Ae]|this[Ae+1]<<8},p.prototype.readUint16BE=p.prototype.readUInt16BE=function(Ae,Ie){return Ae=Ae>>>0,Ie||Ve(Ae,2,this.length),this[Ae]<<8|this[Ae+1]},p.prototype.readUint32LE=p.prototype.readUInt32LE=function(Ae,Ie){return Ae=Ae>>>0,Ie||Ve(Ae,4,this.length),(this[Ae]|this[Ae+1]<<8|this[Ae+2]<<16)+this[Ae+3]*16777216},p.prototype.readUint32BE=p.prototype.readUInt32BE=function(Ae,Ie){return Ae=Ae>>>0,Ie||Ve(Ae,4,this.length),this[Ae]*16777216+(this[Ae+1]<<16|this[Ae+2]<<8|this[Ae+3])},p.prototype.readBigUInt64LE=ot(function(Ae){Ae=Ae>>>0,ht(Ae,"offset");var Ie=this[Ae],tt=this[Ae+7];(Ie===void 0||tt===void 0)&&Yt(Ae,this.length-8);var st=Ie+this[++Ae]*Math.pow(2,8)+this[++Ae]*Math.pow(2,16)+this[++Ae]*Math.pow(2,24),Bt=this[++Ae]+this[++Ae]*Math.pow(2,8)+this[++Ae]*Math.pow(2,16)+tt*Math.pow(2,24);return BigInt(st)+(BigInt(Bt)<<BigInt(32))}),p.prototype.readBigUInt64BE=ot(function(Ae){Ae=Ae>>>0,ht(Ae,"offset");var Ie=this[Ae],tt=this[Ae+7];(Ie===void 0||tt===void 0)&&Yt(Ae,this.length-8);var st=Ie*Math.pow(2,24)+this[++Ae]*Math.pow(2,16)+this[++Ae]*Math.pow(2,8)+this[++Ae],Bt=this[++Ae]*Math.pow(2,24)+this[++Ae]*Math.pow(2,16)+this[++Ae]*Math.pow(2,8)+tt;return(BigInt(st)<<BigInt(32))+BigInt(Bt)}),p.prototype.readIntLE=function(Ae,Ie,tt){Ae=Ae>>>0,Ie=Ie>>>0,tt||Ve(Ae,Ie,this.length);for(var st=this[Ae],Bt=1,Ft=0;++Ft<Ie&&(Bt*=256);)st+=this[Ae+Ft]*Bt;return Bt*=128,st>=Bt&&(st-=Math.pow(2,8*Ie)),st},p.prototype.readIntBE=function(Ae,Ie,tt){Ae=Ae>>>0,Ie=Ie>>>0,tt||Ve(Ae,Ie,this.length);for(var st=Ie,Bt=1,Ft=this[Ae+--st];st>0&&(Bt*=256);)Ft+=this[Ae+--st]*Bt;return Bt*=128,Ft>=Bt&&(Ft-=Math.pow(2,8*Ie)),Ft},p.prototype.readInt8=function(Ae,Ie){return Ae=Ae>>>0,Ie||Ve(Ae,1,this.length),this[Ae]&128?(255-this[Ae]+1)*-1:this[Ae]},p.prototype.readInt16LE=function(Ae,Ie){Ae=Ae>>>0,Ie||Ve(Ae,2,this.length);var tt=this[Ae]|this[Ae+1]<<8;return tt&32768?tt|4294901760:tt},p.prototype.readInt16BE=function(Ae,Ie){Ae=Ae>>>0,Ie||Ve(Ae,2,this.length);var tt=this[Ae+1]|this[Ae]<<8;return tt&32768?tt|4294901760:tt},p.prototype.readInt32LE=function(Ae,Ie){return Ae=Ae>>>0,Ie||Ve(Ae,4,this.length),this[Ae]|this[Ae+1]<<8|this[Ae+2]<<16|this[Ae+3]<<24},p.prototype.readInt32BE=function(Ae,Ie){return Ae=Ae>>>0,Ie||Ve(Ae,4,this.length),this[Ae]<<24|this[Ae+1]<<16|this[Ae+2]<<8|this[Ae+3]},p.prototype.readBigInt64LE=ot(function(Ae){Ae=Ae>>>0,ht(Ae,"offset");var Ie=this[Ae],tt=this[Ae+7];(Ie===void 0||tt===void 0)&&Yt(Ae,this.length-8);var st=this[Ae+4]+this[Ae+5]*Math.pow(2,8)+this[Ae+6]*Math.pow(2,16)+(tt<<24);return(BigInt(st)<<BigInt(32))+BigInt(Ie+this[++Ae]*Math.pow(2,8)+this[++Ae]*Math.pow(2,16)+this[++Ae]*Math.pow(2,24))}),p.prototype.readBigInt64BE=ot(function(Ae){Ae=Ae>>>0,ht(Ae,"offset");var Ie=this[Ae],tt=this[Ae+7];(Ie===void 0||tt===void 0)&&Yt(Ae,this.length-8);var st=(Ie<<24)+this[++Ae]*Math.pow(2,16)+this[++Ae]*Math.pow(2,8)+this[++Ae];return(BigInt(st)<<BigInt(32))+BigInt(this[++Ae]*Math.pow(2,24)+this[++Ae]*Math.pow(2,16)+this[++Ae]*Math.pow(2,8)+tt)}),p.prototype.readFloatLE=function(Ae,Ie){return Ae=Ae>>>0,Ie||Ve(Ae,4,this.length),k.read(this,Ae,!0,23,4)},p.prototype.readFloatBE=function(Ae,Ie){return Ae=Ae>>>0,Ie||Ve(Ae,4,this.length),k.read(this,Ae,!1,23,4)},p.prototype.readDoubleLE=function(Ae,Ie){return Ae=Ae>>>0,Ie||Ve(Ae,8,this.length),k.read(this,Ae,!0,52,8)},p.prototype.readDoubleBE=function(Ae,Ie){return Ae=Ae>>>0,Ie||Ve(Ae,8,this.length),k.read(this,Ae,!1,52,8)};function rt(Ee,Ae,Ie,tt,st,Bt){if(!p.isBuffer(Ee))throw new TypeError('"buffer" argument must be a Buffer instance');if(Ae>st||Ae<Bt)throw new RangeError('"value" argument is out of bounds');if(Ie+tt>Ee.length)throw new RangeError("Index out of range")}p.prototype.writeUintLE=p.prototype.writeUIntLE=function(Ae,Ie,tt,st){if(Ae=+Ae,Ie=Ie>>>0,tt=tt>>>0,!st){var Bt=Math.pow(2,8*tt)-1;rt(this,Ae,Ie,tt,Bt,0)}var Ft=1,Wt=0;for(this[Ie]=Ae&255;++Wt<tt&&(Ft*=256);)this[Ie+Wt]=Ae/Ft&255;return Ie+tt},p.prototype.writeUintBE=p.prototype.writeUIntBE=function(Ae,Ie,tt,st){if(Ae=+Ae,Ie=Ie>>>0,tt=tt>>>0,!st){var Bt=Math.pow(2,8*tt)-1;rt(this,Ae,Ie,tt,Bt,0)}var Ft=tt-1,Wt=1;for(this[Ie+Ft]=Ae&255;--Ft>=0&&(Wt*=256);)this[Ie+Ft]=Ae/Wt&255;return Ie+tt},p.prototype.writeUint8=p.prototype.writeUInt8=function(Ae,Ie,tt){return Ae=+Ae,Ie=Ie>>>0,tt||rt(this,Ae,Ie,1,255,0),this[Ie]=Ae&255,Ie+1},p.prototype.writeUint16LE=p.prototype.writeUInt16LE=function(Ae,Ie,tt){return Ae=+Ae,Ie=Ie>>>0,tt||rt(this,Ae,Ie,2,65535,0),this[Ie]=Ae&255,this[Ie+1]=Ae>>>8,Ie+2},p.prototype.writeUint16BE=p.prototype.writeUInt16BE=function(Ae,Ie,tt){return Ae=+Ae,Ie=Ie>>>0,tt||rt(this,Ae,Ie,2,65535,0),this[Ie]=Ae>>>8,this[Ie+1]=Ae&255,Ie+2},p.prototype.writeUint32LE=p.prototype.writeUInt32LE=function(Ae,Ie,tt){return Ae=+Ae,Ie=Ie>>>0,tt||rt(this,Ae,Ie,4,4294967295,0),this[Ie+3]=Ae>>>24,this[Ie+2]=Ae>>>16,this[Ie+1]=Ae>>>8,this[Ie]=Ae&255,Ie+4},p.prototype.writeUint32BE=p.prototype.writeUInt32BE=function(Ae,Ie,tt){return Ae=+Ae,Ie=Ie>>>0,tt||rt(this,Ae,Ie,4,4294967295,0),this[Ie]=Ae>>>24,this[Ie+1]=Ae>>>16,this[Ie+2]=Ae>>>8,this[Ie+3]=Ae&255,Ie+4};function mt(Ee,Ae,Ie,tt,st){wt(Ae,tt,st,Ee,Ie,7);var Bt=Number(Ae&BigInt(4294967295));Ee[Ie++]=Bt,Bt=Bt>>8,Ee[Ie++]=Bt,Bt=Bt>>8,Ee[Ie++]=Bt,Bt=Bt>>8,Ee[Ie++]=Bt;var Ft=Number(Ae>>BigInt(32)&BigInt(4294967295));return Ee[Ie++]=Ft,Ft=Ft>>8,Ee[Ie++]=Ft,Ft=Ft>>8,Ee[Ie++]=Ft,Ft=Ft>>8,Ee[Ie++]=Ft,Ie}function _t(Ee,Ae,Ie,tt,st){wt(Ae,tt,st,Ee,Ie,7);var Bt=Number(Ae&BigInt(4294967295));Ee[Ie+7]=Bt,Bt=Bt>>8,Ee[Ie+6]=Bt,Bt=Bt>>8,Ee[Ie+5]=Bt,Bt=Bt>>8,Ee[Ie+4]=Bt;var Ft=Number(Ae>>BigInt(32)&BigInt(4294967295));return Ee[Ie+3]=Ft,Ft=Ft>>8,Ee[Ie+2]=Ft,Ft=Ft>>8,Ee[Ie+1]=Ft,Ft=Ft>>8,Ee[Ie]=Ft,Ie+8}p.prototype.writeBigUInt64LE=ot(function(Ae){var Ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return mt(this,Ae,Ie,BigInt(0),BigInt("0xffffffffffffffff"))}),p.prototype.writeBigUInt64BE=ot(function(Ae){var Ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return _t(this,Ae,Ie,BigInt(0),BigInt("0xffffffffffffffff"))}),p.prototype.writeIntLE=function(Ae,Ie,tt,st){if(Ae=+Ae,Ie=Ie>>>0,!st){var Bt=Math.pow(2,8*tt-1);rt(this,Ae,Ie,tt,Bt-1,-Bt)}var Ft=0,Wt=1,lr=0;for(this[Ie]=Ae&255;++Ft<tt&&(Wt*=256);)Ae<0&&lr===0&&this[Ie+Ft-1]!==0&&(lr=1),this[Ie+Ft]=(Ae/Wt>>0)-lr&255;return Ie+tt},p.prototype.writeIntBE=function(Ae,Ie,tt,st){if(Ae=+Ae,Ie=Ie>>>0,!st){var Bt=Math.pow(2,8*tt-1);rt(this,Ae,Ie,tt,Bt-1,-Bt)}var Ft=tt-1,Wt=1,lr=0;for(this[Ie+Ft]=Ae&255;--Ft>=0&&(Wt*=256);)Ae<0&&lr===0&&this[Ie+Ft+1]!==0&&(lr=1),this[Ie+Ft]=(Ae/Wt>>0)-lr&255;return Ie+tt},p.prototype.writeInt8=function(Ae,Ie,tt){return Ae=+Ae,Ie=Ie>>>0,tt||rt(this,Ae,Ie,1,127,-128),Ae<0&&(Ae=255+Ae+1),this[Ie]=Ae&255,Ie+1},p.prototype.writeInt16LE=function(Ae,Ie,tt){return Ae=+Ae,Ie=Ie>>>0,tt||rt(this,Ae,Ie,2,32767,-32768),this[Ie]=Ae&255,this[Ie+1]=Ae>>>8,Ie+2},p.prototype.writeInt16BE=function(Ae,Ie,tt){return Ae=+Ae,Ie=Ie>>>0,tt||rt(this,Ae,Ie,2,32767,-32768),this[Ie]=Ae>>>8,this[Ie+1]=Ae&255,Ie+2},p.prototype.writeInt32LE=function(Ae,Ie,tt){return Ae=+Ae,Ie=Ie>>>0,tt||rt(this,Ae,Ie,4,2147483647,-2147483648),this[Ie]=Ae&255,this[Ie+1]=Ae>>>8,this[Ie+2]=Ae>>>16,this[Ie+3]=Ae>>>24,Ie+4},p.prototype.writeInt32BE=function(Ae,Ie,tt){return Ae=+Ae,Ie=Ie>>>0,tt||rt(this,Ae,Ie,4,2147483647,-2147483648),Ae<0&&(Ae=4294967295+Ae+1),this[Ie]=Ae>>>24,this[Ie+1]=Ae>>>16,this[Ie+2]=Ae>>>8,this[Ie+3]=Ae&255,Ie+4},p.prototype.writeBigInt64LE=ot(function(Ae){var Ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return mt(this,Ae,Ie,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),p.prototype.writeBigInt64BE=ot(function(Ae){var Ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return _t(this,Ae,Ie,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function vt(Ee,Ae,Ie,tt,st,Bt){if(Ie+tt>Ee.length)throw new RangeError("Index out of range");if(Ie<0)throw new RangeError("Index out of range")}function ut(Ee,Ae,Ie,tt,st){return Ae=+Ae,Ie=Ie>>>0,st||vt(Ee,Ae,Ie,4),k.write(Ee,Ae,Ie,tt,23,4),Ie+4}p.prototype.writeFloatLE=function(Ae,Ie,tt){return ut(this,Ae,Ie,!0,tt)},p.prototype.writeFloatBE=function(Ae,Ie,tt){return ut(this,Ae,Ie,!1,tt)};function Fe(Ee,Ae,Ie,tt,st){return Ae=+Ae,Ie=Ie>>>0,st||vt(Ee,Ae,Ie,8),k.write(Ee,Ae,Ie,tt,52,8),Ie+8}p.prototype.writeDoubleLE=function(Ae,Ie,tt){return Fe(this,Ae,Ie,!0,tt)},p.prototype.writeDoubleBE=function(Ae,Ie,tt){return Fe(this,Ae,Ie,!1,tt)},p.prototype.copy=function(Ae,Ie,tt,st){if(!p.isBuffer(Ae))throw new TypeError("argument should be a Buffer");if(tt||(tt=0),!st&&st!==0&&(st=this.length),Ie>=Ae.length&&(Ie=Ae.length),Ie||(Ie=0),st>0&&st<tt&&(st=tt),st===tt||Ae.length===0||this.length===0)return 0;if(Ie<0)throw new RangeError("targetStart out of bounds");if(tt<0||tt>=this.length)throw new RangeError("Index out of range");if(st<0)throw new RangeError("sourceEnd out of bounds");st>this.length&&(st=this.length),Ae.length-Ie<st-tt&&(st=Ae.length-Ie+tt);var Bt=st-tt;return this===Ae&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(Ie,tt,st):Uint8Array.prototype.set.call(Ae,this.subarray(tt,st),Ie),Bt},p.prototype.fill=function(Ae,Ie,tt,st){if(typeof Ae=="string"){if(typeof Ie=="string"?(st=Ie,Ie=0,tt=this.length):typeof tt=="string"&&(st=tt,tt=this.length),st!==void 0&&typeof st!="string")throw new TypeError("encoding must be a string");if(typeof st=="string"&&!p.isEncoding(st))throw new TypeError("Unknown encoding: "+st);if(Ae.length===1){var Bt=Ae.charCodeAt(0);(st==="utf8"&&Bt<128||st==="latin1")&&(Ae=Bt)}}else typeof Ae=="number"?Ae=Ae&255:typeof Ae=="boolean"&&(Ae=Number(Ae));if(Ie<0||this.length<Ie||this.length<tt)throw new RangeError("Out of range index");if(tt<=Ie)return this;Ie=Ie>>>0,tt=tt===void 0?this.length:tt>>>0,Ae||(Ae=0);var Ft;if(typeof Ae=="number")for(Ft=Ie;Ft<tt;++Ft)this[Ft]=Ae;else{var Wt=p.isBuffer(Ae)?Ae:p.from(Ae,st),lr=Wt.length;if(lr===0)throw new TypeError('The value "'+Ae+'" is invalid for argument "value"');for(Ft=0;Ft<tt-Ie;++Ft)this[Ft+Ie]=Wt[Ft%lr]}return this};var Pe={};function be(Ee,Ae,Ie){Pe[Ee]=(function(tt){function st(){var Bt;return l(this,st),Bt=d(this,st),Object.defineProperty(Bt,"message",{value:Ae.apply(Bt,arguments),writable:!0,configurable:!0}),Bt.name="".concat(Bt.name," [").concat(Ee,"]"),Bt.stack,delete Bt.name,Bt}return c(st,tt),s(st,[{key:"code",get:function(){return Ee},set:function(Ft){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:Ft,writable:!0})}},{key:"toString",value:function(){return"".concat(this.name," [").concat(Ee,"]: ").concat(this.message)}}])})(Ie)}be("ERR_BUFFER_OUT_OF_BOUNDS",function(Ee){return Ee?"".concat(Ee," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"},RangeError),be("ERR_INVALID_ARG_TYPE",function(Ee,Ae){return'The "'.concat(Ee,'" argument must be of type number. Received type ').concat(T(Ae))},TypeError),be("ERR_OUT_OF_RANGE",function(Ee,Ae,Ie){var tt='The value of "'.concat(Ee,'" is out of range.'),st=Ie;return Number.isInteger(Ie)&&Math.abs(Ie)>Math.pow(2,32)?st=Ye(String(Ie)):typeof Ie=="bigint"&&(st=String(Ie),(Ie>Math.pow(BigInt(2),BigInt(32))||Ie<-Math.pow(BigInt(2),BigInt(32)))&&(st=Ye(st)),st+="n"),tt+=" It must be ".concat(Ae,". Received ").concat(st),tt},RangeError);function Ye(Ee){for(var Ae="",Ie=Ee.length,tt=Ee[0]==="-"?1:0;Ie>=tt+4;Ie-=3)Ae="_".concat(Ee.slice(Ie-3,Ie)).concat(Ae);return"".concat(Ee.slice(0,Ie)).concat(Ae)}function yt(Ee,Ae,Ie){ht(Ae,"offset"),(Ee[Ae]===void 0||Ee[Ae+Ie]===void 0)&&Yt(Ae,Ee.length-(Ie+1))}function wt(Ee,Ae,Ie,tt,st,Bt){if(Ee>Ie||Ee<Ae){var Ft=typeof Ae=="bigint"?"n":"",Wt;throw Ae===0||Ae===BigInt(0)?Wt=">= 0".concat(Ft," and < 2").concat(Ft," ** ").concat((Bt+1)*8).concat(Ft):Wt=">= -(2".concat(Ft," ** ").concat((Bt+1)*8-1).concat(Ft,") and < 2 ** ")+"".concat((Bt+1)*8-1).concat(Ft),new Pe.ERR_OUT_OF_RANGE("value",Wt,Ee)}yt(tt,st,Bt)}function ht(Ee,Ae){if(typeof Ee!="number")throw new Pe.ERR_INVALID_ARG_TYPE(Ae,"number",Ee)}function Yt(Ee,Ae,Ie){throw Math.floor(Ee)!==Ee?(ht(Ee,Ie),new Pe.ERR_OUT_OF_RANGE("offset","an integer",Ee)):Ae<0?new Pe.ERR_BUFFER_OUT_OF_BOUNDS:new Pe.ERR_OUT_OF_RANGE("offset",">= ".concat(0," and <= ").concat(Ae),Ee)}var $t=/[^+/0-9A-Za-z-_]/g;function fr(Ee){if(Ee=Ee.split("=")[0],Ee=Ee.trim().replace($t,""),Ee.length<2)return"";for(;Ee.length%4!==0;)Ee=Ee+"=";return Ee}function mr(Ee,Ae){Ae=Ae||1/0;for(var Ie,tt=Ee.length,st=null,Bt=[],Ft=0;Ft<tt;++Ft){if(Ie=Ee.charCodeAt(Ft),Ie>55295&&Ie<57344){if(!st){if(Ie>56319){(Ae-=3)>-1&&Bt.push(239,191,189);continue}else if(Ft+1===tt){(Ae-=3)>-1&&Bt.push(239,191,189);continue}st=Ie;continue}if(Ie<56320){(Ae-=3)>-1&&Bt.push(239,191,189),st=Ie;continue}Ie=(st-55296<<10|Ie-56320)+65536}else st&&(Ae-=3)>-1&&Bt.push(239,191,189);if(st=null,Ie<128){if((Ae-=1)<0)break;Bt.push(Ie)}else if(Ie<2048){if((Ae-=2)<0)break;Bt.push(Ie>>6|192,Ie&63|128)}else if(Ie<65536){if((Ae-=3)<0)break;Bt.push(Ie>>12|224,Ie>>6&63|128,Ie&63|128)}else if(Ie<1114112){if((Ae-=4)<0)break;Bt.push(Ie>>18|240,Ie>>12&63|128,Ie>>6&63|128,Ie&63|128)}else throw new Error("Invalid code point")}return Bt}function Ur(Ee){for(var Ae=[],Ie=0;Ie<Ee.length;++Ie)Ae.push(Ee.charCodeAt(Ie)&255);return Ae}function jr(Ee,Ae){for(var Ie,tt,st,Bt=[],Ft=0;Ft<Ee.length&&!((Ae-=2)<0);++Ft)Ie=Ee.charCodeAt(Ft),tt=Ie>>8,st=Ie%256,Bt.push(st),Bt.push(tt);return Bt}function fn(Ee){return M.toByteArray(fr(Ee))}function Br(Ee,Ae,Ie,tt){var st;for(st=0;st<tt&&!(st+Ie>=Ae.length||st>=Ee.length);++st)Ae[st+Ie]=Ee[st];return st}function Qr(Ee,Ae){return Ee instanceof Ae||Ee!=null&&Ee.constructor!=null&&Ee.constructor.name!=null&&Ee.constructor.name===Ae.name}function Ot(Ee){return Ee!==Ee}var $e=(function(){for(var Ee="0123456789abcdef",Ae=new Array(256),Ie=0;Ie<16;++Ie)for(var tt=Ie*16,st=0;st<16;++st)Ae[tt+st]=Ee[Ie]+Ee[st];return Ae})();function ot(Ee){return typeof BigInt>"u"?De:Ee}function De(){throw new Error("BigInt not supported")}}),4844:(function(t){t.exports=r;function r(a,l,i,s){return a[0]=l[0]+i[0]*s,a[1]=l[1]+i[1]*s,a[2]=l[2]+i[2]*s,a[3]=l[3]+i[3]*s,a}}),4905:(function(t,r,a){var l=a(5874);t.exports=i;function i(s,o){var u=l(o),d=[];return d=d.concat(u(s)),d=d.concat(u(null)),d}}),4935:(function(t,r,a){t.exports=_;var l=a(2762),i=a(8116),s=a(4359),o=a(1879).Q,u=window||process.global||{},d=u.__TEXT_CACHE||{};u.__TEXT_CACHE={};var h=3;function g(T,M,k,b){this.gl=T,this.shader=M,this.buffer=k,this.vao=b,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}var m=g.prototype,E=[0,0];m.bind=function(T,M,k,b){this.vao.bind(),this.shader.bind();var A=this.shader.uniforms;A.model=T,A.view=M,A.projection=k,A.pixelScale=b,E[0]=this.gl.drawingBufferWidth,E[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=E},m.unbind=function(){this.vao.unbind()},m.update=function(T,M,k,b,A){var y=[];function f(H,G,J,le,ge,de){var me=[J.style,J.weight,J.variant,J.family].join("_"),W=d[me];W||(W=d[me]={});var ie=W[G];ie||(ie=W[G]=c(G,{triangles:!0,font:J.family,fontStyle:J.style,fontWeight:J.weight,fontVariant:J.variant,textAlign:"center",textBaseline:"middle",lineSpacing:ge,styletags:de}));for(var se=(le||12)/12,ee=ie.positions,pe=ie.cells,oe=0,Y=pe.length;oe<Y;++oe)for(var ce=pe[oe],ue=2;ue>=0;--ue){var _e=ee[ce[ue]];y.push(se*_e[0],-se*_e[1],H)}}for(var p=[0,0,0],x=[0,0,0],N=[0,0,0],D=[0,0,0],B=1.25,U={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},V=0;V<3;++V){N[V]=y.length/h|0,f(.5*(T[0][V]+T[1][V]),M[V],k[V],12,B,U),D[V]=(y.length/h|0)-N[V],p[V]=y.length/h|0;for(var q=0;q<b[V].length;++q)if(b[V][q].text){var z={family:b[V][q].font||A[V].family,style:A[V].fontStyle||A[V].style,weight:A[V].fontWeight||A[V].weight,variant:A[V].fontVariant||A[V].variant};f(b[V][q].x,b[V][q].text,z,b[V][q].fontSize||12,B,U)}x[V]=(y.length/h|0)-p[V]}this.buffer.update(y),this.tickOffset=p,this.tickCount=x,this.labelOffset=N,this.labelCount=D},m.drawTicks=function(T,M,k,b,A,y,f,p){this.tickCount[T]&&(this.shader.uniforms.axis=y,this.shader.uniforms.color=A,this.shader.uniforms.angle=k,this.shader.uniforms.scale=M,this.shader.uniforms.offset=b,this.shader.uniforms.alignDir=f,this.shader.uniforms.alignOpt=p,this.vao.draw(this.gl.TRIANGLES,this.tickCount[T],this.tickOffset[T]))},m.drawLabel=function(T,M,k,b,A,y,f,p){this.labelCount[T]&&(this.shader.uniforms.axis=y,this.shader.uniforms.color=A,this.shader.uniforms.angle=k,this.shader.uniforms.scale=M,this.shader.uniforms.offset=b,this.shader.uniforms.alignDir=f,this.shader.uniforms.alignOpt=p,this.vao.draw(this.gl.TRIANGLES,this.labelCount[T],this.labelOffset[T]))},m.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()};function c(T,M){try{return s(T,M)}catch(k){return console.warn('error vectorizing text:"'+T+'" error:',k),{cells:[],positions:[]}}}function _(T,M,k,b,A,y){var f=l(T),p=i(T,[{buffer:f,size:3}]),x=o(T);x.attributes.position.location=0;var N=new g(T,x,f,p);return N.update(M,k,b,A,y),N}}),5023:(function(t,r,a){var l=a(2478);t.exports=h;function i(g,m,E,c,_,T,M){this.cells=g,this.neighbor=m,this.flags=c,this.constraint=E,this.active=_,this.next=T,this.boundary=M}var s=i.prototype;function o(g,m){return g[0]-m[0]||g[1]-m[1]||g[2]-m[2]}s.locate=(function(){var g=[0,0,0];return function(m,E,c){var _=m,T=E,M=c;return E<c?E<m&&(_=E,T=c,M=m):c<m&&(_=c,T=m,M=E),_<0?-1:(g[0]=_,g[1]=T,g[2]=M,l.eq(this.cells,g,o))}})();function u(g,m){for(var E=g.cells(),c=E.length,_=0;_<c;++_){var T=E[_],M=T[0],k=T[1],b=T[2];k<b?k<M&&(T[0]=k,T[1]=b,T[2]=M):b<M&&(T[0]=b,T[1]=M,T[2]=k)}E.sort(o);for(var A=new Array(c),_=0;_<A.length;++_)A[_]=0;var y=[],f=[],p=new Array(3*c),x=new Array(3*c),N=null;m&&(N=[]);for(var D=new i(E,p,x,A,y,f,N),_=0;_<c;++_)for(var T=E[_],B=0;B<3;++B){var M=T[B],k=T[(B+1)%3],U=p[3*_+B]=D.locate(k,M,g.opposite(k,M)),V=x[3*_+B]=g.isConstraint(M,k);U<0&&(V?f.push(_):(y.push(_),A[_]=1),m&&N.push([k,M,-1]))}return D}function d(g,m,E){for(var c=0,_=0;_<g.length;++_)m[_]===E&&(g[c++]=g[_]);return g.length=c,g}function h(g,m,E){var c=u(g,E);if(m===0)return E?c.cells.concat(c.boundary):c.cells;for(var _=1,T=c.active,M=c.next,k=c.flags,b=c.cells,A=c.constraint,y=c.neighbor;T.length>0||M.length>0;){for(;T.length>0;){var f=T.pop();if(k[f]!==-_){k[f]=_,b[f];for(var p=0;p<3;++p){var x=y[3*f+p];x>=0&&k[x]===0&&(A[3*f+p]?M.push(x):(T.push(x),k[x]=_))}}}var N=M;M=T,T=N,M.length=0,_=-_}var D=d(b,k,m);return E?D.concat(c.boundary):D}}),5033:(function(t){t.exports=r;function r(a,l,i){var s=l||0,o=i||1;return[[a[12]+a[0],a[13]+a[1],a[14]+a[2],a[15]+a[3]],[a[12]-a[0],a[13]-a[1],a[14]-a[2],a[15]-a[3]],[a[12]+a[4],a[13]+a[5],a[14]+a[6],a[15]+a[7]],[a[12]-a[4],a[13]-a[5],a[14]-a[6],a[15]-a[7]],[s*a[12]+a[8],s*a[13]+a[9],s*a[14]+a[10],s*a[15]+a[11]],[o*a[12]-a[8],o*a[13]-a[9],o*a[14]-a[10],o*a[15]-a[11]]]}}),5085:(function(t,r,a){t.exports=_;var l=a(3250)[3],i=a(4209),s=a(3352),o=a(2478);function u(){return!0}function d(T){return function(M,k){var b=T[M];return b?!!b.queryPoint(k,u):!1}}function h(T){for(var M={},k=0;k<T.length;++k){var b=T[k],A=b[0][0],y=b[0][1],f=b[1][1],p=[Math.min(y,f),Math.max(y,f)];A in M?M[A].push(p):M[A]=[p]}for(var x={},N=Object.keys(M),k=0;k<N.length;++k){var D=M[N[k]];x[N[k]]=s(D)}return d(x)}function g(T,M){return function(k){var b=o.le(M,k[0]);if(b<0)return 1;var A=T[b];if(!A)if(b>0&&M[b]===k[0])A=T[b-1];else return 1;for(var y=1;A;){var f=A.key,p=l(k,f[0],f[1]);if(f[0][0]<f[1][0])if(p<0)A=A.left;else if(p>0)y=-1,A=A.right;else return 0;else if(p>0)A=A.left;else if(p<0)y=1,A=A.right;else return 0}return y}}function m(T){return 1}function E(T){return function(k){return T(k[0],k[1])?0:1}}function c(T,M){return function(b){return T(b[0],b[1])?0:M(b)}}function _(T){for(var M=T.length,k=[],b=[],A=0;A<M;++A)for(var y=T[A],f=y.length,p=f-1,x=0;x<f;p=x++){var N=y[p],D=y[x];N[0]===D[0]?b.push([N,D]):k.push([N,D])}if(k.length===0)return b.length===0?m:E(h(b));var B=i(k),U=g(B.slabs,B.coordinates);return b.length===0?U:c(h(b),U)}}),5091:(function(t,r,a){r.shader=_,r.program=T;var l=a(8866),i=a(2992),s=typeof WeakMap>"u"?a(606):WeakMap,o=new s,u=0;function d(M,k,b,A,y,f,p){this.id=M,this.src=k,this.type=b,this.shader=A,this.count=f,this.programs=[],this.cache=p}d.prototype.dispose=function(){if(--this.count===0){for(var M=this.cache,k=M.gl,b=this.programs,A=0,y=b.length;A<y;++A){var f=M.programs[b[A]];f&&(delete M.programs[A],k.deleteProgram(f))}k.deleteShader(this.shader),delete M.shaders[this.type===k.FRAGMENT_SHADER|0][this.src]}};function h(M){this.gl=M,this.shaders=[{},{}],this.programs={}}var g=h.prototype;function m(M,k,b){var A=M.createShader(k);if(M.shaderSource(A,b),M.compileShader(A),!M.getShaderParameter(A,M.COMPILE_STATUS)){var y=M.getShaderInfoLog(A);try{var f=i(y,b,k)}catch(p){throw console.warn("Failed to format compiler error: "+p),new l(y,`Error compiling shader:
`+y)}throw new l(y,f.short,f.long)}return A}g.getShaderReference=function(M,k){var b=this.gl,A=this.shaders[M===b.FRAGMENT_SHADER|0],y=A[k];if(!y||!b.isShader(y.shader)){var f=m(b,M,k);y=A[k]=new d(u++,k,M,f,[],1,this)}else y.count+=1;return y};function E(M,k,b,A,y){var f=M.createProgram();M.attachShader(f,k),M.attachShader(f,b);for(var p=0;p<A.length;++p)M.bindAttribLocation(f,y[p],A[p]);if(M.linkProgram(f),!M.getProgramParameter(f,M.LINK_STATUS)){var x=M.getProgramInfoLog(f);throw new l(x,"Error linking program: "+x)}return f}g.getProgram=function(M,k,b,A){var y=[M.id,k.id,b.join(":"),A.join(":")].join("@"),f=this.programs[y];return(!f||!this.gl.isProgram(f))&&(this.programs[y]=f=E(this.gl,M.shader,k.shader,b,A),M.programs.push(y),k.programs.push(y)),f};function c(M){var k=o.get(M);return k||(k=new h(M),o.set(M,k)),k}function _(M,k,b){return c(M).getShaderReference(k,b)}function T(M,k,b,A,y){return c(M).getProgram(k,b,A,y)}}),5093:(function(t){t.exports=r;function r(a,l){return a[0]=-l[0],a[1]=-l[1],a[2]=-l[2],a}}),5137:(function(t,r,a){t.exports=i;var l=a(1091)();function i(s,o,u,d,h,g){var m,E;for(o||(o=3),u||(u=0),d?E=Math.min(d*o+u,s.length):E=s.length,m=u;m<E;m+=o)l[0]=s[m],l[1]=s[m+1],l[2]=s[m+2],h(l,l,g),s[m]=l[0],s[m+1]=l[1],s[m+2]=l[2];return s}}),5171:(function(t,r,a){var l=a(737);t.exports=function(s){return l[s]}}),5177:(function(t){t.exports=r;function r(a,l){var i=l[0],s=l[1],o=l[2],u=l[3],d=i*i+s*s+o*o+u*u;return d>0&&(d=1/Math.sqrt(d),a[0]=i*d,a[1]=s*d,a[2]=o*d,a[3]=u*d),a}}),5202:(function(t,r,a){var l=a(1944),i=a(8210);t.exports=u,t.exports.positive=d,t.exports.negative=h;function s(g,m){var E=i(l(g,m),[m[m.length-1]]);return E[E.length-1]}function o(g,m,E,c){var _=c-m,T=-m/_;T<0?T=0:T>1&&(T=1);for(var M=1-T,k=g.length,b=new Array(k),A=0;A<k;++A)b[A]=T*g[A]+M*E[A];return b}function u(g,m){for(var E=[],c=[],_=s(g[g.length-1],m),T=g[g.length-1],M=g[0],k=0;k<g.length;++k,T=M){M=g[k];var b=s(M,m);if(_<0&&b>0||_>0&&b<0){var A=o(T,b,M,_);E.push(A),c.push(A.slice())}b<0?c.push(M.slice()):b>0?E.push(M.slice()):(E.push(M.slice()),c.push(M.slice())),_=b}return{positive:E,negative:c}}function d(g,m){for(var E=[],c=s(g[g.length-1],m),_=g[g.length-1],T=g[0],M=0;M<g.length;++M,_=T){T=g[M];var k=s(T,m);(c<0&&k>0||c>0&&k<0)&&E.push(o(_,k,T,c)),k>=0&&E.push(T.slice()),c=k}return E}function h(g,m){for(var E=[],c=s(g[g.length-1],m),_=g[g.length-1],T=g[0],M=0;M<g.length;++M,_=T){T=g[M];var k=s(T,m);(c<0&&k>0||c>0&&k<0)&&E.push(o(_,k,T,c)),k<=0&&E.push(T.slice()),c=k}return E}}),5219:(function(t){t.exports=function(r){for(var a=r.length,l,i=0;i<a;i++)if(l=r.charCodeAt(i),(l<9||l>13)&&l!==32&&l!==133&&l!==160&&l!==5760&&l!==6158&&(l<8192||l>8205)&&l!==8232&&l!==8233&&l!==8239&&l!==8287&&l!==8288&&l!==12288&&l!==65279)return!1;return!0}}),5250:(function(t){t.exports=a;var r=+(Math.pow(2,27)+1);function a(l,i,s){var o=l*i,u=r*l,d=u-l,h=u-d,g=l-h,m=r*i,E=m-i,c=m-E,_=i-c,T=o-h*c,M=T-g*c,k=M-h*_,b=g*_-k;return s?(s[0]=b,s[1]=o,s):[b,o]}}),5298:(function(t,r){var a={"float64,2,1,0":function(){return function(g,m,E,c,_){var T=g[0],M=g[1],k=g[2],b=E[0],A=E[1],y=E[2];c|=0;var f=0,p=0,x=0,N=y,D=A-k*y,B=b-M*A;for(x=0;x<T;++x){for(p=0;p<M;++p){for(f=0;f<k;++f)m[c]/=_,c+=N;c+=D}c+=B}}},"uint8,2,0,1,float64,2,1,0":function(){return function(g,m,E,c,_,T,M,k){var b=g[0],A=g[1],y=g[2],f=E[0],p=E[1],x=E[2],N=T[0],D=T[1],B=T[2];c|=0,M|=0;for(var U=c,V=M,q=g[0]|0;q>0;){q<64?(b=q,q=0):(b=64,q-=64);for(var z=g[1]|0;z>0;){z<64?(A=z,z=0):(A=64,z-=64),c=U+q*f+z*p,M=V+q*N+z*D;var H=0,G=0,J=0,le=x,ge=f-y*x,de=p-b*f,me=B,W=N-y*B,ie=D-b*N;for(J=0;J<A;++J){for(G=0;G<b;++G){for(H=0;H<y;++H)m[c]=_[M]*k,c+=le,M+=me;c+=ge,M+=W}c+=de,M+=ie}}}}},"float32,1,0,float32,1,0":function(){return function(g,m,E,c,_,T,M){var k=g[0],b=g[1],A=E[0],y=E[1],f=T[0],p=T[1];c|=0,M|=0;var x=0,N=0,D=y,B=A-b*y,U=p,V=f-b*p;for(N=0;N<k;++N){for(x=0;x<b;++x)m[c]=_[M],c+=D,M+=U;c+=B,M+=V}}},"float32,1,0,float32,0,1":function(){return function(g,m,E,c,_,T,M){var k=g[0],b=g[1],A=E[0],y=E[1],f=T[0],p=T[1];c|=0,M|=0;for(var x=c,N=M,D=g[1]|0;D>0;){D<64?(b=D,D=0):(b=64,D-=64);for(var B=g[0]|0;B>0;){B<64?(k=B,B=0):(k=64,B-=64),c=x+D*y+B*A,M=N+D*p+B*f;var U=0,V=0,q=y,z=A-b*y,H=p,G=f-b*p;for(V=0;V<k;++V){for(U=0;U<b;++U)m[c]=_[M],c+=q,M+=H;c+=z,M+=G}}}}},"uint8,2,0,1,uint8,1,2,0":function(){return function(g,m,E,c,_,T,M){var k=g[0],b=g[1],A=g[2],y=E[0],f=E[1],p=E[2],x=T[0],N=T[1],D=T[2];c|=0,M|=0;for(var B=c,U=M,V=g[2]|0;V>0;){V<64?(A=V,V=0):(A=64,V-=64);for(var q=g[0]|0;q>0;){q<64?(k=q,q=0):(k=64,q-=64);for(var z=g[1]|0;z>0;){z<64?(b=z,z=0):(b=64,z-=64),c=B+V*p+q*y+z*f,M=U+V*D+q*x+z*N;var H=0,G=0,J=0,le=p,ge=y-A*p,de=f-k*y,me=D,W=x-A*D,ie=N-k*x;for(J=0;J<b;++J){for(G=0;G<k;++G){for(H=0;H<A;++H)m[c]=_[M],c+=le,M+=me;c+=ge,M+=W}c+=de,M+=ie}}}}}},"uint8,2,0,1,array,2,0,1":function(){return function(g,m,E,c,_,T,M){var k=g[0],b=g[1],A=g[2],y=E[0],f=E[1],p=E[2],x=T[0],N=T[1],D=T[2];c|=0,M|=0;var B=0,U=0,V=0,q=p,z=y-A*p,H=f-k*y,G=D,J=x-A*D,le=N-k*x;for(V=0;V<b;++V){for(U=0;U<k;++U){for(B=0;B<A;++B)m[c]=_[M],c+=q,M+=G;c+=z,M+=J}c+=H,M+=le}}}};function l(h,g){var m=g.join(","),E=a[m];return E()}var i=l,s={mul:function(h){var g={};return function(E,c,_){var T=E.dtype,M=E.order,k=c.dtype,b=c.order,A=_.dtype,y=_.order,f=[T,M.join(),k,b.join(),A,y.join()].join(),p=g[f];return p||(g[f]=p=h([T,M,k,b,A,y])),p(E.shape.slice(0),E.data,E.stride,E.offset|0,c.data,c.stride,c.offset|0,_.data,_.stride,_.offset|0)}},muls:function(h){var g={};return function(E,c,_){var T=E.dtype,M=E.order,k=c.dtype,b=c.order,A=[T,M.join(),k,b.join()].join(),y=g[A];return y||(g[A]=y=h([T,M,k,b])),y(E.shape.slice(0),E.data,E.stride,E.offset|0,c.data,c.stride,c.offset|0,_)}},mulseq:function(h){var g={};return function(E,c){var _=E.dtype,T=E.order,M=[_,T.join()].join(),k=g[M];return k||(g[M]=k=h([_,T])),k(E.shape.slice(0),E.data,E.stride,E.offset|0,c)}},div:function(h){var g={};return function(E,c,_){var T=E.dtype,M=E.order,k=c.dtype,b=c.order,A=_.dtype,y=_.order,f=[T,M.join(),k,b.join(),A,y.join()].join(),p=g[f];return p||(g[f]=p=h([T,M,k,b,A,y])),p(E.shape.slice(0),E.data,E.stride,E.offset|0,c.data,c.stride,c.offset|0,_.data,_.stride,_.offset|0)}},divs:function(h){var g={};return function(E,c,_){var T=E.dtype,M=E.order,k=c.dtype,b=c.order,A=[T,M.join(),k,b.join()].join(),y=g[A];return y||(g[A]=y=h([T,M,k,b])),y(E.shape.slice(0),E.data,E.stride,E.offset|0,c.data,c.stride,c.offset|0,_)}},divseq:function(h){var g={};return function(E,c){var _=E.dtype,T=E.order,M=[_,T.join()].join(),k=g[M];return k||(g[M]=k=h([_,T])),k(E.shape.slice(0),E.data,E.stride,E.offset|0,c)}},assign:function(h){var g={};return function(E,c){var _=E.dtype,T=E.order,M=c.dtype,k=c.order,b=[_,T.join(),M,k.join()].join(),A=g[b];return A||(g[b]=A=h([_,T,M,k])),A(E.shape.slice(0),E.data,E.stride,E.offset|0,c.data,c.stride,c.offset|0)}}};function o(h){var g=s[h.funcName];return g(i.bind(void 0,h))}function u(h){return o({funcName:h.funcName})}var d={mul:"*",div:"/"};(function(){for(var h in d)r[h]=u({funcName:h}),r[h+"s"]=u({funcName:h+"s"}),r[h+"seq"]=u({funcName:h+"seq"})})(),r.assign=u({funcName:"assign"})}),5304:(function(t,r,a){t.exports=d;var l=a(2762),i=a(8116),s=a(1879).bg;function o(h,g,m,E){this.gl=h,this.buffer=g,this.vao=m,this.shader=E}var u=o.prototype;u.draw=function(h,g,m,E,c,_){for(var T=!1,M=0;M<3;++M)T=T||c[M];if(T){var k=this.gl;k.enable(k.POLYGON_OFFSET_FILL),k.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:h,view:g,projection:m,bounds:E,enable:c,colors:_},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),k.disable(k.POLYGON_OFFSET_FILL)}},u.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function d(h){for(var g=[],m=[],E=0,c=0;c<3;++c)for(var _=(c+1)%3,T=(c+2)%3,M=[0,0,0],k=[0,0,0],b=-1;b<=1;b+=2){m.push(E,E+2,E+1,E+1,E+2,E+3),M[c]=b,k[c]=b;for(var A=-1;A<=1;A+=2){M[_]=A;for(var y=-1;y<=1;y+=2)M[T]=y,g.push(M[0],M[1],M[2],k[0],k[1],k[2]),E+=1}var f=_;_=T,T=f}var p=l(h,new Float32Array(g)),x=l(h,new Uint16Array(m),h.ELEMENT_ARRAY_BUFFER),N=i(h,[{buffer:p,type:h.FLOAT,size:3,offset:0,stride:24},{buffer:p,type:h.FLOAT,size:3,offset:12,stride:24}],x),D=s(h);return D.attributes.position.location=0,D.attributes.normal.location=1,new o(h,p,N,D)}}),5352:(function(t){t.exports=r;function r(a,l,i){var s=l[0],o=l[1],u=l[2],d=l[3];return a[0]=i[0]*s+i[4]*o+i[8]*u+i[12]*d,a[1]=i[1]*s+i[5]*o+i[9]*u+i[13]*d,a[2]=i[2]*s+i[6]*o+i[10]*u+i[14]*d,a[3]=i[3]*s+i[7]*o+i[11]*u+i[15]*d,a}}),5382:(function(t,r,a){var l=a(8210),i=a(3012);t.exports=s;function s(o,u){if(o.length===1)return i(u,o[0]);if(u.length===1)return i(o,u[0]);if(o.length===0||u.length===0)return[0];var d=[0];if(o.length<u.length)for(var h=0;h<o.length;++h)d=l(d,i(u,o[h]));else for(var h=0;h<u.length;++h)d=l(d,i(o,u[h]));return d}}),5445:(function(t,r,a){t.exports=k;var l=a(5033),i=a(5202),s=a(6429),o=a(6760),u=a(5665),d=a(5352),h=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),g=new Float32Array(16);function m(b,A,y){this.lo=b,this.hi=A,this.pixelsPerDataUnit=y}var E=[0,0,0,1],c=[0,0,0,1];function _(b,A,y,f,p){for(var x=0;x<3;++x){for(var N=E,D=c,B=0;B<3;++B)D[B]=N[B]=y[B];D[3]=N[3]=1,D[x]+=1,d(D,D,A),D[3]<0&&(b[x]=1/0),N[x]-=1,d(N,N,A),N[3]<0&&(b[x]=1/0);var U=(N[0]/N[3]-D[0]/D[3])*f,V=(N[1]/N[3]-D[1]/D[3])*p;b[x]=.25*Math.sqrt(U*U+V*V)}return b}var T=[new m(1/0,-1/0,1/0),new m(1/0,-1/0,1/0),new m(1/0,-1/0,1/0)],M=[0,0,0];function k(b,A,y,f,V){var x=A.model||h,N=A.view||h,D=A.projection||h,B=A._ortho||!1,U=b.bounds,V=V||s(x,N,D,U,B),q=V.axis;o(g,N,x),o(g,D,g);for(var z=T,H=0;H<3;++H)z[H].lo=1/0,z[H].hi=-1/0,z[H].pixelsPerDataUnit=1/0;var G=l(u(g,g));u(g,g);for(var J=0;J<3;++J){var le=(J+1)%3,ge=(J+2)%3,de=M;e:for(var H=0;H<2;++H){var me=[];if(q[J]<0!=!!H){de[J]=U[H][J];for(var W=0;W<2;++W){de[le]=U[W^H][le];for(var ie=0;ie<2;++ie)de[ge]=U[ie^W^H][ge],me.push(de.slice())}for(var se=B?5:4,W=se;W===se;++W){if(me.length===0)continue e;me=i.positive(me,G[W])}for(var W=0;W<me.length;++W)for(var ge=me[W],ee=_(M,g,ge,y,f),ie=0;ie<3;++ie)z[ie].lo=Math.min(z[ie].lo,ge[ie]),z[ie].hi=Math.max(z[ie].hi,ge[ie]),ie!==J&&(z[ie].pixelsPerDataUnit=Math.min(z[ie].pixelsPerDataUnit,Math.abs(ee[ie])))}}}return z}}),5455:(function(t,r,a){t.exports=a(7056)}),5486:(function(t,r,a){t.exports=a(3066)}),5542:(function(t,r,a){var l=a(2478);t.exports=u;function i(d,h){this.stars=d,this.edges=h}var s=i.prototype;function o(d,h,g){for(var m=1,E=d.length;m<E;m+=2)if(d[m-1]===h&&d[m]===g){d[m-1]=d[E-2],d[m]=d[E-1],d.length=E-2;return}}s.isConstraint=(function(){var d=[0,0];function h(g,m){return g[0]-m[0]||g[1]-m[1]}return function(g,m){return d[0]=Math.min(g,m),d[1]=Math.max(g,m),l.eq(this.edges,d,h)>=0}})(),s.removeTriangle=function(d,h,g){var m=this.stars;o(m[d],h,g),o(m[h],g,d),o(m[g],d,h)},s.addTriangle=function(d,h,g){var m=this.stars;m[d].push(h,g),m[h].push(g,d),m[g].push(d,h)},s.opposite=function(d,h){for(var g=this.stars[h],m=1,E=g.length;m<E;m+=2)if(g[m]===d)return g[m-1];return-1},s.flip=function(d,h){var g=this.opposite(d,h),m=this.opposite(h,d);this.removeTriangle(d,h,g),this.removeTriangle(h,d,m),this.addTriangle(d,m,g),this.addTriangle(h,g,m)},s.edges=function(){for(var d=this.stars,h=[],g=0,m=d.length;g<m;++g)for(var E=d[g],c=0,_=E.length;c<_;c+=2)h.push([E[c],E[c+1]]);return h},s.cells=function(){for(var d=this.stars,h=[],g=0,m=d.length;g<m;++g)for(var E=d[g],c=0,_=E.length;c<_;c+=2){var T=E[c],M=E[c+1];g<Math.min(T,M)&&h.push([g,T,M])}return h};function u(d,h){for(var g=new Array(d),m=0;m<d;++m)g[m]=[];return new i(g,h)}}),5567:(function(t){t.exports=r;function r(a,l,i){var s=Math.sin(i),o=Math.cos(i),u=l[4],d=l[5],h=l[6],g=l[7],m=l[8],E=l[9],c=l[10],_=l[11];return l!==a&&(a[0]=l[0],a[1]=l[1],a[2]=l[2],a[3]=l[3],a[12]=l[12],a[13]=l[13],a[14]=l[14],a[15]=l[15]),a[4]=u*o+m*s,a[5]=d*o+E*s,a[6]=h*o+c*s,a[7]=g*o+_*s,a[8]=m*o-u*s,a[9]=E*o-d*s,a[10]=c*o-h*s,a[11]=_*o-g*s,a}}),5572:(function(t,r,a){var l=a(869);t.exports=i;function i(s,o){return l(s[0].mul(o[1]).sub(s[1].mul(o[0])),s[1].mul(o[1]))}}),5609:(function(t,r,a){t.exports=i;var l=a(3134);function i(s,o){for(var u=l(s,o.length),d=new Array(o.length),h=new Array(o.length),g=[],m=0;m<o.length;++m){var E=u[m].length;h[m]=E,d[m]=!0,E<=1&&g.push(m)}for(;g.length>0;){var c=g.pop();d[c]=!1;for(var _=u[c],m=0;m<_.length;++m){var T=_[m];--h[T]===0&&g.push(T)}}for(var M=new Array(o.length),k=[],m=0;m<o.length;++m)if(d[m]){var c=k.length;M[m]=c,k.push(o[m])}else M[m]=-1;for(var b=[],m=0;m<s.length;++m){var A=s[m];d[A[0]]&&d[A[1]]&&b.push([M[A[0]],M[A[1]]])}return[b,k]}}),5632:(function(t){t.exports=r;function r(a,l,i){return a[0]=l[0]+i[0],a[1]=l[1]+i[1],a[2]=l[2]+i[2],a}}),5665:(function(t){t.exports=r;function r(a,l){if(a===l){var i=l[1],s=l[2],o=l[3],u=l[6],d=l[7],h=l[11];a[1]=l[4],a[2]=l[8],a[3]=l[12],a[4]=i,a[6]=l[9],a[7]=l[13],a[8]=s,a[9]=u,a[11]=l[14],a[12]=o,a[13]=d,a[14]=h}else a[0]=l[0],a[1]=l[4],a[2]=l[8],a[3]=l[12],a[4]=l[1],a[5]=l[5],a[6]=l[9],a[7]=l[13],a[8]=l[2],a[9]=l[6],a[10]=l[10],a[11]=l[14],a[12]=l[3],a[13]=l[7],a[14]=l[11],a[15]=l[15];return a}}),5673:(function(t){t.exports=r;function r(a,l,i){var s=l[0],o=l[1],u=l[2],d=i[3]*s+i[7]*o+i[11]*u+i[15];return d=d||1,a[0]=(i[0]*s+i[4]*o+i[8]*u+i[12])/d,a[1]=(i[1]*s+i[5]*o+i[9]*u+i[13])/d,a[2]=(i[2]*s+i[6]*o+i[10]*u+i[14])/d,a}}),5714:(function(t,r,a){t.exports=y;var l=a(2762),i=a(8116),s=a(7766),o=new Uint8Array(4),u=new Float32Array(o.buffer);function d(f,p,x,N){return o[0]=N,o[1]=x,o[2]=p,o[3]=f,u[0]}var h=a(2478),g=a(9618),m=a(7319),E=m.createShader,c=m.createPickShader,_=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function T(f,p){for(var x=0,N=0;N<3;++N){var D=f[N]-p[N];x+=D*D}return Math.sqrt(x)}function M(f){for(var p=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],x=0;x<3;++x)p[0][x]=Math.max(f[0][x],p[0][x]),p[1][x]=Math.min(f[1][x],p[1][x]);return p}function k(f,p,x,N){this.arcLength=f,this.position=p,this.index=x,this.dataCoordinate=N}function b(f,p,x,N,D,B){this.gl=f,this.shader=p,this.pickShader=x,this.buffer=N,this.vao=D,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 A=b.prototype;A.isTransparent=function(){return this.hasAlpha},A.isOpaque=function(){return!this.hasAlpha},A.pickSlots=1,A.setPickBase=function(f){this.pickId=f},A.drawTransparent=A.draw=function(f){if(this.vertexCount){var p=this.gl,x=this.shader,N=this.vao;x.bind(),x.uniforms={model:f.model||_,view:f.view||_,projection:f.projection||_,clipBounds:M(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[p.drawingBufferWidth,p.drawingBufferHeight],pixelRatio:this.pixelRatio},N.bind(),N.draw(p.TRIANGLE_STRIP,this.vertexCount),N.unbind()}},A.drawPick=function(f){if(this.vertexCount){var p=this.gl,x=this.pickShader,N=this.vao;x.bind(),x.uniforms={model:f.model||_,view:f.view||_,projection:f.projection||_,pickId:this.pickId,clipBounds:M(this.clipBounds),screenShape:[p.drawingBufferWidth,p.drawingBufferHeight],pixelRatio:this.pixelRatio},N.bind(),N.draw(p.TRIANGLE_STRIP,this.vertexCount),N.unbind()}},A.update=function(f){var p,x;this.dirty=!0;var N=!!f.connectGaps;"dashScale"in f&&(this.dashScale=f.dashScale),this.hasAlpha=!1,"opacity"in f&&(this.opacity=+f.opacity,this.opacity<1&&(this.hasAlpha=!0));var D=[],B=[],U=[],V=0,q=0,z=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],H=f.position||f.positions;if(H){var G=f.color||f.colors||[0,0,0,1],J=f.lineWidth||1,le=!1;e:for(p=1;p<H.length;++p){var ge=H[p-1],de=H[p];for(B.push(V),U.push(ge.slice()),x=0;x<3;++x){if(isNaN(ge[x])||isNaN(de[x])||!isFinite(ge[x])||!isFinite(de[x])){if(!N&&D.length>0){for(var me=0;me<24;++me)D.push(D[D.length-12]);q+=2,le=!0}continue e}z[0][x]=Math.min(z[0][x],ge[x],de[x]),z[1][x]=Math.max(z[1][x],ge[x],de[x])}var W,ie;Array.isArray(G[0])?(W=G.length>p-1?G[p-1]:G.length>0?G[G.length-1]:[0,0,0,1],ie=G.length>p?G[p]:G.length>0?G[G.length-1]:[0,0,0,1]):W=ie=G,W.length===3&&(W=[W[0],W[1],W[2],1]),ie.length===3&&(ie=[ie[0],ie[1],ie[2],1]),!this.hasAlpha&&W[3]<1&&(this.hasAlpha=!0);var se;Array.isArray(J)?se=J.length>p-1?J[p-1]:J.length>0?J[J.length-1]:[0,0,0,1]:se=J;var ee=V;if(V+=T(ge,de),le){for(x=0;x<2;++x)D.push(ge[0],ge[1],ge[2],de[0],de[1],de[2],ee,se,W[0],W[1],W[2],W[3]);q+=2,le=!1}D.push(ge[0],ge[1],ge[2],de[0],de[1],de[2],ee,se,W[0],W[1],W[2],W[3],ge[0],ge[1],ge[2],de[0],de[1],de[2],ee,-se,W[0],W[1],W[2],W[3],de[0],de[1],de[2],ge[0],ge[1],ge[2],V,-se,ie[0],ie[1],ie[2],ie[3],de[0],de[1],de[2],ge[0],ge[1],ge[2],V,se,ie[0],ie[1],ie[2],ie[3]),q+=4}}if(this.buffer.update(D),B.push(V),U.push(H[H.length-1].slice()),this.bounds=z,this.vertexCount=q,this.points=U,this.arcLength=B,"dashes"in f){var pe=f.dashes,oe=pe.slice();for(oe.unshift(0),p=1;p<oe.length;++p)oe[p]=oe[p-1]+oe[p];var Y=g(new Array(256*4),[256,1,4]);for(p=0;p<256;++p){for(x=0;x<4;++x)Y.set(p,0,x,0);h.le(oe,oe[oe.length-1]*p/255)&1?Y.set(p,0,0,0):Y.set(p,0,0,255)}this.texture.setPixels(Y)}},A.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()},A.pick=function(f){if(!f||f.id!==this.pickId)return null;var p=d(f.value[0],f.value[1],f.value[2],0),x=h.le(this.arcLength,p);if(x<0)return null;if(x===this.arcLength.length-1)return new k(this.arcLength[this.arcLength.length-1],this.points[this.points.length-1].slice(),x);for(var N=this.points[x],D=this.points[Math.min(x+1,this.points.length-1)],B=(p-this.arcLength[x])/(this.arcLength[x+1]-this.arcLength[x]),U=1-B,V=[0,0,0],q=0;q<3;++q)V[q]=U*N[q]+B*D[q];var z=Math.min(B<.5?x:x+1,this.points.length-1);return new k(p,V,z,this.points[z])};function y(f){var p=f.gl||f.scene&&f.scene.gl,x=E(p);x.attributes.position.location=0,x.attributes.nextPosition.location=1,x.attributes.arcLength.location=2,x.attributes.lineWidth.location=3,x.attributes.color.location=4;var N=c(p);N.attributes.position.location=0,N.attributes.nextPosition.location=1,N.attributes.arcLength.location=2,N.attributes.lineWidth.location=3,N.attributes.color.location=4;for(var D=l(p),B=i(p,[{buffer:D,size:3,offset:0,stride:48},{buffer:D,size:3,offset:12,stride:48},{buffer:D,size:1,offset:24,stride:48},{buffer:D,size:1,offset:28,stride:48},{buffer:D,size:4,offset:32,stride:48}]),U=g(new Array(256*4),[256,1,4]),V=0;V<1024;++V)U.data[V]=255;var q=s(p,U);q.wrap=p.REPEAT;var z=new b(p,x,N,D,B,q);return z.update(f),z}}),5716:(function(t,r,a){var l=a(6859);t.exports=i;function i(s){return s.cmp(new l(0))}}),5721:(function(t){t.exports=r;function r(a){for(var l=0,i=0,s=1;s<a.length;++s)a[s][0]<a[l][0]&&(l=s),a[s][0]>a[i][0]&&(i=s);return l<i?[[l],[i]]:l>i?[[i],[l]]:[[l]]}}),5771:(function(t,r,a){var l=a(8507),i=a(3788),s=a(2419);t.exports=o;function o(u){u.sort(i);for(var d=u.length,h=0,g=0;g<d;++g){var m=u[g],E=s(m);if(E!==0){if(h>0){var c=u[h-1];if(l(m,c)===0&&s(c)!==E){h-=1;continue}}u[h++]=m}}return u.length=h,u}}),5838:(function(t,r,a){t.exports=i;var l=a(7842);function i(s){for(var o=new Array(s.length),u=0;u<s.length;++u)o[u]=l(s[u]);return o}}),5847:(function(t){t.exports=r;function r(a,l,i){return a[0]=l[0]*i[0],a[1]=l[1]*i[1],a[2]=l[2]*i[2],a}}),5874:(function(t,r,a){t.exports=x;var l=a(620),i=a(7827),s=a(6852),o=a(7932),u=a(3508),d=999,h=9999,g=0,m=1,E=2,c=3,_=4,T=5,M=6,k=7,b=8,A=9,y=10,f=11,p=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"];function x(N){var D=0,B=0,U=d,V,q,z=[],H=[],G=1,J=0,le=0,ge=!1,de=!1,me="",W;N=N||{};var ie=s,se=l;N.version==="300 es"&&(ie=u,se=o);for(var ee={},pe={},D=0;D<ie.length;D++)ee[ie[D]]=!0;for(var D=0;D<se.length;D++)pe[se[D]]=!0;return function(Fe){return H=[],Fe!==null?Y(Fe):ce()};function oe(Fe){Fe.length&&H.push({type:p[U],data:Fe,position:le,line:G,column:J})}function Y(Fe){D=0,Fe.toString&&(Fe=Fe.toString()),me+=Fe.replace(/\r\n/g,`
`),W=me.length;for(var Pe;V=me[D],D<W;){switch(Pe=D,U){case g:D=Xe();break;case m:D=ze();break;case E:D=Le();break;case c:D=Ve();break;case _:D=_t();break;case f:D=mt();break;case T:D=vt();break;case h:D=ut();break;case A:D=_e();break;case d:D=ue();break}if(Pe!==D)switch(me[Pe]){case`
`:J=0,++G;break;default:++J;break}}return B+=D,me=me.slice(D),H}function ce(Fe){return z.length&&oe(z.join("")),U=y,oe("(eof)"),H}function ue(){return z=z.length?[]:z,q==="/"&&V==="*"?(le=B+D-1,U=g,q=V,D+1):q==="/"&&V==="/"?(le=B+D-1,U=m,q=V,D+1):V==="#"?(U=E,le=B+D,D):/\s/.test(V)?(U=A,le=B+D,D):(ge=/\d/.test(V),de=/[^\w_]/.test(V),le=B+D,U=ge?_:de?c:h,D)}function _e(){return/[^\s]/g.test(V)?(oe(z.join("")),U=d,D):(z.push(V),q=V,D+1)}function Le(){return(V==="\r"||V===`
`)&&q!=="\\"?(oe(z.join("")),U=d,D):(z.push(V),q=V,D+1)}function ze(){return Le()}function Xe(){return V==="/"&&q==="*"?(z.push(V),oe(z.join("")),U=d,D+1):(z.push(V),q=V,D+1)}function Ve(){if(q==="."&&/\d/.test(V))return U=T,D;if(q==="/"&&V==="*")return U=g,D;if(q==="/"&&V==="/")return U=m,D;if(V==="."&&z.length){for(;rt(z););return U=T,D}if(V===";"||V===")"||V==="("){if(z.length)for(;rt(z););return oe(V),U=d,D+1}var Fe=z.length===2&&V!=="=";if(/[\w_\d\s]/.test(V)||Fe){for(;rt(z););return U=d,D}return z.push(V),q=V,D+1}function rt(Fe){var Pe=0,be,Ye;do{if(be=i.indexOf(Fe.slice(0,Fe.length+Pe).join("")),Ye=i[be],be===-1){if(Pe--+Fe.length>0)continue;Ye=Fe.slice(0,1).join("")}return oe(Ye),le+=Ye.length,z=z.slice(Ye.length),z.length}while(!0)}function mt(){return/[^a-fA-F0-9]/.test(V)?(oe(z.join("")),U=d,D):(z.push(V),q=V,D+1)}function _t(){return V==="."||/[eE]/.test(V)?(z.push(V),U=T,q=V,D+1):V==="x"&&z.length===1&&z[0]==="0"?(U=f,z.push(V),q=V,D+1):/[^\d]/.test(V)?(oe(z.join("")),U=d,D):(z.push(V),q=V,D+1)}function vt(){return V==="f"&&(z.push(V),q=V,D+=1),/[eE]/.test(V)||(V==="-"||V==="+")&&/[eE]/.test(q)?(z.push(V),q=V,D+1):/[^\d]/.test(V)?(oe(z.join("")),U=d,D):(z.push(V),q=V,D+1)}function ut(){if(/[^\d\w_]/.test(V)){var Fe=z.join("");return pe[Fe]?U=b:ee[Fe]?U=k:U=M,oe(z.join("")),U=d,D}return z.push(V),q=V,D+1}}}),5878:(function(t,r,a){t.exports=o;var l=a(3250),i=a(2014);function s(u,d,h){var g=Math.abs(l(u,d,h)),m=Math.sqrt(Math.pow(d[0]-h[0],2)+Math.pow(d[1]-h[1],2));return g/m}function o(u,d,h){for(var g=d.length,m=u.length,E=new Array(g),c=new Array(g),_=new Array(g),T=new Array(g),M=0;M<g;++M)E[M]=c[M]=-1,_[M]=1/0,T[M]=!1;for(var M=0;M<m;++M){var k=u[M];if(k.length!==2)throw new Error("Input must be a graph");var b=k[1],A=k[0];c[A]!==-1?c[A]=-2:c[A]=b,E[b]!==-1?E[b]=-2:E[b]=A}function y(me){if(T[me])return 1/0;var W=E[me],ie=c[me];return W<0||ie<0?1/0:s(d[me],d[W],d[ie])}function f(me,W){var ie=q[me],se=q[W];q[me]=se,q[W]=ie,z[ie]=W,z[se]=me}function p(me){return _[q[me]]}function x(me){return me&1?me-1>>1:(me>>1)-1}function N(me){for(var W=p(me);;){var ie=W,se=2*me+1,ee=2*(me+1),pe=me;if(se<G){var oe=p(se);oe<ie&&(pe=se,ie=oe)}if(ee<G){var Y=p(ee);Y<ie&&(pe=ee)}if(pe===me)return me;f(me,pe),me=pe}}function D(me){for(var W=p(me);me>0;){var ie=x(me);if(ie>=0){var se=p(ie);if(W<se){f(me,ie),me=ie;continue}}return me}}function B(){if(G>0){var me=q[0];return f(0,G-1),G-=1,N(0),me}return-1}function U(me,W){var ie=q[me];return _[ie]===W?me:(_[ie]=-1/0,D(me),B(),_[ie]=W,G+=1,D(G-1))}function V(me){if(!T[me]){T[me]=!0;var W=E[me],ie=c[me];E[ie]>=0&&(E[ie]=W),c[W]>=0&&(c[W]=ie),z[W]>=0&&U(z[W],y(W)),z[ie]>=0&&U(z[ie],y(ie))}}for(var q=[],z=new Array(g),M=0;M<g;++M){var H=_[M]=y(M);H<1/0?(z[M]=q.length,q.push(M)):z[M]=-1}for(var G=q.length,M=G>>1;M>=0;--M)N(M);for(;;){var J=B();if(J<0||_[J]>h)break;V(J)}for(var le=[],M=0;M<g;++M)T[M]||(z[M]=le.length,le.push(d[M].slice()));le.length;function ge(me,W){if(me[W]<0)return W;var ie=W,se=W;do{var ee=me[se];if(!T[se]||ee<0||ee===se||(se=ee,ee=me[se],!T[se]||ee<0||ee===se))break;se=ee,ie=me[ie]}while(ie!==se);for(var pe=W;pe!==se;pe=me[pe])me[pe]=se;return se}var de=[];return u.forEach(function(me){var W=ge(E,me[0]),ie=ge(c,me[1]);if(W>=0&&ie>=0&&W!==ie){var se=z[W],ee=z[ie];se!==ee&&de.push([se,ee])}}),i.unique(i.normalize(de)),{positions:le,edges:de}}}),5911:(function(t){t.exports=r;function r(a,l,i){var s=l[0],o=l[1],u=l[2],d=i[0],h=i[1],g=i[2];return a[0]=o*g-u*h,a[1]=u*d-s*g,a[2]=s*h-o*d,a}}),5964:(function(t){t.exports=function(r){return!r&&r!==0?"":r.toString()}}),5995:(function(t,r,a){t.exports=s;var l=a(7642),i=a(6037);function s(o,u){return l(u).filter(function(d){for(var h=new Array(d.length),g=0;g<d.length;++g)h[g]=u[d[g]];return i(h)*o<1})}}),6037:(function(t,r,a){t.exports=i;var l=a(3628);function i(s){for(var o=l(s),u=0,d=0;d<s.length;++d)for(var h=s[d],g=0;g<o.length;++g)u+=Math.pow(h[g]-o[g],2);return Math.sqrt(u/s.length)}}),6079:(function(t){t.exports=r;function r(a,l,i,s){var o=s[0],u=s[1],d=s[2],h=Math.sqrt(o*o+u*u+d*d),g,m,E,c,_,T,M,k,b,A,y,f,p,x,N,D,B,U,V,q,z,H,G,J;return Math.abs(h)<1e-6?null:(h=1/h,o*=h,u*=h,d*=h,g=Math.sin(i),m=Math.cos(i),E=1-m,c=l[0],_=l[1],T=l[2],M=l[3],k=l[4],b=l[5],A=l[6],y=l[7],f=l[8],p=l[9],x=l[10],N=l[11],D=o*o*E+m,B=u*o*E+d*g,U=d*o*E-u*g,V=o*u*E-d*g,q=u*u*E+m,z=d*u*E+o*g,H=o*d*E+u*g,G=u*d*E-o*g,J=d*d*E+m,a[0]=c*D+k*B+f*U,a[1]=_*D+b*B+p*U,a[2]=T*D+A*B+x*U,a[3]=M*D+y*B+N*U,a[4]=c*V+k*q+f*z,a[5]=_*V+b*q+p*z,a[6]=T*V+A*q+x*z,a[7]=M*V+y*q+N*z,a[8]=c*H+k*G+f*J,a[9]=_*H+b*G+p*J,a[10]=T*H+A*G+x*J,a[11]=M*H+y*G+N*J,l!==a&&(a[12]=l[12],a[13]=l[13],a[14]=l[14],a[15]=l[15]),a)}}),6141:(function(t,r,a){t.exports=a(2953)}),6199:(function(t,r,a){var l=a(1338),i={zero:function(M,k,b,A){var y=M[0],f=b[0];A|=0;var p=0,x=f;for(p=0;p<y;++p)k[A]=0,A+=x},fdTemplate1:function(M,k,b,A,y,f,p){var x=M[0],N=b[0],D=f[0],B=-1*N,U=N;A|=0,p|=0;var V=0,q=N,z=D;for(V=0;V<x;++V)y[p]=.5*(k[A+B]-k[A+U]),A+=q,p+=z},fdTemplate2:function(M,k,b,A,y,f,p,x,N,D){var B=M[0],U=M[1],V=b[0],q=b[1],z=f[0],H=f[1],G=N[0],J=N[1],le=-1*V,ge=V,de=-1*q,me=q;A|=0,p|=0,D|=0;var W=0,ie=0,se=q,ee=V-U*q,pe=H,oe=z-U*H,Y=J,ce=G-U*J;for(ie=0;ie<B;++ie){for(W=0;W<U;++W)y[p]=.5*(k[A+le]-k[A+ge]),x[D]=.5*(k[A+de]-k[A+me]),A+=se,p+=pe,D+=Y;A+=ee,p+=oe,D+=ce}}},s={cdiff:function(M){var k={};return function(A,y,f){var p=A.dtype,x=A.order,N=y.dtype,D=y.order,B=f.dtype,U=f.order,V=[p,x.join(),N,D.join(),B,U.join()].join(),q=k[V];return q||(k[V]=q=M([p,x,N,D,B,U])),q(A.shape.slice(0),A.data,A.stride,A.offset|0,y.data,y.stride,y.offset|0,f.data,f.stride,f.offset|0)}},zero:function(M){var k={};return function(A){var y=A.dtype,f=A.order,p=[y,f.join()].join(),x=k[p];return x||(k[p]=x=M([y,f])),x(A.shape.slice(0),A.data,A.stride,A.offset|0)}},fdTemplate1:function(M){var k={};return function(A,y){var f=A.dtype,p=A.order,x=y.dtype,N=y.order,D=[f,p.join(),x,N.join()].join(),B=k[D];return B||(k[D]=B=M([f,p,x,N])),B(A.shape.slice(0),A.data,A.stride,A.offset|0,y.data,y.stride,y.offset|0)}},fdTemplate2:function(M){var k={};return function(A,y,f){var p=A.dtype,x=A.order,N=y.dtype,D=y.order,B=f.dtype,U=f.order,V=[p,x.join(),N,D.join(),B,U.join()].join(),q=k[V];return q||(k[V]=q=M([p,x,N,D,B,U])),q(A.shape.slice(0),A.data,A.stride,A.offset|0,y.data,y.stride,y.offset|0,f.data,f.stride,f.offset|0)}}};function o(M){var k=s[M.funcName];return k(u.bind(void 0,M))}function u(M){return i[M.funcName]}function d(M){return o({funcName:M.funcName})}var h={},g={},m=d({funcName:"cdiff"}),E=d({funcName:"zero"});function c(M){return M in h?h[M]:h[M]=d({funcName:"fdTemplate"+M})}function _(M,k,b,A){return function(y,f){var p=f.shape.slice();return p[0]>2&&p[1]>2&&A(f.pick(-1,-1).lo(1,1).hi(p[0]-2,p[1]-2),y.pick(-1,-1,0).lo(1,1).hi(p[0]-2,p[1]-2),y.pick(-1,-1,1).lo(1,1).hi(p[0]-2,p[1]-2)),p[1]>2&&(b(f.pick(0,-1).lo(1).hi(p[1]-2),y.pick(0,-1,1).lo(1).hi(p[1]-2)),k(y.pick(0,-1,0).lo(1).hi(p[1]-2))),p[1]>2&&(b(f.pick(p[0]-1,-1).lo(1).hi(p[1]-2),y.pick(p[0]-1,-1,1).lo(1).hi(p[1]-2)),k(y.pick(p[0]-1,-1,0).lo(1).hi(p[1]-2))),p[0]>2&&(b(f.pick(-1,0).lo(1).hi(p[0]-2),y.pick(-1,0,0).lo(1).hi(p[0]-2)),k(y.pick(-1,0,1).lo(1).hi(p[0]-2))),p[0]>2&&(b(f.pick(-1,p[1]-1).lo(1).hi(p[0]-2),y.pick(-1,p[1]-1,0).lo(1).hi(p[0]-2)),k(y.pick(-1,p[1]-1,1).lo(1).hi(p[0]-2))),y.set(0,0,0,0),y.set(0,0,1,0),y.set(p[0]-1,0,0,0),y.set(p[0]-1,0,1,0),y.set(0,p[1]-1,0,0),y.set(0,p[1]-1,1,0),y.set(p[0]-1,p[1]-1,0,0),y.set(p[0]-1,p[1]-1,1,0),y}}function T(M){var k=M.join(),p=g[k];if(p)return p;for(var b=M.length,A=[m,E],y=1;y<=b;++y)A.push(c(y));var f=_,p=f.apply(void 0,A);return g[k]=p,p}t.exports=function(k,b,A){if(Array.isArray(A)||(typeof A=="string"?A=l(b.dimension,A):A=l(b.dimension,"clamp")),b.size===0)return k;if(b.dimension===0)return k.set(0),k;var y=T(A);return y(k,b)}}),6204:(function(t){t.exports=r;function r(a){var l,i,s,o=a.length,u=0;for(l=0;l<o;++l)u+=a[l].length;var d=new Array(u),h=0;for(l=0;l<o;++l){var g=a[l],m=g.length;for(i=0;i<m;++i){var E=d[h++]=new Array(m-1),c=0;for(s=0;s<m;++s)s!==i&&(E[c++]=g[s]);if(i&1){var _=E[1];E[1]=E[0],E[0]=_}}}return d}}),6296:(function(t,r,a){t.exports=d;var l=a(7261),i=a(9977),s=a(1811);function o(h,g){this._controllerNames=Object.keys(h),this._controllerList=this._controllerNames.map(function(m){return h[m]}),this._mode=g,this._active=h[g],this._active||(this._mode="turntable",this._active=h.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 u=o.prototype;u.flush=function(h){for(var g=this._controllerList,m=0;m<g.length;++m)g[m].flush(h)},u.idle=function(h){for(var g=this._controllerList,m=0;m<g.length;++m)g[m].idle(h)},u.lookAt=function(h,g,m,E){for(var c=this._controllerList,_=0;_<c.length;++_)c[_].lookAt(h,g,m,E)},u.rotate=function(h,g,m,E){for(var c=this._controllerList,_=0;_<c.length;++_)c[_].rotate(h,g,m,E)},u.pan=function(h,g,m,E){for(var c=this._controllerList,_=0;_<c.length;++_)c[_].pan(h,g,m,E)},u.translate=function(h,g,m,E){for(var c=this._controllerList,_=0;_<c.length;++_)c[_].translate(h,g,m,E)},u.setMatrix=function(h,g){for(var m=this._controllerList,E=0;E<m.length;++E)m[E].setMatrix(h,g)},u.setDistanceLimits=function(h,g){for(var m=this._controllerList,E=0;E<m.length;++E)m[E].setDistanceLimits(h,g)},u.setDistance=function(h,g){for(var m=this._controllerList,E=0;E<m.length;++E)m[E].setDistance(h,g)},u.recalcMatrix=function(h){this._active.recalcMatrix(h)},u.getDistance=function(h){return this._active.getDistance(h)},u.getDistanceLimits=function(h){return this._active.getDistanceLimits(h)},u.lastT=function(){return this._active.lastT()},u.setMode=function(h){if(h!==this._mode){var g=this._controllerNames.indexOf(h);if(!(g<0)){var m=this._active,E=this._controllerList[g],c=Math.max(m.lastT(),E.lastT());m.recalcMatrix(c),E.setMatrix(c,m.computedMatrix),this._active=E,this._mode=h,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}}},u.getMode=function(){return this._mode};function d(h){h=h||{};var g=h.eye||[0,0,1],m=h.center||[0,0,0],E=h.up||[0,1,0],c=h.distanceLimits||[0,1/0],_=h.mode||"turntable",T=l(),M=i(),k=s();return T.setDistanceLimits(c[0],c[1]),T.lookAt(0,g,m,E),M.setDistanceLimits(c[0],c[1]),M.lookAt(0,g,m,E),k.setDistanceLimits(c[0],c[1]),k.lookAt(0,g,m,E),new o({turntable:T,orbit:M,matrix:k},_)}}),6330:(function(t,r,a){var l=a(1533);t.exports=i;function i(s){return Array.isArray(s)&&s.length===2&&l(s[0])&&l(s[1])}}),6405:(function(t,r,a){var l=a(2931);t.exports=function(s,o){var u=s.positions,d=s.vectors,h={positions:[],vertexIntensity:[],vertexIntensityBounds:s.vertexIntensityBounds,vectors:[],cells:[],coneOffset:s.coneOffset,colormap:s.colormap};if(s.positions.length===0)return o&&(o[0]=[0,0,0],o[1]=[0,0,0]),h;for(var g=0,m=1/0,E=-1/0,c=1/0,_=-1/0,T=1/0,M=-1/0,k=null,b=null,A=[],y=1/0,f=!1,p=s.coneSizemode==="raw",x=0;x<u.length;x++){var N=u[x];m=Math.min(N[0],m),E=Math.max(N[0],E),c=Math.min(N[1],c),_=Math.max(N[1],_),T=Math.min(N[2],T),M=Math.max(N[2],M);var D=d[x];if(l.length(D)>g&&(g=l.length(D)),x&&!p){var B=2*l.distance(k,N)/(l.length(b)+l.length(D));B?(y=Math.min(y,B),f=!1):f=!0}f||(k=N,b=D),A.push(D)}var U=[m,c,T],V=[E,_,M];o&&(o[0]=U,o[1]=V),g===0&&(g=1);var q=1/g;isFinite(y)||(y=1),h.vectorScale=y;var z=s.coneSize||(p?1:.5);s.absoluteConeSize&&(z=s.absoluteConeSize*q),h.coneScale=z;for(var x=0,H=0;x<u.length;x++)for(var N=u[x],G=N[0],J=N[1],le=N[2],ge=A[x],de=l.length(ge)*q,me=0,W=8;me<W;me++){h.positions.push([G,J,le,H++]),h.positions.push([G,J,le,H++]),h.positions.push([G,J,le,H++]),h.positions.push([G,J,le,H++]),h.positions.push([G,J,le,H++]),h.positions.push([G,J,le,H++]),h.vectors.push(ge),h.vectors.push(ge),h.vectors.push(ge),h.vectors.push(ge),h.vectors.push(ge),h.vectors.push(ge),h.vertexIntensity.push(de,de,de),h.vertexIntensity.push(de,de,de);var ie=h.positions.length;h.cells.push([ie-6,ie-5,ie-4],[ie-3,ie-2,ie-1])}return h};var i=a(614);t.exports.createMesh=a(9060),t.exports.createConeMesh=function(s,o){return t.exports.createMesh(s,o,{shaders:i,traceType:"cone"})}}),6429:(function(t,r,a){t.exports=b;var l=a(8828),i=a(6760),s=a(5202),o=a(3250),u=new Array(16),d=new Array(8),h=new Array(8),g=new Array(3),m=[0,0,0];(function(){for(var A=0;A<8;++A)d[A]=[1,1,1,1],h[A]=[1,1,1]})();function E(A,y,f){for(var p=0;p<4;++p){A[p]=f[12+p];for(var x=0;x<3;++x)A[p]+=y[x]*f[4*x+p]}}var c=[[0,0,1,0,0],[0,0,-1,1,0],[0,-1,0,1,0],[0,1,0,1,0],[-1,0,0,1,0],[1,0,0,1,0]];function _(A){for(var y=0;y<c.length;++y)if(A=s.positive(A,c[y]),A.length<3)return 0;for(var f=A[0],p=f[0]/f[3],x=f[1]/f[3],N=0,y=1;y+1<A.length;++y){var D=A[y],B=A[y+1],U=D[0]/D[3],V=D[1]/D[3],q=B[0]/B[3],z=B[1]/B[3],H=U-p,G=V-x,J=q-p,le=z-x;N+=Math.abs(H*le-G*J)}return N}var T=[1,1,1],M=[0,0,0],k={cubeEdges:T,axis:M};function b(A,y,f,p,x){i(u,y,A),i(u,f,u);for(var N=0,D=0;D<2;++D){g[2]=p[D][2];for(var B=0;B<2;++B){g[1]=p[B][1];for(var U=0;U<2;++U)g[0]=p[U][0],E(d[N],g,u),N+=1}}for(var V=-1,D=0;D<8;++D){for(var q=d[D][3],z=0;z<3;++z)h[D][z]=d[D][z]/q;x&&(h[D][2]*=-1),q<0&&(V<0||h[D][2]<h[V][2])&&(V=D)}if(V<0){V=0;for(var H=0;H<3;++H){for(var G=(H+2)%3,J=(H+1)%3,le=-1,ge=-1,de=0;de<2;++de){var me=de<<H,W=me+(de<<G)+(1-de<<J),ie=me+(1-de<<G)+(de<<J);o(h[me],h[W],h[ie],m)<0||(de?le=1:ge=1)}if(le<0||ge<0){ge>le&&(V|=1<<H);continue}for(var de=0;de<2;++de){var me=de<<H,W=me+(de<<G)+(1-de<<J),ie=me+(1-de<<G)+(de<<J),se=_([d[me],d[W],d[ie],d[me+(1<<G)+(1<<J)]]);de?le=se:ge=se}if(ge>le){V|=1<<H;continue}}}for(var ee=7^V,pe=-1,D=0;D<8;++D)D===V||D===ee||(pe<0||h[pe][1]>h[D][1])&&(pe=D);for(var oe=-1,D=0;D<3;++D){var Y=pe^1<<D;if(!(Y===V||Y===ee)){oe<0&&(oe=Y);var J=h[Y];J[0]<h[oe][0]&&(oe=Y)}}for(var ce=-1,D=0;D<3;++D){var Y=pe^1<<D;if(!(Y===V||Y===ee||Y===oe)){ce<0&&(ce=Y);var J=h[Y];J[0]>h[ce][0]&&(ce=Y)}}var ue=T;ue[0]=ue[1]=ue[2]=0,ue[l.log2(oe^pe)]=pe&oe,ue[l.log2(pe^ce)]=pe&ce;var _e=ce^7;_e===V||_e===ee?(_e=oe^7,ue[l.log2(ce^_e)]=_e&ce):ue[l.log2(oe^_e)]=_e&oe;for(var Le=M,ze=V,H=0;H<3;++H)ze&1<<H?Le[H]=-1:Le[H]=1;return k}}),6444:(function(t,r){r.create=l,r.equal=i;function a(s,o){var u=s+"",d=u.indexOf("."),h=0;d>=0&&(h=u.length-d-1);var g=Math.pow(10,h),m=Math.round(s*o*g),E=m+"";if(E.indexOf("e")>=0)return E;var c=m/g,_=m%g;m<0?(c=-Math.ceil(c)|0,_=-_|0):(c=Math.floor(c)|0,_=_|0);var T=""+c;if(m<0&&(T="-"+T),h){for(var M=""+_;M.length<h;)M="0"+M;return T+"."+M}else return T}function l(s,o){for(var u=[],d=0;d<3;++d){var h=[];.5*(s[0][d]+s[1][d]);for(var g=0;g*o[d]<=s[1][d];++g)h.push({x:g*o[d],text:a(o[d],g)});for(var g=-1;g*o[d]>=s[0][d];--g)h.push({x:g*o[d],text:a(o[d],g)});u.push(h)}return u}function i(s,o){for(var u=0;u<3;++u){if(s[u].length!==o[u].length)return!1;for(var d=0;d<s[u].length;++d){var h=s[u][d],g=o[u][d];if(h.x!==g.x||h.text!==g.text||h.font!==g.font||h.fontColor!==g.fontColor||h.fontSize!==g.fontSize||h.dx!==g.dx||h.dy!==g.dy)return!1}}return!0}}),6468:(function(t){t.exports=function(a){return atob(a)}}),6504:(function(t,r,a){var l=a(869);t.exports=i;function i(s,o){return l(s[0].mul(o[0]),s[1].mul(o[1]))}}),6582:(function(t,r,a){var l=a(7894);t.exports=i;function i(s,o,u,d){var h,g,m,E,c,_,T,M,k,b,A=o[0],y=o[1],f=o[2],p=d[0],x=d[1],N=d[2],D=u[0],B=u[1],U=u[2];return Math.abs(A-D)<1e-6&&Math.abs(y-B)<1e-6&&Math.abs(f-U)<1e-6?l(s):(T=A-D,M=y-B,k=f-U,b=1/Math.sqrt(T*T+M*M+k*k),T*=b,M*=b,k*=b,h=x*k-N*M,g=N*T-p*k,m=p*M-x*T,b=Math.sqrt(h*h+g*g+m*m),b?(b=1/b,h*=b,g*=b,m*=b):(h=0,g=0,m=0),E=M*m-k*g,c=k*h-T*m,_=T*g-M*h,b=Math.sqrt(E*E+c*c+_*_),b?(b=1/b,E*=b,c*=b,_*=b):(E=0,c=0,_=0),s[0]=h,s[1]=E,s[2]=T,s[3]=0,s[4]=g,s[5]=c,s[6]=M,s[7]=0,s[8]=m,s[9]=_,s[10]=k,s[11]=0,s[12]=-(h*A+g*y+m*f),s[13]=-(E*A+c*y+_*f),s[14]=-(T*A+M*y+k*f),s[15]=1,s)}}),6621:(function(t){t.exports=r;function r(a,l,i){return a[0]=l[0]*i,a[1]=l[1]*i,a[2]=l[2]*i,a}}),6658:(function(t){t.exports=r;function r(a,l,i,s){var o=l[0],u=l[1],d=l[2];return a[0]=o+s*(i[0]-o),a[1]=u+s*(i[1]-u),a[2]=d+s*(i[2]-d),a}}),6690:(function(t){t.exports=r;function r(a,l,i){return a[0]=l[0]/i[0],a[1]=l[1]/i[1],a[2]=l[2]/i[2],a}}),6729:(function(t,r,a){var l=a(3642),i=a(395);t.exports=s;function s(h){var g,m,E,c,_,T,M,k,f,b,A;if(h||(h={}),k=(h.nshades||72)-1,M=h.format||"hex",T=h.colormap,T||(T="jet"),typeof T=="string"){if(T=T.toLowerCase(),!l[T])throw Error(T+" not a supported colorscale");_=l[T]}else if(Array.isArray(T))_=T.slice();else throw Error("unsupported colormap option",T);if(_.length>k+1)throw new Error(T+" map requires nshades to be at least size "+_.length);Array.isArray(h.alpha)?h.alpha.length!==2?b=[1,1]:b=h.alpha.slice():typeof h.alpha=="number"?b=[h.alpha,h.alpha]:b=[1,1],g=_.map(function(N){return Math.round(N.index*k)}),b[0]=Math.min(Math.max(b[0],0),1),b[1]=Math.min(Math.max(b[1],0),1);var y=_.map(function(N,D){var B=_[D].index,U=_[D].rgb.slice();return U.length===4&&U[3]>=0&&U[3]<=1||(U[3]=b[0]+(b[1]-b[0])*B),U}),f=[];for(A=0;A<g.length-1;++A){c=g[A+1]-g[A],m=y[A],E=y[A+1];for(var p=0;p<c;p++){var x=p/c;f.push([Math.round(i(m[0],E[0],x)),Math.round(i(m[1],E[1],x)),Math.round(i(m[2],E[2],x)),i(m[3],E[3],x)])}}return f.push(_[_.length-1].rgb.concat(b[1])),M==="hex"?f=f.map(u):M==="rgbaString"?f=f.map(d):M==="float"&&(f=f.map(o)),f}function o(h){return[h[0]/255,h[1]/255,h[2]/255,h[3]]}function u(h){for(var g,m="#",E=0;E<3;++E)g=h[E],g=g.toString(16),m+=("00"+g).substr(g.length);return m}function d(h){return"rgba("+h.join(",")+")"}}),6740:(function(t,r,a){var l=a(3236),i=l([`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;
}
`]),s=l([`#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;
}
`]),o=l([`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;
}
`]),u=l([`precision highp float;
#define GLSLIFY 1

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

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);
}`]);r.meshShader={vertex:i,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},r.pickShader={vertex:o,fragment:u,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}}),6743:(function(t){t.exports=r;function r(a,l,i){var s=l[0],o=l[1],u=l[2],d=l[3],h=s+s,g=o+o,m=u+u,E=s*h,c=s*g,_=s*m,T=o*g,M=o*m,k=u*m,b=d*h,A=d*g,y=d*m;return a[0]=1-(T+k),a[1]=c+y,a[2]=_-A,a[3]=0,a[4]=c-y,a[5]=1-(E+k),a[6]=M+b,a[7]=0,a[8]=_+A,a[9]=M-b,a[10]=1-(E+T),a[11]=0,a[12]=i[0],a[13]=i[1],a[14]=i[2],a[15]=1,a}}),6760:(function(t){t.exports=r;function r(a,l,i){var s=l[0],o=l[1],u=l[2],d=l[3],h=l[4],g=l[5],m=l[6],E=l[7],c=l[8],_=l[9],T=l[10],M=l[11],k=l[12],b=l[13],A=l[14],y=l[15],f=i[0],p=i[1],x=i[2],N=i[3];return a[0]=f*s+p*h+x*c+N*k,a[1]=f*o+p*g+x*_+N*b,a[2]=f*u+p*m+x*T+N*A,a[3]=f*d+p*E+x*M+N*y,f=i[4],p=i[5],x=i[6],N=i[7],a[4]=f*s+p*h+x*c+N*k,a[5]=f*o+p*g+x*_+N*b,a[6]=f*u+p*m+x*T+N*A,a[7]=f*d+p*E+x*M+N*y,f=i[8],p=i[9],x=i[10],N=i[11],a[8]=f*s+p*h+x*c+N*k,a[9]=f*o+p*g+x*_+N*b,a[10]=f*u+p*m+x*T+N*A,a[11]=f*d+p*E+x*M+N*y,f=i[12],p=i[13],x=i[14],N=i[15],a[12]=f*s+p*h+x*c+N*k,a[13]=f*o+p*g+x*_+N*b,a[14]=f*u+p*m+x*T+N*A,a[15]=f*d+p*E+x*M+N*y,a}}),6768:(function(t,r,a){var l=a(6859);t.exports=i;function i(s){return new l(s)}}),6803:(function(t,r,a){a(8828),a(1755);function l(i,s){var o=i.length,u=i.length-s.length,d=Math.min;if(u)return u;switch(o){case 0:return 0;case 1:return i[0]-s[0];case 2:var c=i[0]+i[1]-s[0]-s[1];return c||d(i[0],i[1])-d(s[0],s[1]);case 3:var h=i[0]+i[1],g=s[0]+s[1];if(c=h+i[2]-(g+s[2]),c)return c;var m=d(i[0],i[1]),E=d(s[0],s[1]),c=d(m,i[2])-d(E,s[2]);return c||d(m+i[2],h)-d(E+s[2],g);default:var _=i.slice(0);_.sort();var T=s.slice(0);T.sort();for(var M=0;M<o;++M)if(u=_[M]-T[M],u)return u;return 0}}r.Fw=l}),6808:(function(t){t.exports=r;function r(a){var l=a[0],i=a[1],s=a[2],o=a[3];return Math.sqrt(l*l+i*i+s*s+o*o)}}),6843:(function(t){t.exports=r;function r(a,l,i){return a[0]=l[0]-i[0],a[1]=l[1]-i[1],a[2]=l[2]-i[2],a}}),6852:(function(t){t.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"]}),6859:(function(t,r,a){t=a.nmd(t),(function(l,i){function s(q,z){if(!q)throw new Error(z||"Assertion failed")}function o(q,z){q.super_=z;var H=function(){};H.prototype=z.prototype,q.prototype=new H,q.prototype.constructor=q}function u(q,z,H){if(u.isBN(q))return q;this.negative=0,this.words=null,this.length=0,this.red=null,q!==null&&((z==="le"||z==="be")&&(H=z,z=10),this._init(q||0,z||10,H||"be"))}typeof l=="object"?l.exports=u:i.BN=u,u.BN=u,u.wordSize=26;var d;try{typeof window<"u"&&typeof window.Buffer<"u"?d=window.Buffer:d=a(7790).Buffer}catch{}u.isBN=function(z){return z instanceof u?!0:z!==null&&typeof z=="object"&&z.constructor.wordSize===u.wordSize&&Array.isArray(z.words)},u.max=function(z,H){return z.cmp(H)>0?z:H},u.min=function(z,H){return z.cmp(H)<0?z:H},u.prototype._init=function(z,H,G){if(typeof z=="number")return this._initNumber(z,H,G);if(typeof z=="object")return this._initArray(z,H,G);H==="hex"&&(H=16),s(H===(H|0)&&H>=2&&H<=36),z=z.toString().replace(/\s+/g,"");var J=0;z[0]==="-"&&(J++,this.negative=1),J<z.length&&(H===16?this._parseHex(z,J,G):(this._parseBase(z,H,J),G==="le"&&this._initArray(this.toArray(),H,G)))},u.prototype._initNumber=function(z,H,G){z<0&&(this.negative=1,z=-z),z<67108864?(this.words=[z&67108863],this.length=1):z<4503599627370496?(this.words=[z&67108863,z/67108864&67108863],this.length=2):(s(z<9007199254740992),this.words=[z&67108863,z/67108864&67108863,1],this.length=3),G==="le"&&this._initArray(this.toArray(),H,G)},u.prototype._initArray=function(z,H,G){if(s(typeof z.length=="number"),z.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(z.length/3),this.words=new Array(this.length);for(var J=0;J<this.length;J++)this.words[J]=0;var le,ge,de=0;if(G==="be")for(J=z.length-1,le=0;J>=0;J-=3)ge=z[J]|z[J-1]<<8|z[J-2]<<16,this.words[le]|=ge<<de&67108863,this.words[le+1]=ge>>>26-de&67108863,de+=24,de>=26&&(de-=26,le++);else if(G==="le")for(J=0,le=0;J<z.length;J+=3)ge=z[J]|z[J+1]<<8|z[J+2]<<16,this.words[le]|=ge<<de&67108863,this.words[le+1]=ge>>>26-de&67108863,de+=24,de>=26&&(de-=26,le++);return this.strip()};function h(q,z){var H=q.charCodeAt(z);return H>=65&&H<=70?H-55:H>=97&&H<=102?H-87:H-48&15}function g(q,z,H){var G=h(q,H);return H-1>=z&&(G|=h(q,H-1)<<4),G}u.prototype._parseHex=function(z,H,G){this.length=Math.ceil((z.length-H)/6),this.words=new Array(this.length);for(var J=0;J<this.length;J++)this.words[J]=0;var le=0,ge=0,de;if(G==="be")for(J=z.length-1;J>=H;J-=2)de=g(z,H,J)<<le,this.words[ge]|=de&67108863,le>=18?(le-=18,ge+=1,this.words[ge]|=de>>>26):le+=8;else{var me=z.length-H;for(J=me%2===0?H+1:H;J<z.length;J+=2)de=g(z,H,J)<<le,this.words[ge]|=de&67108863,le>=18?(le-=18,ge+=1,this.words[ge]|=de>>>26):le+=8}this.strip()};function m(q,z,H,G){for(var J=0,le=Math.min(q.length,H),ge=z;ge<le;ge++){var de=q.charCodeAt(ge)-48;J*=G,de>=49?J+=de-49+10:de>=17?J+=de-17+10:J+=de}return J}u.prototype._parseBase=function(z,H,G){this.words=[0],this.length=1;for(var J=0,le=1;le<=67108863;le*=H)J++;J--,le=le/H|0;for(var ge=z.length-G,de=ge%J,me=Math.min(ge,ge-de)+G,W=0,ie=G;ie<me;ie+=J)W=m(z,ie,ie+J,H),this.imuln(le),this.words[0]+W<67108864?this.words[0]+=W:this._iaddn(W);if(de!==0){var se=1;for(W=m(z,ie,z.length,H),ie=0;ie<de;ie++)se*=H;this.imuln(se),this.words[0]+W<67108864?this.words[0]+=W:this._iaddn(W)}this.strip()},u.prototype.copy=function(z){z.words=new Array(this.length);for(var H=0;H<this.length;H++)z.words[H]=this.words[H];z.length=this.length,z.negative=this.negative,z.red=this.red},u.prototype.clone=function(){var z=new u(null);return this.copy(z),z},u.prototype._expand=function(z){for(;this.length<z;)this.words[this.length++]=0;return this},u.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},u.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},u.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var E=["","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"],c=[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],_=[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];u.prototype.toString=function(z,H){z=z||10,H=H|0||1;var G;if(z===16||z==="hex"){G="";for(var J=0,le=0,ge=0;ge<this.length;ge++){var de=this.words[ge],me=((de<<J|le)&16777215).toString(16);le=de>>>24-J&16777215,le!==0||ge!==this.length-1?G=E[6-me.length]+me+G:G=me+G,J+=2,J>=26&&(J-=26,ge--)}for(le!==0&&(G=le.toString(16)+G);G.length%H!==0;)G="0"+G;return this.negative!==0&&(G="-"+G),G}if(z===(z|0)&&z>=2&&z<=36){var W=c[z],ie=_[z];G="";var se=this.clone();for(se.negative=0;!se.isZero();){var ee=se.modn(ie).toString(z);se=se.idivn(ie),se.isZero()?G=ee+G:G=E[W-ee.length]+ee+G}for(this.isZero()&&(G="0"+G);G.length%H!==0;)G="0"+G;return this.negative!==0&&(G="-"+G),G}s(!1,"Base should be between 2 and 36")},u.prototype.toNumber=function(){var z=this.words[0];return this.length===2?z+=this.words[1]*67108864:this.length===3&&this.words[2]===1?z+=4503599627370496+this.words[1]*67108864:this.length>2&&s(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-z:z},u.prototype.toJSON=function(){return this.toString(16)},u.prototype.toBuffer=function(z,H){return s(typeof d<"u"),this.toArrayLike(d,z,H)},u.prototype.toArray=function(z,H){return this.toArrayLike(Array,z,H)},u.prototype.toArrayLike=function(z,H,G){var J=this.byteLength(),le=G||Math.max(1,J);s(J<=le,"byte array longer than desired length"),s(le>0,"Requested array length <= 0"),this.strip();var ge=H==="le",de=new z(le),me,W,ie=this.clone();if(ge){for(W=0;!ie.isZero();W++)me=ie.andln(255),ie.iushrn(8),de[W]=me;for(;W<le;W++)de[W]=0}else{for(W=0;W<le-J;W++)de[W]=0;for(W=0;!ie.isZero();W++)me=ie.andln(255),ie.iushrn(8),de[le-W-1]=me}return de},Math.clz32?u.prototype._countBits=function(z){return 32-Math.clz32(z)}:u.prototype._countBits=function(z){var H=z,G=0;return H>=4096&&(G+=13,H>>>=13),H>=64&&(G+=7,H>>>=7),H>=8&&(G+=4,H>>>=4),H>=2&&(G+=2,H>>>=2),G+H},u.prototype._zeroBits=function(z){if(z===0)return 26;var H=z,G=0;return(H&8191)===0&&(G+=13,H>>>=13),(H&127)===0&&(G+=7,H>>>=7),(H&15)===0&&(G+=4,H>>>=4),(H&3)===0&&(G+=2,H>>>=2),(H&1)===0&&G++,G},u.prototype.bitLength=function(){var z=this.words[this.length-1],H=this._countBits(z);return(this.length-1)*26+H};function T(q){for(var z=new Array(q.bitLength()),H=0;H<z.length;H++){var G=H/26|0,J=H%26;z[H]=(q.words[G]&1<<J)>>>J}return z}u.prototype.zeroBits=function(){if(this.isZero())return 0;for(var z=0,H=0;H<this.length;H++){var G=this._zeroBits(this.words[H]);if(z+=G,G!==26)break}return z},u.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},u.prototype.toTwos=function(z){return this.negative!==0?this.abs().inotn(z).iaddn(1):this.clone()},u.prototype.fromTwos=function(z){return this.testn(z-1)?this.notn(z).iaddn(1).ineg():this.clone()},u.prototype.isNeg=function(){return this.negative!==0},u.prototype.neg=function(){return this.clone().ineg()},u.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},u.prototype.iuor=function(z){for(;this.length<z.length;)this.words[this.length++]=0;for(var H=0;H<z.length;H++)this.words[H]=this.words[H]|z.words[H];return this.strip()},u.prototype.ior=function(z){return s((this.negative|z.negative)===0),this.iuor(z)},u.prototype.or=function(z){return this.length>z.length?this.clone().ior(z):z.clone().ior(this)},u.prototype.uor=function(z){return this.length>z.length?this.clone().iuor(z):z.clone().iuor(this)},u.prototype.iuand=function(z){var H;this.length>z.length?H=z:H=this;for(var G=0;G<H.length;G++)this.words[G]=this.words[G]&z.words[G];return this.length=H.length,this.strip()},u.prototype.iand=function(z){return s((this.negative|z.negative)===0),this.iuand(z)},u.prototype.and=function(z){return this.length>z.length?this.clone().iand(z):z.clone().iand(this)},u.prototype.uand=function(z){return this.length>z.length?this.clone().iuand(z):z.clone().iuand(this)},u.prototype.iuxor=function(z){var H,G;this.length>z.length?(H=this,G=z):(H=z,G=this);for(var J=0;J<G.length;J++)this.words[J]=H.words[J]^G.words[J];if(this!==H)for(;J<H.length;J++)this.words[J]=H.words[J];return this.length=H.length,this.strip()},u.prototype.ixor=function(z){return s((this.negative|z.negative)===0),this.iuxor(z)},u.prototype.xor=function(z){return this.length>z.length?this.clone().ixor(z):z.clone().ixor(this)},u.prototype.uxor=function(z){return this.length>z.length?this.clone().iuxor(z):z.clone().iuxor(this)},u.prototype.inotn=function(z){s(typeof z=="number"&&z>=0);var H=Math.ceil(z/26)|0,G=z%26;this._expand(H),G>0&&H--;for(var J=0;J<H;J++)this.words[J]=~this.words[J]&67108863;return G>0&&(this.words[J]=~this.words[J]&67108863>>26-G),this.strip()},u.prototype.notn=function(z){return this.clone().inotn(z)},u.prototype.setn=function(z,H){s(typeof z=="number"&&z>=0);var G=z/26|0,J=z%26;return this._expand(G+1),H?this.words[G]=this.words[G]|1<<J:this.words[G]=this.words[G]&~(1<<J),this.strip()},u.prototype.iadd=function(z){var H;if(this.negative!==0&&z.negative===0)return this.negative=0,H=this.isub(z),this.negative^=1,this._normSign();if(this.negative===0&&z.negative!==0)return z.negative=0,H=this.isub(z),z.negative=1,H._normSign();var G,J;this.length>z.length?(G=this,J=z):(G=z,J=this);for(var le=0,ge=0;ge<J.length;ge++)H=(G.words[ge]|0)+(J.words[ge]|0)+le,this.words[ge]=H&67108863,le=H>>>26;for(;le!==0&&ge<G.length;ge++)H=(G.words[ge]|0)+le,this.words[ge]=H&67108863,le=H>>>26;if(this.length=G.length,le!==0)this.words[this.length]=le,this.length++;else if(G!==this)for(;ge<G.length;ge++)this.words[ge]=G.words[ge];return this},u.prototype.add=function(z){var H;return z.negative!==0&&this.negative===0?(z.negative=0,H=this.sub(z),z.negative^=1,H):z.negative===0&&this.negative!==0?(this.negative=0,H=z.sub(this),this.negative=1,H):this.length>z.length?this.clone().iadd(z):z.clone().iadd(this)},u.prototype.isub=function(z){if(z.negative!==0){z.negative=0;var H=this.iadd(z);return z.negative=1,H._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(z),this.negative=1,this._normSign();var G=this.cmp(z);if(G===0)return this.negative=0,this.length=1,this.words[0]=0,this;var J,le;G>0?(J=this,le=z):(J=z,le=this);for(var ge=0,de=0;de<le.length;de++)H=(J.words[de]|0)-(le.words[de]|0)+ge,ge=H>>26,this.words[de]=H&67108863;for(;ge!==0&&de<J.length;de++)H=(J.words[de]|0)+ge,ge=H>>26,this.words[de]=H&67108863;if(ge===0&&de<J.length&&J!==this)for(;de<J.length;de++)this.words[de]=J.words[de];return this.length=Math.max(this.length,de),J!==this&&(this.negative=1),this.strip()},u.prototype.sub=function(z){return this.clone().isub(z)};function M(q,z,H){H.negative=z.negative^q.negative;var G=q.length+z.length|0;H.length=G,G=G-1|0;var J=q.words[0]|0,le=z.words[0]|0,ge=J*le,de=ge&67108863,me=ge/67108864|0;H.words[0]=de;for(var W=1;W<G;W++){for(var ie=me>>>26,se=me&67108863,ee=Math.min(W,z.length-1),pe=Math.max(0,W-q.length+1);pe<=ee;pe++){var oe=W-pe|0;J=q.words[oe]|0,le=z.words[pe]|0,ge=J*le+se,ie+=ge/67108864|0,se=ge&67108863}H.words[W]=se|0,me=ie|0}return me!==0?H.words[W]=me|0:H.length--,H.strip()}var k=function(z,H,G){var J=z.words,le=H.words,ge=G.words,de=0,me,W,ie,se=J[0]|0,ee=se&8191,pe=se>>>13,oe=J[1]|0,Y=oe&8191,ce=oe>>>13,ue=J[2]|0,_e=ue&8191,Le=ue>>>13,ze=J[3]|0,Xe=ze&8191,Ve=ze>>>13,rt=J[4]|0,mt=rt&8191,_t=rt>>>13,vt=J[5]|0,ut=vt&8191,Fe=vt>>>13,Pe=J[6]|0,be=Pe&8191,Ye=Pe>>>13,yt=J[7]|0,wt=yt&8191,ht=yt>>>13,Yt=J[8]|0,$t=Yt&8191,fr=Yt>>>13,mr=J[9]|0,Ur=mr&8191,jr=mr>>>13,fn=le[0]|0,Br=fn&8191,Qr=fn>>>13,Ot=le[1]|0,$e=Ot&8191,ot=Ot>>>13,De=le[2]|0,Ee=De&8191,Ae=De>>>13,Ie=le[3]|0,tt=Ie&8191,st=Ie>>>13,Bt=le[4]|0,Ft=Bt&8191,Wt=Bt>>>13,lr=le[5]|0,Rr=lr&8191,Mr=lr>>>13,Sr=le[6]|0,Kr=Sr&8191,Hn=Sr>>>13,ga=le[7]|0,ua=ga&8191,Ta=ga>>>13,Aa=le[8]|0,ia=Aa&8191,$a=Aa>>>13,ci=le[9]|0,_r=ci&8191,Qt=ci>>>13;G.negative=z.negative^H.negative,G.length=19,me=Math.imul(ee,Br),W=Math.imul(ee,Qr),W=W+Math.imul(pe,Br)|0,ie=Math.imul(pe,Qr);var yr=(de+me|0)+((W&8191)<<13)|0;de=(ie+(W>>>13)|0)+(yr>>>26)|0,yr&=67108863,me=Math.imul(Y,Br),W=Math.imul(Y,Qr),W=W+Math.imul(ce,Br)|0,ie=Math.imul(ce,Qr),me=me+Math.imul(ee,$e)|0,W=W+Math.imul(ee,ot)|0,W=W+Math.imul(pe,$e)|0,ie=ie+Math.imul(pe,ot)|0;var br=(de+me|0)+((W&8191)<<13)|0;de=(ie+(W>>>13)|0)+(br>>>26)|0,br&=67108863,me=Math.imul(_e,Br),W=Math.imul(_e,Qr),W=W+Math.imul(Le,Br)|0,ie=Math.imul(Le,Qr),me=me+Math.imul(Y,$e)|0,W=W+Math.imul(Y,ot)|0,W=W+Math.imul(ce,$e)|0,ie=ie+Math.imul(ce,ot)|0,me=me+Math.imul(ee,Ee)|0,W=W+Math.imul(ee,Ae)|0,W=W+Math.imul(pe,Ee)|0,ie=ie+Math.imul(pe,Ae)|0;var an=(de+me|0)+((W&8191)<<13)|0;de=(ie+(W>>>13)|0)+(an>>>26)|0,an&=67108863,me=Math.imul(Xe,Br),W=Math.imul(Xe,Qr),W=W+Math.imul(Ve,Br)|0,ie=Math.imul(Ve,Qr),me=me+Math.imul(_e,$e)|0,W=W+Math.imul(_e,ot)|0,W=W+Math.imul(Le,$e)|0,ie=ie+Math.imul(Le,ot)|0,me=me+Math.imul(Y,Ee)|0,W=W+Math.imul(Y,Ae)|0,W=W+Math.imul(ce,Ee)|0,ie=ie+Math.imul(ce,Ae)|0,me=me+Math.imul(ee,tt)|0,W=W+Math.imul(ee,st)|0,W=W+Math.imul(pe,tt)|0,ie=ie+Math.imul(pe,st)|0;var wn=(de+me|0)+((W&8191)<<13)|0;de=(ie+(W>>>13)|0)+(wn>>>26)|0,wn&=67108863,me=Math.imul(mt,Br),W=Math.imul(mt,Qr),W=W+Math.imul(_t,Br)|0,ie=Math.imul(_t,Qr),me=me+Math.imul(Xe,$e)|0,W=W+Math.imul(Xe,ot)|0,W=W+Math.imul(Ve,$e)|0,ie=ie+Math.imul(Ve,ot)|0,me=me+Math.imul(_e,Ee)|0,W=W+Math.imul(_e,Ae)|0,W=W+Math.imul(Le,Ee)|0,ie=ie+Math.imul(Le,Ae)|0,me=me+Math.imul(Y,tt)|0,W=W+Math.imul(Y,st)|0,W=W+Math.imul(ce,tt)|0,ie=ie+Math.imul(ce,st)|0,me=me+Math.imul(ee,Ft)|0,W=W+Math.imul(ee,Wt)|0,W=W+Math.imul(pe,Ft)|0,ie=ie+Math.imul(pe,Wt)|0;var Ln=(de+me|0)+((W&8191)<<13)|0;de=(ie+(W>>>13)|0)+(Ln>>>26)|0,Ln&=67108863,me=Math.imul(ut,Br),W=Math.imul(ut,Qr),W=W+Math.imul(Fe,Br)|0,ie=Math.imul(Fe,Qr),me=me+Math.imul(mt,$e)|0,W=W+Math.imul(mt,ot)|0,W=W+Math.imul(_t,$e)|0,ie=ie+Math.imul(_t,ot)|0,me=me+Math.imul(Xe,Ee)|0,W=W+Math.imul(Xe,Ae)|0,W=W+Math.imul(Ve,Ee)|0,ie=ie+Math.imul(Ve,Ae)|0,me=me+Math.imul(_e,tt)|0,W=W+Math.imul(_e,st)|0,W=W+Math.imul(Le,tt)|0,ie=ie+Math.imul(Le,st)|0,me=me+Math.imul(Y,Ft)|0,W=W+Math.imul(Y,Wt)|0,W=W+Math.imul(ce,Ft)|0,ie=ie+Math.imul(ce,Wt)|0,me=me+Math.imul(ee,Rr)|0,W=W+Math.imul(ee,Mr)|0,W=W+Math.imul(pe,Rr)|0,ie=ie+Math.imul(pe,Mr)|0;var Bn=(de+me|0)+((W&8191)<<13)|0;de=(ie+(W>>>13)|0)+(Bn>>>26)|0,Bn&=67108863,me=Math.imul(be,Br),W=Math.imul(be,Qr),W=W+Math.imul(Ye,Br)|0,ie=Math.imul(Ye,Qr),me=me+Math.imul(ut,$e)|0,W=W+Math.imul(ut,ot)|0,W=W+Math.imul(Fe,$e)|0,ie=ie+Math.imul(Fe,ot)|0,me=me+Math.imul(mt,Ee)|0,W=W+Math.imul(mt,Ae)|0,W=W+Math.imul(_t,Ee)|0,ie=ie+Math.imul(_t,Ae)|0,me=me+Math.imul(Xe,tt)|0,W=W+Math.imul(Xe,st)|0,W=W+Math.imul(Ve,tt)|0,ie=ie+Math.imul(Ve,st)|0,me=me+Math.imul(_e,Ft)|0,W=W+Math.imul(_e,Wt)|0,W=W+Math.imul(Le,Ft)|0,ie=ie+Math.imul(Le,Wt)|0,me=me+Math.imul(Y,Rr)|0,W=W+Math.imul(Y,Mr)|0,W=W+Math.imul(ce,Rr)|0,ie=ie+Math.imul(ce,Mr)|0,me=me+Math.imul(ee,Kr)|0,W=W+Math.imul(ee,Hn)|0,W=W+Math.imul(pe,Kr)|0,ie=ie+Math.imul(pe,Hn)|0;var xa=(de+me|0)+((W&8191)<<13)|0;de=(ie+(W>>>13)|0)+(xa>>>26)|0,xa&=67108863,me=Math.imul(wt,Br),W=Math.imul(wt,Qr),W=W+Math.imul(ht,Br)|0,ie=Math.imul(ht,Qr),me=me+Math.imul(be,$e)|0,W=W+Math.imul(be,ot)|0,W=W+Math.imul(Ye,$e)|0,ie=ie+Math.imul(Ye,ot)|0,me=me+Math.imul(ut,Ee)|0,W=W+Math.imul(ut,Ae)|0,W=W+Math.imul(Fe,Ee)|0,ie=ie+Math.imul(Fe,Ae)|0,me=me+Math.imul(mt,tt)|0,W=W+Math.imul(mt,st)|0,W=W+Math.imul(_t,tt)|0,ie=ie+Math.imul(_t,st)|0,me=me+Math.imul(Xe,Ft)|0,W=W+Math.imul(Xe,Wt)|0,W=W+Math.imul(Ve,Ft)|0,ie=ie+Math.imul(Ve,Wt)|0,me=me+Math.imul(_e,Rr)|0,W=W+Math.imul(_e,Mr)|0,W=W+Math.imul(Le,Rr)|0,ie=ie+Math.imul(Le,Mr)|0,me=me+Math.imul(Y,Kr)|0,W=W+Math.imul(Y,Hn)|0,W=W+Math.imul(ce,Kr)|0,ie=ie+Math.imul(ce,Hn)|0,me=me+Math.imul(ee,ua)|0,W=W+Math.imul(ee,Ta)|0,W=W+Math.imul(pe,ua)|0,ie=ie+Math.imul(pe,Ta)|0;var za=(de+me|0)+((W&8191)<<13)|0;de=(ie+(W>>>13)|0)+(za>>>26)|0,za&=67108863,me=Math.imul($t,Br),W=Math.imul($t,Qr),W=W+Math.imul(fr,Br)|0,ie=Math.imul(fr,Qr),me=me+Math.imul(wt,$e)|0,W=W+Math.imul(wt,ot)|0,W=W+Math.imul(ht,$e)|0,ie=ie+Math.imul(ht,ot)|0,me=me+Math.imul(be,Ee)|0,W=W+Math.imul(be,Ae)|0,W=W+Math.imul(Ye,Ee)|0,ie=ie+Math.imul(Ye,Ae)|0,me=me+Math.imul(ut,tt)|0,W=W+Math.imul(ut,st)|0,W=W+Math.imul(Fe,tt)|0,ie=ie+Math.imul(Fe,st)|0,me=me+Math.imul(mt,Ft)|0,W=W+Math.imul(mt,Wt)|0,W=W+Math.imul(_t,Ft)|0,ie=ie+Math.imul(_t,Wt)|0,me=me+Math.imul(Xe,Rr)|0,W=W+Math.imul(Xe,Mr)|0,W=W+Math.imul(Ve,Rr)|0,ie=ie+Math.imul(Ve,Mr)|0,me=me+Math.imul(_e,Kr)|0,W=W+Math.imul(_e,Hn)|0,W=W+Math.imul(Le,Kr)|0,ie=ie+Math.imul(Le,Hn)|0,me=me+Math.imul(Y,ua)|0,W=W+Math.imul(Y,Ta)|0,W=W+Math.imul(ce,ua)|0,ie=ie+Math.imul(ce,Ta)|0,me=me+Math.imul(ee,ia)|0,W=W+Math.imul(ee,$a)|0,W=W+Math.imul(pe,ia)|0,ie=ie+Math.imul(pe,$a)|0;var Ia=(de+me|0)+((W&8191)<<13)|0;de=(ie+(W>>>13)|0)+(Ia>>>26)|0,Ia&=67108863,me=Math.imul(Ur,Br),W=Math.imul(Ur,Qr),W=W+Math.imul(jr,Br)|0,ie=Math.imul(jr,Qr),me=me+Math.imul($t,$e)|0,W=W+Math.imul($t,ot)|0,W=W+Math.imul(fr,$e)|0,ie=ie+Math.imul(fr,ot)|0,me=me+Math.imul(wt,Ee)|0,W=W+Math.imul(wt,Ae)|0,W=W+Math.imul(ht,Ee)|0,ie=ie+Math.imul(ht,Ae)|0,me=me+Math.imul(be,tt)|0,W=W+Math.imul(be,st)|0,W=W+Math.imul(Ye,tt)|0,ie=ie+Math.imul(Ye,st)|0,me=me+Math.imul(ut,Ft)|0,W=W+Math.imul(ut,Wt)|0,W=W+Math.imul(Fe,Ft)|0,ie=ie+Math.imul(Fe,Wt)|0,me=me+Math.imul(mt,Rr)|0,W=W+Math.imul(mt,Mr)|0,W=W+Math.imul(_t,Rr)|0,ie=ie+Math.imul(_t,Mr)|0,me=me+Math.imul(Xe,Kr)|0,W=W+Math.imul(Xe,Hn)|0,W=W+Math.imul(Ve,Kr)|0,ie=ie+Math.imul(Ve,Hn)|0,me=me+Math.imul(_e,ua)|0,W=W+Math.imul(_e,Ta)|0,W=W+Math.imul(Le,ua)|0,ie=ie+Math.imul(Le,Ta)|0,me=me+Math.imul(Y,ia)|0,W=W+Math.imul(Y,$a)|0,W=W+Math.imul(ce,ia)|0,ie=ie+Math.imul(ce,$a)|0,me=me+Math.imul(ee,_r)|0,W=W+Math.imul(ee,Qt)|0,W=W+Math.imul(pe,_r)|0,ie=ie+Math.imul(pe,Qt)|0;var Ba=(de+me|0)+((W&8191)<<13)|0;de=(ie+(W>>>13)|0)+(Ba>>>26)|0,Ba&=67108863,me=Math.imul(Ur,$e),W=Math.imul(Ur,ot),W=W+Math.imul(jr,$e)|0,ie=Math.imul(jr,ot),me=me+Math.imul($t,Ee)|0,W=W+Math.imul($t,Ae)|0,W=W+Math.imul(fr,Ee)|0,ie=ie+Math.imul(fr,Ae)|0,me=me+Math.imul(wt,tt)|0,W=W+Math.imul(wt,st)|0,W=W+Math.imul(ht,tt)|0,ie=ie+Math.imul(ht,st)|0,me=me+Math.imul(be,Ft)|0,W=W+Math.imul(be,Wt)|0,W=W+Math.imul(Ye,Ft)|0,ie=ie+Math.imul(Ye,Wt)|0,me=me+Math.imul(ut,Rr)|0,W=W+Math.imul(ut,Mr)|0,W=W+Math.imul(Fe,Rr)|0,ie=ie+Math.imul(Fe,Mr)|0,me=me+Math.imul(mt,Kr)|0,W=W+Math.imul(mt,Hn)|0,W=W+Math.imul(_t,Kr)|0,ie=ie+Math.imul(_t,Hn)|0,me=me+Math.imul(Xe,ua)|0,W=W+Math.imul(Xe,Ta)|0,W=W+Math.imul(Ve,ua)|0,ie=ie+Math.imul(Ve,Ta)|0,me=me+Math.imul(_e,ia)|0,W=W+Math.imul(_e,$a)|0,W=W+Math.imul(Le,ia)|0,ie=ie+Math.imul(Le,$a)|0,me=me+Math.imul(Y,_r)|0,W=W+Math.imul(Y,Qt)|0,W=W+Math.imul(ce,_r)|0,ie=ie+Math.imul(ce,Qt)|0;var Ka=(de+me|0)+((W&8191)<<13)|0;de=(ie+(W>>>13)|0)+(Ka>>>26)|0,Ka&=67108863,me=Math.imul(Ur,Ee),W=Math.imul(Ur,Ae),W=W+Math.imul(jr,Ee)|0,ie=Math.imul(jr,Ae),me=me+Math.imul($t,tt)|0,W=W+Math.imul($t,st)|0,W=W+Math.imul(fr,tt)|0,ie=ie+Math.imul(fr,st)|0,me=me+Math.imul(wt,Ft)|0,W=W+Math.imul(wt,Wt)|0,W=W+Math.imul(ht,Ft)|0,ie=ie+Math.imul(ht,Wt)|0,me=me+Math.imul(be,Rr)|0,W=W+Math.imul(be,Mr)|0,W=W+Math.imul(Ye,Rr)|0,ie=ie+Math.imul(Ye,Mr)|0,me=me+Math.imul(ut,Kr)|0,W=W+Math.imul(ut,Hn)|0,W=W+Math.imul(Fe,Kr)|0,ie=ie+Math.imul(Fe,Hn)|0,me=me+Math.imul(mt,ua)|0,W=W+Math.imul(mt,Ta)|0,W=W+Math.imul(_t,ua)|0,ie=ie+Math.imul(_t,Ta)|0,me=me+Math.imul(Xe,ia)|0,W=W+Math.imul(Xe,$a)|0,W=W+Math.imul(Ve,ia)|0,ie=ie+Math.imul(Ve,$a)|0,me=me+Math.imul(_e,_r)|0,W=W+Math.imul(_e,Qt)|0,W=W+Math.imul(Le,_r)|0,ie=ie+Math.imul(Le,Qt)|0;var fa=(de+me|0)+((W&8191)<<13)|0;de=(ie+(W>>>13)|0)+(fa>>>26)|0,fa&=67108863,me=Math.imul(Ur,tt),W=Math.imul(Ur,st),W=W+Math.imul(jr,tt)|0,ie=Math.imul(jr,st),me=me+Math.imul($t,Ft)|0,W=W+Math.imul($t,Wt)|0,W=W+Math.imul(fr,Ft)|0,ie=ie+Math.imul(fr,Wt)|0,me=me+Math.imul(wt,Rr)|0,W=W+Math.imul(wt,Mr)|0,W=W+Math.imul(ht,Rr)|0,ie=ie+Math.imul(ht,Mr)|0,me=me+Math.imul(be,Kr)|0,W=W+Math.imul(be,Hn)|0,W=W+Math.imul(Ye,Kr)|0,ie=ie+Math.imul(Ye,Hn)|0,me=me+Math.imul(ut,ua)|0,W=W+Math.imul(ut,Ta)|0,W=W+Math.imul(Fe,ua)|0,ie=ie+Math.imul(Fe,Ta)|0,me=me+Math.imul(mt,ia)|0,W=W+Math.imul(mt,$a)|0,W=W+Math.imul(_t,ia)|0,ie=ie+Math.imul(_t,$a)|0,me=me+Math.imul(Xe,_r)|0,W=W+Math.imul(Xe,Qt)|0,W=W+Math.imul(Ve,_r)|0,ie=ie+Math.imul(Ve,Qt)|0;var Bi=(de+me|0)+((W&8191)<<13)|0;de=(ie+(W>>>13)|0)+(Bi>>>26)|0,Bi&=67108863,me=Math.imul(Ur,Ft),W=Math.imul(Ur,Wt),W=W+Math.imul(jr,Ft)|0,ie=Math.imul(jr,Wt),me=me+Math.imul($t,Rr)|0,W=W+Math.imul($t,Mr)|0,W=W+Math.imul(fr,Rr)|0,ie=ie+Math.imul(fr,Mr)|0,me=me+Math.imul(wt,Kr)|0,W=W+Math.imul(wt,Hn)|0,W=W+Math.imul(ht,Kr)|0,ie=ie+Math.imul(ht,Hn)|0,me=me+Math.imul(be,ua)|0,W=W+Math.imul(be,Ta)|0,W=W+Math.imul(Ye,ua)|0,ie=ie+Math.imul(Ye,Ta)|0,me=me+Math.imul(ut,ia)|0,W=W+Math.imul(ut,$a)|0,W=W+Math.imul(Fe,ia)|0,ie=ie+Math.imul(Fe,$a)|0,me=me+Math.imul(mt,_r)|0,W=W+Math.imul(mt,Qt)|0,W=W+Math.imul(_t,_r)|0,ie=ie+Math.imul(_t,Qt)|0;var Yi=(de+me|0)+((W&8191)<<13)|0;de=(ie+(W>>>13)|0)+(Yi>>>26)|0,Yi&=67108863,me=Math.imul(Ur,Rr),W=Math.imul(Ur,Mr),W=W+Math.imul(jr,Rr)|0,ie=Math.imul(jr,Mr),me=me+Math.imul($t,Kr)|0,W=W+Math.imul($t,Hn)|0,W=W+Math.imul(fr,Kr)|0,ie=ie+Math.imul(fr,Hn)|0,me=me+Math.imul(wt,ua)|0,W=W+Math.imul(wt,Ta)|0,W=W+Math.imul(ht,ua)|0,ie=ie+Math.imul(ht,Ta)|0,me=me+Math.imul(be,ia)|0,W=W+Math.imul(be,$a)|0,W=W+Math.imul(Ye,ia)|0,ie=ie+Math.imul(Ye,$a)|0,me=me+Math.imul(ut,_r)|0,W=W+Math.imul(ut,Qt)|0,W=W+Math.imul(Fe,_r)|0,ie=ie+Math.imul(Fe,Qt)|0;var Ht=(de+me|0)+((W&8191)<<13)|0;de=(ie+(W>>>13)|0)+(Ht>>>26)|0,Ht&=67108863,me=Math.imul(Ur,Kr),W=Math.imul(Ur,Hn),W=W+Math.imul(jr,Kr)|0,ie=Math.imul(jr,Hn),me=me+Math.imul($t,ua)|0,W=W+Math.imul($t,Ta)|0,W=W+Math.imul(fr,ua)|0,ie=ie+Math.imul(fr,Ta)|0,me=me+Math.imul(wt,ia)|0,W=W+Math.imul(wt,$a)|0,W=W+Math.imul(ht,ia)|0,ie=ie+Math.imul(ht,$a)|0,me=me+Math.imul(be,_r)|0,W=W+Math.imul(be,Qt)|0,W=W+Math.imul(Ye,_r)|0,ie=ie+Math.imul(Ye,Qt)|0;var kt=(de+me|0)+((W&8191)<<13)|0;de=(ie+(W>>>13)|0)+(kt>>>26)|0,kt&=67108863,me=Math.imul(Ur,ua),W=Math.imul(Ur,Ta),W=W+Math.imul(jr,ua)|0,ie=Math.imul(jr,Ta),me=me+Math.imul($t,ia)|0,W=W+Math.imul($t,$a)|0,W=W+Math.imul(fr,ia)|0,ie=ie+Math.imul(fr,$a)|0,me=me+Math.imul(wt,_r)|0,W=W+Math.imul(wt,Qt)|0,W=W+Math.imul(ht,_r)|0,ie=ie+Math.imul(ht,Qt)|0;var qr=(de+me|0)+((W&8191)<<13)|0;de=(ie+(W>>>13)|0)+(qr>>>26)|0,qr&=67108863,me=Math.imul(Ur,ia),W=Math.imul(Ur,$a),W=W+Math.imul(jr,ia)|0,ie=Math.imul(jr,$a),me=me+Math.imul($t,_r)|0,W=W+Math.imul($t,Qt)|0,W=W+Math.imul(fr,_r)|0,ie=ie+Math.imul(fr,Qt)|0;var en=(de+me|0)+((W&8191)<<13)|0;de=(ie+(W>>>13)|0)+(en>>>26)|0,en&=67108863,me=Math.imul(Ur,_r),W=Math.imul(Ur,Qt),W=W+Math.imul(jr,_r)|0,ie=Math.imul(jr,Qt);var rn=(de+me|0)+((W&8191)<<13)|0;return de=(ie+(W>>>13)|0)+(rn>>>26)|0,rn&=67108863,ge[0]=yr,ge[1]=br,ge[2]=an,ge[3]=wn,ge[4]=Ln,ge[5]=Bn,ge[6]=xa,ge[7]=za,ge[8]=Ia,ge[9]=Ba,ge[10]=Ka,ge[11]=fa,ge[12]=Bi,ge[13]=Yi,ge[14]=Ht,ge[15]=kt,ge[16]=qr,ge[17]=en,ge[18]=rn,de!==0&&(ge[19]=de,G.length++),G};Math.imul||(k=M);function b(q,z,H){H.negative=z.negative^q.negative,H.length=q.length+z.length;for(var G=0,J=0,le=0;le<H.length-1;le++){var ge=J;J=0;for(var de=G&67108863,me=Math.min(le,z.length-1),W=Math.max(0,le-q.length+1);W<=me;W++){var ie=le-W,se=q.words[ie]|0,ee=z.words[W]|0,pe=se*ee,oe=pe&67108863;ge=ge+(pe/67108864|0)|0,oe=oe+de|0,de=oe&67108863,ge=ge+(oe>>>26)|0,J+=ge>>>26,ge&=67108863}H.words[le]=de,G=ge,ge=J}return G!==0?H.words[le]=G:H.length--,H.strip()}function A(q,z,H){var G=new y;return G.mulp(q,z,H)}u.prototype.mulTo=function(z,H){var G,J=this.length+z.length;return this.length===10&&z.length===10?G=k(this,z,H):J<63?G=M(this,z,H):J<1024?G=b(this,z,H):G=A(this,z,H),G};function y(q,z){this.x=q,this.y=z}y.prototype.makeRBT=function(z){for(var H=new Array(z),G=u.prototype._countBits(z)-1,J=0;J<z;J++)H[J]=this.revBin(J,G,z);return H},y.prototype.revBin=function(z,H,G){if(z===0||z===G-1)return z;for(var J=0,le=0;le<H;le++)J|=(z&1)<<H-le-1,z>>=1;return J},y.prototype.permute=function(z,H,G,J,le,ge){for(var de=0;de<ge;de++)J[de]=H[z[de]],le[de]=G[z[de]]},y.prototype.transform=function(z,H,G,J,le,ge){this.permute(ge,z,H,G,J,le);for(var de=1;de<le;de<<=1)for(var me=de<<1,W=Math.cos(2*Math.PI/me),ie=Math.sin(2*Math.PI/me),se=0;se<le;se+=me)for(var ee=W,pe=ie,oe=0;oe<de;oe++){var Y=G[se+oe],ce=J[se+oe],ue=G[se+oe+de],_e=J[se+oe+de],Le=ee*ue-pe*_e;_e=ee*_e+pe*ue,ue=Le,G[se+oe]=Y+ue,J[se+oe]=ce+_e,G[se+oe+de]=Y-ue,J[se+oe+de]=ce-_e,oe!==me&&(Le=W*ee-ie*pe,pe=W*pe+ie*ee,ee=Le)}},y.prototype.guessLen13b=function(z,H){var G=Math.max(H,z)|1,J=G&1,le=0;for(G=G/2|0;G;G=G>>>1)le++;return 1<<le+1+J},y.prototype.conjugate=function(z,H,G){if(!(G<=1))for(var J=0;J<G/2;J++){var le=z[J];z[J]=z[G-J-1],z[G-J-1]=le,le=H[J],H[J]=-H[G-J-1],H[G-J-1]=-le}},y.prototype.normalize13b=function(z,H){for(var G=0,J=0;J<H/2;J++){var le=Math.round(z[2*J+1]/H)*8192+Math.round(z[2*J]/H)+G;z[J]=le&67108863,le<67108864?G=0:G=le/67108864|0}return z},y.prototype.convert13b=function(z,H,G,J){for(var le=0,ge=0;ge<H;ge++)le=le+(z[ge]|0),G[2*ge]=le&8191,le=le>>>13,G[2*ge+1]=le&8191,le=le>>>13;for(ge=2*H;ge<J;++ge)G[ge]=0;s(le===0),s((le&-8192)===0)},y.prototype.stub=function(z){for(var H=new Array(z),G=0;G<z;G++)H[G]=0;return H},y.prototype.mulp=function(z,H,G){var J=2*this.guessLen13b(z.length,H.length),le=this.makeRBT(J),ge=this.stub(J),de=new Array(J),me=new Array(J),W=new Array(J),ie=new Array(J),se=new Array(J),ee=new Array(J),pe=G.words;pe.length=J,this.convert13b(z.words,z.length,de,J),this.convert13b(H.words,H.length,ie,J),this.transform(de,ge,me,W,J,le),this.transform(ie,ge,se,ee,J,le);for(var oe=0;oe<J;oe++){var Y=me[oe]*se[oe]-W[oe]*ee[oe];W[oe]=me[oe]*ee[oe]+W[oe]*se[oe],me[oe]=Y}return this.conjugate(me,W,J),this.transform(me,W,pe,ge,J,le),this.conjugate(pe,ge,J),this.normalize13b(pe,J),G.negative=z.negative^H.negative,G.length=z.length+H.length,G.strip()},u.prototype.mul=function(z){var H=new u(null);return H.words=new Array(this.length+z.length),this.mulTo(z,H)},u.prototype.mulf=function(z){var H=new u(null);return H.words=new Array(this.length+z.length),A(this,z,H)},u.prototype.imul=function(z){return this.clone().mulTo(z,this)},u.prototype.imuln=function(z){s(typeof z=="number"),s(z<67108864);for(var H=0,G=0;G<this.length;G++){var J=(this.words[G]|0)*z,le=(J&67108863)+(H&67108863);H>>=26,H+=J/67108864|0,H+=le>>>26,this.words[G]=le&67108863}return H!==0&&(this.words[G]=H,this.length++),this},u.prototype.muln=function(z){return this.clone().imuln(z)},u.prototype.sqr=function(){return this.mul(this)},u.prototype.isqr=function(){return this.imul(this.clone())},u.prototype.pow=function(z){var H=T(z);if(H.length===0)return new u(1);for(var G=this,J=0;J<H.length&&H[J]===0;J++,G=G.sqr());if(++J<H.length)for(var le=G.sqr();J<H.length;J++,le=le.sqr())H[J]!==0&&(G=G.mul(le));return G},u.prototype.iushln=function(z){s(typeof z=="number"&&z>=0);var H=z%26,G=(z-H)/26,J=67108863>>>26-H<<26-H,le;if(H!==0){var ge=0;for(le=0;le<this.length;le++){var de=this.words[le]&J,me=(this.words[le]|0)-de<<H;this.words[le]=me|ge,ge=de>>>26-H}ge&&(this.words[le]=ge,this.length++)}if(G!==0){for(le=this.length-1;le>=0;le--)this.words[le+G]=this.words[le];for(le=0;le<G;le++)this.words[le]=0;this.length+=G}return this.strip()},u.prototype.ishln=function(z){return s(this.negative===0),this.iushln(z)},u.prototype.iushrn=function(z,H,G){s(typeof z=="number"&&z>=0);var J;H?J=(H-H%26)/26:J=0;var le=z%26,ge=Math.min((z-le)/26,this.length),de=67108863^67108863>>>le<<le,me=G;if(J-=ge,J=Math.max(0,J),me){for(var W=0;W<ge;W++)me.words[W]=this.words[W];me.length=ge}if(ge!==0)if(this.length>ge)for(this.length-=ge,W=0;W<this.length;W++)this.words[W]=this.words[W+ge];else this.words[0]=0,this.length=1;var ie=0;for(W=this.length-1;W>=0&&(ie!==0||W>=J);W--){var se=this.words[W]|0;this.words[W]=ie<<26-le|se>>>le,ie=se&de}return me&&ie!==0&&(me.words[me.length++]=ie),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},u.prototype.ishrn=function(z,H,G){return s(this.negative===0),this.iushrn(z,H,G)},u.prototype.shln=function(z){return this.clone().ishln(z)},u.prototype.ushln=function(z){return this.clone().iushln(z)},u.prototype.shrn=function(z){return this.clone().ishrn(z)},u.prototype.ushrn=function(z){return this.clone().iushrn(z)},u.prototype.testn=function(z){s(typeof z=="number"&&z>=0);var H=z%26,G=(z-H)/26,J=1<<H;if(this.length<=G)return!1;var le=this.words[G];return!!(le&J)},u.prototype.imaskn=function(z){s(typeof z=="number"&&z>=0);var H=z%26,G=(z-H)/26;if(s(this.negative===0,"imaskn works only with positive numbers"),this.length<=G)return this;if(H!==0&&G++,this.length=Math.min(G,this.length),H!==0){var J=67108863^67108863>>>H<<H;this.words[this.length-1]&=J}return this.strip()},u.prototype.maskn=function(z){return this.clone().imaskn(z)},u.prototype.iaddn=function(z){return s(typeof z=="number"),s(z<67108864),z<0?this.isubn(-z):this.negative!==0?this.length===1&&(this.words[0]|0)<z?(this.words[0]=z-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(z),this.negative=1,this):this._iaddn(z)},u.prototype._iaddn=function(z){this.words[0]+=z;for(var H=0;H<this.length&&this.words[H]>=67108864;H++)this.words[H]-=67108864,H===this.length-1?this.words[H+1]=1:this.words[H+1]++;return this.length=Math.max(this.length,H+1),this},u.prototype.isubn=function(z){if(s(typeof z=="number"),s(z<67108864),z<0)return this.iaddn(-z);if(this.negative!==0)return this.negative=0,this.iaddn(z),this.negative=1,this;if(this.words[0]-=z,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var H=0;H<this.length&&this.words[H]<0;H++)this.words[H]+=67108864,this.words[H+1]-=1;return this.strip()},u.prototype.addn=function(z){return this.clone().iaddn(z)},u.prototype.subn=function(z){return this.clone().isubn(z)},u.prototype.iabs=function(){return this.negative=0,this},u.prototype.abs=function(){return this.clone().iabs()},u.prototype._ishlnsubmul=function(z,H,G){var J=z.length+G,le;this._expand(J);var ge,de=0;for(le=0;le<z.length;le++){ge=(this.words[le+G]|0)+de;var me=(z.words[le]|0)*H;ge-=me&67108863,de=(ge>>26)-(me/67108864|0),this.words[le+G]=ge&67108863}for(;le<this.length-G;le++)ge=(this.words[le+G]|0)+de,de=ge>>26,this.words[le+G]=ge&67108863;if(de===0)return this.strip();for(s(de===-1),de=0,le=0;le<this.length;le++)ge=-(this.words[le]|0)+de,de=ge>>26,this.words[le]=ge&67108863;return this.negative=1,this.strip()},u.prototype._wordDiv=function(z,H){var G=this.length-z.length,J=this.clone(),le=z,ge=le.words[le.length-1]|0,de=this._countBits(ge);G=26-de,G!==0&&(le=le.ushln(G),J.iushln(G),ge=le.words[le.length-1]|0);var me=J.length-le.length,W;if(H!=="mod"){W=new u(null),W.length=me+1,W.words=new Array(W.length);for(var ie=0;ie<W.length;ie++)W.words[ie]=0}var se=J.clone()._ishlnsubmul(le,1,me);se.negative===0&&(J=se,W&&(W.words[me]=1));for(var ee=me-1;ee>=0;ee--){var pe=(J.words[le.length+ee]|0)*67108864+(J.words[le.length+ee-1]|0);for(pe=Math.min(pe/ge|0,67108863),J._ishlnsubmul(le,pe,ee);J.negative!==0;)pe--,J.negative=0,J._ishlnsubmul(le,1,ee),J.isZero()||(J.negative^=1);W&&(W.words[ee]=pe)}return W&&W.strip(),J.strip(),H!=="div"&&G!==0&&J.iushrn(G),{div:W||null,mod:J}},u.prototype.divmod=function(z,H,G){if(s(!z.isZero()),this.isZero())return{div:new u(0),mod:new u(0)};var J,le,ge;return this.negative!==0&&z.negative===0?(ge=this.neg().divmod(z,H),H!=="mod"&&(J=ge.div.neg()),H!=="div"&&(le=ge.mod.neg(),G&&le.negative!==0&&le.iadd(z)),{div:J,mod:le}):this.negative===0&&z.negative!==0?(ge=this.divmod(z.neg(),H),H!=="mod"&&(J=ge.div.neg()),{div:J,mod:ge.mod}):(this.negative&z.negative)!==0?(ge=this.neg().divmod(z.neg(),H),H!=="div"&&(le=ge.mod.neg(),G&&le.negative!==0&&le.isub(z)),{div:ge.div,mod:le}):z.length>this.length||this.cmp(z)<0?{div:new u(0),mod:this}:z.length===1?H==="div"?{div:this.divn(z.words[0]),mod:null}:H==="mod"?{div:null,mod:new u(this.modn(z.words[0]))}:{div:this.divn(z.words[0]),mod:new u(this.modn(z.words[0]))}:this._wordDiv(z,H)},u.prototype.div=function(z){return this.divmod(z,"div",!1).div},u.prototype.mod=function(z){return this.divmod(z,"mod",!1).mod},u.prototype.umod=function(z){return this.divmod(z,"mod",!0).mod},u.prototype.divRound=function(z){var H=this.divmod(z);if(H.mod.isZero())return H.div;var G=H.div.negative!==0?H.mod.isub(z):H.mod,J=z.ushrn(1),le=z.andln(1),ge=G.cmp(J);return ge<0||le===1&&ge===0?H.div:H.div.negative!==0?H.div.isubn(1):H.div.iaddn(1)},u.prototype.modn=function(z){s(z<=67108863);for(var H=(1<<26)%z,G=0,J=this.length-1;J>=0;J--)G=(H*G+(this.words[J]|0))%z;return G},u.prototype.idivn=function(z){s(z<=67108863);for(var H=0,G=this.length-1;G>=0;G--){var J=(this.words[G]|0)+H*67108864;this.words[G]=J/z|0,H=J%z}return this.strip()},u.prototype.divn=function(z){return this.clone().idivn(z)},u.prototype.egcd=function(z){s(z.negative===0),s(!z.isZero());var H=this,G=z.clone();H.negative!==0?H=H.umod(z):H=H.clone();for(var J=new u(1),le=new u(0),ge=new u(0),de=new u(1),me=0;H.isEven()&&G.isEven();)H.iushrn(1),G.iushrn(1),++me;for(var W=G.clone(),ie=H.clone();!H.isZero();){for(var se=0,ee=1;(H.words[0]&ee)===0&&se<26;++se,ee<<=1);if(se>0)for(H.iushrn(se);se-- >0;)(J.isOdd()||le.isOdd())&&(J.iadd(W),le.isub(ie)),J.iushrn(1),le.iushrn(1);for(var pe=0,oe=1;(G.words[0]&oe)===0&&pe<26;++pe,oe<<=1);if(pe>0)for(G.iushrn(pe);pe-- >0;)(ge.isOdd()||de.isOdd())&&(ge.iadd(W),de.isub(ie)),ge.iushrn(1),de.iushrn(1);H.cmp(G)>=0?(H.isub(G),J.isub(ge),le.isub(de)):(G.isub(H),ge.isub(J),de.isub(le))}return{a:ge,b:de,gcd:G.iushln(me)}},u.prototype._invmp=function(z){s(z.negative===0),s(!z.isZero());var H=this,G=z.clone();H.negative!==0?H=H.umod(z):H=H.clone();for(var J=new u(1),le=new u(0),ge=G.clone();H.cmpn(1)>0&&G.cmpn(1)>0;){for(var de=0,me=1;(H.words[0]&me)===0&&de<26;++de,me<<=1);if(de>0)for(H.iushrn(de);de-- >0;)J.isOdd()&&J.iadd(ge),J.iushrn(1);for(var W=0,ie=1;(G.words[0]&ie)===0&&W<26;++W,ie<<=1);if(W>0)for(G.iushrn(W);W-- >0;)le.isOdd()&&le.iadd(ge),le.iushrn(1);H.cmp(G)>=0?(H.isub(G),J.isub(le)):(G.isub(H),le.isub(J))}var se;return H.cmpn(1)===0?se=J:se=le,se.cmpn(0)<0&&se.iadd(z),se},u.prototype.gcd=function(z){if(this.isZero())return z.abs();if(z.isZero())return this.abs();var H=this.clone(),G=z.clone();H.negative=0,G.negative=0;for(var J=0;H.isEven()&&G.isEven();J++)H.iushrn(1),G.iushrn(1);do{for(;H.isEven();)H.iushrn(1);for(;G.isEven();)G.iushrn(1);var le=H.cmp(G);if(le<0){var ge=H;H=G,G=ge}else if(le===0||G.cmpn(1)===0)break;H.isub(G)}while(!0);return G.iushln(J)},u.prototype.invm=function(z){return this.egcd(z).a.umod(z)},u.prototype.isEven=function(){return(this.words[0]&1)===0},u.prototype.isOdd=function(){return(this.words[0]&1)===1},u.prototype.andln=function(z){return this.words[0]&z},u.prototype.bincn=function(z){s(typeof z=="number");var H=z%26,G=(z-H)/26,J=1<<H;if(this.length<=G)return this._expand(G+1),this.words[G]|=J,this;for(var le=J,ge=G;le!==0&&ge<this.length;ge++){var de=this.words[ge]|0;de+=le,le=de>>>26,de&=67108863,this.words[ge]=de}return le!==0&&(this.words[ge]=le,this.length++),this},u.prototype.isZero=function(){return this.length===1&&this.words[0]===0},u.prototype.cmpn=function(z){var H=z<0;if(this.negative!==0&&!H)return-1;if(this.negative===0&&H)return 1;this.strip();var G;if(this.length>1)G=1;else{H&&(z=-z),s(z<=67108863,"Number is too big");var J=this.words[0]|0;G=J===z?0:J<z?-1:1}return this.negative!==0?-G|0:G},u.prototype.cmp=function(z){if(this.negative!==0&&z.negative===0)return-1;if(this.negative===0&&z.negative!==0)return 1;var H=this.ucmp(z);return this.negative!==0?-H|0:H},u.prototype.ucmp=function(z){if(this.length>z.length)return 1;if(this.length<z.length)return-1;for(var H=0,G=this.length-1;G>=0;G--){var J=this.words[G]|0,le=z.words[G]|0;if(J!==le){J<le?H=-1:J>le&&(H=1);break}}return H},u.prototype.gtn=function(z){return this.cmpn(z)===1},u.prototype.gt=function(z){return this.cmp(z)===1},u.prototype.gten=function(z){return this.cmpn(z)>=0},u.prototype.gte=function(z){return this.cmp(z)>=0},u.prototype.ltn=function(z){return this.cmpn(z)===-1},u.prototype.lt=function(z){return this.cmp(z)===-1},u.prototype.lten=function(z){return this.cmpn(z)<=0},u.prototype.lte=function(z){return this.cmp(z)<=0},u.prototype.eqn=function(z){return this.cmpn(z)===0},u.prototype.eq=function(z){return this.cmp(z)===0},u.red=function(z){return new U(z)},u.prototype.toRed=function(z){return s(!this.red,"Already a number in reduction context"),s(this.negative===0,"red works only with positives"),z.convertTo(this)._forceRed(z)},u.prototype.fromRed=function(){return s(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},u.prototype._forceRed=function(z){return this.red=z,this},u.prototype.forceRed=function(z){return s(!this.red,"Already a number in reduction context"),this._forceRed(z)},u.prototype.redAdd=function(z){return s(this.red,"redAdd works only with red numbers"),this.red.add(this,z)},u.prototype.redIAdd=function(z){return s(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,z)},u.prototype.redSub=function(z){return s(this.red,"redSub works only with red numbers"),this.red.sub(this,z)},u.prototype.redISub=function(z){return s(this.red,"redISub works only with red numbers"),this.red.isub(this,z)},u.prototype.redShl=function(z){return s(this.red,"redShl works only with red numbers"),this.red.shl(this,z)},u.prototype.redMul=function(z){return s(this.red,"redMul works only with red numbers"),this.red._verify2(this,z),this.red.mul(this,z)},u.prototype.redIMul=function(z){return s(this.red,"redMul works only with red numbers"),this.red._verify2(this,z),this.red.imul(this,z)},u.prototype.redSqr=function(){return s(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},u.prototype.redISqr=function(){return s(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},u.prototype.redSqrt=function(){return s(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},u.prototype.redInvm=function(){return s(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},u.prototype.redNeg=function(){return s(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},u.prototype.redPow=function(z){return s(this.red&&!z.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,z)};var f={k256:null,p224:null,p192:null,p25519:null};function p(q,z){this.name=q,this.p=new u(z,16),this.n=this.p.bitLength(),this.k=new u(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}p.prototype._tmp=function(){var z=new u(null);return z.words=new Array(Math.ceil(this.n/13)),z},p.prototype.ireduce=function(z){var H=z,G;do this.split(H,this.tmp),H=this.imulK(H),H=H.iadd(this.tmp),G=H.bitLength();while(G>this.n);var J=G<this.n?-1:H.ucmp(this.p);return J===0?(H.words[0]=0,H.length=1):J>0?H.isub(this.p):H.strip!==void 0?H.strip():H._strip(),H},p.prototype.split=function(z,H){z.iushrn(this.n,0,H)},p.prototype.imulK=function(z){return z.imul(this.k)};function x(){p.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}o(x,p),x.prototype.split=function(z,H){for(var G=4194303,J=Math.min(z.length,9),le=0;le<J;le++)H.words[le]=z.words[le];if(H.length=J,z.length<=9){z.words[0]=0,z.length=1;return}var ge=z.words[9];for(H.words[H.length++]=ge&G,le=10;le<z.length;le++){var de=z.words[le]|0;z.words[le-10]=(de&G)<<4|ge>>>22,ge=de}ge>>>=22,z.words[le-10]=ge,ge===0&&z.length>10?z.length-=10:z.length-=9},x.prototype.imulK=function(z){z.words[z.length]=0,z.words[z.length+1]=0,z.length+=2;for(var H=0,G=0;G<z.length;G++){var J=z.words[G]|0;H+=J*977,z.words[G]=H&67108863,H=J*64+(H/67108864|0)}return z.words[z.length-1]===0&&(z.length--,z.words[z.length-1]===0&&z.length--),z};function N(){p.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}o(N,p);function D(){p.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}o(D,p);function B(){p.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}o(B,p),B.prototype.imulK=function(z){for(var H=0,G=0;G<z.length;G++){var J=(z.words[G]|0)*19+H,le=J&67108863;J>>>=26,z.words[G]=le,H=J}return H!==0&&(z.words[z.length++]=H),z},u._prime=function(z){if(f[z])return f[z];var H;if(z==="k256")H=new x;else if(z==="p224")H=new N;else if(z==="p192")H=new D;else if(z==="p25519")H=new B;else throw new Error("Unknown prime "+z);return f[z]=H,H};function U(q){if(typeof q=="string"){var z=u._prime(q);this.m=z.p,this.prime=z}else s(q.gtn(1),"modulus must be greater than 1"),this.m=q,this.prime=null}U.prototype._verify1=function(z){s(z.negative===0,"red works only with positives"),s(z.red,"red works only with red numbers")},U.prototype._verify2=function(z,H){s((z.negative|H.negative)===0,"red works only with positives"),s(z.red&&z.red===H.red,"red works only with red numbers")},U.prototype.imod=function(z){return this.prime?this.prime.ireduce(z)._forceRed(this):z.umod(this.m)._forceRed(this)},U.prototype.neg=function(z){return z.isZero()?z.clone():this.m.sub(z)._forceRed(this)},U.prototype.add=function(z,H){this._verify2(z,H);var G=z.add(H);return G.cmp(this.m)>=0&&G.isub(this.m),G._forceRed(this)},U.prototype.iadd=function(z,H){this._verify2(z,H);var G=z.iadd(H);return G.cmp(this.m)>=0&&G.isub(this.m),G},U.prototype.sub=function(z,H){this._verify2(z,H);var G=z.sub(H);return G.cmpn(0)<0&&G.iadd(this.m),G._forceRed(this)},U.prototype.isub=function(z,H){this._verify2(z,H);var G=z.isub(H);return G.cmpn(0)<0&&G.iadd(this.m),G},U.prototype.shl=function(z,H){return this._verify1(z),this.imod(z.ushln(H))},U.prototype.imul=function(z,H){return this._verify2(z,H),this.imod(z.imul(H))},U.prototype.mul=function(z,H){return this._verify2(z,H),this.imod(z.mul(H))},U.prototype.isqr=function(z){return this.imul(z,z.clone())},U.prototype.sqr=function(z){return this.mul(z,z)},U.prototype.sqrt=function(z){if(z.isZero())return z.clone();var H=this.m.andln(3);if(s(H%2===1),H===3){var G=this.m.add(new u(1)).iushrn(2);return this.pow(z,G)}for(var J=this.m.subn(1),le=0;!J.isZero()&&J.andln(1)===0;)le++,J.iushrn(1);s(!J.isZero());var ge=new u(1).toRed(this),de=ge.redNeg(),me=this.m.subn(1).iushrn(1),W=this.m.bitLength();for(W=new u(2*W*W).toRed(this);this.pow(W,me).cmp(de)!==0;)W.redIAdd(de);for(var ie=this.pow(W,J),se=this.pow(z,J.addn(1).iushrn(1)),ee=this.pow(z,J),pe=le;ee.cmp(ge)!==0;){for(var oe=ee,Y=0;oe.cmp(ge)!==0;Y++)oe=oe.redSqr();s(Y<pe);var ce=this.pow(ie,new u(1).iushln(pe-Y-1));se=se.redMul(ce),ie=ce.redSqr(),ee=ee.redMul(ie),pe=Y}return se},U.prototype.invm=function(z){var H=z._invmp(this.m);return H.negative!==0?(H.negative=0,this.imod(H).redNeg()):this.imod(H)},U.prototype.pow=function(z,H){if(H.isZero())return new u(1).toRed(this);if(H.cmpn(1)===0)return z.clone();var G=4,J=new Array(1<<G);J[0]=new u(1).toRed(this),J[1]=z;for(var le=2;le<J.length;le++)J[le]=this.mul(J[le-1],z);var ge=J[0],de=0,me=0,W=H.bitLength()%26;for(W===0&&(W=26),le=H.length-1;le>=0;le--){for(var ie=H.words[le],se=W-1;se>=0;se--){var ee=ie>>se&1;if(ge!==J[0]&&(ge=this.sqr(ge)),ee===0&&de===0){me=0;continue}de<<=1,de|=ee,me++,!(me!==G&&(le!==0||se!==0))&&(ge=this.mul(ge,J[de]),me=0,de=0)}W=26}return ge},U.prototype.convertTo=function(z){var H=z.umod(this.m);return H===z?H.clone():H},U.prototype.convertFrom=function(z){var H=z.clone();return H.red=null,H},u.mont=function(z){return new V(z)};function V(q){U.call(this,q),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new u(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)}o(V,U),V.prototype.convertTo=function(z){return this.imod(z.ushln(this.shift))},V.prototype.convertFrom=function(z){var H=this.imod(z.mul(this.rinv));return H.red=null,H},V.prototype.imul=function(z,H){if(z.isZero()||H.isZero())return z.words[0]=0,z.length=1,z;var G=z.imul(H),J=G.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),le=G.isub(J).iushrn(this.shift),ge=le;return le.cmp(this.m)>=0?ge=le.isub(this.m):le.cmpn(0)<0&&(ge=le.iadd(this.m)),ge._forceRed(this)},V.prototype.mul=function(z,H){if(z.isZero()||H.isZero())return new u(0)._forceRed(this);var G=z.mul(H),J=G.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),le=G.isub(J).iushrn(this.shift),ge=le;return le.cmp(this.m)>=0?ge=le.isub(this.m):le.cmpn(0)<0&&(ge=le.iadd(this.m)),ge._forceRed(this)},V.prototype.invm=function(z){var H=this.imod(z._invmp(this.m).mul(this.r2));return H._forceRed(this)}})(t,this)}),6860:(function(t){t.exports=r;function r(a,l,i){return a[0]=l[0]-i[0],a[1]=l[1]-i[1],a[2]=l[2]-i[2],a[3]=l[3]-i[3],a}}),6864:(function(t){t.exports=r;function r(){var a=new Float32Array(16);return a[0]=1,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=1,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=1,a[11]=0,a[12]=0,a[13]=0,a[14]=0,a[15]=1,a}}),6867:(function(t,r,a){t.exports=c;var l=a(1888),i=a(855),s=a(7150);function o(_,T){for(var M=0;M<_;++M)if(!(T[M]<=T[M+_]))return!0;return!1}function u(_,T,M,k){for(var b=0,A=0,y=0,f=_.length;y<f;++y){var p=_[y];if(!o(T,p)){for(var x=0;x<2*T;++x)M[b++]=p[x];k[A++]=y}}return A}function d(_,T,M,k){var b=_.length,A=T.length;if(!(b<=0||A<=0)){var y=_[0].length>>>1;if(!(y<=0)){var f,p=l.mallocDouble(2*y*b),x=l.mallocInt32(b);if(b=u(_,y,p,x),b>0){if(y===1&&k)i.init(b),f=i.sweepComplete(y,M,0,b,p,x,0,b,p,x);else{var N=l.mallocDouble(2*y*A),D=l.mallocInt32(A);A=u(T,y,N,D),A>0&&(i.init(b+A),y===1?f=i.sweepBipartite(y,M,0,b,p,x,0,A,N,D):f=s(y,M,k,b,p,x,A,N,D),l.free(N),l.free(D))}l.free(p),l.free(x)}return f}}}var h;function g(_,T){h.push([_,T])}function m(_){return h=[],d(_,_,g,!0),h}function E(_,T){return h=[],d(_,T,g,!1),h}function c(_,T,M){switch(arguments.length){case 1:return m(_);case 2:return typeof T=="function"?d(_,_,T,!0):E(_,T);case 3:return d(_,T,M,!1);default:throw new Error("box-intersect: Invalid arguments")}}}),6894:(function(t){t.exports=r;function r(a,l,i,s){var o=i[1],u=i[2],d=l[1]-o,h=l[2]-u,g=Math.sin(s),m=Math.cos(s);return a[0]=l[0],a[1]=o+d*m-h*g,a[2]=u+d*g+h*m,a}}),7004:(function(t){t.exports=r;function r(a){for(var l=a.length,i=a[a.length-1],s=l,o=l-2;o>=0;--o){var u=i,d=a[o];i=u+d;var h=i-u,g=d-h;g&&(a[--s]=i,i=g)}for(var m=0,o=s;o<l;++o){var u=a[o],d=i;i=u+d;var h=i-u,g=d-h;g&&(a[m++]=g)}return a[m++]=i,a.length=m,a}}),7056:(function(t){t.exports=r;function r(a,l){var i=l[0]-a[0],s=l[1]-a[1],o=l[2]-a[2];return Math.sqrt(i*i+s*s+o*o)}}),7089:(function(t){t.exports=r;function r(a,l,i){var s=Math.sin(i),o=Math.cos(i),u=l[0],d=l[1],h=l[2],g=l[3],m=l[4],E=l[5],c=l[6],_=l[7];return l!==a&&(a[8]=l[8],a[9]=l[9],a[10]=l[10],a[11]=l[11],a[12]=l[12],a[13]=l[13],a[14]=l[14],a[15]=l[15]),a[0]=u*o+m*s,a[1]=d*o+E*s,a[2]=h*o+c*s,a[3]=g*o+_*s,a[4]=m*o-u*s,a[5]=E*o-d*s,a[6]=c*o-h*s,a[7]=_*o-g*s,a}}),7150:(function(t,r,a){t.exports=q;var l=a(1888),i=a(8828),s=a(2455),o=s.partial,u=s.full,d=a(855),h=a(3545),g=a(8105),m=128,E=1<<22,c=1<<22,_=g("!(lo>=p0)&&!(p1>=hi)"),T=g("lo===p0"),M=g("lo<p0"),k=g("hi<=p0"),b=g("lo<=p0&&p0<=hi"),A=g("lo<p0&&p0<=hi"),y=6,f=2,p=1024,x=l.mallocInt32(p),N=l.mallocDouble(p);function D(z,H){var G=8*i.log2(H+1)*(z+1)|0,J=i.nextPow2(y*G);x.length<J&&(l.free(x),x=l.mallocInt32(J));var le=i.nextPow2(f*G);N.length<le&&(l.free(N),N=l.mallocDouble(le))}function B(z,H,G,J,le,ge,de,me,W){var ie=y*z;x[ie]=H,x[ie+1]=G,x[ie+2]=J,x[ie+3]=le,x[ie+4]=ge,x[ie+5]=de;var se=f*z;N[se]=me,N[se+1]=W}function U(z,H,G,J,le,ge,de,me,W,ie,se){var ee=2*z,pe=W*ee,oe=ie[pe+H];e:for(var Y=le,ce=le*ee;Y<ge;++Y,ce+=ee){var ue=de[ce+H],_e=de[ce+H+z];if(!(oe<ue||_e<oe)&&!(J&&oe===ue)){for(var Le=me[Y],ze=H+1;ze<z;++ze){var ue=de[ce+ze],_e=de[ce+ze+z],Xe=ie[pe+ze],Ve=ie[pe+ze+z];if(_e<Xe||Ve<ue)continue e}var rt;if(J?rt=G(se,Le):rt=G(Le,se),rt!==void 0)return rt}}}function V(z,H,G,J,le,ge,de,me,W,ie){var se=2*z,ee=me*se,pe=W[ee+H];e:for(var oe=J,Y=J*se;oe<le;++oe,Y+=se){var ce=de[oe];if(ce!==ie){var ue=ge[Y+H],_e=ge[Y+H+z];if(!(pe<ue||_e<pe)){for(var Le=H+1;Le<z;++Le){var ue=ge[Y+Le],_e=ge[Y+Le+z],ze=W[ee+Le],Xe=W[ee+Le+z];if(_e<ze||Xe<ue)continue e}var Ve=G(ce,ie);if(Ve!==void 0)return Ve}}}}function q(z,H,G,J,le,ge,de,me,W){D(z,J+de);var ie=0,se=2*z,ee;for(B(ie++,0,0,J,0,de,G?16:0,-1/0,1/0),G||B(ie++,0,0,de,0,J,1,-1/0,1/0);ie>0;){ie-=1;var pe=ie*y,oe=x[pe],Y=x[pe+1],ce=x[pe+2],ue=x[pe+3],_e=x[pe+4],Le=x[pe+5],ze=ie*f,Xe=N[ze],Ve=N[ze+1],rt=Le&1,mt=!!(Le&16),_t=le,vt=ge,ut=me,Fe=W;if(rt&&(_t=me,vt=W,ut=le,Fe=ge),!(Le&2&&(ce=M(z,oe,Y,ce,_t,vt,Ve),Y>=ce))&&!(Le&4&&(Y=k(z,oe,Y,ce,_t,vt,Xe),Y>=ce))){var Pe=ce-Y,be=_e-ue;if(mt){if(z*Pe*(Pe+be)<c){if(ee=d.scanComplete(z,oe,H,Y,ce,_t,vt,ue,_e,ut,Fe),ee!==void 0)return ee;continue}}else if(z*Math.min(Pe,be)<m){if(ee=o(z,oe,H,rt,Y,ce,_t,vt,ue,_e,ut,Fe),ee!==void 0)return ee;continue}else if(z*Pe*be<E){if(ee=d.scanBipartite(z,oe,H,rt,Y,ce,_t,vt,ue,_e,ut,Fe),ee!==void 0)return ee;continue}var Ye=_(z,oe,Y,ce,_t,vt,Xe,Ve);if(Y<Ye)if(z*(Ye-Y)<m){if(ee=u(z,oe+1,H,Y,Ye,_t,vt,ue,_e,ut,Fe),ee!==void 0)return ee}else if(oe===z-2){if(rt?ee=d.sweepBipartite(z,H,ue,_e,ut,Fe,Y,Ye,_t,vt):ee=d.sweepBipartite(z,H,Y,Ye,_t,vt,ue,_e,ut,Fe),ee!==void 0)return ee}else B(ie++,oe+1,Y,Ye,ue,_e,rt,-1/0,1/0),B(ie++,oe+1,ue,_e,Y,Ye,rt^1,-1/0,1/0);if(Ye<ce){var yt=h(z,oe,ue,_e,ut,Fe),wt=ut[se*yt+oe],ht=T(z,oe,yt,_e,ut,Fe,wt);if(ht<_e&&B(ie++,oe,Ye,ce,ht,_e,(rt|4)+(mt?16:0),wt,Ve),ue<yt&&B(ie++,oe,Ye,ce,ue,yt,(rt|2)+(mt?16:0),Xe,wt),yt+1===ht){if(mt?ee=V(z,oe,H,Ye,ce,_t,vt,yt,ut,Fe[yt]):ee=U(z,oe,H,rt,Ye,ce,_t,vt,yt,ut,Fe[yt]),ee!==void 0)return ee}else if(yt<ht){var Yt;if(mt){if(Yt=b(z,oe,Ye,ce,_t,vt,wt),Ye<Yt){var $t=T(z,oe,Ye,Yt,_t,vt,wt);if(oe===z-2){if(Ye<$t&&(ee=d.sweepComplete(z,H,Ye,$t,_t,vt,yt,ht,ut,Fe),ee!==void 0)||$t<Yt&&(ee=d.sweepBipartite(z,H,$t,Yt,_t,vt,yt,ht,ut,Fe),ee!==void 0))return ee}else Ye<$t&&B(ie++,oe+1,Ye,$t,yt,ht,16,-1/0,1/0),$t<Yt&&(B(ie++,oe+1,$t,Yt,yt,ht,0,-1/0,1/0),B(ie++,oe+1,yt,ht,$t,Yt,1,-1/0,1/0))}}else rt?Yt=A(z,oe,Ye,ce,_t,vt,wt):Yt=b(z,oe,Ye,ce,_t,vt,wt),Ye<Yt&&(oe===z-2?rt?ee=d.sweepBipartite(z,H,yt,ht,ut,Fe,Ye,Yt,_t,vt):ee=d.sweepBipartite(z,H,Ye,Yt,_t,vt,yt,ht,ut,Fe):(B(ie++,oe+1,Ye,Yt,yt,ht,rt,-1/0,1/0),B(ie++,oe+1,yt,ht,Ye,Yt,rt^1,-1/0,1/0)))}}}}}}),7163:(function(t){t.exports=function(l){return l!=null&&(r(l)||a(l)||!!l._isBuffer)};function r(l){return!!l.constructor&&typeof l.constructor.isBuffer=="function"&&l.constructor.isBuffer(l)}function a(l){return typeof l.readFloatLE=="function"&&typeof l.slice=="function"&&r(l.slice(0,0))}}),7169:(function(t,r,a){var l=typeof WeakMap>"u"?a(1538):WeakMap,i=a(2762),s=a(8116),o=new l;function u(d){var h=o.get(d),g=h&&(h._triangleBuffer.handle||h._triangleBuffer.buffer);if(!g||!d.isBuffer(g)){var m=i(d,new Float32Array([-1,-1,-1,4,4,-1]));h=s(d,[{buffer:m,type:d.FLOAT,size:2}]),h._triangleBuffer=m,o.set(d,h)}h.bind(),d.drawArrays(d.TRIANGLES,0,3),h.unbind()}t.exports=u}),7182:(function(t,r,a){var l={identity:a(7894),translate:a(7656),multiply:a(6760),create:a(6864),scale:a(2504),fromRotationTranslation:a(6743)};l.create();var i=l.create();t.exports=function(o,u,d,h,g,m){return l.identity(o),l.fromRotationTranslation(o,m,u),o[3]=g[0],o[7]=g[1],o[11]=g[2],o[15]=g[3],l.identity(i),h[2]!==0&&(i[9]=h[2],l.multiply(o,o,i)),h[1]!==0&&(i[9]=0,i[8]=h[1],l.multiply(o,o,i)),h[0]!==0&&(i[8]=0,i[4]=h[0],l.multiply(o,o,i)),l.scale(o,o,d),o}}),7201:(function(t,r,a){var l=1e-6,i=1e-6,s=a(9405),o=a(2762),u=a(8116),d=a(7766),h=a(8406),g=a(6760),m=a(7608),E=a(9618),c=a(6729),_=a(7765),T=a(1888),M=a(840),k=a(7626),b=M.meshShader,A=M.wireShader,y=M.pointShader,f=M.pickShader,p=M.pointPickShader,x=M.contourShader,N=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function D(me,W,ie,se,ee,pe,oe,Y,ce,ue,_e,Le,ze,Xe,Ve,rt,mt,_t,vt,ut,Fe,Pe,be,Ye,yt,wt,ht){this.gl=me,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=W,this.dirty=!0,this.triShader=ie,this.lineShader=se,this.pointShader=ee,this.pickShader=pe,this.pointPickShader=oe,this.contourShader=Y,this.trianglePositions=ce,this.triangleColors=_e,this.triangleNormals=ze,this.triangleUVs=Le,this.triangleIds=ue,this.triangleVAO=Xe,this.triangleCount=0,this.lineWidth=1,this.edgePositions=Ve,this.edgeColors=mt,this.edgeUVs=_t,this.edgeIds=rt,this.edgeVAO=vt,this.edgeCount=0,this.pointPositions=ut,this.pointColors=Pe,this.pointUVs=be,this.pointSizes=Ye,this.pointIds=Fe,this.pointVAO=yt,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=wt,this.contourVAO=ht,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=N,this._view=N,this._projection=N,this._resolution=[1,1]}var B=D.prototype;B.isOpaque=function(){return!this.hasAlpha},B.isTransparent=function(){return this.hasAlpha},B.pickSlots=1,B.setPickBase=function(me){this.pickId=me};function U(me,W){if(!W||!W.length)return 1;for(var ie=0;ie<W.length;++ie){if(W.length<2)return 1;if(W[ie][0]===me)return W[ie][1];if(W[ie][0]>me&&ie>0){var se=(W[ie][0]-me)/(W[ie][0]-W[ie-1][0]);return W[ie][1]*(1-se)+se*W[ie-1][1]}}return 1}function V(me,W){for(var ie=c({colormap:me,nshades:256,format:"rgba"}),se=new Uint8Array(256*4),ee=0;ee<256;++ee){for(var pe=ie[ee],oe=0;oe<3;++oe)se[4*ee+oe]=pe[oe];W?se[4*ee+3]=255*U(ee/255,W):se[4*ee+3]=255*pe[3]}return E(se,[256,256,4],[4,0,1])}function q(me){for(var W=me.length,ie=new Array(W),se=0;se<W;++se)ie[se]=me[se][2];return ie}B.highlight=function(me){if(!me||!this.contourEnable){this.contourCount=0;return}for(var W=_(this.cells,this.intensity,me.intensity),ie=W.cells,se=W.vertexIds,ee=W.vertexWeights,pe=ie.length,oe=T.mallocFloat32(6*pe),Y=0,ce=0;ce<pe;++ce)for(var ue=ie[ce],_e=0;_e<2;++_e){var Le=ue[0];ue.length===2&&(Le=ue[_e]);for(var ze=se[Le][0],Xe=se[Le][1],Ve=ee[Le],rt=1-Ve,mt=this.positions[ze],_t=this.positions[Xe],vt=0;vt<3;++vt)oe[Y++]=Ve*mt[vt]+rt*_t[vt]}this.contourCount=Y/3|0,this.contourPositions.update(oe.subarray(0,Y)),T.free(oe)},B.update=function(me){me=me||{};var W=this.gl;this.dirty=!0,"contourEnable"in me&&(this.contourEnable=me.contourEnable),"contourColor"in me&&(this.contourColor=me.contourColor),"lineWidth"in me&&(this.lineWidth=me.lineWidth),"lightPosition"in me&&(this.lightPosition=me.lightPosition),this.hasAlpha=!1,"opacity"in me&&(this.opacity=me.opacity,this.opacity<1&&(this.hasAlpha=!0)),"opacityscale"in me&&(this.opacityscale=me.opacityscale,this.hasAlpha=!0),"ambient"in me&&(this.ambientLight=me.ambient),"diffuse"in me&&(this.diffuseLight=me.diffuse),"specular"in me&&(this.specularLight=me.specular),"roughness"in me&&(this.roughness=me.roughness),"fresnel"in me&&(this.fresnel=me.fresnel),me.texture?(this.texture.dispose(),this.texture=d(W,me.texture)):me.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=W.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=W.LINEAR,this.texture.setPixels(V(me.colormap,this.opacityscale)),this.texture.generateMipmap());var ie=me.cells,se=me.positions;if(!(!se||!ie)){var ee=[],pe=[],oe=[],Y=[],ce=[],ue=[],_e=[],Le=[],ze=[],Xe=[],Ve=[],rt=[],mt=[],_t=[];this.cells=ie,this.positions=se;var vt=me.vertexNormals,ut=me.cellNormals,Fe=me.vertexNormalsEpsilon===void 0?l:me.vertexNormalsEpsilon,Pe=me.faceNormalsEpsilon===void 0?i:me.faceNormalsEpsilon;me.useFacetNormals&&!ut&&(ut=h.faceNormals(ie,se,Pe)),!ut&&!vt&&(vt=h.vertexNormals(ie,se,Fe));var be=me.vertexColors,Ye=me.cellColors,yt=me.meshColor||[1,1,1,1],wt=me.vertexUVs,ht=me.vertexIntensity,Yt=me.cellUVs,$t=me.cellIntensity,fr=1/0,mr=-1/0;if(!wt&&!Yt)if(ht)if(me.vertexIntensityBounds)fr=+me.vertexIntensityBounds[0],mr=+me.vertexIntensityBounds[1];else for(var Ur=0;Ur<ht.length;++Ur){var jr=ht[Ur];fr=Math.min(fr,jr),mr=Math.max(mr,jr)}else if($t)if(me.cellIntensityBounds)fr=+me.cellIntensityBounds[0],mr=+me.cellIntensityBounds[1];else for(var Ur=0;Ur<$t.length;++Ur){var jr=$t[Ur];fr=Math.min(fr,jr),mr=Math.max(mr,jr)}else for(var Ur=0;Ur<se.length;++Ur){var jr=se[Ur][2];fr=Math.min(fr,jr),mr=Math.max(mr,jr)}ht?this.intensity=ht:$t?this.intensity=$t:this.intensity=q(se),this.pickVertex=!($t||Ye);var fn=me.pointSizes,Br=me.pointSize||1;this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(var Ur=0;Ur<se.length;++Ur)for(var Qr=se[Ur],Ot=0;Ot<3;++Ot)isNaN(Qr[Ot])||!isFinite(Qr[Ot])||(this.bounds[0][Ot]=Math.min(this.bounds[0][Ot],Qr[Ot]),this.bounds[1][Ot]=Math.max(this.bounds[1][Ot],Qr[Ot]));var $e=0,ot=0,De=0;e:for(var Ur=0;Ur<ie.length;++Ur){var Ee=ie[Ur];switch(Ee.length){case 1:for(var Ae=Ee[0],Qr=se[Ae],Ot=0;Ot<3;++Ot)if(isNaN(Qr[Ot])||!isFinite(Qr[Ot]))continue e;Xe.push(Qr[0],Qr[1],Qr[2]);var Ie;be?Ie=be[Ae]:Ye?Ie=Ye[Ur]:Ie=yt,this.opacityscale&&ht?pe.push(Ie[0],Ie[1],Ie[2],this.opacity*U((ht[Ae]-fr)/(mr-fr),this.opacityscale)):Ie.length===3?Ve.push(Ie[0],Ie[1],Ie[2],this.opacity):(Ve.push(Ie[0],Ie[1],Ie[2],Ie[3]*this.opacity),Ie[3]<1&&(this.hasAlpha=!0));var tt;wt?tt=wt[Ae]:ht?tt=[(ht[Ae]-fr)/(mr-fr),0]:Yt?tt=Yt[Ur]:$t?tt=[($t[Ur]-fr)/(mr-fr),0]:tt=[(Qr[2]-fr)/(mr-fr),0],rt.push(tt[0],tt[1]),fn?mt.push(fn[Ae]):mt.push(Br),_t.push(Ur),De+=1;break;case 2:for(var Ot=0;Ot<2;++Ot)for(var Ae=Ee[Ot],Qr=se[Ae],st=0;st<3;++st)if(isNaN(Qr[st])||!isFinite(Qr[st]))continue e;for(var Ot=0;Ot<2;++Ot){var Ae=Ee[Ot],Qr=se[Ae];ue.push(Qr[0],Qr[1],Qr[2]);var Ie;be?Ie=be[Ae]:Ye?Ie=Ye[Ur]:Ie=yt,this.opacityscale&&ht?pe.push(Ie[0],Ie[1],Ie[2],this.opacity*U((ht[Ae]-fr)/(mr-fr),this.opacityscale)):Ie.length===3?_e.push(Ie[0],Ie[1],Ie[2],this.opacity):(_e.push(Ie[0],Ie[1],Ie[2],Ie[3]*this.opacity),Ie[3]<1&&(this.hasAlpha=!0));var tt;wt?tt=wt[Ae]:ht?tt=[(ht[Ae]-fr)/(mr-fr),0]:Yt?tt=Yt[Ur]:$t?tt=[($t[Ur]-fr)/(mr-fr),0]:tt=[(Qr[2]-fr)/(mr-fr),0],Le.push(tt[0],tt[1]),ze.push(Ur)}ot+=1;break;case 3:for(var Ot=0;Ot<3;++Ot)for(var Ae=Ee[Ot],Qr=se[Ae],st=0;st<3;++st)if(isNaN(Qr[st])||!isFinite(Qr[st]))continue e;for(var Ot=0;Ot<3;++Ot){var Ae=Ee[2-Ot],Qr=se[Ae];ee.push(Qr[0],Qr[1],Qr[2]);var Ie;be?Ie=be[Ae]:Ye?Ie=Ye[Ur]:Ie=yt,Ie?this.opacityscale&&ht?pe.push(Ie[0],Ie[1],Ie[2],this.opacity*U((ht[Ae]-fr)/(mr-fr),this.opacityscale)):Ie.length===3?pe.push(Ie[0],Ie[1],Ie[2],this.opacity):(pe.push(Ie[0],Ie[1],Ie[2],Ie[3]*this.opacity),Ie[3]<1&&(this.hasAlpha=!0)):pe.push(.5,.5,.5,1);var tt;wt?tt=wt[Ae]:ht?tt=[(ht[Ae]-fr)/(mr-fr),0]:Yt?tt=Yt[Ur]:$t?tt=[($t[Ur]-fr)/(mr-fr),0]:tt=[(Qr[2]-fr)/(mr-fr),0],Y.push(tt[0],tt[1]);var Bt;vt?Bt=vt[Ae]:Bt=ut[Ur],oe.push(Bt[0],Bt[1],Bt[2]),ce.push(Ur)}$e+=1;break}}this.pointCount=De,this.edgeCount=ot,this.triangleCount=$e,this.pointPositions.update(Xe),this.pointColors.update(Ve),this.pointUVs.update(rt),this.pointSizes.update(mt),this.pointIds.update(new Uint32Array(_t)),this.edgePositions.update(ue),this.edgeColors.update(_e),this.edgeUVs.update(Le),this.edgeIds.update(new Uint32Array(ze)),this.trianglePositions.update(ee),this.triangleColors.update(pe),this.triangleUVs.update(Y),this.triangleNormals.update(oe),this.triangleIds.update(new Uint32Array(ce))}},B.drawTransparent=B.draw=function(me){me=me||{};for(var W=this.gl,ie=me.model||N,se=me.view||N,ee=me.projection||N,pe=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],oe=0;oe<3;++oe)pe[0][oe]=Math.max(pe[0][oe],this.clipBounds[0][oe]),pe[1][oe]=Math.min(pe[1][oe],this.clipBounds[1][oe]);var Y={model:ie,view:se,projection:ee,inverseModel:N.slice(),clipBounds:pe,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};Y.inverseModel=m(Y.inverseModel,Y.model),W.disable(W.CULL_FACE),this.texture.bind(0);var ce=new Array(16);g(ce,Y.view,Y.model),g(ce,Y.projection,ce),m(ce,ce);for(var oe=0;oe<3;++oe)Y.eyePosition[oe]=ce[12+oe]/ce[15];for(var ue=ce[15],oe=0;oe<3;++oe)ue+=this.lightPosition[oe]*ce[4*oe+3];for(var oe=0;oe<3;++oe){for(var _e=ce[12+oe],Le=0;Le<3;++Le)_e+=ce[4*Le+oe]*this.lightPosition[Le];Y.lightPosition[oe]=_e/ue}if(this.triangleCount>0){var ze=this.triShader;ze.bind(),ze.uniforms=Y,this.triangleVAO.bind(),W.drawArrays(W.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var ze=this.lineShader;ze.bind(),ze.uniforms=Y,this.edgeVAO.bind(),W.lineWidth(this.lineWidth*this.pixelRatio),W.drawArrays(W.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()}if(this.pointCount>0){var ze=this.pointShader;ze.bind(),ze.uniforms=Y,this.pointVAO.bind(),W.drawArrays(W.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var ze=this.contourShader;ze.bind(),ze.uniforms=Y,this.contourVAO.bind(),W.drawArrays(W.LINES,0,this.contourCount),this.contourVAO.unbind()}},B.drawPick=function(me){me=me||{};for(var W=this.gl,ie=me.model||N,se=me.view||N,ee=me.projection||N,pe=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],oe=0;oe<3;++oe)pe[0][oe]=Math.max(pe[0][oe],this.clipBounds[0][oe]),pe[1][oe]=Math.min(pe[1][oe],this.clipBounds[1][oe]);this._model=[].slice.call(ie),this._view=[].slice.call(se),this._projection=[].slice.call(ee),this._resolution=[W.drawingBufferWidth,W.drawingBufferHeight];var Y={model:ie,view:se,projection:ee,clipBounds:pe,pickId:this.pickId/255},ce=this.pickShader;if(ce.bind(),ce.uniforms=Y,this.triangleCount>0&&(this.triangleVAO.bind(),W.drawArrays(W.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),W.lineWidth(this.lineWidth*this.pixelRatio),W.drawArrays(W.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()),this.pointCount>0){var ce=this.pointPickShader;ce.bind(),ce.uniforms=Y,this.pointVAO.bind(),W.drawArrays(W.POINTS,0,this.pointCount),this.pointVAO.unbind()}},B.pick=function(me){if(!me||me.id!==this.pickId)return null;for(var W=me.value[0]+256*me.value[1]+65536*me.value[2],ie=this.cells[W],se=this.positions,ee=new Array(ie.length),pe=0;pe<ie.length;++pe)ee[pe]=se[ie[pe]];var oe=me.coord[0],Y=me.coord[1];if(!this.pickVertex){var ce=this.positions[ie[0]],ue=this.positions[ie[1]],_e=this.positions[ie[2]],Le=[(ce[0]+ue[0]+_e[0])/3,(ce[1]+ue[1]+_e[1])/3,(ce[2]+ue[2]+_e[2])/3];return{_cellCenter:!0,position:[oe,Y],index:W,cell:ie,cellId:W,intensity:this.intensity[W],dataCoordinate:Le}}var ze=k(ee,[oe*this.pixelRatio,this._resolution[1]-Y*this.pixelRatio],this._model,this._view,this._projection,this._resolution);if(!ze)return null;for(var Xe=ze[2],Ve=0,pe=0;pe<ie.length;++pe)Ve+=Xe[pe]*this.intensity[ie[pe]];return{position:ze[1],index:ie[ze[0]],cell:ie,cellId:W,intensity:Ve,dataCoordinate:this.positions[ie[ze[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 z(me){var W=s(me,b.vertex,b.fragment);return W.attributes.position.location=0,W.attributes.color.location=2,W.attributes.uv.location=3,W.attributes.normal.location=4,W}function H(me){var W=s(me,A.vertex,A.fragment);return W.attributes.position.location=0,W.attributes.color.location=2,W.attributes.uv.location=3,W}function G(me){var W=s(me,y.vertex,y.fragment);return W.attributes.position.location=0,W.attributes.color.location=2,W.attributes.uv.location=3,W.attributes.pointSize.location=4,W}function J(me){var W=s(me,f.vertex,f.fragment);return W.attributes.position.location=0,W.attributes.id.location=1,W}function le(me){var W=s(me,p.vertex,p.fragment);return W.attributes.position.location=0,W.attributes.id.location=1,W.attributes.pointSize.location=4,W}function ge(me){var W=s(me,x.vertex,x.fragment);return W.attributes.position.location=0,W}function de(me,W){arguments.length===1&&(W=me,me=W.gl);var ie=me.getExtension("OES_standard_derivatives")||me.getExtension("MOZ_OES_standard_derivatives")||me.getExtension("WEBKIT_OES_standard_derivatives");if(!ie)throw new Error("derivatives not supported");var se=z(me),ee=H(me),pe=G(me),oe=J(me),Y=le(me),ce=ge(me),ue=d(me,E(new Uint8Array([255,255,255,255]),[1,1,4]));ue.generateMipmap(),ue.minFilter=me.LINEAR_MIPMAP_LINEAR,ue.magFilter=me.LINEAR;var _e=o(me),Le=o(me),ze=o(me),Xe=o(me),Ve=o(me),rt=u(me,[{buffer:_e,type:me.FLOAT,size:3},{buffer:Ve,type:me.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:Le,type:me.FLOAT,size:4},{buffer:ze,type:me.FLOAT,size:2},{buffer:Xe,type:me.FLOAT,size:3}]),mt=o(me),_t=o(me),vt=o(me),ut=o(me),Fe=u(me,[{buffer:mt,type:me.FLOAT,size:3},{buffer:ut,type:me.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:_t,type:me.FLOAT,size:4},{buffer:vt,type:me.FLOAT,size:2}]),Pe=o(me),be=o(me),Ye=o(me),yt=o(me),wt=o(me),ht=u(me,[{buffer:Pe,type:me.FLOAT,size:3},{buffer:wt,type:me.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:be,type:me.FLOAT,size:4},{buffer:Ye,type:me.FLOAT,size:2},{buffer:yt,type:me.FLOAT,size:1}]),Yt=o(me),$t=u(me,[{buffer:Yt,type:me.FLOAT,size:3}]),fr=new D(me,ue,se,ee,pe,oe,Y,ce,_e,Ve,Le,ze,Xe,rt,mt,ut,_t,vt,Fe,Pe,wt,be,Ye,yt,ht,Yt,$t);return fr.update(W),fr}t.exports=de}),7261:(function(t,r,a){t.exports=T;var l=a(9215),i=a(7608),s=a(6079),o=a(5911),u=a(3536),d=a(244);function h(M,k,b){return Math.sqrt(Math.pow(M,2)+Math.pow(k,2)+Math.pow(b,2))}function g(M){return Math.min(1,Math.max(-1,M))}function m(M){var k=Math.abs(M[0]),b=Math.abs(M[1]),A=Math.abs(M[2]),y=[0,0,0];k>Math.max(b,A)?y[2]=1:b>Math.max(k,A)?y[0]=1:y[1]=1;for(var f=0,p=0,x=0;x<3;++x)f+=M[x]*M[x],p+=y[x]*M[x];for(var x=0;x<3;++x)y[x]-=p/f*M[x];return u(y,y),y}function E(M,k,b,A,y,f,p,x){this.center=l(b),this.up=l(A),this.right=l(y),this.radius=l([f]),this.angle=l([p,x]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(M,k),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 N=0;N<16;++N)this.computedMatrix[N]=.5;this.recalcMatrix(0)}var c=E.prototype;c.setDistanceLimits=function(M,k){M>0?M=Math.log(M):M=-1/0,k>0?k=Math.log(k):k=1/0,k=Math.max(k,M),this.radius.bounds[0][0]=M,this.radius.bounds[1][0]=k},c.getDistanceLimits=function(M){var k=this.radius.bounds[0];return M?(M[0]=Math.exp(k[0][0]),M[1]=Math.exp(k[1][0]),M):[Math.exp(k[0][0]),Math.exp(k[1][0])]},c.recalcMatrix=function(M){this.center.curve(M),this.up.curve(M),this.right.curve(M),this.radius.curve(M),this.angle.curve(M);for(var k=this.computedUp,b=this.computedRight,A=0,y=0,f=0;f<3;++f)y+=k[f]*b[f],A+=k[f]*k[f];for(var p=Math.sqrt(A),x=0,f=0;f<3;++f)b[f]-=k[f]*y/A,x+=b[f]*b[f],k[f]/=p;for(var N=Math.sqrt(x),f=0;f<3;++f)b[f]/=N;var D=this.computedToward;o(D,k,b),u(D,D);for(var B=Math.exp(this.computedRadius[0]),U=this.computedAngle[0],V=this.computedAngle[1],q=Math.cos(U),z=Math.sin(U),H=Math.cos(V),G=Math.sin(V),J=this.computedCenter,le=q*H,ge=z*H,de=G,me=-q*G,W=-z*G,ie=H,se=this.computedEye,ee=this.computedMatrix,f=0;f<3;++f){var pe=le*b[f]+ge*D[f]+de*k[f];ee[4*f+1]=me*b[f]+W*D[f]+ie*k[f],ee[4*f+2]=pe,ee[4*f+3]=0}var oe=ee[1],Y=ee[5],ce=ee[9],ue=ee[2],_e=ee[6],Le=ee[10],ze=Y*Le-ce*_e,Xe=ce*ue-oe*Le,Ve=oe*_e-Y*ue,rt=h(ze,Xe,Ve);ze/=rt,Xe/=rt,Ve/=rt,ee[0]=ze,ee[4]=Xe,ee[8]=Ve;for(var f=0;f<3;++f)se[f]=J[f]+ee[2+4*f]*B;for(var f=0;f<3;++f){for(var x=0,mt=0;mt<3;++mt)x+=ee[f+4*mt]*se[mt];ee[12+f]=-x}ee[15]=1},c.getMatrix=function(M,k){this.recalcMatrix(M);var b=this.computedMatrix;if(k){for(var A=0;A<16;++A)k[A]=b[A];return k}return b};var _=[0,0,0];c.rotate=function(M,k,b,A){if(this.angle.move(M,k,b),A){this.recalcMatrix(M);var y=this.computedMatrix;_[0]=y[2],_[1]=y[6],_[2]=y[10];for(var f=this.computedUp,p=this.computedRight,x=this.computedToward,N=0;N<3;++N)y[4*N]=f[N],y[4*N+1]=p[N],y[4*N+2]=x[N];s(y,y,A,_);for(var N=0;N<3;++N)f[N]=y[4*N],p[N]=y[4*N+1];this.up.set(M,f[0],f[1],f[2]),this.right.set(M,p[0],p[1],p[2])}},c.pan=function(M,k,b,A){k=k||0,b=b||0,A=A||0,this.recalcMatrix(M);var y=this.computedMatrix;Math.exp(this.computedRadius[0]);var f=y[1],p=y[5],x=y[9],N=h(f,p,x);f/=N,p/=N,x/=N;var D=y[0],B=y[4],U=y[8],V=D*f+B*p+U*x;D-=f*V,B-=p*V,U-=x*V;var q=h(D,B,U);D/=q,B/=q,U/=q;var z=D*k+f*b,H=B*k+p*b,G=U*k+x*b;this.center.move(M,z,H,G);var J=Math.exp(this.computedRadius[0]);J=Math.max(1e-4,J+A),this.radius.set(M,Math.log(J))},c.translate=function(M,k,b,A){this.center.move(M,k||0,b||0,A||0)},c.setMatrix=function(M,k,b,A){var y=1;typeof b=="number"&&(y=b|0),(y<0||y>3)&&(y=1);var f=(y+2)%3;k||(this.recalcMatrix(M),k=this.computedMatrix);var p=k[y],x=k[y+4],N=k[y+8];if(A){var B=Math.abs(p),U=Math.abs(x),V=Math.abs(N),q=Math.max(B,U,V);B===q?(p=p<0?-1:1,x=N=0):V===q?(N=N<0?-1:1,p=x=0):(x=x<0?-1:1,p=N=0)}else{var D=h(p,x,N);p/=D,x/=D,N/=D}var z=k[f],H=k[f+4],G=k[f+8],J=z*p+H*x+G*N;z-=p*J,H-=x*J,G-=N*J;var le=h(z,H,G);z/=le,H/=le,G/=le;var ge=x*G-N*H,de=N*z-p*G,me=p*H-x*z,W=h(ge,de,me);ge/=W,de/=W,me/=W,this.center.jump(M,Fe,Pe,be),this.radius.idle(M),this.up.jump(M,p,x,N),this.right.jump(M,z,H,G);var ie,se;if(y===2){var ee=k[1],pe=k[5],oe=k[9],Y=ee*z+pe*H+oe*G,ce=ee*ge+pe*de+oe*me;ze<0?ie=-Math.PI/2:ie=Math.PI/2,se=Math.atan2(ce,Y)}else{var ue=k[2],_e=k[6],Le=k[10],ze=ue*p+_e*x+Le*N,Xe=ue*z+_e*H+Le*G,Ve=ue*ge+_e*de+Le*me;ie=Math.asin(g(ze)),se=Math.atan2(Ve,Xe)}this.angle.jump(M,se,ie),this.recalcMatrix(M);var rt=k[2],mt=k[6],_t=k[10],vt=this.computedMatrix;i(vt,k);var ut=vt[15],Fe=vt[12]/ut,Pe=vt[13]/ut,be=vt[14]/ut,Ye=Math.exp(this.computedRadius[0]);this.center.jump(M,Fe-rt*Ye,Pe-mt*Ye,be-_t*Ye)},c.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},c.idle=function(M){this.center.idle(M),this.up.idle(M),this.right.idle(M),this.radius.idle(M),this.angle.idle(M)},c.flush=function(M){this.center.flush(M),this.up.flush(M),this.right.flush(M),this.radius.flush(M),this.angle.flush(M)},c.setDistance=function(M,k){k>0&&this.radius.set(M,Math.log(k))},c.lookAt=function(M,k,b,A){this.recalcMatrix(M),k=k||this.computedEye,b=b||this.computedCenter,A=A||this.computedUp;var y=A[0],f=A[1],p=A[2],x=h(y,f,p);if(!(x<1e-6)){y/=x,f/=x,p/=x;var N=k[0]-b[0],D=k[1]-b[1],B=k[2]-b[2],U=h(N,D,B);if(!(U<1e-6)){N/=U,D/=U,B/=U;var V=this.computedRight,q=V[0],z=V[1],H=V[2],G=y*q+f*z+p*H;q-=G*y,z-=G*f,H-=G*p;var J=h(q,z,H);if(!(J<.01&&(q=f*B-p*D,z=p*N-y*B,H=y*D-f*N,J=h(q,z,H),J<1e-6))){q/=J,z/=J,H/=J,this.up.set(M,y,f,p),this.right.set(M,q,z,H),this.center.set(M,b[0],b[1],b[2]),this.radius.set(M,Math.log(U));var le=f*H-p*z,ge=p*q-y*H,de=y*z-f*q,me=h(le,ge,de);le/=me,ge/=me,de/=me;var W=y*N+f*D+p*B,ie=q*N+z*D+H*B,se=le*N+ge*D+de*B,ee=Math.asin(g(W)),pe=Math.atan2(se,ie),oe=this.angle._state,Y=oe[oe.length-1],ce=oe[oe.length-2];Y=Y%(2*Math.PI);var ue=Math.abs(Y+2*Math.PI-pe),_e=Math.abs(Y-pe),Le=Math.abs(Y-2*Math.PI-pe);ue<_e&&(Y+=2*Math.PI),Le<_e&&(Y-=2*Math.PI),this.angle.jump(this.angle.lastT(),Y,ce),this.angle.set(M,pe,ee)}}}};function T(M){M=M||{};var k=M.center||[0,0,0],b=M.up||[0,1,0],A=M.right||m(b),y=M.radius||1,f=M.theta||0,p=M.phi||0;if(k=[].slice.call(k,0,3),b=[].slice.call(b,0,3),u(b,b),A=[].slice.call(A,0,3),u(A,A),"eye"in M){var x=M.eye,N=[x[0]-k[0],x[1]-k[1],x[2]-k[2]];o(A,N,b),h(A[0],A[1],A[2])<1e-6?A=m(b):u(A,A),y=h(N[0],N[1],N[2]);var D=d(b,N)/y,B=d(A,N)/y;p=Math.acos(D),f=Math.acos(B)}return y=Math.log(y),new E(M.zoomMin,M.zoomMax,k,b,A,y,f,p)}}),7319:(function(t,r,a){var l=a(3236),i=a(9405),s=l([`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;
}
`]),o=l([`precision highp float;
#define GLSLIFY 1

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

uniform vec3      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;
}
`]),u=l([`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);
}`]),d=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];r.createShader=function(h){return i(h,s,o,null,d)},r.createPickShader=function(h){return i(h,s,u,null,d)}}),7352:(function(t,r,a){var l=a(5721),i=a(4750),s=a(2690);t.exports=o;function o(u){var d=u.length;if(d===0)return[];if(d===1)return[[0]];var h=u[0].length;return h===0?[]:h===1?l(u):h===2?i(u):s(u,h)}}),7399:(function(t){t.exports=r;function r(a,l){var i=l[0],s=l[1],o=l[2],u=l[3],d=i+i,h=s+s,g=o+o,m=i*d,E=s*d,c=s*h,_=o*d,T=o*h,M=o*g,k=u*d,b=u*h,A=u*g;return a[0]=1-c-M,a[1]=E+A,a[2]=_-b,a[3]=0,a[4]=E-A,a[5]=1-m-M,a[6]=T+k,a[7]=0,a[8]=_+b,a[9]=T-k,a[10]=1-m-c,a[11]=0,a[12]=0,a[13]=0,a[14]=0,a[15]=1,a}}),7417:(function(t){t.exports=r;function r(a,l,i){return a[0]=Math.max(l[0],i[0]),a[1]=Math.max(l[1],i[1]),a[2]=Math.max(l[2],i[2]),a}}),7442:(function(t,r,a){var l=a(6658),i=a(7182),s=a(2652),o=a(9921),u=a(8648),d=E(),h=E(),g=E();t.exports=m;function m(T,M,k,b){if(o(M)===0||o(k)===0)return!1;var A=s(M,d.translate,d.scale,d.skew,d.perspective,d.quaternion),y=s(k,h.translate,h.scale,h.skew,h.perspective,h.quaternion);return!A||!y?!1:(l(g.translate,d.translate,h.translate,b),l(g.skew,d.skew,h.skew,b),l(g.scale,d.scale,h.scale,b),l(g.perspective,d.perspective,h.perspective,b),u(g.quaternion,d.quaternion,h.quaternion,b),i(T,g.translate,g.scale,g.skew,g.perspective,g.quaternion),!0)}function E(){return{translate:c(),scale:c(1),skew:c(),perspective:_(),quaternion:_()}}function c(T){return[T||0,T||0,T||0]}function _(){return[0,0,0,1]}}),7507:(function(t,r){r.byteLength=h,r.toByteArray=m,r.fromByteArray=_;for(var a=[],l=[],i=typeof Uint8Array<"u"?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,u=s.length;o<u;++o)a[o]=s[o],l[s.charCodeAt(o)]=o;l[45]=62,l[95]=63;function d(T){var M=T.length;if(M%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var k=T.indexOf("=");k===-1&&(k=M);var b=k===M?0:4-k%4;return[k,b]}function h(T){var M=d(T),k=M[0],b=M[1];return(k+b)*3/4-b}function g(T,M,k){return(M+k)*3/4-k}function m(T){var M,k=d(T),b=k[0],A=k[1],y=new i(g(T,b,A)),f=0,p=A>0?b-4:b,x;for(x=0;x<p;x+=4)M=l[T.charCodeAt(x)]<<18|l[T.charCodeAt(x+1)]<<12|l[T.charCodeAt(x+2)]<<6|l[T.charCodeAt(x+3)],y[f++]=M>>16&255,y[f++]=M>>8&255,y[f++]=M&255;return A===2&&(M=l[T.charCodeAt(x)]<<2|l[T.charCodeAt(x+1)]>>4,y[f++]=M&255),A===1&&(M=l[T.charCodeAt(x)]<<10|l[T.charCodeAt(x+1)]<<4|l[T.charCodeAt(x+2)]>>2,y[f++]=M>>8&255,y[f++]=M&255),y}function E(T){return a[T>>18&63]+a[T>>12&63]+a[T>>6&63]+a[T&63]}function c(T,M,k){for(var b,A=[],y=M;y<k;y+=3)b=(T[y]<<16&16711680)+(T[y+1]<<8&65280)+(T[y+2]&255),A.push(E(b));return A.join("")}function _(T){for(var M,k=T.length,b=k%3,A=[],y=16383,f=0,p=k-b;f<p;f+=y)A.push(c(T,f,f+y>p?p:f+y));return b===1?(M=T[k-1],A.push(a[M>>2]+a[M<<4&63]+"==")):b===2&&(M=(T[k-2]<<8)+T[k-1],A.push(a[M>>10]+a[M>>4&63]+a[M<<2&63]+"=")),A.join("")}}),7518:(function(t,r,a){var l=a(1433);function i(u,d,h,g,m,E){this.location=u,this.dimension=d,this.a=h,this.b=g,this.c=m,this.d=E}i.prototype.bind=function(u){switch(this.dimension){case 1:u.vertexAttrib1f(this.location,this.a);break;case 2:u.vertexAttrib2f(this.location,this.a,this.b);break;case 3:u.vertexAttrib3f(this.location,this.a,this.b,this.c);break;case 4:u.vertexAttrib4f(this.location,this.a,this.b,this.c,this.d);break}};function s(u,d,h){this.gl=u,this._ext=d,this.handle=h,this._attribs=[],this._useElements=!1,this._elementsType=u.UNSIGNED_SHORT}s.prototype.bind=function(){this._ext.bindVertexArrayOES(this.handle);for(var u=0;u<this._attribs.length;++u)this._attribs[u].bind(this.gl)},s.prototype.unbind=function(){this._ext.bindVertexArrayOES(null)},s.prototype.dispose=function(){this._ext.deleteVertexArrayOES(this.handle)},s.prototype.update=function(u,d,h){if(this.bind(),l(this.gl,d,u),this.unbind(),this._attribs.length=0,u)for(var g=0;g<u.length;++g){var m=u[g];typeof m=="number"?this._attribs.push(new i(g,1,m)):Array.isArray(m)&&this._attribs.push(new i(g,m.length,m[0],m[1],m[2],m[3]))}this._useElements=!!d,this._elementsType=h||this.gl.UNSIGNED_SHORT},s.prototype.draw=function(u,d,h){h=h||0;var g=this.gl;this._useElements?g.drawElements(u,d,this._elementsType,h):g.drawArrays(u,h,d)};function o(u,d){return new s(u,d,d.createVertexArrayOES())}t.exports=o}),7520:(function(t,r,a){var l=a(9507);function i(){var s=!1;try{var o=Object.defineProperty({},"passive",{get:function(){s=!0}});window.addEventListener("test",null,o),window.removeEventListener("test",null,o)}catch{s=!1}return s}t.exports=l&&i()}),7536:(function(t){t.exports=r;function r(){var a=new Float32Array(4);return a[0]=0,a[1]=0,a[2]=0,a[3]=0,a}}),7608:(function(t){t.exports=r;function r(a,l){var i=l[0],s=l[1],o=l[2],u=l[3],d=l[4],h=l[5],g=l[6],m=l[7],E=l[8],c=l[9],_=l[10],T=l[11],M=l[12],k=l[13],b=l[14],A=l[15],y=i*h-s*d,f=i*g-o*d,p=i*m-u*d,x=s*g-o*h,N=s*m-u*h,D=o*m-u*g,B=E*k-c*M,U=E*b-_*M,V=E*A-T*M,q=c*b-_*k,z=c*A-T*k,H=_*A-T*b,G=y*H-f*z+p*q+x*V-N*U+D*B;return G?(G=1/G,a[0]=(h*H-g*z+m*q)*G,a[1]=(o*z-s*H-u*q)*G,a[2]=(k*D-b*N+A*x)*G,a[3]=(_*N-c*D-T*x)*G,a[4]=(g*V-d*H-m*U)*G,a[5]=(i*H-o*V+u*U)*G,a[6]=(b*p-M*D-A*f)*G,a[7]=(E*D-_*p+T*f)*G,a[8]=(d*z-h*V+m*B)*G,a[9]=(s*V-i*z-u*B)*G,a[10]=(M*N-k*p+A*y)*G,a[11]=(c*p-E*N-T*y)*G,a[12]=(h*U-d*q-g*B)*G,a[13]=(i*q-s*U+o*B)*G,a[14]=(k*f-M*x-b*y)*G,a[15]=(E*x-c*f+_*y)*G,a):null}}),7626:(function(t,r,a){var l=a(2642),i=a(9346);t.exports=h;function s(g,m){for(var E=[0,0,0,0],c=0;c<4;++c)for(var _=0;_<4;++_)E[_]+=g[4*c+_]*m[c];return E}function o(g,m,E,c,_){for(var T=s(c,s(E,s(m,[g[0],g[1],g[2],1]))),M=0;M<3;++M)T[M]/=T[3];return[.5*_[0]*(1+T[0]),.5*_[1]*(1-T[1])]}function u(g,m){if(g.length===2){for(var E=0,c=0,_=0;_<2;++_)E+=Math.pow(m[_]-g[0][_],2),c+=Math.pow(m[_]-g[1][_],2);return E=Math.sqrt(E),c=Math.sqrt(c),E+c<1e-6?[1,0]:[c/(E+c),E/(c+E)]}else if(g.length===3){var T=[0,0];return i(g[0],g[1],g[2],m,T),l(g,T)}return[]}function d(g,m){for(var E=[0,0,0],c=0;c<g.length;++c)for(var _=g[c],T=m[c],M=0;M<3;++M)E[M]+=T*_[M];return E}function h(g,m,E,c,_,T){if(g.length===1)return[0,g[0].slice()];for(var M=new Array(g.length),k=0;k<g.length;++k)M[k]=o(g[k],E,c,_,T);for(var b=0,A=1/0,k=0;k<M.length;++k){for(var y=0,f=0;f<2;++f)y+=Math.pow(M[k][f]-m[f],2);y<A&&(A=y,b=k)}for(var p=u(M,m),x=0,k=0;k<3;++k){if(p[k]<-.001||p[k]>1.0001)return null;x+=p[k]}return Math.abs(x-1)>.001?null:[b,d(g,p),p]}}),7636:(function(t){t.exports=r;function r(a,l){l=l||1;var i=Math.random()*2*Math.PI,s=Math.random()*2-1,o=Math.sqrt(1-s*s)*l;return a[0]=Math.cos(i)*o,a[1]=Math.sin(i)*o,a[2]=s*l,a}}),7640:(function(t,r,a){var l=a(1888);function i(m){switch(m){case"uint32":return[l.mallocUint32,l.freeUint32];default:return null}}var s={"uint32,1,0":function(m,E){return function(_,T,M,k,b,A,y,f,p,x,N){var D,B,U,V=_*b+k,q,z=m(f),H,G,J,le;for(D=_+1;D<=T;++D){for(B=D,V+=b,U=V,H=0,G=V,q=0;q<f;++q)z[H++]=M[G],G+=p;e:for(;B-- >_;){H=0,G=U-b;t:for(q=0;q<f;++q){if(J=M[G],le=z[H],J<le)break e;if(J>le)break t;G+=x,H+=N}for(H=U,G=U-b,q=0;q<f;++q)M[H]=M[G],H+=p,G+=p;U-=b}for(H=U,G=0,q=0;q<f;++q)M[H]=z[G++],H+=p}E(z)}}};function o(m,E){var c=i(E),_=[E,m].join(","),T=s[_];return c?T(c[0],c[1]):T()}var u={"uint32,1,0":function(m,E,c){return function _(T,M,k,b,A,y,f,p,x,N,D){var B=(M-T+1)/6|0,U=T+B,V=M-B,q=T+M>>1,z=q-B,H=q+B,G=U,J=z,le=q,ge=H,de=V,me=T+1,W=M-1,ie=!0,se,ee,pe,oe,Y,ce,ue,_e,Le,ze=0,Xe=0,Ve=0,rt,mt,_t,vt,ut,Fe,Pe,be,Ye,yt,wt,ht,Yt,$t,fr,mr,Ur=p,jr=E(Ur),fn=E(Ur);mt=A*G,_t=A*J,mr=b;e:for(rt=0;rt<p;++rt){if(ue=mt+mr,_e=_t+mr,Ve=k[ue]-k[_e],Ve>0){ee=G,G=J,J=ee;break e}if(Ve<0)break e;mr+=N}mt=A*ge,_t=A*de,mr=b;e:for(rt=0;rt<p;++rt){if(ue=mt+mr,_e=_t+mr,Ve=k[ue]-k[_e],Ve>0){ee=ge,ge=de,de=ee;break e}if(Ve<0)break e;mr+=N}mt=A*G,_t=A*le,mr=b;e:for(rt=0;rt<p;++rt){if(ue=mt+mr,_e=_t+mr,Ve=k[ue]-k[_e],Ve>0){ee=G,G=le,le=ee;break e}if(Ve<0)break e;mr+=N}mt=A*J,_t=A*le,mr=b;e:for(rt=0;rt<p;++rt){if(ue=mt+mr,_e=_t+mr,Ve=k[ue]-k[_e],Ve>0){ee=J,J=le,le=ee;break e}if(Ve<0)break e;mr+=N}mt=A*G,_t=A*ge,mr=b;e:for(rt=0;rt<p;++rt){if(ue=mt+mr,_e=_t+mr,Ve=k[ue]-k[_e],Ve>0){ee=G,G=ge,ge=ee;break e}if(Ve<0)break e;mr+=N}mt=A*le,_t=A*ge,mr=b;e:for(rt=0;rt<p;++rt){if(ue=mt+mr,_e=_t+mr,Ve=k[ue]-k[_e],Ve>0){ee=le,le=ge,ge=ee;break e}if(Ve<0)break e;mr+=N}mt=A*J,_t=A*de,mr=b;e:for(rt=0;rt<p;++rt){if(ue=mt+mr,_e=_t+mr,Ve=k[ue]-k[_e],Ve>0){ee=J,J=de,de=ee;break e}if(Ve<0)break e;mr+=N}mt=A*J,_t=A*le,mr=b;e:for(rt=0;rt<p;++rt){if(ue=mt+mr,_e=_t+mr,Ve=k[ue]-k[_e],Ve>0){ee=J,J=le,le=ee;break e}if(Ve<0)break e;mr+=N}mt=A*ge,_t=A*de,mr=b;e:for(rt=0;rt<p;++rt){if(ue=mt+mr,_e=_t+mr,Ve=k[ue]-k[_e],Ve>0){ee=ge,ge=de,de=ee;break e}if(Ve<0)break e;mr+=N}for(mt=A*G,_t=A*J,vt=A*le,ut=A*ge,Fe=A*de,Pe=A*U,be=A*q,Ye=A*V,fr=0,mr=b,rt=0;rt<p;++rt)ue=mt+mr,_e=_t+mr,Le=vt+mr,yt=ut+mr,wt=Fe+mr,ht=Pe+mr,Yt=be+mr,$t=Ye+mr,jr[fr]=k[_e],fn[fr]=k[yt],ie=ie&&jr[fr]===fn[fr],pe=k[ue],oe=k[Le],Y=k[wt],k[ht]=pe,k[Yt]=oe,k[$t]=Y,++fr,mr+=x;for(mt=A*z,_t=A*T,mr=b,rt=0;rt<p;++rt)ue=mt+mr,_e=_t+mr,k[ue]=k[_e],mr+=x;for(mt=A*H,_t=A*M,mr=b,rt=0;rt<p;++rt)ue=mt+mr,_e=_t+mr,k[ue]=k[_e],mr+=x;if(ie)for(ce=me;ce<=W;++ce){ue=b+ce*A,fr=0;e:for(rt=0;rt<p;++rt){if(Ve=k[ue]-jr[fr],Ve!==0)break e;fr+=D,ue+=N}if(Ve!==0)if(Ve<0){if(ce!==me)for(mt=A*ce,_t=A*me,mr=b,rt=0;rt<p;++rt)ue=mt+mr,_e=_t+mr,se=k[ue],k[ue]=k[_e],k[_e]=se,mr+=x;++me}else for(;;){ue=b+W*A,fr=0;e:for(rt=0;rt<p;++rt){if(Ve=k[ue]-jr[fr],Ve!==0)break e;fr+=D,ue+=N}if(Ve>0)W--;else if(Ve<0){for(mt=A*ce,_t=A*me,vt=A*W,mr=b,rt=0;rt<p;++rt)ue=mt+mr,_e=_t+mr,Le=vt+mr,se=k[ue],k[ue]=k[_e],k[_e]=k[Le],k[Le]=se,mr+=x;++me,--W;break}else{for(mt=A*ce,_t=A*W,mr=b,rt=0;rt<p;++rt)ue=mt+mr,_e=_t+mr,se=k[ue],k[ue]=k[_e],k[_e]=se,mr+=x;--W;break}}}else for(ce=me;ce<=W;++ce){ue=b+ce*A,fr=0;e:for(rt=0;rt<p;++rt){if(ze=k[ue]-jr[fr],ze!==0)break e;fr+=D,ue+=N}if(ze<0){if(ce!==me)for(mt=A*ce,_t=A*me,mr=b,rt=0;rt<p;++rt)ue=mt+mr,_e=_t+mr,se=k[ue],k[ue]=k[_e],k[_e]=se,mr+=x;++me}else{ue=b+ce*A,fr=0;e:for(rt=0;rt<p;++rt){if(Xe=k[ue]-fn[fr],Xe!==0)break e;fr+=D,ue+=N}if(Xe>0)for(;;){ue=b+W*A,fr=0;e:for(rt=0;rt<p;++rt){if(Ve=k[ue]-fn[fr],Ve!==0)break e;fr+=D,ue+=N}if(Ve>0){if(--W<ce)break;continue}else{ue=b+W*A,fr=0;e:for(rt=0;rt<p;++rt){if(Ve=k[ue]-jr[fr],Ve!==0)break e;fr+=D,ue+=N}if(Ve<0){for(mt=A*ce,_t=A*me,vt=A*W,mr=b,rt=0;rt<p;++rt)ue=mt+mr,_e=_t+mr,Le=vt+mr,se=k[ue],k[ue]=k[_e],k[_e]=k[Le],k[Le]=se,mr+=x;++me,--W}else{for(mt=A*ce,_t=A*W,mr=b,rt=0;rt<p;++rt)ue=mt+mr,_e=_t+mr,se=k[ue],k[ue]=k[_e],k[_e]=se,mr+=x;--W}break}}}}for(mt=A*T,_t=A*(me-1),fr=0,mr=b,rt=0;rt<p;++rt)ue=mt+mr,_e=_t+mr,k[ue]=k[_e],k[_e]=jr[fr],++fr,mr+=x;for(mt=A*M,_t=A*(W+1),fr=0,mr=b,rt=0;rt<p;++rt)ue=mt+mr,_e=_t+mr,k[ue]=k[_e],k[_e]=fn[fr],++fr,mr+=x;if(me-2-T<=32?m(T,me-2,k,b,A,y,f,p,x,N,D):_(T,me-2,k,b,A,y,f,p,x,N,D),M-(W+2)<=32?m(W+2,M,k,b,A,y,f,p,x,N,D):_(W+2,M,k,b,A,y,f,p,x,N,D),ie){c(jr),c(fn);return}if(me<U&&W>V){e:for(;;){for(ue=b+me*A,fr=0,mr=b,rt=0;rt<p;++rt){if(k[ue]!==jr[fr])break e;++fr,ue+=x}++me}e:for(;;){for(ue=b+W*A,fr=0,mr=b,rt=0;rt<p;++rt){if(k[ue]!==fn[fr])break e;++fr,ue+=x}--W}for(ce=me;ce<=W;++ce){ue=b+ce*A,fr=0;e:for(rt=0;rt<p;++rt){if(ze=k[ue]-jr[fr],ze!==0)break e;fr+=D,ue+=N}if(ze===0){if(ce!==me)for(mt=A*ce,_t=A*me,mr=b,rt=0;rt<p;++rt)ue=mt+mr,_e=_t+mr,se=k[ue],k[ue]=k[_e],k[_e]=se,mr+=x;++me}else{ue=b+ce*A,fr=0;e:for(rt=0;rt<p;++rt){if(Xe=k[ue]-fn[fr],Xe!==0)break e;fr+=D,ue+=N}if(Xe===0)for(;;){ue=b+W*A,fr=0;e:for(rt=0;rt<p;++rt){if(Ve=k[ue]-fn[fr],Ve!==0)break e;fr+=D,ue+=N}if(Ve===0){if(--W<ce)break;continue}else{ue=b+W*A,fr=0;e:for(rt=0;rt<p;++rt){if(Ve=k[ue]-jr[fr],Ve!==0)break e;fr+=D,ue+=N}if(Ve<0){for(mt=A*ce,_t=A*me,vt=A*W,mr=b,rt=0;rt<p;++rt)ue=mt+mr,_e=_t+mr,Le=vt+mr,se=k[ue],k[ue]=k[_e],k[_e]=k[Le],k[Le]=se,mr+=x;++me,--W}else{for(mt=A*ce,_t=A*W,mr=b,rt=0;rt<p;++rt)ue=mt+mr,_e=_t+mr,se=k[ue],k[ue]=k[_e],k[_e]=se,mr+=x;--W}break}}}}}c(jr),c(fn),W-me<=32?m(me,W,k,b,A,y,f,p,x,N,D):_(me,W,k,b,A,y,f,p,x,N,D)}}};function d(m,E,c){var _=i(E),T=[E,m].join(","),M=u[T];return m.length>1&&_?M(c,_[0],_[1]):M(c)}var h={"uint32,1,0":function(m,E){return function(c){var _=c.data,T=c.offset|0,M=c.shape,k=c.stride,b=k[0]|0,A=M[0]|0,y=k[1]|0,f=M[1]|0,p=y,x=y,N=1;A<=32?m(0,A-1,_,T,b,y,A,f,p,x,N):E(0,A-1,_,T,b,y,A,f,p,x,N)}}};function g(m,E){var c=[E,m].join(","),_=h[c],T=o(m,E),M=d(m,E,T);return _(T,M)}t.exports=g}),7642:(function(t,r,a){var l=a(8954),i=a(1682);t.exports=d;function s(h,g){this.point=h,this.index=g}function o(h,g){for(var m=h.point,E=g.point,c=m.length,_=0;_<c;++_){var T=E[_]-m[_];if(T)return T}return 0}function u(h,g,m){if(h===1)return m?[[-1,0]]:[];var E=g.map(function(k,b){return[k[0],b]});E.sort(function(k,b){return k[0]-b[0]});for(var c=new Array(h-1),_=1;_<h;++_){var T=E[_-1],M=E[_];c[_-1]=[T[1],M[1]]}return m&&c.push([-1,c[0][1]],[c[h-1][1],-1]),c}function d(h,g){var m=h.length;if(m===0)return[];var E=h[0].length;if(E<1)return[];if(E===1)return u(m,h,g);for(var c=new Array(m),_=1,T=0;T<m;++T){for(var M=h[T],k=new Array(E+1),b=0,A=0;A<E;++A){var y=M[A];k[A]=y,b+=y*y}k[E]=b,c[T]=new s(k,T),_=Math.max(b,_)}i(c,o),m=c.length;for(var f=new Array(m+E+1),p=new Array(m+E+1),x=(E+1)*(E+1)*_,N=new Array(E+1),T=0;T<=E;++T)N[T]=0;N[E]=x,f[0]=N.slice(),p[0]=-1;for(var T=0;T<=E;++T){var k=N.slice();k[T]=1,f[T+1]=k,p[T+1]=-1}for(var T=0;T<m;++T){var D=c[T];f[T+E+1]=D.point,p[T+E+1]=D.index}var B=l(f,!1);if(g?B=B.filter(function(U){for(var V=0,q=0;q<=E;++q){var z=p[U[q]];if(z<0&&++V>=2)return!1;U[q]=z}return!0}):B=B.filter(function(U){for(var V=0;V<=E;++V){var q=p[U[V]];if(q<0)return!1;U[V]=q}return!0}),E&1)for(var T=0;T<B.length;++T){var D=B[T],k=D[0];D[0]=D[1],D[1]=k}return B}}),7656:(function(t){t.exports=r;function r(a,l,i){var s=i[0],o=i[1],u=i[2],d,h,g,m,E,c,_,T,M,k,b,A;return l===a?(a[12]=l[0]*s+l[4]*o+l[8]*u+l[12],a[13]=l[1]*s+l[5]*o+l[9]*u+l[13],a[14]=l[2]*s+l[6]*o+l[10]*u+l[14],a[15]=l[3]*s+l[7]*o+l[11]*u+l[15]):(d=l[0],h=l[1],g=l[2],m=l[3],E=l[4],c=l[5],_=l[6],T=l[7],M=l[8],k=l[9],b=l[10],A=l[11],a[0]=d,a[1]=h,a[2]=g,a[3]=m,a[4]=E,a[5]=c,a[6]=_,a[7]=T,a[8]=M,a[9]=k,a[10]=b,a[11]=A,a[12]=d*s+E*o+M*u+l[12],a[13]=h*s+c*o+k*u+l[13],a[14]=g*s+_*o+b*u+l[14],a[15]=m*s+T*o+A*u+l[15]),a}}),7718:(function(t,r,a){t.exports=D,t.exports.processPixels=N;var l=a(3711),i=a(9618),s=a(5878),o=a(332),u=a(2538),d=a(2095),h="b",g="b|",m="i",E="i|",c="sup",_="+",T="+1",M="sub",k="-",b="-1";function A(B,U,V,q){for(var z="<"+B+">",H="</"+B+">",G=z.length,J=H.length,le=U[0]===_||U[0]===k,ge=0,de=-J;ge>-1&&(ge=V.indexOf(z,ge),!(ge===-1||(de=V.indexOf(H,ge+G),de===-1)||de<=ge));){for(var me=ge;me<de+J;++me)if(me<ge+G||me>=de)q[me]=null,V=V.substr(0,me)+" "+V.substr(me+1);else if(q[me]!==null){var W=q[me].indexOf(U[0]);W===-1?q[me]+=U:le&&(q[me]=q[me].substr(0,W+1)+(1+parseInt(q[me][W+1]))+q[me].substr(W+2))}var ie=ge+G,se=V.substr(ie,de-ie),ee=se.indexOf(z);ee!==-1?ge=ee:ge=de+J}return q}function y(B,U,V){for(var q=U.textAlign||"start",z=U.textBaseline||"alphabetic",H=[1<<30,1<<30],G=[0,0],J=B.length,le=0;le<J;++le)for(var ge=B[le],de=0;de<2;++de)H[de]=Math.min(H[de],ge[de])|0,G[de]=Math.max(G[de],ge[de])|0;var me=0;switch(q){case"center":me=-.5*(H[0]+G[0]);break;case"right":case"end":me=-G[0];break;case"left":case"start":me=-H[0];break;default:throw new Error("vectorize-text: Unrecognized textAlign: '"+q+"'")}var W=0;switch(z){case"hanging":case"top":W=-H[1];break;case"middle":W=-.5*(H[1]+G[1]);break;case"alphabetic":case"ideographic":W=-3*V;break;case"bottom":W=-G[1];break;default:throw new Error("vectorize-text: Unrecoginized textBaseline: '"+z+"'")}var ie=1/V;return"lineHeight"in U?ie*=+U.lineHeight:"width"in U?ie=U.width/(G[0]-H[0]):"height"in U&&(ie=U.height/(G[1]-H[1])),B.map(function(se){return[ie*(se[0]+me),ie*(se[1]+W)]})}function f(B,U,V,q,z,H){V=V.replace(/\n/g,""),H.breaklines===!0?V=V.replace(/\<br\>/g,`
`):V=V.replace(/\<br\>/g," ");var G="",J=[];for(Y=0;Y<V.length;++Y)J[Y]=G;H.bolds===!0&&(J=A(h,g,V,J)),H.italics===!0&&(J=A(m,E,V,J)),H.superscripts===!0&&(J=A(c,T,V,J)),H.subscripts===!0&&(J=A(M,b,V,J));var le=[],ge="";for(Y=0;Y<V.length;++Y)J[Y]!==null&&(ge+=V[Y],le.push(J[Y]));var de=ge.split(`
`),me=de.length,W=Math.round(z*q),ie=q,se=q*2,ee=0,pe=me*W+se;B.height<pe&&(B.height=pe),U.fillStyle="#000",U.fillRect(0,0,B.width,B.height),U.fillStyle="#fff";var oe,Y,ce,ue,_e,Le=0,ze="";function Xe(){if(ze!==""){var be=U.measureText(ze).width;U.fillText(ze,ie+ce,se+ue),ce+=be}}function Ve(){return""+Math.round(_e)+"px "}function rt(be,Ye){var yt=""+U.font;if(H.subscripts===!0){var wt=be.indexOf(k),ht=Ye.indexOf(k),Yt=wt>-1?parseInt(be[1+wt]):0,$t=ht>-1?parseInt(Ye[1+ht]):0;Yt!==$t&&(yt=yt.replace(Ve(),"?px "),_e*=Math.pow(.75,$t-Yt),yt=yt.replace("?px ",Ve())),ue+=.25*W*($t-Yt)}if(H.superscripts===!0){var fr=be.indexOf(_),mr=Ye.indexOf(_),Ur=fr>-1?parseInt(be[1+fr]):0,jr=mr>-1?parseInt(Ye[1+mr]):0;Ur!==jr&&(yt=yt.replace(Ve(),"?px "),_e*=Math.pow(.75,jr-Ur),yt=yt.replace("?px ",Ve())),ue-=.25*W*(jr-Ur)}if(H.bolds===!0){var fn=be.indexOf(g)>-1,Br=Ye.indexOf(g)>-1;!fn&&Br&&(Qr?yt=yt.replace("italic ","italic bold "):yt="bold "+yt),fn&&!Br&&(yt=yt.replace("bold ",""))}if(H.italics===!0){var Qr=be.indexOf(E)>-1,Ot=Ye.indexOf(E)>-1;!Qr&&Ot&&(yt="italic "+yt),Qr&&!Ot&&(yt=yt.replace("italic ",""))}U.font=yt}for(oe=0;oe<me;++oe){var mt=de[oe]+`
`;for(ce=0,ue=oe*W,_e=q,ze="",Y=0;Y<mt.length;++Y){var _t=Y+Le<le.length?le[Y+Le]:le[le.length-1];G===_t?ze+=mt[Y]:(Xe(),ze=mt[Y],_t!==void 0&&(rt(G,_t),G=_t))}Xe(),Le+=mt.length;var vt=Math.round(ce+2*ie)|0;ee<vt&&(ee=vt)}var ut=ee,Fe=se+W*me,Pe=i(U.getImageData(0,0,ut,Fe).data,[Fe,ut,4]);return Pe.pick(-1,-1,0).transpose(1,0)}function p(B,U){var V=l(B,128);return U?s(V.cells,V.positions,.25):{edges:V.cells,positions:V.positions}}function x(B,U,V,q){var z=p(B,q),H=y(z.positions,U,V),G=z.edges,J=U.orientation==="ccw";if(o(H,G),U.polygons||U.polygon||U.polyline){for(var le=d(G,H),ge=new Array(le.length),de=0;de<le.length;++de){for(var me=le[de],W=new Array(me.length),ie=0;ie<me.length;++ie){for(var se=me[ie],ee=new Array(se.length),pe=0;pe<se.length;++pe)ee[pe]=H[se[pe]].slice();J&&ee.reverse(),W[ie]=ee}ge[de]=W}return ge}else return U.triangles||U.triangulate||U.triangle?{cells:u(H,G,{delaunay:!1,exterior:!1,interior:!0}),positions:H}:{edges:G,positions:H}}function N(B,U,V){try{return x(B,U,V,!0)}catch{}try{return x(B,U,V,!1)}catch{}return U.polygons||U.polyline||U.polygon?[]:U.triangles||U.triangulate||U.triangle?{cells:[],positions:[]}:{edges:[],positions:[]}}function D(B,U,V,q){var z=64,H=1.25,G={breaklines:!1,bolds:!1,italics:!1,subscripts:!1,superscripts:!1};q&&(q.size&&q.size>0&&(z=q.size),q.lineSpacing&&q.lineSpacing>0&&(H=q.lineSpacing),q.styletags&&q.styletags.breaklines&&(G.breaklines=!!q.styletags.breaklines),q.styletags&&q.styletags.bolds&&(G.bolds=!!q.styletags.bolds),q.styletags&&q.styletags.italics&&(G.italics=!!q.styletags.italics),q.styletags&&q.styletags.subscripts&&(G.subscripts=!!q.styletags.subscripts),q.styletags&&q.styletags.superscripts&&(G.superscripts=!!q.styletags.superscripts)),V.font=[q.fontStyle,q.fontVariant,q.fontWeight,z+"px",q.font].filter(function(le){return le}).join(" "),V.textAlign="start",V.textBaseline="alphabetic",V.direction="ltr";var J=f(U,V,B,z,H,G);return N(J,q,z)}}),7721:(function(t,r,a){var l=a(5716);t.exports=i;function i(s){return l(s[0])*l(s[1])}}),7765:(function(t,r,a){t.exports=c;var l=a(9618),i=a(1888),s=a(446),o=a(1570);function u(_){for(var T=_.length,M=0,k=0;k<T;++k)M=Math.max(M,_[k].length)|0;return M-1}function d(_,T){for(var M=_.length,k=i.mallocUint8(M),b=0;b<M;++b)k[b]=_[b]<T|0;return k}function h(_,T){for(var M=_.length,k=T*(T+1)/2*M|0,b=i.mallocUint32(k*2),A=0,y=0;y<M;++y)for(var f=_[y],T=f.length,p=0;p<T;++p)for(var x=0;x<p;++x){var N=f[x],D=f[p];b[A++]=Math.min(N,D)|0,b[A++]=Math.max(N,D)|0}var B=A/2|0;s(l(b,[B,2]));for(var U=2,y=2;y<A;y+=2)b[y-2]===b[y]&&b[y-1]===b[y+1]||(b[U++]=b[y],b[U++]=b[y+1]);return l(b,[U/2|0,2])}function g(_,T,M,k){for(var b=_.data,A=_.shape[0],y=i.mallocDouble(A),f=0,p=0;p<A;++p){var x=b[2*p],N=b[2*p+1];if(M[x]!==M[N]){var D=T[x],B=T[N];b[2*f]=x,b[2*f+1]=N,y[f++]=(B-k)/(B-D)}}return _.shape[0]=f,l(y,[f])}function m(_,T){var M=i.mallocInt32(T*2),k=_.shape[0],b=_.data;M[0]=0;for(var A=0,y=0;y<k;++y){var f=b[2*y];if(f!==A){for(M[2*A+1]=y;++A<f;)M[2*A]=y,M[2*A+1]=y;M[2*A]=y}}for(M[2*A+1]=k;++A<T;)M[2*A]=M[2*A+1]=k;return M}function E(_){for(var T=_.shape[0]|0,M=_.data,k=new Array(T),b=0;b<T;++b)k[b]=[M[2*b],M[2*b+1]];return k}function c(_,T,M,k){M=M||0,typeof k>"u"&&(k=u(_));var b=_.length;if(b===0||k<1)return{cells:[],vertexIds:[],vertexWeights:[]};var A=d(T,+M),y=h(_,k),f=g(y,T,A,+M),p=m(y,T.length|0),x=o(k)(_,y.data,p,A),N=E(y),D=[].slice.call(f.data,0,f.shape[0]);return i.free(A),i.free(y.data),i.free(f.data),i.free(p),{cells:x,vertexIds:N,vertexWeights:D}}}),7766:(function(t,r,a){var l=a(9618),i=a(5298),s=a(1888);t.exports=f;var o=null,u=null,d=null;function h(p){o=[p.LINEAR,p.NEAREST_MIPMAP_LINEAR,p.LINEAR_MIPMAP_NEAREST,p.LINEAR_MIPMAP_NEAREST],u=[p.NEAREST,p.LINEAR,p.NEAREST_MIPMAP_NEAREST,p.NEAREST_MIPMAP_LINEAR,p.LINEAR_MIPMAP_NEAREST,p.LINEAR_MIPMAP_LINEAR],d=[p.REPEAT,p.CLAMP_TO_EDGE,p.MIRRORED_REPEAT]}function g(p){return typeof HTMLCanvasElement<"u"&&p instanceof HTMLCanvasElement||typeof HTMLImageElement<"u"&&p instanceof HTMLImageElement||typeof HTMLVideoElement<"u"&&p instanceof HTMLVideoElement||typeof ImageData<"u"&&p instanceof ImageData}var m=function(p,x){i.muls(p,x,255)};function E(p,x,N){var D=p.gl,B=D.getParameter(D.MAX_TEXTURE_SIZE);if(x<0||x>B||N<0||N>B)throw new Error("gl-texture2d: Invalid texture size");return p._shape=[x,N],p.bind(),D.texImage2D(D.TEXTURE_2D,0,p.format,x,N,0,p.format,p.type,null),p._mipLevels=[0],p}function c(p,x,N,D,B,U){this.gl=p,this.handle=x,this.format=B,this.type=U,this._shape=[N,D],this._mipLevels=[0],this._magFilter=p.NEAREST,this._minFilter=p.NEAREST,this._wrapS=p.CLAMP_TO_EDGE,this._wrapT=p.CLAMP_TO_EDGE,this._anisoSamples=1;var V=this,q=[this._wrapS,this._wrapT];Object.defineProperties(q,[{get:function(){return V._wrapS},set:function(H){return V.wrapS=H}},{get:function(){return V._wrapT},set:function(H){return V.wrapT=H}}]),this._wrapVector=q;var z=[this._shape[0],this._shape[1]];Object.defineProperties(z,[{get:function(){return V._shape[0]},set:function(H){return V.width=H}},{get:function(){return V._shape[1]},set:function(H){return V.height=H}}]),this._shapeVector=z}var _=c.prototype;Object.defineProperties(_,{minFilter:{get:function(){return this._minFilter},set:function(p){this.bind();var x=this.gl;if(this.type===x.FLOAT&&o.indexOf(p)>=0&&(x.getExtension("OES_texture_float_linear")||(p=x.NEAREST)),u.indexOf(p)<0)throw new Error("gl-texture2d: Unknown filter mode "+p);return x.texParameteri(x.TEXTURE_2D,x.TEXTURE_MIN_FILTER,p),this._minFilter=p}},magFilter:{get:function(){return this._magFilter},set:function(p){this.bind();var x=this.gl;if(this.type===x.FLOAT&&o.indexOf(p)>=0&&(x.getExtension("OES_texture_float_linear")||(p=x.NEAREST)),u.indexOf(p)<0)throw new Error("gl-texture2d: Unknown filter mode "+p);return x.texParameteri(x.TEXTURE_2D,x.TEXTURE_MAG_FILTER,p),this._magFilter=p}},mipSamples:{get:function(){return this._anisoSamples},set:function(p){var x=this._anisoSamples;if(this._anisoSamples=Math.max(p,1)|0,x!==this._anisoSamples){var N=this.gl.getExtension("EXT_texture_filter_anisotropic");N&&this.gl.texParameterf(this.gl.TEXTURE_2D,N.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(p){if(this.bind(),d.indexOf(p)<0)throw new Error("gl-texture2d: Unknown wrap mode "+p);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,p),this._wrapS=p}},wrapT:{get:function(){return this._wrapT},set:function(p){if(this.bind(),d.indexOf(p)<0)throw new Error("gl-texture2d: Unknown wrap mode "+p);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,p),this._wrapT=p}},wrap:{get:function(){return this._wrapVector},set:function(p){if(Array.isArray(p)||(p=[p,p]),p.length!==2)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var x=0;x<2;++x)if(d.indexOf(p[x])<0)throw new Error("gl-texture2d: Unknown wrap mode "+p);this._wrapS=p[0],this._wrapT=p[1];var N=this.gl;return this.bind(),N.texParameteri(N.TEXTURE_2D,N.TEXTURE_WRAP_S,this._wrapS),N.texParameteri(N.TEXTURE_2D,N.TEXTURE_WRAP_T,this._wrapT),p}},shape:{get:function(){return this._shapeVector},set:function(p){if(!Array.isArray(p))p=[p|0,p|0];else if(p.length!==2)throw new Error("gl-texture2d: Invalid texture shape");return E(this,p[0]|0,p[1]|0),[p[0]|0,p[1]|0]}},width:{get:function(){return this._shape[0]},set:function(p){return p=p|0,E(this,p,this._shape[1]),p}},height:{get:function(){return this._shape[1]},set:function(p){return p=p|0,E(this,this._shape[0],p),p}}}),_.bind=function(p){var x=this.gl;return p!==void 0&&x.activeTexture(x.TEXTURE0+(p|0)),x.bindTexture(x.TEXTURE_2D,this.handle),p!==void 0?p|0:x.getParameter(x.ACTIVE_TEXTURE)-x.TEXTURE0},_.dispose=function(){this.gl.deleteTexture(this.handle)},_.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var p=Math.min(this._shape[0],this._shape[1]),x=0;p>0;++x,p>>>=1)this._mipLevels.indexOf(x)<0&&this._mipLevels.push(x)},_.setPixels=function(p,x,N,D){var B=this.gl;this.bind(),Array.isArray(x)?(D=N,N=x[1]|0,x=x[0]|0):(x=x||0,N=N||0),D=D||0;var U=g(p)?p:p.raw;if(U){var V=this._mipLevels.indexOf(D)<0;V?(B.texImage2D(B.TEXTURE_2D,0,this.format,this.format,this.type,U),this._mipLevels.push(D)):B.texSubImage2D(B.TEXTURE_2D,D,x,N,this.format,this.type,U)}else if(p.shape&&p.stride&&p.data){if(p.shape.length<2||x+p.shape[1]>this._shape[1]>>>D||N+p.shape[0]>this._shape[0]>>>D||x<0||N<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");M(B,x,N,D,this.format,this.type,this._mipLevels,p)}else throw new Error("gl-texture2d: Unsupported data type")};function T(p,x){return p.length===3?x[2]===1&&x[1]===p[0]*p[2]&&x[0]===p[2]:x[0]===1&&x[1]===p[0]}function M(p,x,N,D,B,U,V,q){var z=q.dtype,H=q.shape.slice();if(H.length<2||H.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var G=0,J=0,le=T(H,q.stride.slice());if(z==="float32"?G=p.FLOAT:z==="float64"?(G=p.FLOAT,le=!1,z="float32"):z==="uint8"?G=p.UNSIGNED_BYTE:(G=p.UNSIGNED_BYTE,le=!1,z="uint8"),H.length===2)J=p.LUMINANCE,H=[H[0],H[1],1],q=l(q.data,H,[q.stride[0],q.stride[1],1],q.offset);else if(H.length===3){if(H[2]===1)J=p.ALPHA;else if(H[2]===2)J=p.LUMINANCE_ALPHA;else if(H[2]===3)J=p.RGB;else if(H[2]===4)J=p.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");H[2]}else throw new Error("gl-texture2d: Invalid shape for texture");if((J===p.LUMINANCE||J===p.ALPHA)&&(B===p.LUMINANCE||B===p.ALPHA)&&(J=B),J!==B)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var ge=q.size,de=V.indexOf(D)<0;if(de&&V.push(D),G===U&&le)q.offset===0&&q.data.length===ge?de?p.texImage2D(p.TEXTURE_2D,D,B,H[0],H[1],0,B,U,q.data):p.texSubImage2D(p.TEXTURE_2D,D,x,N,H[0],H[1],B,U,q.data):de?p.texImage2D(p.TEXTURE_2D,D,B,H[0],H[1],0,B,U,q.data.subarray(q.offset,q.offset+ge)):p.texSubImage2D(p.TEXTURE_2D,D,x,N,H[0],H[1],B,U,q.data.subarray(q.offset,q.offset+ge));else{var me;U===p.FLOAT?me=s.mallocFloat32(ge):me=s.mallocUint8(ge);var W=l(me,H,[H[2],H[2]*H[0],1]);G===p.FLOAT&&U===p.UNSIGNED_BYTE?m(W,q):i.assign(W,q),de?p.texImage2D(p.TEXTURE_2D,D,B,H[0],H[1],0,B,U,me.subarray(0,ge)):p.texSubImage2D(p.TEXTURE_2D,D,x,N,H[0],H[1],B,U,me.subarray(0,ge)),U===p.FLOAT?s.freeFloat32(me):s.freeUint8(me)}}function k(p){var x=p.createTexture();return p.bindTexture(p.TEXTURE_2D,x),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_MIN_FILTER,p.NEAREST),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_MAG_FILTER,p.NEAREST),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_WRAP_S,p.CLAMP_TO_EDGE),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_WRAP_T,p.CLAMP_TO_EDGE),x}function b(p,x,N,D,B){var U=p.getParameter(p.MAX_TEXTURE_SIZE);if(x<0||x>U||N<0||N>U)throw new Error("gl-texture2d: Invalid texture shape");if(B===p.FLOAT&&!p.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var V=k(p);return p.texImage2D(p.TEXTURE_2D,0,D,x,N,0,D,B,null),new c(p,V,x,N,D,B)}function A(p,x,N,D,B,U){var V=k(p);return p.texImage2D(p.TEXTURE_2D,0,B,B,U,x),new c(p,V,N,D,B,U)}function y(p,x){var N=x.dtype,D=x.shape.slice(),B=p.getParameter(p.MAX_TEXTURE_SIZE);if(D[0]<0||D[0]>B||D[1]<0||D[1]>B)throw new Error("gl-texture2d: Invalid texture size");var U=T(D,x.stride.slice()),V=0;N==="float32"?V=p.FLOAT:N==="float64"?(V=p.FLOAT,U=!1,N="float32"):N==="uint8"?V=p.UNSIGNED_BYTE:(V=p.UNSIGNED_BYTE,U=!1,N="uint8");var q=0;if(D.length===2)q=p.LUMINANCE,D=[D[0],D[1],1],x=l(x.data,D,[x.stride[0],x.stride[1],1],x.offset);else if(D.length===3)if(D[2]===1)q=p.ALPHA;else if(D[2]===2)q=p.LUMINANCE_ALPHA;else if(D[2]===3)q=p.RGB;else if(D[2]===4)q=p.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");else throw new Error("gl-texture2d: Invalid shape for texture");V===p.FLOAT&&!p.getExtension("OES_texture_float")&&(V=p.UNSIGNED_BYTE,U=!1);var z,H,G=x.size;if(U)x.offset===0&&x.data.length===G?z=x.data:z=x.data.subarray(x.offset,x.offset+G);else{var J=[D[2],D[2]*D[0],1];H=s.malloc(G,N);var le=l(H,D,J,0);(N==="float32"||N==="float64")&&V===p.UNSIGNED_BYTE?m(le,x):i.assign(le,x),z=H.subarray(0,G)}var ge=k(p);return p.texImage2D(p.TEXTURE_2D,0,q,D[0],D[1],0,q,V,z),U||s.free(H),new c(p,ge,D[0],D[1],q,V)}function f(p){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(o||h(p),typeof arguments[1]=="number")return b(p,arguments[1],arguments[2],arguments[3]||p.RGBA,arguments[4]||p.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return b(p,arguments[1][0]|0,arguments[1][1]|0,arguments[2]||p.RGBA,arguments[3]||p.UNSIGNED_BYTE);if(typeof arguments[1]=="object"){var x=arguments[1],N=g(x)?x:x.raw;if(N)return A(p,N,x.width|0,x.height|0,arguments[2]||p.RGBA,arguments[3]||p.UNSIGNED_BYTE);if(x.shape&&x.data&&x.stride)return y(p,x)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")}}),7790:(function(){}),7815:(function(t,r,a){var l=a(2931),i=a(9970),s=["xyz","xzy","yxz","yzx","zxy","zyx"],o=function(T,M,k,b){for(var A=T.points,y=T.velocities,f=T.divergences,p=[],x=[],N=[],D=[],B=[],U=[],V=0,q=0,z=i.create(),H=i.create(),G=8,J=0;J<A.length;J++){var le=A[J],ge=y[J],de=f[J];M===0&&(de=k*.05),q=l.length(ge)/b,z=i.create(),l.copy(z,ge),z[3]=de;for(var me=0;me<G;me++)B[me]=[le[0],le[1],le[2],me];if(D.length>0)for(var me=0;me<G;me++){var W=(me+1)%G;p.push(D[me],B[me],B[W],B[W],D[W],D[me]),N.push(H,z,z,z,H,H),U.push(V,q,q,q,V,V);var ie=p.length;x.push([ie-6,ie-5,ie-4],[ie-3,ie-2,ie-1])}var se=D;D=B,B=se;var ee=H;H=z,z=ee;var pe=V;V=q,q=pe}return{positions:p,cells:x,vectors:N,vertexIntensity:U}},u=function(T,M,k,b){for(var A=0,y=0;y<T.length;y++)for(var f=T[y].velocities,p=0;p<f.length;p++)A=Math.max(A,l.length(f[p]));for(var x=T.map(function(J){return o(J,k,b,A)}),N=[],D=[],B=[],U=[],y=0;y<x.length;y++){var V=x[y],q=N.length;N=N.concat(V.positions),B=B.concat(V.vectors),U=U.concat(V.vertexIntensity);for(var p=0;p<V.cells.length;p++){var z=V.cells[p],H=[];D.push(H);for(var G=0;G<z.length;G++)H.push(z[G]+q)}}return{positions:N,cells:D,vectors:B,vertexIntensity:U,colormap:M}},d=function(T,M){var k=T.length,b;for(b=0;b<k;b++){var A=T[b];if(A===M)return b;if(A>M)return b-1}return b},h=function(T,M,k){return T<M?M:T>k?k:T},g=function(T,M,k){var b=M.vectors,A=M.meshgrid,y=T[0],f=T[1],p=T[2],x=A[0].length,N=A[1].length,D=A[2].length,B=d(A[0],y),U=d(A[1],f),V=d(A[2],p),q=B+1,z=U+1,H=V+1;if(B=h(B,0,x-1),q=h(q,0,x-1),U=h(U,0,N-1),z=h(z,0,N-1),V=h(V,0,D-1),H=h(H,0,D-1),B<0||U<0||V<0||q>x-1||z>N-1||H>D-1)return l.create();var G=A[0][B],J=A[0][q],le=A[1][U],ge=A[1][z],de=A[2][V],me=A[2][H],W=(y-G)/(J-G),ie=(f-le)/(ge-le),se=(p-de)/(me-de);isFinite(W)||(W=.5),isFinite(ie)||(ie=.5),isFinite(se)||(se=.5);var ee,pe,oe,Y,ce,ue;switch(k.reversedX&&(B=x-1-B,q=x-1-q),k.reversedY&&(U=N-1-U,z=N-1-z),k.reversedZ&&(V=D-1-V,H=D-1-H),k.filled){case 5:ce=V,ue=H,oe=U*D,Y=z*D,ee=B*D*N,pe=q*D*N;break;case 4:ce=V,ue=H,ee=B*D,pe=q*D,oe=U*D*x,Y=z*D*x;break;case 3:oe=U,Y=z,ce=V*N,ue=H*N,ee=B*N*D,pe=q*N*D;break;case 2:oe=U,Y=z,ee=B*N,pe=q*N,ce=V*N*x,ue=H*N*x;break;case 1:ee=B,pe=q,ce=V*x,ue=H*x,oe=U*x*D,Y=z*x*D;break;default:ee=B,pe=q,oe=U*x,Y=z*x,ce=V*x*N,ue=H*x*N;break}var _e=b[ee+oe+ce],Le=b[ee+oe+ue],ze=b[ee+Y+ce],Xe=b[ee+Y+ue],Ve=b[pe+oe+ce],rt=b[pe+oe+ue],mt=b[pe+Y+ce],_t=b[pe+Y+ue],vt=l.create(),ut=l.create(),Fe=l.create(),Pe=l.create();l.lerp(vt,_e,Ve,W),l.lerp(ut,Le,rt,W),l.lerp(Fe,ze,mt,W),l.lerp(Pe,Xe,_t,W);var be=l.create(),Ye=l.create();l.lerp(be,vt,Fe,ie),l.lerp(Ye,ut,Pe,ie);var yt=l.create();return l.lerp(yt,be,Ye,se),yt},m=function(T){var M=1/0;T.sort(function(y,f){return y-f});for(var k=T.length,b=1;b<k;b++){var A=Math.abs(T[b]-T[b-1]);A<M&&(M=A)}return M},E=function(T){for(var M=[],k=[],b=[],A={},y={},f={},p=T.length,x=0;x<p;x++){var N=T[x],D=N[0],B=N[1],U=N[2];A[D]||(M.push(D),A[D]=!0),y[B]||(k.push(B),y[B]=!0),f[U]||(b.push(U),f[U]=!0)}var V=m(M),q=m(k),z=m(b),H=Math.min(V,q,z);return isFinite(H)?H:1};t.exports=function(T,M){var k=T.startingPositions,b=T.maxLength||1e3,A=T.tubeSize||1,y=T.absoluteTubeSize,f=T.gridFill||"+x+y+z",p={};f.indexOf("-x")!==-1&&(p.reversedX=!0),f.indexOf("-y")!==-1&&(p.reversedY=!0),f.indexOf("-z")!==-1&&(p.reversedZ=!0),p.filled=s.indexOf(f.replace(/-/g,"").replace(/\+/g,""));var x=T.getVelocity||function(rt){return g(rt,T,p)},N=T.getDivergence||function(rt,mt){var _t=l.create(),vt=1e-4;l.add(_t,rt,[vt,0,0]);var ut=x(_t);l.subtract(ut,ut,mt),l.scale(ut,ut,1/vt),l.add(_t,rt,[0,vt,0]);var Fe=x(_t);l.subtract(Fe,Fe,mt),l.scale(Fe,Fe,1/vt),l.add(_t,rt,[0,0,vt]);var Pe=x(_t);return l.subtract(Pe,Pe,mt),l.scale(Pe,Pe,1/vt),l.add(_t,ut,Fe),l.add(_t,_t,Pe),_t},D=[],B=M[0][0],U=M[0][1],V=M[0][2],q=M[1][0],z=M[1][1],H=M[1][2],G=function(rt){var mt=rt[0],_t=rt[1],vt=rt[2];return!(mt<B||mt>q||_t<U||_t>z||vt<V||vt>H)},J=l.distance(M[0],M[1]),le=10*J/b,ge=le*le,de=1,me=0,W=k.length;W>1&&(de=E(k));for(var ie=0;ie<W;ie++){var se=l.create();l.copy(se,k[ie]);var ee=[se],pe=[],oe=x(se),Y=se;pe.push(oe);var ce=[],ue=N(se,oe),_e=l.length(ue);isFinite(_e)&&_e>me&&(me=_e),ce.push(_e),D.push({points:ee,velocities:pe,divergences:ce});for(var Le=0;Le<b*100&&ee.length<b&&G(se);){Le++;var ze=l.clone(oe),Xe=l.squaredLength(ze);if(Xe===0)break;if(Xe>ge&&l.scale(ze,ze,le/Math.sqrt(Xe)),l.add(ze,ze,se),oe=x(ze),l.squaredDistance(Y,ze)-ge>-1e-4*ge){ee.push(ze),Y=ze,pe.push(oe);var ue=N(ze,oe),_e=l.length(ue);isFinite(_e)&&_e>me&&(me=_e),ce.push(_e)}se=ze}}var Ve=u(D,T.colormap,me,de);return y?Ve.tubeScale=y:(me===0&&(me=1),Ve.tubeScale=A*.5*de/me),Ve};var c=a(6740),_=a(6405).createMesh;t.exports.createTubeMesh=function(T,M){return _(T,M,{shaders:c,traceType:"streamtube"})}}),7827:(function(t){t.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]}),7842:(function(t,r,a){var l=a(6330),i=a(1533),s=a(2651),o=a(6768),u=a(869),d=a(8697);t.exports=h;function h(g,m){if(l(g))return m?d(g,h(m)):[g[0].clone(),g[1].clone()];var E=0,c,_;if(i(g))c=g.clone();else if(typeof g=="string")c=o(g);else{if(g===0)return[s(0),s(1)];if(g===Math.floor(g))c=s(g);else{for(;g!==Math.floor(g);)g=g*Math.pow(2,256),E-=256;c=s(g)}}if(l(m))c.mul(m[1]),_=m[0].clone();else if(i(m))_=m.clone();else if(typeof m=="string")_=o(m);else if(!m)_=s(1);else if(m===Math.floor(m))_=s(m);else{for(;m!==Math.floor(m);)m=m*Math.pow(2,256),E+=256;_=s(m)}return E>0?c=c.ushln(E):E<0&&(_=_.ushln(-E)),u(c,_)}}),7894:(function(t){t.exports=r;function r(a){return a[0]=1,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=1,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=1,a[11]=0,a[12]=0,a[13]=0,a[14]=0,a[15]=1,a}}),7932:(function(t,r,a){var l=a(620);t.exports=l.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])}),7960:(function(t){t.exports=r;function r(a,l){var i=l[0]-a[0],s=l[1]-a[1],o=l[2]-a[2],u=l[3]-a[3];return i*i+s*s+o*o+u*u}}),8105:(function(t){t.exports=a;var r={"lo===p0":l,"lo<p0":i,"lo<=p0":s,"hi<=p0":o,"lo<p0&&p0<=hi":d,"lo<=p0&&p0<=hi":u,"!(lo>=p0)&&!(p1>=hi)":h};function a(g){return r[g]}function l(g,m,E,c,_,T,M){for(var k=2*g,b=k*E,A=b,y=E,f=m,p=g+m,x=E;c>x;++x,b+=k){var N=_[b+f];if(N===M)if(y===x)y+=1,A+=k;else{for(var D=0;k>D;++D){var B=_[b+D];_[b+D]=_[A],_[A++]=B}var U=T[x];T[x]=T[y],T[y++]=U}}return y}function i(g,m,E,c,_,T,M){for(var k=2*g,b=k*E,A=b,y=E,f=m,p=g+m,x=E;c>x;++x,b+=k){var N=_[b+f];if(N<M)if(y===x)y+=1,A+=k;else{for(var D=0;k>D;++D){var B=_[b+D];_[b+D]=_[A],_[A++]=B}var U=T[x];T[x]=T[y],T[y++]=U}}return y}function s(g,m,E,c,_,T,M){for(var k=2*g,b=k*E,A=b,y=E,f=m,p=g+m,x=E;c>x;++x,b+=k){var N=_[b+p];if(N<=M)if(y===x)y+=1,A+=k;else{for(var D=0;k>D;++D){var B=_[b+D];_[b+D]=_[A],_[A++]=B}var U=T[x];T[x]=T[y],T[y++]=U}}return y}function o(g,m,E,c,_,T,M){for(var k=2*g,b=k*E,A=b,y=E,f=m,p=g+m,x=E;c>x;++x,b+=k){var N=_[b+p];if(N<=M)if(y===x)y+=1,A+=k;else{for(var D=0;k>D;++D){var B=_[b+D];_[b+D]=_[A],_[A++]=B}var U=T[x];T[x]=T[y],T[y++]=U}}return y}function u(g,m,E,c,_,T,M){for(var k=2*g,b=k*E,A=b,y=E,f=m,p=g+m,x=E;c>x;++x,b+=k){var N=_[b+f],D=_[b+p];if(N<=M&&M<=D)if(y===x)y+=1,A+=k;else{for(var B=0;k>B;++B){var U=_[b+B];_[b+B]=_[A],_[A++]=U}var V=T[x];T[x]=T[y],T[y++]=V}}return y}function d(g,m,E,c,_,T,M){for(var k=2*g,b=k*E,A=b,y=E,f=m,p=g+m,x=E;c>x;++x,b+=k){var N=_[b+f],D=_[b+p];if(N<M&&M<=D)if(y===x)y+=1,A+=k;else{for(var B=0;k>B;++B){var U=_[b+B];_[b+B]=_[A],_[A++]=U}var V=T[x];T[x]=T[y],T[y++]=V}}return y}function h(g,m,E,c,_,T,M,k){for(var b=2*g,A=b*E,y=A,f=E,p=m,x=g+m,N=E;c>N;++N,A+=b){var D=_[A+p],B=_[A+x];if(!(D>=M)&&!(k>=B))if(f===N)f+=1,y+=b;else{for(var U=0;b>U;++U){var V=_[A+U];_[A+U]=_[y],_[y++]=V}var q=T[N];T[N]=T[f],T[f++]=q}}return f}}),8107:(function(t){t.exports=r;function r(a,l,i){return a[0]=Math.min(l[0],i[0]),a[1]=Math.min(l[1],i[1]),a[2]=Math.min(l[2],i[2]),a}}),8116:(function(t,r,a){var l=a(7518),i=a(870);function s(u){this.bindVertexArrayOES=u.bindVertexArray.bind(u),this.createVertexArrayOES=u.createVertexArray.bind(u),this.deleteVertexArrayOES=u.deleteVertexArray.bind(u)}function o(u,d,h,g){var m=u.createVertexArray?new s(u):u.getExtension("OES_vertex_array_object"),E;return m?E=l(u,m):E=i(u),E.update(d,h,g),E}t.exports=o}),8192:(function(t,r,a){t.exports=o;var l=a(2825),i=a(3536),s=a(244);function o(u,d){var h=l(u[0],u[1],u[2]),g=l(d[0],d[1],d[2]);i(h,h),i(g,g);var m=s(h,g);return m>1?0:Math.acos(m)}}),8210:(function(t){t.exports=a;function r(l,i){var s=l+i,o=s-l,u=s-o,d=i-o,h=l-u,g=h+d;return g?[g,s]:[s]}function a(l,i){var s=l.length|0,o=i.length|0;if(s===1&&o===1)return r(l[0],i[0]);var u=s+o,d=new Array(u),h=0,g=0,m=0,E=Math.abs,c=l[g],_=E(c),T=i[m],M=E(T),k,b;_<M?(b=c,g+=1,g<s&&(c=l[g],_=E(c))):(b=T,m+=1,m<o&&(T=i[m],M=E(T))),g<s&&_<M||m>=o?(k=c,g+=1,g<s&&(c=l[g],_=E(c))):(k=T,m+=1,m<o&&(T=i[m],M=E(T)));for(var A=k+b,y=A-k,f=b-y,p=f,x=A,N,D,B,U,V;g<s&&m<o;)_<M?(k=c,g+=1,g<s&&(c=l[g],_=E(c))):(k=T,m+=1,m<o&&(T=i[m],M=E(T))),b=p,A=k+b,y=A-k,f=b-y,f&&(d[h++]=f),N=x+A,D=N-x,B=N-D,U=A-D,V=x-B,p=V+U,x=N;for(;g<s;)k=c,b=p,A=k+b,y=A-k,f=b-y,f&&(d[h++]=f),N=x+A,D=N-x,B=N-D,U=A-D,V=x-B,p=V+U,x=N,g+=1,g<s&&(c=l[g]);for(;m<o;)k=T,b=p,A=k+b,y=A-k,f=b-y,f&&(d[h++]=f),N=x+A,D=N-x,B=N-D,U=A-D,V=x-B,p=V+U,x=N,m+=1,m<o&&(T=i[m]);return p&&(d[h++]=p),x&&(d[h++]=x),h||(d[h++]=0),d.length=h,d}}),8277:(function(t){function r(){return function(u,d,h,g,m){var E=u[0],c=u[1],_=u[2],T=h[0],M=h[1],k=h[2],b=[0,0,0];g|=0;var A=0,y=0,f=0,p=k,x=M-_*k,N=T-c*M;for(f=0;f<E;++f){for(y=0;y<c;++y){for(A=0;A<_;++A){{var D=m,B;for(B=0;B<b.length-1;++B)D=D[b[B]];d[g]=D[b[b.length-1]]}g+=p,++b[2]}g+=x,b[2]-=_,++b[1]}g+=N,b[1]-=c,++b[0]}}}function a(){return r()}var l=a;function i(u){var d={};return function(g,m){var E=g.dtype,c=g.order,_=[E,c.join()].join(),T=d[_];return T||(d[_]=T=u([E,c])),T(g.shape.slice(0),g.data,g.stride,g.offset|0,m)}}function s(u){return i(l.bind(void 0,u))}function o(u){return s({funcName:u.funcName})}t.exports=o({funcName:"convert"})}),8284:(function(t){t.exports=r;function r(a,l){var i={identity:l},s=a.valueOf;return Object.defineProperty(a,"valueOf",{value:function(o){return o!==l?s.apply(this,arguments):i},writable:!0}),i}}),8406:(function(t,r){var a=1e-6,l=1e-6;r.vertexNormals=function(i,s,o){for(var u=s.length,d=new Array(u),h=o===void 0?a:o,g=0;g<u;++g)d[g]=[0,0,0];for(var g=0;g<i.length;++g)for(var m=i[g],E=0,c=m[m.length-1],_=m[0],T=0;T<m.length;++T){E=c,c=_,_=m[(T+1)%m.length];for(var M=s[E],k=s[c],b=s[_],A=new Array(3),y=0,f=new Array(3),p=0,x=0;x<3;++x)A[x]=M[x]-k[x],y+=A[x]*A[x],f[x]=b[x]-k[x],p+=f[x]*f[x];if(y*p>h)for(var N=d[c],D=1/Math.sqrt(y*p),x=0;x<3;++x){var B=(x+1)%3,U=(x+2)%3;N[x]+=D*(f[B]*A[U]-f[U]*A[B])}}for(var g=0;g<u;++g){for(var N=d[g],V=0,x=0;x<3;++x)V+=N[x]*N[x];if(V>h)for(var D=1/Math.sqrt(V),x=0;x<3;++x)N[x]*=D;else for(var x=0;x<3;++x)N[x]=0}return d},r.faceNormals=function(i,s,o){for(var u=i.length,d=new Array(u),h=o===void 0?l:o,g=0;g<u;++g){for(var m=i[g],E=new Array(3),c=0;c<3;++c)E[c]=s[m[c]];for(var _=new Array(3),T=new Array(3),c=0;c<3;++c)_[c]=E[1][c]-E[0][c],T[c]=E[2][c]-E[0][c];for(var M=new Array(3),k=0,c=0;c<3;++c){var b=(c+1)%3,A=(c+2)%3;M[c]=_[b]*T[A]-_[A]*T[b],k+=M[c]*M[c]}k>h?k=1/Math.sqrt(k):k=0;for(var c=0;c<3;++c)M[c]*=k;d[g]=M}return d}}),8418:(function(t,r,a){var l=a(5219),i=a(2762),s=a(8116),o=a(1888),u=a(6760),d=a(1283),h=a(9366),g=a(5964),m=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],E=ArrayBuffer,c=DataView;function _(ee){return E.isView(ee)&&!(ee instanceof c)}function T(ee){return Array.isArray(ee)||_(ee)}t.exports=se;function M(ee,pe){var oe=ee[0],Y=ee[1],ce=ee[2],ue=ee[3];return ee[0]=pe[0]*oe+pe[4]*Y+pe[8]*ce+pe[12]*ue,ee[1]=pe[1]*oe+pe[5]*Y+pe[9]*ce+pe[13]*ue,ee[2]=pe[2]*oe+pe[6]*Y+pe[10]*ce+pe[14]*ue,ee[3]=pe[3]*oe+pe[7]*Y+pe[11]*ce+pe[15]*ue,ee}function k(ee,pe,oe,Y){return M(Y,Y),M(Y,Y),M(Y,Y)}function b(ee,pe){this.index=ee,this.dataCoordinate=this.position=pe}function A(ee){return ee===!0||ee>1?1:ee}function y(ee,pe,oe,Y,ce,ue,_e,Le,ze,Xe,Ve,rt){this.gl=ee,this.pixelRatio=1,this.shader=pe,this.orthoShader=oe,this.projectShader=Y,this.pointBuffer=ce,this.colorBuffer=ue,this.glyphBuffer=_e,this.idBuffer=Le,this.vao=ze,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=Xe,this.pickOrthoShader=Ve,this.pickProjectShader=rt,this.points=[],this._selectResult=new b(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 f=y.prototype;f.pickSlots=1,f.setPickBase=function(ee){this.pickId=ee},f.isTransparent=function(){if(this.hasAlpha)return!0;for(var ee=0;ee<3;++ee)if(this.axesProject[ee]&&this.projectHasAlpha)return!0;return!1},f.isOpaque=function(){if(!this.hasAlpha)return!0;for(var ee=0;ee<3;++ee)if(this.axesProject[ee]&&!this.projectHasAlpha)return!0;return!1};var p=[0,0],x=[0,0,0],N=[0,0,0],D=[0,0,0,1],B=[0,0,0,1],U=m.slice(),V=[0,0,0],q=[[0,0,0],[0,0,0]];function z(ee){return ee[0]=ee[1]=ee[2]=0,ee}function H(ee,pe){return ee[0]=pe[0],ee[1]=pe[1],ee[2]=pe[2],ee[3]=1,ee}function G(ee,pe,oe,Y){return ee[0]=pe[0],ee[1]=pe[1],ee[2]=pe[2],ee[oe]=Y,ee}function J(ee){for(var pe=q,oe=0;oe<2;++oe)for(var Y=0;Y<3;++Y)pe[oe][Y]=Math.max(Math.min(ee[oe][Y],1e8),-1e8);return pe}function le(ee,pe,oe,Y){var ce=pe.axesProject,ue=pe.gl,_e=ee.uniforms,Le=oe.model||m,ze=oe.view||m,Xe=oe.projection||m,Ve=pe.axesBounds,rt=J(pe.clipBounds),mt;pe.axes&&pe.axes.lastCubeProps?mt=pe.axes.lastCubeProps.axis:mt=[1,1,1],p[0]=2/ue.drawingBufferWidth,p[1]=2/ue.drawingBufferHeight,ee.bind(),_e.view=ze,_e.projection=Xe,_e.screenSize=p,_e.highlightId=pe.highlightId,_e.highlightScale=pe.highlightScale,_e.clipBounds=rt,_e.pickGroup=pe.pickId/255,_e.pixelRatio=Y;for(var _t=0;_t<3;++_t)if(ce[_t]){_e.scale=pe.projectScale[_t],_e.opacity=pe.projectOpacity[_t];for(var vt=U,ut=0;ut<16;++ut)vt[ut]=0;for(var ut=0;ut<4;++ut)vt[5*ut]=1;vt[5*_t]=0,mt[_t]<0?vt[12+_t]=Ve[0][_t]:vt[12+_t]=Ve[1][_t],u(vt,Le,vt),_e.model=vt;var Fe=(_t+1)%3,Pe=(_t+2)%3,be=z(x),Ye=z(N);be[Fe]=1,Ye[Pe]=1;var yt=k(Xe,ze,Le,H(D,be)),wt=k(Xe,ze,Le,H(B,Ye));if(Math.abs(yt[1])>Math.abs(wt[1])){var ht=yt;yt=wt,wt=ht,ht=be,be=Ye,Ye=ht;var Yt=Fe;Fe=Pe,Pe=Yt}yt[0]<0&&(be[Fe]=-1),wt[1]>0&&(Ye[Pe]=-1);for(var $t=0,fr=0,ut=0;ut<4;++ut)$t+=Math.pow(Le[4*Fe+ut],2),fr+=Math.pow(Le[4*Pe+ut],2);be[Fe]/=Math.sqrt($t),Ye[Pe]/=Math.sqrt(fr),_e.axes[0]=be,_e.axes[1]=Ye,_e.fragClipBounds[0]=G(V,rt[0],_t,-1e8),_e.fragClipBounds[1]=G(V,rt[1],_t,1e8),pe.vao.bind(),pe.vao.draw(ue.TRIANGLES,pe.vertexCount),pe.lineWidth>0&&(ue.lineWidth(pe.lineWidth*Y),pe.vao.draw(ue.LINES,pe.lineVertexCount,pe.vertexCount)),pe.vao.unbind()}}var ge=[-1e8,-1e8,-1e8],de=[1e8,1e8,1e8],me=[ge,de];function W(ee,pe,oe,Y,ce,ue,_e){var Le=oe.gl;if((ue===oe.projectHasAlpha||_e)&&le(pe,oe,Y,ce),ue===oe.hasAlpha||_e){ee.bind();var ze=ee.uniforms;ze.model=Y.model||m,ze.view=Y.view||m,ze.projection=Y.projection||m,p[0]=2/Le.drawingBufferWidth,p[1]=2/Le.drawingBufferHeight,ze.screenSize=p,ze.highlightId=oe.highlightId,ze.highlightScale=oe.highlightScale,ze.fragClipBounds=me,ze.clipBounds=oe.axes.bounds,ze.opacity=oe.opacity,ze.pickGroup=oe.pickId/255,ze.pixelRatio=ce,oe.vao.bind(),oe.vao.draw(Le.TRIANGLES,oe.vertexCount),oe.lineWidth>0&&(Le.lineWidth(oe.lineWidth*ce),oe.vao.draw(Le.LINES,oe.lineVertexCount,oe.vertexCount)),oe.vao.unbind()}}f.draw=function(ee){var pe=this.useOrtho?this.orthoShader:this.shader;W(pe,this.projectShader,this,ee,this.pixelRatio,!1,!1)},f.drawTransparent=function(ee){var pe=this.useOrtho?this.orthoShader:this.shader;W(pe,this.projectShader,this,ee,this.pixelRatio,!0,!1)},f.drawPick=function(ee){var pe=this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader;W(pe,this.pickProjectShader,this,ee,1,!0,!0)},f.pick=function(ee){if(!ee||ee.id!==this.pickId)return null;var pe=ee.value[2]+(ee.value[1]<<8)+(ee.value[0]<<16);if(pe>=this.pointCount||pe<0)return null;var oe=this.points[pe],Y=this._selectResult;Y.index=pe;for(var ce=0;ce<3;++ce)Y.position[ce]=Y.dataCoordinate[ce]=oe[ce];return Y},f.highlight=function(ee){if(!ee)this.highlightId=[1,1,1,1];else{var pe=ee.index,oe=pe&255,Y=pe>>8&255,ce=pe>>16&255;this.highlightId=[oe/255,Y/255,ce/255,0]}};function ie(ee,pe,oe,Y){var ce;T(ee)?pe<ee.length?ce=ee[pe]:ce=void 0:ce=ee,ce=g(ce);var ue=!0;l(ce)&&(ce="▼",ue=!1),oe||(oe={});var _e=oe.family;T(_e)&&(_e=_e[pe]),_e||(_e="normal");var Le=oe.weight;T(Le)&&(Le=Le[pe]),Le||(Le="normal");var ze=oe.style;T(ze)&&(ze=ze[pe]),ze||(ze="normal");var Xe=oe.variant;T(Xe)&&(Xe=Xe[pe]),Xe||(Xe="normal");var Ve=h(ce,{family:_e,weight:Le,style:ze,variant:Xe},Y),Ve=h(ce,oe,Y);return{mesh:Ve[0],lines:Ve[1],bounds:Ve[2],visible:ue}}f.update=function(ee){if(ee=ee||{},"perspective"in ee&&(this.useOrtho=!ee.perspective),"orthographic"in ee&&(this.useOrtho=!!ee.orthographic),"lineWidth"in ee&&(this.lineWidth=ee.lineWidth),"project"in ee)if(T(ee.project))this.axesProject=ee.project;else{var pe=!!ee.project;this.axesProject=[pe,pe,pe]}if("projectScale"in ee)if(T(ee.projectScale))this.projectScale=ee.projectScale.slice();else{var oe=+ee.projectScale;this.projectScale=[oe,oe,oe]}if(this.projectHasAlpha=!1,"projectOpacity"in ee){if(T(ee.projectOpacity))this.projectOpacity=ee.projectOpacity.slice();else{var oe=+ee.projectOpacity;this.projectOpacity=[oe,oe,oe]}for(var Y=0;Y<3;++Y)this.projectOpacity[Y]=A(this.projectOpacity[Y]),this.projectOpacity[Y]<1&&(this.projectHasAlpha=!0)}this.hasAlpha=!1,"opacity"in ee&&(this.opacity=A(ee.opacity),this.opacity<1&&(this.hasAlpha=!0)),this.dirty=!0;var ce=ee.position,ue={family:ee.font||"normal",style:ee.fontStyle||"normal",weight:ee.fontWeight||"normal",variant:ee.fontVariant||"normal"},_e=ee.alignment||[0,0],Le,ze;if(_e.length===2)Le=_e[0],ze=_e[1];else{Le=[],ze=[];for(var Y=0;Y<_e.length;++Y)Le[Y]=_e[Y][0],ze[Y]=_e[Y][1]}var Xe=[1/0,1/0,1/0],Ve=[-1/0,-1/0,-1/0],rt=ee.glyph,mt=ee.color,_t=ee.size,vt=ee.angle,ut=ee.lineColor,Fe=-1,Pe=0,be=0,Ye=0;if(ce.length){Ye=ce.length;e:for(var Y=0;Y<Ye;++Y){for(var yt=ce[Y],wt=0;wt<3;++wt)if(isNaN(yt[wt])||!isFinite(yt[wt]))continue e;var ht=ie(rt,Y,ue,this.pixelRatio),Yt=ht.mesh,$t=ht.lines,fr=ht.bounds;Pe+=Yt.cells.length*3,be+=$t.edges.length*2}}var mr=Pe+be,Ur=o.mallocFloat(3*mr),jr=o.mallocFloat(4*mr),fn=o.mallocFloat(2*mr),Br=o.mallocUint32(mr);if(mr>0){var Qr=0,Ot=Pe,$e=[0,0,0,1],ot=[0,0,0,1],De=T(mt)&&T(mt[0]),Ee=T(ut)&&T(ut[0]);e:for(var Y=0;Y<Ye;++Y){Fe+=1;for(var yt=ce[Y],wt=0;wt<3;++wt){if(isNaN(yt[wt])||!isFinite(yt[wt]))continue e;Ve[wt]=Math.max(Ve[wt],yt[wt]),Xe[wt]=Math.min(Xe[wt],yt[wt])}var ht=ie(rt,Y,ue,this.pixelRatio),Yt=ht.mesh,$t=ht.lines,fr=ht.bounds,Ae=ht.visible;if(!Ae)$e=[1,1,1,0];else if(T(mt)){var Ie;if(De?Y<mt.length?Ie=mt[Y]:Ie=[0,0,0,0]:Ie=mt,Ie.length===3){for(var wt=0;wt<3;++wt)$e[wt]=Ie[wt];$e[3]=1}else if(Ie.length===4){for(var wt=0;wt<4;++wt)$e[wt]=Ie[wt];!this.hasAlpha&&Ie[3]<1&&(this.hasAlpha=!0)}}else $e[0]=$e[1]=$e[2]=0,$e[3]=1;if(!Ae)ot=[1,1,1,0];else if(T(ut)){var Ie;if(Ee?Y<ut.length?Ie=ut[Y]:Ie=[0,0,0,0]:Ie=ut,Ie.length===3){for(var wt=0;wt<3;++wt)ot[wt]=Ie[wt];ot[wt]=1}else if(Ie.length===4){for(var wt=0;wt<4;++wt)ot[wt]=Ie[wt];!this.hasAlpha&&Ie[3]<1&&(this.hasAlpha=!0)}}else ot[0]=ot[1]=ot[2]=0,ot[3]=1;var tt=.5;Ae?T(_t)?Y<_t.length?tt=+_t[Y]:tt=12:_t?tt=+_t:this.useOrtho&&(tt=12):tt=0;var st=0;T(vt)?Y<vt.length?st=+vt[Y]:st=0:vt&&(st=+vt);for(var Bt=Math.cos(st),Ft=Math.sin(st),yt=ce[Y],wt=0;wt<3;++wt)Ve[wt]=Math.max(Ve[wt],yt[wt]),Xe[wt]=Math.min(Xe[wt],yt[wt]);var Wt=Le,lr=ze,Wt=0;T(Le)?Y<Le.length?Wt=Le[Y]:Wt=0:Le&&(Wt=Le);var lr=0;T(ze)?Y<ze.length?lr=ze[Y]:lr=0:ze&&(lr=ze),Wt*=Wt>0?1-fr[0][0]:Wt<0?1+fr[1][0]:1,lr*=lr>0?1-fr[0][1]:lr<0?1+fr[1][1]:1;for(var Rr=[Wt,lr],ga=Yt.cells||[],ua=Yt.positions||[],wt=0;wt<ga.length;++wt)for(var Mr=ga[wt],Sr=0;Sr<3;++Sr){for(var Kr=0;Kr<3;++Kr)Ur[3*Qr+Kr]=yt[Kr];for(var Kr=0;Kr<4;++Kr)jr[4*Qr+Kr]=$e[Kr];Br[Qr]=Fe;var Hn=ua[Mr[Sr]];fn[2*Qr]=tt*(Bt*Hn[0]-Ft*Hn[1]+Rr[0]),fn[2*Qr+1]=tt*(Ft*Hn[0]+Bt*Hn[1]+Rr[1]),Qr+=1}for(var ga=$t.edges,ua=$t.positions,wt=0;wt<ga.length;++wt)for(var Mr=ga[wt],Sr=0;Sr<2;++Sr){for(var Kr=0;Kr<3;++Kr)Ur[3*Ot+Kr]=yt[Kr];for(var Kr=0;Kr<4;++Kr)jr[4*Ot+Kr]=ot[Kr];Br[Ot]=Fe;var Hn=ua[Mr[Sr]];fn[2*Ot]=tt*(Bt*Hn[0]-Ft*Hn[1]+Rr[0]),fn[2*Ot+1]=tt*(Ft*Hn[0]+Bt*Hn[1]+Rr[1]),Ot+=1}}}this.bounds=[Xe,Ve],this.points=ce,this.pointCount=ce.length,this.vertexCount=Pe,this.lineVertexCount=be,this.pointBuffer.update(Ur),this.colorBuffer.update(jr),this.glyphBuffer.update(fn),this.idBuffer.update(Br),o.free(Ur),o.free(jr),o.free(fn),o.free(Br)},f.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 se(ee){var pe=ee.gl,oe=d.createPerspective(pe),Y=d.createOrtho(pe),ce=d.createProject(pe),ue=d.createPickPerspective(pe),_e=d.createPickOrtho(pe),Le=d.createPickProject(pe),ze=i(pe),Xe=i(pe),Ve=i(pe),rt=i(pe),mt=s(pe,[{buffer:ze,size:3,type:pe.FLOAT},{buffer:Xe,size:4,type:pe.FLOAT},{buffer:Ve,size:2,type:pe.FLOAT},{buffer:rt,size:4,type:pe.UNSIGNED_BYTE,normalized:!0}]),_t=new y(pe,oe,Y,ce,ze,Xe,Ve,rt,mt,ue,_e,Le);return _t.update(ee),_t}}),8489:(function(t){t.exports=r;function r(a,l,i,s){return a[0]=l[0]+i[0]*s,a[1]=l[1]+i[1]*s,a[2]=l[2]+i[2]*s,a}}),8507:(function(t){t.exports=l;var r=Math.min;function a(i,s){return i-s}function l(i,s){var o=i.length,u=i.length-s.length;if(u)return u;switch(o){case 0:return 0;case 1:return i[0]-s[0];case 2:return i[0]+i[1]-s[0]-s[1]||r(i[0],i[1])-r(s[0],s[1]);case 3:var d=i[0]+i[1],h=s[0]+s[1];if(u=d+i[2]-(h+s[2]),u)return u;var g=r(i[0],i[1]),m=r(s[0],s[1]);return r(g,i[2])-r(m,s[2])||r(g+i[2],d)-r(m+s[2],h);case 4:var E=i[0],c=i[1],_=i[2],T=i[3],M=s[0],k=s[1],b=s[2],A=s[3];return E+c+_+T-(M+k+b+A)||r(E,c,_,T)-r(M,k,b,A,M)||r(E+c,E+_,E+T,c+_,c+T,_+T)-r(M+k,M+b,M+A,k+b,k+A,b+A)||r(E+c+_,E+c+T,E+_+T,c+_+T)-r(M+k+b,M+k+A,M+b+A,k+b+A);default:for(var y=i.slice().sort(a),f=s.slice().sort(a),p=0;p<o;++p)if(u=y[p]-f[p],u)return u;return 0}}}),8512:(function(t,r,a){var l=a(665);t.exports=i;function i(s,o,u){typeof s=="function"&&(u=!!o,o=s,s=window);var d=l("ex",s),h=function(g){u&&g.preventDefault();var m=g.deltaX||0,E=g.deltaY||0,c=g.deltaZ||0,_=g.deltaMode,T=1;switch(_){case 1:T=d;break;case 2:T=window.innerHeight;break}if(m*=T,E*=T,c*=T,m||E||c)return o(m,E,c,g)};return s.addEventListener("wheel",h),h}}),8545:(function(t){t.exports=a;function r(l,i){var s=l+i,o=s-l,u=s-o,d=i-o,h=l-u,g=h+d;return g?[g,s]:[s]}function a(l,i){var s=l.length|0,o=i.length|0;if(s===1&&o===1)return r(l[0],-i[0]);var u=s+o,d=new Array(u),h=0,g=0,m=0,E=Math.abs,c=l[g],_=E(c),T=-i[m],M=E(T),k,b;_<M?(b=c,g+=1,g<s&&(c=l[g],_=E(c))):(b=T,m+=1,m<o&&(T=-i[m],M=E(T))),g<s&&_<M||m>=o?(k=c,g+=1,g<s&&(c=l[g],_=E(c))):(k=T,m+=1,m<o&&(T=-i[m],M=E(T)));for(var A=k+b,y=A-k,f=b-y,p=f,x=A,N,D,B,U,V;g<s&&m<o;)_<M?(k=c,g+=1,g<s&&(c=l[g],_=E(c))):(k=T,m+=1,m<o&&(T=-i[m],M=E(T))),b=p,A=k+b,y=A-k,f=b-y,f&&(d[h++]=f),N=x+A,D=N-x,B=N-D,U=A-D,V=x-B,p=V+U,x=N;for(;g<s;)k=c,b=p,A=k+b,y=A-k,f=b-y,f&&(d[h++]=f),N=x+A,D=N-x,B=N-D,U=A-D,V=x-B,p=V+U,x=N,g+=1,g<s&&(c=l[g]);for(;m<o;)k=T,b=p,A=k+b,y=A-k,f=b-y,f&&(d[h++]=f),N=x+A,D=N-x,B=N-D,U=A-D,V=x-B,p=V+U,x=N,m+=1,m<o&&(T=-i[m]);return p&&(d[h++]=p),x&&(d[h++]=x),h||(d[h++]=0),d.length=h,d}}),8572:(function(t){t.exports=function(a){return a<0?-1:a>0?1:0}}),8648:(function(t,r,a){t.exports=a(783)}),8692:(function(t){t.exports=r;function r(a,l,i,s){var o=i[0],u=i[1],d=l[0]-o,h=l[1]-u,g=Math.sin(s),m=Math.cos(s);return a[0]=o+d*m-h*g,a[1]=u+d*g+h*m,a[2]=l[2],a}}),8697:(function(t,r,a){var l=a(869);t.exports=i;function i(s,o){return l(s[0].mul(o[1]),s[1].mul(o[0]))}}),8731:(function(t,r,a){t.exports=h;var l=a(8866);function i(g,m,E,c,_,T){this._gl=g,this._wrapper=m,this._index=E,this._locations=c,this._dimension=_,this._constFunc=T}var s=i.prototype;s.pointer=function(m,E,c,_){var T=this,M=T._gl,k=T._locations[T._index];M.vertexAttribPointer(k,T._dimension,m||M.FLOAT,!!E,c||0,_||0),M.enableVertexAttribArray(k)},s.set=function(g,m,E,c){return this._constFunc(this._locations[this._index],g,m,E,c)},Object.defineProperty(s,"location",{get:function(){return this._locations[this._index]},set:function(g){return g!==this._locations[this._index]&&(this._locations[this._index]=g|0,this._wrapper.program=null),g|0}});var o=[function(g,m,E){return E.length===void 0?g.vertexAttrib1f(m,E):g.vertexAttrib1fv(m,E)},function(g,m,E,c){return E.length===void 0?g.vertexAttrib2f(m,E,c):g.vertexAttrib2fv(m,E)},function(g,m,E,c,_){return E.length===void 0?g.vertexAttrib3f(m,E,c,_):g.vertexAttrib3fv(m,E)},function(g,m,E,c,_,T){return E.length===void 0?g.vertexAttrib4f(m,E,c,_,T):g.vertexAttrib4fv(m,E)}];function u(g,m,E,c,_,T,M){var k=o[_],b=new i(g,m,E,c,_,k);Object.defineProperty(T,M,{set:function(A){return g.disableVertexAttribArray(c[E]),k(g,c[E],A),A},get:function(){return b},enumerable:!0})}function d(g,m,E,c,_,T,M){for(var k=new Array(_),b=new Array(_),A=0;A<_;++A)u(g,m,E[A],c,_,k,A),b[A]=k[A];Object.defineProperty(k,"location",{set:function(p){if(Array.isArray(p))for(var x=0;x<_;++x)b[x].location=p[x];else for(var x=0;x<_;++x)b[x].location=p+x;return p},get:function(){for(var p=new Array(_),x=0;x<_;++x)p[x]=c[E[x]];return p},enumerable:!0}),k.pointer=function(p,x,N,D){p=p||g.FLOAT,x=!!x,N=N||_*_,D=D||0;for(var B=0;B<_;++B){var U=c[E[B]];g.vertexAttribPointer(U,_,p,x,N,D+B*_),g.enableVertexAttribArray(U)}};var y=new Array(_),f=g["vertexAttrib"+_+"fv"];Object.defineProperty(T,M,{set:function(p){for(var x=0;x<_;++x){var N=c[E[x]];if(g.disableVertexAttribArray(N),Array.isArray(p[0]))f.call(g,N,p[x]);else{for(var D=0;D<_;++D)y[D]=p[_*x+D];f.call(g,N,y)}}return p},get:function(){return k},enumerable:!0})}function h(g,m,E,c){for(var _={},T=0,M=E.length;T<M;++T){var k=E[T],b=k.name,A=k.type,y=k.locations;switch(A){case"bool":case"int":case"float":u(g,m,y[0],c,1,_,b);break;default:if(A.indexOf("vec")>=0){var f=A.charCodeAt(A.length-1)-48;if(f<2||f>4)throw new l("","Invalid data type for attribute "+b+": "+A);u(g,m,y[0],c,f,_,b)}else if(A.indexOf("mat")>=0){var f=A.charCodeAt(A.length-1)-48;if(f<2||f>4)throw new l("","Invalid data type for attribute "+b+": "+A);d(g,m,y,c,f,_,b)}else throw new l("","Unknown data type for attribute "+b+": "+A);break}}return _}}),8828:(function(t,r){"use restrict";var a=32;r.INT_BITS=a,r.INT_MAX=2147483647,r.INT_MIN=-1<<a-1,r.sign=function(s){return(s>0)-(s<0)},r.abs=function(s){var o=s>>a-1;return(s^o)-o},r.min=function(s,o){return o^(s^o)&-(s<o)},r.max=function(s,o){return s^(s^o)&-(s<o)},r.isPow2=function(s){return!(s&s-1)&&!!s},r.log2=function(s){var o,u;return o=(s>65535)<<4,s>>>=o,u=(s>255)<<3,s>>>=u,o|=u,u=(s>15)<<2,s>>>=u,o|=u,u=(s>3)<<1,s>>>=u,o|=u,o|s>>1},r.log10=function(s){return s>=1e9?9:s>=1e8?8:s>=1e7?7:s>=1e6?6:s>=1e5?5:s>=1e4?4:s>=1e3?3:s>=100?2:s>=10?1:0},r.popCount=function(s){return s=s-(s>>>1&1431655765),s=(s&858993459)+(s>>>2&858993459),(s+(s>>>4)&252645135)*16843009>>>24};function l(s){var o=32;return s&=-s,s&&o--,s&65535&&(o-=16),s&16711935&&(o-=8),s&252645135&&(o-=4),s&858993459&&(o-=2),s&1431655765&&(o-=1),o}r.countTrailingZeros=l,r.nextPow2=function(s){return s+=s===0,--s,s|=s>>>1,s|=s>>>2,s|=s>>>4,s|=s>>>8,s|=s>>>16,s+1},r.prevPow2=function(s){return s|=s>>>1,s|=s>>>2,s|=s>>>4,s|=s>>>8,s|=s>>>16,s-(s>>>1)},r.parity=function(s){return s^=s>>>16,s^=s>>>8,s^=s>>>4,s&=15,27030>>>s&1};var i=new Array(256);(function(s){for(var o=0;o<256;++o){var u=o,d=o,h=7;for(u>>>=1;u;u>>>=1)d<<=1,d|=u&1,--h;s[o]=d<<h&255}})(i),r.reverse=function(s){return i[s&255]<<24|i[s>>>8&255]<<16|i[s>>>16&255]<<8|i[s>>>24&255]},r.interleave2=function(s,o){return s&=65535,s=(s|s<<8)&16711935,s=(s|s<<4)&252645135,s=(s|s<<2)&858993459,s=(s|s<<1)&1431655765,o&=65535,o=(o|o<<8)&16711935,o=(o|o<<4)&252645135,o=(o|o<<2)&858993459,o=(o|o<<1)&1431655765,s|o<<1},r.deinterleave2=function(s,o){return s=s>>>o&1431655765,s=(s|s>>>1)&858993459,s=(s|s>>>2)&252645135,s=(s|s>>>4)&16711935,s=(s|s>>>16)&65535,s<<16>>16},r.interleave3=function(s,o,u){return s&=1023,s=(s|s<<16)&4278190335,s=(s|s<<8)&251719695,s=(s|s<<4)&3272356035,s=(s|s<<2)&1227133513,o&=1023,o=(o|o<<16)&4278190335,o=(o|o<<8)&251719695,o=(o|o<<4)&3272356035,o=(o|o<<2)&1227133513,s|=o<<1,u&=1023,u=(u|u<<16)&4278190335,u=(u|u<<8)&251719695,u=(u|u<<4)&3272356035,u=(u|u<<2)&1227133513,s|u<<2},r.deinterleave3=function(s,o){return s=s>>>o&1227133513,s=(s|s>>>2)&3272356035,s=(s|s>>>4)&251719695,s=(s|s>>>8)&4278190335,s=(s|s>>>16)&1023,s<<22>>22},r.nextCombination=function(s){var o=s|s-1;return o+1|(~o&-~o)-1>>>l(s)+1}}),8866:(function(t){function r(a,l,i){this.shortMessage=l||"",this.longMessage=i||"",this.rawError=a||"",this.message="gl-shader: "+(l||a||"")+(i?`
`+i:""),this.stack=new Error().stack}r.prototype=new Error,r.prototype.name="GLError",r.prototype.constructor=r,t.exports=r}),8902:(function(t,r,a){var l=a(2478),i=a(3250)[3],s=0,o=1,u=2;t.exports=M;function d(k,b,A,y,f){this.a=k,this.b=b,this.idx=A,this.lowerIds=y,this.upperIds=f}function h(k,b,A,y){this.a=k,this.b=b,this.type=A,this.idx=y}function g(k,b){var A=k.a[0]-b.a[0]||k.a[1]-b.a[1]||k.type-b.type;return A||k.type!==s&&(A=i(k.a,k.b,b.b),A)?A:k.idx-b.idx}function m(k,b){return i(k.a,k.b,b)}function E(k,b,A,y,f){for(var p=l.lt(b,y,m),x=l.gt(b,y,m),N=p;N<x;++N){for(var D=b[N],B=D.lowerIds,V=B.length;V>1&&i(A[B[V-2]],A[B[V-1]],y)>0;)k.push([B[V-1],B[V-2],f]),V-=1;B.length=V,B.push(f);for(var U=D.upperIds,V=U.length;V>1&&i(A[U[V-2]],A[U[V-1]],y)<0;)k.push([U[V-2],U[V-1],f]),V-=1;U.length=V,U.push(f)}}function c(k,b){var A;return k.a[0]<b.a[0]?A=i(k.a,k.b,b.a):A=i(b.b,b.a,k.a),A||(b.b[0]<k.b[0]?A=i(k.a,k.b,b.b):A=i(b.b,b.a,k.b),A||k.idx-b.idx)}function _(k,b,A){var y=l.le(k,A,c),f=k[y],p=f.upperIds,x=p[p.length-1];f.upperIds=[x],k.splice(y+1,0,new d(A.a,A.b,A.idx,[x],p))}function T(k,b,A){var y=A.a;A.a=A.b,A.b=y;var f=l.eq(k,A,c),p=k[f],x=k[f-1];x.upperIds=p.upperIds,k.splice(f,1)}function M(k,b){for(var A=k.length,y=b.length,f=[],p=0;p<A;++p)f.push(new h(k[p],null,s,p));for(var p=0;p<y;++p){var x=b[p],N=k[x[0]],D=k[x[1]];N[0]<D[0]?f.push(new h(N,D,u,p),new h(D,N,o,p)):N[0]>D[0]&&f.push(new h(D,N,u,p),new h(N,D,o,p))}f.sort(g);for(var B=f[0].a[0]-(1+Math.abs(f[0].a[0]))*Math.pow(2,-52),U=[new d([B,1],[B,0],-1,[],[])],V=[],p=0,q=f.length;p<q;++p){var z=f[p],H=z.type;H===s?E(V,U,k,z.a,z.idx):H===u?_(U,k,z):T(U,k,z)}return V}}),8954:(function(t,r,a){t.exports=c;var l=a(3250),i=a(6803).Fw;function s(_,T,M){this.vertices=_,this.adjacent=T,this.boundary=M,this.lastVisited=-1}s.prototype.flip=function(){var _=this.vertices[0];this.vertices[0]=this.vertices[1],this.vertices[1]=_;var T=this.adjacent[0];this.adjacent[0]=this.adjacent[1],this.adjacent[1]=T};function o(_,T,M){this.vertices=_,this.cell=T,this.index=M}function u(_,T){return i(_.vertices,T.vertices)}function d(_){return function(){var T=this.tuple;return _.apply(this,T)}}function h(_){var T=l[_+1];return T||(T=l),d(T)}var g=[];function m(_,T,M){this.dimension=_,this.vertices=T,this.simplices=M,this.interior=M.filter(function(A){return!A.boundary}),this.tuple=new Array(_+1);for(var k=0;k<=_;++k)this.tuple[k]=this.vertices[k];var b=g[_];b||(b=g[_]=h(_)),this.orient=b}var E=m.prototype;E.handleBoundaryDegeneracy=function(_,T){var M=this.dimension,k=this.vertices.length-1,b=this.tuple,A=this.vertices,y=[_];for(_.lastVisited=-k;y.length>0;){_=y.pop();for(var f=_.adjacent,p=0;p<=M;++p){var x=f[p];if(!(!x.boundary||x.lastVisited<=-k)){for(var N=x.vertices,D=0;D<=M;++D){var B=N[D];B<0?b[D]=T:b[D]=A[B]}var U=this.orient();if(U>0)return x;x.lastVisited=-k,U===0&&y.push(x)}}}return null},E.walk=function(_,T){var M=this.vertices.length-1,k=this.dimension,b=this.vertices,A=this.tuple,y=T?this.interior.length*Math.random()|0:this.interior.length-1,f=this.interior[y];e:for(;!f.boundary;){for(var p=f.vertices,x=f.adjacent,N=0;N<=k;++N)A[N]=b[p[N]];f.lastVisited=M;for(var N=0;N<=k;++N){var D=x[N];if(!(D.lastVisited>=M)){var B=A[N];A[N]=_;var U=this.orient();if(A[N]=B,U<0){f=D;continue e}else D.boundary?D.lastVisited=-M:D.lastVisited=M}}return}return f},E.addPeaks=function(_,T){var M=this.vertices.length-1,k=this.dimension,b=this.vertices,A=this.tuple,y=this.interior,f=this.simplices,p=[T];T.lastVisited=M,T.vertices[T.vertices.indexOf(-1)]=M,T.boundary=!1,y.push(T);for(var x=[];p.length>0;){var T=p.pop(),N=T.vertices,D=T.adjacent,B=N.indexOf(M);if(!(B<0)){for(var U=0;U<=k;++U)if(U!==B){var V=D[U];if(!(!V.boundary||V.lastVisited>=M)){var q=V.vertices;if(V.lastVisited!==-M){for(var z=0,H=0;H<=k;++H)q[H]<0?(z=H,A[H]=_):A[H]=b[q[H]];var G=this.orient();if(G>0){q[z]=M,V.boundary=!1,y.push(V),p.push(V),V.lastVisited=M;continue}else V.lastVisited=-M}var J=V.adjacent,le=N.slice(),ge=D.slice(),de=new s(le,ge,!0);f.push(de);var me=J.indexOf(T);if(!(me<0)){J[me]=de,ge[B]=V,le[U]=-1,ge[U]=T,D[U]=de,de.flip();for(var H=0;H<=k;++H){var W=le[H];if(!(W<0||W===M)){for(var ie=new Array(k-1),se=0,ee=0;ee<=k;++ee){var pe=le[ee];pe<0||ee===H||(ie[se++]=pe)}x.push(new o(ie,de,H))}}}}}}}x.sort(u);for(var U=0;U+1<x.length;U+=2){var oe=x[U],Y=x[U+1],ce=oe.index,ue=Y.index;ce<0||ue<0||(oe.cell.adjacent[oe.index]=Y.cell,Y.cell.adjacent[Y.index]=oe.cell)}},E.insert=function(_,T){var M=this.vertices;M.push(_);var k=this.walk(_,T);if(k){for(var b=this.dimension,A=this.tuple,y=0;y<=b;++y){var f=k.vertices[y];f<0?A[y]=_:A[y]=M[f]}var p=this.orient(A);p<0||p===0&&(k=this.handleBoundaryDegeneracy(k,_),!k)||this.addPeaks(_,k)}},E.boundary=function(){for(var _=this.dimension,T=[],M=this.simplices,k=M.length,b=0;b<k;++b){var A=M[b];if(A.boundary){for(var y=new Array(_),f=A.vertices,p=0,x=0,N=0;N<=_;++N)f[N]>=0?y[p++]=f[N]:x=N&1;if(x===(_&1)){var D=y[0];y[0]=y[1],y[1]=D}T.push(y)}}return T};function c(_,T){var M=_.length;if(M===0)throw new Error("Must have at least d+1 points");var k=_[0].length;if(M<=k)throw new Error("Must input at least d+1 points");var b=_.slice(0,k+1),A=l.apply(void 0,b);if(A===0)throw new Error("Input not in general position");for(var y=new Array(k+1),f=0;f<=k;++f)y[f]=f;A<0&&(y[0]=1,y[1]=0);for(var p=new s(y,new Array(k+1),!1),x=p.adjacent,N=new Array(k+2),f=0;f<=k;++f){for(var D=y.slice(),B=0;B<=k;++B)B===f&&(D[B]=-1);var U=D[0];D[0]=D[1],D[1]=U;var V=new s(D,new Array(k+1),!0);x[f]=V,N[f]=V}N[k+1]=p;for(var f=0;f<=k;++f)for(var D=x[f].vertices,q=x[f].adjacent,B=0;B<=k;++B){var z=D[B];if(z<0){q[B]=p;continue}for(var H=0;H<=k;++H)x[H].vertices.indexOf(z)<0&&(q[B]=x[H])}for(var G=new m(k,b,N),J=!!T,f=k+1;f<M;++f)G.insert(_[f],J);return G.boundary()}}),8987:(function(t,r,a){var l=a(7842),i=a(6504);t.exports=s;function s(o,u){for(var d=l(u),h=o.length,g=new Array(h),m=0;m<h;++m)g[m]=i(o[m],d);return g}}),9060:(function(t,r,a){var l=a(9405),i=a(2762),s=a(8116),o=a(7766),u=a(6760),d=a(7608),h=a(9618),g=a(6729),m=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function E(A,y,f,p,x,N,D,B,U,V,q){this.gl=A,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=y,this.dirty=!0,this.triShader=f,this.pickShader=p,this.trianglePositions=x,this.triangleVectors=N,this.triangleColors=B,this.triangleUVs=U,this.triangleIds=D,this.triangleVAO=V,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=q,this.tubeScale=1,this.coneScale=2,this.vectorScale=1,this.coneOffset=.25,this._model=m,this._view=m,this._projection=m,this._resolution=[1,1]}var c=E.prototype;c.isOpaque=function(){return this.opacity>=1},c.isTransparent=function(){return this.opacity<1},c.pickSlots=1,c.setPickBase=function(A){this.pickId=A};function _(A){for(var y=g({colormap:A,nshades:256,format:"rgba"}),f=new Uint8Array(256*4),p=0;p<256;++p){for(var x=y[p],N=0;N<3;++N)f[4*p+N]=x[N];f[4*p+3]=x[3]*255}return h(f,[256,256,4],[4,0,1])}function T(A){for(var y=A.length,f=new Array(y),p=0;p<y;++p)f[p]=A[p][2];return f}c.update=function(A){A=A||{};var y=this.gl;this.dirty=!0,"lightPosition"in A&&(this.lightPosition=A.lightPosition),"opacity"in A&&(this.opacity=A.opacity),"ambient"in A&&(this.ambientLight=A.ambient),"diffuse"in A&&(this.diffuseLight=A.diffuse),"specular"in A&&(this.specularLight=A.specular),"roughness"in A&&(this.roughness=A.roughness),"fresnel"in A&&(this.fresnel=A.fresnel),A.tubeScale!==void 0&&(this.tubeScale=A.tubeScale),A.vectorScale!==void 0&&(this.vectorScale=A.vectorScale),A.coneScale!==void 0&&(this.coneScale=A.coneScale),A.coneOffset!==void 0&&(this.coneOffset=A.coneOffset),A.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=y.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=y.LINEAR,this.texture.setPixels(_(A.colormap)),this.texture.generateMipmap());var f=A.cells,p=A.positions,x=A.vectors;if(!(!p||!f||!x)){var N=[],D=[],B=[],U=[],V=[];this.cells=f,this.positions=p,this.vectors=x;var q=A.meshColor||[1,1,1,1],z=A.vertexIntensity,H=1/0,G=-1/0;if(z)if(A.vertexIntensityBounds)H=+A.vertexIntensityBounds[0],G=+A.vertexIntensityBounds[1];else for(var J=0;J<z.length;++J){var le=z[J];H=Math.min(H,le),G=Math.max(G,le)}else for(var J=0;J<p.length;++J){var le=p[J][2];H=Math.min(H,le),G=Math.max(G,le)}z?this.intensity=z:this.intensity=T(p),this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(var J=0;J<p.length;++J)for(var ge=p[J],de=0;de<3;++de)isNaN(ge[de])||!isFinite(ge[de])||(this.bounds[0][de]=Math.min(this.bounds[0][de],ge[de]),this.bounds[1][de]=Math.max(this.bounds[1][de],ge[de]));var me=0;e:for(var J=0;J<f.length;++J){var W=f[J];switch(W.length){case 3:for(var de=0;de<3;++de)for(var ie=W[de],ge=p[ie],se=0;se<3;++se)if(isNaN(ge[se])||!isFinite(ge[se]))continue e;for(var de=0;de<3;++de){var ie=W[2-de],ge=p[ie];N.push(ge[0],ge[1],ge[2],ge[3]);var ee=x[ie];D.push(ee[0],ee[1],ee[2],ee[3]||0);var pe=q;pe.length===3?B.push(pe[0],pe[1],pe[2],1):B.push(pe[0],pe[1],pe[2],pe[3]);var oe;z?oe=[(z[ie]-H)/(G-H),0]:oe=[(ge[2]-H)/(G-H),0],U.push(oe[0],oe[1]),V.push(J)}me+=1;break}}this.triangleCount=me,this.trianglePositions.update(N),this.triangleVectors.update(D),this.triangleColors.update(B),this.triangleUVs.update(U),this.triangleIds.update(new Uint32Array(V))}},c.drawTransparent=c.draw=function(A){A=A||{};for(var y=this.gl,f=A.model||m,p=A.view||m,x=A.projection||m,N=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],D=0;D<3;++D)N[0][D]=Math.max(N[0][D],this.clipBounds[0][D]),N[1][D]=Math.min(N[1][D],this.clipBounds[1][D]);var B={model:f,view:p,projection:x,inverseModel:m.slice(),clipBounds:N,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=d(B.inverseModel,B.model),y.disable(y.CULL_FACE),this.texture.bind(0);var U=new Array(16);u(U,B.view,B.model),u(U,B.projection,U),d(U,U);for(var D=0;D<3;++D)B.eyePosition[D]=U[12+D]/U[15];for(var V=U[15],D=0;D<3;++D)V+=this.lightPosition[D]*U[4*D+3];for(var D=0;D<3;++D){for(var q=U[12+D],z=0;z<3;++z)q+=U[4*z+D]*this.lightPosition[z];B.lightPosition[D]=q/V}if(this.triangleCount>0){var H=this.triShader;H.bind(),H.uniforms=B,this.triangleVAO.bind(),y.drawArrays(y.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}},c.drawPick=function(A){A=A||{};for(var y=this.gl,f=A.model||m,p=A.view||m,x=A.projection||m,N=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],D=0;D<3;++D)N[0][D]=Math.max(N[0][D],this.clipBounds[0][D]),N[1][D]=Math.min(N[1][D],this.clipBounds[1][D]);this._model=[].slice.call(f),this._view=[].slice.call(p),this._projection=[].slice.call(x),this._resolution=[y.drawingBufferWidth,y.drawingBufferHeight];var B={model:f,view:p,projection:x,clipBounds:N,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},U=this.pickShader;U.bind(),U.uniforms=B,this.triangleCount>0&&(this.triangleVAO.bind(),y.drawArrays(y.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind())},c.pick=function(A){if(!A||A.id!==this.pickId)return null;var y=A.value[0]+256*A.value[1]+65536*A.value[2],f=this.cells[y],p=this.positions[f[1]].slice(0,3),x={position:p,dataCoordinate:p,index:Math.floor(f[1]/48)};return this.traceType==="cone"?x.index=Math.floor(f[1]/48):this.traceType==="streamtube"&&(x.intensity=this.intensity[f[1]],x.velocity=this.vectors[f[1]].slice(0,3),x.divergence=this.vectors[f[1]][3],x.index=y),x},c.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 M(A,y){var f=l(A,y.meshShader.vertex,y.meshShader.fragment,null,y.meshShader.attributes);return f.attributes.position.location=0,f.attributes.color.location=2,f.attributes.uv.location=3,f.attributes.vector.location=4,f}function k(A,y){var f=l(A,y.pickShader.vertex,y.pickShader.fragment,null,y.pickShader.attributes);return f.attributes.position.location=0,f.attributes.id.location=1,f.attributes.vector.location=4,f}function b(A,y,f){var p=f.shaders;arguments.length===1&&(y=A,A=y.gl);var x=M(A,p),N=k(A,p),D=o(A,h(new Uint8Array([255,255,255,255]),[1,1,4]));D.generateMipmap(),D.minFilter=A.LINEAR_MIPMAP_LINEAR,D.magFilter=A.LINEAR;var B=i(A),U=i(A),V=i(A),q=i(A),z=i(A),H=s(A,[{buffer:B,type:A.FLOAT,size:4},{buffer:z,type:A.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:V,type:A.FLOAT,size:4},{buffer:q,type:A.FLOAT,size:2},{buffer:U,type:A.FLOAT,size:4}]),G=new E(A,D,x,N,B,U,z,V,q,H,f.traceType||"cone");return G.update(y),G}t.exports=b}),9127:(function(t,r,a){t.exports=s;var l=a(6204),i=a(5771);function s(o){return i(l(o))}}),9131:(function(t,r,a){var l=a(5177),i=a(9288);t.exports=s;function s(o,u){return u=u||1,o[0]=Math.random(),o[1]=Math.random(),o[2]=Math.random(),o[3]=Math.random(),l(o,o),i(o,o,u),o}}),9165:(function(t,r,a){t.exports=E;var l=a(2762),i=a(8116),s=a(3436),o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function u(c,_,T,M){this.gl=c,this.shader=M,this.buffer=_,this.vao=T,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 d=u.prototype;d.isOpaque=function(){return!this.hasAlpha},d.isTransparent=function(){return this.hasAlpha},d.drawTransparent=d.draw=function(c){var _=this.gl,T=this.shader.uniforms;this.shader.bind();var M=T.view=c.view||o,k=T.projection=c.projection||o;T.model=c.model||o,T.clipBounds=this.clipBounds,T.opacity=this.opacity;var b=M[12],A=M[13],y=M[14],f=M[15],p=c._ortho||!1,x=p?2:1,N=x*this.pixelRatio*(k[3]*b+k[7]*A+k[11]*y+k[15]*f)/_.drawingBufferHeight;this.vao.bind();for(var D=0;D<3;++D)_.lineWidth(this.lineWidth[D]*this.pixelRatio),T.capSize=this.capSize[D]*N,this.lineCount[D]&&_.drawArrays(_.LINES,this.lineOffset[D],this.lineCount[D]);this.vao.unbind()};function h(c,_){for(var T=0;T<3;++T)c[0][T]=Math.min(c[0][T],_[T]),c[1][T]=Math.max(c[1][T],_[T])}var g=(function(){for(var c=new Array(3),_=0;_<3;++_){for(var T=[],M=1;M<=2;++M)for(var k=-1;k<=1;k+=2){var b=(M+_)%3,A=[0,0,0];A[b]=k,T.push(A)}c[_]=T}return c})();function m(c,_,T,M){for(var k=g[M],b=0;b<k.length;++b){var A=k[b];c.push(_[0],_[1],_[2],T[0],T[1],T[2],T[3],A[0],A[1],A[2])}return k.length}d.update=function(c){c=c||{},"lineWidth"in c&&(this.lineWidth=c.lineWidth,Array.isArray(this.lineWidth)||(this.lineWidth=[this.lineWidth,this.lineWidth,this.lineWidth])),"capSize"in c&&(this.capSize=c.capSize,Array.isArray(this.capSize)||(this.capSize=[this.capSize,this.capSize,this.capSize])),this.hasAlpha=!1,"opacity"in c&&(this.opacity=+c.opacity,this.opacity<1&&(this.hasAlpha=!0));var _=c.color||[[0,0,0],[0,0,0],[0,0,0]],T=c.position,M=c.error;if(Array.isArray(_[0])||(_=[_,_,_]),T&&M){var k=[],b=T.length,A=0;this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.lineCount=[0,0,0];for(var y=0;y<3;++y){this.lineOffset[y]=A;e:for(var f=0;f<b;++f){for(var p=T[f],x=0;x<3;++x)if(isNaN(p[x])||!isFinite(p[x]))continue e;var N=M[f],D=_[y];if(Array.isArray(D[0])&&(D=_[f]),D.length===3?D=[D[0],D[1],D[2],1]:D.length===4&&(D=[D[0],D[1],D[2],D[3]],!this.hasAlpha&&D[3]<1&&(this.hasAlpha=!0)),!(isNaN(N[0][y])||isNaN(N[1][y]))){if(N[0][y]<0){var B=p.slice();B[y]+=N[0][y],k.push(p[0],p[1],p[2],D[0],D[1],D[2],D[3],0,0,0,B[0],B[1],B[2],D[0],D[1],D[2],D[3],0,0,0),h(this.bounds,B),A+=2+m(k,B,D,y)}if(N[1][y]>0){var B=p.slice();B[y]+=N[1][y],k.push(p[0],p[1],p[2],D[0],D[1],D[2],D[3],0,0,0,B[0],B[1],B[2],D[0],D[1],D[2],D[3],0,0,0),h(this.bounds,B),A+=2+m(k,B,D,y)}}}this.lineCount[y]=A-this.lineOffset[y]}this.buffer.update(k)}},d.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()};function E(c){var _=c.gl,T=l(_),M=i(_,[{buffer:T,type:_.FLOAT,size:3,offset:0,stride:40},{buffer:T,type:_.FLOAT,size:4,offset:12,stride:40},{buffer:T,type:_.FLOAT,size:3,offset:28,stride:40}]),k=s(_);k.attributes.position.location=0,k.attributes.color.location=1,k.attributes.offset.location=2;var b=new u(_,T,M,k);return b.update(c),b}}),9215:(function(t,r,a){t.exports=h;var l=a(4769),i=a(2478);function s(g,m,E){return Math.min(m,Math.max(g,E))}function o(g,m,E){this.dimension=g.length,this.bounds=[new Array(this.dimension),new Array(this.dimension)];for(var c=0;c<this.dimension;++c)this.bounds[0][c]=-1/0,this.bounds[1][c]=1/0;this._state=g.slice().reverse(),this._velocity=m.slice().reverse(),this._time=[E],this._scratch=[g.slice(),g.slice(),g.slice(),g.slice(),g.slice()]}var u=o.prototype;u.flush=function(g){var m=i.gt(this._time,g)-1;m<=0||(this._time.splice(0,m),this._state.splice(0,m*this.dimension),this._velocity.splice(0,m*this.dimension))},u.curve=function(g){var m=this._time,E=m.length,c=i.le(m,g),_=this._scratch[0],T=this._state,M=this._velocity,k=this.dimension,b=this.bounds;if(c<0)for(var A=k-1,y=0;y<k;++y,--A)_[y]=T[A];else if(c>=E-1)for(var A=T.length-1,f=g-m[E-1],y=0;y<k;++y,--A)_[y]=T[A]+f*M[A];else{for(var A=k*(c+1)-1,p=m[c],x=m[c+1],N=x-p||1,D=this._scratch[1],B=this._scratch[2],U=this._scratch[3],V=this._scratch[4],q=!0,y=0;y<k;++y,--A)D[y]=T[A],U[y]=M[A]*N,B[y]=T[A+k],V[y]=M[A+k]*N,q=q&&D[y]===B[y]&&U[y]===V[y]&&U[y]===0;if(q)for(var y=0;y<k;++y)_[y]=D[y];else l(D,U,B,V,(g-p)/N,_)}for(var z=b[0],H=b[1],y=0;y<k;++y)_[y]=s(z[y],H[y],_[y]);return _},u.dcurve=function(g){var m=this._time,E=m.length,c=i.le(m,g),_=this._scratch[0],T=this._state,M=this._velocity,k=this.dimension;if(c>=E-1){var b=T.length-1;g-m[E-1];for(var A=0;A<k;++A,--b)_[A]=M[b]}else{for(var b=k*(c+1)-1,y=m[c],f=m[c+1],p=f-y||1,x=this._scratch[1],N=this._scratch[2],D=this._scratch[3],B=this._scratch[4],U=!0,A=0;A<k;++A,--b)x[A]=T[b],D[A]=M[b]*p,N[A]=T[b+k],B[A]=M[b+k]*p,U=U&&x[A]===N[A]&&D[A]===B[A]&&D[A]===0;if(U)for(var A=0;A<k;++A)_[A]=0;else{l.derivative(x,D,N,B,(g-y)/p,_);for(var A=0;A<k;++A)_[A]/=p}}return _},u.lastT=function(){var g=this._time;return g[g.length-1]},u.stable=function(){for(var g=this._velocity,m=g.length,E=this.dimension-1;E>=0;--E)if(g[--m])return!1;return!0},u.jump=function(g){var m=this.lastT(),E=this.dimension;if(!(g<m||arguments.length!==E+1)){var c=this._state,_=this._velocity,T=c.length-this.dimension,M=this.bounds,k=M[0],b=M[1];this._time.push(m,g);for(var A=0;A<2;++A)for(var y=0;y<E;++y)c.push(c[T++]),_.push(0);this._time.push(g);for(var y=E;y>0;--y)c.push(s(k[y-1],b[y-1],arguments[y])),_.push(0)}},u.push=function(g){var m=this.lastT(),E=this.dimension;if(!(g<m||arguments.length!==E+1)){var c=this._state,_=this._velocity,T=c.length-this.dimension,M=g-m,k=this.bounds,b=k[0],A=k[1],y=M>1e-6?1/M:0;this._time.push(g);for(var f=E;f>0;--f){var p=s(b[f-1],A[f-1],arguments[f]);c.push(p),_.push((p-c[T++])*y)}}},u.set=function(g){var m=this.dimension;if(!(g<this.lastT()||arguments.length!==m+1)){var E=this._state,c=this._velocity,_=this.bounds,T=_[0],M=_[1];this._time.push(g);for(var k=m;k>0;--k)E.push(s(T[k-1],M[k-1],arguments[k])),c.push(0)}},u.move=function(g){var m=this.lastT(),E=this.dimension;if(!(g<=m||arguments.length!==E+1)){var c=this._state,_=this._velocity,T=c.length-this.dimension,M=this.bounds,k=M[0],b=M[1],A=g-m,y=A>1e-6?1/A:0;this._time.push(g);for(var f=E;f>0;--f){var p=arguments[f];c.push(s(k[f-1],b[f-1],c[T++]+p)),_.push(p*y)}}},u.idle=function(g){var m=this.lastT();if(!(g<m)){var E=this.dimension,c=this._state,_=this._velocity,T=c.length-E,M=this.bounds,k=M[0],b=M[1],A=g-m;this._time.push(g);for(var y=E-1;y>=0;--y)c.push(s(k[y],b[y],c[T]+A*_[T])),_.push(0),T+=1}};function d(g){for(var m=new Array(g),E=0;E<g;++E)m[E]=0;return m}function h(g,m,E){switch(arguments.length){case 0:return new o([0],[0],0);case 1:if(typeof g=="number"){var c=d(g);return new o(c,c,0)}else return new o(g,d(g.length),0);case 2:if(typeof m=="number"){var c=d(g.length);return new o(g,c,+m)}else E=0;case 3:if(g.length!==m.length)throw new Error("state and velocity lengths must match");return new o(g,m,E)}}}),9216:(function(t){t.exports=i,t.exports.isMobile=i,t.exports.default=i;var r=/(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,a=/CrOS/,l=/android|ipad|playbook|silk/i;function i(s){s||(s={});var o=s.ua;if(!o&&typeof navigator<"u"&&(o=navigator.userAgent),o&&o.headers&&typeof o.headers["user-agent"]=="string"&&(o=o.headers["user-agent"]),typeof o!="string")return!1;var u=r.test(o)&&!a.test(o)||!!s.tablet&&l.test(o);return!u&&s.tablet&&s.featureDetect&&navigator&&navigator.maxTouchPoints>1&&o.indexOf("Macintosh")!==-1&&o.indexOf("Safari")!==-1&&(u=!0),u}}),9226:(function(t){t.exports=r;function r(a,l){return a[0]=Math.ceil(l[0]),a[1]=Math.ceil(l[1]),a[2]=Math.ceil(l[2]),a}}),9265:(function(t){t.exports=r;function r(a,l){return a[0]===l[0]&&a[1]===l[1]&&a[2]===l[2]}}),9288:(function(t){t.exports=r;function r(a,l,i){return a[0]=l[0]*i,a[1]=l[1]*i,a[2]=l[2]*i,a[3]=l[3]*i,a}}),9346:(function(t){var r=new Float64Array(4),a=new Float64Array(4),l=new Float64Array(4);function i(s,o,u,d,h){r.length<d.length&&(r=new Float64Array(d.length),a=new Float64Array(d.length),l=new Float64Array(d.length));for(var g=0;g<d.length;++g)r[g]=s[g]-d[g],a[g]=o[g]-s[g],l[g]=u[g]-s[g];for(var m=0,E=0,c=0,_=0,T=0,M=0,g=0;g<d.length;++g){var k=a[g],b=l[g],A=r[g];m+=k*k,E+=k*b,c+=b*b,_+=A*k,T+=A*b,M+=A*A}var y=Math.abs(m*c-E*E),f=E*T-c*_,p=E*_-m*T,x;if(f+p<=y)if(f<0)p<0&&_<0?(p=0,-_>=m?(f=1,x=m+2*_+M):(f=-_/m,x=_*f+M)):(f=0,T>=0?(p=0,x=M):-T>=c?(p=1,x=c+2*T+M):(p=-T/c,x=T*p+M));else if(p<0)p=0,_>=0?(f=0,x=M):-_>=m?(f=1,x=m+2*_+M):(f=-_/m,x=_*f+M);else{var N=1/y;f*=N,p*=N,x=f*(m*f+E*p+2*_)+p*(E*f+c*p+2*T)+M}else{var D,B,U,V;f<0?(D=E+_,B=c+T,B>D?(U=B-D,V=m-2*E+c,U>=V?(f=1,p=0,x=m+2*_+M):(f=U/V,p=1-f,x=f*(m*f+E*p+2*_)+p*(E*f+c*p+2*T)+M)):(f=0,B<=0?(p=1,x=c+2*T+M):T>=0?(p=0,x=M):(p=-T/c,x=T*p+M))):p<0?(D=E+T,B=m+_,B>D?(U=B-D,V=m-2*E+c,U>=V?(p=1,f=0,x=c+2*T+M):(p=U/V,f=1-p,x=f*(m*f+E*p+2*_)+p*(E*f+c*p+2*T)+M)):(p=0,B<=0?(f=1,x=m+2*_+M):_>=0?(f=0,x=M):(f=-_/m,x=_*f+M))):(U=c+T-E-_,U<=0?(f=0,p=1,x=c+2*T+M):(V=m-2*E+c,U>=V?(f=1,p=0,x=m+2*_+M):(f=U/V,p=1-f,x=f*(m*f+E*p+2*_)+p*(E*f+c*p+2*T)+M)))}for(var q=1-f-p,g=0;g<d.length;++g)h[g]=q*s[g]+f*o[g]+p*u[g];return x<0?0:x}t.exports=i}),9362:(function(t){t.exports=r;function r(a,l,i){var s=a+l,o=s-a,u=s-o,d=l-o,h=a-u;return i?(i[0]=h+d,i[1]=s,i):[h+d,s]}}),9366:(function(t,r,a){var l=a(4359);t.exports=s;var i={};function s(o,u,d){var h=[u.style,u.weight,u.variant,u.family].join("_"),g=i[h];if(g||(g=i[h]={}),o in g)return g[o];var m={textAlign:"center",textBaseline:"middle",lineHeight:1,font:u.family,fontStyle:u.style,fontWeight:u.weight,fontVariant:u.variant,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}};m.triangles=!0;var E=l(o,m);m.triangles=!1;var c=l(o,m),_,T;if(d&&d!==1){for(_=0;_<E.positions.length;++_)for(T=0;T<E.positions[_].length;++T)E.positions[_][T]/=d;for(_=0;_<c.positions.length;++_)for(T=0;T<c.positions[_].length;++T)c.positions[_][T]/=d}var M=[[1/0,1/0],[-1/0,-1/0]],k=c.positions.length;for(_=0;_<k;++_){var b=c.positions[_];for(T=0;T<2;++T)M[0][T]=Math.min(M[0][T],b[T]),M[1][T]=Math.max(M[1][T],b[T])}return g[o]=[E,c,M]}}),9405:(function(t,r,a){var l=a(3327),i=a(8731),s=a(216),o=a(5091),u=a(2145),d=a(8866);function h(c){this.gl=c,this.gl.lastAttribCount=0,this._vref=this._fref=this._relink=this.vertShader=this.fragShader=this.program=this.attributes=this.uniforms=this.types=null}var g=h.prototype;g.bind=function(){this.program||this._relink();var c,_=this.gl.getProgramParameter(this.program,this.gl.ACTIVE_ATTRIBUTES),T=this.gl.lastAttribCount;if(_>T)for(c=T;c<_;c++)this.gl.enableVertexAttribArray(c);else if(T>_)for(c=_;c<T;c++)this.gl.disableVertexAttribArray(c);this.gl.lastAttribCount=_,this.gl.useProgram(this.program)},g.dispose=function(){for(var c=this.gl.lastAttribCount,_=0;_<c;_++)this.gl.disableVertexAttribArray(_);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 m(c,_){return c.name<_.name?-1:1}g.update=function(c,_,T,M){if(!_||arguments.length===1){var k=c;c=k.vertex,_=k.fragment,T=k.uniforms,M=k.attributes}var b=this,A=b.gl,y=b._vref;b._vref=o.shader(A,A.VERTEX_SHADER,c),y&&y.dispose(),b.vertShader=b._vref.shader;var f=this._fref;if(b._fref=o.shader(A,A.FRAGMENT_SHADER,_),f&&f.dispose(),b.fragShader=b._fref.shader,!T||!M){var p=A.createProgram();if(A.attachShader(p,b.fragShader),A.attachShader(p,b.vertShader),A.linkProgram(p),!A.getProgramParameter(p,A.LINK_STATUS)){var x=A.getProgramInfoLog(p);throw new d(x,"Error linking program:"+x)}T=T||u.uniforms(A,p),M=M||u.attributes(A,p),A.deleteProgram(p)}M=M.slice(),M.sort(m);var N=[],D=[],B=[],U;for(U=0;U<M.length;++U){var V=M[U];if(V.type.indexOf("mat")>=0){for(var q=V.type.charAt(V.type.length-1)|0,z=new Array(q),H=0;H<q;++H)z[H]=B.length,D.push(V.name+"["+H+"]"),typeof V.location=="number"?B.push(V.location+H):Array.isArray(V.location)&&V.location.length===q&&typeof V.location[H]=="number"?B.push(V.location[H]|0):B.push(-1);N.push({name:V.name,type:V.type,locations:z})}else N.push({name:V.name,type:V.type,locations:[B.length]}),D.push(V.name),typeof V.location=="number"?B.push(V.location|0):B.push(-1)}var G=0;for(U=0;U<B.length;++U)if(B[U]<0){for(;B.indexOf(G)>=0;)G+=1;B[U]=G}var J=new Array(T.length);function le(){b.program=o.program(A,b._vref,b._fref,D,B);for(var ge=0;ge<T.length;++ge)J[ge]=A.getUniformLocation(b.program,T[ge].name)}le(),b._relink=le,b.types={uniforms:s(T),attributes:s(M)},b.attributes=i(A,b,N,B),Object.defineProperty(b,"uniforms",l(A,b,T,J))};function E(c,_,T,M,k){var b=new h(c);return b.update(_,T,M,k),b}t.exports=E}),9499:(function(t,r,a){t.exports=pe;var l=a(8828),i=a(2762),s=a(8116),o=a(7766),u=a(1888),d=a(6729),h=a(5298),g=a(9994),m=a(9618),E=a(3711),c=a(6760),_=a(7608),T=a(2478),M=a(6199),k=a(990),b=k.createShader,A=k.createContourShader,y=k.createPickShader,f=k.createPickContourShader,p=40,x=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],N=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],D=[[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 oe=0;oe<3;++oe){var Y=D[oe],ce=(oe+1)%3,ue=(oe+2)%3;Y[ce+0]=1,Y[ue+3]=1,Y[oe+6]=1}})();function B(oe,Y,ce,ue,_e){this.position=oe,this.index=Y,this.uv=ce,this.level=ue,this.dataCoordinate=_e}var U=256;function V(oe,Y,ce,ue,_e,Le,ze,Xe,Ve,rt,mt,_t,vt,ut,Fe){this.gl=oe,this.shape=Y,this.bounds=ce,this.objectOffset=Fe,this.intensityBounds=[],this._shader=ue,this._pickShader=_e,this._coordinateBuffer=Le,this._vao=ze,this._colorMap=Xe,this._contourShader=Ve,this._contourPickShader=rt,this._contourBuffer=mt,this._contourVAO=_t,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=vt,this._dynamicVAO=ut,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=[m(u.mallocFloat(1024),[0,0]),m(u.mallocFloat(1024),[0,0]),m(u.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 q=V.prototype;q.genColormap=function(oe,Y){var ce=!1,ue=g([d({colormap:oe,nshades:U,format:"rgba"}).map(function(_e,Le){var ze=Y?z(Le/255,Y):_e[3];return ze<1&&(ce=!0),[_e[0],_e[1],_e[2],255*ze]})]);return h.divseq(ue,255),this.hasAlphaScale=ce,ue},q.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},q.isOpaque=function(){return!this.isTransparent()},q.pickSlots=1,q.setPickBase=function(oe){this.pickId=oe};function z(oe,Y){if(!Y||!Y.length)return 1;for(var ce=0;ce<Y.length;++ce){if(Y.length<2)return 1;if(Y[ce][0]===oe)return Y[ce][1];if(Y[ce][0]>oe&&ce>0){var ue=(Y[ce][0]-oe)/(Y[ce][0]-Y[ce-1][0]);return Y[ce][1]*(1-ue)+ue*Y[ce-1][1]}}return 1}var H=[0,0,0],G={showSurface:!1,showContour:!1,projections:[x.slice(),x.slice(),x.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function J(oe,Y){var ce,ue,_e,Le=Y.axes&&Y.axes.lastCubeProps.axis||H,ze=Y.showSurface,Xe=Y.showContour;for(ce=0;ce<3;++ce)for(ze=ze||Y.surfaceProject[ce],ue=0;ue<3;++ue)Xe=Xe||Y.contourProject[ce][ue];for(ce=0;ce<3;++ce){var Ve=G.projections[ce];for(ue=0;ue<16;++ue)Ve[ue]=0;for(ue=0;ue<4;++ue)Ve[5*ue]=1;Ve[5*ce]=0,Ve[12+ce]=Y.axesBounds[+(Le[ce]>0)][ce],c(Ve,oe.model,Ve);var rt=G.clipBounds[ce];for(_e=0;_e<2;++_e)for(ue=0;ue<3;++ue)rt[_e][ue]=oe.clipBounds[_e][ue];rt[0][ce]=-1e8,rt[1][ce]=1e8}return G.showSurface=ze,G.showContour=Xe,G}var le={model:x,view:x,projection:x,inverseModel:x.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},ge=x.slice(),de=[1,0,0,0,1,0,0,0,1];function me(oe,Y){oe=oe||{};var ce=this.gl;ce.disable(ce.CULL_FACE),this._colorMap.bind(0);var ue=le;ue.model=oe.model||x,ue.view=oe.view||x,ue.projection=oe.projection||x,ue.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],ue.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],ue.objectOffset=this.objectOffset,ue.contourColor=this.contourColor[0],ue.inverseModel=_(ue.inverseModel,ue.model);for(var _e=0;_e<2;++_e)for(var Le=ue.clipBounds[_e],ze=0;ze<3;++ze)Le[ze]=Math.min(Math.max(this.clipBounds[_e][ze],-1e8),1e8);ue.kambient=this.ambientLight,ue.kdiffuse=this.diffuseLight,ue.kspecular=this.specularLight,ue.roughness=this.roughness,ue.fresnel=this.fresnel,ue.opacity=this.opacity,ue.height=0,ue.permutation=de,ue.vertexColor=this.vertexColor;var Xe=ge;for(c(Xe,ue.view,ue.model),c(Xe,ue.projection,Xe),_(Xe,Xe),_e=0;_e<3;++_e)ue.eyePosition[_e]=Xe[12+_e]/Xe[15];var Ve=Xe[15];for(_e=0;_e<3;++_e)Ve+=this.lightPosition[_e]*Xe[4*_e+3];for(_e=0;_e<3;++_e){var rt=Xe[12+_e];for(ze=0;ze<3;++ze)rt+=Xe[4*ze+_e]*this.lightPosition[ze];ue.lightPosition[_e]=rt/Ve}var mt=J(ue,this);if(mt.showSurface){for(this._shader.bind(),this._shader.uniforms=ue,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(ce.TRIANGLES,this._vertexCount),_e=0;_e<3;++_e)!this.surfaceProject[_e]||!this.vertexCount||(this._shader.uniforms.model=mt.projections[_e],this._shader.uniforms.clipBounds=mt.clipBounds[_e],this._vao.draw(ce.TRIANGLES,this._vertexCount));this._vao.unbind()}if(mt.showContour){var _t=this._contourShader;ue.kambient=1,ue.kdiffuse=0,ue.kspecular=0,ue.opacity=1,_t.bind(),_t.uniforms=ue;var vt=this._contourVAO;for(vt.bind(),_e=0;_e<3;++_e)for(_t.uniforms.permutation=D[_e],ce.lineWidth(this.contourWidth[_e]*this.pixelRatio),ze=0;ze<this.contourLevels[_e].length;++ze)ze===this.highlightLevel[_e]?(_t.uniforms.contourColor=this.highlightColor[_e],_t.uniforms.contourTint=this.highlightTint[_e]):(ze===0||ze-1===this.highlightLevel[_e])&&(_t.uniforms.contourColor=this.contourColor[_e],_t.uniforms.contourTint=this.contourTint[_e]),this._contourCounts[_e][ze]&&(_t.uniforms.height=this.contourLevels[_e][ze],vt.draw(ce.LINES,this._contourCounts[_e][ze],this._contourOffsets[_e][ze]));for(_e=0;_e<3;++_e)for(_t.uniforms.model=mt.projections[_e],_t.uniforms.clipBounds=mt.clipBounds[_e],ze=0;ze<3;++ze)if(this.contourProject[_e][ze]){_t.uniforms.permutation=D[ze],ce.lineWidth(this.contourWidth[ze]*this.pixelRatio);for(var ut=0;ut<this.contourLevels[ze].length;++ut)ut===this.highlightLevel[ze]?(_t.uniforms.contourColor=this.highlightColor[ze],_t.uniforms.contourTint=this.highlightTint[ze]):(ut===0||ut-1===this.highlightLevel[ze])&&(_t.uniforms.contourColor=this.contourColor[ze],_t.uniforms.contourTint=this.contourTint[ze]),this._contourCounts[ze][ut]&&(_t.uniforms.height=this.contourLevels[ze][ut],vt.draw(ce.LINES,this._contourCounts[ze][ut],this._contourOffsets[ze][ut]))}for(vt.unbind(),vt=this._dynamicVAO,vt.bind(),_e=0;_e<3;++_e)if(this._dynamicCounts[_e]!==0)for(_t.uniforms.model=ue.model,_t.uniforms.clipBounds=ue.clipBounds,_t.uniforms.permutation=D[_e],ce.lineWidth(this.dynamicWidth[_e]*this.pixelRatio),_t.uniforms.contourColor=this.dynamicColor[_e],_t.uniforms.contourTint=this.dynamicTint[_e],_t.uniforms.height=this.dynamicLevel[_e],vt.draw(ce.LINES,this._dynamicCounts[_e],this._dynamicOffsets[_e]),ze=0;ze<3;++ze)this.contourProject[ze][_e]&&(_t.uniforms.model=mt.projections[ze],_t.uniforms.clipBounds=mt.clipBounds[ze],vt.draw(ce.LINES,this._dynamicCounts[_e],this._dynamicOffsets[_e]));vt.unbind()}}q.draw=function(oe){return me.call(this,oe,!1)},q.drawTransparent=function(oe){return me.call(this,oe,!0)};var W={model:x,view:x,projection:x,inverseModel:x,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]};q.drawPick=function(oe){oe=oe||{};var Y=this.gl;Y.disable(Y.CULL_FACE);var ce=W;ce.model=oe.model||x,ce.view=oe.view||x,ce.projection=oe.projection||x,ce.shape=this._field[2].shape,ce.pickId=this.pickId/255,ce.lowerBound=this.bounds[0],ce.upperBound=this.bounds[1],ce.objectOffset=this.objectOffset,ce.permutation=de;for(var ue=0;ue<2;++ue)for(var _e=ce.clipBounds[ue],Le=0;Le<3;++Le)_e[Le]=Math.min(Math.max(this.clipBounds[ue][Le],-1e8),1e8);var ze=J(ce,this);if(ze.showSurface){for(this._pickShader.bind(),this._pickShader.uniforms=ce,this._vao.bind(),this._vao.draw(Y.TRIANGLES,this._vertexCount),ue=0;ue<3;++ue)this.surfaceProject[ue]&&(this._pickShader.uniforms.model=ze.projections[ue],this._pickShader.uniforms.clipBounds=ze.clipBounds[ue],this._vao.draw(Y.TRIANGLES,this._vertexCount));this._vao.unbind()}if(ze.showContour){var Xe=this._contourPickShader;Xe.bind(),Xe.uniforms=ce;var Ve=this._contourVAO;for(Ve.bind(),Le=0;Le<3;++Le)for(Y.lineWidth(this.contourWidth[Le]*this.pixelRatio),Xe.uniforms.permutation=D[Le],ue=0;ue<this.contourLevels[Le].length;++ue)this._contourCounts[Le][ue]&&(Xe.uniforms.height=this.contourLevels[Le][ue],Ve.draw(Y.LINES,this._contourCounts[Le][ue],this._contourOffsets[Le][ue]));for(ue=0;ue<3;++ue)for(Xe.uniforms.model=ze.projections[ue],Xe.uniforms.clipBounds=ze.clipBounds[ue],Le=0;Le<3;++Le)if(this.contourProject[ue][Le]){Xe.uniforms.permutation=D[Le],Y.lineWidth(this.contourWidth[Le]*this.pixelRatio);for(var rt=0;rt<this.contourLevels[Le].length;++rt)this._contourCounts[Le][rt]&&(Xe.uniforms.height=this.contourLevels[Le][rt],Ve.draw(Y.LINES,this._contourCounts[Le][rt],this._contourOffsets[Le][rt]))}Ve.unbind()}},q.pick=function(oe){if(!oe||oe.id!==this.pickId)return null;var Y=this._field[2].shape,ce=this._pickResult,ue=Y[0]*(oe.value[0]+(oe.value[2]>>4)/16)/255,_e=Math.floor(ue),Le=ue-_e,ze=Y[1]*(oe.value[1]+(oe.value[2]&15)/16)/255,Xe=Math.floor(ze),Ve=ze-Xe;_e+=1,Xe+=1;var rt=ce.position;rt[0]=rt[1]=rt[2]=0;for(var mt=0;mt<2;++mt)for(var _t=mt?Le:1-Le,vt=0;vt<2;++vt)for(var ut=vt?Ve:1-Ve,Fe=_e+mt,Pe=Xe+vt,be=_t*ut,Ye=0;Ye<3;++Ye)rt[Ye]+=this._field[Ye].get(Fe,Pe)*be;for(var yt=this._pickResult.level,wt=0;wt<3;++wt)if(yt[wt]=T.le(this.contourLevels[wt],rt[wt]),yt[wt]<0)this.contourLevels[wt].length>0&&(yt[wt]=0);else if(yt[wt]<this.contourLevels[wt].length-1){var ht=this.contourLevels[wt][yt[wt]],Yt=this.contourLevels[wt][yt[wt]+1];Math.abs(ht-rt[wt])>Math.abs(Yt-rt[wt])&&(yt[wt]+=1)}for(ce.index[0]=Le<.5?_e:_e+1,ce.index[1]=Ve<.5?Xe:Xe+1,ce.uv[0]=ue/Y[0],ce.uv[1]=ze/Y[1],Ye=0;Ye<3;++Ye)ce.dataCoordinate[Ye]=this._field[Ye].get(ce.index[0],ce.index[1]);return ce},q.padField=function(oe,Y){var ce=Y.shape.slice(),ue=oe.shape.slice();h.assign(oe.lo(1,1).hi(ce[0],ce[1]),Y),h.assign(oe.lo(1).hi(ce[0],1),Y.hi(ce[0],1)),h.assign(oe.lo(1,ue[1]-1).hi(ce[0],1),Y.lo(0,ce[1]-1).hi(ce[0],1)),h.assign(oe.lo(0,1).hi(1,ce[1]),Y.hi(1)),h.assign(oe.lo(ue[0]-1,1).hi(1,ce[1]),Y.lo(ce[0]-1)),oe.set(0,0,Y.get(0,0)),oe.set(0,ue[1]-1,Y.get(0,ce[1]-1)),oe.set(ue[0]-1,0,Y.get(ce[0]-1,0)),oe.set(ue[0]-1,ue[1]-1,Y.get(ce[0]-1,ce[1]-1))};function ie(oe,Y){return Array.isArray(oe)?[Y(oe[0]),Y(oe[1]),Y(oe[2])]:[Y(oe),Y(oe),Y(oe)]}function se(oe){return Array.isArray(oe)?oe.length===3?[oe[0],oe[1],oe[2],1]:[oe[0],oe[1],oe[2],oe[3]]:[0,0,0,1]}function ee(oe){if(Array.isArray(oe)){if(Array.isArray(oe))return[se(oe[0]),se(oe[1]),se(oe[2])];var Y=se(oe);return[Y.slice(),Y.slice(),Y.slice()]}}q.update=function(oe){oe=oe||{},this.objectOffset=oe.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in oe&&(this.contourWidth=ie(oe.contourWidth,Number)),"showContour"in oe&&(this.showContour=ie(oe.showContour,Boolean)),"showSurface"in oe&&(this.showSurface=!!oe.showSurface),"contourTint"in oe&&(this.contourTint=ie(oe.contourTint,Boolean)),"contourColor"in oe&&(this.contourColor=ee(oe.contourColor)),"contourProject"in oe&&(this.contourProject=ie(oe.contourProject,function(Ka){return ie(Ka,Boolean)})),"surfaceProject"in oe&&(this.surfaceProject=oe.surfaceProject),"dynamicColor"in oe&&(this.dynamicColor=ee(oe.dynamicColor)),"dynamicTint"in oe&&(this.dynamicTint=ie(oe.dynamicTint,Number)),"dynamicWidth"in oe&&(this.dynamicWidth=ie(oe.dynamicWidth,Number)),"opacity"in oe&&(this.opacity=oe.opacity),"opacityscale"in oe&&(this.opacityscale=oe.opacityscale),"colorBounds"in oe&&(this.colorBounds=oe.colorBounds),"vertexColor"in oe&&(this.vertexColor=oe.vertexColor?1:0),"colormap"in oe&&this._colorMap.setPixels(this.genColormap(oe.colormap,this.opacityscale));var Y=oe.field||oe.coords&&oe.coords[2]||null,ce=!1;if(Y||(this._field[2].shape[0]||this._field[2].shape[2]?Y=this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):Y=this._field[2].hi(0,0)),"field"in oe||"coords"in oe){var ue=(Y.shape[0]+2)*(Y.shape[1]+2);ue>this._field[2].data.length&&(u.freeFloat(this._field[2].data),this._field[2].data=u.mallocFloat(l.nextPow2(ue))),this._field[2]=m(this._field[2].data,[Y.shape[0]+2,Y.shape[1]+2]),this.padField(this._field[2],Y),this.shape=Y.shape.slice();for(var _e=this.shape,Le=0;Le<2;++Le)this._field[2].size>this._field[Le].data.length&&(u.freeFloat(this._field[Le].data),this._field[Le].data=u.mallocFloat(this._field[2].size)),this._field[Le]=m(this._field[Le].data,[_e[0]+2,_e[1]+2]);if(oe.coords){var ze=oe.coords;if(!Array.isArray(ze)||ze.length!==3)throw new Error("gl-surface: invalid coordinates for x/y");for(Le=0;Le<2;++Le){var Xe=ze[Le];for(vt=0;vt<2;++vt)if(Xe.shape[vt]!==_e[vt])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[Le],Xe)}}else if(oe.ticks){var Ve=oe.ticks;if(!Array.isArray(Ve)||Ve.length!==2)throw new Error("gl-surface: invalid ticks");for(Le=0;Le<2;++Le){var rt=Ve[Le];if((Array.isArray(rt)||rt.length)&&(rt=m(rt)),rt.shape[0]!==_e[Le])throw new Error("gl-surface: invalid tick length");var mt=m(rt.data,_e);mt.stride[Le]=rt.stride[0],mt.stride[Le^1]=0,this.padField(this._field[Le],mt)}}else{for(Le=0;Le<2;++Le){var _t=[0,0];_t[Le]=1,this._field[Le]=m(this._field[Le].data,[_e[0]+2,_e[1]+2],_t,0)}this._field[0].set(0,0,0);for(var vt=0;vt<_e[0];++vt)this._field[0].set(vt+1,0,vt);for(this._field[0].set(_e[0]+1,0,_e[0]-1),this._field[1].set(0,0,0),vt=0;vt<_e[1];++vt)this._field[1].set(0,vt+1,vt);this._field[1].set(0,_e[1]+1,_e[1]-1)}var ut=this._field,Fe=m(u.mallocFloat(ut[2].size*3*2),[3,_e[0]+2,_e[1]+2,2]);for(Le=0;Le<3;++Le)M(Fe.pick(Le),ut[Le],"mirror");var Pe=m(u.mallocFloat(ut[2].size*3),[_e[0]+2,_e[1]+2,3]);for(Le=0;Le<_e[0]+2;++Le)for(vt=0;vt<_e[1]+2;++vt){var be=Fe.get(0,Le,vt,0),Ye=Fe.get(0,Le,vt,1),yt=Fe.get(1,Le,vt,0),wt=Fe.get(1,Le,vt,1),ht=Fe.get(2,Le,vt,0),Yt=Fe.get(2,Le,vt,1),$t=yt*Yt-wt*ht,fr=ht*Ye-Yt*be,mr=be*wt-Ye*yt,Ur=Math.sqrt($t*$t+fr*fr+mr*mr);Ur<1e-8?(Ur=Math.max(Math.abs($t),Math.abs(fr),Math.abs(mr)),Ur<1e-8?(mr=1,fr=$t=0,Ur=1):Ur=1/Ur):Ur=1/Math.sqrt(Ur),Pe.set(Le,vt,0,$t*Ur),Pe.set(Le,vt,1,fr*Ur),Pe.set(Le,vt,2,mr*Ur)}u.free(Fe.data);var jr=[1/0,1/0,1/0],fn=[-1/0,-1/0,-1/0],Br=1/0,Qr=-1/0,Ot=(_e[0]-1)*(_e[1]-1)*6,$e=u.mallocFloat(l.nextPow2(10*Ot)),ot=0,De=0;for(Le=0;Le<_e[0]-1;++Le)e:for(vt=0;vt<_e[1]-1;++vt){for(var Ee=0;Ee<2;++Ee)for(var Ae=0;Ae<2;++Ae)for(var Ie=0;Ie<3;++Ie){var tt=this._field[Ie].get(1+Le+Ee,1+vt+Ae);if(isNaN(tt)||!isFinite(tt))continue e}for(Ie=0;Ie<6;++Ie){var st=Le+N[Ie][0],Bt=vt+N[Ie][1],Ft=this._field[0].get(st+1,Bt+1),Wt=this._field[1].get(st+1,Bt+1);tt=this._field[2].get(st+1,Bt+1),$t=Pe.get(st+1,Bt+1,0),fr=Pe.get(st+1,Bt+1,1),mr=Pe.get(st+1,Bt+1,2),oe.intensity&&(lr=oe.intensity.get(st,Bt));var lr=oe.intensity?oe.intensity.get(st,Bt):tt+this.objectOffset[2];$e[ot++]=st,$e[ot++]=Bt,$e[ot++]=Ft,$e[ot++]=Wt,$e[ot++]=tt,$e[ot++]=0,$e[ot++]=lr,$e[ot++]=$t,$e[ot++]=fr,$e[ot++]=mr,jr[0]=Math.min(jr[0],Ft+this.objectOffset[0]),jr[1]=Math.min(jr[1],Wt+this.objectOffset[1]),jr[2]=Math.min(jr[2],tt+this.objectOffset[2]),Br=Math.min(Br,lr),fn[0]=Math.max(fn[0],Ft+this.objectOffset[0]),fn[1]=Math.max(fn[1],Wt+this.objectOffset[1]),fn[2]=Math.max(fn[2],tt+this.objectOffset[2]),Qr=Math.max(Qr,lr),De+=1}}for(oe.intensityBounds&&(Br=+oe.intensityBounds[0],Qr=+oe.intensityBounds[1]),Le=6;Le<ot;Le+=10)$e[Le]=($e[Le]-Br)/(Qr-Br);this._vertexCount=De,this._coordinateBuffer.update($e.subarray(0,ot)),u.freeFloat($e),u.free(Pe.data),this.bounds=[jr,fn],this.intensity=oe.intensity||this._field[2],(this.intensityBounds[0]!==Br||this.intensityBounds[1]!==Qr)&&(ce=!0),this.intensityBounds=[Br,Qr]}if("levels"in oe){var Rr=oe.levels;for(Array.isArray(Rr[0])?Rr=Rr.slice():Rr=[[],[],Rr],Le=0;Le<3;++Le)Rr[Le]=Rr[Le].slice(),Rr[Le].sort(function(Ka,fa){return Ka-fa});for(Le=0;Le<3;++Le)for(vt=0;vt<Rr[Le].length;++vt)Rr[Le][vt]-=this.objectOffset[Le];e:for(Le=0;Le<3;++Le){if(Rr[Le].length!==this.contourLevels[Le].length){ce=!0;break}for(vt=0;vt<Rr[Le].length;++vt)if(Rr[Le][vt]!==this.contourLevels[Le][vt]){ce=!0;break e}}this.contourLevels=Rr}if(ce){ut=this._field,_e=this.shape;for(var Mr=[],Sr=0;Sr<3;++Sr){var Kr=this.contourLevels[Sr],Hn=[],ga=[],ua=[0,0,0];for(Le=0;Le<Kr.length;++Le){var Ta=E(this._field[Sr],Kr[Le]);Hn.push(Mr.length/5|0),De=0;e:for(vt=0;vt<Ta.cells.length;++vt){var Aa=Ta.cells[vt];for(Ie=0;Ie<2;++Ie){var ia=Ta.positions[Aa[Ie]],$a=ia[0],ci=Math.floor($a)|0,_r=$a-ci,Qt=ia[1],yr=Math.floor(Qt)|0,br=Qt-yr,an=!1;t:for(var wn=0;wn<3;++wn){ua[wn]=0;var Ln=(Sr+wn+1)%3;for(Ee=0;Ee<2;++Ee){var Bn=Ee?_r:1-_r;for(st=Math.min(Math.max(ci+Ee,0),_e[0])|0,Ae=0;Ae<2;++Ae){var xa=Ae?br:1-br;if(Bt=Math.min(Math.max(yr+Ae,0),_e[1])|0,wn<2?tt=this._field[Ln].get(st,Bt):tt=(this.intensity.get(st,Bt)-this.intensityBounds[0])/(this.intensityBounds[1]-this.intensityBounds[0]),!isFinite(tt)||isNaN(tt)){an=!0;break t}var za=Bn*xa;ua[wn]+=za*tt}}}if(!an)Mr.push(ua[0],ua[1],ia[0],ia[1],ua[2]),De+=1;else{if(Ie>0){for(var Ia=0;Ia<5;++Ia)Mr.pop();De-=1}continue e}}}ga.push(De)}this._contourOffsets[Sr]=Hn,this._contourCounts[Sr]=ga}var Ba=u.mallocFloat(Mr.length);for(Le=0;Le<Mr.length;++Le)Ba[Le]=Mr[Le];this._contourBuffer.update(Ba),u.freeFloat(Ba)}},q.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 oe=0;oe<3;++oe)u.freeFloat(this._field[oe].data)},q.highlight=function(oe){var Y;if(!oe){this._dynamicCounts=[0,0,0],this.dyanamicLevel=[NaN,NaN,NaN],this.highlightLevel=[-1,-1,-1];return}for(Y=0;Y<3;++Y)this.enableHighlight[Y]?this.highlightLevel[Y]=oe.level[Y]:this.highlightLevel[Y]=-1;var ce;for(this.snapToData?ce=oe.dataCoordinate:ce=oe.position,Y=0;Y<3;++Y)ce[Y]-=this.objectOffset[Y];if(!((!this.enableDynamic[0]||ce[0]===this.dynamicLevel[0])&&(!this.enableDynamic[1]||ce[1]===this.dynamicLevel[1])&&(!this.enableDynamic[2]||ce[2]===this.dynamicLevel[2]))){for(var ue=0,_e=this.shape,Le=u.mallocFloat(12*_e[0]*_e[1]),ze=0;ze<3;++ze){if(!this.enableDynamic[ze]){this.dynamicLevel[ze]=NaN,this._dynamicCounts[ze]=0;continue}this.dynamicLevel[ze]=ce[ze];var Xe=(ze+1)%3,Ve=(ze+2)%3,rt=this._field[ze],mt=this._field[Xe],_t=this._field[Ve],vt=E(rt,ce[ze]),ut=vt.cells,Fe=vt.positions;for(this._dynamicOffsets[ze]=ue,Y=0;Y<ut.length;++Y)for(var Pe=ut[Y],be=0;be<2;++be){var Ye=Fe[Pe[be]],yt=+Ye[0],wt=yt|0,ht=Math.min(wt+1,_e[0])|0,Yt=yt-wt,$t=1-Yt,fr=+Ye[1],mr=fr|0,Ur=Math.min(mr+1,_e[1])|0,jr=fr-mr,fn=1-jr,Br=$t*fn,Qr=$t*jr,Ot=Yt*fn,$e=Yt*jr,ot=Br*mt.get(wt,mr)+Qr*mt.get(wt,Ur)+Ot*mt.get(ht,mr)+$e*mt.get(ht,Ur),De=Br*_t.get(wt,mr)+Qr*_t.get(wt,Ur)+Ot*_t.get(ht,mr)+$e*_t.get(ht,Ur);if(isNaN(ot)||isNaN(De)){be&&(ue-=1);break}Le[2*ue+0]=ot,Le[2*ue+1]=De,ue+=1}this._dynamicCounts[ze]=ue-this._dynamicOffsets[ze]}this._dynamicBuffer.update(Le.subarray(0,2*ue)),u.freeFloat(Le)}};function pe(oe){var Y=oe.gl,ce=b(Y),ue=y(Y),_e=A(Y),Le=f(Y),ze=i(Y),Xe=s(Y,[{buffer:ze,size:4,stride:p,offset:0},{buffer:ze,size:3,stride:p,offset:16},{buffer:ze,size:3,stride:p,offset:28}]),Ve=i(Y),rt=s(Y,[{buffer:Ve,size:4,stride:20,offset:0},{buffer:Ve,size:1,stride:20,offset:16}]),mt=i(Y),_t=s(Y,[{buffer:mt,size:2,type:Y.FLOAT}]),vt=o(Y,1,U,Y.RGBA,Y.UNSIGNED_BYTE);vt.minFilter=Y.LINEAR,vt.magFilter=Y.LINEAR;var ut=new V(Y,[0,0],[[0,0,0],[0,0,0]],ce,ue,ze,Xe,vt,_e,Le,Ve,rt,mt,_t,[0,0,0]),Fe={levels:[[],[],[]]};for(var Pe in oe)Fe[Pe]=oe[Pe];return Fe.colormap=Fe.colormap||"jet",ut.update(Fe),ut}}),9507:(function(t){t.exports=!0}),9618:(function(t,r,a){var l=a(7163),i=typeof Float64Array<"u";function s(E,c){return E[0]-c[0]}function o(){var E=this.stride,c=new Array(E.length),_;for(_=0;_<c.length;++_)c[_]=[Math.abs(E[_]),_];c.sort(s);var T=new Array(c.length);for(_=0;_<T.length;++_)T[_]=c[_][1];return T}var u={T:function(E){function c(T){this.data=T}var _=c.prototype;return _.dtype=E,_.index=function(){return-1},_.size=0,_.dimension=-1,_.shape=_.stride=_.order=[],_.lo=_.hi=_.transpose=_.step=function(){return new c(this.data)},_.get=_.set=function(){},_.pick=function(){return null},function(M){return new c(M)}},0:function(E,c){function _(M,k){this.data=M,this.offset=k}var T=_.prototype;return T.dtype=E,T.index=function(){return this.offset},T.dimension=0,T.size=1,T.shape=T.stride=T.order=[],T.lo=T.hi=T.transpose=T.step=function(){return new _(this.data,this.offset)},T.pick=function(){return c(this.data)},T.valueOf=T.get=function(){return E==="generic"?this.data.get(this.offset):this.data[this.offset]},T.set=function(k){return E==="generic"?this.data.set(this.offset,k):this.data[this.offset]=k},function(k,b,A,y){return new _(k,y)}},1:function(E,c,_){function T(k,b,A,y){this.data=k,this.shape=[b],this.stride=[A],this.offset=y|0}var M=T.prototype;return M.dtype=E,M.dimension=1,Object.defineProperty(M,"size",{get:function(){return this.shape[0]}}),M.order=[0],M.set=function(b,A){return E==="generic"?this.data.set(this.offset+this.stride[0]*b,A):this.data[this.offset+this.stride[0]*b]=A},M.get=function(b){return E==="generic"?this.data.get(this.offset+this.stride[0]*b):this.data[this.offset+this.stride[0]*b]},M.index=function(b){return this.offset+this.stride[0]*b},M.hi=function(b){return new T(this.data,typeof b!="number"||b<0?this.shape[0]:b|0,this.stride[0],this.offset)},M.lo=function(b){var A=this.offset,y=0,f=this.shape[0],p=this.stride[0];return typeof b=="number"&&b>=0&&(y=b|0,A+=p*y,f-=y),new T(this.data,f,p,A)},M.step=function(b){var A=this.shape[0],y=this.stride[0],f=this.offset,p=0,x=Math.ceil;return typeof b=="number"&&(p=b|0,p<0?(f+=y*(A-1),A=x(-A/p)):A=x(A/p),y*=p),new T(this.data,A,y,f)},M.transpose=function(b){b=b===void 0?0:b|0;var A=this.shape,y=this.stride;return new T(this.data,A[b],y[b],this.offset)},M.pick=function(b){var A=[],y=[],f=this.offset;typeof b=="number"&&b>=0?f=f+this.stride[0]*b|0:(A.push(this.shape[0]),y.push(this.stride[0]));var p=c[A.length+1];return p(this.data,A,y,f)},function(b,A,y,f){return new T(b,A[0],y[0],f)}},2:function(E,c,_){function T(k,b,A,y,f,p){this.data=k,this.shape=[b,A],this.stride=[y,f],this.offset=p|0}var M=T.prototype;return M.dtype=E,M.dimension=2,Object.defineProperty(M,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(M,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),M.set=function(b,A,y){return E==="generic"?this.data.set(this.offset+this.stride[0]*b+this.stride[1]*A,y):this.data[this.offset+this.stride[0]*b+this.stride[1]*A]=y},M.get=function(b,A){return E==="generic"?this.data.get(this.offset+this.stride[0]*b+this.stride[1]*A):this.data[this.offset+this.stride[0]*b+this.stride[1]*A]},M.index=function(b,A){return this.offset+this.stride[0]*b+this.stride[1]*A},M.hi=function(b,A){return new T(this.data,typeof b!="number"||b<0?this.shape[0]:b|0,typeof A!="number"||A<0?this.shape[1]:A|0,this.stride[0],this.stride[1],this.offset)},M.lo=function(b,A){var y=this.offset,f=0,p=this.shape[0],x=this.shape[1],N=this.stride[0],D=this.stride[1];return typeof b=="number"&&b>=0&&(f=b|0,y+=N*f,p-=f),typeof A=="number"&&A>=0&&(f=A|0,y+=D*f,x-=f),new T(this.data,p,x,N,D,y)},M.step=function(b,A){var y=this.shape[0],f=this.shape[1],p=this.stride[0],x=this.stride[1],N=this.offset,D=0,B=Math.ceil;return typeof b=="number"&&(D=b|0,D<0?(N+=p*(y-1),y=B(-y/D)):y=B(y/D),p*=D),typeof A=="number"&&(D=A|0,D<0?(N+=x*(f-1),f=B(-f/D)):f=B(f/D),x*=D),new T(this.data,y,f,p,x,N)},M.transpose=function(b,A){b=b===void 0?0:b|0,A=A===void 0?1:A|0;var y=this.shape,f=this.stride;return new T(this.data,y[b],y[A],f[b],f[A],this.offset)},M.pick=function(b,A){var y=[],f=[],p=this.offset;typeof b=="number"&&b>=0?p=p+this.stride[0]*b|0:(y.push(this.shape[0]),f.push(this.stride[0])),typeof A=="number"&&A>=0?p=p+this.stride[1]*A|0:(y.push(this.shape[1]),f.push(this.stride[1]));var x=c[y.length+1];return x(this.data,y,f,p)},function(b,A,y,f){return new T(b,A[0],A[1],y[0],y[1],f)}},3:function(E,c,_){function T(k,b,A,y,f,p,x,N){this.data=k,this.shape=[b,A,y],this.stride=[f,p,x],this.offset=N|0}var M=T.prototype;return M.dtype=E,M.dimension=3,Object.defineProperty(M,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(M,"order",{get:function(){var b=Math.abs(this.stride[0]),A=Math.abs(this.stride[1]),y=Math.abs(this.stride[2]);return b>A?A>y?[2,1,0]:b>y?[1,2,0]:[1,0,2]:b>y?[2,0,1]:y>A?[0,1,2]:[0,2,1]}}),M.set=function(b,A,y,f){return E==="generic"?this.data.set(this.offset+this.stride[0]*b+this.stride[1]*A+this.stride[2]*y,f):this.data[this.offset+this.stride[0]*b+this.stride[1]*A+this.stride[2]*y]=f},M.get=function(b,A,y){return E==="generic"?this.data.get(this.offset+this.stride[0]*b+this.stride[1]*A+this.stride[2]*y):this.data[this.offset+this.stride[0]*b+this.stride[1]*A+this.stride[2]*y]},M.index=function(b,A,y){return this.offset+this.stride[0]*b+this.stride[1]*A+this.stride[2]*y},M.hi=function(b,A,y){return new T(this.data,typeof b!="number"||b<0?this.shape[0]:b|0,typeof A!="number"||A<0?this.shape[1]:A|0,typeof y!="number"||y<0?this.shape[2]:y|0,this.stride[0],this.stride[1],this.stride[2],this.offset)},M.lo=function(b,A,y){var f=this.offset,p=0,x=this.shape[0],N=this.shape[1],D=this.shape[2],B=this.stride[0],U=this.stride[1],V=this.stride[2];return typeof b=="number"&&b>=0&&(p=b|0,f+=B*p,x-=p),typeof A=="number"&&A>=0&&(p=A|0,f+=U*p,N-=p),typeof y=="number"&&y>=0&&(p=y|0,f+=V*p,D-=p),new T(this.data,x,N,D,B,U,V,f)},M.step=function(b,A,y){var f=this.shape[0],p=this.shape[1],x=this.shape[2],N=this.stride[0],D=this.stride[1],B=this.stride[2],U=this.offset,V=0,q=Math.ceil;return typeof b=="number"&&(V=b|0,V<0?(U+=N*(f-1),f=q(-f/V)):f=q(f/V),N*=V),typeof A=="number"&&(V=A|0,V<0?(U+=D*(p-1),p=q(-p/V)):p=q(p/V),D*=V),typeof y=="number"&&(V=y|0,V<0?(U+=B*(x-1),x=q(-x/V)):x=q(x/V),B*=V),new T(this.data,f,p,x,N,D,B,U)},M.transpose=function(b,A,y){b=b===void 0?0:b|0,A=A===void 0?1:A|0,y=y===void 0?2:y|0;var f=this.shape,p=this.stride;return new T(this.data,f[b],f[A],f[y],p[b],p[A],p[y],this.offset)},M.pick=function(b,A,y){var f=[],p=[],x=this.offset;typeof b=="number"&&b>=0?x=x+this.stride[0]*b|0:(f.push(this.shape[0]),p.push(this.stride[0])),typeof A=="number"&&A>=0?x=x+this.stride[1]*A|0:(f.push(this.shape[1]),p.push(this.stride[1])),typeof y=="number"&&y>=0?x=x+this.stride[2]*y|0:(f.push(this.shape[2]),p.push(this.stride[2]));var N=c[f.length+1];return N(this.data,f,p,x)},function(b,A,y,f){return new T(b,A[0],A[1],A[2],y[0],y[1],y[2],f)}},4:function(E,c,_){function T(k,b,A,y,f,p,x,N,D,B){this.data=k,this.shape=[b,A,y,f],this.stride=[p,x,N,D],this.offset=B|0}var M=T.prototype;return M.dtype=E,M.dimension=4,Object.defineProperty(M,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(M,"order",{get:_}),M.set=function(b,A,y,f,p){return E==="generic"?this.data.set(this.offset+this.stride[0]*b+this.stride[1]*A+this.stride[2]*y+this.stride[3]*f,p):this.data[this.offset+this.stride[0]*b+this.stride[1]*A+this.stride[2]*y+this.stride[3]*f]=p},M.get=function(b,A,y,f){return E==="generic"?this.data.get(this.offset+this.stride[0]*b+this.stride[1]*A+this.stride[2]*y+this.stride[3]*f):this.data[this.offset+this.stride[0]*b+this.stride[1]*A+this.stride[2]*y+this.stride[3]*f]},M.index=function(b,A,y,f){return this.offset+this.stride[0]*b+this.stride[1]*A+this.stride[2]*y+this.stride[3]*f},M.hi=function(b,A,y,f){return new T(this.data,typeof b!="number"||b<0?this.shape[0]:b|0,typeof A!="number"||A<0?this.shape[1]:A|0,typeof y!="number"||y<0?this.shape[2]:y|0,typeof f!="number"||f<0?this.shape[3]:f|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},M.lo=function(b,A,y,f){var p=this.offset,x=0,N=this.shape[0],D=this.shape[1],B=this.shape[2],U=this.shape[3],V=this.stride[0],q=this.stride[1],z=this.stride[2],H=this.stride[3];return typeof b=="number"&&b>=0&&(x=b|0,p+=V*x,N-=x),typeof A=="number"&&A>=0&&(x=A|0,p+=q*x,D-=x),typeof y=="number"&&y>=0&&(x=y|0,p+=z*x,B-=x),typeof f=="number"&&f>=0&&(x=f|0,p+=H*x,U-=x),new T(this.data,N,D,B,U,V,q,z,H,p)},M.step=function(b,A,y,f){var p=this.shape[0],x=this.shape[1],N=this.shape[2],D=this.shape[3],B=this.stride[0],U=this.stride[1],V=this.stride[2],q=this.stride[3],z=this.offset,H=0,G=Math.ceil;return typeof b=="number"&&(H=b|0,H<0?(z+=B*(p-1),p=G(-p/H)):p=G(p/H),B*=H),typeof A=="number"&&(H=A|0,H<0?(z+=U*(x-1),x=G(-x/H)):x=G(x/H),U*=H),typeof y=="number"&&(H=y|0,H<0?(z+=V*(N-1),N=G(-N/H)):N=G(N/H),V*=H),typeof f=="number"&&(H=f|0,H<0?(z+=q*(D-1),D=G(-D/H)):D=G(D/H),q*=H),new T(this.data,p,x,N,D,B,U,V,q,z)},M.transpose=function(b,A,y,f){b=b===void 0?0:b|0,A=A===void 0?1:A|0,y=y===void 0?2:y|0,f=f===void 0?3:f|0;var p=this.shape,x=this.stride;return new T(this.data,p[b],p[A],p[y],p[f],x[b],x[A],x[y],x[f],this.offset)},M.pick=function(b,A,y,f){var p=[],x=[],N=this.offset;typeof b=="number"&&b>=0?N=N+this.stride[0]*b|0:(p.push(this.shape[0]),x.push(this.stride[0])),typeof A=="number"&&A>=0?N=N+this.stride[1]*A|0:(p.push(this.shape[1]),x.push(this.stride[1])),typeof y=="number"&&y>=0?N=N+this.stride[2]*y|0:(p.push(this.shape[2]),x.push(this.stride[2])),typeof f=="number"&&f>=0?N=N+this.stride[3]*f|0:(p.push(this.shape[3]),x.push(this.stride[3]));var D=c[p.length+1];return D(this.data,p,x,N)},function(b,A,y,f){return new T(b,A[0],A[1],A[2],A[3],y[0],y[1],y[2],y[3],f)}},5:function(c,_,T){function M(b,A,y,f,p,x,N,D,B,U,V,q){this.data=b,this.shape=[A,y,f,p,x],this.stride=[N,D,B,U,V],this.offset=q|0}var k=M.prototype;return k.dtype=c,k.dimension=5,Object.defineProperty(k,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(k,"order",{get:T}),k.set=function(A,y,f,p,x,N){return c==="generic"?this.data.set(this.offset+this.stride[0]*A+this.stride[1]*y+this.stride[2]*f+this.stride[3]*p+this.stride[4]*x,N):this.data[this.offset+this.stride[0]*A+this.stride[1]*y+this.stride[2]*f+this.stride[3]*p+this.stride[4]*x]=N},k.get=function(A,y,f,p,x){return c==="generic"?this.data.get(this.offset+this.stride[0]*A+this.stride[1]*y+this.stride[2]*f+this.stride[3]*p+this.stride[4]*x):this.data[this.offset+this.stride[0]*A+this.stride[1]*y+this.stride[2]*f+this.stride[3]*p+this.stride[4]*x]},k.index=function(A,y,f,p,x){return this.offset+this.stride[0]*A+this.stride[1]*y+this.stride[2]*f+this.stride[3]*p+this.stride[4]*x},k.hi=function(A,y,f,p,x){return new M(this.data,typeof A!="number"||A<0?this.shape[0]:A|0,typeof y!="number"||y<0?this.shape[1]:y|0,typeof f!="number"||f<0?this.shape[2]:f|0,typeof p!="number"||p<0?this.shape[3]:p|0,typeof x!="number"||x<0?this.shape[4]:x|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},k.lo=function(A,y,f,p,x){var N=this.offset,D=0,B=this.shape[0],U=this.shape[1],V=this.shape[2],q=this.shape[3],z=this.shape[4],H=this.stride[0],G=this.stride[1],J=this.stride[2],le=this.stride[3],ge=this.stride[4];return typeof A=="number"&&A>=0&&(D=A|0,N+=H*D,B-=D),typeof y=="number"&&y>=0&&(D=y|0,N+=G*D,U-=D),typeof f=="number"&&f>=0&&(D=f|0,N+=J*D,V-=D),typeof p=="number"&&p>=0&&(D=p|0,N+=le*D,q-=D),typeof x=="number"&&x>=0&&(D=x|0,N+=ge*D,z-=D),new M(this.data,B,U,V,q,z,H,G,J,le,ge,N)},k.step=function(A,y,f,p,x){var N=this.shape[0],D=this.shape[1],B=this.shape[2],U=this.shape[3],V=this.shape[4],q=this.stride[0],z=this.stride[1],H=this.stride[2],G=this.stride[3],J=this.stride[4],le=this.offset,ge=0,de=Math.ceil;return typeof A=="number"&&(ge=A|0,ge<0?(le+=q*(N-1),N=de(-N/ge)):N=de(N/ge),q*=ge),typeof y=="number"&&(ge=y|0,ge<0?(le+=z*(D-1),D=de(-D/ge)):D=de(D/ge),z*=ge),typeof f=="number"&&(ge=f|0,ge<0?(le+=H*(B-1),B=de(-B/ge)):B=de(B/ge),H*=ge),typeof p=="number"&&(ge=p|0,ge<0?(le+=G*(U-1),U=de(-U/ge)):U=de(U/ge),G*=ge),typeof x=="number"&&(ge=x|0,ge<0?(le+=J*(V-1),V=de(-V/ge)):V=de(V/ge),J*=ge),new M(this.data,N,D,B,U,V,q,z,H,G,J,le)},k.transpose=function(A,y,f,p,x){A=A===void 0?0:A|0,y=y===void 0?1:y|0,f=f===void 0?2:f|0,p=p===void 0?3:p|0,x=x===void 0?4:x|0;var N=this.shape,D=this.stride;return new M(this.data,N[A],N[y],N[f],N[p],N[x],D[A],D[y],D[f],D[p],D[x],this.offset)},k.pick=function(A,y,f,p,x){var N=[],D=[],B=this.offset;typeof A=="number"&&A>=0?B=B+this.stride[0]*A|0:(N.push(this.shape[0]),D.push(this.stride[0])),typeof y=="number"&&y>=0?B=B+this.stride[1]*y|0:(N.push(this.shape[1]),D.push(this.stride[1])),typeof f=="number"&&f>=0?B=B+this.stride[2]*f|0:(N.push(this.shape[2]),D.push(this.stride[2])),typeof p=="number"&&p>=0?B=B+this.stride[3]*p|0:(N.push(this.shape[3]),D.push(this.stride[3])),typeof x=="number"&&x>=0?B=B+this.stride[4]*x|0:(N.push(this.shape[4]),D.push(this.stride[4]));var U=_[N.length+1];return U(this.data,N,D,B)},function(A,y,f,p){return new M(A,y[0],y[1],y[2],y[3],y[4],f[0],f[1],f[2],f[3],f[4],p)}}};function d(E,c){var _=c===-1?"T":String(c),T=u[_];return c===-1?T(E):c===0?T(E,g[E][0]):T(E,g[E],o)}function h(E){if(l(E))return"buffer";if(i)switch(Object.prototype.toString.call(E)){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(E)?"array":"generic"}var g={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};function m(E,c,_,T){if(E===void 0){var f=g.array[0];return f([])}else typeof E=="number"&&(E=[E]);c===void 0&&(c=[E.length]);var M=c.length;if(_===void 0){_=new Array(M);for(var k=M-1,b=1;k>=0;--k)_[k]=b,b*=c[k]}if(T===void 0){T=0;for(var k=0;k<M;++k)_[k]<0&&(T-=(c[k]-1)*_[k])}for(var A=h(E),y=g[A];y.length<=M+1;)y.push(d(A,y.length-1));var f=y[M+1];return f(E,c,_,T)}t.exports=m}),9921:(function(t){t.exports=r;function r(a){var l=a[0],i=a[1],s=a[2],o=a[3],u=a[4],d=a[5],h=a[6],g=a[7],m=a[8],E=a[9],c=a[10],_=a[11],T=a[12],M=a[13],k=a[14],b=a[15],A=l*d-i*u,y=l*h-s*u,f=l*g-o*u,p=i*h-s*d,x=i*g-o*d,N=s*g-o*h,D=m*M-E*T,B=m*k-c*T,U=m*b-_*T,V=E*k-c*M,q=E*b-_*M,z=c*b-_*k;return A*z-y*q+f*V+p*U-x*B+N*D}}),9922:(function(t,r,a){t.exports=i;var l=a(2613);function i(s,o){var u=s[0],d=s[1],h=s[2],g=o[0],m=o[1],E=o[2];return Math.abs(u-g)<=l*Math.max(1,Math.abs(u),Math.abs(g))&&Math.abs(d-m)<=l*Math.max(1,Math.abs(d),Math.abs(m))&&Math.abs(h-E)<=l*Math.max(1,Math.abs(h),Math.abs(E))}}),9970:(function(t,r,a){t.exports={create:a(7536),clone:a(2335),fromValues:a(3390),copy:a(2933),set:a(4578),add:a(4361),subtract:a(6860),multiply:a(3576),divide:a(1373),min:a(2334),max:a(160),scale:a(9288),scaleAndAdd:a(4844),distance:a(4691),squaredDistance:a(7960),length:a(6808),squaredLength:a(483),negate:a(1498),inverse:a(4494),normalize:a(5177),dot:a(3750),lerp:a(2573),random:a(9131),transformMat4:a(5352),transformQuat:a(4041)}}),9977:(function(t,r,a){t.exports=c;var l=a(9215),i=a(6582),s=a(7399),o=a(7608),u=a(4081);function d(_,T,M){return Math.sqrt(Math.pow(_,2)+Math.pow(T,2)+Math.pow(M,2))}function h(_,T,M,k){return Math.sqrt(Math.pow(_,2)+Math.pow(T,2)+Math.pow(M,2)+Math.pow(k,2))}function g(_,T){var M=T[0],k=T[1],b=T[2],A=T[3],y=h(M,k,b,A);y>1e-6?(_[0]=M/y,_[1]=k/y,_[2]=b/y,_[3]=A/y):(_[0]=_[1]=_[2]=0,_[3]=1)}function m(_,T,M){this.radius=l([M]),this.center=l(T),this.rotation=l(_),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 E=m.prototype;E.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},E.recalcMatrix=function(_){this.radius.curve(_),this.center.curve(_),this.rotation.curve(_);var T=this.computedRotation;g(T,T);var M=this.computedMatrix;s(M,T);var k=this.computedCenter,b=this.computedEye,A=this.computedUp,y=Math.exp(this.computedRadius[0]);b[0]=k[0]+y*M[2],b[1]=k[1]+y*M[6],b[2]=k[2]+y*M[10],A[0]=M[1],A[1]=M[5],A[2]=M[9];for(var f=0;f<3;++f){for(var p=0,x=0;x<3;++x)p+=M[f+4*x]*b[x];M[12+f]=-p}},E.getMatrix=function(_,T){this.recalcMatrix(_);var M=this.computedMatrix;if(T){for(var k=0;k<16;++k)T[k]=M[k];return T}return M},E.idle=function(_){this.center.idle(_),this.radius.idle(_),this.rotation.idle(_)},E.flush=function(_){this.center.flush(_),this.radius.flush(_),this.rotation.flush(_)},E.pan=function(_,T,M,k){T=T||0,M=M||0,k=k||0,this.recalcMatrix(_);var b=this.computedMatrix,A=b[1],y=b[5],f=b[9],p=d(A,y,f);A/=p,y/=p,f/=p;var x=b[0],N=b[4],D=b[8],B=x*A+N*y+D*f;x-=A*B,N-=y*B,D-=f*B;var U=d(x,N,D);x/=U,N/=U,D/=U,b[2],b[6],b[10];var V=x*T+A*M,q=N*T+y*M,z=D*T+f*M;this.center.move(_,V,q,z);var H=Math.exp(this.computedRadius[0]);H=Math.max(1e-4,H+k),this.radius.set(_,Math.log(H))},E.rotate=function(_,T,M,k){this.recalcMatrix(_),T=T||0,M=M||0;var b=this.computedMatrix,A=b[0],y=b[4],f=b[8],p=b[1],x=b[5],N=b[9],D=b[2],B=b[6],U=b[10],V=T*A+M*p,q=T*y+M*x,z=T*f+M*N,H=-(B*z-U*q),G=-(U*V-D*z),J=-(D*q-B*V),le=Math.sqrt(Math.max(0,1-Math.pow(H,2)-Math.pow(G,2)-Math.pow(J,2))),ge=h(H,G,J,le);ge>1e-6?(H/=ge,G/=ge,J/=ge,le/=ge):(H=G=J=0,le=1);var de=this.computedRotation,me=de[0],W=de[1],ie=de[2],se=de[3],ee=me*le+se*H+W*J-ie*G,pe=W*le+se*G+ie*H-me*J,oe=ie*le+se*J+me*G-W*H,Y=se*le-me*H-W*G-ie*J;if(k){H=D,G=B,J=U;var ce=Math.sin(k)/d(H,G,J);H*=ce,G*=ce,J*=ce,le=Math.cos(T),ee=ee*le+Y*H+pe*J-oe*G,pe=pe*le+Y*G+oe*H-ee*J,oe=oe*le+Y*J+ee*G-pe*H,Y=Y*le-ee*H-pe*G-oe*J}var ue=h(ee,pe,oe,Y);ue>1e-6?(ee/=ue,pe/=ue,oe/=ue,Y/=ue):(ee=pe=oe=0,Y=1),this.rotation.set(_,ee,pe,oe,Y)},E.lookAt=function(_,T,M,k){this.recalcMatrix(_),M=M||this.computedCenter,T=T||this.computedEye,k=k||this.computedUp;var b=this.computedMatrix;i(b,T,M,k);var A=this.computedRotation;u(A,b[0],b[1],b[2],b[4],b[5],b[6],b[8],b[9],b[10]),g(A,A),this.rotation.set(_,A[0],A[1],A[2],A[3]);for(var y=0,f=0;f<3;++f)y+=Math.pow(M[f]-T[f],2);this.radius.set(_,.5*Math.log(Math.max(y,1e-6))),this.center.set(_,M[0],M[1],M[2])},E.translate=function(_,T,M,k){this.center.move(_,T||0,M||0,k||0)},E.setMatrix=function(_,T){var M=this.computedRotation;u(M,T[0],T[1],T[2],T[4],T[5],T[6],T[8],T[9],T[10]),g(M,M),this.rotation.set(_,M[0],M[1],M[2],M[3]);var k=this.computedMatrix;o(k,T);var b=k[15];if(Math.abs(b)>1e-6){var A=k[12]/b,y=k[13]/b,f=k[14]/b;this.recalcMatrix(_);var p=Math.exp(this.computedRadius[0]);this.center.set(_,A-k[2]*p,y-k[6]*p,f-k[10]*p),this.radius.idle(_)}else this.center.idle(_),this.radius.idle(_)},E.setDistance=function(_,T){T>0&&this.radius.set(_,Math.log(T))},E.setDistanceLimits=function(_,T){_>0?_=Math.log(_):_=-1/0,T>0?T=Math.log(T):T=1/0,T=Math.max(T,_),this.radius.bounds[0][0]=_,this.radius.bounds[1][0]=T},E.getDistanceLimits=function(_){var T=this.radius.bounds;return _?(_[0]=Math.exp(T[0][0]),_[1]=Math.exp(T[1][0]),_):[Math.exp(T[0][0]),Math.exp(T[1][0])]},E.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]}},E.fromJSON=function(_){var T=this.lastT(),M=_.center;M&&this.center.set(T,M[0],M[1],M[2]);var k=_.rotation;k&&this.rotation.set(T,k[0],k[1],k[2],k[3]);var b=_.distance;b&&b>0&&this.radius.set(T,Math.log(b)),this.setDistanceLimits(_.zoomMin,_.zoomMax)};function c(_){_=_||{};var T=_.center||[0,0,0],M=_.rotation||[0,0,0,1],k=_.radius||1;T=[].slice.call(T,0,3),M=[].slice.call(M,0,4),g(M,M);var b=new m(M,T,Math.log(k));return b.setDistanceLimits(_.zoomMin,_.zoomMax),("eye"in _||"up"in _)&&b.lookAt(0,_.eye,_.center,_.up),b}}),9994:(function(t,r,a){var l=a(9618),i=a(8277);t.exports=function(o,u){for(var d=[],h=o,g=1;Array.isArray(h);)d.push(h.length),g*=h.length,h=h[0];return d.length===0?l():(u||(u=l(new Float64Array(g),d)),i(u,o),u)}})},w={};function C(t){var r=w[t];if(r!==void 0)return r.exports;var a=w[t]={id:t,loaded:!1,exports:{}};return v[t].call(a.exports,a,a.exports,C),a.loaded=!0,a.exports}(function(){C.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}})()})(),(function(){C.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t}})();var P=C(1964);Z.exports=P})()}}),eN=Ne({"node_modules/color-name/index.js"(te,Z){Z.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]}}}),FK=Ne({"node_modules/color-normalize/node_modules/color-parse/index.js"(te,Z){var v=eN();Z.exports=C;var w={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function C(P){var t,r=[],a=1,l;if(typeof P=="string")if(P=P.toLowerCase(),v[P])r=v[P].slice(),l="rgb";else if(P==="transparent")a=0,l="rgb",r=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(P)){var i=P.slice(1),s=i.length,o=s<=4;a=1,o?(r=[parseInt(i[0]+i[0],16),parseInt(i[1]+i[1],16),parseInt(i[2]+i[2],16)],s===4&&(a=parseInt(i[3]+i[3],16)/255)):(r=[parseInt(i[0]+i[1],16),parseInt(i[2]+i[3],16),parseInt(i[4]+i[5],16)],s===8&&(a=parseInt(i[6]+i[7],16)/255)),r[0]||(r[0]=0),r[1]||(r[1]=0),r[2]||(r[2]=0),l="rgb"}else if(t=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(P)){var u=t[1],d=u==="rgb",i=u.replace(/a$/,"");l=i;var s=i==="cmyk"?4:i==="gray"?1:3;r=t[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(m,E){if(/%$/.test(m))return E===s?parseFloat(m)/100:i==="rgb"?parseFloat(m)*255/100:parseFloat(m);if(i[E]==="h"){if(/deg$/.test(m))return parseFloat(m);if(w[m]!==void 0)return w[m]}return parseFloat(m)}),u===i&&r.push(1),a=d||r[s]===void 0?1:r[s],r=r.slice(0,s)}else P.length>10&&/[0-9](?:\s|\/)/.test(P)&&(r=P.match(/([0-9]+)/g).map(function(h){return parseFloat(h)}),l=P.match(/([a-z])/ig).join("").toLowerCase());else isNaN(P)?Array.isArray(P)||P.length?(r=[P[0],P[1],P[2]],l="rgb",a=P.length===4?P[3]:1):P instanceof Object&&(P.r!=null||P.red!=null||P.R!=null?(l="rgb",r=[P.r||P.red||P.R||0,P.g||P.green||P.G||0,P.b||P.blue||P.B||0]):(l="hsl",r=[P.h||P.hue||P.H||0,P.s||P.saturation||P.S||0,P.l||P.lightness||P.L||P.b||P.brightness]),a=P.a||P.alpha||P.opacity||1,P.opacity!=null&&(a/=100)):(l="rgb",r=[P>>>16,(P&65280)>>>8,P&255]);return{space:l,values:r,alpha:a}}}}),BK=Ne({"node_modules/color-normalize/node_modules/color-rgba/index.js"(te,Z){var v=FK();Z.exports=function(P){Array.isArray(P)&&P.raw&&(P=String.raw.apply(null,arguments));var t,r=v(P);if(!r.space)return[];var a=[0,0,0],l=r.space[0]==="h"?[360,100,100]:[255,255,255];return t=Array(3),t[0]=Math.min(Math.max(r.values[0],a[0]),l[0]),t[1]=Math.min(Math.max(r.values[1],a[1]),l[1]),t[2]=Math.min(Math.max(r.values[2],a[2]),l[2]),r.space[0]==="h"&&(t=w(t)),t.push(Math.min(Math.max(r.alpha,0),1)),t};function w(C){var P=C[0]/360,t=C[1]/100,r=C[2]/100,a,l,i,s,o,u=0;if(t===0)return o=r*255,[o,o,o];for(l=r<.5?r*(1+t):r+t-r*t,a=2*r-l,s=[0,0,0];u<3;)i=P+1/3*-(u-1),i<0?i++:i>1&&i--,o=6*i<1?a+(l-a)*6*i:2*i<1?l:3*i<2?a+(l-a)*(2/3-i)*6:a,s[u++]=o*255;return s}}}),sk=Ne({"node_modules/clamp/index.js"(te,Z){Z.exports=v;function v(w,C,P){return C<P?w<C?C:w>P?P:w:w<P?P:w>C?C:w}}}),mR=Ne({"node_modules/dtype/index.js"(te,Z){Z.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}}}}),Rb=Ne({"node_modules/color-normalize/index.js"(te,Z){var v=BK(),w=sk(),C=mR();Z.exports=function(r,a){(a==="float"||!a)&&(a="array"),a==="uint"&&(a="uint8"),a==="uint_clamped"&&(a="uint8_clamped");var l=C(a),i=new l(4),s=a!=="uint8"&&a!=="uint8_clamped";return(!r.length||typeof r=="string")&&(r=v(r),r[0]/=255,r[1]/=255,r[2]/=255),P(r)?(i[0]=r[0],i[1]=r[1],i[2]=r[2],i[3]=r[3]!=null?r[3]:255,s&&(i[0]/=255,i[1]/=255,i[2]/=255,i[3]/=255),i):(s?(i[0]=r[0],i[1]=r[1],i[2]=r[2],i[3]=r[3]!=null?r[3]:1):(i[0]=w(Math.floor(r[0]*255),0,255),i[1]=w(Math.floor(r[1]*255),0,255),i[2]=w(Math.floor(r[2]*255),0,255),i[3]=r[3]==null?255:w(Math.floor(r[3]*255),0,255)),i)};function P(t){return!!(t instanceof Uint8Array||t instanceof Uint8ClampedArray||Array.isArray(t)&&(t[0]>1||t[0]===0)&&(t[1]>1||t[1]===0)&&(t[2]>1||t[2]===0)&&(!t[3]||t[3]>1))}}}),C_=Ne({"src/lib/str2rgbarray.js"(te,Z){var v=Rb();function w(C){return C?v(C):[0,0,0,1]}Z.exports=w}}),k_=Ne({"src/lib/gl_format_color.js"(te,Z){var v=Fn(),w=to(),C=Rb(),P=Nc(),t=js().defaultLine,r=Ri().isArrayOrTypedArray,a=C(t),l=1;function i(h,g){var m=h;return m[3]*=g,m}function s(h){if(v(h))return a;var g=C(h);return g.length?g:a}function o(h){return v(h)?h:l}function u(h,g,m){var E=h.color;E&&E._inputArray&&(E=E._inputArray);var c=r(E),_=r(g),T=P.extractOpts(h),M=[],k,b,A,y,f;if(T.colorscale!==void 0?k=P.makeColorScaleFuncFromTrace(h):k=s,c?b=function(x,N){return x[N]===void 0?a:C(k(x[N]))}:b=s,_?A=function(x,N){return x[N]===void 0?l:o(x[N])}:A=o,c||_)for(var p=0;p<m;p++)y=b(E,p),f=A(g,p),M[p]=i(y,f);else M=i(C(E),g);return M}function d(h){var g=P.extractOpts(h),m=g.colorscale;return g.reversescale&&(m=P.flipScale(g.colorscale)),m.map(function(E){var c=E[0],_=w(E[1]),T=_.toRgb();return{index:c,rgb:[T.r,T.g,T.b,T.a]}})}Z.exports={formatColor:u,parseColorScale:d}}}),tN=Ne({"src/constants/gl3d_dashes.js"(te,Z){Z.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]}}}),gR=Ne({"src/constants/gl3d_markers.js"(te,Z){Z.exports={circle:"●","circle-open":"○",square:"■","square-open":"□",diamond:"◆","diamond-open":"◇",cross:"+",x:"❌"}}}),jK=Ne({"src/traces/scatter3d/calc_errors.js"(te,Z){var v=Yo();function w(t,r,a,l){if(!r||!r.visible)return null;for(var i=v.getComponentMethod("errorbars","makeComputeError")(r),s=new Array(t.length),o=0;o<t.length;o++){var u=i(+t[o],o);if(l.type==="log"){var d=l.c2l(t[o]),h=t[o]-u[0],g=t[o]+u[1];if(s[o]=[(l.c2l(h,!0)-d)*a,(l.c2l(g,!0)-d)*a],h>0){var m=l.c2l(h);l._lowerLogErrorBound||(l._lowerLogErrorBound=m),l._lowerErrorBound=Math.min(l._lowerLogErrorBound,m)}}else s[o]=[-u[0]*a,u[1]*a]}return s}function C(t){for(var r=0;r<t.length;r++)if(t[r])return t[r].length;return 0}function P(t,r,a){var l=[w(t.x,t.error_x,r[0],a.xaxis),w(t.y,t.error_y,r[1],a.yaxis),w(t.z,t.error_z,r[2],a.zaxis)],i=C(l);if(i===0)return null;for(var s=new Array(i),o=0;o<i;o++){for(var u=[[0,0,0],[0,0,0]],d=0;d<3;d++)if(l[d])for(var h=0;h<2;h++)u[h][d]=l[d][o][h];s[o]=u}return s}Z.exports=P}}),UK=Ne({"src/traces/scatter3d/convert.js"(te,Z){var v=Gv().gl_line3d,w=Gv().gl_scatter3d,C=Gv().gl_error3d,P=Gv().gl_mesh3d,t=Gv().delaunay_triangulate,r=In(),a=C_(),l=k_().formatColor,i=Mm(),s=tN(),o=gR(),u=Os(),d=bv().appendArrayPointValue,h=jK();function g(N,D){this.scene=N,this.uid=D,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 m=g.prototype;m.handlePick=function(N){if(N.object&&(N.object===this.linePlot||N.object===this.delaunayMesh||N.object===this.textMarkers||N.object===this.scatterPlot)){var D=N.index=N.data.index;return N.object.highlight&&N.object.highlight(null),this.scatterPlot&&(N.object=this.scatterPlot,this.scatterPlot.highlight(N.data)),N.textLabel="",this.textLabels&&(r.isArrayOrTypedArray(this.textLabels)?(this.textLabels[D]||this.textLabels[D]===0)&&(N.textLabel=this.textLabels[D]):N.textLabel=this.textLabels),N.traceCoordinate=[this.data.x[D],this.data.y[D],this.data.z[D]],!0}};function E(N,D,B){var U=(B+1)%3,V=(B+2)%3,q=[],z=[],H;for(H=0;H<N.length;++H){var G=N[H];isNaN(G[U])||!isFinite(G[U])||isNaN(G[V])||!isFinite(G[V])||(q.push([G[U],G[V]]),z.push(H))}var J=t(q);for(H=0;H<J.length;++H)for(var le=J[H],ge=0;ge<le.length;++ge)le[ge]=z[le[ge]];return{positions:N,cells:J,meshColor:D}}function c(N){for(var D=[0,0,0],B=[[0,0,0],[0,0,0],[0,0,0]],U=[1,1,1],V=0;V<3;V++){var q=N[V];q&&q.copy_zstyle!==!1&&N[2].visible!==!1&&(q=N[2]),!(!q||!q.visible)&&(D[V]=q.width/2,B[V]=a(q.color),U[V]=q.thickness)}return{capSize:D,color:B,lineWidth:U}}function _(N){return N==null?0:N.indexOf("left")>-1?-1:N.indexOf("right")>-1?1:0}function T(N){return N==null?0:N.indexOf("top")>-1?-1:N.indexOf("bottom")>-1?1:0}function M(N){var D=0,B=0,U=[D,B];if(Array.isArray(N))for(var V=0;V<N.length;V++)U[V]=[D,B],N[V]&&(U[V][0]=_(N[V]),U[V][1]=T(N[V]));else U[0]=_(N),U[1]=T(N);return U}function k(N,D){return D(N*4)}function b(N){return o[N]}function A(N,D,B,U,V){var q=null;if(r.isArrayOrTypedArray(N)){q=[];for(var z=0;z<D;z++)N[z]===void 0?q[z]=U:q[z]=B(N[z],V)}else q=B(N,r.identity);return q}function y(N,D){var B=[],U=N.fullSceneLayout,V=N.dataScale,q=U.xaxis,z=U.yaxis,H=U.zaxis,G=D.marker,J=D.line,le=D.x||[],ge=D.y||[],de=D.z||[],me=le.length,W=D.xcalendar,ie=D.ycalendar,se=D.zcalendar,ee,pe,oe,Y,ce,ue;for(ce=0;ce<me;ce++)ee=q.d2l(le[ce],0,W)*V[0],pe=z.d2l(ge[ce],0,ie)*V[1],oe=H.d2l(de[ce],0,se)*V[2],B[ce]=[ee,pe,oe];if(Array.isArray(D.text))ue=D.text;else if(r.isTypedArray(D.text))ue=Array.from(D.text);else if(D.text!==void 0)for(ue=new Array(me),ce=0;ce<me;ce++)ue[ce]=D.text;function _e(yt,wt){var ht=U[yt];return u.tickText(ht,ht.d2l(wt),!0).text}var Le=D.texttemplate;if(Le){var ze=N.fullLayout,Xe=ze._d3locale,Ve=Array.isArray(Le),rt=Ve?Math.min(Le.length,me):me,mt=Ve?function(yt){return Le[yt]}:function(){return Le};for(ue=new Array(rt),ce=0;ce<rt;ce++){var _t={x:le[ce],y:ge[ce],z:de[ce]},vt={xLabel:_e("xaxis",le[ce]),yLabel:_e("yaxis",ge[ce]),zLabel:_e("zaxis",de[ce])},ut={};d(ut,D,ce),ue[ce]=r.texttemplateString({data:[ut,_t,D._meta],fallback:D.texttemplatefallback,labels:vt,locale:Xe,template:mt(ce)})}}if(Y={position:B,mode:D.mode,text:ue},"line"in D&&(Y.lineColor=l(J,1,me),Y.lineWidth=J.width,Y.lineDashes=J.dash),"marker"in D){var Fe=i(D);Y.scatterColor=l(G,1,me),Y.scatterSize=A(G.size,me,k,20,Fe),Y.scatterMarker=A(G.symbol,me,b,"●"),Y.scatterLineWidth=G.line.width,Y.scatterLineColor=l(G.line,1,me),Y.scatterAngle=0}"textposition"in D&&(Y.textOffset=M(D.textposition),Y.textColor=l(D.textfont,1,me),Y.textSize=A(D.textfont.size,me,r.identity,12),Y.textFontFamily=D.textfont.family,Y.textFontWeight=D.textfont.weight,Y.textFontStyle=D.textfont.style,Y.textFontVariant=D.textfont.variant,Y.textAngle=0);var Pe=["x","y","z"];for(Y.project=[!1,!1,!1],Y.projectScale=[1,1,1],Y.projectOpacity=[1,1,1],ce=0;ce<3;++ce){var be=D.projection[Pe[ce]];(Y.project[ce]=be.show)&&(Y.projectOpacity[ce]=be.opacity,Y.projectScale[ce]=be.scale)}Y.errorBounds=h(D,V,U);var Ye=c([D.error_x,D.error_y,D.error_z]);return Y.errorColor=Ye.color,Y.errorLineWidth=Ye.lineWidth,Y.errorCapSize=Ye.capSize,Y.delaunayAxis=D.surfaceaxis,Y.delaunayColor=a(D.surfacecolor),Y}function f(N){if(r.isArrayOrTypedArray(N)){var D=N[0];return r.isArrayOrTypedArray(D)&&(N=D),"rgb("+N.slice(0,3).map(function(B){return Math.round(B*255)})+")"}return null}function p(N){return r.isArrayOrTypedArray(N)?N.length===4&&typeof N[0]=="number"?f(N):N.map(f):null}m.update=function(N){var D=this.scene.glplot.gl,B,U,V,q,z=s.solid;this.data=N;var H=y(this.scene,N);"mode"in H&&(this.mode=H.mode),"lineDashes"in H&&H.lineDashes in s&&(z=s[H.lineDashes]),this.color=p(H.scatterColor)||p(H.lineColor),this.dataPoints=H.position,B={gl:this.scene.glplot.gl,position:H.position,color:H.lineColor,lineWidth:H.lineWidth||1,dashes:z[0],dashScale:z[1],opacity:N.opacity,connectGaps:N.connectgaps},this.mode.indexOf("lines")!==-1?this.linePlot?this.linePlot.update(B):(this.linePlot=v(B),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 G=N.opacity;if(N.marker&&N.marker.opacity!==void 0&&(G*=N.marker.opacity),U={gl:this.scene.glplot.gl,position:H.position,color:H.scatterColor,size:H.scatterSize,glyph:H.scatterMarker,opacity:G,orthographic:!0,lineWidth:H.scatterLineWidth,lineColor:H.scatterLineColor,project:H.project,projectScale:H.projectScale,projectOpacity:H.projectOpacity},this.mode.indexOf("markers")!==-1?this.scatterPlot?this.scatterPlot.update(U):(this.scatterPlot=w(U),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),q={gl:this.scene.glplot.gl,position:H.position,glyph:H.text,color:H.textColor,size:H.textSize,angle:H.textAngle,alignment:H.textOffset,font:H.textFontFamily,fontWeight:H.textFontWeight,fontStyle:H.textFontStyle,fontVariant:H.textFontVariant,orthographic:!0,lineWidth:0,project:!1,opacity:N.opacity},this.textLabels=N.hovertext||N.text,this.mode.indexOf("text")!==-1?this.textMarkers?this.textMarkers.update(q):(this.textMarkers=w(q),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),V={gl:this.scene.glplot.gl,position:H.position,color:H.errorColor,error:H.errorBounds,lineWidth:H.errorLineWidth,capSize:H.errorCapSize,opacity:N.opacity},this.errorBars?H.errorBounds?this.errorBars.update(V):(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose(),this.errorBars=null):H.errorBounds&&(this.errorBars=C(V),this.errorBars._trace=this,this.scene.glplot.add(this.errorBars)),H.delaunayAxis>=0){var J=E(H.position,H.delaunayColor,H.delaunayAxis);J.opacity=N.opacity,this.delaunayMesh?this.delaunayMesh.update(J):(J.gl=D,this.delaunayMesh=P(J),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)},m.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 x(N,D){var B=new g(N,D.uid);return B.update(D),B}Z.exports=x}}),rN=Ne({"src/traces/scatter3d/attributes.js"(te,Z){var v=tf(),w=bo(),C=Wu(),P=Ac().axisHoverFormat,{hovertemplateAttrs:t,texttemplateAttrs:r,templatefallbackAttrs:a}=Fl(),l=qo(),i=tN(),s=gR(),o=fi().extendFlat,u=ef().overrideAll,d=Sm(),h=v.line,g=v.marker,m=g.line,E=o({width:h.width,dash:{valType:"enumerated",values:d(i),dflt:"solid"}},C("line"));function c(T){return{show:{valType:"boolean",dflt:!1},opacity:{valType:"number",min:0,max:1,dflt:1},scale:{valType:"number",min:0,max:10,dflt:2/3}}}var _=Z.exports=u({x:v.x,y:v.y,z:{valType:"data_array"},text:o({},v.text,{}),texttemplate:r(),texttemplatefallback:a({editType:"calc"}),hovertext:o({},v.hovertext,{}),hovertemplate:t(),hovertemplatefallback:a(),xhoverformat:P("x"),yhoverformat:P("y"),zhoverformat:P("z"),mode:o({},v.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:"color"},projection:{x:c(),y:c(),z:c()},connectgaps:v.connectgaps,line:E,marker:o({symbol:{valType:"enumerated",values:d(s),dflt:"circle",arrayOk:!0},size:o({},g.size,{dflt:8}),sizeref:g.sizeref,sizemin:g.sizemin,sizemode:g.sizemode,opacity:o({},g.opacity,{arrayOk:!1}),colorbar:g.colorbar,line:o({width:o({},m.width,{arrayOk:!1})},C("marker.line"))},C("marker")),textposition:o({},v.textposition,{dflt:"top center"}),textfont:w({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,variantValues:["normal","small-caps"]}),opacity:l.opacity,hoverinfo:o({},l.hoverinfo)},"calc","nested");_.x.editType=_.y.editType=_.z.editType="calc+clearAxisTypes"}}),qK=Ne({"src/traces/scatter3d/defaults.js"(te,Z){var v=Yo(),w=In(),C=yu(),P=wv(),t=Im(),r=Wp(),a=rN();Z.exports=function(s,o,u,d){function h(k,b){return w.coerce(s,o,a,k,b)}var g=l(s,o,h,d);if(!g){o.visible=!1;return}h("text"),h("hovertext"),h("hovertemplate"),h("hovertemplatefallback"),h("xhoverformat"),h("yhoverformat"),h("zhoverformat"),h("mode"),C.hasMarkers(o)&&P(s,o,u,d,h,{noSelect:!0,noAngle:!0}),C.hasLines(o)&&(h("connectgaps"),t(s,o,u,d,h)),C.hasText(o)&&(h("texttemplate"),h("texttemplatefallback"),r(s,o,d,h,{noSelect:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var m=(o.line||{}).color,E=(o.marker||{}).color;h("surfaceaxis")>=0&&h("surfacecolor",m||E);for(var c=["x","y","z"],_=0;_<3;++_){var T="projection."+c[_];h(T+".show")&&(h(T+".opacity"),h(T+".scale"))}var M=v.getComponentMethod("errorbars","supplyDefaults");M(s,o,m||E||u,{axis:"z"}),M(s,o,m||E||u,{axis:"y",inherit:"z"}),M(s,o,m||E||u,{axis:"x",inherit:"z"})};function l(i,s,o,u){var d=0,h=o("x"),g=o("y"),m=o("z"),E=v.getComponentMethod("calendars","handleTraceDefaults");return E(i,s,["x","y","z"],u),h&&g&&m&&(d=Math.min(h.length,g.length,m.length),s._length=s._xlength=s._ylength=s._zlength=d),d}}}),VK=Ne({"src/traces/scatter3d/calc.js"(te,Z){var v=s0(),w=Yp();Z.exports=function(P,t){var r=[{x:!1,y:!1,trace:t,t:{}}];return v(r,t),w(P,t),r}}}),HK=Ne({"node_modules/get-canvas-context/index.js"(te,Z){Z.exports=v;function v(w,C){if(typeof w!="string")throw new TypeError("must specify type string");if(C=C||{},typeof document>"u"&&!C.canvas)return null;var P=C.canvas||document.createElement("canvas");typeof C.width=="number"&&(P.width=C.width),typeof C.height=="number"&&(P.height=C.height);var t=C,r;try{var a=[w];w.indexOf("webgl")===0&&a.push("experimental-"+w);for(var l=0;l<a.length;l++)if(r=P.getContext(a[l],t),r)return r}catch{r=null}return r||null}}}),GK=Ne({"node_modules/webgl-context/index.js"(te,Z){var v=HK();Z.exports=function(C){return v("webgl",C)}}}),nN=Ne({"src/lib/show_no_webgl_msg.js"(te,Z){var v=Ha(),w=function(){};Z.exports=function(P){for(var t in P)typeof P[t]=="function"&&(P[t]=w);P.destroy=function(){P.container.parentNode.removeChild(P.container)};var r=document.createElement("div");r.className="no-webgl",r.style.cursor="pointer",r.style.fontSize="24px",r.style.color=v.defaults[0],r.style.position="absolute",r.style.left=r.style.top="0px",r.style.width=r.style.height="100%",r.style["background-color"]=v.lightLine,r.style["z-index"]=30;var a=document.createElement("p");return a.textContent="WebGL is not supported by your browser - visit https://get.webgl.org for more info",a.style.position="relative",a.style.top="50%",a.style.left="50%",a.style.height="30%",a.style.width="50%",a.style.margin="-15% 0 0 -25%",r.appendChild(a),P.container.appendChild(r),P.container.style.background="#FFFFFF",P.container.onclick=function(){window.open("https://get.webgl.org")},!1}}}),XK=Ne({"src/plots/gl3d/layout/convert.js"(te,Z){var v=C_(),w=In(),C=["xaxis","yaxis","zaxis"];function P(){this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickSize=[12,12,12],this.tickFontWeight=["normal","normal","normal","normal"],this.tickFontStyle=["normal","normal","normal","normal"],this.tickFontVariant=["normal","normal","normal","normal"],this.tickAngle=[0,0,0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[18,18,18],this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["Open Sans","Open Sans","Open Sans"],this.labelSize=[20,20,20],this.labelFontWeight=["normal","normal","normal","normal"],this.labelFontStyle=["normal","normal","normal","normal"],this.labelFontVariant=["normal","normal","normal","normal"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[30,30,30],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[10,10,10],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!0,!0,!0],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._defaultTickPad=this.tickPad.slice(),this._defaultLabelPad=this.labelPad.slice(),this._defaultLineTickLength=this.lineTickLength.slice()}var t=P.prototype;t.merge=function(a,l){for(var i=this,s=0;s<3;++s){var o=l[C[s]];if(!o.visible){i.tickEnable[s]=!1,i.labelEnable[s]=!1,i.lineEnable[s]=!1,i.lineTickEnable[s]=!1,i.gridEnable[s]=!1,i.zeroEnable[s]=!1,i.backgroundEnable[s]=!1;continue}i.labels[s]=a._meta?w.templateString(o.title.text,a._meta):o.title.text,"font"in o.title&&(o.title.font.color&&(i.labelColor[s]=v(o.title.font.color)),o.title.font.family&&(i.labelFont[s]=o.title.font.family),o.title.font.size&&(i.labelSize[s]=o.title.font.size),o.title.font.weight&&(i.labelFontWeight[s]=o.title.font.weight),o.title.font.style&&(i.labelFontStyle[s]=o.title.font.style),o.title.font.variant&&(i.labelFontVariant[s]=o.title.font.variant)),"showline"in o&&(i.lineEnable[s]=o.showline),"linecolor"in o&&(i.lineColor[s]=v(o.linecolor)),"linewidth"in o&&(i.lineWidth[s]=o.linewidth),"showgrid"in o&&(i.gridEnable[s]=o.showgrid),"gridcolor"in o&&(i.gridColor[s]=v(o.gridcolor)),"gridwidth"in o&&(i.gridWidth[s]=o.gridwidth),o.type==="log"?i.zeroEnable[s]=!1:"zeroline"in o&&(i.zeroEnable[s]=o.zeroline),"zerolinecolor"in o&&(i.zeroLineColor[s]=v(o.zerolinecolor)),"zerolinewidth"in o&&(i.zeroLineWidth[s]=o.zerolinewidth),"ticks"in o&&o.ticks?i.lineTickEnable[s]=!0:i.lineTickEnable[s]=!1,"ticklen"in o&&(i.lineTickLength[s]=i._defaultLineTickLength[s]=o.ticklen),"tickcolor"in o&&(i.lineTickColor[s]=v(o.tickcolor)),"tickwidth"in o&&(i.lineTickWidth[s]=o.tickwidth),"tickangle"in o&&(i.tickAngle[s]=o.tickangle==="auto"?-3600:Math.PI*-o.tickangle/180),"showticklabels"in o&&(i.tickEnable[s]=o.showticklabels),"tickfont"in o&&(o.tickfont.color&&(i.tickColor[s]=v(o.tickfont.color)),o.tickfont.family&&(i.tickFont[s]=o.tickfont.family),o.tickfont.size&&(i.tickSize[s]=o.tickfont.size),o.tickfont.weight&&(i.tickFontWeight[s]=o.tickfont.weight),o.tickfont.style&&(i.tickFontStyle[s]=o.tickfont.style),o.tickfont.variant&&(i.tickFontVariant[s]=o.tickfont.variant)),"mirror"in o?["ticks","all","allticks"].indexOf(o.mirror)!==-1?(i.lineTickMirror[s]=!0,i.lineMirror[s]=!0):o.mirror===!0?(i.lineTickMirror[s]=!1,i.lineMirror[s]=!0):(i.lineTickMirror[s]=!1,i.lineMirror[s]=!1):i.lineMirror[s]=!1,"showbackground"in o&&o.showbackground!==!1?(i.backgroundEnable[s]=!0,i.backgroundColor[s]=v(o.backgroundcolor)):i.backgroundEnable[s]=!1}};function r(a,l){var i=new P;return i.merge(a,l),i}Z.exports=r}}),WK=Ne({"src/plots/gl3d/layout/spikes.js"(te,Z){var v=C_(),w=["xaxis","yaxis","zaxis"];function C(){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 P=C.prototype;P.merge=function(r){for(var a=0;a<3;++a){var l=r[w[a]];if(!l.visible){this.enabled[a]=!1,this.drawSides[a]=!1;continue}this.enabled[a]=l.showspikes,this.colors[a]=v(l.spikecolor),this.drawSides[a]=l.spikesides,this.lineWidth[a]=l.spikethickness}};function t(r){var a=new C;return a.merge(r),a}Z.exports=t}}),YK=Ne({"src/plots/gl3d/layout/tick_marks.js"(te,Z){Z.exports=t;var v=Os(),w=In(),C=["xaxis","yaxis","zaxis"];function P(r){for(var a=new Array(3),l=0;l<3;++l){for(var i=r[l],s=new Array(i.length),o=0;o<i.length;++o)s[o]=i[o].x;a[l]=s}return a}function t(r){for(var a=r.axesOptions,l=r.glplot.axesPixels,i=r.fullSceneLayout,s=[[],[],[]],o=0;o<3;++o){var u=i[C[o]];if(u._length=(l[o].hi-l[o].lo)*l[o].pixelsPerDataUnit/r.dataScale[o],Math.abs(u._length)===1/0||isNaN(u._length))s[o]=[];else{u._input_range=u.range.slice(),u.range[0]=l[o].lo/r.dataScale[o],u.range[1]=l[o].hi/r.dataScale[o],u._m=1/(r.dataScale[o]*l[o].pixelsPerDataUnit),u.range[0]===u.range[1]&&(u.range[0]-=1,u.range[1]+=1);var d=u.tickmode;if(u.tickmode==="auto"){u.tickmode="linear";var h=u.nticks||w.constrain(u._length/40,4,9);v.autoTicks(u,Math.abs(u.range[1]-u.range[0])/h)}for(var g=v.calcTicks(u,{msUTC:!0}),m=0;m<g.length;++m)g[m].x=g[m].x*r.dataScale[o],u.type==="date"&&(g[m].text=g[m].text.replace(/\<br\>/g," "));s[o]=g,u.tickmode=d}}a.ticks=s;for(var o=0;o<3;++o){.5*(r.glplot.bounds[0][o]+r.glplot.bounds[1][o]);for(var m=0;m<2;++m)a.bounds[m][o]=r.glplot.bounds[m][o]}r.contourLevels=P(s)}}}),ZK=Ne({"src/plots/gl3d/scene.js"(te,Z){var v=Gv().gl_plot3d,w=v.createCamera,C=v.createScene,P=GK(),t=nA(),r=Yo(),a=In(),l=a.preserveDrawingBuffer(),i=Os(),s=oh(),o=C_(),u=nN(),d=Ry(),h=XK(),g=WK(),m=YK(),E=Cm().applyAutorangeOptions,c,_,T=!1;function M(B,U){var V=document.createElement("div"),q=B.container;this.graphDiv=B.graphDiv;var z=document.createElementNS("http://www.w3.org/2000/svg","svg");z.style.position="absolute",z.style.top=z.style.left="0px",z.style.width=z.style.height="100%",z.style["z-index"]=20,z.style["pointer-events"]="none",V.appendChild(z),this.svgContainer=z,V.id=B.id,V.style.position="absolute",V.style.top=V.style.left="0px",V.style.width=V.style.height="100%",q.appendChild(V),this.fullLayout=U,this.id=B.id||"scene",this.fullSceneLayout=U[this.id],this.plotArgs=[[],{},{}],this.axesOptions=h(U,U[this.id]),this.spikeOptions=g(U[this.id]),this.container=V,this.staticMode=!!B.staticPlot,this.pixelRatio=this.pixelRatio||B.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=r.getComponentMethod("annotations3d","convert"),this.drawAnnotations=r.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var k=M.prototype;k.prepareOptions=function(){var B=this,U={canvas:B.canvas,gl:B.gl,glOptions:{preserveDrawingBuffer:l,premultipliedAlpha:!0,antialias:!0},container:B.container,axes:B.axesOptions,spikes:B.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:B.camera,pixelRatio:B.pixelRatio};if(B.staticMode){if(!_&&(c=document.createElement("canvas"),_=P({canvas:c,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!_))throw new Error("error creating static canvas/context for image server");U.gl=_,U.canvas=c}return U};var b=!0;k.tryCreatePlot=function(){var B=this,U=B.prepareOptions(),V=!0;try{B.glplot=C(U)}catch{if(B.staticMode||!b||l)V=!1;else{a.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{l=U.glOptions.preserveDrawingBuffer=!0,B.glplot=C(U)}catch{l=U.glOptions.preserveDrawingBuffer=!1,V=!1}}}return b=!1,V},k.initializeGLCamera=function(){var B=this,U=B.fullSceneLayout.camera,V=U.projection.type==="orthographic";B.camera=w(B.container,{center:[U.center.x,U.center.y,U.center.z],eye:[U.eye.x,U.eye.y,U.eye.z],up:[U.up.x,U.up.y,U.up.z],_ortho:V,zoomMin:.01,zoomMax:100,mode:"orbit"})},k.initializeGLPlot=function(){var B=this;B.initializeGLCamera();var U=B.tryCreatePlot();if(!U)return u(B);B.traces={},B.make4thDimension();var V=B.graphDiv,q=V.layout,z=function(){var G={};return B.isCameraChanged(q)&&(G[B.id+".camera"]=B.getCamera()),B.isAspectChanged(q)&&(G[B.id+".aspectratio"]=B.glplot.getAspectratio(),q[B.id].aspectmode!=="manual"&&(B.fullSceneLayout.aspectmode=q[B.id].aspectmode=G[B.id+".aspectmode"]="manual")),G},H=function(G){if(G.fullSceneLayout.dragmode!==!1){var J=z();G.saveLayout(q),G.graphDiv.emit("plotly_relayout",J)}};return B.glplot.canvas&&(B.glplot.canvas.addEventListener("mouseup",function(){H(B)}),B.glplot.canvas.addEventListener("touchstart",function(){T=!0}),B.glplot.canvas.addEventListener("wheel",function(G){if(V._context._scrollZoom.gl3d){if(B.camera._ortho){var J=G.deltaX>G.deltaY?1.1:.9090909090909091,le=B.glplot.getAspectratio();B.glplot.setAspectratio({x:J*le.x,y:J*le.y,z:J*le.z})}H(B)}},t?{passive:!1}:!1),B.glplot.canvas.addEventListener("mousemove",function(){if(B.fullSceneLayout.dragmode!==!1&&B.camera.mouseListener.buttons!==0){var G=z();B.graphDiv.emit("plotly_relayouting",G)}}),B.staticMode||B.glplot.canvas.addEventListener("webglcontextlost",function(G){V&&V.emit&&V.emit("plotly_webglcontextlost",{event:G,layer:B.id})},!1)),B.glplot.oncontextloss=function(){B.recoverContext()},B.glplot.onrender=function(){B.render()},!0},k.render=function(){var B=this,U=B.graphDiv,V,q=B.svgContainer,z=B.container.getBoundingClientRect();U._fullLayout._calcInverseTransform(U);var H=U._fullLayout._invScaleX,G=U._fullLayout._invScaleY,J=z.width*H,le=z.height*G;q.setAttributeNS(null,"viewBox","0 0 "+J+" "+le),q.setAttributeNS(null,"width",J),q.setAttributeNS(null,"height",le),m(B),B.glplot.axes.update(B.axesOptions);for(var ge=Object.keys(B.traces),de=null,me=B.glplot.selection,W=0;W<ge.length;++W)V=B.traces[ge[W]],V.data.hoverinfo!=="skip"&&V.handlePick(me)&&(de=V),V.setContourLevels&&V.setContourLevels();function ie(rt,mt,_t){var vt=B.fullSceneLayout[rt+"axis"];return vt.type!=="log"&&(mt=vt.d2l(mt)),i.hoverLabelText(vt,mt,_t)}if(de!==null){var se=d(B.glplot.cameraParams,me.dataCoordinate);V=de.data;var ee=U._fullData[V.index],pe=me.index,oe={xLabel:ie("x",me.traceCoordinate[0],V.xhoverformat),yLabel:ie("y",me.traceCoordinate[1],V.yhoverformat),zLabel:ie("z",me.traceCoordinate[2],V.zhoverformat)},Y=s.castHoverinfo(ee,B.fullLayout,pe),ce=(Y||"").split("+"),ue=Y&&Y==="all";!ee.hovertemplate&&!ue&&(ce.indexOf("x")===-1&&(oe.xLabel=void 0),ce.indexOf("y")===-1&&(oe.yLabel=void 0),ce.indexOf("z")===-1&&(oe.zLabel=void 0),ce.indexOf("text")===-1&&(me.textLabel=void 0),ce.indexOf("name")===-1&&(de.name=void 0));var _e,Le=[];V.type==="cone"||V.type==="streamtube"?(oe.uLabel=ie("x",me.traceCoordinate[3],V.uhoverformat),(ue||ce.indexOf("u")!==-1)&&Le.push("u: "+oe.uLabel),oe.vLabel=ie("y",me.traceCoordinate[4],V.vhoverformat),(ue||ce.indexOf("v")!==-1)&&Le.push("v: "+oe.vLabel),oe.wLabel=ie("z",me.traceCoordinate[5],V.whoverformat),(ue||ce.indexOf("w")!==-1)&&Le.push("w: "+oe.wLabel),oe.normLabel=me.traceCoordinate[6].toPrecision(3),(ue||ce.indexOf("norm")!==-1)&&Le.push("norm: "+oe.normLabel),V.type==="streamtube"&&(oe.divergenceLabel=me.traceCoordinate[7].toPrecision(3),(ue||ce.indexOf("divergence")!==-1)&&Le.push("divergence: "+oe.divergenceLabel)),me.textLabel&&Le.push(me.textLabel),_e=Le.join("<br>")):V.type==="isosurface"||V.type==="volume"?(oe.valueLabel=i.hoverLabelText(B._mockAxis,B._mockAxis.d2l(me.traceCoordinate[3]),V.valuehoverformat),Le.push("value: "+oe.valueLabel),me.textLabel&&Le.push(me.textLabel),_e=Le.join("<br>")):_e=me.textLabel;var ze={x:me.traceCoordinate[0],y:me.traceCoordinate[1],z:me.traceCoordinate[2],data:ee._input,fullData:ee,curveNumber:ee.index,pointNumber:pe};s.appendArrayPointValue(ze,ee,pe),V._module.eventData&&(ze=ee._module.eventData(ze,me,ee,{},pe));var Xe={points:[ze]};if(B.fullSceneLayout.hovermode){var Ve=[];s.loneHover({trace:ee,x:(.5+.5*se[0]/se[3])*J,y:(.5-.5*se[1]/se[3])*le,xLabel:oe.xLabel,yLabel:oe.yLabel,zLabel:oe.zLabel,text:_e,name:de.name,color:s.castHoverOption(ee,pe,"bgcolor")||de.color,borderColor:s.castHoverOption(ee,pe,"bordercolor"),fontFamily:s.castHoverOption(ee,pe,"font.family"),fontSize:s.castHoverOption(ee,pe,"font.size"),fontColor:s.castHoverOption(ee,pe,"font.color"),nameLength:s.castHoverOption(ee,pe,"namelength"),textAlign:s.castHoverOption(ee,pe,"align"),hovertemplate:a.castOption(ee,pe,"hovertemplate"),hovertemplateLabels:a.extendFlat({},ze,oe),eventData:[ze]},{container:q,gd:U,inOut_bbox:Ve}),ze.bbox=Ve[0]}me.distance<5&&(me.buttons||T)?U.emit("plotly_click",Xe):U.emit("plotly_hover",Xe),this.oldEventData=Xe}else s.loneUnhover(q),this.oldEventData&&U.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;B.drawAnnotations(B)},k.recoverContext=function(){var B=this;B.glplot.dispose();var U=function(){if(B.glplot.gl.isContextLost()){requestAnimationFrame(U);return}if(!B.initializeGLPlot()){a.error("Catastrophic and unrecoverable WebGL error. Context lost.");return}B.plot.apply(B,B.plotArgs)};requestAnimationFrame(U)};var A=["xaxis","yaxis","zaxis"];function y(B,U,V){for(var q=B.fullSceneLayout,z=0;z<3;z++){var H=A[z],G=H.charAt(0),J=q[H],le=U[G],ge=U[G+"calendar"],de=U["_"+G+"length"];if(!a.isArrayOrTypedArray(le))V[0][z]=Math.min(V[0][z],0),V[1][z]=Math.max(V[1][z],de-1);else for(var me,W=0;W<(de||le.length);W++)if(a.isArrayOrTypedArray(le[W]))for(var ie=0;ie<le[W].length;++ie)me=J.d2l(le[W][ie],0,ge),!isNaN(me)&&isFinite(me)&&(V[0][z]=Math.min(V[0][z],me),V[1][z]=Math.max(V[1][z],me));else me=J.d2l(le[W],0,ge),!isNaN(me)&&isFinite(me)&&(V[0][z]=Math.min(V[0][z],me),V[1][z]=Math.max(V[1][z],me))}}function f(B,U){for(var V=B.fullSceneLayout,q=V.annotations||[],z=0;z<3;z++)for(var H=A[z],G=H.charAt(0),J=V[H],le=0;le<q.length;le++){var ge=q[le];if(ge.visible){var de=J.r2l(ge[G]);!isNaN(de)&&isFinite(de)&&(U[0][z]=Math.min(U[0][z],de),U[1][z]=Math.max(U[1][z],de))}}}k.plot=function(B,U,V){var q=this;if(q.plotArgs=[B,U,V],!q.glplot.contextLost){var z,H,G,J,le,ge,de=U[q.id],me=V[q.id];q.fullLayout=U,q.fullSceneLayout=de,q.axesOptions.merge(U,de),q.spikeOptions.merge(de),q.setViewport(de),q.updateFx(de.dragmode,de.hovermode),q.camera.enableWheel=q.graphDiv._context._scrollZoom.gl3d,q.glplot.setClearColor(o(de.bgcolor)),q.setConvert(le),B?Array.isArray(B)||(B=[B]):B=[];var W=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(G=0;G<B.length;++G)z=B[G],!(z.visible!==!0||z._length===0)&&y(this,z,W);f(this,W);var ie=[1,1,1];for(J=0;J<3;++J)W[1][J]===W[0][J]?ie[J]=1:ie[J]=1/(W[1][J]-W[0][J]);for(q.dataScale=ie,q.convertAnnotations(this),G=0;G<B.length;++G)z=B[G],!(z.visible!==!0||z._length===0)&&(H=q.traces[z.uid],H?H.data.type===z.type?H.update(z):(H.dispose(),H=z._module.plot(this,z),q.traces[z.uid]=H):(H=z._module.plot(this,z),q.traces[z.uid]=H),H.name=z.name);var se=Object.keys(q.traces);e:for(G=0;G<se.length;++G){for(J=0;J<B.length;++J)if(B[J].uid===se[G]&&B[J].visible===!0&&B[J]._length!==0)continue e;H=q.traces[se[G]],H.dispose(),delete q.traces[se[G]]}q.glplot.objects.sort(function(wt,ht){return wt._trace.data.index-ht._trace.data.index});var ee=[[0,0,0],[0,0,0]],pe={};for(G=0;G<3;++G){le=de[A[G]],ge=le.type,ge in pe?(pe[ge].acc*=ie[G],pe[ge].count+=1):pe[ge]={acc:ie[G],count:1};var oe;if(le.autorange){ee[0][G]=1/0,ee[1][G]=-1/0;var Y=q.glplot.objects,ce=q.fullSceneLayout.annotations||[],ue=le._name.charAt(0);for(J=0;J<Y.length;J++){var _e=Y[J],Le=_e.bounds,ze=_e._trace.data._pad||0;_e.constructor.name==="ErrorBars"&&le._lowerLogErrorBound?ee[0][G]=Math.min(ee[0][G],le._lowerLogErrorBound):ee[0][G]=Math.min(ee[0][G],Le[0][G]/ie[G]-ze),ee[1][G]=Math.max(ee[1][G],Le[1][G]/ie[G]+ze)}for(J=0;J<ce.length;J++){var Xe=ce[J];if(Xe.visible){var Ve=le.r2l(Xe[ue]);ee[0][G]=Math.min(ee[0][G],Ve),ee[1][G]=Math.max(ee[1][G],Ve)}}if("rangemode"in le&&le.rangemode==="tozero"&&(ee[0][G]=Math.min(ee[0][G],0),ee[1][G]=Math.max(ee[1][G],0)),ee[0][G]>ee[1][G])ee[0][G]=-1,ee[1][G]=1;else{var rt=ee[1][G]-ee[0][G];ee[0][G]-=rt/32,ee[1][G]+=rt/32}if(oe=[ee[0][G],ee[1][G]],oe=E(oe,le),ee[0][G]=oe[0],ee[1][G]=oe[1],le.isReversed()){var mt=ee[0][G];ee[0][G]=ee[1][G],ee[1][G]=mt}}else oe=le.range,ee[0][G]=le.r2l(oe[0]),ee[1][G]=le.r2l(oe[1]);ee[0][G]===ee[1][G]&&(ee[0][G]-=1,ee[1][G]+=1),le.range=[ee[0][G],ee[1][G]],le.limitRange(),q.glplot.setBounds(G,{min:le.range[0]*ie[G],max:le.range[1]*ie[G]})}var _t,vt=de.aspectmode;if(vt==="cube")_t=[1,1,1];else if(vt==="manual"){var ut=de.aspectratio;_t=[ut.x,ut.y,ut.z]}else if(vt==="auto"||vt==="data"){var Fe=[1,1,1];for(G=0;G<3;++G){le=de[A[G]],ge=le.type;var Pe=pe[ge];Fe[G]=Math.pow(Pe.acc,1/Pe.count)/ie[G]}vt==="data"||Math.max.apply(null,Fe)/Math.min.apply(null,Fe)<=4?_t=Fe:_t=[1,1,1]}else throw new Error("scene.js aspectRatio was not one of the enumerated types");de.aspectratio.x=me.aspectratio.x=_t[0],de.aspectratio.y=me.aspectratio.y=_t[1],de.aspectratio.z=me.aspectratio.z=_t[2],q.glplot.setAspectratio(de.aspectratio),q.viewInitial.aspectratio||(q.viewInitial.aspectratio={x:de.aspectratio.x,y:de.aspectratio.y,z:de.aspectratio.z}),q.viewInitial.aspectmode||(q.viewInitial.aspectmode=de.aspectmode);var be=de.domain||null,Ye=U._size||null;if(be&&Ye){var yt=q.container.style;yt.position="absolute",yt.left=Ye.l+be.x[0]*Ye.w+"px",yt.top=Ye.t+(1-be.y[1])*Ye.h+"px",yt.width=Ye.w*(be.x[1]-be.x[0])+"px",yt.height=Ye.h*(be.y[1]-be.y[0])+"px"}q.glplot.redraw()}},k.destroy=function(){var B=this;B.glplot&&(B.camera.mouseListener.enabled=!1,B.container.removeEventListener("wheel",B.camera.wheelListener),B.camera=null,B.glplot.dispose(),B.container.parentNode.removeChild(B.container),B.glplot=null)};function p(B){return[[B.eye.x,B.eye.y,B.eye.z],[B.center.x,B.center.y,B.center.z],[B.up.x,B.up.y,B.up.z]]}function x(B){return{up:{x:B.up[0],y:B.up[1],z:B.up[2]},center:{x:B.center[0],y:B.center[1],z:B.center[2]},eye:{x:B.eye[0],y:B.eye[1],z:B.eye[2]},projection:{type:B._ortho===!0?"orthographic":"perspective"}}}k.getCamera=function(){var B=this;return B.camera.view.recalcMatrix(B.camera.view.lastT()),x(B.camera)},k.setViewport=function(B){var U=this,V=B.camera;U.camera.lookAt.apply(this,p(V)),U.glplot.setAspectratio(B.aspectratio);var q=V.projection.type==="orthographic",z=U.camera._ortho;q!==z&&(U.glplot.redraw(),U.glplot.clearRGBA(),U.glplot.dispose(),U.initializeGLPlot())},k.isCameraChanged=function(B){var U=this,V=U.getCamera(),q=a.nestedProperty(B,U.id+".camera"),z=q.get();function H(ge,de,me,W){var ie=["up","center","eye"],se=["x","y","z"];return de[ie[me]]&&ge[ie[me]][se[W]]===de[ie[me]][se[W]]}var G=!1;if(z===void 0)G=!0;else{for(var J=0;J<3;J++)for(var le=0;le<3;le++)if(!H(V,z,J,le)){G=!0;break}(!z.projection||V.projection&&V.projection.type!==z.projection.type)&&(G=!0)}return G},k.isAspectChanged=function(B){var U=this,V=U.glplot.getAspectratio(),q=a.nestedProperty(B,U.id+".aspectratio"),z=q.get();return z===void 0||z.x!==V.x||z.y!==V.y||z.z!==V.z},k.saveLayout=function(B){var U=this,V=U.fullLayout,q,z,H,G,J,le,ge=U.isCameraChanged(B),de=U.isAspectChanged(B),me=ge||de;if(me){var W={};if(ge&&(q=U.getCamera(),z=a.nestedProperty(B,U.id+".camera"),H=z.get(),W[U.id+".camera"]=H),de&&(G=U.glplot.getAspectratio(),J=a.nestedProperty(B,U.id+".aspectratio"),le=J.get(),W[U.id+".aspectratio"]=le),r.call("_storeDirectGUIEdit",B,V._preGUI,W),ge){z.set(q);var ie=a.nestedProperty(V,U.id+".camera");ie.set(q)}if(de){J.set(G);var se=a.nestedProperty(V,U.id+".aspectratio");se.set(G),U.glplot.redraw()}}return me},k.updateFx=function(B,U){var V=this,q=V.camera;if(q)if(B==="orbit")q.mode="orbit",q.keyBindingMode="rotate";else if(B==="turntable"){q.up=[0,0,1],q.mode="turntable",q.keyBindingMode="rotate";var z=V.graphDiv,H=z._fullLayout,G=V.fullSceneLayout.camera,J=G.up.x,le=G.up.y,ge=G.up.z;if(ge/Math.sqrt(J*J+le*le+ge*ge)<.999){var de=V.id+".camera.up",me={x:0,y:0,z:1},W={};W[de]=me;var ie=z.layout;r.call("_storeDirectGUIEdit",ie,H._preGUI,W),G.up=me,a.nestedProperty(ie,de).set(me)}}else q.keyBindingMode=B;V.fullSceneLayout.hovermode=U};function N(B,U,V){for(var q=0,z=V-1;q<z;++q,--z)for(var H=0;H<U;++H)for(var G=0;G<4;++G){var J=4*(U*q+H)+G,le=4*(U*z+H)+G,ge=B[J];B[J]=B[le],B[le]=ge}}function D(B,U,V){for(var q=0;q<V;++q)for(var z=0;z<U;++z){var H=4*(U*q+z),G=B[H+3];if(G>0)for(var J=255/G,le=0;le<3;++le)B[H+le]=Math.min(J*B[H+le],255)}}k.toImage=function(B){var U=this;B||(B="png"),U.staticMode&&U.container.appendChild(c),U.glplot.redraw();var V=U.glplot.gl,q=V.drawingBufferWidth,z=V.drawingBufferHeight;V.bindFramebuffer(V.FRAMEBUFFER,null);var H=new Uint8Array(q*z*4);V.readPixels(0,0,q,z,V.RGBA,V.UNSIGNED_BYTE,H),N(H,q,z),D(H,q,z);var G=document.createElement("canvas");G.width=q,G.height=z;var J=G.getContext("2d",{willReadFrequently:!0}),le=J.createImageData(q,z);le.data.set(H),J.putImageData(le,0,0);var ge;switch(B){case"jpeg":ge=G.toDataURL("image/jpeg");break;case"webp":ge=G.toDataURL("image/webp");break;default:ge=G.toDataURL("image/png")}return U.staticMode&&U.container.removeChild(c),ge},k.setConvert=function(){for(var B=this,U=0;U<3;U++){var V=B.fullSceneLayout[A[U]];i.setConvert(V,B.fullLayout),V.setScale=a.noop}},k.make4thDimension=function(){var B=this,U=B.graphDiv,V=U._fullLayout;B._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},i.setConvert(B._mockAxis,V)},Z.exports=M}}),$K=Ne({"src/plots/gl3d/layout/attributes.js"(te,Z){Z.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}}}),aN=Ne({"src/plots/gl3d/layout/axis_attributes.js"(te,Z){var v=Ha(),w=Sd(),C=fi().extendFlat,P=ef().overrideAll;Z.exports=P({visible:w.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:v.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:w.color,categoryorder:w.categoryorder,categoryarray:w.categoryarray,title:{text:w.title.text,font:w.title.font},type:C({},w.type,{values:["-","linear","log","date","category"]}),autotypenumbers:w.autotypenumbers,autorange:w.autorange,autorangeoptions:{minallowed:w.autorangeoptions.minallowed,maxallowed:w.autorangeoptions.maxallowed,clipmin:w.autorangeoptions.clipmin,clipmax:w.autorangeoptions.clipmax,include:w.autorangeoptions.include,editType:"plot"},rangemode:w.rangemode,minallowed:w.minallowed,maxallowed:w.maxallowed,range:C({},w.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:w.minor.tickmode,nticks:w.nticks,tick0:w.tick0,dtick:w.dtick,tickvals:w.tickvals,ticktext:w.ticktext,ticks:w.ticks,mirror:w.mirror,ticklen:w.ticklen,tickwidth:w.tickwidth,tickcolor:w.tickcolor,showticklabels:w.showticklabels,labelalias:w.labelalias,tickfont:w.tickfont,tickangle:w.tickangle,tickprefix:w.tickprefix,showtickprefix:w.showtickprefix,ticksuffix:w.ticksuffix,showticksuffix:w.showticksuffix,showexponent:w.showexponent,exponentformat:w.exponentformat,minexponent:w.minexponent,separatethousands:w.separatethousands,tickformat:w.tickformat,tickformatstops:w.tickformatstops,hoverformat:w.hoverformat,showline:w.showline,linecolor:w.linecolor,linewidth:w.linewidth,showgrid:w.showgrid,gridcolor:C({},w.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:w.gridwidth,zeroline:w.zeroline,zerolinecolor:w.zerolinecolor,zerolinewidth:w.zerolinewidth},"plot","from-root")}}),iN=Ne({"src/plots/gl3d/layout/layout_attributes.js"(te,Z){var v=aN(),w=Fc().attributes,C=fi().extendFlat,P=In().counterRegex;function t(r,a,l){return{x:{valType:"number",dflt:r,editType:"camera"},y:{valType:"number",dflt:a,editType:"camera"},z:{valType:"number",dflt:l,editType:"camera"},editType:"camera"}}Z.exports={_arrayAttrRegexps:[P("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:C(t(0,0,1),{}),center:C(t(0,0,0),{}),eye:C(t(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:w({name:"scene",editType:"plot"}),aspectmode:{valType:"enumerated",values:["auto","cube","data","manual"],dflt:"auto",editType:"plot",impliedEdits:{"aspectratio.x":void 0,"aspectratio.y":void 0,"aspectratio.z":void 0}},aspectratio:{x:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},y:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},z:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},editType:"plot",impliedEdits:{aspectmode:"manual"}},xaxis:v,yaxis:v,zaxis:v,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"}}}),KK=Ne({"src/plots/gl3d/layout/axis_defaults.js"(te,Z){var v=to().mix,w=In(),C=Cu(),P=aN(),t=cv(),r=Om(),a=["xaxis","yaxis","zaxis"],l=13600/187;Z.exports=function(s,o,u){var d,h;function g(c,_){return w.coerce(d,h,P,c,_)}for(var m=0;m<a.length;m++){var E=a[m];d=s[E]||{},h=C.newContainer(o,E),h._id=E[0]+u.scene,h._name=E,t(d,h,g,u),r(d,h,g,{font:u.font,letter:E[0],data:u.data,showGrid:!0,noAutotickangles:!0,noMinorloglabels:!0,noTicklabelindex:!0,noTickson:!0,noTicklabelmode:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,noTicklabelstep:!0,noTicklabelposition:!0,noTicklabeloverflow:!0,noInsiderange:!0,noUnifiedhovertitle:!0,bgColor:u.bgColor,calendar:u.calendar},u.fullLayout),g("gridcolor",v(h.color,u.bgColor,l).toRgbString()),g("title.text",E[0]),h.setScale=w.noop,g("showspikes")&&(g("spikesides"),g("spikethickness"),g("spikecolor",h.color)),g("showaxeslabels"),g("showbackground")&&g("backgroundcolor")}}}}),JK=Ne({"src/plots/gl3d/layout/defaults.js"(te,Z){var v=In(),w=Ha(),C=Yo(),P=W0(),t=KK(),r=iN(),a=lv().getSubplotData,l="gl3d";Z.exports=function(o,u,d){var h=u._basePlotModules.length>1;function g(m){if(!h){var E=v.validate(o[m],r[m]);if(E)return o[m]}}P(o,u,d,{type:l,attributes:r,handleDefaults:i,fullLayout:u,font:u.font,fullData:d,getDfltFromLayout:g,autotypenumbersDflt:u.autotypenumbers,paper_bgcolor:u.paper_bgcolor,calendar:u.calendar})};function i(s,o,u,d){for(var h=u("bgcolor"),g=w.combine(h,d.paper_bgcolor),m=["up","center","eye"],E=0;E<m.length;E++)u("camera."+m[E]+".x"),u("camera."+m[E]+".y"),u("camera."+m[E]+".z");u("camera.projection.type");var c=!!u("aspectratio.x")&&!!u("aspectratio.y")&&!!u("aspectratio.z"),_=c?"manual":"auto",T=u("aspectmode",_);c||(s.aspectratio=o.aspectratio={x:1,y:1,z:1},T==="manual"&&(o.aspectmode="auto"),s.aspectmode=o.aspectmode);var M=a(d.fullData,l,d.id);t(s,o,{font:d.font,scene:d.id,data:M,bgColor:g,calendar:d.calendar,autotypenumbersDflt:d.autotypenumbersDflt,fullLayout:d.fullLayout}),C.getComponentMethod("annotations3d","handleDefaults")(s,o,d);var k=d.getDfltFromLayout("dragmode");if(k!==!1&&!k)if(k="orbit",s.camera&&s.camera.up){var b=s.camera.up.x,A=s.camera.up.y,y=s.camera.up.z;y!==0&&(!b||!A||!y||y/Math.sqrt(b*b+A*A+y*y)>.999)&&(k="turntable")}else k="turntable";u("dragmode",k),u("hovermode",d.getDfltFromLayout("hovermode"))}}}),Ib=Ne({"src/plots/gl3d/index.js"(te){var Z=ef().overrideAll,v=Mo(),w=ZK(),C=lv().getSubplotData,P=In(),t=hp(),r="gl3d",a="scene";te.name=r,te.attr=a,te.idRoot=a,te.idRegex=te.attrRegex=P.counterRegex("scene"),te.attributes=$K(),te.layoutAttributes=iN(),te.baseLayoutAttrOverrides=Z({hoverlabel:v.hoverlabel},"plot","nested"),te.supplyLayoutDefaults=JK(),te.plot=function(i){for(var s=i._fullLayout,o=i._fullData,u=s._subplots[r],d=0;d<u.length;d++){var h=u[d],g=C(o,r,h),m=s[h],E=m.camera,c=m._scene;c||(c=new w({id:h,graphDiv:i,container:i.querySelector(".gl-container"),staticPlot:i._context.staticPlot,plotGlPixelRatio:i._context.plotGlPixelRatio,camera:E},s),m._scene=c),c.viewInitial||(c.viewInitial={up:{x:E.up.x,y:E.up.y,z:E.up.z},eye:{x:E.eye.x,y:E.eye.y,z:E.eye.z},center:{x:E.center.x,y:E.center.y,z:E.center.z}}),c.plot(g,s,i.layout)}},te.clean=function(l,i,s,o){for(var u=o._subplots[r]||[],d=0;d<u.length;d++){var h=u[d];!i[h]&&o[h]._scene&&(o[h]._scene.destroy(),o._infolayer&&o._infolayer.selectAll(".annotation-"+h).remove())}},te.toSVG=function(l){for(var i=l._fullLayout,s=i._subplots[r],o=i._size,u=0;u<s.length;u++){var d=i[s[u]],h=d.domain,g=d._scene,m=g.toImage("png"),E=i._glimages.append("svg:image");E.attr({xmlns:t.svg,"xlink:href":m,x:o.l+o.w*h.x[0],y:o.t+o.h*(1-h.y[1]),width:o.w*(h.x[1]-h.x[0]),height:o.h*(h.y[1]-h.y[0]),preserveAspectRatio:"none"}),g.destroy()}},te.cleanId=function(i){if(i.match(/^scene[0-9]*$/)){var s=i.substr(5);return s==="1"&&(s=""),a+s}},te.updateFx=function(l){for(var i=l._fullLayout,s=i._subplots[r],o=0;o<s.length;o++){var u=i[s[o]]._scene;u.updateFx(i.dragmode,i.hovermode)}}}}),QK=Ne({"src/traces/scatter3d/index.js"(te,Z){Z.exports={plot:UK(),attributes:rN(),markerSymbols:gR(),supplyDefaults:qK(),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:VK(),moduleType:"trace",name:"scatter3d",basePlotModule:Ib(),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{}}}}),eJ=Ne({"lib/scatter3d.js"(te,Z){Z.exports=QK()}}),lk=Ne({"src/traces/surface/attributes.js"(te,Z){var v=Ha(),w=Wu(),C=Ac().axisHoverFormat,{hovertemplateAttrs:P,templatefallbackAttrs:t}=Fl(),r=qo(),a=fi().extendFlat,l=ef().overrideAll;function i(u){return{valType:"boolean",dflt:!1}}function s(u){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:i(),y:i(),z:i()},color:{valType:"color",dflt:v.defaultLine},usecolormap:{valType:"boolean",dflt:!1},width:{valType:"number",min:1,max:16,dflt:2},highlight:{valType:"boolean",dflt:!0},highlightcolor:{valType:"color",dflt:v.defaultLine},highlightwidth:{valType:"number",min:1,max:16,dflt:2}}}var o=Z.exports=l(a({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:P(),hovertemplatefallback:t(),xhoverformat:C("x"),yhoverformat:C("y"),zhoverformat:C("z"),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},w("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:s(),y:s(),z:s()},hidesurface:{valType:"boolean",dflt:!1},lightposition:{x:{valType:"number",min:-1e5,max:1e5,dflt:10},y:{valType:"number",min:-1e5,max:1e5,dflt:1e4},z:{valType:"number",min:-1e5,max:1e5,dflt:0}},lighting:{ambient:{valType:"number",min:0,max:1,dflt:.8},diffuse:{valType:"number",min:0,max:1,dflt:.8},specular:{valType:"number",min:0,max:2,dflt:.05,description:"Represents the level that incident rays are reflected in a single direction, causing shine."},roughness:{valType:"number",min:0,max:1,dflt:.5,description:"Alters specular reflection; the rougher the surface, the wider and less contrasty the shine."},fresnel:{valType:"number",min:0,max:5,dflt:.2}},opacity:{valType:"number",min:0,max:1,dflt:1},opacityscale:{valType:"any",editType:"calc"},hoverinfo:a({},r.hoverinfo),showlegend:a({},r.showlegend,{dflt:!1})}),"calc","nested");o.x.editType=o.y.editType=o.z.editType="calc+clearAxisTypes"}}),oN=Ne({"src/traces/surface/defaults.js"(te,Z){var v=Yo(),w=In(),C=Rh(),P=lk(),t=.1;function r(s,o){for(var u=[],d=32,h=0;h<d;h++){var g=h/(d-1),m=o+(1-o)*(1-Math.pow(Math.sin(s*g*Math.PI),2));u.push([g,Math.max(0,Math.min(1,m))])}return u}function a(s){var o=0;if(!Array.isArray(s)||s.length<2||!s[0]||!s[s.length-1]||+s[0][0]!=0||+s[s.length-1][0]!=1)return!1;for(var u=0;u<s.length;u++){var d=s[u];if(d.length!==2||+d[0]<o)return!1;o=+d[0]}return!0}function l(s,o,u,d){var h,g;function m(y,f){return w.coerce(s,o,P,y,f)}var E=m("x"),c=m("y"),_=m("z");if(!_||!_.length||E&&E.length<1||c&&c.length<1){o.visible=!1;return}o._xlength=Array.isArray(E)&&w.isArrayOrTypedArray(E[0])?_.length:_[0].length,o._ylength=_.length;var T=v.getComponentMethod("calendars","handleTraceDefaults");T(s,o,["x","y","z"],d),m("text"),m("hovertext"),m("hovertemplate"),m("hovertemplatefallback"),m("xhoverformat"),m("yhoverformat"),m("zhoverformat"),["lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lightposition.x","lightposition.y","lightposition.z","hidesurface","connectgaps","opacity"].forEach(function(y){m(y)}),m("surfacecolor");var M=["x","y","z"];for(h=0;h<3;++h){var k="contours."+M[h],b=m(k+".show"),A=m(k+".highlight");if(b||A)for(g=0;g<3;++g)m(k+".project."+M[g]);b&&(m(k+".color"),m(k+".width"),m(k+".usecolormap")),A&&(m(k+".highlightcolor"),m(k+".highlightwidth")),m(k+".start"),m(k+".end"),m(k+".size")}C(s,o,d,m,{prefix:"",cLetter:"c"}),i(s,o,d,m),o._length=null}function i(s,o,u,d){var h=d("opacityscale");h==="max"?o.opacityscale=[[0,t],[1,1]]:h==="min"?o.opacityscale=[[0,1],[1,t]]:h==="extremes"?o.opacityscale=r(1,t):a(h)||(o.opacityscale=void 0)}Z.exports={supplyDefaults:l,opacityscaleDefaults:i}}}),tJ=Ne({"src/traces/surface/calc.js"(te,Z){var v=Ud();Z.exports=function(C,P){P.surfacecolor?v(C,P,{vals:P.surfacecolor,containerStr:"",cLetter:"c"}):v(C,P,{vals:P.z,containerStr:"",cLetter:"c"})}}}),rJ=Ne({"src/traces/surface/convert.js"(te,Z){var v=Gv().gl_surface3d,w=Gv().ndarray,C=Gv().ndarray_linear_interpolate.d2,P=l2(),t=u2(),r=In().isArrayOrTypedArray,a=k_().parseColorScale,l=C_(),i=Nc().extractOpts;function s(p,x,N){this.scene=p,this.uid=N,this.surface=x,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 o=s.prototype;o.getXat=function(p,x,N,D){var B=r(this.data.x)?r(this.data.x[0])?this.data.x[x][p]:this.data.x[p]:p;return N===void 0?B:D.d2l(B,0,N)},o.getYat=function(p,x,N,D){var B=r(this.data.y)?r(this.data.y[0])?this.data.y[x][p]:this.data.y[x]:x;return N===void 0?B:D.d2l(B,0,N)},o.getZat=function(p,x,N,D){var B=this.data.z[x][p];return B===null&&this.data.connectgaps&&this.data._interpolatedZ&&(B=this.data._interpolatedZ[x][p]),N===void 0?B:D.d2l(B,0,N)},o.handlePick=function(p){if(p.object===this.surface){var x=(p.data.index[0]-1)/this.dataScaleX-1,N=(p.data.index[1]-1)/this.dataScaleY-1,D=Math.max(Math.min(Math.round(x),this.data.z[0].length-1),0),B=Math.max(Math.min(Math.round(N),this.data._ylength-1),0);p.index=[D,B],p.traceCoordinate=[this.getXat(D,B),this.getYat(D,B),this.getZat(D,B)],p.dataCoordinate=[this.getXat(D,B,this.data.xcalendar,this.scene.fullSceneLayout.xaxis),this.getYat(D,B,this.data.ycalendar,this.scene.fullSceneLayout.yaxis),this.getZat(D,B,this.data.zcalendar,this.scene.fullSceneLayout.zaxis)];for(var U=0;U<3;U++){var V=p.dataCoordinate[U];V!=null&&(p.dataCoordinate[U]*=this.scene.dataScale[U])}var q=this.data.hovertext||this.data.text;return r(q)&&q[B]&&q[B][D]!==void 0?p.textLabel=q[B][D]:q?p.textLabel=q:p.textLabel="",p.data.dataCoordinate=p.dataCoordinate.slice(),this.surface.highlight(p.data),this.scene.glplot.spikes.position=p.dataCoordinate,!0}};function u(p){var x=p[0].rgb,N=p[p.length-1].rgb;return x[0]===N[0]&&x[1]===N[1]&&x[2]===N[2]&&x[3]===N[3]}var d=[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 h(p,x){if(p<x)return 0;for(var N=0;Math.floor(p%x)===0;)p/=x,N++;return N}function g(p){for(var x=[],N=0;N<d.length;N++){var D=d[N];x.push(h(p,D))}return x}function m(p){for(var x=g(p),N=p,D=0;D<d.length;D++)if(x[D]>0){N=d[D];break}return N}function E(p,x){if(!(p<1||x<1)){for(var N=g(p),D=g(x),B=1,U=0;U<d.length;U++)B*=Math.pow(d[U],Math.max(N[U],D[U]));return B}}function c(p){if(p.length!==0){for(var x=1,N=0;N<p.length;N++)x=E(x,p[N]);return x}}o.calcXnums=function(p){var x,N=[];for(x=1;x<p;x++){var D=this.getXat(x-1,0),B=this.getXat(x,0);B!==D&&D!==void 0&&D!==null&&B!==void 0&&B!==null?N[x-1]=Math.abs(B-D):N[x-1]=0}var U=0;for(x=1;x<p;x++)U+=N[x-1];for(x=1;x<p;x++)N[x-1]===0?N[x-1]=1:N[x-1]=Math.round(U/N[x-1]);return N},o.calcYnums=function(p){var x,N=[];for(x=1;x<p;x++){var D=this.getYat(0,x-1),B=this.getYat(0,x);B!==D&&D!==void 0&&D!==null&&B!==void 0&&B!==null?N[x-1]=Math.abs(B-D):N[x-1]=0}var U=0;for(x=1;x<p;x++)U+=N[x-1];for(x=1;x<p;x++)N[x-1]===0?N[x-1]=1:N[x-1]=Math.round(U/N[x-1]);return N};var _=[1,2,4,6,12,24,36,48,60,120,180,240,360,720,840,1260],T=_[9],M=_[13];o.estimateScale=function(p,x){for(var N=x===0?this.calcXnums(p):this.calcYnums(p),D=1+c(N);D<T;)D*=2;for(;D>M;)D--,D/=m(D),D++,D<T&&(D=M);var B=Math.round(D/p);return B>1?B:1};function k(p,x,N){var D=N[8]+N[2]*x[0]+N[5]*x[1];return p[0]=(N[6]+N[0]*x[0]+N[3]*x[1])/D,p[1]=(N[7]+N[1]*x[0]+N[4]*x[1])/D,p}function b(p,x,N){return A(p,x,k,N),p}function A(p,x,N,D){for(var B=[0,0],U=p.shape[0],V=p.shape[1],q=0;q<U;q++)for(var z=0;z<V;z++)N(B,[q,z],D),p.set(q,z,C(x,B[0],B[1]));return p}o.refineCoords=function(p){for(var x=this.dataScaleX,N=this.dataScaleY,D=p[0].shape[0],B=p[0].shape[1],U=Math.floor(p[0].shape[0]*x+1)|0,V=Math.floor(p[0].shape[1]*N+1)|0,q=1+D+1,z=1+B+1,H=w(new Float32Array(q*z),[q,z]),G=[1/x,0,0,0,1/N,0,0,0,1],J=0;J<p.length;++J){this.surface.padField(H,p[J]);var le=w(new Float32Array(U*V),[U,V]);b(le,H,G),p[J]=le}};function y(p,x){for(var N=!1,D=0;D<p.length;D++)if(x===p[D]){N=!0;break}N===!1&&p.push(x)}o.setContourLevels=function(){var p=[[],[],[]],x=[!1,!1,!1],N=!1,D,B,U;for(D=0;D<3;++D)if(this.showContour[D]&&(N=!0,this.contourSize[D]>0&&this.contourStart[D]!==null&&this.contourEnd[D]!==null&&this.contourEnd[D]>this.contourStart[D]))for(x[D]=!0,B=this.contourStart[D];B<this.contourEnd[D];B+=this.contourSize[D])U=B*this.scene.dataScale[D],y(p[D],U);if(N){var V=[[],[],[]];for(D=0;D<3;++D)this.showContour[D]&&(V[D]=x[D]?p[D]:this.scene.contourLevels[D]);this.surface.update({levels:V})}},o.update=function(p){var x=this.scene,N=x.fullSceneLayout,D=this.surface,B=a(p),U=x.dataScale,V=p.z[0].length,q=p._ylength,z=x.contourLevels;this.data=p;var H,G,J,le,ge=[];for(H=0;H<3;H++)for(ge[H]=[],G=0;G<V;G++)ge[H][G]=[];for(G=0;G<V;G++)for(J=0;J<q;J++)ge[0][G][J]=this.getXat(G,J,p.xcalendar,N.xaxis),ge[1][G][J]=this.getYat(G,J,p.ycalendar,N.yaxis),ge[2][G][J]=this.getZat(G,J,p.zcalendar,N.zaxis);if(p.connectgaps)for(p._emptypoints=t(ge[2]),P(ge[2],p._emptypoints),p._interpolatedZ=[],G=0;G<V;G++)for(p._interpolatedZ[G]=[],J=0;J<q;J++)p._interpolatedZ[G][J]=ge[2][G][J];for(H=0;H<3;H++)for(G=0;G<V;G++)for(J=0;J<q;J++)le=ge[H][G][J],le==null?ge[H][G][J]=NaN:le=ge[H][G][J]*=U[H];for(H=0;H<3;H++)for(G=0;G<V;G++)for(J=0;J<q;J++)le=ge[H][G][J],le!=null&&(this.minValues[H]>le&&(this.minValues[H]=le),this.maxValues[H]<le&&(this.maxValues[H]=le));for(H=0;H<3;H++)this.objectOffset[H]=.5*(this.minValues[H]+this.maxValues[H]);for(H=0;H<3;H++)for(G=0;G<V;G++)for(J=0;J<q;J++)le=ge[H][G][J],le!=null&&(ge[H][G][J]-=this.objectOffset[H]);var de=[w(new Float32Array(V*q),[V,q]),w(new Float32Array(V*q),[V,q]),w(new Float32Array(V*q),[V,q])];for(H=0;H<3;H++)for(G=0;G<V;G++)for(J=0;J<q;J++)de[H].set(G,J,ge[H][G][J]);ge=[];var me={colormap:B,levels:[[],[],[]],showContour:[!0,!0,!0],showSurface:!p.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:p.opacityscale,opacity:p.opacity},W=i(p);if(me.intensityBounds=[W.min,W.max],p.surfacecolor){var ie=w(new Float32Array(V*q),[V,q]);for(G=0;G<V;G++)for(J=0;J<q;J++)ie.set(G,J,p.surfacecolor[J][G]);de.push(ie)}else me.intensityBounds[0]*=U[2],me.intensityBounds[1]*=U[2];(M<de[0].shape[0]||M<de[0].shape[1])&&(this.refineData=!1),this.refineData===!0&&(this.dataScaleX=this.estimateScale(de[0].shape[0],0),this.dataScaleY=this.estimateScale(de[0].shape[1],1),(this.dataScaleX!==1||this.dataScaleY!==1)&&this.refineCoords(de)),p.surfacecolor&&(me.intensity=de.pop());var se=[!0,!0,!0],ee=["x","y","z"];for(H=0;H<3;++H){var pe=p.contours[ee[H]];se[H]=pe.highlight,me.showContour[H]=pe.show||pe.highlight,me.showContour[H]&&(me.contourProject[H]=[pe.project.x,pe.project.y,pe.project.z],pe.show?(this.showContour[H]=!0,me.levels[H]=z[H],D.highlightColor[H]=me.contourColor[H]=l(pe.color),pe.usecolormap?D.highlightTint[H]=me.contourTint[H]=0:D.highlightTint[H]=me.contourTint[H]=1,me.contourWidth[H]=pe.width,this.contourStart[H]=pe.start,this.contourEnd[H]=pe.end,this.contourSize[H]=pe.size):(this.showContour[H]=!1,this.contourStart[H]=null,this.contourEnd[H]=null,this.contourSize[H]=0),pe.highlight&&(me.dynamicColor[H]=l(pe.highlightcolor),me.dynamicWidth[H]=pe.highlightwidth))}u(B)&&(me.vertexColor=!0),me.objectOffset=this.objectOffset,me.coords=de,D.update(me),D.visible=p.visible,D.enableDynamic=se,D.enableHighlight=se,D.snapToData=!0,"lighting"in p&&(D.ambientLight=p.lighting.ambient,D.diffuseLight=p.lighting.diffuse,D.specularLight=p.lighting.specular,D.roughness=p.lighting.roughness,D.fresnel=p.lighting.fresnel),"lightposition"in p&&(D.lightPosition=[p.lightposition.x,p.lightposition.y,p.lightposition.z])},o.dispose=function(){this.scene.glplot.remove(this.surface),this.surface.dispose()};function f(p,x){var N=p.glplot.gl,D=v({gl:N}),B=new s(p,D,x.uid);return D._trace=B,B.update(x),p.glplot.add(D),B}Z.exports=f}}),nJ=Ne({"src/traces/surface/index.js"(te,Z){Z.exports={attributes:lk(),supplyDefaults:oN().supplyDefaults,colorbar:{min:"cmin",max:"cmax"},calc:tJ(),plot:rJ(),moduleType:"trace",name:"surface",basePlotModule:Ib(),categories:["gl3d","2dMap","showLegend"],meta:{}}}}),aJ=Ne({"lib/surface.js"(te,Z){Z.exports=nJ()}}),ZS=Ne({"src/traces/mesh3d/attributes.js"(te,Z){var v=Wu(),w=Ac().axisHoverFormat,{hovertemplateAttrs:C,templatefallbackAttrs:P}=Fl(),t=lk(),r=qo(),a=fi().extendFlat;Z.exports=a({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:C({editType:"calc"}),hovertemplatefallback:P({editType:"calc"}),xhoverformat:w("x"),yhoverformat:w("y"),zhoverformat:w("z"),delaunayaxis:{valType:"enumerated",values:["x","y","z"],dflt:"z",editType:"calc"},alphahull:{valType:"number",dflt:-1,editType:"calc"},intensity:{valType:"data_array",editType:"calc"},intensitymode:{valType:"enumerated",values:["vertex","cell"],dflt:"vertex",editType:"calc"},color:{valType:"color",editType:"calc"},vertexcolor:{valType:"data_array",editType:"calc"},facecolor:{valType:"data_array",editType:"calc"}},v("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:t.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc"},contour:{show:a({},t.contours.x.show,{}),color:t.contours.x.color,width:t.contours.x.width,editType:"calc"},lightposition:{x:a({},t.lightposition.x,{dflt:1e5}),y:a({},t.lightposition.y,{dflt:1e5}),z:a({},t.lightposition.z,{dflt:0}),editType:"calc"},lighting:a({vertexnormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-12,editType:"calc",description:"Epsilon for vertex normals calculation avoids math issues arising from degenerate geometry."},facenormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-6,editType:"calc",description:"Epsilon for face normals calculation avoids math issues arising from degenerate geometry."},editType:"calc"},t.lighting),hoverinfo:a({},r.hoverinfo,{editType:"calc"}),showlegend:a({},r.showlegend,{dflt:!1})})}}),yR=Ne({"src/traces/isosurface/attributes.js"(te,Z){var v=Wu(),w=Ac().axisHoverFormat,{hovertemplateAttrs:C,templatefallbackAttrs:P}=Fl(),t=ZS(),r=qo(),a=fi().extendFlat,l=ef().overrideAll;function i(u){return{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}}}function s(u){return{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}}}var o=Z.exports=l(a({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:i(),y:i(),z:i()},caps:{x:s(),y:s(),z:s()},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:C(),hovertemplatefallback:P(),xhoverformat:w("x"),yhoverformat:w("y"),zhoverformat:w("z"),valuehoverformat:w("value",1),showlegend:a({},r.showlegend,{dflt:!1})},v("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:t.opacity,lightposition:t.lightposition,lighting:t.lighting,flatshading:t.flatshading,contour:t.contour,hoverinfo:a({},r.hoverinfo)}),"calc","nested");o.flatshading.dflt=!0,o.lighting.facenormalsepsilon.dflt=0,o.x.editType=o.y.editType=o.z.editType=o.value.editType="calc+clearAxisTypes"}}),sN=Ne({"src/traces/isosurface/defaults.js"(te,Z){var v=In(),w=Yo(),C=yR(),P=Rh();function t(a,l,i,s){function o(u,d){return v.coerce(a,l,C,u,d)}r(a,l,i,s,o)}function r(a,l,i,s,o){var u=o("isomin"),d=o("isomax");d!=null&&u!==void 0&&u!==null&&u>d&&(l.isomin=null,l.isomax=null);var h=o("x"),g=o("y"),m=o("z"),E=o("value");if(!h||!h.length||!g||!g.length||!m||!m.length||!E||!E.length){l.visible=!1;return}var c=w.getComponentMethod("calendars","handleTraceDefaults");c(a,l,["x","y","z"],s),o("valuehoverformat"),["x","y","z"].forEach(function(k){o(k+"hoverformat");var b="caps."+k,A=o(b+".show");A&&o(b+".fill");var y="slices."+k,f=o(y+".show");f&&(o(y+".fill"),o(y+".locations"))});var _=o("spaceframe.show");_&&o("spaceframe.fill");var T=o("surface.show");T&&(o("surface.count"),o("surface.fill"),o("surface.pattern"));var M=o("contour.show");M&&(o("contour.color"),o("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(k){o(k)}),P(a,l,s,o,{prefix:"",cLetter:"c"}),l._length=null}Z.exports={supplyDefaults:t,supplyIsoDefaults:r}}}),_R=Ne({"src/traces/streamtube/calc.js"(te,Z){var v=In(),w=Ud();function C(a,l){l._len=Math.min(l.u.length,l.v.length,l.w.length,l.x.length,l.y.length,l.z.length),l._u=r(l.u,l._len),l._v=r(l.v,l._len),l._w=r(l.w,l._len),l._x=r(l.x,l._len),l._y=r(l.y,l._len),l._z=r(l.z,l._len);var i=P(l);l._gridFill=i.fill,l._Xs=i.Xs,l._Ys=i.Ys,l._Zs=i.Zs,l._len=i.len;var s=0,o,u,d;l.starts&&(o=r(l.starts.x||[]),u=r(l.starts.y||[]),d=r(l.starts.z||[]),s=Math.min(o.length,u.length,d.length)),l._startsX=o||[],l._startsY=u||[],l._startsZ=d||[];var h=0,g=1/0,m;for(m=0;m<l._len;m++){var E=l._u[m],c=l._v[m],_=l._w[m],T=Math.sqrt(E*E+c*c+_*_);h=Math.max(h,T),g=Math.min(g,T)}for(w(a,l,{vals:[g,h],containerStr:"",cLetter:"c"}),m=0;m<s;m++){var M=o[m];i.xMax=Math.max(i.xMax,M),i.xMin=Math.min(i.xMin,M);var k=u[m];i.yMax=Math.max(i.yMax,k),i.yMin=Math.min(i.yMin,k);var b=d[m];i.zMax=Math.max(i.zMax,b),i.zMin=Math.min(i.zMin,b)}l._slen=s,l._normMax=h,l._xbnds=[i.xMin,i.xMax],l._ybnds=[i.yMin,i.yMax],l._zbnds=[i.zMin,i.zMax]}function P(a){var l=a._x,i=a._y,s=a._z,o=a._len,u,d,h,g=-1/0,m=1/0,E=-1/0,c=1/0,_=-1/0,T=1/0,M="",k,b,A,y,f,p,x,N,D;for(o&&(y=l[0],p=i[0],N=s[0]),o>1&&(f=l[o-1],x=i[o-1],D=s[o-1]),u=0;u<o;u++)g=Math.max(g,l[u]),m=Math.min(m,l[u]),E=Math.max(E,i[u]),c=Math.min(c,i[u]),_=Math.max(_,s[u]),T=Math.min(T,s[u]),!k&&l[u]!==y&&(k=!0,M+="x"),!b&&i[u]!==p&&(b=!0,M+="y"),!A&&s[u]!==N&&(A=!0,M+="z");k||(M+="x"),b||(M+="y"),A||(M+="z");var B=t(a._x),U=t(a._y),V=t(a._z);M=M.replace("x",(y>f?"-":"+")+"x"),M=M.replace("y",(p>x?"-":"+")+"y"),M=M.replace("z",(N>D?"-":"+")+"z");var q=function(){o=0,B=[],U=[],V=[]};(!o||o<B.length*U.length*V.length)&&q();var z=function(Le){return Le==="x"?l:Le==="y"?i:s},H=function(Le){return Le==="x"?B:Le==="y"?U:V},G=function(Le){return Le[o-1]<Le[0]?-1:1},J=z(M[1]),le=z(M[3]),ge=z(M[5]),de=H(M[1]).length,me=H(M[3]).length,W=H(M[5]).length,ie=!1,se=function(Le,ze,Xe){return de*(me*Le+ze)+Xe},ee=G(z(M[1])),pe=G(z(M[3])),oe=G(z(M[5]));for(u=0;u<W-1;u++){for(d=0;d<me-1;d++){for(h=0;h<de-1;h++){var Y=se(u,d,h),ce=se(u,d,h+1),ue=se(u,d+1,h),_e=se(u+1,d,h);if((!(J[Y]*ee<J[ce]*ee)||!(le[Y]*pe<le[ue]*pe)||!(ge[Y]*oe<ge[_e]*oe))&&(ie=!0),ie)break}if(ie)break}if(ie)break}return ie&&(v.warn("Encountered arbitrary coordinates! Unable to input data grid."),q()),{xMin:m,yMin:c,zMin:T,xMax:g,yMax:E,zMax:_,Xs:B,Ys:U,Zs:V,len:o,fill:M}}function t(a){return v.distinctVals(a).vals}function r(a,l){if(l===void 0&&(l=a.length),v.isTypedArray(a))return a.subarray(0,l);for(var i=[],s=0;s<l;s++)i[s]=+a[s];return i}Z.exports={calc:C,filter:r,processGrid:P}}}),lN=Ne({"src/traces/isosurface/calc.js"(te,Z){var v=Ud(),w=_R().processGrid,C=_R().filter;Z.exports=function(t,r){r._len=Math.min(r.x.length,r.y.length,r.z.length,r.value.length),r._x=C(r.x,r._len),r._y=C(r.y,r._len),r._z=C(r.z,r._len),r._value=C(r.value,r._len);var a=w(r);r._gridFill=a.fill,r._Xs=a.Xs,r._Ys=a.Ys,r._Zs=a.Zs,r._len=a.len;for(var l=1/0,i=-1/0,s=0;s<r._len;s++){var o=r._value[s];l=Math.min(l,o),i=Math.max(i,o)}r._minValues=l,r._maxValues=i,r._vMin=r.isomin===void 0||r.isomin===null?l:r.isomin,r._vMax=r.isomax===void 0||r.isomax===null?i:r.isomax,v(t,r,{vals:[r._vMin,r._vMax],containerStr:"",cLetter:"c"})}}}),$S=Ne({"src/plots/gl3d/zip3.js"(te,Z){Z.exports=function(w,C,P,t){t=t||w.length;for(var r=new Array(t),a=0;a<t;a++)r[a]=[w[a],C[a],P[a]];return r}}}),xR=Ne({"src/traces/isosurface/convert.js"(te,Z){var v=Gv().gl_mesh3d,w=k_().parseColorScale,C=In().isArrayOrTypedArray,P=C_(),t=Nc().extractOpts,r=$S(),a=function(d,h){for(var g=h.length-1;g>0;g--){var m=Math.min(h[g],h[g-1]),E=Math.max(h[g],h[g-1]);if(E>m&&m<d&&d<=E)return{id:g,distRatio:(E-d)/(E-m)}}return{id:0,distRatio:0}};function l(d,h,g){this.scene=d,this.uid=g,this.mesh=h,this.name="",this.data=null,this.showContour=!1}var i=l.prototype;i.handlePick=function(d){if(d.object===this.mesh){var h=d.data.index,g=this.data._meshX[h],m=this.data._meshY[h],E=this.data._meshZ[h],c=this.data._Ys.length,_=this.data._Zs.length,T=a(g,this.data._Xs).id,M=a(m,this.data._Ys).id,k=a(E,this.data._Zs).id,b=d.index=k+_*M+_*c*T;d.traceCoordinate=[this.data._meshX[b],this.data._meshY[b],this.data._meshZ[b],this.data._value[b]];var A=this.data.hovertext||this.data.text;return C(A)&&A[b]!==void 0?d.textLabel=A[b]:A&&(d.textLabel=A),!0}},i.update=function(d){var h=this.scene,g=h.fullSceneLayout;this.data=o(d);function m(M,k,b,A){return k.map(function(y){return M.d2l(y,0,A)*b})}var E=r(m(g.xaxis,d._meshX,h.dataScale[0],d.xcalendar),m(g.yaxis,d._meshY,h.dataScale[1],d.ycalendar),m(g.zaxis,d._meshZ,h.dataScale[2],d.zcalendar)),c=r(d._meshI,d._meshJ,d._meshK),_={positions:E,cells:c,lightPosition:[d.lightposition.x,d.lightposition.y,d.lightposition.z],ambient:d.lighting.ambient,diffuse:d.lighting.diffuse,specular:d.lighting.specular,roughness:d.lighting.roughness,fresnel:d.lighting.fresnel,vertexNormalsEpsilon:d.lighting.vertexnormalsepsilon,faceNormalsEpsilon:d.lighting.facenormalsepsilon,opacity:d.opacity,contourEnable:d.contour.show,contourColor:P(d.contour.color).slice(0,3),contourWidth:d.contour.width,useFacetNormals:d.flatshading},T=t(d);_.vertexIntensity=d._meshIntensity,_.vertexIntensityBounds=[T.min,T.max],_.colormap=w(d),this.mesh.update(_)},i.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};var s=["xyz","xzy","yxz","yzx","zxy","zyx"];function o(d){d._meshI=[],d._meshJ=[],d._meshK=[];var h=d.surface.show,g=d.spaceframe.show,m=d.surface.fill,E=d.spaceframe.fill,c=!1,_=!1,T=0,M,k,b=d._Xs,A=d._Ys,y=d._Zs,f=b.length,p=A.length,x=y.length,N=s.indexOf(d._gridFill.replace(/-/g,"").replace(/\+/g,"")),D=function(Ot,$e,ot){switch(N){case 5:return ot+x*$e+x*p*Ot;case 4:return ot+x*Ot+x*f*$e;case 3:return $e+p*ot+p*x*Ot;case 2:return $e+p*Ot+p*f*ot;case 1:return Ot+f*ot+f*x*$e;default:return Ot+f*$e+f*p*ot}},B=d._minValues,U=d._maxValues,V=d._vMin,q=d._vMax,z,H,G,J;function le(Ot,$e,ot){for(var De=J.length,Ee=k;Ee<De;Ee++)if(Ot===z[Ee]&&$e===H[Ee]&&ot===G[Ee])return Ee;return-1}function ge(){k=M}function de(){z=[],H=[],G=[],J=[],M=0,ge()}function me(Ot,$e,ot,De){return z.push(Ot),H.push($e),G.push(ot),J.push(De),M++,M-1}function W(Ot,$e,ot){return d._meshI.push(Ot),d._meshJ.push($e),d._meshK.push(ot),T++,T-1}function ie(Ot,$e,ot){for(var De=[],Ee=0;Ee<Ot.length;Ee++)De[Ee]=(Ot[Ee]+$e[Ee]+ot[Ee])/3;return De}function se(Ot,$e,ot){for(var De=[],Ee=0;Ee<Ot.length;Ee++)De[Ee]=Ot[Ee]*(1-ot)+ot*$e[Ee];return De}var ee;function pe(Ot){ee=Ot}function oe(Ot,$e){var ot=Ot[0],De=Ot[1],Ee=Ot[2],Ae=ie(ot,De,Ee),Ie=Math.sqrt(1-ee),tt=se(Ae,ot,Ie),st=se(Ae,De,Ie),Bt=se(Ae,Ee,Ie),Ft=$e[0],Wt=$e[1],lr=$e[2];return{xyzv:[[ot,De,st],[st,tt,ot],[De,Ee,Bt],[Bt,st,De],[Ee,ot,tt],[tt,Bt,Ee]],abc:[[Ft,Wt,-1],[-1,-1,Ft],[Wt,lr,-1],[-1,-1,Wt],[lr,Ft,-1],[-1,-1,lr]]}}function Y(Ot,$e){return Ot==="all"||Ot===null?!0:Ot.indexOf($e)>-1}function ce(Ot,$e){return Ot===null?$e:Ot}function ue(Ot,$e,ot){ge();var De=[$e],Ee=[ot];if(ee>=1)De=[$e],Ee=[ot];else if(ee>0){var Ae=oe($e,ot);De=Ae.xyzv,Ee=Ae.abc}for(var Ie=0;Ie<De.length;Ie++){$e=De[Ie],ot=Ee[Ie];for(var tt=[],st=0;st<3;st++){var Bt=$e[st][0],Ft=$e[st][1],Wt=$e[st][2],lr=$e[st][3],Rr=ot[st]>-1?ot[st]:le(Bt,Ft,Wt);Rr>-1?tt[st]=Rr:tt[st]=me(Bt,Ft,Wt,ce(Ot,lr))}W(tt[0],tt[1],tt[2])}}function _e(Ot,$e,ot){var De=function(Ee,Ae,Ie){ue(Ot,[$e[Ee],$e[Ae],$e[Ie]],[ot[Ee],ot[Ae],ot[Ie]])};De(0,1,2),De(2,3,0)}function Le(Ot,$e,ot){var De=function(Ee,Ae,Ie){ue(Ot,[$e[Ee],$e[Ae],$e[Ie]],[ot[Ee],ot[Ae],ot[Ie]])};De(0,1,2),De(3,0,1),De(2,3,0),De(1,2,3)}function ze(Ot,$e,ot,De){var Ee=Ot[3];Ee<ot&&(Ee=ot),Ee>De&&(Ee=De);for(var Ae=(Ot[3]-Ee)/(Ot[3]-$e[3]+1e-9),Ie=[],tt=0;tt<4;tt++)Ie[tt]=(1-Ae)*Ot[tt]+Ae*$e[tt];return Ie}function Xe(Ot,$e,ot){return Ot>=$e&&Ot<=ot}function Ve(Ot){var $e=.001*(q-V);return Ot>=V-$e&&Ot<=q+$e}function rt(Ot){for(var $e=[],ot=0;ot<4;ot++){var De=Ot[ot];$e.push([d._x[De],d._y[De],d._z[De],d._value[De]])}return $e}var mt=3;function _t(Ot,$e,ot,De,Ee,Ae){Ae||(Ae=1),ot=[-1,-1,-1];var Ie=!1,tt=[Xe($e[0][3],De,Ee),Xe($e[1][3],De,Ee),Xe($e[2][3],De,Ee)];if(!tt[0]&&!tt[1]&&!tt[2])return!1;var st=function(Ft,Wt,lr){return Ve(Wt[0][3])&&Ve(Wt[1][3])&&Ve(Wt[2][3])?(ue(Ft,Wt,lr),!0):Ae<mt?_t(Ft,Wt,lr,V,q,++Ae):!1};if(tt[0]&&tt[1]&&tt[2])return st(Ot,$e,ot)||Ie;var Bt=!1;return[[0,1,2],[2,0,1],[1,2,0]].forEach(function(Ft){if(tt[Ft[0]]&&tt[Ft[1]]&&!tt[Ft[2]]){var Wt=$e[Ft[0]],lr=$e[Ft[1]],Rr=$e[Ft[2]],Mr=ze(Rr,Wt,De,Ee),Sr=ze(Rr,lr,De,Ee);Ie=st(Ot,[Sr,Mr,Wt],[-1,-1,ot[Ft[0]]])||Ie,Ie=st(Ot,[Wt,lr,Sr],[ot[Ft[0]],ot[Ft[1]],-1])||Ie,Bt=!0}}),Bt||[[0,1,2],[1,2,0],[2,0,1]].forEach(function(Ft){if(tt[Ft[0]]&&!tt[Ft[1]]&&!tt[Ft[2]]){var Wt=$e[Ft[0]],lr=$e[Ft[1]],Rr=$e[Ft[2]],Mr=ze(lr,Wt,De,Ee),Sr=ze(Rr,Wt,De,Ee);Ie=st(Ot,[Sr,Mr,Wt],[-1,-1,ot[Ft[0]]])||Ie,Bt=!0}}),Ie}function vt(Ot,$e,ot,De){var Ee=!1,Ae=rt($e),Ie=[Xe(Ae[0][3],ot,De),Xe(Ae[1][3],ot,De),Xe(Ae[2][3],ot,De),Xe(Ae[3][3],ot,De)];if(!Ie[0]&&!Ie[1]&&!Ie[2]&&!Ie[3])return Ee;if(Ie[0]&&Ie[1]&&Ie[2]&&Ie[3])return _&&(Ee=Le(Ot,Ae,$e)||Ee),Ee;var tt=!1;return[[0,1,2,3],[3,0,1,2],[2,3,0,1],[1,2,3,0]].forEach(function(st){if(Ie[st[0]]&&Ie[st[1]]&&Ie[st[2]]&&!Ie[st[3]]){var Bt=Ae[st[0]],Ft=Ae[st[1]],Wt=Ae[st[2]],lr=Ae[st[3]];if(_)Ee=ue(Ot,[Bt,Ft,Wt],[$e[st[0]],$e[st[1]],$e[st[2]]])||Ee;else{var Rr=ze(lr,Bt,ot,De),Mr=ze(lr,Ft,ot,De),Sr=ze(lr,Wt,ot,De);Ee=ue(null,[Rr,Mr,Sr],[-1,-1,-1])||Ee}tt=!0}}),tt||([[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(st){if(Ie[st[0]]&&Ie[st[1]]&&!Ie[st[2]]&&!Ie[st[3]]){var Bt=Ae[st[0]],Ft=Ae[st[1]],Wt=Ae[st[2]],lr=Ae[st[3]],Rr=ze(Wt,Bt,ot,De),Mr=ze(Wt,Ft,ot,De),Sr=ze(lr,Ft,ot,De),Kr=ze(lr,Bt,ot,De);_?(Ee=ue(Ot,[Bt,Kr,Rr],[$e[st[0]],-1,-1])||Ee,Ee=ue(Ot,[Ft,Mr,Sr],[$e[st[1]],-1,-1])||Ee):Ee=_e(null,[Rr,Mr,Sr,Kr],[-1,-1,-1,-1])||Ee,tt=!0}}),tt)||[[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2]].forEach(function(st){if(Ie[st[0]]&&!Ie[st[1]]&&!Ie[st[2]]&&!Ie[st[3]]){var Bt=Ae[st[0]],Ft=Ae[st[1]],Wt=Ae[st[2]],lr=Ae[st[3]],Rr=ze(Ft,Bt,ot,De),Mr=ze(Wt,Bt,ot,De),Sr=ze(lr,Bt,ot,De);_?(Ee=ue(Ot,[Bt,Rr,Mr],[$e[st[0]],-1,-1])||Ee,Ee=ue(Ot,[Bt,Mr,Sr],[$e[st[0]],-1,-1])||Ee,Ee=ue(Ot,[Bt,Sr,Rr],[$e[st[0]],-1,-1])||Ee):Ee=ue(null,[Rr,Mr,Sr],[-1,-1,-1])||Ee,tt=!0}}),Ee}function ut(Ot,$e,ot,De,Ee,Ae,Ie,tt,st,Bt,Ft){var Wt=!1;return c&&(Y(Ot,"A")&&(Wt=vt(null,[$e,ot,De,Ae],Bt,Ft)||Wt),Y(Ot,"B")&&(Wt=vt(null,[ot,De,Ee,st],Bt,Ft)||Wt),Y(Ot,"C")&&(Wt=vt(null,[ot,Ae,Ie,st],Bt,Ft)||Wt),Y(Ot,"D")&&(Wt=vt(null,[De,Ae,tt,st],Bt,Ft)||Wt),Y(Ot,"E")&&(Wt=vt(null,[ot,De,Ae,st],Bt,Ft)||Wt)),_&&(Wt=vt(Ot,[ot,De,Ae,st],Bt,Ft)||Wt),Wt}function Fe(Ot,$e,ot,De,Ee,Ae,Ie,tt){return[tt[0]===!0?!0:_t(Ot,rt([$e,ot,De]),[$e,ot,De],Ae,Ie),tt[1]===!0?!0:_t(Ot,rt([De,Ee,$e]),[De,Ee,$e],Ae,Ie)]}function Pe(Ot,$e,ot,De,Ee,Ae,Ie,tt,st){return tt?Fe(Ot,$e,ot,Ee,De,Ae,Ie,st):Fe(Ot,ot,Ee,De,$e,Ae,Ie,st)}function be(Ot,$e,ot,De,Ee,Ae,Ie){var tt=!1,st,Bt,Ft,Wt,lr=function(){tt=_t(Ot,[st,Bt,Ft],[-1,-1,-1],Ee,Ae)||tt,tt=_t(Ot,[Ft,Wt,st],[-1,-1,-1],Ee,Ae)||tt},Rr=Ie[0],Mr=Ie[1],Sr=Ie[2];return Rr&&(st=se(rt([D($e,ot-0,De-0)])[0],rt([D($e-1,ot-0,De-0)])[0],Rr),Bt=se(rt([D($e,ot-0,De-1)])[0],rt([D($e-1,ot-0,De-1)])[0],Rr),Ft=se(rt([D($e,ot-1,De-1)])[0],rt([D($e-1,ot-1,De-1)])[0],Rr),Wt=se(rt([D($e,ot-1,De-0)])[0],rt([D($e-1,ot-1,De-0)])[0],Rr),lr()),Mr&&(st=se(rt([D($e-0,ot,De-0)])[0],rt([D($e-0,ot-1,De-0)])[0],Mr),Bt=se(rt([D($e-0,ot,De-1)])[0],rt([D($e-0,ot-1,De-1)])[0],Mr),Ft=se(rt([D($e-1,ot,De-1)])[0],rt([D($e-1,ot-1,De-1)])[0],Mr),Wt=se(rt([D($e-1,ot,De-0)])[0],rt([D($e-1,ot-1,De-0)])[0],Mr),lr()),Sr&&(st=se(rt([D($e-0,ot-0,De)])[0],rt([D($e-0,ot-0,De-1)])[0],Sr),Bt=se(rt([D($e-0,ot-1,De)])[0],rt([D($e-0,ot-1,De-1)])[0],Sr),Ft=se(rt([D($e-1,ot-1,De)])[0],rt([D($e-1,ot-1,De-1)])[0],Sr),Wt=se(rt([D($e-1,ot-0,De)])[0],rt([D($e-1,ot-0,De-1)])[0],Sr),lr()),tt}function Ye(Ot,$e,ot,De,Ee,Ae,Ie,tt,st,Bt,Ft,Wt){var lr=Ot;return Wt?(c&&Ot==="even"&&(lr=null),ut(lr,$e,ot,De,Ee,Ae,Ie,tt,st,Bt,Ft)):(c&&Ot==="odd"&&(lr=null),ut(lr,st,tt,Ie,Ae,Ee,De,ot,$e,Bt,Ft))}function yt(Ot,$e,ot,De,Ee){for(var Ae=[],Ie=0,tt=0;tt<$e.length;tt++)for(var st=$e[tt],Bt=1;Bt<x;Bt++)for(var Ft=1;Ft<p;Ft++)Ae.push(Pe(Ot,D(st,Ft-1,Bt-1),D(st,Ft-1,Bt),D(st,Ft,Bt-1),D(st,Ft,Bt),ot,De,(st+Ft+Bt)%2,Ee&&Ee[Ie]?Ee[Ie]:[])),Ie++;return Ae}function wt(Ot,$e,ot,De,Ee){for(var Ae=[],Ie=0,tt=0;tt<$e.length;tt++)for(var st=$e[tt],Bt=1;Bt<f;Bt++)for(var Ft=1;Ft<x;Ft++)Ae.push(Pe(Ot,D(Bt-1,st,Ft-1),D(Bt,st,Ft-1),D(Bt-1,st,Ft),D(Bt,st,Ft),ot,De,(Bt+st+Ft)%2,Ee&&Ee[Ie]?Ee[Ie]:[])),Ie++;return Ae}function ht(Ot,$e,ot,De,Ee){for(var Ae=[],Ie=0,tt=0;tt<$e.length;tt++)for(var st=$e[tt],Bt=1;Bt<p;Bt++)for(var Ft=1;Ft<f;Ft++)Ae.push(Pe(Ot,D(Ft-1,Bt-1,st),D(Ft-1,Bt,st),D(Ft,Bt-1,st),D(Ft,Bt,st),ot,De,(Ft+Bt+st)%2,Ee&&Ee[Ie]?Ee[Ie]:[])),Ie++;return Ae}function Yt(Ot,$e,ot){for(var De=1;De<x;De++)for(var Ee=1;Ee<p;Ee++)for(var Ae=1;Ae<f;Ae++)Ye(Ot,D(Ae-1,Ee-1,De-1),D(Ae-1,Ee-1,De),D(Ae-1,Ee,De-1),D(Ae-1,Ee,De),D(Ae,Ee-1,De-1),D(Ae,Ee-1,De),D(Ae,Ee,De-1),D(Ae,Ee,De),$e,ot,(Ae+Ee+De)%2)}function $t(Ot,$e,ot){_=!0,Yt(Ot,$e,ot),_=!1}function fr(Ot,$e,ot){c=!0,Yt(Ot,$e,ot),c=!1}function mr(Ot,$e,ot,De,Ee,Ae){for(var Ie=[],tt=0,st=0;st<$e.length;st++)for(var Bt=$e[st],Ft=1;Ft<x;Ft++)for(var Wt=1;Wt<p;Wt++)Ie.push(be(Ot,Bt,Wt,Ft,ot,De,Ee[st],Ae&&Ae[tt]?Ae[tt]:[])),tt++;return Ie}function Ur(Ot,$e,ot,De,Ee,Ae){for(var Ie=[],tt=0,st=0;st<$e.length;st++)for(var Bt=$e[st],Ft=1;Ft<f;Ft++)for(var Wt=1;Wt<x;Wt++)Ie.push(be(Ot,Ft,Bt,Wt,ot,De,Ee[st],Ae&&Ae[tt]?Ae[tt]:[])),tt++;return Ie}function jr(Ot,$e,ot,De,Ee,Ae){for(var Ie=[],tt=0,st=0;st<$e.length;st++)for(var Bt=$e[st],Ft=1;Ft<p;Ft++)for(var Wt=1;Wt<f;Wt++)Ie.push(be(Ot,Wt,Ft,Bt,ot,De,Ee[st],Ae&&Ae[tt]?Ae[tt]:[])),tt++;return Ie}function fn(Ot,$e){for(var ot=[],De=Ot;De<$e;De++)ot.push(De);return ot}function Br(){for(var Ot=0;Ot<f;Ot++)for(var $e=0;$e<p;$e++)for(var ot=0;ot<x;ot++){var De=D(Ot,$e,ot);me(d._x[De],d._y[De],d._z[De],d._value[De])}}function Qr(){de(),Br();var Ot=null;if(g&&E&&(pe(E),$t(Ot,V,q)),h&&m){pe(m);for(var $e=d.surface.pattern,ot=d.surface.count,De=0;De<ot;De++){var Ee=ot===1?.5:De/(ot-1),Ae=(1-Ee)*V+Ee*q,Ie=Math.abs(Ae-B),tt=Math.abs(Ae-U),st=Ie>tt?[B,Ae]:[Ae,U];fr($e,st[0],st[1])}}var Bt=[[Math.min(V,U),Math.max(V,U)],[Math.min(B,q),Math.max(B,q)]];["x","y","z"].forEach(function(Ft){for(var Wt=[],lr=0;lr<Bt.length;lr++){var Rr=0,Mr=Bt[lr][0],Sr=Bt[lr][1],Kr=d.slices[Ft];if(Kr.show&&Kr.fill){pe(Kr.fill);var Hn=[],ga=[],ua=[];if(Kr.locations.length)for(var Ta=0;Ta<Kr.locations.length;Ta++){var Aa=a(Kr.locations[Ta],Ft==="x"?b:Ft==="y"?A:y);Aa.distRatio===0?Hn.push(Aa.id):Aa.id>0&&(ga.push(Aa.id),Ft==="x"?ua.push([Aa.distRatio,0,0]):Ft==="y"?ua.push([0,Aa.distRatio,0]):ua.push([0,0,Aa.distRatio]))}else Ft==="x"?Hn=fn(1,f-1):Ft==="y"?Hn=fn(1,p-1):Hn=fn(1,x-1);ga.length>0&&(Ft==="x"?Wt[Rr]=mr(Ot,ga,Mr,Sr,ua,Wt[Rr]):Ft==="y"?Wt[Rr]=Ur(Ot,ga,Mr,Sr,ua,Wt[Rr]):Wt[Rr]=jr(Ot,ga,Mr,Sr,ua,Wt[Rr]),Rr++),Hn.length>0&&(Ft==="x"?Wt[Rr]=yt(Ot,Hn,Mr,Sr,Wt[Rr]):Ft==="y"?Wt[Rr]=wt(Ot,Hn,Mr,Sr,Wt[Rr]):Wt[Rr]=ht(Ot,Hn,Mr,Sr,Wt[Rr]),Rr++)}var ia=d.caps[Ft];ia.show&&ia.fill&&(pe(ia.fill),Ft==="x"?Wt[Rr]=yt(Ot,[0,f-1],Mr,Sr,Wt[Rr]):Ft==="y"?Wt[Rr]=wt(Ot,[0,p-1],Mr,Sr,Wt[Rr]):Wt[Rr]=ht(Ot,[0,x-1],Mr,Sr,Wt[Rr]),Rr++)}}),T===0&&de(),d._meshX=z,d._meshY=H,d._meshZ=G,d._meshIntensity=J,d._Xs=b,d._Ys=A,d._Zs=y}return Qr(),d}function u(d,h){var g=d.glplot.gl,m=v({gl:g}),E=new l(d,m,h.uid);return m._trace=E,E.update(h),d.glplot.add(m),E}Z.exports={findNearestOnAxis:a,generateIsoMeshes:o,createIsosurfaceTrace:u}}}),iJ=Ne({"src/traces/isosurface/index.js"(te,Z){Z.exports={attributes:yR(),supplyDefaults:sN().supplyDefaults,calc:lN(),colorbar:{min:"cmin",max:"cmax"},plot:xR().createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:Ib(),categories:["gl3d","showLegend"],meta:{}}}}),oJ=Ne({"lib/isosurface.js"(te,Z){Z.exports=iJ()}}),uN=Ne({"src/traces/volume/attributes.js"(te,Z){var v=Wu(),w=yR(),C=lk(),P=qo(),t=fi().extendFlat,r=ef().overrideAll,a=Z.exports=r(t({x:w.x,y:w.y,z:w.z,value:w.value,isomin:w.isomin,isomax:w.isomax,surface:w.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:w.slices,caps:w.caps,text:w.text,hovertext:w.hovertext,xhoverformat:w.xhoverformat,yhoverformat:w.yhoverformat,zhoverformat:w.zhoverformat,valuehoverformat:w.valuehoverformat,hovertemplate:w.hovertemplate,hovertemplatefallback:w.hovertemplatefallback},v("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:w.colorbar,opacity:w.opacity,opacityscale:C.opacityscale,lightposition:w.lightposition,lighting:w.lighting,flatshading:w.flatshading,contour:w.contour,hoverinfo:t({},P.hoverinfo),showlegend:t({},P.showlegend,{dflt:!1})}),"calc","nested");a.x.editType=a.y.editType=a.z.editType=a.value.editType="calc+clearAxisTypes"}}),sJ=Ne({"src/traces/volume/defaults.js"(te,Z){var v=In(),w=uN(),C=sN().supplyIsoDefaults,P=oN().opacityscaleDefaults;Z.exports=function(r,a,l,i){function s(o,u){return v.coerce(r,a,w,o,u)}C(r,a,l,i,s),P(r,a,i,s)}}}),lJ=Ne({"src/traces/volume/convert.js"(te,Z){var v=Gv().gl_mesh3d,w=k_().parseColorScale,C=In().isArrayOrTypedArray,P=C_(),t=Nc().extractOpts,r=$S(),a=xR().findNearestOnAxis,l=xR().generateIsoMeshes;function i(u,d,h){this.scene=u,this.uid=h,this.mesh=d,this.name="",this.data=null,this.showContour=!1}var s=i.prototype;s.handlePick=function(u){if(u.object===this.mesh){var d=u.data.index,h=this.data._meshX[d],g=this.data._meshY[d],m=this.data._meshZ[d],E=this.data._Ys.length,c=this.data._Zs.length,_=a(h,this.data._Xs).id,T=a(g,this.data._Ys).id,M=a(m,this.data._Zs).id,k=u.index=M+c*T+c*E*_;u.traceCoordinate=[this.data._meshX[k],this.data._meshY[k],this.data._meshZ[k],this.data._value[k]];var b=this.data.hovertext||this.data.text;return C(b)&&b[k]!==void 0?u.textLabel=b[k]:b&&(u.textLabel=b),!0}},s.update=function(u){var d=this.scene,h=d.fullSceneLayout;this.data=l(u);function g(T,M,k,b){return M.map(function(A){return T.d2l(A,0,b)*k})}var m=r(g(h.xaxis,u._meshX,d.dataScale[0],u.xcalendar),g(h.yaxis,u._meshY,d.dataScale[1],u.ycalendar),g(h.zaxis,u._meshZ,d.dataScale[2],u.zcalendar)),E=r(u._meshI,u._meshJ,u._meshK),c={positions:m,cells:E,lightPosition:[u.lightposition.x,u.lightposition.y,u.lightposition.z],ambient:u.lighting.ambient,diffuse:u.lighting.diffuse,specular:u.lighting.specular,roughness:u.lighting.roughness,fresnel:u.lighting.fresnel,vertexNormalsEpsilon:u.lighting.vertexnormalsepsilon,faceNormalsEpsilon:u.lighting.facenormalsepsilon,opacity:u.opacity,opacityscale:u.opacityscale,contourEnable:u.contour.show,contourColor:P(u.contour.color).slice(0,3),contourWidth:u.contour.width,useFacetNormals:u.flatshading},_=t(u);c.vertexIntensity=u._meshIntensity,c.vertexIntensityBounds=[_.min,_.max],c.colormap=w(u),this.mesh.update(c)},s.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function o(u,d){var h=u.glplot.gl,g=v({gl:h}),m=new i(u,g,d.uid);return g._trace=m,m.update(d),u.glplot.add(g),m}Z.exports=o}}),uJ=Ne({"src/traces/volume/index.js"(te,Z){Z.exports={attributes:uN(),supplyDefaults:sJ(),calc:lN(),colorbar:{min:"cmin",max:"cmax"},plot:lJ(),moduleType:"trace",name:"volume",basePlotModule:Ib(),categories:["gl3d","showLegend"],meta:{}}}}),cJ=Ne({"lib/volume.js"(te,Z){Z.exports=uJ()}}),fJ=Ne({"src/traces/mesh3d/defaults.js"(te,Z){var v=Yo(),w=In(),C=Rh(),P=ZS();Z.exports=function(r,a,l,i){function s(g,m){return w.coerce(r,a,P,g,m)}function o(g){var m=g.map(function(E){var c=s(E);return c&&w.isArrayOrTypedArray(c)?c:null});return m.every(function(E){return E&&E.length===m[0].length})&&m}var u=o(["x","y","z"]);if(!u){a.visible=!1;return}if(o(["i","j","k"]),a.i&&(!a.j||!a.k)||a.j&&(!a.k||!a.i)||a.k&&(!a.i||!a.j)){a.visible=!1;return}var d=v.getComponentMethod("calendars","handleTraceDefaults");d(r,a,["x","y","z"],i),["lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","alphahull","delaunayaxis","opacity"].forEach(function(g){s(g)});var h=s("contour.show");h&&(s("contour.color"),s("contour.width")),"intensity"in r?(s("intensity"),s("intensitymode"),C(r,a,i,s,{prefix:"",cLetter:"c"})):(a.showscale=!1,"facecolor"in r?s("facecolor"):"vertexcolor"in r?s("vertexcolor"):s("color",l)),s("text"),s("hovertext"),s("hovertemplate"),s("hovertemplatefallback"),s("xhoverformat"),s("yhoverformat"),s("zhoverformat"),a._length=null}}}),hJ=Ne({"src/traces/mesh3d/calc.js"(te,Z){var v=Ud();Z.exports=function(C,P){P.intensity&&v(C,P,{vals:P.intensity,containerStr:"",cLetter:"c"})}}}),dJ=Ne({"src/traces/mesh3d/convert.js"(te,Z){var v=Gv().gl_mesh3d,w=Gv().delaunay_triangulate,C=Gv().alpha_shape,P=Gv().convex_hull,t=k_().parseColorScale,r=In().isArrayOrTypedArray,a=C_(),l=Nc().extractOpts,i=$S();function s(c,_,T){this.scene=c,this.uid=T,this.mesh=_,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var o=s.prototype;o.handlePick=function(c){if(c.object===this.mesh){var _=c.index=c.data.index;c.data._cellCenter?c.traceCoordinate=c.data.dataCoordinate:c.traceCoordinate=[this.data.x[_],this.data.y[_],this.data.z[_]];var T=this.data.hovertext||this.data.text;return r(T)&&T[_]!==void 0?c.textLabel=T[_]:T&&(c.textLabel=T),!0}};function u(c){for(var _=[],T=c.length,M=0;M<T;M++)_[M]=a(c[M]);return _}function d(c,_,T,M){for(var k=[],b=_.length,A=0;A<b;A++)k[A]=c.d2l(_[A],0,M)*T;return k}function h(c){for(var _=[],T=c.length,M=0;M<T;M++)_[M]=Math.round(c[M]);return _}function g(c,_){for(var T=["x","y","z"].indexOf(c),M=[],k=_.length,b=0;b<k;b++)M[b]=[_[b][(T+1)%3],_[b][(T+2)%3]];return w(M)}function m(c,_){for(var T=c.length,M=0;M<T;M++)if(c[M]<=-.5||c[M]>=_-.5)return!1;return!0}o.update=function(c){var _=this.scene,T=_.fullSceneLayout;this.data=c;var M=c.x.length,k=i(d(T.xaxis,c.x,_.dataScale[0],c.xcalendar),d(T.yaxis,c.y,_.dataScale[1],c.ycalendar),d(T.zaxis,c.z,_.dataScale[2],c.zcalendar)),b;if(c.i&&c.j&&c.k){if(c.i.length!==c.j.length||c.j.length!==c.k.length||!m(c.i,M)||!m(c.j,M)||!m(c.k,M))return;b=i(h(c.i),h(c.j),h(c.k))}else c.alphahull===0?b=P(k):c.alphahull>0?b=C(c.alphahull,k):b=g(c.delaunayaxis,k);var A={positions:k,cells:b,lightPosition:[c.lightposition.x,c.lightposition.y,c.lightposition.z],ambient:c.lighting.ambient,diffuse:c.lighting.diffuse,specular:c.lighting.specular,roughness:c.lighting.roughness,fresnel:c.lighting.fresnel,vertexNormalsEpsilon:c.lighting.vertexnormalsepsilon,faceNormalsEpsilon:c.lighting.facenormalsepsilon,opacity:c.opacity,contourEnable:c.contour.show,contourColor:a(c.contour.color).slice(0,3),contourWidth:c.contour.width,useFacetNormals:c.flatshading};if(c.intensity){var y=l(c);this.color="#fff";var f=c.intensitymode;A[f+"Intensity"]=c.intensity,A[f+"IntensityBounds"]=[y.min,y.max],A.colormap=t(c)}else c.vertexcolor?(this.color=c.vertexcolor[0],A.vertexColors=u(c.vertexcolor)):c.facecolor?(this.color=c.facecolor[0],A.cellColors=u(c.facecolor)):(this.color=c.color,A.meshColor=a(c.color));this.mesh.update(A)},o.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function E(c,_){var T=c.glplot.gl,M=v({gl:T}),k=new s(c,M,_.uid);return M._trace=k,k.update(_),c.glplot.add(M),k}Z.exports=E}}),vJ=Ne({"src/traces/mesh3d/index.js"(te,Z){Z.exports={attributes:ZS(),supplyDefaults:fJ(),calc:hJ(),colorbar:{min:"cmin",max:"cmax"},plot:dJ(),moduleType:"trace",name:"mesh3d",basePlotModule:Ib(),categories:["gl3d","showLegend"],meta:{}}}}),pJ=Ne({"lib/mesh3d.js"(te,Z){Z.exports=vJ()}}),cN=Ne({"src/traces/cone/attributes.js"(te,Z){var v=Wu(),w=Ac().axisHoverFormat,{hovertemplateAttrs:C,templatefallbackAttrs:P}=Fl(),t=ZS(),r=qo(),a=fi().extendFlat,l={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},u:{valType:"data_array",editType:"calc"},v:{valType:"data_array",editType:"calc"},w:{valType:"data_array",editType:"calc"},sizemode:{valType:"enumerated",values:["scaled","absolute","raw"],editType:"calc",dflt:"scaled"},sizeref:{valType:"number",editType:"calc",min:0},anchor:{valType:"enumerated",editType:"calc",values:["tip","tail","cm","center"],dflt:"cm"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:C({editType:"calc"},{keys:["norm"]}),hovertemplatefallback:P({editType:"calc"}),uhoverformat:w("u",1),vhoverformat:w("v",1),whoverformat:w("w",1),xhoverformat:w("x"),yhoverformat:w("y"),zhoverformat:w("z"),showlegend:a({},r.showlegend,{dflt:!1})};a(l,v("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var i=["opacity","lightposition","lighting"];i.forEach(function(s){l[s]=t[s]}),l.hoverinfo=a({},r.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),Z.exports=l}}),mJ=Ne({"src/traces/cone/defaults.js"(te,Z){var v=In(),w=Rh(),C=cN();Z.exports=function(t,r,a,l){function i(E,c){return v.coerce(t,r,C,E,c)}var s=i("u"),o=i("v"),u=i("w"),d=i("x"),h=i("y"),g=i("z");if(!s||!s.length||!o||!o.length||!u||!u.length||!d||!d.length||!h||!h.length||!g||!g.length){r.visible=!1;return}var m=i("sizemode");i("sizeref",m==="raw"?1:.5),i("anchor"),i("lighting.ambient"),i("lighting.diffuse"),i("lighting.specular"),i("lighting.roughness"),i("lighting.fresnel"),i("lightposition.x"),i("lightposition.y"),i("lightposition.z"),w(t,r,l,i,{prefix:"",cLetter:"c"}),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("uhoverformat"),i("vhoverformat"),i("whoverformat"),i("xhoverformat"),i("yhoverformat"),i("zhoverformat"),r._length=null}}}),gJ=Ne({"src/traces/cone/calc.js"(te,Z){var v=Ud();Z.exports=function(C,P){for(var t=P.u,r=P.v,a=P.w,l=Math.min(P.x.length,P.y.length,P.z.length,t.length,r.length,a.length),i=-1/0,s=1/0,o=0;o<l;o++){var u=t[o],d=r[o],h=a[o],g=Math.sqrt(u*u+d*d+h*h);i=Math.max(i,g),s=Math.min(s,g)}P._len=l,P._normMax=i,v(C,P,{vals:[s,i],containerStr:"",cLetter:"c"})}}}),yJ=Ne({"src/traces/cone/convert.js"(te,Z){var v=Gv().gl_cone3d,w=Gv().gl_cone3d.createConeMesh,C=In().simpleMap,P=k_().parseColorScale,t=Nc().extractOpts,r=In().isArrayOrTypedArray,a=$S();function l(g,m){this.scene=g,this.uid=m,this.mesh=null,this.data=null}var i=l.prototype;i.handlePick=function(g){if(g.object===this.mesh){var m=g.index=g.data.index,E=this.data.x[m],c=this.data.y[m],_=this.data.z[m],T=this.data.u[m],M=this.data.v[m],k=this.data.w[m];g.traceCoordinate=[E,c,_,T,M,k,Math.sqrt(T*T+M*M+k*k)];var b=this.data.hovertext||this.data.text;return r(b)&&b[m]!==void 0?g.textLabel=b[m]:b&&(g.textLabel=b),!0}};var s={xaxis:0,yaxis:1,zaxis:2},o={tip:1,tail:0,cm:.25,center:.5},u={tip:1,tail:1,cm:.75,center:.5};function d(g,m){var E=g.fullSceneLayout,c=g.dataScale,_={};function T(y,f){var p=E[f],x=c[s[f]];return C(y,function(N){return p.d2l(N)*x})}_.vectors=a(T(m.u,"xaxis"),T(m.v,"yaxis"),T(m.w,"zaxis"),m._len),_.positions=a(T(m.x,"xaxis"),T(m.y,"yaxis"),T(m.z,"zaxis"),m._len);var M=t(m);_.colormap=P(m),_.vertexIntensityBounds=[M.min/m._normMax,M.max/m._normMax],_.coneOffset=o[m.anchor];var k=m.sizemode;k==="scaled"?_.coneSize=m.sizeref||.5:k==="absolute"?_.coneSize=m.sizeref&&m._normMax?m.sizeref/m._normMax:.5:k==="raw"&&(_.coneSize=m.sizeref),_.coneSizemode=k;var b=v(_),A=m.lightposition;return b.lightPosition=[A.x,A.y,A.z],b.ambient=m.lighting.ambient,b.diffuse=m.lighting.diffuse,b.specular=m.lighting.specular,b.roughness=m.lighting.roughness,b.fresnel=m.lighting.fresnel,b.opacity=m.opacity,m._pad=u[m.anchor]*b.vectorScale*b.coneScale*m._normMax,b}i.update=function(g){this.data=g;var m=d(this.scene,g);this.mesh.update(m)},i.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function h(g,m){var E=g.glplot.gl,c=d(g,m),_=w(E,c),T=new l(g,m.uid);return T.mesh=_,T.data=m,_._trace=T,g.glplot.add(_),T}Z.exports=h}}),_J=Ne({"src/traces/cone/index.js"(te,Z){Z.exports={moduleType:"trace",name:"cone",basePlotModule:Ib(),categories:["gl3d","showLegend"],attributes:cN(),supplyDefaults:mJ(),colorbar:{min:"cmin",max:"cmax"},calc:gJ(),plot:yJ(),eventData:function(v,w){return v.norm=w.traceCoordinate[6],v},meta:{}}}}),xJ=Ne({"lib/cone.js"(te,Z){Z.exports=_J()}}),fN=Ne({"src/traces/streamtube/attributes.js"(te,Z){var v=Wu(),w=Ac().axisHoverFormat,{hovertemplateAttrs:C,templatefallbackAttrs:P}=Fl(),t=ZS(),r=qo(),a=fi().extendFlat,l={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},u:{valType:"data_array",editType:"calc"},v:{valType:"data_array",editType:"calc"},w:{valType:"data_array",editType:"calc"},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:C({editType:"calc"},{keys:["tubex","tubey","tubez","tubeu","tubev","tubew","norm","divergence"]}),hovertemplatefallback:P({editType:"calc"}),uhoverformat:w("u",1),vhoverformat:w("v",1),whoverformat:w("w",1),xhoverformat:w("x"),yhoverformat:w("y"),zhoverformat:w("z"),showlegend:a({},r.showlegend,{dflt:!1})};a(l,v("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var i=["opacity","lightposition","lighting"];i.forEach(function(s){l[s]=t[s]}),l.hoverinfo=a({},r.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","divergence","text","name"],dflt:"x+y+z+norm+text+name"}),Z.exports=l}}),bJ=Ne({"src/traces/streamtube/defaults.js"(te,Z){var v=In(),w=Rh(),C=fN();Z.exports=function(t,r,a,l){function i(m,E){return v.coerce(t,r,C,m,E)}var s=i("u"),o=i("v"),u=i("w"),d=i("x"),h=i("y"),g=i("z");if(!s||!s.length||!o||!o.length||!u||!u.length||!d||!d.length||!h||!h.length||!g||!g.length){r.visible=!1;return}i("starts.x"),i("starts.y"),i("starts.z"),i("maxdisplayed"),i("sizeref"),i("lighting.ambient"),i("lighting.diffuse"),i("lighting.specular"),i("lighting.roughness"),i("lighting.fresnel"),i("lightposition.x"),i("lightposition.y"),i("lightposition.z"),w(t,r,l,i,{prefix:"",cLetter:"c"}),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("uhoverformat"),i("vhoverformat"),i("whoverformat"),i("xhoverformat"),i("yhoverformat"),i("zhoverformat"),r._length=null}}}),wJ=Ne({"src/traces/streamtube/convert.js"(te,Z){var v=Gv().gl_streamtube3d,w=v.createTubeMesh,C=In(),P=k_().parseColorScale,t=Nc().extractOpts,r=$S(),a={xaxis:0,yaxis:1,zaxis:2};function l(h,g){this.scene=h,this.uid=g,this.mesh=null,this.data=null}var i=l.prototype;i.handlePick=function(h){var g=this.scene.fullSceneLayout,m=this.scene.dataScale;function E(T,M){var k=g[M],b=m[a[M]];return k.l2c(T)/b}if(h.object===this.mesh){var c=h.data.position,_=h.data.velocity;return h.traceCoordinate=[E(c[0],"xaxis"),E(c[1],"yaxis"),E(c[2],"zaxis"),E(_[0],"xaxis"),E(_[1],"yaxis"),E(_[2],"zaxis"),h.data.intensity*this.data._normMax,h.data.divergence],h.textLabel=this.data.hovertext||this.data.text,!0}};function s(h){var g=h.length,m;return g>2?m=h.slice(1,g-1):g===2?m=[(h[0]+h[1])/2]:m=h,m}function o(h){var g=h.length;return g===1?[.5,.5]:[h[1]-h[0],h[g-1]-h[g-2]]}function u(h,g){var m=h.fullSceneLayout,E=h.dataScale,c=g._len,_={};function T(me,W){var ie=m[W],se=E[a[W]];return C.simpleMap(me,function(ee){return ie.d2l(ee)*se})}if(_.vectors=r(T(g._u,"xaxis"),T(g._v,"yaxis"),T(g._w,"zaxis"),c),!c)return{positions:[],cells:[]};var M=T(g._Xs,"xaxis"),k=T(g._Ys,"yaxis"),b=T(g._Zs,"zaxis");_.meshgrid=[M,k,b],_.gridFill=g._gridFill;var A=g._slen;if(A)_.startingPositions=r(T(g._startsX,"xaxis"),T(g._startsY,"yaxis"),T(g._startsZ,"zaxis"));else{for(var y=k[0],f=s(M),p=s(b),x=new Array(f.length*p.length),N=0,D=0;D<f.length;D++)for(var B=0;B<p.length;B++)x[N++]=[f[D],y,p[B]];_.startingPositions=x}_.colormap=P(g),_.tubeSize=g.sizeref,_.maxLength=g.maxdisplayed;var U=T(g._xbnds,"xaxis"),V=T(g._ybnds,"yaxis"),q=T(g._zbnds,"zaxis"),z=o(M),H=o(k),G=o(b),J=[[U[0]-z[0],V[0]-H[0],q[0]-G[0]],[U[1]+z[1],V[1]+H[1],q[1]+G[1]]],le=v(_,J),ge=t(g);le.vertexIntensityBounds=[ge.min/g._normMax,ge.max/g._normMax];var de=g.lightposition;return le.lightPosition=[de.x,de.y,de.z],le.ambient=g.lighting.ambient,le.diffuse=g.lighting.diffuse,le.specular=g.lighting.specular,le.roughness=g.lighting.roughness,le.fresnel=g.lighting.fresnel,le.opacity=g.opacity,g._pad=le.tubeScale*g.sizeref*2,le}i.update=function(h){this.data=h;var g=u(this.scene,h);this.mesh.update(g)},i.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function d(h,g){var m=h.glplot.gl,E=u(h,g),c=w(m,E),_=new l(h,g.uid);return _.mesh=c,_.data=g,c._trace=_,h.glplot.add(c),_}Z.exports=d}}),TJ=Ne({"src/traces/streamtube/index.js"(te,Z){Z.exports={moduleType:"trace",name:"streamtube",basePlotModule:Ib(),categories:["gl3d","showLegend"],attributes:fN(),supplyDefaults:bJ(),colorbar:{min:"cmin",max:"cmax"},calc:_R().calc,plot:wJ(),eventData:function(v,w){return v.tubex=v.x,v.tubey=v.y,v.tubez=v.z,v.tubeu=w.traceCoordinate[3],v.tubev=w.traceCoordinate[4],v.tubew=w.traceCoordinate[5],v.norm=w.traceCoordinate[6],v.divergence=w.traceCoordinate[7],delete v.x,delete v.y,delete v.z,v},meta:{}}}}),AJ=Ne({"lib/streamtube.js"(te,Z){Z.exports=TJ()}}),m3=Ne({"src/traces/scattergeo/attributes.js"(te,Z){var{hovertemplateAttrs:v,texttemplateAttrs:w,templatefallbackAttrs:C}=Fl(),P=qv(),t=tf(),r=qo(),a=Wu(),l=Fd().dash,i=fi().extendFlat,s=ef().overrideAll,o=t.marker,u=t.line,d=o.line;Z.exports=s({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:i({},t.mode,{dflt:"markers"}),text:i({},t.text,{}),texttemplate:w({editType:"plot"},{keys:["lat","lon","location","text"]}),texttemplatefallback:C({editType:"plot"}),hovertext:i({},t.hovertext,{}),textfont:t.textfont,textposition:t.textposition,line:{color:u.color,width:u.width,dash:l},connectgaps:t.connectgaps,marker:i({symbol:o.symbol,opacity:o.opacity,angle:o.angle,angleref:i({},o.angleref,{values:["previous","up","north"]}),standoff:o.standoff,size:o.size,sizeref:o.sizeref,sizemin:o.sizemin,sizemode:o.sizemode,colorbar:o.colorbar,line:i({width:d.width},a("marker.line")),gradient:o.gradient},a("marker")),fill:{valType:"enumerated",values:["none","toself"],dflt:"none"},fillcolor:P(),selected:t.selected,unselected:t.unselected,hoverinfo:i({},r.hoverinfo,{flags:["lon","lat","location","text","name"]}),hovertemplate:v(),hovertemplatefallback:C()},"calc","nested")}}),SJ=Ne({"src/traces/scattergeo/defaults.js"(te,Z){var v=In(),w=yu(),C=wv(),P=Im(),t=Wp(),r=uv(),a=m3(),l=["The library used by the *country names* `locationmode` option is changing in the next major version.","Some country names in existing plots may not work in the new version.","To ensure consistent behavior, consider setting `locationmode` to *ISO-3*."].join(" ");Z.exports=function(s,o,u,d){function h(k,b){return v.coerce(s,o,a,k,b)}var g=h("locations"),m;if(g&&g.length){var E=h("geojson"),c;(typeof E=="string"&&E!==""||v.isPlainObject(E))&&(c="geojson-id");var _=h("locationmode",c);_==="country names"&&v.warn(l),_==="geojson-id"&&h("featureidkey"),m=g.length}else{var T=h("lon")||[],M=h("lat")||[];m=Math.min(T.length,M.length)}if(!m){o.visible=!1;return}o._length=m,h("text"),h("hovertext"),h("hovertemplate"),h("hovertemplatefallback"),h("mode"),w.hasMarkers(o)&&C(s,o,u,d,h,{gradient:!0}),w.hasLines(o)&&(P(s,o,u,d,h),h("connectgaps")),w.hasText(o)&&(h("texttemplate"),h("texttemplatefallback"),t(s,o,d,h)),h("fill"),o.fill!=="none"&&r(s,o,u,h),v.coerceSelectionMarkerOpacity(o,h)}}}),EJ=Ne({"src/traces/scattergeo/format_labels.js"(te,Z){var v=Os();Z.exports=function(C,P,t){var r={},a=t[P.geo]._subplot,l=a.mockAxis,i=C.lonlat;return r.lonLabel=v.tickText(l,l.c2l(i[0]),!0).text,r.latLabel=v.tickText(l,l.c2l(i[1]),!0).text,r}}}),bR=Ne({"src/traces/scattergeo/calc.js"(te,Z){var v=Fn(),w=da().BADNUM,C=Yp(),P=s0(),t=Gh(),r=In().isArrayOrTypedArray,a=In()._;function l(i){return i&&typeof i=="string"}Z.exports=function(s,o){var u=r(o.locations),d=u?o.locations.length:o._length,h=new Array(d),g;o.geojson?g=function(M){return l(M)||v(M)}:g=l;for(var m=0;m<d;m++){var E=h[m]={};if(u){var c=o.locations[m];E.loc=g(c)?c:null}else{var _=o.lon[m],T=o.lat[m];v(_)&&v(T)?E.lonlat=[+_,+T]:E.lonlat=[w,w]}}return P(h,o),C(s,o),t(h,o),d&&(h[0].t={labels:{lat:a(s,"lat:")+" ",lon:a(s,"lon:")+" "}}),h}}}),uk=Ne({"src/plots/geo/constants.js"(te){te.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"},te.axesNames=["lonaxis","lataxis"],te.lonaxisSpan={orthographic:180,"azimuthal equal area":360,"azimuthal equidistant":360,"conic conformal":180,gnomonic:160,stereographic:180,"transverse mercator":180,"*":360},te.lataxisSpan={"conic conformal":150,stereographic:179.5,"*":180},te.scopeDefaults={world:{lonaxisRange:[-180,180],lataxisRange:[-90,90],projType:"equirectangular",projRotate:[0,0,0]},usa:{lonaxisRange:[-180,-50],lataxisRange:[15,80],projType:"albers usa"},europe:{lonaxisRange:[-30,60],lataxisRange:[30,85],projType:"conic conformal",projRotate:[15,0,0],projParallels:[0,60]},asia:{lonaxisRange:[22,160],lataxisRange:[-15,55],projType:"mercator",projRotate:[0,0,0]},africa:{lonaxisRange:[-30,60],lataxisRange:[-40,40],projType:"mercator",projRotate:[0,0,0]},"north america":{lonaxisRange:[-180,-45],lataxisRange:[5,85],projType:"conic conformal",projRotate:[-100,0,0],projParallels:[29.5,45.5]},"south america":{lonaxisRange:[-100,-30],lataxisRange:[-60,15],projType:"mercator",projRotate:[0,0,0]},antarctica:{lonaxisRange:[-180,180],lataxisRange:[-90,-60],projType:"equirectangular",projRotate:[0,0,0]},oceania:{lonaxisRange:[-180,180],lataxisRange:[-50,25],projType:"equirectangular",projRotate:[0,0,0]}},te.clipPad=.001,te.precision=.1,te.landColor="#F0DC82",te.waterColor="#3399FF",te.locationmodeToLayer={"ISO-3":"countries","USA-states":"subunits","country names":"countries"},te.sphereSVG={type:"Sphere"},te.fillLayers={ocean:1,land:1,lakes:1},te.lineLayers={subunits:1,countries:1,coastlines:1,rivers:1,frame:1},te.layers=["bg","ocean","land","lakes","subunits","countries","coastlines","rivers","lataxis","lonaxis","frame","backplot","frontplot"],te.layersForChoropleth=["bg","ocean","land","subunits","countries","coastlines","lataxis","lonaxis","frame","backplot","rivers","lakes","frontplot"],te.layerNameToAdjective={ocean:"ocean",land:"land",lakes:"lake",subunits:"subunit",countries:"country",coastlines:"coastline",rivers:"river",frame:"frame"}}}),hN=Ne({"node_modules/topojson-client/dist/topojson-client.js"(te,Z){(function(v,w){typeof te=="object"&&typeof Z<"u"?w(te):(v=v||self,w(v.topojson=v.topojson||{}))})(te,function(v){function w(T){return T}function C(T){if(T==null)return w;var M,k,b=T.scale[0],A=T.scale[1],y=T.translate[0],f=T.translate[1];return function(p,x){x||(M=k=0);var N=2,D=p.length,B=new Array(D);for(B[0]=(M+=p[0])*b+y,B[1]=(k+=p[1])*A+f;N<D;)B[N]=p[N],++N;return B}}function P(T){var M=C(T.transform),k,b=1/0,A=b,y=-b,f=-b;function p(N){N=M(N),N[0]<b&&(b=N[0]),N[0]>y&&(y=N[0]),N[1]<A&&(A=N[1]),N[1]>f&&(f=N[1])}function x(N){switch(N.type){case"GeometryCollection":N.geometries.forEach(x);break;case"Point":p(N.coordinates);break;case"MultiPoint":N.coordinates.forEach(p);break}}T.arcs.forEach(function(N){for(var D=-1,B=N.length,U;++D<B;)U=M(N[D],D),U[0]<b&&(b=U[0]),U[0]>y&&(y=U[0]),U[1]<A&&(A=U[1]),U[1]>f&&(f=U[1])});for(k in T.objects)x(T.objects[k]);return[b,A,y,f]}function t(T,M){for(var k,b=T.length,A=b-M;A<--b;)k=T[A],T[A++]=T[b],T[b]=k}function r(T,M){return typeof M=="string"&&(M=T.objects[M]),M.type==="GeometryCollection"?{type:"FeatureCollection",features:M.geometries.map(function(k){return a(T,k)})}:a(T,M)}function a(T,M){var k=M.id,b=M.bbox,A=M.properties==null?{}:M.properties,y=l(T,M);return k==null&&b==null?{type:"Feature",properties:A,geometry:y}:b==null?{type:"Feature",id:k,properties:A,geometry:y}:{type:"Feature",id:k,bbox:b,properties:A,geometry:y}}function l(T,M){var k=C(T.transform),b=T.arcs;function A(D,B){B.length&&B.pop();for(var U=b[D<0?~D:D],V=0,q=U.length;V<q;++V)B.push(k(U[V],V));D<0&&t(B,q)}function y(D){return k(D)}function f(D){for(var B=[],U=0,V=D.length;U<V;++U)A(D[U],B);return B.length<2&&B.push(B[0]),B}function p(D){for(var B=f(D);B.length<4;)B.push(B[0]);return B}function x(D){return D.map(p)}function N(D){var B=D.type,U;switch(B){case"GeometryCollection":return{type:B,geometries:D.geometries.map(N)};case"Point":U=y(D.coordinates);break;case"MultiPoint":U=D.coordinates.map(y);break;case"LineString":U=f(D.arcs);break;case"MultiLineString":U=D.arcs.map(f);break;case"Polygon":U=x(D.arcs);break;case"MultiPolygon":U=D.arcs.map(x);break;default:return null}return{type:B,coordinates:U}}return N(M)}function i(T,M){var k={},b={},A={},y=[],f=-1;M.forEach(function(N,D){var B=T.arcs[N<0?~N:N],U;B.length<3&&!B[1][0]&&!B[1][1]&&(U=M[++f],M[f]=N,M[D]=U)}),M.forEach(function(N){var D=p(N),B=D[0],U=D[1],V,q;if(V=A[B])if(delete A[V.end],V.push(N),V.end=U,q=b[U]){delete b[q.start];var z=q===V?V:V.concat(q);b[z.start=V.start]=A[z.end=q.end]=z}else b[V.start]=A[V.end]=V;else if(V=b[U])if(delete b[V.start],V.unshift(N),V.start=B,q=A[B]){delete A[q.end];var H=q===V?V:q.concat(V);b[H.start=q.start]=A[H.end=V.end]=H}else b[V.start]=A[V.end]=V;else V=[N],b[V.start=B]=A[V.end=U]=V});function p(N){var D=T.arcs[N<0?~N:N],B=D[0],U;return T.transform?(U=[0,0],D.forEach(function(V){U[0]+=V[0],U[1]+=V[1]})):U=D[D.length-1],N<0?[U,B]:[B,U]}function x(N,D){for(var B in N){var U=N[B];delete D[U.start],delete U.start,delete U.end,U.forEach(function(V){k[V<0?~V:V]=1}),y.push(U)}}return x(A,b),x(b,A),M.forEach(function(N){k[N<0?~N:N]||y.push([N])}),y}function s(T){return l(T,o.apply(this,arguments))}function o(T,M,k){var b,A,y;if(arguments.length>1)b=u(T,M,k);else for(A=0,b=new Array(y=T.arcs.length);A<y;++A)b[A]=A;return{type:"MultiLineString",arcs:i(T,b)}}function u(T,M,k){var b=[],A=[],y;function f(B){var U=B<0?~B:B;(A[U]||(A[U]=[])).push({i:B,g:y})}function p(B){B.forEach(f)}function x(B){B.forEach(p)}function N(B){B.forEach(x)}function D(B){switch(y=B,B.type){case"GeometryCollection":B.geometries.forEach(D);break;case"LineString":p(B.arcs);break;case"MultiLineString":case"Polygon":x(B.arcs);break;case"MultiPolygon":N(B.arcs);break}}return D(M),A.forEach(k==null?function(B){b.push(B[0].i)}:function(B){k(B[0].g,B[B.length-1].g)&&b.push(B[0].i)}),b}function d(T){for(var M=-1,k=T.length,b,A=T[k-1],y=0;++M<k;)b=A,A=T[M],y+=b[0]*A[1]-b[1]*A[0];return Math.abs(y)}function h(T){return l(T,g.apply(this,arguments))}function g(T,M){var k={},b=[],A=[];M.forEach(y);function y(x){switch(x.type){case"GeometryCollection":x.geometries.forEach(y);break;case"Polygon":f(x.arcs);break;case"MultiPolygon":x.arcs.forEach(f);break}}function f(x){x.forEach(function(N){N.forEach(function(D){(k[D=D<0?~D:D]||(k[D]=[])).push(x)})}),b.push(x)}function p(x){return d(l(T,{type:"Polygon",arcs:[x]}).coordinates[0])}return b.forEach(function(x){if(!x._){var N=[],D=[x];for(x._=1,A.push(N);x=D.pop();)N.push(x),x.forEach(function(B){B.forEach(function(U){k[U<0?~U:U].forEach(function(V){V._||(V._=1,D.push(V))})})})}}),b.forEach(function(x){delete x._}),{type:"MultiPolygon",arcs:A.map(function(x){var N=[],D;if(x.forEach(function(z){z.forEach(function(H){H.forEach(function(G){k[G<0?~G:G].length<2&&N.push(G)})})}),N=i(T,N),(D=N.length)>1)for(var B=1,U=p(N[0]),V,q;B<D;++B)(V=p(N[B]))>U&&(q=N[0],N[0]=N[B],N[B]=q,U=V);return N}).filter(function(x){return x.length>0})}}function m(T,M){for(var k=0,b=T.length;k<b;){var A=k+b>>>1;T[A]<M?k=A+1:b=A}return k}function E(T){var M={},k=T.map(function(){return[]});function b(z,H){z.forEach(function(G){G<0&&(G=~G);var J=M[G];J?J.push(H):M[G]=[H]})}function A(z,H){z.forEach(function(G){b(G,H)})}function y(z,H){z.type==="GeometryCollection"?z.geometries.forEach(function(G){y(G,H)}):z.type in f&&f[z.type](z.arcs,H)}var f={LineString:b,MultiLineString:A,Polygon:A,MultiPolygon:function(z,H){z.forEach(function(G){A(G,H)})}};T.forEach(y);for(var p in M)for(var x=M[p],N=x.length,D=0;D<N;++D)for(var B=D+1;B<N;++B){var U=x[D],V=x[B],q;(q=k[U])[p=m(q,V)]!==V&&q.splice(p,0,V),(q=k[V])[p=m(q,U)]!==U&&q.splice(p,0,U)}return k}function c(T){if(T==null)return w;var M,k,b=T.scale[0],A=T.scale[1],y=T.translate[0],f=T.translate[1];return function(p,x){x||(M=k=0);var N=2,D=p.length,B=new Array(D),U=Math.round((p[0]-y)/b),V=Math.round((p[1]-f)/A);for(B[0]=U-M,M=U,B[1]=V-k,k=V;N<D;)B[N]=p[N],++N;return B}}function _(T,M){if(T.transform)throw new Error("already quantized");if(!M||!M.scale){if(!((f=Math.floor(M))>=2))throw new Error("n must be ≥2");x=T.bbox||P(T);var k=x[0],b=x[1],A=x[2],y=x[3],f;M={scale:[A-k?(A-k)/(f-1):1,y-b?(y-b)/(f-1):1],translate:[k,b]}}else x=T.bbox;var p=c(M),x,N,D=T.objects,B={};function U(z){return p(z)}function V(z){var H;switch(z.type){case"GeometryCollection":H={type:"GeometryCollection",geometries:z.geometries.map(V)};break;case"Point":H={type:"Point",coordinates:U(z.coordinates)};break;case"MultiPoint":H={type:"MultiPoint",coordinates:z.coordinates.map(U)};break;default:return z}return z.id!=null&&(H.id=z.id),z.bbox!=null&&(H.bbox=z.bbox),z.properties!=null&&(H.properties=z.properties),H}function q(z){var H=0,G=1,J=z.length,le,ge=new Array(J);for(ge[0]=p(z[0],0);++H<J;)((le=p(z[H],H))[0]||le[1])&&(ge[G++]=le);return G===1&&(ge[G++]=[0,0]),ge.length=G,ge}for(N in D)B[N]=V(D[N]);return{type:"Topology",bbox:x,transform:M,objects:B,arcs:T.arcs.map(q)}}v.bbox=P,v.feature=r,v.merge=h,v.mergeArcs=g,v.mesh=s,v.meshArcs=o,v.neighbors=E,v.quantize=_,v.transform=C,v.untransform=c,Object.defineProperty(v,"__esModule",{value:!0})})}}),wR=Ne({"src/lib/topojson_utils.js"(te,Z){var v=Z.exports={},w=uk().locationmodeToLayer,C=hN().feature;v.getTopojsonName=function(P){return[P.scope.replace(/ /g,"-"),"_",P.resolution.toString(),"m"].join("")},v.getTopojsonPath=function(P,t){return P+=P.endsWith("/")?"":"/",`${P}${t}.json`},v.getTopojsonFeatures=function(P,t){var r=w[P.locationmode],a=t.objects[r];return C(t,a).features}}}),Db=Ne({"src/lib/geojson_utils.js"(te){var Z=da().BADNUM;te.calcTraceToLineCoords=function(v){for(var w=v[0].trace,C=w.connectgaps,P=[],t=[],r=0;r<v.length;r++){var a=v[r],l=a.lonlat;l[0]!==Z?t.push(l):!C&&t.length>0&&(P.push(t),t=[])}return t.length>0&&P.push(t),P},te.makeLine=function(v){return v.length===1?{type:"LineString",coordinates:v[0]}:{type:"MultiLineString",coordinates:v}},te.makePolygon=function(v){if(v.length===1)return{type:"Polygon",coordinates:v};for(var w=new Array(v.length),C=0;C<v.length;C++)w[C]=[v[C]];return{type:"MultiPolygon",coordinates:w}},te.makeBlank=function(){return{type:"Point",coordinates:[]}}}}),MJ=Ne({"node_modules/country-regex/index.js"(te,Z){Z.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"}}}),TR=Ne({"node_modules/@turf/helpers/dist/cjs/index.cjs"(te){Object.defineProperty(te,"__esModule",{value:!0});var Z=63710088e-1,v={centimeters:Z*100,centimetres:Z*100,degrees:360/(2*Math.PI),feet:Z*3.28084,inches:Z*39.37,kilometers:Z/1e3,kilometres:Z/1e3,meters:Z,metres:Z,miles:Z/1609.344,millimeters:Z*1e3,millimetres:Z*1e3,nauticalmiles:Z/1852,radians:1,yards:Z*1.0936},w={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:29155334959812285e-23,millimeters:1e6,millimetres:1e6,yards:1.195990046};function C(D,B,U={}){const V={type:"Feature"};return(U.id===0||U.id)&&(V.id=U.id),U.bbox&&(V.bbox=U.bbox),V.properties=B||{},V.geometry=D,V}function P(D,B,U={}){switch(D){case"Point":return t(B).geometry;case"LineString":return i(B).geometry;case"Polygon":return a(B).geometry;case"MultiPoint":return d(B).geometry;case"MultiLineString":return u(B).geometry;case"MultiPolygon":return h(B).geometry;default:throw new Error(D+" is invalid")}}function t(D,B,U={}){if(!D)throw new Error("coordinates is required");if(!Array.isArray(D))throw new Error("coordinates must be an Array");if(D.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!f(D[0])||!f(D[1]))throw new Error("coordinates must contain numbers");return C({type:"Point",coordinates:D},B,U)}function r(D,B,U={}){return o(D.map(V=>t(V,B)),U)}function a(D,B,U={}){for(const q of D){if(q.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(q[q.length-1].length!==q[0].length)throw new Error("First and last Position are not equivalent.");for(let z=0;z<q[q.length-1].length;z++)if(q[q.length-1][z]!==q[0][z])throw new Error("First and last Position are not equivalent.")}return C({type:"Polygon",coordinates:D},B,U)}function l(D,B,U={}){return o(D.map(V=>a(V,B)),U)}function i(D,B,U={}){if(D.length<2)throw new Error("coordinates must be an array of two or more positions");return C({type:"LineString",coordinates:D},B,U)}function s(D,B,U={}){return o(D.map(V=>i(V,B)),U)}function o(D,B={}){const U={type:"FeatureCollection"};return B.id&&(U.id=B.id),B.bbox&&(U.bbox=B.bbox),U.features=D,U}function u(D,B,U={}){return C({type:"MultiLineString",coordinates:D},B,U)}function d(D,B,U={}){return C({type:"MultiPoint",coordinates:D},B,U)}function h(D,B,U={}){return C({type:"MultiPolygon",coordinates:D},B,U)}function g(D,B,U={}){return C({type:"GeometryCollection",geometries:D},B,U)}function m(D,B=0){if(B&&!(B>=0))throw new Error("precision must be a positive number");const U=Math.pow(10,B||0);return Math.round(D*U)/U}function E(D,B="kilometers"){const U=v[B];if(!U)throw new Error(B+" units is invalid");return D*U}function c(D,B="kilometers"){const U=v[B];if(!U)throw new Error(B+" units is invalid");return D/U}function _(D,B){return k(c(D,B))}function T(D){let B=D%360;return B<0&&(B+=360),B}function M(D){return D=D%360,D>180?D-360:D<-180?D+360:D}function k(D){return D%(2*Math.PI)*180/Math.PI}function b(D){return D%360*Math.PI/180}function A(D,B="kilometers",U="kilometers"){if(!(D>=0))throw new Error("length must be a positive number");return E(c(D,B),U)}function y(D,B="meters",U="kilometers"){if(!(D>=0))throw new Error("area must be a positive number");const V=w[B];if(!V)throw new Error("invalid original units");const q=w[U];if(!q)throw new Error("invalid final units");return D/V*q}function f(D){return!isNaN(D)&&D!==null&&!Array.isArray(D)}function p(D){return D!==null&&typeof D=="object"&&!Array.isArray(D)}function x(D){if(!D)throw new Error("bbox is required");if(!Array.isArray(D))throw new Error("bbox must be an Array");if(D.length!==4&&D.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");D.forEach(B=>{if(!f(B))throw new Error("bbox must only contain numbers")})}function N(D){if(!D)throw new Error("id is required");if(["string","number"].indexOf(typeof D)===-1)throw new Error("id must be a number or a string")}te.areaFactors=w,te.azimuthToBearing=M,te.bearingToAzimuth=T,te.convertArea=y,te.convertLength=A,te.degreesToRadians=b,te.earthRadius=Z,te.factors=v,te.feature=C,te.featureCollection=o,te.geometry=P,te.geometryCollection=g,te.isNumber=f,te.isObject=p,te.lengthToDegrees=_,te.lengthToRadians=c,te.lineString=i,te.lineStrings=s,te.multiLineString=u,te.multiPoint=d,te.multiPolygon=h,te.point=t,te.points=r,te.polygon=a,te.polygons=l,te.radiansToDegrees=k,te.radiansToLength=E,te.round=m,te.validateBBox=x,te.validateId=N}}),AR=Ne({"node_modules/@turf/meta/dist/cjs/index.cjs"(te){Object.defineProperty(te,"__esModule",{value:!0});var Z=TR();function v(c,_,T){if(c!==null)for(var M,k,b,A,y,f,p,x=0,N=0,D,B=c.type,U=B==="FeatureCollection",V=B==="Feature",q=U?c.features.length:1,z=0;z<q;z++){p=U?c.features[z].geometry:V?c.geometry:c,D=p?p.type==="GeometryCollection":!1,y=D?p.geometries.length:1;for(var H=0;H<y;H++){var G=0,J=0;if(A=D?p.geometries[H]:p,A!==null){f=A.coordinates;var le=A.type;switch(x=T&&(le==="Polygon"||le==="MultiPolygon")?1:0,le){case null:break;case"Point":if(_(f,N,z,G,J)===!1)return!1;N++,G++;break;case"LineString":case"MultiPoint":for(M=0;M<f.length;M++){if(_(f[M],N,z,G,J)===!1)return!1;N++,le==="MultiPoint"&&G++}le==="LineString"&&G++;break;case"Polygon":case"MultiLineString":for(M=0;M<f.length;M++){for(k=0;k<f[M].length-x;k++){if(_(f[M][k],N,z,G,J)===!1)return!1;N++}le==="MultiLineString"&&G++,le==="Polygon"&&J++}le==="Polygon"&&G++;break;case"MultiPolygon":for(M=0;M<f.length;M++){for(J=0,k=0;k<f[M].length;k++){for(b=0;b<f[M][k].length-x;b++){if(_(f[M][k][b],N,z,G,J)===!1)return!1;N++}J++}G++}break;case"GeometryCollection":for(M=0;M<A.geometries.length;M++)if(v(A.geometries[M],_,T)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function w(c,_,T,M){var k=T;return v(c,function(b,A,y,f,p){A===0&&T===void 0?k=b:k=_(k,b,A,y,f,p)},M),k}function C(c,_){var T;switch(c.type){case"FeatureCollection":for(T=0;T<c.features.length&&_(c.features[T].properties,T)!==!1;T++);break;case"Feature":_(c.properties,0);break}}function P(c,_,T){var M=T;return C(c,function(k,b){b===0&&T===void 0?M=k:M=_(M,k,b)}),M}function t(c,_){if(c.type==="Feature")_(c,0);else if(c.type==="FeatureCollection")for(var T=0;T<c.features.length&&_(c.features[T],T)!==!1;T++);}function r(c,_,T){var M=T;return t(c,function(k,b){b===0&&T===void 0?M=k:M=_(M,k,b)}),M}function a(c){var _=[];return v(c,function(T){_.push(T)}),_}function l(c,_){var T,M,k,b,A,y,f,p,x,N,D=0,B=c.type==="FeatureCollection",U=c.type==="Feature",V=B?c.features.length:1;for(T=0;T<V;T++){for(y=B?c.features[T].geometry:U?c.geometry:c,p=B?c.features[T].properties:U?c.properties:{},x=B?c.features[T].bbox:U?c.bbox:void 0,N=B?c.features[T].id:U?c.id:void 0,f=y?y.type==="GeometryCollection":!1,A=f?y.geometries.length:1,k=0;k<A;k++){if(b=f?y.geometries[k]:y,b===null){if(_(null,D,p,x,N)===!1)return!1;continue}switch(b.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(_(b,D,p,x,N)===!1)return!1;break}case"GeometryCollection":{for(M=0;M<b.geometries.length;M++)if(_(b.geometries[M],D,p,x,N)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}D++}}function i(c,_,T){var M=T;return l(c,function(k,b,A,y,f){b===0&&T===void 0?M=k:M=_(M,k,b,A,y,f)}),M}function s(c,_){l(c,function(T,M,k,b,A){var y=T===null?null:T.type;switch(y){case null:case"Point":case"LineString":case"Polygon":return _(Z.feature.call(void 0,T,k,{bbox:b,id:A}),M,0)===!1?!1:void 0}var f;switch(y){case"MultiPoint":f="Point";break;case"MultiLineString":f="LineString";break;case"MultiPolygon":f="Polygon";break}for(var p=0;p<T.coordinates.length;p++){var x=T.coordinates[p],N={type:f,coordinates:x};if(_(Z.feature.call(void 0,N,k),M,p)===!1)return!1}})}function o(c,_,T){var M=T;return s(c,function(k,b,A){b===0&&A===0&&T===void 0?M=k:M=_(M,k,b,A)}),M}function u(c,_){s(c,function(T,M,k){var b=0;if(T.geometry){var A=T.geometry.type;if(!(A==="Point"||A==="MultiPoint")){var y,f=0,p=0,x=0;if(v(T,function(N,D,B,U,V){if(y===void 0||M>f||U>p||V>x){y=N,f=M,p=U,x=V,b=0;return}var q=Z.lineString.call(void 0,[y,N],T.properties);if(_(q,M,k,V,b)===!1)return!1;b++,y=N})===!1)return!1}}})}function d(c,_,T){var M=T,k=!1;return u(c,function(b,A,y,f,p){k===!1&&T===void 0?M=b:M=_(M,b,A,y,f,p),k=!0}),M}function h(c,_){if(!c)throw new Error("geojson is required");s(c,function(T,M,k){if(T.geometry!==null){var b=T.geometry.type,A=T.geometry.coordinates;switch(b){case"LineString":if(_(T,M,k,0,0)===!1)return!1;break;case"Polygon":for(var y=0;y<A.length;y++)if(_(Z.lineString.call(void 0,A[y],T.properties),M,k,y)===!1)return!1;break}}})}function g(c,_,T){var M=T;return h(c,function(k,b,A,y){b===0&&T===void 0?M=k:M=_(M,k,b,A,y)}),M}function m(c,_){if(_=_||{},!Z.isObject.call(void 0,_))throw new Error("options is invalid");var T=_.featureIndex||0,M=_.multiFeatureIndex||0,k=_.geometryIndex||0,b=_.segmentIndex||0,A=_.properties,y;switch(c.type){case"FeatureCollection":T<0&&(T=c.features.length+T),A=A||c.features[T].properties,y=c.features[T].geometry;break;case"Feature":A=A||c.properties,y=c.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":y=c;break;default:throw new Error("geojson is invalid")}if(y===null)return null;var f=y.coordinates;switch(y.type){case"Point":case"MultiPoint":return null;case"LineString":return b<0&&(b=f.length+b-1),Z.lineString.call(void 0,[f[b],f[b+1]],A,_);case"Polygon":return k<0&&(k=f.length+k),b<0&&(b=f[k].length+b-1),Z.lineString.call(void 0,[f[k][b],f[k][b+1]],A,_);case"MultiLineString":return M<0&&(M=f.length+M),b<0&&(b=f[M].length+b-1),Z.lineString.call(void 0,[f[M][b],f[M][b+1]],A,_);case"MultiPolygon":return M<0&&(M=f.length+M),k<0&&(k=f[M].length+k),b<0&&(b=f[M][k].length-b-1),Z.lineString.call(void 0,[f[M][k][b],f[M][k][b+1]],A,_)}throw new Error("geojson is invalid")}function E(c,_){if(_=_||{},!Z.isObject.call(void 0,_))throw new Error("options is invalid");var T=_.featureIndex||0,M=_.multiFeatureIndex||0,k=_.geometryIndex||0,b=_.coordIndex||0,A=_.properties,y;switch(c.type){case"FeatureCollection":T<0&&(T=c.features.length+T),A=A||c.features[T].properties,y=c.features[T].geometry;break;case"Feature":A=A||c.properties,y=c.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":y=c;break;default:throw new Error("geojson is invalid")}if(y===null)return null;var f=y.coordinates;switch(y.type){case"Point":return Z.point.call(void 0,f,A,_);case"MultiPoint":return M<0&&(M=f.length+M),Z.point.call(void 0,f[M],A,_);case"LineString":return b<0&&(b=f.length+b),Z.point.call(void 0,f[b],A,_);case"Polygon":return k<0&&(k=f.length+k),b<0&&(b=f[k].length+b),Z.point.call(void 0,f[k][b],A,_);case"MultiLineString":return M<0&&(M=f.length+M),b<0&&(b=f[M].length+b),Z.point.call(void 0,f[M][b],A,_);case"MultiPolygon":return M<0&&(M=f.length+M),k<0&&(k=f[M].length+k),b<0&&(b=f[M][k].length-b),Z.point.call(void 0,f[M][k][b],A,_)}throw new Error("geojson is invalid")}te.coordAll=a,te.coordEach=v,te.coordReduce=w,te.featureEach=t,te.featureReduce=r,te.findPoint=E,te.findSegment=m,te.flattenEach=s,te.flattenReduce=o,te.geomEach=l,te.geomReduce=i,te.lineEach=h,te.lineReduce=g,te.propEach=C,te.propReduce=P,te.segmentEach=u,te.segmentReduce=d}}),CJ=Ne({"node_modules/@turf/area/dist/cjs/index.cjs"(te){Object.defineProperty(te,"__esModule",{value:!0});var Z=TR(),v=AR();function w(i){return v.geomReduce.call(void 0,i,(s,o)=>s+C(o),0)}function C(i){let s=0,o;switch(i.type){case"Polygon":return P(i.coordinates);case"MultiPolygon":for(o=0;o<i.coordinates.length;o++)s+=P(i.coordinates[o]);return s;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0}return 0}function P(i){let s=0;if(i&&i.length>0){s+=Math.abs(a(i[0]));for(let o=1;o<i.length;o++)s-=Math.abs(a(i[o]))}return s}var t=Z.earthRadius*Z.earthRadius/2,r=Math.PI/180;function a(i){const s=i.length-1;if(s<=2)return 0;let o=0,u=0;for(;u<s;){const d=i[u],h=i[u+1===s?0:u+1],g=i[u+2>=s?(u+2)%s:u+2],m=d[0]*r,E=h[1]*r,c=g[0]*r;o+=(c-m)*Math.sin(E),u++}return o*t}var l=w;te.area=w,te.default=l}}),kJ=Ne({"node_modules/@turf/centroid/dist/cjs/index.cjs"(te){Object.defineProperty(te,"__esModule",{value:!0});var Z=TR(),v=AR();function w(P,t={}){let r=0,a=0,l=0;return v.coordEach.call(void 0,P,function(i){r+=i[0],a+=i[1],l++},!0),Z.point.call(void 0,[r/l,a/l],t.properties)}var C=w;te.centroid=w,te.default=C}}),PJ=Ne({"node_modules/@turf/bbox/dist/cjs/index.cjs"(te){Object.defineProperty(te,"__esModule",{value:!0});var Z=AR();function v(C,P={}){if(C.bbox!=null&&P.recompute!==!0)return C.bbox;const t=[1/0,1/0,-1/0,-1/0];return Z.coordEach.call(void 0,C,r=>{t[0]>r[0]&&(t[0]=r[0]),t[1]>r[1]&&(t[1]=r[1]),t[2]<r[0]&&(t[2]=r[0]),t[3]<r[1]&&(t[3]=r[1])}),t}var w=v;te.bbox=v,te.default=w}}),Ob=Ne({"src/lib/geo_location_utils.js"(te,Z){var v=xn(),w=MJ(),{area:C}=CJ(),{centroid:P}=kJ(),{bbox:t}=PJ(),r=z0(),a=Nd(),l=qa(),i=mi(),s=j1(),o=Object.keys(w),u={"ISO-3":r,"USA-states":r,"country names":d};function d(M){for(var k=0;k<o.length;k++){var b=o[k],A=new RegExp(w[b]);if(A.test(M.trim().toLowerCase()))return b}return a.log("Unrecognized country name: "+M+"."),!1}function h(M,k,b){if(!k||typeof k!="string")return!1;var A=u[M](k),y,f,p;if(A){if(M==="USA-states")for(y=[],p=0;p<b.length;p++)f=b[p],f.properties&&f.properties.gu&&f.properties.gu==="USA"&&y.push(f);else y=b;for(p=0;p<y.length;p++)if(f=y[p],f.id===A)return f;a.log(["Location with id",A,"does not have a matching topojson feature at this resolution."].join(" "))}return!1}function g(M){var k=M.geometry,b=k.coordinates,A=M.id,y=[],f,p,x,N;function D(B){for(var U=0;U<B.length-1;U++)if(B[U][0]>0&&B[U+1][0]<0)return U;return null}switch(A==="RUS"||A==="FJI"?f=function(B){var U;if(D(B)===null)U=B;else for(U=new Array(B.length),N=0;N<B.length;N++)U[N]=[B[N][0]<0?B[N][0]+360:B[N][0],B[N][1]];y.push(s.tester(U))}:A==="ATA"?f=function(B){var U=D(B);if(U===null)return y.push(s.tester(B));var V=new Array(B.length+1),q=0;for(N=0;N<B.length;N++)N>U?V[q++]=[B[N][0]+360,B[N][1]]:N===U?(V[q++]=B[N],V[q++]=[B[N][0],-90]):V[q++]=B[N];var z=s.tester(V);z.pts.pop(),y.push(z)}:f=function(B){y.push(s.tester(B))},k.type){case"MultiPolygon":for(p=0;p<b.length;p++)for(x=0;x<b[p].length;x++)f(b[p][x]);break;case"Polygon":for(p=0;p<b.length;p++)f(b[p]);break}return y}function m(M){var k=M.geojson,b=window.PlotlyGeoAssets||{},A=typeof k=="string"?b[k]:k;return l(A)?A:(a.error("Oops ... something went wrong when fetching "+k),!1)}function E(M){var k=M[0].trace,b=m(k);if(!b)return!1;var A={},y=[],f;for(f=0;f<k._length;f++){var p=M[f];(p.loc||p.loc===0)&&(A[p.loc]=p)}function x(B){var U=i(B,k.featureidkey||"id").get(),V=A[U];if(V){var q=B.geometry;if(q.type==="Polygon"||q.type==="MultiPolygon"){var z={type:"Feature",id:U,geometry:q,properties:{}};z.geometry.coordinates.length>0?z.properties.ct=c(z):z.properties.ct=[NaN,NaN],V.fIn=B,V.fOut=z,y.push(z)}else a.log(["Location",V.loc,"does not have a valid GeoJSON geometry.","Traces with locationmode *geojson-id* only support","*Polygon* and *MultiPolygon* geometries."].join(" "))}delete A[U]}switch(b.type){case"FeatureCollection":var N=b.features;for(f=0;f<N.length;f++)x(N[f]);break;case"Feature":x(b);break;default:return a.warn(["Invalid GeoJSON type",(b.type||"none")+".","Traces with locationmode *geojson-id* only support","*FeatureCollection* and *Feature* types."].join(" ")),!1}for(var D in A)a.log(["Location *"+D+"*","does not have a matching feature with id-key","*"+k.featureidkey+"*."].join(" "));return y}function c(M){var k=M.geometry,b;if(k.type==="MultiPolygon")for(var A=k.coordinates,y=0,f=0;f<A.length;f++){var p={type:"Polygon",coordinates:A[f]},x=C(p);x>y&&(y=x,b=p)}else b=k;return P(b).geometry.coordinates}function _(M){var k=window.PlotlyGeoAssets||{},b=[];function A(N){return new Promise(function(D,B){v.json(N,function(U,V){if(U){delete k[N];var q=U.status===404?'GeoJSON at URL "'+N+'" does not exist.':"Unexpected error while fetching from "+N;return B(new Error(q))}return k[N]=V,D(V)})})}function y(N){return new Promise(function(D,B){var U=0,V=setInterval(function(){if(k[N]&&k[N]!=="pending")return clearInterval(V),D(k[N]);if(U>100)return clearInterval(V),B("Unexpected error while fetching from "+N);U++},50)})}for(var f=0;f<M.length;f++){var p=M[f][0].trace,x=p.geojson;typeof x=="string"&&(k[x]?k[x]==="pending"&&b.push(y(x)):(k[x]="pending",b.push(A(x))))}return b}function T(M){return t(M)}Z.exports={locationToFeature:h,feature2polygons:g,getTraceGeojson:m,extractTraceFeature:E,fetchTraceGeoData:_,computeBbox:T}}}),dN=Ne({"src/traces/scattergeo/style.js"(te,Z){var v=xn(),w=zs(),C=Ha(),P=Xh(),t=P.stylePoints,r=P.styleText;Z.exports=function(i,s){s&&a(i,s)};function a(l,i){var s=i[0].trace,o=i[0].node3;o.style("opacity",i[0].trace.opacity),t(o,s,l),r(o,s,l),o.selectAll("path.js-line").style("fill","none").each(function(u){var d=v.select(this),h=u.trace,g=h.line||{};d.call(C.stroke,g.color).call(w.dashLine,g.dash||"",g.width||0),h.fill!=="none"&&d.call(C.fill,h.fillcolor)})}}}),vN=Ne({"src/traces/scattergeo/plot.js"(te,Z){var v=xn(),w=In(),C=wR().getTopojsonFeatures,P=Db(),t=Ob(),r=Cm().findExtremes,a=da().BADNUM,l=Vv().calcMarkerSize,i=yu(),s=dN();function o(d,h,g){var m=h.layers.frontplot.select(".scatterlayer"),E=w.makeTraceGroups(m,g,"trace scattergeo");function c(_,T){_.lonlat[0]===a&&v.select(T).remove()}E.selectAll("*").remove(),E.each(function(_){var T=v.select(this),M=_[0].trace;if(i.hasLines(M)||M.fill!=="none"){var k=P.calcTraceToLineCoords(_),b=M.fill!=="none"?P.makePolygon(k):P.makeLine(k);T.selectAll("path.js-line").data([{geojson:b,trace:M}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}i.hasMarkers(M)&&T.selectAll("path.point").data(w.identity).enter().append("path").classed("point",!0).each(function(A){c(A,this)}),i.hasText(M)&&T.selectAll("g").data(w.identity).enter().append("g").append("text").each(function(A){c(A,this)}),s(d,_)})}function u(d,h){var g=d[0].trace,m=h[g.geo],E=m._subplot,c=g._length,_,T;if(w.isArrayOrTypedArray(g.locations)){var M=g.locationmode,k=M==="geojson-id"?t.extractTraceFeature(d):C(g,E.topojson);for(_=0;_<c;_++){T=d[_];var b=M==="geojson-id"?T.fOut:t.locationToFeature(M,T.loc,k);T.lonlat=b?b.properties.ct:[a,a]}}var A={padded:!0},y,f;if(m.fitbounds==="geojson"&&g.locationmode==="geojson-id"){var p=t.computeBbox(t.getTraceGeojson(g));y=[p[0],p[2]],f=[p[1],p[3]]}else{for(y=new Array(c),f=new Array(c),_=0;_<c;_++)T=d[_],y[_]=T.lonlat[0],f[_]=T.lonlat[1];A.ppad=l(g,c)}g._extremes.lon=r(m.lonaxis._ax,y,A),g._extremes.lat=r(m.lataxis._ax,f,A)}Z.exports={calcGeoJSON:u,plot:o}}}),LJ=Ne({"src/traces/scattergeo/hover.js"(te,Z){var v=oh(),w=da().BADNUM,C=G1(),P=In().fillText,t=m3();Z.exports=function(l,i,s){var o=l.cd,u=o[0].trace,d=l.xa,h=l.ya,g=l.subplot,m=g.projection.isLonLatOverEdges,E=g.project;function c(y){var f=y.lonlat;if(f[0]===w||m(f))return 1/0;var p=E(f),x=E([i,s]),N=Math.abs(p[0]-x[0]),D=Math.abs(p[1]-x[1]),B=Math.max(3,y.mrc||0);return Math.max(Math.sqrt(N*N+D*D)-B,1-3/B)}if(v.getClosest(o,c,l),l.index!==!1){var _=o[l.index],T=_.lonlat,M=[d.c2p(T),h.c2p(T)],k=_.mrc||1;l.x0=M[0]-k,l.x1=M[0]+k,l.y0=M[1]-k,l.y1=M[1]+k,l.loc=_.loc,l.lon=T[0],l.lat=T[1];var b={};b[u.geo]={_subplot:g};var A=u._module.formatLabels(_,u,b);return l.lonLabel=A.lonLabel,l.latLabel=A.latLabel,l.color=C(u,_),l.extraText=r(u,_,l,o[0].t.labels),l.hovertemplate=u.hovertemplate,[l]}};function r(a,l,i,s){if(a.hovertemplate)return;var o=l.hi||a.hoverinfo,u=o==="all"?t.hoverinfo.flags:o.split("+"),d=u.indexOf("location")!==-1&&Array.isArray(a.locations),h=u.indexOf("lon")!==-1,g=u.indexOf("lat")!==-1,m=u.indexOf("text")!==-1,E=[];function c(_){return _+"°"}return d?E.push(l.loc):h&&g?E.push("("+c(i.latLabel)+", "+c(i.lonLabel)+")"):h?E.push(s.lon+c(i.lonLabel)):g&&E.push(s.lat+c(i.latLabel)),m&&P(l,a,E),E.join("<br>")}}}),RJ=Ne({"src/traces/scattergeo/event_data.js"(te,Z){Z.exports=function(w,C,P,t,r){w.lon=C.lon,w.lat=C.lat,w.location=C.loc?C.loc:null;var a=t[r];return a.fIn&&a.fIn.properties&&(w.properties=a.fIn.properties),w}}}),IJ=Ne({"src/traces/scattergeo/select.js"(te,Z){var v=yu(),w=da().BADNUM;Z.exports=function(P,t){var r=P.cd,a=P.xaxis,l=P.yaxis,i=[],s=r[0].trace,o,u,d,h,g,m=!v.hasMarkers(s)&&!v.hasText(s);if(m)return[];if(t===!1)for(g=0;g<r.length;g++)r[g].selected=0;else for(g=0;g<r.length;g++)o=r[g],u=o.lonlat,u[0]!==w&&(d=a.c2p(u),h=l.c2p(u),t.contains([d,h],null,g,P)?(i.push({pointNumber:g,lon:u[0],lat:u[1]}),o.selected=1):o.selected=0);return i}}}),ck=Ne({"node_modules/d3-array/dist/d3-array.js"(te,Z){(function(v,w){w(typeof te=="object"&&typeof Z<"u"?te:v.d3=v.d3||{})})(te,function(v){function w(se,ee){return se<ee?-1:se>ee?1:se>=ee?0:NaN}function C(se){return se.length===1&&(se=P(se)),{left:function(ee,pe,oe,Y){for(oe==null&&(oe=0),Y==null&&(Y=ee.length);oe<Y;){var ce=oe+Y>>>1;se(ee[ce],pe)<0?oe=ce+1:Y=ce}return oe},right:function(ee,pe,oe,Y){for(oe==null&&(oe=0),Y==null&&(Y=ee.length);oe<Y;){var ce=oe+Y>>>1;se(ee[ce],pe)>0?Y=ce:oe=ce+1}return oe}}}function P(se){return function(ee,pe){return w(se(ee),pe)}}var t=C(w),r=t.right,a=t.left;function l(se,ee){ee==null&&(ee=i);for(var pe=0,oe=se.length-1,Y=se[0],ce=new Array(oe<0?0:oe);pe<oe;)ce[pe]=ee(Y,Y=se[++pe]);return ce}function i(se,ee){return[se,ee]}function s(se,ee,pe){var oe=se.length,Y=ee.length,ce=new Array(oe*Y),ue,_e,Le,ze;for(pe==null&&(pe=i),ue=Le=0;ue<oe;++ue)for(ze=se[ue],_e=0;_e<Y;++_e,++Le)ce[Le]=pe(ze,ee[_e]);return ce}function o(se,ee){return ee<se?-1:ee>se?1:ee>=se?0:NaN}function u(se){return se===null?NaN:+se}function d(se,ee){var pe=se.length,oe=0,Y=-1,ce=0,ue,_e,Le=0;if(ee==null)for(;++Y<pe;)isNaN(ue=u(se[Y]))||(_e=ue-ce,ce+=_e/++oe,Le+=_e*(ue-ce));else for(;++Y<pe;)isNaN(ue=u(ee(se[Y],Y,se)))||(_e=ue-ce,ce+=_e/++oe,Le+=_e*(ue-ce));if(oe>1)return Le/(oe-1)}function h(se,ee){var pe=d(se,ee);return pe&&Math.sqrt(pe)}function g(se,ee){var pe=se.length,oe=-1,Y,ce,ue;if(ee==null){for(;++oe<pe;)if((Y=se[oe])!=null&&Y>=Y)for(ce=ue=Y;++oe<pe;)(Y=se[oe])!=null&&(ce>Y&&(ce=Y),ue<Y&&(ue=Y))}else for(;++oe<pe;)if((Y=ee(se[oe],oe,se))!=null&&Y>=Y)for(ce=ue=Y;++oe<pe;)(Y=ee(se[oe],oe,se))!=null&&(ce>Y&&(ce=Y),ue<Y&&(ue=Y));return[ce,ue]}var m=Array.prototype,E=m.slice,c=m.map;function _(se){return function(){return se}}function T(se){return se}function M(se,ee,pe){se=+se,ee=+ee,pe=(Y=arguments.length)<2?(ee=se,se=0,1):Y<3?1:+pe;for(var oe=-1,Y=Math.max(0,Math.ceil((ee-se)/pe))|0,ce=new Array(Y);++oe<Y;)ce[oe]=se+oe*pe;return ce}var k=Math.sqrt(50),b=Math.sqrt(10),A=Math.sqrt(2);function y(se,ee,pe){var oe,Y=-1,ce,ue,_e;if(ee=+ee,se=+se,pe=+pe,se===ee&&pe>0)return[se];if((oe=ee<se)&&(ce=se,se=ee,ee=ce),(_e=f(se,ee,pe))===0||!isFinite(_e))return[];if(_e>0)for(se=Math.ceil(se/_e),ee=Math.floor(ee/_e),ue=new Array(ce=Math.ceil(ee-se+1));++Y<ce;)ue[Y]=(se+Y)*_e;else for(se=Math.floor(se*_e),ee=Math.ceil(ee*_e),ue=new Array(ce=Math.ceil(se-ee+1));++Y<ce;)ue[Y]=(se-Y)/_e;return oe&&ue.reverse(),ue}function f(se,ee,pe){var oe=(ee-se)/Math.max(0,pe),Y=Math.floor(Math.log(oe)/Math.LN10),ce=oe/Math.pow(10,Y);return Y>=0?(ce>=k?10:ce>=b?5:ce>=A?2:1)*Math.pow(10,Y):-Math.pow(10,-Y)/(ce>=k?10:ce>=b?5:ce>=A?2:1)}function p(se,ee,pe){var oe=Math.abs(ee-se)/Math.max(0,pe),Y=Math.pow(10,Math.floor(Math.log(oe)/Math.LN10)),ce=oe/Y;return ce>=k?Y*=10:ce>=b?Y*=5:ce>=A&&(Y*=2),ee<se?-Y:Y}function x(se){return Math.ceil(Math.log(se.length)/Math.LN2)+1}function N(){var se=T,ee=g,pe=x;function oe(Y){var ce,ue=Y.length,_e,Le=new Array(ue);for(ce=0;ce<ue;++ce)Le[ce]=se(Y[ce],ce,Y);var ze=ee(Le),Xe=ze[0],Ve=ze[1],rt=pe(Le,Xe,Ve);Array.isArray(rt)||(rt=p(Xe,Ve,rt),rt=M(Math.ceil(Xe/rt)*rt,Ve,rt));for(var mt=rt.length;rt[0]<=Xe;)rt.shift(),--mt;for(;rt[mt-1]>Ve;)rt.pop(),--mt;var _t=new Array(mt+1),vt;for(ce=0;ce<=mt;++ce)vt=_t[ce]=[],vt.x0=ce>0?rt[ce-1]:Xe,vt.x1=ce<mt?rt[ce]:Ve;for(ce=0;ce<ue;++ce)_e=Le[ce],Xe<=_e&&_e<=Ve&&_t[r(rt,_e,0,mt)].push(Y[ce]);return _t}return oe.value=function(Y){return arguments.length?(se=typeof Y=="function"?Y:_(Y),oe):se},oe.domain=function(Y){return arguments.length?(ee=typeof Y=="function"?Y:_([Y[0],Y[1]]),oe):ee},oe.thresholds=function(Y){return arguments.length?(pe=typeof Y=="function"?Y:Array.isArray(Y)?_(E.call(Y)):_(Y),oe):pe},oe}function D(se,ee,pe){if(pe==null&&(pe=u),!!(oe=se.length)){if((ee=+ee)<=0||oe<2)return+pe(se[0],0,se);if(ee>=1)return+pe(se[oe-1],oe-1,se);var oe,Y=(oe-1)*ee,ce=Math.floor(Y),ue=+pe(se[ce],ce,se),_e=+pe(se[ce+1],ce+1,se);return ue+(_e-ue)*(Y-ce)}}function B(se,ee,pe){return se=c.call(se,u).sort(w),Math.ceil((pe-ee)/(2*(D(se,.75)-D(se,.25))*Math.pow(se.length,-1/3)))}function U(se,ee,pe){return Math.ceil((pe-ee)/(3.5*h(se)*Math.pow(se.length,-1/3)))}function V(se,ee){var pe=se.length,oe=-1,Y,ce;if(ee==null){for(;++oe<pe;)if((Y=se[oe])!=null&&Y>=Y)for(ce=Y;++oe<pe;)(Y=se[oe])!=null&&Y>ce&&(ce=Y)}else for(;++oe<pe;)if((Y=ee(se[oe],oe,se))!=null&&Y>=Y)for(ce=Y;++oe<pe;)(Y=ee(se[oe],oe,se))!=null&&Y>ce&&(ce=Y);return ce}function q(se,ee){var pe=se.length,oe=pe,Y=-1,ce,ue=0;if(ee==null)for(;++Y<pe;)isNaN(ce=u(se[Y]))?--oe:ue+=ce;else for(;++Y<pe;)isNaN(ce=u(ee(se[Y],Y,se)))?--oe:ue+=ce;if(oe)return ue/oe}function z(se,ee){var pe=se.length,oe=-1,Y,ce=[];if(ee==null)for(;++oe<pe;)isNaN(Y=u(se[oe]))||ce.push(Y);else for(;++oe<pe;)isNaN(Y=u(ee(se[oe],oe,se)))||ce.push(Y);return D(ce.sort(w),.5)}function H(se){for(var ee=se.length,pe,oe=-1,Y=0,ce,ue;++oe<ee;)Y+=se[oe].length;for(ce=new Array(Y);--ee>=0;)for(ue=se[ee],pe=ue.length;--pe>=0;)ce[--Y]=ue[pe];return ce}function G(se,ee){var pe=se.length,oe=-1,Y,ce;if(ee==null){for(;++oe<pe;)if((Y=se[oe])!=null&&Y>=Y)for(ce=Y;++oe<pe;)(Y=se[oe])!=null&&ce>Y&&(ce=Y)}else for(;++oe<pe;)if((Y=ee(se[oe],oe,se))!=null&&Y>=Y)for(ce=Y;++oe<pe;)(Y=ee(se[oe],oe,se))!=null&&ce>Y&&(ce=Y);return ce}function J(se,ee){for(var pe=ee.length,oe=new Array(pe);pe--;)oe[pe]=se[ee[pe]];return oe}function le(se,ee){if(pe=se.length){var pe,oe=0,Y=0,ce,ue=se[Y];for(ee==null&&(ee=w);++oe<pe;)(ee(ce=se[oe],ue)<0||ee(ue,ue)!==0)&&(ue=ce,Y=oe);if(ee(ue,ue)===0)return Y}}function ge(se,ee,pe){for(var oe=(pe??se.length)-(ee=ee==null?0:+ee),Y,ce;oe;)ce=Math.random()*oe--|0,Y=se[oe+ee],se[oe+ee]=se[ce+ee],se[ce+ee]=Y;return se}function de(se,ee){var pe=se.length,oe=-1,Y,ce=0;if(ee==null)for(;++oe<pe;)(Y=+se[oe])&&(ce+=Y);else for(;++oe<pe;)(Y=+ee(se[oe],oe,se))&&(ce+=Y);return ce}function me(se){if(!(ce=se.length))return[];for(var ee=-1,pe=G(se,W),oe=new Array(pe);++ee<pe;)for(var Y=-1,ce,ue=oe[ee]=new Array(ce);++Y<ce;)ue[Y]=se[Y][ee];return oe}function W(se){return se.length}function ie(){return me(arguments)}v.bisect=r,v.bisectRight=r,v.bisectLeft=a,v.ascending=w,v.bisector=C,v.cross=s,v.descending=o,v.deviation=h,v.extent=g,v.histogram=N,v.thresholdFreedmanDiaconis=B,v.thresholdScott=U,v.thresholdSturges=x,v.max=V,v.mean=q,v.median=z,v.merge=H,v.min=G,v.pairs=l,v.permute=J,v.quantile=D,v.range=M,v.scan=le,v.shuffle=ge,v.sum=de,v.ticks=y,v.tickIncrement=f,v.tickStep=p,v.transpose=me,v.variance=d,v.zip=ie,Object.defineProperty(v,"__esModule",{value:!0})})}}),pN=Ne({"node_modules/d3-geo/dist/d3-geo.js"(te,Z){(function(v,w){typeof te=="object"&&typeof Z<"u"?w(te,ck()):(v=v||self,w(v.d3=v.d3||{},v.d3))})(te,function(v,w){function C(){return new P}function P(){this.reset()}P.prototype={constructor:P,reset:function(){this.s=this.t=0},add:function(wr){r(t,wr,this.t),r(this,t.s,this.s),this.s?this.t+=t.t:this.s=t.t},valueOf:function(){return this.s}};var t=new P;function r(wr,Gr,kn){var _n=wr.s=Gr+kn,ta=_n-Gr,Ga=_n-ta;wr.t=Gr-Ga+(kn-ta)}var a=1e-6,l=1e-12,i=Math.PI,s=i/2,o=i/4,u=i*2,d=180/i,h=i/180,g=Math.abs,m=Math.atan,E=Math.atan2,c=Math.cos,_=Math.ceil,T=Math.exp,M=Math.log,k=Math.pow,b=Math.sin,A=Math.sign||function(wr){return wr>0?1:wr<0?-1:0},y=Math.sqrt,f=Math.tan;function p(wr){return wr>1?0:wr<-1?i:Math.acos(wr)}function x(wr){return wr>1?s:wr<-1?-s:Math.asin(wr)}function N(wr){return(wr=b(wr/2))*wr}function D(){}function B(wr,Gr){wr&&V.hasOwnProperty(wr.type)&&V[wr.type](wr,Gr)}var U={Feature:function(wr,Gr){B(wr.geometry,Gr)},FeatureCollection:function(wr,Gr){for(var kn=wr.features,_n=-1,ta=kn.length;++_n<ta;)B(kn[_n].geometry,Gr)}},V={Sphere:function(wr,Gr){Gr.sphere()},Point:function(wr,Gr){wr=wr.coordinates,Gr.point(wr[0],wr[1],wr[2])},MultiPoint:function(wr,Gr){for(var kn=wr.coordinates,_n=-1,ta=kn.length;++_n<ta;)wr=kn[_n],Gr.point(wr[0],wr[1],wr[2])},LineString:function(wr,Gr){q(wr.coordinates,Gr,0)},MultiLineString:function(wr,Gr){for(var kn=wr.coordinates,_n=-1,ta=kn.length;++_n<ta;)q(kn[_n],Gr,0)},Polygon:function(wr,Gr){z(wr.coordinates,Gr)},MultiPolygon:function(wr,Gr){for(var kn=wr.coordinates,_n=-1,ta=kn.length;++_n<ta;)z(kn[_n],Gr)},GeometryCollection:function(wr,Gr){for(var kn=wr.geometries,_n=-1,ta=kn.length;++_n<ta;)B(kn[_n],Gr)}};function q(wr,Gr,kn){var _n=-1,ta=wr.length-kn,Ga;for(Gr.lineStart();++_n<ta;)Ga=wr[_n],Gr.point(Ga[0],Ga[1],Ga[2]);Gr.lineEnd()}function z(wr,Gr){var kn=-1,_n=wr.length;for(Gr.polygonStart();++kn<_n;)q(wr[kn],Gr,1);Gr.polygonEnd()}function H(wr,Gr){wr&&U.hasOwnProperty(wr.type)?U[wr.type](wr,Gr):B(wr,Gr)}var G=C(),J=C(),le,ge,de,me,W,ie={point:D,lineStart:D,lineEnd:D,polygonStart:function(){G.reset(),ie.lineStart=se,ie.lineEnd=ee},polygonEnd:function(){var wr=+G;J.add(wr<0?u+wr:wr),this.lineStart=this.lineEnd=this.point=D},sphere:function(){J.add(u)}};function se(){ie.point=pe}function ee(){oe(le,ge)}function pe(wr,Gr){ie.point=oe,le=wr,ge=Gr,wr*=h,Gr*=h,de=wr,me=c(Gr=Gr/2+o),W=b(Gr)}function oe(wr,Gr){wr*=h,Gr*=h,Gr=Gr/2+o;var kn=wr-de,_n=kn>=0?1:-1,ta=_n*kn,Ga=c(Gr),ja=b(Gr),Ai=W*ja,Ii=me*Ga+Ai*c(ta),oo=Ai*_n*b(ta);G.add(E(oo,Ii)),de=wr,me=Ga,W=ja}function Y(wr){return J.reset(),H(wr,ie),J*2}function ce(wr){return[E(wr[1],wr[0]),x(wr[2])]}function ue(wr){var Gr=wr[0],kn=wr[1],_n=c(kn);return[_n*c(Gr),_n*b(Gr),b(kn)]}function _e(wr,Gr){return wr[0]*Gr[0]+wr[1]*Gr[1]+wr[2]*Gr[2]}function Le(wr,Gr){return[wr[1]*Gr[2]-wr[2]*Gr[1],wr[2]*Gr[0]-wr[0]*Gr[2],wr[0]*Gr[1]-wr[1]*Gr[0]]}function ze(wr,Gr){wr[0]+=Gr[0],wr[1]+=Gr[1],wr[2]+=Gr[2]}function Xe(wr,Gr){return[wr[0]*Gr,wr[1]*Gr,wr[2]*Gr]}function Ve(wr){var Gr=y(wr[0]*wr[0]+wr[1]*wr[1]+wr[2]*wr[2]);wr[0]/=Gr,wr[1]/=Gr,wr[2]/=Gr}var rt,mt,_t,vt,ut,Fe,Pe,be,Ye=C(),yt,wt,ht={point:Yt,lineStart:fr,lineEnd:mr,polygonStart:function(){ht.point=Ur,ht.lineStart=jr,ht.lineEnd=fn,Ye.reset(),ie.polygonStart()},polygonEnd:function(){ie.polygonEnd(),ht.point=Yt,ht.lineStart=fr,ht.lineEnd=mr,G<0?(rt=-(_t=180),mt=-(vt=90)):Ye>a?vt=90:Ye<-a&&(mt=-90),wt[0]=rt,wt[1]=_t},sphere:function(){rt=-(_t=180),mt=-(vt=90)}};function Yt(wr,Gr){yt.push(wt=[rt=wr,_t=wr]),Gr<mt&&(mt=Gr),Gr>vt&&(vt=Gr)}function $t(wr,Gr){var kn=ue([wr*h,Gr*h]);if(be){var _n=Le(be,kn),ta=[_n[1],-_n[0],0],Ga=Le(ta,_n);Ve(Ga),Ga=ce(Ga);var ja=wr-ut,Ai=ja>0?1:-1,Ii=Ga[0]*d*Ai,oo,hi=g(ja)>180;hi^(Ai*ut<Ii&&Ii<Ai*wr)?(oo=Ga[1]*d,oo>vt&&(vt=oo)):(Ii=(Ii+360)%360-180,hi^(Ai*ut<Ii&&Ii<Ai*wr)?(oo=-Ga[1]*d,oo<mt&&(mt=oo)):(Gr<mt&&(mt=Gr),Gr>vt&&(vt=Gr))),hi?wr<ut?Br(rt,wr)>Br(rt,_t)&&(_t=wr):Br(wr,_t)>Br(rt,_t)&&(rt=wr):_t>=rt?(wr<rt&&(rt=wr),wr>_t&&(_t=wr)):wr>ut?Br(rt,wr)>Br(rt,_t)&&(_t=wr):Br(wr,_t)>Br(rt,_t)&&(rt=wr)}else yt.push(wt=[rt=wr,_t=wr]);Gr<mt&&(mt=Gr),Gr>vt&&(vt=Gr),be=kn,ut=wr}function fr(){ht.point=$t}function mr(){wt[0]=rt,wt[1]=_t,ht.point=Yt,be=null}function Ur(wr,Gr){if(be){var kn=wr-ut;Ye.add(g(kn)>180?kn+(kn>0?360:-360):kn)}else Fe=wr,Pe=Gr;ie.point(wr,Gr),$t(wr,Gr)}function jr(){ie.lineStart()}function fn(){Ur(Fe,Pe),ie.lineEnd(),g(Ye)>a&&(rt=-(_t=180)),wt[0]=rt,wt[1]=_t,be=null}function Br(wr,Gr){return(Gr-=wr)<0?Gr+360:Gr}function Qr(wr,Gr){return wr[0]-Gr[0]}function Ot(wr,Gr){return wr[0]<=wr[1]?wr[0]<=Gr&&Gr<=wr[1]:Gr<wr[0]||wr[1]<Gr}function $e(wr){var Gr,kn,_n,ta,Ga,ja,Ai;if(vt=_t=-(rt=mt=1/0),yt=[],H(wr,ht),kn=yt.length){for(yt.sort(Qr),Gr=1,_n=yt[0],Ga=[_n];Gr<kn;++Gr)ta=yt[Gr],Ot(_n,ta[0])||Ot(_n,ta[1])?(Br(_n[0],ta[1])>Br(_n[0],_n[1])&&(_n[1]=ta[1]),Br(ta[0],_n[1])>Br(_n[0],_n[1])&&(_n[0]=ta[0])):Ga.push(_n=ta);for(ja=-1/0,kn=Ga.length-1,Gr=0,_n=Ga[kn];Gr<=kn;_n=ta,++Gr)ta=Ga[Gr],(Ai=Br(_n[1],ta[0]))>ja&&(ja=Ai,rt=ta[0],_t=_n[1])}return yt=wt=null,rt===1/0||mt===1/0?[[NaN,NaN],[NaN,NaN]]:[[rt,mt],[_t,vt]]}var ot,De,Ee,Ae,Ie,tt,st,Bt,Ft,Wt,lr,Rr,Mr,Sr,Kr,Hn,ga={sphere:D,point:ua,lineStart:Aa,lineEnd:ci,polygonStart:function(){ga.lineStart=_r,ga.lineEnd=Qt},polygonEnd:function(){ga.lineStart=Aa,ga.lineEnd=ci}};function ua(wr,Gr){wr*=h,Gr*=h;var kn=c(Gr);Ta(kn*c(wr),kn*b(wr),b(Gr))}function Ta(wr,Gr,kn){++ot,Ee+=(wr-Ee)/ot,Ae+=(Gr-Ae)/ot,Ie+=(kn-Ie)/ot}function Aa(){ga.point=ia}function ia(wr,Gr){wr*=h,Gr*=h;var kn=c(Gr);Sr=kn*c(wr),Kr=kn*b(wr),Hn=b(Gr),ga.point=$a,Ta(Sr,Kr,Hn)}function $a(wr,Gr){wr*=h,Gr*=h;var kn=c(Gr),_n=kn*c(wr),ta=kn*b(wr),Ga=b(Gr),ja=E(y((ja=Kr*Ga-Hn*ta)*ja+(ja=Hn*_n-Sr*Ga)*ja+(ja=Sr*ta-Kr*_n)*ja),Sr*_n+Kr*ta+Hn*Ga);De+=ja,tt+=ja*(Sr+(Sr=_n)),st+=ja*(Kr+(Kr=ta)),Bt+=ja*(Hn+(Hn=Ga)),Ta(Sr,Kr,Hn)}function ci(){ga.point=ua}function _r(){ga.point=yr}function Qt(){br(Rr,Mr),ga.point=ua}function yr(wr,Gr){Rr=wr,Mr=Gr,wr*=h,Gr*=h,ga.point=br;var kn=c(Gr);Sr=kn*c(wr),Kr=kn*b(wr),Hn=b(Gr),Ta(Sr,Kr,Hn)}function br(wr,Gr){wr*=h,Gr*=h;var kn=c(Gr),_n=kn*c(wr),ta=kn*b(wr),Ga=b(Gr),ja=Kr*Ga-Hn*ta,Ai=Hn*_n-Sr*Ga,Ii=Sr*ta-Kr*_n,oo=y(ja*ja+Ai*Ai+Ii*Ii),hi=x(oo),Gi=oo&&-hi/oo;Ft+=Gi*ja,Wt+=Gi*Ai,lr+=Gi*Ii,De+=hi,tt+=hi*(Sr+(Sr=_n)),st+=hi*(Kr+(Kr=ta)),Bt+=hi*(Hn+(Hn=Ga)),Ta(Sr,Kr,Hn)}function an(wr){ot=De=Ee=Ae=Ie=tt=st=Bt=Ft=Wt=lr=0,H(wr,ga);var Gr=Ft,kn=Wt,_n=lr,ta=Gr*Gr+kn*kn+_n*_n;return ta<l&&(Gr=tt,kn=st,_n=Bt,De<a&&(Gr=Ee,kn=Ae,_n=Ie),ta=Gr*Gr+kn*kn+_n*_n,ta<l)?[NaN,NaN]:[E(kn,Gr)*d,x(_n/y(ta))*d]}function wn(wr){return function(){return wr}}function Ln(wr,Gr){function kn(_n,ta){return _n=wr(_n,ta),Gr(_n[0],_n[1])}return wr.invert&&Gr.invert&&(kn.invert=function(_n,ta){return _n=Gr.invert(_n,ta),_n&&wr.invert(_n[0],_n[1])}),kn}function Bn(wr,Gr){return[g(wr)>i?wr+Math.round(-wr/u)*u:wr,Gr]}Bn.invert=Bn;function xa(wr,Gr,kn){return(wr%=u)?Gr||kn?Ln(Ia(wr),Ba(Gr,kn)):Ia(wr):Gr||kn?Ba(Gr,kn):Bn}function za(wr){return function(Gr,kn){return Gr+=wr,[Gr>i?Gr-u:Gr<-i?Gr+u:Gr,kn]}}function Ia(wr){var Gr=za(wr);return Gr.invert=za(-wr),Gr}function Ba(wr,Gr){var kn=c(wr),_n=b(wr),ta=c(Gr),Ga=b(Gr);function ja(Ai,Ii){var oo=c(Ii),hi=c(Ai)*oo,Gi=b(Ai)*oo,wi=b(Ii),si=wi*kn+hi*_n;return[E(Gi*ta-si*Ga,hi*kn-wi*_n),x(si*ta+Gi*Ga)]}return ja.invert=function(Ai,Ii){var oo=c(Ii),hi=c(Ai)*oo,Gi=b(Ai)*oo,wi=b(Ii),si=wi*ta-Gi*Ga;return[E(Gi*ta+wi*Ga,hi*kn+si*_n),x(si*kn-hi*_n)]},ja}function Ka(wr){wr=xa(wr[0]*h,wr[1]*h,wr.length>2?wr[2]*h:0);function Gr(kn){return kn=wr(kn[0]*h,kn[1]*h),kn[0]*=d,kn[1]*=d,kn}return Gr.invert=function(kn){return kn=wr.invert(kn[0]*h,kn[1]*h),kn[0]*=d,kn[1]*=d,kn},Gr}function fa(wr,Gr,kn,_n,ta,Ga){if(kn){var ja=c(Gr),Ai=b(Gr),Ii=_n*kn;ta==null?(ta=Gr+_n*u,Ga=Gr-Ii/2):(ta=Bi(ja,ta),Ga=Bi(ja,Ga),(_n>0?ta<Ga:ta>Ga)&&(ta+=_n*u));for(var oo,hi=ta;_n>0?hi>Ga:hi<Ga;hi-=Ii)oo=ce([ja,-Ai*c(hi),-Ai*b(hi)]),wr.point(oo[0],oo[1])}}function Bi(wr,Gr){Gr=ue(Gr),Gr[0]-=wr,Ve(Gr);var kn=p(-Gr[1]);return((-Gr[2]<0?-kn:kn)+u-a)%u}function Yi(){var wr=wn([0,0]),Gr=wn(90),kn=wn(6),_n,ta,Ga={point:ja};function ja(Ii,oo){_n.push(Ii=ta(Ii,oo)),Ii[0]*=d,Ii[1]*=d}function Ai(){var Ii=wr.apply(this,arguments),oo=Gr.apply(this,arguments)*h,hi=kn.apply(this,arguments)*h;return _n=[],ta=xa(-Ii[0]*h,-Ii[1]*h,0).invert,fa(Ga,oo,hi,1),Ii={type:"Polygon",coordinates:[_n]},_n=ta=null,Ii}return Ai.center=function(Ii){return arguments.length?(wr=typeof Ii=="function"?Ii:wn([+Ii[0],+Ii[1]]),Ai):wr},Ai.radius=function(Ii){return arguments.length?(Gr=typeof Ii=="function"?Ii:wn(+Ii),Ai):Gr},Ai.precision=function(Ii){return arguments.length?(kn=typeof Ii=="function"?Ii:wn(+Ii),Ai):kn},Ai}function Ht(){var wr=[],Gr;return{point:function(kn,_n,ta){Gr.push([kn,_n,ta])},lineStart:function(){wr.push(Gr=[])},lineEnd:D,rejoin:function(){wr.length>1&&wr.push(wr.pop().concat(wr.shift()))},result:function(){var kn=wr;return wr=[],Gr=null,kn}}}function kt(wr,Gr){return g(wr[0]-Gr[0])<a&&g(wr[1]-Gr[1])<a}function qr(wr,Gr,kn,_n){this.x=wr,this.z=Gr,this.o=kn,this.e=_n,this.v=!1,this.n=this.p=null}function en(wr,Gr,kn,_n,ta){var Ga=[],ja=[],Ai,Ii;if(wr.forEach(function(vo){if(!((es=vo.length-1)<=0)){var es,$o=vo[0],is=vo[es],rs;if(kt($o,is)){if(!$o[2]&&!is[2]){for(ta.lineStart(),Ai=0;Ai<es;++Ai)ta.point(($o=vo[Ai])[0],$o[1]);ta.lineEnd();return}is[0]+=2*a}Ga.push(rs=new qr($o,vo,null,!0)),ja.push(rs.o=new qr($o,null,rs,!1)),Ga.push(rs=new qr(is,vo,null,!1)),ja.push(rs.o=new qr(is,null,rs,!0))}}),!!Ga.length){for(ja.sort(Gr),rn(Ga),rn(ja),Ai=0,Ii=ja.length;Ai<Ii;++Ai)ja[Ai].e=kn=!kn;for(var oo=Ga[0],hi,Gi;;){for(var wi=oo,si=!0;wi.v;)if((wi=wi.n)===oo)return;hi=wi.z,ta.lineStart();do{if(wi.v=wi.o.v=!0,wi.e){if(si)for(Ai=0,Ii=hi.length;Ai<Ii;++Ai)ta.point((Gi=hi[Ai])[0],Gi[1]);else _n(wi.x,wi.n.x,1,ta);wi=wi.n}else{if(si)for(hi=wi.p.z,Ai=hi.length-1;Ai>=0;--Ai)ta.point((Gi=hi[Ai])[0],Gi[1]);else _n(wi.x,wi.p.x,-1,ta);wi=wi.p}wi=wi.o,hi=wi.z,si=!si}while(!wi.v);ta.lineEnd()}}}function rn(wr){if(Gr=wr.length){for(var Gr,kn=0,_n=wr[0],ta;++kn<Gr;)_n.n=ta=wr[kn],ta.p=_n,_n=ta;_n.n=ta=wr[0],ta.p=_n}}var Wr=C();function tn(wr){return g(wr[0])<=i?wr[0]:A(wr[0])*((g(wr[0])+i)%u-i)}function Tn(wr,Gr){var kn=tn(Gr),_n=Gr[1],ta=b(_n),Ga=[b(kn),-c(kn),0],ja=0,Ai=0;Wr.reset(),ta===1?_n=s+a:ta===-1&&(_n=-s-a);for(var Ii=0,oo=wr.length;Ii<oo;++Ii)if(Gi=(hi=wr[Ii]).length)for(var hi,Gi,wi=hi[Gi-1],si=tn(wi),vo=wi[1]/2+o,es=b(vo),$o=c(vo),is=0;is<Gi;++is,si=mo,es=gs,$o=$s,wi=rs){var rs=hi[is],mo=tn(rs),Ji=rs[1]/2+o,gs=b(Ji),$s=c(Ji),Nl=mo-si,au=Nl>=0?1:-1,Bl=au*Nl,iu=Bl>i,hl=es*gs;if(Wr.add(E(hl*au*b(Bl),$o*$s+hl*c(Bl))),ja+=iu?Nl+au*u:Nl,iu^si>=kn^mo>=kn){var Bu=Le(ue(wi),ue(rs));Ve(Bu);var Ou=Le(Ga,Bu);Ve(Ou);var eu=(iu^Nl>=0?-1:1)*x(Ou[2]);(_n>eu||_n===eu&&(Bu[0]||Bu[1]))&&(Ai+=iu^Nl>=0?1:-1)}}return(ja<-a||ja<a&&Wr<-a)^Ai&1}function dn(wr,Gr,kn,_n){return function(ta){var Ga=Gr(ta),ja=Ht(),Ai=Gr(ja),Ii=!1,oo,hi,Gi,wi={point:si,lineStart:es,lineEnd:$o,polygonStart:function(){wi.point=is,wi.lineStart=rs,wi.lineEnd=mo,hi=[],oo=[]},polygonEnd:function(){wi.point=si,wi.lineStart=es,wi.lineEnd=$o,hi=w.merge(hi);var Ji=Tn(oo,_n);hi.length?(Ii||(ta.polygonStart(),Ii=!0),en(hi,xr,Ji,kn,ta)):Ji&&(Ii||(ta.polygonStart(),Ii=!0),ta.lineStart(),kn(null,null,1,ta),ta.lineEnd()),Ii&&(ta.polygonEnd(),Ii=!1),hi=oo=null},sphere:function(){ta.polygonStart(),ta.lineStart(),kn(null,null,1,ta),ta.lineEnd(),ta.polygonEnd()}};function si(Ji,gs){wr(Ji,gs)&&ta.point(Ji,gs)}function vo(Ji,gs){Ga.point(Ji,gs)}function es(){wi.point=vo,Ga.lineStart()}function $o(){wi.point=si,Ga.lineEnd()}function is(Ji,gs){Gi.push([Ji,gs]),Ai.point(Ji,gs)}function rs(){Ai.lineStart(),Gi=[]}function mo(){is(Gi[0][0],Gi[0][1]),Ai.lineEnd();var Ji=Ai.clean(),gs=ja.result(),$s,Nl=gs.length,au,Bl,iu;if(Gi.pop(),oo.push(Gi),Gi=null,!!Nl){if(Ji&1){if(Bl=gs[0],(au=Bl.length-1)>0){for(Ii||(ta.polygonStart(),Ii=!0),ta.lineStart(),$s=0;$s<au;++$s)ta.point((iu=Bl[$s])[0],iu[1]);ta.lineEnd()}return}Nl>1&&Ji&2&&gs.push(gs.pop().concat(gs.shift())),hi.push(gs.filter(It))}}return wi}}function It(wr){return wr.length>1}function xr(wr,Gr){return((wr=wr.x)[0]<0?wr[1]-s-a:s-wr[1])-((Gr=Gr.x)[0]<0?Gr[1]-s-a:s-Gr[1])}var Yr=dn(function(){return!0},An,sa,[-i,-s]);function An(wr){var Gr=NaN,kn=NaN,_n=NaN,ta;return{lineStart:function(){wr.lineStart(),ta=1},point:function(Ga,ja){var Ai=Ga>0?i:-i,Ii=g(Ga-Gr);g(Ii-i)<a?(wr.point(Gr,kn=(kn+ja)/2>0?s:-s),wr.point(_n,kn),wr.lineEnd(),wr.lineStart(),wr.point(Ai,kn),wr.point(Ga,kn),ta=0):_n!==Ai&&Ii>=i&&(g(Gr-_n)<a&&(Gr-=_n*a),g(Ga-Ai)<a&&(Ga-=Ai*a),kn=Zn(Gr,kn,Ga,ja),wr.point(_n,kn),wr.lineEnd(),wr.lineStart(),wr.point(Ai,kn),ta=0),wr.point(Gr=Ga,kn=ja),_n=Ai},lineEnd:function(){wr.lineEnd(),Gr=kn=NaN},clean:function(){return 2-ta}}}function Zn(wr,Gr,kn,_n){var ta,Ga,ja=b(wr-kn);return g(ja)>a?m((b(Gr)*(Ga=c(_n))*b(kn)-b(_n)*(ta=c(Gr))*b(wr))/(ta*Ga*ja)):(Gr+_n)/2}function sa(wr,Gr,kn,_n){var ta;if(wr==null)ta=kn*s,_n.point(-i,ta),_n.point(0,ta),_n.point(i,ta),_n.point(i,0),_n.point(i,-ta),_n.point(0,-ta),_n.point(-i,-ta),_n.point(-i,0),_n.point(-i,ta);else if(g(wr[0]-Gr[0])>a){var Ga=wr[0]<Gr[0]?i:-i;ta=kn*Ga/2,_n.point(-Ga,ta),_n.point(0,ta),_n.point(Ga,ta)}else _n.point(Gr[0],Gr[1])}function oa(wr){var Gr=c(wr),kn=6*h,_n=Gr>0,ta=g(Gr)>a;function Ga(hi,Gi,wi,si){fa(si,wr,kn,wi,hi,Gi)}function ja(hi,Gi){return c(hi)*c(Gi)>Gr}function Ai(hi){var Gi,wi,si,vo,es;return{lineStart:function(){vo=si=!1,es=1},point:function($o,is){var rs=[$o,is],mo,Ji=ja($o,is),gs=_n?Ji?0:oo($o,is):Ji?oo($o+($o<0?i:-i),is):0;if(!Gi&&(vo=si=Ji)&&hi.lineStart(),Ji!==si&&(mo=Ii(Gi,rs),(!mo||kt(Gi,mo)||kt(rs,mo))&&(rs[2]=1)),Ji!==si)es=0,Ji?(hi.lineStart(),mo=Ii(rs,Gi),hi.point(mo[0],mo[1])):(mo=Ii(Gi,rs),hi.point(mo[0],mo[1],2),hi.lineEnd()),Gi=mo;else if(ta&&Gi&&_n^Ji){var $s;!(gs&wi)&&($s=Ii(rs,Gi,!0))&&(es=0,_n?(hi.lineStart(),hi.point($s[0][0],$s[0][1]),hi.point($s[1][0],$s[1][1]),hi.lineEnd()):(hi.point($s[1][0],$s[1][1]),hi.lineEnd(),hi.lineStart(),hi.point($s[0][0],$s[0][1],3)))}Ji&&(!Gi||!kt(Gi,rs))&&hi.point(rs[0],rs[1]),Gi=rs,si=Ji,wi=gs},lineEnd:function(){si&&hi.lineEnd(),Gi=null},clean:function(){return es|(vo&&si)<<1}}}function Ii(hi,Gi,wi){var si=ue(hi),vo=ue(Gi),es=[1,0,0],$o=Le(si,vo),is=_e($o,$o),rs=$o[0],mo=is-rs*rs;if(!mo)return!wi&&hi;var Ji=Gr*is/mo,gs=-Gr*rs/mo,$s=Le(es,$o),Nl=Xe(es,Ji),au=Xe($o,gs);ze(Nl,au);var Bl=$s,iu=_e(Nl,Bl),hl=_e(Bl,Bl),Bu=iu*iu-hl*(_e(Nl,Nl)-1);if(!(Bu<0)){var Ou=y(Bu),eu=Xe(Bl,(-iu-Ou)/hl);if(ze(eu,Nl),eu=ce(eu),!wi)return eu;var No=hi[0],Ls=Gi[0],Wl=hi[1],Cl=Gi[1],Ec;Ls<No&&(Ec=No,No=Ls,Ls=Ec);var Mc=Ls-No,Ic=g(Mc-i)<a,uh=Ic||Mc<a;if(!Ic&&Cl<Wl&&(Ec=Wl,Wl=Cl,Cl=Ec),uh?Ic?Wl+Cl>0^eu[1]<(g(eu[0]-No)<a?Wl:Cl):Wl<=eu[1]&&eu[1]<=Cl:Mc>i^(No<=eu[0]&&eu[0]<=Ls)){var Cc=Xe(Bl,(-iu+Ou)/hl);return ze(Cc,Nl),[eu,ce(Cc)]}}}function oo(hi,Gi){var wi=_n?wr:i-wr,si=0;return hi<-wi?si|=1:hi>wi&&(si|=2),Gi<-wi?si|=4:Gi>wi&&(si|=8),si}return dn(ja,Ai,Ga,_n?[0,-wr]:[-i,wr-i])}function Sn(wr,Gr,kn,_n,ta,Ga){var ja=wr[0],Ai=wr[1],Ii=Gr[0],oo=Gr[1],hi=0,Gi=1,wi=Ii-ja,si=oo-Ai,vo;if(vo=kn-ja,!(!wi&&vo>0)){if(vo/=wi,wi<0){if(vo<hi)return;vo<Gi&&(Gi=vo)}else if(wi>0){if(vo>Gi)return;vo>hi&&(hi=vo)}if(vo=ta-ja,!(!wi&&vo<0)){if(vo/=wi,wi<0){if(vo>Gi)return;vo>hi&&(hi=vo)}else if(wi>0){if(vo<hi)return;vo<Gi&&(Gi=vo)}if(vo=_n-Ai,!(!si&&vo>0)){if(vo/=si,si<0){if(vo<hi)return;vo<Gi&&(Gi=vo)}else if(si>0){if(vo>Gi)return;vo>hi&&(hi=vo)}if(vo=Ga-Ai,!(!si&&vo<0)){if(vo/=si,si<0){if(vo>Gi)return;vo>hi&&(hi=vo)}else if(si>0){if(vo<hi)return;vo<Gi&&(Gi=vo)}return hi>0&&(wr[0]=ja+hi*wi,wr[1]=Ai+hi*si),Gi<1&&(Gr[0]=ja+Gi*wi,Gr[1]=Ai+Gi*si),!0}}}}}var Kn=1e9,Ui=-Kn;function Za(wr,Gr,kn,_n){function ta(oo,hi){return wr<=oo&&oo<=kn&&Gr<=hi&&hi<=_n}function Ga(oo,hi,Gi,wi){var si=0,vo=0;if(oo==null||(si=ja(oo,Gi))!==(vo=ja(hi,Gi))||Ii(oo,hi)<0^Gi>0)do wi.point(si===0||si===3?wr:kn,si>1?_n:Gr);while((si=(si+Gi+4)%4)!==vo);else wi.point(hi[0],hi[1])}function ja(oo,hi){return g(oo[0]-wr)<a?hi>0?0:3:g(oo[0]-kn)<a?hi>0?2:1:g(oo[1]-Gr)<a?hi>0?1:0:hi>0?3:2}function Ai(oo,hi){return Ii(oo.x,hi.x)}function Ii(oo,hi){var Gi=ja(oo,1),wi=ja(hi,1);return Gi!==wi?Gi-wi:Gi===0?hi[1]-oo[1]:Gi===1?oo[0]-hi[0]:Gi===2?oo[1]-hi[1]:hi[0]-oo[0]}return function(oo){var hi=oo,Gi=Ht(),wi,si,vo,es,$o,is,rs,mo,Ji,gs,$s,Nl={point:au,lineStart:Bu,lineEnd:Ou,polygonStart:iu,polygonEnd:hl};function au(No,Ls){ta(No,Ls)&&hi.point(No,Ls)}function Bl(){for(var No=0,Ls=0,Wl=si.length;Ls<Wl;++Ls)for(var Cl=si[Ls],Ec=1,Mc=Cl.length,Ic=Cl[0],uh,Cc,jf=Ic[0],ju=Ic[1];Ec<Mc;++Ec)uh=jf,Cc=ju,Ic=Cl[Ec],jf=Ic[0],ju=Ic[1],Cc<=_n?ju>_n&&(jf-uh)*(_n-Cc)>(ju-Cc)*(wr-uh)&&++No:ju<=_n&&(jf-uh)*(_n-Cc)<(ju-Cc)*(wr-uh)&&--No;return No}function iu(){hi=Gi,wi=[],si=[],$s=!0}function hl(){var No=Bl(),Ls=$s&&No,Wl=(wi=w.merge(wi)).length;(Ls||Wl)&&(oo.polygonStart(),Ls&&(oo.lineStart(),Ga(null,null,1,oo),oo.lineEnd()),Wl&&en(wi,Ai,No,Ga,oo),oo.polygonEnd()),hi=oo,wi=si=vo=null}function Bu(){Nl.point=eu,si&&si.push(vo=[]),gs=!0,Ji=!1,rs=mo=NaN}function Ou(){wi&&(eu(es,$o),is&&Ji&&Gi.rejoin(),wi.push(Gi.result())),Nl.point=au,Ji&&hi.lineEnd()}function eu(No,Ls){var Wl=ta(No,Ls);if(si&&vo.push([No,Ls]),gs)es=No,$o=Ls,is=Wl,gs=!1,Wl&&(hi.lineStart(),hi.point(No,Ls));else if(Wl&&Ji)hi.point(No,Ls);else{var Cl=[rs=Math.max(Ui,Math.min(Kn,rs)),mo=Math.max(Ui,Math.min(Kn,mo))],Ec=[No=Math.max(Ui,Math.min(Kn,No)),Ls=Math.max(Ui,Math.min(Kn,Ls))];Sn(Cl,Ec,wr,Gr,kn,_n)?(Ji||(hi.lineStart(),hi.point(Cl[0],Cl[1])),hi.point(Ec[0],Ec[1]),Wl||hi.lineEnd(),$s=!1):Wl&&(hi.lineStart(),hi.point(No,Ls),$s=!1)}rs=No,mo=Ls,Ji=Wl}return Nl}}function Ki(){var wr=0,Gr=0,kn=960,_n=500,ta,Ga,ja;return ja={stream:function(Ai){return ta&&Ga===Ai?ta:ta=Za(wr,Gr,kn,_n)(Ga=Ai)},extent:function(Ai){return arguments.length?(wr=+Ai[0][0],Gr=+Ai[0][1],kn=+Ai[1][0],_n=+Ai[1][1],ta=Ga=null,ja):[[wr,Gr],[kn,_n]]}}}var ho=C(),Co,So,Vo,Oi={sphere:D,point:D,lineStart:ps,lineEnd:D,polygonStart:D,polygonEnd:D};function ps(){Oi.point=rl,Oi.lineEnd=as}function as(){Oi.point=Oi.lineEnd=D}function rl(wr,Gr){wr*=h,Gr*=h,Co=wr,So=b(Gr),Vo=c(Gr),Oi.point=As}function As(wr,Gr){wr*=h,Gr*=h;var kn=b(Gr),_n=c(Gr),ta=g(wr-Co),Ga=c(ta),ja=b(ta),Ai=_n*ja,Ii=Vo*kn-So*_n*Ga,oo=So*kn+Vo*_n*Ga;ho.add(E(y(Ai*Ai+Ii*Ii),oo)),Co=wr,So=kn,Vo=_n}function hs(wr){return ho.reset(),H(wr,Oi),+ho}var ts=[null,null],nl={type:"LineString",coordinates:ts};function Qs(wr,Gr){return ts[0]=wr,ts[1]=Gr,hs(nl)}var _l={Feature:function(wr,Gr){return ls(wr.geometry,Gr)},FeatureCollection:function(wr,Gr){for(var kn=wr.features,_n=-1,ta=kn.length;++_n<ta;)if(ls(kn[_n].geometry,Gr))return!0;return!1}},Ss={Sphere:function(){return!0},Point:function(wr,Gr){return Oo(wr.coordinates,Gr)},MultiPoint:function(wr,Gr){for(var kn=wr.coordinates,_n=-1,ta=kn.length;++_n<ta;)if(Oo(kn[_n],Gr))return!0;return!1},LineString:function(wr,Gr){return Es(wr.coordinates,Gr)},MultiLineString:function(wr,Gr){for(var kn=wr.coordinates,_n=-1,ta=kn.length;++_n<ta;)if(Es(kn[_n],Gr))return!0;return!1},Polygon:function(wr,Gr){return xl(wr.coordinates,Gr)},MultiPolygon:function(wr,Gr){for(var kn=wr.coordinates,_n=-1,ta=kn.length;++_n<ta;)if(xl(kn[_n],Gr))return!0;return!1},GeometryCollection:function(wr,Gr){for(var kn=wr.geometries,_n=-1,ta=kn.length;++_n<ta;)if(ls(kn[_n],Gr))return!0;return!1}};function ls(wr,Gr){return wr&&Ss.hasOwnProperty(wr.type)?Ss[wr.type](wr,Gr):!1}function Oo(wr,Gr){return Qs(wr,Gr)===0}function Es(wr,Gr){for(var kn,_n,ta,Ga=0,ja=wr.length;Ga<ja;Ga++){if(_n=Qs(wr[Ga],Gr),_n===0||Ga>0&&(ta=Qs(wr[Ga],wr[Ga-1]),ta>0&&kn<=ta&&_n<=ta&&(kn+_n-ta)*(1-Math.pow((kn-_n)/ta,2))<l*ta))return!0;kn=_n}return!1}function xl(wr,Gr){return!!Tn(wr.map(Ul),Hl(Gr))}function Ul(wr){return wr=wr.map(Hl),wr.pop(),wr}function Hl(wr){return[wr[0]*h,wr[1]*h]}function Fs(wr,Gr){return(wr&&_l.hasOwnProperty(wr.type)?_l[wr.type]:ls)(wr,Gr)}function Ni(wr,Gr,kn){var _n=w.range(wr,Gr-a,kn).concat(Gr);return function(ta){return _n.map(function(Ga){return[ta,Ga]})}}function wo(wr,Gr,kn){var _n=w.range(wr,Gr-a,kn).concat(Gr);return function(ta){return _n.map(function(Ga){return[Ga,ta]})}}function ql(){var wr,Gr,kn,_n,ta,Ga,ja,Ai,Ii=10,oo=Ii,hi=90,Gi=360,wi,si,vo,es,$o=2.5;function is(){return{type:"MultiLineString",coordinates:rs()}}function rs(){return w.range(_(_n/hi)*hi,kn,hi).map(vo).concat(w.range(_(Ai/Gi)*Gi,ja,Gi).map(es)).concat(w.range(_(Gr/Ii)*Ii,wr,Ii).filter(function(mo){return g(mo%hi)>a}).map(wi)).concat(w.range(_(Ga/oo)*oo,ta,oo).filter(function(mo){return g(mo%Gi)>a}).map(si))}return is.lines=function(){return rs().map(function(mo){return{type:"LineString",coordinates:mo}})},is.outline=function(){return{type:"Polygon",coordinates:[vo(_n).concat(es(ja).slice(1),vo(kn).reverse().slice(1),es(Ai).reverse().slice(1))]}},is.extent=function(mo){return arguments.length?is.extentMajor(mo).extentMinor(mo):is.extentMinor()},is.extentMajor=function(mo){return arguments.length?(_n=+mo[0][0],kn=+mo[1][0],Ai=+mo[0][1],ja=+mo[1][1],_n>kn&&(mo=_n,_n=kn,kn=mo),Ai>ja&&(mo=Ai,Ai=ja,ja=mo),is.precision($o)):[[_n,Ai],[kn,ja]]},is.extentMinor=function(mo){return arguments.length?(Gr=+mo[0][0],wr=+mo[1][0],Ga=+mo[0][1],ta=+mo[1][1],Gr>wr&&(mo=Gr,Gr=wr,wr=mo),Ga>ta&&(mo=Ga,Ga=ta,ta=mo),is.precision($o)):[[Gr,Ga],[wr,ta]]},is.step=function(mo){return arguments.length?is.stepMajor(mo).stepMinor(mo):is.stepMinor()},is.stepMajor=function(mo){return arguments.length?(hi=+mo[0],Gi=+mo[1],is):[hi,Gi]},is.stepMinor=function(mo){return arguments.length?(Ii=+mo[0],oo=+mo[1],is):[Ii,oo]},is.precision=function(mo){return arguments.length?($o=+mo,wi=Ni(Ga,ta,90),si=wo(Gr,wr,$o),vo=Ni(Ai,ja,90),es=wo(_n,kn,$o),is):$o},is.extentMajor([[-180,-90+a],[180,90-a]]).extentMinor([[-180,-80-a],[180,80+a]])}function Gs(){return ql()()}function Jo(wr,Gr){var kn=wr[0]*h,_n=wr[1]*h,ta=Gr[0]*h,Ga=Gr[1]*h,ja=c(_n),Ai=b(_n),Ii=c(Ga),oo=b(Ga),hi=ja*c(kn),Gi=ja*b(kn),wi=Ii*c(ta),si=Ii*b(ta),vo=2*x(y(N(Ga-_n)+ja*Ii*N(ta-kn))),es=b(vo),$o=vo?function(is){var rs=b(is*=vo)/es,mo=b(vo-is)/es,Ji=mo*hi+rs*wi,gs=mo*Gi+rs*si,$s=mo*Ai+rs*oo;return[E(gs,Ji)*d,E($s,y(Ji*Ji+gs*gs))*d]}:function(){return[kn*d,_n*d]};return $o.distance=vo,$o}function Gl(wr){return wr}var al=C(),bl=C(),Iu,_o,Ps,ms,ru={point:D,lineStart:D,lineEnd:D,polygonStart:function(){ru.lineStart=nu,ru.lineEnd=Au},polygonEnd:function(){ru.lineStart=ru.lineEnd=ru.point=D,al.add(g(bl)),bl.reset()},result:function(){var wr=al/2;return al.reset(),wr}};function nu(){ru.point=Zo}function Zo(wr,Gr){ru.point=_u,Iu=Ps=wr,_o=ms=Gr}function _u(wr,Gr){bl.add(ms*wr-Ps*Gr),Ps=wr,ms=Gr}function Au(){_u(Iu,_o)}var Ys=1/0,Ol=Ys,$l=-Ys,Ql=$l,ac={point:Tf,lineStart:D,lineEnd:D,polygonStart:D,polygonEnd:D,result:function(){var wr=[[Ys,Ol],[$l,Ql]];return $l=Ql=-(Ol=Ys=1/0),wr}};function Tf(wr,Gr){wr<Ys&&(Ys=wr),wr>$l&&($l=wr),Gr<Ol&&(Ol=Gr),Gr>Ql&&(Ql=Gr)}var rf=0,df=0,Zh=0,zh=0,zl=0,Vc=0,$h=0,pc=0,ic=0,mc,vf,uu,oc,el={point:Xl,lineStart:zf,lineEnd:xu,polygonStart:function(){el.lineStart=Wd,el.lineEnd=Zs},polygonEnd:function(){el.point=Xl,el.lineStart=zf,el.lineEnd=xu},result:function(){var wr=ic?[$h/ic,pc/ic]:Vc?[zh/Vc,zl/Vc]:Zh?[rf/Zh,df/Zh]:[NaN,NaN];return rf=df=Zh=zh=zl=Vc=$h=pc=ic=0,wr}};function Xl(wr,Gr){rf+=wr,df+=Gr,++Zh}function zf(){el.point=Lc}function Lc(wr,Gr){el.point=$f,Xl(uu=wr,oc=Gr)}function $f(wr,Gr){var kn=wr-uu,_n=Gr-oc,ta=y(kn*kn+_n*_n);zh+=ta*(uu+wr)/2,zl+=ta*(oc+Gr)/2,Vc+=ta,Xl(uu=wr,oc=Gr)}function xu(){el.point=Xl}function Wd(){el.point=dv}function Zs(){Ml(mc,vf)}function dv(wr,Gr){el.point=Ml,Xl(mc=uu=wr,vf=oc=Gr)}function Ml(wr,Gr){var kn=wr-uu,_n=Gr-oc,ta=y(kn*kn+_n*_n);zh+=ta*(uu+wr)/2,zl+=ta*(oc+Gr)/2,Vc+=ta,ta=oc*wr-uu*Gr,$h+=ta*(uu+wr),pc+=ta*(oc+Gr),ic+=ta*3,Xl(uu=wr,oc=Gr)}function Ko(wr){this._context=wr}Ko.prototype={_radius:4.5,pointRadius:function(wr){return this._radius=wr,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(wr,Gr){switch(this._point){case 0:{this._context.moveTo(wr,Gr),this._point=1;break}case 1:{this._context.lineTo(wr,Gr);break}default:{this._context.moveTo(wr+this._radius,Gr),this._context.arc(wr,Gr,this._radius,0,u);break}}},result:D};var ph=C(),pf,Yu,Kh,Kf,Ah,sc={point:D,lineStart:function(){sc.point=Ld},lineEnd:function(){pf&&sd(Yu,Kh),sc.point=D},polygonStart:function(){pf=!0},polygonEnd:function(){pf=null},result:function(){var wr=+ph;return ph.reset(),wr}};function Ld(wr,Gr){sc.point=sd,Yu=Kf=wr,Kh=Ah=Gr}function sd(wr,Gr){Kf-=wr,Ah-=Gr,ph.add(y(Kf*Kf+Ah*Ah)),Kf=wr,Ah=Gr}function Sh(){this._string=[]}Sh.prototype={_radius:4.5,_circle:Jf(4.5),pointRadius:function(wr){return(wr=+wr)!==this._radius&&(this._radius=wr,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(wr,Gr){switch(this._point){case 0:{this._string.push("M",wr,",",Gr),this._point=1;break}case 1:{this._string.push("L",wr,",",Gr);break}default:{this._circle==null&&(this._circle=Jf(this._radius)),this._string.push("M",wr,",",Gr,this._circle);break}}},result:function(){if(this._string.length){var wr=this._string.join("");return this._string=[],wr}else return null}};function Jf(wr){return"m0,"+wr+"a"+wr+","+wr+" 0 1,1 0,"+-2*wr+"a"+wr+","+wr+" 0 1,1 0,"+2*wr+"z"}function Jh(wr,Gr){var kn=4.5,_n,ta;function Ga(ja){return ja&&(typeof kn=="function"&&ta.pointRadius(+kn.apply(this,arguments)),H(ja,_n(ta))),ta.result()}return Ga.area=function(ja){return H(ja,_n(ru)),ru.result()},Ga.measure=function(ja){return H(ja,_n(sc)),sc.result()},Ga.bounds=function(ja){return H(ja,_n(ac)),ac.result()},Ga.centroid=function(ja){return H(ja,_n(el)),el.result()},Ga.projection=function(ja){return arguments.length?(_n=ja==null?(wr=null,Gl):(wr=ja).stream,Ga):wr},Ga.context=function(ja){return arguments.length?(ta=ja==null?(Gr=null,new Sh):new Ko(Gr=ja),typeof kn!="function"&&ta.pointRadius(kn),Ga):Gr},Ga.pointRadius=function(ja){return arguments.length?(kn=typeof ja=="function"?ja:(ta.pointRadius(+ja),+ja),Ga):kn},Ga.projection(wr).context(Gr)}function Qh(wr){return{stream:mf(wr)}}function mf(wr){return function(Gr){var kn=new ld;for(var _n in wr)kn[_n]=wr[_n];return kn.stream=Gr,kn}}function ld(){}ld.prototype={constructor:ld,point:function(wr,Gr){this.stream.point(wr,Gr)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function Nf(wr,Gr,kn){var _n=wr.clipExtent&&wr.clipExtent();return wr.scale(150).translate([0,0]),_n!=null&&wr.clipExtent(null),H(kn,wr.stream(ac)),Gr(ac.result()),_n!=null&&wr.clipExtent(_n),wr}function Af(wr,Gr,kn){return Nf(wr,function(_n){var ta=Gr[1][0]-Gr[0][0],Ga=Gr[1][1]-Gr[0][1],ja=Math.min(ta/(_n[1][0]-_n[0][0]),Ga/(_n[1][1]-_n[0][1])),Ai=+Gr[0][0]+(ta-ja*(_n[1][0]+_n[0][0]))/2,Ii=+Gr[0][1]+(Ga-ja*(_n[1][1]+_n[0][1]))/2;wr.scale(150*ja).translate([Ai,Ii])},kn)}function lc(wr,Gr,kn){return Af(wr,[[0,0],Gr],kn)}function lh(wr,Gr,kn){return Nf(wr,function(_n){var ta=+Gr,Ga=ta/(_n[1][0]-_n[0][0]),ja=(ta-Ga*(_n[1][0]+_n[0][0]))/2,Ai=-Ga*_n[0][1];wr.scale(150*Ga).translate([ja,Ai])},kn)}function ed(wr,Gr,kn){return Nf(wr,function(_n){var ta=+Gr,Ga=ta/(_n[1][1]-_n[0][1]),ja=-Ga*_n[0][0],Ai=(ta-Ga*(_n[1][1]+_n[0][1]))/2;wr.scale(150*Ga).translate([ja,Ai])},kn)}var Kl=16,Nh=c(30*h);function Yd(wr,Gr){return+Gr?Eh(wr,Gr):ud(wr)}function ud(wr){return mf({point:function(Gr,kn){Gr=wr(Gr,kn),this.stream.point(Gr[0],Gr[1])}})}function Eh(wr,Gr){function kn(_n,ta,Ga,ja,Ai,Ii,oo,hi,Gi,wi,si,vo,es,$o){var is=oo-_n,rs=hi-ta,mo=is*is+rs*rs;if(mo>4*Gr&&es--){var Ji=ja+wi,gs=Ai+si,$s=Ii+vo,Nl=y(Ji*Ji+gs*gs+$s*$s),au=x($s/=Nl),Bl=g(g($s)-1)<a||g(Ga-Gi)<a?(Ga+Gi)/2:E(gs,Ji),iu=wr(Bl,au),hl=iu[0],Bu=iu[1],Ou=hl-_n,eu=Bu-ta,No=rs*Ou-is*eu;(No*No/mo>Gr||g((is*Ou+rs*eu)/mo-.5)>.3||ja*wi+Ai*si+Ii*vo<Nh)&&(kn(_n,ta,Ga,ja,Ai,Ii,hl,Bu,Bl,Ji/=Nl,gs/=Nl,$s,es,$o),$o.point(hl,Bu),kn(hl,Bu,Bl,Ji,gs,$s,oo,hi,Gi,wi,si,vo,es,$o))}}return function(_n){var ta,Ga,ja,Ai,Ii,oo,hi,Gi,wi,si,vo,es,$o={point:is,lineStart:rs,lineEnd:Ji,polygonStart:function(){_n.polygonStart(),$o.lineStart=gs},polygonEnd:function(){_n.polygonEnd(),$o.lineStart=rs}};function is(au,Bl){au=wr(au,Bl),_n.point(au[0],au[1])}function rs(){Gi=NaN,$o.point=mo,_n.lineStart()}function mo(au,Bl){var iu=ue([au,Bl]),hl=wr(au,Bl);kn(Gi,wi,hi,si,vo,es,Gi=hl[0],wi=hl[1],hi=au,si=iu[0],vo=iu[1],es=iu[2],Kl,_n),_n.point(Gi,wi)}function Ji(){$o.point=is,_n.lineEnd()}function gs(){rs(),$o.point=$s,$o.lineEnd=Nl}function $s(au,Bl){mo(ta=au,Bl),Ga=Gi,ja=wi,Ai=si,Ii=vo,oo=es,$o.point=mo}function Nl(){kn(Gi,wi,hi,si,vo,es,Ga,ja,ta,Ai,Ii,oo,Kl,_n),$o.lineEnd=Ji,Ji()}return $o}}var cd=mf({point:function(wr,Gr){this.stream.point(wr*h,Gr*h)}});function Hc(wr){return mf({point:function(Gr,kn){var _n=wr(Gr,kn);return this.stream.point(_n[0],_n[1])}})}function fd(wr,Gr,kn,_n,ta){function Ga(ja,Ai){return ja*=_n,Ai*=ta,[Gr+wr*ja,kn-wr*Ai]}return Ga.invert=function(ja,Ai){return[(ja-Gr)/wr*_n,(kn-Ai)/wr*ta]},Ga}function Pu(wr,Gr,kn,_n,ta,Ga){var ja=c(Ga),Ai=b(Ga),Ii=ja*wr,oo=Ai*wr,hi=ja/wr,Gi=Ai/wr,wi=(Ai*kn-ja*Gr)/wr,si=(Ai*Gr+ja*kn)/wr;function vo(es,$o){return es*=_n,$o*=ta,[Ii*es-oo*$o+Gr,kn-oo*es-Ii*$o]}return vo.invert=function(es,$o){return[_n*(hi*es-Gi*$o+wi),ta*(si-Gi*es-hi*$o)]},vo}function Gc(wr){return Qf(function(){return wr})()}function Qf(wr){var Gr,kn=150,_n=480,ta=250,Ga=0,ja=0,Ai=0,Ii=0,oo=0,hi,Gi=0,wi=1,si=1,vo=null,es=Yr,$o=null,is,rs,mo,Ji=Gl,gs=.5,$s,Nl,au,Bl,iu;function hl(No){return au(No[0]*h,No[1]*h)}function Bu(No){return No=au.invert(No[0],No[1]),No&&[No[0]*d,No[1]*d]}hl.stream=function(No){return Bl&&iu===No?Bl:Bl=cd(Hc(hi)(es($s(Ji(iu=No)))))},hl.preclip=function(No){return arguments.length?(es=No,vo=void 0,eu()):es},hl.postclip=function(No){return arguments.length?(Ji=No,$o=is=rs=mo=null,eu()):Ji},hl.clipAngle=function(No){return arguments.length?(es=+No?oa(vo=No*h):(vo=null,Yr),eu()):vo*d},hl.clipExtent=function(No){return arguments.length?(Ji=No==null?($o=is=rs=mo=null,Gl):Za($o=+No[0][0],is=+No[0][1],rs=+No[1][0],mo=+No[1][1]),eu()):$o==null?null:[[$o,is],[rs,mo]]},hl.scale=function(No){return arguments.length?(kn=+No,Ou()):kn},hl.translate=function(No){return arguments.length?(_n=+No[0],ta=+No[1],Ou()):[_n,ta]},hl.center=function(No){return arguments.length?(Ga=No[0]%360*h,ja=No[1]%360*h,Ou()):[Ga*d,ja*d]},hl.rotate=function(No){return arguments.length?(Ai=No[0]%360*h,Ii=No[1]%360*h,oo=No.length>2?No[2]%360*h:0,Ou()):[Ai*d,Ii*d,oo*d]},hl.angle=function(No){return arguments.length?(Gi=No%360*h,Ou()):Gi*d},hl.reflectX=function(No){return arguments.length?(wi=No?-1:1,Ou()):wi<0},hl.reflectY=function(No){return arguments.length?(si=No?-1:1,Ou()):si<0},hl.precision=function(No){return arguments.length?($s=Yd(Nl,gs=No*No),eu()):y(gs)},hl.fitExtent=function(No,Ls){return Af(hl,No,Ls)},hl.fitSize=function(No,Ls){return lc(hl,No,Ls)},hl.fitWidth=function(No,Ls){return lh(hl,No,Ls)},hl.fitHeight=function(No,Ls){return ed(hl,No,Ls)};function Ou(){var No=Pu(kn,0,0,wi,si,Gi).apply(null,Gr(Ga,ja)),Ls=(Gi?Pu:fd)(kn,_n-No[0],ta-No[1],wi,si,Gi);return hi=xa(Ai,Ii,oo),Nl=Ln(Gr,Ls),au=Ln(hi,Nl),$s=Yd(Nl,gs),eu()}function eu(){return Bl=iu=null,hl}return function(){return Gr=wr.apply(this,arguments),hl.invert=Gr.invert&&Bu,Ou()}}function cu(wr){var Gr=0,kn=i/3,_n=Qf(wr),ta=_n(Gr,kn);return ta.parallels=function(Ga){return arguments.length?_n(Gr=Ga[0]*h,kn=Ga[1]*h):[Gr*d,kn*d]},ta}function Ff(wr){var Gr=c(wr);function kn(_n,ta){return[_n*Gr,b(ta)/Gr]}return kn.invert=function(_n,ta){return[_n/Gr,x(ta*Gr)]},kn}function Sc(wr,Gr){var kn=b(wr),_n=(kn+b(Gr))/2;if(g(_n)<a)return Ff(wr);var ta=1+kn*(2*_n-kn),Ga=y(ta)/_n;function ja(Ai,Ii){var oo=y(ta-2*_n*b(Ii))/_n;return[oo*b(Ai*=_n),Ga-oo*c(Ai)]}return ja.invert=function(Ai,Ii){var oo=Ga-Ii,hi=E(Ai,g(oo))*A(oo);return oo*_n<0&&(hi-=i*A(Ai)*A(oo)),[hi/_n,x((ta-(Ai*Ai+oo*oo)*_n*_n)/(2*_n))]},ja}function Xc(){return cu(Sc).scale(155.424).center([0,33.6442])}function bu(){return Xc().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function mh(wr){var Gr=wr.length;return{point:function(kn,_n){for(var ta=-1;++ta<Gr;)wr[ta].point(kn,_n)},sphere:function(){for(var kn=-1;++kn<Gr;)wr[kn].sphere()},lineStart:function(){for(var kn=-1;++kn<Gr;)wr[kn].lineStart()},lineEnd:function(){for(var kn=-1;++kn<Gr;)wr[kn].lineEnd()},polygonStart:function(){for(var kn=-1;++kn<Gr;)wr[kn].polygonStart()},polygonEnd:function(){for(var kn=-1;++kn<Gr;)wr[kn].polygonEnd()}}}function Sf(){var wr,Gr,kn=bu(),_n,ta=Xc().rotate([154,0]).center([-2,58.5]).parallels([55,65]),Ga,ja=Xc().rotate([157,0]).center([-3,19.9]).parallels([8,18]),Ai,Ii,oo={point:function(wi,si){Ii=[wi,si]}};function hi(wi){var si=wi[0],vo=wi[1];return Ii=null,_n.point(si,vo),Ii||(Ga.point(si,vo),Ii)||(Ai.point(si,vo),Ii)}hi.invert=function(wi){var si=kn.scale(),vo=kn.translate(),es=(wi[0]-vo[0])/si,$o=(wi[1]-vo[1])/si;return($o>=.12&&$o<.234&&es>=-.425&&es<-.214?ta:$o>=.166&&$o<.234&&es>=-.214&&es<-.115?ja:kn).invert(wi)},hi.stream=function(wi){return wr&&Gr===wi?wr:wr=mh([kn.stream(Gr=wi),ta.stream(wi),ja.stream(wi)])},hi.precision=function(wi){return arguments.length?(kn.precision(wi),ta.precision(wi),ja.precision(wi),Gi()):kn.precision()},hi.scale=function(wi){return arguments.length?(kn.scale(wi),ta.scale(wi*.35),ja.scale(wi),hi.translate(kn.translate())):kn.scale()},hi.translate=function(wi){if(!arguments.length)return kn.translate();var si=kn.scale(),vo=+wi[0],es=+wi[1];return _n=kn.translate(wi).clipExtent([[vo-.455*si,es-.238*si],[vo+.455*si,es+.238*si]]).stream(oo),Ga=ta.translate([vo-.307*si,es+.201*si]).clipExtent([[vo-.425*si+a,es+.12*si+a],[vo-.214*si-a,es+.234*si-a]]).stream(oo),Ai=ja.translate([vo-.205*si,es+.212*si]).clipExtent([[vo-.214*si+a,es+.166*si+a],[vo-.115*si-a,es+.234*si-a]]).stream(oo),Gi()},hi.fitExtent=function(wi,si){return Af(hi,wi,si)},hi.fitSize=function(wi,si){return lc(hi,wi,si)},hi.fitWidth=function(wi,si){return lh(hi,wi,si)},hi.fitHeight=function(wi,si){return ed(hi,wi,si)};function Gi(){return wr=Gr=null,hi}return hi.scale(1070)}function eh(wr){return function(Gr,kn){var _n=c(Gr),ta=c(kn),Ga=wr(_n*ta);return[Ga*ta*b(Gr),Ga*b(kn)]}}function Fh(wr){return function(Gr,kn){var _n=y(Gr*Gr+kn*kn),ta=wr(_n),Ga=b(ta),ja=c(ta);return[E(Gr*Ga,_n*ja),x(_n&&kn*Ga/_n)]}}var Zd=eh(function(wr){return y(2/(1+wr))});Zd.invert=Fh(function(wr){return 2*x(wr/2)});function Sv(){return Gc(Zd).scale(124.75).clipAngle(180-.001)}var gh=eh(function(wr){return(wr=p(wr))&&wr/b(wr)});gh.invert=Fh(function(wr){return wr});function Bh(){return Gc(gh).scale(79.4188).clipAngle(180-.001)}function nf(wr,Gr){return[wr,M(f((s+Gr)/2))]}nf.invert=function(wr,Gr){return[wr,2*m(T(Gr))-s]};function jh(){return gc(nf).scale(961/u)}function gc(wr){var Gr=Gc(wr),kn=Gr.center,_n=Gr.scale,ta=Gr.translate,Ga=Gr.clipExtent,ja=null,Ai,Ii,oo;Gr.scale=function(Gi){return arguments.length?(_n(Gi),hi()):_n()},Gr.translate=function(Gi){return arguments.length?(ta(Gi),hi()):ta()},Gr.center=function(Gi){return arguments.length?(kn(Gi),hi()):kn()},Gr.clipExtent=function(Gi){return arguments.length?(Gi==null?ja=Ai=Ii=oo=null:(ja=+Gi[0][0],Ai=+Gi[0][1],Ii=+Gi[1][0],oo=+Gi[1][1]),hi()):ja==null?null:[[ja,Ai],[Ii,oo]]};function hi(){var Gi=i*_n(),wi=Gr(Ka(Gr.rotate()).invert([0,0]));return Ga(ja==null?[[wi[0]-Gi,wi[1]-Gi],[wi[0]+Gi,wi[1]+Gi]]:wr===nf?[[Math.max(wi[0]-Gi,ja),Ai],[Math.min(wi[0]+Gi,Ii),oo]]:[[ja,Math.max(wi[1]-Gi,Ai)],[Ii,Math.min(wi[1]+Gi,oo)]])}return hi()}function yh(wr){return f((s+wr)/2)}function hd(wr,Gr){var kn=c(wr),_n=wr===Gr?b(wr):M(kn/c(Gr))/M(yh(Gr)/yh(wr)),ta=kn*k(yh(wr),_n)/_n;if(!_n)return nf;function Ga(ja,Ai){ta>0?Ai<-s+a&&(Ai=-s+a):Ai>s-a&&(Ai=s-a);var Ii=ta/k(yh(Ai),_n);return[Ii*b(_n*ja),ta-Ii*c(_n*ja)]}return Ga.invert=function(ja,Ai){var Ii=ta-Ai,oo=A(_n)*y(ja*ja+Ii*Ii),hi=E(ja,g(Ii))*A(Ii);return Ii*_n<0&&(hi-=i*A(ja)*A(Ii)),[hi/_n,2*m(k(ta/oo,1/_n))-s]},Ga}function _h(){return cu(hd).scale(109.5).parallels([30,30])}function du(wr,Gr){return[wr,Gr]}du.invert=du;function Wc(){return Gc(du).scale(152.63)}function gf(wr,Gr){var kn=c(wr),_n=wr===Gr?b(wr):(kn-c(Gr))/(Gr-wr),ta=kn/_n+wr;if(g(_n)<a)return du;function Ga(ja,Ai){var Ii=ta-Ai,oo=_n*ja;return[Ii*b(oo),ta-Ii*c(oo)]}return Ga.invert=function(ja,Ai){var Ii=ta-Ai,oo=E(ja,g(Ii))*A(Ii);return Ii*_n<0&&(oo-=i*A(ja)*A(Ii)),[oo/_n,ta-A(_n)*y(ja*ja+Ii*Ii)]},Ga}function td(){return cu(gf).scale(131.154).center([0,13.9389])}var gu=1.340264,Mh=-.081106,th=893e-6,af=.003796,Ch=y(3)/2,Ef=12;function kh(wr,Gr){var kn=x(Ch*b(Gr)),_n=kn*kn,ta=_n*_n*_n;return[wr*c(kn)/(Ch*(gu+3*Mh*_n+ta*(7*th+9*af*_n))),kn*(gu+Mh*_n+ta*(th+af*_n))]}kh.invert=function(wr,Gr){for(var kn=Gr,_n=kn*kn,ta=_n*_n*_n,Ga=0,ja,Ai,Ii;Ga<Ef&&(Ai=kn*(gu+Mh*_n+ta*(th+af*_n))-Gr,Ii=gu+3*Mh*_n+ta*(7*th+9*af*_n),kn-=ja=Ai/Ii,_n=kn*kn,ta=_n*_n*_n,!(g(ja)<l));++Ga);return[Ch*wr*(gu+3*Mh*_n+ta*(7*th+9*af*_n))/c(kn),x(b(kn)/Ch)]};function $d(){return Gc(kh).scale(177.158)}function xc(wr,Gr){var kn=c(Gr),_n=c(wr)*kn;return[kn*b(wr)/_n,b(Gr)/_n]}xc.invert=Fh(m);function dd(){return Gc(xc).scale(144.049).clipAngle(60)}function of(){var wr=1,Gr=0,kn=0,_n=1,ta=1,Ga=0,ja,Ai,Ii=null,oo,hi,Gi,wi=1,si=1,vo=mf({point:function(Ji,gs){var $s=mo([Ji,gs]);this.stream.point($s[0],$s[1])}}),es=Gl,$o,is;function rs(){return wi=wr*_n,si=wr*ta,$o=is=null,mo}function mo(Ji){var gs=Ji[0]*wi,$s=Ji[1]*si;if(Ga){var Nl=$s*ja-gs*Ai;gs=gs*ja+$s*Ai,$s=Nl}return[gs+Gr,$s+kn]}return mo.invert=function(Ji){var gs=Ji[0]-Gr,$s=Ji[1]-kn;if(Ga){var Nl=$s*ja+gs*Ai;gs=gs*ja-$s*Ai,$s=Nl}return[gs/wi,$s/si]},mo.stream=function(Ji){return $o&&is===Ji?$o:$o=vo(es(is=Ji))},mo.postclip=function(Ji){return arguments.length?(es=Ji,Ii=oo=hi=Gi=null,rs()):es},mo.clipExtent=function(Ji){return arguments.length?(es=Ji==null?(Ii=oo=hi=Gi=null,Gl):Za(Ii=+Ji[0][0],oo=+Ji[0][1],hi=+Ji[1][0],Gi=+Ji[1][1]),rs()):Ii==null?null:[[Ii,oo],[hi,Gi]]},mo.scale=function(Ji){return arguments.length?(wr=+Ji,rs()):wr},mo.translate=function(Ji){return arguments.length?(Gr=+Ji[0],kn=+Ji[1],rs()):[Gr,kn]},mo.angle=function(Ji){return arguments.length?(Ga=Ji%360*h,Ai=b(Ga),ja=c(Ga),rs()):Ga*d},mo.reflectX=function(Ji){return arguments.length?(_n=Ji?-1:1,rs()):_n<0},mo.reflectY=function(Ji){return arguments.length?(ta=Ji?-1:1,rs()):ta<0},mo.fitExtent=function(Ji,gs){return Af(mo,Ji,gs)},mo.fitSize=function(Ji,gs){return lc(mo,Ji,gs)},mo.fitWidth=function(Ji,gs){return lh(mo,Ji,gs)},mo.fitHeight=function(Ji,gs){return ed(mo,Ji,gs)},mo}function Bf(wr,Gr){var kn=Gr*Gr,_n=kn*kn;return[wr*(.8707-.131979*kn+_n*(-.013791+_n*(.003971*kn-.001529*_n))),Gr*(1.007226+kn*(.015085+_n*(-.044475+.028874*kn-.005916*_n)))]}Bf.invert=function(wr,Gr){var kn=Gr,_n=25,ta;do{var Ga=kn*kn,ja=Ga*Ga;kn-=ta=(kn*(1.007226+Ga*(.015085+ja*(-.044475+.028874*Ga-.005916*ja)))-Gr)/(1.007226+Ga*(.015085*3+ja*(-.044475*7+.028874*9*Ga-.005916*11*ja)))}while(g(ta)>a&&--_n>0);return[wr/(.8707+(Ga=kn*kn)*(-.131979+Ga*(-.013791+Ga*Ga*Ga*(.003971-.001529*Ga)))),kn]};function Mf(){return Gc(Bf).scale(175.295)}function Du(wr,Gr){return[c(Gr)*b(wr),b(Gr)]}Du.invert=Fh(x);function Rc(){return Gc(Du).scale(249.5).clipAngle(90+a)}function Su(wr,Gr){var kn=c(Gr),_n=1+c(wr)*kn;return[kn*b(wr)/_n,b(Gr)/_n]}Su.invert=Fh(function(wr){return 2*m(wr)});function rh(){return Gc(Su).scale(250).clipAngle(142)}function Cf(wr,Gr){return[M(f((s+Gr)/2)),-wr]}Cf.invert=function(wr,Gr){return[-Gr,2*m(T(wr))-s]};function rd(){var wr=gc(Cf),Gr=wr.center,kn=wr.rotate;return wr.center=function(_n){return arguments.length?Gr([-_n[1],_n[0]]):(_n=Gr(),[_n[1],-_n[0]])},wr.rotate=function(_n){return arguments.length?kn([_n[0],_n[1],_n.length>2?_n[2]+90:90]):(_n=kn(),[_n[0],_n[1],_n[2]-90])},kn([0,0,90]).scale(159.155)}v.geoAlbers=bu,v.geoAlbersUsa=Sf,v.geoArea=Y,v.geoAzimuthalEqualArea=Sv,v.geoAzimuthalEqualAreaRaw=Zd,v.geoAzimuthalEquidistant=Bh,v.geoAzimuthalEquidistantRaw=gh,v.geoBounds=$e,v.geoCentroid=an,v.geoCircle=Yi,v.geoClipAntimeridian=Yr,v.geoClipCircle=oa,v.geoClipExtent=Ki,v.geoClipRectangle=Za,v.geoConicConformal=_h,v.geoConicConformalRaw=hd,v.geoConicEqualArea=Xc,v.geoConicEqualAreaRaw=Sc,v.geoConicEquidistant=td,v.geoConicEquidistantRaw=gf,v.geoContains=Fs,v.geoDistance=Qs,v.geoEqualEarth=$d,v.geoEqualEarthRaw=kh,v.geoEquirectangular=Wc,v.geoEquirectangularRaw=du,v.geoGnomonic=dd,v.geoGnomonicRaw=xc,v.geoGraticule=ql,v.geoGraticule10=Gs,v.geoIdentity=of,v.geoInterpolate=Jo,v.geoLength=hs,v.geoMercator=jh,v.geoMercatorRaw=nf,v.geoNaturalEarth1=Mf,v.geoNaturalEarth1Raw=Bf,v.geoOrthographic=Rc,v.geoOrthographicRaw=Du,v.geoPath=Jh,v.geoProjection=Gc,v.geoProjectionMutator=Qf,v.geoRotation=Ka,v.geoStereographic=rh,v.geoStereographicRaw=Su,v.geoStream=H,v.geoTransform=Qh,v.geoTransverseMercator=rd,v.geoTransverseMercatorRaw=Cf,Object.defineProperty(v,"__esModule",{value:!0})})}}),DJ=Ne({"node_modules/d3-geo-projection/dist/d3-geo-projection.js"(te,Z){(function(v,w){typeof te=="object"&&typeof Z<"u"?w(te,pN(),ck()):w(v.d3=v.d3||{},v.d3,v.d3)})(te,function(v,w,C){var P=Math.abs,t=Math.atan,r=Math.atan2,a=Math.cos,l=Math.exp,i=Math.floor,s=Math.log,o=Math.max,u=Math.min,d=Math.pow,h=Math.round,g=Math.sign||function(nt){return nt>0?1:nt<0?-1:0},m=Math.sin,E=Math.tan,c=1e-6,_=1e-12,T=Math.PI,M=T/2,k=T/4,b=Math.SQRT1_2,A=U(2),y=U(T),f=T*2,p=180/T,x=T/180;function N(nt){return nt?nt/Math.sin(nt):1}function D(nt){return nt>1?M:nt<-1?-M:Math.asin(nt)}function B(nt){return nt>1?0:nt<-1?T:Math.acos(nt)}function U(nt){return nt>0?Math.sqrt(nt):0}function V(nt){return nt=l(2*nt),(nt-1)/(nt+1)}function q(nt){return(l(nt)-l(-nt))/2}function z(nt){return(l(nt)+l(-nt))/2}function H(nt){return s(nt+U(nt*nt+1))}function G(nt){return s(nt+U(nt*nt-1))}function J(nt){var ct=E(nt/2),Tt=2*s(a(nt/2))/(ct*ct);function Pt(Gt,zt){var Kt=a(Gt),Cr=a(zt),Nr=m(zt),Hr=Cr*Kt,sn=-((1-Hr?s((1+Hr)/2)/(1-Hr):-.5)+Tt/(1+Hr));return[sn*Cr*m(Gt),sn*Nr]}return Pt.invert=function(Gt,zt){var Kt=U(Gt*Gt+zt*zt),Cr=-nt/2,Nr=50,Hr;if(!Kt)return[0,0];do{var sn=Cr/2,bn=a(sn),Vn=m(sn),Yn=Vn/bn,va=-s(P(bn));Cr-=Hr=(2/Yn*va-Tt*Yn-Kt)/(-va/(Vn*Vn)+1-Tt/(2*bn*bn))*(bn<0?.7:1)}while(P(Hr)>c&&--Nr>0);var Va=m(Cr);return[r(Gt*Va,Kt*a(Cr)),D(zt*Va/Kt)]},Pt}function le(){var nt=M,ct=w.geoProjectionMutator(J),Tt=ct(nt);return Tt.radius=function(Pt){return arguments.length?ct(nt=Pt*x):nt*p},Tt.scale(179.976).clipAngle(147)}function ge(nt,ct){var Tt=a(ct),Pt=N(B(Tt*a(nt/=2)));return[2*Tt*m(nt)*Pt,m(ct)*Pt]}ge.invert=function(nt,ct){if(!(nt*nt+4*ct*ct>T*T+c)){var Tt=nt,Pt=ct,Gt=25;do{var zt=m(Tt),Kt=m(Tt/2),Cr=a(Tt/2),Nr=m(Pt),Hr=a(Pt),sn=m(2*Pt),bn=Nr*Nr,Vn=Hr*Hr,Yn=Kt*Kt,va=1-Vn*Cr*Cr,Va=va?B(Hr*Cr)*U(Si=1/va):Si=0,Si,yi=2*Va*Hr*Kt-nt,Mi=Va*Nr-ct,go=Si*(Vn*Yn+Va*Hr*Cr*bn),jo=Si*(.5*zt*sn-Va*2*Nr*Kt),Do=Si*.25*(sn*Kt-Va*Nr*Vn*zt),us=Si*(bn*Cr+Va*Yn*Hr),sl=jo*Do-us*go;if(!sl)break;var ll=(Mi*jo-yi*us)/sl,Bs=(yi*Do-Mi*go)/sl;Tt-=ll,Pt-=Bs}while((P(ll)>c||P(Bs)>c)&&--Gt>0);return[Tt,Pt]}};function de(){return w.geoProjection(ge).scale(152.63)}function me(nt){var ct=m(nt),Tt=a(nt),Pt=nt>=0?1:-1,Gt=E(Pt*nt),zt=(1+ct-Tt)/2;function Kt(Cr,Nr){var Hr=a(Nr),sn=a(Cr/=2);return[(1+Hr)*m(Cr),(Pt*Nr>-r(sn,Gt)-.001?0:-Pt*10)+zt+m(Nr)*Tt-(1+Hr)*ct*sn]}return Kt.invert=function(Cr,Nr){var Hr=0,sn=0,bn=50;do{var Vn=a(Hr),Yn=m(Hr),va=a(sn),Va=m(sn),Si=1+va,yi=Si*Yn-Cr,Mi=zt+Va*Tt-Si*ct*Vn-Nr,go=Si*Vn/2,jo=-Yn*Va,Do=ct*Si*Yn/2,us=Tt*va+ct*Vn*Va,sl=jo*Do-us*go,ll=(Mi*jo-yi*us)/sl/2,Bs=(yi*Do-Mi*go)/sl;P(Bs)>2&&(Bs/=2),Hr-=ll,sn-=Bs}while((P(ll)>c||P(Bs)>c)&&--bn>0);return Pt*sn>-r(a(Hr),Gt)-.001?[Hr*2,sn]:null},Kt}function W(){var nt=20*x,ct=nt>=0?1:-1,Tt=E(ct*nt),Pt=w.geoProjectionMutator(me),Gt=Pt(nt),zt=Gt.stream;return Gt.parallel=function(Kt){return arguments.length?(Tt=E((ct=(nt=Kt*x)>=0?1:-1)*nt),Pt(nt)):nt*p},Gt.stream=function(Kt){var Cr=Gt.rotate(),Nr=zt(Kt),Hr=(Gt.rotate([0,0]),zt(Kt)),sn=Gt.precision();return Gt.rotate(Cr),Nr.sphere=function(){Hr.polygonStart(),Hr.lineStart();for(var bn=ct*-180;ct*bn<180;bn+=ct*90)Hr.point(bn,ct*90);if(nt)for(;ct*(bn-=3*ct*sn)>=-180;)Hr.point(bn,ct*-r(a(bn*x/2),Tt)*p);Hr.lineEnd(),Hr.polygonEnd()},Nr},Gt.scale(218.695).center([0,28.0974])}function ie(nt,ct){var Tt=E(ct/2),Pt=U(1-Tt*Tt),Gt=1+Pt*a(nt/=2),zt=m(nt)*Pt/Gt,Kt=Tt/Gt,Cr=zt*zt,Nr=Kt*Kt;return[4/3*zt*(3+Cr-3*Nr),4/3*Kt*(3+3*Cr-Nr)]}ie.invert=function(nt,ct){if(nt*=3/8,ct*=3/8,!nt&&P(ct)>1)return null;var Tt=nt*nt,Pt=ct*ct,Gt=1+Tt+Pt,zt=U((Gt-U(Gt*Gt-4*ct*ct))/2),Kt=D(zt)/3,Cr=zt?G(P(ct/zt))/3:H(P(nt))/3,Nr=a(Kt),Hr=z(Cr),sn=Hr*Hr-Nr*Nr;return[g(nt)*2*r(q(Cr)*Nr,.25-sn),g(ct)*2*r(Hr*m(Kt),.25+sn)]};function se(){return w.geoProjection(ie).scale(66.1603)}var ee=U(8),pe=s(1+A);function oe(nt,ct){var Tt=P(ct);return Tt<k?[nt,s(E(k+ct/2))]:[nt*a(Tt)*(2*A-1/m(Tt)),g(ct)*(2*A*(Tt-k)-s(E(Tt/2)))]}oe.invert=function(nt,ct){if((zt=P(ct))<pe)return[nt,2*t(l(ct))-M];var Tt=k,Pt=25,Gt,zt;do{var Kt=a(Tt/2),Cr=E(Tt/2);Tt-=Gt=(ee*(Tt-k)-s(Cr)-zt)/(ee-Kt*Kt/(2*Cr))}while(P(Gt)>_&&--Pt>0);return[nt/(a(Tt)*(ee-1/m(Tt))),g(ct)*Tt]};function Y(){return w.geoProjection(oe).scale(112.314)}function ce(nt){var ct=2*T/nt;function Tt(Pt,Gt){var zt=w.geoAzimuthalEquidistantRaw(Pt,Gt);if(P(Pt)>M){var Kt=r(zt[1],zt[0]),Cr=U(zt[0]*zt[0]+zt[1]*zt[1]),Nr=ct*h((Kt-M)/ct)+M,Hr=r(m(Kt-=Nr),2-a(Kt));Kt=Nr+D(T/Cr*m(Hr))-Hr,zt[0]=Cr*a(Kt),zt[1]=Cr*m(Kt)}return zt}return Tt.invert=function(Pt,Gt){var zt=U(Pt*Pt+Gt*Gt);if(zt>M){var Kt=r(Gt,Pt),Cr=ct*h((Kt-M)/ct)+M,Nr=Kt>Cr?-1:1,Hr=zt*a(Cr-Kt),sn=1/E(Nr*B((Hr-T)/U(T*(T-2*Hr)+zt*zt)));Kt=Cr+2*t((sn+Nr*U(sn*sn-3))/3),Pt=zt*a(Kt),Gt=zt*m(Kt)}return w.geoAzimuthalEquidistantRaw.invert(Pt,Gt)},Tt}function ue(){var nt=5,ct=w.geoProjectionMutator(ce),Tt=ct(nt),Pt=Tt.stream,Gt=.01,zt=-a(Gt*x),Kt=m(Gt*x);return Tt.lobes=function(Cr){return arguments.length?ct(nt=+Cr):nt},Tt.stream=function(Cr){var Nr=Tt.rotate(),Hr=Pt(Cr),sn=(Tt.rotate([0,0]),Pt(Cr));return Tt.rotate(Nr),Hr.sphere=function(){sn.polygonStart(),sn.lineStart();for(var bn=0,Vn=360/nt,Yn=2*T/nt,va=90-180/nt,Va=M;bn<nt;++bn,va-=Vn,Va-=Yn)sn.point(r(Kt*a(Va),zt)*p,D(Kt*m(Va))*p),va<-90?(sn.point(-90,-180-va-Gt),sn.point(-90,-180-va+Gt)):(sn.point(90,va+Gt),sn.point(90,va-Gt));sn.lineEnd(),sn.polygonEnd()},Hr},Tt.scale(87.8076).center([0,17.1875]).clipAngle(180-.001)}function _e(nt,ct){if(arguments.length<2&&(ct=nt),ct===1)return w.geoAzimuthalEqualAreaRaw;if(ct===1/0)return Le;function Tt(Pt,Gt){var zt=w.geoAzimuthalEqualAreaRaw(Pt/ct,Gt);return zt[0]*=nt,zt}return Tt.invert=function(Pt,Gt){var zt=w.geoAzimuthalEqualAreaRaw.invert(Pt/nt,Gt);return zt[0]*=ct,zt},Tt}function Le(nt,ct){return[nt*a(ct)/a(ct/=2),2*m(ct)]}Le.invert=function(nt,ct){var Tt=2*D(ct/2);return[nt*a(Tt/2)/a(Tt),Tt]};function ze(){var nt=2,ct=w.geoProjectionMutator(_e),Tt=ct(nt);return Tt.coefficient=function(Pt){return arguments.length?ct(nt=+Pt):nt},Tt.scale(169.529)}function Xe(nt,ct,Tt){var Pt=100,Gt,zt,Kt;Tt=Tt===void 0?0:+Tt,ct=+ct;do zt=nt(Tt),Kt=nt(Tt+c),zt===Kt&&(Kt=zt+c),Tt-=Gt=-1*c*(zt-ct)/(zt-Kt);while(Pt-- >0&&P(Gt)>c);return Pt<0?NaN:Tt}function Ve(nt,ct,Tt){return ct===void 0&&(ct=40),Tt===void 0&&(Tt=_),function(Pt,Gt,zt,Kt){var Cr,Nr,Hr;zt=zt===void 0?0:+zt,Kt=Kt===void 0?0:+Kt;for(var sn=0;sn<ct;sn++){var bn=nt(zt,Kt),Vn=bn[0]-Pt,Yn=bn[1]-Gt;if(P(Vn)<Tt&&P(Yn)<Tt)break;var va=Vn*Vn+Yn*Yn;if(va>Cr){zt-=Nr/=2,Kt-=Hr/=2;continue}Cr=va;var Va=(zt>0?-1:1)*Tt,Si=(Kt>0?-1:1)*Tt,yi=nt(zt+Va,Kt),Mi=nt(zt,Kt+Si),go=(yi[0]-bn[0])/Va,jo=(yi[1]-bn[1])/Va,Do=(Mi[0]-bn[0])/Si,us=(Mi[1]-bn[1])/Si,sl=us*go-jo*Do,ll=(P(sl)<.5?.5:1)/sl;if(Nr=(Yn*Do-Vn*us)*ll,Hr=(Vn*jo-Yn*go)*ll,zt+=Nr,Kt+=Hr,P(Nr)<Tt&&P(Hr)<Tt)break}return[zt,Kt]}}function rt(){var nt=_e(1.68,2),ct=1.4,Tt=12;function Pt(Gt,zt){if(Gt+zt<-ct){var Kt=(Gt-zt+1.6)*(Gt+zt+ct)/8;Gt+=Kt,zt-=.8*Kt*m(zt+T/2)}var Cr=nt(Gt,zt),Nr=(1-a(Gt*zt))/Tt;return Cr[1]<0&&(Cr[0]*=1+Nr),Cr[1]>0&&(Cr[1]*=1+Nr/1.5*Cr[0]*Cr[0]),Cr}return Pt.invert=Ve(Pt),Pt}function mt(){return w.geoProjection(rt()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function _t(nt,ct){var Tt=nt*m(ct),Pt=30,Gt;do ct-=Gt=(ct+m(ct)-Tt)/(1+a(ct));while(P(Gt)>c&&--Pt>0);return ct/2}function vt(nt,ct,Tt){function Pt(Gt,zt){return[nt*Gt*a(zt=_t(Tt,zt)),ct*m(zt)]}return Pt.invert=function(Gt,zt){return zt=D(zt/ct),[Gt/(nt*a(zt)),D((2*zt+m(2*zt))/Tt)]},Pt}var ut=vt(A/M,A,T);function Fe(){return w.geoProjection(ut).scale(169.529)}var Pe=2.00276,be=1.11072;function Ye(nt,ct){var Tt=_t(T,ct);return[Pe*nt/(1/a(ct)+be/a(Tt)),(ct+A*m(Tt))/Pe]}Ye.invert=function(nt,ct){var Tt=Pe*ct,Pt=ct<0?-k:k,Gt=25,zt,Kt;do Kt=Tt-A*m(Pt),Pt-=zt=(m(2*Pt)+2*Pt-T*m(Kt))/(2*a(2*Pt)+2+T*a(Kt)*A*a(Pt));while(P(zt)>c&&--Gt>0);return Kt=Tt-A*m(Pt),[nt*(1/a(Kt)+be/a(Pt))/Pe,Kt]};function yt(){return w.geoProjection(Ye).scale(160.857)}function wt(nt){var ct=0,Tt=w.geoProjectionMutator(nt),Pt=Tt(ct);return Pt.parallel=function(Gt){return arguments.length?Tt(ct=Gt*x):ct*p},Pt}function ht(nt,ct){return[nt*a(ct),ct]}ht.invert=function(nt,ct){return[nt/a(ct),ct]};function Yt(){return w.geoProjection(ht).scale(152.63)}function $t(nt){if(!nt)return ht;var ct=1/E(nt);function Tt(Pt,Gt){var zt=ct+nt-Gt,Kt=zt&&Pt*a(Gt)/zt;return[zt*m(Kt),ct-zt*a(Kt)]}return Tt.invert=function(Pt,Gt){var zt=U(Pt*Pt+(Gt=ct-Gt)*Gt),Kt=ct+nt-zt;return[zt/a(Kt)*r(Pt,Gt),Kt]},Tt}function fr(){return wt($t).scale(123.082).center([0,26.1441]).parallel(45)}function mr(nt){function ct(Tt,Pt){var Gt=M-Pt,zt=Gt&&Tt*nt*m(Gt)/Gt;return[Gt*m(zt)/nt,M-Gt*a(zt)]}return ct.invert=function(Tt,Pt){var Gt=Tt*nt,zt=M-Pt,Kt=U(Gt*Gt+zt*zt),Cr=r(Gt,zt);return[(Kt?Kt/m(Kt):1)*Cr/nt,M-Kt]},ct}function Ur(){var nt=.5,ct=w.geoProjectionMutator(mr),Tt=ct(nt);return Tt.fraction=function(Pt){return arguments.length?ct(nt=+Pt):nt},Tt.scale(158.837)}var jr=vt(1,4/T,T);function fn(){return w.geoProjection(jr).scale(152.63)}function Br(nt,ct,Tt,Pt,Gt,zt){var Kt=a(zt),Cr;if(P(nt)>1||P(zt)>1)Cr=B(Tt*Gt+ct*Pt*Kt);else{var Nr=m(nt/2),Hr=m(zt/2);Cr=2*D(U(Nr*Nr+ct*Pt*Hr*Hr))}return P(Cr)>c?[Cr,r(Pt*m(zt),ct*Gt-Tt*Pt*Kt)]:[0,0]}function Qr(nt,ct,Tt){return B((nt*nt+ct*ct-Tt*Tt)/(2*nt*ct))}function Ot(nt){return nt-2*T*i((nt+T)/(2*T))}function $e(nt,ct,Tt){for(var Pt=[[nt[0],nt[1],m(nt[1]),a(nt[1])],[ct[0],ct[1],m(ct[1]),a(ct[1])],[Tt[0],Tt[1],m(Tt[1]),a(Tt[1])]],Gt=Pt[2],zt,Kt=0;Kt<3;++Kt,Gt=zt)zt=Pt[Kt],Gt.v=Br(zt[1]-Gt[1],Gt[3],Gt[2],zt[3],zt[2],zt[0]-Gt[0]),Gt.point=[0,0];var Cr=Qr(Pt[0].v[0],Pt[2].v[0],Pt[1].v[0]),Nr=Qr(Pt[0].v[0],Pt[1].v[0],Pt[2].v[0]),Hr=T-Cr;Pt[2].point[1]=0,Pt[0].point[0]=-(Pt[1].point[0]=Pt[0].v[0]/2);var sn=[Pt[2].point[0]=Pt[0].point[0]+Pt[2].v[0]*a(Cr),2*(Pt[0].point[1]=Pt[1].point[1]=Pt[2].v[0]*m(Cr))];function bn(Vn,Yn){var va=m(Yn),Va=a(Yn),Si=new Array(3),yi;for(yi=0;yi<3;++yi){var Mi=Pt[yi];if(Si[yi]=Br(Yn-Mi[1],Mi[3],Mi[2],Va,va,Vn-Mi[0]),!Si[yi][0])return Mi.point;Si[yi][1]=Ot(Si[yi][1]-Mi.v[1])}var go=sn.slice();for(yi=0;yi<3;++yi){var jo=yi==2?0:yi+1,Do=Qr(Pt[yi].v[0],Si[yi][0],Si[jo][0]);Si[yi][1]<0&&(Do=-Do),yi?yi==1?(Do=Nr-Do,go[0]-=Si[yi][0]*a(Do),go[1]-=Si[yi][0]*m(Do)):(Do=Hr-Do,go[0]+=Si[yi][0]*a(Do),go[1]+=Si[yi][0]*m(Do)):(go[0]+=Si[yi][0]*a(Do),go[1]-=Si[yi][0]*m(Do))}return go[0]/=3,go[1]/=3,go}return bn}function ot(nt){return nt[0]*=x,nt[1]*=x,nt}function De(){return Ee([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function Ee(nt,ct,Tt){var Pt=w.geoCentroid({type:"MultiPoint",coordinates:[nt,ct,Tt]}),Gt=[-Pt[0],-Pt[1]],zt=w.geoRotation(Gt),Kt=$e(ot(zt(nt)),ot(zt(ct)),ot(zt(Tt)));Kt.invert=Ve(Kt);var Cr=w.geoProjection(Kt).rotate(Gt),Nr=Cr.center;return delete Cr.rotate,Cr.center=function(Hr){return arguments.length?Nr(zt(Hr)):zt.invert(Nr())},Cr.clipAngle(90)}function Ae(nt,ct){var Tt=U(1-m(ct));return[2/y*nt*Tt,y*(1-Tt)]}Ae.invert=function(nt,ct){var Tt=(Tt=ct/y-1)*Tt;return[Tt>0?nt*U(T/Tt)/2:0,D(1-Tt)]};function Ie(){return w.geoProjection(Ae).scale(95.6464).center([0,30])}function tt(nt){var ct=E(nt);function Tt(Pt,Gt){return[Pt,(Pt?Pt/m(Pt):1)*(m(Gt)*a(Pt)-ct*a(Gt))]}return Tt.invert=ct?function(Pt,Gt){Pt&&(Gt*=m(Pt)/Pt);var zt=a(Pt);return[Pt,2*r(U(zt*zt+ct*ct-Gt*Gt)-zt,ct-Gt)]}:function(Pt,Gt){return[Pt,D(Pt?Gt*E(Pt)/Pt:Gt)]},Tt}function st(){return wt(tt).scale(249.828).clipAngle(90)}var Bt=U(3);function Ft(nt,ct){return[Bt*nt*(2*a(2*ct/3)-1)/y,Bt*y*m(ct/3)]}Ft.invert=function(nt,ct){var Tt=3*D(ct/(Bt*y));return[y*nt/(Bt*(2*a(2*Tt/3)-1)),Tt]};function Wt(){return w.geoProjection(Ft).scale(156.19)}function lr(nt){var ct=a(nt);function Tt(Pt,Gt){return[Pt*ct,m(Gt)/ct]}return Tt.invert=function(Pt,Gt){return[Pt/ct,D(Gt*ct)]},Tt}function Rr(){return wt(lr).parallel(38.58).scale(195.044)}function Mr(nt){var ct=a(nt);function Tt(Pt,Gt){return[Pt*ct,(1+ct)*E(Gt/2)]}return Tt.invert=function(Pt,Gt){return[Pt/ct,t(Gt/(1+ct))*2]},Tt}function Sr(){return wt(Mr).scale(124.75)}function Kr(nt,ct){var Tt=U(8/(3*T));return[Tt*nt*(1-P(ct)/T),Tt*ct]}Kr.invert=function(nt,ct){var Tt=U(8/(3*T)),Pt=ct/Tt;return[nt/(Tt*(1-P(Pt)/T)),Pt]};function Hn(){return w.geoProjection(Kr).scale(165.664)}function ga(nt,ct){var Tt=U(4-3*m(P(ct)));return[2/U(6*T)*nt*Tt,g(ct)*U(2*T/3)*(2-Tt)]}ga.invert=function(nt,ct){var Tt=2-P(ct)/U(2*T/3);return[nt*U(6*T)/(2*Tt),g(ct)*D((4-Tt*Tt)/3)]};function ua(){return w.geoProjection(ga).scale(165.664)}function Ta(nt,ct){var Tt=U(T*(4+T));return[2/Tt*nt*(1+U(1-4*ct*ct/(T*T))),4/Tt*ct]}Ta.invert=function(nt,ct){var Tt=U(T*(4+T))/2;return[nt*Tt/(1+U(1-ct*ct*(4+T)/(4*T))),ct*Tt/2]};function Aa(){return w.geoProjection(Ta).scale(180.739)}function ia(nt,ct){var Tt=(2+M)*m(ct);ct/=2;for(var Pt=0,Gt=1/0;Pt<10&&P(Gt)>c;Pt++){var zt=a(ct);ct-=Gt=(ct+m(ct)*(zt+2)-Tt)/(2*zt*(1+zt))}return[2/U(T*(4+T))*nt*(1+a(ct)),2*U(T/(4+T))*m(ct)]}ia.invert=function(nt,ct){var Tt=ct*U((4+T)/T)/2,Pt=D(Tt),Gt=a(Pt);return[nt/(2/U(T*(4+T))*(1+Gt)),D((Pt+Tt*(Gt+2))/(2+M))]};function $a(){return w.geoProjection(ia).scale(180.739)}function ci(nt,ct){return[nt*(1+a(ct))/U(2+T),2*ct/U(2+T)]}ci.invert=function(nt,ct){var Tt=U(2+T),Pt=ct*Tt/2;return[Tt*nt/(1+a(Pt)),Pt]};function _r(){return w.geoProjection(ci).scale(173.044)}function Qt(nt,ct){for(var Tt=(1+M)*m(ct),Pt=0,Gt=1/0;Pt<10&&P(Gt)>c;Pt++)ct-=Gt=(ct+m(ct)-Tt)/(1+a(ct));return Tt=U(2+T),[nt*(1+a(ct))/Tt,2*ct/Tt]}Qt.invert=function(nt,ct){var Tt=1+M,Pt=U(Tt/2);return[nt*2*Pt/(1+a(ct*=Pt)),D((ct+m(ct))/Tt)]};function yr(){return w.geoProjection(Qt).scale(173.044)}var br=3+2*A;function an(nt,ct){var Tt=m(nt/=2),Pt=a(nt),Gt=U(a(ct)),zt=a(ct/=2),Kt=m(ct)/(zt+A*Pt*Gt),Cr=U(2/(1+Kt*Kt)),Nr=U((A*zt+(Pt+Tt)*Gt)/(A*zt+(Pt-Tt)*Gt));return[br*(Cr*(Nr-1/Nr)-2*s(Nr)),br*(Cr*Kt*(Nr+1/Nr)-2*t(Kt))]}an.invert=function(nt,ct){if(!(zt=ie.invert(nt/1.2,ct*1.065)))return null;var Tt=zt[0],Pt=zt[1],Gt=20,zt;nt/=br,ct/=br;do{var Kt=Tt/2,Cr=Pt/2,Nr=m(Kt),Hr=a(Kt),sn=m(Cr),bn=a(Cr),Vn=a(Pt),Yn=U(Vn),va=sn/(bn+A*Hr*Yn),Va=va*va,Si=U(2/(1+Va)),yi=A*bn+(Hr+Nr)*Yn,Mi=A*bn+(Hr-Nr)*Yn,go=yi/Mi,jo=U(go),Do=jo-1/jo,us=jo+1/jo,sl=Si*Do-2*s(jo)-nt,ll=Si*va*us-2*t(va)-ct,Bs=sn&&b*Yn*Nr*Va/sn,vl=(A*Hr*bn+Yn)/(2*(bn+A*Hr*Yn)*(bn+A*Hr*Yn)*Yn),Eu=-.5*va*Si*Si*Si,vu=Eu*Bs,Us=Eu*vl,qs=(qs=2*bn+A*Yn*(Hr-Nr))*qs*jo,Hu=(A*Hr*bn*Yn+Vn)/qs,yc=-(A*Nr*sn)/(Yn*qs),Zc=Do*vu-2*Hu/jo+Si*(Hu+Hu/go),Te=Do*Us-2*yc/jo+Si*(yc+yc/go),He=va*us*vu-2*Bs/(1+Va)+Si*us*Bs+Si*va*(Hu-Hu/go),ft=va*us*Us-2*vl/(1+Va)+Si*us*vl+Si*va*(yc-yc/go),Lt=Te*He-ft*Zc;if(!Lt)break;var Dt=(ll*Te-sl*ft)/Lt,qt=(sl*He-ll*Zc)/Lt;Tt-=Dt,Pt=o(-M,u(M,Pt-qt))}while((P(Dt)>c||P(qt)>c)&&--Gt>0);return P(P(Pt)-M)<c?[0,Pt]:Gt&&[Tt,Pt]};function wn(){return w.geoProjection(an).scale(62.5271)}var Ln=a(35*x);function Bn(nt,ct){var Tt=E(ct/2);return[nt*Ln*U(1-Tt*Tt),(1+Ln)*Tt]}Bn.invert=function(nt,ct){var Tt=ct/(1+Ln);return[nt&&nt/(Ln*U(1-Tt*Tt)),2*t(Tt)]};function xa(){return w.geoProjection(Bn).scale(137.152)}function za(nt,ct){var Tt=ct/2,Pt=a(Tt);return[2*nt/y*a(ct)*Pt*Pt,y*E(Tt)]}za.invert=function(nt,ct){var Tt=t(ct/y),Pt=a(Tt),Gt=2*Tt;return[nt*y/2/(a(Gt)*Pt*Pt),Gt]};function Ia(){return w.geoProjection(za).scale(135.264)}function Ba(nt){var ct=1-nt,Tt=zt(T,0)[0]-zt(-T,0)[0],Pt=zt(0,M)[1]-zt(0,-M)[1],Gt=U(2*Pt/Tt);function zt(Nr,Hr){var sn=a(Hr),bn=m(Hr);return[sn/(ct+nt*sn)*Nr,ct*Hr+nt*bn]}function Kt(Nr,Hr){var sn=zt(Nr,Hr);return[sn[0]*Gt,sn[1]/Gt]}function Cr(Nr){return Kt(0,Nr)[1]}return Kt.invert=function(Nr,Hr){var sn=Xe(Cr,Hr),bn=Nr/Gt*(nt+ct/a(sn));return[bn,sn]},Kt}function Ka(){var nt=.5,ct=w.geoProjectionMutator(Ba),Tt=ct(nt);return Tt.alpha=function(Pt){return arguments.length?ct(nt=+Pt):nt},Tt.scale(168.725)}function fa(nt){return[nt[0]/2,D(E(nt[1]/2*x))*p]}function Bi(nt){return[nt[0]*2,2*t(m(nt[1]*x))*p]}function Yi(nt){nt==null&&(nt=w.geoOrthographic);var ct=nt(),Tt=w.geoEquirectangular().scale(p).precision(0).clipAngle(null).translate([0,0]);function Pt(zt){return ct(fa(zt))}ct.invert&&(Pt.invert=function(zt){return Bi(ct.invert(zt))}),Pt.stream=function(zt){var Kt=ct.stream(zt),Cr=Tt.stream({point:function(Nr,Hr){Kt.point(Nr/2,D(E(-Hr/2*x))*p)},lineStart:function(){Kt.lineStart()},lineEnd:function(){Kt.lineEnd()},polygonStart:function(){Kt.polygonStart()},polygonEnd:function(){Kt.polygonEnd()}});return Cr.sphere=Kt.sphere,Cr};function Gt(zt){Pt[zt]=function(){return arguments.length?(ct[zt].apply(ct,arguments),Pt):ct[zt]()}}return Pt.rotate=function(zt){return arguments.length?(Tt.rotate(zt),Pt):Tt.rotate()},Pt.center=function(zt){return arguments.length?(ct.center(fa(zt)),Pt):Bi(ct.center())},Gt("angle"),Gt("clipAngle"),Gt("clipExtent"),Gt("fitExtent"),Gt("fitHeight"),Gt("fitSize"),Gt("fitWidth"),Gt("scale"),Gt("translate"),Gt("precision"),Pt.scale(249.5)}function Ht(nt,ct){var Tt=2*T/ct,Pt=nt*nt;function Gt(zt,Kt){var Cr=w.geoAzimuthalEquidistantRaw(zt,Kt),Nr=Cr[0],Hr=Cr[1],sn=Nr*Nr+Hr*Hr;if(sn>Pt){var bn=U(sn),Vn=r(Hr,Nr),Yn=Tt*h(Vn/Tt),va=Vn-Yn,Va=nt*a(va),Si=(nt*m(va)-va*m(Va))/(M-Va),yi=kt(va,Si),Mi=(T-nt)/qr(yi,Va,T);Nr=bn;var go=50,jo;do Nr-=jo=(nt+qr(yi,Va,Nr)*Mi-bn)/(yi(Nr)*Mi);while(P(jo)>c&&--go>0);Hr=va*m(Nr),Nr<M&&(Hr-=Si*(Nr-M));var Do=m(Yn),us=a(Yn);Cr[0]=Nr*us-Hr*Do,Cr[1]=Nr*Do+Hr*us}return Cr}return Gt.invert=function(zt,Kt){var Cr=zt*zt+Kt*Kt;if(Cr>Pt){var Nr=U(Cr),Hr=r(Kt,zt),sn=Tt*h(Hr/Tt),bn=Hr-sn;zt=Nr*a(bn),Kt=Nr*m(bn);for(var Vn=zt-M,Yn=m(zt),va=Kt/Yn,Va=zt<M?1/0:0,Si=10;;){var yi=nt*m(va),Mi=nt*a(va),go=m(Mi),jo=M-Mi,Do=(yi-va*go)/jo,us=kt(va,Do);if(P(Va)<_||!--Si)break;va-=Va=(va*Yn-Do*Vn-Kt)/(Yn-Vn*2*(jo*(Mi+va*yi*a(Mi)-go)-yi*(yi-va*go))/(jo*jo))}Nr=nt+qr(us,Mi,zt)*(T-nt)/qr(us,Mi,T),Hr=sn+va,zt=Nr*a(Hr),Kt=Nr*m(Hr)}return w.geoAzimuthalEquidistantRaw.invert(zt,Kt)},Gt}function kt(nt,ct){return function(Tt){var Pt=nt*a(Tt);return Tt<M&&(Pt-=ct),U(1+Pt*Pt)}}function qr(nt,ct,Tt){for(var Pt=50,Gt=(Tt-ct)/Pt,zt=nt(ct)+nt(Tt),Kt=1,Cr=ct;Kt<Pt;++Kt)zt+=2*nt(Cr+=Gt);return zt*.5*Gt}function en(){var nt=6,ct=30*x,Tt=a(ct),Pt=m(ct),Gt=w.geoProjectionMutator(Ht),zt=Gt(ct,nt),Kt=zt.stream,Cr=.01,Nr=-a(Cr*x),Hr=m(Cr*x);return zt.radius=function(sn){return arguments.length?(Tt=a(ct=sn*x),Pt=m(ct),Gt(ct,nt)):ct*p},zt.lobes=function(sn){return arguments.length?Gt(ct,nt=+sn):nt},zt.stream=function(sn){var bn=zt.rotate(),Vn=Kt(sn),Yn=(zt.rotate([0,0]),Kt(sn));return zt.rotate(bn),Vn.sphere=function(){Yn.polygonStart(),Yn.lineStart();for(var va=0,Va=2*T/nt,Si=0;va<nt;++va,Si-=Va)Yn.point(r(Hr*a(Si),Nr)*p,D(Hr*m(Si))*p),Yn.point(r(Pt*a(Si-Va/2),Tt)*p,D(Pt*m(Si-Va/2))*p);Yn.lineEnd(),Yn.polygonEnd()},Vn},zt.rotate([90,-40]).scale(91.7095).clipAngle(180-.001)}function rn(nt,ct,Tt,Pt,Gt,zt,Kt,Cr){arguments.length<8&&(Cr=0);function Nr(Hr,sn){if(!sn)return[nt*Hr/T,0];var bn=sn*sn,Vn=nt+bn*(ct+bn*(Tt+bn*Pt)),Yn=sn*(Gt-1+bn*(zt-Cr+bn*Kt)),va=(Vn*Vn+Yn*Yn)/(2*Yn),Va=Hr*D(Vn/va)/T;return[va*m(Va),sn*(1+bn*Cr)+va*(1-a(Va))]}return Nr.invert=function(Hr,sn){var bn=T*Hr/nt,Vn=sn,Yn,va,Va=50;do{var Si=Vn*Vn,yi=nt+Si*(ct+Si*(Tt+Si*Pt)),Mi=Vn*(Gt-1+Si*(zt-Cr+Si*Kt)),go=yi*yi+Mi*Mi,jo=2*Mi,Do=go/jo,us=Do*Do,sl=D(yi/Do)/T,ll=bn*sl,Bs=yi*yi,vl=(2*ct+Si*(4*Tt+Si*6*Pt))*Vn,Eu=Gt+Si*(3*zt+Si*5*Kt),vu=2*(yi*vl+Mi*(Eu-1)),Us=2*(Eu-1),qs=(vu*jo-go*Us)/(jo*jo),Hu=a(ll),yc=m(ll),Zc=Do*Hu,Te=Do*yc,He=bn/T*(1/U(1-Bs/us))*(vl*Do-yi*qs)/us,ft=Te-Hr,Lt=Vn*(1+Si*Cr)+Do-Zc-sn,Dt=qs*yc+Zc*He,qt=Zc*sl,dr=1+qs-(qs*Hu-Te*He),hr=Te*sl,Pr=Dt*hr-dr*qt;if(!Pr)break;bn-=Yn=(Lt*Dt-ft*dr)/Pr,Vn-=va=(ft*hr-Lt*qt)/Pr}while((P(Yn)>c||P(va)>c)&&--Va>0);return[bn,Vn]},Nr}var Wr=rn(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function tn(){return w.geoProjection(Wr).scale(149.995)}var Tn=rn(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function dn(){return w.geoProjection(Tn).scale(153.93)}var It=rn(5/6*T,-.62636,-.0344,0,1.3493,-.05524,0,.045);function xr(){return w.geoProjection(It).scale(130.945)}function Yr(nt,ct){var Tt=nt*nt,Pt=ct*ct;return[nt*(1-.162388*Pt)*(.87-952426e-9*Tt*Tt),ct*(1+Pt/12)]}Yr.invert=function(nt,ct){var Tt=nt,Pt=ct,Gt=50,zt;do{var Kt=Pt*Pt;Pt-=zt=(Pt*(1+Kt/12)-ct)/(1+Kt/4)}while(P(zt)>c&&--Gt>0);Gt=50,nt/=1-.162388*Kt;do{var Cr=(Cr=Tt*Tt)*Cr;Tt-=zt=(Tt*(.87-952426e-9*Cr)-nt)/(.87-.00476213*Cr)}while(P(zt)>c&&--Gt>0);return[Tt,Pt]};function An(){return w.geoProjection(Yr).scale(131.747)}var Zn=rn(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function sa(){return w.geoProjection(Zn).scale(131.087)}function oa(nt){var ct=nt(M,0)[0]-nt(-M,0)[0];function Tt(Pt,Gt){var zt=Pt>0?-.5:.5,Kt=nt(Pt+zt*T,Gt);return Kt[0]-=zt*ct,Kt}return nt.invert&&(Tt.invert=function(Pt,Gt){var zt=Pt>0?-.5:.5,Kt=nt.invert(Pt+zt*ct,Gt),Cr=Kt[0]-zt*T;return Cr<-T?Cr+=2*T:Cr>T&&(Cr-=2*T),Kt[0]=Cr,Kt}),Tt}function Sn(nt,ct){var Tt=g(nt),Pt=g(ct),Gt=a(ct),zt=a(nt)*Gt,Kt=m(nt)*Gt,Cr=m(Pt*ct);nt=P(r(Kt,Cr)),ct=D(zt),P(nt-M)>c&&(nt%=M);var Nr=Kn(nt>T/4?M-nt:nt,ct);return nt>T/4&&(Cr=Nr[0],Nr[0]=-Nr[1],Nr[1]=-Cr),Nr[0]*=Tt,Nr[1]*=-Pt,Nr}Sn.invert=function(nt,ct){P(nt)>1&&(nt=g(nt)*2-nt),P(ct)>1&&(ct=g(ct)*2-ct);var Tt=g(nt),Pt=g(ct),Gt=-Tt*nt,zt=-Pt*ct,Kt=zt/Gt<1,Cr=Ui(Kt?zt:Gt,Kt?Gt:zt),Nr=Cr[0],Hr=Cr[1],sn=a(Hr);return Kt&&(Nr=-M-Nr),[Tt*(r(m(Nr)*sn,-m(Hr))+T),Pt*D(a(Nr)*sn)]};function Kn(nt,ct){if(ct===M)return[0,0];var Tt=m(ct),Pt=Tt*Tt,Gt=Pt*Pt,zt=1+Gt,Kt=1+3*Gt,Cr=1-Gt,Nr=D(1/U(zt)),Hr=Cr+Pt*zt*Nr,sn=(1-Tt)/Hr,bn=U(sn),Vn=sn*zt,Yn=U(Vn),va=bn*Cr,Va,Si;if(nt===0)return[0,-(va+Pt*Yn)];var yi=a(ct),Mi=1/yi,go=2*Tt*yi,jo=(-3*Pt+Nr*Kt)*go,Do=(-Hr*yi-(1-Tt)*jo)/(Hr*Hr),us=.5*Do/bn,sl=Cr*us-2*Pt*bn*go,ll=Pt*zt*Do+sn*Kt*go,Bs=-Mi*go,vl=-Mi*ll,Eu=-2*Mi*sl,vu=4*nt/T,Us;if(nt>.222*T||ct<T/4&&nt>.175*T){if(Va=(va+Pt*U(Vn*(1+Gt)-va*va))/(1+Gt),nt>T/4)return[Va,Va];var qs=Va,Hu=.5*Va;Va=.5*(Hu+qs),Si=50;do{var yc=U(Vn-Va*Va),Zc=Va*(Eu+Bs*yc)+vl*D(Va/Yn)-vu;if(!Zc)break;Zc<0?Hu=Va:qs=Va,Va=.5*(Hu+qs)}while(P(qs-Hu)>c&&--Si>0)}else{Va=c,Si=25;do{var Te=Va*Va,He=U(Vn-Te),ft=Eu+Bs*He,Lt=Va*ft+vl*D(Va/Yn)-vu,Dt=ft+(vl-Bs*Te)/He;Va-=Us=He?Lt/Dt:0}while(P(Us)>c&&--Si>0)}return[Va,-va-Pt*U(Vn-Va*Va)]}function Ui(nt,ct){for(var Tt=0,Pt=1,Gt=.5,zt=50;;){var Kt=Gt*Gt,Cr=U(Gt),Nr=D(1/U(1+Kt)),Hr=1-Kt+Gt*(1+Kt)*Nr,sn=(1-Cr)/Hr,bn=U(sn),Vn=sn*(1+Kt),Yn=bn*(1-Kt),va=Vn-nt*nt,Va=U(va),Si=ct+Yn+Gt*Va;if(P(Pt-Tt)<_||--zt===0||Si===0)break;Si>0?Tt=Gt:Pt=Gt,Gt=.5*(Tt+Pt)}if(!zt)return null;var yi=D(Cr),Mi=a(yi),go=1/Mi,jo=2*Cr*Mi,Do=(-3*Gt+Nr*(1+3*Kt))*jo,us=(-Hr*Mi-(1-Cr)*Do)/(Hr*Hr),sl=.5*us/bn,ll=(1-Kt)*sl-2*Gt*bn*jo,Bs=-2*go*ll,vl=-go*jo,Eu=-go*(Gt*(1+Kt)*us+sn*(1+3*Kt)*jo);return[T/4*(nt*(Bs+vl*Va)+Eu*D(nt/U(Vn))),yi]}function Za(){return w.geoProjection(oa(Sn)).scale(239.75)}function Ki(nt,ct,Tt){var Pt,Gt,zt;return nt?(Pt=ho(nt,Tt),ct?(Gt=ho(ct,1-Tt),zt=Gt[1]*Gt[1]+Tt*Pt[0]*Pt[0]*Gt[0]*Gt[0],[[Pt[0]*Gt[2]/zt,Pt[1]*Pt[2]*Gt[0]*Gt[1]/zt],[Pt[1]*Gt[1]/zt,-Pt[0]*Pt[2]*Gt[0]*Gt[2]/zt],[Pt[2]*Gt[1]*Gt[2]/zt,-Tt*Pt[0]*Pt[1]*Gt[0]/zt]]):[[Pt[0],0],[Pt[1],0],[Pt[2],0]]):(Gt=ho(ct,1-Tt),[[0,Gt[0]/Gt[1]],[1/Gt[1],0],[Gt[2]/Gt[1],0]])}function ho(nt,ct){var Tt,Pt,Gt,zt,Kt;if(ct<c)return zt=m(nt),Pt=a(nt),Tt=ct*(nt-zt*Pt)/4,[zt-Tt*Pt,Pt+Tt*zt,1-ct*zt*zt/2,nt-Tt];if(ct>=1-c)return Tt=(1-ct)/4,Pt=z(nt),zt=V(nt),Gt=1/Pt,Kt=Pt*q(nt),[zt+Tt*(Kt-nt)/(Pt*Pt),Gt-Tt*zt*Gt*(Kt-nt),Gt+Tt*zt*Gt*(Kt+nt),2*t(l(nt))-M+Tt*(Kt-nt)/Pt];var Cr=[1,0,0,0,0,0,0,0,0],Nr=[U(ct),0,0,0,0,0,0,0,0],Hr=0;for(Pt=U(1-ct),Kt=1;P(Nr[Hr]/Cr[Hr])>c&&Hr<8;)Tt=Cr[Hr++],Nr[Hr]=(Tt-Pt)/2,Cr[Hr]=(Tt+Pt)/2,Pt=U(Tt*Pt),Kt*=2;Gt=Kt*Cr[Hr]*nt;do zt=Nr[Hr]*m(Pt=Gt)/Cr[Hr],Gt=(D(zt)+Gt)/2;while(--Hr);return[m(Gt),zt=a(Gt),zt/a(Gt-Pt),Gt]}function Co(nt,ct,Tt){var Pt=P(nt),Gt=P(ct),zt=q(Gt);if(Pt){var Kt=1/m(Pt),Cr=1/(E(Pt)*E(Pt)),Nr=-(Cr+Tt*(zt*zt*Kt*Kt)-1+Tt),Hr=(Tt-1)*Cr,sn=(-Nr+U(Nr*Nr-4*Hr))/2;return[So(t(1/U(sn)),Tt)*g(nt),So(t(U((sn/Cr-1)/Tt)),1-Tt)*g(ct)]}return[0,So(t(zt),1-Tt)*g(ct)]}function So(nt,ct){if(!ct)return nt;if(ct===1)return s(E(nt/2+k));for(var Tt=1,Pt=U(1-ct),Gt=U(ct),zt=0;P(Gt)>c;zt++){if(nt%T){var Kt=t(Pt*E(nt)/Tt);Kt<0&&(Kt+=T),nt+=Kt+~~(nt/T)*T}else nt+=nt;Gt=(Tt+Pt)/2,Pt=U(Tt*Pt),Gt=((Tt=Gt)-Pt)/2}return nt/(d(2,zt)*Tt)}function Vo(nt,ct){var Tt=(A-1)/(A+1),Pt=U(1-Tt*Tt),Gt=So(M,Pt*Pt),zt=-1,Kt=s(E(T/4+P(ct)/2)),Cr=l(zt*Kt)/U(Tt),Nr=Oi(Cr*a(zt*nt),Cr*m(zt*nt)),Hr=Co(Nr[0],Nr[1],Pt*Pt);return[-Hr[1],(ct>=0?1:-1)*(.5*Gt-Hr[0])]}function Oi(nt,ct){var Tt=nt*nt,Pt=ct+1,Gt=1-Tt-ct*ct;return[.5*((nt>=0?M:-M)-r(Gt,2*nt)),-.25*s(Gt*Gt+4*Tt)+.5*s(Pt*Pt+Tt)]}function ps(nt,ct){var Tt=ct[0]*ct[0]+ct[1]*ct[1];return[(nt[0]*ct[0]+nt[1]*ct[1])/Tt,(nt[1]*ct[0]-nt[0]*ct[1])/Tt]}Vo.invert=function(nt,ct){var Tt=(A-1)/(A+1),Pt=U(1-Tt*Tt),Gt=So(M,Pt*Pt),zt=-1,Kt=Ki(.5*Gt-ct,-nt,Pt*Pt),Cr=ps(Kt[0],Kt[1]),Nr=r(Cr[1],Cr[0])/zt;return[Nr,2*t(l(.5/zt*s(Tt*Cr[0]*Cr[0]+Tt*Cr[1]*Cr[1])))-M]};function as(){return w.geoProjection(oa(Vo)).scale(151.496)}function rl(nt){var ct=m(nt),Tt=a(nt),Pt=As(nt);Pt.invert=As(-nt);function Gt(zt,Kt){var Cr=Pt(zt,Kt);zt=Cr[0],Kt=Cr[1];var Nr=m(Kt),Hr=a(Kt),sn=a(zt),bn=B(ct*Nr+Tt*Hr*sn),Vn=m(bn),Yn=P(Vn)>c?bn/Vn:1;return[Yn*Tt*m(zt),(P(zt)>M?Yn:-Yn)*(ct*Hr-Tt*Nr*sn)]}return Gt.invert=function(zt,Kt){var Cr=U(zt*zt+Kt*Kt),Nr=-m(Cr),Hr=a(Cr),sn=Cr*Hr,bn=-Kt*Nr,Vn=Cr*ct,Yn=U(sn*sn+bn*bn-Vn*Vn),va=r(sn*Vn+bn*Yn,bn*Vn-sn*Yn),Va=(Cr>M?-1:1)*r(zt*Nr,Cr*a(va)*Hr+Kt*m(va)*Nr);return Pt.invert(Va,va)},Gt}function As(nt){var ct=m(nt),Tt=a(nt);return function(Pt,Gt){var zt=a(Gt),Kt=a(Pt)*zt,Cr=m(Pt)*zt,Nr=m(Gt);return[r(Cr,Kt*Tt-Nr*ct),D(Nr*Tt+Kt*ct)]}}function hs(){var nt=0,ct=w.geoProjectionMutator(rl),Tt=ct(nt),Pt=Tt.rotate,Gt=Tt.stream,zt=w.geoCircle();return Tt.parallel=function(Kt){if(!arguments.length)return nt*p;var Cr=Tt.rotate();return ct(nt=Kt*x).rotate(Cr)},Tt.rotate=function(Kt){return arguments.length?(Pt.call(Tt,[Kt[0],Kt[1]-nt*p]),zt.center([-Kt[0],-Kt[1]]),Tt):(Kt=Pt.call(Tt),Kt[1]+=nt*p,Kt)},Tt.stream=function(Kt){return Kt=Gt(Kt),Kt.sphere=function(){Kt.polygonStart();var Cr=.01,Nr=zt.radius(90-Cr)().coordinates[0],Hr=Nr.length-1,sn=-1,bn;for(Kt.lineStart();++sn<Hr;)Kt.point((bn=Nr[sn])[0],bn[1]);for(Kt.lineEnd(),Nr=zt.radius(90+Cr)().coordinates[0],Hr=Nr.length-1,Kt.lineStart();--sn>=0;)Kt.point((bn=Nr[sn])[0],bn[1]);Kt.lineEnd(),Kt.polygonEnd()},Kt},Tt.scale(79.4187).parallel(45).clipAngle(180-.001)}var ts=3,nl=D(1-1/ts)*p,Qs=lr(0);function _l(nt){var ct=nl*x,Tt=Ae(T,ct)[0]-Ae(-T,ct)[0],Pt=Qs(0,ct)[1],Gt=Ae(0,ct)[1],zt=y-Gt,Kt=f/nt,Cr=4/f,Nr=Pt+zt*zt*4/f;function Hr(sn,bn){var Vn,Yn=P(bn);if(Yn>ct){var va=u(nt-1,o(0,i((sn+T)/Kt)));sn+=T*(nt-1)/nt-va*Kt,Vn=Ae(sn,Yn),Vn[0]=Vn[0]*f/Tt-f*(nt-1)/(2*nt)+va*f/nt,Vn[1]=Pt+(Vn[1]-Gt)*4*zt/f,bn<0&&(Vn[1]=-Vn[1])}else Vn=Qs(sn,bn);return Vn[0]*=Cr,Vn[1]/=Nr,Vn}return Hr.invert=function(sn,bn){sn/=Cr,bn*=Nr;var Vn=P(bn);if(Vn>Pt){var Yn=u(nt-1,o(0,i((sn+T)/Kt)));sn=(sn+T*(nt-1)/nt-Yn*Kt)*Tt/f;var va=Ae.invert(sn,.25*(Vn-Pt)*f/zt+Gt);return va[0]-=T*(nt-1)/nt-Yn*Kt,bn<0&&(va[1]=-va[1]),va}return Qs.invert(sn,bn)},Hr}function Ss(nt,ct){return[nt,ct&1?90-c:nl]}function ls(nt,ct){return[nt,ct&1?-90+c:-nl]}function Oo(nt){return[nt[0]*(1-c),nt[1]]}function Es(nt){var ct=[].concat(C.range(-180,180+nt/2,nt).map(Ss),C.range(180,-180-nt/2,-nt).map(ls));return{type:"Polygon",coordinates:[nt===180?ct.map(Oo):ct]}}function xl(){var nt=4,ct=w.geoProjectionMutator(_l),Tt=ct(nt),Pt=Tt.stream;return Tt.lobes=function(Gt){return arguments.length?ct(nt=+Gt):nt},Tt.stream=function(Gt){var zt=Tt.rotate(),Kt=Pt(Gt),Cr=(Tt.rotate([0,0]),Pt(Gt));return Tt.rotate(zt),Kt.sphere=function(){w.geoStream(Es(180/nt),Cr)},Kt},Tt.scale(239.75)}function Ul(nt){var ct=1+nt,Tt=m(1/ct),Pt=D(Tt),Gt=2*U(T/(zt=T+4*Pt*ct)),zt,Kt=.5*Gt*(ct+U(nt*(2+nt))),Cr=nt*nt,Nr=ct*ct;function Hr(sn,bn){var Vn=1-m(bn),Yn,va;if(Vn&&Vn<2){var Va=M-bn,Si=25,yi;do{var Mi=m(Va),go=a(Va),jo=Pt+r(Mi,ct-go),Do=1+Nr-2*ct*go;Va-=yi=(Va-Cr*Pt-ct*Mi+Do*jo-.5*Vn*zt)/(2*ct*Mi*jo)}while(P(yi)>_&&--Si>0);Yn=Gt*U(Do),va=sn*jo/T}else Yn=Gt*(nt+Vn),va=sn*Pt/T;return[Yn*m(va),Kt-Yn*a(va)]}return Hr.invert=function(sn,bn){var Vn=sn*sn+(bn-=Kt)*bn,Yn=(1+Nr-Vn/(Gt*Gt))/(2*ct),va=B(Yn),Va=m(va),Si=Pt+r(Va,ct-Yn);return[D(sn/U(Vn))*T/Si,D(1-2*(va-Cr*Pt-ct*Va+(1+Nr-2*ct*Yn)*Si)/zt)]},Hr}function Hl(){var nt=1,ct=w.geoProjectionMutator(Ul),Tt=ct(nt);return Tt.ratio=function(Pt){return arguments.length?ct(nt=+Pt):nt},Tt.scale(167.774).center([0,18.67])}var Fs=.7109889596207567,Ni=.0528035274542;function wo(nt,ct){return ct>-Fs?(nt=ut(nt,ct),nt[1]+=Ni,nt):ht(nt,ct)}wo.invert=function(nt,ct){return ct>-Fs?ut.invert(nt,ct-Ni):ht.invert(nt,ct)};function ql(){return w.geoProjection(wo).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function Gs(nt,ct){return P(ct)>Fs?(nt=ut(nt,ct),nt[1]-=ct>0?Ni:-Ni,nt):ht(nt,ct)}Gs.invert=function(nt,ct){return P(ct)>Fs?ut.invert(nt,ct+(ct>0?Ni:-Ni)):ht.invert(nt,ct)};function Jo(){return w.geoProjection(Gs).scale(152.63)}function Gl(nt,ct,Tt,Pt){var Gt=U(4*T/(2*Tt+(1+nt-ct/2)*m(2*Tt)+(nt+ct)/2*m(4*Tt)+ct/2*m(6*Tt))),zt=U(Pt*m(Tt)*U((1+nt*a(2*Tt)+ct*a(4*Tt))/(1+nt+ct))),Kt=Tt*Nr(1);function Cr(bn){return U(1+nt*a(2*bn)+ct*a(4*bn))}function Nr(bn){var Vn=bn*Tt;return(2*Vn+(1+nt-ct/2)*m(2*Vn)+(nt+ct)/2*m(4*Vn)+ct/2*m(6*Vn))/Tt}function Hr(bn){return Cr(bn)*m(bn)}var sn=function(bn,Vn){var Yn=Tt*Xe(Nr,Kt*m(Vn)/Tt,Vn/T);isNaN(Yn)&&(Yn=Tt*g(Vn));var va=Gt*Cr(Yn);return[va*zt*bn/T*a(Yn),va/zt*m(Yn)]};return sn.invert=function(bn,Vn){var Yn=Xe(Hr,Vn*zt/Gt);return[bn*T/(a(Yn)*Gt*zt*Cr(Yn)),D(Tt*Nr(Yn/Tt)/Kt)]},Tt===0&&(Gt=U(Pt/T),sn=function(bn,Vn){return[bn*Gt,m(Vn)/Gt]},sn.invert=function(bn,Vn){return[bn/Gt,D(Vn*Gt)]}),sn}function al(){var nt=1,ct=0,Tt=45*x,Pt=2,Gt=w.geoProjectionMutator(Gl),zt=Gt(nt,ct,Tt,Pt);return zt.a=function(Kt){return arguments.length?Gt(nt=+Kt,ct,Tt,Pt):nt},zt.b=function(Kt){return arguments.length?Gt(nt,ct=+Kt,Tt,Pt):ct},zt.psiMax=function(Kt){return arguments.length?Gt(nt,ct,Tt=+Kt*x,Pt):Tt*p},zt.ratio=function(Kt){return arguments.length?Gt(nt,ct,Tt,Pt=+Kt):Pt},zt.scale(180.739)}function bl(nt,ct,Tt,Pt,Gt,zt,Kt,Cr,Nr,Hr,sn){if(sn.nanEncountered)return NaN;var bn,Vn,Yn,va,Va,Si,yi,Mi,go,jo;if(bn=Tt-ct,Vn=nt(ct+bn*.25),Yn=nt(Tt-bn*.25),isNaN(Vn)){sn.nanEncountered=!0;return}if(isNaN(Yn)){sn.nanEncountered=!0;return}return va=bn*(Pt+4*Vn+Gt)/12,Va=bn*(Gt+4*Yn+zt)/12,Si=va+Va,jo=(Si-Kt)/15,Hr>Nr?(sn.maxDepthCount++,Si+jo):Math.abs(jo)<Cr?Si+jo:(yi=ct+bn*.5,Mi=bl(nt,ct,yi,Pt,Vn,Gt,va,Cr*.5,Nr,Hr+1,sn),isNaN(Mi)?(sn.nanEncountered=!0,NaN):(go=bl(nt,yi,Tt,Gt,Yn,zt,Va,Cr*.5,Nr,Hr+1,sn),isNaN(go)?(sn.nanEncountered=!0,NaN):Mi+go))}function Iu(nt,ct,Tt,Pt,Gt){var zt={maxDepthCount:0,nanEncountered:!1};Gt===void 0&&(Gt=20);var Kt=nt(ct),Cr=nt(.5*(ct+Tt)),Nr=nt(Tt),Hr=(Kt+4*Cr+Nr)*(Tt-ct)/6,sn=bl(nt,ct,Tt,Kt,Cr,Nr,Hr,Pt,Gt,1,zt);return sn}function _o(nt,ct,Tt){function Pt(Yn){return nt+(1-nt)*d(1-d(Yn,ct),1/ct)}function Gt(Yn){return Iu(Pt,0,Yn,1e-4)}for(var zt=1/Gt(1),Kt=1e3,Cr=(1+1e-8)*zt,Nr=[],Hr=0;Hr<=Kt;Hr++)Nr.push(Gt(Hr/Kt)*Cr);function sn(Yn){var va=0,Va=Kt,Si=Kt>>1;do Nr[Si]>Yn?Va=Si:va=Si,Si=va+Va>>1;while(Si>va);var yi=Nr[Si+1]-Nr[Si];return yi&&(yi=(Yn-Nr[Si+1])/yi),(Si+1+yi)/Kt}var bn=2*sn(1)/T*zt/Tt,Vn=function(Yn,va){var Va=sn(P(m(va))),Si=Pt(Va)*Yn;return Va/=bn,[Si,va>=0?Va:-Va]};return Vn.invert=function(Yn,va){var Va;return va*=bn,P(va)<1&&(Va=g(va)*D(Gt(P(va))*zt)),[Yn/Pt(P(va)),Va]},Vn}function Ps(){var nt=0,ct=2.5,Tt=1.183136,Pt=w.geoProjectionMutator(_o),Gt=Pt(nt,ct,Tt);return Gt.alpha=function(zt){return arguments.length?Pt(nt=+zt,ct,Tt):nt},Gt.k=function(zt){return arguments.length?Pt(nt,ct=+zt,Tt):ct},Gt.gamma=function(zt){return arguments.length?Pt(nt,ct,Tt=+zt):Tt},Gt.scale(152.63)}function ms(nt,ct){return P(nt[0]-ct[0])<c&&P(nt[1]-ct[1])<c}function ru(nt,ct){for(var Tt=-1,Pt=nt.length,Gt=nt[0],zt,Kt,Cr,Nr=[];++Tt<Pt;){zt=nt[Tt],Kt=(zt[0]-Gt[0])/ct,Cr=(zt[1]-Gt[1])/ct;for(var Hr=0;Hr<ct;++Hr)Nr.push([Gt[0]+Hr*Kt,Gt[1]+Hr*Cr]);Gt=zt}return Nr.push(zt),Nr}function nu(nt){var ct=[],Tt,Pt,Gt,zt,Kt,Cr,Nr,Hr=nt[0].length;for(Nr=0;Nr<Hr;++Nr)Tt=nt[0][Nr],Pt=Tt[0][0],Gt=Tt[0][1],zt=Tt[1][1],Kt=Tt[2][0],Cr=Tt[2][1],ct.push(ru([[Pt+c,Gt+c],[Pt+c,zt-c],[Kt-c,zt-c],[Kt-c,Cr+c]],30));for(Nr=nt[1].length-1;Nr>=0;--Nr)Tt=nt[1][Nr],Pt=Tt[0][0],Gt=Tt[0][1],zt=Tt[1][1],Kt=Tt[2][0],Cr=Tt[2][1],ct.push(ru([[Kt-c,Cr-c],[Kt-c,zt+c],[Pt+c,zt+c],[Pt+c,Gt-c]],30));return{type:"Polygon",coordinates:[C.merge(ct)]}}function Zo(nt,ct,Tt){var Pt,Gt;function zt(Nr,Hr){for(var sn=Hr<0?-1:1,bn=ct[+(Hr<0)],Vn=0,Yn=bn.length-1;Vn<Yn&&Nr>bn[Vn][2][0];++Vn);var va=nt(Nr-bn[Vn][1][0],Hr);return va[0]+=nt(bn[Vn][1][0],sn*Hr>sn*bn[Vn][0][1]?bn[Vn][0][1]:Hr)[0],va}Tt?zt.invert=Tt(zt):nt.invert&&(zt.invert=function(Nr,Hr){for(var sn=Gt[+(Hr<0)],bn=ct[+(Hr<0)],Vn=0,Yn=sn.length;Vn<Yn;++Vn){var va=sn[Vn];if(va[0][0]<=Nr&&Nr<va[1][0]&&va[0][1]<=Hr&&Hr<va[1][1]){var Va=nt.invert(Nr-nt(bn[Vn][1][0],0)[0],Hr);return Va[0]+=bn[Vn][1][0],ms(zt(Va[0],Va[1]),[Nr,Hr])?Va:null}}});var Kt=w.geoProjection(zt),Cr=Kt.stream;return Kt.stream=function(Nr){var Hr=Kt.rotate(),sn=Cr(Nr),bn=(Kt.rotate([0,0]),Cr(Nr));return Kt.rotate(Hr),sn.sphere=function(){w.geoStream(Pt,bn)},sn},Kt.lobes=function(Nr){return arguments.length?(Pt=nu(Nr),ct=Nr.map(function(Hr){return Hr.map(function(sn){return[[sn[0][0]*x,sn[0][1]*x],[sn[1][0]*x,sn[1][1]*x],[sn[2][0]*x,sn[2][1]*x]]})}),Gt=ct.map(function(Hr){return Hr.map(function(sn){var bn=nt(sn[0][0],sn[0][1])[0],Vn=nt(sn[2][0],sn[2][1])[0],Yn=nt(sn[1][0],sn[0][1])[1],va=nt(sn[1][0],sn[1][1])[1],Va;return Yn>va&&(Va=Yn,Yn=va,va=Va),[[bn,Yn],[Vn,va]]})}),Kt):ct.map(function(Hr){return Hr.map(function(sn){return[[sn[0][0]*p,sn[0][1]*p],[sn[1][0]*p,sn[1][1]*p],[sn[2][0]*p,sn[2][1]*p]]})})},ct!=null&&Kt.lobes(ct),Kt}var _u=[[[[-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 Au(){return Zo(Ye,_u).scale(160.857)}var Ys=[[[[-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 Ol(){return Zo(Gs,Ys).scale(152.63)}var $l=[[[[-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 Ql(){return Zo(ut,$l).scale(169.529)}var ac=[[[[-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 Tf(){return Zo(ut,ac).scale(169.529).rotate([20,0])}var rf=[[[[-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 df(){return Zo(wo,rf,Ve).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var Zh=[[[[-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 zh(){return Zo(ht,Zh).scale(152.63).rotate([-20,0])}function zl(nt,ct){return[3/f*nt*U(T*T/3-ct*ct),ct]}zl.invert=function(nt,ct){return[f/3*nt/U(T*T/3-ct*ct),ct]};function Vc(){return w.geoProjection(zl).scale(158.837)}function $h(nt){function ct(Tt,Pt){if(P(P(Pt)-M)<c)return[0,Pt<0?-2:2];var Gt=m(Pt),zt=d((1+Gt)/(1-Gt),nt/2),Kt=.5*(zt+1/zt)+a(Tt*=nt);return[2*m(Tt)/Kt,(zt-1/zt)/Kt]}return ct.invert=function(Tt,Pt){var Gt=P(Pt);if(P(Gt-2)<c)return Tt?null:[0,g(Pt)*M];if(Gt>2)return null;Tt/=2,Pt/=2;var zt=Tt*Tt,Kt=Pt*Pt,Cr=2*Pt/(1+zt+Kt);return Cr=d((1+Cr)/(1-Cr),1/nt),[r(2*Tt,1-zt-Kt)/nt,D((Cr-1)/(Cr+1))]},ct}function pc(){var nt=.5,ct=w.geoProjectionMutator($h),Tt=ct(nt);return Tt.spacing=function(Pt){return arguments.length?ct(nt=+Pt):nt},Tt.scale(124.75)}var ic=T/A;function mc(nt,ct){return[nt*(1+U(a(ct)))/2,ct/(a(ct/2)*a(nt/6))]}mc.invert=function(nt,ct){var Tt=P(nt),Pt=P(ct),Gt=c,zt=M;Pt<ic?zt*=Pt/ic:Gt+=6*B(ic/Pt);for(var Kt=0;Kt<25;Kt++){var Cr=m(zt),Nr=U(a(zt)),Hr=m(zt/2),sn=a(zt/2),bn=m(Gt/6),Vn=a(Gt/6),Yn=.5*Gt*(1+Nr)-Tt,va=zt/(sn*Vn)-Pt,Va=Nr?-.25*Gt*Cr/Nr:0,Si=.5*(1+Nr),yi=(1+.5*zt*Hr/sn)/(sn*Vn),Mi=zt/sn*(bn/6)/(Vn*Vn),go=Va*Mi-yi*Si,jo=(Yn*Mi-va*Si)/go,Do=(va*Va-Yn*yi)/go;if(zt-=jo,Gt-=Do,P(jo)<c&&P(Do)<c)break}return[nt<0?-Gt:Gt,ct<0?-zt:zt]};function vf(){return w.geoProjection(mc).scale(97.2672)}function uu(nt,ct){var Tt=nt*nt,Pt=ct*ct;return[nt*(.975534+Pt*(-.119161+Tt*-.0143059+Pt*-.0547009)),ct*(1.00384+Tt*(.0802894+Pt*-.02855+Tt*199025e-9)+Pt*(.0998909+Pt*-.0491032))]}uu.invert=function(nt,ct){var Tt=g(nt)*T,Pt=ct/2,Gt=50;do{var zt=Tt*Tt,Kt=Pt*Pt,Cr=Tt*Pt,Nr=Tt*(.975534+Kt*(-.119161+zt*-.0143059+Kt*-.0547009))-nt,Hr=Pt*(1.00384+zt*(.0802894+Kt*-.02855+zt*199025e-9)+Kt*(.0998909+Kt*-.0491032))-ct,sn=.975534-Kt*(.119161+3*zt*.0143059+Kt*.0547009),bn=-Cr*(2*.119161+4*.0547009*Kt+2*.0143059*zt),Vn=Cr*(2*.0802894+4*199025e-9*zt+2*-.02855*Kt),Yn=1.00384+zt*(.0802894+199025e-9*zt)+Kt*(3*(.0998909-.02855*zt)-5*.0491032*Kt),va=bn*Vn-Yn*sn,Va=(Hr*bn-Nr*Yn)/va,Si=(Nr*Vn-Hr*sn)/va;Tt-=Va,Pt-=Si}while((P(Va)>c||P(Si)>c)&&--Gt>0);return Gt&&[Tt,Pt]};function oc(){return w.geoProjection(uu).scale(139.98)}function el(nt,ct){return[m(nt)/a(ct),E(ct)*a(nt)]}el.invert=function(nt,ct){var Tt=nt*nt,Pt=ct*ct,Gt=Pt+1,zt=Tt+Gt,Kt=nt?b*U((zt-U(zt*zt-4*Tt))/Tt):1/U(Gt);return[D(nt*Kt),g(ct)*B(Kt)]};function Xl(){return w.geoProjection(el).scale(144.049).clipAngle(90-.001)}function zf(nt){var ct=a(nt),Tt=E(k+nt/2);function Pt(Gt,zt){var Kt=zt-nt,Cr=P(Kt)<c?Gt*ct:P(Cr=k+zt/2)<c||P(P(Cr)-M)<c?0:Gt*Kt/s(E(Cr)/Tt);return[Cr,Kt]}return Pt.invert=function(Gt,zt){var Kt,Cr=zt+nt;return[P(zt)<c?Gt/ct:P(Kt=k+Cr/2)<c||P(P(Kt)-M)<c?0:Gt*s(E(Kt)/Tt)/zt,Cr]},Pt}function Lc(){return wt(zf).parallel(40).scale(158.837)}function $f(nt,ct){return[nt,1.25*s(E(k+.4*ct))]}$f.invert=function(nt,ct){return[nt,2.5*t(l(.8*ct))-.625*T]};function xu(){return w.geoProjection($f).scale(108.318)}function Wd(nt){var ct=nt.length-1;function Tt(Pt,Gt){for(var zt=a(Gt),Kt=2/(1+zt*a(Pt)),Cr=Kt*zt*m(Pt),Nr=Kt*m(Gt),Hr=ct,sn=nt[Hr],bn=sn[0],Vn=sn[1],Yn;--Hr>=0;)sn=nt[Hr],bn=sn[0]+Cr*(Yn=bn)-Nr*Vn,Vn=sn[1]+Cr*Vn+Nr*Yn;return bn=Cr*(Yn=bn)-Nr*Vn,Vn=Cr*Vn+Nr*Yn,[bn,Vn]}return Tt.invert=function(Pt,Gt){var zt=20,Kt=Pt,Cr=Gt;do{for(var Nr=ct,Hr=nt[Nr],sn=Hr[0],bn=Hr[1],Vn=0,Yn=0,va;--Nr>=0;)Hr=nt[Nr],Vn=sn+Kt*(va=Vn)-Cr*Yn,Yn=bn+Kt*Yn+Cr*va,sn=Hr[0]+Kt*(va=sn)-Cr*bn,bn=Hr[1]+Kt*bn+Cr*va;Vn=sn+Kt*(va=Vn)-Cr*Yn,Yn=bn+Kt*Yn+Cr*va,sn=Kt*(va=sn)-Cr*bn-Pt,bn=Kt*bn+Cr*va-Gt;var Va=Vn*Vn+Yn*Yn,Si,yi;Kt-=Si=(sn*Vn+bn*Yn)/Va,Cr-=yi=(bn*Vn-sn*Yn)/Va}while(P(Si)+P(yi)>c*c&&--zt>0);if(zt){var Mi=U(Kt*Kt+Cr*Cr),go=2*t(Mi*.5),jo=m(go);return[r(Kt*jo,Mi*a(go)),Mi?D(Cr*jo/Mi):0]}},Tt}var Zs=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],dv=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Ml=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],Ko=[[.9245,0],[0,0],[.01943,0]],ph=[[.721316,0],[0,0],[-.00881625,-.00617325]];function pf(){return sc(Zs,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function Yu(){return sc(dv,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function Kh(){return sc(Ml,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function Kf(){return sc(Ko,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function Ah(){return sc(ph,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function sc(nt,ct){var Tt=w.geoProjection(Wd(nt)).rotate(ct).clipAngle(90),Pt=w.geoRotation(ct),Gt=Tt.center;return delete Tt.rotate,Tt.center=function(zt){return arguments.length?Gt(Pt(zt)):Pt.invert(Gt())},Tt}var Ld=U(6),sd=U(7);function Sh(nt,ct){var Tt=D(7*m(ct)/(3*Ld));return[Ld*nt*(2*a(2*Tt/3)-1)/sd,9*m(Tt/3)/sd]}Sh.invert=function(nt,ct){var Tt=3*D(ct*sd/9);return[nt*sd/(Ld*(2*a(2*Tt/3)-1)),D(m(Tt)*3*Ld/7)]};function Jf(){return w.geoProjection(Sh).scale(164.859)}function Jh(nt,ct){for(var Tt=(1+b)*m(ct),Pt=ct,Gt=0,zt;Gt<25&&(Pt-=zt=(m(Pt/2)+m(Pt)-Tt)/(.5*a(Pt/2)+a(Pt)),!(P(zt)<c));Gt++);return[nt*(1+2*a(Pt)/a(Pt/2))/(3*A),2*U(3)*m(Pt/2)/U(2+A)]}Jh.invert=function(nt,ct){var Tt=ct*U(2+A)/(2*U(3)),Pt=2*D(Tt);return[3*A*nt/(1+2*a(Pt)/a(Pt/2)),D((Tt+m(Pt))/(1+b))]};function Qh(){return w.geoProjection(Jh).scale(188.209)}function mf(nt,ct){for(var Tt=U(6/(4+T)),Pt=(1+T/4)*m(ct),Gt=ct/2,zt=0,Kt;zt<25&&(Gt-=Kt=(Gt/2+m(Gt)-Pt)/(.5+a(Gt)),!(P(Kt)<c));zt++);return[Tt*(.5+a(Gt))*nt/1.5,Tt*Gt]}mf.invert=function(nt,ct){var Tt=U(6/(4+T)),Pt=ct/Tt;return P(P(Pt)-M)<c&&(Pt=Pt<0?-M:M),[1.5*nt/(Tt*(.5+a(Pt))),D((Pt/2+m(Pt))/(1+T/4))]};function ld(){return w.geoProjection(mf).scale(166.518)}function Nf(nt,ct){var Tt=ct*ct,Pt=Tt*Tt,Gt=Tt*Pt;return[nt*(.84719-.13063*Tt+Gt*Gt*(-.04515+.05494*Tt-.02326*Pt+.00331*Gt)),ct*(1.01183+Pt*Pt*(-.02625+.01926*Tt-.00396*Pt))]}Nf.invert=function(nt,ct){var Tt=ct,Pt=25,Gt,zt,Kt,Cr;do zt=Tt*Tt,Kt=zt*zt,Tt-=Gt=(Tt*(1.01183+Kt*Kt*(-.02625+.01926*zt-.00396*Kt))-ct)/(1.01183+Kt*Kt*(9*-.02625+11*.01926*zt+13*-.00396*Kt));while(P(Gt)>_&&--Pt>0);return zt=Tt*Tt,Kt=zt*zt,Cr=zt*Kt,[nt/(.84719-.13063*zt+Cr*Cr*(-.04515+.05494*zt-.02326*Kt+.00331*Cr)),Tt]};function Af(){return w.geoProjection(Nf).scale(175.295)}function lc(nt,ct){return[nt*(1+a(ct))/2,2*(ct-E(ct/2))]}lc.invert=function(nt,ct){for(var Tt=ct/2,Pt=0,Gt=1/0;Pt<10&&P(Gt)>c;++Pt){var zt=a(ct/2);ct-=Gt=(ct-E(ct/2)-Tt)/(1-.5/(zt*zt))}return[2*nt/(1+a(ct)),ct]};function lh(){return w.geoProjection(lc).scale(152.63)}var ed=[[[[-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 Kl(){return Zo(_e(1/0),ed).rotate([20,0]).scale(152.63)}function Nh(nt,ct){var Tt=m(ct),Pt=a(ct),Gt=g(nt);if(nt===0||P(ct)===M)return[0,ct];if(ct===0)return[nt,0];if(P(nt)===M)return[nt*Pt,M*Tt];var zt=T/(2*nt)-2*nt/T,Kt=2*ct/T,Cr=(1-Kt*Kt)/(Tt-Kt),Nr=zt*zt,Hr=Cr*Cr,sn=1+Nr/Hr,bn=1+Hr/Nr,Vn=(zt*Tt/Cr-zt/2)/sn,Yn=(Hr*Tt/Nr+Cr/2)/bn,va=Vn*Vn+Pt*Pt/sn,Va=Yn*Yn-(Hr*Tt*Tt/Nr+Cr*Tt-1)/bn;return[M*(Vn+U(va)*Gt),M*(Yn+U(Va<0?0:Va)*g(-ct*zt)*Gt)]}Nh.invert=function(nt,ct){nt/=M,ct/=M;var Tt=nt*nt,Pt=ct*ct,Gt=Tt+Pt,zt=T*T;return[nt?(Gt-1+U((1-Gt)*(1-Gt)+4*Tt))/(2*nt)*M:0,Xe(function(Kt){return Gt*(T*m(Kt)-2*Kt)*T+4*Kt*Kt*(ct-m(Kt))+2*T*Kt-zt*ct},0)]};function Yd(){return w.geoProjection(Nh).scale(127.267)}var ud=1.0148,Eh=.23185,cd=-.14499,Hc=.02406,fd=ud,Pu=5*Eh,Gc=7*cd,Qf=9*Hc,cu=1.790857183;function Ff(nt,ct){var Tt=ct*ct;return[nt,ct*(ud+Tt*Tt*(Eh+Tt*(cd+Hc*Tt)))]}Ff.invert=function(nt,ct){ct>cu?ct=cu:ct<-cu&&(ct=-cu);var Tt=ct,Pt;do{var Gt=Tt*Tt;Tt-=Pt=(Tt*(ud+Gt*Gt*(Eh+Gt*(cd+Hc*Gt)))-ct)/(fd+Gt*Gt*(Pu+Gt*(Gc+Qf*Gt)))}while(P(Pt)>c);return[nt,Tt]};function Sc(){return w.geoProjection(Ff).scale(139.319)}function Xc(nt,ct){if(P(ct)<c)return[nt,0];var Tt=E(ct),Pt=nt*m(ct);return[m(Pt)/Tt,ct+(1-a(Pt))/Tt]}Xc.invert=function(nt,ct){if(P(ct)<c)return[nt,0];var Tt=nt*nt+ct*ct,Pt=ct*.5,Gt=10,zt;do{var Kt=E(Pt),Cr=1/a(Pt),Nr=Tt-2*ct*Pt+Pt*Pt;Pt-=zt=(Kt*Nr+2*(Pt-ct))/(2+Nr*Cr*Cr+2*(Pt-ct)*Kt)}while(P(zt)>c&&--Gt>0);return Kt=E(Pt),[(P(ct)<P(Pt+1/Kt)?D(nt*Kt):g(ct)*g(nt)*(B(P(nt*Kt))+M))/m(Pt),Pt]};function bu(){return w.geoProjection(Xc).scale(103.74)}function mh(nt,ct){var Tt=Fh(nt[1],nt[0]),Pt=Fh(ct[1],ct[0]),Gt=Sv(Tt,Pt),zt=Zd(Tt)/Zd(Pt);return eh([1,0,nt[0][0],0,1,nt[0][1]],eh([zt,0,0,0,zt,0],eh([a(Gt),m(Gt),0,-m(Gt),a(Gt),0],[1,0,-ct[0][0],0,1,-ct[0][1]])))}function Sf(nt){var ct=1/(nt[0]*nt[4]-nt[1]*nt[3]);return[ct*nt[4],-ct*nt[1],ct*(nt[1]*nt[5]-nt[2]*nt[4]),-ct*nt[3],ct*nt[0],ct*(nt[2]*nt[3]-nt[0]*nt[5])]}function eh(nt,ct){return[nt[0]*ct[0]+nt[1]*ct[3],nt[0]*ct[1]+nt[1]*ct[4],nt[0]*ct[2]+nt[1]*ct[5]+nt[2],nt[3]*ct[0]+nt[4]*ct[3],nt[3]*ct[1]+nt[4]*ct[4],nt[3]*ct[2]+nt[4]*ct[5]+nt[5]]}function Fh(nt,ct){return[nt[0]-ct[0],nt[1]-ct[1]]}function Zd(nt){return U(nt[0]*nt[0]+nt[1]*nt[1])}function Sv(nt,ct){return r(nt[0]*ct[1]-nt[1]*ct[0],nt[0]*ct[0]+nt[1]*ct[1])}function gh(nt,ct,Tt){Pt(nt,{transform:null});function Pt(Hr,sn){if(Hr.edges=gc(Hr.face),sn.face){var bn=Hr.shared=jh(Hr.face,sn.face),Vn=mh(bn.map(sn.project),bn.map(Hr.project));Hr.transform=sn.transform?eh(sn.transform,Vn):Vn;for(var Yn=sn.edges,va=0,Va=Yn.length;va<Va;++va)nf(bn[0],Yn[va][1])&&nf(bn[1],Yn[va][0])&&(Yn[va]=Hr),nf(bn[0],Yn[va][0])&&nf(bn[1],Yn[va][1])&&(Yn[va]=Hr);for(Yn=Hr.edges,va=0,Va=Yn.length;va<Va;++va)nf(bn[0],Yn[va][0])&&nf(bn[1],Yn[va][1])&&(Yn[va]=sn),nf(bn[0],Yn[va][1])&&nf(bn[1],Yn[va][0])&&(Yn[va]=sn)}else Hr.transform=sn.transform;return Hr.children&&Hr.children.forEach(function(Si){Pt(Si,Hr)}),Hr}function Gt(Hr,sn){var bn=ct(Hr,sn),Vn=bn.project([Hr*p,sn*p]),Yn;return(Yn=bn.transform)?[Yn[0]*Vn[0]+Yn[1]*Vn[1]+Yn[2],-(Yn[3]*Vn[0]+Yn[4]*Vn[1]+Yn[5])]:(Vn[1]=-Vn[1],Vn)}yh(nt)&&(Gt.invert=function(Hr,sn){var bn=zt(nt,[Hr,-sn]);return bn&&(bn[0]*=x,bn[1]*=x,bn)});function zt(Hr,sn){var bn=Hr.project.invert,Vn=Hr.transform,Yn=sn;if(Vn&&(Vn=Sf(Vn),Yn=[Vn[0]*Yn[0]+Vn[1]*Yn[1]+Vn[2],Vn[3]*Yn[0]+Vn[4]*Yn[1]+Vn[5]]),bn&&Hr===Kt(va=bn(Yn)))return va;for(var va,Va=Hr.children,Si=0,yi=Va&&Va.length;Si<yi;++Si)if(va=zt(Va[Si],sn))return va}function Kt(Hr){return ct(Hr[0]*x,Hr[1]*x)}var Cr=w.geoProjection(Gt),Nr=Cr.stream;return Cr.stream=function(Hr){var sn=Cr.rotate(),bn=Nr(Hr),Vn=(Cr.rotate([0,0]),Nr(Hr));return Cr.rotate(sn),bn.sphere=function(){Vn.polygonStart(),Vn.lineStart(),Bh(Vn,nt),Vn.lineEnd(),Vn.polygonEnd()},bn},Cr.angle(Tt==null?-30:Tt*p)}function Bh(nt,ct,Tt){var Pt,Gt=ct.edges,zt=Gt.length,Kt,Cr={type:"MultiPoint",coordinates:ct.face},Nr=ct.face.filter(function(Va){return P(Va[1])!==90}),Hr=w.geoBounds({type:"MultiPoint",coordinates:Nr}),sn=!1,bn=-1,Vn=Hr[1][0]-Hr[0][0],Yn=Vn===180||Vn===360?[(Hr[0][0]+Hr[1][0])/2,(Hr[0][1]+Hr[1][1])/2]:w.geoCentroid(Cr);if(Tt)for(;++bn<zt&&Gt[bn]!==Tt;);++bn;for(var va=0;va<zt;++va)Kt=Gt[(va+bn)%zt],Array.isArray(Kt)?(sn||(nt.point((Pt=w.geoInterpolate(Kt[0],Yn)(c))[0],Pt[1]),sn=!0),nt.point((Pt=w.geoInterpolate(Kt[1],Yn)(c))[0],Pt[1])):(sn=!1,Kt!==Tt&&Bh(nt,Kt,ct))}function nf(nt,ct){return nt&&ct&&nt[0]===ct[0]&&nt[1]===ct[1]}function jh(nt,ct){for(var Tt,Pt,Gt=nt.length,zt=null,Kt=0;Kt<Gt;++Kt){Tt=nt[Kt];for(var Cr=ct.length;--Cr>=0;)if(Pt=ct[Cr],Tt[0]===Pt[0]&&Tt[1]===Pt[1]){if(zt)return[zt,Tt];zt=Tt}}}function gc(nt){for(var ct=nt.length,Tt=[],Pt=nt[ct-1],Gt=0;Gt<ct;++Gt)Tt.push([Pt,Pt=nt[Gt]]);return Tt}function yh(nt){return nt.project.invert||nt.children&&nt.children.some(yh)}var hd=[[0,90],[-90,0],[0,0],[90,0],[180,0],[0,-90]],_h=[[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(nt){return nt.map(function(ct){return hd[ct]})});function du(nt){nt=nt||function(Tt){var Pt=w.geoCentroid({type:"MultiPoint",coordinates:Tt});return w.geoGnomonic().scale(1).translate([0,0]).rotate([-Pt[0],-Pt[1]])};var ct=_h.map(function(Tt){return{face:Tt,project:nt(Tt)}});return[-1,0,0,1,0,1,4,5].forEach(function(Tt,Pt){var Gt=ct[Tt];Gt&&(Gt.children||(Gt.children=[])).push(ct[Pt])}),gh(ct[0],function(Tt,Pt){return ct[Tt<-T/2?Pt<0?6:4:Tt<0?Pt<0?2:0:Tt<T/2?Pt<0?3:1:Pt<0?7:5]}).angle(-30).scale(101.858).center([0,45])}var Wc=2/U(3);function gf(nt,ct){var Tt=Ae(nt,ct);return[Tt[0]*Wc,Tt[1]]}gf.invert=function(nt,ct){return Ae.invert(nt/Wc,ct)};function td(nt){nt=nt||function(Tt){var Pt=w.geoCentroid({type:"MultiPoint",coordinates:Tt});return w.geoProjection(gf).translate([0,0]).scale(1).rotate(Pt[1]>0?[-Pt[0],0]:[180-Pt[0],180])};var ct=_h.map(function(Tt){return{face:Tt,project:nt(Tt)}});return[-1,0,0,1,0,1,4,5].forEach(function(Tt,Pt){var Gt=ct[Tt];Gt&&(Gt.children||(Gt.children=[])).push(ct[Pt])}),gh(ct[0],function(Tt,Pt){return ct[Tt<-T/2?Pt<0?6:4:Tt<0?Pt<0?2:0:Tt<T/2?Pt<0?3:1:Pt<0?7:5]}).angle(-30).scale(121.906).center([0,48.5904])}function gu(nt){nt=nt||function(Kt){var Cr=Kt.length===6?w.geoCentroid({type:"MultiPoint",coordinates:Kt}):Kt[0];return w.geoGnomonic().scale(1).translate([0,0]).rotate([-Cr[0],-Cr[1]])};var ct=_h.map(function(Kt){for(var Cr=Kt.map(Ch),Nr=Cr.length,Hr=Cr[Nr-1],sn,bn=[],Vn=0;Vn<Nr;++Vn)sn=Cr[Vn],bn.push(af([Hr[0]*.9486832980505138+sn[0]*.31622776601683794,Hr[1]*.9486832980505138+sn[1]*.31622776601683794,Hr[2]*.9486832980505138+sn[2]*.31622776601683794]),af([sn[0]*.9486832980505138+Hr[0]*.31622776601683794,sn[1]*.9486832980505138+Hr[1]*.31622776601683794,sn[2]*.9486832980505138+Hr[2]*.31622776601683794])),Hr=sn;return bn}),Tt=[],Pt=[-1,0,0,1,0,1,4,5];ct.forEach(function(Kt,Cr){for(var Nr=_h[Cr],Hr=Nr.length,sn=Tt[Cr]=[],bn=0;bn<Hr;++bn)ct.push([Nr[bn],Kt[(bn*2+2)%(2*Hr)],Kt[(bn*2+1)%(2*Hr)]]),Pt.push(Cr),sn.push(th(Ch(Kt[(bn*2+2)%(2*Hr)]),Ch(Kt[(bn*2+1)%(2*Hr)])))});var Gt=ct.map(function(Kt){return{project:nt(Kt),face:Kt}});Pt.forEach(function(Kt,Cr){var Nr=Gt[Kt];Nr&&(Nr.children||(Nr.children=[])).push(Gt[Cr])});function zt(Kt,Cr){var Nr=a(Cr),Hr=[Nr*a(Kt),Nr*m(Kt),m(Cr)],sn=Kt<-T/2?Cr<0?6:4:Kt<0?Cr<0?2:0:Kt<T/2?Cr<0?3:1:Cr<0?7:5,bn=Tt[sn];return Gt[Mh(bn[0],Hr)<0?8+3*sn:Mh(bn[1],Hr)<0?8+3*sn+1:Mh(bn[2],Hr)<0?8+3*sn+2:sn]}return gh(Gt[0],zt).angle(-30).scale(110.625).center([0,45])}function Mh(nt,ct){for(var Tt=0,Pt=nt.length,Gt=0;Tt<Pt;++Tt)Gt+=nt[Tt]*ct[Tt];return Gt}function th(nt,ct){return[nt[1]*ct[2]-nt[2]*ct[1],nt[2]*ct[0]-nt[0]*ct[2],nt[0]*ct[1]-nt[1]*ct[0]]}function af(nt){return[r(nt[1],nt[0])*p,D(o(-1,u(1,nt[2])))*p]}function Ch(nt){var ct=nt[0]*x,Tt=nt[1]*x,Pt=a(Tt);return[Pt*a(ct),Pt*m(ct),m(Tt)]}function Ef(){}function kh(nt){if((Tt=nt.length)<4)return!1;for(var ct=0,Tt,Pt=nt[Tt-1][1]*nt[0][0]-nt[Tt-1][0]*nt[0][1];++ct<Tt;)Pt+=nt[ct-1][1]*nt[ct][0]-nt[ct-1][0]*nt[ct][1];return Pt<=0}function $d(nt,ct){for(var Tt=ct[0],Pt=ct[1],Gt=!1,zt=0,Kt=nt.length,Cr=Kt-1;zt<Kt;Cr=zt++){var Nr=nt[zt],Hr=Nr[0],sn=Nr[1],bn=nt[Cr],Vn=bn[0],Yn=bn[1];sn>Pt^Yn>Pt&&Tt<(Vn-Hr)*(Pt-sn)/(Yn-sn)+Hr&&(Gt=!Gt)}return Gt}function xc(nt,ct){var Tt=ct.stream,Pt;if(!Tt)throw new Error("invalid projection");switch(nt&&nt.type){case"Feature":Pt=of;break;case"FeatureCollection":Pt=dd;break;default:Pt=Mf;break}return Pt(nt,Tt)}function dd(nt,ct){return{type:"FeatureCollection",features:nt.features.map(function(Tt){return of(Tt,ct)})}}function of(nt,ct){return{type:"Feature",id:nt.id,properties:nt.properties,geometry:Mf(nt.geometry,ct)}}function Bf(nt,ct){return{type:"GeometryCollection",geometries:nt.geometries.map(function(Tt){return Mf(Tt,ct)})}}function Mf(nt,ct){if(!nt)return null;if(nt.type==="GeometryCollection")return Bf(nt,ct);var Tt;switch(nt.type){case"Point":Tt=Su;break;case"MultiPoint":Tt=Su;break;case"LineString":Tt=rh;break;case"MultiLineString":Tt=rh;break;case"Polygon":Tt=Cf;break;case"MultiPolygon":Tt=Cf;break;case"Sphere":Tt=Cf;break;default:return null}return w.geoStream(nt,ct(Tt)),Tt.result()}var Du=[],Rc=[],Su={point:function(nt,ct){Du.push([nt,ct])},result:function(){var nt=Du.length?Du.length<2?{type:"Point",coordinates:Du[0]}:{type:"MultiPoint",coordinates:Du}:null;return Du=[],nt}},rh={lineStart:Ef,point:function(nt,ct){Du.push([nt,ct])},lineEnd:function(){Du.length&&(Rc.push(Du),Du=[])},result:function(){var nt=Rc.length?Rc.length<2?{type:"LineString",coordinates:Rc[0]}:{type:"MultiLineString",coordinates:Rc}:null;return Rc=[],nt}},Cf={polygonStart:Ef,lineStart:Ef,point:function(nt,ct){Du.push([nt,ct])},lineEnd:function(){var nt=Du.length;if(nt){do Du.push(Du[0].slice());while(++nt<4);Rc.push(Du),Du=[]}},polygonEnd:Ef,result:function(){if(!Rc.length)return null;var nt=[],ct=[];return Rc.forEach(function(Tt){kh(Tt)?nt.push([Tt]):ct.push(Tt)}),ct.forEach(function(Tt){var Pt=Tt[0];nt.some(function(Gt){if($d(Gt[0],Pt))return Gt.push(Tt),!0})||nt.push([Tt])}),Rc=[],nt.length?nt.length>1?{type:"MultiPolygon",coordinates:nt}:{type:"Polygon",coordinates:nt[0]}:null}};function rd(nt){var ct=nt(M,0)[0]-nt(-M,0)[0];function Tt(Pt,Gt){var zt=P(Pt)<M,Kt=nt(zt?Pt:Pt>0?Pt-T:Pt+T,Gt),Cr=(Kt[0]-Kt[1])*b,Nr=(Kt[0]+Kt[1])*b;if(zt)return[Cr,Nr];var Hr=ct*b,sn=Cr>0^Nr>0?-1:1;return[sn*Cr-g(Nr)*Hr,sn*Nr-g(Cr)*Hr]}return nt.invert&&(Tt.invert=function(Pt,Gt){var zt=(Pt+Gt)*b,Kt=(Gt-Pt)*b,Cr=P(zt)<.5*ct&&P(Kt)<.5*ct;if(!Cr){var Nr=ct*b,Hr=zt>0^Kt>0?-1:1,sn=-Hr*Pt+(Kt>0?1:-1)*Nr,bn=-Hr*Gt+(zt>0?1:-1)*Nr;zt=(-sn-bn)*b,Kt=(sn-bn)*b}var Vn=nt.invert(zt,Kt);return Cr||(Vn[0]+=zt>0?T:-T),Vn}),w.geoProjection(Tt).rotate([-90,-90,45]).clipAngle(180-.001)}function wr(){return rd(Sn).scale(176.423)}function Gr(){return rd(Vo).scale(111.48)}function kn(nt,ct){if(!(0<=(ct=+ct)&&ct<=20))throw new Error("invalid digits");function Tt(Hr){var sn=Hr.length,bn=2,Vn=new Array(sn);for(Vn[0]=+Hr[0].toFixed(ct),Vn[1]=+Hr[1].toFixed(ct);bn<sn;)Vn[bn]=Hr[bn],++bn;return Vn}function Pt(Hr){return Hr.map(Tt)}function Gt(Hr){for(var sn=Tt(Hr[0]),bn=[sn],Vn=1;Vn<Hr.length;Vn++){var Yn=Tt(Hr[Vn]);(Yn.length>2||Yn[0]!=sn[0]||Yn[1]!=sn[1])&&(bn.push(Yn),sn=Yn)}return bn.length===1&&Hr.length>1&&bn.push(Tt(Hr[Hr.length-1])),bn}function zt(Hr){return Hr.map(Gt)}function Kt(Hr){if(Hr==null)return Hr;var sn;switch(Hr.type){case"GeometryCollection":sn={type:"GeometryCollection",geometries:Hr.geometries.map(Kt)};break;case"Point":sn={type:"Point",coordinates:Tt(Hr.coordinates)};break;case"MultiPoint":sn={type:Hr.type,coordinates:Pt(Hr.coordinates)};break;case"LineString":sn={type:Hr.type,coordinates:Gt(Hr.coordinates)};break;case"MultiLineString":case"Polygon":sn={type:Hr.type,coordinates:zt(Hr.coordinates)};break;case"MultiPolygon":sn={type:"MultiPolygon",coordinates:Hr.coordinates.map(zt)};break;default:return Hr}return Hr.bbox!=null&&(sn.bbox=Hr.bbox),sn}function Cr(Hr){var sn={type:"Feature",properties:Hr.properties,geometry:Kt(Hr.geometry)};return Hr.id!=null&&(sn.id=Hr.id),Hr.bbox!=null&&(sn.bbox=Hr.bbox),sn}if(nt!=null)switch(nt.type){case"Feature":return Cr(nt);case"FeatureCollection":{var Nr={type:"FeatureCollection",features:nt.features.map(Cr)};return nt.bbox!=null&&(Nr.bbox=nt.bbox),Nr}default:return Kt(nt)}return nt}function _n(nt){var ct=m(nt);function Tt(Pt,Gt){var zt=ct?E(Pt*ct/2)/ct:Pt/2;if(!Gt)return[2*zt,-nt];var Kt=2*t(zt*m(Gt)),Cr=1/E(Gt);return[m(Kt)*Cr,Gt+(1-a(Kt))*Cr-nt]}return Tt.invert=function(Pt,Gt){if(P(Gt+=nt)<c)return[ct?2*t(ct*Pt/2)/ct:Pt,0];var zt=Pt*Pt+Gt*Gt,Kt=0,Cr=10,Nr;do{var Hr=E(Kt),sn=1/a(Kt),bn=zt-2*Gt*Kt+Kt*Kt;Kt-=Nr=(Hr*bn+2*(Kt-Gt))/(2+bn*sn*sn+2*(Kt-Gt)*Hr)}while(P(Nr)>c&&--Cr>0);var Vn=Pt*(Hr=E(Kt)),Yn=E(P(Gt)<P(Kt+1/Hr)?D(Vn)*.5:B(Vn)*.5+T/4)/m(Kt);return[ct?2*t(ct*Yn)/ct:2*Yn,Kt]},Tt}function ta(){return wt(_n).scale(131.215)}var Ga=[[.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]];Ga.forEach(function(nt){nt[1]*=1.0144});function ja(nt,ct){var Tt=u(18,P(ct)*36/T),Pt=i(Tt),Gt=Tt-Pt,zt=(bn=Ga[Pt])[0],Kt=bn[1],Cr=(bn=Ga[++Pt])[0],Nr=bn[1],Hr=(bn=Ga[u(19,++Pt)])[0],sn=bn[1],bn;return[nt*(Cr+Gt*(Hr-zt)/2+Gt*Gt*(Hr-2*Cr+zt)/2),(ct>0?M:-M)*(Nr+Gt*(sn-Kt)/2+Gt*Gt*(sn-2*Nr+Kt)/2)]}ja.invert=function(nt,ct){var Tt=ct/M,Pt=Tt*90,Gt=u(18,P(Pt/5)),zt=o(0,i(Gt));do{var Kt=Ga[zt][1],Cr=Ga[zt+1][1],Nr=Ga[u(19,zt+2)][1],Hr=Nr-Kt,sn=Nr-2*Cr+Kt,bn=2*(P(Tt)-Cr)/Hr,Vn=sn/Hr,Yn=bn*(1-Vn*bn*(1-2*Vn*bn));if(Yn>=0||zt===1){Pt=(ct>=0?5:-5)*(Yn+Gt);var va=50,Va;do Gt=u(18,P(Pt)/5),zt=i(Gt),Yn=Gt-zt,Kt=Ga[zt][1],Cr=Ga[zt+1][1],Nr=Ga[u(19,zt+2)][1],Pt-=(Va=(ct>=0?M:-M)*(Cr+Yn*(Nr-Kt)/2+Yn*Yn*(Nr-2*Cr+Kt)/2)-ct)*p;while(P(Va)>_&&--va>0);break}}while(--zt>=0);var Si=Ga[zt][0],yi=Ga[zt+1][0],Mi=Ga[u(19,zt+2)][0];return[nt/(yi+Yn*(Mi-Si)/2+Yn*Yn*(Mi-2*yi+Si)/2),Pt*x]};function Ai(){return w.geoProjection(ja).scale(152.63)}function Ii(nt){function ct(Tt,Pt){var Gt=a(Pt),zt=(nt-1)/(nt-Gt*a(Tt));return[zt*Gt*m(Tt),zt*m(Pt)]}return ct.invert=function(Tt,Pt){var Gt=Tt*Tt+Pt*Pt,zt=U(Gt),Kt=(nt-U(1-Gt*(nt+1)/(nt-1)))/((nt-1)/zt+zt/(nt-1));return[r(Tt*Kt,zt*U(1-Kt*Kt)),zt?D(Pt*Kt/zt):0]},ct}function oo(nt,ct){var Tt=Ii(nt);if(!ct)return Tt;var Pt=a(ct),Gt=m(ct);function zt(Kt,Cr){var Nr=Tt(Kt,Cr),Hr=Nr[1],sn=Hr*Gt/(nt-1)+Pt;return[Nr[0]*Pt/sn,Hr/sn]}return zt.invert=function(Kt,Cr){var Nr=(nt-1)/(nt-1-Cr*Gt);return Tt.invert(Nr*Kt,Nr*Cr*Pt)},zt}function hi(){var nt=2,ct=0,Tt=w.geoProjectionMutator(oo),Pt=Tt(nt,ct);return Pt.distance=function(Gt){return arguments.length?Tt(nt=+Gt,ct):nt},Pt.tilt=function(Gt){return arguments.length?Tt(nt,ct=Gt*x):ct*p},Pt.scale(432.147).clipAngle(B(1/nt)*p-1e-6)}var Gi=1e-4,wi=1e4,si=-180,vo=si+Gi,es=180,$o=es-Gi,is=-90,rs=is+Gi,mo=90,Ji=mo-Gi;function gs(nt){return nt.length>0}function $s(nt){return Math.floor(nt*wi)/wi}function Nl(nt){return nt===is||nt===mo?[0,nt]:[si,$s(nt)]}function au(nt){var ct=nt[0],Tt=nt[1],Pt=!1;return ct<=vo?(ct=si,Pt=!0):ct>=$o&&(ct=es,Pt=!0),Tt<=rs?(Tt=is,Pt=!0):Tt>=Ji&&(Tt=mo,Pt=!0),Pt?[ct,Tt]:nt}function Bl(nt){return nt.map(au)}function iu(nt,ct,Tt){for(var Pt=0,Gt=nt.length;Pt<Gt;++Pt){var zt=nt[Pt].slice();Tt.push({index:-1,polygon:ct,ring:zt});for(var Kt=0,Cr=zt.length;Kt<Cr;++Kt){var Nr=zt[Kt],Hr=Nr[0],sn=Nr[1];if(Hr<=vo||Hr>=$o||sn<=rs||sn>=Ji){zt[Kt]=au(Nr);for(var bn=Kt+1;bn<Cr;++bn){var Vn=zt[bn],Yn=Vn[0],va=Vn[1];if(Yn>vo&&Yn<$o&&va>rs&&va<Ji)break}if(bn===Kt+1)continue;if(Kt){var Va={index:-1,polygon:ct,ring:zt.slice(0,Kt+1)};Va.ring[Va.ring.length-1]=Nl(sn),Tt[Tt.length-1]=Va}else Tt.pop();if(bn>=Cr)break;Tt.push({index:-1,polygon:ct,ring:zt=zt.slice(bn-1)}),zt[0]=Nl(zt[0][1]),Kt=-1,Cr=zt.length}}}}function hl(nt){var ct,Tt=nt.length,Pt={},Gt={},zt,Kt,Cr,Nr,Hr;for(ct=0;ct<Tt;++ct){if(zt=nt[ct],Kt=zt.ring[0],Nr=zt.ring[zt.ring.length-1],Kt[0]===Nr[0]&&Kt[1]===Nr[1]){zt.polygon.push(zt.ring),nt[ct]=null;continue}zt.index=ct,Pt[Kt]=Gt[Nr]=zt}for(ct=0;ct<Tt;++ct)if(zt=nt[ct],zt){if(Kt=zt.ring[0],Nr=zt.ring[zt.ring.length-1],Cr=Gt[Kt],Hr=Pt[Nr],delete Pt[Kt],delete Gt[Nr],Kt[0]===Nr[0]&&Kt[1]===Nr[1]){zt.polygon.push(zt.ring);continue}Cr?(delete Gt[Kt],delete Pt[Cr.ring[0]],Cr.ring.pop(),nt[Cr.index]=null,zt={index:-1,polygon:Cr.polygon,ring:Cr.ring.concat(zt.ring)},Cr===Hr?zt.polygon.push(zt.ring):(zt.index=Tt++,nt.push(Pt[zt.ring[0]]=Gt[zt.ring[zt.ring.length-1]]=zt))):Hr?(delete Pt[Nr],delete Gt[Hr.ring[Hr.ring.length-1]],zt.ring.pop(),zt={index:Tt++,polygon:Hr.polygon,ring:zt.ring.concat(Hr.ring)},nt[Hr.index]=null,nt.push(Pt[zt.ring[0]]=Gt[zt.ring[zt.ring.length-1]]=zt)):(zt.ring.push(zt.ring[0]),zt.polygon.push(zt.ring))}}function Bu(nt){var ct={type:"Feature",geometry:Ou(nt.geometry)};return nt.id!=null&&(ct.id=nt.id),nt.bbox!=null&&(ct.bbox=nt.bbox),nt.properties!=null&&(ct.properties=nt.properties),ct}function Ou(nt){if(nt==null)return nt;var ct,Tt,Pt,Gt;switch(nt.type){case"GeometryCollection":ct={type:"GeometryCollection",geometries:nt.geometries.map(Ou)};break;case"Point":ct={type:"Point",coordinates:au(nt.coordinates)};break;case"MultiPoint":case"LineString":ct={type:nt.type,coordinates:Bl(nt.coordinates)};break;case"MultiLineString":ct={type:"MultiLineString",coordinates:nt.coordinates.map(Bl)};break;case"Polygon":{var zt=[];iu(nt.coordinates,zt,Tt=[]),hl(Tt),ct={type:"Polygon",coordinates:zt};break}case"MultiPolygon":{Tt=[],Pt=-1,Gt=nt.coordinates.length;for(var Kt=new Array(Gt);++Pt<Gt;)iu(nt.coordinates[Pt],Kt[Pt]=[],Tt);hl(Tt),ct={type:"MultiPolygon",coordinates:Kt.filter(gs)};break}default:return nt}return nt.bbox!=null&&(ct.bbox=nt.bbox),ct}function eu(nt){if(nt==null)return nt;switch(nt.type){case"Feature":return Bu(nt);case"FeatureCollection":{var ct={type:"FeatureCollection",features:nt.features.map(Bu)};return nt.bbox!=null&&(ct.bbox=nt.bbox),ct}default:return Ou(nt)}}function No(nt,ct){var Tt=E(ct/2),Pt=m(k*Tt);return[nt*(.74482-.34588*Pt*Pt),1.70711*Tt]}No.invert=function(nt,ct){var Tt=ct/1.70711,Pt=m(k*Tt);return[nt/(.74482-.34588*Pt*Pt),2*t(Tt)]};function Ls(){return w.geoProjection(No).scale(146.153)}function Wl(nt,ct,Tt){var Pt=w.geoInterpolate(ct,Tt),Gt=Pt(.5),zt=w.geoRotation([-Gt[0],-Gt[1]])(ct),Kt=Pt.distance/2,Cr=-D(m(zt[1]*x)/m(Kt)),Nr=[-Gt[0],-Gt[1],-(zt[0]>0?T-Cr:Cr)*p],Hr=w.geoProjection(nt(Kt)).rotate(Nr),sn=w.geoRotation(Nr),bn=Hr.center;return delete Hr.rotate,Hr.center=function(Vn){return arguments.length?bn(sn(Vn)):sn.invert(bn())},Hr.clipAngle(90)}function Cl(nt){var ct=a(nt);function Tt(Pt,Gt){var zt=w.geoGnomonicRaw(Pt,Gt);return zt[0]*=ct,zt}return Tt.invert=function(Pt,Gt){return w.geoGnomonicRaw.invert(Pt/ct,Gt)},Tt}function Ec(){return Mc([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function Mc(nt,ct){return Wl(Cl,nt,ct)}function Ic(nt){if(!(nt*=2))return w.geoAzimuthalEquidistantRaw;var ct=-nt/2,Tt=-ct,Pt=nt*nt,Gt=E(Tt),zt=.5/m(Tt);function Kt(Cr,Nr){var Hr=B(a(Nr)*a(Cr-ct)),sn=B(a(Nr)*a(Cr-Tt)),bn=Nr<0?-1:1;return Hr*=Hr,sn*=sn,[(Hr-sn)/(2*nt),bn*U(4*Pt*sn-(Pt-Hr+sn)*(Pt-Hr+sn))/(2*nt)]}return Kt.invert=function(Cr,Nr){var Hr=Nr*Nr,sn=a(U(Hr+(Vn=Cr+ct)*Vn)),bn=a(U(Hr+(Vn=Cr+Tt)*Vn)),Vn,Yn;return[r(Yn=sn-bn,Vn=(sn+bn)*Gt),(Nr<0?-1:1)*B(U(Vn*Vn+Yn*Yn)*zt)]},Kt}function uh(){return Cc([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function Cc(nt,ct){return Wl(Ic,nt,ct)}function jf(nt,ct){if(P(ct)<c)return[nt,0];var Tt=P(ct/M),Pt=D(Tt);if(P(nt)<c||P(P(ct)-M)<c)return[0,g(ct)*T*E(Pt/2)];var Gt=a(Pt),zt=P(T/nt-nt/T)/2,Kt=zt*zt,Cr=Gt/(Tt+Gt-1),Nr=Cr*(2/Tt-1),Hr=Nr*Nr,sn=Hr+Kt,bn=Cr-Hr,Vn=Kt+Cr;return[g(nt)*T*(zt*bn+U(Kt*bn*bn-sn*(Cr*Cr-Hr)))/sn,g(ct)*T*(Nr*Vn-zt*U((Kt+1)*sn-Vn*Vn))/sn]}jf.invert=function(nt,ct){if(P(ct)<c)return[nt,0];if(P(nt)<c)return[0,M*m(2*t(ct/T))];var Tt=(nt/=T)*nt,Pt=(ct/=T)*ct,Gt=Tt+Pt,zt=Gt*Gt,Kt=-P(ct)*(1+Gt),Cr=Kt-2*Pt+Tt,Nr=-2*Kt+1+2*Pt+zt,Hr=Pt/Nr+(2*Cr*Cr*Cr/(Nr*Nr*Nr)-9*Kt*Cr/(Nr*Nr))/27,sn=(Kt-Cr*Cr/(3*Nr))/Nr,bn=2*U(-sn/3),Vn=B(3*Hr/(sn*bn))/3;return[T*(Gt-1+U(1+2*(Tt-Pt)+zt))/(2*nt),g(ct)*T*(-bn*a(Vn+T/3)-Cr/(3*Nr))]};function ju(){return w.geoProjection(jf).scale(79.4183)}function Uf(nt,ct){if(P(ct)<c)return[nt,0];var Tt=P(ct/M),Pt=D(Tt);if(P(nt)<c||P(P(ct)-M)<c)return[0,g(ct)*T*E(Pt/2)];var Gt=a(Pt),zt=P(T/nt-nt/T)/2,Kt=zt*zt,Cr=Gt*(U(1+Kt)-zt*Gt)/(1+Kt*Tt*Tt);return[g(nt)*T*Cr,g(ct)*T*U(1-Cr*(2*zt+Cr))]}Uf.invert=function(nt,ct){if(!nt)return[0,M*m(2*t(ct/T))];var Tt=P(nt/T),Pt=(1-Tt*Tt-(ct/=T)*ct)/(2*Tt),Gt=Pt*Pt,zt=U(Gt+1);return[g(nt)*T*(zt-Pt),g(ct)*M*m(2*r(U((1-2*Pt*Tt)*(Pt+zt)-Tt),U(zt+Pt+Tt)))]};function os(){return w.geoProjection(Uf).scale(79.4183)}function _s(nt,ct){if(P(ct)<c)return[nt,0];var Tt=ct/M,Pt=D(Tt);if(P(nt)<c||P(P(ct)-M)<c)return[0,T*E(Pt/2)];var Gt=(T/nt-nt/T)/2,zt=Tt/(1+a(Pt));return[T*(g(nt)*U(Gt*Gt+1-zt*zt)-Gt),T*zt]}_s.invert=function(nt,ct){if(!ct)return[nt,0];var Tt=ct/T,Pt=(T*T*(1-Tt*Tt)-nt*nt)/(2*T*nt);return[nt?T*(g(nt)*U(Pt*Pt+1)-Pt):0,M*m(2*t(Tt))]};function qf(){return w.geoProjection(_s).scale(79.4183)}function sf(nt,ct){if(!ct)return[nt,0];var Tt=P(ct);if(!nt||Tt===M)return[0,ct];var Pt=Tt/M,Gt=Pt*Pt,zt=(8*Pt-Gt*(Gt+2)-5)/(2*Gt*(Pt-1)),Kt=zt*zt,Cr=Pt*zt,Nr=Gt+Kt+2*Cr,Hr=Pt+3*zt,sn=nt/M,bn=sn+1/sn,Vn=g(P(nt)-M)*U(bn*bn-4),Yn=Vn*Vn,va=Nr*(Gt+Kt*Yn-1)+(1-Gt)*(Gt*(Hr*Hr+4*Kt)+12*Cr*Kt+4*Kt*Kt),Va=(Vn*(Nr+Kt-1)+2*U(va))/(4*Nr+Yn);return[g(nt)*M*Va,g(ct)*M*U(1+Vn*P(Va)-Va*Va)]}sf.invert=function(nt,ct){var Tt;if(!nt||!ct)return[nt,ct];ct/=T;var Pt=g(nt)*nt/M,Gt=(Pt*Pt-1+4*ct*ct)/P(Pt),zt=Gt*Gt,Kt=2*ct,Cr=50;do{var Nr=Kt*Kt,Hr=(8*Kt-Nr*(Nr+2)-5)/(2*Nr*(Kt-1)),sn=(3*Kt-Nr*Kt-10)/(2*Nr*Kt),bn=Hr*Hr,Vn=Kt*Hr,Yn=Kt+Hr,va=Yn*Yn,Va=Kt+3*Hr,Si=va*(Nr+bn*zt-1)+(1-Nr)*(Nr*(Va*Va+4*bn)+bn*(12*Vn+4*bn)),yi=-2*Yn*(4*Vn*bn+(1-4*Nr+3*Nr*Nr)*(1+sn)+bn*(-6+14*Nr-zt+(-8+8*Nr-2*zt)*sn)+Vn*(-8+12*Nr+(-10+10*Nr-zt)*sn)),Mi=U(Si),go=Gt*(va+bn-1)+2*Mi-Pt*(4*va+zt),jo=Gt*(2*Hr*sn+2*Yn*(1+sn))+yi/Mi-8*Yn*(Gt*(-1+bn+va)+2*Mi)*(1+sn)/(zt+4*va);Kt-=Tt=go/jo}while(Tt>c&&--Cr>0);return[g(nt)*(U(Gt*Gt+4)+Gt)*T/4,M*Kt]};function Yc(){return w.geoProjection(sf).scale(127.16)}function Ze(nt,ct,Tt,Pt,Gt){function zt(Kt,Cr){var Nr=Tt*m(Pt*Cr),Hr=U(1-Nr*Nr),sn=U(2/(1+Hr*a(Kt*=Gt)));return[nt*Hr*sn*m(Kt),ct*Nr*sn]}return zt.invert=function(Kt,Cr){var Nr=Kt/nt,Hr=Cr/ct,sn=U(Nr*Nr+Hr*Hr),bn=2*D(sn/2);return[r(Kt*E(bn),nt*sn)/Gt,sn&&D(Cr*m(bn)/(ct*Tt*sn))/Pt]},zt}function O(nt,ct,Tt,Pt){var Gt=T/3;nt=o(nt,c),ct=o(ct,c),nt=u(nt,M),ct=u(ct,T-c),Tt=o(Tt,0),Tt=u(Tt,100-c),Pt=o(Pt,c);var zt=Tt/100+1,Kt=Pt/100,Cr=B(zt*a(Gt))/Gt,Nr=m(nt)/m(Cr*M),Hr=ct/T,sn=U(Kt*m(nt/2)/m(ct/2)),bn=sn/U(Hr*Nr*Cr),Vn=1/(sn*U(Hr*Nr*Cr));return Ze(bn,Vn,Nr,Cr,Hr)}function fe(){var nt=65*x,ct=60*x,Tt=20,Pt=200,Gt=w.geoProjectionMutator(O),zt=Gt(nt,ct,Tt,Pt);return zt.poleline=function(Kt){return arguments.length?Gt(nt=+Kt*x,ct,Tt,Pt):nt*p},zt.parallels=function(Kt){return arguments.length?Gt(nt,ct=+Kt*x,Tt,Pt):ct*p},zt.inflation=function(Kt){return arguments.length?Gt(nt,ct,Tt=+Kt,Pt):Tt},zt.ratio=function(Kt){return arguments.length?Gt(nt,ct,Tt,Pt=+Kt):Pt},zt.scale(163.775)}function Re(){return fe().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var Oe=4*T+3*U(3),We=2*U(2*T*U(3)/Oe),Ct=vt(We*U(3)/T,We,Oe/6);function Nt(){return w.geoProjection(Ct).scale(176.84)}function rr(nt,ct){return[nt*U(1-3*ct*ct/(T*T)),ct]}rr.invert=function(nt,ct){return[nt/U(1-3*ct*ct/(T*T)),ct]};function Tr(){return w.geoProjection(rr).scale(152.63)}function Fr(nt,ct){var Tt=a(ct),Pt=a(nt)*Tt,Gt=1-Pt,zt=a(nt=r(m(nt)*Tt,-m(ct))),Kt=m(nt);return Tt=U(1-Pt*Pt),[Kt*Tt-zt*Gt,-zt*Tt-Kt*Gt]}Fr.invert=function(nt,ct){var Tt=(nt*nt+ct*ct)/-2,Pt=U(-Tt*(2+Tt)),Gt=ct*Tt+nt*Pt,zt=nt*Tt-ct*Pt,Kt=U(zt*zt+Gt*Gt);return[r(Pt*Gt,Kt*(1+Tt)),Kt?-D(Pt*zt/Kt):0]};function Vr(){return w.geoProjection(Fr).rotate([0,-90,45]).scale(124.75).clipAngle(180-.001)}function mn(nt,ct){var Tt=ge(nt,ct);return[(Tt[0]+nt/M)/2,(Tt[1]+ct)/2]}mn.invert=function(nt,ct){var Tt=nt,Pt=ct,Gt=25;do{var zt=a(Pt),Kt=m(Pt),Cr=m(2*Pt),Nr=Kt*Kt,Hr=zt*zt,sn=m(Tt),bn=a(Tt/2),Vn=m(Tt/2),Yn=Vn*Vn,va=1-Hr*bn*bn,Va=va?B(zt*bn)*U(Si=1/va):Si=0,Si,yi=.5*(2*Va*zt*Vn+Tt/M)-nt,Mi=.5*(Va*Kt+Pt)-ct,go=.5*Si*(Hr*Yn+Va*zt*bn*Nr)+.5/M,jo=Si*(sn*Cr/4-Va*Kt*Vn),Do=.125*Si*(Cr*Vn-Va*Kt*Hr*sn),us=.5*Si*(Nr*bn+Va*Yn*zt)+.5,sl=jo*Do-us*go,ll=(Mi*jo-yi*us)/sl,Bs=(yi*Do-Mi*go)/sl;Tt-=ll,Pt-=Bs}while((P(ll)>c||P(Bs)>c)&&--Gt>0);return[Tt,Pt]};function Dn(){return w.geoProjection(mn).scale(158.837)}v.geoNaturalEarth=w.geoNaturalEarth1,v.geoNaturalEarthRaw=w.geoNaturalEarth1Raw,v.geoAiry=le,v.geoAiryRaw=J,v.geoAitoff=de,v.geoAitoffRaw=ge,v.geoArmadillo=W,v.geoArmadilloRaw=me,v.geoAugust=se,v.geoAugustRaw=ie,v.geoBaker=Y,v.geoBakerRaw=oe,v.geoBerghaus=ue,v.geoBerghausRaw=ce,v.geoBertin1953=mt,v.geoBertin1953Raw=rt,v.geoBoggs=yt,v.geoBoggsRaw=Ye,v.geoBonne=fr,v.geoBonneRaw=$t,v.geoBottomley=Ur,v.geoBottomleyRaw=mr,v.geoBromley=fn,v.geoBromleyRaw=jr,v.geoChamberlin=Ee,v.geoChamberlinRaw=$e,v.geoChamberlinAfrica=De,v.geoCollignon=Ie,v.geoCollignonRaw=Ae,v.geoCraig=st,v.geoCraigRaw=tt,v.geoCraster=Wt,v.geoCrasterRaw=Ft,v.geoCylindricalEqualArea=Rr,v.geoCylindricalEqualAreaRaw=lr,v.geoCylindricalStereographic=Sr,v.geoCylindricalStereographicRaw=Mr,v.geoEckert1=Hn,v.geoEckert1Raw=Kr,v.geoEckert2=ua,v.geoEckert2Raw=ga,v.geoEckert3=Aa,v.geoEckert3Raw=Ta,v.geoEckert4=$a,v.geoEckert4Raw=ia,v.geoEckert5=_r,v.geoEckert5Raw=ci,v.geoEckert6=yr,v.geoEckert6Raw=Qt,v.geoEisenlohr=wn,v.geoEisenlohrRaw=an,v.geoFahey=xa,v.geoFaheyRaw=Bn,v.geoFoucaut=Ia,v.geoFoucautRaw=za,v.geoFoucautSinusoidal=Ka,v.geoFoucautSinusoidalRaw=Ba,v.geoGilbert=Yi,v.geoGingery=en,v.geoGingeryRaw=Ht,v.geoGinzburg4=tn,v.geoGinzburg4Raw=Wr,v.geoGinzburg5=dn,v.geoGinzburg5Raw=Tn,v.geoGinzburg6=xr,v.geoGinzburg6Raw=It,v.geoGinzburg8=An,v.geoGinzburg8Raw=Yr,v.geoGinzburg9=sa,v.geoGinzburg9Raw=Zn,v.geoGringorten=Za,v.geoGringortenRaw=Sn,v.geoGuyou=as,v.geoGuyouRaw=Vo,v.geoHammer=ze,v.geoHammerRaw=_e,v.geoHammerRetroazimuthal=hs,v.geoHammerRetroazimuthalRaw=rl,v.geoHealpix=xl,v.geoHealpixRaw=_l,v.geoHill=Hl,v.geoHillRaw=Ul,v.geoHomolosine=Jo,v.geoHomolosineRaw=Gs,v.geoHufnagel=al,v.geoHufnagelRaw=Gl,v.geoHyperelliptical=Ps,v.geoHyperellipticalRaw=_o,v.geoInterrupt=Zo,v.geoInterruptedBoggs=Au,v.geoInterruptedHomolosine=Ol,v.geoInterruptedMollweide=Ql,v.geoInterruptedMollweideHemispheres=Tf,v.geoInterruptedSinuMollweide=df,v.geoInterruptedSinusoidal=zh,v.geoKavrayskiy7=Vc,v.geoKavrayskiy7Raw=zl,v.geoLagrange=pc,v.geoLagrangeRaw=$h,v.geoLarrivee=vf,v.geoLarriveeRaw=mc,v.geoLaskowski=oc,v.geoLaskowskiRaw=uu,v.geoLittrow=Xl,v.geoLittrowRaw=el,v.geoLoximuthal=Lc,v.geoLoximuthalRaw=zf,v.geoMiller=xu,v.geoMillerRaw=$f,v.geoModifiedStereographic=sc,v.geoModifiedStereographicRaw=Wd,v.geoModifiedStereographicAlaska=pf,v.geoModifiedStereographicGs48=Yu,v.geoModifiedStereographicGs50=Kh,v.geoModifiedStereographicMiller=Kf,v.geoModifiedStereographicLee=Ah,v.geoMollweide=Fe,v.geoMollweideRaw=ut,v.geoMtFlatPolarParabolic=Jf,v.geoMtFlatPolarParabolicRaw=Sh,v.geoMtFlatPolarQuartic=Qh,v.geoMtFlatPolarQuarticRaw=Jh,v.geoMtFlatPolarSinusoidal=ld,v.geoMtFlatPolarSinusoidalRaw=mf,v.geoNaturalEarth2=Af,v.geoNaturalEarth2Raw=Nf,v.geoNellHammer=lh,v.geoNellHammerRaw=lc,v.geoInterruptedQuarticAuthalic=Kl,v.geoNicolosi=Yd,v.geoNicolosiRaw=Nh,v.geoPatterson=Sc,v.geoPattersonRaw=Ff,v.geoPolyconic=bu,v.geoPolyconicRaw=Xc,v.geoPolyhedral=gh,v.geoPolyhedralButterfly=du,v.geoPolyhedralCollignon=td,v.geoPolyhedralWaterman=gu,v.geoProject=xc,v.geoGringortenQuincuncial=wr,v.geoPeirceQuincuncial=Gr,v.geoPierceQuincuncial=Gr,v.geoQuantize=kn,v.geoQuincuncial=rd,v.geoRectangularPolyconic=ta,v.geoRectangularPolyconicRaw=_n,v.geoRobinson=Ai,v.geoRobinsonRaw=ja,v.geoSatellite=hi,v.geoSatelliteRaw=oo,v.geoSinuMollweide=ql,v.geoSinuMollweideRaw=wo,v.geoSinusoidal=Yt,v.geoSinusoidalRaw=ht,v.geoStitch=eu,v.geoTimes=Ls,v.geoTimesRaw=No,v.geoTwoPointAzimuthal=Mc,v.geoTwoPointAzimuthalRaw=Cl,v.geoTwoPointAzimuthalUsa=Ec,v.geoTwoPointEquidistant=Cc,v.geoTwoPointEquidistantRaw=Ic,v.geoTwoPointEquidistantUsa=uh,v.geoVanDerGrinten=ju,v.geoVanDerGrintenRaw=jf,v.geoVanDerGrinten2=os,v.geoVanDerGrinten2Raw=Uf,v.geoVanDerGrinten3=qf,v.geoVanDerGrinten3Raw=_s,v.geoVanDerGrinten4=Yc,v.geoVanDerGrinten4Raw=sf,v.geoWagner=fe,v.geoWagner7=Re,v.geoWagnerRaw=O,v.geoWagner4=Nt,v.geoWagner4Raw=Ct,v.geoWagner6=Tr,v.geoWagner6Raw=rr,v.geoWiechel=Vr,v.geoWiechelRaw=Fr,v.geoWinkel3=Dn,v.geoWinkel3Raw=mn,Object.defineProperty(v,"__esModule",{value:!0})})}}),OJ=Ne({"src/plots/geo/zoom.js"(te,Z){var v=xn(),w=In(),C=Yo(),P=Math.PI/180,t=180/Math.PI,r={cursor:"pointer"},a={cursor:"auto"};function l(p,x){var N=p.projection,D;return x._isScoped?D=o:x._isClipped?D=d:D=u,D(p,N)}Z.exports=l;function i(p,x){return v.behavior.zoom().translate(x.translate()).scale(x.scale())}function s(p,x,N){var D=p.id,B=p.graphDiv,U=B.layout,V=U[D],q=B._fullLayout,z=q[D],H={},G={};function J(le,ge){H[D+"."+le]=w.nestedProperty(V,le).get(),C.call("_storeDirectGUIEdit",U,q._preGUI,H);var de=w.nestedProperty(z,le);de.get()!==ge&&(de.set(ge),w.nestedProperty(V,le).set(ge),G[D+"."+le]=ge)}N(J),J("projection.scale",x.scale()/p.fitScale),J("fitbounds",!1),B.emit("plotly_relayout",G)}function o(p,x){var N=i(p,x);function D(){v.select(this).style(r)}function B(){x.scale(v.event.scale).translate(v.event.translate),p.render(!0);var q=x.invert(p.midPt);p.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":x.scale()/p.fitScale,"geo.center.lon":q[0],"geo.center.lat":q[1]})}function U(q){var z=x.invert(p.midPt);q("center.lon",z[0]),q("center.lat",z[1])}function V(){v.select(this).style(a),s(p,x,U)}return N.on("zoomstart",D).on("zoom",B).on("zoomend",V),N}function u(p,x){var N=i(p,x),D=2,B,U,V,q,z,H,G,J,le;function ge(ee){return x.invert(ee)}function de(ee){var pe=ge(ee);if(!pe)return!0;var oe=x(pe);return Math.abs(oe[0]-ee[0])>D||Math.abs(oe[1]-ee[1])>D}function me(){v.select(this).style(r),B=v.mouse(this),U=x.rotate(),V=x.translate(),q=U,z=ge(B)}function W(){if(H=v.mouse(this),de(B)){N.scale(x.scale()),N.translate(x.translate());return}x.scale(v.event.scale),x.translate([V[0],v.event.translate[1]]),z?ge(H)&&(J=ge(H),G=[q[0]+(J[0]-z[0]),U[1],U[2]],x.rotate(G),q=G):(B=H,z=ge(B)),le=!0,p.render(!0);var ee=x.rotate(),pe=x.invert(p.midPt);p.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":x.scale()/p.fitScale,"geo.center.lon":pe[0],"geo.center.lat":pe[1],"geo.projection.rotation.lon":-ee[0]})}function ie(){v.select(this).style(a),le&&s(p,x,se)}function se(ee){var pe=x.rotate(),oe=x.invert(p.midPt);ee("projection.rotation.lon",-pe[0]),ee("center.lon",oe[0]),ee("center.lat",oe[1])}return N.on("zoomstart",me).on("zoom",W).on("zoomend",ie),N}function d(p,x){x.rotate(),x.scale();var N=i(p,x),D=f(N,"zoomstart","zoom","zoomend"),B=0,U=N.on,V;N.on("zoomstart",function(){v.select(this).style(r);var J=v.mouse(this),le=x.rotate(),ge=le,de=x.translate(),me=g(le);V=h(x,J),U.call(N,"zoom",function(){var W=v.mouse(this);if(x.scale(v.event.scale),!V)J=W,V=h(x,J);else if(h(x,W)){x.rotate(le).translate(de);var ie=h(x,W),se=E(V,ie),ee=k(m(me,se)),pe=c(ee,V,ge);(!isFinite(pe[0])||!isFinite(pe[1])||!isFinite(pe[2]))&&(pe=ge),x.rotate(pe),ge=pe}z(D.of(this,arguments))}),q(D.of(this,arguments))}).on("zoomend",function(){v.select(this).style(a),U.call(N,"zoom",null),H(D.of(this,arguments)),s(p,x,G)}).on("zoom.redraw",function(){p.render(!0);var J=x.rotate();p.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":x.scale()/p.fitScale,"geo.projection.rotation.lon":-J[0],"geo.projection.rotation.lat":-J[1]})});function q(J){B++||J({type:"zoomstart"})}function z(J){J({type:"zoom"})}function H(J){--B||J({type:"zoomend"})}function G(J){var le=x.rotate();J("projection.rotation.lon",-le[0]),J("projection.rotation.lat",-le[1])}return v.rebind(N,D,"on")}function h(p,x){var N=p.invert(x);return N&&isFinite(N[0])&&isFinite(N[1])&&b(N)}function g(p){var x=.5*p[0]*P,N=.5*p[1]*P,D=.5*p[2]*P,B=Math.sin(x),U=Math.cos(x),V=Math.sin(N),q=Math.cos(N),z=Math.sin(D),H=Math.cos(D);return[U*q*H+B*V*z,B*q*H-U*V*z,U*V*H+B*q*z,U*q*z-B*V*H]}function m(p,x){var N=p[0],D=p[1],B=p[2],U=p[3],V=x[0],q=x[1],z=x[2],H=x[3];return[N*V-D*q-B*z-U*H,N*q+D*V+B*H-U*z,N*z-D*H+B*V+U*q,N*H+D*z-B*q+U*V]}function E(p,x){if(!(!p||!x)){var N=y(p,x),D=Math.sqrt(A(N,N)),B=.5*Math.acos(Math.max(-1,Math.min(1,A(p,x)))),U=Math.sin(B)/D;return D&&[Math.cos(B),N[2]*U,-N[1]*U,N[0]*U]}}function c(p,x,N){var D=M(x,2,p[0]);D=M(D,1,p[1]),D=M(D,0,p[2]-N[2]);var B=x[0],U=x[1],V=x[2],q=D[0],z=D[1],H=D[2],G=Math.atan2(U,B)*t,J=Math.sqrt(B*B+U*U),le,ge;Math.abs(z)>J?(ge=(z>0?90:-90)-G,le=0):(ge=Math.asin(z/J)*t-G,le=Math.sqrt(J*J-z*z));var de=180-ge-2*G,me=(Math.atan2(H,q)-Math.atan2(V,le))*t,W=(Math.atan2(H,q)-Math.atan2(V,-le))*t,ie=_(N[0],N[1],ge,me),se=_(N[0],N[1],de,W);return ie<=se?[ge,me,N[2]]:[de,W,N[2]]}function _(p,x,N,D){var B=T(N-p),U=T(D-x);return Math.sqrt(B*B+U*U)}function T(p){return(p%360+540)%360-180}function M(p,x,N){var D=N*P,B=p.slice(),U=x===0?1:0,V=x===2?1:2,q=Math.cos(D),z=Math.sin(D);return B[U]=p[U]*q-p[V]*z,B[V]=p[V]*q+p[U]*z,B}function k(p){return[Math.atan2(2*(p[0]*p[1]+p[2]*p[3]),1-2*(p[1]*p[1]+p[2]*p[2]))*t,Math.asin(Math.max(-1,Math.min(1,2*(p[0]*p[2]-p[3]*p[1]))))*t,Math.atan2(2*(p[0]*p[3]+p[1]*p[2]),1-2*(p[2]*p[2]+p[3]*p[3]))*t]}function b(p){var x=p[0]*P,N=p[1]*P,D=Math.cos(N);return[D*Math.cos(x),D*Math.sin(x),Math.sin(N)]}function A(p,x){for(var N=0,D=0,B=p.length;D<B;++D)N+=p[D]*x[D];return N}function y(p,x){return[p[1]*x[2]-p[2]*x[1],p[2]*x[0]-p[0]*x[2],p[0]*x[1]-p[1]*x[0]]}function f(p){for(var x=0,N=arguments.length,D=[];++x<N;)D.push(arguments[x]);var B=v.dispatch.apply(null,D);return B.of=function(U,V){return function(q){var z;try{z=q.sourceEvent=v.event,q.target=p,v.event=q,B[q.type].apply(U,V)}finally{v.event=z}}},B}}}),zJ=Ne({"src/plots/geo/geo.js"(te,Z){var v=xn(),w=pN(),C=w.geoPath,P=w.geoDistance,t=DJ(),r=Yo(),a=In(),l=a.strTranslate,i=Ha(),s=zs(),o=oh(),u=ff(),d=Os(),h=Cm().getAutoRange,g=Uv(),m=dh().prepSelect,E=dh().clearOutline,c=dh().selectOnClick,_=OJ(),T=uk(),M=Ob(),k=wR(),b=hN().feature;function A(N){this.id=N.id,this.graphDiv=N.graphDiv,this.container=N.container,this.topojsonURL=N.topojsonURL,this.isStatic=N.staticPlot,this.topojsonName=null,this.topojson=null,this.projection=null,this.scope=null,this.viewInitial=null,this.fitScale=null,this.bounds=null,this.midPt=null,this.hasChoropleth=!1,this.traceHash={},this.layers={},this.basePaths={},this.dataPaths={},this.dataPoints={},this.clipDef=null,this.clipRect=null,this.bgRect=null,this.makeFramework()}var y=A.prototype;Z.exports=function(D){return new A(D)},y.plot=function(N,D,B,U){var V=this;if(U)return V.update(N,D,!0);V._geoCalcData=N,V._fullLayout=D;var q=D[this.id],z=[],H=!1;for(var G in T.layerNameToAdjective)if(G!=="frame"&&q["show"+G]){H=!0;break}for(var J=!1,le=0;le<N.length;le++){var ge=N[0][0].trace;ge._geo=V,ge.locationmode&&(H=!0);var de=ge.marker;if(de){var me=de.angle,W=de.angleref;(me||W==="north"||W==="previous")&&(J=!0)}}if(this._hasMarkerAngles=J,H){var ie=k.getTopojsonName(q);(V.topojson===null||ie!==V.topojsonName)&&(V.topojsonName=ie,PlotlyGeoAssets.topojson[V.topojsonName]===void 0&&z.push(V.fetchTopojson()))}z=z.concat(M.fetchTraceGeoData(N)),B.push(new Promise(function(se,ee){Promise.all(z).then(function(){V.topojson=PlotlyGeoAssets.topojson[V.topojsonName],V.update(N,D),se()}).catch(ee)}))},y.fetchTopojson=function(){var N=this,D=k.getTopojsonPath(N.topojsonURL,N.topojsonName);return new Promise(function(B,U){v.json(D,function(V,q){if(V)return V.status===404?U(new Error(["plotly.js could not find topojson file at",D+".","Make sure the *topojsonURL* plot config option","is set properly."].join(" "))):U(new Error(["unexpected error while fetching topojson file at",D].join(" ")));PlotlyGeoAssets.topojson[N.topojsonName]=q,B()})})},y.update=function(N,D,B){var U=D[this.id];this.hasChoropleth=!1;for(var V=0;V<N.length;V++){var q=N[V],z=q[0].trace;z.type==="choropleth"&&(this.hasChoropleth=!0),z.visible===!0&&z._length>0&&z._module.calcGeoJSON(q,D)}if(!B){var H=this.updateProjection(N,D);if(H)return;(!this.viewInitial||this.scope!==U.scope)&&this.saveViewInitial(U)}this.scope=U.scope,this.updateBaseLayers(D,U),this.updateDims(D,U),this.updateFx(D,U),u.generalUpdatePerTraceModule(this.graphDiv,this,N,U);var G=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=G.selectAll(".point"),this.dataPoints.text=G.selectAll("text"),this.dataPaths.line=G.selectAll(".js-line");var J=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=J.selectAll("path"),this._render()},y.updateProjection=function(N,D){var B=this.graphDiv,U=D[this.id],V=D._size,q=U.domain,z=U.projection,H=U.lonaxis,G=U.lataxis,J=H._ax,le=G._ax,ge=this.projection=f(U),de=[[V.l+V.w*q.x[0],V.t+V.h*(1-q.y[1])],[V.l+V.w*q.x[1],V.t+V.h*(1-q.y[0])]],me=U.center||{},W=z.rotation||{},ie=H.range||[],se=G.range||[];if(U.fitbounds){J._length=de[1][0]-de[0][0],le._length=de[1][1]-de[0][1],J.range=h(B,J),le.range=h(B,le);var ee=(J.range[0]+J.range[1])/2,pe=(le.range[0]+le.range[1])/2;if(U._isScoped)me={lon:ee,lat:pe};else if(U._isClipped){me={lon:ee,lat:pe},W={lon:ee,lat:pe,roll:W.roll};var oe=z.type,Y=T.lonaxisSpan[oe]/2||180,ce=T.lataxisSpan[oe]/2||90;ie=[ee-Y,ee+Y],se=[pe-ce,pe+ce]}else me={lon:ee,lat:pe},W={lon:ee,lat:W.lat,roll:W.roll}}ge.center([me.lon-W.lon,me.lat-W.lat]).rotate([-W.lon,-W.lat,W.roll]).parallels(z.parallels);var ue=x(ie,se);ge.fitExtent(de,ue);var _e=this.bounds=ge.getBounds(ue),Le=this.fitScale=ge.scale(),ze=ge.translate();if(U.fitbounds){var Xe=ge.getBounds(x(J.range,le.range)),Ve=Math.min((_e[1][0]-_e[0][0])/(Xe[1][0]-Xe[0][0]),(_e[1][1]-_e[0][1])/(Xe[1][1]-Xe[0][1]));isFinite(Ve)?ge.scale(Ve*Le):a.warn("Something went wrong during"+this.id+"fitbounds computations.")}else ge.scale(z.scale*Le);var rt=this.midPt=[(_e[0][0]+_e[1][0])/2,(_e[0][1]+_e[1][1])/2];if(ge.translate([ze[0]+(rt[0]-ze[0]),ze[1]+(rt[1]-ze[1])]).clipExtent(_e),U._isAlbersUsa){var mt=ge([me.lon,me.lat]),_t=ge.translate();ge.translate([_t[0]-(mt[0]-_t[0]),_t[1]-(mt[1]-_t[1])])}},y.updateBaseLayers=function(N,D){var B=this,U=B.topojson,V=B.layers,q=B.basePaths;function z(de){return de==="lonaxis"||de==="lataxis"}function H(de){return!!T.lineLayers[de]}function G(de){return!!T.fillLayers[de]}var J=this.hasChoropleth?T.layersForChoropleth:T.layers,le=J.filter(function(de){return H(de)||G(de)?D["show"+de]:z(de)?D[de].showgrid:!0}),ge=B.framework.selectAll(".layer").data(le,String);ge.exit().each(function(de){delete V[de],delete q[de],v.select(this).remove()}),ge.enter().append("g").attr("class",function(de){return"layer "+de}).each(function(de){var me=V[de]=v.select(this);de==="bg"?B.bgRect=me.append("rect").style("pointer-events","all"):z(de)?q[de]=me.append("path").style("fill","none"):de==="backplot"?me.append("g").classed("choroplethlayer",!0):de==="frontplot"?me.append("g").classed("scatterlayer",!0):H(de)?q[de]=me.append("path").style("fill","none").style("stroke-miterlimit",2):G(de)&&(q[de]=me.append("path").style("stroke","none"))}),ge.order(),ge.each(function(de){var me=q[de],W=T.layerNameToAdjective[de];de==="frame"?me.datum(T.sphereSVG):H(de)||G(de)?me.datum(b(U,U.objects[de])):z(de)&&me.datum(p(de,D,N)).call(i.stroke,D[de].gridcolor).call(s.dashLine,D[de].griddash,D[de].gridwidth),H(de)?me.call(i.stroke,D[W+"color"]).call(s.dashLine,"",D[W+"width"]):G(de)&&me.call(i.fill,D[W+"color"])})},y.updateDims=function(N,D){var B=this.bounds,U=(D.framewidth||0)/2,V=B[0][0]-U,q=B[0][1]-U,z=B[1][0]-V+U,H=B[1][1]-q+U;s.setRect(this.clipRect,V,q,z,H),this.bgRect.call(s.setRect,V,q,z,H).call(i.fill,D.bgcolor),this.xaxis._offset=V,this.xaxis._length=z,this.yaxis._offset=q,this.yaxis._length=H},y.updateFx=function(N,D){var B=this,U=B.graphDiv,V=B.bgRect,q=N.dragmode,z=N.clickmode;if(B.isStatic)return;function H(){var ge=B.viewInitial,de={};for(var me in ge)de[B.id+"."+me]=ge[me];r.call("_guiRelayout",U,de),U.emit("plotly_doubleclick",null)}function G(ge){return B.projection.invert([ge[0]+B.xaxis._offset,ge[1]+B.yaxis._offset])}var J=function(ge,de){if(de.isRect){var me=ge.range={};me[B.id]=[G([de.xmin,de.ymin]),G([de.xmax,de.ymax])]}else{var W=ge.lassoPoints={};W[B.id]=de.map(G)}},le={element:B.bgRect.node(),gd:U,plotinfo:{id:B.id,xaxis:B.xaxis,yaxis:B.yaxis,fillRangeItems:J},xaxes:[B.xaxis],yaxes:[B.yaxis],subplot:B.id,clickFn:function(ge){ge===2&&E(U)}};q==="pan"?(V.node().onmousedown=null,V.call(_(B,D)),V.on("dblclick.zoom",H),U._context._scrollZoom.geo||V.on("wheel.zoom",null)):(q==="select"||q==="lasso")&&(V.on(".zoom",null),le.prepFn=function(ge,de,me){m(ge,de,me,le,q)},g.init(le)),V.on("mousemove",function(){var ge=B.projection.invert(a.getPositionFromD3Event());if(!ge)return g.unhover(U,v.event);B.xaxis.p2c=function(){return ge[0]},B.yaxis.p2c=function(){return ge[1]},o.hover(U,v.event,B.id)}),V.on("mouseout",function(){U._dragging||g.unhover(U,v.event)}),V.on("click",function(){q!=="select"&&q!=="lasso"&&(z.indexOf("select")>-1&&c(v.event,U,[B.xaxis],[B.yaxis],B.id,le),z.indexOf("event")>-1&&o.click(U,v.event))})},y.makeFramework=function(){var N=this,D=N.graphDiv,B=D._fullLayout,U="clip"+B._uid+N.id;N.clipDef=B._clips.append("clipPath").attr("id",U),N.clipRect=N.clipDef.append("rect"),N.framework=v.select(N.container).append("g").attr("class","geo "+N.id).call(s.setClipUrl,U,D),N.project=function(V){var q=N.projection(V);return q?[q[0]-N.xaxis._offset,q[1]-N.yaxis._offset]:[null,null]},N.xaxis={_id:"x",c2p:function(V){return N.project(V)[0]}},N.yaxis={_id:"y",c2p:function(V){return N.project(V)[1]}},N.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},d.setConvert(N.mockAxis,B)},y.saveViewInitial=function(N){var D=N.center||{},B=N.projection,U=B.rotation||{};this.viewInitial={fitbounds:N.fitbounds,"projection.scale":B.scale};var V;N._isScoped?V={"center.lon":D.lon,"center.lat":D.lat}:N._isClipped?V={"projection.rotation.lon":U.lon,"projection.rotation.lat":U.lat}:V={"center.lon":D.lon,"center.lat":D.lat,"projection.rotation.lon":U.lon},a.extendFlat(this.viewInitial,V)},y.render=function(N){this._hasMarkerAngles&&N?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},y._render=function(){var N=this.projection,D=N.getPath(),B;function U(q){var z=N(q.lonlat);return z?l(z[0],z[1]):null}function V(q){return N.isLonLatOverEdges(q.lonlat)?"none":null}for(B in this.basePaths)this.basePaths[B].attr("d",D);for(B in this.dataPaths)this.dataPaths[B].attr("d",function(q){return D(q.geojson)});for(B in this.dataPoints)this.dataPoints[B].attr("display",V).attr("transform",U)};function f(N){var D=N.projection,B=D.type,U=T.projNames[B];U="geo"+a.titleCase(U);for(var V=w[U]||t[U],q=V(),z=N._isSatellite?Math.acos(1/D.distance)*180/Math.PI:N._isClipped?T.lonaxisSpan[B]/2:null,H=["center","rotate","parallels","clipExtent"],G=function(ge){return ge?q:[]},J=0;J<H.length;J++){var le=H[J];typeof q[le]!="function"&&(q[le]=G)}return q.isLonLatOverEdges=function(ge){if(q(ge)===null)return!0;if(z){var de=q.rotate(),me=P(ge,[-de[0],-de[1]]),W=z*Math.PI/180;return me>W}else return!1},q.getPath=function(){return C().projection(q)},q.getBounds=function(ge){return q.getPath().bounds(ge)},q.precision(T.precision),N._isSatellite&&q.tilt(D.tilt).distance(D.distance),z&&q.clipAngle(z-T.clipPad),q}function p(N,D,B){var U=1e-6,V=2.5,q=D[N],z=T.scopeDefaults[D.scope],H,G,J;N==="lonaxis"?(H=z.lonaxisRange,G=z.lataxisRange,J=function(pe,oe){return[pe,oe]}):N==="lataxis"&&(H=z.lataxisRange,G=z.lonaxisRange,J=function(pe,oe){return[oe,pe]});var le={type:"linear",range:[H[0],H[1]-U],tick0:q.tick0,dtick:q.dtick};d.setConvert(le,B);var ge=d.calcTicks(le);!D.isScoped&&N==="lonaxis"&&ge.pop();for(var de=ge.length,me=new Array(de),W=0;W<de;W++)for(var ie=ge[W].x,se=me[W]=[],ee=G[0];ee<G[1]+V;ee+=V)se.push(J(ie,ee));return{type:"MultiLineString",coordinates:me}}function x(N,D){var B=T.clipPad,U=N[0]+B,V=N[1]-B,q=D[0]+B,z=D[1]-B;U>0&&V<0&&(V+=360);var H=(V-U)/4;return{type:"Polygon",coordinates:[[[U,q],[U,z],[U+H,z],[U+2*H,z],[U+3*H,z],[V,z],[V,q],[V-H,q],[V-2*H,q],[V-3*H,q],[U,q]]]}}}}),mN=Ne({"src/plots/geo/layout_attributes.js"(te,Z){var v=js(),w=Fc().attributes,C=Fd().dash,P=uk(),t=ef().overrideAll,r=Sm(),a={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:v.lightLine},gridwidth:{valType:"number",min:0,dflt:1},griddash:C},l=Z.exports=t({domain:w({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:r(P.scopeDefaults),dflt:"world"},projection:{type:{valType:"enumerated",values:r(P.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:v.defaultLine},coastlinewidth:{valType:"number",min:0,dflt:1},showland:{valType:"boolean",dflt:!1},landcolor:{valType:"color",dflt:P.landColor},showocean:{valType:"boolean",dflt:!1},oceancolor:{valType:"color",dflt:P.waterColor},showlakes:{valType:"boolean",dflt:!1},lakecolor:{valType:"color",dflt:P.waterColor},showrivers:{valType:"boolean",dflt:!1},rivercolor:{valType:"color",dflt:P.waterColor},riverwidth:{valType:"number",min:0,dflt:1},showcountries:{valType:"boolean"},countrycolor:{valType:"color",dflt:v.defaultLine},countrywidth:{valType:"number",min:0,dflt:1},showsubunits:{valType:"boolean"},subunitcolor:{valType:"color",dflt:v.defaultLine},subunitwidth:{valType:"number",min:0,dflt:1},showframe:{valType:"boolean"},framecolor:{valType:"color",dflt:v.defaultLine},framewidth:{valType:"number",min:0,dflt:1},bgcolor:{valType:"color",dflt:v.background},lonaxis:a,lataxis:a},"plot","from-root");l.uirevision={valType:"any",editType:"none"}}}),NJ=Ne({"src/plots/geo/layout_defaults.js"(te,Z){var v=In(),w=W0(),C=lv().getSubplotData,P=uk(),t=mN(),r=P.axesNames;Z.exports=function(i,s,o){w(i,s,o,{type:"geo",attributes:t,handleDefaults:a,fullData:o,partition:"y"})};function a(l,i,s,o){var u=C(o.fullData,"geo",o.id),d=u.map(function(se){return se.index}),h=s("resolution"),g=s("scope"),m=P.scopeDefaults[g],E=s("projection.type",m.projType),c=i._isAlbersUsa=E==="albers usa";c&&(g=i.scope="usa");var _=i._isScoped=g!=="world",T=i._isSatellite=E==="satellite",M=i._isConic=E.indexOf("conic")!==-1||E==="albers",k=i._isClipped=!!P.lonaxisSpan[E];if(l.visible===!1){var b=v.extendDeep({},i._template);b.showcoastlines=!1,b.showcountries=!1,b.showframe=!1,b.showlakes=!1,b.showland=!1,b.showocean=!1,b.showrivers=!1,b.showsubunits=!1,b.lonaxis&&(b.lonaxis.showgrid=!1),b.lataxis&&(b.lataxis.showgrid=!1),i._template=b}for(var A=s("visible"),y,f=0;f<r.length;f++){var p=r[f],x=[30,10][f],N;if(_)N=m[p+"Range"];else{var D=P[p+"Span"],B=(D[E]||D["*"])/2,U=s("projection.rotation."+p.substr(0,3),m.projRotate[f]);N=[U-B,U+B]}var V=s(p+".range",N);s(p+".tick0"),s(p+".dtick",x),y=s(p+".showgrid",A?void 0:!1),y&&(s(p+".gridcolor"),s(p+".gridwidth"),s(p+".griddash")),i[p]._ax={type:"linear",_id:p.slice(0,3),_traceIndices:d,setScale:v.identity,c2l:v.identity,r2l:v.identity,autorange:!0,range:V.slice(),_m:1,_input:{}}}var q=i.lonaxis.range,z=i.lataxis.range,H=q[0],G=q[1];H>0&&G<0&&(G+=360);var J=(H+G)/2,le;if(!c){var ge=_?m.projRotate:[J,0,0];le=s("projection.rotation.lon",ge[0]),s("projection.rotation.lat",ge[1]),s("projection.rotation.roll",ge[2]),y=s("showcoastlines",!_&&A),y&&(s("coastlinecolor"),s("coastlinewidth")),y=s("showocean",A?void 0:!1),y&&s("oceancolor")}var de,me;if(c?(de=-96.6,me=38.7):(de=_?J:le,me=(z[0]+z[1])/2),s("center.lon",de),s("center.lat",me),T&&(s("projection.tilt"),s("projection.distance")),M){var W=m.projParallels||[0,60];s("projection.parallels",W)}s("projection.scale"),y=s("showland",A?void 0:!1),y&&s("landcolor"),y=s("showlakes",A?void 0:!1),y&&s("lakecolor"),y=s("showrivers",A?void 0:!1),y&&(s("rivercolor"),s("riverwidth")),y=s("showcountries",_&&g!=="usa"&&A),y&&(s("countrycolor"),s("countrywidth")),(g==="usa"||g==="north america"&&h===50)&&(s("showsubunits",A),s("subunitcolor"),s("subunitwidth")),_||(y=s("showframe",A),y&&(s("framecolor"),s("framewidth"))),s("bgcolor");var ie=s("fitbounds");ie&&(delete i.projection.scale,_?(delete i.center.lon,delete i.center.lat):k?(delete i.center.lon,delete i.center.lat,delete i.projection.rotation.lon,delete i.projection.rotation.lat,delete i.lonaxis.range,delete i.lataxis.range):(delete i.center.lon,delete i.center.lat,delete i.projection.rotation.lon))}}}),gN=Ne({"src/plots/geo/index.js"(te,Z){var v=lv().getSubplotCalcData,w=In().counterRegex,C=zJ(),P="geo",t=w(P),r={};r[P]={valType:"subplotid",dflt:P,editType:"calc"};function a(s){for(var o=s._fullLayout,u=s.calcdata,d=o._subplots[P],h=0;h<d.length;h++){var g=d[h],m=v(u,P,g),E=o[g],c=E._subplot;c||(c=C({id:g,graphDiv:s,container:o._geolayer.node(),topojsonURL:s._context.topojsonURL,staticPlot:s._context.staticPlot}),o[g]._subplot=c),c.plot(m,o,s._promises)}}function l(s,o,u,d){for(var h=d._subplots[P]||[],g=0;g<h.length;g++){var m=h[g],E=d[m]._subplot;!o[m]&&E&&(E.framework.remove(),E.clipDef.remove())}}function i(s){for(var o=s._fullLayout,u=o._subplots[P],d=0;d<u.length;d++){var h=o[u[d]],g=h._subplot;g.updateFx(o,h)}}Z.exports={attr:P,name:P,idRoot:P,idRegex:t,attrRegex:t,attributes:r,layoutAttributes:mN(),supplyLayoutDefaults:NJ(),plot:a,updateFx:i,clean:l}}}),FJ=Ne({"src/traces/scattergeo/index.js"(te,Z){Z.exports={attributes:m3(),supplyDefaults:SJ(),colorbar:sh(),formatLabels:EJ(),calc:bR(),calcGeoJSON:vN().calcGeoJSON,plot:vN().plot,style:dN(),styleOnSelect:Xh().styleOnSelect,hoverPoints:LJ(),eventData:RJ(),selectPoints:IJ(),moduleType:"trace",name:"scattergeo",basePlotModule:gN(),categories:["geo","symbols","showLegend","scatter-like"],meta:{}}}}),BJ=Ne({"lib/scattergeo.js"(te,Z){Z.exports=FJ()}}),KS=Ne({"src/traces/choropleth/attributes.js"(te,Z){var{hovertemplateAttrs:v,templatefallbackAttrs:w}=Fl(),C=m3(),P=Wu(),t=qo(),r=js().defaultLine,a=fi().extendFlat,l=C.marker.line;Z.exports=a({locations:{valType:"data_array",editType:"calc"},locationmode:C.locationmode,z:{valType:"data_array",editType:"calc"},geojson:a({},C.geojson,{}),featureidkey:C.featureidkey,text:a({},C.text,{}),hovertext:a({},C.hovertext,{}),marker:{line:{color:a({},l.color,{dflt:r}),width:a({},l.width,{dflt:1}),editType:"calc"},opacity:{valType:"number",arrayOk:!0,min:0,max:1,dflt:1,editType:"style"},editType:"calc"},selected:{marker:{opacity:C.selected.marker.opacity,editType:"plot"},editType:"plot"},unselected:{marker:{opacity:C.unselected.marker.opacity,editType:"plot"},editType:"plot"},hoverinfo:a({},t.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:v(),hovertemplatefallback:w(),showlegend:a({},t.showlegend,{dflt:!1})},P("",{cLetter:"z",editTypeOverride:"calc"}))}}),jJ=Ne({"src/traces/choropleth/defaults.js"(te,Z){var v=In(),w=Rh(),C=KS(),P=["The library used by the *country names* `locationmode` option is changing in the next major version.","Some country names in existing plots may not work in the new version.","To ensure consistent behavior, consider setting `locationmode` to *ISO-3*."].join(" ");Z.exports=function(r,a,l,i){function s(E,c){return v.coerce(r,a,C,E,c)}var o=s("locations"),u=s("z");if(!(o&&o.length&&v.isArrayOrTypedArray(u)&&u.length)){a.visible=!1;return}a._length=Math.min(o.length,u.length);var d=s("geojson"),h;(typeof d=="string"&&d!==""||v.isPlainObject(d))&&(h="geojson-id");var g=s("locationmode",h);g==="country names"&&v.warn(P),g==="geojson-id"&&s("featureidkey"),s("text"),s("hovertext"),s("hovertemplate"),s("hovertemplatefallback");var m=s("marker.line.width");m&&s("marker.line.color"),s("marker.opacity"),w(r,a,i,s,{prefix:"",cLetter:"z"}),v.coerceSelectionMarkerOpacity(a,s)}}}),SR=Ne({"src/traces/choropleth/calc.js"(te,Z){var v=Fn(),w=da().BADNUM,C=Ud(),P=s0(),t=Gh();function r(a){return a&&typeof a=="string"}Z.exports=function(l,i){var s=i._length,o=new Array(s),u;i.geojson?u=function(E){return r(E)||v(E)}:u=r;for(var d=0;d<s;d++){var h=o[d]={},g=i.locations[d],m=i.z[d];u(g)&&v(m)?(h.loc=g,h.z=m):(h.loc=null,h.z=w),h.index=d}return P(o,i),C(l,i,{vals:i.z,containerStr:"",cLetter:"z"}),t(o,i),o}}}),ER=Ne({"src/traces/choropleth/style.js"(te,Z){var v=xn(),w=Ha(),C=zs(),P=Nc();function t(l,i){i&&r(l,i)}function r(l,i){var s=i[0].trace,o=i[0].node3,u=o.selectAll(".choroplethlocation"),d=s.marker||{},h=d.line||{},g=P.makeColorScaleFuncFromTrace(s);u.each(function(m){v.select(this).attr("fill",g(m.z)).call(w.stroke,m.mlc||h.color).call(C.dashLine,"",m.mlw||h.width||0).style("opacity",d.opacity)}),C.selectedPointStyle(u,s)}function a(l,i){var s=i[0].node3,o=i[0].trace;o.selectedpoints?C.selectedPointStyle(s.selectAll(".choroplethlocation"),o):r(l,i)}Z.exports={style:t,styleOnSelect:a}}}),yN=Ne({"src/traces/choropleth/plot.js"(te,Z){var v=xn(),w=In(),C=Ob(),P=wR().getTopojsonFeatures,t=Cm().findExtremes,r=ER().style;function a(i,s,o){var u=s.layers.backplot.select(".choroplethlayer");w.makeTraceGroups(u,o,"trace choropleth").each(function(d){var h=v.select(this),g=h.selectAll("path.choroplethlocation").data(w.identity);g.enter().append("path").classed("choroplethlocation",!0),g.exit().remove(),r(i,d)})}function l(i,s){for(var o=i[0].trace,u=s[o.geo],d=u._subplot,h=o.locationmode,g=o._length,m=h==="geojson-id"?C.extractTraceFeature(i):P(o,d.topojson),E=[],c=[],_=0;_<g;_++){var T=i[_],M=h==="geojson-id"?T.fOut:C.locationToFeature(h,T.loc,m);if(M){T.geojson=M,T.ct=M.properties.ct,T._polygons=C.feature2polygons(M);var k=C.computeBbox(M);E.push(k[0],k[2]),c.push(k[1],k[3])}else T.geojson=null}if(u.fitbounds==="geojson"&&h==="geojson-id"){var b=C.computeBbox(C.getTraceGeojson(o));E=[b[0],b[2]],c=[b[1],b[3]]}var A={padded:!0};o._extremes.lon=t(u.lonaxis._ax,E,A),o._extremes.lat=t(u.lataxis._ax,c,A)}Z.exports={calcGeoJSON:l,plot:a}}}),MR=Ne({"src/traces/choropleth/hover.js"(te,Z){var v=Os(),w=KS(),C=In().fillText;Z.exports=function(r,a,l){var i=r.cd,s=i[0].trace,o=r.subplot,u,d,h,g,m=[a,l],E=[a+360,l];for(d=0;d<i.length;d++)if(u=i[d],g=!1,u._polygons){for(h=0;h<u._polygons.length;h++)u._polygons[h].contains(m)&&(g=!g),u._polygons[h].contains(E)&&(g=!g);if(g)break}if(!(!g||!u))return r.x0=r.x1=r.xa.c2p(u.ct),r.y0=r.y1=r.ya.c2p(u.ct),r.index=u.index,r.location=u.loc,r.z=u.z,r.zLabel=v.tickText(o.mockAxis,o.mockAxis.c2l(u.z),"hover").text,r.hovertemplate=u.hovertemplate,P(r,s,u),[r]};function P(t,r,a){if(!r.hovertemplate){var l=a.hi||r.hoverinfo,i=String(a.loc),s=l==="all"?w.hoverinfo.flags:l.split("+"),o=s.indexOf("name")!==-1,u=s.indexOf("location")!==-1,d=s.indexOf("z")!==-1,h=s.indexOf("text")!==-1,g=!o&&u,m=[];g?t.nameOverride=i:(o&&(t.nameOverride=r.name),u&&m.push(i)),d&&m.push(t.zLabel),h&&C(a,r,m),t.extraText=m.join("<br>")}}}}),CR=Ne({"src/traces/choropleth/event_data.js"(te,Z){Z.exports=function(w,C,P,t,r){w.location=C.location,w.z=C.z;var a=t[r];return a.fIn&&a.fIn.properties&&(w.properties=a.fIn.properties),w.ct=a.ct,w}}}),kR=Ne({"src/traces/choropleth/select.js"(te,Z){Z.exports=function(w,C){var P=w.cd,t=w.xaxis,r=w.yaxis,a=[],l,i,s,o,u;if(C===!1)for(l=0;l<P.length;l++)P[l].selected=0;else for(l=0;l<P.length;l++)i=P[l],s=i.ct,s&&(o=t.c2p(s),u=r.c2p(s),C.contains([o,u],null,l,w)?(a.push({pointNumber:l,lon:s[0],lat:s[1]}),i.selected=1):i.selected=0);return a}}}),UJ=Ne({"src/traces/choropleth/index.js"(te,Z){Z.exports={attributes:KS(),supplyDefaults:jJ(),colorbar:Bg(),calc:SR(),calcGeoJSON:yN().calcGeoJSON,plot:yN().plot,style:ER().style,styleOnSelect:ER().styleOnSelect,hoverPoints:MR(),eventData:CR(),selectPoints:kR(),moduleType:"trace",name:"choropleth",basePlotModule:gN(),categories:["geo","noOpacity","showLegend"],meta:{}}}}),qJ=Ne({"lib/choropleth.js"(te,Z){Z.exports=UJ()}}),PR=Ne({"src/traces/scattergl/hover.js"(te,Z){var v=Yo(),w=In(),C=G1();function P(r,a,l,i){var s=r.cd,o=s[0].t,u=s[0].trace,d=r.xa,h=r.ya,g=o.x,m=o.y,E=d.c2p(a),c=h.c2p(l),_=r.distance,T;if(o.tree){var M=d.p2c(E-_),k=d.p2c(E+_),b=h.p2c(c-_),A=h.p2c(c+_);i==="x"?T=o.tree.range(Math.min(M,k),Math.min(h._rl[0],h._rl[1]),Math.max(M,k),Math.max(h._rl[0],h._rl[1])):T=o.tree.range(Math.min(M,k),Math.min(b,A),Math.max(M,k),Math.max(b,A))}else T=o.ids;var y,f,p,x,N,D,B,U,V,q=_;if(i==="x"){var z=!!u.xperiodalignment,H=!!u.yperiodalignment;for(N=0;N<T.length;N++){if(y=T[N],p=g[y],D=Math.abs(d.c2p(p)-E),z){var G=d.c2p(u._xStarts[y]),J=d.c2p(u._xEnds[y]);D=E>=Math.min(G,J)&&E<=Math.max(G,J)?0:1/0}if(D<q){if(q=D,x=m[y],B=h.c2p(x)-c,H){var le=h.c2p(u._yStarts[y]),ge=h.c2p(u._yEnds[y]);B=c>=Math.min(le,ge)&&c<=Math.max(le,ge)?0:1/0}V=Math.sqrt(D*D+B*B),f=T[N]}}}else for(N=T.length-1;N>-1;N--)y=T[N],p=g[y],x=m[y],D=d.c2p(p)-E,B=h.c2p(x)-c,U=Math.sqrt(D*D+B*B),U<q&&(q=V=U,f=y);return r.index=f,r.distance=q,r.dxy=V,f===void 0?[r]:[t(r,g,m,u)]}function t(r,a,l,i){var s=r.xa,o=r.ya,u=r.distance,d=r.dxy,h=r.index,g={pointNumber:h,x:a[h],y:l[h]};g.tx=w.isArrayOrTypedArray(i.text)?i.text[h]:i.text,g.htx=Array.isArray(i.hovertext)?i.hovertext[h]:i.hovertext,g.data=Array.isArray(i.customdata)?i.customdata[h]:i.customdata,g.tp=Array.isArray(i.textposition)?i.textposition[h]:i.textposition;var m=i.textfont;m&&(g.ts=w.isArrayOrTypedArray(m.size)?m.size[h]:m.size,g.tc=w.isArrayOrTypedArray(m.color)?m.color[h]:m.color,g.tf=Array.isArray(m.family)?m.family[h]:m.family,g.tw=Array.isArray(m.weight)?m.weight[h]:m.weight,g.ty=Array.isArray(m.style)?m.style[h]:m.style,g.tv=Array.isArray(m.variant)?m.variant[h]:m.variant);var E=i.marker;E&&(g.ms=w.isArrayOrTypedArray(E.size)?E.size[h]:E.size,g.mo=w.isArrayOrTypedArray(E.opacity)?E.opacity[h]:E.opacity,g.mx=w.isArrayOrTypedArray(E.symbol)?E.symbol[h]:E.symbol,g.ma=w.isArrayOrTypedArray(E.angle)?E.angle[h]:E.angle,g.mc=w.isArrayOrTypedArray(E.color)?E.color[h]:E.color);var c=E&&E.line;c&&(g.mlc=Array.isArray(c.color)?c.color[h]:c.color,g.mlw=w.isArrayOrTypedArray(c.width)?c.width[h]:c.width);var _=E&&E.gradient;_&&_.type!=="none"&&(g.mgt=Array.isArray(_.type)?_.type[h]:_.type,g.mgc=Array.isArray(_.color)?_.color[h]:_.color);var T=s.c2p(g.x,!0),M=o.c2p(g.y,!0),k=g.mrc||1,b=i.hoverlabel;b&&(g.hbg=Array.isArray(b.bgcolor)?b.bgcolor[h]:b.bgcolor,g.hbc=Array.isArray(b.bordercolor)?b.bordercolor[h]:b.bordercolor,g.hts=w.isArrayOrTypedArray(b.font.size)?b.font.size[h]:b.font.size,g.htc=Array.isArray(b.font.color)?b.font.color[h]:b.font.color,g.htf=Array.isArray(b.font.family)?b.font.family[h]:b.font.family,g.hnl=w.isArrayOrTypedArray(b.namelength)?b.namelength[h]:b.namelength);var A=i.hoverinfo;A&&(g.hi=Array.isArray(A)?A[h]:A);var y=i.hovertemplate;y&&(g.ht=Array.isArray(y)?y[h]:y);var f={};f[r.index]=g;var p=i._origX,x=i._origY,N=w.extendFlat({},r,{color:C(i,g),x0:T-k,x1:T+k,xLabelVal:p?p[h]:g.x,y0:M-k,y1:M+k,yLabelVal:x?x[h]:g.y,cd:f,distance:u,spikeDistance:d,hovertemplate:g.ht});return g.htx?N.text=g.htx:g.tx?N.text=g.tx:i.text&&(N.text=i.text),w.fillText(g,i,N),v.getComponentMethod("errorbars","hoverInfo")(g,i,N),N}Z.exports={hoverPoints:P,calcHover:t}}}),zb=Ne({"src/traces/scattergl/constants.js"(te,Z){var v=20;Z.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]}}}}),fk=Ne({"src/traces/scattergl/attributes.js"(te,Z){var v=qo(),w=bo(),C=qv(),P=tf(),t=Ac().axisHoverFormat,r=Wu(),a=Sm(),l=fi().extendFlat,i=ef().overrideAll,s=zb().DASHES,o=P.line,u=P.marker,d=u.line,h=Z.exports=i({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:t("x"),yhoverformat:t("y"),text:P.text,hovertext:P.hovertext,textposition:P.textposition,textfont:w({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,noNumericWeightValues:!0,variantValues:["normal","small-caps"]}),mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"]},line:{color:o.color,width:o.width,shape:{valType:"enumerated",values:["linear","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},dash:{valType:"enumerated",values:a(s),dflt:"solid"}},marker:l({},r("marker"),{symbol:u.symbol,angle:u.angle,size:u.size,sizeref:u.sizeref,sizemin:u.sizemin,sizemode:u.sizemode,opacity:u.opacity,colorbar:u.colorbar,line:l({},r("marker.line"),{width:d.width})}),connectgaps:P.connectgaps,fill:l({},P.fill,{dflt:"none"}),fillcolor:C(),selected:{marker:P.selected.marker,textfont:P.selected.textfont},unselected:{marker:P.unselected.marker,textfont:P.unselected.textfont},opacity:v.opacity},"calc","nested");h.x.editType=h.y.editType=h.x0.editType=h.y0.editType="calc+clearAxisTypes",h.hovertemplate=P.hovertemplate,h.hovertemplatefallback=P.hovertemplatefallback,h.texttemplate=P.texttemplate,h.texttemplatefallback=P.texttemplatefallback}}),LR=Ne({"src/traces/scattergl/helpers.js"(te){var Z=zb();te.isOpenSymbol=function(v){return typeof v=="string"?Z.OPEN_RE.test(v):v%200>100},te.isDotSymbol=function(v){return typeof v=="string"?Z.DOT_RE.test(v):v>200}}}),VJ=Ne({"src/traces/scattergl/defaults.js"(te,Z){var v=In(),w=Yo(),C=LR(),P=fk(),t=i0(),r=yu(),a=Lm(),l=Rm(),i=wv(),s=Im(),o=uv(),u=Wp();Z.exports=function(h,g,m,E){function c(f,p){return v.coerce(h,g,P,f,p)}var _=h.marker?C.isOpenSymbol(h.marker.symbol):!1,T=r.isBubble(h),M=a(h,g,E,c);if(!M){g.visible=!1;return}l(h,g,E,c),c("xhoverformat"),c("yhoverformat");var k=M<t.PTS_LINESONLY?"lines+markers":"lines";c("text"),c("hovertext"),c("hovertemplate"),c("hovertemplatefallback"),c("mode",k),r.hasMarkers(g)&&(i(h,g,m,E,c,{noAngleRef:!0,noStandOff:!0}),c("marker.line.width",_||T?1:0)),r.hasLines(g)&&(c("connectgaps"),s(h,g,m,E,c),c("line.shape")),r.hasText(g)&&(c("texttemplate"),c("texttemplatefallback"),u(h,g,E,c,{noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var b=(g.line||{}).color,A=(g.marker||{}).color;c("fill"),g.fill!=="none"&&o(h,g,m,c);var y=w.getComponentMethod("errorbars","supplyDefaults");y(h,g,b||A||m,{axis:"y"}),y(h,g,b||A||m,{axis:"x",inherit:"y"}),v.coerceSelectionMarkerOpacity(g,c)}}}),HJ=Ne({"src/traces/scattergl/format_labels.js"(te,Z){var v=lm();Z.exports=function(C,P,t){var r=C.i;return"x"in C||(C.x=P._x[r]),"y"in C||(C.y=P._y[r]),v(C,P,t)}}}),GJ=Ne({"node_modules/binary-search-bounds/search-bounds.js"(te,Z){function v(a,l,i,s,o){for(var u=o+1;s<=o;){var d=s+o>>>1,h=a[d],g=i!==void 0?i(h,l):h-l;g>=0?(u=d,o=d-1):s=d+1}return u}function w(a,l,i,s,o){for(var u=o+1;s<=o;){var d=s+o>>>1,h=a[d],g=i!==void 0?i(h,l):h-l;g>0?(u=d,o=d-1):s=d+1}return u}function C(a,l,i,s,o){for(var u=s-1;s<=o;){var d=s+o>>>1,h=a[d],g=i!==void 0?i(h,l):h-l;g<0?(u=d,s=d+1):o=d-1}return u}function P(a,l,i,s,o){for(var u=s-1;s<=o;){var d=s+o>>>1,h=a[d],g=i!==void 0?i(h,l):h-l;g<=0?(u=d,s=d+1):o=d-1}return u}function t(a,l,i,s,o){for(;s<=o;){var u=s+o>>>1,d=a[u],h=i!==void 0?i(d,l):d-l;if(h===0)return u;h<=0?s=u+1:o=u-1}return-1}function r(a,l,i,s,o,u){return typeof i=="function"?u(a,l,i,s===void 0?0:s|0,o===void 0?a.length-1:o|0):u(a,l,void 0,i===void 0?0:i|0,s===void 0?a.length-1:s|0)}Z.exports={ge:function(a,l,i,s,o){return r(a,l,i,s,o,v)},gt:function(a,l,i,s,o){return r(a,l,i,s,o,w)},lt:function(a,l,i,s,o){return r(a,l,i,s,o,C)},le:function(a,l,i,s,o){return r(a,l,i,s,o,P)},eq:function(a,l,i,s,o){return r(a,l,i,s,o,t)}}}}),n1=Ne({"node_modules/pick-by-alias/index.js"(te,Z){Z.exports=function(P,t,r){var a={},l,i;if(typeof t=="string"&&(t=w(t)),Array.isArray(t)){var s={};for(i=0;i<t.length;i++)s[t[i]]=!0;t=s}for(l in t)t[l]=w(t[l]);var o={};for(l in t){var u=t[l];if(Array.isArray(u))for(i=0;i<u.length;i++){var d=u[i];if(r&&(o[d]=!0),d in P){if(a[l]=P[d],r)for(var h=i;h<u.length;h++)o[u[h]]=!0;break}}else l in P&&(t[l]&&(a[l]=P[l]),r&&(o[l]=!0))}if(r)for(l in P)o[l]||(a[l]=P[l]);return a};var v={};function w(C){return v[C]?v[C]:(typeof C=="string"&&(C=v[C]=C.split(/\s*,\s*|\s+/)),C)}}}),JS=Ne({"node_modules/parse-rect/index.js"(te,Z){var v=n1();Z.exports=w;function w(C){var P;return arguments.length>1&&(C=arguments),typeof C=="string"?C=C.split(/\s/).map(parseFloat):typeof C=="number"&&(C=[C]),C.length&&typeof C[0]=="number"?C.length===1?P={width:C[0],height:C[0],x:0,y:0}:C.length===2?P={width:C[0],height:C[1],x:0,y:0}:P={x:C[0],y:C[1],width:C[2]-C[0]||0,height:C[3]-C[1]||0}:C&&(C=v(C,{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"}),P={x:C.left||0,y:C.top||0},C.width==null?C.right?P.width=C.right-P.x:P.width=0:P.width=C.width,C.height==null?C.bottom?P.height=C.bottom-P.y:P.height=0:P.height=C.height),P}}}),g3=Ne({"node_modules/array-bounds/index.js"(te,Z){Z.exports=v;function v(w,C){if(!w||w.length==null)throw Error("Argument should be an array");C==null?C=1:C=Math.floor(C);for(var P=Array(C*2),t=0;t<C;t++){for(var r=-1/0,a=1/0,l=t,i=w.length;l<i;l+=C)w[l]>r&&(r=w[l]),w[l]<a&&(a=w[l]);P[t]=a,P[C+t]=r}return P}}}),XJ=Ne({"node_modules/defined/index.js"(te,Z){Z.exports=function(){for(var v=0;v<arguments.length;v++)if(arguments[v]!==void 0)return arguments[v]}}}),y3=Ne({"node_modules/flatten-vertex-data/index.js"(te,Z){var v=mR();Z.exports=w;function w(C,P,t){if(!C)throw new TypeError("must specify data as first parameter");if(t=+(t||0)|0,Array.isArray(C)&&C[0]&&typeof C[0][0]=="number"){var r=C[0].length,a=C.length*r,l,i,s,o;(!P||typeof P=="string")&&(P=new(v(P||"float32"))(a+t));var u=P.length-t;if(a!==u)throw new Error("source length "+a+" ("+r+"x"+C.length+") does not match destination length "+u);for(l=0,s=t;l<C.length;l++)for(i=0;i<r;i++)P[s++]=C[l][i]===null?NaN:C[l][i]}else if(!P||typeof P=="string"){var d=v(P||"float32");if(Array.isArray(C)||P==="array")for(P=new d(C.length+t),l=0,s=t,o=P.length;s<o;s++,l++)P[s]=C[l]===null?NaN:C[l];else t===0?P=new d(C):(P=new d(C.length+t),P.set(C,t))}else P.set(C,t);return P}}}),WJ=Ne({"node_modules/is-obj/index.js"(te,Z){Z.exports=function(v){var w=typeof v;return v!==null&&(w==="object"||w==="function")}}}),YJ=Ne({"node_modules/math-log2/index.js"(te,Z){Z.exports=Math.log2||function(v){return Math.log(v)*Math.LOG2E}}}),ZJ=Ne({"node_modules/@plotly/point-cluster/quad.js"(te,Z){var v=GJ(),w=sk(),C=JS(),P=g3(),t=n1(),r=XJ(),a=y3(),l=WJ(),i=mR(),s=YJ(),o=1073741824;Z.exports=function(h,g){g||(g={}),h=a(h,"float64"),g=t(g,{bounds:"range bounds dataBox databox",maxDepth:"depth maxDepth maxdepth level maxLevel maxlevel levels",dtype:"type dtype format out dst output destination"});let m=r(g.maxDepth,255),E=r(g.bounds,P(h,2));E[0]===E[2]&&E[2]++,E[1]===E[3]&&E[3]++;let c=u(h,E),_=h.length>>>1,T;g.dtype||(g.dtype="array"),typeof g.dtype=="string"?T=new(i(g.dtype))(_):g.dtype&&(T=g.dtype,Array.isArray(T)&&(T.length=_));for(let D=0;D<_;++D)T[D]=D;let M=[],k=[],b=[],A=[];f(0,0,1,T,0,1);let y=0;for(let D=0;D<M.length;D++){let B=M[D];if(T.set)T.set(B,y);else for(let V=0,q=B.length;V<q;V++)T[V+y]=B[V];let U=y+M[D].length;A[D]=[y,U],y=U}return T.range=p,T;function f(D,B,U,V,q,z){if(!V.length)return null;let H=M[q]||(M[q]=[]),G=b[q]||(b[q]=[]),J=k[q]||(k[q]=[]),le=H.length;if(q++,q>m||z>o){for(let pe=0;pe<V.length;pe++)H.push(V[pe]),G.push(z),J.push(null,null,null,null);return le}if(H.push(V[0]),G.push(z),V.length<=1)return J.push(null,null,null,null),le;let ge=U*.5,de=D+ge,me=B+ge,W=[],ie=[],se=[],ee=[];for(let pe=1,oe=V.length;pe<oe;pe++){let Y=V[pe],ce=c[Y*2],ue=c[Y*2+1];ce<de?ue<me?W.push(Y):ie.push(Y):ue<me?se.push(Y):ee.push(Y)}return z<<=2,J.push(f(D,B,ge,W,q,z),f(D,me,ge,ie,q,z+1),f(de,B,ge,se,q,z+2),f(de,me,ge,ee,q,z+3)),le}function p(...D){let B;if(l(D[D.length-1])){let se=D.pop();!D.length&&(se.x!=null||se.l!=null||se.left!=null)&&(D=[se],B={}),B=t(se,{level:"level maxLevel",d:"d diam diameter r radius px pxSize pixel pixelSize maxD size minSize",lod:"lod details ranges offsets"})}else B={};D.length||(D=E);let U=C(...D),[V,q,z,H]=[Math.min(U.x,U.x+U.width),Math.min(U.y,U.y+U.height),Math.max(U.x,U.x+U.width),Math.max(U.y,U.y+U.height)],[G,J,le,ge]=u([V,q,z,H],E),de=r(B.level,M.length);if(B.d!=null){let se;typeof B.d=="number"?se=[B.d,B.d]:B.d.length&&(se=B.d),de=Math.min(Math.max(Math.ceil(-s(Math.abs(se[0])/(E[2]-E[0]))),Math.ceil(-s(Math.abs(se[1])/(E[3]-E[1])))),de)}if(de=Math.min(de,M.length),B.lod)return x(G,J,le,ge,de);let me=[];W(0,0,1,0,0,1);function W(se,ee,pe,oe,Y,ce){if(Y===null||ce===null)return;let ue=se+pe,_e=ee+pe;if(G>ue||J>_e||le<se||ge<ee||oe>=de||Y===ce)return;let Le=M[oe];ce===void 0&&(ce=Le.length);for(let Fe=Y;Fe<ce;Fe++){let Pe=Le[Fe],be=h[Pe*2],Ye=h[Pe*2+1];be>=V&&be<=z&&Ye>=q&&Ye<=H&&me.push(Pe)}let ze=k[oe],Xe=ze[Y*4+0],Ve=ze[Y*4+1],rt=ze[Y*4+2],mt=ze[Y*4+3],_t=ie(ze,Y+1),vt=pe*.5,ut=oe+1;W(se,ee,vt,ut,Xe,Ve||rt||mt||_t),W(se,ee+vt,vt,ut,Ve,rt||mt||_t),W(se+vt,ee,vt,ut,rt,mt||_t),W(se+vt,ee+vt,vt,ut,mt,_t)}function ie(se,ee){let pe=null,oe=0;for(;pe===null;)if(pe=se[ee*4+oe],oe++,oe>se.length)return null;return pe}return me}function x(D,B,U,V,q){let z=[];for(let H=0;H<q;H++){let G=b[H],J=A[H][0],le=N(D,B,H),ge=N(U,V,H),de=v.ge(G,le),me=v.gt(G,ge,de,G.length-1);z[H]=[de+J,me+J]}return z}function N(D,B,U){let V=1,q=.5,z=.5,H=.5;for(let G=0;G<U;G++)V<<=2,V+=D<q?B<z?0:1:B<z?2:3,H*=.5,q+=D<q?-H:H,z+=B<z?-H:H;return V}};function u(d,h){let[g,m,E,c]=h,_=1/(E-g),T=1/(c-m),M=new Array(d.length);for(let k=0,b=d.length/2;k<b;k++)M[2*k]=w((d[2*k]-g)*_,0,1),M[2*k+1]=w((d[2*k+1]-m)*T,0,1);return M}}}),RR=Ne({"node_modules/@plotly/point-cluster/index.js"(te,Z){Z.exports=ZJ()}}),_N=Ne({"node_modules/abs-svg-path/index.js"(te,Z){Z.exports=v;function v(w){var C=0,P=0,t=0,r=0;return w.map(function(a){a=a.slice();var l=a[0],i=l.toUpperCase();if(l!=i)switch(a[0]=i,l){case"a":a[6]+=t,a[7]+=r;break;case"v":a[1]+=r;break;case"h":a[1]+=t;break;default:for(var s=1;s<a.length;)a[s++]+=t,a[s++]+=r}switch(i){case"Z":t=C,r=P;break;case"H":t=a[1];break;case"V":r=a[1];break;case"M":t=C=a[1],r=P=a[2];break;default:t=a[a.length-2],r=a[a.length-1]}return a})}}}),$J=Ne({"node_modules/svg-arc-to-cubic-bezier/cjs/index.js"(te,Z){Object.defineProperty(te,"__esModule",{value:!0});var v=(function(){function l(i,s){var o=[],u=!0,d=!1,h=void 0;try{for(var g=i[Symbol.iterator](),m;!(u=(m=g.next()).done)&&(o.push(m.value),!(s&&o.length===s));u=!0);}catch(E){d=!0,h=E}finally{try{!u&&g.return&&g.return()}finally{if(d)throw h}}return o}return function(i,s){if(Array.isArray(i))return i;if(Symbol.iterator in Object(i))return l(i,s);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),w=Math.PI*2,C=function(i,s,o,u,d,h,g){var m=i.x,E=i.y;m*=s,E*=o;var c=u*m-d*E,_=d*m+u*E;return{x:c+h,y:_+g}},P=function(i,s){var o=s===1.5707963267948966?.551915024494:s===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(s/4),u=Math.cos(i),d=Math.sin(i),h=Math.cos(i+s),g=Math.sin(i+s);return[{x:u-d*o,y:d+u*o},{x:h+g*o,y:g-h*o},{x:h,y:g}]},t=function(i,s,o,u){var d=i*u-s*o<0?-1:1,h=i*o+s*u;return h>1&&(h=1),h<-1&&(h=-1),d*Math.acos(h)},r=function(i,s,o,u,d,h,g,m,E,c,_,T){var M=Math.pow(d,2),k=Math.pow(h,2),b=Math.pow(_,2),A=Math.pow(T,2),y=M*k-M*A-k*b;y<0&&(y=0),y/=M*A+k*b,y=Math.sqrt(y)*(g===m?-1:1);var f=y*d/h*T,p=y*-h/d*_,x=c*f-E*p+(i+o)/2,N=E*f+c*p+(s+u)/2,D=(_-f)/d,B=(T-p)/h,U=(-_-f)/d,V=(-T-p)/h,q=t(1,0,D,B),z=t(D,B,U,V);return m===0&&z>0&&(z-=w),m===1&&z<0&&(z+=w),[x,N,q,z]},a=function(i){var s=i.px,o=i.py,u=i.cx,d=i.cy,h=i.rx,g=i.ry,m=i.xAxisRotation,E=m===void 0?0:m,c=i.largeArcFlag,_=c===void 0?0:c,T=i.sweepFlag,M=T===void 0?0:T,k=[];if(h===0||g===0)return[];var b=Math.sin(E*w/360),A=Math.cos(E*w/360),y=A*(s-u)/2+b*(o-d)/2,f=-b*(s-u)/2+A*(o-d)/2;if(y===0&&f===0)return[];h=Math.abs(h),g=Math.abs(g);var p=Math.pow(y,2)/Math.pow(h,2)+Math.pow(f,2)/Math.pow(g,2);p>1&&(h*=Math.sqrt(p),g*=Math.sqrt(p));var x=r(s,o,u,d,h,g,_,M,b,A,y,f),N=v(x,4),D=N[0],B=N[1],U=N[2],V=N[3],q=Math.abs(V)/(w/4);Math.abs(1-q)<1e-7&&(q=1);var z=Math.max(Math.ceil(q),1);V/=z;for(var H=0;H<z;H++)k.push(P(U,V)),U+=V;return k.map(function(G){var J=C(G[0],h,g,A,b,D,B),le=J.x,ge=J.y,de=C(G[1],h,g,A,b,D,B),me=de.x,W=de.y,ie=C(G[2],h,g,A,b,D,B),se=ie.x,ee=ie.y;return{x1:le,y1:ge,x2:me,y2:W,x:se,y:ee}})};te.default=a,Z.exports=te.default}}),KJ=Ne({"node_modules/svg-path-bounds/node_modules/normalize-svg-path/index.js"(te,Z){Z.exports=w;var v=$J();function w(t){for(var r,a=[],l=0,i=0,s=0,o=0,u=null,d=null,h=0,g=0,m=0,E=t.length;m<E;m++){var c=t[m],_=c[0];switch(_){case"M":s=c[1],o=c[2];break;case"A":var T=v({px:h,py:g,cx:c[6],cy:c[7],rx:c[1],ry:c[2],xAxisRotation:c[3],largeArcFlag:c[4],sweepFlag:c[5]});if(!T.length)continue;for(var M=0,k;M<T.length;M++)k=T[M],c=["C",k.x1,k.y1,k.x2,k.y2,k.x,k.y],M<T.length-1&&a.push(c);break;case"S":var b=h,A=g;(r=="C"||r=="S")&&(b+=b-l,A+=A-i),c=["C",b,A,c[1],c[2],c[3],c[4]];break;case"T":r=="Q"||r=="T"?(u=h*2-u,d=g*2-d):(u=h,d=g),c=P(h,g,u,d,c[1],c[2]);break;case"Q":u=c[1],d=c[2],c=P(h,g,c[1],c[2],c[3],c[4]);break;case"L":c=C(h,g,c[1],c[2]);break;case"H":c=C(h,g,c[1],g);break;case"V":c=C(h,g,h,c[1]);break;case"Z":c=C(h,g,s,o);break}r=_,h=c[c.length-2],g=c[c.length-1],c.length>4?(l=c[c.length-4],i=c[c.length-3]):(l=h,i=g),a.push(c)}return a}function C(t,r,a,l){return["C",t,r,a,l,a,l]}function P(t,r,a,l,i,s){return["C",t/3+2/3*a,r/3+2/3*l,i/3+2/3*a,s/3+2/3*l,i,s]}}}),xN=Ne({"node_modules/is-svg-path/index.js"(te,Z){Z.exports=function(w){return typeof w!="string"?!1:(w=w.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(w)&&/[\dz]$/i.test(w)&&w.length>4))}}}),JJ=Ne({"node_modules/svg-path-bounds/index.js"(te,Z){var v=wg(),w=_N(),C=KJ(),P=xN(),t=c_();Z.exports=r;function r(a){if(Array.isArray(a)&&a.length===1&&typeof a[0]=="string"&&(a=a[0]),typeof a=="string"&&(t(P(a),"String is not an SVG path."),a=v(a)),t(Array.isArray(a),"Argument should be a string or an array of path segments."),a=w(a),a=C(a),!a.length)return[0,0,0,0];for(var l=[1/0,1/0,-1/0,-1/0],i=0,s=a.length;i<s;i++)for(var o=a[i].slice(1),u=0;u<o.length;u+=2)o[u+0]<l[0]&&(l[0]=o[u+0]),o[u+1]<l[1]&&(l[1]=o[u+1]),o[u+0]>l[2]&&(l[2]=o[u+0]),o[u+1]>l[3]&&(l[3]=o[u+1]);return l}}}),QJ=Ne({"node_modules/normalize-svg-path/index.js"(te,Z){var v=Math.PI,w=l(120);Z.exports=C;function C(i){for(var s,o=[],u=0,d=0,h=0,g=0,m=null,E=null,c=0,_=0,T=0,M=i.length;T<M;T++){var k=i[T],b=k[0];switch(b){case"M":h=k[1],g=k[2];break;case"A":k=r(c,_,k[1],k[2],l(k[3]),k[4],k[5],k[6],k[7]),k.unshift("C"),k.length>7&&(o.push(k.splice(0,7)),k.unshift("C"));break;case"S":var A=c,y=_;(s=="C"||s=="S")&&(A+=A-u,y+=y-d),k=["C",A,y,k[1],k[2],k[3],k[4]];break;case"T":s=="Q"||s=="T"?(m=c*2-m,E=_*2-E):(m=c,E=_),k=t(c,_,m,E,k[1],k[2]);break;case"Q":m=k[1],E=k[2],k=t(c,_,k[1],k[2],k[3],k[4]);break;case"L":k=P(c,_,k[1],k[2]);break;case"H":k=P(c,_,k[1],_);break;case"V":k=P(c,_,c,k[1]);break;case"Z":k=P(c,_,h,g);break}s=b,c=k[k.length-2],_=k[k.length-1],k.length>4?(u=k[k.length-4],d=k[k.length-3]):(u=c,d=_),o.push(k)}return o}function P(i,s,o,u){return["C",i,s,o,u,o,u]}function t(i,s,o,u,d,h){return["C",i/3+2/3*o,s/3+2/3*u,d/3+2/3*o,h/3+2/3*u,d,h]}function r(i,s,o,u,d,h,g,m,E,c){if(c)x=c[0],N=c[1],f=c[2],p=c[3];else{var _=a(i,s,-d);i=_.x,s=_.y,_=a(m,E,-d),m=_.x,E=_.y;var T=(i-m)/2,M=(s-E)/2,k=T*T/(o*o)+M*M/(u*u);k>1&&(k=Math.sqrt(k),o=k*o,u=k*u);var b=o*o,A=u*u,y=(h==g?-1:1)*Math.sqrt(Math.abs((b*A-b*M*M-A*T*T)/(b*M*M+A*T*T)));y==1/0&&(y=1);var f=y*o*M/u+(i+m)/2,p=y*-u*T/o+(s+E)/2,x=Math.asin(((s-p)/u).toFixed(9)),N=Math.asin(((E-p)/u).toFixed(9));x=i<f?v-x:x,N=m<f?v-N:N,x<0&&(x=v*2+x),N<0&&(N=v*2+N),g&&x>N&&(x=x-v*2),!g&&N>x&&(N=N-v*2)}if(Math.abs(N-x)>w){var D=N,B=m,U=E;N=x+w*(g&&N>x?1:-1),m=f+o*Math.cos(N),E=p+u*Math.sin(N);var V=r(m,E,o,u,d,0,g,B,U,[N,D,f,p])}var q=Math.tan((N-x)/4),z=4/3*o*q,H=4/3*u*q,G=[2*i-(i+z*Math.sin(x)),2*s-(s-H*Math.cos(x)),m+z*Math.sin(N),E-H*Math.cos(N),m,E];if(c)return G;V&&(G=G.concat(V));for(var J=0;J<G.length;){var le=a(G[J],G[J+1],d);G[J++]=le.x,G[J++]=le.y}return G}function a(i,s,o){return{x:i*Math.cos(o)-s*Math.sin(o),y:i*Math.sin(o)+s*Math.cos(o)}}function l(i){return i*(v/180)}}}),eQ=Ne({"node_modules/draw-svg-path/index.js"(te,Z){var v=_N(),w=QJ(),C={M:"moveTo",C:"bezierCurveTo"};Z.exports=function(P,t){P.beginPath(),w(v(t)).forEach(function(r){var a=r[0],l=r.slice(1);P[C[a]].apply(P,l)}),P.closePath()}}}),tQ=Ne({"node_modules/bitmap-sdf/index.js"(te,Z){var v=sk();Z.exports=C;var w=1e20;function C(r,a){a||(a={});var l=a.cutoff==null?.25:a.cutoff,i=a.radius==null?8:a.radius,s=a.channel||0,o,u,d,h,g,m,E,c,_,T,M;if(ArrayBuffer.isView(r)||Array.isArray(r)){if(!a.width||!a.height)throw Error("For raw data width and height should be provided by options");o=a.width,u=a.height,h=r,a.stride?m=a.stride:m=Math.floor(r.length/o/u)}else window.HTMLCanvasElement&&r instanceof window.HTMLCanvasElement?(c=r,E=c.getContext("2d"),o=c.width,u=c.height,_=E.getImageData(0,0,o,u),h=_.data,m=4):window.CanvasRenderingContext2D&&r instanceof window.CanvasRenderingContext2D?(c=r.canvas,E=r,o=c.width,u=c.height,_=E.getImageData(0,0,o,u),h=_.data,m=4):window.ImageData&&r instanceof window.ImageData&&(_=r,o=r.width,u=r.height,h=_.data,m=4);if(d=Math.max(o,u),window.Uint8ClampedArray&&h instanceof window.Uint8ClampedArray||window.Uint8Array&&h instanceof window.Uint8Array)for(g=h,h=Array(o*u),T=0,M=g.length;T<M;T++)h[T]=g[T*m+s]/255;else if(m!==1)throw Error("Raw data can have only 1 value per pixel");var k=Array(o*u),b=Array(o*u),A=Array(d),y=Array(d),f=Array(d+1),p=Array(d);for(T=0,M=o*u;T<M;T++){var x=h[T];k[T]=x===1?0:x===0?w:Math.pow(Math.max(0,.5-x),2),b[T]=x===1?w:x===0?0:Math.pow(Math.max(0,x-.5),2)}P(k,o,u,A,y,p,f),P(b,o,u,A,y,p,f);var N=window.Float32Array?new Float32Array(o*u):new Array(o*u);for(T=0,M=o*u;T<M;T++)N[T]=v(1-((k[T]-b[T])/i+l),0,1);return N}function P(r,a,l,i,s,o,u){for(var d=0;d<a;d++){for(var h=0;h<l;h++)i[h]=r[h*a+d];for(t(i,s,o,u,l),h=0;h<l;h++)r[h*a+d]=s[h]}for(h=0;h<l;h++){for(d=0;d<a;d++)i[d]=r[h*a+d];for(t(i,s,o,u,a),d=0;d<a;d++)r[h*a+d]=Math.sqrt(s[d])}}function t(r,a,l,i,s){l[0]=0,i[0]=-w,i[1]=+w;for(var o=1,u=0;o<s;o++){for(var d=(r[o]+o*o-(r[l[u]]+l[u]*l[u]))/(2*o-2*l[u]);d<=i[u];)u--,d=(r[o]+o*o-(r[l[u]]+l[u]*l[u]))/(2*o-2*l[u]);u++,l[u]=o,i[u]=d,i[u+1]=+w}for(o=0,u=0;o<s;o++){for(;i[u+1]<o;)u++;a[o]=(o-l[u])*(o-l[u])+r[l[u]]}}}}),rQ=Ne({"node_modules/svg-path-sdf/index.js"(te,Z){var v=JJ(),w=wg(),C=eQ(),P=xN(),t=tQ(),r=document.createElement("canvas"),a=r.getContext("2d");Z.exports=l;function l(o,u){if(!P(o))throw Error("Argument should be valid svg path string");u||(u={});var d,h;u.shape?(d=u.shape[0],h=u.shape[1]):(d=r.width=u.w||u.width||200,h=r.height=u.h||u.height||200);var g=Math.min(d,h),m=u.stroke||0,E=u.viewbox||u.viewBox||v(o),c=[d/(E[2]-E[0]),h/(E[3]-E[1])],_=Math.min(c[0]||0,c[1]||0)/2;if(a.fillStyle="black",a.fillRect(0,0,d,h),a.fillStyle="white",m&&(typeof m!="number"&&(m=1),m>0?a.strokeStyle="white":a.strokeStyle="black",a.lineWidth=Math.abs(m)),a.translate(d*.5,h*.5),a.scale(_,_),s()){var T=new Path2D(o);a.fill(T),m&&a.stroke(T)}else{var M=w(o);C(a,M),a.fill(),m&&a.stroke()}a.setTransform(1,0,0,1,0,0);var k=t(a,{cutoff:u.cutoff!=null?u.cutoff:.5,radius:u.radius!=null?u.radius:g*.5});return k}var i;function s(){if(i!=null)return i;var o=document.createElement("canvas").getContext("2d");if(o.canvas.width=o.canvas.height=1,!window.Path2D)return i=!1;var u=new Path2D("M0,0h1v1h-1v-1Z");o.fillStyle="black",o.fill(u);var d=o.getImageData(0,0,1,1);return i=d&&d.data&&d.data[3]===255}}}),_3=Ne({"src/traces/scattergl/convert.js"(te,Z){var v=Fn(),w=rQ(),C=Rb(),P=Yo(),t=In(),r=t.isArrayOrTypedArray,a=zs(),l=Wf(),i=k_().formatColor,s=yu(),o=Mm(),u=LR(),d=zb(),h=El().DESELECTDIM,g={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},m=bv().appendArrayPointValue;function E(V,q){var z,H={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},G=V._context.plotGlPixelRatio;if(q.visible!==!0)return H;if(s.hasText(q)&&(H.text=c(V,q),H.textSel=k(V,q,q.selected),H.textUnsel=k(V,q,q.unselected)),s.hasMarkers(q)&&(H.marker=T(V,q),H.markerSel=M(V,q,q.selected),H.markerUnsel=M(V,q,q.unselected),!q.unselected&&r(q.marker.opacity))){var J=q.marker.opacity;for(H.markerUnsel.opacity=new Array(J.length),z=0;z<J.length;z++)H.markerUnsel.opacity[z]=h*J[z]}if(s.hasLines(q)){H.line={overlay:!0,thickness:q.line.width*G,color:q.line.color,opacity:q.opacity};var le=(d.DASHES[q.line.dash]||[1]).slice();for(z=0;z<le.length;++z)le[z]*=q.line.width*G;H.line.dashes=le}return q.error_x&&q.error_x.visible&&(H.errorX=b(q,q.error_x,G)),q.error_y&&q.error_y.visible&&(H.errorY=b(q,q.error_y,G)),q.fill&&q.fill!=="none"&&(H.fill={closed:!0,fill:q.fillcolor,thickness:0}),H}function c(V,q){var z=V._fullLayout,H=q._length,G=q.textfont,J=q.textposition,le=r(J)?J:[J],ge=G.color,de=G.size,me=G.family,W=G.weight,ie=G.style,se=G.variant,ee={},pe,oe=V._context.plotGlPixelRatio,Y=q.texttemplate;if(Y){ee.text=[];var ce=z._d3locale,ue=Array.isArray(Y),_e=ue?Math.min(Y.length,H):H,Le=ue?function(_t){return Y[_t]}:function(){return Y};for(pe=0;pe<_e;pe++){var ze={i:pe},Xe=q._module.formatLabels(ze,q,z),Ve={};m(Ve,q,pe),ee.text.push(t.texttemplateString({data:[Ve,ze,q._meta],fallback:q.texttemplatefallback,labels:Xe,locale:ce,template:Le(pe)}))}}else r(q.text)&&q.text.length<H?ee.text=q.text.slice():ee.text=q.text;if(r(ee.text))for(pe=ee.text.length;pe<H;pe++)ee.text[pe]="";for(ee.opacity=q.opacity,ee.font={},ee.align=[],ee.baseline=[],pe=0;pe<le.length;pe++){var rt=le[pe].split(/\s+/);switch(rt[1]){case"left":ee.align.push("right");break;case"right":ee.align.push("left");break;default:ee.align.push(rt[1])}switch(rt[0]){case"top":ee.baseline.push("bottom");break;case"bottom":ee.baseline.push("top");break;default:ee.baseline.push(rt[0])}}if(r(ge))for(ee.color=new Array(H),pe=0;pe<H;pe++)ee.color[pe]=ge[pe];else ee.color=ge;if(r(de)||Array.isArray(me)||r(W)||Array.isArray(ie)||Array.isArray(se))for(ee.font=new Array(H),pe=0;pe<H;pe++){var mt=ee.font[pe]={};mt.size=(t.isTypedArray(de)?de[pe]:r(de)?v(de[pe])?de[pe]:0:de)*oe,mt.family=Array.isArray(me)?me[pe]:me,mt.weight=_(r(W)?W[pe]:W),mt.style=Array.isArray(ie)?ie[pe]:ie,mt.variant=Array.isArray(se)?se[pe]:se}else ee.font={size:de*oe,family:me,weight:_(W),style:ie,variant:se};return ee}function _(V){return V<=1e3?V>500?"bold":"normal":V}function T(V,q){var z=q._length,H=q.marker,G={},J,le=r(H.symbol),ge=r(H.angle),de=r(H.color),me=r(H.line.color),W=r(H.opacity),ie=r(H.size),se=r(H.line.width),ee;if(le||(ee=u.isOpenSymbol(H.symbol)),le||de||me||W||ge){G.symbols=new Array(z),G.angles=new Array(z),G.colors=new Array(z),G.borderColors=new Array(z);var pe=H.symbol,oe=H.angle,Y=i(H,H.opacity,z),ce=i(H.line,H.opacity,z);if(!r(ce[0])){var ue=ce;for(ce=Array(z),J=0;J<z;J++)ce[J]=ue}if(!r(Y[0])){var _e=Y;for(Y=Array(z),J=0;J<z;J++)Y[J]=_e}if(!r(pe)){var Le=pe;for(pe=Array(z),J=0;J<z;J++)pe[J]=Le}if(!r(oe)){var ze=oe;for(oe=Array(z),J=0;J<z;J++)oe[J]=ze}for(G.symbols=pe,G.angles=oe,G.colors=Y,G.borderColors=ce,J=0;J<z;J++)le&&(ee=u.isOpenSymbol(H.symbol[J])),ee&&(ce[J]=Y[J].slice(),Y[J]=Y[J].slice(),Y[J][3]=0);for(G.opacity=q.opacity,G.markers=new Array(z),J=0;J<z;J++)G.markers[J]=N({mx:G.symbols[J],ma:G.angles[J]},q)}else ee?(G.color=C(H.color,"uint8"),G.color[3]=0,G.borderColor=C(H.color,"uint8")):(G.color=C(H.color,"uint8"),G.borderColor=C(H.line.color,"uint8")),G.opacity=q.opacity*H.opacity,G.marker=N({mx:H.symbol,ma:H.angle},q);var Xe=1,Ve=o(q,Xe),rt;if(ie||se){var mt=G.sizes=new Array(z),_t=G.borderSizes=new Array(z),vt=0,ut;if(ie){for(J=0;J<z;J++)mt[J]=Ve(H.size[J]),vt+=mt[J];ut=vt/z}else for(rt=Ve(H.size),J=0;J<z;J++)mt[J]=rt;if(se)for(J=0;J<z;J++)_t[J]=H.line.width[J];else for(rt=H.line.width,J=0;J<z;J++)_t[J]=rt;G.sizeAvg=ut}else G.size=Ve(H&&H.size||10),G.borderSizes=Ve(H.line.width);return G}function M(V,q,z){var H=q.marker,G={};return z&&(z.marker&&z.marker.symbol?G=T(V,t.extendFlat({},H,z.marker)):z.marker&&(z.marker.size&&(G.size=z.marker.size),z.marker.color&&(G.colors=z.marker.color),z.marker.opacity!==void 0&&(G.opacity=z.marker.opacity))),G}function k(V,q,z){var H={};if(!z)return H;if(z.textfont){var G={opacity:1,text:q.text,texttemplate:q.texttemplate,textposition:q.textposition,textfont:t.extendFlat({},q.textfont)};z.textfont&&t.extendFlat(G.textfont,z.textfont),H=c(V,G)}return H}function b(V,q,z){var H={capSize:q.width*2*z,lineWidth:q.thickness*z,color:q.color};return q.copy_ystyle&&(H=V.error_y),H}var A=d.SYMBOL_SDF_SIZE,y=d.SYMBOL_SIZE,f=d.SYMBOL_STROKE,p={},x=a.symbolFuncs[0](y*.05);function N(V,q){var z=V.mx;if(z==="circle")return null;var H,G,J=a.symbolNumber(z),le=a.symbolFuncs[J%100],ge=!!a.symbolNoDot[J%100],de=!!a.symbolNoFill[J%100],me=u.isDotSymbol(z);if(V.ma&&(z+="_"+V.ma),p[z])return p[z];var W=a.getMarkerAngle(V,q);return me&&!ge?H=le(y*1.1,W)+x:H=le(y,W),G=w(H,{w:A,h:A,viewBox:[-y,-y,y,y],stroke:de?f:-f}),p[z]=G,G||null}function D(V,q,z){var H=z.length,G=H/2,J,le;if(s.hasLines(q)&&G)if(q.line.shape==="hv"){for(J=[],le=0;le<G-1;le++)isNaN(z[le*2])||isNaN(z[le*2+1])?J.push(NaN,NaN,NaN,NaN):(J.push(z[le*2],z[le*2+1]),!isNaN(z[le*2+2])&&!isNaN(z[le*2+3])?J.push(z[le*2+2],z[le*2+1]):J.push(NaN,NaN));J.push(z[H-2],z[H-1])}else if(q.line.shape==="hvh"){for(J=[],le=0;le<G-1;le++)if(isNaN(z[le*2])||isNaN(z[le*2+1])||isNaN(z[le*2+2])||isNaN(z[le*2+3]))!isNaN(z[le*2])&&!isNaN(z[le*2+1])?J.push(z[le*2],z[le*2+1]):J.push(NaN,NaN),J.push(NaN,NaN);else{var ge=(z[le*2]+z[le*2+2])/2;J.push(z[le*2],z[le*2+1],ge,z[le*2+1],ge,z[le*2+3])}J.push(z[H-2],z[H-1])}else if(q.line.shape==="vhv"){for(J=[],le=0;le<G-1;le++)if(isNaN(z[le*2])||isNaN(z[le*2+1])||isNaN(z[le*2+2])||isNaN(z[le*2+3]))!isNaN(z[le*2])&&!isNaN(z[le*2+1])?J.push(z[le*2],z[le*2+1]):J.push(NaN,NaN),J.push(NaN,NaN);else{var de=(z[le*2+1]+z[le*2+3])/2;J.push(z[le*2],z[le*2+1],z[le*2],de,z[le*2+2],de)}J.push(z[H-2],z[H-1])}else if(q.line.shape==="vh"){for(J=[],le=0;le<G-1;le++)isNaN(z[le*2])||isNaN(z[le*2+1])?J.push(NaN,NaN,NaN,NaN):(J.push(z[le*2],z[le*2+1]),!isNaN(z[le*2+2])&&!isNaN(z[le*2+3])?J.push(z[le*2],z[le*2+3]):J.push(NaN,NaN));J.push(z[H-2],z[H-1])}else J=z;var me=!1;for(le=0;le<J.length;le++)if(isNaN(J[le])){me=!0;break}var W=me||J.length>d.TOO_MANY_POINTS||s.hasMarkers(q)?"rect":"round";if(me&&q.connectgaps){var ie=J[0],se=J[1];for(le=0;le<J.length;le+=2)isNaN(J[le])||isNaN(J[le+1])?(J[le]=ie,J[le+1]=se):(ie=J[le],se=J[le+1])}return{join:W,positions:J}}function B(V,q,z,H,G){var J=P.getComponentMethod("errorbars","makeComputeError"),le=l.getFromId(V,q.xaxis,"x"),ge=l.getFromId(V,q.yaxis,"y"),de=z.length/2,me={};function W(ie,se){var ee=se._id.charAt(0),pe=q["error_"+ee];if(pe&&pe.visible&&(se.type==="linear"||se.type==="log")){for(var oe=J(pe),Y={x:0,y:1}[ee],ce={x:[0,1,2,3],y:[2,3,0,1]}[ee],ue=new Float64Array(4*de),_e=1/0,Le=-1/0,ze=0,Xe=0;ze<de;ze++,Xe+=4){var Ve=ie[ze];if(v(Ve)){var rt=z[ze*2+Y],mt=oe(Ve,ze),_t=mt[0],vt=mt[1];if(v(_t)&&v(vt)){var ut=Ve-_t,Fe=Ve+vt;ue[Xe+ce[0]]=rt-se.c2l(ut),ue[Xe+ce[1]]=se.c2l(Fe)-rt,ue[Xe+ce[2]]=0,ue[Xe+ce[3]]=0,_e=Math.min(_e,Ve-_t),Le=Math.max(Le,Ve+vt)}}}me[ee]={positions:z,errors:ue,_bnds:[_e,Le]}}}return W(H,le),W(G,ge),me}function U(V,q,z,H){var G=q._length,J={},le;if(s.hasMarkers(q)){var ge=z.font,de=z.align,me=z.baseline;for(J.offset=new Array(G),le=0;le<G;le++){var W=H.sizes?H.sizes[le]:H.size,ie=r(ge)?ge[le].size:ge.size,se=r(de)?de.length>1?de[le]:de[0]:de,ee=r(me)?me.length>1?me[le]:me[0]:me,pe=g[se],oe=g[ee],Y=W?W/.8+1:0,ce=-oe*Y-oe*.5;J.offset[le]=[pe*Y/ie,ce/ie]}}return J}Z.exports={style:E,markerStyle:T,markerSelection:M,linePositions:D,errorBarPositions:B,textPosition:U}}}),bN=Ne({"src/traces/scattergl/scene_update.js"(te,Z){var v=In();Z.exports=function(C,P){var t=P._scene,r={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},a={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return P._scene||(t=P._scene={},t.init=function(){v.extendFlat(t,a,r)},t.init(),t.update=function(i){var s=v.repeat(i,t.count);if(t.fill2d&&t.fill2d.update(s),t.scatter2d&&t.scatter2d.update(s),t.line2d&&t.line2d.update(s),t.error2d&&t.error2d.update(s.concat(s)),t.select2d&&t.select2d.update(s),t.glText)for(var o=0;o<t.count;o++)t.glText[o].update(i)},t.draw=function(){for(var i=t.count,s=t.fill2d,o=t.error2d,u=t.line2d,d=t.scatter2d,h=t.glText,g=t.select2d,m=t.selectBatch,E=t.unselectBatch,c=0;c<i;c++){if(s&&t.fillOrder[c]&&s.draw(t.fillOrder[c]),u&&t.lineOptions[c]&&u.draw(c),o&&(t.errorXOptions[c]&&o.draw(c),t.errorYOptions[c]&&o.draw(c+i)),d&&t.markerOptions[c])if(E[c].length){var _=v.repeat([],t.count);_[c]=E[c],d.draw(_)}else m[c].length||d.draw(c);h[c]&&t.textOptions[c]&&h[c].render()}g&&g.draw(m),t.dirty=!1},t.destroy=function(){t.fill2d&&t.fill2d.destroy&&t.fill2d.destroy(),t.scatter2d&&t.scatter2d.destroy&&t.scatter2d.destroy(),t.error2d&&t.error2d.destroy&&t.error2d.destroy(),t.line2d&&t.line2d.destroy&&t.line2d.destroy(),t.select2d&&t.select2d.destroy&&t.select2d.destroy(),t.glText&&t.glText.forEach(function(i){i.destroy&&i.destroy()}),t.lineOptions=null,t.fillOptions=null,t.markerOptions=null,t.markerSelectedOptions=null,t.markerUnselectedOptions=null,t.errorXOptions=null,t.errorYOptions=null,t.textOptions=null,t.textSelectedOptions=null,t.textUnselectedOptions=null,t.selectBatch=null,t.unselectBatch=null,P._scene=null}),t.dirty||v.extendFlat(t,r),t}}}),nQ=Ne({"src/traces/scattergl/calc.js"(te,Z){var v=RR(),w=In(),C=Wf(),P=Cm().findExtremes,t=Dm(),r=Vv(),a=r.calcMarkerSize,l=r.calcAxisExpansion,i=r.setFirstScatter,s=Yp(),o=_3(),u=bN(),d=da().BADNUM,h=zb().TOO_MANY_POINTS;Z.exports=function(c,_){var T=c._fullLayout,M=_._xA=C.getFromId(c,_.xaxis,"x"),k=_._yA=C.getFromId(c,_.yaxis,"y"),b=T._plots[_.xaxis+_.yaxis],A=_._length,y=A>=h,f=A*2,p={},x,N=M.makeCalcdata(_,"x"),D=k.makeCalcdata(_,"y"),B=t(_,M,"x",N),U=t(_,k,"y",D),V=B.vals,q=U.vals;_._x=V,_._y=q,_.xperiodalignment&&(_._origX=N,_._xStarts=B.starts,_._xEnds=B.ends),_.yperiodalignment&&(_._origY=D,_._yStarts=U.starts,_._yEnds=U.ends);var z=new Array(f),H=new Array(A);for(x=0;x<A;x++)z[x*2]=V[x]===d?NaN:V[x],z[x*2+1]=q[x]===d?NaN:q[x],H[x]=x;if(M.type==="log")for(x=0;x<f;x+=2)z[x]=M.c2l(z[x]);if(k.type==="log")for(x=1;x<f;x+=2)z[x]=k.c2l(z[x]);y&&M.type!=="log"&&k.type!=="log"?p.tree=v(z):p.ids=H,s(c,_);var G=m(c,b,_,z,V,q),J=u(c,b);i(T,_);var le;return y?G.marker&&(le=G.marker.sizeAvg||Math.max(G.marker.size,3)):le=a(_,A),l(c,_,M,k,V,q,le),G.errorX&&g(_,M,G.errorX),G.errorY&&g(_,k,G.errorY),G.fill&&!J.fill2d&&(J.fill2d=!0),G.marker&&!J.scatter2d&&(J.scatter2d=!0),G.line&&!J.line2d&&(J.line2d=!0),(G.errorX||G.errorY)&&!J.error2d&&(J.error2d=!0),G.text&&!J.glText&&(J.glText=!0),G.marker&&(G.marker.snap=A),J.lineOptions.push(G.line),J.errorXOptions.push(G.errorX),J.errorYOptions.push(G.errorY),J.fillOptions.push(G.fill),J.markerOptions.push(G.marker),J.markerSelectedOptions.push(G.markerSel),J.markerUnselectedOptions.push(G.markerUnsel),J.textOptions.push(G.text),J.textSelectedOptions.push(G.textSel),J.textUnselectedOptions.push(G.textUnsel),J.selectBatch.push([]),J.unselectBatch.push([]),p._scene=J,p.index=J.count,p.x=V,p.y=q,p.positions=z,J.count++,[{x:!1,y:!1,t:p,trace:_}]};function g(E,c,_){var T=E._extremes[c._id],M=P(c,_._bnds,{padded:!0});T.min=T.min.concat(M.min),T.max=T.max.concat(M.max)}function m(E,c,_,T,M,k){var b=o.style(E,_);if(b.marker&&(b.marker.positions=T),b.line&&T.length>1&&w.extendFlat(b.line,o.linePositions(E,_,T)),b.errorX||b.errorY){var A=o.errorBarPositions(E,_,T,M,k);b.errorX&&w.extendFlat(b.errorX,A.x),b.errorY&&w.extendFlat(b.errorY,A.y)}return b.text&&(w.extendFlat(b.text,{positions:T},o.textPosition(E,_,b.text,b.marker)),w.extendFlat(b.textSel,{positions:T},o.textPosition(E,_,b.text,b.markerSel)),w.extendFlat(b.textUnsel,{positions:T},o.textPosition(E,_,b.text,b.markerUnsel))),b}}}),wN=Ne({"src/traces/scattergl/edit_style.js"(te,Z){var v=In(),w=Ha(),C=El().DESELECTDIM;function P(t){var r=t[0],a=r.trace,l=r.t,i=l._scene,s=l.index,o=i.selectBatch[s],u=i.unselectBatch[s],d=i.textOptions[s],h=i.textSelectedOptions[s]||{},g=i.textUnselectedOptions[s]||{},m=v.extendFlat({},d),E,c;if(o.length||u.length){var _=h.color,T=g.color,M=d.color,k=v.isArrayOrTypedArray(M);for(m.color=new Array(a._length),E=0;E<o.length;E++)c=o[E],m.color[c]=_||(k?M[c]:M);for(E=0;E<u.length;E++){c=u[E];var b=k?M[c]:M;m.color[c]=T||(_?b:w.addOpacity(b,C))}}i.glText[s].update(m)}Z.exports={styleTextSelection:P}}}),TN=Ne({"src/traces/scattergl/select.js"(te,Z){var v=yu(),w=wN().styleTextSelection;Z.exports=function(P,t){var r=P.cd,a=P.xaxis,l=P.yaxis,i=[],s=r[0].trace,o=r[0].t,u=s._length,d=o.x,h=o.y,g=o._scene,m=o.index;if(!g)return i;var E=v.hasText(s),c=v.hasMarkers(s),_=!c&&!E;if(s.visible!==!0||_)return i;var T=[],M=[];if(t!==!1&&!t.degenerate)for(var k=0;k<u;k++)t.contains([o.xpx[k],o.ypx[k]],!1,k,P)?(T.push(k),i.push({pointNumber:k,x:a.c2d(d[k]),y:l.c2d(h[k])})):M.push(k);if(c){var b=g.scatter2d;if(!T.length&&!M.length){var A=new Array(g.count);A[m]=g.markerOptions[m],b.update.apply(b,A)}else if(!g.selectBatch[m].length&&!g.unselectBatch[m].length){var y=new Array(g.count);y[m]=g.markerUnselectedOptions[m],b.update.apply(b,y)}}return g.selectBatch[m]=T,g.unselectBatch[m]=M,E&&w(r),i}}}),aQ=Ne({"src/traces/scattergl/base_index.js"(te,Z){var v=PR();Z.exports={moduleType:"trace",name:"scattergl",basePlotModule:Ih(),categories:["gl","regl","cartesian","symbols","errorBarsOK","showLegend","scatter-like"],attributes:fk(),supplyDefaults:VJ(),crossTraceDefaults:Cg(),colorbar:sh(),formatLabels:HJ(),calc:nQ(),hoverPoints:v.hoverPoints,selectPoints:TN(),meta:{}}}}),iQ=Ne({"node_modules/color-id/index.js"(te,Z){var v=sk();Z.exports=w,Z.exports.to=w,Z.exports.from=C;function w(P,t){t==null&&(t=!0);var r=P[0],a=P[1],l=P[2],i=P[3];i==null&&(i=t?1:255),t&&(r*=255,a*=255,l*=255,i*=255),r=v(r,0,255)&255,a=v(a,0,255)&255,l=v(l,0,255)&255,i=v(i,0,255)&255;var s=r*16777216+(a<<16)+(l<<8)+i;return s}function C(P,t){P=+P;var r=P>>>24,a=(P&16711680)>>>16,l=(P&65280)>>>8,i=P&255;return t===!1?[r,a,l,i]:[r/255,a/255,l/255,i/255]}}}),Xd=Ne({"node_modules/object-assign/index.js"(te,Z){var v=Object.getOwnPropertySymbols,w=Object.prototype.hasOwnProperty,C=Object.prototype.propertyIsEnumerable;function P(r){if(r==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(r)}function t(){try{if(!Object.assign)return!1;var r=new String("abc");if(r[5]="de",Object.getOwnPropertyNames(r)[0]==="5")return!1;for(var a={},l=0;l<10;l++)a["_"+String.fromCharCode(l)]=l;var i=Object.getOwnPropertyNames(a).map(function(o){return a[o]});if(i.join("")!=="0123456789")return!1;var s={};return"abcdefghijklmnopqrst".split("").forEach(function(o){s[o]=o}),Object.keys(Object.assign({},s)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}Z.exports=t()?Object.assign:function(r,a){for(var l,i=P(r),s,o=1;o<arguments.length;o++){l=Object(arguments[o]);for(var u in l)w.call(l,u)&&(i[u]=l[u]);if(v){s=v(l);for(var d=0;d<s.length;d++)C.call(l,s[d])&&(i[s[d]]=l[s[d]])}}return i}}}),oQ=Ne({"node_modules/glslify/browser.js"(te,Z){Z.exports=function(v){typeof v=="string"&&(v=[v]);for(var w=[].slice.call(arguments,1),C=[],P=0;P<v.length-1;P++)C.push(v[P],w[P]||"");return C.push(v[P]),C.join("")}}}),AN=Ne({"node_modules/update-diff/index.js"(te,Z){Z.exports=function(w,C,P){Array.isArray(P)||(P=[].slice.call(arguments,2));for(var t=0,r=P.length;t<r;t++){var a=P[t];for(var l in a)if(!(C[l]!==void 0&&!Array.isArray(C[l])&&w[l]===C[l])&&l in C){var i;if(a[l]===!0)i=C[l];else{if(a[l]===!1)continue;if(typeof a[l]=="function"&&(i=a[l](C[l],w,C),i===void 0))continue}w[l]=i}}return w}}}),sQ=Ne({"node_modules/is-iexplorer/index.js"(te,Z){Z.exports=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))}}),IR=Ne({"node_modules/to-float32/index.js"(te,Z){Z.exports=C,Z.exports.float32=Z.exports.float=C,Z.exports.fract32=Z.exports.fract=w;var v=new Float32Array(1);function w(P,t){if(P.length){if(P instanceof Float32Array)return new Float32Array(P.length);t instanceof Float32Array||(t=C(P));for(var r=0,a=t.length;r<a;r++)t[r]=P[r]-t[r];return t}return C(P-C(P))}function C(P){return P.length?P instanceof Float32Array?P:new Float32Array(P):(v[0]=P,v[0])}}}),SN=Ne({"node_modules/regl-scatter2d/bundle.js"(te,Z){function v(p,x){var N=p==null?null:typeof Symbol<"u"&&p[Symbol.iterator]||p["@@iterator"];if(N!=null){var D,B,U,V,q=[],z=!0,H=!1;try{if(U=(N=N.call(p)).next,x!==0)for(;!(z=(D=U.call(N)).done)&&(q.push(D.value),q.length!==x);z=!0);}catch(G){H=!0,B=G}finally{try{if(!z&&N.return!=null&&(V=N.return(),Object(V)!==V))return}finally{if(H)throw B}}return q}}function w(p,x){return t(p)||v(p,x)||a(p,x)||s()}function C(p){return P(p)||r(p)||a(p)||i()}function P(p){if(Array.isArray(p))return l(p)}function t(p){if(Array.isArray(p))return p}function r(p){if(typeof Symbol<"u"&&p[Symbol.iterator]!=null||p["@@iterator"]!=null)return Array.from(p)}function a(p,x){if(p){if(typeof p=="string")return l(p,x);var N=Object.prototype.toString.call(p).slice(8,-1);if(N==="Object"&&p.constructor&&(N=p.constructor.name),N==="Map"||N==="Set")return Array.from(p);if(N==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(N))return l(p,x)}}function l(p,x){(x==null||x>p.length)&&(x=p.length);for(var N=0,D=new Array(x);N<x;N++)D[N]=p[N];return D}function i(){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 o=Rb(),u=g3(),d=iQ(),h=RR(),g=Xd(),m=oQ(),E=n1(),c=AN(),_=y3(),T=sQ(),M=IR(),k=JS(),b=A;function A(p,x){var N=this;if(!(this instanceof A))return new A(p,x);typeof p=="function"?(x||(x={}),x.regl=p):(x=p,p=null),x&&x.length&&(x.positions=x),p=x.regl;var D=p._gl,B,U=[],V={},q=[],z=[null],H=[null],G=255,J=100;this.tooManyColors=T,B=p.texture({data:new Uint8Array(G*4),width:G,height:1,type:"uint8",format:"rgba",wrapS:"clamp",wrapT:"clamp",mag:"nearest",min:"nearest"}),g(this,{regl:p,gl:D,groups:q,markerCache:H,markerTextures:z,palette:U,paletteIds:V,paletteTexture:B,maxColors:G,maxSize:J,canvas:D.canvas}),this.update(x);var le={uniforms:{constPointSize:!!x.constPointSize,opacity:p.prop("opacity"),paletteSize:function(W,ie){return[N.tooManyColors?0:G,B.height]},pixelRatio:p.context("pixelRatio"),scale:p.prop("scale"),scaleFract:p.prop("scaleFract"),translate:p.prop("translate"),translateFract:p.prop("translateFract"),markerTexture:p.prop("markerTexture"),paletteTexture:B},attributes:{x:function(W,ie){return ie.xAttr||{buffer:ie.positionBuffer,stride:8,offset:0}},y:function(W,ie){return ie.yAttr||{buffer:ie.positionBuffer,stride:8,offset:4}},xFract:function(W,ie){return ie.xAttr?{constant:[0,0]}:{buffer:ie.positionFractBuffer,stride:8,offset:0}},yFract:function(W,ie){return ie.yAttr?{constant:[0,0]}:{buffer:ie.positionFractBuffer,stride:8,offset:4}},size:function(W,ie){return ie.size.length?{buffer:ie.sizeBuffer,stride:2,offset:0}:{constant:[Math.round(ie.size*255/N.maxSize)]}},borderSize:function(W,ie){return ie.borderSize.length?{buffer:ie.sizeBuffer,stride:2,offset:1}:{constant:[Math.round(ie.borderSize*255/N.maxSize)]}},colorId:function(W,ie){return ie.color.length?{buffer:ie.colorBuffer,stride:N.tooManyColors?8:4,offset:0}:{constant:N.tooManyColors?U.slice(ie.color*4,ie.color*4+4):[ie.color]}},borderColorId:function(W,ie){return ie.borderColor.length?{buffer:ie.colorBuffer,stride:N.tooManyColors?8:4,offset:N.tooManyColors?4:2}:{constant:N.tooManyColors?U.slice(ie.borderColor*4,ie.borderColor*4+4):[ie.borderColor]}},isActive:function(W,ie){return ie.activation===!0?{constant:[1]}:ie.activation?ie.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:p.prop("viewport")},viewport:p.prop("viewport"),stencil:{enable:!1},depth:{enable:!1},elements:p.prop("elements"),count:p.prop("count"),offset:p.prop("offset"),primitive:"points"},ge=g({},le);ge.frag=m([`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;
  }

}
`]),ge.vert=m([`precision highp float;
#define GLSLIFY 1

attribute float x, y, xFract, yFract;
attribute float size, borderSize;
attribute vec4 colorId, borderColorId;
attribute float isActive;

// \`invariant\` effectively turns off optimizations for the position.
// We need this because -fast-math on M1 Macs is re-ordering
// floating point operations in a way that causes floating point
// precision limits to put points in the wrong locations.
invariant gl_Position;

uniform bool constPointSize;
uniform float pixelRatio;
uniform vec2 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=p(ge);var de=g({},le);de.frag=m([`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;
}
`]),de.vert=m([`precision highp float;
#define GLSLIFY 1

attribute float x, y, xFract, yFract;
attribute float size, borderSize;
attribute vec4 colorId, borderColorId;
attribute float isActive;

// \`invariant\` effectively turns off optimizations for the position.
// We need this because -fast-math on M1 Macs is re-ordering
// floating point operations in a way that causes floating point
// precision limits to put points in the wrong locations.
invariant gl_Position;

uniform bool constPointSize;
uniform float pixelRatio;
uniform vec2 paletteSize, scale, scaleFract, translate, translateFract;
uniform sampler2D paletteTexture;

const float maxSize = 100.;

varying vec4 fragColor, fragBorderColor;
varying float fragBorderRadius, fragWidth;

float pointSizeScale = (constPointSize) ? 2. : pixelRatio;

bool isDirect = (paletteSize.x < 1.);

vec4 getColor(vec4 id) {
  return isDirect ? id / 255. : texture2D(paletteTexture,
    vec2(
      (id.x + .5) / paletteSize.x,
      (id.y + .5) / paletteSize.y
    )
  );
}

void main() {
  // ignore inactive points
  if (isActive == 0.) return;

  vec2 position = vec2(x, y);
  vec2 positionFract = vec2(xFract, yFract);

  vec4 color = getColor(colorId);
  vec4 borderColor = getColor(borderColorId);

  float size = size * maxSize / 255.;
  float borderSize = borderSize * maxSize / 255.;

  gl_PointSize = (size + borderSize) * pointSizeScale;

  vec2 pos = (position + translate) * scale
      + (positionFract + translateFract) * scale
      + (position + translate) * scaleFract
      + (positionFract + translateFract) * scaleFract;

  gl_Position = vec4(pos * 2. - 1., 0., 1.);

  fragBorderRadius = 1. - 2. * borderSize / (size + borderSize);
  fragColor = color;
  fragBorderColor = borderColor.a == 0. || borderSize == 0. ? vec4(color.rgb, 0.) : borderColor;
  fragWidth = 1. / gl_PointSize;
}
`]),T&&(de.frag=de.frag.replace("smoothstep","smoothStep"),ge.frag=ge.frag.replace("smoothstep","smoothStep")),this.drawCircle=p(de)}A.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},A.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this},A.prototype.draw=function(){for(var p=this,x=arguments.length,N=new Array(x),D=0;D<x;D++)N[D]=arguments[D];var B=this.groups;if(N.length===1&&Array.isArray(N[0])&&(N[0][0]===null||Array.isArray(N[0][0]))&&(N=N[0]),this.regl._refresh(),N.length)for(var U=0;U<N.length;U++)this.drawItem(U,N[U]);else B.forEach(function(V,q){p.drawItem(q)});return this},A.prototype.drawItem=function(p,x){var N=this.groups,D=N[p];if(typeof x=="number"&&(p=x,D=N[x],x=null),!!(D&&D.count&&D.opacity)){D.activation[0]&&this.drawCircle(this.getMarkerDrawOptions(0,D,x));for(var B=[],U=1;U<D.activation.length;U++)!D.activation[U]||D.activation[U]!==!0&&!D.activation[U].data.length||B.push.apply(B,C(this.getMarkerDrawOptions(U,D,x)));B.length&&this.drawMarker(B)}},A.prototype.getMarkerDrawOptions=function(p,x,N){var D=x.range,B=x.tree,U=x.viewport,V=x.activation,q=x.selectionBuffer,z=x.count;if(this.regl,!B)return N?[g({},x,{markerTexture:this.markerTextures[p],activation:V[p],count:N.length,elements:N,offset:0})]:[g({},x,{markerTexture:this.markerTextures[p],activation:V[p],offset:0})];var H=[],G=B.range(D,{lod:!0,px:[(D[2]-D[0])/U.width,(D[3]-D[1])/U.height]});if(N){for(var J=V[p],le=J.data,ge=new Uint8Array(z),de=0;de<N.length;de++){var me=N[de];ge[me]=le?le[me]:1}q.subdata(ge)}for(var W=G.length;W--;){var ie=w(G[W],2),se=ie[0],ee=ie[1];H.push(g({},x,{markerTexture:this.markerTextures[p],activation:N?q:V[p],offset:se,count:ee-se}))}return H},A.prototype.update=function(){for(var p=this,x=arguments.length,N=new Array(x),D=0;D<x;D++)N[D]=arguments[D];if(N.length){N.length===1&&Array.isArray(N[0])&&(N=N[0]);var B=this.groups,U=this.gl,V=this.regl,q=this.maxSize,z=this.maxColors,H=this.palette;this.groups=B=N.map(function(G,J){var le=B[J];if(G===void 0)return le;G===null?G={positions:null}:typeof G=="function"?G={ondraw:G}:typeof G[0]=="number"&&(G={positions:G}),G=E(G,{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"}),G.positions===null&&(G.positions=[]),G.tooManyColors!=null&&(p.tooManyColors=G.tooManyColors),le||(B[J]=le={id:J,scale:null,translate:null,scaleFract:null,translateFract:null,activation:[],selectionBuffer:V.buffer({data:new Uint8Array(0),usage:"stream",type:"uint8"}),sizeBuffer:V.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),colorBuffer:V.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),positionBuffer:V.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"}),positionFractBuffer:V.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"})},G=g({},A.defaults,G)),G.positions&&!("marker"in G)&&(G.marker=le.marker,delete le.marker),G.marker&&!("positions"in G)&&(G.positions=le.positions,delete le.positions);var ge=0,de=0;if(c(le,G,[{snap:!0,size:function(vt,ut){return vt==null&&(vt=A.defaults.size),ge+=vt&&vt.length?1:0,vt},borderSize:function(vt,ut){return vt==null&&(vt=A.defaults.borderSize),ge+=vt&&vt.length?1:0,vt},opacity:parseFloat,color:function(vt,ut){return vt==null&&(vt=A.defaults.color),vt=p.updateColor(vt),de++,vt},borderColor:function(vt,ut){return vt==null&&(vt=A.defaults.borderColor),vt=p.updateColor(vt),de++,vt},bounds:function(vt,ut,Fe){return"range"in Fe||(Fe.range=null),vt},positions:function(vt,ut,Fe){var Pe=ut.snap,be=ut.positionBuffer,Ye=ut.positionFractBuffer,yt=ut.selectionBuffer;if(vt.x||vt.y)return vt.x.length?ut.xAttr={buffer:V.buffer(vt.x),offset:0,stride:4,count:vt.x.length}:ut.xAttr={buffer:vt.x.buffer,offset:vt.x.offset*4||0,stride:(vt.x.stride||1)*4,count:vt.x.count},vt.y.length?ut.yAttr={buffer:V.buffer(vt.y),offset:0,stride:4,count:vt.y.length}:ut.yAttr={buffer:vt.y.buffer,offset:vt.y.offset*4||0,stride:(vt.y.stride||1)*4,count:vt.y.count},ut.count=Math.max(ut.xAttr.count,ut.yAttr.count),vt;vt=_(vt,"float64");var wt=ut.count=Math.floor(vt.length/2),ht=ut.bounds=wt?u(vt,2):null;if(!Fe.range&&!ut.range&&(delete ut.range,Fe.range=ht),!Fe.marker&&!ut.marker&&(delete ut.marker,Fe.marker=null),Pe&&(Pe===!0||wt>Pe)?ut.tree=h(vt,{bounds:ht}):Pe&&Pe.length&&(ut.tree=Pe),ut.tree){var Yt={primitive:"points",usage:"static",data:ut.tree,type:"uint32"};ut.elements?ut.elements(Yt):ut.elements=V.elements(Yt)}var $t=M.float32(vt);be({data:$t,usage:"dynamic"});var fr=M.fract32(vt,$t);return Ye({data:fr,usage:"dynamic"}),yt({data:new Uint8Array(wt),type:"uint8",usage:"stream"}),vt}},{marker:function(vt,ut,Fe){var Pe=ut.activation;if(Pe.forEach(function(fr){return fr&&fr.destroy&&fr.destroy()}),Pe.length=0,!vt||typeof vt[0]=="number"){var be=p.addMarker(vt);Pe[be]=!0}else{for(var Ye=[],yt=0,wt=Math.min(vt.length,ut.count);yt<wt;yt++){var ht=p.addMarker(vt[yt]);Ye[ht]||(Ye[ht]=new Uint8Array(ut.count)),Ye[ht][yt]=1}for(var Yt=0;Yt<Ye.length;Yt++)if(Ye[Yt]){var $t={data:Ye[Yt],type:"uint8",usage:"static"};Pe[Yt]?Pe[Yt]($t):Pe[Yt]=V.buffer($t),Pe[Yt].data=Ye[Yt]}}return vt},range:function(vt,ut,Fe){var Pe=ut.bounds;if(Pe)return vt||(vt=Pe),ut.scale=[1/(vt[2]-vt[0]),1/(vt[3]-vt[1])],ut.translate=[-vt[0],-vt[1]],ut.scaleFract=M.fract(ut.scale),ut.translateFract=M.fract(ut.translate),vt},viewport:function(vt){var ut=k(vt||[U.drawingBufferWidth,U.drawingBufferHeight]);return ut}}]),ge){var me=le,W=me.count,ie=me.size,se=me.borderSize,ee=me.sizeBuffer,pe=new Uint8Array(W*2);if(ie.length||se.length)for(var oe=0;oe<W;oe++)pe[oe*2]=Math.round((ie[oe]==null?ie:ie[oe])*255/q),pe[oe*2+1]=Math.round((se[oe]==null?se:se[oe])*255/q);ee({data:pe,usage:"dynamic"})}if(de){var Y=le,ce=Y.count,ue=Y.color,_e=Y.borderColor,Le=Y.colorBuffer,ze;if(p.tooManyColors){if(ue.length||_e.length){ze=new Uint8Array(ce*8);for(var Xe=0;Xe<ce;Xe++){var Ve=ue[Xe];ze[Xe*8]=H[Ve*4],ze[Xe*8+1]=H[Ve*4+1],ze[Xe*8+2]=H[Ve*4+2],ze[Xe*8+3]=H[Ve*4+3];var rt=_e[Xe];ze[Xe*8+4]=H[rt*4],ze[Xe*8+5]=H[rt*4+1],ze[Xe*8+6]=H[rt*4+2],ze[Xe*8+7]=H[rt*4+3]}}}else if(ue.length||_e.length){ze=new Uint8Array(ce*4+2);for(var mt=0;mt<ce;mt++)ue[mt]!=null&&(ze[mt*4]=ue[mt]%z,ze[mt*4+1]=Math.floor(ue[mt]/z)),_e[mt]!=null&&(ze[mt*4+2]=_e[mt]%z,ze[mt*4+3]=Math.floor(_e[mt]/z))}Le({data:ze||new Uint8Array(0),type:"uint8",usage:"dynamic"})}return le})}},A.prototype.addMarker=function(p){var x=this.markerTextures,N=this.regl,D=this.markerCache,B=p==null?0:D.indexOf(p);if(B>=0)return B;var U;if(p instanceof Uint8Array||p instanceof Uint8ClampedArray)U=p;else{U=new Uint8Array(p.length);for(var V=0,q=p.length;V<q;V++)U[V]=p[V]*255}var z=Math.floor(Math.sqrt(U.length));return B=x.length,D.push(p),x.push(N.texture({channels:1,data:U,radius:z,mag:"linear",min:"linear"})),B},A.prototype.updateColor=function(p){var x=this.paletteIds,N=this.palette,D=this.maxColors;Array.isArray(p)||(p=[p]);var B=[];if(typeof p[0]=="number"){var U=[];if(Array.isArray(p))for(var V=0;V<p.length;V+=4)U.push(p.slice(V,V+4));else for(var q=0;q<p.length;q+=4)U.push(p.subarray(q,q+4));p=U}for(var z=0;z<p.length;z++){var H=p[z];H=o(H,"uint8");var G=d(H,!1);if(x[G]==null){var J=N.length;x[G]=Math.floor(J/4),N[J]=H[0],N[J+1]=H[1],N[J+2]=H[2],N[J+3]=H[3]}B[z]=x[G]}return!this.tooManyColors&&N.length>D*4&&(this.tooManyColors=!0),this.updatePalette(N),B.length===1?B[0]:B},A.prototype.updatePalette=function(p){if(!this.tooManyColors){var x=this.maxColors,N=this.paletteTexture,D=Math.ceil(p.length*.25/x);if(D>1){p=p.slice();for(var B=p.length*.25%x;B<D*x;B++)p.push(0,0,0,0)}N.height<D&&N.resize(x,D),N.subimage({width:Math.min(p.length*.25,x),height:D,data:p},0,0)}},A.prototype.destroy=function(){return this.groups.forEach(function(p){p.sizeBuffer.destroy(),p.positionBuffer.destroy(),p.positionFractBuffer.destroy(),p.colorBuffer.destroy(),p.activation.forEach(function(x){return x&&x.destroy&&x.destroy()}),p.selectionBuffer.destroy(),p.elements&&p.elements.destroy()}),this.groups.length=0,this.paletteTexture.destroy(),this.markerTextures.forEach(function(p){return p&&p.destroy&&p.destroy()}),this};var y=Xd(),f=function(x,N){var D=new b(x,N),B=D.render.bind(D);return y(B,{render:B,update:D.update.bind(D),draw:D.draw.bind(D),destroy:D.destroy.bind(D),regl:D.regl,gl:D.gl,canvas:D.gl.canvas,groups:D.groups,markers:D.markerCache,palette:D.palette}),B};Z.exports=f}}),lQ=Ne({"node_modules/earcut/src/earcut.js"(te,Z){Z.exports=v,Z.exports.default=v;function v(V,q,z){z=z||2;var H=q&&q.length,G=H?q[0]*z:V.length,J=w(V,0,G,z,!0),le=[];if(!J||J.next===J.prev)return le;var ge,de,me,W,ie,se,ee;if(H&&(J=i(V,q,J,z)),V.length>80*z){ge=me=V[0],de=W=V[1];for(var pe=z;pe<G;pe+=z)ie=V[pe],se=V[pe+1],ie<ge&&(ge=ie),se<de&&(de=se),ie>me&&(me=ie),se>W&&(W=se);ee=Math.max(me-ge,W-de),ee=ee!==0?32767/ee:0}return P(J,le,z,ge,de,ee,0),le}function w(V,q,z,H,G){var J,le;if(G===U(V,q,z,H)>0)for(J=q;J<z;J+=H)le=N(J,V[J],V[J+1],le);else for(J=z-H;J>=q;J-=H)le=N(J,V[J],V[J+1],le);return le&&M(le,le.next)&&(D(le),le=le.next),le}function C(V,q){if(!V)return V;q||(q=V);var z=V,H;do if(H=!1,!z.steiner&&(M(z,z.next)||T(z.prev,z,z.next)===0)){if(D(z),z=q=z.prev,z===z.next)break;H=!0}else z=z.next;while(H||z!==q);return q}function P(V,q,z,H,G,J,le){if(V){!le&&J&&h(V,H,G,J);for(var ge=V,de,me;V.prev!==V.next;){if(de=V.prev,me=V.next,J?r(V,H,G,J):t(V)){q.push(de.i/z|0),q.push(V.i/z|0),q.push(me.i/z|0),D(V),V=me.next,ge=me.next;continue}if(V=me,V===ge){le?le===1?(V=a(C(V),q,z),P(V,q,z,H,G,J,2)):le===2&&l(V,q,z,H,G,J):P(C(V),q,z,H,G,J,1);break}}}}function t(V){var q=V.prev,z=V,H=V.next;if(T(q,z,H)>=0)return!1;for(var G=q.x,J=z.x,le=H.x,ge=q.y,de=z.y,me=H.y,W=G<J?G<le?G:le:J<le?J:le,ie=ge<de?ge<me?ge:me:de<me?de:me,se=G>J?G>le?G:le:J>le?J:le,ee=ge>de?ge>me?ge:me:de>me?de:me,pe=H.next;pe!==q;){if(pe.x>=W&&pe.x<=se&&pe.y>=ie&&pe.y<=ee&&c(G,ge,J,de,le,me,pe.x,pe.y)&&T(pe.prev,pe,pe.next)>=0)return!1;pe=pe.next}return!0}function r(V,q,z,H){var G=V.prev,J=V,le=V.next;if(T(G,J,le)>=0)return!1;for(var ge=G.x,de=J.x,me=le.x,W=G.y,ie=J.y,se=le.y,ee=ge<de?ge<me?ge:me:de<me?de:me,pe=W<ie?W<se?W:se:ie<se?ie:se,oe=ge>de?ge>me?ge:me:de>me?de:me,Y=W>ie?W>se?W:se:ie>se?ie:se,ce=m(ee,pe,q,z,H),ue=m(oe,Y,q,z,H),_e=V.prevZ,Le=V.nextZ;_e&&_e.z>=ce&&Le&&Le.z<=ue;){if(_e.x>=ee&&_e.x<=oe&&_e.y>=pe&&_e.y<=Y&&_e!==G&&_e!==le&&c(ge,W,de,ie,me,se,_e.x,_e.y)&&T(_e.prev,_e,_e.next)>=0||(_e=_e.prevZ,Le.x>=ee&&Le.x<=oe&&Le.y>=pe&&Le.y<=Y&&Le!==G&&Le!==le&&c(ge,W,de,ie,me,se,Le.x,Le.y)&&T(Le.prev,Le,Le.next)>=0))return!1;Le=Le.nextZ}for(;_e&&_e.z>=ce;){if(_e.x>=ee&&_e.x<=oe&&_e.y>=pe&&_e.y<=Y&&_e!==G&&_e!==le&&c(ge,W,de,ie,me,se,_e.x,_e.y)&&T(_e.prev,_e,_e.next)>=0)return!1;_e=_e.prevZ}for(;Le&&Le.z<=ue;){if(Le.x>=ee&&Le.x<=oe&&Le.y>=pe&&Le.y<=Y&&Le!==G&&Le!==le&&c(ge,W,de,ie,me,se,Le.x,Le.y)&&T(Le.prev,Le,Le.next)>=0)return!1;Le=Le.nextZ}return!0}function a(V,q,z){var H=V;do{var G=H.prev,J=H.next.next;!M(G,J)&&k(G,H,H.next,J)&&f(G,J)&&f(J,G)&&(q.push(G.i/z|0),q.push(H.i/z|0),q.push(J.i/z|0),D(H),D(H.next),H=V=J),H=H.next}while(H!==V);return C(H)}function l(V,q,z,H,G,J){var le=V;do{for(var ge=le.next.next;ge!==le.prev;){if(le.i!==ge.i&&_(le,ge)){var de=x(le,ge);le=C(le,le.next),de=C(de,de.next),P(le,q,z,H,G,J,0),P(de,q,z,H,G,J,0);return}ge=ge.next}le=le.next}while(le!==V)}function i(V,q,z,H){var G=[],J,le,ge,de,me;for(J=0,le=q.length;J<le;J++)ge=q[J]*H,de=J<le-1?q[J+1]*H:V.length,me=w(V,ge,de,H,!1),me===me.next&&(me.steiner=!0),G.push(E(me));for(G.sort(s),J=0;J<G.length;J++)z=o(G[J],z);return z}function s(V,q){return V.x-q.x}function o(V,q){var z=u(V,q);if(!z)return q;var H=x(z,V);return C(H,H.next),C(z,z.next)}function u(V,q){var z=q,H=V.x,G=V.y,J=-1/0,le;do{if(G<=z.y&&G>=z.next.y&&z.next.y!==z.y){var ge=z.x+(G-z.y)*(z.next.x-z.x)/(z.next.y-z.y);if(ge<=H&&ge>J&&(J=ge,le=z.x<z.next.x?z:z.next,ge===H))return le}z=z.next}while(z!==q);if(!le)return null;var de=le,me=le.x,W=le.y,ie=1/0,se;z=le;do H>=z.x&&z.x>=me&&H!==z.x&&c(G<W?H:J,G,me,W,G<W?J:H,G,z.x,z.y)&&(se=Math.abs(G-z.y)/(H-z.x),f(z,V)&&(se<ie||se===ie&&(z.x>le.x||z.x===le.x&&d(le,z)))&&(le=z,ie=se)),z=z.next;while(z!==de);return le}function d(V,q){return T(V.prev,V,q.prev)<0&&T(q.next,V,V.next)<0}function h(V,q,z,H){var G=V;do G.z===0&&(G.z=m(G.x,G.y,q,z,H)),G.prevZ=G.prev,G.nextZ=G.next,G=G.next;while(G!==V);G.prevZ.nextZ=null,G.prevZ=null,g(G)}function g(V){var q,z,H,G,J,le,ge,de,me=1;do{for(z=V,V=null,J=null,le=0;z;){for(le++,H=z,ge=0,q=0;q<me&&(ge++,H=H.nextZ,!!H);q++);for(de=me;ge>0||de>0&&H;)ge!==0&&(de===0||!H||z.z<=H.z)?(G=z,z=z.nextZ,ge--):(G=H,H=H.nextZ,de--),J?J.nextZ=G:V=G,G.prevZ=J,J=G;z=H}J.nextZ=null,me*=2}while(le>1);return V}function m(V,q,z,H,G){return V=(V-z)*G|0,q=(q-H)*G|0,V=(V|V<<8)&16711935,V=(V|V<<4)&252645135,V=(V|V<<2)&858993459,V=(V|V<<1)&1431655765,q=(q|q<<8)&16711935,q=(q|q<<4)&252645135,q=(q|q<<2)&858993459,q=(q|q<<1)&1431655765,V|q<<1}function E(V){var q=V,z=V;do(q.x<z.x||q.x===z.x&&q.y<z.y)&&(z=q),q=q.next;while(q!==V);return z}function c(V,q,z,H,G,J,le,ge){return(G-le)*(q-ge)>=(V-le)*(J-ge)&&(V-le)*(H-ge)>=(z-le)*(q-ge)&&(z-le)*(J-ge)>=(G-le)*(H-ge)}function _(V,q){return V.next.i!==q.i&&V.prev.i!==q.i&&!y(V,q)&&(f(V,q)&&f(q,V)&&p(V,q)&&(T(V.prev,V,q.prev)||T(V,q.prev,q))||M(V,q)&&T(V.prev,V,V.next)>0&&T(q.prev,q,q.next)>0)}function T(V,q,z){return(q.y-V.y)*(z.x-q.x)-(q.x-V.x)*(z.y-q.y)}function M(V,q){return V.x===q.x&&V.y===q.y}function k(V,q,z,H){var G=A(T(V,q,z)),J=A(T(V,q,H)),le=A(T(z,H,V)),ge=A(T(z,H,q));return!!(G!==J&&le!==ge||G===0&&b(V,z,q)||J===0&&b(V,H,q)||le===0&&b(z,V,H)||ge===0&&b(z,q,H))}function b(V,q,z){return q.x<=Math.max(V.x,z.x)&&q.x>=Math.min(V.x,z.x)&&q.y<=Math.max(V.y,z.y)&&q.y>=Math.min(V.y,z.y)}function A(V){return V>0?1:V<0?-1:0}function y(V,q){var z=V;do{if(z.i!==V.i&&z.next.i!==V.i&&z.i!==q.i&&z.next.i!==q.i&&k(z,z.next,V,q))return!0;z=z.next}while(z!==V);return!1}function f(V,q){return T(V.prev,V,V.next)<0?T(V,q,V.next)>=0&&T(V,V.prev,q)>=0:T(V,q,V.prev)<0||T(V,V.next,q)<0}function p(V,q){var z=V,H=!1,G=(V.x+q.x)/2,J=(V.y+q.y)/2;do z.y>J!=z.next.y>J&&z.next.y!==z.y&&G<(z.next.x-z.x)*(J-z.y)/(z.next.y-z.y)+z.x&&(H=!H),z=z.next;while(z!==V);return H}function x(V,q){var z=new B(V.i,V.x,V.y),H=new B(q.i,q.x,q.y),G=V.next,J=q.prev;return V.next=q,q.prev=V,z.next=G,G.prev=z,H.next=z,z.prev=H,J.next=H,H.prev=J,H}function N(V,q,z,H){var G=new B(V,q,z);return H?(G.next=H.next,G.prev=H,H.next.prev=G,H.next=G):(G.prev=G,G.next=G),G}function D(V){V.next.prev=V.prev,V.prev.next=V.next,V.prevZ&&(V.prevZ.nextZ=V.nextZ),V.nextZ&&(V.nextZ.prevZ=V.prevZ)}function B(V,q,z){this.i=V,this.x=q,this.y=z,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}v.deviation=function(V,q,z,H){var G=q&&q.length,J=G?q[0]*z:V.length,le=Math.abs(U(V,0,J,z));if(G)for(var ge=0,de=q.length;ge<de;ge++){var me=q[ge]*z,W=ge<de-1?q[ge+1]*z:V.length;le-=Math.abs(U(V,me,W,z))}var ie=0;for(ge=0;ge<H.length;ge+=3){var se=H[ge]*z,ee=H[ge+1]*z,pe=H[ge+2]*z;ie+=Math.abs((V[se]-V[pe])*(V[ee+1]-V[se+1])-(V[se]-V[ee])*(V[pe+1]-V[se+1]))}return le===0&&ie===0?0:Math.abs((ie-le)/le)};function U(V,q,z,H){for(var G=0,J=q,le=z-H;J<z;J+=H)G+=(V[le]-V[J])*(V[J+1]+V[le+1]),le=J;return G}v.flatten=function(V){for(var q=V[0][0].length,z={vertices:[],holes:[],dimensions:q},H=0,G=0;G<V.length;G++){for(var J=0;J<V[G].length;J++)for(var le=0;le<q;le++)z.vertices.push(V[G][J][le]);G>0&&(H+=V[G-1].length,z.holes.push(H))}return z}}}),uQ=Ne({"node_modules/array-normalize/index.js"(te,Z){var v=g3();Z.exports=w;function w(C,P,t){if(!C||C.length==null)throw Error("Argument should be an array");P==null&&(P=1),t==null&&(t=v(C,P));for(var r=0;r<P;r++){var a=t[P+r],l=t[r],i=r,s=C.length;if(a===1/0&&l===-1/0)for(i=r;i<s;i+=P)C[i]=C[i]===a?1:C[i]===l?0:.5;else if(a===1/0)for(i=r;i<s;i+=P)C[i]=C[i]===a?1:0;else if(l===-1/0)for(i=r;i<s;i+=P)C[i]=C[i]===l?0:1;else{var o=a-l;for(i=r;i<s;i+=P)isNaN(C[i])||(C[i]=o===0?.5:(C[i]-l)/o)}}return C}}}),cQ=Ne({"node_modules/es6-weak-map/is-implemented.js"(te,Z){Z.exports=function(){var v,w;if(typeof WeakMap!="function")return!1;try{v=new WeakMap([[w={},"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(w)!=="one")}}}),fQ=Ne({"node_modules/es5-ext/function/noop.js"(te,Z){Z.exports=function(){}}}),Nb=Ne({"node_modules/es5-ext/object/is-value.js"(te,Z){var v=fQ()();Z.exports=function(w){return w!==v&&w!==null}}}),EN=Ne({"node_modules/es5-ext/object/set-prototype-of/is-implemented.js"(te,Z){var v=Object.create,w=Object.getPrototypeOf,C={};Z.exports=function(){var P=Object.setPrototypeOf,t=arguments[0]||v;return typeof P!="function"?!1:w(P(t(null),C))===C}}}),MN=Ne({"node_modules/es5-ext/object/is-object.js"(te,Z){var v=Nb(),w={function:!0,object:!0};Z.exports=function(C){return v(C)&&w[typeof C]||!1}}}),P_=Ne({"node_modules/es5-ext/object/valid-value.js"(te,Z){var v=Nb();Z.exports=function(w){if(!v(w))throw new TypeError("Cannot use null or undefined");return w}}}),hQ=Ne({"node_modules/es5-ext/object/create.js"(te,Z){var v=Object.create,w;EN()()||(w=CN()),Z.exports=(function(){var C,P,t;return!w||w.level!==1?v:(C={},P={},t={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach(function(r){if(r==="__proto__"){P[r]={configurable:!0,enumerable:!1,writable:!0,value:void 0};return}P[r]=t}),Object.defineProperties(C,P),Object.defineProperty(w,"nullPolyfill",{configurable:!1,enumerable:!1,writable:!1,value:C}),function(r,a){return v(r===null?C:r,a)})})()}}),CN=Ne({"node_modules/es5-ext/object/set-prototype-of/shim.js"(te,Z){var v=MN(),w=P_(),C=Object.prototype.isPrototypeOf,P=Object.defineProperty,t={configurable:!0,enumerable:!1,writable:!0,value:void 0},r;r=function(a,l){if(w(a),l===null||v(l))return a;throw new TypeError("Prototype must be null or an object")},Z.exports=(function(a){var l,i;return a?(a.level===2?a.set?(i=a.set,l=function(s,o){return i.call(r(s,o),o),s}):l=function(s,o){return r(s,o).__proto__=o,s}:l=function s(o,u){var d;return r(o,u),d=C.call(s.nullPolyfill,o),d&&delete s.nullPolyfill.__proto__,u===null&&(u=s.nullPolyfill),o.__proto__=u,d&&P(s.nullPolyfill,"__proto__",t),o},Object.defineProperty(l,"level",{configurable:!1,enumerable:!1,writable:!1,value:a.level})):null})((function(){var a=Object.create(null),l={},i,s=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__");if(s){try{i=s.set,i.call(a,l)}catch{}if(Object.getPrototypeOf(a)===l)return{set:i,level:2}}return a.__proto__=l,Object.getPrototypeOf(a)===l?{level:2}:(a={},a.__proto__=l,Object.getPrototypeOf(a)===l?{level:1}:!1)})()),hQ()}}),DR=Ne({"node_modules/es5-ext/object/set-prototype-of/index.js"(te,Z){Z.exports=EN()()?Object.setPrototypeOf:CN()}}),dQ=Ne({"node_modules/es5-ext/object/valid-object.js"(te,Z){var v=MN();Z.exports=function(w){if(!v(w))throw new TypeError(w+" is not an Object");return w}}}),vQ=Ne({"node_modules/es5-ext/string/random-uniq.js"(te,Z){var v=Object.create(null),w=Math.random;Z.exports=function(){var C;do C=w().toString(36).slice(2);while(v[C]);return C}}}),x3=Ne({"node_modules/type/value/is.js"(te,Z){var v=void 0;Z.exports=function(w){return w!==v&&w!==null}}}),OR=Ne({"node_modules/type/object/is.js"(te,Z){var v=x3(),w={object:!0,function:!0,undefined:!0};Z.exports=function(C){return v(C)?hasOwnProperty.call(w,typeof C):!1}}}),pQ=Ne({"node_modules/type/prototype/is.js"(te,Z){var v=OR();Z.exports=function(w){if(!v(w))return!1;try{return w.constructor?w.constructor.prototype===w:!1}catch{return!1}}}}),mQ=Ne({"node_modules/type/function/is.js"(te,Z){var v=pQ();Z.exports=function(w){if(typeof w!="function"||!hasOwnProperty.call(w,"length"))return!1;try{if(typeof w.length!="number"||typeof w.call!="function"||typeof w.apply!="function")return!1}catch{return!1}return!v(w)}}}),kN=Ne({"node_modules/type/plain-function/is.js"(te,Z){var v=mQ(),w=/^\s*class[\s{/}]/,C=Function.prototype.toString;Z.exports=function(P){return!(!v(P)||w.test(C.call(P)))}}}),gQ=Ne({"node_modules/es5-ext/object/assign/is-implemented.js"(te,Z){Z.exports=function(){var v=Object.assign,w;return typeof v!="function"?!1:(w={foo:"raz"},v(w,{bar:"dwa"},{trzy:"trzy"}),w.foo+w.bar+w.trzy==="razdwatrzy")}}}),yQ=Ne({"node_modules/es5-ext/object/keys/is-implemented.js"(te,Z){Z.exports=function(){try{return Object.keys("primitive"),!0}catch{return!1}}}}),_Q=Ne({"node_modules/es5-ext/object/keys/shim.js"(te,Z){var v=Nb(),w=Object.keys;Z.exports=function(C){return w(v(C)?Object(C):C)}}}),xQ=Ne({"node_modules/es5-ext/object/keys/index.js"(te,Z){Z.exports=yQ()()?Object.keys:_Q()}}),bQ=Ne({"node_modules/es5-ext/object/assign/shim.js"(te,Z){var v=xQ(),w=P_(),C=Math.max;Z.exports=function(P,t){var r,a,l=C(arguments.length,2),i;for(P=Object(w(P)),i=function(s){try{P[s]=t[s]}catch(o){r||(r=o)}},a=1;a<l;++a)t=arguments[a],v(t).forEach(i);if(r!==void 0)throw r;return P}}}),zR=Ne({"node_modules/es5-ext/object/assign/index.js"(te,Z){Z.exports=gQ()()?Object.assign:bQ()}}),PN=Ne({"node_modules/es5-ext/object/normalize-options.js"(te,Z){var v=Nb(),w=Array.prototype.forEach,C=Object.create,P=function(t,r){var a;for(a in t)r[a]=t[a]};Z.exports=function(t){var r=C(null);return w.call(arguments,function(a){v(a)&&P(Object(a),r)}),r}}}),wQ=Ne({"node_modules/es5-ext/string/#/contains/is-implemented.js"(te,Z){var v="razdwatrzy";Z.exports=function(){return typeof v.contains!="function"?!1:v.contains("dwa")===!0&&v.contains("foo")===!1}}}),TQ=Ne({"node_modules/es5-ext/string/#/contains/shim.js"(te,Z){var v=String.prototype.indexOf;Z.exports=function(w){return v.call(this,w,arguments[1])>-1}}}),LN=Ne({"node_modules/es5-ext/string/#/contains/index.js"(te,Z){Z.exports=wQ()()?String.prototype.contains:TQ()}}),L_=Ne({"node_modules/d/index.js"(te,Z){var v=x3(),w=kN(),C=zR(),P=PN(),t=LN(),r=Z.exports=function(a,l){var i,s,o,u,d;return arguments.length<2||typeof a!="string"?(u=l,l=a,a=null):u=arguments[2],v(a)?(i=t.call(a,"c"),s=t.call(a,"e"),o=t.call(a,"w")):(i=o=!0,s=!1),d={value:l,configurable:i,enumerable:s,writable:o},u?C(P(u),d):d};r.gs=function(a,l,i){var s,o,u,d;return typeof a!="string"?(u=i,i=l,l=a,a=null):u=arguments[3],v(l)?w(l)?v(i)?w(i)||(u=i,i=void 0):i=void 0:(u=l,l=i=void 0):l=void 0,v(a)?(s=t.call(a,"c"),o=t.call(a,"e")):(s=!0,o=!1),d={get:l,set:i,configurable:s,enumerable:o},u?C(P(u),d):d}}}),hk=Ne({"node_modules/es5-ext/function/is-arguments.js"(te,Z){var v=Object.prototype.toString,w=v.call((function(){return arguments})());Z.exports=function(C){return v.call(C)===w}}}),dk=Ne({"node_modules/es5-ext/string/is-string.js"(te,Z){var v=Object.prototype.toString,w=v.call("");Z.exports=function(C){return typeof C=="string"||C&&typeof C=="object"&&(C instanceof String||v.call(C)===w)||!1}}}),AQ=Ne({"node_modules/ext/global-this/is-implemented.js"(te,Z){Z.exports=function(){return typeof globalThis!="object"||!globalThis?!1:globalThis.Array===Array}}}),SQ=Ne({"node_modules/ext/global-this/implementation.js"(te,Z){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`")};Z.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__}})()}}),vk=Ne({"node_modules/ext/global-this/index.js"(te,Z){Z.exports=AQ()()?globalThis:SQ()}}),EQ=Ne({"node_modules/es6-symbol/is-implemented.js"(te,Z){var v=vk(),w={object:!0,symbol:!0};Z.exports=function(){var C=v.Symbol,P;if(typeof C!="function")return!1;P=C("test symbol");try{String(P)}catch{return!1}return!(!w[typeof C.iterator]||!w[typeof C.toPrimitive]||!w[typeof C.toStringTag])}}}),MQ=Ne({"node_modules/es6-symbol/is-symbol.js"(te,Z){Z.exports=function(v){return v?typeof v=="symbol"?!0:!v.constructor||v.constructor.name!=="Symbol"?!1:v[v.constructor.toStringTag]==="Symbol":!1}}}),RN=Ne({"node_modules/es6-symbol/validate-symbol.js"(te,Z){var v=MQ();Z.exports=function(w){if(!v(w))throw new TypeError(w+" is not a symbol");return w}}}),CQ=Ne({"node_modules/es6-symbol/lib/private/generate-name.js"(te,Z){var v=L_(),w=Object.create,C=Object.defineProperty,P=Object.prototype,t=w(null);Z.exports=function(r){for(var a=0,l,i;t[r+(a||"")];)++a;return r+=a||"",t[r]=!0,l="@@"+r,C(P,l,v.gs(null,function(s){i||(i=!0,C(this,l,v(s)),i=!1)})),l}}}),kQ=Ne({"node_modules/es6-symbol/lib/private/setup/standard-symbols.js"(te,Z){var v=L_(),w=vk().Symbol;Z.exports=function(C){return Object.defineProperties(C,{hasInstance:v("",w&&w.hasInstance||C("hasInstance")),isConcatSpreadable:v("",w&&w.isConcatSpreadable||C("isConcatSpreadable")),iterator:v("",w&&w.iterator||C("iterator")),match:v("",w&&w.match||C("match")),replace:v("",w&&w.replace||C("replace")),search:v("",w&&w.search||C("search")),species:v("",w&&w.species||C("species")),split:v("",w&&w.split||C("split")),toPrimitive:v("",w&&w.toPrimitive||C("toPrimitive")),toStringTag:v("",w&&w.toStringTag||C("toStringTag")),unscopables:v("",w&&w.unscopables||C("unscopables"))})}}}),PQ=Ne({"node_modules/es6-symbol/lib/private/setup/symbol-registry.js"(te,Z){var v=L_(),w=RN(),C=Object.create(null);Z.exports=function(P){return Object.defineProperties(P,{for:v(function(t){return C[t]?C[t]:C[t]=P(String(t))}),keyFor:v(function(t){var r;w(t);for(r in C)if(C[r]===t)return r})})}}}),LQ=Ne({"node_modules/es6-symbol/polyfill.js"(te,Z){var v=L_(),w=RN(),C=vk().Symbol,P=CQ(),t=kQ(),r=PQ(),a=Object.create,l=Object.defineProperties,i=Object.defineProperty,s,o,u;if(typeof C=="function")try{String(C()),u=!0}catch{}else C=null;o=function(h){if(this instanceof o)throw new TypeError("Symbol is not a constructor");return s(h)},Z.exports=s=function d(h){var g;if(this instanceof d)throw new TypeError("Symbol is not a constructor");return u?C(h):(g=a(o.prototype),h=h===void 0?"":String(h),l(g,{__description__:v("",h),__name__:v("",P(h))}))},t(s),r(s),l(o.prototype,{constructor:v(s),toString:v("",function(){return this.__name__})}),l(s.prototype,{toString:v(function(){return"Symbol ("+w(this).__description__+")"}),valueOf:v(function(){return w(this)})}),i(s.prototype,s.toPrimitive,v("",function(){var d=w(this);return typeof d=="symbol"?d:d.toString()})),i(s.prototype,s.toStringTag,v("c","Symbol")),i(o.prototype,s.toStringTag,v("c",s.prototype[s.toStringTag])),i(o.prototype,s.toPrimitive,v("c",s.prototype[s.toPrimitive]))}}),Fb=Ne({"node_modules/es6-symbol/index.js"(te,Z){Z.exports=EQ()()?vk().Symbol:LQ()}}),RQ=Ne({"node_modules/es5-ext/array/#/clear.js"(te,Z){var v=P_();Z.exports=function(){return v(this).length=0,this}}}),QS=Ne({"node_modules/es5-ext/object/valid-callable.js"(te,Z){Z.exports=function(v){if(typeof v!="function")throw new TypeError(v+" is not a function");return v}}}),IQ=Ne({"node_modules/type/string/coerce.js"(te,Z){var v=x3(),w=OR(),C=Object.prototype.toString;Z.exports=function(P){if(!v(P))return null;if(w(P)){var t=P.toString;if(typeof t!="function"||t===C)return null}try{return""+P}catch{return null}}}}),DQ=Ne({"node_modules/type/lib/safe-to-string.js"(te,Z){Z.exports=function(v){try{return v.toString()}catch{try{return String(v)}catch{return null}}}}}),OQ=Ne({"node_modules/type/lib/to-short-string.js"(te,Z){var v=DQ(),w=/[\n\r\u2028\u2029]/g;Z.exports=function(C){var P=v(C);return P===null?"<Non-coercible to string value>":(P.length>100&&(P=P.slice(0,99)+"…"),P=P.replace(w,function(t){switch(t){case`
`:return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}}),P)}}}),IN=Ne({"node_modules/type/lib/resolve-exception.js"(te,Z){var v=x3(),w=OR(),C=IQ(),P=OQ(),t=function(r,a){return r.replace("%v",P(a))};Z.exports=function(r,a,l){if(!w(l))throw new TypeError(t(a,r));if(!v(r)){if("default"in l)return l.default;if(l.isOptional)return null}var i=C(l.errorMessage);throw v(i)||(i=a),new TypeError(t(i,r))}}}),zQ=Ne({"node_modules/type/value/ensure.js"(te,Z){var v=IN(),w=x3();Z.exports=function(C){return w(C)?C:v(C,"Cannot use %v",arguments[1])}}}),NQ=Ne({"node_modules/type/plain-function/ensure.js"(te,Z){var v=IN(),w=kN();Z.exports=function(C){return w(C)?C:v(C,"%v is not a plain function",arguments[1])}}}),FQ=Ne({"node_modules/es5-ext/array/from/is-implemented.js"(te,Z){Z.exports=function(){var v=Array.from,w,C;return typeof v!="function"?!1:(w=["raz","dwa"],C=v(w),!!(C&&C!==w&&C[1]==="dwa"))}}}),BQ=Ne({"node_modules/es5-ext/function/is-function.js"(te,Z){var v=Object.prototype.toString,w=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);Z.exports=function(C){return typeof C=="function"&&w(v.call(C))}}}),jQ=Ne({"node_modules/es5-ext/math/sign/is-implemented.js"(te,Z){Z.exports=function(){var v=Math.sign;return typeof v!="function"?!1:v(10)===1&&v(-20)===-1}}}),UQ=Ne({"node_modules/es5-ext/math/sign/shim.js"(te,Z){Z.exports=function(v){return v=Number(v),isNaN(v)||v===0?v:v>0?1:-1}}}),qQ=Ne({"node_modules/es5-ext/math/sign/index.js"(te,Z){Z.exports=jQ()()?Math.sign:UQ()}}),VQ=Ne({"node_modules/es5-ext/number/to-integer.js"(te,Z){var v=qQ(),w=Math.abs,C=Math.floor;Z.exports=function(P){return isNaN(P)?0:(P=Number(P),P===0||!isFinite(P)?P:v(P)*C(w(P)))}}}),HQ=Ne({"node_modules/es5-ext/number/to-pos-integer.js"(te,Z){var v=VQ(),w=Math.max;Z.exports=function(C){return w(0,v(C))}}}),GQ=Ne({"node_modules/es5-ext/array/from/shim.js"(te,Z){var v=Fb().iterator,w=hk(),C=BQ(),P=HQ(),t=QS(),r=P_(),a=Nb(),l=dk(),i=Array.isArray,s=Function.prototype.call,o={configurable:!0,enumerable:!0,writable:!0,value:null},u=Object.defineProperty;Z.exports=function(d){var h=arguments[1],g=arguments[2],m,E,c,_,T,M,k,b,A,y;if(d=Object(r(d)),a(h)&&t(h),!this||this===Array||!C(this)){if(!h){if(w(d))return T=d.length,T!==1?Array.apply(null,d):(_=new Array(1),_[0]=d[0],_);if(i(d)){for(_=new Array(T=d.length),E=0;E<T;++E)_[E]=d[E];return _}}_=[]}else m=this;if(!i(d)){if((A=d[v])!==void 0){for(k=t(A).call(d),m&&(_=new m),b=k.next(),E=0;!b.done;)y=h?s.call(h,g,b.value,E):b.value,m?(o.value=y,u(_,E,o)):_[E]=y,b=k.next(),++E;T=E}else if(l(d)){for(T=d.length,m&&(_=new m),E=0,c=0;E<T;++E)y=d[E],E+1<T&&(M=y.charCodeAt(0),M>=55296&&M<=56319&&(y+=d[++E])),y=h?s.call(h,g,y,c):y,m?(o.value=y,u(_,c,o)):_[c]=y,++c;T=c}}if(T===void 0)for(T=P(d.length),m&&(_=new m(T)),E=0;E<T;++E)y=h?s.call(h,g,d[E],E):d[E],m?(o.value=y,u(_,E,o)):_[E]=y;return m&&(o.value=null,_.length=T),_}}}),XQ=Ne({"node_modules/es5-ext/array/from/index.js"(te,Z){Z.exports=FQ()()?Array.from:GQ()}}),WQ=Ne({"node_modules/es5-ext/object/copy.js"(te,Z){var v=XQ(),w=zR(),C=P_();Z.exports=function(P){var t=Object(C(P)),r=arguments[1],a=Object(arguments[2]);if(t!==P&&!r)return t;var l={};return r?v(r,function(i){(a.ensure||i in P)&&(l[i]=P[i])}):w(l,P),l}}}),YQ=Ne({"node_modules/es5-ext/object/_iterate.js"(te,Z){var v=QS(),w=P_(),C=Function.prototype.bind,P=Function.prototype.call,t=Object.keys,r=Object.prototype.propertyIsEnumerable;Z.exports=function(a,l){return function(i,s){var o,u=arguments[2],d=arguments[3];return i=Object(w(i)),v(s),o=t(i),d&&o.sort(typeof d=="function"?C.call(d,i):void 0),typeof a!="function"&&(a=o[a]),P.call(a,o,function(h,g){return r.call(i,h)?P.call(s,u,i[h],h,i,g):l})}}}}),ZQ=Ne({"node_modules/es5-ext/object/for-each.js"(te,Z){Z.exports=YQ()("forEach")}}),$Q=Ne({"node_modules/es5-ext/object/map.js"(te,Z){var v=QS(),w=ZQ(),C=Function.prototype.call;Z.exports=function(P,t){var r={},a=arguments[2];return v(t),w(P,function(l,i,s,o){r[i]=C.call(t,a,l,i,s,o)}),r}}}),KQ=Ne({"node_modules/d/auto-bind.js"(te,Z){var v=x3(),w=zQ(),C=NQ(),P=WQ(),t=PN(),r=$Q(),a=Function.prototype.bind,l=Object.defineProperty,i=Object.prototype.hasOwnProperty,s;s=function(o,u,d){var h=w(u)&&C(u.value),g;return g=P(u),delete g.writable,delete g.value,g.get=function(){return!d.overwriteDefinition&&i.call(this,o)?h:(u.value=a.call(h,d.resolveContext?d.resolveContext(this):this),l(this,o,u),this[o])},g},Z.exports=function(o){var u=t(arguments[1]);return v(u.resolveContext)&&C(u.resolveContext),r(o,function(d,h){return s(h,d,u)})}}}),DN=Ne({"node_modules/es6-iterator/index.js"(te,Z){var v=RQ(),w=zR(),C=QS(),P=P_(),t=L_(),r=KQ(),a=Fb(),l=Object.defineProperty,i=Object.defineProperties,s;Z.exports=s=function(o,u){if(!(this instanceof s))throw new TypeError("Constructor requires 'new'");i(this,{__list__:t("w",P(o)),__context__:t("w",u),__nextIndex__:t("w",0)}),u&&(C(u.on),u.on("_add",this._onAdd),u.on("_delete",this._onDelete),u.on("_clear",this._onClear))},delete s.prototype.constructor,i(s.prototype,w({_next:t(function(){var o;if(this.__list__){if(this.__redo__&&(o=this.__redo__.shift(),o!==void 0))return o;if(this.__nextIndex__<this.__list__.length)return this.__nextIndex__++;this._unBind()}}),next:t(function(){return this._createResult(this._next())}),_createResult:t(function(o){return o===void 0?{done:!0,value:void 0}:{done:!1,value:this._resolve(o)}}),_resolve:t(function(o){return this.__list__[o]}),_unBind:t(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:t(function(){return"[object "+(this[a.toStringTag]||"Object")+"]"})},r({_onAdd:t(function(o){if(!(o>=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__){l(this,"__redo__",t("c",[o]));return}this.__redo__.forEach(function(u,d){u>=o&&(this.__redo__[d]=++u)},this),this.__redo__.push(o)}}),_onDelete:t(function(o){var u;o>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(u=this.__redo__.indexOf(o),u!==-1&&this.__redo__.splice(u,1),this.__redo__.forEach(function(d,h){d>o&&(this.__redo__[h]=--d)},this)))}),_onClear:t(function(){this.__redo__&&v.call(this.__redo__),this.__nextIndex__=0})}))),l(s.prototype,a.iterator,t(function(){return this}))}}),JQ=Ne({"node_modules/es6-iterator/array.js"(te,Z){var v=DR(),w=LN(),C=L_(),P=Fb(),t=DN(),r=Object.defineProperty,a;a=Z.exports=function(l,i){if(!(this instanceof a))throw new TypeError("Constructor requires 'new'");t.call(this,l),i?w.call(i,"key+value")?i="key+value":w.call(i,"key")?i="key":i="value":i="value",r(this,"__kind__",C("",i))},v&&v(a,t),delete a.prototype.constructor,a.prototype=Object.create(t.prototype,{_resolve:C(function(l){return this.__kind__==="value"?this.__list__[l]:this.__kind__==="key+value"?[l,this.__list__[l]]:l})}),r(a.prototype,P.toStringTag,C("c","Array Iterator"))}}),QQ=Ne({"node_modules/es6-iterator/string.js"(te,Z){var v=DR(),w=L_(),C=Fb(),P=DN(),t=Object.defineProperty,r;r=Z.exports=function(a){if(!(this instanceof r))throw new TypeError("Constructor requires 'new'");a=String(a),P.call(this,a),t(this,"__length__",w("",a.length))},v&&v(r,P),delete r.prototype.constructor,r.prototype=Object.create(P.prototype,{_next:w(function(){if(this.__list__){if(this.__nextIndex__<this.__length__)return this.__nextIndex__++;this._unBind()}}),_resolve:w(function(a){var l=this.__list__[a],i;return this.__nextIndex__===this.__length__?l:(i=l.charCodeAt(0),i>=55296&&i<=56319?l+this.__list__[this.__nextIndex__++]:l)})}),t(r.prototype,C.toStringTag,w("c","String Iterator"))}}),eee=Ne({"node_modules/es6-iterator/is-iterable.js"(te,Z){var v=hk(),w=Nb(),C=dk(),P=Fb().iterator,t=Array.isArray;Z.exports=function(r){return w(r)?t(r)||C(r)||v(r)?!0:typeof r[P]=="function":!1}}}),tee=Ne({"node_modules/es6-iterator/valid-iterable.js"(te,Z){var v=eee();Z.exports=function(w){if(!v(w))throw new TypeError(w+" is not iterable");return w}}}),ON=Ne({"node_modules/es6-iterator/get.js"(te,Z){var v=hk(),w=dk(),C=JQ(),P=QQ(),t=tee(),r=Fb().iterator;Z.exports=function(a){return typeof t(a)[r]=="function"?a[r]():v(a)?new C(a):w(a)?new P(a):new C(a)}}}),ree=Ne({"node_modules/es6-iterator/for-of.js"(te,Z){var v=hk(),w=QS(),C=dk(),P=ON(),t=Array.isArray,r=Function.prototype.call,a=Array.prototype.some;Z.exports=function(l,i){var s,o=arguments[2],u,d,h,g,m,E,c;if(t(l)||v(l)?s="array":C(l)?s="string":l=P(l),w(i),d=function(){h=!0},s==="array"){a.call(l,function(_){return r.call(i,o,_,d),h});return}if(s==="string"){for(m=l.length,g=0;g<m&&(E=l[g],g+1<m&&(c=E.charCodeAt(0),c>=55296&&c<=56319&&(E+=l[++g])),r.call(i,o,E,d),!h);++g);return}for(u=l.next();!u.done;){if(r.call(i,o,u.value,d),h)return;u=l.next()}}}}),nee=Ne({"node_modules/es6-weak-map/is-native-implemented.js"(te,Z){Z.exports=(function(){return typeof WeakMap!="function"?!1:Object.prototype.toString.call(new WeakMap)==="[object WeakMap]"})()}}),aee=Ne({"node_modules/es6-weak-map/polyfill.js"(te,Z){var v=Nb(),w=DR(),C=dQ(),P=P_(),t=vQ(),r=L_(),a=ON(),l=ree(),i=Fb().toStringTag,s=nee(),o=Array.isArray,u=Object.defineProperty,d=Object.prototype.hasOwnProperty,h=Object.getPrototypeOf,g;Z.exports=g=function(){var m=arguments[0],E;if(!(this instanceof g))throw new TypeError("Constructor requires 'new'");return E=s&&w&&WeakMap!==g?w(new WeakMap,h(this)):this,v(m)&&(o(m)||(m=a(m))),u(E,"__weakMapData__",r("c","$weakMap$"+t())),m&&l(m,function(c){P(c),E.set(c[0],c[1])}),E},s&&(w&&w(g,WeakMap),g.prototype=Object.create(WeakMap.prototype,{constructor:r(g)})),Object.defineProperties(g.prototype,{delete:r(function(m){return d.call(C(m),this.__weakMapData__)?(delete m[this.__weakMapData__],!0):!1}),get:r(function(m){if(d.call(C(m),this.__weakMapData__))return m[this.__weakMapData__]}),has:r(function(m){return d.call(C(m),this.__weakMapData__)}),set:r(function(m,E){return u(C(m),this.__weakMapData__,r("c",E)),this}),toString:r(function(){return"[object WeakMap]"})}),u(g.prototype,i,r("c","WeakMap"))}}),zN=Ne({"node_modules/es6-weak-map/index.js"(te,Z){Z.exports=cQ()()?WeakMap:aee()}}),iee=Ne({"node_modules/array-find-index/index.js"(te,Z){Z.exports=function(v,w,C){if(typeof Array.prototype.findIndex=="function")return v.findIndex(w,C);if(typeof w!="function")throw new TypeError("predicate must be a function");var P=Object(v),t=P.length;if(t===0)return-1;for(var r=0;r<t;r++)if(w.call(C,P[r],r,P))return r;return-1}}}),NN=Ne({"node_modules/regl-line2d/index.js"(te,Z){var v=Rb(),w=g3(),C=Xd(),P=n1(),t=y3(),r=lQ(),a=uQ(),{float32:l,fract32:i}=IR(),s=zN(),o=JS(),u=iee(),d=`
precision highp float;

attribute vec2 aCoord, bCoord, aCoordFract, bCoordFract;
attribute vec4 color;
attribute float lineEnd, lineTop;

uniform vec2 scale, scaleFract, translate, translateFract;
uniform float thickness, pixelRatio, id, depth;
uniform vec4 viewport;

varying vec4 fragColor;
varying vec2 tangent;

vec2 project(vec2 position, vec2 positionFract, vec2 scale, vec2 scaleFract, vec2 translate, vec2 translateFract) {
	// the order is important
	return position * scale + translate
       + positionFract * scale + translateFract
       + position * scaleFract
       + positionFract * scaleFract;
}

void main() {
	float lineStart = 1. - lineEnd;
	float lineOffset = lineTop * 2. - 1.;

	vec2 diff = (bCoord + bCoordFract - aCoord - aCoordFract);
	tangent = normalize(diff * scale * viewport.zw);
	vec2 normal = vec2(-tangent.y, tangent.x);

	vec2 position = project(aCoord, aCoordFract, scale, scaleFract, translate, translateFract) * lineStart
		+ project(bCoord, bCoordFract, scale, scaleFract, translate, translateFract) * lineEnd

		+ thickness * normal * .5 * lineOffset / viewport.zw;

	gl_Position = vec4(position * 2.0 - 1.0, depth, 1);

	fragColor = color / 255.;
}
`,h=`
precision highp float;

uniform float dashLength, pixelRatio, thickness, opacity, id;
uniform sampler2D dashTexture;

varying vec4 fragColor;
varying vec2 tangent;

void main() {
	float alpha = 1.;

	float t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25;
	float dash = texture2D(dashTexture, vec2(t, .5)).r;

	gl_FragColor = fragColor;
	gl_FragColor.a *= alpha * opacity * dash;
}
`,g=`
precision highp float;

attribute vec2 position, positionFract;

uniform vec4 color;
uniform vec2 scale, scaleFract, translate, translateFract;
uniform float pixelRatio, id;
uniform vec4 viewport;
uniform float opacity;

varying vec4 fragColor;

const float MAX_LINES = 256.;

void main() {
	float depth = (MAX_LINES - 4. - id) / (MAX_LINES);

	vec2 position = position * scale + translate
       + positionFract * scale + translateFract
       + position * scaleFract
       + positionFract * scaleFract;

	gl_Position = vec4(position * 2.0 - 1.0, depth, 1);

	fragColor = color / 255.;
	fragColor.a *= opacity;
}
`,m=`
precision highp float;
varying vec4 fragColor;

void main() {
	gl_FragColor = fragColor;
}
`,E=`
precision highp float;

attribute vec2 aCoord, bCoord, nextCoord, prevCoord;
attribute vec4 aColor, bColor;
attribute float lineEnd, lineTop;

uniform vec2 scale, translate;
uniform float thickness, pixelRatio, id, depth;
uniform vec4 viewport;
uniform float miterLimit, miterMode;

varying vec4 fragColor;
varying vec4 startCutoff, endCutoff;
varying vec2 tangent;
varying vec2 startCoord, endCoord;
varying float enableStartMiter, enableEndMiter;

const float REVERSE_THRESHOLD = -.875;
const float MIN_DIFF = 1e-6;

// TODO: possible optimizations: avoid overcalculating all for vertices and calc just one instead
// TODO: precalculate dot products, normalize things beforehead etc.
// TODO: refactor to rectangular algorithm

float distToLine(vec2 p, vec2 a, vec2 b) {
	vec2 diff = b - a;
	vec2 perp = normalize(vec2(-diff.y, diff.x));
	return dot(p - a, perp);
}

bool isNaN( float val ){
  return ( val < 0.0 || 0.0 < val || val == 0.0 ) ? false : true;
}

void main() {
	vec2 aCoord = aCoord, bCoord = bCoord, prevCoord = prevCoord, nextCoord = nextCoord;

  vec2 adjustedScale;
  adjustedScale.x = (abs(scale.x) < MIN_DIFF) ? MIN_DIFF : scale.x;
  adjustedScale.y = (abs(scale.y) < MIN_DIFF) ? MIN_DIFF : scale.y;

  vec2 scaleRatio = adjustedScale * viewport.zw;
	vec2 normalWidth = thickness / scaleRatio;

	float lineStart = 1. - lineEnd;
	float lineBot = 1. - lineTop;

	fragColor = (lineStart * aColor + lineEnd * bColor) / 255.;

	if (isNaN(aCoord.x) || isNaN(aCoord.y) || isNaN(bCoord.x) || isNaN(bCoord.y)) return;

	if (aCoord == prevCoord) prevCoord = aCoord + normalize(bCoord - aCoord);
	if (bCoord == nextCoord) nextCoord = bCoord - normalize(bCoord - aCoord);


	vec2 prevDiff = aCoord - prevCoord;
	vec2 currDiff = bCoord - aCoord;
	vec2 nextDiff = nextCoord - bCoord;

	vec2 prevTangent = normalize(prevDiff * scaleRatio);
	vec2 currTangent = normalize(currDiff * scaleRatio);
	vec2 nextTangent = normalize(nextDiff * scaleRatio);

	vec2 prevNormal = vec2(-prevTangent.y, prevTangent.x);
	vec2 currNormal = vec2(-currTangent.y, currTangent.x);
	vec2 nextNormal = vec2(-nextTangent.y, nextTangent.x);

	vec2 startJoinDirection = normalize(prevTangent - currTangent);
	vec2 endJoinDirection = normalize(currTangent - nextTangent);

	// collapsed/unidirectional segment cases
	// FIXME: there should be more elegant solution
	vec2 prevTanDiff = abs(prevTangent - currTangent);
	vec2 nextTanDiff = abs(nextTangent - currTangent);
	if (max(prevTanDiff.x, prevTanDiff.y) < MIN_DIFF) {
		startJoinDirection = currNormal;
	}
	if (max(nextTanDiff.x, nextTanDiff.y) < MIN_DIFF) {
		endJoinDirection = currNormal;
	}
	if (aCoord == bCoord) {
		endJoinDirection = startJoinDirection;
		currNormal = prevNormal;
		currTangent = prevTangent;
	}

	tangent = currTangent;

	//calculate join shifts relative to normals
	float startJoinShift = dot(currNormal, startJoinDirection);
	float endJoinShift = dot(currNormal, endJoinDirection);

	float startMiterRatio = abs(1. / startJoinShift);
	float endMiterRatio = abs(1. / endJoinShift);

	vec2 startJoin = startJoinDirection * startMiterRatio;
	vec2 endJoin = endJoinDirection * endMiterRatio;

	vec2 startTopJoin, startBotJoin, endTopJoin, endBotJoin;
	startTopJoin = sign(startJoinShift) * startJoin * .5;
	startBotJoin = -startTopJoin;

	endTopJoin = sign(endJoinShift) * endJoin * .5;
	endBotJoin = -endTopJoin;

	vec2 aTopCoord = aCoord + normalWidth * startTopJoin;
	vec2 bTopCoord = bCoord + normalWidth * endTopJoin;
	vec2 aBotCoord = aCoord + normalWidth * startBotJoin;
	vec2 bBotCoord = bCoord + normalWidth * endBotJoin;

	//miter anti-clipping
	float baClipping = distToLine(bCoord, aCoord, aBotCoord) / dot(normalize(normalWidth * endBotJoin), normalize(normalWidth.yx * vec2(-startBotJoin.y, startBotJoin.x)));
	float abClipping = distToLine(aCoord, bCoord, bTopCoord) / dot(normalize(normalWidth * startBotJoin), normalize(normalWidth.yx * vec2(-endBotJoin.y, endBotJoin.x)));

	//prevent close to reverse direction switch
	bool prevReverse = dot(currTangent, prevTangent) <= REVERSE_THRESHOLD && abs(dot(currTangent, prevNormal)) * min(length(prevDiff), length(currDiff)) <  length(normalWidth * currNormal);
	bool nextReverse = dot(currTangent, nextTangent) <= REVERSE_THRESHOLD && abs(dot(currTangent, nextNormal)) * min(length(nextDiff), length(currDiff)) <  length(normalWidth * currNormal);

	if (prevReverse) {
		//make join rectangular
		vec2 miterShift = normalWidth * startJoinDirection * miterLimit * .5;
		float normalAdjust = 1. - min(miterLimit / startMiterRatio, 1.);
		aBotCoord = aCoord + miterShift - normalAdjust * normalWidth * currNormal * .5;
		aTopCoord = aCoord + miterShift + normalAdjust * normalWidth * currNormal * .5;
	}
	else if (!nextReverse && baClipping > 0. && baClipping < length(normalWidth * endBotJoin)) {
		//handle miter clipping
		bTopCoord -= normalWidth * endTopJoin;
		bTopCoord += normalize(endTopJoin * normalWidth) * baClipping;
	}

	if (nextReverse) {
		//make join rectangular
		vec2 miterShift = normalWidth * endJoinDirection * miterLimit * .5;
		float normalAdjust = 1. - min(miterLimit / endMiterRatio, 1.);
		bBotCoord = bCoord + miterShift - normalAdjust * normalWidth * currNormal * .5;
		bTopCoord = bCoord + miterShift + normalAdjust * normalWidth * currNormal * .5;
	}
	else if (!prevReverse && abClipping > 0. && abClipping < length(normalWidth * startBotJoin)) {
		//handle miter clipping
		aBotCoord -= normalWidth * startBotJoin;
		aBotCoord += normalize(startBotJoin * normalWidth) * abClipping;
	}

	vec2 aTopPosition = (aTopCoord) * adjustedScale + translate;
	vec2 aBotPosition = (aBotCoord) * adjustedScale + translate;

	vec2 bTopPosition = (bTopCoord) * adjustedScale + translate;
	vec2 bBotPosition = (bBotCoord) * adjustedScale + translate;

	//position is normalized 0..1 coord on the screen
	vec2 position = (aTopPosition * lineTop + aBotPosition * lineBot) * lineStart + (bTopPosition * lineTop + bBotPosition * lineBot) * lineEnd;

	startCoord = aCoord * scaleRatio + translate * viewport.zw + viewport.xy;
	endCoord = bCoord * scaleRatio + translate * viewport.zw + viewport.xy;

	gl_Position = vec4(position  * 2.0 - 1.0, depth, 1);

	enableStartMiter = step(dot(currTangent, prevTangent), .5);
	enableEndMiter = step(dot(currTangent, nextTangent), .5);

	//bevel miter cutoffs
	if (miterMode == 1.) {
		if (enableStartMiter == 1.) {
			vec2 startMiterWidth = vec2(startJoinDirection) * thickness * miterLimit * .5;
			startCutoff = vec4(aCoord, aCoord);
			startCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;
			startCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;
			startCutoff += viewport.xyxy;
			startCutoff += startMiterWidth.xyxy;
		}

		if (enableEndMiter == 1.) {
			vec2 endMiterWidth = vec2(endJoinDirection) * thickness * miterLimit * .5;
			endCutoff = vec4(bCoord, bCoord);
			endCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x)  / scaleRatio;
			endCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;
			endCutoff += viewport.xyxy;
			endCutoff += endMiterWidth.xyxy;
		}
	}

	//round miter cutoffs
	else if (miterMode == 2.) {
		if (enableStartMiter == 1.) {
			vec2 startMiterWidth = vec2(startJoinDirection) * thickness * abs(dot(startJoinDirection, currNormal)) * .5;
			startCutoff = vec4(aCoord, aCoord);
			startCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;
			startCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;
			startCutoff += viewport.xyxy;
			startCutoff += startMiterWidth.xyxy;
		}

		if (enableEndMiter == 1.) {
			vec2 endMiterWidth = vec2(endJoinDirection) * thickness * abs(dot(endJoinDirection, currNormal)) * .5;
			endCutoff = vec4(bCoord, bCoord);
			endCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x)  / scaleRatio;
			endCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;
			endCutoff += viewport.xyxy;
			endCutoff += endMiterWidth.xyxy;
		}
	}
}
`,c=`
precision highp float;

uniform float dashLength, pixelRatio, thickness, opacity, id, miterMode;
uniform sampler2D dashTexture;

varying vec4 fragColor;
varying vec2 tangent;
varying vec4 startCutoff, endCutoff;
varying vec2 startCoord, endCoord;
varying float enableStartMiter, enableEndMiter;

float distToLine(vec2 p, vec2 a, vec2 b) {
	vec2 diff = b - a;
	vec2 perp = normalize(vec2(-diff.y, diff.x));
	return dot(p - a, perp);
}

void main() {
	float alpha = 1., distToStart, distToEnd;
	float cutoff = thickness * .5;

	//bevel miter
	if (miterMode == 1.) {
		if (enableStartMiter == 1.) {
			distToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);
			if (distToStart < -1.) {
				discard;
				return;
			}
			alpha *= min(max(distToStart + 1., 0.), 1.);
		}

		if (enableEndMiter == 1.) {
			distToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);
			if (distToEnd < -1.) {
				discard;
				return;
			}
			alpha *= min(max(distToEnd + 1., 0.), 1.);
		}
	}

	// round miter
	else if (miterMode == 2.) {
		if (enableStartMiter == 1.) {
			distToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);
			if (distToStart < 0.) {
				float radius = length(gl_FragCoord.xy - startCoord);

				if(radius > cutoff + .5) {
					discard;
					return;
				}

				alpha -= smoothstep(cutoff - .5, cutoff + .5, radius);
			}
		}

		if (enableEndMiter == 1.) {
			distToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);
			if (distToEnd < 0.) {
				float radius = length(gl_FragCoord.xy - endCoord);

				if(radius > cutoff + .5) {
					discard;
					return;
				}

				alpha -= smoothstep(cutoff - .5, cutoff + .5, radius);
			}
		}
	}

	float t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25;
	float dash = texture2D(dashTexture, vec2(t, .5)).r;

	gl_FragColor = fragColor;
	gl_FragColor.a *= alpha * opacity * dash;
}
`;Z.exports=_;function _(T,M){if(!(this instanceof _))return new _(T,M);if(typeof T=="function"?(M||(M={}),M.regl=T):M=T,M.length&&(M.positions=M),T=M.regl,!T.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");this.gl=T._gl,this.regl=T,this.passes=[],this.shaders=_.shaders.has(T)?_.shaders.get(T):_.shaders.set(T,_.createShaders(T)).get(T),this.update(M)}_.dashMult=2,_.maxPatternLength=256,_.precisionThreshold=3e6,_.maxPoints=1e4,_.maxLines=2048,_.shaders=new s,_.createShaders=function(T){let M=T.buffer({usage:"static",type:"float",data:[0,1,0,0,1,1,1,0]}),k={primitive:"triangle strip",instances:T.prop("count"),count:4,offset:0,uniforms:{miterMode:(f,p)=>p.join==="round"?2:1,miterLimit:T.prop("miterLimit"),scale:T.prop("scale"),scaleFract:T.prop("scaleFract"),translateFract:T.prop("translateFract"),translate:T.prop("translate"),thickness:T.prop("thickness"),dashTexture:T.prop("dashTexture"),opacity:T.prop("opacity"),pixelRatio:T.context("pixelRatio"),id:T.prop("id"),dashLength:T.prop("dashLength"),viewport:(f,p)=>[p.viewport.x,p.viewport.y,f.viewportWidth,f.viewportHeight],depth:T.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:(f,p)=>!p.overlay},stencil:{enable:!1},scissor:{enable:!0,box:T.prop("viewport")},viewport:T.prop("viewport")},b=T(C({vert:d,frag:h,attributes:{lineEnd:{buffer:M,divisor:0,stride:8,offset:0},lineTop:{buffer:M,divisor:0,stride:8,offset:4},aCoord:{buffer:T.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:T.prop("positionBuffer"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:T.prop("positionFractBuffer"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:T.prop("positionFractBuffer"),stride:8,offset:16,divisor:1},color:{buffer:T.prop("colorBuffer"),stride:4,offset:0,divisor:1}}},k)),A;try{A=T(C({cull:{enable:!0,face:"back"},vert:E,frag:c,attributes:{lineEnd:{buffer:M,divisor:0,stride:8,offset:0},lineTop:{buffer:M,divisor:0,stride:8,offset:4},aColor:{buffer:T.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:T.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:T.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:T.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:T.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:T.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},k))}catch{A=b}return{fill:T({primitive:"triangle",elements:(f,p)=>p.triangles,offset:0,vert:g,frag:m,uniforms:{scale:T.prop("scale"),color:T.prop("fill"),scaleFract:T.prop("scaleFract"),translateFract:T.prop("translateFract"),translate:T.prop("translate"),opacity:T.prop("opacity"),pixelRatio:T.context("pixelRatio"),id:T.prop("id"),viewport:(f,p)=>[p.viewport.x,p.viewport.y,f.viewportWidth,f.viewportHeight]},attributes:{position:{buffer:T.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:T.prop("positionFractBuffer"),stride:8,offset:8}},blend:k.blend,depth:{enable:!1},scissor:k.scissor,stencil:k.stencil,viewport:k.viewport}),rect:b,miter:A}},_.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},_.prototype.render=function(...T){T.length&&this.update(...T),this.draw()},_.prototype.draw=function(...T){return(T.length?T:this.passes).forEach((M,k)=>{if(M&&Array.isArray(M))return this.draw(...M);typeof M=="number"&&(M=this.passes[M]),M&&M.count>1&&M.opacity&&(this.regl._refresh(),M.fill&&M.triangles&&M.triangles.length>2&&this.shaders.fill(M),M.thickness&&(M.scale[0]*M.viewport.width>_.precisionThreshold||M.scale[1]*M.viewport.height>_.precisionThreshold?this.shaders.rect(M):M.join==="rect"||!M.join&&(M.thickness<=2||M.count>=_.maxPoints)?this.shaders.rect(M):this.shaders.miter(M)))}),this},_.prototype.update=function(T){if(!T)return;T.length!=null?typeof T[0]=="number"&&(T=[{positions:T}]):Array.isArray(T)||(T=[T]);let{regl:M,gl:k}=this;if(T.forEach((A,y)=>{let f=this.passes[y];if(A!==void 0){if(A===null){this.passes[y]=null;return}if(typeof A[0]=="number"&&(A={positions:A}),A=P(A,{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"}),f||(this.passes[y]=f={id:y,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:M.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:M.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:M.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:M.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},A=C({},_.defaults,A)),A.thickness!=null&&(f.thickness=parseFloat(A.thickness)),A.opacity!=null&&(f.opacity=parseFloat(A.opacity)),A.miterLimit!=null&&(f.miterLimit=parseFloat(A.miterLimit)),A.overlay!=null&&(f.overlay=!!A.overlay,y<_.maxLines&&(f.depth=2*(_.maxLines-1-y%_.maxLines)/_.maxLines-1)),A.join!=null&&(f.join=A.join),A.hole!=null&&(f.hole=A.hole),A.fill!=null&&(f.fill=A.fill?v(A.fill,"uint8"):null),A.viewport!=null&&(f.viewport=o(A.viewport)),f.viewport||(f.viewport=o([k.drawingBufferWidth,k.drawingBufferHeight])),A.close!=null&&(f.close=A.close),A.positions===null&&(A.positions=[]),A.positions){let N,D;if(A.positions.x&&A.positions.y){let q=A.positions.x,z=A.positions.y;D=f.count=Math.max(q.length,z.length),N=new Float64Array(D*2);for(let H=0;H<D;H++)N[H*2]=q[H],N[H*2+1]=z[H]}else N=t(A.positions,"float64"),D=f.count=Math.floor(N.length/2);let B=f.bounds=w(N,2);if(f.fill){let q=[],z={},H=0;for(let G=0,J=0,le=f.count;G<le;G++){let ge=N[G*2],de=N[G*2+1];isNaN(ge)||isNaN(de)||ge==null||de==null?(ge=N[H*2],de=N[H*2+1],z[G]=H):H=G,q[J++]=ge,q[J++]=de}if(A.splitNull){f.count-1 in z||(z[f.count]=f.count-1);let G=Object.keys(z).map(Number).sort((de,me)=>de-me),J=[],le=0,ge=f.hole!=null?f.hole[0]:null;if(ge!=null){let de=u(G,me=>me>=ge);G=G.slice(0,de),G.push(ge)}for(let de=0;de<G.length;de++){let me=q.slice(le*2,G[de]*2).concat(ge?q.slice(ge*2):[]),W=(f.hole||[]).map(se=>se-ge+(G[de]-le)),ie=r(me,W);ie=ie.map(se=>se+le+(se+le<G[de]?0:ge-G[de])),J.push(...ie),le=G[de]+1}for(let de=0,me=J.length;de<me;de++)z[J[de]]!=null&&(J[de]=z[J[de]]);f.triangles=J}else{let G=r(q,f.hole||[]);for(let J=0,le=G.length;J<le;J++)z[G[J]]!=null&&(G[J]=z[G[J]]);f.triangles=G}}let U=new Float64Array(N);a(U,2,B);let V=new Float64Array(D*2+6);f.close?N[0]===N[D*2-2]&&N[1]===N[D*2-1]?(V[0]=U[D*2-4],V[1]=U[D*2-3]):(V[0]=U[D*2-2],V[1]=U[D*2-1]):(V[0]=U[0],V[1]=U[1]),V.set(U,2),f.close?N[0]===N[D*2-2]&&N[1]===N[D*2-1]?(V[D*2+2]=U[2],V[D*2+3]=U[3],f.count-=1):(V[D*2+2]=U[0],V[D*2+3]=U[1],V[D*2+4]=U[2],V[D*2+5]=U[3]):(V[D*2+2]=U[D*2-2],V[D*2+3]=U[D*2-1],V[D*2+4]=U[D*2-2],V[D*2+5]=U[D*2-1]);var p=l(V);f.positionBuffer(p);var x=i(V,p);f.positionFractBuffer(x)}if(A.range?f.range=A.range:f.range||(f.range=f.bounds),(A.range||A.positions)&&f.count){let N=f.bounds,D=N[2]-N[0],B=N[3]-N[1],U=f.range[2]-f.range[0],V=f.range[3]-f.range[1];f.scale=[D/U,B/V],f.translate=[-f.range[0]/U+N[0]/U||0,-f.range[1]/V+N[1]/V||0],f.scaleFract=i(f.scale),f.translateFract=i(f.translate)}if(A.dashes){let N=0,D;if(!A.dashes||A.dashes.length<2)N=1,D=new Uint8Array([255,255,255,255,255,255,255,255]);else{N=0;for(let V=0;V<A.dashes.length;++V)N+=A.dashes[V];D=new Uint8Array(N*_.dashMult);let B=0,U=255;for(let V=0;V<2;V++)for(let q=0;q<A.dashes.length;++q){for(let z=0,H=A.dashes[q]*_.dashMult*.5;z<H;++z)D[B++]=U;U^=255}}f.dashLength=N,f.dashTexture({channels:1,data:D,width:D.length,height:1,mag:"linear",min:"linear"},0,0)}if(A.color){let N=f.count,D=A.color;D||(D="transparent");let B=new Uint8Array(N*4+4);if(!Array.isArray(D)||typeof D[0]=="number"){let U=v(D,"uint8");for(let V=0;V<N+1;V++)B.set(U,V*4)}else{for(let U=0;U<N;U++){let V=v(D[U],"uint8");B.set(V,U*4)}B.set(v(D[0],"uint8"),N*4)}f.colorBuffer({usage:"dynamic",type:"uint8",data:B})}}}),T.length<this.passes.length){for(let A=T.length;A<this.passes.length;A++){let y=this.passes[A];y&&(y.colorBuffer.destroy(),y.positionBuffer.destroy(),y.dashTexture.destroy())}this.passes.length=T.length}let b=[];for(let A=0;A<this.passes.length;A++)this.passes[A]!==null&&b.push(this.passes[A]);return this.passes=b,this},_.prototype.destroy=function(){return this.passes.forEach(T=>{T.colorBuffer.destroy(),T.positionBuffer.destroy(),T.dashTexture.destroy()}),this.passes.length=0,this}}}),oee=Ne({"node_modules/regl-error2d/index.js"(te,Z){var v=g3(),w=Rb(),C=AN(),P=n1(),t=Xd(),r=y3(),{float32:a,fract32:l}=IR();Z.exports=s;var i=[[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 s(o,u){if(typeof o=="function"?(u||(u={}),u.regl=o):u=o,u.length&&(u.positions=u),o=u.regl,!o.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");let d=o._gl,h,g,m,E,c,_,T={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},M=[];return E=o.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),g=o.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),m=o.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),c=o.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),_=o.buffer({usage:"static",type:"float",data:i}),y(u),h=o({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:o.prop("range"),lineWidth:o.prop("lineWidth"),capSize:o.prop("capSize"),opacity:o.prop("opacity"),scale:o.prop("scale"),translate:o.prop("translate"),scaleFract:o.prop("scaleFract"),translateFract:o.prop("translateFract"),viewport:(p,x)=>[x.viewport.x,x.viewport.y,p.viewportWidth,p.viewportHeight]},attributes:{color:{buffer:E,offset:(p,x)=>x.offset*4,divisor:1},position:{buffer:g,offset:(p,x)=>x.offset*8,divisor:1},positionFract:{buffer:m,offset:(p,x)=>x.offset*8,divisor:1},error:{buffer:c,offset:(p,x)=>x.offset*16,divisor:1},direction:{buffer:_,stride:24,offset:0},lineOffset:{buffer:_,stride:24,offset:8},capOffset:{buffer:_,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:o.prop("viewport")},viewport:o.prop("viewport"),stencil:!1,instances:o.prop("count"),count:i.length}),t(k,{update:y,draw:b,destroy:f,regl:o,gl:d,canvas:d.canvas,groups:M}),k;function k(p){p?y(p):p===null&&f(),b()}function b(p){if(typeof p=="number")return A(p);p&&!Array.isArray(p)&&(p=[p]),o._refresh(),M.forEach((x,N)=>{if(x){if(p&&(p[N]?x.draw=!0:x.draw=!1),!x.draw){x.draw=!0;return}A(N)}})}function A(p){typeof p=="number"&&(p=M[p]),p!=null&&p&&p.count&&p.color&&p.opacity&&p.positions&&p.positions.length>1&&(p.scaleRatio=[p.scale[0]*p.viewport.width,p.scale[1]*p.viewport.height],h(p),p.after&&p.after(p))}function y(p){if(!p)return;p.length!=null?typeof p[0]=="number"&&(p=[{positions:p}]):Array.isArray(p)||(p=[p]);let x=0,N=0;if(k.groups=M=p.map((U,V)=>{let q=M[V];if(U)typeof U=="function"?U={after:U}:typeof U[0]=="number"&&(U={positions:U});else return q;return U=P(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"}),q||(M[V]=q={id:V,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},U=t({},T,U)),C(q,U,[{lineWidth:z=>+z*.5,capSize:z=>+z*.5,opacity:parseFloat,errors:z=>(z=r(z),N+=z.length,z),positions:(z,H)=>(z=r(z,"float64"),H.count=Math.floor(z.length/2),H.bounds=v(z,2),H.offset=x,x+=H.count,z)},{color:(z,H)=>{let G=H.count;if(z||(z="transparent"),!Array.isArray(z)||typeof z[0]=="number"){let le=z;z=Array(G);for(let ge=0;ge<G;ge++)z[ge]=le}if(z.length<G)throw Error("Not enough colors");let J=new Uint8Array(G*4);for(let le=0;le<G;le++){let ge=w(z[le],"uint8");J.set(ge,le*4)}return J},range:(z,H,G)=>{let J=H.bounds;return z||(z=J),H.scale=[1/(z[2]-z[0]),1/(z[3]-z[1])],H.translate=[-z[0],-z[1]],H.scaleFract=l(H.scale),H.translateFract=l(H.translate),z},viewport:z=>{let H;return Array.isArray(z)?H={x:z[0],y:z[1],width:z[2]-z[0],height:z[3]-z[1]}:z?(H={x:z.x||z.left||0,y:z.y||z.top||0},z.right?H.width=z.right-H.x:H.width=z.w||z.width||0,z.bottom?H.height=z.bottom-H.y:H.height=z.h||z.height||0):H={x:0,y:0,width:d.drawingBufferWidth,height:d.drawingBufferHeight},H}}]),q}),x||N){let U=M.reduce((H,G,J)=>H+(G?G.count:0),0),V=new Float64Array(U*2),q=new Uint8Array(U*4),z=new Float32Array(U*4);M.forEach((H,G)=>{if(!H)return;let{positions:J,count:le,offset:ge,color:de,errors:me}=H;le&&(q.set(de,ge*4),z.set(me,ge*4),V.set(J,ge*2))});var D=a(V);g(D);var B=l(V,D);m(B),E(q),c(z)}}function f(){g.destroy(),m.destroy(),E.destroy(),c.destroy(),_.destroy()}}}}),see=Ne({"node_modules/unquote/index.js"(te,Z){var v=/[\'\"]/;Z.exports=function(C){return C?(v.test(C.charAt(0))&&(C=C.substr(1)),v.test(C.charAt(C.length-1))&&(C=C.substr(0,C.length-1)),C):""}}}),FN=Ne({"node_modules/css-global-keywords/index.json"(te,Z){Z.exports=["inherit","initial","unset"]}}),BN=Ne({"node_modules/css-system-font-keywords/index.json"(te,Z){Z.exports=["caption","icon","menu","message-box","small-caption","status-bar"]}}),jN=Ne({"node_modules/css-font-weight-keywords/index.json"(te,Z){Z.exports=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]}}),UN=Ne({"node_modules/css-font-style-keywords/index.json"(te,Z){Z.exports=["normal","italic","oblique"]}}),qN=Ne({"node_modules/css-font-stretch-keywords/index.json"(te,Z){Z.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]}}),lee=Ne({"node_modules/parenthesis/index.js"(te,Z){function v(P,t){if(typeof P!="string")return[P];var r=[P];typeof t=="string"||Array.isArray(t)?t={brackets:t}:t||(t={});var a=t.brackets?Array.isArray(t.brackets)?t.brackets:[t.brackets]:["{}","[]","()"],l=t.escape||"___",i=!!t.flat;a.forEach(function(u){var d=new RegExp(["\\",u[0],"[^\\",u[0],"\\",u[1],"]*\\",u[1]].join("")),h=[];function g(m,E,c){var _=r.push(m.slice(u[0].length,-u[1].length))-1;return h.push(_),l+_+l}r.forEach(function(m,E){for(var c,_=0;m!=c;)if(c=m,m=m.replace(d,g),_++>1e4)throw Error("References have circular dependency. Please, check them.");r[E]=m}),h=h.reverse(),r=r.map(function(m){return h.forEach(function(E){m=m.replace(new RegExp("(\\"+l+E+"\\"+l+")","g"),u[0]+"$1"+u[1])}),m})});var s=new RegExp("\\"+l+"([0-9]+)\\"+l);function o(u,d,h){for(var g=[],m,E=0;m=s.exec(u);){if(E++>1e4)throw Error("Circular references in parenthesis");g.push(u.slice(0,m.index)),g.push(o(d[m[1]],d)),u=u.slice(m.index+m[0].length)}return g.push(u),g}return i?r:o(r[0],r)}function w(P,t){if(t&&t.flat){var r=t&&t.escape||"___",a=P[0],l;if(!a)return"";for(var i=new RegExp("\\"+r+"([0-9]+)\\"+r),s=0;a!=l;){if(s++>1e4)throw Error("Circular references in "+P);l=a,a=a.replace(i,o)}return a}return P.reduce(function u(d,h){return Array.isArray(h)&&(h=h.reduce(u,"")),d+h},"");function o(u,d){if(P[d]==null)throw Error("Reference "+d+"is undefined");return P[d]}}function C(P,t){return Array.isArray(P)?w(P,t):v(P,t)}C.parse=v,C.stringify=w,Z.exports=C}}),uee=Ne({"node_modules/string-split-by/index.js"(te,Z){var v=lee();Z.exports=function(C,P,t){if(C==null)throw Error("First argument should be a string");if(P==null)throw Error("Separator should be a string or a RegExp");t?(typeof t=="string"||Array.isArray(t))&&(t={ignore:t}):t={},t.escape==null&&(t.escape=!0),t.ignore==null?t.ignore=["[]","()","{}","<>",'""',"''","``","“”","«»"]:(typeof t.ignore=="string"&&(t.ignore=[t.ignore]),t.ignore=t.ignore.map(function(d){return d.length===1&&(d=d+d),d}));var r=v.parse(C,{flat:!0,brackets:t.ignore}),a=r[0],l=a.split(P);if(t.escape){for(var i=[],s=0;s<l.length;s++){var o=l[s],u=l[s+1];o[o.length-1]==="\\"&&o[o.length-2]!=="\\"?(i.push(o+P+u),s++):i.push(o)}l=i}for(var s=0;s<l.length;s++)r[0]=l[s],l[s]=v.stringify(r,{flat:!0});return l}}}),cee=Ne({"node_modules/css-font-size-keywords/index.json"(te,Z){Z.exports=["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]}}),VN=Ne({"node_modules/css-font/lib/util.js"(te,Z){var v=cee();Z.exports={isSize:function(C){return/^[\d\.]/.test(C)||C.indexOf("/")!==-1||v.indexOf(C)!==-1}}}}),fee=Ne({"node_modules/css-font/parse.js"(te,Z){var v=see(),w=FN(),C=BN(),P=jN(),t=UN(),r=qN(),a=uee(),l=VN().isSize;Z.exports=s;var i=s.cache={};function s(u){if(typeof u!="string")throw new Error("Font argument must be a string.");if(i[u])return i[u];if(u==="")throw new Error("Cannot parse an empty string.");if(C.indexOf(u)!==-1)return i[u]={system:u};for(var d={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},h=a(u,/\s+/),g;g=h.shift();){if(w.indexOf(g)!==-1)return["style","variant","weight","stretch"].forEach(function(E){d[E]=g}),i[u]=d;if(t.indexOf(g)!==-1){d.style=g;continue}if(g==="normal"||g==="small-caps"){d.variant=g;continue}if(r.indexOf(g)!==-1){d.stretch=g;continue}if(P.indexOf(g)!==-1){d.weight=g;continue}if(l(g)){var m=a(g,"/");if(d.size=m[0],m[1]!=null?d.lineHeight=o(m[1]):h[0]==="/"&&(h.shift(),d.lineHeight=o(h.shift())),!h.length)throw new Error("Missing required font-family.");return d.family=a(h.join(" "),/\s*,\s*/).map(v),i[u]=d}throw new Error("Unknown or unsupported font token: "+g)}throw new Error("Missing required font-size.")}function o(u){var d=parseFloat(u);return d.toString()===u?d:u}}}),HN=Ne({"node_modules/css-font/stringify.js"(te,Z){var v=n1(),w=VN().isSize,C=u(FN()),P=u(BN()),t=u(jN()),r=u(UN()),a=u(qN()),l={normal:1,"small-caps":1},i={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},s={size:"1rem",family:"serif"};Z.exports=function(h){if(h=v(h,{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"}),h.system)return h.system&&o(h.system,P),h.system;if(o(h.style,r),o(h.variant,l),o(h.weight,t),o(h.stretch,a),h.size==null&&(h.size=s.size),typeof h.size=="number"&&(h.size+="px"),!w)throw Error("Bad size value `"+h.size+"`");h.family||(h.family=s.family),Array.isArray(h.family)&&(h.family.length||(h.family=[s.family]),h.family=h.family.map(function(m){return i[m]?m:'"'+m+'"'}).join(", "));var g=[];return g.push(h.style),h.variant!==h.style&&g.push(h.variant),h.weight!==h.variant&&h.weight!==h.style&&g.push(h.weight),h.stretch!==h.weight&&h.stretch!==h.variant&&h.stretch!==h.style&&g.push(h.stretch),g.push(h.size+(h.lineHeight==null||h.lineHeight==="normal"||h.lineHeight+""=="1"?"":"/"+h.lineHeight)),g.push(h.family),g.filter(Boolean).join(" ")};function o(d,h){if(d&&!h[d]&&!C[d])throw Error("Unknown keyword `"+d+"`");return d}function u(d){for(var h={},g=0;g<d.length;g++)h[d[g]]=1;return h}}}),hee=Ne({"node_modules/css-font/index.js"(te,Z){Z.exports={parse:fee(),stringify:HN()}}}),dee=Ne({"node_modules/regl/dist/regl.unchecked.js"(te,Z){(function(v,w){typeof te=="object"&&typeof Z<"u"?Z.exports=w():v.createREGL=w()})(te,function(){var v=function(St,kr){for(var Dr=Object.keys(kr),Xn=0;Xn<Dr.length;++Xn)St[Dr[Xn]]=kr[Dr[Xn]];return St},w=0,C=0,P=5,t=6;function r(St,kr){this.id=w++,this.type=St,this.data=kr}function a(St){return St.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}function l(St){if(St.length===0)return[];var kr=St.charAt(0),Dr=St.charAt(St.length-1);if(St.length>1&&kr===Dr&&(kr==='"'||kr==="'"))return['"'+a(St.substr(1,St.length-2))+'"'];var Xn=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(St);if(Xn)return l(St.substr(0,Xn.index)).concat(l(Xn[1])).concat(l(St.substr(Xn.index+Xn[0].length)));var La=St.split(".");if(La.length===1)return['"'+a(St)+'"'];for(var Rn=[],Pn=0;Pn<La.length;++Pn)Rn=Rn.concat(l(La[Pn]));return Rn}function i(St){return"["+l(St).join("][")+"]"}function s(St,kr){return new r(St,i(kr+""))}function o(St){return typeof St=="function"&&!St._reglType||St instanceof r}function u(St,kr){if(typeof St=="function")return new r(C,St);if(typeof St=="number"||typeof St=="boolean")return new r(P,St);if(Array.isArray(St))return new r(t,St.map(function(Dr,Xn){return u(Dr)}));if(St instanceof r)return St}var d={DynamicVariable:r,define:s,isDynamic:o,unbox:u,accessor:i},h={next:typeof requestAnimationFrame=="function"?function(St){return requestAnimationFrame(St)}:function(St){return setTimeout(St,16)},cancel:typeof cancelAnimationFrame=="function"?function(St){return cancelAnimationFrame(St)}:clearTimeout},g=typeof performance<"u"&&performance.now?function(){return performance.now()}:function(){return+new Date};function m(){var St={"":0},kr=[""];return{id:function(Dr){var Xn=St[Dr];return Xn||(Xn=St[Dr]=kr.length,kr.push(Dr),Xn)},str:function(Dr){return kr[Dr]}}}function E(St,kr,Dr){var Xn=document.createElement("canvas");v(Xn.style,{border:0,margin:0,padding:0,top:0,left:0,width:"100%",height:"100%"}),St.appendChild(Xn),St===document.body&&(Xn.style.position="absolute",v(St.style,{margin:0,padding:0}));function La(){var ni=window.innerWidth,ti=window.innerHeight;if(St!==document.body){var ri=Xn.getBoundingClientRect();ni=ri.right-ri.left,ti=ri.bottom-ri.top}Xn.width=Dr*ni,Xn.height=Dr*ti}var Rn;St!==document.body&&typeof ResizeObserver=="function"?(Rn=new ResizeObserver(function(){setTimeout(La)}),Rn.observe(St)):window.addEventListener("resize",La,!1);function Pn(){Rn?Rn.disconnect():window.removeEventListener("resize",La),St.removeChild(Xn)}return La(),{canvas:Xn,onDestroy:Pn}}function c(St,kr){function Dr(Xn){try{return St.getContext(Xn,kr)}catch{return null}}return Dr("webgl")||Dr("experimental-webgl")||Dr("webgl-experimental")}function _(St){return typeof St.nodeName=="string"&&typeof St.appendChild=="function"&&typeof St.getBoundingClientRect=="function"}function T(St){return typeof St.drawArrays=="function"||typeof St.drawElements=="function"}function M(St){return typeof St=="string"?St.split():St}function k(St){return typeof St=="string"?document.querySelector(St):St}function b(St){var kr=St||{},Dr,Xn,La,Rn,Pn={},ni=[],ti=[],ri=typeof window>"u"?1:window.devicePixelRatio,gi=!1,io={},qi=function(yn){},di=function(){};if(typeof kr=="string"?Dr=document.querySelector(kr):typeof kr=="object"&&(_(kr)?Dr=kr:T(kr)?(Rn=kr,La=Rn.canvas):("gl"in kr?Rn=kr.gl:"canvas"in kr?La=k(kr.canvas):"container"in kr&&(Xn=k(kr.container)),"attributes"in kr&&(Pn=kr.attributes),"extensions"in kr&&(ni=M(kr.extensions)),"optionalExtensions"in kr&&(ti=M(kr.optionalExtensions)),"onDone"in kr&&(qi=kr.onDone),"profile"in kr&&(gi=!!kr.profile),"pixelRatio"in kr&&(ri=+kr.pixelRatio),"cachedCode"in kr&&(io=kr.cachedCode))),Dr&&(Dr.nodeName.toLowerCase()==="canvas"?La=Dr:Xn=Dr),!Rn){if(!La){var Na=E(Xn||document.body,qi,ri);if(!Na)return null;La=Na.canvas,di=Na.onDestroy}Pn.premultipliedAlpha===void 0&&(Pn.premultipliedAlpha=!0),Rn=c(La,Pn)}return Rn?{gl:Rn,canvas:La,container:Xn,extensions:ni,optionalExtensions:ti,pixelRatio:ri,profile:gi,cachedCode:io,onDone:qi,onDestroy:di}:(di(),qi("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function A(St,kr){var Dr={};function Xn(Pn){var ni=Pn.toLowerCase(),ti;try{ti=Dr[ni]=St.getExtension(ni)}catch{}return!!ti}for(var La=0;La<kr.extensions.length;++La){var Rn=kr.extensions[La];if(!Xn(Rn))return kr.onDestroy(),kr.onDone('"'+Rn+'" extension is not supported by the current WebGL context, try upgrading your system or a different browser'),null}return kr.optionalExtensions.forEach(Xn),{extensions:Dr,restore:function(){Object.keys(Dr).forEach(function(Pn){if(Dr[Pn]&&!Xn(Pn))throw new Error("(regl): error restoring extension "+Pn)})}}}function y(St,kr){for(var Dr=Array(St),Xn=0;Xn<St;++Xn)Dr[Xn]=kr(Xn);return Dr}var f=5120,p=5121,x=5122,N=5123,D=5124,B=5125,U=5126;function V(St){for(var kr=16;kr<=1<<28;kr*=16)if(St<=kr)return kr;return 0}function q(St){var kr,Dr;return kr=(St>65535)<<4,St>>>=kr,Dr=(St>255)<<3,St>>>=Dr,kr|=Dr,Dr=(St>15)<<2,St>>>=Dr,kr|=Dr,Dr=(St>3)<<1,St>>>=Dr,kr|=Dr,kr|St>>1}function z(){var St=y(8,function(){return[]});function kr(Rn){var Pn=V(Rn),ni=St[q(Pn)>>2];return ni.length>0?ni.pop():new ArrayBuffer(Pn)}function Dr(Rn){St[q(Rn.byteLength)>>2].push(Rn)}function Xn(Rn,Pn){var ni=null;switch(Rn){case f:ni=new Int8Array(kr(Pn),0,Pn);break;case p:ni=new Uint8Array(kr(Pn),0,Pn);break;case x:ni=new Int16Array(kr(2*Pn),0,Pn);break;case N:ni=new Uint16Array(kr(2*Pn),0,Pn);break;case D:ni=new Int32Array(kr(4*Pn),0,Pn);break;case B:ni=new Uint32Array(kr(4*Pn),0,Pn);break;case U:ni=new Float32Array(kr(4*Pn),0,Pn);break;default:return null}return ni.length!==Pn?ni.subarray(0,Pn):ni}function La(Rn){Dr(Rn.buffer)}return{alloc:kr,free:Dr,allocType:Xn,freeType:La}}var H=z();H.zero=z();var G=3408,J=3410,le=3411,ge=3412,de=3413,me=3414,W=3415,ie=33901,se=33902,ee=3379,pe=3386,oe=34921,Y=36347,ce=36348,ue=35661,_e=35660,Le=34930,ze=36349,Xe=34076,Ve=34024,rt=7936,mt=7937,_t=7938,vt=35724,ut=34047,Fe=36063,Pe=34852,be=3553,Ye=34067,yt=34069,wt=33984,ht=6408,Yt=5126,$t=5121,fr=36160,mr=36053,Ur=36064,jr=16384,fn=function(St,kr){var Dr=1;kr.ext_texture_filter_anisotropic&&(Dr=St.getParameter(ut));var Xn=1,La=1;kr.webgl_draw_buffers&&(Xn=St.getParameter(Pe),La=St.getParameter(Fe));var Rn=!!kr.oes_texture_float;if(Rn){var Pn=St.createTexture();St.bindTexture(be,Pn),St.texImage2D(be,0,ht,1,1,0,ht,Yt,null);var ni=St.createFramebuffer();if(St.bindFramebuffer(fr,ni),St.framebufferTexture2D(fr,Ur,be,Pn,0),St.bindTexture(be,null),St.checkFramebufferStatus(fr)!==mr)Rn=!1;else{St.viewport(0,0,1,1),St.clearColor(1,0,0,1),St.clear(jr);var ti=H.allocType(Yt,4);St.readPixels(0,0,1,1,ht,Yt,ti),St.getError()?Rn=!1:(St.deleteFramebuffer(ni),St.deleteTexture(Pn),Rn=ti[0]===1),H.freeType(ti)}}var ri=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),gi=!0;if(!ri){var io=St.createTexture(),qi=H.allocType($t,36);St.activeTexture(wt),St.bindTexture(Ye,io),St.texImage2D(yt,0,ht,3,3,0,ht,$t,qi),H.freeType(qi),St.bindTexture(Ye,null),St.deleteTexture(io),gi=!St.getError()}return{colorBits:[St.getParameter(J),St.getParameter(le),St.getParameter(ge),St.getParameter(de)],depthBits:St.getParameter(me),stencilBits:St.getParameter(W),subpixelBits:St.getParameter(G),extensions:Object.keys(kr).filter(function(di){return!!kr[di]}),maxAnisotropic:Dr,maxDrawbuffers:Xn,maxColorAttachments:La,pointSizeDims:St.getParameter(ie),lineWidthDims:St.getParameter(se),maxViewportDims:St.getParameter(pe),maxCombinedTextureUnits:St.getParameter(ue),maxCubeMapSize:St.getParameter(Xe),maxRenderbufferSize:St.getParameter(Ve),maxTextureUnits:St.getParameter(Le),maxTextureSize:St.getParameter(ee),maxAttributes:St.getParameter(oe),maxVertexUniforms:St.getParameter(Y),maxVertexTextureUnits:St.getParameter(_e),maxVaryingVectors:St.getParameter(ce),maxFragmentUniforms:St.getParameter(ze),glsl:St.getParameter(vt),renderer:St.getParameter(mt),vendor:St.getParameter(rt),version:St.getParameter(_t),readFloat:Rn,npotTextureCube:gi}},Br=function(St){return St instanceof Uint8Array||St instanceof Uint16Array||St instanceof Uint32Array||St instanceof Int8Array||St instanceof Int16Array||St instanceof Int32Array||St instanceof Float32Array||St instanceof Float64Array||St instanceof Uint8ClampedArray};function Qr(St){return!!St&&typeof St=="object"&&Array.isArray(St.shape)&&Array.isArray(St.stride)&&typeof St.offset=="number"&&St.shape.length===St.stride.length&&(Array.isArray(St.data)||Br(St.data))}var Ot=function(St){return Object.keys(St).map(function(kr){return St[kr]})},$e={shape:tt,flatten:Ie};function ot(St,kr,Dr){for(var Xn=0;Xn<kr;++Xn)Dr[Xn]=St[Xn]}function De(St,kr,Dr,Xn){for(var La=0,Rn=0;Rn<kr;++Rn)for(var Pn=St[Rn],ni=0;ni<Dr;++ni)Xn[La++]=Pn[ni]}function Ee(St,kr,Dr,Xn,La,Rn){for(var Pn=Rn,ni=0;ni<kr;++ni)for(var ti=St[ni],ri=0;ri<Dr;++ri)for(var gi=ti[ri],io=0;io<Xn;++io)La[Pn++]=gi[io]}function Ae(St,kr,Dr,Xn,La){for(var Rn=1,Pn=Dr+1;Pn<kr.length;++Pn)Rn*=kr[Pn];var ni=kr[Dr];if(kr.length-Dr===4){var ti=kr[Dr+1],ri=kr[Dr+2],gi=kr[Dr+3];for(Pn=0;Pn<ni;++Pn)Ee(St[Pn],ti,ri,gi,Xn,La),La+=Rn}else for(Pn=0;Pn<ni;++Pn)Ae(St[Pn],kr,Dr+1,Xn,La),La+=Rn}function Ie(St,kr,Dr,Xn){var La=1;if(kr.length)for(var Rn=0;Rn<kr.length;++Rn)La*=kr[Rn];else La=0;var Pn=Xn||H.allocType(Dr,La);switch(kr.length){case 0:break;case 1:ot(St,kr[0],Pn);break;case 2:De(St,kr[0],kr[1],Pn);break;case 3:Ee(St,kr[0],kr[1],kr[2],Pn,0);break;default:Ae(St,kr,0,Pn,0)}return Pn}function tt(St){for(var kr=[],Dr=St;Dr.length;Dr=Dr[0])kr.push(Dr.length);return kr}var st={"[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},Bt=5120,Ft=5122,Wt=5124,lr=5121,Rr=5123,Mr=5125,Sr=5126,Kr=5126,Hn={int8:Bt,int16:Ft,int32:Wt,uint8:lr,uint16:Rr,uint32:Mr,float:Sr,float32:Kr},ga=35048,ua=35040,Ta={dynamic:ga,stream:ua,static:35044},Aa=$e.flatten,ia=$e.shape,$a=35044,ci=35040,_r=5121,Qt=5126,yr=[];yr[5120]=1,yr[5122]=2,yr[5124]=4,yr[5121]=1,yr[5123]=2,yr[5125]=4,yr[5126]=4;function br(St){return st[Object.prototype.toString.call(St)]|0}function an(St,kr){for(var Dr=0;Dr<kr.length;++Dr)St[Dr]=kr[Dr]}function wn(St,kr,Dr,Xn,La,Rn,Pn){for(var ni=0,ti=0;ti<Dr;++ti)for(var ri=0;ri<Xn;++ri)St[ni++]=kr[La*ti+Rn*ri+Pn]}function Ln(St,kr,Dr,Xn){var La=0,Rn={};function Pn(yn){this.id=La++,this.buffer=St.createBuffer(),this.type=yn,this.usage=$a,this.byteLength=0,this.dimension=1,this.dtype=_r,this.persistentData=null,Dr.profile&&(this.stats={size:0})}Pn.prototype.bind=function(){St.bindBuffer(this.type,this.buffer)},Pn.prototype.destroy=function(){qi(this)};var ni=[];function ti(yn,ra){var wa=ni.pop();return wa||(wa=new Pn(yn)),wa.bind(),io(wa,ra,ci,0,1,!1),wa}function ri(yn){ni.push(yn)}function gi(yn,ra,wa){yn.byteLength=ra.byteLength,St.bufferData(yn.type,ra,wa)}function io(yn,ra,wa,Fa,Sa,zi){var li;if(yn.usage=wa,Array.isArray(ra)){if(yn.dtype=Fa||Qt,ra.length>0){var eo;if(Array.isArray(ra[0])){li=ia(ra);for(var Ea=1,pa=1;pa<li.length;++pa)Ea*=li[pa];yn.dimension=Ea,eo=Aa(ra,li,yn.dtype),gi(yn,eo,wa),zi?yn.persistentData=eo:H.freeType(eo)}else if(typeof ra[0]=="number"){yn.dimension=Sa;var ki=H.allocType(yn.dtype,ra.length);an(ki,ra),gi(yn,ki,wa),zi?yn.persistentData=ki:H.freeType(ki)}else Br(ra[0])&&(yn.dimension=ra[0].length,yn.dtype=Fa||br(ra[0])||Qt,eo=Aa(ra,[ra.length,ra[0].length],yn.dtype),gi(yn,eo,wa),zi?yn.persistentData=eo:H.freeType(eo))}}else if(Br(ra))yn.dtype=Fa||br(ra),yn.dimension=Sa,gi(yn,ra,wa),zi&&(yn.persistentData=new Uint8Array(new Uint8Array(ra.buffer)));else if(Qr(ra)){li=ra.shape;var Jn=ra.stride,_i=ra.offset,ai=0,no=0,Xo=0,Vi=0;li.length===1?(ai=li[0],no=1,Xo=Jn[0],Vi=0):li.length===2&&(ai=li[0],no=li[1],Xo=Jn[0],Vi=Jn[1]),yn.dtype=Fa||br(ra.data)||Qt,yn.dimension=no;var lo=H.allocType(yn.dtype,ai*no);wn(lo,ra.data,ai,no,Xo,Vi,_i),gi(yn,lo,wa),zi?yn.persistentData=lo:H.freeType(lo)}else ra instanceof ArrayBuffer&&(yn.dtype=_r,yn.dimension=Sa,gi(yn,ra,wa),zi&&(yn.persistentData=new Uint8Array(new Uint8Array(ra))))}function qi(yn){kr.bufferCount--,Xn(yn);var ra=yn.buffer;St.deleteBuffer(ra),yn.buffer=null,delete Rn[yn.id]}function di(yn,ra,wa,Fa){kr.bufferCount++;var Sa=new Pn(ra);Rn[Sa.id]=Sa;function zi(Ea){var pa=$a,ki=null,Jn=0,_i=0,ai=1;return Array.isArray(Ea)||Br(Ea)||Qr(Ea)||Ea instanceof ArrayBuffer?ki=Ea:typeof Ea=="number"?Jn=Ea|0:Ea&&("data"in Ea&&(ki=Ea.data),"usage"in Ea&&(pa=Ta[Ea.usage]),"type"in Ea&&(_i=Hn[Ea.type]),"dimension"in Ea&&(ai=Ea.dimension|0),"length"in Ea&&(Jn=Ea.length|0)),Sa.bind(),ki?io(Sa,ki,pa,_i,ai,Fa):(Jn&&St.bufferData(Sa.type,Jn,pa),Sa.dtype=_i||_r,Sa.usage=pa,Sa.dimension=ai,Sa.byteLength=Jn),Dr.profile&&(Sa.stats.size=Sa.byteLength*yr[Sa.dtype]),zi}function li(Ea,pa){St.bufferSubData(Sa.type,pa,Ea)}function eo(Ea,pa){var ki=(pa||0)|0,Jn;if(Sa.bind(),Br(Ea)||Ea instanceof ArrayBuffer)li(Ea,ki);else if(Array.isArray(Ea)){if(Ea.length>0){if(typeof Ea[0]=="number"){var _i=H.allocType(Sa.dtype,Ea.length);an(_i,Ea),li(_i,ki),H.freeType(_i)}else if(Array.isArray(Ea[0])||Br(Ea[0])){Jn=ia(Ea);var ai=Aa(Ea,Jn,Sa.dtype);li(ai,ki),H.freeType(ai)}}}else if(Qr(Ea)){Jn=Ea.shape;var no=Ea.stride,Xo=0,Vi=0,lo=0,pi=0;Jn.length===1?(Xo=Jn[0],Vi=1,lo=no[0],pi=0):Jn.length===2&&(Xo=Jn[0],Vi=Jn[1],lo=no[0],pi=no[1]);var Uo=Array.isArray(Ea.data)?Sa.dtype:br(Ea.data),ns=H.allocType(Uo,Xo*Vi);wn(ns,Ea.data,Xo,Vi,lo,pi,Ea.offset),li(ns,ki),H.freeType(ns)}return zi}return wa||zi(yn),zi._reglType="buffer",zi._buffer=Sa,zi.subdata=eo,Dr.profile&&(zi.stats=Sa.stats),zi.destroy=function(){qi(Sa)},zi}function Na(){Ot(Rn).forEach(function(yn){yn.buffer=St.createBuffer(),St.bindBuffer(yn.type,yn.buffer),St.bufferData(yn.type,yn.persistentData||yn.byteLength,yn.usage)})}return Dr.profile&&(kr.getTotalBufferSize=function(){var yn=0;return Object.keys(Rn).forEach(function(ra){yn+=Rn[ra].stats.size}),yn}),{create:di,createStream:ti,destroyStream:ri,clear:function(){Ot(Rn).forEach(qi),ni.forEach(qi)},getBuffer:function(yn){return yn&&yn._buffer instanceof Pn?yn._buffer:null},restore:Na,_initBuffer:io}}var Bn=0,xa=0,za=1,Ia=1,Ba=4,Ka=4,fa={points:Bn,point:xa,lines:za,line:Ia,triangles:Ba,triangle:Ka,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Bi=0,Yi=1,Ht=4,kt=5120,qr=5121,en=5122,rn=5123,Wr=5124,tn=5125,Tn=34963,dn=35040,It=35044;function xr(St,kr,Dr,Xn){var La={},Rn=0,Pn={uint8:qr,uint16:rn};kr.oes_element_index_uint&&(Pn.uint32=tn);function ni(Na){this.id=Rn++,La[this.id]=this,this.buffer=Na,this.primType=Ht,this.vertCount=0,this.type=0}ni.prototype.bind=function(){this.buffer.bind()};var ti=[];function ri(Na){var yn=ti.pop();return yn||(yn=new ni(Dr.create(null,Tn,!0,!1)._buffer)),io(yn,Na,dn,-1,-1,0,0),yn}function gi(Na){ti.push(Na)}function io(Na,yn,ra,wa,Fa,Sa,zi){Na.buffer.bind();var li;if(yn){var eo=zi;!zi&&(!Br(yn)||Qr(yn)&&!Br(yn.data))&&(eo=kr.oes_element_index_uint?tn:rn),Dr._initBuffer(Na.buffer,yn,ra,eo,3)}else St.bufferData(Tn,Sa,ra),Na.buffer.dtype=li||qr,Na.buffer.usage=ra,Na.buffer.dimension=3,Na.buffer.byteLength=Sa;if(li=zi,!zi){switch(Na.buffer.dtype){case qr:case kt:li=qr;break;case rn:case en:li=rn;break;case tn:case Wr:li=tn;break}Na.buffer.dtype=li}Na.type=li;var Ea=Fa;Ea<0&&(Ea=Na.buffer.byteLength,li===rn?Ea>>=1:li===tn&&(Ea>>=2)),Na.vertCount=Ea;var pa=wa;if(wa<0){pa=Ht;var ki=Na.buffer.dimension;ki===1&&(pa=Bi),ki===2&&(pa=Yi),ki===3&&(pa=Ht)}Na.primType=pa}function qi(Na){Xn.elementsCount--,delete La[Na.id],Na.buffer.destroy(),Na.buffer=null}function di(Na,yn){var ra=Dr.create(null,Tn,!0),wa=new ni(ra._buffer);Xn.elementsCount++;function Fa(Sa){if(!Sa)ra(),wa.primType=Ht,wa.vertCount=0,wa.type=qr;else if(typeof Sa=="number")ra(Sa),wa.primType=Ht,wa.vertCount=Sa|0,wa.type=qr;else{var zi=null,li=It,eo=-1,Ea=-1,pa=0,ki=0;Array.isArray(Sa)||Br(Sa)||Qr(Sa)?zi=Sa:("data"in Sa&&(zi=Sa.data),"usage"in Sa&&(li=Ta[Sa.usage]),"primitive"in Sa&&(eo=fa[Sa.primitive]),"count"in Sa&&(Ea=Sa.count|0),"type"in Sa&&(ki=Pn[Sa.type]),"length"in Sa?pa=Sa.length|0:(pa=Ea,ki===rn||ki===en?pa*=2:(ki===tn||ki===Wr)&&(pa*=4))),io(wa,zi,li,eo,Ea,pa,ki)}return Fa}return Fa(Na),Fa._reglType="elements",Fa._elements=wa,Fa.subdata=function(Sa,zi){return ra.subdata(Sa,zi),Fa},Fa.destroy=function(){qi(wa)},Fa}return{create:di,createStream:ri,destroyStream:gi,getElements:function(Na){return typeof Na=="function"&&Na._elements instanceof ni?Na._elements:null},clear:function(){Ot(La).forEach(qi)}}}var Yr=new Float32Array(1),An=new Uint32Array(Yr.buffer),Zn=5123;function sa(St){for(var kr=H.allocType(Zn,St.length),Dr=0;Dr<St.length;++Dr)if(isNaN(St[Dr]))kr[Dr]=65535;else if(St[Dr]===1/0)kr[Dr]=31744;else if(St[Dr]===-1/0)kr[Dr]=64512;else{Yr[0]=St[Dr];var Xn=An[0],La=Xn>>>31<<15,Rn=(Xn<<1>>>24)-127,Pn=Xn>>13&1023;if(Rn<-24)kr[Dr]=La;else if(Rn<-14){var ni=-14-Rn;kr[Dr]=La+(Pn+1024>>ni)}else Rn>15?kr[Dr]=La+31744:kr[Dr]=La+(Rn+15<<10)+Pn}return kr}function oa(St){return Array.isArray(St)||Br(St)}var Sn=34467,Kn=3553,Ui=34067,Za=34069,Ki=6408,ho=6406,Co=6407,So=6409,Vo=6410,Oi=32854,ps=32855,as=36194,rl=32819,As=32820,hs=33635,ts=34042,nl=6402,Qs=34041,_l=35904,Ss=35906,ls=36193,Oo=33776,Es=33777,xl=33778,Ul=33779,Hl=35986,Fs=35987,Ni=34798,wo=35840,ql=35841,Gs=35842,Jo=35843,Gl=36196,al=5121,bl=5123,Iu=5125,_o=5126,Ps=10242,ms=10243,ru=10497,nu=33071,Zo=33648,_u=10240,Au=10241,Ys=9728,Ol=9729,$l=9984,Ql=9985,ac=9986,Tf=9987,rf=33170,df=4352,Zh=4353,zh=4354,zl=34046,Vc=3317,$h=37440,pc=37441,ic=37443,mc=37444,vf=33984,uu=[$l,ac,Ql,Tf],oc=[0,So,Vo,Co,Ki],el={};el[So]=el[ho]=el[nl]=1,el[Qs]=el[Vo]=2,el[Co]=el[_l]=3,el[Ki]=el[Ss]=4;function Xl(St){return"[object "+St+"]"}var zf=Xl("HTMLCanvasElement"),Lc=Xl("OffscreenCanvas"),$f=Xl("CanvasRenderingContext2D"),xu=Xl("ImageBitmap"),Wd=Xl("HTMLImageElement"),Zs=Xl("HTMLVideoElement"),dv=Object.keys(st).concat([zf,Lc,$f,xu,Wd,Zs]),Ml=[];Ml[al]=1,Ml[_o]=4,Ml[ls]=2,Ml[bl]=2,Ml[Iu]=4;var Ko=[];Ko[Oi]=2,Ko[ps]=2,Ko[as]=2,Ko[Qs]=4,Ko[Oo]=.5,Ko[Es]=.5,Ko[xl]=1,Ko[Ul]=1,Ko[Hl]=.5,Ko[Fs]=1,Ko[Ni]=1,Ko[wo]=.5,Ko[ql]=.25,Ko[Gs]=.5,Ko[Jo]=.25,Ko[Gl]=.5;function ph(St){return Array.isArray(St)&&(St.length===0||typeof St[0]=="number")}function pf(St){if(!Array.isArray(St))return!1;var kr=St.length;return!(kr===0||!oa(St[0]))}function Yu(St){return Object.prototype.toString.call(St)}function Kh(St){return Yu(St)===zf}function Kf(St){return Yu(St)===Lc}function Ah(St){return Yu(St)===$f}function sc(St){return Yu(St)===xu}function Ld(St){return Yu(St)===Wd}function sd(St){return Yu(St)===Zs}function Sh(St){if(!St)return!1;var kr=Yu(St);return dv.indexOf(kr)>=0?!0:ph(St)||pf(St)||Qr(St)}function Jf(St){return st[Object.prototype.toString.call(St)]|0}function Jh(St,kr){var Dr=kr.length;switch(St.type){case al:case bl:case Iu:case _o:var Xn=H.allocType(St.type,Dr);Xn.set(kr),St.data=Xn;break;case ls:St.data=sa(kr);break}}function Qh(St,kr){return H.allocType(St.type===ls?_o:St.type,kr)}function mf(St,kr){St.type===ls?(St.data=sa(kr),H.freeType(kr)):St.data=kr}function ld(St,kr,Dr,Xn,La,Rn){for(var Pn=St.width,ni=St.height,ti=St.channels,ri=Pn*ni*ti,gi=Qh(St,ri),io=0,qi=0;qi<ni;++qi)for(var di=0;di<Pn;++di)for(var Na=0;Na<ti;++Na)gi[io++]=kr[Dr*di+Xn*qi+La*Na+Rn];mf(St,gi)}function Nf(St,kr,Dr,Xn,La,Rn){var Pn;if(typeof Ko[St]<"u"?Pn=Ko[St]:Pn=el[St]*Ml[kr],Rn&&(Pn*=6),La){for(var ni=0,ti=Dr;ti>=1;)ni+=Pn*ti*ti,ti/=2;return ni}else return Pn*Dr*Xn}function Af(St,kr,Dr,Xn,La,Rn,Pn){var ni={"don't care":df,"dont care":df,nice:zh,fast:Zh},ti={repeat:ru,clamp:nu,mirror:Zo},ri={nearest:Ys,linear:Ol},gi=v({mipmap:Tf,"nearest mipmap nearest":$l,"linear mipmap nearest":Ql,"nearest mipmap linear":ac,"linear mipmap linear":Tf},ri),io={none:0,browser:mc},qi={uint8:al,rgba4:rl,rgb565:hs,"rgb5 a1":As},di={alpha:ho,luminance:So,"luminance alpha":Vo,rgb:Co,rgba:Ki,rgba4:Oi,"rgb5 a1":ps,rgb565:as},Na={};kr.ext_srgb&&(di.srgb=_l,di.srgba=Ss),kr.oes_texture_float&&(qi.float32=qi.float=_o),kr.oes_texture_half_float&&(qi.float16=qi["half float"]=ls),kr.webgl_depth_texture&&(v(di,{depth:nl,"depth stencil":Qs}),v(qi,{uint16:bl,uint32:Iu,"depth stencil":ts})),kr.webgl_compressed_texture_s3tc&&v(Na,{"rgb s3tc dxt1":Oo,"rgba s3tc dxt1":Es,"rgba s3tc dxt3":xl,"rgba s3tc dxt5":Ul}),kr.webgl_compressed_texture_atc&&v(Na,{"rgb atc":Hl,"rgba atc explicit alpha":Fs,"rgba atc interpolated alpha":Ni}),kr.webgl_compressed_texture_pvrtc&&v(Na,{"rgb pvrtc 4bppv1":wo,"rgb pvrtc 2bppv1":ql,"rgba pvrtc 4bppv1":Gs,"rgba pvrtc 2bppv1":Jo}),kr.webgl_compressed_texture_etc1&&(Na["rgb etc1"]=Gl);var yn=Array.prototype.slice.call(St.getParameter(Sn));Object.keys(Na).forEach(function(X){var ye=Na[X];yn.indexOf(ye)>=0&&(di[X]=ye)});var ra=Object.keys(di);Dr.textureFormats=ra;var wa=[];Object.keys(di).forEach(function(X){var ye=di[X];wa[ye]=X});var Fa=[];Object.keys(qi).forEach(function(X){var ye=qi[X];Fa[ye]=X});var Sa=[];Object.keys(ri).forEach(function(X){var ye=ri[X];Sa[ye]=X});var zi=[];Object.keys(gi).forEach(function(X){var ye=gi[X];zi[ye]=X});var li=[];Object.keys(ti).forEach(function(X){var ye=ti[X];li[ye]=X});var eo=ra.reduce(function(X,ye){var ne=di[ye];return ne===So||ne===ho||ne===So||ne===Vo||ne===nl||ne===Qs||kr.ext_srgb&&(ne===_l||ne===Ss)?X[ne]=ne:ne===ps||ye.indexOf("rgba")>=0?X[ne]=Ki:X[ne]=Co,X},{});function Ea(){this.internalformat=Ki,this.format=Ki,this.type=al,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=mc,this.width=0,this.height=0,this.channels=0}function pa(X,ye){X.internalformat=ye.internalformat,X.format=ye.format,X.type=ye.type,X.compressed=ye.compressed,X.premultiplyAlpha=ye.premultiplyAlpha,X.flipY=ye.flipY,X.unpackAlignment=ye.unpackAlignment,X.colorSpace=ye.colorSpace,X.width=ye.width,X.height=ye.height,X.channels=ye.channels}function ki(X,ye){if(!(typeof ye!="object"||!ye)){if("premultiplyAlpha"in ye&&(X.premultiplyAlpha=ye.premultiplyAlpha),"flipY"in ye&&(X.flipY=ye.flipY),"alignment"in ye&&(X.unpackAlignment=ye.alignment),"colorSpace"in ye&&(X.colorSpace=io[ye.colorSpace]),"type"in ye){var ne=ye.type;X.type=qi[ne]}var Se=X.width,Je=X.height,xt=X.channels,At=!1;"shape"in ye?(Se=ye.shape[0],Je=ye.shape[1],ye.shape.length===3&&(xt=ye.shape[2],At=!0)):("radius"in ye&&(Se=Je=ye.radius),"width"in ye&&(Se=ye.width),"height"in ye&&(Je=ye.height),"channels"in ye&&(xt=ye.channels,At=!0)),X.width=Se|0,X.height=Je|0,X.channels=xt|0;var it=!1;if("format"in ye){var pt=ye.format,Rt=X.internalformat=di[pt];X.format=eo[Rt],pt in qi&&("type"in ye||(X.type=qi[pt])),pt in Na&&(X.compressed=!0),it=!0}!At&&it?X.channels=el[X.format]:At&&!it&&X.channels!==oc[X.format]&&(X.format=X.internalformat=oc[X.channels])}}function Jn(X){St.pixelStorei($h,X.flipY),St.pixelStorei(pc,X.premultiplyAlpha),St.pixelStorei(ic,X.colorSpace),St.pixelStorei(Vc,X.unpackAlignment)}function _i(){Ea.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function ai(X,ye){var ne=null;if(Sh(ye)?ne=ye:ye&&(ki(X,ye),"x"in ye&&(X.xOffset=ye.x|0),"y"in ye&&(X.yOffset=ye.y|0),Sh(ye.data)&&(ne=ye.data)),ye.copy){var Se=La.viewportWidth,Je=La.viewportHeight;X.width=X.width||Se-X.xOffset,X.height=X.height||Je-X.yOffset,X.needsCopy=!0}else if(!ne)X.width=X.width||1,X.height=X.height||1,X.channels=X.channels||4;else if(Br(ne))X.channels=X.channels||4,X.data=ne,!("type"in ye)&&X.type===al&&(X.type=Jf(ne));else if(ph(ne))X.channels=X.channels||4,Jh(X,ne),X.alignment=1,X.needsFree=!0;else if(Qr(ne)){var xt=ne.data;!Array.isArray(xt)&&X.type===al&&(X.type=Jf(xt));var At=ne.shape,it=ne.stride,pt,Rt,or,er,ur,gr;At.length===3?(or=At[2],gr=it[2]):(or=1,gr=1),pt=At[0],Rt=At[1],er=it[0],ur=it[1],X.alignment=1,X.width=pt,X.height=Rt,X.channels=or,X.format=X.internalformat=oc[or],X.needsFree=!0,ld(X,xt,er,ur,gr,ne.offset)}else if(Kh(ne)||Kf(ne)||Ah(ne))Kh(ne)||Kf(ne)?X.element=ne:X.element=ne.canvas,X.width=X.element.width,X.height=X.element.height,X.channels=4;else if(sc(ne))X.element=ne,X.width=ne.width,X.height=ne.height,X.channels=4;else if(Ld(ne))X.element=ne,X.width=ne.naturalWidth,X.height=ne.naturalHeight,X.channels=4;else if(sd(ne))X.element=ne,X.width=ne.videoWidth,X.height=ne.videoHeight,X.channels=4;else if(pf(ne)){var vr=X.width||ne[0].length,Zt=X.height||ne.length,ar=X.channels;oa(ne[0][0])?ar=ar||ne[0][0].length:ar=ar||1;for(var tr=$e.shape(ne),Zr=1,un=0;un<tr.length;++un)Zr*=tr[un];var En=Qh(X,Zr);$e.flatten(ne,tr,"",En),mf(X,En),X.alignment=1,X.width=vr,X.height=Zt,X.channels=ar,X.format=X.internalformat=oc[ar],X.needsFree=!0}X.type===_o||X.type}function no(X,ye,ne){var Se=X.element,Je=X.data,xt=X.internalformat,At=X.format,it=X.type,pt=X.width,Rt=X.height;Jn(X),Se?St.texImage2D(ye,ne,At,At,it,Se):X.compressed?St.compressedTexImage2D(ye,ne,xt,pt,Rt,0,Je):X.needsCopy?(Xn(),St.copyTexImage2D(ye,ne,At,X.xOffset,X.yOffset,pt,Rt,0)):St.texImage2D(ye,ne,At,pt,Rt,0,At,it,Je||null)}function Xo(X,ye,ne,Se,Je){var xt=X.element,At=X.data,it=X.internalformat,pt=X.format,Rt=X.type,or=X.width,er=X.height;Jn(X),xt?St.texSubImage2D(ye,Je,ne,Se,pt,Rt,xt):X.compressed?St.compressedTexSubImage2D(ye,Je,ne,Se,it,or,er,At):X.needsCopy?(Xn(),St.copyTexSubImage2D(ye,Je,ne,Se,X.xOffset,X.yOffset,or,er)):St.texSubImage2D(ye,Je,ne,Se,or,er,pt,Rt,At)}var Vi=[];function lo(){return Vi.pop()||new _i}function pi(X){X.needsFree&&H.freeType(X.data),_i.call(X),Vi.push(X)}function Uo(){Ea.call(this),this.genMipmaps=!1,this.mipmapHint=df,this.mipmask=0,this.images=Array(16)}function ns(X,ye,ne){var Se=X.images[0]=lo();X.mipmask=1,Se.width=X.width=ye,Se.height=X.height=ne,Se.channels=X.channels=4}function ds(X,ye){var ne=null;if(Sh(ye))ne=X.images[0]=lo(),pa(ne,X),ai(ne,ye),X.mipmask=1;else if(ki(X,ye),Array.isArray(ye.mipmap))for(var Se=ye.mipmap,Je=0;Je<Se.length;++Je)ne=X.images[Je]=lo(),pa(ne,X),ne.width>>=Je,ne.height>>=Je,ai(ne,Se[Je]),X.mipmask|=1<<Je;else ne=X.images[0]=lo(),pa(ne,X),ai(ne,ye),X.mipmask=1;pa(X,X.images[0]),X.compressed&&(X.internalformat===Oo||X.internalformat===Es||X.internalformat===xl||X.internalformat)}function wl(X,ye){for(var ne=X.images,Se=0;Se<ne.length;++Se){if(!ne[Se])return;no(ne[Se],ye,Se)}}var vs=[];function zu(){var X=vs.pop()||new Uo;Ea.call(X),X.mipmask=0;for(var ye=0;ye<16;++ye)X.images[ye]=null;return X}function cl(X){for(var ye=X.images,ne=0;ne<ye.length;++ne)ye[ne]&&pi(ye[ne]),ye[ne]=null;vs.push(X)}function Mu(){this.minFilter=Ys,this.magFilter=Ys,this.wrapS=nu,this.wrapT=nu,this.anisotropic=1,this.genMipmaps=!1,this.mipmapHint=df}function Zu(X,ye){if("min"in ye){var ne=ye.min;X.minFilter=gi[ne],uu.indexOf(X.minFilter)>=0&&!("faces"in ye)&&(X.genMipmaps=!0)}if("mag"in ye){var Se=ye.mag;X.magFilter=ri[Se]}var Je=X.wrapS,xt=X.wrapT;if("wrap"in ye){var At=ye.wrap;typeof At=="string"?Je=xt=ti[At]:Array.isArray(At)&&(Je=ti[At[0]],xt=ti[At[1]])}else{if("wrapS"in ye){var it=ye.wrapS;Je=ti[it]}if("wrapT"in ye){var pt=ye.wrapT;xt=ti[pt]}}if(X.wrapS=Je,X.wrapT=xt,"anisotropic"in ye&&(ye.anisotropic,X.anisotropic=ye.anisotropic),"mipmap"in ye){var Rt=!1;switch(typeof ye.mipmap){case"string":X.mipmapHint=ni[ye.mipmap],X.genMipmaps=!0,Rt=!0;break;case"boolean":Rt=X.genMipmaps=ye.mipmap;break;case"object":X.genMipmaps=!1,Rt=!0;break}Rt&&!("min"in ye)&&(X.minFilter=$l)}}function uc(X,ye){St.texParameteri(ye,Au,X.minFilter),St.texParameteri(ye,_u,X.magFilter),St.texParameteri(ye,Ps,X.wrapS),St.texParameteri(ye,ms,X.wrapT),kr.ext_texture_filter_anisotropic&&St.texParameteri(ye,zl,X.anisotropic),X.genMipmaps&&(St.hint(rf,X.mipmapHint),St.generateMipmap(ye))}var kf=0,hu={},wu=Dr.maxTextureUnits,Ro=Array(wu).map(function(){return null});function cc(X){Ea.call(this),this.mipmask=0,this.internalformat=Ki,this.id=kf++,this.refCount=1,this.target=X,this.texture=St.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new Mu,Pn.profile&&(this.stats={size:0})}function Js(X){St.activeTexture(vf),St.bindTexture(X.target,X.texture)}function Zl(){var X=Ro[0];X?St.bindTexture(X.target,X.texture):St.bindTexture(Kn,null)}function bc(X){var ye=X.texture,ne=X.unit,Se=X.target;ne>=0&&(St.activeTexture(vf+ne),St.bindTexture(Se,null),Ro[ne]=null),St.deleteTexture(ye),X.texture=null,X.params=null,X.pixels=null,X.refCount=0,delete hu[X.id],Rn.textureCount--}v(cc.prototype,{bind:function(){var X=this;X.bindCount+=1;var ye=X.unit;if(ye<0){for(var ne=0;ne<wu;++ne){var Se=Ro[ne];if(Se){if(Se.bindCount>0)continue;Se.unit=-1}Ro[ne]=X,ye=ne;break}Pn.profile&&Rn.maxTextureUnits<ye+1&&(Rn.maxTextureUnits=ye+1),X.unit=ye,St.activeTexture(vf+ye),St.bindTexture(X.target,X.texture)}return ye},unbind:function(){this.bindCount-=1},decRef:function(){--this.refCount<=0&&bc(this)}});function wc(X,ye){var ne=new cc(Kn);hu[ne.id]=ne,Rn.textureCount++;function Se(At,it){var pt=ne.texInfo;Mu.call(pt);var Rt=zu();return typeof At=="number"?typeof it=="number"?ns(Rt,At|0,it|0):ns(Rt,At|0,At|0):At?(Zu(pt,At),ds(Rt,At)):ns(Rt,1,1),pt.genMipmaps&&(Rt.mipmask=(Rt.width<<1)-1),ne.mipmask=Rt.mipmask,pa(ne,Rt),ne.internalformat=Rt.internalformat,Se.width=Rt.width,Se.height=Rt.height,Js(ne),wl(Rt,Kn),uc(pt,Kn),Zl(),cl(Rt),Pn.profile&&(ne.stats.size=Nf(ne.internalformat,ne.type,Rt.width,Rt.height,pt.genMipmaps,!1)),Se.format=wa[ne.internalformat],Se.type=Fa[ne.type],Se.mag=Sa[pt.magFilter],Se.min=zi[pt.minFilter],Se.wrapS=li[pt.wrapS],Se.wrapT=li[pt.wrapT],Se}function Je(At,it,pt,Rt){var or=it|0,er=pt|0,ur=Rt|0,gr=lo();return pa(gr,ne),gr.width=0,gr.height=0,ai(gr,At),gr.width=gr.width||(ne.width>>ur)-or,gr.height=gr.height||(ne.height>>ur)-er,Js(ne),Xo(gr,Kn,or,er,ur),Zl(),pi(gr),Se}function xt(At,it){var pt=At|0,Rt=it|0||pt;if(pt===ne.width&&Rt===ne.height)return Se;Se.width=ne.width=pt,Se.height=ne.height=Rt,Js(ne);for(var or=0;ne.mipmask>>or;++or){var er=pt>>or,ur=Rt>>or;if(!er||!ur)break;St.texImage2D(Kn,or,ne.format,er,ur,0,ne.format,ne.type,null)}return Zl(),Pn.profile&&(ne.stats.size=Nf(ne.internalformat,ne.type,pt,Rt,!1,!1)),Se}return Se(X,ye),Se.subimage=Je,Se.resize=xt,Se._reglType="texture2d",Se._texture=ne,Pn.profile&&(Se.stats=ne.stats),Se.destroy=function(){ne.decRef()},Se}function Go(X,ye,ne,Se,Je,xt){var At=new cc(Ui);hu[At.id]=At,Rn.cubeCount++;var it=new Array(6);function pt(er,ur,gr,vr,Zt,ar){var tr,Zr=At.texInfo;for(Mu.call(Zr),tr=0;tr<6;++tr)it[tr]=zu();if(typeof er=="number"||!er){var un=er|0||1;for(tr=0;tr<6;++tr)ns(it[tr],un,un)}else if(typeof er=="object")if(ur)ds(it[0],er),ds(it[1],ur),ds(it[2],gr),ds(it[3],vr),ds(it[4],Zt),ds(it[5],ar);else if(Zu(Zr,er),ki(At,er),"faces"in er){var En=er.faces;for(tr=0;tr<6;++tr)pa(it[tr],At),ds(it[tr],En[tr])}else for(tr=0;tr<6;++tr)ds(it[tr],er);for(pa(At,it[0]),Zr.genMipmaps?At.mipmask=(it[0].width<<1)-1:At.mipmask=it[0].mipmask,At.internalformat=it[0].internalformat,pt.width=it[0].width,pt.height=it[0].height,Js(At),tr=0;tr<6;++tr)wl(it[tr],Za+tr);for(uc(Zr,Ui),Zl(),Pn.profile&&(At.stats.size=Nf(At.internalformat,At.type,pt.width,pt.height,Zr.genMipmaps,!0)),pt.format=wa[At.internalformat],pt.type=Fa[At.type],pt.mag=Sa[Zr.magFilter],pt.min=zi[Zr.minFilter],pt.wrapS=li[Zr.wrapS],pt.wrapT=li[Zr.wrapT],tr=0;tr<6;++tr)cl(it[tr]);return pt}function Rt(er,ur,gr,vr,Zt){var ar=gr|0,tr=vr|0,Zr=Zt|0,un=lo();return pa(un,At),un.width=0,un.height=0,ai(un,ur),un.width=un.width||(At.width>>Zr)-ar,un.height=un.height||(At.height>>Zr)-tr,Js(At),Xo(un,Za+er,ar,tr,Zr),Zl(),pi(un),pt}function or(er){var ur=er|0;if(ur!==At.width){pt.width=At.width=ur,pt.height=At.height=ur,Js(At);for(var gr=0;gr<6;++gr)for(var vr=0;At.mipmask>>vr;++vr)St.texImage2D(Za+gr,vr,At.format,ur>>vr,ur>>vr,0,At.format,At.type,null);return Zl(),Pn.profile&&(At.stats.size=Nf(At.internalformat,At.type,pt.width,pt.height,!1,!0)),pt}}return pt(X,ye,ne,Se,Je,xt),pt.subimage=Rt,pt.resize=or,pt._reglType="textureCube",pt._texture=At,Pn.profile&&(pt.stats=At.stats),pt.destroy=function(){At.decRef()},pt}function Ms(){for(var X=0;X<wu;++X)St.activeTexture(vf+X),St.bindTexture(Kn,null),Ro[X]=null;Ot(hu).forEach(bc),Rn.cubeCount=0,Rn.textureCount=0}Pn.profile&&(Rn.getTotalTextureSize=function(){var X=0;return Object.keys(hu).forEach(function(ye){X+=hu[ye].stats.size}),X});function Rs(){for(var X=0;X<wu;++X){var ye=Ro[X];ye&&(ye.bindCount=0,ye.unit=-1,Ro[X]=null)}Ot(hu).forEach(function(ne){ne.texture=St.createTexture(),St.bindTexture(ne.target,ne.texture);for(var Se=0;Se<32;++Se)if((ne.mipmask&1<<Se)!==0)if(ne.target===Kn)St.texImage2D(Kn,Se,ne.internalformat,ne.width>>Se,ne.height>>Se,0,ne.internalformat,ne.type,null);else for(var Je=0;Je<6;++Je)St.texImage2D(Za+Je,Se,ne.internalformat,ne.width>>Se,ne.height>>Se,0,ne.internalformat,ne.type,null);uc(ne.texInfo,ne.target)})}function Me(){for(var X=0;X<wu;++X){var ye=Ro[X];ye&&(ye.bindCount=0,ye.unit=-1,Ro[X]=null),St.activeTexture(vf+X),St.bindTexture(Kn,null),St.bindTexture(Ui,null)}}return{create2D:wc,createCube:Go,clear:Ms,getTexture:function(X){return null},restore:Rs,refresh:Me}}var lc=36161,lh=32854,ed=32855,Kl=36194,Nh=33189,Yd=36168,ud=34041,Eh=35907,cd=34836,Hc=34842,fd=34843,Pu=[];Pu[lh]=2,Pu[ed]=2,Pu[Kl]=2,Pu[Nh]=2,Pu[Yd]=1,Pu[ud]=4,Pu[Eh]=4,Pu[cd]=16,Pu[Hc]=8,Pu[fd]=6;function Gc(St,kr,Dr){return Pu[St]*kr*Dr}var Qf=function(St,kr,Dr,Xn,La){var Rn={rgba4:lh,rgb565:Kl,"rgb5 a1":ed,depth:Nh,stencil:Yd,"depth stencil":ud};kr.ext_srgb&&(Rn.srgba=Eh),kr.ext_color_buffer_half_float&&(Rn.rgba16f=Hc,Rn.rgb16f=fd),kr.webgl_color_buffer_float&&(Rn.rgba32f=cd);var Pn=[];Object.keys(Rn).forEach(function(di){var Na=Rn[di];Pn[Na]=di});var ni=0,ti={};function ri(di){this.id=ni++,this.refCount=1,this.renderbuffer=di,this.format=lh,this.width=0,this.height=0,La.profile&&(this.stats={size:0})}ri.prototype.decRef=function(){--this.refCount<=0&&gi(this)};function gi(di){var Na=di.renderbuffer;St.bindRenderbuffer(lc,null),St.deleteRenderbuffer(Na),di.renderbuffer=null,di.refCount=0,delete ti[di.id],Xn.renderbufferCount--}function io(di,Na){var yn=new ri(St.createRenderbuffer());ti[yn.id]=yn,Xn.renderbufferCount++;function ra(Fa,Sa){var zi=0,li=0,eo=lh;if(typeof Fa=="object"&&Fa){var Ea=Fa;if("shape"in Ea){var pa=Ea.shape;zi=pa[0]|0,li=pa[1]|0}else"radius"in Ea&&(zi=li=Ea.radius|0),"width"in Ea&&(zi=Ea.width|0),"height"in Ea&&(li=Ea.height|0);"format"in Ea&&(eo=Rn[Ea.format])}else typeof Fa=="number"?(zi=Fa|0,typeof Sa=="number"?li=Sa|0:li=zi):Fa||(zi=li=1);if(!(zi===yn.width&&li===yn.height&&eo===yn.format))return ra.width=yn.width=zi,ra.height=yn.height=li,yn.format=eo,St.bindRenderbuffer(lc,yn.renderbuffer),St.renderbufferStorage(lc,eo,zi,li),La.profile&&(yn.stats.size=Gc(yn.format,yn.width,yn.height)),ra.format=Pn[yn.format],ra}function wa(Fa,Sa){var zi=Fa|0,li=Sa|0||zi;return zi===yn.width&&li===yn.height||(ra.width=yn.width=zi,ra.height=yn.height=li,St.bindRenderbuffer(lc,yn.renderbuffer),St.renderbufferStorage(lc,yn.format,zi,li),La.profile&&(yn.stats.size=Gc(yn.format,yn.width,yn.height))),ra}return ra(di,Na),ra.resize=wa,ra._reglType="renderbuffer",ra._renderbuffer=yn,La.profile&&(ra.stats=yn.stats),ra.destroy=function(){yn.decRef()},ra}La.profile&&(Xn.getTotalRenderbufferSize=function(){var di=0;return Object.keys(ti).forEach(function(Na){di+=ti[Na].stats.size}),di});function qi(){Ot(ti).forEach(function(di){di.renderbuffer=St.createRenderbuffer(),St.bindRenderbuffer(lc,di.renderbuffer),St.renderbufferStorage(lc,di.format,di.width,di.height)}),St.bindRenderbuffer(lc,null)}return{create:io,clear:function(){Ot(ti).forEach(gi)},restore:qi}},cu=36160,Ff=36161,Sc=3553,Xc=34069,bu=36064,mh=36096,Sf=36128,eh=33306,Fh=36053,Zd=36193,Sv=5121,gh=5126,Bh=6407,nf=6408,jh=[];jh[nf]=4,jh[Bh]=3;var gc=[];gc[Sv]=1,gc[gh]=4,gc[Zd]=2;function yh(St,kr,Dr,Xn,La,Rn){var Pn={cur:null,next:null,dirty:!1,setFBO:null},ni=["rgba"],ti=["rgba4","rgb565","rgb5 a1"];kr.ext_srgb&&ti.push("srgba"),kr.ext_color_buffer_half_float&&ti.push("rgba16f","rgb16f"),kr.webgl_color_buffer_float&&ti.push("rgba32f"),kr.oes_texture_half_float,kr.oes_texture_float;function ri(Jn,_i,ai){this.target=Jn,this.texture=_i,this.renderbuffer=ai;var no=0,Xo=0;_i?(no=_i.width,Xo=_i.height):ai&&(no=ai.width,Xo=ai.height),this.width=no,this.height=Xo}function gi(Jn){Jn&&(Jn.texture&&Jn.texture._texture.decRef(),Jn.renderbuffer&&Jn.renderbuffer._renderbuffer.decRef())}function io(Jn,_i,ai){if(Jn)if(Jn.texture){var no=Jn.texture._texture;Math.max(1,no.width),Math.max(1,no.height),no.refCount+=1}else{var Xo=Jn.renderbuffer._renderbuffer;Xo.refCount+=1}}function qi(Jn,_i){_i&&(_i.texture?St.framebufferTexture2D(cu,Jn,_i.target,_i.texture._texture.texture,0):St.framebufferRenderbuffer(cu,Jn,Ff,_i.renderbuffer._renderbuffer.renderbuffer))}function di(Jn){var _i=Sc,ai=null,no=null,Xo=Jn;typeof Jn=="object"&&(Xo=Jn.data,"target"in Jn&&(_i=Jn.target|0));var Vi=Xo._reglType;return Vi==="texture2d"||Vi==="textureCube"?ai=Xo:Vi==="renderbuffer"&&(no=Xo,_i=Ff),new ri(_i,ai,no)}function Na(Jn,_i,ai,no,Xo){if(ai){var Vi=Xn.create2D({width:Jn,height:_i,format:no,type:Xo});return Vi._texture.refCount=0,new ri(Sc,Vi,null)}else{var lo=La.create({width:Jn,height:_i,format:no});return lo._renderbuffer.refCount=0,new ri(Ff,null,lo)}}function yn(Jn){return Jn&&(Jn.texture||Jn.renderbuffer)}function ra(Jn,_i,ai){Jn&&(Jn.texture?Jn.texture.resize(_i,ai):Jn.renderbuffer&&Jn.renderbuffer.resize(_i,ai),Jn.width=_i,Jn.height=ai)}var wa=0,Fa={};function Sa(){this.id=wa++,Fa[this.id]=this,this.framebuffer=St.createFramebuffer(),this.width=0,this.height=0,this.colorAttachments=[],this.depthAttachment=null,this.stencilAttachment=null,this.depthStencilAttachment=null}function zi(Jn){Jn.colorAttachments.forEach(gi),gi(Jn.depthAttachment),gi(Jn.stencilAttachment),gi(Jn.depthStencilAttachment)}function li(Jn){var _i=Jn.framebuffer;St.deleteFramebuffer(_i),Jn.framebuffer=null,Rn.framebufferCount--,delete Fa[Jn.id]}function eo(Jn){var _i;St.bindFramebuffer(cu,Jn.framebuffer);var ai=Jn.colorAttachments;for(_i=0;_i<ai.length;++_i)qi(bu+_i,ai[_i]);for(_i=ai.length;_i<Dr.maxColorAttachments;++_i)St.framebufferTexture2D(cu,bu+_i,Sc,null,0);St.framebufferTexture2D(cu,eh,Sc,null,0),St.framebufferTexture2D(cu,mh,Sc,null,0),St.framebufferTexture2D(cu,Sf,Sc,null,0),qi(mh,Jn.depthAttachment),qi(Sf,Jn.stencilAttachment),qi(eh,Jn.depthStencilAttachment);var no=St.checkFramebufferStatus(cu);St.isContextLost(),St.bindFramebuffer(cu,Pn.next?Pn.next.framebuffer:null),Pn.cur=Pn.next,St.getError()}function Ea(Jn,_i){var ai=new Sa;Rn.framebufferCount++;function no(Vi,lo){var pi,Uo=0,ns=0,ds=!0,wl=!0,vs=null,zu=!0,cl="rgba",Mu="uint8",Zu=1,uc=null,kf=null,hu=null,wu=!1;if(typeof Vi=="number")Uo=Vi|0,ns=lo|0||Uo;else if(!Vi)Uo=ns=1;else{var Ro=Vi;if("shape"in Ro){var cc=Ro.shape;Uo=cc[0],ns=cc[1]}else"radius"in Ro&&(Uo=ns=Ro.radius),"width"in Ro&&(Uo=Ro.width),"height"in Ro&&(ns=Ro.height);("color"in Ro||"colors"in Ro)&&(vs=Ro.color||Ro.colors),vs||("colorCount"in Ro&&(Zu=Ro.colorCount|0),"colorTexture"in Ro&&(zu=!!Ro.colorTexture,cl="rgba4"),"colorType"in Ro&&(Mu=Ro.colorType,zu||(Mu==="half float"||Mu==="float16"?cl="rgba16f":(Mu==="float"||Mu==="float32")&&(cl="rgba32f"))),"colorFormat"in Ro&&(cl=Ro.colorFormat,ni.indexOf(cl)>=0?zu=!0:ti.indexOf(cl)>=0&&(zu=!1))),("depthTexture"in Ro||"depthStencilTexture"in Ro)&&(wu=!!(Ro.depthTexture||Ro.depthStencilTexture)),"depth"in Ro&&(typeof Ro.depth=="boolean"?ds=Ro.depth:(uc=Ro.depth,wl=!1)),"stencil"in Ro&&(typeof Ro.stencil=="boolean"?wl=Ro.stencil:(kf=Ro.stencil,ds=!1)),"depthStencil"in Ro&&(typeof Ro.depthStencil=="boolean"?ds=wl=Ro.depthStencil:(hu=Ro.depthStencil,ds=!1,wl=!1))}var Js=null,Zl=null,bc=null,wc=null;if(Array.isArray(vs))Js=vs.map(di);else if(vs)Js=[di(vs)];else for(Js=new Array(Zu),pi=0;pi<Zu;++pi)Js[pi]=Na(Uo,ns,zu,cl,Mu);for(Uo=Uo||Js[0].width,ns=ns||Js[0].height,uc?Zl=di(uc):ds&&!wl&&(Zl=Na(Uo,ns,wu,"depth","uint32")),kf?bc=di(kf):wl&&!ds&&(bc=Na(Uo,ns,!1,"stencil","uint8")),hu?wc=di(hu):!uc&&!kf&&wl&&ds&&(wc=Na(Uo,ns,wu,"depth stencil","depth stencil")),pi=0;pi<Js.length;++pi)io(Js[pi]),Js[pi]&&Js[pi].texture&&jh[Js[pi].texture._texture.format]*gc[Js[pi].texture._texture.type];return io(Zl),io(bc),io(wc),zi(ai),ai.width=Uo,ai.height=ns,ai.colorAttachments=Js,ai.depthAttachment=Zl,ai.stencilAttachment=bc,ai.depthStencilAttachment=wc,no.color=Js.map(yn),no.depth=yn(Zl),no.stencil=yn(bc),no.depthStencil=yn(wc),no.width=ai.width,no.height=ai.height,eo(ai),no}function Xo(Vi,lo){var pi=Math.max(Vi|0,1),Uo=Math.max(lo|0||pi,1);if(pi===ai.width&&Uo===ai.height)return no;for(var ns=ai.colorAttachments,ds=0;ds<ns.length;++ds)ra(ns[ds],pi,Uo);return ra(ai.depthAttachment,pi,Uo),ra(ai.stencilAttachment,pi,Uo),ra(ai.depthStencilAttachment,pi,Uo),ai.width=no.width=pi,ai.height=no.height=Uo,eo(ai),no}return no(Jn,_i),v(no,{resize:Xo,_reglType:"framebuffer",_framebuffer:ai,destroy:function(){li(ai),zi(ai)},use:function(Vi){Pn.setFBO({framebuffer:no},Vi)}})}function pa(Jn){var _i=Array(6);function ai(Xo){var Vi,lo={color:null},pi=0,Uo=null,ns="rgba",ds="uint8",wl=1;if(typeof Xo=="number")pi=Xo|0;else if(!Xo)pi=1;else{var vs=Xo;if("shape"in vs){var zu=vs.shape;pi=zu[0]}else"radius"in vs&&(pi=vs.radius|0),"width"in vs?pi=vs.width|0:"height"in vs&&(pi=vs.height|0);("color"in vs||"colors"in vs)&&(Uo=vs.color||vs.colors),Uo||("colorCount"in vs&&(wl=vs.colorCount|0),"colorType"in vs&&(ds=vs.colorType),"colorFormat"in vs&&(ns=vs.colorFormat)),"depth"in vs&&(lo.depth=vs.depth),"stencil"in vs&&(lo.stencil=vs.stencil),"depthStencil"in vs&&(lo.depthStencil=vs.depthStencil)}var cl;if(Uo)if(Array.isArray(Uo))for(cl=[],Vi=0;Vi<Uo.length;++Vi)cl[Vi]=Uo[Vi];else cl=[Uo];else{cl=Array(wl);var Mu={radius:pi,format:ns,type:ds};for(Vi=0;Vi<wl;++Vi)cl[Vi]=Xn.createCube(Mu)}for(lo.color=Array(cl.length),Vi=0;Vi<cl.length;++Vi){var Zu=cl[Vi];pi=pi||Zu.width,lo.color[Vi]={target:Xc,data:cl[Vi]}}for(Vi=0;Vi<6;++Vi){for(var uc=0;uc<cl.length;++uc)lo.color[uc].target=Xc+Vi;Vi>0&&(lo.depth=_i[0].depth,lo.stencil=_i[0].stencil,lo.depthStencil=_i[0].depthStencil),_i[Vi]?_i[Vi](lo):_i[Vi]=Ea(lo)}return v(ai,{width:pi,height:pi,color:cl})}function no(Xo){var Vi,lo=Xo|0;if(lo===ai.width)return ai;var pi=ai.color;for(Vi=0;Vi<pi.length;++Vi)pi[Vi].resize(lo);for(Vi=0;Vi<6;++Vi)_i[Vi].resize(lo);return ai.width=ai.height=lo,ai}return ai(Jn),v(ai,{faces:_i,resize:no,_reglType:"framebufferCube",destroy:function(){_i.forEach(function(Xo){Xo.destroy()})}})}function ki(){Pn.cur=null,Pn.next=null,Pn.dirty=!0,Ot(Fa).forEach(function(Jn){Jn.framebuffer=St.createFramebuffer(),eo(Jn)})}return v(Pn,{getFramebuffer:function(Jn){if(typeof Jn=="function"&&Jn._reglType==="framebuffer"){var _i=Jn._framebuffer;if(_i instanceof Sa)return _i}return null},create:Ea,createCube:pa,clear:function(){Ot(Fa).forEach(li)},restore:ki})}var hd=5126,_h=34962,du=34963;function Wc(){this.state=0,this.x=0,this.y=0,this.z=0,this.w=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=hd,this.offset=0,this.stride=0,this.divisor=0}function gf(St,kr,Dr,Xn,La,Rn,Pn){for(var ni=Dr.maxAttributes,ti=new Array(ni),ri=0;ri<ni;++ri)ti[ri]=new Wc;var gi=0,io={},qi={Record:Wc,scope:{},state:ti,currentVAO:null,targetVAO:null,restore:Na()?li:function(){},createVAO:eo,getVAO:ra,destroyBuffer:di,setVAO:Na()?wa:Fa,clear:Na()?Sa:function(){}};function di(Ea){for(var pa=0;pa<ti.length;++pa){var ki=ti[pa];ki.buffer===Ea&&(St.disableVertexAttribArray(pa),ki.buffer=null)}}function Na(){return kr.oes_vertex_array_object}function yn(){return kr.angle_instanced_arrays}function ra(Ea){return typeof Ea=="function"&&Ea._vao?Ea._vao:null}function wa(Ea){if(Ea!==qi.currentVAO){var pa=Na();Ea?pa.bindVertexArrayOES(Ea.vao):pa.bindVertexArrayOES(null),qi.currentVAO=Ea}}function Fa(Ea){if(Ea!==qi.currentVAO){if(Ea)Ea.bindAttrs();else{for(var pa=yn(),ki=0;ki<ti.length;++ki){var Jn=ti[ki];Jn.buffer?(St.enableVertexAttribArray(ki),Jn.buffer.bind(),St.vertexAttribPointer(ki,Jn.size,Jn.type,Jn.normalized,Jn.stride,Jn.offfset),pa&&Jn.divisor&&pa.vertexAttribDivisorANGLE(ki,Jn.divisor)):(St.disableVertexAttribArray(ki),St.vertexAttrib4f(ki,Jn.x,Jn.y,Jn.z,Jn.w))}Pn.elements?St.bindBuffer(du,Pn.elements.buffer.buffer):St.bindBuffer(du,null)}qi.currentVAO=Ea}}function Sa(){Ot(io).forEach(function(Ea){Ea.destroy()})}function zi(){this.id=++gi,this.attributes=[],this.elements=null,this.ownsElements=!1,this.count=0,this.offset=0,this.instances=-1,this.primitive=4;var Ea=Na();Ea?this.vao=Ea.createVertexArrayOES():this.vao=null,io[this.id]=this,this.buffers=[]}zi.prototype.bindAttrs=function(){for(var Ea=yn(),pa=this.attributes,ki=0;ki<pa.length;++ki){var Jn=pa[ki];Jn.buffer?(St.enableVertexAttribArray(ki),St.bindBuffer(_h,Jn.buffer.buffer),St.vertexAttribPointer(ki,Jn.size,Jn.type,Jn.normalized,Jn.stride,Jn.offset),Ea&&Jn.divisor&&Ea.vertexAttribDivisorANGLE(ki,Jn.divisor)):(St.disableVertexAttribArray(ki),St.vertexAttrib4f(ki,Jn.x,Jn.y,Jn.z,Jn.w))}for(var _i=pa.length;_i<ni;++_i)St.disableVertexAttribArray(_i);var ai=Rn.getElements(this.elements);ai?St.bindBuffer(du,ai.buffer.buffer):St.bindBuffer(du,null)},zi.prototype.refresh=function(){var Ea=Na();Ea&&(Ea.bindVertexArrayOES(this.vao),this.bindAttrs(),qi.currentVAO=null,Ea.bindVertexArrayOES(null))},zi.prototype.destroy=function(){if(this.vao){var Ea=Na();this===qi.currentVAO&&(qi.currentVAO=null,Ea.bindVertexArrayOES(null)),Ea.deleteVertexArrayOES(this.vao),this.vao=null}this.ownsElements&&(this.elements.destroy(),this.elements=null,this.ownsElements=!1),io[this.id]&&(delete io[this.id],Xn.vaoCount-=1)};function li(){var Ea=Na();Ea&&Ot(io).forEach(function(pa){pa.refresh()})}function eo(Ea){var pa=new zi;Xn.vaoCount+=1;function ki(Jn){var _i;if(Array.isArray(Jn))_i=Jn,pa.elements&&pa.ownsElements&&pa.elements.destroy(),pa.elements=null,pa.ownsElements=!1,pa.offset=0,pa.count=0,pa.instances=-1,pa.primitive=4;else{if(Jn.elements){var ai=Jn.elements;pa.ownsElements?typeof ai=="function"&&ai._reglType==="elements"?(pa.elements.destroy(),pa.ownsElements=!1):(pa.elements(ai),pa.ownsElements=!1):Rn.getElements(Jn.elements)?(pa.elements=Jn.elements,pa.ownsElements=!1):(pa.elements=Rn.create(Jn.elements),pa.ownsElements=!0)}else pa.elements=null,pa.ownsElements=!1;_i=Jn.attributes,pa.offset=0,pa.count=-1,pa.instances=-1,pa.primitive=4,pa.elements&&(pa.count=pa.elements._elements.vertCount,pa.primitive=pa.elements._elements.primType),"offset"in Jn&&(pa.offset=Jn.offset|0),"count"in Jn&&(pa.count=Jn.count|0),"instances"in Jn&&(pa.instances=Jn.instances|0),"primitive"in Jn&&(pa.primitive=fa[Jn.primitive])}var no={},Xo=pa.attributes;Xo.length=_i.length;for(var Vi=0;Vi<_i.length;++Vi){var lo=_i[Vi],pi=Xo[Vi]=new Wc,Uo=lo.data||lo;if(Array.isArray(Uo)||Br(Uo)||Qr(Uo)){var ns;pa.buffers[Vi]&&(ns=pa.buffers[Vi],Br(Uo)&&ns._buffer.byteLength>=Uo.byteLength?ns.subdata(Uo):(ns.destroy(),pa.buffers[Vi]=null)),pa.buffers[Vi]||(ns=pa.buffers[Vi]=La.create(lo,_h,!1,!0)),pi.buffer=La.getBuffer(ns),pi.size=pi.buffer.dimension|0,pi.normalized=!1,pi.type=pi.buffer.dtype,pi.offset=0,pi.stride=0,pi.divisor=0,pi.state=1,no[Vi]=1}else La.getBuffer(lo)?(pi.buffer=La.getBuffer(lo),pi.size=pi.buffer.dimension|0,pi.normalized=!1,pi.type=pi.buffer.dtype,pi.offset=0,pi.stride=0,pi.divisor=0,pi.state=1):La.getBuffer(lo.buffer)?(pi.buffer=La.getBuffer(lo.buffer),pi.size=(+lo.size||pi.buffer.dimension)|0,pi.normalized=!!lo.normalized||!1,"type"in lo?pi.type=Hn[lo.type]:pi.type=pi.buffer.dtype,pi.offset=(lo.offset||0)|0,pi.stride=(lo.stride||0)|0,pi.divisor=(lo.divisor||0)|0,pi.state=1):"x"in lo&&(pi.x=+lo.x||0,pi.y=+lo.y||0,pi.z=+lo.z||0,pi.w=+lo.w||0,pi.state=2)}for(var ds=0;ds<pa.buffers.length;++ds)!no[ds]&&pa.buffers[ds]&&(pa.buffers[ds].destroy(),pa.buffers[ds]=null);return pa.refresh(),ki}return ki.destroy=function(){for(var Jn=0;Jn<pa.buffers.length;++Jn)pa.buffers[Jn]&&pa.buffers[Jn].destroy();pa.buffers.length=0,pa.ownsElements&&(pa.elements.destroy(),pa.elements=null,pa.ownsElements=!1),pa.destroy()},ki._vao=pa,ki._reglType="vao",ki(Ea)}return qi}var td=35632,gu=35633,Mh=35718,th=35721;function af(St,kr,Dr,Xn){var La={},Rn={};function Pn(yn,ra,wa,Fa){this.name=yn,this.id=ra,this.location=wa,this.info=Fa}function ni(yn,ra){for(var wa=0;wa<yn.length;++wa)if(yn[wa].id===ra.id){yn[wa].location=ra.location;return}yn.push(ra)}function ti(yn,ra,wa){var Fa=yn===td?La:Rn,Sa=Fa[ra];if(!Sa){var zi=kr.str(ra);Sa=St.createShader(yn),St.shaderSource(Sa,zi),St.compileShader(Sa),Fa[ra]=Sa}return Sa}var ri={},gi=[],io=0;function qi(yn,ra){this.id=io++,this.fragId=yn,this.vertId=ra,this.program=null,this.uniforms=[],this.attributes=[],this.refCount=1,Xn.profile&&(this.stats={uniformsCount:0,attributesCount:0})}function di(yn,ra,wa){var Fa,Sa,zi=ti(td,yn.fragId),li=ti(gu,yn.vertId),eo=yn.program=St.createProgram();if(St.attachShader(eo,zi),St.attachShader(eo,li),wa)for(Fa=0;Fa<wa.length;++Fa){var Ea=wa[Fa];St.bindAttribLocation(eo,Ea[0],Ea[1])}St.linkProgram(eo);var pa=St.getProgramParameter(eo,Mh);Xn.profile&&(yn.stats.uniformsCount=pa);var ki=yn.uniforms;for(Fa=0;Fa<pa;++Fa)if(Sa=St.getActiveUniform(eo,Fa),Sa)if(Sa.size>1)for(var Jn=0;Jn<Sa.size;++Jn){var _i=Sa.name.replace("[0]","["+Jn+"]");ni(ki,new Pn(_i,kr.id(_i),St.getUniformLocation(eo,_i),Sa))}else ni(ki,new Pn(Sa.name,kr.id(Sa.name),St.getUniformLocation(eo,Sa.name),Sa));var ai=St.getProgramParameter(eo,th);Xn.profile&&(yn.stats.attributesCount=ai);var no=yn.attributes;for(Fa=0;Fa<ai;++Fa)Sa=St.getActiveAttrib(eo,Fa),Sa&&ni(no,new Pn(Sa.name,kr.id(Sa.name),St.getAttribLocation(eo,Sa.name),Sa))}Xn.profile&&(Dr.getMaxUniformsCount=function(){var yn=0;return gi.forEach(function(ra){ra.stats.uniformsCount>yn&&(yn=ra.stats.uniformsCount)}),yn},Dr.getMaxAttributesCount=function(){var yn=0;return gi.forEach(function(ra){ra.stats.attributesCount>yn&&(yn=ra.stats.attributesCount)}),yn});function Na(){La={},Rn={};for(var yn=0;yn<gi.length;++yn)di(gi[yn],null,gi[yn].attributes.map(function(ra){return[ra.location,ra.name]}))}return{clear:function(){var yn=St.deleteShader.bind(St);Ot(La).forEach(yn),La={},Ot(Rn).forEach(yn),Rn={},gi.forEach(function(ra){St.deleteProgram(ra.program)}),gi.length=0,ri={},Dr.shaderCount=0},program:function(yn,ra,wa,Fa){var Sa=ri[ra];Sa||(Sa=ri[ra]={});var zi=Sa[yn];if(zi&&(zi.refCount++,!Fa))return zi;var li=new qi(ra,yn);return Dr.shaderCount++,di(li,wa,Fa),zi||(Sa[yn]=li),gi.push(li),v(li,{destroy:function(){if(li.refCount--,li.refCount<=0){St.deleteProgram(li.program);var eo=gi.indexOf(li);gi.splice(eo,1),Dr.shaderCount--}Sa[li.vertId].refCount<=0&&(St.deleteShader(Rn[li.vertId]),delete Rn[li.vertId],delete ri[li.fragId][li.vertId]),Object.keys(ri[li.fragId]).length||(St.deleteShader(La[li.fragId]),delete La[li.fragId],delete ri[li.fragId])}})},restore:Na,shader:ti,frag:-1,vert:-1}}var Ch=6408,Ef=5121,kh=3333,$d=5126;function xc(St,kr,Dr,Xn,La,Rn,Pn){function ni(gi){var io;kr.next===null?io=Ef:io=kr.next.colorAttachments[0].texture._texture.type;var qi=0,di=0,Na=Xn.framebufferWidth,yn=Xn.framebufferHeight,ra=null;Br(gi)?ra=gi:gi&&(qi=gi.x|0,di=gi.y|0,Na=(gi.width||Xn.framebufferWidth-qi)|0,yn=(gi.height||Xn.framebufferHeight-di)|0,ra=gi.data||null),Dr();var wa=Na*yn*4;return ra||(io===Ef?ra=new Uint8Array(wa):io===$d&&(ra=ra||new Float32Array(wa))),St.pixelStorei(kh,4),St.readPixels(qi,di,Na,yn,Ch,io,ra),ra}function ti(gi){var io;return kr.setFBO({framebuffer:gi.framebuffer},function(){io=ni(gi)}),io}function ri(gi){return!gi||!("framebuffer"in gi)?ni(gi):ti(gi)}return ri}function dd(St){return Bf(of(Mf(St)))}function of(St){return Rc(Ga(Du(St),St.length*8))}function Bf(St){for(var kr="0123456789abcdef",Dr="",Xn,La=0;La<St.length;La++)Xn=St.charCodeAt(La),Dr+=kr.charAt(Xn>>>4&15)+kr.charAt(Xn&15);return Dr}function Mf(St){for(var kr="",Dr=-1,Xn,La;++Dr<St.length;)Xn=St.charCodeAt(Dr),La=Dr+1<St.length?St.charCodeAt(Dr+1):0,55296<=Xn&&Xn<=56319&&56320<=La&&La<=57343&&(Xn=65536+((Xn&1023)<<10)+(La&1023),Dr++),Xn<=127?kr+=String.fromCharCode(Xn):Xn<=2047?kr+=String.fromCharCode(192|Xn>>>6&31,128|Xn&63):Xn<=65535?kr+=String.fromCharCode(224|Xn>>>12&15,128|Xn>>>6&63,128|Xn&63):Xn<=2097151&&(kr+=String.fromCharCode(240|Xn>>>18&7,128|Xn>>>12&63,128|Xn>>>6&63,128|Xn&63));return kr}function Du(St){for(var kr=Array(St.length>>2),Dr=0;Dr<kr.length;Dr++)kr[Dr]=0;for(var Dr=0;Dr<St.length*8;Dr+=8)kr[Dr>>5]|=(St.charCodeAt(Dr/8)&255)<<24-Dr%32;return kr}function Rc(St){for(var kr="",Dr=0;Dr<St.length*32;Dr+=8)kr+=String.fromCharCode(St[Dr>>5]>>>24-Dr%32&255);return kr}function Su(St,kr){return St>>>kr|St<<32-kr}function rh(St,kr){return St>>>kr}function Cf(St,kr,Dr){return St&kr^~St&Dr}function rd(St,kr,Dr){return St&kr^St&Dr^kr&Dr}function wr(St){return Su(St,2)^Su(St,13)^Su(St,22)}function Gr(St){return Su(St,6)^Su(St,11)^Su(St,25)}function kn(St){return Su(St,7)^Su(St,18)^rh(St,3)}function _n(St){return Su(St,17)^Su(St,19)^rh(St,10)}var ta=new Array(1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998);function Ga(St,kr){var Dr=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),Xn=new Array(64),La,Rn,Pn,ni,ti,ri,gi,io,qi,di,Na,yn;for(St[kr>>5]|=128<<24-kr%32,St[(kr+64>>9<<4)+15]=kr,qi=0;qi<St.length;qi+=16){for(La=Dr[0],Rn=Dr[1],Pn=Dr[2],ni=Dr[3],ti=Dr[4],ri=Dr[5],gi=Dr[6],io=Dr[7],di=0;di<64;di++)di<16?Xn[di]=St[di+qi]:Xn[di]=ja(ja(ja(_n(Xn[di-2]),Xn[di-7]),kn(Xn[di-15])),Xn[di-16]),Na=ja(ja(ja(ja(io,Gr(ti)),Cf(ti,ri,gi)),ta[di]),Xn[di]),yn=ja(wr(La),rd(La,Rn,Pn)),io=gi,gi=ri,ri=ti,ti=ja(ni,Na),ni=Pn,Pn=Rn,Rn=La,La=ja(Na,yn);Dr[0]=ja(La,Dr[0]),Dr[1]=ja(Rn,Dr[1]),Dr[2]=ja(Pn,Dr[2]),Dr[3]=ja(ni,Dr[3]),Dr[4]=ja(ti,Dr[4]),Dr[5]=ja(ri,Dr[5]),Dr[6]=ja(gi,Dr[6]),Dr[7]=ja(io,Dr[7])}return Dr}function ja(St,kr){var Dr=(St&65535)+(kr&65535),Xn=(St>>16)+(kr>>16)+(Dr>>16);return Xn<<16|Dr&65535}function Ai(St){return Array.prototype.slice.call(St)}function Ii(St){return Ai(St).join("")}function oo(St){var kr=St&&St.cache,Dr=0,Xn=[],La=[],Rn=[];function Pn(Na,yn){var ra=yn&&yn.stable;if(!ra){for(var wa=0;wa<La.length;++wa)if(La[wa]===Na&&!Rn[wa])return Xn[wa]}var Fa="g"+Dr++;return Xn.push(Fa),La.push(Na),Rn.push(ra),Fa}function ni(){var Na=[];function yn(){Na.push.apply(Na,Ai(arguments))}var ra=[];function wa(){var Fa="v"+Dr++;return ra.push(Fa),arguments.length>0&&(Na.push(Fa,"="),Na.push.apply(Na,Ai(arguments)),Na.push(";")),Fa}return v(yn,{def:wa,toString:function(){return Ii([ra.length>0?"var "+ra.join(",")+";":"",Ii(Na)])}})}function ti(){var Na=ni(),yn=ni(),ra=Na.toString,wa=yn.toString;function Fa(Sa,zi){yn(Sa,zi,"=",Na.def(Sa,zi),";")}return v(function(){Na.apply(Na,Ai(arguments))},{def:Na.def,entry:Na,exit:yn,save:Fa,set:function(Sa,zi,li){Fa(Sa,zi),Na(Sa,zi,"=",li,";")},toString:function(){return ra()+wa()}})}function ri(){var Na=Ii(arguments),yn=ti(),ra=ti(),wa=yn.toString,Fa=ra.toString;return v(yn,{then:function(){return yn.apply(yn,Ai(arguments)),this},else:function(){return ra.apply(ra,Ai(arguments)),this},toString:function(){var Sa=Fa();return Sa&&(Sa="else{"+Sa+"}"),Ii(["if(",Na,"){",wa(),"}",Sa])}})}var gi=ni(),io={};function qi(Na,yn){var ra=[];function wa(){var eo="a"+ra.length;return ra.push(eo),eo}yn=yn||0;for(var Fa=0;Fa<yn;++Fa)wa();var Sa=ti(),zi=Sa.toString,li=io[Na]=v(Sa,{arg:wa,toString:function(){return Ii(["function(",ra.join(),"){",zi(),"}"])}});return li}function di(){var Na=['"use strict";',gi,"return {"];Object.keys(io).forEach(function(Fa){Na.push('"',Fa,'":',io[Fa].toString(),",")}),Na.push("}");var yn=Ii(Na).replace(/;/g,`;
`).replace(/}/g,`}
`).replace(/{/g,`{
`),ra;if(kr&&(ra=dd(yn),kr[ra]))return kr[ra].apply(null,La);var wa=Function.apply(null,Xn.concat(yn));return kr&&(kr[ra]=wa),wa.apply(null,La)}return{global:gi,link:Pn,block:ni,proc:qi,scope:ti,cond:ri,compile:di}}var hi="xyzw".split(""),Gi=5121,wi=1,si=2,vo=0,es=1,$o=2,is=3,rs=4,mo=5,Ji=6,gs="dither",$s="blend.enable",Nl="blend.color",au="blend.equation",Bl="blend.func",iu="depth.enable",hl="depth.func",Bu="depth.range",Ou="depth.mask",eu="colorMask",No="cull.enable",Ls="cull.face",Wl="frontFace",Cl="lineWidth",Ec="polygonOffset.enable",Mc="polygonOffset.offset",Ic="sample.alpha",uh="sample.enable",Cc="sample.coverage",jf="stencil.enable",ju="stencil.mask",Uf="stencil.func",os="stencil.opFront",_s="stencil.opBack",qf="scissor.enable",sf="scissor.box",Yc="viewport",Ze="profile",O="framebuffer",fe="vert",Re="frag",Oe="elements",We="primitive",Ct="count",Nt="offset",rr="instances",Tr="vao",Fr="Width",Vr="Height",mn=O+Fr,Dn=O+Vr,nt=Yc+Fr,ct=Yc+Vr,Tt="drawingBuffer",Pt=Tt+Fr,Gt=Tt+Vr,zt=[Bl,au,Uf,os,_s,Cc,Yc,sf,Mc],Kt=34962,Cr=34963,Nr=2884,Hr=3042,sn=3024,bn=2960,Vn=2929,Yn=3089,va=32823,Va=32926,Si=32928,yi=5126,Mi=35664,go=35665,jo=35666,Do=5124,us=35667,sl=35668,ll=35669,Bs=35670,vl=35671,Eu=35672,vu=35673,Us=35674,qs=35675,Hu=35676,yc=35678,Zc=35680,Te=4,He=1028,ft=1029,Lt=2304,Dt=2305,qt=32775,dr=32776,hr=519,Pr=7680,ln=0,on=1,Mn=32774,Un=513,Gn=36160,Ja=36064,Qn={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},ba={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},Ca={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Xa={cw:Lt,ccw:Dt};function ei(St){return Array.isArray(St)||Br(St)||Qr(St)}function Ma(St){return St.sort(function(kr,Dr){return kr===Yc?-1:Dr===Yc?1:kr<Dr?-1:1})}function Ci(St,kr,Dr,Xn){this.thisDep=St,this.contextDep=kr,this.propDep=Dr,this.append=Xn}function po(St){return St&&!(St.thisDep||St.contextDep||St.propDep)}function ro(St){return new Ci(!1,!1,!1,St)}function fo(St,kr){var Dr=St.type;if(Dr===vo){var Xn=St.data.length;return new Ci(!0,Xn>=1,Xn>=2,kr)}else if(Dr===rs){var La=St.data;return new Ci(La.thisDep,La.contextDep,La.propDep,kr)}else{if(Dr===mo)return new Ci(!1,!1,!1,kr);if(Dr===Ji){for(var Rn=!1,Pn=!1,ni=!1,ti=0;ti<St.data.length;++ti){var ri=St.data[ti];if(ri.type===es)ni=!0;else if(ri.type===$o)Pn=!0;else if(ri.type===is)Rn=!0;else if(ri.type===vo){Rn=!0;var gi=ri.data;gi>=1&&(Pn=!0),gi>=2&&(ni=!0)}else ri.type===rs&&(Rn=Rn||ri.data.thisDep,Pn=Pn||ri.data.contextDep,ni=ni||ri.data.propDep)}return new Ci(Rn,Pn,ni,kr)}else return new Ci(Dr===is,Dr===$o,Dr===es,kr)}}var Fo=new Ci(!1,!1,!1,function(){});function Ho(St,kr,Dr,Xn,La,Rn,Pn,ni,ti,ri,gi,io,qi,di,Na,yn){var ra=ri.Record,wa={add:32774,subtract:32778,"reverse subtract":32779};Dr.ext_blend_minmax&&(wa.min=qt,wa.max=dr);var Fa=Dr.angle_instanced_arrays,Sa=Dr.webgl_draw_buffers,zi=Dr.oes_vertex_array_object,li={dirty:!0,profile:yn.profile},eo={},Ea=[],pa={},ki={};function Jn(it){return it.replace(".","_")}function _i(it,pt,Rt){var or=Jn(it);Ea.push(it),eo[or]=li[or]=!!Rt,pa[or]=pt}function ai(it,pt,Rt){var or=Jn(it);Ea.push(it),Array.isArray(Rt)?(li[or]=Rt.slice(),eo[or]=Rt.slice()):li[or]=eo[or]=Rt,ki[or]=pt}function no(it){return!!isNaN(it)}_i(gs,sn),_i($s,Hr),ai(Nl,"blendColor",[0,0,0,0]),ai(au,"blendEquationSeparate",[Mn,Mn]),ai(Bl,"blendFuncSeparate",[on,ln,on,ln]),_i(iu,Vn,!0),ai(hl,"depthFunc",Un),ai(Bu,"depthRange",[0,1]),ai(Ou,"depthMask",!0),ai(eu,eu,[!0,!0,!0,!0]),_i(No,Nr),ai(Ls,"cullFace",ft),ai(Wl,Wl,Dt),ai(Cl,Cl,1),_i(Ec,va),ai(Mc,"polygonOffset",[0,0]),_i(Ic,Va),_i(uh,Si),ai(Cc,"sampleCoverage",[1,!1]),_i(jf,bn),ai(ju,"stencilMask",-1),ai(Uf,"stencilFunc",[hr,0,-1]),ai(os,"stencilOpSeparate",[He,Pr,Pr,Pr]),ai(_s,"stencilOpSeparate",[ft,Pr,Pr,Pr]),_i(qf,Yn),ai(sf,"scissor",[0,0,St.drawingBufferWidth,St.drawingBufferHeight]),ai(Yc,Yc,[0,0,St.drawingBufferWidth,St.drawingBufferHeight]);var Xo={gl:St,context:qi,strings:kr,next:eo,current:li,draw:io,elements:Rn,buffer:La,shader:gi,attributes:ri.state,vao:ri,uniforms:ti,framebuffer:ni,extensions:Dr,timer:di,isBufferArgs:ei},Vi={primTypes:fa,compareFuncs:ba,blendFuncs:Qn,blendEquations:wa,stencilOps:Ca,glTypes:Hn,orientationType:Xa};Sa&&(Vi.backBuffer=[ft],Vi.drawBuffer=y(Xn.maxDrawbuffers,function(it){return it===0?[0]:y(it,function(pt){return Ja+pt})}));var lo=0;function pi(){var it=oo({cache:Na}),pt=it.link,Rt=it.global;it.id=lo++,it.batchId="0";var or=pt(Xo),er=it.shared={props:"a0"};Object.keys(Xo).forEach(function(ar){er[ar]=Rt.def(or,".",ar)});var ur=it.next={},gr=it.current={};Object.keys(ki).forEach(function(ar){Array.isArray(li[ar])&&(ur[ar]=Rt.def(er.next,".",ar),gr[ar]=Rt.def(er.current,".",ar))});var vr=it.constants={};Object.keys(Vi).forEach(function(ar){vr[ar]=Rt.def(JSON.stringify(Vi[ar]))}),it.invoke=function(ar,tr){switch(tr.type){case vo:var Zr=["this",er.context,er.props,it.batchId];return ar.def(pt(tr.data),".call(",Zr.slice(0,Math.max(tr.data.length+1,4)),")");case es:return ar.def(er.props,tr.data);case $o:return ar.def(er.context,tr.data);case is:return ar.def("this",tr.data);case rs:return tr.data.append(it,ar),tr.data.ref;case mo:return tr.data.toString();case Ji:return tr.data.map(function(un){return it.invoke(ar,un)})}},it.attribCache={};var Zt={};return it.scopeAttrib=function(ar){var tr=kr.id(ar);if(tr in Zt)return Zt[tr];var Zr=ri.scope[tr];Zr||(Zr=ri.scope[tr]=new ra);var un=Zt[tr]=pt(Zr);return un},it}function Uo(it){var pt=it.static,Rt=it.dynamic,or;if(Ze in pt){var er=!!pt[Ze];or=ro(function(gr,vr){return er}),or.enable=er}else if(Ze in Rt){var ur=Rt[Ze];or=fo(ur,function(gr,vr){return gr.invoke(vr,ur)})}return or}function ns(it,pt){var Rt=it.static,or=it.dynamic;if(O in Rt){var er=Rt[O];return er?(er=ni.getFramebuffer(er),ro(function(gr,vr){var Zt=gr.link(er),ar=gr.shared;vr.set(ar.framebuffer,".next",Zt);var tr=ar.context;return vr.set(tr,"."+mn,Zt+".width"),vr.set(tr,"."+Dn,Zt+".height"),Zt})):ro(function(gr,vr){var Zt=gr.shared;vr.set(Zt.framebuffer,".next","null");var ar=Zt.context;return vr.set(ar,"."+mn,ar+"."+Pt),vr.set(ar,"."+Dn,ar+"."+Gt),"null"})}else if(O in or){var ur=or[O];return fo(ur,function(gr,vr){var Zt=gr.invoke(vr,ur),ar=gr.shared,tr=ar.framebuffer,Zr=vr.def(tr,".getFramebuffer(",Zt,")");vr.set(tr,".next",Zr);var un=ar.context;return vr.set(un,"."+mn,Zr+"?"+Zr+".width:"+un+"."+Pt),vr.set(un,"."+Dn,Zr+"?"+Zr+".height:"+un+"."+Gt),Zr})}else return null}function ds(it,pt,Rt){var or=it.static,er=it.dynamic;function ur(Zt){if(Zt in or){var ar=or[Zt],tr=!0,Zr=ar.x|0,un=ar.y|0,En,ka;return"width"in ar?En=ar.width|0:tr=!1,"height"in ar?ka=ar.height|0:tr=!1,new Ci(!tr&&pt&&pt.thisDep,!tr&&pt&&pt.contextDep,!tr&&pt&&pt.propDep,function(Pa,Da){var Qa=Pa.shared.context,Ra=En;"width"in ar||(Ra=Da.def(Qa,".",mn,"-",Zr));var ii=ka;return"height"in ar||(ii=Da.def(Qa,".",Dn,"-",un)),[Zr,un,Ra,ii]})}else if(Zt in er){var ma=er[Zt],ha=fo(ma,function(Pa,Da){var Qa=Pa.invoke(Da,ma),Ra=Pa.shared.context,ii=Da.def(Qa,".x|0"),xi=Da.def(Qa,".y|0"),Xi=Da.def('"width" in ',Qa,"?",Qa,".width|0:","(",Ra,".",mn,"-",ii,")"),co=Da.def('"height" in ',Qa,"?",Qa,".height|0:","(",Ra,".",Dn,"-",xi,")");return[ii,xi,Xi,co]});return pt&&(ha.thisDep=ha.thisDep||pt.thisDep,ha.contextDep=ha.contextDep||pt.contextDep,ha.propDep=ha.propDep||pt.propDep),ha}else return pt?new Ci(pt.thisDep,pt.contextDep,pt.propDep,function(Pa,Da){var Qa=Pa.shared.context;return[0,0,Da.def(Qa,".",mn),Da.def(Qa,".",Dn)]}):null}var gr=ur(Yc);if(gr){var vr=gr;gr=new Ci(gr.thisDep,gr.contextDep,gr.propDep,function(Zt,ar){var tr=vr.append(Zt,ar),Zr=Zt.shared.context;return ar.set(Zr,"."+nt,tr[2]),ar.set(Zr,"."+ct,tr[3]),tr})}return{viewport:gr,scissor_box:ur(sf)}}function wl(it,pt){var Rt=it.static,or=typeof Rt[Re]=="string"&&typeof Rt[fe]=="string";if(or){if(Object.keys(pt.dynamic).length>0)return null;var er=pt.static,ur=Object.keys(er);if(ur.length>0&&typeof er[ur[0]]=="number"){for(var gr=[],vr=0;vr<ur.length;++vr)gr.push([er[ur[vr]]|0,ur[vr]]);return gr}}return null}function vs(it,pt,Rt){var or=it.static,er=it.dynamic;function ur(tr){if(tr in or){var Zr=kr.id(or[tr]),un=ro(function(){return Zr});return un.id=Zr,un}else if(tr in er){var En=er[tr];return fo(En,function(ka,ma){var ha=ka.invoke(ma,En),Pa=ma.def(ka.shared.strings,".id(",ha,")");return Pa})}return null}var gr=ur(Re),vr=ur(fe),Zt=null,ar;return po(gr)&&po(vr)?(Zt=gi.program(vr.id,gr.id,null,Rt),ar=ro(function(tr,Zr){return tr.link(Zt)})):ar=new Ci(gr&&gr.thisDep||vr&&vr.thisDep,gr&&gr.contextDep||vr&&vr.contextDep,gr&&gr.propDep||vr&&vr.propDep,function(tr,Zr){var un=tr.shared.shader,En;gr?En=gr.append(tr,Zr):En=Zr.def(un,".",Re);var ka;vr?ka=vr.append(tr,Zr):ka=Zr.def(un,".",fe);var ma=un+".program("+ka+","+En;return Zr.def(ma+")")}),{frag:gr,vert:vr,progVar:ar,program:Zt}}function zu(it,pt){var Rt=it.static,or=it.dynamic,er={},ur=!1;function gr(){if(Tr in Rt){var Da=Rt[Tr];return Da!==null&&ri.getVAO(Da)===null&&(Da=ri.createVAO(Da)),ur=!0,er.vao=Da,ro(function(Ra){var ii=ri.getVAO(Da);return ii?Ra.link(ii):"null"})}else if(Tr in or){ur=!0;var Qa=or[Tr];return fo(Qa,function(Ra,ii){var xi=Ra.invoke(ii,Qa);return ii.def(Ra.shared.vao+".getVAO("+xi+")")})}return null}var vr=gr(),Zt=!1;function ar(){if(Oe in Rt){var Da=Rt[Oe];if(er.elements=Da,ei(Da)){var Qa=er.elements=Rn.create(Da,!0);Da=Rn.getElements(Qa),Zt=!0}else Da&&(Da=Rn.getElements(Da),Zt=!0);var Ra=ro(function(xi,Xi){if(Da){var co=xi.link(Da);return xi.ELEMENTS=co,co}return xi.ELEMENTS=null,null});return Ra.value=Da,Ra}else if(Oe in or){Zt=!0;var ii=or[Oe];return fo(ii,function(xi,Xi){var co=xi.shared,Is=co.isBufferArgs,Cs=co.elements,kl=xi.invoke(Xi,ii),Tl=Xi.def("null"),Rl=Xi.def(Is,"(",kl,")"),Pl=xi.cond(Rl).then(Tl,"=",Cs,".createStream(",kl,");").else(Tl,"=",Cs,".getElements(",kl,");");return Xi.entry(Pl),Xi.exit(xi.cond(Rl).then(Cs,".destroyStream(",Tl,");")),xi.ELEMENTS=Tl,Tl})}else if(ur)return new Ci(vr.thisDep,vr.contextDep,vr.propDep,function(xi,Xi){return Xi.def(xi.shared.vao+".currentVAO?"+xi.shared.elements+".getElements("+xi.shared.vao+".currentVAO.elements):null")});return null}var tr=ar();function Zr(){if(We in Rt){var Da=Rt[We];return er.primitive=Da,ro(function(Ra,ii){return fa[Da]})}else if(We in or){var Qa=or[We];return fo(Qa,function(Ra,ii){var xi=Ra.constants.primTypes,Xi=Ra.invoke(ii,Qa);return ii.def(xi,"[",Xi,"]")})}else{if(Zt)return po(tr)?tr.value?ro(function(Ra,ii){return ii.def(Ra.ELEMENTS,".primType")}):ro(function(){return Te}):new Ci(tr.thisDep,tr.contextDep,tr.propDep,function(Ra,ii){var xi=Ra.ELEMENTS;return ii.def(xi,"?",xi,".primType:",Te)});if(ur)return new Ci(vr.thisDep,vr.contextDep,vr.propDep,function(Ra,ii){return ii.def(Ra.shared.vao+".currentVAO?"+Ra.shared.vao+".currentVAO.primitive:"+Te)})}return null}function un(Da,Qa){if(Da in Rt){var Ra=Rt[Da]|0;return Qa?er.offset=Ra:er.instances=Ra,ro(function(xi,Xi){return Qa&&(xi.OFFSET=Ra),Ra})}else if(Da in or){var ii=or[Da];return fo(ii,function(xi,Xi){var co=xi.invoke(Xi,ii);return Qa&&(xi.OFFSET=co),co})}else if(Qa){if(Zt)return ro(function(xi,Xi){return xi.OFFSET=0,0});if(ur)return new Ci(vr.thisDep,vr.contextDep,vr.propDep,function(xi,Xi){return Xi.def(xi.shared.vao+".currentVAO?"+xi.shared.vao+".currentVAO.offset:0")})}else if(ur)return new Ci(vr.thisDep,vr.contextDep,vr.propDep,function(xi,Xi){return Xi.def(xi.shared.vao+".currentVAO?"+xi.shared.vao+".currentVAO.instances:-1")});return null}var En=un(Nt,!0);function ka(){if(Ct in Rt){var Da=Rt[Ct]|0;return er.count=Da,ro(function(){return Da})}else if(Ct in or){var Qa=or[Ct];return fo(Qa,function(Xi,co){var Is=Xi.invoke(co,Qa);return Is})}else if(Zt)if(po(tr)){if(tr)return En?new Ci(En.thisDep,En.contextDep,En.propDep,function(Xi,co){var Is=co.def(Xi.ELEMENTS,".vertCount-",Xi.OFFSET);return Is}):ro(function(Xi,co){return co.def(Xi.ELEMENTS,".vertCount")});var Ra=ro(function(){return-1});return Ra}else{var ii=new Ci(tr.thisDep||En.thisDep,tr.contextDep||En.contextDep,tr.propDep||En.propDep,function(Xi,co){var Is=Xi.ELEMENTS;return Xi.OFFSET?co.def(Is,"?",Is,".vertCount-",Xi.OFFSET,":-1"):co.def(Is,"?",Is,".vertCount:-1")});return ii}else if(ur){var xi=new Ci(vr.thisDep,vr.contextDep,vr.propDep,function(Xi,co){return co.def(Xi.shared.vao,".currentVAO?",Xi.shared.vao,".currentVAO.count:-1")});return xi}return null}var ma=Zr(),ha=ka(),Pa=un(rr,!1);return{elements:tr,primitive:ma,count:ha,instances:Pa,offset:En,vao:vr,vaoActive:ur,elementsActive:Zt,static:er}}function cl(it,pt){var Rt=it.static,or=it.dynamic,er={};return Ea.forEach(function(ur){var gr=Jn(ur);function vr(Zt,ar){if(ur in Rt){var tr=Zt(Rt[ur]);er[gr]=ro(function(){return tr})}else if(ur in or){var Zr=or[ur];er[gr]=fo(Zr,function(un,En){return ar(un,En,un.invoke(En,Zr))})}}switch(ur){case No:case $s:case gs:case jf:case iu:case qf:case Ec:case Ic:case uh:case Ou:return vr(function(Zt){return Zt},function(Zt,ar,tr){return tr});case hl:return vr(function(Zt){return ba[Zt]},function(Zt,ar,tr){var Zr=Zt.constants.compareFuncs;return ar.def(Zr,"[",tr,"]")});case Bu:return vr(function(Zt){return Zt},function(Zt,ar,tr){var Zr=ar.def("+",tr,"[0]"),un=ar.def("+",tr,"[1]");return[Zr,un]});case Bl:return vr(function(Zt){var ar="srcRGB"in Zt?Zt.srcRGB:Zt.src,tr="srcAlpha"in Zt?Zt.srcAlpha:Zt.src,Zr="dstRGB"in Zt?Zt.dstRGB:Zt.dst,un="dstAlpha"in Zt?Zt.dstAlpha:Zt.dst;return[Qn[ar],Qn[Zr],Qn[tr],Qn[un]]},function(Zt,ar,tr){var Zr=Zt.constants.blendFuncs;function un(Qa,Ra){var ii=ar.def('"',Qa,Ra,'" in ',tr,"?",tr,".",Qa,Ra,":",tr,".",Qa);return ii}var En=un("src","RGB"),ka=un("dst","RGB"),ma=ar.def(Zr,"[",En,"]"),ha=ar.def(Zr,"[",un("src","Alpha"),"]"),Pa=ar.def(Zr,"[",ka,"]"),Da=ar.def(Zr,"[",un("dst","Alpha"),"]");return[ma,Pa,ha,Da]});case au:return vr(function(Zt){if(typeof Zt=="string")return[wa[Zt],wa[Zt]];if(typeof Zt=="object")return[wa[Zt.rgb],wa[Zt.alpha]]},function(Zt,ar,tr){var Zr=Zt.constants.blendEquations,un=ar.def(),En=ar.def(),ka=Zt.cond("typeof ",tr,'==="string"');return ka.then(un,"=",En,"=",Zr,"[",tr,"];"),ka.else(un,"=",Zr,"[",tr,".rgb];",En,"=",Zr,"[",tr,".alpha];"),ar(ka),[un,En]});case Nl:return vr(function(Zt){return y(4,function(ar){return+Zt[ar]})},function(Zt,ar,tr){return y(4,function(Zr){return ar.def("+",tr,"[",Zr,"]")})});case ju:return vr(function(Zt){return Zt|0},function(Zt,ar,tr){return ar.def(tr,"|0")});case Uf:return vr(function(Zt){var ar=Zt.cmp||"keep",tr=Zt.ref||0,Zr="mask"in Zt?Zt.mask:-1;return[ba[ar],tr,Zr]},function(Zt,ar,tr){var Zr=Zt.constants.compareFuncs,un=ar.def('"cmp" in ',tr,"?",Zr,"[",tr,".cmp]",":",Pr),En=ar.def(tr,".ref|0"),ka=ar.def('"mask" in ',tr,"?",tr,".mask|0:-1");return[un,En,ka]});case os:case _s:return vr(function(Zt){var ar=Zt.fail||"keep",tr=Zt.zfail||"keep",Zr=Zt.zpass||"keep";return[ur===_s?ft:He,Ca[ar],Ca[tr],Ca[Zr]]},function(Zt,ar,tr){var Zr=Zt.constants.stencilOps;function un(En){return ar.def('"',En,'" in ',tr,"?",Zr,"[",tr,".",En,"]:",Pr)}return[ur===_s?ft:He,un("fail"),un("zfail"),un("zpass")]});case Mc:return vr(function(Zt){var ar=Zt.factor|0,tr=Zt.units|0;return[ar,tr]},function(Zt,ar,tr){var Zr=ar.def(tr,".factor|0"),un=ar.def(tr,".units|0");return[Zr,un]});case Ls:return vr(function(Zt){var ar=0;return Zt==="front"?ar=He:Zt==="back"&&(ar=ft),ar},function(Zt,ar,tr){return ar.def(tr,'==="front"?',He,":",ft)});case Cl:return vr(function(Zt){return Zt},function(Zt,ar,tr){return tr});case Wl:return vr(function(Zt){return Xa[Zt]},function(Zt,ar,tr){return ar.def(tr+'==="cw"?'+Lt+":"+Dt)});case eu:return vr(function(Zt){return Zt.map(function(ar){return!!ar})},function(Zt,ar,tr){return y(4,function(Zr){return"!!"+tr+"["+Zr+"]"})});case Cc:return vr(function(Zt){var ar="value"in Zt?Zt.value:1,tr=!!Zt.invert;return[ar,tr]},function(Zt,ar,tr){var Zr=ar.def('"value" in ',tr,"?+",tr,".value:1"),un=ar.def("!!",tr,".invert");return[Zr,un]})}}),er}function Mu(it,pt){var Rt=it.static,or=it.dynamic,er={};return Object.keys(Rt).forEach(function(ur){var gr=Rt[ur],vr;if(typeof gr=="number"||typeof gr=="boolean")vr=ro(function(){return gr});else if(typeof gr=="function"){var Zt=gr._reglType;Zt==="texture2d"||Zt==="textureCube"?vr=ro(function(ar){return ar.link(gr)}):(Zt==="framebuffer"||Zt==="framebufferCube")&&(vr=ro(function(ar){return ar.link(gr.color[0])}))}else oa(gr)&&(vr=ro(function(ar){var tr=ar.global.def("[",y(gr.length,function(Zr){return gr[Zr]}),"]");return tr}));vr.value=gr,er[ur]=vr}),Object.keys(or).forEach(function(ur){var gr=or[ur];er[ur]=fo(gr,function(vr,Zt){return vr.invoke(Zt,gr)})}),er}function Zu(it,pt){var Rt=it.static,or=it.dynamic,er={};return Object.keys(Rt).forEach(function(ur){var gr=Rt[ur],vr=kr.id(ur),Zt=new ra;if(ei(gr))Zt.state=wi,Zt.buffer=La.getBuffer(La.create(gr,Kt,!1,!0)),Zt.type=0;else{var ar=La.getBuffer(gr);if(ar)Zt.state=wi,Zt.buffer=ar,Zt.type=0;else if("constant"in gr){var tr=gr.constant;Zt.buffer="null",Zt.state=si,typeof tr=="number"?Zt.x=tr:hi.forEach(function(Pa,Da){Da<tr.length&&(Zt[Pa]=tr[Da])})}else{ei(gr.buffer)?ar=La.getBuffer(La.create(gr.buffer,Kt,!1,!0)):ar=La.getBuffer(gr.buffer);var Zr=gr.offset|0,un=gr.stride|0,En=gr.size|0,ka=!!gr.normalized,ma=0;"type"in gr&&(ma=Hn[gr.type]);var ha=gr.divisor|0;Zt.buffer=ar,Zt.state=wi,Zt.size=En,Zt.normalized=ka,Zt.type=ma||ar.dtype,Zt.offset=Zr,Zt.stride=un,Zt.divisor=ha}}er[ur]=ro(function(Pa,Da){var Qa=Pa.attribCache;if(vr in Qa)return Qa[vr];var Ra={isStream:!1};return Object.keys(Zt).forEach(function(ii){Ra[ii]=Zt[ii]}),Zt.buffer&&(Ra.buffer=Pa.link(Zt.buffer),Ra.type=Ra.type||Ra.buffer+".dtype"),Qa[vr]=Ra,Ra})}),Object.keys(or).forEach(function(ur){var gr=or[ur];function vr(Zt,ar){var tr=Zt.invoke(ar,gr),Zr=Zt.shared,un=Zt.constants,En=Zr.isBufferArgs,ka=Zr.buffer,ma={isStream:ar.def(!1)},ha=new ra;ha.state=wi,Object.keys(ha).forEach(function(Ra){ma[Ra]=ar.def(""+ha[Ra])});var Pa=ma.buffer,Da=ma.type;ar("if(",En,"(",tr,")){",ma.isStream,"=true;",Pa,"=",ka,".createStream(",Kt,",",tr,");",Da,"=",Pa,".dtype;","}else{",Pa,"=",ka,".getBuffer(",tr,");","if(",Pa,"){",Da,"=",Pa,".dtype;",'}else if("constant" in ',tr,"){",ma.state,"=",si,";","if(typeof "+tr+'.constant === "number"){',ma[hi[0]],"=",tr,".constant;",hi.slice(1).map(function(Ra){return ma[Ra]}).join("="),"=0;","}else{",hi.map(function(Ra,ii){return ma[Ra]+"="+tr+".constant.length>"+ii+"?"+tr+".constant["+ii+"]:0;"}).join(""),"}}else{","if(",En,"(",tr,".buffer)){",Pa,"=",ka,".createStream(",Kt,",",tr,".buffer);","}else{",Pa,"=",ka,".getBuffer(",tr,".buffer);","}",Da,'="type" in ',tr,"?",un.glTypes,"[",tr,".type]:",Pa,".dtype;",ma.normalized,"=!!",tr,".normalized;");function Qa(Ra){ar(ma[Ra],"=",tr,".",Ra,"|0;")}return Qa("size"),Qa("offset"),Qa("stride"),Qa("divisor"),ar("}}"),ar.exit("if(",ma.isStream,"){",ka,".destroyStream(",Pa,");","}"),ma}er[ur]=fo(gr,vr)}),er}function uc(it){var pt=it.static,Rt=it.dynamic,or={};return Object.keys(pt).forEach(function(er){var ur=pt[er];or[er]=ro(function(gr,vr){return typeof ur=="number"||typeof ur=="boolean"?""+ur:gr.link(ur)})}),Object.keys(Rt).forEach(function(er){var ur=Rt[er];or[er]=fo(ur,function(gr,vr){return gr.invoke(vr,ur)})}),or}function kf(it,pt,Rt,or,er){it.static,it.dynamic;var ur=wl(it,pt),gr=ns(it),vr=ds(it,gr),Zt=zu(it),ar=cl(it),tr=vs(it,er,ur);function Zr(Pa){var Da=vr[Pa];Da&&(ar[Pa]=Da)}Zr(Yc),Zr(Jn(sf));var un=Object.keys(ar).length>0,En={framebuffer:gr,draw:Zt,shader:tr,state:ar,dirty:un,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(En.profile=Uo(it),En.uniforms=Mu(Rt),En.drawVAO=En.scopeVAO=Zt.vao,!En.drawVAO&&tr.program&&!ur&&Dr.angle_instanced_arrays&&Zt.static.elements){var ka=!0,ma=tr.program.attributes.map(function(Pa){var Da=pt.static[Pa];return ka=ka&&!!Da,Da});if(ka&&ma.length>0){var ha=ri.getVAO(ri.createVAO({attributes:ma,elements:Zt.static.elements}));En.drawVAO=new Ci(null,null,null,function(Pa,Da){return Pa.link(ha)}),En.useVAO=!0}}return ur?En.useVAO=!0:En.attributes=Zu(pt),En.context=uc(or),En}function hu(it,pt,Rt){var or=it.shared,er=or.context,ur=it.scope();Object.keys(Rt).forEach(function(gr){pt.save(er,"."+gr);var vr=Rt[gr],Zt=vr.append(it,pt);Array.isArray(Zt)?ur(er,".",gr,"=[",Zt.join(),"];"):ur(er,".",gr,"=",Zt,";")}),pt(ur)}function wu(it,pt,Rt,or){var er=it.shared,ur=er.gl,gr=er.framebuffer,vr;Sa&&(vr=pt.def(er.extensions,".webgl_draw_buffers"));var Zt=it.constants,ar=Zt.drawBuffer,tr=Zt.backBuffer,Zr;Rt?Zr=Rt.append(it,pt):Zr=pt.def(gr,".next"),or||pt("if(",Zr,"!==",gr,".cur){"),pt("if(",Zr,"){",ur,".bindFramebuffer(",Gn,",",Zr,".framebuffer);"),Sa&&pt(vr,".drawBuffersWEBGL(",ar,"[",Zr,".colorAttachments.length]);"),pt("}else{",ur,".bindFramebuffer(",Gn,",null);"),Sa&&pt(vr,".drawBuffersWEBGL(",tr,");"),pt("}",gr,".cur=",Zr,";"),or||pt("}")}function Ro(it,pt,Rt){var or=it.shared,er=or.gl,ur=it.current,gr=it.next,vr=or.current,Zt=or.next,ar=it.cond(vr,".dirty");Ea.forEach(function(tr){var Zr=Jn(tr);if(!(Zr in Rt.state)){var un,En;if(Zr in gr){un=gr[Zr],En=ur[Zr];var ka=y(li[Zr].length,function(ha){return ar.def(un,"[",ha,"]")});ar(it.cond(ka.map(function(ha,Pa){return ha+"!=="+En+"["+Pa+"]"}).join("||")).then(er,".",ki[Zr],"(",ka,");",ka.map(function(ha,Pa){return En+"["+Pa+"]="+ha}).join(";"),";"))}else{un=ar.def(Zt,".",Zr);var ma=it.cond(un,"!==",vr,".",Zr);ar(ma),Zr in pa?ma(it.cond(un).then(er,".enable(",pa[Zr],");").else(er,".disable(",pa[Zr],");"),vr,".",Zr,"=",un,";"):ma(er,".",ki[Zr],"(",un,");",vr,".",Zr,"=",un,";")}}}),Object.keys(Rt.state).length===0&&ar(vr,".dirty=false;"),pt(ar)}function cc(it,pt,Rt,or){var er=it.shared,ur=it.current,gr=er.current,vr=er.gl,Zt;Ma(Object.keys(Rt)).forEach(function(ar){var tr=Rt[ar];if(!(or&&!or(tr))){var Zr=tr.append(it,pt);if(pa[ar]){var un=pa[ar];po(tr)?(Zt=it.link(Zr,{stable:!0}),pt(it.cond(Zt).then(vr,".enable(",un,");").else(vr,".disable(",un,");")),pt(gr,".",ar,"=",Zt,";")):(pt(it.cond(Zr).then(vr,".enable(",un,");").else(vr,".disable(",un,");")),pt(gr,".",ar,"=",Zr,";"))}else if(oa(Zr)){var En=ur[ar];pt(vr,".",ki[ar],"(",Zr,");",Zr.map(function(ka,ma){return En+"["+ma+"]="+ka}).join(";"),";")}else po(tr)?(Zt=it.link(Zr,{stable:!0}),pt(vr,".",ki[ar],"(",Zt,");",gr,".",ar,"=",Zt,";")):pt(vr,".",ki[ar],"(",Zr,");",gr,".",ar,"=",Zr,";")}})}function Js(it,pt){Fa&&(it.instancing=pt.def(it.shared.extensions,".angle_instanced_arrays"))}function Zl(it,pt,Rt,or,er){var ur=it.shared,gr=it.stats,vr=ur.current,Zt=ur.timer,ar=Rt.profile;function tr(){return typeof performance>"u"?"Date.now()":"performance.now()"}var Zr,un;function En(Qa){Zr=pt.def(),Qa(Zr,"=",tr(),";"),typeof er=="string"?Qa(gr,".count+=",er,";"):Qa(gr,".count++;"),di&&(or?(un=pt.def(),Qa(un,"=",Zt,".getNumPendingQueries();")):Qa(Zt,".beginQuery(",gr,");"))}function ka(Qa){Qa(gr,".cpuTime+=",tr(),"-",Zr,";"),di&&(or?Qa(Zt,".pushScopeStats(",un,",",Zt,".getNumPendingQueries(),",gr,");"):Qa(Zt,".endQuery();"))}function ma(Qa){var Ra=pt.def(vr,".profile");pt(vr,".profile=",Qa,";"),pt.exit(vr,".profile=",Ra,";")}var ha;if(ar){if(po(ar)){ar.enable?(En(pt),ka(pt.exit),ma("true")):ma("false");return}ha=ar.append(it,pt),ma(ha)}else ha=pt.def(vr,".profile");var Pa=it.block();En(Pa),pt("if(",ha,"){",Pa,"}");var Da=it.block();ka(Da),pt.exit("if(",ha,"){",Da,"}")}function bc(it,pt,Rt,or,er){var ur=it.shared;function gr(Zt){switch(Zt){case Mi:case us:case vl:return 2;case go:case sl:case Eu:return 3;case jo:case ll:case vu:return 4;default:return 1}}function vr(Zt,ar,tr){var Zr=ur.gl,un=pt.def(Zt,".location"),En=pt.def(ur.attributes,"[",un,"]"),ka=tr.state,ma=tr.buffer,ha=[tr.x,tr.y,tr.z,tr.w],Pa=["buffer","normalized","offset","stride"];function Da(){pt("if(!",En,".buffer){",Zr,".enableVertexAttribArray(",un,");}");var Ra=tr.type,ii;if(tr.size?ii=pt.def(tr.size,"||",ar):ii=ar,pt("if(",En,".type!==",Ra,"||",En,".size!==",ii,"||",Pa.map(function(Xi){return En+"."+Xi+"!=="+tr[Xi]}).join("||"),"){",Zr,".bindBuffer(",Kt,",",ma,".buffer);",Zr,".vertexAttribPointer(",[un,ii,Ra,tr.normalized,tr.stride,tr.offset],");",En,".type=",Ra,";",En,".size=",ii,";",Pa.map(function(Xi){return En+"."+Xi+"="+tr[Xi]+";"}).join(""),"}"),Fa){var xi=tr.divisor;pt("if(",En,".divisor!==",xi,"){",it.instancing,".vertexAttribDivisorANGLE(",[un,xi],");",En,".divisor=",xi,";}")}}function Qa(){pt("if(",En,".buffer){",Zr,".disableVertexAttribArray(",un,");",En,".buffer=null;","}if(",hi.map(function(Ra,ii){return En+"."+Ra+"!=="+ha[ii]}).join("||"),"){",Zr,".vertexAttrib4f(",un,",",ha,");",hi.map(function(Ra,ii){return En+"."+Ra+"="+ha[ii]+";"}).join(""),"}")}ka===wi?Da():ka===si?Qa():(pt("if(",ka,"===",wi,"){"),Da(),pt("}else{"),Qa(),pt("}"))}or.forEach(function(Zt){var ar=Zt.name,tr=Rt.attributes[ar],Zr;if(tr){if(!er(tr))return;Zr=tr.append(it,pt)}else{if(!er(Fo))return;var un=it.scopeAttrib(ar);Zr={},Object.keys(new ra).forEach(function(En){Zr[En]=pt.def(un,".",En)})}vr(it.link(Zt),gr(Zt.info.type),Zr)})}function wc(it,pt,Rt,or,er,ur){for(var gr=it.shared,vr=gr.gl,Zt,ar=0;ar<or.length;++ar){var tr=or[ar],Zr=tr.name,un=tr.info.type,En=Rt.uniforms[Zr],ka=it.link(tr),ma=ka+".location",ha;if(En){if(!er(En))continue;if(po(En)){var Pa=En.value;if(un===yc||un===Zc){var Da=it.link(Pa._texture||Pa.color[0]._texture);pt(vr,".uniform1i(",ma,",",Da+".bind());"),pt.exit(Da,".unbind();")}else if(un===Us||un===qs||un===Hu){var Qa=it.global.def("new Float32Array(["+Array.prototype.slice.call(Pa)+"])"),Ra=2;un===qs?Ra=3:un===Hu&&(Ra=4),pt(vr,".uniformMatrix",Ra,"fv(",ma,",false,",Qa,");")}else{switch(un){case yi:Zt="1f";break;case Mi:Zt="2f";break;case go:Zt="3f";break;case jo:Zt="4f";break;case Bs:Zt="1i";break;case Do:Zt="1i";break;case vl:Zt="2i";break;case us:Zt="2i";break;case Eu:Zt="3i";break;case sl:Zt="3i";break;case vu:Zt="4i";break;case ll:Zt="4i";break}pt(vr,".uniform",Zt,"(",ma,",",oa(Pa)?Array.prototype.slice.call(Pa):Pa,");")}continue}else ha=En.append(it,pt)}else{if(!er(Fo))continue;ha=pt.def(gr.uniforms,"[",kr.id(Zr),"]")}un===yc?pt("if(",ha,"&&",ha,'._reglType==="framebuffer"){',ha,"=",ha,".color[0];","}"):un===Zc&&pt("if(",ha,"&&",ha,'._reglType==="framebufferCube"){',ha,"=",ha,".color[0];","}");var ii=1;switch(un){case yc:case Zc:var xi=pt.def(ha,"._texture");pt(vr,".uniform1i(",ma,",",xi,".bind());"),pt.exit(xi,".unbind();");continue;case Do:case Bs:Zt="1i";break;case us:case vl:Zt="2i",ii=2;break;case sl:case Eu:Zt="3i",ii=3;break;case ll:case vu:Zt="4i",ii=4;break;case yi:Zt="1f";break;case Mi:Zt="2f",ii=2;break;case go:Zt="3f",ii=3;break;case jo:Zt="4f",ii=4;break;case Us:Zt="Matrix2fv";break;case qs:Zt="Matrix3fv";break;case Hu:Zt="Matrix4fv";break}if(Zt.charAt(0)==="M"){pt(vr,".uniform",Zt,"(",ma,",");var Xi=Math.pow(un-Us+2,2),co=it.global.def("new Float32Array(",Xi,")");Array.isArray(ha)?pt("false,(",y(Xi,function(Rl){return co+"["+Rl+"]="+ha[Rl]}),",",co,")"):pt("false,(Array.isArray(",ha,")||",ha," instanceof Float32Array)?",ha,":(",y(Xi,function(Rl){return co+"["+Rl+"]="+ha+"["+Rl+"]"}),",",co,")"),pt(");")}else if(ii>1){for(var Is=[],Cs=[],kl=0;kl<ii;++kl)Array.isArray(ha)?Cs.push(ha[kl]):Cs.push(pt.def(ha+"["+kl+"]")),ur&&Is.push(pt.def());ur&&pt("if(!",it.batchId,"||",Is.map(function(Rl,Pl){return Rl+"!=="+Cs[Pl]}).join("||"),"){",Is.map(function(Rl,Pl){return Rl+"="+Cs[Pl]+";"}).join("")),pt(vr,".uniform",Zt,"(",ma,",",Cs.join(","),");"),ur&&pt("}")}else{if(ur){var Tl=pt.def();pt("if(!",it.batchId,"||",Tl,"!==",ha,"){",Tl,"=",ha,";")}pt(vr,".uniform",Zt,"(",ma,",",ha,");"),ur&&pt("}")}}}function Go(it,pt,Rt,or){var er=it.shared,ur=er.gl,gr=er.draw,vr=or.draw;function Zt(){var ii=vr.elements,xi,Xi=pt;return ii?((ii.contextDep&&or.contextDynamic||ii.propDep)&&(Xi=Rt),xi=ii.append(it,Xi),vr.elementsActive&&Xi("if("+xi+")"+ur+".bindBuffer("+Cr+","+xi+".buffer.buffer);")):(xi=Xi.def(),Xi(xi,"=",gr,".",Oe,";","if(",xi,"){",ur,".bindBuffer(",Cr,",",xi,".buffer.buffer);}","else if(",er.vao,".currentVAO){",xi,"=",it.shared.elements+".getElements("+er.vao,".currentVAO.elements);",zi?"":"if("+xi+")"+ur+".bindBuffer("+Cr+","+xi+".buffer.buffer);","}")),xi}function ar(){var ii=vr.count,xi,Xi=pt;return ii?((ii.contextDep&&or.contextDynamic||ii.propDep)&&(Xi=Rt),xi=ii.append(it,Xi)):xi=Xi.def(gr,".",Ct),xi}var tr=Zt();function Zr(ii){var xi=vr[ii];return xi?xi.contextDep&&or.contextDynamic||xi.propDep?xi.append(it,Rt):xi.append(it,pt):pt.def(gr,".",ii)}var un=Zr(We),En=Zr(Nt),ka=ar();if(typeof ka=="number"){if(ka===0)return}else Rt("if(",ka,"){"),Rt.exit("}");var ma,ha;Fa&&(ma=Zr(rr),ha=it.instancing);var Pa=tr+".type",Da=vr.elements&&po(vr.elements)&&!vr.vaoActive;function Qa(){function ii(){Rt(ha,".drawElementsInstancedANGLE(",[un,ka,Pa,En+"<<(("+Pa+"-"+Gi+")>>1)",ma],");")}function xi(){Rt(ha,".drawArraysInstancedANGLE(",[un,En,ka,ma],");")}tr&&tr!=="null"?Da?ii():(Rt("if(",tr,"){"),ii(),Rt("}else{"),xi(),Rt("}")):xi()}function Ra(){function ii(){Rt(ur+".drawElements("+[un,ka,Pa,En+"<<(("+Pa+"-"+Gi+")>>1)"]+");")}function xi(){Rt(ur+".drawArrays("+[un,En,ka]+");")}tr&&tr!=="null"?Da?ii():(Rt("if(",tr,"){"),ii(),Rt("}else{"),xi(),Rt("}")):xi()}Fa&&(typeof ma!="number"||ma>=0)?typeof ma=="string"?(Rt("if(",ma,">0){"),Qa(),Rt("}else if(",ma,"<0){"),Ra(),Rt("}")):Qa():Ra()}function Ms(it,pt,Rt,or,er){var ur=pi(),gr=ur.proc("body",er);return Fa&&(ur.instancing=gr.def(ur.shared.extensions,".angle_instanced_arrays")),it(ur,gr,Rt,or),ur.compile().body}function Rs(it,pt,Rt,or){Js(it,pt),Rt.useVAO?Rt.drawVAO?pt(it.shared.vao,".setVAO(",Rt.drawVAO.append(it,pt),");"):pt(it.shared.vao,".setVAO(",it.shared.vao,".targetVAO);"):(pt(it.shared.vao,".setVAO(null);"),bc(it,pt,Rt,or.attributes,function(){return!0})),wc(it,pt,Rt,or.uniforms,function(){return!0},!1),Go(it,pt,pt,Rt)}function Me(it,pt){var Rt=it.proc("draw",1);Js(it,Rt),hu(it,Rt,pt.context),wu(it,Rt,pt.framebuffer),Ro(it,Rt,pt),cc(it,Rt,pt.state),Zl(it,Rt,pt,!1,!0);var or=pt.shader.progVar.append(it,Rt);if(Rt(it.shared.gl,".useProgram(",or,".program);"),pt.shader.program)Rs(it,Rt,pt,pt.shader.program);else{Rt(it.shared.vao,".setVAO(null);");var er=it.global.def("{}"),ur=Rt.def(or,".id"),gr=Rt.def(er,"[",ur,"]");Rt(it.cond(gr).then(gr,".call(this,a0);").else(gr,"=",er,"[",ur,"]=",it.link(function(vr){return Ms(Rs,it,pt,vr,1)}),"(",or,");",gr,".call(this,a0);"))}Object.keys(pt.state).length>0&&Rt(it.shared.current,".dirty=true;"),it.shared.vao&&Rt(it.shared.vao,".setVAO(null);")}function X(it,pt,Rt,or){it.batchId="a1",Js(it,pt);function er(){return!0}bc(it,pt,Rt,or.attributes,er),wc(it,pt,Rt,or.uniforms,er,!1),Go(it,pt,pt,Rt)}function ye(it,pt,Rt,or){Js(it,pt);var er=Rt.contextDep,ur=pt.def(),gr="a0",vr="a1",Zt=pt.def();it.shared.props=Zt,it.batchId=ur;var ar=it.scope(),tr=it.scope();pt(ar.entry,"for(",ur,"=0;",ur,"<",vr,";++",ur,"){",Zt,"=",gr,"[",ur,"];",tr,"}",ar.exit);function Zr(Pa){return Pa.contextDep&&er||Pa.propDep}function un(Pa){return!Zr(Pa)}if(Rt.needsContext&&hu(it,tr,Rt.context),Rt.needsFramebuffer&&wu(it,tr,Rt.framebuffer),cc(it,tr,Rt.state,Zr),Rt.profile&&Zr(Rt.profile)&&Zl(it,tr,Rt,!1,!0),or)Rt.useVAO?Rt.drawVAO?Zr(Rt.drawVAO)?tr(it.shared.vao,".setVAO(",Rt.drawVAO.append(it,tr),");"):ar(it.shared.vao,".setVAO(",Rt.drawVAO.append(it,ar),");"):ar(it.shared.vao,".setVAO(",it.shared.vao,".targetVAO);"):(ar(it.shared.vao,".setVAO(null);"),bc(it,ar,Rt,or.attributes,un),bc(it,tr,Rt,or.attributes,Zr)),wc(it,ar,Rt,or.uniforms,un,!1),wc(it,tr,Rt,or.uniforms,Zr,!0),Go(it,ar,tr,Rt);else{var En=it.global.def("{}"),ka=Rt.shader.progVar.append(it,tr),ma=tr.def(ka,".id"),ha=tr.def(En,"[",ma,"]");tr(it.shared.gl,".useProgram(",ka,".program);","if(!",ha,"){",ha,"=",En,"[",ma,"]=",it.link(function(Pa){return Ms(X,it,Rt,Pa,2)}),"(",ka,");}",ha,".call(this,a0[",ur,"],",ur,");")}}function ne(it,pt){var Rt=it.proc("batch",2);it.batchId="0",Js(it,Rt);var or=!1,er=!0;Object.keys(pt.context).forEach(function(En){or=or||pt.context[En].propDep}),or||(hu(it,Rt,pt.context),er=!1);var ur=pt.framebuffer,gr=!1;ur?(ur.propDep?or=gr=!0:ur.contextDep&&or&&(gr=!0),gr||wu(it,Rt,ur)):wu(it,Rt,null),pt.state.viewport&&pt.state.viewport.propDep&&(or=!0);function vr(En){return En.contextDep&&or||En.propDep}Ro(it,Rt,pt),cc(it,Rt,pt.state,function(En){return!vr(En)}),(!pt.profile||!vr(pt.profile))&&Zl(it,Rt,pt,!1,"a1"),pt.contextDep=or,pt.needsContext=er,pt.needsFramebuffer=gr;var Zt=pt.shader.progVar;if(Zt.contextDep&&or||Zt.propDep)ye(it,Rt,pt,null);else{var ar=Zt.append(it,Rt);if(Rt(it.shared.gl,".useProgram(",ar,".program);"),pt.shader.program)ye(it,Rt,pt,pt.shader.program);else{Rt(it.shared.vao,".setVAO(null);");var tr=it.global.def("{}"),Zr=Rt.def(ar,".id"),un=Rt.def(tr,"[",Zr,"]");Rt(it.cond(un).then(un,".call(this,a0,a1);").else(un,"=",tr,"[",Zr,"]=",it.link(function(En){return Ms(ye,it,pt,En,2)}),"(",ar,");",un,".call(this,a0,a1);"))}}Object.keys(pt.state).length>0&&Rt(it.shared.current,".dirty=true;"),it.shared.vao&&Rt(it.shared.vao,".setVAO(null);")}function Se(it,pt){var Rt=it.proc("scope",3);it.batchId="a2";var or=it.shared,er=or.current;if(hu(it,Rt,pt.context),pt.framebuffer&&pt.framebuffer.append(it,Rt),Ma(Object.keys(pt.state)).forEach(function(vr){var Zt=pt.state[vr],ar=Zt.append(it,Rt);oa(ar)?ar.forEach(function(tr,Zr){no(tr)?Rt.set(it.next[vr],"["+Zr+"]",tr):Rt.set(it.next[vr],"["+Zr+"]",it.link(tr,{stable:!0}))}):po(Zt)?Rt.set(or.next,"."+vr,it.link(ar,{stable:!0})):Rt.set(or.next,"."+vr,ar)}),Zl(it,Rt,pt,!0,!0),[Oe,Nt,Ct,rr,We].forEach(function(vr){var Zt=pt.draw[vr];if(Zt){var ar=Zt.append(it,Rt);no(ar)?Rt.set(or.draw,"."+vr,ar):Rt.set(or.draw,"."+vr,it.link(ar),{stable:!0})}}),Object.keys(pt.uniforms).forEach(function(vr){var Zt=pt.uniforms[vr].append(it,Rt);Array.isArray(Zt)&&(Zt="["+Zt.map(function(ar){return no(ar)?ar:it.link(ar,{stable:!0})})+"]"),Rt.set(or.uniforms,"["+it.link(kr.id(vr),{stable:!0})+"]",Zt)}),Object.keys(pt.attributes).forEach(function(vr){var Zt=pt.attributes[vr].append(it,Rt),ar=it.scopeAttrib(vr);Object.keys(new ra).forEach(function(tr){Rt.set(ar,"."+tr,Zt[tr])})}),pt.scopeVAO){var ur=pt.scopeVAO.append(it,Rt);no(ur)?Rt.set(or.vao,".targetVAO",ur):Rt.set(or.vao,".targetVAO",it.link(ur,{stable:!0}))}function gr(vr){var Zt=pt.shader[vr];if(Zt){var ar=Zt.append(it,Rt);no(ar)?Rt.set(or.shader,"."+vr,ar):Rt.set(or.shader,"."+vr,it.link(ar,{stable:!0}))}}gr(fe),gr(Re),Object.keys(pt.state).length>0&&(Rt(er,".dirty=true;"),Rt.exit(er,".dirty=true;")),Rt("a1(",it.shared.context,",a0,",it.batchId,");")}function Je(it){if(!(typeof it!="object"||oa(it))){for(var pt=Object.keys(it),Rt=0;Rt<pt.length;++Rt)if(d.isDynamic(it[pt[Rt]]))return!0;return!1}}function xt(it,pt,Rt){var or=pt.static[Rt];if(!or||!Je(or))return;var er=it.global,ur=Object.keys(or),gr=!1,vr=!1,Zt=!1,ar=it.global.def("{}");ur.forEach(function(Zr){var un=or[Zr];if(d.isDynamic(un)){typeof un=="function"&&(un=or[Zr]=d.unbox(un));var En=fo(un,null);gr=gr||En.thisDep,Zt=Zt||En.propDep,vr=vr||En.contextDep}else{switch(er(ar,".",Zr,"="),typeof un){case"number":er(un);break;case"string":er('"',un,'"');break;case"object":Array.isArray(un)&&er("[",un.join(),"]");break;default:er(it.link(un));break}er(";")}});function tr(Zr,un){ur.forEach(function(En){var ka=or[En];if(d.isDynamic(ka)){var ma=Zr.invoke(un,ka);un(ar,".",En,"=",ma,";")}})}pt.dynamic[Rt]=new d.DynamicVariable(rs,{thisDep:gr,contextDep:vr,propDep:Zt,ref:ar,append:tr}),delete pt.static[Rt]}function At(it,pt,Rt,or,er){var ur=pi();ur.stats=ur.link(er),Object.keys(pt.static).forEach(function(vr){xt(ur,pt,vr)}),zt.forEach(function(vr){xt(ur,it,vr)});var gr=kf(it,pt,Rt,or,ur);return gr.shader.program&&(gr.shader.program.attributes.sort(function(vr,Zt){return vr.name<Zt.name?-1:1}),gr.shader.program.uniforms.sort(function(vr,Zt){return vr.name<Zt.name?-1:1})),Me(ur,gr),Se(ur,gr),ne(ur,gr),v(ur.compile(),{destroy:function(){gr.shader.program.destroy()}})}return{next:eo,current:li,procs:(function(){var it=pi(),pt=it.proc("poll"),Rt=it.proc("refresh"),or=it.block();pt(or),Rt(or);var er=it.shared,ur=er.gl,gr=er.next,vr=er.current;or(vr,".dirty=false;"),wu(it,pt),wu(it,Rt,null,!0);var Zt;Fa&&(Zt=it.link(Fa)),Dr.oes_vertex_array_object&&Rt(it.link(Dr.oes_vertex_array_object),".bindVertexArrayOES(null);");var ar=Rt.def(er.attributes),tr=Rt.def(0),Zr=it.cond(tr,".buffer");Zr.then(ur,".enableVertexAttribArray(i);",ur,".bindBuffer(",Kt,",",tr,".buffer.buffer);",ur,".vertexAttribPointer(i,",tr,".size,",tr,".type,",tr,".normalized,",tr,".stride,",tr,".offset);").else(ur,".disableVertexAttribArray(i);",ur,".vertexAttrib4f(i,",tr,".x,",tr,".y,",tr,".z,",tr,".w);",tr,".buffer=null;");var un=it.link(Xn.maxAttributes,{stable:!0});return Rt("for(var i=0;i<",un,";++i){",tr,"=",ar,"[i];",Zr,"}"),Fa&&Rt("for(var i=0;i<",un,";++i){",Zt,".vertexAttribDivisorANGLE(i,",ar,"[i].divisor);","}"),Rt(it.shared.vao,".currentVAO=null;",it.shared.vao,".setVAO(",it.shared.vao,".targetVAO);"),Object.keys(pa).forEach(function(En){var ka=pa[En],ma=or.def(gr,".",En),ha=it.block();ha("if(",ma,"){",ur,".enable(",ka,")}else{",ur,".disable(",ka,")}",vr,".",En,"=",ma,";"),Rt(ha),pt("if(",ma,"!==",vr,".",En,"){",ha,"}")}),Object.keys(ki).forEach(function(En){var ka=ki[En],ma=li[En],ha,Pa,Da=it.block();if(Da(ur,".",ka,"("),oa(ma)){var Qa=ma.length;ha=it.global.def(gr,".",En),Pa=it.global.def(vr,".",En),Da(y(Qa,function(Ra){return ha+"["+Ra+"]"}),");",y(Qa,function(Ra){return Pa+"["+Ra+"]="+ha+"["+Ra+"];"}).join("")),pt("if(",y(Qa,function(Ra){return ha+"["+Ra+"]!=="+Pa+"["+Ra+"]"}).join("||"),"){",Da,"}")}else ha=or.def(gr,".",En),Pa=or.def(vr,".",En),Da(ha,");",vr,".",En,"=",ha,";"),pt("if(",ha,"!==",Pa,"){",Da,"}");Rt(Da)}),it.compile()})(),compile:At}}function il(){return{vaoCount:0,bufferCount:0,elementsCount:0,framebufferCount:0,shaderCount:0,textureCount:0,cubeCount:0,renderbufferCount:0,maxTextureUnits:0}}var Wo=34918,bs=34919,dl=35007,Gu=function(St,kr){if(!kr.ext_disjoint_timer_query)return null;var Dr=[];function Xn(){return Dr.pop()||kr.ext_disjoint_timer_query.createQueryEXT()}function La(wa){Dr.push(wa)}var Rn=[];function Pn(wa){var Fa=Xn();kr.ext_disjoint_timer_query.beginQueryEXT(dl,Fa),Rn.push(Fa),di(Rn.length-1,Rn.length,wa)}function ni(){kr.ext_disjoint_timer_query.endQueryEXT(dl)}function ti(){this.startQueryIndex=-1,this.endQueryIndex=-1,this.sum=0,this.stats=null}var ri=[];function gi(){return ri.pop()||new ti}function io(wa){ri.push(wa)}var qi=[];function di(wa,Fa,Sa){var zi=gi();zi.startQueryIndex=wa,zi.endQueryIndex=Fa,zi.sum=0,zi.stats=Sa,qi.push(zi)}var Na=[],yn=[];function ra(){var wa,Fa,Sa=Rn.length;if(Sa!==0){yn.length=Math.max(yn.length,Sa+1),Na.length=Math.max(Na.length,Sa+1),Na[0]=0,yn[0]=0;var zi=0;for(wa=0,Fa=0;Fa<Rn.length;++Fa){var li=Rn[Fa];kr.ext_disjoint_timer_query.getQueryObjectEXT(li,bs)?(zi+=kr.ext_disjoint_timer_query.getQueryObjectEXT(li,Wo),La(li)):Rn[wa++]=li,Na[Fa+1]=zi,yn[Fa+1]=wa}for(Rn.length=wa,wa=0,Fa=0;Fa<qi.length;++Fa){var eo=qi[Fa],Ea=eo.startQueryIndex,pa=eo.endQueryIndex;eo.sum+=Na[pa]-Na[Ea];var ki=yn[Ea],Jn=yn[pa];Jn===ki?(eo.stats.gpuTime+=eo.sum/1e6,io(eo)):(eo.startQueryIndex=ki,eo.endQueryIndex=Jn,qi[wa++]=eo)}qi.length=wa}}return{beginQuery:Pn,endQuery:ni,pushScopeStats:di,update:ra,getNumPendingQueries:function(){return Rn.length},clear:function(){Dr.push.apply(Dr,Rn);for(var wa=0;wa<Dr.length;wa++)kr.ext_disjoint_timer_query.deleteQueryEXT(Dr[wa]);Rn.length=0,Dr.length=0},restore:function(){Rn.length=0,Dr.length=0}}},fu=16384,ko=256,Vs=1024,ul=34962,ou="webglcontextlost",Yl="webglcontextrestored",Dc=1,jl=2,su=3;function lf(St,kr){for(var Dr=0;Dr<St.length;++Dr)if(St[Dr]===kr)return Dr;return-1}function Uu(St){var kr=b(St);if(!kr)return null;var Dr=kr.gl,Xn=Dr.getContextAttributes();Dr.isContextLost();var La=A(Dr,kr);if(!La)return null;var Rn=m(),Pn=il(),ni=kr.cachedCode||{},ti=La.extensions,ri=Gu(Dr,ti),gi=g(),io=Dr.drawingBufferWidth,qi=Dr.drawingBufferHeight,di={tick:0,time:0,viewportWidth:io,viewportHeight:qi,framebufferWidth:io,framebufferHeight:qi,drawingBufferWidth:io,drawingBufferHeight:qi,pixelRatio:kr.pixelRatio},Na={},yn={elements:null,primitive:4,count:-1,offset:0,instances:-1},ra=fn(Dr,ti),wa=Ln(Dr,Pn,kr,zi),Fa=xr(Dr,ti,wa,Pn),Sa=gf(Dr,ti,ra,Pn,wa,Fa,yn);function zi(Go){return Sa.destroyBuffer(Go)}var li=af(Dr,Rn,Pn,kr),eo=Af(Dr,ti,ra,function(){ki.procs.poll()},di,Pn,kr),Ea=Qf(Dr,ti,ra,Pn,kr),pa=yh(Dr,ti,ra,eo,Ea,Pn),ki=Ho(Dr,Rn,ti,ra,wa,Fa,eo,pa,Na,Sa,li,yn,di,ri,ni,kr),Jn=xc(Dr,pa,ki.procs.poll,di),_i=ki.next,ai=Dr.canvas,no=[],Xo=[],Vi=[],lo=[kr.onDestroy],pi=null;function Uo(){if(no.length===0){ri&&ri.update(),pi=null;return}pi=h.next(Uo),wu();for(var Go=no.length-1;Go>=0;--Go){var Ms=no[Go];Ms&&Ms(di,null,0)}Dr.flush(),ri&&ri.update()}function ns(){!pi&&no.length>0&&(pi=h.next(Uo))}function ds(){pi&&(h.cancel(Uo),pi=null)}function wl(Go){Go.preventDefault(),ds(),Xo.forEach(function(Ms){Ms()})}function vs(Go){Dr.getError(),La.restore(),li.restore(),wa.restore(),eo.restore(),Ea.restore(),pa.restore(),Sa.restore(),ri&&ri.restore(),ki.procs.refresh(),ns(),Vi.forEach(function(Ms){Ms()})}ai&&(ai.addEventListener(ou,wl,!1),ai.addEventListener(Yl,vs,!1));function zu(){no.length=0,ds(),ai&&(ai.removeEventListener(ou,wl),ai.removeEventListener(Yl,vs)),li.clear(),pa.clear(),Ea.clear(),Sa.clear(),eo.clear(),Fa.clear(),wa.clear(),ri&&ri.clear(),lo.forEach(function(Go){Go()})}function cl(Go){function Ms(er){var ur=v({},er);delete ur.uniforms,delete ur.attributes,delete ur.context,delete ur.vao,"stencil"in ur&&ur.stencil.op&&(ur.stencil.opBack=ur.stencil.opFront=ur.stencil.op,delete ur.stencil.op);function gr(vr){if(vr in ur){var Zt=ur[vr];delete ur[vr],Object.keys(Zt).forEach(function(ar){ur[vr+"."+ar]=Zt[ar]})}}return gr("blend"),gr("depth"),gr("cull"),gr("stencil"),gr("polygonOffset"),gr("scissor"),gr("sample"),"vao"in er&&(ur.vao=er.vao),ur}function Rs(er,ur){var gr={},vr={};return Object.keys(er).forEach(function(Zt){var ar=er[Zt];if(d.isDynamic(ar)){vr[Zt]=d.unbox(ar,Zt);return}else if(ur&&Array.isArray(ar)){for(var tr=0;tr<ar.length;++tr)if(d.isDynamic(ar[tr])){vr[Zt]=d.unbox(ar,Zt);return}}gr[Zt]=ar}),{dynamic:vr,static:gr}}var Me=Rs(Go.context||{},!0),X=Rs(Go.uniforms||{},!0),ye=Rs(Go.attributes||{},!1),ne=Rs(Ms(Go),!1),Se={gpuTime:0,cpuTime:0,count:0},Je=ki.compile(ne,ye,X,Me,Se),xt=Je.draw,At=Je.batch,it=Je.scope,pt=[];function Rt(er){for(;pt.length<er;)pt.push(null);return pt}function or(er,ur){var gr;if(typeof er=="function")return it.call(this,null,er,0);if(typeof ur=="function")if(typeof er=="number")for(gr=0;gr<er;++gr)it.call(this,null,ur,gr);else if(Array.isArray(er))for(gr=0;gr<er.length;++gr)it.call(this,er[gr],ur,gr);else return it.call(this,er,ur,0);else if(typeof er=="number"){if(er>0)return At.call(this,Rt(er|0),er|0)}else if(Array.isArray(er)){if(er.length)return At.call(this,er,er.length)}else return xt.call(this,er)}return v(or,{stats:Se,destroy:function(){Je.destroy()}})}var Mu=pa.setFBO=cl({framebuffer:d.define.call(null,Dc,"framebuffer")});function Zu(Go,Ms){var Rs=0;ki.procs.poll();var Me=Ms.color;Me&&(Dr.clearColor(+Me[0]||0,+Me[1]||0,+Me[2]||0,+Me[3]||0),Rs|=fu),"depth"in Ms&&(Dr.clearDepth(+Ms.depth),Rs|=ko),"stencil"in Ms&&(Dr.clearStencil(Ms.stencil|0),Rs|=Vs),Dr.clear(Rs)}function uc(Go){if("framebuffer"in Go)if(Go.framebuffer&&Go.framebuffer_reglType==="framebufferCube")for(var Ms=0;Ms<6;++Ms)Mu(v({framebuffer:Go.framebuffer.faces[Ms]},Go),Zu);else Mu(Go,Zu);else Zu(null,Go)}function kf(Go){no.push(Go);function Ms(){var Rs=lf(no,Go);function Me(){var X=lf(no,Me);no[X]=no[no.length-1],no.length-=1,no.length<=0&&ds()}no[Rs]=Me}return ns(),{cancel:Ms}}function hu(){var Go=_i.viewport,Ms=_i.scissor_box;Go[0]=Go[1]=Ms[0]=Ms[1]=0,di.viewportWidth=di.framebufferWidth=di.drawingBufferWidth=Go[2]=Ms[2]=Dr.drawingBufferWidth,di.viewportHeight=di.framebufferHeight=di.drawingBufferHeight=Go[3]=Ms[3]=Dr.drawingBufferHeight}function wu(){di.tick+=1,di.time=cc(),hu(),ki.procs.poll()}function Ro(){eo.refresh(),hu(),ki.procs.refresh(),ri&&ri.update()}function cc(){return(g()-gi)/1e3}Ro();function Js(Go,Ms){var Rs;switch(Go){case"frame":return kf(Ms);case"lost":Rs=Xo;break;case"restore":Rs=Vi;break;case"destroy":Rs=lo;break}return Rs.push(Ms),{cancel:function(){for(var Me=0;Me<Rs.length;++Me)if(Rs[Me]===Ms){Rs[Me]=Rs[Rs.length-1],Rs.pop();return}}}}function Zl(){return ni}function bc(Go){Object.entries(Go).forEach(function(Ms){ni[Ms[0]]=Ms[1]})}var wc=v(cl,{clear:uc,prop:d.define.bind(null,Dc),context:d.define.bind(null,jl),this:d.define.bind(null,su),draw:cl({}),buffer:function(Go){return wa.create(Go,ul,!1,!1)},elements:function(Go){return Fa.create(Go,!1)},texture:eo.create2D,cube:eo.createCube,renderbuffer:Ea.create,framebuffer:pa.create,framebufferCube:pa.createCube,vao:Sa.createVAO,attributes:Xn,frame:kf,on:Js,limits:ra,hasExtension:function(Go){return ra.extensions.indexOf(Go.toLowerCase())>=0},read:Jn,destroy:zu,_gl:Dr,_refresh:Ro,poll:function(){wu(),ri&&ri.update()},now:cc,stats:Pn,getCachedCode:Zl,preloadCachedCode:bc});return kr.onDone(null,wc),wc}return Uu})}}),vee=Ne({"node_modules/gl-util/context.js"(te,Z){var v=n1();Z.exports=function(l){if(l?typeof l=="string"&&(l={container:l}):l={},C(l)?l={container:l}:P(l)?l={container:l}:t(l)?l={gl:l}:l=v(l,{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),l.pixelRatio||(l.pixelRatio=window.pixelRatio||1),l.gl)return l.gl;if(l.canvas&&(l.container=l.canvas.parentNode),l.container){if(typeof l.container=="string"){var i=document.querySelector(l.container);if(!i)throw Error("Element "+l.container+" is not found");l.container=i}C(l.container)?(l.canvas=l.container,l.container=l.canvas.parentNode):l.canvas||(l.canvas=r(),l.container.appendChild(l.canvas),w(l))}else if(!l.canvas)if(typeof document<"u")l.container=document.body||document.documentElement,l.canvas=r(),l.container.appendChild(l.canvas),w(l);else throw Error("Not DOM environment. Use headless-gl.");return l.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(s){try{l.gl=l.canvas.getContext(s,l.attrs)}catch{}return l.gl}),l.gl};function w(a){if(a.container)if(a.container==document.body)document.body.style.width||(a.canvas.width=a.width||a.pixelRatio*window.innerWidth),document.body.style.height||(a.canvas.height=a.height||a.pixelRatio*window.innerHeight);else{var l=a.container.getBoundingClientRect();a.canvas.width=a.width||l.right-l.left,a.canvas.height=a.height||l.bottom-l.top}}function C(a){return typeof a.getContext=="function"&&"width"in a&&"height"in a}function P(a){return typeof a.nodeName=="string"&&typeof a.appendChild=="function"&&typeof a.getBoundingClientRect=="function"}function t(a){return typeof a.drawArrays=="function"||typeof a.drawElements=="function"}function r(){var a=document.createElement("canvas");return a.style.position="absolute",a.style.top=0,a.style.left=0,a}}}),pee=Ne({"node_modules/font-atlas/index.js"(te,Z){var v=HN(),w=[32,126];Z.exports=C;function C(P){P=P||{};var t=P.shape?P.shape:P.canvas?[P.canvas.width,P.canvas.height]:[512,512],r=P.canvas||document.createElement("canvas"),a=P.font,l=typeof P.step=="number"?[P.step,P.step]:P.step||[32,32],i=P.chars||w;if(a&&typeof a!="string"&&(a=v(a)),!Array.isArray(i))i=String(i).split("");else if(i.length===2&&typeof i[0]=="number"&&typeof i[1]=="number"){for(var s=[],o=i[0],u=0;o<=i[1];o++)s[u++]=String.fromCharCode(o);i=s}t=t.slice(),r.width=t[0],r.height=t[1];var d=r.getContext("2d");d.fillStyle="#000",d.fillRect(0,0,r.width,r.height),d.font=a,d.textAlign="center",d.textBaseline="middle",d.fillStyle="#fff";for(var h=l[0]/2,g=l[1]/2,o=0;o<i.length;o++)d.fillText(i[o],h,g),(h+=l[0])>t[0]-l[0]/2&&(h=l[0]/2,g+=l[1]);return r}}}),GN=Ne({"node_modules/bit-twiddle/twiddle.js"(te){"use restrict";var Z=32;te.INT_BITS=Z,te.INT_MAX=2147483647,te.INT_MIN=-1<<Z-1,te.sign=function(C){return(C>0)-(C<0)},te.abs=function(C){var P=C>>Z-1;return(C^P)-P},te.min=function(C,P){return P^(C^P)&-(C<P)},te.max=function(C,P){return C^(C^P)&-(C<P)},te.isPow2=function(C){return!(C&C-1)&&!!C},te.log2=function(C){var P,t;return P=(C>65535)<<4,C>>>=P,t=(C>255)<<3,C>>>=t,P|=t,t=(C>15)<<2,C>>>=t,P|=t,t=(C>3)<<1,C>>>=t,P|=t,P|C>>1},te.log10=function(C){return C>=1e9?9:C>=1e8?8:C>=1e7?7:C>=1e6?6:C>=1e5?5:C>=1e4?4:C>=1e3?3:C>=100?2:C>=10?1:0},te.popCount=function(C){return C=C-(C>>>1&1431655765),C=(C&858993459)+(C>>>2&858993459),(C+(C>>>4)&252645135)*16843009>>>24};function v(C){var P=32;return C&=-C,C&&P--,C&65535&&(P-=16),C&16711935&&(P-=8),C&252645135&&(P-=4),C&858993459&&(P-=2),C&1431655765&&(P-=1),P}te.countTrailingZeros=v,te.nextPow2=function(C){return C+=C===0,--C,C|=C>>>1,C|=C>>>2,C|=C>>>4,C|=C>>>8,C|=C>>>16,C+1},te.prevPow2=function(C){return C|=C>>>1,C|=C>>>2,C|=C>>>4,C|=C>>>8,C|=C>>>16,C-(C>>>1)},te.parity=function(C){return C^=C>>>16,C^=C>>>8,C^=C>>>4,C&=15,27030>>>C&1};var w=new Array(256);(function(C){for(var P=0;P<256;++P){var t=P,r=P,a=7;for(t>>>=1;t;t>>>=1)r<<=1,r|=t&1,--a;C[P]=r<<a&255}})(w),te.reverse=function(C){return w[C&255]<<24|w[C>>>8&255]<<16|w[C>>>16&255]<<8|w[C>>>24&255]},te.interleave2=function(C,P){return C&=65535,C=(C|C<<8)&16711935,C=(C|C<<4)&252645135,C=(C|C<<2)&858993459,C=(C|C<<1)&1431655765,P&=65535,P=(P|P<<8)&16711935,P=(P|P<<4)&252645135,P=(P|P<<2)&858993459,P=(P|P<<1)&1431655765,C|P<<1},te.deinterleave2=function(C,P){return C=C>>>P&1431655765,C=(C|C>>>1)&858993459,C=(C|C>>>2)&252645135,C=(C|C>>>4)&16711935,C=(C|C>>>16)&65535,C<<16>>16},te.interleave3=function(C,P,t){return C&=1023,C=(C|C<<16)&4278190335,C=(C|C<<8)&251719695,C=(C|C<<4)&3272356035,C=(C|C<<2)&1227133513,P&=1023,P=(P|P<<16)&4278190335,P=(P|P<<8)&251719695,P=(P|P<<4)&3272356035,P=(P|P<<2)&1227133513,C|=P<<1,t&=1023,t=(t|t<<16)&4278190335,t=(t|t<<8)&251719695,t=(t|t<<4)&3272356035,t=(t|t<<2)&1227133513,C|t<<2},te.deinterleave3=function(C,P){return C=C>>>P&1227133513,C=(C|C>>>2)&3272356035,C=(C|C>>>4)&251719695,C=(C|C>>>8)&4278190335,C=(C|C>>>16)&1023,C<<22>>22},te.nextCombination=function(C){var P=C|C-1;return P+1|(~P&-~P)-1>>>v(C)+1}}}),mee=Ne({"node_modules/dup/dup.js"(te,Z){function v(P,t,r){var a=P[r]|0;if(a<=0)return[];var l=new Array(a),i;if(r===P.length-1)for(i=0;i<a;++i)l[i]=t;else for(i=0;i<a;++i)l[i]=v(P,t,r+1);return l}function w(P,t){var r,a;for(r=new Array(P),a=0;a<P;++a)r[a]=t;return r}function C(P,t){switch(typeof t>"u"&&(t=0),typeof P){case"number":if(P>0)return w(P|0,t);break;case"object":if(typeof P.length=="number")return v(P,t,0);break}return[]}Z.exports=C}}),gee=Ne({"node_modules/typedarray-pool/pool.js"(te){var Z=GN(),v=mee(),w=Uy().Buffer;window.__TYPEDARRAY_POOL||(window.__TYPEDARRAY_POOL={UINT8:v([32,0]),UINT16:v([32,0]),UINT32:v([32,0]),BIGUINT64:v([32,0]),INT8:v([32,0]),INT16:v([32,0]),INT32:v([32,0]),BIGINT64:v([32,0]),FLOAT:v([32,0]),DOUBLE:v([32,0]),DATA:v([32,0]),UINT8C:v([32,0]),BUFFER:v([32,0])});var C=typeof Uint8ClampedArray<"u",P=typeof BigUint64Array<"u",t=typeof BigInt64Array<"u",r=window.__TYPEDARRAY_POOL;r.UINT8C||(r.UINT8C=v([32,0])),r.BIGUINT64||(r.BIGUINT64=v([32,0])),r.BIGINT64||(r.BIGINT64=v([32,0])),r.BUFFER||(r.BUFFER=v([32,0]));var a=r.DATA,l=r.BUFFER;te.free=function(f){if(w.isBuffer(f))l[Z.log2(f.length)].push(f);else{if(Object.prototype.toString.call(f)!=="[object ArrayBuffer]"&&(f=f.buffer),!f)return;var p=f.length||f.byteLength,x=Z.log2(p)|0;a[x].push(f)}};function i(y){if(y){var f=y.length||y.byteLength,p=Z.log2(f);a[p].push(y)}}function s(y){i(y.buffer)}te.freeUint8=te.freeUint16=te.freeUint32=te.freeBigUint64=te.freeInt8=te.freeInt16=te.freeInt32=te.freeBigInt64=te.freeFloat32=te.freeFloat=te.freeFloat64=te.freeDouble=te.freeUint8Clamped=te.freeDataView=s,te.freeArrayBuffer=i,te.freeBuffer=function(f){l[Z.log2(f.length)].push(f)},te.malloc=function(f,p){if(p===void 0||p==="arraybuffer")return o(f);switch(p){case"uint8":return u(f);case"uint16":return d(f);case"uint32":return h(f);case"int8":return g(f);case"int16":return m(f);case"int32":return E(f);case"float":case"float32":return c(f);case"double":case"float64":return _(f);case"uint8_clamped":return T(f);case"bigint64":return k(f);case"biguint64":return M(f);case"buffer":return A(f);case"data":case"dataview":return b(f);default:return null}return null};function o(f){var f=Z.nextPow2(f),p=Z.log2(f),x=a[p];return x.length>0?x.pop():new ArrayBuffer(f)}te.mallocArrayBuffer=o;function u(y){return new Uint8Array(o(y),0,y)}te.mallocUint8=u;function d(y){return new Uint16Array(o(2*y),0,y)}te.mallocUint16=d;function h(y){return new Uint32Array(o(4*y),0,y)}te.mallocUint32=h;function g(y){return new Int8Array(o(y),0,y)}te.mallocInt8=g;function m(y){return new Int16Array(o(2*y),0,y)}te.mallocInt16=m;function E(y){return new Int32Array(o(4*y),0,y)}te.mallocInt32=E;function c(y){return new Float32Array(o(4*y),0,y)}te.mallocFloat32=te.mallocFloat=c;function _(y){return new Float64Array(o(8*y),0,y)}te.mallocFloat64=te.mallocDouble=_;function T(y){return C?new Uint8ClampedArray(o(y),0,y):u(y)}te.mallocUint8Clamped=T;function M(y){return P?new BigUint64Array(o(8*y),0,y):null}te.mallocBigUint64=M;function k(y){return t?new BigInt64Array(o(8*y),0,y):null}te.mallocBigInt64=k;function b(y){return new DataView(o(y),0,y)}te.mallocDataView=b;function A(y){y=Z.nextPow2(y);var f=Z.log2(y),p=l[f];return p.length>0?p.pop():new w(y)}te.mallocBuffer=A,te.clearCache=function(){for(var f=0;f<32;++f)r.UINT8[f].length=0,r.UINT16[f].length=0,r.UINT32[f].length=0,r.INT8[f].length=0,r.INT16[f].length=0,r.INT32[f].length=0,r.FLOAT[f].length=0,r.DOUBLE[f].length=0,r.BIGUINT64[f].length=0,r.BIGINT64[f].length=0,r.UINT8C[f].length=0,a[f].length=0,l[f].length=0}}}),yee=Ne({"node_modules/is-plain-obj/index.js"(te,Z){var v=Object.prototype.toString;Z.exports=function(w){var C;return v.call(w)==="[object Object]"&&(C=Object.getPrototypeOf(w),C===null||C===Object.getPrototypeOf({}))}}}),XN=Ne({"node_modules/parse-unit/index.js"(te,Z){Z.exports=function(w,C){C||(C=[0,""]),w=String(w);var P=parseFloat(w,10);return C[0]=P,C[1]=w.match(/[\d.\-\+]*\s*(.*)/)[1]||"",C}}}),_ee=Ne({"node_modules/to-px/topx.js"(te,Z){var v=XN();Z.exports=t;var w=96;function C(r,a){var l=v(getComputedStyle(r).getPropertyValue(a));return l[0]*t(l[1],r)}function P(r,a){var l=document.createElement("div");l.style["font-size"]="128"+r,a.appendChild(l);var i=C(l,"font-size")/128;return a.removeChild(l),i}function t(r,a){switch(a=a||document.body,r=(r||"px").trim().toLowerCase(),(a===window||a===document)&&(a=document.body),r){case"%":return a.clientHeight/100;case"ch":case"ex":return P(r,a);case"em":return C(a,"font-size");case"rem":return C(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 w;case"cm":return w/2.54;case"mm":return w/25.4;case"pt":return w/72;case"pc":return w/6}return 1}}}),xee=Ne({"node_modules/detect-kerning/index.js"(te,Z){Z.exports=P;var v=P.canvas=document.createElement("canvas"),w=v.getContext("2d"),C=t([32,126]);P.createPairs=t,P.ascii=C;function P(r,a){Array.isArray(r)&&(r=r.join(", "));var l={},i,s=16,o=.05;a&&(a.length===2&&typeof a[0]=="number"?i=t(a):Array.isArray(a)?i=a:(a.o?i=t(a.o):a.pairs&&(i=a.pairs),a.fontSize&&(s=a.fontSize),a.threshold!=null&&(o=a.threshold))),i||(i=C),w.font=s+"px "+r;for(var u=0;u<i.length;u++){var d=i[u],h=w.measureText(d[0]).width+w.measureText(d[1]).width,g=w.measureText(d).width;if(Math.abs(h-g)>s*o){var m=(g-h)/s;l[d]=m*1e3}}return l}function t(r){for(var a=[],l=r[0];l<=r[1];l++)for(var i=String.fromCharCode(l),s=r[0];s<r[1];s++){var o=String.fromCharCode(s),u=i+o;a.push(u)}return a}}}),bee=Ne({"node_modules/font-measure/index.js"(te,Z){Z.exports=v,v.canvas=document.createElement("canvas"),v.cache={};function v(o,r){r||(r={}),(typeof o=="string"||Array.isArray(o))&&(r.family=o);var a=Array.isArray(r.family)?r.family.join(", "):r.family;if(!a)throw Error("`family` must be defined");var l=r.size||r.fontSize||r.em||48,i=r.weight||r.fontWeight||"",s=r.style||r.fontStyle||"",o=[s,i,l].join(" ")+"px "+a,u=r.origin||"top";if(v.cache[a]&&l<=v.cache[a].em)return w(v.cache[a],u);var d=r.canvas||v.canvas,h=d.getContext("2d"),g={upper:r.upper!==void 0?r.upper:"H",lower:r.lower!==void 0?r.lower:"x",descent:r.descent!==void 0?r.descent:"p",ascent:r.ascent!==void 0?r.ascent:"h",tittle:r.tittle!==void 0?r.tittle:"i",overshoot:r.overshoot!==void 0?r.overshoot:"O"},m=Math.ceil(l*1.5);d.height=m,d.width=m*.5,h.font=o;var E="H",c={top:0};h.clearRect(0,0,m,m),h.textBaseline="top",h.fillStyle="black",h.fillText(E,0,0);var _=C(h.getImageData(0,0,m,m));h.clearRect(0,0,m,m),h.textBaseline="bottom",h.fillText(E,0,m);var T=C(h.getImageData(0,0,m,m));c.lineHeight=c.bottom=m-T+_,h.clearRect(0,0,m,m),h.textBaseline="alphabetic",h.fillText(E,0,m);var M=C(h.getImageData(0,0,m,m)),k=m-M-1+_;c.baseline=c.alphabetic=k,h.clearRect(0,0,m,m),h.textBaseline="middle",h.fillText(E,0,m*.5);var b=C(h.getImageData(0,0,m,m));c.median=c.middle=m-b-1+_-m*.5,h.clearRect(0,0,m,m),h.textBaseline="hanging",h.fillText(E,0,m*.5);var A=C(h.getImageData(0,0,m,m));c.hanging=m-A-1+_-m*.5,h.clearRect(0,0,m,m),h.textBaseline="ideographic",h.fillText(E,0,m);var y=C(h.getImageData(0,0,m,m));if(c.ideographic=m-y-1+_,g.upper&&(h.clearRect(0,0,m,m),h.textBaseline="top",h.fillText(g.upper,0,0),c.upper=C(h.getImageData(0,0,m,m)),c.capHeight=c.baseline-c.upper),g.lower&&(h.clearRect(0,0,m,m),h.textBaseline="top",h.fillText(g.lower,0,0),c.lower=C(h.getImageData(0,0,m,m)),c.xHeight=c.baseline-c.lower),g.tittle&&(h.clearRect(0,0,m,m),h.textBaseline="top",h.fillText(g.tittle,0,0),c.tittle=C(h.getImageData(0,0,m,m))),g.ascent&&(h.clearRect(0,0,m,m),h.textBaseline="top",h.fillText(g.ascent,0,0),c.ascent=C(h.getImageData(0,0,m,m))),g.descent&&(h.clearRect(0,0,m,m),h.textBaseline="top",h.fillText(g.descent,0,0),c.descent=P(h.getImageData(0,0,m,m))),g.overshoot){h.clearRect(0,0,m,m),h.textBaseline="top",h.fillText(g.overshoot,0,0);var f=P(h.getImageData(0,0,m,m));c.overshoot=f-k}for(var p in c)c[p]/=l;return c.em=l,v.cache[a]=c,w(c,u)}function w(t,r){var a={};typeof r=="string"&&(r=t[r]);for(var l in t)l!=="em"&&(a[l]=t[l]-r);return a}function C(t){for(var r=t.height,a=t.data,l=3;l<a.length;l+=4)if(a[l]!==0)return Math.floor((l-3)*.25/r)}function P(t){for(var r=t.height,a=t.data,l=a.length-1;l>0;l-=4)if(a[l]!==0)return Math.floor((l-3)*.25/r)}}}),wee=Ne({"node_modules/gl-text/dist.js"(te,Z){var v=hee(),w=n1(),C=dee(),P=vee(),t=zN(),r=Rb(),a=pee(),l=gee(),i=JS(),s=yee(),o=XN(),u=_ee(),d=xee(),h=Xd(),g=bee(),m=y3(),E=GN(),c=E.nextPow2,_=new t,T=!1;document.body&&(M=document.body.appendChild(document.createElement("div")),M.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(M).fontStretch&&(T=!0),document.body.removeChild(M));var M,k=function(y){b(y)?(y={regl:y},this.gl=y.regl._gl):this.gl=P(y),this.shader=_.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=y.regl||C({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(),_.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(y)?y:{})};k.prototype.createShader=function(){var y=this.regl,f=y({blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},stencil:{enable:!1},depth:{enable:!1},count:y.prop("count"),offset:y.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:y.this("sizeBuffer")},width:{offset:0,stride:8,buffer:y.this("sizeBuffer")},char:y.this("charBuffer"),position:y.this("position")},uniforms:{atlasSize:function(x,N){return[N.atlas.width,N.atlas.height]},atlasDim:function(x,N){return[N.atlas.cols,N.atlas.rows]},atlas:function(x,N){return N.atlas.texture},charStep:function(x,N){return N.atlas.step},em:function(x,N){return N.atlas.em},color:y.prop("color"),opacity:y.prop("opacity"),viewport:y.this("viewportArray"),scale:y.this("scale"),align:y.prop("align"),baseline:y.prop("baseline"),translate:y.this("translate"),positionOffset:y.prop("positionOffset")},primitive:"points",viewport:y.this("viewport"),vert:`
			precision highp float;
			attribute float width, charOffset, char;
			attribute vec2 position;
			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;
			}`}),p={};return{regl:y,draw:f,atlas:p}},k.prototype.update=function(y){var f=this;if(typeof y=="string")y={text:y};else if(!y)return;y=w(y,{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),y.opacity!=null&&(Array.isArray(y.opacity)?this.opacity=y.opacity.map(function(be){return parseFloat(be)}):this.opacity=parseFloat(y.opacity)),y.viewport!=null&&(this.viewport=i(y.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]),y.kerning!=null&&(this.kerning=y.kerning),y.offset!=null&&(typeof y.offset=="number"&&(y.offset=[y.offset,0]),this.positionOffset=m(y.offset)),y.direction&&(this.direction=y.direction),y.range&&(this.range=y.range,this.scale=[1/(y.range[2]-y.range[0]),1/(y.range[3]-y.range[1])],this.translate=[-y.range[0],-y.range[1]]),y.scale&&(this.scale=y.scale),y.translate&&(this.translate=y.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),!this.font.length&&!y.font&&(y.font=k.baseFontSize+"px sans-serif");var p=!1,x=!1;if(y.font&&(Array.isArray(y.font)?y.font:[y.font]).forEach(function(be,Ye){if(typeof be=="string")try{be=v.parse(be)}catch{be=v.parse(k.baseFontSize+"px "+be)}else{var yt=be.style,wt=be.weight,ht=be.stretch,Yt=be.variant;be=v.parse(v.stringify(be)),yt&&(be.style=yt),wt&&(be.weight=wt),ht&&(be.stretch=ht),Yt&&(be.variant=Yt)}var $t=v.stringify({size:k.baseFontSize,family:be.family,stretch:T?be.stretch:void 0,variant:be.variant,weight:be.weight,style:be.style}),fr=o(be.size),mr=Math.round(fr[0]*u(fr[1]));if(mr!==f.fontSize[Ye]&&(x=!0,f.fontSize[Ye]=mr),(!f.font[Ye]||$t!=f.font[Ye].baseString)&&(p=!0,f.font[Ye]=k.fonts[$t],!f.font[Ye])){var Ur=be.family.join(", "),jr=[be.style];be.style!=be.variant&&jr.push(be.variant),be.variant!=be.weight&&jr.push(be.weight),T&&be.weight!=be.stretch&&jr.push(be.stretch),f.font[Ye]={baseString:$t,family:Ur,weight:be.weight,stretch:be.stretch,style:be.style,variant:be.variant,width:{},kerning:{},metrics:g(Ur,{origin:"top",fontSize:k.baseFontSize,fontStyle:jr.join(" ")})},k.fonts[$t]=f.font[Ye]}}),(p||x)&&this.font.forEach(function(be,Ye){var yt=v.stringify({size:f.fontSize[Ye],family:be.family,stretch:T?be.stretch:void 0,variant:be.variant,weight:be.weight,style:be.style});if(f.fontAtlas[Ye]=f.shader.atlas[yt],!f.fontAtlas[Ye]){var wt=be.metrics;f.shader.atlas[yt]=f.fontAtlas[Ye]={fontString:yt,step:Math.ceil(f.fontSize[Ye]*wt.bottom*.5)*2,em:f.fontSize[Ye],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:f.regl.texture()}}y.text==null&&(y.text=f.text)}),typeof y.text=="string"&&y.position&&y.position.length>2){for(var N=Array(y.position.length*.5),D=0;D<N.length;D++)N[D]=y.text;y.text=N}var B;if(y.text!=null||p){if(this.textOffsets=[0],Array.isArray(y.text)){this.count=y.text[0].length,this.counts=[this.count];for(var U=1;U<y.text.length;U++)this.textOffsets[U]=this.textOffsets[U-1]+y.text[U-1].length,this.count+=y.text[U].length,this.counts.push(y.text[U].length);this.text=y.text.join("")}else this.text=y.text,this.count=this.text.length,this.counts=[this.count];B=[],this.font.forEach(function(be,Ye){k.atlasContext.font=be.baseString;for(var yt=f.fontAtlas[Ye],wt=0;wt<f.text.length;wt++){var ht=f.text.charAt(wt);if(yt.ids[ht]==null&&(yt.ids[ht]=yt.chars.length,yt.chars.push(ht),B.push(ht)),be.width[ht]==null&&(be.width[ht]=k.atlasContext.measureText(ht).width/k.baseFontSize,f.kerning)){var Yt=[];for(var $t in be.width)Yt.push($t+ht,ht+$t);h(be.kerning,d(be.family,{pairs:Yt}))}}})}if(y.position)if(y.position.length>2){for(var V=!y.position[0].length,q=l.mallocFloat(this.count*2),z=0,H=0;z<this.counts.length;z++){var G=this.counts[z];if(V)for(var J=0;J<G;J++)q[H++]=y.position[z*2],q[H++]=y.position[z*2+1];else for(var le=0;le<G;le++)q[H++]=y.position[z][0],q[H++]=y.position[z][1]}this.position.call?this.position({type:"float",data:q}):this.position=this.regl.buffer({type:"float",data:q}),l.freeFloat(q)}else this.position.destroy&&this.position.destroy(),this.position={constant:y.position};if(y.text||p){var ge=l.mallocUint8(this.count),de=l.mallocFloat(this.count*2);this.textWidth=[];for(var me=0,W=0;me<this.counts.length;me++){for(var ie=this.counts[me],se=this.font[me]||this.font[0],ee=this.fontAtlas[me]||this.fontAtlas[0],pe=0;pe<ie;pe++){var oe=this.text.charAt(W),Y=this.text.charAt(W-1);if(ge[W]=ee.ids[oe],de[W*2]=se.width[oe],pe){var ce=de[W*2-2],ue=de[W*2],_e=de[W*2-1],Le=_e+ce*.5+ue*.5;if(this.kerning){var ze=se.kerning[Y+oe];ze&&(Le+=ze*.001)}de[W*2+1]=Le}else de[W*2+1]=de[W*2]*.5;W++}this.textWidth.push(de.length?de[W*2-2]*.5+de[W*2-1]:0)}y.align||(y.align=this.align),this.charBuffer({data:ge,type:"uint8",usage:"stream"}),this.sizeBuffer({data:de,type:"float",usage:"stream"}),l.freeUint8(ge),l.freeFloat(de),B.length&&this.font.forEach(function(be,Ye){var yt=f.fontAtlas[Ye],wt=yt.step,ht=Math.floor(k.maxAtlasSize/wt),Yt=Math.min(ht,yt.chars.length),$t=Math.ceil(yt.chars.length/Yt),fr=c(Yt*wt),mr=c($t*wt);yt.width=fr,yt.height=mr,yt.rows=$t,yt.cols=Yt,yt.em&&yt.texture({data:a({canvas:k.atlasCanvas,font:yt.fontString,chars:yt.chars,shape:[fr,mr],step:[wt,wt]})})})}if(y.align&&(this.align=y.align,this.alignOffset=this.textWidth.map(function(be,Ye){var yt=Array.isArray(f.align)?f.align.length>1?f.align[Ye]:f.align[0]:f.align;if(typeof yt=="number")return yt;switch(yt){case"right":case"end":return-be;case"center":case"centre":case"middle":return-be*.5}return 0})),this.baseline==null&&y.baseline==null&&(y.baseline=0),y.baseline!=null&&(this.baseline=y.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(be,Ye){var yt=(f.font[Ye]||f.font[0]).metrics,wt=0;return wt+=yt.bottom*.5,typeof be=="number"?wt+=be-yt.baseline:wt+=-yt[be],wt*=-1,wt})),y.color!=null)if(y.color||(y.color="transparent"),typeof y.color=="string"||!isNaN(y.color))this.color=r(y.color,"uint8");else{var Xe;if(typeof y.color[0]=="number"&&y.color.length>this.counts.length){var Ve=y.color.length;Xe=l.mallocUint8(Ve);for(var rt=(y.color.subarray||y.color.slice).bind(y.color),mt=0;mt<Ve;mt+=4)Xe.set(r(rt(mt,mt+4),"uint8"),mt)}else{var _t=y.color.length;Xe=l.mallocUint8(_t*4);for(var vt=0;vt<_t;vt++)Xe.set(r(y.color[vt]||0,"uint8"),vt*4)}this.color=Xe}if(y.position||y.text||y.color||y.baseline||y.align||y.font||y.offset||y.opacity){var ut=this.color.length>4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2;if(ut){var Fe=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(Fe);for(var Pe=0;Pe<this.batch.length;Pe++)this.batch[Pe]={count:this.counts.length>1?this.counts[Pe]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[Pe]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(Pe*4,Pe*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[Pe]:this.opacity,baseline:this.baselineOffset[Pe]!=null?this.baselineOffset[Pe]:this.baselineOffset[0],align:this.align?this.alignOffset[Pe]!=null?this.alignOffset[Pe]:this.alignOffset[0]:0,atlas:this.fontAtlas[Pe]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(Pe*2,Pe*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=[]}},k.prototype.destroy=function(){},k.prototype.kerning=!0,k.prototype.position={constant:new Float32Array(2)},k.prototype.translate=null,k.prototype.scale=null,k.prototype.font=null,k.prototype.text="",k.prototype.positionOffset=[0,0],k.prototype.opacity=1,k.prototype.color=new Uint8Array([0,0,0,255]),k.prototype.alignOffset=[0,0],k.maxAtlasSize=1024,k.atlasCanvas=document.createElement("canvas"),k.atlasContext=k.atlasCanvas.getContext("2d",{alpha:!1}),k.baseFontSize=64,k.fonts={};function b(A){return typeof A=="function"&&A._gl&&A.prop&&A.texture&&A.buffer}Z.exports=k}}),Tee=Ne({"node_modules/@plotly/regl/dist/regl.unchecked.js"(te,Z){(function(v,w){typeof te=="object"&&typeof Z<"u"?Z.exports=w():v.createREGL=w()})(te,function(){var v=function(St,kr){for(var Dr=Object.keys(kr),Xn=0;Xn<Dr.length;++Xn)St[Dr[Xn]]=kr[Dr[Xn]];return St},w=0,C=0,P=5,t=6;function r(St,kr){this.id=w++,this.type=St,this.data=kr}function a(St){return St.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}function l(St){if(St.length===0)return[];var kr=St.charAt(0),Dr=St.charAt(St.length-1);if(St.length>1&&kr===Dr&&(kr==='"'||kr==="'"))return['"'+a(St.substr(1,St.length-2))+'"'];var Xn=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(St);if(Xn)return l(St.substr(0,Xn.index)).concat(l(Xn[1])).concat(l(St.substr(Xn.index+Xn[0].length)));var La=St.split(".");if(La.length===1)return['"'+a(St)+'"'];for(var Rn=[],Pn=0;Pn<La.length;++Pn)Rn=Rn.concat(l(La[Pn]));return Rn}function i(St){return"["+l(St).join("][")+"]"}function s(St,kr){return new r(St,i(kr+""))}function o(St){return typeof St=="function"&&!St._reglType||St instanceof r}function u(St,kr){if(typeof St=="function")return new r(C,St);if(typeof St=="number"||typeof St=="boolean")return new r(P,St);if(Array.isArray(St))return new r(t,St.map(function(Dr,Xn){return u(Dr)}));if(St instanceof r)return St}var d={DynamicVariable:r,define:s,isDynamic:o,unbox:u,accessor:i},h={next:typeof requestAnimationFrame=="function"?function(St){return requestAnimationFrame(St)}:function(St){return setTimeout(St,16)},cancel:typeof cancelAnimationFrame=="function"?function(St){return cancelAnimationFrame(St)}:clearTimeout},g=typeof performance<"u"&&performance.now?function(){return performance.now()}:function(){return+new Date};function m(){var St={"":0},kr=[""];return{id:function(Dr){var Xn=St[Dr];return Xn||(Xn=St[Dr]=kr.length,kr.push(Dr),Xn)},str:function(Dr){return kr[Dr]}}}function E(St,kr,Dr){var Xn=document.createElement("canvas");v(Xn.style,{border:0,margin:0,padding:0,top:0,left:0,width:"100%",height:"100%"}),St.appendChild(Xn),St===document.body&&(Xn.style.position="absolute",v(St.style,{margin:0,padding:0}));function La(){var ni=window.innerWidth,ti=window.innerHeight;if(St!==document.body){var ri=Xn.getBoundingClientRect();ni=ri.right-ri.left,ti=ri.bottom-ri.top}Xn.width=Dr*ni,Xn.height=Dr*ti}var Rn;St!==document.body&&typeof ResizeObserver=="function"?(Rn=new ResizeObserver(function(){setTimeout(La)}),Rn.observe(St)):window.addEventListener("resize",La,!1);function Pn(){Rn?Rn.disconnect():window.removeEventListener("resize",La),St.removeChild(Xn)}return La(),{canvas:Xn,onDestroy:Pn}}function c(St,kr){function Dr(Xn){try{return St.getContext(Xn,kr)}catch{return null}}return Dr("webgl")||Dr("experimental-webgl")||Dr("webgl-experimental")}function _(St){return typeof St.nodeName=="string"&&typeof St.appendChild=="function"&&typeof St.getBoundingClientRect=="function"}function T(St){return typeof St.drawArrays=="function"||typeof St.drawElements=="function"}function M(St){return typeof St=="string"?St.split():St}function k(St){return typeof St=="string"?document.querySelector(St):St}function b(St){var kr=St||{},Dr,Xn,La,Rn,Pn={},ni=[],ti=[],ri=typeof window>"u"?1:window.devicePixelRatio,gi=!1,io={},qi=function(yn){},di=function(){};if(typeof kr=="string"?Dr=document.querySelector(kr):typeof kr=="object"&&(_(kr)?Dr=kr:T(kr)?(Rn=kr,La=Rn.canvas):("gl"in kr?Rn=kr.gl:"canvas"in kr?La=k(kr.canvas):"container"in kr&&(Xn=k(kr.container)),"attributes"in kr&&(Pn=kr.attributes),"extensions"in kr&&(ni=M(kr.extensions)),"optionalExtensions"in kr&&(ti=M(kr.optionalExtensions)),"onDone"in kr&&(qi=kr.onDone),"profile"in kr&&(gi=!!kr.profile),"pixelRatio"in kr&&(ri=+kr.pixelRatio),"cachedCode"in kr&&(io=kr.cachedCode))),Dr&&(Dr.nodeName.toLowerCase()==="canvas"?La=Dr:Xn=Dr),!Rn){if(!La){var Na=E(Xn||document.body,qi,ri);if(!Na)return null;La=Na.canvas,di=Na.onDestroy}Pn.premultipliedAlpha===void 0&&(Pn.premultipliedAlpha=!0),Rn=c(La,Pn)}return Rn?{gl:Rn,canvas:La,container:Xn,extensions:ni,optionalExtensions:ti,pixelRatio:ri,profile:gi,cachedCode:io,onDone:qi,onDestroy:di}:(di(),qi("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function A(St,kr){var Dr={};function Xn(Pn){var ni=Pn.toLowerCase(),ti;try{ti=Dr[ni]=St.getExtension(ni)}catch{}return!!ti}for(var La=0;La<kr.extensions.length;++La){var Rn=kr.extensions[La];if(!Xn(Rn))return kr.onDestroy(),kr.onDone('"'+Rn+'" extension is not supported by the current WebGL context, try upgrading your system or a different browser'),null}return kr.optionalExtensions.forEach(Xn),{extensions:Dr,restore:function(){Object.keys(Dr).forEach(function(Pn){if(Dr[Pn]&&!Xn(Pn))throw new Error("(regl): error restoring extension "+Pn)})}}}function y(St,kr){for(var Dr=Array(St),Xn=0;Xn<St;++Xn)Dr[Xn]=kr(Xn);return Dr}var f=5120,p=5121,x=5122,N=5123,D=5124,B=5125,U=5126;function V(St){for(var kr=16;kr<=1<<28;kr*=16)if(St<=kr)return kr;return 0}function q(St){var kr,Dr;return kr=(St>65535)<<4,St>>>=kr,Dr=(St>255)<<3,St>>>=Dr,kr|=Dr,Dr=(St>15)<<2,St>>>=Dr,kr|=Dr,Dr=(St>3)<<1,St>>>=Dr,kr|=Dr,kr|St>>1}function z(){var St=y(8,function(){return[]});function kr(Rn){var Pn=V(Rn),ni=St[q(Pn)>>2];return ni.length>0?ni.pop():new ArrayBuffer(Pn)}function Dr(Rn){St[q(Rn.byteLength)>>2].push(Rn)}function Xn(Rn,Pn){var ni=null;switch(Rn){case f:ni=new Int8Array(kr(Pn),0,Pn);break;case p:ni=new Uint8Array(kr(Pn),0,Pn);break;case x:ni=new Int16Array(kr(2*Pn),0,Pn);break;case N:ni=new Uint16Array(kr(2*Pn),0,Pn);break;case D:ni=new Int32Array(kr(4*Pn),0,Pn);break;case B:ni=new Uint32Array(kr(4*Pn),0,Pn);break;case U:ni=new Float32Array(kr(4*Pn),0,Pn);break;default:return null}return ni.length!==Pn?ni.subarray(0,Pn):ni}function La(Rn){Dr(Rn.buffer)}return{alloc:kr,free:Dr,allocType:Xn,freeType:La}}var H=z();H.zero=z();var G=3408,J=3410,le=3411,ge=3412,de=3413,me=3414,W=3415,ie=33901,se=33902,ee=3379,pe=3386,oe=34921,Y=36347,ce=36348,ue=35661,_e=35660,Le=34930,ze=36349,Xe=34076,Ve=34024,rt=7936,mt=7937,_t=7938,vt=35724,ut=34047,Fe=36063,Pe=34852,be=3553,Ye=34067,yt=34069,wt=33984,ht=6408,Yt=5126,$t=5121,fr=36160,mr=36053,Ur=36064,jr=16384,fn=function(St,kr){var Dr=1;kr.ext_texture_filter_anisotropic&&(Dr=St.getParameter(ut));var Xn=1,La=1;kr.webgl_draw_buffers&&(Xn=St.getParameter(Pe),La=St.getParameter(Fe));var Rn=!!kr.oes_texture_float;if(Rn){var Pn=St.createTexture();St.bindTexture(be,Pn),St.texImage2D(be,0,ht,1,1,0,ht,Yt,null);var ni=St.createFramebuffer();if(St.bindFramebuffer(fr,ni),St.framebufferTexture2D(fr,Ur,be,Pn,0),St.bindTexture(be,null),St.checkFramebufferStatus(fr)!==mr)Rn=!1;else{St.viewport(0,0,1,1),St.clearColor(1,0,0,1),St.clear(jr);var ti=H.allocType(Yt,4);St.readPixels(0,0,1,1,ht,Yt,ti),St.getError()?Rn=!1:(St.deleteFramebuffer(ni),St.deleteTexture(Pn),Rn=ti[0]===1),H.freeType(ti)}}var ri=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),gi=!0;if(!ri){var io=St.createTexture(),qi=H.allocType($t,36);St.activeTexture(wt),St.bindTexture(Ye,io),St.texImage2D(yt,0,ht,3,3,0,ht,$t,qi),H.freeType(qi),St.bindTexture(Ye,null),St.deleteTexture(io),gi=!St.getError()}return{colorBits:[St.getParameter(J),St.getParameter(le),St.getParameter(ge),St.getParameter(de)],depthBits:St.getParameter(me),stencilBits:St.getParameter(W),subpixelBits:St.getParameter(G),extensions:Object.keys(kr).filter(function(di){return!!kr[di]}),maxAnisotropic:Dr,maxDrawbuffers:Xn,maxColorAttachments:La,pointSizeDims:St.getParameter(ie),lineWidthDims:St.getParameter(se),maxViewportDims:St.getParameter(pe),maxCombinedTextureUnits:St.getParameter(ue),maxCubeMapSize:St.getParameter(Xe),maxRenderbufferSize:St.getParameter(Ve),maxTextureUnits:St.getParameter(Le),maxTextureSize:St.getParameter(ee),maxAttributes:St.getParameter(oe),maxVertexUniforms:St.getParameter(Y),maxVertexTextureUnits:St.getParameter(_e),maxVaryingVectors:St.getParameter(ce),maxFragmentUniforms:St.getParameter(ze),glsl:St.getParameter(vt),renderer:St.getParameter(mt),vendor:St.getParameter(rt),version:St.getParameter(_t),readFloat:Rn,npotTextureCube:gi}},Br=function(St){return St instanceof Uint8Array||St instanceof Uint16Array||St instanceof Uint32Array||St instanceof Int8Array||St instanceof Int16Array||St instanceof Int32Array||St instanceof Float32Array||St instanceof Float64Array||St instanceof Uint8ClampedArray};function Qr(St){return!!St&&typeof St=="object"&&Array.isArray(St.shape)&&Array.isArray(St.stride)&&typeof St.offset=="number"&&St.shape.length===St.stride.length&&(Array.isArray(St.data)||Br(St.data))}var Ot=function(St){return Object.keys(St).map(function(kr){return St[kr]})},$e={shape:tt,flatten:Ie};function ot(St,kr,Dr){for(var Xn=0;Xn<kr;++Xn)Dr[Xn]=St[Xn]}function De(St,kr,Dr,Xn){for(var La=0,Rn=0;Rn<kr;++Rn)for(var Pn=St[Rn],ni=0;ni<Dr;++ni)Xn[La++]=Pn[ni]}function Ee(St,kr,Dr,Xn,La,Rn){for(var Pn=Rn,ni=0;ni<kr;++ni)for(var ti=St[ni],ri=0;ri<Dr;++ri)for(var gi=ti[ri],io=0;io<Xn;++io)La[Pn++]=gi[io]}function Ae(St,kr,Dr,Xn,La){for(var Rn=1,Pn=Dr+1;Pn<kr.length;++Pn)Rn*=kr[Pn];var ni=kr[Dr];if(kr.length-Dr===4){var ti=kr[Dr+1],ri=kr[Dr+2],gi=kr[Dr+3];for(Pn=0;Pn<ni;++Pn)Ee(St[Pn],ti,ri,gi,Xn,La),La+=Rn}else for(Pn=0;Pn<ni;++Pn)Ae(St[Pn],kr,Dr+1,Xn,La),La+=Rn}function Ie(St,kr,Dr,Xn){var La=1;if(kr.length)for(var Rn=0;Rn<kr.length;++Rn)La*=kr[Rn];else La=0;var Pn=Xn||H.allocType(Dr,La);switch(kr.length){case 0:break;case 1:ot(St,kr[0],Pn);break;case 2:De(St,kr[0],kr[1],Pn);break;case 3:Ee(St,kr[0],kr[1],kr[2],Pn,0);break;default:Ae(St,kr,0,Pn,0)}return Pn}function tt(St){for(var kr=[],Dr=St;Dr.length;Dr=Dr[0])kr.push(Dr.length);return kr}var st={"[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},Bt=5120,Ft=5122,Wt=5124,lr=5121,Rr=5123,Mr=5125,Sr=5126,Kr=5126,Hn={int8:Bt,int16:Ft,int32:Wt,uint8:lr,uint16:Rr,uint32:Mr,float:Sr,float32:Kr},ga=35048,ua=35040,Ta={dynamic:ga,stream:ua,static:35044},Aa=$e.flatten,ia=$e.shape,$a=35044,ci=35040,_r=5121,Qt=5126,yr=[];yr[5120]=1,yr[5122]=2,yr[5124]=4,yr[5121]=1,yr[5123]=2,yr[5125]=4,yr[5126]=4;function br(St){return st[Object.prototype.toString.call(St)]|0}function an(St,kr){for(var Dr=0;Dr<kr.length;++Dr)St[Dr]=kr[Dr]}function wn(St,kr,Dr,Xn,La,Rn,Pn){for(var ni=0,ti=0;ti<Dr;++ti)for(var ri=0;ri<Xn;++ri)St[ni++]=kr[La*ti+Rn*ri+Pn]}function Ln(St,kr,Dr,Xn){var La=0,Rn={};function Pn(yn){this.id=La++,this.buffer=St.createBuffer(),this.type=yn,this.usage=$a,this.byteLength=0,this.dimension=1,this.dtype=_r,this.persistentData=null,Dr.profile&&(this.stats={size:0})}Pn.prototype.bind=function(){St.bindBuffer(this.type,this.buffer)},Pn.prototype.destroy=function(){qi(this)};var ni=[];function ti(yn,ra){var wa=ni.pop();return wa||(wa=new Pn(yn)),wa.bind(),io(wa,ra,ci,0,1,!1),wa}function ri(yn){ni.push(yn)}function gi(yn,ra,wa){yn.byteLength=ra.byteLength,St.bufferData(yn.type,ra,wa)}function io(yn,ra,wa,Fa,Sa,zi){var li;if(yn.usage=wa,Array.isArray(ra)){if(yn.dtype=Fa||Qt,ra.length>0){var eo;if(Array.isArray(ra[0])){li=ia(ra);for(var Ea=1,pa=1;pa<li.length;++pa)Ea*=li[pa];yn.dimension=Ea,eo=Aa(ra,li,yn.dtype),gi(yn,eo,wa),zi?yn.persistentData=eo:H.freeType(eo)}else if(typeof ra[0]=="number"){yn.dimension=Sa;var ki=H.allocType(yn.dtype,ra.length);an(ki,ra),gi(yn,ki,wa),zi?yn.persistentData=ki:H.freeType(ki)}else Br(ra[0])&&(yn.dimension=ra[0].length,yn.dtype=Fa||br(ra[0])||Qt,eo=Aa(ra,[ra.length,ra[0].length],yn.dtype),gi(yn,eo,wa),zi?yn.persistentData=eo:H.freeType(eo))}}else if(Br(ra))yn.dtype=Fa||br(ra),yn.dimension=Sa,gi(yn,ra,wa),zi&&(yn.persistentData=new Uint8Array(new Uint8Array(ra.buffer)));else if(Qr(ra)){li=ra.shape;var Jn=ra.stride,_i=ra.offset,ai=0,no=0,Xo=0,Vi=0;li.length===1?(ai=li[0],no=1,Xo=Jn[0],Vi=0):li.length===2&&(ai=li[0],no=li[1],Xo=Jn[0],Vi=Jn[1]),yn.dtype=Fa||br(ra.data)||Qt,yn.dimension=no;var lo=H.allocType(yn.dtype,ai*no);wn(lo,ra.data,ai,no,Xo,Vi,_i),gi(yn,lo,wa),zi?yn.persistentData=lo:H.freeType(lo)}else ra instanceof ArrayBuffer&&(yn.dtype=_r,yn.dimension=Sa,gi(yn,ra,wa),zi&&(yn.persistentData=new Uint8Array(new Uint8Array(ra))))}function qi(yn){kr.bufferCount--,Xn(yn);var ra=yn.buffer;St.deleteBuffer(ra),yn.buffer=null,delete Rn[yn.id]}function di(yn,ra,wa,Fa){kr.bufferCount++;var Sa=new Pn(ra);Rn[Sa.id]=Sa;function zi(Ea){var pa=$a,ki=null,Jn=0,_i=0,ai=1;return Array.isArray(Ea)||Br(Ea)||Qr(Ea)||Ea instanceof ArrayBuffer?ki=Ea:typeof Ea=="number"?Jn=Ea|0:Ea&&("data"in Ea&&(ki=Ea.data),"usage"in Ea&&(pa=Ta[Ea.usage]),"type"in Ea&&(_i=Hn[Ea.type]),"dimension"in Ea&&(ai=Ea.dimension|0),"length"in Ea&&(Jn=Ea.length|0)),Sa.bind(),ki?io(Sa,ki,pa,_i,ai,Fa):(Jn&&St.bufferData(Sa.type,Jn,pa),Sa.dtype=_i||_r,Sa.usage=pa,Sa.dimension=ai,Sa.byteLength=Jn),Dr.profile&&(Sa.stats.size=Sa.byteLength*yr[Sa.dtype]),zi}function li(Ea,pa){St.bufferSubData(Sa.type,pa,Ea)}function eo(Ea,pa){var ki=(pa||0)|0,Jn;if(Sa.bind(),Br(Ea)||Ea instanceof ArrayBuffer)li(Ea,ki);else if(Array.isArray(Ea)){if(Ea.length>0){if(typeof Ea[0]=="number"){var _i=H.allocType(Sa.dtype,Ea.length);an(_i,Ea),li(_i,ki),H.freeType(_i)}else if(Array.isArray(Ea[0])||Br(Ea[0])){Jn=ia(Ea);var ai=Aa(Ea,Jn,Sa.dtype);li(ai,ki),H.freeType(ai)}}}else if(Qr(Ea)){Jn=Ea.shape;var no=Ea.stride,Xo=0,Vi=0,lo=0,pi=0;Jn.length===1?(Xo=Jn[0],Vi=1,lo=no[0],pi=0):Jn.length===2&&(Xo=Jn[0],Vi=Jn[1],lo=no[0],pi=no[1]);var Uo=Array.isArray(Ea.data)?Sa.dtype:br(Ea.data),ns=H.allocType(Uo,Xo*Vi);wn(ns,Ea.data,Xo,Vi,lo,pi,Ea.offset),li(ns,ki),H.freeType(ns)}return zi}return wa||zi(yn),zi._reglType="buffer",zi._buffer=Sa,zi.subdata=eo,Dr.profile&&(zi.stats=Sa.stats),zi.destroy=function(){qi(Sa)},zi}function Na(){Ot(Rn).forEach(function(yn){yn.buffer=St.createBuffer(),St.bindBuffer(yn.type,yn.buffer),St.bufferData(yn.type,yn.persistentData||yn.byteLength,yn.usage)})}return Dr.profile&&(kr.getTotalBufferSize=function(){var yn=0;return Object.keys(Rn).forEach(function(ra){yn+=Rn[ra].stats.size}),yn}),{create:di,createStream:ti,destroyStream:ri,clear:function(){Ot(Rn).forEach(qi),ni.forEach(qi)},getBuffer:function(yn){return yn&&yn._buffer instanceof Pn?yn._buffer:null},restore:Na,_initBuffer:io}}var Bn=0,xa=0,za=1,Ia=1,Ba=4,Ka=4,fa={points:Bn,point:xa,lines:za,line:Ia,triangles:Ba,triangle:Ka,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Bi=0,Yi=1,Ht=4,kt=5120,qr=5121,en=5122,rn=5123,Wr=5124,tn=5125,Tn=34963,dn=35040,It=35044;function xr(St,kr,Dr,Xn){var La={},Rn=0,Pn={uint8:qr,uint16:rn};kr.oes_element_index_uint&&(Pn.uint32=tn);function ni(Na){this.id=Rn++,La[this.id]=this,this.buffer=Na,this.primType=Ht,this.vertCount=0,this.type=0}ni.prototype.bind=function(){this.buffer.bind()};var ti=[];function ri(Na){var yn=ti.pop();return yn||(yn=new ni(Dr.create(null,Tn,!0,!1)._buffer)),io(yn,Na,dn,-1,-1,0,0),yn}function gi(Na){ti.push(Na)}function io(Na,yn,ra,wa,Fa,Sa,zi){Na.buffer.bind();var li;if(yn){var eo=zi;!zi&&(!Br(yn)||Qr(yn)&&!Br(yn.data))&&(eo=kr.oes_element_index_uint?tn:rn),Dr._initBuffer(Na.buffer,yn,ra,eo,3)}else St.bufferData(Tn,Sa,ra),Na.buffer.dtype=li||qr,Na.buffer.usage=ra,Na.buffer.dimension=3,Na.buffer.byteLength=Sa;if(li=zi,!zi){switch(Na.buffer.dtype){case qr:case kt:li=qr;break;case rn:case en:li=rn;break;case tn:case Wr:li=tn;break}Na.buffer.dtype=li}Na.type=li;var Ea=Fa;Ea<0&&(Ea=Na.buffer.byteLength,li===rn?Ea>>=1:li===tn&&(Ea>>=2)),Na.vertCount=Ea;var pa=wa;if(wa<0){pa=Ht;var ki=Na.buffer.dimension;ki===1&&(pa=Bi),ki===2&&(pa=Yi),ki===3&&(pa=Ht)}Na.primType=pa}function qi(Na){Xn.elementsCount--,delete La[Na.id],Na.buffer.destroy(),Na.buffer=null}function di(Na,yn){var ra=Dr.create(null,Tn,!0),wa=new ni(ra._buffer);Xn.elementsCount++;function Fa(Sa){if(!Sa)ra(),wa.primType=Ht,wa.vertCount=0,wa.type=qr;else if(typeof Sa=="number")ra(Sa),wa.primType=Ht,wa.vertCount=Sa|0,wa.type=qr;else{var zi=null,li=It,eo=-1,Ea=-1,pa=0,ki=0;Array.isArray(Sa)||Br(Sa)||Qr(Sa)?zi=Sa:("data"in Sa&&(zi=Sa.data),"usage"in Sa&&(li=Ta[Sa.usage]),"primitive"in Sa&&(eo=fa[Sa.primitive]),"count"in Sa&&(Ea=Sa.count|0),"type"in Sa&&(ki=Pn[Sa.type]),"length"in Sa?pa=Sa.length|0:(pa=Ea,ki===rn||ki===en?pa*=2:(ki===tn||ki===Wr)&&(pa*=4))),io(wa,zi,li,eo,Ea,pa,ki)}return Fa}return Fa(Na),Fa._reglType="elements",Fa._elements=wa,Fa.subdata=function(Sa,zi){return ra.subdata(Sa,zi),Fa},Fa.destroy=function(){qi(wa)},Fa}return{create:di,createStream:ri,destroyStream:gi,getElements:function(Na){return typeof Na=="function"&&Na._elements instanceof ni?Na._elements:null},clear:function(){Ot(La).forEach(qi)}}}var Yr=new Float32Array(1),An=new Uint32Array(Yr.buffer),Zn=5123;function sa(St){for(var kr=H.allocType(Zn,St.length),Dr=0;Dr<St.length;++Dr)if(isNaN(St[Dr]))kr[Dr]=65535;else if(St[Dr]===1/0)kr[Dr]=31744;else if(St[Dr]===-1/0)kr[Dr]=64512;else{Yr[0]=St[Dr];var Xn=An[0],La=Xn>>>31<<15,Rn=(Xn<<1>>>24)-127,Pn=Xn>>13&1023;if(Rn<-24)kr[Dr]=La;else if(Rn<-14){var ni=-14-Rn;kr[Dr]=La+(Pn+1024>>ni)}else Rn>15?kr[Dr]=La+31744:kr[Dr]=La+(Rn+15<<10)+Pn}return kr}function oa(St){return Array.isArray(St)||Br(St)}var Sn=34467,Kn=3553,Ui=34067,Za=34069,Ki=6408,ho=6406,Co=6407,So=6409,Vo=6410,Oi=32854,ps=32855,as=36194,rl=32819,As=32820,hs=33635,ts=34042,nl=6402,Qs=34041,_l=35904,Ss=35906,ls=36193,Oo=33776,Es=33777,xl=33778,Ul=33779,Hl=35986,Fs=35987,Ni=34798,wo=35840,ql=35841,Gs=35842,Jo=35843,Gl=36196,al=5121,bl=5123,Iu=5125,_o=5126,Ps=10242,ms=10243,ru=10497,nu=33071,Zo=33648,_u=10240,Au=10241,Ys=9728,Ol=9729,$l=9984,Ql=9985,ac=9986,Tf=9987,rf=33170,df=4352,Zh=4353,zh=4354,zl=34046,Vc=3317,$h=37440,pc=37441,ic=37443,mc=37444,vf=33984,uu=[$l,ac,Ql,Tf],oc=[0,So,Vo,Co,Ki],el={};el[So]=el[ho]=el[nl]=1,el[Qs]=el[Vo]=2,el[Co]=el[_l]=3,el[Ki]=el[Ss]=4;function Xl(St){return"[object "+St+"]"}var zf=Xl("HTMLCanvasElement"),Lc=Xl("OffscreenCanvas"),$f=Xl("CanvasRenderingContext2D"),xu=Xl("ImageBitmap"),Wd=Xl("HTMLImageElement"),Zs=Xl("HTMLVideoElement"),dv=Object.keys(st).concat([zf,Lc,$f,xu,Wd,Zs]),Ml=[];Ml[al]=1,Ml[_o]=4,Ml[ls]=2,Ml[bl]=2,Ml[Iu]=4;var Ko=[];Ko[Oi]=2,Ko[ps]=2,Ko[as]=2,Ko[Qs]=4,Ko[Oo]=.5,Ko[Es]=.5,Ko[xl]=1,Ko[Ul]=1,Ko[Hl]=.5,Ko[Fs]=1,Ko[Ni]=1,Ko[wo]=.5,Ko[ql]=.25,Ko[Gs]=.5,Ko[Jo]=.25,Ko[Gl]=.5;function ph(St){return Array.isArray(St)&&(St.length===0||typeof St[0]=="number")}function pf(St){if(!Array.isArray(St))return!1;var kr=St.length;return!(kr===0||!oa(St[0]))}function Yu(St){return Object.prototype.toString.call(St)}function Kh(St){return Yu(St)===zf}function Kf(St){return Yu(St)===Lc}function Ah(St){return Yu(St)===$f}function sc(St){return Yu(St)===xu}function Ld(St){return Yu(St)===Wd}function sd(St){return Yu(St)===Zs}function Sh(St){if(!St)return!1;var kr=Yu(St);return dv.indexOf(kr)>=0?!0:ph(St)||pf(St)||Qr(St)}function Jf(St){return st[Object.prototype.toString.call(St)]|0}function Jh(St,kr){var Dr=kr.length;switch(St.type){case al:case bl:case Iu:case _o:var Xn=H.allocType(St.type,Dr);Xn.set(kr),St.data=Xn;break;case ls:St.data=sa(kr);break}}function Qh(St,kr){return H.allocType(St.type===ls?_o:St.type,kr)}function mf(St,kr){St.type===ls?(St.data=sa(kr),H.freeType(kr)):St.data=kr}function ld(St,kr,Dr,Xn,La,Rn){for(var Pn=St.width,ni=St.height,ti=St.channels,ri=Pn*ni*ti,gi=Qh(St,ri),io=0,qi=0;qi<ni;++qi)for(var di=0;di<Pn;++di)for(var Na=0;Na<ti;++Na)gi[io++]=kr[Dr*di+Xn*qi+La*Na+Rn];mf(St,gi)}function Nf(St,kr,Dr,Xn,La,Rn){var Pn;if(typeof Ko[St]<"u"?Pn=Ko[St]:Pn=el[St]*Ml[kr],Rn&&(Pn*=6),La){for(var ni=0,ti=Dr;ti>=1;)ni+=Pn*ti*ti,ti/=2;return ni}else return Pn*Dr*Xn}function Af(St,kr,Dr,Xn,La,Rn,Pn){var ni={"don't care":df,"dont care":df,nice:zh,fast:Zh},ti={repeat:ru,clamp:nu,mirror:Zo},ri={nearest:Ys,linear:Ol},gi=v({mipmap:Tf,"nearest mipmap nearest":$l,"linear mipmap nearest":Ql,"nearest mipmap linear":ac,"linear mipmap linear":Tf},ri),io={none:0,browser:mc},qi={uint8:al,rgba4:rl,rgb565:hs,"rgb5 a1":As},di={alpha:ho,luminance:So,"luminance alpha":Vo,rgb:Co,rgba:Ki,rgba4:Oi,"rgb5 a1":ps,rgb565:as},Na={};kr.ext_srgb&&(di.srgb=_l,di.srgba=Ss),kr.oes_texture_float&&(qi.float32=qi.float=_o),kr.oes_texture_half_float&&(qi.float16=qi["half float"]=ls),kr.webgl_depth_texture&&(v(di,{depth:nl,"depth stencil":Qs}),v(qi,{uint16:bl,uint32:Iu,"depth stencil":ts})),kr.webgl_compressed_texture_s3tc&&v(Na,{"rgb s3tc dxt1":Oo,"rgba s3tc dxt1":Es,"rgba s3tc dxt3":xl,"rgba s3tc dxt5":Ul}),kr.webgl_compressed_texture_atc&&v(Na,{"rgb atc":Hl,"rgba atc explicit alpha":Fs,"rgba atc interpolated alpha":Ni}),kr.webgl_compressed_texture_pvrtc&&v(Na,{"rgb pvrtc 4bppv1":wo,"rgb pvrtc 2bppv1":ql,"rgba pvrtc 4bppv1":Gs,"rgba pvrtc 2bppv1":Jo}),kr.webgl_compressed_texture_etc1&&(Na["rgb etc1"]=Gl);var yn=Array.prototype.slice.call(St.getParameter(Sn));Object.keys(Na).forEach(function(X){var ye=Na[X];yn.indexOf(ye)>=0&&(di[X]=ye)});var ra=Object.keys(di);Dr.textureFormats=ra;var wa=[];Object.keys(di).forEach(function(X){var ye=di[X];wa[ye]=X});var Fa=[];Object.keys(qi).forEach(function(X){var ye=qi[X];Fa[ye]=X});var Sa=[];Object.keys(ri).forEach(function(X){var ye=ri[X];Sa[ye]=X});var zi=[];Object.keys(gi).forEach(function(X){var ye=gi[X];zi[ye]=X});var li=[];Object.keys(ti).forEach(function(X){var ye=ti[X];li[ye]=X});var eo=ra.reduce(function(X,ye){var ne=di[ye];return ne===So||ne===ho||ne===So||ne===Vo||ne===nl||ne===Qs||kr.ext_srgb&&(ne===_l||ne===Ss)?X[ne]=ne:ne===ps||ye.indexOf("rgba")>=0?X[ne]=Ki:X[ne]=Co,X},{});function Ea(){this.internalformat=Ki,this.format=Ki,this.type=al,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=mc,this.width=0,this.height=0,this.channels=0}function pa(X,ye){X.internalformat=ye.internalformat,X.format=ye.format,X.type=ye.type,X.compressed=ye.compressed,X.premultiplyAlpha=ye.premultiplyAlpha,X.flipY=ye.flipY,X.unpackAlignment=ye.unpackAlignment,X.colorSpace=ye.colorSpace,X.width=ye.width,X.height=ye.height,X.channels=ye.channels}function ki(X,ye){if(!(typeof ye!="object"||!ye)){if("premultiplyAlpha"in ye&&(X.premultiplyAlpha=ye.premultiplyAlpha),"flipY"in ye&&(X.flipY=ye.flipY),"alignment"in ye&&(X.unpackAlignment=ye.alignment),"colorSpace"in ye&&(X.colorSpace=io[ye.colorSpace]),"type"in ye){var ne=ye.type;X.type=qi[ne]}var Se=X.width,Je=X.height,xt=X.channels,At=!1;"shape"in ye?(Se=ye.shape[0],Je=ye.shape[1],ye.shape.length===3&&(xt=ye.shape[2],At=!0)):("radius"in ye&&(Se=Je=ye.radius),"width"in ye&&(Se=ye.width),"height"in ye&&(Je=ye.height),"channels"in ye&&(xt=ye.channels,At=!0)),X.width=Se|0,X.height=Je|0,X.channels=xt|0;var it=!1;if("format"in ye){var pt=ye.format,Rt=X.internalformat=di[pt];X.format=eo[Rt],pt in qi&&("type"in ye||(X.type=qi[pt])),pt in Na&&(X.compressed=!0),it=!0}!At&&it?X.channels=el[X.format]:At&&!it&&X.channels!==oc[X.format]&&(X.format=X.internalformat=oc[X.channels])}}function Jn(X){St.pixelStorei($h,X.flipY),St.pixelStorei(pc,X.premultiplyAlpha),St.pixelStorei(ic,X.colorSpace),St.pixelStorei(Vc,X.unpackAlignment)}function _i(){Ea.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function ai(X,ye){var ne=null;if(Sh(ye)?ne=ye:ye&&(ki(X,ye),"x"in ye&&(X.xOffset=ye.x|0),"y"in ye&&(X.yOffset=ye.y|0),Sh(ye.data)&&(ne=ye.data)),ye.copy){var Se=La.viewportWidth,Je=La.viewportHeight;X.width=X.width||Se-X.xOffset,X.height=X.height||Je-X.yOffset,X.needsCopy=!0}else if(!ne)X.width=X.width||1,X.height=X.height||1,X.channels=X.channels||4;else if(Br(ne))X.channels=X.channels||4,X.data=ne,!("type"in ye)&&X.type===al&&(X.type=Jf(ne));else if(ph(ne))X.channels=X.channels||4,Jh(X,ne),X.alignment=1,X.needsFree=!0;else if(Qr(ne)){var xt=ne.data;!Array.isArray(xt)&&X.type===al&&(X.type=Jf(xt));var At=ne.shape,it=ne.stride,pt,Rt,or,er,ur,gr;At.length===3?(or=At[2],gr=it[2]):(or=1,gr=1),pt=At[0],Rt=At[1],er=it[0],ur=it[1],X.alignment=1,X.width=pt,X.height=Rt,X.channels=or,X.format=X.internalformat=oc[or],X.needsFree=!0,ld(X,xt,er,ur,gr,ne.offset)}else if(Kh(ne)||Kf(ne)||Ah(ne))Kh(ne)||Kf(ne)?X.element=ne:X.element=ne.canvas,X.width=X.element.width,X.height=X.element.height,X.channels=4;else if(sc(ne))X.element=ne,X.width=ne.width,X.height=ne.height,X.channels=4;else if(Ld(ne))X.element=ne,X.width=ne.naturalWidth,X.height=ne.naturalHeight,X.channels=4;else if(sd(ne))X.element=ne,X.width=ne.videoWidth,X.height=ne.videoHeight,X.channels=4;else if(pf(ne)){var vr=X.width||ne[0].length,Zt=X.height||ne.length,ar=X.channels;oa(ne[0][0])?ar=ar||ne[0][0].length:ar=ar||1;for(var tr=$e.shape(ne),Zr=1,un=0;un<tr.length;++un)Zr*=tr[un];var En=Qh(X,Zr);$e.flatten(ne,tr,"",En),mf(X,En),X.alignment=1,X.width=vr,X.height=Zt,X.channels=ar,X.format=X.internalformat=oc[ar],X.needsFree=!0}X.type===_o||X.type}function no(X,ye,ne){var Se=X.element,Je=X.data,xt=X.internalformat,At=X.format,it=X.type,pt=X.width,Rt=X.height;Jn(X),Se?St.texImage2D(ye,ne,At,At,it,Se):X.compressed?St.compressedTexImage2D(ye,ne,xt,pt,Rt,0,Je):X.needsCopy?(Xn(),St.copyTexImage2D(ye,ne,At,X.xOffset,X.yOffset,pt,Rt,0)):St.texImage2D(ye,ne,At,pt,Rt,0,At,it,Je||null)}function Xo(X,ye,ne,Se,Je){var xt=X.element,At=X.data,it=X.internalformat,pt=X.format,Rt=X.type,or=X.width,er=X.height;Jn(X),xt?St.texSubImage2D(ye,Je,ne,Se,pt,Rt,xt):X.compressed?St.compressedTexSubImage2D(ye,Je,ne,Se,it,or,er,At):X.needsCopy?(Xn(),St.copyTexSubImage2D(ye,Je,ne,Se,X.xOffset,X.yOffset,or,er)):St.texSubImage2D(ye,Je,ne,Se,or,er,pt,Rt,At)}var Vi=[];function lo(){return Vi.pop()||new _i}function pi(X){X.needsFree&&H.freeType(X.data),_i.call(X),Vi.push(X)}function Uo(){Ea.call(this),this.genMipmaps=!1,this.mipmapHint=df,this.mipmask=0,this.images=Array(16)}function ns(X,ye,ne){var Se=X.images[0]=lo();X.mipmask=1,Se.width=X.width=ye,Se.height=X.height=ne,Se.channels=X.channels=4}function ds(X,ye){var ne=null;if(Sh(ye))ne=X.images[0]=lo(),pa(ne,X),ai(ne,ye),X.mipmask=1;else if(ki(X,ye),Array.isArray(ye.mipmap))for(var Se=ye.mipmap,Je=0;Je<Se.length;++Je)ne=X.images[Je]=lo(),pa(ne,X),ne.width>>=Je,ne.height>>=Je,ai(ne,Se[Je]),X.mipmask|=1<<Je;else ne=X.images[0]=lo(),pa(ne,X),ai(ne,ye),X.mipmask=1;pa(X,X.images[0]),X.compressed&&(X.internalformat===Oo||X.internalformat===Es||X.internalformat===xl||X.internalformat)}function wl(X,ye){for(var ne=X.images,Se=0;Se<ne.length;++Se){if(!ne[Se])return;no(ne[Se],ye,Se)}}var vs=[];function zu(){var X=vs.pop()||new Uo;Ea.call(X),X.mipmask=0;for(var ye=0;ye<16;++ye)X.images[ye]=null;return X}function cl(X){for(var ye=X.images,ne=0;ne<ye.length;++ne)ye[ne]&&pi(ye[ne]),ye[ne]=null;vs.push(X)}function Mu(){this.minFilter=Ys,this.magFilter=Ys,this.wrapS=nu,this.wrapT=nu,this.anisotropic=1,this.genMipmaps=!1,this.mipmapHint=df}function Zu(X,ye){if("min"in ye){var ne=ye.min;X.minFilter=gi[ne],uu.indexOf(X.minFilter)>=0&&!("faces"in ye)&&(X.genMipmaps=!0)}if("mag"in ye){var Se=ye.mag;X.magFilter=ri[Se]}var Je=X.wrapS,xt=X.wrapT;if("wrap"in ye){var At=ye.wrap;typeof At=="string"?Je=xt=ti[At]:Array.isArray(At)&&(Je=ti[At[0]],xt=ti[At[1]])}else{if("wrapS"in ye){var it=ye.wrapS;Je=ti[it]}if("wrapT"in ye){var pt=ye.wrapT;xt=ti[pt]}}if(X.wrapS=Je,X.wrapT=xt,"anisotropic"in ye&&(ye.anisotropic,X.anisotropic=ye.anisotropic),"mipmap"in ye){var Rt=!1;switch(typeof ye.mipmap){case"string":X.mipmapHint=ni[ye.mipmap],X.genMipmaps=!0,Rt=!0;break;case"boolean":Rt=X.genMipmaps=ye.mipmap;break;case"object":X.genMipmaps=!1,Rt=!0;break}Rt&&!("min"in ye)&&(X.minFilter=$l)}}function uc(X,ye){St.texParameteri(ye,Au,X.minFilter),St.texParameteri(ye,_u,X.magFilter),St.texParameteri(ye,Ps,X.wrapS),St.texParameteri(ye,ms,X.wrapT),kr.ext_texture_filter_anisotropic&&St.texParameteri(ye,zl,X.anisotropic),X.genMipmaps&&(St.hint(rf,X.mipmapHint),St.generateMipmap(ye))}var kf=0,hu={},wu=Dr.maxTextureUnits,Ro=Array(wu).map(function(){return null});function cc(X){Ea.call(this),this.mipmask=0,this.internalformat=Ki,this.id=kf++,this.refCount=1,this.target=X,this.texture=St.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new Mu,Pn.profile&&(this.stats={size:0})}function Js(X){St.activeTexture(vf),St.bindTexture(X.target,X.texture)}function Zl(){var X=Ro[0];X?St.bindTexture(X.target,X.texture):St.bindTexture(Kn,null)}function bc(X){var ye=X.texture,ne=X.unit,Se=X.target;ne>=0&&(St.activeTexture(vf+ne),St.bindTexture(Se,null),Ro[ne]=null),St.deleteTexture(ye),X.texture=null,X.params=null,X.pixels=null,X.refCount=0,delete hu[X.id],Rn.textureCount--}v(cc.prototype,{bind:function(){var X=this;X.bindCount+=1;var ye=X.unit;if(ye<0){for(var ne=0;ne<wu;++ne){var Se=Ro[ne];if(Se){if(Se.bindCount>0)continue;Se.unit=-1}Ro[ne]=X,ye=ne;break}Pn.profile&&Rn.maxTextureUnits<ye+1&&(Rn.maxTextureUnits=ye+1),X.unit=ye,St.activeTexture(vf+ye),St.bindTexture(X.target,X.texture)}return ye},unbind:function(){this.bindCount-=1},decRef:function(){--this.refCount<=0&&bc(this)}});function wc(X,ye){var ne=new cc(Kn);hu[ne.id]=ne,Rn.textureCount++;function Se(At,it){var pt=ne.texInfo;Mu.call(pt);var Rt=zu();return typeof At=="number"?typeof it=="number"?ns(Rt,At|0,it|0):ns(Rt,At|0,At|0):At?(Zu(pt,At),ds(Rt,At)):ns(Rt,1,1),pt.genMipmaps&&(Rt.mipmask=(Rt.width<<1)-1),ne.mipmask=Rt.mipmask,pa(ne,Rt),ne.internalformat=Rt.internalformat,Se.width=Rt.width,Se.height=Rt.height,Js(ne),wl(Rt,Kn),uc(pt,Kn),Zl(),cl(Rt),Pn.profile&&(ne.stats.size=Nf(ne.internalformat,ne.type,Rt.width,Rt.height,pt.genMipmaps,!1)),Se.format=wa[ne.internalformat],Se.type=Fa[ne.type],Se.mag=Sa[pt.magFilter],Se.min=zi[pt.minFilter],Se.wrapS=li[pt.wrapS],Se.wrapT=li[pt.wrapT],Se}function Je(At,it,pt,Rt){var or=it|0,er=pt|0,ur=Rt|0,gr=lo();return pa(gr,ne),gr.width=0,gr.height=0,ai(gr,At),gr.width=gr.width||(ne.width>>ur)-or,gr.height=gr.height||(ne.height>>ur)-er,Js(ne),Xo(gr,Kn,or,er,ur),Zl(),pi(gr),Se}function xt(At,it){var pt=At|0,Rt=it|0||pt;if(pt===ne.width&&Rt===ne.height)return Se;Se.width=ne.width=pt,Se.height=ne.height=Rt,Js(ne);for(var or=0;ne.mipmask>>or;++or){var er=pt>>or,ur=Rt>>or;if(!er||!ur)break;St.texImage2D(Kn,or,ne.format,er,ur,0,ne.format,ne.type,null)}return Zl(),Pn.profile&&(ne.stats.size=Nf(ne.internalformat,ne.type,pt,Rt,!1,!1)),Se}return Se(X,ye),Se.subimage=Je,Se.resize=xt,Se._reglType="texture2d",Se._texture=ne,Pn.profile&&(Se.stats=ne.stats),Se.destroy=function(){ne.decRef()},Se}function Go(X,ye,ne,Se,Je,xt){var At=new cc(Ui);hu[At.id]=At,Rn.cubeCount++;var it=new Array(6);function pt(er,ur,gr,vr,Zt,ar){var tr,Zr=At.texInfo;for(Mu.call(Zr),tr=0;tr<6;++tr)it[tr]=zu();if(typeof er=="number"||!er){var un=er|0||1;for(tr=0;tr<6;++tr)ns(it[tr],un,un)}else if(typeof er=="object")if(ur)ds(it[0],er),ds(it[1],ur),ds(it[2],gr),ds(it[3],vr),ds(it[4],Zt),ds(it[5],ar);else if(Zu(Zr,er),ki(At,er),"faces"in er){var En=er.faces;for(tr=0;tr<6;++tr)pa(it[tr],At),ds(it[tr],En[tr])}else for(tr=0;tr<6;++tr)ds(it[tr],er);for(pa(At,it[0]),Zr.genMipmaps?At.mipmask=(it[0].width<<1)-1:At.mipmask=it[0].mipmask,At.internalformat=it[0].internalformat,pt.width=it[0].width,pt.height=it[0].height,Js(At),tr=0;tr<6;++tr)wl(it[tr],Za+tr);for(uc(Zr,Ui),Zl(),Pn.profile&&(At.stats.size=Nf(At.internalformat,At.type,pt.width,pt.height,Zr.genMipmaps,!0)),pt.format=wa[At.internalformat],pt.type=Fa[At.type],pt.mag=Sa[Zr.magFilter],pt.min=zi[Zr.minFilter],pt.wrapS=li[Zr.wrapS],pt.wrapT=li[Zr.wrapT],tr=0;tr<6;++tr)cl(it[tr]);return pt}function Rt(er,ur,gr,vr,Zt){var ar=gr|0,tr=vr|0,Zr=Zt|0,un=lo();return pa(un,At),un.width=0,un.height=0,ai(un,ur),un.width=un.width||(At.width>>Zr)-ar,un.height=un.height||(At.height>>Zr)-tr,Js(At),Xo(un,Za+er,ar,tr,Zr),Zl(),pi(un),pt}function or(er){var ur=er|0;if(ur!==At.width){pt.width=At.width=ur,pt.height=At.height=ur,Js(At);for(var gr=0;gr<6;++gr)for(var vr=0;At.mipmask>>vr;++vr)St.texImage2D(Za+gr,vr,At.format,ur>>vr,ur>>vr,0,At.format,At.type,null);return Zl(),Pn.profile&&(At.stats.size=Nf(At.internalformat,At.type,pt.width,pt.height,!1,!0)),pt}}return pt(X,ye,ne,Se,Je,xt),pt.subimage=Rt,pt.resize=or,pt._reglType="textureCube",pt._texture=At,Pn.profile&&(pt.stats=At.stats),pt.destroy=function(){At.decRef()},pt}function Ms(){for(var X=0;X<wu;++X)St.activeTexture(vf+X),St.bindTexture(Kn,null),Ro[X]=null;Ot(hu).forEach(bc),Rn.cubeCount=0,Rn.textureCount=0}Pn.profile&&(Rn.getTotalTextureSize=function(){var X=0;return Object.keys(hu).forEach(function(ye){X+=hu[ye].stats.size}),X});function Rs(){for(var X=0;X<wu;++X){var ye=Ro[X];ye&&(ye.bindCount=0,ye.unit=-1,Ro[X]=null)}Ot(hu).forEach(function(ne){ne.texture=St.createTexture(),St.bindTexture(ne.target,ne.texture);for(var Se=0;Se<32;++Se)if((ne.mipmask&1<<Se)!==0)if(ne.target===Kn)St.texImage2D(Kn,Se,ne.internalformat,ne.width>>Se,ne.height>>Se,0,ne.internalformat,ne.type,null);else for(var Je=0;Je<6;++Je)St.texImage2D(Za+Je,Se,ne.internalformat,ne.width>>Se,ne.height>>Se,0,ne.internalformat,ne.type,null);uc(ne.texInfo,ne.target)})}function Me(){for(var X=0;X<wu;++X){var ye=Ro[X];ye&&(ye.bindCount=0,ye.unit=-1,Ro[X]=null),St.activeTexture(vf+X),St.bindTexture(Kn,null),St.bindTexture(Ui,null)}}return{create2D:wc,createCube:Go,clear:Ms,getTexture:function(X){return null},restore:Rs,refresh:Me}}var lc=36161,lh=32854,ed=32855,Kl=36194,Nh=33189,Yd=36168,ud=34041,Eh=35907,cd=34836,Hc=34842,fd=34843,Pu=[];Pu[lh]=2,Pu[ed]=2,Pu[Kl]=2,Pu[Nh]=2,Pu[Yd]=1,Pu[ud]=4,Pu[Eh]=4,Pu[cd]=16,Pu[Hc]=8,Pu[fd]=6;function Gc(St,kr,Dr){return Pu[St]*kr*Dr}var Qf=function(St,kr,Dr,Xn,La){var Rn={rgba4:lh,rgb565:Kl,"rgb5 a1":ed,depth:Nh,stencil:Yd,"depth stencil":ud};kr.ext_srgb&&(Rn.srgba=Eh),kr.ext_color_buffer_half_float&&(Rn.rgba16f=Hc,Rn.rgb16f=fd),kr.webgl_color_buffer_float&&(Rn.rgba32f=cd);var Pn=[];Object.keys(Rn).forEach(function(di){var Na=Rn[di];Pn[Na]=di});var ni=0,ti={};function ri(di){this.id=ni++,this.refCount=1,this.renderbuffer=di,this.format=lh,this.width=0,this.height=0,La.profile&&(this.stats={size:0})}ri.prototype.decRef=function(){--this.refCount<=0&&gi(this)};function gi(di){var Na=di.renderbuffer;St.bindRenderbuffer(lc,null),St.deleteRenderbuffer(Na),di.renderbuffer=null,di.refCount=0,delete ti[di.id],Xn.renderbufferCount--}function io(di,Na){var yn=new ri(St.createRenderbuffer());ti[yn.id]=yn,Xn.renderbufferCount++;function ra(Fa,Sa){var zi=0,li=0,eo=lh;if(typeof Fa=="object"&&Fa){var Ea=Fa;if("shape"in Ea){var pa=Ea.shape;zi=pa[0]|0,li=pa[1]|0}else"radius"in Ea&&(zi=li=Ea.radius|0),"width"in Ea&&(zi=Ea.width|0),"height"in Ea&&(li=Ea.height|0);"format"in Ea&&(eo=Rn[Ea.format])}else typeof Fa=="number"?(zi=Fa|0,typeof Sa=="number"?li=Sa|0:li=zi):Fa||(zi=li=1);if(!(zi===yn.width&&li===yn.height&&eo===yn.format))return ra.width=yn.width=zi,ra.height=yn.height=li,yn.format=eo,St.bindRenderbuffer(lc,yn.renderbuffer),St.renderbufferStorage(lc,eo,zi,li),La.profile&&(yn.stats.size=Gc(yn.format,yn.width,yn.height)),ra.format=Pn[yn.format],ra}function wa(Fa,Sa){var zi=Fa|0,li=Sa|0||zi;return zi===yn.width&&li===yn.height||(ra.width=yn.width=zi,ra.height=yn.height=li,St.bindRenderbuffer(lc,yn.renderbuffer),St.renderbufferStorage(lc,yn.format,zi,li),La.profile&&(yn.stats.size=Gc(yn.format,yn.width,yn.height))),ra}return ra(di,Na),ra.resize=wa,ra._reglType="renderbuffer",ra._renderbuffer=yn,La.profile&&(ra.stats=yn.stats),ra.destroy=function(){yn.decRef()},ra}La.profile&&(Xn.getTotalRenderbufferSize=function(){var di=0;return Object.keys(ti).forEach(function(Na){di+=ti[Na].stats.size}),di});function qi(){Ot(ti).forEach(function(di){di.renderbuffer=St.createRenderbuffer(),St.bindRenderbuffer(lc,di.renderbuffer),St.renderbufferStorage(lc,di.format,di.width,di.height)}),St.bindRenderbuffer(lc,null)}return{create:io,clear:function(){Ot(ti).forEach(gi)},restore:qi}},cu=36160,Ff=36161,Sc=3553,Xc=34069,bu=36064,mh=36096,Sf=36128,eh=33306,Fh=36053,Zd=36193,Sv=5121,gh=5126,Bh=6407,nf=6408,jh=[];jh[nf]=4,jh[Bh]=3;var gc=[];gc[Sv]=1,gc[gh]=4,gc[Zd]=2;function yh(St,kr,Dr,Xn,La,Rn){var Pn={cur:null,next:null,dirty:!1,setFBO:null},ni=["rgba"],ti=["rgba4","rgb565","rgb5 a1"];kr.ext_srgb&&ti.push("srgba"),kr.ext_color_buffer_half_float&&ti.push("rgba16f","rgb16f"),kr.webgl_color_buffer_float&&ti.push("rgba32f"),kr.oes_texture_half_float,kr.oes_texture_float;function ri(Jn,_i,ai){this.target=Jn,this.texture=_i,this.renderbuffer=ai;var no=0,Xo=0;_i?(no=_i.width,Xo=_i.height):ai&&(no=ai.width,Xo=ai.height),this.width=no,this.height=Xo}function gi(Jn){Jn&&(Jn.texture&&Jn.texture._texture.decRef(),Jn.renderbuffer&&Jn.renderbuffer._renderbuffer.decRef())}function io(Jn,_i,ai){if(Jn)if(Jn.texture){var no=Jn.texture._texture;Math.max(1,no.width),Math.max(1,no.height),no.refCount+=1}else{var Xo=Jn.renderbuffer._renderbuffer;Xo.refCount+=1}}function qi(Jn,_i){_i&&(_i.texture?St.framebufferTexture2D(cu,Jn,_i.target,_i.texture._texture.texture,0):St.framebufferRenderbuffer(cu,Jn,Ff,_i.renderbuffer._renderbuffer.renderbuffer))}function di(Jn){var _i=Sc,ai=null,no=null,Xo=Jn;typeof Jn=="object"&&(Xo=Jn.data,"target"in Jn&&(_i=Jn.target|0));var Vi=Xo._reglType;return Vi==="texture2d"||Vi==="textureCube"?ai=Xo:Vi==="renderbuffer"&&(no=Xo,_i=Ff),new ri(_i,ai,no)}function Na(Jn,_i,ai,no,Xo){if(ai){var Vi=Xn.create2D({width:Jn,height:_i,format:no,type:Xo});return Vi._texture.refCount=0,new ri(Sc,Vi,null)}else{var lo=La.create({width:Jn,height:_i,format:no});return lo._renderbuffer.refCount=0,new ri(Ff,null,lo)}}function yn(Jn){return Jn&&(Jn.texture||Jn.renderbuffer)}function ra(Jn,_i,ai){Jn&&(Jn.texture?Jn.texture.resize(_i,ai):Jn.renderbuffer&&Jn.renderbuffer.resize(_i,ai),Jn.width=_i,Jn.height=ai)}var wa=0,Fa={};function Sa(){this.id=wa++,Fa[this.id]=this,this.framebuffer=St.createFramebuffer(),this.width=0,this.height=0,this.colorAttachments=[],this.depthAttachment=null,this.stencilAttachment=null,this.depthStencilAttachment=null}function zi(Jn){Jn.colorAttachments.forEach(gi),gi(Jn.depthAttachment),gi(Jn.stencilAttachment),gi(Jn.depthStencilAttachment)}function li(Jn){var _i=Jn.framebuffer;St.deleteFramebuffer(_i),Jn.framebuffer=null,Rn.framebufferCount--,delete Fa[Jn.id]}function eo(Jn){var _i;St.bindFramebuffer(cu,Jn.framebuffer);var ai=Jn.colorAttachments;for(_i=0;_i<ai.length;++_i)qi(bu+_i,ai[_i]);for(_i=ai.length;_i<Dr.maxColorAttachments;++_i)St.framebufferTexture2D(cu,bu+_i,Sc,null,0);St.framebufferTexture2D(cu,eh,Sc,null,0),St.framebufferTexture2D(cu,mh,Sc,null,0),St.framebufferTexture2D(cu,Sf,Sc,null,0),qi(mh,Jn.depthAttachment),qi(Sf,Jn.stencilAttachment),qi(eh,Jn.depthStencilAttachment);var no=St.checkFramebufferStatus(cu);St.isContextLost(),St.bindFramebuffer(cu,Pn.next?Pn.next.framebuffer:null),Pn.cur=Pn.next,St.getError()}function Ea(Jn,_i){var ai=new Sa;Rn.framebufferCount++;function no(Vi,lo){var pi,Uo=0,ns=0,ds=!0,wl=!0,vs=null,zu=!0,cl="rgba",Mu="uint8",Zu=1,uc=null,kf=null,hu=null,wu=!1;if(typeof Vi=="number")Uo=Vi|0,ns=lo|0||Uo;else if(!Vi)Uo=ns=1;else{var Ro=Vi;if("shape"in Ro){var cc=Ro.shape;Uo=cc[0],ns=cc[1]}else"radius"in Ro&&(Uo=ns=Ro.radius),"width"in Ro&&(Uo=Ro.width),"height"in Ro&&(ns=Ro.height);("color"in Ro||"colors"in Ro)&&(vs=Ro.color||Ro.colors),vs||("colorCount"in Ro&&(Zu=Ro.colorCount|0),"colorTexture"in Ro&&(zu=!!Ro.colorTexture,cl="rgba4"),"colorType"in Ro&&(Mu=Ro.colorType,zu||(Mu==="half float"||Mu==="float16"?cl="rgba16f":(Mu==="float"||Mu==="float32")&&(cl="rgba32f"))),"colorFormat"in Ro&&(cl=Ro.colorFormat,ni.indexOf(cl)>=0?zu=!0:ti.indexOf(cl)>=0&&(zu=!1))),("depthTexture"in Ro||"depthStencilTexture"in Ro)&&(wu=!!(Ro.depthTexture||Ro.depthStencilTexture)),"depth"in Ro&&(typeof Ro.depth=="boolean"?ds=Ro.depth:(uc=Ro.depth,wl=!1)),"stencil"in Ro&&(typeof Ro.stencil=="boolean"?wl=Ro.stencil:(kf=Ro.stencil,ds=!1)),"depthStencil"in Ro&&(typeof Ro.depthStencil=="boolean"?ds=wl=Ro.depthStencil:(hu=Ro.depthStencil,ds=!1,wl=!1))}var Js=null,Zl=null,bc=null,wc=null;if(Array.isArray(vs))Js=vs.map(di);else if(vs)Js=[di(vs)];else for(Js=new Array(Zu),pi=0;pi<Zu;++pi)Js[pi]=Na(Uo,ns,zu,cl,Mu);for(Uo=Uo||Js[0].width,ns=ns||Js[0].height,uc?Zl=di(uc):ds&&!wl&&(Zl=Na(Uo,ns,wu,"depth","uint32")),kf?bc=di(kf):wl&&!ds&&(bc=Na(Uo,ns,!1,"stencil","uint8")),hu?wc=di(hu):!uc&&!kf&&wl&&ds&&(wc=Na(Uo,ns,wu,"depth stencil","depth stencil")),pi=0;pi<Js.length;++pi)io(Js[pi]),Js[pi]&&Js[pi].texture&&jh[Js[pi].texture._texture.format]*gc[Js[pi].texture._texture.type];return io(Zl),io(bc),io(wc),zi(ai),ai.width=Uo,ai.height=ns,ai.colorAttachments=Js,ai.depthAttachment=Zl,ai.stencilAttachment=bc,ai.depthStencilAttachment=wc,no.color=Js.map(yn),no.depth=yn(Zl),no.stencil=yn(bc),no.depthStencil=yn(wc),no.width=ai.width,no.height=ai.height,eo(ai),no}function Xo(Vi,lo){var pi=Math.max(Vi|0,1),Uo=Math.max(lo|0||pi,1);if(pi===ai.width&&Uo===ai.height)return no;for(var ns=ai.colorAttachments,ds=0;ds<ns.length;++ds)ra(ns[ds],pi,Uo);return ra(ai.depthAttachment,pi,Uo),ra(ai.stencilAttachment,pi,Uo),ra(ai.depthStencilAttachment,pi,Uo),ai.width=no.width=pi,ai.height=no.height=Uo,eo(ai),no}return no(Jn,_i),v(no,{resize:Xo,_reglType:"framebuffer",_framebuffer:ai,destroy:function(){li(ai),zi(ai)},use:function(Vi){Pn.setFBO({framebuffer:no},Vi)}})}function pa(Jn){var _i=Array(6);function ai(Xo){var Vi,lo={color:null},pi=0,Uo=null,ns="rgba",ds="uint8",wl=1;if(typeof Xo=="number")pi=Xo|0;else if(!Xo)pi=1;else{var vs=Xo;if("shape"in vs){var zu=vs.shape;pi=zu[0]}else"radius"in vs&&(pi=vs.radius|0),"width"in vs?pi=vs.width|0:"height"in vs&&(pi=vs.height|0);("color"in vs||"colors"in vs)&&(Uo=vs.color||vs.colors),Uo||("colorCount"in vs&&(wl=vs.colorCount|0),"colorType"in vs&&(ds=vs.colorType),"colorFormat"in vs&&(ns=vs.colorFormat)),"depth"in vs&&(lo.depth=vs.depth),"stencil"in vs&&(lo.stencil=vs.stencil),"depthStencil"in vs&&(lo.depthStencil=vs.depthStencil)}var cl;if(Uo)if(Array.isArray(Uo))for(cl=[],Vi=0;Vi<Uo.length;++Vi)cl[Vi]=Uo[Vi];else cl=[Uo];else{cl=Array(wl);var Mu={radius:pi,format:ns,type:ds};for(Vi=0;Vi<wl;++Vi)cl[Vi]=Xn.createCube(Mu)}for(lo.color=Array(cl.length),Vi=0;Vi<cl.length;++Vi){var Zu=cl[Vi];pi=pi||Zu.width,lo.color[Vi]={target:Xc,data:cl[Vi]}}for(Vi=0;Vi<6;++Vi){for(var uc=0;uc<cl.length;++uc)lo.color[uc].target=Xc+Vi;Vi>0&&(lo.depth=_i[0].depth,lo.stencil=_i[0].stencil,lo.depthStencil=_i[0].depthStencil),_i[Vi]?_i[Vi](lo):_i[Vi]=Ea(lo)}return v(ai,{width:pi,height:pi,color:cl})}function no(Xo){var Vi,lo=Xo|0;if(lo===ai.width)return ai;var pi=ai.color;for(Vi=0;Vi<pi.length;++Vi)pi[Vi].resize(lo);for(Vi=0;Vi<6;++Vi)_i[Vi].resize(lo);return ai.width=ai.height=lo,ai}return ai(Jn),v(ai,{faces:_i,resize:no,_reglType:"framebufferCube",destroy:function(){_i.forEach(function(Xo){Xo.destroy()})}})}function ki(){Pn.cur=null,Pn.next=null,Pn.dirty=!0,Ot(Fa).forEach(function(Jn){Jn.framebuffer=St.createFramebuffer(),eo(Jn)})}return v(Pn,{getFramebuffer:function(Jn){if(typeof Jn=="function"&&Jn._reglType==="framebuffer"){var _i=Jn._framebuffer;if(_i instanceof Sa)return _i}return null},create:Ea,createCube:pa,clear:function(){Ot(Fa).forEach(li)},restore:ki})}var hd=5126,_h=34962,du=34963;function Wc(){this.state=0,this.x=0,this.y=0,this.z=0,this.w=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=hd,this.offset=0,this.stride=0,this.divisor=0}function gf(St,kr,Dr,Xn,La,Rn,Pn){for(var ni=Dr.maxAttributes,ti=new Array(ni),ri=0;ri<ni;++ri)ti[ri]=new Wc;var gi=0,io={},qi={Record:Wc,scope:{},state:ti,currentVAO:null,targetVAO:null,restore:Na()?li:function(){},createVAO:eo,getVAO:ra,destroyBuffer:di,setVAO:Na()?wa:Fa,clear:Na()?Sa:function(){}};function di(Ea){for(var pa=0;pa<ti.length;++pa){var ki=ti[pa];ki.buffer===Ea&&(St.disableVertexAttribArray(pa),ki.buffer=null)}}function Na(){return kr.oes_vertex_array_object}function yn(){return kr.angle_instanced_arrays}function ra(Ea){return typeof Ea=="function"&&Ea._vao?Ea._vao:null}function wa(Ea){if(Ea!==qi.currentVAO){var pa=Na();Ea?pa.bindVertexArrayOES(Ea.vao):pa.bindVertexArrayOES(null),qi.currentVAO=Ea}}function Fa(Ea){if(Ea!==qi.currentVAO){if(Ea)Ea.bindAttrs();else{for(var pa=yn(),ki=0;ki<ti.length;++ki){var Jn=ti[ki];Jn.buffer?(St.enableVertexAttribArray(ki),Jn.buffer.bind(),St.vertexAttribPointer(ki,Jn.size,Jn.type,Jn.normalized,Jn.stride,Jn.offfset),pa&&Jn.divisor&&pa.vertexAttribDivisorANGLE(ki,Jn.divisor)):(St.disableVertexAttribArray(ki),St.vertexAttrib4f(ki,Jn.x,Jn.y,Jn.z,Jn.w))}Pn.elements?St.bindBuffer(du,Pn.elements.buffer.buffer):St.bindBuffer(du,null)}qi.currentVAO=Ea}}function Sa(){Ot(io).forEach(function(Ea){Ea.destroy()})}function zi(){this.id=++gi,this.attributes=[],this.elements=null,this.ownsElements=!1,this.count=0,this.offset=0,this.instances=-1,this.primitive=4;var Ea=Na();Ea?this.vao=Ea.createVertexArrayOES():this.vao=null,io[this.id]=this,this.buffers=[]}zi.prototype.bindAttrs=function(){for(var Ea=yn(),pa=this.attributes,ki=0;ki<pa.length;++ki){var Jn=pa[ki];Jn.buffer?(St.enableVertexAttribArray(ki),St.bindBuffer(_h,Jn.buffer.buffer),St.vertexAttribPointer(ki,Jn.size,Jn.type,Jn.normalized,Jn.stride,Jn.offset),Ea&&Jn.divisor&&Ea.vertexAttribDivisorANGLE(ki,Jn.divisor)):(St.disableVertexAttribArray(ki),St.vertexAttrib4f(ki,Jn.x,Jn.y,Jn.z,Jn.w))}for(var _i=pa.length;_i<ni;++_i)St.disableVertexAttribArray(_i);var ai=Rn.getElements(this.elements);ai?St.bindBuffer(du,ai.buffer.buffer):St.bindBuffer(du,null)},zi.prototype.refresh=function(){var Ea=Na();Ea&&(Ea.bindVertexArrayOES(this.vao),this.bindAttrs(),qi.currentVAO=null,Ea.bindVertexArrayOES(null))},zi.prototype.destroy=function(){if(this.vao){var Ea=Na();this===qi.currentVAO&&(qi.currentVAO=null,Ea.bindVertexArrayOES(null)),Ea.deleteVertexArrayOES(this.vao),this.vao=null}this.ownsElements&&(this.elements.destroy(),this.elements=null,this.ownsElements=!1),io[this.id]&&(delete io[this.id],Xn.vaoCount-=1)};function li(){var Ea=Na();Ea&&Ot(io).forEach(function(pa){pa.refresh()})}function eo(Ea){var pa=new zi;Xn.vaoCount+=1;function ki(Jn){var _i;if(Array.isArray(Jn))_i=Jn,pa.elements&&pa.ownsElements&&pa.elements.destroy(),pa.elements=null,pa.ownsElements=!1,pa.offset=0,pa.count=0,pa.instances=-1,pa.primitive=4;else{if(Jn.elements){var ai=Jn.elements;pa.ownsElements?typeof ai=="function"&&ai._reglType==="elements"?(pa.elements.destroy(),pa.ownsElements=!1):(pa.elements(ai),pa.ownsElements=!1):Rn.getElements(Jn.elements)?(pa.elements=Jn.elements,pa.ownsElements=!1):(pa.elements=Rn.create(Jn.elements),pa.ownsElements=!0)}else pa.elements=null,pa.ownsElements=!1;_i=Jn.attributes,pa.offset=0,pa.count=-1,pa.instances=-1,pa.primitive=4,pa.elements&&(pa.count=pa.elements._elements.vertCount,pa.primitive=pa.elements._elements.primType),"offset"in Jn&&(pa.offset=Jn.offset|0),"count"in Jn&&(pa.count=Jn.count|0),"instances"in Jn&&(pa.instances=Jn.instances|0),"primitive"in Jn&&(pa.primitive=fa[Jn.primitive])}var no={},Xo=pa.attributes;Xo.length=_i.length;for(var Vi=0;Vi<_i.length;++Vi){var lo=_i[Vi],pi=Xo[Vi]=new Wc,Uo=lo.data||lo;if(Array.isArray(Uo)||Br(Uo)||Qr(Uo)){var ns;pa.buffers[Vi]&&(ns=pa.buffers[Vi],Br(Uo)&&ns._buffer.byteLength>=Uo.byteLength?ns.subdata(Uo):(ns.destroy(),pa.buffers[Vi]=null)),pa.buffers[Vi]||(ns=pa.buffers[Vi]=La.create(lo,_h,!1,!0)),pi.buffer=La.getBuffer(ns),pi.size=pi.buffer.dimension|0,pi.normalized=!1,pi.type=pi.buffer.dtype,pi.offset=0,pi.stride=0,pi.divisor=0,pi.state=1,no[Vi]=1}else La.getBuffer(lo)?(pi.buffer=La.getBuffer(lo),pi.size=pi.buffer.dimension|0,pi.normalized=!1,pi.type=pi.buffer.dtype,pi.offset=0,pi.stride=0,pi.divisor=0,pi.state=1):La.getBuffer(lo.buffer)?(pi.buffer=La.getBuffer(lo.buffer),pi.size=(+lo.size||pi.buffer.dimension)|0,pi.normalized=!!lo.normalized||!1,"type"in lo?pi.type=Hn[lo.type]:pi.type=pi.buffer.dtype,pi.offset=(lo.offset||0)|0,pi.stride=(lo.stride||0)|0,pi.divisor=(lo.divisor||0)|0,pi.state=1):"x"in lo&&(pi.x=+lo.x||0,pi.y=+lo.y||0,pi.z=+lo.z||0,pi.w=+lo.w||0,pi.state=2)}for(var ds=0;ds<pa.buffers.length;++ds)!no[ds]&&pa.buffers[ds]&&(pa.buffers[ds].destroy(),pa.buffers[ds]=null);return pa.refresh(),ki}return ki.destroy=function(){for(var Jn=0;Jn<pa.buffers.length;++Jn)pa.buffers[Jn]&&pa.buffers[Jn].destroy();pa.buffers.length=0,pa.ownsElements&&(pa.elements.destroy(),pa.elements=null,pa.ownsElements=!1),pa.destroy()},ki._vao=pa,ki._reglType="vao",ki(Ea)}return qi}var td=35632,gu=35633,Mh=35718,th=35721;function af(St,kr,Dr,Xn){var La={},Rn={};function Pn(yn,ra,wa,Fa){this.name=yn,this.id=ra,this.location=wa,this.info=Fa}function ni(yn,ra){for(var wa=0;wa<yn.length;++wa)if(yn[wa].id===ra.id){yn[wa].location=ra.location;return}yn.push(ra)}function ti(yn,ra,wa){var Fa=yn===td?La:Rn,Sa=Fa[ra];if(!Sa){var zi=kr.str(ra);Sa=St.createShader(yn),St.shaderSource(Sa,zi),St.compileShader(Sa),Fa[ra]=Sa}return Sa}var ri={},gi=[],io=0;function qi(yn,ra){this.id=io++,this.fragId=yn,this.vertId=ra,this.program=null,this.uniforms=[],this.attributes=[],this.refCount=1,Xn.profile&&(this.stats={uniformsCount:0,attributesCount:0})}function di(yn,ra,wa){var Fa,Sa,zi=ti(td,yn.fragId),li=ti(gu,yn.vertId),eo=yn.program=St.createProgram();if(St.attachShader(eo,zi),St.attachShader(eo,li),wa)for(Fa=0;Fa<wa.length;++Fa){var Ea=wa[Fa];St.bindAttribLocation(eo,Ea[0],Ea[1])}St.linkProgram(eo);var pa=St.getProgramParameter(eo,Mh);Xn.profile&&(yn.stats.uniformsCount=pa);var ki=yn.uniforms;for(Fa=0;Fa<pa;++Fa)if(Sa=St.getActiveUniform(eo,Fa),Sa)if(Sa.size>1)for(var Jn=0;Jn<Sa.size;++Jn){var _i=Sa.name.replace("[0]","["+Jn+"]");ni(ki,new Pn(_i,kr.id(_i),St.getUniformLocation(eo,_i),Sa))}else ni(ki,new Pn(Sa.name,kr.id(Sa.name),St.getUniformLocation(eo,Sa.name),Sa));var ai=St.getProgramParameter(eo,th);Xn.profile&&(yn.stats.attributesCount=ai);var no=yn.attributes;for(Fa=0;Fa<ai;++Fa)Sa=St.getActiveAttrib(eo,Fa),Sa&&ni(no,new Pn(Sa.name,kr.id(Sa.name),St.getAttribLocation(eo,Sa.name),Sa))}Xn.profile&&(Dr.getMaxUniformsCount=function(){var yn=0;return gi.forEach(function(ra){ra.stats.uniformsCount>yn&&(yn=ra.stats.uniformsCount)}),yn},Dr.getMaxAttributesCount=function(){var yn=0;return gi.forEach(function(ra){ra.stats.attributesCount>yn&&(yn=ra.stats.attributesCount)}),yn});function Na(){La={},Rn={};for(var yn=0;yn<gi.length;++yn)di(gi[yn],null,gi[yn].attributes.map(function(ra){return[ra.location,ra.name]}))}return{clear:function(){var yn=St.deleteShader.bind(St);Ot(La).forEach(yn),La={},Ot(Rn).forEach(yn),Rn={},gi.forEach(function(ra){St.deleteProgram(ra.program)}),gi.length=0,ri={},Dr.shaderCount=0},program:function(yn,ra,wa,Fa){var Sa=ri[ra];Sa||(Sa=ri[ra]={});var zi=Sa[yn];if(zi&&(zi.refCount++,!Fa))return zi;var li=new qi(ra,yn);return Dr.shaderCount++,di(li,wa,Fa),zi||(Sa[yn]=li),gi.push(li),v(li,{destroy:function(){if(li.refCount--,li.refCount<=0){St.deleteProgram(li.program);var eo=gi.indexOf(li);gi.splice(eo,1),Dr.shaderCount--}Sa[li.vertId].refCount<=0&&(St.deleteShader(Rn[li.vertId]),delete Rn[li.vertId],delete ri[li.fragId][li.vertId]),Object.keys(ri[li.fragId]).length||(St.deleteShader(La[li.fragId]),delete La[li.fragId],delete ri[li.fragId])}})},restore:Na,shader:ti,frag:-1,vert:-1}}var Ch=6408,Ef=5121,kh=3333,$d=5126;function xc(St,kr,Dr,Xn,La,Rn,Pn){function ni(gi){var io;kr.next===null?io=Ef:io=kr.next.colorAttachments[0].texture._texture.type;var qi=0,di=0,Na=Xn.framebufferWidth,yn=Xn.framebufferHeight,ra=null;Br(gi)?ra=gi:gi&&(qi=gi.x|0,di=gi.y|0,Na=(gi.width||Xn.framebufferWidth-qi)|0,yn=(gi.height||Xn.framebufferHeight-di)|0,ra=gi.data||null),Dr();var wa=Na*yn*4;return ra||(io===Ef?ra=new Uint8Array(wa):io===$d&&(ra=ra||new Float32Array(wa))),St.pixelStorei(kh,4),St.readPixels(qi,di,Na,yn,Ch,io,ra),ra}function ti(gi){var io;return kr.setFBO({framebuffer:gi.framebuffer},function(){io=ni(gi)}),io}function ri(gi){return!gi||!("framebuffer"in gi)?ni(gi):ti(gi)}return ri}function dd(St){return Bf(of(Mf(St)))}function of(St){return Rc(Ga(Du(St),St.length*8))}function Bf(St){for(var kr="0123456789abcdef",Dr="",Xn,La=0;La<St.length;La++)Xn=St.charCodeAt(La),Dr+=kr.charAt(Xn>>>4&15)+kr.charAt(Xn&15);return Dr}function Mf(St){for(var kr="",Dr=-1,Xn,La;++Dr<St.length;)Xn=St.charCodeAt(Dr),La=Dr+1<St.length?St.charCodeAt(Dr+1):0,55296<=Xn&&Xn<=56319&&56320<=La&&La<=57343&&(Xn=65536+((Xn&1023)<<10)+(La&1023),Dr++),Xn<=127?kr+=String.fromCharCode(Xn):Xn<=2047?kr+=String.fromCharCode(192|Xn>>>6&31,128|Xn&63):Xn<=65535?kr+=String.fromCharCode(224|Xn>>>12&15,128|Xn>>>6&63,128|Xn&63):Xn<=2097151&&(kr+=String.fromCharCode(240|Xn>>>18&7,128|Xn>>>12&63,128|Xn>>>6&63,128|Xn&63));return kr}function Du(St){for(var kr=Array(St.length>>2),Dr=0;Dr<kr.length;Dr++)kr[Dr]=0;for(var Dr=0;Dr<St.length*8;Dr+=8)kr[Dr>>5]|=(St.charCodeAt(Dr/8)&255)<<24-Dr%32;return kr}function Rc(St){for(var kr="",Dr=0;Dr<St.length*32;Dr+=8)kr+=String.fromCharCode(St[Dr>>5]>>>24-Dr%32&255);return kr}function Su(St,kr){return St>>>kr|St<<32-kr}function rh(St,kr){return St>>>kr}function Cf(St,kr,Dr){return St&kr^~St&Dr}function rd(St,kr,Dr){return St&kr^St&Dr^kr&Dr}function wr(St){return Su(St,2)^Su(St,13)^Su(St,22)}function Gr(St){return Su(St,6)^Su(St,11)^Su(St,25)}function kn(St){return Su(St,7)^Su(St,18)^rh(St,3)}function _n(St){return Su(St,17)^Su(St,19)^rh(St,10)}var ta=new Array(1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998);function Ga(St,kr){var Dr=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),Xn=new Array(64),La,Rn,Pn,ni,ti,ri,gi,io,qi,di,Na,yn;for(St[kr>>5]|=128<<24-kr%32,St[(kr+64>>9<<4)+15]=kr,qi=0;qi<St.length;qi+=16){for(La=Dr[0],Rn=Dr[1],Pn=Dr[2],ni=Dr[3],ti=Dr[4],ri=Dr[5],gi=Dr[6],io=Dr[7],di=0;di<64;di++)di<16?Xn[di]=St[di+qi]:Xn[di]=ja(ja(ja(_n(Xn[di-2]),Xn[di-7]),kn(Xn[di-15])),Xn[di-16]),Na=ja(ja(ja(ja(io,Gr(ti)),Cf(ti,ri,gi)),ta[di]),Xn[di]),yn=ja(wr(La),rd(La,Rn,Pn)),io=gi,gi=ri,ri=ti,ti=ja(ni,Na),ni=Pn,Pn=Rn,Rn=La,La=ja(Na,yn);Dr[0]=ja(La,Dr[0]),Dr[1]=ja(Rn,Dr[1]),Dr[2]=ja(Pn,Dr[2]),Dr[3]=ja(ni,Dr[3]),Dr[4]=ja(ti,Dr[4]),Dr[5]=ja(ri,Dr[5]),Dr[6]=ja(gi,Dr[6]),Dr[7]=ja(io,Dr[7])}return Dr}function ja(St,kr){var Dr=(St&65535)+(kr&65535),Xn=(St>>16)+(kr>>16)+(Dr>>16);return Xn<<16|Dr&65535}function Ai(St){return Array.prototype.slice.call(St)}function Ii(St){return Ai(St).join("")}function oo(St){var kr=St&&St.cache,Dr=0,Xn=[],La=[],Rn=[];function Pn(Na,yn){var ra=yn&&yn.stable;if(!ra){for(var wa=0;wa<La.length;++wa)if(La[wa]===Na&&!Rn[wa])return Xn[wa]}var Fa="g"+Dr++;return Xn.push(Fa),La.push(Na),Rn.push(ra),Fa}function ni(){var Na=[];function yn(){Na.push.apply(Na,Ai(arguments))}var ra=[];function wa(){var Fa="v"+Dr++;return ra.push(Fa),arguments.length>0&&(Na.push(Fa,"="),Na.push.apply(Na,Ai(arguments)),Na.push(";")),Fa}return v(yn,{def:wa,toString:function(){return Ii([ra.length>0?"var "+ra.join(",")+";":"",Ii(Na)])}})}function ti(){var Na=ni(),yn=ni(),ra=Na.toString,wa=yn.toString;function Fa(Sa,zi){yn(Sa,zi,"=",Na.def(Sa,zi),";")}return v(function(){Na.apply(Na,Ai(arguments))},{def:Na.def,entry:Na,exit:yn,save:Fa,set:function(Sa,zi,li){Fa(Sa,zi),Na(Sa,zi,"=",li,";")},toString:function(){return ra()+wa()}})}function ri(){var Na=Ii(arguments),yn=ti(),ra=ti(),wa=yn.toString,Fa=ra.toString;return v(yn,{then:function(){return yn.apply(yn,Ai(arguments)),this},else:function(){return ra.apply(ra,Ai(arguments)),this},toString:function(){var Sa=Fa();return Sa&&(Sa="else{"+Sa+"}"),Ii(["if(",Na,"){",wa(),"}",Sa])}})}var gi=ni(),io={};function qi(Na,yn){var ra=[];function wa(){var eo="a"+ra.length;return ra.push(eo),eo}yn=yn||0;for(var Fa=0;Fa<yn;++Fa)wa();var Sa=ti(),zi=Sa.toString,li=io[Na]=v(Sa,{arg:wa,toString:function(){return Ii(["function(",ra.join(),"){",zi(),"}"])}});return li}function di(){var Na=['"use strict";',gi,"return {"];Object.keys(io).forEach(function(Fa){Na.push('"',Fa,'":',io[Fa].toString(),",")}),Na.push("}");var yn=Ii(Na).replace(/;/g,`;
`).replace(/}/g,`}
`).replace(/{/g,`{
`),ra;if(kr&&(ra=dd(yn),kr[ra]))return kr[ra].apply(null,La);var wa=Function.apply(null,Xn.concat(yn));return kr&&(kr[ra]=wa),wa.apply(null,La)}return{global:gi,link:Pn,block:ni,proc:qi,scope:ti,cond:ri,compile:di}}var hi="xyzw".split(""),Gi=5121,wi=1,si=2,vo=0,es=1,$o=2,is=3,rs=4,mo=5,Ji=6,gs="dither",$s="blend.enable",Nl="blend.color",au="blend.equation",Bl="blend.func",iu="depth.enable",hl="depth.func",Bu="depth.range",Ou="depth.mask",eu="colorMask",No="cull.enable",Ls="cull.face",Wl="frontFace",Cl="lineWidth",Ec="polygonOffset.enable",Mc="polygonOffset.offset",Ic="sample.alpha",uh="sample.enable",Cc="sample.coverage",jf="stencil.enable",ju="stencil.mask",Uf="stencil.func",os="stencil.opFront",_s="stencil.opBack",qf="scissor.enable",sf="scissor.box",Yc="viewport",Ze="profile",O="framebuffer",fe="vert",Re="frag",Oe="elements",We="primitive",Ct="count",Nt="offset",rr="instances",Tr="vao",Fr="Width",Vr="Height",mn=O+Fr,Dn=O+Vr,nt=Yc+Fr,ct=Yc+Vr,Tt="drawingBuffer",Pt=Tt+Fr,Gt=Tt+Vr,zt=[Bl,au,Uf,os,_s,Cc,Yc,sf,Mc],Kt=34962,Cr=34963,Nr=2884,Hr=3042,sn=3024,bn=2960,Vn=2929,Yn=3089,va=32823,Va=32926,Si=32928,yi=5126,Mi=35664,go=35665,jo=35666,Do=5124,us=35667,sl=35668,ll=35669,Bs=35670,vl=35671,Eu=35672,vu=35673,Us=35674,qs=35675,Hu=35676,yc=35678,Zc=35680,Te=4,He=1028,ft=1029,Lt=2304,Dt=2305,qt=32775,dr=32776,hr=519,Pr=7680,ln=0,on=1,Mn=32774,Un=513,Gn=36160,Ja=36064,Qn={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},ba={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},Ca={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Xa={cw:Lt,ccw:Dt};function ei(St){return Array.isArray(St)||Br(St)||Qr(St)}function Ma(St){return St.sort(function(kr,Dr){return kr===Yc?-1:Dr===Yc?1:kr<Dr?-1:1})}function Ci(St,kr,Dr,Xn){this.thisDep=St,this.contextDep=kr,this.propDep=Dr,this.append=Xn}function po(St){return St&&!(St.thisDep||St.contextDep||St.propDep)}function ro(St){return new Ci(!1,!1,!1,St)}function fo(St,kr){var Dr=St.type;if(Dr===vo){var Xn=St.data.length;return new Ci(!0,Xn>=1,Xn>=2,kr)}else if(Dr===rs){var La=St.data;return new Ci(La.thisDep,La.contextDep,La.propDep,kr)}else{if(Dr===mo)return new Ci(!1,!1,!1,kr);if(Dr===Ji){for(var Rn=!1,Pn=!1,ni=!1,ti=0;ti<St.data.length;++ti){var ri=St.data[ti];if(ri.type===es)ni=!0;else if(ri.type===$o)Pn=!0;else if(ri.type===is)Rn=!0;else if(ri.type===vo){Rn=!0;var gi=ri.data;gi>=1&&(Pn=!0),gi>=2&&(ni=!0)}else ri.type===rs&&(Rn=Rn||ri.data.thisDep,Pn=Pn||ri.data.contextDep,ni=ni||ri.data.propDep)}return new Ci(Rn,Pn,ni,kr)}else return new Ci(Dr===is,Dr===$o,Dr===es,kr)}}var Fo=new Ci(!1,!1,!1,function(){});function Ho(St,kr,Dr,Xn,La,Rn,Pn,ni,ti,ri,gi,io,qi,di,Na,yn){var ra=ri.Record,wa={add:32774,subtract:32778,"reverse subtract":32779};Dr.ext_blend_minmax&&(wa.min=qt,wa.max=dr);var Fa=Dr.angle_instanced_arrays,Sa=Dr.webgl_draw_buffers,zi=Dr.oes_vertex_array_object,li={dirty:!0,profile:yn.profile},eo={},Ea=[],pa={},ki={};function Jn(it){return it.replace(".","_")}function _i(it,pt,Rt){var or=Jn(it);Ea.push(it),eo[or]=li[or]=!!Rt,pa[or]=pt}function ai(it,pt,Rt){var or=Jn(it);Ea.push(it),Array.isArray(Rt)?(li[or]=Rt.slice(),eo[or]=Rt.slice()):li[or]=eo[or]=Rt,ki[or]=pt}function no(it){return!!isNaN(it)}_i(gs,sn),_i($s,Hr),ai(Nl,"blendColor",[0,0,0,0]),ai(au,"blendEquationSeparate",[Mn,Mn]),ai(Bl,"blendFuncSeparate",[on,ln,on,ln]),_i(iu,Vn,!0),ai(hl,"depthFunc",Un),ai(Bu,"depthRange",[0,1]),ai(Ou,"depthMask",!0),ai(eu,eu,[!0,!0,!0,!0]),_i(No,Nr),ai(Ls,"cullFace",ft),ai(Wl,Wl,Dt),ai(Cl,Cl,1),_i(Ec,va),ai(Mc,"polygonOffset",[0,0]),_i(Ic,Va),_i(uh,Si),ai(Cc,"sampleCoverage",[1,!1]),_i(jf,bn),ai(ju,"stencilMask",-1),ai(Uf,"stencilFunc",[hr,0,-1]),ai(os,"stencilOpSeparate",[He,Pr,Pr,Pr]),ai(_s,"stencilOpSeparate",[ft,Pr,Pr,Pr]),_i(qf,Yn),ai(sf,"scissor",[0,0,St.drawingBufferWidth,St.drawingBufferHeight]),ai(Yc,Yc,[0,0,St.drawingBufferWidth,St.drawingBufferHeight]);var Xo={gl:St,context:qi,strings:kr,next:eo,current:li,draw:io,elements:Rn,buffer:La,shader:gi,attributes:ri.state,vao:ri,uniforms:ti,framebuffer:ni,extensions:Dr,timer:di,isBufferArgs:ei},Vi={primTypes:fa,compareFuncs:ba,blendFuncs:Qn,blendEquations:wa,stencilOps:Ca,glTypes:Hn,orientationType:Xa};Sa&&(Vi.backBuffer=[ft],Vi.drawBuffer=y(Xn.maxDrawbuffers,function(it){return it===0?[0]:y(it,function(pt){return Ja+pt})}));var lo=0;function pi(){var it=oo({cache:Na}),pt=it.link,Rt=it.global;it.id=lo++,it.batchId="0";var or=pt(Xo),er=it.shared={props:"a0"};Object.keys(Xo).forEach(function(ar){er[ar]=Rt.def(or,".",ar)});var ur=it.next={},gr=it.current={};Object.keys(ki).forEach(function(ar){Array.isArray(li[ar])&&(ur[ar]=Rt.def(er.next,".",ar),gr[ar]=Rt.def(er.current,".",ar))});var vr=it.constants={};Object.keys(Vi).forEach(function(ar){vr[ar]=Rt.def(JSON.stringify(Vi[ar]))}),it.invoke=function(ar,tr){switch(tr.type){case vo:var Zr=["this",er.context,er.props,it.batchId];return ar.def(pt(tr.data),".call(",Zr.slice(0,Math.max(tr.data.length+1,4)),")");case es:return ar.def(er.props,tr.data);case $o:return ar.def(er.context,tr.data);case is:return ar.def("this",tr.data);case rs:return tr.data.append(it,ar),tr.data.ref;case mo:return tr.data.toString();case Ji:return tr.data.map(function(un){return it.invoke(ar,un)})}},it.attribCache={};var Zt={};return it.scopeAttrib=function(ar){var tr=kr.id(ar);if(tr in Zt)return Zt[tr];var Zr=ri.scope[tr];Zr||(Zr=ri.scope[tr]=new ra);var un=Zt[tr]=pt(Zr);return un},it}function Uo(it){var pt=it.static,Rt=it.dynamic,or;if(Ze in pt){var er=!!pt[Ze];or=ro(function(gr,vr){return er}),or.enable=er}else if(Ze in Rt){var ur=Rt[Ze];or=fo(ur,function(gr,vr){return gr.invoke(vr,ur)})}return or}function ns(it,pt){var Rt=it.static,or=it.dynamic;if(O in Rt){var er=Rt[O];return er?(er=ni.getFramebuffer(er),ro(function(gr,vr){var Zt=gr.link(er),ar=gr.shared;vr.set(ar.framebuffer,".next",Zt);var tr=ar.context;return vr.set(tr,"."+mn,Zt+".width"),vr.set(tr,"."+Dn,Zt+".height"),Zt})):ro(function(gr,vr){var Zt=gr.shared;vr.set(Zt.framebuffer,".next","null");var ar=Zt.context;return vr.set(ar,"."+mn,ar+"."+Pt),vr.set(ar,"."+Dn,ar+"."+Gt),"null"})}else if(O in or){var ur=or[O];return fo(ur,function(gr,vr){var Zt=gr.invoke(vr,ur),ar=gr.shared,tr=ar.framebuffer,Zr=vr.def(tr,".getFramebuffer(",Zt,")");vr.set(tr,".next",Zr);var un=ar.context;return vr.set(un,"."+mn,Zr+"?"+Zr+".width:"+un+"."+Pt),vr.set(un,"."+Dn,Zr+"?"+Zr+".height:"+un+"."+Gt),Zr})}else return null}function ds(it,pt,Rt){var or=it.static,er=it.dynamic;function ur(Zt){if(Zt in or){var ar=or[Zt],tr=!0,Zr=ar.x|0,un=ar.y|0,En,ka;return"width"in ar?En=ar.width|0:tr=!1,"height"in ar?ka=ar.height|0:tr=!1,new Ci(!tr&&pt&&pt.thisDep,!tr&&pt&&pt.contextDep,!tr&&pt&&pt.propDep,function(Pa,Da){var Qa=Pa.shared.context,Ra=En;"width"in ar||(Ra=Da.def(Qa,".",mn,"-",Zr));var ii=ka;return"height"in ar||(ii=Da.def(Qa,".",Dn,"-",un)),[Zr,un,Ra,ii]})}else if(Zt in er){var ma=er[Zt],ha=fo(ma,function(Pa,Da){var Qa=Pa.invoke(Da,ma),Ra=Pa.shared.context,ii=Da.def(Qa,".x|0"),xi=Da.def(Qa,".y|0"),Xi=Da.def('"width" in ',Qa,"?",Qa,".width|0:","(",Ra,".",mn,"-",ii,")"),co=Da.def('"height" in ',Qa,"?",Qa,".height|0:","(",Ra,".",Dn,"-",xi,")");return[ii,xi,Xi,co]});return pt&&(ha.thisDep=ha.thisDep||pt.thisDep,ha.contextDep=ha.contextDep||pt.contextDep,ha.propDep=ha.propDep||pt.propDep),ha}else return pt?new Ci(pt.thisDep,pt.contextDep,pt.propDep,function(Pa,Da){var Qa=Pa.shared.context;return[0,0,Da.def(Qa,".",mn),Da.def(Qa,".",Dn)]}):null}var gr=ur(Yc);if(gr){var vr=gr;gr=new Ci(gr.thisDep,gr.contextDep,gr.propDep,function(Zt,ar){var tr=vr.append(Zt,ar),Zr=Zt.shared.context;return ar.set(Zr,"."+nt,tr[2]),ar.set(Zr,"."+ct,tr[3]),tr})}return{viewport:gr,scissor_box:ur(sf)}}function wl(it,pt){var Rt=it.static,or=typeof Rt[Re]=="string"&&typeof Rt[fe]=="string";if(or){if(Object.keys(pt.dynamic).length>0)return null;var er=pt.static,ur=Object.keys(er);if(ur.length>0&&typeof er[ur[0]]=="number"){for(var gr=[],vr=0;vr<ur.length;++vr)gr.push([er[ur[vr]]|0,ur[vr]]);return gr}}return null}function vs(it,pt,Rt){var or=it.static,er=it.dynamic;function ur(tr){if(tr in or){var Zr=kr.id(or[tr]),un=ro(function(){return Zr});return un.id=Zr,un}else if(tr in er){var En=er[tr];return fo(En,function(ka,ma){var ha=ka.invoke(ma,En),Pa=ma.def(ka.shared.strings,".id(",ha,")");return Pa})}return null}var gr=ur(Re),vr=ur(fe),Zt=null,ar;return po(gr)&&po(vr)?(Zt=gi.program(vr.id,gr.id,null,Rt),ar=ro(function(tr,Zr){return tr.link(Zt)})):ar=new Ci(gr&&gr.thisDep||vr&&vr.thisDep,gr&&gr.contextDep||vr&&vr.contextDep,gr&&gr.propDep||vr&&vr.propDep,function(tr,Zr){var un=tr.shared.shader,En;gr?En=gr.append(tr,Zr):En=Zr.def(un,".",Re);var ka;vr?ka=vr.append(tr,Zr):ka=Zr.def(un,".",fe);var ma=un+".program("+ka+","+En;return Zr.def(ma+")")}),{frag:gr,vert:vr,progVar:ar,program:Zt}}function zu(it,pt){var Rt=it.static,or=it.dynamic,er={},ur=!1;function gr(){if(Tr in Rt){var Da=Rt[Tr];return Da!==null&&ri.getVAO(Da)===null&&(Da=ri.createVAO(Da)),ur=!0,er.vao=Da,ro(function(Ra){var ii=ri.getVAO(Da);return ii?Ra.link(ii):"null"})}else if(Tr in or){ur=!0;var Qa=or[Tr];return fo(Qa,function(Ra,ii){var xi=Ra.invoke(ii,Qa);return ii.def(Ra.shared.vao+".getVAO("+xi+")")})}return null}var vr=gr(),Zt=!1;function ar(){if(Oe in Rt){var Da=Rt[Oe];if(er.elements=Da,ei(Da)){var Qa=er.elements=Rn.create(Da,!0);Da=Rn.getElements(Qa),Zt=!0}else Da&&(Da=Rn.getElements(Da),Zt=!0);var Ra=ro(function(xi,Xi){if(Da){var co=xi.link(Da);return xi.ELEMENTS=co,co}return xi.ELEMENTS=null,null});return Ra.value=Da,Ra}else if(Oe in or){Zt=!0;var ii=or[Oe];return fo(ii,function(xi,Xi){var co=xi.shared,Is=co.isBufferArgs,Cs=co.elements,kl=xi.invoke(Xi,ii),Tl=Xi.def("null"),Rl=Xi.def(Is,"(",kl,")"),Pl=xi.cond(Rl).then(Tl,"=",Cs,".createStream(",kl,");").else(Tl,"=",Cs,".getElements(",kl,");");return Xi.entry(Pl),Xi.exit(xi.cond(Rl).then(Cs,".destroyStream(",Tl,");")),xi.ELEMENTS=Tl,Tl})}else if(ur)return new Ci(vr.thisDep,vr.contextDep,vr.propDep,function(xi,Xi){return Xi.def(xi.shared.vao+".currentVAO?"+xi.shared.elements+".getElements("+xi.shared.vao+".currentVAO.elements):null")});return null}var tr=ar();function Zr(){if(We in Rt){var Da=Rt[We];return er.primitive=Da,ro(function(Ra,ii){return fa[Da]})}else if(We in or){var Qa=or[We];return fo(Qa,function(Ra,ii){var xi=Ra.constants.primTypes,Xi=Ra.invoke(ii,Qa);return ii.def(xi,"[",Xi,"]")})}else{if(Zt)return po(tr)?tr.value?ro(function(Ra,ii){return ii.def(Ra.ELEMENTS,".primType")}):ro(function(){return Te}):new Ci(tr.thisDep,tr.contextDep,tr.propDep,function(Ra,ii){var xi=Ra.ELEMENTS;return ii.def(xi,"?",xi,".primType:",Te)});if(ur)return new Ci(vr.thisDep,vr.contextDep,vr.propDep,function(Ra,ii){return ii.def(Ra.shared.vao+".currentVAO?"+Ra.shared.vao+".currentVAO.primitive:"+Te)})}return null}function un(Da,Qa){if(Da in Rt){var Ra=Rt[Da]|0;return Qa?er.offset=Ra:er.instances=Ra,ro(function(xi,Xi){return Qa&&(xi.OFFSET=Ra),Ra})}else if(Da in or){var ii=or[Da];return fo(ii,function(xi,Xi){var co=xi.invoke(Xi,ii);return Qa&&(xi.OFFSET=co),co})}else if(Qa){if(Zt)return ro(function(xi,Xi){return xi.OFFSET=0,0});if(ur)return new Ci(vr.thisDep,vr.contextDep,vr.propDep,function(xi,Xi){return Xi.def(xi.shared.vao+".currentVAO?"+xi.shared.vao+".currentVAO.offset:0")})}else if(ur)return new Ci(vr.thisDep,vr.contextDep,vr.propDep,function(xi,Xi){return Xi.def(xi.shared.vao+".currentVAO?"+xi.shared.vao+".currentVAO.instances:-1")});return null}var En=un(Nt,!0);function ka(){if(Ct in Rt){var Da=Rt[Ct]|0;return er.count=Da,ro(function(){return Da})}else if(Ct in or){var Qa=or[Ct];return fo(Qa,function(Xi,co){var Is=Xi.invoke(co,Qa);return Is})}else if(Zt)if(po(tr)){if(tr)return En?new Ci(En.thisDep,En.contextDep,En.propDep,function(Xi,co){var Is=co.def(Xi.ELEMENTS,".vertCount-",Xi.OFFSET);return Is}):ro(function(Xi,co){return co.def(Xi.ELEMENTS,".vertCount")});var Ra=ro(function(){return-1});return Ra}else{var ii=new Ci(tr.thisDep||En.thisDep,tr.contextDep||En.contextDep,tr.propDep||En.propDep,function(Xi,co){var Is=Xi.ELEMENTS;return Xi.OFFSET?co.def(Is,"?",Is,".vertCount-",Xi.OFFSET,":-1"):co.def(Is,"?",Is,".vertCount:-1")});return ii}else if(ur){var xi=new Ci(vr.thisDep,vr.contextDep,vr.propDep,function(Xi,co){return co.def(Xi.shared.vao,".currentVAO?",Xi.shared.vao,".currentVAO.count:-1")});return xi}return null}var ma=Zr(),ha=ka(),Pa=un(rr,!1);return{elements:tr,primitive:ma,count:ha,instances:Pa,offset:En,vao:vr,vaoActive:ur,elementsActive:Zt,static:er}}function cl(it,pt){var Rt=it.static,or=it.dynamic,er={};return Ea.forEach(function(ur){var gr=Jn(ur);function vr(Zt,ar){if(ur in Rt){var tr=Zt(Rt[ur]);er[gr]=ro(function(){return tr})}else if(ur in or){var Zr=or[ur];er[gr]=fo(Zr,function(un,En){return ar(un,En,un.invoke(En,Zr))})}}switch(ur){case No:case $s:case gs:case jf:case iu:case qf:case Ec:case Ic:case uh:case Ou:return vr(function(Zt){return Zt},function(Zt,ar,tr){return tr});case hl:return vr(function(Zt){return ba[Zt]},function(Zt,ar,tr){var Zr=Zt.constants.compareFuncs;return ar.def(Zr,"[",tr,"]")});case Bu:return vr(function(Zt){return Zt},function(Zt,ar,tr){var Zr=ar.def("+",tr,"[0]"),un=ar.def("+",tr,"[1]");return[Zr,un]});case Bl:return vr(function(Zt){var ar="srcRGB"in Zt?Zt.srcRGB:Zt.src,tr="srcAlpha"in Zt?Zt.srcAlpha:Zt.src,Zr="dstRGB"in Zt?Zt.dstRGB:Zt.dst,un="dstAlpha"in Zt?Zt.dstAlpha:Zt.dst;return[Qn[ar],Qn[Zr],Qn[tr],Qn[un]]},function(Zt,ar,tr){var Zr=Zt.constants.blendFuncs;function un(Qa,Ra){var ii=ar.def('"',Qa,Ra,'" in ',tr,"?",tr,".",Qa,Ra,":",tr,".",Qa);return ii}var En=un("src","RGB"),ka=un("dst","RGB"),ma=ar.def(Zr,"[",En,"]"),ha=ar.def(Zr,"[",un("src","Alpha"),"]"),Pa=ar.def(Zr,"[",ka,"]"),Da=ar.def(Zr,"[",un("dst","Alpha"),"]");return[ma,Pa,ha,Da]});case au:return vr(function(Zt){if(typeof Zt=="string")return[wa[Zt],wa[Zt]];if(typeof Zt=="object")return[wa[Zt.rgb],wa[Zt.alpha]]},function(Zt,ar,tr){var Zr=Zt.constants.blendEquations,un=ar.def(),En=ar.def(),ka=Zt.cond("typeof ",tr,'==="string"');return ka.then(un,"=",En,"=",Zr,"[",tr,"];"),ka.else(un,"=",Zr,"[",tr,".rgb];",En,"=",Zr,"[",tr,".alpha];"),ar(ka),[un,En]});case Nl:return vr(function(Zt){return y(4,function(ar){return+Zt[ar]})},function(Zt,ar,tr){return y(4,function(Zr){return ar.def("+",tr,"[",Zr,"]")})});case ju:return vr(function(Zt){return Zt|0},function(Zt,ar,tr){return ar.def(tr,"|0")});case Uf:return vr(function(Zt){var ar=Zt.cmp||"keep",tr=Zt.ref||0,Zr="mask"in Zt?Zt.mask:-1;return[ba[ar],tr,Zr]},function(Zt,ar,tr){var Zr=Zt.constants.compareFuncs,un=ar.def('"cmp" in ',tr,"?",Zr,"[",tr,".cmp]",":",Pr),En=ar.def(tr,".ref|0"),ka=ar.def('"mask" in ',tr,"?",tr,".mask|0:-1");return[un,En,ka]});case os:case _s:return vr(function(Zt){var ar=Zt.fail||"keep",tr=Zt.zfail||"keep",Zr=Zt.zpass||"keep";return[ur===_s?ft:He,Ca[ar],Ca[tr],Ca[Zr]]},function(Zt,ar,tr){var Zr=Zt.constants.stencilOps;function un(En){return ar.def('"',En,'" in ',tr,"?",Zr,"[",tr,".",En,"]:",Pr)}return[ur===_s?ft:He,un("fail"),un("zfail"),un("zpass")]});case Mc:return vr(function(Zt){var ar=Zt.factor|0,tr=Zt.units|0;return[ar,tr]},function(Zt,ar,tr){var Zr=ar.def(tr,".factor|0"),un=ar.def(tr,".units|0");return[Zr,un]});case Ls:return vr(function(Zt){var ar=0;return Zt==="front"?ar=He:Zt==="back"&&(ar=ft),ar},function(Zt,ar,tr){return ar.def(tr,'==="front"?',He,":",ft)});case Cl:return vr(function(Zt){return Zt},function(Zt,ar,tr){return tr});case Wl:return vr(function(Zt){return Xa[Zt]},function(Zt,ar,tr){return ar.def(tr+'==="cw"?'+Lt+":"+Dt)});case eu:return vr(function(Zt){return Zt.map(function(ar){return!!ar})},function(Zt,ar,tr){return y(4,function(Zr){return"!!"+tr+"["+Zr+"]"})});case Cc:return vr(function(Zt){var ar="value"in Zt?Zt.value:1,tr=!!Zt.invert;return[ar,tr]},function(Zt,ar,tr){var Zr=ar.def('"value" in ',tr,"?+",tr,".value:1"),un=ar.def("!!",tr,".invert");return[Zr,un]})}}),er}function Mu(it,pt){var Rt=it.static,or=it.dynamic,er={};return Object.keys(Rt).forEach(function(ur){var gr=Rt[ur],vr;if(typeof gr=="number"||typeof gr=="boolean")vr=ro(function(){return gr});else if(typeof gr=="function"){var Zt=gr._reglType;Zt==="texture2d"||Zt==="textureCube"?vr=ro(function(ar){return ar.link(gr)}):(Zt==="framebuffer"||Zt==="framebufferCube")&&(vr=ro(function(ar){return ar.link(gr.color[0])}))}else oa(gr)&&(vr=ro(function(ar){var tr=ar.global.def("[",y(gr.length,function(Zr){return gr[Zr]}),"]");return tr}));vr.value=gr,er[ur]=vr}),Object.keys(or).forEach(function(ur){var gr=or[ur];er[ur]=fo(gr,function(vr,Zt){return vr.invoke(Zt,gr)})}),er}function Zu(it,pt){var Rt=it.static,or=it.dynamic,er={};return Object.keys(Rt).forEach(function(ur){var gr=Rt[ur],vr=kr.id(ur),Zt=new ra;if(ei(gr))Zt.state=wi,Zt.buffer=La.getBuffer(La.create(gr,Kt,!1,!0)),Zt.type=0;else{var ar=La.getBuffer(gr);if(ar)Zt.state=wi,Zt.buffer=ar,Zt.type=0;else if("constant"in gr){var tr=gr.constant;Zt.buffer="null",Zt.state=si,typeof tr=="number"?Zt.x=tr:hi.forEach(function(Pa,Da){Da<tr.length&&(Zt[Pa]=tr[Da])})}else{ei(gr.buffer)?ar=La.getBuffer(La.create(gr.buffer,Kt,!1,!0)):ar=La.getBuffer(gr.buffer);var Zr=gr.offset|0,un=gr.stride|0,En=gr.size|0,ka=!!gr.normalized,ma=0;"type"in gr&&(ma=Hn[gr.type]);var ha=gr.divisor|0;Zt.buffer=ar,Zt.state=wi,Zt.size=En,Zt.normalized=ka,Zt.type=ma||ar.dtype,Zt.offset=Zr,Zt.stride=un,Zt.divisor=ha}}er[ur]=ro(function(Pa,Da){var Qa=Pa.attribCache;if(vr in Qa)return Qa[vr];var Ra={isStream:!1};return Object.keys(Zt).forEach(function(ii){Ra[ii]=Zt[ii]}),Zt.buffer&&(Ra.buffer=Pa.link(Zt.buffer),Ra.type=Ra.type||Ra.buffer+".dtype"),Qa[vr]=Ra,Ra})}),Object.keys(or).forEach(function(ur){var gr=or[ur];function vr(Zt,ar){var tr=Zt.invoke(ar,gr),Zr=Zt.shared,un=Zt.constants,En=Zr.isBufferArgs,ka=Zr.buffer,ma={isStream:ar.def(!1)},ha=new ra;ha.state=wi,Object.keys(ha).forEach(function(Ra){ma[Ra]=ar.def(""+ha[Ra])});var Pa=ma.buffer,Da=ma.type;ar("if(",En,"(",tr,")){",ma.isStream,"=true;",Pa,"=",ka,".createStream(",Kt,",",tr,");",Da,"=",Pa,".dtype;","}else{",Pa,"=",ka,".getBuffer(",tr,");","if(",Pa,"){",Da,"=",Pa,".dtype;",'}else if("constant" in ',tr,"){",ma.state,"=",si,";","if(typeof "+tr+'.constant === "number"){',ma[hi[0]],"=",tr,".constant;",hi.slice(1).map(function(Ra){return ma[Ra]}).join("="),"=0;","}else{",hi.map(function(Ra,ii){return ma[Ra]+"="+tr+".constant.length>"+ii+"?"+tr+".constant["+ii+"]:0;"}).join(""),"}}else{","if(",En,"(",tr,".buffer)){",Pa,"=",ka,".createStream(",Kt,",",tr,".buffer);","}else{",Pa,"=",ka,".getBuffer(",tr,".buffer);","}",Da,'="type" in ',tr,"?",un.glTypes,"[",tr,".type]:",Pa,".dtype;",ma.normalized,"=!!",tr,".normalized;");function Qa(Ra){ar(ma[Ra],"=",tr,".",Ra,"|0;")}return Qa("size"),Qa("offset"),Qa("stride"),Qa("divisor"),ar("}}"),ar.exit("if(",ma.isStream,"){",ka,".destroyStream(",Pa,");","}"),ma}er[ur]=fo(gr,vr)}),er}function uc(it){var pt=it.static,Rt=it.dynamic,or={};return Object.keys(pt).forEach(function(er){var ur=pt[er];or[er]=ro(function(gr,vr){return typeof ur=="number"||typeof ur=="boolean"?""+ur:gr.link(ur)})}),Object.keys(Rt).forEach(function(er){var ur=Rt[er];or[er]=fo(ur,function(gr,vr){return gr.invoke(vr,ur)})}),or}function kf(it,pt,Rt,or,er){it.static,it.dynamic;var ur=wl(it,pt),gr=ns(it),vr=ds(it,gr),Zt=zu(it),ar=cl(it),tr=vs(it,er,ur);function Zr(Pa){var Da=vr[Pa];Da&&(ar[Pa]=Da)}Zr(Yc),Zr(Jn(sf));var un=Object.keys(ar).length>0,En={framebuffer:gr,draw:Zt,shader:tr,state:ar,dirty:un,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(En.profile=Uo(it),En.uniforms=Mu(Rt),En.drawVAO=En.scopeVAO=Zt.vao,!En.drawVAO&&tr.program&&!ur&&Dr.angle_instanced_arrays&&Zt.static.elements){var ka=!0,ma=tr.program.attributes.map(function(Pa){var Da=pt.static[Pa];return ka=ka&&!!Da,Da});if(ka&&ma.length>0){var ha=ri.getVAO(ri.createVAO({attributes:ma,elements:Zt.static.elements}));En.drawVAO=new Ci(null,null,null,function(Pa,Da){return Pa.link(ha)}),En.useVAO=!0}}return ur?En.useVAO=!0:En.attributes=Zu(pt),En.context=uc(or),En}function hu(it,pt,Rt){var or=it.shared,er=or.context,ur=it.scope();Object.keys(Rt).forEach(function(gr){pt.save(er,"."+gr);var vr=Rt[gr],Zt=vr.append(it,pt);Array.isArray(Zt)?ur(er,".",gr,"=[",Zt.join(),"];"):ur(er,".",gr,"=",Zt,";")}),pt(ur)}function wu(it,pt,Rt,or){var er=it.shared,ur=er.gl,gr=er.framebuffer,vr;Sa&&(vr=pt.def(er.extensions,".webgl_draw_buffers"));var Zt=it.constants,ar=Zt.drawBuffer,tr=Zt.backBuffer,Zr;Rt?Zr=Rt.append(it,pt):Zr=pt.def(gr,".next"),or||pt("if(",Zr,"!==",gr,".cur){"),pt("if(",Zr,"){",ur,".bindFramebuffer(",Gn,",",Zr,".framebuffer);"),Sa&&pt(vr,".drawBuffersWEBGL(",ar,"[",Zr,".colorAttachments.length]);"),pt("}else{",ur,".bindFramebuffer(",Gn,",null);"),Sa&&pt(vr,".drawBuffersWEBGL(",tr,");"),pt("}",gr,".cur=",Zr,";"),or||pt("}")}function Ro(it,pt,Rt){var or=it.shared,er=or.gl,ur=it.current,gr=it.next,vr=or.current,Zt=or.next,ar=it.cond(vr,".dirty");Ea.forEach(function(tr){var Zr=Jn(tr);if(!(Zr in Rt.state)){var un,En;if(Zr in gr){un=gr[Zr],En=ur[Zr];var ka=y(li[Zr].length,function(ha){return ar.def(un,"[",ha,"]")});ar(it.cond(ka.map(function(ha,Pa){return ha+"!=="+En+"["+Pa+"]"}).join("||")).then(er,".",ki[Zr],"(",ka,");",ka.map(function(ha,Pa){return En+"["+Pa+"]="+ha}).join(";"),";"))}else{un=ar.def(Zt,".",Zr);var ma=it.cond(un,"!==",vr,".",Zr);ar(ma),Zr in pa?ma(it.cond(un).then(er,".enable(",pa[Zr],");").else(er,".disable(",pa[Zr],");"),vr,".",Zr,"=",un,";"):ma(er,".",ki[Zr],"(",un,");",vr,".",Zr,"=",un,";")}}}),Object.keys(Rt.state).length===0&&ar(vr,".dirty=false;"),pt(ar)}function cc(it,pt,Rt,or){var er=it.shared,ur=it.current,gr=er.current,vr=er.gl,Zt;Ma(Object.keys(Rt)).forEach(function(ar){var tr=Rt[ar];if(!(or&&!or(tr))){var Zr=tr.append(it,pt);if(pa[ar]){var un=pa[ar];po(tr)?(Zt=it.link(Zr,{stable:!0}),pt(it.cond(Zt).then(vr,".enable(",un,");").else(vr,".disable(",un,");")),pt(gr,".",ar,"=",Zt,";")):(pt(it.cond(Zr).then(vr,".enable(",un,");").else(vr,".disable(",un,");")),pt(gr,".",ar,"=",Zr,";"))}else if(oa(Zr)){var En=ur[ar];pt(vr,".",ki[ar],"(",Zr,");",Zr.map(function(ka,ma){return En+"["+ma+"]="+ka}).join(";"),";")}else po(tr)?(Zt=it.link(Zr,{stable:!0}),pt(vr,".",ki[ar],"(",Zt,");",gr,".",ar,"=",Zt,";")):pt(vr,".",ki[ar],"(",Zr,");",gr,".",ar,"=",Zr,";")}})}function Js(it,pt){Fa&&(it.instancing=pt.def(it.shared.extensions,".angle_instanced_arrays"))}function Zl(it,pt,Rt,or,er){var ur=it.shared,gr=it.stats,vr=ur.current,Zt=ur.timer,ar=Rt.profile;function tr(){return typeof performance>"u"?"Date.now()":"performance.now()"}var Zr,un;function En(Qa){Zr=pt.def(),Qa(Zr,"=",tr(),";"),typeof er=="string"?Qa(gr,".count+=",er,";"):Qa(gr,".count++;"),di&&(or?(un=pt.def(),Qa(un,"=",Zt,".getNumPendingQueries();")):Qa(Zt,".beginQuery(",gr,");"))}function ka(Qa){Qa(gr,".cpuTime+=",tr(),"-",Zr,";"),di&&(or?Qa(Zt,".pushScopeStats(",un,",",Zt,".getNumPendingQueries(),",gr,");"):Qa(Zt,".endQuery();"))}function ma(Qa){var Ra=pt.def(vr,".profile");pt(vr,".profile=",Qa,";"),pt.exit(vr,".profile=",Ra,";")}var ha;if(ar){if(po(ar)){ar.enable?(En(pt),ka(pt.exit),ma("true")):ma("false");return}ha=ar.append(it,pt),ma(ha)}else ha=pt.def(vr,".profile");var Pa=it.block();En(Pa),pt("if(",ha,"){",Pa,"}");var Da=it.block();ka(Da),pt.exit("if(",ha,"){",Da,"}")}function bc(it,pt,Rt,or,er){var ur=it.shared;function gr(Zt){switch(Zt){case Mi:case us:case vl:return 2;case go:case sl:case Eu:return 3;case jo:case ll:case vu:return 4;default:return 1}}function vr(Zt,ar,tr){var Zr=ur.gl,un=pt.def(Zt,".location"),En=pt.def(ur.attributes,"[",un,"]"),ka=tr.state,ma=tr.buffer,ha=[tr.x,tr.y,tr.z,tr.w],Pa=["buffer","normalized","offset","stride"];function Da(){pt("if(!",En,".buffer){",Zr,".enableVertexAttribArray(",un,");}");var Ra=tr.type,ii;if(tr.size?ii=pt.def(tr.size,"||",ar):ii=ar,pt("if(",En,".type!==",Ra,"||",En,".size!==",ii,"||",Pa.map(function(Xi){return En+"."+Xi+"!=="+tr[Xi]}).join("||"),"){",Zr,".bindBuffer(",Kt,",",ma,".buffer);",Zr,".vertexAttribPointer(",[un,ii,Ra,tr.normalized,tr.stride,tr.offset],");",En,".type=",Ra,";",En,".size=",ii,";",Pa.map(function(Xi){return En+"."+Xi+"="+tr[Xi]+";"}).join(""),"}"),Fa){var xi=tr.divisor;pt("if(",En,".divisor!==",xi,"){",it.instancing,".vertexAttribDivisorANGLE(",[un,xi],");",En,".divisor=",xi,";}")}}function Qa(){pt("if(",En,".buffer){",Zr,".disableVertexAttribArray(",un,");",En,".buffer=null;","}if(",hi.map(function(Ra,ii){return En+"."+Ra+"!=="+ha[ii]}).join("||"),"){",Zr,".vertexAttrib4f(",un,",",ha,");",hi.map(function(Ra,ii){return En+"."+Ra+"="+ha[ii]+";"}).join(""),"}")}ka===wi?Da():ka===si?Qa():(pt("if(",ka,"===",wi,"){"),Da(),pt("}else{"),Qa(),pt("}"))}or.forEach(function(Zt){var ar=Zt.name,tr=Rt.attributes[ar],Zr;if(tr){if(!er(tr))return;Zr=tr.append(it,pt)}else{if(!er(Fo))return;var un=it.scopeAttrib(ar);Zr={},Object.keys(new ra).forEach(function(En){Zr[En]=pt.def(un,".",En)})}vr(it.link(Zt),gr(Zt.info.type),Zr)})}function wc(it,pt,Rt,or,er,ur){for(var gr=it.shared,vr=gr.gl,Zt,ar=0;ar<or.length;++ar){var tr=or[ar],Zr=tr.name,un=tr.info.type,En=Rt.uniforms[Zr],ka=it.link(tr),ma=ka+".location",ha;if(En){if(!er(En))continue;if(po(En)){var Pa=En.value;if(un===yc||un===Zc){var Da=it.link(Pa._texture||Pa.color[0]._texture);pt(vr,".uniform1i(",ma,",",Da+".bind());"),pt.exit(Da,".unbind();")}else if(un===Us||un===qs||un===Hu){var Qa=it.global.def("new Float32Array(["+Array.prototype.slice.call(Pa)+"])"),Ra=2;un===qs?Ra=3:un===Hu&&(Ra=4),pt(vr,".uniformMatrix",Ra,"fv(",ma,",false,",Qa,");")}else{switch(un){case yi:Zt="1f";break;case Mi:Zt="2f";break;case go:Zt="3f";break;case jo:Zt="4f";break;case Bs:Zt="1i";break;case Do:Zt="1i";break;case vl:Zt="2i";break;case us:Zt="2i";break;case Eu:Zt="3i";break;case sl:Zt="3i";break;case vu:Zt="4i";break;case ll:Zt="4i";break}pt(vr,".uniform",Zt,"(",ma,",",oa(Pa)?Array.prototype.slice.call(Pa):Pa,");")}continue}else ha=En.append(it,pt)}else{if(!er(Fo))continue;ha=pt.def(gr.uniforms,"[",kr.id(Zr),"]")}un===yc?pt("if(",ha,"&&",ha,'._reglType==="framebuffer"){',ha,"=",ha,".color[0];","}"):un===Zc&&pt("if(",ha,"&&",ha,'._reglType==="framebufferCube"){',ha,"=",ha,".color[0];","}");var ii=1;switch(un){case yc:case Zc:var xi=pt.def(ha,"._texture");pt(vr,".uniform1i(",ma,",",xi,".bind());"),pt.exit(xi,".unbind();");continue;case Do:case Bs:Zt="1i";break;case us:case vl:Zt="2i",ii=2;break;case sl:case Eu:Zt="3i",ii=3;break;case ll:case vu:Zt="4i",ii=4;break;case yi:Zt="1f";break;case Mi:Zt="2f",ii=2;break;case go:Zt="3f",ii=3;break;case jo:Zt="4f",ii=4;break;case Us:Zt="Matrix2fv";break;case qs:Zt="Matrix3fv";break;case Hu:Zt="Matrix4fv";break}if(Zt.charAt(0)==="M"){pt(vr,".uniform",Zt,"(",ma,",");var Xi=Math.pow(un-Us+2,2),co=it.global.def("new Float32Array(",Xi,")");Array.isArray(ha)?pt("false,(",y(Xi,function(Rl){return co+"["+Rl+"]="+ha[Rl]}),",",co,")"):pt("false,(Array.isArray(",ha,")||",ha," instanceof Float32Array)?",ha,":(",y(Xi,function(Rl){return co+"["+Rl+"]="+ha+"["+Rl+"]"}),",",co,")"),pt(");")}else if(ii>1){for(var Is=[],Cs=[],kl=0;kl<ii;++kl)Array.isArray(ha)?Cs.push(ha[kl]):Cs.push(pt.def(ha+"["+kl+"]")),ur&&Is.push(pt.def());ur&&pt("if(!",it.batchId,"||",Is.map(function(Rl,Pl){return Rl+"!=="+Cs[Pl]}).join("||"),"){",Is.map(function(Rl,Pl){return Rl+"="+Cs[Pl]+";"}).join("")),pt(vr,".uniform",Zt,"(",ma,",",Cs.join(","),");"),ur&&pt("}")}else{if(ur){var Tl=pt.def();pt("if(!",it.batchId,"||",Tl,"!==",ha,"){",Tl,"=",ha,";")}pt(vr,".uniform",Zt,"(",ma,",",ha,");"),ur&&pt("}")}}}function Go(it,pt,Rt,or){var er=it.shared,ur=er.gl,gr=er.draw,vr=or.draw;function Zt(){var ii=vr.elements,xi,Xi=pt;return ii?((ii.contextDep&&or.contextDynamic||ii.propDep)&&(Xi=Rt),xi=ii.append(it,Xi),vr.elementsActive&&Xi("if("+xi+")"+ur+".bindBuffer("+Cr+","+xi+".buffer.buffer);")):(xi=Xi.def(),Xi(xi,"=",gr,".",Oe,";","if(",xi,"){",ur,".bindBuffer(",Cr,",",xi,".buffer.buffer);}","else if(",er.vao,".currentVAO){",xi,"=",it.shared.elements+".getElements("+er.vao,".currentVAO.elements);",zi?"":"if("+xi+")"+ur+".bindBuffer("+Cr+","+xi+".buffer.buffer);","}")),xi}function ar(){var ii=vr.count,xi,Xi=pt;return ii?((ii.contextDep&&or.contextDynamic||ii.propDep)&&(Xi=Rt),xi=ii.append(it,Xi)):xi=Xi.def(gr,".",Ct),xi}var tr=Zt();function Zr(ii){var xi=vr[ii];return xi?xi.contextDep&&or.contextDynamic||xi.propDep?xi.append(it,Rt):xi.append(it,pt):pt.def(gr,".",ii)}var un=Zr(We),En=Zr(Nt),ka=ar();if(typeof ka=="number"){if(ka===0)return}else Rt("if(",ka,"){"),Rt.exit("}");var ma,ha;Fa&&(ma=Zr(rr),ha=it.instancing);var Pa=tr+".type",Da=vr.elements&&po(vr.elements)&&!vr.vaoActive;function Qa(){function ii(){Rt(ha,".drawElementsInstancedANGLE(",[un,ka,Pa,En+"<<(("+Pa+"-"+Gi+")>>1)",ma],");")}function xi(){Rt(ha,".drawArraysInstancedANGLE(",[un,En,ka,ma],");")}tr&&tr!=="null"?Da?ii():(Rt("if(",tr,"){"),ii(),Rt("}else{"),xi(),Rt("}")):xi()}function Ra(){function ii(){Rt(ur+".drawElements("+[un,ka,Pa,En+"<<(("+Pa+"-"+Gi+")>>1)"]+");")}function xi(){Rt(ur+".drawArrays("+[un,En,ka]+");")}tr&&tr!=="null"?Da?ii():(Rt("if(",tr,"){"),ii(),Rt("}else{"),xi(),Rt("}")):xi()}Fa&&(typeof ma!="number"||ma>=0)?typeof ma=="string"?(Rt("if(",ma,">0){"),Qa(),Rt("}else if(",ma,"<0){"),Ra(),Rt("}")):Qa():Ra()}function Ms(it,pt,Rt,or,er){var ur=pi(),gr=ur.proc("body",er);return Fa&&(ur.instancing=gr.def(ur.shared.extensions,".angle_instanced_arrays")),it(ur,gr,Rt,or),ur.compile().body}function Rs(it,pt,Rt,or){Js(it,pt),Rt.useVAO?Rt.drawVAO?pt(it.shared.vao,".setVAO(",Rt.drawVAO.append(it,pt),");"):pt(it.shared.vao,".setVAO(",it.shared.vao,".targetVAO);"):(pt(it.shared.vao,".setVAO(null);"),bc(it,pt,Rt,or.attributes,function(){return!0})),wc(it,pt,Rt,or.uniforms,function(){return!0},!1),Go(it,pt,pt,Rt)}function Me(it,pt){var Rt=it.proc("draw",1);Js(it,Rt),hu(it,Rt,pt.context),wu(it,Rt,pt.framebuffer),Ro(it,Rt,pt),cc(it,Rt,pt.state),Zl(it,Rt,pt,!1,!0);var or=pt.shader.progVar.append(it,Rt);if(Rt(it.shared.gl,".useProgram(",or,".program);"),pt.shader.program)Rs(it,Rt,pt,pt.shader.program);else{Rt(it.shared.vao,".setVAO(null);");var er=it.global.def("{}"),ur=Rt.def(or,".id"),gr=Rt.def(er,"[",ur,"]");Rt(it.cond(gr).then(gr,".call(this,a0);").else(gr,"=",er,"[",ur,"]=",it.link(function(vr){return Ms(Rs,it,pt,vr,1)}),"(",or,");",gr,".call(this,a0);"))}Object.keys(pt.state).length>0&&Rt(it.shared.current,".dirty=true;"),it.shared.vao&&Rt(it.shared.vao,".setVAO(null);")}function X(it,pt,Rt,or){it.batchId="a1",Js(it,pt);function er(){return!0}bc(it,pt,Rt,or.attributes,er),wc(it,pt,Rt,or.uniforms,er,!1),Go(it,pt,pt,Rt)}function ye(it,pt,Rt,or){Js(it,pt);var er=Rt.contextDep,ur=pt.def(),gr="a0",vr="a1",Zt=pt.def();it.shared.props=Zt,it.batchId=ur;var ar=it.scope(),tr=it.scope();pt(ar.entry,"for(",ur,"=0;",ur,"<",vr,";++",ur,"){",Zt,"=",gr,"[",ur,"];",tr,"}",ar.exit);function Zr(Pa){return Pa.contextDep&&er||Pa.propDep}function un(Pa){return!Zr(Pa)}if(Rt.needsContext&&hu(it,tr,Rt.context),Rt.needsFramebuffer&&wu(it,tr,Rt.framebuffer),cc(it,tr,Rt.state,Zr),Rt.profile&&Zr(Rt.profile)&&Zl(it,tr,Rt,!1,!0),or)Rt.useVAO?Rt.drawVAO?Zr(Rt.drawVAO)?tr(it.shared.vao,".setVAO(",Rt.drawVAO.append(it,tr),");"):ar(it.shared.vao,".setVAO(",Rt.drawVAO.append(it,ar),");"):ar(it.shared.vao,".setVAO(",it.shared.vao,".targetVAO);"):(ar(it.shared.vao,".setVAO(null);"),bc(it,ar,Rt,or.attributes,un),bc(it,tr,Rt,or.attributes,Zr)),wc(it,ar,Rt,or.uniforms,un,!1),wc(it,tr,Rt,or.uniforms,Zr,!0),Go(it,ar,tr,Rt);else{var En=it.global.def("{}"),ka=Rt.shader.progVar.append(it,tr),ma=tr.def(ka,".id"),ha=tr.def(En,"[",ma,"]");tr(it.shared.gl,".useProgram(",ka,".program);","if(!",ha,"){",ha,"=",En,"[",ma,"]=",it.link(function(Pa){return Ms(X,it,Rt,Pa,2)}),"(",ka,");}",ha,".call(this,a0[",ur,"],",ur,");")}}function ne(it,pt){var Rt=it.proc("batch",2);it.batchId="0",Js(it,Rt);var or=!1,er=!0;Object.keys(pt.context).forEach(function(En){or=or||pt.context[En].propDep}),or||(hu(it,Rt,pt.context),er=!1);var ur=pt.framebuffer,gr=!1;ur?(ur.propDep?or=gr=!0:ur.contextDep&&or&&(gr=!0),gr||wu(it,Rt,ur)):wu(it,Rt,null),pt.state.viewport&&pt.state.viewport.propDep&&(or=!0);function vr(En){return En.contextDep&&or||En.propDep}Ro(it,Rt,pt),cc(it,Rt,pt.state,function(En){return!vr(En)}),(!pt.profile||!vr(pt.profile))&&Zl(it,Rt,pt,!1,"a1"),pt.contextDep=or,pt.needsContext=er,pt.needsFramebuffer=gr;var Zt=pt.shader.progVar;if(Zt.contextDep&&or||Zt.propDep)ye(it,Rt,pt,null);else{var ar=Zt.append(it,Rt);if(Rt(it.shared.gl,".useProgram(",ar,".program);"),pt.shader.program)ye(it,Rt,pt,pt.shader.program);else{Rt(it.shared.vao,".setVAO(null);");var tr=it.global.def("{}"),Zr=Rt.def(ar,".id"),un=Rt.def(tr,"[",Zr,"]");Rt(it.cond(un).then(un,".call(this,a0,a1);").else(un,"=",tr,"[",Zr,"]=",it.link(function(En){return Ms(ye,it,pt,En,2)}),"(",ar,");",un,".call(this,a0,a1);"))}}Object.keys(pt.state).length>0&&Rt(it.shared.current,".dirty=true;"),it.shared.vao&&Rt(it.shared.vao,".setVAO(null);")}function Se(it,pt){var Rt=it.proc("scope",3);it.batchId="a2";var or=it.shared,er=or.current;if(hu(it,Rt,pt.context),pt.framebuffer&&pt.framebuffer.append(it,Rt),Ma(Object.keys(pt.state)).forEach(function(vr){var Zt=pt.state[vr],ar=Zt.append(it,Rt);oa(ar)?ar.forEach(function(tr,Zr){no(tr)?Rt.set(it.next[vr],"["+Zr+"]",tr):Rt.set(it.next[vr],"["+Zr+"]",it.link(tr,{stable:!0}))}):po(Zt)?Rt.set(or.next,"."+vr,it.link(ar,{stable:!0})):Rt.set(or.next,"."+vr,ar)}),Zl(it,Rt,pt,!0,!0),[Oe,Nt,Ct,rr,We].forEach(function(vr){var Zt=pt.draw[vr];if(Zt){var ar=Zt.append(it,Rt);no(ar)?Rt.set(or.draw,"."+vr,ar):Rt.set(or.draw,"."+vr,it.link(ar),{stable:!0})}}),Object.keys(pt.uniforms).forEach(function(vr){var Zt=pt.uniforms[vr].append(it,Rt);Array.isArray(Zt)&&(Zt="["+Zt.map(function(ar){return no(ar)?ar:it.link(ar,{stable:!0})})+"]"),Rt.set(or.uniforms,"["+it.link(kr.id(vr),{stable:!0})+"]",Zt)}),Object.keys(pt.attributes).forEach(function(vr){var Zt=pt.attributes[vr].append(it,Rt),ar=it.scopeAttrib(vr);Object.keys(new ra).forEach(function(tr){Rt.set(ar,"."+tr,Zt[tr])})}),pt.scopeVAO){var ur=pt.scopeVAO.append(it,Rt);no(ur)?Rt.set(or.vao,".targetVAO",ur):Rt.set(or.vao,".targetVAO",it.link(ur,{stable:!0}))}function gr(vr){var Zt=pt.shader[vr];if(Zt){var ar=Zt.append(it,Rt);no(ar)?Rt.set(or.shader,"."+vr,ar):Rt.set(or.shader,"."+vr,it.link(ar,{stable:!0}))}}gr(fe),gr(Re),Object.keys(pt.state).length>0&&(Rt(er,".dirty=true;"),Rt.exit(er,".dirty=true;")),Rt("a1(",it.shared.context,",a0,",it.batchId,");")}function Je(it){if(!(typeof it!="object"||oa(it))){for(var pt=Object.keys(it),Rt=0;Rt<pt.length;++Rt)if(d.isDynamic(it[pt[Rt]]))return!0;return!1}}function xt(it,pt,Rt){var or=pt.static[Rt];if(!or||!Je(or))return;var er=it.global,ur=Object.keys(or),gr=!1,vr=!1,Zt=!1,ar=it.global.def("{}");ur.forEach(function(Zr){var un=or[Zr];if(d.isDynamic(un)){typeof un=="function"&&(un=or[Zr]=d.unbox(un));var En=fo(un,null);gr=gr||En.thisDep,Zt=Zt||En.propDep,vr=vr||En.contextDep}else{switch(er(ar,".",Zr,"="),typeof un){case"number":er(un);break;case"string":er('"',un,'"');break;case"object":Array.isArray(un)&&er("[",un.join(),"]");break;default:er(it.link(un));break}er(";")}});function tr(Zr,un){ur.forEach(function(En){var ka=or[En];if(d.isDynamic(ka)){var ma=Zr.invoke(un,ka);un(ar,".",En,"=",ma,";")}})}pt.dynamic[Rt]=new d.DynamicVariable(rs,{thisDep:gr,contextDep:vr,propDep:Zt,ref:ar,append:tr}),delete pt.static[Rt]}function At(it,pt,Rt,or,er){var ur=pi();ur.stats=ur.link(er),Object.keys(pt.static).forEach(function(vr){xt(ur,pt,vr)}),zt.forEach(function(vr){xt(ur,it,vr)});var gr=kf(it,pt,Rt,or,ur);return gr.shader.program&&(gr.shader.program.attributes.sort(function(vr,Zt){return vr.name<Zt.name?-1:1}),gr.shader.program.uniforms.sort(function(vr,Zt){return vr.name<Zt.name?-1:1})),Me(ur,gr),Se(ur,gr),ne(ur,gr),v(ur.compile(),{destroy:function(){gr.shader.program.destroy()}})}return{next:eo,current:li,procs:(function(){var it=pi(),pt=it.proc("poll"),Rt=it.proc("refresh"),or=it.block();pt(or),Rt(or);var er=it.shared,ur=er.gl,gr=er.next,vr=er.current;or(vr,".dirty=false;"),wu(it,pt),wu(it,Rt,null,!0);var Zt;Fa&&(Zt=it.link(Fa)),Dr.oes_vertex_array_object&&Rt(it.link(Dr.oes_vertex_array_object),".bindVertexArrayOES(null);");var ar=Rt.def(er.attributes),tr=Rt.def(0),Zr=it.cond(tr,".buffer");Zr.then(ur,".enableVertexAttribArray(i);",ur,".bindBuffer(",Kt,",",tr,".buffer.buffer);",ur,".vertexAttribPointer(i,",tr,".size,",tr,".type,",tr,".normalized,",tr,".stride,",tr,".offset);").else(ur,".disableVertexAttribArray(i);",ur,".vertexAttrib4f(i,",tr,".x,",tr,".y,",tr,".z,",tr,".w);",tr,".buffer=null;");var un=it.link(Xn.maxAttributes,{stable:!0});return Rt("for(var i=0;i<",un,";++i){",tr,"=",ar,"[i];",Zr,"}"),Fa&&Rt("for(var i=0;i<",un,";++i){",Zt,".vertexAttribDivisorANGLE(i,",ar,"[i].divisor);","}"),Rt(it.shared.vao,".currentVAO=null;",it.shared.vao,".setVAO(",it.shared.vao,".targetVAO);"),Object.keys(pa).forEach(function(En){var ka=pa[En],ma=or.def(gr,".",En),ha=it.block();ha("if(",ma,"){",ur,".enable(",ka,")}else{",ur,".disable(",ka,")}",vr,".",En,"=",ma,";"),Rt(ha),pt("if(",ma,"!==",vr,".",En,"){",ha,"}")}),Object.keys(ki).forEach(function(En){var ka=ki[En],ma=li[En],ha,Pa,Da=it.block();if(Da(ur,".",ka,"("),oa(ma)){var Qa=ma.length;ha=it.global.def(gr,".",En),Pa=it.global.def(vr,".",En),Da(y(Qa,function(Ra){return ha+"["+Ra+"]"}),");",y(Qa,function(Ra){return Pa+"["+Ra+"]="+ha+"["+Ra+"];"}).join("")),pt("if(",y(Qa,function(Ra){return ha+"["+Ra+"]!=="+Pa+"["+Ra+"]"}).join("||"),"){",Da,"}")}else ha=or.def(gr,".",En),Pa=or.def(vr,".",En),Da(ha,");",vr,".",En,"=",ha,";"),pt("if(",ha,"!==",Pa,"){",Da,"}");Rt(Da)}),it.compile()})(),compile:At}}function il(){return{vaoCount:0,bufferCount:0,elementsCount:0,framebufferCount:0,shaderCount:0,textureCount:0,cubeCount:0,renderbufferCount:0,maxTextureUnits:0}}var Wo=34918,bs=34919,dl=35007,Gu=function(St,kr){if(!kr.ext_disjoint_timer_query)return null;var Dr=[];function Xn(){return Dr.pop()||kr.ext_disjoint_timer_query.createQueryEXT()}function La(wa){Dr.push(wa)}var Rn=[];function Pn(wa){var Fa=Xn();kr.ext_disjoint_timer_query.beginQueryEXT(dl,Fa),Rn.push(Fa),di(Rn.length-1,Rn.length,wa)}function ni(){kr.ext_disjoint_timer_query.endQueryEXT(dl)}function ti(){this.startQueryIndex=-1,this.endQueryIndex=-1,this.sum=0,this.stats=null}var ri=[];function gi(){return ri.pop()||new ti}function io(wa){ri.push(wa)}var qi=[];function di(wa,Fa,Sa){var zi=gi();zi.startQueryIndex=wa,zi.endQueryIndex=Fa,zi.sum=0,zi.stats=Sa,qi.push(zi)}var Na=[],yn=[];function ra(){var wa,Fa,Sa=Rn.length;if(Sa!==0){yn.length=Math.max(yn.length,Sa+1),Na.length=Math.max(Na.length,Sa+1),Na[0]=0,yn[0]=0;var zi=0;for(wa=0,Fa=0;Fa<Rn.length;++Fa){var li=Rn[Fa];kr.ext_disjoint_timer_query.getQueryObjectEXT(li,bs)?(zi+=kr.ext_disjoint_timer_query.getQueryObjectEXT(li,Wo),La(li)):Rn[wa++]=li,Na[Fa+1]=zi,yn[Fa+1]=wa}for(Rn.length=wa,wa=0,Fa=0;Fa<qi.length;++Fa){var eo=qi[Fa],Ea=eo.startQueryIndex,pa=eo.endQueryIndex;eo.sum+=Na[pa]-Na[Ea];var ki=yn[Ea],Jn=yn[pa];Jn===ki?(eo.stats.gpuTime+=eo.sum/1e6,io(eo)):(eo.startQueryIndex=ki,eo.endQueryIndex=Jn,qi[wa++]=eo)}qi.length=wa}}return{beginQuery:Pn,endQuery:ni,pushScopeStats:di,update:ra,getNumPendingQueries:function(){return Rn.length},clear:function(){Dr.push.apply(Dr,Rn);for(var wa=0;wa<Dr.length;wa++)kr.ext_disjoint_timer_query.deleteQueryEXT(Dr[wa]);Rn.length=0,Dr.length=0},restore:function(){Rn.length=0,Dr.length=0}}},fu=16384,ko=256,Vs=1024,ul=34962,ou="webglcontextlost",Yl="webglcontextrestored",Dc=1,jl=2,su=3;function lf(St,kr){for(var Dr=0;Dr<St.length;++Dr)if(St[Dr]===kr)return Dr;return-1}function Uu(St){var kr=b(St);if(!kr)return null;var Dr=kr.gl,Xn=Dr.getContextAttributes();Dr.isContextLost();var La=A(Dr,kr);if(!La)return null;var Rn=m(),Pn=il(),ni=kr.cachedCode||{},ti=La.extensions,ri=Gu(Dr,ti),gi=g(),io=Dr.drawingBufferWidth,qi=Dr.drawingBufferHeight,di={tick:0,time:0,viewportWidth:io,viewportHeight:qi,framebufferWidth:io,framebufferHeight:qi,drawingBufferWidth:io,drawingBufferHeight:qi,pixelRatio:kr.pixelRatio},Na={},yn={elements:null,primitive:4,count:-1,offset:0,instances:-1},ra=fn(Dr,ti),wa=Ln(Dr,Pn,kr,zi),Fa=xr(Dr,ti,wa,Pn),Sa=gf(Dr,ti,ra,Pn,wa,Fa,yn);function zi(Go){return Sa.destroyBuffer(Go)}var li=af(Dr,Rn,Pn,kr),eo=Af(Dr,ti,ra,function(){ki.procs.poll()},di,Pn,kr),Ea=Qf(Dr,ti,ra,Pn,kr),pa=yh(Dr,ti,ra,eo,Ea,Pn),ki=Ho(Dr,Rn,ti,ra,wa,Fa,eo,pa,Na,Sa,li,yn,di,ri,ni,kr),Jn=xc(Dr,pa,ki.procs.poll,di),_i=ki.next,ai=Dr.canvas,no=[],Xo=[],Vi=[],lo=[kr.onDestroy],pi=null;function Uo(){if(no.length===0){ri&&ri.update(),pi=null;return}pi=h.next(Uo),wu();for(var Go=no.length-1;Go>=0;--Go){var Ms=no[Go];Ms&&Ms(di,null,0)}Dr.flush(),ri&&ri.update()}function ns(){!pi&&no.length>0&&(pi=h.next(Uo))}function ds(){pi&&(h.cancel(Uo),pi=null)}function wl(Go){Go.preventDefault(),ds(),Xo.forEach(function(Ms){Ms()})}function vs(Go){Dr.getError(),La.restore(),li.restore(),wa.restore(),eo.restore(),Ea.restore(),pa.restore(),Sa.restore(),ri&&ri.restore(),ki.procs.refresh(),ns(),Vi.forEach(function(Ms){Ms()})}ai&&(ai.addEventListener(ou,wl,!1),ai.addEventListener(Yl,vs,!1));function zu(){no.length=0,ds(),ai&&(ai.removeEventListener(ou,wl),ai.removeEventListener(Yl,vs)),li.clear(),pa.clear(),Ea.clear(),Sa.clear(),eo.clear(),Fa.clear(),wa.clear(),ri&&ri.clear(),lo.forEach(function(Go){Go()})}function cl(Go){function Ms(er){var ur=v({},er);delete ur.uniforms,delete ur.attributes,delete ur.context,delete ur.vao,"stencil"in ur&&ur.stencil.op&&(ur.stencil.opBack=ur.stencil.opFront=ur.stencil.op,delete ur.stencil.op);function gr(vr){if(vr in ur){var Zt=ur[vr];delete ur[vr],Object.keys(Zt).forEach(function(ar){ur[vr+"."+ar]=Zt[ar]})}}return gr("blend"),gr("depth"),gr("cull"),gr("stencil"),gr("polygonOffset"),gr("scissor"),gr("sample"),"vao"in er&&(ur.vao=er.vao),ur}function Rs(er,ur){var gr={},vr={};return Object.keys(er).forEach(function(Zt){var ar=er[Zt];if(d.isDynamic(ar)){vr[Zt]=d.unbox(ar,Zt);return}else if(ur&&Array.isArray(ar)){for(var tr=0;tr<ar.length;++tr)if(d.isDynamic(ar[tr])){vr[Zt]=d.unbox(ar,Zt);return}}gr[Zt]=ar}),{dynamic:vr,static:gr}}var Me=Rs(Go.context||{},!0),X=Rs(Go.uniforms||{},!0),ye=Rs(Go.attributes||{},!1),ne=Rs(Ms(Go),!1),Se={gpuTime:0,cpuTime:0,count:0},Je=ki.compile(ne,ye,X,Me,Se),xt=Je.draw,At=Je.batch,it=Je.scope,pt=[];function Rt(er){for(;pt.length<er;)pt.push(null);return pt}function or(er,ur){var gr;if(typeof er=="function")return it.call(this,null,er,0);if(typeof ur=="function")if(typeof er=="number")for(gr=0;gr<er;++gr)it.call(this,null,ur,gr);else if(Array.isArray(er))for(gr=0;gr<er.length;++gr)it.call(this,er[gr],ur,gr);else return it.call(this,er,ur,0);else if(typeof er=="number"){if(er>0)return At.call(this,Rt(er|0),er|0)}else if(Array.isArray(er)){if(er.length)return At.call(this,er,er.length)}else return xt.call(this,er)}return v(or,{stats:Se,destroy:function(){Je.destroy()}})}var Mu=pa.setFBO=cl({framebuffer:d.define.call(null,Dc,"framebuffer")});function Zu(Go,Ms){var Rs=0;ki.procs.poll();var Me=Ms.color;Me&&(Dr.clearColor(+Me[0]||0,+Me[1]||0,+Me[2]||0,+Me[3]||0),Rs|=fu),"depth"in Ms&&(Dr.clearDepth(+Ms.depth),Rs|=ko),"stencil"in Ms&&(Dr.clearStencil(Ms.stencil|0),Rs|=Vs),Dr.clear(Rs)}function uc(Go){if("framebuffer"in Go)if(Go.framebuffer&&Go.framebuffer_reglType==="framebufferCube")for(var Ms=0;Ms<6;++Ms)Mu(v({framebuffer:Go.framebuffer.faces[Ms]},Go),Zu);else Mu(Go,Zu);else Zu(null,Go)}function kf(Go){no.push(Go);function Ms(){var Rs=lf(no,Go);function Me(){var X=lf(no,Me);no[X]=no[no.length-1],no.length-=1,no.length<=0&&ds()}no[Rs]=Me}return ns(),{cancel:Ms}}function hu(){var Go=_i.viewport,Ms=_i.scissor_box;Go[0]=Go[1]=Ms[0]=Ms[1]=0,di.viewportWidth=di.framebufferWidth=di.drawingBufferWidth=Go[2]=Ms[2]=Dr.drawingBufferWidth,di.viewportHeight=di.framebufferHeight=di.drawingBufferHeight=Go[3]=Ms[3]=Dr.drawingBufferHeight}function wu(){di.tick+=1,di.time=cc(),hu(),ki.procs.poll()}function Ro(){eo.refresh(),hu(),ki.procs.refresh(),ri&&ri.update()}function cc(){return(g()-gi)/1e3}Ro();function Js(Go,Ms){var Rs;switch(Go){case"frame":return kf(Ms);case"lost":Rs=Xo;break;case"restore":Rs=Vi;break;case"destroy":Rs=lo;break}return Rs.push(Ms),{cancel:function(){for(var Me=0;Me<Rs.length;++Me)if(Rs[Me]===Ms){Rs[Me]=Rs[Rs.length-1],Rs.pop();return}}}}function Zl(){return ni}function bc(Go){Object.entries(Go).forEach(function(Ms){ni[Ms[0]]=Ms[1]})}var wc=v(cl,{clear:uc,prop:d.define.bind(null,Dc),context:d.define.bind(null,jl),this:d.define.bind(null,su),draw:cl({}),buffer:function(Go){return wa.create(Go,ul,!1,!1)},elements:function(Go){return Fa.create(Go,!1)},texture:eo.create2D,cube:eo.createCube,renderbuffer:Ea.create,framebuffer:pa.create,framebufferCube:pa.createCube,vao:Sa.createVAO,attributes:Xn,frame:kf,on:Js,limits:ra,hasExtension:function(Go){return ra.extensions.indexOf(Go.toLowerCase())>=0},read:Jn,destroy:zu,_gl:Dr,_refresh:Ro,poll:function(){wu(),ri&&ri.update()},now:cc,stats:Pn,getCachedCode:Zl,preloadCachedCode:bc});return kr.onDone(null,wc),wc}return Uu})}}),NR=Ne({"src/lib/prepare_regl.js"(te,Z){var v=nN(),w=Tee();Z.exports=function(P,t,r){var a=P._fullLayout,l=!0;return a._glcanvas.each(function(i){if(i.regl){i.regl.preloadCachedCode(r);return}if(!(i.pick&&!a._has("parcoords"))){try{i.regl=w({canvas:this,attributes:{antialias:!i.pick,preserveDrawingBuffer:!0},pixelRatio:P._context.plotGlPixelRatio||window.devicePixelRatio,extensions:t||[],cachedCode:r||{}})}catch{l=!1}i.regl||(l=!1),l&&this.addEventListener("webglcontextlost",function(s){P&&P.emit&&P.emit("plotly_webglcontextlost",{event:s,layer:i.key})},!1)}}),l||v({container:a._glcontainer.node()}),l}}}),WN=Ne({"src/traces/scattergl/plot.js"(d,Z){var v=SN(),w=NN(),C=oee(),P=wee(),t=In(),r=Pm().selectMode,a=NR(),l=yu(),i=$p(),s=wN().styleTextSelection,o={};function u(h,g,m,E){var c=h._size,_=h.width*E,T=h.height*E,M=c.l*E,k=c.b*E,b=c.r*E,A=c.t*E,y=c.w*E,f=c.h*E;return[M+g.domain[0]*y,k+m.domain[0]*f,_-b-(1-g.domain[1])*y,T-A-(1-m.domain[1])*f]}var d=Z.exports=function(g,m,E){if(E.length){var c=g._fullLayout,_=m._scene,T=m.xaxis,M=m.yaxis,k,b;if(_){var A=a(g,["ANGLE_instanced_arrays","OES_element_index_uint"],o);if(!A){_.init();return}var y=_.count,f=c._glcanvas.data()[0].regl;if(i(g,m,E),_.dirty){if((_.line2d||_.error2d)&&!(_.scatter2d||_.fill2d||_.glText)&&f.clear({color:!0,depth:!0}),_.error2d===!0&&(_.error2d=C(f)),_.line2d===!0&&(_.line2d=w(f)),_.scatter2d===!0&&(_.scatter2d=v(f)),_.fill2d===!0&&(_.fill2d=w(f)),_.glText===!0)for(_.glText=new Array(y),k=0;k<y;k++)_.glText[k]=new P(f);if(_.glText){if(y>_.glText.length){var p=y-_.glText.length;for(k=0;k<p;k++)_.glText.push(new P(f))}else if(y<_.glText.length){var x=_.glText.length-y,N=_.glText.splice(y,x);N.forEach(function(Y){Y.destroy()})}for(k=0;k<y;k++)_.glText[k].update(_.textOptions[k])}if(_.line2d&&(_.line2d.update(_.lineOptions),_.lineOptions=_.lineOptions.map(function(Y){if(Y&&Y.positions){for(var ce=Y.positions,ue=0;ue<ce.length&&(isNaN(ce[ue])||isNaN(ce[ue+1]));)ue+=2;for(var _e=ce.length-2;_e>ue&&(isNaN(ce[_e])||isNaN(ce[_e+1]));)_e-=2;Y.positions=ce.slice(ue,_e+2)}return Y}),_.line2d.update(_.lineOptions)),_.error2d){var D=(_.errorXOptions||[]).concat(_.errorYOptions||[]);_.error2d.update(D)}_.scatter2d&&_.scatter2d.update(_.markerOptions),_.fillOrder=t.repeat(null,y),_.fill2d&&(_.fillOptions=_.fillOptions.map(function(Y,ce){var ue=E[ce];if(!(!Y||!ue||!ue[0]||!ue[0].trace)){var _e=ue[0],Le=_e.trace,ze=_e.t,Xe=_.lineOptions[ce],Ve,rt,mt=[];Le._ownfill&&mt.push(ce),Le._nexttrace&&mt.push(ce+1),mt.length&&(_.fillOrder[ce]=mt);var _t=[],vt=Xe&&Xe.positions||ze.positions,ut,Fe;if(Le.fill==="tozeroy"){for(ut=0;ut<vt.length&&isNaN(vt[ut+1]);)ut+=2;for(Fe=vt.length-2;Fe>ut&&isNaN(vt[Fe+1]);)Fe-=2;vt[ut+1]!==0&&(_t=[vt[ut],0]),_t=_t.concat(vt.slice(ut,Fe+2)),vt[Fe+1]!==0&&(_t=_t.concat([vt[Fe],0]))}else if(Le.fill==="tozerox"){for(ut=0;ut<vt.length&&isNaN(vt[ut]);)ut+=2;for(Fe=vt.length-2;Fe>ut&&isNaN(vt[Fe]);)Fe-=2;vt[ut]!==0&&(_t=[0,vt[ut+1]]),_t=_t.concat(vt.slice(ut,Fe+2)),vt[Fe]!==0&&(_t=_t.concat([0,vt[Fe+1]]))}else if(Le.fill==="toself"||Le.fill==="tonext"){for(_t=[],Ve=0,Y.splitNull=!0,rt=0;rt<vt.length;rt+=2)(isNaN(vt[rt])||isNaN(vt[rt+1]))&&(_t=_t.concat(vt.slice(Ve,rt)),_t.push(vt[Ve],vt[Ve+1]),_t.push(null,null),Ve=rt+2);_t=_t.concat(vt.slice(Ve)),Ve&&_t.push(vt[Ve],vt[Ve+1])}else{var Pe=Le._nexttrace;if(Pe){var be=_.lineOptions[ce+1];if(be){var Ye=be.positions;if(Le.fill==="tonexty"){for(_t=vt.slice(),ce=Math.floor(Ye.length/2);ce--;){var yt=Ye[ce*2],wt=Ye[ce*2+1];isNaN(yt)||isNaN(wt)||_t.push(yt,wt)}Y.fill=Pe.fillcolor}}}}if(Le._prevtrace&&Le._prevtrace.fill==="tonext"){var ht=_.lineOptions[ce-1].positions,Yt=_t.length/2;Ve=Yt;var $t=[Ve];for(rt=0;rt<ht.length;rt+=2)(isNaN(ht[rt])||isNaN(ht[rt+1]))&&($t.push(rt/2+Yt+1),Ve=rt+2);_t=_t.concat(ht),Y.hole=$t}return Y.fillmode=Le.fill,Y.opacity=Le.opacity,Y.positions=_t,Y}}),_.fill2d.update(_.fillOptions))}var B=c.dragmode,U=r(B),V=c.clickmode.indexOf("select")>-1;for(k=0;k<y;k++){var q=E[k][0],z=q.trace,H=q.t,G=H.index,J=z._length,le=H.x,ge=H.y;if(z.selectedpoints||U||V){if(U||(U=!0),z.selectedpoints){var de=_.selectBatch[G]=t.selIndices2selPoints(z),me={};for(b=0;b<de.length;b++)me[de[b]]=1;var W=[];for(b=0;b<J;b++)me[b]||W.push(b);_.unselectBatch[G]=W}var ie=H.xpx=new Array(J),se=H.ypx=new Array(J);for(b=0;b<J;b++)ie[b]=T.c2p(le[b]),se[b]=M.c2p(ge[b])}else H.xpx=H.ypx=null}if(U){if(_.select2d||(_.select2d=v(c._glcanvas.data()[1].regl)),_.scatter2d){var ee=new Array(y);for(k=0;k<y;k++)ee[k]=_.selectBatch[k].length||_.unselectBatch[k].length?_.markerUnselectedOptions[k]:{};_.scatter2d.update(ee)}_.select2d&&(_.select2d.update(_.markerOptions),_.select2d.update(_.markerSelectedOptions)),_.glText&&E.forEach(function(Y){var ce=((Y||[])[0]||{}).trace||{};l.hasText(ce)&&s(Y)})}else _.scatter2d&&_.scatter2d.update(_.markerOptions);var pe={viewport:u(c,T,M,g._context.plotGlPixelRatio),range:[(T._rl||T.range)[0],(M._rl||M.range)[0],(T._rl||T.range)[1],(M._rl||M.range)[1]]},oe=t.repeat(pe,_.count);_.fill2d&&_.fill2d.update(oe),_.line2d&&_.line2d.update(oe),_.error2d&&_.error2d.update(oe.concat(oe)),_.scatter2d&&_.scatter2d.update(oe),_.select2d&&_.select2d.update(oe),_.glText&&_.glText.forEach(function(Y){Y.update(pe)})}}};d.reglPrecompiled=o}}),Aee=Ne({"src/traces/scattergl/index.js"(te,Z){var v=aQ();v.plot=WN(),Z.exports=v}}),See=Ne({"lib/scattergl.js"(te,Z){Z.exports=Aee()}}),YN=Ne({"src/traces/splom/attributes.js"(te,Z){var v=tf(),w=Wu(),C=Ac().axisHoverFormat,{hovertemplateAttrs:P,templatefallbackAttrs:t}=Fl(),r=fk(),a=wh().idRegex,l=Cu().templatedArray,i=fi().extendFlat,s=v.marker,o=s.line,u=i(w("marker.line",{editTypeOverride:"calc"}),{width:i({},o.width,{editType:"calc"}),editType:"calc"}),d=i(w("marker"),{symbol:s.symbol,angle:s.angle,size:i({},s.size,{editType:"markerSize"}),sizeref:s.sizeref,sizemin:s.sizemin,sizemode:s.sizemode,opacity:s.opacity,colorbar:s.colorbar,line:u,editType:"calc"});d.color.editType=d.cmin.editType=d.cmax.editType="style";function h(g){return{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"subplotid",regex:a[g],editType:"plot"}}}Z.exports={dimensions:l("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:i({},r.text,{}),hovertext:i({},r.hovertext,{}),hovertemplate:P(),hovertemplatefallback:t(),xhoverformat:C("x"),yhoverformat:C("y"),marker:d,xaxes:h("x"),yaxes:h("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:r.selected.marker,editType:"calc"},unselected:{marker:r.unselected.marker,editType:"calc"},opacity:r.opacity}}}),FR=Ne({"src/traces/parcoords/merge_length.js"(te,Z){Z.exports=function(v,w,C,P){P||(P=1/0);var t,r;for(t=0;t<w.length;t++)r=w[t],r.visible&&(P=Math.min(P,r[C].length));for(P===1/0&&(P=0),v._length=P,t=0;t<w.length;t++)r=w[t],r.visible&&(r._length=P);return P}}}),Eee=Ne({"src/traces/splom/defaults.js"(te,Z){var v=In(),w=jd(),C=YN(),P=yu(),t=wv(),r=FR(),a=LR().isOpenSymbol;Z.exports=function(o,u,d,h){function g(b,A){return v.coerce(o,u,C,b,A)}var m=w(o,u,{name:"dimensions",handleItemDefaults:l}),E=g("diagonal.visible"),c=g("showupperhalf"),_=g("showlowerhalf"),T=r(u,m,"values");if(!T||!E&&!c&&!_){u.visible=!1;return}g("text"),g("hovertext"),g("hovertemplate"),g("hovertemplatefallback"),g("xhoverformat"),g("yhoverformat"),t(o,u,d,h,g,{noAngleRef:!0,noStandOff:!0});var M=a(u.marker.symbol),k=P.isBubble(u);g("marker.line.width",M||k?1:0),i(o,u,h,g),v.coerceSelectionMarkerOpacity(u,g)};function l(s,o){function u(h,g){return v.coerce(s,o,C.dimensions,h,g)}u("label");var d=u("values");d&&d.length?u("visible"):o.visible=!1,u("axis.type"),u("axis.matches")}function i(s,o,u,d){var h=o.dimensions,g=h.length,m=o.showupperhalf,E=o.showlowerhalf,c=o.diagonal.visible,_,T,M=new Array(g),k=new Array(g);for(_=0;_<g;_++){var b=_?_+1:"";M[_]="x"+b,k[_]="y"+b}var A=d("xaxes",M),y=d("yaxes",k),f=o._diag=new Array(g);o._xaxes={},o._yaxes={};var p=[],x=[];function N(J,le,ge,de){if(J){var me=J.charAt(0),W=u._splomAxes[me];if(o["_"+me+"axes"][J]=1,de.push(J),!(J in W)){var ie=W[J]={};ge&&(ie.label=ge.label||"",ge.visible&&ge.axis&&(ge.axis.type&&(ie.type=ge.axis.type),ge.axis.matches&&(ie.matches=le)))}}}var D=!c&&!E,B=!c&&!m;for(o._axesDim={},_=0;_<g;_++){var U=h[_],V=_===0,q=_===g-1,z=V&&D||q&&B?void 0:A[_],H=V&&B||q&&D?void 0:y[_];N(z,H,U,p),N(H,z,U,x),f[_]=[z,H],o._axesDim[z]=_,o._axesDim[H]=_}for(_=0;_<p.length;_++)for(T=0;T<x.length;T++){var G=p[_]+x[T];(_>T&&m||_<T&&E||_===T&&(c||!E||!m))&&(u._splomSubplots[G]=1)}(!E||!c&&m&&E)&&(u._splomGridDflt.xside="bottom",u._splomGridDflt.yside="left")}}}),Mee=Ne({"src/traces/splom/scene_update.js"(te,Z){var v=In();Z.exports=function(C,P){var t=C._fullLayout,r=P.uid,a=t._splomScenes;a||(a=t._splomScenes={});var l={dirty:!0,selectBatch:[],unselectBatch:[]},i={matrix:!1,selectBatch:[],unselectBatch:[]},s=a[P.uid];return s||(s=a[r]=v.extendFlat({},l,i),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||v.extendFlat(s,l),s}}}),Cee=Ne({"src/traces/splom/calc.js"(te,Z){var v=In(),w=Wf(),C=Vv().calcMarkerSize,P=Vv().calcAxisExpansion,t=Yp(),r=_3().markerSelection,a=_3().markerStyle,l=Mee(),i=da().BADNUM,s=zb().TOO_MANY_POINTS;Z.exports=function(u,d){var h=d.dimensions,g=d._length,m={},E=m.cdata=[],c=m.data=[],_=d._visibleDims=[],T,M,k,b,A;function y(D,B){for(var U=D.makeCalcdata({v:B.values,vcalendar:d.calendar},"v"),V=0;V<U.length;V++)U[V]=U[V]===i?NaN:U[V];E.push(U),c.push(D.type==="log"?v.simpleMap(U,D.c2l):U)}for(T=0;T<h.length;T++)if(k=h[T],k.visible){if(b=w.getFromId(u,d._diag[T][0]),A=w.getFromId(u,d._diag[T][1]),b&&A&&b.type!==A.type){v.log("Skipping splom dimension "+T+" with conflicting axis types");continue}b?(y(b,k),A&&A.type==="category"&&(A._categories=b._categories.slice())):y(A,k),_.push(T)}t(u,d),v.extendFlat(m,a(u,d));var f=E.length,p=f*g>s,x;for(p?x=m.sizeAvg||Math.max(m.size,3):x=C(d,g),M=0;M<_.length;M++)T=_[M],k=h[T],b=w.getFromId(u,d._diag[T][0])||{},A=w.getFromId(u,d._diag[T][1])||{},P(u,d,b,A,E[M],E[M],x);var N=l(u,d);return N.matrix||(N.matrix=!0),N.matrixOptions=m,N.selectedOptions=r(u,d,d.selected),N.unselectedOptions=r(u,d,d.unselected),[{x:!1,y:!1,t:{},trace:d}]}}}),kee=Ne({"node_modules/performance-now/lib/performance-now.js"(te,Z){(function(){var v,w,C,P,t,r;typeof performance<"u"&&performance!==null&&performance.now?Z.exports=function(){return performance.now()}:typeof process<"u"&&process!==null&&process.hrtime?(Z.exports=function(){return(v()-t)/1e6},w=process.hrtime,v=function(){var a;return a=w(),a[0]*1e9+a[1]},P=v(),r=process.uptime()*1e9,t=P-r):Date.now?(Z.exports=function(){return Date.now()-C},C=Date.now()):(Z.exports=function(){return new Date().getTime()-C},C=new Date().getTime())}).call(te)}}),Pee=Ne({"node_modules/raf/index.js"(te,Z){var v=kee(),w=window,C=["moz","webkit"],P="AnimationFrame",t=w["request"+P],r=w["cancel"+P]||w["cancelRequest"+P];for(a=0;!t&&a<C.length;a++)t=w[C[a]+"Request"+P],r=w[C[a]+"Cancel"+P]||w[C[a]+"CancelRequest"+P];var a;(!t||!r)&&(l=0,i=0,s=[],o=1e3/60,t=function(u){if(s.length===0){var d=v(),h=Math.max(0,o-(d-l));l=h+d,setTimeout(function(){var g=s.slice(0);s.length=0;for(var m=0;m<g.length;m++)if(!g[m].cancelled)try{g[m].callback(l)}catch(E){setTimeout(function(){throw E},0)}},Math.round(h))}return s.push({handle:++i,callback:u,cancelled:!1}),i},r=function(u){for(var d=0;d<s.length;d++)s[d].handle===u&&(s[d].cancelled=!0)});var l,i,s,o;Z.exports=function(u){return t.call(w,u)},Z.exports.cancel=function(){r.apply(w,arguments)},Z.exports.polyfill=function(u){u||(u=w),u.requestAnimationFrame=t,u.cancelAnimationFrame=r}}}),Lee=Ne({"node_modules/array-range/index.js"(te,Z){Z.exports=function(w,C){var P=typeof w=="number",t=typeof C=="number";P&&!t?(C=w,w=0):!P&&!t&&(w=0,C=0),w=w|0,C=C|0;var r=C-w;if(r<0)throw new Error("array length must be positive");for(var a=new Array(r),l=0,i=w;l<r;l++,i++)a[l]=i;return a}}}),Ree=Ne({"node_modules/regl-splom/index.js"(te,Z){var v=SN(),w=n1(),C=g3(),P=Pee(),t=Lee(),r=JS(),a=y3();Z.exports=l;function l(u,d){if(!(this instanceof l))return new l(u);this.traces=[],this.passes={},this.regl=u,this.scatter=v(u),this.canvas=this.scatter.canvas}l.prototype.render=function(...u){return u.length&&this.update(...u),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?this.planned==null&&(this.planned=P(()=>{this.draw(),this.dirty=!0,this.planned=null})):(this.draw(),this.dirty=!0,P(()=>{this.dirty=!1})),this)},l.prototype.update=function(...u){if(!u.length)return;for(let g=0;g<u.length;g++)this.updateItem(g,u[g]);this.traces=this.traces.filter(Boolean);let d=[],h=0;for(let g=0;g<this.traces.length;g++){let m=this.traces[g],E=this.traces[g].passes;for(let c=0;c<E.length;c++)d.push(this.passes[E[c]]);m.passOffset=h,h+=m.passes.length}return this.scatter.update(...d),this},l.prototype.updateItem=function(u,d){let{regl:h}=this;if(d===null)return this.traces[u]=null,this;if(!d)return this;let g=w(d,{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"}),m=this.traces[u]||(this.traces[u]={id:u,buffer:h.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),color:"black",marker:null,size:12,borderColor:"transparent",borderSize:1,viewport:r([h._gl.drawingBufferWidth,h._gl.drawingBufferHeight]),padding:[0,0,0,0],opacity:1,diagonal:!0,upper:!0,lower:!0});if(g.color!=null&&(m.color=g.color),g.size!=null&&(m.size=g.size),g.marker!=null&&(m.marker=g.marker),g.borderColor!=null&&(m.borderColor=g.borderColor),g.borderSize!=null&&(m.borderSize=g.borderSize),g.opacity!=null&&(m.opacity=g.opacity),g.viewport&&(m.viewport=r(g.viewport)),g.diagonal!=null&&(m.diagonal=g.diagonal),g.upper!=null&&(m.upper=g.upper),g.lower!=null&&(m.lower=g.lower),g.data){m.buffer(a(g.data)),m.columns=g.data.length,m.count=g.data[0].length,m.bounds=[];for(let p=0;p<m.columns;p++)m.bounds[p]=C(g.data[p],1)}let E;g.range&&(m.range=g.range,E=m.range&&typeof m.range[0]!="number"),g.domain&&(m.domain=g.domain);let c=!1;g.padding!=null&&(Array.isArray(g.padding)&&g.padding.length===m.columns&&typeof g.padding[g.padding.length-1]=="number"?(m.padding=g.padding.map(o),c=!0):m.padding=o(g.padding));let _=m.columns,T=m.count,M=m.viewport.width,k=m.viewport.height,b=m.viewport.x,A=m.viewport.y,y=M/_,f=k/_;m.passes=[];for(let p=0;p<_;p++)for(let x=0;x<_;x++){if(!m.diagonal&&x===p||!m.upper&&p>x||!m.lower&&p<x)continue;let N=i(m.id,p,x),D=this.passes[N]||(this.passes[N]={});if(g.data&&(g.transpose?D.positions={x:{buffer:m.buffer,offset:x,count:T,stride:_},y:{buffer:m.buffer,offset:p,count:T,stride:_}}:D.positions={x:{buffer:m.buffer,offset:x*T,count:T},y:{buffer:m.buffer,offset:p*T,count:T}},D.bounds=s(m.bounds,p,x)),g.domain||g.viewport||g.data){let B=c?s(m.padding,p,x):m.padding;if(m.domain){let[U,V,q,z]=s(m.domain,p,x);D.viewport=[b+U*M+B[0],A+V*k+B[1],b+q*M-B[2],A+z*k-B[3]]}else D.viewport=[b+x*y+y*B[0],A+p*f+f*B[1],b+(x+1)*y-y*B[2],A+(p+1)*f-f*B[3]]}g.color&&(D.color=m.color),g.size&&(D.size=m.size),g.marker&&(D.marker=m.marker),g.borderSize&&(D.borderSize=m.borderSize),g.borderColor&&(D.borderColor=m.borderColor),g.opacity&&(D.opacity=m.opacity),g.range&&(D.range=E?s(m.range,p,x):m.range||D.bounds),m.passes.push(N)}return this},l.prototype.draw=function(...u){if(!u.length)this.scatter.draw();else{let d=[];for(let h=0;h<u.length;h++)if(typeof u[h]=="number"){let{passes:g,passOffset:m}=this.traces[u[h]];d.push(...t(m,m+g.length))}else if(u[h].length){let g=u[h],{passes:m,passOffset:E}=this.traces[h];m=m.map((c,_)=>{d[E+_]=g})}this.scatter.draw(...d)}return this},l.prototype.destroy=function(){return this.traces.forEach(u=>{u.buffer&&u.buffer.destroy&&u.buffer.destroy()}),this.traces=null,this.passes=null,this.scatter.destroy(),this};function i(u,d,h){let g=u.id!=null?u.id:u,m=d,E=h;return g<<16|(m&255)<<8|E&255}function s(u,d,h){let g,m,E,c,_=u[d],T=u[h];return _.length>2?(_[0],_[2],g=_[1],m=_[3]):_.length?(g=_[0],m=_[1]):(_.x,g=_.y,_.x+_.width,m=_.y+_.height),T.length>2?(E=T[0],c=T[2],T[1],T[3]):T.length?(E=T[0],c=T[1]):(E=T.x,T.y,c=T.x+T.width,T.y+T.height),[E,g,c,m]}function o(u){if(typeof u=="number")return[u,u,u,u];if(u.length===2)return[u[0],u[1],u[0],u[1]];{let d=r(u);return[d.x,d.y,d.x+d.width,d.y+d.height]}}}}),Iee=Ne({"src/traces/splom/plot.js"(te,Z){var v=Ree(),w=In(),C=Wf(),P=Pm().selectMode;Z.exports=function(a,l,i){if(i.length)for(var s=0;s<i.length;s++)t(a,i[s][0])};function t(r,a){var l=r._fullLayout,i=l._size,s=a.trace,o=a.t,u=l._splomScenes[s.uid],d=u.matrixOptions,h=d.cdata,g=l._glcanvas.data()[0].regl,m=l.dragmode,E,c,_,T,M;if(h.length!==0){d.lower=s.showupperhalf,d.upper=s.showlowerhalf,d.diagonal=s.diagonal.visible;var k=s._visibleDims,b=h.length,A=u.viewOpts={};for(A.ranges=new Array(b),A.domains=new Array(b),M=0;M<k.length;M++){_=k[M];var y=A.ranges[M]=new Array(4),f=A.domains[M]=new Array(4);E=C.getFromId(r,s._diag[_][0]),E&&(y[0]=E._rl[0],y[2]=E._rl[1],f[0]=E.domain[0],f[2]=E.domain[1]),c=C.getFromId(r,s._diag[_][1]),c&&(y[1]=c._rl[0],y[3]=c._rl[1],f[1]=c.domain[0],f[3]=c.domain[1])}var p=r._context.plotGlPixelRatio,x=i.l*p,N=i.b*p,D=i.w*p,B=i.h*p;A.viewport=[x,N,D+x,B+N],u.matrix===!0&&(u.matrix=v(g));var U=l.clickmode.indexOf("select")>-1,V=P(m)||!!s.selectedpoints||U,q=!0;if(V){var z=s._length;if(s.selectedpoints){u.selectBatch=s.selectedpoints;var H=s.selectedpoints,G={};for(_=0;_<H.length;_++)G[H[_]]=!0;var J=[];for(_=0;_<z;_++)G[_]||J.push(_);u.unselectBatch=J}var le=o.xpx=new Array(b),ge=o.ypx=new Array(b);for(M=0;M<k.length;M++){if(_=k[M],E=C.getFromId(r,s._diag[_][0]),E)for(le[M]=new Array(z),T=0;T<z;T++)le[M][T]=E.c2p(h[M][T]);if(c=C.getFromId(r,s._diag[_][1]),c)for(ge[M]=new Array(z),T=0;T<z;T++)ge[M][T]=c.c2p(h[M][T])}if(u.selectBatch.length||u.unselectBatch.length){var de=w.extendFlat({},d,u.unselectedOptions,A),me=w.extendFlat({},d,u.selectedOptions,A);u.matrix.update(de,me),q=!1}}else o.xpx=o.ypx=null;if(q){var W=w.extendFlat({},d,A);u.matrix.update(W,null)}}}}}),ZN=Ne({"src/traces/splom/helpers.js"(te){te.getDimIndex=function(v,w){for(var C=w._id,P=C.charAt(0),t={x:0,y:1}[P],r=v._visibleDims,a=0;a<r.length;a++){var l=r[a];if(v._diag[l][t]===C)return a}return!1}}}),Dee=Ne({"src/traces/splom/hover.js"(te,Z){var v=ZN(),w=PR().calcHover,C=Os().getFromId,P=fi().extendFlat;function t(a,l,i,s,o){o||(o={});var u=(s||"").charAt(0)==="x",d=(s||"").charAt(0)==="y",h=r(a,l,i);if((u||d)&&o.hoversubplots==="axis"&&h[0])for(var g=(u?a.xa:a.ya)._subplotsWith,m=o.gd,E=P({},a),c=0;c<g.length;c++){var _=g[c];if(_!==a.xa._id+a.ya._id){d?E.xa=C(m,_,"x"):E.ya=C(m,_,"y");var T=u||d,M=r(E,l,i,T);h=h.concat(M)}}return h}function r(a,l,i,s){var o=a.cd,u=o[0].trace,d=a.scene,h=d.matrixOptions.cdata,g=a.xa,m=a.ya,E=g.c2p(l),c=m.c2p(i),_=a.distance,T=v.getDimIndex(u,g),M=v.getDimIndex(u,m);if(T===!1||M===!1)return[a];for(var k=h[T],b=h[M],A,y,f=_,p=0;p<k.length;p++)if(!(s&&p!==a.index)){var x=k[p],N=b[p],D=g.c2p(x)-E,B=m.c2p(N)-c,U=Math.sqrt(D*D+B*B);(s||U<f)&&(f=y=U,A=p)}return a.index=A,a.distance=f,a.dxy=y,A===void 0?[a]:[w(a,k,b,u)]}Z.exports={hoverPoints:t}}}),Oee=Ne({"src/traces/splom/select.js"(te,Z){var v=In(),w=v.pushUnique,C=yu(),P=ZN();Z.exports=function(r,a){var l=r.cd,i=l[0].trace,s=l[0].t,o=r.scene,u=o.matrixOptions.cdata,d=r.xaxis,h=r.yaxis,g=[];if(!o)return g;var m=!C.hasMarkers(i)&&!C.hasText(i);if(i.visible!==!0||m)return g;var E=P.getDimIndex(i,d),c=P.getDimIndex(i,h);if(E===!1||c===!1)return g;var _=s.xpx[E],T=s.ypx[c],M=u[E],k=u[c],b=(r.scene.selectBatch||[]).slice(),A=[];if(a!==!1&&!a.degenerate)for(var y=0;y<M.length;y++)a.contains([_[y],T[y]],null,y,r)?(g.push({pointNumber:y,x:M[y],y:k[y]}),w(b,y)):b.indexOf(y)!==-1?w(b,y):A.push(y);var f=o.matrixOptions;return!b.length&&!A.length?o.matrix.update(f,null):!o.selectBatch.length&&!o.unselectBatch.length&&o.matrix.update(o.unselectedOptions,v.extendFlat({},f,o.selectedOptions,o.viewOpts)),o.selectBatch=b,o.unselectBatch=A,g}}}),zee=Ne({"src/traces/splom/edit_style.js"(te,Z){var v=In(),w=Yp(),C=_3().markerStyle;Z.exports=function(t,r){var a=r.trace,l=t._fullLayout._splomScenes[a.uid];if(l){w(t,a),v.extendFlat(l.matrixOptions,C(t,a));var i=v.extendFlat({},l.matrixOptions,l.viewOpts);l.matrix.update(i,null)}}}}),Nee=Ne({"src/traces/splom/base_index.js"(te,Z){var v=Yo(),w=EA();Z.exports={moduleType:"trace",name:"splom",categories:["gl","regl","cartesian","symbols","showLegend","scatter-like"],attributes:YN(),supplyDefaults:Eee(),colorbar:sh(),calc:Cee(),plot:Iee(),hoverPoints:Dee().hoverPoints,selectPoints:Oee(),editStyle:zee(),meta:{}},v.register(w)}}),Fee=Ne({"src/traces/splom/base_plot.js"(te,Z){var v=NN(),w=Yo(),C=NR(),P=lv().getModuleCalcData,t=Ih(),r=Wf().getFromId,a=Os().shouldShowZeroLine,l="splom",i={};function s(m){var E=m._fullLayout,c=w.getModule(l),_=P(m.calcdata,c)[0],T=C(m,["ANGLE_instanced_arrays","OES_element_index_uint"],i);T&&(E._hasOnlyLargeSploms&&d(m),c.plot(m,{},_))}function o(m){var E=m.calcdata,c=m._fullLayout;c._hasOnlyLargeSploms&&d(m);for(var _=0;_<E.length;_++){var T=E[_][0],M=T.trace,k=c._splomScenes[M.uid];M.type==="splom"&&k&&k.matrix&&u(m,M,k)}}function u(m,E,c){for(var _=c.matrixOptions.data.length,T=E._visibleDims,M=c.viewOpts.ranges=new Array(_),k=0;k<T.length;k++){var b=T[k],A=M[k]=new Array(4),y=r(m,E._diag[b][0]);y&&(A[0]=y.r2l(y.range[0]),A[2]=y.r2l(y.range[1]));var f=r(m,E._diag[b][1]);f&&(A[1]=f.r2l(f.range[0]),A[3]=f.r2l(f.range[1]))}c.selectBatch.length||c.unselectBatch.length?c.matrix.update({ranges:M},{ranges:M}):c.matrix.update({ranges:M})}function d(m){var E=m._fullLayout,c=E._glcanvas.data()[0].regl,_=E._splomGrid;_||(_=E._splomGrid=v(c)),_.update(h(m))}function h(m){var E=m._context.plotGlPixelRatio,c=m._fullLayout,_=c._size,T=[0,0,c.width*E,c.height*E],M={},k;function b(J,le,ge,de,me,W){ge*=E,de*=E,me*=E,W*=E;var ie=le[J+"color"],se=le[J+"width"],ee=String(ie+se);ee in M?M[ee].data.push(NaN,NaN,ge,de,me,W):M[ee]={data:[ge,de,me,W],join:"rect",thickness:se*E,color:ie,viewport:T,range:T,overlay:!1}}for(k in c._splomSubplots){var A=c._plots[k],y=A.xaxis,f=A.yaxis,p=y._gridVals,x=f._gridVals,N=y._offset,D=y._length,B=f._length,U=_.b+f.domain[0]*_.h,V=-f._m,q=-V*f.r2l(f.range[0],f.calendar),z,H;if(y.showgrid)for(k=0;k<p.length;k++)z=N+y.l2p(p[k].x),b("grid",y,z,U,z,U+B);if(f.showgrid)for(k=0;k<x.length;k++)H=U+q+V*x[k].x,b("grid",f,N,H,N+D,H);a(m,y,f)&&(z=N+y.l2p(0),b("zeroline",y,z,U,z,U+B)),a(m,f,y)&&(H=U+q+0,b("zeroline",f,N,H,N+D,H))}var G=[];for(k in M)G.push(M[k]);return G}function g(m,E,c,_){var T={},M;if(_._splomScenes){for(M=0;M<m.length;M++){var k=m[M];k.type==="splom"&&(T[k.uid]=1)}for(M=0;M<c.length;M++){var b=c[M];if(!T[b.uid]){var A=_._splomScenes[b.uid];A&&A.destroy&&A.destroy(),_._splomScenes[b.uid]=null,delete _._splomScenes[b.uid]}}}Object.keys(_._splomScenes||{}).length===0&&delete _._splomScenes,_._splomGrid&&!E._hasOnlyLargeSploms&&_._hasOnlyLargeSploms&&(_._splomGrid.destroy(),_._splomGrid=null,delete _._splomGrid),t.clean(m,E,c,_)}Z.exports={name:l,attr:t.attr,attrRegex:t.attrRegex,layoutAttributes:t.layoutAttributes,supplyLayoutDefaults:t.supplyLayoutDefaults,drawFramework:t.drawFramework,plot:s,drag:o,updateGrid:d,clean:g,updateFx:t.updateFx,toSVG:t.toSVG,reglPrecompiled:i}}}),Bee=Ne({"src/traces/splom/index.js"(te,Z){var v=Nee();v.basePlotModule=Fee(),Z.exports=v}}),jee=Ne({"lib/splom.js"(te,Z){Z.exports=Bee()}}),$N=Ne({"src/traces/parcoords/attributes.js"(te,Z){var v=Wu(),w=Sd(),C=bo(),P=Fc().attributes,t=fi().extendFlat,r=Cu().templatedArray;Z.exports={domain:P({name:"parcoords",trace:!0,editType:"plot"}),labelangle:{valType:"angle",dflt:0,editType:"plot"},labelside:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},labelfont:C({editType:"plot"}),tickfont:C({autoShadowDflt:!0,editType:"plot"}),rangefont:C({editType:"plot"}),dimensions:r("dimension",{label:{valType:"string",editType:"plot"},tickvals:t({},w.tickvals,{editType:"plot"}),ticktext:t({},w.ticktext,{editType:"plot"}),tickformat:t({},w.tickformat,{editType:"plot"}),visible:{valType:"boolean",dflt:!0,editType:"plot"},range:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},constraintrange:{valType:"info_array",freeLength:!0,dimensions:"1-2",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},multiselect:{valType:"boolean",dflt:!0,editType:"plot"},values:{valType:"data_array",editType:"calc"},editType:"calc"}),line:t({editType:"calc"},v("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"}}}}),pk=Ne({"src/traces/parcoords/constants.js"(te,Z){Z.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"}}}}),a1=Ne({"src/lib/gup.js"(te,Z){var v=z0();function w(C){return[C]}Z.exports={keyFun:function(C){return C.key},repeat:w,descend:v,wrap:w,unwrap:function(C){return C[0]}}}}),KN=Ne({"src/traces/parcoords/axisbrush.js"(te,Z){var v=pk(),w=xn(),C=a1().keyFun,P=a1().repeat,t=In().sorterAsc,r=In().strTranslate,a=v.bar.snapRatio;function l(G,J){return G*(1-a)+J*a}var i=v.bar.snapClose;function s(G,J){return G*(1-i)+J*i}function o(G,J,le,ge){if(u(le,ge))return le;var de=G?-1:1,me=0,W=J.length-1;if(de<0){var ie=me;me=W,W=ie}for(var se=J[me],ee=se,pe=me;de*pe<de*W;pe+=de){var oe=pe+de,Y=J[oe];if(de*le<de*s(se,Y))return l(se,ee);if(de*le<de*Y||oe===W)return l(Y,se);ee=se,se=Y}}function u(G,J){for(var le=0;le<J.length;le++)if(G>=J[le][0]&&G<=J[le][1])return!0;return!1}function d(G){G.attr("x",-v.bar.captureWidth/2).attr("width",v.bar.captureWidth)}function h(G){G.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function g(G){if(!G.brush.filterSpecified)return"0,"+G.height;for(var J=m(G.brush.filter.getConsolidated(),G.height),le=[0],ge,de,me,W=J.length?J[0][0]:null,ie=0;ie<J.length;ie++)ge=J[ie],de=ge[1]-ge[0],le.push(W),le.push(de),me=ie+1,me<J.length&&(W=J[me][0]-ge[1]);return le.push(G.height),le}function m(G,J){return G.map(function(le){return le.map(function(ge){return Math.max(0,ge*J)}).sort(t)})}function E(G,J){var le=v.bar.handleHeight;if(!(J>G[1]+le||J<G[0]-le))return J>=.9*G[1]+.1*G[0]?"n":J<=.9*G[0]+.1*G[1]?"s":"ns"}function c(){w.select(document.body).style("cursor",null)}function _(G){G.attr("stroke-dasharray",g)}function T(G,J){var le=w.select(G).selectAll(".highlight, .highlight-shadow"),ge=J?le.transition().duration(v.bar.snapDuration).each("end",J):le;_(ge)}function M(G,J){var le=G.brush,ge=le.filterSpecified,de=NaN,me={},W;if(ge){var ie=G.height,se=le.filter.getConsolidated(),ee=m(se,ie),pe=NaN,oe=NaN,Y=NaN;for(W=0;W<=ee.length;W++){var ce=ee[W];if(ce&&ce[0]<=J&&J<=ce[1]){pe=W;break}else if(oe=W?W-1:NaN,ce&&ce[0]>J){Y=W;break}}if(de=pe,isNaN(de)&&(isNaN(oe)||isNaN(Y)?de=isNaN(oe)?Y:oe:de=J-ee[oe][1]<ee[Y][0]-J?oe:Y),!isNaN(de)){var ue=ee[de],_e=E(ue,J);_e&&(me.interval=se[de],me.intervalPix=ue,me.region=_e)}}if(G.ordinal&&!me.region){var Le=G.unitTickvals,ze=G.unitToPaddedPx.invert(J);for(W=0;W<Le.length;W++){var Xe=[Le[Math.max(W-1,0)]*.25+Le[W]*.75,Le[Math.min(W+1,Le.length-1)]*.25+Le[W]*.75];if(ze>=Xe[0]&&ze<=Xe[1]){me.clickableOrdinalRange=Xe;break}}}return me}function k(G,J){w.event.sourceEvent.stopPropagation();var le=J.height-w.mouse(G)[1]-2*v.verticalPadding,ge=J.unitToPaddedPx.invert(le),de=J.brush,me=M(J,le),W=me.interval,ie=de.svgBrush;if(ie.wasDragged=!1,ie.grabbingBar=me.region==="ns",ie.grabbingBar){var se=W.map(J.unitToPaddedPx);ie.grabPoint=le-se[0]-v.verticalPadding,ie.barLength=se[1]-se[0]}ie.clickableOrdinalRange=me.clickableOrdinalRange,ie.stayingIntervals=J.multiselect&&de.filterSpecified?de.filter.getConsolidated():[],W&&(ie.stayingIntervals=ie.stayingIntervals.filter(function(ee){return ee[0]!==W[0]&&ee[1]!==W[1]})),ie.startExtent=me.region?W[me.region==="s"?1:0]:ge,J.parent.inBrushDrag=!0,ie.brushStartCallback()}function b(G,J){w.event.sourceEvent.stopPropagation();var le=J.height-w.mouse(G)[1]-2*v.verticalPadding,ge=J.brush.svgBrush;ge.wasDragged=!0,ge._dragging=!0,ge.grabbingBar?ge.newExtent=[le-ge.grabPoint,le+ge.barLength-ge.grabPoint].map(J.unitToPaddedPx.invert):ge.newExtent=[ge.startExtent,J.unitToPaddedPx.invert(le)].sort(t),J.brush.filterSpecified=!0,ge.extent=ge.stayingIntervals.concat([ge.newExtent]),ge.brushCallback(J),T(G.parentNode)}function A(G,J){var le=J.brush,ge=le.filter,de=le.svgBrush;de._dragging||(y(G,J),b(G,J),J.brush.svgBrush.wasDragged=!1),de._dragging=!1;var me=w.event;me.sourceEvent.stopPropagation();var W=de.grabbingBar;if(de.grabbingBar=!1,de.grabLocation=void 0,J.parent.inBrushDrag=!1,c(),!de.wasDragged){de.wasDragged=void 0,de.clickableOrdinalRange?le.filterSpecified&&J.multiselect?de.extent.push(de.clickableOrdinalRange):(de.extent=[de.clickableOrdinalRange],le.filterSpecified=!0):W?(de.extent=de.stayingIntervals,de.extent.length===0&&B(le)):B(le),de.brushCallback(J),T(G.parentNode),de.brushEndCallback(le.filterSpecified?ge.getConsolidated():[]);return}var ie=function(){ge.set(ge.getConsolidated())};if(J.ordinal){var se=J.unitTickvals;se[se.length-1]<se[0]&&se.reverse(),de.newExtent=[o(0,se,de.newExtent[0],de.stayingIntervals),o(1,se,de.newExtent[1],de.stayingIntervals)];var ee=de.newExtent[1]>de.newExtent[0];de.extent=de.stayingIntervals.concat(ee?[de.newExtent]:[]),de.extent.length||B(le),de.brushCallback(J),ee?T(G.parentNode,ie):(ie(),T(G.parentNode))}else ie();de.brushEndCallback(le.filterSpecified?ge.getConsolidated():[])}function y(G,J){var le=J.height-w.mouse(G)[1]-2*v.verticalPadding,ge=M(J,le),de="crosshair";ge.clickableOrdinalRange?de="pointer":ge.region&&(de=ge.region+"-resize"),w.select(document.body).style("cursor",de)}function f(G){G.on("mousemove",function(J){w.event.preventDefault(),J.parent.inBrushDrag||y(this,J)}).on("mouseleave",function(J){J.parent.inBrushDrag||c()}).call(w.behavior.drag().on("dragstart",function(J){k(this,J)}).on("drag",function(J){b(this,J)}).on("dragend",function(J){A(this,J)}))}function p(G,J){return G[0]-J[0]}function x(G,J,le){var ge=le._context.staticPlot,de=G.selectAll(".background").data(P);de.enter().append("rect").classed("background",!0).call(d).call(h).style("pointer-events",ge?"none":"auto").attr("transform",r(0,v.verticalPadding)),de.call(f).attr("height",function(ie){return ie.height-v.verticalPadding});var me=G.selectAll(".highlight-shadow").data(P);me.enter().append("line").classed("highlight-shadow",!0).attr("x",-v.bar.width/2).attr("stroke-width",v.bar.width+v.bar.strokeWidth).attr("stroke",J).attr("opacity",v.bar.strokeOpacity).attr("stroke-linecap","butt"),me.attr("y1",function(ie){return ie.height}).call(_);var W=G.selectAll(".highlight").data(P);W.enter().append("line").classed("highlight",!0).attr("x",-v.bar.width/2).attr("stroke-width",v.bar.width-v.bar.strokeWidth).attr("stroke",v.bar.fillColor).attr("opacity",v.bar.fillOpacity).attr("stroke-linecap","butt"),W.attr("y1",function(ie){return ie.height}).call(_)}function N(G,J,le){var ge=G.selectAll("."+v.cn.axisBrush).data(P,C);ge.enter().append("g").classed(v.cn.axisBrush,!0),x(ge,J,le)}function D(G){return G.svgBrush.extent.map(function(J){return J.slice()})}function B(G){G.filterSpecified=!1,G.svgBrush.extent=[[-1/0,1/0]]}function U(G){return function(le){var ge=le.brush,de=D(ge),me=de.slice();ge.filter.set(me),G()}}function V(G){for(var J=G.slice(),le=[],ge,de=J.shift();de;){for(ge=de.slice();(de=J.shift())&&de[0]<=ge[1];)ge[1]=Math.max(ge[1],de[1]);le.push(ge)}return le.length===1&&le[0][0]>le[0][1]&&(le=[]),le}function q(){var G=[],J,le;return{set:function(ge){G=ge.map(function(de){return de.slice().sort(t)}).sort(p),G.length===1&&G[0][0]===-1/0&&G[0][1]===1/0&&(G=[[0,-1]]),J=V(G),le=G.reduce(function(de,me){return[Math.min(de[0],me[0]),Math.max(de[1],me[1])]},[1/0,-1/0])},get:function(){return G.slice()},getConsolidated:function(){return J},getBounds:function(){return le}}}function z(G,J,le,ge,de,me){var W=q();return W.set(le),{filter:W,filterSpecified:J,svgBrush:{extent:[],brushStartCallback:ge,brushCallback:U(de),brushEndCallback:me}}}function H(G,J){if(Array.isArray(G[0])?(G=G.map(function(ge){return ge.sort(t)}),J.multiselect?G=V(G.sort(p)):G=[G[0]]):G=[G.sort(t)],J.tickvals){var le=J.tickvals.slice().sort(t);if(G=G.map(function(ge){var de=[o(0,le,ge[0],[]),o(1,le,ge[1],[])];if(de[1]>de[0])return de}).filter(function(ge){return ge}),!G.length)return}return G.length>1?G:G[0]}Z.exports={makeBrush:z,ensureAxisBrush:N,cleanRanges:H}}}),Uee=Ne({"src/traces/parcoords/defaults.js"(te,Z){var v=In(),w=Bd().hasColorscale,C=Rh(),P=Fc().defaults,t=jd(),r=Os(),a=$N(),l=KN(),i=pk().maxDimensionCount,s=FR();function o(d,h,g,m,E){var c=E("line.color",g);if(w(d,"line")&&v.isArrayOrTypedArray(c)){if(c.length)return E("line.colorscale"),C(d,h,m,E,{prefix:"line.",cLetter:"c"}),c.length;h.line.color=g}return 1/0}function u(d,h,g,m){function E(k,b){return v.coerce(d,h,a.dimensions,k,b)}var c=E("values"),_=E("visible");if(c&&c.length||(_=h.visible=!1),_){E("label"),E("tickvals"),E("ticktext"),E("tickformat");var T=E("range");h._ax={_id:"y",type:"linear",showexponent:"all",exponentformat:"B",range:T},r.setConvert(h._ax,m.layout),E("multiselect");var M=E("constraintrange");M&&(h.constraintrange=l.cleanRanges(M,h))}}Z.exports=function(h,g,m,E){function c(b,A){return v.coerce(h,g,a,b,A)}var _=h.dimensions;Array.isArray(_)&&_.length>i&&(v.log("parcoords traces support up to "+i+" dimensions at the moment"),_.splice(i));var T=t(h,g,{name:"dimensions",layout:E,handleItemDefaults:u}),M=o(h,g,m,E,c);P(g,E,c),(!Array.isArray(T)||!T.length)&&(g.visible=!1),s(g,T,"values",M);var k=v.extendFlat({},E.font,{size:Math.round(E.font.size/1.2)});v.coerceFont(c,"labelfont",k),v.coerceFont(c,"tickfont",k,{autoShadowDflt:!0}),v.coerceFont(c,"rangefont",k),c("labelangle"),c("labelside"),c("unselected.line.color"),c("unselected.line.opacity")}}}),qee=Ne({"src/traces/parcoords/calc.js"(te,Z){var v=In().isArrayOrTypedArray,w=Nc(),C=a1().wrap;Z.exports=function(r,a){var l,i;return w.hasColorscale(a,"line")&&v(a.line.color)?(l=a.line.color,i=w.extractOpts(a.line).colorscale,w.calc(r,a,{vals:l,containerStr:"line",cLetter:"c"})):(l=P(a._length),i=[[0,a.line.color],[1,a.line.color]]),C({lineColor:l,cscale:i})};function P(t){for(var r=new Array(t),a=0;a<t;a++)r[a]=.5;return r}}});function Vee(te){var Z,v,w,C=[],P=1,t;if(typeof te=="number")return{space:"rgb",values:[te>>>16,(te&65280)>>>8,te&255],alpha:1};if(typeof te=="number")return{space:"rgb",values:[te>>>16,(te&65280)>>>8,te&255],alpha:1};if(te=String(te).toLowerCase(),BR.default[te])C=BR.default[te].slice(),t="rgb";else if(te==="transparent")P=0,t="rgb",C=[0,0,0];else if(te[0]==="#"){var r=te.slice(1),a=r.length,l=a<=4;P=1,l?(C=[parseInt(r[0]+r[0],16),parseInt(r[1]+r[1],16),parseInt(r[2]+r[2],16)],a===4&&(P=parseInt(r[3]+r[3],16)/255)):(C=[parseInt(r[0]+r[1],16),parseInt(r[2]+r[3],16),parseInt(r[4]+r[5],16)],a===8&&(P=parseInt(r[6]+r[7],16)/255)),C[0]||(C[0]=0),C[1]||(C[1]=0),C[2]||(C[2]=0),t="rgb"}else if(w=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(te)){var i=w[1];t=i.replace(/a$/,"");var s=t==="cmyk"?4:t==="gray"?1:3;C=w[2].trim().split(/\s*[,\/]\s*|\s+/),t==="color"&&(t=C.shift()),C=C.map(function(o,u){if(o[o.length-1]==="%")return o=parseFloat(o)/100,u===3?o:t==="rgb"?o*255:t[0]==="h"||t[0]==="l"&&!u?o*100:t==="lab"?o*125:t==="lch"?u<2?o*150:o*360:t[0]==="o"&&!u?o:t==="oklab"?o*.4:t==="oklch"?u<2?o*.4:o*360:o;if(t[u]==="h"||u===2&&t[t.length-1]==="h"){if(jR[o]!==void 0)return jR[o];if(o.endsWith("deg"))return parseFloat(o);if(o.endsWith("turn"))return parseFloat(o)*360;if(o.endsWith("grad"))return parseFloat(o)*360/400;if(o.endsWith("rad"))return parseFloat(o)*180/Math.PI}return o==="none"?0:parseFloat(o)}),P=C.length>s?C.pop():1}else/[0-9](?:\s|\/|,)/.test(te)&&(C=te.match(/([0-9]+)/g).map(function(o){return parseFloat(o)}),t=((v=(Z=te.match(/([a-z])/ig))==null?void 0:Z.join(""))==null?void 0:v.toLowerCase())||"rgb");return{space:t,values:C,alpha:P}}var BR,JN,jR,Hee=zr({"node_modules/color-parse/index.js"(){BR=Lr(eN()),JN=Vee,jR={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}}}),mk,QN=zr({"node_modules/color-space/rgb.js"(){mk={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}}}),gk,Gee=zr({"node_modules/color-space/hsl.js"(){QN(),gk={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(te){var Z=te[0]/360,v=te[1]/100,w=te[2]/100,C,P,t,r,a,l=0;if(v===0)return a=w*255,[a,a,a];for(P=w<.5?w*(1+v):w+v-w*v,C=2*w-P,r=[0,0,0];l<3;)t=Z+1/3*-(l-1),t<0?t++:t>1&&t--,a=6*t<1?C+(P-C)*6*t:2*t<1?P:3*t<2?C+(P-C)*(2/3-t)*6:C,r[l++]=a*255;return r}},mk.hsl=function(te){var Z=te[0]/255,v=te[1]/255,w=te[2]/255,C=Math.min(Z,v,w),P=Math.max(Z,v,w),t=P-C,r,a,l;return P===C?r=0:Z===P?r=(v-w)/t:v===P?r=2+(w-Z)/t:w===P&&(r=4+(Z-v)/t),r=Math.min(r*60,360),r<0&&(r+=360),l=(C+P)/2,P===C?a=0:l<=.5?a=t/(P+C):a=t/(2-P-C),[r,a*100,l*100]}}}),eF={};Jr(eF,{default:()=>Xee});function Xee(te){Array.isArray(te)&&te.raw&&(te=String.raw(...arguments)),te instanceof Number&&(te=+te);var Z,v=JN(te);if(!v.space)return[];const w=v.space[0]==="h"?gk.min:mk.min,C=v.space[0]==="h"?gk.max:mk.max;return Z=Array(3),Z[0]=Math.min(Math.max(v.values[0],w[0]),C[0]),Z[1]=Math.min(Math.max(v.values[1],w[1]),C[1]),Z[2]=Math.min(Math.max(v.values[2],w[2]),C[2]),v.space[0]==="h"&&(Z=gk.rgb(Z)),Z.push(Math.min(Math.max(v.alpha,0),1)),Z}var Wee=zr({"node_modules/color-rgba/index.js"(){Hee(),QN(),Gee()}}),tF=Ne({"src/traces/parcoords/helpers.js"(te){var Z=In().isTypedArray;te.convertTypedArray=function(v){return Z(v)?Array.prototype.slice.call(v):v},te.isOrdinal=function(v){return!!v.tickvals},te.isVisible=function(v){return v.visible||!("visible"in v)}}}),Yee=Ne({"src/traces/parcoords/lines.js"(te,Z){var v=["precision highp float;","","varying vec4 fragColor;","","attribute vec4 p01_04, p05_08, p09_12, p13_16,","               p17_20, p21_24, p25_28, p29_32,","               p33_36, p37_40, p41_44, p45_48,","               p49_52, p53_56, p57_60, colors;","","uniform mat4 dim0A, dim1A, dim0B, dim1B, dim0C, dim1C, dim0D, dim1D,","             loA, hiA, loB, hiB, loC, hiC, loD, hiD;","","uniform vec2 resolution, viewBoxPos, viewBoxSize;","uniform float maskHeight;","uniform float drwLayer; // 0: context, 1: focus, 2: pick","uniform vec4 contextColor;","uniform sampler2D maskTexture, palette;","","bool isPick    = (drwLayer > 1.5);","bool isContext = (drwLayer < 0.5);","","const vec4 ZEROS = vec4(0.0, 0.0, 0.0, 0.0);","const vec4 UNITS = vec4(1.0, 1.0, 1.0, 1.0);","","float val(mat4 p, mat4 v) {","    return dot(matrixCompMult(p, v) * UNITS, UNITS);","}","","float axisY(float ratio, mat4 A, mat4 B, mat4 C, mat4 D) {","    float y1 = val(A, dim0A) + val(B, dim0B) + val(C, dim0C) + val(D, dim0D);","    float y2 = val(A, dim1A) + val(B, dim1B) + val(C, dim1C) + val(D, dim1D);","    return y1 * (1.0 - ratio) + y2 * ratio;","}","","int iMod(int a, int b) {","    return a - b * (a / b);","}","","bool fOutside(float p, float lo, float hi) {","    return (lo < hi) && (lo > p || p > hi);","}","","bool vOutside(vec4 p, vec4 lo, vec4 hi) {","    return (","        fOutside(p[0], lo[0], hi[0]) ||","        fOutside(p[1], lo[1], hi[1]) ||","        fOutside(p[2], lo[2], hi[2]) ||","        fOutside(p[3], lo[3], hi[3])","    );","}","","bool mOutside(mat4 p, mat4 lo, mat4 hi) {","    return (","        vOutside(p[0], lo[0], hi[0]) ||","        vOutside(p[1], lo[1], hi[1]) ||","        vOutside(p[2], lo[2], hi[2]) ||","        vOutside(p[3], lo[3], hi[3])","    );","}","","bool outsideBoundingBox(mat4 A, mat4 B, mat4 C, mat4 D) {","    return mOutside(A, loA, hiA) ||","           mOutside(B, loB, hiB) ||","           mOutside(C, loC, hiC) ||","           mOutside(D, loD, hiD);","}","","bool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) {","    mat4 pnts[4];","    pnts[0] = A;","    pnts[1] = B;","    pnts[2] = C;","    pnts[3] = D;","","    for(int i = 0; i < 4; ++i) {","        for(int j = 0; j < 4; ++j) {","            for(int k = 0; k < 4; ++k) {","                if(0 == iMod(","                    int(255.0 * texture2D(maskTexture,","                        vec2(","                            (float(i * 2 + j / 2) + 0.5) / 8.0,","                            (pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight","                        ))[3]","                    ) / int(pow(2.0, float(iMod(j * 4 + k, 8)))),","                    2","                )) return true;","            }","        }","    }","    return false;","}","","vec4 position(bool isContext, float v, mat4 A, mat4 B, mat4 C, mat4 D) {","    float x = 0.5 * sign(v) + 0.5;","    float y = axisY(x, A, B, C, D);","    float z = 1.0 - abs(v);","","    z += isContext ? 0.0 : 2.0 * float(","        outsideBoundingBox(A, B, C, D) ||","        outsideRasterMask(A, B, C, D)","    );","","    return vec4(","        2.0 * (vec2(x, y) * viewBoxSize + viewBoxPos) / resolution - 1.0,","        z,","        1.0","    );","}","","void main() {","    mat4 A = mat4(p01_04, p05_08, p09_12, p13_16);","    mat4 B = mat4(p17_20, p21_24, p25_28, p29_32);","    mat4 C = mat4(p33_36, p37_40, p41_44, p45_48);","    mat4 D = mat4(p49_52, p53_56, p57_60, ZEROS);","","    float v = colors[3];","","    gl_Position = position(isContext, v, A, B, C, D);","","    fragColor =","        isContext ? vec4(contextColor) :","        isPick ? vec4(colors.rgb, 1.0) : texture2D(palette, vec2(abs(v), 0.5));","}"].join(`
`),w=["precision highp float;","","varying vec4 fragColor;","","void main() {","    gl_FragColor = fragColor;","}"].join(`
`),C=pk().maxDimensionCount,P=In(),t=1e-6,r=2048,a=new Uint8Array(4),l=new Uint8Array(4),i={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function s(A){A.read({x:0,y:0,width:1,height:1,data:a})}function o(A,y,f,p,x){var N=A._gl;N.enable(N.SCISSOR_TEST),N.scissor(y,f,p,x),A.clear({color:[0,0,0,0],depth:1})}function u(A,y,f,p,x,N){var D=N.key;function B(U){var V=Math.min(p,x-U*p);U===0&&(window.cancelAnimationFrame(f.currentRafs[D]),delete f.currentRafs[D],o(A,N.scissorX,N.scissorY,N.scissorWidth,N.viewBoxSize[1])),!f.clearOnly&&(N.count=2*V,N.offset=2*U*p,y(N),U*p+V<x&&(f.currentRafs[D]=window.requestAnimationFrame(function(){B(U+1)})),f.drawCompleted=!1)}f.drawCompleted||(s(A),f.drawCompleted=!0),B(0)}function d(A){return Math.max(t,Math.min(1-t,A))}function h(A,y){for(var f=new Array(256),p=0;p<256;p++)f[p]=A(p/255).concat(y);return f}function g(A,y){return(A>>>8*y)%256/255}function m(A,y,f){for(var p=new Array(A*(C+4)),x=0,N=0;N<A;N++){for(var D=0;D<C;D++)p[x++]=D<y.length?y[D].paddedUnitValues[N]:.5;p[x++]=g(N,2),p[x++]=g(N,1),p[x++]=g(N,0),p[x++]=d(f[N])}return p}function E(A,y,f){for(var p=new Array(y*8),x=0,N=0;N<y;N++)for(var D=0;D<2;D++)for(var B=0;B<4;B++){var U=A*4+B,V=f[N*64+U];U===63&&D===0&&(V*=-1),p[x++]=V}return p}function c(A){var y="0"+A;return y.substr(y.length-2)}function _(A){return A<C?"p"+c(A+1)+"_"+c(A+4):"colors"}function T(A,y,f){for(var p=0;p<=C;p+=4)A[_(p)](E(p/4,y,f))}function M(A){for(var y={},f=0;f<=C;f+=4)y[_(f)]=A.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)});return y}function k(A,y,f,p,x,N,D,B,U,V,q,z,H,G){for(var J=[[],[]],le=0;le<64;le++)J[0][le]=le===x?1:0,J[1][le]=le===N?1:0;D*=G,B*=G,U*=G,V*=G;var ge=A.lines.canvasOverdrag*G,de=A.domain,me=A.canvasWidth*G,W=A.canvasHeight*G,ie=A.pad.l*G,se=A.pad.b*G,ee=A.layoutHeight*G,pe=A.layoutWidth*G,oe=A.deselectedLines.color,Y=A.deselectedLines.opacity,ce=P.extendFlat({key:q,resolution:[me,W],viewBoxPos:[D+ge,B],viewBoxSize:[U,V],i0:x,i1:N,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:z,contextColor:[oe[0]/255,oe[1]/255,oe[2]/255,Y!=="auto"?oe[3]*Y:Math.max(1/255,Math.pow(1/A.lines.color.length,1/3))],scissorX:(p===y?0:D+ge)+(ie-ge)+pe*de.x[0],scissorWidth:(p===f?me-D+ge:U+.5)+(p===y?D+ge:0),scissorY:B+se+ee*de.y[0],scissorHeight:V,viewportX:ie-ge+pe*de.x[0],viewportY:se+ee*de.y[0],viewportWidth:me,viewportHeight:W},H);return ce}function b(A){var y=r-1,f=Math.max(0,Math.floor(A[0]*y),0),p=Math.min(y,Math.ceil(A[1]*y),y);return[Math.min(f,p),Math.max(f,p)]}Z.exports=function(A,y){var f=y.context,p=y.pick,x=y.regl,N=x._gl,D=N.getParameter(N.ALIASED_LINE_WIDTH_RANGE),B=Math.max(D[0],Math.min(D[1],y.viewModel.plotGlPixelRatio)),U={currentRafs:{},drawCompleted:!0,clearOnly:!1},V,q,z,H,G=M(x),J,le=x.texture(i),ge=[];me(y);var de=x({profile:!1,blend:{enable:f,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:!f,mask:!0,func:"less",range:[0,1]},cull:{enable:!0,face:"back"},scissor:{enable:!0,box:{x:x.prop("scissorX"),y:x.prop("scissorY"),width:x.prop("scissorWidth"),height:x.prop("scissorHeight")}},viewport:{x:x.prop("viewportX"),y:x.prop("viewportY"),width:x.prop("viewportWidth"),height:x.prop("viewportHeight")},dither:!1,vert:v,frag:w,primitive:"lines",lineWidth:B,attributes:G,uniforms:{resolution:x.prop("resolution"),viewBoxPos:x.prop("viewBoxPos"),viewBoxSize:x.prop("viewBoxSize"),dim0A:x.prop("dim0A"),dim1A:x.prop("dim1A"),dim0B:x.prop("dim0B"),dim1B:x.prop("dim1B"),dim0C:x.prop("dim0C"),dim1C:x.prop("dim1C"),dim0D:x.prop("dim0D"),dim1D:x.prop("dim1D"),loA:x.prop("loA"),hiA:x.prop("hiA"),loB:x.prop("loB"),hiB:x.prop("hiB"),loC:x.prop("loC"),hiC:x.prop("hiC"),loD:x.prop("loD"),hiD:x.prop("hiD"),palette:le,contextColor:x.prop("contextColor"),maskTexture:x.prop("maskTexture"),drwLayer:x.prop("drwLayer"),maskHeight:x.prop("maskHeight")},offset:x.prop("offset"),count:x.prop("count")});function me(oe){V=oe.model,q=oe.viewModel,z=q.dimensions.slice(),H=z[0]?z[0].values.length:0;var Y=V.lines,ce=p?Y.color.map(function(_e,Le){return Le/Y.color.length}):Y.color,ue=m(H,z,ce);T(G,H,ue),!f&&!p&&(le=x.texture(P.extendFlat({data:h(V.unitToColor,255)},i)))}function W(oe){var Y,ce,ue,_e=[[],[]];for(ue=0;ue<64;ue++){var Le=!oe&&ue<z.length?z[ue].brush.filter.getBounds():[-1/0,1/0];_e[0][ue]=Le[0],_e[1][ue]=Le[1]}var ze=r*8,Xe=new Array(ze);for(Y=0;Y<ze;Y++)Xe[Y]=255;if(!oe)for(Y=0;Y<z.length;Y++){var Ve=Y%8,rt=(Y-Ve)/8,mt=Math.pow(2,Ve),_t=z[Y],vt=_t.brush.filter.get();if(!(vt.length<2)){var ut=b(vt[0])[1];for(ce=1;ce<vt.length;ce++){var Fe=b(vt[ce]);for(ue=ut+1;ue<Fe[0];ue++)Xe[ue*8+rt]&=~mt;ut=Math.max(ut,Fe[1])}}}var Pe={shape:[8,r],format:"alpha",type:"uint8",mag:"nearest",min:"nearest",data:Xe};return J?J(Pe):J=x.texture(Pe),{maskTexture:J,maskHeight:r,loA:_e[0].slice(0,16),loB:_e[0].slice(16,32),loC:_e[0].slice(32,48),loD:_e[0].slice(48,64),hiA:_e[1].slice(0,16),hiB:_e[1].slice(16,32),hiC:_e[1].slice(32,48),hiD:_e[1].slice(48,64)}}function ie(oe,Y,ce){var ue=oe.length,_e,Le,ze,Xe=1/0,Ve=-1/0;for(_e=0;_e<ue;_e++)oe[_e].dim0.canvasX<Xe&&(Xe=oe[_e].dim0.canvasX,Le=_e),oe[_e].dim1.canvasX>Ve&&(Ve=oe[_e].dim1.canvasX,ze=_e);ue===0&&o(x,0,0,V.canvasWidth,V.canvasHeight);var rt=W(f);for(_e=0;_e<ue;_e++){var mt=oe[_e],_t=mt.dim0.crossfilterDimensionIndex,vt=mt.dim1.crossfilterDimensionIndex,ut=mt.canvasX,Fe=mt.canvasY,Pe=ut+mt.panelSizeX,be=mt.plotGlPixelRatio;if(Y||!ge[_t]||ge[_t][0]!==ut||ge[_t][1]!==Pe){ge[_t]=[ut,Pe];var Ye=k(V,Le,ze,_e,_t,vt,ut,Fe,mt.panelSizeX,mt.panelSizeY,mt.dim0.crossfilterDimensionIndex,f?0:p?2:1,rt,be);U.clearOnly=ce;var yt=Y?V.lines.blockLineCount:H;u(x,de,U,yt,H,Ye)}}}function se(oe,Y){return x.read({x:oe,y:Y,width:1,height:1,data:l}),l}function ee(oe,Y,ce,ue){var _e=new Uint8Array(4*ce*ue);return x.read({x:oe,y:Y,width:ce,height:ue,data:_e}),_e}function pe(){A.style["pointer-events"]="none",le.destroy(),J&&J.destroy();for(var oe in G)G[oe].destroy()}return{render:ie,readPixel:se,readPixels:ee,destroy:pe,update:me}}}}),Zee=Ne({"src/traces/parcoords/parcoords.js"(te,Z){var v=xn(),w=In(),C=w.isArrayOrTypedArray,P=w.numberFormat,t=(Wee(),Or(eF)).default,r=Os(),a=w.strRotate,l=w.strTranslate,i=hc(),s=zs(),o=Nc(),u=a1(),d=u.keyFun,h=u.repeat,g=u.unwrap,m=tF(),E=pk(),c=KN(),_=Yee();function T(ge,de,me){return w.aggNums(ge,null,de,me)}function M(ge,de){return b(T(Math.min,ge,de),T(Math.max,ge,de))}function k(ge){var de=ge.range;return de?b(de[0],de[1]):M(ge.values,ge._length)}function b(ge,de){return(isNaN(ge)||!isFinite(ge))&&(ge=0),(isNaN(de)||!isFinite(de))&&(de=0),ge===de&&(ge===0?(ge-=1,de+=1):(ge*=.9,de*=1.1)),[ge,de]}function A(ge,de){return de?function(me,W){var ie=de[W];return ie??ge(me)}:ge}function y(ge,de,me,W,ie){var se=k(me);return W?v.scale.ordinal().domain(W.map(A(P(me.tickformat),ie))).range(W.map(function(ee){var pe=(ee-se[0])/(se[1]-se[0]);return ge-de+pe*(2*de-ge)})):v.scale.linear().domain(se).range([ge-de,de])}function f(ge,de){return v.scale.linear().range([de,ge-de])}function p(ge,de){return v.scale.linear().domain(k(ge)).range([de,1-de])}function x(ge){if(ge.tickvals){var de=k(ge);return v.scale.ordinal().domain(ge.tickvals).range(ge.tickvals.map(function(me){return(me-de[0])/(de[1]-de[0])}))}}function N(ge){var de=ge.map(function(se){return se[0]}),me=ge.map(function(se){var ee=t(se[1]);return v.rgb("rgb("+ee[0]+","+ee[1]+","+ee[2]+")")}),W=function(se){return function(ee){return ee[se]}},ie="rgb".split("").map(function(se){return v.scale.linear().clamp(!0).domain(de).range(me.map(W(se)))});return function(se){return ie.map(function(ee){return ee(se)})}}function D(ge){return ge.dimensions.some(function(de){return de.brush.filterSpecified})}function B(ge,de,me){var W=g(de),ie=W.trace,se=m.convertTypedArray(W.lineColor),ee=ie.line,pe={color:t(ie.unselected.line.color),opacity:ie.unselected.line.opacity},oe=o.extractOpts(ee),Y=oe.reversescale?o.flipScale(W.cscale):W.cscale,ce=ie.domain,ue=ie.dimensions,_e=ge.width,Le=ie.labelangle,ze=ie.labelside,Xe=ie.labelfont,Ve=ie.tickfont,rt=ie.rangefont,mt=w.extendDeepNoArrays({},ee,{color:se.map(v.scale.linear().domain(k({values:se,range:[oe.min,oe.max],_length:ie._length}))),blockLineCount:E.blockLineCount,canvasOverdrag:E.overdrag*E.canvasPixelRatio}),_t=Math.floor(_e*(ce.x[1]-ce.x[0])),vt=Math.floor(ge.height*(ce.y[1]-ce.y[0])),ut=ge.margin||{l:80,r:80,t:100,b:80},Fe=_t,Pe=vt;return{key:me,colCount:ue.filter(m.isVisible).length,dimensions:ue,tickDistance:E.tickDistance,unitToColor:N(Y),lines:mt,deselectedLines:pe,labelAngle:Le,labelSide:ze,labelFont:Xe,tickFont:Ve,rangeFont:rt,layoutWidth:_e,layoutHeight:ge.height,domain:ce,translateX:ce.x[0]*_e,translateY:ge.height-ce.y[1]*ge.height,pad:ut,canvasWidth:Fe*E.canvasPixelRatio+2*mt.canvasOverdrag,canvasHeight:Pe*E.canvasPixelRatio,width:Fe,height:Pe,canvasPixelRatio:E.canvasPixelRatio}}function U(ge,de,me){var W=me.width,ie=me.height,se=me.dimensions,ee=me.canvasPixelRatio,pe=function(_e){return W*_e/Math.max(1,me.colCount-1)},oe=E.verticalPadding/ie,Y=f(ie,E.verticalPadding),ce={key:me.key,xScale:pe,model:me,inBrushDrag:!1},ue={};return ce.dimensions=se.filter(m.isVisible).map(function(_e,Le){var ze=p(_e,oe),Xe=ue[_e.label];ue[_e.label]=(Xe||0)+1;var Ve=_e.label+(Xe?"__"+Xe:""),rt=_e.constraintrange,mt=rt&&rt.length;mt&&!C(rt[0])&&(rt=[rt]);var _t=mt?rt.map(function(Yt){return Yt.map(ze)}):[[-1/0,1/0]],vt=function(){var Yt=ce;Yt.focusLayer&&Yt.focusLayer.render(Yt.panels,!0);var $t=D(Yt);!ge.contextShown()&&$t?(Yt.contextLayer&&Yt.contextLayer.render(Yt.panels,!0),ge.contextShown(!0)):ge.contextShown()&&!$t&&(Yt.contextLayer&&Yt.contextLayer.render(Yt.panels,!0,!0),ge.contextShown(!1))},ut=_e.values;ut.length>_e._length&&(ut=ut.slice(0,_e._length));var Fe=_e.tickvals,Pe;function be(Yt,$t){return{val:Yt,text:Pe[$t]}}function Ye(Yt,$t){return Yt.val-$t.val}if(C(Fe)&&Fe.length){w.isTypedArray(Fe)&&(Fe=Array.from(Fe)),Pe=_e.ticktext,!C(Pe)||!Pe.length?Pe=Fe.map(P(_e.tickformat)):Pe.length>Fe.length?Pe=Pe.slice(0,Fe.length):Fe.length>Pe.length&&(Fe=Fe.slice(0,Pe.length));for(var yt=1;yt<Fe.length;yt++)if(Fe[yt]<Fe[yt-1]){for(var wt=Fe.map(be).sort(Ye),ht=0;ht<Fe.length;ht++)Fe[ht]=wt[ht].val,Pe[ht]=wt[ht].text;break}}else Fe=void 0;return ut=m.convertTypedArray(ut),{key:Ve,label:_e.label,tickFormat:_e.tickformat,tickvals:Fe,ticktext:Pe,ordinal:m.isOrdinal(_e),multiselect:_e.multiselect,xIndex:Le,crossfilterDimensionIndex:Le,visibleIndex:_e._index,height:ie,values:ut,paddedUnitValues:ut.map(ze),unitTickvals:Fe&&Fe.map(ze),xScale:pe,x:pe(Le),canvasX:pe(Le)*ee,unitToPaddedPx:Y,domainScale:y(ie,E.verticalPadding,_e,Fe,Pe),ordinalScale:x(_e),parent:ce,model:me,brush:c.makeBrush(ge,mt,_t,function(){ge.linePickActive(!1)},vt,function(Yt){if(ce.focusLayer.render(ce.panels,!0),ce.pickLayer&&ce.pickLayer.render(ce.panels,!0),ge.linePickActive(!0),de&&de.filterChanged){var $t=ze.invert,fr=Yt.map(function(mr){return mr.map($t).sort(w.sorterAsc)}).sort(function(mr,Ur){return mr[0]-Ur[0]});de.filterChanged(ce.key,_e._index,fr)}})}}),ce}function V(ge){ge.classed(E.cn.axisExtentText,!0).attr("text-anchor","middle").style("cursor","default")}function q(){var ge=!0,de=!1;return{linePickActive:function(me){return arguments.length?ge=!!me:ge},contextShown:function(me){return arguments.length?de=!!me:de}}}function z(ge,de){var me=de==="top"?1:-1,W=ge*Math.PI/180,ie=Math.sin(W),se=Math.cos(W);return{dir:me,dx:ie,dy:se,degrees:ge}}function H(ge,de,me){for(var W=de.panels||(de.panels=[]),ie=ge.data(),se=0;se<ie.length-1;se++){var ee=W[se]||(W[se]={}),pe=ie[se],oe=ie[se+1];ee.dim0=pe,ee.dim1=oe,ee.canvasX=pe.canvasX,ee.panelSizeX=oe.canvasX-pe.canvasX,ee.panelSizeY=de.model.canvasHeight,ee.y=0,ee.canvasY=0,ee.plotGlPixelRatio=me}}function G(ge){for(var de=0;de<ge.length;de++)for(var me=0;me<ge[de].length;me++)for(var W=ge[de][me].trace,ie=W.dimensions,se=0;se<ie.length;se++){var ee=ie[se].values,pe=ie[se]._ax;pe&&(pe.range?pe.range=b(pe.range[0],pe.range[1]):pe.range=M(ee,W._length),pe.dtick||(pe.dtick=.01*(Math.abs(pe.range[1]-pe.range[0])||1)),pe.tickformat=ie[se].tickformat,r.calcTicks(pe),pe.cleanRange())}}function J(ge,de){return r.tickText(ge._ax,de,!1).text}function le(ge,de){if(ge.ordinal)return"";var me=ge.domainScale.domain(),W=me[de?me.length-1:0];return J(ge.model.dimensions[ge.visibleIndex],W)}Z.exports=function(de,me,W,ie){var se=de._context.staticPlot,ee=de._fullLayout,pe=ee._toppaper,oe=ee._glcontainer,Y=de._context.plotGlPixelRatio,ce=de._fullLayout.paper_bgcolor;G(me);var ue=q(),_e=me.filter(function(ht){return g(ht).trace.visible}).map(B.bind(0,W)).map(U.bind(0,ue,ie));oe.each(function(ht,Yt){return w.extendFlat(ht,_e[Yt])});var Le=oe.selectAll(".gl-canvas").each(function(ht){ht.viewModel=_e[0],ht.viewModel.plotGlPixelRatio=Y,ht.viewModel.paperColor=ce,ht.model=ht.viewModel?ht.viewModel.model:null}),ze=null,Xe=Le.filter(function(ht){return ht.pick});Xe.style("pointer-events",se?"none":"auto").on("mousemove",function(ht){if(ue.linePickActive()&&ht.lineLayer&&ie&&ie.hover){var Yt=v.event,$t=this.width,fr=this.height,mr=v.mouse(this),Ur=mr[0],jr=mr[1];if(Ur<0||jr<0||Ur>=$t||jr>=fr)return;var fn=ht.lineLayer.readPixel(Ur,fr-1-jr),Br=fn[3]!==0,Qr=Br?fn[2]+256*(fn[1]+256*fn[0]):null,Ot={x:Ur,y:jr,clientX:Yt.clientX,clientY:Yt.clientY,dataIndex:ht.model.key,curveNumber:Qr};Qr!==ze&&(Br?ie.hover(Ot):ie.unhover&&ie.unhover(Ot),ze=Qr)}}),Le.style("opacity",function(ht){return ht.pick?0:1}),pe.style("background","rgba(255, 255, 255, 0)");var Ve=pe.selectAll("."+E.cn.parcoords).data(_e,d);Ve.exit().remove(),Ve.enter().append("g").classed(E.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),Ve.attr("transform",function(ht){return l(ht.model.translateX,ht.model.translateY)});var rt=Ve.selectAll("."+E.cn.parcoordsControlView).data(h,d);rt.enter().append("g").classed(E.cn.parcoordsControlView,!0),rt.attr("transform",function(ht){return l(ht.model.pad.l,ht.model.pad.t)});var mt=rt.selectAll("."+E.cn.yAxis).data(function(ht){return ht.dimensions},d);mt.enter().append("g").classed(E.cn.yAxis,!0),rt.each(function(ht){H(mt,ht,Y)}),Le.each(function(ht){if(ht.viewModel){!ht.lineLayer||ie?ht.lineLayer=_(this,ht):ht.lineLayer.update(ht),(ht.key||ht.key===0)&&(ht.viewModel[ht.key]=ht.lineLayer);var Yt=!ht.context||ie;ht.lineLayer.render(ht.viewModel.panels,Yt)}}),mt.attr("transform",function(ht){return l(ht.xScale(ht.xIndex),0)}),mt.call(v.behavior.drag().origin(function(ht){return ht}).on("drag",function(ht){var Yt=ht.parent;ue.linePickActive(!1),ht.x=Math.max(-E.overdrag,Math.min(ht.model.width+E.overdrag,v.event.x)),ht.canvasX=ht.x*ht.model.canvasPixelRatio,mt.sort(function($t,fr){return $t.x-fr.x}).each(function($t,fr){$t.xIndex=fr,$t.x=ht===$t?$t.x:$t.xScale($t.xIndex),$t.canvasX=$t.x*$t.model.canvasPixelRatio}),H(mt,Yt,Y),mt.filter(function($t){return Math.abs(ht.xIndex-$t.xIndex)!==0}).attr("transform",function($t){return l($t.xScale($t.xIndex),0)}),v.select(this).attr("transform",l(ht.x,0)),mt.each(function($t,fr,mr){mr===ht.parent.key&&(Yt.dimensions[fr]=$t)}),Yt.contextLayer&&Yt.contextLayer.render(Yt.panels,!1,!D(Yt)),Yt.focusLayer.render&&Yt.focusLayer.render(Yt.panels)}).on("dragend",function(ht){var Yt=ht.parent;ht.x=ht.xScale(ht.xIndex),ht.canvasX=ht.x*ht.model.canvasPixelRatio,H(mt,Yt,Y),v.select(this).attr("transform",function($t){return l($t.x,0)}),Yt.contextLayer&&Yt.contextLayer.render(Yt.panels,!1,!D(Yt)),Yt.focusLayer&&Yt.focusLayer.render(Yt.panels),Yt.pickLayer&&Yt.pickLayer.render(Yt.panels,!0),ue.linePickActive(!0),ie&&ie.axesMoved&&ie.axesMoved(Yt.key,Yt.dimensions.map(function($t){return $t.crossfilterDimensionIndex}))})),mt.exit().remove();var _t=mt.selectAll("."+E.cn.axisOverlays).data(h,d);_t.enter().append("g").classed(E.cn.axisOverlays,!0),_t.selectAll("."+E.cn.axis).remove();var vt=_t.selectAll("."+E.cn.axis).data(h,d);vt.enter().append("g").classed(E.cn.axis,!0),vt.each(function(ht){var Yt=ht.model.height/ht.model.tickDistance,$t=ht.domainScale,fr=$t.domain();v.select(this).call(v.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(Yt,ht.tickFormat).tickValues(ht.ordinal?fr:null).tickFormat(function(mr){return m.isOrdinal(ht)?mr:J(ht.model.dimensions[ht.visibleIndex],mr)}).scale($t)),s.font(vt.selectAll("text"),ht.model.tickFont)}),vt.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),vt.selectAll("text").style("cursor","default");var ut=_t.selectAll("."+E.cn.axisHeading).data(h,d);ut.enter().append("g").classed(E.cn.axisHeading,!0);var Fe=ut.selectAll("."+E.cn.axisTitle).data(h,d);Fe.enter().append("text").classed(E.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",se?"none":"auto"),Fe.text(function(ht){return ht.label}).each(function(ht){var Yt=v.select(this);s.font(Yt,ht.model.labelFont),i.convertToTspans(Yt,de)}).attr("transform",function(ht){var Yt=z(ht.model.labelAngle,ht.model.labelSide),$t=E.axisTitleOffset;return(Yt.dir>0?"":l(0,2*$t+ht.model.height))+a(Yt.degrees)+l(-$t*Yt.dx,-$t*Yt.dy)}).attr("text-anchor",function(ht){var Yt=z(ht.model.labelAngle,ht.model.labelSide),$t=Math.abs(Yt.dx),fr=Math.abs(Yt.dy);return 2*$t>fr?Yt.dir*Yt.dx<0?"start":"end":"middle"});var Pe=_t.selectAll("."+E.cn.axisExtent).data(h,d);Pe.enter().append("g").classed(E.cn.axisExtent,!0);var be=Pe.selectAll("."+E.cn.axisExtentTop).data(h,d);be.enter().append("g").classed(E.cn.axisExtentTop,!0),be.attr("transform",l(0,-E.axisExtentOffset));var Ye=be.selectAll("."+E.cn.axisExtentTopText).data(h,d);Ye.enter().append("text").classed(E.cn.axisExtentTopText,!0).call(V),Ye.text(function(ht){return le(ht,!0)}).each(function(ht){s.font(v.select(this),ht.model.rangeFont)});var yt=Pe.selectAll("."+E.cn.axisExtentBottom).data(h,d);yt.enter().append("g").classed(E.cn.axisExtentBottom,!0),yt.attr("transform",function(ht){return l(0,ht.model.height+E.axisExtentOffset)});var wt=yt.selectAll("."+E.cn.axisExtentBottomText).data(h,d);wt.enter().append("text").classed(E.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(V),wt.text(function(ht){return le(ht,!1)}).each(function(ht){s.font(v.select(this),ht.model.rangeFont)}),c.ensureAxisBrush(_t,ce,de)}}}),rF=Ne({"src/traces/parcoords/plot.js"(a,Z){var v=Zee(),w=NR(),C=tF().isVisible,P={};function t(l,i,s){var o=i.indexOf(s),u=l.indexOf(o);return u===-1&&(u+=i.length),u}function r(l,i){return function(o,u){return t(l,i,o)-t(l,i,u)}}var a=Z.exports=function(i,s){var o=i._fullLayout,u=w(i,[],P);if(u){var d={},h={},g={},m={},E=o._size;s.forEach(function(k,b){var A=k[0].trace;g[b]=A.index;var y=m[b]=A.index;d[b]=i.data[y].dimensions,h[b]=i.data[y].dimensions.slice()});var c=function(k,b,A){var y=h[k][b],f=A.map(function(U){return U.slice()}),p="dimensions["+b+"].constraintrange",x=o._tracePreGUI[i._fullData[g[k]]._fullInput.uid];if(x[p]===void 0){var N=y.constraintrange;x[p]=N||null}var D=i._fullData[g[k]].dimensions[b];f.length?(f.length===1&&(f=f[0]),y.constraintrange=f,D.constraintrange=f.slice(),f=[f]):(delete y.constraintrange,delete D.constraintrange,f=null);var B={};B[p]=f,i.emit("plotly_restyle",[B,[m[k]]])},_=function(k){i.emit("plotly_hover",k)},T=function(k){i.emit("plotly_unhover",k)},M=function(k,b){var A=r(b,h[k].filter(C));d[k].sort(A),h[k].filter(function(y){return!C(y)}).sort(function(y){return h[k].indexOf(y)}).forEach(function(y){d[k].splice(d[k].indexOf(y),1),d[k].splice(h[k].indexOf(y),0,y)}),i.emit("plotly_restyle",[{dimensions:[d[k]]},[m[k]]])};v(i,s,{width:E.w,height:E.h,margin:{t:E.t,r:E.r,b:E.b,l:E.l}},{filterChanged:c,hover:_,unhover:T,axesMoved:M})}};a.reglPrecompiled=P}}),$ee=Ne({"src/traces/parcoords/base_plot.js"(te){var Z=xn(),v=lv().getModuleCalcData,w=rF(),C=hp();te.name="parcoords",te.plot=function(P){var t=v(P.calcdata,"parcoords")[0];t.length&&w(P,t)},te.clean=function(P,t,r,a){var l=a._has&&a._has("parcoords"),i=t._has&&t._has("parcoords");l&&!i&&(a._paperdiv.selectAll(".parcoords").remove(),a._glimages.selectAll("*").remove())},te.toSVG=function(P){var t=P._fullLayout._glimages,r=Z.select(P).selectAll(".svg-container"),a=r.filter(function(i,s){return s===r.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function l(){var i=this,s=i.toDataURL("image/png"),o=t.append("svg:image");o.attr({xmlns:C.svg,"xlink:href":s,preserveAspectRatio:"none",x:0,y:0,width:i.style.width,height:i.style.height})}a.each(l),window.setTimeout(function(){Z.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}}}),Kee=Ne({"src/traces/parcoords/base_index.js"(te,Z){Z.exports={attributes:$N(),supplyDefaults:Uee(),calc:qee(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:$ee(),categories:["gl","regl","noOpacity","noHover"],meta:{}}}}),Jee=Ne({"src/traces/parcoords/index.js"(te,Z){var v=Kee();v.plot=rF(),Z.exports=v}}),Qee=Ne({"lib/parcoords.js"(te,Z){Z.exports=Jee()}}),nF=Ne({"src/traces/parcats/attributes.js"(te,Z){var v=fi().extendFlat,w=qo(),C=bo(),P=Wu(),{hovertemplateAttrs:t,templatefallbackAttrs:r}=Fl(),a=Fc().attributes,l=v({editType:"calc"},P("line",{editTypeOverride:"calc"}),{shape:{valType:"enumerated",values:["linear","hspline"],dflt:"linear",editType:"plot"},hovertemplate:t({editType:"plot",arrayOk:!1},{keys:["count","probability"]}),hovertemplatefallback:r({editType:"plot"})});Z.exports={domain:a({name:"parcats",trace:!0,editType:"calc"}),hoverinfo:v({},w.hoverinfo,{flags:["count","probability"],editType:"plot",arrayOk:!1}),hoveron:{valType:"enumerated",values:["category","color","dimension"],dflt:"category",editType:"plot"},hovertemplate:t({editType:"plot",arrayOk:!1},{keys:["count","probability","category","categorycount","colorcount","bandcolorcount"]}),hovertemplatefallback:r({editType:"plot"}),arrangement:{valType:"enumerated",values:["perpendicular","freeform","fixed"],dflt:"perpendicular",editType:"plot"},bundlecolors:{valType:"boolean",dflt:!0,editType:"plot"},sortpaths:{valType:"enumerated",values:["forward","backward"],dflt:"forward",editType:"plot"},labelfont:C({editType:"calc"}),tickfont:C({autoShadowDflt:!0,editType:"calc"}),dimensions:{_isLinkedToArray:"dimension",label:{valType:"string",editType:"calc"},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},ticktext:{valType:"data_array",editType:"calc"},values:{valType:"data_array",dflt:[],editType:"calc"},displayindex:{valType:"integer",editType:"calc"},editType:"calc",visible:{valType:"boolean",dflt:!0,editType:"calc"}},line:l,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}}}),ete=Ne({"src/traces/parcats/defaults.js"(te,Z){var v=In(),w=Bd().hasColorscale,C=Rh(),P=Fc().defaults,t=jd(),r=nF(),a=FR(),l=Ri().isTypedArraySpec;function i(o,u,d,h,g){g("line.shape"),g("line.hovertemplate"),g("line.hovertemplatefallback");var m=g("line.color",h.colorway[0]);if(w(o,"line")&&v.isArrayOrTypedArray(m)){if(m.length)return g("line.colorscale"),C(o,u,h,g,{prefix:"line.",cLetter:"c"}),m.length;u.line.color=d}return 1/0}function s(o,u){function d(T,M){return v.coerce(o,u,r.dimensions,T,M)}var h=d("values"),g=d("visible");if(h&&h.length||(g=u.visible=!1),g){d("label"),d("displayindex",u._index);var m=o.categoryarray,E=v.isArrayOrTypedArray(m)&&m.length>0||l(m),c;E&&(c="array");var _=d("categoryorder",c);_==="array"?(d("categoryarray"),d("ticktext")):(delete o.categoryarray,delete o.ticktext),!E&&_==="array"&&(u.categoryorder="trace")}}Z.exports=function(u,d,h,g){function m(T,M){return v.coerce(u,d,r,T,M)}var E=t(u,d,{name:"dimensions",handleItemDefaults:s}),c=i(u,d,h,g,m);P(d,g,m),(!Array.isArray(E)||!E.length)&&(d.visible=!1),a(d,E,"values",c),m("hoveron"),m("hovertemplate"),m("hovertemplatefallback"),m("arrangement"),m("bundlecolors"),m("sortpaths"),m("counts");var _=g.font;v.coerceFont(m,"labelfont",_,{overrideDflt:{size:Math.round(_.size)}}),v.coerceFont(m,"tickfont",_,{autoShadowDflt:!0,overrideDflt:{size:Math.round(_.size/1.2)}})}}}),tte=Ne({"src/traces/parcats/calc.js"(te,Z){var v=a1().wrap,w=Bd().hasColorscale,C=Ud(),P=bx(),t=zs(),r=In(),a=Fn();Z.exports=function(_,T){var M=r.filterVisible(T.dimensions);if(M.length===0)return[];var k=M.map(function(W){var ie;if(W.categoryorder==="trace")ie=null;else if(W.categoryorder==="array")ie=W.categoryarray;else{ie=P(W.values);for(var se=!0,ee=0;ee<ie.length;ee++)if(!a(ie[ee])){se=!1;break}ie.sort(se?r.sorterAsc:void 0),W.categoryorder==="category descending"&&(ie=ie.reverse())}return h(W.values,ie)}),b,A,y;r.isArrayOrTypedArray(T.counts)?b=T.counts:b=[T.counts],g(M),M.forEach(function(W,ie){m(W,k[ie])});var f=T.line,p;f?(w(T,"line")&&C(_,T,{vals:T.line.color,containerStr:"line",cLetter:"c"}),p=t.tryColorscale(f)):p=r.identity;function x(W){var ie,se;return r.isArrayOrTypedArray(f.color)?(ie=f.color[W%f.color.length],se=ie):ie=f.color,{color:p(ie),rawColor:se}}var N=M[0].values.length,D={},B=k.map(function(W){return W.inds});y=0;var U,V;for(U=0;U<N;U++){var q=[];for(V=0;V<B.length;V++)q.push(B[V][U]);A=b[U%b.length],y+=A;var z=x(U),H=q+"-"+z.rawColor;D[H]===void 0&&(D[H]=u(q,z.color,z.rawColor)),d(D[H],U,A)}var G=M.map(function(W,ie){return i(ie,W._index,W._displayindex,W.label,y)});for(U=0;U<N;U++)for(A=b[U%b.length],V=0;V<G.length;V++){var J=G[V].containerInd,le=k[V].inds[U],ge=G[V].categories;if(ge[le]===void 0){var de=T.dimensions[J]._categoryarray[le],me=T.dimensions[J]._ticktext[le];ge[le]=s(V,le,de,me)}o(ge[le],U,A)}return v(l(G,D,y))};function l(c,_,T){var M=c.map(function(k){return k.categories.length}).reduce(function(k,b){return Math.max(k,b)});return{dimensions:c,paths:_,trace:void 0,maxCats:M,count:T}}function i(c,_,T,M,k){return{dimensionInd:c,containerInd:_,displayInd:T,dimensionLabel:M,count:k,categories:[],dragX:null}}function s(c,_,T,M){return{dimensionInd:c,categoryInd:_,categoryValue:T,displayInd:_,categoryLabel:M,valueInds:[],count:0,dragY:null}}function o(c,_,T){c.valueInds.push(_),c.count+=T}function u(c,_,T){return{categoryInds:c,color:_,rawColor:T,valueInds:[],count:0}}function d(c,_,T){c.valueInds.push(_),c.count+=T}function h(c,_){_==null?_=[]:_=_.map(function(p){return p});var T={},M={},k=[];_.forEach(function(p,x){T[p]=0,M[p]=x});for(var b=0;b<c.length;b++){var A=c[b],y;T[A]===void 0?(T[A]=1,y=_.push(A)-1,M[A]=y):(T[A]++,y=M[A]),k.push(y)}var f=_.map(function(p){return T[p]});return{uniqueValues:_,uniqueCounts:f,inds:k}}function g(c){var _=c.map(function(M){return M.displayindex}),T;if(E(_))for(T=0;T<c.length;T++)c[T]._displayindex=c[T].displayindex;else for(T=0;T<c.length;T++)c[T]._displayindex=T}function m(c,_){c._categoryarray=_.uniqueValues,c.ticktext===null||c.ticktext===void 0?c._ticktext=[]:c._ticktext=c.ticktext.slice();for(var T=c._ticktext.length;T<_.uniqueValues.length;T++)c._ticktext.push(_.uniqueValues[T])}function E(c){for(var _=new Array(c.length),T=0;T<c.length;T++){if(c[T]<0||c[T]>=c.length||_[c[T]]!==void 0)return!1;_[c[T]]=!0}return!0}}}),rte=Ne({"src/traces/parcats/parcats.js"(te,Z){var v=xn(),w=(Ao(),Or(Hi)).interpolateNumber,C=Vw(),P=oh(),t=In(),r=t.strTranslate,a=zs(),l=to(),i=hc();function s(ee,pe,oe,Y){var ce=pe._context.staticPlot,ue=ee.map(de.bind(0,pe,oe)),_e=Y.selectAll("g.parcatslayer").data([null]);_e.enter().append("g").attr("class","parcatslayer").style("pointer-events",ce?"none":"all");var Le=_e.selectAll("g.trace.parcats").data(ue,o),ze=Le.enter().append("g").attr("class","trace parcats");Le.attr("transform",function(be){return r(be.x,be.y)}),ze.append("g").attr("class","paths");var Xe=Le.select("g.paths"),Ve=Xe.selectAll("path.path").data(function(be){return be.paths},o);Ve.attr("fill",function(be){return be.model.color});var rt=Ve.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(be){return be.model.color}).attr("fill-opacity",0);_(rt),Ve.attr("d",function(be){return be.svgD}),rt.empty()||Ve.sort(d),Ve.exit().remove(),Ve.on("mouseover",h).on("mouseout",g).on("click",c),ze.append("g").attr("class","dimensions");var mt=Le.select("g.dimensions"),_t=mt.selectAll("g.dimension").data(function(be){return be.dimensions},o);_t.enter().append("g").attr("class","dimension"),_t.attr("transform",function(be){return r(be.x,0)}),_t.exit().remove();var vt=_t.selectAll("g.category").data(function(be){return be.categories},o),ut=vt.enter().append("g").attr("class","category");vt.attr("transform",function(be){return r(0,be.y)}),ut.append("rect").attr("class","catrect").attr("pointer-events","none"),vt.select("rect.catrect").attr("fill","none").attr("width",function(be){return be.width}).attr("height",function(be){return be.height}),k(ut);var Fe=vt.selectAll("rect.bandrect").data(function(be){return be.bands},o);Fe.each(function(){t.raiseToTop(this)}),Fe.attr("fill",function(be){return be.color});var Pe=Fe.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(be){return be.color}).attr("fill-opacity",0);Fe.attr("fill",function(be){return be.color}).attr("width",function(be){return be.width}).attr("height",function(be){return be.height}).attr("y",function(be){return be.y}).attr("cursor",function(be){return be.parcatsViewModel.arrangement==="fixed"?"default":be.parcatsViewModel.arrangement==="perpendicular"?"ns-resize":"move"}),A(Pe),Fe.exit().remove(),ut.append("text").attr("class","catlabel").attr("pointer-events","none"),vt.select("text.catlabel").attr("text-anchor",function(be){return u(be)?"start":"end"}).attr("alignment-baseline","middle").style("fill","rgb(0, 0, 0)").attr("x",function(be){return u(be)?be.width+5:-5}).attr("y",function(be){return be.height/2}).text(function(be){return be.model.categoryLabel}).each(function(be){a.font(v.select(this),be.parcatsViewModel.categorylabelfont),i.convertToTspans(v.select(this),pe)}),ut.append("text").attr("class","dimlabel"),vt.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(be){return be.parcatsViewModel.arrangement==="fixed"?"default":"ew-resize"}).attr("x",function(be){return be.width/2}).attr("y",-5).text(function(be,Ye){return Ye===0?be.parcatsViewModel.model.dimensions[be.model.dimensionInd].dimensionLabel:null}).each(function(be){a.font(v.select(this),be.parcatsViewModel.labelfont)}),vt.selectAll("rect.bandrect").on("mouseover",V).on("mouseout",q),vt.exit().remove(),_t.call(v.behavior.drag().origin(function(be){return{x:be.x,y:0}}).on("dragstart",z).on("drag",H).on("dragend",G)),Le.each(function(be){be.traceSelection=v.select(this),be.pathSelection=v.select(this).selectAll("g.paths").selectAll("path.path"),be.dimensionSelection=v.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),Le.exit().remove()}Z.exports=function(ee,pe,oe,Y){s(oe,ee,Y,pe)};function o(ee){return ee.key}function u(ee){var pe=ee.parcatsViewModel.dimensions.length,oe=ee.parcatsViewModel.dimensions[pe-1].model.dimensionInd;return ee.model.dimensionInd===oe}function d(ee,pe){return ee.model.rawColor>pe.model.rawColor?1:ee.model.rawColor<pe.model.rawColor?-1:0}function h(ee){if(!ee.parcatsViewModel.dragDimension&&ee.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){t.raiseToTop(this),T(v.select(this));var pe=m(ee),oe=E(ee);if(ee.parcatsViewModel.graphDiv.emit("plotly_hover",{points:pe,event:v.event,constraints:oe}),ee.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var Y=v.mouse(this)[0],ce=ee.parcatsViewModel.graphDiv,ue=ee.parcatsViewModel.trace,_e=ce._fullLayout,Le=_e._paperdiv.node().getBoundingClientRect(),ze=ee.parcatsViewModel.graphDiv.getBoundingClientRect(),Xe,Ve,rt;for(rt=0;rt<ee.leftXs.length-1;rt++)if(ee.leftXs[rt]+ee.dimWidths[rt]-2<=Y&&Y<=ee.leftXs[rt+1]+2){var mt=ee.parcatsViewModel.dimensions[rt],_t=ee.parcatsViewModel.dimensions[rt+1];Xe=(mt.x+mt.width+_t.x)/2,Ve=(ee.topYs[rt]+ee.topYs[rt+1]+ee.height)/2;break}var vt=ee.parcatsViewModel.x+Xe,ut=ee.parcatsViewModel.y+Ve,Fe=l.mostReadable(ee.model.color,["black","white"]),Pe=ee.model.count,be=Pe/ee.parcatsViewModel.model.count,Ye={countLabel:Pe,probabilityLabel:be.toFixed(3)},yt=[];ee.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&yt.push(["Count:",Ye.countLabel].join(" ")),ee.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&yt.push(["P:",Ye.probabilityLabel].join(" "));var wt=yt.join("<br>"),ht=v.mouse(ce)[0];P.loneHover({trace:ue,x:vt-Le.left+ze.left,y:ut-Le.top+ze.top,text:wt,color:ee.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:Fe,idealAlign:ht<vt?"right":"left",hovertemplate:(ue.line||{}).hovertemplate,hovertemplateLabels:Ye,eventData:[{data:ue._input,fullData:ue,count:Pe,probability:be}]},{container:_e._hoverlayer.node(),outerContainer:_e._paper.node(),gd:ce})}}}function g(ee){if(!ee.parcatsViewModel.dragDimension&&(_(v.select(this)),P.loneUnhover(ee.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()),ee.parcatsViewModel.pathSelection.sort(d),ee.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1)){var pe=m(ee),oe=E(ee);ee.parcatsViewModel.graphDiv.emit("plotly_unhover",{points:pe,event:v.event,constraints:oe})}}function m(ee){for(var pe=[],oe=J(ee.parcatsViewModel),Y=0;Y<ee.model.valueInds.length;Y++){var ce=ee.model.valueInds[Y];pe.push({curveNumber:oe,pointNumber:ce})}return pe}function E(ee){for(var pe={},oe=ee.parcatsViewModel.model.dimensions,Y=0;Y<oe.length;Y++){var ce=oe[Y],ue=ce.categories[ee.model.categoryInds[Y]];pe[ce.containerInd]=ue.categoryValue}return ee.model.rawColor!==void 0&&(pe.color=ee.model.rawColor),pe}function c(ee){if(ee.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var pe=m(ee),oe=E(ee);ee.parcatsViewModel.graphDiv.emit("plotly_click",{points:pe,event:v.event,constraints:oe})}}function _(ee){ee.attr("fill",function(pe){return pe.model.color}).attr("fill-opacity",.6).attr("stroke","lightgray").attr("stroke-width",.2).attr("stroke-opacity",1)}function T(ee){ee.attr("fill-opacity",.8).attr("stroke",function(pe){return l.mostReadable(pe.model.color,["black","white"])}).attr("stroke-width",.3)}function M(ee){ee.select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5)}function k(ee){ee.select("rect.catrect").attr("stroke","black").attr("stroke-width",1).attr("stroke-opacity",1)}function b(ee){ee.attr("stroke","black").attr("stroke-width",1.5)}function A(ee){ee.attr("stroke","black").attr("stroke-width",.2).attr("stroke-opacity",1).attr("fill-opacity",1)}function y(ee){var pe=ee.parcatsViewModel.pathSelection,oe=ee.categoryViewModel.model.dimensionInd,Y=ee.categoryViewModel.model.categoryInd;return pe.filter(function(ce){return ce.model.categoryInds[oe]===Y&&ce.model.color===ee.color})}function f(ee){var pe=v.select(ee.parentNode).selectAll("rect.bandrect");pe.each(function(oe){var Y=y(oe);T(Y),Y.each(function(){t.raiseToTop(this)})}),M(v.select(ee.parentNode))}function p(ee){var pe=v.select(ee).datum(),oe=y(pe);T(oe),oe.each(function(){t.raiseToTop(this)}),v.select(ee.parentNode).selectAll("rect.bandrect").filter(function(Y){return Y.color===pe.color}).each(function(){t.raiseToTop(this),b(v.select(this))})}function x(ee,pe,oe){var Y=v.select(ee).datum(),ce=Y.categoryViewModel.model,ue=Y.parcatsViewModel.graphDiv,_e=v.select(ee.parentNode).selectAll("rect.bandrect"),Le=[];_e.each(function(Xe){var Ve=y(Xe);Ve.each(function(rt){Array.prototype.push.apply(Le,m(rt))})});var ze={};ze[ce.dimensionInd]=ce.categoryValue,ue.emit(pe,{points:Le,event:oe,constraints:ze})}function N(ee,pe,oe){var Y=v.select(ee).datum(),ce=Y.categoryViewModel.model,ue=Y.parcatsViewModel.graphDiv,_e=y(Y),Le=[];_e.each(function(Xe){Array.prototype.push.apply(Le,m(Xe))});var ze={};ze[ce.dimensionInd]=ce.categoryValue,Y.rawColor!==void 0&&(ze.color=Y.rawColor),ue.emit(pe,{points:Le,event:oe,constraints:ze})}function D(ee,pe,oe){ee._fullLayout._calcInverseTransform(ee);var Y=ee._fullLayout._invScaleX,ce=ee._fullLayout._invScaleY,ue=v.select(oe.parentNode).select("rect.catrect"),_e=ue.node().getBoundingClientRect(),Le=ue.datum(),ze=Le.parcatsViewModel,Xe=ze.model.dimensions[Le.model.dimensionInd],Ve=ze.trace,rt=_e.top+_e.height/2,mt,_t;ze.dimensions.length>1&&Xe.displayInd===ze.dimensions.length-1?(mt=_e.left,_t="left"):(mt=_e.left+_e.width,_t="right");var vt=Le.model.count,ut=Le.model.categoryLabel,Fe=vt/Le.parcatsViewModel.model.count,Pe={countLabel:vt,categoryLabel:ut,probabilityLabel:Fe.toFixed(3)},be=[];Le.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&be.push(["Count:",Pe.countLabel].join(" ")),Le.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&be.push(["P("+Pe.categoryLabel+"):",Pe.probabilityLabel].join(" "));var Ye=be.join("<br>");return{trace:Ve,x:Y*(mt-pe.left),y:ce*(rt-pe.top),text:Ye,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:_t,hovertemplate:Ve.hovertemplate,hovertemplateLabels:Pe,eventData:[{data:Ve._input,fullData:Ve,count:vt,category:ut,probability:Fe}]}}function B(ee,pe,oe){var Y=[];return v.select(oe.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){var ce=this;Y.push(D(ee,pe,ce))}),Y}function U(ee,pe,oe){ee._fullLayout._calcInverseTransform(ee);var Y=ee._fullLayout._invScaleX,ce=ee._fullLayout._invScaleY,ue=oe.getBoundingClientRect(),_e=v.select(oe).datum(),Le=_e.categoryViewModel,ze=Le.parcatsViewModel,Xe=ze.model.dimensions[Le.model.dimensionInd],Ve=ze.trace,rt=ue.y+ue.height/2,mt,_t;ze.dimensions.length>1&&Xe.displayInd===ze.dimensions.length-1?(mt=ue.left,_t="left"):(mt=ue.left+ue.width,_t="right");var vt=Le.model.categoryLabel,ut=_e.parcatsViewModel.model.count,Fe=0;_e.categoryViewModel.bands.forEach(function(mr){mr.color===_e.color&&(Fe+=mr.count)});var Pe=Le.model.count,be=0;ze.pathSelection.each(function(mr){mr.model.color===_e.color&&(be+=mr.model.count)});var Ye=Fe/ut,yt=Fe/be,wt=Fe/Pe,ht={countLabel:Fe,categoryLabel:vt,probabilityLabel:Ye.toFixed(3)},Yt=[];Le.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&Yt.push(["Count:",ht.countLabel].join(" ")),Le.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&(Yt.push("P(color ∩ "+vt+"): "+ht.probabilityLabel),Yt.push("P("+vt+" | color): "+yt.toFixed(3)),Yt.push("P(color | "+vt+"): "+wt.toFixed(3)));var $t=Yt.join("<br>"),fr=l.mostReadable(_e.color,["black","white"]);return{trace:Ve,x:Y*(mt-pe.left),y:ce*(rt-pe.top),text:$t,color:_e.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:fr,fontSize:10,idealAlign:_t,hovertemplate:Ve.hovertemplate,hovertemplateLabels:ht,eventData:[{data:Ve._input,fullData:Ve,category:vt,count:ut,probability:Ye,categorycount:Pe,colorcount:be,bandcolorcount:Fe}]}}function V(ee){if(!ee.parcatsViewModel.dragDimension&&ee.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var pe=v.mouse(this)[1];if(pe<-1)return;var oe=ee.parcatsViewModel.graphDiv,Y=oe._fullLayout,ce=Y._paperdiv.node().getBoundingClientRect(),ue=ee.parcatsViewModel.hoveron,_e=this;if(ue==="color"?(p(_e),N(_e,"plotly_hover",v.event)):(f(_e),x(_e,"plotly_hover",v.event)),ee.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var Le;ue==="category"?Le=D(oe,ce,_e):ue==="color"?Le=U(oe,ce,_e):ue==="dimension"&&(Le=B(oe,ce,_e)),Le&&P.loneHover(Le,{container:Y._hoverlayer.node(),outerContainer:Y._paper.node(),gd:oe})}}}function q(ee){var pe=ee.parcatsViewModel;if(!pe.dragDimension&&(_(pe.pathSelection),k(pe.dimensionSelection.selectAll("g.category")),A(pe.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),P.loneUnhover(pe.graphDiv._fullLayout._hoverlayer.node()),pe.pathSelection.sort(d),pe.hoverinfoItems.indexOf("skip")===-1)){var oe=ee.parcatsViewModel.hoveron,Y=this;oe==="color"?N(Y,"plotly_unhover",v.event):x(Y,"plotly_unhover",v.event)}}function z(ee){ee.parcatsViewModel.arrangement!=="fixed"&&(ee.dragDimensionDisplayInd=ee.model.displayInd,ee.initialDragDimensionDisplayInds=ee.parcatsViewModel.model.dimensions.map(function(pe){return pe.displayInd}),ee.dragHasMoved=!1,ee.dragCategoryDisplayInd=null,v.select(this).selectAll("g.category").select("rect.catrect").each(function(pe){var oe=v.mouse(this)[0],Y=v.mouse(this)[1];-2<=oe&&oe<=pe.width+2&&-2<=Y&&Y<=pe.height+2&&(ee.dragCategoryDisplayInd=pe.model.displayInd,ee.initialDragCategoryDisplayInds=ee.model.categories.map(function(ce){return ce.displayInd}),pe.model.dragY=pe.y,t.raiseToTop(this.parentNode),v.select(this.parentNode).selectAll("rect.bandrect").each(function(ce){ce.y<Y&&Y<=ce.y+ce.height&&(ee.potentialClickBand=this)}))}),ee.parcatsViewModel.dragDimension=ee,P.loneUnhover(ee.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()))}function H(ee){if(ee.parcatsViewModel.arrangement!=="fixed"&&(ee.dragHasMoved=!0,ee.dragDimensionDisplayInd!==null)){var pe=ee.dragDimensionDisplayInd,oe=pe-1,Y=pe+1,ce=ee.parcatsViewModel.dimensions[pe];if(ee.dragCategoryDisplayInd!==null){var ue=ce.categories[ee.dragCategoryDisplayInd];ue.model.dragY+=v.event.dy;var _e=ue.model.dragY,Le=ue.model.displayInd,ze=ce.categories,Xe=ze[Le-1],Ve=ze[Le+1];Xe!==void 0&&_e<Xe.y+Xe.height/2&&(ue.model.displayInd=Xe.model.displayInd,Xe.model.displayInd=Le),Ve!==void 0&&_e+ue.height>Ve.y+Ve.height/2&&(ue.model.displayInd=Ve.model.displayInd,Ve.model.displayInd=Le),ee.dragCategoryDisplayInd=ue.model.displayInd}if(ee.dragCategoryDisplayInd===null||ee.parcatsViewModel.arrangement==="freeform"){ce.model.dragX=v.event.x;var rt=ee.parcatsViewModel.dimensions[oe],mt=ee.parcatsViewModel.dimensions[Y];rt!==void 0&&ce.model.dragX<rt.x+rt.width&&(ce.model.displayInd=rt.model.displayInd,rt.model.displayInd=pe),mt!==void 0&&ce.model.dragX+ce.width>mt.x&&(ce.model.displayInd=mt.model.displayInd,mt.model.displayInd=ee.dragDimensionDisplayInd),ee.dragDimensionDisplayInd=ce.model.displayInd}ie(ee.parcatsViewModel),W(ee.parcatsViewModel),ge(ee.parcatsViewModel),le(ee.parcatsViewModel)}}function G(ee){if(ee.parcatsViewModel.arrangement!=="fixed"&&ee.dragDimensionDisplayInd!==null){v.select(this).selectAll("text").attr("font-weight","normal");var pe={},oe=J(ee.parcatsViewModel),Y=ee.parcatsViewModel.model.dimensions.map(function(mt){return mt.displayInd}),ce=ee.initialDragDimensionDisplayInds.some(function(mt,_t){return mt!==Y[_t]});ce&&Y.forEach(function(mt,_t){var vt=ee.parcatsViewModel.model.dimensions[_t].containerInd;pe["dimensions["+vt+"].displayindex"]=mt});var ue=!1;if(ee.dragCategoryDisplayInd!==null){var _e=ee.model.categories.map(function(mt){return mt.displayInd});if(ue=ee.initialDragCategoryDisplayInds.some(function(mt,_t){return mt!==_e[_t]}),ue){var Le=ee.model.categories.slice().sort(function(mt,_t){return mt.displayInd-_t.displayInd}),ze=Le.map(function(mt){return mt.categoryValue}),Xe=Le.map(function(mt){return mt.categoryLabel});pe["dimensions["+ee.model.containerInd+"].categoryarray"]=[ze],pe["dimensions["+ee.model.containerInd+"].ticktext"]=[Xe],pe["dimensions["+ee.model.containerInd+"].categoryorder"]="array"}}if(ee.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1&&!ee.dragHasMoved&&ee.potentialClickBand&&(ee.parcatsViewModel.hoveron==="color"?N(ee.potentialClickBand,"plotly_click",v.event.sourceEvent):x(ee.potentialClickBand,"plotly_click",v.event.sourceEvent)),ee.model.dragX=null,ee.dragCategoryDisplayInd!==null){var Ve=ee.parcatsViewModel.dimensions[ee.dragDimensionDisplayInd].categories[ee.dragCategoryDisplayInd];Ve.model.dragY=null,ee.dragCategoryDisplayInd=null}ee.dragDimensionDisplayInd=null,ee.parcatsViewModel.dragDimension=null,ee.dragHasMoved=null,ee.potentialClickBand=null,ie(ee.parcatsViewModel),W(ee.parcatsViewModel);var rt=v.transition().duration(300).ease("cubic-in-out");rt.each(function(){ge(ee.parcatsViewModel,!0),le(ee.parcatsViewModel,!0)}).each("end",function(){(ce||ue)&&C.restyle(ee.parcatsViewModel.graphDiv,pe,[oe])})}}function J(ee){for(var pe,oe=ee.graphDiv._fullData,Y=0;Y<oe.length;Y++)if(ee.key===oe[Y].uid){pe=Y;break}return pe}function le(ee,pe){pe===void 0&&(pe=!1);function oe(Y){return pe?Y.transition():Y}ee.pathSelection.data(function(Y){return Y.paths},o),oe(ee.pathSelection).attr("d",function(Y){return Y.svgD})}function ge(ee,pe){pe===void 0&&(pe=!1);function oe(ze){return pe?ze.transition():ze}ee.dimensionSelection.data(function(ze){return ze.dimensions},o);var Y=ee.dimensionSelection.selectAll("g.category").data(function(ze){return ze.categories},o);oe(ee.dimensionSelection).attr("transform",function(ze){return r(ze.x,0)}),oe(Y).attr("transform",function(ze){return r(0,ze.y)});var ce=Y.select(".dimlabel");ce.text(function(ze,Xe){return Xe===0?ze.parcatsViewModel.model.dimensions[ze.model.dimensionInd].dimensionLabel:null});var ue=Y.select(".catlabel");ue.attr("text-anchor",function(ze){return u(ze)?"start":"end"}).attr("x",function(ze){return u(ze)?ze.width+5:-5}).each(function(ze){var Xe,Ve;u(ze)?(Xe=ze.width+5,Ve="start"):(Xe=-5,Ve="end"),v.select(this).selectAll("tspan").attr("x",Xe).attr("text-anchor",Ve)});var _e=Y.selectAll("rect.bandrect").data(function(ze){return ze.bands},o),Le=_e.enter().append("rect").attr("class","bandrect").attr("cursor","move").attr("stroke-opacity",0).attr("fill",function(ze){return ze.color}).attr("fill-opacity",0);_e.attr("fill",function(ze){return ze.color}).attr("width",function(ze){return ze.width}).attr("height",function(ze){return ze.height}).attr("y",function(ze){return ze.y}),A(Le),_e.each(function(){t.raiseToTop(this)}),_e.exit().remove()}function de(ee,pe,oe){var Y=oe[0],ce=pe.margin||{l:80,r:80,t:100,b:80},ue=Y.trace,_e=ue.domain,Le=pe.width,ze=pe.height,Xe=Math.floor(Le*(_e.x[1]-_e.x[0])),Ve=Math.floor(ze*(_e.y[1]-_e.y[0])),rt=_e.x[0]*Le+ce.l,mt=pe.height-_e.y[1]*pe.height+ce.t,_t=ue.line.shape,vt;ue.hoverinfo==="all"?vt=["count","probability"]:vt=(ue.hoverinfo||"").split("+");var ut={trace:ue,key:ue.uid,model:Y,x:rt,y:mt,width:Xe,height:Ve,hoveron:ue.hoveron,hoverinfoItems:vt,arrangement:ue.arrangement,bundlecolors:ue.bundlecolors,sortpaths:ue.sortpaths,labelfont:ue.labelfont,categorylabelfont:ue.tickfont,pathShape:_t,dragDimension:null,margin:ce,paths:[],dimensions:[],graphDiv:ee,traceSelection:null,pathSelection:null,dimensionSelection:null};return Y.dimensions&&(ie(ut),W(ut)),ut}function me(ee,pe,oe,Y,ce){var ue=[],_e=[],Le,ze;for(ze=0;ze<oe.length-1;ze++)Le=w(oe[ze]+ee[ze],ee[ze+1]),ue.push(Le(ce)),_e.push(Le(1-ce));var Xe="M "+ee[0]+","+pe[0];for(Xe+="l"+oe[0]+",0 ",ze=1;ze<oe.length;ze++)Xe+="C"+ue[ze-1]+","+pe[ze-1]+" "+_e[ze-1]+","+pe[ze]+" "+ee[ze]+","+pe[ze],Xe+="l"+oe[ze]+",0 ";for(Xe+="l0,"+Y+" ",Xe+="l -"+oe[oe.length-1]+",0 ",ze=oe.length-2;ze>=0;ze--)Xe+="C"+_e[ze]+","+(pe[ze+1]+Y)+" "+ue[ze]+","+(pe[ze]+Y)+" "+(ee[ze]+oe[ze])+","+(pe[ze]+Y),Xe+="l-"+oe[ze]+",0 ";return Xe+="Z",Xe}function W(ee){var pe=ee.dimensions,oe=ee.model,Y=pe.map(function(fn){return fn.categories.map(function(Br){return Br.y})}),ce=ee.model.dimensions.map(function(fn){return fn.categories.map(function(Br){return Br.displayInd})}),ue=ee.model.dimensions.map(function(fn){return fn.displayInd}),_e=ee.dimensions.map(function(fn){return fn.model.dimensionInd}),Le=pe.map(function(fn){return fn.x}),ze=pe.map(function(fn){return fn.width}),Xe=[];for(var Ve in oe.paths)oe.paths.hasOwnProperty(Ve)&&Xe.push(oe.paths[Ve]);function rt(fn){var Br=fn.categoryInds.map(function(Ot,$e){return ce[$e][Ot]}),Qr=_e.map(function(Ot){return Br[Ot]});return Qr}Xe.sort(function(fn,Br){var Qr=rt(fn),Ot=rt(Br);return ee.sortpaths==="backward"&&(Qr.reverse(),Ot.reverse()),Qr.push(fn.valueInds[0]),Ot.push(Br.valueInds[0]),ee.bundlecolors&&(Qr.unshift(fn.rawColor),Ot.unshift(Br.rawColor)),Qr<Ot?-1:Qr>Ot?1:0});for(var mt=new Array(Xe.length),_t=pe[0].model.count,vt=pe[0].categories.map(function(fn){return fn.height}).reduce(function(fn,Br){return fn+Br}),ut=0;ut<Xe.length;ut++){var Fe=Xe[ut],Pe;_t>0?Pe=vt*(Fe.count/_t):Pe=0;for(var be=new Array(Y.length),Ye=0;Ye<Fe.categoryInds.length;Ye++){var yt=Fe.categoryInds[Ye],wt=ce[Ye][yt],ht=ue[Ye];be[ht]=Y[ht][wt],Y[ht][wt]+=Pe;var Yt=ee.dimensions[ht].categories[wt],$t=Yt.bands.length,fr=Yt.bands[$t-1];if(fr===void 0||Fe.rawColor!==fr.rawColor){var mr=fr===void 0?0:fr.y+fr.height;Yt.bands.push({key:mr,color:Fe.color,rawColor:Fe.rawColor,height:Pe,width:Yt.width,count:Fe.count,y:mr,categoryViewModel:Yt,parcatsViewModel:ee})}else{var Ur=Yt.bands[$t-1];Ur.height+=Pe,Ur.count+=Fe.count}}var jr;ee.pathShape==="hspline"?jr=me(Le,be,ze,Pe,.5):jr=me(Le,be,ze,Pe,0),mt[ut]={key:Fe.valueInds[0],model:Fe,height:Pe,leftXs:Le,topYs:be,dimWidths:ze,svgD:jr,parcatsViewModel:ee}}ee.paths=mt}function ie(ee){var pe=ee.model.dimensions.map(function(_e){return{displayInd:_e.displayInd,dimensionInd:_e.dimensionInd}});pe.sort(function(_e,Le){return _e.displayInd-Le.displayInd});var oe=[];for(var Y in pe){var ce=pe[Y].dimensionInd,ue=ee.model.dimensions[ce];oe.push(se(ee,ue))}ee.dimensions=oe}function se(ee,pe){var oe=40,Y=16,ce=ee.model.dimensions.length,ue=pe.displayInd,_e,Le,ze;ce>1?_e=(ee.width-2*oe-Y)/(ce-1):_e=0,Le=oe,ze=Le+_e*ue;var Xe=[],Ve=ee.model.maxCats,rt=pe.categories.length,mt=8,_t=pe.count,vt=ee.height-mt*(Ve-1),ut,Fe,Pe,be,Ye,yt=(Ve-rt)*mt/2,wt=pe.categories.map(function(ht){return{displayInd:ht.displayInd,categoryInd:ht.categoryInd}});for(wt.sort(function(ht,Yt){return ht.displayInd-Yt.displayInd}),Ye=0;Ye<rt;Ye++)be=wt[Ye].categoryInd,Fe=pe.categories[be],_t>0?ut=Fe.count/_t*vt:ut=0,Pe={key:Fe.valueInds[0],model:Fe,width:Y,height:ut,y:Fe.dragY!==null?Fe.dragY:yt,bands:[],parcatsViewModel:ee},yt=yt+ut+mt,Xe.push(Pe);return{key:pe.dimensionInd,x:pe.dragX!==null?pe.dragX:ze,y:0,width:Y,model:pe,categories:Xe,parcatsViewModel:ee,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}}}),aF=Ne({"src/traces/parcats/plot.js"(te,Z){var v=rte();Z.exports=function(C,P,t,r){var a=C._fullLayout,l=a._paper,i=a._size;v(C,l,P,{width:i.w,height:i.h,margin:{t:i.t,r:i.r,b:i.b,l:i.l}},t,r)}}}),nte=Ne({"src/traces/parcats/base_plot.js"(te){var Z=lv().getModuleCalcData,v=aF(),w="parcats";te.name=w,te.plot=function(C,P,t,r){var a=Z(C.calcdata,w);if(a.length){var l=a[0];v(C,l,t,r)}},te.clean=function(C,P,t,r){var a=r._has&&r._has("parcats"),l=P._has&&P._has("parcats");a&&!l&&r._paperdiv.selectAll(".parcats").remove()}}}),ate=Ne({"src/traces/parcats/index.js"(te,Z){Z.exports={attributes:nF(),supplyDefaults:ete(),calc:tte(),plot:aF(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:nte(),categories:["noOpacity"],meta:{}}}}),ite=Ne({"lib/parcats.js"(te,Z){Z.exports=ate()}}),R_=Ne({"src/plots/mapbox/constants.js"(te,Z){var v=Sm(),w="1.13.4",C='© <a target="_blank" href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',P=['© <a target="_blank" href="https://carto.com/">Carto</a>',C].join(" "),t=['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(" "),r=['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(" "),a={"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:C,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:P,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:P,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:t,tiles:["https://tiles.stadiamaps.com/tiles/stamen_terrain/{z}/{x}/{y}.png?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-terrain",type:"raster",source:"plotly-stamen-terrain",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-toner":{id:"stamen-toner",version:8,sources:{"plotly-stamen-toner":{type:"raster",attribution:t,tiles:["https://tiles.stadiamaps.com/tiles/stamen_toner/{z}/{x}/{y}.png?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-toner",type:"raster",source:"plotly-stamen-toner",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-watercolor":{id:"stamen-watercolor",version:8,sources:{"plotly-stamen-watercolor":{type:"raster",attribution:r,tiles:["https://tiles.stadiamaps.com/tiles/stamen_watercolor/{z}/{x}/{y}.jpg?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-watercolor",type:"raster",source:"plotly-stamen-watercolor",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"}},l=v(a);Z.exports={requiredVersion:w,styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:a,styleValuesNonMapbox:l,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",wrongVersionErrorMsg:["Your custom plotly.js bundle is not using the correct mapbox-gl version","Please install @plotly/mapbox-gl@"+w+"."].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:",l.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')`}}}}),yk=Ne({"src/plots/mapbox/layout_attributes.js"(te,Z){var v=In(),w=Ha().defaultLine,C=Fc().attributes,P=bo(),t=tf().textposition,r=ef().overrideAll,a=Cu().templatedArray,l=R_(),i=P({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});i.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var s=Z.exports=r({_arrayAttrRegexps:[v.counterRegex("mapbox",".layers",!0)],domain:C({name:"mapbox"}),accesstoken:{valType:"string",noBlank:!0,strict:!0},style:{valType:"any",values:l.styleValuesMapbox.concat(l.styleValuesNonMapbox),dflt:l.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:a("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:w},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:w}},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:i,textposition:v.extendFlat({},t,{arrayOk:!1})}})},"plot","from-root");s.uirevision={valType:"any",editType:"none"}}}),UR=Ne({"src/traces/scattermapbox/attributes.js"(te,Z){var{hovertemplateAttrs:v,texttemplateAttrs:w,templatefallbackAttrs:C}=Fl(),P=qv(),t=m3(),r=tf(),a=yk(),l=qo(),i=Wu(),s=fi().extendFlat,o=ef().overrideAll,u=yk(),d=t.line,h=t.marker;Z.exports=o({lon:t.lon,lat:t.lat,cluster:{enabled:{valType:"boolean"},maxzoom:s({},u.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:s({},h.opacity,{dflt:1})},mode:s({},r.mode,{dflt:"markers"}),text:s({},r.text,{}),texttemplate:w({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:C({editType:"plot"}),hovertext:s({},r.hovertext,{}),line:{color:d.color,width:d.width},connectgaps:r.connectgaps,marker:s({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:h.opacity,size:h.size,sizeref:h.sizeref,sizemin:h.sizemin,sizemode:h.sizemode},i("marker")),fill:t.fill,fillcolor:P(),textfont:a.layers.symbol.textfont,textposition:a.layers.symbol.textposition,below:{valType:"string"},selected:{marker:r.selected.marker},unselected:{marker:r.unselected.marker},hoverinfo:s({},l.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:v(),hovertemplatefallback:C()},"calc","nested")}}),iF=Ne({"src/traces/scattermapbox/constants.js"(te,Z){var v=["Metropolis Black Italic","Metropolis Black","Metropolis Bold Italic","Metropolis Bold","Metropolis Extra Bold Italic","Metropolis Extra Bold","Metropolis Extra Light Italic","Metropolis Extra Light","Metropolis Light Italic","Metropolis Light","Metropolis Medium Italic","Metropolis Medium","Metropolis Regular Italic","Metropolis Regular","Metropolis Semi Bold Italic","Metropolis Semi Bold","Metropolis Thin Italic","Metropolis Thin","Open Sans Bold Italic","Open Sans Bold","Open Sans Extrabold Italic","Open Sans Extrabold","Open Sans Italic","Open Sans Light Italic","Open Sans Light","Open Sans Regular","Open Sans Semibold Italic","Open Sans Semibold","Klokantech Noto Sans Bold","Klokantech Noto Sans CJK Bold","Klokantech Noto Sans CJK Regular","Klokantech Noto Sans Italic","Klokantech Noto Sans Regular"];Z.exports={isSupportedFont:function(w){return v.indexOf(w)!==-1}}}}),ote=Ne({"src/traces/scattermapbox/defaults.js"(te,Z){var v=In(),w=yu(),C=wv(),P=Im(),t=Wp(),r=uv(),a=UR(),l=iF().isSupportedFont;Z.exports=function(o,u,d,h){function g(p,x){return v.coerce(o,u,a,p,x)}function m(p,x){return v.coerce2(o,u,a,p,x)}var E=i(o,u,g);if(!E){u.visible=!1;return}if(g("text"),g("texttemplate"),g("texttemplatefallback"),g("hovertext"),g("hovertemplate"),g("hovertemplatefallback"),g("mode"),g("below"),w.hasMarkers(u)){C(o,u,d,h,g,{noLine:!0,noAngle:!0}),g("marker.allowoverlap"),g("marker.angle");var c=u.marker;c.symbol!=="circle"&&(v.isArrayOrTypedArray(c.size)&&(c.size=c.size[0]),v.isArrayOrTypedArray(c.color)&&(c.color=c.color[0]))}w.hasLines(u)&&(P(o,u,d,h,g,{noDash:!0}),g("connectgaps"));var _=m("cluster.maxzoom"),T=m("cluster.step"),M=m("cluster.color",u.marker&&u.marker.color||d),k=m("cluster.size"),b=m("cluster.opacity"),A=_!==!1||T!==!1||M!==!1||k!==!1||b!==!1,y=g("cluster.enabled",A);if(y||w.hasText(u)){var f=h.font.family;t(o,u,h,g,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:l(f)?f:"Open Sans Regular",weight:h.font.weight,style:h.font.style,size:h.font.size,color:h.font.color}})}g("fill"),u.fill!=="none"&&r(o,u,d,g),v.coerceSelectionMarkerOpacity(u,g)};function i(s,o,u){var d=u("lon")||[],h=u("lat")||[],g=Math.min(d.length,h.length);return o._length=g,g}}}),oF=Ne({"src/traces/scattermapbox/format_labels.js"(te,Z){var v=Os();Z.exports=function(C,P,t){var r={},a=t[P.subplot]._subplot,l=a.mockAxis,i=C.lonlat;return r.lonLabel=v.tickText(l,l.c2l(i[0]),!0).text,r.latLabel=v.tickText(l,l.c2l(i[1]),!0).text,r}}}),sF=Ne({"src/plots/mapbox/convert_text_opts.js"(te,Z){var v=In();Z.exports=function(C,P){var t=C.split(" "),r=t[0],a=t[1],l=v.isArrayOrTypedArray(P)?v.mean(P):P,i=.5+l/100,s=1.5+l/100,o=["",""],u=[0,0];switch(r){case"top":o[0]="top",u[1]=-s;break;case"bottom":o[0]="bottom",u[1]=s;break}switch(a){case"left":o[1]="right",u[0]=-i;break;case"right":o[1]="left",u[0]=i;break}var d;return o[0]&&o[1]?d=o.join("-"):o[0]?d=o[0]:o[1]?d=o[1]:d="center",{anchor:d,offset:u}}}}),ste=Ne({"src/traces/scattermapbox/convert.js"(te,Z){var v=Fn(),w=In(),C=da().BADNUM,P=Db(),t=Nc(),r=zs(),a=Mm(),l=yu(),i=iF().isSupportedFont,s=sF(),o=bv().appendArrayPointValue,u=hc().NEWLINES,d=hc().BR_TAG_ALL;Z.exports=function(b,A){var y=A[0].trace,f=y.visible===!0&&y._length!==0,p=y.fill!=="none",x=l.hasLines(y),N=l.hasMarkers(y),D=l.hasText(y),B=N&&y.marker.symbol==="circle",U=N&&y.marker.symbol!=="circle",V=y.cluster&&y.cluster.enabled,q=h("fill"),z=h("line"),H=h("circle"),G=h("symbol"),J={fill:q,line:z,circle:H,symbol:G};if(!f)return J;var le;if((p||x)&&(le=P.calcTraceToLineCoords(A)),p&&(q.geojson=P.makePolygon(le),q.layout.visibility="visible",w.extendFlat(q.paint,{"fill-color":y.fillcolor})),x&&(z.geojson=P.makeLine(le),z.layout.visibility="visible",w.extendFlat(z.paint,{"line-width":y.line.width,"line-color":y.line.color,"line-opacity":y.opacity})),B){var ge=g(A);H.geojson=ge.geojson,H.layout.visibility="visible",V&&(H.filter=["!",["has","point_count"]],J.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":T(y.cluster.color,y.cluster.step),"circle-radius":T(y.cluster.size,y.cluster.step),"circle-opacity":T(y.cluster.opacity,y.cluster.step)}},J.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":M(y),"text-size":12}}),w.extendFlat(H.paint,{"circle-color":ge.mcc,"circle-radius":ge.mrc,"circle-opacity":ge.mo})}if(B&&V&&(H.filter=["!",["has","point_count"]]),(U||D)&&(G.geojson=m(A,b),w.extendFlat(G.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),U&&(w.extendFlat(G.layout,{"icon-size":y.marker.size/10}),"angle"in y.marker&&y.marker.angle!=="auto"&&w.extendFlat(G.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),G.layout["icon-allow-overlap"]=y.marker.allowoverlap,w.extendFlat(G.paint,{"icon-opacity":y.opacity*y.marker.opacity,"icon-color":y.marker.color})),D)){var de=(y.marker||{}).size,me=s(y.textposition,de);w.extendFlat(G.layout,{"text-size":y.textfont.size,"text-anchor":me.anchor,"text-offset":me.offset,"text-font":M(y)}),w.extendFlat(G.paint,{"text-color":y.textfont.color,"text-opacity":y.opacity})}return J};function h(k){return{type:k,geojson:P.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function g(k){var b=k[0].trace,A=b.marker,y=b.selectedpoints,f=w.isArrayOrTypedArray(A.color),p=w.isArrayOrTypedArray(A.size),x=w.isArrayOrTypedArray(A.opacity),N;function D(de){return b.opacity*de}function B(de){return de/2}var U;f&&(t.hasColorscale(b,"marker")?U=t.makeColorScaleFuncFromTrace(A):U=w.identity);var V;p&&(V=a(b));var q;x&&(q=function(de){var me=v(de)?+w.constrain(de,0,1):0;return D(me)});var z=[];for(N=0;N<k.length;N++){var H=k[N],G=H.lonlat;if(!_(G)){var J={};U&&(J.mcc=H.mcc=U(H.mc)),V&&(J.mrc=H.mrc=V(H.ms)),q&&(J.mo=q(H.mo)),y&&(J.selected=H.selected||0),z.push({type:"Feature",id:N+1,geometry:{type:"Point",coordinates:G},properties:J})}}var le;if(y)for(le=r.makeSelectedPointStyleFns(b),N=0;N<z.length;N++){var ge=z[N].properties;le.selectedOpacityFn&&(ge.mo=D(le.selectedOpacityFn(ge))),le.selectedColorFn&&(ge.mcc=le.selectedColorFn(ge)),le.selectedSizeFn&&(ge.mrc=le.selectedSizeFn(ge))}return{geojson:{type:"FeatureCollection",features:z},mcc:f||le&&le.selectedColorFn?{type:"identity",property:"mcc"}:A.color,mrc:p||le&&le.selectedSizeFn?{type:"identity",property:"mrc"}:B(A.size),mo:x||le&&le.selectedOpacityFn?{type:"identity",property:"mo"}:D(A.opacity)}}function m(k,b){for(var A=b._fullLayout,y=k[0].trace,f=y.marker||{},p=f.symbol,x=f.angle,N=p!=="circle"?E(p):c,D=x!=="auto"?E(x,!0):c,B=l.hasText(y)?E(y.text):c,U=[],V=0;V<k.length;V++){var q=k[V];if(!_(q.lonlat)){var z=y.texttemplate,H;if(z){var G=Array.isArray(z)?z[V]||"":z,J=y._module.formatLabels(q,y,A),le={};o(le,y,q.i),H=w.texttemplateString({data:[le,q,y._meta],fallback:y.texttemplatefallback,labels:J,locale:A._d3locale,template:G})}else H=B(V);H&&(H=H.replace(u,"").replace(d,`
`)),U.push({type:"Feature",geometry:{type:"Point",coordinates:q.lonlat},properties:{symbol:N(V),angle:D(V),text:H}})}}return{type:"FeatureCollection",features:U}}function E(k,b){return w.isArrayOrTypedArray(k)?b?function(A){return v(k[A])?+k[A]:0}:function(A){return k[A]}:k?function(){return k}:c}function c(){return""}function _(k){return k[0]===C}function T(k,b){var A;if(w.isArrayOrTypedArray(k)&&w.isArrayOrTypedArray(b)){A=["step",["get","point_count"],k[0]];for(var y=1;y<k.length;y++)A.push(b[y-1],k[y])}else A=k;return A}function M(k){var b=k.textfont,A=b.family,y=b.style,f=b.weight,p=A.split(" "),x=p[p.length-1]==="Italic";x&&p.pop(),x=x||y==="italic";var N=p.join(" ");f==="bold"&&p.indexOf("Bold")===-1?N+=" Bold":f<=1e3&&(p[0]==="Metropolis"?(N="Metropolis",f>850?N+=" Black":f>750?N+=" Extra Bold":f>650?N+=" Bold":f>550?N+=" Semi Bold":f>450?N+=" Medium":f>350?N+=" Regular":f>250?N+=" Light":f>150?N+=" Extra Light":N+=" Thin"):p.slice(0,2).join(" ")==="Open Sans"?(N="Open Sans",f>750?N+=" Extrabold":f>650?N+=" Bold":f>550?N+=" Semibold":f>350?N+=" Regular":N+=" Light"):p.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(N="Klokantech Noto Sans",p[3]==="CJK"&&(N+=" CJK"),N+=f>500?" Bold":" Regular")),x&&(N+=" Italic"),N==="Open Sans Regular Italic"?N="Open Sans Italic":N==="Open Sans Regular Bold"?N="Open Sans Bold":N==="Open Sans Regular Bold Italic"?N="Open Sans Bold Italic":N==="Klokantech Noto Sans Regular Italic"&&(N="Klokantech Noto Sans Italic"),i(N)||(N=A);var D=N.split(", ");return D}}}),lte=Ne({"src/traces/scattermapbox/plot.js"(te,Z){var v=In(),w=ste(),C=R_().traceLayerPrefix,P={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function t(a,l,i,s){this.type="scattermapbox",this.subplot=a,this.uid=l,this.clusterEnabled=i,this.isHidden=s,this.sourceIds={fill:"source-"+l+"-fill",line:"source-"+l+"-line",circle:"source-"+l+"-circle",symbol:"source-"+l+"-symbol",cluster:"source-"+l+"-circle",clusterCount:"source-"+l+"-circle"},this.layerIds={fill:C+l+"-fill",line:C+l+"-line",circle:C+l+"-circle",symbol:C+l+"-symbol",cluster:C+l+"-cluster",clusterCount:C+l+"-cluster-count"},this.below=null}var r=t.prototype;r.addSource=function(a,l,i){var s={type:"geojson",data:l.geojson};i&&i.enabled&&v.extendFlat(s,{cluster:!0,clusterMaxZoom:i.maxzoom});var o=this.subplot.map.getSource(this.sourceIds[a]);o?o.setData(l.geojson):this.subplot.map.addSource(this.sourceIds[a],s)},r.setSourceData=function(a,l){this.subplot.map.getSource(this.sourceIds[a]).setData(l.geojson)},r.addLayer=function(a,l,i){var s={type:l.type,id:this.layerIds[a],source:this.sourceIds[a],layout:l.layout,paint:l.paint};l.filter&&(s.filter=l.filter);for(var o=this.layerIds[a],u,d=this.subplot.getMapLayers(),h=0;h<d.length;h++)if(d[h].id===o){u=!0;break}u?(this.subplot.setOptions(o,"setLayoutProperty",s.layout),s.layout.visibility==="visible"&&this.subplot.setOptions(o,"setPaintProperty",s.paint)):this.subplot.addLayer(s,i)},r.update=function(l){var i=l[0].trace,s=this.subplot,o=s.map,u=w(s.gd,l),d=s.belowLookup["trace-"+this.uid],h=!!(i.cluster&&i.cluster.enabled),g=!!this.clusterEnabled,m=this;function E(f){f||m.addSource("circle",u.circle,i.cluster);for(var p=P.cluster,x=0;x<p.length;x++){var N=p[x],D=u[N];m.addLayer(N,D,d)}}function c(f){for(var p=P.cluster,x=p.length-1;x>=0;x--){var N=p[x];o.removeLayer(m.layerIds[N])}f||o.removeSource(m.sourceIds.circle)}function _(f){for(var p=P.nonCluster,x=0;x<p.length;x++){var N=p[x],D=u[N];f||m.addSource(N,D),m.addLayer(N,D,d)}}function T(f){for(var p=P.nonCluster,x=p.length-1;x>=0;x--){var N=p[x];o.removeLayer(m.layerIds[N]),f||o.removeSource(m.sourceIds[N])}}function M(f){g?c(f):T(f)}function k(f){h?E(f):_(f)}function b(){for(var f=h?P.cluster:P.nonCluster,p=0;p<f.length;p++){var x=f[p],N=u[x];N&&(s.setOptions(m.layerIds[x],"setLayoutProperty",N.layout),N.layout.visibility==="visible"&&(x!=="cluster"&&m.setSourceData(x,N),s.setOptions(m.layerIds[x],"setPaintProperty",N.paint)))}}var A=this.isHidden,y=i.visible!==!0;y?A||M():A?y||k():g!==h?(M(),k()):(this.below!==d&&(M(!0),k(!0)),b()),this.clusterEnabled=h,this.isHidden=y,this.below=d,l[0].trace._glTrace=this},r.dispose=function(){for(var l=this.subplot.map,i=this.clusterEnabled?P.cluster:P.nonCluster,s=i.length-1;s>=0;s--){var o=i[s];l.removeLayer(this.layerIds[o]),l.removeSource(this.sourceIds[o])}},Z.exports=function(l,i){var s=i[0].trace,o=s.cluster&&s.cluster.enabled,u=s.visible!==!0,d=new t(l,s.uid,o,u),h=w(l.gd,i),g=d.below=l.belowLookup["trace-"+s.uid],m,E,c;if(o)for(d.addSource("circle",h.circle,s.cluster),m=0;m<P.cluster.length;m++)E=P.cluster[m],c=h[E],d.addLayer(E,c,g);else for(m=0;m<P.nonCluster.length;m++)E=P.nonCluster[m],c=h[E],d.addSource(E,c,s.cluster),d.addLayer(E,c,g);return i[0].trace._glTrace=d,d}}}),qR=Ne({"src/traces/scattermapbox/hover.js"(te,Z){var v=oh(),w=In(),C=G1(),P=w.fillText,t=da().BADNUM,r=R_().traceLayerPrefix;function a(i,s,o){var u=i.cd,d=u[0].trace,h=i.xa,g=i.ya,m=i.subplot,E=[],c=r+d.uid+"-circle",_=d.cluster&&d.cluster.enabled;if(_){var T=m.map.queryRenderedFeatures(null,{layers:[c]});E=T.map(function(V){return V.id})}var M=s>=0?Math.floor((s+180)/360):Math.ceil((s-180)/360),k=M*360,b=s-k;function A(V){var q=V.lonlat;if(q[0]===t||_&&E.indexOf(V.i+1)===-1)return 1/0;var z=w.modHalf(q[0],360),H=q[1],G=m.project([z,H]),J=G.x-h.c2p([b,H]),le=G.y-g.c2p([z,o]),ge=Math.max(3,V.mrc||0);return Math.max(Math.sqrt(J*J+le*le)-ge,1-3/ge)}if(v.getClosest(u,A,i),i.index!==!1){var y=u[i.index],f=y.lonlat,p=[w.modHalf(f[0],360)+k,f[1]],x=h.c2p(p),N=g.c2p(p),D=y.mrc||1;i.x0=x-D,i.x1=x+D,i.y0=N-D,i.y1=N+D;var B={};B[d.subplot]={_subplot:m};var U=d._module.formatLabels(y,d,B);return i.lonLabel=U.lonLabel,i.latLabel=U.latLabel,i.color=C(d,y),i.extraText=l(d,y,u[0].t.labels),i.hovertemplate=d.hovertemplate,[i]}}function l(i,s,o){if(i.hovertemplate)return;var u=s.hi||i.hoverinfo,d=u.split("+"),h=d.indexOf("all")!==-1,g=d.indexOf("lon")!==-1,m=d.indexOf("lat")!==-1,E=s.lonlat,c=[];function _(T){return T+"°"}return h||g&&m?c.push("("+_(E[1])+", "+_(E[0])+")"):g?c.push(o.lon+_(E[0])):m&&c.push(o.lat+_(E[1])),(h||d.indexOf("text")!==-1)&&P(s,i,c),c.join("<br>")}Z.exports={hoverPoints:a,getExtraText:l}}}),ute=Ne({"src/traces/scattermapbox/event_data.js"(te,Z){Z.exports=function(w,C){return w.lon=C.lon,w.lat=C.lat,w}}}),cte=Ne({"src/traces/scattermapbox/select.js"(te,Z){var v=In(),w=yu(),C=da().BADNUM;Z.exports=function(t,r){var a=t.cd,l=t.xaxis,i=t.yaxis,s=[],o=a[0].trace,u;if(!w.hasMarkers(o))return[];if(r===!1)for(u=0;u<a.length;u++)a[u].selected=0;else for(u=0;u<a.length;u++){var d=a[u],h=d.lonlat;if(h[0]!==C){var g=[v.modHalf(h[0],360),h[1]],m=[l.c2p(g),i.c2p(g)];r.contains(m,null,u,t)?(s.push({pointNumber:u,lon:h[0],lat:h[1]}),d.selected=1):d.selected=0}}return s}}}),lF=Ne({"node_modules/@plotly/mapbox-gl/dist/mapbox-gl-unminified.js"(te,Z){(function(v,w){typeof te=="object"&&typeof Z<"u"?Z.exports=w():(v=v||self,v.mapboxgl=w())})(te,function(){var v,w,C;function P(t,r){if(!v)v=r;else if(!w)w=r;else{var a="var sharedChunk = {}; ("+v+")(sharedChunk); ("+w+")(sharedChunk);",l={};v(l),C=r(l),typeof window<"u"&&(C.workerUrl=window.URL.createObjectURL(new Blob([a],{type:"text/javascript"})))}}return P(["exports"],function(t){function r(R,I){return I={exports:{}},R(I,I.exports),I.exports}var a="1.13.4",l=i;function i(R,I,$,he){this.cx=3*R,this.bx=3*($-R)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*I,this.by=3*(he-I)-this.cy,this.ay=1-this.cy-this.by,this.p1x=R,this.p1y=he,this.p2x=$,this.p2y=he}i.prototype.sampleCurveX=function(R){return((this.ax*R+this.bx)*R+this.cx)*R},i.prototype.sampleCurveY=function(R){return((this.ay*R+this.by)*R+this.cy)*R},i.prototype.sampleCurveDerivativeX=function(R){return(3*this.ax*R+2*this.bx)*R+this.cx},i.prototype.solveCurveX=function(R,I){typeof I>"u"&&(I=1e-6);var $,he,ke,qe,et;for(ke=R,et=0;et<8;et++){if(qe=this.sampleCurveX(ke)-R,Math.abs(qe)<I)return ke;var Mt=this.sampleCurveDerivativeX(ke);if(Math.abs(Mt)<1e-6)break;ke=ke-qe/Mt}if($=0,he=1,ke=R,ke<$)return $;if(ke>he)return he;for(;$<he;){if(qe=this.sampleCurveX(ke),Math.abs(qe-R)<I)return ke;R>qe?$=ke:he=ke,ke=(he-$)*.5+$}return ke},i.prototype.solve=function(R,I){return this.sampleCurveY(this.solveCurveX(R,I))};var s=o;function o(R,I){this.x=R,this.y=I}o.prototype={clone:function(){return new o(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,I){return this.clone()._rotateAround(R,I)},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 I=R.x-this.x,$=R.y-this.y;return I*I+$*$},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,I){return Math.atan2(this.x*I-this.y*R,this.x*R+this.y*I)},_matMult:function(R){var I=R[0]*this.x+R[1]*this.y,$=R[2]*this.x+R[3]*this.y;return this.x=I,this.y=$,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 I=Math.cos(R),$=Math.sin(R),he=I*this.x-$*this.y,ke=$*this.x+I*this.y;return this.x=he,this.y=ke,this},_rotateAround:function(R,I){var $=Math.cos(R),he=Math.sin(R),ke=I.x+$*(this.x-I.x)-he*(this.y-I.y),qe=I.y+he*(this.x-I.x)+$*(this.y-I.y);return this.x=ke,this.y=qe,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},o.convert=function(R){return R instanceof o?R:Array.isArray(R)?new o(R[0],R[1]):R};var u=typeof self<"u"?self:{};function d(R,I){if(Array.isArray(R)){if(!Array.isArray(I)||R.length!==I.length)return!1;for(var $=0;$<R.length;$++)if(!d(R[$],I[$]))return!1;return!0}if(typeof R=="object"&&R!==null&&I!==null){if(typeof I!="object")return!1;var he=Object.keys(R);if(he.length!==Object.keys(I).length)return!1;for(var ke in R)if(!d(R[ke],I[ke]))return!1;return!0}return R===I}var h=Math.pow(2,53)-1;function g(R){if(R<=0)return 0;if(R>=1)return 1;var I=R*R,$=I*R;return 4*(R<.5?$:3*(R-I)+$-.75)}function m(R,I,$,he){var ke=new l(R,I,$,he);return function(qe){return ke.solve(qe)}}var E=m(.25,.1,.25,1);function c(R,I,$){return Math.min($,Math.max(I,R))}function _(R,I,$){var he=$-I,ke=((R-I)%he+he)%he+I;return ke===I?$:ke}function T(R,I,$){if(!R.length)return $(null,[]);var he=R.length,ke=new Array(R.length),qe=null;R.forEach(function(et,Mt){I(et,function(Jt,pr){Jt&&(qe=Jt),ke[Mt]=pr,--he===0&&$(qe,ke)})})}function M(R){var I=[];for(var $ in R)I.push(R[$]);return I}function k(R,I){var $=[];for(var he in R)he in I||$.push(he);return $}function b(R){for(var I=[],$=arguments.length-1;$-- >0;)I[$]=arguments[$+1];for(var he=0,ke=I;he<ke.length;he+=1){var qe=ke[he];for(var et in qe)R[et]=qe[et]}return R}function A(R,I){for(var $={},he=0;he<I.length;he++){var ke=I[he];ke in R&&($[ke]=R[ke])}return $}var y=1;function f(){return y++}function p(){function R(I){return I?(I^Math.random()*16>>I/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,R)}return R()}function x(R){return R<=1?1:Math.pow(2,Math.ceil(Math.log(R)/Math.LN2))}function N(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 D(R,I){R.forEach(function($){I[$]&&(I[$]=I[$].bind(I))})}function B(R,I){return R.indexOf(I,R.length-I.length)!==-1}function U(R,I,$){var he={};for(var ke in R)he[ke]=I.call($||this,R[ke],ke,R);return he}function V(R,I,$){var he={};for(var ke in R)I.call($||this,R[ke],ke,R)&&(he[ke]=R[ke]);return he}function q(R){return Array.isArray(R)?R.map(q):typeof R=="object"&&R?U(R,q):R}function z(R,I){for(var $=0;$<R.length;$++)if(I.indexOf(R[$])>=0)return!0;return!1}var H={};function G(R){H[R]||(typeof console<"u"&&console.warn(R),H[R]=!0)}function J(R,I,$){return($.y-R.y)*(I.x-R.x)>(I.y-R.y)*($.x-R.x)}function le(R){for(var I=0,$=0,he=R.length,ke=he-1,qe=void 0,et=void 0;$<he;ke=$++)qe=R[$],et=R[ke],I+=(et.x-qe.x)*(qe.y+et.y);return I}function ge(R){var I=R[0],$=R[1],he=R[2];return $+=90,$*=Math.PI/180,he*=Math.PI/180,{x:I*Math.cos($)*Math.sin(he),y:I*Math.sin($)*Math.sin(he),z:I*Math.cos(he)}}function de(){return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope}function me(R){var I=/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,$={};if(R.replace(I,function(ke,qe,et,Mt){var Jt=et||Mt;return $[qe]=Jt?Jt.toLowerCase():!0,""}),$["max-age"]){var he=parseInt($["max-age"],10);isNaN(he)?delete $["max-age"]:$["max-age"]=he}return $}var W=null;function ie(R){if(W==null){var I=R.navigator?R.navigator.userAgent:null;W=!!R.safari||!!(I&&(/\b(iPad|iPhone|iPod)\b/.test(I)||I.match("Safari")&&!I.match("Chrome")))}return W}function se(R){try{var I=u[R];return I.setItem("_mapbox_test_",1),I.removeItem("_mapbox_test_"),!0}catch{return!1}}function ee(R){return u.btoa(encodeURIComponent(R).replace(/%([0-9A-F]{2})/g,function(I,$){return String.fromCharCode(+("0x"+$))}))}function pe(R){return decodeURIComponent(u.atob(R).split("").map(function(I){return"%"+("00"+I.charCodeAt(0).toString(16)).slice(-2)}).join(""))}var oe=u.performance&&u.performance.now?u.performance.now.bind(u.performance):Date.now.bind(Date),Y=u.requestAnimationFrame||u.mozRequestAnimationFrame||u.webkitRequestAnimationFrame||u.msRequestAnimationFrame,ce=u.cancelAnimationFrame||u.mozCancelAnimationFrame||u.webkitCancelAnimationFrame||u.msCancelAnimationFrame,ue,_e,Le={now:oe,frame:function(I){var $=Y(I);return{cancel:function(){return ce($)}}},getImageData:function(I,$){$===void 0&&($=0);var he=u.document.createElement("canvas"),ke=he.getContext("2d");if(!ke)throw new Error("failed to create canvas 2d context");return he.width=I.width,he.height=I.height,ke.drawImage(I,0,0,I.width,I.height),ke.getImageData(-$,-$,I.width+2*$,I.height+2*$)},resolveURL:function(I){return ue||(ue=u.document.createElement("a")),ue.href=I,ue.href},hardwareConcurrency:u.navigator&&u.navigator.hardwareConcurrency||4,get devicePixelRatio(){return u.devicePixelRatio},get prefersReducedMotion(){return u.matchMedia?(_e==null&&(_e=u.matchMedia("(prefers-reduced-motion: reduce)")),_e.matches):!1}},ze={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},Xe={supported:!1,testSupport:vt},Ve,rt=!1,mt,_t=!1;u.document&&(mt=u.document.createElement("img"),mt.onload=function(){Ve&&ut(Ve),Ve=null,_t=!0},mt.onerror=function(){rt=!0,Ve=null},mt.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");function vt(R){rt||!mt||(_t?ut(R):Ve=R)}function ut(R){var I=R.createTexture();R.bindTexture(R.TEXTURE_2D,I);try{if(R.texImage2D(R.TEXTURE_2D,0,R.RGBA,R.RGBA,R.UNSIGNED_BYTE,mt),R.isContextLost())return;Xe.supported=!0}catch{}R.deleteTexture(I),rt=!0}var Fe="01";function Pe(){for(var R="1",I="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",$="",he=0;he<10;he++)$+=I[Math.floor(Math.random()*62)];var ke=720*60*1e3,qe=[R,Fe,$].join(""),et=Date.now()+ke;return{token:qe,tokenExpiresAt:et}}var be=function(I,$){this._transformRequestFn=I,this._customAccessToken=$,this._createSkuToken()};be.prototype._createSkuToken=function(){var I=Pe();this._skuToken=I.token,this._skuTokenExpiresAt=I.tokenExpiresAt},be.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},be.prototype.transformRequest=function(I,$){return this._transformRequestFn?this._transformRequestFn(I,$)||{url:I}:{url:I}},be.prototype.normalizeStyleURL=function(I,$){if(!Ye(I))return I;var he=fr(I);return he.path="/styles/v1"+he.path,this._makeAPIURL(he,this._customAccessToken||$)},be.prototype.normalizeGlyphsURL=function(I,$){if(!Ye(I))return I;var he=fr(I);return he.path="/fonts/v1"+he.path,this._makeAPIURL(he,this._customAccessToken||$)},be.prototype.normalizeSourceURL=function(I,$){if(!Ye(I))return I;var he=fr(I);return he.path="/v4/"+he.authority+".json",he.params.push("secure"),this._makeAPIURL(he,this._customAccessToken||$)},be.prototype.normalizeSpriteURL=function(I,$,he,ke){var qe=fr(I);return Ye(I)?(qe.path="/styles/v1"+qe.path+"/sprite"+$+he,this._makeAPIURL(qe,this._customAccessToken||ke)):(qe.path+=""+$+he,mr(qe))},be.prototype.normalizeTileURL=function(I,$){if(this._isSkuTokenExpired()&&this._createSkuToken(),I&&!Ye(I))return I;var he=fr(I),ke=/(\.(png|jpg)\d*)(?=$)/,qe=/^.+\/v4\//,et=Le.devicePixelRatio>=2||$===512?"@2x":"",Mt=Xe.supported?".webp":"$1";he.path=he.path.replace(ke,""+et+Mt),he.path=he.path.replace(qe,"/"),he.path="/v4"+he.path;var Jt=this._customAccessToken||Yt(he.params)||ze.ACCESS_TOKEN;return ze.REQUIRE_ACCESS_TOKEN&&Jt&&this._skuToken&&he.params.push("sku="+this._skuToken),this._makeAPIURL(he,Jt)},be.prototype.canonicalizeTileURL=function(I,$){var he="/v4/",ke=/\.[\w]+$/,qe=fr(I);if(!qe.path.match(/(^\/v4\/)/)||!qe.path.match(ke))return I;var et="mapbox://tiles/";et+=qe.path.replace(he,"");var Mt=qe.params;return $&&(Mt=Mt.filter(function(Jt){return!Jt.match(/^access_token=/)})),Mt.length&&(et+="?"+Mt.join("&")),et},be.prototype.canonicalizeTileset=function(I,$){for(var he=$?Ye($):!1,ke=[],qe=0,et=I.tiles||[];qe<et.length;qe+=1){var Mt=et[qe];wt(Mt)?ke.push(this.canonicalizeTileURL(Mt,he)):ke.push(Mt)}return ke},be.prototype._makeAPIURL=function(I,$){var he="See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes",ke=fr(ze.API_URL);if(I.protocol=ke.protocol,I.authority=ke.authority,I.protocol==="http"){var qe=I.params.indexOf("secure");qe>=0&&I.params.splice(qe,1)}if(ke.path!=="/"&&(I.path=""+ke.path+I.path),!ze.REQUIRE_ACCESS_TOKEN)return mr(I);if($=$||ze.ACCESS_TOKEN,!$)throw new Error("An API access token is required to use Mapbox GL. "+he);if($[0]==="s")throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+he);return I.params=I.params.filter(function(et){return et.indexOf("access_token")===-1}),I.params.push("access_token="+$),mr(I)};function Ye(R){return R.indexOf("mapbox:")===0}var yt=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function wt(R){return yt.test(R)}function ht(R){return R.indexOf("sku=")>0&&wt(R)}function Yt(R){for(var I=0,$=R;I<$.length;I+=1){var he=$[I],ke=he.match(/^access_token=(.*)$/);if(ke)return ke[1]}return null}var $t=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function fr(R){var I=R.match($t);if(!I)throw new Error("Unable to parse URL object");return{protocol:I[1],authority:I[2],path:I[3]||"/",params:I[4]?I[4].split("&"):[]}}function mr(R){var I=R.params.length?"?"+R.params.join("&"):"";return R.protocol+"://"+R.authority+R.path+I}var Ur="mapbox.eventData";function jr(R){if(!R)return null;var I=R.split(".");if(!I||I.length!==3)return null;try{var $=JSON.parse(pe(I[1]));return $}catch{return null}}var fn=function(I){this.type=I,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null};fn.prototype.getStorageKey=function(I){var $=jr(ze.ACCESS_TOKEN),he="";return $&&$.u?he=ee($.u):he=ze.ACCESS_TOKEN||"",I?Ur+"."+I+":"+he:Ur+":"+he},fn.prototype.fetchEventData=function(){var I=se("localStorage"),$=this.getStorageKey(),he=this.getStorageKey("uuid");if(I)try{var ke=u.localStorage.getItem($);ke&&(this.eventData=JSON.parse(ke));var qe=u.localStorage.getItem(he);qe&&(this.anonId=qe)}catch{G("Unable to read from LocalStorage")}},fn.prototype.saveEventData=function(){var I=se("localStorage"),$=this.getStorageKey(),he=this.getStorageKey("uuid");if(I)try{u.localStorage.setItem(he,this.anonId),Object.keys(this.eventData).length>=1&&u.localStorage.setItem($,JSON.stringify(this.eventData))}catch{G("Unable to write to LocalStorage")}},fn.prototype.processRequests=function(I){},fn.prototype.postEvent=function(I,$,he,ke){var qe=this;if(ze.EVENTS_URL){var et=fr(ze.EVENTS_URL);et.params.push("access_token="+(ke||ze.ACCESS_TOKEN||""));var Mt={event:this.type,created:new Date(I).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:a,skuId:Fe,userId:this.anonId},Jt=$?b(Mt,$):Mt,pr={url:mr(et),headers:{"Content-Type":"text/plain"},body:JSON.stringify([Jt])};this.pendingRequest=Bn(pr,function(Ar){qe.pendingRequest=null,he(Ar),qe.saveEventData(),qe.processRequests(ke)})}},fn.prototype.queueRequest=function(I,$){this.queue.push(I),this.processRequests($)};var Br=(function(R){function I(){R.call(this,"map.load"),this.success={},this.skuToken=""}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype.postMapLoadEvent=function(he,ke,qe,et){this.skuToken=qe,(ze.EVENTS_URL&&et||ze.ACCESS_TOKEN&&Array.isArray(he)&&he.some(function(Mt){return Ye(Mt)||wt(Mt)}))&&this.queueRequest({id:ke,timestamp:Date.now()},et)},I.prototype.processRequests=function(he){var ke=this;if(!(this.pendingRequest||this.queue.length===0)){var qe=this.queue.shift(),et=qe.id,Mt=qe.timestamp;et&&this.success[et]||(this.anonId||this.fetchEventData(),N(this.anonId)||(this.anonId=p()),this.postEvent(Mt,{skuToken:this.skuToken},function(Jt){Jt||et&&(ke.success[et]=!0)},he))}},I})(fn),Qr=(function(R){function I($){R.call(this,"appUserTurnstile"),this._customAccessToken=$}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype.postTurnstileEvent=function(he,ke){ze.EVENTS_URL&&ze.ACCESS_TOKEN&&Array.isArray(he)&&he.some(function(qe){return Ye(qe)||wt(qe)})&&this.queueRequest(Date.now(),ke)},I.prototype.processRequests=function(he){var ke=this;if(!(this.pendingRequest||this.queue.length===0)){(!this.anonId||!this.eventData.lastSuccess||!this.eventData.tokenU)&&this.fetchEventData();var qe=jr(ze.ACCESS_TOKEN),et=qe?qe.u:ze.ACCESS_TOKEN,Mt=et!==this.eventData.tokenU;N(this.anonId)||(this.anonId=p(),Mt=!0);var Jt=this.queue.shift();if(this.eventData.lastSuccess){var pr=new Date(this.eventData.lastSuccess),Ar=new Date(Jt),$r=(Jt-this.eventData.lastSuccess)/(1440*60*1e3);Mt=Mt||$r>=1||$r<-1||pr.getDate()!==Ar.getDate()}else Mt=!0;if(!Mt)return this.processRequests();this.postEvent(Jt,{"enabled.telemetry":!1},function(gn){gn||(ke.eventData.lastSuccess=Jt,ke.eventData.tokenU=et)},he)}},I})(fn),Ot=new Qr,$e=Ot.postTurnstileEvent.bind(Ot),ot=new Br,De=ot.postMapLoadEvent.bind(ot),Ee="mapbox-tiles",Ae=500,Ie=50,tt=1e3*60*7,st;function Bt(){u.caches&&!st&&(st=u.caches.open(Ee))}var Ft;function Wt(R,I){if(Ft===void 0)try{new Response(new ReadableStream),Ft=!0}catch{Ft=!1}Ft?I(R.body):R.blob().then(I)}function lr(R,I,$){if(Bt(),!!st){var he={status:I.status,statusText:I.statusText,headers:new u.Headers};I.headers.forEach(function(et,Mt){return he.headers.set(Mt,et)});var ke=me(I.headers.get("Cache-Control")||"");if(!ke["no-store"]){ke["max-age"]&&he.headers.set("Expires",new Date($+ke["max-age"]*1e3).toUTCString());var qe=new Date(he.headers.get("Expires")).getTime()-$;qe<tt||Wt(I,function(et){var Mt=new u.Response(et,he);Bt(),st&&st.then(function(Jt){return Jt.put(Rr(R.url),Mt)}).catch(function(Jt){return G(Jt.message)})})}}}function Rr(R){var I=R.indexOf("?");return I<0?R:R.slice(0,I)}function Mr(R,I){if(Bt(),!st)return I(null);var $=Rr(R.url);st.then(function(he){he.match($).then(function(ke){var qe=Sr(ke);he.delete($),qe&&he.put($,ke.clone()),I(null,ke,qe)}).catch(I)}).catch(I)}function Sr(R){if(!R)return!1;var I=new Date(R.headers.get("Expires")||0),$=me(R.headers.get("Cache-Control")||"");return I>Date.now()&&!$["no-cache"]}var Kr=1/0;function Hn(R){Kr++,Kr>Ie&&(R.getActor().send("enforceCacheSizeLimit",Ae),Kr=0)}function ga(R){Bt(),st&&st.then(function(I){I.keys().then(function($){for(var he=0;he<$.length-R;he++)I.delete($[he])})})}function ua(R){var I=u.caches.delete(Ee);R&&I.catch(R).then(function(){return R()})}function Ta(R,I){Ae=R,Ie=I}var Aa;function ia(){return Aa==null&&(Aa=u.OffscreenCanvas&&new u.OffscreenCanvas(1,1).getContext("2d")&&typeof u.createImageBitmap=="function"),Aa}var $a={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};typeof Object.freeze=="function"&&Object.freeze($a);var ci=(function(R){function I($,he,ke){he===401&&wt(ke)&&($+=": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes"),R.call(this,$),this.status=he,this.url=ke,this.name=this.constructor.name,this.message=$}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype.toString=function(){return this.name+": "+this.message+" ("+this.status+"): "+this.url},I})(Error),_r=de()?function(){return self.worker&&self.worker.referrer}:function(){return(u.location.protocol==="blob:"?u.parent:u).location.href},Qt=function(R){return/^file:/.test(R)||/^file:/.test(_r())&&!/^\w+:/.test(R)};function yr(R,I){var $=new u.AbortController,he=new u.Request(R.url,{method:R.method||"GET",body:R.body,credentials:R.credentials,headers:R.headers,referrer:_r(),signal:$.signal}),ke=!1,qe=!1,et=ht(he.url);R.type==="json"&&he.headers.set("Accept","application/json");var Mt=function(pr,Ar,$r){if(!qe){if(pr&&pr.message!=="SecurityError"&&G(pr),Ar&&$r)return Jt(Ar);var gn=Date.now();u.fetch(he).then(function(hn){if(hn.ok){var zn=et?hn.clone():null;return Jt(hn,zn,gn)}else return I(new ci(hn.statusText,hn.status,R.url))}).catch(function(hn){hn.code!==20&&I(new Error(hn.message))})}},Jt=function(pr,Ar,$r){(R.type==="arrayBuffer"?pr.arrayBuffer():R.type==="json"?pr.json():pr.text()).then(function(gn){qe||(Ar&&$r&&lr(he,Ar,$r),ke=!0,I(null,gn,pr.headers.get("Cache-Control"),pr.headers.get("Expires")))}).catch(function(gn){qe||I(new Error(gn.message))})};return et?Mr(he,Mt):Mt(null,null),{cancel:function(){qe=!0,ke||$.abort()}}}function br(R,I){var $=new u.XMLHttpRequest;$.open(R.method||"GET",R.url,!0),R.type==="arrayBuffer"&&($.responseType="arraybuffer");for(var he in R.headers)$.setRequestHeader(he,R.headers[he]);return R.type==="json"&&($.responseType="text",$.setRequestHeader("Accept","application/json")),$.withCredentials=R.credentials==="include",$.onerror=function(){I(new Error($.statusText))},$.onload=function(){if(($.status>=200&&$.status<300||$.status===0)&&$.response!==null){var ke=$.response;if(R.type==="json")try{ke=JSON.parse($.response)}catch(qe){return I(qe)}I(null,ke,$.getResponseHeader("Cache-Control"),$.getResponseHeader("Expires"))}else I(new ci($.statusText,$.status,R.url))},$.send(R.body),{cancel:function(){return $.abort()}}}var an=function(R,I){if(!Qt(R.url)){if(u.fetch&&u.Request&&u.AbortController&&u.Request.prototype.hasOwnProperty("signal"))return yr(R,I);if(de()&&self.worker&&self.worker.actor){var $=!0;return self.worker.actor.send("getResource",R,I,void 0,$)}}return br(R,I)},wn=function(R,I){return an(b(R,{type:"json"}),I)},Ln=function(R,I){return an(b(R,{type:"arrayBuffer"}),I)},Bn=function(R,I){return an(b(R,{method:"POST"}),I)};function xa(R){var I=u.document.createElement("a");return I.href=R,I.protocol===u.document.location.protocol&&I.host===u.document.location.host}var za="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function Ia(R,I,$,he){var ke=new u.Image,qe=u.URL;ke.onload=function(){I(null,ke),qe.revokeObjectURL(ke.src),ke.onload=null,u.requestAnimationFrame(function(){ke.src=za})},ke.onerror=function(){return I(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 et=new u.Blob([new Uint8Array(R)],{type:"image/png"});ke.cacheControl=$,ke.expires=he,ke.src=R.byteLength?qe.createObjectURL(et):za}function Ba(R,I){var $=new u.Blob([new Uint8Array(R)],{type:"image/png"});u.createImageBitmap($).then(function(he){I(null,he)}).catch(function(he){I(new Error("Could not load image because of "+he.message+". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))})}var Ka,fa,Bi=function(){Ka=[],fa=0};Bi();var Yi=function(R,I){if(Xe.supported&&(R.headers||(R.headers={}),R.headers.accept="image/webp,*/*"),fa>=ze.MAX_PARALLEL_IMAGE_REQUESTS){var $={requestParameters:R,callback:I,cancelled:!1,cancel:function(){this.cancelled=!0}};return Ka.push($),$}fa++;var he=!1,ke=function(){if(!he)for(he=!0,fa--;Ka.length&&fa<ze.MAX_PARALLEL_IMAGE_REQUESTS;){var et=Ka.shift(),Mt=et.requestParameters,Jt=et.callback,pr=et.cancelled;pr||(et.cancel=Yi(Mt,Jt).cancel)}},qe=Ln(R,function(et,Mt,Jt,pr){ke(),et?I(et):Mt&&(ia()?Ba(Mt,I):Ia(Mt,I,Jt,pr))});return{cancel:function(){qe.cancel(),ke()}}},Ht=function(R,I){var $=u.document.createElement("video");$.muted=!0,$.onloadstart=function(){I(null,$)};for(var he=0;he<R.length;he++){var ke=u.document.createElement("source");xa(R[he])||($.crossOrigin="Anonymous"),ke.src=R[he],$.appendChild(ke)}return{cancel:function(){}}};function kt(R,I,$){var he=$[R]&&$[R].indexOf(I)!==-1;he||($[R]=$[R]||[],$[R].push(I))}function qr(R,I,$){if($&&$[R]){var he=$[R].indexOf(I);he!==-1&&$[R].splice(he,1)}}var en=function(I,$){$===void 0&&($={}),b(this,$),this.type=I},rn=(function(R){function I($,he){he===void 0&&(he={}),R.call(this,"error",b({error:$},he))}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I})(en),Wr=function(){};Wr.prototype.on=function(I,$){return this._listeners=this._listeners||{},kt(I,$,this._listeners),this},Wr.prototype.off=function(I,$){return qr(I,$,this._listeners),qr(I,$,this._oneTimeListeners),this},Wr.prototype.once=function(I,$){return this._oneTimeListeners=this._oneTimeListeners||{},kt(I,$,this._oneTimeListeners),this},Wr.prototype.fire=function(I,$){typeof I=="string"&&(I=new en(I,$||{}));var he=I.type;if(this.listens(he)){I.target=this;for(var ke=this._listeners&&this._listeners[he]?this._listeners[he].slice():[],qe=0,et=ke;qe<et.length;qe+=1){var Mt=et[qe];Mt.call(this,I)}for(var Jt=this._oneTimeListeners&&this._oneTimeListeners[he]?this._oneTimeListeners[he].slice():[],pr=0,Ar=Jt;pr<Ar.length;pr+=1){var $r=Ar[pr];qr(he,$r,this._oneTimeListeners),$r.call(this,I)}var gn=this._eventedParent;gn&&(b(I,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),gn.fire(I))}else I instanceof rn&&console.error(I.error);return this},Wr.prototype.listens=function(I){return this._listeners&&this._listeners[I]&&this._listeners[I].length>0||this._oneTimeListeners&&this._oneTimeListeners[I]&&this._oneTimeListeners[I].length>0||this._eventedParent&&this._eventedParent.listens(I)},Wr.prototype.setEventedParent=function(I,$){return this._eventedParent=I,this._eventedParentData=$,this};var tn=8,Tn={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"}},dn={"*":{type:"source"}},It=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],xr={type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},Yr={type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},An={type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},Zn={type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},sa={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"}}},oa={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"}}},Sn={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"}},Kn=["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],Ui={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Za={"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"}},Ki={"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"}},ho={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Co={"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"}},So={"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"}},Vo={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Oi={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},ps={type:"array",value:"*"},as={type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},rl={type:"enum",values:{Point:{},LineString:{},Polygon:{}}},As={type:"array",minimum:0,maximum:24,value:["number","color"],length:2},hs={type:"array",value:"*",minimum:1},ts={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}},nl=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],Qs={"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"}},_l={"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"}},Ss={"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"}},ls={"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"}},Oo={"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"}},Es={"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"}},xl={"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"}},Ul={"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"}},Hl={duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},Fs={"*":{type:"string"}},Ni={$version:tn,$root:Tn,sources:dn,source:It,source_vector:xr,source_raster:Yr,source_raster_dem:An,source_geojson:Zn,source_video:sa,source_image:oa,layer:Sn,layout:Kn,layout_background:Ui,layout_fill:Za,layout_circle:Ki,layout_heatmap:ho,"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:Co,layout_symbol:So,layout_raster:Vo,layout_hillshade:Oi,filter:ps,filter_operator:as,geometry_type:rl,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:As,expression:hs,light:ts,paint:nl,paint_fill:Qs,"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:_l,paint_circle:Ss,paint_heatmap:ls,paint_symbol:Oo,paint_raster:Es,paint_hillshade:xl,paint_background:Ul,transition:Hl,"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:Fs},wo=function(I,$,he,ke){this.message=(I?I+": ":"")+he,ke&&(this.identifier=ke),$!=null&&$.__line__&&(this.line=$.__line__)};function ql(R){var I=R.key,$=R.value;return $?[new wo(I,$,"constants have been deprecated as of v8")]:[]}function Gs(R){for(var I=[],$=arguments.length-1;$-- >0;)I[$]=arguments[$+1];for(var he=0,ke=I;he<ke.length;he+=1){var qe=ke[he];for(var et in qe)R[et]=qe[et]}return R}function Jo(R){return R instanceof Number||R instanceof String||R instanceof Boolean?R.valueOf():R}function Gl(R){if(Array.isArray(R))return R.map(Gl);if(R instanceof Object&&!(R instanceof Number||R instanceof String||R instanceof Boolean)){var I={};for(var $ in R)I[$]=Gl(R[$]);return I}return Jo(R)}var al=(function(R){function I($,he){R.call(this,he),this.message=he,this.key=$}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I})(Error),bl=function(I,$){$===void 0&&($=[]),this.parent=I,this.bindings={};for(var he=0,ke=$;he<ke.length;he+=1){var qe=ke[he],et=qe[0],Mt=qe[1];this.bindings[et]=Mt}};bl.prototype.concat=function(I){return new bl(this,I)},bl.prototype.get=function(I){if(this.bindings[I])return this.bindings[I];if(this.parent)return this.parent.get(I);throw new Error(I+" not found in scope.")},bl.prototype.has=function(I){return this.bindings[I]?!0:this.parent?this.parent.has(I):!1};var Iu={kind:"null"},_o={kind:"number"},Ps={kind:"string"},ms={kind:"boolean"},ru={kind:"color"},nu={kind:"object"},Zo={kind:"value"},_u={kind:"error"},Au={kind:"collator"},Ys={kind:"formatted"},Ol={kind:"resolvedImage"};function $l(R,I){return{kind:"array",itemType:R,N:I}}function Ql(R){if(R.kind==="array"){var I=Ql(R.itemType);return typeof R.N=="number"?"array<"+I+", "+R.N+">":R.itemType.kind==="value"?"array":"array<"+I+">"}else return R.kind}var ac=[Iu,_o,Ps,ms,ru,Ys,nu,$l(Zo),Ol];function Tf(R,I){if(I.kind==="error")return null;if(R.kind==="array"){if(I.kind==="array"&&(I.N===0&&I.itemType.kind==="value"||!Tf(R.itemType,I.itemType))&&(typeof R.N!="number"||R.N===I.N))return null}else{if(R.kind===I.kind)return null;if(R.kind==="value")for(var $=0,he=ac;$<he.length;$+=1){var ke=he[$];if(!Tf(ke,I))return null}}return"Expected "+Ql(R)+" but found "+Ql(I)+" instead."}function rf(R,I){return I.some(function($){return $.kind===R.kind})}function df(R,I){return I.some(function($){return $==="null"?R===null:$==="array"?Array.isArray(R):$==="object"?R&&!Array.isArray(R)&&typeof R=="object":$===typeof R})}var Zh=r(function(R,I){var $={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 he(pr){return pr=Math.round(pr),pr<0?0:pr>255?255:pr}function ke(pr){return pr<0?0:pr>1?1:pr}function qe(pr){return pr[pr.length-1]==="%"?he(parseFloat(pr)/100*255):he(parseInt(pr))}function et(pr){return pr[pr.length-1]==="%"?ke(parseFloat(pr)/100):ke(parseFloat(pr))}function Mt(pr,Ar,$r){return $r<0?$r+=1:$r>1&&($r-=1),$r*6<1?pr+(Ar-pr)*$r*6:$r*2<1?Ar:$r*3<2?pr+(Ar-pr)*(2/3-$r)*6:pr}function Jt(pr){var Ar=pr.replace(/ /g,"").toLowerCase();if(Ar in $)return $[Ar].slice();if(Ar[0]==="#"){if(Ar.length===4){var $r=parseInt(Ar.substr(1),16);return $r>=0&&$r<=4095?[($r&3840)>>4|($r&3840)>>8,$r&240|($r&240)>>4,$r&15|($r&15)<<4,1]:null}else if(Ar.length===7){var $r=parseInt(Ar.substr(1),16);return $r>=0&&$r<=16777215?[($r&16711680)>>16,($r&65280)>>8,$r&255,1]:null}return null}var gn=Ar.indexOf("("),hn=Ar.indexOf(")");if(gn!==-1&&hn+1===Ar.length){var zn=Ar.substr(0,gn),_a=Ar.substr(gn+1,hn-(gn+1)).split(","),ui=1;switch(zn){case"rgba":if(_a.length!==4)return null;ui=et(_a.pop());case"rgb":return _a.length!==3?null:[qe(_a[0]),qe(_a[1]),qe(_a[2]),ui];case"hsla":if(_a.length!==4)return null;ui=et(_a.pop());case"hsl":if(_a.length!==3)return null;var Ua=(parseFloat(_a[0])%360+360)%360/360,ji=et(_a[1]),bi=et(_a[2]),Fi=bi<=.5?bi*(ji+1):bi+ji-bi*ji,Zi=bi*2-Fi;return[he(Mt(Zi,Fi,Ua+1/3)*255),he(Mt(Zi,Fi,Ua)*255),he(Mt(Zi,Fi,Ua-1/3)*255),ui];default:return null}}return null}try{I.parseCSSColor=Jt}catch{}}),zh=Zh.parseCSSColor,zl=function(I,$,he,ke){ke===void 0&&(ke=1),this.r=I,this.g=$,this.b=he,this.a=ke};zl.parse=function(I){if(I){if(I instanceof zl)return I;if(typeof I=="string"){var $=zh(I);if($)return new zl($[0]/255*$[3],$[1]/255*$[3],$[2]/255*$[3],$[3])}}},zl.prototype.toString=function(){var I=this.toArray(),$=I[0],he=I[1],ke=I[2],qe=I[3];return"rgba("+Math.round($)+","+Math.round(he)+","+Math.round(ke)+","+qe+")"},zl.prototype.toArray=function(){var I=this,$=I.r,he=I.g,ke=I.b,qe=I.a;return qe===0?[0,0,0,0]:[$*255/qe,he*255/qe,ke*255/qe,qe]},zl.black=new zl(0,0,0,1),zl.white=new zl(1,1,1,1),zl.transparent=new zl(0,0,0,0),zl.red=new zl(1,0,0,1);var Vc=function(I,$,he){I?this.sensitivity=$?"variant":"case":this.sensitivity=$?"accent":"base",this.locale=he,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};Vc.prototype.compare=function(I,$){return this.collator.compare(I,$)},Vc.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var $h=function(I,$,he,ke,qe){this.text=I,this.image=$,this.scale=he,this.fontStack=ke,this.textColor=qe},pc=function(I){this.sections=I};pc.fromString=function(I){return new pc([new $h(I,null,null,null,null)])},pc.prototype.isEmpty=function(){return this.sections.length===0?!0:!this.sections.some(function(I){return I.text.length!==0||I.image&&I.image.name.length!==0})},pc.factory=function(I){return I instanceof pc?I:pc.fromString(I)},pc.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(I){return I.text}).join("")},pc.prototype.serialize=function(){for(var I=["format"],$=0,he=this.sections;$<he.length;$+=1){var ke=he[$];if(ke.image){I.push(["image",ke.image.name]);continue}I.push(ke.text);var qe={};ke.fontStack&&(qe["text-font"]=["literal",ke.fontStack.split(",")]),ke.scale&&(qe["font-scale"]=ke.scale),ke.textColor&&(qe["text-color"]=["rgba"].concat(ke.textColor.toArray())),I.push(qe)}return I};var ic=function(I){this.name=I.name,this.available=I.available};ic.prototype.toString=function(){return this.name},ic.fromString=function(I){return I?new ic({name:I,available:!1}):null},ic.prototype.serialize=function(){return["image",this.name]};function mc(R,I,$,he){if(!(typeof R=="number"&&R>=0&&R<=255&&typeof I=="number"&&I>=0&&I<=255&&typeof $=="number"&&$>=0&&$<=255)){var ke=typeof he=="number"?[R,I,$,he]:[R,I,$];return"Invalid rgba value ["+ke.join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}return typeof he>"u"||typeof he=="number"&&he>=0&&he<=1?null:"Invalid rgba value ["+[R,I,$,he].join(", ")+"]: 'a' must be between 0 and 1."}function vf(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 zl)return!0;if(R instanceof Vc)return!0;if(R instanceof pc)return!0;if(R instanceof ic)return!0;if(Array.isArray(R)){for(var I=0,$=R;I<$.length;I+=1){var he=$[I];if(!vf(he))return!1}return!0}else if(typeof R=="object"){for(var ke in R)if(!vf(R[ke]))return!1;return!0}else return!1}function uu(R){if(R===null)return Iu;if(typeof R=="string")return Ps;if(typeof R=="boolean")return ms;if(typeof R=="number")return _o;if(R instanceof zl)return ru;if(R instanceof Vc)return Au;if(R instanceof pc)return Ys;if(R instanceof ic)return Ol;if(Array.isArray(R)){for(var I=R.length,$,he=0,ke=R;he<ke.length;he+=1){var qe=ke[he],et=uu(qe);if(!$)$=et;else{if($===et)continue;$=Zo;break}}return $l($||Zo,I)}else return nu}function oc(R){var I=typeof R;return R===null?"":I==="string"||I==="number"||I==="boolean"?String(R):R instanceof zl||R instanceof pc||R instanceof ic?R.toString():JSON.stringify(R)}var el=function(I,$){this.type=I,this.value=$};el.parse=function(I,$){if(I.length!==2)return $.error("'literal' expression requires exactly one argument, but found "+(I.length-1)+" instead.");if(!vf(I[1]))return $.error("invalid value");var he=I[1],ke=uu(he),qe=$.expectedType;return ke.kind==="array"&&ke.N===0&&qe&&qe.kind==="array"&&(typeof qe.N!="number"||qe.N===0)&&(ke=qe),new el(ke,he)},el.prototype.evaluate=function(){return this.value},el.prototype.eachChild=function(){},el.prototype.outputDefined=function(){return!0},el.prototype.serialize=function(){return this.type.kind==="array"||this.type.kind==="object"?["literal",this.value]:this.value instanceof zl?["rgba"].concat(this.value.toArray()):this.value instanceof pc?this.value.serialize():this.value};var Xl=function(I){this.name="ExpressionEvaluationError",this.message=I};Xl.prototype.toJSON=function(){return this.message};var zf={string:Ps,number:_o,boolean:ms,object:nu},Lc=function(I,$){this.type=I,this.args=$};Lc.parse=function(I,$){if(I.length<2)return $.error("Expected at least one argument.");var he=1,ke,qe=I[0];if(qe==="array"){var et;if(I.length>2){var Mt=I[1];if(typeof Mt!="string"||!(Mt in zf)||Mt==="object")return $.error('The item type argument of "array" must be one of string, number, boolean',1);et=zf[Mt],he++}else et=Zo;var Jt;if(I.length>3){if(I[2]!==null&&(typeof I[2]!="number"||I[2]<0||I[2]!==Math.floor(I[2])))return $.error('The length argument to "array" must be a positive integer literal',2);Jt=I[2],he++}ke=$l(et,Jt)}else ke=zf[qe];for(var pr=[];he<I.length;he++){var Ar=$.parse(I[he],he,Zo);if(!Ar)return null;pr.push(Ar)}return new Lc(ke,pr)},Lc.prototype.evaluate=function(I){for(var $=0;$<this.args.length;$++){var he=this.args[$].evaluate(I),ke=Tf(this.type,uu(he));if(ke){if($===this.args.length-1)throw new Xl("Expected value to be of type "+Ql(this.type)+", but found "+Ql(uu(he))+" instead.")}else return he}return null},Lc.prototype.eachChild=function(I){this.args.forEach(I)},Lc.prototype.outputDefined=function(){return this.args.every(function(I){return I.outputDefined()})},Lc.prototype.serialize=function(){var I=this.type,$=[I.kind];if(I.kind==="array"){var he=I.itemType;if(he.kind==="string"||he.kind==="number"||he.kind==="boolean"){$.push(he.kind);var ke=I.N;(typeof ke=="number"||this.args.length>1)&&$.push(ke)}}return $.concat(this.args.map(function(qe){return qe.serialize()}))};var $f=function(I){this.type=Ys,this.sections=I};$f.parse=function(I,$){if(I.length<2)return $.error("Expected at least one argument.");var he=I[1];if(!Array.isArray(he)&&typeof he=="object")return $.error("First argument must be an image or text section.");for(var ke=[],qe=!1,et=1;et<=I.length-1;++et){var Mt=I[et];if(qe&&typeof Mt=="object"&&!Array.isArray(Mt)){qe=!1;var Jt=null;if(Mt["font-scale"]&&(Jt=$.parse(Mt["font-scale"],1,_o),!Jt))return null;var pr=null;if(Mt["text-font"]&&(pr=$.parse(Mt["text-font"],1,$l(Ps)),!pr))return null;var Ar=null;if(Mt["text-color"]&&(Ar=$.parse(Mt["text-color"],1,ru),!Ar))return null;var $r=ke[ke.length-1];$r.scale=Jt,$r.font=pr,$r.textColor=Ar}else{var gn=$.parse(I[et],1,Zo);if(!gn)return null;var hn=gn.type.kind;if(hn!=="string"&&hn!=="value"&&hn!=="null"&&hn!=="resolvedImage")return $.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");qe=!0,ke.push({content:gn,scale:null,font:null,textColor:null})}}return new $f(ke)},$f.prototype.evaluate=function(I){var $=function(he){var ke=he.content.evaluate(I);return uu(ke)===Ol?new $h("",ke,null,null,null):new $h(oc(ke),null,he.scale?he.scale.evaluate(I):null,he.font?he.font.evaluate(I).join(","):null,he.textColor?he.textColor.evaluate(I):null)};return new pc(this.sections.map($))},$f.prototype.eachChild=function(I){for(var $=0,he=this.sections;$<he.length;$+=1){var ke=he[$];I(ke.content),ke.scale&&I(ke.scale),ke.font&&I(ke.font),ke.textColor&&I(ke.textColor)}},$f.prototype.outputDefined=function(){return!1},$f.prototype.serialize=function(){for(var I=["format"],$=0,he=this.sections;$<he.length;$+=1){var ke=he[$];I.push(ke.content.serialize());var qe={};ke.scale&&(qe["font-scale"]=ke.scale.serialize()),ke.font&&(qe["text-font"]=ke.font.serialize()),ke.textColor&&(qe["text-color"]=ke.textColor.serialize()),I.push(qe)}return I};var xu=function(I){this.type=Ol,this.input=I};xu.parse=function(I,$){if(I.length!==2)return $.error("Expected two arguments.");var he=$.parse(I[1],1,Ps);return he?new xu(he):$.error("No image name provided.")},xu.prototype.evaluate=function(I){var $=this.input.evaluate(I),he=ic.fromString($);return he&&I.availableImages&&(he.available=I.availableImages.indexOf($)>-1),he},xu.prototype.eachChild=function(I){I(this.input)},xu.prototype.outputDefined=function(){return!1},xu.prototype.serialize=function(){return["image",this.input.serialize()]};var Wd={"to-boolean":ms,"to-color":ru,"to-number":_o,"to-string":Ps},Zs=function(I,$){this.type=I,this.args=$};Zs.parse=function(I,$){if(I.length<2)return $.error("Expected at least one argument.");var he=I[0];if((he==="to-boolean"||he==="to-string")&&I.length!==2)return $.error("Expected one argument.");for(var ke=Wd[he],qe=[],et=1;et<I.length;et++){var Mt=$.parse(I[et],et,Zo);if(!Mt)return null;qe.push(Mt)}return new Zs(ke,qe)},Zs.prototype.evaluate=function(I){if(this.type.kind==="boolean")return!!this.args[0].evaluate(I);if(this.type.kind==="color"){for(var $,he,ke=0,qe=this.args;ke<qe.length;ke+=1){var et=qe[ke];if($=et.evaluate(I),he=null,$ instanceof zl)return $;if(typeof $=="string"){var Mt=I.parseColor($);if(Mt)return Mt}else if(Array.isArray($)&&($.length<3||$.length>4?he="Invalid rbga value "+JSON.stringify($)+": expected an array containing either three or four numeric values.":he=mc($[0],$[1],$[2],$[3]),!he))return new zl($[0]/255,$[1]/255,$[2]/255,$[3])}throw new Xl(he||"Could not parse color from value '"+(typeof $=="string"?$:String(JSON.stringify($)))+"'")}else if(this.type.kind==="number"){for(var Jt=null,pr=0,Ar=this.args;pr<Ar.length;pr+=1){var $r=Ar[pr];if(Jt=$r.evaluate(I),Jt===null)return 0;var gn=Number(Jt);if(!isNaN(gn))return gn}throw new Xl("Could not convert "+JSON.stringify(Jt)+" to number.")}else return this.type.kind==="formatted"?pc.fromString(oc(this.args[0].evaluate(I))):this.type.kind==="resolvedImage"?ic.fromString(oc(this.args[0].evaluate(I))):oc(this.args[0].evaluate(I))},Zs.prototype.eachChild=function(I){this.args.forEach(I)},Zs.prototype.outputDefined=function(){return this.args.every(function(I){return I.outputDefined()})},Zs.prototype.serialize=function(){if(this.type.kind==="formatted")return new $f([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if(this.type.kind==="resolvedImage")return new xu(this.args[0]).serialize();var I=["to-"+this.type.kind];return this.eachChild(function($){I.push($.serialize())}),I};var dv=["Unknown","Point","LineString","Polygon"],Ml=function(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null};Ml.prototype.id=function(){return this.feature&&"id"in this.feature?this.feature.id:null},Ml.prototype.geometryType=function(){return this.feature?typeof this.feature.type=="number"?dv[this.feature.type]:this.feature.type:null},Ml.prototype.geometry=function(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null},Ml.prototype.canonicalID=function(){return this.canonical},Ml.prototype.properties=function(){return this.feature&&this.feature.properties||{}},Ml.prototype.parseColor=function(I){var $=this._parseColorCache[I];return $||($=this._parseColorCache[I]=zl.parse(I)),$};var Ko=function(I,$,he,ke){this.name=I,this.type=$,this._evaluate=he,this.args=ke};Ko.prototype.evaluate=function(I){return this._evaluate(I,this.args)},Ko.prototype.eachChild=function(I){this.args.forEach(I)},Ko.prototype.outputDefined=function(){return!1},Ko.prototype.serialize=function(){return[this.name].concat(this.args.map(function(I){return I.serialize()}))},Ko.parse=function(I,$){var he,ke=I[0],qe=Ko.definitions[ke];if(!qe)return $.error('Unknown expression "'+ke+'". If you wanted a literal array, use ["literal", [...]].',0);for(var et=Array.isArray(qe)?qe[0]:qe.type,Mt=Array.isArray(qe)?[[qe[1],qe[2]]]:qe.overloads,Jt=Mt.filter(function(Ts){var ks=Ts[0];return!Array.isArray(ks)||ks.length===I.length-1}),pr=null,Ar=0,$r=Jt;Ar<$r.length;Ar+=1){var gn=$r[Ar],hn=gn[0],zn=gn[1];pr=new cu($.registry,$.path,null,$.scope);for(var _a=[],ui=!1,Ua=1;Ua<I.length;Ua++){var ji=I[Ua],bi=Array.isArray(hn)?hn[Ua-1]:hn.type,Fi=pr.parse(ji,1+_a.length,bi);if(!Fi){ui=!0;break}_a.push(Fi)}if(!ui){if(Array.isArray(hn)&&hn.length!==_a.length){pr.error("Expected "+hn.length+" arguments, but found "+_a.length+" instead.");continue}for(var Zi=0;Zi<_a.length;Zi++){var yo=Array.isArray(hn)?hn[Zi]:hn.type,Bo=_a[Zi];pr.concat(Zi+1).checkSubtype(yo,Bo.type)}if(pr.errors.length===0)return new Ko(ke,et,zn,_a)}}if(Jt.length===1)(he=$.errors).push.apply(he,pr.errors);else{for(var zo=Jt.length?Jt:Mt,ws=zo.map(function(Ts){var ks=Ts[0];return ph(ks)}).join(" | "),Qo=[],fs=1;fs<I.length;fs++){var Sl=$.parse(I[fs],1+Qo.length);if(!Sl)return null;Qo.push(Ql(Sl.type))}$.error("Expected arguments of type "+ws+", but found ("+Qo.join(", ")+") instead.")}return null},Ko.register=function(I,$){Ko.definitions=$;for(var he in $)I[he]=Ko};function ph(R){return Array.isArray(R)?"("+R.map(Ql).join(", ")+")":"("+Ql(R.type)+"...)"}var pf=function(I,$,he){this.type=Au,this.locale=he,this.caseSensitive=I,this.diacriticSensitive=$};pf.parse=function(I,$){if(I.length!==2)return $.error("Expected one argument.");var he=I[1];if(typeof he!="object"||Array.isArray(he))return $.error("Collator options argument must be an object.");var ke=$.parse(he["case-sensitive"]===void 0?!1:he["case-sensitive"],1,ms);if(!ke)return null;var qe=$.parse(he["diacritic-sensitive"]===void 0?!1:he["diacritic-sensitive"],1,ms);if(!qe)return null;var et=null;return he.locale&&(et=$.parse(he.locale,1,Ps),!et)?null:new pf(ke,qe,et)},pf.prototype.evaluate=function(I){return new Vc(this.caseSensitive.evaluate(I),this.diacriticSensitive.evaluate(I),this.locale?this.locale.evaluate(I):null)},pf.prototype.eachChild=function(I){I(this.caseSensitive),I(this.diacriticSensitive),this.locale&&I(this.locale)},pf.prototype.outputDefined=function(){return!1},pf.prototype.serialize=function(){var I={};return I["case-sensitive"]=this.caseSensitive.serialize(),I["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(I.locale=this.locale.serialize()),["collator",I]};var Yu=8192;function Kh(R,I){R[0]=Math.min(R[0],I[0]),R[1]=Math.min(R[1],I[1]),R[2]=Math.max(R[2],I[0]),R[3]=Math.max(R[3],I[1])}function Kf(R){return(180+R)/360}function Ah(R){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+R*Math.PI/360)))/360}function sc(R,I){return!(R[0]<=I[0]||R[2]>=I[2]||R[1]<=I[1]||R[3]>=I[3])}function Ld(R,I){var $=Kf(R[0]),he=Ah(R[1]),ke=Math.pow(2,I.z);return[Math.round($*ke*Yu),Math.round(he*ke*Yu)]}function sd(R,I,$){var he=R[0]-I[0],ke=R[1]-I[1],qe=R[0]-$[0],et=R[1]-$[1];return he*et-qe*ke===0&&he*qe<=0&&ke*et<=0}function Sh(R,I,$){return I[1]>R[1]!=$[1]>R[1]&&R[0]<($[0]-I[0])*(R[1]-I[1])/($[1]-I[1])+I[0]}function Jf(R,I){for(var $=!1,he=0,ke=I.length;he<ke;he++)for(var qe=I[he],et=0,Mt=qe.length;et<Mt-1;et++){if(sd(R,qe[et],qe[et+1]))return!1;Sh(R,qe[et],qe[et+1])&&($=!$)}return $}function Jh(R,I){for(var $=0;$<I.length;$++)if(Jf(R,I[$]))return!0;return!1}function Qh(R,I){return R[0]*I[1]-R[1]*I[0]}function mf(R,I,$,he){var ke=R[0]-$[0],qe=R[1]-$[1],et=I[0]-$[0],Mt=I[1]-$[1],Jt=he[0]-$[0],pr=he[1]-$[1],Ar=ke*pr-Jt*qe,$r=et*pr-Jt*Mt;return Ar>0&&$r<0||Ar<0&&$r>0}function ld(R,I,$,he){var ke=[I[0]-R[0],I[1]-R[1]],qe=[he[0]-$[0],he[1]-$[1]];return Qh(qe,ke)===0?!1:!!(mf(R,I,$,he)&&mf($,he,R,I))}function Nf(R,I,$){for(var he=0,ke=$;he<ke.length;he+=1)for(var qe=ke[he],et=0;et<qe.length-1;++et)if(ld(R,I,qe[et],qe[et+1]))return!0;return!1}function Af(R,I){for(var $=0;$<R.length;++$)if(!Jf(R[$],I))return!1;for(var he=0;he<R.length-1;++he)if(Nf(R[he],R[he+1],I))return!1;return!0}function lc(R,I){for(var $=0;$<I.length;$++)if(Af(R,I[$]))return!0;return!1}function lh(R,I,$){for(var he=[],ke=0;ke<R.length;ke++){for(var qe=[],et=0;et<R[ke].length;et++){var Mt=Ld(R[ke][et],$);Kh(I,Mt),qe.push(Mt)}he.push(qe)}return he}function ed(R,I,$){for(var he=[],ke=0;ke<R.length;ke++){var qe=lh(R[ke],I,$);he.push(qe)}return he}function Kl(R,I,$,he){if(R[0]<$[0]||R[0]>$[2]){var ke=he*.5,qe=R[0]-$[0]>ke?-he:$[0]-R[0]>ke?he:0;qe===0&&(qe=R[0]-$[2]>ke?-he:$[2]-R[0]>ke?he:0),R[0]+=qe}Kh(I,R)}function Nh(R){R[0]=R[1]=1/0,R[2]=R[3]=-1/0}function Yd(R,I,$,he){for(var ke=Math.pow(2,he.z)*Yu,qe=[he.x*Yu,he.y*Yu],et=[],Mt=0,Jt=R;Mt<Jt.length;Mt+=1)for(var pr=Jt[Mt],Ar=0,$r=pr;Ar<$r.length;Ar+=1){var gn=$r[Ar],hn=[gn.x+qe[0],gn.y+qe[1]];Kl(hn,I,$,ke),et.push(hn)}return et}function ud(R,I,$,he){for(var ke=Math.pow(2,he.z)*Yu,qe=[he.x*Yu,he.y*Yu],et=[],Mt=0,Jt=R;Mt<Jt.length;Mt+=1){for(var pr=Jt[Mt],Ar=[],$r=0,gn=pr;$r<gn.length;$r+=1){var hn=gn[$r],zn=[hn.x+qe[0],hn.y+qe[1]];Kh(I,zn),Ar.push(zn)}et.push(Ar)}if(I[2]-I[0]<=ke/2){Nh(I);for(var _a=0,ui=et;_a<ui.length;_a+=1)for(var Ua=ui[_a],ji=0,bi=Ua;ji<bi.length;ji+=1){var Fi=bi[ji];Kl(Fi,I,$,ke)}}return et}function Eh(R,I){var $=[1/0,1/0,-1/0,-1/0],he=[1/0,1/0,-1/0,-1/0],ke=R.canonicalID();if(I.type==="Polygon"){var qe=lh(I.coordinates,he,ke),et=Yd(R.geometry(),$,he,ke);if(!sc($,he))return!1;for(var Mt=0,Jt=et;Mt<Jt.length;Mt+=1){var pr=Jt[Mt];if(!Jf(pr,qe))return!1}}if(I.type==="MultiPolygon"){var Ar=ed(I.coordinates,he,ke),$r=Yd(R.geometry(),$,he,ke);if(!sc($,he))return!1;for(var gn=0,hn=$r;gn<hn.length;gn+=1){var zn=hn[gn];if(!Jh(zn,Ar))return!1}}return!0}function cd(R,I){var $=[1/0,1/0,-1/0,-1/0],he=[1/0,1/0,-1/0,-1/0],ke=R.canonicalID();if(I.type==="Polygon"){var qe=lh(I.coordinates,he,ke),et=ud(R.geometry(),$,he,ke);if(!sc($,he))return!1;for(var Mt=0,Jt=et;Mt<Jt.length;Mt+=1){var pr=Jt[Mt];if(!Af(pr,qe))return!1}}if(I.type==="MultiPolygon"){var Ar=ed(I.coordinates,he,ke),$r=ud(R.geometry(),$,he,ke);if(!sc($,he))return!1;for(var gn=0,hn=$r;gn<hn.length;gn+=1){var zn=hn[gn];if(!lc(zn,Ar))return!1}}return!0}var Hc=function(I,$){this.type=ms,this.geojson=I,this.geometries=$};Hc.parse=function(I,$){if(I.length!==2)return $.error("'within' expression requires exactly one argument, but found "+(I.length-1)+" instead.");if(vf(I[1])){var he=I[1];if(he.type==="FeatureCollection")for(var ke=0;ke<he.features.length;++ke){var qe=he.features[ke].geometry.type;if(qe==="Polygon"||qe==="MultiPolygon")return new Hc(he,he.features[ke].geometry)}else if(he.type==="Feature"){var et=he.geometry.type;if(et==="Polygon"||et==="MultiPolygon")return new Hc(he,he.geometry)}else if(he.type==="Polygon"||he.type==="MultiPolygon")return new Hc(he,he)}return $.error("'within' expression requires valid geojson object that contains polygon geometry type.")},Hc.prototype.evaluate=function(I){if(I.geometry()!=null&&I.canonicalID()!=null){if(I.geometryType()==="Point")return Eh(I,this.geometries);if(I.geometryType()==="LineString")return cd(I,this.geometries)}return!1},Hc.prototype.eachChild=function(){},Hc.prototype.outputDefined=function(){return!0},Hc.prototype.serialize=function(){return["within",this.geojson]};function fd(R){if(R instanceof Ko){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 Hc)return!1;var I=!0;return R.eachChild(function($){I&&!fd($)&&(I=!1)}),I}function Pu(R){if(R instanceof Ko&&R.name==="feature-state")return!1;var I=!0;return R.eachChild(function($){I&&!Pu($)&&(I=!1)}),I}function Gc(R,I){if(R instanceof Ko&&I.indexOf(R.name)>=0)return!1;var $=!0;return R.eachChild(function(he){$&&!Gc(he,I)&&($=!1)}),$}var Qf=function(I,$){this.type=$.type,this.name=I,this.boundExpression=$};Qf.parse=function(I,$){if(I.length!==2||typeof I[1]!="string")return $.error("'var' expression requires exactly one string literal argument.");var he=I[1];return $.scope.has(he)?new Qf(he,$.scope.get(he)):$.error('Unknown variable "'+he+'". Make sure "'+he+'" has been bound in an enclosing "let" expression before using it.',1)},Qf.prototype.evaluate=function(I){return this.boundExpression.evaluate(I)},Qf.prototype.eachChild=function(){},Qf.prototype.outputDefined=function(){return!1},Qf.prototype.serialize=function(){return["var",this.name]};var cu=function(I,$,he,ke,qe){$===void 0&&($=[]),ke===void 0&&(ke=new bl),qe===void 0&&(qe=[]),this.registry=I,this.path=$,this.key=$.map(function(et){return"["+et+"]"}).join(""),this.scope=ke,this.errors=qe,this.expectedType=he};cu.prototype.parse=function(I,$,he,ke,qe){return qe===void 0&&(qe={}),$?this.concat($,he,ke)._parse(I,qe):this._parse(I,qe)},cu.prototype._parse=function(I,$){(I===null||typeof I=="string"||typeof I=="boolean"||typeof I=="number")&&(I=["literal",I]);function he(Ar,$r,gn){return gn==="assert"?new Lc($r,[Ar]):gn==="coerce"?new Zs($r,[Ar]):Ar}if(Array.isArray(I)){if(I.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var ke=I[0];if(typeof ke!="string")return this.error("Expression name must be a string, but found "+typeof ke+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var qe=this.registry[ke];if(qe){var et=qe.parse(I,this);if(!et)return null;if(this.expectedType){var Mt=this.expectedType,Jt=et.type;if((Mt.kind==="string"||Mt.kind==="number"||Mt.kind==="boolean"||Mt.kind==="object"||Mt.kind==="array")&&Jt.kind==="value")et=he(et,Mt,$.typeAnnotation||"assert");else if((Mt.kind==="color"||Mt.kind==="formatted"||Mt.kind==="resolvedImage")&&(Jt.kind==="value"||Jt.kind==="string"))et=he(et,Mt,$.typeAnnotation||"coerce");else if(this.checkSubtype(Mt,Jt))return null}if(!(et instanceof el)&&et.type.kind!=="resolvedImage"&&Ff(et)){var pr=new Ml;try{et=new el(et.type,et.evaluate(pr))}catch(Ar){return this.error(Ar.message),null}}return et}return this.error('Unknown expression "'+ke+'". If you wanted a literal array, use ["literal", [...]].',0)}else return typeof I>"u"?this.error("'undefined' value invalid. Use null instead."):typeof I=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof I+" instead.")},cu.prototype.concat=function(I,$,he){var ke=typeof I=="number"?this.path.concat(I):this.path,qe=he?this.scope.concat(he):this.scope;return new cu(this.registry,ke,$||null,qe,this.errors)},cu.prototype.error=function(I){for(var $=[],he=arguments.length-1;he-- >0;)$[he]=arguments[he+1];var ke=""+this.key+$.map(function(qe){return"["+qe+"]"}).join("");this.errors.push(new al(ke,I))},cu.prototype.checkSubtype=function(I,$){var he=Tf(I,$);return he&&this.error(he),he};function Ff(R){if(R instanceof Qf)return Ff(R.boundExpression);if(R instanceof Ko&&R.name==="error")return!1;if(R instanceof pf)return!1;if(R instanceof Hc)return!1;var I=R instanceof Zs||R instanceof Lc,$=!0;return R.eachChild(function(he){I?$=$&&Ff(he):$=$&&he instanceof el}),$?fd(R)&&Gc(R,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"]):!1}function Sc(R,I){for(var $=R.length-1,he=0,ke=$,qe=0,et,Mt;he<=ke;)if(qe=Math.floor((he+ke)/2),et=R[qe],Mt=R[qe+1],et<=I){if(qe===$||I<Mt)return qe;he=qe+1}else if(et>I)ke=qe-1;else throw new Xl("Input is not a number.");return 0}var Xc=function(I,$,he){this.type=I,this.input=$,this.labels=[],this.outputs=[];for(var ke=0,qe=he;ke<qe.length;ke+=1){var et=qe[ke],Mt=et[0],Jt=et[1];this.labels.push(Mt),this.outputs.push(Jt)}};Xc.parse=function(I,$){if(I.length-1<4)return $.error("Expected at least 4 arguments, but found only "+(I.length-1)+".");if((I.length-1)%2!==0)return $.error("Expected an even number of arguments.");var he=$.parse(I[1],1,_o);if(!he)return null;var ke=[],qe=null;$.expectedType&&$.expectedType.kind!=="value"&&(qe=$.expectedType);for(var et=1;et<I.length;et+=2){var Mt=et===1?-1/0:I[et],Jt=I[et+1],pr=et,Ar=et+1;if(typeof Mt!="number")return $.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',pr);if(ke.length&&ke[ke.length-1][0]>=Mt)return $.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',pr);var $r=$.parse(Jt,Ar,qe);if(!$r)return null;qe=qe||$r.type,ke.push([Mt,$r])}return new Xc(qe,he,ke)},Xc.prototype.evaluate=function(I){var $=this.labels,he=this.outputs;if($.length===1)return he[0].evaluate(I);var ke=this.input.evaluate(I);if(ke<=$[0])return he[0].evaluate(I);var qe=$.length;if(ke>=$[qe-1])return he[qe-1].evaluate(I);var et=Sc($,ke);return he[et].evaluate(I)},Xc.prototype.eachChild=function(I){I(this.input);for(var $=0,he=this.outputs;$<he.length;$+=1){var ke=he[$];I(ke)}},Xc.prototype.outputDefined=function(){return this.outputs.every(function(I){return I.outputDefined()})},Xc.prototype.serialize=function(){for(var I=["step",this.input.serialize()],$=0;$<this.labels.length;$++)$>0&&I.push(this.labels[$]),I.push(this.outputs[$].serialize());return I};function bu(R,I,$){return R*(1-$)+I*$}function mh(R,I,$){return new zl(bu(R.r,I.r,$),bu(R.g,I.g,$),bu(R.b,I.b,$),bu(R.a,I.a,$))}function Sf(R,I,$){return R.map(function(he,ke){return bu(he,I[ke],$)})}var eh=Object.freeze({__proto__:null,number:bu,color:mh,array:Sf}),Fh=.95047,Zd=1,Sv=1.08883,gh=4/29,Bh=6/29,nf=3*Bh*Bh,jh=Bh*Bh*Bh,gc=Math.PI/180,yh=180/Math.PI;function hd(R){return R>jh?Math.pow(R,1/3):R/nf+gh}function _h(R){return R>Bh?R*R*R:nf*(R-gh)}function du(R){return 255*(R<=.0031308?12.92*R:1.055*Math.pow(R,1/2.4)-.055)}function Wc(R){return R/=255,R<=.04045?R/12.92:Math.pow((R+.055)/1.055,2.4)}function gf(R){var I=Wc(R.r),$=Wc(R.g),he=Wc(R.b),ke=hd((.4124564*I+.3575761*$+.1804375*he)/Fh),qe=hd((.2126729*I+.7151522*$+.072175*he)/Zd),et=hd((.0193339*I+.119192*$+.9503041*he)/Sv);return{l:116*qe-16,a:500*(ke-qe),b:200*(qe-et),alpha:R.a}}function td(R){var I=(R.l+16)/116,$=isNaN(R.a)?I:I+R.a/500,he=isNaN(R.b)?I:I-R.b/200;return I=Zd*_h(I),$=Fh*_h($),he=Sv*_h(he),new zl(du(3.2404542*$-1.5371385*I-.4985314*he),du(-.969266*$+1.8760108*I+.041556*he),du(.0556434*$-.2040259*I+1.0572252*he),R.alpha)}function gu(R,I,$){return{l:bu(R.l,I.l,$),a:bu(R.a,I.a,$),b:bu(R.b,I.b,$),alpha:bu(R.alpha,I.alpha,$)}}function Mh(R){var I=gf(R),$=I.l,he=I.a,ke=I.b,qe=Math.atan2(ke,he)*yh;return{h:qe<0?qe+360:qe,c:Math.sqrt(he*he+ke*ke),l:$,alpha:R.a}}function th(R){var I=R.h*gc,$=R.c,he=R.l;return td({l:he,a:Math.cos(I)*$,b:Math.sin(I)*$,alpha:R.alpha})}function af(R,I,$){var he=I-R;return R+$*(he>180||he<-180?he-360*Math.round(he/360):he)}function Ch(R,I,$){return{h:af(R.h,I.h,$),c:bu(R.c,I.c,$),l:bu(R.l,I.l,$),alpha:bu(R.alpha,I.alpha,$)}}var Ef={forward:gf,reverse:td,interpolate:gu},kh={forward:Mh,reverse:th,interpolate:Ch},$d=Object.freeze({__proto__:null,lab:Ef,hcl:kh}),xc=function(I,$,he,ke,qe){this.type=I,this.operator=$,this.interpolation=he,this.input=ke,this.labels=[],this.outputs=[];for(var et=0,Mt=qe;et<Mt.length;et+=1){var Jt=Mt[et],pr=Jt[0],Ar=Jt[1];this.labels.push(pr),this.outputs.push(Ar)}};xc.interpolationFactor=function(I,$,he,ke){var qe=0;if(I.name==="exponential")qe=dd($,I.base,he,ke);else if(I.name==="linear")qe=dd($,1,he,ke);else if(I.name==="cubic-bezier"){var et=I.controlPoints,Mt=new l(et[0],et[1],et[2],et[3]);qe=Mt.solve(dd($,1,he,ke))}return qe},xc.parse=function(I,$){var he=I[0],ke=I[1],qe=I[2],et=I.slice(3);if(!Array.isArray(ke)||ke.length===0)return $.error("Expected an interpolation type expression.",1);if(ke[0]==="linear")ke={name:"linear"};else if(ke[0]==="exponential"){var Mt=ke[1];if(typeof Mt!="number")return $.error("Exponential interpolation requires a numeric base.",1,1);ke={name:"exponential",base:Mt}}else if(ke[0]==="cubic-bezier"){var Jt=ke.slice(1);if(Jt.length!==4||Jt.some(function(Ua){return typeof Ua!="number"||Ua<0||Ua>1}))return $.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);ke={name:"cubic-bezier",controlPoints:Jt}}else return $.error("Unknown interpolation type "+String(ke[0]),1,0);if(I.length-1<4)return $.error("Expected at least 4 arguments, but found only "+(I.length-1)+".");if((I.length-1)%2!==0)return $.error("Expected an even number of arguments.");if(qe=$.parse(qe,2,_o),!qe)return null;var pr=[],Ar=null;he==="interpolate-hcl"||he==="interpolate-lab"?Ar=ru:$.expectedType&&$.expectedType.kind!=="value"&&(Ar=$.expectedType);for(var $r=0;$r<et.length;$r+=2){var gn=et[$r],hn=et[$r+1],zn=$r+3,_a=$r+4;if(typeof gn!="number")return $.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',zn);if(pr.length&&pr[pr.length-1][0]>=gn)return $.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',zn);var ui=$.parse(hn,_a,Ar);if(!ui)return null;Ar=Ar||ui.type,pr.push([gn,ui])}return Ar.kind!=="number"&&Ar.kind!=="color"&&!(Ar.kind==="array"&&Ar.itemType.kind==="number"&&typeof Ar.N=="number")?$.error("Type "+Ql(Ar)+" is not interpolatable."):new xc(Ar,he,ke,qe,pr)},xc.prototype.evaluate=function(I){var $=this.labels,he=this.outputs;if($.length===1)return he[0].evaluate(I);var ke=this.input.evaluate(I);if(ke<=$[0])return he[0].evaluate(I);var qe=$.length;if(ke>=$[qe-1])return he[qe-1].evaluate(I);var et=Sc($,ke),Mt=$[et],Jt=$[et+1],pr=xc.interpolationFactor(this.interpolation,ke,Mt,Jt),Ar=he[et].evaluate(I),$r=he[et+1].evaluate(I);return this.operator==="interpolate"?eh[this.type.kind.toLowerCase()](Ar,$r,pr):this.operator==="interpolate-hcl"?kh.reverse(kh.interpolate(kh.forward(Ar),kh.forward($r),pr)):Ef.reverse(Ef.interpolate(Ef.forward(Ar),Ef.forward($r),pr))},xc.prototype.eachChild=function(I){I(this.input);for(var $=0,he=this.outputs;$<he.length;$+=1){var ke=he[$];I(ke)}},xc.prototype.outputDefined=function(){return this.outputs.every(function(I){return I.outputDefined()})},xc.prototype.serialize=function(){var I;this.interpolation.name==="linear"?I=["linear"]:this.interpolation.name==="exponential"?this.interpolation.base===1?I=["linear"]:I=["exponential",this.interpolation.base]:I=["cubic-bezier"].concat(this.interpolation.controlPoints);for(var $=[this.operator,I,this.input.serialize()],he=0;he<this.labels.length;he++)$.push(this.labels[he],this.outputs[he].serialize());return $};function dd(R,I,$,he){var ke=he-$,qe=R-$;return ke===0?0:I===1?qe/ke:(Math.pow(I,qe)-1)/(Math.pow(I,ke)-1)}var of=function(I,$){this.type=I,this.args=$};of.parse=function(I,$){if(I.length<2)return $.error("Expectected at least one argument.");var he=null,ke=$.expectedType;ke&&ke.kind!=="value"&&(he=ke);for(var qe=[],et=0,Mt=I.slice(1);et<Mt.length;et+=1){var Jt=Mt[et],pr=$.parse(Jt,1+qe.length,he,void 0,{typeAnnotation:"omit"});if(!pr)return null;he=he||pr.type,qe.push(pr)}var Ar=ke&&qe.some(function($r){return Tf(ke,$r.type)});return Ar?new of(Zo,qe):new of(he,qe)},of.prototype.evaluate=function(I){for(var $=null,he=0,ke,qe=0,et=this.args;qe<et.length;qe+=1){var Mt=et[qe];if(he++,$=Mt.evaluate(I),$&&$ instanceof ic&&!$.available&&(ke||(ke=$.name),$=null,he===this.args.length&&($=ke)),$!==null)break}return $},of.prototype.eachChild=function(I){this.args.forEach(I)},of.prototype.outputDefined=function(){return this.args.every(function(I){return I.outputDefined()})},of.prototype.serialize=function(){var I=["coalesce"];return this.eachChild(function($){I.push($.serialize())}),I};var Bf=function(I,$){this.type=$.type,this.bindings=[].concat(I),this.result=$};Bf.prototype.evaluate=function(I){return this.result.evaluate(I)},Bf.prototype.eachChild=function(I){for(var $=0,he=this.bindings;$<he.length;$+=1){var ke=he[$];I(ke[1])}I(this.result)},Bf.parse=function(I,$){if(I.length<4)return $.error("Expected at least 3 arguments, but found "+(I.length-1)+" instead.");for(var he=[],ke=1;ke<I.length-1;ke+=2){var qe=I[ke];if(typeof qe!="string")return $.error("Expected string, but found "+typeof qe+" instead.",ke);if(/[^a-zA-Z0-9_]/.test(qe))return $.error("Variable names must contain only alphanumeric characters or '_'.",ke);var et=$.parse(I[ke+1],ke+1);if(!et)return null;he.push([qe,et])}var Mt=$.parse(I[I.length-1],I.length-1,$.expectedType,he);return Mt?new Bf(he,Mt):null},Bf.prototype.outputDefined=function(){return this.result.outputDefined()},Bf.prototype.serialize=function(){for(var I=["let"],$=0,he=this.bindings;$<he.length;$+=1){var ke=he[$],qe=ke[0],et=ke[1];I.push(qe,et.serialize())}return I.push(this.result.serialize()),I};var Mf=function(I,$,he){this.type=I,this.index=$,this.input=he};Mf.parse=function(I,$){if(I.length!==3)return $.error("Expected 2 arguments, but found "+(I.length-1)+" instead.");var he=$.parse(I[1],1,_o),ke=$.parse(I[2],2,$l($.expectedType||Zo));if(!he||!ke)return null;var qe=ke.type;return new Mf(qe.itemType,he,ke)},Mf.prototype.evaluate=function(I){var $=this.index.evaluate(I),he=this.input.evaluate(I);if($<0)throw new Xl("Array index out of bounds: "+$+" < 0.");if($>=he.length)throw new Xl("Array index out of bounds: "+$+" > "+(he.length-1)+".");if($!==Math.floor($))throw new Xl("Array index must be an integer, but found "+$+" instead.");return he[$]},Mf.prototype.eachChild=function(I){I(this.index),I(this.input)},Mf.prototype.outputDefined=function(){return!1},Mf.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var Du=function(I,$){this.type=ms,this.needle=I,this.haystack=$};Du.parse=function(I,$){if(I.length!==3)return $.error("Expected 2 arguments, but found "+(I.length-1)+" instead.");var he=$.parse(I[1],1,Zo),ke=$.parse(I[2],2,Zo);return!he||!ke?null:rf(he.type,[ms,Ps,_o,Iu,Zo])?new Du(he,ke):$.error("Expected first argument to be of type boolean, string, number or null, but found "+Ql(he.type)+" instead")},Du.prototype.evaluate=function(I){var $=this.needle.evaluate(I),he=this.haystack.evaluate(I);if(!he)return!1;if(!df($,["boolean","string","number","null"]))throw new Xl("Expected first argument to be of type boolean, string, number or null, but found "+Ql(uu($))+" instead.");if(!df(he,["string","array"]))throw new Xl("Expected second argument to be of type array or string, but found "+Ql(uu(he))+" instead.");return he.indexOf($)>=0},Du.prototype.eachChild=function(I){I(this.needle),I(this.haystack)},Du.prototype.outputDefined=function(){return!0},Du.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var Rc=function(I,$,he){this.type=_o,this.needle=I,this.haystack=$,this.fromIndex=he};Rc.parse=function(I,$){if(I.length<=2||I.length>=5)return $.error("Expected 3 or 4 arguments, but found "+(I.length-1)+" instead.");var he=$.parse(I[1],1,Zo),ke=$.parse(I[2],2,Zo);if(!he||!ke)return null;if(!rf(he.type,[ms,Ps,_o,Iu,Zo]))return $.error("Expected first argument to be of type boolean, string, number or null, but found "+Ql(he.type)+" instead");if(I.length===4){var qe=$.parse(I[3],3,_o);return qe?new Rc(he,ke,qe):null}else return new Rc(he,ke)},Rc.prototype.evaluate=function(I){var $=this.needle.evaluate(I),he=this.haystack.evaluate(I);if(!df($,["boolean","string","number","null"]))throw new Xl("Expected first argument to be of type boolean, string, number or null, but found "+Ql(uu($))+" instead.");if(!df(he,["string","array"]))throw new Xl("Expected second argument to be of type array or string, but found "+Ql(uu(he))+" instead.");if(this.fromIndex){var ke=this.fromIndex.evaluate(I);return he.indexOf($,ke)}return he.indexOf($)},Rc.prototype.eachChild=function(I){I(this.needle),I(this.haystack),this.fromIndex&&I(this.fromIndex)},Rc.prototype.outputDefined=function(){return!1},Rc.prototype.serialize=function(){if(this.fromIndex!=null&&this.fromIndex!==void 0){var I=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),I]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var Su=function(I,$,he,ke,qe,et){this.inputType=I,this.type=$,this.input=he,this.cases=ke,this.outputs=qe,this.otherwise=et};Su.parse=function(I,$){if(I.length<5)return $.error("Expected at least 4 arguments, but found only "+(I.length-1)+".");if(I.length%2!==1)return $.error("Expected an even number of arguments.");var he,ke;$.expectedType&&$.expectedType.kind!=="value"&&(ke=$.expectedType);for(var qe={},et=[],Mt=2;Mt<I.length-1;Mt+=2){var Jt=I[Mt],pr=I[Mt+1];Array.isArray(Jt)||(Jt=[Jt]);var Ar=$.concat(Mt);if(Jt.length===0)return Ar.error("Expected at least one branch label.");for(var $r=0,gn=Jt;$r<gn.length;$r+=1){var hn=gn[$r];if(typeof hn!="number"&&typeof hn!="string")return Ar.error("Branch labels must be numbers or strings.");if(typeof hn=="number"&&Math.abs(hn)>Number.MAX_SAFE_INTEGER)return Ar.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof hn=="number"&&Math.floor(hn)!==hn)return Ar.error("Numeric branch labels must be integer values.");if(!he)he=uu(hn);else if(Ar.checkSubtype(he,uu(hn)))return null;if(typeof qe[String(hn)]<"u")return Ar.error("Branch labels must be unique.");qe[String(hn)]=et.length}var zn=$.parse(pr,Mt,ke);if(!zn)return null;ke=ke||zn.type,et.push(zn)}var _a=$.parse(I[1],1,Zo);if(!_a)return null;var ui=$.parse(I[I.length-1],I.length-1,ke);return!ui||_a.type.kind!=="value"&&$.concat(1).checkSubtype(he,_a.type)?null:new Su(he,ke,_a,qe,et,ui)},Su.prototype.evaluate=function(I){var $=this.input.evaluate(I),he=uu($)===this.inputType&&this.outputs[this.cases[$]]||this.otherwise;return he.evaluate(I)},Su.prototype.eachChild=function(I){I(this.input),this.outputs.forEach(I),I(this.otherwise)},Su.prototype.outputDefined=function(){return this.outputs.every(function(I){return I.outputDefined()})&&this.otherwise.outputDefined()},Su.prototype.serialize=function(){for(var I=this,$=["match",this.input.serialize()],he=Object.keys(this.cases).sort(),ke=[],qe={},et=0,Mt=he;et<Mt.length;et+=1){var Jt=Mt[et],pr=qe[this.cases[Jt]];pr===void 0?(qe[this.cases[Jt]]=ke.length,ke.push([this.cases[Jt],[Jt]])):ke[pr][1].push(Jt)}for(var Ar=function(_a){return I.inputType.kind==="number"?Number(_a):_a},$r=0,gn=ke;$r<gn.length;$r+=1){var hn=gn[$r],pr=hn[0],zn=hn[1];zn.length===1?$.push(Ar(zn[0])):$.push(zn.map(Ar)),$.push(this.outputs[outputIndex$1].serialize())}return $.push(this.otherwise.serialize()),$};var rh=function(I,$,he){this.type=I,this.branches=$,this.otherwise=he};rh.parse=function(I,$){if(I.length<4)return $.error("Expected at least 3 arguments, but found only "+(I.length-1)+".");if(I.length%2!==0)return $.error("Expected an odd number of arguments.");var he;$.expectedType&&$.expectedType.kind!=="value"&&(he=$.expectedType);for(var ke=[],qe=1;qe<I.length-1;qe+=2){var et=$.parse(I[qe],qe,ms);if(!et)return null;var Mt=$.parse(I[qe+1],qe+1,he);if(!Mt)return null;ke.push([et,Mt]),he=he||Mt.type}var Jt=$.parse(I[I.length-1],I.length-1,he);return Jt?new rh(he,ke,Jt):null},rh.prototype.evaluate=function(I){for(var $=0,he=this.branches;$<he.length;$+=1){var ke=he[$],qe=ke[0],et=ke[1];if(qe.evaluate(I))return et.evaluate(I)}return this.otherwise.evaluate(I)},rh.prototype.eachChild=function(I){for(var $=0,he=this.branches;$<he.length;$+=1){var ke=he[$],qe=ke[0],et=ke[1];I(qe),I(et)}I(this.otherwise)},rh.prototype.outputDefined=function(){return this.branches.every(function(I){I[0];var $=I[1];return $.outputDefined()})&&this.otherwise.outputDefined()},rh.prototype.serialize=function(){var I=["case"];return this.eachChild(function($){I.push($.serialize())}),I};var Cf=function(I,$,he,ke){this.type=I,this.input=$,this.beginIndex=he,this.endIndex=ke};Cf.parse=function(I,$){if(I.length<=2||I.length>=5)return $.error("Expected 3 or 4 arguments, but found "+(I.length-1)+" instead.");var he=$.parse(I[1],1,Zo),ke=$.parse(I[2],2,_o);if(!he||!ke)return null;if(!rf(he.type,[$l(Zo),Ps,Zo]))return $.error("Expected first argument to be of type array or string, but found "+Ql(he.type)+" instead");if(I.length===4){var qe=$.parse(I[3],3,_o);return qe?new Cf(he.type,he,ke,qe):null}else return new Cf(he.type,he,ke)},Cf.prototype.evaluate=function(I){var $=this.input.evaluate(I),he=this.beginIndex.evaluate(I);if(!df($,["string","array"]))throw new Xl("Expected first argument to be of type array or string, but found "+Ql(uu($))+" instead.");if(this.endIndex){var ke=this.endIndex.evaluate(I);return $.slice(he,ke)}return $.slice(he)},Cf.prototype.eachChild=function(I){I(this.input),I(this.beginIndex),this.endIndex&&I(this.endIndex)},Cf.prototype.outputDefined=function(){return!1},Cf.prototype.serialize=function(){if(this.endIndex!=null&&this.endIndex!==void 0){var I=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),I]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};function rd(R,I){return R==="=="||R==="!="?I.kind==="boolean"||I.kind==="string"||I.kind==="number"||I.kind==="null"||I.kind==="value":I.kind==="string"||I.kind==="number"||I.kind==="value"}function wr(R,I,$){return I===$}function Gr(R,I,$){return I!==$}function kn(R,I,$){return I<$}function _n(R,I,$){return I>$}function ta(R,I,$){return I<=$}function Ga(R,I,$){return I>=$}function ja(R,I,$,he){return he.compare(I,$)===0}function Ai(R,I,$,he){return!ja(R,I,$,he)}function Ii(R,I,$,he){return he.compare(I,$)<0}function oo(R,I,$,he){return he.compare(I,$)>0}function hi(R,I,$,he){return he.compare(I,$)<=0}function Gi(R,I,$,he){return he.compare(I,$)>=0}function wi(R,I,$){var he=R!=="=="&&R!=="!=";return(function(){function ke(qe,et,Mt){this.type=ms,this.lhs=qe,this.rhs=et,this.collator=Mt,this.hasUntypedArgument=qe.type.kind==="value"||et.type.kind==="value"}return ke.parse=function(et,Mt){if(et.length!==3&&et.length!==4)return Mt.error("Expected two or three arguments.");var Jt=et[0],pr=Mt.parse(et[1],1,Zo);if(!pr)return null;if(!rd(Jt,pr.type))return Mt.concat(1).error('"'+Jt+`" comparisons are not supported for type '`+Ql(pr.type)+"'.");var Ar=Mt.parse(et[2],2,Zo);if(!Ar)return null;if(!rd(Jt,Ar.type))return Mt.concat(2).error('"'+Jt+`" comparisons are not supported for type '`+Ql(Ar.type)+"'.");if(pr.type.kind!==Ar.type.kind&&pr.type.kind!=="value"&&Ar.type.kind!=="value")return Mt.error("Cannot compare types '"+Ql(pr.type)+"' and '"+Ql(Ar.type)+"'.");he&&(pr.type.kind==="value"&&Ar.type.kind!=="value"?pr=new Lc(Ar.type,[pr]):pr.type.kind!=="value"&&Ar.type.kind==="value"&&(Ar=new Lc(pr.type,[Ar])));var $r=null;if(et.length===4){if(pr.type.kind!=="string"&&Ar.type.kind!=="string"&&pr.type.kind!=="value"&&Ar.type.kind!=="value")return Mt.error("Cannot use collator to compare non-string types.");if($r=Mt.parse(et[3],3,Au),!$r)return null}return new ke(pr,Ar,$r)},ke.prototype.evaluate=function(et){var Mt=this.lhs.evaluate(et),Jt=this.rhs.evaluate(et);if(he&&this.hasUntypedArgument){var pr=uu(Mt),Ar=uu(Jt);if(pr.kind!==Ar.kind||!(pr.kind==="string"||pr.kind==="number"))throw new Xl('Expected arguments for "'+R+'" to be (string, string) or (number, number), but found ('+pr.kind+", "+Ar.kind+") instead.")}if(this.collator&&!he&&this.hasUntypedArgument){var $r=uu(Mt),gn=uu(Jt);if($r.kind!=="string"||gn.kind!=="string")return I(et,Mt,Jt)}return this.collator?$(et,Mt,Jt,this.collator.evaluate(et)):I(et,Mt,Jt)},ke.prototype.eachChild=function(et){et(this.lhs),et(this.rhs),this.collator&&et(this.collator)},ke.prototype.outputDefined=function(){return!0},ke.prototype.serialize=function(){var et=[R];return this.eachChild(function(Mt){et.push(Mt.serialize())}),et},ke})()}var si=wi("==",wr,ja),vo=wi("!=",Gr,Ai),es=wi("<",kn,Ii),$o=wi(">",_n,oo),is=wi("<=",ta,hi),rs=wi(">=",Ga,Gi),mo=function(I,$,he,ke,qe){this.type=Ps,this.number=I,this.locale=$,this.currency=he,this.minFractionDigits=ke,this.maxFractionDigits=qe};mo.parse=function(I,$){if(I.length!==3)return $.error("Expected two arguments.");var he=$.parse(I[1],1,_o);if(!he)return null;var ke=I[2];if(typeof ke!="object"||Array.isArray(ke))return $.error("NumberFormat options argument must be an object.");var qe=null;if(ke.locale&&(qe=$.parse(ke.locale,1,Ps),!qe))return null;var et=null;if(ke.currency&&(et=$.parse(ke.currency,1,Ps),!et))return null;var Mt=null;if(ke["min-fraction-digits"]&&(Mt=$.parse(ke["min-fraction-digits"],1,_o),!Mt))return null;var Jt=null;return ke["max-fraction-digits"]&&(Jt=$.parse(ke["max-fraction-digits"],1,_o),!Jt)?null:new mo(he,qe,et,Mt,Jt)},mo.prototype.evaluate=function(I){return new Intl.NumberFormat(this.locale?this.locale.evaluate(I):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(I):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(I):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(I):void 0}).format(this.number.evaluate(I))},mo.prototype.eachChild=function(I){I(this.number),this.locale&&I(this.locale),this.currency&&I(this.currency),this.minFractionDigits&&I(this.minFractionDigits),this.maxFractionDigits&&I(this.maxFractionDigits)},mo.prototype.outputDefined=function(){return!1},mo.prototype.serialize=function(){var I={};return this.locale&&(I.locale=this.locale.serialize()),this.currency&&(I.currency=this.currency.serialize()),this.minFractionDigits&&(I["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(I["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),I]};var Ji=function(I){this.type=_o,this.input=I};Ji.parse=function(I,$){if(I.length!==2)return $.error("Expected 1 argument, but found "+(I.length-1)+" instead.");var he=$.parse(I[1],1);return he?he.type.kind!=="array"&&he.type.kind!=="string"&&he.type.kind!=="value"?$.error("Expected argument of type string or array, but found "+Ql(he.type)+" instead."):new Ji(he):null},Ji.prototype.evaluate=function(I){var $=this.input.evaluate(I);if(typeof $=="string")return $.length;if(Array.isArray($))return $.length;throw new Xl("Expected value to be of type string or array, but found "+Ql(uu($))+" instead.")},Ji.prototype.eachChild=function(I){I(this.input)},Ji.prototype.outputDefined=function(){return!1},Ji.prototype.serialize=function(){var I=["length"];return this.eachChild(function($){I.push($.serialize())}),I};var gs={"==":si,"!=":vo,">":$o,"<":es,">=":rs,"<=":is,array:Lc,at:Mf,boolean:Lc,case:rh,coalesce:of,collator:pf,format:$f,image:xu,in:Du,"index-of":Rc,interpolate:xc,"interpolate-hcl":xc,"interpolate-lab":xc,length:Ji,let:Bf,literal:el,match:Su,number:Lc,"number-format":mo,object:Lc,slice:Cf,step:Xc,string:Lc,"to-boolean":Zs,"to-color":Zs,"to-number":Zs,"to-string":Zs,var:Qf,within:Hc};function $s(R,I){var $=I[0],he=I[1],ke=I[2],qe=I[3];$=$.evaluate(R),he=he.evaluate(R),ke=ke.evaluate(R);var et=qe?qe.evaluate(R):1,Mt=mc($,he,ke,et);if(Mt)throw new Xl(Mt);return new zl($/255*et,he/255*et,ke/255*et,et)}function Nl(R,I){return R in I}function au(R,I){var $=I[R];return typeof $>"u"?null:$}function Bl(R,I,$,he){for(;$<=he;){var ke=$+he>>1;if(I[ke]===R)return!0;I[ke]>R?he=ke-1:$=ke+1}return!1}function iu(R){return{type:R}}Ko.register(gs,{error:[_u,[Ps],function(R,I){var $=I[0];throw new Xl($.evaluate(R))}],typeof:[Ps,[Zo],function(R,I){var $=I[0];return Ql(uu($.evaluate(R)))}],"to-rgba":[$l(_o,4),[ru],function(R,I){var $=I[0];return $.evaluate(R).toArray()}],rgb:[ru,[_o,_o,_o],$s],rgba:[ru,[_o,_o,_o,_o],$s],has:{type:ms,overloads:[[[Ps],function(R,I){var $=I[0];return Nl($.evaluate(R),R.properties())}],[[Ps,nu],function(R,I){var $=I[0],he=I[1];return Nl($.evaluate(R),he.evaluate(R))}]]},get:{type:Zo,overloads:[[[Ps],function(R,I){var $=I[0];return au($.evaluate(R),R.properties())}],[[Ps,nu],function(R,I){var $=I[0],he=I[1];return au($.evaluate(R),he.evaluate(R))}]]},"feature-state":[Zo,[Ps],function(R,I){var $=I[0];return au($.evaluate(R),R.featureState||{})}],properties:[nu,[],function(R){return R.properties()}],"geometry-type":[Ps,[],function(R){return R.geometryType()}],id:[Zo,[],function(R){return R.id()}],zoom:[_o,[],function(R){return R.globals.zoom}],"heatmap-density":[_o,[],function(R){return R.globals.heatmapDensity||0}],"line-progress":[_o,[],function(R){return R.globals.lineProgress||0}],accumulated:[Zo,[],function(R){return R.globals.accumulated===void 0?null:R.globals.accumulated}],"+":[_o,iu(_o),function(R,I){for(var $=0,he=0,ke=I;he<ke.length;he+=1){var qe=ke[he];$+=qe.evaluate(R)}return $}],"*":[_o,iu(_o),function(R,I){for(var $=1,he=0,ke=I;he<ke.length;he+=1){var qe=ke[he];$*=qe.evaluate(R)}return $}],"-":{type:_o,overloads:[[[_o,_o],function(R,I){var $=I[0],he=I[1];return $.evaluate(R)-he.evaluate(R)}],[[_o],function(R,I){var $=I[0];return-$.evaluate(R)}]]},"/":[_o,[_o,_o],function(R,I){var $=I[0],he=I[1];return $.evaluate(R)/he.evaluate(R)}],"%":[_o,[_o,_o],function(R,I){var $=I[0],he=I[1];return $.evaluate(R)%he.evaluate(R)}],ln2:[_o,[],function(){return Math.LN2}],pi:[_o,[],function(){return Math.PI}],e:[_o,[],function(){return Math.E}],"^":[_o,[_o,_o],function(R,I){var $=I[0],he=I[1];return Math.pow($.evaluate(R),he.evaluate(R))}],sqrt:[_o,[_o],function(R,I){var $=I[0];return Math.sqrt($.evaluate(R))}],log10:[_o,[_o],function(R,I){var $=I[0];return Math.log($.evaluate(R))/Math.LN10}],ln:[_o,[_o],function(R,I){var $=I[0];return Math.log($.evaluate(R))}],log2:[_o,[_o],function(R,I){var $=I[0];return Math.log($.evaluate(R))/Math.LN2}],sin:[_o,[_o],function(R,I){var $=I[0];return Math.sin($.evaluate(R))}],cos:[_o,[_o],function(R,I){var $=I[0];return Math.cos($.evaluate(R))}],tan:[_o,[_o],function(R,I){var $=I[0];return Math.tan($.evaluate(R))}],asin:[_o,[_o],function(R,I){var $=I[0];return Math.asin($.evaluate(R))}],acos:[_o,[_o],function(R,I){var $=I[0];return Math.acos($.evaluate(R))}],atan:[_o,[_o],function(R,I){var $=I[0];return Math.atan($.evaluate(R))}],min:[_o,iu(_o),function(R,I){return Math.min.apply(Math,I.map(function($){return $.evaluate(R)}))}],max:[_o,iu(_o),function(R,I){return Math.max.apply(Math,I.map(function($){return $.evaluate(R)}))}],abs:[_o,[_o],function(R,I){var $=I[0];return Math.abs($.evaluate(R))}],round:[_o,[_o],function(R,I){var $=I[0],he=$.evaluate(R);return he<0?-Math.round(-he):Math.round(he)}],floor:[_o,[_o],function(R,I){var $=I[0];return Math.floor($.evaluate(R))}],ceil:[_o,[_o],function(R,I){var $=I[0];return Math.ceil($.evaluate(R))}],"filter-==":[ms,[Ps,Zo],function(R,I){var $=I[0],he=I[1];return R.properties()[$.value]===he.value}],"filter-id-==":[ms,[Zo],function(R,I){var $=I[0];return R.id()===$.value}],"filter-type-==":[ms,[Ps],function(R,I){var $=I[0];return R.geometryType()===$.value}],"filter-<":[ms,[Ps,Zo],function(R,I){var $=I[0],he=I[1],ke=R.properties()[$.value],qe=he.value;return typeof ke==typeof qe&&ke<qe}],"filter-id-<":[ms,[Zo],function(R,I){var $=I[0],he=R.id(),ke=$.value;return typeof he==typeof ke&&he<ke}],"filter->":[ms,[Ps,Zo],function(R,I){var $=I[0],he=I[1],ke=R.properties()[$.value],qe=he.value;return typeof ke==typeof qe&&ke>qe}],"filter-id->":[ms,[Zo],function(R,I){var $=I[0],he=R.id(),ke=$.value;return typeof he==typeof ke&&he>ke}],"filter-<=":[ms,[Ps,Zo],function(R,I){var $=I[0],he=I[1],ke=R.properties()[$.value],qe=he.value;return typeof ke==typeof qe&&ke<=qe}],"filter-id-<=":[ms,[Zo],function(R,I){var $=I[0],he=R.id(),ke=$.value;return typeof he==typeof ke&&he<=ke}],"filter->=":[ms,[Ps,Zo],function(R,I){var $=I[0],he=I[1],ke=R.properties()[$.value],qe=he.value;return typeof ke==typeof qe&&ke>=qe}],"filter-id->=":[ms,[Zo],function(R,I){var $=I[0],he=R.id(),ke=$.value;return typeof he==typeof ke&&he>=ke}],"filter-has":[ms,[Zo],function(R,I){var $=I[0];return $.value in R.properties()}],"filter-has-id":[ms,[],function(R){return R.id()!==null&&R.id()!==void 0}],"filter-type-in":[ms,[$l(Ps)],function(R,I){var $=I[0];return $.value.indexOf(R.geometryType())>=0}],"filter-id-in":[ms,[$l(Zo)],function(R,I){var $=I[0];return $.value.indexOf(R.id())>=0}],"filter-in-small":[ms,[Ps,$l(Zo)],function(R,I){var $=I[0],he=I[1];return he.value.indexOf(R.properties()[$.value])>=0}],"filter-in-large":[ms,[Ps,$l(Zo)],function(R,I){var $=I[0],he=I[1];return Bl(R.properties()[$.value],he.value,0,he.value.length-1)}],all:{type:ms,overloads:[[[ms,ms],function(R,I){var $=I[0],he=I[1];return $.evaluate(R)&&he.evaluate(R)}],[iu(ms),function(R,I){for(var $=0,he=I;$<he.length;$+=1){var ke=he[$];if(!ke.evaluate(R))return!1}return!0}]]},any:{type:ms,overloads:[[[ms,ms],function(R,I){var $=I[0],he=I[1];return $.evaluate(R)||he.evaluate(R)}],[iu(ms),function(R,I){for(var $=0,he=I;$<he.length;$+=1){var ke=he[$];if(ke.evaluate(R))return!0}return!1}]]},"!":[ms,[ms],function(R,I){var $=I[0];return!$.evaluate(R)}],"is-supported-script":[ms,[Ps],function(R,I){var $=I[0],he=R.globals&&R.globals.isSupportedScript;return he?he($.evaluate(R)):!0}],upcase:[Ps,[Ps],function(R,I){var $=I[0];return $.evaluate(R).toUpperCase()}],downcase:[Ps,[Ps],function(R,I){var $=I[0];return $.evaluate(R).toLowerCase()}],concat:[Ps,iu(Zo),function(R,I){return I.map(function($){return oc($.evaluate(R))}).join("")}],"resolved-locale":[Ps,[Au],function(R,I){var $=I[0];return $.evaluate(R).resolvedLocale()}]});function hl(R){return{result:"success",value:R}}function Bu(R){return{result:"error",value:R}}function Ou(R){return R["property-type"]==="data-driven"||R["property-type"]==="cross-faded-data-driven"}function eu(R){return!!R.expression&&R.expression.parameters.indexOf("zoom")>-1}function No(R){return!!R.expression&&R.expression.interpolated}function Ls(R){return R instanceof Number?"number":R instanceof String?"string":R instanceof Boolean?"boolean":Array.isArray(R)?"array":R===null?"null":typeof R}function Wl(R){return typeof R=="object"&&R!==null&&!Array.isArray(R)}function Cl(R){return R}function Ec(R,I){var $=I.type==="color",he=R.stops&&typeof R.stops[0][0]=="object",ke=he||R.property!==void 0,qe=he||!ke,et=R.type||(No(I)?"exponential":"interval");if($&&(R=Gs({},R),R.stops&&(R.stops=R.stops.map(function(zo){return[zo[0],zl.parse(zo[1])]})),R.default?R.default=zl.parse(R.default):R.default=zl.parse(I.default)),R.colorSpace&&R.colorSpace!=="rgb"&&!$d[R.colorSpace])throw new Error("Unknown color space: "+R.colorSpace);var Mt,Jt,pr;if(et==="exponential")Mt=Cc;else if(et==="interval")Mt=uh;else if(et==="categorical"){Mt=Ic,Jt=Object.create(null);for(var Ar=0,$r=R.stops;Ar<$r.length;Ar+=1){var gn=$r[Ar];Jt[gn[0]]=gn[1]}pr=typeof R.stops[0][0]}else if(et==="identity")Mt=jf;else throw new Error('Unknown function type "'+et+'"');if(he){for(var hn={},zn=[],_a=0;_a<R.stops.length;_a++){var ui=R.stops[_a],Ua=ui[0].zoom;hn[Ua]===void 0&&(hn[Ua]={zoom:Ua,type:R.type,property:R.property,default:R.default,stops:[]},zn.push(Ua)),hn[Ua].stops.push([ui[0].value,ui[1]])}for(var ji=[],bi=0,Fi=zn;bi<Fi.length;bi+=1){var Zi=Fi[bi];ji.push([hn[Zi].zoom,Ec(hn[Zi],I)])}var yo={name:"linear"};return{kind:"composite",interpolationType:yo,interpolationFactor:xc.interpolationFactor.bind(void 0,yo),zoomStops:ji.map(function(zo){return zo[0]}),evaluate:function(ws,Qo){var fs=ws.zoom;return Cc({stops:ji,base:R.base},I,fs).evaluate(fs,Qo)}}}else if(qe){var Bo=et==="exponential"?{name:"exponential",base:R.base!==void 0?R.base:1}:null;return{kind:"camera",interpolationType:Bo,interpolationFactor:xc.interpolationFactor.bind(void 0,Bo),zoomStops:R.stops.map(function(zo){return zo[0]}),evaluate:function(zo){var ws=zo.zoom;return Mt(R,I,ws,Jt,pr)}}}else return{kind:"source",evaluate:function(ws,Qo){var fs=Qo&&Qo.properties?Qo.properties[R.property]:void 0;return fs===void 0?Mc(R.default,I.default):Mt(R,I,fs,Jt,pr)}}}function Mc(R,I,$){if(R!==void 0)return R;if(I!==void 0)return I;if($!==void 0)return $}function Ic(R,I,$,he,ke){var qe=typeof $===ke?he[$]:void 0;return Mc(qe,R.default,I.default)}function uh(R,I,$){if(Ls($)!=="number")return Mc(R.default,I.default);var he=R.stops.length;if(he===1||$<=R.stops[0][0])return R.stops[0][1];if($>=R.stops[he-1][0])return R.stops[he-1][1];var ke=Sc(R.stops.map(function(qe){return qe[0]}),$);return R.stops[ke][1]}function Cc(R,I,$){var he=R.base!==void 0?R.base:1;if(Ls($)!=="number")return Mc(R.default,I.default);var ke=R.stops.length;if(ke===1||$<=R.stops[0][0])return R.stops[0][1];if($>=R.stops[ke-1][0])return R.stops[ke-1][1];var qe=Sc(R.stops.map(function($r){return $r[0]}),$),et=ju($,he,R.stops[qe][0],R.stops[qe+1][0]),Mt=R.stops[qe][1],Jt=R.stops[qe+1][1],pr=eh[I.type]||Cl;if(R.colorSpace&&R.colorSpace!=="rgb"){var Ar=$d[R.colorSpace];pr=function($r,gn){return Ar.reverse(Ar.interpolate(Ar.forward($r),Ar.forward(gn),et))}}return typeof Mt.evaluate=="function"?{evaluate:function(){for(var gn=[],hn=arguments.length;hn--;)gn[hn]=arguments[hn];var zn=Mt.evaluate.apply(void 0,gn),_a=Jt.evaluate.apply(void 0,gn);if(!(zn===void 0||_a===void 0))return pr(zn,_a,et)}}:pr(Mt,Jt,et)}function jf(R,I,$){return I.type==="color"?$=zl.parse($):I.type==="formatted"?$=pc.fromString($.toString()):I.type==="resolvedImage"?$=ic.fromString($.toString()):Ls($)!==I.type&&(I.type!=="enum"||!I.values[$])&&($=void 0),Mc($,R.default,I.default)}function ju(R,I,$,he){var ke=he-$,qe=R-$;return ke===0?0:I===1?qe/ke:(Math.pow(I,qe)-1)/(Math.pow(I,ke)-1)}var Uf=function(I,$){this.expression=I,this._warningHistory={},this._evaluator=new Ml,this._defaultValue=$?Oe($):null,this._enumValues=$&&$.type==="enum"?$.values:null};Uf.prototype.evaluateWithoutErrorHandling=function(I,$,he,ke,qe,et){return this._evaluator.globals=I,this._evaluator.feature=$,this._evaluator.featureState=he,this._evaluator.canonical=ke,this._evaluator.availableImages=qe||null,this._evaluator.formattedSection=et,this.expression.evaluate(this._evaluator)},Uf.prototype.evaluate=function(I,$,he,ke,qe,et){this._evaluator.globals=I,this._evaluator.feature=$||null,this._evaluator.featureState=he||null,this._evaluator.canonical=ke,this._evaluator.availableImages=qe||null,this._evaluator.formattedSection=et||null;try{var Mt=this.expression.evaluate(this._evaluator);if(Mt==null||typeof Mt=="number"&&Mt!==Mt)return this._defaultValue;if(this._enumValues&&!(Mt in this._enumValues))throw new Xl("Expected value to be one of "+Object.keys(this._enumValues).map(function(Jt){return JSON.stringify(Jt)}).join(", ")+", but found "+JSON.stringify(Mt)+" instead.");return Mt}catch(Jt){return this._warningHistory[Jt.message]||(this._warningHistory[Jt.message]=!0,typeof console<"u"&&console.warn(Jt.message)),this._defaultValue}};function os(R){return Array.isArray(R)&&R.length>0&&typeof R[0]=="string"&&R[0]in gs}function _s(R,I){var $=new cu(gs,[],I?Re(I):void 0),he=$.parse(R,void 0,void 0,void 0,I&&I.type==="string"?{typeAnnotation:"coerce"}:void 0);return he?hl(new Uf(he,I)):Bu($.errors)}var qf=function(I,$){this.kind=I,this._styleExpression=$,this.isStateDependent=I!=="constant"&&!Pu($.expression)};qf.prototype.evaluateWithoutErrorHandling=function(I,$,he,ke,qe,et){return this._styleExpression.evaluateWithoutErrorHandling(I,$,he,ke,qe,et)},qf.prototype.evaluate=function(I,$,he,ke,qe,et){return this._styleExpression.evaluate(I,$,he,ke,qe,et)};var sf=function(I,$,he,ke){this.kind=I,this.zoomStops=he,this._styleExpression=$,this.isStateDependent=I!=="camera"&&!Pu($.expression),this.interpolationType=ke};sf.prototype.evaluateWithoutErrorHandling=function(I,$,he,ke,qe,et){return this._styleExpression.evaluateWithoutErrorHandling(I,$,he,ke,qe,et)},sf.prototype.evaluate=function(I,$,he,ke,qe,et){return this._styleExpression.evaluate(I,$,he,ke,qe,et)},sf.prototype.interpolationFactor=function(I,$,he){return this.interpolationType?xc.interpolationFactor(this.interpolationType,I,$,he):0};function Yc(R,I){if(R=_s(R,I),R.result==="error")return R;var $=R.value.expression,he=fd($);if(!he&&!Ou(I))return Bu([new al("","data expressions not supported")]);var ke=Gc($,["zoom"]);if(!ke&&!eu(I))return Bu([new al("","zoom expressions not supported")]);var qe=fe($);if(!qe&&!ke)return Bu([new al("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(qe instanceof al)return Bu([qe]);if(qe instanceof xc&&!No(I))return Bu([new al("",'"interpolate" expressions cannot be used with this property')]);if(!qe)return hl(he?new qf("constant",R.value):new qf("source",R.value));var et=qe instanceof xc?qe.interpolation:void 0;return hl(he?new sf("camera",R.value,qe.labels,et):new sf("composite",R.value,qe.labels,et))}var Ze=function(I,$){this._parameters=I,this._specification=$,Gs(this,Ec(this._parameters,this._specification))};Ze.deserialize=function(I){return new Ze(I._parameters,I._specification)},Ze.serialize=function(I){return{_parameters:I._parameters,_specification:I._specification}};function O(R,I){if(Wl(R))return new Ze(R,I);if(os(R)){var $=Yc(R,I);if($.result==="error")throw new Error($.value.map(function(ke){return ke.key+": "+ke.message}).join(", "));return $.value}else{var he=R;return typeof R=="string"&&I.type==="color"&&(he=zl.parse(R)),{kind:"constant",evaluate:function(){return he}}}}function fe(R){var I=null;if(R instanceof Bf)I=fe(R.result);else if(R instanceof of)for(var $=0,he=R.args;$<he.length;$+=1){var ke=he[$];if(I=fe(ke),I)break}else(R instanceof Xc||R instanceof xc)&&R.input instanceof Ko&&R.input.name==="zoom"&&(I=R);return I instanceof al||R.eachChild(function(qe){var et=fe(qe);et instanceof al?I=et:!I&&et?I=new al("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):I&&et&&I!==et&&(I=new al("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),I}function Re(R){var I={color:ru,string:Ps,number:_o,enum:Ps,boolean:ms,formatted:Ys,resolvedImage:Ol};return R.type==="array"?$l(I[R.value]||Zo,R.length):I[R.type]}function Oe(R){return R.type==="color"&&Wl(R.default)?new zl(0,0,0,0):R.type==="color"?zl.parse(R.default)||null:R.default===void 0?null:R.default}function We(R){var I=R.key,$=R.value,he=R.valueSpec||{},ke=R.objectElementValidators||{},qe=R.style,et=R.styleSpec,Mt=[],Jt=Ls($);if(Jt!=="object")return[new wo(I,$,"object expected, "+Jt+" found")];for(var pr in $){var Ar=pr.split(".")[0],$r=he[Ar]||he["*"],gn=void 0;if(ke[Ar])gn=ke[Ar];else if(he[Ar])gn=ll;else if(ke["*"])gn=ke["*"];else if(he["*"])gn=ll;else{Mt.push(new wo(I,$[pr],'unknown property "'+pr+'"'));continue}Mt=Mt.concat(gn({key:(I&&I+".")+pr,value:$[pr],valueSpec:$r,style:qe,styleSpec:et,object:$,objectKey:pr},$))}for(var hn in he)ke[hn]||he[hn].required&&he[hn].default===void 0&&$[hn]===void 0&&Mt.push(new wo(I,$,'missing required property "'+hn+'"'));return Mt}function Ct(R){var I=R.value,$=R.valueSpec,he=R.style,ke=R.styleSpec,qe=R.key,et=R.arrayElementValidator||ll;if(Ls(I)!=="array")return[new wo(qe,I,"array expected, "+Ls(I)+" found")];if($.length&&I.length!==$.length)return[new wo(qe,I,"array length "+$.length+" expected, length "+I.length+" found")];if($["min-length"]&&I.length<$["min-length"])return[new wo(qe,I,"array length at least "+$["min-length"]+" expected, length "+I.length+" found")];var Mt={type:$.value,values:$.values};ke.$version<7&&(Mt.function=$.function),Ls($.value)==="object"&&(Mt=$.value);for(var Jt=[],pr=0;pr<I.length;pr++)Jt=Jt.concat(et({array:I,arrayIndex:pr,value:I[pr],valueSpec:Mt,style:he,styleSpec:ke,key:qe+"["+pr+"]"}));return Jt}function Nt(R){var I=R.key,$=R.value,he=R.valueSpec,ke=Ls($);return ke==="number"&&$!==$&&(ke="NaN"),ke!=="number"?[new wo(I,$,"number expected, "+ke+" found")]:"minimum"in he&&$<he.minimum?[new wo(I,$,$+" is less than the minimum value "+he.minimum)]:"maximum"in he&&$>he.maximum?[new wo(I,$,$+" is greater than the maximum value "+he.maximum)]:[]}function rr(R){var I=R.valueSpec,$=Jo(R.value.type),he,ke={},qe,et,Mt=$!=="categorical"&&R.value.property===void 0,Jt=!Mt,pr=Ls(R.value.stops)==="array"&&Ls(R.value.stops[0])==="array"&&Ls(R.value.stops[0][0])==="object",Ar=We({key:R.key,value:R.value,valueSpec:R.styleSpec.function,style:R.style,styleSpec:R.styleSpec,objectElementValidators:{stops:$r,default:zn}});return $==="identity"&&Mt&&Ar.push(new wo(R.key,R.value,'missing required property "property"')),$!=="identity"&&!R.value.stops&&Ar.push(new wo(R.key,R.value,'missing required property "stops"')),$==="exponential"&&R.valueSpec.expression&&!No(R.valueSpec)&&Ar.push(new wo(R.key,R.value,"exponential functions not supported")),R.styleSpec.$version>=8&&(Jt&&!Ou(R.valueSpec)?Ar.push(new wo(R.key,R.value,"property functions not supported")):Mt&&!eu(R.valueSpec)&&Ar.push(new wo(R.key,R.value,"zoom functions not supported"))),($==="categorical"||pr)&&R.value.property===void 0&&Ar.push(new wo(R.key,R.value,'"property" property is required')),Ar;function $r(_a){if($==="identity")return[new wo(_a.key,_a.value,'identity function may not have a "stops" property')];var ui=[],Ua=_a.value;return ui=ui.concat(Ct({key:_a.key,value:Ua,valueSpec:_a.valueSpec,style:_a.style,styleSpec:_a.styleSpec,arrayElementValidator:gn})),Ls(Ua)==="array"&&Ua.length===0&&ui.push(new wo(_a.key,Ua,"array must have at least one stop")),ui}function gn(_a){var ui=[],Ua=_a.value,ji=_a.key;if(Ls(Ua)!=="array")return[new wo(ji,Ua,"array expected, "+Ls(Ua)+" found")];if(Ua.length!==2)return[new wo(ji,Ua,"array length 2 expected, length "+Ua.length+" found")];if(pr){if(Ls(Ua[0])!=="object")return[new wo(ji,Ua,"object expected, "+Ls(Ua[0])+" found")];if(Ua[0].zoom===void 0)return[new wo(ji,Ua,"object stop key must have zoom")];if(Ua[0].value===void 0)return[new wo(ji,Ua,"object stop key must have value")];if(et&&et>Jo(Ua[0].zoom))return[new wo(ji,Ua[0].zoom,"stop zoom values must appear in ascending order")];Jo(Ua[0].zoom)!==et&&(et=Jo(Ua[0].zoom),qe=void 0,ke={}),ui=ui.concat(We({key:ji+"[0]",value:Ua[0],valueSpec:{zoom:{}},style:_a.style,styleSpec:_a.styleSpec,objectElementValidators:{zoom:Nt,value:hn}}))}else ui=ui.concat(hn({key:ji+"[0]",value:Ua[0],style:_a.style,styleSpec:_a.styleSpec},Ua));return os(Gl(Ua[1]))?ui.concat([new wo(ji+"[1]",Ua[1],"expressions are not allowed in function stops.")]):ui.concat(ll({key:ji+"[1]",value:Ua[1],valueSpec:I,style:_a.style,styleSpec:_a.styleSpec}))}function hn(_a,ui){var Ua=Ls(_a.value),ji=Jo(_a.value),bi=_a.value!==null?_a.value:ui;if(!he)he=Ua;else if(Ua!==he)return[new wo(_a.key,bi,Ua+" stop domain type must match previous stop domain type "+he)];if(Ua!=="number"&&Ua!=="string"&&Ua!=="boolean")return[new wo(_a.key,bi,"stop domain value must be a number, string, or boolean")];if(Ua!=="number"&&$!=="categorical"){var Fi="number expected, "+Ua+" found";return Ou(I)&&$===void 0&&(Fi+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new wo(_a.key,bi,Fi)]}return $==="categorical"&&Ua==="number"&&(!isFinite(ji)||Math.floor(ji)!==ji)?[new wo(_a.key,bi,"integer expected, found "+ji)]:$!=="categorical"&&Ua==="number"&&qe!==void 0&&ji<qe?[new wo(_a.key,bi,"stop domain values must appear in ascending order")]:(qe=ji,$==="categorical"&&ji in ke?[new wo(_a.key,bi,"stop domain values must be unique")]:(ke[ji]=!0,[]))}function zn(_a){return ll({key:_a.key,value:_a.value,valueSpec:I,style:_a.style,styleSpec:_a.styleSpec})}}function Tr(R){var I=(R.expressionContext==="property"?Yc:_s)(Gl(R.value),R.valueSpec);if(I.result==="error")return I.value.map(function(he){return new wo(""+R.key+he.key,R.value,he.message)});var $=I.value.expression||I.value._styleExpression.expression;if(R.expressionContext==="property"&&R.propertyKey==="text-font"&&!$.outputDefined())return[new wo(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"&&!Pu($))return[new wo(R.key,R.value,'"feature-state" data expressions are not supported with layout properties.')];if(R.expressionContext==="filter"&&!Pu($))return[new wo(R.key,R.value,'"feature-state" data expressions are not supported with filters.')];if(R.expressionContext&&R.expressionContext.indexOf("cluster")===0){if(!Gc($,["zoom","feature-state"]))return[new wo(R.key,R.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(R.expressionContext==="cluster-initial"&&!fd($))return[new wo(R.key,R.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Fr(R){var I=R.value,$=R.key,he=Ls(I);return he!=="boolean"?[new wo($,I,"boolean expected, "+he+" found")]:[]}function Vr(R){var I=R.key,$=R.value,he=Ls($);return he!=="string"?[new wo(I,$,"color expected, "+he+" found")]:zh($)===null?[new wo(I,$,'color expected, "'+$+'" found')]:[]}function mn(R){var I=R.key,$=R.value,he=R.valueSpec,ke=[];return Array.isArray(he.values)?he.values.indexOf(Jo($))===-1&&ke.push(new wo(I,$,"expected one of ["+he.values.join(", ")+"], "+JSON.stringify($)+" found")):Object.keys(he.values).indexOf(Jo($))===-1&&ke.push(new wo(I,$,"expected one of ["+Object.keys(he.values).join(", ")+"], "+JSON.stringify($)+" found")),ke}function Dn(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 I=0,$=R.slice(1);I<$.length;I+=1){var he=$[I];if(!Dn(he)&&typeof he!="boolean")return!1}return!0;default:return!0}}var nt={type:"boolean",default:!1};function ct(R){if(R==null)return{filter:function(){return!0},needGeometry:!1};Dn(R)||(R=Gt(R));var I=_s(R,nt);if(I.result==="error")throw new Error(I.value.map(function(he){return he.key+": "+he.message}).join(", "));var $=Pt(R);return{filter:function(he,ke,qe){return I.value.evaluate(he,ke,{},qe)},needGeometry:$}}function Tt(R,I){return R<I?-1:R>I?1:0}function Pt(R){if(!Array.isArray(R))return!1;if(R[0]==="within")return!0;for(var I=1;I<R.length;I++)if(Pt(R[I]))return!0;return!1}function Gt(R){if(!R)return!0;var I=R[0];if(R.length<=1)return I!=="any";var $=I==="=="?zt(R[1],R[2],"=="):I==="!="?Hr(zt(R[1],R[2],"==")):I==="<"||I===">"||I==="<="||I===">="?zt(R[1],R[2],I):I==="any"?Kt(R.slice(1)):I==="all"?["all"].concat(R.slice(1).map(Gt)):I==="none"?["all"].concat(R.slice(1).map(Gt).map(Hr)):I==="in"?Cr(R[1],R.slice(2)):I==="!in"?Hr(Cr(R[1],R.slice(2))):I==="has"?Nr(R[1]):I==="!has"?Hr(Nr(R[1])):I==="within"?R:!0;return $}function zt(R,I,$){switch(R){case"$type":return["filter-type-"+$,I];case"$id":return["filter-id-"+$,I];default:return["filter-"+$,R,I]}}function Kt(R){return["any"].concat(R.map(Gt))}function Cr(R,I){if(I.length===0)return!1;switch(R){case"$type":return["filter-type-in",["literal",I]];case"$id":return["filter-id-in",["literal",I]];default:return I.length>200&&!I.some(function($){return typeof $!=typeof I[0]})?["filter-in-large",R,["literal",I.sort(Tt)]]:["filter-in-small",R,["literal",I]]}}function Nr(R){switch(R){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",R]}}function Hr(R){return["!",R]}function sn(R){return Dn(Gl(R.value))?Tr(Gs({},R,{expressionContext:"filter",valueSpec:{value:"boolean"}})):bn(R)}function bn(R){var I=R.value,$=R.key;if(Ls(I)!=="array")return[new wo($,I,"array expected, "+Ls(I)+" found")];var he=R.styleSpec,ke,qe=[];if(I.length<1)return[new wo($,I,"filter array must have at least 1 element")];switch(qe=qe.concat(mn({key:$+"[0]",value:I[0],valueSpec:he.filter_operator,style:R.style,styleSpec:R.styleSpec})),Jo(I[0])){case"<":case"<=":case">":case">=":I.length>=2&&Jo(I[1])==="$type"&&qe.push(new wo($,I,'"$type" cannot be use with operator "'+I[0]+'"'));case"==":case"!=":I.length!==3&&qe.push(new wo($,I,'filter array for operator "'+I[0]+'" must have 3 elements'));case"in":case"!in":I.length>=2&&(ke=Ls(I[1]),ke!=="string"&&qe.push(new wo($+"[1]",I[1],"string expected, "+ke+" found")));for(var et=2;et<I.length;et++)ke=Ls(I[et]),Jo(I[1])==="$type"?qe=qe.concat(mn({key:$+"["+et+"]",value:I[et],valueSpec:he.geometry_type,style:R.style,styleSpec:R.styleSpec})):ke!=="string"&&ke!=="number"&&ke!=="boolean"&&qe.push(new wo($+"["+et+"]",I[et],"string, number, or boolean expected, "+ke+" found"));break;case"any":case"all":case"none":for(var Mt=1;Mt<I.length;Mt++)qe=qe.concat(bn({key:$+"["+Mt+"]",value:I[Mt],style:R.style,styleSpec:R.styleSpec}));break;case"has":case"!has":ke=Ls(I[1]),I.length!==2?qe.push(new wo($,I,'filter array for "'+I[0]+'" operator must have 2 elements')):ke!=="string"&&qe.push(new wo($+"[1]",I[1],"string expected, "+ke+" found"));break;case"within":ke=Ls(I[1]),I.length!==2?qe.push(new wo($,I,'filter array for "'+I[0]+'" operator must have 2 elements')):ke!=="object"&&qe.push(new wo($+"[1]",I[1],"object expected, "+ke+" found"));break}return qe}function Vn(R,I){var $=R.key,he=R.style,ke=R.styleSpec,qe=R.value,et=R.objectKey,Mt=ke[I+"_"+R.layerType];if(!Mt)return[];var Jt=et.match(/^(.*)-transition$/);if(I==="paint"&&Jt&&Mt[Jt[1]]&&Mt[Jt[1]].transition)return ll({key:$,value:qe,valueSpec:ke.transition,style:he,styleSpec:ke});var pr=R.valueSpec||Mt[et];if(!pr)return[new wo($,qe,'unknown property "'+et+'"')];var Ar;if(Ls(qe)==="string"&&Ou(pr)&&!pr.tokens&&(Ar=/^{([^}]+)}$/.exec(qe)))return[new wo($,qe,'"'+et+'" does not support interpolation syntax\nUse an identity property function instead: `{ "type": "identity", "property": '+JSON.stringify(Ar[1])+" }`.")];var $r=[];return R.layerType==="symbol"&&(et==="text-field"&&he&&!he.glyphs&&$r.push(new wo($,qe,'use of "text-field" requires a style "glyphs" property')),et==="text-font"&&Wl(Gl(qe))&&Jo(qe.type)==="identity"&&$r.push(new wo($,qe,'"text-font" does not support identity functions'))),$r.concat(ll({key:R.key,value:qe,valueSpec:pr,style:he,styleSpec:ke,expressionContext:"property",propertyType:I,propertyKey:et}))}function Yn(R){return Vn(R,"paint")}function va(R){return Vn(R,"layout")}function Va(R){var I=[],$=R.value,he=R.key,ke=R.style,qe=R.styleSpec;!$.type&&!$.ref&&I.push(new wo(he,$,'either "type" or "ref" is required'));var et=Jo($.type),Mt=Jo($.ref);if($.id)for(var Jt=Jo($.id),pr=0;pr<R.arrayIndex;pr++){var Ar=ke.layers[pr];Jo(Ar.id)===Jt&&I.push(new wo(he,$.id,'duplicate layer id "'+$.id+'", previously used at line '+Ar.id.__line__))}if("ref"in $){["type","source","source-layer","filter","layout"].forEach(function(zn){zn in $&&I.push(new wo(he,$[zn],'"'+zn+'" is prohibited for ref layers'))});var $r;ke.layers.forEach(function(zn){Jo(zn.id)===Mt&&($r=zn)}),$r?$r.ref?I.push(new wo(he,$.ref,"ref cannot reference another ref layer")):et=Jo($r.type):I.push(new wo(he,$.ref,'ref layer "'+Mt+'" not found'))}else if(et!=="background")if(!$.source)I.push(new wo(he,$,'missing required property "source"'));else{var gn=ke.sources&&ke.sources[$.source],hn=gn&&Jo(gn.type);gn?hn==="vector"&&et==="raster"?I.push(new wo(he,$.source,'layer "'+$.id+'" requires a raster source')):hn==="raster"&&et!=="raster"?I.push(new wo(he,$.source,'layer "'+$.id+'" requires a vector source')):hn==="vector"&&!$["source-layer"]?I.push(new wo(he,$,'layer "'+$.id+'" must specify a "source-layer"')):hn==="raster-dem"&&et!=="hillshade"?I.push(new wo(he,$.source,"raster-dem source can only be used with layer type 'hillshade'.")):et==="line"&&$.paint&&$.paint["line-gradient"]&&(hn!=="geojson"||!gn.lineMetrics)&&I.push(new wo(he,$,'layer "'+$.id+'" specifies a line-gradient, which requires a GeoJSON source with `lineMetrics` enabled.')):I.push(new wo(he,$.source,'source "'+$.source+'" not found'))}return I=I.concat(We({key:he,value:$,valueSpec:qe.layer,style:R.style,styleSpec:R.styleSpec,objectElementValidators:{"*":function(){return[]},type:function(){return ll({key:he+".type",value:$.type,valueSpec:qe.layer.type,style:R.style,styleSpec:R.styleSpec,object:$,objectKey:"type"})},filter:sn,layout:function(_a){return We({layer:$,key:_a.key,value:_a.value,style:_a.style,styleSpec:_a.styleSpec,objectElementValidators:{"*":function(Ua){return va(Gs({layerType:et},Ua))}}})},paint:function(_a){return We({layer:$,key:_a.key,value:_a.value,style:_a.style,styleSpec:_a.styleSpec,objectElementValidators:{"*":function(Ua){return Yn(Gs({layerType:et},Ua))}}})}}})),I}function Si(R){var I=R.value,$=R.key,he=Ls(I);return he!=="string"?[new wo($,I,"string expected, "+he+" found")]:[]}var yi={promoteId:go};function Mi(R){var I=R.value,$=R.key,he=R.styleSpec,ke=R.style;if(!I.type)return[new wo($,I,'"type" is required')];var qe=Jo(I.type),et;switch(qe){case"vector":case"raster":case"raster-dem":return et=We({key:$,value:I,valueSpec:he["source_"+qe.replace("-","_")],style:R.style,styleSpec:he,objectElementValidators:yi}),et;case"geojson":if(et=We({key:$,value:I,valueSpec:he.source_geojson,style:ke,styleSpec:he,objectElementValidators:yi}),I.cluster)for(var Mt in I.clusterProperties){var Jt=I.clusterProperties[Mt],pr=Jt[0],Ar=Jt[1],$r=typeof pr=="string"?[pr,["accumulated"],["get",Mt]]:pr;et.push.apply(et,Tr({key:$+"."+Mt+".map",value:Ar,expressionContext:"cluster-map"})),et.push.apply(et,Tr({key:$+"."+Mt+".reduce",value:$r,expressionContext:"cluster-reduce"}))}return et;case"video":return We({key:$,value:I,valueSpec:he.source_video,style:ke,styleSpec:he});case"image":return We({key:$,value:I,valueSpec:he.source_image,style:ke,styleSpec:he});case"canvas":return[new wo($,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return mn({key:$+".type",value:I.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]}})}}function go(R){var I=R.key,$=R.value;if(Ls($)==="string")return Si({key:I,value:$});var he=[];for(var ke in $)he.push.apply(he,Si({key:I+"."+ke,value:$[ke]}));return he}function jo(R){var I=R.value,$=R.styleSpec,he=$.light,ke=R.style,qe=[],et=Ls(I);if(I===void 0)return qe;if(et!=="object")return qe=qe.concat([new wo("light",I,"object expected, "+et+" found")]),qe;for(var Mt in I){var Jt=Mt.match(/^(.*)-transition$/);Jt&&he[Jt[1]]&&he[Jt[1]].transition?qe=qe.concat(ll({key:Mt,value:I[Mt],valueSpec:$.transition,style:ke,styleSpec:$})):he[Mt]?qe=qe.concat(ll({key:Mt,value:I[Mt],valueSpec:he[Mt],style:ke,styleSpec:$})):qe=qe.concat([new wo(Mt,I[Mt],'unknown property "'+Mt+'"')])}return qe}function Do(R){return Si(R).length===0?[]:Tr(R)}function us(R){return Si(R).length===0?[]:Tr(R)}var sl={"*":function(){return[]},array:Ct,boolean:Fr,number:Nt,color:Vr,constants:ql,enum:mn,filter:sn,function:rr,layer:Va,object:We,source:Mi,light:jo,string:Si,formatted:Do,resolvedImage:us};function ll(R){var I=R.value,$=R.valueSpec,he=R.styleSpec;if($.expression&&Wl(Jo(I)))return rr(R);if($.expression&&os(Gl(I)))return Tr(R);if($.type&&sl[$.type])return sl[$.type](R);var ke=We(Gs({},R,{valueSpec:$.type?he[$.type]:$}));return ke}function Bs(R){var I=R.value,$=R.key,he=Si(R);return he.length||(I.indexOf("{fontstack}")===-1&&he.push(new wo($,I,'"glyphs" url must include a "{fontstack}" token')),I.indexOf("{range}")===-1&&he.push(new wo($,I,'"glyphs" url must include a "{range}" token'))),he}function vl(R,I){I===void 0&&(I=Ni);var $=[];return $=$.concat(ll({key:"",value:R,valueSpec:I.$root,styleSpec:I,style:R,objectElementValidators:{glyphs:Bs,"*":function(){return[]}}})),R.constants&&($=$.concat(ql({key:"constants",value:R.constants}))),Eu($)}vl.source=vu(Mi),vl.light=vu(jo),vl.layer=vu(Va),vl.filter=vu(sn),vl.paintProperty=vu(Yn),vl.layoutProperty=vu(va);function Eu(R){return[].concat(R).sort(function(I,$){return I.line-$.line})}function vu(R){return function(){for(var I=[],$=arguments.length;$--;)I[$]=arguments[$];return Eu(R.apply(this,I))}}var Us=vl,qs=Us.light,Hu=Us.paintProperty,yc=Us.layoutProperty;function Zc(R,I){var $=!1;if(I&&I.length)for(var he=0,ke=I;he<ke.length;he+=1){var qe=ke[he];R.fire(new rn(new Error(qe.message))),$=!0}return $}var Te=ft,He=3;function ft(R,I,$){var he=this.cells=[];if(R instanceof ArrayBuffer){this.arrayBuffer=R;var ke=new Int32Array(this.arrayBuffer);R=ke[0],I=ke[1],$=ke[2],this.d=I+2*$;for(var qe=0;qe<this.d*this.d;qe++){var et=ke[He+qe],Mt=ke[He+qe+1];he.push(et===Mt?null:ke.subarray(et,Mt))}var Jt=ke[He+he.length],pr=ke[He+he.length+1];this.keys=ke.subarray(Jt,pr),this.bboxes=ke.subarray(pr),this.insert=this._insertReadonly}else{this.d=I+2*$;for(var Ar=0;Ar<this.d*this.d;Ar++)he.push([]);this.keys=[],this.bboxes=[]}this.n=I,this.extent=R,this.padding=$,this.scale=I/R,this.uid=0;var $r=$/I*R;this.min=-$r,this.max=R+$r}ft.prototype.insert=function(R,I,$,he,ke){this._forEachCell(I,$,he,ke,this._insertCell,this.uid++),this.keys.push(R),this.bboxes.push(I),this.bboxes.push($),this.bboxes.push(he),this.bboxes.push(ke)},ft.prototype._insertReadonly=function(){throw"Cannot insert into a GridIndex created from an ArrayBuffer."},ft.prototype._insertCell=function(R,I,$,he,ke,qe){this.cells[ke].push(qe)},ft.prototype.query=function(R,I,$,he,ke){var qe=this.min,et=this.max;if(R<=qe&&I<=qe&&et<=$&&et<=he&&!ke)return Array.prototype.slice.call(this.keys);var Mt=[],Jt={};return this._forEachCell(R,I,$,he,this._queryCell,Mt,Jt,ke),Mt},ft.prototype._queryCell=function(R,I,$,he,ke,qe,et,Mt){var Jt=this.cells[ke];if(Jt!==null)for(var pr=this.keys,Ar=this.bboxes,$r=0;$r<Jt.length;$r++){var gn=Jt[$r];if(et[gn]===void 0){var hn=gn*4;(Mt?Mt(Ar[hn+0],Ar[hn+1],Ar[hn+2],Ar[hn+3]):R<=Ar[hn+2]&&I<=Ar[hn+3]&&$>=Ar[hn+0]&&he>=Ar[hn+1])?(et[gn]=!0,qe.push(pr[gn])):et[gn]=!1}}},ft.prototype._forEachCell=function(R,I,$,he,ke,qe,et,Mt){for(var Jt=this._convertToCellCoord(R),pr=this._convertToCellCoord(I),Ar=this._convertToCellCoord($),$r=this._convertToCellCoord(he),gn=Jt;gn<=Ar;gn++)for(var hn=pr;hn<=$r;hn++){var zn=this.d*hn+gn;if(!(Mt&&!Mt(this._convertFromCellCoord(gn),this._convertFromCellCoord(hn),this._convertFromCellCoord(gn+1),this._convertFromCellCoord(hn+1)))&&ke.call(this,R,I,$,he,zn,qe,et,Mt))return}},ft.prototype._convertFromCellCoord=function(R){return(R-this.padding)/this.scale},ft.prototype._convertToCellCoord=function(R){return Math.max(0,Math.min(this.d-1,Math.floor(R*this.scale)+this.padding))},ft.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var R=this.cells,I=He+this.cells.length+1+1,$=0,he=0;he<this.cells.length;he++)$+=this.cells[he].length;var ke=new Int32Array(I+$+this.keys.length+this.bboxes.length);ke[0]=this.extent,ke[1]=this.n,ke[2]=this.padding;for(var qe=I,et=0;et<R.length;et++){var Mt=R[et];ke[He+et]=qe,ke.set(Mt,qe),qe+=Mt.length}return ke[He+R.length]=qe,ke.set(this.keys,qe),qe+=this.keys.length,ke[He+R.length+1]=qe,ke.set(this.bboxes,qe),qe+=this.bboxes.length,ke.buffer};var Lt=u.ImageData,Dt=u.ImageBitmap,qt={};function dr(R,I,$){$===void 0&&($={}),Object.defineProperty(I,"_classRegistryKey",{value:R,writeable:!1}),qt[R]={klass:I,omit:$.omit||[],shallow:$.shallow||[]}}dr("Object",Object),Te.serialize=function(I,$){var he=I.toArrayBuffer();return $&&$.push(he),{buffer:he}},Te.deserialize=function(I){return new Te(I.buffer)},dr("Grid",Te),dr("Color",zl),dr("Error",Error),dr("ResolvedImage",ic),dr("StylePropertyFunction",Ze),dr("StyleExpression",Uf,{omit:["_evaluator"]}),dr("ZoomDependentExpression",sf),dr("ZoomConstantExpression",qf),dr("CompoundExpression",Ko,{omit:["_evaluate"]});for(var hr in gs)gs[hr]._classRegistryKey||dr("Expression_"+hr,gs[hr]);function Pr(R){return R&&typeof ArrayBuffer<"u"&&(R instanceof ArrayBuffer||R.constructor&&R.constructor.name==="ArrayBuffer")}function ln(R){return Dt&&R instanceof Dt}function on(R,I){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(Pr(R)||ln(R))return I&&I.push(R),R;if(ArrayBuffer.isView(R)){var $=R;return I&&I.push($.buffer),$}if(R instanceof Lt)return I&&I.push(R.data.buffer),R;if(Array.isArray(R)){for(var he=[],ke=0,qe=R;ke<qe.length;ke+=1){var et=qe[ke];he.push(on(et,I))}return he}if(typeof R=="object"){var Mt=R.constructor,Jt=Mt._classRegistryKey;if(!Jt)throw new Error("can't serialize object of unregistered class");var pr=Mt.serialize?Mt.serialize(R,I):{};if(!Mt.serialize){for(var Ar in R)if(R.hasOwnProperty(Ar)&&!(qt[Jt].omit.indexOf(Ar)>=0)){var $r=R[Ar];pr[Ar]=qt[Jt].shallow.indexOf(Ar)>=0?$r:on($r,I)}R instanceof Error&&(pr.message=R.message)}if(pr.$name)throw new Error("$name property is reserved for worker serialization logic.");return Jt!=="Object"&&(pr.$name=Jt),pr}throw new Error("can't serialize object of type "+typeof R)}function Mn(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||Pr(R)||ln(R)||ArrayBuffer.isView(R)||R instanceof Lt)return R;if(Array.isArray(R))return R.map(Mn);if(typeof R=="object"){var I=R.$name||"Object",$=qt[I],he=$.klass;if(!he)throw new Error("can't deserialize unregistered class "+I);if(he.deserialize)return he.deserialize(R);for(var ke=Object.create(he.prototype),qe=0,et=Object.keys(R);qe<et.length;qe+=1){var Mt=et[qe];if(Mt!=="$name"){var Jt=R[Mt];ke[Mt]=qt[I].shallow.indexOf(Mt)>=0?Jt:Mn(Jt)}}return ke}throw new Error("can't deserialize object of type "+typeof R)}var Un=function(){this.first=!0};Un.prototype.update=function(I,$){var he=Math.floor(I);return this.first?(this.first=!1,this.lastIntegerZoom=he,this.lastIntegerZoomTime=0,this.lastZoom=I,this.lastFloorZoom=he,!0):(this.lastFloorZoom>he?(this.lastIntegerZoom=he+1,this.lastIntegerZoomTime=$):this.lastFloorZoom<he&&(this.lastIntegerZoom=he,this.lastIntegerZoomTime=$),I!==this.lastZoom?(this.lastZoom=I,this.lastFloorZoom=he,!0):!1)};var Gn={"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 Ja(R){for(var I=0,$=R;I<$.length;I+=1){var he=$[I];if(Xa(he.charCodeAt(0)))return!0}return!1}function Qn(R){for(var I=0,$=R;I<$.length;I+=1){var he=$[I];if(!ba(he.charCodeAt(0)))return!1}return!0}function ba(R){return!(Gn.Arabic(R)||Gn["Arabic Supplement"](R)||Gn["Arabic Extended-A"](R)||Gn["Arabic Presentation Forms-A"](R)||Gn["Arabic Presentation Forms-B"](R))}function Ca(R){return R<11904?!1:!!(Gn["Bopomofo Extended"](R)||Gn.Bopomofo(R)||Gn["CJK Compatibility Forms"](R)||Gn["CJK Compatibility Ideographs"](R)||Gn["CJK Compatibility"](R)||Gn["CJK Radicals Supplement"](R)||Gn["CJK Strokes"](R)||Gn["CJK Symbols and Punctuation"](R)||Gn["CJK Unified Ideographs Extension A"](R)||Gn["CJK Unified Ideographs"](R)||Gn["Enclosed CJK Letters and Months"](R)||Gn["Halfwidth and Fullwidth Forms"](R)||Gn.Hiragana(R)||Gn["Ideographic Description Characters"](R)||Gn["Kangxi Radicals"](R)||Gn["Katakana Phonetic Extensions"](R)||Gn.Katakana(R)||Gn["Vertical Forms"](R)||Gn["Yi Radicals"](R)||Gn["Yi Syllables"](R))}function Xa(R){return R===746||R===747?!0:R<4352?!1:!!(Gn["Bopomofo Extended"](R)||Gn.Bopomofo(R)||Gn["CJK Compatibility Forms"](R)&&!(R>=65097&&R<=65103)||Gn["CJK Compatibility Ideographs"](R)||Gn["CJK Compatibility"](R)||Gn["CJK Radicals Supplement"](R)||Gn["CJK Strokes"](R)||Gn["CJK Symbols and Punctuation"](R)&&!(R>=12296&&R<=12305)&&!(R>=12308&&R<=12319)&&R!==12336||Gn["CJK Unified Ideographs Extension A"](R)||Gn["CJK Unified Ideographs"](R)||Gn["Enclosed CJK Letters and Months"](R)||Gn["Hangul Compatibility Jamo"](R)||Gn["Hangul Jamo Extended-A"](R)||Gn["Hangul Jamo Extended-B"](R)||Gn["Hangul Jamo"](R)||Gn["Hangul Syllables"](R)||Gn.Hiragana(R)||Gn["Ideographic Description Characters"](R)||Gn.Kanbun(R)||Gn["Kangxi Radicals"](R)||Gn["Katakana Phonetic Extensions"](R)||Gn.Katakana(R)&&R!==12540||Gn["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)||Gn["Small Form Variants"](R)&&!(R>=65112&&R<=65118)&&!(R>=65123&&R<=65126)||Gn["Unified Canadian Aboriginal Syllabics"](R)||Gn["Unified Canadian Aboriginal Syllabics Extended"](R)||Gn["Vertical Forms"](R)||Gn["Yijing Hexagram Symbols"](R)||Gn["Yi Syllables"](R)||Gn["Yi Radicals"](R))}function ei(R){return!!(Gn["Latin-1 Supplement"](R)&&(R===167||R===169||R===174||R===177||R===188||R===189||R===190||R===215||R===247)||Gn["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)||Gn["Letterlike Symbols"](R)||Gn["Number Forms"](R)||Gn["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)||Gn["Control Pictures"](R)&&R!==9251||Gn["Optical Character Recognition"](R)||Gn["Enclosed Alphanumerics"](R)||Gn["Geometric Shapes"](R)||Gn["Miscellaneous Symbols"](R)&&!(R>=9754&&R<=9759)||Gn["Miscellaneous Symbols and Arrows"](R)&&(R>=11026&&R<=11055||R>=11088&&R<=11097||R>=11192&&R<=11243)||Gn["CJK Symbols and Punctuation"](R)||Gn.Katakana(R)||Gn["Private Use Area"](R)||Gn["CJK Compatibility Forms"](R)||Gn["Small Form Variants"](R)||Gn["Halfwidth and Fullwidth Forms"](R)||R===8734||R===8756||R===8757||R>=9984&&R<=10087||R>=10102&&R<=10131||R===65532||R===65533)}function Ma(R){return!(Xa(R)||ei(R))}function Ci(R){return Gn.Arabic(R)||Gn["Arabic Supplement"](R)||Gn["Arabic Extended-A"](R)||Gn["Arabic Presentation Forms-A"](R)||Gn["Arabic Presentation Forms-B"](R)}function po(R){return R>=1424&&R<=2303||Gn["Arabic Presentation Forms-A"](R)||Gn["Arabic Presentation Forms-B"](R)}function ro(R,I){return!(!I&&po(R)||R>=2304&&R<=3583||R>=3840&&R<=4255||Gn.Khmer(R))}function fo(R){for(var I=0,$=R;I<$.length;I+=1){var he=$[I];if(po(he.charCodeAt(0)))return!0}return!1}function Fo(R,I){for(var $=0,he=R;$<he.length;$+=1){var ke=he[$];if(!ro(ke.charCodeAt(0),I))return!1}return!0}var Ho={unavailable:"unavailable",deferred:"deferred",loading:"loading",loaded:"loaded",error:"error"},il=null,Wo=Ho.unavailable,bs=null,dl=function(R){R&&typeof R=="string"&&R.indexOf("NetworkError")>-1&&(Wo=Ho.error),il&&il(R)};function Gu(){fu.fire(new en("pluginStateChange",{pluginStatus:Wo,pluginURL:bs}))}var fu=new Wr,ko=function(){return Wo},Vs=function(R){return R({pluginStatus:Wo,pluginURL:bs}),fu.on("pluginStateChange",R),R},ul=function(R,I,$){if($===void 0&&($=!1),Wo===Ho.deferred||Wo===Ho.loading||Wo===Ho.loaded)throw new Error("setRTLTextPlugin cannot be called multiple times.");bs=Le.resolveURL(R),Wo=Ho.deferred,il=I,Gu(),$||ou()},ou=function(){if(Wo!==Ho.deferred||!bs)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");Wo=Ho.loading,Gu(),bs&&Ln({url:bs},function(R){R?dl(R):(Wo=Ho.loaded,Gu())})},Yl={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return Wo===Ho.loaded||Yl.applyArabicShaping!=null},isLoading:function(){return Wo===Ho.loading},setState:function(I){Wo=I.pluginStatus,bs=I.pluginURL},isParsed:function(){return Yl.applyArabicShaping!=null&&Yl.processBidirectionalText!=null&&Yl.processStyledBidirectionalText!=null},getPluginURL:function(){return bs}},Dc=function(){!Yl.isLoading()&&!Yl.isLoaded()&&ko()==="deferred"&&ou()},jl=function(I,$){this.zoom=I,$?(this.now=$.now,this.fadeDuration=$.fadeDuration,this.zoomHistory=$.zoomHistory,this.transition=$.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Un,this.transition={})};jl.prototype.isSupportedScript=function(I){return Fo(I,Yl.isLoaded())},jl.prototype.crossFadingFactor=function(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},jl.prototype.getCrossfadeParameters=function(){var I=this.zoom,$=I-Math.floor(I),he=this.crossFadingFactor();return I>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:$+(1-$)*he}:{fromScale:.5,toScale:1,t:1-(1-he)*$}};var su=function(I,$){this.property=I,this.value=$,this.expression=O($===void 0?I.specification.default:$,I.specification)};su.prototype.isDataDriven=function(){return this.expression.kind==="source"||this.expression.kind==="composite"},su.prototype.possiblyEvaluate=function(I,$,he){return this.property.possiblyEvaluate(this,I,$,he)};var lf=function(I){this.property=I,this.value=new su(I,void 0)};lf.prototype.transitioned=function(I,$){return new St(this.property,this.value,$,b({},I.transition,this.transition),I.now)},lf.prototype.untransitioned=function(){return new St(this.property,this.value,null,{},0)};var Uu=function(I){this._properties=I,this._values=Object.create(I.defaultTransitionablePropertyValues)};Uu.prototype.getValue=function(I){return q(this._values[I].value.value)},Uu.prototype.setValue=function(I,$){this._values.hasOwnProperty(I)||(this._values[I]=new lf(this._values[I].property)),this._values[I].value=new su(this._values[I].property,$===null?void 0:q($))},Uu.prototype.getTransition=function(I){return q(this._values[I].transition)},Uu.prototype.setTransition=function(I,$){this._values.hasOwnProperty(I)||(this._values[I]=new lf(this._values[I].property)),this._values[I].transition=q($)||void 0},Uu.prototype.serialize=function(){for(var I={},$=0,he=Object.keys(this._values);$<he.length;$+=1){var ke=he[$],qe=this.getValue(ke);qe!==void 0&&(I[ke]=qe);var et=this.getTransition(ke);et!==void 0&&(I[ke+"-transition"]=et)}return I},Uu.prototype.transitioned=function(I,$){for(var he=new kr(this._properties),ke=0,qe=Object.keys(this._values);ke<qe.length;ke+=1){var et=qe[ke];he._values[et]=this._values[et].transitioned(I,$._values[et])}return he},Uu.prototype.untransitioned=function(){for(var I=new kr(this._properties),$=0,he=Object.keys(this._values);$<he.length;$+=1){var ke=he[$];I._values[ke]=this._values[ke].untransitioned()}return I};var St=function(I,$,he,ke,qe){this.property=I,this.value=$,this.begin=qe+ke.delay||0,this.end=this.begin+ke.duration||0,I.specification.transition&&(ke.delay||ke.duration)&&(this.prior=he)};St.prototype.possiblyEvaluate=function(I,$,he){var ke=I.now||0,qe=this.value.possiblyEvaluate(I,$,he),et=this.prior;if(et){if(ke>this.end)return this.prior=null,qe;if(this.value.isDataDriven())return this.prior=null,qe;if(ke<this.begin)return et.possiblyEvaluate(I,$,he);var Mt=(ke-this.begin)/(this.end-this.begin);return this.property.interpolate(et.possiblyEvaluate(I,$,he),qe,g(Mt))}else return qe};var kr=function(I){this._properties=I,this._values=Object.create(I.defaultTransitioningPropertyValues)};kr.prototype.possiblyEvaluate=function(I,$,he){for(var ke=new La(this._properties),qe=0,et=Object.keys(this._values);qe<et.length;qe+=1){var Mt=et[qe];ke._values[Mt]=this._values[Mt].possiblyEvaluate(I,$,he)}return ke},kr.prototype.hasTransition=function(){for(var I=0,$=Object.keys(this._values);I<$.length;I+=1){var he=$[I];if(this._values[he].prior)return!0}return!1};var Dr=function(I){this._properties=I,this._values=Object.create(I.defaultPropertyValues)};Dr.prototype.getValue=function(I){return q(this._values[I].value)},Dr.prototype.setValue=function(I,$){this._values[I]=new su(this._values[I].property,$===null?void 0:q($))},Dr.prototype.serialize=function(){for(var I={},$=0,he=Object.keys(this._values);$<he.length;$+=1){var ke=he[$],qe=this.getValue(ke);qe!==void 0&&(I[ke]=qe)}return I},Dr.prototype.possiblyEvaluate=function(I,$,he){for(var ke=new La(this._properties),qe=0,et=Object.keys(this._values);qe<et.length;qe+=1){var Mt=et[qe];ke._values[Mt]=this._values[Mt].possiblyEvaluate(I,$,he)}return ke};var Xn=function(I,$,he){this.property=I,this.value=$,this.parameters=he};Xn.prototype.isConstant=function(){return this.value.kind==="constant"},Xn.prototype.constantOr=function(I){return this.value.kind==="constant"?this.value.value:I},Xn.prototype.evaluate=function(I,$,he,ke){return this.property.evaluate(this.value,this.parameters,I,$,he,ke)};var La=function(I){this._properties=I,this._values=Object.create(I.defaultPossiblyEvaluatedValues)};La.prototype.get=function(I){return this._values[I]};var Rn=function(I){this.specification=I};Rn.prototype.possiblyEvaluate=function(I,$){return I.expression.evaluate($)},Rn.prototype.interpolate=function(I,$,he){var ke=eh[this.specification.type];return ke?ke(I,$,he):I};var Pn=function(I,$){this.specification=I,this.overrides=$};Pn.prototype.possiblyEvaluate=function(I,$,he,ke){return I.expression.kind==="constant"||I.expression.kind==="camera"?new Xn(this,{kind:"constant",value:I.expression.evaluate($,null,{},he,ke)},$):new Xn(this,I.expression,$)},Pn.prototype.interpolate=function(I,$,he){if(I.value.kind!=="constant"||$.value.kind!=="constant")return I;if(I.value.value===void 0||$.value.value===void 0)return new Xn(this,{kind:"constant",value:void 0},I.parameters);var ke=eh[this.specification.type];return ke?new Xn(this,{kind:"constant",value:ke(I.value.value,$.value.value,he)},I.parameters):I},Pn.prototype.evaluate=function(I,$,he,ke,qe,et){return I.kind==="constant"?I.value:I.evaluate($,he,ke,qe,et)};var ni=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype.possiblyEvaluate=function(he,ke,qe,et){if(he.value===void 0)return new Xn(this,{kind:"constant",value:void 0},ke);if(he.expression.kind==="constant"){var Mt=he.expression.evaluate(ke,null,{},qe,et),Jt=he.property.specification.type==="resolvedImage",pr=Jt&&typeof Mt!="string"?Mt.name:Mt,Ar=this._calculate(pr,pr,pr,ke);return new Xn(this,{kind:"constant",value:Ar},ke)}else if(he.expression.kind==="camera"){var $r=this._calculate(he.expression.evaluate({zoom:ke.zoom-1}),he.expression.evaluate({zoom:ke.zoom}),he.expression.evaluate({zoom:ke.zoom+1}),ke);return new Xn(this,{kind:"constant",value:$r},ke)}else return new Xn(this,he.expression,ke)},I.prototype.evaluate=function(he,ke,qe,et,Mt,Jt){if(he.kind==="source"){var pr=he.evaluate(ke,qe,et,Mt,Jt);return this._calculate(pr,pr,pr,ke)}else return he.kind==="composite"?this._calculate(he.evaluate({zoom:Math.floor(ke.zoom)-1},qe,et),he.evaluate({zoom:Math.floor(ke.zoom)},qe,et),he.evaluate({zoom:Math.floor(ke.zoom)+1},qe,et),ke):he.value},I.prototype._calculate=function(he,ke,qe,et){var Mt=et.zoom;return Mt>et.zoomHistory.lastIntegerZoom?{from:he,to:ke}:{from:qe,to:ke}},I.prototype.interpolate=function(he){return he},I})(Pn),ti=function(I){this.specification=I};ti.prototype.possiblyEvaluate=function(I,$,he,ke){if(I.value!==void 0)if(I.expression.kind==="constant"){var qe=I.expression.evaluate($,null,{},he,ke);return this._calculate(qe,qe,qe,$)}else return this._calculate(I.expression.evaluate(new jl(Math.floor($.zoom-1),$)),I.expression.evaluate(new jl(Math.floor($.zoom),$)),I.expression.evaluate(new jl(Math.floor($.zoom+1),$)),$)},ti.prototype._calculate=function(I,$,he,ke){var qe=ke.zoom;return qe>ke.zoomHistory.lastIntegerZoom?{from:I,to:$}:{from:he,to:$}},ti.prototype.interpolate=function(I){return I};var ri=function(I){this.specification=I};ri.prototype.possiblyEvaluate=function(I,$,he,ke){return!!I.expression.evaluate($,null,{},he,ke)},ri.prototype.interpolate=function(){return!1};var gi=function(I){this.properties=I,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(var $ in I){var he=I[$];he.specification.overridable&&this.overridableProperties.push($);var ke=this.defaultPropertyValues[$]=new su(he,void 0),qe=this.defaultTransitionablePropertyValues[$]=new lf(he);this.defaultTransitioningPropertyValues[$]=qe.untransitioned(),this.defaultPossiblyEvaluatedValues[$]=ke.possiblyEvaluate({})}};dr("DataDrivenProperty",Pn),dr("DataConstantProperty",Rn),dr("CrossFadedDataDrivenProperty",ni),dr("CrossFadedProperty",ti),dr("ColorRampProperty",ri);var io="-transition",qi=(function(R){function I($,he){if(R.call(this),this.id=$.id,this.type=$.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},$.type!=="custom"&&($=$,this.metadata=$.metadata,this.minzoom=$.minzoom,this.maxzoom=$.maxzoom,$.type!=="background"&&(this.source=$.source,this.sourceLayer=$["source-layer"],this.filter=$.filter),he.layout&&(this._unevaluatedLayout=new Dr(he.layout)),he.paint)){this._transitionablePaint=new Uu(he.paint);for(var ke in $.paint)this.setPaintProperty(ke,$.paint[ke],{validate:!1});for(var qe in $.layout)this.setLayoutProperty(qe,$.layout[qe],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new La(he.paint)}}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},I.prototype.getLayoutProperty=function(he){return he==="visibility"?this.visibility:this._unevaluatedLayout.getValue(he)},I.prototype.setLayoutProperty=function(he,ke,qe){if(qe===void 0&&(qe={}),ke!=null){var et="layers."+this.id+".layout."+he;if(this._validate(yc,et,he,ke,qe))return}if(he==="visibility"){this.visibility=ke;return}this._unevaluatedLayout.setValue(he,ke)},I.prototype.getPaintProperty=function(he){return B(he,io)?this._transitionablePaint.getTransition(he.slice(0,-io.length)):this._transitionablePaint.getValue(he)},I.prototype.setPaintProperty=function(he,ke,qe){if(qe===void 0&&(qe={}),ke!=null){var et="layers."+this.id+".paint."+he;if(this._validate(Hu,et,he,ke,qe))return!1}if(B(he,io))return this._transitionablePaint.setTransition(he.slice(0,-io.length),ke||void 0),!1;var Mt=this._transitionablePaint._values[he],Jt=Mt.property.specification["property-type"]==="cross-faded-data-driven",pr=Mt.value.isDataDriven(),Ar=Mt.value;this._transitionablePaint.setValue(he,ke),this._handleSpecialPaintPropertyUpdate(he);var $r=this._transitionablePaint._values[he].value,gn=$r.isDataDriven();return gn||pr||Jt||this._handleOverridablePaintPropertyUpdate(he,Ar,$r)},I.prototype._handleSpecialPaintPropertyUpdate=function(he){},I.prototype._handleOverridablePaintPropertyUpdate=function(he,ke,qe){return!1},I.prototype.isHidden=function(he){return this.minzoom&&he<this.minzoom||this.maxzoom&&he>=this.maxzoom?!0:this.visibility==="none"},I.prototype.updateTransitions=function(he){this._transitioningPaint=this._transitionablePaint.transitioned(he,this._transitioningPaint)},I.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},I.prototype.recalculate=function(he,ke){he.getCrossfadeParameters&&(this._crossfadeParameters=he.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(he,void 0,ke)),this.paint=this._transitioningPaint.possiblyEvaluate(he,void 0,ke)},I.prototype.serialize=function(){var he={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&&(he.layout=he.layout||{},he.layout.visibility=this.visibility),V(he,function(ke,qe){return ke!==void 0&&!(qe==="layout"&&!Object.keys(ke).length)&&!(qe==="paint"&&!Object.keys(ke).length)})},I.prototype._validate=function(he,ke,qe,et,Mt){return Mt===void 0&&(Mt={}),Mt&&Mt.validate===!1?!1:Zc(this,he.call(Us,{key:ke,layerType:this.type,objectKey:qe,value:et,styleSpec:Ni,style:{glyphs:!0,sprite:!0}}))},I.prototype.is3D=function(){return!1},I.prototype.isTileClipped=function(){return!1},I.prototype.hasOffscreenPass=function(){return!1},I.prototype.resize=function(){},I.prototype.isStateDependent=function(){for(var he in this.paint._values){var ke=this.paint.get(he);if(!(!(ke instanceof Xn)||!Ou(ke.property.specification))&&(ke.value.kind==="source"||ke.value.kind==="composite")&&ke.value.isStateDependent)return!0}return!1},I})(Wr),di={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},Na=function(I,$){this._structArray=I,this._pos1=$*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},yn=128,ra=5,wa=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};wa.serialize=function(I,$){return I._trim(),$&&(I.isTransferred=!0,$.push(I.arrayBuffer)),{length:I.length,arrayBuffer:I.arrayBuffer}},wa.deserialize=function(I){var $=Object.create(this.prototype);return $.arrayBuffer=I.arrayBuffer,$.length=I.length,$.capacity=I.arrayBuffer.byteLength/$.bytesPerElement,$._refreshViews(),$},wa.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},wa.prototype.clear=function(){this.length=0},wa.prototype.resize=function(I){this.reserve(I),this.length=I},wa.prototype.reserve=function(I){if(I>this.capacity){this.capacity=Math.max(I,Math.floor(this.capacity*ra),yn),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var $=this.uint8;this._refreshViews(),$&&this.uint8.set($)}},wa.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};function Fa(R,I){I===void 0&&(I=1);var $=0,he=0,ke=R.map(function(et){var Mt=Sa(et.type),Jt=$=zi($,Math.max(I,Mt)),pr=et.components||1;return he=Math.max(he,Mt),$+=Mt*pr,{name:et.name,type:et.type,components:pr,offset:Jt}}),qe=zi($,Math.max(he,I));return{members:ke,size:qe,alignment:I}}function Sa(R){return di[R].BYTES_PER_ELEMENT}function zi(R,I){return Math.ceil(R/I)*I}var li=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},I.prototype.emplaceBack=function(he,ke){var qe=this.length;return this.resize(qe+1),this.emplace(qe,he,ke)},I.prototype.emplace=function(he,ke,qe){var et=he*2;return this.int16[et+0]=ke,this.int16[et+1]=qe,he},I})(wa);li.prototype.bytesPerElement=4,dr("StructArrayLayout2i4",li);var eo=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},I.prototype.emplaceBack=function(he,ke,qe,et){var Mt=this.length;return this.resize(Mt+1),this.emplace(Mt,he,ke,qe,et)},I.prototype.emplace=function(he,ke,qe,et,Mt){var Jt=he*4;return this.int16[Jt+0]=ke,this.int16[Jt+1]=qe,this.int16[Jt+2]=et,this.int16[Jt+3]=Mt,he},I})(wa);eo.prototype.bytesPerElement=8,dr("StructArrayLayout4i8",eo);var Ea=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},I.prototype.emplaceBack=function(he,ke,qe,et,Mt,Jt){var pr=this.length;return this.resize(pr+1),this.emplace(pr,he,ke,qe,et,Mt,Jt)},I.prototype.emplace=function(he,ke,qe,et,Mt,Jt,pr){var Ar=he*6;return this.int16[Ar+0]=ke,this.int16[Ar+1]=qe,this.int16[Ar+2]=et,this.int16[Ar+3]=Mt,this.int16[Ar+4]=Jt,this.int16[Ar+5]=pr,he},I})(wa);Ea.prototype.bytesPerElement=12,dr("StructArrayLayout2i4i12",Ea);var pa=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},I.prototype.emplaceBack=function(he,ke,qe,et,Mt,Jt){var pr=this.length;return this.resize(pr+1),this.emplace(pr,he,ke,qe,et,Mt,Jt)},I.prototype.emplace=function(he,ke,qe,et,Mt,Jt,pr){var Ar=he*4,$r=he*8;return this.int16[Ar+0]=ke,this.int16[Ar+1]=qe,this.uint8[$r+4]=et,this.uint8[$r+5]=Mt,this.uint8[$r+6]=Jt,this.uint8[$r+7]=pr,he},I})(wa);pa.prototype.bytesPerElement=8,dr("StructArrayLayout2i4ub8",pa);var ki=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},I.prototype.emplaceBack=function(he,ke){var qe=this.length;return this.resize(qe+1),this.emplace(qe,he,ke)},I.prototype.emplace=function(he,ke,qe){var et=he*2;return this.float32[et+0]=ke,this.float32[et+1]=qe,he},I})(wa);ki.prototype.bytesPerElement=8,dr("StructArrayLayout2f8",ki);var Jn=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},I.prototype.emplaceBack=function(he,ke,qe,et,Mt,Jt,pr,Ar,$r,gn){var hn=this.length;return this.resize(hn+1),this.emplace(hn,he,ke,qe,et,Mt,Jt,pr,Ar,$r,gn)},I.prototype.emplace=function(he,ke,qe,et,Mt,Jt,pr,Ar,$r,gn,hn){var zn=he*10;return this.uint16[zn+0]=ke,this.uint16[zn+1]=qe,this.uint16[zn+2]=et,this.uint16[zn+3]=Mt,this.uint16[zn+4]=Jt,this.uint16[zn+5]=pr,this.uint16[zn+6]=Ar,this.uint16[zn+7]=$r,this.uint16[zn+8]=gn,this.uint16[zn+9]=hn,he},I})(wa);Jn.prototype.bytesPerElement=20,dr("StructArrayLayout10ui20",Jn);var _i=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},I.prototype.emplaceBack=function(he,ke,qe,et,Mt,Jt,pr,Ar,$r,gn,hn,zn){var _a=this.length;return this.resize(_a+1),this.emplace(_a,he,ke,qe,et,Mt,Jt,pr,Ar,$r,gn,hn,zn)},I.prototype.emplace=function(he,ke,qe,et,Mt,Jt,pr,Ar,$r,gn,hn,zn,_a){var ui=he*12;return this.int16[ui+0]=ke,this.int16[ui+1]=qe,this.int16[ui+2]=et,this.int16[ui+3]=Mt,this.uint16[ui+4]=Jt,this.uint16[ui+5]=pr,this.uint16[ui+6]=Ar,this.uint16[ui+7]=$r,this.int16[ui+8]=gn,this.int16[ui+9]=hn,this.int16[ui+10]=zn,this.int16[ui+11]=_a,he},I})(wa);_i.prototype.bytesPerElement=24,dr("StructArrayLayout4i4ui4i24",_i);var ai=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},I.prototype.emplaceBack=function(he,ke,qe){var et=this.length;return this.resize(et+1),this.emplace(et,he,ke,qe)},I.prototype.emplace=function(he,ke,qe,et){var Mt=he*3;return this.float32[Mt+0]=ke,this.float32[Mt+1]=qe,this.float32[Mt+2]=et,he},I})(wa);ai.prototype.bytesPerElement=12,dr("StructArrayLayout3f12",ai);var no=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},I.prototype.emplaceBack=function(he){var ke=this.length;return this.resize(ke+1),this.emplace(ke,he)},I.prototype.emplace=function(he,ke){var qe=he*1;return this.uint32[qe+0]=ke,he},I})(wa);no.prototype.bytesPerElement=4,dr("StructArrayLayout1ul4",no);var Xo=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.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)},I.prototype.emplaceBack=function(he,ke,qe,et,Mt,Jt,pr,Ar,$r){var gn=this.length;return this.resize(gn+1),this.emplace(gn,he,ke,qe,et,Mt,Jt,pr,Ar,$r)},I.prototype.emplace=function(he,ke,qe,et,Mt,Jt,pr,Ar,$r,gn){var hn=he*10,zn=he*5;return this.int16[hn+0]=ke,this.int16[hn+1]=qe,this.int16[hn+2]=et,this.int16[hn+3]=Mt,this.int16[hn+4]=Jt,this.int16[hn+5]=pr,this.uint32[zn+3]=Ar,this.uint16[hn+8]=$r,this.uint16[hn+9]=gn,he},I})(wa);Xo.prototype.bytesPerElement=20,dr("StructArrayLayout6i1ul2ui20",Xo);var Vi=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},I.prototype.emplaceBack=function(he,ke,qe,et,Mt,Jt){var pr=this.length;return this.resize(pr+1),this.emplace(pr,he,ke,qe,et,Mt,Jt)},I.prototype.emplace=function(he,ke,qe,et,Mt,Jt,pr){var Ar=he*6;return this.int16[Ar+0]=ke,this.int16[Ar+1]=qe,this.int16[Ar+2]=et,this.int16[Ar+3]=Mt,this.int16[Ar+4]=Jt,this.int16[Ar+5]=pr,he},I})(wa);Vi.prototype.bytesPerElement=12,dr("StructArrayLayout2i2i2i12",Vi);var lo=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},I.prototype.emplaceBack=function(he,ke,qe,et,Mt){var Jt=this.length;return this.resize(Jt+1),this.emplace(Jt,he,ke,qe,et,Mt)},I.prototype.emplace=function(he,ke,qe,et,Mt,Jt){var pr=he*4,Ar=he*8;return this.float32[pr+0]=ke,this.float32[pr+1]=qe,this.float32[pr+2]=et,this.int16[Ar+6]=Mt,this.int16[Ar+7]=Jt,he},I})(wa);lo.prototype.bytesPerElement=16,dr("StructArrayLayout2f1f2i16",lo);var pi=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},I.prototype.emplaceBack=function(he,ke,qe,et){var Mt=this.length;return this.resize(Mt+1),this.emplace(Mt,he,ke,qe,et)},I.prototype.emplace=function(he,ke,qe,et,Mt){var Jt=he*12,pr=he*3;return this.uint8[Jt+0]=ke,this.uint8[Jt+1]=qe,this.float32[pr+1]=et,this.float32[pr+2]=Mt,he},I})(wa);pi.prototype.bytesPerElement=12,dr("StructArrayLayout2ub2f12",pi);var Uo=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},I.prototype.emplaceBack=function(he,ke,qe){var et=this.length;return this.resize(et+1),this.emplace(et,he,ke,qe)},I.prototype.emplace=function(he,ke,qe,et){var Mt=he*3;return this.uint16[Mt+0]=ke,this.uint16[Mt+1]=qe,this.uint16[Mt+2]=et,he},I})(wa);Uo.prototype.bytesPerElement=6,dr("StructArrayLayout3ui6",Uo);var ns=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.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)},I.prototype.emplaceBack=function(he,ke,qe,et,Mt,Jt,pr,Ar,$r,gn,hn,zn,_a,ui,Ua,ji,bi){var Fi=this.length;return this.resize(Fi+1),this.emplace(Fi,he,ke,qe,et,Mt,Jt,pr,Ar,$r,gn,hn,zn,_a,ui,Ua,ji,bi)},I.prototype.emplace=function(he,ke,qe,et,Mt,Jt,pr,Ar,$r,gn,hn,zn,_a,ui,Ua,ji,bi,Fi){var Zi=he*24,yo=he*12,Bo=he*48;return this.int16[Zi+0]=ke,this.int16[Zi+1]=qe,this.uint16[Zi+2]=et,this.uint16[Zi+3]=Mt,this.uint32[yo+2]=Jt,this.uint32[yo+3]=pr,this.uint32[yo+4]=Ar,this.uint16[Zi+10]=$r,this.uint16[Zi+11]=gn,this.uint16[Zi+12]=hn,this.float32[yo+7]=zn,this.float32[yo+8]=_a,this.uint8[Bo+36]=ui,this.uint8[Bo+37]=Ua,this.uint8[Bo+38]=ji,this.uint32[yo+10]=bi,this.int16[Zi+22]=Fi,he},I})(wa);ns.prototype.bytesPerElement=48,dr("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",ns);var ds=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.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)},I.prototype.emplaceBack=function(he,ke,qe,et,Mt,Jt,pr,Ar,$r,gn,hn,zn,_a,ui,Ua,ji,bi,Fi,Zi,yo,Bo,zo,ws,Qo,fs,Sl,Ts,ks){var tu=this.length;return this.resize(tu+1),this.emplace(tu,he,ke,qe,et,Mt,Jt,pr,Ar,$r,gn,hn,zn,_a,ui,Ua,ji,bi,Fi,Zi,yo,Bo,zo,ws,Qo,fs,Sl,Ts,ks)},I.prototype.emplace=function(he,ke,qe,et,Mt,Jt,pr,Ar,$r,gn,hn,zn,_a,ui,Ua,ji,bi,Fi,Zi,yo,Bo,zo,ws,Qo,fs,Sl,Ts,ks,tu){var pl=he*34,Ku=he*17;return this.int16[pl+0]=ke,this.int16[pl+1]=qe,this.int16[pl+2]=et,this.int16[pl+3]=Mt,this.int16[pl+4]=Jt,this.int16[pl+5]=pr,this.int16[pl+6]=Ar,this.int16[pl+7]=$r,this.uint16[pl+8]=gn,this.uint16[pl+9]=hn,this.uint16[pl+10]=zn,this.uint16[pl+11]=_a,this.uint16[pl+12]=ui,this.uint16[pl+13]=Ua,this.uint16[pl+14]=ji,this.uint16[pl+15]=bi,this.uint16[pl+16]=Fi,this.uint16[pl+17]=Zi,this.uint16[pl+18]=yo,this.uint16[pl+19]=Bo,this.uint16[pl+20]=zo,this.uint16[pl+21]=ws,this.uint16[pl+22]=Qo,this.uint32[Ku+12]=fs,this.float32[Ku+13]=Sl,this.float32[Ku+14]=Ts,this.float32[Ku+15]=ks,this.float32[Ku+16]=tu,he},I})(wa);ds.prototype.bytesPerElement=68,dr("StructArrayLayout8i15ui1ul4f68",ds);var wl=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},I.prototype.emplaceBack=function(he){var ke=this.length;return this.resize(ke+1),this.emplace(ke,he)},I.prototype.emplace=function(he,ke){var qe=he*1;return this.float32[qe+0]=ke,he},I})(wa);wl.prototype.bytesPerElement=4,dr("StructArrayLayout1f4",wl);var vs=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},I.prototype.emplaceBack=function(he,ke,qe){var et=this.length;return this.resize(et+1),this.emplace(et,he,ke,qe)},I.prototype.emplace=function(he,ke,qe,et){var Mt=he*3;return this.int16[Mt+0]=ke,this.int16[Mt+1]=qe,this.int16[Mt+2]=et,he},I})(wa);vs.prototype.bytesPerElement=6,dr("StructArrayLayout3i6",vs);var zu=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},I.prototype.emplaceBack=function(he,ke,qe){var et=this.length;return this.resize(et+1),this.emplace(et,he,ke,qe)},I.prototype.emplace=function(he,ke,qe,et){var Mt=he*2,Jt=he*4;return this.uint32[Mt+0]=ke,this.uint16[Jt+2]=qe,this.uint16[Jt+3]=et,he},I})(wa);zu.prototype.bytesPerElement=8,dr("StructArrayLayout1ul2ui8",zu);var cl=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},I.prototype.emplaceBack=function(he,ke){var qe=this.length;return this.resize(qe+1),this.emplace(qe,he,ke)},I.prototype.emplace=function(he,ke,qe){var et=he*2;return this.uint16[et+0]=ke,this.uint16[et+1]=qe,he},I})(wa);cl.prototype.bytesPerElement=4,dr("StructArrayLayout2ui4",cl);var Mu=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},I.prototype.emplaceBack=function(he){var ke=this.length;return this.resize(ke+1),this.emplace(ke,he)},I.prototype.emplace=function(he,ke){var qe=he*1;return this.uint16[qe+0]=ke,he},I})(wa);Mu.prototype.bytesPerElement=2,dr("StructArrayLayout1ui2",Mu);var Zu=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},I.prototype.emplaceBack=function(he,ke,qe,et){var Mt=this.length;return this.resize(Mt+1),this.emplace(Mt,he,ke,qe,et)},I.prototype.emplace=function(he,ke,qe,et,Mt){var Jt=he*4;return this.float32[Jt+0]=ke,this.float32[Jt+1]=qe,this.float32[Jt+2]=et,this.float32[Jt+3]=Mt,he},I})(wa);Zu.prototype.bytesPerElement=16,dr("StructArrayLayout4f16",Zu);var uc=(function(R){function I(){R.apply(this,arguments)}R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I;var $={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 $.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},$.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},$.x1.get=function(){return this._structArray.int16[this._pos2+2]},$.y1.get=function(){return this._structArray.int16[this._pos2+3]},$.x2.get=function(){return this._structArray.int16[this._pos2+4]},$.y2.get=function(){return this._structArray.int16[this._pos2+5]},$.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},$.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},$.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},$.anchorPoint.get=function(){return new s(this.anchorPointX,this.anchorPointY)},Object.defineProperties(I.prototype,$),I})(Na);uc.prototype.size=20;var kf=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype.get=function(he){return new uc(this,he)},I})(Xo);dr("CollisionBoxArray",kf);var hu=(function(R){function I(){R.apply(this,arguments)}R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I;var $={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 $.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},$.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},$.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},$.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},$.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},$.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},$.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},$.segment.get=function(){return this._structArray.uint16[this._pos2+10]},$.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},$.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},$.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},$.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},$.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},$.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},$.placedOrientation.set=function(he){this._structArray.uint8[this._pos1+37]=he},$.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},$.hidden.set=function(he){this._structArray.uint8[this._pos1+38]=he},$.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},$.crossTileID.set=function(he){this._structArray.uint32[this._pos4+10]=he},$.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(I.prototype,$),I})(Na);hu.prototype.size=48;var wu=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype.get=function(he){return new hu(this,he)},I})(ns);dr("PlacedSymbolArray",wu);var Ro=(function(R){function I(){R.apply(this,arguments)}R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I;var $={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 $.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},$.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},$.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},$.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},$.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},$.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},$.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},$.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},$.key.get=function(){return this._structArray.uint16[this._pos2+8]},$.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},$.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},$.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},$.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},$.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},$.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},$.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},$.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},$.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},$.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},$.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},$.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},$.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},$.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},$.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},$.crossTileID.set=function(he){this._structArray.uint32[this._pos4+12]=he},$.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},$.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},$.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},$.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(I.prototype,$),I})(Na);Ro.prototype.size=68;var cc=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype.get=function(he){return new Ro(this,he)},I})(ds);dr("SymbolInstanceArray",cc);var Js=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype.getoffsetX=function(he){return this.float32[he*1+0]},I})(wl);dr("GlyphOffsetArray",Js);var Zl=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype.getx=function(he){return this.int16[he*3+0]},I.prototype.gety=function(he){return this.int16[he*3+1]},I.prototype.gettileUnitDistanceFromAnchor=function(he){return this.int16[he*3+2]},I})(vs);dr("SymbolLineVertexArray",Zl);var bc=(function(R){function I(){R.apply(this,arguments)}R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I;var $={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return $.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},$.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},$.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(I.prototype,$),I})(Na);bc.prototype.size=8;var wc=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype.get=function(he){return new bc(this,he)},I})(zu);dr("FeatureIndexArray",wc);var Go=Fa([{name:"a_pos",components:2,type:"Int16"}],4),Ms=Go.members,Rs=function(I){I===void 0&&(I=[]),this.segments=I};Rs.prototype.prepareSegment=function(I,$,he,ke){var qe=this.segments[this.segments.length-1];return I>Rs.MAX_VERTEX_ARRAY_LENGTH&&G("Max vertices per segment is "+Rs.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+I),(!qe||qe.vertexLength+I>Rs.MAX_VERTEX_ARRAY_LENGTH||qe.sortKey!==ke)&&(qe={vertexOffset:$.length,primitiveOffset:he.length,vertexLength:0,primitiveLength:0},ke!==void 0&&(qe.sortKey=ke),this.segments.push(qe)),qe},Rs.prototype.get=function(){return this.segments},Rs.prototype.destroy=function(){for(var I=0,$=this.segments;I<$.length;I+=1){var he=$[I];for(var ke in he.vaos)he.vaos[ke].destroy()}},Rs.simpleSegment=function(I,$,he,ke){return new Rs([{vertexOffset:I,primitiveOffset:$,vertexLength:he,primitiveLength:ke,vaos:{},sortKey:0}])},Rs.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,dr("SegmentVector",Rs);function Me(R,I){return R=c(Math.floor(R),0,255),I=c(Math.floor(I),0,255),256*R+I}var X=Fa([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]),ye=r(function(R){function I($,he){var ke,qe,et,Mt,Jt,pr,Ar,$r;for(ke=$.length&3,qe=$.length-ke,et=he,Jt=3432918353,pr=461845907,$r=0;$r<qe;)Ar=$.charCodeAt($r)&255|($.charCodeAt(++$r)&255)<<8|($.charCodeAt(++$r)&255)<<16|($.charCodeAt(++$r)&255)<<24,++$r,Ar=(Ar&65535)*Jt+(((Ar>>>16)*Jt&65535)<<16)&4294967295,Ar=Ar<<15|Ar>>>17,Ar=(Ar&65535)*pr+(((Ar>>>16)*pr&65535)<<16)&4294967295,et^=Ar,et=et<<13|et>>>19,Mt=(et&65535)*5+(((et>>>16)*5&65535)<<16)&4294967295,et=(Mt&65535)+27492+(((Mt>>>16)+58964&65535)<<16);switch(Ar=0,ke){case 3:Ar^=($.charCodeAt($r+2)&255)<<16;case 2:Ar^=($.charCodeAt($r+1)&255)<<8;case 1:Ar^=$.charCodeAt($r)&255,Ar=(Ar&65535)*Jt+(((Ar>>>16)*Jt&65535)<<16)&4294967295,Ar=Ar<<15|Ar>>>17,Ar=(Ar&65535)*pr+(((Ar>>>16)*pr&65535)<<16)&4294967295,et^=Ar}return et^=$.length,et^=et>>>16,et=(et&65535)*2246822507+(((et>>>16)*2246822507&65535)<<16)&4294967295,et^=et>>>13,et=(et&65535)*3266489909+(((et>>>16)*3266489909&65535)<<16)&4294967295,et^=et>>>16,et>>>0}R.exports=I}),ne=r(function(R){function I($,he){for(var ke=$.length,qe=he^ke,et=0,Mt;ke>=4;)Mt=$.charCodeAt(et)&255|($.charCodeAt(++et)&255)<<8|($.charCodeAt(++et)&255)<<16|($.charCodeAt(++et)&255)<<24,Mt=(Mt&65535)*1540483477+(((Mt>>>16)*1540483477&65535)<<16),Mt^=Mt>>>24,Mt=(Mt&65535)*1540483477+(((Mt>>>16)*1540483477&65535)<<16),qe=(qe&65535)*1540483477+(((qe>>>16)*1540483477&65535)<<16)^Mt,ke-=4,++et;switch(ke){case 3:qe^=($.charCodeAt(et+2)&255)<<16;case 2:qe^=($.charCodeAt(et+1)&255)<<8;case 1:qe^=$.charCodeAt(et)&255,qe=(qe&65535)*1540483477+(((qe>>>16)*1540483477&65535)<<16)}return qe^=qe>>>13,qe=(qe&65535)*1540483477+(((qe>>>16)*1540483477&65535)<<16),qe^=qe>>>15,qe>>>0}R.exports=I}),Se=ye,Je=ye,xt=ne;Se.murmur3=Je,Se.murmur2=xt;var At=function(){this.ids=[],this.positions=[],this.indexed=!1};At.prototype.add=function(I,$,he,ke){this.ids.push(pt(I)),this.positions.push($,he,ke)},At.prototype.getPositions=function(I){for(var $=pt(I),he=0,ke=this.ids.length-1;he<ke;){var qe=he+ke>>1;this.ids[qe]>=$?ke=qe:he=qe+1}for(var et=[];this.ids[he]===$;){var Mt=this.positions[3*he],Jt=this.positions[3*he+1],pr=this.positions[3*he+2];et.push({index:Mt,start:Jt,end:pr}),he++}return et},At.serialize=function(I,$){var he=new Float64Array(I.ids),ke=new Uint32Array(I.positions);return Rt(he,ke,0,he.length-1),$&&$.push(he.buffer,ke.buffer),{ids:he,positions:ke}},At.deserialize=function(I){var $=new At;return $.ids=I.ids,$.positions=I.positions,$.indexed=!0,$};var it=Math.pow(2,53)-1;function pt(R){var I=+R;return!isNaN(I)&&I<=it?I:Se(String(R))}function Rt(R,I,$,he){for(;$<he;){for(var ke=R[$+he>>1],qe=$-1,et=he+1;;){do qe++;while(R[qe]<ke);do et--;while(R[et]>ke);if(qe>=et)break;or(R,qe,et),or(I,3*qe,3*et),or(I,3*qe+1,3*et+1),or(I,3*qe+2,3*et+2)}et-$<he-et?(Rt(R,I,$,et),$=et+1):(Rt(R,I,et+1,he),he=et)}}function or(R,I,$){var he=R[I];R[I]=R[$],R[$]=he}dr("FeaturePositionMap",At);var er=function(I,$){this.gl=I.gl,this.location=$},ur=(function(R){function I($,he){R.call(this,$,he),this.current=0}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype.set=function(he){this.current!==he&&(this.current=he,this.gl.uniform1i(this.location,he))},I})(er),gr=(function(R){function I($,he){R.call(this,$,he),this.current=0}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype.set=function(he){this.current!==he&&(this.current=he,this.gl.uniform1f(this.location,he))},I})(er),vr=(function(R){function I($,he){R.call(this,$,he),this.current=[0,0]}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype.set=function(he){(he[0]!==this.current[0]||he[1]!==this.current[1])&&(this.current=he,this.gl.uniform2f(this.location,he[0],he[1]))},I})(er),Zt=(function(R){function I($,he){R.call(this,$,he),this.current=[0,0,0]}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype.set=function(he){(he[0]!==this.current[0]||he[1]!==this.current[1]||he[2]!==this.current[2])&&(this.current=he,this.gl.uniform3f(this.location,he[0],he[1],he[2]))},I})(er),ar=(function(R){function I($,he){R.call(this,$,he),this.current=[0,0,0,0]}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype.set=function(he){(he[0]!==this.current[0]||he[1]!==this.current[1]||he[2]!==this.current[2]||he[3]!==this.current[3])&&(this.current=he,this.gl.uniform4f(this.location,he[0],he[1],he[2],he[3]))},I})(er),tr=(function(R){function I($,he){R.call(this,$,he),this.current=zl.transparent}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype.set=function(he){(he.r!==this.current.r||he.g!==this.current.g||he.b!==this.current.b||he.a!==this.current.a)&&(this.current=he,this.gl.uniform4f(this.location,he.r,he.g,he.b,he.a))},I})(er),Zr=new Float32Array(16),un=(function(R){function I($,he){R.call(this,$,he),this.current=Zr}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype.set=function(he){if(he[12]!==this.current[12]||he[0]!==this.current[0]){this.current=he,this.gl.uniformMatrix4fv(this.location,!1,he);return}for(var ke=1;ke<16;ke++)if(he[ke]!==this.current[ke]){this.current=he,this.gl.uniformMatrix4fv(this.location,!1,he);break}},I})(er);function En(R){return[Me(255*R.r,255*R.g),Me(255*R.b,255*R.a)]}var ka=function(I,$,he){this.value=I,this.uniformNames=$.map(function(ke){return"u_"+ke}),this.type=he};ka.prototype.setUniform=function(I,$,he){I.set(he.constantOr(this.value))},ka.prototype.getBinding=function(I,$,he){return this.type==="color"?new tr(I,$):new gr(I,$)};var ma=function(I,$){this.uniformNames=$.map(function(he){return"u_"+he}),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1};ma.prototype.setConstantPatternPositions=function(I,$){this.pixelRatioFrom=$.pixelRatio,this.pixelRatioTo=I.pixelRatio,this.patternFrom=$.tlbr,this.patternTo=I.tlbr},ma.prototype.setUniform=function(I,$,he,ke){var qe=ke==="u_pattern_to"?this.patternTo:ke==="u_pattern_from"?this.patternFrom:ke==="u_pixel_ratio_to"?this.pixelRatioTo:ke==="u_pixel_ratio_from"?this.pixelRatioFrom:null;qe&&I.set(qe)},ma.prototype.getBinding=function(I,$,he){return he.substr(0,9)==="u_pattern"?new ar(I,$):new gr(I,$)};var ha=function(I,$,he,ke){this.expression=I,this.type=he,this.maxValue=0,this.paintVertexAttributes=$.map(function(qe){return{name:"a_"+qe,type:"Float32",components:he==="color"?2:1,offset:0}}),this.paintVertexArray=new ke};ha.prototype.populatePaintArray=function(I,$,he,ke,qe){var et=this.paintVertexArray.length,Mt=this.expression.evaluate(new jl(0),$,{},ke,[],qe);this.paintVertexArray.resize(I),this._setPaintValue(et,I,Mt)},ha.prototype.updatePaintArray=function(I,$,he,ke){var qe=this.expression.evaluate({zoom:0},he,ke);this._setPaintValue(I,$,qe)},ha.prototype._setPaintValue=function(I,$,he){if(this.type==="color")for(var ke=En(he),qe=I;qe<$;qe++)this.paintVertexArray.emplace(qe,ke[0],ke[1]);else{for(var et=I;et<$;et++)this.paintVertexArray.emplace(et,he);this.maxValue=Math.max(this.maxValue,Math.abs(he))}},ha.prototype.upload=function(I){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=I.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},ha.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()};var Pa=function(I,$,he,ke,qe,et){this.expression=I,this.uniformNames=$.map(function(Mt){return"u_"+Mt+"_t"}),this.type=he,this.useIntegerZoom=ke,this.zoom=qe,this.maxValue=0,this.paintVertexAttributes=$.map(function(Mt){return{name:"a_"+Mt,type:"Float32",components:he==="color"?4:2,offset:0}}),this.paintVertexArray=new et};Pa.prototype.populatePaintArray=function(I,$,he,ke,qe){var et=this.expression.evaluate(new jl(this.zoom),$,{},ke,[],qe),Mt=this.expression.evaluate(new jl(this.zoom+1),$,{},ke,[],qe),Jt=this.paintVertexArray.length;this.paintVertexArray.resize(I),this._setPaintValue(Jt,I,et,Mt)},Pa.prototype.updatePaintArray=function(I,$,he,ke){var qe=this.expression.evaluate({zoom:this.zoom},he,ke),et=this.expression.evaluate({zoom:this.zoom+1},he,ke);this._setPaintValue(I,$,qe,et)},Pa.prototype._setPaintValue=function(I,$,he,ke){if(this.type==="color")for(var qe=En(he),et=En(ke),Mt=I;Mt<$;Mt++)this.paintVertexArray.emplace(Mt,qe[0],qe[1],et[0],et[1]);else{for(var Jt=I;Jt<$;Jt++)this.paintVertexArray.emplace(Jt,he,ke);this.maxValue=Math.max(this.maxValue,Math.abs(he),Math.abs(ke))}},Pa.prototype.upload=function(I){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=I.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},Pa.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},Pa.prototype.setUniform=function(I,$){var he=this.useIntegerZoom?Math.floor($.zoom):$.zoom,ke=c(this.expression.interpolationFactor(he,this.zoom,this.zoom+1),0,1);I.set(ke)},Pa.prototype.getBinding=function(I,$,he){return new gr(I,$)};var Da=function(I,$,he,ke,qe,et){this.expression=I,this.type=$,this.useIntegerZoom=he,this.zoom=ke,this.layerId=et,this.zoomInPaintVertexArray=new qe,this.zoomOutPaintVertexArray=new qe};Da.prototype.populatePaintArray=function(I,$,he){var ke=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(I),this.zoomOutPaintVertexArray.resize(I),this._setPaintValues(ke,I,$.patterns&&$.patterns[this.layerId],he)},Da.prototype.updatePaintArray=function(I,$,he,ke,qe){this._setPaintValues(I,$,he.patterns&&he.patterns[this.layerId],qe)},Da.prototype._setPaintValues=function(I,$,he,ke){if(!(!ke||!he)){var qe=he.min,et=he.mid,Mt=he.max,Jt=ke[qe],pr=ke[et],Ar=ke[Mt];if(!(!Jt||!pr||!Ar))for(var $r=I;$r<$;$r++)this.zoomInPaintVertexArray.emplace($r,pr.tl[0],pr.tl[1],pr.br[0],pr.br[1],Jt.tl[0],Jt.tl[1],Jt.br[0],Jt.br[1],pr.pixelRatio,Jt.pixelRatio),this.zoomOutPaintVertexArray.emplace($r,pr.tl[0],pr.tl[1],pr.br[0],pr.br[1],Ar.tl[0],Ar.tl[1],Ar.br[0],Ar.br[1],pr.pixelRatio,Ar.pixelRatio)}},Da.prototype.upload=function(I){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=I.createVertexBuffer(this.zoomInPaintVertexArray,X.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=I.createVertexBuffer(this.zoomOutPaintVertexArray,X.members,this.expression.isStateDependent))},Da.prototype.destroy=function(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()};var Qa=function(I,$,he){this.binders={},this._buffers=[];var ke=[];for(var qe in I.paint._values)if(he(qe)){var et=I.paint.get(qe);if(!(!(et instanceof Xn)||!Ou(et.property.specification))){var Mt=ii(qe,I.type),Jt=et.value,pr=et.property.specification.type,Ar=et.property.useIntegerZoom,$r=et.property.specification["property-type"],gn=$r==="cross-faded"||$r==="cross-faded-data-driven";if(Jt.kind==="constant")this.binders[qe]=gn?new ma(Jt.value,Mt):new ka(Jt.value,Mt,pr),ke.push("/u_"+qe);else if(Jt.kind==="source"||gn){var hn=Xi(qe,pr,"source");this.binders[qe]=gn?new Da(Jt,pr,Ar,$,hn,I.id):new ha(Jt,Mt,pr,hn),ke.push("/a_"+qe)}else{var zn=Xi(qe,pr,"composite");this.binders[qe]=new Pa(Jt,Mt,pr,Ar,$,zn),ke.push("/z_"+qe)}}}this.cacheKey=ke.sort().join("")};Qa.prototype.getMaxValue=function(I){var $=this.binders[I];return $ instanceof ha||$ instanceof Pa?$.maxValue:0},Qa.prototype.populatePaintArrays=function(I,$,he,ke,qe){for(var et in this.binders){var Mt=this.binders[et];(Mt instanceof ha||Mt instanceof Pa||Mt instanceof Da)&&Mt.populatePaintArray(I,$,he,ke,qe)}},Qa.prototype.setConstantPatternPositions=function(I,$){for(var he in this.binders){var ke=this.binders[he];ke instanceof ma&&ke.setConstantPatternPositions(I,$)}},Qa.prototype.updatePaintArrays=function(I,$,he,ke,qe){var et=!1;for(var Mt in I)for(var Jt=$.getPositions(Mt),pr=0,Ar=Jt;pr<Ar.length;pr+=1){var $r=Ar[pr],gn=he.feature($r.index);for(var hn in this.binders){var zn=this.binders[hn];if((zn instanceof ha||zn instanceof Pa||zn instanceof Da)&&zn.expression.isStateDependent===!0){var _a=ke.paint.get(hn);zn.expression=_a.value,zn.updatePaintArray($r.start,$r.end,gn,I[Mt],qe),et=!0}}}return et},Qa.prototype.defines=function(){var I=[];for(var $ in this.binders){var he=this.binders[$];(he instanceof ka||he instanceof ma)&&I.push.apply(I,he.uniformNames.map(function(ke){return"#define HAS_UNIFORM_"+ke}))}return I},Qa.prototype.getBinderAttributes=function(){var I=[];for(var $ in this.binders){var he=this.binders[$];if(he instanceof ha||he instanceof Pa)for(var ke=0;ke<he.paintVertexAttributes.length;ke++)I.push(he.paintVertexAttributes[ke].name);else if(he instanceof Da)for(var qe=0;qe<X.members.length;qe++)I.push(X.members[qe].name)}return I},Qa.prototype.getBinderUniforms=function(){var I=[];for(var $ in this.binders){var he=this.binders[$];if(he instanceof ka||he instanceof ma||he instanceof Pa)for(var ke=0,qe=he.uniformNames;ke<qe.length;ke+=1){var et=qe[ke];I.push(et)}}return I},Qa.prototype.getPaintVertexBuffers=function(){return this._buffers},Qa.prototype.getUniforms=function(I,$){var he=[];for(var ke in this.binders){var qe=this.binders[ke];if(qe instanceof ka||qe instanceof ma||qe instanceof Pa)for(var et=0,Mt=qe.uniformNames;et<Mt.length;et+=1){var Jt=Mt[et];if($[Jt]){var pr=qe.getBinding(I,$[Jt],Jt);he.push({name:Jt,property:ke,binding:pr})}}}return he},Qa.prototype.setUniforms=function(I,$,he,ke){for(var qe=0,et=$;qe<et.length;qe+=1){var Mt=et[qe],Jt=Mt.name,pr=Mt.property,Ar=Mt.binding;this.binders[pr].setUniform(Ar,ke,he.get(pr),Jt)}},Qa.prototype.updatePaintBuffers=function(I){this._buffers=[];for(var $ in this.binders){var he=this.binders[$];if(I&&he instanceof Da){var ke=I.fromScale===2?he.zoomInPaintVertexBuffer:he.zoomOutPaintVertexBuffer;ke&&this._buffers.push(ke)}else(he instanceof ha||he instanceof Pa)&&he.paintVertexBuffer&&this._buffers.push(he.paintVertexBuffer)}},Qa.prototype.upload=function(I){for(var $ in this.binders){var he=this.binders[$];(he instanceof ha||he instanceof Pa||he instanceof Da)&&he.upload(I)}this.updatePaintBuffers()},Qa.prototype.destroy=function(){for(var I in this.binders){var $=this.binders[I];($ instanceof ha||$ instanceof Pa||$ instanceof Da)&&$.destroy()}};var Ra=function(I,$,he){he===void 0&&(he=function(){return!0}),this.programConfigurations={};for(var ke=0,qe=I;ke<qe.length;ke+=1){var et=qe[ke];this.programConfigurations[et.id]=new Qa(et,$,he)}this.needsUpload=!1,this._featureMap=new At,this._bufferOffset=0};Ra.prototype.populatePaintArrays=function(I,$,he,ke,qe,et){for(var Mt in this.programConfigurations)this.programConfigurations[Mt].populatePaintArrays(I,$,ke,qe,et);$.id!==void 0&&this._featureMap.add($.id,he,this._bufferOffset,I),this._bufferOffset=I,this.needsUpload=!0},Ra.prototype.updatePaintArrays=function(I,$,he,ke){for(var qe=0,et=he;qe<et.length;qe+=1){var Mt=et[qe];this.needsUpload=this.programConfigurations[Mt.id].updatePaintArrays(I,this._featureMap,$,Mt,ke)||this.needsUpload}},Ra.prototype.get=function(I){return this.programConfigurations[I]},Ra.prototype.upload=function(I){if(this.needsUpload){for(var $ in this.programConfigurations)this.programConfigurations[$].upload(I);this.needsUpload=!1}},Ra.prototype.destroy=function(){for(var I in this.programConfigurations)this.programConfigurations[I].destroy()};function ii(R,I){var $={"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 $[R]||[R.replace(I+"-","").replace(/-/g,"_")]}function xi(R){var I={"line-pattern":{source:Jn,composite:Jn},"fill-pattern":{source:Jn,composite:Jn},"fill-extrusion-pattern":{source:Jn,composite:Jn}};return I[R]}function Xi(R,I,$){var he={color:{source:ki,composite:Zu},number:{source:wl,composite:ki}},ke=xi(R);return ke&&ke[$]||he[I][$]}dr("ConstantBinder",ka),dr("CrossFadedConstantBinder",ma),dr("SourceExpressionBinder",ha),dr("CrossFadedCompositeBinder",Da),dr("CompositeExpressionBinder",Pa),dr("ProgramConfiguration",Qa,{omit:["_buffers"]}),dr("ProgramConfigurationSet",Ra);var co=8192,Is=15,Cs=Math.pow(2,Is-1)-1,kl=-Cs-1;function Tl(R){for(var I=co/R.extent,$=R.loadGeometry(),he=0;he<$.length;he++)for(var ke=$[he],qe=0;qe<ke.length;qe++){var et=ke[qe],Mt=Math.round(et.x*I),Jt=Math.round(et.y*I);et.x=c(Mt,kl,Cs),et.y=c(Jt,kl,Cs),(Mt<et.x||Mt>et.x+1||Jt<et.y||Jt>et.y+1)&&G("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return $}function Rl(R,I){return{type:R.type,id:R.id,properties:R.properties,geometry:I?Tl(R):[]}}function Pl(R,I,$,he,ke){R.emplaceBack(I*2+(he+1)/2,$*2+(ke+1)/2)}var fc=function(I){this.zoom=I.zoom,this.overscaling=I.overscaling,this.layers=I.layers,this.layerIds=this.layers.map(function($){return $.id}),this.index=I.index,this.hasPattern=!1,this.layoutVertexArray=new li,this.indexArray=new Uo,this.segments=new Rs,this.programConfigurations=new Ra(I.layers,I.zoom),this.stateDependentLayerIds=this.layers.filter(function($){return $.isStateDependent()}).map(function($){return $.id})};fc.prototype.populate=function(I,$,he){var ke=this.layers[0],qe=[],et=null;ke.type==="circle"&&(et=ke.layout.get("circle-sort-key"));for(var Mt=0,Jt=I;Mt<Jt.length;Mt+=1){var pr=Jt[Mt],Ar=pr.feature,$r=pr.id,gn=pr.index,hn=pr.sourceLayerIndex,zn=this.layers[0]._featureFilter.needGeometry,_a=Rl(Ar,zn);if(this.layers[0]._featureFilter.filter(new jl(this.zoom),_a,he)){var ui=et?et.evaluate(_a,{},he):void 0,Ua={id:$r,properties:Ar.properties,type:Ar.type,sourceLayerIndex:hn,index:gn,geometry:zn?_a.geometry:Tl(Ar),patterns:{},sortKey:ui};qe.push(Ua)}}et&&qe.sort(function(Qo,fs){return Qo.sortKey-fs.sortKey});for(var ji=0,bi=qe;ji<bi.length;ji+=1){var Fi=bi[ji],Zi=Fi,yo=Zi.geometry,Bo=Zi.index,zo=Zi.sourceLayerIndex,ws=I[Bo].feature;this.addFeature(Fi,yo,Bo,he),$.featureIndex.insert(ws,yo,Bo,zo,this.index)}},fc.prototype.update=function(I,$,he){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(I,$,this.stateDependentLayers,he)},fc.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},fc.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},fc.prototype.upload=function(I){this.uploaded||(this.layoutVertexBuffer=I.createVertexBuffer(this.layoutVertexArray,Ms),this.indexBuffer=I.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(I),this.uploaded=!0},fc.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},fc.prototype.addFeature=function(I,$,he,ke){for(var qe=0,et=$;qe<et.length;qe+=1)for(var Mt=et[qe],Jt=0,pr=Mt;Jt<pr.length;Jt+=1){var Ar=pr[Jt],$r=Ar.x,gn=Ar.y;if(!($r<0||$r>=co||gn<0||gn>=co)){var hn=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,I.sortKey),zn=hn.vertexLength;Pl(this.layoutVertexArray,$r,gn,-1,-1),Pl(this.layoutVertexArray,$r,gn,1,-1),Pl(this.layoutVertexArray,$r,gn,1,1),Pl(this.layoutVertexArray,$r,gn,-1,1),this.indexArray.emplaceBack(zn,zn+1,zn+2),this.indexArray.emplaceBack(zn,zn+3,zn+2),hn.vertexLength+=4,hn.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,I,he,{},ke)},dr("CircleBucket",fc,{omit:["layers"]});function yl(R,I){for(var $=0;$<R.length;$++)if(Mv(I,R[$]))return!0;for(var he=0;he<I.length;he++)if(Mv(R,I[he]))return!0;return!!Mp(R,I)}function Lu(R,I,$){return!!(Mv(R,I)||Qp(I,R,$))}function ch(R,I){if(R.length===1)return dm(I,R[0]);for(var $=0;$<I.length;$++)for(var he=I[$],ke=0;ke<he.length;ke++)if(Mv(R,he[ke]))return!0;for(var qe=0;qe<R.length;qe++)if(dm(I,R[qe]))return!0;for(var et=0;et<I.length;et++)if(Mp(R,I[et]))return!0;return!1}function Uh(R,I,$){for(var he=0;he<I.length;he++){var ke=I[he];if(R.length>=3){for(var qe=0;qe<ke.length;qe++)if(Mv(R,ke[qe]))return!0}if(Ep(R,ke,$))return!0}return!1}function Ep(R,I,$){if(R.length>1){if(Mp(R,I))return!0;for(var he=0;he<I.length;he++)if(Qp(I[he],R,$))return!0}for(var ke=0;ke<R.length;ke++)if(Qp(R[ke],I,$))return!0;return!1}function Mp(R,I){if(R.length===0||I.length===0)return!1;for(var $=0;$<R.length-1;$++)for(var he=R[$],ke=R[$+1],qe=0;qe<I.length-1;qe++){var et=I[qe],Mt=I[qe+1];if(Ev(he,ke,et,Mt))return!0}return!1}function Ev(R,I,$,he){return J(R,$,he)!==J(I,$,he)&&J(R,I,$)!==J(R,I,he)}function Qp(R,I,$){var he=$*$;if(I.length===1)return R.distSqr(I[0])<he;for(var ke=1;ke<I.length;ke++){var qe=I[ke-1],et=I[ke];if(ng(R,qe,et)<he)return!0}return!1}function ng(R,I,$){var he=I.distSqr($);if(he===0)return R.distSqr(I);var ke=((R.x-I.x)*($.x-I.x)+(R.y-I.y)*($.y-I.y))/he;return ke<0?R.distSqr(I):ke>1?R.distSqr($):R.distSqr($.sub(I)._mult(ke)._add(I))}function dm(R,I){for(var $=!1,he,ke,qe,et=0;et<R.length;et++){he=R[et];for(var Mt=0,Jt=he.length-1;Mt<he.length;Jt=Mt++)ke=he[Mt],qe=he[Jt],ke.y>I.y!=qe.y>I.y&&I.x<(qe.x-ke.x)*(I.y-ke.y)/(qe.y-ke.y)+ke.x&&($=!$)}return $}function Mv(R,I){for(var $=!1,he=0,ke=R.length-1;he<R.length;ke=he++){var qe=R[he],et=R[ke];qe.y>I.y!=et.y>I.y&&I.x<(et.x-qe.x)*(I.y-qe.y)/(et.y-qe.y)+qe.x&&($=!$)}return $}function vm(R,I,$,he,ke){for(var qe=0,et=R;qe<et.length;qe+=1){var Mt=et[qe];if(I<=Mt.x&&$<=Mt.y&&he>=Mt.x&&ke>=Mt.y)return!0}var Jt=[new s(I,$),new s(I,ke),new s(he,ke),new s(he,$)];if(R.length>2)for(var pr=0,Ar=Jt;pr<Ar.length;pr+=1){var $r=Ar[pr];if(Mv(R,$r))return!0}for(var gn=0;gn<R.length-1;gn++){var hn=R[gn],zn=R[gn+1];if(Xv(hn,zn,Jt))return!0}return!1}function Xv(R,I,$){var he=$[0],ke=$[2];if(R.x<he.x&&I.x<he.x||R.x>ke.x&&I.x>ke.x||R.y<he.y&&I.y<he.y||R.y>ke.y&&I.y>ke.y)return!1;var qe=J(R,I,$[0]);return qe!==J(R,I,$[1])||qe!==J(R,I,$[2])||qe!==J(R,I,$[3])}function Cv(R,I,$){var he=I.paint.get(R).value;return he.kind==="constant"?he.value:$.programConfigurations.get(I.id).getMaxValue(R)}function Cp(R){return Math.sqrt(R[0]*R[0]+R[1]*R[1])}function em(R,I,$,he,ke){if(!I[0]&&!I[1])return R;var qe=s.convert(I)._mult(ke);$==="viewport"&&qe._rotate(-he);for(var et=[],Mt=0;Mt<R.length;Mt++){var Jt=R[Mt];et.push(Jt.sub(qe))}return et}var kp=new gi({"circle-sort-key":new Pn(Ni.layout_circle["circle-sort-key"])}),i1=new gi({"circle-radius":new Pn(Ni.paint_circle["circle-radius"]),"circle-color":new Pn(Ni.paint_circle["circle-color"]),"circle-blur":new Pn(Ni.paint_circle["circle-blur"]),"circle-opacity":new Pn(Ni.paint_circle["circle-opacity"]),"circle-translate":new Rn(Ni.paint_circle["circle-translate"]),"circle-translate-anchor":new Rn(Ni.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new Rn(Ni.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new Rn(Ni.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new Pn(Ni.paint_circle["circle-stroke-width"]),"circle-stroke-color":new Pn(Ni.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new Pn(Ni.paint_circle["circle-stroke-opacity"])}),ag={paint:i1,layout:kp},vd=typeof Float32Array<"u"?Float32Array:Array;Math.hypot||(Math.hypot=function(){for(var R=arguments,I=0,$=arguments.length;$--;)I+=R[$]*R[$];return Math.sqrt(I)});function ig(){var R=new vd(4);return vd!=Float32Array&&(R[1]=0,R[2]=0),R[0]=1,R[3]=1,R}function o1(R,I,$){var he=I[0],ke=I[1],qe=I[2],et=I[3],Mt=Math.sin($),Jt=Math.cos($);return R[0]=he*Jt+qe*Mt,R[1]=ke*Jt+et*Mt,R[2]=he*-Mt+qe*Jt,R[3]=ke*-Mt+et*Jt,R}function Kd(){var R=new vd(9);return vd!=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 ey(R,I){var $=Math.sin(I),he=Math.cos(I);return R[0]=he,R[1]=$,R[2]=0,R[3]=-$,R[4]=he,R[5]=0,R[6]=0,R[7]=0,R[8]=1,R}function I_(){var R=new vd(16);return vd!=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 D_(R){var I=new vd(16);return I[0]=R[0],I[1]=R[1],I[2]=R[2],I[3]=R[3],I[4]=R[4],I[5]=R[5],I[6]=R[6],I[7]=R[7],I[8]=R[8],I[9]=R[9],I[10]=R[10],I[11]=R[11],I[12]=R[12],I[13]=R[13],I[14]=R[14],I[15]=R[15],I}function s1(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 ty(R,I){var $=I[0],he=I[1],ke=I[2],qe=I[3],et=I[4],Mt=I[5],Jt=I[6],pr=I[7],Ar=I[8],$r=I[9],gn=I[10],hn=I[11],zn=I[12],_a=I[13],ui=I[14],Ua=I[15],ji=$*Mt-he*et,bi=$*Jt-ke*et,Fi=$*pr-qe*et,Zi=he*Jt-ke*Mt,yo=he*pr-qe*Mt,Bo=ke*pr-qe*Jt,zo=Ar*_a-$r*zn,ws=Ar*ui-gn*zn,Qo=Ar*Ua-hn*zn,fs=$r*ui-gn*_a,Sl=$r*Ua-hn*_a,Ts=gn*Ua-hn*ui,ks=ji*Ts-bi*Sl+Fi*fs+Zi*Qo-yo*ws+Bo*zo;return ks?(ks=1/ks,R[0]=(Mt*Ts-Jt*Sl+pr*fs)*ks,R[1]=(ke*Sl-he*Ts-qe*fs)*ks,R[2]=(_a*Bo-ui*yo+Ua*Zi)*ks,R[3]=(gn*yo-$r*Bo-hn*Zi)*ks,R[4]=(Jt*Qo-et*Ts-pr*ws)*ks,R[5]=($*Ts-ke*Qo+qe*ws)*ks,R[6]=(ui*Fi-zn*Bo-Ua*bi)*ks,R[7]=(Ar*Bo-gn*Fi+hn*bi)*ks,R[8]=(et*Sl-Mt*Qo+pr*zo)*ks,R[9]=(he*Qo-$*Sl-qe*zo)*ks,R[10]=(zn*yo-_a*Fi+Ua*ji)*ks,R[11]=($r*Fi-Ar*yo-hn*ji)*ks,R[12]=(Mt*ws-et*fs-Jt*zo)*ks,R[13]=($*fs-he*ws+ke*zo)*ks,R[14]=(_a*bi-zn*Zi-ui*ji)*ks,R[15]=(Ar*Zi-$r*bi+gn*ji)*ks,R):null}function ry(R,I,$){var he=I[0],ke=I[1],qe=I[2],et=I[3],Mt=I[4],Jt=I[5],pr=I[6],Ar=I[7],$r=I[8],gn=I[9],hn=I[10],zn=I[11],_a=I[12],ui=I[13],Ua=I[14],ji=I[15],bi=$[0],Fi=$[1],Zi=$[2],yo=$[3];return R[0]=bi*he+Fi*Mt+Zi*$r+yo*_a,R[1]=bi*ke+Fi*Jt+Zi*gn+yo*ui,R[2]=bi*qe+Fi*pr+Zi*hn+yo*Ua,R[3]=bi*et+Fi*Ar+Zi*zn+yo*ji,bi=$[4],Fi=$[5],Zi=$[6],yo=$[7],R[4]=bi*he+Fi*Mt+Zi*$r+yo*_a,R[5]=bi*ke+Fi*Jt+Zi*gn+yo*ui,R[6]=bi*qe+Fi*pr+Zi*hn+yo*Ua,R[7]=bi*et+Fi*Ar+Zi*zn+yo*ji,bi=$[8],Fi=$[9],Zi=$[10],yo=$[11],R[8]=bi*he+Fi*Mt+Zi*$r+yo*_a,R[9]=bi*ke+Fi*Jt+Zi*gn+yo*ui,R[10]=bi*qe+Fi*pr+Zi*hn+yo*Ua,R[11]=bi*et+Fi*Ar+Zi*zn+yo*ji,bi=$[12],Fi=$[13],Zi=$[14],yo=$[15],R[12]=bi*he+Fi*Mt+Zi*$r+yo*_a,R[13]=bi*ke+Fi*Jt+Zi*gn+yo*ui,R[14]=bi*qe+Fi*pr+Zi*hn+yo*Ua,R[15]=bi*et+Fi*Ar+Zi*zn+yo*ji,R}function Pf(R,I,$){var he=$[0],ke=$[1],qe=$[2],et,Mt,Jt,pr,Ar,$r,gn,hn,zn,_a,ui,Ua;return I===R?(R[12]=I[0]*he+I[4]*ke+I[8]*qe+I[12],R[13]=I[1]*he+I[5]*ke+I[9]*qe+I[13],R[14]=I[2]*he+I[6]*ke+I[10]*qe+I[14],R[15]=I[3]*he+I[7]*ke+I[11]*qe+I[15]):(et=I[0],Mt=I[1],Jt=I[2],pr=I[3],Ar=I[4],$r=I[5],gn=I[6],hn=I[7],zn=I[8],_a=I[9],ui=I[10],Ua=I[11],R[0]=et,R[1]=Mt,R[2]=Jt,R[3]=pr,R[4]=Ar,R[5]=$r,R[6]=gn,R[7]=hn,R[8]=zn,R[9]=_a,R[10]=ui,R[11]=Ua,R[12]=et*he+Ar*ke+zn*qe+I[12],R[13]=Mt*he+$r*ke+_a*qe+I[13],R[14]=Jt*he+gn*ke+ui*qe+I[14],R[15]=pr*he+hn*ke+Ua*qe+I[15]),R}function Tc(R,I,$){var he=$[0],ke=$[1],qe=$[2];return R[0]=I[0]*he,R[1]=I[1]*he,R[2]=I[2]*he,R[3]=I[3]*he,R[4]=I[4]*ke,R[5]=I[5]*ke,R[6]=I[6]*ke,R[7]=I[7]*ke,R[8]=I[8]*qe,R[9]=I[9]*qe,R[10]=I[10]*qe,R[11]=I[11]*qe,R[12]=I[12],R[13]=I[13],R[14]=I[14],R[15]=I[15],R}function kv(R,I,$){var he=Math.sin($),ke=Math.cos($),qe=I[4],et=I[5],Mt=I[6],Jt=I[7],pr=I[8],Ar=I[9],$r=I[10],gn=I[11];return I!==R&&(R[0]=I[0],R[1]=I[1],R[2]=I[2],R[3]=I[3],R[12]=I[12],R[13]=I[13],R[14]=I[14],R[15]=I[15]),R[4]=qe*ke+pr*he,R[5]=et*ke+Ar*he,R[6]=Mt*ke+$r*he,R[7]=Jt*ke+gn*he,R[8]=pr*ke-qe*he,R[9]=Ar*ke-et*he,R[10]=$r*ke-Mt*he,R[11]=gn*ke-Jt*he,R}function l1(R,I,$){var he=Math.sin($),ke=Math.cos($),qe=I[0],et=I[1],Mt=I[2],Jt=I[3],pr=I[4],Ar=I[5],$r=I[6],gn=I[7];return I!==R&&(R[8]=I[8],R[9]=I[9],R[10]=I[10],R[11]=I[11],R[12]=I[12],R[13]=I[13],R[14]=I[14],R[15]=I[15]),R[0]=qe*ke+pr*he,R[1]=et*ke+Ar*he,R[2]=Mt*ke+$r*he,R[3]=Jt*ke+gn*he,R[4]=pr*ke-qe*he,R[5]=Ar*ke-et*he,R[6]=$r*ke-Mt*he,R[7]=gn*ke-Jt*he,R}function O_(R,I,$,he,ke){var qe=1/Math.tan(I/2),et;return R[0]=qe/$,R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[5]=qe,R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[11]=-1,R[12]=0,R[13]=0,R[15]=0,ke!=null&&ke!==1/0?(et=1/(he-ke),R[10]=(ke+he)*et,R[14]=2*ke*he*et):(R[10]=-1,R[14]=-2*he),R}function Oc(R,I,$,he,ke,qe,et){var Mt=1/(I-$),Jt=1/(he-ke),pr=1/(qe-et);return R[0]=-2*Mt,R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[5]=-2*Jt,R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[10]=2*pr,R[11]=0,R[12]=(I+$)*Mt,R[13]=(ke+he)*Jt,R[14]=(et+qe)*pr,R[15]=1,R}var jb=ry;function ny(){var R=new vd(3);return vd!=Float32Array&&(R[0]=0,R[1]=0,R[2]=0),R}function b3(R){var I=new vd(3);return I[0]=R[0],I[1]=R[1],I[2]=R[2],I}function Pp(R,I,$){return R[0]=I[0]+$[0],R[1]=I[1]+$[1],R[2]=I[2]+$[2],R}function ay(R,I,$){return R[0]=I[0]-$[0],R[1]=I[1]-$[1],R[2]=I[2]-$[2],R}function w3(R,I,$){return R[0]=I[0]*$,R[1]=I[1]*$,R[2]=I[2]*$,R}function Ub(R,I){var $=I[0],he=I[1],ke=I[2],qe=$*$+he*he+ke*ke;return qe>0&&(qe=1/Math.sqrt(qe)),R[0]=I[0]*qe,R[1]=I[1]*qe,R[2]=I[2]*qe,R}function n8(R,I){return R[0]*I[0]+R[1]*I[1]+R[2]*I[2]}function a8(R,I,$){var he=I[0],ke=I[1],qe=I[2],et=$[0],Mt=$[1],Jt=$[2];return R[0]=ke*Jt-qe*Mt,R[1]=qe*et-he*Jt,R[2]=he*Mt-ke*et,R}function i8(R,I,$){var he=I[0],ke=I[1],qe=I[2];return R[0]=he*$[0]+ke*$[3]+qe*$[6],R[1]=he*$[1]+ke*$[4]+qe*$[7],R[2]=he*$[2]+ke*$[5]+qe*$[8],R}var o8=ay;(function(){var R=ny();return function(I,$,he,ke,qe,et){var Mt,Jt;for($||($=3),he||(he=0),ke?Jt=Math.min(ke*$+he,I.length):Jt=I.length,Mt=he;Mt<Jt;Mt+=$)R[0]=I[Mt],R[1]=I[Mt+1],R[2]=I[Mt+2],qe(R,R,et),I[Mt]=R[0],I[Mt+1]=R[1],I[Mt+2]=R[2];return I}})();function s8(){var R=new vd(4);return vd!=Float32Array&&(R[0]=0,R[1]=0,R[2]=0,R[3]=0),R}function l8(R,I,$){return R[0]=I[0]*$,R[1]=I[1]*$,R[2]=I[2]*$,R[3]=I[3]*$,R}function u8(R,I){return R[0]*I[0]+R[1]*I[1]+R[2]*I[2]+R[3]*I[3]}function T3(R,I,$){var he=I[0],ke=I[1],qe=I[2],et=I[3];return R[0]=$[0]*he+$[4]*ke+$[8]*qe+$[12]*et,R[1]=$[1]*he+$[5]*ke+$[9]*qe+$[13]*et,R[2]=$[2]*he+$[6]*ke+$[10]*qe+$[14]*et,R[3]=$[3]*he+$[7]*ke+$[11]*qe+$[15]*et,R}(function(){var R=s8();return function(I,$,he,ke,qe,et){var Mt,Jt;for($||($=4),he||(he=0),ke?Jt=Math.min(ke*$+he,I.length):Jt=I.length,Mt=he;Mt<Jt;Mt+=$)R[0]=I[Mt],R[1]=I[Mt+1],R[2]=I[Mt+2],R[3]=I[Mt+3],qe(R,R,et),I[Mt]=R[0],I[Mt+1]=R[1],I[Mt+2]=R[2],I[Mt+3]=R[3];return I}})();function A3(){var R=new vd(2);return vd!=Float32Array&&(R[0]=0,R[1]=0),R}function z_(R){var I=R[0],$=R[1];return I*I+$*$}var bk=z_;(function(){var R=A3();return function(I,$,he,ke,qe,et){var Mt,Jt;for($||($=2),he||(he=0),ke?Jt=Math.min(ke*$+he,I.length):Jt=I.length,Mt=he;Mt<Jt;Mt+=$)R[0]=I[Mt],R[1]=I[Mt+1],qe(R,R,et),I[Mt]=R[0],I[Mt+1]=R[1];return I}})();var e5=(function(R){function I($){R.call(this,$,ag)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype.createBucket=function(he){return new fc(he)},I.prototype.queryRadius=function(he){var ke=he;return Cv("circle-radius",this,ke)+Cv("circle-stroke-width",this,ke)+Cp(this.paint.get("circle-translate"))},I.prototype.queryIntersectsFeature=function(he,ke,qe,et,Mt,Jt,pr,Ar){for(var $r=em(he,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),Jt.angle,pr),gn=this.paint.get("circle-radius").evaluate(ke,qe),hn=this.paint.get("circle-stroke-width").evaluate(ke,qe),zn=gn+hn,_a=this.paint.get("circle-pitch-alignment")==="map",ui=_a?$r:c8($r,Ar),Ua=_a?zn*pr:zn,ji=0,bi=et;ji<bi.length;ji+=1)for(var Fi=bi[ji],Zi=0,yo=Fi;Zi<yo.length;Zi+=1){var Bo=yo[Zi],zo=_a?Bo:S3(Bo,Ar),ws=Ua,Qo=T3([],[Bo.x,Bo.y,0,1],Ar);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?ws*=Qo[3]/Jt.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(ws*=Jt.cameraToCenterDistance/Qo[3]),Lu(ui,zo,ws))return!0}return!1},I})(qi);function S3(R,I){var $=T3([],[R.x,R.y,0,1],I);return new s($[0]/$[3],$[1]/$[3])}function c8(R,I){return R.map(function($){return S3($,I)})}var wk=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I})(fc);dr("HeatmapBucket",wk,{omit:["layers"]});function t5(R,I,$,he){var ke=I.width,qe=I.height;if(!he)he=new Uint8Array(ke*qe*$);else if(he instanceof Uint8ClampedArray)he=new Uint8Array(he.buffer);else if(he.length!==ke*qe*$)throw new RangeError("mismatched image size");return R.width=ke,R.height=qe,R.data=he,R}function r5(R,I,$){var he=I.width,ke=I.height;if(!(he===R.width&&ke===R.height)){var qe=t5({},{width:he,height:ke},$);E3(R,qe,{x:0,y:0},{x:0,y:0},{width:Math.min(R.width,he),height:Math.min(R.height,ke)},$),R.width=he,R.height=ke,R.data=qe.data}}function E3(R,I,$,he,ke,qe){if(ke.width===0||ke.height===0)return I;if(ke.width>R.width||ke.height>R.height||$.x>R.width-ke.width||$.y>R.height-ke.height)throw new RangeError("out of range source coordinates for image copy");if(ke.width>I.width||ke.height>I.height||he.x>I.width-ke.width||he.y>I.height-ke.height)throw new RangeError("out of range destination coordinates for image copy");for(var et=R.data,Mt=I.data,Jt=0;Jt<ke.height;Jt++)for(var pr=(($.y+Jt)*R.width+$.x)*qe,Ar=((he.y+Jt)*I.width+he.x)*qe,$r=0;$r<ke.width*qe;$r++)Mt[Ar+$r]=et[pr+$r];return I}var pd=function(I,$){t5(this,I,1,$)};pd.prototype.resize=function(I){r5(this,I,1)},pd.prototype.clone=function(){return new pd({width:this.width,height:this.height},new Uint8Array(this.data))},pd.copy=function(I,$,he,ke,qe){E3(I,$,he,ke,qe,1)};var vv=function(I,$){t5(this,I,4,$)};vv.prototype.resize=function(I){r5(this,I,4)},vv.prototype.replace=function(I,$){$?this.data.set(I):I instanceof Uint8ClampedArray?this.data=new Uint8Array(I.buffer):this.data=I},vv.prototype.clone=function(){return new vv({width:this.width,height:this.height},new Uint8Array(this.data))},vv.copy=function(I,$,he,ke,qe){E3(I,$,he,ke,qe,4)},dr("AlphaImage",pd),dr("RGBAImage",vv);var Tk=new gi({"heatmap-radius":new Pn(Ni.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Pn(Ni.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new Rn(Ni.paint_heatmap["heatmap-intensity"]),"heatmap-color":new ri(Ni.paint_heatmap["heatmap-color"]),"heatmap-opacity":new Rn(Ni.paint_heatmap["heatmap-opacity"])}),iy={paint:Tk};function N_(R){var I={},$=R.resolution||256,he=R.clips?R.clips.length:1,ke=R.image||new vv({width:$,height:he}),qe=function(ji,bi,Fi){I[R.evaluationKey]=Fi;var Zi=R.expression.evaluate(I);ke.data[ji+bi+0]=Math.floor(Zi.r*255/Zi.a),ke.data[ji+bi+1]=Math.floor(Zi.g*255/Zi.a),ke.data[ji+bi+2]=Math.floor(Zi.b*255/Zi.a),ke.data[ji+bi+3]=Math.floor(Zi.a*255)};if(R.clips)for(var pr=0,Ar=0;pr<he;++pr,Ar+=$*4)for(var $r=0,gn=0;$r<$;$r++,gn+=4){var hn=$r/($-1),zn=R.clips[pr],_a=zn.start,ui=zn.end,Ua=_a*(1-hn)+ui*hn;qe(Ar,gn,Ua)}else for(var et=0,Mt=0;et<$;et++,Mt+=4){var Jt=et/($-1);qe(0,Mt,Jt)}return ke}var qb=(function(R){function I($){R.call(this,$,iy),this._updateColorRamp()}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype.createBucket=function(he){return new wk(he)},I.prototype._handleSpecialPaintPropertyUpdate=function(he){he==="heatmap-color"&&this._updateColorRamp()},I.prototype._updateColorRamp=function(){var he=this._transitionablePaint._values["heatmap-color"].value.expression;this.colorRamp=N_({expression:he,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null},I.prototype.resize=function(){this.heatmapFbo&&(this.heatmapFbo.destroy(),this.heatmapFbo=null)},I.prototype.queryRadius=function(){return 0},I.prototype.queryIntersectsFeature=function(){return!1},I.prototype.hasOffscreenPass=function(){return this.paint.get("heatmap-opacity")!==0&&this.visibility!=="none"},I})(qi),F_=new gi({"hillshade-illumination-direction":new Rn(Ni.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new Rn(Ni.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new Rn(Ni.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new Rn(Ni.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new Rn(Ni.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new Rn(Ni.paint_hillshade["hillshade-accent-color"])}),M3={paint:F_},C3=(function(R){function I($){R.call(this,$,M3)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype.hasOffscreenPass=function(){return this.paint.get("hillshade-exaggeration")!==0&&this.visibility!=="none"},I})(qi),f8=Fa([{name:"a_pos",components:2,type:"Int16"}],4),h8=f8.members,k3=P3,Ak=P3;function P3(R,I,$){$=$||2;var he=I&&I.length,ke=he?I[0]*$:R.length,qe=n5(R,0,ke,$,!0),et=[];if(!qe||qe.next===qe.prev)return et;var Mt,Jt,pr,Ar,$r,gn,hn;if(he&&(qe=Ek(R,I,qe,$)),R.length>80*$){Mt=pr=R[0],Jt=Ar=R[1];for(var zn=$;zn<ke;zn+=$)$r=R[zn],gn=R[zn+1],$r<Mt&&(Mt=$r),gn<Jt&&(Jt=gn),$r>pr&&(pr=$r),gn>Ar&&(Ar=gn);hn=Math.max(pr-Mt,Ar-Jt),hn=hn!==0?1/hn:0}return u1(qe,et,$,Mt,Jt,hn),et}function n5(R,I,$,he,ke){var qe,et;if(ke===u5(R,I,$,he)>0)for(qe=I;qe<$;qe+=he)et=Ck(qe,R[qe],R[qe+1],et);else for(qe=$-he;qe>=I;qe-=he)et=Ck(qe,R[qe],R[qe+1],et);return et&&B_(et,et.next)&&(Xb(et),et=et.next),et}function og(R,I){if(!R)return R;I||(I=R);var $=R,he;do if(he=!1,!$.steiner&&(B_($,$.next)||xh($.prev,$,$.next)===0)){if(Xb($),$=I=$.prev,$===$.next)break;he=!0}else $=$.next;while(he||$!==I);return I}function u1(R,I,$,he,ke,qe,et){if(R){!et&&qe&&i5(R,he,ke,qe);for(var Mt=R,Jt,pr;R.prev!==R.next;){if(Jt=R.prev,pr=R.next,qe?d8(R,he,ke,qe):a5(R)){I.push(Jt.i/$),I.push(R.i/$),I.push(pr.i/$),Xb(R),R=pr.next,Mt=pr.next;continue}if(R=pr,R===Mt){et?et===1?(R=v8(og(R),I,$),u1(R,I,$,he,ke,qe,2)):et===2&&Sk(R,I,$,he,ke,qe):u1(og(R),I,$,he,ke,qe,1);break}}}}function a5(R){var I=R.prev,$=R,he=R.next;if(xh(I,$,he)>=0)return!1;for(var ke=R.next.next;ke!==R.prev;){if(sy(I.x,I.y,$.x,$.y,he.x,he.y,ke.x,ke.y)&&xh(ke.prev,ke,ke.next)>=0)return!1;ke=ke.next}return!0}function d8(R,I,$,he){var ke=R.prev,qe=R,et=R.next;if(xh(ke,qe,et)>=0)return!1;for(var Mt=ke.x<qe.x?ke.x<et.x?ke.x:et.x:qe.x<et.x?qe.x:et.x,Jt=ke.y<qe.y?ke.y<et.y?ke.y:et.y:qe.y<et.y?qe.y:et.y,pr=ke.x>qe.x?ke.x>et.x?ke.x:et.x:qe.x>et.x?qe.x:et.x,Ar=ke.y>qe.y?ke.y>et.y?ke.y:et.y:qe.y>et.y?qe.y:et.y,$r=o5(Mt,Jt,I,$,he),gn=o5(pr,Ar,I,$,he),hn=R.prevZ,zn=R.nextZ;hn&&hn.z>=$r&&zn&&zn.z<=gn;){if(hn!==R.prev&&hn!==R.next&&sy(ke.x,ke.y,qe.x,qe.y,et.x,et.y,hn.x,hn.y)&&xh(hn.prev,hn,hn.next)>=0||(hn=hn.prevZ,zn!==R.prev&&zn!==R.next&&sy(ke.x,ke.y,qe.x,qe.y,et.x,et.y,zn.x,zn.y)&&xh(zn.prev,zn,zn.next)>=0))return!1;zn=zn.nextZ}for(;hn&&hn.z>=$r;){if(hn!==R.prev&&hn!==R.next&&sy(ke.x,ke.y,qe.x,qe.y,et.x,et.y,hn.x,hn.y)&&xh(hn.prev,hn,hn.next)>=0)return!1;hn=hn.prevZ}for(;zn&&zn.z<=gn;){if(zn!==R.prev&&zn!==R.next&&sy(ke.x,ke.y,qe.x,qe.y,et.x,et.y,zn.x,zn.y)&&xh(zn.prev,zn,zn.next)>=0)return!1;zn=zn.nextZ}return!0}function v8(R,I,$){var he=R;do{var ke=he.prev,qe=he.next.next;!B_(ke,qe)&&c1(ke,he,he.next,qe)&&j_(ke,qe)&&j_(qe,ke)&&(I.push(ke.i/$),I.push(he.i/$),I.push(qe.i/$),Xb(he),Xb(he.next),he=R=qe),he=he.next}while(he!==R);return og(he)}function Sk(R,I,$,he,ke,qe){var et=R;do{for(var Mt=et.next.next;Mt!==et.prev;){if(et.i!==Mt.i&&m8(et,Mt)){var Jt=l5(et,Mt);et=og(et,et.next),Jt=og(Jt,Jt.next),u1(et,I,$,he,ke,qe),u1(Jt,I,$,he,ke,qe);return}Mt=Mt.next}et=et.next}while(et!==R)}function Ek(R,I,$,he){var ke=[],qe,et,Mt,Jt,pr;for(qe=0,et=I.length;qe<et;qe++)Mt=I[qe]*he,Jt=qe<et-1?I[qe+1]*he:R.length,pr=n5(R,Mt,Jt,he,!1),pr===pr.next&&(pr.steiner=!0),ke.push(L3(pr));for(ke.sort(Vb),qe=0;qe<ke.length;qe++)_0(ke[qe],$),$=og($,$.next);return $}function Vb(R,I){return R.x-I.x}function _0(R,I){if(I=oy(R,I),I){var $=l5(I,R);og(I,I.next),og($,$.next)}}function oy(R,I){var $=I,he=R.x,ke=R.y,qe=-1/0,et;do{if(ke<=$.y&&ke>=$.next.y&&$.next.y!==$.y){var Mt=$.x+(ke-$.y)*($.next.x-$.x)/($.next.y-$.y);if(Mt<=he&&Mt>qe){if(qe=Mt,Mt===he){if(ke===$.y)return $;if(ke===$.next.y)return $.next}et=$.x<$.next.x?$:$.next}}$=$.next}while($!==I);if(!et)return null;if(he===qe)return et;var Jt=et,pr=et.x,Ar=et.y,$r=1/0,gn;$=et;do he>=$.x&&$.x>=pr&&he!==$.x&&sy(ke<Ar?he:qe,ke,pr,Ar,ke<Ar?qe:he,ke,$.x,$.y)&&(gn=Math.abs(ke-$.y)/(he-$.x),j_($,R)&&(gn<$r||gn===$r&&($.x>et.x||$.x===et.x&&Mk(et,$)))&&(et=$,$r=gn)),$=$.next;while($!==Jt);return et}function Mk(R,I){return xh(R.prev,R,I.prev)<0&&xh(I.next,R,R.next)<0}function i5(R,I,$,he){var ke=R;do ke.z===null&&(ke.z=o5(ke.x,ke.y,I,$,he)),ke.prevZ=ke.prev,ke.nextZ=ke.next,ke=ke.next;while(ke!==R);ke.prevZ.nextZ=null,ke.prevZ=null,p8(ke)}function p8(R){var I,$,he,ke,qe,et,Mt,Jt,pr=1;do{for($=R,R=null,qe=null,et=0;$;){for(et++,he=$,Mt=0,I=0;I<pr&&(Mt++,he=he.nextZ,!!he);I++);for(Jt=pr;Mt>0||Jt>0&&he;)Mt!==0&&(Jt===0||!he||$.z<=he.z)?(ke=$,$=$.nextZ,Mt--):(ke=he,he=he.nextZ,Jt--),qe?qe.nextZ=ke:R=ke,ke.prevZ=qe,qe=ke;$=he}qe.nextZ=null,pr*=2}while(et>1);return R}function o5(R,I,$,he,ke){return R=32767*(R-$)*ke,I=32767*(I-he)*ke,R=(R|R<<8)&16711935,R=(R|R<<4)&252645135,R=(R|R<<2)&858993459,R=(R|R<<1)&1431655765,I=(I|I<<8)&16711935,I=(I|I<<4)&252645135,I=(I|I<<2)&858993459,I=(I|I<<1)&1431655765,R|I<<1}function L3(R){var I=R,$=R;do(I.x<$.x||I.x===$.x&&I.y<$.y)&&($=I),I=I.next;while(I!==R);return $}function sy(R,I,$,he,ke,qe,et,Mt){return(ke-et)*(I-Mt)-(R-et)*(qe-Mt)>=0&&(R-et)*(he-Mt)-($-et)*(I-Mt)>=0&&($-et)*(qe-Mt)-(ke-et)*(he-Mt)>=0}function m8(R,I){return R.next.i!==I.i&&R.prev.i!==I.i&&!s5(R,I)&&(j_(R,I)&&j_(I,R)&&R3(R,I)&&(xh(R.prev,R,I.prev)||xh(R,I.prev,I))||B_(R,I)&&xh(R.prev,R,R.next)>0&&xh(I.prev,I,I.next)>0)}function xh(R,I,$){return(I.y-R.y)*($.x-I.x)-(I.x-R.x)*($.y-I.y)}function B_(R,I){return R.x===I.x&&R.y===I.y}function c1(R,I,$,he){var ke=Gb(xh(R,I,$)),qe=Gb(xh(R,I,he)),et=Gb(xh($,he,R)),Mt=Gb(xh($,he,I));return!!(ke!==qe&&et!==Mt||ke===0&&Hb(R,$,I)||qe===0&&Hb(R,he,I)||et===0&&Hb($,R,he)||Mt===0&&Hb($,I,he))}function Hb(R,I,$){return I.x<=Math.max(R.x,$.x)&&I.x>=Math.min(R.x,$.x)&&I.y<=Math.max(R.y,$.y)&&I.y>=Math.min(R.y,$.y)}function Gb(R){return R>0?1:R<0?-1:0}function s5(R,I){var $=R;do{if($.i!==R.i&&$.next.i!==R.i&&$.i!==I.i&&$.next.i!==I.i&&c1($,$.next,R,I))return!0;$=$.next}while($!==R);return!1}function j_(R,I){return xh(R.prev,R,R.next)<0?xh(R,I,R.next)>=0&&xh(R,R.prev,I)>=0:xh(R,I,R.prev)<0||xh(R,R.next,I)<0}function R3(R,I){var $=R,he=!1,ke=(R.x+I.x)/2,qe=(R.y+I.y)/2;do $.y>qe!=$.next.y>qe&&$.next.y!==$.y&&ke<($.next.x-$.x)*(qe-$.y)/($.next.y-$.y)+$.x&&(he=!he),$=$.next;while($!==R);return he}function l5(R,I){var $=new I3(R.i,R.x,R.y),he=new I3(I.i,I.x,I.y),ke=R.next,qe=I.prev;return R.next=I,I.prev=R,$.next=ke,ke.prev=$,he.next=$,$.prev=he,qe.next=he,he.prev=qe,he}function Ck(R,I,$,he){var ke=new I3(R,I,$);return he?(ke.next=he.next,ke.prev=he,he.next.prev=ke,he.next=ke):(ke.prev=ke,ke.next=ke),ke}function Xb(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 I3(R,I,$){this.i=R,this.x=I,this.y=$,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}P3.deviation=function(R,I,$,he){var ke=I&&I.length,qe=ke?I[0]*$:R.length,et=Math.abs(u5(R,0,qe,$));if(ke)for(var Mt=0,Jt=I.length;Mt<Jt;Mt++){var pr=I[Mt]*$,Ar=Mt<Jt-1?I[Mt+1]*$:R.length;et-=Math.abs(u5(R,pr,Ar,$))}var $r=0;for(Mt=0;Mt<he.length;Mt+=3){var gn=he[Mt]*$,hn=he[Mt+1]*$,zn=he[Mt+2]*$;$r+=Math.abs((R[gn]-R[zn])*(R[hn+1]-R[gn+1])-(R[gn]-R[hn])*(R[zn+1]-R[gn+1]))}return et===0&&$r===0?0:Math.abs(($r-et)/et)};function u5(R,I,$,he){for(var ke=0,qe=I,et=$-he;qe<$;qe+=he)ke+=(R[et]-R[qe])*(R[qe+1]+R[et+1]),et=qe;return ke}P3.flatten=function(R){for(var I=R[0][0].length,$={vertices:[],holes:[],dimensions:I},he=0,ke=0;ke<R.length;ke++){for(var qe=0;qe<R[ke].length;qe++)for(var et=0;et<I;et++)$.vertices.push(R[ke][qe][et]);ke>0&&(he+=R[ke-1].length,$.holes.push(he))}return $},k3.default=Ak;function g8(R,I,$,he,ke){kk(R,I,$,he||R.length-1,ke||c5)}function kk(R,I,$,he,ke){for(;he>$;){if(he-$>600){var qe=he-$+1,et=I-$+1,Mt=Math.log(qe),Jt=.5*Math.exp(2*Mt/3),pr=.5*Math.sqrt(Mt*Jt*(qe-Jt)/qe)*(et-qe/2<0?-1:1),Ar=Math.max($,Math.floor(I-et*Jt/qe+pr)),$r=Math.min(he,Math.floor(I+(qe-et)*Jt/qe+pr));kk(R,I,Ar,$r,ke)}var gn=R[I],hn=$,zn=he;for(Wb(R,$,I),ke(R[he],gn)>0&&Wb(R,$,he);hn<zn;){for(Wb(R,hn,zn),hn++,zn--;ke(R[hn],gn)<0;)hn++;for(;ke(R[zn],gn)>0;)zn--}ke(R[$],gn)===0?Wb(R,$,zn):(zn++,Wb(R,zn,he)),zn<=I&&($=zn+1),I<=zn&&(he=zn-1)}}function Wb(R,I,$){var he=R[I];R[I]=R[$],R[$]=he}function c5(R,I){return R<I?-1:R>I?1:0}function x0(R,I){var $=R.length;if($<=1)return[R];for(var he=[],ke,qe,et=0;et<$;et++){var Mt=le(R[et]);Mt!==0&&(R[et].area=Math.abs(Mt),qe===void 0&&(qe=Mt<0),qe===Mt<0?(ke&&he.push(ke),ke=[R[et]]):ke.push(R[et]))}if(ke&&he.push(ke),I>1)for(var Jt=0;Jt<he.length;Jt++)he[Jt].length<=I||(g8(he[Jt],I,1,he[Jt].length-1,Pk),he[Jt]=he[Jt].slice(0,I));return he}function Pk(R,I){return I.area-R.area}function D3(R,I,$){for(var he=$.patternDependencies,ke=!1,qe=0,et=I;qe<et.length;qe+=1){var Mt=et[qe],Jt=Mt.paint.get(R+"-pattern");Jt.isConstant()||(ke=!0);var pr=Jt.constantOr(null);pr&&(ke=!0,he[pr.to]=!0,he[pr.from]=!0)}return ke}function O3(R,I,$,he,ke){for(var qe=ke.patternDependencies,et=0,Mt=I;et<Mt.length;et+=1){var Jt=Mt[et],pr=Jt.paint.get(R+"-pattern"),Ar=pr.value;if(Ar.kind!=="constant"){var $r=Ar.evaluate({zoom:he-1},$,{},ke.availableImages),gn=Ar.evaluate({zoom:he},$,{},ke.availableImages),hn=Ar.evaluate({zoom:he+1},$,{},ke.availableImages);$r=$r&&$r.name?$r.name:$r,gn=gn&&gn.name?gn.name:gn,hn=hn&&hn.name?hn.name:hn,qe[$r]=!0,qe[gn]=!0,qe[hn]=!0,$.patterns[Jt.id]={min:$r,mid:gn,max:hn}}}return $}var Lk=500,pm=function(I){this.zoom=I.zoom,this.overscaling=I.overscaling,this.layers=I.layers,this.layerIds=this.layers.map(function($){return $.id}),this.index=I.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new li,this.indexArray=new Uo,this.indexArray2=new cl,this.programConfigurations=new Ra(I.layers,I.zoom),this.segments=new Rs,this.segments2=new Rs,this.stateDependentLayerIds=this.layers.filter(function($){return $.isStateDependent()}).map(function($){return $.id})};pm.prototype.populate=function(I,$,he){this.hasPattern=D3("fill",this.layers,$);for(var ke=this.layers[0].layout.get("fill-sort-key"),qe=[],et=0,Mt=I;et<Mt.length;et+=1){var Jt=Mt[et],pr=Jt.feature,Ar=Jt.id,$r=Jt.index,gn=Jt.sourceLayerIndex,hn=this.layers[0]._featureFilter.needGeometry,zn=Rl(pr,hn);if(this.layers[0]._featureFilter.filter(new jl(this.zoom),zn,he)){var _a=ke?ke.evaluate(zn,{},he,$.availableImages):void 0,ui={id:Ar,properties:pr.properties,type:pr.type,sourceLayerIndex:gn,index:$r,geometry:hn?zn.geometry:Tl(pr),patterns:{},sortKey:_a};qe.push(ui)}}ke&&qe.sort(function(Qo,fs){return Qo.sortKey-fs.sortKey});for(var Ua=0,ji=qe;Ua<ji.length;Ua+=1){var bi=ji[Ua],Fi=bi,Zi=Fi.geometry,yo=Fi.index,Bo=Fi.sourceLayerIndex;if(this.hasPattern){var zo=O3("fill",this.layers,bi,this.zoom,$);this.patternFeatures.push(zo)}else this.addFeature(bi,Zi,yo,he,{});var ws=I[yo].feature;$.featureIndex.insert(ws,Zi,yo,Bo,this.index)}},pm.prototype.update=function(I,$,he){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(I,$,this.stateDependentLayers,he)},pm.prototype.addFeatures=function(I,$,he){for(var ke=0,qe=this.patternFeatures;ke<qe.length;ke+=1){var et=qe[ke];this.addFeature(et,et.geometry,et.index,$,he)}},pm.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},pm.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},pm.prototype.upload=function(I){this.uploaded||(this.layoutVertexBuffer=I.createVertexBuffer(this.layoutVertexArray,h8),this.indexBuffer=I.createIndexBuffer(this.indexArray),this.indexBuffer2=I.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(I),this.uploaded=!0},pm.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())},pm.prototype.addFeature=function(I,$,he,ke,qe){for(var et=0,Mt=x0($,Lk);et<Mt.length;et+=1){for(var Jt=Mt[et],pr=0,Ar=0,$r=Jt;Ar<$r.length;Ar+=1){var gn=$r[Ar];pr+=gn.length}for(var hn=this.segments.prepareSegment(pr,this.layoutVertexArray,this.indexArray),zn=hn.vertexLength,_a=[],ui=[],Ua=0,ji=Jt;Ua<ji.length;Ua+=1){var bi=ji[Ua];if(bi.length!==0){bi!==Jt[0]&&ui.push(_a.length/2);var Fi=this.segments2.prepareSegment(bi.length,this.layoutVertexArray,this.indexArray2),Zi=Fi.vertexLength;this.layoutVertexArray.emplaceBack(bi[0].x,bi[0].y),this.indexArray2.emplaceBack(Zi+bi.length-1,Zi),_a.push(bi[0].x),_a.push(bi[0].y);for(var yo=1;yo<bi.length;yo++)this.layoutVertexArray.emplaceBack(bi[yo].x,bi[yo].y),this.indexArray2.emplaceBack(Zi+yo-1,Zi+yo),_a.push(bi[yo].x),_a.push(bi[yo].y);Fi.vertexLength+=bi.length,Fi.primitiveLength+=bi.length}}for(var Bo=k3(_a,ui),zo=0;zo<Bo.length;zo+=3)this.indexArray.emplaceBack(zn+Bo[zo],zn+Bo[zo+1],zn+Bo[zo+2]);hn.vertexLength+=pr,hn.primitiveLength+=Bo.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,I,he,qe,ke)},dr("FillBucket",pm,{omit:["layers","patternFeatures"]});var f5=new gi({"fill-sort-key":new Pn(Ni.layout_fill["fill-sort-key"])}),Yb=new gi({"fill-antialias":new Rn(Ni.paint_fill["fill-antialias"]),"fill-opacity":new Pn(Ni.paint_fill["fill-opacity"]),"fill-color":new Pn(Ni.paint_fill["fill-color"]),"fill-outline-color":new Pn(Ni.paint_fill["fill-outline-color"]),"fill-translate":new Rn(Ni.paint_fill["fill-translate"]),"fill-translate-anchor":new Rn(Ni.paint_fill["fill-translate-anchor"]),"fill-pattern":new ni(Ni.paint_fill["fill-pattern"])}),Rk={paint:Yb,layout:f5},h5=(function(R){function I($){R.call(this,$,Rk)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype.recalculate=function(he,ke){R.prototype.recalculate.call(this,he,ke);var qe=this.paint._values["fill-outline-color"];qe.value.kind==="constant"&&qe.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])},I.prototype.createBucket=function(he){return new pm(he)},I.prototype.queryRadius=function(){return Cp(this.paint.get("fill-translate"))},I.prototype.queryIntersectsFeature=function(he,ke,qe,et,Mt,Jt,pr){var Ar=em(he,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),Jt.angle,pr);return ch(Ar,et)},I.prototype.isTileClipped=function(){return!0},I})(qi),Ik=Fa([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),tm=Ik.members,U_=f1;function f1(R,I,$,he,ke){this.properties={},this.extent=$,this.type=0,this._pbf=R,this._geometry=-1,this._keys=he,this._values=ke,R.readFields(Dk,this,I)}function Dk(R,I,$){R==1?I.id=$.readVarint():R==2?Ok($,I):R==3?I.type=$.readVarint():R==4&&(I._geometry=$.pos)}function Ok(R,I){for(var $=R.readVarint()+R.pos;R.pos<$;){var he=I._keys[R.readVarint()],ke=I._values[R.readVarint()];I.properties[he]=ke}}f1.types=["Unknown","Point","LineString","Polygon"],f1.prototype.loadGeometry=function(){var R=this._pbf;R.pos=this._geometry;for(var I=R.readVarint()+R.pos,$=1,he=0,ke=0,qe=0,et=[],Mt;R.pos<I;){if(he<=0){var Jt=R.readVarint();$=Jt&7,he=Jt>>3}if(he--,$===1||$===2)ke+=R.readSVarint(),qe+=R.readSVarint(),$===1&&(Mt&&et.push(Mt),Mt=[]),Mt.push(new s(ke,qe));else if($===7)Mt&&Mt.push(Mt[0].clone());else throw new Error("unknown command "+$)}return Mt&&et.push(Mt),et},f1.prototype.bbox=function(){var R=this._pbf;R.pos=this._geometry;for(var I=R.readVarint()+R.pos,$=1,he=0,ke=0,qe=0,et=1/0,Mt=-1/0,Jt=1/0,pr=-1/0;R.pos<I;){if(he<=0){var Ar=R.readVarint();$=Ar&7,he=Ar>>3}if(he--,$===1||$===2)ke+=R.readSVarint(),qe+=R.readSVarint(),ke<et&&(et=ke),ke>Mt&&(Mt=ke),qe<Jt&&(Jt=qe),qe>pr&&(pr=qe);else if($!==7)throw new Error("unknown command "+$)}return[et,Jt,Mt,pr]},f1.prototype.toGeoJSON=function(R,I,$){var he=this.extent*Math.pow(2,$),ke=this.extent*R,qe=this.extent*I,et=this.loadGeometry(),Mt=f1.types[this.type],Jt,pr;function Ar(hn){for(var zn=0;zn<hn.length;zn++){var _a=hn[zn],ui=180-(_a.y+qe)*360/he;hn[zn]=[(_a.x+ke)*360/he-180,360/Math.PI*Math.atan(Math.exp(ui*Math.PI/180))-90]}}switch(this.type){case 1:var $r=[];for(Jt=0;Jt<et.length;Jt++)$r[Jt]=et[Jt][0];et=$r,Ar(et);break;case 2:for(Jt=0;Jt<et.length;Jt++)Ar(et[Jt]);break;case 3:for(et=zk(et),Jt=0;Jt<et.length;Jt++)for(pr=0;pr<et[Jt].length;pr++)Ar(et[Jt][pr]);break}et.length===1?et=et[0]:Mt="Multi"+Mt;var gn={type:"Feature",geometry:{type:Mt,coordinates:et},properties:this.properties};return"id"in this&&(gn.id=this.id),gn};function zk(R){var I=R.length;if(I<=1)return[R];for(var $=[],he,ke,qe=0;qe<I;qe++){var et=Nk(R[qe]);et!==0&&(ke===void 0&&(ke=et<0),ke===et<0?(he&&$.push(he),he=[R[qe]]):he.push(R[qe]))}return he&&$.push(he),$}function Nk(R){for(var I=0,$=0,he=R.length,ke=he-1,qe,et;$<he;ke=$++)qe=R[$],et=R[ke],I+=(et.x-qe.x)*(qe.y+et.y);return I}var d5=Fk;function Fk(R,I){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=R,this._keys=[],this._values=[],this._features=[],R.readFields(Bk,this,I),this.length=this._features.length}function Bk(R,I,$){R===15?I.version=$.readVarint():R===1?I.name=$.readString():R===5?I.extent=$.readVarint():R===2?I._features.push($.pos):R===3?I._keys.push($.readString()):R===4&&I._values.push(ly($))}function ly(R){for(var I=null,$=R.readVarint()+R.pos;R.pos<$;){var he=R.readVarint()>>3;I=he===1?R.readString():he===2?R.readFloat():he===3?R.readDouble():he===4?R.readVarint64():he===5?R.readVarint():he===6?R.readSVarint():he===7?R.readBoolean():null}return I}Fk.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 I=this._pbf.readVarint()+this._pbf.pos;return new U_(this._pbf,I,this.extent,this._keys,this._values)};var jk=Uk;function Uk(R,I){this.layers=R.readFields(qk,{},I)}function qk(R,I,$){if(R===3){var he=new d5($,$.readVarint()+$.pos);he.length&&(I[he.name]=he)}}var Vk=jk,y8=U_,_8=d5,h1={VectorTile:Vk,VectorTileFeature:y8,VectorTileLayer:_8},q_=h1.VectorTileFeature.types,Hk=500,V_=Math.pow(2,13);function H_(R,I,$,he,ke,qe,et,Mt){R.emplaceBack(I,$,Math.floor(he*V_)*2+et,ke*V_*2,qe*V_*2,Math.round(Mt))}var Lp=function(I){this.zoom=I.zoom,this.overscaling=I.overscaling,this.layers=I.layers,this.layerIds=this.layers.map(function($){return $.id}),this.index=I.index,this.hasPattern=!1,this.layoutVertexArray=new Ea,this.indexArray=new Uo,this.programConfigurations=new Ra(I.layers,I.zoom),this.segments=new Rs,this.stateDependentLayerIds=this.layers.filter(function($){return $.isStateDependent()}).map(function($){return $.id})};Lp.prototype.populate=function(I,$,he){this.features=[],this.hasPattern=D3("fill-extrusion",this.layers,$);for(var ke=0,qe=I;ke<qe.length;ke+=1){var et=qe[ke],Mt=et.feature,Jt=et.id,pr=et.index,Ar=et.sourceLayerIndex,$r=this.layers[0]._featureFilter.needGeometry,gn=Rl(Mt,$r);if(this.layers[0]._featureFilter.filter(new jl(this.zoom),gn,he)){var hn={id:Jt,sourceLayerIndex:Ar,index:pr,geometry:$r?gn.geometry:Tl(Mt),properties:Mt.properties,type:Mt.type,patterns:{}};this.hasPattern?this.features.push(O3("fill-extrusion",this.layers,hn,this.zoom,$)):this.addFeature(hn,hn.geometry,pr,he,{}),$.featureIndex.insert(Mt,hn.geometry,pr,Ar,this.index,!0)}}},Lp.prototype.addFeatures=function(I,$,he){for(var ke=0,qe=this.features;ke<qe.length;ke+=1){var et=qe[ke],Mt=et.geometry;this.addFeature(et,Mt,et.index,$,he)}},Lp.prototype.update=function(I,$,he){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(I,$,this.stateDependentLayers,he)},Lp.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},Lp.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Lp.prototype.upload=function(I){this.uploaded||(this.layoutVertexBuffer=I.createVertexBuffer(this.layoutVertexArray,tm),this.indexBuffer=I.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(I),this.uploaded=!0},Lp.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Lp.prototype.addFeature=function(I,$,he,ke,qe){for(var et=0,Mt=x0($,Hk);et<Mt.length;et+=1){for(var Jt=Mt[et],pr=0,Ar=0,$r=Jt;Ar<$r.length;Ar+=1){var gn=$r[Ar];pr+=gn.length}for(var hn=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),zn=0,_a=Jt;zn<_a.length;zn+=1){var ui=_a[zn];if(ui.length!==0&&!N3(ui))for(var Ua=0,ji=0;ji<ui.length;ji++){var bi=ui[ji];if(ji>=1){var Fi=ui[ji-1];if(!z3(bi,Fi)){hn.vertexLength+4>Rs.MAX_VERTEX_ARRAY_LENGTH&&(hn=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var Zi=bi.sub(Fi)._perp()._unit(),yo=Fi.dist(bi);Ua+yo>32768&&(Ua=0),H_(this.layoutVertexArray,bi.x,bi.y,Zi.x,Zi.y,0,0,Ua),H_(this.layoutVertexArray,bi.x,bi.y,Zi.x,Zi.y,0,1,Ua),Ua+=yo,H_(this.layoutVertexArray,Fi.x,Fi.y,Zi.x,Zi.y,0,0,Ua),H_(this.layoutVertexArray,Fi.x,Fi.y,Zi.x,Zi.y,0,1,Ua);var Bo=hn.vertexLength;this.indexArray.emplaceBack(Bo,Bo+2,Bo+1),this.indexArray.emplaceBack(Bo+1,Bo+2,Bo+3),hn.vertexLength+=4,hn.primitiveLength+=2}}}}if(hn.vertexLength+pr>Rs.MAX_VERTEX_ARRAY_LENGTH&&(hn=this.segments.prepareSegment(pr,this.layoutVertexArray,this.indexArray)),q_[I.type]==="Polygon"){for(var zo=[],ws=[],Qo=hn.vertexLength,fs=0,Sl=Jt;fs<Sl.length;fs+=1){var Ts=Sl[fs];if(Ts.length!==0){Ts!==Jt[0]&&ws.push(zo.length/2);for(var ks=0;ks<Ts.length;ks++){var tu=Ts[ks];H_(this.layoutVertexArray,tu.x,tu.y,0,0,1,1,0),zo.push(tu.x),zo.push(tu.y)}}}for(var pl=k3(zo,ws),Ku=0;Ku<pl.length;Ku+=3)this.indexArray.emplaceBack(Qo+pl[Ku],Qo+pl[Ku+2],Qo+pl[Ku+1]);hn.primitiveLength+=pl.length/3,hn.vertexLength+=pr}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,I,he,qe,ke)},dr("FillExtrusionBucket",Lp,{omit:["layers","features"]});function z3(R,I){return R.x===I.x&&(R.x<0||R.x>co)||R.y===I.y&&(R.y<0||R.y>co)}function N3(R){return R.every(function(I){return I.x<0})||R.every(function(I){return I.x>co})||R.every(function(I){return I.y<0})||R.every(function(I){return I.y>co})}var x8=new gi({"fill-extrusion-opacity":new Rn(Ni["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Pn(Ni["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new Rn(Ni["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new Rn(Ni["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new ni(Ni["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Pn(Ni["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Pn(Ni["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new Rn(Ni["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])}),b8={paint:x8},w8=(function(R){function I($){R.call(this,$,b8)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype.createBucket=function(he){return new Lp(he)},I.prototype.queryRadius=function(){return Cp(this.paint.get("fill-extrusion-translate"))},I.prototype.is3D=function(){return!0},I.prototype.queryIntersectsFeature=function(he,ke,qe,et,Mt,Jt,pr,Ar){var $r=em(he,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),Jt.angle,pr),gn=this.paint.get("fill-extrusion-height").evaluate(ke,qe),hn=this.paint.get("fill-extrusion-base").evaluate(ke,qe),zn=Gk($r,Ar,Jt,0),_a=v5(et,hn,gn,Ar),ui=_a[0],Ua=_a[1];return uy(ui,Ua,zn)},I})(qi);function b0(R,I){return R.x*I.x+R.y*I.y}function Jd(R,I){if(R.length===1){for(var $=0,he=I[$++],ke;!ke||he.equals(ke);)if(ke=I[$++],!ke)return 1/0;for(;$<I.length;$++){var qe=I[$],et=R[0],Mt=ke.sub(he),Jt=qe.sub(he),pr=et.sub(he),Ar=b0(Mt,Mt),$r=b0(Mt,Jt),gn=b0(Jt,Jt),hn=b0(pr,Mt),zn=b0(pr,Jt),_a=Ar*gn-$r*$r,ui=(gn*hn-$r*zn)/_a,Ua=(Ar*zn-$r*hn)/_a,ji=1-ui-Ua,bi=he.z*ji+ke.z*ui+qe.z*Ua;if(isFinite(bi))return bi}return 1/0}else{for(var Fi=1/0,Zi=0,yo=I;Zi<yo.length;Zi+=1){var Bo=yo[Zi];Fi=Math.min(Fi,Bo.z)}return Fi}}function uy(R,I,$){var he=1/0;ch($,I)&&(he=Jd($,I[0]));for(var ke=0;ke<I.length;ke++)for(var qe=I[ke],et=R[ke],Mt=0;Mt<qe.length-1;Mt++){var Jt=qe[Mt],pr=qe[Mt+1],Ar=et[Mt],$r=et[Mt+1],gn=[Jt,pr,$r,Ar,Jt];yl($,gn)&&(he=Math.min(he,Jd($,gn)))}return he===1/0?!1:he}function v5(R,I,$,he){for(var ke=[],qe=[],et=he[8]*I,Mt=he[9]*I,Jt=he[10]*I,pr=he[11]*I,Ar=he[8]*$,$r=he[9]*$,gn=he[10]*$,hn=he[11]*$,zn=0,_a=R;zn<_a.length;zn+=1){for(var ui=_a[zn],Ua=[],ji=[],bi=0,Fi=ui;bi<Fi.length;bi+=1){var Zi=Fi[bi],yo=Zi.x,Bo=Zi.y,zo=he[0]*yo+he[4]*Bo+he[12],ws=he[1]*yo+he[5]*Bo+he[13],Qo=he[2]*yo+he[6]*Bo+he[14],fs=he[3]*yo+he[7]*Bo+he[15],Sl=zo+et,Ts=ws+Mt,ks=Qo+Jt,tu=fs+pr,pl=zo+Ar,Ku=ws+$r,Jc=Qo+gn,Ju=fs+hn,Qu=new s(Sl/tu,Ts/tu);Qu.z=ks/tu,Ua.push(Qu);var Xu=new s(pl/Ju,Ku/Ju);Xu.z=Jc/Ju,ji.push(Xu)}ke.push(Ua),qe.push(ji)}return[ke,qe]}function Gk(R,I,$,he){for(var ke=[],qe=0,et=R;qe<et.length;qe+=1){var Mt=et[qe],Jt=[Mt.x,Mt.y,he,1];T3(Jt,Jt,I),ke.push(new s(Jt[0]/Jt[3],Jt[1]/Jt[3]))}return ke}var Xk=Fa([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),p5=Xk.members,T8=Fa([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]),Wk=T8.members,Yk=h1.VectorTileFeature.types,Zk=63,$k=Math.cos(75/2*(Math.PI/180)),m5=15,g5=20,Kk=15,G_=1/2,F3=Math.pow(2,Kk-1)/G_,pv=function(I){var $=this;this.zoom=I.zoom,this.overscaling=I.overscaling,this.layers=I.layers,this.layerIds=this.layers.map(function(he){return he.id}),this.index=I.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(function(he){$.gradients[he.id]={}}),this.layoutVertexArray=new pa,this.layoutVertexArray2=new ki,this.indexArray=new Uo,this.programConfigurations=new Ra(I.layers,I.zoom),this.segments=new Rs,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(function(he){return he.isStateDependent()}).map(function(he){return he.id})};pv.prototype.populate=function(I,$,he){this.hasPattern=D3("line",this.layers,$);for(var ke=this.layers[0].layout.get("line-sort-key"),qe=[],et=0,Mt=I;et<Mt.length;et+=1){var Jt=Mt[et],pr=Jt.feature,Ar=Jt.id,$r=Jt.index,gn=Jt.sourceLayerIndex,hn=this.layers[0]._featureFilter.needGeometry,zn=Rl(pr,hn);if(this.layers[0]._featureFilter.filter(new jl(this.zoom),zn,he)){var _a=ke?ke.evaluate(zn,{},he):void 0,ui={id:Ar,properties:pr.properties,type:pr.type,sourceLayerIndex:gn,index:$r,geometry:hn?zn.geometry:Tl(pr),patterns:{},sortKey:_a};qe.push(ui)}}ke&&qe.sort(function(Qo,fs){return Qo.sortKey-fs.sortKey});for(var Ua=0,ji=qe;Ua<ji.length;Ua+=1){var bi=ji[Ua],Fi=bi,Zi=Fi.geometry,yo=Fi.index,Bo=Fi.sourceLayerIndex;if(this.hasPattern){var zo=O3("line",this.layers,bi,this.zoom,$);this.patternFeatures.push(zo)}else this.addFeature(bi,Zi,yo,he,{});var ws=I[yo].feature;$.featureIndex.insert(ws,Zi,yo,Bo,this.index)}},pv.prototype.update=function(I,$,he){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(I,$,this.stateDependentLayers,he)},pv.prototype.addFeatures=function(I,$,he){for(var ke=0,qe=this.patternFeatures;ke<qe.length;ke+=1){var et=qe[ke];this.addFeature(et,et.geometry,et.index,$,he)}},pv.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},pv.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},pv.prototype.upload=function(I){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=I.createVertexBuffer(this.layoutVertexArray2,Wk)),this.layoutVertexBuffer=I.createVertexBuffer(this.layoutVertexArray,p5),this.indexBuffer=I.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(I),this.uploaded=!0},pv.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},pv.prototype.lineFeatureClips=function(I){if(I.properties&&I.properties.hasOwnProperty("mapbox_clip_start")&&I.properties.hasOwnProperty("mapbox_clip_end")){var $=+I.properties.mapbox_clip_start,he=+I.properties.mapbox_clip_end;return{start:$,end:he}}},pv.prototype.addFeature=function(I,$,he,ke,qe){var et=this.layers[0].layout,Mt=et.get("line-join").evaluate(I,{}),Jt=et.get("line-cap"),pr=et.get("line-miter-limit"),Ar=et.get("line-round-limit");this.lineClips=this.lineFeatureClips(I);for(var $r=0,gn=$;$r<gn.length;$r+=1){var hn=gn[$r];this.addLine(hn,I,Mt,Jt,pr,Ar)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,I,he,qe,ke)},pv.prototype.addLine=function(I,$,he,ke,qe,et){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(var Mt=0;Mt<I.length-1;Mt++)this.totalDistance+=I[Mt].dist(I[Mt+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}for(var Jt=Yk[$.type]==="Polygon",pr=I.length;pr>=2&&I[pr-1].equals(I[pr-2]);)pr--;for(var Ar=0;Ar<pr-1&&I[Ar].equals(I[Ar+1]);)Ar++;if(!(pr<(Jt?3:2))){he==="bevel"&&(qe=1.05);var $r=this.overscaling<=16?m5*co/(512*this.overscaling):0,gn=this.segments.prepareSegment(pr*10,this.layoutVertexArray,this.indexArray),hn,zn=void 0,_a=void 0,ui=void 0,Ua=void 0;this.e1=this.e2=-1,Jt&&(hn=I[pr-2],Ua=I[Ar].sub(hn)._unit()._perp());for(var ji=Ar;ji<pr;ji++)if(_a=ji===pr-1?Jt?I[Ar+1]:void 0:I[ji+1],!(_a&&I[ji].equals(_a))){Ua&&(ui=Ua),hn&&(zn=hn),hn=I[ji],Ua=_a?_a.sub(hn)._unit()._perp():ui,ui=ui||Ua;var bi=ui.add(Ua);(bi.x!==0||bi.y!==0)&&bi._unit();var Fi=ui.x*Ua.x+ui.y*Ua.y,Zi=bi.x*Ua.x+bi.y*Ua.y,yo=Zi!==0?1/Zi:1/0,Bo=2*Math.sqrt(2-2*Zi),zo=Zi<$k&&zn&&_a,ws=ui.x*Ua.y-ui.y*Ua.x>0;if(zo&&ji>Ar){var Qo=hn.dist(zn);if(Qo>2*$r){var fs=hn.sub(hn.sub(zn)._mult($r/Qo)._round());this.updateDistance(zn,fs),this.addCurrentVertex(fs,ui,0,0,gn),zn=fs}}var Sl=zn&&_a,Ts=Sl?he:Jt?"butt":ke;if(Sl&&Ts==="round"&&(yo<et?Ts="miter":yo<=2&&(Ts="fakeround")),Ts==="miter"&&yo>qe&&(Ts="bevel"),Ts==="bevel"&&(yo>2&&(Ts="flipbevel"),yo<qe&&(Ts="miter")),zn&&this.updateDistance(zn,hn),Ts==="miter")bi._mult(yo),this.addCurrentVertex(hn,bi,0,0,gn);else if(Ts==="flipbevel"){if(yo>100)bi=Ua.mult(-1);else{var ks=yo*ui.add(Ua).mag()/ui.sub(Ua).mag();bi._perp()._mult(ks*(ws?-1:1))}this.addCurrentVertex(hn,bi,0,0,gn),this.addCurrentVertex(hn,bi.mult(-1),0,0,gn)}else if(Ts==="bevel"||Ts==="fakeround"){var tu=-Math.sqrt(yo*yo-1),pl=ws?tu:0,Ku=ws?0:tu;if(zn&&this.addCurrentVertex(hn,ui,pl,Ku,gn),Ts==="fakeround")for(var Jc=Math.round(Bo*180/Math.PI/g5),Ju=1;Ju<Jc;Ju++){var Qu=Ju/Jc;if(Qu!==.5){var Xu=Qu-.5,xf=1.0904+Fi*(-3.2452+Fi*(3.55645-Fi*1.43519)),If=.848013+Fi*(-1.06021+Fi*.215638);Qu=Qu+Qu*Xu*(Qu-1)*(xf*Xu*Xu+If)}var Ph=Ua.sub(ui)._mult(Qu)._add(ui)._unit()._mult(ws?-1:1);this.addHalfVertex(hn,Ph.x,Ph.y,!1,ws,0,gn)}_a&&this.addCurrentVertex(hn,Ua,-pl,-Ku,gn)}else if(Ts==="butt")this.addCurrentVertex(hn,bi,0,0,gn);else if(Ts==="square"){var Vh=zn?1:-1;this.addCurrentVertex(hn,bi,Vh,Vh,gn)}else Ts==="round"&&(zn&&(this.addCurrentVertex(hn,ui,0,0,gn),this.addCurrentVertex(hn,ui,1,1,gn,!0)),_a&&(this.addCurrentVertex(hn,Ua,-1,-1,gn,!0),this.addCurrentVertex(hn,Ua,0,0,gn)));if(zo&&ji<pr-1){var rv=hn.dist(_a);if(rv>2*$r){var xd=hn.add(_a.sub(hn)._mult($r/rv)._round());this.updateDistance(hn,xd),this.addCurrentVertex(xd,Ua,0,0,gn),hn=xd}}}}},pv.prototype.addCurrentVertex=function(I,$,he,ke,qe,et){et===void 0&&(et=!1);var Mt=$.x+$.y*he,Jt=$.y-$.x*he,pr=-$.x+$.y*ke,Ar=-$.y-$.x*ke;this.addHalfVertex(I,Mt,Jt,et,!1,he,qe),this.addHalfVertex(I,pr,Ar,et,!0,-ke,qe),this.distance>F3/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(I,$,he,ke,qe,et))},pv.prototype.addHalfVertex=function(I,$,he,ke,qe,et,Mt){var Jt=I.x,pr=I.y,Ar=this.lineClips?this.scaledDistance*(F3-1):this.scaledDistance,$r=Ar*G_;if(this.layoutVertexArray.emplaceBack((Jt<<1)+(ke?1:0),(pr<<1)+(qe?1:0),Math.round(Zk*$)+128,Math.round(Zk*he)+128,(et===0?0:et<0?-1:1)+1|($r&63)<<2,$r>>6),this.lineClips){var gn=this.scaledDistance-this.lineClips.start,hn=this.lineClips.end-this.lineClips.start,zn=gn/hn;this.layoutVertexArray2.emplaceBack(zn,this.lineClipsArray.length)}var _a=Mt.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,_a),Mt.primitiveLength++),qe?this.e2=_a:this.e1=_a},pv.prototype.updateScaledDistance=function(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance},pv.prototype.updateDistance=function(I,$){this.distance+=I.dist($),this.updateScaledDistance()},dr("LineBucket",pv,{omit:["layers","patternFeatures"]});var y5=new gi({"line-cap":new Rn(Ni.layout_line["line-cap"]),"line-join":new Pn(Ni.layout_line["line-join"]),"line-miter-limit":new Rn(Ni.layout_line["line-miter-limit"]),"line-round-limit":new Rn(Ni.layout_line["line-round-limit"]),"line-sort-key":new Pn(Ni.layout_line["line-sort-key"])}),B3=new gi({"line-opacity":new Pn(Ni.paint_line["line-opacity"]),"line-color":new Pn(Ni.paint_line["line-color"]),"line-translate":new Rn(Ni.paint_line["line-translate"]),"line-translate-anchor":new Rn(Ni.paint_line["line-translate-anchor"]),"line-width":new Pn(Ni.paint_line["line-width"]),"line-gap-width":new Pn(Ni.paint_line["line-gap-width"]),"line-offset":new Pn(Ni.paint_line["line-offset"]),"line-blur":new Pn(Ni.paint_line["line-blur"]),"line-dasharray":new ti(Ni.paint_line["line-dasharray"]),"line-pattern":new ni(Ni.paint_line["line-pattern"]),"line-gradient":new ri(Ni.paint_line["line-gradient"])}),X_={paint:B3,layout:y5},_5=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype.possiblyEvaluate=function(he,ke){return ke=new jl(Math.floor(ke.zoom),{now:ke.now,fadeDuration:ke.fadeDuration,zoomHistory:ke.zoomHistory,transition:ke.transition}),R.prototype.possiblyEvaluate.call(this,he,ke)},I.prototype.evaluate=function(he,ke,qe,et){return ke=b({},ke,{zoom:Math.floor(ke.zoom)}),R.prototype.evaluate.call(this,he,ke,qe,et)},I})(Pn),j3=new _5(X_.paint.properties["line-width"].specification);j3.useIntegerZoom=!0;var x5=(function(R){function I($){R.call(this,$,X_),this.gradientVersion=0}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype._handleSpecialPaintPropertyUpdate=function(he){if(he==="line-gradient"){var ke=this._transitionablePaint._values["line-gradient"].value.expression;this.stepInterpolant=ke._styleExpression.expression instanceof Xc,this.gradientVersion=(this.gradientVersion+1)%h}},I.prototype.gradientExpression=function(){return this._transitionablePaint._values["line-gradient"].value.expression},I.prototype.recalculate=function(he,ke){R.prototype.recalculate.call(this,he,ke),this.paint._values["line-floorwidth"]=j3.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,he)},I.prototype.createBucket=function(he){return new pv(he)},I.prototype.queryRadius=function(he){var ke=he,qe=Jk(Cv("line-width",this,ke),Cv("line-gap-width",this,ke)),et=Cv("line-offset",this,ke);return qe/2+Math.abs(et)+Cp(this.paint.get("line-translate"))},I.prototype.queryIntersectsFeature=function(he,ke,qe,et,Mt,Jt,pr){var Ar=em(he,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),Jt.angle,pr),$r=pr/2*Jk(this.paint.get("line-width").evaluate(ke,qe),this.paint.get("line-gap-width").evaluate(ke,qe)),gn=this.paint.get("line-offset").evaluate(ke,qe);return gn&&(et=K(et,gn*pr)),Uh(Ar,et,$r)},I.prototype.isTileClipped=function(){return!0},I})(qi);function Jk(R,I){return I>0?I+2*R:R}function K(R,I){for(var $=[],he=new s(0,0),ke=0;ke<R.length;ke++){for(var qe=R[ke],et=[],Mt=0;Mt<qe.length;Mt++){var Jt=qe[Mt-1],pr=qe[Mt],Ar=qe[Mt+1],$r=Mt===0?he:pr.sub(Jt)._unit()._perp(),gn=Mt===qe.length-1?he:Ar.sub(pr)._unit()._perp(),hn=$r._add(gn)._unit(),zn=hn.x*gn.x+hn.y*gn.y;hn._mult(1/zn),et.push(hn._mult(I)._add(pr))}$.push(et)}return $}var F=Fa([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),ae=Fa([{name:"a_projected_pos",components:3,type:"Float32"}],4);Fa([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);var we=Fa([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}]);Fa([{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 je=Fa([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),Qe=Fa([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);Fa([{name:"triangle",components:3,type:"Uint16"}]),Fa([{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"}]),Fa([{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"}]),Fa([{type:"Float32",name:"offsetX"}]),Fa([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);function at(R,I,$){var he=I.layout.get("text-transform").evaluate($,{});return he==="uppercase"?R=R.toLocaleUpperCase():he==="lowercase"&&(R=R.toLocaleLowerCase()),Yl.applyArabicShaping&&(R=Yl.applyArabicShaping(R)),R}function Et(R,I,$){return R.sections.forEach(function(he){he.text=at(he.text,I,$)}),R}function Ut(R){var I={},$={},he=[],ke=0;function qe(Ua){he.push(R[Ua]),ke++}function et(Ua,ji,bi){var Fi=$[Ua];return delete $[Ua],$[ji]=Fi,he[Fi].geometry[0].pop(),he[Fi].geometry[0]=he[Fi].geometry[0].concat(bi[0]),Fi}function Mt(Ua,ji,bi){var Fi=I[ji];return delete I[ji],I[Ua]=Fi,he[Fi].geometry[0].shift(),he[Fi].geometry[0]=bi[0].concat(he[Fi].geometry[0]),Fi}function Jt(Ua,ji,bi){var Fi=bi?ji[0][ji[0].length-1]:ji[0][0];return Ua+":"+Fi.x+":"+Fi.y}for(var pr=0;pr<R.length;pr++){var Ar=R[pr],$r=Ar.geometry,gn=Ar.text?Ar.text.toString():null;if(!gn){qe(pr);continue}var hn=Jt(gn,$r),zn=Jt(gn,$r,!0);if(hn in $&&zn in I&&$[hn]!==I[zn]){var _a=Mt(hn,zn,$r),ui=et(hn,zn,he[_a].geometry);delete I[hn],delete $[zn],$[Jt(gn,he[ui].geometry,!0)]=ui,he[_a].geometry=null}else hn in $?et(hn,zn,$r):zn in I?Mt(hn,zn,$r):(qe(pr),I[hn]=ke-1,$[zn]=ke-1)}return he.filter(function(Ua){return Ua.geometry})}var ir={"!":"︕","#":"＃",$:"＄","%":"％","&":"＆","(":"︵",")":"︶","*":"＊","+":"＋",",":"︐","-":"︲",".":"・","/":"／",":":"︓",";":"︔","<":"︿","=":"＝",">":"﹀","?":"︖","@":"＠","[":"﹇","\\":"＼","]":"﹈","^":"＾",_:"︳","`":"｀","{":"︷","|":"―","}":"︸","~":"～","¢":"￠","£":"￡","¥":"￥","¦":"￤","¬":"￢","¯":"￣","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"￦","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","！":"︕","（":"︵","）":"︶","，":"︐","－":"︲","．":"・","：":"︓","；":"︔","＜":"︿","＞":"﹀","？":"︖","［":"﹇","］":"﹈","＿":"︳","｛":"︷","｜":"―","｝":"︸","｟":"︵","｠":"︶","｡":"︒","｢":"﹁","｣":"﹂"};function Er(R){for(var I="",$=0;$<R.length;$++){var he=R.charCodeAt($+1)||null,ke=R.charCodeAt($-1)||null,qe=(!he||!Ma(he)||ir[R[$+1]])&&(!ke||!Ma(ke)||ir[R[$-1]]);qe&&ir[R[$]]?I+=ir[R[$]]:I+=R[$]}return I}var Ir=24,nn=function(R,I,$,he,ke){var qe,et,Mt=ke*8-he-1,Jt=(1<<Mt)-1,pr=Jt>>1,Ar=-7,$r=$?ke-1:0,gn=$?-1:1,hn=R[I+$r];for($r+=gn,qe=hn&(1<<-Ar)-1,hn>>=-Ar,Ar+=Mt;Ar>0;qe=qe*256+R[I+$r],$r+=gn,Ar-=8);for(et=qe&(1<<-Ar)-1,qe>>=-Ar,Ar+=he;Ar>0;et=et*256+R[I+$r],$r+=gn,Ar-=8);if(qe===0)qe=1-pr;else{if(qe===Jt)return et?NaN:(hn?-1:1)*(1/0);et=et+Math.pow(2,he),qe=qe-pr}return(hn?-1:1)*et*Math.pow(2,qe-he)},vn=function(R,I,$,he,ke,qe){var et,Mt,Jt,pr=qe*8-ke-1,Ar=(1<<pr)-1,$r=Ar>>1,gn=ke===23?Math.pow(2,-24)-Math.pow(2,-77):0,hn=he?0:qe-1,zn=he?1:-1,_a=I<0||I===0&&1/I<0?1:0;for(I=Math.abs(I),isNaN(I)||I===1/0?(Mt=isNaN(I)?1:0,et=Ar):(et=Math.floor(Math.log(I)/Math.LN2),I*(Jt=Math.pow(2,-et))<1&&(et--,Jt*=2),et+$r>=1?I+=gn/Jt:I+=gn*Math.pow(2,1-$r),I*Jt>=2&&(et++,Jt/=2),et+$r>=Ar?(Mt=0,et=Ar):et+$r>=1?(Mt=(I*Jt-1)*Math.pow(2,ke),et=et+$r):(Mt=I*Math.pow(2,$r-1)*Math.pow(2,ke),et=0));ke>=8;R[$+hn]=Mt&255,hn+=zn,Mt/=256,ke-=8);for(et=et<<ke|Mt,pr+=ke;pr>0;R[$+hn]=et&255,hn+=zn,et/=256,pr-=8);R[$+hn-zn]|=_a*128},Cn={read:nn,write:vn},jn=aa;function aa(R){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(R)?R:new Uint8Array(R||0),this.pos=0,this.type=0,this.length=this.buf.length}aa.Varint=0,aa.Fixed64=1,aa.Bytes=2,aa.Fixed32=5;var Oa=65536*65536,Pi=1/Oa,oi=12,Ti=typeof TextDecoder>"u"?null:new TextDecoder("utf8");aa.prototype={destroy:function(){this.buf=null},readFields:function(R,I,$){for($=$||this.length;this.pos<$;){var he=this.readVarint(),ke=he>>3,qe=this.pos;this.type=he&7,R(ke,I,this),this.pos===qe&&this.skip(he)}return I},readMessage:function(R,I){return this.readFields(R,I,this.readVarint()+this.pos)},readFixed32:function(){var R=ip(this.buf,this.pos);return this.pos+=4,R},readSFixed32:function(){var R=md(this.buf,this.pos);return this.pos+=4,R},readFixed64:function(){var R=ip(this.buf,this.pos)+ip(this.buf,this.pos+4)*Oa;return this.pos+=8,R},readSFixed64:function(){var R=ip(this.buf,this.pos)+md(this.buf,this.pos+4)*Oa;return this.pos+=8,R},readFloat:function(){var R=Cn.read(this.buf,this.pos,!0,23,4);return this.pos+=4,R},readDouble:function(){var R=Cn.read(this.buf,this.pos,!0,52,8);return this.pos+=8,R},readVarint:function(R){var I=this.buf,$,he;return he=I[this.pos++],$=he&127,he<128||(he=I[this.pos++],$|=(he&127)<<7,he<128)||(he=I[this.pos++],$|=(he&127)<<14,he<128)||(he=I[this.pos++],$|=(he&127)<<21,he<128)?$:(he=I[this.pos],$|=(he&15)<<28,ao($,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,I=this.pos;return this.pos=R,R-I>=oi&&Ti?Yv(this.buf,I,R):Wv(this.buf,I,R)},readBytes:function(){var R=this.readVarint()+this.pos,I=this.buf.subarray(this.pos,R);return this.pos=R,I},readPackedVarint:function(R,I){if(this.type!==aa.Bytes)return R.push(this.readVarint(I));var $=Lo(this);for(R=R||[];this.pos<$;)R.push(this.readVarint(I));return R},readPackedSVarint:function(R){if(this.type!==aa.Bytes)return R.push(this.readSVarint());var I=Lo(this);for(R=R||[];this.pos<I;)R.push(this.readSVarint());return R},readPackedBoolean:function(R){if(this.type!==aa.Bytes)return R.push(this.readBoolean());var I=Lo(this);for(R=R||[];this.pos<I;)R.push(this.readBoolean());return R},readPackedFloat:function(R){if(this.type!==aa.Bytes)return R.push(this.readFloat());var I=Lo(this);for(R=R||[];this.pos<I;)R.push(this.readFloat());return R},readPackedDouble:function(R){if(this.type!==aa.Bytes)return R.push(this.readDouble());var I=Lo(this);for(R=R||[];this.pos<I;)R.push(this.readDouble());return R},readPackedFixed32:function(R){if(this.type!==aa.Bytes)return R.push(this.readFixed32());var I=Lo(this);for(R=R||[];this.pos<I;)R.push(this.readFixed32());return R},readPackedSFixed32:function(R){if(this.type!==aa.Bytes)return R.push(this.readSFixed32());var I=Lo(this);for(R=R||[];this.pos<I;)R.push(this.readSFixed32());return R},readPackedFixed64:function(R){if(this.type!==aa.Bytes)return R.push(this.readFixed64());var I=Lo(this);for(R=R||[];this.pos<I;)R.push(this.readFixed64());return R},readPackedSFixed64:function(R){if(this.type!==aa.Bytes)return R.push(this.readSFixed64());var I=Lo(this);for(R=R||[];this.pos<I;)R.push(this.readSFixed64());return R},skip:function(R){var I=R&7;if(I===aa.Varint)for(;this.buf[this.pos++]>127;);else if(I===aa.Bytes)this.pos=this.readVarint()+this.pos;else if(I===aa.Fixed32)this.pos+=4;else if(I===aa.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+I)},writeTag:function(R,I){this.writeVarint(R<<3|I)},realloc:function(R){for(var I=this.length||16;I<this.pos+R;)I*=2;if(I!==this.length){var $=new Uint8Array(I);$.set(this.buf),this.buf=$,this.length=I}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(R){this.realloc(4),qh(this.buf,R,this.pos),this.pos+=4},writeSFixed32:function(R){this.realloc(4),qh(this.buf,R,this.pos),this.pos+=4},writeFixed64:function(R){this.realloc(8),qh(this.buf,R&-1,this.pos),qh(this.buf,Math.floor(R*Pi),this.pos+4),this.pos+=8},writeSFixed64:function(R){this.realloc(8),qh(this.buf,R&-1,this.pos),qh(this.buf,Math.floor(R*Pi),this.pos+4),this.pos+=8},writeVarint:function(R){if(R=+R||0,R>268435455||R<0){Al(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 I=this.pos;this.pos=Zv(this.buf,R,this.pos);var $=this.pos-I;$>=128&&Xs(I,$,this),this.pos=I-1,this.writeVarint($),this.pos+=$},writeFloat:function(R){this.realloc(4),Cn.write(this.buf,R,this.pos,!0,23,4),this.pos+=4},writeDouble:function(R){this.realloc(8),Cn.write(this.buf,R,this.pos,!0,52,8),this.pos+=8},writeBytes:function(R){var I=R.length;this.writeVarint(I),this.realloc(I);for(var $=0;$<I;$++)this.buf[this.pos++]=R[$]},writeRawMessage:function(R,I){this.pos++;var $=this.pos;R(I,this);var he=this.pos-$;he>=128&&Xs($,he,this),this.pos=$-1,this.writeVarint(he),this.pos+=he},writeMessage:function(R,I,$){this.writeTag(R,aa.Bytes),this.writeRawMessage(I,$)},writePackedVarint:function(R,I){I.length&&this.writeMessage(R,Ns,I)},writePackedSVarint:function(R,I){I.length&&this.writeMessage(R,Ds,I)},writePackedBoolean:function(R,I){I.length&&this.writeMessage(R,Ws,I)},writePackedFloat:function(R,I){I.length&&this.writeMessage(R,xo,I)},writePackedDouble:function(R,I){I.length&&this.writeMessage(R,tl,I)},writePackedFixed32:function(R,I){I.length&&this.writeMessage(R,Vl,I)},writePackedSFixed32:function(R,I){I.length&&this.writeMessage(R,yf,I)},writePackedFixed64:function(R,I){I.length&&this.writeMessage(R,uf,I)},writePackedSFixed64:function(R,I){I.length&&this.writeMessage(R,Rd,I)},writeBytesField:function(R,I){this.writeTag(R,aa.Bytes),this.writeBytes(I)},writeFixed32Field:function(R,I){this.writeTag(R,aa.Fixed32),this.writeFixed32(I)},writeSFixed32Field:function(R,I){this.writeTag(R,aa.Fixed32),this.writeSFixed32(I)},writeFixed64Field:function(R,I){this.writeTag(R,aa.Fixed64),this.writeFixed64(I)},writeSFixed64Field:function(R,I){this.writeTag(R,aa.Fixed64),this.writeSFixed64(I)},writeVarintField:function(R,I){this.writeTag(R,aa.Varint),this.writeVarint(I)},writeSVarintField:function(R,I){this.writeTag(R,aa.Varint),this.writeSVarint(I)},writeStringField:function(R,I){this.writeTag(R,aa.Bytes),this.writeString(I)},writeFloatField:function(R,I){this.writeTag(R,aa.Fixed32),this.writeFloat(I)},writeDoubleField:function(R,I){this.writeTag(R,aa.Fixed64),this.writeDouble(I)},writeBooleanField:function(R,I){this.writeVarintField(R,!!I)}};function ao(R,I,$){var he=$.buf,ke,qe;if(qe=he[$.pos++],ke=(qe&112)>>4,qe<128||(qe=he[$.pos++],ke|=(qe&127)<<3,qe<128)||(qe=he[$.pos++],ke|=(qe&127)<<10,qe<128)||(qe=he[$.pos++],ke|=(qe&127)<<17,qe<128)||(qe=he[$.pos++],ke|=(qe&127)<<24,qe<128)||(qe=he[$.pos++],ke|=(qe&1)<<31,qe<128))return cs(R,ke,I);throw new Error("Expected varint not more than 10 bytes")}function Lo(R){return R.type===aa.Bytes?R.readVarint()+R.pos:R.pos+1}function cs(R,I,$){return $?I*4294967296+(R>>>0):(I>>>0)*4294967296+(R>>>0)}function Al(R,I){var $,he;if(R>=0?($=R%4294967296|0,he=R/4294967296|0):($=~(-R%4294967296),he=~(-R/4294967296),$^4294967295?$=$+1|0:($=0,he=he+1|0)),R>=18446744073709552e3||R<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");I.realloc(10),xs($,he,I),ss(he,I)}function xs(R,I,$){$.buf[$.pos++]=R&127|128,R>>>=7,$.buf[$.pos++]=R&127|128,R>>>=7,$.buf[$.pos++]=R&127|128,R>>>=7,$.buf[$.pos++]=R&127|128,R>>>=7,$.buf[$.pos]=R&127}function ss(R,I){var $=(R&7)<<4;I.buf[I.pos++]|=$|((R>>>=3)?128:0),R&&(I.buf[I.pos++]=R&127|((R>>>=7)?128:0),R&&(I.buf[I.pos++]=R&127|((R>>>=7)?128:0),R&&(I.buf[I.pos++]=R&127|((R>>>=7)?128:0),R&&(I.buf[I.pos++]=R&127|((R>>>=7)?128:0),R&&(I.buf[I.pos++]=R&127)))))}function Xs(R,I,$){var he=I<=16383?1:I<=2097151?2:I<=268435455?3:Math.floor(Math.log(I)/(Math.LN2*7));$.realloc(he);for(var ke=$.pos-1;ke>=R;ke--)$.buf[ke+he]=$.buf[ke]}function Ns(R,I){for(var $=0;$<R.length;$++)I.writeVarint(R[$])}function Ds(R,I){for(var $=0;$<R.length;$++)I.writeSVarint(R[$])}function xo(R,I){for(var $=0;$<R.length;$++)I.writeFloat(R[$])}function tl(R,I){for(var $=0;$<R.length;$++)I.writeDouble(R[$])}function Ws(R,I){for(var $=0;$<R.length;$++)I.writeBoolean(R[$])}function Vl(R,I){for(var $=0;$<R.length;$++)I.writeFixed32(R[$])}function yf(R,I){for(var $=0;$<R.length;$++)I.writeSFixed32(R[$])}function uf(R,I){for(var $=0;$<R.length;$++)I.writeFixed64(R[$])}function Rd(R,I){for(var $=0;$<R.length;$++)I.writeSFixed64(R[$])}function ip(R,I){return(R[I]|R[I+1]<<8|R[I+2]<<16)+R[I+3]*16777216}function qh(R,I,$){R[$]=I,R[$+1]=I>>>8,R[$+2]=I>>>16,R[$+3]=I>>>24}function md(R,I){return(R[I]|R[I+1]<<8|R[I+2]<<16)+(R[I+3]<<24)}function Wv(R,I,$){for(var he="",ke=I;ke<$;){var qe=R[ke],et=null,Mt=qe>239?4:qe>223?3:qe>191?2:1;if(ke+Mt>$)break;var Jt,pr,Ar;Mt===1?qe<128&&(et=qe):Mt===2?(Jt=R[ke+1],(Jt&192)===128&&(et=(qe&31)<<6|Jt&63,et<=127&&(et=null))):Mt===3?(Jt=R[ke+1],pr=R[ke+2],(Jt&192)===128&&(pr&192)===128&&(et=(qe&15)<<12|(Jt&63)<<6|pr&63,(et<=2047||et>=55296&&et<=57343)&&(et=null))):Mt===4&&(Jt=R[ke+1],pr=R[ke+2],Ar=R[ke+3],(Jt&192)===128&&(pr&192)===128&&(Ar&192)===128&&(et=(qe&15)<<18|(Jt&63)<<12|(pr&63)<<6|Ar&63,(et<=65535||et>=1114112)&&(et=null))),et===null?(et=65533,Mt=1):et>65535&&(et-=65536,he+=String.fromCharCode(et>>>10&1023|55296),et=56320|et&1023),he+=String.fromCharCode(et),ke+=Mt}return he}function Yv(R,I,$){return Ti.decode(R.subarray(I,$))}function Zv(R,I,$){for(var he=0,ke,qe;he<I.length;he++){if(ke=I.charCodeAt(he),ke>55295&&ke<57344)if(qe)if(ke<56320){R[$++]=239,R[$++]=191,R[$++]=189,qe=ke;continue}else ke=qe-55296<<10|ke-56320|65536,qe=null;else{ke>56319||he+1===I.length?(R[$++]=239,R[$++]=191,R[$++]=189):qe=ke;continue}else qe&&(R[$++]=239,R[$++]=191,R[$++]=189,qe=null);ke<128?R[$++]=ke:(ke<2048?R[$++]=ke>>6|192:(ke<65536?R[$++]=ke>>12|224:(R[$++]=ke>>18|240,R[$++]=ke>>12&63|128),R[$++]=ke>>6&63|128),R[$++]=ke&63|128)}return $}var fh=3;function Id(R,I,$){R===1&&$.readMessage(Pv,I)}function Pv(R,I,$){if(R===3){var he=$.readMessage(mv,{}),ke=he.id,qe=he.bitmap,et=he.width,Mt=he.height,Jt=he.left,pr=he.top,Ar=he.advance;I.push({id:ke,bitmap:new pd({width:et+2*fh,height:Mt+2*fh},qe),metrics:{width:et,height:Mt,left:Jt,top:pr,advance:Ar}})}}function mv(R,I,$){R===1?I.id=$.readVarint():R===2?I.bitmap=$.readBytes():R===3?I.width=$.readVarint():R===4?I.height=$.readVarint():R===5?I.left=$.readSVarint():R===6?I.top=$.readSVarint():R===7&&(I.advance=$.readVarint())}function $v(R){return new jn(R).readFields(Id,[])}var Qd=fh;function Rp(R){for(var I=0,$=0,he=0,ke=R;he<ke.length;he+=1){var qe=ke[he];I+=qe.w*qe.h,$=Math.max($,qe.w)}R.sort(function(ui,Ua){return Ua.h-ui.h});for(var et=Math.max(Math.ceil(Math.sqrt(I/.95)),$),Mt=[{x:0,y:0,w:et,h:1/0}],Jt=0,pr=0,Ar=0,$r=R;Ar<$r.length;Ar+=1)for(var gn=$r[Ar],hn=Mt.length-1;hn>=0;hn--){var zn=Mt[hn];if(!(gn.w>zn.w||gn.h>zn.h)){if(gn.x=zn.x,gn.y=zn.y,pr=Math.max(pr,gn.y+gn.h),Jt=Math.max(Jt,gn.x+gn.w),gn.w===zn.w&&gn.h===zn.h){var _a=Mt.pop();hn<Mt.length&&(Mt[hn]=_a)}else gn.h===zn.h?(zn.x+=gn.w,zn.w-=gn.w):gn.w===zn.w?(zn.y+=gn.h,zn.h-=gn.h):(Mt.push({x:zn.x+gn.w,y:zn.y,w:zn.w-gn.w,h:gn.h}),zn.y+=gn.h,zn.h-=gn.h);break}}return{w:Jt,h:pr,fill:I/(Jt*pr)||0}}var Lf=1,$u=function(I,$){var he=$.pixelRatio,ke=$.version,qe=$.stretchX,et=$.stretchY,Mt=$.content;this.paddedRect=I,this.pixelRatio=he,this.stretchX=qe,this.stretchY=et,this.content=Mt,this.version=ke},zc={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};zc.tl.get=function(){return[this.paddedRect.x+Lf,this.paddedRect.y+Lf]},zc.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-Lf,this.paddedRect.y+this.paddedRect.h-Lf]},zc.tlbr.get=function(){return this.tl.concat(this.br)},zc.displaySize.get=function(){return[(this.paddedRect.w-Lf*2)/this.pixelRatio,(this.paddedRect.h-Lf*2)/this.pixelRatio]},Object.defineProperties($u.prototype,zc);var $c=function(I,$){var he={},ke={};this.haveRenderCallbacks=[];var qe=[];this.addImages(I,he,qe),this.addImages($,ke,qe);var et=Rp(qe),Mt=et.w,Jt=et.h,pr=new vv({width:Mt||1,height:Jt||1});for(var Ar in I){var $r=I[Ar],gn=he[Ar].paddedRect;vv.copy($r.data,pr,{x:0,y:0},{x:gn.x+Lf,y:gn.y+Lf},$r.data)}for(var hn in $){var zn=$[hn],_a=ke[hn].paddedRect,ui=_a.x+Lf,Ua=_a.y+Lf,ji=zn.data.width,bi=zn.data.height;vv.copy(zn.data,pr,{x:0,y:0},{x:ui,y:Ua},zn.data),vv.copy(zn.data,pr,{x:0,y:bi-1},{x:ui,y:Ua-1},{width:ji,height:1}),vv.copy(zn.data,pr,{x:0,y:0},{x:ui,y:Ua+bi},{width:ji,height:1}),vv.copy(zn.data,pr,{x:ji-1,y:0},{x:ui-1,y:Ua},{width:1,height:bi}),vv.copy(zn.data,pr,{x:0,y:0},{x:ui+ji,y:Ua},{width:1,height:bi})}this.image=pr,this.iconPositions=he,this.patternPositions=ke};$c.prototype.addImages=function(I,$,he){for(var ke in I){var qe=I[ke],et={x:0,y:0,w:qe.data.width+2*Lf,h:qe.data.height+2*Lf};he.push(et),$[ke]=new $u(et,qe),qe.hasRenderCallback&&this.haveRenderCallbacks.push(ke)}},$c.prototype.patchUpdatedImages=function(I,$){I.dispatchRenderCallbacks(this.haveRenderCallbacks);for(var he in I.updatedImages)this.patchUpdatedImage(this.iconPositions[he],I.getImage(he),$),this.patchUpdatedImage(this.patternPositions[he],I.getImage(he),$)},$c.prototype.patchUpdatedImage=function(I,$,he){if(!(!I||!$)&&I.version!==$.version){I.version=$.version;var ke=I.tl,qe=ke[0],et=ke[1];he.update($.data,void 0,{x:qe,y:et})}},dr("ImagePosition",$u),dr("ImageAtlas",$c);var nh={horizontal:1,vertical:2,horizontalOnly:3},Rf=-17;function W_(R){for(var I=0,$=R;I<$.length;I+=1){var he=$[I];if(he.positionedGlyphs.length!==0)return!1}return!0}var Gm=57344,Xm=63743,Lv=function(){this.scale=1,this.fontStack="",this.imageName=null};Lv.forText=function(I,$){var he=new Lv;return he.scale=I||1,he.fontStack=$,he},Lv.forImage=function(I){var $=new Lv;return $.imageName=I,$};var _f=function(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null};_f.fromFeature=function(I,$){for(var he=new _f,ke=0;ke<I.sections.length;ke++){var qe=I.sections[ke];qe.image?he.addImageSection(qe):he.addTextSection(qe,$)}return he},_f.prototype.length=function(){return this.text.length},_f.prototype.getSection=function(I){return this.sections[this.sectionIndex[I]]},_f.prototype.getSectionIndex=function(I){return this.sectionIndex[I]},_f.prototype.getCharCode=function(I){return this.text.charCodeAt(I)},_f.prototype.verticalizePunctuation=function(){this.text=Er(this.text)},_f.prototype.trim=function(){for(var I=0,$=0;$<this.text.length&&Ip[this.text.charCodeAt($)];$++)I++;for(var he=this.text.length,ke=this.text.length-1;ke>=0&&ke>=I&&Ip[this.text.charCodeAt(ke)];ke--)he--;this.text=this.text.substring(I,he),this.sectionIndex=this.sectionIndex.slice(I,he)},_f.prototype.substring=function(I,$){var he=new _f;return he.text=this.text.substring(I,$),he.sectionIndex=this.sectionIndex.slice(I,$),he.sections=this.sections,he},_f.prototype.toString=function(){return this.text},_f.prototype.getMaxScale=function(){var I=this;return this.sectionIndex.reduce(function($,he){return Math.max($,I.sections[he].scale)},0)},_f.prototype.addTextSection=function(I,$){this.text+=I.text,this.sections.push(Lv.forText(I.scale,I.fontStack||$));for(var he=this.sections.length-1,ke=0;ke<I.text.length;++ke)this.sectionIndex.push(he)},_f.prototype.addImageSection=function(I){var $=I.image?I.image.name:"";if($.length===0){G("Can't add FormattedSection with an empty image.");return}var he=this.getNextImageSectionCharCode();if(!he){G("Reached maximum number of images "+(Xm-Gm+2));return}this.text+=String.fromCharCode(he),this.sections.push(Lv.forImage($)),this.sectionIndex.push(this.sections.length-1)},_f.prototype.getNextImageSectionCharCode=function(){return this.imageSectionID?this.imageSectionID>=Xm?null:++this.imageSectionID:(this.imageSectionID=Gm,this.imageSectionID)};function ev(R,I){for(var $=[],he=R.text,ke=0,qe=0,et=I;qe<et.length;qe+=1){var Mt=et[qe];$.push(R.substring(ke,Mt)),ke=Mt}return ke<he.length&&$.push(R.substring(ke,he.length)),$}function mm(R,I,$,he,ke,qe,et,Mt,Jt,pr,Ar,$r,gn,hn,zn,_a){var ui=_f.fromFeature(R,ke);$r===nh.vertical&&ui.verticalizePunctuation();var Ua,ji=Yl.processBidirectionalText,bi=Yl.processStyledBidirectionalText;if(ji&&ui.sections.length===1){Ua=[];for(var Fi=ji(ui.toString(),S5(ui,pr,qe,I,he,hn,zn)),Zi=0,yo=Fi;Zi<yo.length;Zi+=1){var Bo=yo[Zi],zo=new _f;zo.text=Bo,zo.sections=ui.sections;for(var ws=0;ws<Bo.length;ws++)zo.sectionIndex.push(0);Ua.push(zo)}}else if(bi){Ua=[];for(var Qo=bi(ui.text,ui.sectionIndex,S5(ui,pr,qe,I,he,hn,zn)),fs=0,Sl=Qo;fs<Sl.length;fs+=1){var Ts=Sl[fs],ks=new _f;ks.text=Ts[0],ks.sectionIndex=Ts[1],ks.sections=ui.sections,Ua.push(ks)}}else Ua=ev(ui,S5(ui,pr,qe,I,he,hn,zn));var tu=[],pl={positionedLines:tu,text:ui.toString(),top:Ar[1],bottom:Ar[1],left:Ar[0],right:Ar[0],writingMode:$r,iconsInText:!1,verticalizable:!1};return A8(pl,I,$,he,Ua,et,Mt,Jt,$r,pr,gn,_a),W_(tu)?!1:pl}var Ip={};Ip[9]=!0,Ip[10]=!0,Ip[11]=!0,Ip[12]=!0,Ip[13]=!0,Ip[32]=!0;var Kv={};Kv[10]=!0,Kv[32]=!0,Kv[38]=!0,Kv[40]=!0,Kv[41]=!0,Kv[43]=!0,Kv[45]=!0,Kv[47]=!0,Kv[173]=!0,Kv[183]=!0,Kv[8203]=!0,Kv[8208]=!0,Kv[8211]=!0,Kv[8231]=!0;function b5(R,I,$,he,ke,qe){if(I.imageName){var Jt=he[I.imageName];return Jt?Jt.displaySize[0]*I.scale*Ir/qe+ke:0}else{var et=$[I.fontStack],Mt=et&&et[R];return Mt?Mt.metrics.advance*I.scale+ke:0}}function w5(R,I,$,he,ke,qe){for(var et=0,Mt=0;Mt<R.length();Mt++){var Jt=R.getSection(Mt);et+=b5(R.getCharCode(Mt),Jt,he,ke,I,qe)}var pr=Math.max(1,Math.ceil(et/$));return et/pr}function U3(R,I,$,he){var ke=Math.pow(R-I,2);return he?R<I?ke/2:ke*2:ke+Math.abs($)*$}function sg(R,I,$){var he=0;return R===10&&(he-=1e4),$&&(he+=150),(R===40||R===65288)&&(he+=50),(I===41||I===65289)&&(he+=50),he}function T5(R,I,$,he,ke,qe){for(var et=null,Mt=U3(I,$,ke,qe),Jt=0,pr=he;Jt<pr.length;Jt+=1){var Ar=pr[Jt],$r=I-Ar.x,gn=U3($r,$,ke,qe)+Ar.badness;gn<=Mt&&(et=Ar,Mt=gn)}return{index:R,x:I,priorBreak:et,badness:Mt}}function A5(R){return R?A5(R.priorBreak).concat(R.index):[]}function S5(R,I,$,he,ke,qe,et){if(qe!=="point")return[];if(!R)return[];for(var Mt=[],Jt=w5(R,I,$,he,ke,et),pr=R.text.indexOf("​")>=0,Ar=0,$r=0;$r<R.length();$r++){var gn=R.getSection($r),hn=R.getCharCode($r);if(Ip[hn]||(Ar+=b5(hn,gn,he,ke,I,et)),$r<R.length()-1){var zn=Ca(hn);(Kv[hn]||zn||gn.imageName)&&Mt.push(T5($r+1,Ar,Jt,Mt,sg(hn,R.getCharCode($r+1),zn&&pr),!1))}}return A5(T5(R.length(),Ar,Jt,Mt,0,!0))}function E5(R){var I=.5,$=.5;switch(R){case"right":case"top-right":case"bottom-right":I=1;break;case"left":case"top-left":case"bottom-left":I=0;break}switch(R){case"bottom":case"bottom-right":case"bottom-left":$=1;break;case"top":case"top-right":case"top-left":$=0;break}return{horizontalAlign:I,verticalAlign:$}}function A8(R,I,$,he,ke,qe,et,Mt,Jt,pr,Ar,$r){for(var gn=0,hn=Rf,zn=0,_a=0,ui=Mt==="right"?1:Mt==="left"?0:.5,Ua=0,ji=0,bi=ke;ji<bi.length;ji+=1){var Fi=bi[ji];Fi.trim();var Zi=Fi.getMaxScale(),yo=(Zi-1)*Ir,Bo={positionedGlyphs:[],lineOffset:0};R.positionedLines[Ua]=Bo;var zo=Bo.positionedGlyphs,ws=0;if(!Fi.length()){hn+=qe,++Ua;continue}for(var Qo=0;Qo<Fi.length();Qo++){var fs=Fi.getSection(Qo),Sl=Fi.getSectionIndex(Qo),Ts=Fi.getCharCode(Qo),ks=0,tu=null,pl=null,Ku=null,Jc=Ir,Ju=!(Jt===nh.horizontal||!Ar&&!Xa(Ts)||Ar&&(Ip[Ts]||Ci(Ts)));if(fs.imageName){var Ph=he[fs.imageName];if(!Ph)continue;Ku=fs.imageName,R.iconsInText=R.iconsInText||!0,pl=Ph.paddedRect;var Vh=Ph.displaySize;fs.scale=fs.scale*Ir/$r,tu={width:Vh[0],height:Vh[1],left:Lf,top:-Qd,advance:Ju?Vh[1]:Vh[0]};var rv=Ir-Vh[1]*fs.scale;ks=yo+rv,Jc=tu.advance;var xd=Ju?Vh[0]*fs.scale-Ir*Zi:Vh[1]*fs.scale-Ir*Zi;xd>0&&xd>ws&&(ws=xd)}else{var Qu=$[fs.fontStack],Xu=Qu&&Qu[Ts];if(Xu&&Xu.rect)pl=Xu.rect,tu=Xu.metrics;else{var xf=I[fs.fontStack],If=xf&&xf[Ts];if(!If)continue;tu=If.metrics}ks=(Zi-fs.scale)*Ir}Ju?(R.verticalizable=!0,zo.push({glyph:Ts,imageName:Ku,x:gn,y:hn+ks,vertical:Ju,scale:fs.scale,fontStack:fs.fontStack,sectionIndex:Sl,metrics:tu,rect:pl}),gn+=Jc*fs.scale+pr):(zo.push({glyph:Ts,imageName:Ku,x:gn,y:hn+ks,vertical:Ju,scale:fs.scale,fontStack:fs.fontStack,sectionIndex:Sl,metrics:tu,rect:pl}),gn+=tu.advance*fs.scale+pr)}if(zo.length!==0){var Jv=gn-pr;zn=Math.max(Jv,zn),S8(zo,0,zo.length-1,ui,ws)}gn=0;var Qv=qe*Zi+ws;Bo.lineOffset=Math.max(ws,yo),hn+=Qv,_a=Math.max(Qv,_a),++Ua}var nv=hn-Rf,op=E5(et),sp=op.horizontalAlign,Dd=op.verticalAlign;E8(R.positionedLines,ui,sp,Dd,zn,_a,qe,nv,ke.length),R.top+=-Dd*nv,R.bottom=R.top+nv,R.left+=-sp*zn,R.right=R.left+zn}function S8(R,I,$,he,ke){if(!(!he&&!ke))for(var qe=R[$],et=qe.metrics.advance*qe.scale,Mt=(R[$].x+et)*he,Jt=I;Jt<=$;Jt++)R[Jt].x-=Mt,R[Jt].y+=ke}function E8(R,I,$,he,ke,qe,et,Mt,Jt){var pr=(I-$)*ke,Ar=0;qe!==et?Ar=-Mt*he-Rf:Ar=(-he*Jt+.5)*et;for(var $r=0,gn=R;$r<gn.length;$r+=1)for(var hn=gn[$r],zn=0,_a=hn.positionedGlyphs;zn<_a.length;zn+=1){var ui=_a[zn];ui.x+=pr,ui.y+=Ar}}function M8(R,I,$){var he=E5($),ke=he.horizontalAlign,qe=he.verticalAlign,et=I[0],Mt=I[1],Jt=et-R.displaySize[0]*ke,pr=Jt+R.displaySize[0],Ar=Mt-R.displaySize[1]*qe,$r=Ar+R.displaySize[1];return{image:R,top:Ar,bottom:$r,left:Jt,right:pr}}function Qk(R,I,$,he,ke,qe){var et=R.image,Mt;if(et.content){var Jt=et.content,pr=et.pixelRatio||1;Mt=[Jt[0]/pr,Jt[1]/pr,et.displaySize[0]-Jt[2]/pr,et.displaySize[1]-Jt[3]/pr]}var Ar=I.left*qe,$r=I.right*qe,gn,hn,zn,_a;$==="width"||$==="both"?(_a=ke[0]+Ar-he[3],hn=ke[0]+$r+he[1]):(_a=ke[0]+(Ar+$r-et.displaySize[0])/2,hn=_a+et.displaySize[0]);var ui=I.top*qe,Ua=I.bottom*qe;return $==="height"||$==="both"?(gn=ke[1]+ui-he[0],zn=ke[1]+Ua+he[2]):(gn=ke[1]+(ui+Ua-et.displaySize[1])/2,zn=gn+et.displaySize[1]),{image:et,top:gn,right:hn,bottom:zn,left:_a,collisionPadding:Mt}}var Y_=(function(R){function I($,he,ke,qe){R.call(this,$,he),this.angle=ke,qe!==void 0&&(this.segment=qe)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype.clone=function(){return new I(this.x,this.y,this.angle,this.segment)},I})(s);dr("Anchor",Y_);var gd=128;function Z_(R,I){var $=I.expression;if($.kind==="constant"){var he=$.evaluate(new jl(R+1));return{kind:"constant",layoutSize:he}}else{if($.kind==="source")return{kind:"source"};for(var ke=$.zoomStops,qe=$.interpolationType,et=0;et<ke.length&&ke[et]<=R;)et++;et=Math.max(0,et-1);for(var Mt=et;Mt<ke.length&&ke[Mt]<R+1;)Mt++;Mt=Math.min(ke.length-1,Mt);var Jt=ke[et],pr=ke[Mt];if($.kind==="composite")return{kind:"composite",minZoom:Jt,maxZoom:pr,interpolationType:qe};var Ar=$.evaluate(new jl(Jt)),$r=$.evaluate(new jl(pr));return{kind:"camera",minZoom:Jt,maxZoom:pr,minSize:Ar,maxSize:$r,interpolationType:qe}}}function M5(R,I,$){var he=I.uSize,ke=I.uSizeT,qe=$.lowerSize,et=$.upperSize;return R.kind==="source"?qe/gd:R.kind==="composite"?bu(qe/gd,et/gd,ke):he}function e6(R,I){var $=0,he=0;if(R.kind==="constant")he=R.layoutSize;else if(R.kind!=="source"){var ke=R.interpolationType,qe=R.minZoom,et=R.maxZoom,Mt=ke?c(xc.interpolationFactor(ke,I,qe,et),0,1):0;R.kind==="camera"?he=bu(R.minSize,R.maxSize,Mt):$=Mt}return{uSizeT:$,uSize:he}}var C8=Object.freeze({__proto__:null,getSizeData:Z_,evaluateSizeForFeature:M5,evaluateSizeForZoom:e6,SIZE_PACK_FACTOR:gd});function t6(R,I,$,he,ke){if(I.segment===void 0)return!0;for(var qe=I,et=I.segment+1,Mt=0;Mt>-$/2;){if(et--,et<0)return!1;Mt-=R[et].dist(qe),qe=R[et]}Mt+=R[et].dist(R[et+1]),et++;for(var Jt=[],pr=0;Mt<$/2;){var Ar=R[et-1],$r=R[et],gn=R[et+1];if(!gn)return!1;var hn=Ar.angleTo($r)-$r.angleTo(gn);for(hn=Math.abs((hn+3*Math.PI)%(Math.PI*2)-Math.PI),Jt.push({distance:Mt,angleDelta:hn}),pr+=hn;Mt-Jt[0].distance>he;)pr-=Jt.shift().angleDelta;if(pr>ke)return!1;et++,Mt+=$r.dist(gn)}return!0}function gv(R){for(var I=0,$=0;$<R.length-1;$++)I+=R[$].dist(R[$+1]);return I}function Dp(R,I,$){return R?3/5*I*$:0}function cy(R,I){return Math.max(R?R.right-R.left:0,I?I.right-I.left:0)}function Wm(R,I,$,he,ke,qe){for(var et=Dp($,ke,qe),Mt=cy($,he)*qe,Jt=0,pr=gv(R)/2,Ar=0;Ar<R.length-1;Ar++){var $r=R[Ar],gn=R[Ar+1],hn=$r.dist(gn);if(Jt+hn>pr){var zn=(pr-Jt)/hn,_a=bu($r.x,gn.x,zn),ui=bu($r.y,gn.y,zn),Ua=new Y_(_a,ui,gn.angleTo($r),Ar);return Ua._round(),!et||t6(R,Ua,Mt,et,I)?Ua:void 0}Jt+=hn}}function d1(R,I,$,he,ke,qe,et,Mt,Jt){var pr=Dp(he,qe,et),Ar=cy(he,ke),$r=Ar*et,gn=R[0].x===0||R[0].x===Jt||R[0].y===0||R[0].y===Jt;I-$r<I/4&&(I=$r+I/4);var hn=qe*2,zn=gn?I/2*Mt%I:(Ar/2+hn)*et*Mt%I;return Ym(R,zn,I,pr,$,$r,gn,!1,Jt)}function Ym(R,I,$,he,ke,qe,et,Mt,Jt){for(var pr=qe/2,Ar=gv(R),$r=0,gn=I-$,hn=[],zn=0;zn<R.length-1;zn++){for(var _a=R[zn],ui=R[zn+1],Ua=_a.dist(ui),ji=ui.angleTo(_a);gn+$<$r+Ua;){gn+=$;var bi=(gn-$r)/Ua,Fi=bu(_a.x,ui.x,bi),Zi=bu(_a.y,ui.y,bi);if(Fi>=0&&Fi<Jt&&Zi>=0&&Zi<Jt&&gn-pr>=0&&gn+pr<=Ar){var yo=new Y_(Fi,Zi,ji,zn);yo._round(),(!he||t6(R,yo,qe,he,ke))&&hn.push(yo)}}$r+=Ua}return!Mt&&!hn.length&&!et&&(hn=Ym(R,$r/2,$,he,ke,qe,et,!0,Jt)),hn}function ZF(R,I,$,he,ke){for(var qe=[],et=0;et<R.length;et++)for(var Mt=R[et],Jt=void 0,pr=0;pr<Mt.length-1;pr++){var Ar=Mt[pr],$r=Mt[pr+1];Ar.x<I&&$r.x<I||(Ar.x<I?Ar=new s(I,Ar.y+($r.y-Ar.y)*((I-Ar.x)/($r.x-Ar.x)))._round():$r.x<I&&($r=new s(I,Ar.y+($r.y-Ar.y)*((I-Ar.x)/($r.x-Ar.x)))._round()),!(Ar.y<$&&$r.y<$)&&(Ar.y<$?Ar=new s(Ar.x+($r.x-Ar.x)*(($-Ar.y)/($r.y-Ar.y)),$)._round():$r.y<$&&($r=new s(Ar.x+($r.x-Ar.x)*(($-Ar.y)/($r.y-Ar.y)),$)._round()),!(Ar.x>=he&&$r.x>=he)&&(Ar.x>=he?Ar=new s(he,Ar.y+($r.y-Ar.y)*((he-Ar.x)/($r.x-Ar.x)))._round():$r.x>=he&&($r=new s(he,Ar.y+($r.y-Ar.y)*((he-Ar.x)/($r.x-Ar.x)))._round()),!(Ar.y>=ke&&$r.y>=ke)&&(Ar.y>=ke?Ar=new s(Ar.x+($r.x-Ar.x)*((ke-Ar.y)/($r.y-Ar.y)),ke)._round():$r.y>=ke&&($r=new s(Ar.x+($r.x-Ar.x)*((ke-Ar.y)/($r.y-Ar.y)),ke)._round()),(!Jt||!Ar.equals(Jt[Jt.length-1]))&&(Jt=[Ar],qe.push(Jt)),Jt.push($r)))))}return qe}var q3=Lf;function $F(R,I,$,he){var ke=[],qe=R.image,et=qe.pixelRatio,Mt=qe.paddedRect.w-2*q3,Jt=qe.paddedRect.h-2*q3,pr=R.right-R.left,Ar=R.bottom-R.top,$r=qe.stretchX||[[0,Mt]],gn=qe.stretchY||[[0,Jt]],hn=function(Qu,Xu){return Qu+Xu[1]-Xu[0]},zn=$r.reduce(hn,0),_a=gn.reduce(hn,0),ui=Mt-zn,Ua=Jt-_a,ji=0,bi=zn,Fi=0,Zi=_a,yo=0,Bo=ui,zo=0,ws=Ua;if(qe.content&&he){var Qo=qe.content;ji=r6($r,0,Qo[0]),Fi=r6(gn,0,Qo[1]),bi=r6($r,Qo[0],Qo[2]),Zi=r6(gn,Qo[1],Qo[3]),yo=Qo[0]-ji,zo=Qo[1]-Fi,Bo=Qo[2]-Qo[0]-bi,ws=Qo[3]-Qo[1]-Zi}var fs=function(Qu,Xu,xf,If){var Ph=n6(Qu.stretch-ji,bi,pr,R.left),Vh=a6(Qu.fixed-yo,Bo,Qu.stretch,zn),rv=n6(Xu.stretch-Fi,Zi,Ar,R.top),xd=a6(Xu.fixed-zo,ws,Xu.stretch,_a),Jv=n6(xf.stretch-ji,bi,pr,R.left),Qv=a6(xf.fixed-yo,Bo,xf.stretch,zn),nv=n6(If.stretch-Fi,Zi,Ar,R.top),op=a6(If.fixed-zo,ws,If.stretch,_a),sp=new s(Ph,rv),Dd=new s(Jv,rv),lp=new s(Jv,nv),gm=new s(Ph,nv),m1=new s(Vh/et,xd/et),J_=new s(Qv/et,op/et),Q_=I*Math.PI/180;if(Q_){var ex=Math.sin(Q_),$3=Math.cos(Q_),w0=[$3,-ex,ex,$3];sp._matMult(w0),Dd._matMult(w0),gm._matMult(w0),lp._matMult(w0)}var c6=Qu.stretch+Qu.fixed,z8=xf.stretch+xf.fixed,f6=Xu.stretch+Xu.fixed,N8=If.stretch+If.fixed,Zm={x:qe.paddedRect.x+q3+c6,y:qe.paddedRect.y+q3+f6,w:z8-c6,h:N8-f6},K3=Bo/et/pr,h6=ws/et/Ar;return{tl:sp,tr:Dd,bl:gm,br:lp,tex:Zm,writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:m1,pixelOffsetBR:J_,minFontScaleX:K3,minFontScaleY:h6,isSDF:$}};if(!he||!qe.stretchX&&!qe.stretchY)ke.push(fs({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:Mt+1},{fixed:0,stretch:Jt+1}));else for(var Sl=KF($r,ui,zn),Ts=KF(gn,Ua,_a),ks=0;ks<Sl.length-1;ks++)for(var tu=Sl[ks],pl=Sl[ks+1],Ku=0;Ku<Ts.length-1;Ku++){var Jc=Ts[Ku],Ju=Ts[Ku+1];ke.push(fs(tu,Jc,pl,Ju))}return ke}function r6(R,I,$){for(var he=0,ke=0,qe=R;ke<qe.length;ke+=1){var et=qe[ke];he+=Math.max(I,Math.min($,et[1]))-Math.max(I,Math.min($,et[0]))}return he}function KF(R,I,$){for(var he=[{fixed:-q3,stretch:0}],ke=0,qe=R;ke<qe.length;ke+=1){var et=qe[ke],Mt=et[0],Jt=et[1],pr=he[he.length-1];he.push({fixed:Mt-pr.stretch,stretch:pr.stretch}),he.push({fixed:Mt-pr.stretch,stretch:pr.stretch+(Jt-Mt)})}return he.push({fixed:I+q3,stretch:$}),he}function n6(R,I,$,he){return R/I*$+he}function a6(R,I,$,he){return R-I*$/he}function fae(R,I,$,he,ke,qe,et,Mt){for(var Jt=he.layout.get("text-rotate").evaluate(qe,{})*Math.PI/180,pr=[],Ar=0,$r=I.positionedLines;Ar<$r.length;Ar+=1)for(var gn=$r[Ar],hn=0,zn=gn.positionedGlyphs;hn<zn.length;hn+=1){var _a=zn[hn];if(_a.rect){var ui=_a.rect||{},Ua=1,ji=Qd+Ua,bi=!0,Fi=1,Zi=0,yo=(ke||Mt)&&_a.vertical,Bo=_a.metrics.advance*_a.scale/2;if(Mt&&I.verticalizable){var zo=(_a.scale-1)*Ir,ws=(Ir-_a.metrics.width*_a.scale)/2;Zi=gn.lineOffset/2-(_a.imageName?-ws:zo)}if(_a.imageName){var Qo=et[_a.imageName];bi=Qo.sdf,Fi=Qo.pixelRatio,ji=Lf/Fi}var fs=ke?[_a.x+Bo,_a.y]:[0,0],Sl=ke?[0,0]:[_a.x+Bo+$[0],_a.y+$[1]-Zi],Ts=[0,0];yo&&(Ts=Sl,Sl=[0,0]);var ks=(_a.metrics.left-ji)*_a.scale-Bo+Sl[0],tu=(-_a.metrics.top-ji)*_a.scale+Sl[1],pl=ks+ui.w*_a.scale/Fi,Ku=tu+ui.h*_a.scale/Fi,Jc=new s(ks,tu),Ju=new s(pl,tu),Qu=new s(ks,Ku),Xu=new s(pl,Ku);if(yo){var xf=new s(-Bo,Bo-Rf),If=-Math.PI/2,Ph=Ir/2-Bo,Vh=_a.imageName?Ph:0,rv=new s(5-Rf-Ph,-Vh),xd=new(Function.prototype.bind.apply(s,[null].concat(Ts)));Jc._rotateAround(If,xf)._add(rv)._add(xd),Ju._rotateAround(If,xf)._add(rv)._add(xd),Qu._rotateAround(If,xf)._add(rv)._add(xd),Xu._rotateAround(If,xf)._add(rv)._add(xd)}if(Jt){var Jv=Math.sin(Jt),Qv=Math.cos(Jt),nv=[Qv,-Jv,Jv,Qv];Jc._matMult(nv),Ju._matMult(nv),Qu._matMult(nv),Xu._matMult(nv)}var op=new s(0,0),sp=new s(0,0),Dd=0,lp=0;pr.push({tl:Jc,tr:Ju,bl:Qu,br:Xu,tex:ui,writingMode:I.writingMode,glyphOffset:fs,sectionIndex:_a.sectionIndex,isSDF:bi,pixelOffsetTL:op,pixelOffsetBR:sp,minFontScaleX:Dd,minFontScaleY:lp})}}return pr}var i6=function(I,$,he,ke,qe,et,Mt,Jt,pr,Ar){if(this.boxStartIndex=I.length,pr){var $r=et.top,gn=et.bottom,hn=et.collisionPadding;hn&&($r-=hn[1],gn+=hn[3]);var zn=gn-$r;zn>0&&(zn=Math.max(10,zn),this.circleDiameter=zn)}else{var _a=et.top*Mt-Jt,ui=et.bottom*Mt+Jt,Ua=et.left*Mt-Jt,ji=et.right*Mt+Jt,bi=et.collisionPadding;if(bi&&(Ua-=bi[0]*Mt,_a-=bi[1]*Mt,ji+=bi[2]*Mt,ui+=bi[3]*Mt),Ar){var Fi=new s(Ua,_a),Zi=new s(ji,_a),yo=new s(Ua,ui),Bo=new s(ji,ui),zo=Ar*Math.PI/180;Fi._rotate(zo),Zi._rotate(zo),yo._rotate(zo),Bo._rotate(zo),Ua=Math.min(Fi.x,Zi.x,yo.x,Bo.x),ji=Math.max(Fi.x,Zi.x,yo.x,Bo.x),_a=Math.min(Fi.y,Zi.y,yo.y,Bo.y),ui=Math.max(Fi.y,Zi.y,yo.y,Bo.y)}I.emplaceBack($.x,$.y,Ua,_a,ji,ui,he,ke,qe)}this.boxEndIndex=I.length},V3=function(I,$){if(I===void 0&&(I=[]),$===void 0&&($=hae),this.data=I,this.length=this.data.length,this.compare=$,this.length>0)for(var he=(this.length>>1)-1;he>=0;he--)this._down(he)};V3.prototype.push=function(I){this.data.push(I),this.length++,this._up(this.length-1)},V3.prototype.pop=function(){if(this.length!==0){var I=this.data[0],$=this.data.pop();return this.length--,this.length>0&&(this.data[0]=$,this._down(0)),I}},V3.prototype.peek=function(){return this.data[0]},V3.prototype._up=function(I){for(var $=this,he=$.data,ke=$.compare,qe=he[I];I>0;){var et=I-1>>1,Mt=he[et];if(ke(qe,Mt)>=0)break;he[I]=Mt,I=et}he[I]=qe},V3.prototype._down=function(I){for(var $=this,he=$.data,ke=$.compare,qe=this.length>>1,et=he[I];I<qe;){var Mt=(I<<1)+1,Jt=he[Mt],pr=Mt+1;if(pr<this.length&&ke(he[pr],Jt)<0&&(Mt=pr,Jt=he[pr]),ke(Jt,et)>=0)break;he[I]=Jt,I=Mt}he[I]=et};function hae(R,I){return R<I?-1:R>I?1:0}function dae(R,I,$){$===void 0&&($=!1);for(var he=1/0,ke=1/0,qe=-1/0,et=-1/0,Mt=R[0],Jt=0;Jt<Mt.length;Jt++){var pr=Mt[Jt];(!Jt||pr.x<he)&&(he=pr.x),(!Jt||pr.y<ke)&&(ke=pr.y),(!Jt||pr.x>qe)&&(qe=pr.x),(!Jt||pr.y>et)&&(et=pr.y)}var Ar=qe-he,$r=et-ke,gn=Math.min(Ar,$r),hn=gn/2,zn=new V3([],vae);if(gn===0)return new s(he,ke);for(var _a=he;_a<qe;_a+=gn)for(var ui=ke;ui<et;ui+=gn)zn.push(new H3(_a+hn,ui+hn,hn,R));for(var Ua=mae(R),ji=zn.length;zn.length;){var bi=zn.pop();(bi.d>Ua.d||!Ua.d)&&(Ua=bi,$&&console.log("found best %d after %d probes",Math.round(1e4*bi.d)/1e4,ji)),!(bi.max-Ua.d<=I)&&(hn=bi.h/2,zn.push(new H3(bi.p.x-hn,bi.p.y-hn,hn,R)),zn.push(new H3(bi.p.x+hn,bi.p.y-hn,hn,R)),zn.push(new H3(bi.p.x-hn,bi.p.y+hn,hn,R)),zn.push(new H3(bi.p.x+hn,bi.p.y+hn,hn,R)),ji+=4)}return $&&(console.log("num probes: "+ji),console.log("best distance: "+Ua.d)),Ua.p}function vae(R,I){return I.max-R.max}function H3(R,I,$,he){this.p=new s(R,I),this.h=$,this.d=pae(this.p,he),this.max=this.d+this.h*Math.SQRT2}function pae(R,I){for(var $=!1,he=1/0,ke=0;ke<I.length;ke++)for(var qe=I[ke],et=0,Mt=qe.length,Jt=Mt-1;et<Mt;Jt=et++){var pr=qe[et],Ar=qe[Jt];pr.y>R.y!=Ar.y>R.y&&R.x<(Ar.x-pr.x)*(R.y-pr.y)/(Ar.y-pr.y)+pr.x&&($=!$),he=Math.min(he,ng(R,pr,Ar))}return($?1:-1)*Math.sqrt(he)}function mae(R){for(var I=0,$=0,he=0,ke=R[0],qe=0,et=ke.length,Mt=et-1;qe<et;Mt=qe++){var Jt=ke[qe],pr=ke[Mt],Ar=Jt.x*pr.y-pr.x*Jt.y;$+=(Jt.x+pr.x)*Ar,he+=(Jt.y+pr.y)*Ar,I+=Ar*3}return new H3($/I,he/I,0,R)}var G3=7,k8=Number.POSITIVE_INFINITY;function JF(R,I){function $(ke,qe){var et=0,Mt=0;qe<0&&(qe=0);var Jt=qe/Math.sqrt(2);switch(ke){case"top-right":case"top-left":Mt=Jt-G3;break;case"bottom-right":case"bottom-left":Mt=-Jt+G3;break;case"bottom":Mt=-qe+G3;break;case"top":Mt=qe-G3;break}switch(ke){case"top-right":case"bottom-right":et=-Jt;break;case"top-left":case"bottom-left":et=Jt;break;case"left":et=qe;break;case"right":et=-qe;break}return[et,Mt]}function he(ke,qe,et){var Mt=0,Jt=0;switch(qe=Math.abs(qe),et=Math.abs(et),ke){case"top-right":case"top-left":case"top":Jt=et-G3;break;case"bottom-right":case"bottom-left":case"bottom":Jt=-et+G3;break}switch(ke){case"top-right":case"bottom-right":case"right":Mt=-qe;break;case"top-left":case"bottom-left":case"left":Mt=qe;break}return[Mt,Jt]}return I[1]!==k8?he(R,I[0],I[1]):$(R,I[0])}function gae(R,I,$,he,ke,qe,et){R.createArrays();var Mt=512*R.overscaling;R.tilePixelRatio=co/Mt,R.compareText={},R.iconsNeedLinear=!1;var Jt=R.layers[0].layout,pr=R.layers[0]._unevaluatedLayout._values,Ar={};if(R.textSizeData.kind==="composite"){var $r=R.textSizeData,gn=$r.minZoom,hn=$r.maxZoom;Ar.compositeTextSizes=[pr["text-size"].possiblyEvaluate(new jl(gn),et),pr["text-size"].possiblyEvaluate(new jl(hn),et)]}if(R.iconSizeData.kind==="composite"){var zn=R.iconSizeData,_a=zn.minZoom,ui=zn.maxZoom;Ar.compositeIconSizes=[pr["icon-size"].possiblyEvaluate(new jl(_a),et),pr["icon-size"].possiblyEvaluate(new jl(ui),et)]}Ar.layoutTextSize=pr["text-size"].possiblyEvaluate(new jl(R.zoom+1),et),Ar.layoutIconSize=pr["icon-size"].possiblyEvaluate(new jl(R.zoom+1),et),Ar.textMaxSize=pr["text-size"].possiblyEvaluate(new jl(18));for(var Ua=Jt.get("text-line-height")*Ir,ji=Jt.get("text-rotation-alignment")==="map"&&Jt.get("symbol-placement")!=="point",bi=Jt.get("text-keep-upright"),Fi=Jt.get("text-size"),Zi=function(){var zo=Bo[yo],ws=Jt.get("text-font").evaluate(zo,{},et).join(","),Qo=Fi.evaluate(zo,{},et),fs=Ar.layoutTextSize.evaluate(zo,{},et),Sl=Ar.layoutIconSize.evaluate(zo,{},et),Ts={horizontal:{},vertical:void 0},ks=zo.text,tu=[0,0];if(ks){var pl=ks.toString(),Ku=Jt.get("text-letter-spacing").evaluate(zo,{},et)*Ir,Jc=Qn(pl)?Ku:0,Ju=Jt.get("text-anchor").evaluate(zo,{},et),Qu=Jt.get("text-variable-anchor");if(!Qu){var Xu=Jt.get("text-radial-offset").evaluate(zo,{},et);Xu?tu=JF(Ju,[Xu*Ir,k8]):tu=Jt.get("text-offset").evaluate(zo,{},et).map(function(m1){return m1*Ir})}var xf=ji?"center":Jt.get("text-justify").evaluate(zo,{},et),If=Jt.get("symbol-placement"),Ph=If==="point"?Jt.get("text-max-width").evaluate(zo,{},et)*Ir:0,Vh=function(){R.allowVerticalPlacement&&Ja(pl)&&(Ts.vertical=mm(ks,I,$,ke,ws,Ph,Ua,Ju,"left",Jc,tu,nh.vertical,!0,If,fs,Qo))};if(!ji&&Qu){for(var rv=xf==="auto"?Qu.map(function(m1){return P8(m1)}):[xf],xd=!1,Jv=0;Jv<rv.length;Jv++){var Qv=rv[Jv];if(!Ts.horizontal[Qv])if(xd)Ts.horizontal[Qv]=Ts.horizontal[0];else{var nv=mm(ks,I,$,ke,ws,Ph,Ua,"center",Qv,Jc,tu,nh.horizontal,!1,If,fs,Qo);nv&&(Ts.horizontal[Qv]=nv,xd=nv.positionedLines.length===1)}}Vh()}else{xf==="auto"&&(xf=P8(Ju));var op=mm(ks,I,$,ke,ws,Ph,Ua,Ju,xf,Jc,tu,nh.horizontal,!1,If,fs,Qo);op&&(Ts.horizontal[xf]=op),Vh(),Ja(pl)&&ji&&bi&&(Ts.vertical=mm(ks,I,$,ke,ws,Ph,Ua,Ju,xf,Jc,tu,nh.vertical,!1,If,fs,Qo))}}var sp=void 0,Dd=!1;if(zo.icon&&zo.icon.name){var lp=he[zo.icon.name];lp&&(sp=M8(ke[zo.icon.name],Jt.get("icon-offset").evaluate(zo,{},et),Jt.get("icon-anchor").evaluate(zo,{},et)),Dd=lp.sdf,R.sdfIcons===void 0?R.sdfIcons=lp.sdf:R.sdfIcons!==lp.sdf&&G("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(lp.pixelRatio!==R.pixelRatio||Jt.get("icon-rotate").constantOr(1)!==0)&&(R.iconsNeedLinear=!0))}var gm=eB(Ts.horizontal)||Ts.vertical;R.iconsInText=gm?gm.iconsInText:!1,(gm||sp)&&yae(R,zo,Ts,sp,he,Ar,fs,Sl,tu,Dd,et)},yo=0,Bo=R.features;yo<Bo.length;yo+=1)Zi();qe&&R.generateCollisionDebugBuffers()}function P8(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 yae(R,I,$,he,ke,qe,et,Mt,Jt,pr,Ar){var $r=qe.textMaxSize.evaluate(I,{});$r===void 0&&($r=et);var gn=R.layers[0].layout,hn=gn.get("icon-offset").evaluate(I,{},Ar),zn=eB($.horizontal),_a=24,ui=et/_a,Ua=R.tilePixelRatio*ui,ji=R.tilePixelRatio*$r/_a,bi=R.tilePixelRatio*Mt,Fi=R.tilePixelRatio*gn.get("symbol-spacing"),Zi=gn.get("text-padding")*R.tilePixelRatio,yo=gn.get("icon-padding")*R.tilePixelRatio,Bo=gn.get("text-max-angle")/180*Math.PI,zo=gn.get("text-rotation-alignment")==="map"&&gn.get("symbol-placement")!=="point",ws=gn.get("icon-rotation-alignment")==="map"&&gn.get("symbol-placement")!=="point",Qo=gn.get("symbol-placement"),fs=Fi/2,Sl=gn.get("icon-text-fit"),Ts;he&&Sl!=="none"&&(R.allowVerticalPlacement&&$.vertical&&(Ts=Qk(he,$.vertical,Sl,gn.get("icon-text-fit-padding"),hn,ui)),zn&&(he=Qk(he,zn,Sl,gn.get("icon-text-fit-padding"),hn,ui)));var ks=function($3,w0){w0.x<0||w0.x>=co||w0.y<0||w0.y>=co||_ae(R,w0,$3,$,he,ke,Ts,R.layers[0],R.collisionBoxArray,I.index,I.sourceLayerIndex,R.index,Ua,Zi,zo,Jt,bi,yo,ws,hn,I,qe,pr,Ar,et)};if(Qo==="line")for(var tu=0,pl=ZF(I.geometry,0,0,co,co);tu<pl.length;tu+=1)for(var Ku=pl[tu],Jc=d1(Ku,Fi,Bo,$.vertical||zn,he,_a,ji,R.overscaling,co),Ju=0,Qu=Jc;Ju<Qu.length;Ju+=1){var Xu=Qu[Ju],xf=zn;(!xf||!xae(R,xf.text,fs,Xu))&&ks(Ku,Xu)}else if(Qo==="line-center")for(var If=0,Ph=I.geometry;If<Ph.length;If+=1){var Vh=Ph[If];if(Vh.length>1){var rv=Wm(Vh,Bo,$.vertical||zn,he,_a,ji);rv&&ks(Vh,rv)}}else if(I.type==="Polygon")for(var xd=0,Jv=x0(I.geometry,0);xd<Jv.length;xd+=1){var Qv=Jv[xd],nv=dae(Qv,16);ks(Qv[0],new Y_(nv.x,nv.y,0))}else if(I.type==="LineString")for(var op=0,sp=I.geometry;op<sp.length;op+=1){var Dd=sp[op];ks(Dd,new Y_(Dd[0].x,Dd[0].y,0))}else if(I.type==="Point")for(var lp=0,gm=I.geometry;lp<gm.length;lp+=1)for(var m1=gm[lp],J_=0,Q_=m1;J_<Q_.length;J_+=1){var ex=Q_[J_];ks([ex],new Y_(ex.x,ex.y,0))}}var C5=255,$_=C5*gd;function QF(R,I,$,he,ke,qe,et,Mt,Jt,pr,Ar,$r,gn,hn,zn){var _a=fae(I,$,Mt,ke,qe,et,he,R.allowVerticalPlacement),ui=R.textSizeData,Ua=null;ui.kind==="source"?(Ua=[gd*ke.layout.get("text-size").evaluate(et,{})],Ua[0]>$_&&G(R.layerIds[0]+': Value for "text-size" is >= '+C5+'. Reduce your "text-size".')):ui.kind==="composite"&&(Ua=[gd*hn.compositeTextSizes[0].evaluate(et,{},zn),gd*hn.compositeTextSizes[1].evaluate(et,{},zn)],(Ua[0]>$_||Ua[1]>$_)&&G(R.layerIds[0]+': Value for "text-size" is >= '+C5+'. Reduce your "text-size".')),R.addSymbols(R.text,_a,Ua,Mt,qe,et,pr,I,Jt.lineStartIndex,Jt.lineLength,gn,zn);for(var ji=0,bi=Ar;ji<bi.length;ji+=1){var Fi=bi[ji];$r[Fi]=R.text.placedSymbolArray.length-1}return _a.length*4}function eB(R){for(var I in R)return R[I];return null}function _ae(R,I,$,he,ke,qe,et,Mt,Jt,pr,Ar,$r,gn,hn,zn,_a,ui,Ua,ji,bi,Fi,Zi,yo,Bo,zo){var ws,Qo=R.addToLineVertexArray(I,$),fs,Sl,Ts,ks,tu=0,pl=0,Ku=0,Jc=0,Ju=-1,Qu=-1,Xu={},xf=Se(""),If=0,Ph=0;if(Mt._unevaluatedLayout.getValue("text-radial-offset")===void 0?(ws=Mt.layout.get("text-offset").evaluate(Fi,{},Bo).map(function(L5){return L5*Ir}),If=ws[0],Ph=ws[1]):(If=Mt.layout.get("text-radial-offset").evaluate(Fi,{},Bo)*Ir,Ph=k8),R.allowVerticalPlacement&&he.vertical){var Vh=Mt.layout.get("text-rotate").evaluate(Fi,{},Bo),rv=Vh+90,xd=he.vertical;Ts=new i6(Jt,I,pr,Ar,$r,xd,gn,hn,zn,rv),et&&(ks=new i6(Jt,I,pr,Ar,$r,et,ui,Ua,zn,rv))}if(ke){var Jv=Mt.layout.get("icon-rotate").evaluate(Fi,{}),Qv=Mt.layout.get("icon-text-fit")!=="none",nv=$F(ke,Jv,yo,Qv),op=et?$F(et,Jv,yo,Qv):void 0;Sl=new i6(Jt,I,pr,Ar,$r,ke,ui,Ua,!1,Jv),tu=nv.length*4;var sp=R.iconSizeData,Dd=null;sp.kind==="source"?(Dd=[gd*Mt.layout.get("icon-size").evaluate(Fi,{})],Dd[0]>$_&&G(R.layerIds[0]+': Value for "icon-size" is >= '+C5+'. Reduce your "icon-size".')):sp.kind==="composite"&&(Dd=[gd*Zi.compositeIconSizes[0].evaluate(Fi,{},Bo),gd*Zi.compositeIconSizes[1].evaluate(Fi,{},Bo)],(Dd[0]>$_||Dd[1]>$_)&&G(R.layerIds[0]+': Value for "icon-size" is >= '+C5+'. Reduce your "icon-size".')),R.addSymbols(R.icon,nv,Dd,bi,ji,Fi,!1,I,Qo.lineStartIndex,Qo.lineLength,-1,Bo),Ju=R.icon.placedSymbolArray.length-1,op&&(pl=op.length*4,R.addSymbols(R.icon,op,Dd,bi,ji,Fi,nh.vertical,I,Qo.lineStartIndex,Qo.lineLength,-1,Bo),Qu=R.icon.placedSymbolArray.length-1)}for(var lp in he.horizontal){var gm=he.horizontal[lp];if(!fs){xf=Se(gm.text);var m1=Mt.layout.get("text-rotate").evaluate(Fi,{},Bo);fs=new i6(Jt,I,pr,Ar,$r,gm,gn,hn,zn,m1)}var J_=gm.positionedLines.length===1;if(Ku+=QF(R,I,gm,qe,Mt,zn,Fi,_a,Qo,he.vertical?nh.horizontal:nh.horizontalOnly,J_?Object.keys(he.horizontal):[lp],Xu,Ju,Zi,Bo),J_)break}he.vertical&&(Jc+=QF(R,I,he.vertical,qe,Mt,zn,Fi,_a,Qo,nh.vertical,["vertical"],Xu,Qu,Zi,Bo));var Q_=fs?fs.boxStartIndex:R.collisionBoxArray.length,ex=fs?fs.boxEndIndex:R.collisionBoxArray.length,$3=Ts?Ts.boxStartIndex:R.collisionBoxArray.length,w0=Ts?Ts.boxEndIndex:R.collisionBoxArray.length,c6=Sl?Sl.boxStartIndex:R.collisionBoxArray.length,z8=Sl?Sl.boxEndIndex:R.collisionBoxArray.length,f6=ks?ks.boxStartIndex:R.collisionBoxArray.length,N8=ks?ks.boxEndIndex:R.collisionBoxArray.length,Zm=-1,K3=function(L5,mB){return L5&&L5.circleDiameter?Math.max(L5.circleDiameter,mB):mB};Zm=K3(fs,Zm),Zm=K3(Ts,Zm),Zm=K3(Sl,Zm),Zm=K3(ks,Zm);var h6=Zm>-1?1:0;h6&&(Zm*=zo/Ir),R.glyphOffsetArray.length>=Kc.MAX_GLYPHS&&G("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),Fi.sortKey!==void 0&&R.addToSortKeyRanges(R.symbolInstances.length,Fi.sortKey),R.symbolInstances.emplaceBack(I.x,I.y,Xu.right>=0?Xu.right:-1,Xu.center>=0?Xu.center:-1,Xu.left>=0?Xu.left:-1,Xu.vertical||-1,Ju,Qu,xf,Q_,ex,$3,w0,c6,z8,f6,N8,pr,Ku,Jc,tu,pl,h6,0,gn,If,Ph,Zm)}function xae(R,I,$,he){var ke=R.compareText;if(!(I in ke))ke[I]=[];else for(var qe=ke[I],et=qe.length-1;et>=0;et--)if(he.dist(qe[et])<$)return!0;return ke[I].push(he),!1}var bae=h1.VectorTileFeature.types,wae=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function o6(R,I,$,he,ke,qe,et,Mt,Jt,pr,Ar,$r,gn){var hn=Mt?Math.min($_,Math.round(Mt[0])):0,zn=Mt?Math.min($_,Math.round(Mt[1])):0;R.emplaceBack(I,$,Math.round(he*32),Math.round(ke*32),qe,et,(hn<<1)+(Jt?1:0),zn,pr*16,Ar*16,$r*256,gn*256)}function L8(R,I,$){R.emplaceBack(I.x,I.y,$),R.emplaceBack(I.x,I.y,$),R.emplaceBack(I.x,I.y,$),R.emplaceBack(I.x,I.y,$)}function Tae(R){for(var I=0,$=R.sections;I<$.length;I+=1){var he=$[I];if(fo(he.text))return!0}return!1}var X3=function(I){this.layoutVertexArray=new _i,this.indexArray=new Uo,this.programConfigurations=I,this.segments=new Rs,this.dynamicLayoutVertexArray=new ai,this.opacityVertexArray=new no,this.placedSymbolArray=new wu};X3.prototype.isEmpty=function(){return this.layoutVertexArray.length===0&&this.indexArray.length===0&&this.dynamicLayoutVertexArray.length===0&&this.opacityVertexArray.length===0},X3.prototype.upload=function(I,$,he,ke){this.isEmpty()||(he&&(this.layoutVertexBuffer=I.createVertexBuffer(this.layoutVertexArray,F.members),this.indexBuffer=I.createIndexBuffer(this.indexArray,$),this.dynamicLayoutVertexBuffer=I.createVertexBuffer(this.dynamicLayoutVertexArray,ae.members,!0),this.opacityVertexBuffer=I.createVertexBuffer(this.opacityVertexArray,wae,!0),this.opacityVertexBuffer.itemSize=1),(he||ke)&&this.programConfigurations.upload(I))},X3.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())},dr("SymbolBuffers",X3);var k5=function(I,$,he){this.layoutVertexArray=new I,this.layoutAttributes=$,this.indexArray=new he,this.segments=new Rs,this.collisionVertexArray=new pi};k5.prototype.upload=function(I){this.layoutVertexBuffer=I.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=I.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=I.createVertexBuffer(this.collisionVertexArray,we.members,!0)},k5.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())},dr("CollisionBuffers",k5);var Kc=function(I){this.collisionBoxArray=I.collisionBoxArray,this.zoom=I.zoom,this.overscaling=I.overscaling,this.layers=I.layers,this.layerIds=this.layers.map(function(Jt){return Jt.id}),this.index=I.index,this.pixelRatio=I.pixelRatio,this.sourceLayerIndex=I.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=s1([]),this.placementViewportMatrix=s1([]);var $=this.layers[0],he=$._unevaluatedLayout._values;this.textSizeData=Z_(this.zoom,he["text-size"]),this.iconSizeData=Z_(this.zoom,he["icon-size"]);var ke=this.layers[0].layout,qe=ke.get("symbol-sort-key"),et=ke.get("symbol-z-order");this.canOverlap=ke.get("text-allow-overlap")||ke.get("icon-allow-overlap")||ke.get("text-ignore-placement")||ke.get("icon-ignore-placement"),this.sortFeaturesByKey=et!=="viewport-y"&&qe.constantOr(1)!==void 0;var Mt=et==="viewport-y"||et==="auto"&&!this.sortFeaturesByKey;this.sortFeaturesByY=Mt&&this.canOverlap,ke.get("symbol-placement")==="point"&&(this.writingModes=ke.get("text-writing-mode").map(function(Jt){return nh[Jt]})),this.stateDependentLayerIds=this.layers.filter(function(Jt){return Jt.isStateDependent()}).map(function(Jt){return Jt.id}),this.sourceID=I.sourceID};Kc.prototype.createArrays=function(){this.text=new X3(new Ra(this.layers,this.zoom,function(I){return/^text/.test(I)})),this.icon=new X3(new Ra(this.layers,this.zoom,function(I){return/^icon/.test(I)})),this.glyphOffsetArray=new Js,this.lineVertexArray=new Zl,this.symbolInstances=new cc},Kc.prototype.calculateGlyphDependencies=function(I,$,he,ke,qe){for(var et=0;et<I.length;et++)if($[I.charCodeAt(et)]=!0,(he||ke)&&qe){var Mt=ir[I.charAt(et)];Mt&&($[Mt.charCodeAt(0)]=!0)}},Kc.prototype.populate=function(I,$,he){var ke=this.layers[0],qe=ke.layout,et=qe.get("text-font"),Mt=qe.get("text-field"),Jt=qe.get("icon-image"),pr=(Mt.value.kind!=="constant"||Mt.value.value instanceof pc&&!Mt.value.value.isEmpty()||Mt.value.value.toString().length>0)&&(et.value.kind!=="constant"||et.value.value.length>0),Ar=Jt.value.kind!=="constant"||!!Jt.value.value||Object.keys(Jt.parameters).length>0,$r=qe.get("symbol-sort-key");if(this.features=[],!(!pr&&!Ar)){for(var gn=$.iconDependencies,hn=$.glyphDependencies,zn=$.availableImages,_a=new jl(this.zoom),ui=0,Ua=I;ui<Ua.length;ui+=1){var ji=Ua[ui],bi=ji.feature,Fi=ji.id,Zi=ji.index,yo=ji.sourceLayerIndex,Bo=ke._featureFilter.needGeometry,zo=Rl(bi,Bo);if(ke._featureFilter.filter(_a,zo,he)){Bo||(zo.geometry=Tl(bi));var ws=void 0;if(pr){var Qo=ke.getValueAndResolveTokens("text-field",zo,he,zn),fs=pc.factory(Qo);Tae(fs)&&(this.hasRTLText=!0),(!this.hasRTLText||ko()==="unavailable"||this.hasRTLText&&Yl.isParsed())&&(ws=Et(fs,ke,zo))}var Sl=void 0;if(Ar){var Ts=ke.getValueAndResolveTokens("icon-image",zo,he,zn);Ts instanceof ic?Sl=Ts:Sl=ic.fromString(Ts)}if(!(!ws&&!Sl)){var ks=this.sortFeaturesByKey?$r.evaluate(zo,{},he):void 0,tu={id:Fi,text:ws,icon:Sl,index:Zi,sourceLayerIndex:yo,geometry:zo.geometry,properties:bi.properties,type:bae[bi.type],sortKey:ks};if(this.features.push(tu),Sl&&(gn[Sl.name]=!0),ws){var pl=et.evaluate(zo,{},he).join(","),Ku=qe.get("text-rotation-alignment")==="map"&&qe.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(nh.vertical)>=0;for(var Jc=0,Ju=ws.sections;Jc<Ju.length;Jc+=1){var Qu=Ju[Jc];if(Qu.image)gn[Qu.image.name]=!0;else{var Xu=Ja(ws.toString()),xf=Qu.fontStack||pl,If=hn[xf]=hn[xf]||{};this.calculateGlyphDependencies(Qu.text,If,Ku,this.allowVerticalPlacement,Xu)}}}}}}qe.get("symbol-placement")==="line"&&(this.features=Ut(this.features)),this.sortFeaturesByKey&&this.features.sort(function(Ph,Vh){return Ph.sortKey-Vh.sortKey})}},Kc.prototype.update=function(I,$,he){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(I,$,this.layers,he),this.icon.programConfigurations.updatePaintArrays(I,$,this.layers,he))},Kc.prototype.isEmpty=function(){return this.symbolInstances.length===0&&!this.hasRTLText},Kc.prototype.uploadPending=function(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload},Kc.prototype.upload=function(I){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(I),this.iconCollisionBox.upload(I)),this.text.upload(I,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(I,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0},Kc.prototype.destroyDebugData=function(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()},Kc.prototype.destroy=function(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()},Kc.prototype.addToLineVertexArray=function(I,$){var he=this.lineVertexArray.length;if(I.segment!==void 0){for(var ke=I.dist($[I.segment+1]),qe=I.dist($[I.segment]),et={},Mt=I.segment+1;Mt<$.length;Mt++)et[Mt]={x:$[Mt].x,y:$[Mt].y,tileUnitDistanceFromAnchor:ke},Mt<$.length-1&&(ke+=$[Mt+1].dist($[Mt]));for(var Jt=I.segment||0;Jt>=0;Jt--)et[Jt]={x:$[Jt].x,y:$[Jt].y,tileUnitDistanceFromAnchor:qe},Jt>0&&(qe+=$[Jt-1].dist($[Jt]));for(var pr=0;pr<$.length;pr++){var Ar=et[pr];this.lineVertexArray.emplaceBack(Ar.x,Ar.y,Ar.tileUnitDistanceFromAnchor)}}return{lineStartIndex:he,lineLength:this.lineVertexArray.length-he}},Kc.prototype.addSymbols=function(I,$,he,ke,qe,et,Mt,Jt,pr,Ar,$r,gn){for(var hn=I.indexArray,zn=I.layoutVertexArray,_a=I.segments.prepareSegment(4*$.length,zn,hn,this.canOverlap?et.sortKey:void 0),ui=this.glyphOffsetArray.length,Ua=_a.vertexLength,ji=this.allowVerticalPlacement&&Mt===nh.vertical?Math.PI/2:0,bi=et.text&&et.text.sections,Fi=0;Fi<$.length;Fi++){var Zi=$[Fi],yo=Zi.tl,Bo=Zi.tr,zo=Zi.bl,ws=Zi.br,Qo=Zi.tex,fs=Zi.pixelOffsetTL,Sl=Zi.pixelOffsetBR,Ts=Zi.minFontScaleX,ks=Zi.minFontScaleY,tu=Zi.glyphOffset,pl=Zi.isSDF,Ku=Zi.sectionIndex,Jc=_a.vertexLength,Ju=tu[1];o6(zn,Jt.x,Jt.y,yo.x,Ju+yo.y,Qo.x,Qo.y,he,pl,fs.x,fs.y,Ts,ks),o6(zn,Jt.x,Jt.y,Bo.x,Ju+Bo.y,Qo.x+Qo.w,Qo.y,he,pl,Sl.x,fs.y,Ts,ks),o6(zn,Jt.x,Jt.y,zo.x,Ju+zo.y,Qo.x,Qo.y+Qo.h,he,pl,fs.x,Sl.y,Ts,ks),o6(zn,Jt.x,Jt.y,ws.x,Ju+ws.y,Qo.x+Qo.w,Qo.y+Qo.h,he,pl,Sl.x,Sl.y,Ts,ks),L8(I.dynamicLayoutVertexArray,Jt,ji),hn.emplaceBack(Jc,Jc+1,Jc+2),hn.emplaceBack(Jc+1,Jc+2,Jc+3),_a.vertexLength+=4,_a.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(tu[0]),(Fi===$.length-1||Ku!==$[Fi+1].sectionIndex)&&I.programConfigurations.populatePaintArrays(zn.length,et,et.index,{},gn,bi&&bi[Ku])}I.placedSymbolArray.emplaceBack(Jt.x,Jt.y,ui,this.glyphOffsetArray.length-ui,Ua,pr,Ar,Jt.segment,he?he[0]:0,he?he[1]:0,ke[0],ke[1],Mt,0,!1,0,$r)},Kc.prototype._addCollisionDebugVertex=function(I,$,he,ke,qe,et){return $.emplaceBack(0,0),I.emplaceBack(he.x,he.y,ke,qe,Math.round(et.x),Math.round(et.y))},Kc.prototype.addCollisionDebugVertices=function(I,$,he,ke,qe,et,Mt){var Jt=qe.segments.prepareSegment(4,qe.layoutVertexArray,qe.indexArray),pr=Jt.vertexLength,Ar=qe.layoutVertexArray,$r=qe.collisionVertexArray,gn=Mt.anchorX,hn=Mt.anchorY;this._addCollisionDebugVertex(Ar,$r,et,gn,hn,new s(I,$)),this._addCollisionDebugVertex(Ar,$r,et,gn,hn,new s(he,$)),this._addCollisionDebugVertex(Ar,$r,et,gn,hn,new s(he,ke)),this._addCollisionDebugVertex(Ar,$r,et,gn,hn,new s(I,ke)),Jt.vertexLength+=4;var zn=qe.indexArray;zn.emplaceBack(pr,pr+1),zn.emplaceBack(pr+1,pr+2),zn.emplaceBack(pr+2,pr+3),zn.emplaceBack(pr+3,pr),Jt.primitiveLength+=4},Kc.prototype.addDebugCollisionBoxes=function(I,$,he,ke){for(var qe=I;qe<$;qe++){var et=this.collisionBoxArray.get(qe),Mt=et.x1,Jt=et.y1,pr=et.x2,Ar=et.y2;this.addCollisionDebugVertices(Mt,Jt,pr,Ar,ke?this.textCollisionBox:this.iconCollisionBox,et.anchorPoint,he)}},Kc.prototype.generateCollisionDebugBuffers=function(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new k5(Vi,je.members,cl),this.iconCollisionBox=new k5(Vi,je.members,cl);for(var I=0;I<this.symbolInstances.length;I++){var $=this.symbolInstances.get(I);this.addDebugCollisionBoxes($.textBoxStartIndex,$.textBoxEndIndex,$,!0),this.addDebugCollisionBoxes($.verticalTextBoxStartIndex,$.verticalTextBoxEndIndex,$,!0),this.addDebugCollisionBoxes($.iconBoxStartIndex,$.iconBoxEndIndex,$,!1),this.addDebugCollisionBoxes($.verticalIconBoxStartIndex,$.verticalIconBoxEndIndex,$,!1)}},Kc.prototype._deserializeCollisionBoxesForSymbol=function(I,$,he,ke,qe,et,Mt,Jt,pr){for(var Ar={},$r=$;$r<he;$r++){var gn=I.get($r);Ar.textBox={x1:gn.x1,y1:gn.y1,x2:gn.x2,y2:gn.y2,anchorPointX:gn.anchorPointX,anchorPointY:gn.anchorPointY},Ar.textFeatureIndex=gn.featureIndex;break}for(var hn=ke;hn<qe;hn++){var zn=I.get(hn);Ar.verticalTextBox={x1:zn.x1,y1:zn.y1,x2:zn.x2,y2:zn.y2,anchorPointX:zn.anchorPointX,anchorPointY:zn.anchorPointY},Ar.verticalTextFeatureIndex=zn.featureIndex;break}for(var _a=et;_a<Mt;_a++){var ui=I.get(_a);Ar.iconBox={x1:ui.x1,y1:ui.y1,x2:ui.x2,y2:ui.y2,anchorPointX:ui.anchorPointX,anchorPointY:ui.anchorPointY},Ar.iconFeatureIndex=ui.featureIndex;break}for(var Ua=Jt;Ua<pr;Ua++){var ji=I.get(Ua);Ar.verticalIconBox={x1:ji.x1,y1:ji.y1,x2:ji.x2,y2:ji.y2,anchorPointX:ji.anchorPointX,anchorPointY:ji.anchorPointY},Ar.verticalIconFeatureIndex=ji.featureIndex;break}return Ar},Kc.prototype.deserializeCollisionBoxes=function(I){this.collisionArrays=[];for(var $=0;$<this.symbolInstances.length;$++){var he=this.symbolInstances.get($);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(I,he.textBoxStartIndex,he.textBoxEndIndex,he.verticalTextBoxStartIndex,he.verticalTextBoxEndIndex,he.iconBoxStartIndex,he.iconBoxEndIndex,he.verticalIconBoxStartIndex,he.verticalIconBoxEndIndex))}},Kc.prototype.hasTextData=function(){return this.text.segments.get().length>0},Kc.prototype.hasIconData=function(){return this.icon.segments.get().length>0},Kc.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},Kc.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},Kc.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},Kc.prototype.addIndicesForPlacedSymbol=function(I,$){for(var he=I.placedSymbolArray.get($),ke=he.vertexStartIndex+he.numGlyphs*4,qe=he.vertexStartIndex;qe<ke;qe+=4)I.indexArray.emplaceBack(qe,qe+1,qe+2),I.indexArray.emplaceBack(qe+1,qe+2,qe+3)},Kc.prototype.getSortedSymbolIndexes=function(I){if(this.sortedAngle===I&&this.symbolInstanceIndexes!==void 0)return this.symbolInstanceIndexes;for(var $=Math.sin(I),he=Math.cos(I),ke=[],qe=[],et=[],Mt=0;Mt<this.symbolInstances.length;++Mt){et.push(Mt);var Jt=this.symbolInstances.get(Mt);ke.push(Math.round($*Jt.anchorX+he*Jt.anchorY)|0),qe.push(Jt.featureIndex)}return et.sort(function(pr,Ar){return ke[pr]-ke[Ar]||qe[Ar]-qe[pr]}),et},Kc.prototype.addToSortKeyRanges=function(I,$){var he=this.sortKeyRanges[this.sortKeyRanges.length-1];he&&he.sortKey===$?he.symbolInstanceEnd=I+1:this.sortKeyRanges.push({sortKey:$,symbolInstanceStart:I,symbolInstanceEnd:I+1})},Kc.prototype.sortFeatures=function(I){var $=this;if(this.sortFeaturesByY&&this.sortedAngle!==I&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(I),this.sortedAngle=I,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var he=0,ke=this.symbolInstanceIndexes;he<ke.length;he+=1){var qe=ke[he],et=this.symbolInstances.get(qe);this.featureSortOrder.push(et.featureIndex),[et.rightJustifiedTextSymbolIndex,et.centerJustifiedTextSymbolIndex,et.leftJustifiedTextSymbolIndex].forEach(function(Mt,Jt,pr){Mt>=0&&pr.indexOf(Mt)===Jt&&$.addIndicesForPlacedSymbol($.text,Mt)}),et.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,et.verticalPlacedTextSymbolIndex),et.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,et.placedIconSymbolIndex),et.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,et.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},dr("SymbolBucket",Kc,{omit:["layers","collisionBoxArray","features","compareText"]}),Kc.MAX_GLYPHS=65535,Kc.addDynamicAttributes=L8;function Aae(R,I){return I.replace(/{([^{}]+)}/g,function($,he){return he in R?String(R[he]):""})}var Sae=new gi({"symbol-placement":new Rn(Ni.layout_symbol["symbol-placement"]),"symbol-spacing":new Rn(Ni.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Rn(Ni.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Pn(Ni.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Rn(Ni.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Rn(Ni.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new Rn(Ni.layout_symbol["icon-ignore-placement"]),"icon-optional":new Rn(Ni.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Rn(Ni.layout_symbol["icon-rotation-alignment"]),"icon-size":new Pn(Ni.layout_symbol["icon-size"]),"icon-text-fit":new Rn(Ni.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Rn(Ni.layout_symbol["icon-text-fit-padding"]),"icon-image":new Pn(Ni.layout_symbol["icon-image"]),"icon-rotate":new Pn(Ni.layout_symbol["icon-rotate"]),"icon-padding":new Rn(Ni.layout_symbol["icon-padding"]),"icon-keep-upright":new Rn(Ni.layout_symbol["icon-keep-upright"]),"icon-offset":new Pn(Ni.layout_symbol["icon-offset"]),"icon-anchor":new Pn(Ni.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Rn(Ni.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Rn(Ni.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Rn(Ni.layout_symbol["text-rotation-alignment"]),"text-field":new Pn(Ni.layout_symbol["text-field"]),"text-font":new Pn(Ni.layout_symbol["text-font"]),"text-size":new Pn(Ni.layout_symbol["text-size"]),"text-max-width":new Pn(Ni.layout_symbol["text-max-width"]),"text-line-height":new Rn(Ni.layout_symbol["text-line-height"]),"text-letter-spacing":new Pn(Ni.layout_symbol["text-letter-spacing"]),"text-justify":new Pn(Ni.layout_symbol["text-justify"]),"text-radial-offset":new Pn(Ni.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Rn(Ni.layout_symbol["text-variable-anchor"]),"text-anchor":new Pn(Ni.layout_symbol["text-anchor"]),"text-max-angle":new Rn(Ni.layout_symbol["text-max-angle"]),"text-writing-mode":new Rn(Ni.layout_symbol["text-writing-mode"]),"text-rotate":new Pn(Ni.layout_symbol["text-rotate"]),"text-padding":new Rn(Ni.layout_symbol["text-padding"]),"text-keep-upright":new Rn(Ni.layout_symbol["text-keep-upright"]),"text-transform":new Pn(Ni.layout_symbol["text-transform"]),"text-offset":new Pn(Ni.layout_symbol["text-offset"]),"text-allow-overlap":new Rn(Ni.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new Rn(Ni.layout_symbol["text-ignore-placement"]),"text-optional":new Rn(Ni.layout_symbol["text-optional"])}),Eae=new gi({"icon-opacity":new Pn(Ni.paint_symbol["icon-opacity"]),"icon-color":new Pn(Ni.paint_symbol["icon-color"]),"icon-halo-color":new Pn(Ni.paint_symbol["icon-halo-color"]),"icon-halo-width":new Pn(Ni.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Pn(Ni.paint_symbol["icon-halo-blur"]),"icon-translate":new Rn(Ni.paint_symbol["icon-translate"]),"icon-translate-anchor":new Rn(Ni.paint_symbol["icon-translate-anchor"]),"text-opacity":new Pn(Ni.paint_symbol["text-opacity"]),"text-color":new Pn(Ni.paint_symbol["text-color"],{runtimeType:ru,getOverride:function(R){return R.textColor},hasOverride:function(R){return!!R.textColor}}),"text-halo-color":new Pn(Ni.paint_symbol["text-halo-color"]),"text-halo-width":new Pn(Ni.paint_symbol["text-halo-width"]),"text-halo-blur":new Pn(Ni.paint_symbol["text-halo-blur"]),"text-translate":new Rn(Ni.paint_symbol["text-translate"]),"text-translate-anchor":new Rn(Ni.paint_symbol["text-translate-anchor"])}),R8={paint:Eae,layout:Sae},W3=function(I){this.type=I.property.overrides?I.property.overrides.runtimeType:Iu,this.defaultValue=I};W3.prototype.evaluate=function(I){if(I.formattedSection){var $=this.defaultValue.property.overrides;if($&&$.hasOverride(I.formattedSection))return $.getOverride(I.formattedSection)}return I.feature&&I.featureState?this.defaultValue.evaluate(I.feature,I.featureState):this.defaultValue.property.specification.default},W3.prototype.eachChild=function(I){if(!this.defaultValue.isConstant()){var $=this.defaultValue.value;I($._styleExpression.expression)}},W3.prototype.outputDefined=function(){return!1},W3.prototype.serialize=function(){return null},dr("FormatSectionOverride",W3,{omit:["defaultValue"]});var Mae=(function(R){function I($){R.call(this,$,R8)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype.recalculate=function(he,ke){if(R.prototype.recalculate.call(this,he,ke),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 qe=this.layout.get("text-writing-mode");if(qe){for(var et=[],Mt=0,Jt=qe;Mt<Jt.length;Mt+=1){var pr=Jt[Mt];et.indexOf(pr)<0&&et.push(pr)}this.layout._values["text-writing-mode"]=et}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()},I.prototype.getValueAndResolveTokens=function(he,ke,qe,et){var Mt=this.layout.get(he).evaluate(ke,{},qe,et),Jt=this._unevaluatedLayout._values[he];return!Jt.isDataDriven()&&!os(Jt.value)&&Mt?Aae(ke.properties,Mt):Mt},I.prototype.createBucket=function(he){return new Kc(he)},I.prototype.queryRadius=function(){return 0},I.prototype.queryIntersectsFeature=function(){return!1},I.prototype._setPaintOverrides=function(){for(var he=0,ke=R8.paint.overridableProperties;he<ke.length;he+=1){var qe=ke[he];if(I.hasPaintOverride(this.layout,qe)){var et=this.paint.get(qe),Mt=new W3(et),Jt=new Uf(Mt,et.property.specification),pr=null;et.value.kind==="constant"||et.value.kind==="source"?pr=new qf("source",Jt):pr=new sf("composite",Jt,et.value.zoomStops,et.value._interpolationType),this.paint._values[qe]=new Xn(et.property,pr,et.parameters)}}},I.prototype._handleOverridablePaintPropertyUpdate=function(he,ke,qe){return!this.layout||ke.isDataDriven()||qe.isDataDriven()?!1:I.hasPaintOverride(this.layout,he)},I.hasPaintOverride=function(he,ke){var qe=he.get("text-field"),et=R8.paint.properties[ke],Mt=!1,Jt=function($r){for(var gn=0,hn=$r;gn<hn.length;gn+=1){var zn=hn[gn];if(et.overrides&&et.overrides.hasOverride(zn)){Mt=!0;return}}};if(qe.value.kind==="constant"&&qe.value.value instanceof pc)Jt(qe.value.value.sections);else if(qe.value.kind==="source"){var pr=function($r){if(!Mt)if($r instanceof el&&uu($r.value)===Ys){var gn=$r.value;Jt(gn.sections)}else $r instanceof $f?Jt($r.sections):$r.eachChild(pr)},Ar=qe.value;Ar._styleExpression&&pr(Ar._styleExpression.expression)}return Mt},I})(qi),Cae=new gi({"background-color":new Rn(Ni.paint_background["background-color"]),"background-pattern":new ti(Ni.paint_background["background-pattern"]),"background-opacity":new Rn(Ni.paint_background["background-opacity"])}),kae={paint:Cae},Pae=(function(R){function I($){R.call(this,$,kae)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I})(qi),Lae=new gi({"raster-opacity":new Rn(Ni.paint_raster["raster-opacity"]),"raster-hue-rotate":new Rn(Ni.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new Rn(Ni.paint_raster["raster-brightness-min"]),"raster-brightness-max":new Rn(Ni.paint_raster["raster-brightness-max"]),"raster-saturation":new Rn(Ni.paint_raster["raster-saturation"]),"raster-contrast":new Rn(Ni.paint_raster["raster-contrast"]),"raster-resampling":new Rn(Ni.paint_raster["raster-resampling"]),"raster-fade-duration":new Rn(Ni.paint_raster["raster-fade-duration"])}),Rae={paint:Lae},Iae=(function(R){function I($){R.call(this,$,Rae)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I})(qi);function Dae(R){var I=[],$=R.id;return $===void 0&&I.push({message:"layers."+$+': missing required property "id"'}),R.render===void 0&&I.push({message:"layers."+$+': missing required method "render"'}),R.renderingMode&&R.renderingMode!=="2d"&&R.renderingMode!=="3d"&&I.push({message:"layers."+$+': property "renderingMode" must be either "2d" or "3d"'}),I}var Oae=(function(R){function I($){R.call(this,$,{}),this.implementation=$}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype.is3D=function(){return this.implementation.renderingMode==="3d"},I.prototype.hasOffscreenPass=function(){return this.implementation.prerender!==void 0},I.prototype.recalculate=function(){},I.prototype.updateTransitions=function(){},I.prototype.hasTransition=function(){},I.prototype.serialize=function(){},I.prototype.onAdd=function(he){this.implementation.onAdd&&this.implementation.onAdd(he,he.painter.context.gl)},I.prototype.onRemove=function(he){this.implementation.onRemove&&this.implementation.onRemove(he,he.painter.context.gl)},I})(qi),zae={circle:e5,heatmap:qb,hillshade:C3,fill:h5,"fill-extrusion":w8,line:x5,symbol:Mae,background:Pae,raster:Iae};function Nae(R){return R.type==="custom"?new Oae(R):new zae[R.type](R)}var tB=u.HTMLImageElement,rB=u.HTMLCanvasElement,nB=u.HTMLVideoElement,aB=u.ImageData,s6=u.ImageBitmap,Zb=function(I,$,he,ke){this.context=I,this.format=he,this.texture=I.gl.createTexture(),this.update($,ke)};Zb.prototype.update=function(I,$,he){var ke=I.width,qe=I.height,et=(!this.size||this.size[0]!==ke||this.size[1]!==qe)&&!he,Mt=this,Jt=Mt.context,pr=Jt.gl;if(this.useMipmap=!!($&&$.useMipmap),pr.bindTexture(pr.TEXTURE_2D,this.texture),Jt.pixelStoreUnpackFlipY.set(!1),Jt.pixelStoreUnpack.set(1),Jt.pixelStoreUnpackPremultiplyAlpha.set(this.format===pr.RGBA&&(!$||$.premultiply!==!1)),et)this.size=[ke,qe],I instanceof tB||I instanceof rB||I instanceof nB||I instanceof aB||s6&&I instanceof s6?pr.texImage2D(pr.TEXTURE_2D,0,this.format,this.format,pr.UNSIGNED_BYTE,I):pr.texImage2D(pr.TEXTURE_2D,0,this.format,ke,qe,0,this.format,pr.UNSIGNED_BYTE,I.data);else{var Ar=he||{x:0,y:0},$r=Ar.x,gn=Ar.y;I instanceof tB||I instanceof rB||I instanceof nB||I instanceof aB||s6&&I instanceof s6?pr.texSubImage2D(pr.TEXTURE_2D,0,$r,gn,pr.RGBA,pr.UNSIGNED_BYTE,I):pr.texSubImage2D(pr.TEXTURE_2D,0,$r,gn,ke,qe,pr.RGBA,pr.UNSIGNED_BYTE,I.data)}this.useMipmap&&this.isSizePowerOfTwo()&&pr.generateMipmap(pr.TEXTURE_2D)},Zb.prototype.bind=function(I,$,he){var ke=this,qe=ke.context,et=qe.gl;et.bindTexture(et.TEXTURE_2D,this.texture),he===et.LINEAR_MIPMAP_NEAREST&&!this.isSizePowerOfTwo()&&(he=et.LINEAR),I!==this.filter&&(et.texParameteri(et.TEXTURE_2D,et.TEXTURE_MAG_FILTER,I),et.texParameteri(et.TEXTURE_2D,et.TEXTURE_MIN_FILTER,he||I),this.filter=I),$!==this.wrap&&(et.texParameteri(et.TEXTURE_2D,et.TEXTURE_WRAP_S,$),et.texParameteri(et.TEXTURE_2D,et.TEXTURE_WRAP_T,$),this.wrap=$)},Zb.prototype.isSizePowerOfTwo=function(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1===0},Zb.prototype.destroy=function(){var I=this.context,$=I.gl;$.deleteTexture(this.texture),this.texture=null};var I8=function(I){var $=this;this._callback=I,this._triggered=!1,typeof MessageChannel<"u"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=function(){$._triggered=!1,$._callback()})};I8.prototype.trigger=function(){var I=this;this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(function(){I._triggered=!1,I._callback()},0))},I8.prototype.remove=function(){delete this._channel,this._callback=function(){}};var Y3=function(I,$,he){this.target=I,this.parent=$,this.mapId=he,this.callbacks={},this.tasks={},this.taskQueue=[],this.cancelCallbacks={},D(["receive","process"],this),this.invoker=new I8(this.process),this.target.addEventListener("message",this.receive,!1),this.globalScope=de()?I:u};Y3.prototype.send=function(I,$,he,ke,qe){var et=this;qe===void 0&&(qe=!1);var Mt=Math.round(Math.random()*1e18).toString(36).substring(0,10);he&&(this.callbacks[Mt]=he);var Jt=ie(this.globalScope)?void 0:[];return this.target.postMessage({id:Mt,type:I,hasCallback:!!he,targetMapId:ke,mustQueue:qe,sourceMapId:this.mapId,data:on($,Jt)},Jt),{cancel:function(){he&&delete et.callbacks[Mt],et.target.postMessage({id:Mt,type:"<cancel>",targetMapId:ke,sourceMapId:et.mapId})}}},Y3.prototype.receive=function(I){var $=I.data,he=$.id;if(he&&!($.targetMapId&&this.mapId!==$.targetMapId))if($.type==="<cancel>"){delete this.tasks[he];var ke=this.cancelCallbacks[he];delete this.cancelCallbacks[he],ke&&ke()}else de()||$.mustQueue?(this.tasks[he]=$,this.taskQueue.push(he),this.invoker.trigger()):this.processTask(he,$)},Y3.prototype.process=function(){if(this.taskQueue.length){var I=this.taskQueue.shift(),$=this.tasks[I];delete this.tasks[I],this.taskQueue.length&&this.invoker.trigger(),$&&this.processTask(I,$)}},Y3.prototype.processTask=function(I,$){var he=this;if($.type==="<response>"){var ke=this.callbacks[I];delete this.callbacks[I],ke&&($.error?ke(Mn($.error)):ke(null,Mn($.data)))}else{var qe=!1,et=ie(this.globalScope)?void 0:[],Mt=$.hasCallback?function(gn,hn){qe=!0,delete he.cancelCallbacks[I],he.target.postMessage({id:I,type:"<response>",sourceMapId:he.mapId,error:gn?on(gn):null,data:on(hn,et)},et)}:function(gn){qe=!0},Jt=null,pr=Mn($.data);if(this.parent[$.type])Jt=this.parent[$.type]($.sourceMapId,pr,Mt);else if(this.parent.getWorkerSource){var Ar=$.type.split("."),$r=this.parent.getWorkerSource($.sourceMapId,Ar[0],pr.source);Jt=$r[Ar[1]](pr,Mt)}else Mt(new Error("Could not find function "+$.type));!qe&&Jt&&Jt.cancel&&(this.cancelCallbacks[I]=Jt.cancel)}},Y3.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};function Fae(R,I,$){I=Math.pow(2,$)-I-1;var he=iB(R*256,I*256,$),ke=iB((R+1)*256,(I+1)*256,$);return he[0]+","+he[1]+","+ke[0]+","+ke[1]}function iB(R,I,$){var he=2*Math.PI*6378137/256/Math.pow(2,$),ke=R*he-2*Math.PI*6378137/2,qe=I*he-2*Math.PI*6378137/2;return[ke,qe]}var yd=function(I,$){I&&($?this.setSouthWest(I).setNorthEast($):I.length===4?this.setSouthWest([I[0],I[1]]).setNorthEast([I[2],I[3]]):this.setSouthWest(I[0]).setNorthEast(I[1]))};yd.prototype.setNorthEast=function(I){return this._ne=I instanceof ah?new ah(I.lng,I.lat):ah.convert(I),this},yd.prototype.setSouthWest=function(I){return this._sw=I instanceof ah?new ah(I.lng,I.lat):ah.convert(I),this},yd.prototype.extend=function(I){var $=this._sw,he=this._ne,ke,qe;if(I instanceof ah)ke=I,qe=I;else if(I instanceof yd){if(ke=I._sw,qe=I._ne,!ke||!qe)return this}else{if(Array.isArray(I))if(I.length===4||I.every(Array.isArray)){var et=I;return this.extend(yd.convert(et))}else{var Mt=I;return this.extend(ah.convert(Mt))}return this}return!$&&!he?(this._sw=new ah(ke.lng,ke.lat),this._ne=new ah(qe.lng,qe.lat)):($.lng=Math.min(ke.lng,$.lng),$.lat=Math.min(ke.lat,$.lat),he.lng=Math.max(qe.lng,he.lng),he.lat=Math.max(qe.lat,he.lat)),this},yd.prototype.getCenter=function(){return new ah((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},yd.prototype.getSouthWest=function(){return this._sw},yd.prototype.getNorthEast=function(){return this._ne},yd.prototype.getNorthWest=function(){return new ah(this.getWest(),this.getNorth())},yd.prototype.getSouthEast=function(){return new ah(this.getEast(),this.getSouth())},yd.prototype.getWest=function(){return this._sw.lng},yd.prototype.getSouth=function(){return this._sw.lat},yd.prototype.getEast=function(){return this._ne.lng},yd.prototype.getNorth=function(){return this._ne.lat},yd.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},yd.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},yd.prototype.isEmpty=function(){return!(this._sw&&this._ne)},yd.prototype.contains=function(I){var $=ah.convert(I),he=$.lng,ke=$.lat,qe=this._sw.lat<=ke&&ke<=this._ne.lat,et=this._sw.lng<=he&&he<=this._ne.lng;return this._sw.lng>this._ne.lng&&(et=this._sw.lng>=he&&he>=this._ne.lng),qe&&et},yd.convert=function(I){return!I||I instanceof yd?I:new yd(I)};var oB=63710088e-1,ah=function(I,$){if(isNaN(I)||isNaN($))throw new Error("Invalid LngLat object: ("+I+", "+$+")");if(this.lng=+I,this.lat=+$,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};ah.prototype.wrap=function(){return new ah(_(this.lng,-180,180),this.lat)},ah.prototype.toArray=function(){return[this.lng,this.lat]},ah.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},ah.prototype.distanceTo=function(I){var $=Math.PI/180,he=this.lat*$,ke=I.lat*$,qe=Math.sin(he)*Math.sin(ke)+Math.cos(he)*Math.cos(ke)*Math.cos((I.lng-this.lng)*$),et=oB*Math.acos(Math.min(qe,1));return et},ah.prototype.toBounds=function(I){I===void 0&&(I=0);var $=40075017,he=360*I/$,ke=he/Math.cos(Math.PI/180*this.lat);return new yd(new ah(this.lng-ke,this.lat-he),new ah(this.lng+ke,this.lat+he))},ah.convert=function(I){if(I instanceof ah)return I;if(Array.isArray(I)&&(I.length===2||I.length===3))return new ah(Number(I[0]),Number(I[1]));if(!Array.isArray(I)&&typeof I=="object"&&I!==null)return new ah(Number("lng"in I?I.lng:I.lon),Number(I.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 sB=2*Math.PI*oB;function lB(R){return sB*Math.cos(R*Math.PI/180)}function uB(R){return(180+R)/360}function cB(R){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+R*Math.PI/360)))/360}function fB(R,I){return R/lB(I)}function Bae(R){return R*360-180}function D8(R){var I=180-R*360;return 360/Math.PI*Math.atan(Math.exp(I*Math.PI/180))-90}function jae(R,I){return R*lB(D8(I))}function Uae(R){return 1/Math.cos(R*Math.PI/180)}var $b=function(I,$,he){he===void 0&&(he=0),this.x=+I,this.y=+$,this.z=+he};$b.fromLngLat=function(I,$){$===void 0&&($=0);var he=ah.convert(I);return new $b(uB(he.lng),cB(he.lat),fB($,he.lat))},$b.prototype.toLngLat=function(){return new ah(Bae(this.x),D8(this.y))},$b.prototype.toAltitude=function(){return jae(this.z,this.y)},$b.prototype.meterInMercatorCoordinateUnits=function(){return 1/sB*Uae(D8(this.y))};var Kb=function(I,$,he){this.z=I,this.x=$,this.y=he,this.key=P5(0,I,I,$,he)};Kb.prototype.equals=function(I){return this.z===I.z&&this.x===I.x&&this.y===I.y},Kb.prototype.url=function(I,$){var he=Fae(this.x,this.y,this.z),ke=qae(this.z,this.x,this.y);return I[(this.x+this.y)%I.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($==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",ke).replace("{bbox-epsg-3857}",he)},Kb.prototype.getTilePoint=function(I){var $=Math.pow(2,this.z);return new s((I.x*$-this.x)*co,(I.y*$-this.y)*co)},Kb.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};var hB=function(I,$){this.wrap=I,this.canonical=$,this.key=P5(I,$.z,$.z,$.x,$.y)},_d=function(I,$,he,ke,qe){this.overscaledZ=I,this.wrap=$,this.canonical=new Kb(he,+ke,+qe),this.key=P5($,I,he,ke,qe)};_d.prototype.equals=function(I){return this.overscaledZ===I.overscaledZ&&this.wrap===I.wrap&&this.canonical.equals(I.canonical)},_d.prototype.scaledTo=function(I){var $=this.canonical.z-I;return I>this.canonical.z?new _d(I,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new _d(I,this.wrap,I,this.canonical.x>>$,this.canonical.y>>$)},_d.prototype.calculateScaledKey=function(I,$){var he=this.canonical.z-I;return I>this.canonical.z?P5(this.wrap*+$,I,this.canonical.z,this.canonical.x,this.canonical.y):P5(this.wrap*+$,I,I,this.canonical.x>>he,this.canonical.y>>he)},_d.prototype.isChildOf=function(I){if(I.wrap!==this.wrap)return!1;var $=this.canonical.z-I.canonical.z;return I.overscaledZ===0||I.overscaledZ<this.overscaledZ&&I.canonical.x===this.canonical.x>>$&&I.canonical.y===this.canonical.y>>$},_d.prototype.children=function(I){if(this.overscaledZ>=I)return[new _d(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var $=this.canonical.z+1,he=this.canonical.x*2,ke=this.canonical.y*2;return[new _d($,this.wrap,$,he,ke),new _d($,this.wrap,$,he+1,ke),new _d($,this.wrap,$,he,ke+1),new _d($,this.wrap,$,he+1,ke+1)]},_d.prototype.isLessThan=function(I){return this.wrap<I.wrap?!0:this.wrap>I.wrap?!1:this.overscaledZ<I.overscaledZ?!0:this.overscaledZ>I.overscaledZ?!1:this.canonical.x<I.canonical.x?!0:this.canonical.x>I.canonical.x?!1:this.canonical.y<I.canonical.y},_d.prototype.wrapped=function(){return new _d(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)},_d.prototype.unwrapTo=function(I){return new _d(this.overscaledZ,I,this.canonical.z,this.canonical.x,this.canonical.y)},_d.prototype.overscaleFactor=function(){return Math.pow(2,this.overscaledZ-this.canonical.z)},_d.prototype.toUnwrapped=function(){return new hB(this.wrap,this.canonical)},_d.prototype.toString=function(){return this.overscaledZ+"/"+this.canonical.x+"/"+this.canonical.y},_d.prototype.getTilePoint=function(I){return this.canonical.getTilePoint(new $b(I.x-this.wrap,I.y))};function P5(R,I,$,he,ke){R*=2,R<0&&(R=R*-1-1);var qe=1<<$;return(qe*qe*R+qe*ke+he).toString(36)+$.toString(36)+I.toString(36)}function qae(R,I,$){for(var he="",ke,qe=R;qe>0;qe--)ke=1<<qe-1,he+=(I&ke?1:0)+($&ke?2:0);return he}dr("CanonicalTileID",Kb),dr("OverscaledTileID",_d,{omit:["posMatrix"]});var v1=function(I,$,he){if(this.uid=I,$.height!==$.width)throw new RangeError("DEM tiles must be square");if(he&&he!=="mapbox"&&he!=="terrarium")return G('"'+he+'" is not a valid encoding type. Valid types include "mapbox" and "terrarium".');this.stride=$.height;var ke=this.dim=$.height-2;this.data=new Uint32Array($.data.buffer),this.encoding=he||"mapbox";for(var qe=0;qe<ke;qe++)this.data[this._idx(-1,qe)]=this.data[this._idx(0,qe)],this.data[this._idx(ke,qe)]=this.data[this._idx(ke-1,qe)],this.data[this._idx(qe,-1)]=this.data[this._idx(qe,0)],this.data[this._idx(qe,ke)]=this.data[this._idx(qe,ke-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(ke,-1)]=this.data[this._idx(ke-1,0)],this.data[this._idx(-1,ke)]=this.data[this._idx(0,ke-1)],this.data[this._idx(ke,ke)]=this.data[this._idx(ke-1,ke-1)]};v1.prototype.get=function(I,$){var he=new Uint8Array(this.data.buffer),ke=this._idx(I,$)*4,qe=this.encoding==="terrarium"?this._unpackTerrarium:this._unpackMapbox;return qe(he[ke],he[ke+1],he[ke+2])},v1.prototype.getUnpackVector=function(){return this.encoding==="terrarium"?[256,1,1/256,32768]:[6553.6,25.6,.1,1e4]},v1.prototype._idx=function(I,$){if(I<-1||I>=this.dim+1||$<-1||$>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return($+1)*this.stride+(I+1)},v1.prototype._unpackMapbox=function(I,$,he){return(I*256*256+$*256+he)/10-1e4},v1.prototype._unpackTerrarium=function(I,$,he){return I*256+$+he/256-32768},v1.prototype.getPixels=function(){return new vv({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},v1.prototype.backfillBorder=function(I,$,he){if(this.dim!==I.dim)throw new Error("dem dimension mismatch");var ke=$*this.dim,qe=$*this.dim+this.dim,et=he*this.dim,Mt=he*this.dim+this.dim;switch($){case-1:ke=qe-1;break;case 1:qe=ke+1;break}switch(he){case-1:et=Mt-1;break;case 1:Mt=et+1;break}for(var Jt=-$*this.dim,pr=-he*this.dim,Ar=et;Ar<Mt;Ar++)for(var $r=ke;$r<qe;$r++)this.data[this._idx($r,Ar)]=I.data[this._idx($r+Jt,Ar+pr)]},dr("DEMData",v1);function Vae(R,I){var $={};if(!I)return $;for(var he=function(){var et=qe[ke],Mt=et.layerIds.map(function($r){return I.getLayer($r)}).filter(Boolean);if(Mt.length!==0){et.layers=Mt,et.stateDependentLayerIds&&(et.stateDependentLayers=et.stateDependentLayerIds.map(function($r){return Mt.filter(function(gn){return gn.id===$r})[0]}));for(var Jt=0,pr=Mt;Jt<pr.length;Jt+=1){var Ar=pr[Jt];$[Ar.id]=et}}},ke=0,qe=R;ke<qe.length;ke+=1)he();return $}var l6=function(I){this._stringToNumber={},this._numberToString=[];for(var $=0;$<I.length;$++){var he=I[$];this._stringToNumber[he]=$,this._numberToString[$]=he}};l6.prototype.encode=function(I){return this._stringToNumber[I]},l6.prototype.decode=function(I){return this._numberToString[I]};var u6=function(I,$,he,ke,qe){this.type="Feature",this._vectorTileFeature=I,I._z=$,I._x=he,I._y=ke,this.properties=I.properties,this.id=qe},O8={geometry:{configurable:!0}};O8.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},O8.geometry.set=function(R){this._geometry=R},u6.prototype.toJSON=function(){var I={geometry:this.geometry};for(var $ in this)$==="_geometry"||$==="_vectorTileFeature"||(I[$]=this[$]);return I},Object.defineProperties(u6.prototype,O8);var Z3=function(){this.state={},this.stateChanges={},this.deletedStates={}};Z3.prototype.updateState=function(I,$,he){var ke=String($);if(this.stateChanges[I]=this.stateChanges[I]||{},this.stateChanges[I][ke]=this.stateChanges[I][ke]||{},b(this.stateChanges[I][ke],he),this.deletedStates[I]===null){this.deletedStates[I]={};for(var qe in this.state[I])qe!==ke&&(this.deletedStates[I][qe]=null)}else{var et=this.deletedStates[I]&&this.deletedStates[I][ke]===null;if(et){this.deletedStates[I][ke]={};for(var Mt in this.state[I][ke])he[Mt]||(this.deletedStates[I][ke][Mt]=null)}else for(var Jt in he){var pr=this.deletedStates[I]&&this.deletedStates[I][ke]&&this.deletedStates[I][ke][Jt]===null;pr&&delete this.deletedStates[I][ke][Jt]}}},Z3.prototype.removeFeatureState=function(I,$,he){var ke=this.deletedStates[I]===null;if(!ke){var qe=String($);if(this.deletedStates[I]=this.deletedStates[I]||{},he&&$!==void 0)this.deletedStates[I][qe]!==null&&(this.deletedStates[I][qe]=this.deletedStates[I][qe]||{},this.deletedStates[I][qe][he]=null);else if($!==void 0){var et=this.stateChanges[I]&&this.stateChanges[I][qe];if(et){this.deletedStates[I][qe]={};for(he in this.stateChanges[I][qe])this.deletedStates[I][qe][he]=null}else this.deletedStates[I][qe]=null}else this.deletedStates[I]=null}},Z3.prototype.getState=function(I,$){var he=String($),ke=this.state[I]||{},qe=this.stateChanges[I]||{},et=b({},ke[he],qe[he]);if(this.deletedStates[I]===null)return{};if(this.deletedStates[I]){var Mt=this.deletedStates[I][$];if(Mt===null)return{};for(var Jt in Mt)delete et[Jt]}return et},Z3.prototype.initializeTileState=function(I,$){I.setFeatureState(this.state,$)},Z3.prototype.coalesceChanges=function(I,$){var he={};for(var ke in this.stateChanges){this.state[ke]=this.state[ke]||{};var qe={};for(var et in this.stateChanges[ke])this.state[ke][et]||(this.state[ke][et]={}),b(this.state[ke][et],this.stateChanges[ke][et]),qe[et]=this.state[ke][et];he[ke]=qe}for(var Mt in this.deletedStates){this.state[Mt]=this.state[Mt]||{};var Jt={};if(this.deletedStates[Mt]===null)for(var pr in this.state[Mt])Jt[pr]={},this.state[Mt][pr]={};else for(var Ar in this.deletedStates[Mt]){var $r=this.deletedStates[Mt][Ar]===null;if($r)this.state[Mt][Ar]={};else for(var gn=0,hn=Object.keys(this.deletedStates[Mt][Ar]);gn<hn.length;gn+=1){var zn=hn[gn];delete this.state[Mt][Ar][zn]}Jt[Ar]=this.state[Mt][Ar]}he[Mt]=he[Mt]||{},b(he[Mt],Jt)}if(this.stateChanges={},this.deletedStates={},Object.keys(he).length!==0)for(var _a in I){var ui=I[_a];ui.setFeatureState(he,$)}};var p1=function(I,$){this.tileID=I,this.x=I.canonical.x,this.y=I.canonical.y,this.z=I.canonical.z,this.grid=new Te(co,16,0),this.grid3D=new Te(co,16,0),this.featureIndexArray=new wc,this.promoteId=$};p1.prototype.insert=function(I,$,he,ke,qe,et){var Mt=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(he,ke,qe);for(var Jt=et?this.grid3D:this.grid,pr=0;pr<$.length;pr++){for(var Ar=$[pr],$r=[1/0,1/0,-1/0,-1/0],gn=0;gn<Ar.length;gn++){var hn=Ar[gn];$r[0]=Math.min($r[0],hn.x),$r[1]=Math.min($r[1],hn.y),$r[2]=Math.max($r[2],hn.x),$r[3]=Math.max($r[3],hn.y)}$r[0]<co&&$r[1]<co&&$r[2]>=0&&$r[3]>=0&&Jt.insert(Mt,$r[0],$r[1],$r[2],$r[3])}},p1.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new h1.VectorTile(new jn(this.rawTileData)).layers,this.sourceLayerCoder=new l6(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},p1.prototype.query=function(I,$,he,ke){var qe=this;this.loadVTLayers();for(var et=I.params||{},Mt=co/I.tileSize/I.scale,Jt=ct(et.filter),pr=I.queryGeometry,Ar=I.queryPadding*Mt,$r=vB(pr),gn=this.grid.query($r.minX-Ar,$r.minY-Ar,$r.maxX+Ar,$r.maxY+Ar),hn=vB(I.cameraQueryGeometry),zn=this.grid3D.query(hn.minX-Ar,hn.minY-Ar,hn.maxX+Ar,hn.maxY+Ar,function(yo,Bo,zo,ws){return vm(I.cameraQueryGeometry,yo-Ar,Bo-Ar,zo+Ar,ws+Ar)}),_a=0,ui=zn;_a<ui.length;_a+=1){var Ua=ui[_a];gn.push(Ua)}gn.sort(Hae);for(var ji={},bi,Fi=function(yo){var Bo=gn[yo];if(Bo!==bi){bi=Bo;var zo=qe.featureIndexArray.get(Bo),ws=null;qe.loadMatchingFeature(ji,zo.bucketIndex,zo.sourceLayerIndex,zo.featureIndex,Jt,et.layers,et.availableImages,$,he,ke,function(Qo,fs,Sl){return ws||(ws=Tl(Qo)),fs.queryIntersectsFeature(pr,Qo,Sl,ws,qe.z,I.transform,Mt,I.pixelPosMatrix)})}},Zi=0;Zi<gn.length;Zi++)Fi(Zi);return ji},p1.prototype.loadMatchingFeature=function(I,$,he,ke,qe,et,Mt,Jt,pr,Ar,$r){var gn=this.bucketLayerIDs[$];if(!(et&&!z(et,gn))){var hn=this.sourceLayerCoder.decode(he),zn=this.vtLayers[hn],_a=zn.feature(ke);if(qe.needGeometry){var ui=Rl(_a,!0);if(!qe.filter(new jl(this.tileID.overscaledZ),ui,this.tileID.canonical))return}else if(!qe.filter(new jl(this.tileID.overscaledZ),_a))return;for(var Ua=this.getId(_a,hn),ji=0;ji<gn.length;ji++){var bi=gn[ji];if(!(et&&et.indexOf(bi)<0)){var Fi=Jt[bi];if(Fi){var Zi={};Ua!==void 0&&Ar&&(Zi=Ar.getState(Fi.sourceLayer||"_geojsonTileLayer",Ua));var yo=b({},pr[bi]);yo.paint=dB(yo.paint,Fi.paint,_a,Zi,Mt),yo.layout=dB(yo.layout,Fi.layout,_a,Zi,Mt);var Bo=!$r||$r(_a,Fi,Zi);if(Bo){var zo=new u6(_a,this.z,this.x,this.y,Ua);zo.layer=yo;var ws=I[bi];ws===void 0&&(ws=I[bi]=[]),ws.push({featureIndex:ke,feature:zo,intersectionZ:Bo})}}}}}},p1.prototype.lookupSymbolFeatures=function(I,$,he,ke,qe,et,Mt,Jt){var pr={};this.loadVTLayers();for(var Ar=ct(qe),$r=0,gn=I;$r<gn.length;$r+=1){var hn=gn[$r];this.loadMatchingFeature(pr,he,ke,hn,Ar,et,Mt,Jt,$)}return pr},p1.prototype.hasLayer=function(I){for(var $=0,he=this.bucketLayerIDs;$<he.length;$+=1)for(var ke=he[$],qe=0,et=ke;qe<et.length;qe+=1){var Mt=et[qe];if(I===Mt)return!0}return!1},p1.prototype.getId=function(I,$){var he=I.id;if(this.promoteId){var ke=typeof this.promoteId=="string"?this.promoteId:this.promoteId[$];he=I.properties[ke],typeof he=="boolean"&&(he=Number(he))}return he},dr("FeatureIndex",p1,{omit:["rawTileData","sourceLayerCoder"]});function dB(R,I,$,he,ke){return U(R,function(qe,et){var Mt=I instanceof La?I.get(et):null;return Mt&&Mt.evaluate?Mt.evaluate($,he,ke):Mt})}function vB(R){for(var I=1/0,$=1/0,he=-1/0,ke=-1/0,qe=0,et=R;qe<et.length;qe+=1){var Mt=et[qe];I=Math.min(I,Mt.x),$=Math.min($,Mt.y),he=Math.max(he,Mt.x),ke=Math.max(ke,Mt.y)}return{minX:I,minY:$,maxX:he,maxY:ke}}function Hae(R,I){return I-R}var Gae=3e4,tv=function(I,$){this.tileID=I,this.uid=f(),this.uses=0,this.tileSize=$,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.expiredRequestCount=0,this.state="loading"};tv.prototype.registerFadeDuration=function(I){var $=I+this.timeAdded;$<Le.now()||this.fadeEndTime&&$<this.fadeEndTime||(this.fadeEndTime=$)},tv.prototype.wasRequested=function(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"},tv.prototype.loadVectorData=function(I,$,he){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",!I){this.collisionBoxArray=new kf;return}I.featureIndex&&(this.latestFeatureIndex=I.featureIndex,I.rawTileData?(this.latestRawTileData=I.rawTileData,this.latestFeatureIndex.rawTileData=I.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=I.collisionBoxArray,this.buckets=Vae(I.buckets,$.style),this.hasSymbolBuckets=!1;for(var ke in this.buckets){var qe=this.buckets[ke];if(qe instanceof Kc)if(this.hasSymbolBuckets=!0,he)qe.justReloaded=!0;else break}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(var et in this.buckets){var Mt=this.buckets[et];if(Mt instanceof Kc&&Mt.hasRTLText){this.hasRTLText=!0,Dc();break}}this.queryPadding=0;for(var Jt in this.buckets){var pr=this.buckets[Jt];this.queryPadding=Math.max(this.queryPadding,$.style.getLayer(Jt).queryRadius(pr))}I.imageAtlas&&(this.imageAtlas=I.imageAtlas),I.glyphAtlasImage&&(this.glyphAtlasImage=I.glyphAtlasImage)},tv.prototype.unloadVectorData=function(){for(var I in this.buckets)this.buckets[I].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"},tv.prototype.getBucket=function(I){return this.buckets[I.id]},tv.prototype.upload=function(I){for(var $ in this.buckets){var he=this.buckets[$];he.uploadPending()&&he.upload(I)}var ke=I.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new Zb(I,this.imageAtlas.image,ke.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new Zb(I,this.glyphAtlasImage,ke.ALPHA),this.glyphAtlasImage=null)},tv.prototype.prepare=function(I){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(I,this.imageAtlasTexture)},tv.prototype.queryRenderedFeatures=function(I,$,he,ke,qe,et,Mt,Jt,pr,Ar){return!this.latestFeatureIndex||!this.latestFeatureIndex.rawTileData?{}:this.latestFeatureIndex.query({queryGeometry:ke,cameraQueryGeometry:qe,scale:et,tileSize:this.tileSize,pixelPosMatrix:Ar,transform:Jt,params:Mt,queryPadding:this.queryPadding*pr},I,$,he)},tv.prototype.querySourceFeatures=function(I,$){var he=this.latestFeatureIndex;if(!(!he||!he.rawTileData)){var ke=he.loadVTLayers(),qe=$?$.sourceLayer:"",et=ke._geojsonTileLayer||ke[qe];if(et)for(var Mt=ct($&&$.filter),Jt=this.tileID.canonical,pr=Jt.z,Ar=Jt.x,$r=Jt.y,gn={z:pr,x:Ar,y:$r},hn=0;hn<et.length;hn++){var zn=et.feature(hn);if(Mt.needGeometry){var _a=Rl(zn,!0);if(!Mt.filter(new jl(this.tileID.overscaledZ),_a,this.tileID.canonical))continue}else if(!Mt.filter(new jl(this.tileID.overscaledZ),zn))continue;var ui=he.getId(zn,qe),Ua=new u6(zn,pr,Ar,$r,ui);Ua.tile=gn,I.push(Ua)}}},tv.prototype.hasData=function(){return this.state==="loaded"||this.state==="reloading"||this.state==="expired"},tv.prototype.patternsLoaded=function(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length},tv.prototype.setExpiryData=function(I){var $=this.expirationTime;if(I.cacheControl){var he=me(I.cacheControl);he["max-age"]&&(this.expirationTime=Date.now()+he["max-age"]*1e3)}else I.expires&&(this.expirationTime=new Date(I.expires).getTime());if(this.expirationTime){var ke=Date.now(),qe=!1;if(this.expirationTime>ke)qe=!1;else if(!$)qe=!0;else if(this.expirationTime<$)qe=!0;else{var et=this.expirationTime-$;et?this.expirationTime=ke+Math.max(et,Gae):qe=!0}qe?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}},tv.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)},tv.prototype.setFeatureState=function(I,$){if(!(!this.latestFeatureIndex||!this.latestFeatureIndex.rawTileData||Object.keys(I).length===0)){var he=this.latestFeatureIndex.loadVTLayers();for(var ke in this.buckets)if($.style.hasLayer(ke)){var qe=this.buckets[ke],et=qe.layers[0].sourceLayer||"_geojsonTileLayer",Mt=he[et],Jt=I[et];if(!(!Mt||!Jt||Object.keys(Jt).length===0)){qe.update(Jt,Mt,this.imageAtlas&&this.imageAtlas.patternPositions||{});var pr=$&&$.style&&$.style.getLayer(ke);pr&&(this.queryPadding=Math.max(this.queryPadding,pr.queryRadius(qe)))}}}},tv.prototype.holdingForFade=function(){return this.symbolFadeHoldUntil!==void 0},tv.prototype.symbolFadeFinished=function(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<Le.now()},tv.prototype.clearFadeHold=function(){this.symbolFadeHoldUntil=void 0},tv.prototype.setHoldDuration=function(I){this.symbolFadeHoldUntil=Le.now()+I},tv.prototype.setDependencies=function(I,$){for(var he={},ke=0,qe=$;ke<qe.length;ke+=1){var et=qe[ke];he[et]=!0}this.dependencies[I]=he},tv.prototype.hasDependency=function(I,$){for(var he=0,ke=I;he<ke.length;he+=1){var qe=ke[he],et=this.dependencies[qe];if(et)for(var Mt=0,Jt=$;Mt<Jt.length;Mt+=1){var pr=Jt[Mt];if(et[pr])return!0}}return!1};var Xae=["type","source","source-layer","minzoom","maxzoom","filter","layout"],K_=u.performance,pB=function(I){this._marks={start:[I.url,"start"].join("#"),end:[I.url,"end"].join("#"),measure:I.url.toString()},K_.mark(this._marks.start)};pB.prototype.finish=function(){K_.mark(this._marks.end);var I=K_.getEntriesByName(this._marks.measure);return I.length===0&&(K_.measure(this._marks.measure,this._marks.start,this._marks.end),I=K_.getEntriesByName(this._marks.measure),K_.clearMarks(this._marks.start),K_.clearMarks(this._marks.end),K_.clearMeasures(this._marks.measure)),I},t.Actor=Y3,t.AlphaImage=pd,t.CanonicalTileID=Kb,t.CollisionBoxArray=kf,t.Color=zl,t.DEMData=v1,t.DataConstantProperty=Rn,t.DictionaryCoder=l6,t.EXTENT=co,t.ErrorEvent=rn,t.EvaluationParameters=jl,t.Event=en,t.Evented=Wr,t.FeatureIndex=p1,t.FillBucket=pm,t.FillExtrusionBucket=Lp,t.ImageAtlas=$c,t.ImagePosition=$u,t.LineBucket=pv,t.LngLat=ah,t.LngLatBounds=yd,t.MercatorCoordinate=$b,t.ONE_EM=Ir,t.OverscaledTileID=_d,t.Point=s,t.Point$1=s,t.Properties=gi,t.Protobuf=jn,t.RGBAImage=vv,t.RequestManager=be,t.RequestPerformance=pB,t.ResourceType=$a,t.SegmentVector=Rs,t.SourceFeatureState=Z3,t.StructArrayLayout1ui2=Mu,t.StructArrayLayout2f1f2i16=lo,t.StructArrayLayout2i4=li,t.StructArrayLayout3ui6=Uo,t.StructArrayLayout4i8=eo,t.SymbolBucket=Kc,t.Texture=Zb,t.Tile=tv,t.Transitionable=Uu,t.Uniform1f=gr,t.Uniform1i=ur,t.Uniform2f=vr,t.Uniform3f=Zt,t.Uniform4f=ar,t.UniformColor=tr,t.UniformMatrix4f=un,t.UnwrappedTileID=hB,t.ValidationError=wo,t.WritingMode=nh,t.ZoomHistory=Un,t.add=Pp,t.addDynamicAttributes=L8,t.asyncAll=T,t.bezier=m,t.bindAll=D,t.browser=Le,t.cacheEntryPossiblyAdded=Hn,t.clamp=c,t.clearTileCache=ua,t.clipLine=ZF,t.clone=D_,t.clone$1=q,t.clone$2=b3,t.collisionCircleLayout=Qe,t.config=ze,t.create=I_,t.create$1=Kd,t.create$2=ig,t.createCommonjsModule=r,t.createExpression=_s,t.createLayout=Fa,t.createStyleLayer=Nae,t.cross=a8,t.deepEqual=d,t.dot=n8,t.dot$1=u8,t.ease=E,t.emitValidationErrors=Zc,t.endsWith=B,t.enforceCacheSizeLimit=ga,t.evaluateSizeForFeature=M5,t.evaluateSizeForZoom=e6,t.evaluateVariableOffset=JF,t.evented=fu,t.extend=b,t.featureFilter=ct,t.filterObject=V,t.fromRotation=ey,t.getAnchorAlignment=E5,t.getAnchorJustification=P8,t.getArrayBuffer=Ln,t.getImage=Yi,t.getJSON=wn,t.getRTLTextPluginStatus=ko,t.getReferrer=_r,t.getVideo=Ht,t.identity=s1,t.invert=ty,t.isChar=Gn,t.isMapboxURL=Ye,t.keysDifference=k,t.makeRequest=an,t.mapObject=U,t.mercatorXfromLng=uB,t.mercatorYfromLat=cB,t.mercatorZfromAltitude=fB,t.mul=jb,t.multiply=ry,t.mvt=h1,t.nextPowerOfTwo=x,t.normalize=Ub,t.number=bu,t.offscreenCanvasSupported=ia,t.ortho=Oc,t.parseGlyphPBF=$v,t.pbf=jn,t.performSymbolLayout=gae,t.perspective=O_,t.pick=A,t.plugin=Yl,t.polygonIntersectsPolygon=yl,t.postMapLoadEvent=De,t.postTurnstileEvent=$e,t.potpack=Rp,t.refProperties=Xae,t.register=dr,t.registerForPluginStateChange=Vs,t.renderColorRamp=N_,t.rotate=o1,t.rotateX=kv,t.rotateZ=l1,t.scale=Tc,t.scale$1=l8,t.scale$2=w3,t.setCacheLimits=Ta,t.setRTLTextPlugin=ul,t.sphericalToCartesian=ge,t.sqrLen=bk,t.styleSpec=Ni,t.sub=o8,t.symbolSize=C8,t.transformMat3=i8,t.transformMat4=T3,t.translate=Pf,t.triggerPluginCompletionEvent=dl,t.uniqueId=f,t.validateCustomStyleLayer=Dae,t.validateLight=qs,t.validateStyle=Us,t.values=M,t.vectorTile=h1,t.version=a,t.warnOnce=G,t.webpSupported=Xe,t.window=u,t.wrap=_}),P(["./shared"],function(t){function r(_r){var Qt=typeof _r;if(Qt==="number"||Qt==="boolean"||Qt==="string"||_r===void 0||_r===null)return JSON.stringify(_r);if(Array.isArray(_r)){for(var yr="[",br=0,an=_r;br<an.length;br+=1){var wn=an[br];yr+=r(wn)+","}return yr+"]"}for(var Ln=Object.keys(_r).sort(),Bn="{",xa=0;xa<Ln.length;xa++)Bn+=JSON.stringify(Ln[xa])+":"+r(_r[Ln[xa]])+",";return Bn+"}"}function a(_r){for(var Qt="",yr=0,br=t.refProperties;yr<br.length;yr+=1){var an=br[yr];Qt+="/"+r(_r[an])}return Qt}function l(_r,Qt){for(var yr={},br=0;br<_r.length;br++){var an=Qt&&Qt[_r[br].id]||a(_r[br]);Qt&&(Qt[_r[br].id]=an);var wn=yr[an];wn||(wn=yr[an]=[]),wn.push(_r[br])}var Ln=[];for(var Bn in yr)Ln.push(yr[Bn]);return Ln}var i=function(Qt){this.keyCache={},Qt&&this.replace(Qt)};i.prototype.replace=function(Qt){this._layerConfigs={},this._layers={},this.update(Qt,[])},i.prototype.update=function(Qt,yr){for(var br=this,an=0,wn=Qt;an<wn.length;an+=1){var Ln=wn[an];this._layerConfigs[Ln.id]=Ln;var Bn=this._layers[Ln.id]=t.createStyleLayer(Ln);Bn._featureFilter=t.featureFilter(Bn.filter),this.keyCache[Ln.id]&&delete this.keyCache[Ln.id]}for(var xa=0,za=yr;xa<za.length;xa+=1){var Ia=za[xa];delete this.keyCache[Ia],delete this._layerConfigs[Ia],delete this._layers[Ia]}this.familiesBySource={};for(var Ba=l(t.values(this._layerConfigs),this.keyCache),Ka=0,fa=Ba;Ka<fa.length;Ka+=1){var Bi=fa[Ka],Yi=Bi.map(function(Wr){return br._layers[Wr.id]}),Ht=Yi[0];if(Ht.visibility!=="none"){var kt=Ht.source||"",qr=this.familiesBySource[kt];qr||(qr=this.familiesBySource[kt]={});var en=Ht.sourceLayer||"_geojsonTileLayer",rn=qr[en];rn||(rn=qr[en]=[]),rn.push(Yi)}}};var s=1,o=function(Qt){var yr={},br=[];for(var an in Qt){var wn=Qt[an],Ln=yr[an]={};for(var Bn in wn){var xa=wn[+Bn];if(!(!xa||xa.bitmap.width===0||xa.bitmap.height===0)){var za={x:0,y:0,w:xa.bitmap.width+2*s,h:xa.bitmap.height+2*s};br.push(za),Ln[Bn]={rect:za,metrics:xa.metrics}}}}var Ia=t.potpack(br),Ba=Ia.w,Ka=Ia.h,fa=new t.AlphaImage({width:Ba||1,height:Ka||1});for(var Bi in Qt){var Yi=Qt[Bi];for(var Ht in Yi){var kt=Yi[+Ht];if(!(!kt||kt.bitmap.width===0||kt.bitmap.height===0)){var qr=yr[Bi][Ht].rect;t.AlphaImage.copy(kt.bitmap,fa,{x:0,y:0},{x:qr.x+s,y:qr.y+s},kt.bitmap)}}}this.image=fa,this.positions=yr};t.register("GlyphAtlas",o);var u=function(Qt){this.tileID=new t.OverscaledTileID(Qt.tileID.overscaledZ,Qt.tileID.wrap,Qt.tileID.canonical.z,Qt.tileID.canonical.x,Qt.tileID.canonical.y),this.uid=Qt.uid,this.zoom=Qt.zoom,this.pixelRatio=Qt.pixelRatio,this.tileSize=Qt.tileSize,this.source=Qt.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=Qt.showCollisionBoxes,this.collectResourceTiming=!!Qt.collectResourceTiming,this.returnDependencies=!!Qt.returnDependencies,this.promoteId=Qt.promoteId};u.prototype.parse=function(Qt,yr,br,an,wn){var Ln=this;this.status="parsing",this.data=Qt,this.collisionBoxArray=new t.CollisionBoxArray;var Bn=new t.DictionaryCoder(Object.keys(Qt.layers).sort()),xa=new t.FeatureIndex(this.tileID,this.promoteId);xa.bucketLayerIDs=[];var za={},Ia={featureIndex:xa,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:br},Ba=yr.familiesBySource[this.source];for(var Ka in Ba){var fa=Qt.layers[Ka];if(fa){fa.version===1&&t.warnOnce('Vector tile source "'+this.source+'" layer "'+Ka+'" does not use vector tile spec v2 and therefore may have some rendering errors.');for(var Bi=Bn.encode(Ka),Yi=[],Ht=0;Ht<fa.length;Ht++){var kt=fa.feature(Ht),qr=xa.getId(kt,Ka);Yi.push({feature:kt,id:qr,index:Ht,sourceLayerIndex:Bi})}for(var en=0,rn=Ba[Ka];en<rn.length;en+=1){var Wr=rn[en],tn=Wr[0];if(!(tn.minzoom&&this.zoom<Math.floor(tn.minzoom))&&!(tn.maxzoom&&this.zoom>=tn.maxzoom)&&tn.visibility!=="none"){d(Wr,this.zoom,br);var Tn=za[tn.id]=tn.createBucket({index:xa.bucketLayerIDs.length,layers:Wr,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:Bi,sourceID:this.source});Tn.populate(Yi,Ia,this.tileID.canonical),xa.bucketLayerIDs.push(Wr.map(function(Sn){return Sn.id}))}}}}var dn,It,xr,Yr,An=t.mapObject(Ia.glyphDependencies,function(Sn){return Object.keys(Sn).map(Number)});Object.keys(An).length?an.send("getGlyphs",{uid:this.uid,stacks:An},function(Sn,Kn){dn||(dn=Sn,It=Kn,oa.call(Ln))}):It={};var Zn=Object.keys(Ia.iconDependencies);Zn.length?an.send("getImages",{icons:Zn,source:this.source,tileID:this.tileID,type:"icons"},function(Sn,Kn){dn||(dn=Sn,xr=Kn,oa.call(Ln))}):xr={};var sa=Object.keys(Ia.patternDependencies);sa.length?an.send("getImages",{icons:sa,source:this.source,tileID:this.tileID,type:"patterns"},function(Sn,Kn){dn||(dn=Sn,Yr=Kn,oa.call(Ln))}):Yr={},oa.call(this);function oa(){if(dn)return wn(dn);if(It&&xr&&Yr){var Sn=new o(It),Kn=new t.ImageAtlas(xr,Yr);for(var Ui in za){var Za=za[Ui];Za instanceof t.SymbolBucket?(d(Za.layers,this.zoom,br),t.performSymbolLayout(Za,It,Sn.positions,xr,Kn.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):Za.hasPattern&&(Za instanceof t.LineBucket||Za instanceof t.FillBucket||Za instanceof t.FillExtrusionBucket)&&(d(Za.layers,this.zoom,br),Za.addFeatures(Ia,this.tileID.canonical,Kn.patternPositions))}this.status="done",wn(null,{buckets:t.values(za).filter(function(Ki){return!Ki.isEmpty()}),featureIndex:xa,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Sn.image,imageAtlas:Kn,glyphMap:this.returnDependencies?It:null,iconMap:this.returnDependencies?xr:null,glyphPositions:this.returnDependencies?Sn.positions:null})}}};function d(_r,Qt,yr){for(var br=new t.EvaluationParameters(Qt),an=0,wn=_r;an<wn.length;an+=1){var Ln=wn[an];Ln.recalculate(br,yr)}}function h(_r,Qt){var yr=t.getArrayBuffer(_r.request,function(br,an,wn,Ln){br?Qt(br):an&&Qt(null,{vectorTile:new t.vectorTile.VectorTile(new t.pbf(an)),rawData:an,cacheControl:wn,expires:Ln})});return function(){yr.cancel(),Qt()}}var g=function(Qt,yr,br,an){this.actor=Qt,this.layerIndex=yr,this.availableImages=br,this.loadVectorData=an||h,this.loading={},this.loaded={}};g.prototype.loadTile=function(Qt,yr){var br=this,an=Qt.uid;this.loading||(this.loading={});var wn=Qt&&Qt.request&&Qt.request.collectResourceTiming?new t.RequestPerformance(Qt.request):!1,Ln=this.loading[an]=new u(Qt);Ln.abort=this.loadVectorData(Qt,function(Bn,xa){if(delete br.loading[an],Bn||!xa)return Ln.status="done",br.loaded[an]=Ln,yr(Bn);var za=xa.rawData,Ia={};xa.expires&&(Ia.expires=xa.expires),xa.cacheControl&&(Ia.cacheControl=xa.cacheControl);var Ba={};if(wn){var Ka=wn.finish();Ka&&(Ba.resourceTiming=JSON.parse(JSON.stringify(Ka)))}Ln.vectorTile=xa.vectorTile,Ln.parse(xa.vectorTile,br.layerIndex,br.availableImages,br.actor,function(fa,Bi){if(fa||!Bi)return yr(fa);yr(null,t.extend({rawTileData:za.slice(0)},Bi,Ia,Ba))}),br.loaded=br.loaded||{},br.loaded[an]=Ln})},g.prototype.reloadTile=function(Qt,yr){var br=this,an=this.loaded,wn=Qt.uid,Ln=this;if(an&&an[wn]){var Bn=an[wn];Bn.showCollisionBoxes=Qt.showCollisionBoxes;var xa=function(za,Ia){var Ba=Bn.reloadCallback;Ba&&(delete Bn.reloadCallback,Bn.parse(Bn.vectorTile,Ln.layerIndex,br.availableImages,Ln.actor,Ba)),yr(za,Ia)};Bn.status==="parsing"?Bn.reloadCallback=xa:Bn.status==="done"&&(Bn.vectorTile?Bn.parse(Bn.vectorTile,this.layerIndex,this.availableImages,this.actor,xa):xa())}},g.prototype.abortTile=function(Qt,yr){var br=this.loading,an=Qt.uid;br&&br[an]&&br[an].abort&&(br[an].abort(),delete br[an]),yr()},g.prototype.removeTile=function(Qt,yr){var br=this.loaded,an=Qt.uid;br&&br[an]&&delete br[an],yr()};var m=t.window.ImageBitmap,E=function(){this.loaded={}};E.prototype.loadTile=function(Qt,yr){var br=Qt.uid,an=Qt.encoding,wn=Qt.rawImageData,Ln=m&&wn instanceof m?this.getImageData(wn):wn,Bn=new t.DEMData(br,Ln,an);this.loaded=this.loaded||{},this.loaded[br]=Bn,yr(null,Bn)},E.prototype.getImageData=function(Qt){(!this.offscreenCanvas||!this.offscreenCanvasContext)&&(this.offscreenCanvas=new OffscreenCanvas(Qt.width,Qt.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=Qt.width,this.offscreenCanvas.height=Qt.height,this.offscreenCanvasContext.drawImage(Qt,0,0,Qt.width,Qt.height);var yr=this.offscreenCanvasContext.getImageData(-1,-1,Qt.width+2,Qt.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new t.RGBAImage({width:yr.width,height:yr.height},yr.data)},E.prototype.removeTile=function(Qt){var yr=this.loaded,br=Qt.uid;yr&&yr[br]&&delete yr[br]};var c=_;function _(_r,Qt){var yr=_r&&_r.type,br;if(yr==="FeatureCollection")for(br=0;br<_r.features.length;br++)_(_r.features[br],Qt);else if(yr==="GeometryCollection")for(br=0;br<_r.geometries.length;br++)_(_r.geometries[br],Qt);else if(yr==="Feature")_(_r.geometry,Qt);else if(yr==="Polygon")T(_r.coordinates,Qt);else if(yr==="MultiPolygon")for(br=0;br<_r.coordinates.length;br++)T(_r.coordinates[br],Qt);return _r}function T(_r,Qt){if(_r.length!==0){M(_r[0],Qt);for(var yr=1;yr<_r.length;yr++)M(_r[yr],!Qt)}}function M(_r,Qt){for(var yr=0,br=0,an=_r.length,wn=an-1;br<an;wn=br++)yr+=(_r[br][0]-_r[wn][0])*(_r[wn][1]+_r[br][1]);yr>=0!=!!Qt&&_r.reverse()}var k=t.vectorTile.VectorTileFeature.prototype.toGeoJSON,b=function(Qt){this._feature=Qt,this.extent=t.EXTENT,this.type=Qt.type,this.properties=Qt.tags,"id"in Qt&&!isNaN(Qt.id)&&(this.id=parseInt(Qt.id,10))};b.prototype.loadGeometry=function(){if(this._feature.type===1){for(var Qt=[],yr=0,br=this._feature.geometry;yr<br.length;yr+=1){var an=br[yr];Qt.push([new t.Point$1(an[0],an[1])])}return Qt}else{for(var wn=[],Ln=0,Bn=this._feature.geometry;Ln<Bn.length;Ln+=1){for(var xa=Bn[Ln],za=[],Ia=0,Ba=xa;Ia<Ba.length;Ia+=1){var Ka=Ba[Ia];za.push(new t.Point$1(Ka[0],Ka[1]))}wn.push(za)}return wn}},b.prototype.toGeoJSON=function(Qt,yr,br){return k.call(this,Qt,yr,br)};var A=function(Qt){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=t.EXTENT,this.length=Qt.length,this._features=Qt};A.prototype.feature=function(Qt){return new b(this._features[Qt])};var y=t.vectorTile.VectorTileFeature,f=p;function p(_r,Qt){this.options=Qt||{},this.features=_r,this.length=_r.length}p.prototype.feature=function(_r){return new x(this.features[_r],this.options.extent)};function x(_r,Qt){this.id=typeof _r.id=="number"?_r.id:void 0,this.type=_r.type,this.rawGeometry=_r.type===1?[_r.geometry]:_r.geometry,this.properties=_r.tags,this.extent=Qt||4096}x.prototype.loadGeometry=function(){var _r=this.rawGeometry;this.geometry=[];for(var Qt=0;Qt<_r.length;Qt++){for(var yr=_r[Qt],br=[],an=0;an<yr.length;an++)br.push(new t.Point$1(yr[an][0],yr[an][1]));this.geometry.push(br)}return this.geometry},x.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var _r=this.geometry,Qt=1/0,yr=-1/0,br=1/0,an=-1/0,wn=0;wn<_r.length;wn++)for(var Ln=_r[wn],Bn=0;Bn<Ln.length;Bn++){var xa=Ln[Bn];Qt=Math.min(Qt,xa.x),yr=Math.max(yr,xa.x),br=Math.min(br,xa.y),an=Math.max(an,xa.y)}return[Qt,br,yr,an]},x.prototype.toGeoJSON=y.prototype.toGeoJSON;var N=V,D=V,B=q,U=f;function V(_r){var Qt=new t.pbf;return z(_r,Qt),Qt.finish()}function q(_r,Qt){Qt=Qt||{};var yr={};for(var br in _r)yr[br]=new f(_r[br].features,Qt),yr[br].name=br,yr[br].version=Qt.version,yr[br].extent=Qt.extent;return V({layers:yr})}function z(_r,Qt){for(var yr in _r.layers)Qt.writeMessage(3,H,_r.layers[yr])}function H(_r,Qt){Qt.writeVarintField(15,_r.version||1),Qt.writeStringField(1,_r.name||""),Qt.writeVarintField(5,_r.extent||4096);var yr,br={keys:[],values:[],keycache:{},valuecache:{}};for(yr=0;yr<_r.length;yr++)br.feature=_r.feature(yr),Qt.writeMessage(2,G,br);var an=br.keys;for(yr=0;yr<an.length;yr++)Qt.writeStringField(3,an[yr]);var wn=br.values;for(yr=0;yr<wn.length;yr++)Qt.writeMessage(4,me,wn[yr])}function G(_r,Qt){var yr=_r.feature;yr.id!==void 0&&Qt.writeVarintField(1,yr.id),Qt.writeMessage(2,J,_r),Qt.writeVarintField(3,yr.type),Qt.writeMessage(4,de,yr)}function J(_r,Qt){var yr=_r.feature,br=_r.keys,an=_r.values,wn=_r.keycache,Ln=_r.valuecache;for(var Bn in yr.properties){var xa=wn[Bn];typeof xa>"u"&&(br.push(Bn),xa=br.length-1,wn[Bn]=xa),Qt.writeVarint(xa);var za=yr.properties[Bn],Ia=typeof za;Ia!=="string"&&Ia!=="boolean"&&Ia!=="number"&&(za=JSON.stringify(za));var Ba=Ia+":"+za,Ka=Ln[Ba];typeof Ka>"u"&&(an.push(za),Ka=an.length-1,Ln[Ba]=Ka),Qt.writeVarint(Ka)}}function le(_r,Qt){return(Qt<<3)+(_r&7)}function ge(_r){return _r<<1^_r>>31}function de(_r,Qt){for(var yr=_r.loadGeometry(),br=_r.type,an=0,wn=0,Ln=yr.length,Bn=0;Bn<Ln;Bn++){var xa=yr[Bn],za=1;br===1&&(za=xa.length),Qt.writeVarint(le(1,za));for(var Ia=br===3?xa.length-1:xa.length,Ba=0;Ba<Ia;Ba++){Ba===1&&br!==1&&Qt.writeVarint(le(2,Ia-1));var Ka=xa[Ba].x-an,fa=xa[Ba].y-wn;Qt.writeVarint(ge(Ka)),Qt.writeVarint(ge(fa)),an+=Ka,wn+=fa}br===3&&Qt.writeVarint(le(7,1))}}function me(_r,Qt){var yr=typeof _r;yr==="string"?Qt.writeStringField(1,_r):yr==="boolean"?Qt.writeBooleanField(7,_r):yr==="number"&&(_r%1!==0?Qt.writeDoubleField(3,_r):_r<0?Qt.writeSVarintField(6,_r):Qt.writeVarintField(5,_r))}N.fromVectorTileJs=D,N.fromGeojsonVt=B,N.GeoJSONWrapper=U;function W(_r,Qt,yr,br,an,wn){if(!(an-br<=yr)){var Ln=br+an>>1;ie(_r,Qt,Ln,br,an,wn%2),W(_r,Qt,yr,br,Ln-1,wn+1),W(_r,Qt,yr,Ln+1,an,wn+1)}}function ie(_r,Qt,yr,br,an,wn){for(;an>br;){if(an-br>600){var Ln=an-br+1,Bn=yr-br+1,xa=Math.log(Ln),za=.5*Math.exp(2*xa/3),Ia=.5*Math.sqrt(xa*za*(Ln-za)/Ln)*(Bn-Ln/2<0?-1:1),Ba=Math.max(br,Math.floor(yr-Bn*za/Ln+Ia)),Ka=Math.min(an,Math.floor(yr+(Ln-Bn)*za/Ln+Ia));ie(_r,Qt,yr,Ba,Ka,wn)}var fa=Qt[2*yr+wn],Bi=br,Yi=an;for(se(_r,Qt,br,yr),Qt[2*an+wn]>fa&&se(_r,Qt,br,an);Bi<Yi;){for(se(_r,Qt,Bi,Yi),Bi++,Yi--;Qt[2*Bi+wn]<fa;)Bi++;for(;Qt[2*Yi+wn]>fa;)Yi--}Qt[2*br+wn]===fa?se(_r,Qt,br,Yi):(Yi++,se(_r,Qt,Yi,an)),Yi<=yr&&(br=Yi+1),yr<=Yi&&(an=Yi-1)}}function se(_r,Qt,yr,br){ee(_r,yr,br),ee(Qt,2*yr,2*br),ee(Qt,2*yr+1,2*br+1)}function ee(_r,Qt,yr){var br=_r[Qt];_r[Qt]=_r[yr],_r[yr]=br}function pe(_r,Qt,yr,br,an,wn,Ln){for(var Bn=[0,_r.length-1,0],xa=[],za,Ia;Bn.length;){var Ba=Bn.pop(),Ka=Bn.pop(),fa=Bn.pop();if(Ka-fa<=Ln){for(var Bi=fa;Bi<=Ka;Bi++)za=Qt[2*Bi],Ia=Qt[2*Bi+1],za>=yr&&za<=an&&Ia>=br&&Ia<=wn&&xa.push(_r[Bi]);continue}var Yi=Math.floor((fa+Ka)/2);za=Qt[2*Yi],Ia=Qt[2*Yi+1],za>=yr&&za<=an&&Ia>=br&&Ia<=wn&&xa.push(_r[Yi]);var Ht=(Ba+1)%2;(Ba===0?yr<=za:br<=Ia)&&(Bn.push(fa),Bn.push(Yi-1),Bn.push(Ht)),(Ba===0?an>=za:wn>=Ia)&&(Bn.push(Yi+1),Bn.push(Ka),Bn.push(Ht))}return xa}function oe(_r,Qt,yr,br,an,wn){for(var Ln=[0,_r.length-1,0],Bn=[],xa=an*an;Ln.length;){var za=Ln.pop(),Ia=Ln.pop(),Ba=Ln.pop();if(Ia-Ba<=wn){for(var Ka=Ba;Ka<=Ia;Ka++)Y(Qt[2*Ka],Qt[2*Ka+1],yr,br)<=xa&&Bn.push(_r[Ka]);continue}var fa=Math.floor((Ba+Ia)/2),Bi=Qt[2*fa],Yi=Qt[2*fa+1];Y(Bi,Yi,yr,br)<=xa&&Bn.push(_r[fa]);var Ht=(za+1)%2;(za===0?yr-an<=Bi:br-an<=Yi)&&(Ln.push(Ba),Ln.push(fa-1),Ln.push(Ht)),(za===0?yr+an>=Bi:br+an>=Yi)&&(Ln.push(fa+1),Ln.push(Ia),Ln.push(Ht))}return Bn}function Y(_r,Qt,yr,br){var an=_r-yr,wn=Qt-br;return an*an+wn*wn}var ce=function(_r){return _r[0]},ue=function(_r){return _r[1]},_e=function(Qt,yr,br,an,wn){yr===void 0&&(yr=ce),br===void 0&&(br=ue),an===void 0&&(an=64),wn===void 0&&(wn=Float64Array),this.nodeSize=an,this.points=Qt;for(var Ln=Qt.length<65536?Uint16Array:Uint32Array,Bn=this.ids=new Ln(Qt.length),xa=this.coords=new wn(Qt.length*2),za=0;za<Qt.length;za++)Bn[za]=za,xa[2*za]=yr(Qt[za]),xa[2*za+1]=br(Qt[za]);W(Bn,xa,an,0,Bn.length-1,0)};_e.prototype.range=function(Qt,yr,br,an){return pe(this.ids,this.coords,Qt,yr,br,an,this.nodeSize)},_e.prototype.within=function(Qt,yr,br){return oe(this.ids,this.coords,Qt,yr,br,this.nodeSize)};var Le={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(_r){return _r}},ze=function(Qt){this.options=Pe(Object.create(Le),Qt),this.trees=new Array(this.options.maxZoom+1)};ze.prototype.load=function(Qt){var yr=this.options,br=yr.log,an=yr.minZoom,wn=yr.maxZoom,Ln=yr.nodeSize;br&&console.time("total time");var Bn="prepare "+Qt.length+" points";br&&console.time(Bn),this.points=Qt;for(var xa=[],za=0;za<Qt.length;za++)Qt[za].geometry&&xa.push(Ve(Qt[za],za));this.trees[wn+1]=new _e(xa,be,Ye,Ln,Float32Array),br&&console.timeEnd(Bn);for(var Ia=wn;Ia>=an;Ia--){var Ba=+Date.now();xa=this._cluster(xa,Ia),this.trees[Ia]=new _e(xa,be,Ye,Ln,Float32Array),br&&console.log("z%d: %d clusters in %dms",Ia,xa.length,+Date.now()-Ba)}return br&&console.timeEnd("total time"),this},ze.prototype.getClusters=function(Qt,yr){var br=((Qt[0]+180)%360+360)%360-180,an=Math.max(-90,Math.min(90,Qt[1])),wn=Qt[2]===180?180:((Qt[2]+180)%360+360)%360-180,Ln=Math.max(-90,Math.min(90,Qt[3]));if(Qt[2]-Qt[0]>=360)br=-180,wn=180;else if(br>wn){var Bn=this.getClusters([br,an,180,Ln],yr),xa=this.getClusters([-180,an,wn,Ln],yr);return Bn.concat(xa)}for(var za=this.trees[this._limitZoom(yr)],Ia=za.range(_t(br),vt(Ln),_t(wn),vt(an)),Ba=[],Ka=0,fa=Ia;Ka<fa.length;Ka+=1){var Bi=fa[Ka],Yi=za.points[Bi];Ba.push(Yi.numPoints?rt(Yi):this.points[Yi.index])}return Ba},ze.prototype.getChildren=function(Qt){var yr=this._getOriginId(Qt),br=this._getOriginZoom(Qt),an="No cluster with the specified id.",wn=this.trees[br];if(!wn)throw new Error(an);var Ln=wn.points[yr];if(!Ln)throw new Error(an);for(var Bn=this.options.radius/(this.options.extent*Math.pow(2,br-1)),xa=wn.within(Ln.x,Ln.y,Bn),za=[],Ia=0,Ba=xa;Ia<Ba.length;Ia+=1){var Ka=Ba[Ia],fa=wn.points[Ka];fa.parentId===Qt&&za.push(fa.numPoints?rt(fa):this.points[fa.index])}if(za.length===0)throw new Error(an);return za},ze.prototype.getLeaves=function(Qt,yr,br){yr=yr||10,br=br||0;var an=[];return this._appendLeaves(an,Qt,yr,br,0),an},ze.prototype.getTile=function(Qt,yr,br){var an=this.trees[this._limitZoom(Qt)],wn=Math.pow(2,Qt),Ln=this.options,Bn=Ln.extent,xa=Ln.radius,za=xa/Bn,Ia=(br-za)/wn,Ba=(br+1+za)/wn,Ka={features:[]};return this._addTileFeatures(an.range((yr-za)/wn,Ia,(yr+1+za)/wn,Ba),an.points,yr,br,wn,Ka),yr===0&&this._addTileFeatures(an.range(1-za/wn,Ia,1,Ba),an.points,wn,br,wn,Ka),yr===wn-1&&this._addTileFeatures(an.range(0,Ia,za/wn,Ba),an.points,-1,br,wn,Ka),Ka.features.length?Ka:null},ze.prototype.getClusterExpansionZoom=function(Qt){for(var yr=this._getOriginZoom(Qt)-1;yr<=this.options.maxZoom;){var br=this.getChildren(Qt);if(yr++,br.length!==1)break;Qt=br[0].properties.cluster_id}return yr},ze.prototype._appendLeaves=function(Qt,yr,br,an,wn){for(var Ln=this.getChildren(yr),Bn=0,xa=Ln;Bn<xa.length;Bn+=1){var za=xa[Bn],Ia=za.properties;if(Ia&&Ia.cluster?wn+Ia.point_count<=an?wn+=Ia.point_count:wn=this._appendLeaves(Qt,Ia.cluster_id,br,an,wn):wn<an?wn++:Qt.push(za),Qt.length===br)break}return wn},ze.prototype._addTileFeatures=function(Qt,yr,br,an,wn,Ln){for(var Bn=0,xa=Qt;Bn<xa.length;Bn+=1){var za=xa[Bn],Ia=yr[za],Ba=Ia.numPoints,Ka={type:1,geometry:[[Math.round(this.options.extent*(Ia.x*wn-br)),Math.round(this.options.extent*(Ia.y*wn-an))]],tags:Ba?mt(Ia):this.points[Ia.index].properties},fa=void 0;Ba?fa=Ia.id:this.options.generateId?fa=Ia.index:this.points[Ia.index].id&&(fa=this.points[Ia.index].id),fa!==void 0&&(Ka.id=fa),Ln.features.push(Ka)}},ze.prototype._limitZoom=function(Qt){return Math.max(this.options.minZoom,Math.min(+Qt,this.options.maxZoom+1))},ze.prototype._cluster=function(Qt,yr){for(var br=[],an=this.options,wn=an.radius,Ln=an.extent,Bn=an.reduce,xa=an.minPoints,za=wn/(Ln*Math.pow(2,yr)),Ia=0;Ia<Qt.length;Ia++){var Ba=Qt[Ia];if(!(Ba.zoom<=yr)){Ba.zoom=yr;for(var Ka=this.trees[yr+1],fa=Ka.within(Ba.x,Ba.y,za),Bi=Ba.numPoints||1,Yi=Bi,Ht=0,kt=fa;Ht<kt.length;Ht+=1){var qr=kt[Ht],en=Ka.points[qr];en.zoom>yr&&(Yi+=en.numPoints||1)}if(Yi>=xa){for(var rn=Ba.x*Bi,Wr=Ba.y*Bi,tn=Bn&&Bi>1?this._map(Ba,!0):null,Tn=(Ia<<5)+(yr+1)+this.points.length,dn=0,It=fa;dn<It.length;dn+=1){var xr=It[dn],Yr=Ka.points[xr];if(!(Yr.zoom<=yr)){Yr.zoom=yr;var An=Yr.numPoints||1;rn+=Yr.x*An,Wr+=Yr.y*An,Yr.parentId=Tn,Bn&&(tn||(tn=this._map(Ba,!0)),Bn(tn,this._map(Yr)))}}Ba.parentId=Tn,br.push(Xe(rn/Yi,Wr/Yi,Tn,Yi,tn))}else if(br.push(Ba),Yi>1)for(var Zn=0,sa=fa;Zn<sa.length;Zn+=1){var oa=sa[Zn],Sn=Ka.points[oa];Sn.zoom<=yr||(Sn.zoom=yr,br.push(Sn))}}}return br},ze.prototype._getOriginId=function(Qt){return Qt-this.points.length>>5},ze.prototype._getOriginZoom=function(Qt){return(Qt-this.points.length)%32},ze.prototype._map=function(Qt,yr){if(Qt.numPoints)return yr?Pe({},Qt.properties):Qt.properties;var br=this.points[Qt.index].properties,an=this.options.map(br);return yr&&an===br?Pe({},an):an};function Xe(_r,Qt,yr,br,an){return{x:_r,y:Qt,zoom:1/0,id:yr,parentId:-1,numPoints:br,properties:an}}function Ve(_r,Qt){var yr=_r.geometry.coordinates,br=yr[0],an=yr[1];return{x:_t(br),y:vt(an),zoom:1/0,index:Qt,parentId:-1}}function rt(_r){return{type:"Feature",id:_r.id,properties:mt(_r),geometry:{type:"Point",coordinates:[ut(_r.x),Fe(_r.y)]}}}function mt(_r){var Qt=_r.numPoints,yr=Qt>=1e4?Math.round(Qt/1e3)+"k":Qt>=1e3?Math.round(Qt/100)/10+"k":Qt;return Pe(Pe({},_r.properties),{cluster:!0,cluster_id:_r.id,point_count:Qt,point_count_abbreviated:yr})}function _t(_r){return _r/360+.5}function vt(_r){var Qt=Math.sin(_r*Math.PI/180),yr=.5-.25*Math.log((1+Qt)/(1-Qt))/Math.PI;return yr<0?0:yr>1?1:yr}function ut(_r){return(_r-.5)*360}function Fe(_r){var Qt=(180-_r*360)*Math.PI/180;return 360*Math.atan(Math.exp(Qt))/Math.PI-90}function Pe(_r,Qt){for(var yr in Qt)_r[yr]=Qt[yr];return _r}function be(_r){return _r.x}function Ye(_r){return _r.y}function yt(_r,Qt,yr,br){for(var an=br,wn=yr-Qt>>1,Ln=yr-Qt,Bn,xa=_r[Qt],za=_r[Qt+1],Ia=_r[yr],Ba=_r[yr+1],Ka=Qt+3;Ka<yr;Ka+=3){var fa=wt(_r[Ka],_r[Ka+1],xa,za,Ia,Ba);if(fa>an)Bn=Ka,an=fa;else if(fa===an){var Bi=Math.abs(Ka-wn);Bi<Ln&&(Bn=Ka,Ln=Bi)}}an>br&&(Bn-Qt>3&&yt(_r,Qt,Bn,br),_r[Bn+2]=an,yr-Bn>3&&yt(_r,Bn,yr,br))}function wt(_r,Qt,yr,br,an,wn){var Ln=an-yr,Bn=wn-br;if(Ln!==0||Bn!==0){var xa=((_r-yr)*Ln+(Qt-br)*Bn)/(Ln*Ln+Bn*Bn);xa>1?(yr=an,br=wn):xa>0&&(yr+=Ln*xa,br+=Bn*xa)}return Ln=_r-yr,Bn=Qt-br,Ln*Ln+Bn*Bn}function ht(_r,Qt,yr,br){var an={id:typeof _r>"u"?null:_r,type:Qt,geometry:yr,tags:br,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return Yt(an),an}function Yt(_r){var Qt=_r.geometry,yr=_r.type;if(yr==="Point"||yr==="MultiPoint"||yr==="LineString")$t(_r,Qt);else if(yr==="Polygon"||yr==="MultiLineString")for(var br=0;br<Qt.length;br++)$t(_r,Qt[br]);else if(yr==="MultiPolygon")for(br=0;br<Qt.length;br++)for(var an=0;an<Qt[br].length;an++)$t(_r,Qt[br][an])}function $t(_r,Qt){for(var yr=0;yr<Qt.length;yr+=3)_r.minX=Math.min(_r.minX,Qt[yr]),_r.minY=Math.min(_r.minY,Qt[yr+1]),_r.maxX=Math.max(_r.maxX,Qt[yr]),_r.maxY=Math.max(_r.maxY,Qt[yr+1])}function fr(_r,Qt){var yr=[];if(_r.type==="FeatureCollection")for(var br=0;br<_r.features.length;br++)mr(yr,_r.features[br],Qt,br);else _r.type==="Feature"?mr(yr,_r,Qt):mr(yr,{geometry:_r},Qt);return yr}function mr(_r,Qt,yr,br){if(Qt.geometry){var an=Qt.geometry.coordinates,wn=Qt.geometry.type,Ln=Math.pow(yr.tolerance/((1<<yr.maxZoom)*yr.extent),2),Bn=[],xa=Qt.id;if(yr.promoteId?xa=Qt.properties[yr.promoteId]:yr.generateId&&(xa=br||0),wn==="Point")Ur(an,Bn);else if(wn==="MultiPoint")for(var za=0;za<an.length;za++)Ur(an[za],Bn);else if(wn==="LineString")jr(an,Bn,Ln,!1);else if(wn==="MultiLineString")if(yr.lineMetrics){for(za=0;za<an.length;za++)Bn=[],jr(an[za],Bn,Ln,!1),_r.push(ht(xa,"LineString",Bn,Qt.properties));return}else fn(an,Bn,Ln,!1);else if(wn==="Polygon")fn(an,Bn,Ln,!0);else if(wn==="MultiPolygon")for(za=0;za<an.length;za++){var Ia=[];fn(an[za],Ia,Ln,!0),Bn.push(Ia)}else if(wn==="GeometryCollection"){for(za=0;za<Qt.geometry.geometries.length;za++)mr(_r,{id:xa,geometry:Qt.geometry.geometries[za],properties:Qt.properties},yr,br);return}else throw new Error("Input data is not a valid GeoJSON object.");_r.push(ht(xa,wn,Bn,Qt.properties))}}function Ur(_r,Qt){Qt.push(Br(_r[0])),Qt.push(Qr(_r[1])),Qt.push(0)}function jr(_r,Qt,yr,br){for(var an,wn,Ln=0,Bn=0;Bn<_r.length;Bn++){var xa=Br(_r[Bn][0]),za=Qr(_r[Bn][1]);Qt.push(xa),Qt.push(za),Qt.push(0),Bn>0&&(br?Ln+=(an*za-xa*wn)/2:Ln+=Math.sqrt(Math.pow(xa-an,2)+Math.pow(za-wn,2))),an=xa,wn=za}var Ia=Qt.length-3;Qt[2]=1,yt(Qt,0,Ia,yr),Qt[Ia+2]=1,Qt.size=Math.abs(Ln),Qt.start=0,Qt.end=Qt.size}function fn(_r,Qt,yr,br){for(var an=0;an<_r.length;an++){var wn=[];jr(_r[an],wn,yr,br),Qt.push(wn)}}function Br(_r){return _r/360+.5}function Qr(_r){var Qt=Math.sin(_r*Math.PI/180),yr=.5-.25*Math.log((1+Qt)/(1-Qt))/Math.PI;return yr<0?0:yr>1?1:yr}function Ot(_r,Qt,yr,br,an,wn,Ln,Bn){if(yr/=Qt,br/=Qt,wn>=yr&&Ln<br)return _r;if(Ln<yr||wn>=br)return null;for(var xa=[],za=0;za<_r.length;za++){var Ia=_r[za],Ba=Ia.geometry,Ka=Ia.type,fa=an===0?Ia.minX:Ia.minY,Bi=an===0?Ia.maxX:Ia.maxY;if(fa>=yr&&Bi<br){xa.push(Ia);continue}else if(Bi<yr||fa>=br)continue;var Yi=[];if(Ka==="Point"||Ka==="MultiPoint")$e(Ba,Yi,yr,br,an);else if(Ka==="LineString")ot(Ba,Yi,yr,br,an,!1,Bn.lineMetrics);else if(Ka==="MultiLineString")Ee(Ba,Yi,yr,br,an,!1);else if(Ka==="Polygon")Ee(Ba,Yi,yr,br,an,!0);else if(Ka==="MultiPolygon")for(var Ht=0;Ht<Ba.length;Ht++){var kt=[];Ee(Ba[Ht],kt,yr,br,an,!0),kt.length&&Yi.push(kt)}if(Yi.length){if(Bn.lineMetrics&&Ka==="LineString"){for(Ht=0;Ht<Yi.length;Ht++)xa.push(ht(Ia.id,Ka,Yi[Ht],Ia.tags));continue}(Ka==="LineString"||Ka==="MultiLineString")&&(Yi.length===1?(Ka="LineString",Yi=Yi[0]):Ka="MultiLineString"),(Ka==="Point"||Ka==="MultiPoint")&&(Ka=Yi.length===3?"Point":"MultiPoint"),xa.push(ht(Ia.id,Ka,Yi,Ia.tags))}}return xa.length?xa:null}function $e(_r,Qt,yr,br,an){for(var wn=0;wn<_r.length;wn+=3){var Ln=_r[wn+an];Ln>=yr&&Ln<=br&&(Qt.push(_r[wn]),Qt.push(_r[wn+1]),Qt.push(_r[wn+2]))}}function ot(_r,Qt,yr,br,an,wn,Ln){for(var Bn=De(_r),xa=an===0?Ie:tt,za=_r.start,Ia,Ba,Ka=0;Ka<_r.length-3;Ka+=3){var fa=_r[Ka],Bi=_r[Ka+1],Yi=_r[Ka+2],Ht=_r[Ka+3],kt=_r[Ka+4],qr=an===0?fa:Bi,en=an===0?Ht:kt,rn=!1;Ln&&(Ia=Math.sqrt(Math.pow(fa-Ht,2)+Math.pow(Bi-kt,2))),qr<yr?en>yr&&(Ba=xa(Bn,fa,Bi,Ht,kt,yr),Ln&&(Bn.start=za+Ia*Ba)):qr>br?en<br&&(Ba=xa(Bn,fa,Bi,Ht,kt,br),Ln&&(Bn.start=za+Ia*Ba)):Ae(Bn,fa,Bi,Yi),en<yr&&qr>=yr&&(Ba=xa(Bn,fa,Bi,Ht,kt,yr),rn=!0),en>br&&qr<=br&&(Ba=xa(Bn,fa,Bi,Ht,kt,br),rn=!0),!wn&&rn&&(Ln&&(Bn.end=za+Ia*Ba),Qt.push(Bn),Bn=De(_r)),Ln&&(za+=Ia)}var Wr=_r.length-3;fa=_r[Wr],Bi=_r[Wr+1],Yi=_r[Wr+2],qr=an===0?fa:Bi,qr>=yr&&qr<=br&&Ae(Bn,fa,Bi,Yi),Wr=Bn.length-3,wn&&Wr>=3&&(Bn[Wr]!==Bn[0]||Bn[Wr+1]!==Bn[1])&&Ae(Bn,Bn[0],Bn[1],Bn[2]),Bn.length&&Qt.push(Bn)}function De(_r){var Qt=[];return Qt.size=_r.size,Qt.start=_r.start,Qt.end=_r.end,Qt}function Ee(_r,Qt,yr,br,an,wn){for(var Ln=0;Ln<_r.length;Ln++)ot(_r[Ln],Qt,yr,br,an,wn,!1)}function Ae(_r,Qt,yr,br){_r.push(Qt),_r.push(yr),_r.push(br)}function Ie(_r,Qt,yr,br,an,wn){var Ln=(wn-Qt)/(br-Qt);return _r.push(wn),_r.push(yr+(an-yr)*Ln),_r.push(1),Ln}function tt(_r,Qt,yr,br,an,wn){var Ln=(wn-yr)/(an-yr);return _r.push(Qt+(br-Qt)*Ln),_r.push(wn),_r.push(1),Ln}function st(_r,Qt){var yr=Qt.buffer/Qt.extent,br=_r,an=Ot(_r,1,-1-yr,yr,0,-1,2,Qt),wn=Ot(_r,1,1-yr,2+yr,0,-1,2,Qt);return(an||wn)&&(br=Ot(_r,1,-yr,1+yr,0,-1,2,Qt)||[],an&&(br=Bt(an,1).concat(br)),wn&&(br=br.concat(Bt(wn,-1)))),br}function Bt(_r,Qt){for(var yr=[],br=0;br<_r.length;br++){var an=_r[br],wn=an.type,Ln;if(wn==="Point"||wn==="MultiPoint"||wn==="LineString")Ln=Ft(an.geometry,Qt);else if(wn==="MultiLineString"||wn==="Polygon"){Ln=[];for(var Bn=0;Bn<an.geometry.length;Bn++)Ln.push(Ft(an.geometry[Bn],Qt))}else if(wn==="MultiPolygon")for(Ln=[],Bn=0;Bn<an.geometry.length;Bn++){for(var xa=[],za=0;za<an.geometry[Bn].length;za++)xa.push(Ft(an.geometry[Bn][za],Qt));Ln.push(xa)}yr.push(ht(an.id,wn,Ln,an.tags))}return yr}function Ft(_r,Qt){var yr=[];yr.size=_r.size,_r.start!==void 0&&(yr.start=_r.start,yr.end=_r.end);for(var br=0;br<_r.length;br+=3)yr.push(_r[br]+Qt,_r[br+1],_r[br+2]);return yr}function Wt(_r,Qt){if(_r.transformed)return _r;var yr=1<<_r.z,br=_r.x,an=_r.y,wn,Ln,Bn;for(wn=0;wn<_r.features.length;wn++){var xa=_r.features[wn],za=xa.geometry,Ia=xa.type;if(xa.geometry=[],Ia===1)for(Ln=0;Ln<za.length;Ln+=2)xa.geometry.push(lr(za[Ln],za[Ln+1],Qt,yr,br,an));else for(Ln=0;Ln<za.length;Ln++){var Ba=[];for(Bn=0;Bn<za[Ln].length;Bn+=2)Ba.push(lr(za[Ln][Bn],za[Ln][Bn+1],Qt,yr,br,an));xa.geometry.push(Ba)}}return _r.transformed=!0,_r}function lr(_r,Qt,yr,br,an,wn){return[Math.round(yr*(_r*br-an)),Math.round(yr*(Qt*br-wn))]}function Rr(_r,Qt,yr,br,an){for(var wn=Qt===an.maxZoom?0:an.tolerance/((1<<Qt)*an.extent),Ln={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:yr,y:br,z:Qt,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},Bn=0;Bn<_r.length;Bn++){Ln.numFeatures++,Mr(Ln,_r[Bn],wn,an);var xa=_r[Bn].minX,za=_r[Bn].minY,Ia=_r[Bn].maxX,Ba=_r[Bn].maxY;xa<Ln.minX&&(Ln.minX=xa),za<Ln.minY&&(Ln.minY=za),Ia>Ln.maxX&&(Ln.maxX=Ia),Ba>Ln.maxY&&(Ln.maxY=Ba)}return Ln}function Mr(_r,Qt,yr,br){var an=Qt.geometry,wn=Qt.type,Ln=[];if(wn==="Point"||wn==="MultiPoint")for(var Bn=0;Bn<an.length;Bn+=3)Ln.push(an[Bn]),Ln.push(an[Bn+1]),_r.numPoints++,_r.numSimplified++;else if(wn==="LineString")Sr(Ln,an,_r,yr,!1,!1);else if(wn==="MultiLineString"||wn==="Polygon")for(Bn=0;Bn<an.length;Bn++)Sr(Ln,an[Bn],_r,yr,wn==="Polygon",Bn===0);else if(wn==="MultiPolygon")for(var xa=0;xa<an.length;xa++){var za=an[xa];for(Bn=0;Bn<za.length;Bn++)Sr(Ln,za[Bn],_r,yr,!0,Bn===0)}if(Ln.length){var Ia=Qt.tags||null;if(wn==="LineString"&&br.lineMetrics){Ia={};for(var Ba in Qt.tags)Ia[Ba]=Qt.tags[Ba];Ia.mapbox_clip_start=an.start/an.size,Ia.mapbox_clip_end=an.end/an.size}var Ka={geometry:Ln,type:wn==="Polygon"||wn==="MultiPolygon"?3:wn==="LineString"||wn==="MultiLineString"?2:1,tags:Ia};Qt.id!==null&&(Ka.id=Qt.id),_r.features.push(Ka)}}function Sr(_r,Qt,yr,br,an,wn){var Ln=br*br;if(br>0&&Qt.size<(an?Ln:br)){yr.numPoints+=Qt.length/3;return}for(var Bn=[],xa=0;xa<Qt.length;xa+=3)(br===0||Qt[xa+2]>Ln)&&(yr.numSimplified++,Bn.push(Qt[xa]),Bn.push(Qt[xa+1])),yr.numPoints++;an&&Kr(Bn,wn),_r.push(Bn)}function Kr(_r,Qt){for(var yr=0,br=0,an=_r.length,wn=an-2;br<an;wn=br,br+=2)yr+=(_r[br]-_r[wn])*(_r[br+1]+_r[wn+1]);if(yr>0===Qt)for(br=0,an=_r.length;br<an/2;br+=2){var Ln=_r[br],Bn=_r[br+1];_r[br]=_r[an-2-br],_r[br+1]=_r[an-1-br],_r[an-2-br]=Ln,_r[an-1-br]=Bn}}function Hn(_r,Qt){return new ga(_r,Qt)}function ga(_r,Qt){Qt=this.options=Ta(Object.create(this.options),Qt);var yr=Qt.debug;if(yr&&console.time("preprocess data"),Qt.maxZoom<0||Qt.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(Qt.promoteId&&Qt.generateId)throw new Error("promoteId and generateId cannot be used together.");var br=fr(_r,Qt);this.tiles={},this.tileCoords=[],yr&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",Qt.indexMaxZoom,Qt.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),br=st(br,Qt),br.length&&this.splitTile(br,0,0,0),yr&&(br.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)))}ga.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},ga.prototype.splitTile=function(_r,Qt,yr,br,an,wn,Ln){for(var Bn=[_r,Qt,yr,br],xa=this.options,za=xa.debug;Bn.length;){br=Bn.pop(),yr=Bn.pop(),Qt=Bn.pop(),_r=Bn.pop();var Ia=1<<Qt,Ba=ua(Qt,yr,br),Ka=this.tiles[Ba];if(!Ka&&(za>1&&console.time("creation"),Ka=this.tiles[Ba]=Rr(_r,Qt,yr,br,xa),this.tileCoords.push({z:Qt,x:yr,y:br}),za)){za>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Qt,yr,br,Ka.numFeatures,Ka.numPoints,Ka.numSimplified),console.timeEnd("creation"));var fa="z"+Qt;this.stats[fa]=(this.stats[fa]||0)+1,this.total++}if(Ka.source=_r,an){if(Qt===xa.maxZoom||Qt===an)continue;var Bi=1<<an-Qt;if(yr!==Math.floor(wn/Bi)||br!==Math.floor(Ln/Bi))continue}else if(Qt===xa.indexMaxZoom||Ka.numPoints<=xa.indexMaxPoints)continue;if(Ka.source=null,_r.length!==0){za>1&&console.time("clipping");var Yi=.5*xa.buffer/xa.extent,Ht=.5-Yi,kt=.5+Yi,qr=1+Yi,en,rn,Wr,tn,Tn,dn;en=rn=Wr=tn=null,Tn=Ot(_r,Ia,yr-Yi,yr+kt,0,Ka.minX,Ka.maxX,xa),dn=Ot(_r,Ia,yr+Ht,yr+qr,0,Ka.minX,Ka.maxX,xa),_r=null,Tn&&(en=Ot(Tn,Ia,br-Yi,br+kt,1,Ka.minY,Ka.maxY,xa),rn=Ot(Tn,Ia,br+Ht,br+qr,1,Ka.minY,Ka.maxY,xa),Tn=null),dn&&(Wr=Ot(dn,Ia,br-Yi,br+kt,1,Ka.minY,Ka.maxY,xa),tn=Ot(dn,Ia,br+Ht,br+qr,1,Ka.minY,Ka.maxY,xa),dn=null),za>1&&console.timeEnd("clipping"),Bn.push(en||[],Qt+1,yr*2,br*2),Bn.push(rn||[],Qt+1,yr*2,br*2+1),Bn.push(Wr||[],Qt+1,yr*2+1,br*2),Bn.push(tn||[],Qt+1,yr*2+1,br*2+1)}}},ga.prototype.getTile=function(_r,Qt,yr){var br=this.options,an=br.extent,wn=br.debug;if(_r<0||_r>24)return null;var Ln=1<<_r;Qt=(Qt%Ln+Ln)%Ln;var Bn=ua(_r,Qt,yr);if(this.tiles[Bn])return Wt(this.tiles[Bn],an);wn>1&&console.log("drilling down to z%d-%d-%d",_r,Qt,yr);for(var xa=_r,za=Qt,Ia=yr,Ba;!Ba&&xa>0;)xa--,za=Math.floor(za/2),Ia=Math.floor(Ia/2),Ba=this.tiles[ua(xa,za,Ia)];return!Ba||!Ba.source?null:(wn>1&&console.log("found parent tile z%d-%d-%d",xa,za,Ia),wn>1&&console.time("drilling down"),this.splitTile(Ba.source,xa,za,Ia,_r,Qt,yr),wn>1&&console.timeEnd("drilling down"),this.tiles[Bn]?Wt(this.tiles[Bn],an):null)};function ua(_r,Qt,yr){return((1<<_r)*yr+Qt)*32+_r}function Ta(_r,Qt){for(var yr in Qt)_r[yr]=Qt[yr];return _r}function Aa(_r,Qt){var yr=_r.tileID.canonical;if(!this._geoJSONIndex)return Qt(null,null);var br=this._geoJSONIndex.getTile(yr.z,yr.x,yr.y);if(!br)return Qt(null,null);var an=new A(br.features),wn=N(an);(wn.byteOffset!==0||wn.byteLength!==wn.buffer.byteLength)&&(wn=new Uint8Array(wn)),Qt(null,{vectorTile:an,rawData:wn.buffer})}var ia=(function(_r){function Qt(yr,br,an,wn){_r.call(this,yr,br,an,Aa),wn&&(this.loadGeoJSON=wn)}return _r&&(Qt.__proto__=_r),Qt.prototype=Object.create(_r&&_r.prototype),Qt.prototype.constructor=Qt,Qt.prototype.loadData=function(br,an){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=an,this._pendingLoadDataParams=br,this._state&&this._state!=="Idle"?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},Qt.prototype._loadData=function(){var br=this;if(!(!this._pendingCallback||!this._pendingLoadDataParams)){var an=this._pendingCallback,wn=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var Ln=wn&&wn.request&&wn.request.collectResourceTiming?new t.RequestPerformance(wn.request):!1;this.loadGeoJSON(wn,function(Bn,xa){if(Bn||!xa)return an(Bn);if(typeof xa!="object")return an(new Error("Input data given to '"+wn.source+"' is not a valid GeoJSON object."));c(xa,!0);try{if(wn.filter){var za=t.createExpression(wn.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(za.result==="error")throw new Error(za.value.map(function(fa){return fa.key+": "+fa.message}).join(", "));var Ia=xa.features.filter(function(fa){return za.value.evaluate({zoom:0},fa)});xa={type:"FeatureCollection",features:Ia}}br._geoJSONIndex=wn.cluster?new ze($a(wn)).load(xa.features):Hn(xa,wn.geojsonVtOptions)}catch(fa){return an(fa)}br.loaded={};var Ba={};if(Ln){var Ka=Ln.finish();Ka&&(Ba.resourceTiming={},Ba.resourceTiming[wn.source]=JSON.parse(JSON.stringify(Ka)))}an(null,Ba)})}},Qt.prototype.coalesce=function(){this._state==="Coalescing"?this._state="Idle":this._state==="NeedsLoadData"&&(this._state="Coalescing",this._loadData())},Qt.prototype.reloadTile=function(br,an){var wn=this.loaded,Ln=br.uid;return wn&&wn[Ln]?_r.prototype.reloadTile.call(this,br,an):this.loadTile(br,an)},Qt.prototype.loadGeoJSON=function(br,an){if(br.request)t.getJSON(br.request,an);else if(typeof br.data=="string")try{return an(null,JSON.parse(br.data))}catch{return an(new Error("Input data given to '"+br.source+"' is not a valid GeoJSON object."))}else return an(new Error("Input data given to '"+br.source+"' is not a valid GeoJSON object."))},Qt.prototype.removeSource=function(br,an){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),an()},Qt.prototype.getClusterExpansionZoom=function(br,an){try{an(null,this._geoJSONIndex.getClusterExpansionZoom(br.clusterId))}catch(wn){an(wn)}},Qt.prototype.getClusterChildren=function(br,an){try{an(null,this._geoJSONIndex.getChildren(br.clusterId))}catch(wn){an(wn)}},Qt.prototype.getClusterLeaves=function(br,an){try{an(null,this._geoJSONIndex.getLeaves(br.clusterId,br.limit,br.offset))}catch(wn){an(wn)}},Qt})(g);function $a(_r){var Qt=_r.superclusterOptions,yr=_r.clusterProperties;if(!yr||!Qt)return Qt;for(var br={},an={},wn={accumulated:null,zoom:0},Ln={properties:null},Bn=Object.keys(yr),xa=0,za=Bn;xa<za.length;xa+=1){var Ia=za[xa],Ba=yr[Ia],Ka=Ba[0],fa=Ba[1],Bi=t.createExpression(fa),Yi=t.createExpression(typeof Ka=="string"?[Ka,["accumulated"],["get",Ia]]:Ka);br[Ia]=Bi.value,an[Ia]=Yi.value}return Qt.map=function(Ht){Ln.properties=Ht;for(var kt={},qr=0,en=Bn;qr<en.length;qr+=1){var rn=en[qr];kt[rn]=br[rn].evaluate(wn,Ln)}return kt},Qt.reduce=function(Ht,kt){Ln.properties=kt;for(var qr=0,en=Bn;qr<en.length;qr+=1){var rn=en[qr];wn.accumulated=Ht[rn],Ht[rn]=an[rn].evaluate(wn,Ln)}},Qt}var ci=function(Qt){var yr=this;this.self=Qt,this.actor=new t.Actor(Qt,this),this.layerIndexes={},this.availableImages={},this.workerSourceTypes={vector:g,geojson:ia},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=function(br,an){if(yr.workerSourceTypes[br])throw new Error('Worker source with name "'+br+'" already registered.');yr.workerSourceTypes[br]=an},this.self.registerRTLTextPlugin=function(br){if(t.plugin.isParsed())throw new Error("RTL text plugin already registered.");t.plugin.applyArabicShaping=br.applyArabicShaping,t.plugin.processBidirectionalText=br.processBidirectionalText,t.plugin.processStyledBidirectionalText=br.processStyledBidirectionalText}};return ci.prototype.setReferrer=function(Qt,yr){this.referrer=yr},ci.prototype.setImages=function(Qt,yr,br){this.availableImages[Qt]=yr;for(var an in this.workerSources[Qt]){var wn=this.workerSources[Qt][an];for(var Ln in wn)wn[Ln].availableImages=yr}br()},ci.prototype.setLayers=function(Qt,yr,br){this.getLayerIndex(Qt).replace(yr),br()},ci.prototype.updateLayers=function(Qt,yr,br){this.getLayerIndex(Qt).update(yr.layers,yr.removedIds),br()},ci.prototype.loadTile=function(Qt,yr,br){this.getWorkerSource(Qt,yr.type,yr.source).loadTile(yr,br)},ci.prototype.loadDEMTile=function(Qt,yr,br){this.getDEMWorkerSource(Qt,yr.source).loadTile(yr,br)},ci.prototype.reloadTile=function(Qt,yr,br){this.getWorkerSource(Qt,yr.type,yr.source).reloadTile(yr,br)},ci.prototype.abortTile=function(Qt,yr,br){this.getWorkerSource(Qt,yr.type,yr.source).abortTile(yr,br)},ci.prototype.removeTile=function(Qt,yr,br){this.getWorkerSource(Qt,yr.type,yr.source).removeTile(yr,br)},ci.prototype.removeDEMTile=function(Qt,yr){this.getDEMWorkerSource(Qt,yr.source).removeTile(yr)},ci.prototype.removeSource=function(Qt,yr,br){if(!(!this.workerSources[Qt]||!this.workerSources[Qt][yr.type]||!this.workerSources[Qt][yr.type][yr.source])){var an=this.workerSources[Qt][yr.type][yr.source];delete this.workerSources[Qt][yr.type][yr.source],an.removeSource!==void 0?an.removeSource(yr,br):br()}},ci.prototype.loadWorkerSource=function(Qt,yr,br){try{this.self.importScripts(yr.url),br()}catch(an){br(an.toString())}},ci.prototype.syncRTLPluginState=function(Qt,yr,br){try{t.plugin.setState(yr);var an=t.plugin.getPluginURL();if(t.plugin.isLoaded()&&!t.plugin.isParsed()&&an!=null){this.self.importScripts(an);var wn=t.plugin.isParsed(),Ln=wn?void 0:new Error("RTL Text Plugin failed to import scripts from "+an);br(Ln,wn)}}catch(Bn){br(Bn.toString())}},ci.prototype.getAvailableImages=function(Qt){var yr=this.availableImages[Qt];return yr||(yr=[]),yr},ci.prototype.getLayerIndex=function(Qt){var yr=this.layerIndexes[Qt];return yr||(yr=this.layerIndexes[Qt]=new i),yr},ci.prototype.getWorkerSource=function(Qt,yr,br){var an=this;if(this.workerSources[Qt]||(this.workerSources[Qt]={}),this.workerSources[Qt][yr]||(this.workerSources[Qt][yr]={}),!this.workerSources[Qt][yr][br]){var wn={send:function(Ln,Bn,xa){an.actor.send(Ln,Bn,xa,Qt)}};this.workerSources[Qt][yr][br]=new this.workerSourceTypes[yr](wn,this.getLayerIndex(Qt),this.getAvailableImages(Qt))}return this.workerSources[Qt][yr][br]},ci.prototype.getDEMWorkerSource=function(Qt,yr){return this.demWorkerSources[Qt]||(this.demWorkerSources[Qt]={}),this.demWorkerSources[Qt][yr]||(this.demWorkerSources[Qt][yr]=new E),this.demWorkerSources[Qt][yr]},ci.prototype.enforceCacheSizeLimit=function(Qt,yr){t.enforceCacheSizeLimit(yr)},typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope&&(self.worker=new ci(self)),ci}),P(["./shared"],function(t){var r=t.createCommonjsModule(function(Me){Me.exports?Me.exports=X:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=X,window.mapboxgl.notSupportedReason=ye);function X(Zt){return!ye(Zt)}function ye(Zt){if(!ne())return"not a browser";if(!Se())return"insufficent Array support";if(!Je())return"insufficient Function support";if(!xt())return"insufficient Object support";if(!At())return"insufficient JSON support";if(!it())return"insufficient worker support";if(!pt())return"insufficient Uint8ClampedArray support";if(!Rt())return"insufficient ArrayBuffer support";if(!or())return"insufficient Canvas/getImageData support";if(!ur(Zt&&Zt.failIfMajorPerformanceCaveat))return"insufficient WebGL support"}function ne(){return typeof window<"u"&&typeof document<"u"}function Se(){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 Je(){return Function.prototype&&Function.prototype.bind}function xt(){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 At(){return"JSON"in window&&"parse"in JSON&&"stringify"in JSON}function it(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var Zt=new Blob([""],{type:"text/javascript"}),ar=URL.createObjectURL(Zt),tr,Zr;try{Zr=new Worker(ar),tr=!0}catch{tr=!1}return Zr&&Zr.terminate(),URL.revokeObjectURL(ar),tr}function pt(){return"Uint8ClampedArray"in window}function Rt(){return ArrayBuffer.isView}function or(){var Zt=document.createElement("canvas");Zt.width=Zt.height=1;var ar=Zt.getContext("2d");if(!ar)return!1;var tr=ar.getImageData(0,0,1,1);return tr&&tr.width===Zt.width}var er={};function ur(Zt){return er[Zt]===void 0&&(er[Zt]=vr(Zt)),er[Zt]}X.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0};function gr(Zt){var ar=document.createElement("canvas"),tr=Object.create(X.webGLContextAttributes);return tr.failIfMajorPerformanceCaveat=Zt,ar.probablySupportsContext?ar.probablySupportsContext("webgl",tr)||ar.probablySupportsContext("experimental-webgl",tr):ar.supportsContext?ar.supportsContext("webgl",tr)||ar.supportsContext("experimental-webgl",tr):ar.getContext("webgl",tr)||ar.getContext("experimental-webgl",tr)}function vr(Zt){var ar=gr(Zt);if(!ar)return!1;var tr=ar.createShader(ar.VERTEX_SHADER);return!tr||ar.isContextLost()?!1:(ar.shaderSource(tr,"void main() {}"),ar.compileShader(tr),ar.getShaderParameter(tr,ar.COMPILE_STATUS)===!0)}}),a={};a.create=function(Me,X,ye){var ne=t.window.document.createElement(Me);return X!==void 0&&(ne.className=X),ye&&ye.appendChild(ne),ne},a.createNS=function(Me,X){var ye=t.window.document.createElementNS(Me,X);return ye};var l=t.window.document&&t.window.document.documentElement.style;function i(Me){if(!l)return Me[0];for(var X=0;X<Me.length;X++)if(Me[X]in l)return Me[X];return Me[0]}var s=i(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]),o;a.disableDrag=function(){l&&s&&(o=l[s],l[s]="none")},a.enableDrag=function(){l&&s&&(l[s]=o)};var u=i(["transform","WebkitTransform"]);a.setTransform=function(Me,X){Me.style[u]=X};var d=!1;try{var h=Object.defineProperty({},"passive",{get:function(){d=!0}});t.window.addEventListener("test",h,h),t.window.removeEventListener("test",h,h)}catch{d=!1}a.addEventListener=function(Me,X,ye,ne){ne===void 0&&(ne={}),"passive"in ne&&d?Me.addEventListener(X,ye,ne):Me.addEventListener(X,ye,ne.capture)},a.removeEventListener=function(Me,X,ye,ne){ne===void 0&&(ne={}),"passive"in ne&&d?Me.removeEventListener(X,ye,ne):Me.removeEventListener(X,ye,ne.capture)};var g=function(Me){Me.preventDefault(),Me.stopPropagation(),t.window.removeEventListener("click",g,!0)};a.suppressClick=function(){t.window.addEventListener("click",g,!0),t.window.setTimeout(function(){t.window.removeEventListener("click",g,!0)},0)},a.mousePos=function(Me,X){var ye=Me.getBoundingClientRect();return new t.Point(X.clientX-ye.left-Me.clientLeft,X.clientY-ye.top-Me.clientTop)},a.touchPos=function(Me,X){for(var ye=Me.getBoundingClientRect(),ne=[],Se=0;Se<X.length;Se++)ne.push(new t.Point(X[Se].clientX-ye.left-Me.clientLeft,X[Se].clientY-ye.top-Me.clientTop));return ne},a.mouseButton=function(Me){return typeof t.window.InstallTrigger<"u"&&Me.button===2&&Me.ctrlKey&&t.window.navigator.platform.toUpperCase().indexOf("MAC")>=0?0:Me.button},a.remove=function(Me){Me.parentNode&&Me.parentNode.removeChild(Me)};function m(Me,X,ye){var ne,Se,Je,xt=t.browser.devicePixelRatio>1?"@2x":"",At=t.getJSON(X.transformRequest(X.normalizeSpriteURL(Me,xt,".json"),t.ResourceType.SpriteJSON),function(Rt,or){At=null,Je||(Je=Rt,ne=or,pt())}),it=t.getImage(X.transformRequest(X.normalizeSpriteURL(Me,xt,".png"),t.ResourceType.SpriteImage),function(Rt,or){it=null,Je||(Je=Rt,Se=or,pt())});function pt(){if(Je)ye(Je);else if(ne&&Se){var Rt=t.browser.getImageData(Se),or={};for(var er in ne){var ur=ne[er],gr=ur.width,vr=ur.height,Zt=ur.x,ar=ur.y,tr=ur.sdf,Zr=ur.pixelRatio,un=ur.stretchX,En=ur.stretchY,ka=ur.content,ma=new t.RGBAImage({width:gr,height:vr});t.RGBAImage.copy(Rt,ma,{x:Zt,y:ar},{x:0,y:0},{width:gr,height:vr}),or[er]={data:ma,pixelRatio:Zr,sdf:tr,stretchX:un,stretchY:En,content:ka}}ye(null,or)}}return{cancel:function(){At&&(At.cancel(),At=null),it&&(it.cancel(),it=null)}}}function E(Me){var X=Me.userImage;if(X&&X.render){var ye=X.render();if(ye)return Me.data.replace(new Uint8Array(X.data.buffer)),!0}return!1}var c=1,_=(function(Me){function X(){Me.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new t.RGBAImage({width:1,height:1}),this.dirty=!0}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.isLoaded=function(){return this.loaded},X.prototype.setLoaded=function(ne){if(this.loaded!==ne&&(this.loaded=ne,ne)){for(var Se=0,Je=this.requestors;Se<Je.length;Se+=1){var xt=Je[Se],At=xt.ids,it=xt.callback;this._notify(At,it)}this.requestors=[]}},X.prototype.getImage=function(ne){return this.images[ne]},X.prototype.addImage=function(ne,Se){this._validate(ne,Se)&&(this.images[ne]=Se)},X.prototype._validate=function(ne,Se){var Je=!0;return this._validateStretch(Se.stretchX,Se.data&&Se.data.width)||(this.fire(new t.ErrorEvent(new Error('Image "'+ne+'" has invalid "stretchX" value'))),Je=!1),this._validateStretch(Se.stretchY,Se.data&&Se.data.height)||(this.fire(new t.ErrorEvent(new Error('Image "'+ne+'" has invalid "stretchY" value'))),Je=!1),this._validateContent(Se.content,Se)||(this.fire(new t.ErrorEvent(new Error('Image "'+ne+'" has invalid "content" value'))),Je=!1),Je},X.prototype._validateStretch=function(ne,Se){if(!ne)return!0;for(var Je=0,xt=0,At=ne;xt<At.length;xt+=1){var it=At[xt];if(it[0]<Je||it[1]<it[0]||Se<it[1])return!1;Je=it[1]}return!0},X.prototype._validateContent=function(ne,Se){return ne?!(ne.length!==4||ne[0]<0||Se.data.width<ne[0]||ne[1]<0||Se.data.height<ne[1]||ne[2]<0||Se.data.width<ne[2]||ne[3]<0||Se.data.height<ne[3]||ne[2]<ne[0]||ne[3]<ne[1]):!0},X.prototype.updateImage=function(ne,Se){var Je=this.images[ne];Se.version=Je.version+1,this.images[ne]=Se,this.updatedImages[ne]=!0},X.prototype.removeImage=function(ne){var Se=this.images[ne];delete this.images[ne],delete this.patterns[ne],Se.userImage&&Se.userImage.onRemove&&Se.userImage.onRemove()},X.prototype.listImages=function(){return Object.keys(this.images)},X.prototype.getImages=function(ne,Se){var Je=!0;if(!this.isLoaded())for(var xt=0,At=ne;xt<At.length;xt+=1){var it=At[xt];this.images[it]||(Je=!1)}this.isLoaded()||Je?this._notify(ne,Se):this.requestors.push({ids:ne,callback:Se})},X.prototype._notify=function(ne,Se){for(var Je={},xt=0,At=ne;xt<At.length;xt+=1){var it=At[xt];this.images[it]||this.fire(new t.Event("styleimagemissing",{id:it}));var pt=this.images[it];pt?Je[it]={data:pt.data.clone(),pixelRatio:pt.pixelRatio,sdf:pt.sdf,version:pt.version,stretchX:pt.stretchX,stretchY:pt.stretchY,content:pt.content,hasRenderCallback:!!(pt.userImage&&pt.userImage.render)}:t.warnOnce('Image "'+it+'" 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.')}Se(null,Je)},X.prototype.getPixelSize=function(){var ne=this.atlasImage,Se=ne.width,Je=ne.height;return{width:Se,height:Je}},X.prototype.getPattern=function(ne){var Se=this.patterns[ne],Je=this.getImage(ne);if(!Je)return null;if(Se&&Se.position.version===Je.version)return Se.position;if(Se)Se.position.version=Je.version;else{var xt=Je.data.width+c*2,At=Je.data.height+c*2,it={w:xt,h:At,x:0,y:0},pt=new t.ImagePosition(it,Je);this.patterns[ne]={bin:it,position:pt}}return this._updatePatternAtlas(),this.patterns[ne].position},X.prototype.bind=function(ne){var Se=ne.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new t.Texture(ne,this.atlasImage,Se.RGBA),this.atlasTexture.bind(Se.LINEAR,Se.CLAMP_TO_EDGE)},X.prototype._updatePatternAtlas=function(){var ne=[];for(var Se in this.patterns)ne.push(this.patterns[Se].bin);var Je=t.potpack(ne),xt=Je.w,At=Je.h,it=this.atlasImage;it.resize({width:xt||1,height:At||1});for(var pt in this.patterns){var Rt=this.patterns[pt],or=Rt.bin,er=or.x+c,ur=or.y+c,gr=this.images[pt].data,vr=gr.width,Zt=gr.height;t.RGBAImage.copy(gr,it,{x:0,y:0},{x:er,y:ur},{width:vr,height:Zt}),t.RGBAImage.copy(gr,it,{x:0,y:Zt-1},{x:er,y:ur-1},{width:vr,height:1}),t.RGBAImage.copy(gr,it,{x:0,y:0},{x:er,y:ur+Zt},{width:vr,height:1}),t.RGBAImage.copy(gr,it,{x:vr-1,y:0},{x:er-1,y:ur},{width:1,height:Zt}),t.RGBAImage.copy(gr,it,{x:0,y:0},{x:er+vr,y:ur},{width:1,height:Zt})}this.dirty=!0},X.prototype.beginFrame=function(){this.callbackDispatchedThisFrame={}},X.prototype.dispatchRenderCallbacks=function(ne){for(var Se=0,Je=ne;Se<Je.length;Se+=1){var xt=Je[Se];if(!this.callbackDispatchedThisFrame[xt]){this.callbackDispatchedThisFrame[xt]=!0;var At=this.images[xt],it=E(At);it&&this.updateImage(xt,At)}}},X})(t.Evented);function T(Me,X,ye,ne,Se){var Je=X*256,xt=Je+255,At=ne.transformRequest(ne.normalizeGlyphsURL(ye).replace("{fontstack}",Me).replace("{range}",Je+"-"+xt),t.ResourceType.Glyphs);t.getArrayBuffer(At,function(it,pt){if(it)Se(it);else if(pt){for(var Rt={},or=0,er=t.parseGlyphPBF(pt);or<er.length;or+=1){var ur=er[or];Rt[ur.id]=ur}Se(null,Rt)}})}var M=A,k=A,b=1e20;function A(Me,X,ye,ne,Se,Je){this.fontSize=Me||24,this.buffer=X===void 0?3:X,this.cutoff=ne||.25,this.fontFamily=Se||"sans-serif",this.fontWeight=Je||"normal",this.radius=ye||8;var xt=this.size=this.fontSize+this.buffer*2;this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=xt,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(xt*xt),this.gridInner=new Float64Array(xt*xt),this.f=new Float64Array(xt),this.d=new Float64Array(xt),this.z=new Float64Array(xt+1),this.v=new Int16Array(xt),this.middle=Math.round(xt/2*(navigator.userAgent.indexOf("Gecko/")>=0?1.2:1))}A.prototype.draw=function(Me){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(Me,this.buffer,this.middle);for(var X=this.ctx.getImageData(0,0,this.size,this.size),ye=new Uint8ClampedArray(this.size*this.size),ne=0;ne<this.size*this.size;ne++){var Se=X.data[ne*4+3]/255;this.gridOuter[ne]=Se===1?0:Se===0?b:Math.pow(Math.max(0,.5-Se),2),this.gridInner[ne]=Se===1?b:Se===0?0:Math.pow(Math.max(0,Se-.5),2)}for(y(this.gridOuter,this.size,this.size,this.f,this.d,this.v,this.z),y(this.gridInner,this.size,this.size,this.f,this.d,this.v,this.z),ne=0;ne<this.size*this.size;ne++){var Je=this.gridOuter[ne]-this.gridInner[ne];ye[ne]=Math.max(0,Math.min(255,Math.round(255-255*(Je/this.radius+this.cutoff))))}return ye};function y(Me,X,ye,ne,Se,Je,xt){for(var At=0;At<X;At++){for(var it=0;it<ye;it++)ne[it]=Me[it*X+At];for(f(ne,Se,Je,xt,ye),it=0;it<ye;it++)Me[it*X+At]=Se[it]}for(it=0;it<ye;it++){for(At=0;At<X;At++)ne[At]=Me[it*X+At];for(f(ne,Se,Je,xt,X),At=0;At<X;At++)Me[it*X+At]=Math.sqrt(Se[At])}}function f(Me,X,ye,ne,Se){ye[0]=0,ne[0]=-b,ne[1]=+b;for(var Je=1,xt=0;Je<Se;Je++){for(var At=(Me[Je]+Je*Je-(Me[ye[xt]]+ye[xt]*ye[xt]))/(2*Je-2*ye[xt]);At<=ne[xt];)xt--,At=(Me[Je]+Je*Je-(Me[ye[xt]]+ye[xt]*ye[xt]))/(2*Je-2*ye[xt]);xt++,ye[xt]=Je,ne[xt]=At,ne[xt+1]=+b}for(Je=0,xt=0;Je<Se;Je++){for(;ne[xt+1]<Je;)xt++;X[Je]=(Je-ye[xt])*(Je-ye[xt])+Me[ye[xt]]}}M.default=k;var p=function(X,ye){this.requestManager=X,this.localIdeographFontFamily=ye,this.entries={}};p.prototype.setURL=function(X){this.url=X},p.prototype.getGlyphs=function(X,ye){var ne=this,Se=[];for(var Je in X)for(var xt=0,At=X[Je];xt<At.length;xt+=1){var it=At[xt];Se.push({stack:Je,id:it})}t.asyncAll(Se,function(pt,Rt){var or=pt.stack,er=pt.id,ur=ne.entries[or];ur||(ur=ne.entries[or]={glyphs:{},requests:{},ranges:{}});var gr=ur.glyphs[er];if(gr!==void 0){Rt(null,{stack:or,id:er,glyph:gr});return}if(gr=ne._tinySDF(ur,or,er),gr){ur.glyphs[er]=gr,Rt(null,{stack:or,id:er,glyph:gr});return}var vr=Math.floor(er/256);if(vr*256>65535){Rt(new Error("glyphs > 65535 not supported"));return}if(ur.ranges[vr]){Rt(null,{stack:or,id:er,glyph:gr});return}var Zt=ur.requests[vr];Zt||(Zt=ur.requests[vr]=[],p.loadGlyphRange(or,vr,ne.url,ne.requestManager,function(ar,tr){if(tr){for(var Zr in tr)ne._doesCharSupportLocalGlyph(+Zr)||(ur.glyphs[+Zr]=tr[+Zr]);ur.ranges[vr]=!0}for(var un=0,En=Zt;un<En.length;un+=1){var ka=En[un];ka(ar,tr)}delete ur.requests[vr]})),Zt.push(function(ar,tr){ar?Rt(ar):tr&&Rt(null,{stack:or,id:er,glyph:tr[er]||null})})},function(pt,Rt){if(pt)ye(pt);else if(Rt){for(var or={},er=0,ur=Rt;er<ur.length;er+=1){var gr=ur[er],vr=gr.stack,Zt=gr.id,ar=gr.glyph;(or[vr]||(or[vr]={}))[Zt]=ar&&{id:ar.id,bitmap:ar.bitmap.clone(),metrics:ar.metrics}}ye(null,or)}})},p.prototype._doesCharSupportLocalGlyph=function(X){return!!this.localIdeographFontFamily&&(t.isChar["CJK Unified Ideographs"](X)||t.isChar["Hangul Syllables"](X)||t.isChar.Hiragana(X)||t.isChar.Katakana(X))},p.prototype._tinySDF=function(X,ye,ne){var Se=this.localIdeographFontFamily;if(Se&&this._doesCharSupportLocalGlyph(ne)){var Je=X.tinySDF;if(!Je){var xt="400";/bold/i.test(ye)?xt="900":/medium/i.test(ye)?xt="500":/light/i.test(ye)&&(xt="200"),Je=X.tinySDF=new p.TinySDF(24,3,8,.25,Se,xt)}return{id:ne,bitmap:new t.AlphaImage({width:30,height:30},Je.draw(String.fromCharCode(ne))),metrics:{width:24,height:24,left:0,top:-8,advance:24}}}},p.loadGlyphRange=T,p.TinySDF=M;var x=function(){this.specification=t.styleSpec.light.position};x.prototype.possiblyEvaluate=function(X,ye){return t.sphericalToCartesian(X.expression.evaluate(ye))},x.prototype.interpolate=function(X,ye,ne){return{x:t.number(X.x,ye.x,ne),y:t.number(X.y,ye.y,ne),z:t.number(X.z,ye.z,ne)}};var N=new t.Properties({anchor:new t.DataConstantProperty(t.styleSpec.light.anchor),position:new x,color:new t.DataConstantProperty(t.styleSpec.light.color),intensity:new t.DataConstantProperty(t.styleSpec.light.intensity)}),D="-transition",B=(function(Me){function X(ye){Me.call(this),this._transitionable=new t.Transitionable(N),this.setLight(ye),this._transitioning=this._transitionable.untransitioned()}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getLight=function(){return this._transitionable.serialize()},X.prototype.setLight=function(ne,Se){if(Se===void 0&&(Se={}),!this._validate(t.validateLight,ne,Se))for(var Je in ne){var xt=ne[Je];t.endsWith(Je,D)?this._transitionable.setTransition(Je.slice(0,-D.length),xt):this._transitionable.setValue(Je,xt)}},X.prototype.updateTransitions=function(ne){this._transitioning=this._transitionable.transitioned(ne,this._transitioning)},X.prototype.hasTransition=function(){return this._transitioning.hasTransition()},X.prototype.recalculate=function(ne){this.properties=this._transitioning.possiblyEvaluate(ne)},X.prototype._validate=function(ne,Se,Je){return Je&&Je.validate===!1?!1:t.emitValidationErrors(this,ne.call(t.validateStyle,t.extend({value:Se,style:{glyphs:!0,sprite:!0},styleSpec:t.styleSpec})))},X})(t.Evented),U=function(X,ye){this.width=X,this.height=ye,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}};U.prototype.getDash=function(X,ye){var ne=X.join(",")+String(ye);return this.dashEntry[ne]||(this.dashEntry[ne]=this.addDash(X,ye)),this.dashEntry[ne]},U.prototype.getDashRanges=function(X,ye,ne){var Se=X.length%2===1,Je=[],xt=Se?-X[X.length-1]*ne:0,At=X[0]*ne,it=!0;Je.push({left:xt,right:At,isDash:it,zeroLength:X[0]===0});for(var pt=X[0],Rt=1;Rt<X.length;Rt++){it=!it;var or=X[Rt];xt=pt*ne,pt+=or,At=pt*ne,Je.push({left:xt,right:At,isDash:it,zeroLength:or===0})}return Je},U.prototype.addRoundDash=function(X,ye,ne){for(var Se=ye/2,Je=-ne;Je<=ne;Je++)for(var xt=this.nextRow+ne+Je,At=this.width*xt,it=0,pt=X[it],Rt=0;Rt<this.width;Rt++){Rt/pt.right>1&&(pt=X[++it]);var or=Math.abs(Rt-pt.left),er=Math.abs(Rt-pt.right),ur=Math.min(or,er),gr=void 0,vr=Je/ne*(Se+1);if(pt.isDash){var Zt=Se-Math.abs(vr);gr=Math.sqrt(ur*ur+Zt*Zt)}else gr=Se-Math.sqrt(ur*ur+vr*vr);this.data[At+Rt]=Math.max(0,Math.min(255,gr+128))}},U.prototype.addRegularDash=function(X){for(var ye=X.length-1;ye>=0;--ye){var ne=X[ye],Se=X[ye+1];ne.zeroLength?X.splice(ye,1):Se&&Se.isDash===ne.isDash&&(Se.left=ne.left,X.splice(ye,1))}var Je=X[0],xt=X[X.length-1];Je.isDash===xt.isDash&&(Je.left=xt.left-this.width,xt.right=Je.right+this.width);for(var At=this.width*this.nextRow,it=0,pt=X[it],Rt=0;Rt<this.width;Rt++){Rt/pt.right>1&&(pt=X[++it]);var or=Math.abs(Rt-pt.left),er=Math.abs(Rt-pt.right),ur=Math.min(or,er),gr=pt.isDash?ur:-ur;this.data[At+Rt]=Math.max(0,Math.min(255,gr+128))}},U.prototype.addDash=function(X,ye){var ne=ye?7:0,Se=2*ne+1;if(this.nextRow+Se>this.height)return t.warnOnce("LineAtlas out of space"),null;for(var Je=0,xt=0;xt<X.length;xt++)Je+=X[xt];if(Je!==0){var At=this.width/Je,it=this.getDashRanges(X,this.width,At);ye?this.addRoundDash(it,At,ne):this.addRegularDash(it)}var pt={y:(this.nextRow+ne+.5)/this.height,height:2*ne/this.height,width:Je};return this.nextRow+=Se,this.dirty=!0,pt},U.prototype.bind=function(X){var ye=X.gl;this.texture?(ye.bindTexture(ye.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,ye.texSubImage2D(ye.TEXTURE_2D,0,0,0,this.width,this.height,ye.ALPHA,ye.UNSIGNED_BYTE,this.data))):(this.texture=ye.createTexture(),ye.bindTexture(ye.TEXTURE_2D,this.texture),ye.texParameteri(ye.TEXTURE_2D,ye.TEXTURE_WRAP_S,ye.REPEAT),ye.texParameteri(ye.TEXTURE_2D,ye.TEXTURE_WRAP_T,ye.REPEAT),ye.texParameteri(ye.TEXTURE_2D,ye.TEXTURE_MIN_FILTER,ye.LINEAR),ye.texParameteri(ye.TEXTURE_2D,ye.TEXTURE_MAG_FILTER,ye.LINEAR),ye.texImage2D(ye.TEXTURE_2D,0,ye.ALPHA,this.width,this.height,0,ye.ALPHA,ye.UNSIGNED_BYTE,this.data))};var V=function Me(X,ye){this.workerPool=X,this.actors=[],this.currentActor=0,this.id=t.uniqueId();for(var ne=this.workerPool.acquire(this.id),Se=0;Se<ne.length;Se++){var Je=ne[Se],xt=new Me.Actor(Je,ye,this.id);xt.name="Worker "+Se,this.actors.push(xt)}};V.prototype.broadcast=function(X,ye,ne){ne=ne||function(){},t.asyncAll(this.actors,function(Se,Je){Se.send(X,ye,Je)},ne)},V.prototype.getActor=function(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]},V.prototype.remove=function(){this.actors.forEach(function(X){X.remove()}),this.actors=[],this.workerPool.release(this.id)},V.Actor=t.Actor;function q(Me,X,ye){var ne=function(Se,Je){if(Se)return ye(Se);if(Je){var xt=t.pick(t.extend(Je,Me),["tiles","minzoom","maxzoom","attribution","mapbox_logo","bounds","scheme","tileSize","encoding"]);Je.vector_layers&&(xt.vectorLayers=Je.vector_layers,xt.vectorLayerIds=xt.vectorLayers.map(function(At){return At.id})),xt.tiles=X.canonicalizeTileset(xt,Me.url),ye(null,xt)}};return Me.url?t.getJSON(X.transformRequest(X.normalizeSourceURL(Me.url),t.ResourceType.Source),ne):t.browser.frame(function(){return ne(null,Me)})}var z=function(X,ye,ne){this.bounds=t.LngLatBounds.convert(this.validateBounds(X)),this.minzoom=ye||0,this.maxzoom=ne||24};z.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])]},z.prototype.contains=function(X){var ye=Math.pow(2,X.z),ne={minX:Math.floor(t.mercatorXfromLng(this.bounds.getWest())*ye),minY:Math.floor(t.mercatorYfromLat(this.bounds.getNorth())*ye),maxX:Math.ceil(t.mercatorXfromLng(this.bounds.getEast())*ye),maxY:Math.ceil(t.mercatorYfromLat(this.bounds.getSouth())*ye)},Se=X.x>=ne.minX&&X.x<ne.maxX&&X.y>=ne.minY&&X.y<ne.maxY;return Se};var H=(function(Me){function X(ye,ne,Se,Je){if(Me.call(this),this.id=ye,this.dispatcher=Se,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,t.extend(this,t.pick(ne,["url","scheme","tileSize","promoteId"])),this._options=t.extend({type:"vector"},ne),this._collectResourceTiming=ne.collectResourceTiming,this.tileSize!==512)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(Je)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.load=function(){var ne=this;this._loaded=!1,this.fire(new t.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=q(this._options,this.map._requestManager,function(Se,Je){ne._tileJSONRequest=null,ne._loaded=!0,Se?ne.fire(new t.ErrorEvent(Se)):Je&&(t.extend(ne,Je),Je.bounds&&(ne.tileBounds=new z(Je.bounds,ne.minzoom,ne.maxzoom)),t.postTurnstileEvent(Je.tiles,ne.map._requestManager._customAccessToken),t.postMapLoadEvent(Je.tiles,ne.map._getMapId(),ne.map._requestManager._skuToken,ne.map._requestManager._customAccessToken),ne.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})),ne.fire(new t.Event("data",{dataType:"source",sourceDataType:"content"})))})},X.prototype.loaded=function(){return this._loaded},X.prototype.hasTile=function(ne){return!this.tileBounds||this.tileBounds.contains(ne.canonical)},X.prototype.onAdd=function(ne){this.map=ne,this.load()},X.prototype.setSourceProperty=function(ne){this._tileJSONRequest&&this._tileJSONRequest.cancel(),ne();var Se=this.map.style.sourceCaches[this.id];Se.clearTiles(),this.load()},X.prototype.setTiles=function(ne){var Se=this;return this.setSourceProperty(function(){Se._options.tiles=ne}),this},X.prototype.setUrl=function(ne){var Se=this;return this.setSourceProperty(function(){Se.url=ne,Se._options.url=ne}),this},X.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},X.prototype.serialize=function(){return t.extend({},this._options)},X.prototype.loadTile=function(ne,Se){var Je=this.map._requestManager.normalizeTileURL(ne.tileID.canonical.url(this.tiles,this.scheme)),xt={request:this.map._requestManager.transformRequest(Je,t.ResourceType.Tile),uid:ne.uid,tileID:ne.tileID,zoom:ne.tileID.overscaledZ,tileSize:this.tileSize*ne.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:t.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};xt.request.collectResourceTiming=this._collectResourceTiming,!ne.actor||ne.state==="expired"?(ne.actor=this.dispatcher.getActor(),ne.request=ne.actor.send("loadTile",xt,At.bind(this))):ne.state==="loading"?ne.reloadCallback=Se:ne.request=ne.actor.send("reloadTile",xt,At.bind(this));function At(it,pt){if(delete ne.request,ne.aborted)return Se(null);if(it&&it.status!==404)return Se(it);pt&&pt.resourceTiming&&(ne.resourceTiming=pt.resourceTiming),this.map._refreshExpiredTiles&&pt&&ne.setExpiryData(pt),ne.loadVectorData(pt,this.map.painter),t.cacheEntryPossiblyAdded(this.dispatcher),Se(null),ne.reloadCallback&&(this.loadTile(ne,ne.reloadCallback),ne.reloadCallback=null)}},X.prototype.abortTile=function(ne){ne.request&&(ne.request.cancel(),delete ne.request),ne.actor&&ne.actor.send("abortTile",{uid:ne.uid,type:this.type,source:this.id},void 0)},X.prototype.unloadTile=function(ne){ne.unloadVectorData(),ne.actor&&ne.actor.send("removeTile",{uid:ne.uid,type:this.type,source:this.id},void 0)},X.prototype.hasTransition=function(){return!1},X})(t.Evented),G=(function(Me){function X(ye,ne,Se,Je){Me.call(this),this.id=ye,this.dispatcher=Se,this.setEventedParent(Je),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=t.extend({type:"raster"},ne),t.extend(this,t.pick(ne,["url","scheme","tileSize"]))}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.load=function(){var ne=this;this._loaded=!1,this.fire(new t.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=q(this._options,this.map._requestManager,function(Se,Je){ne._tileJSONRequest=null,ne._loaded=!0,Se?ne.fire(new t.ErrorEvent(Se)):Je&&(t.extend(ne,Je),Je.bounds&&(ne.tileBounds=new z(Je.bounds,ne.minzoom,ne.maxzoom)),t.postTurnstileEvent(Je.tiles),t.postMapLoadEvent(Je.tiles,ne.map._getMapId(),ne.map._requestManager._skuToken),ne.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})),ne.fire(new t.Event("data",{dataType:"source",sourceDataType:"content"})))})},X.prototype.loaded=function(){return this._loaded},X.prototype.onAdd=function(ne){this.map=ne,this.load()},X.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},X.prototype.serialize=function(){return t.extend({},this._options)},X.prototype.hasTile=function(ne){return!this.tileBounds||this.tileBounds.contains(ne.canonical)},X.prototype.loadTile=function(ne,Se){var Je=this,xt=this.map._requestManager.normalizeTileURL(ne.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);ne.request=t.getImage(this.map._requestManager.transformRequest(xt,t.ResourceType.Tile),function(At,it){if(delete ne.request,ne.aborted)ne.state="unloaded",Se(null);else if(At)ne.state="errored",Se(At);else if(it){Je.map._refreshExpiredTiles&&ne.setExpiryData(it),delete it.cacheControl,delete it.expires;var pt=Je.map.painter.context,Rt=pt.gl;ne.texture=Je.map.painter.getTileTexture(it.width),ne.texture?ne.texture.update(it,{useMipmap:!0}):(ne.texture=new t.Texture(pt,it,Rt.RGBA,{useMipmap:!0}),ne.texture.bind(Rt.LINEAR,Rt.CLAMP_TO_EDGE,Rt.LINEAR_MIPMAP_NEAREST),pt.extTextureFilterAnisotropic&&Rt.texParameterf(Rt.TEXTURE_2D,pt.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,pt.extTextureFilterAnisotropicMax)),ne.state="loaded",t.cacheEntryPossiblyAdded(Je.dispatcher),Se(null)}})},X.prototype.abortTile=function(ne,Se){ne.request&&(ne.request.cancel(),delete ne.request),Se()},X.prototype.unloadTile=function(ne,Se){ne.texture&&this.map.painter.saveTileTexture(ne.texture),Se()},X.prototype.hasTransition=function(){return!1},X})(t.Evented),J=(function(Me){function X(ye,ne,Se,Je){Me.call(this,ye,ne,Se,Je),this.type="raster-dem",this.maxzoom=22,this._options=t.extend({type:"raster-dem"},ne),this.encoding=ne.encoding||"mapbox"}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.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(ne,Se){var Je=this.map._requestManager.normalizeTileURL(ne.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);ne.request=t.getImage(this.map._requestManager.transformRequest(Je,t.ResourceType.Tile),xt.bind(this)),ne.neighboringTiles=this._getNeighboringTiles(ne.tileID);function xt(it,pt){if(delete ne.request,ne.aborted)ne.state="unloaded",Se(null);else if(it)ne.state="errored",Se(it);else if(pt){this.map._refreshExpiredTiles&&ne.setExpiryData(pt),delete pt.cacheControl,delete pt.expires;var Rt=t.window.ImageBitmap&&pt instanceof t.window.ImageBitmap&&t.offscreenCanvasSupported(),or=Rt?pt:t.browser.getImageData(pt,1),er={uid:ne.uid,coord:ne.tileID,source:this.id,rawImageData:or,encoding:this.encoding};(!ne.actor||ne.state==="expired")&&(ne.actor=this.dispatcher.getActor(),ne.actor.send("loadDEMTile",er,At.bind(this)))}}function At(it,pt){it&&(ne.state="errored",Se(it)),pt&&(ne.dem=pt,ne.needsHillshadePrepare=!0,ne.state="loaded",Se(null))}},X.prototype._getNeighboringTiles=function(ne){var Se=ne.canonical,Je=Math.pow(2,Se.z),xt=(Se.x-1+Je)%Je,At=Se.x===0?ne.wrap-1:ne.wrap,it=(Se.x+1+Je)%Je,pt=Se.x+1===Je?ne.wrap+1:ne.wrap,Rt={};return Rt[new t.OverscaledTileID(ne.overscaledZ,At,Se.z,xt,Se.y).key]={backfilled:!1},Rt[new t.OverscaledTileID(ne.overscaledZ,pt,Se.z,it,Se.y).key]={backfilled:!1},Se.y>0&&(Rt[new t.OverscaledTileID(ne.overscaledZ,At,Se.z,xt,Se.y-1).key]={backfilled:!1},Rt[new t.OverscaledTileID(ne.overscaledZ,ne.wrap,Se.z,Se.x,Se.y-1).key]={backfilled:!1},Rt[new t.OverscaledTileID(ne.overscaledZ,pt,Se.z,it,Se.y-1).key]={backfilled:!1}),Se.y+1<Je&&(Rt[new t.OverscaledTileID(ne.overscaledZ,At,Se.z,xt,Se.y+1).key]={backfilled:!1},Rt[new t.OverscaledTileID(ne.overscaledZ,ne.wrap,Se.z,Se.x,Se.y+1).key]={backfilled:!1},Rt[new t.OverscaledTileID(ne.overscaledZ,pt,Se.z,it,Se.y+1).key]={backfilled:!1}),Rt},X.prototype.unloadTile=function(ne){ne.demTexture&&this.map.painter.saveTileTexture(ne.demTexture),ne.fbo&&(ne.fbo.destroy(),delete ne.fbo),ne.dem&&delete ne.dem,delete ne.neighboringTiles,ne.state="unloaded",ne.actor&&ne.actor.send("removeDEMTile",{uid:ne.uid,source:this.id})},X})(G),le=(function(Me){function X(ye,ne,Se,Je){Me.call(this),this.id=ye,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=Se.getActor(),this.setEventedParent(Je),this._data=ne.data,this._options=t.extend({},ne),this._collectResourceTiming=ne.collectResourceTiming,this._resourceTiming=[],ne.maxzoom!==void 0&&(this.maxzoom=ne.maxzoom),ne.type&&(this.type=ne.type),ne.attribution&&(this.attribution=ne.attribution),this.promoteId=ne.promoteId;var xt=t.EXTENT/this.tileSize;this.workerOptions=t.extend({source:this.id,cluster:ne.cluster||!1,geojsonVtOptions:{buffer:(ne.buffer!==void 0?ne.buffer:128)*xt,tolerance:(ne.tolerance!==void 0?ne.tolerance:.375)*xt,extent:t.EXTENT,maxZoom:this.maxzoom,lineMetrics:ne.lineMetrics||!1,generateId:ne.generateId||!1},superclusterOptions:{maxZoom:ne.clusterMaxZoom!==void 0?Math.min(ne.clusterMaxZoom,this.maxzoom-1):this.maxzoom-1,minPoints:Math.max(2,ne.clusterMinPoints||2),extent:t.EXTENT,radius:(ne.clusterRadius||50)*xt,log:!1,generateId:ne.generateId||!1},clusterProperties:ne.clusterProperties,filter:ne.filter},ne.workerOptions)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.load=function(){var ne=this;this.fire(new t.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(Se){if(Se){ne.fire(new t.ErrorEvent(Se));return}var Je={dataType:"source",sourceDataType:"metadata"};ne._collectResourceTiming&&ne._resourceTiming&&ne._resourceTiming.length>0&&(Je.resourceTiming=ne._resourceTiming,ne._resourceTiming=[]),ne.fire(new t.Event("data",Je))})},X.prototype.onAdd=function(ne){this.map=ne,this.load()},X.prototype.setData=function(ne){var Se=this;return this._data=ne,this.fire(new t.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(Je){if(Je){Se.fire(new t.ErrorEvent(Je));return}var xt={dataType:"source",sourceDataType:"content"};Se._collectResourceTiming&&Se._resourceTiming&&Se._resourceTiming.length>0&&(xt.resourceTiming=Se._resourceTiming,Se._resourceTiming=[]),Se.fire(new t.Event("data",xt))}),this},X.prototype.getClusterExpansionZoom=function(ne,Se){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:ne,source:this.id},Se),this},X.prototype.getClusterChildren=function(ne,Se){return this.actor.send("geojson.getClusterChildren",{clusterId:ne,source:this.id},Se),this},X.prototype.getClusterLeaves=function(ne,Se,Je,xt){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:ne,limit:Se,offset:Je},xt),this},X.prototype._updateWorkerData=function(ne){var Se=this;this._loaded=!1;var Je=t.extend({},this.workerOptions),xt=this._data;typeof xt=="string"?(Je.request=this.map._requestManager.transformRequest(t.browser.resolveURL(xt),t.ResourceType.Source),Je.request.collectResourceTiming=this._collectResourceTiming):Je.data=JSON.stringify(xt),this.actor.send(this.type+".loadData",Je,function(At,it){Se._removed||it&&it.abandoned||(Se._loaded=!0,it&&it.resourceTiming&&it.resourceTiming[Se.id]&&(Se._resourceTiming=it.resourceTiming[Se.id].slice(0)),Se.actor.send(Se.type+".coalesce",{source:Je.source},null),ne(At))})},X.prototype.loaded=function(){return this._loaded},X.prototype.loadTile=function(ne,Se){var Je=this,xt=ne.actor?"reloadTile":"loadTile";ne.actor=this.actor;var At={type:this.type,uid:ne.uid,tileID:ne.tileID,zoom:ne.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:t.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};ne.request=this.actor.send(xt,At,function(it,pt){return delete ne.request,ne.unloadVectorData(),ne.aborted?Se(null):it?Se(it):(ne.loadVectorData(pt,Je.map.painter,xt==="reloadTile"),Se(null))})},X.prototype.abortTile=function(ne){ne.request&&(ne.request.cancel(),delete ne.request),ne.aborted=!0},X.prototype.unloadTile=function(ne){ne.unloadVectorData(),this.actor.send("removeTile",{uid:ne.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 t.extend({},this._options,{type:this.type,data:this._data})},X.prototype.hasTransition=function(){return!1},X})(t.Evented),ge=t.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),de=(function(Me){function X(ye,ne,Se,Je){Me.call(this),this.id=ye,this.dispatcher=Se,this.coordinates=ne.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(Je),this.options=ne}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.load=function(ne,Se){var Je=this;this._loaded=!1,this.fire(new t.Event("dataloading",{dataType:"source"})),this.url=this.options.url,t.getImage(this.map._requestManager.transformRequest(this.url,t.ResourceType.Image),function(xt,At){Je._loaded=!0,xt?Je.fire(new t.ErrorEvent(xt)):At&&(Je.image=At,ne&&(Je.coordinates=ne),Se&&Se(),Je._finishLoading())})},X.prototype.loaded=function(){return this._loaded},X.prototype.updateImage=function(ne){var Se=this;return!this.image||!ne.url?this:(this.options.url=ne.url,this.load(ne.coordinates,function(){Se.texture=null}),this)},X.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})))},X.prototype.onAdd=function(ne){this.map=ne,this.load()},X.prototype.setCoordinates=function(ne){var Se=this;this.coordinates=ne;var Je=ne.map(t.MercatorCoordinate.fromLngLat);this.tileID=me(Je),this.minzoom=this.maxzoom=this.tileID.z;var xt=Je.map(function(At){return Se.tileID.getTilePoint(At)._round()});return this._boundsArray=new t.StructArrayLayout4i8,this._boundsArray.emplaceBack(xt[0].x,xt[0].y,0,0),this._boundsArray.emplaceBack(xt[1].x,xt[1].y,t.EXTENT,0),this._boundsArray.emplaceBack(xt[3].x,xt[3].y,0,t.EXTENT),this._boundsArray.emplaceBack(xt[2].x,xt[2].y,t.EXTENT,t.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new t.Event("data",{dataType:"source",sourceDataType:"content"})),this},X.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||!this.image)){var ne=this.map.painter.context,Se=ne.gl;this.boundsBuffer||(this.boundsBuffer=ne.createVertexBuffer(this._boundsArray,ge.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new t.Texture(ne,this.image,Se.RGBA),this.texture.bind(Se.LINEAR,Se.CLAMP_TO_EDGE));for(var Je in this.tiles){var xt=this.tiles[Je];xt.state!=="loaded"&&(xt.state="loaded",xt.texture=this.texture)}}},X.prototype.loadTile=function(ne,Se){this.tileID&&this.tileID.equals(ne.tileID.canonical)?(this.tiles[String(ne.tileID.wrap)]=ne,ne.buckets={},Se(null)):(ne.state="errored",Se(null))},X.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},X.prototype.hasTransition=function(){return!1},X})(t.Evented);function me(Me){for(var X=1/0,ye=1/0,ne=-1/0,Se=-1/0,Je=0,xt=Me;Je<xt.length;Je+=1){var At=xt[Je];X=Math.min(X,At.x),ye=Math.min(ye,At.y),ne=Math.max(ne,At.x),Se=Math.max(Se,At.y)}var it=ne-X,pt=Se-ye,Rt=Math.max(it,pt),or=Math.max(0,Math.floor(-Math.log(Rt)/Math.LN2)),er=Math.pow(2,or);return new t.CanonicalTileID(or,Math.floor((X+ne)/2*er),Math.floor((ye+Se)/2*er))}var W=(function(Me){function X(ye,ne,Se,Je){Me.call(this,ye,ne,Se,Je),this.roundZoom=!0,this.type="video",this.options=ne}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.load=function(){var ne=this;this._loaded=!1;var Se=this.options;this.urls=[];for(var Je=0,xt=Se.urls;Je<xt.length;Je+=1){var At=xt[Je];this.urls.push(this.map._requestManager.transformRequest(At,t.ResourceType.Source).url)}t.getVideo(this.urls,function(it,pt){ne._loaded=!0,it?ne.fire(new t.ErrorEvent(it)):pt&&(ne.video=pt,ne.video.loop=!0,ne.video.addEventListener("playing",function(){ne.map.triggerRepaint()}),ne.map&&ne.video.play(),ne._finishLoading())})},X.prototype.pause=function(){this.video&&this.video.pause()},X.prototype.play=function(){this.video&&this.video.play()},X.prototype.seek=function(ne){if(this.video){var Se=this.video.seekable;ne<Se.start(0)||ne>Se.end(0)?this.fire(new t.ErrorEvent(new t.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+Se.start(0)+" and "+Se.end(0)+"-second mark."))):this.video.currentTime=ne}},X.prototype.getVideo=function(){return this.video},X.prototype.onAdd=function(ne){this.map||(this.map=ne,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 ne=this.map.painter.context,Se=ne.gl;this.boundsBuffer||(this.boundsBuffer=ne.createVertexBuffer(this._boundsArray,ge.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(Se.LINEAR,Se.CLAMP_TO_EDGE),Se.texSubImage2D(Se.TEXTURE_2D,0,0,0,Se.RGBA,Se.UNSIGNED_BYTE,this.video)):(this.texture=new t.Texture(ne,this.video,Se.RGBA),this.texture.bind(Se.LINEAR,Se.CLAMP_TO_EDGE));for(var Je in this.tiles){var xt=this.tiles[Je];xt.state!=="loaded"&&(xt.state="loaded",xt.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})(de),ie=(function(Me){function X(ye,ne,Se,Je){Me.call(this,ye,ne,Se,Je),ne.coordinates?(!Array.isArray(ne.coordinates)||ne.coordinates.length!==4||ne.coordinates.some(function(xt){return!Array.isArray(xt)||xt.length!==2||xt.some(function(At){return typeof At!="number"})}))&&this.fire(new t.ErrorEvent(new t.ValidationError("sources."+ye,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new t.ErrorEvent(new t.ValidationError("sources."+ye,null,'missing required property "coordinates"'))),ne.animate&&typeof ne.animate!="boolean"&&this.fire(new t.ErrorEvent(new t.ValidationError("sources."+ye,null,'optional "animate" property must be a boolean value'))),ne.canvas?typeof ne.canvas!="string"&&!(ne.canvas instanceof t.window.HTMLCanvasElement)&&this.fire(new t.ErrorEvent(new t.ValidationError("sources."+ye,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 t.ErrorEvent(new t.ValidationError("sources."+ye,null,'missing required property "canvas"'))),this.options=ne,this.animate=ne.animate!==void 0?ne.animate:!0}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.load=function(){if(this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof t.window.HTMLCanvasElement?this.options.canvas:t.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()){this.fire(new t.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(ne){this.map=ne,this.load(),this.canvas&&this.animate&&this.play()},X.prototype.onRemove=function(){this.pause()},X.prototype.prepare=function(){var ne=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,ne=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,ne=!0),!this._hasInvalidDimensions()&&Object.keys(this.tiles).length!==0){var Se=this.map.painter.context,Je=Se.gl;this.boundsBuffer||(this.boundsBuffer=Se.createVertexBuffer(this._boundsArray,ge.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(ne||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new t.Texture(Se,this.canvas,Je.RGBA,{premultiply:!0});for(var xt in this.tiles){var At=this.tiles[xt];At.state!=="loaded"&&(At.state="loaded",At.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 ne=0,Se=[this.canvas.width,this.canvas.height];ne<Se.length;ne+=1){var Je=Se[ne];if(isNaN(Je)||Je<=0)return!0}return!1},X})(de),se={vector:H,raster:G,"raster-dem":J,geojson:le,video:W,image:de,canvas:ie},ee=function(Me,X,ye,ne){var Se=new se[X.type](Me,X,ye,ne);if(Se.id!==Me)throw new Error("Expected Source id to be "+Me+" instead of "+Se.id);return t.bindAll(["load","abort","unload","serialize","prepare"],Se),Se},pe=function(Me){return se[Me]},oe=function(Me,X){se[Me]=X};function Y(Me,X){var ye=t.identity([]);return t.translate(ye,ye,[1,1,0]),t.scale(ye,ye,[Me.width*.5,Me.height*.5,1]),t.multiply(ye,ye,Me.calculatePosMatrix(X.toUnwrapped()))}function ce(Me,X,ye){if(Me)for(var ne=0,Se=Me;ne<Se.length;ne+=1){var Je=Se[ne],xt=X[Je];if(xt&&xt.source===ye&&xt.type==="fill-extrusion")return!0}else for(var At in X){var it=X[At];if(it.source===ye&&it.type==="fill-extrusion")return!0}return!1}function ue(Me,X,ye,ne,Se,Je){var xt=ce(Se&&Se.layers,X,Me.id),At=Je.maxPitchScaleFactor(),it=Me.tilesIn(ne,At,xt);it.sort(ze);for(var pt=[],Rt=0,or=it;Rt<or.length;Rt+=1){var er=or[Rt];pt.push({wrappedTileID:er.tileID.wrapped().key,queryResults:er.tile.queryRenderedFeatures(X,ye,Me._state,er.queryGeometry,er.cameraQueryGeometry,er.scale,Se,Je,At,Y(Me.transform,er.tileID))})}var ur=Xe(pt);for(var gr in ur)ur[gr].forEach(function(vr){var Zt=vr.feature,ar=Me.getFeatureState(Zt.layer["source-layer"],Zt.id);Zt.source=Zt.layer.source,Zt.layer["source-layer"]&&(Zt.sourceLayer=Zt.layer["source-layer"]),Zt.state=ar});return ur}function _e(Me,X,ye,ne,Se,Je,xt){for(var At={},it=Je.queryRenderedSymbols(ne),pt=[],Rt=0,or=Object.keys(it).map(Number);Rt<or.length;Rt+=1){var er=or[Rt];pt.push(xt[er])}pt.sort(ze);for(var ur=function(){var tr=vr[gr],Zr=tr.featureIndex.lookupSymbolFeatures(it[tr.bucketInstanceId],X,tr.bucketIndex,tr.sourceLayerIndex,Se.filter,Se.layers,Se.availableImages,Me);for(var un in Zr){var En=At[un]=At[un]||[],ka=Zr[un];ka.sort(function(Da,Qa){var Ra=tr.featureSortOrder;if(Ra){var ii=Ra.indexOf(Da.featureIndex),xi=Ra.indexOf(Qa.featureIndex);return xi-ii}else return Qa.featureIndex-Da.featureIndex});for(var ma=0,ha=ka;ma<ha.length;ma+=1){var Pa=ha[ma];En.push(Pa)}}},gr=0,vr=pt;gr<vr.length;gr+=1)ur();var Zt=function(tr){At[tr].forEach(function(Zr){var un=Zr.feature,En=Me[tr],ka=ye[En.source],ma=ka.getFeatureState(un.layer["source-layer"],un.id);un.source=un.layer.source,un.layer["source-layer"]&&(un.sourceLayer=un.layer["source-layer"]),un.state=ma})};for(var ar in At)Zt(ar);return At}function Le(Me,X){for(var ye=Me.getRenderableIds().map(function(it){return Me.getTileByID(it)}),ne=[],Se={},Je=0;Je<ye.length;Je++){var xt=ye[Je],At=xt.tileID.canonical.key;Se[At]||(Se[At]=!0,xt.querySourceFeatures(ne,X))}return ne}function ze(Me,X){var ye=Me.tileID,ne=X.tileID;return ye.overscaledZ-ne.overscaledZ||ye.canonical.y-ne.canonical.y||ye.wrap-ne.wrap||ye.canonical.x-ne.canonical.x}function Xe(Me){for(var X={},ye={},ne=0,Se=Me;ne<Se.length;ne+=1){var Je=Se[ne],xt=Je.queryResults,At=Je.wrappedTileID,it=ye[At]=ye[At]||{};for(var pt in xt)for(var Rt=xt[pt],or=it[pt]=it[pt]||{},er=X[pt]=X[pt]||[],ur=0,gr=Rt;ur<gr.length;ur+=1){var vr=gr[ur];or[vr.featureIndex]||(or[vr.featureIndex]=!0,er.push(vr))}}return X}var Ve=function(X,ye){this.max=X,this.onRemove=ye,this.reset()};Ve.prototype.reset=function(){for(var X in this.data)for(var ye=0,ne=this.data[X];ye<ne.length;ye+=1){var Se=ne[ye];Se.timeout&&clearTimeout(Se.timeout),this.onRemove(Se.value)}return this.data={},this.order=[],this},Ve.prototype.add=function(X,ye,ne){var Se=this,Je=X.wrapped().key;this.data[Je]===void 0&&(this.data[Je]=[]);var xt={value:ye,timeout:void 0};if(ne!==void 0&&(xt.timeout=setTimeout(function(){Se.remove(X,xt)},ne)),this.data[Je].push(xt),this.order.push(Je),this.order.length>this.max){var At=this._getAndRemoveByKey(this.order[0]);At&&this.onRemove(At)}return this},Ve.prototype.has=function(X){return X.wrapped().key in this.data},Ve.prototype.getAndRemove=function(X){return this.has(X)?this._getAndRemoveByKey(X.wrapped().key):null},Ve.prototype._getAndRemoveByKey=function(X){var ye=this.data[X].shift();return ye.timeout&&clearTimeout(ye.timeout),this.data[X].length===0&&delete this.data[X],this.order.splice(this.order.indexOf(X),1),ye.value},Ve.prototype.getByKey=function(X){var ye=this.data[X];return ye?ye[0].value:null},Ve.prototype.get=function(X){if(!this.has(X))return null;var ye=this.data[X.wrapped().key][0];return ye.value},Ve.prototype.remove=function(X,ye){if(!this.has(X))return this;var ne=X.wrapped().key,Se=ye===void 0?0:this.data[ne].indexOf(ye),Je=this.data[ne][Se];return this.data[ne].splice(Se,1),Je.timeout&&clearTimeout(Je.timeout),this.data[ne].length===0&&delete this.data[ne],this.onRemove(Je.value),this.order.splice(this.order.indexOf(ne),1),this},Ve.prototype.setMaxSize=function(X){for(this.max=X;this.order.length>this.max;){var ye=this._getAndRemoveByKey(this.order[0]);ye&&this.onRemove(ye)}return this},Ve.prototype.filter=function(X){var ye=[];for(var ne in this.data)for(var Se=0,Je=this.data[ne];Se<Je.length;Se+=1){var xt=Je[Se];X(xt.value)||ye.push(xt)}for(var At=0,it=ye;At<it.length;At+=1){var pt=it[At];this.remove(pt.value.tileID,pt)}};var rt=function(X,ye,ne){this.context=X;var Se=X.gl;this.buffer=Se.createBuffer(),this.dynamicDraw=!!ne,this.context.unbindVAO(),X.bindElementBuffer.set(this.buffer),Se.bufferData(Se.ELEMENT_ARRAY_BUFFER,ye.arrayBuffer,this.dynamicDraw?Se.DYNAMIC_DRAW:Se.STATIC_DRAW),this.dynamicDraw||delete ye.arrayBuffer};rt.prototype.bind=function(){this.context.bindElementBuffer.set(this.buffer)},rt.prototype.updateData=function(X){var ye=this.context.gl;this.context.unbindVAO(),this.bind(),ye.bufferSubData(ye.ELEMENT_ARRAY_BUFFER,0,X.arrayBuffer)},rt.prototype.destroy=function(){var X=this.context.gl;this.buffer&&(X.deleteBuffer(this.buffer),delete this.buffer)};var mt={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"},_t=function(X,ye,ne,Se){this.length=ye.length,this.attributes=ne,this.itemSize=ye.bytesPerElement,this.dynamicDraw=Se,this.context=X;var Je=X.gl;this.buffer=Je.createBuffer(),X.bindVertexBuffer.set(this.buffer),Je.bufferData(Je.ARRAY_BUFFER,ye.arrayBuffer,this.dynamicDraw?Je.DYNAMIC_DRAW:Je.STATIC_DRAW),this.dynamicDraw||delete ye.arrayBuffer};_t.prototype.bind=function(){this.context.bindVertexBuffer.set(this.buffer)},_t.prototype.updateData=function(X){var ye=this.context.gl;this.bind(),ye.bufferSubData(ye.ARRAY_BUFFER,0,X.arrayBuffer)},_t.prototype.enableAttributes=function(X,ye){for(var ne=0;ne<this.attributes.length;ne++){var Se=this.attributes[ne],Je=ye.attributes[Se.name];Je!==void 0&&X.enableVertexAttribArray(Je)}},_t.prototype.setVertexAttribPointers=function(X,ye,ne){for(var Se=0;Se<this.attributes.length;Se++){var Je=this.attributes[Se],xt=ye.attributes[Je.name];xt!==void 0&&X.vertexAttribPointer(xt,Je.components,X[mt[Je.type]],!1,this.itemSize,Je.offset+this.itemSize*(ne||0))}},_t.prototype.destroy=function(){var X=this.context.gl;this.buffer&&(X.deleteBuffer(this.buffer),delete this.buffer)};var vt=function(X){this.gl=X.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1};vt.prototype.get=function(){return this.current},vt.prototype.set=function(X){},vt.prototype.getDefault=function(){return this.default},vt.prototype.setDefault=function(){this.set(this.default)};var ut=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){return t.Color.transparent},X.prototype.set=function(ne){var Se=this.current;ne.r===Se.r&&ne.g===Se.g&&ne.b===Se.b&&ne.a===Se.a&&!this.dirty||(this.gl.clearColor(ne.r,ne.g,ne.b,ne.a),this.current=ne,this.dirty=!1)},X})(vt),Fe=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){return 1},X.prototype.set=function(ne){ne===this.current&&!this.dirty||(this.gl.clearDepth(ne),this.current=ne,this.dirty=!1)},X})(vt),Pe=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){return 0},X.prototype.set=function(ne){ne===this.current&&!this.dirty||(this.gl.clearStencil(ne),this.current=ne,this.dirty=!1)},X})(vt),be=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){return[!0,!0,!0,!0]},X.prototype.set=function(ne){var Se=this.current;ne[0]===Se[0]&&ne[1]===Se[1]&&ne[2]===Se[2]&&ne[3]===Se[3]&&!this.dirty||(this.gl.colorMask(ne[0],ne[1],ne[2],ne[3]),this.current=ne,this.dirty=!1)},X})(vt),Ye=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){return!0},X.prototype.set=function(ne){ne===this.current&&!this.dirty||(this.gl.depthMask(ne),this.current=ne,this.dirty=!1)},X})(vt),yt=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){return 255},X.prototype.set=function(ne){ne===this.current&&!this.dirty||(this.gl.stencilMask(ne),this.current=ne,this.dirty=!1)},X})(vt),wt=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){return{func:this.gl.ALWAYS,ref:0,mask:255}},X.prototype.set=function(ne){var Se=this.current;ne.func===Se.func&&ne.ref===Se.ref&&ne.mask===Se.mask&&!this.dirty||(this.gl.stencilFunc(ne.func,ne.ref,ne.mask),this.current=ne,this.dirty=!1)},X})(vt),ht=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){var ne=this.gl;return[ne.KEEP,ne.KEEP,ne.KEEP]},X.prototype.set=function(ne){var Se=this.current;ne[0]===Se[0]&&ne[1]===Se[1]&&ne[2]===Se[2]&&!this.dirty||(this.gl.stencilOp(ne[0],ne[1],ne[2]),this.current=ne,this.dirty=!1)},X})(vt),Yt=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){return!1},X.prototype.set=function(ne){if(!(ne===this.current&&!this.dirty)){var Se=this.gl;ne?Se.enable(Se.STENCIL_TEST):Se.disable(Se.STENCIL_TEST),this.current=ne,this.dirty=!1}},X})(vt),$t=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){return[0,1]},X.prototype.set=function(ne){var Se=this.current;ne[0]===Se[0]&&ne[1]===Se[1]&&!this.dirty||(this.gl.depthRange(ne[0],ne[1]),this.current=ne,this.dirty=!1)},X})(vt),fr=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){return!1},X.prototype.set=function(ne){if(!(ne===this.current&&!this.dirty)){var Se=this.gl;ne?Se.enable(Se.DEPTH_TEST):Se.disable(Se.DEPTH_TEST),this.current=ne,this.dirty=!1}},X})(vt),mr=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){return this.gl.LESS},X.prototype.set=function(ne){ne===this.current&&!this.dirty||(this.gl.depthFunc(ne),this.current=ne,this.dirty=!1)},X})(vt),Ur=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){return!1},X.prototype.set=function(ne){if(!(ne===this.current&&!this.dirty)){var Se=this.gl;ne?Se.enable(Se.BLEND):Se.disable(Se.BLEND),this.current=ne,this.dirty=!1}},X})(vt),jr=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){var ne=this.gl;return[ne.ONE,ne.ZERO]},X.prototype.set=function(ne){var Se=this.current;ne[0]===Se[0]&&ne[1]===Se[1]&&!this.dirty||(this.gl.blendFunc(ne[0],ne[1]),this.current=ne,this.dirty=!1)},X})(vt),fn=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){return t.Color.transparent},X.prototype.set=function(ne){var Se=this.current;ne.r===Se.r&&ne.g===Se.g&&ne.b===Se.b&&ne.a===Se.a&&!this.dirty||(this.gl.blendColor(ne.r,ne.g,ne.b,ne.a),this.current=ne,this.dirty=!1)},X})(vt),Br=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){return this.gl.FUNC_ADD},X.prototype.set=function(ne){ne===this.current&&!this.dirty||(this.gl.blendEquation(ne),this.current=ne,this.dirty=!1)},X})(vt),Qr=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){return!1},X.prototype.set=function(ne){if(!(ne===this.current&&!this.dirty)){var Se=this.gl;ne?Se.enable(Se.CULL_FACE):Se.disable(Se.CULL_FACE),this.current=ne,this.dirty=!1}},X})(vt),Ot=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){return this.gl.BACK},X.prototype.set=function(ne){ne===this.current&&!this.dirty||(this.gl.cullFace(ne),this.current=ne,this.dirty=!1)},X})(vt),$e=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){return this.gl.CCW},X.prototype.set=function(ne){ne===this.current&&!this.dirty||(this.gl.frontFace(ne),this.current=ne,this.dirty=!1)},X})(vt),ot=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){return null},X.prototype.set=function(ne){ne===this.current&&!this.dirty||(this.gl.useProgram(ne),this.current=ne,this.dirty=!1)},X})(vt),De=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){return this.gl.TEXTURE0},X.prototype.set=function(ne){ne===this.current&&!this.dirty||(this.gl.activeTexture(ne),this.current=ne,this.dirty=!1)},X})(vt),Ee=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){var ne=this.gl;return[0,0,ne.drawingBufferWidth,ne.drawingBufferHeight]},X.prototype.set=function(ne){var Se=this.current;ne[0]===Se[0]&&ne[1]===Se[1]&&ne[2]===Se[2]&&ne[3]===Se[3]&&!this.dirty||(this.gl.viewport(ne[0],ne[1],ne[2],ne[3]),this.current=ne,this.dirty=!1)},X})(vt),Ae=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){return null},X.prototype.set=function(ne){if(!(ne===this.current&&!this.dirty)){var Se=this.gl;Se.bindFramebuffer(Se.FRAMEBUFFER,ne),this.current=ne,this.dirty=!1}},X})(vt),Ie=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){return null},X.prototype.set=function(ne){if(!(ne===this.current&&!this.dirty)){var Se=this.gl;Se.bindRenderbuffer(Se.RENDERBUFFER,ne),this.current=ne,this.dirty=!1}},X})(vt),tt=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){return null},X.prototype.set=function(ne){if(!(ne===this.current&&!this.dirty)){var Se=this.gl;Se.bindTexture(Se.TEXTURE_2D,ne),this.current=ne,this.dirty=!1}},X})(vt),st=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){return null},X.prototype.set=function(ne){if(!(ne===this.current&&!this.dirty)){var Se=this.gl;Se.bindBuffer(Se.ARRAY_BUFFER,ne),this.current=ne,this.dirty=!1}},X})(vt),Bt=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){return null},X.prototype.set=function(ne){var Se=this.gl;Se.bindBuffer(Se.ELEMENT_ARRAY_BUFFER,ne),this.current=ne,this.dirty=!1},X})(vt),Ft=(function(Me){function X(ye){Me.call(this,ye),this.vao=ye.extVertexArrayObject}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){return null},X.prototype.set=function(ne){!this.vao||ne===this.current&&!this.dirty||(this.vao.bindVertexArrayOES(ne),this.current=ne,this.dirty=!1)},X})(vt),Wt=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){return 4},X.prototype.set=function(ne){if(!(ne===this.current&&!this.dirty)){var Se=this.gl;Se.pixelStorei(Se.UNPACK_ALIGNMENT,ne),this.current=ne,this.dirty=!1}},X})(vt),lr=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){return!1},X.prototype.set=function(ne){if(!(ne===this.current&&!this.dirty)){var Se=this.gl;Se.pixelStorei(Se.UNPACK_PREMULTIPLY_ALPHA_WEBGL,ne),this.current=ne,this.dirty=!1}},X})(vt),Rr=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){return!1},X.prototype.set=function(ne){if(!(ne===this.current&&!this.dirty)){var Se=this.gl;Se.pixelStorei(Se.UNPACK_FLIP_Y_WEBGL,ne),this.current=ne,this.dirty=!1}},X})(vt),Mr=(function(Me){function X(ye,ne){Me.call(this,ye),this.context=ye,this.parent=ne}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){return null},X})(vt),Sr=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.setDirty=function(){this.dirty=!0},X.prototype.set=function(ne){if(!(ne===this.current&&!this.dirty)){this.context.bindFramebuffer.set(this.parent);var Se=this.gl;Se.framebufferTexture2D(Se.FRAMEBUFFER,Se.COLOR_ATTACHMENT0,Se.TEXTURE_2D,ne,0),this.current=ne,this.dirty=!1}},X})(Mr),Kr=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.set=function(ne){if(!(ne===this.current&&!this.dirty)){this.context.bindFramebuffer.set(this.parent);var Se=this.gl;Se.framebufferRenderbuffer(Se.FRAMEBUFFER,Se.DEPTH_ATTACHMENT,Se.RENDERBUFFER,ne),this.current=ne,this.dirty=!1}},X})(Mr),Hn=function(X,ye,ne,Se){this.context=X,this.width=ye,this.height=ne;var Je=X.gl,xt=this.framebuffer=Je.createFramebuffer();this.colorAttachment=new Sr(X,xt),Se&&(this.depthAttachment=new Kr(X,xt))};Hn.prototype.destroy=function(){var X=this.context.gl,ye=this.colorAttachment.get();if(ye&&X.deleteTexture(ye),this.depthAttachment){var ne=this.depthAttachment.get();ne&&X.deleteRenderbuffer(ne)}X.deleteFramebuffer(this.framebuffer)};var ga=519,ua=function(X,ye,ne){this.func=X,this.mask=ye,this.range=ne};ua.ReadOnly=!1,ua.ReadWrite=!0,ua.disabled=new ua(ga,ua.ReadOnly,[0,1]);var Ta=519,Aa=7680,ia=function(X,ye,ne,Se,Je,xt){this.test=X,this.ref=ye,this.mask=ne,this.fail=Se,this.depthFail=Je,this.pass=xt};ia.disabled=new ia({func:Ta,mask:0},0,0,Aa,Aa,Aa);var $a=0,ci=1,_r=771,Qt=function(X,ye,ne){this.blendFunction=X,this.blendColor=ye,this.mask=ne};Qt.Replace=[ci,$a],Qt.disabled=new Qt(Qt.Replace,t.Color.transparent,[!1,!1,!1,!1]),Qt.unblended=new Qt(Qt.Replace,t.Color.transparent,[!0,!0,!0,!0]),Qt.alphaBlended=new Qt([ci,_r],t.Color.transparent,[!0,!0,!0,!0]);var yr=1029,br=2305,an=function(X,ye,ne){this.enable=X,this.mode=ye,this.frontFace=ne};an.disabled=new an(!1,yr,br),an.backCCW=new an(!0,yr,br);var wn=function(X){this.gl=X,this.extVertexArrayObject=this.gl.getExtension("OES_vertex_array_object"),this.clearColor=new ut(this),this.clearDepth=new Fe(this),this.clearStencil=new Pe(this),this.colorMask=new be(this),this.depthMask=new Ye(this),this.stencilMask=new yt(this),this.stencilFunc=new wt(this),this.stencilOp=new ht(this),this.stencilTest=new Yt(this),this.depthRange=new $t(this),this.depthTest=new fr(this),this.depthFunc=new mr(this),this.blend=new Ur(this),this.blendFunc=new jr(this),this.blendColor=new fn(this),this.blendEquation=new Br(this),this.cullFace=new Qr(this),this.cullFaceSide=new Ot(this),this.frontFace=new $e(this),this.program=new ot(this),this.activeTexture=new De(this),this.viewport=new Ee(this),this.bindFramebuffer=new Ae(this),this.bindRenderbuffer=new Ie(this),this.bindTexture=new tt(this),this.bindVertexBuffer=new st(this),this.bindElementBuffer=new Bt(this),this.bindVertexArrayOES=this.extVertexArrayObject&&new Ft(this),this.pixelStoreUnpack=new Wt(this),this.pixelStoreUnpackPremultiplyAlpha=new lr(this),this.pixelStoreUnpackFlipY=new Rr(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"),this.maxTextureSize=X.getParameter(X.MAX_TEXTURE_SIZE)};wn.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()},wn.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},wn.prototype.createIndexBuffer=function(X,ye){return new rt(this,X,ye)},wn.prototype.createVertexBuffer=function(X,ye,ne){return new _t(this,X,ye,ne)},wn.prototype.createRenderbuffer=function(X,ye,ne){var Se=this.gl,Je=Se.createRenderbuffer();return this.bindRenderbuffer.set(Je),Se.renderbufferStorage(Se.RENDERBUFFER,X,ye,ne),this.bindRenderbuffer.set(null),Je},wn.prototype.createFramebuffer=function(X,ye,ne){return new Hn(this,X,ye,ne)},wn.prototype.clear=function(X){var ye=X.color,ne=X.depth,Se=this.gl,Je=0;ye&&(Je|=Se.COLOR_BUFFER_BIT,this.clearColor.set(ye),this.colorMask.set([!0,!0,!0,!0])),typeof ne<"u"&&(Je|=Se.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(ne),this.depthMask.set(!0)),Se.clear(Je)},wn.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))},wn.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))},wn.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}))},wn.prototype.setColorMode=function(X){t.deepEqual(X.blendFunction,Qt.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(X.blendFunction),this.blendColor.set(X.blendColor)),this.colorMask.set(X.mask)},wn.prototype.unbindVAO=function(){this.extVertexArrayObject&&this.bindVertexArrayOES.set(null)};var Ln=(function(Me){function X(ye,ne,Se){var Je=this;Me.call(this),this.id=ye,this.dispatcher=Se,this.on("data",function(xt){xt.dataType==="source"&&xt.sourceDataType==="metadata"&&(Je._sourceLoaded=!0),Je._sourceLoaded&&!Je._paused&&xt.dataType==="source"&&xt.sourceDataType==="content"&&(Je.reload(),Je.transform&&Je.update(Je.transform))}),this.on("error",function(){Je._sourceErrored=!0}),this._source=ee(ye,ne,Se,this),this._tiles={},this._cache=new Ve(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new t.SourceFeatureState}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.onAdd=function(ne){this.map=ne,this._maxTileCacheSize=ne?ne._maxTileCacheSize:null,this._source&&this._source.onAdd&&this._source.onAdd(ne)},X.prototype.onRemove=function(ne){this._source&&this._source.onRemove&&this._source.onRemove(ne)},X.prototype.loaded=function(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;for(var ne in this._tiles){var Se=this._tiles[ne];if(Se.state!=="loaded"&&Se.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 ne=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,ne&&this.reload(),this.transform&&this.update(this.transform)}},X.prototype._loadTile=function(ne,Se){return this._source.loadTile(ne,Se)},X.prototype._unloadTile=function(ne){if(this._source.unloadTile)return this._source.unloadTile(ne,function(){})},X.prototype._abortTile=function(ne){if(this._source.abortTile)return this._source.abortTile(ne,function(){})},X.prototype.serialize=function(){return this._source.serialize()},X.prototype.prepare=function(ne){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(var Se in this._tiles){var Je=this._tiles[Se];Je.upload(ne),Je.prepare(this.map.style.imageManager)}},X.prototype.getIds=function(){return t.values(this._tiles).map(function(ne){return ne.tileID}).sort(Bn).map(function(ne){return ne.key})},X.prototype.getRenderableIds=function(ne){var Se=this,Je=[];for(var xt in this._tiles)this._isIdRenderable(xt,ne)&&Je.push(this._tiles[xt]);return ne?Je.sort(function(At,it){var pt=At.tileID,Rt=it.tileID,or=new t.Point(pt.canonical.x,pt.canonical.y)._rotate(Se.transform.angle),er=new t.Point(Rt.canonical.x,Rt.canonical.y)._rotate(Se.transform.angle);return pt.overscaledZ-Rt.overscaledZ||er.y-or.y||er.x-or.x}).map(function(At){return At.tileID.key}):Je.map(function(At){return At.tileID}).sort(Bn).map(function(At){return At.key})},X.prototype.hasRenderableParent=function(ne){var Se=this.findLoadedParent(ne,0);return Se?this._isIdRenderable(Se.tileID.key):!1},X.prototype._isIdRenderable=function(ne,Se){return this._tiles[ne]&&this._tiles[ne].hasData()&&!this._coveredTiles[ne]&&(Se||!this._tiles[ne].holdingForFade())},X.prototype.reload=function(){if(this._paused){this._shouldReloadOnResume=!0;return}this._cache.reset();for(var ne in this._tiles)this._tiles[ne].state!=="errored"&&this._reloadTile(ne,"reloading")},X.prototype._reloadTile=function(ne,Se){var Je=this._tiles[ne];Je&&(Je.state!=="loading"&&(Je.state=Se),this._loadTile(Je,this._tileLoaded.bind(this,Je,ne,Se)))},X.prototype._tileLoaded=function(ne,Se,Je,xt){if(xt){ne.state="errored",xt.status!==404?this._source.fire(new t.ErrorEvent(xt,{tile:ne})):this.update(this.transform);return}ne.timeAdded=t.browser.now(),Je==="expired"&&(ne.refreshedUponExpiration=!0),this._setTileReloadTimer(Se,ne),this.getSource().type==="raster-dem"&&ne.dem&&this._backfillDEM(ne),this._state.initializeTileState(ne,this.map?this.map.painter:null),this._source.fire(new t.Event("data",{dataType:"source",tile:ne,coord:ne.tileID}))},X.prototype._backfillDEM=function(ne){for(var Se=this.getRenderableIds(),Je=0;Je<Se.length;Je++){var xt=Se[Je];if(ne.neighboringTiles&&ne.neighboringTiles[xt]){var At=this.getTileByID(xt);it(ne,At),it(At,ne)}}function it(pt,Rt){pt.needsHillshadePrepare=!0;var or=Rt.tileID.canonical.x-pt.tileID.canonical.x,er=Rt.tileID.canonical.y-pt.tileID.canonical.y,ur=Math.pow(2,pt.tileID.canonical.z),gr=Rt.tileID.key;or===0&&er===0||Math.abs(er)>1||(Math.abs(or)>1&&(Math.abs(or+ur)===1?or+=ur:Math.abs(or-ur)===1&&(or-=ur)),!(!Rt.dem||!pt.dem)&&(pt.dem.backfillBorder(Rt.dem,or,er),pt.neighboringTiles&&pt.neighboringTiles[gr]&&(pt.neighboringTiles[gr].backfilled=!0)))}},X.prototype.getTile=function(ne){return this.getTileByID(ne.key)},X.prototype.getTileByID=function(ne){return this._tiles[ne]},X.prototype._retainLoadedChildren=function(ne,Se,Je,xt){for(var At in this._tiles){var it=this._tiles[At];if(!(xt[At]||!it.hasData()||it.tileID.overscaledZ<=Se||it.tileID.overscaledZ>Je)){for(var pt=it.tileID;it&&it.tileID.overscaledZ>Se+1;){var Rt=it.tileID.scaledTo(it.tileID.overscaledZ-1);it=this._tiles[Rt.key],it&&it.hasData()&&(pt=Rt)}for(var or=pt;or.overscaledZ>Se;)if(or=or.scaledTo(or.overscaledZ-1),ne[or.key]){xt[pt.key]=pt;break}}}},X.prototype.findLoadedParent=function(ne,Se){if(ne.key in this._loadedParentTiles){var Je=this._loadedParentTiles[ne.key];return Je&&Je.tileID.overscaledZ>=Se?Je:null}for(var xt=ne.overscaledZ-1;xt>=Se;xt--){var At=ne.scaledTo(xt),it=this._getLoadedTile(At);if(it)return it}},X.prototype._getLoadedTile=function(ne){var Se=this._tiles[ne.key];if(Se&&Se.hasData())return Se;var Je=this._cache.getByKey(ne.wrapped().key);return Je},X.prototype.updateCacheSize=function(ne){var Se=Math.ceil(ne.width/this._source.tileSize)+1,Je=Math.ceil(ne.height/this._source.tileSize)+1,xt=Se*Je,At=5,it=Math.floor(xt*At),pt=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,it):it;this._cache.setMaxSize(pt)},X.prototype.handleWrapJump=function(ne){var Se=this._prevLng===void 0?ne:this._prevLng,Je=ne-Se,xt=Je/360,At=Math.round(xt);if(this._prevLng=ne,At){var it={};for(var pt in this._tiles){var Rt=this._tiles[pt];Rt.tileID=Rt.tileID.unwrapTo(Rt.tileID.wrap+At),it[Rt.tileID.key]=Rt}this._tiles=it;for(var or in this._timers)clearTimeout(this._timers[or]),delete this._timers[or];for(var er in this._tiles){var ur=this._tiles[er];this._setTileReloadTimer(er,ur)}}},X.prototype.update=function(ne){var Se=this;if(this.transform=ne,!(!this._sourceLoaded||this._paused)){this.updateCacheSize(ne),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={};var Je;this.used?this._source.tileID?Je=ne.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(Da){return new t.OverscaledTileID(Da.canonical.z,Da.wrap,Da.canonical.z,Da.canonical.x,Da.canonical.y)}):(Je=ne.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(Je=Je.filter(function(Da){return Se._source.hasTile(Da)}))):Je=[];var xt=ne.coveringZoomLevel(this._source),At=Math.max(xt-X.maxOverzooming,this._source.minzoom),it=Math.max(xt+X.maxUnderzooming,this._source.minzoom),pt=this._updateRetainedTiles(Je,xt);if(xa(this._source.type)){for(var Rt={},or={},er=Object.keys(pt),ur=0,gr=er;ur<gr.length;ur+=1){var vr=gr[ur],Zt=pt[vr],ar=this._tiles[vr];if(!(!ar||ar.fadeEndTime&&ar.fadeEndTime<=t.browser.now())){var tr=this.findLoadedParent(Zt,At);tr&&(this._addTile(tr.tileID),Rt[tr.tileID.key]=tr.tileID),or[vr]=Zt}}this._retainLoadedChildren(or,xt,it,pt);for(var Zr in Rt)pt[Zr]||(this._coveredTiles[Zr]=!0,pt[Zr]=Rt[Zr])}for(var un in pt)this._tiles[un].clearFadeHold();for(var En=t.keysDifference(this._tiles,pt),ka=0,ma=En;ka<ma.length;ka+=1){var ha=ma[ka],Pa=this._tiles[ha];Pa.hasSymbolBuckets&&!Pa.holdingForFade()?Pa.setHoldDuration(this.map._fadeDuration):(!Pa.hasSymbolBuckets||Pa.symbolFadeFinished())&&this._removeTile(ha)}this._updateLoadedParentTileCache()}},X.prototype.releaseSymbolFadeTiles=function(){for(var ne in this._tiles)this._tiles[ne].holdingForFade()&&this._removeTile(ne)},X.prototype._updateRetainedTiles=function(ne,Se){for(var Je={},xt={},At=Math.max(Se-X.maxOverzooming,this._source.minzoom),it=Math.max(Se+X.maxUnderzooming,this._source.minzoom),pt={},Rt=0,or=ne;Rt<or.length;Rt+=1){var er=or[Rt],ur=this._addTile(er);Je[er.key]=er,!ur.hasData()&&Se<this._source.maxzoom&&(pt[er.key]=er)}this._retainLoadedChildren(pt,Se,it,Je);for(var gr=0,vr=ne;gr<vr.length;gr+=1){var Zt=vr[gr],ar=this._tiles[Zt.key];if(!ar.hasData()){if(Se+1>this._source.maxzoom){var tr=Zt.children(this._source.maxzoom)[0],Zr=this.getTile(tr);if(Zr&&Zr.hasData()){Je[tr.key]=tr;continue}}else{var un=Zt.children(this._source.maxzoom);if(Je[un[0].key]&&Je[un[1].key]&&Je[un[2].key]&&Je[un[3].key])continue}for(var En=ar.wasRequested(),ka=Zt.overscaledZ-1;ka>=At;--ka){var ma=Zt.scaledTo(ka);if(xt[ma.key]||(xt[ma.key]=!0,ar=this.getTile(ma),!ar&&En&&(ar=this._addTile(ma)),ar&&(Je[ma.key]=ma,En=ar.wasRequested(),ar.hasData())))break}}}return Je},X.prototype._updateLoadedParentTileCache=function(){this._loadedParentTiles={};for(var ne in this._tiles){for(var Se=[],Je=void 0,xt=this._tiles[ne].tileID;xt.overscaledZ>0;){if(xt.key in this._loadedParentTiles){Je=this._loadedParentTiles[xt.key];break}Se.push(xt.key);var At=xt.scaledTo(xt.overscaledZ-1);if(Je=this._getLoadedTile(At),Je)break;xt=At}for(var it=0,pt=Se;it<pt.length;it+=1){var Rt=pt[it];this._loadedParentTiles[Rt]=Je}}},X.prototype._addTile=function(ne){var Se=this._tiles[ne.key];if(Se)return Se;Se=this._cache.getAndRemove(ne),Se&&(this._setTileReloadTimer(ne.key,Se),Se.tileID=ne,this._state.initializeTileState(Se,this.map?this.map.painter:null),this._cacheTimers[ne.key]&&(clearTimeout(this._cacheTimers[ne.key]),delete this._cacheTimers[ne.key],this._setTileReloadTimer(ne.key,Se)));var Je=!!Se;return Je||(Se=new t.Tile(ne,this._source.tileSize*ne.overscaleFactor()),this._loadTile(Se,this._tileLoaded.bind(this,Se,ne.key,Se.state))),Se?(Se.uses++,this._tiles[ne.key]=Se,Je||this._source.fire(new t.Event("dataloading",{tile:Se,coord:Se.tileID,dataType:"source"})),Se):null},X.prototype._setTileReloadTimer=function(ne,Se){var Je=this;ne in this._timers&&(clearTimeout(this._timers[ne]),delete this._timers[ne]);var xt=Se.getExpiryTimeout();xt&&(this._timers[ne]=setTimeout(function(){Je._reloadTile(ne,"expired"),delete Je._timers[ne]},xt))},X.prototype._removeTile=function(ne){var Se=this._tiles[ne];Se&&(Se.uses--,delete this._tiles[ne],this._timers[ne]&&(clearTimeout(this._timers[ne]),delete this._timers[ne]),!(Se.uses>0)&&(Se.hasData()&&Se.state!=="reloading"?this._cache.add(Se.tileID,Se,Se.getExpiryTimeout()):(Se.aborted=!0,this._abortTile(Se),this._unloadTile(Se))))},X.prototype.clearTiles=function(){this._shouldReloadOnResume=!1,this._paused=!1;for(var ne in this._tiles)this._removeTile(ne);this._cache.reset()},X.prototype.tilesIn=function(ne,Se,Je){var xt=this,At=[],it=this.transform;if(!it)return At;for(var pt=Je?it.getCameraQueryGeometry(ne):ne,Rt=ne.map(function(ka){return it.pointCoordinate(ka)}),or=pt.map(function(ka){return it.pointCoordinate(ka)}),er=this.getIds(),ur=1/0,gr=1/0,vr=-1/0,Zt=-1/0,ar=0,tr=or;ar<tr.length;ar+=1){var Zr=tr[ar];ur=Math.min(ur,Zr.x),gr=Math.min(gr,Zr.y),vr=Math.max(vr,Zr.x),Zt=Math.max(Zt,Zr.y)}for(var un=function(ka){var ma=xt._tiles[er[ka]];if(!ma.holdingForFade()){var ha=ma.tileID,Pa=Math.pow(2,it.zoom-ma.tileID.overscaledZ),Da=Se*ma.queryPadding*t.EXTENT/ma.tileSize/Pa,Qa=[ha.getTilePoint(new t.MercatorCoordinate(ur,gr)),ha.getTilePoint(new t.MercatorCoordinate(vr,Zt))];if(Qa[0].x-Da<t.EXTENT&&Qa[0].y-Da<t.EXTENT&&Qa[1].x+Da>=0&&Qa[1].y+Da>=0){var Ra=Rt.map(function(xi){return ha.getTilePoint(xi)}),ii=or.map(function(xi){return ha.getTilePoint(xi)});At.push({tile:ma,tileID:ha,queryGeometry:Ra,cameraQueryGeometry:ii,scale:Pa})}}},En=0;En<er.length;En++)un(En);return At},X.prototype.getVisibleCoordinates=function(ne){for(var Se=this,Je=this.getRenderableIds(ne).map(function(pt){return Se._tiles[pt].tileID}),xt=0,At=Je;xt<At.length;xt+=1){var it=At[xt];it.posMatrix=this.transform.calculatePosMatrix(it.toUnwrapped())}return Je},X.prototype.hasTransition=function(){if(this._source.hasTransition())return!0;if(xa(this._source.type))for(var ne in this._tiles){var Se=this._tiles[ne];if(Se.fadeEndTime!==void 0&&Se.fadeEndTime>=t.browser.now())return!0}return!1},X.prototype.setFeatureState=function(ne,Se,Je){ne=ne||"_geojsonTileLayer",this._state.updateState(ne,Se,Je)},X.prototype.removeFeatureState=function(ne,Se,Je){ne=ne||"_geojsonTileLayer",this._state.removeFeatureState(ne,Se,Je)},X.prototype.getFeatureState=function(ne,Se){return ne=ne||"_geojsonTileLayer",this._state.getState(ne,Se)},X.prototype.setDependencies=function(ne,Se,Je){var xt=this._tiles[ne];xt&&xt.setDependencies(Se,Je)},X.prototype.reloadTilesForDependencies=function(ne,Se){for(var Je in this._tiles){var xt=this._tiles[Je];xt.hasDependency(ne,Se)&&this._reloadTile(Je,"reloading")}this._cache.filter(function(At){return!At.hasDependency(ne,Se)})},X})(t.Evented);Ln.maxOverzooming=10,Ln.maxUnderzooming=3;function Bn(Me,X){var ye=Math.abs(Me.wrap*2)-+(Me.wrap<0),ne=Math.abs(X.wrap*2)-+(X.wrap<0);return Me.overscaledZ-X.overscaledZ||ne-ye||X.canonical.y-Me.canonical.y||X.canonical.x-Me.canonical.x}function xa(Me){return Me==="raster"||Me==="image"||Me==="video"}function za(){return new t.window.Worker(Rs.workerUrl)}var Ia="mapboxgl_preloaded_worker_pool",Ba=function(){this.active={}};Ba.prototype.acquire=function(X){if(!this.workers)for(this.workers=[];this.workers.length<Ba.workerCount;)this.workers.push(new za);return this.active[X]=!0,this.workers.slice()},Ba.prototype.release=function(X){delete this.active[X],this.numActive()===0&&(this.workers.forEach(function(ye){ye.terminate()}),this.workers=null)},Ba.prototype.isPreloaded=function(){return!!this.active[Ia]},Ba.prototype.numActive=function(){return Object.keys(this.active).length};var Ka=Math.floor(t.browser.hardwareConcurrency/2);Ba.workerCount=Math.max(Math.min(Ka,6),1);var fa;function Bi(){return fa||(fa=new Ba),fa}function Yi(){var Me=Bi();Me.acquire(Ia)}function Ht(){var Me=fa;Me&&(Me.isPreloaded()&&Me.numActive()===1?(Me.release(Ia),fa=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 kt(Me,X){var ye={};for(var ne in Me)ne!=="ref"&&(ye[ne]=Me[ne]);return t.refProperties.forEach(function(Se){Se in X&&(ye[Se]=X[Se])}),ye}function qr(Me){Me=Me.slice();for(var X=Object.create(null),ye=0;ye<Me.length;ye++)X[Me[ye].id]=Me[ye];for(var ne=0;ne<Me.length;ne++)"ref"in Me[ne]&&(Me[ne]=kt(Me[ne],X[Me[ne].ref]));return Me}function en(){var Me={},X=t.styleSpec.$version;for(var ye in t.styleSpec.$root){var ne=t.styleSpec.$root[ye];if(ne.required){var Se=null;ye==="version"?Se=X:ne.type==="array"?Se=[]:Se={},Se!=null&&(Me[ye]=Se)}}return Me}var rn={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 Wr(Me,X,ye){ye.push({command:rn.addSource,args:[Me,X[Me]]})}function tn(Me,X,ye){X.push({command:rn.removeSource,args:[Me]}),ye[Me]=!0}function Tn(Me,X,ye,ne){tn(Me,ye,ne),Wr(Me,X,ye)}function dn(Me,X,ye){var ne;for(ne in Me[ye])if(Me[ye].hasOwnProperty(ne)&&ne!=="data"&&!t.deepEqual(Me[ye][ne],X[ye][ne]))return!1;for(ne in X[ye])if(X[ye].hasOwnProperty(ne)&&ne!=="data"&&!t.deepEqual(Me[ye][ne],X[ye][ne]))return!1;return!0}function It(Me,X,ye,ne){Me=Me||{},X=X||{};var Se;for(Se in Me)Me.hasOwnProperty(Se)&&(X.hasOwnProperty(Se)||tn(Se,ye,ne));for(Se in X)X.hasOwnProperty(Se)&&(Me.hasOwnProperty(Se)?t.deepEqual(Me[Se],X[Se])||(Me[Se].type==="geojson"&&X[Se].type==="geojson"&&dn(Me,X,Se)?ye.push({command:rn.setGeoJSONSourceData,args:[Se,X[Se].data]}):Tn(Se,X,ye,ne)):Wr(Se,X,ye))}function xr(Me,X,ye,ne,Se,Je){Me=Me||{},X=X||{};var xt;for(xt in Me)Me.hasOwnProperty(xt)&&(t.deepEqual(Me[xt],X[xt])||ye.push({command:Je,args:[ne,xt,X[xt],Se]}));for(xt in X)!X.hasOwnProperty(xt)||Me.hasOwnProperty(xt)||t.deepEqual(Me[xt],X[xt])||ye.push({command:Je,args:[ne,xt,X[xt],Se]})}function Yr(Me){return Me.id}function An(Me,X){return Me[X.id]=X,Me}function Zn(Me,X,ye){Me=Me||[],X=X||[];var ne=Me.map(Yr),Se=X.map(Yr),Je=Me.reduce(An,{}),xt=X.reduce(An,{}),At=ne.slice(),it=Object.create(null),pt,Rt,or,er,ur,gr,vr;for(pt=0,Rt=0;pt<ne.length;pt++)or=ne[pt],xt.hasOwnProperty(or)?Rt++:(ye.push({command:rn.removeLayer,args:[or]}),At.splice(At.indexOf(or,Rt),1));for(pt=0,Rt=0;pt<Se.length;pt++)or=Se[Se.length-1-pt],At[At.length-1-pt]!==or&&(Je.hasOwnProperty(or)?(ye.push({command:rn.removeLayer,args:[or]}),At.splice(At.lastIndexOf(or,At.length-Rt),1)):Rt++,gr=At[At.length-pt],ye.push({command:rn.addLayer,args:[xt[or],gr]}),At.splice(At.length-pt,0,or),it[or]=!0);for(pt=0;pt<Se.length;pt++)if(or=Se[pt],er=Je[or],ur=xt[or],!(it[or]||t.deepEqual(er,ur))){if(!t.deepEqual(er.source,ur.source)||!t.deepEqual(er["source-layer"],ur["source-layer"])||!t.deepEqual(er.type,ur.type)){ye.push({command:rn.removeLayer,args:[or]}),gr=At[At.lastIndexOf(or)+1],ye.push({command:rn.addLayer,args:[ur,gr]});continue}xr(er.layout,ur.layout,ye,or,null,rn.setLayoutProperty),xr(er.paint,ur.paint,ye,or,null,rn.setPaintProperty),t.deepEqual(er.filter,ur.filter)||ye.push({command:rn.setFilter,args:[or,ur.filter]}),(!t.deepEqual(er.minzoom,ur.minzoom)||!t.deepEqual(er.maxzoom,ur.maxzoom))&&ye.push({command:rn.setLayerZoomRange,args:[or,ur.minzoom,ur.maxzoom]});for(vr in er)er.hasOwnProperty(vr)&&(vr==="layout"||vr==="paint"||vr==="filter"||vr==="metadata"||vr==="minzoom"||vr==="maxzoom"||(vr.indexOf("paint.")===0?xr(er[vr],ur[vr],ye,or,vr.slice(6),rn.setPaintProperty):t.deepEqual(er[vr],ur[vr])||ye.push({command:rn.setLayerProperty,args:[or,vr,ur[vr]]})));for(vr in ur)!ur.hasOwnProperty(vr)||er.hasOwnProperty(vr)||vr==="layout"||vr==="paint"||vr==="filter"||vr==="metadata"||vr==="minzoom"||vr==="maxzoom"||(vr.indexOf("paint.")===0?xr(er[vr],ur[vr],ye,or,vr.slice(6),rn.setPaintProperty):t.deepEqual(er[vr],ur[vr])||ye.push({command:rn.setLayerProperty,args:[or,vr,ur[vr]]}))}}function sa(Me,X){if(!Me)return[{command:rn.setStyle,args:[X]}];var ye=[];try{if(!t.deepEqual(Me.version,X.version))return[{command:rn.setStyle,args:[X]}];t.deepEqual(Me.center,X.center)||ye.push({command:rn.setCenter,args:[X.center]}),t.deepEqual(Me.zoom,X.zoom)||ye.push({command:rn.setZoom,args:[X.zoom]}),t.deepEqual(Me.bearing,X.bearing)||ye.push({command:rn.setBearing,args:[X.bearing]}),t.deepEqual(Me.pitch,X.pitch)||ye.push({command:rn.setPitch,args:[X.pitch]}),t.deepEqual(Me.sprite,X.sprite)||ye.push({command:rn.setSprite,args:[X.sprite]}),t.deepEqual(Me.glyphs,X.glyphs)||ye.push({command:rn.setGlyphs,args:[X.glyphs]}),t.deepEqual(Me.transition,X.transition)||ye.push({command:rn.setTransition,args:[X.transition]}),t.deepEqual(Me.light,X.light)||ye.push({command:rn.setLight,args:[X.light]});var ne={},Se=[];It(Me.sources,X.sources,Se,ne);var Je=[];Me.layers&&Me.layers.forEach(function(xt){ne[xt.source]?ye.push({command:rn.removeLayer,args:[xt.id]}):Je.push(xt)}),ye=ye.concat(Se),Zn(Je,X.layers,ye)}catch(xt){console.warn("Unable to compute style diff:",xt),ye=[{command:rn.setStyle,args:[X]}]}return ye}var oa=function(X,ye){this.reset(X,ye)};oa.prototype.reset=function(X,ye){this.points=X||[],this._distances=[0];for(var ne=1;ne<this.points.length;ne++)this._distances[ne]=this._distances[ne-1]+this.points[ne].dist(this.points[ne-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(ye||0,this.length*.5),this.paddedLength=this.length-this.padding*2},oa.prototype.lerp=function(X){if(this.points.length===1)return this.points[0];X=t.clamp(X,0,1);for(var ye=1,ne=this._distances[ye],Se=X*this.paddedLength+this.padding;ne<Se&&ye<this._distances.length;)ne=this._distances[++ye];var Je=ye-1,xt=this._distances[Je],At=ne-xt,it=At>0?(Se-xt)/At:0;return this.points[Je].mult(1-it).add(this.points[ye].mult(it))};var Sn=function(X,ye,ne){var Se=this.boxCells=[],Je=this.circleCells=[];this.xCellCount=Math.ceil(X/ne),this.yCellCount=Math.ceil(ye/ne);for(var xt=0;xt<this.xCellCount*this.yCellCount;xt++)Se.push([]),Je.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=X,this.height=ye,this.xScale=this.xCellCount/X,this.yScale=this.yCellCount/ye,this.boxUid=0,this.circleUid=0};Sn.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},Sn.prototype.insert=function(X,ye,ne,Se,Je){this._forEachCell(ye,ne,Se,Je,this._insertBoxCell,this.boxUid++),this.boxKeys.push(X),this.bboxes.push(ye),this.bboxes.push(ne),this.bboxes.push(Se),this.bboxes.push(Je)},Sn.prototype.insertCircle=function(X,ye,ne,Se){this._forEachCell(ye-Se,ne-Se,ye+Se,ne+Se,this._insertCircleCell,this.circleUid++),this.circleKeys.push(X),this.circles.push(ye),this.circles.push(ne),this.circles.push(Se)},Sn.prototype._insertBoxCell=function(X,ye,ne,Se,Je,xt){this.boxCells[Je].push(xt)},Sn.prototype._insertCircleCell=function(X,ye,ne,Se,Je,xt){this.circleCells[Je].push(xt)},Sn.prototype._query=function(X,ye,ne,Se,Je,xt){if(ne<0||X>this.width||Se<0||ye>this.height)return Je?!1:[];var At=[];if(X<=0&&ye<=0&&this.width<=ne&&this.height<=Se){if(Je)return!0;for(var it=0;it<this.boxKeys.length;it++)At.push({key:this.boxKeys[it],x1:this.bboxes[it*4],y1:this.bboxes[it*4+1],x2:this.bboxes[it*4+2],y2:this.bboxes[it*4+3]});for(var pt=0;pt<this.circleKeys.length;pt++){var Rt=this.circles[pt*3],or=this.circles[pt*3+1],er=this.circles[pt*3+2];At.push({key:this.circleKeys[pt],x1:Rt-er,y1:or-er,x2:Rt+er,y2:or+er})}return xt?At.filter(xt):At}else{var ur={hitTest:Je,seenUids:{box:{},circle:{}}};return this._forEachCell(X,ye,ne,Se,this._queryCell,At,ur,xt),Je?At.length>0:At}},Sn.prototype._queryCircle=function(X,ye,ne,Se,Je){var xt=X-ne,At=X+ne,it=ye-ne,pt=ye+ne;if(At<0||xt>this.width||pt<0||it>this.height)return Se?!1:[];var Rt=[],or={hitTest:Se,circle:{x:X,y:ye,radius:ne},seenUids:{box:{},circle:{}}};return this._forEachCell(xt,it,At,pt,this._queryCellCircle,Rt,or,Je),Se?Rt.length>0:Rt},Sn.prototype.query=function(X,ye,ne,Se,Je){return this._query(X,ye,ne,Se,!1,Je)},Sn.prototype.hitTest=function(X,ye,ne,Se,Je){return this._query(X,ye,ne,Se,!0,Je)},Sn.prototype.hitTestCircle=function(X,ye,ne,Se){return this._queryCircle(X,ye,ne,!0,Se)},Sn.prototype._queryCell=function(X,ye,ne,Se,Je,xt,At,it){var pt=At.seenUids,Rt=this.boxCells[Je];if(Rt!==null)for(var or=this.bboxes,er=0,ur=Rt;er<ur.length;er+=1){var gr=ur[er];if(!pt.box[gr]){pt.box[gr]=!0;var vr=gr*4;if(X<=or[vr+2]&&ye<=or[vr+3]&&ne>=or[vr+0]&&Se>=or[vr+1]&&(!it||it(this.boxKeys[gr]))){if(At.hitTest)return xt.push(!0),!0;xt.push({key:this.boxKeys[gr],x1:or[vr],y1:or[vr+1],x2:or[vr+2],y2:or[vr+3]})}}}var Zt=this.circleCells[Je];if(Zt!==null)for(var ar=this.circles,tr=0,Zr=Zt;tr<Zr.length;tr+=1){var un=Zr[tr];if(!pt.circle[un]){pt.circle[un]=!0;var En=un*3;if(this._circleAndRectCollide(ar[En],ar[En+1],ar[En+2],X,ye,ne,Se)&&(!it||it(this.circleKeys[un]))){if(At.hitTest)return xt.push(!0),!0;var ka=ar[En],ma=ar[En+1],ha=ar[En+2];xt.push({key:this.circleKeys[un],x1:ka-ha,y1:ma-ha,x2:ka+ha,y2:ma+ha})}}}},Sn.prototype._queryCellCircle=function(X,ye,ne,Se,Je,xt,At,it){var pt=At.circle,Rt=At.seenUids,or=this.boxCells[Je];if(or!==null)for(var er=this.bboxes,ur=0,gr=or;ur<gr.length;ur+=1){var vr=gr[ur];if(!Rt.box[vr]){Rt.box[vr]=!0;var Zt=vr*4;if(this._circleAndRectCollide(pt.x,pt.y,pt.radius,er[Zt+0],er[Zt+1],er[Zt+2],er[Zt+3])&&(!it||it(this.boxKeys[vr])))return xt.push(!0),!0}}var ar=this.circleCells[Je];if(ar!==null)for(var tr=this.circles,Zr=0,un=ar;Zr<un.length;Zr+=1){var En=un[Zr];if(!Rt.circle[En]){Rt.circle[En]=!0;var ka=En*3;if(this._circlesCollide(tr[ka],tr[ka+1],tr[ka+2],pt.x,pt.y,pt.radius)&&(!it||it(this.circleKeys[En])))return xt.push(!0),!0}}},Sn.prototype._forEachCell=function(X,ye,ne,Se,Je,xt,At,it){for(var pt=this._convertToXCellCoord(X),Rt=this._convertToYCellCoord(ye),or=this._convertToXCellCoord(ne),er=this._convertToYCellCoord(Se),ur=pt;ur<=or;ur++)for(var gr=Rt;gr<=er;gr++){var vr=this.xCellCount*gr+ur;if(Je.call(this,X,ye,ne,Se,vr,xt,At,it))return}},Sn.prototype._convertToXCellCoord=function(X){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(X*this.xScale)))},Sn.prototype._convertToYCellCoord=function(X){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(X*this.yScale)))},Sn.prototype._circlesCollide=function(X,ye,ne,Se,Je,xt){var At=Se-X,it=Je-ye,pt=ne+xt;return pt*pt>At*At+it*it},Sn.prototype._circleAndRectCollide=function(X,ye,ne,Se,Je,xt,At){var it=(xt-Se)/2,pt=Math.abs(X-(Se+it));if(pt>it+ne)return!1;var Rt=(At-Je)/2,or=Math.abs(ye-(Je+Rt));if(or>Rt+ne)return!1;if(pt<=it||or<=Rt)return!0;var er=pt-it,ur=or-Rt;return er*er+ur*ur<=ne*ne};function Kn(Me,X,ye,ne,Se){var Je=t.create();return X?(t.scale(Je,Je,[1/Se,1/Se,1]),ye||t.rotateZ(Je,Je,ne.angle)):t.multiply(Je,ne.labelPlaneMatrix,Me),Je}function Ui(Me,X,ye,ne,Se){if(X){var Je=t.clone(Me);return t.scale(Je,Je,[Se,Se,1]),ye||t.rotateZ(Je,Je,-ne.angle),Je}else return ne.glCoordMatrix}function Za(Me,X){var ye=[Me.x,Me.y,0,1];hs(ye,ye,X);var ne=ye[3];return{point:new t.Point(ye[0]/ne,ye[1]/ne),signedDistanceFromCamera:ne}}function Ki(Me,X){return .5+.5*(Me/X)}function ho(Me,X){var ye=Me[0]/Me[3],ne=Me[1]/Me[3],Se=ye>=-X[0]&&ye<=X[0]&&ne>=-X[1]&&ne<=X[1];return Se}function Co(Me,X,ye,ne,Se,Je,xt,At){var it=ne?Me.textSizeData:Me.iconSizeData,pt=t.evaluateSizeForZoom(it,ye.transform.zoom),Rt=[256/ye.width*2+1,256/ye.height*2+1],or=ne?Me.text.dynamicLayoutVertexArray:Me.icon.dynamicLayoutVertexArray;or.clear();for(var er=Me.lineVertexArray,ur=ne?Me.text.placedSymbolArray:Me.icon.placedSymbolArray,gr=ye.transform.width/ye.transform.height,vr=!1,Zt=0;Zt<ur.length;Zt++){var ar=ur.get(Zt);if(ar.hidden||ar.writingMode===t.WritingMode.vertical&&!vr){As(ar.numGlyphs,or);continue}vr=!1;var tr=[ar.anchorX,ar.anchorY,0,1];if(t.transformMat4(tr,tr,X),!ho(tr,Rt)){As(ar.numGlyphs,or);continue}var Zr=tr[3],un=Ki(ye.transform.cameraToCenterDistance,Zr),En=t.evaluateSizeForFeature(it,pt,ar),ka=xt?En/un:En*un,ma=new t.Point(ar.anchorX,ar.anchorY),ha=Za(ma,Se).point,Pa={},Da=Oi(ar,ka,!1,At,X,Se,Je,Me.glyphOffsetArray,er,or,ha,ma,Pa,gr);vr=Da.useVertical,(Da.notEnoughRoom||vr||Da.needsFlipping&&Oi(ar,ka,!0,At,X,Se,Je,Me.glyphOffsetArray,er,or,ha,ma,Pa,gr).notEnoughRoom)&&As(ar.numGlyphs,or)}ne?Me.text.dynamicLayoutVertexBuffer.updateData(or):Me.icon.dynamicLayoutVertexBuffer.updateData(or)}function So(Me,X,ye,ne,Se,Je,xt,At,it,pt,Rt){var or=At.glyphStartIndex+At.numGlyphs,er=At.lineStartIndex,ur=At.lineStartIndex+At.lineLength,gr=X.getoffsetX(At.glyphStartIndex),vr=X.getoffsetX(or-1),Zt=as(Me*gr,ye,ne,Se,Je,xt,At.segment,er,ur,it,pt,Rt);if(!Zt)return null;var ar=as(Me*vr,ye,ne,Se,Je,xt,At.segment,er,ur,it,pt,Rt);return ar?{first:Zt,last:ar}:null}function Vo(Me,X,ye,ne){if(Me===t.WritingMode.horizontal){var Se=Math.abs(ye.y-X.y),Je=Math.abs(ye.x-X.x)*ne;if(Se>Je)return{useVertical:!0}}return(Me===t.WritingMode.vertical?X.y<ye.y:X.x>ye.x)?{needsFlipping:!0}:null}function Oi(Me,X,ye,ne,Se,Je,xt,At,it,pt,Rt,or,er,ur){var gr=X/24,vr=Me.lineOffsetX*gr,Zt=Me.lineOffsetY*gr,ar;if(Me.numGlyphs>1){var tr=Me.glyphStartIndex+Me.numGlyphs,Zr=Me.lineStartIndex,un=Me.lineStartIndex+Me.lineLength,En=So(gr,At,vr,Zt,ye,Rt,or,Me,it,Je,er);if(!En)return{notEnoughRoom:!0};var ka=Za(En.first.point,xt).point,ma=Za(En.last.point,xt).point;if(ne&&!ye){var ha=Vo(Me.writingMode,ka,ma,ur);if(ha)return ha}ar=[En.first];for(var Pa=Me.glyphStartIndex+1;Pa<tr-1;Pa++)ar.push(as(gr*At.getoffsetX(Pa),vr,Zt,ye,Rt,or,Me.segment,Zr,un,it,Je,er));ar.push(En.last)}else{if(ne&&!ye){var Da=Za(or,Se).point,Qa=Me.lineStartIndex+Me.segment+1,Ra=new t.Point(it.getx(Qa),it.gety(Qa)),ii=Za(Ra,Se),xi=ii.signedDistanceFromCamera>0?ii.point:ps(or,Ra,Da,1,Se),Xi=Vo(Me.writingMode,Da,xi,ur);if(Xi)return Xi}var co=as(gr*At.getoffsetX(Me.glyphStartIndex),vr,Zt,ye,Rt,or,Me.segment,Me.lineStartIndex,Me.lineStartIndex+Me.lineLength,it,Je,er);if(!co)return{notEnoughRoom:!0};ar=[co]}for(var Is=0,Cs=ar;Is<Cs.length;Is+=1){var kl=Cs[Is];t.addDynamicAttributes(pt,kl.point,kl.angle)}return{}}function ps(Me,X,ye,ne,Se){var Je=Za(Me.add(Me.sub(X)._unit()),Se).point,xt=ye.sub(Je);return ye.add(xt._mult(ne/xt.mag()))}function as(Me,X,ye,ne,Se,Je,xt,At,it,pt,Rt,or){var er=ne?Me-X:Me+X,ur=er>0?1:-1,gr=0;ne&&(ur*=-1,gr=Math.PI),ur<0&&(gr+=Math.PI);for(var vr=ur>0?At+xt:At+xt+1,Zt=Se,ar=Se,tr=0,Zr=0,un=Math.abs(er),En=[];tr+Zr<=un;){if(vr+=ur,vr<At||vr>=it)return null;if(ar=Zt,En.push(Zt),Zt=or[vr],Zt===void 0){var ka=new t.Point(pt.getx(vr),pt.gety(vr)),ma=Za(ka,Rt);if(ma.signedDistanceFromCamera>0)Zt=or[vr]=ma.point;else{var ha=vr-ur,Pa=tr===0?Je:new t.Point(pt.getx(ha),pt.gety(ha));Zt=ps(Pa,ka,ar,un-tr+1,Rt)}}tr+=Zr,Zr=ar.dist(Zt)}var Da=(un-tr)/Zr,Qa=Zt.sub(ar),Ra=Qa.mult(Da)._add(ar);Ra._add(Qa._unit()._perp()._mult(ye*ur));var ii=gr+Math.atan2(Zt.y-ar.y,Zt.x-ar.x);return En.push(Ra),{point:Ra,angle:ii,path:En}}var rl=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function As(Me,X){for(var ye=0;ye<Me;ye++){var ne=X.length;X.resize(ne+4),X.float32.set(rl,ne*3)}}function hs(Me,X,ye){var ne=X[0],Se=X[1];return Me[0]=ye[0]*ne+ye[4]*Se+ye[12],Me[1]=ye[1]*ne+ye[5]*Se+ye[13],Me[3]=ye[3]*ne+ye[7]*Se+ye[15],Me}var ts=100,nl=function(X,ye,ne){ye===void 0&&(ye=new Sn(X.width+2*ts,X.height+2*ts,25)),ne===void 0&&(ne=new Sn(X.width+2*ts,X.height+2*ts,25)),this.transform=X,this.grid=ye,this.ignoredGrid=ne,this.pitchfactor=Math.cos(X._pitch)*X.cameraToCenterDistance,this.screenRightBoundary=X.width+ts,this.screenBottomBoundary=X.height+ts,this.gridRightBoundary=X.width+2*ts,this.gridBottomBoundary=X.height+2*ts};nl.prototype.placeCollisionBox=function(X,ye,ne,Se,Je){var xt=this.projectAndGetPerspectiveRatio(Se,X.anchorPointX,X.anchorPointY),At=ne*xt.perspectiveRatio,it=X.x1*At+xt.point.x,pt=X.y1*At+xt.point.y,Rt=X.x2*At+xt.point.x,or=X.y2*At+xt.point.y;return!this.isInsideGrid(it,pt,Rt,or)||!ye&&this.grid.hitTest(it,pt,Rt,or,Je)?{box:[],offscreen:!1}:{box:[it,pt,Rt,or],offscreen:this.isOffscreen(it,pt,Rt,or)}},nl.prototype.placeCollisionCircles=function(X,ye,ne,Se,Je,xt,At,it,pt,Rt,or,er,ur){var gr=[],vr=new t.Point(ye.anchorX,ye.anchorY),Zt=Za(vr,xt),ar=Ki(this.transform.cameraToCenterDistance,Zt.signedDistanceFromCamera),tr=Rt?Je/ar:Je*ar,Zr=tr/t.ONE_EM,un=Za(vr,At).point,En={},ka=ye.lineOffsetX*Zr,ma=ye.lineOffsetY*Zr,ha=So(Zr,Se,ka,ma,!1,un,vr,ye,ne,At,En),Pa=!1,Da=!1,Qa=!0;if(ha){for(var Ra=er*.5*ar+ur,ii=new t.Point(-ts,-ts),xi=new t.Point(this.screenRightBoundary,this.screenBottomBoundary),Xi=new oa,co=ha.first,Is=ha.last,Cs=[],kl=co.path.length-1;kl>=1;kl--)Cs.push(co.path[kl]);for(var Tl=1;Tl<Is.path.length;Tl++)Cs.push(Is.path[Tl]);var Rl=Ra*2.5;if(it){var Pl=Cs.map(function(kp){return Za(kp,it)});Pl.some(function(kp){return kp.signedDistanceFromCamera<=0})?Cs=[]:Cs=Pl.map(function(kp){return kp.point})}var fc=[];if(Cs.length>0){for(var yl=Cs[0].clone(),Lu=Cs[0].clone(),ch=1;ch<Cs.length;ch++)yl.x=Math.min(yl.x,Cs[ch].x),yl.y=Math.min(yl.y,Cs[ch].y),Lu.x=Math.max(Lu.x,Cs[ch].x),Lu.y=Math.max(Lu.y,Cs[ch].y);yl.x>=ii.x&&Lu.x<=xi.x&&yl.y>=ii.y&&Lu.y<=xi.y?fc=[Cs]:Lu.x<ii.x||yl.x>xi.x||Lu.y<ii.y||yl.y>xi.y?fc=[]:fc=t.clipLine([Cs],ii.x,ii.y,xi.x,xi.y)}for(var Uh=0,Ep=fc;Uh<Ep.length;Uh+=1){var Mp=Ep[Uh];Xi.reset(Mp,Ra*.25);var Ev=0;Xi.length<=.5*Ra?Ev=1:Ev=Math.ceil(Xi.paddedLength/Rl)+1;for(var Qp=0;Qp<Ev;Qp++){var ng=Qp/Math.max(Ev-1,1),dm=Xi.lerp(ng),Mv=dm.x+ts,vm=dm.y+ts;gr.push(Mv,vm,Ra,0);var Xv=Mv-Ra,Cv=vm-Ra,Cp=Mv+Ra,em=vm+Ra;if(Qa=Qa&&this.isOffscreen(Xv,Cv,Cp,em),Da=Da||this.isInsideGrid(Xv,Cv,Cp,em),!X&&this.grid.hitTestCircle(Mv,vm,Ra,or)&&(Pa=!0,!pt))return{circles:[],offscreen:!1,collisionDetected:Pa}}}}return{circles:!pt&&Pa||!Da?[]:gr,offscreen:Qa,collisionDetected:Pa}},nl.prototype.queryRenderedSymbols=function(X){if(X.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};for(var ye=[],ne=1/0,Se=1/0,Je=-1/0,xt=-1/0,At=0,it=X;At<it.length;At+=1){var pt=it[At],Rt=new t.Point(pt.x+ts,pt.y+ts);ne=Math.min(ne,Rt.x),Se=Math.min(Se,Rt.y),Je=Math.max(Je,Rt.x),xt=Math.max(xt,Rt.y),ye.push(Rt)}for(var or=this.grid.query(ne,Se,Je,xt).concat(this.ignoredGrid.query(ne,Se,Je,xt)),er={},ur={},gr=0,vr=or;gr<vr.length;gr+=1){var Zt=vr[gr],ar=Zt.key;if(er[ar.bucketInstanceId]===void 0&&(er[ar.bucketInstanceId]={}),!er[ar.bucketInstanceId][ar.featureIndex]){var tr=[new t.Point(Zt.x1,Zt.y1),new t.Point(Zt.x2,Zt.y1),new t.Point(Zt.x2,Zt.y2),new t.Point(Zt.x1,Zt.y2)];t.polygonIntersectsPolygon(ye,tr)&&(er[ar.bucketInstanceId][ar.featureIndex]=!0,ur[ar.bucketInstanceId]===void 0&&(ur[ar.bucketInstanceId]=[]),ur[ar.bucketInstanceId].push(ar.featureIndex))}}return ur},nl.prototype.insertCollisionBox=function(X,ye,ne,Se,Je){var xt=ye?this.ignoredGrid:this.grid,At={bucketInstanceId:ne,featureIndex:Se,collisionGroupID:Je};xt.insert(At,X[0],X[1],X[2],X[3])},nl.prototype.insertCollisionCircles=function(X,ye,ne,Se,Je){for(var xt=ye?this.ignoredGrid:this.grid,At={bucketInstanceId:ne,featureIndex:Se,collisionGroupID:Je},it=0;it<X.length;it+=4)xt.insertCircle(At,X[it],X[it+1],X[it+2])},nl.prototype.projectAndGetPerspectiveRatio=function(X,ye,ne){var Se=[ye,ne,0,1];hs(Se,Se,X);var Je=new t.Point((Se[0]/Se[3]+1)/2*this.transform.width+ts,(-Se[1]/Se[3]+1)/2*this.transform.height+ts);return{point:Je,perspectiveRatio:.5+.5*(this.transform.cameraToCenterDistance/Se[3])}},nl.prototype.isOffscreen=function(X,ye,ne,Se){return ne<ts||X>=this.screenRightBoundary||Se<ts||ye>this.screenBottomBoundary},nl.prototype.isInsideGrid=function(X,ye,ne,Se){return ne>=0&&X<this.gridRightBoundary&&Se>=0&&ye<this.gridBottomBoundary},nl.prototype.getViewportMatrix=function(){var X=t.identity([]);return t.translate(X,X,[-ts,-ts,0]),X};function Qs(Me,X,ye){return X*(t.EXTENT/(Me.tileSize*Math.pow(2,ye-Me.tileID.overscaledZ)))}var _l=function(X,ye,ne,Se){X?this.opacity=Math.max(0,Math.min(1,X.opacity+(X.placed?ye:-ye))):this.opacity=Se&&ne?1:0,this.placed=ne};_l.prototype.isHidden=function(){return this.opacity===0&&!this.placed};var Ss=function(X,ye,ne,Se,Je){this.text=new _l(X?X.text:null,ye,ne,Je),this.icon=new _l(X?X.icon:null,ye,Se,Je)};Ss.prototype.isHidden=function(){return this.text.isHidden()&&this.icon.isHidden()};var ls=function(X,ye,ne){this.text=X,this.icon=ye,this.skipFade=ne},Oo=function(){this.invProjMatrix=t.create(),this.viewportMatrix=t.create(),this.circles=[]},Es=function(X,ye,ne,Se,Je){this.bucketInstanceId=X,this.featureIndex=ye,this.sourceLayerIndex=ne,this.bucketIndex=Se,this.tileID=Je},xl=function(X){this.crossSourceCollisions=X,this.maxGroupID=0,this.collisionGroups={}};xl.prototype.get=function(X){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[X]){var ye=++this.maxGroupID;this.collisionGroups[X]={ID:ye,predicate:function(ne){return ne.collisionGroupID===ye}}}return this.collisionGroups[X]};function Ul(Me,X,ye,ne,Se){var Je=t.getAnchorAlignment(Me),xt=Je.horizontalAlign,At=Je.verticalAlign,it=-(xt-.5)*X,pt=-(At-.5)*ye,Rt=t.evaluateVariableOffset(Me,ne);return new t.Point(it+Rt[0]*Se,pt+Rt[1]*Se)}function Hl(Me,X,ye,ne,Se,Je){var xt=Me.x1,At=Me.x2,it=Me.y1,pt=Me.y2,Rt=Me.anchorPointX,or=Me.anchorPointY,er=new t.Point(X,ye);return ne&&er._rotate(Se?Je:-Je),{x1:xt+er.x,y1:it+er.y,x2:At+er.x,y2:pt+er.y,anchorPointX:Rt,anchorPointY:or}}var Fs=function(X,ye,ne,Se){this.transform=X.clone(),this.collisionIndex=new nl(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=ye,this.retainedQueryData={},this.collisionGroups=new xl(ne),this.collisionCircleArrays={},this.prevPlacement=Se,Se&&(Se.prevPlacement=void 0),this.placedOrientations={}};Fs.prototype.getBucketParts=function(X,ye,ne,Se){var Je=ne.getBucket(ye),xt=ne.latestFeatureIndex;if(!(!Je||!xt||ye.id!==Je.layerIds[0])){var At=ne.collisionBoxArray,it=Je.layers[0].layout,pt=Math.pow(2,this.transform.zoom-ne.tileID.overscaledZ),Rt=ne.tileSize/t.EXTENT,or=this.transform.calculatePosMatrix(ne.tileID.toUnwrapped()),er=it.get("text-pitch-alignment")==="map",ur=it.get("text-rotation-alignment")==="map",gr=Qs(ne,1,this.transform.zoom),vr=Kn(or,er,ur,this.transform,gr),Zt=null;if(er){var ar=Ui(or,er,ur,this.transform,gr);Zt=t.multiply([],this.transform.labelPlaneMatrix,ar)}this.retainedQueryData[Je.bucketInstanceId]=new Es(Je.bucketInstanceId,xt,Je.sourceLayerIndex,Je.index,ne.tileID);var tr={bucket:Je,layout:it,posMatrix:or,textLabelPlaneMatrix:vr,labelToScreenMatrix:Zt,scale:pt,textPixelRatio:Rt,holdingForFade:ne.holdingForFade(),collisionBoxArray:At,partiallyEvaluatedTextSize:t.evaluateSizeForZoom(Je.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(Je.sourceID)};if(Se)for(var Zr=0,un=Je.sortKeyRanges;Zr<un.length;Zr+=1){var En=un[Zr],ka=En.sortKey,ma=En.symbolInstanceStart,ha=En.symbolInstanceEnd;X.push({sortKey:ka,symbolInstanceStart:ma,symbolInstanceEnd:ha,parameters:tr})}else X.push({symbolInstanceStart:0,symbolInstanceEnd:Je.symbolInstances.length,parameters:tr})}},Fs.prototype.attemptAnchorPlacement=function(X,ye,ne,Se,Je,xt,At,it,pt,Rt,or,er,ur,gr,vr){var Zt=[er.textOffset0,er.textOffset1],ar=Ul(X,ne,Se,Zt,Je),tr=this.collisionIndex.placeCollisionBox(Hl(ye,ar.x,ar.y,xt,At,this.transform.angle),or,it,pt,Rt.predicate);if(vr){var Zr=this.collisionIndex.placeCollisionBox(Hl(vr,ar.x,ar.y,xt,At,this.transform.angle),or,it,pt,Rt.predicate);if(Zr.box.length===0)return}if(tr.box.length>0){var un;return this.prevPlacement&&this.prevPlacement.variableOffsets[er.crossTileID]&&this.prevPlacement.placements[er.crossTileID]&&this.prevPlacement.placements[er.crossTileID].text&&(un=this.prevPlacement.variableOffsets[er.crossTileID].anchor),this.variableOffsets[er.crossTileID]={textOffset:Zt,width:ne,height:Se,anchor:X,textBoxScale:Je,prevAnchor:un},this.markUsedJustification(ur,X,er,gr),ur.allowVerticalPlacement&&(this.markUsedOrientation(ur,gr,er),this.placedOrientations[er.crossTileID]=gr),{shift:ar,placedGlyphBoxes:tr}}},Fs.prototype.placeLayerBucketPart=function(X,ye,ne){var Se=this,Je=X.parameters,xt=Je.bucket,At=Je.layout,it=Je.posMatrix,pt=Je.textLabelPlaneMatrix,Rt=Je.labelToScreenMatrix,or=Je.textPixelRatio,er=Je.holdingForFade,ur=Je.collisionBoxArray,gr=Je.partiallyEvaluatedTextSize,vr=Je.collisionGroup,Zt=At.get("text-optional"),ar=At.get("icon-optional"),tr=At.get("text-allow-overlap"),Zr=At.get("icon-allow-overlap"),un=At.get("text-rotation-alignment")==="map",En=At.get("text-pitch-alignment")==="map",ka=At.get("icon-text-fit")!=="none",ma=At.get("symbol-z-order")==="viewport-y",ha=tr&&(Zr||!xt.hasIconData()||ar),Pa=Zr&&(tr||!xt.hasTextData()||Zt);!xt.collisionArrays&&ur&&xt.deserializeCollisionBoxes(ur);var Da=function(co,Is){if(!ye[co.crossTileID]){if(er){Se.placements[co.crossTileID]=new ls(!1,!1,!1);return}var Cs=!1,kl=!1,Tl=!0,Rl=null,Pl={box:null,offscreen:null},fc={box:null},yl=null,Lu=null,ch=null,Uh=0,Ep=0,Mp=0;Is.textFeatureIndex?Uh=Is.textFeatureIndex:co.useRuntimeCollisionCircles&&(Uh=co.featureIndex),Is.verticalTextFeatureIndex&&(Ep=Is.verticalTextFeatureIndex);var Ev=Is.textBox;if(Ev){var Qp=function(Pf){var Tc=t.WritingMode.horizontal;if(xt.allowVerticalPlacement&&!Pf&&Se.prevPlacement){var kv=Se.prevPlacement.placedOrientations[co.crossTileID];kv&&(Se.placedOrientations[co.crossTileID]=kv,Tc=kv,Se.markUsedOrientation(xt,Tc,co))}return Tc},ng=function(Pf,Tc){if(xt.allowVerticalPlacement&&co.numVerticalGlyphVertices>0&&Is.verticalTextBox)for(var kv=0,l1=xt.writingModes;kv<l1.length;kv+=1){var O_=l1[kv];if(O_===t.WritingMode.vertical?(Pl=Tc(),fc=Pl):Pl=Pf(),Pl&&Pl.box&&Pl.box.length)break}else Pl=Pf()};if(At.get("text-variable-anchor")){var Xv=At.get("text-variable-anchor");if(Se.prevPlacement&&Se.prevPlacement.variableOffsets[co.crossTileID]){var Cv=Se.prevPlacement.variableOffsets[co.crossTileID];Xv.indexOf(Cv.anchor)>0&&(Xv=Xv.filter(function(Pf){return Pf!==Cv.anchor}),Xv.unshift(Cv.anchor))}var Cp=function(Pf,Tc,kv){for(var l1=Pf.x2-Pf.x1,O_=Pf.y2-Pf.y1,Oc=co.textBoxScale,jb=ka&&!Zr?Tc:null,ny={box:[],offscreen:!1},b3=tr?Xv.length*2:Xv.length,Pp=0;Pp<b3;++Pp){var ay=Xv[Pp%Xv.length],w3=Pp>=Xv.length,Ub=Se.attemptAnchorPlacement(ay,Pf,l1,O_,Oc,un,En,or,it,vr,w3,co,xt,kv,jb);if(Ub&&(ny=Ub.placedGlyphBoxes,ny&&ny.box&&ny.box.length)){Cs=!0,Rl=Ub.shift;break}}return ny},em=function(){return Cp(Ev,Is.iconBox,t.WritingMode.horizontal)},kp=function(){var Pf=Is.verticalTextBox,Tc=Pl&&Pl.box&&Pl.box.length;return xt.allowVerticalPlacement&&!Tc&&co.numVerticalGlyphVertices>0&&Pf?Cp(Pf,Is.verticalIconBox,t.WritingMode.vertical):{box:null,offscreen:null}};ng(em,kp),Pl&&(Cs=Pl.box,Tl=Pl.offscreen);var i1=Qp(Pl&&Pl.box);if(!Cs&&Se.prevPlacement){var ag=Se.prevPlacement.variableOffsets[co.crossTileID];ag&&(Se.variableOffsets[co.crossTileID]=ag,Se.markUsedJustification(xt,ag.anchor,co,i1))}}else{var dm=function(Pf,Tc){var kv=Se.collisionIndex.placeCollisionBox(Pf,tr,or,it,vr.predicate);return kv&&kv.box&&kv.box.length&&(Se.markUsedOrientation(xt,Tc,co),Se.placedOrientations[co.crossTileID]=Tc),kv},Mv=function(){return dm(Ev,t.WritingMode.horizontal)},vm=function(){var Pf=Is.verticalTextBox;return xt.allowVerticalPlacement&&co.numVerticalGlyphVertices>0&&Pf?dm(Pf,t.WritingMode.vertical):{box:null,offscreen:null}};ng(Mv,vm),Qp(Pl&&Pl.box&&Pl.box.length)}}if(yl=Pl,Cs=yl&&yl.box&&yl.box.length>0,Tl=yl&&yl.offscreen,co.useRuntimeCollisionCircles){var vd=xt.text.placedSymbolArray.get(co.centerJustifiedTextSymbolIndex),ig=t.evaluateSizeForFeature(xt.textSizeData,gr,vd),o1=At.get("text-padding"),Kd=co.collisionCircleDiameter;Lu=Se.collisionIndex.placeCollisionCircles(tr,vd,xt.lineVertexArray,xt.glyphOffsetArray,ig,it,pt,Rt,ne,En,vr.predicate,Kd,o1),Cs=tr||Lu.circles.length>0&&!Lu.collisionDetected,Tl=Tl&&Lu.offscreen}if(Is.iconFeatureIndex&&(Mp=Is.iconFeatureIndex),Is.iconBox){var ey=function(Pf){var Tc=ka&&Rl?Hl(Pf,Rl.x,Rl.y,un,En,Se.transform.angle):Pf;return Se.collisionIndex.placeCollisionBox(Tc,Zr,or,it,vr.predicate)};fc&&fc.box&&fc.box.length&&Is.verticalIconBox?(ch=ey(Is.verticalIconBox),kl=ch.box.length>0):(ch=ey(Is.iconBox),kl=ch.box.length>0),Tl=Tl&&ch.offscreen}var I_=Zt||co.numHorizontalGlyphVertices===0&&co.numVerticalGlyphVertices===0,D_=ar||co.numIconVertices===0;if(!I_&&!D_?kl=Cs=kl&&Cs:D_?I_||(kl=kl&&Cs):Cs=kl&&Cs,Cs&&yl&&yl.box&&(fc&&fc.box&&Ep?Se.collisionIndex.insertCollisionBox(yl.box,At.get("text-ignore-placement"),xt.bucketInstanceId,Ep,vr.ID):Se.collisionIndex.insertCollisionBox(yl.box,At.get("text-ignore-placement"),xt.bucketInstanceId,Uh,vr.ID)),kl&&ch&&Se.collisionIndex.insertCollisionBox(ch.box,At.get("icon-ignore-placement"),xt.bucketInstanceId,Mp,vr.ID),Lu&&(Cs&&Se.collisionIndex.insertCollisionCircles(Lu.circles,At.get("text-ignore-placement"),xt.bucketInstanceId,Uh,vr.ID),ne)){var s1=xt.bucketInstanceId,ty=Se.collisionCircleArrays[s1];ty===void 0&&(ty=Se.collisionCircleArrays[s1]=new Oo);for(var ry=0;ry<Lu.circles.length;ry+=4)ty.circles.push(Lu.circles[ry+0]),ty.circles.push(Lu.circles[ry+1]),ty.circles.push(Lu.circles[ry+2]),ty.circles.push(Lu.collisionDetected?1:0)}Se.placements[co.crossTileID]=new ls(Cs||ha,kl||Pa,Tl||xt.justReloaded),ye[co.crossTileID]=!0}};if(ma)for(var Qa=xt.getSortedSymbolIndexes(this.transform.angle),Ra=Qa.length-1;Ra>=0;--Ra){var ii=Qa[Ra];Da(xt.symbolInstances.get(ii),xt.collisionArrays[ii])}else for(var xi=X.symbolInstanceStart;xi<X.symbolInstanceEnd;xi++)Da(xt.symbolInstances.get(xi),xt.collisionArrays[xi]);if(ne&&xt.bucketInstanceId in this.collisionCircleArrays){var Xi=this.collisionCircleArrays[xt.bucketInstanceId];t.invert(Xi.invProjMatrix,it),Xi.viewportMatrix=this.collisionIndex.getViewportMatrix()}xt.justReloaded=!1},Fs.prototype.markUsedJustification=function(X,ye,ne,Se){var Je={left:ne.leftJustifiedTextSymbolIndex,center:ne.centerJustifiedTextSymbolIndex,right:ne.rightJustifiedTextSymbolIndex},xt;Se===t.WritingMode.vertical?xt=ne.verticalPlacedTextSymbolIndex:xt=Je[t.getAnchorJustification(ye)];for(var At=[ne.leftJustifiedTextSymbolIndex,ne.centerJustifiedTextSymbolIndex,ne.rightJustifiedTextSymbolIndex,ne.verticalPlacedTextSymbolIndex],it=0,pt=At;it<pt.length;it+=1){var Rt=pt[it];Rt>=0&&(xt>=0&&Rt!==xt?X.text.placedSymbolArray.get(Rt).crossTileID=0:X.text.placedSymbolArray.get(Rt).crossTileID=ne.crossTileID)}},Fs.prototype.markUsedOrientation=function(X,ye,ne){for(var Se=ye===t.WritingMode.horizontal||ye===t.WritingMode.horizontalOnly?ye:0,Je=ye===t.WritingMode.vertical?ye:0,xt=[ne.leftJustifiedTextSymbolIndex,ne.centerJustifiedTextSymbolIndex,ne.rightJustifiedTextSymbolIndex],At=0,it=xt;At<it.length;At+=1){var pt=it[At];X.text.placedSymbolArray.get(pt).placedOrientation=Se}ne.verticalPlacedTextSymbolIndex&&(X.text.placedSymbolArray.get(ne.verticalPlacedTextSymbolIndex).placedOrientation=Je)},Fs.prototype.commit=function(X){this.commitTime=X,this.zoomAtLastRecencyCheck=this.transform.zoom;var ye=this.prevPlacement,ne=!1;this.prevZoomAdjustment=ye?ye.zoomAdjustment(this.transform.zoom):0;var Se=ye?ye.symbolFadeChange(X):1,Je=ye?ye.opacities:{},xt=ye?ye.variableOffsets:{},At=ye?ye.placedOrientations:{};for(var it in this.placements){var pt=this.placements[it],Rt=Je[it];Rt?(this.opacities[it]=new Ss(Rt,Se,pt.text,pt.icon),ne=ne||pt.text!==Rt.text.placed||pt.icon!==Rt.icon.placed):(this.opacities[it]=new Ss(null,Se,pt.text,pt.icon,pt.skipFade),ne=ne||pt.text||pt.icon)}for(var or in Je){var er=Je[or];if(!this.opacities[or]){var ur=new Ss(er,Se,!1,!1);ur.isHidden()||(this.opacities[or]=ur,ne=ne||er.text.placed||er.icon.placed)}}for(var gr in xt)!this.variableOffsets[gr]&&this.opacities[gr]&&!this.opacities[gr].isHidden()&&(this.variableOffsets[gr]=xt[gr]);for(var vr in At)!this.placedOrientations[vr]&&this.opacities[vr]&&!this.opacities[vr].isHidden()&&(this.placedOrientations[vr]=At[vr]);ne?this.lastPlacementChangeTime=X:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=ye?ye.lastPlacementChangeTime:X)},Fs.prototype.updateLayerOpacities=function(X,ye){for(var ne={},Se=0,Je=ye;Se<Je.length;Se+=1){var xt=Je[Se],At=xt.getBucket(X);At&&xt.latestFeatureIndex&&X.id===At.layerIds[0]&&this.updateBucketOpacities(At,ne,xt.collisionBoxArray)}},Fs.prototype.updateBucketOpacities=function(X,ye,ne){var Se=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 Je=X.layers[0].layout,xt=new Ss(null,0,!1,!1,!0),At=Je.get("text-allow-overlap"),it=Je.get("icon-allow-overlap"),pt=Je.get("text-variable-anchor"),Rt=Je.get("text-rotation-alignment")==="map",or=Je.get("text-pitch-alignment")==="map",er=Je.get("icon-text-fit")!=="none",ur=new Ss(null,0,At&&(it||!X.hasIconData()||Je.get("icon-optional")),it&&(At||!X.hasTextData()||Je.get("text-optional")),!0);!X.collisionArrays&&ne&&(X.hasIconCollisionBoxData()||X.hasTextCollisionBoxData())&&X.deserializeCollisionBoxes(ne);for(var gr=function(tr,Zr,un){for(var En=0;En<Zr/4;En++)tr.opacityVertexArray.emplaceBack(un)},vr=function(tr){var Zr=X.symbolInstances.get(tr),un=Zr.numHorizontalGlyphVertices,En=Zr.numVerticalGlyphVertices,ka=Zr.crossTileID,ma=ye[ka],ha=Se.opacities[ka];ma?ha=xt:ha||(ha=ur,Se.opacities[ka]=ha),ye[ka]=!0;var Pa=un>0||En>0,Da=Zr.numIconVertices>0,Qa=Se.placedOrientations[Zr.crossTileID],Ra=Qa===t.WritingMode.vertical,ii=Qa===t.WritingMode.horizontal||Qa===t.WritingMode.horizontalOnly;if(Pa){var xi=Iu(ha.text),Xi=Ra?_o:xi;gr(X.text,un,Xi);var co=ii?_o:xi;gr(X.text,En,co);var Is=ha.text.isHidden();[Zr.rightJustifiedTextSymbolIndex,Zr.centerJustifiedTextSymbolIndex,Zr.leftJustifiedTextSymbolIndex].forEach(function(Mp){Mp>=0&&(X.text.placedSymbolArray.get(Mp).hidden=Is||Ra?1:0)}),Zr.verticalPlacedTextSymbolIndex>=0&&(X.text.placedSymbolArray.get(Zr.verticalPlacedTextSymbolIndex).hidden=Is||ii?1:0);var Cs=Se.variableOffsets[Zr.crossTileID];Cs&&Se.markUsedJustification(X,Cs.anchor,Zr,Qa);var kl=Se.placedOrientations[Zr.crossTileID];kl&&(Se.markUsedJustification(X,"left",Zr,kl),Se.markUsedOrientation(X,kl,Zr))}if(Da){var Tl=Iu(ha.icon),Rl=!(er&&Zr.verticalPlacedIconSymbolIndex&&Ra);if(Zr.placedIconSymbolIndex>=0){var Pl=Rl?Tl:_o;gr(X.icon,Zr.numIconVertices,Pl),X.icon.placedSymbolArray.get(Zr.placedIconSymbolIndex).hidden=ha.icon.isHidden()}if(Zr.verticalPlacedIconSymbolIndex>=0){var fc=Rl?_o:Tl;gr(X.icon,Zr.numVerticalIconVertices,fc),X.icon.placedSymbolArray.get(Zr.verticalPlacedIconSymbolIndex).hidden=ha.icon.isHidden()}}if(X.hasIconCollisionBoxData()||X.hasTextCollisionBoxData()){var yl=X.collisionArrays[tr];if(yl){var Lu=new t.Point(0,0);if(yl.textBox||yl.verticalTextBox){var ch=!0;if(pt){var Uh=Se.variableOffsets[ka];Uh?(Lu=Ul(Uh.anchor,Uh.width,Uh.height,Uh.textOffset,Uh.textBoxScale),Rt&&Lu._rotate(or?Se.transform.angle:-Se.transform.angle)):ch=!1}yl.textBox&&Ni(X.textCollisionBox.collisionVertexArray,ha.text.placed,!ch||Ra,Lu.x,Lu.y),yl.verticalTextBox&&Ni(X.textCollisionBox.collisionVertexArray,ha.text.placed,!ch||ii,Lu.x,Lu.y)}var Ep=!!(!ii&&yl.verticalIconBox);yl.iconBox&&Ni(X.iconCollisionBox.collisionVertexArray,ha.icon.placed,Ep,er?Lu.x:0,er?Lu.y:0),yl.verticalIconBox&&Ni(X.iconCollisionBox.collisionVertexArray,ha.icon.placed,!Ep,er?Lu.x:0,er?Lu.y:0)}}},Zt=0;Zt<X.symbolInstances.length;Zt++)vr(Zt);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 ar=this.collisionCircleArrays[X.bucketInstanceId];X.placementInvProjMatrix=ar.invProjMatrix,X.placementViewportMatrix=ar.viewportMatrix,X.collisionCircleArray=ar.circles,delete this.collisionCircleArrays[X.bucketInstanceId]}},Fs.prototype.symbolFadeChange=function(X){return this.fadeDuration===0?1:(X-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment},Fs.prototype.zoomAdjustment=function(X){return Math.max(0,(this.transform.zoom-X)/1.5)},Fs.prototype.hasTransitions=function(X){return this.stale||X-this.lastPlacementChangeTime<this.fadeDuration},Fs.prototype.stillRecent=function(X,ye){var ne=this.zoomAtLastRecencyCheck===ye?1-this.zoomAdjustment(ye):1;return this.zoomAtLastRecencyCheck=ye,this.commitTime+this.fadeDuration*ne>X},Fs.prototype.setStale=function(){this.stale=!0};function Ni(Me,X,ye,ne,Se){Me.emplaceBack(X?1:0,ye?1:0,ne||0,Se||0),Me.emplaceBack(X?1:0,ye?1:0,ne||0,Se||0),Me.emplaceBack(X?1:0,ye?1:0,ne||0,Se||0),Me.emplaceBack(X?1:0,ye?1:0,ne||0,Se||0)}var wo=Math.pow(2,25),ql=Math.pow(2,24),Gs=Math.pow(2,17),Jo=Math.pow(2,16),Gl=Math.pow(2,9),al=Math.pow(2,8),bl=Math.pow(2,1);function Iu(Me){if(Me.opacity===0&&!Me.placed)return 0;if(Me.opacity===1&&Me.placed)return 4294967295;var X=Me.placed?1:0,ye=Math.floor(Me.opacity*127);return ye*wo+X*ql+ye*Gs+X*Jo+ye*Gl+X*al+ye*bl+X}var _o=0,Ps=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=[]};Ps.prototype.continuePlacement=function(X,ye,ne,Se,Je){for(var xt=this._bucketParts;this._currentTileIndex<X.length;){var At=X[this._currentTileIndex];if(ye.getBucketParts(xt,Se,At,this._sortAcrossTiles),this._currentTileIndex++,Je())return!0}for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,xt.sort(function(pt,Rt){return pt.sortKey-Rt.sortKey}));this._currentPartIndex<xt.length;){var it=xt[this._currentPartIndex];if(ye.placeLayerBucketPart(it,this._seenCrossTileIDs,ne),this._currentPartIndex++,Je())return!0}return!1};var ms=function(X,ye,ne,Se,Je,xt,At){this.placement=new Fs(X,Je,xt,At),this._currentPlacementIndex=ye.length-1,this._forceFullPlacement=ne,this._showCollisionBoxes=Se,this._done=!1};ms.prototype.isDone=function(){return this._done},ms.prototype.continuePlacement=function(X,ye,ne){for(var Se=this,Je=t.browser.now(),xt=function(){var or=t.browser.now()-Je;return Se._forceFullPlacement?!1:or>2};this._currentPlacementIndex>=0;){var At=X[this._currentPlacementIndex],it=ye[At],pt=this.placement.collisionIndex.transform.zoom;if(it.type==="symbol"&&(!it.minzoom||it.minzoom<=pt)&&(!it.maxzoom||it.maxzoom>pt)){this._inProgressLayer||(this._inProgressLayer=new Ps(it));var Rt=this._inProgressLayer.continuePlacement(ne[it.source],this.placement,this._showCollisionBoxes,it,xt);if(Rt)return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},ms.prototype.commit=function(X){return this.placement.commit(X),this.placement};var ru=512/t.EXTENT/2,nu=function(X,ye,ne){this.tileID=X,this.indexedSymbolInstances={},this.bucketInstanceId=ne;for(var Se=0;Se<ye.length;Se++){var Je=ye.get(Se),xt=Je.key;this.indexedSymbolInstances[xt]||(this.indexedSymbolInstances[xt]=[]),this.indexedSymbolInstances[xt].push({crossTileID:Je.crossTileID,coord:this.getScaledCoordinates(Je,X)})}};nu.prototype.getScaledCoordinates=function(X,ye){var ne=ye.canonical.z-this.tileID.canonical.z,Se=ru/Math.pow(2,ne);return{x:Math.floor((ye.canonical.x*t.EXTENT+X.anchorX)*Se),y:Math.floor((ye.canonical.y*t.EXTENT+X.anchorY)*Se)}},nu.prototype.findMatches=function(X,ye,ne){for(var Se=this.tileID.canonical.z<ye.canonical.z?1:Math.pow(2,this.tileID.canonical.z-ye.canonical.z),Je=0;Je<X.length;Je++){var xt=X.get(Je);if(!xt.crossTileID){var At=this.indexedSymbolInstances[xt.key];if(At)for(var it=this.getScaledCoordinates(xt,ye),pt=0,Rt=At;pt<Rt.length;pt+=1){var or=Rt[pt];if(Math.abs(or.coord.x-it.x)<=Se&&Math.abs(or.coord.y-it.y)<=Se&&!ne[or.crossTileID]){ne[or.crossTileID]=!0,xt.crossTileID=or.crossTileID;break}}}}};var Zo=function(){this.maxCrossTileID=0};Zo.prototype.generate=function(){return++this.maxCrossTileID};var _u=function(){this.indexes={},this.usedCrossTileIDs={},this.lng=0};_u.prototype.handleWrapJump=function(X){var ye=Math.round((X-this.lng)/360);if(ye!==0)for(var ne in this.indexes){var Se=this.indexes[ne],Je={};for(var xt in Se){var At=Se[xt];At.tileID=At.tileID.unwrapTo(At.tileID.wrap+ye),Je[At.tileID.key]=At}this.indexes[ne]=Je}this.lng=X},_u.prototype.addBucket=function(X,ye,ne){if(this.indexes[X.overscaledZ]&&this.indexes[X.overscaledZ][X.key]){if(this.indexes[X.overscaledZ][X.key].bucketInstanceId===ye.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(X.overscaledZ,this.indexes[X.overscaledZ][X.key])}for(var Se=0;Se<ye.symbolInstances.length;Se++){var Je=ye.symbolInstances.get(Se);Je.crossTileID=0}this.usedCrossTileIDs[X.overscaledZ]||(this.usedCrossTileIDs[X.overscaledZ]={});var xt=this.usedCrossTileIDs[X.overscaledZ];for(var At in this.indexes){var it=this.indexes[At];if(Number(At)>X.overscaledZ)for(var pt in it){var Rt=it[pt];Rt.tileID.isChildOf(X)&&Rt.findMatches(ye.symbolInstances,X,xt)}else{var or=X.scaledTo(Number(At)),er=it[or.key];er&&er.findMatches(ye.symbolInstances,X,xt)}}for(var ur=0;ur<ye.symbolInstances.length;ur++){var gr=ye.symbolInstances.get(ur);gr.crossTileID||(gr.crossTileID=ne.generate(),xt[gr.crossTileID]=!0)}return this.indexes[X.overscaledZ]===void 0&&(this.indexes[X.overscaledZ]={}),this.indexes[X.overscaledZ][X.key]=new nu(X,ye.symbolInstances,ye.bucketInstanceId),!0},_u.prototype.removeBucketCrossTileIDs=function(X,ye){for(var ne in ye.indexedSymbolInstances)for(var Se=0,Je=ye.indexedSymbolInstances[ne];Se<Je.length;Se+=1){var xt=Je[Se];delete this.usedCrossTileIDs[X][xt.crossTileID]}},_u.prototype.removeStaleBuckets=function(X){var ye=!1;for(var ne in this.indexes){var Se=this.indexes[ne];for(var Je in Se)X[Se[Je].bucketInstanceId]||(this.removeBucketCrossTileIDs(ne,Se[Je]),delete Se[Je],ye=!0)}return ye};var Au=function(){this.layerIndexes={},this.crossTileIDs=new Zo,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}};Au.prototype.addLayer=function(X,ye,ne){var Se=this.layerIndexes[X.id];Se===void 0&&(Se=this.layerIndexes[X.id]=new _u);var Je=!1,xt={};Se.handleWrapJump(ne);for(var At=0,it=ye;At<it.length;At+=1){var pt=it[At],Rt=pt.getBucket(X);!Rt||X.id!==Rt.layerIds[0]||(Rt.bucketInstanceId||(Rt.bucketInstanceId=++this.maxBucketInstanceId),Se.addBucket(pt.tileID,Rt,this.crossTileIDs)&&(Je=!0),xt[Rt.bucketInstanceId]=!0)}return Se.removeStaleBuckets(xt)&&(Je=!0),Je},Au.prototype.pruneUnusedLayers=function(X){var ye={};X.forEach(function(Se){ye[Se]=!0});for(var ne in this.layerIndexes)ye[ne]||delete this.layerIndexes[ne]};var Ys=function(Me,X){return t.emitValidationErrors(Me,X&&X.filter(function(ye){return ye.identifier!=="source.canvas"}))},Ol=t.pick(rn,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData"]),$l=t.pick(rn,["setCenter","setZoom","setBearing","setPitch"]),Ql=en(),ac=(function(Me){function X(ye,ne){var Se=this;ne===void 0&&(ne={}),Me.call(this),this.map=ye,this.dispatcher=new V(Bi(),this),this.imageManager=new _,this.imageManager.setEventedParent(this),this.glyphManager=new p(ye._requestManager,ne.localIdeographFontFamily),this.lineAtlas=new U(256,512),this.crossTileSymbolIndex=new Au,this._layers={},this._serializedLayers={},this._order=[],this.sourceCaches={},this.zoomHistory=new t.ZoomHistory,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("setReferrer",t.getReferrer());var Je=this;this._rtlTextPluginCallback=X.registerForPluginStateChange(function(xt){var At={pluginStatus:xt.pluginStatus,pluginURL:xt.pluginURL};Je.dispatcher.broadcast("syncRTLPluginState",At,function(it,pt){if(t.triggerPluginCompletionEvent(it),pt){var Rt=pt.every(function(er){return er});if(Rt)for(var or in Je.sourceCaches)Je.sourceCaches[or].reload()}})}),this.on("data",function(xt){if(!(xt.dataType!=="source"||xt.sourceDataType!=="metadata")){var At=Se.sourceCaches[xt.sourceId];if(At){var it=At.getSource();if(!(!it||!it.vectorLayerIds))for(var pt in Se._layers){var Rt=Se._layers[pt];Rt.source===it.id&&Se._validateLayer(Rt)}}}})}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.loadURL=function(ne,Se){var Je=this;Se===void 0&&(Se={}),this.fire(new t.Event("dataloading",{dataType:"style"}));var xt=typeof Se.validate=="boolean"?Se.validate:!t.isMapboxURL(ne);ne=this.map._requestManager.normalizeStyleURL(ne,Se.accessToken);var At=this.map._requestManager.transformRequest(ne,t.ResourceType.Style);this._request=t.getJSON(At,function(it,pt){Je._request=null,it?Je.fire(new t.ErrorEvent(it)):pt&&Je._load(pt,xt)})},X.prototype.loadJSON=function(ne,Se){var Je=this;Se===void 0&&(Se={}),this.fire(new t.Event("dataloading",{dataType:"style"})),this._request=t.browser.frame(function(){Je._request=null,Je._load(ne,Se.validate!==!1)})},X.prototype.loadEmpty=function(){this.fire(new t.Event("dataloading",{dataType:"style"})),this._load(Ql,!1)},X.prototype._load=function(ne,Se){if(!(Se&&Ys(this,t.validateStyle(ne)))){this._loaded=!0,this.stylesheet=ne;for(var Je in ne.sources)this.addSource(Je,ne.sources[Je],{validate:!1});ne.sprite?this._loadSprite(ne.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(ne.glyphs);var xt=qr(this.stylesheet.layers);this._order=xt.map(function(Rt){return Rt.id}),this._layers={},this._serializedLayers={};for(var At=0,it=xt;At<it.length;At+=1){var pt=it[At];pt=t.createStyleLayer(pt),pt.setEventedParent(this,{layer:{id:pt.id}}),this._layers[pt.id]=pt,this._serializedLayers[pt.id]=pt.serialize()}this.dispatcher.broadcast("setLayers",this._serializeLayers(this._order)),this.light=new B(this.stylesheet.light),this.fire(new t.Event("data",{dataType:"style"})),this.fire(new t.Event("style.load"))}},X.prototype._loadSprite=function(ne){var Se=this;this._spriteRequest=m(ne,this.map._requestManager,function(Je,xt){if(Se._spriteRequest=null,Je)Se.fire(new t.ErrorEvent(Je));else if(xt)for(var At in xt)Se.imageManager.addImage(At,xt[At]);Se.imageManager.setLoaded(!0),Se._availableImages=Se.imageManager.listImages(),Se.dispatcher.broadcast("setImages",Se._availableImages),Se.fire(new t.Event("data",{dataType:"style"}))})},X.prototype._validateLayer=function(ne){var Se=this.sourceCaches[ne.source];if(Se){var Je=ne.sourceLayer;if(Je){var xt=Se.getSource();(xt.type==="geojson"||xt.vectorLayerIds&&xt.vectorLayerIds.indexOf(Je)===-1)&&this.fire(new t.ErrorEvent(new Error('Source layer "'+Je+'" does not exist on source "'+xt.id+'" as specified by style layer "'+ne.id+'"')))}}},X.prototype.loaded=function(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(var ne in this.sourceCaches)if(!this.sourceCaches[ne].loaded())return!1;return!!this.imageManager.isLoaded()},X.prototype._serializeLayers=function(ne){for(var Se=[],Je=0,xt=ne;Je<xt.length;Je+=1){var At=xt[Je],it=this._layers[At];it.type!=="custom"&&Se.push(it.serialize())}return Se},X.prototype.hasTransitions=function(){if(this.light&&this.light.hasTransition())return!0;for(var ne in this.sourceCaches)if(this.sourceCaches[ne].hasTransition())return!0;for(var Se in this._layers)if(this._layers[Se].hasTransition())return!0;return!1},X.prototype._checkLoaded=function(){if(!this._loaded)throw new Error("Style is not done loading")},X.prototype.update=function(ne){if(this._loaded){var Se=this._changed;if(this._changed){var Je=Object.keys(this._updatedLayers),xt=Object.keys(this._removedLayers);(Je.length||xt.length)&&this._updateWorkerLayers(Je,xt);for(var At in this._updatedSources){var it=this._updatedSources[At];it==="reload"?this._reloadSource(At):it==="clear"&&this._clearSource(At)}this._updateTilesForChangedImages();for(var pt in this._updatedPaintProps)this._layers[pt].updateTransitions(ne);this.light.updateTransitions(ne),this._resetUpdates()}var Rt={};for(var or in this.sourceCaches){var er=this.sourceCaches[or];Rt[or]=er.used,er.used=!1}for(var ur=0,gr=this._order;ur<gr.length;ur+=1){var vr=gr[ur],Zt=this._layers[vr];Zt.recalculate(ne,this._availableImages),!Zt.isHidden(ne.zoom)&&Zt.source&&(this.sourceCaches[Zt.source].used=!0)}for(var ar in Rt){var tr=this.sourceCaches[ar];Rt[ar]!==tr.used&&tr.fire(new t.Event("data",{sourceDataType:"visibility",dataType:"source",sourceId:ar}))}this.light.recalculate(ne),this.z=ne.zoom,Se&&this.fire(new t.Event("data",{dataType:"style"}))}},X.prototype._updateTilesForChangedImages=function(){var ne=Object.keys(this._changedImages);if(ne.length){for(var Se in this.sourceCaches)this.sourceCaches[Se].reloadTilesForDependencies(["icons","patterns"],ne);this._changedImages={}}},X.prototype._updateWorkerLayers=function(ne,Se){this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(ne),removedIds:Se})},X.prototype._resetUpdates=function(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={}},X.prototype.setState=function(ne){var Se=this;if(this._checkLoaded(),Ys(this,t.validateStyle(ne)))return!1;ne=t.clone$1(ne),ne.layers=qr(ne.layers);var Je=sa(this.serialize(),ne).filter(function(At){return!(At.command in $l)});if(Je.length===0)return!1;var xt=Je.filter(function(At){return!(At.command in Ol)});if(xt.length>0)throw new Error("Unimplemented: "+xt.map(function(At){return At.command}).join(", ")+".");return Je.forEach(function(At){At.command!=="setTransition"&&Se[At.command].apply(Se,At.args)}),this.stylesheet=ne,!0},X.prototype.addImage=function(ne,Se){if(this.getImage(ne))return this.fire(new t.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(ne,Se),this._afterImageUpdated(ne)},X.prototype.updateImage=function(ne,Se){this.imageManager.updateImage(ne,Se)},X.prototype.getImage=function(ne){return this.imageManager.getImage(ne)},X.prototype.removeImage=function(ne){if(!this.getImage(ne))return this.fire(new t.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(ne),this._afterImageUpdated(ne)},X.prototype._afterImageUpdated=function(ne){this._availableImages=this.imageManager.listImages(),this._changedImages[ne]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new t.Event("data",{dataType:"style"}))},X.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},X.prototype.addSource=function(ne,Se,Je){var xt=this;if(Je===void 0&&(Je={}),this._checkLoaded(),this.sourceCaches[ne]!==void 0)throw new Error("There is already a source with this ID");if(!Se.type)throw new Error("The type property must be defined, but only the following properties were given: "+Object.keys(Se).join(", ")+".");var At=["vector","raster","geojson","video","image"],it=At.indexOf(Se.type)>=0;if(!(it&&this._validate(t.validateStyle.source,"sources."+ne,Se,null,Je))){this.map&&this.map._collectResourceTiming&&(Se.collectResourceTiming=!0);var pt=this.sourceCaches[ne]=new Ln(ne,Se,this.dispatcher);pt.style=this,pt.setEventedParent(this,function(){return{isSourceLoaded:xt.loaded(),source:pt.serialize(),sourceId:ne}}),pt.onAdd(this.map),this._changed=!0}},X.prototype.removeSource=function(ne){if(this._checkLoaded(),this.sourceCaches[ne]===void 0)throw new Error("There is no source with this ID");for(var Se in this._layers)if(this._layers[Se].source===ne)return this.fire(new t.ErrorEvent(new Error('Source "'+ne+'" cannot be removed while layer "'+Se+'" is using it.')));var Je=this.sourceCaches[ne];delete this.sourceCaches[ne],delete this._updatedSources[ne],Je.fire(new t.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:ne})),Je.setEventedParent(null),Je.clearTiles(),Je.onRemove&&Je.onRemove(this.map),this._changed=!0},X.prototype.setGeoJSONSourceData=function(ne,Se){this._checkLoaded();var Je=this.sourceCaches[ne].getSource();Je.setData(Se),this._changed=!0},X.prototype.getSource=function(ne){return this.sourceCaches[ne]&&this.sourceCaches[ne].getSource()},X.prototype.addLayer=function(ne,Se,Je){Je===void 0&&(Je={}),this._checkLoaded();var xt=ne.id;if(this.getLayer(xt)){this.fire(new t.ErrorEvent(new Error('Layer with id "'+xt+'" already exists on this map')));return}var At;if(ne.type==="custom"){if(Ys(this,t.validateCustomStyleLayer(ne)))return;At=t.createStyleLayer(ne)}else{if(typeof ne.source=="object"&&(this.addSource(xt,ne.source),ne=t.clone$1(ne),ne=t.extend(ne,{source:xt})),this._validate(t.validateStyle.layer,"layers."+xt,ne,{arrayIndex:-1},Je))return;At=t.createStyleLayer(ne),this._validateLayer(At),At.setEventedParent(this,{layer:{id:xt}}),this._serializedLayers[At.id]=At.serialize()}var it=Se?this._order.indexOf(Se):this._order.length;if(Se&&it===-1){this.fire(new t.ErrorEvent(new Error('Layer with id "'+Se+'" does not exist on this map.')));return}if(this._order.splice(it,0,xt),this._layerOrderChanged=!0,this._layers[xt]=At,this._removedLayers[xt]&&At.source&&At.type!=="custom"){var pt=this._removedLayers[xt];delete this._removedLayers[xt],pt.type!==At.type?this._updatedSources[At.source]="clear":(this._updatedSources[At.source]="reload",this.sourceCaches[At.source].pause())}this._updateLayer(At),At.onAdd&&At.onAdd(this.map)},X.prototype.moveLayer=function(ne,Se){this._checkLoaded(),this._changed=!0;var Je=this._layers[ne];if(!Je){this.fire(new t.ErrorEvent(new Error("The layer '"+ne+"' does not exist in the map's style and cannot be moved.")));return}if(ne!==Se){var xt=this._order.indexOf(ne);this._order.splice(xt,1);var At=Se?this._order.indexOf(Se):this._order.length;if(Se&&At===-1){this.fire(new t.ErrorEvent(new Error('Layer with id "'+Se+'" does not exist on this map.')));return}this._order.splice(At,0,ne),this._layerOrderChanged=!0}},X.prototype.removeLayer=function(ne){this._checkLoaded();var Se=this._layers[ne];if(!Se){this.fire(new t.ErrorEvent(new Error("The layer '"+ne+"' does not exist in the map's style and cannot be removed.")));return}Se.setEventedParent(null);var Je=this._order.indexOf(ne);this._order.splice(Je,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[ne]=Se,delete this._layers[ne],delete this._serializedLayers[ne],delete this._updatedLayers[ne],delete this._updatedPaintProps[ne],Se.onRemove&&Se.onRemove(this.map)},X.prototype.getLayer=function(ne){return this._layers[ne]},X.prototype.hasLayer=function(ne){return ne in this._layers},X.prototype.setLayerZoomRange=function(ne,Se,Je){this._checkLoaded();var xt=this.getLayer(ne);if(!xt){this.fire(new t.ErrorEvent(new Error("The layer '"+ne+"' does not exist in the map's style and cannot have zoom extent.")));return}xt.minzoom===Se&&xt.maxzoom===Je||(Se!=null&&(xt.minzoom=Se),Je!=null&&(xt.maxzoom=Je),this._updateLayer(xt))},X.prototype.setFilter=function(ne,Se,Je){Je===void 0&&(Je={}),this._checkLoaded();var xt=this.getLayer(ne);if(!xt){this.fire(new t.ErrorEvent(new Error("The layer '"+ne+"' does not exist in the map's style and cannot be filtered.")));return}if(!t.deepEqual(xt.filter,Se)){if(Se==null){xt.filter=void 0,this._updateLayer(xt);return}this._validate(t.validateStyle.filter,"layers."+xt.id+".filter",Se,null,Je)||(xt.filter=t.clone$1(Se),this._updateLayer(xt))}},X.prototype.getFilter=function(ne){return t.clone$1(this.getLayer(ne).filter)},X.prototype.setLayoutProperty=function(ne,Se,Je,xt){xt===void 0&&(xt={}),this._checkLoaded();var At=this.getLayer(ne);if(!At){this.fire(new t.ErrorEvent(new Error("The layer '"+ne+"' does not exist in the map's style and cannot be styled.")));return}t.deepEqual(At.getLayoutProperty(Se),Je)||(At.setLayoutProperty(Se,Je,xt),this._updateLayer(At))},X.prototype.getLayoutProperty=function(ne,Se){var Je=this.getLayer(ne);if(!Je){this.fire(new t.ErrorEvent(new Error("The layer '"+ne+"' does not exist in the map's style.")));return}return Je.getLayoutProperty(Se)},X.prototype.setPaintProperty=function(ne,Se,Je,xt){xt===void 0&&(xt={}),this._checkLoaded();var At=this.getLayer(ne);if(!At){this.fire(new t.ErrorEvent(new Error("The layer '"+ne+"' does not exist in the map's style and cannot be styled.")));return}if(!t.deepEqual(At.getPaintProperty(Se),Je)){var it=At.setPaintProperty(Se,Je,xt);it&&this._updateLayer(At),this._changed=!0,this._updatedPaintProps[ne]=!0}},X.prototype.getPaintProperty=function(ne,Se){return this.getLayer(ne).getPaintProperty(Se)},X.prototype.setFeatureState=function(ne,Se){this._checkLoaded();var Je=ne.source,xt=ne.sourceLayer,At=this.sourceCaches[Je];if(At===void 0){this.fire(new t.ErrorEvent(new Error("The source '"+Je+"' does not exist in the map's style.")));return}var it=At.getSource().type;if(it==="geojson"&&xt){this.fire(new t.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter.")));return}if(it==="vector"&&!xt){this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}ne.id===void 0&&this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided."))),At.setFeatureState(xt,ne.id,Se)},X.prototype.removeFeatureState=function(ne,Se){this._checkLoaded();var Je=ne.source,xt=this.sourceCaches[Je];if(xt===void 0){this.fire(new t.ErrorEvent(new Error("The source '"+Je+"' does not exist in the map's style.")));return}var At=xt.getSource().type,it=At==="vector"?ne.sourceLayer:void 0;if(At==="vector"&&!it){this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}if(Se&&typeof ne.id!="string"&&typeof ne.id!="number"){this.fire(new t.ErrorEvent(new Error("A feature id is required to remove its specific state property.")));return}xt.removeFeatureState(it,ne.id,Se)},X.prototype.getFeatureState=function(ne){this._checkLoaded();var Se=ne.source,Je=ne.sourceLayer,xt=this.sourceCaches[Se];if(xt===void 0){this.fire(new t.ErrorEvent(new Error("The source '"+Se+"' does not exist in the map's style.")));return}var At=xt.getSource().type;if(At==="vector"&&!Je){this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}return ne.id===void 0&&this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided."))),xt.getFeatureState(Je,ne.id)},X.prototype.getTransition=function(){return t.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},X.prototype.serialize=function(){return t.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:t.mapObject(this.sourceCaches,function(ne){return ne.serialize()}),layers:this._serializeLayers(this._order)},function(ne){return ne!==void 0})},X.prototype._updateLayer=function(ne){this._updatedLayers[ne.id]=!0,ne.source&&!this._updatedSources[ne.source]&&this.sourceCaches[ne.source].getSource().type!=="raster"&&(this._updatedSources[ne.source]="reload",this.sourceCaches[ne.source].pause()),this._changed=!0},X.prototype._flattenAndSortRenderedFeatures=function(ne){for(var Se=this,Je=function(ii){return Se._layers[ii].type==="fill-extrusion"},xt={},At=[],it=this._order.length-1;it>=0;it--){var pt=this._order[it];if(Je(pt)){xt[pt]=it;for(var Rt=0,or=ne;Rt<or.length;Rt+=1){var er=or[Rt],ur=er[pt];if(ur)for(var gr=0,vr=ur;gr<vr.length;gr+=1){var Zt=vr[gr];At.push(Zt)}}}}At.sort(function(ii,xi){return xi.intersectionZ-ii.intersectionZ});for(var ar=[],tr=this._order.length-1;tr>=0;tr--){var Zr=this._order[tr];if(Je(Zr))for(var un=At.length-1;un>=0;un--){var En=At[un].feature;if(xt[En.layer.id]<tr)break;ar.push(En),At.pop()}else for(var ka=0,ma=ne;ka<ma.length;ka+=1){var ha=ma[ka],Pa=ha[Zr];if(Pa)for(var Da=0,Qa=Pa;Da<Qa.length;Da+=1){var Ra=Qa[Da];ar.push(Ra.feature)}}}return ar},X.prototype.queryRenderedFeatures=function(ne,Se,Je){Se&&Se.filter&&this._validate(t.validateStyle.filter,"queryRenderedFeatures.filter",Se.filter,null,Se);var xt={};if(Se&&Se.layers){if(!Array.isArray(Se.layers))return this.fire(new t.ErrorEvent(new Error("parameters.layers must be an Array."))),[];for(var At=0,it=Se.layers;At<it.length;At+=1){var pt=it[At],Rt=this._layers[pt];if(!Rt)return this.fire(new t.ErrorEvent(new Error("The layer '"+pt+"' does not exist in the map's style and cannot be queried for features."))),[];xt[Rt.source]=!0}}var or=[];Se.availableImages=this._availableImages;for(var er in this.sourceCaches)Se.layers&&!xt[er]||or.push(ue(this.sourceCaches[er],this._layers,this._serializedLayers,ne,Se,Je));return this.placement&&or.push(_e(this._layers,this._serializedLayers,this.sourceCaches,ne,Se,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(or)},X.prototype.querySourceFeatures=function(ne,Se){Se&&Se.filter&&this._validate(t.validateStyle.filter,"querySourceFeatures.filter",Se.filter,null,Se);var Je=this.sourceCaches[ne];return Je?Le(Je,Se):[]},X.prototype.addSourceType=function(ne,Se,Je){if(X.getSourceType(ne))return Je(new Error('A source type called "'+ne+'" already exists.'));if(X.setSourceType(ne,Se),!Se.workerSourceURL)return Je(null,null);this.dispatcher.broadcast("loadWorkerSource",{name:ne,url:Se.workerSourceURL},Je)},X.prototype.getLight=function(){return this.light.getLight()},X.prototype.setLight=function(ne,Se){Se===void 0&&(Se={}),this._checkLoaded();var Je=this.light.getLight(),xt=!1;for(var At in ne)if(!t.deepEqual(ne[At],Je[At])){xt=!0;break}if(xt){var it={now:t.browser.now(),transition:t.extend({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(ne,Se),this.light.updateTransitions(it)}},X.prototype._validate=function(ne,Se,Je,xt,At){return At===void 0&&(At={}),At&&At.validate===!1?!1:Ys(this,ne.call(t.validateStyle,t.extend({key:Se,style:this.serialize(),value:Je,styleSpec:t.styleSpec},xt)))},X.prototype._remove=function(){this._request&&(this._request.cancel(),this._request=null),this._spriteRequest&&(this._spriteRequest.cancel(),this._spriteRequest=null),t.evented.off("pluginStateChange",this._rtlTextPluginCallback);for(var ne in this._layers){var Se=this._layers[ne];Se.setEventedParent(null)}for(var Je in this.sourceCaches)this.sourceCaches[Je].clearTiles(),this.sourceCaches[Je].setEventedParent(null);this.imageManager.setEventedParent(null),this.setEventedParent(null),this.dispatcher.remove()},X.prototype._clearSource=function(ne){this.sourceCaches[ne].clearTiles()},X.prototype._reloadSource=function(ne){this.sourceCaches[ne].resume(),this.sourceCaches[ne].reload()},X.prototype._updateSources=function(ne){for(var Se in this.sourceCaches)this.sourceCaches[Se].update(ne)},X.prototype._generateCollisionBoxes=function(){for(var ne in this.sourceCaches)this._reloadSource(ne)},X.prototype._updatePlacement=function(ne,Se,Je,xt,At){At===void 0&&(At=!1);for(var it=!1,pt=!1,Rt={},or=0,er=this._order;or<er.length;or+=1){var ur=er[or],gr=this._layers[ur];if(gr.type==="symbol"){if(!Rt[gr.source]){var vr=this.sourceCaches[gr.source];Rt[gr.source]=vr.getRenderableIds(!0).map(function(ka){return vr.getTileByID(ka)}).sort(function(ka,ma){return ma.tileID.overscaledZ-ka.tileID.overscaledZ||(ka.tileID.isLessThan(ma.tileID)?-1:1)})}var Zt=this.crossTileSymbolIndex.addLayer(gr,Rt[gr.source],ne.center.lng);it=it||Zt}}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),At=At||this._layerOrderChanged||Je===0,(At||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(t.browser.now(),ne.zoom))&&(this.pauseablePlacement=new ms(ne,this._order,At,Se,Je,xt,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,Rt),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(t.browser.now()),pt=!0),it&&this.pauseablePlacement.placement.setStale()),pt||it)for(var ar=0,tr=this._order;ar<tr.length;ar+=1){var Zr=tr[ar],un=this._layers[Zr];un.type==="symbol"&&this.placement.updateLayerOpacities(un,Rt[un.source])}var En=!this.pauseablePlacement.isDone()||this.placement.hasTransitions(t.browser.now());return En},X.prototype._releaseSymbolFadeTiles=function(){for(var ne in this.sourceCaches)this.sourceCaches[ne].releaseSymbolFadeTiles()},X.prototype.getImages=function(ne,Se,Je){this.imageManager.getImages(Se.icons,Je),this._updateTilesForChangedImages();var xt=this.sourceCaches[Se.source];xt&&xt.setDependencies(Se.tileID.key,Se.type,Se.icons)},X.prototype.getGlyphs=function(ne,Se,Je){this.glyphManager.getGlyphs(Se.stacks,Je)},X.prototype.getResource=function(ne,Se,Je){return t.makeRequest(Se,Je)},X})(t.Evented);ac.getSourceType=pe,ac.setSourceType=oe,ac.registerForPluginStateChange=t.registerForPluginStateChange;var Tf=t.createLayout([{name:"a_pos",type:"Int16",components:2}]),rf=`#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`,df=`#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;}`,Zh=`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
}`,zh="attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}",zl=`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
}`,Vc="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);}",$h=`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
}`,pc=`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);}`,ic="void main() {gl_FragColor=vec4(1.0);}",mc="attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}",vf=`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
}`,uu=`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;}`,oc=`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
}`,el="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;}",Xl="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;}}",zf="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;}",Lc="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;}",$f="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);}",xu="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);}",Wd="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);}",Zs=`#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
}`,dv=`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);}`,Ml=`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
}`,Ko=`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;}`,ph=`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
}`,pf=`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;}`,Yu=`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
}`,Kh=`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);}`,Kf=`varying vec4 v_color;void main() {gl_FragColor=v_color;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,Ah=`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;}`,sc=`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
}`,Ld=`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;}`,sd=`#ifdef GL_ES
precision highp float;
#endif
uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,Sh="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;}",Jf=`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
}`,Jh="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;}",Qh=`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
}`,mf=`
#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);}`,ld=`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv;
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,v_uv);gl_FragColor=color*(alpha*opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,Nf=`
#define scale 0.015873016
attribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv;
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float width
void main() {
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float width
float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}`,Af=`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
}`,lc=`
#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;}`,lh=`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
}`,ed=`
#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);}`,Kl=`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
}`,Nh="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;}",Yd=`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
}`,ud=`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));}`,Eh=`#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
}`,cd=`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);}`,Hc=`#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
}`,fd=`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);}`,Pu=gu(rf,df),Gc=gu(Zh,zh),Qf=gu(zl,Vc),cu=gu($h,pc),Ff=gu(ic,mc),Sc=gu(vf,uu),Xc=gu(oc,el),bu=gu(Xl,zf),mh=gu(Lc,$f),Sf=gu(xu,Wd),eh=gu(Zs,dv),Fh=gu(Ml,Ko),Zd=gu(ph,pf),Sv=gu(Yu,Kh),gh=gu(Kf,Ah),Bh=gu(sc,Ld),nf=gu(sd,Sh),jh=gu(Jf,Jh),gc=gu(Qh,mf),yh=gu(ld,Nf),hd=gu(Af,lc),_h=gu(lh,ed),du=gu(Kl,Nh),Wc=gu(Yd,ud),gf=gu(Eh,cd),td=gu(Hc,fd);function gu(Me,X){var ye=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,ne=X.match(/attribute ([\w]+) ([\w]+)/g),Se=Me.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),Je=X.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),xt=Je?Je.concat(Se):Se,At={};return Me=Me.replace(ye,function(it,pt,Rt,or,er){return At[er]=!0,pt==="define"?`
#ifndef HAS_UNIFORM_u_`+er+`
varying `+Rt+" "+or+" "+er+`;
#else
uniform `+Rt+" "+or+" u_"+er+`;
#endif
`:`
#ifdef HAS_UNIFORM_u_`+er+`
    `+Rt+" "+or+" "+er+" = u_"+er+`;
#endif
`}),X=X.replace(ye,function(it,pt,Rt,or,er){var ur=or==="float"?"vec2":"vec4",gr=er.match(/color/)?"color":ur;return At[er]?pt==="define"?`
#ifndef HAS_UNIFORM_u_`+er+`
uniform lowp float u_`+er+`_t;
attribute `+Rt+" "+ur+" a_"+er+`;
varying `+Rt+" "+or+" "+er+`;
#else
uniform `+Rt+" "+or+" u_"+er+`;
#endif
`:gr==="vec4"?`
#ifndef HAS_UNIFORM_u_`+er+`
    `+er+" = a_"+er+`;
#else
    `+Rt+" "+or+" "+er+" = u_"+er+`;
#endif
`:`
#ifndef HAS_UNIFORM_u_`+er+`
    `+er+" = unpack_mix_"+gr+"(a_"+er+", u_"+er+`_t);
#else
    `+Rt+" "+or+" "+er+" = u_"+er+`;
#endif
`:pt==="define"?`
#ifndef HAS_UNIFORM_u_`+er+`
uniform lowp float u_`+er+`_t;
attribute `+Rt+" "+ur+" a_"+er+`;
#else
uniform `+Rt+" "+or+" u_"+er+`;
#endif
`:gr==="vec4"?`
#ifndef HAS_UNIFORM_u_`+er+`
    `+Rt+" "+or+" "+er+" = a_"+er+`;
#else
    `+Rt+" "+or+" "+er+" = u_"+er+`;
#endif
`:`
#ifndef HAS_UNIFORM_u_`+er+`
    `+Rt+" "+or+" "+er+" = unpack_mix_"+gr+"(a_"+er+", u_"+er+`_t);
#else
    `+Rt+" "+or+" "+er+" = u_"+er+`;
#endif
`}),{fragmentSource:Me,vertexSource:X,staticAttributes:ne,staticUniforms:xt}}var Mh=Object.freeze({__proto__:null,prelude:Pu,background:Gc,backgroundPattern:Qf,circle:cu,clippingMask:Ff,heatmap:Sc,heatmapTexture:Xc,collisionBox:bu,collisionCircle:mh,debug:Sf,fill:eh,fillOutline:Fh,fillOutlinePattern:Zd,fillPattern:Sv,fillExtrusion:gh,fillExtrusionPattern:Bh,hillshadePrepare:nf,hillshade:jh,line:gc,lineGradient:yh,linePattern:hd,lineSDF:_h,raster:du,symbolIcon:Wc,symbolSDF:gf,symbolTextAndIcon:td}),th=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};th.prototype.bind=function(X,ye,ne,Se,Je,xt,At,it){this.context=X;for(var pt=this.boundPaintVertexBuffers.length!==Se.length,Rt=0;!pt&&Rt<Se.length;Rt++)this.boundPaintVertexBuffers[Rt]!==Se[Rt]&&(pt=!0);var or=!this.vao||this.boundProgram!==ye||this.boundLayoutVertexBuffer!==ne||pt||this.boundIndexBuffer!==Je||this.boundVertexOffset!==xt||this.boundDynamicVertexBuffer!==At||this.boundDynamicVertexBuffer2!==it;!X.extVertexArrayObject||or?this.freshBind(ye,ne,Se,Je,xt,At,it):(X.bindVertexArrayOES.set(this.vao),At&&At.bind(),Je&&Je.dynamicDraw&&Je.bind(),it&&it.bind())},th.prototype.freshBind=function(X,ye,ne,Se,Je,xt,At){var it,pt=X.numAttributes,Rt=this.context,or=Rt.gl;if(Rt.extVertexArrayObject)this.vao&&this.destroy(),this.vao=Rt.extVertexArrayObject.createVertexArrayOES(),Rt.bindVertexArrayOES.set(this.vao),it=0,this.boundProgram=X,this.boundLayoutVertexBuffer=ye,this.boundPaintVertexBuffers=ne,this.boundIndexBuffer=Se,this.boundVertexOffset=Je,this.boundDynamicVertexBuffer=xt,this.boundDynamicVertexBuffer2=At;else{it=Rt.currentNumAttributes||0;for(var er=pt;er<it;er++)or.disableVertexAttribArray(er)}ye.enableAttributes(or,X);for(var ur=0,gr=ne;ur<gr.length;ur+=1){var vr=gr[ur];vr.enableAttributes(or,X)}xt&&xt.enableAttributes(or,X),At&&At.enableAttributes(or,X),ye.bind(),ye.setVertexAttribPointers(or,X,Je);for(var Zt=0,ar=ne;Zt<ar.length;Zt+=1){var tr=ar[Zt];tr.bind(),tr.setVertexAttribPointers(or,X,Je)}xt&&(xt.bind(),xt.setVertexAttribPointers(or,X,Je)),Se&&Se.bind(),At&&(At.bind(),At.setVertexAttribPointers(or,X,Je)),Rt.currentNumAttributes=pt},th.prototype.destroy=function(){this.vao&&(this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)};function af(Me){for(var X=[],ye=0;ye<Me.length;ye++)if(Me[ye]!==null){var ne=Me[ye].split(" ");X.push(ne.pop())}return X}var Ch=function(X,ye,ne,Se,Je,xt){var At=X.gl;this.program=At.createProgram();for(var it=af(ne.staticAttributes),pt=Se?Se.getBinderAttributes():[],Rt=it.concat(pt),or=ne.staticUniforms?af(ne.staticUniforms):[],er=Se?Se.getBinderUniforms():[],ur=or.concat(er),gr=[],vr=0,Zt=ur;vr<Zt.length;vr+=1){var ar=Zt[vr];gr.indexOf(ar)<0&&gr.push(ar)}var tr=Se?Se.defines():[];xt&&tr.push("#define OVERDRAW_INSPECTOR;");var Zr=tr.concat(Pu.fragmentSource,ne.fragmentSource).join(`
`),un=tr.concat(Pu.vertexSource,ne.vertexSource).join(`
`),En=At.createShader(At.FRAGMENT_SHADER);if(At.isContextLost()){this.failedToCreate=!0;return}At.shaderSource(En,Zr),At.compileShader(En),At.attachShader(this.program,En);var ka=At.createShader(At.VERTEX_SHADER);if(At.isContextLost()){this.failedToCreate=!0;return}At.shaderSource(ka,un),At.compileShader(ka),At.attachShader(this.program,ka),this.attributes={};var ma={};this.numAttributes=Rt.length;for(var ha=0;ha<this.numAttributes;ha++)Rt[ha]&&(At.bindAttribLocation(this.program,ha,Rt[ha]),this.attributes[Rt[ha]]=ha);At.linkProgram(this.program),At.deleteShader(ka),At.deleteShader(En);for(var Pa=0;Pa<gr.length;Pa++){var Da=gr[Pa];if(Da&&!ma[Da]){var Qa=At.getUniformLocation(this.program,Da);Qa&&(ma[Da]=Qa)}}this.fixedUniforms=Je(X,ma),this.binderUniforms=Se?Se.getUniforms(X,ma):[]};Ch.prototype.draw=function(X,ye,ne,Se,Je,xt,At,it,pt,Rt,or,er,ur,gr,vr,Zt){var ar,tr=X.gl;if(!this.failedToCreate){X.program.set(this.program),X.setDepthMode(ne),X.setStencilMode(Se),X.setColorMode(Je),X.setCullFace(xt);for(var Zr in this.fixedUniforms)this.fixedUniforms[Zr].set(At[Zr]);gr&&gr.setUniforms(X,this.binderUniforms,er,{zoom:ur});for(var un=(ar={},ar[tr.LINES]=2,ar[tr.TRIANGLES]=3,ar[tr.LINE_STRIP]=1,ar)[ye],En=0,ka=or.get();En<ka.length;En+=1){var ma=ka[En],ha=ma.vaos||(ma.vaos={}),Pa=ha[it]||(ha[it]=new th);Pa.bind(X,this,pt,gr?gr.getPaintVertexBuffers():[],Rt,ma.vertexOffset,vr,Zt),tr.drawElements(ye,ma.primitiveLength*un,tr.UNSIGNED_SHORT,ma.primitiveOffset*un*2)}}};function Ef(Me,X,ye){var ne=1/Qs(ye,1,X.transform.tileZoom),Se=Math.pow(2,ye.tileID.overscaledZ),Je=ye.tileSize*Math.pow(2,X.transform.tileZoom)/Se,xt=Je*(ye.tileID.canonical.x+ye.tileID.wrap*Se),At=Je*ye.tileID.canonical.y;return{u_image:0,u_texsize:ye.imageAtlasTexture.size,u_scale:[ne,Me.fromScale,Me.toScale],u_fade:Me.t,u_pixel_coord_upper:[xt>>16,At>>16],u_pixel_coord_lower:[xt&65535,At&65535]}}function kh(Me,X,ye,ne){var Se=ye.imageManager.getPattern(Me.from.toString()),Je=ye.imageManager.getPattern(Me.to.toString()),xt=ye.imageManager.getPixelSize(),At=xt.width,it=xt.height,pt=Math.pow(2,ne.tileID.overscaledZ),Rt=ne.tileSize*Math.pow(2,ye.transform.tileZoom)/pt,or=Rt*(ne.tileID.canonical.x+ne.tileID.wrap*pt),er=Rt*ne.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:Se.tl,u_pattern_br_a:Se.br,u_pattern_tl_b:Je.tl,u_pattern_br_b:Je.br,u_texsize:[At,it],u_mix:X.t,u_pattern_size_a:Se.displaySize,u_pattern_size_b:Je.displaySize,u_scale_a:X.fromScale,u_scale_b:X.toScale,u_tile_units_to_pixels:1/Qs(ne,1,ye.transform.tileZoom),u_pixel_coord_upper:[or>>16,er>>16],u_pixel_coord_lower:[or&65535,er&65535]}}var $d=function(Me,X){return{u_matrix:new t.UniformMatrix4f(Me,X.u_matrix),u_lightpos:new t.Uniform3f(Me,X.u_lightpos),u_lightintensity:new t.Uniform1f(Me,X.u_lightintensity),u_lightcolor:new t.Uniform3f(Me,X.u_lightcolor),u_vertical_gradient:new t.Uniform1f(Me,X.u_vertical_gradient),u_opacity:new t.Uniform1f(Me,X.u_opacity)}},xc=function(Me,X){return{u_matrix:new t.UniformMatrix4f(Me,X.u_matrix),u_lightpos:new t.Uniform3f(Me,X.u_lightpos),u_lightintensity:new t.Uniform1f(Me,X.u_lightintensity),u_lightcolor:new t.Uniform3f(Me,X.u_lightcolor),u_vertical_gradient:new t.Uniform1f(Me,X.u_vertical_gradient),u_height_factor:new t.Uniform1f(Me,X.u_height_factor),u_image:new t.Uniform1i(Me,X.u_image),u_texsize:new t.Uniform2f(Me,X.u_texsize),u_pixel_coord_upper:new t.Uniform2f(Me,X.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(Me,X.u_pixel_coord_lower),u_scale:new t.Uniform3f(Me,X.u_scale),u_fade:new t.Uniform1f(Me,X.u_fade),u_opacity:new t.Uniform1f(Me,X.u_opacity)}},dd=function(Me,X,ye,ne){var Se=X.style.light,Je=Se.properties.get("position"),xt=[Je.x,Je.y,Je.z],At=t.create$1();Se.properties.get("anchor")==="viewport"&&t.fromRotation(At,-X.transform.angle),t.transformMat3(xt,xt,At);var it=Se.properties.get("color");return{u_matrix:Me,u_lightpos:xt,u_lightintensity:Se.properties.get("intensity"),u_lightcolor:[it.r,it.g,it.b],u_vertical_gradient:+ye,u_opacity:ne}},of=function(Me,X,ye,ne,Se,Je,xt){return t.extend(dd(Me,X,ye,ne),Ef(Je,X,xt),{u_height_factor:-Math.pow(2,Se.overscaledZ)/xt.tileSize/8})},Bf=function(Me,X){return{u_matrix:new t.UniformMatrix4f(Me,X.u_matrix)}},Mf=function(Me,X){return{u_matrix:new t.UniformMatrix4f(Me,X.u_matrix),u_image:new t.Uniform1i(Me,X.u_image),u_texsize:new t.Uniform2f(Me,X.u_texsize),u_pixel_coord_upper:new t.Uniform2f(Me,X.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(Me,X.u_pixel_coord_lower),u_scale:new t.Uniform3f(Me,X.u_scale),u_fade:new t.Uniform1f(Me,X.u_fade)}},Du=function(Me,X){return{u_matrix:new t.UniformMatrix4f(Me,X.u_matrix),u_world:new t.Uniform2f(Me,X.u_world)}},Rc=function(Me,X){return{u_matrix:new t.UniformMatrix4f(Me,X.u_matrix),u_world:new t.Uniform2f(Me,X.u_world),u_image:new t.Uniform1i(Me,X.u_image),u_texsize:new t.Uniform2f(Me,X.u_texsize),u_pixel_coord_upper:new t.Uniform2f(Me,X.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(Me,X.u_pixel_coord_lower),u_scale:new t.Uniform3f(Me,X.u_scale),u_fade:new t.Uniform1f(Me,X.u_fade)}},Su=function(Me){return{u_matrix:Me}},rh=function(Me,X,ye,ne){return t.extend(Su(Me),Ef(ye,X,ne))},Cf=function(Me,X){return{u_matrix:Me,u_world:X}},rd=function(Me,X,ye,ne,Se){return t.extend(rh(Me,X,ye,ne),{u_world:Se})},wr=function(Me,X){return{u_camera_to_center_distance:new t.Uniform1f(Me,X.u_camera_to_center_distance),u_scale_with_map:new t.Uniform1i(Me,X.u_scale_with_map),u_pitch_with_map:new t.Uniform1i(Me,X.u_pitch_with_map),u_extrude_scale:new t.Uniform2f(Me,X.u_extrude_scale),u_device_pixel_ratio:new t.Uniform1f(Me,X.u_device_pixel_ratio),u_matrix:new t.UniformMatrix4f(Me,X.u_matrix)}},Gr=function(Me,X,ye,ne){var Se=Me.transform,Je,xt;if(ne.paint.get("circle-pitch-alignment")==="map"){var At=Qs(ye,1,Se.zoom);Je=!0,xt=[At,At]}else Je=!1,xt=Se.pixelsToGLUnits;return{u_camera_to_center_distance:Se.cameraToCenterDistance,u_scale_with_map:+(ne.paint.get("circle-pitch-scale")==="map"),u_matrix:Me.translatePosMatrix(X.posMatrix,ye,ne.paint.get("circle-translate"),ne.paint.get("circle-translate-anchor")),u_pitch_with_map:+Je,u_device_pixel_ratio:t.browser.devicePixelRatio,u_extrude_scale:xt}},kn=function(Me,X){return{u_matrix:new t.UniformMatrix4f(Me,X.u_matrix),u_camera_to_center_distance:new t.Uniform1f(Me,X.u_camera_to_center_distance),u_pixels_to_tile_units:new t.Uniform1f(Me,X.u_pixels_to_tile_units),u_extrude_scale:new t.Uniform2f(Me,X.u_extrude_scale),u_overscale_factor:new t.Uniform1f(Me,X.u_overscale_factor)}},_n=function(Me,X){return{u_matrix:new t.UniformMatrix4f(Me,X.u_matrix),u_inv_matrix:new t.UniformMatrix4f(Me,X.u_inv_matrix),u_camera_to_center_distance:new t.Uniform1f(Me,X.u_camera_to_center_distance),u_viewport_size:new t.Uniform2f(Me,X.u_viewport_size)}},ta=function(Me,X,ye){var ne=Qs(ye,1,X.zoom),Se=Math.pow(2,X.zoom-ye.tileID.overscaledZ),Je=ye.tileID.overscaleFactor();return{u_matrix:Me,u_camera_to_center_distance:X.cameraToCenterDistance,u_pixels_to_tile_units:ne,u_extrude_scale:[X.pixelsToGLUnits[0]/(ne*Se),X.pixelsToGLUnits[1]/(ne*Se)],u_overscale_factor:Je}},Ga=function(Me,X,ye){return{u_matrix:Me,u_inv_matrix:X,u_camera_to_center_distance:ye.cameraToCenterDistance,u_viewport_size:[ye.width,ye.height]}},ja=function(Me,X){return{u_color:new t.UniformColor(Me,X.u_color),u_matrix:new t.UniformMatrix4f(Me,X.u_matrix),u_overlay:new t.Uniform1i(Me,X.u_overlay),u_overlay_scale:new t.Uniform1f(Me,X.u_overlay_scale)}},Ai=function(Me,X,ye){return ye===void 0&&(ye=1),{u_matrix:Me,u_color:X,u_overlay:0,u_overlay_scale:ye}},Ii=function(Me,X){return{u_matrix:new t.UniformMatrix4f(Me,X.u_matrix)}},oo=function(Me){return{u_matrix:Me}},hi=function(Me,X){return{u_extrude_scale:new t.Uniform1f(Me,X.u_extrude_scale),u_intensity:new t.Uniform1f(Me,X.u_intensity),u_matrix:new t.UniformMatrix4f(Me,X.u_matrix)}},Gi=function(Me,X){return{u_matrix:new t.UniformMatrix4f(Me,X.u_matrix),u_world:new t.Uniform2f(Me,X.u_world),u_image:new t.Uniform1i(Me,X.u_image),u_color_ramp:new t.Uniform1i(Me,X.u_color_ramp),u_opacity:new t.Uniform1f(Me,X.u_opacity)}},wi=function(Me,X,ye,ne){return{u_matrix:Me,u_extrude_scale:Qs(X,1,ye),u_intensity:ne}},si=function(Me,X,ye,ne){var Se=t.create();t.ortho(Se,0,Me.width,Me.height,0,0,1);var Je=Me.context.gl;return{u_matrix:Se,u_world:[Je.drawingBufferWidth,Je.drawingBufferHeight],u_image:ye,u_color_ramp:ne,u_opacity:X.paint.get("heatmap-opacity")}},vo=function(Me,X){return{u_matrix:new t.UniformMatrix4f(Me,X.u_matrix),u_image:new t.Uniform1i(Me,X.u_image),u_latrange:new t.Uniform2f(Me,X.u_latrange),u_light:new t.Uniform2f(Me,X.u_light),u_shadow:new t.UniformColor(Me,X.u_shadow),u_highlight:new t.UniformColor(Me,X.u_highlight),u_accent:new t.UniformColor(Me,X.u_accent)}},es=function(Me,X){return{u_matrix:new t.UniformMatrix4f(Me,X.u_matrix),u_image:new t.Uniform1i(Me,X.u_image),u_dimension:new t.Uniform2f(Me,X.u_dimension),u_zoom:new t.Uniform1f(Me,X.u_zoom),u_unpack:new t.Uniform4f(Me,X.u_unpack)}},$o=function(Me,X,ye){var ne=ye.paint.get("hillshade-shadow-color"),Se=ye.paint.get("hillshade-highlight-color"),Je=ye.paint.get("hillshade-accent-color"),xt=ye.paint.get("hillshade-illumination-direction")*(Math.PI/180);ye.paint.get("hillshade-illumination-anchor")==="viewport"&&(xt-=Me.transform.angle);var At=!Me.options.moving;return{u_matrix:Me.transform.calculatePosMatrix(X.tileID.toUnwrapped(),At),u_image:0,u_latrange:rs(Me,X.tileID),u_light:[ye.paint.get("hillshade-exaggeration"),xt],u_shadow:ne,u_highlight:Se,u_accent:Je}},is=function(Me,X){var ye=X.stride,ne=t.create();return t.ortho(ne,0,t.EXTENT,-t.EXTENT,0,0,1),t.translate(ne,ne,[0,-t.EXTENT,0]),{u_matrix:ne,u_image:1,u_dimension:[ye,ye],u_zoom:Me.overscaledZ,u_unpack:X.getUnpackVector()}};function rs(Me,X){var ye=Math.pow(2,X.canonical.z),ne=X.canonical.y;return[new t.MercatorCoordinate(0,ne/ye).toLngLat().lat,new t.MercatorCoordinate(0,(ne+1)/ye).toLngLat().lat]}var mo=function(Me,X){return{u_matrix:new t.UniformMatrix4f(Me,X.u_matrix),u_ratio:new t.Uniform1f(Me,X.u_ratio),u_device_pixel_ratio:new t.Uniform1f(Me,X.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(Me,X.u_units_to_pixels)}},Ji=function(Me,X){return{u_matrix:new t.UniformMatrix4f(Me,X.u_matrix),u_ratio:new t.Uniform1f(Me,X.u_ratio),u_device_pixel_ratio:new t.Uniform1f(Me,X.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(Me,X.u_units_to_pixels),u_image:new t.Uniform1i(Me,X.u_image),u_image_height:new t.Uniform1f(Me,X.u_image_height)}},gs=function(Me,X){return{u_matrix:new t.UniformMatrix4f(Me,X.u_matrix),u_texsize:new t.Uniform2f(Me,X.u_texsize),u_ratio:new t.Uniform1f(Me,X.u_ratio),u_device_pixel_ratio:new t.Uniform1f(Me,X.u_device_pixel_ratio),u_image:new t.Uniform1i(Me,X.u_image),u_units_to_pixels:new t.Uniform2f(Me,X.u_units_to_pixels),u_scale:new t.Uniform3f(Me,X.u_scale),u_fade:new t.Uniform1f(Me,X.u_fade)}},$s=function(Me,X){return{u_matrix:new t.UniformMatrix4f(Me,X.u_matrix),u_ratio:new t.Uniform1f(Me,X.u_ratio),u_device_pixel_ratio:new t.Uniform1f(Me,X.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(Me,X.u_units_to_pixels),u_patternscale_a:new t.Uniform2f(Me,X.u_patternscale_a),u_patternscale_b:new t.Uniform2f(Me,X.u_patternscale_b),u_sdfgamma:new t.Uniform1f(Me,X.u_sdfgamma),u_image:new t.Uniform1i(Me,X.u_image),u_tex_y_a:new t.Uniform1f(Me,X.u_tex_y_a),u_tex_y_b:new t.Uniform1f(Me,X.u_tex_y_b),u_mix:new t.Uniform1f(Me,X.u_mix)}},Nl=function(Me,X,ye){var ne=Me.transform;return{u_matrix:Bu(Me,X,ye),u_ratio:1/Qs(X,1,ne.zoom),u_device_pixel_ratio:t.browser.devicePixelRatio,u_units_to_pixels:[1/ne.pixelsToGLUnits[0],1/ne.pixelsToGLUnits[1]]}},au=function(Me,X,ye,ne){return t.extend(Nl(Me,X,ye),{u_image:0,u_image_height:ne})},Bl=function(Me,X,ye,ne){var Se=Me.transform,Je=hl(X,Se);return{u_matrix:Bu(Me,X,ye),u_texsize:X.imageAtlasTexture.size,u_ratio:1/Qs(X,1,Se.zoom),u_device_pixel_ratio:t.browser.devicePixelRatio,u_image:0,u_scale:[Je,ne.fromScale,ne.toScale],u_fade:ne.t,u_units_to_pixels:[1/Se.pixelsToGLUnits[0],1/Se.pixelsToGLUnits[1]]}},iu=function(Me,X,ye,ne,Se){var Je=Me.transform,xt=Me.lineAtlas,At=hl(X,Je),it=ye.layout.get("line-cap")==="round",pt=xt.getDash(ne.from,it),Rt=xt.getDash(ne.to,it),or=pt.width*Se.fromScale,er=Rt.width*Se.toScale;return t.extend(Nl(Me,X,ye),{u_patternscale_a:[At/or,-pt.height/2],u_patternscale_b:[At/er,-Rt.height/2],u_sdfgamma:xt.width/(Math.min(or,er)*256*t.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:pt.y,u_tex_y_b:Rt.y,u_mix:Se.t})};function hl(Me,X){return 1/Qs(Me,1,X.tileZoom)}function Bu(Me,X,ye){return Me.translatePosMatrix(X.tileID.posMatrix,X,ye.paint.get("line-translate"),ye.paint.get("line-translate-anchor"))}var Ou=function(Me,X){return{u_matrix:new t.UniformMatrix4f(Me,X.u_matrix),u_tl_parent:new t.Uniform2f(Me,X.u_tl_parent),u_scale_parent:new t.Uniform1f(Me,X.u_scale_parent),u_buffer_scale:new t.Uniform1f(Me,X.u_buffer_scale),u_fade_t:new t.Uniform1f(Me,X.u_fade_t),u_opacity:new t.Uniform1f(Me,X.u_opacity),u_image0:new t.Uniform1i(Me,X.u_image0),u_image1:new t.Uniform1i(Me,X.u_image1),u_brightness_low:new t.Uniform1f(Me,X.u_brightness_low),u_brightness_high:new t.Uniform1f(Me,X.u_brightness_high),u_saturation_factor:new t.Uniform1f(Me,X.u_saturation_factor),u_contrast_factor:new t.Uniform1f(Me,X.u_contrast_factor),u_spin_weights:new t.Uniform3f(Me,X.u_spin_weights)}},eu=function(Me,X,ye,ne,Se){return{u_matrix:Me,u_tl_parent:X,u_scale_parent:ye,u_buffer_scale:1,u_fade_t:ne.mix,u_opacity:ne.opacity*Se.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:Se.paint.get("raster-brightness-min"),u_brightness_high:Se.paint.get("raster-brightness-max"),u_saturation_factor:Wl(Se.paint.get("raster-saturation")),u_contrast_factor:Ls(Se.paint.get("raster-contrast")),u_spin_weights:No(Se.paint.get("raster-hue-rotate"))}};function No(Me){Me*=Math.PI/180;var X=Math.sin(Me),ye=Math.cos(Me);return[(2*ye+1)/3,(-Math.sqrt(3)*X-ye+1)/3,(Math.sqrt(3)*X-ye+1)/3]}function Ls(Me){return Me>0?1/(1-Me):1+Me}function Wl(Me){return Me>0?1-1/(1.001-Me):-Me}var Cl=function(Me,X){return{u_is_size_zoom_constant:new t.Uniform1i(Me,X.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(Me,X.u_is_size_feature_constant),u_size_t:new t.Uniform1f(Me,X.u_size_t),u_size:new t.Uniform1f(Me,X.u_size),u_camera_to_center_distance:new t.Uniform1f(Me,X.u_camera_to_center_distance),u_pitch:new t.Uniform1f(Me,X.u_pitch),u_rotate_symbol:new t.Uniform1i(Me,X.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(Me,X.u_aspect_ratio),u_fade_change:new t.Uniform1f(Me,X.u_fade_change),u_matrix:new t.UniformMatrix4f(Me,X.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(Me,X.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(Me,X.u_coord_matrix),u_is_text:new t.Uniform1i(Me,X.u_is_text),u_pitch_with_map:new t.Uniform1i(Me,X.u_pitch_with_map),u_texsize:new t.Uniform2f(Me,X.u_texsize),u_texture:new t.Uniform1i(Me,X.u_texture)}},Ec=function(Me,X){return{u_is_size_zoom_constant:new t.Uniform1i(Me,X.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(Me,X.u_is_size_feature_constant),u_size_t:new t.Uniform1f(Me,X.u_size_t),u_size:new t.Uniform1f(Me,X.u_size),u_camera_to_center_distance:new t.Uniform1f(Me,X.u_camera_to_center_distance),u_pitch:new t.Uniform1f(Me,X.u_pitch),u_rotate_symbol:new t.Uniform1i(Me,X.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(Me,X.u_aspect_ratio),u_fade_change:new t.Uniform1f(Me,X.u_fade_change),u_matrix:new t.UniformMatrix4f(Me,X.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(Me,X.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(Me,X.u_coord_matrix),u_is_text:new t.Uniform1i(Me,X.u_is_text),u_pitch_with_map:new t.Uniform1i(Me,X.u_pitch_with_map),u_texsize:new t.Uniform2f(Me,X.u_texsize),u_texture:new t.Uniform1i(Me,X.u_texture),u_gamma_scale:new t.Uniform1f(Me,X.u_gamma_scale),u_device_pixel_ratio:new t.Uniform1f(Me,X.u_device_pixel_ratio),u_is_halo:new t.Uniform1i(Me,X.u_is_halo)}},Mc=function(Me,X){return{u_is_size_zoom_constant:new t.Uniform1i(Me,X.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(Me,X.u_is_size_feature_constant),u_size_t:new t.Uniform1f(Me,X.u_size_t),u_size:new t.Uniform1f(Me,X.u_size),u_camera_to_center_distance:new t.Uniform1f(Me,X.u_camera_to_center_distance),u_pitch:new t.Uniform1f(Me,X.u_pitch),u_rotate_symbol:new t.Uniform1i(Me,X.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(Me,X.u_aspect_ratio),u_fade_change:new t.Uniform1f(Me,X.u_fade_change),u_matrix:new t.UniformMatrix4f(Me,X.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(Me,X.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(Me,X.u_coord_matrix),u_is_text:new t.Uniform1i(Me,X.u_is_text),u_pitch_with_map:new t.Uniform1i(Me,X.u_pitch_with_map),u_texsize:new t.Uniform2f(Me,X.u_texsize),u_texsize_icon:new t.Uniform2f(Me,X.u_texsize_icon),u_texture:new t.Uniform1i(Me,X.u_texture),u_texture_icon:new t.Uniform1i(Me,X.u_texture_icon),u_gamma_scale:new t.Uniform1f(Me,X.u_gamma_scale),u_device_pixel_ratio:new t.Uniform1f(Me,X.u_device_pixel_ratio),u_is_halo:new t.Uniform1i(Me,X.u_is_halo)}},Ic=function(Me,X,ye,ne,Se,Je,xt,At,it,pt){var Rt=Se.transform;return{u_is_size_zoom_constant:+(Me==="constant"||Me==="source"),u_is_size_feature_constant:+(Me==="constant"||Me==="camera"),u_size_t:X?X.uSizeT:0,u_size:X?X.uSize:0,u_camera_to_center_distance:Rt.cameraToCenterDistance,u_pitch:Rt.pitch/360*2*Math.PI,u_rotate_symbol:+ye,u_aspect_ratio:Rt.width/Rt.height,u_fade_change:Se.options.fadeDuration?Se.symbolFadeChange:1,u_matrix:Je,u_label_plane_matrix:xt,u_coord_matrix:At,u_is_text:+it,u_pitch_with_map:+ne,u_texsize:pt,u_texture:0}},uh=function(Me,X,ye,ne,Se,Je,xt,At,it,pt,Rt){var or=Se.transform;return t.extend(Ic(Me,X,ye,ne,Se,Je,xt,At,it,pt),{u_gamma_scale:ne?Math.cos(or._pitch)*or.cameraToCenterDistance:1,u_device_pixel_ratio:t.browser.devicePixelRatio,u_is_halo:1})},Cc=function(Me,X,ye,ne,Se,Je,xt,At,it,pt){return t.extend(uh(Me,X,ye,ne,Se,Je,xt,At,!0,it),{u_texsize_icon:pt,u_texture_icon:1})},jf=function(Me,X){return{u_matrix:new t.UniformMatrix4f(Me,X.u_matrix),u_opacity:new t.Uniform1f(Me,X.u_opacity),u_color:new t.UniformColor(Me,X.u_color)}},ju=function(Me,X){return{u_matrix:new t.UniformMatrix4f(Me,X.u_matrix),u_opacity:new t.Uniform1f(Me,X.u_opacity),u_image:new t.Uniform1i(Me,X.u_image),u_pattern_tl_a:new t.Uniform2f(Me,X.u_pattern_tl_a),u_pattern_br_a:new t.Uniform2f(Me,X.u_pattern_br_a),u_pattern_tl_b:new t.Uniform2f(Me,X.u_pattern_tl_b),u_pattern_br_b:new t.Uniform2f(Me,X.u_pattern_br_b),u_texsize:new t.Uniform2f(Me,X.u_texsize),u_mix:new t.Uniform1f(Me,X.u_mix),u_pattern_size_a:new t.Uniform2f(Me,X.u_pattern_size_a),u_pattern_size_b:new t.Uniform2f(Me,X.u_pattern_size_b),u_scale_a:new t.Uniform1f(Me,X.u_scale_a),u_scale_b:new t.Uniform1f(Me,X.u_scale_b),u_pixel_coord_upper:new t.Uniform2f(Me,X.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(Me,X.u_pixel_coord_lower),u_tile_units_to_pixels:new t.Uniform1f(Me,X.u_tile_units_to_pixels)}},Uf=function(Me,X,ye){return{u_matrix:Me,u_opacity:X,u_color:ye}},os=function(Me,X,ye,ne,Se,Je){return t.extend(kh(ne,Je,ye,Se),{u_matrix:Me,u_opacity:X})},_s={fillExtrusion:$d,fillExtrusionPattern:xc,fill:Bf,fillPattern:Mf,fillOutline:Du,fillOutlinePattern:Rc,circle:wr,collisionBox:kn,collisionCircle:_n,debug:ja,clippingMask:Ii,heatmap:hi,heatmapTexture:Gi,hillshade:vo,hillshadePrepare:es,line:mo,lineGradient:Ji,linePattern:gs,lineSDF:$s,raster:Ou,symbolIcon:Cl,symbolSDF:Ec,symbolTextAndIcon:Mc,background:jf,backgroundPattern:ju},qf;function sf(Me,X,ye,ne,Se,Je,xt){for(var At=Me.context,it=At.gl,pt=Me.useProgram("collisionBox"),Rt=[],or=0,er=0,ur=0;ur<ne.length;ur++){var gr=ne[ur],vr=X.getTile(gr),Zt=vr.getBucket(ye);if(Zt){var ar=gr.posMatrix;(Se[0]!==0||Se[1]!==0)&&(ar=Me.translatePosMatrix(gr.posMatrix,vr,Se,Je));var tr=xt?Zt.textCollisionBox:Zt.iconCollisionBox,Zr=Zt.collisionCircleArray;if(Zr.length>0){var un=t.create(),En=ar;t.mul(un,Zt.placementInvProjMatrix,Me.transform.glCoordMatrix),t.mul(un,un,Zt.placementViewportMatrix),Rt.push({circleArray:Zr,circleOffset:er,transform:En,invTransform:un}),or+=Zr.length/4,er=or}tr&&pt.draw(At,it.LINES,ua.disabled,ia.disabled,Me.colorModeForRenderPass(),an.disabled,ta(ar,Me.transform,vr),ye.id,tr.layoutVertexBuffer,tr.indexBuffer,tr.segments,null,Me.transform.zoom,null,null,tr.collisionVertexBuffer)}}if(!(!xt||!Rt.length)){var ka=Me.useProgram("collisionCircle"),ma=new t.StructArrayLayout2f1f2i16;ma.resize(or*4),ma._trim();for(var ha=0,Pa=0,Da=Rt;Pa<Da.length;Pa+=1)for(var Qa=Da[Pa],Ra=0;Ra<Qa.circleArray.length/4;Ra++){var ii=Ra*4,xi=Qa.circleArray[ii+0],Xi=Qa.circleArray[ii+1],co=Qa.circleArray[ii+2],Is=Qa.circleArray[ii+3];ma.emplace(ha++,xi,Xi,co,Is,0),ma.emplace(ha++,xi,Xi,co,Is,1),ma.emplace(ha++,xi,Xi,co,Is,2),ma.emplace(ha++,xi,Xi,co,Is,3)}(!qf||qf.length<or*2)&&(qf=Yc(or));for(var Cs=At.createIndexBuffer(qf,!0),kl=At.createVertexBuffer(ma,t.collisionCircleLayout.members,!0),Tl=0,Rl=Rt;Tl<Rl.length;Tl+=1){var Pl=Rl[Tl],fc=Ga(Pl.transform,Pl.invTransform,Me.transform);ka.draw(At,it.TRIANGLES,ua.disabled,ia.disabled,Me.colorModeForRenderPass(),an.disabled,fc,ye.id,kl,Cs,t.SegmentVector.simpleSegment(0,Pl.circleOffset*2,Pl.circleArray.length,Pl.circleArray.length/2),null,Me.transform.zoom,null,null,null)}kl.destroy(),Cs.destroy()}}function Yc(Me){var X=Me*2,ye=new t.StructArrayLayout3ui6;ye.resize(X),ye._trim();for(var ne=0;ne<X;ne++){var Se=ne*6;ye.uint16[Se+0]=ne*4+0,ye.uint16[Se+1]=ne*4+1,ye.uint16[Se+2]=ne*4+2,ye.uint16[Se+3]=ne*4+2,ye.uint16[Se+4]=ne*4+3,ye.uint16[Se+5]=ne*4+0}return ye}var Ze=t.identity(new Float32Array(16));function O(Me,X,ye,ne,Se){if(Me.renderPass==="translucent"){var Je=ia.disabled,xt=Me.colorModeForRenderPass(),At=ye.layout.get("text-variable-anchor");At&&Re(ne,Me,ye,X,ye.layout.get("text-rotation-alignment"),ye.layout.get("text-pitch-alignment"),Se),ye.paint.get("icon-opacity").constantOr(1)!==0&&Ct(Me,X,ye,ne,!1,ye.paint.get("icon-translate"),ye.paint.get("icon-translate-anchor"),ye.layout.get("icon-rotation-alignment"),ye.layout.get("icon-pitch-alignment"),ye.layout.get("icon-keep-upright"),Je,xt),ye.paint.get("text-opacity").constantOr(1)!==0&&Ct(Me,X,ye,ne,!0,ye.paint.get("text-translate"),ye.paint.get("text-translate-anchor"),ye.layout.get("text-rotation-alignment"),ye.layout.get("text-pitch-alignment"),ye.layout.get("text-keep-upright"),Je,xt),X.map.showCollisionBoxes&&(sf(Me,X,ye,ne,ye.paint.get("text-translate"),ye.paint.get("text-translate-anchor"),!0),sf(Me,X,ye,ne,ye.paint.get("icon-translate"),ye.paint.get("icon-translate-anchor"),!1))}}function fe(Me,X,ye,ne,Se,Je){var xt=t.getAnchorAlignment(Me),At=xt.horizontalAlign,it=xt.verticalAlign,pt=-(At-.5)*X,Rt=-(it-.5)*ye,or=t.evaluateVariableOffset(Me,ne);return new t.Point((pt/Se+or[0])*Je,(Rt/Se+or[1])*Je)}function Re(Me,X,ye,ne,Se,Je,xt){for(var At=X.transform,it=Se==="map",pt=Je==="map",Rt=0,or=Me;Rt<or.length;Rt+=1){var er=or[Rt],ur=ne.getTile(er),gr=ur.getBucket(ye);if(!(!gr||!gr.text||!gr.text.segments.get().length)){var vr=gr.textSizeData,Zt=t.evaluateSizeForZoom(vr,At.zoom),ar=Qs(ur,1,X.transform.zoom),tr=Kn(er.posMatrix,pt,it,X.transform,ar),Zr=ye.layout.get("icon-text-fit")!=="none"&&gr.hasIconData();if(Zt){var un=Math.pow(2,At.zoom-ur.tileID.overscaledZ);Oe(gr,it,pt,xt,t.symbolSize,At,tr,er.posMatrix,un,Zt,Zr)}}}}function Oe(Me,X,ye,ne,Se,Je,xt,At,it,pt,Rt){var or=Me.text.placedSymbolArray,er=Me.text.dynamicLayoutVertexArray,ur=Me.icon.dynamicLayoutVertexArray,gr={};er.clear();for(var vr=0;vr<or.length;vr++){var Zt=or.get(vr),ar=Me.allowVerticalPlacement&&!Zt.placedOrientation,tr=!Zt.hidden&&Zt.crossTileID&&!ar?ne[Zt.crossTileID]:null;if(!tr)As(Zt.numGlyphs,er);else{var Zr=new t.Point(Zt.anchorX,Zt.anchorY),un=Za(Zr,ye?At:xt),En=Ki(Je.cameraToCenterDistance,un.signedDistanceFromCamera),ka=Se.evaluateSizeForFeature(Me.textSizeData,pt,Zt)*En/t.ONE_EM;ye&&(ka*=Me.tilePixelRatio/it);for(var ma=tr.width,ha=tr.height,Pa=tr.anchor,Da=tr.textOffset,Qa=tr.textBoxScale,Ra=fe(Pa,ma,ha,Da,Qa,ka),ii=ye?Za(Zr.add(Ra),xt).point:un.point.add(X?Ra.rotate(-Je.angle):Ra),xi=Me.allowVerticalPlacement&&Zt.placedOrientation===t.WritingMode.vertical?Math.PI/2:0,Xi=0;Xi<Zt.numGlyphs;Xi++)t.addDynamicAttributes(er,ii,xi);Rt&&Zt.associatedIconIndex>=0&&(gr[Zt.associatedIconIndex]={shiftedAnchor:ii,angle:xi})}}if(Rt){ur.clear();for(var co=Me.icon.placedSymbolArray,Is=0;Is<co.length;Is++){var Cs=co.get(Is);if(Cs.hidden)As(Cs.numGlyphs,ur);else{var kl=gr[Is];if(!kl)As(Cs.numGlyphs,ur);else for(var Tl=0;Tl<Cs.numGlyphs;Tl++)t.addDynamicAttributes(ur,kl.shiftedAnchor,kl.angle)}}Me.icon.dynamicLayoutVertexBuffer.updateData(ur)}Me.text.dynamicLayoutVertexBuffer.updateData(er)}function We(Me,X,ye){return ye.iconsInText&&X?"symbolTextAndIcon":Me?"symbolSDF":"symbolIcon"}function Ct(Me,X,ye,ne,Se,Je,xt,At,it,pt,Rt,or){for(var er=Me.context,ur=er.gl,gr=Me.transform,vr=At==="map",Zt=it==="map",ar=vr&&ye.layout.get("symbol-placement")!=="point",tr=vr&&!Zt&&!ar,Zr=ye.layout.get("symbol-sort-key").constantOr(1)!==void 0,un=!1,En=Me.depthModeForSublayer(0,ua.ReadOnly),ka=ye.layout.get("text-variable-anchor"),ma=[],ha=0,Pa=ne;ha<Pa.length;ha+=1){var Da=Pa[ha],Qa=X.getTile(Da),Ra=Qa.getBucket(ye);if(Ra){var ii=Se?Ra.text:Ra.icon;if(!(!ii||!ii.segments.get().length)){var xi=ii.programConfigurations.get(ye.id),Xi=Se||Ra.sdfIcons,co=Se?Ra.textSizeData:Ra.iconSizeData,Is=Zt||gr.pitch!==0,Cs=Me.useProgram(We(Xi,Se,Ra),xi),kl=t.evaluateSizeForZoom(co,gr.zoom),Tl=void 0,Rl=[0,0],Pl=void 0,fc=void 0,yl=null,Lu=void 0;if(Se){if(Pl=Qa.glyphAtlasTexture,fc=ur.LINEAR,Tl=Qa.glyphAtlasTexture.size,Ra.iconsInText){Rl=Qa.imageAtlasTexture.size,yl=Qa.imageAtlasTexture;var ch=co.kind==="composite"||co.kind==="camera";Lu=Is||Me.options.rotating||Me.options.zooming||ch?ur.LINEAR:ur.NEAREST}}else{var Uh=ye.layout.get("icon-size").constantOr(0)!==1||Ra.iconsNeedLinear;Pl=Qa.imageAtlasTexture,fc=Xi||Me.options.rotating||Me.options.zooming||Uh||Is?ur.LINEAR:ur.NEAREST,Tl=Qa.imageAtlasTexture.size}var Ep=Qs(Qa,1,Me.transform.zoom),Mp=Kn(Da.posMatrix,Zt,vr,Me.transform,Ep),Ev=Ui(Da.posMatrix,Zt,vr,Me.transform,Ep),Qp=ka&&Ra.hasTextData(),ng=ye.layout.get("icon-text-fit")!=="none"&&Qp&&Ra.hasIconData();ar&&Co(Ra,Da.posMatrix,Me,Se,Mp,Ev,Zt,pt);var dm=Me.translatePosMatrix(Da.posMatrix,Qa,Je,xt),Mv=ar||Se&&ka||ng?Ze:Mp,vm=Me.translatePosMatrix(Ev,Qa,Je,xt,!0),Xv=Xi&&ye.paint.get(Se?"text-halo-width":"icon-halo-width").constantOr(1)!==0,Cv=void 0;Xi?Ra.iconsInText?Cv=Cc(co.kind,kl,tr,Zt,Me,dm,Mv,vm,Tl,Rl):Cv=uh(co.kind,kl,tr,Zt,Me,dm,Mv,vm,Se,Tl):Cv=Ic(co.kind,kl,tr,Zt,Me,dm,Mv,vm,Se,Tl);var Cp={program:Cs,buffers:ii,uniformValues:Cv,atlasTexture:Pl,atlasTextureIcon:yl,atlasInterpolation:fc,atlasInterpolationIcon:Lu,isSDF:Xi,hasHalo:Xv};if(Zr&&Ra.canOverlap){un=!0;for(var em=ii.segments.get(),kp=0,i1=em;kp<i1.length;kp+=1){var ag=i1[kp];ma.push({segments:new t.SegmentVector([ag]),sortKey:ag.sortKey,state:Cp})}}else ma.push({segments:ii.segments,sortKey:0,state:Cp})}}}un&&ma.sort(function(I_,D_){return I_.sortKey-D_.sortKey});for(var vd=0,ig=ma;vd<ig.length;vd+=1){var o1=ig[vd],Kd=o1.state;if(er.activeTexture.set(ur.TEXTURE0),Kd.atlasTexture.bind(Kd.atlasInterpolation,ur.CLAMP_TO_EDGE),Kd.atlasTextureIcon&&(er.activeTexture.set(ur.TEXTURE1),Kd.atlasTextureIcon&&Kd.atlasTextureIcon.bind(Kd.atlasInterpolationIcon,ur.CLAMP_TO_EDGE)),Kd.isSDF){var ey=Kd.uniformValues;Kd.hasHalo&&(ey.u_is_halo=1,Nt(Kd.buffers,o1.segments,ye,Me,Kd.program,En,Rt,or,ey)),ey.u_is_halo=0}Nt(Kd.buffers,o1.segments,ye,Me,Kd.program,En,Rt,or,Kd.uniformValues)}}function Nt(Me,X,ye,ne,Se,Je,xt,At,it){var pt=ne.context,Rt=pt.gl;Se.draw(pt,Rt.TRIANGLES,Je,xt,At,an.disabled,it,ye.id,Me.layoutVertexBuffer,Me.indexBuffer,X,ye.paint,ne.transform.zoom,Me.programConfigurations.get(ye.id),Me.dynamicLayoutVertexBuffer,Me.opacityVertexBuffer)}function rr(Me,X,ye,ne){if(Me.renderPass==="translucent"){var Se=ye.paint.get("circle-opacity"),Je=ye.paint.get("circle-stroke-width"),xt=ye.paint.get("circle-stroke-opacity"),At=ye.layout.get("circle-sort-key").constantOr(1)!==void 0;if(!(Se.constantOr(1)===0&&(Je.constantOr(1)===0||xt.constantOr(1)===0))){for(var it=Me.context,pt=it.gl,Rt=Me.depthModeForSublayer(0,ua.ReadOnly),or=ia.disabled,er=Me.colorModeForRenderPass(),ur=[],gr=0;gr<ne.length;gr++){var vr=ne[gr],Zt=X.getTile(vr),ar=Zt.getBucket(ye);if(ar){var tr=ar.programConfigurations.get(ye.id),Zr=Me.useProgram("circle",tr),un=ar.layoutVertexBuffer,En=ar.indexBuffer,ka=Gr(Me,vr,Zt,ye),ma={programConfiguration:tr,program:Zr,layoutVertexBuffer:un,indexBuffer:En,uniformValues:ka};if(At)for(var ha=ar.segments.get(),Pa=0,Da=ha;Pa<Da.length;Pa+=1){var Qa=Da[Pa];ur.push({segments:new t.SegmentVector([Qa]),sortKey:Qa.sortKey,state:ma})}else ur.push({segments:ar.segments,sortKey:0,state:ma})}}At&&ur.sort(function(Pl,fc){return Pl.sortKey-fc.sortKey});for(var Ra=0,ii=ur;Ra<ii.length;Ra+=1){var xi=ii[Ra],Xi=xi.state,co=Xi.programConfiguration,Is=Xi.program,Cs=Xi.layoutVertexBuffer,kl=Xi.indexBuffer,Tl=Xi.uniformValues,Rl=xi.segments;Is.draw(it,pt.TRIANGLES,Rt,or,er,an.disabled,Tl,ye.id,Cs,kl,Rl,ye.paint,Me.transform.zoom,co)}}}}function Tr(Me,X,ye,ne){if(ye.paint.get("heatmap-opacity")!==0)if(Me.renderPass==="offscreen"){var Se=Me.context,Je=Se.gl,xt=ia.disabled,At=new Qt([Je.ONE,Je.ONE],t.Color.transparent,[!0,!0,!0,!0]);Fr(Se,Me,ye),Se.clear({color:t.Color.transparent});for(var it=0;it<ne.length;it++){var pt=ne[it];if(!X.hasRenderableParent(pt)){var Rt=X.getTile(pt),or=Rt.getBucket(ye);if(or){var er=or.programConfigurations.get(ye.id),ur=Me.useProgram("heatmap",er),gr=Me.transform,vr=gr.zoom;ur.draw(Se,Je.TRIANGLES,ua.disabled,xt,At,an.disabled,wi(pt.posMatrix,Rt,vr,ye.paint.get("heatmap-intensity")),ye.id,or.layoutVertexBuffer,or.indexBuffer,or.segments,ye.paint,Me.transform.zoom,er)}}}Se.viewport.set([0,0,Me.width,Me.height])}else Me.renderPass==="translucent"&&(Me.context.setColorMode(Me.colorModeForRenderPass()),mn(Me,ye))}function Fr(Me,X,ye){var ne=Me.gl;Me.activeTexture.set(ne.TEXTURE1),Me.viewport.set([0,0,X.width/4,X.height/4]);var Se=ye.heatmapFbo;if(Se)ne.bindTexture(ne.TEXTURE_2D,Se.colorAttachment.get()),Me.bindFramebuffer.set(Se.framebuffer);else{var Je=ne.createTexture();ne.bindTexture(ne.TEXTURE_2D,Je),ne.texParameteri(ne.TEXTURE_2D,ne.TEXTURE_WRAP_S,ne.CLAMP_TO_EDGE),ne.texParameteri(ne.TEXTURE_2D,ne.TEXTURE_WRAP_T,ne.CLAMP_TO_EDGE),ne.texParameteri(ne.TEXTURE_2D,ne.TEXTURE_MIN_FILTER,ne.LINEAR),ne.texParameteri(ne.TEXTURE_2D,ne.TEXTURE_MAG_FILTER,ne.LINEAR),Se=ye.heatmapFbo=Me.createFramebuffer(X.width/4,X.height/4,!1),Vr(Me,X,Je,Se)}}function Vr(Me,X,ye,ne){var Se=Me.gl,Je=Me.extRenderToTextureHalfFloat?Me.extTextureHalfFloat.HALF_FLOAT_OES:Se.UNSIGNED_BYTE;Se.texImage2D(Se.TEXTURE_2D,0,Se.RGBA,X.width/4,X.height/4,0,Se.RGBA,Je,null),ne.colorAttachment.set(ye)}function mn(Me,X){var ye=Me.context,ne=ye.gl,Se=X.heatmapFbo;if(Se){ye.activeTexture.set(ne.TEXTURE0),ne.bindTexture(ne.TEXTURE_2D,Se.colorAttachment.get()),ye.activeTexture.set(ne.TEXTURE1);var Je=X.colorRampTexture;Je||(Je=X.colorRampTexture=new t.Texture(ye,X.colorRamp,ne.RGBA)),Je.bind(ne.LINEAR,ne.CLAMP_TO_EDGE),Me.useProgram("heatmapTexture").draw(ye,ne.TRIANGLES,ua.disabled,ia.disabled,Me.colorModeForRenderPass(),an.disabled,si(Me,X,0,1),X.id,Me.viewportBuffer,Me.quadTriangleIndexBuffer,Me.viewportSegments,X.paint,Me.transform.zoom)}}function Dn(Me,X,ye,ne){if(Me.renderPass==="translucent"){var Se=ye.paint.get("line-opacity"),Je=ye.paint.get("line-width");if(!(Se.constantOr(1)===0||Je.constantOr(1)===0))for(var xt=Me.depthModeForSublayer(0,ua.ReadOnly),At=Me.colorModeForRenderPass(),it=ye.paint.get("line-dasharray"),pt=ye.paint.get("line-pattern"),Rt=pt.constantOr(1),or=ye.paint.get("line-gradient"),er=ye.getCrossfadeParameters(),ur=Rt?"linePattern":it?"lineSDF":or?"lineGradient":"line",gr=Me.context,vr=gr.gl,Zt=!0,ar=0,tr=ne;ar<tr.length;ar+=1){var Zr=tr[ar],un=X.getTile(Zr);if(!(Rt&&!un.patternsLoaded())){var En=un.getBucket(ye);if(En){var ka=En.programConfigurations.get(ye.id),ma=Me.context.program.get(),ha=Me.useProgram(ur,ka),Pa=Zt||ha.program!==ma,Da=pt.constantOr(null);if(Da&&un.imageAtlas){var Qa=un.imageAtlas,Ra=Qa.patternPositions[Da.to.toString()],ii=Qa.patternPositions[Da.from.toString()];Ra&&ii&&ka.setConstantPatternPositions(Ra,ii)}var xi=Rt?Bl(Me,un,ye,er):it?iu(Me,un,ye,it,er):or?au(Me,un,ye,En.lineClipsArray.length):Nl(Me,un,ye);if(Rt)gr.activeTexture.set(vr.TEXTURE0),un.imageAtlasTexture.bind(vr.LINEAR,vr.CLAMP_TO_EDGE),ka.updatePaintBuffers(er);else if(it&&(Pa||Me.lineAtlas.dirty))gr.activeTexture.set(vr.TEXTURE0),Me.lineAtlas.bind(gr);else if(or){var Xi=En.gradients[ye.id],co=Xi.texture;if(ye.gradientVersion!==Xi.version){var Is=256;if(ye.stepInterpolant){var Cs=X.getSource().maxzoom,kl=Zr.canonical.z===Cs?Math.ceil(1<<Me.transform.maxZoom-Zr.canonical.z):1,Tl=En.maxLineLength/t.EXTENT,Rl=1024,Pl=Tl*Rl*kl;Is=t.clamp(t.nextPowerOfTwo(Pl),256,gr.maxTextureSize)}Xi.gradient=t.renderColorRamp({expression:ye.gradientExpression(),evaluationKey:"lineProgress",resolution:Is,image:Xi.gradient||void 0,clips:En.lineClipsArray}),Xi.texture?Xi.texture.update(Xi.gradient):Xi.texture=new t.Texture(gr,Xi.gradient,vr.RGBA),Xi.version=ye.gradientVersion,co=Xi.texture}gr.activeTexture.set(vr.TEXTURE0),co.bind(ye.stepInterpolant?vr.NEAREST:vr.LINEAR,vr.CLAMP_TO_EDGE)}ha.draw(gr,vr.TRIANGLES,xt,Me.stencilModeForClipping(Zr),At,an.disabled,xi,ye.id,En.layoutVertexBuffer,En.indexBuffer,En.segments,ye.paint,Me.transform.zoom,ka,En.layoutVertexBuffer2),Zt=!1}}}}}function nt(Me,X,ye,ne){var Se=ye.paint.get("fill-color"),Je=ye.paint.get("fill-opacity");if(Je.constantOr(1)!==0){var xt=Me.colorModeForRenderPass(),At=ye.paint.get("fill-pattern"),it=Me.opaquePassEnabledForLayer()&&!At.constantOr(1)&&Se.constantOr(t.Color.transparent).a===1&&Je.constantOr(0)===1?"opaque":"translucent";if(Me.renderPass===it){var pt=Me.depthModeForSublayer(1,Me.renderPass==="opaque"?ua.ReadWrite:ua.ReadOnly);ct(Me,X,ye,ne,pt,xt,!1)}if(Me.renderPass==="translucent"&&ye.paint.get("fill-antialias")){var Rt=Me.depthModeForSublayer(ye.getPaintProperty("fill-outline-color")?2:0,ua.ReadOnly);ct(Me,X,ye,ne,Rt,xt,!0)}}}function ct(Me,X,ye,ne,Se,Je,xt){var At=Me.context.gl,it=ye.paint.get("fill-pattern"),pt=it&&it.constantOr(1),Rt=ye.getCrossfadeParameters(),or,er,ur,gr,vr;xt?(er=pt&&!ye.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",or=At.LINES):(er=pt?"fillPattern":"fill",or=At.TRIANGLES);for(var Zt=0,ar=ne;Zt<ar.length;Zt+=1){var tr=ar[Zt],Zr=X.getTile(tr);if(!(pt&&!Zr.patternsLoaded())){var un=Zr.getBucket(ye);if(un){var En=un.programConfigurations.get(ye.id),ka=Me.useProgram(er,En);pt&&(Me.context.activeTexture.set(At.TEXTURE0),Zr.imageAtlasTexture.bind(At.LINEAR,At.CLAMP_TO_EDGE),En.updatePaintBuffers(Rt));var ma=it.constantOr(null);if(ma&&Zr.imageAtlas){var ha=Zr.imageAtlas,Pa=ha.patternPositions[ma.to.toString()],Da=ha.patternPositions[ma.from.toString()];Pa&&Da&&En.setConstantPatternPositions(Pa,Da)}var Qa=Me.translatePosMatrix(tr.posMatrix,Zr,ye.paint.get("fill-translate"),ye.paint.get("fill-translate-anchor"));if(!xt)gr=un.indexBuffer,vr=un.segments,ur=pt?rh(Qa,Me,Rt,Zr):Su(Qa);else{gr=un.indexBuffer2,vr=un.segments2;var Ra=[At.drawingBufferWidth,At.drawingBufferHeight];ur=er==="fillOutlinePattern"&&pt?rd(Qa,Me,Rt,Zr,Ra):Cf(Qa,Ra)}ka.draw(Me.context,or,Se,Me.stencilModeForClipping(tr),Je,an.disabled,ur,ye.id,un.layoutVertexBuffer,gr,vr,ye.paint,Me.transform.zoom,En)}}}}function Tt(Me,X,ye,ne){var Se=ye.paint.get("fill-extrusion-opacity");if(Se!==0&&Me.renderPass==="translucent"){var Je=new ua(Me.context.gl.LEQUAL,ua.ReadWrite,Me.depthRangeFor3D);if(Se===1&&!ye.paint.get("fill-extrusion-pattern").constantOr(1)){var xt=Me.colorModeForRenderPass();Pt(Me,X,ye,ne,Je,ia.disabled,xt)}else Pt(Me,X,ye,ne,Je,ia.disabled,Qt.disabled),Pt(Me,X,ye,ne,Je,Me.stencilModeFor3D(),Me.colorModeForRenderPass())}}function Pt(Me,X,ye,ne,Se,Je,xt){for(var At=Me.context,it=At.gl,pt=ye.paint.get("fill-extrusion-pattern"),Rt=pt.constantOr(1),or=ye.getCrossfadeParameters(),er=ye.paint.get("fill-extrusion-opacity"),ur=0,gr=ne;ur<gr.length;ur+=1){var vr=gr[ur],Zt=X.getTile(vr),ar=Zt.getBucket(ye);if(ar){var tr=ar.programConfigurations.get(ye.id),Zr=Me.useProgram(Rt?"fillExtrusionPattern":"fillExtrusion",tr);Rt&&(Me.context.activeTexture.set(it.TEXTURE0),Zt.imageAtlasTexture.bind(it.LINEAR,it.CLAMP_TO_EDGE),tr.updatePaintBuffers(or));var un=pt.constantOr(null);if(un&&Zt.imageAtlas){var En=Zt.imageAtlas,ka=En.patternPositions[un.to.toString()],ma=En.patternPositions[un.from.toString()];ka&&ma&&tr.setConstantPatternPositions(ka,ma)}var ha=Me.translatePosMatrix(vr.posMatrix,Zt,ye.paint.get("fill-extrusion-translate"),ye.paint.get("fill-extrusion-translate-anchor")),Pa=ye.paint.get("fill-extrusion-vertical-gradient"),Da=Rt?of(ha,Me,Pa,er,vr,or,Zt):dd(ha,Me,Pa,er);Zr.draw(At,At.gl.TRIANGLES,Se,Je,xt,an.backCCW,Da,ye.id,ar.layoutVertexBuffer,ar.indexBuffer,ar.segments,ye.paint,Me.transform.zoom,tr)}}}function Gt(Me,X,ye,ne){if(!(Me.renderPass!=="offscreen"&&Me.renderPass!=="translucent")){for(var Se=Me.context,Je=Me.depthModeForSublayer(0,ua.ReadOnly),xt=Me.colorModeForRenderPass(),At=Me.renderPass==="translucent"?Me.stencilConfigForOverlap(ne):[{},ne],it=At[0],pt=At[1],Rt=0,or=pt;Rt<or.length;Rt+=1){var er=or[Rt],ur=X.getTile(er);ur.needsHillshadePrepare&&Me.renderPass==="offscreen"?Kt(Me,ur,ye,Je,ia.disabled,xt):Me.renderPass==="translucent"&&zt(Me,ur,ye,Je,it[er.overscaledZ],xt)}Se.viewport.set([0,0,Me.width,Me.height])}}function zt(Me,X,ye,ne,Se,Je){var xt=Me.context,At=xt.gl,it=X.fbo;if(it){var pt=Me.useProgram("hillshade");xt.activeTexture.set(At.TEXTURE0),At.bindTexture(At.TEXTURE_2D,it.colorAttachment.get());var Rt=$o(Me,X,ye);pt.draw(xt,At.TRIANGLES,ne,Se,Je,an.disabled,Rt,ye.id,Me.rasterBoundsBuffer,Me.quadTriangleIndexBuffer,Me.rasterBoundsSegments)}}function Kt(Me,X,ye,ne,Se,Je){var xt=Me.context,At=xt.gl,it=X.dem;if(it&&it.data){var pt=it.dim,Rt=it.stride,or=it.getPixels();if(xt.activeTexture.set(At.TEXTURE1),xt.pixelStoreUnpackPremultiplyAlpha.set(!1),X.demTexture=X.demTexture||Me.getTileTexture(Rt),X.demTexture){var er=X.demTexture;er.update(or,{premultiply:!1}),er.bind(At.NEAREST,At.CLAMP_TO_EDGE)}else X.demTexture=new t.Texture(xt,or,At.RGBA,{premultiply:!1}),X.demTexture.bind(At.NEAREST,At.CLAMP_TO_EDGE);xt.activeTexture.set(At.TEXTURE0);var ur=X.fbo;if(!ur){var gr=new t.Texture(xt,{width:pt,height:pt,data:null},At.RGBA);gr.bind(At.LINEAR,At.CLAMP_TO_EDGE),ur=X.fbo=xt.createFramebuffer(pt,pt,!0),ur.colorAttachment.set(gr.texture)}xt.bindFramebuffer.set(ur.framebuffer),xt.viewport.set([0,0,pt,pt]),Me.useProgram("hillshadePrepare").draw(xt,At.TRIANGLES,ne,Se,Je,an.disabled,is(X.tileID,it),ye.id,Me.rasterBoundsBuffer,Me.quadTriangleIndexBuffer,Me.rasterBoundsSegments),X.needsHillshadePrepare=!1}}function Cr(Me,X,ye,ne){if(Me.renderPass==="translucent"&&ye.paint.get("raster-opacity")!==0&&ne.length)for(var Se=Me.context,Je=Se.gl,xt=X.getSource(),At=Me.useProgram("raster"),it=Me.colorModeForRenderPass(),pt=xt instanceof de?[{},ne]:Me.stencilConfigForOverlap(ne),Rt=pt[0],or=pt[1],er=or[or.length-1].overscaledZ,ur=!Me.options.moving,gr=0,vr=or;gr<vr.length;gr+=1){var Zt=vr[gr],ar=Me.depthModeForSublayer(Zt.overscaledZ-er,ye.paint.get("raster-opacity")===1?ua.ReadWrite:ua.ReadOnly,Je.LESS),tr=X.getTile(Zt),Zr=Me.transform.calculatePosMatrix(Zt.toUnwrapped(),ur);tr.registerFadeDuration(ye.paint.get("raster-fade-duration"));var un=X.findLoadedParent(Zt,0),En=Nr(tr,un,X,ye,Me.transform),ka=void 0,ma=void 0,ha=ye.paint.get("raster-resampling")==="nearest"?Je.NEAREST:Je.LINEAR;Se.activeTexture.set(Je.TEXTURE0),tr.texture.bind(ha,Je.CLAMP_TO_EDGE,Je.LINEAR_MIPMAP_NEAREST),Se.activeTexture.set(Je.TEXTURE1),un?(un.texture.bind(ha,Je.CLAMP_TO_EDGE,Je.LINEAR_MIPMAP_NEAREST),ka=Math.pow(2,un.tileID.overscaledZ-tr.tileID.overscaledZ),ma=[tr.tileID.canonical.x*ka%1,tr.tileID.canonical.y*ka%1]):tr.texture.bind(ha,Je.CLAMP_TO_EDGE,Je.LINEAR_MIPMAP_NEAREST);var Pa=eu(Zr,ma||[0,0],ka||1,En,ye);xt instanceof de?At.draw(Se,Je.TRIANGLES,ar,ia.disabled,it,an.disabled,Pa,ye.id,xt.boundsBuffer,Me.quadTriangleIndexBuffer,xt.boundsSegments):At.draw(Se,Je.TRIANGLES,ar,Rt[Zt.overscaledZ],it,an.disabled,Pa,ye.id,Me.rasterBoundsBuffer,Me.quadTriangleIndexBuffer,Me.rasterBoundsSegments)}}function Nr(Me,X,ye,ne,Se){var Je=ne.paint.get("raster-fade-duration");if(Je>0){var xt=t.browser.now(),At=(xt-Me.timeAdded)/Je,it=X?(xt-X.timeAdded)/Je:-1,pt=ye.getSource(),Rt=Se.coveringZoomLevel({tileSize:pt.tileSize,roundZoom:pt.roundZoom}),or=!X||Math.abs(X.tileID.overscaledZ-Rt)>Math.abs(Me.tileID.overscaledZ-Rt),er=or&&Me.refreshedUponExpiration?1:t.clamp(or?At:1-it,0,1);return Me.refreshedUponExpiration&&At>=1&&(Me.refreshedUponExpiration=!1),X?{opacity:1,mix:1-er}:{opacity:er,mix:0}}else return{opacity:1,mix:0}}function Hr(Me,X,ye){var ne=ye.paint.get("background-color"),Se=ye.paint.get("background-opacity");if(Se!==0){var Je=Me.context,xt=Je.gl,At=Me.transform,it=At.tileSize,pt=ye.paint.get("background-pattern");if(!Me.isPatternMissing(pt)){var Rt=!pt&&ne.a===1&&Se===1&&Me.opaquePassEnabledForLayer()?"opaque":"translucent";if(Me.renderPass===Rt){var or=ia.disabled,er=Me.depthModeForSublayer(0,Rt==="opaque"?ua.ReadWrite:ua.ReadOnly),ur=Me.colorModeForRenderPass(),gr=Me.useProgram(pt?"backgroundPattern":"background"),vr=At.coveringTiles({tileSize:it});pt&&(Je.activeTexture.set(xt.TEXTURE0),Me.imageManager.bind(Me.context));for(var Zt=ye.getCrossfadeParameters(),ar=0,tr=vr;ar<tr.length;ar+=1){var Zr=tr[ar],un=Me.transform.calculatePosMatrix(Zr.toUnwrapped()),En=pt?os(un,Se,Me,pt,{tileID:Zr,tileSize:it},Zt):Uf(un,Se,ne);gr.draw(Je,xt.TRIANGLES,er,or,ur,an.disabled,En,ye.id,Me.tileExtentBuffer,Me.quadTriangleIndexBuffer,Me.tileExtentSegments)}}}}}var sn=new t.Color(1,0,0,1),bn=new t.Color(0,1,0,1),Vn=new t.Color(0,0,1,1),Yn=new t.Color(1,0,1,1),va=new t.Color(0,1,1,1);function Va(Me){var X=Me.transform.padding,ye=3;yi(Me,Me.transform.height-(X.top||0),ye,sn),yi(Me,X.bottom||0,ye,bn),Mi(Me,X.left||0,ye,Vn),Mi(Me,Me.transform.width-(X.right||0),ye,Yn);var ne=Me.transform.centerPoint;Si(Me,ne.x,Me.transform.height-ne.y,va)}function Si(Me,X,ye,ne){var Se=20,Je=2;go(Me,X-Je/2,ye-Se/2,Je,Se,ne),go(Me,X-Se/2,ye-Je/2,Se,Je,ne)}function yi(Me,X,ye,ne){go(Me,0,X+ye/2,Me.transform.width,ye,ne)}function Mi(Me,X,ye,ne){go(Me,X-ye/2,0,ye,Me.transform.height,ne)}function go(Me,X,ye,ne,Se,Je){var xt=Me.context,At=xt.gl;At.enable(At.SCISSOR_TEST),At.scissor(X*t.browser.devicePixelRatio,ye*t.browser.devicePixelRatio,ne*t.browser.devicePixelRatio,Se*t.browser.devicePixelRatio),xt.clear({color:Je}),At.disable(At.SCISSOR_TEST)}function jo(Me,X,ye){for(var ne=0;ne<ye.length;ne++)Do(Me,X,ye[ne])}function Do(Me,X,ye){var ne=Me.context,Se=ne.gl,Je=ye.posMatrix,xt=Me.useProgram("debug"),At=ua.disabled,it=ia.disabled,pt=Me.colorModeForRenderPass(),Rt="$debug";ne.activeTexture.set(Se.TEXTURE0),Me.emptyTexture.bind(Se.LINEAR,Se.CLAMP_TO_EDGE),xt.draw(ne,Se.LINE_STRIP,At,it,pt,an.disabled,Ai(Je,t.Color.red),Rt,Me.debugBuffer,Me.tileBorderIndexBuffer,Me.debugSegments);var or=X.getTileByID(ye.key).latestRawTileData,er=or&&or.byteLength||0,ur=Math.floor(er/1024),gr=X.getTile(ye).tileSize,vr=512/Math.min(gr,512)*(ye.overscaledZ/Me.transform.zoom)*.5,Zt=ye.canonical.toString();ye.overscaledZ!==ye.canonical.z&&(Zt+=" => "+ye.overscaledZ);var ar=Zt+" "+ur+"kb";us(Me,ar),xt.draw(ne,Se.TRIANGLES,At,it,Qt.alphaBlended,an.disabled,Ai(Je,t.Color.transparent,vr),Rt,Me.debugBuffer,Me.quadTriangleIndexBuffer,Me.debugSegments)}function us(Me,X){Me.initDebugOverlayCanvas();var ye=Me.debugOverlayCanvas,ne=Me.context.gl,Se=Me.debugOverlayCanvas.getContext("2d");Se.clearRect(0,0,ye.width,ye.height),Se.shadowColor="white",Se.shadowBlur=2,Se.lineWidth=1.5,Se.strokeStyle="white",Se.textBaseline="top",Se.font="bold 36px Open Sans, sans-serif",Se.fillText(X,5,5),Se.strokeText(X,5,5),Me.debugOverlayTexture.update(ye),Me.debugOverlayTexture.bind(ne.LINEAR,ne.CLAMP_TO_EDGE)}function sl(Me,X,ye){var ne=Me.context,Se=ye.implementation;if(Me.renderPass==="offscreen"){var Je=Se.prerender;Je&&(Me.setCustomLayerDefaults(),ne.setColorMode(Me.colorModeForRenderPass()),Je.call(Se,ne.gl,Me.transform.customLayerMatrix()),ne.setDirty(),Me.setBaseState())}else if(Me.renderPass==="translucent"){Me.setCustomLayerDefaults(),ne.setColorMode(Me.colorModeForRenderPass()),ne.setStencilMode(ia.disabled);var xt=Se.renderingMode==="3d"?new ua(Me.context.gl.LEQUAL,ua.ReadWrite,Me.depthRangeFor3D):Me.depthModeForSublayer(0,ua.ReadOnly);ne.setDepthMode(xt),Se.render(ne.gl,Me.transform.customLayerMatrix()),ne.setDirty(),Me.setBaseState(),ne.bindFramebuffer.set(null)}}var ll={symbol:O,circle:rr,heatmap:Tr,line:Dn,fill:nt,"fill-extrusion":Tt,hillshade:Gt,raster:Cr,background:Hr,debug:jo,custom:sl},Bs=function(X,ye){this.context=new wn(X),this.transform=ye,this._tileTextures={},this.setup(),this.numSublayers=Ln.maxUnderzooming+Ln.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Au,this.gpuTimers={}};Bs.prototype.resize=function(X,ye){if(this.width=X*t.browser.devicePixelRatio,this.height=ye*t.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var ne=0,Se=this.style._order;ne<Se.length;ne+=1){var Je=Se[ne];this.style._layers[Je].resize()}},Bs.prototype.setup=function(){var X=this.context,ye=new t.StructArrayLayout2i4;ye.emplaceBack(0,0),ye.emplaceBack(t.EXTENT,0),ye.emplaceBack(0,t.EXTENT),ye.emplaceBack(t.EXTENT,t.EXTENT),this.tileExtentBuffer=X.createVertexBuffer(ye,Tf.members),this.tileExtentSegments=t.SegmentVector.simpleSegment(0,0,4,2);var ne=new t.StructArrayLayout2i4;ne.emplaceBack(0,0),ne.emplaceBack(t.EXTENT,0),ne.emplaceBack(0,t.EXTENT),ne.emplaceBack(t.EXTENT,t.EXTENT),this.debugBuffer=X.createVertexBuffer(ne,Tf.members),this.debugSegments=t.SegmentVector.simpleSegment(0,0,4,5);var Se=new t.StructArrayLayout4i8;Se.emplaceBack(0,0,0,0),Se.emplaceBack(t.EXTENT,0,t.EXTENT,0),Se.emplaceBack(0,t.EXTENT,0,t.EXTENT),Se.emplaceBack(t.EXTENT,t.EXTENT,t.EXTENT,t.EXTENT),this.rasterBoundsBuffer=X.createVertexBuffer(Se,ge.members),this.rasterBoundsSegments=t.SegmentVector.simpleSegment(0,0,4,2);var Je=new t.StructArrayLayout2i4;Je.emplaceBack(0,0),Je.emplaceBack(1,0),Je.emplaceBack(0,1),Je.emplaceBack(1,1),this.viewportBuffer=X.createVertexBuffer(Je,Tf.members),this.viewportSegments=t.SegmentVector.simpleSegment(0,0,4,2);var xt=new t.StructArrayLayout1ui2;xt.emplaceBack(0),xt.emplaceBack(1),xt.emplaceBack(3),xt.emplaceBack(2),xt.emplaceBack(0),this.tileBorderIndexBuffer=X.createIndexBuffer(xt);var At=new t.StructArrayLayout3ui6;At.emplaceBack(0,1,2),At.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=X.createIndexBuffer(At),this.emptyTexture=new t.Texture(X,{width:1,height:1,data:new Uint8Array([0,0,0,0])},X.gl.RGBA);var it=this.context.gl;this.stencilClearMode=new ia({func:it.ALWAYS,mask:0},0,255,it.ZERO,it.ZERO,it.ZERO)},Bs.prototype.clearStencil=function(){var X=this.context,ye=X.gl;this.nextStencilID=1,this.currentStencilSource=void 0;var ne=t.create();t.ortho(ne,0,this.width,this.height,0,0,1),t.scale(ne,ne,[ye.drawingBufferWidth,ye.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(X,ye.TRIANGLES,ua.disabled,this.stencilClearMode,Qt.disabled,an.disabled,oo(ne),"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)},Bs.prototype._renderTileClippingMasks=function(X,ye){if(!(this.currentStencilSource===X.source||!X.isTileClipped()||!ye||!ye.length)){this.currentStencilSource=X.source;var ne=this.context,Se=ne.gl;this.nextStencilID+ye.length>256&&this.clearStencil(),ne.setColorMode(Qt.disabled),ne.setDepthMode(ua.disabled);var Je=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var xt=0,At=ye;xt<At.length;xt+=1){var it=At[xt],pt=this._tileClippingMaskIDs[it.key]=this.nextStencilID++;Je.draw(ne,Se.TRIANGLES,ua.disabled,new ia({func:Se.ALWAYS,mask:0},pt,255,Se.KEEP,Se.KEEP,Se.REPLACE),Qt.disabled,an.disabled,oo(it.posMatrix),"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}},Bs.prototype.stencilModeFor3D=function(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();var X=this.nextStencilID++,ye=this.context.gl;return new ia({func:ye.NOTEQUAL,mask:255},X,255,ye.KEEP,ye.KEEP,ye.REPLACE)},Bs.prototype.stencilModeForClipping=function(X){var ye=this.context.gl;return new ia({func:ye.EQUAL,mask:255},this._tileClippingMaskIDs[X.key],0,ye.KEEP,ye.KEEP,ye.REPLACE)},Bs.prototype.stencilConfigForOverlap=function(X){var ye,ne=this.context.gl,Se=X.sort(function(pt,Rt){return Rt.overscaledZ-pt.overscaledZ}),Je=Se[Se.length-1].overscaledZ,xt=Se[0].overscaledZ-Je+1;if(xt>1){this.currentStencilSource=void 0,this.nextStencilID+xt>256&&this.clearStencil();for(var At={},it=0;it<xt;it++)At[it+Je]=new ia({func:ne.GEQUAL,mask:255},it+this.nextStencilID,255,ne.KEEP,ne.KEEP,ne.REPLACE);return this.nextStencilID+=xt,[At,Se]}return[(ye={},ye[Je]=ia.disabled,ye),Se]},Bs.prototype.colorModeForRenderPass=function(){var X=this.context.gl;if(this._showOverdrawInspector){var ye=8,ne=1/ye;return new Qt([X.CONSTANT_COLOR,X.ONE],new t.Color(ne,ne,ne,0),[!0,!0,!0,!0])}else return this.renderPass==="opaque"?Qt.unblended:Qt.alphaBlended},Bs.prototype.depthModeForSublayer=function(X,ye,ne){if(!this.opaquePassEnabledForLayer())return ua.disabled;var Se=1-((1+this.currentLayer)*this.numSublayers+X)*this.depthEpsilon;return new ua(ne||this.context.gl.LEQUAL,ye,[Se,Se])},Bs.prototype.opaquePassEnabledForLayer=function(){return this.currentLayer<this.opaquePassCutoff},Bs.prototype.render=function(X,ye){var ne=this;this.style=X,this.options=ye,this.lineAtlas=X.lineAtlas,this.imageManager=X.imageManager,this.glyphManager=X.glyphManager,this.symbolFadeChange=X.placement.symbolFadeChange(t.browser.now()),this.imageManager.beginFrame();var Se=this.style._order,Je=this.style.sourceCaches;for(var xt in Je){var At=Je[xt];At.used&&At.prepare(this.context)}var it={},pt={},Rt={};for(var or in Je){var er=Je[or];it[or]=er.getVisibleCoordinates(),pt[or]=it[or].slice().reverse(),Rt[or]=er.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(var ur=0;ur<Se.length;ur++){var gr=Se[ur];if(this.style._layers[gr].is3D()){this.opaquePassCutoff=ur;break}}this.renderPass="offscreen";for(var vr=0,Zt=Se;vr<Zt.length;vr+=1){var ar=Zt[vr],tr=this.style._layers[ar];if(!(!tr.hasOffscreenPass()||tr.isHidden(this.transform.zoom))){var Zr=pt[tr.source];tr.type!=="custom"&&!Zr.length||this.renderLayer(this,Je[tr.source],tr,Zr)}}for(this.context.bindFramebuffer.set(null),this.context.clear({color:ye.showOverdrawInspector?t.Color.black:t.Color.transparent,depth:1}),this.clearStencil(),this._showOverdrawInspector=ye.showOverdrawInspector,this.depthRangeFor3D=[0,1-(X._order.length+2)*this.numSublayers*this.depthEpsilon],this.renderPass="opaque",this.currentLayer=Se.length-1;this.currentLayer>=0;this.currentLayer--){var un=this.style._layers[Se[this.currentLayer]],En=Je[un.source],ka=it[un.source];this._renderTileClippingMasks(un,ka),this.renderLayer(this,En,un,ka)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<Se.length;this.currentLayer++){var ma=this.style._layers[Se[this.currentLayer]],ha=Je[ma.source],Pa=(ma.type==="symbol"?Rt:pt)[ma.source];this._renderTileClippingMasks(ma,it[ma.source]),this.renderLayer(this,ha,ma,Pa)}if(this.options.showTileBoundaries){var Da,Qa,Ra=t.values(this.style._layers);Ra.forEach(function(ii){ii.source&&!ii.isHidden(ne.transform.zoom)&&(ii.source!==(Qa&&Qa.id)&&(Qa=ne.style.sourceCaches[ii.source]),(!Da||Da.getSource().maxzoom<Qa.getSource().maxzoom)&&(Da=Qa))}),Da&&ll.debug(this,Da,Da.getVisibleCoordinates())}this.options.showPadding&&Va(this),this.context.setDefault()},Bs.prototype.renderLayer=function(X,ye,ne,Se){ne.isHidden(this.transform.zoom)||ne.type!=="background"&&ne.type!=="custom"&&!Se.length||(this.id=ne.id,this.gpuTimingStart(ne),ll[ne.type](X,ye,ne,Se,this.style.placement.variableOffsets),this.gpuTimingEnd())},Bs.prototype.gpuTimingStart=function(X){if(this.options.gpuTiming){var ye=this.context.extTimerQuery,ne=this.gpuTimers[X.id];ne||(ne=this.gpuTimers[X.id]={calls:0,cpuTime:0,query:ye.createQueryEXT()}),ne.calls++,ye.beginQueryEXT(ye.TIME_ELAPSED_EXT,ne.query)}},Bs.prototype.gpuTimingEnd=function(){if(this.options.gpuTiming){var X=this.context.extTimerQuery;X.endQueryEXT(X.TIME_ELAPSED_EXT)}},Bs.prototype.collectGpuTimers=function(){var X=this.gpuTimers;return this.gpuTimers={},X},Bs.prototype.queryGpuTimers=function(X){var ye={};for(var ne in X){var Se=X[ne],Je=this.context.extTimerQuery,xt=Je.getQueryObjectEXT(Se.query,Je.QUERY_RESULT_EXT)/(1e3*1e3);Je.deleteQueryEXT(Se.query),ye[ne]=xt}return ye},Bs.prototype.translatePosMatrix=function(X,ye,ne,Se,Je){if(!ne[0]&&!ne[1])return X;var xt=Je?Se==="map"?this.transform.angle:0:Se==="viewport"?-this.transform.angle:0;if(xt){var At=Math.sin(xt),it=Math.cos(xt);ne=[ne[0]*it-ne[1]*At,ne[0]*At+ne[1]*it]}var pt=[Je?ne[0]:Qs(ye,ne[0],this.transform.zoom),Je?ne[1]:Qs(ye,ne[1],this.transform.zoom),0],Rt=new Float32Array(16);return t.translate(Rt,X,pt),Rt},Bs.prototype.saveTileTexture=function(X){var ye=this._tileTextures[X.size[0]];ye?ye.push(X):this._tileTextures[X.size[0]]=[X]},Bs.prototype.getTileTexture=function(X){var ye=this._tileTextures[X];return ye&&ye.length>0?ye.pop():null},Bs.prototype.isPatternMissing=function(X){if(!X)return!1;if(!X.from||!X.to)return!0;var ye=this.imageManager.getPattern(X.from.toString()),ne=this.imageManager.getPattern(X.to.toString());return!ye||!ne},Bs.prototype.useProgram=function(X,ye){this.cache=this.cache||{};var ne=""+X+(ye?ye.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[ne]||(this.cache[ne]=new Ch(this.context,X,Mh[X],ye,_s[X],this._showOverdrawInspector)),this.cache[ne]},Bs.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()},Bs.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)},Bs.prototype.initDebugOverlayCanvas=function(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=t.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var X=this.context.gl;this.debugOverlayTexture=new t.Texture(this.context,this.debugOverlayCanvas,X.RGBA)}},Bs.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var vl=function(X,ye){this.points=X,this.planes=ye};vl.fromInvProjectionMatrix=function(X,ye,ne){var Se=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]],Je=Math.pow(2,ne),xt=Se.map(function(pt){return t.transformMat4([],pt,X)}).map(function(pt){return t.scale$1([],pt,1/pt[3]/ye*Je)}),At=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],it=At.map(function(pt){var Rt=t.sub([],xt[pt[0]],xt[pt[1]]),or=t.sub([],xt[pt[2]],xt[pt[1]]),er=t.normalize([],t.cross([],Rt,or)),ur=-t.dot(er,xt[pt[1]]);return er.concat(ur)});return new vl(xt,it)};var Eu=function(X,ye){this.min=X,this.max=ye,this.center=t.scale$2([],t.add([],this.min,this.max),.5)};Eu.prototype.quadrant=function(X){for(var ye=[X%2===0,X<2],ne=t.clone$2(this.min),Se=t.clone$2(this.max),Je=0;Je<ye.length;Je++)ne[Je]=ye[Je]?this.min[Je]:this.center[Je],Se[Je]=ye[Je]?this.center[Je]:this.max[Je];return Se[2]=this.max[2],new Eu(ne,Se)},Eu.prototype.distanceX=function(X){var ye=Math.max(Math.min(this.max[0],X[0]),this.min[0]);return ye-X[0]},Eu.prototype.distanceY=function(X){var ye=Math.max(Math.min(this.max[1],X[1]),this.min[1]);return ye-X[1]},Eu.prototype.intersects=function(X){for(var ye=[[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]],ne=!0,Se=0;Se<X.planes.length;Se++){for(var Je=X.planes[Se],xt=0,At=0;At<ye.length;At++)xt+=t.dot$1(Je,ye[At])>=0;if(xt===0)return 0;xt!==ye.length&&(ne=!1)}if(ne)return 2;for(var it=0;it<3;it++){for(var pt=Number.MAX_VALUE,Rt=-Number.MAX_VALUE,or=0;or<X.points.length;or++){var er=X.points[or][it]-this.min[it];pt=Math.min(pt,er),Rt=Math.max(Rt,er)}if(Rt<0||pt>this.max[it]-this.min[it])return 0}return 1};var vu=function(X,ye,ne,Se){if(X===void 0&&(X=0),ye===void 0&&(ye=0),ne===void 0&&(ne=0),Se===void 0&&(Se=0),isNaN(X)||X<0||isNaN(ye)||ye<0||isNaN(ne)||ne<0||isNaN(Se)||Se<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=X,this.bottom=ye,this.left=ne,this.right=Se};vu.prototype.interpolate=function(X,ye,ne){return ye.top!=null&&X.top!=null&&(this.top=t.number(X.top,ye.top,ne)),ye.bottom!=null&&X.bottom!=null&&(this.bottom=t.number(X.bottom,ye.bottom,ne)),ye.left!=null&&X.left!=null&&(this.left=t.number(X.left,ye.left,ne)),ye.right!=null&&X.right!=null&&(this.right=t.number(X.right,ye.right,ne)),this},vu.prototype.getCenter=function(X,ye){var ne=t.clamp((this.left+X-this.right)/2,0,X),Se=t.clamp((this.top+ye-this.bottom)/2,0,ye);return new t.Point(ne,Se)},vu.prototype.equals=function(X){return this.top===X.top&&this.bottom===X.bottom&&this.left===X.left&&this.right===X.right},vu.prototype.clone=function(){return new vu(this.top,this.bottom,this.left,this.right)},vu.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var Us=function(X,ye,ne,Se,Je){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=Je===void 0?!0:Je,this._minZoom=X||0,this._maxZoom=ye||22,this._minPitch=ne??0,this._maxPitch=Se??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new t.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new vu,this._posMatrixCache={},this._alignedPosMatrixCache={}},qs={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}};Us.prototype.clone=function(){var X=new Us(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},qs.minZoom.get=function(){return this._minZoom},qs.minZoom.set=function(Me){this._minZoom!==Me&&(this._minZoom=Me,this.zoom=Math.max(this.zoom,Me))},qs.maxZoom.get=function(){return this._maxZoom},qs.maxZoom.set=function(Me){this._maxZoom!==Me&&(this._maxZoom=Me,this.zoom=Math.min(this.zoom,Me))},qs.minPitch.get=function(){return this._minPitch},qs.minPitch.set=function(Me){this._minPitch!==Me&&(this._minPitch=Me,this.pitch=Math.max(this.pitch,Me))},qs.maxPitch.get=function(){return this._maxPitch},qs.maxPitch.set=function(Me){this._maxPitch!==Me&&(this._maxPitch=Me,this.pitch=Math.min(this.pitch,Me))},qs.renderWorldCopies.get=function(){return this._renderWorldCopies},qs.renderWorldCopies.set=function(Me){Me===void 0?Me=!0:Me===null&&(Me=!1),this._renderWorldCopies=Me},qs.worldSize.get=function(){return this.tileSize*this.scale},qs.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},qs.size.get=function(){return new t.Point(this.width,this.height)},qs.bearing.get=function(){return-this.angle/Math.PI*180},qs.bearing.set=function(Me){var X=-t.wrap(Me,-180,180)*Math.PI/180;this.angle!==X&&(this._unmodified=!1,this.angle=X,this._calcMatrices(),this.rotationMatrix=t.create$2(),t.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},qs.pitch.get=function(){return this._pitch/Math.PI*180},qs.pitch.set=function(Me){var X=t.clamp(Me,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==X&&(this._unmodified=!1,this._pitch=X,this._calcMatrices())},qs.fov.get=function(){return this._fov/Math.PI*180},qs.fov.set=function(Me){Me=Math.max(.01,Math.min(60,Me)),this._fov!==Me&&(this._unmodified=!1,this._fov=Me/180*Math.PI,this._calcMatrices())},qs.zoom.get=function(){return this._zoom},qs.zoom.set=function(Me){var X=Math.min(Math.max(Me,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())},qs.center.get=function(){return this._center},qs.center.set=function(Me){Me.lat===this._center.lat&&Me.lng===this._center.lng||(this._unmodified=!1,this._center=Me,this._constrain(),this._calcMatrices())},qs.padding.get=function(){return this._edgeInsets.toJSON()},qs.padding.set=function(Me){this._edgeInsets.equals(Me)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,Me,1),this._calcMatrices())},qs.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},Us.prototype.isPaddingEqual=function(X){return this._edgeInsets.equals(X)},Us.prototype.interpolatePadding=function(X,ye,ne){this._unmodified=!1,this._edgeInsets.interpolate(X,ye,ne),this._constrain(),this._calcMatrices()},Us.prototype.coveringZoomLevel=function(X){var ye=(X.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/X.tileSize));return Math.max(0,ye)},Us.prototype.getVisibleUnwrappedCoordinates=function(X){var ye=[new t.UnwrappedTileID(0,X)];if(this._renderWorldCopies)for(var ne=this.pointCoordinate(new t.Point(0,0)),Se=this.pointCoordinate(new t.Point(this.width,0)),Je=this.pointCoordinate(new t.Point(this.width,this.height)),xt=this.pointCoordinate(new t.Point(0,this.height)),At=Math.floor(Math.min(ne.x,Se.x,Je.x,xt.x)),it=Math.floor(Math.max(ne.x,Se.x,Je.x,xt.x)),pt=1,Rt=At-pt;Rt<=it+pt;Rt++)Rt!==0&&ye.push(new t.UnwrappedTileID(Rt,X));return ye},Us.prototype.coveringTiles=function(X){var ye=this.coveringZoomLevel(X),ne=ye;if(X.minzoom!==void 0&&ye<X.minzoom)return[];X.maxzoom!==void 0&&ye>X.maxzoom&&(ye=X.maxzoom);var Se=t.MercatorCoordinate.fromLngLat(this.center),Je=Math.pow(2,ye),xt=[Je*Se.x,Je*Se.y,0],At=vl.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,ye),it=X.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(it=ye);var pt=3,Rt=function(Ra){return{aabb:new Eu([Ra*Je,0,0],[(Ra+1)*Je,Je,0]),zoom:0,x:0,y:0,wrap:Ra,fullyVisible:!1}},or=[],er=[],ur=ye,gr=X.reparseOverscaled?ne:ye;if(this._renderWorldCopies)for(var vr=1;vr<=3;vr++)or.push(Rt(-vr)),or.push(Rt(vr));for(or.push(Rt(0));or.length>0;){var Zt=or.pop(),ar=Zt.x,tr=Zt.y,Zr=Zt.fullyVisible;if(!Zr){var un=Zt.aabb.intersects(At);if(un===0)continue;Zr=un===2}var En=Zt.aabb.distanceX(xt),ka=Zt.aabb.distanceY(xt),ma=Math.max(Math.abs(En),Math.abs(ka)),ha=pt+(1<<ur-Zt.zoom)-2;if(Zt.zoom===ur||ma>ha&&Zt.zoom>=it){er.push({tileID:new t.OverscaledTileID(Zt.zoom===ur?gr:Zt.zoom,Zt.wrap,Zt.zoom,ar,tr),distanceSq:t.sqrLen([xt[0]-.5-ar,xt[1]-.5-tr])});continue}for(var Pa=0;Pa<4;Pa++){var Da=(ar<<1)+Pa%2,Qa=(tr<<1)+(Pa>>1);or.push({aabb:Zt.aabb.quadrant(Pa),zoom:Zt.zoom+1,x:Da,y:Qa,wrap:Zt.wrap,fullyVisible:Zr})}}return er.sort(function(Ra,ii){return Ra.distanceSq-ii.distanceSq}).map(function(Ra){return Ra.tileID})},Us.prototype.resize=function(X,ye){this.width=X,this.height=ye,this.pixelsToGLUnits=[2/X,-2/ye],this._constrain(),this._calcMatrices()},qs.unmodified.get=function(){return this._unmodified},Us.prototype.zoomScale=function(X){return Math.pow(2,X)},Us.prototype.scaleZoom=function(X){return Math.log(X)/Math.LN2},Us.prototype.project=function(X){var ye=t.clamp(X.lat,-this.maxValidLatitude,this.maxValidLatitude);return new t.Point(t.mercatorXfromLng(X.lng)*this.worldSize,t.mercatorYfromLat(ye)*this.worldSize)},Us.prototype.unproject=function(X){return new t.MercatorCoordinate(X.x/this.worldSize,X.y/this.worldSize).toLngLat()},qs.point.get=function(){return this.project(this.center)},Us.prototype.setLocationAtPoint=function(X,ye){var ne=this.pointCoordinate(ye),Se=this.pointCoordinate(this.centerPoint),Je=this.locationCoordinate(X),xt=new t.MercatorCoordinate(Je.x-(ne.x-Se.x),Je.y-(ne.y-Se.y));this.center=this.coordinateLocation(xt),this._renderWorldCopies&&(this.center=this.center.wrap())},Us.prototype.locationPoint=function(X){return this.coordinatePoint(this.locationCoordinate(X))},Us.prototype.pointLocation=function(X){return this.coordinateLocation(this.pointCoordinate(X))},Us.prototype.locationCoordinate=function(X){return t.MercatorCoordinate.fromLngLat(X)},Us.prototype.coordinateLocation=function(X){return X.toLngLat()},Us.prototype.pointCoordinate=function(X){var ye=0,ne=[X.x,X.y,0,1],Se=[X.x,X.y,1,1];t.transformMat4(ne,ne,this.pixelMatrixInverse),t.transformMat4(Se,Se,this.pixelMatrixInverse);var Je=ne[3],xt=Se[3],At=ne[0]/Je,it=Se[0]/xt,pt=ne[1]/Je,Rt=Se[1]/xt,or=ne[2]/Je,er=Se[2]/xt,ur=or===er?0:(ye-or)/(er-or);return new t.MercatorCoordinate(t.number(At,it,ur)/this.worldSize,t.number(pt,Rt,ur)/this.worldSize)},Us.prototype.coordinatePoint=function(X){var ye=[X.x*this.worldSize,X.y*this.worldSize,0,1];return t.transformMat4(ye,ye,this.pixelMatrix),new t.Point(ye[0]/ye[3],ye[1]/ye[3])},Us.prototype.getBounds=function(){return new t.LngLatBounds().extend(this.pointLocation(new t.Point(0,0))).extend(this.pointLocation(new t.Point(this.width,0))).extend(this.pointLocation(new t.Point(this.width,this.height))).extend(this.pointLocation(new t.Point(0,this.height)))},Us.prototype.getMaxBounds=function(){return!this.latRange||this.latRange.length!==2||!this.lngRange||this.lngRange.length!==2?null:new t.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]])},Us.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])},Us.prototype.calculatePosMatrix=function(X,ye){ye===void 0&&(ye=!1);var ne=X.key,Se=ye?this._alignedPosMatrixCache:this._posMatrixCache;if(Se[ne])return Se[ne];var Je=X.canonical,xt=this.worldSize/this.zoomScale(Je.z),At=Je.x+Math.pow(2,Je.z)*X.wrap,it=t.identity(new Float64Array(16));return t.translate(it,it,[At*xt,Je.y*xt,0]),t.scale(it,it,[xt/t.EXTENT,xt/t.EXTENT,1]),t.multiply(it,ye?this.alignedProjMatrix:this.projMatrix,it),Se[ne]=new Float32Array(it),Se[ne]},Us.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},Us.prototype._constrain=function(){if(!(!this.center||!this.width||!this.height||this._constraining)){this._constraining=!0;var X=-90,ye=90,ne=-180,Se=180,Je,xt,At,it,pt=this.size,Rt=this._unmodified;if(this.latRange){var or=this.latRange;X=t.mercatorYfromLat(or[1])*this.worldSize,ye=t.mercatorYfromLat(or[0])*this.worldSize,Je=ye-X<pt.y?pt.y/(ye-X):0}if(this.lngRange){var er=this.lngRange;ne=t.mercatorXfromLng(er[0])*this.worldSize,Se=t.mercatorXfromLng(er[1])*this.worldSize,xt=Se-ne<pt.x?pt.x/(Se-ne):0}var ur=this.point,gr=Math.max(xt||0,Je||0);if(gr){this.center=this.unproject(new t.Point(xt?(Se+ne)/2:ur.x,Je?(ye+X)/2:ur.y)),this.zoom+=this.scaleZoom(gr),this._unmodified=Rt,this._constraining=!1;return}if(this.latRange){var vr=ur.y,Zt=pt.y/2;vr-Zt<X&&(it=X+Zt),vr+Zt>ye&&(it=ye-Zt)}if(this.lngRange){var ar=ur.x,tr=pt.x/2;ar-tr<ne&&(At=ne+tr),ar+tr>Se&&(At=Se-tr)}(At!==void 0||it!==void 0)&&(this.center=this.unproject(new t.Point(At!==void 0?At:ur.x,it!==void 0?it:ur.y))),this._unmodified=Rt,this._constraining=!1}},Us.prototype._calcMatrices=function(){if(this.height){var X=this._fov/2,ye=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(X)*this.height;var ne=Math.PI/2+this._pitch,Se=this._fov*(.5+ye.y/this.height),Je=Math.sin(Se)*this.cameraToCenterDistance/Math.sin(t.clamp(Math.PI-ne-Se,.01,Math.PI-.01)),xt=this.point,At=xt.x,it=xt.y,pt=Math.cos(Math.PI/2-this._pitch)*Je+this.cameraToCenterDistance,Rt=pt*1.01,or=this.height/50,er=new Float64Array(16);t.perspective(er,this._fov,this.width/this.height,or,Rt),er[8]=-ye.x*2/this.width,er[9]=ye.y*2/this.height,t.scale(er,er,[1,-1,1]),t.translate(er,er,[0,0,-this.cameraToCenterDistance]),t.rotateX(er,er,this._pitch),t.rotateZ(er,er,this.angle),t.translate(er,er,[-At,-it,0]),this.mercatorMatrix=t.scale([],er,[this.worldSize,this.worldSize,this.worldSize]),t.scale(er,er,[1,1,t.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=er,this.invProjMatrix=t.invert([],this.projMatrix);var ur=this.width%2/2,gr=this.height%2/2,vr=Math.cos(this.angle),Zt=Math.sin(this.angle),ar=At-Math.round(At)+vr*ur+Zt*gr,tr=it-Math.round(it)+vr*gr+Zt*ur,Zr=new Float64Array(er);if(t.translate(Zr,Zr,[ar>.5?ar-1:ar,tr>.5?tr-1:tr,0]),this.alignedProjMatrix=Zr,er=t.create(),t.scale(er,er,[this.width/2,-this.height/2,1]),t.translate(er,er,[1,-1,0]),this.labelPlaneMatrix=er,er=t.create(),t.scale(er,er,[1,-1,1]),t.translate(er,er,[-1,-1,0]),t.scale(er,er,[2/this.width,2/this.height,1]),this.glCoordMatrix=er,this.pixelMatrix=t.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),er=t.invert(new Float64Array(16),this.pixelMatrix),!er)throw new Error("failed to invert matrix");this.pixelMatrixInverse=er,this._posMatrixCache={},this._alignedPosMatrixCache={}}},Us.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var X=this.pointCoordinate(new t.Point(0,0)),ye=[X.x*this.worldSize,X.y*this.worldSize,0,1],ne=t.transformMat4(ye,ye,this.pixelMatrix);return ne[3]/this.cameraToCenterDistance},Us.prototype.getCameraPoint=function(){var X=this._pitch,ye=Math.tan(X)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new t.Point(0,ye))},Us.prototype.getCameraQueryGeometry=function(X){var ye=this.getCameraPoint();if(X.length===1)return[X[0],ye];for(var ne=ye.x,Se=ye.y,Je=ye.x,xt=ye.y,At=0,it=X;At<it.length;At+=1){var pt=it[At];ne=Math.min(ne,pt.x),Se=Math.min(Se,pt.y),Je=Math.max(Je,pt.x),xt=Math.max(xt,pt.y)}return[new t.Point(ne,Se),new t.Point(Je,Se),new t.Point(Je,xt),new t.Point(ne,xt),new t.Point(ne,Se)]},Object.defineProperties(Us.prototype,qs);function Hu(Me,X){var ye=!1,ne=null,Se=function(){ne=null,ye&&(Me(),ne=setTimeout(Se,X),ye=!1)};return function(){return ye=!0,ne||Se(),ne}}var yc=function(X){this._hashName=X&&encodeURIComponent(X),t.bindAll(["_getCurrentHash","_onHashChange","_updateHash"],this),this._updateHash=Hu(this._updateHashUnthrottled.bind(this),30*1e3/100)};yc.prototype.addTo=function(X){return this._map=X,t.window.addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this},yc.prototype.remove=function(){return t.window.removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this},yc.prototype.getHashString=function(X){var ye=this._map.getCenter(),ne=Math.round(this._map.getZoom()*100)/100,Se=Math.ceil((ne*Math.LN2+Math.log(512/360/.5))/Math.LN10),Je=Math.pow(10,Se),xt=Math.round(ye.lng*Je)/Je,At=Math.round(ye.lat*Je)/Je,it=this._map.getBearing(),pt=this._map.getPitch(),Rt="";if(X?Rt+="/"+xt+"/"+At+"/"+ne:Rt+=ne+"/"+At+"/"+xt,(it||pt)&&(Rt+="/"+Math.round(it*10)/10),pt&&(Rt+="/"+Math.round(pt)),this._hashName){var or=this._hashName,er=!1,ur=t.window.location.hash.slice(1).split("&").map(function(gr){var vr=gr.split("=")[0];return vr===or?(er=!0,vr+"="+Rt):gr}).filter(function(gr){return gr});return er||ur.push(or+"="+Rt),"#"+ur.join("&")}return"#"+Rt},yc.prototype._getCurrentHash=function(){var X=this,ye=t.window.location.hash.replace("#","");if(this._hashName){var ne;return ye.split("&").map(function(Se){return Se.split("=")}).forEach(function(Se){Se[0]===X._hashName&&(ne=Se)}),(ne&&ne[1]||"").split("/")}return ye.split("/")},yc.prototype._onHashChange=function(){var X=this._getCurrentHash();if(X.length>=3&&!X.some(function(ne){return isNaN(ne)})){var ye=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:ye,pitch:+(X[4]||0)}),!0}return!1},yc.prototype._updateHashUnthrottled=function(){var X=t.window.location.href.replace(/(#.+)?$/,this.getHashString());try{t.window.history.replaceState(t.window.history.state,null,X)}catch{}};var Zc={linearity:.3,easing:t.bezier(0,0,.3,1)},Te=t.extend({deceleration:2500,maxSpeed:1400},Zc),He=t.extend({deceleration:20,maxSpeed:1400},Zc),ft=t.extend({deceleration:1e3,maxSpeed:360},Zc),Lt=t.extend({deceleration:1e3,maxSpeed:90},Zc),Dt=function(X){this._map=X,this.clear()};Dt.prototype.clear=function(){this._inertiaBuffer=[]},Dt.prototype.record=function(X){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:t.browser.now(),settings:X})},Dt.prototype._drainInertiaBuffer=function(){for(var X=this._inertiaBuffer,ye=t.browser.now(),ne=160;X.length>0&&ye-X[0].time>ne;)X.shift()},Dt.prototype._onMoveEnd=function(X){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var ye={zoom:0,bearing:0,pitch:0,pan:new t.Point(0,0),pinchAround:void 0,around:void 0},ne=0,Se=this._inertiaBuffer;ne<Se.length;ne+=1){var Je=Se[ne],xt=Je.settings;ye.zoom+=xt.zoomDelta||0,ye.bearing+=xt.bearingDelta||0,ye.pitch+=xt.pitchDelta||0,xt.panDelta&&ye.pan._add(xt.panDelta),xt.around&&(ye.around=xt.around),xt.pinchAround&&(ye.pinchAround=xt.pinchAround)}var At=this._inertiaBuffer[this._inertiaBuffer.length-1],it=At.time-this._inertiaBuffer[0].time,pt={};if(ye.pan.mag()){var Rt=dr(ye.pan.mag(),it,t.extend({},Te,X||{}));pt.offset=ye.pan.mult(Rt.amount/ye.pan.mag()),pt.center=this._map.transform.center,qt(pt,Rt)}if(ye.zoom){var or=dr(ye.zoom,it,He);pt.zoom=this._map.transform.zoom+or.amount,qt(pt,or)}if(ye.bearing){var er=dr(ye.bearing,it,ft);pt.bearing=this._map.transform.bearing+t.clamp(er.amount,-179,179),qt(pt,er)}if(ye.pitch){var ur=dr(ye.pitch,it,Lt);pt.pitch=this._map.transform.pitch+ur.amount,qt(pt,ur)}if(pt.zoom||pt.bearing){var gr=ye.pinchAround===void 0?ye.around:ye.pinchAround;pt.around=gr?this._map.unproject(gr):this._map.getCenter()}return this.clear(),t.extend(pt,{noMoveStart:!0})}};function qt(Me,X){(!Me.duration||Me.duration<X.duration)&&(Me.duration=X.duration,Me.easing=X.easing)}function dr(Me,X,ye){var ne=ye.maxSpeed,Se=ye.linearity,Je=ye.deceleration,xt=t.clamp(Me*Se/(X/1e3),-ne,ne),At=Math.abs(xt)/(Je*Se);return{easing:ye.easing,duration:At*1e3,amount:xt*(At/2)}}var hr=(function(Me){function X(ne,Se,Je,xt){xt===void 0&&(xt={});var At=a.mousePos(Se.getCanvasContainer(),Je),it=Se.unproject(At);Me.call(this,ne,t.extend({point:At,lngLat:it,originalEvent:Je},xt)),this._defaultPrevented=!1,this.target=Se}Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X;var ye={defaultPrevented:{configurable:!0}};return X.prototype.preventDefault=function(){this._defaultPrevented=!0},ye.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(X.prototype,ye),X})(t.Event),Pr=(function(Me){function X(ne,Se,Je){var xt=ne==="touchend"?Je.changedTouches:Je.touches,At=a.touchPos(Se.getCanvasContainer(),xt),it=At.map(function(or){return Se.unproject(or)}),pt=At.reduce(function(or,er,ur,gr){return or.add(er.div(gr.length))},new t.Point(0,0)),Rt=Se.unproject(pt);Me.call(this,ne,{points:At,point:pt,lngLats:it,lngLat:Rt,originalEvent:Je}),this._defaultPrevented=!1}Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X;var ye={defaultPrevented:{configurable:!0}};return X.prototype.preventDefault=function(){this._defaultPrevented=!0},ye.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(X.prototype,ye),X})(t.Event),ln=(function(Me){function X(ne,Se,Je){Me.call(this,ne,{originalEvent:Je}),this._defaultPrevented=!1}Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X;var ye={defaultPrevented:{configurable:!0}};return X.prototype.preventDefault=function(){this._defaultPrevented=!0},ye.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(X.prototype,ye),X})(t.Event),on=function(X,ye){this._map=X,this._clickTolerance=ye.clickTolerance};on.prototype.reset=function(){delete this._mousedownPos},on.prototype.wheel=function(X){return this._firePreventable(new ln(X.type,this._map,X))},on.prototype.mousedown=function(X,ye){return this._mousedownPos=ye,this._firePreventable(new hr(X.type,this._map,X))},on.prototype.mouseup=function(X){this._map.fire(new hr(X.type,this._map,X))},on.prototype.click=function(X,ye){this._mousedownPos&&this._mousedownPos.dist(ye)>=this._clickTolerance||this._map.fire(new hr(X.type,this._map,X))},on.prototype.dblclick=function(X){return this._firePreventable(new hr(X.type,this._map,X))},on.prototype.mouseover=function(X){this._map.fire(new hr(X.type,this._map,X))},on.prototype.mouseout=function(X){this._map.fire(new hr(X.type,this._map,X))},on.prototype.touchstart=function(X){return this._firePreventable(new Pr(X.type,this._map,X))},on.prototype.touchmove=function(X){this._map.fire(new Pr(X.type,this._map,X))},on.prototype.touchend=function(X){this._map.fire(new Pr(X.type,this._map,X))},on.prototype.touchcancel=function(X){this._map.fire(new Pr(X.type,this._map,X))},on.prototype._firePreventable=function(X){if(this._map.fire(X),X.defaultPrevented)return{}},on.prototype.isEnabled=function(){return!0},on.prototype.isActive=function(){return!1},on.prototype.enable=function(){},on.prototype.disable=function(){};var Mn=function(X){this._map=X};Mn.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},Mn.prototype.mousemove=function(X){this._map.fire(new hr(X.type,this._map,X))},Mn.prototype.mousedown=function(){this._delayContextMenu=!0},Mn.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new hr("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},Mn.prototype.contextmenu=function(X){this._delayContextMenu?this._contextMenuEvent=X:this._map.fire(new hr(X.type,this._map,X)),this._map.listens("contextmenu")&&X.preventDefault()},Mn.prototype.isEnabled=function(){return!0},Mn.prototype.isActive=function(){return!1},Mn.prototype.enable=function(){},Mn.prototype.disable=function(){};var Un=function(X,ye){this._map=X,this._el=X.getCanvasContainer(),this._container=X.getContainer(),this._clickTolerance=ye.clickTolerance||1};Un.prototype.isEnabled=function(){return!!this._enabled},Un.prototype.isActive=function(){return!!this._active},Un.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},Un.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Un.prototype.mousedown=function(X,ye){this.isEnabled()&&X.shiftKey&&X.button===0&&(a.disableDrag(),this._startPos=this._lastPos=ye,this._active=!0)},Un.prototype.mousemoveWindow=function(X,ye){if(this._active){var ne=ye;if(!(this._lastPos.equals(ne)||!this._box&&ne.dist(this._startPos)<this._clickTolerance)){var Se=this._startPos;this._lastPos=ne,this._box||(this._box=a.create("div","mapboxgl-boxzoom",this._container),this._container.classList.add("mapboxgl-crosshair"),this._fireEvent("boxzoomstart",X));var Je=Math.min(Se.x,ne.x),xt=Math.max(Se.x,ne.x),At=Math.min(Se.y,ne.y),it=Math.max(Se.y,ne.y);a.setTransform(this._box,"translate("+Je+"px,"+At+"px)"),this._box.style.width=xt-Je+"px",this._box.style.height=it-At+"px"}}},Un.prototype.mouseupWindow=function(X,ye){var ne=this;if(this._active&&X.button===0){var Se=this._startPos,Je=ye;if(this.reset(),a.suppressClick(),Se.x===Je.x&&Se.y===Je.y)this._fireEvent("boxzoomcancel",X);else return this._map.fire(new t.Event("boxzoomend",{originalEvent:X})),{cameraAnimation:function(xt){return xt.fitScreenCoordinates(Se,Je,ne._map.getBearing(),{linear:!0})}}}},Un.prototype.keydown=function(X){this._active&&X.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",X))},Un.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},Un.prototype._fireEvent=function(X,ye){return this._map.fire(new t.Event(X,{originalEvent:ye}))};function Gn(Me,X){for(var ye={},ne=0;ne<Me.length;ne++)ye[Me[ne].identifier]=X[ne];return ye}function Ja(Me){for(var X=new t.Point(0,0),ye=0,ne=Me;ye<ne.length;ye+=1){var Se=ne[ye];X._add(Se)}return X.div(Me.length)}var Qn=500,ba=500,Ca=30,Xa=function(X){this.reset(),this.numTouches=X.numTouches};Xa.prototype.reset=function(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1},Xa.prototype.touchstart=function(X,ye,ne){(this.centroid||ne.length>this.numTouches)&&(this.aborted=!0),!this.aborted&&(this.startTime===void 0&&(this.startTime=X.timeStamp),ne.length===this.numTouches&&(this.centroid=Ja(ye),this.touches=Gn(ne,ye)))},Xa.prototype.touchmove=function(X,ye,ne){if(!(this.aborted||!this.centroid)){var Se=Gn(ne,ye);for(var Je in this.touches){var xt=this.touches[Je],At=Se[Je];(!At||At.dist(xt)>Ca)&&(this.aborted=!0)}}},Xa.prototype.touchend=function(X,ye,ne){if((!this.centroid||X.timeStamp-this.startTime>ba)&&(this.aborted=!0),ne.length===0){var Se=!this.aborted&&this.centroid;if(this.reset(),Se)return Se}};var ei=function(X){this.singleTap=new Xa(X),this.numTaps=X.numTaps,this.reset()};ei.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},ei.prototype.touchstart=function(X,ye,ne){this.singleTap.touchstart(X,ye,ne)},ei.prototype.touchmove=function(X,ye,ne){this.singleTap.touchmove(X,ye,ne)},ei.prototype.touchend=function(X,ye,ne){var Se=this.singleTap.touchend(X,ye,ne);if(Se){var Je=X.timeStamp-this.lastTime<Qn,xt=!this.lastTap||this.lastTap.dist(Se)<Ca;if((!Je||!xt)&&this.reset(),this.count++,this.lastTime=X.timeStamp,this.lastTap=Se,this.count===this.numTaps)return this.reset(),Se}};var Ma=function(){this._zoomIn=new ei({numTouches:1,numTaps:2}),this._zoomOut=new ei({numTouches:2,numTaps:1}),this.reset()};Ma.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},Ma.prototype.touchstart=function(X,ye,ne){this._zoomIn.touchstart(X,ye,ne),this._zoomOut.touchstart(X,ye,ne)},Ma.prototype.touchmove=function(X,ye,ne){this._zoomIn.touchmove(X,ye,ne),this._zoomOut.touchmove(X,ye,ne)},Ma.prototype.touchend=function(X,ye,ne){var Se=this,Je=this._zoomIn.touchend(X,ye,ne),xt=this._zoomOut.touchend(X,ye,ne);if(Je)return this._active=!0,X.preventDefault(),setTimeout(function(){return Se.reset()},0),{cameraAnimation:function(At){return At.easeTo({duration:300,zoom:At.getZoom()+1,around:At.unproject(Je)},{originalEvent:X})}};if(xt)return this._active=!0,X.preventDefault(),setTimeout(function(){return Se.reset()},0),{cameraAnimation:function(At){return At.easeTo({duration:300,zoom:At.getZoom()-1,around:At.unproject(xt)},{originalEvent:X})}}},Ma.prototype.touchcancel=function(){this.reset()},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 Ci=0,po=2,ro={};ro[Ci]=1,ro[po]=2;function fo(Me,X){var ye=ro[X];return Me.buttons===void 0||(Me.buttons&ye)!==ye}var Fo=function(X){this.reset(),this._clickTolerance=X.clickTolerance||1};Fo.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},Fo.prototype._correctButton=function(X,ye){return!1},Fo.prototype._move=function(X,ye){return{}},Fo.prototype.mousedown=function(X,ye){if(!this._lastPoint){var ne=a.mouseButton(X);this._correctButton(X,ne)&&(this._lastPoint=ye,this._eventButton=ne)}},Fo.prototype.mousemoveWindow=function(X,ye){var ne=this._lastPoint;if(ne){if(X.preventDefault(),fo(X,this._eventButton)){this.reset();return}if(!(!this._moved&&ye.dist(ne)<this._clickTolerance))return this._moved=!0,this._lastPoint=ye,this._move(ne,ye)}},Fo.prototype.mouseupWindow=function(X){if(this._lastPoint){var ye=a.mouseButton(X);ye===this._eventButton&&(this._moved&&a.suppressClick(),this.reset())}},Fo.prototype.enable=function(){this._enabled=!0},Fo.prototype.disable=function(){this._enabled=!1,this.reset()},Fo.prototype.isEnabled=function(){return this._enabled},Fo.prototype.isActive=function(){return this._active};var Ho=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.mousedown=function(ne,Se){Me.prototype.mousedown.call(this,ne,Se),this._lastPoint&&(this._active=!0)},X.prototype._correctButton=function(ne,Se){return Se===Ci&&!ne.ctrlKey},X.prototype._move=function(ne,Se){return{around:Se,panDelta:Se.sub(ne)}},X})(Fo),il=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype._correctButton=function(ne,Se){return Se===Ci&&ne.ctrlKey||Se===po},X.prototype._move=function(ne,Se){var Je=.8,xt=(Se.x-ne.x)*Je;if(xt)return this._active=!0,{bearingDelta:xt}},X.prototype.contextmenu=function(ne){ne.preventDefault()},X})(Fo),Wo=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype._correctButton=function(ne,Se){return Se===Ci&&ne.ctrlKey||Se===po},X.prototype._move=function(ne,Se){var Je=-.5,xt=(Se.y-ne.y)*Je;if(xt)return this._active=!0,{pitchDelta:xt}},X.prototype.contextmenu=function(ne){ne.preventDefault()},X})(Fo),bs=function(X){this._minTouches=1,this._clickTolerance=X.clickTolerance||1,this.reset()};bs.prototype.reset=function(){this._active=!1,this._touches={},this._sum=new t.Point(0,0)},bs.prototype.touchstart=function(X,ye,ne){return this._calculateTransform(X,ye,ne)},bs.prototype.touchmove=function(X,ye,ne){if(!(!this._active||ne.length<this._minTouches))return X.preventDefault(),this._calculateTransform(X,ye,ne)},bs.prototype.touchend=function(X,ye,ne){this._calculateTransform(X,ye,ne),this._active&&ne.length<this._minTouches&&this.reset()},bs.prototype.touchcancel=function(){this.reset()},bs.prototype._calculateTransform=function(X,ye,ne){ne.length>0&&(this._active=!0);var Se=Gn(ne,ye),Je=new t.Point(0,0),xt=new t.Point(0,0),At=0;for(var it in Se){var pt=Se[it],Rt=this._touches[it];Rt&&(Je._add(pt),xt._add(pt.sub(Rt)),At++,Se[it]=pt)}if(this._touches=Se,!(At<this._minTouches||!xt.mag())){var or=xt.div(At);if(this._sum._add(or),!(this._sum.mag()<this._clickTolerance)){var er=Je.div(At);return{around:er,panDelta:or}}}},bs.prototype.enable=function(){this._enabled=!0},bs.prototype.disable=function(){this._enabled=!1,this.reset()},bs.prototype.isEnabled=function(){return this._enabled},bs.prototype.isActive=function(){return this._active};var dl=function(){this.reset()};dl.prototype.reset=function(){this._active=!1,delete this._firstTwoTouches},dl.prototype._start=function(X){},dl.prototype._move=function(X,ye,ne){return{}},dl.prototype.touchstart=function(X,ye,ne){this._firstTwoTouches||ne.length<2||(this._firstTwoTouches=[ne[0].identifier,ne[1].identifier],this._start([ye[0],ye[1]]))},dl.prototype.touchmove=function(X,ye,ne){if(this._firstTwoTouches){X.preventDefault();var Se=this._firstTwoTouches,Je=Se[0],xt=Se[1],At=Gu(ne,ye,Je),it=Gu(ne,ye,xt);if(!(!At||!it)){var pt=this._aroundCenter?null:At.add(it).div(2);return this._move([At,it],pt,X)}}},dl.prototype.touchend=function(X,ye,ne){if(this._firstTwoTouches){var Se=this._firstTwoTouches,Je=Se[0],xt=Se[1],At=Gu(ne,ye,Je),it=Gu(ne,ye,xt);At&&it||(this._active&&a.suppressClick(),this.reset())}},dl.prototype.touchcancel=function(){this.reset()},dl.prototype.enable=function(X){this._enabled=!0,this._aroundCenter=!!X&&X.around==="center"},dl.prototype.disable=function(){this._enabled=!1,this.reset()},dl.prototype.isEnabled=function(){return this._enabled},dl.prototype.isActive=function(){return this._active};function Gu(Me,X,ye){for(var ne=0;ne<Me.length;ne++)if(Me[ne].identifier===ye)return X[ne]}var fu=.1;function ko(Me,X){return Math.log(Me/X)/Math.LN2}var Vs=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.reset=function(){Me.prototype.reset.call(this),delete this._distance,delete this._startDistance},X.prototype._start=function(ne){this._startDistance=this._distance=ne[0].dist(ne[1])},X.prototype._move=function(ne,Se){var Je=this._distance;if(this._distance=ne[0].dist(ne[1]),!(!this._active&&Math.abs(ko(this._distance,this._startDistance))<fu))return this._active=!0,{zoomDelta:ko(this._distance,Je),pinchAround:Se}},X})(dl),ul=25;function ou(Me,X){return Me.angleWith(X)*180/Math.PI}var Yl=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.reset=function(){Me.prototype.reset.call(this),delete this._minDiameter,delete this._startVector,delete this._vector},X.prototype._start=function(ne){this._startVector=this._vector=ne[0].sub(ne[1]),this._minDiameter=ne[0].dist(ne[1])},X.prototype._move=function(ne,Se){var Je=this._vector;if(this._vector=ne[0].sub(ne[1]),!(!this._active&&this._isBelowThreshold(this._vector)))return this._active=!0,{bearingDelta:ou(this._vector,Je),pinchAround:Se}},X.prototype._isBelowThreshold=function(ne){this._minDiameter=Math.min(this._minDiameter,ne.mag());var Se=Math.PI*this._minDiameter,Je=ul/Se*360,xt=ou(ne,this._startVector);return Math.abs(xt)<Je},X})(dl);function Dc(Me){return Math.abs(Me.y)>Math.abs(Me.x)}var jl=100,su=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.reset=function(){Me.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},X.prototype._start=function(ne){this._lastPoints=ne,Dc(ne[0].sub(ne[1]))&&(this._valid=!1)},X.prototype._move=function(ne,Se,Je){var xt=ne[0].sub(this._lastPoints[0]),At=ne[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(xt,At,Je.timeStamp),!!this._valid){this._lastPoints=ne,this._active=!0;var it=(xt.y+At.y)/2,pt=-.5;return{pitchDelta:it*pt}}},X.prototype.gestureBeginsVertically=function(ne,Se,Je){if(this._valid!==void 0)return this._valid;var xt=2,At=ne.mag()>=xt,it=Se.mag()>=xt;if(!(!At&&!it)){if(!At||!it)return this._firstMove===void 0&&(this._firstMove=Je),Je-this._firstMove<jl?void 0:!1;var pt=ne.y>0==Se.y>0;return Dc(ne)&&Dc(Se)&&pt}},X})(dl),lf={panStep:100,bearingStep:15,pitchStep:10},Uu=function(){var X=lf;this._panStep=X.panStep,this._bearingStep=X.bearingStep,this._pitchStep=X.pitchStep,this._rotationDisabled=!1};Uu.prototype.reset=function(){this._active=!1},Uu.prototype.keydown=function(X){var ye=this;if(!(X.altKey||X.ctrlKey||X.metaKey)){var ne=0,Se=0,Je=0,xt=0,At=0;switch(X.keyCode){case 61:case 107:case 171:case 187:ne=1;break;case 189:case 109:case 173:ne=-1;break;case 37:X.shiftKey?Se=-1:(X.preventDefault(),xt=-1);break;case 39:X.shiftKey?Se=1:(X.preventDefault(),xt=1);break;case 38:X.shiftKey?Je=1:(X.preventDefault(),At=-1);break;case 40:X.shiftKey?Je=-1:(X.preventDefault(),At=1);break;default:return}return this._rotationDisabled&&(Se=0,Je=0),{cameraAnimation:function(it){var pt=it.getZoom();it.easeTo({duration:300,easeId:"keyboardHandler",easing:St,zoom:ne?Math.round(pt)+ne*(X.shiftKey?2:1):pt,bearing:it.getBearing()+Se*ye._bearingStep,pitch:it.getPitch()+Je*ye._pitchStep,offset:[-xt*ye._panStep,-At*ye._panStep],center:it.getCenter()},{originalEvent:X})}}}},Uu.prototype.enable=function(){this._enabled=!0},Uu.prototype.disable=function(){this._enabled=!1,this.reset()},Uu.prototype.isEnabled=function(){return this._enabled},Uu.prototype.isActive=function(){return this._active},Uu.prototype.disableRotation=function(){this._rotationDisabled=!0},Uu.prototype.enableRotation=function(){this._rotationDisabled=!1};function St(Me){return Me*(2-Me)}var kr=4.000244140625,Dr=1/100,Xn=1/450,La=2,Rn=function(X,ye){this._map=X,this._el=X.getCanvasContainer(),this._handler=ye,this._delta=0,this._defaultZoomRate=Dr,this._wheelZoomRate=Xn,t.bindAll(["_onTimeout"],this)};Rn.prototype.setZoomRate=function(X){this._defaultZoomRate=X},Rn.prototype.setWheelZoomRate=function(X){this._wheelZoomRate=X},Rn.prototype.isEnabled=function(){return!!this._enabled},Rn.prototype.isActive=function(){return!!this._active||this._finishTimeout!==void 0},Rn.prototype.isZooming=function(){return!!this._zooming},Rn.prototype.enable=function(X){this.isEnabled()||(this._enabled=!0,this._aroundCenter=X&&X.around==="center")},Rn.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Rn.prototype.wheel=function(X){if(this.isEnabled()){var ye=X.deltaMode===t.window.WheelEvent.DOM_DELTA_LINE?X.deltaY*40:X.deltaY,ne=t.browser.now(),Se=ne-(this._lastWheelEventTime||0);this._lastWheelEventTime=ne,ye!==0&&ye%kr===0?this._type="wheel":ye!==0&&Math.abs(ye)<4?this._type="trackpad":Se>400?(this._type=null,this._lastValue=ye,this._timeout=setTimeout(this._onTimeout,40,X)):this._type||(this._type=Math.abs(Se*ye)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,ye+=this._lastValue)),X.shiftKey&&ye&&(ye=ye/4),this._type&&(this._lastWheelEvent=X,this._delta-=ye,this._active||this._start(X)),X.preventDefault()}},Rn.prototype._onTimeout=function(X){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(X)},Rn.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 ye=a.mousePos(this._el,X);this._around=t.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(ye)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},Rn.prototype.renderFrame=function(){var X=this;if(this._frameId&&(this._frameId=null,!!this.isActive())){var ye=this._map.transform;if(this._delta!==0){var ne=this._type==="wheel"&&Math.abs(this._delta)>kr?this._wheelZoomRate:this._defaultZoomRate,Se=La/(1+Math.exp(-Math.abs(this._delta*ne)));this._delta<0&&Se!==0&&(Se=1/Se);var Je=typeof this._targetZoom=="number"?ye.zoomScale(this._targetZoom):ye.scale;this._targetZoom=Math.min(ye.maxZoom,Math.max(ye.minZoom,ye.scaleZoom(Je*Se))),this._type==="wheel"&&(this._startZoom=ye.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var xt=typeof this._targetZoom=="number"?this._targetZoom:ye.zoom,At=this._startZoom,it=this._easing,pt=!1,Rt;if(this._type==="wheel"&&At&&it){var or=Math.min((t.browser.now()-this._lastWheelEventTime)/200,1),er=it(or);Rt=t.number(At,xt,er),or<1?this._frameId||(this._frameId=!0):pt=!0}else Rt=xt,pt=!0;return this._active=!0,pt&&(this._active=!1,this._finishTimeout=setTimeout(function(){X._zooming=!1,X._handler._triggerRenderFrame(),delete X._targetZoom,delete X._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!pt,zoomDelta:Rt-ye.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},Rn.prototype._smoothOutEasing=function(X){var ye=t.ease;if(this._prevEase){var ne=this._prevEase,Se=(t.browser.now()-ne.start)/ne.duration,Je=ne.easing(Se+.01)-ne.easing(Se),xt=.27/Math.sqrt(Je*Je+1e-4)*.01,At=Math.sqrt(.27*.27-xt*xt);ye=t.bezier(xt,At,.25,1)}return this._prevEase={start:t.browser.now(),duration:X,easing:ye},ye},Rn.prototype.reset=function(){this._active=!1};var Pn=function(X,ye){this._clickZoom=X,this._tapZoom=ye};Pn.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},Pn.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},Pn.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},Pn.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var ni=function(){this.reset()};ni.prototype.reset=function(){this._active=!1},ni.prototype.dblclick=function(X,ye){return X.preventDefault(),{cameraAnimation:function(ne){ne.easeTo({duration:300,zoom:ne.getZoom()+(X.shiftKey?-1:1),around:ne.unproject(ye)},{originalEvent:X})}}},ni.prototype.enable=function(){this._enabled=!0},ni.prototype.disable=function(){this._enabled=!1,this.reset()},ni.prototype.isEnabled=function(){return this._enabled},ni.prototype.isActive=function(){return this._active};var ti=function(){this._tap=new ei({numTouches:1,numTaps:1}),this.reset()};ti.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},ti.prototype.touchstart=function(X,ye,ne){this._swipePoint||(this._tapTime&&X.timeStamp-this._tapTime>Qn&&this.reset(),this._tapTime?ne.length>0&&(this._swipePoint=ye[0],this._swipeTouch=ne[0].identifier):this._tap.touchstart(X,ye,ne))},ti.prototype.touchmove=function(X,ye,ne){if(!this._tapTime)this._tap.touchmove(X,ye,ne);else if(this._swipePoint){if(ne[0].identifier!==this._swipeTouch)return;var Se=ye[0],Je=Se.y-this._swipePoint.y;return this._swipePoint=Se,X.preventDefault(),this._active=!0,{zoomDelta:Je/128}}},ti.prototype.touchend=function(X,ye,ne){if(this._tapTime)this._swipePoint&&ne.length===0&&this.reset();else{var Se=this._tap.touchend(X,ye,ne);Se&&(this._tapTime=X.timeStamp)}},ti.prototype.touchcancel=function(){this.reset()},ti.prototype.enable=function(){this._enabled=!0},ti.prototype.disable=function(){this._enabled=!1,this.reset()},ti.prototype.isEnabled=function(){return this._enabled},ti.prototype.isActive=function(){return this._active};var ri=function(X,ye,ne){this._el=X,this._mousePan=ye,this._touchPan=ne};ri.prototype.enable=function(X){this._inertiaOptions=X||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},ri.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},ri.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},ri.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var gi=function(X,ye,ne){this._pitchWithRotate=X.pitchWithRotate,this._mouseRotate=ye,this._mousePitch=ne};gi.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},gi.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},gi.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},gi.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var io=function(X,ye,ne,Se){this._el=X,this._touchZoom=ye,this._touchRotate=ne,this._tapDragZoom=Se,this._rotationDisabled=!1,this._enabled=!0};io.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")},io.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},io.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},io.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},io.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},io.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var qi=function(Me){return Me.zoom||Me.drag||Me.pitch||Me.rotate},di=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X})(t.Event);function Na(Me){return Me.panDelta&&Me.panDelta.mag()||Me.zoomDelta||Me.bearingDelta||Me.pitchDelta}var yn=function(X,ye){this._map=X,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Dt(X),this._bearingSnap=ye.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(ye),t.bindAll(["handleEvent","handleWindowEvent"],this);var ne=this._el;this._listeners=[[ne,"touchstart",{passive:!0}],[ne,"touchmove",{passive:!1}],[ne,"touchend",void 0],[ne,"touchcancel",void 0],[ne,"mousedown",void 0],[ne,"mousemove",void 0],[ne,"mouseup",void 0],[t.window.document,"mousemove",{capture:!0}],[t.window.document,"mouseup",void 0],[ne,"mouseover",void 0],[ne,"mouseout",void 0],[ne,"dblclick",void 0],[ne,"click",void 0],[ne,"keydown",{capture:!1}],[ne,"keyup",void 0],[ne,"wheel",{passive:!1}],[ne,"contextmenu",void 0],[t.window,"blur",void 0]];for(var Se=0,Je=this._listeners;Se<Je.length;Se+=1){var xt=Je[Se],At=xt[0],it=xt[1],pt=xt[2];a.addEventListener(At,it,At===t.window.document?this.handleWindowEvent:this.handleEvent,pt)}};yn.prototype.destroy=function(){for(var X=0,ye=this._listeners;X<ye.length;X+=1){var ne=ye[X],Se=ne[0],Je=ne[1],xt=ne[2];a.removeEventListener(Se,Je,Se===t.window.document?this.handleWindowEvent:this.handleEvent,xt)}},yn.prototype._addDefaultHandlers=function(X){var ye=this._map,ne=ye.getCanvasContainer();this._add("mapEvent",new on(ye,X));var Se=ye.boxZoom=new Un(ye,X);this._add("boxZoom",Se);var Je=new Ma,xt=new ni;ye.doubleClickZoom=new Pn(xt,Je),this._add("tapZoom",Je),this._add("clickZoom",xt);var At=new ti;this._add("tapDragZoom",At);var it=ye.touchPitch=new su;this._add("touchPitch",it);var pt=new il(X),Rt=new Wo(X);ye.dragRotate=new gi(X,pt,Rt),this._add("mouseRotate",pt,["mousePitch"]),this._add("mousePitch",Rt,["mouseRotate"]);var or=new Ho(X),er=new bs(X);ye.dragPan=new ri(ne,or,er),this._add("mousePan",or),this._add("touchPan",er,["touchZoom","touchRotate"]);var ur=new Yl,gr=new Vs;ye.touchZoomRotate=new io(ne,gr,ur,At),this._add("touchRotate",ur,["touchPan","touchZoom"]),this._add("touchZoom",gr,["touchPan","touchRotate"]);var vr=ye.scrollZoom=new Rn(ye,this);this._add("scrollZoom",vr,["mousePan"]);var Zt=ye.keyboard=new Uu;this._add("keyboard",Zt),this._add("blockableMapEvent",new Mn(ye));for(var ar=0,tr=["boxZoom","doubleClickZoom","tapDragZoom","touchPitch","dragRotate","dragPan","touchZoomRotate","scrollZoom","keyboard"];ar<tr.length;ar+=1){var Zr=tr[ar];X.interactive&&X[Zr]&&ye[Zr].enable(X[Zr])}},yn.prototype._add=function(X,ye,ne){this._handlers.push({handlerName:X,handler:ye,allowed:ne}),this._handlersById[X]=ye},yn.prototype.stop=function(X){if(!this._updatingCamera){for(var ye=0,ne=this._handlers;ye<ne.length;ye+=1){var Se=ne[ye],Je=Se.handler;Je.reset()}this._inertia.clear(),this._fireEvents({},{},X),this._changes=[]}},yn.prototype.isActive=function(){for(var X=0,ye=this._handlers;X<ye.length;X+=1){var ne=ye[X],Se=ne.handler;if(Se.isActive())return!0}return!1},yn.prototype.isZooming=function(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()},yn.prototype.isRotating=function(){return!!this._eventsInProgress.rotate},yn.prototype.isMoving=function(){return!!qi(this._eventsInProgress)||this.isZooming()},yn.prototype._blockedByActive=function(X,ye,ne){for(var Se in X)if(Se!==ne&&(!ye||ye.indexOf(Se)<0))return!0;return!1},yn.prototype.handleWindowEvent=function(X){this.handleEvent(X,X.type+"Window")},yn.prototype._getMapTouches=function(X){for(var ye=[],ne=0,Se=X;ne<Se.length;ne+=1){var Je=Se[ne],xt=Je.target;this._el.contains(xt)&&ye.push(Je)}return ye},yn.prototype.handleEvent=function(X,ye){if(X.type==="blur"){this.stop(!0);return}this._updatingCamera=!0;for(var ne=X.type==="renderFrame"?void 0:X,Se={needsRenderFrame:!1},Je={},xt={},At=X.touches?this._getMapTouches(X.touches):void 0,it=At?a.touchPos(this._el,At):a.mousePos(this._el,X),pt=0,Rt=this._handlers;pt<Rt.length;pt+=1){var or=Rt[pt],er=or.handlerName,ur=or.handler,gr=or.allowed;if(ur.isEnabled()){var vr=void 0;this._blockedByActive(xt,gr,er)?ur.reset():ur[ye||X.type]&&(vr=ur[ye||X.type](X,it,At),this.mergeHandlerResult(Se,Je,vr,er,ne),vr&&vr.needsRenderFrame&&this._triggerRenderFrame()),(vr||ur.isActive())&&(xt[er]=ur)}}var Zt={};for(var ar in this._previousActiveHandlers)xt[ar]||(Zt[ar]=ne);this._previousActiveHandlers=xt,(Object.keys(Zt).length||Na(Se))&&(this._changes.push([Se,Je,Zt]),this._triggerRenderFrame()),(Object.keys(xt).length||Na(Se))&&this._map._stop(!0),this._updatingCamera=!1;var tr=Se.cameraAnimation;tr&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],tr(this._map))},yn.prototype.mergeHandlerResult=function(X,ye,ne,Se,Je){if(ne){t.extend(X,ne);var xt={handlerName:Se,originalEvent:ne.originalEvent||Je};ne.zoomDelta!==void 0&&(ye.zoom=xt),ne.panDelta!==void 0&&(ye.drag=xt),ne.pitchDelta!==void 0&&(ye.pitch=xt),ne.bearingDelta!==void 0&&(ye.rotate=xt)}},yn.prototype._applyChanges=function(){for(var X={},ye={},ne={},Se=0,Je=this._changes;Se<Je.length;Se+=1){var xt=Je[Se],At=xt[0],it=xt[1],pt=xt[2];At.panDelta&&(X.panDelta=(X.panDelta||new t.Point(0,0))._add(At.panDelta)),At.zoomDelta&&(X.zoomDelta=(X.zoomDelta||0)+At.zoomDelta),At.bearingDelta&&(X.bearingDelta=(X.bearingDelta||0)+At.bearingDelta),At.pitchDelta&&(X.pitchDelta=(X.pitchDelta||0)+At.pitchDelta),At.around!==void 0&&(X.around=At.around),At.pinchAround!==void 0&&(X.pinchAround=At.pinchAround),At.noInertia&&(X.noInertia=At.noInertia),t.extend(ye,it),t.extend(ne,pt)}this._updateMapTransform(X,ye,ne),this._changes=[]},yn.prototype._updateMapTransform=function(X,ye,ne){var Se=this._map,Je=Se.transform;if(!Na(X))return this._fireEvents(ye,ne,!0);var xt=X.panDelta,At=X.zoomDelta,it=X.bearingDelta,pt=X.pitchDelta,Rt=X.around,or=X.pinchAround;or!==void 0&&(Rt=or),Se._stop(!0),Rt=Rt||Se.transform.centerPoint;var er=Je.pointLocation(xt?Rt.sub(xt):Rt);it&&(Je.bearing+=it),pt&&(Je.pitch+=pt),At&&(Je.zoom+=At),Je.setLocationAtPoint(er,Rt),this._map._update(),X.noInertia||this._inertia.record(X),this._fireEvents(ye,ne,!0)},yn.prototype._fireEvents=function(X,ye,ne){var Se=this,Je=qi(this._eventsInProgress),xt=qi(X),At={};for(var it in X){var pt=X[it],Rt=pt.originalEvent;this._eventsInProgress[it]||(At[it+"start"]=Rt),this._eventsInProgress[it]=X[it]}!Je&&xt&&this._fireEvent("movestart",xt.originalEvent);for(var or in At)this._fireEvent(or,At[or]);xt&&this._fireEvent("move",xt.originalEvent);for(var er in X){var ur=X[er],gr=ur.originalEvent;this._fireEvent(er,gr)}var vr={},Zt;for(var ar in this._eventsInProgress){var tr=this._eventsInProgress[ar],Zr=tr.handlerName,un=tr.originalEvent;this._handlersById[Zr].isActive()||(delete this._eventsInProgress[ar],Zt=ye[Zr]||un,vr[ar+"end"]=Zt)}for(var En in vr)this._fireEvent(En,vr[En]);var ka=qi(this._eventsInProgress);if(ne&&(Je||xt)&&!ka){this._updatingCamera=!0;var ma=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),ha=function(Pa){return Pa!==0&&-Se._bearingSnap<Pa&&Pa<Se._bearingSnap};ma?(ha(ma.bearing||this._map.getBearing())&&(ma.bearing=0),this._map.easeTo(ma,{originalEvent:Zt})):(this._map.fire(new t.Event("moveend",{originalEvent:Zt})),ha(this._map.getBearing())&&this._map.resetNorth()),this._updatingCamera=!1}},yn.prototype._fireEvent=function(X,ye){this._map.fire(new t.Event(X,ye?{originalEvent:ye}:{}))},yn.prototype._requestFrame=function(){var X=this;return this._map.triggerRepaint(),this._map._renderTaskQueue.add(function(ye){delete X._frameId,X.handleEvent(new di("renderFrame",{timeStamp:ye})),X._applyChanges()})},yn.prototype._triggerRenderFrame=function(){this._frameId===void 0&&(this._frameId=this._requestFrame())};var ra=(function(Me){function X(ye,ne){Me.call(this),this._moving=!1,this._zooming=!1,this.transform=ye,this._bearingSnap=ne.bearingSnap,t.bindAll(["_renderFrameCallback"],this)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getCenter=function(){return new t.LngLat(this.transform.center.lng,this.transform.center.lat)},X.prototype.setCenter=function(ne,Se){return this.jumpTo({center:ne},Se)},X.prototype.panBy=function(ne,Se,Je){return ne=t.Point.convert(ne).mult(-1),this.panTo(this.transform.center,t.extend({offset:ne},Se),Je)},X.prototype.panTo=function(ne,Se,Je){return this.easeTo(t.extend({center:ne},Se),Je)},X.prototype.getZoom=function(){return this.transform.zoom},X.prototype.setZoom=function(ne,Se){return this.jumpTo({zoom:ne},Se),this},X.prototype.zoomTo=function(ne,Se,Je){return this.easeTo(t.extend({zoom:ne},Se),Je)},X.prototype.zoomIn=function(ne,Se){return this.zoomTo(this.getZoom()+1,ne,Se),this},X.prototype.zoomOut=function(ne,Se){return this.zoomTo(this.getZoom()-1,ne,Se),this},X.prototype.getBearing=function(){return this.transform.bearing},X.prototype.setBearing=function(ne,Se){return this.jumpTo({bearing:ne},Se),this},X.prototype.getPadding=function(){return this.transform.padding},X.prototype.setPadding=function(ne,Se){return this.jumpTo({padding:ne},Se),this},X.prototype.rotateTo=function(ne,Se,Je){return this.easeTo(t.extend({bearing:ne},Se),Je)},X.prototype.resetNorth=function(ne,Se){return this.rotateTo(0,t.extend({duration:1e3},ne),Se),this},X.prototype.resetNorthPitch=function(ne,Se){return this.easeTo(t.extend({bearing:0,pitch:0,duration:1e3},ne),Se),this},X.prototype.snapToNorth=function(ne,Se){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(ne,Se):this},X.prototype.getPitch=function(){return this.transform.pitch},X.prototype.setPitch=function(ne,Se){return this.jumpTo({pitch:ne},Se),this},X.prototype.cameraForBounds=function(ne,Se){ne=t.LngLatBounds.convert(ne);var Je=Se&&Se.bearing||0;return this._cameraForBoxAndBearing(ne.getNorthWest(),ne.getSouthEast(),Je,Se)},X.prototype._cameraForBoxAndBearing=function(ne,Se,Je,xt){var At={top:0,bottom:0,right:0,left:0};if(xt=t.extend({padding:At,offset:[0,0],maxZoom:this.transform.maxZoom},xt),typeof xt.padding=="number"){var it=xt.padding;xt.padding={top:it,bottom:it,right:it,left:it}}xt.padding=t.extend(At,xt.padding);var pt=this.transform,Rt=pt.padding,or=pt.project(t.LngLat.convert(ne)),er=pt.project(t.LngLat.convert(Se)),ur=or.rotate(-Je*Math.PI/180),gr=er.rotate(-Je*Math.PI/180),vr=new t.Point(Math.max(ur.x,gr.x),Math.max(ur.y,gr.y)),Zt=new t.Point(Math.min(ur.x,gr.x),Math.min(ur.y,gr.y)),ar=vr.sub(Zt),tr=(pt.width-(Rt.left+Rt.right+xt.padding.left+xt.padding.right))/ar.x,Zr=(pt.height-(Rt.top+Rt.bottom+xt.padding.top+xt.padding.bottom))/ar.y;if(Zr<0||tr<0){t.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset.");return}var un=Math.min(pt.scaleZoom(pt.scale*Math.min(tr,Zr)),xt.maxZoom),En=typeof xt.offset.x=="number"?new t.Point(xt.offset.x,xt.offset.y):t.Point.convert(xt.offset),ka=(xt.padding.left-xt.padding.right)/2,ma=(xt.padding.top-xt.padding.bottom)/2,ha=new t.Point(ka,ma),Pa=ha.rotate(Je*Math.PI/180),Da=En.add(Pa),Qa=Da.mult(pt.scale/pt.zoomScale(un)),Ra=pt.unproject(or.add(er).div(2).sub(Qa));return{center:Ra,zoom:un,bearing:Je}},X.prototype.fitBounds=function(ne,Se,Je){return this._fitInternal(this.cameraForBounds(ne,Se),Se,Je)},X.prototype.fitScreenCoordinates=function(ne,Se,Je,xt,At){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(t.Point.convert(ne)),this.transform.pointLocation(t.Point.convert(Se)),Je,xt),xt,At)},X.prototype._fitInternal=function(ne,Se,Je){return ne?(Se=t.extend(ne,Se),delete Se.padding,Se.linear?this.easeTo(Se,Je):this.flyTo(Se,Je)):this},X.prototype.jumpTo=function(ne,Se){this.stop();var Je=this.transform,xt=!1,At=!1,it=!1;return"zoom"in ne&&Je.zoom!==+ne.zoom&&(xt=!0,Je.zoom=+ne.zoom),ne.center!==void 0&&(Je.center=t.LngLat.convert(ne.center)),"bearing"in ne&&Je.bearing!==+ne.bearing&&(At=!0,Je.bearing=+ne.bearing),"pitch"in ne&&Je.pitch!==+ne.pitch&&(it=!0,Je.pitch=+ne.pitch),ne.padding!=null&&!Je.isPaddingEqual(ne.padding)&&(Je.padding=ne.padding),this.fire(new t.Event("movestart",Se)).fire(new t.Event("move",Se)),xt&&this.fire(new t.Event("zoomstart",Se)).fire(new t.Event("zoom",Se)).fire(new t.Event("zoomend",Se)),At&&this.fire(new t.Event("rotatestart",Se)).fire(new t.Event("rotate",Se)).fire(new t.Event("rotateend",Se)),it&&this.fire(new t.Event("pitchstart",Se)).fire(new t.Event("pitch",Se)).fire(new t.Event("pitchend",Se)),this.fire(new t.Event("moveend",Se))},X.prototype.easeTo=function(ne,Se){var Je=this;this._stop(!1,ne.easeId),ne=t.extend({offset:[0,0],duration:500,easing:t.ease},ne),(ne.animate===!1||!ne.essential&&t.browser.prefersReducedMotion)&&(ne.duration=0);var xt=this.transform,At=this.getZoom(),it=this.getBearing(),pt=this.getPitch(),Rt=this.getPadding(),or="zoom"in ne?+ne.zoom:At,er="bearing"in ne?this._normalizeBearing(ne.bearing,it):it,ur="pitch"in ne?+ne.pitch:pt,gr="padding"in ne?ne.padding:xt.padding,vr=t.Point.convert(ne.offset),Zt=xt.centerPoint.add(vr),ar=xt.pointLocation(Zt),tr=t.LngLat.convert(ne.center||ar);this._normalizeCenter(tr);var Zr=xt.project(ar),un=xt.project(tr).sub(Zr),En=xt.zoomScale(or-At),ka,ma;ne.around&&(ka=t.LngLat.convert(ne.around),ma=xt.locationPoint(ka));var ha={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||or!==At,this._rotating=this._rotating||it!==er,this._pitching=this._pitching||ur!==pt,this._padding=!xt.isPaddingEqual(gr),this._easeId=ne.easeId,this._prepareEase(Se,ne.noMoveStart,ha),this._ease(function(Pa){if(Je._zooming&&(xt.zoom=t.number(At,or,Pa)),Je._rotating&&(xt.bearing=t.number(it,er,Pa)),Je._pitching&&(xt.pitch=t.number(pt,ur,Pa)),Je._padding&&(xt.interpolatePadding(Rt,gr,Pa),Zt=xt.centerPoint.add(vr)),ka)xt.setLocationAtPoint(ka,ma);else{var Da=xt.zoomScale(xt.zoom-At),Qa=or>At?Math.min(2,En):Math.max(.5,En),Ra=Math.pow(Qa,1-Pa),ii=xt.unproject(Zr.add(un.mult(Pa*Ra)).mult(Da));xt.setLocationAtPoint(xt.renderWorldCopies?ii.wrap():ii,Zt)}Je._fireMoveEvents(Se)},function(Pa){Je._afterEase(Se,Pa)},ne),this},X.prototype._prepareEase=function(ne,Se,Je){Je===void 0&&(Je={}),this._moving=!0,!Se&&!Je.moving&&this.fire(new t.Event("movestart",ne)),this._zooming&&!Je.zooming&&this.fire(new t.Event("zoomstart",ne)),this._rotating&&!Je.rotating&&this.fire(new t.Event("rotatestart",ne)),this._pitching&&!Je.pitching&&this.fire(new t.Event("pitchstart",ne))},X.prototype._fireMoveEvents=function(ne){this.fire(new t.Event("move",ne)),this._zooming&&this.fire(new t.Event("zoom",ne)),this._rotating&&this.fire(new t.Event("rotate",ne)),this._pitching&&this.fire(new t.Event("pitch",ne))},X.prototype._afterEase=function(ne,Se){if(!(this._easeId&&Se&&this._easeId===Se)){delete this._easeId;var Je=this._zooming,xt=this._rotating,At=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,Je&&this.fire(new t.Event("zoomend",ne)),xt&&this.fire(new t.Event("rotateend",ne)),At&&this.fire(new t.Event("pitchend",ne)),this.fire(new t.Event("moveend",ne))}},X.prototype.flyTo=function(ne,Se){var Je=this;if(!ne.essential&&t.browser.prefersReducedMotion){var xt=t.pick(ne,["center","zoom","bearing","pitch","around"]);return this.jumpTo(xt,Se)}this.stop(),ne=t.extend({offset:[0,0],speed:1.2,curve:1.42,easing:t.ease},ne);var At=this.transform,it=this.getZoom(),pt=this.getBearing(),Rt=this.getPitch(),or=this.getPadding(),er="zoom"in ne?t.clamp(+ne.zoom,At.minZoom,At.maxZoom):it,ur="bearing"in ne?this._normalizeBearing(ne.bearing,pt):pt,gr="pitch"in ne?+ne.pitch:Rt,vr="padding"in ne?ne.padding:At.padding,Zt=At.zoomScale(er-it),ar=t.Point.convert(ne.offset),tr=At.centerPoint.add(ar),Zr=At.pointLocation(tr),un=t.LngLat.convert(ne.center||Zr);this._normalizeCenter(un);var En=At.project(Zr),ka=At.project(un).sub(En),ma=ne.curve,ha=Math.max(At.width,At.height),Pa=ha/Zt,Da=ka.mag();if("minZoom"in ne){var Qa=t.clamp(Math.min(ne.minZoom,it,er),At.minZoom,At.maxZoom),Ra=ha/At.zoomScale(Qa-it);ma=Math.sqrt(Ra/Da*2)}var ii=ma*ma;function xi(yl){var Lu=(Pa*Pa-ha*ha+(yl?-1:1)*ii*ii*Da*Da)/(2*(yl?Pa:ha)*ii*Da);return Math.log(Math.sqrt(Lu*Lu+1)-Lu)}function Xi(yl){return(Math.exp(yl)-Math.exp(-yl))/2}function co(yl){return(Math.exp(yl)+Math.exp(-yl))/2}function Is(yl){return Xi(yl)/co(yl)}var Cs=xi(0),kl=function(yl){return co(Cs)/co(Cs+ma*yl)},Tl=function(yl){return ha*((co(Cs)*Is(Cs+ma*yl)-Xi(Cs))/ii)/Da},Rl=(xi(1)-Cs)/ma;if(Math.abs(Da)<1e-6||!isFinite(Rl)){if(Math.abs(ha-Pa)<1e-6)return this.easeTo(ne,Se);var Pl=Pa<ha?-1:1;Rl=Math.abs(Math.log(Pa/ha))/ma,Tl=function(){return 0},kl=function(yl){return Math.exp(Pl*ma*yl)}}if("duration"in ne)ne.duration=+ne.duration;else{var fc="screenSpeed"in ne?+ne.screenSpeed/ma:+ne.speed;ne.duration=1e3*Rl/fc}return ne.maxDuration&&ne.duration>ne.maxDuration&&(ne.duration=0),this._zooming=!0,this._rotating=pt!==ur,this._pitching=gr!==Rt,this._padding=!At.isPaddingEqual(vr),this._prepareEase(Se,!1),this._ease(function(yl){var Lu=yl*Rl,ch=1/kl(Lu);At.zoom=yl===1?er:it+At.scaleZoom(ch),Je._rotating&&(At.bearing=t.number(pt,ur,yl)),Je._pitching&&(At.pitch=t.number(Rt,gr,yl)),Je._padding&&(At.interpolatePadding(or,vr,yl),tr=At.centerPoint.add(ar));var Uh=yl===1?un:At.unproject(En.add(ka.mult(Tl(Lu))).mult(ch));At.setLocationAtPoint(At.renderWorldCopies?Uh.wrap():Uh,tr),Je._fireMoveEvents(Se)},function(){return Je._afterEase(Se)},ne),this},X.prototype.isEasing=function(){return!!this._easeFrameId},X.prototype.stop=function(){return this._stop()},X.prototype._stop=function(ne,Se){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var Je=this._onEaseEnd;delete this._onEaseEnd,Je.call(this,Se)}if(!ne){var xt=this.handlers;xt&&xt.stop(!1)}return this},X.prototype._ease=function(ne,Se,Je){Je.animate===!1||Je.duration===0?(ne(1),Se()):(this._easeStart=t.browser.now(),this._easeOptions=Je,this._onEaseFrame=ne,this._onEaseEnd=Se,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},X.prototype._renderFrameCallback=function(){var ne=Math.min((t.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(ne)),ne<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},X.prototype._normalizeBearing=function(ne,Se){ne=t.wrap(ne,-180,180);var Je=Math.abs(ne-Se);return Math.abs(ne-360-Se)<Je&&(ne-=360),Math.abs(ne+360-Se)<Je&&(ne+=360),ne},X.prototype._normalizeCenter=function(ne){var Se=this.transform;if(!(!Se.renderWorldCopies||Se.lngRange)){var Je=ne.lng-Se.center.lng;ne.lng+=Je>180?-360:Je<-180?360:0}},X})(t.Evented),wa=function(X){X===void 0&&(X={}),this.options=X,t.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)};wa.prototype.getDefaultPosition=function(){return"bottom-right"},wa.prototype.onAdd=function(X){var ye=this.options&&this.options.compact;return this._map=X,this._container=a.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=a.create("button","mapboxgl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=a.create("div","mapboxgl-ctrl-attrib-inner",this._container),this._innerContainer.setAttribute("role","list"),ye&&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),ye===void 0&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},wa.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},wa.prototype._setElementTitle=function(X,ye){var ne=this._map._getUIString("AttributionControl."+ye);X.title=ne,X.setAttribute("aria-label",ne)},wa.prototype._toggleAttribution=function(){this._container.classList.contains("mapboxgl-compact-show")?(this._container.classList.remove("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","false")):(this._container.classList.add("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","true"))},wa.prototype._updateEditLink=function(){var X=this._editLink;X||(X=this._editLink=this._container.querySelector(".mapbox-improve-map"));var ye=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||t.config.ACCESS_TOKEN}];if(X){var ne=ye.reduce(function(Se,Je,xt){return Je.value&&(Se+=Je.key+"="+Je.value+(xt<ye.length-1?"&":"")),Se},"?");X.href=t.config.FEEDBACK_URL+"/"+ne+(this._map._hash?this._map._hash.getHashString(!0):""),X.rel="noopener nofollow",this._setElementTitle(X,"MapFeedback")}},wa.prototype._updateData=function(X){X&&(X.sourceDataType==="metadata"||X.sourceDataType==="visibility"||X.dataType==="style")&&(this._updateAttributions(),this._updateEditLink())},wa.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(it){return typeof it!="string"?"":it})):typeof this.options.customAttribution=="string"&&X.push(this.options.customAttribution)),this._map.style.stylesheet){var ye=this._map.style.stylesheet;this.styleOwner=ye.owner,this.styleId=ye.id}var ne=this._map.style.sourceCaches;for(var Se in ne){var Je=ne[Se];if(Je.used){var xt=Je.getSource();xt.attribution&&X.indexOf(xt.attribution)<0&&X.push(xt.attribution)}}X.sort(function(it,pt){return it.length-pt.length}),X=X.filter(function(it,pt){for(var Rt=pt+1;Rt<X.length;Rt++)if(X[Rt].indexOf(it)>=0)return!1;return!0});var At=X.join(" | ");At!==this._attribHTML&&(this._attribHTML=At,X.length?(this._innerContainer.innerHTML=At,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},wa.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")};var Fa=function(){t.bindAll(["_updateLogo"],this),t.bindAll(["_updateCompact"],this)};Fa.prototype.onAdd=function(X){this._map=X,this._container=a.create("div","mapboxgl-ctrl");var ye=a.create("a","mapboxgl-ctrl-logo");return ye.target="_blank",ye.rel="noopener nofollow",ye.href="https://www.mapbox.com/",ye.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),ye.setAttribute("rel","noopener nofollow"),this._container.appendChild(ye),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},Fa.prototype.onRemove=function(){a.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},Fa.prototype.getDefaultPosition=function(){return"bottom-left"},Fa.prototype._updateLogo=function(X){(!X||X.sourceDataType==="metadata")&&(this._container.style.display=this._logoRequired()?"block":"none")},Fa.prototype._logoRequired=function(){if(this._map.style){var X=this._map.style.sourceCaches;for(var ye in X){var ne=X[ye].getSource();if(ne.mapbox_logo)return!0}return!1}},Fa.prototype._updateCompact=function(){var X=this._container.children;if(X.length){var ye=X[0];this._map.getCanvasContainer().offsetWidth<250?ye.classList.add("mapboxgl-compact"):ye.classList.remove("mapboxgl-compact")}};var Sa=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};Sa.prototype.add=function(X){var ye=++this._id,ne=this._queue;return ne.push({callback:X,id:ye,cancelled:!1}),ye},Sa.prototype.remove=function(X){for(var ye=this._currentlyRunning,ne=ye?this._queue.concat(ye):this._queue,Se=0,Je=ne;Se<Je.length;Se+=1){var xt=Je[Se];if(xt.id===X){xt.cancelled=!0;return}}},Sa.prototype.run=function(X){X===void 0&&(X=0);var ye=this._currentlyRunning=this._queue;this._queue=[];for(var ne=0,Se=ye;ne<Se.length;ne+=1){var Je=Se[ne];if(!Je.cancelled&&(Je.callback(X),this._cleared))break}this._cleared=!1,this._currentlyRunning=!1},Sa.prototype.clear=function(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]};var zi={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","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"},li=t.window.HTMLImageElement,eo=t.window.HTMLElement,Ea=t.window.ImageBitmap,pa=-2,ki=22,Jn=0,_i=60,ai={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:pa,maxZoom:ki,minPitch:Jn,maxPitch:_i,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},no=(function(Me){function X(ne){var Se=this;if(ne=t.extend({},ai,ne),ne.minZoom!=null&&ne.maxZoom!=null&&ne.minZoom>ne.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(ne.minPitch!=null&&ne.maxPitch!=null&&ne.minPitch>ne.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(ne.minPitch!=null&&ne.minPitch<Jn)throw new Error("minPitch must be greater than or equal to "+Jn);if(ne.maxPitch!=null&&ne.maxPitch>_i)throw new Error("maxPitch must be less than or equal to "+_i);var Je=new Us(ne.minZoom,ne.maxZoom,ne.minPitch,ne.maxPitch,ne.renderWorldCopies);if(Me.call(this,Je,ne),this._interactive=ne.interactive,this._maxTileCacheSize=ne.maxTileCacheSize,this._failIfMajorPerformanceCaveat=ne.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=ne.preserveDrawingBuffer,this._antialias=ne.antialias,this._trackResize=ne.trackResize,this._bearingSnap=ne.bearingSnap,this._refreshExpiredTiles=ne.refreshExpiredTiles,this._fadeDuration=ne.fadeDuration,this._crossSourceCollisions=ne.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=ne.collectResourceTiming,this._renderTaskQueue=new Sa,this._controls=[],this._mapId=t.uniqueId(),this._locale=t.extend({},zi,ne.locale),this._clickTolerance=ne.clickTolerance,this._requestManager=new t.RequestManager(ne.transformRequest,ne.accessToken),typeof ne.container=="string"){if(this._container=t.window.document.getElementById(ne.container),!this._container)throw new Error("Container '"+ne.container+"' not found.")}else if(ne.container instanceof eo)this._container=ne.container;else throw new Error("Invalid type: 'container' must be a String or HTMLElement.");if(ne.maxBounds&&this.setMaxBounds(ne.maxBounds),t.bindAll(["_onWindowOnline","_onWindowResize","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),this.painter===void 0)throw new Error("Failed to initialize WebGL.");this.on("move",function(){return Se._update(!1)}),this.on("moveend",function(){return Se._update(!1)}),this.on("zoom",function(){return Se._update(!0)}),typeof t.window<"u"&&(t.window.addEventListener("online",this._onWindowOnline,!1),t.window.addEventListener("resize",this._onWindowResize,!1),t.window.addEventListener("orientationchange",this._onWindowResize,!1)),this.handlers=new yn(this,ne);var xt=typeof ne.hash=="string"&&ne.hash||void 0;this._hash=ne.hash&&new yc(xt).addTo(this),(!this._hash||!this._hash._onHashChange())&&(this.jumpTo({center:ne.center,zoom:ne.zoom,bearing:ne.bearing,pitch:ne.pitch}),ne.bounds&&(this.resize(),this.fitBounds(ne.bounds,t.extend({},ne.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=ne.localIdeographFontFamily,ne.style&&this.setStyle(ne.style,{localIdeographFontFamily:ne.localIdeographFontFamily}),ne.attributionControl&&this.addControl(new wa({customAttribution:ne.customAttribution})),this.addControl(new Fa,ne.logoPosition),this.on("style.load",function(){Se.transform.unmodified&&Se.jumpTo(Se.style.stylesheet)}),this.on("data",function(At){Se._update(At.dataType==="style"),Se.fire(new t.Event(At.dataType+"data",At))}),this.on("dataloading",function(At){Se.fire(new t.Event(At.dataType+"dataloading",At))})}Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X;var ye={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(Se,Je){if(Je===void 0&&(Se.getDefaultPosition?Je=Se.getDefaultPosition():Je="top-right"),!Se||!Se.onAdd)return this.fire(new t.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var xt=Se.onAdd(this);this._controls.push(Se);var At=this._controlPositions[Je];return Je.indexOf("bottom")!==-1?At.insertBefore(xt,At.firstChild):At.appendChild(xt),this},X.prototype.removeControl=function(Se){if(!Se||!Se.onRemove)return this.fire(new t.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var Je=this._controls.indexOf(Se);return Je>-1&&this._controls.splice(Je,1),Se.onRemove(this),this},X.prototype.hasControl=function(Se){return this._controls.indexOf(Se)>-1},X.prototype.resize=function(Se){var Je=this._containerDimensions(),xt=Je[0],At=Je[1];this._resizeCanvas(xt,At),this.transform.resize(xt,At),this.painter.resize(xt,At);var it=!this._moving;return it&&(this.stop(),this.fire(new t.Event("movestart",Se)).fire(new t.Event("move",Se))),this.fire(new t.Event("resize",Se)),it&&this.fire(new t.Event("moveend",Se)),this},X.prototype.getBounds=function(){return this.transform.getBounds()},X.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},X.prototype.setMaxBounds=function(Se){return this.transform.setMaxBounds(t.LngLatBounds.convert(Se)),this._update()},X.prototype.setMinZoom=function(Se){if(Se=Se??pa,Se>=pa&&Se<=this.transform.maxZoom)return this.transform.minZoom=Se,this._update(),this.getZoom()<Se&&this.setZoom(Se),this;throw new Error("minZoom must be between "+pa+" and the current maxZoom, inclusive")},X.prototype.getMinZoom=function(){return this.transform.minZoom},X.prototype.setMaxZoom=function(Se){if(Se=Se??ki,Se>=this.transform.minZoom)return this.transform.maxZoom=Se,this._update(),this.getZoom()>Se&&this.setZoom(Se),this;throw new Error("maxZoom must be greater than the current minZoom")},X.prototype.getMaxZoom=function(){return this.transform.maxZoom},X.prototype.setMinPitch=function(Se){if(Se=Se??Jn,Se<Jn)throw new Error("minPitch must be greater than or equal to "+Jn);if(Se>=Jn&&Se<=this.transform.maxPitch)return this.transform.minPitch=Se,this._update(),this.getPitch()<Se&&this.setPitch(Se),this;throw new Error("minPitch must be between "+Jn+" and the current maxPitch, inclusive")},X.prototype.getMinPitch=function(){return this.transform.minPitch},X.prototype.setMaxPitch=function(Se){if(Se=Se??_i,Se>_i)throw new Error("maxPitch must be less than or equal to "+_i);if(Se>=this.transform.minPitch)return this.transform.maxPitch=Se,this._update(),this.getPitch()>Se&&this.setPitch(Se),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(Se){return this.transform.renderWorldCopies=Se,this._update()},X.prototype.project=function(Se){return this.transform.locationPoint(t.LngLat.convert(Se))},X.prototype.unproject=function(Se){return this.transform.pointLocation(t.Point.convert(Se))},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(Se,Je,xt){var At=this,it;if(Se==="mouseenter"||Se==="mouseover"){var pt=!1,Rt=function(Zt){var ar=At.getLayer(Je)?At.queryRenderedFeatures(Zt.point,{layers:[Je]}):[];ar.length?pt||(pt=!0,xt.call(At,new hr(Se,At,Zt.originalEvent,{features:ar}))):pt=!1},or=function(){pt=!1};return{layer:Je,listener:xt,delegates:{mousemove:Rt,mouseout:or}}}else if(Se==="mouseleave"||Se==="mouseout"){var er=!1,ur=function(Zt){var ar=At.getLayer(Je)?At.queryRenderedFeatures(Zt.point,{layers:[Je]}):[];ar.length?er=!0:er&&(er=!1,xt.call(At,new hr(Se,At,Zt.originalEvent)))},gr=function(Zt){er&&(er=!1,xt.call(At,new hr(Se,At,Zt.originalEvent)))};return{layer:Je,listener:xt,delegates:{mousemove:ur,mouseout:gr}}}else{var vr=function(Zt){var ar=At.getLayer(Je)?At.queryRenderedFeatures(Zt.point,{layers:[Je]}):[];ar.length&&(Zt.features=ar,xt.call(At,Zt),delete Zt.features)};return{layer:Je,listener:xt,delegates:(it={},it[Se]=vr,it)}}},X.prototype.on=function(Se,Je,xt){if(xt===void 0)return Me.prototype.on.call(this,Se,Je);var At=this._createDelegatedListener(Se,Je,xt);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[Se]=this._delegatedListeners[Se]||[],this._delegatedListeners[Se].push(At);for(var it in At.delegates)this.on(it,At.delegates[it]);return this},X.prototype.once=function(Se,Je,xt){if(xt===void 0)return Me.prototype.once.call(this,Se,Je);var At=this._createDelegatedListener(Se,Je,xt);for(var it in At.delegates)this.once(it,At.delegates[it]);return this},X.prototype.off=function(Se,Je,xt){var At=this;if(xt===void 0)return Me.prototype.off.call(this,Se,Je);var it=function(pt){for(var Rt=pt[Se],or=0;or<Rt.length;or++){var er=Rt[or];if(er.layer===Je&&er.listener===xt){for(var ur in er.delegates)At.off(ur,er.delegates[ur]);return Rt.splice(or,1),At}}};return this._delegatedListeners&&this._delegatedListeners[Se]&&it(this._delegatedListeners),this},X.prototype.queryRenderedFeatures=function(Se,Je){if(!this.style)return[];Je===void 0&&Se!==void 0&&!(Se instanceof t.Point)&&!Array.isArray(Se)&&(Je=Se,Se=void 0),Je=Je||{},Se=Se||[[0,0],[this.transform.width,this.transform.height]];var xt;if(Se instanceof t.Point||typeof Se[0]=="number")xt=[t.Point.convert(Se)];else{var At=t.Point.convert(Se[0]),it=t.Point.convert(Se[1]);xt=[At,new t.Point(it.x,At.y),it,new t.Point(At.x,it.y),At]}return this.style.queryRenderedFeatures(xt,Je,this.transform)},X.prototype.querySourceFeatures=function(Se,Je){return this.style.querySourceFeatures(Se,Je)},X.prototype.setStyle=function(Se,Je){return Je=t.extend({},{localIdeographFontFamily:this._localIdeographFontFamily},Je),Je.diff!==!1&&Je.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&Se?(this._diffStyle(Se,Je),this):(this._localIdeographFontFamily=Je.localIdeographFontFamily,this._updateStyle(Se,Je))},X.prototype._getUIString=function(Se){var Je=this._locale[Se];if(Je==null)throw new Error("Missing UI string '"+Se+"'");return Je},X.prototype._updateStyle=function(Se,Je){if(this.style&&(this.style.setEventedParent(null),this.style._remove()),Se)this.style=new ac(this,Je||{});else return delete this.style,this;return this.style.setEventedParent(this,{style:this.style}),typeof Se=="string"?this.style.loadURL(Se):this.style.loadJSON(Se),this},X.prototype._lazyInitEmptyStyle=function(){this.style||(this.style=new ac(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())},X.prototype._diffStyle=function(Se,Je){var xt=this;if(typeof Se=="string"){var At=this._requestManager.normalizeStyleURL(Se),it=this._requestManager.transformRequest(At,t.ResourceType.Style);t.getJSON(it,function(pt,Rt){pt?xt.fire(new t.ErrorEvent(pt)):Rt&&xt._updateDiff(Rt,Je)})}else typeof Se=="object"&&this._updateDiff(Se,Je)},X.prototype._updateDiff=function(Se,Je){try{this.style.setState(Se)&&this._update(!0)}catch(xt){t.warnOnce("Unable to perform style diff: "+(xt.message||xt.error||xt)+".  Rebuilding the style from scratch."),this._updateStyle(Se,Je)}},X.prototype.getStyle=function(){if(this.style)return this.style.serialize()},X.prototype.isStyleLoaded=function(){return this.style?this.style.loaded():t.warnOnce("There is no style added to the map.")},X.prototype.addSource=function(Se,Je){return this._lazyInitEmptyStyle(),this.style.addSource(Se,Je),this._update(!0)},X.prototype.isSourceLoaded=function(Se){var Je=this.style&&this.style.sourceCaches[Se];if(Je===void 0){this.fire(new t.ErrorEvent(new Error("There is no source with ID '"+Se+"'")));return}return Je.loaded()},X.prototype.areTilesLoaded=function(){var Se=this.style&&this.style.sourceCaches;for(var Je in Se){var xt=Se[Je],At=xt._tiles;for(var it in At){var pt=At[it];if(!(pt.state==="loaded"||pt.state==="errored"))return!1}}return!0},X.prototype.addSourceType=function(Se,Je,xt){return this._lazyInitEmptyStyle(),this.style.addSourceType(Se,Je,xt)},X.prototype.removeSource=function(Se){return this.style.removeSource(Se),this._update(!0)},X.prototype.getSource=function(Se){return this.style.getSource(Se)},X.prototype.addImage=function(Se,Je,xt){xt===void 0&&(xt={});var At=xt.pixelRatio;At===void 0&&(At=1);var it=xt.sdf;it===void 0&&(it=!1);var pt=xt.stretchX,Rt=xt.stretchY,or=xt.content;this._lazyInitEmptyStyle();var er=0;if(Je instanceof li||Ea&&Je instanceof Ea){var ur=t.browser.getImageData(Je),gr=ur.width,vr=ur.height,Zt=ur.data;this.style.addImage(Se,{data:new t.RGBAImage({width:gr,height:vr},Zt),pixelRatio:At,stretchX:pt,stretchY:Rt,content:or,sdf:it,version:er})}else{if(Je.width===void 0||Je.height===void 0)return this.fire(new t.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 ar=Je.width,tr=Je.height,Zr=Je.data,un=Je;this.style.addImage(Se,{data:new t.RGBAImage({width:ar,height:tr},new Uint8Array(Zr)),pixelRatio:At,stretchX:pt,stretchY:Rt,content:or,sdf:it,version:er,userImage:un}),un.onAdd&&un.onAdd(this,Se)}},X.prototype.updateImage=function(Se,Je){var xt=this.style.getImage(Se);if(!xt)return this.fire(new t.ErrorEvent(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));var At=Je instanceof li||Ea&&Je instanceof Ea?t.browser.getImageData(Je):Je,it=At.width,pt=At.height,Rt=At.data;if(it===void 0||pt===void 0)return this.fire(new t.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(it!==xt.data.width||pt!==xt.data.height)return this.fire(new t.ErrorEvent(new Error("The width and height of the updated image must be that same as the previous version of the image")));var or=!(Je instanceof li||Ea&&Je instanceof Ea);xt.data.replace(Rt,or),this.style.updateImage(Se,xt)},X.prototype.hasImage=function(Se){return Se?!!this.style.getImage(Se):(this.fire(new t.ErrorEvent(new Error("Missing required image id"))),!1)},X.prototype.removeImage=function(Se){this.style.removeImage(Se)},X.prototype.loadImage=function(Se,Je){t.getImage(this._requestManager.transformRequest(Se,t.ResourceType.Image),Je)},X.prototype.listImages=function(){return this.style.listImages()},X.prototype.addLayer=function(Se,Je){return this._lazyInitEmptyStyle(),this.style.addLayer(Se,Je),this._update(!0)},X.prototype.moveLayer=function(Se,Je){return this.style.moveLayer(Se,Je),this._update(!0)},X.prototype.removeLayer=function(Se){return this.style.removeLayer(Se),this._update(!0)},X.prototype.getLayer=function(Se){return this.style.getLayer(Se)},X.prototype.setLayerZoomRange=function(Se,Je,xt){return this.style.setLayerZoomRange(Se,Je,xt),this._update(!0)},X.prototype.setFilter=function(Se,Je,xt){return xt===void 0&&(xt={}),this.style.setFilter(Se,Je,xt),this._update(!0)},X.prototype.getFilter=function(Se){return this.style.getFilter(Se)},X.prototype.setPaintProperty=function(Se,Je,xt,At){return At===void 0&&(At={}),this.style.setPaintProperty(Se,Je,xt,At),this._update(!0)},X.prototype.getPaintProperty=function(Se,Je){return this.style.getPaintProperty(Se,Je)},X.prototype.setLayoutProperty=function(Se,Je,xt,At){return At===void 0&&(At={}),this.style.setLayoutProperty(Se,Je,xt,At),this._update(!0)},X.prototype.getLayoutProperty=function(Se,Je){return this.style.getLayoutProperty(Se,Je)},X.prototype.setLight=function(Se,Je){return Je===void 0&&(Je={}),this._lazyInitEmptyStyle(),this.style.setLight(Se,Je),this._update(!0)},X.prototype.getLight=function(){return this.style.getLight()},X.prototype.setFeatureState=function(Se,Je){return this.style.setFeatureState(Se,Je),this._update()},X.prototype.removeFeatureState=function(Se,Je){return this.style.removeFeatureState(Se,Je),this._update()},X.prototype.getFeatureState=function(Se){return this.style.getFeatureState(Se)},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 Se=0,Je=0;return this._container&&(Se=this._container.clientWidth||400,Je=this._container.clientHeight||300),[Se,Je]},X.prototype._detectMissingCSS=function(){var Se=t.window.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color");Se!=="rgb(250, 128, 114)"&&t.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 Se=this._container;Se.classList.add("mapboxgl-map");var Je=this._missingCSSCanary=a.create("div","mapboxgl-canary",Se);Je.style.visibility="hidden",this._detectMissingCSS();var xt=this._canvasContainer=a.create("div","mapboxgl-canvas-container",Se);this._interactive&&xt.classList.add("mapboxgl-interactive"),this._canvas=a.create("canvas","mapboxgl-canvas",xt),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"),this._canvas.setAttribute("role","region");var At=this._containerDimensions();this._resizeCanvas(At[0],At[1]);var it=this._controlContainer=a.create("div","mapboxgl-control-container",Se),pt=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(function(Rt){pt[Rt]=a.create("div","mapboxgl-ctrl-"+Rt,it)}),this._container.addEventListener("scroll",this._onMapScroll,!1)},X.prototype._resizeCanvas=function(Se,Je){var xt=t.browser.devicePixelRatio||1;this._canvas.width=xt*Se,this._canvas.height=xt*Je,this._canvas.style.width=Se+"px",this._canvas.style.height=Je+"px"},X.prototype._setupPainter=function(){var Se=t.extend({},r.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),Je=this._canvas.getContext("webgl",Se)||this._canvas.getContext("experimental-webgl",Se);if(!Je){this.fire(new t.ErrorEvent(new Error("Failed to initialize WebGL")));return}this.painter=new Bs(Je,this.transform),t.webpSupported.testSupport(Je)},X.prototype._contextLost=function(Se){Se.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new t.Event("webglcontextlost",{originalEvent:Se}))},X.prototype._contextRestored=function(Se){this._setupPainter(),this.resize(),this._update(),this.fire(new t.Event("webglcontextrestored",{originalEvent:Se}))},X.prototype._onMapScroll=function(Se){if(Se.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},X.prototype.loaded=function(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()},X.prototype._update=function(Se){return this.style?(this._styleDirty=this._styleDirty||Se,this._sourcesDirty=!0,this.triggerRepaint(),this):this},X.prototype._requestRenderFrame=function(Se){return this._update(),this._renderTaskQueue.add(Se)},X.prototype._cancelRenderFrame=function(Se){this._renderTaskQueue.remove(Se)},X.prototype._render=function(Se){var Je=this,xt,At=0,it=this.painter.context.extTimerQuery;if(this.listens("gpu-timing-frame")&&(xt=it.createQueryEXT(),it.beginQueryEXT(it.TIME_ELAPSED_EXT,xt),At=t.browser.now()),this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(Se),!this._removed){var pt=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;var Rt=this.transform.zoom,or=t.browser.now();this.style.zoomHistory.update(Rt,or);var er=new t.EvaluationParameters(Rt,{now:or,fadeDuration:this._fadeDuration,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),ur=er.crossFadingFactor();(ur!==1||ur!==this._crossFadingFactor)&&(pt=!0,this._crossFadingFactor=ur),this.style.update(er)}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 t.Event("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new t.Event("load"))),this.style&&(this.style.hasTransitions()||pt)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),this.listens("gpu-timing-frame")){var gr=t.browser.now()-At;it.endQueryEXT(it.TIME_ELAPSED_EXT,xt),setTimeout(function(){var ar=it.getQueryObjectEXT(xt,it.QUERY_RESULT_EXT)/1e6;it.deleteQueryEXT(xt),Je.fire(new t.Event("gpu-timing-frame",{cpuTime:gr,gpuTime:ar}))},50)}if(this.listens("gpu-timing-layer")){var vr=this.painter.collectGpuTimers();setTimeout(function(){var ar=Je.painter.queryGpuTimers(vr);Je.fire(new t.Event("gpu-timing-layer",{layerTimes:ar}))},50)}var Zt=this._sourcesDirty||this._styleDirty||this._placementDirty;return Zt||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new t.Event("idle")),this._loaded&&!this._fullyLoaded&&!Zt&&(this._fullyLoaded=!0),this}},X.prototype.remove=function(){this._hash&&this._hash.remove();for(var Se=0,Je=this._controls;Se<Je.length;Se+=1){var xt=Je[Se];xt.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 t.window<"u"&&(t.window.removeEventListener("resize",this._onWindowResize,!1),t.window.removeEventListener("orientationchange",this._onWindowResize,!1),t.window.removeEventListener("online",this._onWindowOnline,!1));var At=this.painter.context.gl.getExtension("WEBGL_lose_context");At&&At.loseContext&&At.loseContext(),Xo(this._canvasContainer),Xo(this._controlContainer),Xo(this._missingCSSCanary),this._container.classList.remove("mapboxgl-map"),this._removed=!0,this.fire(new t.Event("remove"))},X.prototype.triggerRepaint=function(){var Se=this;this.style&&!this._frame&&(this._frame=t.browser.frame(function(Je){Se._frame=null,Se._render(Je)}))},X.prototype._onWindowOnline=function(){this._update()},X.prototype._onWindowResize=function(Se){this._trackResize&&this.resize({originalEvent:Se})._update()},ye.showTileBoundaries.get=function(){return!!this._showTileBoundaries},ye.showTileBoundaries.set=function(ne){this._showTileBoundaries!==ne&&(this._showTileBoundaries=ne,this._update())},ye.showPadding.get=function(){return!!this._showPadding},ye.showPadding.set=function(ne){this._showPadding!==ne&&(this._showPadding=ne,this._update())},ye.showCollisionBoxes.get=function(){return!!this._showCollisionBoxes},ye.showCollisionBoxes.set=function(ne){this._showCollisionBoxes!==ne&&(this._showCollisionBoxes=ne,ne?this.style._generateCollisionBoxes():this._update())},ye.showOverdrawInspector.get=function(){return!!this._showOverdrawInspector},ye.showOverdrawInspector.set=function(ne){this._showOverdrawInspector!==ne&&(this._showOverdrawInspector=ne,this._update())},ye.repaint.get=function(){return!!this._repaint},ye.repaint.set=function(ne){this._repaint!==ne&&(this._repaint=ne,this.triggerRepaint())},ye.vertices.get=function(){return!!this._vertices},ye.vertices.set=function(ne){this._vertices=ne,this._update()},X.prototype._setCacheLimits=function(Se,Je){t.setCacheLimits(Se,Je)},ye.version.get=function(){return t.version},Object.defineProperties(X.prototype,ye),X})(ra);function Xo(Me){Me.parentNode&&Me.parentNode.removeChild(Me)}var Vi={showCompass:!0,showZoom:!0,visualizePitch:!1},lo=function(X){var ye=this;this.options=t.extend({},Vi,X),this._container=a.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",function(ne){return ne.preventDefault()}),this.options.showZoom&&(t.bindAll(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("mapboxgl-ctrl-zoom-in",function(ne){return ye._map.zoomIn({},{originalEvent:ne})}),a.create("span","mapboxgl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden",!0),this._zoomOutButton=this._createButton("mapboxgl-ctrl-zoom-out",function(ne){return ye._map.zoomOut({},{originalEvent:ne})}),a.create("span","mapboxgl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden",!0)),this.options.showCompass&&(t.bindAll(["_rotateCompassArrow"],this),this._compass=this._createButton("mapboxgl-ctrl-compass",function(ne){ye.options.visualizePitch?ye._map.resetNorthPitch({},{originalEvent:ne}):ye._map.resetNorth({},{originalEvent:ne})}),this._compassIcon=a.create("span","mapboxgl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden",!0))};lo.prototype._updateZoomButtons=function(){var X=this._map.getZoom(),ye=X===this._map.getMaxZoom(),ne=X===this._map.getMinZoom();this._zoomInButton.disabled=ye,this._zoomOutButton.disabled=ne,this._zoomInButton.setAttribute("aria-disabled",ye.toString()),this._zoomOutButton.setAttribute("aria-disabled",ne.toString())},lo.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},lo.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 pi(this._map,this._compass,this.options.visualizePitch)),this._container},lo.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},lo.prototype._createButton=function(X,ye){var ne=a.create("button",X,this._container);return ne.type="button",ne.addEventListener("click",ye),ne},lo.prototype._setButtonTitle=function(X,ye){var ne=this._map._getUIString("NavigationControl."+ye);X.title=ne,X.setAttribute("aria-label",ne)};var pi=function(X,ye,ne){ne===void 0&&(ne=!1),this._clickTolerance=10,this.element=ye,this.mouseRotate=new il({clickTolerance:X.dragRotate._mouseRotate._clickTolerance}),this.map=X,ne&&(this.mousePitch=new Wo({clickTolerance:X.dragRotate._mousePitch._clickTolerance})),t.bindAll(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend","reset"],this),a.addEventListener(ye,"mousedown",this.mousedown),a.addEventListener(ye,"touchstart",this.touchstart,{passive:!1}),a.addEventListener(ye,"touchmove",this.touchmove),a.addEventListener(ye,"touchend",this.touchend),a.addEventListener(ye,"touchcancel",this.reset)};pi.prototype.down=function(X,ye){this.mouseRotate.mousedown(X,ye),this.mousePitch&&this.mousePitch.mousedown(X,ye),a.disableDrag()},pi.prototype.move=function(X,ye){var ne=this.map,Se=this.mouseRotate.mousemoveWindow(X,ye);if(Se&&Se.bearingDelta&&ne.setBearing(ne.getBearing()+Se.bearingDelta),this.mousePitch){var Je=this.mousePitch.mousemoveWindow(X,ye);Je&&Je.pitchDelta&&ne.setPitch(ne.getPitch()+Je.pitchDelta)}},pi.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()},pi.prototype.offTemp=function(){a.enableDrag(),a.removeEventListener(t.window,"mousemove",this.mousemove),a.removeEventListener(t.window,"mouseup",this.mouseup)},pi.prototype.mousedown=function(X){this.down(t.extend({},X,{ctrlKey:!0,preventDefault:function(){return X.preventDefault()}}),a.mousePos(this.element,X)),a.addEventListener(t.window,"mousemove",this.mousemove),a.addEventListener(t.window,"mouseup",this.mouseup)},pi.prototype.mousemove=function(X){this.move(X,a.mousePos(this.element,X))},pi.prototype.mouseup=function(X){this.mouseRotate.mouseupWindow(X),this.mousePitch&&this.mousePitch.mouseupWindow(X),this.offTemp()},pi.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))},pi.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))},pi.prototype.touchend=function(X){X.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),this.reset()},pi.prototype.reset=function(){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()};function Uo(Me,X,ye){if(Me=new t.LngLat(Me.lng,Me.lat),X){var ne=new t.LngLat(Me.lng-360,Me.lat),Se=new t.LngLat(Me.lng+360,Me.lat),Je=ye.locationPoint(Me).distSqr(X);ye.locationPoint(ne).distSqr(X)<Je?Me=ne:ye.locationPoint(Se).distSqr(X)<Je&&(Me=Se)}for(;Math.abs(Me.lng-ye.center.lng)>180;){var xt=ye.locationPoint(Me);if(xt.x>=0&&xt.y>=0&&xt.x<=ye.width&&xt.y<=ye.height)break;Me.lng>ye.center.lng?Me.lng-=360:Me.lng+=360}return Me}var ns={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 ds(Me,X,ye){var ne=Me.classList;for(var Se in ns)ne.remove("mapboxgl-"+ye+"-anchor-"+Se);ne.add("mapboxgl-"+ye+"-anchor-"+X)}var wl=(function(Me){function X(ye,ne){if(Me.call(this),(ye instanceof t.window.HTMLElement||ne)&&(ye=t.extend({element:ye},ne)),t.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=ye&&ye.anchor||"center",this._color=ye&&ye.color||"#3FB1CE",this._scale=ye&&ye.scale||1,this._draggable=ye&&ye.draggable||!1,this._clickTolerance=ye&&ye.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=ye&&ye.rotation||0,this._rotationAlignment=ye&&ye.rotationAlignment||"auto",this._pitchAlignment=ye&&ye.pitchAlignment&&ye.pitchAlignment!=="auto"?ye.pitchAlignment:this._rotationAlignment,!ye||!ye.element){this._defaultMarker=!0,this._element=a.create("div"),this._element.setAttribute("aria-label","Map marker");var Se=a.createNS("http://www.w3.org/2000/svg","svg"),Je=41,xt=27;Se.setAttributeNS(null,"display","block"),Se.setAttributeNS(null,"height",Je+"px"),Se.setAttributeNS(null,"width",xt+"px"),Se.setAttributeNS(null,"viewBox","0 0 "+xt+" "+Je);var At=a.createNS("http://www.w3.org/2000/svg","g");At.setAttributeNS(null,"stroke","none"),At.setAttributeNS(null,"stroke-width","1"),At.setAttributeNS(null,"fill","none"),At.setAttributeNS(null,"fill-rule","evenodd");var it=a.createNS("http://www.w3.org/2000/svg","g");it.setAttributeNS(null,"fill-rule","nonzero");var pt=a.createNS("http://www.w3.org/2000/svg","g");pt.setAttributeNS(null,"transform","translate(3.0, 29.0)"),pt.setAttributeNS(null,"fill","#000000");for(var Rt=[{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"}],or=0,er=Rt;or<er.length;or+=1){var ur=er[or],gr=a.createNS("http://www.w3.org/2000/svg","ellipse");gr.setAttributeNS(null,"opacity","0.04"),gr.setAttributeNS(null,"cx","10.5"),gr.setAttributeNS(null,"cy","5.80029008"),gr.setAttributeNS(null,"rx",ur.rx),gr.setAttributeNS(null,"ry",ur.ry),pt.appendChild(gr)}var vr=a.createNS("http://www.w3.org/2000/svg","g");vr.setAttributeNS(null,"fill",this._color);var Zt=a.createNS("http://www.w3.org/2000/svg","path");Zt.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"),vr.appendChild(Zt);var ar=a.createNS("http://www.w3.org/2000/svg","g");ar.setAttributeNS(null,"opacity","0.25"),ar.setAttributeNS(null,"fill","#000000");var tr=a.createNS("http://www.w3.org/2000/svg","path");tr.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"),ar.appendChild(tr);var Zr=a.createNS("http://www.w3.org/2000/svg","g");Zr.setAttributeNS(null,"transform","translate(6.0, 7.0)"),Zr.setAttributeNS(null,"fill","#FFFFFF");var un=a.createNS("http://www.w3.org/2000/svg","g");un.setAttributeNS(null,"transform","translate(8.0, 8.0)");var En=a.createNS("http://www.w3.org/2000/svg","circle");En.setAttributeNS(null,"fill","#000000"),En.setAttributeNS(null,"opacity","0.25"),En.setAttributeNS(null,"cx","5.5"),En.setAttributeNS(null,"cy","5.5"),En.setAttributeNS(null,"r","5.4999962");var ka=a.createNS("http://www.w3.org/2000/svg","circle");ka.setAttributeNS(null,"fill","#FFFFFF"),ka.setAttributeNS(null,"cx","5.5"),ka.setAttributeNS(null,"cy","5.5"),ka.setAttributeNS(null,"r","5.4999962"),un.appendChild(En),un.appendChild(ka),it.appendChild(pt),it.appendChild(vr),it.appendChild(ar),it.appendChild(Zr),it.appendChild(un),Se.appendChild(it),Se.setAttributeNS(null,"height",Je*this._scale+"px"),Se.setAttributeNS(null,"width",xt*this._scale+"px"),this._element.appendChild(Se),this._offset=t.Point.convert(ye&&ye.offset||[0,-14])}else this._element=ye.element,this._offset=t.Point.convert(ye&&ye.offset||[0,0]);this._element.classList.add("mapboxgl-marker"),this._element.addEventListener("dragstart",function(ma){ma.preventDefault()}),this._element.addEventListener("mousedown",function(ma){ma.preventDefault()}),ds(this._element,this._anchor,"marker"),this._popup=null}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.addTo=function(ne){return this.remove(),this._map=ne,ne.getCanvasContainer().appendChild(this._element),ne.on("move",this._update),ne.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(ne){return this._lngLat=t.LngLat.convert(ne),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this},X.prototype.getElement=function(){return this._element},X.prototype.setPopup=function(ne){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),ne){if(!("offset"in ne.options)){var Se=38.1,Je=13.5,xt=Math.sqrt(Math.pow(Je,2)/2);ne.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-Se],"bottom-left":[xt,(Se-Je+xt)*-1],"bottom-right":[-xt,(Se-Je+xt)*-1],left:[Je,(Se-Je)*-1],right:[-Je,(Se-Je)*-1]}:this._offset}this._popup=ne,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(ne){var Se=ne.code,Je=ne.charCode||ne.keyCode;(Se==="Space"||Se==="Enter"||Je===32||Je===13)&&this.togglePopup()},X.prototype._onMapClick=function(ne){var Se=ne.originalEvent.target,Je=this._element;this._popup&&(Se===Je||Je.contains(Se))&&this.togglePopup()},X.prototype.getPopup=function(){return this._popup},X.prototype.togglePopup=function(){var ne=this._popup;if(ne)ne.isOpen()?ne.remove():ne.addTo(this._map);else return this;return this},X.prototype._update=function(ne){if(this._map){this._map.transform.renderWorldCopies&&(this._lngLat=Uo(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset);var Se="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?Se="rotateZ("+this._rotation+"deg)":this._rotationAlignment==="map"&&(Se="rotateZ("+(this._rotation-this._map.getBearing())+"deg)");var Je="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?Je="rotateX(0deg)":this._pitchAlignment==="map"&&(Je="rotateX("+this._map.getPitch()+"deg)"),(!ne||ne.type==="moveend")&&(this._pos=this._pos.round()),a.setTransform(this._element,ns[this._anchor]+" translate("+this._pos.x+"px, "+this._pos.y+"px) "+Je+" "+Se)}},X.prototype.getOffset=function(){return this._offset},X.prototype.setOffset=function(ne){return this._offset=t.Point.convert(ne),this._update(),this},X.prototype._onMove=function(ne){if(!this._isDragging){var Se=this._clickTolerance||this._map._clickTolerance;this._isDragging=ne.point.dist(this._pointerdownPos)>=Se}this._isDragging&&(this._pos=ne.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 t.Event("dragstart"))),this.fire(new t.Event("drag")))},X.prototype._onUp=function(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new t.Event("dragend")),this._state="inactive"},X.prototype._addDragHandler=function(ne){this._element.contains(ne.originalEvent.target)&&(ne.preventDefault(),this._positionDelta=ne.point.sub(this._pos).add(this._offset),this._pointerdownPos=ne.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},X.prototype.setDraggable=function(ne){return this._draggable=!!ne,this._map&&(ne?(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(ne){return this._rotation=ne||0,this._update(),this},X.prototype.getRotation=function(){return this._rotation},X.prototype.setRotationAlignment=function(ne){return this._rotationAlignment=ne||"auto",this._update(),this},X.prototype.getRotationAlignment=function(){return this._rotationAlignment},X.prototype.setPitchAlignment=function(ne){return this._pitchAlignment=ne&&ne!=="auto"?ne:this._rotationAlignment,this._update(),this},X.prototype.getPitchAlignment=function(){return this._pitchAlignment},X})(t.Evented),vs={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},zu;function cl(Me){zu!==void 0?Me(zu):t.window.navigator.permissions!==void 0?t.window.navigator.permissions.query({name:"geolocation"}).then(function(X){zu=X.state!=="denied",Me(zu)}):(zu=!!t.window.navigator.geolocation,Me(zu))}var Mu=0,Zu=!1,uc=(function(Me){function X(ye){Me.call(this),this.options=t.extend({},vs,ye),t.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.onAdd=function(ne){return this._map=ne,this._container=a.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),cl(this._setupUI),this._container},X.prototype.onRemove=function(){this._geolocationWatchID!==void 0&&(t.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,Mu=0,Zu=!1},X.prototype._isOutOfMapMaxBounds=function(ne){var Se=this._map.getMaxBounds(),Je=ne.coords;return Se&&(Je.longitude<Se.getWest()||Je.longitude>Se.getEast()||Je.latitude<Se.getSouth()||Je.latitude>Se.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(ne){if(this._map){if(this._isOutOfMapMaxBounds(ne)){this._setErrorState(),this.fire(new t.Event("outofmaxbounds",ne)),this._updateMarker(),this._finish();return}if(this.options.trackUserLocation)switch(this._lastKnownPosition=ne,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(ne),(!this.options.trackUserLocation||this._watchState==="ACTIVE_LOCK")&&this._updateCamera(ne),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new t.Event("geolocate",ne)),this._finish()}},X.prototype._updateCamera=function(ne){var Se=new t.LngLat(ne.coords.longitude,ne.coords.latitude),Je=ne.coords.accuracy,xt=this._map.getBearing(),At=t.extend({bearing:xt},this.options.fitBoundsOptions);this._map.fitBounds(Se.toBounds(Je),At,{geolocateSource:!0})},X.prototype._updateMarker=function(ne){if(ne){var Se=new t.LngLat(ne.coords.longitude,ne.coords.latitude);this._accuracyCircleMarker.setLngLat(Se).addTo(this._map),this._userLocationDotMarker.setLngLat(Se).addTo(this._map),this._accuracy=ne.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},X.prototype._updateCircleRadius=function(){var ne=this._map._container.clientHeight/2,Se=this._map.unproject([0,ne]),Je=this._map.unproject([1,ne]),xt=Se.distanceTo(Je),At=Math.ceil(2*this._accuracy/xt);this._circleElement.style.width=At+"px",this._circleElement.style.height=At+"px"},X.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},X.prototype._onError=function(ne){if(this._map){if(this.options.trackUserLocation)if(ne.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 Se=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=Se,this._geolocateButton.setAttribute("aria-label",Se),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(ne.code===3&&Zu)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new t.Event("error",ne)),this._finish()}},X.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},X.prototype._setupUI=function(ne){var Se=this;if(this._container.addEventListener("contextmenu",function(At){return At.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",ne===!1){t.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var Je=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=Je,this._geolocateButton.setAttribute("aria-label",Je)}else{var xt=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=xt,this._geolocateButton.setAttribute("aria-label",xt)}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 wl(this._dotElement),this._circleElement=a.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new wl({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(At){var it=At.originalEvent&&At.originalEvent.type==="resize";!At.geolocateSource&&Se._watchState==="ACTIVE_LOCK"&&!it&&(Se._watchState="BACKGROUND",Se._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),Se._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),Se.fire(new t.Event("trackuserlocationend")))})},X.prototype.trigger=function(){if(!this._setup)return t.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 t.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Mu--,Zu=!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 t.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 t.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"),Mu++;var ne;Mu>1?(ne={maximumAge:6e5,timeout:0},Zu=!0):(ne=this.options.positionOptions,Zu=!1),this._geolocationWatchID=t.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,ne)}}else t.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},X.prototype._clearWatch=function(){t.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})(t.Evented),kf={maxWidth:100,unit:"metric"},hu=function(X){this.options=t.extend({},kf,X),t.bindAll(["_onMove","setUnit"],this)};hu.prototype.getDefaultPosition=function(){return"bottom-left"},hu.prototype._onMove=function(){wu(this._map,this._container,this.options)},hu.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},hu.prototype.onRemove=function(){a.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},hu.prototype.setUnit=function(X){this.options.unit=X,wu(this._map,this._container,this.options)};function wu(Me,X,ye){var ne=ye&&ye.maxWidth||100,Se=Me._container.clientHeight/2,Je=Me.unproject([0,Se]),xt=Me.unproject([ne,Se]),At=Je.distanceTo(xt);if(ye&&ye.unit==="imperial"){var it=3.2808*At;if(it>5280){var pt=it/5280;Ro(X,ne,pt,Me._getUIString("ScaleControl.Miles"))}else Ro(X,ne,it,Me._getUIString("ScaleControl.Feet"))}else if(ye&&ye.unit==="nautical"){var Rt=At/1852;Ro(X,ne,Rt,Me._getUIString("ScaleControl.NauticalMiles"))}else At>=1e3?Ro(X,ne,At/1e3,Me._getUIString("ScaleControl.Kilometers")):Ro(X,ne,At,Me._getUIString("ScaleControl.Meters"))}function Ro(Me,X,ye,ne){var Se=Js(ye),Je=Se/ye;Me.style.width=X*Je+"px",Me.innerHTML=Se+"&nbsp;"+ne}function cc(Me){var X=Math.pow(10,Math.ceil(-Math.log(Me)/Math.LN10));return Math.round(Me*X)/X}function Js(Me){var X=Math.pow(10,(""+Math.floor(Me)).length-1),ye=Me/X;return ye=ye>=10?10:ye>=5?5:ye>=3?3:ye>=2?2:ye>=1?1:cc(ye),X*ye}var Zl=function(X){this._fullscreen=!1,X&&X.container&&(X.container instanceof t.window.HTMLElement?this._container=X.container:t.warnOnce("Full screen control 'container' must be a DOM element.")),t.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in t.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in t.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in t.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in t.window.document&&(this._fullscreenchange="MSFullscreenChange")};Zl.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",t.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},Zl.prototype.onRemove=function(){a.remove(this._controlContainer),this._map=null,t.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},Zl.prototype._checkFullscreenSupport=function(){return!!(t.window.document.fullscreenEnabled||t.window.document.mozFullScreenEnabled||t.window.document.msFullscreenEnabled||t.window.document.webkitFullscreenEnabled)},Zl.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),t.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},Zl.prototype._updateTitle=function(){var X=this._getTitle();this._fullscreenButton.setAttribute("aria-label",X),this._fullscreenButton.title=X},Zl.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},Zl.prototype._isFullscreen=function(){return this._fullscreen},Zl.prototype._changeIcon=function(){var X=t.window.document.fullscreenElement||t.window.document.mozFullScreenElement||t.window.document.webkitFullscreenElement||t.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())},Zl.prototype._onClickFullscreen=function(){this._isFullscreen()?t.window.document.exitFullscreen?t.window.document.exitFullscreen():t.window.document.mozCancelFullScreen?t.window.document.mozCancelFullScreen():t.window.document.msExitFullscreen?t.window.document.msExitFullscreen():t.window.document.webkitCancelFullScreen&&t.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 bc={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},wc=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),Go=(function(Me){function X(ye){Me.call(this),this.options=t.extend(Object.create(bc),ye),t.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.addTo=function(ne){return this._map&&this.remove(),this._map=ne,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")):this._map.on("move",this._update),this.fire(new t.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 t.Event("close")),this},X.prototype.getLngLat=function(){return this._lngLat},X.prototype.setLngLat=function(ne){return this._lngLat=t.LngLat.convert(ne),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(ne){return this.setDOMContent(t.window.document.createTextNode(ne))},X.prototype.setHTML=function(ne){var Se=t.window.document.createDocumentFragment(),Je=t.window.document.createElement("body"),xt;for(Je.innerHTML=ne;xt=Je.firstChild,!!xt;)Se.appendChild(xt);return this.setDOMContent(Se)},X.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},X.prototype.setMaxWidth=function(ne){return this.options.maxWidth=ne,this._update(),this},X.prototype.setDOMContent=function(ne){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=a.create("div","mapboxgl-popup-content",this._container);return this._content.appendChild(ne),this._createCloseButton(),this._update(),this._focusFirstElement(),this},X.prototype.addClassName=function(ne){this._container&&this._container.classList.add(ne)},X.prototype.removeClassName=function(ne){this._container&&this._container.classList.remove(ne)},X.prototype.setOffset=function(ne){return this.options.offset=ne,this._update(),this},X.prototype.toggleClassName=function(ne){if(this._container)return this._container.classList.toggle(ne)},X.prototype._createCloseButton=function(){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(ne){this._update(ne.point)},X.prototype._onMouseMove=function(ne){this._update(ne.point)},X.prototype._onDrag=function(ne){this._update(ne.point)},X.prototype._update=function(ne){var Se=this,Je=this._lngLat||this._trackPointer;if(!(!this._map||!Je||!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(ur){return Se._container.classList.add(ur)}),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=Uo(this._lngLat,this._pos,this._map.transform)),!(this._trackPointer&&!ne))){var xt=this._pos=this._trackPointer&&ne?ne:this._map.project(this._lngLat),At=this.options.anchor,it=Ms(this.options.offset);if(!At){var pt=this._container.offsetWidth,Rt=this._container.offsetHeight,or;xt.y+it.bottom.y<Rt?or=["top"]:xt.y>this._map.transform.height-Rt?or=["bottom"]:or=[],xt.x<pt/2?or.push("left"):xt.x>this._map.transform.width-pt/2&&or.push("right"),or.length===0?At="bottom":At=or.join("-")}var er=xt.add(it[At]).round();a.setTransform(this._container,ns[At]+" translate("+er.x+"px,"+er.y+"px)"),ds(this._container,At,"popup")}},X.prototype._focusFirstElement=function(){if(!(!this.options.focusAfterOpen||!this._container)){var ne=this._container.querySelector(wc);ne&&ne.focus()}},X.prototype._onClose=function(){this.remove()},X})(t.Evented);function Ms(Me){if(Me)if(typeof Me=="number"){var X=Math.round(Math.sqrt(.5*Math.pow(Me,2)));return{center:new t.Point(0,0),top:new t.Point(0,Me),"top-left":new t.Point(X,X),"top-right":new t.Point(-X,X),bottom:new t.Point(0,-Me),"bottom-left":new t.Point(X,-X),"bottom-right":new t.Point(-X,-X),left:new t.Point(Me,0),right:new t.Point(-Me,0)}}else if(Me instanceof t.Point||Array.isArray(Me)){var ye=t.Point.convert(Me);return{center:ye,top:ye,"top-left":ye,"top-right":ye,bottom:ye,"bottom-left":ye,"bottom-right":ye,left:ye,right:ye}}else return{center:t.Point.convert(Me.center||[0,0]),top:t.Point.convert(Me.top||[0,0]),"top-left":t.Point.convert(Me["top-left"]||[0,0]),"top-right":t.Point.convert(Me["top-right"]||[0,0]),bottom:t.Point.convert(Me.bottom||[0,0]),"bottom-left":t.Point.convert(Me["bottom-left"]||[0,0]),"bottom-right":t.Point.convert(Me["bottom-right"]||[0,0]),left:t.Point.convert(Me.left||[0,0]),right:t.Point.convert(Me.right||[0,0])};else return Ms(new t.Point(0,0))}var Rs={version:t.version,supported:r,setRTLTextPlugin:t.setRTLTextPlugin,getRTLTextPluginStatus:t.getRTLTextPluginStatus,Map:no,NavigationControl:lo,GeolocateControl:uc,AttributionControl:wa,ScaleControl:hu,FullscreenControl:Zl,Popup:Go,Marker:wl,Style:ac,LngLat:t.LngLat,LngLatBounds:t.LngLatBounds,Point:t.Point,MercatorCoordinate:t.MercatorCoordinate,Evented:t.Evented,config:t.config,prewarm:Yi,clearPrewarmedResources:Ht,get accessToken(){return t.config.ACCESS_TOKEN},set accessToken(Me){t.config.ACCESS_TOKEN=Me},get baseApiUrl(){return t.config.API_URL},set baseApiUrl(Me){t.config.API_URL=Me},get workerCount(){return Ba.workerCount},set workerCount(Me){Ba.workerCount=Me},get maxParallelImageRequests(){return t.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(Me){t.config.MAX_PARALLEL_IMAGE_REQUESTS=Me},clearStorage:function(X){t.clearTileCache(X)},workerUrl:""};return Rs}),C})}}),fte=Ne({"src/plots/mapbox/layers.js"(te,Z){var v=In(),w=hc().sanitizeHTML,C=sF(),P=R_();function t(s,o){this.subplot=s,this.uid=s.uid+"-"+o,this.index=o,this.idSource="source-"+this.uid,this.idLayer=P.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var r=t.prototype;r.update=function(o){this.visible?this.needsNewImage(o)?this.updateImage(o):this.needsNewSource(o)?(this.removeLayer(),this.updateSource(o),this.updateLayer(o)):this.needsNewLayer(o)?this.updateLayer(o):this.updateStyle(o):(this.updateSource(o),this.updateLayer(o)),this.visible=a(o)},r.needsNewImage=function(s){var o=this.subplot.map;return o.getSource(this.idSource)&&this.sourceType==="image"&&s.sourcetype==="image"&&(this.source!==s.source||JSON.stringify(this.coordinates)!==JSON.stringify(s.coordinates))},r.needsNewSource=function(s){return this.sourceType!==s.sourcetype||JSON.stringify(this.source)!==JSON.stringify(s.source)||this.layerType!==s.type},r.needsNewLayer=function(s){return this.layerType!==s.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},r.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},r.updateImage=function(s){var o=this.subplot.map;o.getSource(this.idSource).updateImage({url:s.source,coordinates:s.coordinates});var u=this.findFollowingMapboxLayerId(this.lookupBelow());u!==null&&this.subplot.map.moveLayer(this.idLayer,u)},r.updateSource=function(s){var o=this.subplot.map;if(o.getSource(this.idSource)&&o.removeSource(this.idSource),this.sourceType=s.sourcetype,this.source=s.source,!!a(s)){var u=i(s);o.addSource(this.idSource,u)}},r.findFollowingMapboxLayerId=function(s){if(s==="traces")for(var o=this.subplot.getMapLayers(),u=0;u<o.length;u++){var d=o[u].id;if(typeof d=="string"&&d.indexOf(P.traceLayerPrefix)===0){s=d;break}}return s},r.updateLayer=function(s){var o=this.subplot,u=l(s),d=this.lookupBelow(),h=this.findFollowingMapboxLayerId(d);this.removeLayer(),a(s)&&o.addLayer({id:this.idLayer,source:this.idSource,"source-layer":s.sourcelayer||"",type:s.type,minzoom:s.minzoom,maxzoom:s.maxzoom,layout:u.layout,paint:u.paint},h),this.layerType=s.type,this.below=d},r.updateStyle=function(s){if(a(s)){var o=l(s);this.subplot.setOptions(this.idLayer,"setLayoutProperty",o.layout),this.subplot.setOptions(this.idLayer,"setPaintProperty",o.paint)}},r.removeLayer=function(){var s=this.subplot.map;s.getLayer(this.idLayer)&&s.removeLayer(this.idLayer)},r.dispose=function(){var s=this.subplot.map;s.getLayer(this.idLayer)&&s.removeLayer(this.idLayer),s.getSource(this.idSource)&&s.removeSource(this.idSource)};function a(s){if(!s.visible)return!1;var o=s.source;if(Array.isArray(o)&&o.length>0){for(var u=0;u<o.length;u++)if(typeof o[u]!="string"||o[u].length===0)return!1;return!0}return v.isPlainObject(o)||typeof o=="string"&&o.length>0}function l(s){var o={},u={};switch(s.type){case"circle":v.extendFlat(u,{"circle-radius":s.circle.radius,"circle-color":s.color,"circle-opacity":s.opacity});break;case"line":v.extendFlat(u,{"line-width":s.line.width,"line-color":s.color,"line-opacity":s.opacity,"line-dasharray":s.line.dash});break;case"fill":v.extendFlat(u,{"fill-color":s.color,"fill-outline-color":s.fill.outlinecolor,"fill-opacity":s.opacity});break;case"symbol":var d=s.symbol,h=C(d.textposition,d.iconsize);v.extendFlat(o,{"icon-image":d.icon+"-15","icon-size":d.iconsize/10,"text-field":d.text,"text-size":d.textfont.size,"text-anchor":h.anchor,"text-offset":h.offset,"symbol-placement":d.placement}),v.extendFlat(u,{"icon-color":s.color,"text-color":d.textfont.color,"text-opacity":s.opacity});break;case"raster":v.extendFlat(u,{"raster-fade-duration":0,"raster-opacity":s.opacity});break}return{layout:o,paint:u}}function i(s){var o=s.sourcetype,u=s.source,d={type:o},h;return o==="geojson"?h="data":o==="vector"?h=typeof u=="string"?"url":"tiles":o==="raster"?(h="tiles",d.tileSize=256):o==="image"&&(h="url",d.coordinates=s.coordinates),d[h]=u,s.sourceattribution&&(d.attribution=w(s.sourceattribution)),d}Z.exports=function(o,u,d){var h=new t(o,u);return h.update(d),h}}}),hte=Ne({"src/plots/mapbox/mapbox.js"(te,Z){var v=lF(),w=In(),C=Ob(),P=Yo(),t=Os(),r=Uv(),a=oh(),l=Pm(),i=l.drawMode,s=l.selectMode,o=dh().prepSelect,u=dh().clearOutline,d=dh().clearSelectionsCache,h=dh().selectOnClick,g=R_(),m=fte();function E(b,A){this.id=A,this.gd=b;var y=b._fullLayout,f=b._context;this.container=y._glcontainer.node(),this.isStatic=f.staticPlot,this.uid=y._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(y),this.map=null,this.accessToken=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var c=E.prototype;c.plot=function(b,A,y){var f=this,p=A[f.id];f.map&&p.accesstoken!==f.accessToken&&(f.map.remove(),f.map=null,f.styleObj=null,f.traceHash={},f.layerList=[]);var x;f.map?x=new Promise(function(N,D){f.updateMap(b,A,N,D)}):x=new Promise(function(N,D){f.createMap(b,A,N,D)}),y.push(x)},c.createMap=function(b,A,y,f){var p=this,x=A[p.id],N=p.styleObj=T(x.style,A);p.accessToken=x.accesstoken;var D=x.bounds,B=D?[[D.west,D.south],[D.east,D.north]]:null,U=p.map=new v.Map({container:p.div,style:N.style,center:k(x.center),zoom:x.zoom,bearing:x.bearing,pitch:x.pitch,maxBounds:B,interactive:!p.isStatic,preserveDrawingBuffer:p.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new v.AttributionControl({compact:!0}));U._canvas.style.left="0px",U._canvas.style.top="0px",p.rejectOnError(f),p.isStatic||p.initFx(b,A);var V=[];V.push(new Promise(function(q){U.once("load",q)})),V=V.concat(C.fetchTraceGeoData(b)),Promise.all(V).then(function(){p.fillBelowLookup(b,A),p.updateData(b),p.updateLayout(A),p.resolveOnRender(y)}).catch(f)},c.updateMap=function(b,A,y,f){var p=this,x=p.map,N=A[this.id];p.rejectOnError(f);var D=[],B=T(N.style,A);JSON.stringify(p.styleObj)!==JSON.stringify(B)&&(p.styleObj=B,x.setStyle(B.style),p.traceHash={},D.push(new Promise(function(U){x.once("styledata",U)}))),D=D.concat(C.fetchTraceGeoData(b)),Promise.all(D).then(function(){p.fillBelowLookup(b,A),p.updateData(b),p.updateLayout(A),p.resolveOnRender(y)}).catch(f)},c.fillBelowLookup=function(b,A){var y=A[this.id],f=y.layers,p,x,N=this.belowLookup={},D=!1;for(p=0;p<b.length;p++){var B=b[p][0].trace,U=B._module;typeof B.below=="string"?x=B.below:U.getBelow&&(x=U.getBelow(B,this)),x===""&&(D=!0),N["trace-"+B.uid]=x||""}for(p=0;p<f.length;p++){var V=f[p];typeof V.below=="string"?x=V.below:D?x="traces":x="",N["layout-"+p]=x}var q={},z,H;for(z in N)x=N[z],q[x]?q[x].push(z):q[x]=[z];for(x in q){var G=q[x];if(G.length>1)for(p=0;p<G.length;p++)z=G[p],z.indexOf("trace-")===0?(H=z.split("trace-")[1],this.traceHash[H]&&(this.traceHash[H].below=null)):z.indexOf("layout-")===0&&(H=z.split("layout-")[1],this.layerList[H]&&(this.layerList[H].below=null))}};var _={choroplethmapbox:0,densitymapbox:1,scattermapbox:2};c.updateData=function(b){var A=this.traceHash,y,f,p,x,N=b.slice().sort(function(q,z){return _[q[0].trace.type]-_[z[0].trace.type]});for(p=0;p<N.length;p++){var D=N[p];f=D[0].trace,y=A[f.uid];var B=!1;y&&(y.type===f.type?(y.update(D),B=!0):y.dispose()),!B&&f._module&&(A[f.uid]=f._module.plot(this,D))}var U=Object.keys(A);e:for(p=0;p<U.length;p++){var V=U[p];for(x=0;x<b.length;x++)if(f=b[x][0].trace,V===f.uid)continue e;y=A[V],y.dispose(),delete A[V]}},c.updateLayout=function(b){var A=this.map,y=b[this.id];!this.dragging&&!this.wheeling&&(A.setCenter(k(y.center)),A.setZoom(y.zoom),A.setBearing(y.bearing),A.setPitch(y.pitch)),this.updateLayers(b),this.updateFramework(b),this.updateFx(b),this.map.resize(),this.gd._context._scrollZoom.mapbox?A.scrollZoom.enable():A.scrollZoom.disable()},c.resolveOnRender=function(b){var A=this.map;A.on("render",function y(){A.loaded()&&(A.off("render",y),setTimeout(b,10))})},c.rejectOnError=function(b){var A=this.map;function y(){b(new Error(g.mapOnErrorMsg))}A.once("error",y),A.once("style.error",y),A.once("source.error",y),A.once("tile.error",y),A.once("layer.error",y)},c.createFramework=function(b){var A=this,y=A.div=document.createElement("div");y.id=A.uid,y.style.position="absolute",A.container.appendChild(y),A.xaxis={_id:"x",c2p:function(f){return A.project(f).x}},A.yaxis={_id:"y",c2p:function(f){return A.project(f).y}},A.updateFramework(b),A.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},t.setConvert(A.mockAxis,b)},c.initFx=function(b,A){var y=this,f=y.gd,p=y.map;p.on("moveend",function(D){if(y.map){var B=f._fullLayout;if(D.originalEvent||y.wheeling){var U=B[y.id];P.call("_storeDirectGUIEdit",f.layout,B._preGUI,y.getViewEdits(U));var V=y.getView();U._input.center=U.center=V.center,U._input.zoom=U.zoom=V.zoom,U._input.bearing=U.bearing=V.bearing,U._input.pitch=U.pitch=V.pitch,f.emit("plotly_relayout",y.getViewEditsWithDerived(V))}D.originalEvent&&D.originalEvent.type==="mouseup"?y.dragging=!1:y.wheeling&&(y.wheeling=!1),B._rehover&&B._rehover()}}),p.on("wheel",function(){y.wheeling=!0}),p.on("mousemove",function(D){var B=y.div.getBoundingClientRect(),U=[D.originalEvent.offsetX,D.originalEvent.offsetY];D.target.getBoundingClientRect=function(){return B},y.xaxis.p2c=function(){return p.unproject(U).lng},y.yaxis.p2c=function(){return p.unproject(U).lat},f._fullLayout._rehover=function(){f._fullLayout._hoversubplot===y.id&&f._fullLayout[y.id]&&a.hover(f,D,y.id)},a.hover(f,D,y.id),f._fullLayout._hoversubplot=y.id});function x(){a.loneUnhover(A._hoverlayer)}p.on("dragstart",function(){y.dragging=!0,x()}),p.on("zoomstart",x),p.on("mouseout",function(){f._fullLayout._hoversubplot=null});function N(){var D=y.getView();f.emit("plotly_relayouting",y.getViewEditsWithDerived(D))}p.on("drag",N),p.on("zoom",N),p.on("dblclick",function(){var D=f._fullLayout[y.id];P.call("_storeDirectGUIEdit",f.layout,f._fullLayout._preGUI,y.getViewEdits(D));var B=y.viewInitial;p.setCenter(k(B.center)),p.setZoom(B.zoom),p.setBearing(B.bearing),p.setPitch(B.pitch);var U=y.getView();D._input.center=D.center=U.center,D._input.zoom=D.zoom=U.zoom,D._input.bearing=D.bearing=U.bearing,D._input.pitch=D.pitch=U.pitch,f.emit("plotly_doubleclick",null),f.emit("plotly_relayout",y.getViewEditsWithDerived(U))}),y.clearOutline=function(){d(y.dragOptions),u(y.dragOptions.gd)},y.onClickInPanFn=function(D){return function(B){var U=f._fullLayout.clickmode;U.indexOf("select")>-1&&h(B.originalEvent,f,[y.xaxis],[y.yaxis],y.id,D),U.indexOf("event")>-1&&a.click(f,B.originalEvent)}}},c.updateFx=function(b){var A=this,y=A.map,f=A.gd;if(A.isStatic)return;function p(B){var U=A.map.unproject(B);return[U.lng,U.lat]}var x=b.dragmode,N;N=function(B,U){if(U.isRect){var V=B.range={};V[A.id]=[p([U.xmin,U.ymin]),p([U.xmax,U.ymax])]}else{var q=B.lassoPoints={};q[A.id]=U.map(p)}};var D=A.dragOptions;A.dragOptions=w.extendDeep(D||{},{dragmode:b.dragmode,element:A.div,gd:f,plotinfo:{id:A.id,domain:b[A.id].domain,xaxis:A.xaxis,yaxis:A.yaxis,fillRangeItems:N},xaxes:[A.xaxis],yaxes:[A.yaxis],subplot:A.id}),y.off("click",A.onClickInPanHandler),s(x)||i(x)?(y.dragPan.disable(),y.on("zoomstart",A.clearOutline),A.dragOptions.prepFn=function(B,U,V){o(B,U,V,A.dragOptions,x)},r.init(A.dragOptions)):(y.dragPan.enable(),y.off("zoomstart",A.clearOutline),A.div.onmousedown=null,A.div.ontouchstart=null,A.div.removeEventListener("touchstart",A.div._ontouchstart),A.onClickInPanHandler=A.onClickInPanFn(A.dragOptions),y.on("click",A.onClickInPanHandler))},c.updateFramework=function(b){var A=b[this.id].domain,y=b._size,f=this.div.style;f.width=y.w*(A.x[1]-A.x[0])+"px",f.height=y.h*(A.y[1]-A.y[0])+"px",f.left=y.l+A.x[0]*y.w+"px",f.top=y.t+(1-A.y[1])*y.h+"px",this.xaxis._offset=y.l+A.x[0]*y.w,this.xaxis._length=y.w*(A.x[1]-A.x[0]),this.yaxis._offset=y.t+(1-A.y[1])*y.h,this.yaxis._length=y.h*(A.y[1]-A.y[0])},c.updateLayers=function(b){var A=b[this.id],y=A.layers,f=this.layerList,p;if(y.length!==f.length){for(p=0;p<f.length;p++)f[p].dispose();for(f=this.layerList=[],p=0;p<y.length;p++)f.push(m(this,p,y[p]))}else for(p=0;p<y.length;p++)f[p].update(y[p])},c.destroy=function(){this.map&&(this.map.remove(),this.map=null,this.container.removeChild(this.div))},c.toImage=function(){return this.map.stop(),this.map.getCanvas().toDataURL()},c.setOptions=function(b,A,y){for(var f in y)this.map[A](b,f,y[f])},c.getMapLayers=function(){return this.map.getStyle().layers},c.addLayer=function(b,A){var y=this.map;if(typeof A=="string"){if(A===""){y.addLayer(b,A);return}for(var f=this.getMapLayers(),p=0;p<f.length;p++)if(A===f[p].id){y.addLayer(b,A);return}w.warn(["Trying to add layer with *below* value",A,"referencing a layer that does not exist","or that does not yet exist."].join(" "))}y.addLayer(b)},c.project=function(b){return this.map.project(new v.LngLat(b[0],b[1]))},c.getView=function(){var b=this.map,A=b.getCenter(),y=A.lng,f=A.lat,p={lon:y,lat:f},x=b.getCanvas(),N=parseInt(x.style.width),D=parseInt(x.style.height);return{center:p,zoom:b.getZoom(),bearing:b.getBearing(),pitch:b.getPitch(),_derived:{coordinates:[b.unproject([0,0]).toArray(),b.unproject([N,0]).toArray(),b.unproject([N,D]).toArray(),b.unproject([0,D]).toArray()]}}},c.getViewEdits=function(b){for(var A=this.id,y=["center","zoom","bearing","pitch"],f={},p=0;p<y.length;p++){var x=y[p];f[A+"."+x]=b[x]}return f},c.getViewEditsWithDerived=function(b){var A=this.id,y=this.getViewEdits(b);return y[A+"._derived"]=b._derived,y};function T(b,A){var y={};if(w.isPlainObject(b))y.id=b.id,y.style=b;else if(typeof b=="string")if(y.id=b,g.styleValuesMapbox.indexOf(b)!==-1)y.style=M(b);else if(g.stylesNonMapbox[b]){y.style=g.stylesNonMapbox[b];var f=y.style.sources["plotly-"+b],p=f?f.tiles:void 0;p&&p[0]&&p[0].slice(-9)==="?api_key="&&(p[0]+=A._mapboxAccessToken)}else y.style=b;else y.id=g.styleValueDflt,y.style=M(g.styleValueDflt);return y.transition={duration:0,delay:0},y}function M(b){return g.styleUrlPrefix+b+"-"+g.styleUrlSuffix}function k(b){return[b.lon,b.lat]}Z.exports=E}}),dte=Ne({"src/plots/mapbox/layout_defaults.js"(te,Z){var v=In(),w=W0(),C=jd(),P=yk();Z.exports=function(l,i,s){w(l,i,s,{type:"mapbox",attributes:P,handleDefaults:t,partition:"y",accessToken:i._mapboxAccessToken})};function t(a,l,i,s){i("accesstoken",s.accessToken),i("style"),i("center.lon"),i("center.lat"),i("zoom"),i("bearing"),i("pitch");var o=i("bounds.west"),u=i("bounds.east"),d=i("bounds.south"),h=i("bounds.north");(o===void 0||u===void 0||d===void 0||h===void 0)&&delete l.bounds,C(a,l,{name:"layers",handleItemDefaults:r}),l._input=a}function r(a,l){function i(g,m){return v.coerce(a,l,P.layers,g,m)}var s=i("visible");if(s){var o=i("sourcetype"),u=o==="raster"||o==="image";i("source"),i("sourceattribution"),o==="vector"&&i("sourcelayer"),o==="image"&&i("coordinates");var d;u&&(d="raster");var h=i("type",d);u&&h!=="raster"&&(h=l.type="raster",v.log("Source types *raster* and *image* must drawn *raster* layer type.")),i("below"),i("color"),i("opacity"),i("minzoom"),i("maxzoom"),h==="circle"&&i("circle.radius"),h==="line"&&(i("line.width"),i("line.dash")),h==="fill"&&i("fill.outlinecolor"),h==="symbol"&&(i("symbol.icon"),i("symbol.iconsize"),i("symbol.text"),v.coerceFont(i,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),i("symbol.textposition"),i("symbol.placement"))}}}}),VR=Ne({"src/plots/mapbox/index.js"(te){var Z=lF(),v=In(),w=v.strTranslate,C=v.strScale,P=lv().getSubplotCalcData,t=hp(),r=xn(),a=zs(),l=hc(),i=hte(),s="mapbox",o=te.constants=R_();te.name=s,te.attr="subplot",te.idRoot=s,te.idRegex=te.attrRegex=v.counterRegex(s);var u=["mapbox subplots and traces are deprecated!","Please consider switching to `map` subplots and traces.","Learn more at: https://plotly.com/python/maplibre-migration/","as well as https://plotly.com/javascript/maplibre-migration/"].join(" ");te.attributes={subplot:{valType:"subplotid",dflt:"mapbox",editType:"calc"}},te.layoutAttributes=yk(),te.supplyLayoutDefaults=dte();var d=!0;te.plot=function(E){d&&(d=!1,v.warn(u));var c=E._fullLayout,_=E.calcdata,T=c._subplots[s];if(Z.version!==o.requiredVersion)throw new Error(o.wrongVersionErrorMsg);var M=h(E,T);Z.accessToken=M;for(var k=0;k<T.length;k++){var b=T[k],A=P(_,s,b),y=c[b],f=y._subplot;f||(f=new i(E,b),c[b]._subplot=f),f.viewInitial||(f.viewInitial={center:v.extendFlat({},y.center),zoom:y.zoom,bearing:y.bearing,pitch:y.pitch}),f.plot(A,c,E._promises)}},te.clean=function(m,E,c,_){for(var T=_._subplots[s]||[],M=0;M<T.length;M++){var k=T[M];!E[k]&&_[k]._subplot&&_[k]._subplot.destroy()}},te.toSVG=function(m){for(var E=m._fullLayout,c=E._subplots[s],_=E._size,T=0;T<c.length;T++){var M=E[c[T]],k=M.domain,b=M._subplot,A=b.toImage("png"),y=E._glimages.append("svg:image");y.attr({xmlns:t.svg,"xlink:href":A,x:_.l+_.w*k.x[0],y:_.t+_.h*(1-k.y[1]),width:_.w*(k.x[1]-k.x[0]),height:_.h*(k.y[1]-k.y[0]),preserveAspectRatio:"none"});var f=r.select(M._subplot.div),p=f.select(".mapboxgl-ctrl-logo").node().offsetParent===null;if(!p){var x=E._glimages.append("g");x.attr("transform",w(_.l+_.w*k.x[0]+10,_.t+_.h*(1-k.y[0])-31)),x.append("path").attr("d",o.mapboxLogo.path0).style({opacity:.9,fill:"#ffffff","enable-background":"new"}),x.append("path").attr("d",o.mapboxLogo.path1).style("opacity",.35).style("enable-background","new"),x.append("path").attr("d",o.mapboxLogo.path2).style("opacity",.35).style("enable-background","new"),x.append("polygon").attr("points",o.mapboxLogo.polygon).style({opacity:.9,fill:"#ffffff","enable-background":"new"})}var N=f.select(".mapboxgl-ctrl-attrib").text().replace("Improve this map",""),D=E._glimages.append("g"),B=D.append("text");B.text(N).classed("static-attribution",!0).attr({"font-size":12,"font-family":"Arial",color:"rgba(0, 0, 0, 0.75)","text-anchor":"end","data-unformatted":N});var U=a.bBox(B.node()),V=_.w*(k.x[1]-k.x[0]);if(U.width>V/2){var q=N.split("|").join("<br>");B.text(q).attr("data-unformatted",q).call(l.convertToTspans,m),U=a.bBox(B.node())}B.attr("transform",w(-3,-U.height+8)),D.insert("rect",".static-attribution").attr({x:-U.width-6,y:-U.height-3,width:U.width+6,height:U.height+3,fill:"rgba(255, 255, 255, 0.75)"});var z=1;U.width+6>V&&(z=V/(U.width+6));var H=[_.l+_.w*k.x[1],_.t+_.h*(1-k.y[0])];D.attr("transform",w(H[0],H[1])+C(z))}};function h(m,E){var c=m._fullLayout,_=m._context;if(_.mapboxAccessToken==="")return"";for(var T=[],M=[],k=!1,b=!1,A=0;A<E.length;A++){var y=c[E[A]],f=y.accesstoken;g(y.style)&&(f?v.pushUnique(T,f):(g(y._input.style)&&(v.error("Uses Mapbox map style, but did not set an access token."),k=!0),b=!0)),f&&v.pushUnique(M,f)}if(b){var p=k?o.noAccessTokenErrorMsg:o.missingStyleErrorMsg;throw v.error(p),new Error(p)}return T.length?(T.length>1&&v.warn(o.multipleTokensErrorMsg),T[0]):(M.length&&v.log(["Listed mapbox access token(s)",M.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}function g(m){return typeof m=="string"&&(o.styleValuesMapbox.indexOf(m)!==-1||m.indexOf("mapbox://")===0||m.indexOf("stamen")===0)}te.updateFx=function(m){for(var E=m._fullLayout,c=E._subplots[s],_=0;_<c.length;_++){var T=E[c[_]]._subplot;T.updateFx(E)}}}}),vte=Ne({"src/traces/scattermapbox/index.js"(te,Z){Z.exports={attributes:UR(),supplyDefaults:ote(),colorbar:sh(),formatLabels:oF(),calc:bR(),plot:lte(),hoverPoints:qR().hoverPoints,eventData:ute(),selectPoints:cte(),styleOnSelect:function(v,w){if(w){var C=w[0].trace;C._glTrace.update(w)}},moduleType:"trace",name:"scattermapbox",basePlotModule:VR(),categories:["mapbox","gl","symbols","showLegend","scatter-like"],meta:{}}}}),pte=Ne({"lib/scattermapbox.js"(te,Z){Z.exports=vte()}}),uF=Ne({"src/traces/choroplethmapbox/attributes.js"(te,Z){var v=KS(),w=Wu(),{hovertemplateAttrs:C,templatefallbackAttrs:P}=Fl(),t=qo(),r=fi().extendFlat;Z.exports=r({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:r({},v.featureidkey,{}),below:{valType:"string",editType:"plot"},text:v.text,hovertext:v.hovertext,marker:{line:{color:r({},v.marker.line.color,{editType:"plot"}),width:r({},v.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:r({},v.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:r({},v.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:r({},v.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:v.hoverinfo,hovertemplate:C({},{keys:["properties"]}),hovertemplatefallback:P(),showlegend:r({},t.showlegend,{dflt:!1})},w("",{cLetter:"z",editTypeOverride:"calc"}))}}),mte=Ne({"src/traces/choroplethmapbox/defaults.js"(te,Z){var v=In(),w=Rh(),C=uF();Z.exports=function(t,r,a,l){function i(h,g){return v.coerce(t,r,C,h,g)}var s=i("locations"),o=i("z"),u=i("geojson");if(!v.isArrayOrTypedArray(s)||!s.length||!v.isArrayOrTypedArray(o)||!o.length||!(typeof u=="string"&&u!==""||v.isPlainObject(u))){r.visible=!1;return}i("featureidkey"),r._length=Math.min(s.length,o.length),i("below"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback");var d=i("marker.line.width");d&&i("marker.line.color"),i("marker.opacity"),w(t,r,l,i,{prefix:"",cLetter:"z"}),v.coerceSelectionMarkerOpacity(r,i)}}}),cF=Ne({"src/traces/choroplethmapbox/convert.js"(te,Z){var v=Fn(),w=In(),C=Nc(),P=zs(),t=Db().makeBlank,r=Ob();function a(i){var s=i[0].trace,o=s.visible===!0&&s._length!==0,u={layout:{visibility:"none"},paint:{}},d={layout:{visibility:"none"},paint:{}},h=s._opts={fill:u,line:d,geojson:t()};if(!o)return h;var g=r.extractTraceFeature(i);if(!g)return h;var m=C.makeColorScaleFuncFromTrace(s),E=s.marker,c=E.line||{},_;w.isArrayOrTypedArray(E.opacity)&&(_=function(p){var x=p.mo;return v(x)?+w.constrain(x,0,1):0});var T;w.isArrayOrTypedArray(c.color)&&(T=function(p){return p.mlc});var M;w.isArrayOrTypedArray(c.width)&&(M=function(p){return p.mlw});for(var k=0;k<i.length;k++){var b=i[k],A=b.fOut;if(A){var y=A.properties;y.fc=m(b.z),_&&(y.mo=_(b)),T&&(y.mlc=T(b)),M&&(y.mlw=M(b)),b.ct=y.ct,b._polygons=r.feature2polygons(A)}}var f=_?{type:"identity",property:"mo"}:E.opacity;return w.extendFlat(u.paint,{"fill-color":{type:"identity",property:"fc"},"fill-opacity":f}),w.extendFlat(d.paint,{"line-color":T?{type:"identity",property:"mlc"}:c.color,"line-width":M?{type:"identity",property:"mlw"}:c.width,"line-opacity":f}),u.layout.visibility="visible",d.layout.visibility="visible",h.geojson={type:"FeatureCollection",features:g},l(i),h}function l(i){var s=i[0].trace,o=s._opts,u;if(s.selectedpoints){for(var d=P.makeSelectedPointStyleFns(s),h=0;h<i.length;h++){var g=i[h];g.fOut&&(g.fOut.properties.mo2=d.selectedOpacityFn(g))}u={type:"identity",property:"mo2"}}else u=w.isArrayOrTypedArray(s.marker.opacity)?{type:"identity",property:"mo"}:s.marker.opacity;return w.extendFlat(o.fill.paint,{"fill-opacity":u}),w.extendFlat(o.line.paint,{"line-opacity":u}),o}Z.exports={convert:a,convertOnSelect:l}}}),gte=Ne({"src/traces/choroplethmapbox/plot.js"(te,Z){var v=cF().convert,w=cF().convertOnSelect,C=R_().traceLayerPrefix;function P(r,a){this.type="choroplethmapbox",this.subplot=r,this.uid=a,this.sourceId="source-"+a,this.layerList=[["fill",C+a+"-fill"],["line",C+a+"-line"]],this.below=null}var t=P.prototype;t.update=function(r){this._update(v(r)),r[0].trace._glTrace=this},t.updateOnSelect=function(r){this._update(w(r))},t._update=function(r){var a=this.subplot,l=this.layerList,i=a.belowLookup["trace-"+this.uid];a.map.getSource(this.sourceId).setData(r.geojson),i!==this.below&&(this._removeLayers(),this._addLayers(r,i),this.below=i);for(var s=0;s<l.length;s++){var o=l[s],u=o[0],d=o[1],h=r[u];a.setOptions(d,"setLayoutProperty",h.layout),h.layout.visibility==="visible"&&a.setOptions(d,"setPaintProperty",h.paint)}},t._addLayers=function(r,a){for(var l=this.subplot,i=this.layerList,s=this.sourceId,o=0;o<i.length;o++){var u=i[o],d=u[0],h=r[d];l.addLayer({type:d,id:u[1],source:s,layout:h.layout,paint:h.paint},a)}},t._removeLayers=function(){for(var r=this.subplot.map,a=this.layerList,l=a.length-1;l>=0;l--)r.removeLayer(a[l][1])},t.dispose=function(){var r=this.subplot.map;this._removeLayers(),r.removeSource(this.sourceId)},Z.exports=function(a,l){var i=l[0].trace,s=new P(a,i.uid),o=s.sourceId,u=v(l),d=s.below=a.belowLookup["trace-"+i.uid];return a.map.addSource(o,{type:"geojson",data:u.geojson}),s._addLayers(u,d),l[0].trace._glTrace=s,s}}}),yte=Ne({"src/traces/choroplethmapbox/index.js"(te,Z){Z.exports={attributes:uF(),supplyDefaults:mte(),colorbar:Bg(),calc:SR(),plot:gte(),hoverPoints:MR(),eventData:CR(),selectPoints:kR(),styleOnSelect:function(v,w){if(w){var C=w[0].trace;C._glTrace.updateOnSelect(w)}},getBelow:function(v,w){for(var C=w.getMapLayers(),P=C.length-2;P>=0;P--){var t=C[P].id;if(typeof t=="string"&&t.indexOf("water")===0){for(var r=P+1;r<C.length;r++)if(t=C[r].id,typeof t=="string"&&t.indexOf("plotly-")===-1)return t}}},moduleType:"trace",name:"choroplethmapbox",basePlotModule:VR(),categories:["mapbox","gl","noOpacity","showLegend"],meta:{hr_name:"choropleth_mapbox"}}}}),_te=Ne({"lib/choroplethmapbox.js"(te,Z){Z.exports=yte()}}),fF=Ne({"src/traces/densitymapbox/attributes.js"(te,Z){var v=Wu(),{hovertemplateAttrs:w,templatefallbackAttrs:C}=Fl(),P=qo(),t=UR(),r=fi().extendFlat;Z.exports=r({lon:t.lon,lat:t.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:t.text,hovertext:t.hovertext,hoverinfo:r({},P.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:w(),hovertemplatefallback:C(),showlegend:r({},P.showlegend,{dflt:!1})},v("",{cLetter:"z",editTypeOverride:"calc"}))}}),xte=Ne({"src/traces/densitymapbox/defaults.js"(te,Z){var v=In(),w=Rh(),C=fF();Z.exports=function(t,r,a,l){function i(d,h){return v.coerce(t,r,C,d,h)}var s=i("lon")||[],o=i("lat")||[],u=Math.min(s.length,o.length);if(!u){r.visible=!1;return}r._length=u,i("z"),i("radius"),i("below"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),w(t,r,l,i,{prefix:"",cLetter:"z"})}}}),bte=Ne({"src/traces/densitymapbox/calc.js"(te,Z){var v=Fn(),w=In().isArrayOrTypedArray,C=da().BADNUM,P=Ud(),t=In()._;Z.exports=function(a,l){for(var i=l._length,s=new Array(i),o=l.z,u=w(o)&&o.length,d=0;d<i;d++){var h=s[d]={},g=l.lon[d],m=l.lat[d];if(h.lonlat=v(g)&&v(m)?[+g,+m]:[C,C],u){var E=o[d];h.z=v(E)?E:C}}return P(a,l,{vals:u?o:[0,1],containerStr:"",cLetter:"z"}),i&&(s[0].t={labels:{lat:t(a,"lat:")+" ",lon:t(a,"lon:")+" "}}),s}}}),wte=Ne({"src/traces/densitymapbox/convert.js"(te,Z){var v=Fn(),w=In(),C=Ha(),P=Nc(),t=da().BADNUM,r=Db().makeBlank;Z.exports=function(l){var i=l[0].trace,s=i.visible===!0&&i._length!==0,o={layout:{visibility:"none"},paint:{}},u=i._opts={heatmap:o,geojson:r()};if(!s)return u;var d=[],h,g=i.z,m=i.radius,E=w.isArrayOrTypedArray(g)&&g.length,c=w.isArrayOrTypedArray(m);for(h=0;h<l.length;h++){var _=l[h],T=_.lonlat;if(T[0]!==t){var M={};if(E){var k=_.z;M.z=k!==t?k:0}c&&(M.r=v(m[h])&&m[h]>0?+m[h]:0),d.push({type:"Feature",geometry:{type:"Point",coordinates:T},properties:M})}}var b=P.extractOpts(i),A=b.reversescale?P.flipScale(b.colorscale):b.colorscale,y=A[0][1],f=C.opacity(y)<1?y:C.addOpacity(y,0),p=["interpolate",["linear"],["heatmap-density"],0,f];for(h=1;h<A.length;h++)p.push(A[h][0],A[h][1]);var x=["interpolate",["linear"],["get","z"],b.min,0,b.max,1];return w.extendFlat(u.heatmap.paint,{"heatmap-weight":E?x:1/(b.max-b.min),"heatmap-color":p,"heatmap-radius":c?{type:"identity",property:"r"}:i.radius,"heatmap-opacity":i.opacity}),u.geojson={type:"FeatureCollection",features:d},u.heatmap.layout.visibility="visible",u}}}),Tte=Ne({"src/traces/densitymapbox/plot.js"(te,Z){var v=wte(),w=R_().traceLayerPrefix;function C(t,r){this.type="densitymapbox",this.subplot=t,this.uid=r,this.sourceId="source-"+r,this.layerList=[["heatmap",w+r+"-heatmap"]],this.below=null}var P=C.prototype;P.update=function(t){var r=this.subplot,a=this.layerList,l=v(t),i=r.belowLookup["trace-"+this.uid];r.map.getSource(this.sourceId).setData(l.geojson),i!==this.below&&(this._removeLayers(),this._addLayers(l,i),this.below=i);for(var s=0;s<a.length;s++){var o=a[s],u=o[0],d=o[1],h=l[u];r.setOptions(d,"setLayoutProperty",h.layout),h.layout.visibility==="visible"&&r.setOptions(d,"setPaintProperty",h.paint)}},P._addLayers=function(t,r){for(var a=this.subplot,l=this.layerList,i=this.sourceId,s=0;s<l.length;s++){var o=l[s],u=o[0],d=t[u];a.addLayer({type:u,id:o[1],source:i,layout:d.layout,paint:d.paint},r)}},P._removeLayers=function(){for(var t=this.subplot.map,r=this.layerList,a=r.length-1;a>=0;a--)t.removeLayer(r[a][1])},P.dispose=function(){var t=this.subplot.map;this._removeLayers(),t.removeSource(this.sourceId)},Z.exports=function(r,a){var l=a[0].trace,i=new C(r,l.uid),s=i.sourceId,o=v(a),u=i.below=r.belowLookup["trace-"+l.uid];return r.map.addSource(s,{type:"geojson",data:o.geojson}),i._addLayers(o,u),i}}}),Ate=Ne({"src/traces/densitymapbox/hover.js"(te,Z){var v=Os(),w=qR().hoverPoints,C=qR().getExtraText;Z.exports=function(t,r,a){var l=w(t,r,a);if(l){var i=l[0],s=i.cd,o=s[0].trace,u=s[i.index];if(delete i.color,"z"in u){var d=i.subplot.mockAxis;i.z=u.z,i.zLabel=v.tickText(d,d.c2l(u.z),"hover").text}return i.extraText=C(o,u,s[0].t.labels),[i]}}}}),Ste=Ne({"src/traces/densitymapbox/event_data.js"(te,Z){Z.exports=function(w,C){return w.lon=C.lon,w.lat=C.lat,w.z=C.z,w}}}),Ete=Ne({"src/traces/densitymapbox/index.js"(te,Z){Z.exports={attributes:fF(),supplyDefaults:xte(),colorbar:Bg(),formatLabels:oF(),calc:bte(),plot:Tte(),hoverPoints:Ate(),eventData:Ste(),getBelow:function(v,w){for(var C=w.getMapLayers(),P=0;P<C.length;P++){var t=C[P],r=t.id;if(t.type==="symbol"&&typeof r=="string"&&r.indexOf("plotly-")===-1)return r}},moduleType:"trace",name:"densitymapbox",basePlotModule:VR(),categories:["mapbox","gl","showLegend"],meta:{hr_name:"density_mapbox"}}}}),Mte=Ne({"lib/densitymapbox.js"(te,Z){Z.exports=Ete()}}),Cte=Ne({"src/plots/map/styles/arcgis-sat-hybrid.js"(te,Z){Z.exports={version:8,name:"orto",metadata:{"maputnik:renderer":"mlgljs"},center:[1.537786,41.837539],zoom:12,bearing:0,pitch:0,light:{anchor:"viewport",color:"white",intensity:.4,position:[1.15,45,30]},sources:{ortoEsri:{type:"raster",tiles:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],tileSize:256,maxzoom:18,attribution:"ESRI &copy; <a href='http://www.esri.com'>ESRI</a>"},ortoInstaMaps:{type:"raster",tiles:["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],tileSize:256,maxzoom:13},ortoICGC:{type:"raster",tiles:["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],tileSize:256,minzoom:13.1,maxzoom:20},openmaptiles:{type:"vector",url:"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},sprite:"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1",glyphs:"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"#F4F9F4"}},{id:"ortoEsri",type:"raster",source:"ortoEsri",maxzoom:16,layout:{visibility:"visible"}},{id:"ortoICGC",type:"raster",source:"ortoICGC",minzoom:13.1,maxzoom:19,layout:{visibility:"visible"}},{id:"ortoInstaMaps",type:"raster",source:"ortoInstaMaps",maxzoom:13,layout:{visibility:"visible"}},{id:"waterway_tunnel",type:"line",source:"openmaptiles","source-layer":"waterway",minzoom:14,filter:["all",["in","class","river","stream","canal"],["==","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,6]]},"line-dasharray":[2,4]}},{id:"waterway-other",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["!in","class","canal","river","stream"],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,2]]}}},{id:"waterway-stream-canal",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["all",["in","class","canal","stream"],["!=","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,6]]}}},{id:"waterway-river",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["all",["==","class","river"],["!=","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.2,stops:[[10,.8],[20,4]]},"line-opacity":.5}},{id:"water-offset",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",maxzoom:8,filter:["==","$type","Polygon"],layout:{visibility:"visible"},paint:{"fill-opacity":0,"fill-color":"#a0c8f0","fill-translate":{base:1,stops:[[6,[2,0]],[8,[0,0]]]}}},{id:"water",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-color":"hsl(210, 67%, 85%)","fill-opacity":0}},{id:"water-pattern",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-translate":[0,2.5],"fill-pattern":"wave","fill-opacity":1}},{id:"landcover-ice-shelf",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"landcover",filter:["==","subclass","ice_shelf"],layout:{visibility:"visible"},paint:{"fill-color":"#fff","fill-opacity":{base:1,stops:[[0,.9],[10,.3]]}}},{id:"tunnel-service-track-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","service","track"]],layout:{"line-join":"round"},paint:{"line-color":"#cfcdca","line-dasharray":[.5,.25],"line-width":{base:1.2,stops:[[15,1],[16,4],[20,11]]}}},{id:"tunnel-minor-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","minor"]],layout:{"line-join":"round"},paint:{"line-color":"#cfcdca","line-opacity":{stops:[[12,0],[12.5,1]]},"line-width":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:"tunnel-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:"tunnel-trunk-primary-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.7}},{id:"tunnel-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","motorway"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-dasharray":[.5,.25],"line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.5}},{id:"tunnel-path",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","tunnel"],["==","class","path"]]],paint:{"line-color":"#cba","line-dasharray":[1.5,.75],"line-width":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:"tunnel-service-track",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","service","track"]],layout:{"line-join":"round"},paint:{"line-color":"#fff","line-width":{base:1.2,stops:[[15.5,0],[16,2],[20,7.5]]}}},{id:"tunnel-minor",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","minor_road"]],layout:{"line-join":"round"},paint:{"line-color":"#fff","line-opacity":1,"line-width":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:"tunnel-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#fff4c6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,10]]}}},{id:"tunnel-trunk-primary",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#fff4c6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"tunnel-motorway",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","motorway"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#ffdaa6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"tunnel-railway",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","rail"]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]},"line-dasharray":[2,2]}},{id:"ferry",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["in","class","ferry"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(108, 159, 182, 1)","line-width":1.1,"line-dasharray":[2,2]}},{id:"aeroway-taxiway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["all",["in","class","taxiway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(153, 153, 153, 1)","line-width":{base:1.5,stops:[[11,2],[17,12]]},"line-opacity":1}},{id:"aeroway-runway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["all",["in","class","runway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(153, 153, 153, 1)","line-width":{base:1.5,stops:[[11,5],[17,55]]},"line-opacity":1}},{id:"aeroway-taxiway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in","class","taxiway"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-width":{base:1.5,stops:[[11,1],[17,10]]},"line-opacity":{base:1,stops:[[11,0],[12,1]]}}},{id:"aeroway-runway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in","class","runway"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-width":{base:1.5,stops:[[11,4],[17,50]]},"line-opacity":{base:1,stops:[[11,0],[12,1]]}}},{id:"highway-motorway-link-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:12,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"highway-link-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"highway-minor-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#cfcdca","line-opacity":{stops:[[12,0],[12.5,0]]},"line-width":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:"highway-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":.5,"line-width":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:"highway-primary-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":{stops:[[7,0],[8,.6]]},"line-width":{base:1.2,stops:[[7,0],[8,.6],[9,1.5],[20,22]]}}},{id:"highway-trunk-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":{stops:[[5,0],[6,.5]]},"line-width":{base:1.2,stops:[[5,0],[6,.6],[7,1.5],[20,22]]}}},{id:"highway-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:4,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[4,0],[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":{stops:[[4,0],[5,.5]]}}},{id:"highway-path",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","path"]]],paint:{"line-color":"#cba","line-dasharray":[1.5,.75],"line-width":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:"highway-motorway-link",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:12,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"highway-link",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"highway-minor",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fff","line-opacity":.5,"line-width":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:"highway-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[8,.5],[20,13]]},"line-opacity":.5}},{id:"highway-primary",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[8.5,0],[9,.5],[20,18]]},"line-opacity":0}},{id:"highway-trunk",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"highway-motorway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"railway-transit",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:"railway-transit-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:"railway-service",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],paint:{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:"railway-service-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:"railway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:"railway-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],paint:{"line-color":"#bbb","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:"bridge-motorway-link-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway_link"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"bridge-link-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"bridge-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[8,1.5],[20,28]]}}},{id:"bridge-trunk-primary-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"hsl(28, 76%, 67%)","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,26]]}}},{id:"bridge-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.5}},{id:"bridge-path-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],paint:{"line-color":"#f8f4f0","line-width":{base:1.2,stops:[[15,1.2],[20,18]]}}},{id:"bridge-path",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],paint:{"line-color":"#cba","line-width":{base:1.2,stops:[[15,1.2],[20,4]]},"line-dasharray":[1.5,.75]}},{id:"bridge-motorway-link",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway_link"]],layout:{"line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"bridge-link",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"bridge-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,20]]}}},{id:"bridge-trunk-primary",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]}}},{id:"bridge-motorway",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway"]],layout:{"line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"bridge-railway",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","rail"]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:"bridge-railway-hatching",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","rail"]],paint:{"line-color":"#bbb","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:"cablecar",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["==","class","cable_car"],layout:{visibility:"visible","line-cap":"round"},paint:{"line-color":"hsl(0, 0%, 70%)","line-width":{base:1,stops:[[11,1],[19,2.5]]}}},{id:"cablecar-dash",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["==","class","cable_car"],layout:{visibility:"visible","line-cap":"round"},paint:{"line-color":"hsl(0, 0%, 70%)","line-width":{base:1,stops:[[11,3],[19,5.5]]},"line-dasharray":[2,3]}},{id:"boundary-land-level-4",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",[">=","admin_level",4],["<=","admin_level",8],["!=","maritime",1]],layout:{"line-join":"round"},paint:{"line-color":"#9e9cab","line-dasharray":[3,1,1,1],"line-width":{base:1.4,stops:[[4,.4],[5,1],[12,3]]},"line-opacity":.6}},{id:"boundary-land-level-2",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["==","admin_level",2],["!=","maritime",1],["!=","disputed",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(248, 7%, 66%)","line-width":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,2]]}}},{id:"boundary-land-disputed",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["!=","maritime",1],["==","disputed",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(248, 7%, 70%)","line-dasharray":[1,3],"line-width":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,8]]}}},{id:"boundary-water",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["in","admin_level",2,4],["==","maritime",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(154, 189, 214, 1)","line-width":{base:1,stops:[[0,.6],[4,1],[5,1],[12,1]]},"line-opacity":{stops:[[6,0],[10,0]]}}},{id:"waterway-name",type:"symbol",source:"openmaptiles","source-layer":"waterway",minzoom:13,filter:["all",["==","$type","LineString"],["has","name"]],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin} {name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","text-letter-spacing":.2,"symbol-spacing":350},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-lakeline",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["==","$type","LineString"],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":`{name:latin}
{name:nonlatin}`,"text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","symbol-spacing":350,"text-letter-spacing":.2},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-ocean",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["all",["==","$type","Point"],["==","class","ocean"]],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":.2},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-other",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["all",["==","$type","Point"],["!in","class","ocean"]],layout:{"text-font":["Noto Sans Italic"],"text-size":{stops:[[0,10],[6,14]]},"text-field":`{name:latin}
{name:nonlatin}`,"text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":.2,visibility:"visible"},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"poi-level-3",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:16,filter:["all",["==","$type","Point"],[">=","rank",25]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":`{name:latin}
{name:nonlatin}`,"text-offset":[0,.6],"text-size":12,"text-max-width":9},paint:{"text-halo-blur":.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{id:"poi-level-2",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:15,filter:["all",["==","$type","Point"],["<=","rank",24],[">=","rank",15]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":`{name:latin}
{name:nonlatin}`,"text-offset":[0,.6],"text-size":12,"text-max-width":9},paint:{"text-halo-blur":.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{id:"poi-level-1",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:14,filter:["all",["==","$type","Point"],["<=","rank",14],["has","name"]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":`{name:latin}
{name:nonlatin}`,"text-offset":[0,.6],"text-size":11,"text-max-width":9},paint:{"text-halo-blur":.5,"text-color":"rgba(191, 228, 172, 1)","text-halo-width":1,"text-halo-color":"rgba(30, 29, 29, 1)"}},{id:"poi-railway",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:13,filter:["all",["==","$type","Point"],["has","name"],["==","class","railway"],["==","subclass","station"]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":`{name:latin}
{name:nonlatin}`,"text-offset":[0,.6],"text-size":12,"text-max-width":9,"icon-optional":!1,"icon-ignore-placement":!1,"icon-allow-overlap":!1,"text-ignore-placement":!1,"text-allow-overlap":!1,"text-optional":!0},paint:{"text-halo-blur":.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{id:"road_oneway",type:"symbol",source:"openmaptiles","source-layer":"transportation",minzoom:15,filter:["all",["==","oneway",1],["in","class","motorway","trunk","primary","secondary","tertiary","minor","service"]],layout:{"symbol-placement":"line","icon-image":"oneway","symbol-spacing":75,"icon-padding":2,"icon-rotation-alignment":"map","icon-rotate":90,"icon-size":{stops:[[15,.5],[19,1]]}},paint:{"icon-opacity":.5}},{id:"road_oneway_opposite",type:"symbol",source:"openmaptiles","source-layer":"transportation",minzoom:15,filter:["all",["==","oneway",-1],["in","class","motorway","trunk","primary","secondary","tertiary","minor","service"]],layout:{"symbol-placement":"line","icon-image":"oneway","symbol-spacing":75,"icon-padding":2,"icon-rotation-alignment":"map","icon-rotate":-90,"icon-size":{stops:[[15,.5],[19,1]]}},paint:{"icon-opacity":.5}},{id:"highway-name-path",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:15.5,filter:["==","class","path"],layout:{"text-size":{base:1,stops:[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},paint:{"text-halo-color":"#f8f4f0","text-color":"hsl(30, 23%, 62%)","text-halo-width":.5}},{id:"highway-name-minor",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:15,filter:["all",["==","$type","LineString"],["in","class","minor","service","track"]],layout:{"text-size":{base:1,stops:[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},paint:{"text-halo-blur":.5,"text-color":"#765","text-halo-width":1}},{id:"highway-name-major",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:12.2,filter:["in","class","primary","secondary","tertiary","trunk"],layout:{"text-size":{base:1,stops:[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},paint:{"text-halo-blur":.5,"text-color":"#765","text-halo-width":1}},{id:"highway-shield",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:8,filter:["all",["<=","ref_length",6],["==","$type","LineString"],["!in","network","us-interstate","us-highway","us-state"]],layout:{"text-size":10,"icon-image":"road_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{base:1,stops:[[10,"point"],[11,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},paint:{"text-opacity":1,"text-color":"rgba(20, 19, 19, 1)","text-halo-color":"rgba(230, 221, 221, 0)","text-halo-width":2,"icon-color":"rgba(183, 18, 18, 1)","icon-opacity":.3,"icon-halo-color":"rgba(183, 55, 55, 0)"}},{id:"highway-shield-us-interstate",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:7,filter:["all",["<=","ref_length",6],["==","$type","LineString"],["in","network","us-interstate"]],layout:{"text-size":10,"icon-image":"{network}_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{base:1,stops:[[7,"point"],[7,"line"],[8,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},paint:{"text-color":"rgba(0, 0, 0, 1)"}},{id:"highway-shield-us-other",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:9,filter:["all",["<=","ref_length",6],["==","$type","LineString"],["in","network","us-highway","us-state"]],layout:{"text-size":10,"icon-image":"{network}_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{base:1,stops:[[10,"point"],[11,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},paint:{"text-color":"rgba(0, 0, 0, 1)"}},{id:"place-other",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",minzoom:12,filter:["!in","class","city","town","village","country","continent"],layout:{"text-letter-spacing":.1,"text-size":{base:1.2,stops:[[12,10],[15,14]]},"text-font":["Noto Sans Bold"],"text-field":`{name:latin}
{name:nonlatin}`,"text-transform":"uppercase","text-max-width":9,visibility:"visible"},paint:{"text-color":"rgba(255,255,255,1)","text-halo-width":1.2,"text-halo-color":"rgba(57, 28, 28, 1)"}},{id:"place-village",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",minzoom:10,filter:["==","class","village"],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[10,12],[15,16]]},"text-field":`{name:latin}
{name:nonlatin}`,"text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(10, 9, 9, 0.8)"}},{id:"place-town",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["==","class","town"],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[10,14],[15,24]]},"text-field":`{name:latin}
{name:nonlatin}`,"text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(22, 22, 22, 0.8)"}},{id:"place-city",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["!=","capital",2],["==","class","city"]],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[7,14],[11,24]]},"text-field":`{name:latin}
{name:nonlatin}`,"text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-city-capital",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","capital",2],["==","class","city"]],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[7,14],[11,24]]},"text-field":`{name:latin}
{name:nonlatin}`,"text-max-width":8,"icon-image":"star_11","text-offset":[.4,0],"icon-size":.8,"text-anchor":"left",visibility:"visible"},paint:{"text-color":"#333","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-other",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],[">=","rank",3],["!has","iso_a2"]],layout:{"text-font":["Noto Sans Italic"],"text-field":"{name:latin}","text-size":{stops:[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-3",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],[">=","rank",3],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-2",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],["==","rank",2],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[2,11],[5,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-1",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],["==","rank",1],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[1,11],[4,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-continent",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",maxzoom:1,filter:["==","class","continent"],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":14,"text-max-width":6.25,"text-transform":"uppercase",visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}}],id:"qebnlkra6"}}}),kte=Ne({"src/plots/map/styles/arcgis-sat.js"(te,Z){Z.exports={version:8,name:"orto",metadata:{},center:[1.537786,41.837539],zoom:12,bearing:0,pitch:0,light:{anchor:"viewport",color:"white",intensity:.4,position:[1.15,45,30]},sources:{ortoEsri:{type:"raster",tiles:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],tileSize:256,maxzoom:18,attribution:"ESRI &copy; <a href='http://www.esri.com'>ESRI</a>"},ortoInstaMaps:{type:"raster",tiles:["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],tileSize:256,maxzoom:13},ortoICGC:{type:"raster",tiles:["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],tileSize:256,minzoom:13.1,maxzoom:20},openmaptiles:{type:"vector",url:"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},sprite:"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1",glyphs:"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"#F4F9F4"}},{id:"ortoEsri",type:"raster",source:"ortoEsri",maxzoom:16,layout:{visibility:"visible"}},{id:"ortoICGC",type:"raster",source:"ortoICGC",minzoom:13.1,maxzoom:19,layout:{visibility:"visible"}},{id:"ortoInstaMaps",type:"raster",source:"ortoInstaMaps",maxzoom:13,layout:{visibility:"visible"}}]}}}),Bb=Ne({"src/plots/map/constants.js"(te,Z){var v=Sm(),w=Cte(),C=kte(),P='© <a target="_blank" href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',t="https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",r="https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json",a="https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",l="https://basemaps.cartocdn.com/gl/positron-nolabels-gl-style/style.json",i="https://basemaps.cartocdn.com/gl/dark-matter-nolabels-gl-style/style.json",s="https://basemaps.cartocdn.com/gl/voyager-nolabels-gl-style/style.json",o={basic:a,streets:a,outdoors:a,light:t,dark:r,satellite:C,"satellite-streets":w,"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:P,tiles:["https://tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-positron":t,"carto-darkmatter":r,"carto-voyager":a,"carto-positron-nolabels":l,"carto-darkmatter-nolabels":i,"carto-voyager-nolabels":s},u=v(o);Z.exports={styleValueDflt:"basic",stylesMap:o,styleValuesMap:u,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",missingStyleErrorMsg:["No valid maplibre style found, please set `map.style` to one of:",u.join(", "),"or use a tile service."].join(`
`),mapOnErrorMsg:"Map error."}}}),_k=Ne({"src/plots/map/layout_attributes.js"(te,Z){var v=In(),w=Ha().defaultLine,C=Fc().attributes,P=bo(),t=tf().textposition,r=ef().overrideAll,a=Cu().templatedArray,l=Bb(),i=P({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});i.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var s=Z.exports=r({_arrayAttrRegexps:[v.counterRegex("map",".layers",!0)],domain:C({name:"map"}),style:{valType:"any",values:l.styleValuesMap,dflt:l.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:a("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:w},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:w}},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:i,textposition:v.extendFlat({},t,{arrayOk:!1})}})},"plot","from-root");s.uirevision={valType:"any",editType:"none"}}}),HR=Ne({"src/traces/scattermap/attributes.js"(te,Z){var{hovertemplateAttrs:v,texttemplateAttrs:w,templatefallbackAttrs:C}=Fl(),P=qv(),t=m3(),r=tf(),a=_k(),l=qo(),i=Wu(),s=fi().extendFlat,o=ef().overrideAll,u=_k(),d=t.line,h=t.marker;Z.exports=o({lon:t.lon,lat:t.lat,cluster:{enabled:{valType:"boolean"},maxzoom:s({},u.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:s({},h.opacity,{dflt:1})},mode:s({},r.mode,{dflt:"markers"}),text:s({},r.text,{}),texttemplate:w({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:C({editType:"plot"}),hovertext:s({},r.hovertext,{}),line:{color:d.color,width:d.width},connectgaps:r.connectgaps,marker:s({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:h.opacity,size:h.size,sizeref:h.sizeref,sizemin:h.sizemin,sizemode:h.sizemode},i("marker")),fill:t.fill,fillcolor:P(),textfont:a.layers.symbol.textfont,textposition:a.layers.symbol.textposition,below:{valType:"string"},selected:{marker:r.selected.marker},unselected:{marker:r.unselected.marker},hoverinfo:s({},l.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:v(),hovertemplatefallback:C()},"calc","nested")}}),hF=Ne({"src/traces/scattermap/constants.js"(te,Z){var v=["Metropolis Black Italic","Metropolis Black","Metropolis Bold Italic","Metropolis Bold","Metropolis Extra Bold Italic","Metropolis Extra Bold","Metropolis Extra Light Italic","Metropolis Extra Light","Metropolis Light Italic","Metropolis Light","Metropolis Medium Italic","Metropolis Medium","Metropolis Regular Italic","Metropolis Regular","Metropolis Semi Bold Italic","Metropolis Semi Bold","Metropolis Thin Italic","Metropolis Thin","Open Sans Bold Italic","Open Sans Bold","Open Sans Extrabold Italic","Open Sans Extrabold","Open Sans Italic","Open Sans Light Italic","Open Sans Light","Open Sans Regular","Open Sans Semibold Italic","Open Sans Semibold","Klokantech Noto Sans Bold","Klokantech Noto Sans CJK Bold","Klokantech Noto Sans CJK Regular","Klokantech Noto Sans Italic","Klokantech Noto Sans Regular"];Z.exports={isSupportedFont:function(w){return v.indexOf(w)!==-1}}}}),Pte=Ne({"src/traces/scattermap/defaults.js"(te,Z){var v=In(),w=yu(),C=wv(),P=Im(),t=Wp(),r=uv(),a=HR(),l=hF().isSupportedFont;Z.exports=function(o,u,d,h){function g(p,x){return v.coerce(o,u,a,p,x)}function m(p,x){return v.coerce2(o,u,a,p,x)}var E=i(o,u,g);if(!E){u.visible=!1;return}if(g("text"),g("texttemplate"),g("texttemplatefallback"),g("hovertext"),g("hovertemplate"),g("hovertemplatefallback"),g("mode"),g("below"),w.hasMarkers(u)){C(o,u,d,h,g,{noLine:!0,noAngle:!0}),g("marker.allowoverlap"),g("marker.angle");var c=u.marker;c.symbol!=="circle"&&(v.isArrayOrTypedArray(c.size)&&(c.size=c.size[0]),v.isArrayOrTypedArray(c.color)&&(c.color=c.color[0]))}w.hasLines(u)&&(P(o,u,d,h,g,{noDash:!0}),g("connectgaps"));var _=m("cluster.maxzoom"),T=m("cluster.step"),M=m("cluster.color",u.marker&&u.marker.color||d),k=m("cluster.size"),b=m("cluster.opacity"),A=_!==!1||T!==!1||M!==!1||k!==!1||b!==!1,y=g("cluster.enabled",A);if(y||w.hasText(u)){var f=h.font.family;t(o,u,h,g,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:l(f)?f:"Open Sans Regular",weight:h.font.weight,style:h.font.style,size:h.font.size,color:h.font.color}})}g("fill"),u.fill!=="none"&&r(o,u,d,g),v.coerceSelectionMarkerOpacity(u,g)};function i(s,o,u){var d=u("lon")||[],h=u("lat")||[],g=Math.min(d.length,h.length);return o._length=g,g}}}),dF=Ne({"src/traces/scattermap/format_labels.js"(te,Z){var v=Os();Z.exports=function(C,P,t){var r={},a=t[P.subplot]._subplot,l=a.mockAxis,i=C.lonlat;return r.lonLabel=v.tickText(l,l.c2l(i[0]),!0).text,r.latLabel=v.tickText(l,l.c2l(i[1]),!0).text,r}}}),vF=Ne({"src/plots/map/convert_text_opts.js"(te,Z){var v=In();Z.exports=function(C,P){var t=C.split(" "),r=t[0],a=t[1],l=v.isArrayOrTypedArray(P)?v.mean(P):P,i=.5+l/100,s=1.5+l/100,o=["",""],u=[0,0];switch(r){case"top":o[0]="top",u[1]=-s;break;case"bottom":o[0]="bottom",u[1]=s;break}switch(a){case"left":o[1]="right",u[0]=-i;break;case"right":o[1]="left",u[0]=i;break}var d;return o[0]&&o[1]?d=o.join("-"):o[0]?d=o[0]:o[1]?d=o[1]:d="center",{anchor:d,offset:u}}}}),Lte=Ne({"src/traces/scattermap/convert.js"(te,Z){var v=Fn(),w=In(),C=da().BADNUM,P=Db(),t=Nc(),r=zs(),a=Mm(),l=yu(),i=hF().isSupportedFont,s=vF(),o=bv().appendArrayPointValue,u=hc().NEWLINES,d=hc().BR_TAG_ALL;Z.exports=function(b,A){var y=A[0].trace,f=y.visible===!0&&y._length!==0,p=y.fill!=="none",x=l.hasLines(y),N=l.hasMarkers(y),D=l.hasText(y),B=N&&y.marker.symbol==="circle",U=N&&y.marker.symbol!=="circle",V=y.cluster&&y.cluster.enabled,q=h("fill"),z=h("line"),H=h("circle"),G=h("symbol"),J={fill:q,line:z,circle:H,symbol:G};if(!f)return J;var le;if((p||x)&&(le=P.calcTraceToLineCoords(A)),p&&(q.geojson=P.makePolygon(le),q.layout.visibility="visible",w.extendFlat(q.paint,{"fill-color":y.fillcolor})),x&&(z.geojson=P.makeLine(le),z.layout.visibility="visible",w.extendFlat(z.paint,{"line-width":y.line.width,"line-color":y.line.color,"line-opacity":y.opacity})),B){var ge=g(A);H.geojson=ge.geojson,H.layout.visibility="visible",V&&(H.filter=["!",["has","point_count"]],J.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":T(y.cluster.color,y.cluster.step),"circle-radius":T(y.cluster.size,y.cluster.step),"circle-opacity":T(y.cluster.opacity,y.cluster.step)}},J.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":M(y),"text-size":12}}),w.extendFlat(H.paint,{"circle-color":ge.mcc,"circle-radius":ge.mrc,"circle-opacity":ge.mo})}if(B&&V&&(H.filter=["!",["has","point_count"]]),(U||D)&&(G.geojson=m(A,b),w.extendFlat(G.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),U&&(w.extendFlat(G.layout,{"icon-size":y.marker.size/10}),"angle"in y.marker&&y.marker.angle!=="auto"&&w.extendFlat(G.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),G.layout["icon-allow-overlap"]=y.marker.allowoverlap,w.extendFlat(G.paint,{"icon-opacity":y.opacity*y.marker.opacity,"icon-color":y.marker.color})),D)){var de=(y.marker||{}).size,me=s(y.textposition,de);w.extendFlat(G.layout,{"text-size":y.textfont.size,"text-anchor":me.anchor,"text-offset":me.offset,"text-font":M(y)}),w.extendFlat(G.paint,{"text-color":y.textfont.color,"text-opacity":y.opacity})}return J};function h(k){return{type:k,geojson:P.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function g(k){var b=k[0].trace,A=b.marker,y=b.selectedpoints,f=w.isArrayOrTypedArray(A.color),p=w.isArrayOrTypedArray(A.size),x=w.isArrayOrTypedArray(A.opacity),N;function D(de){return b.opacity*de}function B(de){return de/2}var U;f&&(t.hasColorscale(b,"marker")?U=t.makeColorScaleFuncFromTrace(A):U=w.identity);var V;p&&(V=a(b));var q;x&&(q=function(de){var me=v(de)?+w.constrain(de,0,1):0;return D(me)});var z=[];for(N=0;N<k.length;N++){var H=k[N],G=H.lonlat;if(!_(G)){var J={};U&&(J.mcc=H.mcc=U(H.mc)),V&&(J.mrc=H.mrc=V(H.ms)),q&&(J.mo=q(H.mo)),y&&(J.selected=H.selected||0),z.push({type:"Feature",id:N+1,geometry:{type:"Point",coordinates:G},properties:J})}}var le;if(y)for(le=r.makeSelectedPointStyleFns(b),N=0;N<z.length;N++){var ge=z[N].properties;le.selectedOpacityFn&&(ge.mo=D(le.selectedOpacityFn(ge))),le.selectedColorFn&&(ge.mcc=le.selectedColorFn(ge)),le.selectedSizeFn&&(ge.mrc=le.selectedSizeFn(ge))}return{geojson:{type:"FeatureCollection",features:z},mcc:f||le&&le.selectedColorFn?{type:"identity",property:"mcc"}:A.color,mrc:p||le&&le.selectedSizeFn?{type:"identity",property:"mrc"}:B(A.size),mo:x||le&&le.selectedOpacityFn?{type:"identity",property:"mo"}:D(A.opacity)}}function m(k,b){for(var A=b._fullLayout,y=k[0].trace,f=y.marker||{},p=f.symbol,x=f.angle,N=p!=="circle"?E(p):c,D=x!=="auto"?E(x,!0):c,B=l.hasText(y)?E(y.text):c,U=[],V=0;V<k.length;V++){var q=k[V];if(!_(q.lonlat)){var z=y.texttemplate,H;if(z){var G=Array.isArray(z)?z[V]||"":z,J=y._module.formatLabels(q,y,A),le={};o(le,y,q.i),H=w.texttemplateString({data:[le,q,y._meta],fallback:y.texttemplatefallback,labels:J,locale:A._d3locale,template:G})}else H=B(V);H&&(H=H.replace(u,"").replace(d,`
`)),U.push({type:"Feature",geometry:{type:"Point",coordinates:q.lonlat},properties:{symbol:N(V),angle:D(V),text:H}})}}return{type:"FeatureCollection",features:U}}function E(k,b){return w.isArrayOrTypedArray(k)?b?function(A){return v(k[A])?+k[A]:0}:function(A){return k[A]}:k?function(){return k}:c}function c(){return""}function _(k){return k[0]===C}function T(k,b){var A;if(w.isArrayOrTypedArray(k)&&w.isArrayOrTypedArray(b)){A=["step",["get","point_count"],k[0]];for(var y=1;y<k.length;y++)A.push(b[y-1],k[y])}else A=k;return A}function M(k){var b=k.textfont,A=b.family,y=b.style,f=b.weight,p=A.split(" "),x=p[p.length-1]==="Italic";x&&p.pop(),x=x||y==="italic";var N=p.join(" ");f==="bold"&&p.indexOf("Bold")===-1?N+=" Bold":f<=1e3&&(p[0]==="Metropolis"?(N="Metropolis",f>850?N+=" Black":f>750?N+=" Extra Bold":f>650?N+=" Bold":f>550?N+=" Semi Bold":f>450?N+=" Medium":f>350?N+=" Regular":f>250?N+=" Light":f>150?N+=" Extra Light":N+=" Thin"):p.slice(0,2).join(" ")==="Open Sans"?(N="Open Sans",f>750?N+=" Extrabold":f>650?N+=" Bold":f>550?N+=" Semibold":f>350?N+=" Regular":N+=" Light"):p.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(N="Klokantech Noto Sans",p[3]==="CJK"&&(N+=" CJK"),N+=f>500?" Bold":" Regular")),x&&(N+=" Italic"),N==="Open Sans Regular Italic"?N="Open Sans Italic":N==="Open Sans Regular Bold"?N="Open Sans Bold":N==="Open Sans Regular Bold Italic"?N="Open Sans Bold Italic":N==="Klokantech Noto Sans Regular Italic"&&(N="Klokantech Noto Sans Italic"),i(N)||(N=A);var D=N.split(", ");return D}}}),Rte=Ne({"src/traces/scattermap/plot.js"(te,Z){var v=In(),w=Lte(),C=Bb().traceLayerPrefix,P={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function t(a,l,i,s){this.type="scattermap",this.subplot=a,this.uid=l,this.clusterEnabled=i,this.isHidden=s,this.sourceIds={fill:"source-"+l+"-fill",line:"source-"+l+"-line",circle:"source-"+l+"-circle",symbol:"source-"+l+"-symbol",cluster:"source-"+l+"-circle",clusterCount:"source-"+l+"-circle"},this.layerIds={fill:C+l+"-fill",line:C+l+"-line",circle:C+l+"-circle",symbol:C+l+"-symbol",cluster:C+l+"-cluster",clusterCount:C+l+"-cluster-count"},this.below=null}var r=t.prototype;r.addSource=function(a,l,i){var s={type:"geojson",data:l.geojson};i&&i.enabled&&v.extendFlat(s,{cluster:!0,clusterMaxZoom:i.maxzoom});var o=this.subplot.map.getSource(this.sourceIds[a]);o?o.setData(l.geojson):this.subplot.map.addSource(this.sourceIds[a],s)},r.setSourceData=function(a,l){this.subplot.map.getSource(this.sourceIds[a]).setData(l.geojson)},r.addLayer=function(a,l,i){var s={type:l.type,id:this.layerIds[a],source:this.sourceIds[a],layout:l.layout,paint:l.paint};l.filter&&(s.filter=l.filter);for(var o=this.layerIds[a],u,d=this.subplot.getMapLayers(),h=0;h<d.length;h++)if(d[h].id===o){u=!0;break}u?(this.subplot.setOptions(o,"setLayoutProperty",s.layout),s.layout.visibility==="visible"&&this.subplot.setOptions(o,"setPaintProperty",s.paint)):this.subplot.addLayer(s,i)},r.update=function(l){var i=l[0].trace,s=this.subplot,o=s.map,u=w(s.gd,l),d=s.belowLookup["trace-"+this.uid],h=!!(i.cluster&&i.cluster.enabled),g=!!this.clusterEnabled,m=this;function E(f){f||m.addSource("circle",u.circle,i.cluster);for(var p=P.cluster,x=0;x<p.length;x++){var N=p[x],D=u[N];m.addLayer(N,D,d)}}function c(f){for(var p=P.cluster,x=p.length-1;x>=0;x--){var N=p[x];o.removeLayer(m.layerIds[N])}f||o.removeSource(m.sourceIds.circle)}function _(f){for(var p=P.nonCluster,x=0;x<p.length;x++){var N=p[x],D=u[N];f||m.addSource(N,D),m.addLayer(N,D,d)}}function T(f){for(var p=P.nonCluster,x=p.length-1;x>=0;x--){var N=p[x];o.removeLayer(m.layerIds[N]),f||o.removeSource(m.sourceIds[N])}}function M(f){g?c(f):T(f)}function k(f){h?E(f):_(f)}function b(){for(var f=h?P.cluster:P.nonCluster,p=0;p<f.length;p++){var x=f[p],N=u[x];N&&(s.setOptions(m.layerIds[x],"setLayoutProperty",N.layout),N.layout.visibility==="visible"&&(x!=="cluster"&&m.setSourceData(x,N),s.setOptions(m.layerIds[x],"setPaintProperty",N.paint)))}}var A=this.isHidden,y=i.visible!==!0;y?A||M():A?y||k():g!==h?(M(),k()):(this.below!==d&&(M(!0),k(!0)),b()),this.clusterEnabled=h,this.isHidden=y,this.below=d,l[0].trace._glTrace=this},r.dispose=function(){for(var l=this.subplot.map,i=this.clusterEnabled?P.cluster:P.nonCluster,s=i.length-1;s>=0;s--){var o=i[s];l.removeLayer(this.layerIds[o]),l.removeSource(this.sourceIds[o])}},Z.exports=function(l,i){var s=i[0].trace,o=s.cluster&&s.cluster.enabled,u=s.visible!==!0,d=new t(l,s.uid,o,u),h=w(l.gd,i),g=d.below=l.belowLookup["trace-"+s.uid],m,E,c;if(o)for(d.addSource("circle",h.circle,s.cluster),m=0;m<P.cluster.length;m++)E=P.cluster[m],c=h[E],d.addLayer(E,c,g);else for(m=0;m<P.nonCluster.length;m++)E=P.nonCluster[m],c=h[E],d.addSource(E,c,s.cluster),d.addLayer(E,c,g);return i[0].trace._glTrace=d,d}}}),GR=Ne({"src/traces/scattermap/hover.js"(te,Z){var v=oh(),w=In(),C=G1(),P=w.fillText,t=da().BADNUM,r=Bb().traceLayerPrefix;function a(i,s,o){var u=i.cd,d=u[0].trace,h=i.xa,g=i.ya,m=i.subplot,E=[],c=r+d.uid+"-circle",_=d.cluster&&d.cluster.enabled;if(_){var T=m.map.queryRenderedFeatures(null,{layers:[c]});E=T.map(function(V){return V.id})}var M=s>=0?Math.floor((s+180)/360):Math.ceil((s-180)/360),k=M*360,b=s-k;function A(V){var q=V.lonlat;if(q[0]===t||_&&E.indexOf(V.i+1)===-1)return 1/0;var z=w.modHalf(q[0],360),H=q[1],G=m.project([z,H]),J=G.x-h.c2p([b,H]),le=G.y-g.c2p([z,o]),ge=Math.max(3,V.mrc||0);return Math.max(Math.sqrt(J*J+le*le)-ge,1-3/ge)}if(v.getClosest(u,A,i),i.index!==!1){var y=u[i.index],f=y.lonlat,p=[w.modHalf(f[0],360)+k,f[1]],x=h.c2p(p),N=g.c2p(p),D=y.mrc||1;i.x0=x-D,i.x1=x+D,i.y0=N-D,i.y1=N+D;var B={};B[d.subplot]={_subplot:m};var U=d._module.formatLabels(y,d,B);return i.lonLabel=U.lonLabel,i.latLabel=U.latLabel,i.color=C(d,y),i.extraText=l(d,y,u[0].t.labels),i.hovertemplate=d.hovertemplate,[i]}}function l(i,s,o){if(i.hovertemplate)return;var u=s.hi||i.hoverinfo,d=u.split("+"),h=d.indexOf("all")!==-1,g=d.indexOf("lon")!==-1,m=d.indexOf("lat")!==-1,E=s.lonlat,c=[];function _(T){return T+"°"}return h||g&&m?c.push("("+_(E[1])+", "+_(E[0])+")"):g?c.push(o.lon+_(E[0])):m&&c.push(o.lat+_(E[1])),(h||d.indexOf("text")!==-1)&&P(s,i,c),c.join("<br>")}Z.exports={hoverPoints:a,getExtraText:l}}}),Ite=Ne({"src/traces/scattermap/event_data.js"(te,Z){Z.exports=function(w,C){return w.lon=C.lon,w.lat=C.lat,w}}}),Dte=Ne({"src/traces/scattermap/select.js"(te,Z){var v=In(),w=yu(),C=da().BADNUM;Z.exports=function(t,r){var a=t.cd,l=t.xaxis,i=t.yaxis,s=[],o=a[0].trace,u;if(!w.hasMarkers(o))return[];if(r===!1)for(u=0;u<a.length;u++)a[u].selected=0;else for(u=0;u<a.length;u++){var d=a[u],h=d.lonlat;if(h[0]!==C){var g=[v.modHalf(h[0],360),h[1]],m=[l.c2p(g),i.c2p(g)];r.contains(m,null,u,t)?(s.push({pointNumber:u,lon:h[0],lat:h[1]}),d.selected=1):d.selected=0}}return s}}}),Ote=Ne({"node_modules/maplibre-gl/dist/maplibre-gl.js"(te,Z){(function(v,w){typeof te=="object"&&typeof Z<"u"?Z.exports=w():(v=typeof globalThis<"u"?globalThis:v||self,v.maplibregl=w())})(te,function(){var v={},w={};function C(t,r,a){if(w[t]=a,t==="index"){var l="var sharedModule = {}; ("+w.shared+")(sharedModule); ("+w.worker+")(sharedModule);",i={};return w.shared(i),w.index(v,i),typeof window<"u"&&v.setWorkerUrl(window.URL.createObjectURL(new Blob([l],{type:"text/javascript"}))),v}}C("shared",["exports"],function(t){function r(K,F,ae,we){return new(ae||(ae=Promise))(function(je,Qe){function at(ir){try{Ut(we.next(ir))}catch(Er){Qe(Er)}}function Et(ir){try{Ut(we.throw(ir))}catch(Er){Qe(Er)}}function Ut(ir){var Er;ir.done?je(ir.value):(Er=ir.value,Er instanceof ae?Er:new ae(function(Ir){Ir(Er)})).then(at,Et)}Ut((we=we.apply(K,F||[])).next())})}function a(K){return K&&K.__esModule&&Object.prototype.hasOwnProperty.call(K,"default")?K.default:K}typeof SuppressedError=="function"&&SuppressedError;var l=i;function i(K,F){this.x=K,this.y=F}i.prototype={clone:function(){return new i(this.x,this.y)},add:function(K){return this.clone()._add(K)},sub:function(K){return this.clone()._sub(K)},multByPoint:function(K){return this.clone()._multByPoint(K)},divByPoint:function(K){return this.clone()._divByPoint(K)},mult:function(K){return this.clone()._mult(K)},div:function(K){return this.clone()._div(K)},rotate:function(K){return this.clone()._rotate(K)},rotateAround:function(K,F){return this.clone()._rotateAround(K,F)},matMult:function(K){return this.clone()._matMult(K)},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(K){return this.x===K.x&&this.y===K.y},dist:function(K){return Math.sqrt(this.distSqr(K))},distSqr:function(K){var F=K.x-this.x,ae=K.y-this.y;return F*F+ae*ae},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(K){return Math.atan2(this.y-K.y,this.x-K.x)},angleWith:function(K){return this.angleWithSep(K.x,K.y)},angleWithSep:function(K,F){return Math.atan2(this.x*F-this.y*K,this.x*K+this.y*F)},_matMult:function(K){var F=K[2]*this.x+K[3]*this.y;return this.x=K[0]*this.x+K[1]*this.y,this.y=F,this},_add:function(K){return this.x+=K.x,this.y+=K.y,this},_sub:function(K){return this.x-=K.x,this.y-=K.y,this},_mult:function(K){return this.x*=K,this.y*=K,this},_div:function(K){return this.x/=K,this.y/=K,this},_multByPoint:function(K){return this.x*=K.x,this.y*=K.y,this},_divByPoint:function(K){return this.x/=K.x,this.y/=K.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var K=this.y;return this.y=this.x,this.x=-K,this},_rotate:function(K){var F=Math.cos(K),ae=Math.sin(K),we=ae*this.x+F*this.y;return this.x=F*this.x-ae*this.y,this.y=we,this},_rotateAround:function(K,F){var ae=Math.cos(K),we=Math.sin(K),je=F.y+we*(this.x-F.x)+ae*(this.y-F.y);return this.x=F.x+ae*(this.x-F.x)-we*(this.y-F.y),this.y=je,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},i.convert=function(K){return K instanceof i?K:Array.isArray(K)?new i(K[0],K[1]):K};var s=a(l),o=u;function u(K,F,ae,we){this.cx=3*K,this.bx=3*(ae-K)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*F,this.by=3*(we-F)-this.cy,this.ay=1-this.cy-this.by,this.p1x=K,this.p1y=F,this.p2x=ae,this.p2y=we}u.prototype={sampleCurveX:function(K){return((this.ax*K+this.bx)*K+this.cx)*K},sampleCurveY:function(K){return((this.ay*K+this.by)*K+this.cy)*K},sampleCurveDerivativeX:function(K){return(3*this.ax*K+2*this.bx)*K+this.cx},solveCurveX:function(K,F){if(F===void 0&&(F=1e-6),K<0)return 0;if(K>1)return 1;for(var ae=K,we=0;we<8;we++){var je=this.sampleCurveX(ae)-K;if(Math.abs(je)<F)return ae;var Qe=this.sampleCurveDerivativeX(ae);if(Math.abs(Qe)<1e-6)break;ae-=je/Qe}var at=0,Et=1;for(ae=K,we=0;we<20&&(je=this.sampleCurveX(ae),!(Math.abs(je-K)<F));we++)K>je?at=ae:Et=ae,ae=.5*(Et-at)+at;return ae},solve:function(K,F){return this.sampleCurveY(this.solveCurveX(K,F))}};var d=a(o);let h,g;function m(){return h==null&&(h=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),h}function E(){if(g==null&&(g=!1,m())){const F=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(F){for(let we=0;we<25;we++){const je=4*we;F.fillStyle=`rgb(${je},${je+1},${je+2})`,F.fillRect(we%5,Math.floor(we/5),1,1)}const ae=F.getImageData(0,0,5,5).data;for(let we=0;we<100;we++)if(we%4!=3&&ae[we]!==we){g=!0;break}}}return g||!1}function c(K,F,ae,we){const je=new d(K,F,ae,we);return Qe=>je.solve(Qe)}const _=c(.25,.1,.25,1);function T(K,F,ae){return Math.min(ae,Math.max(F,K))}function M(K,F,ae){const we=ae-F,je=((K-F)%we+we)%we+F;return je===F?ae:je}function k(K,...F){for(const ae of F)for(const we in ae)K[we]=ae[we];return K}let b=1;function A(K,F,ae){const we={};for(const je in K)we[je]=F.call(this,K[je],je,K);return we}function y(K,F,ae){const we={};for(const je in K)F.call(this,K[je],je,K)&&(we[je]=K[je]);return we}function f(K){return Array.isArray(K)?K.map(f):typeof K=="object"&&K?A(K,f):K}const p={};function x(K){p[K]||(typeof console<"u"&&console.warn(K),p[K]=!0)}function N(K,F,ae){return(ae.y-K.y)*(F.x-K.x)>(F.y-K.y)*(ae.x-K.x)}function D(K){return typeof WorkerGlobalScope<"u"&&K!==void 0&&K instanceof WorkerGlobalScope}let B=null;function U(K){return typeof ImageBitmap<"u"&&K instanceof ImageBitmap}const V="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function q(K,F,ae,we,je){return r(this,void 0,void 0,function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");const Qe=new VideoFrame(K,{timestamp:0});try{const at=Qe?.format;if(!at||!at.startsWith("BGR")&&!at.startsWith("RGB"))throw new Error(`Unrecognized format ${at}`);const Et=at.startsWith("BGR"),Ut=new Uint8ClampedArray(we*je*4);if(yield Qe.copyTo(Ut,(function(ir,Er,Ir,nn,vn){const Cn=4*Math.max(-Er,0),jn=(Math.max(0,Ir)-Ir)*nn*4+Cn,aa=4*nn,Oa=Math.max(0,Er),Pi=Math.max(0,Ir);return{rect:{x:Oa,y:Pi,width:Math.min(ir.width,Er+nn)-Oa,height:Math.min(ir.height,Ir+vn)-Pi},layout:[{offset:jn,stride:aa}]}})(K,F,ae,we,je)),Et)for(let ir=0;ir<Ut.length;ir+=4){const Er=Ut[ir];Ut[ir]=Ut[ir+2],Ut[ir+2]=Er}return Ut}finally{Qe.close()}})}let z,H;const G="AbortError";function J(){return new Error(G)}const le={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function ge(K){return le.REGISTERED_PROTOCOLS[K.substring(0,K.indexOf("://"))]}const de="global-dispatcher";class me extends Error{constructor(F,ae,we,je){super(`AJAXError: ${ae} (${F}): ${we}`),this.status=F,this.statusText=ae,this.url=we,this.body=je}}const W=()=>D(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,ie=function(K,F){if(/:\/\//.test(K.url)&&!/^https?:|^file:/.test(K.url)){const we=ge(K.url);if(we)return we(K,F);if(D(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:K,targetMapId:de},F)}if(!(/^file:/.test(ae=K.url)||/^file:/.test(W())&&!/^\w+:/.test(ae))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return(function(we,je){return r(this,void 0,void 0,function*(){const Qe=new Request(we.url,{method:we.method||"GET",body:we.body,credentials:we.credentials,headers:we.headers,cache:we.cache,referrer:W(),signal:je.signal});we.type!=="json"||Qe.headers.has("Accept")||Qe.headers.set("Accept","application/json");const at=yield fetch(Qe);if(!at.ok){const ir=yield at.blob();throw new me(at.status,at.statusText,we.url,ir)}let Et;Et=we.type==="arrayBuffer"||we.type==="image"?at.arrayBuffer():we.type==="json"?at.json():at.text();const Ut=yield Et;if(je.signal.aborted)throw J();return{data:Ut,cacheControl:at.headers.get("Cache-Control"),expires:at.headers.get("Expires")}})})(K,F);if(D(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:K,mustQueue:!0,targetMapId:de},F)}var ae;return(function(we,je){return new Promise((Qe,at)=>{var Et;const Ut=new XMLHttpRequest;Ut.open(we.method||"GET",we.url,!0),we.type!=="arrayBuffer"&&we.type!=="image"||(Ut.responseType="arraybuffer");for(const ir in we.headers)Ut.setRequestHeader(ir,we.headers[ir]);we.type==="json"&&(Ut.responseType="text",!((Et=we.headers)===null||Et===void 0)&&Et.Accept||Ut.setRequestHeader("Accept","application/json")),Ut.withCredentials=we.credentials==="include",Ut.onerror=()=>{at(new Error(Ut.statusText))},Ut.onload=()=>{if(!je.signal.aborted)if((Ut.status>=200&&Ut.status<300||Ut.status===0)&&Ut.response!==null){let ir=Ut.response;if(we.type==="json")try{ir=JSON.parse(Ut.response)}catch(Er){return void at(Er)}Qe({data:ir,cacheControl:Ut.getResponseHeader("Cache-Control"),expires:Ut.getResponseHeader("Expires")})}else{const ir=new Blob([Ut.response],{type:Ut.getResponseHeader("Content-Type")});at(new me(Ut.status,Ut.statusText,we.url,ir))}},je.signal.addEventListener("abort",()=>{Ut.abort(),at(J())}),Ut.send(we.body)})})(K,F)};function se(K){if(!K||K.indexOf("://")<=0||K.indexOf("data:image/")===0||K.indexOf("blob:")===0)return!0;const F=new URL(K),ae=window.location;return F.protocol===ae.protocol&&F.host===ae.host}function ee(K,F,ae){ae[K]&&ae[K].indexOf(F)!==-1||(ae[K]=ae[K]||[],ae[K].push(F))}function pe(K,F,ae){if(ae&&ae[K]){const we=ae[K].indexOf(F);we!==-1&&ae[K].splice(we,1)}}class oe{constructor(F,ae={}){k(this,ae),this.type=F}}class Y extends oe{constructor(F,ae={}){super("error",k({error:F},ae))}}class ce{on(F,ae){return this._listeners=this._listeners||{},ee(F,ae,this._listeners),this}off(F,ae){return pe(F,ae,this._listeners),pe(F,ae,this._oneTimeListeners),this}once(F,ae){return ae?(this._oneTimeListeners=this._oneTimeListeners||{},ee(F,ae,this._oneTimeListeners),this):new Promise(we=>this.once(F,we))}fire(F,ae){typeof F=="string"&&(F=new oe(F,ae||{}));const we=F.type;if(this.listens(we)){F.target=this;const je=this._listeners&&this._listeners[we]?this._listeners[we].slice():[];for(const Et of je)Et.call(this,F);const Qe=this._oneTimeListeners&&this._oneTimeListeners[we]?this._oneTimeListeners[we].slice():[];for(const Et of Qe)pe(we,Et,this._oneTimeListeners),Et.call(this,F);const at=this._eventedParent;at&&(k(F,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),at.fire(F))}else F instanceof Y&&console.error(F.error);return this}listens(F){return this._listeners&&this._listeners[F]&&this._listeners[F].length>0||this._oneTimeListeners&&this._oneTimeListeners[F]&&this._oneTimeListeners[F].length>0||this._eventedParent&&this._eventedParent.listens(F)}setEventedParent(F,ae){return this._eventedParent=F,this._eventedParentData=ae,this}}var ue={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},"viewport-glyph":{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"enum",default:"mercator",values:{mercator:{},globe:{}}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}};const _e=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Le(K,F){const ae={};for(const we in K)we!=="ref"&&(ae[we]=K[we]);return _e.forEach(we=>{we in F&&(ae[we]=F[we])}),ae}function ze(K,F){if(Array.isArray(K)){if(!Array.isArray(F)||K.length!==F.length)return!1;for(let ae=0;ae<K.length;ae++)if(!ze(K[ae],F[ae]))return!1;return!0}if(typeof K=="object"&&K!==null&&F!==null){if(typeof F!="object"||Object.keys(K).length!==Object.keys(F).length)return!1;for(const ae in K)if(!ze(K[ae],F[ae]))return!1;return!0}return K===F}function Xe(K,F){K.push(F)}function Ve(K,F,ae){Xe(ae,{command:"addSource",args:[K,F[K]]})}function rt(K,F,ae){Xe(F,{command:"removeSource",args:[K]}),ae[K]=!0}function mt(K,F,ae,we){rt(K,ae,we),Ve(K,F,ae)}function _t(K,F,ae){let we;for(we in K[ae])if(Object.prototype.hasOwnProperty.call(K[ae],we)&&we!=="data"&&!ze(K[ae][we],F[ae][we]))return!1;for(we in F[ae])if(Object.prototype.hasOwnProperty.call(F[ae],we)&&we!=="data"&&!ze(K[ae][we],F[ae][we]))return!1;return!0}function vt(K,F,ae,we,je,Qe){K=K||{},F=F||{};for(const at in K)Object.prototype.hasOwnProperty.call(K,at)&&(ze(K[at],F[at])||ae.push({command:Qe,args:[we,at,F[at],je]}));for(const at in F)Object.prototype.hasOwnProperty.call(F,at)&&!Object.prototype.hasOwnProperty.call(K,at)&&(ze(K[at],F[at])||ae.push({command:Qe,args:[we,at,F[at],je]}))}function ut(K){return K.id}function Fe(K,F){return K[F.id]=F,K}class Pe{constructor(F,ae,we,je){this.message=(F?`${F}: `:"")+we,je&&(this.identifier=je),ae!=null&&ae.__line__&&(this.line=ae.__line__)}}function be(K,...F){for(const ae of F)for(const we in ae)K[we]=ae[we];return K}class Ye extends Error{constructor(F,ae){super(ae),this.message=ae,this.key=F}}class yt{constructor(F,ae=[]){this.parent=F,this.bindings={};for(const[we,je]of ae)this.bindings[we]=je}concat(F){return new yt(this,F)}get(F){if(this.bindings[F])return this.bindings[F];if(this.parent)return this.parent.get(F);throw new Error(`${F} not found in scope.`)}has(F){return!!this.bindings[F]||!!this.parent&&this.parent.has(F)}}const wt={kind:"null"},ht={kind:"number"},Yt={kind:"string"},$t={kind:"boolean"},fr={kind:"color"},mr={kind:"object"},Ur={kind:"value"},jr={kind:"collator"},fn={kind:"formatted"},Br={kind:"padding"},Qr={kind:"resolvedImage"},Ot={kind:"variableAnchorOffsetCollection"};function $e(K,F){return{kind:"array",itemType:K,N:F}}function ot(K){if(K.kind==="array"){const F=ot(K.itemType);return typeof K.N=="number"?`array<${F}, ${K.N}>`:K.itemType.kind==="value"?"array":`array<${F}>`}return K.kind}const De=[wt,ht,Yt,$t,fr,fn,mr,$e(Ur),Br,Qr,Ot];function Ee(K,F){if(F.kind==="error")return null;if(K.kind==="array"){if(F.kind==="array"&&(F.N===0&&F.itemType.kind==="value"||!Ee(K.itemType,F.itemType))&&(typeof K.N!="number"||K.N===F.N))return null}else{if(K.kind===F.kind)return null;if(K.kind==="value"){for(const ae of De)if(!Ee(ae,F))return null}}return`Expected ${ot(K)} but found ${ot(F)} instead.`}function Ae(K,F){return F.some(ae=>ae.kind===K.kind)}function Ie(K,F){return F.some(ae=>ae==="null"?K===null:ae==="array"?Array.isArray(K):ae==="object"?K&&!Array.isArray(K)&&typeof K=="object":ae===typeof K)}function tt(K,F){return K.kind==="array"&&F.kind==="array"?K.itemType.kind===F.itemType.kind&&typeof K.N=="number":K.kind===F.kind}const st=.96422,Bt=.82521,Ft=4/29,Wt=6/29,lr=3*Wt*Wt,Rr=Wt*Wt*Wt,Mr=Math.PI/180,Sr=180/Math.PI;function Kr(K){return(K%=360)<0&&(K+=360),K}function Hn([K,F,ae,we]){let je,Qe;const at=ua((.2225045*(K=ga(K))+.7168786*(F=ga(F))+.0606169*(ae=ga(ae)))/1);K===F&&F===ae?je=Qe=at:(je=ua((.4360747*K+.3850649*F+.1430804*ae)/st),Qe=ua((.0139322*K+.0971045*F+.7141733*ae)/Bt));const Et=116*at-16;return[Et<0?0:Et,500*(je-at),200*(at-Qe),we]}function ga(K){return K<=.04045?K/12.92:Math.pow((K+.055)/1.055,2.4)}function ua(K){return K>Rr?Math.pow(K,1/3):K/lr+Ft}function Ta([K,F,ae,we]){let je=(K+16)/116,Qe=isNaN(F)?je:je+F/500,at=isNaN(ae)?je:je-ae/200;return je=1*ia(je),Qe=st*ia(Qe),at=Bt*ia(at),[Aa(3.1338561*Qe-1.6168667*je-.4906146*at),Aa(-.9787684*Qe+1.9161415*je+.033454*at),Aa(.0719453*Qe-.2289914*je+1.4052427*at),we]}function Aa(K){return(K=K<=.00304?12.92*K:1.055*Math.pow(K,1/2.4)-.055)<0?0:K>1?1:K}function ia(K){return K>Wt?K*K*K:lr*(K-Ft)}function $a(K){return parseInt(K.padEnd(2,K),16)/255}function ci(K,F){return _r(F?K/100:K,0,1)}function _r(K,F,ae){return Math.min(Math.max(F,K),ae)}function Qt(K){return!K.some(Number.isNaN)}const yr={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};class br{constructor(F,ae,we,je=1,Qe=!0){this.r=F,this.g=ae,this.b=we,this.a=je,Qe||(this.r*=je,this.g*=je,this.b*=je,je||this.overwriteGetter("rgb",[F,ae,we,je]))}static parse(F){if(F instanceof br)return F;if(typeof F!="string")return;const ae=(function(we){if((we=we.toLowerCase().trim())==="transparent")return[0,0,0,0];const je=yr[we];if(je){const[at,Et,Ut]=je;return[at/255,Et/255,Ut/255,1]}if(we.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(we)){const at=we.length<6?1:2;let Et=1;return[$a(we.slice(Et,Et+=at)),$a(we.slice(Et,Et+=at)),$a(we.slice(Et,Et+=at)),$a(we.slice(Et,Et+at)||"ff")]}if(we.startsWith("rgb")){const at=we.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(at){const[Et,Ut,ir,Er,Ir,nn,vn,Cn,jn,aa,Oa,Pi]=at,oi=[Er||" ",vn||" ",aa].join("");if(oi==="  "||oi==="  /"||oi===",,"||oi===",,,"){const Ti=[ir,nn,jn].join(""),ao=Ti==="%%%"?100:Ti===""?255:0;if(ao){const Lo=[_r(+Ut/ao,0,1),_r(+Ir/ao,0,1),_r(+Cn/ao,0,1),Oa?ci(+Oa,Pi):1];if(Qt(Lo))return Lo}}return}}const Qe=we.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(Qe){const[at,Et,Ut,ir,Er,Ir,nn,vn,Cn]=Qe,jn=[Ut||" ",Er||" ",nn].join("");if(jn==="  "||jn==="  /"||jn===",,"||jn===",,,"){const aa=[+Et,_r(+ir,0,100),_r(+Ir,0,100),vn?ci(+vn,Cn):1];if(Qt(aa))return(function([Oa,Pi,oi,Ti]){function ao(Lo){const cs=(Lo+Oa/30)%12,Al=Pi*Math.min(oi,1-oi);return oi-Al*Math.max(-1,Math.min(cs-3,9-cs,1))}return Oa=Kr(Oa),Pi/=100,oi/=100,[ao(0),ao(8),ao(4),Ti]})(aa)}}})(F);return ae?new br(...ae,!1):void 0}get rgb(){const{r:F,g:ae,b:we,a:je}=this,Qe=je||1/0;return this.overwriteGetter("rgb",[F/Qe,ae/Qe,we/Qe,je])}get hcl(){return this.overwriteGetter("hcl",(function(F){const[ae,we,je,Qe]=Hn(F),at=Math.sqrt(we*we+je*je);return[Math.round(1e4*at)?Kr(Math.atan2(je,we)*Sr):NaN,at,ae,Qe]})(this.rgb))}get lab(){return this.overwriteGetter("lab",Hn(this.rgb))}overwriteGetter(F,ae){return Object.defineProperty(this,F,{value:ae}),ae}toString(){const[F,ae,we,je]=this.rgb;return`rgba(${[F,ae,we].map(Qe=>Math.round(255*Qe)).join(",")},${je})`}}br.black=new br(0,0,0,1),br.white=new br(1,1,1,1),br.transparent=new br(0,0,0,0),br.red=new br(1,0,0,1);class an{constructor(F,ae,we){this.sensitivity=F?ae?"variant":"case":ae?"accent":"base",this.locale=we,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(F,ae){return this.collator.compare(F,ae)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class wn{constructor(F,ae,we,je,Qe){this.text=F,this.image=ae,this.scale=we,this.fontStack=je,this.textColor=Qe}}class Ln{constructor(F){this.sections=F}static fromString(F){return new Ln([new wn(F,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(F=>F.text.length!==0||F.image&&F.image.name.length!==0)}static factory(F){return F instanceof Ln?F:Ln.fromString(F)}toString(){return this.sections.length===0?"":this.sections.map(F=>F.text).join("")}}class Bn{constructor(F){this.values=F.slice()}static parse(F){if(F instanceof Bn)return F;if(typeof F=="number")return new Bn([F,F,F,F]);if(Array.isArray(F)&&!(F.length<1||F.length>4)){for(const ae of F)if(typeof ae!="number")return;switch(F.length){case 1:F=[F[0],F[0],F[0],F[0]];break;case 2:F=[F[0],F[1],F[0],F[1]];break;case 3:F=[F[0],F[1],F[2],F[1]]}return new Bn(F)}}toString(){return JSON.stringify(this.values)}}const xa=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class za{constructor(F){this.values=F.slice()}static parse(F){if(F instanceof za)return F;if(Array.isArray(F)&&!(F.length<1)&&F.length%2==0){for(let ae=0;ae<F.length;ae+=2){const we=F[ae],je=F[ae+1];if(typeof we!="string"||!xa.has(we)||!Array.isArray(je)||je.length!==2||typeof je[0]!="number"||typeof je[1]!="number")return}return new za(F)}}toString(){return JSON.stringify(this.values)}}class Ia{constructor(F){this.name=F.name,this.available=F.available}toString(){return this.name}static fromString(F){return F?new Ia({name:F,available:!1}):null}}function Ba(K,F,ae,we){return typeof K=="number"&&K>=0&&K<=255&&typeof F=="number"&&F>=0&&F<=255&&typeof ae=="number"&&ae>=0&&ae<=255?we===void 0||typeof we=="number"&&we>=0&&we<=1?null:`Invalid rgba value [${[K,F,ae,we].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof we=="number"?[K,F,ae,we]:[K,F,ae]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function Ka(K){if(K===null||typeof K=="string"||typeof K=="boolean"||typeof K=="number"||K instanceof br||K instanceof an||K instanceof Ln||K instanceof Bn||K instanceof za||K instanceof Ia)return!0;if(Array.isArray(K)){for(const F of K)if(!Ka(F))return!1;return!0}if(typeof K=="object"){for(const F in K)if(!Ka(K[F]))return!1;return!0}return!1}function fa(K){if(K===null)return wt;if(typeof K=="string")return Yt;if(typeof K=="boolean")return $t;if(typeof K=="number")return ht;if(K instanceof br)return fr;if(K instanceof an)return jr;if(K instanceof Ln)return fn;if(K instanceof Bn)return Br;if(K instanceof za)return Ot;if(K instanceof Ia)return Qr;if(Array.isArray(K)){const F=K.length;let ae;for(const we of K){const je=fa(we);if(ae){if(ae===je)continue;ae=Ur;break}ae=je}return $e(ae||Ur,F)}return mr}function Bi(K){const F=typeof K;return K===null?"":F==="string"||F==="number"||F==="boolean"?String(K):K instanceof br||K instanceof Ln||K instanceof Bn||K instanceof za||K instanceof Ia?K.toString():JSON.stringify(K)}class Yi{constructor(F,ae){this.type=F,this.value=ae}static parse(F,ae){if(F.length!==2)return ae.error(`'literal' expression requires exactly one argument, but found ${F.length-1} instead.`);if(!Ka(F[1]))return ae.error("invalid value");const we=F[1];let je=fa(we);const Qe=ae.expectedType;return je.kind!=="array"||je.N!==0||!Qe||Qe.kind!=="array"||typeof Qe.N=="number"&&Qe.N!==0||(je=Qe),new Yi(je,we)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class Ht{constructor(F){this.name="ExpressionEvaluationError",this.message=F}toJSON(){return this.message}}const kt={string:Yt,number:ht,boolean:$t,object:mr};class qr{constructor(F,ae){this.type=F,this.args=ae}static parse(F,ae){if(F.length<2)return ae.error("Expected at least one argument.");let we,je=1;const Qe=F[0];if(Qe==="array"){let Et,Ut;if(F.length>2){const ir=F[1];if(typeof ir!="string"||!(ir in kt)||ir==="object")return ae.error('The item type argument of "array" must be one of string, number, boolean',1);Et=kt[ir],je++}else Et=Ur;if(F.length>3){if(F[2]!==null&&(typeof F[2]!="number"||F[2]<0||F[2]!==Math.floor(F[2])))return ae.error('The length argument to "array" must be a positive integer literal',2);Ut=F[2],je++}we=$e(Et,Ut)}else{if(!kt[Qe])throw new Error(`Types doesn't contain name = ${Qe}`);we=kt[Qe]}const at=[];for(;je<F.length;je++){const Et=ae.parse(F[je],je,Ur);if(!Et)return null;at.push(Et)}return new qr(we,at)}evaluate(F){for(let ae=0;ae<this.args.length;ae++){const we=this.args[ae].evaluate(F);if(!Ee(this.type,fa(we)))return we;if(ae===this.args.length-1)throw new Ht(`Expected value to be of type ${ot(this.type)}, but found ${ot(fa(we))} instead.`)}throw new Error}eachChild(F){this.args.forEach(F)}outputDefined(){return this.args.every(F=>F.outputDefined())}}const en={"to-boolean":$t,"to-color":fr,"to-number":ht,"to-string":Yt};class rn{constructor(F,ae){this.type=F,this.args=ae}static parse(F,ae){if(F.length<2)return ae.error("Expected at least one argument.");const we=F[0];if(!en[we])throw new Error(`Can't parse ${we} as it is not part of the known types`);if((we==="to-boolean"||we==="to-string")&&F.length!==2)return ae.error("Expected one argument.");const je=en[we],Qe=[];for(let at=1;at<F.length;at++){const Et=ae.parse(F[at],at,Ur);if(!Et)return null;Qe.push(Et)}return new rn(je,Qe)}evaluate(F){switch(this.type.kind){case"boolean":return!!this.args[0].evaluate(F);case"color":{let ae,we;for(const je of this.args){if(ae=je.evaluate(F),we=null,ae instanceof br)return ae;if(typeof ae=="string"){const Qe=F.parseColor(ae);if(Qe)return Qe}else if(Array.isArray(ae)&&(we=ae.length<3||ae.length>4?`Invalid rbga value ${JSON.stringify(ae)}: expected an array containing either three or four numeric values.`:Ba(ae[0],ae[1],ae[2],ae[3]),!we))return new br(ae[0]/255,ae[1]/255,ae[2]/255,ae[3])}throw new Ht(we||`Could not parse color from value '${typeof ae=="string"?ae:JSON.stringify(ae)}'`)}case"padding":{let ae;for(const we of this.args){ae=we.evaluate(F);const je=Bn.parse(ae);if(je)return je}throw new Ht(`Could not parse padding from value '${typeof ae=="string"?ae:JSON.stringify(ae)}'`)}case"variableAnchorOffsetCollection":{let ae;for(const we of this.args){ae=we.evaluate(F);const je=za.parse(ae);if(je)return je}throw new Ht(`Could not parse variableAnchorOffsetCollection from value '${typeof ae=="string"?ae:JSON.stringify(ae)}'`)}case"number":{let ae=null;for(const we of this.args){if(ae=we.evaluate(F),ae===null)return 0;const je=Number(ae);if(!isNaN(je))return je}throw new Ht(`Could not convert ${JSON.stringify(ae)} to number.`)}case"formatted":return Ln.fromString(Bi(this.args[0].evaluate(F)));case"resolvedImage":return Ia.fromString(Bi(this.args[0].evaluate(F)));default:return Bi(this.args[0].evaluate(F))}}eachChild(F){this.args.forEach(F)}outputDefined(){return this.args.every(F=>F.outputDefined())}}const Wr=["Unknown","Point","LineString","Polygon"];class tn{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?Wr[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(F){let ae=this._parseColorCache[F];return ae||(ae=this._parseColorCache[F]=br.parse(F)),ae}}class Tn{constructor(F,ae,we=[],je,Qe=new yt,at=[]){this.registry=F,this.path=we,this.key=we.map(Et=>`[${Et}]`).join(""),this.scope=Qe,this.errors=at,this.expectedType=je,this._isConstant=ae}parse(F,ae,we,je,Qe={}){return ae?this.concat(ae,we,je)._parse(F,Qe):this._parse(F,Qe)}_parse(F,ae){function we(je,Qe,at){return at==="assert"?new qr(Qe,[je]):at==="coerce"?new rn(Qe,[je]):je}if(F!==null&&typeof F!="string"&&typeof F!="boolean"&&typeof F!="number"||(F=["literal",F]),Array.isArray(F)){if(F.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const je=F[0];if(typeof je!="string")return this.error(`Expression name must be a string, but found ${typeof je} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const Qe=this.registry[je];if(Qe){let at=Qe.parse(F,this);if(!at)return null;if(this.expectedType){const Et=this.expectedType,Ut=at.type;if(Et.kind!=="string"&&Et.kind!=="number"&&Et.kind!=="boolean"&&Et.kind!=="object"&&Et.kind!=="array"||Ut.kind!=="value")if(Et.kind!=="color"&&Et.kind!=="formatted"&&Et.kind!=="resolvedImage"||Ut.kind!=="value"&&Ut.kind!=="string")if(Et.kind!=="padding"||Ut.kind!=="value"&&Ut.kind!=="number"&&Ut.kind!=="array")if(Et.kind!=="variableAnchorOffsetCollection"||Ut.kind!=="value"&&Ut.kind!=="array"){if(this.checkSubtype(Et,Ut))return null}else at=we(at,Et,ae.typeAnnotation||"coerce");else at=we(at,Et,ae.typeAnnotation||"coerce");else at=we(at,Et,ae.typeAnnotation||"coerce");else at=we(at,Et,ae.typeAnnotation||"assert")}if(!(at instanceof Yi)&&at.type.kind!=="resolvedImage"&&this._isConstant(at)){const Et=new tn;try{at=new Yi(at.type,at.evaluate(Et))}catch(Ut){return this.error(Ut.message),null}}return at}return this.error(`Unknown expression "${je}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(F===void 0?"'undefined' value invalid. Use null instead.":typeof F=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof F} instead.`)}concat(F,ae,we){const je=typeof F=="number"?this.path.concat(F):this.path,Qe=we?this.scope.concat(we):this.scope;return new Tn(this.registry,this._isConstant,je,ae||null,Qe,this.errors)}error(F,...ae){const we=`${this.key}${ae.map(je=>`[${je}]`).join("")}`;this.errors.push(new Ye(we,F))}checkSubtype(F,ae){const we=Ee(F,ae);return we&&this.error(we),we}}class dn{constructor(F,ae){this.type=ae.type,this.bindings=[].concat(F),this.result=ae}evaluate(F){return this.result.evaluate(F)}eachChild(F){for(const ae of this.bindings)F(ae[1]);F(this.result)}static parse(F,ae){if(F.length<4)return ae.error(`Expected at least 3 arguments, but found ${F.length-1} instead.`);const we=[];for(let Qe=1;Qe<F.length-1;Qe+=2){const at=F[Qe];if(typeof at!="string")return ae.error(`Expected string, but found ${typeof at} instead.`,Qe);if(/[^a-zA-Z0-9_]/.test(at))return ae.error("Variable names must contain only alphanumeric characters or '_'.",Qe);const Et=ae.parse(F[Qe+1],Qe+1);if(!Et)return null;we.push([at,Et])}const je=ae.parse(F[F.length-1],F.length-1,ae.expectedType,we);return je?new dn(we,je):null}outputDefined(){return this.result.outputDefined()}}class It{constructor(F,ae){this.type=ae.type,this.name=F,this.boundExpression=ae}static parse(F,ae){if(F.length!==2||typeof F[1]!="string")return ae.error("'var' expression requires exactly one string literal argument.");const we=F[1];return ae.scope.has(we)?new It(we,ae.scope.get(we)):ae.error(`Unknown variable "${we}". Make sure "${we}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(F){return this.boundExpression.evaluate(F)}eachChild(){}outputDefined(){return!1}}class xr{constructor(F,ae,we){this.type=F,this.index=ae,this.input=we}static parse(F,ae){if(F.length!==3)return ae.error(`Expected 2 arguments, but found ${F.length-1} instead.`);const we=ae.parse(F[1],1,ht),je=ae.parse(F[2],2,$e(ae.expectedType||Ur));return we&&je?new xr(je.type.itemType,we,je):null}evaluate(F){const ae=this.index.evaluate(F),we=this.input.evaluate(F);if(ae<0)throw new Ht(`Array index out of bounds: ${ae} < 0.`);if(ae>=we.length)throw new Ht(`Array index out of bounds: ${ae} > ${we.length-1}.`);if(ae!==Math.floor(ae))throw new Ht(`Array index must be an integer, but found ${ae} instead.`);return we[ae]}eachChild(F){F(this.index),F(this.input)}outputDefined(){return!1}}class Yr{constructor(F,ae){this.type=$t,this.needle=F,this.haystack=ae}static parse(F,ae){if(F.length!==3)return ae.error(`Expected 2 arguments, but found ${F.length-1} instead.`);const we=ae.parse(F[1],1,Ur),je=ae.parse(F[2],2,Ur);return we&&je?Ae(we.type,[$t,Yt,ht,wt,Ur])?new Yr(we,je):ae.error(`Expected first argument to be of type boolean, string, number or null, but found ${ot(we.type)} instead`):null}evaluate(F){const ae=this.needle.evaluate(F),we=this.haystack.evaluate(F);if(!we)return!1;if(!Ie(ae,["boolean","string","number","null"]))throw new Ht(`Expected first argument to be of type boolean, string, number or null, but found ${ot(fa(ae))} instead.`);if(!Ie(we,["string","array"]))throw new Ht(`Expected second argument to be of type array or string, but found ${ot(fa(we))} instead.`);return we.indexOf(ae)>=0}eachChild(F){F(this.needle),F(this.haystack)}outputDefined(){return!0}}class An{constructor(F,ae,we){this.type=ht,this.needle=F,this.haystack=ae,this.fromIndex=we}static parse(F,ae){if(F.length<=2||F.length>=5)return ae.error(`Expected 3 or 4 arguments, but found ${F.length-1} instead.`);const we=ae.parse(F[1],1,Ur),je=ae.parse(F[2],2,Ur);if(!we||!je)return null;if(!Ae(we.type,[$t,Yt,ht,wt,Ur]))return ae.error(`Expected first argument to be of type boolean, string, number or null, but found ${ot(we.type)} instead`);if(F.length===4){const Qe=ae.parse(F[3],3,ht);return Qe?new An(we,je,Qe):null}return new An(we,je)}evaluate(F){const ae=this.needle.evaluate(F),we=this.haystack.evaluate(F);if(!Ie(ae,["boolean","string","number","null"]))throw new Ht(`Expected first argument to be of type boolean, string, number or null, but found ${ot(fa(ae))} instead.`);let je;if(this.fromIndex&&(je=this.fromIndex.evaluate(F)),Ie(we,["string"])){const Qe=we.indexOf(ae,je);return Qe===-1?-1:[...we.slice(0,Qe)].length}if(Ie(we,["array"]))return we.indexOf(ae,je);throw new Ht(`Expected second argument to be of type array or string, but found ${ot(fa(we))} instead.`)}eachChild(F){F(this.needle),F(this.haystack),this.fromIndex&&F(this.fromIndex)}outputDefined(){return!1}}class Zn{constructor(F,ae,we,je,Qe,at){this.inputType=F,this.type=ae,this.input=we,this.cases=je,this.outputs=Qe,this.otherwise=at}static parse(F,ae){if(F.length<5)return ae.error(`Expected at least 4 arguments, but found only ${F.length-1}.`);if(F.length%2!=1)return ae.error("Expected an even number of arguments.");let we,je;ae.expectedType&&ae.expectedType.kind!=="value"&&(je=ae.expectedType);const Qe={},at=[];for(let ir=2;ir<F.length-1;ir+=2){let Er=F[ir];const Ir=F[ir+1];Array.isArray(Er)||(Er=[Er]);const nn=ae.concat(ir);if(Er.length===0)return nn.error("Expected at least one branch label.");for(const Cn of Er){if(typeof Cn!="number"&&typeof Cn!="string")return nn.error("Branch labels must be numbers or strings.");if(typeof Cn=="number"&&Math.abs(Cn)>Number.MAX_SAFE_INTEGER)return nn.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof Cn=="number"&&Math.floor(Cn)!==Cn)return nn.error("Numeric branch labels must be integer values.");if(we){if(nn.checkSubtype(we,fa(Cn)))return null}else we=fa(Cn);if(Qe[String(Cn)]!==void 0)return nn.error("Branch labels must be unique.");Qe[String(Cn)]=at.length}const vn=ae.parse(Ir,ir,je);if(!vn)return null;je=je||vn.type,at.push(vn)}const Et=ae.parse(F[1],1,Ur);if(!Et)return null;const Ut=ae.parse(F[F.length-1],F.length-1,je);return Ut?Et.type.kind!=="value"&&ae.concat(1).checkSubtype(we,Et.type)?null:new Zn(we,je,Et,Qe,at,Ut):null}evaluate(F){const ae=this.input.evaluate(F);return(fa(ae)===this.inputType&&this.outputs[this.cases[ae]]||this.otherwise).evaluate(F)}eachChild(F){F(this.input),this.outputs.forEach(F),F(this.otherwise)}outputDefined(){return this.outputs.every(F=>F.outputDefined())&&this.otherwise.outputDefined()}}class sa{constructor(F,ae,we){this.type=F,this.branches=ae,this.otherwise=we}static parse(F,ae){if(F.length<4)return ae.error(`Expected at least 3 arguments, but found only ${F.length-1}.`);if(F.length%2!=0)return ae.error("Expected an odd number of arguments.");let we;ae.expectedType&&ae.expectedType.kind!=="value"&&(we=ae.expectedType);const je=[];for(let at=1;at<F.length-1;at+=2){const Et=ae.parse(F[at],at,$t);if(!Et)return null;const Ut=ae.parse(F[at+1],at+1,we);if(!Ut)return null;je.push([Et,Ut]),we=we||Ut.type}const Qe=ae.parse(F[F.length-1],F.length-1,we);if(!Qe)return null;if(!we)throw new Error("Can't infer output type");return new sa(we,je,Qe)}evaluate(F){for(const[ae,we]of this.branches)if(ae.evaluate(F))return we.evaluate(F);return this.otherwise.evaluate(F)}eachChild(F){for(const[ae,we]of this.branches)F(ae),F(we);F(this.otherwise)}outputDefined(){return this.branches.every(([F,ae])=>ae.outputDefined())&&this.otherwise.outputDefined()}}class oa{constructor(F,ae,we,je){this.type=F,this.input=ae,this.beginIndex=we,this.endIndex=je}static parse(F,ae){if(F.length<=2||F.length>=5)return ae.error(`Expected 3 or 4 arguments, but found ${F.length-1} instead.`);const we=ae.parse(F[1],1,Ur),je=ae.parse(F[2],2,ht);if(!we||!je)return null;if(!Ae(we.type,[$e(Ur),Yt,Ur]))return ae.error(`Expected first argument to be of type array or string, but found ${ot(we.type)} instead`);if(F.length===4){const Qe=ae.parse(F[3],3,ht);return Qe?new oa(we.type,we,je,Qe):null}return new oa(we.type,we,je)}evaluate(F){const ae=this.input.evaluate(F),we=this.beginIndex.evaluate(F);let je;if(this.endIndex&&(je=this.endIndex.evaluate(F)),Ie(ae,["string"]))return[...ae].slice(we,je).join("");if(Ie(ae,["array"]))return ae.slice(we,je);throw new Ht(`Expected first argument to be of type array or string, but found ${ot(fa(ae))} instead.`)}eachChild(F){F(this.input),F(this.beginIndex),this.endIndex&&F(this.endIndex)}outputDefined(){return!1}}function Sn(K,F){const ae=K.length-1;let we,je,Qe=0,at=ae,Et=0;for(;Qe<=at;)if(Et=Math.floor((Qe+at)/2),we=K[Et],je=K[Et+1],we<=F){if(Et===ae||F<je)return Et;Qe=Et+1}else{if(!(we>F))throw new Ht("Input is not a number.");at=Et-1}return 0}class Kn{constructor(F,ae,we){this.type=F,this.input=ae,this.labels=[],this.outputs=[];for(const[je,Qe]of we)this.labels.push(je),this.outputs.push(Qe)}static parse(F,ae){if(F.length-1<4)return ae.error(`Expected at least 4 arguments, but found only ${F.length-1}.`);if((F.length-1)%2!=0)return ae.error("Expected an even number of arguments.");const we=ae.parse(F[1],1,ht);if(!we)return null;const je=[];let Qe=null;ae.expectedType&&ae.expectedType.kind!=="value"&&(Qe=ae.expectedType);for(let at=1;at<F.length;at+=2){const Et=at===1?-1/0:F[at],Ut=F[at+1],ir=at,Er=at+1;if(typeof Et!="number")return ae.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',ir);if(je.length&&je[je.length-1][0]>=Et)return ae.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',ir);const Ir=ae.parse(Ut,Er,Qe);if(!Ir)return null;Qe=Qe||Ir.type,je.push([Et,Ir])}return new Kn(Qe,we,je)}evaluate(F){const ae=this.labels,we=this.outputs;if(ae.length===1)return we[0].evaluate(F);const je=this.input.evaluate(F);if(je<=ae[0])return we[0].evaluate(F);const Qe=ae.length;return je>=ae[Qe-1]?we[Qe-1].evaluate(F):we[Sn(ae,je)].evaluate(F)}eachChild(F){F(this.input);for(const ae of this.outputs)F(ae)}outputDefined(){return this.outputs.every(F=>F.outputDefined())}}function Ui(K){return K&&K.__esModule&&Object.prototype.hasOwnProperty.call(K,"default")?K.default:K}var Za=Ki;function Ki(K,F,ae,we){this.cx=3*K,this.bx=3*(ae-K)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*F,this.by=3*(we-F)-this.cy,this.ay=1-this.cy-this.by,this.p1x=K,this.p1y=F,this.p2x=ae,this.p2y=we}Ki.prototype={sampleCurveX:function(K){return((this.ax*K+this.bx)*K+this.cx)*K},sampleCurveY:function(K){return((this.ay*K+this.by)*K+this.cy)*K},sampleCurveDerivativeX:function(K){return(3*this.ax*K+2*this.bx)*K+this.cx},solveCurveX:function(K,F){if(F===void 0&&(F=1e-6),K<0)return 0;if(K>1)return 1;for(var ae=K,we=0;we<8;we++){var je=this.sampleCurveX(ae)-K;if(Math.abs(je)<F)return ae;var Qe=this.sampleCurveDerivativeX(ae);if(Math.abs(Qe)<1e-6)break;ae-=je/Qe}var at=0,Et=1;for(ae=K,we=0;we<20&&(je=this.sampleCurveX(ae),!(Math.abs(je-K)<F));we++)K>je?at=ae:Et=ae,ae=.5*(Et-at)+at;return ae},solve:function(K,F){return this.sampleCurveY(this.solveCurveX(K,F))}};var ho=Ui(Za);function Co(K,F,ae){return K+ae*(F-K)}function So(K,F,ae){return K.map((we,je)=>Co(we,F[je],ae))}const Vo={number:Co,color:function(K,F,ae,we="rgb"){switch(we){case"rgb":{const[je,Qe,at,Et]=So(K.rgb,F.rgb,ae);return new br(je,Qe,at,Et,!1)}case"hcl":{const[je,Qe,at,Et]=K.hcl,[Ut,ir,Er,Ir]=F.hcl;let nn,vn;if(isNaN(je)||isNaN(Ut))isNaN(je)?isNaN(Ut)?nn=NaN:(nn=Ut,at!==1&&at!==0||(vn=ir)):(nn=je,Er!==1&&Er!==0||(vn=Qe));else{let Pi=Ut-je;Ut>je&&Pi>180?Pi-=360:Ut<je&&je-Ut>180&&(Pi+=360),nn=je+ae*Pi}const[Cn,jn,aa,Oa]=(function([Pi,oi,Ti,ao]){return Pi=isNaN(Pi)?0:Pi*Mr,Ta([Ti,Math.cos(Pi)*oi,Math.sin(Pi)*oi,ao])})([nn,vn??Co(Qe,ir,ae),Co(at,Er,ae),Co(Et,Ir,ae)]);return new br(Cn,jn,aa,Oa,!1)}case"lab":{const[je,Qe,at,Et]=Ta(So(K.lab,F.lab,ae));return new br(je,Qe,at,Et,!1)}}},array:So,padding:function(K,F,ae){return new Bn(So(K.values,F.values,ae))},variableAnchorOffsetCollection:function(K,F,ae){const we=K.values,je=F.values;if(we.length!==je.length)throw new Ht(`Cannot interpolate values of different length. from: ${K.toString()}, to: ${F.toString()}`);const Qe=[];for(let at=0;at<we.length;at+=2){if(we[at]!==je[at])throw new Ht(`Cannot interpolate values containing mismatched anchors. from[${at}]: ${we[at]}, to[${at}]: ${je[at]}`);Qe.push(we[at]);const[Et,Ut]=we[at+1],[ir,Er]=je[at+1];Qe.push([Co(Et,ir,ae),Co(Ut,Er,ae)])}return new za(Qe)}};class Oi{constructor(F,ae,we,je,Qe){this.type=F,this.operator=ae,this.interpolation=we,this.input=je,this.labels=[],this.outputs=[];for(const[at,Et]of Qe)this.labels.push(at),this.outputs.push(Et)}static interpolationFactor(F,ae,we,je){let Qe=0;if(F.name==="exponential")Qe=ps(ae,F.base,we,je);else if(F.name==="linear")Qe=ps(ae,1,we,je);else if(F.name==="cubic-bezier"){const at=F.controlPoints;Qe=new ho(at[0],at[1],at[2],at[3]).solve(ps(ae,1,we,je))}return Qe}static parse(F,ae){let[we,je,Qe,...at]=F;if(!Array.isArray(je)||je.length===0)return ae.error("Expected an interpolation type expression.",1);if(je[0]==="linear")je={name:"linear"};else if(je[0]==="exponential"){const ir=je[1];if(typeof ir!="number")return ae.error("Exponential interpolation requires a numeric base.",1,1);je={name:"exponential",base:ir}}else{if(je[0]!=="cubic-bezier")return ae.error(`Unknown interpolation type ${String(je[0])}`,1,0);{const ir=je.slice(1);if(ir.length!==4||ir.some(Er=>typeof Er!="number"||Er<0||Er>1))return ae.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);je={name:"cubic-bezier",controlPoints:ir}}}if(F.length-1<4)return ae.error(`Expected at least 4 arguments, but found only ${F.length-1}.`);if((F.length-1)%2!=0)return ae.error("Expected an even number of arguments.");if(Qe=ae.parse(Qe,2,ht),!Qe)return null;const Et=[];let Ut=null;we==="interpolate-hcl"||we==="interpolate-lab"?Ut=fr:ae.expectedType&&ae.expectedType.kind!=="value"&&(Ut=ae.expectedType);for(let ir=0;ir<at.length;ir+=2){const Er=at[ir],Ir=at[ir+1],nn=ir+3,vn=ir+4;if(typeof Er!="number")return ae.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',nn);if(Et.length&&Et[Et.length-1][0]>=Er)return ae.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',nn);const Cn=ae.parse(Ir,vn,Ut);if(!Cn)return null;Ut=Ut||Cn.type,Et.push([Er,Cn])}return tt(Ut,ht)||tt(Ut,fr)||tt(Ut,Br)||tt(Ut,Ot)||tt(Ut,$e(ht))?new Oi(Ut,we,je,Qe,Et):ae.error(`Type ${ot(Ut)} is not interpolatable.`)}evaluate(F){const ae=this.labels,we=this.outputs;if(ae.length===1)return we[0].evaluate(F);const je=this.input.evaluate(F);if(je<=ae[0])return we[0].evaluate(F);const Qe=ae.length;if(je>=ae[Qe-1])return we[Qe-1].evaluate(F);const at=Sn(ae,je),Et=Oi.interpolationFactor(this.interpolation,je,ae[at],ae[at+1]),Ut=we[at].evaluate(F),ir=we[at+1].evaluate(F);switch(this.operator){case"interpolate":return Vo[this.type.kind](Ut,ir,Et);case"interpolate-hcl":return Vo.color(Ut,ir,Et,"hcl");case"interpolate-lab":return Vo.color(Ut,ir,Et,"lab")}}eachChild(F){F(this.input);for(const ae of this.outputs)F(ae)}outputDefined(){return this.outputs.every(F=>F.outputDefined())}}function ps(K,F,ae,we){const je=we-ae,Qe=K-ae;return je===0?0:F===1?Qe/je:(Math.pow(F,Qe)-1)/(Math.pow(F,je)-1)}class as{constructor(F,ae){this.type=F,this.args=ae}static parse(F,ae){if(F.length<2)return ae.error("Expectected at least one argument.");let we=null;const je=ae.expectedType;je&&je.kind!=="value"&&(we=je);const Qe=[];for(const Et of F.slice(1)){const Ut=ae.parse(Et,1+Qe.length,we,void 0,{typeAnnotation:"omit"});if(!Ut)return null;we=we||Ut.type,Qe.push(Ut)}if(!we)throw new Error("No output type");const at=je&&Qe.some(Et=>Ee(je,Et.type));return new as(at?Ur:we,Qe)}evaluate(F){let ae,we=null,je=0;for(const Qe of this.args)if(je++,we=Qe.evaluate(F),we&&we instanceof Ia&&!we.available&&(ae||(ae=we.name),we=null,je===this.args.length&&(we=ae)),we!==null)break;return we}eachChild(F){this.args.forEach(F)}outputDefined(){return this.args.every(F=>F.outputDefined())}}function rl(K,F){return K==="=="||K==="!="?F.kind==="boolean"||F.kind==="string"||F.kind==="number"||F.kind==="null"||F.kind==="value":F.kind==="string"||F.kind==="number"||F.kind==="value"}function As(K,F,ae,we){return we.compare(F,ae)===0}function hs(K,F,ae){const we=K!=="=="&&K!=="!=";return class dK{constructor(Qe,at,Et){this.type=$t,this.lhs=Qe,this.rhs=at,this.collator=Et,this.hasUntypedArgument=Qe.type.kind==="value"||at.type.kind==="value"}static parse(Qe,at){if(Qe.length!==3&&Qe.length!==4)return at.error("Expected two or three arguments.");const Et=Qe[0];let Ut=at.parse(Qe[1],1,Ur);if(!Ut)return null;if(!rl(Et,Ut.type))return at.concat(1).error(`"${Et}" comparisons are not supported for type '${ot(Ut.type)}'.`);let ir=at.parse(Qe[2],2,Ur);if(!ir)return null;if(!rl(Et,ir.type))return at.concat(2).error(`"${Et}" comparisons are not supported for type '${ot(ir.type)}'.`);if(Ut.type.kind!==ir.type.kind&&Ut.type.kind!=="value"&&ir.type.kind!=="value")return at.error(`Cannot compare types '${ot(Ut.type)}' and '${ot(ir.type)}'.`);we&&(Ut.type.kind==="value"&&ir.type.kind!=="value"?Ut=new qr(ir.type,[Ut]):Ut.type.kind!=="value"&&ir.type.kind==="value"&&(ir=new qr(Ut.type,[ir])));let Er=null;if(Qe.length===4){if(Ut.type.kind!=="string"&&ir.type.kind!=="string"&&Ut.type.kind!=="value"&&ir.type.kind!=="value")return at.error("Cannot use collator to compare non-string types.");if(Er=at.parse(Qe[3],3,jr),!Er)return null}return new dK(Ut,ir,Er)}evaluate(Qe){const at=this.lhs.evaluate(Qe),Et=this.rhs.evaluate(Qe);if(we&&this.hasUntypedArgument){const Ut=fa(at),ir=fa(Et);if(Ut.kind!==ir.kind||Ut.kind!=="string"&&Ut.kind!=="number")throw new Ht(`Expected arguments for "${K}" to be (string, string) or (number, number), but found (${Ut.kind}, ${ir.kind}) instead.`)}if(this.collator&&!we&&this.hasUntypedArgument){const Ut=fa(at),ir=fa(Et);if(Ut.kind!=="string"||ir.kind!=="string")return F(Qe,at,Et)}return this.collator?ae(Qe,at,Et,this.collator.evaluate(Qe)):F(Qe,at,Et)}eachChild(Qe){Qe(this.lhs),Qe(this.rhs),this.collator&&Qe(this.collator)}outputDefined(){return!0}}}const ts=hs("==",function(K,F,ae){return F===ae},As),nl=hs("!=",function(K,F,ae){return F!==ae},function(K,F,ae,we){return!As(0,F,ae,we)}),Qs=hs("<",function(K,F,ae){return F<ae},function(K,F,ae,we){return we.compare(F,ae)<0}),_l=hs(">",function(K,F,ae){return F>ae},function(K,F,ae,we){return we.compare(F,ae)>0}),Ss=hs("<=",function(K,F,ae){return F<=ae},function(K,F,ae,we){return we.compare(F,ae)<=0}),ls=hs(">=",function(K,F,ae){return F>=ae},function(K,F,ae,we){return we.compare(F,ae)>=0});class Oo{constructor(F,ae,we){this.type=jr,this.locale=we,this.caseSensitive=F,this.diacriticSensitive=ae}static parse(F,ae){if(F.length!==2)return ae.error("Expected one argument.");const we=F[1];if(typeof we!="object"||Array.isArray(we))return ae.error("Collator options argument must be an object.");const je=ae.parse(we["case-sensitive"]!==void 0&&we["case-sensitive"],1,$t);if(!je)return null;const Qe=ae.parse(we["diacritic-sensitive"]!==void 0&&we["diacritic-sensitive"],1,$t);if(!Qe)return null;let at=null;return we.locale&&(at=ae.parse(we.locale,1,Yt),!at)?null:new Oo(je,Qe,at)}evaluate(F){return new an(this.caseSensitive.evaluate(F),this.diacriticSensitive.evaluate(F),this.locale?this.locale.evaluate(F):null)}eachChild(F){F(this.caseSensitive),F(this.diacriticSensitive),this.locale&&F(this.locale)}outputDefined(){return!1}}class Es{constructor(F,ae,we,je,Qe){this.type=Yt,this.number=F,this.locale=ae,this.currency=we,this.minFractionDigits=je,this.maxFractionDigits=Qe}static parse(F,ae){if(F.length!==3)return ae.error("Expected two arguments.");const we=ae.parse(F[1],1,ht);if(!we)return null;const je=F[2];if(typeof je!="object"||Array.isArray(je))return ae.error("NumberFormat options argument must be an object.");let Qe=null;if(je.locale&&(Qe=ae.parse(je.locale,1,Yt),!Qe))return null;let at=null;if(je.currency&&(at=ae.parse(je.currency,1,Yt),!at))return null;let Et=null;if(je["min-fraction-digits"]&&(Et=ae.parse(je["min-fraction-digits"],1,ht),!Et))return null;let Ut=null;return je["max-fraction-digits"]&&(Ut=ae.parse(je["max-fraction-digits"],1,ht),!Ut)?null:new Es(we,Qe,at,Et,Ut)}evaluate(F){return new Intl.NumberFormat(this.locale?this.locale.evaluate(F):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(F):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(F):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(F):void 0}).format(this.number.evaluate(F))}eachChild(F){F(this.number),this.locale&&F(this.locale),this.currency&&F(this.currency),this.minFractionDigits&&F(this.minFractionDigits),this.maxFractionDigits&&F(this.maxFractionDigits)}outputDefined(){return!1}}class xl{constructor(F){this.type=fn,this.sections=F}static parse(F,ae){if(F.length<2)return ae.error("Expected at least one argument.");const we=F[1];if(!Array.isArray(we)&&typeof we=="object")return ae.error("First argument must be an image or text section.");const je=[];let Qe=!1;for(let at=1;at<=F.length-1;++at){const Et=F[at];if(Qe&&typeof Et=="object"&&!Array.isArray(Et)){Qe=!1;let Ut=null;if(Et["font-scale"]&&(Ut=ae.parse(Et["font-scale"],1,ht),!Ut))return null;let ir=null;if(Et["text-font"]&&(ir=ae.parse(Et["text-font"],1,$e(Yt)),!ir))return null;let Er=null;if(Et["text-color"]&&(Er=ae.parse(Et["text-color"],1,fr),!Er))return null;const Ir=je[je.length-1];Ir.scale=Ut,Ir.font=ir,Ir.textColor=Er}else{const Ut=ae.parse(F[at],1,Ur);if(!Ut)return null;const ir=Ut.type.kind;if(ir!=="string"&&ir!=="value"&&ir!=="null"&&ir!=="resolvedImage")return ae.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");Qe=!0,je.push({content:Ut,scale:null,font:null,textColor:null})}}return new xl(je)}evaluate(F){return new Ln(this.sections.map(ae=>{const we=ae.content.evaluate(F);return fa(we)===Qr?new wn("",we,null,null,null):new wn(Bi(we),null,ae.scale?ae.scale.evaluate(F):null,ae.font?ae.font.evaluate(F).join(","):null,ae.textColor?ae.textColor.evaluate(F):null)}))}eachChild(F){for(const ae of this.sections)F(ae.content),ae.scale&&F(ae.scale),ae.font&&F(ae.font),ae.textColor&&F(ae.textColor)}outputDefined(){return!1}}class Ul{constructor(F){this.type=Qr,this.input=F}static parse(F,ae){if(F.length!==2)return ae.error("Expected two arguments.");const we=ae.parse(F[1],1,Yt);return we?new Ul(we):ae.error("No image name provided.")}evaluate(F){const ae=this.input.evaluate(F),we=Ia.fromString(ae);return we&&F.availableImages&&(we.available=F.availableImages.indexOf(ae)>-1),we}eachChild(F){F(this.input)}outputDefined(){return!1}}class Hl{constructor(F){this.type=ht,this.input=F}static parse(F,ae){if(F.length!==2)return ae.error(`Expected 1 argument, but found ${F.length-1} instead.`);const we=ae.parse(F[1],1);return we?we.type.kind!=="array"&&we.type.kind!=="string"&&we.type.kind!=="value"?ae.error(`Expected argument of type string or array, but found ${ot(we.type)} instead.`):new Hl(we):null}evaluate(F){const ae=this.input.evaluate(F);if(typeof ae=="string")return[...ae].length;if(Array.isArray(ae))return ae.length;throw new Ht(`Expected value to be of type string or array, but found ${ot(fa(ae))} instead.`)}eachChild(F){F(this.input)}outputDefined(){return!1}}const Fs=8192;function Ni(K,F){const ae=(180+K[0])/360,we=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+K[1]*Math.PI/360)))/360,je=Math.pow(2,F.z);return[Math.round(ae*je*Fs),Math.round(we*je*Fs)]}function wo(K,F){const ae=Math.pow(2,F.z);return[(je=(K[0]/Fs+F.x)/ae,360*je-180),(we=(K[1]/Fs+F.y)/ae,360/Math.PI*Math.atan(Math.exp((180-360*we)*Math.PI/180))-90)];var we,je}function ql(K,F){K[0]=Math.min(K[0],F[0]),K[1]=Math.min(K[1],F[1]),K[2]=Math.max(K[2],F[0]),K[3]=Math.max(K[3],F[1])}function Gs(K,F){return!(K[0]<=F[0]||K[2]>=F[2]||K[1]<=F[1]||K[3]>=F[3])}function Jo(K,F,ae){const we=K[0]-F[0],je=K[1]-F[1],Qe=K[0]-ae[0],at=K[1]-ae[1];return we*at-Qe*je==0&&we*Qe<=0&&je*at<=0}function Gl(K,F,ae,we){return(je=[we[0]-ae[0],we[1]-ae[1]])[0]*(Qe=[F[0]-K[0],F[1]-K[1]])[1]-je[1]*Qe[0]!=0&&!(!ms(K,F,ae,we)||!ms(ae,we,K,F));var je,Qe}function al(K,F,ae){for(const we of ae)for(let je=0;je<we.length-1;++je)if(Gl(K,F,we[je],we[je+1]))return!0;return!1}function bl(K,F,ae=!1){let we=!1;for(const Et of F)for(let Ut=0;Ut<Et.length-1;Ut++){if(Jo(K,Et[Ut],Et[Ut+1]))return ae;(Qe=Et[Ut])[1]>(je=K)[1]!=(at=Et[Ut+1])[1]>je[1]&&je[0]<(at[0]-Qe[0])*(je[1]-Qe[1])/(at[1]-Qe[1])+Qe[0]&&(we=!we)}var je,Qe,at;return we}function Iu(K,F){for(const ae of F)if(bl(K,ae))return!0;return!1}function _o(K,F){for(const ae of K)if(!bl(ae,F))return!1;for(let ae=0;ae<K.length-1;++ae)if(al(K[ae],K[ae+1],F))return!1;return!0}function Ps(K,F){for(const ae of F)if(_o(K,ae))return!0;return!1}function ms(K,F,ae,we){const je=we[0]-ae[0],Qe=we[1]-ae[1],at=(K[0]-ae[0])*Qe-je*(K[1]-ae[1]),Et=(F[0]-ae[0])*Qe-je*(F[1]-ae[1]);return at>0&&Et<0||at<0&&Et>0}function ru(K,F,ae){const we=[];for(let je=0;je<K.length;je++){const Qe=[];for(let at=0;at<K[je].length;at++){const Et=Ni(K[je][at],ae);ql(F,Et),Qe.push(Et)}we.push(Qe)}return we}function nu(K,F,ae){const we=[];for(let je=0;je<K.length;je++){const Qe=ru(K[je],F,ae);we.push(Qe)}return we}function Zo(K,F,ae,we){if(K[0]<ae[0]||K[0]>ae[2]){const je=.5*we;let Qe=K[0]-ae[0]>je?-we:ae[0]-K[0]>je?we:0;Qe===0&&(Qe=K[0]-ae[2]>je?-we:ae[2]-K[0]>je?we:0),K[0]+=Qe}ql(F,K)}function _u(K,F,ae,we){const je=Math.pow(2,we.z)*Fs,Qe=[we.x*Fs,we.y*Fs],at=[];for(const Et of K)for(const Ut of Et){const ir=[Ut.x+Qe[0],Ut.y+Qe[1]];Zo(ir,F,ae,je),at.push(ir)}return at}function Au(K,F,ae,we){const je=Math.pow(2,we.z)*Fs,Qe=[we.x*Fs,we.y*Fs],at=[];for(const Ut of K){const ir=[];for(const Er of Ut){const Ir=[Er.x+Qe[0],Er.y+Qe[1]];ql(F,Ir),ir.push(Ir)}at.push(ir)}if(F[2]-F[0]<=je/2){(Et=F)[0]=Et[1]=1/0,Et[2]=Et[3]=-1/0;for(const Ut of at)for(const ir of Ut)Zo(ir,F,ae,je)}var Et;return at}class Ys{constructor(F,ae){this.type=$t,this.geojson=F,this.geometries=ae}static parse(F,ae){if(F.length!==2)return ae.error(`'within' expression requires exactly one argument, but found ${F.length-1} instead.`);if(Ka(F[1])){const we=F[1];if(we.type==="FeatureCollection"){const je=[];for(const Qe of we.features){const{type:at,coordinates:Et}=Qe.geometry;at==="Polygon"&&je.push(Et),at==="MultiPolygon"&&je.push(...Et)}if(je.length)return new Ys(we,{type:"MultiPolygon",coordinates:je})}else if(we.type==="Feature"){const je=we.geometry.type;if(je==="Polygon"||je==="MultiPolygon")return new Ys(we,we.geometry)}else if(we.type==="Polygon"||we.type==="MultiPolygon")return new Ys(we,we)}return ae.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(F){if(F.geometry()!=null&&F.canonicalID()!=null){if(F.geometryType()==="Point")return(function(ae,we){const je=[1/0,1/0,-1/0,-1/0],Qe=[1/0,1/0,-1/0,-1/0],at=ae.canonicalID();if(we.type==="Polygon"){const Et=ru(we.coordinates,Qe,at),Ut=_u(ae.geometry(),je,Qe,at);if(!Gs(je,Qe))return!1;for(const ir of Ut)if(!bl(ir,Et))return!1}if(we.type==="MultiPolygon"){const Et=nu(we.coordinates,Qe,at),Ut=_u(ae.geometry(),je,Qe,at);if(!Gs(je,Qe))return!1;for(const ir of Ut)if(!Iu(ir,Et))return!1}return!0})(F,this.geometries);if(F.geometryType()==="LineString")return(function(ae,we){const je=[1/0,1/0,-1/0,-1/0],Qe=[1/0,1/0,-1/0,-1/0],at=ae.canonicalID();if(we.type==="Polygon"){const Et=ru(we.coordinates,Qe,at),Ut=Au(ae.geometry(),je,Qe,at);if(!Gs(je,Qe))return!1;for(const ir of Ut)if(!_o(ir,Et))return!1}if(we.type==="MultiPolygon"){const Et=nu(we.coordinates,Qe,at),Ut=Au(ae.geometry(),je,Qe,at);if(!Gs(je,Qe))return!1;for(const ir of Ut)if(!Ps(ir,Et))return!1}return!0})(F,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let Ol=class{constructor(K=[],F=(ae,we)=>ae<we?-1:ae>we?1:0){if(this.data=K,this.length=this.data.length,this.compare=F,this.length>0)for(let ae=(this.length>>1)-1;ae>=0;ae--)this._down(ae)}push(K){this.data.push(K),this._up(this.length++)}pop(){if(this.length===0)return;const K=this.data[0],F=this.data.pop();return--this.length>0&&(this.data[0]=F,this._down(0)),K}peek(){return this.data[0]}_up(K){const{data:F,compare:ae}=this,we=F[K];for(;K>0;){const je=K-1>>1,Qe=F[je];if(ae(we,Qe)>=0)break;F[K]=Qe,K=je}F[K]=we}_down(K){const{data:F,compare:ae}=this,we=this.length>>1,je=F[K];for(;K<we;){let Qe=1+(K<<1);const at=Qe+1;if(at<this.length&&ae(F[at],F[Qe])<0&&(Qe=at),ae(F[Qe],je)>=0)break;F[K]=F[Qe],K=Qe}F[K]=je}};function $l(K,F,ae,we,je){Ql(K,F,ae,we||K.length-1,je||Tf)}function Ql(K,F,ae,we,je){for(;we>ae;){if(we-ae>600){var Qe=we-ae+1,at=F-ae+1,Et=Math.log(Qe),Ut=.5*Math.exp(2*Et/3),ir=.5*Math.sqrt(Et*Ut*(Qe-Ut)/Qe)*(at-Qe/2<0?-1:1);Ql(K,F,Math.max(ae,Math.floor(F-at*Ut/Qe+ir)),Math.min(we,Math.floor(F+(Qe-at)*Ut/Qe+ir)),je)}var Er=K[F],Ir=ae,nn=we;for(ac(K,ae,F),je(K[we],Er)>0&&ac(K,ae,we);Ir<nn;){for(ac(K,Ir,nn),Ir++,nn--;je(K[Ir],Er)<0;)Ir++;for(;je(K[nn],Er)>0;)nn--}je(K[ae],Er)===0?ac(K,ae,nn):ac(K,++nn,we),nn<=F&&(ae=nn+1),F<=nn&&(we=nn-1)}}function ac(K,F,ae){var we=K[F];K[F]=K[ae],K[ae]=we}function Tf(K,F){return K<F?-1:K>F?1:0}function rf(K,F){if(K.length<=1)return[K];const ae=[];let we,je;for(const Qe of K){const at=Zh(Qe);at!==0&&(Qe.area=Math.abs(at),je===void 0&&(je=at<0),je===at<0?(we&&ae.push(we),we=[Qe]):we.push(Qe))}if(we&&ae.push(we),F>1)for(let Qe=0;Qe<ae.length;Qe++)ae[Qe].length<=F||($l(ae[Qe],F,1,ae[Qe].length-1,df),ae[Qe]=ae[Qe].slice(0,F));return ae}function df(K,F){return F.area-K.area}function Zh(K){let F=0;for(let ae,we,je=0,Qe=K.length,at=Qe-1;je<Qe;at=je++)ae=K[je],we=K[at],F+=(we.x-ae.x)*(ae.y+we.y);return F}const zh=1/298.257223563,zl=zh*(2-zh),Vc=Math.PI/180;class $h{constructor(F){const ae=6378.137*Vc*1e3,we=Math.cos(F*Vc),je=1/(1-zl*(1-we*we)),Qe=Math.sqrt(je);this.kx=ae*Qe*we,this.ky=ae*Qe*je*(1-zl)}distance(F,ae){const we=this.wrap(F[0]-ae[0])*this.kx,je=(F[1]-ae[1])*this.ky;return Math.sqrt(we*we+je*je)}pointOnLine(F,ae){let we,je,Qe,at,Et=1/0;for(let Ut=0;Ut<F.length-1;Ut++){let ir=F[Ut][0],Er=F[Ut][1],Ir=this.wrap(F[Ut+1][0]-ir)*this.kx,nn=(F[Ut+1][1]-Er)*this.ky,vn=0;Ir===0&&nn===0||(vn=(this.wrap(ae[0]-ir)*this.kx*Ir+(ae[1]-Er)*this.ky*nn)/(Ir*Ir+nn*nn),vn>1?(ir=F[Ut+1][0],Er=F[Ut+1][1]):vn>0&&(ir+=Ir/this.kx*vn,Er+=nn/this.ky*vn)),Ir=this.wrap(ae[0]-ir)*this.kx,nn=(ae[1]-Er)*this.ky;const Cn=Ir*Ir+nn*nn;Cn<Et&&(Et=Cn,we=ir,je=Er,Qe=Ut,at=vn)}return{point:[we,je],index:Qe,t:Math.max(0,Math.min(1,at))}}wrap(F){for(;F<-180;)F+=360;for(;F>180;)F-=360;return F}}function pc(K,F){return F[0]-K[0]}function ic(K){return K[1]-K[0]+1}function mc(K,F){return K[1]>=K[0]&&K[1]<F}function vf(K,F){if(K[0]>K[1])return[null,null];const ae=ic(K);if(F){if(ae===2)return[K,null];const je=Math.floor(ae/2);return[[K[0],K[0]+je],[K[0]+je,K[1]]]}if(ae===1)return[K,null];const we=Math.floor(ae/2)-1;return[[K[0],K[0]+we],[K[0]+we+1,K[1]]]}function uu(K,F){if(!mc(F,K.length))return[1/0,1/0,-1/0,-1/0];const ae=[1/0,1/0,-1/0,-1/0];for(let we=F[0];we<=F[1];++we)ql(ae,K[we]);return ae}function oc(K){const F=[1/0,1/0,-1/0,-1/0];for(const ae of K)for(const we of ae)ql(F,we);return F}function el(K){return K[0]!==-1/0&&K[1]!==-1/0&&K[2]!==1/0&&K[3]!==1/0}function Xl(K,F,ae){if(!el(K)||!el(F))return NaN;let we=0,je=0;return K[2]<F[0]&&(we=F[0]-K[2]),K[0]>F[2]&&(we=K[0]-F[2]),K[1]>F[3]&&(je=K[1]-F[3]),K[3]<F[1]&&(je=F[1]-K[3]),ae.distance([0,0],[we,je])}function zf(K,F,ae){const we=ae.pointOnLine(F,K);return ae.distance(K,we.point)}function Lc(K,F,ae,we,je){const Qe=Math.min(zf(K,[ae,we],je),zf(F,[ae,we],je)),at=Math.min(zf(ae,[K,F],je),zf(we,[K,F],je));return Math.min(Qe,at)}function $f(K,F,ae,we,je){if(!mc(F,K.length)||!mc(we,ae.length))return 1/0;let Qe=1/0;for(let at=F[0];at<F[1];++at){const Et=K[at],Ut=K[at+1];for(let ir=we[0];ir<we[1];++ir){const Er=ae[ir],Ir=ae[ir+1];if(Gl(Et,Ut,Er,Ir))return 0;Qe=Math.min(Qe,Lc(Et,Ut,Er,Ir,je))}}return Qe}function xu(K,F,ae,we,je){if(!mc(F,K.length)||!mc(we,ae.length))return NaN;let Qe=1/0;for(let at=F[0];at<=F[1];++at)for(let Et=we[0];Et<=we[1];++Et)if(Qe=Math.min(Qe,je.distance(K[at],ae[Et])),Qe===0)return Qe;return Qe}function Wd(K,F,ae){if(bl(K,F,!0))return 0;let we=1/0;for(const je of F){const Qe=je[0],at=je[je.length-1];if(Qe!==at&&(we=Math.min(we,zf(K,[at,Qe],ae)),we===0))return we;const Et=ae.pointOnLine(je,K);if(we=Math.min(we,ae.distance(K,Et.point)),we===0)return we}return we}function Zs(K,F,ae,we){if(!mc(F,K.length))return NaN;for(let Qe=F[0];Qe<=F[1];++Qe)if(bl(K[Qe],ae,!0))return 0;let je=1/0;for(let Qe=F[0];Qe<F[1];++Qe){const at=K[Qe],Et=K[Qe+1];for(const Ut of ae)for(let ir=0,Er=Ut.length,Ir=Er-1;ir<Er;Ir=ir++){const nn=Ut[Ir],vn=Ut[ir];if(Gl(at,Et,nn,vn))return 0;je=Math.min(je,Lc(at,Et,nn,vn,we))}}return je}function dv(K,F){for(const ae of K)for(const we of ae)if(bl(we,F,!0))return!0;return!1}function Ml(K,F,ae,we=1/0){const je=oc(K),Qe=oc(F);if(we!==1/0&&Xl(je,Qe,ae)>=we)return we;if(Gs(je,Qe)){if(dv(K,F))return 0}else if(dv(F,K))return 0;let at=1/0;for(const Et of K)for(let Ut=0,ir=Et.length,Er=ir-1;Ut<ir;Er=Ut++){const Ir=Et[Er],nn=Et[Ut];for(const vn of F)for(let Cn=0,jn=vn.length,aa=jn-1;Cn<jn;aa=Cn++){const Oa=vn[aa],Pi=vn[Cn];if(Gl(Ir,nn,Oa,Pi))return 0;at=Math.min(at,Lc(Ir,nn,Oa,Pi,ae))}}return at}function Ko(K,F,ae,we,je,Qe){if(!Qe)return;const at=Xl(uu(we,Qe),je,ae);at<F&&K.push([at,Qe,[0,0]])}function ph(K,F,ae,we,je,Qe,at){if(!Qe||!at)return;const Et=Xl(uu(we,Qe),uu(je,at),ae);Et<F&&K.push([Et,Qe,at])}function pf(K,F,ae,we,je=1/0){let Qe=Math.min(we.distance(K[0],ae[0][0]),je);if(Qe===0)return Qe;const at=new Ol([[0,[0,K.length-1],[0,0]]],pc),Et=oc(ae);for(;at.length>0;){const Ut=at.pop();if(Ut[0]>=Qe)continue;const ir=Ut[1],Er=F?50:100;if(ic(ir)<=Er){if(!mc(ir,K.length))return NaN;if(F){const Ir=Zs(K,ir,ae,we);if(isNaN(Ir)||Ir===0)return Ir;Qe=Math.min(Qe,Ir)}else for(let Ir=ir[0];Ir<=ir[1];++Ir){const nn=Wd(K[Ir],ae,we);if(Qe=Math.min(Qe,nn),Qe===0)return 0}}else{const Ir=vf(ir,F);Ko(at,Qe,we,K,Et,Ir[0]),Ko(at,Qe,we,K,Et,Ir[1])}}return Qe}function Yu(K,F,ae,we,je,Qe=1/0){let at=Math.min(Qe,je.distance(K[0],ae[0]));if(at===0)return at;const Et=new Ol([[0,[0,K.length-1],[0,ae.length-1]]],pc);for(;Et.length>0;){const Ut=Et.pop();if(Ut[0]>=at)continue;const ir=Ut[1],Er=Ut[2],Ir=F?50:100,nn=we?50:100;if(ic(ir)<=Ir&&ic(Er)<=nn){if(!mc(ir,K.length)&&mc(Er,ae.length))return NaN;let vn;if(F&&we)vn=$f(K,ir,ae,Er,je),at=Math.min(at,vn);else if(F&&!we){const Cn=K.slice(ir[0],ir[1]+1);for(let jn=Er[0];jn<=Er[1];++jn)if(vn=zf(ae[jn],Cn,je),at=Math.min(at,vn),at===0)return at}else if(!F&&we){const Cn=ae.slice(Er[0],Er[1]+1);for(let jn=ir[0];jn<=ir[1];++jn)if(vn=zf(K[jn],Cn,je),at=Math.min(at,vn),at===0)return at}else vn=xu(K,ir,ae,Er,je),at=Math.min(at,vn)}else{const vn=vf(ir,F),Cn=vf(Er,we);ph(Et,at,je,K,ae,vn[0],Cn[0]),ph(Et,at,je,K,ae,vn[0],Cn[1]),ph(Et,at,je,K,ae,vn[1],Cn[0]),ph(Et,at,je,K,ae,vn[1],Cn[1])}}return at}function Kh(K){return K.type==="MultiPolygon"?K.coordinates.map(F=>({type:"Polygon",coordinates:F})):K.type==="MultiLineString"?K.coordinates.map(F=>({type:"LineString",coordinates:F})):K.type==="MultiPoint"?K.coordinates.map(F=>({type:"Point",coordinates:F})):[K]}class Kf{constructor(F,ae){this.type=ht,this.geojson=F,this.geometries=ae}static parse(F,ae){if(F.length!==2)return ae.error(`'distance' expression requires exactly one argument, but found ${F.length-1} instead.`);if(Ka(F[1])){const we=F[1];if(we.type==="FeatureCollection")return new Kf(we,we.features.map(je=>Kh(je.geometry)).flat());if(we.type==="Feature")return new Kf(we,Kh(we.geometry));if("type"in we&&"coordinates"in we)return new Kf(we,Kh(we))}return ae.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(F){if(F.geometry()!=null&&F.canonicalID()!=null){if(F.geometryType()==="Point")return(function(ae,we){const je=ae.geometry(),Qe=je.flat().map(Ut=>wo([Ut.x,Ut.y],ae.canonical));if(je.length===0)return NaN;const at=new $h(Qe[0][1]);let Et=1/0;for(const Ut of we){switch(Ut.type){case"Point":Et=Math.min(Et,Yu(Qe,!1,[Ut.coordinates],!1,at,Et));break;case"LineString":Et=Math.min(Et,Yu(Qe,!1,Ut.coordinates,!0,at,Et));break;case"Polygon":Et=Math.min(Et,pf(Qe,!1,Ut.coordinates,at,Et))}if(Et===0)return Et}return Et})(F,this.geometries);if(F.geometryType()==="LineString")return(function(ae,we){const je=ae.geometry(),Qe=je.flat().map(Ut=>wo([Ut.x,Ut.y],ae.canonical));if(je.length===0)return NaN;const at=new $h(Qe[0][1]);let Et=1/0;for(const Ut of we){switch(Ut.type){case"Point":Et=Math.min(Et,Yu(Qe,!0,[Ut.coordinates],!1,at,Et));break;case"LineString":Et=Math.min(Et,Yu(Qe,!0,Ut.coordinates,!0,at,Et));break;case"Polygon":Et=Math.min(Et,pf(Qe,!0,Ut.coordinates,at,Et))}if(Et===0)return Et}return Et})(F,this.geometries);if(F.geometryType()==="Polygon")return(function(ae,we){const je=ae.geometry();if(je.length===0||je[0].length===0)return NaN;const Qe=rf(je,0).map(Ut=>Ut.map(ir=>ir.map(Er=>wo([Er.x,Er.y],ae.canonical)))),at=new $h(Qe[0][0][0][1]);let Et=1/0;for(const Ut of we)for(const ir of Qe){switch(Ut.type){case"Point":Et=Math.min(Et,pf([Ut.coordinates],!1,ir,at,Et));break;case"LineString":Et=Math.min(Et,pf(Ut.coordinates,!0,ir,at,Et));break;case"Polygon":Et=Math.min(Et,Ml(ir,Ut.coordinates,at,Et))}if(Et===0)return Et}return Et})(F,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}const Ah={"==":ts,"!=":nl,">":_l,"<":Qs,">=":ls,"<=":Ss,array:qr,at:xr,boolean:qr,case:sa,coalesce:as,collator:Oo,format:xl,image:Ul,in:Yr,"index-of":An,interpolate:Oi,"interpolate-hcl":Oi,"interpolate-lab":Oi,length:Hl,let:dn,literal:Yi,match:Zn,number:qr,"number-format":Es,object:qr,slice:oa,step:Kn,string:qr,"to-boolean":rn,"to-color":rn,"to-number":rn,"to-string":rn,var:It,within:Ys,distance:Kf};class sc{constructor(F,ae,we,je){this.name=F,this.type=ae,this._evaluate=we,this.args=je}evaluate(F){return this._evaluate(F,this.args)}eachChild(F){this.args.forEach(F)}outputDefined(){return!1}static parse(F,ae){const we=F[0],je=sc.definitions[we];if(!je)return ae.error(`Unknown expression "${we}". If you wanted a literal array, use ["literal", [...]].`,0);const Qe=Array.isArray(je)?je[0]:je.type,at=Array.isArray(je)?[[je[1],je[2]]]:je.overloads,Et=at.filter(([ir])=>!Array.isArray(ir)||ir.length===F.length-1);let Ut=null;for(const[ir,Er]of Et){Ut=new Tn(ae.registry,Jh,ae.path,null,ae.scope);const Ir=[];let nn=!1;for(let vn=1;vn<F.length;vn++){const Cn=F[vn],jn=Array.isArray(ir)?ir[vn-1]:ir.type,aa=Ut.parse(Cn,1+Ir.length,jn);if(!aa){nn=!0;break}Ir.push(aa)}if(!nn)if(Array.isArray(ir)&&ir.length!==Ir.length)Ut.error(`Expected ${ir.length} arguments, but found ${Ir.length} instead.`);else{for(let vn=0;vn<Ir.length;vn++){const Cn=Array.isArray(ir)?ir[vn]:ir.type,jn=Ir[vn];Ut.concat(vn+1).checkSubtype(Cn,jn.type)}if(Ut.errors.length===0)return new sc(we,Qe,Er,Ir)}}if(Et.length===1)ae.errors.push(...Ut.errors);else{const ir=(Et.length?Et:at).map(([Ir])=>{return nn=Ir,Array.isArray(nn)?`(${nn.map(ot).join(", ")})`:`(${ot(nn.type)}...)`;var nn}).join(" | "),Er=[];for(let Ir=1;Ir<F.length;Ir++){const nn=ae.parse(F[Ir],1+Er.length);if(!nn)return null;Er.push(ot(nn.type))}ae.error(`Expected arguments of type ${ir}, but found (${Er.join(", ")}) instead.`)}return null}static register(F,ae){sc.definitions=ae;for(const we in ae)F[we]=sc}}function Ld(K,[F,ae,we,je]){F=F.evaluate(K),ae=ae.evaluate(K),we=we.evaluate(K);const Qe=je?je.evaluate(K):1,at=Ba(F,ae,we,Qe);if(at)throw new Ht(at);return new br(F/255,ae/255,we/255,Qe,!1)}function sd(K,F){return K in F}function Sh(K,F){const ae=F[K];return ae===void 0?null:ae}function Jf(K){return{type:K}}function Jh(K){if(K instanceof It)return Jh(K.boundExpression);if(K instanceof sc&&K.name==="error"||K instanceof Oo||K instanceof Ys||K instanceof Kf)return!1;const F=K instanceof rn||K instanceof qr;let ae=!0;return K.eachChild(we=>{ae=F?ae&&Jh(we):ae&&we instanceof Yi}),!!ae&&Qh(K)&&ld(K,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function Qh(K){if(K instanceof sc&&(K.name==="get"&&K.args.length===1||K.name==="feature-state"||K.name==="has"&&K.args.length===1||K.name==="properties"||K.name==="geometry-type"||K.name==="id"||/^filter-/.test(K.name))||K instanceof Ys||K instanceof Kf)return!1;let F=!0;return K.eachChild(ae=>{F&&!Qh(ae)&&(F=!1)}),F}function mf(K){if(K instanceof sc&&K.name==="feature-state")return!1;let F=!0;return K.eachChild(ae=>{F&&!mf(ae)&&(F=!1)}),F}function ld(K,F){if(K instanceof sc&&F.indexOf(K.name)>=0)return!1;let ae=!0;return K.eachChild(we=>{ae&&!ld(we,F)&&(ae=!1)}),ae}function Nf(K){return{result:"success",value:K}}function Af(K){return{result:"error",value:K}}function lc(K){return K["property-type"]==="data-driven"||K["property-type"]==="cross-faded-data-driven"}function lh(K){return!!K.expression&&K.expression.parameters.indexOf("zoom")>-1}function ed(K){return!!K.expression&&K.expression.interpolated}function Kl(K){return K instanceof Number?"number":K instanceof String?"string":K instanceof Boolean?"boolean":Array.isArray(K)?"array":K===null?"null":typeof K}function Nh(K){return typeof K=="object"&&K!==null&&!Array.isArray(K)}function Yd(K){return K}function ud(K,F){const ae=F.type==="color",we=K.stops&&typeof K.stops[0][0]=="object",je=we||!(we||K.property!==void 0),Qe=K.type||(ed(F)?"exponential":"interval");if(ae||F.type==="padding"){const Er=ae?br.parse:Bn.parse;(K=be({},K)).stops&&(K.stops=K.stops.map(Ir=>[Ir[0],Er(Ir[1])])),K.default=Er(K.default?K.default:F.default)}if(K.colorSpace&&(at=K.colorSpace)!=="rgb"&&at!=="hcl"&&at!=="lab")throw new Error(`Unknown color space: "${K.colorSpace}"`);var at;let Et,Ut,ir;if(Qe==="exponential")Et=fd;else if(Qe==="interval")Et=Hc;else if(Qe==="categorical"){Et=cd,Ut=Object.create(null);for(const Er of K.stops)Ut[Er[0]]=Er[1];ir=typeof K.stops[0][0]}else{if(Qe!=="identity")throw new Error(`Unknown function type "${Qe}"`);Et=Pu}if(we){const Er={},Ir=[];for(let Cn=0;Cn<K.stops.length;Cn++){const jn=K.stops[Cn],aa=jn[0].zoom;Er[aa]===void 0&&(Er[aa]={zoom:aa,type:K.type,property:K.property,default:K.default,stops:[]},Ir.push(aa)),Er[aa].stops.push([jn[0].value,jn[1]])}const nn=[];for(const Cn of Ir)nn.push([Er[Cn].zoom,ud(Er[Cn],F)]);const vn={name:"linear"};return{kind:"composite",interpolationType:vn,interpolationFactor:Oi.interpolationFactor.bind(void 0,vn),zoomStops:nn.map(Cn=>Cn[0]),evaluate:({zoom:Cn},jn)=>fd({stops:nn,base:K.base},F,Cn).evaluate(Cn,jn)}}if(je){const Er=Qe==="exponential"?{name:"exponential",base:K.base!==void 0?K.base:1}:null;return{kind:"camera",interpolationType:Er,interpolationFactor:Oi.interpolationFactor.bind(void 0,Er),zoomStops:K.stops.map(Ir=>Ir[0]),evaluate:({zoom:Ir})=>Et(K,F,Ir,Ut,ir)}}return{kind:"source",evaluate(Er,Ir){const nn=Ir&&Ir.properties?Ir.properties[K.property]:void 0;return nn===void 0?Eh(K.default,F.default):Et(K,F,nn,Ut,ir)}}}function Eh(K,F,ae){return K!==void 0?K:F!==void 0?F:ae!==void 0?ae:void 0}function cd(K,F,ae,we,je){return Eh(typeof ae===je?we[ae]:void 0,K.default,F.default)}function Hc(K,F,ae){if(Kl(ae)!=="number")return Eh(K.default,F.default);const we=K.stops.length;if(we===1||ae<=K.stops[0][0])return K.stops[0][1];if(ae>=K.stops[we-1][0])return K.stops[we-1][1];const je=Sn(K.stops.map(Qe=>Qe[0]),ae);return K.stops[je][1]}function fd(K,F,ae){const we=K.base!==void 0?K.base:1;if(Kl(ae)!=="number")return Eh(K.default,F.default);const je=K.stops.length;if(je===1||ae<=K.stops[0][0])return K.stops[0][1];if(ae>=K.stops[je-1][0])return K.stops[je-1][1];const Qe=Sn(K.stops.map(Er=>Er[0]),ae),at=(function(Er,Ir,nn,vn){const Cn=vn-nn,jn=Er-nn;return Cn===0?0:Ir===1?jn/Cn:(Math.pow(Ir,jn)-1)/(Math.pow(Ir,Cn)-1)})(ae,we,K.stops[Qe][0],K.stops[Qe+1][0]),Et=K.stops[Qe][1],Ut=K.stops[Qe+1][1],ir=Vo[F.type]||Yd;return typeof Et.evaluate=="function"?{evaluate(...Er){const Ir=Et.evaluate.apply(void 0,Er),nn=Ut.evaluate.apply(void 0,Er);if(Ir!==void 0&&nn!==void 0)return ir(Ir,nn,at,K.colorSpace)}}:ir(Et,Ut,at,K.colorSpace)}function Pu(K,F,ae){switch(F.type){case"color":ae=br.parse(ae);break;case"formatted":ae=Ln.fromString(ae.toString());break;case"resolvedImage":ae=Ia.fromString(ae.toString());break;case"padding":ae=Bn.parse(ae);break;default:Kl(ae)===F.type||F.type==="enum"&&F.values[ae]||(ae=void 0)}return Eh(ae,K.default,F.default)}sc.register(Ah,{error:[{kind:"error"},[Yt],(K,[F])=>{throw new Ht(F.evaluate(K))}],typeof:[Yt,[Ur],(K,[F])=>ot(fa(F.evaluate(K)))],"to-rgba":[$e(ht,4),[fr],(K,[F])=>{const[ae,we,je,Qe]=F.evaluate(K).rgb;return[255*ae,255*we,255*je,Qe]}],rgb:[fr,[ht,ht,ht],Ld],rgba:[fr,[ht,ht,ht,ht],Ld],has:{type:$t,overloads:[[[Yt],(K,[F])=>sd(F.evaluate(K),K.properties())],[[Yt,mr],(K,[F,ae])=>sd(F.evaluate(K),ae.evaluate(K))]]},get:{type:Ur,overloads:[[[Yt],(K,[F])=>Sh(F.evaluate(K),K.properties())],[[Yt,mr],(K,[F,ae])=>Sh(F.evaluate(K),ae.evaluate(K))]]},"feature-state":[Ur,[Yt],(K,[F])=>Sh(F.evaluate(K),K.featureState||{})],properties:[mr,[],K=>K.properties()],"geometry-type":[Yt,[],K=>K.geometryType()],id:[Ur,[],K=>K.id()],zoom:[ht,[],K=>K.globals.zoom],"heatmap-density":[ht,[],K=>K.globals.heatmapDensity||0],"line-progress":[ht,[],K=>K.globals.lineProgress||0],accumulated:[Ur,[],K=>K.globals.accumulated===void 0?null:K.globals.accumulated],"+":[ht,Jf(ht),(K,F)=>{let ae=0;for(const we of F)ae+=we.evaluate(K);return ae}],"*":[ht,Jf(ht),(K,F)=>{let ae=1;for(const we of F)ae*=we.evaluate(K);return ae}],"-":{type:ht,overloads:[[[ht,ht],(K,[F,ae])=>F.evaluate(K)-ae.evaluate(K)],[[ht],(K,[F])=>-F.evaluate(K)]]},"/":[ht,[ht,ht],(K,[F,ae])=>F.evaluate(K)/ae.evaluate(K)],"%":[ht,[ht,ht],(K,[F,ae])=>F.evaluate(K)%ae.evaluate(K)],ln2:[ht,[],()=>Math.LN2],pi:[ht,[],()=>Math.PI],e:[ht,[],()=>Math.E],"^":[ht,[ht,ht],(K,[F,ae])=>Math.pow(F.evaluate(K),ae.evaluate(K))],sqrt:[ht,[ht],(K,[F])=>Math.sqrt(F.evaluate(K))],log10:[ht,[ht],(K,[F])=>Math.log(F.evaluate(K))/Math.LN10],ln:[ht,[ht],(K,[F])=>Math.log(F.evaluate(K))],log2:[ht,[ht],(K,[F])=>Math.log(F.evaluate(K))/Math.LN2],sin:[ht,[ht],(K,[F])=>Math.sin(F.evaluate(K))],cos:[ht,[ht],(K,[F])=>Math.cos(F.evaluate(K))],tan:[ht,[ht],(K,[F])=>Math.tan(F.evaluate(K))],asin:[ht,[ht],(K,[F])=>Math.asin(F.evaluate(K))],acos:[ht,[ht],(K,[F])=>Math.acos(F.evaluate(K))],atan:[ht,[ht],(K,[F])=>Math.atan(F.evaluate(K))],min:[ht,Jf(ht),(K,F)=>Math.min(...F.map(ae=>ae.evaluate(K)))],max:[ht,Jf(ht),(K,F)=>Math.max(...F.map(ae=>ae.evaluate(K)))],abs:[ht,[ht],(K,[F])=>Math.abs(F.evaluate(K))],round:[ht,[ht],(K,[F])=>{const ae=F.evaluate(K);return ae<0?-Math.round(-ae):Math.round(ae)}],floor:[ht,[ht],(K,[F])=>Math.floor(F.evaluate(K))],ceil:[ht,[ht],(K,[F])=>Math.ceil(F.evaluate(K))],"filter-==":[$t,[Yt,Ur],(K,[F,ae])=>K.properties()[F.value]===ae.value],"filter-id-==":[$t,[Ur],(K,[F])=>K.id()===F.value],"filter-type-==":[$t,[Yt],(K,[F])=>K.geometryType()===F.value],"filter-<":[$t,[Yt,Ur],(K,[F,ae])=>{const we=K.properties()[F.value],je=ae.value;return typeof we==typeof je&&we<je}],"filter-id-<":[$t,[Ur],(K,[F])=>{const ae=K.id(),we=F.value;return typeof ae==typeof we&&ae<we}],"filter->":[$t,[Yt,Ur],(K,[F,ae])=>{const we=K.properties()[F.value],je=ae.value;return typeof we==typeof je&&we>je}],"filter-id->":[$t,[Ur],(K,[F])=>{const ae=K.id(),we=F.value;return typeof ae==typeof we&&ae>we}],"filter-<=":[$t,[Yt,Ur],(K,[F,ae])=>{const we=K.properties()[F.value],je=ae.value;return typeof we==typeof je&&we<=je}],"filter-id-<=":[$t,[Ur],(K,[F])=>{const ae=K.id(),we=F.value;return typeof ae==typeof we&&ae<=we}],"filter->=":[$t,[Yt,Ur],(K,[F,ae])=>{const we=K.properties()[F.value],je=ae.value;return typeof we==typeof je&&we>=je}],"filter-id->=":[$t,[Ur],(K,[F])=>{const ae=K.id(),we=F.value;return typeof ae==typeof we&&ae>=we}],"filter-has":[$t,[Ur],(K,[F])=>F.value in K.properties()],"filter-has-id":[$t,[],K=>K.id()!==null&&K.id()!==void 0],"filter-type-in":[$t,[$e(Yt)],(K,[F])=>F.value.indexOf(K.geometryType())>=0],"filter-id-in":[$t,[$e(Ur)],(K,[F])=>F.value.indexOf(K.id())>=0],"filter-in-small":[$t,[Yt,$e(Ur)],(K,[F,ae])=>ae.value.indexOf(K.properties()[F.value])>=0],"filter-in-large":[$t,[Yt,$e(Ur)],(K,[F,ae])=>(function(we,je,Qe,at){for(;Qe<=at;){const Et=Qe+at>>1;if(je[Et]===we)return!0;je[Et]>we?at=Et-1:Qe=Et+1}return!1})(K.properties()[F.value],ae.value,0,ae.value.length-1)],all:{type:$t,overloads:[[[$t,$t],(K,[F,ae])=>F.evaluate(K)&&ae.evaluate(K)],[Jf($t),(K,F)=>{for(const ae of F)if(!ae.evaluate(K))return!1;return!0}]]},any:{type:$t,overloads:[[[$t,$t],(K,[F,ae])=>F.evaluate(K)||ae.evaluate(K)],[Jf($t),(K,F)=>{for(const ae of F)if(ae.evaluate(K))return!0;return!1}]]},"!":[$t,[$t],(K,[F])=>!F.evaluate(K)],"is-supported-script":[$t,[Yt],(K,[F])=>{const ae=K.globals&&K.globals.isSupportedScript;return!ae||ae(F.evaluate(K))}],upcase:[Yt,[Yt],(K,[F])=>F.evaluate(K).toUpperCase()],downcase:[Yt,[Yt],(K,[F])=>F.evaluate(K).toLowerCase()],concat:[Yt,Jf(Ur),(K,F)=>F.map(ae=>Bi(ae.evaluate(K))).join("")],"resolved-locale":[Yt,[jr],(K,[F])=>F.evaluate(K).resolvedLocale()]});class Gc{constructor(F,ae){var we;this.expression=F,this._warningHistory={},this._evaluator=new tn,this._defaultValue=ae?(we=ae).type==="color"&&Nh(we.default)?new br(0,0,0,0):we.type==="color"?br.parse(we.default)||null:we.type==="padding"?Bn.parse(we.default)||null:we.type==="variableAnchorOffsetCollection"?za.parse(we.default)||null:we.default===void 0?null:we.default:null,this._enumValues=ae&&ae.type==="enum"?ae.values:null}evaluateWithoutErrorHandling(F,ae,we,je,Qe,at){return this._evaluator.globals=F,this._evaluator.feature=ae,this._evaluator.featureState=we,this._evaluator.canonical=je,this._evaluator.availableImages=Qe||null,this._evaluator.formattedSection=at,this.expression.evaluate(this._evaluator)}evaluate(F,ae,we,je,Qe,at){this._evaluator.globals=F,this._evaluator.feature=ae||null,this._evaluator.featureState=we||null,this._evaluator.canonical=je,this._evaluator.availableImages=Qe||null,this._evaluator.formattedSection=at||null;try{const Et=this.expression.evaluate(this._evaluator);if(Et==null||typeof Et=="number"&&Et!=Et)return this._defaultValue;if(this._enumValues&&!(Et in this._enumValues))throw new Ht(`Expected value to be one of ${Object.keys(this._enumValues).map(Ut=>JSON.stringify(Ut)).join(", ")}, but found ${JSON.stringify(Et)} instead.`);return Et}catch(Et){return this._warningHistory[Et.message]||(this._warningHistory[Et.message]=!0,typeof console<"u"&&console.warn(Et.message)),this._defaultValue}}}function Qf(K){return Array.isArray(K)&&K.length>0&&typeof K[0]=="string"&&K[0]in Ah}function cu(K,F){const ae=new Tn(Ah,Jh,[],F?(function(je){const Qe={color:fr,string:Yt,number:ht,enum:Yt,boolean:$t,formatted:fn,padding:Br,resolvedImage:Qr,variableAnchorOffsetCollection:Ot};return je.type==="array"?$e(Qe[je.value]||Ur,je.length):Qe[je.type]})(F):void 0),we=ae.parse(K,void 0,void 0,void 0,F&&F.type==="string"?{typeAnnotation:"coerce"}:void 0);return we?Nf(new Gc(we,F)):Af(ae.errors)}class Ff{constructor(F,ae){this.kind=F,this._styleExpression=ae,this.isStateDependent=F!=="constant"&&!mf(ae.expression)}evaluateWithoutErrorHandling(F,ae,we,je,Qe,at){return this._styleExpression.evaluateWithoutErrorHandling(F,ae,we,je,Qe,at)}evaluate(F,ae,we,je,Qe,at){return this._styleExpression.evaluate(F,ae,we,je,Qe,at)}}class Sc{constructor(F,ae,we,je){this.kind=F,this.zoomStops=we,this._styleExpression=ae,this.isStateDependent=F!=="camera"&&!mf(ae.expression),this.interpolationType=je}evaluateWithoutErrorHandling(F,ae,we,je,Qe,at){return this._styleExpression.evaluateWithoutErrorHandling(F,ae,we,je,Qe,at)}evaluate(F,ae,we,je,Qe,at){return this._styleExpression.evaluate(F,ae,we,je,Qe,at)}interpolationFactor(F,ae,we){return this.interpolationType?Oi.interpolationFactor(this.interpolationType,F,ae,we):0}}function Xc(K,F){const ae=cu(K,F);if(ae.result==="error")return ae;const we=ae.value.expression,je=Qh(we);if(!je&&!lc(F))return Af([new Ye("","data expressions not supported")]);const Qe=ld(we,["zoom"]);if(!Qe&&!lh(F))return Af([new Ye("","zoom expressions not supported")]);const at=mh(we);return at||Qe?at instanceof Ye?Af([at]):at instanceof Oi&&!ed(F)?Af([new Ye("",'"interpolate" expressions cannot be used with this property')]):Nf(at?new Sc(je?"camera":"composite",ae.value,at.labels,at instanceof Oi?at.interpolation:void 0):new Ff(je?"constant":"source",ae.value)):Af([new Ye("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class bu{constructor(F,ae){this._parameters=F,this._specification=ae,be(this,ud(this._parameters,this._specification))}static deserialize(F){return new bu(F._parameters,F._specification)}static serialize(F){return{_parameters:F._parameters,_specification:F._specification}}}function mh(K){let F=null;if(K instanceof dn)F=mh(K.result);else if(K instanceof as){for(const ae of K.args)if(F=mh(ae),F)break}else(K instanceof Kn||K instanceof Oi)&&K.input instanceof sc&&K.input.name==="zoom"&&(F=K);return F instanceof Ye||K.eachChild(ae=>{const we=mh(ae);we instanceof Ye?F=we:!F&&we?F=new Ye("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):F&&we&&F!==we&&(F=new Ye("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),F}function Sf(K){if(K===!0||K===!1)return!0;if(!Array.isArray(K)||K.length===0)return!1;switch(K[0]){case"has":return K.length>=2&&K[1]!=="$id"&&K[1]!=="$type";case"in":return K.length>=3&&(typeof K[1]!="string"||Array.isArray(K[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return K.length!==3||Array.isArray(K[1])||Array.isArray(K[2]);case"any":case"all":for(const F of K.slice(1))if(!Sf(F)&&typeof F!="boolean")return!1;return!0;default:return!0}}const eh={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Fh(K){if(K==null)return{filter:()=>!0,needGeometry:!1};Sf(K)||(K=gh(K));const F=cu(K,eh);if(F.result==="error")throw new Error(F.value.map(ae=>`${ae.key}: ${ae.message}`).join(", "));return{filter:(ae,we,je)=>F.value.evaluate(ae,we,{},je),needGeometry:Sv(K)}}function Zd(K,F){return K<F?-1:K>F?1:0}function Sv(K){if(!Array.isArray(K))return!1;if(K[0]==="within"||K[0]==="distance")return!0;for(let F=1;F<K.length;F++)if(Sv(K[F]))return!0;return!1}function gh(K){if(!K)return!0;const F=K[0];return K.length<=1?F!=="any":F==="=="?Bh(K[1],K[2],"=="):F==="!="?gc(Bh(K[1],K[2],"==")):F==="<"||F===">"||F==="<="||F===">="?Bh(K[1],K[2],F):F==="any"?(ae=K.slice(1),["any"].concat(ae.map(gh))):F==="all"?["all"].concat(K.slice(1).map(gh)):F==="none"?["all"].concat(K.slice(1).map(gh).map(gc)):F==="in"?nf(K[1],K.slice(2)):F==="!in"?gc(nf(K[1],K.slice(2))):F==="has"?jh(K[1]):F!=="!has"||gc(jh(K[1]));var ae}function Bh(K,F,ae){switch(K){case"$type":return[`filter-type-${ae}`,F];case"$id":return[`filter-id-${ae}`,F];default:return[`filter-${ae}`,K,F]}}function nf(K,F){if(F.length===0)return!1;switch(K){case"$type":return["filter-type-in",["literal",F]];case"$id":return["filter-id-in",["literal",F]];default:return F.length>200&&!F.some(ae=>typeof ae!=typeof F[0])?["filter-in-large",K,["literal",F.sort(Zd)]]:["filter-in-small",K,["literal",F]]}}function jh(K){switch(K){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",K]}}function gc(K){return["!",K]}function yh(K){const F=typeof K;if(F==="number"||F==="boolean"||F==="string"||K==null)return JSON.stringify(K);if(Array.isArray(K)){let je="[";for(const Qe of K)je+=`${yh(Qe)},`;return`${je}]`}const ae=Object.keys(K).sort();let we="{";for(let je=0;je<ae.length;je++)we+=`${JSON.stringify(ae[je])}:${yh(K[ae[je]])},`;return`${we}}`}function hd(K){let F="";for(const ae of _e)F+=`/${yh(K[ae])}`;return F}function _h(K){const F=K.value;return F?[new Pe(K.key,F,"constants have been deprecated as of v8")]:[]}function du(K){return K instanceof Number||K instanceof String||K instanceof Boolean?K.valueOf():K}function Wc(K){if(Array.isArray(K))return K.map(Wc);if(K instanceof Object&&!(K instanceof Number||K instanceof String||K instanceof Boolean)){const F={};for(const ae in K)F[ae]=Wc(K[ae]);return F}return du(K)}function gf(K){const F=K.key,ae=K.value,we=K.valueSpec||{},je=K.objectElementValidators||{},Qe=K.style,at=K.styleSpec,Et=K.validateSpec;let Ut=[];const ir=Kl(ae);if(ir!=="object")return[new Pe(F,ae,`object expected, ${ir} found`)];for(const Er in ae){const Ir=Er.split(".")[0],nn=we[Ir]||we["*"];let vn;if(je[Ir])vn=je[Ir];else if(we[Ir])vn=Et;else if(je["*"])vn=je["*"];else{if(!we["*"]){Ut.push(new Pe(F,ae[Er],`unknown property "${Er}"`));continue}vn=Et}Ut=Ut.concat(vn({key:(F&&`${F}.`)+Er,value:ae[Er],valueSpec:nn,style:Qe,styleSpec:at,object:ae,objectKey:Er,validateSpec:Et},ae))}for(const Er in we)je[Er]||we[Er].required&&we[Er].default===void 0&&ae[Er]===void 0&&Ut.push(new Pe(F,ae,`missing required property "${Er}"`));return Ut}function td(K){const F=K.value,ae=K.valueSpec,we=K.style,je=K.styleSpec,Qe=K.key,at=K.arrayElementValidator||K.validateSpec;if(Kl(F)!=="array")return[new Pe(Qe,F,`array expected, ${Kl(F)} found`)];if(ae.length&&F.length!==ae.length)return[new Pe(Qe,F,`array length ${ae.length} expected, length ${F.length} found`)];if(ae["min-length"]&&F.length<ae["min-length"])return[new Pe(Qe,F,`array length at least ${ae["min-length"]} expected, length ${F.length} found`)];let Et={type:ae.value,values:ae.values};je.$version<7&&(Et.function=ae.function),Kl(ae.value)==="object"&&(Et=ae.value);let Ut=[];for(let ir=0;ir<F.length;ir++)Ut=Ut.concat(at({array:F,arrayIndex:ir,value:F[ir],valueSpec:Et,validateSpec:K.validateSpec,style:we,styleSpec:je,key:`${Qe}[${ir}]`}));return Ut}function gu(K){const F=K.key,ae=K.value,we=K.valueSpec;let je=Kl(ae);return je==="number"&&ae!=ae&&(je="NaN"),je!=="number"?[new Pe(F,ae,`number expected, ${je} found`)]:"minimum"in we&&ae<we.minimum?[new Pe(F,ae,`${ae} is less than the minimum value ${we.minimum}`)]:"maximum"in we&&ae>we.maximum?[new Pe(F,ae,`${ae} is greater than the maximum value ${we.maximum}`)]:[]}function Mh(K){const F=K.valueSpec,ae=du(K.value.type);let we,je,Qe,at={};const Et=ae!=="categorical"&&K.value.property===void 0,Ut=!Et,ir=Kl(K.value.stops)==="array"&&Kl(K.value.stops[0])==="array"&&Kl(K.value.stops[0][0])==="object",Er=gf({key:K.key,value:K.value,valueSpec:K.styleSpec.function,validateSpec:K.validateSpec,style:K.style,styleSpec:K.styleSpec,objectElementValidators:{stops:function(vn){if(ae==="identity")return[new Pe(vn.key,vn.value,'identity function may not have a "stops" property')];let Cn=[];const jn=vn.value;return Cn=Cn.concat(td({key:vn.key,value:jn,valueSpec:vn.valueSpec,validateSpec:vn.validateSpec,style:vn.style,styleSpec:vn.styleSpec,arrayElementValidator:Ir})),Kl(jn)==="array"&&jn.length===0&&Cn.push(new Pe(vn.key,jn,"array must have at least one stop")),Cn},default:function(vn){return vn.validateSpec({key:vn.key,value:vn.value,valueSpec:F,validateSpec:vn.validateSpec,style:vn.style,styleSpec:vn.styleSpec})}}});return ae==="identity"&&Et&&Er.push(new Pe(K.key,K.value,'missing required property "property"')),ae==="identity"||K.value.stops||Er.push(new Pe(K.key,K.value,'missing required property "stops"')),ae==="exponential"&&K.valueSpec.expression&&!ed(K.valueSpec)&&Er.push(new Pe(K.key,K.value,"exponential functions not supported")),K.styleSpec.$version>=8&&(Ut&&!lc(K.valueSpec)?Er.push(new Pe(K.key,K.value,"property functions not supported")):Et&&!lh(K.valueSpec)&&Er.push(new Pe(K.key,K.value,"zoom functions not supported"))),ae!=="categorical"&&!ir||K.value.property!==void 0||Er.push(new Pe(K.key,K.value,'"property" property is required')),Er;function Ir(vn){let Cn=[];const jn=vn.value,aa=vn.key;if(Kl(jn)!=="array")return[new Pe(aa,jn,`array expected, ${Kl(jn)} found`)];if(jn.length!==2)return[new Pe(aa,jn,`array length 2 expected, length ${jn.length} found`)];if(ir){if(Kl(jn[0])!=="object")return[new Pe(aa,jn,`object expected, ${Kl(jn[0])} found`)];if(jn[0].zoom===void 0)return[new Pe(aa,jn,"object stop key must have zoom")];if(jn[0].value===void 0)return[new Pe(aa,jn,"object stop key must have value")];if(Qe&&Qe>du(jn[0].zoom))return[new Pe(aa,jn[0].zoom,"stop zoom values must appear in ascending order")];du(jn[0].zoom)!==Qe&&(Qe=du(jn[0].zoom),je=void 0,at={}),Cn=Cn.concat(gf({key:`${aa}[0]`,value:jn[0],valueSpec:{zoom:{}},validateSpec:vn.validateSpec,style:vn.style,styleSpec:vn.styleSpec,objectElementValidators:{zoom:gu,value:nn}}))}else Cn=Cn.concat(nn({key:`${aa}[0]`,value:jn[0],validateSpec:vn.validateSpec,style:vn.style,styleSpec:vn.styleSpec},jn));return Qf(Wc(jn[1]))?Cn.concat([new Pe(`${aa}[1]`,jn[1],"expressions are not allowed in function stops.")]):Cn.concat(vn.validateSpec({key:`${aa}[1]`,value:jn[1],valueSpec:F,validateSpec:vn.validateSpec,style:vn.style,styleSpec:vn.styleSpec}))}function nn(vn,Cn){const jn=Kl(vn.value),aa=du(vn.value),Oa=vn.value!==null?vn.value:Cn;if(we){if(jn!==we)return[new Pe(vn.key,Oa,`${jn} stop domain type must match previous stop domain type ${we}`)]}else we=jn;if(jn!=="number"&&jn!=="string"&&jn!=="boolean")return[new Pe(vn.key,Oa,"stop domain value must be a number, string, or boolean")];if(jn!=="number"&&ae!=="categorical"){let Pi=`number expected, ${jn} found`;return lc(F)&&ae===void 0&&(Pi+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Pe(vn.key,Oa,Pi)]}return ae!=="categorical"||jn!=="number"||isFinite(aa)&&Math.floor(aa)===aa?ae!=="categorical"&&jn==="number"&&je!==void 0&&aa<je?[new Pe(vn.key,Oa,"stop domain values must appear in ascending order")]:(je=aa,ae==="categorical"&&aa in at?[new Pe(vn.key,Oa,"stop domain values must be unique")]:(at[aa]=!0,[])):[new Pe(vn.key,Oa,`integer expected, found ${aa}`)]}}function th(K){const F=(K.expressionContext==="property"?Xc:cu)(Wc(K.value),K.valueSpec);if(F.result==="error")return F.value.map(we=>new Pe(`${K.key}${we.key}`,K.value,we.message));const ae=F.value.expression||F.value._styleExpression.expression;if(K.expressionContext==="property"&&K.propertyKey==="text-font"&&!ae.outputDefined())return[new Pe(K.key,K.value,`Invalid data expression for "${K.propertyKey}". Output values must be contained as literals within the expression.`)];if(K.expressionContext==="property"&&K.propertyType==="layout"&&!mf(ae))return[new Pe(K.key,K.value,'"feature-state" data expressions are not supported with layout properties.')];if(K.expressionContext==="filter"&&!mf(ae))return[new Pe(K.key,K.value,'"feature-state" data expressions are not supported with filters.')];if(K.expressionContext&&K.expressionContext.indexOf("cluster")===0){if(!ld(ae,["zoom","feature-state"]))return[new Pe(K.key,K.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(K.expressionContext==="cluster-initial"&&!Qh(ae))return[new Pe(K.key,K.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function af(K){const F=K.key,ae=K.value,we=K.valueSpec,je=[];return Array.isArray(we.values)?we.values.indexOf(du(ae))===-1&&je.push(new Pe(F,ae,`expected one of [${we.values.join(", ")}], ${JSON.stringify(ae)} found`)):Object.keys(we.values).indexOf(du(ae))===-1&&je.push(new Pe(F,ae,`expected one of [${Object.keys(we.values).join(", ")}], ${JSON.stringify(ae)} found`)),je}function Ch(K){return Sf(Wc(K.value))?th(be({},K,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Ef(K)}function Ef(K){const F=K.value,ae=K.key;if(Kl(F)!=="array")return[new Pe(ae,F,`array expected, ${Kl(F)} found`)];const we=K.styleSpec;let je,Qe=[];if(F.length<1)return[new Pe(ae,F,"filter array must have at least 1 element")];switch(Qe=Qe.concat(af({key:`${ae}[0]`,value:F[0],valueSpec:we.filter_operator,style:K.style,styleSpec:K.styleSpec})),du(F[0])){case"<":case"<=":case">":case">=":F.length>=2&&du(F[1])==="$type"&&Qe.push(new Pe(ae,F,`"$type" cannot be use with operator "${F[0]}"`));case"==":case"!=":F.length!==3&&Qe.push(new Pe(ae,F,`filter array for operator "${F[0]}" must have 3 elements`));case"in":case"!in":F.length>=2&&(je=Kl(F[1]),je!=="string"&&Qe.push(new Pe(`${ae}[1]`,F[1],`string expected, ${je} found`)));for(let at=2;at<F.length;at++)je=Kl(F[at]),du(F[1])==="$type"?Qe=Qe.concat(af({key:`${ae}[${at}]`,value:F[at],valueSpec:we.geometry_type,style:K.style,styleSpec:K.styleSpec})):je!=="string"&&je!=="number"&&je!=="boolean"&&Qe.push(new Pe(`${ae}[${at}]`,F[at],`string, number, or boolean expected, ${je} found`));break;case"any":case"all":case"none":for(let at=1;at<F.length;at++)Qe=Qe.concat(Ef({key:`${ae}[${at}]`,value:F[at],style:K.style,styleSpec:K.styleSpec}));break;case"has":case"!has":je=Kl(F[1]),F.length!==2?Qe.push(new Pe(ae,F,`filter array for "${F[0]}" operator must have 2 elements`)):je!=="string"&&Qe.push(new Pe(`${ae}[1]`,F[1],`string expected, ${je} found`))}return Qe}function kh(K,F){const ae=K.key,we=K.validateSpec,je=K.style,Qe=K.styleSpec,at=K.value,Et=K.objectKey,Ut=Qe[`${F}_${K.layerType}`];if(!Ut)return[];const ir=Et.match(/^(.*)-transition$/);if(F==="paint"&&ir&&Ut[ir[1]]&&Ut[ir[1]].transition)return we({key:ae,value:at,valueSpec:Qe.transition,style:je,styleSpec:Qe});const Er=K.valueSpec||Ut[Et];if(!Er)return[new Pe(ae,at,`unknown property "${Et}"`)];let Ir;if(Kl(at)==="string"&&lc(Er)&&!Er.tokens&&(Ir=/^{([^}]+)}$/.exec(at)))return[new Pe(ae,at,`"${Et}" does not support interpolation syntax
Use an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(Ir[1])} }\`.`)];const nn=[];return K.layerType==="symbol"&&(Et==="text-field"&&je&&!je.glyphs&&nn.push(new Pe(ae,at,'use of "text-field" requires a style "glyphs" property')),Et==="text-font"&&Nh(Wc(at))&&du(at.type)==="identity"&&nn.push(new Pe(ae,at,'"text-font" does not support identity functions'))),nn.concat(we({key:K.key,value:at,valueSpec:Er,style:je,styleSpec:Qe,expressionContext:"property",propertyType:F,propertyKey:Et}))}function $d(K){return kh(K,"paint")}function xc(K){return kh(K,"layout")}function dd(K){let F=[];const ae=K.value,we=K.key,je=K.style,Qe=K.styleSpec;ae.type||ae.ref||F.push(new Pe(we,ae,'either "type" or "ref" is required'));let at=du(ae.type);const Et=du(ae.ref);if(ae.id){const Ut=du(ae.id);for(let ir=0;ir<K.arrayIndex;ir++){const Er=je.layers[ir];du(Er.id)===Ut&&F.push(new Pe(we,ae.id,`duplicate layer id "${ae.id}", previously used at line ${Er.id.__line__}`))}}if("ref"in ae){let Ut;["type","source","source-layer","filter","layout"].forEach(ir=>{ir in ae&&F.push(new Pe(we,ae[ir],`"${ir}" is prohibited for ref layers`))}),je.layers.forEach(ir=>{du(ir.id)===Et&&(Ut=ir)}),Ut?Ut.ref?F.push(new Pe(we,ae.ref,"ref cannot reference another ref layer")):at=du(Ut.type):F.push(new Pe(we,ae.ref,`ref layer "${Et}" not found`))}else if(at!=="background")if(ae.source){const Ut=je.sources&&je.sources[ae.source],ir=Ut&&du(Ut.type);Ut?ir==="vector"&&at==="raster"?F.push(new Pe(we,ae.source,`layer "${ae.id}" requires a raster source`)):ir!=="raster-dem"&&at==="hillshade"?F.push(new Pe(we,ae.source,`layer "${ae.id}" requires a raster-dem source`)):ir==="raster"&&at!=="raster"?F.push(new Pe(we,ae.source,`layer "${ae.id}" requires a vector source`)):ir!=="vector"||ae["source-layer"]?ir==="raster-dem"&&at!=="hillshade"?F.push(new Pe(we,ae.source,"raster-dem source can only be used with layer type 'hillshade'.")):at!=="line"||!ae.paint||!ae.paint["line-gradient"]||ir==="geojson"&&Ut.lineMetrics||F.push(new Pe(we,ae,`layer "${ae.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):F.push(new Pe(we,ae,`layer "${ae.id}" must specify a "source-layer"`)):F.push(new Pe(we,ae.source,`source "${ae.source}" not found`))}else F.push(new Pe(we,ae,'missing required property "source"'));return F=F.concat(gf({key:we,value:ae,valueSpec:Qe.layer,style:K.style,styleSpec:K.styleSpec,validateSpec:K.validateSpec,objectElementValidators:{"*":()=>[],type:()=>K.validateSpec({key:`${we}.type`,value:ae.type,valueSpec:Qe.layer.type,style:K.style,styleSpec:K.styleSpec,validateSpec:K.validateSpec,object:ae,objectKey:"type"}),filter:Ch,layout:Ut=>gf({layer:ae,key:Ut.key,value:Ut.value,style:Ut.style,styleSpec:Ut.styleSpec,validateSpec:Ut.validateSpec,objectElementValidators:{"*":ir=>xc(be({layerType:at},ir))}}),paint:Ut=>gf({layer:ae,key:Ut.key,value:Ut.value,style:Ut.style,styleSpec:Ut.styleSpec,validateSpec:Ut.validateSpec,objectElementValidators:{"*":ir=>$d(be({layerType:at},ir))}})}})),F}function of(K){const F=K.value,ae=K.key,we=Kl(F);return we!=="string"?[new Pe(ae,F,`string expected, ${we} found`)]:[]}const Bf={promoteId:function({key:K,value:F}){if(Kl(F)==="string")return of({key:K,value:F});{const ae=[];for(const we in F)ae.push(...of({key:`${K}.${we}`,value:F[we]}));return ae}}};function Mf(K){const F=K.value,ae=K.key,we=K.styleSpec,je=K.style,Qe=K.validateSpec;if(!F.type)return[new Pe(ae,F,'"type" is required')];const at=du(F.type);let Et;switch(at){case"vector":case"raster":return Et=gf({key:ae,value:F,valueSpec:we[`source_${at.replace("-","_")}`],style:K.style,styleSpec:we,objectElementValidators:Bf,validateSpec:Qe}),Et;case"raster-dem":return Et=(function(Ut){var ir;const Er=(ir=Ut.sourceName)!==null&&ir!==void 0?ir:"",Ir=Ut.value,nn=Ut.styleSpec,vn=nn.source_raster_dem,Cn=Ut.style;let jn=[];const aa=Kl(Ir);if(Ir===void 0)return jn;if(aa!=="object")return jn.push(new Pe("source_raster_dem",Ir,`object expected, ${aa} found`)),jn;const Oa=du(Ir.encoding)==="custom",Pi=["redFactor","greenFactor","blueFactor","baseShift"],oi=Ut.value.encoding?`"${Ut.value.encoding}"`:"Default";for(const Ti in Ir)!Oa&&Pi.includes(Ti)?jn.push(new Pe(Ti,Ir[Ti],`In "${Er}": "${Ti}" is only valid when "encoding" is set to "custom". ${oi} encoding found`)):vn[Ti]?jn=jn.concat(Ut.validateSpec({key:Ti,value:Ir[Ti],valueSpec:vn[Ti],validateSpec:Ut.validateSpec,style:Cn,styleSpec:nn})):jn.push(new Pe(Ti,Ir[Ti],`unknown property "${Ti}"`));return jn})({sourceName:ae,value:F,style:K.style,styleSpec:we,validateSpec:Qe}),Et;case"geojson":if(Et=gf({key:ae,value:F,valueSpec:we.source_geojson,style:je,styleSpec:we,validateSpec:Qe,objectElementValidators:Bf}),F.cluster)for(const Ut in F.clusterProperties){const[ir,Er]=F.clusterProperties[Ut],Ir=typeof ir=="string"?[ir,["accumulated"],["get",Ut]]:ir;Et.push(...th({key:`${ae}.${Ut}.map`,value:Er,expressionContext:"cluster-map"})),Et.push(...th({key:`${ae}.${Ut}.reduce`,value:Ir,expressionContext:"cluster-reduce"}))}return Et;case"video":return gf({key:ae,value:F,valueSpec:we.source_video,style:je,validateSpec:Qe,styleSpec:we});case"image":return gf({key:ae,value:F,valueSpec:we.source_image,style:je,validateSpec:Qe,styleSpec:we});case"canvas":return[new Pe(ae,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return af({key:`${ae}.type`,value:F.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]}})}}function Du(K){const F=K.value,ae=K.styleSpec,we=ae.light,je=K.style;let Qe=[];const at=Kl(F);if(F===void 0)return Qe;if(at!=="object")return Qe=Qe.concat([new Pe("light",F,`object expected, ${at} found`)]),Qe;for(const Et in F){const Ut=Et.match(/^(.*)-transition$/);Qe=Qe.concat(Ut&&we[Ut[1]]&&we[Ut[1]].transition?K.validateSpec({key:Et,value:F[Et],valueSpec:ae.transition,validateSpec:K.validateSpec,style:je,styleSpec:ae}):we[Et]?K.validateSpec({key:Et,value:F[Et],valueSpec:we[Et],validateSpec:K.validateSpec,style:je,styleSpec:ae}):[new Pe(Et,F[Et],`unknown property "${Et}"`)])}return Qe}function Rc(K){const F=K.value,ae=K.styleSpec,we=ae.sky,je=K.style,Qe=Kl(F);if(F===void 0)return[];if(Qe!=="object")return[new Pe("sky",F,`object expected, ${Qe} found`)];let at=[];for(const Et in F)at=at.concat(we[Et]?K.validateSpec({key:Et,value:F[Et],valueSpec:we[Et],style:je,styleSpec:ae}):[new Pe(Et,F[Et],`unknown property "${Et}"`)]);return at}function Su(K){const F=K.value,ae=K.styleSpec,we=ae.terrain,je=K.style;let Qe=[];const at=Kl(F);if(F===void 0)return Qe;if(at!=="object")return Qe=Qe.concat([new Pe("terrain",F,`object expected, ${at} found`)]),Qe;for(const Et in F)Qe=Qe.concat(we[Et]?K.validateSpec({key:Et,value:F[Et],valueSpec:we[Et],validateSpec:K.validateSpec,style:je,styleSpec:ae}):[new Pe(Et,F[Et],`unknown property "${Et}"`)]);return Qe}function rh(K){let F=[];const ae=K.value,we=K.key;if(Array.isArray(ae)){const je=[],Qe=[];for(const at in ae)ae[at].id&&je.includes(ae[at].id)&&F.push(new Pe(we,ae,`all the sprites' ids must be unique, but ${ae[at].id} is duplicated`)),je.push(ae[at].id),ae[at].url&&Qe.includes(ae[at].url)&&F.push(new Pe(we,ae,`all the sprites' URLs must be unique, but ${ae[at].url} is duplicated`)),Qe.push(ae[at].url),F=F.concat(gf({key:`${we}[${at}]`,value:ae[at],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:K.validateSpec}));return F}return of({key:we,value:ae})}const Cf={"*":()=>[],array:td,boolean:function(K){const F=K.value,ae=K.key,we=Kl(F);return we!=="boolean"?[new Pe(ae,F,`boolean expected, ${we} found`)]:[]},number:gu,color:function(K){const F=K.key,ae=K.value,we=Kl(ae);return we!=="string"?[new Pe(F,ae,`color expected, ${we} found`)]:br.parse(String(ae))?[]:[new Pe(F,ae,`color expected, "${ae}" found`)]},constants:_h,enum:af,filter:Ch,function:Mh,layer:dd,object:gf,source:Mf,light:Du,sky:Rc,terrain:Su,projection:function(K){const F=K.value,ae=K.styleSpec,we=ae.projection,je=K.style,Qe=Kl(F);if(F===void 0)return[];if(Qe!=="object")return[new Pe("projection",F,`object expected, ${Qe} found`)];let at=[];for(const Et in F)at=at.concat(we[Et]?K.validateSpec({key:Et,value:F[Et],valueSpec:we[Et],style:je,styleSpec:ae}):[new Pe(Et,F[Et],`unknown property "${Et}"`)]);return at},string:of,formatted:function(K){return of(K).length===0?[]:th(K)},resolvedImage:function(K){return of(K).length===0?[]:th(K)},padding:function(K){const F=K.key,ae=K.value;if(Kl(ae)==="array"){if(ae.length<1||ae.length>4)return[new Pe(F,ae,`padding requires 1 to 4 values; ${ae.length} values found`)];const we={type:"number"};let je=[];for(let Qe=0;Qe<ae.length;Qe++)je=je.concat(K.validateSpec({key:`${F}[${Qe}]`,value:ae[Qe],validateSpec:K.validateSpec,valueSpec:we}));return je}return gu({key:F,value:ae,valueSpec:{}})},variableAnchorOffsetCollection:function(K){const F=K.key,ae=K.value,we=Kl(ae),je=K.styleSpec;if(we!=="array"||ae.length<1||ae.length%2!=0)return[new Pe(F,ae,"variableAnchorOffsetCollection requires a non-empty array of even length")];let Qe=[];for(let at=0;at<ae.length;at+=2)Qe=Qe.concat(af({key:`${F}[${at}]`,value:ae[at],valueSpec:je.layout_symbol["text-anchor"]})),Qe=Qe.concat(td({key:`${F}[${at+1}]`,value:ae[at+1],valueSpec:{length:2,value:"number"},validateSpec:K.validateSpec,style:K.style,styleSpec:je}));return Qe},sprite:rh};function rd(K){const F=K.value,ae=K.valueSpec,we=K.styleSpec;return K.validateSpec=rd,ae.expression&&Nh(du(F))?Mh(K):ae.expression&&Qf(Wc(F))?th(K):ae.type&&Cf[ae.type]?Cf[ae.type](K):gf(be({},K,{valueSpec:ae.type?we[ae.type]:ae}))}function wr(K){const F=K.value,ae=K.key,we=of(K);return we.length||(F.indexOf("{fontstack}")===-1&&we.push(new Pe(ae,F,'"glyphs" url must include a "{fontstack}" token')),F.indexOf("{range}")===-1&&we.push(new Pe(ae,F,'"glyphs" url must include a "{range}" token'))),we}function Gr(K,F=ue){let ae=[];return ae=ae.concat(rd({key:"",value:K,valueSpec:F.$root,styleSpec:F,style:K,validateSpec:rd,objectElementValidators:{glyphs:wr,"*":()=>[]}})),K.constants&&(ae=ae.concat(_h({key:"constants",value:K.constants}))),_n(ae)}function kn(K){return function(F){return K(sr(cr({},F),{validateSpec:rd}))}}function _n(K){return[].concat(K).sort((F,ae)=>F.line-ae.line)}function ta(K){return function(...F){return _n(K.apply(this,F))}}Gr.source=ta(kn(Mf)),Gr.sprite=ta(kn(rh)),Gr.glyphs=ta(kn(wr)),Gr.light=ta(kn(Du)),Gr.sky=ta(kn(Rc)),Gr.terrain=ta(kn(Su)),Gr.layer=ta(kn(dd)),Gr.filter=ta(kn(Ch)),Gr.paintProperty=ta(kn($d)),Gr.layoutProperty=ta(kn(xc));const Ga=Gr,ja=Ga.light,Ai=Ga.sky,Ii=Ga.paintProperty,oo=Ga.layoutProperty;function hi(K,F){let ae=!1;if(F&&F.length)for(const we of F)K.fire(new Y(new Error(we.message))),ae=!0;return ae}class Gi{constructor(F,ae,we){const je=this.cells=[];if(F instanceof ArrayBuffer){this.arrayBuffer=F;const at=new Int32Array(this.arrayBuffer);F=at[0],this.d=(ae=at[1])+2*(we=at[2]);for(let Ut=0;Ut<this.d*this.d;Ut++){const ir=at[3+Ut],Er=at[3+Ut+1];je.push(ir===Er?null:at.subarray(ir,Er))}const Et=at[3+je.length+1];this.keys=at.subarray(at[3+je.length],Et),this.bboxes=at.subarray(Et),this.insert=this._insertReadonly}else{this.d=ae+2*we;for(let at=0;at<this.d*this.d;at++)je.push([]);this.keys=[],this.bboxes=[]}this.n=ae,this.extent=F,this.padding=we,this.scale=ae/F,this.uid=0;const Qe=we/ae*F;this.min=-Qe,this.max=F+Qe}insert(F,ae,we,je,Qe){this._forEachCell(ae,we,je,Qe,this._insertCell,this.uid++,void 0,void 0),this.keys.push(F),this.bboxes.push(ae),this.bboxes.push(we),this.bboxes.push(je),this.bboxes.push(Qe)}_insertReadonly(){throw new Error("Cannot insert into a GridIndex created from an ArrayBuffer.")}_insertCell(F,ae,we,je,Qe,at){this.cells[Qe].push(at)}query(F,ae,we,je,Qe){const at=this.min,Et=this.max;if(F<=at&&ae<=at&&Et<=we&&Et<=je&&!Qe)return Array.prototype.slice.call(this.keys);{const Ut=[];return this._forEachCell(F,ae,we,je,this._queryCell,Ut,{},Qe),Ut}}_queryCell(F,ae,we,je,Qe,at,Et,Ut){const ir=this.cells[Qe];if(ir!==null){const Er=this.keys,Ir=this.bboxes;for(let nn=0;nn<ir.length;nn++){const vn=ir[nn];if(Et[vn]===void 0){const Cn=4*vn;(Ut?Ut(Ir[Cn+0],Ir[Cn+1],Ir[Cn+2],Ir[Cn+3]):F<=Ir[Cn+2]&&ae<=Ir[Cn+3]&&we>=Ir[Cn+0]&&je>=Ir[Cn+1])?(Et[vn]=!0,at.push(Er[vn])):Et[vn]=!1}}}}_forEachCell(F,ae,we,je,Qe,at,Et,Ut){const ir=this._convertToCellCoord(F),Er=this._convertToCellCoord(ae),Ir=this._convertToCellCoord(we),nn=this._convertToCellCoord(je);for(let vn=ir;vn<=Ir;vn++)for(let Cn=Er;Cn<=nn;Cn++){const jn=this.d*Cn+vn;if((!Ut||Ut(this._convertFromCellCoord(vn),this._convertFromCellCoord(Cn),this._convertFromCellCoord(vn+1),this._convertFromCellCoord(Cn+1)))&&Qe.call(this,F,ae,we,je,jn,at,Et,Ut))return}}_convertFromCellCoord(F){return(F-this.padding)/this.scale}_convertToCellCoord(F){return Math.max(0,Math.min(this.d-1,Math.floor(F*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;const F=this.cells,ae=3+this.cells.length+1+1;let we=0;for(let at=0;at<this.cells.length;at++)we+=this.cells[at].length;const je=new Int32Array(ae+we+this.keys.length+this.bboxes.length);je[0]=this.extent,je[1]=this.n,je[2]=this.padding;let Qe=ae;for(let at=0;at<F.length;at++){const Et=F[at];je[3+at]=Qe,je.set(Et,Qe),Qe+=Et.length}return je[3+F.length]=Qe,je.set(this.keys,Qe),Qe+=this.keys.length,je[3+F.length+1]=Qe,je.set(this.bboxes,Qe),Qe+=this.bboxes.length,je.buffer}static serialize(F,ae){const we=F.toArrayBuffer();return ae&&ae.push(we),{buffer:we}}static deserialize(F){return new Gi(F.buffer)}}const wi={};function si(K,F,ae={}){if(wi[K])throw new Error(`${K} is already registered.`);Object.defineProperty(F,"_classRegistryKey",{value:K,writeable:!1}),wi[K]={klass:F,omit:ae.omit||[],shallow:ae.shallow||[]}}si("Object",Object),si("TransferableGridIndex",Gi),si("Color",br),si("Error",Error),si("AJAXError",me),si("ResolvedImage",Ia),si("StylePropertyFunction",bu),si("StyleExpression",Gc,{omit:["_evaluator"]}),si("ZoomDependentExpression",Sc),si("ZoomConstantExpression",Ff),si("CompoundExpression",sc,{omit:["_evaluate"]});for(const K in Ah)Ah[K]._classRegistryKey||si(`Expression_${K}`,Ah[K]);function vo(K){return K&&typeof ArrayBuffer<"u"&&(K instanceof ArrayBuffer||K.constructor&&K.constructor.name==="ArrayBuffer")}function es(K){return K.$name||K.constructor._classRegistryKey}function $o(K){return!(function(F){if(F===null||typeof F!="object")return!1;const ae=es(F);return!(!ae||ae==="Object")})(K)&&(K==null||typeof K=="boolean"||typeof K=="number"||typeof K=="string"||K instanceof Boolean||K instanceof Number||K instanceof String||K instanceof Date||K instanceof RegExp||K instanceof Blob||K instanceof Error||vo(K)||U(K)||ArrayBuffer.isView(K)||K instanceof ImageData)}function is(K,F){if($o(K))return(vo(K)||U(K))&&F&&F.push(K),ArrayBuffer.isView(K)&&F&&F.push(K.buffer),K instanceof ImageData&&F&&F.push(K.data.buffer),K;if(Array.isArray(K)){const Qe=[];for(const at of K)Qe.push(is(at,F));return Qe}if(typeof K!="object")throw new Error("can't serialize object of type "+typeof K);const ae=es(K);if(!ae)throw new Error(`can't serialize object of unregistered class ${K.constructor.name}`);if(!wi[ae])throw new Error(`${ae} is not registered.`);const{klass:we}=wi[ae],je=we.serialize?we.serialize(K,F):{};if(we.serialize){if(F&&je===F[F.length-1])throw new Error("statically serialized object won't survive transfer of $name property")}else{for(const Qe in K){if(!K.hasOwnProperty(Qe)||wi[ae].omit.indexOf(Qe)>=0)continue;const at=K[Qe];je[Qe]=wi[ae].shallow.indexOf(Qe)>=0?at:is(at,F)}K instanceof Error&&(je.message=K.message)}if(je.$name)throw new Error("$name property is reserved for worker serialization logic.");return ae!=="Object"&&(je.$name=ae),je}function rs(K){if($o(K))return K;if(Array.isArray(K))return K.map(rs);if(typeof K!="object")throw new Error("can't deserialize object of type "+typeof K);const F=es(K)||"Object";if(!wi[F])throw new Error(`can't deserialize unregistered class ${F}`);const{klass:ae}=wi[F];if(!ae)throw new Error(`can't deserialize unregistered class ${F}`);if(ae.deserialize)return ae.deserialize(K);const we=Object.create(ae.prototype);for(const je of Object.keys(K)){if(je==="$name")continue;const Qe=K[je];we[je]=wi[F].shallow.indexOf(je)>=0?Qe:rs(Qe)}return we}class mo{constructor(){this.first=!0}update(F,ae){const we=Math.floor(F);return this.first?(this.first=!1,this.lastIntegerZoom=we,this.lastIntegerZoomTime=0,this.lastZoom=F,this.lastFloorZoom=we,!0):(this.lastFloorZoom>we?(this.lastIntegerZoom=we+1,this.lastIntegerZoomTime=ae):this.lastFloorZoom<we&&(this.lastIntegerZoom=we,this.lastIntegerZoomTime=ae),F!==this.lastZoom&&(this.lastZoom=F,this.lastFloorZoom=we,!0))}}const Ji={"Latin-1 Supplement":K=>K>=128&&K<=255,"Hangul Jamo":K=>K>=4352&&K<=4607,Khmer:K=>K>=6016&&K<=6143,"General Punctuation":K=>K>=8192&&K<=8303,"Letterlike Symbols":K=>K>=8448&&K<=8527,"Number Forms":K=>K>=8528&&K<=8591,"Miscellaneous Technical":K=>K>=8960&&K<=9215,"Control Pictures":K=>K>=9216&&K<=9279,"Optical Character Recognition":K=>K>=9280&&K<=9311,"Enclosed Alphanumerics":K=>K>=9312&&K<=9471,"Geometric Shapes":K=>K>=9632&&K<=9727,"Miscellaneous Symbols":K=>K>=9728&&K<=9983,"Miscellaneous Symbols and Arrows":K=>K>=11008&&K<=11263,"Ideographic Description Characters":K=>K>=12272&&K<=12287,"CJK Symbols and Punctuation":K=>K>=12288&&K<=12351,Katakana:K=>K>=12448&&K<=12543,Kanbun:K=>K>=12688&&K<=12703,"CJK Strokes":K=>K>=12736&&K<=12783,"Enclosed CJK Letters and Months":K=>K>=12800&&K<=13055,"CJK Compatibility":K=>K>=13056&&K<=13311,"Yijing Hexagram Symbols":K=>K>=19904&&K<=19967,"Private Use Area":K=>K>=57344&&K<=63743,"Vertical Forms":K=>K>=65040&&K<=65055,"CJK Compatibility Forms":K=>K>=65072&&K<=65103,"Small Form Variants":K=>K>=65104&&K<=65135,"Halfwidth and Fullwidth Forms":K=>K>=65280&&K<=65519};function gs(K){for(const F of K)if(hl(F.charCodeAt(0)))return!0;return!1}function $s(K){for(const F of K)if(!Bl(F.charCodeAt(0)))return!1;return!0}function Nl(K){const F=K.map(ae=>{try{return new RegExp(`\\p{sc=${ae}}`,"u").source}catch{return null}}).filter(ae=>ae);return new RegExp(F.join("|"),"u")}const au=Nl(["Arab","Dupl","Mong","Ougr","Syrc"]);function Bl(K){return!au.test(String.fromCodePoint(K))}const iu=Nl(["Bopo","Hani","Hira","Kana","Kits","Nshu","Tang","Yiii"]);function hl(K){return!(K!==746&&K!==747&&(K<4352||!(Ji["CJK Compatibility Forms"](K)&&!(K>=65097&&K<=65103)||Ji["CJK Compatibility"](K)||Ji["CJK Strokes"](K)||!(!Ji["CJK Symbols and Punctuation"](K)||K>=12296&&K<=12305||K>=12308&&K<=12319||K===12336)||Ji["Enclosed CJK Letters and Months"](K)||Ji["Ideographic Description Characters"](K)||Ji.Kanbun(K)||Ji.Katakana(K)&&K!==12540||!(!Ji["Halfwidth and Fullwidth Forms"](K)||K===65288||K===65289||K===65293||K>=65306&&K<=65310||K===65339||K===65341||K===65343||K>=65371&&K<=65503||K===65507||K>=65512&&K<=65519)||!(!Ji["Small Form Variants"](K)||K>=65112&&K<=65118||K>=65123&&K<=65126)||Ji["Vertical Forms"](K)||Ji["Yijing Hexagram Symbols"](K)||new RegExp("\\p{sc=Cans}","u").test(String.fromCodePoint(K))||new RegExp("\\p{sc=Hang}","u").test(String.fromCodePoint(K))||iu.test(String.fromCodePoint(K)))))}function Bu(K){return!(hl(K)||(function(F){return!!(Ji["Latin-1 Supplement"](F)&&(F===167||F===169||F===174||F===177||F===188||F===189||F===190||F===215||F===247)||Ji["General Punctuation"](F)&&(F===8214||F===8224||F===8225||F===8240||F===8241||F===8251||F===8252||F===8258||F===8263||F===8264||F===8265||F===8273)||Ji["Letterlike Symbols"](F)||Ji["Number Forms"](F)||Ji["Miscellaneous Technical"](F)&&(F>=8960&&F<=8967||F>=8972&&F<=8991||F>=8996&&F<=9e3||F===9003||F>=9085&&F<=9114||F>=9150&&F<=9165||F===9167||F>=9169&&F<=9179||F>=9186&&F<=9215)||Ji["Control Pictures"](F)&&F!==9251||Ji["Optical Character Recognition"](F)||Ji["Enclosed Alphanumerics"](F)||Ji["Geometric Shapes"](F)||Ji["Miscellaneous Symbols"](F)&&!(F>=9754&&F<=9759)||Ji["Miscellaneous Symbols and Arrows"](F)&&(F>=11026&&F<=11055||F>=11088&&F<=11097||F>=11192&&F<=11243)||Ji["CJK Symbols and Punctuation"](F)||Ji.Katakana(F)||Ji["Private Use Area"](F)||Ji["CJK Compatibility Forms"](F)||Ji["Small Form Variants"](F)||Ji["Halfwidth and Fullwidth Forms"](F)||F===8734||F===8756||F===8757||F>=9984&&F<=10087||F>=10102&&F<=10131||F===65532||F===65533)})(K))}const Ou=Nl(["Adlm","Arab","Armi","Avst","Chrs","Cprt","Egyp","Elym","Gara","Hatr","Hebr","Hung","Khar","Lydi","Mand","Mani","Mend","Merc","Mero","Narb","Nbat","Nkoo","Orkh","Palm","Phli","Phlp","Phnx","Prti","Rohg","Samr","Sarb","Sogo","Syrc","Thaa","Todr","Yezi"]);function eu(K){return Ou.test(String.fromCodePoint(K))}function No(K,F){return!(!F&&eu(K)||K>=2304&&K<=3583||K>=3840&&K<=4255||Ji.Khmer(K))}function Ls(K){for(const F of K)if(eu(F.charCodeAt(0)))return!0;return!1}const Wl=new class{constructor(){this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null}setState(K){this.pluginStatus=K.pluginStatus,this.pluginURL=K.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(K){this.applyArabicShaping=K.applyArabicShaping,this.processBidirectionalText=K.processBidirectionalText,this.processStyledBidirectionalText=K.processStyledBidirectionalText}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getPluginURL(){return this.pluginURL}getRTLTextPluginStatus(){return this.pluginStatus}};class Cl{constructor(F,ae){this.zoom=F,ae?(this.now=ae.now,this.fadeDuration=ae.fadeDuration,this.zoomHistory=ae.zoomHistory,this.transition=ae.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new mo,this.transition={})}isSupportedScript(F){return(function(ae,we){for(const je of ae)if(!No(je.charCodeAt(0),we))return!1;return!0})(F,Wl.getRTLTextPluginStatus()==="loaded")}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){const F=this.zoom,ae=F-Math.floor(F),we=this.crossFadingFactor();return F>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:ae+(1-ae)*we}:{fromScale:.5,toScale:1,t:1-(1-we)*ae}}}class Ec{constructor(F,ae){this.property=F,this.value=ae,this.expression=(function(we,je){if(Nh(we))return new bu(we,je);if(Qf(we)){const Qe=Xc(we,je);if(Qe.result==="error")throw new Error(Qe.value.map(at=>`${at.key}: ${at.message}`).join(", "));return Qe.value}{let Qe=we;return je.type==="color"&&typeof we=="string"?Qe=br.parse(we):je.type!=="padding"||typeof we!="number"&&!Array.isArray(we)?je.type==="variableAnchorOffsetCollection"&&Array.isArray(we)&&(Qe=za.parse(we)):Qe=Bn.parse(we),{kind:"constant",evaluate:()=>Qe}}})(ae===void 0?F.specification.default:ae,F.specification)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(F,ae,we){return this.property.possiblyEvaluate(this,F,ae,we)}}class Mc{constructor(F){this.property=F,this.value=new Ec(F,void 0)}transitioned(F,ae){return new uh(this.property,this.value,ae,k({},F.transition,this.transition),F.now)}untransitioned(){return new uh(this.property,this.value,null,{},0)}}class Ic{constructor(F){this._properties=F,this._values=Object.create(F.defaultTransitionablePropertyValues)}getValue(F){return f(this._values[F].value.value)}setValue(F,ae){Object.prototype.hasOwnProperty.call(this._values,F)||(this._values[F]=new Mc(this._values[F].property)),this._values[F].value=new Ec(this._values[F].property,ae===null?void 0:f(ae))}getTransition(F){return f(this._values[F].transition)}setTransition(F,ae){Object.prototype.hasOwnProperty.call(this._values,F)||(this._values[F]=new Mc(this._values[F].property)),this._values[F].transition=f(ae)||void 0}serialize(){const F={};for(const ae of Object.keys(this._values)){const we=this.getValue(ae);we!==void 0&&(F[ae]=we);const je=this.getTransition(ae);je!==void 0&&(F[`${ae}-transition`]=je)}return F}transitioned(F,ae){const we=new Cc(this._properties);for(const je of Object.keys(this._values))we._values[je]=this._values[je].transitioned(F,ae._values[je]);return we}untransitioned(){const F=new Cc(this._properties);for(const ae of Object.keys(this._values))F._values[ae]=this._values[ae].untransitioned();return F}}class uh{constructor(F,ae,we,je,Qe){this.property=F,this.value=ae,this.begin=Qe+je.delay||0,this.end=this.begin+je.duration||0,F.specification.transition&&(je.delay||je.duration)&&(this.prior=we)}possiblyEvaluate(F,ae,we){const je=F.now||0,Qe=this.value.possiblyEvaluate(F,ae,we),at=this.prior;if(at){if(je>this.end)return this.prior=null,Qe;if(this.value.isDataDriven())return this.prior=null,Qe;if(je<this.begin)return at.possiblyEvaluate(F,ae,we);{const Et=(je-this.begin)/(this.end-this.begin);return this.property.interpolate(at.possiblyEvaluate(F,ae,we),Qe,(function(Ut){if(Ut<=0)return 0;if(Ut>=1)return 1;const ir=Ut*Ut,Er=ir*Ut;return 4*(Ut<.5?Er:3*(Ut-ir)+Er-.75)})(Et))}}return Qe}}class Cc{constructor(F){this._properties=F,this._values=Object.create(F.defaultTransitioningPropertyValues)}possiblyEvaluate(F,ae,we){const je=new Uf(this._properties);for(const Qe of Object.keys(this._values))je._values[Qe]=this._values[Qe].possiblyEvaluate(F,ae,we);return je}hasTransition(){for(const F of Object.keys(this._values))if(this._values[F].prior)return!0;return!1}}class jf{constructor(F){this._properties=F,this._values=Object.create(F.defaultPropertyValues)}hasValue(F){return this._values[F].value!==void 0}getValue(F){return f(this._values[F].value)}setValue(F,ae){this._values[F]=new Ec(this._values[F].property,ae===null?void 0:f(ae))}serialize(){const F={};for(const ae of Object.keys(this._values)){const we=this.getValue(ae);we!==void 0&&(F[ae]=we)}return F}possiblyEvaluate(F,ae,we){const je=new Uf(this._properties);for(const Qe of Object.keys(this._values))je._values[Qe]=this._values[Qe].possiblyEvaluate(F,ae,we);return je}}class ju{constructor(F,ae,we){this.property=F,this.value=ae,this.parameters=we}isConstant(){return this.value.kind==="constant"}constantOr(F){return this.value.kind==="constant"?this.value.value:F}evaluate(F,ae,we,je){return this.property.evaluate(this.value,this.parameters,F,ae,we,je)}}class Uf{constructor(F){this._properties=F,this._values=Object.create(F.defaultPossiblyEvaluatedValues)}get(F){return this._values[F]}}class os{constructor(F){this.specification=F}possiblyEvaluate(F,ae){if(F.isDataDriven())throw new Error("Value should not be data driven");return F.expression.evaluate(ae)}interpolate(F,ae,we){const je=Vo[this.specification.type];return je?je(F,ae,we):F}}class _s{constructor(F,ae){this.specification=F,this.overrides=ae}possiblyEvaluate(F,ae,we,je){return new ju(this,F.expression.kind==="constant"||F.expression.kind==="camera"?{kind:"constant",value:F.expression.evaluate(ae,null,{},we,je)}:F.expression,ae)}interpolate(F,ae,we){if(F.value.kind!=="constant"||ae.value.kind!=="constant")return F;if(F.value.value===void 0||ae.value.value===void 0)return new ju(this,{kind:"constant",value:void 0},F.parameters);const je=Vo[this.specification.type];if(je){const Qe=je(F.value.value,ae.value.value,we);return new ju(this,{kind:"constant",value:Qe},F.parameters)}return F}evaluate(F,ae,we,je,Qe,at){return F.kind==="constant"?F.value:F.evaluate(ae,we,je,Qe,at)}}class qf extends _s{possiblyEvaluate(F,ae,we,je){if(F.value===void 0)return new ju(this,{kind:"constant",value:void 0},ae);if(F.expression.kind==="constant"){const Qe=F.expression.evaluate(ae,null,{},we,je),at=F.property.specification.type==="resolvedImage"&&typeof Qe!="string"?Qe.name:Qe,Et=this._calculate(at,at,at,ae);return new ju(this,{kind:"constant",value:Et},ae)}if(F.expression.kind==="camera"){const Qe=this._calculate(F.expression.evaluate({zoom:ae.zoom-1}),F.expression.evaluate({zoom:ae.zoom}),F.expression.evaluate({zoom:ae.zoom+1}),ae);return new ju(this,{kind:"constant",value:Qe},ae)}return new ju(this,F.expression,ae)}evaluate(F,ae,we,je,Qe,at){if(F.kind==="source"){const Et=F.evaluate(ae,we,je,Qe,at);return this._calculate(Et,Et,Et,ae)}return F.kind==="composite"?this._calculate(F.evaluate({zoom:Math.floor(ae.zoom)-1},we,je),F.evaluate({zoom:Math.floor(ae.zoom)},we,je),F.evaluate({zoom:Math.floor(ae.zoom)+1},we,je),ae):F.value}_calculate(F,ae,we,je){return je.zoom>je.zoomHistory.lastIntegerZoom?{from:F,to:ae}:{from:we,to:ae}}interpolate(F){return F}}class sf{constructor(F){this.specification=F}possiblyEvaluate(F,ae,we,je){if(F.value!==void 0){if(F.expression.kind==="constant"){const Qe=F.expression.evaluate(ae,null,{},we,je);return this._calculate(Qe,Qe,Qe,ae)}return this._calculate(F.expression.evaluate(new Cl(Math.floor(ae.zoom-1),ae)),F.expression.evaluate(new Cl(Math.floor(ae.zoom),ae)),F.expression.evaluate(new Cl(Math.floor(ae.zoom+1),ae)),ae)}}_calculate(F,ae,we,je){return je.zoom>je.zoomHistory.lastIntegerZoom?{from:F,to:ae}:{from:we,to:ae}}interpolate(F){return F}}class Yc{constructor(F){this.specification=F}possiblyEvaluate(F,ae,we,je){return!!F.expression.evaluate(ae,null,{},we,je)}interpolate(){return!1}}class Ze{constructor(F){this.properties=F,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(const ae in F){const we=F[ae];we.specification.overridable&&this.overridableProperties.push(ae);const je=this.defaultPropertyValues[ae]=new Ec(we,void 0),Qe=this.defaultTransitionablePropertyValues[ae]=new Mc(we);this.defaultTransitioningPropertyValues[ae]=Qe.untransitioned(),this.defaultPossiblyEvaluatedValues[ae]=je.possiblyEvaluate({})}}}si("DataDrivenProperty",_s),si("DataConstantProperty",os),si("CrossFadedDataDrivenProperty",qf),si("CrossFadedProperty",sf),si("ColorRampProperty",Yc);const O="-transition";class fe extends ce{constructor(F,ae){if(super(),this.id=F.id,this.type=F.type,this._featureFilter={filter:()=>!0,needGeometry:!1},F.type!=="custom"&&(this.metadata=F.metadata,this.minzoom=F.minzoom,this.maxzoom=F.maxzoom,F.type!=="background"&&(this.source=F.source,this.sourceLayer=F["source-layer"],this.filter=F.filter),ae.layout&&(this._unevaluatedLayout=new jf(ae.layout)),ae.paint)){this._transitionablePaint=new Ic(ae.paint);for(const we in F.paint)this.setPaintProperty(we,F.paint[we],{validate:!1});for(const we in F.layout)this.setLayoutProperty(we,F.layout[we],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Uf(ae.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(F){return F==="visibility"?this.visibility:this._unevaluatedLayout.getValue(F)}setLayoutProperty(F,ae,we={}){ae!=null&&this._validate(oo,`layers.${this.id}.layout.${F}`,F,ae,we)||(F!=="visibility"?this._unevaluatedLayout.setValue(F,ae):this.visibility=ae)}getPaintProperty(F){return F.endsWith(O)?this._transitionablePaint.getTransition(F.slice(0,-11)):this._transitionablePaint.getValue(F)}setPaintProperty(F,ae,we={}){if(ae!=null&&this._validate(Ii,`layers.${this.id}.paint.${F}`,F,ae,we))return!1;if(F.endsWith(O))return this._transitionablePaint.setTransition(F.slice(0,-11),ae||void 0),!1;{const je=this._transitionablePaint._values[F],Qe=je.property.specification["property-type"]==="cross-faded-data-driven",at=je.value.isDataDriven(),Et=je.value;this._transitionablePaint.setValue(F,ae),this._handleSpecialPaintPropertyUpdate(F);const Ut=this._transitionablePaint._values[F].value;return Ut.isDataDriven()||at||Qe||this._handleOverridablePaintPropertyUpdate(F,Et,Ut)}}_handleSpecialPaintPropertyUpdate(F){}_handleOverridablePaintPropertyUpdate(F,ae,we){return!1}isHidden(F){return!!(this.minzoom&&F<this.minzoom)||!!(this.maxzoom&&F>=this.maxzoom)||this.visibility==="none"}updateTransitions(F){this._transitioningPaint=this._transitionablePaint.transitioned(F,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(F,ae){F.getCrossfadeParameters&&(this._crossfadeParameters=F.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(F,void 0,ae)),this.paint=this._transitioningPaint.possiblyEvaluate(F,void 0,ae)}serialize(){const F={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&&(F.layout=F.layout||{},F.layout.visibility=this.visibility),y(F,(ae,we)=>!(ae===void 0||we==="layout"&&!Object.keys(ae).length||we==="paint"&&!Object.keys(ae).length))}_validate(F,ae,we,je,Qe={}){return(!Qe||Qe.validate!==!1)&&hi(this,F.call(Ga,{key:ae,layerType:this.type,objectKey:we,value:je,styleSpec:ue,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(const F in this.paint._values){const ae=this.paint.get(F);if(ae instanceof ju&&lc(ae.property.specification)&&(ae.value.kind==="source"||ae.value.kind==="composite")&&ae.value.isStateDependent)return!0}return!1}}const Re={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class Oe{constructor(F,ae){this._structArray=F,this._pos1=ae*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class We{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(F,ae){return F._trim(),ae&&(F.isTransferred=!0,ae.push(F.arrayBuffer)),{length:F.length,arrayBuffer:F.arrayBuffer}}static deserialize(F){const ae=Object.create(this.prototype);return ae.arrayBuffer=F.arrayBuffer,ae.length=F.length,ae.capacity=F.arrayBuffer.byteLength/ae.bytesPerElement,ae._refreshViews(),ae}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(F){this.reserve(F),this.length=F}reserve(F){if(F>this.capacity){this.capacity=Math.max(F,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);const ae=this.uint8;this._refreshViews(),ae&&this.uint8.set(ae)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function Ct(K,F=1){let ae=0,we=0;return{members:K.map(je=>{const Qe=Re[je.type].BYTES_PER_ELEMENT,at=ae=Nt(ae,Math.max(F,Qe)),Et=je.components||1;return we=Math.max(we,Qe),ae+=Qe*Et,{name:je.name,type:je.type,components:Et,offset:at}}),size:Nt(ae,Math.max(we,F)),alignment:F}}function Nt(K,F){return Math.ceil(K/F)*F}class rr extends We{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(F,ae){const we=this.length;return this.resize(we+1),this.emplace(we,F,ae)}emplace(F,ae,we){const je=2*F;return this.int16[je+0]=ae,this.int16[je+1]=we,F}}rr.prototype.bytesPerElement=4,si("StructArrayLayout2i4",rr);class Tr extends We{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(F,ae,we){const je=this.length;return this.resize(je+1),this.emplace(je,F,ae,we)}emplace(F,ae,we,je){const Qe=3*F;return this.int16[Qe+0]=ae,this.int16[Qe+1]=we,this.int16[Qe+2]=je,F}}Tr.prototype.bytesPerElement=6,si("StructArrayLayout3i6",Tr);class Fr extends We{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(F,ae,we,je){const Qe=this.length;return this.resize(Qe+1),this.emplace(Qe,F,ae,we,je)}emplace(F,ae,we,je,Qe){const at=4*F;return this.int16[at+0]=ae,this.int16[at+1]=we,this.int16[at+2]=je,this.int16[at+3]=Qe,F}}Fr.prototype.bytesPerElement=8,si("StructArrayLayout4i8",Fr);class Vr extends We{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(F,ae,we,je,Qe,at){const Et=this.length;return this.resize(Et+1),this.emplace(Et,F,ae,we,je,Qe,at)}emplace(F,ae,we,je,Qe,at,Et){const Ut=6*F;return this.int16[Ut+0]=ae,this.int16[Ut+1]=we,this.int16[Ut+2]=je,this.int16[Ut+3]=Qe,this.int16[Ut+4]=at,this.int16[Ut+5]=Et,F}}Vr.prototype.bytesPerElement=12,si("StructArrayLayout2i4i12",Vr);class mn extends We{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(F,ae,we,je,Qe,at){const Et=this.length;return this.resize(Et+1),this.emplace(Et,F,ae,we,je,Qe,at)}emplace(F,ae,we,je,Qe,at,Et){const Ut=4*F,ir=8*F;return this.int16[Ut+0]=ae,this.int16[Ut+1]=we,this.uint8[ir+4]=je,this.uint8[ir+5]=Qe,this.uint8[ir+6]=at,this.uint8[ir+7]=Et,F}}mn.prototype.bytesPerElement=8,si("StructArrayLayout2i4ub8",mn);class Dn extends We{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(F,ae){const we=this.length;return this.resize(we+1),this.emplace(we,F,ae)}emplace(F,ae,we){const je=2*F;return this.float32[je+0]=ae,this.float32[je+1]=we,F}}Dn.prototype.bytesPerElement=8,si("StructArrayLayout2f8",Dn);class nt extends We{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(F,ae,we,je,Qe,at,Et,Ut,ir,Er){const Ir=this.length;return this.resize(Ir+1),this.emplace(Ir,F,ae,we,je,Qe,at,Et,Ut,ir,Er)}emplace(F,ae,we,je,Qe,at,Et,Ut,ir,Er,Ir){const nn=10*F;return this.uint16[nn+0]=ae,this.uint16[nn+1]=we,this.uint16[nn+2]=je,this.uint16[nn+3]=Qe,this.uint16[nn+4]=at,this.uint16[nn+5]=Et,this.uint16[nn+6]=Ut,this.uint16[nn+7]=ir,this.uint16[nn+8]=Er,this.uint16[nn+9]=Ir,F}}nt.prototype.bytesPerElement=20,si("StructArrayLayout10ui20",nt);class ct extends We{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(F,ae,we,je,Qe,at,Et,Ut,ir,Er,Ir,nn){const vn=this.length;return this.resize(vn+1),this.emplace(vn,F,ae,we,je,Qe,at,Et,Ut,ir,Er,Ir,nn)}emplace(F,ae,we,je,Qe,at,Et,Ut,ir,Er,Ir,nn,vn){const Cn=12*F;return this.int16[Cn+0]=ae,this.int16[Cn+1]=we,this.int16[Cn+2]=je,this.int16[Cn+3]=Qe,this.uint16[Cn+4]=at,this.uint16[Cn+5]=Et,this.uint16[Cn+6]=Ut,this.uint16[Cn+7]=ir,this.int16[Cn+8]=Er,this.int16[Cn+9]=Ir,this.int16[Cn+10]=nn,this.int16[Cn+11]=vn,F}}ct.prototype.bytesPerElement=24,si("StructArrayLayout4i4ui4i24",ct);class Tt extends We{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(F,ae,we){const je=this.length;return this.resize(je+1),this.emplace(je,F,ae,we)}emplace(F,ae,we,je){const Qe=3*F;return this.float32[Qe+0]=ae,this.float32[Qe+1]=we,this.float32[Qe+2]=je,F}}Tt.prototype.bytesPerElement=12,si("StructArrayLayout3f12",Tt);class Pt extends We{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(F){const ae=this.length;return this.resize(ae+1),this.emplace(ae,F)}emplace(F,ae){return this.uint32[1*F+0]=ae,F}}Pt.prototype.bytesPerElement=4,si("StructArrayLayout1ul4",Pt);class Gt extends We{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(F,ae,we,je,Qe,at,Et,Ut,ir){const Er=this.length;return this.resize(Er+1),this.emplace(Er,F,ae,we,je,Qe,at,Et,Ut,ir)}emplace(F,ae,we,je,Qe,at,Et,Ut,ir,Er){const Ir=10*F,nn=5*F;return this.int16[Ir+0]=ae,this.int16[Ir+1]=we,this.int16[Ir+2]=je,this.int16[Ir+3]=Qe,this.int16[Ir+4]=at,this.int16[Ir+5]=Et,this.uint32[nn+3]=Ut,this.uint16[Ir+8]=ir,this.uint16[Ir+9]=Er,F}}Gt.prototype.bytesPerElement=20,si("StructArrayLayout6i1ul2ui20",Gt);class zt extends We{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(F,ae,we,je,Qe,at){const Et=this.length;return this.resize(Et+1),this.emplace(Et,F,ae,we,je,Qe,at)}emplace(F,ae,we,je,Qe,at,Et){const Ut=6*F;return this.int16[Ut+0]=ae,this.int16[Ut+1]=we,this.int16[Ut+2]=je,this.int16[Ut+3]=Qe,this.int16[Ut+4]=at,this.int16[Ut+5]=Et,F}}zt.prototype.bytesPerElement=12,si("StructArrayLayout2i2i2i12",zt);class Kt extends We{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(F,ae,we,je,Qe){const at=this.length;return this.resize(at+1),this.emplace(at,F,ae,we,je,Qe)}emplace(F,ae,we,je,Qe,at){const Et=4*F,Ut=8*F;return this.float32[Et+0]=ae,this.float32[Et+1]=we,this.float32[Et+2]=je,this.int16[Ut+6]=Qe,this.int16[Ut+7]=at,F}}Kt.prototype.bytesPerElement=16,si("StructArrayLayout2f1f2i16",Kt);class Cr extends We{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(F,ae,we,je,Qe,at){const Et=this.length;return this.resize(Et+1),this.emplace(Et,F,ae,we,je,Qe,at)}emplace(F,ae,we,je,Qe,at,Et){const Ut=16*F,ir=4*F,Er=8*F;return this.uint8[Ut+0]=ae,this.uint8[Ut+1]=we,this.float32[ir+1]=je,this.float32[ir+2]=Qe,this.int16[Er+6]=at,this.int16[Er+7]=Et,F}}Cr.prototype.bytesPerElement=16,si("StructArrayLayout2ub2f2i16",Cr);class Nr extends We{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(F,ae,we){const je=this.length;return this.resize(je+1),this.emplace(je,F,ae,we)}emplace(F,ae,we,je){const Qe=3*F;return this.uint16[Qe+0]=ae,this.uint16[Qe+1]=we,this.uint16[Qe+2]=je,F}}Nr.prototype.bytesPerElement=6,si("StructArrayLayout3ui6",Nr);class Hr extends We{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(F,ae,we,je,Qe,at,Et,Ut,ir,Er,Ir,nn,vn,Cn,jn,aa,Oa){const Pi=this.length;return this.resize(Pi+1),this.emplace(Pi,F,ae,we,je,Qe,at,Et,Ut,ir,Er,Ir,nn,vn,Cn,jn,aa,Oa)}emplace(F,ae,we,je,Qe,at,Et,Ut,ir,Er,Ir,nn,vn,Cn,jn,aa,Oa,Pi){const oi=24*F,Ti=12*F,ao=48*F;return this.int16[oi+0]=ae,this.int16[oi+1]=we,this.uint16[oi+2]=je,this.uint16[oi+3]=Qe,this.uint32[Ti+2]=at,this.uint32[Ti+3]=Et,this.uint32[Ti+4]=Ut,this.uint16[oi+10]=ir,this.uint16[oi+11]=Er,this.uint16[oi+12]=Ir,this.float32[Ti+7]=nn,this.float32[Ti+8]=vn,this.uint8[ao+36]=Cn,this.uint8[ao+37]=jn,this.uint8[ao+38]=aa,this.uint32[Ti+10]=Oa,this.int16[oi+22]=Pi,F}}Hr.prototype.bytesPerElement=48,si("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Hr);class sn extends We{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(F,ae,we,je,Qe,at,Et,Ut,ir,Er,Ir,nn,vn,Cn,jn,aa,Oa,Pi,oi,Ti,ao,Lo,cs,Al,xs,ss,Xs,Ns){const Ds=this.length;return this.resize(Ds+1),this.emplace(Ds,F,ae,we,je,Qe,at,Et,Ut,ir,Er,Ir,nn,vn,Cn,jn,aa,Oa,Pi,oi,Ti,ao,Lo,cs,Al,xs,ss,Xs,Ns)}emplace(F,ae,we,je,Qe,at,Et,Ut,ir,Er,Ir,nn,vn,Cn,jn,aa,Oa,Pi,oi,Ti,ao,Lo,cs,Al,xs,ss,Xs,Ns,Ds){const xo=32*F,tl=16*F;return this.int16[xo+0]=ae,this.int16[xo+1]=we,this.int16[xo+2]=je,this.int16[xo+3]=Qe,this.int16[xo+4]=at,this.int16[xo+5]=Et,this.int16[xo+6]=Ut,this.int16[xo+7]=ir,this.uint16[xo+8]=Er,this.uint16[xo+9]=Ir,this.uint16[xo+10]=nn,this.uint16[xo+11]=vn,this.uint16[xo+12]=Cn,this.uint16[xo+13]=jn,this.uint16[xo+14]=aa,this.uint16[xo+15]=Oa,this.uint16[xo+16]=Pi,this.uint16[xo+17]=oi,this.uint16[xo+18]=Ti,this.uint16[xo+19]=ao,this.uint16[xo+20]=Lo,this.uint16[xo+21]=cs,this.uint16[xo+22]=Al,this.uint32[tl+12]=xs,this.float32[tl+13]=ss,this.float32[tl+14]=Xs,this.uint16[xo+30]=Ns,this.uint16[xo+31]=Ds,F}}sn.prototype.bytesPerElement=64,si("StructArrayLayout8i15ui1ul2f2ui64",sn);class bn extends We{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(F){const ae=this.length;return this.resize(ae+1),this.emplace(ae,F)}emplace(F,ae){return this.float32[1*F+0]=ae,F}}bn.prototype.bytesPerElement=4,si("StructArrayLayout1f4",bn);class Vn extends We{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(F,ae,we){const je=this.length;return this.resize(je+1),this.emplace(je,F,ae,we)}emplace(F,ae,we,je){const Qe=3*F;return this.uint16[6*F+0]=ae,this.float32[Qe+1]=we,this.float32[Qe+2]=je,F}}Vn.prototype.bytesPerElement=12,si("StructArrayLayout1ui2f12",Vn);class Yn extends We{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(F,ae,we){const je=this.length;return this.resize(je+1),this.emplace(je,F,ae,we)}emplace(F,ae,we,je){const Qe=4*F;return this.uint32[2*F+0]=ae,this.uint16[Qe+2]=we,this.uint16[Qe+3]=je,F}}Yn.prototype.bytesPerElement=8,si("StructArrayLayout1ul2ui8",Yn);class va extends We{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(F,ae){const we=this.length;return this.resize(we+1),this.emplace(we,F,ae)}emplace(F,ae,we){const je=2*F;return this.uint16[je+0]=ae,this.uint16[je+1]=we,F}}va.prototype.bytesPerElement=4,si("StructArrayLayout2ui4",va);class Va extends We{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(F){const ae=this.length;return this.resize(ae+1),this.emplace(ae,F)}emplace(F,ae){return this.uint16[1*F+0]=ae,F}}Va.prototype.bytesPerElement=2,si("StructArrayLayout1ui2",Va);class Si extends We{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(F,ae,we,je){const Qe=this.length;return this.resize(Qe+1),this.emplace(Qe,F,ae,we,je)}emplace(F,ae,we,je,Qe){const at=4*F;return this.float32[at+0]=ae,this.float32[at+1]=we,this.float32[at+2]=je,this.float32[at+3]=Qe,F}}Si.prototype.bytesPerElement=16,si("StructArrayLayout4f16",Si);class yi extends Oe{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}get anchorPoint(){return new s(this.anchorPointX,this.anchorPointY)}}yi.prototype.size=20;class Mi extends Gt{get(F){return new yi(this,F)}}si("CollisionBoxArray",Mi);class go extends Oe{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(F){this._structArray.uint8[this._pos1+37]=F}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(F){this._structArray.uint8[this._pos1+38]=F}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(F){this._structArray.uint32[this._pos4+10]=F}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}go.prototype.size=48;class jo extends Hr{get(F){return new go(this,F)}}si("PlacedSymbolArray",jo);class Do extends Oe{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(F){this._structArray.uint32[this._pos4+12]=F}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+14]}get textAnchorOffsetStartIndex(){return this._structArray.uint16[this._pos2+30]}get textAnchorOffsetEndIndex(){return this._structArray.uint16[this._pos2+31]}}Do.prototype.size=64;class us extends sn{get(F){return new Do(this,F)}}si("SymbolInstanceArray",us);class sl extends bn{getoffsetX(F){return this.float32[1*F+0]}}si("GlyphOffsetArray",sl);class ll extends Tr{getx(F){return this.int16[3*F+0]}gety(F){return this.int16[3*F+1]}gettileUnitDistanceFromAnchor(F){return this.int16[3*F+2]}}si("SymbolLineVertexArray",ll);class Bs extends Oe{get textAnchor(){return this._structArray.uint16[this._pos2+0]}get textOffset0(){return this._structArray.float32[this._pos4+1]}get textOffset1(){return this._structArray.float32[this._pos4+2]}}Bs.prototype.size=12;class vl extends Vn{get(F){return new Bs(this,F)}}si("TextAnchorOffsetArray",vl);class Eu extends Oe{get featureIndex(){return this._structArray.uint32[this._pos4+0]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+2]}get bucketIndex(){return this._structArray.uint16[this._pos2+3]}}Eu.prototype.size=8;class vu extends Yn{get(F){return new Eu(this,F)}}si("FeatureIndexArray",vu);class Us extends rr{}class qs extends rr{}class Hu extends rr{}class yc extends Vr{}class Zc extends mn{}class Te extends Dn{}class He extends nt{}class ft extends ct{}class Lt extends Tt{}class Dt extends Pt{}class qt extends zt{}class dr extends Cr{}class hr extends Nr{}class Pr extends va{}const ln=Ct([{name:"a_pos",components:2,type:"Int16"}],4),{members:on}=ln;class Mn{constructor(F=[]){this.segments=F}prepareSegment(F,ae,we,je){let Qe=this.segments[this.segments.length-1];return F>Mn.MAX_VERTEX_ARRAY_LENGTH&&x(`Max vertices per segment is ${Mn.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${F}`),(!Qe||Qe.vertexLength+F>Mn.MAX_VERTEX_ARRAY_LENGTH||Qe.sortKey!==je)&&(Qe={vertexOffset:ae.length,primitiveOffset:we.length,vertexLength:0,primitiveLength:0},je!==void 0&&(Qe.sortKey=je),this.segments.push(Qe)),Qe}get(){return this.segments}destroy(){for(const F of this.segments)for(const ae in F.vaos)F.vaos[ae].destroy()}static simpleSegment(F,ae,we,je){return new Mn([{vertexOffset:F,primitiveOffset:ae,vertexLength:we,primitiveLength:je,vaos:{},sortKey:0}])}}function Un(K,F){return 256*(K=T(Math.floor(K),0,255))+T(Math.floor(F),0,255)}Mn.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,si("SegmentVector",Mn);const Gn=Ct([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]);var Ja={exports:{}},Qn={exports:{}};Qn.exports=function(K,F){var ae,we,je,Qe,at,Et,Ut,ir;for(we=K.length-(ae=3&K.length),je=F,at=3432918353,Et=461845907,ir=0;ir<we;)Ut=255&K.charCodeAt(ir)|(255&K.charCodeAt(++ir))<<8|(255&K.charCodeAt(++ir))<<16|(255&K.charCodeAt(++ir))<<24,++ir,je=27492+(65535&(Qe=5*(65535&(je=(je^=Ut=(65535&(Ut=(Ut=(65535&Ut)*at+(((Ut>>>16)*at&65535)<<16)&4294967295)<<15|Ut>>>17))*Et+(((Ut>>>16)*Et&65535)<<16)&4294967295)<<13|je>>>19))+((5*(je>>>16)&65535)<<16)&4294967295))+((58964+(Qe>>>16)&65535)<<16);switch(Ut=0,ae){case 3:Ut^=(255&K.charCodeAt(ir+2))<<16;case 2:Ut^=(255&K.charCodeAt(ir+1))<<8;case 1:je^=Ut=(65535&(Ut=(Ut=(65535&(Ut^=255&K.charCodeAt(ir)))*at+(((Ut>>>16)*at&65535)<<16)&4294967295)<<15|Ut>>>17))*Et+(((Ut>>>16)*Et&65535)<<16)&4294967295}return je^=K.length,je=2246822507*(65535&(je^=je>>>16))+((2246822507*(je>>>16)&65535)<<16)&4294967295,je=3266489909*(65535&(je^=je>>>13))+((3266489909*(je>>>16)&65535)<<16)&4294967295,(je^=je>>>16)>>>0};var ba=Qn.exports,Ca={exports:{}};Ca.exports=function(K,F){for(var ae,we=K.length,je=F^we,Qe=0;we>=4;)ae=1540483477*(65535&(ae=255&K.charCodeAt(Qe)|(255&K.charCodeAt(++Qe))<<8|(255&K.charCodeAt(++Qe))<<16|(255&K.charCodeAt(++Qe))<<24))+((1540483477*(ae>>>16)&65535)<<16),je=1540483477*(65535&je)+((1540483477*(je>>>16)&65535)<<16)^(ae=1540483477*(65535&(ae^=ae>>>24))+((1540483477*(ae>>>16)&65535)<<16)),we-=4,++Qe;switch(we){case 3:je^=(255&K.charCodeAt(Qe+2))<<16;case 2:je^=(255&K.charCodeAt(Qe+1))<<8;case 1:je=1540483477*(65535&(je^=255&K.charCodeAt(Qe)))+((1540483477*(je>>>16)&65535)<<16)}return je=1540483477*(65535&(je^=je>>>13))+((1540483477*(je>>>16)&65535)<<16),(je^=je>>>15)>>>0};var Xa=ba,ei=Ca.exports;Ja.exports=Xa,Ja.exports.murmur3=Xa,Ja.exports.murmur2=ei;var Ma=a(Ja.exports);class Ci{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(F,ae,we,je){this.ids.push(po(F)),this.positions.push(ae,we,je)}getPositions(F){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");const ae=po(F);let we=0,je=this.ids.length-1;for(;we<je;){const at=we+je>>1;this.ids[at]>=ae?je=at:we=at+1}const Qe=[];for(;this.ids[we]===ae;)Qe.push({index:this.positions[3*we],start:this.positions[3*we+1],end:this.positions[3*we+2]}),we++;return Qe}static serialize(F,ae){const we=new Float64Array(F.ids),je=new Uint32Array(F.positions);return ro(we,je,0,we.length-1),ae&&ae.push(we.buffer,je.buffer),{ids:we,positions:je}}static deserialize(F){const ae=new Ci;return ae.ids=F.ids,ae.positions=F.positions,ae.indexed=!0,ae}}function po(K){const F=+K;return!isNaN(F)&&F<=Number.MAX_SAFE_INTEGER?F:Ma(String(K))}function ro(K,F,ae,we){for(;ae<we;){const je=K[ae+we>>1];let Qe=ae-1,at=we+1;for(;;){do Qe++;while(K[Qe]<je);do at--;while(K[at]>je);if(Qe>=at)break;fo(K,Qe,at),fo(F,3*Qe,3*at),fo(F,3*Qe+1,3*at+1),fo(F,3*Qe+2,3*at+2)}at-ae<we-at?(ro(K,F,ae,at),ae=at+1):(ro(K,F,at+1,we),we=at)}}function fo(K,F,ae){const we=K[F];K[F]=K[ae],K[ae]=we}si("FeaturePositionMap",Ci);class Fo{constructor(F,ae){this.gl=F.gl,this.location=ae}}class Ho extends Fo{constructor(F,ae){super(F,ae),this.current=0}set(F){this.current!==F&&(this.current=F,this.gl.uniform1f(this.location,F))}}class il extends Fo{constructor(F,ae){super(F,ae),this.current=[0,0,0,0]}set(F){F[0]===this.current[0]&&F[1]===this.current[1]&&F[2]===this.current[2]&&F[3]===this.current[3]||(this.current=F,this.gl.uniform4f(this.location,F[0],F[1],F[2],F[3]))}}class Wo extends Fo{constructor(F,ae){super(F,ae),this.current=br.transparent}set(F){F.r===this.current.r&&F.g===this.current.g&&F.b===this.current.b&&F.a===this.current.a||(this.current=F,this.gl.uniform4f(this.location,F.r,F.g,F.b,F.a))}}const bs=new Float32Array(16);function dl(K){return[Un(255*K.r,255*K.g),Un(255*K.b,255*K.a)]}class Gu{constructor(F,ae,we){this.value=F,this.uniformNames=ae.map(je=>`u_${je}`),this.type=we}setUniform(F,ae,we){F.set(we.constantOr(this.value))}getBinding(F,ae,we){return this.type==="color"?new Wo(F,ae):new Ho(F,ae)}}class fu{constructor(F,ae){this.uniformNames=ae.map(we=>`u_${we}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(F,ae){this.pixelRatioFrom=ae.pixelRatio,this.pixelRatioTo=F.pixelRatio,this.patternFrom=ae.tlbr,this.patternTo=F.tlbr}setUniform(F,ae,we,je){const Qe=je==="u_pattern_to"?this.patternTo:je==="u_pattern_from"?this.patternFrom:je==="u_pixel_ratio_to"?this.pixelRatioTo:je==="u_pixel_ratio_from"?this.pixelRatioFrom:null;Qe&&F.set(Qe)}getBinding(F,ae,we){return we.substr(0,9)==="u_pattern"?new il(F,ae):new Ho(F,ae)}}class ko{constructor(F,ae,we,je){this.expression=F,this.type=we,this.maxValue=0,this.paintVertexAttributes=ae.map(Qe=>({name:`a_${Qe}`,type:"Float32",components:we==="color"?2:1,offset:0})),this.paintVertexArray=new je}populatePaintArray(F,ae,we,je,Qe){const at=this.paintVertexArray.length,Et=this.expression.evaluate(new Cl(0),ae,{},je,[],Qe);this.paintVertexArray.resize(F),this._setPaintValue(at,F,Et)}updatePaintArray(F,ae,we,je){const Qe=this.expression.evaluate({zoom:0},we,je);this._setPaintValue(F,ae,Qe)}_setPaintValue(F,ae,we){if(this.type==="color"){const je=dl(we);for(let Qe=F;Qe<ae;Qe++)this.paintVertexArray.emplace(Qe,je[0],je[1])}else{for(let je=F;je<ae;je++)this.paintVertexArray.emplace(je,we);this.maxValue=Math.max(this.maxValue,Math.abs(we))}}upload(F){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=F.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}}class Vs{constructor(F,ae,we,je,Qe,at){this.expression=F,this.uniformNames=ae.map(Et=>`u_${Et}_t`),this.type=we,this.useIntegerZoom=je,this.zoom=Qe,this.maxValue=0,this.paintVertexAttributes=ae.map(Et=>({name:`a_${Et}`,type:"Float32",components:we==="color"?4:2,offset:0})),this.paintVertexArray=new at}populatePaintArray(F,ae,we,je,Qe){const at=this.expression.evaluate(new Cl(this.zoom),ae,{},je,[],Qe),Et=this.expression.evaluate(new Cl(this.zoom+1),ae,{},je,[],Qe),Ut=this.paintVertexArray.length;this.paintVertexArray.resize(F),this._setPaintValue(Ut,F,at,Et)}updatePaintArray(F,ae,we,je){const Qe=this.expression.evaluate({zoom:this.zoom},we,je),at=this.expression.evaluate({zoom:this.zoom+1},we,je);this._setPaintValue(F,ae,Qe,at)}_setPaintValue(F,ae,we,je){if(this.type==="color"){const Qe=dl(we),at=dl(je);for(let Et=F;Et<ae;Et++)this.paintVertexArray.emplace(Et,Qe[0],Qe[1],at[0],at[1])}else{for(let Qe=F;Qe<ae;Qe++)this.paintVertexArray.emplace(Qe,we,je);this.maxValue=Math.max(this.maxValue,Math.abs(we),Math.abs(je))}}upload(F){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=F.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}setUniform(F,ae){const we=this.useIntegerZoom?Math.floor(ae.zoom):ae.zoom,je=T(this.expression.interpolationFactor(we,this.zoom,this.zoom+1),0,1);F.set(je)}getBinding(F,ae,we){return new Ho(F,ae)}}class ul{constructor(F,ae,we,je,Qe,at){this.expression=F,this.type=ae,this.useIntegerZoom=we,this.zoom=je,this.layerId=at,this.zoomInPaintVertexArray=new Qe,this.zoomOutPaintVertexArray=new Qe}populatePaintArray(F,ae,we){const je=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(F),this.zoomOutPaintVertexArray.resize(F),this._setPaintValues(je,F,ae.patterns&&ae.patterns[this.layerId],we)}updatePaintArray(F,ae,we,je,Qe){this._setPaintValues(F,ae,we.patterns&&we.patterns[this.layerId],Qe)}_setPaintValues(F,ae,we,je){if(!je||!we)return;const{min:Qe,mid:at,max:Et}=we,Ut=je[Qe],ir=je[at],Er=je[Et];if(Ut&&ir&&Er)for(let Ir=F;Ir<ae;Ir++)this.zoomInPaintVertexArray.emplace(Ir,ir.tl[0],ir.tl[1],ir.br[0],ir.br[1],Ut.tl[0],Ut.tl[1],Ut.br[0],Ut.br[1],ir.pixelRatio,Ut.pixelRatio),this.zoomOutPaintVertexArray.emplace(Ir,ir.tl[0],ir.tl[1],ir.br[0],ir.br[1],Er.tl[0],Er.tl[1],Er.br[0],Er.br[1],ir.pixelRatio,Er.pixelRatio)}upload(F){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=F.createVertexBuffer(this.zoomInPaintVertexArray,Gn.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=F.createVertexBuffer(this.zoomOutPaintVertexArray,Gn.members,this.expression.isStateDependent))}destroy(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()}}class ou{constructor(F,ae,we){this.binders={},this._buffers=[];const je=[];for(const Qe in F.paint._values){if(!we(Qe))continue;const at=F.paint.get(Qe);if(!(at instanceof ju&&lc(at.property.specification)))continue;const Et=Dc(Qe,F.type),Ut=at.value,ir=at.property.specification.type,Er=at.property.useIntegerZoom,Ir=at.property.specification["property-type"],nn=Ir==="cross-faded"||Ir==="cross-faded-data-driven";if(Ut.kind==="constant")this.binders[Qe]=nn?new fu(Ut.value,Et):new Gu(Ut.value,Et,ir),je.push(`/u_${Qe}`);else if(Ut.kind==="source"||nn){const vn=jl(Qe,ir,"source");this.binders[Qe]=nn?new ul(Ut,ir,Er,ae,vn,F.id):new ko(Ut,Et,ir,vn),je.push(`/a_${Qe}`)}else{const vn=jl(Qe,ir,"composite");this.binders[Qe]=new Vs(Ut,Et,ir,Er,ae,vn),je.push(`/z_${Qe}`)}}this.cacheKey=je.sort().join("")}getMaxValue(F){const ae=this.binders[F];return ae instanceof ko||ae instanceof Vs?ae.maxValue:0}populatePaintArrays(F,ae,we,je,Qe){for(const at in this.binders){const Et=this.binders[at];(Et instanceof ko||Et instanceof Vs||Et instanceof ul)&&Et.populatePaintArray(F,ae,we,je,Qe)}}setConstantPatternPositions(F,ae){for(const we in this.binders){const je=this.binders[we];je instanceof fu&&je.setConstantPatternPositions(F,ae)}}updatePaintArrays(F,ae,we,je,Qe){let at=!1;for(const Et in F){const Ut=ae.getPositions(Et);for(const ir of Ut){const Er=we.feature(ir.index);for(const Ir in this.binders){const nn=this.binders[Ir];if((nn instanceof ko||nn instanceof Vs||nn instanceof ul)&&nn.expression.isStateDependent===!0){const vn=je.paint.get(Ir);nn.expression=vn.value,nn.updatePaintArray(ir.start,ir.end,Er,F[Et],Qe),at=!0}}}}return at}defines(){const F=[];for(const ae in this.binders){const we=this.binders[ae];(we instanceof Gu||we instanceof fu)&&F.push(...we.uniformNames.map(je=>`#define HAS_UNIFORM_${je}`))}return F}getBinderAttributes(){const F=[];for(const ae in this.binders){const we=this.binders[ae];if(we instanceof ko||we instanceof Vs)for(let je=0;je<we.paintVertexAttributes.length;je++)F.push(we.paintVertexAttributes[je].name);else if(we instanceof ul)for(let je=0;je<Gn.members.length;je++)F.push(Gn.members[je].name)}return F}getBinderUniforms(){const F=[];for(const ae in this.binders){const we=this.binders[ae];if(we instanceof Gu||we instanceof fu||we instanceof Vs)for(const je of we.uniformNames)F.push(je)}return F}getPaintVertexBuffers(){return this._buffers}getUniforms(F,ae){const we=[];for(const je in this.binders){const Qe=this.binders[je];if(Qe instanceof Gu||Qe instanceof fu||Qe instanceof Vs){for(const at of Qe.uniformNames)if(ae[at]){const Et=Qe.getBinding(F,ae[at],at);we.push({name:at,property:je,binding:Et})}}}return we}setUniforms(F,ae,we,je){for(const{name:Qe,property:at,binding:Et}of ae)this.binders[at].setUniform(Et,je,we.get(at),Qe)}updatePaintBuffers(F){this._buffers=[];for(const ae in this.binders){const we=this.binders[ae];if(F&&we instanceof ul){const je=F.fromScale===2?we.zoomInPaintVertexBuffer:we.zoomOutPaintVertexBuffer;je&&this._buffers.push(je)}else(we instanceof ko||we instanceof Vs)&&we.paintVertexBuffer&&this._buffers.push(we.paintVertexBuffer)}}upload(F){for(const ae in this.binders){const we=this.binders[ae];(we instanceof ko||we instanceof Vs||we instanceof ul)&&we.upload(F)}this.updatePaintBuffers()}destroy(){for(const F in this.binders){const ae=this.binders[F];(ae instanceof ko||ae instanceof Vs||ae instanceof ul)&&ae.destroy()}}}class Yl{constructor(F,ae,we=()=>!0){this.programConfigurations={};for(const je of F)this.programConfigurations[je.id]=new ou(je,ae,we);this.needsUpload=!1,this._featureMap=new Ci,this._bufferOffset=0}populatePaintArrays(F,ae,we,je,Qe,at){for(const Et in this.programConfigurations)this.programConfigurations[Et].populatePaintArrays(F,ae,je,Qe,at);ae.id!==void 0&&this._featureMap.add(ae.id,we,this._bufferOffset,F),this._bufferOffset=F,this.needsUpload=!0}updatePaintArrays(F,ae,we,je){for(const Qe of we)this.needsUpload=this.programConfigurations[Qe.id].updatePaintArrays(F,this._featureMap,ae,Qe,je)||this.needsUpload}get(F){return this.programConfigurations[F]}upload(F){if(this.needsUpload){for(const ae in this.programConfigurations)this.programConfigurations[ae].upload(F);this.needsUpload=!1}}destroy(){for(const F in this.programConfigurations)this.programConfigurations[F].destroy()}}function Dc(K,F){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[K]||[K.replace(`${F}-`,"").replace(/-/g,"_")]}function jl(K,F,ae){const we={color:{source:Dn,composite:Si},number:{source:bn,composite:Dn}},je=(function(Qe){return{"line-pattern":{source:He,composite:He},"fill-pattern":{source:He,composite:He},"fill-extrusion-pattern":{source:He,composite:He}}[Qe]})(K);return je&&je[ae]||we[F][ae]}si("ConstantBinder",Gu),si("CrossFadedConstantBinder",fu),si("SourceExpressionBinder",ko),si("CrossFadedCompositeBinder",ul),si("CompositeExpressionBinder",Vs),si("ProgramConfiguration",ou,{omit:["_buffers"]}),si("ProgramConfigurationSet",Yl);const su=8192,lf=Math.pow(2,14)-1,Uu=-lf-1;function St(K){const F=su/K.extent,ae=K.loadGeometry();for(let we=0;we<ae.length;we++){const je=ae[we];for(let Qe=0;Qe<je.length;Qe++){const at=je[Qe],Et=Math.round(at.x*F),Ut=Math.round(at.y*F);at.x=T(Et,Uu,lf),at.y=T(Ut,Uu,lf),(Et<at.x||Et>at.x+1||Ut<at.y||Ut>at.y+1)&&x("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return ae}function kr(K,F){return{type:K.type,id:K.id,properties:K.properties,geometry:F?St(K):[]}}function Dr(K,F,ae,we,je){K.emplaceBack(2*F+(we+1)/2,2*ae+(je+1)/2)}class Xn{constructor(F){this.zoom=F.zoom,this.overscaling=F.overscaling,this.layers=F.layers,this.layerIds=this.layers.map(ae=>ae.id),this.index=F.index,this.hasPattern=!1,this.layoutVertexArray=new qs,this.indexArray=new hr,this.segments=new Mn,this.programConfigurations=new Yl(F.layers,F.zoom),this.stateDependentLayerIds=this.layers.filter(ae=>ae.isStateDependent()).map(ae=>ae.id)}populate(F,ae,we){const je=this.layers[0],Qe=[];let at=null,Et=!1;je.type==="circle"&&(at=je.layout.get("circle-sort-key"),Et=!at.isConstant());for(const{feature:Ut,id:ir,index:Er,sourceLayerIndex:Ir}of F){const nn=this.layers[0]._featureFilter.needGeometry,vn=kr(Ut,nn);if(!this.layers[0]._featureFilter.filter(new Cl(this.zoom),vn,we))continue;const Cn=Et?at.evaluate(vn,{},we):void 0,jn={id:ir,properties:Ut.properties,type:Ut.type,sourceLayerIndex:Ir,index:Er,geometry:nn?vn.geometry:St(Ut),patterns:{},sortKey:Cn};Qe.push(jn)}Et&&Qe.sort((Ut,ir)=>Ut.sortKey-ir.sortKey);for(const Ut of Qe){const{geometry:ir,index:Er,sourceLayerIndex:Ir}=Ut,nn=F[Er].feature;this.addFeature(Ut,ir,Er,we),ae.featureIndex.insert(nn,ir,Er,Ir,this.index)}}update(F,ae,we){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(F,ae,this.stateDependentLayers,we)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(F){this.uploaded||(this.layoutVertexBuffer=F.createVertexBuffer(this.layoutVertexArray,on),this.indexBuffer=F.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(F),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(F,ae,we,je){for(const Qe of ae)for(const at of Qe){const Et=at.x,Ut=at.y;if(Et<0||Et>=su||Ut<0||Ut>=su)continue;const ir=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,F.sortKey),Er=ir.vertexLength;Dr(this.layoutVertexArray,Et,Ut,-1,-1),Dr(this.layoutVertexArray,Et,Ut,1,-1),Dr(this.layoutVertexArray,Et,Ut,1,1),Dr(this.layoutVertexArray,Et,Ut,-1,1),this.indexArray.emplaceBack(Er,Er+1,Er+2),this.indexArray.emplaceBack(Er,Er+3,Er+2),ir.vertexLength+=4,ir.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,F,we,{},je)}}function La(K,F){for(let ae=0;ae<K.length;ae++)if(di(F,K[ae]))return!0;for(let ae=0;ae<F.length;ae++)if(di(K,F[ae]))return!0;return!!ti(K,F)}function Rn(K,F,ae){return!!di(K,F)||!!gi(F,K,ae)}function Pn(K,F){if(K.length===1)return qi(F,K[0]);for(let ae=0;ae<F.length;ae++){const we=F[ae];for(let je=0;je<we.length;je++)if(di(K,we[je]))return!0}for(let ae=0;ae<K.length;ae++)if(qi(F,K[ae]))return!0;for(let ae=0;ae<F.length;ae++)if(ti(K,F[ae]))return!0;return!1}function ni(K,F,ae){if(K.length>1){if(ti(K,F))return!0;for(let we=0;we<F.length;we++)if(gi(F[we],K,ae))return!0}for(let we=0;we<K.length;we++)if(gi(K[we],F,ae))return!0;return!1}function ti(K,F){if(K.length===0||F.length===0)return!1;for(let ae=0;ae<K.length-1;ae++){const we=K[ae],je=K[ae+1];for(let Qe=0;Qe<F.length-1;Qe++)if(ri(we,je,F[Qe],F[Qe+1]))return!0}return!1}function ri(K,F,ae,we){return N(K,ae,we)!==N(F,ae,we)&&N(K,F,ae)!==N(K,F,we)}function gi(K,F,ae){const we=ae*ae;if(F.length===1)return K.distSqr(F[0])<we;for(let je=1;je<F.length;je++)if(io(K,F[je-1],F[je])<we)return!0;return!1}function io(K,F,ae){const we=F.distSqr(ae);if(we===0)return K.distSqr(F);const je=((K.x-F.x)*(ae.x-F.x)+(K.y-F.y)*(ae.y-F.y))/we;return K.distSqr(je<0?F:je>1?ae:ae.sub(F)._mult(je)._add(F))}function qi(K,F){let ae,we,je,Qe=!1;for(let at=0;at<K.length;at++){ae=K[at];for(let Et=0,Ut=ae.length-1;Et<ae.length;Ut=Et++)we=ae[Et],je=ae[Ut],we.y>F.y!=je.y>F.y&&F.x<(je.x-we.x)*(F.y-we.y)/(je.y-we.y)+we.x&&(Qe=!Qe)}return Qe}function di(K,F){let ae=!1;for(let we=0,je=K.length-1;we<K.length;je=we++){const Qe=K[we],at=K[je];Qe.y>F.y!=at.y>F.y&&F.x<(at.x-Qe.x)*(F.y-Qe.y)/(at.y-Qe.y)+Qe.x&&(ae=!ae)}return ae}function Na(K,F,ae){const we=ae[0],je=ae[2];if(K.x<we.x&&F.x<we.x||K.x>je.x&&F.x>je.x||K.y<we.y&&F.y<we.y||K.y>je.y&&F.y>je.y)return!1;const Qe=N(K,F,ae[0]);return Qe!==N(K,F,ae[1])||Qe!==N(K,F,ae[2])||Qe!==N(K,F,ae[3])}function yn(K,F,ae){const we=F.paint.get(K).value;return we.kind==="constant"?we.value:ae.programConfigurations.get(F.id).getMaxValue(K)}function ra(K){return Math.sqrt(K[0]*K[0]+K[1]*K[1])}function wa(K,F,ae,we,je){if(!F[0]&&!F[1])return K;const Qe=s.convert(F)._mult(je);ae==="viewport"&&Qe._rotate(-we);const at=[];for(let Et=0;Et<K.length;Et++)at.push(K[Et].sub(Qe));return at}let Fa,Sa;si("CircleBucket",Xn,{omit:["layers"]});var zi={get paint(){return Sa=Sa||new Ze({"circle-radius":new _s(ue.paint_circle["circle-radius"]),"circle-color":new _s(ue.paint_circle["circle-color"]),"circle-blur":new _s(ue.paint_circle["circle-blur"]),"circle-opacity":new _s(ue.paint_circle["circle-opacity"]),"circle-translate":new os(ue.paint_circle["circle-translate"]),"circle-translate-anchor":new os(ue.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new os(ue.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new os(ue.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new _s(ue.paint_circle["circle-stroke-width"]),"circle-stroke-color":new _s(ue.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new _s(ue.paint_circle["circle-stroke-opacity"])})},get layout(){return Fa=Fa||new Ze({"circle-sort-key":new _s(ue.layout_circle["circle-sort-key"])})}},li=1e-6,eo=typeof Float32Array<"u"?Float32Array:Array;function Ea(K){return K[0]=1,K[1]=0,K[2]=0,K[3]=0,K[4]=0,K[5]=1,K[6]=0,K[7]=0,K[8]=0,K[9]=0,K[10]=1,K[11]=0,K[12]=0,K[13]=0,K[14]=0,K[15]=1,K}function pa(K,F,ae){var we=F[0],je=F[1],Qe=F[2],at=F[3],Et=F[4],Ut=F[5],ir=F[6],Er=F[7],Ir=F[8],nn=F[9],vn=F[10],Cn=F[11],jn=F[12],aa=F[13],Oa=F[14],Pi=F[15],oi=ae[0],Ti=ae[1],ao=ae[2],Lo=ae[3];return K[0]=oi*we+Ti*Et+ao*Ir+Lo*jn,K[1]=oi*je+Ti*Ut+ao*nn+Lo*aa,K[2]=oi*Qe+Ti*ir+ao*vn+Lo*Oa,K[3]=oi*at+Ti*Er+ao*Cn+Lo*Pi,K[4]=(oi=ae[4])*we+(Ti=ae[5])*Et+(ao=ae[6])*Ir+(Lo=ae[7])*jn,K[5]=oi*je+Ti*Ut+ao*nn+Lo*aa,K[6]=oi*Qe+Ti*ir+ao*vn+Lo*Oa,K[7]=oi*at+Ti*Er+ao*Cn+Lo*Pi,K[8]=(oi=ae[8])*we+(Ti=ae[9])*Et+(ao=ae[10])*Ir+(Lo=ae[11])*jn,K[9]=oi*je+Ti*Ut+ao*nn+Lo*aa,K[10]=oi*Qe+Ti*ir+ao*vn+Lo*Oa,K[11]=oi*at+Ti*Er+ao*Cn+Lo*Pi,K[12]=(oi=ae[12])*we+(Ti=ae[13])*Et+(ao=ae[14])*Ir+(Lo=ae[15])*jn,K[13]=oi*je+Ti*Ut+ao*nn+Lo*aa,K[14]=oi*Qe+Ti*ir+ao*vn+Lo*Oa,K[15]=oi*at+Ti*Er+ao*Cn+Lo*Pi,K}Math.hypot||(Math.hypot=function(){for(var K=0,F=arguments.length;F--;)K+=arguments[F]*arguments[F];return Math.sqrt(K)});var ki,Jn=pa;function _i(K,F,ae){var we=F[0],je=F[1],Qe=F[2],at=F[3];return K[0]=ae[0]*we+ae[4]*je+ae[8]*Qe+ae[12]*at,K[1]=ae[1]*we+ae[5]*je+ae[9]*Qe+ae[13]*at,K[2]=ae[2]*we+ae[6]*je+ae[10]*Qe+ae[14]*at,K[3]=ae[3]*we+ae[7]*je+ae[11]*Qe+ae[15]*at,K}ki=new eo(4),eo!=Float32Array&&(ki[0]=0,ki[1]=0,ki[2]=0,ki[3]=0);class ai extends fe{constructor(F){super(F,zi)}createBucket(F){return new Xn(F)}queryRadius(F){const ae=F;return yn("circle-radius",this,ae)+yn("circle-stroke-width",this,ae)+ra(this.paint.get("circle-translate"))}queryIntersectsFeature(F,ae,we,je,Qe,at,Et,Ut){const ir=wa(F,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),at.angle,Et),Er=this.paint.get("circle-radius").evaluate(ae,we)+this.paint.get("circle-stroke-width").evaluate(ae,we),Ir=this.paint.get("circle-pitch-alignment")==="map",nn=Ir?ir:(function(Cn,jn){return Cn.map(aa=>no(aa,jn))})(ir,Ut),vn=Ir?Er*Et:Er;for(const Cn of je)for(const jn of Cn){const aa=Ir?jn:no(jn,Ut);let Oa=vn;const Pi=_i([],[jn.x,jn.y,0,1],Ut);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?Oa*=Pi[3]/at.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(Oa*=at.cameraToCenterDistance/Pi[3]),Rn(nn,aa,Oa))return!0}return!1}}function no(K,F){const ae=_i([],[K.x,K.y,0,1],F);return new s(ae[0]/ae[3],ae[1]/ae[3])}class Xo extends Xn{}let Vi;si("HeatmapBucket",Xo,{omit:["layers"]});var lo={get paint(){return Vi=Vi||new Ze({"heatmap-radius":new _s(ue.paint_heatmap["heatmap-radius"]),"heatmap-weight":new _s(ue.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new os(ue.paint_heatmap["heatmap-intensity"]),"heatmap-color":new Yc(ue.paint_heatmap["heatmap-color"]),"heatmap-opacity":new os(ue.paint_heatmap["heatmap-opacity"])})}};function pi(K,{width:F,height:ae},we,je){if(je){if(je instanceof Uint8ClampedArray)je=new Uint8Array(je.buffer);else if(je.length!==F*ae*we)throw new RangeError(`mismatched image size. expected: ${je.length} but got: ${F*ae*we}`)}else je=new Uint8Array(F*ae*we);return K.width=F,K.height=ae,K.data=je,K}function Uo(K,{width:F,height:ae},we){if(F===K.width&&ae===K.height)return;const je=pi({},{width:F,height:ae},we);ns(K,je,{x:0,y:0},{x:0,y:0},{width:Math.min(K.width,F),height:Math.min(K.height,ae)},we),K.width=F,K.height=ae,K.data=je.data}function ns(K,F,ae,we,je,Qe){if(je.width===0||je.height===0)return F;if(je.width>K.width||je.height>K.height||ae.x>K.width-je.width||ae.y>K.height-je.height)throw new RangeError("out of range source coordinates for image copy");if(je.width>F.width||je.height>F.height||we.x>F.width-je.width||we.y>F.height-je.height)throw new RangeError("out of range destination coordinates for image copy");const at=K.data,Et=F.data;if(at===Et)throw new Error("srcData equals dstData, so image is already copied");for(let Ut=0;Ut<je.height;Ut++){const ir=((ae.y+Ut)*K.width+ae.x)*Qe,Er=((we.y+Ut)*F.width+we.x)*Qe;for(let Ir=0;Ir<je.width*Qe;Ir++)Et[Er+Ir]=at[ir+Ir]}return F}class ds{constructor(F,ae){pi(this,F,1,ae)}resize(F){Uo(this,F,1)}clone(){return new ds({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(F,ae,we,je,Qe){ns(F,ae,we,je,Qe,1)}}class wl{constructor(F,ae){pi(this,F,4,ae)}resize(F){Uo(this,F,4)}replace(F,ae){ae?this.data.set(F):this.data=F instanceof Uint8ClampedArray?new Uint8Array(F.buffer):F}clone(){return new wl({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(F,ae,we,je,Qe){ns(F,ae,we,je,Qe,4)}}function vs(K){const F={},ae=K.resolution||256,we=K.clips?K.clips.length:1,je=K.image||new wl({width:ae,height:we});if(Math.log(ae)/Math.LN2%1!=0)throw new Error(`width is not a power of 2 - ${ae}`);const Qe=(at,Et,Ut)=>{F[K.evaluationKey]=Ut;const ir=K.expression.evaluate(F);je.data[at+Et+0]=Math.floor(255*ir.r/ir.a),je.data[at+Et+1]=Math.floor(255*ir.g/ir.a),je.data[at+Et+2]=Math.floor(255*ir.b/ir.a),je.data[at+Et+3]=Math.floor(255*ir.a)};if(K.clips)for(let at=0,Et=0;at<we;++at,Et+=4*ae)for(let Ut=0,ir=0;Ut<ae;Ut++,ir+=4){const Er=Ut/(ae-1),{start:Ir,end:nn}=K.clips[at];Qe(Et,ir,Ir*(1-Er)+nn*Er)}else for(let at=0,Et=0;at<ae;at++,Et+=4)Qe(0,Et,at/(ae-1));return je}si("AlphaImage",ds),si("RGBAImage",wl);const zu="big-fb";class cl extends fe{createBucket(F){return new Xo(F)}constructor(F){super(F,lo),this.heatmapFbos=new Map,this._updateColorRamp()}_handleSpecialPaintPropertyUpdate(F){F==="heatmap-color"&&this._updateColorRamp()}_updateColorRamp(){this.colorRamp=vs({expression:this._transitionablePaint._values["heatmap-color"].value.expression,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null}resize(){this.heatmapFbos.has(zu)&&this.heatmapFbos.delete(zu)}queryRadius(){return 0}queryIntersectsFeature(){return!1}hasOffscreenPass(){return this.paint.get("heatmap-opacity")!==0&&this.visibility!=="none"}}let Mu;var Zu={get paint(){return Mu=Mu||new Ze({"hillshade-illumination-direction":new os(ue.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new os(ue.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new os(ue.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new os(ue.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new os(ue.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new os(ue.paint_hillshade["hillshade-accent-color"])})}};class uc extends fe{constructor(F){super(F,Zu)}hasOffscreenPass(){return this.paint.get("hillshade-exaggeration")!==0&&this.visibility!=="none"}}const kf=Ct([{name:"a_pos",components:2,type:"Int16"}],4),{members:hu}=kf;function wu(K,F,ae=2){const we=F&&F.length,je=we?F[0]*ae:K.length;let Qe=Ro(K,0,je,ae,!0);const at=[];if(!Qe||Qe.next===Qe.prev)return at;let Et,Ut,ir;if(we&&(Qe=(function(Er,Ir,nn,vn){const Cn=[];for(let jn=0,aa=Ir.length;jn<aa;jn++){const Oa=Ro(Er,Ir[jn]*vn,jn<aa-1?Ir[jn+1]*vn:Er.length,vn,!1);Oa===Oa.next&&(Oa.steiner=!0),Cn.push(ye(Oa))}Cn.sort(Ms);for(let jn=0;jn<Cn.length;jn++)nn=Rs(Cn[jn],nn);return nn})(K,F,Qe,ae)),K.length>80*ae){Et=1/0,Ut=1/0;let Er=-1/0,Ir=-1/0;for(let nn=ae;nn<je;nn+=ae){const vn=K[nn],Cn=K[nn+1];vn<Et&&(Et=vn),Cn<Ut&&(Ut=Cn),vn>Er&&(Er=vn),Cn>Ir&&(Ir=Cn)}ir=Math.max(Er-Et,Ir-Ut),ir=ir!==0?32767/ir:0}return Js(Qe,at,ae,Et,Ut,ir,0),at}function Ro(K,F,ae,we,je){let Qe;if(je===(function(at,Et,Ut,ir){let Er=0;for(let Ir=Et,nn=Ut-ir;Ir<Ut;Ir+=ir)Er+=(at[nn]-at[Ir])*(at[Ir+1]+at[nn+1]),nn=Ir;return Er})(K,F,ae,we)>0)for(let at=F;at<ae;at+=we)Qe=er(at/we|0,K[at],K[at+1],Qe);else for(let at=ae-we;at>=F;at-=we)Qe=er(at/we|0,K[at],K[at+1],Qe);return Qe&&xt(Qe,Qe.next)&&(ur(Qe),Qe=Qe.next),Qe}function cc(K,F){if(!K)return K;F||(F=K);let ae,we=K;do if(ae=!1,we.steiner||!xt(we,we.next)&&Je(we.prev,we,we.next)!==0)we=we.next;else{if(ur(we),we=F=we.prev,we===we.next)break;ae=!0}while(ae||we!==F);return F}function Js(K,F,ae,we,je,Qe,at){if(!K)return;!at&&Qe&&(function(Ut,ir,Er,Ir){let nn=Ut;do nn.z===0&&(nn.z=X(nn.x,nn.y,ir,Er,Ir)),nn.prevZ=nn.prev,nn.nextZ=nn.next,nn=nn.next;while(nn!==Ut);nn.prevZ.nextZ=null,nn.prevZ=null,(function(vn){let Cn,jn=1;do{let aa,Oa=vn;vn=null;let Pi=null;for(Cn=0;Oa;){Cn++;let oi=Oa,Ti=0;for(let Lo=0;Lo<jn&&(Ti++,oi=oi.nextZ,oi);Lo++);let ao=jn;for(;Ti>0||ao>0&&oi;)Ti!==0&&(ao===0||!oi||Oa.z<=oi.z)?(aa=Oa,Oa=Oa.nextZ,Ti--):(aa=oi,oi=oi.nextZ,ao--),Pi?Pi.nextZ=aa:vn=aa,aa.prevZ=Pi,Pi=aa;Oa=oi}Pi.nextZ=null,jn*=2}while(Cn>1)})(nn)})(K,we,je,Qe);let Et=K;for(;K.prev!==K.next;){const Ut=K.prev,ir=K.next;if(Qe?bc(K,we,je,Qe):Zl(K))F.push(Ut.i,K.i,ir.i),ur(K),K=ir.next,Et=ir.next;else if((K=ir)===Et){at?at===1?Js(K=wc(cc(K),F),F,ae,we,je,Qe,2):at===2&&Go(K,F,ae,we,je,Qe):Js(cc(K),F,ae,we,je,Qe,1);break}}}function Zl(K){const F=K.prev,ae=K,we=K.next;if(Je(F,ae,we)>=0)return!1;const je=F.x,Qe=ae.x,at=we.x,Et=F.y,Ut=ae.y,ir=we.y,Er=je<Qe?je<at?je:at:Qe<at?Qe:at,Ir=Et<Ut?Et<ir?Et:ir:Ut<ir?Ut:ir,nn=je>Qe?je>at?je:at:Qe>at?Qe:at,vn=Et>Ut?Et>ir?Et:ir:Ut>ir?Ut:ir;let Cn=we.next;for(;Cn!==F;){if(Cn.x>=Er&&Cn.x<=nn&&Cn.y>=Ir&&Cn.y<=vn&&ne(je,Et,Qe,Ut,at,ir,Cn.x,Cn.y)&&Je(Cn.prev,Cn,Cn.next)>=0)return!1;Cn=Cn.next}return!0}function bc(K,F,ae,we){const je=K.prev,Qe=K,at=K.next;if(Je(je,Qe,at)>=0)return!1;const Et=je.x,Ut=Qe.x,ir=at.x,Er=je.y,Ir=Qe.y,nn=at.y,vn=Et<Ut?Et<ir?Et:ir:Ut<ir?Ut:ir,Cn=Er<Ir?Er<nn?Er:nn:Ir<nn?Ir:nn,jn=Et>Ut?Et>ir?Et:ir:Ut>ir?Ut:ir,aa=Er>Ir?Er>nn?Er:nn:Ir>nn?Ir:nn,Oa=X(vn,Cn,F,ae,we),Pi=X(jn,aa,F,ae,we);let oi=K.prevZ,Ti=K.nextZ;for(;oi&&oi.z>=Oa&&Ti&&Ti.z<=Pi;){if(oi.x>=vn&&oi.x<=jn&&oi.y>=Cn&&oi.y<=aa&&oi!==je&&oi!==at&&ne(Et,Er,Ut,Ir,ir,nn,oi.x,oi.y)&&Je(oi.prev,oi,oi.next)>=0||(oi=oi.prevZ,Ti.x>=vn&&Ti.x<=jn&&Ti.y>=Cn&&Ti.y<=aa&&Ti!==je&&Ti!==at&&ne(Et,Er,Ut,Ir,ir,nn,Ti.x,Ti.y)&&Je(Ti.prev,Ti,Ti.next)>=0))return!1;Ti=Ti.nextZ}for(;oi&&oi.z>=Oa;){if(oi.x>=vn&&oi.x<=jn&&oi.y>=Cn&&oi.y<=aa&&oi!==je&&oi!==at&&ne(Et,Er,Ut,Ir,ir,nn,oi.x,oi.y)&&Je(oi.prev,oi,oi.next)>=0)return!1;oi=oi.prevZ}for(;Ti&&Ti.z<=Pi;){if(Ti.x>=vn&&Ti.x<=jn&&Ti.y>=Cn&&Ti.y<=aa&&Ti!==je&&Ti!==at&&ne(Et,Er,Ut,Ir,ir,nn,Ti.x,Ti.y)&&Je(Ti.prev,Ti,Ti.next)>=0)return!1;Ti=Ti.nextZ}return!0}function wc(K,F){let ae=K;do{const we=ae.prev,je=ae.next.next;!xt(we,je)&&At(we,ae,ae.next,je)&&Rt(we,je)&&Rt(je,we)&&(F.push(we.i,ae.i,je.i),ur(ae),ur(ae.next),ae=K=je),ae=ae.next}while(ae!==K);return cc(ae)}function Go(K,F,ae,we,je,Qe){let at=K;do{let Et=at.next.next;for(;Et!==at.prev;){if(at.i!==Et.i&&Se(at,Et)){let Ut=or(at,Et);return at=cc(at,at.next),Ut=cc(Ut,Ut.next),Js(at,F,ae,we,je,Qe,0),void Js(Ut,F,ae,we,je,Qe,0)}Et=Et.next}at=at.next}while(at!==K)}function Ms(K,F){return K.x-F.x}function Rs(K,F){const ae=(function(je,Qe){let at=Qe;const Et=je.x,Ut=je.y;let ir,Er=-1/0;do{if(Ut<=at.y&&Ut>=at.next.y&&at.next.y!==at.y){const jn=at.x+(Ut-at.y)*(at.next.x-at.x)/(at.next.y-at.y);if(jn<=Et&&jn>Er&&(Er=jn,ir=at.x<at.next.x?at:at.next,jn===Et))return ir}at=at.next}while(at!==Qe);if(!ir)return null;const Ir=ir,nn=ir.x,vn=ir.y;let Cn=1/0;at=ir;do{if(Et>=at.x&&at.x>=nn&&Et!==at.x&&ne(Ut<vn?Et:Er,Ut,nn,vn,Ut<vn?Er:Et,Ut,at.x,at.y)){const jn=Math.abs(Ut-at.y)/(Et-at.x);Rt(at,je)&&(jn<Cn||jn===Cn&&(at.x>ir.x||at.x===ir.x&&Me(ir,at)))&&(ir=at,Cn=jn)}at=at.next}while(at!==Ir);return ir})(K,F);if(!ae)return F;const we=or(ae,K);return cc(we,we.next),cc(ae,ae.next)}function Me(K,F){return Je(K.prev,K,F.prev)<0&&Je(F.next,K,K.next)<0}function X(K,F,ae,we,je){return(K=1431655765&((K=858993459&((K=252645135&((K=16711935&((K=(K-ae)*je|0)|K<<8))|K<<4))|K<<2))|K<<1))|(F=1431655765&((F=858993459&((F=252645135&((F=16711935&((F=(F-we)*je|0)|F<<8))|F<<4))|F<<2))|F<<1))<<1}function ye(K){let F=K,ae=K;do(F.x<ae.x||F.x===ae.x&&F.y<ae.y)&&(ae=F),F=F.next;while(F!==K);return ae}function ne(K,F,ae,we,je,Qe,at,Et){return(je-at)*(F-Et)>=(K-at)*(Qe-Et)&&(K-at)*(we-Et)>=(ae-at)*(F-Et)&&(ae-at)*(Qe-Et)>=(je-at)*(we-Et)}function Se(K,F){return K.next.i!==F.i&&K.prev.i!==F.i&&!(function(ae,we){let je=ae;do{if(je.i!==ae.i&&je.next.i!==ae.i&&je.i!==we.i&&je.next.i!==we.i&&At(je,je.next,ae,we))return!0;je=je.next}while(je!==ae);return!1})(K,F)&&(Rt(K,F)&&Rt(F,K)&&(function(ae,we){let je=ae,Qe=!1;const at=(ae.x+we.x)/2,Et=(ae.y+we.y)/2;do je.y>Et!=je.next.y>Et&&je.next.y!==je.y&&at<(je.next.x-je.x)*(Et-je.y)/(je.next.y-je.y)+je.x&&(Qe=!Qe),je=je.next;while(je!==ae);return Qe})(K,F)&&(Je(K.prev,K,F.prev)||Je(K,F.prev,F))||xt(K,F)&&Je(K.prev,K,K.next)>0&&Je(F.prev,F,F.next)>0)}function Je(K,F,ae){return(F.y-K.y)*(ae.x-F.x)-(F.x-K.x)*(ae.y-F.y)}function xt(K,F){return K.x===F.x&&K.y===F.y}function At(K,F,ae,we){const je=pt(Je(K,F,ae)),Qe=pt(Je(K,F,we)),at=pt(Je(ae,we,K)),Et=pt(Je(ae,we,F));return je!==Qe&&at!==Et||!(je!==0||!it(K,ae,F))||!(Qe!==0||!it(K,we,F))||!(at!==0||!it(ae,K,we))||!(Et!==0||!it(ae,F,we))}function it(K,F,ae){return F.x<=Math.max(K.x,ae.x)&&F.x>=Math.min(K.x,ae.x)&&F.y<=Math.max(K.y,ae.y)&&F.y>=Math.min(K.y,ae.y)}function pt(K){return K>0?1:K<0?-1:0}function Rt(K,F){return Je(K.prev,K,K.next)<0?Je(K,F,K.next)>=0&&Je(K,K.prev,F)>=0:Je(K,F,K.prev)<0||Je(K,K.next,F)<0}function or(K,F){const ae=gr(K.i,K.x,K.y),we=gr(F.i,F.x,F.y),je=K.next,Qe=F.prev;return K.next=F,F.prev=K,ae.next=je,je.prev=ae,we.next=ae,ae.prev=we,Qe.next=we,we.prev=Qe,we}function er(K,F,ae,we){const je=gr(K,F,ae);return we?(je.next=we.next,je.prev=we,we.next.prev=je,we.next=je):(je.prev=je,je.next=je),je}function ur(K){K.next.prev=K.prev,K.prev.next=K.next,K.prevZ&&(K.prevZ.nextZ=K.nextZ),K.nextZ&&(K.nextZ.prevZ=K.prevZ)}function gr(K,F,ae){return{i:K,x:F,y:ae,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function vr(K,F,ae){const we=ae.patternDependencies;let je=!1;for(const Qe of F){const at=Qe.paint.get(`${K}-pattern`);at.isConstant()||(je=!0);const Et=at.constantOr(null);Et&&(je=!0,we[Et.to]=!0,we[Et.from]=!0)}return je}function Zt(K,F,ae,we,je){const Qe=je.patternDependencies;for(const at of F){const Et=at.paint.get(`${K}-pattern`).value;if(Et.kind!=="constant"){let Ut=Et.evaluate({zoom:we-1},ae,{},je.availableImages),ir=Et.evaluate({zoom:we},ae,{},je.availableImages),Er=Et.evaluate({zoom:we+1},ae,{},je.availableImages);Ut=Ut&&Ut.name?Ut.name:Ut,ir=ir&&ir.name?ir.name:ir,Er=Er&&Er.name?Er.name:Er,Qe[Ut]=!0,Qe[ir]=!0,Qe[Er]=!0,ae.patterns[at.id]={min:Ut,mid:ir,max:Er}}}return ae}class ar{constructor(F){this.zoom=F.zoom,this.overscaling=F.overscaling,this.layers=F.layers,this.layerIds=this.layers.map(ae=>ae.id),this.index=F.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Hu,this.indexArray=new hr,this.indexArray2=new Pr,this.programConfigurations=new Yl(F.layers,F.zoom),this.segments=new Mn,this.segments2=new Mn,this.stateDependentLayerIds=this.layers.filter(ae=>ae.isStateDependent()).map(ae=>ae.id)}populate(F,ae,we){this.hasPattern=vr("fill",this.layers,ae);const je=this.layers[0].layout.get("fill-sort-key"),Qe=!je.isConstant(),at=[];for(const{feature:Et,id:Ut,index:ir,sourceLayerIndex:Er}of F){const Ir=this.layers[0]._featureFilter.needGeometry,nn=kr(Et,Ir);if(!this.layers[0]._featureFilter.filter(new Cl(this.zoom),nn,we))continue;const vn=Qe?je.evaluate(nn,{},we,ae.availableImages):void 0,Cn={id:Ut,properties:Et.properties,type:Et.type,sourceLayerIndex:Er,index:ir,geometry:Ir?nn.geometry:St(Et),patterns:{},sortKey:vn};at.push(Cn)}Qe&&at.sort((Et,Ut)=>Et.sortKey-Ut.sortKey);for(const Et of at){const{geometry:Ut,index:ir,sourceLayerIndex:Er}=Et;if(this.hasPattern){const Ir=Zt("fill",this.layers,Et,this.zoom,ae);this.patternFeatures.push(Ir)}else this.addFeature(Et,Ut,ir,we,{});ae.featureIndex.insert(F[ir].feature,Ut,ir,Er,this.index)}}update(F,ae,we){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(F,ae,this.stateDependentLayers,we)}addFeatures(F,ae,we){for(const je of this.patternFeatures)this.addFeature(je,je.geometry,je.index,ae,we)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(F){this.uploaded||(this.layoutVertexBuffer=F.createVertexBuffer(this.layoutVertexArray,hu),this.indexBuffer=F.createIndexBuffer(this.indexArray),this.indexBuffer2=F.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(F),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}addFeature(F,ae,we,je,Qe){for(const at of rf(ae,500)){let Et=0;for(const vn of at)Et+=vn.length;const Ut=this.segments.prepareSegment(Et,this.layoutVertexArray,this.indexArray),ir=Ut.vertexLength,Er=[],Ir=[];for(const vn of at){if(vn.length===0)continue;vn!==at[0]&&Ir.push(Er.length/2);const Cn=this.segments2.prepareSegment(vn.length,this.layoutVertexArray,this.indexArray2),jn=Cn.vertexLength;this.layoutVertexArray.emplaceBack(vn[0].x,vn[0].y),this.indexArray2.emplaceBack(jn+vn.length-1,jn),Er.push(vn[0].x),Er.push(vn[0].y);for(let aa=1;aa<vn.length;aa++)this.layoutVertexArray.emplaceBack(vn[aa].x,vn[aa].y),this.indexArray2.emplaceBack(jn+aa-1,jn+aa),Er.push(vn[aa].x),Er.push(vn[aa].y);Cn.vertexLength+=vn.length,Cn.primitiveLength+=vn.length}const nn=wu(Er,Ir);for(let vn=0;vn<nn.length;vn+=3)this.indexArray.emplaceBack(ir+nn[vn],ir+nn[vn+1],ir+nn[vn+2]);Ut.vertexLength+=Et,Ut.primitiveLength+=nn.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,F,we,Qe,je)}}let tr,Zr;si("FillBucket",ar,{omit:["layers","patternFeatures"]});var un={get paint(){return Zr=Zr||new Ze({"fill-antialias":new os(ue.paint_fill["fill-antialias"]),"fill-opacity":new _s(ue.paint_fill["fill-opacity"]),"fill-color":new _s(ue.paint_fill["fill-color"]),"fill-outline-color":new _s(ue.paint_fill["fill-outline-color"]),"fill-translate":new os(ue.paint_fill["fill-translate"]),"fill-translate-anchor":new os(ue.paint_fill["fill-translate-anchor"]),"fill-pattern":new qf(ue.paint_fill["fill-pattern"])})},get layout(){return tr=tr||new Ze({"fill-sort-key":new _s(ue.layout_fill["fill-sort-key"])})}};class En extends fe{constructor(F){super(F,un)}recalculate(F,ae){super.recalculate(F,ae);const we=this.paint._values["fill-outline-color"];we.value.kind==="constant"&&we.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(F){return new ar(F)}queryRadius(){return ra(this.paint.get("fill-translate"))}queryIntersectsFeature(F,ae,we,je,Qe,at,Et){return Pn(wa(F,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),at.angle,Et),je)}isTileClipped(){return!0}}const ka=Ct([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),ma=Ct([{name:"a_centroid",components:2,type:"Int16"}],4),{members:ha}=ka;var Pa={},Da=l,Qa=Ra;function Ra(K,F,ae,we,je){this.properties={},this.extent=ae,this.type=0,this._pbf=K,this._geometry=-1,this._keys=we,this._values=je,K.readFields(ii,this,F)}function ii(K,F,ae){K==1?F.id=ae.readVarint():K==2?(function(we,je){for(var Qe=we.readVarint()+we.pos;we.pos<Qe;){var at=je._keys[we.readVarint()],Et=je._values[we.readVarint()];je.properties[at]=Et}})(ae,F):K==3?F.type=ae.readVarint():K==4&&(F._geometry=ae.pos)}function xi(K){for(var F,ae,we=0,je=0,Qe=K.length,at=Qe-1;je<Qe;at=je++)we+=((ae=K[at]).x-(F=K[je]).x)*(F.y+ae.y);return we}Ra.types=["Unknown","Point","LineString","Polygon"],Ra.prototype.loadGeometry=function(){var K=this._pbf;K.pos=this._geometry;for(var F,ae=K.readVarint()+K.pos,we=1,je=0,Qe=0,at=0,Et=[];K.pos<ae;){if(je<=0){var Ut=K.readVarint();we=7&Ut,je=Ut>>3}if(je--,we===1||we===2)Qe+=K.readSVarint(),at+=K.readSVarint(),we===1&&(F&&Et.push(F),F=[]),F.push(new Da(Qe,at));else{if(we!==7)throw new Error("unknown command "+we);F&&F.push(F[0].clone())}}return F&&Et.push(F),Et},Ra.prototype.bbox=function(){var K=this._pbf;K.pos=this._geometry;for(var F=K.readVarint()+K.pos,ae=1,we=0,je=0,Qe=0,at=1/0,Et=-1/0,Ut=1/0,ir=-1/0;K.pos<F;){if(we<=0){var Er=K.readVarint();ae=7&Er,we=Er>>3}if(we--,ae===1||ae===2)(je+=K.readSVarint())<at&&(at=je),je>Et&&(Et=je),(Qe+=K.readSVarint())<Ut&&(Ut=Qe),Qe>ir&&(ir=Qe);else if(ae!==7)throw new Error("unknown command "+ae)}return[at,Ut,Et,ir]},Ra.prototype.toGeoJSON=function(K,F,ae){var we,je,Qe=this.extent*Math.pow(2,ae),at=this.extent*K,Et=this.extent*F,Ut=this.loadGeometry(),ir=Ra.types[this.type];function Er(vn){for(var Cn=0;Cn<vn.length;Cn++){var jn=vn[Cn];vn[Cn]=[360*(jn.x+at)/Qe-180,360/Math.PI*Math.atan(Math.exp((180-360*(jn.y+Et)/Qe)*Math.PI/180))-90]}}switch(this.type){case 1:var Ir=[];for(we=0;we<Ut.length;we++)Ir[we]=Ut[we][0];Er(Ut=Ir);break;case 2:for(we=0;we<Ut.length;we++)Er(Ut[we]);break;case 3:for(Ut=(function(vn){var Cn=vn.length;if(Cn<=1)return[vn];for(var jn,aa,Oa=[],Pi=0;Pi<Cn;Pi++){var oi=xi(vn[Pi]);oi!==0&&(aa===void 0&&(aa=oi<0),aa===oi<0?(jn&&Oa.push(jn),jn=[vn[Pi]]):jn.push(vn[Pi]))}return jn&&Oa.push(jn),Oa})(Ut),we=0;we<Ut.length;we++)for(je=0;je<Ut[we].length;je++)Er(Ut[we][je])}Ut.length===1?Ut=Ut[0]:ir="Multi"+ir;var nn={type:"Feature",geometry:{type:ir,coordinates:Ut},properties:this.properties};return"id"in this&&(nn.id=this.id),nn};var Xi=Qa,co=Is;function Is(K,F){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=K,this._keys=[],this._values=[],this._features=[],K.readFields(Cs,this,F),this.length=this._features.length}function Cs(K,F,ae){K===15?F.version=ae.readVarint():K===1?F.name=ae.readString():K===5?F.extent=ae.readVarint():K===2?F._features.push(ae.pos):K===3?F._keys.push(ae.readString()):K===4&&F._values.push((function(we){for(var je=null,Qe=we.readVarint()+we.pos;we.pos<Qe;){var at=we.readVarint()>>3;je=at===1?we.readString():at===2?we.readFloat():at===3?we.readDouble():at===4?we.readVarint64():at===5?we.readVarint():at===6?we.readSVarint():at===7?we.readBoolean():null}return je})(ae))}Is.prototype.feature=function(K){if(K<0||K>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[K];var F=this._pbf.readVarint()+this._pbf.pos;return new Xi(this._pbf,F,this.extent,this._keys,this._values)};var kl=co;function Tl(K,F,ae){if(K===3){var we=new kl(ae,ae.readVarint()+ae.pos);we.length&&(F[we.name]=we)}}Pa.VectorTile=function(K,F){this.layers=K.readFields(Tl,{},F)},Pa.VectorTileFeature=Qa,Pa.VectorTileLayer=co;const Rl=Pa.VectorTileFeature.types,Pl=Math.pow(2,13);function fc(K,F,ae,we,je,Qe,at,Et){K.emplaceBack(F,ae,2*Math.floor(we*Pl)+at,je*Pl*2,Qe*Pl*2,Math.round(Et))}class yl{constructor(F){this.zoom=F.zoom,this.overscaling=F.overscaling,this.layers=F.layers,this.layerIds=this.layers.map(ae=>ae.id),this.index=F.index,this.hasPattern=!1,this.layoutVertexArray=new yc,this.centroidVertexArray=new Us,this.indexArray=new hr,this.programConfigurations=new Yl(F.layers,F.zoom),this.segments=new Mn,this.stateDependentLayerIds=this.layers.filter(ae=>ae.isStateDependent()).map(ae=>ae.id)}populate(F,ae,we){this.features=[],this.hasPattern=vr("fill-extrusion",this.layers,ae);for(const{feature:je,id:Qe,index:at,sourceLayerIndex:Et}of F){const Ut=this.layers[0]._featureFilter.needGeometry,ir=kr(je,Ut);if(!this.layers[0]._featureFilter.filter(new Cl(this.zoom),ir,we))continue;const Er={id:Qe,sourceLayerIndex:Et,index:at,geometry:Ut?ir.geometry:St(je),properties:je.properties,type:je.type,patterns:{}};this.hasPattern?this.features.push(Zt("fill-extrusion",this.layers,Er,this.zoom,ae)):this.addFeature(Er,Er.geometry,at,we,{}),ae.featureIndex.insert(je,Er.geometry,at,Et,this.index,!0)}}addFeatures(F,ae,we){for(const je of this.features){const{geometry:Qe}=je;this.addFeature(je,Qe,je.index,ae,we)}}update(F,ae,we){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(F,ae,this.stateDependentLayers,we)}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(F){this.uploaded||(this.layoutVertexBuffer=F.createVertexBuffer(this.layoutVertexArray,ha),this.centroidVertexBuffer=F.createVertexBuffer(this.centroidVertexArray,ma.members,!0),this.indexBuffer=F.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(F),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(F,ae,we,je,Qe){for(const at of rf(ae,500)){const Et={x:0,y:0,vertexCount:0};let Ut=0;for(const Cn of at)Ut+=Cn.length;let ir=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(const Cn of at){if(Cn.length===0||ch(Cn))continue;let jn=0;for(let aa=0;aa<Cn.length;aa++){const Oa=Cn[aa];if(aa>=1){const Pi=Cn[aa-1];if(!Lu(Oa,Pi)){ir.vertexLength+4>Mn.MAX_VERTEX_ARRAY_LENGTH&&(ir=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));const oi=Oa.sub(Pi)._perp()._unit(),Ti=Pi.dist(Oa);jn+Ti>32768&&(jn=0),fc(this.layoutVertexArray,Oa.x,Oa.y,oi.x,oi.y,0,0,jn),fc(this.layoutVertexArray,Oa.x,Oa.y,oi.x,oi.y,0,1,jn),Et.x+=2*Oa.x,Et.y+=2*Oa.y,Et.vertexCount+=2,jn+=Ti,fc(this.layoutVertexArray,Pi.x,Pi.y,oi.x,oi.y,0,0,jn),fc(this.layoutVertexArray,Pi.x,Pi.y,oi.x,oi.y,0,1,jn),Et.x+=2*Pi.x,Et.y+=2*Pi.y,Et.vertexCount+=2;const ao=ir.vertexLength;this.indexArray.emplaceBack(ao,ao+2,ao+1),this.indexArray.emplaceBack(ao+1,ao+2,ao+3),ir.vertexLength+=4,ir.primitiveLength+=2}}}}if(ir.vertexLength+Ut>Mn.MAX_VERTEX_ARRAY_LENGTH&&(ir=this.segments.prepareSegment(Ut,this.layoutVertexArray,this.indexArray)),Rl[F.type]!=="Polygon")continue;const Er=[],Ir=[],nn=ir.vertexLength;for(const Cn of at)if(Cn.length!==0){Cn!==at[0]&&Ir.push(Er.length/2);for(let jn=0;jn<Cn.length;jn++){const aa=Cn[jn];fc(this.layoutVertexArray,aa.x,aa.y,0,0,1,1,0),Et.x+=aa.x,Et.y+=aa.y,Et.vertexCount+=1,Er.push(aa.x),Er.push(aa.y)}}const vn=wu(Er,Ir);for(let Cn=0;Cn<vn.length;Cn+=3)this.indexArray.emplaceBack(nn+vn[Cn],nn+vn[Cn+2],nn+vn[Cn+1]);ir.primitiveLength+=vn.length/3,ir.vertexLength+=Ut;for(let Cn=0;Cn<Et.vertexCount;Cn++){const jn=Math.floor(Et.x/Et.vertexCount),aa=Math.floor(Et.y/Et.vertexCount);this.centroidVertexArray.emplaceBack(jn,aa)}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,F,we,Qe,je)}}function Lu(K,F){return K.x===F.x&&(K.x<0||K.x>su)||K.y===F.y&&(K.y<0||K.y>su)}function ch(K){return K.every(F=>F.x<0)||K.every(F=>F.x>su)||K.every(F=>F.y<0)||K.every(F=>F.y>su)}let Uh;si("FillExtrusionBucket",yl,{omit:["layers","features"]});var Ep={get paint(){return Uh=Uh||new Ze({"fill-extrusion-opacity":new os(ue["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new _s(ue["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new os(ue["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new os(ue["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new qf(ue["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new _s(ue["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new _s(ue["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new os(ue["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class Mp extends fe{constructor(F){super(F,Ep)}createBucket(F){return new yl(F)}queryRadius(){return ra(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature(F,ae,we,je,Qe,at,Et,Ut){const ir=wa(F,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),at.angle,Et),Er=this.paint.get("fill-extrusion-height").evaluate(ae,we),Ir=this.paint.get("fill-extrusion-base").evaluate(ae,we),nn=(function(Cn,jn,aa,Oa){const Pi=[];for(const oi of Cn){const Ti=[oi.x,oi.y,0,1];_i(Ti,Ti,jn),Pi.push(new s(Ti[0]/Ti[3],Ti[1]/Ti[3]))}return Pi})(ir,Ut),vn=(function(Cn,jn,aa,Oa){const Pi=[],oi=[],Ti=Oa[8]*jn,ao=Oa[9]*jn,Lo=Oa[10]*jn,cs=Oa[11]*jn,Al=Oa[8]*aa,xs=Oa[9]*aa,ss=Oa[10]*aa,Xs=Oa[11]*aa;for(const Ns of Cn){const Ds=[],xo=[];for(const tl of Ns){const Ws=tl.x,Vl=tl.y,yf=Oa[0]*Ws+Oa[4]*Vl+Oa[12],uf=Oa[1]*Ws+Oa[5]*Vl+Oa[13],Rd=Oa[2]*Ws+Oa[6]*Vl+Oa[14],ip=Oa[3]*Ws+Oa[7]*Vl+Oa[15],qh=Rd+Lo,md=ip+cs,Wv=yf+Al,Yv=uf+xs,Zv=Rd+ss,fh=ip+Xs,Id=new s((yf+Ti)/md,(uf+ao)/md);Id.z=qh/md,Ds.push(Id);const Pv=new s(Wv/fh,Yv/fh);Pv.z=Zv/fh,xo.push(Pv)}Pi.push(Ds),oi.push(xo)}return[Pi,oi]})(je,Ir,Er,Ut);return(function(Cn,jn,aa){let Oa=1/0;Pn(aa,jn)&&(Oa=Qp(aa,jn[0]));for(let Pi=0;Pi<jn.length;Pi++){const oi=jn[Pi],Ti=Cn[Pi];for(let ao=0;ao<oi.length-1;ao++){const Lo=oi[ao],cs=[Lo,oi[ao+1],Ti[ao+1],Ti[ao],Lo];La(aa,cs)&&(Oa=Math.min(Oa,Qp(aa,cs)))}}return Oa!==1/0&&Oa})(vn[0],vn[1],nn)}}function Ev(K,F){return K.x*F.x+K.y*F.y}function Qp(K,F){if(K.length===1){let ae=0;const we=F[ae++];let je;for(;!je||we.equals(je);)if(je=F[ae++],!je)return 1/0;for(;ae<F.length;ae++){const Qe=F[ae],at=K[0],Et=je.sub(we),Ut=Qe.sub(we),ir=at.sub(we),Er=Ev(Et,Et),Ir=Ev(Et,Ut),nn=Ev(Ut,Ut),vn=Ev(ir,Et),Cn=Ev(ir,Ut),jn=Er*nn-Ir*Ir,aa=(nn*vn-Ir*Cn)/jn,Oa=(Er*Cn-Ir*vn)/jn,Pi=we.z*(1-aa-Oa)+je.z*aa+Qe.z*Oa;if(isFinite(Pi))return Pi}return 1/0}{let ae=1/0;for(const we of F)ae=Math.min(ae,we.z);return ae}}const ng=Ct([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),{members:dm}=ng,Mv=Ct([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]),{members:vm}=Mv,Xv=Pa.VectorTileFeature.types,Cv=Math.cos(Math.PI/180*37.5),Cp=Math.pow(2,14)/.5;class em{constructor(F){this.zoom=F.zoom,this.overscaling=F.overscaling,this.layers=F.layers,this.layerIds=this.layers.map(ae=>ae.id),this.index=F.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(ae=>{this.gradients[ae.id]={}}),this.layoutVertexArray=new Zc,this.layoutVertexArray2=new Te,this.indexArray=new hr,this.programConfigurations=new Yl(F.layers,F.zoom),this.segments=new Mn,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(ae=>ae.isStateDependent()).map(ae=>ae.id)}populate(F,ae,we){this.hasPattern=vr("line",this.layers,ae);const je=this.layers[0].layout.get("line-sort-key"),Qe=!je.isConstant(),at=[];for(const{feature:Et,id:Ut,index:ir,sourceLayerIndex:Er}of F){const Ir=this.layers[0]._featureFilter.needGeometry,nn=kr(Et,Ir);if(!this.layers[0]._featureFilter.filter(new Cl(this.zoom),nn,we))continue;const vn=Qe?je.evaluate(nn,{},we):void 0,Cn={id:Ut,properties:Et.properties,type:Et.type,sourceLayerIndex:Er,index:ir,geometry:Ir?nn.geometry:St(Et),patterns:{},sortKey:vn};at.push(Cn)}Qe&&at.sort((Et,Ut)=>Et.sortKey-Ut.sortKey);for(const Et of at){const{geometry:Ut,index:ir,sourceLayerIndex:Er}=Et;if(this.hasPattern){const Ir=Zt("line",this.layers,Et,this.zoom,ae);this.patternFeatures.push(Ir)}else this.addFeature(Et,Ut,ir,we,{});ae.featureIndex.insert(F[ir].feature,Ut,ir,Er,this.index)}}update(F,ae,we){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(F,ae,this.stateDependentLayers,we)}addFeatures(F,ae,we){for(const je of this.patternFeatures)this.addFeature(je,je.geometry,je.index,ae,we)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(F){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=F.createVertexBuffer(this.layoutVertexArray2,vm)),this.layoutVertexBuffer=F.createVertexBuffer(this.layoutVertexArray,dm),this.indexBuffer=F.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(F),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(F){if(F.properties&&Object.prototype.hasOwnProperty.call(F.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(F.properties,"mapbox_clip_end"))return{start:+F.properties.mapbox_clip_start,end:+F.properties.mapbox_clip_end}}addFeature(F,ae,we,je,Qe){const at=this.layers[0].layout,Et=at.get("line-join").evaluate(F,{}),Ut=at.get("line-cap"),ir=at.get("line-miter-limit"),Er=at.get("line-round-limit");this.lineClips=this.lineFeatureClips(F);for(const Ir of ae)this.addLine(Ir,F,Et,Ut,ir,Er);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,F,we,Qe,je)}addLine(F,ae,we,je,Qe,at){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let Oa=0;Oa<F.length-1;Oa++)this.totalDistance+=F[Oa].dist(F[Oa+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}const Et=Xv[ae.type]==="Polygon";let Ut=F.length;for(;Ut>=2&&F[Ut-1].equals(F[Ut-2]);)Ut--;let ir=0;for(;ir<Ut-1&&F[ir].equals(F[ir+1]);)ir++;if(Ut<(Et?3:2))return;we==="bevel"&&(Qe=1.05);const Er=this.overscaling<=16?15*su/(512*this.overscaling):0,Ir=this.segments.prepareSegment(10*Ut,this.layoutVertexArray,this.indexArray);let nn,vn,Cn,jn,aa;this.e1=this.e2=-1,Et&&(nn=F[Ut-2],aa=F[ir].sub(nn)._unit()._perp());for(let Oa=ir;Oa<Ut;Oa++){if(Cn=Oa===Ut-1?Et?F[ir+1]:void 0:F[Oa+1],Cn&&F[Oa].equals(Cn))continue;aa&&(jn=aa),nn&&(vn=nn),nn=F[Oa],aa=Cn?Cn.sub(nn)._unit()._perp():jn,jn=jn||aa;let Pi=jn.add(aa);Pi.x===0&&Pi.y===0||Pi._unit();const oi=jn.x*aa.x+jn.y*aa.y,Ti=Pi.x*aa.x+Pi.y*aa.y,ao=Ti!==0?1/Ti:1/0,Lo=2*Math.sqrt(2-2*Ti),cs=Ti<Cv&&vn&&Cn,Al=jn.x*aa.y-jn.y*aa.x>0;if(cs&&Oa>ir){const Xs=nn.dist(vn);if(Xs>2*Er){const Ns=nn.sub(nn.sub(vn)._mult(Er/Xs)._round());this.updateDistance(vn,Ns),this.addCurrentVertex(Ns,jn,0,0,Ir),vn=Ns}}const xs=vn&&Cn;let ss=xs?we:Et?"butt":je;if(xs&&ss==="round"&&(ao<at?ss="miter":ao<=2&&(ss="fakeround")),ss==="miter"&&ao>Qe&&(ss="bevel"),ss==="bevel"&&(ao>2&&(ss="flipbevel"),ao<Qe&&(ss="miter")),vn&&this.updateDistance(vn,nn),ss==="miter")Pi._mult(ao),this.addCurrentVertex(nn,Pi,0,0,Ir);else if(ss==="flipbevel"){if(ao>100)Pi=aa.mult(-1);else{const Xs=ao*jn.add(aa).mag()/jn.sub(aa).mag();Pi._perp()._mult(Xs*(Al?-1:1))}this.addCurrentVertex(nn,Pi,0,0,Ir),this.addCurrentVertex(nn,Pi.mult(-1),0,0,Ir)}else if(ss==="bevel"||ss==="fakeround"){const Xs=-Math.sqrt(ao*ao-1),Ns=Al?Xs:0,Ds=Al?0:Xs;if(vn&&this.addCurrentVertex(nn,jn,Ns,Ds,Ir),ss==="fakeround"){const xo=Math.round(180*Lo/Math.PI/20);for(let tl=1;tl<xo;tl++){let Ws=tl/xo;if(Ws!==.5){const yf=Ws-.5;Ws+=Ws*yf*(Ws-1)*((1.0904+oi*(oi*(3.55645-1.43519*oi)-3.2452))*yf*yf+(.848013+oi*(.215638*oi-1.06021)))}const Vl=aa.sub(jn)._mult(Ws)._add(jn)._unit()._mult(Al?-1:1);this.addHalfVertex(nn,Vl.x,Vl.y,!1,Al,0,Ir)}}Cn&&this.addCurrentVertex(nn,aa,-Ns,-Ds,Ir)}else if(ss==="butt")this.addCurrentVertex(nn,Pi,0,0,Ir);else if(ss==="square"){const Xs=vn?1:-1;this.addCurrentVertex(nn,Pi,Xs,Xs,Ir)}else ss==="round"&&(vn&&(this.addCurrentVertex(nn,jn,0,0,Ir),this.addCurrentVertex(nn,jn,1,1,Ir,!0)),Cn&&(this.addCurrentVertex(nn,aa,-1,-1,Ir,!0),this.addCurrentVertex(nn,aa,0,0,Ir)));if(cs&&Oa<Ut-1){const Xs=nn.dist(Cn);if(Xs>2*Er){const Ns=nn.add(Cn.sub(nn)._mult(Er/Xs)._round());this.updateDistance(nn,Ns),this.addCurrentVertex(Ns,aa,0,0,Ir),nn=Ns}}}}addCurrentVertex(F,ae,we,je,Qe,at=!1){const Et=ae.y*je-ae.x,Ut=-ae.y-ae.x*je;this.addHalfVertex(F,ae.x+ae.y*we,ae.y-ae.x*we,at,!1,we,Qe),this.addHalfVertex(F,Et,Ut,at,!0,-je,Qe),this.distance>Cp/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(F,ae,we,je,Qe,at))}addHalfVertex({x:F,y:ae},we,je,Qe,at,Et,Ut){const ir=.5*(this.lineClips?this.scaledDistance*(Cp-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((F<<1)+(Qe?1:0),(ae<<1)+(at?1:0),Math.round(63*we)+128,Math.round(63*je)+128,1+(Et===0?0:Et<0?-1:1)|(63&ir)<<2,ir>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);const Er=Ut.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,Er),Ut.primitiveLength++),at?this.e2=Er:this.e1=Er}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(F,ae){this.distance+=F.dist(ae),this.updateScaledDistance()}}let kp,i1;si("LineBucket",em,{omit:["layers","patternFeatures"]});var ag={get paint(){return i1=i1||new Ze({"line-opacity":new _s(ue.paint_line["line-opacity"]),"line-color":new _s(ue.paint_line["line-color"]),"line-translate":new os(ue.paint_line["line-translate"]),"line-translate-anchor":new os(ue.paint_line["line-translate-anchor"]),"line-width":new _s(ue.paint_line["line-width"]),"line-gap-width":new _s(ue.paint_line["line-gap-width"]),"line-offset":new _s(ue.paint_line["line-offset"]),"line-blur":new _s(ue.paint_line["line-blur"]),"line-dasharray":new sf(ue.paint_line["line-dasharray"]),"line-pattern":new qf(ue.paint_line["line-pattern"]),"line-gradient":new Yc(ue.paint_line["line-gradient"])})},get layout(){return kp=kp||new Ze({"line-cap":new os(ue.layout_line["line-cap"]),"line-join":new _s(ue.layout_line["line-join"]),"line-miter-limit":new os(ue.layout_line["line-miter-limit"]),"line-round-limit":new os(ue.layout_line["line-round-limit"]),"line-sort-key":new _s(ue.layout_line["line-sort-key"])})}};class vd extends _s{possiblyEvaluate(F,ae){return ae=new Cl(Math.floor(ae.zoom),{now:ae.now,fadeDuration:ae.fadeDuration,zoomHistory:ae.zoomHistory,transition:ae.transition}),super.possiblyEvaluate(F,ae)}evaluate(F,ae,we,je){return ae=k({},ae,{zoom:Math.floor(ae.zoom)}),super.evaluate(F,ae,we,je)}}let ig;class o1 extends fe{constructor(F){super(F,ag),this.gradientVersion=0,ig||(ig=new vd(ag.paint.properties["line-width"].specification),ig.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(F){if(F==="line-gradient"){const ae=this.gradientExpression();this.stepInterpolant=!!(function(we){return we._styleExpression!==void 0})(ae)&&ae._styleExpression.expression instanceof Kn,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(F,ae){super.recalculate(F,ae),this.paint._values["line-floorwidth"]=ig.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,F)}createBucket(F){return new em(F)}queryRadius(F){const ae=F,we=Kd(yn("line-width",this,ae),yn("line-gap-width",this,ae)),je=yn("line-offset",this,ae);return we/2+Math.abs(je)+ra(this.paint.get("line-translate"))}queryIntersectsFeature(F,ae,we,je,Qe,at,Et){const Ut=wa(F,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),at.angle,Et),ir=Et/2*Kd(this.paint.get("line-width").evaluate(ae,we),this.paint.get("line-gap-width").evaluate(ae,we)),Er=this.paint.get("line-offset").evaluate(ae,we);return Er&&(je=(function(Ir,nn){const vn=[];for(let Cn=0;Cn<Ir.length;Cn++){const jn=Ir[Cn],aa=[];for(let Oa=0;Oa<jn.length;Oa++){const Pi=jn[Oa-1],oi=jn[Oa],Ti=jn[Oa+1],ao=Oa===0?new s(0,0):oi.sub(Pi)._unit()._perp(),Lo=Oa===jn.length-1?new s(0,0):Ti.sub(oi)._unit()._perp(),cs=ao._add(Lo)._unit(),Al=cs.x*Lo.x+cs.y*Lo.y;Al!==0&&cs._mult(1/Al),aa.push(cs._mult(nn)._add(oi))}vn.push(aa)}return vn})(je,Er*Et)),(function(Ir,nn,vn){for(let Cn=0;Cn<nn.length;Cn++){const jn=nn[Cn];if(Ir.length>=3){for(let aa=0;aa<jn.length;aa++)if(di(Ir,jn[aa]))return!0}if(ni(Ir,jn,vn))return!0}return!1})(Ut,je,ir)}isTileClipped(){return!0}}function Kd(K,F){return F>0?F+2*K:K}const ey=Ct([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),I_=Ct([{name:"a_projected_pos",components:3,type:"Float32"}],4);Ct([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);const D_=Ct([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);Ct([{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"}]);const s1=Ct([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),ty=Ct([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function ry(K,F,ae){return K.sections.forEach(we=>{we.text=(function(je,Qe,at){const Et=Qe.layout.get("text-transform").evaluate(at,{});return Et==="uppercase"?je=je.toLocaleUpperCase():Et==="lowercase"&&(je=je.toLocaleLowerCase()),Wl.applyArabicShaping&&(je=Wl.applyArabicShaping(je)),je})(we.text,F,ae)}),K}Ct([{name:"triangle",components:3,type:"Uint16"}]),Ct([{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"}]),Ct([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",name:"collisionCircleDiameter"},{type:"Uint16",name:"textAnchorOffsetStartIndex"},{type:"Uint16",name:"textAnchorOffsetEndIndex"}]),Ct([{type:"Float32",name:"offsetX"}]),Ct([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),Ct([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);const Pf={"!":"︕","#":"＃",$:"＄","%":"％","&":"＆","(":"︵",")":"︶","*":"＊","+":"＋",",":"︐","-":"︲",".":"・","/":"／",":":"︓",";":"︔","<":"︿","=":"＝",">":"﹀","?":"︖","@":"＠","[":"﹇","\\":"＼","]":"﹈","^":"＾",_:"︳","`":"｀","{":"︷","|":"―","}":"︸","~":"～","¢":"￠","£":"￡","¥":"￥","¦":"￤","¬":"￢","¯":"￣","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"￦","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","！":"︕","（":"︵","）":"︶","，":"︐","－":"︲","．":"・","：":"︓","；":"︔","＜":"︿","＞":"﹀","？":"︖","［":"﹇","］":"﹈","＿":"︳","｛":"︷","｜":"―","｝":"︸","｟":"︵","｠":"︶","｡":"︒","｢":"﹁","｣":"﹂"};var Tc=24,kv=Oc,l1=function(K,F,ae,we,je){var Qe,at,Et=8*je-we-1,Ut=(1<<Et)-1,ir=Ut>>1,Er=-7,Ir=je-1,nn=-1,vn=K[F+Ir];for(Ir+=nn,Qe=vn&(1<<-Er)-1,vn>>=-Er,Er+=Et;Er>0;Qe=256*Qe+K[F+Ir],Ir+=nn,Er-=8);for(at=Qe&(1<<-Er)-1,Qe>>=-Er,Er+=we;Er>0;at=256*at+K[F+Ir],Ir+=nn,Er-=8);if(Qe===0)Qe=1-ir;else{if(Qe===Ut)return at?NaN:1/0*(vn?-1:1);at+=Math.pow(2,we),Qe-=ir}return(vn?-1:1)*at*Math.pow(2,Qe-we)},O_=function(K,F,ae,we,je,Qe){var at,Et,Ut,ir=8*Qe-je-1,Er=(1<<ir)-1,Ir=Er>>1,nn=je===23?Math.pow(2,-24)-Math.pow(2,-77):0,vn=0,Cn=1,jn=F<0||F===0&&1/F<0?1:0;for(F=Math.abs(F),isNaN(F)||F===1/0?(Et=isNaN(F)?1:0,at=Er):(at=Math.floor(Math.log(F)/Math.LN2),F*(Ut=Math.pow(2,-at))<1&&(at--,Ut*=2),(F+=at+Ir>=1?nn/Ut:nn*Math.pow(2,1-Ir))*Ut>=2&&(at++,Ut/=2),at+Ir>=Er?(Et=0,at=Er):at+Ir>=1?(Et=(F*Ut-1)*Math.pow(2,je),at+=Ir):(Et=F*Math.pow(2,Ir-1)*Math.pow(2,je),at=0));je>=8;K[ae+vn]=255&Et,vn+=Cn,Et/=256,je-=8);for(at=at<<je|Et,ir+=je;ir>0;K[ae+vn]=255&at,vn+=Cn,at/=256,ir-=8);K[ae+vn-Cn]|=128*jn};function Oc(K){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(K)?K:new Uint8Array(K||0),this.pos=0,this.type=0,this.length=this.buf.length}Oc.Varint=0,Oc.Fixed64=1,Oc.Bytes=2,Oc.Fixed32=5;var jb=4294967296,ny=1/jb,b3=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");function Pp(K){return K.type===Oc.Bytes?K.readVarint()+K.pos:K.pos+1}function ay(K,F,ae){return ae?4294967296*F+(K>>>0):4294967296*(F>>>0)+(K>>>0)}function w3(K,F,ae){var we=F<=16383?1:F<=2097151?2:F<=268435455?3:Math.floor(Math.log(F)/(7*Math.LN2));ae.realloc(we);for(var je=ae.pos-1;je>=K;je--)ae.buf[je+we]=ae.buf[je]}function Ub(K,F){for(var ae=0;ae<K.length;ae++)F.writeVarint(K[ae])}function n8(K,F){for(var ae=0;ae<K.length;ae++)F.writeSVarint(K[ae])}function a8(K,F){for(var ae=0;ae<K.length;ae++)F.writeFloat(K[ae])}function i8(K,F){for(var ae=0;ae<K.length;ae++)F.writeDouble(K[ae])}function o8(K,F){for(var ae=0;ae<K.length;ae++)F.writeBoolean(K[ae])}function s8(K,F){for(var ae=0;ae<K.length;ae++)F.writeFixed32(K[ae])}function l8(K,F){for(var ae=0;ae<K.length;ae++)F.writeSFixed32(K[ae])}function u8(K,F){for(var ae=0;ae<K.length;ae++)F.writeFixed64(K[ae])}function T3(K,F){for(var ae=0;ae<K.length;ae++)F.writeSFixed64(K[ae])}function A3(K,F){return(K[F]|K[F+1]<<8|K[F+2]<<16)+16777216*K[F+3]}function z_(K,F,ae){K[ae]=F,K[ae+1]=F>>>8,K[ae+2]=F>>>16,K[ae+3]=F>>>24}function bk(K,F){return(K[F]|K[F+1]<<8|K[F+2]<<16)+(K[F+3]<<24)}Oc.prototype={destroy:function(){this.buf=null},readFields:function(K,F,ae){for(ae=ae||this.length;this.pos<ae;){var we=this.readVarint(),je=we>>3,Qe=this.pos;this.type=7&we,K(je,F,this),this.pos===Qe&&this.skip(we)}return F},readMessage:function(K,F){return this.readFields(K,F,this.readVarint()+this.pos)},readFixed32:function(){var K=A3(this.buf,this.pos);return this.pos+=4,K},readSFixed32:function(){var K=bk(this.buf,this.pos);return this.pos+=4,K},readFixed64:function(){var K=A3(this.buf,this.pos)+A3(this.buf,this.pos+4)*jb;return this.pos+=8,K},readSFixed64:function(){var K=A3(this.buf,this.pos)+bk(this.buf,this.pos+4)*jb;return this.pos+=8,K},readFloat:function(){var K=l1(this.buf,this.pos,!0,23,4);return this.pos+=4,K},readDouble:function(){var K=l1(this.buf,this.pos,!0,52,8);return this.pos+=8,K},readVarint:function(K){var F,ae,we=this.buf;return F=127&(ae=we[this.pos++]),ae<128?F:(F|=(127&(ae=we[this.pos++]))<<7,ae<128?F:(F|=(127&(ae=we[this.pos++]))<<14,ae<128?F:(F|=(127&(ae=we[this.pos++]))<<21,ae<128?F:(function(je,Qe,at){var Et,Ut,ir=at.buf;if(Et=(112&(Ut=ir[at.pos++]))>>4,Ut<128||(Et|=(127&(Ut=ir[at.pos++]))<<3,Ut<128)||(Et|=(127&(Ut=ir[at.pos++]))<<10,Ut<128)||(Et|=(127&(Ut=ir[at.pos++]))<<17,Ut<128)||(Et|=(127&(Ut=ir[at.pos++]))<<24,Ut<128)||(Et|=(1&(Ut=ir[at.pos++]))<<31,Ut<128))return ay(je,Et,Qe);throw new Error("Expected varint not more than 10 bytes")})(F|=(15&(ae=we[this.pos]))<<28,K,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var K=this.readVarint();return K%2==1?(K+1)/-2:K/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var K=this.readVarint()+this.pos,F=this.pos;return this.pos=K,K-F>=12&&b3?(function(ae,we,je){return b3.decode(ae.subarray(we,je))})(this.buf,F,K):(function(ae,we,je){for(var Qe="",at=we;at<je;){var Et,Ut,ir,Er=ae[at],Ir=null,nn=Er>239?4:Er>223?3:Er>191?2:1;if(at+nn>je)break;nn===1?Er<128&&(Ir=Er):nn===2?(192&(Et=ae[at+1]))==128&&(Ir=(31&Er)<<6|63&Et)<=127&&(Ir=null):nn===3?(Ut=ae[at+2],(192&(Et=ae[at+1]))==128&&(192&Ut)==128&&((Ir=(15&Er)<<12|(63&Et)<<6|63&Ut)<=2047||Ir>=55296&&Ir<=57343)&&(Ir=null)):nn===4&&(Ut=ae[at+2],ir=ae[at+3],(192&(Et=ae[at+1]))==128&&(192&Ut)==128&&(192&ir)==128&&((Ir=(15&Er)<<18|(63&Et)<<12|(63&Ut)<<6|63&ir)<=65535||Ir>=1114112)&&(Ir=null)),Ir===null?(Ir=65533,nn=1):Ir>65535&&(Ir-=65536,Qe+=String.fromCharCode(Ir>>>10&1023|55296),Ir=56320|1023&Ir),Qe+=String.fromCharCode(Ir),at+=nn}return Qe})(this.buf,F,K)},readBytes:function(){var K=this.readVarint()+this.pos,F=this.buf.subarray(this.pos,K);return this.pos=K,F},readPackedVarint:function(K,F){if(this.type!==Oc.Bytes)return K.push(this.readVarint(F));var ae=Pp(this);for(K=K||[];this.pos<ae;)K.push(this.readVarint(F));return K},readPackedSVarint:function(K){if(this.type!==Oc.Bytes)return K.push(this.readSVarint());var F=Pp(this);for(K=K||[];this.pos<F;)K.push(this.readSVarint());return K},readPackedBoolean:function(K){if(this.type!==Oc.Bytes)return K.push(this.readBoolean());var F=Pp(this);for(K=K||[];this.pos<F;)K.push(this.readBoolean());return K},readPackedFloat:function(K){if(this.type!==Oc.Bytes)return K.push(this.readFloat());var F=Pp(this);for(K=K||[];this.pos<F;)K.push(this.readFloat());return K},readPackedDouble:function(K){if(this.type!==Oc.Bytes)return K.push(this.readDouble());var F=Pp(this);for(K=K||[];this.pos<F;)K.push(this.readDouble());return K},readPackedFixed32:function(K){if(this.type!==Oc.Bytes)return K.push(this.readFixed32());var F=Pp(this);for(K=K||[];this.pos<F;)K.push(this.readFixed32());return K},readPackedSFixed32:function(K){if(this.type!==Oc.Bytes)return K.push(this.readSFixed32());var F=Pp(this);for(K=K||[];this.pos<F;)K.push(this.readSFixed32());return K},readPackedFixed64:function(K){if(this.type!==Oc.Bytes)return K.push(this.readFixed64());var F=Pp(this);for(K=K||[];this.pos<F;)K.push(this.readFixed64());return K},readPackedSFixed64:function(K){if(this.type!==Oc.Bytes)return K.push(this.readSFixed64());var F=Pp(this);for(K=K||[];this.pos<F;)K.push(this.readSFixed64());return K},skip:function(K){var F=7&K;if(F===Oc.Varint)for(;this.buf[this.pos++]>127;);else if(F===Oc.Bytes)this.pos=this.readVarint()+this.pos;else if(F===Oc.Fixed32)this.pos+=4;else{if(F!==Oc.Fixed64)throw new Error("Unimplemented type: "+F);this.pos+=8}},writeTag:function(K,F){this.writeVarint(K<<3|F)},realloc:function(K){for(var F=this.length||16;F<this.pos+K;)F*=2;if(F!==this.length){var ae=new Uint8Array(F);ae.set(this.buf),this.buf=ae,this.length=F}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(K){this.realloc(4),z_(this.buf,K,this.pos),this.pos+=4},writeSFixed32:function(K){this.realloc(4),z_(this.buf,K,this.pos),this.pos+=4},writeFixed64:function(K){this.realloc(8),z_(this.buf,-1&K,this.pos),z_(this.buf,Math.floor(K*ny),this.pos+4),this.pos+=8},writeSFixed64:function(K){this.realloc(8),z_(this.buf,-1&K,this.pos),z_(this.buf,Math.floor(K*ny),this.pos+4),this.pos+=8},writeVarint:function(K){(K=+K||0)>268435455||K<0?(function(F,ae){var we,je;if(F>=0?(we=F%4294967296|0,je=F/4294967296|0):(je=~(-F/4294967296),4294967295^(we=~(-F%4294967296))?we=we+1|0:(we=0,je=je+1|0)),F>=18446744073709552e3||F<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");ae.realloc(10),(function(Qe,at,Et){Et.buf[Et.pos++]=127&Qe|128,Qe>>>=7,Et.buf[Et.pos++]=127&Qe|128,Qe>>>=7,Et.buf[Et.pos++]=127&Qe|128,Qe>>>=7,Et.buf[Et.pos++]=127&Qe|128,Et.buf[Et.pos]=127&(Qe>>>=7)})(we,0,ae),(function(Qe,at){var Et=(7&Qe)<<4;at.buf[at.pos++]|=Et|((Qe>>>=3)?128:0),Qe&&(at.buf[at.pos++]=127&Qe|((Qe>>>=7)?128:0),Qe&&(at.buf[at.pos++]=127&Qe|((Qe>>>=7)?128:0),Qe&&(at.buf[at.pos++]=127&Qe|((Qe>>>=7)?128:0),Qe&&(at.buf[at.pos++]=127&Qe|((Qe>>>=7)?128:0),Qe&&(at.buf[at.pos++]=127&Qe)))))})(je,ae)})(K,this):(this.realloc(4),this.buf[this.pos++]=127&K|(K>127?128:0),K<=127||(this.buf[this.pos++]=127&(K>>>=7)|(K>127?128:0),K<=127||(this.buf[this.pos++]=127&(K>>>=7)|(K>127?128:0),K<=127||(this.buf[this.pos++]=K>>>7&127))))},writeSVarint:function(K){this.writeVarint(K<0?2*-K-1:2*K)},writeBoolean:function(K){this.writeVarint(!!K)},writeString:function(K){K=String(K),this.realloc(4*K.length),this.pos++;var F=this.pos;this.pos=(function(we,je,Qe){for(var at,Et,Ut=0;Ut<je.length;Ut++){if((at=je.charCodeAt(Ut))>55295&&at<57344){if(!Et){at>56319||Ut+1===je.length?(we[Qe++]=239,we[Qe++]=191,we[Qe++]=189):Et=at;continue}if(at<56320){we[Qe++]=239,we[Qe++]=191,we[Qe++]=189,Et=at;continue}at=Et-55296<<10|at-56320|65536,Et=null}else Et&&(we[Qe++]=239,we[Qe++]=191,we[Qe++]=189,Et=null);at<128?we[Qe++]=at:(at<2048?we[Qe++]=at>>6|192:(at<65536?we[Qe++]=at>>12|224:(we[Qe++]=at>>18|240,we[Qe++]=at>>12&63|128),we[Qe++]=at>>6&63|128),we[Qe++]=63&at|128)}return Qe})(this.buf,K,this.pos);var ae=this.pos-F;ae>=128&&w3(F,ae,this),this.pos=F-1,this.writeVarint(ae),this.pos+=ae},writeFloat:function(K){this.realloc(4),O_(this.buf,K,this.pos,!0,23,4),this.pos+=4},writeDouble:function(K){this.realloc(8),O_(this.buf,K,this.pos,!0,52,8),this.pos+=8},writeBytes:function(K){var F=K.length;this.writeVarint(F),this.realloc(F);for(var ae=0;ae<F;ae++)this.buf[this.pos++]=K[ae]},writeRawMessage:function(K,F){this.pos++;var ae=this.pos;K(F,this);var we=this.pos-ae;we>=128&&w3(ae,we,this),this.pos=ae-1,this.writeVarint(we),this.pos+=we},writeMessage:function(K,F,ae){this.writeTag(K,Oc.Bytes),this.writeRawMessage(F,ae)},writePackedVarint:function(K,F){F.length&&this.writeMessage(K,Ub,F)},writePackedSVarint:function(K,F){F.length&&this.writeMessage(K,n8,F)},writePackedBoolean:function(K,F){F.length&&this.writeMessage(K,o8,F)},writePackedFloat:function(K,F){F.length&&this.writeMessage(K,a8,F)},writePackedDouble:function(K,F){F.length&&this.writeMessage(K,i8,F)},writePackedFixed32:function(K,F){F.length&&this.writeMessage(K,s8,F)},writePackedSFixed32:function(K,F){F.length&&this.writeMessage(K,l8,F)},writePackedFixed64:function(K,F){F.length&&this.writeMessage(K,u8,F)},writePackedSFixed64:function(K,F){F.length&&this.writeMessage(K,T3,F)},writeBytesField:function(K,F){this.writeTag(K,Oc.Bytes),this.writeBytes(F)},writeFixed32Field:function(K,F){this.writeTag(K,Oc.Fixed32),this.writeFixed32(F)},writeSFixed32Field:function(K,F){this.writeTag(K,Oc.Fixed32),this.writeSFixed32(F)},writeFixed64Field:function(K,F){this.writeTag(K,Oc.Fixed64),this.writeFixed64(F)},writeSFixed64Field:function(K,F){this.writeTag(K,Oc.Fixed64),this.writeSFixed64(F)},writeVarintField:function(K,F){this.writeTag(K,Oc.Varint),this.writeVarint(F)},writeSVarintField:function(K,F){this.writeTag(K,Oc.Varint),this.writeSVarint(F)},writeStringField:function(K,F){this.writeTag(K,Oc.Bytes),this.writeString(F)},writeFloatField:function(K,F){this.writeTag(K,Oc.Fixed32),this.writeFloat(F)},writeDoubleField:function(K,F){this.writeTag(K,Oc.Fixed64),this.writeDouble(F)},writeBooleanField:function(K,F){this.writeVarintField(K,!!F)}};var e5=a(kv);const S3=3;function c8(K,F,ae){K===1&&ae.readMessage(wk,F)}function wk(K,F,ae){if(K===3){const{id:we,bitmap:je,width:Qe,height:at,left:Et,top:Ut,advance:ir}=ae.readMessage(t5,{});F.push({id:we,bitmap:new ds({width:Qe+2*S3,height:at+2*S3},je),metrics:{width:Qe,height:at,left:Et,top:Ut,advance:ir}})}}function t5(K,F,ae){K===1?F.id=ae.readVarint():K===2?F.bitmap=ae.readBytes():K===3?F.width=ae.readVarint():K===4?F.height=ae.readVarint():K===5?F.left=ae.readSVarint():K===6?F.top=ae.readSVarint():K===7&&(F.advance=ae.readVarint())}const r5=S3;function E3(K){let F=0,ae=0;for(const at of K)F+=at.w*at.h,ae=Math.max(ae,at.w);K.sort((at,Et)=>Et.h-at.h);const we=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(F/.95)),ae),h:1/0}];let je=0,Qe=0;for(const at of K)for(let Et=we.length-1;Et>=0;Et--){const Ut=we[Et];if(!(at.w>Ut.w||at.h>Ut.h)){if(at.x=Ut.x,at.y=Ut.y,Qe=Math.max(Qe,at.y+at.h),je=Math.max(je,at.x+at.w),at.w===Ut.w&&at.h===Ut.h){const ir=we.pop();Et<we.length&&(we[Et]=ir)}else at.h===Ut.h?(Ut.x+=at.w,Ut.w-=at.w):at.w===Ut.w?(Ut.y+=at.h,Ut.h-=at.h):(we.push({x:Ut.x+at.w,y:Ut.y,w:Ut.w-at.w,h:at.h}),Ut.y+=at.h,Ut.h-=at.h);break}}return{w:je,h:Qe,fill:F/(je*Qe)||0}}const pd=1;class vv{constructor(F,{pixelRatio:ae,version:we,stretchX:je,stretchY:Qe,content:at,textFitWidth:Et,textFitHeight:Ut}){this.paddedRect=F,this.pixelRatio=ae,this.stretchX=je,this.stretchY=Qe,this.content=at,this.version=we,this.textFitWidth=Et,this.textFitHeight=Ut}get tl(){return[this.paddedRect.x+pd,this.paddedRect.y+pd]}get br(){return[this.paddedRect.x+this.paddedRect.w-pd,this.paddedRect.y+this.paddedRect.h-pd]}get tlbr(){return this.tl.concat(this.br)}get displaySize(){return[(this.paddedRect.w-2*pd)/this.pixelRatio,(this.paddedRect.h-2*pd)/this.pixelRatio]}}class Tk{constructor(F,ae){const we={},je={};this.haveRenderCallbacks=[];const Qe=[];this.addImages(F,we,Qe),this.addImages(ae,je,Qe);const{w:at,h:Et}=E3(Qe),Ut=new wl({width:at||1,height:Et||1});for(const ir in F){const Er=F[ir],Ir=we[ir].paddedRect;wl.copy(Er.data,Ut,{x:0,y:0},{x:Ir.x+pd,y:Ir.y+pd},Er.data)}for(const ir in ae){const Er=ae[ir],Ir=je[ir].paddedRect,nn=Ir.x+pd,vn=Ir.y+pd,Cn=Er.data.width,jn=Er.data.height;wl.copy(Er.data,Ut,{x:0,y:0},{x:nn,y:vn},Er.data),wl.copy(Er.data,Ut,{x:0,y:jn-1},{x:nn,y:vn-1},{width:Cn,height:1}),wl.copy(Er.data,Ut,{x:0,y:0},{x:nn,y:vn+jn},{width:Cn,height:1}),wl.copy(Er.data,Ut,{x:Cn-1,y:0},{x:nn-1,y:vn},{width:1,height:jn}),wl.copy(Er.data,Ut,{x:0,y:0},{x:nn+Cn,y:vn},{width:1,height:jn})}this.image=Ut,this.iconPositions=we,this.patternPositions=je}addImages(F,ae,we){for(const je in F){const Qe=F[je],at={x:0,y:0,w:Qe.data.width+2*pd,h:Qe.data.height+2*pd};we.push(at),ae[je]=new vv(at,Qe),Qe.hasRenderCallback&&this.haveRenderCallbacks.push(je)}}patchUpdatedImages(F,ae){F.dispatchRenderCallbacks(this.haveRenderCallbacks);for(const we in F.updatedImages)this.patchUpdatedImage(this.iconPositions[we],F.getImage(we),ae),this.patchUpdatedImage(this.patternPositions[we],F.getImage(we),ae)}patchUpdatedImage(F,ae,we){if(!F||!ae||F.version===ae.version)return;F.version=ae.version;const[je,Qe]=F.tl;we.update(ae.data,void 0,{x:je,y:Qe})}}var iy;si("ImagePosition",vv),si("ImageAtlas",Tk),t.ah=void 0,(iy=t.ah||(t.ah={}))[iy.none=0]="none",iy[iy.horizontal=1]="horizontal",iy[iy.vertical=2]="vertical",iy[iy.horizontalOnly=3]="horizontalOnly";const N_=-17;class qb{constructor(){this.scale=1,this.fontStack="",this.imageName=null}static forText(F,ae){const we=new qb;return we.scale=F||1,we.fontStack=ae,we}static forImage(F){const ae=new qb;return ae.imageName=F,ae}}class F_{constructor(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null}static fromFeature(F,ae){const we=new F_;for(let je=0;je<F.sections.length;je++){const Qe=F.sections[je];Qe.image?we.addImageSection(Qe):we.addTextSection(Qe,ae)}return we}length(){return this.text.length}getSection(F){return this.sections[this.sectionIndex[F]]}getSectionIndex(F){return this.sectionIndex[F]}getCharCode(F){return this.text.charCodeAt(F)}verticalizePunctuation(){this.text=(function(F){let ae="";for(let we=0;we<F.length;we++){const je=F.charCodeAt(we+1)||null,Qe=F.charCodeAt(we-1)||null;ae+=je&&Bu(je)&&!Pf[F[we+1]]||Qe&&Bu(Qe)&&!Pf[F[we-1]]||!Pf[F[we]]?F[we]:Pf[F[we]]}return ae})(this.text)}trim(){let F=0;for(let we=0;we<this.text.length&&C3[this.text.charCodeAt(we)];we++)F++;let ae=this.text.length;for(let we=this.text.length-1;we>=0&&we>=F&&C3[this.text.charCodeAt(we)];we--)ae--;this.text=this.text.substring(F,ae),this.sectionIndex=this.sectionIndex.slice(F,ae)}substring(F,ae){const we=new F_;return we.text=this.text.substring(F,ae),we.sectionIndex=this.sectionIndex.slice(F,ae),we.sections=this.sections,we}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((F,ae)=>Math.max(F,this.sections[ae].scale),0)}addTextSection(F,ae){this.text+=F.text,this.sections.push(qb.forText(F.scale,F.fontStack||ae));const we=this.sections.length-1;for(let je=0;je<F.text.length;++je)this.sectionIndex.push(we)}addImageSection(F){const ae=F.image?F.image.name:"";if(ae.length===0)return void x("Can't add FormattedSection with an empty image.");const we=this.getNextImageSectionCharCode();we?(this.text+=String.fromCharCode(we),this.sections.push(qb.forImage(ae)),this.sectionIndex.push(this.sections.length-1)):x("Reached maximum number of images 6401")}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function M3(K,F,ae,we,je,Qe,at,Et,Ut,ir,Er,Ir,nn,vn,Cn){const jn=F_.fromFeature(K,je);let aa;Ir===t.ah.vertical&&jn.verticalizePunctuation();const{processBidirectionalText:Oa,processStyledBidirectionalText:Pi}=Wl;if(Oa&&jn.sections.length===1){aa=[];const ao=Oa(jn.toString(),u1(jn,ir,Qe,F,we,vn));for(const Lo of ao){const cs=new F_;cs.text=Lo,cs.sections=jn.sections;for(let Al=0;Al<Lo.length;Al++)cs.sectionIndex.push(0);aa.push(cs)}}else if(Pi){aa=[];const ao=Pi(jn.text,jn.sectionIndex,u1(jn,ir,Qe,F,we,vn));for(const Lo of ao){const cs=new F_;cs.text=Lo[0],cs.sectionIndex=Lo[1],cs.sections=jn.sections,aa.push(cs)}}else aa=(function(ao,Lo){const cs=[],Al=ao.text;let xs=0;for(const ss of Lo)cs.push(ao.substring(xs,ss)),xs=ss;return xs<Al.length&&cs.push(ao.substring(xs,Al.length)),cs})(jn,u1(jn,ir,Qe,F,we,vn));const oi=[],Ti={positionedLines:oi,text:jn.toString(),top:Er[1],bottom:Er[1],left:Er[0],right:Er[0],writingMode:Ir,iconsInText:!1,verticalizable:!1};return(function(ao,Lo,cs,Al,xs,ss,Xs,Ns,Ds,xo,tl,Ws){let Vl=0,yf=N_,uf=0,Rd=0;const ip=Ns==="right"?1:Ns==="left"?0:.5;let qh=0;for(const fh of xs){fh.trim();const Id=fh.getMaxScale(),Pv=(Id-1)*Tc,mv={positionedGlyphs:[],lineOffset:0};ao.positionedLines[qh]=mv;const $v=mv.positionedGlyphs;let Qd=0;if(!fh.length()){yf+=ss,++qh;continue}for(let Lf=0;Lf<fh.length();Lf++){const $u=fh.getSection(Lf),zc=fh.getSectionIndex(Lf),$c=fh.getCharCode(Lf);let nh=0,Rf=null,W_=null,Gm=null,Xm=Tc;const Lv=!(Ds===t.ah.horizontal||!tl&&!hl($c)||tl&&(C3[$c]||(md=$c,new RegExp("\\p{sc=Arab}","u").test(String.fromCodePoint(md)))));if($u.imageName){const _f=Al[$u.imageName];if(!_f)continue;Gm=$u.imageName,ao.iconsInText=ao.iconsInText||!0,W_=_f.paddedRect;const ev=_f.displaySize;$u.scale=$u.scale*Tc/Ws,Rf={width:ev[0],height:ev[1],left:pd,top:-r5,advance:Lv?ev[1]:ev[0]},nh=Pv+(Tc-ev[1]*$u.scale),Xm=Rf.advance;const mm=Lv?ev[0]*$u.scale-Tc*Id:ev[1]*$u.scale-Tc*Id;mm>0&&mm>Qd&&(Qd=mm)}else{const _f=cs[$u.fontStack],ev=_f&&_f[$c];if(ev&&ev.rect)W_=ev.rect,Rf=ev.metrics;else{const mm=Lo[$u.fontStack],Ip=mm&&mm[$c];if(!Ip)continue;Rf=Ip.metrics}nh=(Id-$u.scale)*Tc}Lv?(ao.verticalizable=!0,$v.push({glyph:$c,imageName:Gm,x:Vl,y:yf+nh,vertical:Lv,scale:$u.scale,fontStack:$u.fontStack,sectionIndex:zc,metrics:Rf,rect:W_}),Vl+=Xm*$u.scale+xo):($v.push({glyph:$c,imageName:Gm,x:Vl,y:yf+nh,vertical:Lv,scale:$u.scale,fontStack:$u.fontStack,sectionIndex:zc,metrics:Rf,rect:W_}),Vl+=Rf.advance*$u.scale+xo)}$v.length!==0&&(uf=Math.max(Vl-xo,uf),d8($v,0,$v.length-1,ip,Qd)),Vl=0;const Rp=ss*Id+Qd;mv.lineOffset=Math.max(Qd,Pv),yf+=Rp,Rd=Math.max(Rp,Rd),++qh}var md;const Wv=yf-N_,{horizontalAlign:Yv,verticalAlign:Zv}=a5(Xs);(function(fh,Id,Pv,mv,$v,Qd,Rp,Lf,$u){const zc=(Id-Pv)*$v;let $c=0;$c=Qd!==Rp?-Lf*mv-N_:(-mv*$u+.5)*Rp;for(const nh of fh)for(const Rf of nh.positionedGlyphs)Rf.x+=zc,Rf.y+=$c})(ao.positionedLines,ip,Yv,Zv,uf,Rd,ss,Wv,xs.length),ao.top+=-Zv*Wv,ao.bottom=ao.top+Wv,ao.left+=-Yv*uf,ao.right=ao.left+uf})(Ti,F,ae,we,aa,at,Et,Ut,Ir,ir,nn,Cn),!(function(ao){for(const Lo of ao)if(Lo.positionedGlyphs.length!==0)return!1;return!0})(oi)&&Ti}const C3={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},f8={10:!0,32:!0,38:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0},h8={40:!0};function k3(K,F,ae,we,je,Qe){if(F.imageName){const at=we[F.imageName];return at?at.displaySize[0]*F.scale*Tc/Qe+je:0}{const at=ae[F.fontStack],Et=at&&at[K];return Et?Et.metrics.advance*F.scale+je:0}}function Ak(K,F,ae,we){const je=Math.pow(K-F,2);return we?K<F?je/2:2*je:je+Math.abs(ae)*ae}function P3(K,F,ae){let we=0;return K===10&&(we-=1e4),ae&&(we+=150),K!==40&&K!==65288||(we+=50),F!==41&&F!==65289||(we+=50),we}function n5(K,F,ae,we,je,Qe){let at=null,Et=Ak(F,ae,je,Qe);for(const Ut of we){const ir=Ak(F-Ut.x,ae,je,Qe)+Ut.badness;ir<=Et&&(at=Ut,Et=ir)}return{index:K,x:F,priorBreak:at,badness:Et}}function og(K){return K?og(K.priorBreak).concat(K.index):[]}function u1(K,F,ae,we,je,Qe){if(!K)return[];const at=[],Et=(function(Ir,nn,vn,Cn,jn,aa){let Oa=0;for(let Pi=0;Pi<Ir.length();Pi++){const oi=Ir.getSection(Pi);Oa+=k3(Ir.getCharCode(Pi),oi,Cn,jn,nn,aa)}return Oa/Math.max(1,Math.ceil(Oa/vn))})(K,F,ae,we,je,Qe),Ut=K.text.indexOf("​")>=0;let ir=0;for(let Ir=0;Ir<K.length();Ir++){const nn=K.getSection(Ir),vn=K.getCharCode(Ir);if(C3[vn]||(ir+=k3(vn,nn,we,je,F,Qe)),Ir<K.length()-1){const Cn=!((Er=vn)<11904)&&(!!Ji["CJK Compatibility Forms"](Er)||!!Ji["CJK Compatibility"](Er)||!!Ji["CJK Strokes"](Er)||!!Ji["CJK Symbols and Punctuation"](Er)||!!Ji["Enclosed CJK Letters and Months"](Er)||!!Ji["Halfwidth and Fullwidth Forms"](Er)||!!Ji["Ideographic Description Characters"](Er)||!!Ji["Vertical Forms"](Er)||iu.test(String.fromCodePoint(Er)));(f8[vn]||Cn||nn.imageName||Ir!==K.length()-2&&h8[K.getCharCode(Ir+1)])&&at.push(n5(Ir+1,ir,Et,at,P3(vn,K.getCharCode(Ir+1),Cn&&Ut),!1))}}var Er;return og(n5(K.length(),ir,Et,at,0,!0))}function a5(K){let F=.5,ae=.5;switch(K){case"right":case"top-right":case"bottom-right":F=1;break;case"left":case"top-left":case"bottom-left":F=0}switch(K){case"bottom":case"bottom-right":case"bottom-left":ae=1;break;case"top":case"top-right":case"top-left":ae=0}return{horizontalAlign:F,verticalAlign:ae}}function d8(K,F,ae,we,je){if(!we&&!je)return;const Qe=K[ae],at=(K[ae].x+Qe.metrics.advance*Qe.scale)*we;for(let Et=F;Et<=ae;Et++)K[Et].x-=at,K[Et].y+=je}function v8(K,F,ae){const{horizontalAlign:we,verticalAlign:je}=a5(ae),Qe=F[0]-K.displaySize[0]*we,at=F[1]-K.displaySize[1]*je;return{image:K,top:at,bottom:at+K.displaySize[1],left:Qe,right:Qe+K.displaySize[0]}}function Sk(K){var F,ae;let we=K.left,je=K.top,Qe=K.right-we,at=K.bottom-je;const Et=(F=K.image.textFitWidth)!==null&&F!==void 0?F:"stretchOrShrink",Ut=(ae=K.image.textFitHeight)!==null&&ae!==void 0?ae:"stretchOrShrink",ir=(K.image.content[2]-K.image.content[0])/(K.image.content[3]-K.image.content[1]);if(Ut==="proportional"){if(Et==="stretchOnly"&&Qe/at<ir||Et==="proportional"){const Er=Math.ceil(at*ir);we*=Er/Qe,Qe=Er}}else if(Et==="proportional"&&Ut==="stretchOnly"&&ir!==0&&Qe/at>ir){const Er=Math.ceil(Qe/ir);je*=Er/at,at=Er}return{x1:we,y1:je,x2:we+Qe,y2:je+at}}function Ek(K,F,ae,we,je,Qe){const at=K.image;let Et;if(at.content){const aa=at.content,Oa=at.pixelRatio||1;Et=[aa[0]/Oa,aa[1]/Oa,at.displaySize[0]-aa[2]/Oa,at.displaySize[1]-aa[3]/Oa]}const Ut=F.left*Qe,ir=F.right*Qe;let Er,Ir,nn,vn;ae==="width"||ae==="both"?(vn=je[0]+Ut-we[3],Ir=je[0]+ir+we[1]):(vn=je[0]+(Ut+ir-at.displaySize[0])/2,Ir=vn+at.displaySize[0]);const Cn=F.top*Qe,jn=F.bottom*Qe;return ae==="height"||ae==="both"?(Er=je[1]+Cn-we[0],nn=je[1]+jn+we[2]):(Er=je[1]+(Cn+jn-at.displaySize[1])/2,nn=Er+at.displaySize[1]),{image:at,top:Er,right:Ir,bottom:nn,left:vn,collisionPadding:Et}}const Vb=255,_0=128,oy=Vb*_0;function Mk(K,F){const{expression:ae}=F;if(ae.kind==="constant")return{kind:"constant",layoutSize:ae.evaluate(new Cl(K+1))};if(ae.kind==="source")return{kind:"source"};{const{zoomStops:we,interpolationType:je}=ae;let Qe=0;for(;Qe<we.length&&we[Qe]<=K;)Qe++;Qe=Math.max(0,Qe-1);let at=Qe;for(;at<we.length&&we[at]<K+1;)at++;at=Math.min(we.length-1,at);const Et=we[Qe],Ut=we[at];return ae.kind==="composite"?{kind:"composite",minZoom:Et,maxZoom:Ut,interpolationType:je}:{kind:"camera",minZoom:Et,maxZoom:Ut,minSize:ae.evaluate(new Cl(Et)),maxSize:ae.evaluate(new Cl(Ut)),interpolationType:je}}}function i5(K,F,ae){let we="never";const je=K.get(F);return je?we=je:K.get(ae)&&(we="always"),we}const p8=Pa.VectorTileFeature.types,o5=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function L3(K,F,ae,we,je,Qe,at,Et,Ut,ir,Er,Ir,nn){const vn=Et?Math.min(oy,Math.round(Et[0])):0,Cn=Et?Math.min(oy,Math.round(Et[1])):0;K.emplaceBack(F,ae,Math.round(32*we),Math.round(32*je),Qe,at,(vn<<1)+(Ut?1:0),Cn,16*ir,16*Er,256*Ir,256*nn)}function sy(K,F,ae){K.emplaceBack(F.x,F.y,ae),K.emplaceBack(F.x,F.y,ae),K.emplaceBack(F.x,F.y,ae),K.emplaceBack(F.x,F.y,ae)}function m8(K){for(const F of K.sections)if(Ls(F.text))return!0;return!1}class xh{constructor(F){this.layoutVertexArray=new ft,this.indexArray=new hr,this.programConfigurations=F,this.segments=new Mn,this.dynamicLayoutVertexArray=new Lt,this.opacityVertexArray=new Dt,this.hasVisibleVertices=!1,this.placedSymbolArray=new jo}isEmpty(){return this.layoutVertexArray.length===0&&this.indexArray.length===0&&this.dynamicLayoutVertexArray.length===0&&this.opacityVertexArray.length===0}upload(F,ae,we,je){this.isEmpty()||(we&&(this.layoutVertexBuffer=F.createVertexBuffer(this.layoutVertexArray,ey.members),this.indexBuffer=F.createIndexBuffer(this.indexArray,ae),this.dynamicLayoutVertexBuffer=F.createVertexBuffer(this.dynamicLayoutVertexArray,I_.members,!0),this.opacityVertexBuffer=F.createVertexBuffer(this.opacityVertexArray,o5,!0),this.opacityVertexBuffer.itemSize=1),(we||je)&&this.programConfigurations.upload(F))}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())}}si("SymbolBuffers",xh);class B_{constructor(F,ae,we){this.layoutVertexArray=new F,this.layoutAttributes=ae,this.indexArray=new we,this.segments=new Mn,this.collisionVertexArray=new dr}upload(F){this.layoutVertexBuffer=F.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=F.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=F.createVertexBuffer(this.collisionVertexArray,D_.members,!0)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())}}si("CollisionBuffers",B_);class c1{constructor(F){this.collisionBoxArray=F.collisionBoxArray,this.zoom=F.zoom,this.overscaling=F.overscaling,this.layers=F.layers,this.layerIds=this.layers.map(at=>at.id),this.index=F.index,this.pixelRatio=F.pixelRatio,this.sourceLayerIndex=F.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=Ea([]),this.placementViewportMatrix=Ea([]);const ae=this.layers[0]._unevaluatedLayout._values;this.textSizeData=Mk(this.zoom,ae["text-size"]),this.iconSizeData=Mk(this.zoom,ae["icon-size"]);const we=this.layers[0].layout,je=we.get("symbol-sort-key"),Qe=we.get("symbol-z-order");this.canOverlap=i5(we,"text-overlap","text-allow-overlap")!=="never"||i5(we,"icon-overlap","icon-allow-overlap")!=="never"||we.get("text-ignore-placement")||we.get("icon-ignore-placement"),this.sortFeaturesByKey=Qe!=="viewport-y"&&!je.isConstant(),this.sortFeaturesByY=(Qe==="viewport-y"||Qe==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,we.get("symbol-placement")==="point"&&(this.writingModes=we.get("text-writing-mode").map(at=>t.ah[at])),this.stateDependentLayerIds=this.layers.filter(at=>at.isStateDependent()).map(at=>at.id),this.sourceID=F.sourceID}createArrays(){this.text=new xh(new Yl(this.layers,this.zoom,F=>/^text/.test(F))),this.icon=new xh(new Yl(this.layers,this.zoom,F=>/^icon/.test(F))),this.glyphOffsetArray=new sl,this.lineVertexArray=new ll,this.symbolInstances=new us,this.textAnchorOffsets=new vl}calculateGlyphDependencies(F,ae,we,je,Qe){for(let at=0;at<F.length;at++)if(ae[F.charCodeAt(at)]=!0,(we||je)&&Qe){const Et=Pf[F.charAt(at)];Et&&(ae[Et.charCodeAt(0)]=!0)}}populate(F,ae,we){const je=this.layers[0],Qe=je.layout,at=Qe.get("text-font"),Et=Qe.get("text-field"),Ut=Qe.get("icon-image"),ir=(Et.value.kind!=="constant"||Et.value.value instanceof Ln&&!Et.value.value.isEmpty()||Et.value.value.toString().length>0)&&(at.value.kind!=="constant"||at.value.value.length>0),Er=Ut.value.kind!=="constant"||!!Ut.value.value||Object.keys(Ut.parameters).length>0,Ir=Qe.get("symbol-sort-key");if(this.features=[],!ir&&!Er)return;const nn=ae.iconDependencies,vn=ae.glyphDependencies,Cn=ae.availableImages,jn=new Cl(this.zoom);for(const{feature:aa,id:Oa,index:Pi,sourceLayerIndex:oi}of F){const Ti=je._featureFilter.needGeometry,ao=kr(aa,Ti);if(!je._featureFilter.filter(jn,ao,we))continue;let Lo,cs;if(Ti||(ao.geometry=St(aa)),ir){const xs=je.getValueAndResolveTokens("text-field",ao,we,Cn),ss=Ln.factory(xs),Xs=this.hasRTLText=this.hasRTLText||m8(ss);(!Xs||Wl.getRTLTextPluginStatus()==="unavailable"||Xs&&Wl.isParsed())&&(Lo=ry(ss,je,ao))}if(Er){const xs=je.getValueAndResolveTokens("icon-image",ao,we,Cn);cs=xs instanceof Ia?xs:Ia.fromString(xs)}if(!Lo&&!cs)continue;const Al=this.sortFeaturesByKey?Ir.evaluate(ao,{},we):void 0;if(this.features.push({id:Oa,text:Lo,icon:cs,index:Pi,sourceLayerIndex:oi,geometry:ao.geometry,properties:aa.properties,type:p8[aa.type],sortKey:Al}),cs&&(nn[cs.name]=!0),Lo){const xs=at.evaluate(ao,{},we).join(","),ss=Qe.get("text-rotation-alignment")!=="viewport"&&Qe.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(t.ah.vertical)>=0;for(const Xs of Lo.sections)if(Xs.image)nn[Xs.image.name]=!0;else{const Ns=gs(Lo.toString()),Ds=Xs.fontStack||xs,xo=vn[Ds]=vn[Ds]||{};this.calculateGlyphDependencies(Xs.text,xo,ss,this.allowVerticalPlacement,Ns)}}}Qe.get("symbol-placement")==="line"&&(this.features=(function(aa){const Oa={},Pi={},oi=[];let Ti=0;function ao(xs){oi.push(aa[xs]),Ti++}function Lo(xs,ss,Xs){const Ns=Pi[xs];return delete Pi[xs],Pi[ss]=Ns,oi[Ns].geometry[0].pop(),oi[Ns].geometry[0]=oi[Ns].geometry[0].concat(Xs[0]),Ns}function cs(xs,ss,Xs){const Ns=Oa[ss];return delete Oa[ss],Oa[xs]=Ns,oi[Ns].geometry[0].shift(),oi[Ns].geometry[0]=Xs[0].concat(oi[Ns].geometry[0]),Ns}function Al(xs,ss,Xs){const Ns=Xs?ss[0][ss[0].length-1]:ss[0][0];return`${xs}:${Ns.x}:${Ns.y}`}for(let xs=0;xs<aa.length;xs++){const ss=aa[xs],Xs=ss.geometry,Ns=ss.text?ss.text.toString():null;if(!Ns){ao(xs);continue}const Ds=Al(Ns,Xs),xo=Al(Ns,Xs,!0);if(Ds in Pi&&xo in Oa&&Pi[Ds]!==Oa[xo]){const tl=cs(Ds,xo,Xs),Ws=Lo(Ds,xo,oi[tl].geometry);delete Oa[Ds],delete Pi[xo],Pi[Al(Ns,oi[Ws].geometry,!0)]=Ws,oi[tl].geometry=null}else Ds in Pi?Lo(Ds,xo,Xs):xo in Oa?cs(Ds,xo,Xs):(ao(xs),Oa[Ds]=Ti-1,Pi[xo]=Ti-1)}return oi.filter(xs=>xs.geometry)})(this.features)),this.sortFeaturesByKey&&this.features.sort((aa,Oa)=>aa.sortKey-Oa.sortKey)}update(F,ae,we){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(F,ae,this.layers,we),this.icon.programConfigurations.updatePaintArrays(F,ae,this.layers,we))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(F){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(F),this.iconCollisionBox.upload(F)),this.text.upload(F,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(F,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(F,ae){const we=this.lineVertexArray.length;if(F.segment!==void 0){let je=F.dist(ae[F.segment+1]),Qe=F.dist(ae[F.segment]);const at={};for(let Et=F.segment+1;Et<ae.length;Et++)at[Et]={x:ae[Et].x,y:ae[Et].y,tileUnitDistanceFromAnchor:je},Et<ae.length-1&&(je+=ae[Et+1].dist(ae[Et]));for(let Et=F.segment||0;Et>=0;Et--)at[Et]={x:ae[Et].x,y:ae[Et].y,tileUnitDistanceFromAnchor:Qe},Et>0&&(Qe+=ae[Et-1].dist(ae[Et]));for(let Et=0;Et<ae.length;Et++){const Ut=at[Et];this.lineVertexArray.emplaceBack(Ut.x,Ut.y,Ut.tileUnitDistanceFromAnchor)}}return{lineStartIndex:we,lineLength:this.lineVertexArray.length-we}}addSymbols(F,ae,we,je,Qe,at,Et,Ut,ir,Er,Ir,nn){const vn=F.indexArray,Cn=F.layoutVertexArray,jn=F.segments.prepareSegment(4*ae.length,Cn,vn,this.canOverlap?at.sortKey:void 0),aa=this.glyphOffsetArray.length,Oa=jn.vertexLength,Pi=this.allowVerticalPlacement&&Et===t.ah.vertical?Math.PI/2:0,oi=at.text&&at.text.sections;for(let Ti=0;Ti<ae.length;Ti++){const{tl:ao,tr:Lo,bl:cs,br:Al,tex:xs,pixelOffsetTL:ss,pixelOffsetBR:Xs,minFontScaleX:Ns,minFontScaleY:Ds,glyphOffset:xo,isSDF:tl,sectionIndex:Ws}=ae[Ti],Vl=jn.vertexLength,yf=xo[1];L3(Cn,Ut.x,Ut.y,ao.x,yf+ao.y,xs.x,xs.y,we,tl,ss.x,ss.y,Ns,Ds),L3(Cn,Ut.x,Ut.y,Lo.x,yf+Lo.y,xs.x+xs.w,xs.y,we,tl,Xs.x,ss.y,Ns,Ds),L3(Cn,Ut.x,Ut.y,cs.x,yf+cs.y,xs.x,xs.y+xs.h,we,tl,ss.x,Xs.y,Ns,Ds),L3(Cn,Ut.x,Ut.y,Al.x,yf+Al.y,xs.x+xs.w,xs.y+xs.h,we,tl,Xs.x,Xs.y,Ns,Ds),sy(F.dynamicLayoutVertexArray,Ut,Pi),vn.emplaceBack(Vl,Vl+1,Vl+2),vn.emplaceBack(Vl+1,Vl+2,Vl+3),jn.vertexLength+=4,jn.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(xo[0]),Ti!==ae.length-1&&Ws===ae[Ti+1].sectionIndex||F.programConfigurations.populatePaintArrays(Cn.length,at,at.index,{},nn,oi&&oi[Ws])}F.placedSymbolArray.emplaceBack(Ut.x,Ut.y,aa,this.glyphOffsetArray.length-aa,Oa,ir,Er,Ut.segment,we?we[0]:0,we?we[1]:0,je[0],je[1],Et,0,!1,0,Ir)}_addCollisionDebugVertex(F,ae,we,je,Qe,at){return ae.emplaceBack(0,0),F.emplaceBack(we.x,we.y,je,Qe,Math.round(at.x),Math.round(at.y))}addCollisionDebugVertices(F,ae,we,je,Qe,at,Et){const Ut=Qe.segments.prepareSegment(4,Qe.layoutVertexArray,Qe.indexArray),ir=Ut.vertexLength,Er=Qe.layoutVertexArray,Ir=Qe.collisionVertexArray,nn=Et.anchorX,vn=Et.anchorY;this._addCollisionDebugVertex(Er,Ir,at,nn,vn,new s(F,ae)),this._addCollisionDebugVertex(Er,Ir,at,nn,vn,new s(we,ae)),this._addCollisionDebugVertex(Er,Ir,at,nn,vn,new s(we,je)),this._addCollisionDebugVertex(Er,Ir,at,nn,vn,new s(F,je)),Ut.vertexLength+=4;const Cn=Qe.indexArray;Cn.emplaceBack(ir,ir+1),Cn.emplaceBack(ir+1,ir+2),Cn.emplaceBack(ir+2,ir+3),Cn.emplaceBack(ir+3,ir),Ut.primitiveLength+=4}addDebugCollisionBoxes(F,ae,we,je){for(let Qe=F;Qe<ae;Qe++){const at=this.collisionBoxArray.get(Qe);this.addCollisionDebugVertices(at.x1,at.y1,at.x2,at.y2,je?this.textCollisionBox:this.iconCollisionBox,at.anchorPoint,we)}}generateCollisionDebugBuffers(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new B_(qt,s1.members,Pr),this.iconCollisionBox=new B_(qt,s1.members,Pr);for(let F=0;F<this.symbolInstances.length;F++){const ae=this.symbolInstances.get(F);this.addDebugCollisionBoxes(ae.textBoxStartIndex,ae.textBoxEndIndex,ae,!0),this.addDebugCollisionBoxes(ae.verticalTextBoxStartIndex,ae.verticalTextBoxEndIndex,ae,!0),this.addDebugCollisionBoxes(ae.iconBoxStartIndex,ae.iconBoxEndIndex,ae,!1),this.addDebugCollisionBoxes(ae.verticalIconBoxStartIndex,ae.verticalIconBoxEndIndex,ae,!1)}}_deserializeCollisionBoxesForSymbol(F,ae,we,je,Qe,at,Et,Ut,ir){const Er={};for(let Ir=ae;Ir<we;Ir++){const nn=F.get(Ir);Er.textBox={x1:nn.x1,y1:nn.y1,x2:nn.x2,y2:nn.y2,anchorPointX:nn.anchorPointX,anchorPointY:nn.anchorPointY},Er.textFeatureIndex=nn.featureIndex;break}for(let Ir=je;Ir<Qe;Ir++){const nn=F.get(Ir);Er.verticalTextBox={x1:nn.x1,y1:nn.y1,x2:nn.x2,y2:nn.y2,anchorPointX:nn.anchorPointX,anchorPointY:nn.anchorPointY},Er.verticalTextFeatureIndex=nn.featureIndex;break}for(let Ir=at;Ir<Et;Ir++){const nn=F.get(Ir);Er.iconBox={x1:nn.x1,y1:nn.y1,x2:nn.x2,y2:nn.y2,anchorPointX:nn.anchorPointX,anchorPointY:nn.anchorPointY},Er.iconFeatureIndex=nn.featureIndex;break}for(let Ir=Ut;Ir<ir;Ir++){const nn=F.get(Ir);Er.verticalIconBox={x1:nn.x1,y1:nn.y1,x2:nn.x2,y2:nn.y2,anchorPointX:nn.anchorPointX,anchorPointY:nn.anchorPointY},Er.verticalIconFeatureIndex=nn.featureIndex;break}return Er}deserializeCollisionBoxes(F){this.collisionArrays=[];for(let ae=0;ae<this.symbolInstances.length;ae++){const we=this.symbolInstances.get(ae);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(F,we.textBoxStartIndex,we.textBoxEndIndex,we.verticalTextBoxStartIndex,we.verticalTextBoxEndIndex,we.iconBoxStartIndex,we.iconBoxEndIndex,we.verticalIconBoxStartIndex,we.verticalIconBoxEndIndex))}}hasTextData(){return this.text.segments.get().length>0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(F,ae){const we=F.placedSymbolArray.get(ae),je=we.vertexStartIndex+4*we.numGlyphs;for(let Qe=we.vertexStartIndex;Qe<je;Qe+=4)F.indexArray.emplaceBack(Qe,Qe+1,Qe+2),F.indexArray.emplaceBack(Qe+1,Qe+2,Qe+3)}getSortedSymbolIndexes(F){if(this.sortedAngle===F&&this.symbolInstanceIndexes!==void 0)return this.symbolInstanceIndexes;const ae=Math.sin(F),we=Math.cos(F),je=[],Qe=[],at=[];for(let Et=0;Et<this.symbolInstances.length;++Et){at.push(Et);const Ut=this.symbolInstances.get(Et);je.push(0|Math.round(ae*Ut.anchorX+we*Ut.anchorY)),Qe.push(Ut.featureIndex)}return at.sort((Et,Ut)=>je[Et]-je[Ut]||Qe[Ut]-Qe[Et]),at}addToSortKeyRanges(F,ae){const we=this.sortKeyRanges[this.sortKeyRanges.length-1];we&&we.sortKey===ae?we.symbolInstanceEnd=F+1:this.sortKeyRanges.push({sortKey:ae,symbolInstanceStart:F,symbolInstanceEnd:F+1})}sortFeatures(F){if(this.sortFeaturesByY&&this.sortedAngle!==F&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(F),this.sortedAngle=F,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(const ae of this.symbolInstanceIndexes){const we=this.symbolInstances.get(ae);this.featureSortOrder.push(we.featureIndex),[we.rightJustifiedTextSymbolIndex,we.centerJustifiedTextSymbolIndex,we.leftJustifiedTextSymbolIndex].forEach((je,Qe,at)=>{je>=0&&at.indexOf(je)===Qe&&this.addIndicesForPlacedSymbol(this.text,je)}),we.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,we.verticalPlacedTextSymbolIndex),we.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,we.placedIconSymbolIndex),we.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,we.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let Hb,Gb;si("SymbolBucket",c1,{omit:["layers","collisionBoxArray","features","compareText"]}),c1.MAX_GLYPHS=65535,c1.addDynamicAttributes=sy;var s5={get paint(){return Gb=Gb||new Ze({"icon-opacity":new _s(ue.paint_symbol["icon-opacity"]),"icon-color":new _s(ue.paint_symbol["icon-color"]),"icon-halo-color":new _s(ue.paint_symbol["icon-halo-color"]),"icon-halo-width":new _s(ue.paint_symbol["icon-halo-width"]),"icon-halo-blur":new _s(ue.paint_symbol["icon-halo-blur"]),"icon-translate":new os(ue.paint_symbol["icon-translate"]),"icon-translate-anchor":new os(ue.paint_symbol["icon-translate-anchor"]),"text-opacity":new _s(ue.paint_symbol["text-opacity"]),"text-color":new _s(ue.paint_symbol["text-color"],{runtimeType:fr,getOverride:K=>K.textColor,hasOverride:K=>!!K.textColor}),"text-halo-color":new _s(ue.paint_symbol["text-halo-color"]),"text-halo-width":new _s(ue.paint_symbol["text-halo-width"]),"text-halo-blur":new _s(ue.paint_symbol["text-halo-blur"]),"text-translate":new os(ue.paint_symbol["text-translate"]),"text-translate-anchor":new os(ue.paint_symbol["text-translate-anchor"])})},get layout(){return Hb=Hb||new Ze({"symbol-placement":new os(ue.layout_symbol["symbol-placement"]),"symbol-spacing":new os(ue.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new os(ue.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new _s(ue.layout_symbol["symbol-sort-key"]),"symbol-z-order":new os(ue.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new os(ue.layout_symbol["icon-allow-overlap"]),"icon-overlap":new os(ue.layout_symbol["icon-overlap"]),"icon-ignore-placement":new os(ue.layout_symbol["icon-ignore-placement"]),"icon-optional":new os(ue.layout_symbol["icon-optional"]),"icon-rotation-alignment":new os(ue.layout_symbol["icon-rotation-alignment"]),"icon-size":new _s(ue.layout_symbol["icon-size"]),"icon-text-fit":new os(ue.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new os(ue.layout_symbol["icon-text-fit-padding"]),"icon-image":new _s(ue.layout_symbol["icon-image"]),"icon-rotate":new _s(ue.layout_symbol["icon-rotate"]),"icon-padding":new _s(ue.layout_symbol["icon-padding"]),"icon-keep-upright":new os(ue.layout_symbol["icon-keep-upright"]),"icon-offset":new _s(ue.layout_symbol["icon-offset"]),"icon-anchor":new _s(ue.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new os(ue.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new os(ue.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new os(ue.layout_symbol["text-rotation-alignment"]),"text-field":new _s(ue.layout_symbol["text-field"]),"text-font":new _s(ue.layout_symbol["text-font"]),"text-size":new _s(ue.layout_symbol["text-size"]),"text-max-width":new _s(ue.layout_symbol["text-max-width"]),"text-line-height":new os(ue.layout_symbol["text-line-height"]),"text-letter-spacing":new _s(ue.layout_symbol["text-letter-spacing"]),"text-justify":new _s(ue.layout_symbol["text-justify"]),"text-radial-offset":new _s(ue.layout_symbol["text-radial-offset"]),"text-variable-anchor":new os(ue.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new _s(ue.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new _s(ue.layout_symbol["text-anchor"]),"text-max-angle":new os(ue.layout_symbol["text-max-angle"]),"text-writing-mode":new os(ue.layout_symbol["text-writing-mode"]),"text-rotate":new _s(ue.layout_symbol["text-rotate"]),"text-padding":new os(ue.layout_symbol["text-padding"]),"text-keep-upright":new os(ue.layout_symbol["text-keep-upright"]),"text-transform":new _s(ue.layout_symbol["text-transform"]),"text-offset":new _s(ue.layout_symbol["text-offset"]),"text-allow-overlap":new os(ue.layout_symbol["text-allow-overlap"]),"text-overlap":new os(ue.layout_symbol["text-overlap"]),"text-ignore-placement":new os(ue.layout_symbol["text-ignore-placement"]),"text-optional":new os(ue.layout_symbol["text-optional"])})}};class j_{constructor(F){if(F.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=F.property.overrides?F.property.overrides.runtimeType:wt,this.defaultValue=F}evaluate(F){if(F.formattedSection){const ae=this.defaultValue.property.overrides;if(ae&&ae.hasOverride(F.formattedSection))return ae.getOverride(F.formattedSection)}return F.feature&&F.featureState?this.defaultValue.evaluate(F.feature,F.featureState):this.defaultValue.property.specification.default}eachChild(F){this.defaultValue.isConstant()||F(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}si("FormatSectionOverride",j_,{omit:["defaultValue"]});class R3 extends fe{constructor(F){super(F,s5)}recalculate(F,ae){if(super.recalculate(F,ae),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout._values["icon-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout._values["text-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")==="map"?"map":"viewport"),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){const we=this.layout.get("text-writing-mode");if(we){const je=[];for(const Qe of we)je.indexOf(Qe)<0&&je.push(Qe);this.layout._values["text-writing-mode"]=je}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(F,ae,we,je){const Qe=this.layout.get(F).evaluate(ae,{},we,je),at=this._unevaluatedLayout._values[F];return at.isDataDriven()||Qf(at.value)||!Qe?Qe:(function(Et,Ut){return Ut.replace(/{([^{}]+)}/g,(ir,Er)=>Et&&Er in Et?String(Et[Er]):"")})(ae.properties,Qe)}createBucket(F){return new c1(F)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(const F of s5.paint.overridableProperties){if(!R3.hasPaintOverride(this.layout,F))continue;const ae=this.paint.get(F),we=new j_(ae),je=new Gc(we,ae.property.specification);let Qe=null;Qe=ae.value.kind==="constant"||ae.value.kind==="source"?new Ff("source",je):new Sc("composite",je,ae.value.zoomStops),this.paint._values[F]=new ju(ae.property,Qe,ae.parameters)}}_handleOverridablePaintPropertyUpdate(F,ae,we){return!(!this.layout||ae.isDataDriven()||we.isDataDriven())&&R3.hasPaintOverride(this.layout,F)}static hasPaintOverride(F,ae){const we=F.get("text-field"),je=s5.paint.properties[ae];let Qe=!1;const at=Et=>{for(const Ut of Et)if(je.overrides&&je.overrides.hasOverride(Ut))return void(Qe=!0)};if(we.value.kind==="constant"&&we.value.value instanceof Ln)at(we.value.value.sections);else if(we.value.kind==="source"){const Et=ir=>{Qe||(ir instanceof Yi&&fa(ir.value)===fn?at(ir.value.sections):ir instanceof xl?at(ir.sections):ir.eachChild(Et))},Ut=we.value;Ut._styleExpression&&Et(Ut._styleExpression.expression)}return Qe}}let l5;var Ck={get paint(){return l5=l5||new Ze({"background-color":new os(ue.paint_background["background-color"]),"background-pattern":new sf(ue.paint_background["background-pattern"]),"background-opacity":new os(ue.paint_background["background-opacity"])})}};class Xb extends fe{constructor(F){super(F,Ck)}}let I3;var u5={get paint(){return I3=I3||new Ze({"raster-opacity":new os(ue.paint_raster["raster-opacity"]),"raster-hue-rotate":new os(ue.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new os(ue.paint_raster["raster-brightness-min"]),"raster-brightness-max":new os(ue.paint_raster["raster-brightness-max"]),"raster-saturation":new os(ue.paint_raster["raster-saturation"]),"raster-contrast":new os(ue.paint_raster["raster-contrast"]),"raster-resampling":new os(ue.paint_raster["raster-resampling"]),"raster-fade-duration":new os(ue.paint_raster["raster-fade-duration"])})}};class g8 extends fe{constructor(F){super(F,u5)}}class kk extends fe{constructor(F){super(F,{}),this.onAdd=ae=>{this.implementation.onAdd&&this.implementation.onAdd(ae,ae.painter.context.gl)},this.onRemove=ae=>{this.implementation.onRemove&&this.implementation.onRemove(ae,ae.painter.context.gl)},this.implementation=F}is3D(){return this.implementation.renderingMode==="3d"}hasOffscreenPass(){return this.implementation.prerender!==void 0}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw new Error("Custom layers cannot be serialized")}}class Wb{constructor(F){this._methodToThrottle=F,this._triggered=!1,typeof MessageChannel<"u"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()})}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(()=>{this._triggered=!1,this._methodToThrottle()},0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}const c5=63710088e-1;class x0{constructor(F,ae){if(isNaN(F)||isNaN(ae))throw new Error(`Invalid LngLat object: (${F}, ${ae})`);if(this.lng=+F,this.lat=+ae,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new x0(M(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(F){const ae=Math.PI/180,we=this.lat*ae,je=F.lat*ae,Qe=Math.sin(we)*Math.sin(je)+Math.cos(we)*Math.cos(je)*Math.cos((F.lng-this.lng)*ae);return c5*Math.acos(Math.min(Qe,1))}static convert(F){if(F instanceof x0)return F;if(Array.isArray(F)&&(F.length===2||F.length===3))return new x0(Number(F[0]),Number(F[1]));if(!Array.isArray(F)&&typeof F=="object"&&F!==null)return new x0(Number("lng"in F?F.lng:F.lon),Number(F.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>]")}}const Pk=2*Math.PI*c5;function D3(K){return Pk*Math.cos(K*Math.PI/180)}function O3(K){return(180+K)/360}function Lk(K){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+K*Math.PI/360)))/360}function pm(K,F){return K/D3(F)}function f5(K){return 360/Math.PI*Math.atan(Math.exp((180-360*K)*Math.PI/180))-90}class Yb{constructor(F,ae,we=0){this.x=+F,this.y=+ae,this.z=+we}static fromLngLat(F,ae=0){const we=x0.convert(F);return new Yb(O3(we.lng),Lk(we.lat),pm(ae,we.lat))}toLngLat(){return new x0(360*this.x-180,f5(this.y))}toAltitude(){return this.z*D3(f5(this.y))}meterInMercatorCoordinateUnits(){return 1/Pk*(F=f5(this.y),1/Math.cos(F*Math.PI/180));var F}}function Rk(K,F,ae){var we=2*Math.PI*6378137/256/Math.pow(2,ae);return[K*we-2*Math.PI*6378137/2,F*we-2*Math.PI*6378137/2]}class h5{constructor(F,ae,we){if(!(function(je,Qe,at){return!(je<0||je>25||at<0||at>=Math.pow(2,je)||Qe<0||Qe>=Math.pow(2,je))})(F,ae,we))throw new Error(`x=${ae}, y=${we}, z=${F} outside of bounds. 0<=x<${Math.pow(2,F)}, 0<=y<${Math.pow(2,F)} 0<=z<=25 `);this.z=F,this.x=ae,this.y=we,this.key=U_(0,F,F,ae,we)}equals(F){return this.z===F.z&&this.x===F.x&&this.y===F.y}url(F,ae,we){const je=(at=this.y,Et=this.z,Ut=Rk(256*(Qe=this.x),256*(at=Math.pow(2,Et)-at-1),Et),ir=Rk(256*(Qe+1),256*(at+1),Et),Ut[0]+","+Ut[1]+","+ir[0]+","+ir[1]);var Qe,at,Et,Ut,ir;const Er=(function(Ir,nn,vn){let Cn,jn="";for(let aa=Ir;aa>0;aa--)Cn=1<<aa-1,jn+=(nn&Cn?1:0)+(vn&Cn?2:0);return jn})(this.z,this.x,this.y);return F[(this.x+this.y)%F.length].replace(/{prefix}/g,(this.x%16).toString(16)+(this.y%16).toString(16)).replace(/{z}/g,String(this.z)).replace(/{x}/g,String(this.x)).replace(/{y}/g,String(we==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace(/{ratio}/g,ae>1?"@2x":"").replace(/{quadkey}/g,Er).replace(/{bbox-epsg-3857}/g,je)}isChildOf(F){const ae=this.z-F.z;return ae>0&&F.x===this.x>>ae&&F.y===this.y>>ae}getTilePoint(F){const ae=Math.pow(2,this.z);return new s((F.x*ae-this.x)*su,(F.y*ae-this.y)*su)}toString(){return`${this.z}/${this.x}/${this.y}`}}class Ik{constructor(F,ae){this.wrap=F,this.canonical=ae,this.key=U_(F,ae.z,ae.z,ae.x,ae.y)}}class tm{constructor(F,ae,we,je,Qe){if(F<we)throw new Error(`overscaledZ should be >= z; overscaledZ = ${F}; z = ${we}`);this.overscaledZ=F,this.wrap=ae,this.canonical=new h5(we,+je,+Qe),this.key=U_(ae,F,we,je,Qe)}clone(){return new tm(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(F){return this.overscaledZ===F.overscaledZ&&this.wrap===F.wrap&&this.canonical.equals(F.canonical)}scaledTo(F){if(F>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${F}; overscaledZ = ${this.overscaledZ}`);const ae=this.canonical.z-F;return F>this.canonical.z?new tm(F,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new tm(F,this.wrap,F,this.canonical.x>>ae,this.canonical.y>>ae)}calculateScaledKey(F,ae){if(F>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${F}; overscaledZ = ${this.overscaledZ}`);const we=this.canonical.z-F;return F>this.canonical.z?U_(this.wrap*+ae,F,this.canonical.z,this.canonical.x,this.canonical.y):U_(this.wrap*+ae,F,F,this.canonical.x>>we,this.canonical.y>>we)}isChildOf(F){if(F.wrap!==this.wrap)return!1;const ae=this.canonical.z-F.canonical.z;return F.overscaledZ===0||F.overscaledZ<this.overscaledZ&&F.canonical.x===this.canonical.x>>ae&&F.canonical.y===this.canonical.y>>ae}children(F){if(this.overscaledZ>=F)return[new tm(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];const ae=this.canonical.z+1,we=2*this.canonical.x,je=2*this.canonical.y;return[new tm(ae,this.wrap,ae,we,je),new tm(ae,this.wrap,ae,we+1,je),new tm(ae,this.wrap,ae,we,je+1),new tm(ae,this.wrap,ae,we+1,je+1)]}isLessThan(F){return this.wrap<F.wrap||!(this.wrap>F.wrap)&&(this.overscaledZ<F.overscaledZ||!(this.overscaledZ>F.overscaledZ)&&(this.canonical.x<F.canonical.x||!(this.canonical.x>F.canonical.x)&&this.canonical.y<F.canonical.y))}wrapped(){return new tm(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)}unwrapTo(F){return new tm(this.overscaledZ,F,this.canonical.z,this.canonical.x,this.canonical.y)}overscaleFactor(){return Math.pow(2,this.overscaledZ-this.canonical.z)}toUnwrapped(){return new Ik(this.wrap,this.canonical)}toString(){return`${this.overscaledZ}/${this.canonical.x}/${this.canonical.y}`}getTilePoint(F){return this.canonical.getTilePoint(new Yb(F.x-this.wrap,F.y))}}function U_(K,F,ae,we,je){(K*=2)<0&&(K=-1*K-1);const Qe=1<<ae;return(Qe*Qe*K+Qe*je+we).toString(36)+ae.toString(36)+F.toString(36)}si("CanonicalTileID",h5),si("OverscaledTileID",tm,{omit:["posMatrix"]});class f1{constructor(F,ae,we,je=1,Qe=1,at=1,Et=0){if(this.uid=F,ae.height!==ae.width)throw new RangeError("DEM tiles must be square");if(we&&!["mapbox","terrarium","custom"].includes(we))return void x(`"${we}" is not a valid encoding type. Valid types include "mapbox", "terrarium" and "custom".`);this.stride=ae.height;const Ut=this.dim=ae.height-2;switch(this.data=new Uint32Array(ae.data.buffer),we){case"terrarium":this.redFactor=256,this.greenFactor=1,this.blueFactor=1/256,this.baseShift=32768;break;case"custom":this.redFactor=je,this.greenFactor=Qe,this.blueFactor=at,this.baseShift=Et;break;default:this.redFactor=6553.6,this.greenFactor=25.6,this.blueFactor=.1,this.baseShift=1e4}for(let ir=0;ir<Ut;ir++)this.data[this._idx(-1,ir)]=this.data[this._idx(0,ir)],this.data[this._idx(Ut,ir)]=this.data[this._idx(Ut-1,ir)],this.data[this._idx(ir,-1)]=this.data[this._idx(ir,0)],this.data[this._idx(ir,Ut)]=this.data[this._idx(ir,Ut-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(Ut,-1)]=this.data[this._idx(Ut-1,0)],this.data[this._idx(-1,Ut)]=this.data[this._idx(0,Ut-1)],this.data[this._idx(Ut,Ut)]=this.data[this._idx(Ut-1,Ut-1)],this.min=Number.MAX_SAFE_INTEGER,this.max=Number.MIN_SAFE_INTEGER;for(let ir=0;ir<Ut;ir++)for(let Er=0;Er<Ut;Er++){const Ir=this.get(ir,Er);Ir>this.max&&(this.max=Ir),Ir<this.min&&(this.min=Ir)}}get(F,ae){const we=new Uint8Array(this.data.buffer),je=4*this._idx(F,ae);return this.unpack(we[je],we[je+1],we[je+2])}getUnpackVector(){return[this.redFactor,this.greenFactor,this.blueFactor,this.baseShift]}_idx(F,ae){if(F<-1||F>=this.dim+1||ae<-1||ae>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(ae+1)*this.stride+(F+1)}unpack(F,ae,we){return F*this.redFactor+ae*this.greenFactor+we*this.blueFactor-this.baseShift}getPixels(){return new wl({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(F,ae,we){if(this.dim!==F.dim)throw new Error("dem dimension mismatch");let je=ae*this.dim,Qe=ae*this.dim+this.dim,at=we*this.dim,Et=we*this.dim+this.dim;switch(ae){case-1:je=Qe-1;break;case 1:Qe=je+1}switch(we){case-1:at=Et-1;break;case 1:Et=at+1}const Ut=-ae*this.dim,ir=-we*this.dim;for(let Er=at;Er<Et;Er++)for(let Ir=je;Ir<Qe;Ir++)this.data[this._idx(Ir,Er)]=F.data[this._idx(Ir+Ut,Er+ir)]}}si("DEMData",f1);class Dk{constructor(F){this._stringToNumber={},this._numberToString=[];for(let ae=0;ae<F.length;ae++){const we=F[ae];this._stringToNumber[we]=ae,this._numberToString[ae]=we}}encode(F){return this._stringToNumber[F]}decode(F){if(F>=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${F} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[F]}}class Ok{constructor(F,ae,we,je,Qe){this.type="Feature",this._vectorTileFeature=F,F._z=ae,F._x=we,F._y=je,this.properties=F.properties,this.id=Qe}get geometry(){return this._geometry===void 0&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry}set geometry(F){this._geometry=F}toJSON(){const F={geometry:this.geometry};for(const ae in this)ae!=="_geometry"&&ae!=="_vectorTileFeature"&&(F[ae]=this[ae]);return F}}class zk{constructor(F,ae){this.tileID=F,this.x=F.canonical.x,this.y=F.canonical.y,this.z=F.canonical.z,this.grid=new Gi(su,16,0),this.grid3D=new Gi(su,16,0),this.featureIndexArray=new vu,this.promoteId=ae}insert(F,ae,we,je,Qe,at){const Et=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(we,je,Qe);const Ut=at?this.grid3D:this.grid;for(let ir=0;ir<ae.length;ir++){const Er=ae[ir],Ir=[1/0,1/0,-1/0,-1/0];for(let nn=0;nn<Er.length;nn++){const vn=Er[nn];Ir[0]=Math.min(Ir[0],vn.x),Ir[1]=Math.min(Ir[1],vn.y),Ir[2]=Math.max(Ir[2],vn.x),Ir[3]=Math.max(Ir[3],vn.y)}Ir[0]<su&&Ir[1]<su&&Ir[2]>=0&&Ir[3]>=0&&Ut.insert(Et,Ir[0],Ir[1],Ir[2],Ir[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new Pa.VectorTile(new e5(this.rawTileData)).layers,this.sourceLayerCoder=new Dk(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(F,ae,we,je){this.loadVTLayers();const Qe=F.params||{},at=su/F.tileSize/F.scale,Et=Fh(Qe.filter),Ut=F.queryGeometry,ir=F.queryPadding*at,Er=d5(Ut),Ir=this.grid.query(Er.minX-ir,Er.minY-ir,Er.maxX+ir,Er.maxY+ir),nn=d5(F.cameraQueryGeometry),vn=this.grid3D.query(nn.minX-ir,nn.minY-ir,nn.maxX+ir,nn.maxY+ir,(aa,Oa,Pi,oi)=>(function(Ti,ao,Lo,cs,Al){for(const ss of Ti)if(ao<=ss.x&&Lo<=ss.y&&cs>=ss.x&&Al>=ss.y)return!0;const xs=[new s(ao,Lo),new s(ao,Al),new s(cs,Al),new s(cs,Lo)];if(Ti.length>2){for(const ss of xs)if(di(Ti,ss))return!0}for(let ss=0;ss<Ti.length-1;ss++)if(Na(Ti[ss],Ti[ss+1],xs))return!0;return!1})(F.cameraQueryGeometry,aa-ir,Oa-ir,Pi+ir,oi+ir));for(const aa of vn)Ir.push(aa);Ir.sort(Fk);const Cn={};let jn;for(let aa=0;aa<Ir.length;aa++){const Oa=Ir[aa];if(Oa===jn)continue;jn=Oa;const Pi=this.featureIndexArray.get(Oa);let oi=null;this.loadMatchingFeature(Cn,Pi.bucketIndex,Pi.sourceLayerIndex,Pi.featureIndex,Et,Qe.layers,Qe.availableImages,ae,we,je,(Ti,ao,Lo)=>(oi||(oi=St(Ti)),ao.queryIntersectsFeature(Ut,Ti,Lo,oi,this.z,F.transform,at,F.pixelPosMatrix)))}return Cn}loadMatchingFeature(F,ae,we,je,Qe,at,Et,Ut,ir,Er,Ir){const nn=this.bucketLayerIDs[ae];if(at&&!(function(aa,Oa){for(let Pi=0;Pi<aa.length;Pi++)if(Oa.indexOf(aa[Pi])>=0)return!0;return!1})(at,nn))return;const vn=this.sourceLayerCoder.decode(we),Cn=this.vtLayers[vn].feature(je);if(Qe.needGeometry){const aa=kr(Cn,!0);if(!Qe.filter(new Cl(this.tileID.overscaledZ),aa,this.tileID.canonical))return}else if(!Qe.filter(new Cl(this.tileID.overscaledZ),Cn))return;const jn=this.getId(Cn,vn);for(let aa=0;aa<nn.length;aa++){const Oa=nn[aa];if(at&&at.indexOf(Oa)<0)continue;const Pi=Ut[Oa];if(!Pi)continue;let oi={};jn&&Er&&(oi=Er.getState(Pi.sourceLayer||"_geojsonTileLayer",jn));const Ti=k({},ir[Oa]);Ti.paint=Nk(Ti.paint,Pi.paint,Cn,oi,Et),Ti.layout=Nk(Ti.layout,Pi.layout,Cn,oi,Et);const ao=!Ir||Ir(Cn,Pi,oi);if(!ao)continue;const Lo=new Ok(Cn,this.z,this.x,this.y,jn);Lo.layer=Ti;let cs=F[Oa];cs===void 0&&(cs=F[Oa]=[]),cs.push({featureIndex:je,feature:Lo,intersectionZ:ao})}}lookupSymbolFeatures(F,ae,we,je,Qe,at,Et,Ut){const ir={};this.loadVTLayers();const Er=Fh(Qe);for(const Ir of F)this.loadMatchingFeature(ir,we,je,Ir,Er,at,Et,Ut,ae);return ir}hasLayer(F){for(const ae of this.bucketLayerIDs)for(const we of ae)if(F===we)return!0;return!1}getId(F,ae){let we=F.id;return this.promoteId&&(we=F.properties[typeof this.promoteId=="string"?this.promoteId:this.promoteId[ae]],typeof we=="boolean"&&(we=Number(we))),we}}function Nk(K,F,ae,we,je){return A(K,(Qe,at)=>{const Et=F instanceof Uf?F.get(at):null;return Et&&Et.evaluate?Et.evaluate(ae,we,je):Et})}function d5(K){let F=1/0,ae=1/0,we=-1/0,je=-1/0;for(const Qe of K)F=Math.min(F,Qe.x),ae=Math.min(ae,Qe.y),we=Math.max(we,Qe.x),je=Math.max(je,Qe.y);return{minX:F,minY:ae,maxX:we,maxY:je}}function Fk(K,F){return F-K}function Bk(K,F,ae,we,je){const Qe=[];for(let at=0;at<K.length;at++){const Et=K[at];let Ut;for(let ir=0;ir<Et.length-1;ir++){let Er=Et[ir],Ir=Et[ir+1];Er.x<F&&Ir.x<F||(Er.x<F?Er=new s(F,Er.y+(F-Er.x)/(Ir.x-Er.x)*(Ir.y-Er.y))._round():Ir.x<F&&(Ir=new s(F,Er.y+(F-Er.x)/(Ir.x-Er.x)*(Ir.y-Er.y))._round()),Er.y<ae&&Ir.y<ae||(Er.y<ae?Er=new s(Er.x+(ae-Er.y)/(Ir.y-Er.y)*(Ir.x-Er.x),ae)._round():Ir.y<ae&&(Ir=new s(Er.x+(ae-Er.y)/(Ir.y-Er.y)*(Ir.x-Er.x),ae)._round()),Er.x>=we&&Ir.x>=we||(Er.x>=we?Er=new s(we,Er.y+(we-Er.x)/(Ir.x-Er.x)*(Ir.y-Er.y))._round():Ir.x>=we&&(Ir=new s(we,Er.y+(we-Er.x)/(Ir.x-Er.x)*(Ir.y-Er.y))._round()),Er.y>=je&&Ir.y>=je||(Er.y>=je?Er=new s(Er.x+(je-Er.y)/(Ir.y-Er.y)*(Ir.x-Er.x),je)._round():Ir.y>=je&&(Ir=new s(Er.x+(je-Er.y)/(Ir.y-Er.y)*(Ir.x-Er.x),je)._round()),Ut&&Er.equals(Ut[Ut.length-1])||(Ut=[Er],Qe.push(Ut)),Ut.push(Ir)))))}}return Qe}si("FeatureIndex",zk,{omit:["rawTileData","sourceLayerCoder"]});class ly extends s{constructor(F,ae,we,je){super(F,ae),this.angle=we,je!==void 0&&(this.segment=je)}clone(){return new ly(this.x,this.y,this.angle,this.segment)}}function jk(K,F,ae,we,je){if(F.segment===void 0||ae===0)return!0;let Qe=F,at=F.segment+1,Et=0;for(;Et>-ae/2;){if(at--,at<0)return!1;Et-=K[at].dist(Qe),Qe=K[at]}Et+=K[at].dist(K[at+1]),at++;const Ut=[];let ir=0;for(;Et<ae/2;){const Er=K[at],Ir=K[at+1];if(!Ir)return!1;let nn=K[at-1].angleTo(Er)-Er.angleTo(Ir);for(nn=Math.abs((nn+3*Math.PI)%(2*Math.PI)-Math.PI),Ut.push({distance:Et,angleDelta:nn}),ir+=nn;Et-Ut[0].distance>we;)ir-=Ut.shift().angleDelta;if(ir>je)return!1;at++,Et+=Er.dist(Ir)}return!0}function Uk(K){let F=0;for(let ae=0;ae<K.length-1;ae++)F+=K[ae].dist(K[ae+1]);return F}function qk(K,F,ae){return K?.6*F*ae:0}function Vk(K,F){return Math.max(K?K.right-K.left:0,F?F.right-F.left:0)}function y8(K,F,ae,we,je,Qe){const at=qk(ae,je,Qe),Et=Vk(ae,we)*Qe;let Ut=0;const ir=Uk(K)/2;for(let Er=0;Er<K.length-1;Er++){const Ir=K[Er],nn=K[Er+1],vn=Ir.dist(nn);if(Ut+vn>ir){const Cn=(ir-Ut)/vn,jn=Vo.number(Ir.x,nn.x,Cn),aa=Vo.number(Ir.y,nn.y,Cn),Oa=new ly(jn,aa,nn.angleTo(Ir),Er);return Oa._round(),!at||jk(K,Oa,Et,at,F)?Oa:void 0}Ut+=vn}}function _8(K,F,ae,we,je,Qe,at,Et,Ut){const ir=qk(we,Qe,at),Er=Vk(we,je),Ir=Er*at,nn=K[0].x===0||K[0].x===Ut||K[0].y===0||K[0].y===Ut;return F-Ir<F/4&&(F=Ir+F/4),h1(K,nn?F/2*Et%F:(Er/2+2*Qe)*at*Et%F,F,ir,ae,Ir,nn,!1,Ut)}function h1(K,F,ae,we,je,Qe,at,Et,Ut){const ir=Qe/2,Er=Uk(K);let Ir=0,nn=F-ae,vn=[];for(let Cn=0;Cn<K.length-1;Cn++){const jn=K[Cn],aa=K[Cn+1],Oa=jn.dist(aa),Pi=aa.angleTo(jn);for(;nn+ae<Ir+Oa;){nn+=ae;const oi=(nn-Ir)/Oa,Ti=Vo.number(jn.x,aa.x,oi),ao=Vo.number(jn.y,aa.y,oi);if(Ti>=0&&Ti<Ut&&ao>=0&&ao<Ut&&nn-ir>=0&&nn+ir<=Er){const Lo=new ly(Ti,ao,Pi,Cn);Lo._round(),we&&!jk(K,Lo,Qe,we,je)||vn.push(Lo)}}Ir+=Oa}return Et||vn.length||at||(vn=h1(K,Ir/2,ae,we,je,Qe,at,!0,Ut)),vn}si("Anchor",ly);const q_=pd;function Hk(K,F,ae,we){const je=[],Qe=K.image,at=Qe.pixelRatio,Et=Qe.paddedRect.w-2*q_,Ut=Qe.paddedRect.h-2*q_;let ir={x1:K.left,y1:K.top,x2:K.right,y2:K.bottom};const Er=Qe.stretchX||[[0,Et]],Ir=Qe.stretchY||[[0,Ut]],nn=(xo,tl)=>xo+tl[1]-tl[0],vn=Er.reduce(nn,0),Cn=Ir.reduce(nn,0),jn=Et-vn,aa=Ut-Cn;let Oa=0,Pi=vn,oi=0,Ti=Cn,ao=0,Lo=jn,cs=0,Al=aa;if(Qe.content&&we){const xo=Qe.content,tl=xo[2]-xo[0],Ws=xo[3]-xo[1];(Qe.textFitWidth||Qe.textFitHeight)&&(ir=Sk(K)),Oa=V_(Er,0,xo[0]),oi=V_(Ir,0,xo[1]),Pi=V_(Er,xo[0],xo[2]),Ti=V_(Ir,xo[1],xo[3]),ao=xo[0]-Oa,cs=xo[1]-oi,Lo=tl-Pi,Al=Ws-Ti}const xs=ir.x1,ss=ir.y1,Xs=ir.x2-xs,Ns=ir.y2-ss,Ds=(xo,tl,Ws,Vl)=>{const yf=Lp(xo.stretch-Oa,Pi,Xs,xs),uf=z3(xo.fixed-ao,Lo,xo.stretch,vn),Rd=Lp(tl.stretch-oi,Ti,Ns,ss),ip=z3(tl.fixed-cs,Al,tl.stretch,Cn),qh=Lp(Ws.stretch-Oa,Pi,Xs,xs),md=z3(Ws.fixed-ao,Lo,Ws.stretch,vn),Wv=Lp(Vl.stretch-oi,Ti,Ns,ss),Yv=z3(Vl.fixed-cs,Al,Vl.stretch,Cn),Zv=new s(yf,Rd),fh=new s(qh,Rd),Id=new s(qh,Wv),Pv=new s(yf,Wv),mv=new s(uf/at,ip/at),$v=new s(md/at,Yv/at),Qd=F*Math.PI/180;if(Qd){const $u=Math.sin(Qd),zc=Math.cos(Qd),$c=[zc,-$u,$u,zc];Zv._matMult($c),fh._matMult($c),Pv._matMult($c),Id._matMult($c)}const Rp=xo.stretch+xo.fixed,Lf=tl.stretch+tl.fixed;return{tl:Zv,tr:fh,bl:Pv,br:Id,tex:{x:Qe.paddedRect.x+q_+Rp,y:Qe.paddedRect.y+q_+Lf,w:Ws.stretch+Ws.fixed-Rp,h:Vl.stretch+Vl.fixed-Lf},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:mv,pixelOffsetBR:$v,minFontScaleX:Lo/at/Xs,minFontScaleY:Al/at/Ns,isSDF:ae}};if(we&&(Qe.stretchX||Qe.stretchY)){const xo=H_(Er,jn,vn),tl=H_(Ir,aa,Cn);for(let Ws=0;Ws<xo.length-1;Ws++){const Vl=xo[Ws],yf=xo[Ws+1];for(let uf=0;uf<tl.length-1;uf++)je.push(Ds(Vl,tl[uf],yf,tl[uf+1]))}}else je.push(Ds({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:Et+1},{fixed:0,stretch:Ut+1}));return je}function V_(K,F,ae){let we=0;for(const je of K)we+=Math.max(F,Math.min(ae,je[1]))-Math.max(F,Math.min(ae,je[0]));return we}function H_(K,F,ae){const we=[{fixed:-q_,stretch:0}];for(const[je,Qe]of K){const at=we[we.length-1];we.push({fixed:je-at.stretch,stretch:at.stretch}),we.push({fixed:je-at.stretch,stretch:at.stretch+(Qe-je)})}return we.push({fixed:F+q_,stretch:ae}),we}function Lp(K,F,ae,we){return K/F*ae+we}function z3(K,F,ae,we){return K-F*ae/we}class N3{constructor(F,ae,we,je,Qe,at,Et,Ut,ir,Er){var Ir;if(this.boxStartIndex=F.length,ir){let nn=at.top,vn=at.bottom;const Cn=at.collisionPadding;Cn&&(nn-=Cn[1],vn+=Cn[3]);let jn=vn-nn;jn>0&&(jn=Math.max(10,jn),this.circleDiameter=jn)}else{const nn=!((Ir=at.image)===null||Ir===void 0)&&Ir.content&&(at.image.textFitWidth||at.image.textFitHeight)?Sk(at):{x1:at.left,y1:at.top,x2:at.right,y2:at.bottom};nn.y1=nn.y1*Et-Ut[0],nn.y2=nn.y2*Et+Ut[2],nn.x1=nn.x1*Et-Ut[3],nn.x2=nn.x2*Et+Ut[1];const vn=at.collisionPadding;if(vn&&(nn.x1-=vn[0]*Et,nn.y1-=vn[1]*Et,nn.x2+=vn[2]*Et,nn.y2+=vn[3]*Et),Er){const Cn=new s(nn.x1,nn.y1),jn=new s(nn.x2,nn.y1),aa=new s(nn.x1,nn.y2),Oa=new s(nn.x2,nn.y2),Pi=Er*Math.PI/180;Cn._rotate(Pi),jn._rotate(Pi),aa._rotate(Pi),Oa._rotate(Pi),nn.x1=Math.min(Cn.x,jn.x,aa.x,Oa.x),nn.x2=Math.max(Cn.x,jn.x,aa.x,Oa.x),nn.y1=Math.min(Cn.y,jn.y,aa.y,Oa.y),nn.y2=Math.max(Cn.y,jn.y,aa.y,Oa.y)}F.emplaceBack(ae.x,ae.y,nn.x1,nn.y1,nn.x2,nn.y2,we,je,Qe)}this.boxEndIndex=F.length}}class x8{constructor(F=[],ae=(we,je)=>we<je?-1:we>je?1:0){if(this.data=F,this.length=this.data.length,this.compare=ae,this.length>0)for(let we=(this.length>>1)-1;we>=0;we--)this._down(we)}push(F){this.data.push(F),this._up(this.length++)}pop(){if(this.length===0)return;const F=this.data[0],ae=this.data.pop();return--this.length>0&&(this.data[0]=ae,this._down(0)),F}peek(){return this.data[0]}_up(F){const{data:ae,compare:we}=this,je=ae[F];for(;F>0;){const Qe=F-1>>1,at=ae[Qe];if(we(je,at)>=0)break;ae[F]=at,F=Qe}ae[F]=je}_down(F){const{data:ae,compare:we}=this,je=this.length>>1,Qe=ae[F];for(;F<je;){let at=1+(F<<1);const Et=at+1;if(Et<this.length&&we(ae[Et],ae[at])<0&&(at=Et),we(ae[at],Qe)>=0)break;ae[F]=ae[at],F=at}ae[F]=Qe}}function b8(K,F=1,ae=!1){let we=1/0,je=1/0,Qe=-1/0,at=-1/0;const Et=K[0];for(let vn=0;vn<Et.length;vn++){const Cn=Et[vn];(!vn||Cn.x<we)&&(we=Cn.x),(!vn||Cn.y<je)&&(je=Cn.y),(!vn||Cn.x>Qe)&&(Qe=Cn.x),(!vn||Cn.y>at)&&(at=Cn.y)}const Ut=Math.min(Qe-we,at-je);let ir=Ut/2;const Er=new x8([],w8);if(Ut===0)return new s(we,je);for(let vn=we;vn<Qe;vn+=Ut)for(let Cn=je;Cn<at;Cn+=Ut)Er.push(new b0(vn+ir,Cn+ir,ir,K));let Ir=(function(vn){let Cn=0,jn=0,aa=0;const Oa=vn[0];for(let Pi=0,oi=Oa.length,Ti=oi-1;Pi<oi;Ti=Pi++){const ao=Oa[Pi],Lo=Oa[Ti],cs=ao.x*Lo.y-Lo.x*ao.y;jn+=(ao.x+Lo.x)*cs,aa+=(ao.y+Lo.y)*cs,Cn+=3*cs}return new b0(jn/Cn,aa/Cn,0,vn)})(K),nn=Er.length;for(;Er.length;){const vn=Er.pop();(vn.d>Ir.d||!Ir.d)&&(Ir=vn,ae&&console.log("found best %d after %d probes",Math.round(1e4*vn.d)/1e4,nn)),vn.max-Ir.d<=F||(ir=vn.h/2,Er.push(new b0(vn.p.x-ir,vn.p.y-ir,ir,K)),Er.push(new b0(vn.p.x+ir,vn.p.y-ir,ir,K)),Er.push(new b0(vn.p.x-ir,vn.p.y+ir,ir,K)),Er.push(new b0(vn.p.x+ir,vn.p.y+ir,ir,K)),nn+=4)}return ae&&(console.log(`num probes: ${nn}`),console.log(`best distance: ${Ir.d}`)),Ir.p}function w8(K,F){return F.max-K.max}function b0(K,F,ae,we){this.p=new s(K,F),this.h=ae,this.d=(function(je,Qe){let at=!1,Et=1/0;for(let Ut=0;Ut<Qe.length;Ut++){const ir=Qe[Ut];for(let Er=0,Ir=ir.length,nn=Ir-1;Er<Ir;nn=Er++){const vn=ir[Er],Cn=ir[nn];vn.y>je.y!=Cn.y>je.y&&je.x<(Cn.x-vn.x)*(je.y-vn.y)/(Cn.y-vn.y)+vn.x&&(at=!at),Et=Math.min(Et,io(je,vn,Cn))}}return(at?1:-1)*Math.sqrt(Et)})(this.p,we),this.max=this.d+this.h*Math.SQRT2}var Jd;t.aq=void 0,(Jd=t.aq||(t.aq={}))[Jd.center=1]="center",Jd[Jd.left=2]="left",Jd[Jd.right=3]="right",Jd[Jd.top=4]="top",Jd[Jd.bottom=5]="bottom",Jd[Jd["top-left"]=6]="top-left",Jd[Jd["top-right"]=7]="top-right",Jd[Jd["bottom-left"]=8]="bottom-left",Jd[Jd["bottom-right"]=9]="bottom-right";const uy=7,v5=Number.POSITIVE_INFINITY;function Gk(K,F){return F[1]!==v5?(function(ae,we,je){let Qe=0,at=0;switch(we=Math.abs(we),je=Math.abs(je),ae){case"top-right":case"top-left":case"top":at=je-uy;break;case"bottom-right":case"bottom-left":case"bottom":at=-je+uy}switch(ae){case"top-right":case"bottom-right":case"right":Qe=-we;break;case"top-left":case"bottom-left":case"left":Qe=we}return[Qe,at]})(K,F[0],F[1]):(function(ae,we){let je=0,Qe=0;we<0&&(we=0);const at=we/Math.SQRT2;switch(ae){case"top-right":case"top-left":Qe=at-uy;break;case"bottom-right":case"bottom-left":Qe=-at+uy;break;case"bottom":Qe=-we+uy;break;case"top":Qe=we-uy}switch(ae){case"top-right":case"bottom-right":je=-at;break;case"top-left":case"bottom-left":je=at;break;case"left":je=we;break;case"right":je=-we}return[je,Qe]})(K,F[0])}function Xk(K,F,ae){var we;const je=K.layout,Qe=(we=je.get("text-variable-anchor-offset"))===null||we===void 0?void 0:we.evaluate(F,{},ae);if(Qe){const Et=Qe.values,Ut=[];for(let ir=0;ir<Et.length;ir+=2){const Er=Ut[ir]=Et[ir],Ir=Et[ir+1].map(nn=>nn*Tc);Er.startsWith("top")?Ir[1]-=uy:Er.startsWith("bottom")&&(Ir[1]+=uy),Ut[ir+1]=Ir}return new za(Ut)}const at=je.get("text-variable-anchor");if(at){let Et;Et=K._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[je.get("text-radial-offset").evaluate(F,{},ae)*Tc,v5]:je.get("text-offset").evaluate(F,{},ae).map(ir=>ir*Tc);const Ut=[];for(const ir of at)Ut.push(ir,Gk(ir,Et));return new za(Ut)}return null}function p5(K){switch(K){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function T8(K,F,ae,we,je,Qe,at,Et,Ut,ir,Er){let Ir=Qe.textMaxSize.evaluate(F,{});Ir===void 0&&(Ir=at);const nn=K.layers[0].layout,vn=nn.get("icon-offset").evaluate(F,{},Er),Cn=Yk(ae.horizontal),jn=at/24,aa=K.tilePixelRatio*jn,Oa=K.tilePixelRatio*Ir/24,Pi=K.tilePixelRatio*Et,oi=K.tilePixelRatio*nn.get("symbol-spacing"),Ti=nn.get("text-padding")*K.tilePixelRatio,ao=(function(xo,tl,Ws,Vl=1){const yf=xo.get("icon-padding").evaluate(tl,{},Ws),uf=yf&&yf.values;return[uf[0]*Vl,uf[1]*Vl,uf[2]*Vl,uf[3]*Vl]})(nn,F,Er,K.tilePixelRatio),Lo=nn.get("text-max-angle")/180*Math.PI,cs=nn.get("text-rotation-alignment")!=="viewport"&&nn.get("symbol-placement")!=="point",Al=nn.get("icon-rotation-alignment")==="map"&&nn.get("symbol-placement")!=="point",xs=nn.get("symbol-placement"),ss=oi/2,Xs=nn.get("icon-text-fit");let Ns;we&&Xs!=="none"&&(K.allowVerticalPlacement&&ae.vertical&&(Ns=Ek(we,ae.vertical,Xs,nn.get("icon-text-fit-padding"),vn,jn)),Cn&&(we=Ek(we,Cn,Xs,nn.get("icon-text-fit-padding"),vn,jn)));const Ds=(xo,tl)=>{tl.x<0||tl.x>=su||tl.y<0||tl.y>=su||(function(Ws,Vl,yf,uf,Rd,ip,qh,md,Wv,Yv,Zv,fh,Id,Pv,mv,$v,Qd,Rp,Lf,$u,zc,$c,nh,Rf,W_){const Gm=Ws.addToLineVertexArray(Vl,yf);let Xm,Lv,_f,ev,mm=0,Ip=0,Kv=0,b5=0,w5=-1,U3=-1;const sg={};let T5=Ma("");if(Ws.allowVerticalPlacement&&uf.vertical){const gv=md.layout.get("text-rotate").evaluate(zc,{},Rf)+90;_f=new N3(Wv,Vl,Yv,Zv,fh,uf.vertical,Id,Pv,mv,gv),qh&&(ev=new N3(Wv,Vl,Yv,Zv,fh,qh,Qd,Rp,mv,gv))}if(Rd){const gv=md.layout.get("icon-rotate").evaluate(zc,{}),Dp=md.layout.get("icon-text-fit")!=="none",cy=Hk(Rd,gv,nh,Dp),Wm=qh?Hk(qh,gv,nh,Dp):void 0;Lv=new N3(Wv,Vl,Yv,Zv,fh,Rd,Qd,Rp,!1,gv),mm=4*cy.length;const d1=Ws.iconSizeData;let Ym=null;d1.kind==="source"?(Ym=[_0*md.layout.get("icon-size").evaluate(zc,{})],Ym[0]>oy&&x(`${Ws.layerIds[0]}: Value for "icon-size" is >= ${Vb}. Reduce your "icon-size".`)):d1.kind==="composite"&&(Ym=[_0*$c.compositeIconSizes[0].evaluate(zc,{},Rf),_0*$c.compositeIconSizes[1].evaluate(zc,{},Rf)],(Ym[0]>oy||Ym[1]>oy)&&x(`${Ws.layerIds[0]}: Value for "icon-size" is >= ${Vb}. Reduce your "icon-size".`)),Ws.addSymbols(Ws.icon,cy,Ym,$u,Lf,zc,t.ah.none,Vl,Gm.lineStartIndex,Gm.lineLength,-1,Rf),w5=Ws.icon.placedSymbolArray.length-1,Wm&&(Ip=4*Wm.length,Ws.addSymbols(Ws.icon,Wm,Ym,$u,Lf,zc,t.ah.vertical,Vl,Gm.lineStartIndex,Gm.lineLength,-1,Rf),U3=Ws.icon.placedSymbolArray.length-1)}const A5=Object.keys(uf.horizontal);for(const gv of A5){const Dp=uf.horizontal[gv];if(!Xm){T5=Ma(Dp.text);const Wm=md.layout.get("text-rotate").evaluate(zc,{},Rf);Xm=new N3(Wv,Vl,Yv,Zv,fh,Dp,Id,Pv,mv,Wm)}const cy=Dp.positionedLines.length===1;if(Kv+=Wk(Ws,Vl,Dp,ip,md,mv,zc,$v,Gm,uf.vertical?t.ah.horizontal:t.ah.horizontalOnly,cy?A5:[gv],sg,w5,$c,Rf),cy)break}uf.vertical&&(b5+=Wk(Ws,Vl,uf.vertical,ip,md,mv,zc,$v,Gm,t.ah.vertical,["vertical"],sg,U3,$c,Rf));const S5=Xm?Xm.boxStartIndex:Ws.collisionBoxArray.length,E5=Xm?Xm.boxEndIndex:Ws.collisionBoxArray.length,A8=_f?_f.boxStartIndex:Ws.collisionBoxArray.length,S8=_f?_f.boxEndIndex:Ws.collisionBoxArray.length,E8=Lv?Lv.boxStartIndex:Ws.collisionBoxArray.length,M8=Lv?Lv.boxEndIndex:Ws.collisionBoxArray.length,Qk=ev?ev.boxStartIndex:Ws.collisionBoxArray.length,Y_=ev?ev.boxEndIndex:Ws.collisionBoxArray.length;let gd=-1;const Z_=(gv,Dp)=>gv&&gv.circleDiameter?Math.max(gv.circleDiameter,Dp):Dp;gd=Z_(Xm,gd),gd=Z_(_f,gd),gd=Z_(Lv,gd),gd=Z_(ev,gd);const M5=gd>-1?1:0;M5&&(gd*=W_/Tc),Ws.glyphOffsetArray.length>=c1.MAX_GLYPHS&&x("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),zc.sortKey!==void 0&&Ws.addToSortKeyRanges(Ws.symbolInstances.length,zc.sortKey);const e6=Xk(md,zc,Rf),[C8,t6]=(function(gv,Dp){const cy=gv.length,Wm=Dp?.values;if(Wm?.length>0)for(let d1=0;d1<Wm.length;d1+=2){const Ym=Wm[d1+1];gv.emplaceBack(t.aq[Wm[d1]],Ym[0],Ym[1])}return[cy,gv.length]})(Ws.textAnchorOffsets,e6);Ws.symbolInstances.emplaceBack(Vl.x,Vl.y,sg.right>=0?sg.right:-1,sg.center>=0?sg.center:-1,sg.left>=0?sg.left:-1,sg.vertical||-1,w5,U3,T5,S5,E5,A8,S8,E8,M8,Qk,Y_,Yv,Kv,b5,mm,Ip,M5,0,Id,gd,C8,t6)})(K,tl,xo,ae,we,je,Ns,K.layers[0],K.collisionBoxArray,F.index,F.sourceLayerIndex,K.index,aa,[Ti,Ti,Ti,Ti],cs,Ut,Pi,ao,Al,vn,F,Qe,ir,Er,at)};if(xs==="line")for(const xo of Bk(F.geometry,0,0,su,su)){const tl=_8(xo,oi,Lo,ae.vertical||Cn,we,24,Oa,K.overscaling,su);for(const Ws of tl)Cn&&Zk(K,Cn.text,ss,Ws)||Ds(xo,Ws)}else if(xs==="line-center"){for(const xo of F.geometry)if(xo.length>1){const tl=y8(xo,Lo,ae.vertical||Cn,we,24,Oa);tl&&Ds(xo,tl)}}else if(F.type==="Polygon")for(const xo of rf(F.geometry,0)){const tl=b8(xo,16);Ds(xo[0],new ly(tl.x,tl.y,0))}else if(F.type==="LineString")for(const xo of F.geometry)Ds(xo,new ly(xo[0].x,xo[0].y,0));else if(F.type==="Point")for(const xo of F.geometry)for(const tl of xo)Ds([tl],new ly(tl.x,tl.y,0))}function Wk(K,F,ae,we,je,Qe,at,Et,Ut,ir,Er,Ir,nn,vn,Cn){const jn=(function(Pi,oi,Ti,ao,Lo,cs,Al,xs){const ss=ao.layout.get("text-rotate").evaluate(cs,{})*Math.PI/180,Xs=[];for(const Ns of oi.positionedLines)for(const Ds of Ns.positionedGlyphs){if(!Ds.rect)continue;const xo=Ds.rect||{};let tl=r5+1,Ws=!0,Vl=1,yf=0;const uf=(Lo||xs)&&Ds.vertical,Rd=Ds.metrics.advance*Ds.scale/2;if(xs&&oi.verticalizable&&(yf=Ns.lineOffset/2-(Ds.imageName?-(Tc-Ds.metrics.width*Ds.scale)/2:(Ds.scale-1)*Tc)),Ds.imageName){const $u=Al[Ds.imageName];Ws=$u.sdf,Vl=$u.pixelRatio,tl=pd/Vl}const ip=Lo?[Ds.x+Rd,Ds.y]:[0,0];let qh=Lo?[0,0]:[Ds.x+Rd+Ti[0],Ds.y+Ti[1]-yf],md=[0,0];uf&&(md=qh,qh=[0,0]);const Wv=Ds.metrics.isDoubleResolution?2:1,Yv=(Ds.metrics.left-tl)*Ds.scale-Rd+qh[0],Zv=(-Ds.metrics.top-tl)*Ds.scale+qh[1],fh=Yv+xo.w/Wv*Ds.scale/Vl,Id=Zv+xo.h/Wv*Ds.scale/Vl,Pv=new s(Yv,Zv),mv=new s(fh,Zv),$v=new s(Yv,Id),Qd=new s(fh,Id);if(uf){const $u=new s(-Rd,Rd-N_),zc=-Math.PI/2,$c=Tc/2-Rd,nh=new s(5-N_-$c,-(Ds.imageName?$c:0)),Rf=new s(...md);Pv._rotateAround(zc,$u)._add(nh)._add(Rf),mv._rotateAround(zc,$u)._add(nh)._add(Rf),$v._rotateAround(zc,$u)._add(nh)._add(Rf),Qd._rotateAround(zc,$u)._add(nh)._add(Rf)}if(ss){const $u=Math.sin(ss),zc=Math.cos(ss),$c=[zc,-$u,$u,zc];Pv._matMult($c),mv._matMult($c),$v._matMult($c),Qd._matMult($c)}const Rp=new s(0,0),Lf=new s(0,0);Xs.push({tl:Pv,tr:mv,bl:$v,br:Qd,tex:xo,writingMode:oi.writingMode,glyphOffset:ip,sectionIndex:Ds.sectionIndex,isSDF:Ws,pixelOffsetTL:Rp,pixelOffsetBR:Lf,minFontScaleX:0,minFontScaleY:0})}return Xs})(0,ae,Et,je,Qe,at,we,K.allowVerticalPlacement),aa=K.textSizeData;let Oa=null;aa.kind==="source"?(Oa=[_0*je.layout.get("text-size").evaluate(at,{})],Oa[0]>oy&&x(`${K.layerIds[0]}: Value for "text-size" is >= ${Vb}. Reduce your "text-size".`)):aa.kind==="composite"&&(Oa=[_0*vn.compositeTextSizes[0].evaluate(at,{},Cn),_0*vn.compositeTextSizes[1].evaluate(at,{},Cn)],(Oa[0]>oy||Oa[1]>oy)&&x(`${K.layerIds[0]}: Value for "text-size" is >= ${Vb}. Reduce your "text-size".`)),K.addSymbols(K.text,jn,Oa,Et,Qe,at,ir,F,Ut.lineStartIndex,Ut.lineLength,nn,Cn);for(const Pi of Er)Ir[Pi]=K.text.placedSymbolArray.length-1;return 4*jn.length}function Yk(K){for(const F in K)return K[F];return null}function Zk(K,F,ae,we){const je=K.compareText;if(F in je){const Qe=je[F];for(let at=Qe.length-1;at>=0;at--)if(we.dist(Qe[at])<ae)return!0}else je[F]=[];return je[F].push(we),!1}const $k=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];class m5{static from(F){if(!(F instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[ae,we]=new Uint8Array(F,0,2);if(ae!==219)throw new Error("Data does not appear to be in a KDBush format.");const je=we>>4;if(je!==1)throw new Error(`Got v${je} data when expected v1.`);const Qe=$k[15&we];if(!Qe)throw new Error("Unrecognized array type.");const[at]=new Uint16Array(F,2,1),[Et]=new Uint32Array(F,4,1);return new m5(Et,at,Qe,F)}constructor(F,ae=64,we=Float64Array,je){if(isNaN(F)||F<0)throw new Error(`Unpexpected numItems value: ${F}.`);this.numItems=+F,this.nodeSize=Math.min(Math.max(+ae,2),65535),this.ArrayType=we,this.IndexArrayType=F<65536?Uint16Array:Uint32Array;const Qe=$k.indexOf(this.ArrayType),at=2*F*this.ArrayType.BYTES_PER_ELEMENT,Et=F*this.IndexArrayType.BYTES_PER_ELEMENT,Ut=(8-Et%8)%8;if(Qe<0)throw new Error(`Unexpected typed array class: ${we}.`);je&&je instanceof ArrayBuffer?(this.data=je,this.ids=new this.IndexArrayType(this.data,8,F),this.coords=new this.ArrayType(this.data,8+Et+Ut,2*F),this._pos=2*F,this._finished=!0):(this.data=new ArrayBuffer(8+at+Et+Ut),this.ids=new this.IndexArrayType(this.data,8,F),this.coords=new this.ArrayType(this.data,8+Et+Ut,2*F),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+Qe]),new Uint16Array(this.data,2,1)[0]=ae,new Uint32Array(this.data,4,1)[0]=F)}add(F,ae){const we=this._pos>>1;return this.ids[we]=we,this.coords[this._pos++]=F,this.coords[this._pos++]=ae,we}finish(){const F=this._pos>>1;if(F!==this.numItems)throw new Error(`Added ${F} items when expected ${this.numItems}.`);return g5(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(F,ae,we,je){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:Qe,coords:at,nodeSize:Et}=this,Ut=[0,Qe.length-1,0],ir=[];for(;Ut.length;){const Er=Ut.pop()||0,Ir=Ut.pop()||0,nn=Ut.pop()||0;if(Ir-nn<=Et){for(let aa=nn;aa<=Ir;aa++){const Oa=at[2*aa],Pi=at[2*aa+1];Oa>=F&&Oa<=we&&Pi>=ae&&Pi<=je&&ir.push(Qe[aa])}continue}const vn=nn+Ir>>1,Cn=at[2*vn],jn=at[2*vn+1];Cn>=F&&Cn<=we&&jn>=ae&&jn<=je&&ir.push(Qe[vn]),(Er===0?F<=Cn:ae<=jn)&&(Ut.push(nn),Ut.push(vn-1),Ut.push(1-Er)),(Er===0?we>=Cn:je>=jn)&&(Ut.push(vn+1),Ut.push(Ir),Ut.push(1-Er))}return ir}within(F,ae,we){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:je,coords:Qe,nodeSize:at}=this,Et=[0,je.length-1,0],Ut=[],ir=we*we;for(;Et.length;){const Er=Et.pop()||0,Ir=Et.pop()||0,nn=Et.pop()||0;if(Ir-nn<=at){for(let aa=nn;aa<=Ir;aa++)pv(Qe[2*aa],Qe[2*aa+1],F,ae)<=ir&&Ut.push(je[aa]);continue}const vn=nn+Ir>>1,Cn=Qe[2*vn],jn=Qe[2*vn+1];pv(Cn,jn,F,ae)<=ir&&Ut.push(je[vn]),(Er===0?F-we<=Cn:ae-we<=jn)&&(Et.push(nn),Et.push(vn-1),Et.push(1-Er)),(Er===0?F+we>=Cn:ae+we>=jn)&&(Et.push(vn+1),Et.push(Ir),Et.push(1-Er))}return Ut}}function g5(K,F,ae,we,je,Qe){if(je-we<=ae)return;const at=we+je>>1;Kk(K,F,at,we,je,Qe),g5(K,F,ae,we,at-1,1-Qe),g5(K,F,ae,at+1,je,1-Qe)}function Kk(K,F,ae,we,je,Qe){for(;je>we;){if(je-we>600){const ir=je-we+1,Er=ae-we+1,Ir=Math.log(ir),nn=.5*Math.exp(2*Ir/3),vn=.5*Math.sqrt(Ir*nn*(ir-nn)/ir)*(Er-ir/2<0?-1:1);Kk(K,F,ae,Math.max(we,Math.floor(ae-Er*nn/ir+vn)),Math.min(je,Math.floor(ae+(ir-Er)*nn/ir+vn)),Qe)}const at=F[2*ae+Qe];let Et=we,Ut=je;for(G_(K,F,we,ae),F[2*je+Qe]>at&&G_(K,F,we,je);Et<Ut;){for(G_(K,F,Et,Ut),Et++,Ut--;F[2*Et+Qe]<at;)Et++;for(;F[2*Ut+Qe]>at;)Ut--}F[2*we+Qe]===at?G_(K,F,we,Ut):(Ut++,G_(K,F,Ut,je)),Ut<=ae&&(we=Ut+1),ae<=Ut&&(je=Ut-1)}}function G_(K,F,ae,we){F3(K,ae,we),F3(F,2*ae,2*we),F3(F,2*ae+1,2*we+1)}function F3(K,F,ae){const we=K[F];K[F]=K[ae],K[ae]=we}function pv(K,F,ae,we){const je=K-ae,Qe=F-we;return je*je+Qe*Qe}var y5;t.bg=void 0,(y5=t.bg||(t.bg={})).create="create",y5.load="load",y5.fullLoad="fullLoad";let B3=null,X_=[];const _5=1e3/60,j3="loadTime",x5="fullLoadTime",Jk={mark(K){performance.mark(K)},frame(K){const F=K;B3!=null&&X_.push(F-B3),B3=F},clearMetrics(){B3=null,X_=[],performance.clearMeasures(j3),performance.clearMeasures(x5);for(const K in t.bg)performance.clearMarks(t.bg[K])},getPerformanceMetrics(){performance.measure(j3,t.bg.create,t.bg.load),performance.measure(x5,t.bg.create,t.bg.fullLoad);const K=performance.getEntriesByName(j3)[0].duration,F=performance.getEntriesByName(x5)[0].duration,ae=X_.length,we=1/(X_.reduce((Qe,at)=>Qe+at,0)/ae/1e3),je=X_.filter(Qe=>Qe>_5).reduce((Qe,at)=>Qe+(at-_5)/_5,0);return{loadTime:K,fullLoadTime:F,fps:we,percentDroppedFrames:je/(ae+je)*100,totalFrames:ae}}};t.$=class extends Fr{},t.A=eo,t.B=Ai,t.C=function(K){if(B==null){const F=K.navigator?K.navigator.userAgent:null;B=!!K.safari||!(!F||!(/\b(iPad|iPhone|iPod)\b/.test(F)||F.match("Safari")&&!F.match("Chrome")))}return B},t.D=os,t.E=ce,t.F=class{constructor(K,F){this.target=K,this.mapId=F,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new Wb(()=>this.process()),this.subscription=(function(ae,we,je,Qe){return ae.addEventListener(we,je,!1),{unsubscribe:()=>{ae.removeEventListener(we,je,!1)}}})(this.target,"message",ae=>this.receive(ae)),this.globalScope=D(self)?K:window}registerMessageHandler(K,F){this.messageHandlers[K]=F}sendAsync(K,F){return new Promise((ae,we)=>{const je=Math.round(1e18*Math.random()).toString(36).substring(0,10);this.resolveRejects[je]={resolve:ae,reject:we},F&&F.signal.addEventListener("abort",()=>{delete this.resolveRejects[je];const Et={id:je,type:"<cancel>",origin:location.origin,targetMapId:K.targetMapId,sourceMapId:this.mapId};this.target.postMessage(Et)},{once:!0});const Qe=[],at=Object.assign(Object.assign({},K),{id:je,sourceMapId:this.mapId,origin:location.origin,data:is(K.data,Qe)});this.target.postMessage(at,{transfer:Qe})})}receive(K){const F=K.data,ae=F.id;if(!(F.origin!=="file://"&&location.origin!=="file://"&&F.origin!=="resource://android"&&location.origin!=="resource://android"&&F.origin!==location.origin||F.targetMapId&&this.mapId!==F.targetMapId)){if(F.type==="<cancel>"){delete this.tasks[ae];const we=this.abortControllers[ae];return delete this.abortControllers[ae],void(we&&we.abort())}if(D(self)||F.mustQueue)return this.tasks[ae]=F,this.taskQueue.push(ae),void this.invoker.trigger();this.processTask(ae,F)}}process(){if(this.taskQueue.length===0)return;const K=this.taskQueue.shift(),F=this.tasks[K];delete this.tasks[K],this.taskQueue.length>0&&this.invoker.trigger(),F&&this.processTask(K,F)}processTask(K,F){return r(this,void 0,void 0,function*(){if(F.type==="<response>"){const je=this.resolveRejects[K];return delete this.resolveRejects[K],je?void(F.error?je.reject(rs(F.error)):je.resolve(rs(F.data))):void 0}if(!this.messageHandlers[F.type])return void this.completeTask(K,new Error(`Could not find a registered handler for ${F.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));const ae=rs(F.data),we=new AbortController;this.abortControllers[K]=we;try{const je=yield this.messageHandlers[F.type](F.sourceMapId,ae,we);this.completeTask(K,null,je)}catch(je){this.completeTask(K,je)}})}completeTask(K,F,ae){const we=[];delete this.abortControllers[K];const je={id:K,type:"<response>",sourceMapId:this.mapId,origin:location.origin,error:F?is(F):null,data:is(ae,we)};this.target.postMessage(je,{transfer:we})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},t.G=de,t.H=function(){var K=new eo(16);return eo!=Float32Array&&(K[1]=0,K[2]=0,K[3]=0,K[4]=0,K[6]=0,K[7]=0,K[8]=0,K[9]=0,K[11]=0,K[12]=0,K[13]=0,K[14]=0),K[0]=1,K[5]=1,K[10]=1,K[15]=1,K},t.I=vv,t.J=function(K,F,ae){var we,je,Qe,at,Et,Ut,ir,Er,Ir,nn,vn,Cn,jn=ae[0],aa=ae[1],Oa=ae[2];return F===K?(K[12]=F[0]*jn+F[4]*aa+F[8]*Oa+F[12],K[13]=F[1]*jn+F[5]*aa+F[9]*Oa+F[13],K[14]=F[2]*jn+F[6]*aa+F[10]*Oa+F[14],K[15]=F[3]*jn+F[7]*aa+F[11]*Oa+F[15]):(je=F[1],Qe=F[2],at=F[3],Et=F[4],Ut=F[5],ir=F[6],Er=F[7],Ir=F[8],nn=F[9],vn=F[10],Cn=F[11],K[0]=we=F[0],K[1]=je,K[2]=Qe,K[3]=at,K[4]=Et,K[5]=Ut,K[6]=ir,K[7]=Er,K[8]=Ir,K[9]=nn,K[10]=vn,K[11]=Cn,K[12]=we*jn+Et*aa+Ir*Oa+F[12],K[13]=je*jn+Ut*aa+nn*Oa+F[13],K[14]=Qe*jn+ir*aa+vn*Oa+F[14],K[15]=at*jn+Er*aa+Cn*Oa+F[15]),K},t.K=function(K,F,ae){var we=ae[0],je=ae[1],Qe=ae[2];return K[0]=F[0]*we,K[1]=F[1]*we,K[2]=F[2]*we,K[3]=F[3]*we,K[4]=F[4]*je,K[5]=F[5]*je,K[6]=F[6]*je,K[7]=F[7]*je,K[8]=F[8]*Qe,K[9]=F[9]*Qe,K[10]=F[10]*Qe,K[11]=F[11]*Qe,K[12]=F[12],K[13]=F[13],K[14]=F[14],K[15]=F[15],K},t.L=pa,t.M=function(K,F){const ae={};for(let we=0;we<F.length;we++){const je=F[we];je in K&&(ae[je]=K[je])}return ae},t.N=x0,t.O=O3,t.P=s,t.Q=Lk,t.R=wl,t.S=tm,t.T=Ic,t.U=m,t.V=E,t.W=q,t.X=su,t.Y=Ct,t.Z=Yb,t._=r,t.a=le,t.a$=function(K,F){var ae=K[0],we=K[1],je=K[2],Qe=K[3],at=K[4],Et=K[5],Ut=K[6],ir=K[7],Er=K[8],Ir=K[9],nn=K[10],vn=K[11],Cn=K[12],jn=K[13],aa=K[14],Oa=K[15],Pi=F[0],oi=F[1],Ti=F[2],ao=F[3],Lo=F[4],cs=F[5],Al=F[6],xs=F[7],ss=F[8],Xs=F[9],Ns=F[10],Ds=F[11],xo=F[12],tl=F[13],Ws=F[14],Vl=F[15];return Math.abs(ae-Pi)<=li*Math.max(1,Math.abs(ae),Math.abs(Pi))&&Math.abs(we-oi)<=li*Math.max(1,Math.abs(we),Math.abs(oi))&&Math.abs(je-Ti)<=li*Math.max(1,Math.abs(je),Math.abs(Ti))&&Math.abs(Qe-ao)<=li*Math.max(1,Math.abs(Qe),Math.abs(ao))&&Math.abs(at-Lo)<=li*Math.max(1,Math.abs(at),Math.abs(Lo))&&Math.abs(Et-cs)<=li*Math.max(1,Math.abs(Et),Math.abs(cs))&&Math.abs(Ut-Al)<=li*Math.max(1,Math.abs(Ut),Math.abs(Al))&&Math.abs(ir-xs)<=li*Math.max(1,Math.abs(ir),Math.abs(xs))&&Math.abs(Er-ss)<=li*Math.max(1,Math.abs(Er),Math.abs(ss))&&Math.abs(Ir-Xs)<=li*Math.max(1,Math.abs(Ir),Math.abs(Xs))&&Math.abs(nn-Ns)<=li*Math.max(1,Math.abs(nn),Math.abs(Ns))&&Math.abs(vn-Ds)<=li*Math.max(1,Math.abs(vn),Math.abs(Ds))&&Math.abs(Cn-xo)<=li*Math.max(1,Math.abs(Cn),Math.abs(xo))&&Math.abs(jn-tl)<=li*Math.max(1,Math.abs(jn),Math.abs(tl))&&Math.abs(aa-Ws)<=li*Math.max(1,Math.abs(aa),Math.abs(Ws))&&Math.abs(Oa-Vl)<=li*Math.max(1,Math.abs(Oa),Math.abs(Vl))},t.a0=Mn,t.a1=h5,t.a2=Pe,t.a3=K=>{const F=window.document.createElement("video");return F.muted=!0,new Promise(ae=>{F.onloadstart=()=>{ae(F)};for(const we of K){const je=window.document.createElement("source");se(we)||(F.crossOrigin="Anonymous"),je.src=we,F.appendChild(je)}})},t.a4=function(){return b++},t.a5=Mi,t.a6=c1,t.a7=Fh,t.a8=kr,t.a9=Ok,t.aA=function(K){if(K.type==="custom")return new kk(K);switch(K.type){case"background":return new Xb(K);case"circle":return new ai(K);case"fill":return new En(K);case"fill-extrusion":return new Mp(K);case"heatmap":return new cl(K);case"hillshade":return new uc(K);case"line":return new o1(K);case"raster":return new g8(K);case"symbol":return new R3(K)}},t.aB=f,t.aC=function(K,F){if(!K)return[{command:"setStyle",args:[F]}];let ae=[];try{if(!ze(K.version,F.version))return[{command:"setStyle",args:[F]}];ze(K.center,F.center)||ae.push({command:"setCenter",args:[F.center]}),ze(K.zoom,F.zoom)||ae.push({command:"setZoom",args:[F.zoom]}),ze(K.bearing,F.bearing)||ae.push({command:"setBearing",args:[F.bearing]}),ze(K.pitch,F.pitch)||ae.push({command:"setPitch",args:[F.pitch]}),ze(K.sprite,F.sprite)||ae.push({command:"setSprite",args:[F.sprite]}),ze(K.glyphs,F.glyphs)||ae.push({command:"setGlyphs",args:[F.glyphs]}),ze(K.transition,F.transition)||ae.push({command:"setTransition",args:[F.transition]}),ze(K.light,F.light)||ae.push({command:"setLight",args:[F.light]}),ze(K.terrain,F.terrain)||ae.push({command:"setTerrain",args:[F.terrain]}),ze(K.sky,F.sky)||ae.push({command:"setSky",args:[F.sky]}),ze(K.projection,F.projection)||ae.push({command:"setProjection",args:[F.projection]});const we={},je=[];(function(at,Et,Ut,ir){let Er;for(Er in Et=Et||{},at=at||{})Object.prototype.hasOwnProperty.call(at,Er)&&(Object.prototype.hasOwnProperty.call(Et,Er)||rt(Er,Ut,ir));for(Er in Et)Object.prototype.hasOwnProperty.call(Et,Er)&&(Object.prototype.hasOwnProperty.call(at,Er)?ze(at[Er],Et[Er])||(at[Er].type==="geojson"&&Et[Er].type==="geojson"&&_t(at,Et,Er)?Xe(Ut,{command:"setGeoJSONSourceData",args:[Er,Et[Er].data]}):mt(Er,Et,Ut,ir)):Ve(Er,Et,Ut))})(K.sources,F.sources,je,we);const Qe=[];K.layers&&K.layers.forEach(at=>{"source"in at&&we[at.source]?ae.push({command:"removeLayer",args:[at.id]}):Qe.push(at)}),ae=ae.concat(je),(function(at,Et,Ut){Et=Et||[];const ir=(at=at||[]).map(ut),Er=Et.map(ut),Ir=at.reduce(Fe,{}),nn=Et.reduce(Fe,{}),vn=ir.slice(),Cn=Object.create(null);let jn,aa,Oa,Pi,oi;for(let Ti=0,ao=0;Ti<ir.length;Ti++)jn=ir[Ti],Object.prototype.hasOwnProperty.call(nn,jn)?ao++:(Xe(Ut,{command:"removeLayer",args:[jn]}),vn.splice(vn.indexOf(jn,ao),1));for(let Ti=0,ao=0;Ti<Er.length;Ti++)jn=Er[Er.length-1-Ti],vn[vn.length-1-Ti]!==jn&&(Object.prototype.hasOwnProperty.call(Ir,jn)?(Xe(Ut,{command:"removeLayer",args:[jn]}),vn.splice(vn.lastIndexOf(jn,vn.length-ao),1)):ao++,Pi=vn[vn.length-Ti],Xe(Ut,{command:"addLayer",args:[nn[jn],Pi]}),vn.splice(vn.length-Ti,0,jn),Cn[jn]=!0);for(let Ti=0;Ti<Er.length;Ti++)if(jn=Er[Ti],aa=Ir[jn],Oa=nn[jn],!Cn[jn]&&!ze(aa,Oa))if(ze(aa.source,Oa.source)&&ze(aa["source-layer"],Oa["source-layer"])&&ze(aa.type,Oa.type)){for(oi in vt(aa.layout,Oa.layout,Ut,jn,null,"setLayoutProperty"),vt(aa.paint,Oa.paint,Ut,jn,null,"setPaintProperty"),ze(aa.filter,Oa.filter)||Xe(Ut,{command:"setFilter",args:[jn,Oa.filter]}),ze(aa.minzoom,Oa.minzoom)&&ze(aa.maxzoom,Oa.maxzoom)||Xe(Ut,{command:"setLayerZoomRange",args:[jn,Oa.minzoom,Oa.maxzoom]}),aa)Object.prototype.hasOwnProperty.call(aa,oi)&&oi!=="layout"&&oi!=="paint"&&oi!=="filter"&&oi!=="metadata"&&oi!=="minzoom"&&oi!=="maxzoom"&&(oi.indexOf("paint.")===0?vt(aa[oi],Oa[oi],Ut,jn,oi.slice(6),"setPaintProperty"):ze(aa[oi],Oa[oi])||Xe(Ut,{command:"setLayerProperty",args:[jn,oi,Oa[oi]]}));for(oi in Oa)Object.prototype.hasOwnProperty.call(Oa,oi)&&!Object.prototype.hasOwnProperty.call(aa,oi)&&oi!=="layout"&&oi!=="paint"&&oi!=="filter"&&oi!=="metadata"&&oi!=="minzoom"&&oi!=="maxzoom"&&(oi.indexOf("paint.")===0?vt(aa[oi],Oa[oi],Ut,jn,oi.slice(6),"setPaintProperty"):ze(aa[oi],Oa[oi])||Xe(Ut,{command:"setLayerProperty",args:[jn,oi,Oa[oi]]}))}else Xe(Ut,{command:"removeLayer",args:[jn]}),Pi=vn[vn.lastIndexOf(jn)+1],Xe(Ut,{command:"addLayer",args:[Oa,Pi]})})(Qe,F.layers,ae)}catch(we){console.warn("Unable to compute style diff:",we),ae=[{command:"setStyle",args:[F]}]}return ae},t.aD=function(K){const F=[],ae=K.id;return ae===void 0&&F.push({message:`layers.${ae}: missing required property "id"`}),K.render===void 0&&F.push({message:`layers.${ae}: missing required method "render"`}),K.renderingMode&&K.renderingMode!=="2d"&&K.renderingMode!=="3d"&&F.push({message:`layers.${ae}: property "renderingMode" must be either "2d" or "3d"`}),F},t.aE=function K(F,ae){if(Array.isArray(F)){if(!Array.isArray(ae)||F.length!==ae.length)return!1;for(let we=0;we<F.length;we++)if(!K(F[we],ae[we]))return!1;return!0}if(typeof F=="object"&&F!==null&&ae!==null){if(typeof ae!="object"||Object.keys(F).length!==Object.keys(ae).length)return!1;for(const we in F)if(!K(F[we],ae[we]))return!1;return!0}return F===ae},t.aF=A,t.aG=y,t.aH=class extends Fo{constructor(K,F){super(K,F),this.current=0}set(K){this.current!==K&&(this.current=K,this.gl.uniform1i(this.location,K))}},t.aI=Ho,t.aJ=class extends Fo{constructor(K,F){super(K,F),this.current=bs}set(K){if(K[12]!==this.current[12]||K[0]!==this.current[0])return this.current=K,void this.gl.uniformMatrix4fv(this.location,!1,K);for(let F=1;F<16;F++)if(K[F]!==this.current[F]){this.current=K,this.gl.uniformMatrix4fv(this.location,!1,K);break}}},t.aK=il,t.aL=Wo,t.aM=br,t.aN=class extends Fo{constructor(K,F){super(K,F),this.current=[0,0,0]}set(K){K[0]===this.current[0]&&K[1]===this.current[1]&&K[2]===this.current[2]||(this.current=K,this.gl.uniform3f(this.location,K[0],K[1],K[2]))}},t.aO=class extends Fo{constructor(K,F){super(K,F),this.current=[0,0]}set(K){K[0]===this.current[0]&&K[1]===this.current[1]||(this.current=K,this.gl.uniform2f(this.location,K[0],K[1]))}},t.aP=function(K,F,ae,we,je,Qe,at){var Et=1/(F-ae),Ut=1/(we-je),ir=1/(Qe-at);return K[0]=-2*Et,K[1]=0,K[2]=0,K[3]=0,K[4]=0,K[5]=-2*Ut,K[6]=0,K[7]=0,K[8]=0,K[9]=0,K[10]=2*ir,K[11]=0,K[12]=(F+ae)*Et,K[13]=(je+we)*Ut,K[14]=(at+Qe)*ir,K[15]=1,K},t.aQ=Jn,t.aR=class extends Kt{},t.aS=ty,t.aT=class extends Nr{},t.aU=zu,t.aV=function(K){return K<=1?1:Math.pow(2,Math.ceil(Math.log(K)/Math.LN2))},t.aW=vs,t.aX=Us,t.aY=hr,t.aZ=class extends Va{},t.a_=function(K,F){return K[0]===F[0]&&K[1]===F[1]&&K[2]===F[2]&&K[3]===F[3]&&K[4]===F[4]&&K[5]===F[5]&&K[6]===F[6]&&K[7]===F[7]&&K[8]===F[8]&&K[9]===F[9]&&K[10]===F[10]&&K[11]===F[11]&&K[12]===F[12]&&K[13]===F[13]&&K[14]===F[14]&&K[15]===F[15]},t.aa=function(K){const F={};if(K.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(ae,we,je,Qe)=>{const at=je||Qe;return F[we]=!at||at.toLowerCase(),""}),F["max-age"]){const ae=parseInt(F["max-age"],10);isNaN(ae)?delete F["max-age"]:F["max-age"]=ae}return F},t.ab=function(K,F){const ae=[];for(const we in K)we in F||ae.push(we);return ae},t.ac=T,t.ad=function(K,F,ae){var we=Math.sin(ae),je=Math.cos(ae),Qe=F[0],at=F[1],Et=F[2],Ut=F[3],ir=F[4],Er=F[5],Ir=F[6],nn=F[7];return F!==K&&(K[8]=F[8],K[9]=F[9],K[10]=F[10],K[11]=F[11],K[12]=F[12],K[13]=F[13],K[14]=F[14],K[15]=F[15]),K[0]=Qe*je+ir*we,K[1]=at*je+Er*we,K[2]=Et*je+Ir*we,K[3]=Ut*je+nn*we,K[4]=ir*je-Qe*we,K[5]=Er*je-at*we,K[6]=Ir*je-Et*we,K[7]=nn*je-Ut*we,K},t.ae=function(K){var F=new eo(16);return F[0]=K[0],F[1]=K[1],F[2]=K[2],F[3]=K[3],F[4]=K[4],F[5]=K[5],F[6]=K[6],F[7]=K[7],F[8]=K[8],F[9]=K[9],F[10]=K[10],F[11]=K[11],F[12]=K[12],F[13]=K[13],F[14]=K[14],F[15]=K[15],F},t.af=_i,t.ag=function(K,F){let ae=0,we=0;if(K.kind==="constant")we=K.layoutSize;else if(K.kind!=="source"){const{interpolationType:je,minZoom:Qe,maxZoom:at}=K,Et=je?T(Oi.interpolationFactor(je,F,Qe,at),0,1):0;K.kind==="camera"?we=Vo.number(K.minSize,K.maxSize,Et):ae=Et}return{uSizeT:ae,uSize:we}},t.ai=function(K,{uSize:F,uSizeT:ae},{lowerSize:we,upperSize:je}){return K.kind==="source"?we/_0:K.kind==="composite"?Vo.number(we/_0,je/_0,ae):F},t.aj=sy,t.ak=function(K,F,ae,we){const je=F.y-K.y,Qe=F.x-K.x,at=we.y-ae.y,Et=we.x-ae.x,Ut=at*Qe-Et*je;if(Ut===0)return null;const ir=(Et*(K.y-ae.y)-at*(K.x-ae.x))/Ut;return new s(K.x+ir*Qe,K.y+ir*je)},t.al=Bk,t.am=La,t.an=Ea,t.ao=function(K){let F=1/0,ae=1/0,we=-1/0,je=-1/0;for(const Qe of K)F=Math.min(F,Qe.x),ae=Math.min(ae,Qe.y),we=Math.max(we,Qe.x),je=Math.max(je,Qe.y);return[F,ae,we,je]},t.ap=Tc,t.ar=i5,t.as=function(K,F){var ae=F[0],we=F[1],je=F[2],Qe=F[3],at=F[4],Et=F[5],Ut=F[6],ir=F[7],Er=F[8],Ir=F[9],nn=F[10],vn=F[11],Cn=F[12],jn=F[13],aa=F[14],Oa=F[15],Pi=ae*Et-we*at,oi=ae*Ut-je*at,Ti=ae*ir-Qe*at,ao=we*Ut-je*Et,Lo=we*ir-Qe*Et,cs=je*ir-Qe*Ut,Al=Er*jn-Ir*Cn,xs=Er*aa-nn*Cn,ss=Er*Oa-vn*Cn,Xs=Ir*aa-nn*jn,Ns=Ir*Oa-vn*jn,Ds=nn*Oa-vn*aa,xo=Pi*Ds-oi*Ns+Ti*Xs+ao*ss-Lo*xs+cs*Al;return xo?(K[0]=(Et*Ds-Ut*Ns+ir*Xs)*(xo=1/xo),K[1]=(je*Ns-we*Ds-Qe*Xs)*xo,K[2]=(jn*cs-aa*Lo+Oa*ao)*xo,K[3]=(nn*Lo-Ir*cs-vn*ao)*xo,K[4]=(Ut*ss-at*Ds-ir*xs)*xo,K[5]=(ae*Ds-je*ss+Qe*xs)*xo,K[6]=(aa*Ti-Cn*cs-Oa*oi)*xo,K[7]=(Er*cs-nn*Ti+vn*oi)*xo,K[8]=(at*Ns-Et*ss+ir*Al)*xo,K[9]=(we*ss-ae*Ns-Qe*Al)*xo,K[10]=(Cn*Lo-jn*Ti+Oa*Pi)*xo,K[11]=(Ir*Ti-Er*Lo-vn*Pi)*xo,K[12]=(Et*xs-at*Xs-Ut*Al)*xo,K[13]=(ae*Xs-we*xs+je*Al)*xo,K[14]=(jn*oi-Cn*ao-aa*Pi)*xo,K[15]=(Er*ao-Ir*oi+nn*Pi)*xo,K):null},t.at=p5,t.au=a5,t.av=m5,t.aw=function(){const K={},F=ue.$version;for(const ae in ue.$root){const we=ue.$root[ae];if(we.required){let je=null;je=ae==="version"?F:we.type==="array"?[]:{},je!=null&&(K[ae]=je)}}return K},t.ax=mo,t.ay=W,t.az=function(K){K=K.slice();const F=Object.create(null);for(let ae=0;ae<K.length;ae++)F[K[ae].id]=K[ae];for(let ae=0;ae<K.length;ae++)"ref"in K[ae]&&(K[ae]=Le(K[ae],F[K[ae].ref]));return K},t.b=U,t.b0=function(K,F){return K[0]=F[0],K[1]=F[1],K[2]=F[2],K[3]=F[3],K[4]=F[4],K[5]=F[5],K[6]=F[6],K[7]=F[7],K[8]=F[8],K[9]=F[9],K[10]=F[10],K[11]=F[11],K[12]=F[12],K[13]=F[13],K[14]=F[14],K[15]=F[15],K},t.b1=function(K,F,ae){return K[0]=F[0]*ae[0],K[1]=F[1]*ae[1],K[2]=F[2]*ae[2],K[3]=F[3]*ae[3],K},t.b2=function(K,F){return K[0]*F[0]+K[1]*F[1]+K[2]*F[2]+K[3]*F[3]},t.b3=M,t.b4=Ik,t.b5=pm,t.b6=function(K,F,ae,we,je){var Qe,at=1/Math.tan(F/2);return K[0]=at/ae,K[1]=0,K[2]=0,K[3]=0,K[4]=0,K[5]=at,K[6]=0,K[7]=0,K[8]=0,K[9]=0,K[11]=-1,K[12]=0,K[13]=0,K[15]=0,je!=null&&je!==1/0?(K[10]=(je+we)*(Qe=1/(we-je)),K[14]=2*je*we*Qe):(K[10]=-1,K[14]=-2*we),K},t.b7=function(K,F,ae){var we=Math.sin(ae),je=Math.cos(ae),Qe=F[4],at=F[5],Et=F[6],Ut=F[7],ir=F[8],Er=F[9],Ir=F[10],nn=F[11];return F!==K&&(K[0]=F[0],K[1]=F[1],K[2]=F[2],K[3]=F[3],K[12]=F[12],K[13]=F[13],K[14]=F[14],K[15]=F[15]),K[4]=Qe*je+ir*we,K[5]=at*je+Er*we,K[6]=Et*je+Ir*we,K[7]=Ut*je+nn*we,K[8]=ir*je-Qe*we,K[9]=Er*je-at*we,K[10]=Ir*je-Et*we,K[11]=nn*je-Ut*we,K},t.b8=c,t.b9=_,t.bA=kv,t.bB=function(K){return K.message===G},t.bC=cu,t.bD=Wl,t.ba=function(K){return K*Math.PI/180},t.bb=function(K,F){const{x:ae,y:we}=Yb.fromLngLat(F);return!(K<0||K>25||we<0||we>=1||ae<0||ae>=1)},t.bc=function(K,F){return K[0]=F[0],K[1]=0,K[2]=0,K[3]=0,K[4]=0,K[5]=F[1],K[6]=0,K[7]=0,K[8]=0,K[9]=0,K[10]=F[2],K[11]=0,K[12]=0,K[13]=0,K[14]=0,K[15]=1,K},t.bd=class extends Tr{},t.be=c5,t.bf=Jk,t.bh=me,t.bi=function(K,F){le.REGISTERED_PROTOCOLS[K]=F},t.bj=function(K){delete le.REGISTERED_PROTOCOLS[K]},t.bk=function(K,F){const ae={};for(let je=0;je<K.length;je++){const Qe=F&&F[K[je].id]||hd(K[je]);F&&(F[K[je].id]=Qe);let at=ae[Qe];at||(at=ae[Qe]=[]),at.push(K[je])}const we=[];for(const je in ae)we.push(ae[je]);return we},t.bl=si,t.bm=Dk,t.bn=zk,t.bo=Tk,t.bp=function(K){K.bucket.createArrays(),K.bucket.tilePixelRatio=su/(512*K.bucket.overscaling),K.bucket.compareText={},K.bucket.iconsNeedLinear=!1;const F=K.bucket.layers[0],ae=F.layout,we=F._unevaluatedLayout._values,je={layoutIconSize:we["icon-size"].possiblyEvaluate(new Cl(K.bucket.zoom+1),K.canonical),layoutTextSize:we["text-size"].possiblyEvaluate(new Cl(K.bucket.zoom+1),K.canonical),textMaxSize:we["text-size"].possiblyEvaluate(new Cl(18))};if(K.bucket.textSizeData.kind==="composite"){const{minZoom:ir,maxZoom:Er}=K.bucket.textSizeData;je.compositeTextSizes=[we["text-size"].possiblyEvaluate(new Cl(ir),K.canonical),we["text-size"].possiblyEvaluate(new Cl(Er),K.canonical)]}if(K.bucket.iconSizeData.kind==="composite"){const{minZoom:ir,maxZoom:Er}=K.bucket.iconSizeData;je.compositeIconSizes=[we["icon-size"].possiblyEvaluate(new Cl(ir),K.canonical),we["icon-size"].possiblyEvaluate(new Cl(Er),K.canonical)]}const Qe=ae.get("text-line-height")*Tc,at=ae.get("text-rotation-alignment")!=="viewport"&&ae.get("symbol-placement")!=="point",Et=ae.get("text-keep-upright"),Ut=ae.get("text-size");for(const ir of K.bucket.features){const Er=ae.get("text-font").evaluate(ir,{},K.canonical).join(","),Ir=Ut.evaluate(ir,{},K.canonical),nn=je.layoutTextSize.evaluate(ir,{},K.canonical),vn=je.layoutIconSize.evaluate(ir,{},K.canonical),Cn={horizontal:{},vertical:void 0},jn=ir.text;let aa,Oa=[0,0];if(jn){const Ti=jn.toString(),ao=ae.get("text-letter-spacing").evaluate(ir,{},K.canonical)*Tc,Lo=$s(Ti)?ao:0,cs=ae.get("text-anchor").evaluate(ir,{},K.canonical),Al=Xk(F,ir,K.canonical);if(!Al){const Ns=ae.get("text-radial-offset").evaluate(ir,{},K.canonical);Oa=Ns?Gk(cs,[Ns*Tc,v5]):ae.get("text-offset").evaluate(ir,{},K.canonical).map(Ds=>Ds*Tc)}let xs=at?"center":ae.get("text-justify").evaluate(ir,{},K.canonical);const ss=ae.get("symbol-placement")==="point"?ae.get("text-max-width").evaluate(ir,{},K.canonical)*Tc:1/0,Xs=()=>{K.bucket.allowVerticalPlacement&&gs(Ti)&&(Cn.vertical=M3(jn,K.glyphMap,K.glyphPositions,K.imagePositions,Er,ss,Qe,cs,"left",Lo,Oa,t.ah.vertical,!0,nn,Ir))};if(!at&&Al){const Ns=new Set;if(xs==="auto")for(let xo=0;xo<Al.values.length;xo+=2)Ns.add(p5(Al.values[xo]));else Ns.add(xs);let Ds=!1;for(const xo of Ns)if(!Cn.horizontal[xo])if(Ds)Cn.horizontal[xo]=Cn.horizontal[0];else{const tl=M3(jn,K.glyphMap,K.glyphPositions,K.imagePositions,Er,ss,Qe,"center",xo,Lo,Oa,t.ah.horizontal,!1,nn,Ir);tl&&(Cn.horizontal[xo]=tl,Ds=tl.positionedLines.length===1)}Xs()}else{xs==="auto"&&(xs=p5(cs));const Ns=M3(jn,K.glyphMap,K.glyphPositions,K.imagePositions,Er,ss,Qe,cs,xs,Lo,Oa,t.ah.horizontal,!1,nn,Ir);Ns&&(Cn.horizontal[xs]=Ns),Xs(),gs(Ti)&&at&&Et&&(Cn.vertical=M3(jn,K.glyphMap,K.glyphPositions,K.imagePositions,Er,ss,Qe,cs,xs,Lo,Oa,t.ah.vertical,!1,nn,Ir))}}let Pi=!1;if(ir.icon&&ir.icon.name){const Ti=K.imageMap[ir.icon.name];Ti&&(aa=v8(K.imagePositions[ir.icon.name],ae.get("icon-offset").evaluate(ir,{},K.canonical),ae.get("icon-anchor").evaluate(ir,{},K.canonical)),Pi=!!Ti.sdf,K.bucket.sdfIcons===void 0?K.bucket.sdfIcons=Pi:K.bucket.sdfIcons!==Pi&&x("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(Ti.pixelRatio!==K.bucket.pixelRatio||ae.get("icon-rotate").constantOr(1)!==0)&&(K.bucket.iconsNeedLinear=!0))}const oi=Yk(Cn.horizontal)||Cn.vertical;K.bucket.iconsInText=!!oi&&oi.iconsInText,(oi||aa)&&T8(K.bucket,ir,Cn,aa,K.imageMap,je,nn,vn,Oa,Pi,K.canonical)}K.showCollisionBoxes&&K.bucket.generateCollisionDebugBuffers()},t.bq=em,t.br=ar,t.bs=yl,t.bt=Pa,t.bu=e5,t.bv=class{constructor(K){this._marks={start:[K.url,"start"].join("#"),end:[K.url,"end"].join("#"),measure:K.url.toString()},performance.mark(this._marks.start)}finish(){performance.mark(this._marks.end);let K=performance.getEntriesByName(this._marks.measure);return K.length===0&&(performance.measure(this._marks.measure,this._marks.start,this._marks.end),K=performance.getEntriesByName(this._marks.measure),performance.clearMarks(this._marks.start),performance.clearMarks(this._marks.end),performance.clearMeasures(this._marks.measure)),K}},t.bw=function(K,F,ae,we,je){return r(this,void 0,void 0,function*(){if(E())try{return yield q(K,F,ae,we,je)}catch{}return(function(Qe,at,Et,Ut,ir){const Er=Qe.width,Ir=Qe.height;z&&H||(z=new OffscreenCanvas(Er,Ir),H=z.getContext("2d",{willReadFrequently:!0})),z.width=Er,z.height=Ir,H.drawImage(Qe,0,0,Er,Ir);const nn=H.getImageData(at,Et,Ut,ir);return H.clearRect(0,0,Er,Ir),nn.data})(K,F,ae,we,je)})},t.bx=f1,t.by=a,t.bz=l,t.c=J,t.d=K=>r(void 0,void 0,void 0,function*(){if(K.byteLength===0)return createImageBitmap(new ImageData(1,1));const F=new Blob([new Uint8Array(K)],{type:"image/png"});try{return createImageBitmap(F)}catch(ae){throw new Error(`Could not load image because of ${ae.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),t.e=k,t.f=K=>new Promise((F,ae)=>{const we=new Image;we.onload=()=>{F(we),URL.revokeObjectURL(we.src),we.onload=null,window.requestAnimationFrame(()=>{we.src=V})},we.onerror=()=>ae(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."));const je=new Blob([new Uint8Array(K)],{type:"image/png"});we.src=K.byteLength?URL.createObjectURL(je):V}),t.g=ge,t.h=(K,F)=>ie(k(K,{type:"json"}),F),t.i=D,t.j=Y,t.k=oe,t.l=(K,F)=>ie(k(K,{type:"arrayBuffer"}),F),t.m=ie,t.n=function(K){return new e5(K).readFields(c8,[])},t.o=ds,t.p=E3,t.q=Ze,t.r=ja,t.s=se,t.t=hi,t.u=Ga,t.v=ue,t.w=x,t.x=function([K,F,ae]){return F+=90,F*=Math.PI/180,ae*=Math.PI/180,{x:K*Math.cos(F)*Math.sin(ae),y:K*Math.sin(F)*Math.sin(ae),z:K*Math.cos(ae)}},t.y=Vo,t.z=Cl}),C("worker",["./shared"],function(t){class r{constructor($e){this.keyCache={},$e&&this.replace($e)}replace($e){this._layerConfigs={},this._layers={},this.update($e,[])}update($e,ot){for(const Ee of $e){this._layerConfigs[Ee.id]=Ee;const Ae=this._layers[Ee.id]=t.aA(Ee);Ae._featureFilter=t.a7(Ae.filter),this.keyCache[Ee.id]&&delete this.keyCache[Ee.id]}for(const Ee of ot)delete this.keyCache[Ee],delete this._layerConfigs[Ee],delete this._layers[Ee];this.familiesBySource={};const De=t.bk(Object.values(this._layerConfigs),this.keyCache);for(const Ee of De){const Ae=Ee.map(Wt=>this._layers[Wt.id]),Ie=Ae[0];if(Ie.visibility==="none")continue;const tt=Ie.source||"";let st=this.familiesBySource[tt];st||(st=this.familiesBySource[tt]={});const Bt=Ie.sourceLayer||"_geojsonTileLayer";let Ft=st[Bt];Ft||(Ft=st[Bt]=[]),Ft.push(Ae)}}}class a{constructor($e){const ot={},De=[];for(const tt in $e){const st=$e[tt],Bt=ot[tt]={};for(const Ft in st){const Wt=st[+Ft];if(!Wt||Wt.bitmap.width===0||Wt.bitmap.height===0)continue;const lr={x:0,y:0,w:Wt.bitmap.width+2,h:Wt.bitmap.height+2};De.push(lr),Bt[Ft]={rect:lr,metrics:Wt.metrics}}}const{w:Ee,h:Ae}=t.p(De),Ie=new t.o({width:Ee||1,height:Ae||1});for(const tt in $e){const st=$e[tt];for(const Bt in st){const Ft=st[+Bt];if(!Ft||Ft.bitmap.width===0||Ft.bitmap.height===0)continue;const Wt=ot[tt][Bt].rect;t.o.copy(Ft.bitmap,Ie,{x:0,y:0},{x:Wt.x+1,y:Wt.y+1},Ft.bitmap)}}this.image=Ie,this.positions=ot}}t.bl("GlyphAtlas",a);class l{constructor($e){this.tileID=new t.S($e.tileID.overscaledZ,$e.tileID.wrap,$e.tileID.canonical.z,$e.tileID.canonical.x,$e.tileID.canonical.y),this.uid=$e.uid,this.zoom=$e.zoom,this.pixelRatio=$e.pixelRatio,this.tileSize=$e.tileSize,this.source=$e.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=$e.showCollisionBoxes,this.collectResourceTiming=!!$e.collectResourceTiming,this.returnDependencies=!!$e.returnDependencies,this.promoteId=$e.promoteId,this.inFlightDependencies=[]}parse($e,ot,De,Ee){return t._(this,void 0,void 0,function*(){this.status="parsing",this.data=$e,this.collisionBoxArray=new t.a5;const Ae=new t.bm(Object.keys($e.layers).sort()),Ie=new t.bn(this.tileID,this.promoteId);Ie.bucketLayerIDs=[];const tt={},st={featureIndex:Ie,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:De},Bt=ot.familiesBySource[this.source];for(const Aa in Bt){const ia=$e.layers[Aa];if(!ia)continue;ia.version===1&&t.w(`Vector tile source "${this.source}" layer "${Aa}" does not use vector tile spec v2 and therefore may have some rendering errors.`);const $a=Ae.encode(Aa),ci=[];for(let _r=0;_r<ia.length;_r++){const Qt=ia.feature(_r),yr=Ie.getId(Qt,Aa);ci.push({feature:Qt,id:yr,index:_r,sourceLayerIndex:$a})}for(const _r of Bt[Aa]){const Qt=_r[0];Qt.source!==this.source&&t.w(`layer.source = ${Qt.source} does not equal this.source = ${this.source}`),Qt.minzoom&&this.zoom<Math.floor(Qt.minzoom)||Qt.maxzoom&&this.zoom>=Qt.maxzoom||Qt.visibility!=="none"&&(i(_r,this.zoom,De),(tt[Qt.id]=Qt.createBucket({index:Ie.bucketLayerIDs.length,layers:_r,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:$a,sourceID:this.source})).populate(ci,st,this.tileID.canonical),Ie.bucketLayerIDs.push(_r.map(yr=>yr.id)))}}const Ft=t.aF(st.glyphDependencies,Aa=>Object.keys(Aa).map(Number));this.inFlightDependencies.forEach(Aa=>Aa?.abort()),this.inFlightDependencies=[];let Wt=Promise.resolve({});if(Object.keys(Ft).length){const Aa=new AbortController;this.inFlightDependencies.push(Aa),Wt=Ee.sendAsync({type:"GG",data:{stacks:Ft,source:this.source,tileID:this.tileID,type:"glyphs"}},Aa)}const lr=Object.keys(st.iconDependencies);let Rr=Promise.resolve({});if(lr.length){const Aa=new AbortController;this.inFlightDependencies.push(Aa),Rr=Ee.sendAsync({type:"GI",data:{icons:lr,source:this.source,tileID:this.tileID,type:"icons"}},Aa)}const Mr=Object.keys(st.patternDependencies);let Sr=Promise.resolve({});if(Mr.length){const Aa=new AbortController;this.inFlightDependencies.push(Aa),Sr=Ee.sendAsync({type:"GI",data:{icons:Mr,source:this.source,tileID:this.tileID,type:"patterns"}},Aa)}const[Kr,Hn,ga]=yield Promise.all([Wt,Rr,Sr]),ua=new a(Kr),Ta=new t.bo(Hn,ga);for(const Aa in tt){const ia=tt[Aa];ia instanceof t.a6?(i(ia.layers,this.zoom,De),t.bp({bucket:ia,glyphMap:Kr,glyphPositions:ua.positions,imageMap:Hn,imagePositions:Ta.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical})):ia.hasPattern&&(ia instanceof t.bq||ia instanceof t.br||ia instanceof t.bs)&&(i(ia.layers,this.zoom,De),ia.addFeatures(st,this.tileID.canonical,Ta.patternPositions))}return this.status="done",{buckets:Object.values(tt).filter(Aa=>!Aa.isEmpty()),featureIndex:Ie,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:ua.image,imageAtlas:Ta,glyphMap:this.returnDependencies?Kr:null,iconMap:this.returnDependencies?Hn:null,glyphPositions:this.returnDependencies?ua.positions:null}})}}function i(Ot,$e,ot){const De=new t.z($e);for(const Ee of Ot)Ee.recalculate(De,ot)}class s{constructor($e,ot,De){this.actor=$e,this.layerIndex=ot,this.availableImages=De,this.fetching={},this.loading={},this.loaded={}}loadVectorTile($e,ot){return t._(this,void 0,void 0,function*(){const De=yield t.l($e.request,ot);try{return{vectorTile:new t.bt.VectorTile(new t.bu(De.data)),rawData:De.data,cacheControl:De.cacheControl,expires:De.expires}}catch(Ee){const Ae=new Uint8Array(De.data);let Ie=`Unable to parse the tile at ${$e.request.url}, `;throw Ie+=Ae[0]===31&&Ae[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${Ee.message}`,new Error(Ie)}})}loadTile($e){return t._(this,void 0,void 0,function*(){const ot=$e.uid,De=!!($e&&$e.request&&$e.request.collectResourceTiming)&&new t.bv($e.request),Ee=new l($e);this.loading[ot]=Ee;const Ae=new AbortController;Ee.abort=Ae;try{const Ie=yield this.loadVectorTile($e,Ae);if(delete this.loading[ot],!Ie)return null;const tt=Ie.rawData,st={};Ie.expires&&(st.expires=Ie.expires),Ie.cacheControl&&(st.cacheControl=Ie.cacheControl);const Bt={};if(De){const Wt=De.finish();Wt&&(Bt.resourceTiming=JSON.parse(JSON.stringify(Wt)))}Ee.vectorTile=Ie.vectorTile;const Ft=Ee.parse(Ie.vectorTile,this.layerIndex,this.availableImages,this.actor);this.loaded[ot]=Ee,this.fetching[ot]={rawTileData:tt,cacheControl:st,resourceTiming:Bt};try{const Wt=yield Ft;return t.e({rawTileData:tt.slice(0)},Wt,st,Bt)}finally{delete this.fetching[ot]}}catch(Ie){throw delete this.loading[ot],Ee.status="done",this.loaded[ot]=Ee,Ie}})}reloadTile($e){return t._(this,void 0,void 0,function*(){const ot=$e.uid;if(!this.loaded||!this.loaded[ot])throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");const De=this.loaded[ot];if(De.showCollisionBoxes=$e.showCollisionBoxes,De.status==="parsing"){const Ee=yield De.parse(De.vectorTile,this.layerIndex,this.availableImages,this.actor);let Ae;if(this.fetching[ot]){const{rawTileData:Ie,cacheControl:tt,resourceTiming:st}=this.fetching[ot];delete this.fetching[ot],Ae=t.e({rawTileData:Ie.slice(0)},Ee,tt,st)}else Ae=Ee;return Ae}if(De.status==="done"&&De.vectorTile)return De.parse(De.vectorTile,this.layerIndex,this.availableImages,this.actor)})}abortTile($e){return t._(this,void 0,void 0,function*(){const ot=this.loading,De=$e.uid;ot&&ot[De]&&ot[De].abort&&(ot[De].abort.abort(),delete ot[De])})}removeTile($e){return t._(this,void 0,void 0,function*(){this.loaded&&this.loaded[$e.uid]&&delete this.loaded[$e.uid]})}}class o{constructor(){this.loaded={}}loadTile($e){return t._(this,void 0,void 0,function*(){const{uid:ot,encoding:De,rawImageData:Ee,redFactor:Ae,greenFactor:Ie,blueFactor:tt,baseShift:st}=$e,Bt=Ee.width+2,Ft=Ee.height+2,Wt=t.b(Ee)?new t.R({width:Bt,height:Ft},yield t.bw(Ee,-1,-1,Bt,Ft)):Ee,lr=new t.bx(ot,Wt,De,Ae,Ie,tt,st);return this.loaded=this.loaded||{},this.loaded[ot]=lr,lr})}removeTile($e){const ot=this.loaded,De=$e.uid;ot&&ot[De]&&delete ot[De]}}function u(Ot,$e){if(Ot.length!==0){d(Ot[0],$e);for(var ot=1;ot<Ot.length;ot++)d(Ot[ot],!$e)}}function d(Ot,$e){for(var ot=0,De=0,Ee=0,Ae=Ot.length,Ie=Ae-1;Ee<Ae;Ie=Ee++){var tt=(Ot[Ee][0]-Ot[Ie][0])*(Ot[Ie][1]+Ot[Ee][1]),st=ot+tt;De+=Math.abs(ot)>=Math.abs(tt)?ot-st+tt:tt-st+ot,ot=st}ot+De>=0!=!!$e&&Ot.reverse()}var h=t.by(function Ot($e,ot){var De,Ee=$e&&$e.type;if(Ee==="FeatureCollection")for(De=0;De<$e.features.length;De++)Ot($e.features[De],ot);else if(Ee==="GeometryCollection")for(De=0;De<$e.geometries.length;De++)Ot($e.geometries[De],ot);else if(Ee==="Feature")Ot($e.geometry,ot);else if(Ee==="Polygon")u($e.coordinates,ot);else if(Ee==="MultiPolygon")for(De=0;De<$e.coordinates.length;De++)u($e.coordinates[De],ot);return $e});const g=t.bt.VectorTileFeature.prototype.toGeoJSON;var m={exports:{}},E=t.bz,c=t.bt.VectorTileFeature,_=T;function T(Ot,$e){this.options=$e||{},this.features=Ot,this.length=Ot.length}function M(Ot,$e){this.id=typeof Ot.id=="number"?Ot.id:void 0,this.type=Ot.type,this.rawGeometry=Ot.type===1?[Ot.geometry]:Ot.geometry,this.properties=Ot.tags,this.extent=$e||4096}T.prototype.feature=function(Ot){return new M(this.features[Ot],this.options.extent)},M.prototype.loadGeometry=function(){var Ot=this.rawGeometry;this.geometry=[];for(var $e=0;$e<Ot.length;$e++){for(var ot=Ot[$e],De=[],Ee=0;Ee<ot.length;Ee++)De.push(new E(ot[Ee][0],ot[Ee][1]));this.geometry.push(De)}return this.geometry},M.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var Ot=this.geometry,$e=1/0,ot=-1/0,De=1/0,Ee=-1/0,Ae=0;Ae<Ot.length;Ae++)for(var Ie=Ot[Ae],tt=0;tt<Ie.length;tt++){var st=Ie[tt];$e=Math.min($e,st.x),ot=Math.max(ot,st.x),De=Math.min(De,st.y),Ee=Math.max(Ee,st.y)}return[$e,De,ot,Ee]},M.prototype.toGeoJSON=c.prototype.toGeoJSON;var k=t.bA,b=_;function A(Ot){var $e=new k;return(function(ot,De){for(var Ee in ot.layers)De.writeMessage(3,y,ot.layers[Ee])})(Ot,$e),$e.finish()}function y(Ot,$e){var ot;$e.writeVarintField(15,Ot.version||1),$e.writeStringField(1,Ot.name||""),$e.writeVarintField(5,Ot.extent||4096);var De={keys:[],values:[],keycache:{},valuecache:{}};for(ot=0;ot<Ot.length;ot++)De.feature=Ot.feature(ot),$e.writeMessage(2,f,De);var Ee=De.keys;for(ot=0;ot<Ee.length;ot++)$e.writeStringField(3,Ee[ot]);var Ae=De.values;for(ot=0;ot<Ae.length;ot++)$e.writeMessage(4,B,Ae[ot])}function f(Ot,$e){var ot=Ot.feature;ot.id!==void 0&&$e.writeVarintField(1,ot.id),$e.writeMessage(2,p,Ot),$e.writeVarintField(3,ot.type),$e.writeMessage(4,D,ot)}function p(Ot,$e){var ot=Ot.feature,De=Ot.keys,Ee=Ot.values,Ae=Ot.keycache,Ie=Ot.valuecache;for(var tt in ot.properties){var st=ot.properties[tt],Bt=Ae[tt];if(st!==null){Bt===void 0&&(De.push(tt),Ae[tt]=Bt=De.length-1),$e.writeVarint(Bt);var Ft=typeof st;Ft!=="string"&&Ft!=="boolean"&&Ft!=="number"&&(st=JSON.stringify(st));var Wt=Ft+":"+st,lr=Ie[Wt];lr===void 0&&(Ee.push(st),Ie[Wt]=lr=Ee.length-1),$e.writeVarint(lr)}}}function x(Ot,$e){return($e<<3)+(7&Ot)}function N(Ot){return Ot<<1^Ot>>31}function D(Ot,$e){for(var ot=Ot.loadGeometry(),De=Ot.type,Ee=0,Ae=0,Ie=ot.length,tt=0;tt<Ie;tt++){var st=ot[tt],Bt=1;De===1&&(Bt=st.length),$e.writeVarint(x(1,Bt));for(var Ft=De===3?st.length-1:st.length,Wt=0;Wt<Ft;Wt++){Wt===1&&De!==1&&$e.writeVarint(x(2,Ft-1));var lr=st[Wt].x-Ee,Rr=st[Wt].y-Ae;$e.writeVarint(N(lr)),$e.writeVarint(N(Rr)),Ee+=lr,Ae+=Rr}De===3&&$e.writeVarint(x(7,1))}}function B(Ot,$e){var ot=typeof Ot;ot==="string"?$e.writeStringField(1,Ot):ot==="boolean"?$e.writeBooleanField(7,Ot):ot==="number"&&(Ot%1!=0?$e.writeDoubleField(3,Ot):Ot<0?$e.writeSVarintField(6,Ot):$e.writeVarintField(5,Ot))}m.exports=A,m.exports.fromVectorTileJs=A,m.exports.fromGeojsonVt=function(Ot,$e){$e=$e||{};var ot={};for(var De in Ot)ot[De]=new b(Ot[De].features,$e),ot[De].name=De,ot[De].version=$e.version,ot[De].extent=$e.extent;return A({layers:ot})},m.exports.GeoJSONWrapper=b;var U=t.by(m.exports);const V={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:Ot=>Ot},q=Math.fround||(z=new Float32Array(1),Ot=>(z[0]=+Ot,z[0]));var z;const H=3,G=5,J=6;class le{constructor($e){this.options=Object.assign(Object.create(V),$e),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load($e){const{log:ot,minZoom:De,maxZoom:Ee}=this.options;ot&&console.time("total time");const Ae=`prepare ${$e.length} points`;ot&&console.time(Ae),this.points=$e;const Ie=[];for(let st=0;st<$e.length;st++){const Bt=$e[st];if(!Bt.geometry)continue;const[Ft,Wt]=Bt.geometry.coordinates,lr=q(me(Ft)),Rr=q(W(Wt));Ie.push(lr,Rr,1/0,st,-1,1),this.options.reduce&&Ie.push(0)}let tt=this.trees[Ee+1]=this._createTree(Ie);ot&&console.timeEnd(Ae);for(let st=Ee;st>=De;st--){const Bt=+Date.now();tt=this.trees[st]=this._createTree(this._cluster(tt,st)),ot&&console.log("z%d: %d clusters in %dms",st,tt.numItems,+Date.now()-Bt)}return ot&&console.timeEnd("total time"),this}getClusters($e,ot){let De=(($e[0]+180)%360+360)%360-180;const Ee=Math.max(-90,Math.min(90,$e[1]));let Ae=$e[2]===180?180:(($e[2]+180)%360+360)%360-180;const Ie=Math.max(-90,Math.min(90,$e[3]));if($e[2]-$e[0]>=360)De=-180,Ae=180;else if(De>Ae){const Wt=this.getClusters([De,Ee,180,Ie],ot),lr=this.getClusters([-180,Ee,Ae,Ie],ot);return Wt.concat(lr)}const tt=this.trees[this._limitZoom(ot)],st=tt.range(me(De),W(Ie),me(Ae),W(Ee)),Bt=tt.data,Ft=[];for(const Wt of st){const lr=this.stride*Wt;Ft.push(Bt[lr+G]>1?ge(Bt,lr,this.clusterProps):this.points[Bt[lr+H]])}return Ft}getChildren($e){const ot=this._getOriginId($e),De=this._getOriginZoom($e),Ee="No cluster with the specified id.",Ae=this.trees[De];if(!Ae)throw new Error(Ee);const Ie=Ae.data;if(ot*this.stride>=Ie.length)throw new Error(Ee);const tt=this.options.radius/(this.options.extent*Math.pow(2,De-1)),st=Ae.within(Ie[ot*this.stride],Ie[ot*this.stride+1],tt),Bt=[];for(const Ft of st){const Wt=Ft*this.stride;Ie[Wt+4]===$e&&Bt.push(Ie[Wt+G]>1?ge(Ie,Wt,this.clusterProps):this.points[Ie[Wt+H]])}if(Bt.length===0)throw new Error(Ee);return Bt}getLeaves($e,ot,De){const Ee=[];return this._appendLeaves(Ee,$e,ot=ot||10,De=De||0,0),Ee}getTile($e,ot,De){const Ee=this.trees[this._limitZoom($e)],Ae=Math.pow(2,$e),{extent:Ie,radius:tt}=this.options,st=tt/Ie,Bt=(De-st)/Ae,Ft=(De+1+st)/Ae,Wt={features:[]};return this._addTileFeatures(Ee.range((ot-st)/Ae,Bt,(ot+1+st)/Ae,Ft),Ee.data,ot,De,Ae,Wt),ot===0&&this._addTileFeatures(Ee.range(1-st/Ae,Bt,1,Ft),Ee.data,Ae,De,Ae,Wt),ot===Ae-1&&this._addTileFeatures(Ee.range(0,Bt,st/Ae,Ft),Ee.data,-1,De,Ae,Wt),Wt.features.length?Wt:null}getClusterExpansionZoom($e){let ot=this._getOriginZoom($e)-1;for(;ot<=this.options.maxZoom;){const De=this.getChildren($e);if(ot++,De.length!==1)break;$e=De[0].properties.cluster_id}return ot}_appendLeaves($e,ot,De,Ee,Ae){const Ie=this.getChildren(ot);for(const tt of Ie){const st=tt.properties;if(st&&st.cluster?Ae+st.point_count<=Ee?Ae+=st.point_count:Ae=this._appendLeaves($e,st.cluster_id,De,Ee,Ae):Ae<Ee?Ae++:$e.push(tt),$e.length===De)break}return Ae}_createTree($e){const ot=new t.av($e.length/this.stride|0,this.options.nodeSize,Float32Array);for(let De=0;De<$e.length;De+=this.stride)ot.add($e[De],$e[De+1]);return ot.finish(),ot.data=$e,ot}_addTileFeatures($e,ot,De,Ee,Ae,Ie){for(const tt of $e){const st=tt*this.stride,Bt=ot[st+G]>1;let Ft,Wt,lr;if(Bt)Ft=de(ot,st,this.clusterProps),Wt=ot[st],lr=ot[st+1];else{const Sr=this.points[ot[st+H]];Ft=Sr.properties;const[Kr,Hn]=Sr.geometry.coordinates;Wt=me(Kr),lr=W(Hn)}const Rr={type:1,geometry:[[Math.round(this.options.extent*(Wt*Ae-De)),Math.round(this.options.extent*(lr*Ae-Ee))]],tags:Ft};let Mr;Mr=Bt||this.options.generateId?ot[st+H]:this.points[ot[st+H]].id,Mr!==void 0&&(Rr.id=Mr),Ie.features.push(Rr)}}_limitZoom($e){return Math.max(this.options.minZoom,Math.min(Math.floor(+$e),this.options.maxZoom+1))}_cluster($e,ot){const{radius:De,extent:Ee,reduce:Ae,minPoints:Ie}=this.options,tt=De/(Ee*Math.pow(2,ot)),st=$e.data,Bt=[],Ft=this.stride;for(let Wt=0;Wt<st.length;Wt+=Ft){if(st[Wt+2]<=ot)continue;st[Wt+2]=ot;const lr=st[Wt],Rr=st[Wt+1],Mr=$e.within(st[Wt],st[Wt+1],tt),Sr=st[Wt+G];let Kr=Sr;for(const Hn of Mr){const ga=Hn*Ft;st[ga+2]>ot&&(Kr+=st[ga+G])}if(Kr>Sr&&Kr>=Ie){let Hn,ga=lr*Sr,ua=Rr*Sr,Ta=-1;const Aa=((Wt/Ft|0)<<5)+(ot+1)+this.points.length;for(const ia of Mr){const $a=ia*Ft;if(st[$a+2]<=ot)continue;st[$a+2]=ot;const ci=st[$a+G];ga+=st[$a]*ci,ua+=st[$a+1]*ci,st[$a+4]=Aa,Ae&&(Hn||(Hn=this._map(st,Wt,!0),Ta=this.clusterProps.length,this.clusterProps.push(Hn)),Ae(Hn,this._map(st,$a)))}st[Wt+4]=Aa,Bt.push(ga/Kr,ua/Kr,1/0,Aa,-1,Kr),Ae&&Bt.push(Ta)}else{for(let Hn=0;Hn<Ft;Hn++)Bt.push(st[Wt+Hn]);if(Kr>1)for(const Hn of Mr){const ga=Hn*Ft;if(!(st[ga+2]<=ot)){st[ga+2]=ot;for(let ua=0;ua<Ft;ua++)Bt.push(st[ga+ua])}}}}return Bt}_getOriginId($e){return $e-this.points.length>>5}_getOriginZoom($e){return($e-this.points.length)%32}_map($e,ot,De){if($e[ot+G]>1){const Ie=this.clusterProps[$e[ot+J]];return De?Object.assign({},Ie):Ie}const Ee=this.points[$e[ot+H]].properties,Ae=this.options.map(Ee);return De&&Ae===Ee?Object.assign({},Ae):Ae}}function ge(Ot,$e,ot){return{type:"Feature",id:Ot[$e+H],properties:de(Ot,$e,ot),geometry:{type:"Point",coordinates:[(De=Ot[$e],360*(De-.5)),ie(Ot[$e+1])]}};var De}function de(Ot,$e,ot){const De=Ot[$e+G],Ee=De>=1e4?`${Math.round(De/1e3)}k`:De>=1e3?Math.round(De/100)/10+"k":De,Ae=Ot[$e+J],Ie=Ae===-1?{}:Object.assign({},ot[Ae]);return Object.assign(Ie,{cluster:!0,cluster_id:Ot[$e+H],point_count:De,point_count_abbreviated:Ee})}function me(Ot){return Ot/360+.5}function W(Ot){const $e=Math.sin(Ot*Math.PI/180),ot=.5-.25*Math.log((1+$e)/(1-$e))/Math.PI;return ot<0?0:ot>1?1:ot}function ie(Ot){const $e=(180-360*Ot)*Math.PI/180;return 360*Math.atan(Math.exp($e))/Math.PI-90}function se(Ot,$e,ot,De){let Ee=De;const Ae=$e+(ot-$e>>1);let Ie,tt=ot-$e;const st=Ot[$e],Bt=Ot[$e+1],Ft=Ot[ot],Wt=Ot[ot+1];for(let lr=$e+3;lr<ot;lr+=3){const Rr=ee(Ot[lr],Ot[lr+1],st,Bt,Ft,Wt);if(Rr>Ee)Ie=lr,Ee=Rr;else if(Rr===Ee){const Mr=Math.abs(lr-Ae);Mr<tt&&(Ie=lr,tt=Mr)}}Ee>De&&(Ie-$e>3&&se(Ot,$e,Ie,De),Ot[Ie+2]=Ee,ot-Ie>3&&se(Ot,Ie,ot,De))}function ee(Ot,$e,ot,De,Ee,Ae){let Ie=Ee-ot,tt=Ae-De;if(Ie!==0||tt!==0){const st=((Ot-ot)*Ie+($e-De)*tt)/(Ie*Ie+tt*tt);st>1?(ot=Ee,De=Ae):st>0&&(ot+=Ie*st,De+=tt*st)}return Ie=Ot-ot,tt=$e-De,Ie*Ie+tt*tt}function pe(Ot,$e,ot,De){const Ee={id:Ot??null,type:$e,geometry:ot,tags:De,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if($e==="Point"||$e==="MultiPoint"||$e==="LineString")oe(Ee,ot);else if($e==="Polygon")oe(Ee,ot[0]);else if($e==="MultiLineString")for(const Ae of ot)oe(Ee,Ae);else if($e==="MultiPolygon")for(const Ae of ot)oe(Ee,Ae[0]);return Ee}function oe(Ot,$e){for(let ot=0;ot<$e.length;ot+=3)Ot.minX=Math.min(Ot.minX,$e[ot]),Ot.minY=Math.min(Ot.minY,$e[ot+1]),Ot.maxX=Math.max(Ot.maxX,$e[ot]),Ot.maxY=Math.max(Ot.maxY,$e[ot+1])}function Y(Ot,$e,ot,De){if(!$e.geometry)return;const Ee=$e.geometry.coordinates;if(Ee&&Ee.length===0)return;const Ae=$e.geometry.type,Ie=Math.pow(ot.tolerance/((1<<ot.maxZoom)*ot.extent),2);let tt=[],st=$e.id;if(ot.promoteId?st=$e.properties[ot.promoteId]:ot.generateId&&(st=De||0),Ae==="Point")ce(Ee,tt);else if(Ae==="MultiPoint")for(const Bt of Ee)ce(Bt,tt);else if(Ae==="LineString")ue(Ee,tt,Ie,!1);else if(Ae==="MultiLineString"){if(ot.lineMetrics){for(const Bt of Ee)tt=[],ue(Bt,tt,Ie,!1),Ot.push(pe(st,"LineString",tt,$e.properties));return}_e(Ee,tt,Ie,!1)}else if(Ae==="Polygon")_e(Ee,tt,Ie,!0);else{if(Ae!=="MultiPolygon"){if(Ae==="GeometryCollection"){for(const Bt of $e.geometry.geometries)Y(Ot,{id:st,geometry:Bt,properties:$e.properties},ot,De);return}throw new Error("Input data is not a valid GeoJSON object.")}for(const Bt of Ee){const Ft=[];_e(Bt,Ft,Ie,!0),tt.push(Ft)}}Ot.push(pe(st,Ae,tt,$e.properties))}function ce(Ot,$e){$e.push(Le(Ot[0]),ze(Ot[1]),0)}function ue(Ot,$e,ot,De){let Ee,Ae,Ie=0;for(let st=0;st<Ot.length;st++){const Bt=Le(Ot[st][0]),Ft=ze(Ot[st][1]);$e.push(Bt,Ft,0),st>0&&(Ie+=De?(Ee*Ft-Bt*Ae)/2:Math.sqrt(Math.pow(Bt-Ee,2)+Math.pow(Ft-Ae,2))),Ee=Bt,Ae=Ft}const tt=$e.length-3;$e[2]=1,se($e,0,tt,ot),$e[tt+2]=1,$e.size=Math.abs(Ie),$e.start=0,$e.end=$e.size}function _e(Ot,$e,ot,De){for(let Ee=0;Ee<Ot.length;Ee++){const Ae=[];ue(Ot[Ee],Ae,ot,De),$e.push(Ae)}}function Le(Ot){return Ot/360+.5}function ze(Ot){const $e=Math.sin(Ot*Math.PI/180),ot=.5-.25*Math.log((1+$e)/(1-$e))/Math.PI;return ot<0?0:ot>1?1:ot}function Xe(Ot,$e,ot,De,Ee,Ae,Ie,tt){if(De/=$e,Ae>=(ot/=$e)&&Ie<De)return Ot;if(Ie<ot||Ae>=De)return null;const st=[];for(const Bt of Ot){const Ft=Bt.geometry;let Wt=Bt.type;const lr=Ee===0?Bt.minX:Bt.minY,Rr=Ee===0?Bt.maxX:Bt.maxY;if(lr>=ot&&Rr<De){st.push(Bt);continue}if(Rr<ot||lr>=De)continue;let Mr=[];if(Wt==="Point"||Wt==="MultiPoint")Ve(Ft,Mr,ot,De,Ee);else if(Wt==="LineString")rt(Ft,Mr,ot,De,Ee,!1,tt.lineMetrics);else if(Wt==="MultiLineString")_t(Ft,Mr,ot,De,Ee,!1);else if(Wt==="Polygon")_t(Ft,Mr,ot,De,Ee,!0);else if(Wt==="MultiPolygon")for(const Sr of Ft){const Kr=[];_t(Sr,Kr,ot,De,Ee,!0),Kr.length&&Mr.push(Kr)}if(Mr.length){if(tt.lineMetrics&&Wt==="LineString"){for(const Sr of Mr)st.push(pe(Bt.id,Wt,Sr,Bt.tags));continue}Wt!=="LineString"&&Wt!=="MultiLineString"||(Mr.length===1?(Wt="LineString",Mr=Mr[0]):Wt="MultiLineString"),Wt!=="Point"&&Wt!=="MultiPoint"||(Wt=Mr.length===3?"Point":"MultiPoint"),st.push(pe(Bt.id,Wt,Mr,Bt.tags))}}return st.length?st:null}function Ve(Ot,$e,ot,De,Ee){for(let Ae=0;Ae<Ot.length;Ae+=3){const Ie=Ot[Ae+Ee];Ie>=ot&&Ie<=De&&vt($e,Ot[Ae],Ot[Ae+1],Ot[Ae+2])}}function rt(Ot,$e,ot,De,Ee,Ae,Ie){let tt=mt(Ot);const st=Ee===0?ut:Fe;let Bt,Ft,Wt=Ot.start;for(let Kr=0;Kr<Ot.length-3;Kr+=3){const Hn=Ot[Kr],ga=Ot[Kr+1],ua=Ot[Kr+2],Ta=Ot[Kr+3],Aa=Ot[Kr+4],ia=Ee===0?Hn:ga,$a=Ee===0?Ta:Aa;let ci=!1;Ie&&(Bt=Math.sqrt(Math.pow(Hn-Ta,2)+Math.pow(ga-Aa,2))),ia<ot?$a>ot&&(Ft=st(tt,Hn,ga,Ta,Aa,ot),Ie&&(tt.start=Wt+Bt*Ft)):ia>De?$a<De&&(Ft=st(tt,Hn,ga,Ta,Aa,De),Ie&&(tt.start=Wt+Bt*Ft)):vt(tt,Hn,ga,ua),$a<ot&&ia>=ot&&(Ft=st(tt,Hn,ga,Ta,Aa,ot),ci=!0),$a>De&&ia<=De&&(Ft=st(tt,Hn,ga,Ta,Aa,De),ci=!0),!Ae&&ci&&(Ie&&(tt.end=Wt+Bt*Ft),$e.push(tt),tt=mt(Ot)),Ie&&(Wt+=Bt)}let lr=Ot.length-3;const Rr=Ot[lr],Mr=Ot[lr+1],Sr=Ee===0?Rr:Mr;Sr>=ot&&Sr<=De&&vt(tt,Rr,Mr,Ot[lr+2]),lr=tt.length-3,Ae&&lr>=3&&(tt[lr]!==tt[0]||tt[lr+1]!==tt[1])&&vt(tt,tt[0],tt[1],tt[2]),tt.length&&$e.push(tt)}function mt(Ot){const $e=[];return $e.size=Ot.size,$e.start=Ot.start,$e.end=Ot.end,$e}function _t(Ot,$e,ot,De,Ee,Ae){for(const Ie of Ot)rt(Ie,$e,ot,De,Ee,Ae,!1)}function vt(Ot,$e,ot,De){Ot.push($e,ot,De)}function ut(Ot,$e,ot,De,Ee,Ae){const Ie=(Ae-$e)/(De-$e);return vt(Ot,Ae,ot+(Ee-ot)*Ie,1),Ie}function Fe(Ot,$e,ot,De,Ee,Ae){const Ie=(Ae-ot)/(Ee-ot);return vt(Ot,$e+(De-$e)*Ie,Ae,1),Ie}function Pe(Ot,$e){const ot=[];for(let De=0;De<Ot.length;De++){const Ee=Ot[De],Ae=Ee.type;let Ie;if(Ae==="Point"||Ae==="MultiPoint"||Ae==="LineString")Ie=be(Ee.geometry,$e);else if(Ae==="MultiLineString"||Ae==="Polygon"){Ie=[];for(const tt of Ee.geometry)Ie.push(be(tt,$e))}else if(Ae==="MultiPolygon"){Ie=[];for(const tt of Ee.geometry){const st=[];for(const Bt of tt)st.push(be(Bt,$e));Ie.push(st)}}ot.push(pe(Ee.id,Ae,Ie,Ee.tags))}return ot}function be(Ot,$e){const ot=[];ot.size=Ot.size,Ot.start!==void 0&&(ot.start=Ot.start,ot.end=Ot.end);for(let De=0;De<Ot.length;De+=3)ot.push(Ot[De]+$e,Ot[De+1],Ot[De+2]);return ot}function Ye(Ot,$e){if(Ot.transformed)return Ot;const ot=1<<Ot.z,De=Ot.x,Ee=Ot.y;for(const Ae of Ot.features){const Ie=Ae.geometry,tt=Ae.type;if(Ae.geometry=[],tt===1)for(let st=0;st<Ie.length;st+=2)Ae.geometry.push(yt(Ie[st],Ie[st+1],$e,ot,De,Ee));else for(let st=0;st<Ie.length;st++){const Bt=[];for(let Ft=0;Ft<Ie[st].length;Ft+=2)Bt.push(yt(Ie[st][Ft],Ie[st][Ft+1],$e,ot,De,Ee));Ae.geometry.push(Bt)}}return Ot.transformed=!0,Ot}function yt(Ot,$e,ot,De,Ee,Ae){return[Math.round(ot*(Ot*De-Ee)),Math.round(ot*($e*De-Ae))]}function wt(Ot,$e,ot,De,Ee){const Ae=$e===Ee.maxZoom?0:Ee.tolerance/((1<<$e)*Ee.extent),Ie={features:[],numPoints:0,numSimplified:0,numFeatures:Ot.length,source:null,x:ot,y:De,z:$e,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0};for(const tt of Ot)ht(Ie,tt,Ae,Ee);return Ie}function ht(Ot,$e,ot,De){const Ee=$e.geometry,Ae=$e.type,Ie=[];if(Ot.minX=Math.min(Ot.minX,$e.minX),Ot.minY=Math.min(Ot.minY,$e.minY),Ot.maxX=Math.max(Ot.maxX,$e.maxX),Ot.maxY=Math.max(Ot.maxY,$e.maxY),Ae==="Point"||Ae==="MultiPoint")for(let tt=0;tt<Ee.length;tt+=3)Ie.push(Ee[tt],Ee[tt+1]),Ot.numPoints++,Ot.numSimplified++;else if(Ae==="LineString")Yt(Ie,Ee,Ot,ot,!1,!1);else if(Ae==="MultiLineString"||Ae==="Polygon")for(let tt=0;tt<Ee.length;tt++)Yt(Ie,Ee[tt],Ot,ot,Ae==="Polygon",tt===0);else if(Ae==="MultiPolygon")for(let tt=0;tt<Ee.length;tt++){const st=Ee[tt];for(let Bt=0;Bt<st.length;Bt++)Yt(Ie,st[Bt],Ot,ot,!0,Bt===0)}if(Ie.length){let tt=$e.tags||null;if(Ae==="LineString"&&De.lineMetrics){tt={};for(const Bt in $e.tags)tt[Bt]=$e.tags[Bt];tt.mapbox_clip_start=Ee.start/Ee.size,tt.mapbox_clip_end=Ee.end/Ee.size}const st={geometry:Ie,type:Ae==="Polygon"||Ae==="MultiPolygon"?3:Ae==="LineString"||Ae==="MultiLineString"?2:1,tags:tt};$e.id!==null&&(st.id=$e.id),Ot.features.push(st)}}function Yt(Ot,$e,ot,De,Ee,Ae){const Ie=De*De;if(De>0&&$e.size<(Ee?Ie:De))return void(ot.numPoints+=$e.length/3);const tt=[];for(let st=0;st<$e.length;st+=3)(De===0||$e[st+2]>Ie)&&(ot.numSimplified++,tt.push($e[st],$e[st+1])),ot.numPoints++;Ee&&(function(st,Bt){let Ft=0;for(let Wt=0,lr=st.length,Rr=lr-2;Wt<lr;Rr=Wt,Wt+=2)Ft+=(st[Wt]-st[Rr])*(st[Wt+1]+st[Rr+1]);if(Ft>0===Bt)for(let Wt=0,lr=st.length;Wt<lr/2;Wt+=2){const Rr=st[Wt],Mr=st[Wt+1];st[Wt]=st[lr-2-Wt],st[Wt+1]=st[lr-1-Wt],st[lr-2-Wt]=Rr,st[lr-1-Wt]=Mr}})(tt,Ae),Ot.push(tt)}const $t={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0};class fr{constructor($e,ot){const De=(ot=this.options=(function(Ae,Ie){for(const tt in Ie)Ae[tt]=Ie[tt];return Ae})(Object.create($t),ot)).debug;if(De&&console.time("preprocess data"),ot.maxZoom<0||ot.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(ot.promoteId&&ot.generateId)throw new Error("promoteId and generateId cannot be used together.");let Ee=(function(Ae,Ie){const tt=[];if(Ae.type==="FeatureCollection")for(let st=0;st<Ae.features.length;st++)Y(tt,Ae.features[st],Ie,st);else Y(tt,Ae.type==="Feature"?Ae:{geometry:Ae},Ie);return tt})($e,ot);this.tiles={},this.tileCoords=[],De&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",ot.indexMaxZoom,ot.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),Ee=(function(Ae,Ie){const tt=Ie.buffer/Ie.extent;let st=Ae;const Bt=Xe(Ae,1,-1-tt,tt,0,-1,2,Ie),Ft=Xe(Ae,1,1-tt,2+tt,0,-1,2,Ie);return(Bt||Ft)&&(st=Xe(Ae,1,-tt,1+tt,0,-1,2,Ie)||[],Bt&&(st=Pe(Bt,1).concat(st)),Ft&&(st=st.concat(Pe(Ft,-1)))),st})(Ee,ot),Ee.length&&this.splitTile(Ee,0,0,0),De&&(Ee.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)))}splitTile($e,ot,De,Ee,Ae,Ie,tt){const st=[$e,ot,De,Ee],Bt=this.options,Ft=Bt.debug;for(;st.length;){Ee=st.pop(),De=st.pop(),ot=st.pop(),$e=st.pop();const Wt=1<<ot,lr=mr(ot,De,Ee);let Rr=this.tiles[lr];if(!Rr&&(Ft>1&&console.time("creation"),Rr=this.tiles[lr]=wt($e,ot,De,Ee,Bt),this.tileCoords.push({z:ot,x:De,y:Ee}),Ft)){Ft>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",ot,De,Ee,Rr.numFeatures,Rr.numPoints,Rr.numSimplified),console.timeEnd("creation"));const ci=`z${ot}`;this.stats[ci]=(this.stats[ci]||0)+1,this.total++}if(Rr.source=$e,Ae==null){if(ot===Bt.indexMaxZoom||Rr.numPoints<=Bt.indexMaxPoints)continue}else{if(ot===Bt.maxZoom||ot===Ae)continue;if(Ae!=null){const ci=Ae-ot;if(De!==Ie>>ci||Ee!==tt>>ci)continue}}if(Rr.source=null,$e.length===0)continue;Ft>1&&console.time("clipping");const Mr=.5*Bt.buffer/Bt.extent,Sr=.5-Mr,Kr=.5+Mr,Hn=1+Mr;let ga=null,ua=null,Ta=null,Aa=null,ia=Xe($e,Wt,De-Mr,De+Kr,0,Rr.minX,Rr.maxX,Bt),$a=Xe($e,Wt,De+Sr,De+Hn,0,Rr.minX,Rr.maxX,Bt);$e=null,ia&&(ga=Xe(ia,Wt,Ee-Mr,Ee+Kr,1,Rr.minY,Rr.maxY,Bt),ua=Xe(ia,Wt,Ee+Sr,Ee+Hn,1,Rr.minY,Rr.maxY,Bt),ia=null),$a&&(Ta=Xe($a,Wt,Ee-Mr,Ee+Kr,1,Rr.minY,Rr.maxY,Bt),Aa=Xe($a,Wt,Ee+Sr,Ee+Hn,1,Rr.minY,Rr.maxY,Bt),$a=null),Ft>1&&console.timeEnd("clipping"),st.push(ga||[],ot+1,2*De,2*Ee),st.push(ua||[],ot+1,2*De,2*Ee+1),st.push(Ta||[],ot+1,2*De+1,2*Ee),st.push(Aa||[],ot+1,2*De+1,2*Ee+1)}}getTile($e,ot,De){$e=+$e,ot=+ot,De=+De;const Ee=this.options,{extent:Ae,debug:Ie}=Ee;if($e<0||$e>24)return null;const tt=1<<$e,st=mr($e,ot=ot+tt&tt-1,De);if(this.tiles[st])return Ye(this.tiles[st],Ae);Ie>1&&console.log("drilling down to z%d-%d-%d",$e,ot,De);let Bt,Ft=$e,Wt=ot,lr=De;for(;!Bt&&Ft>0;)Ft--,Wt>>=1,lr>>=1,Bt=this.tiles[mr(Ft,Wt,lr)];return Bt&&Bt.source?(Ie>1&&(console.log("found parent tile z%d-%d-%d",Ft,Wt,lr),console.time("drilling down")),this.splitTile(Bt.source,Ft,Wt,lr,$e,ot,De),Ie>1&&console.timeEnd("drilling down"),this.tiles[st]?Ye(this.tiles[st],Ae):null):null}}function mr(Ot,$e,ot){return 32*((1<<Ot)*ot+$e)+Ot}function Ur(Ot,$e){return $e?Ot.properties[$e]:Ot.id}function jr(Ot,$e){if(Ot==null)return!0;if(Ot.type==="Feature")return Ur(Ot,$e)!=null;if(Ot.type==="FeatureCollection"){const ot=new Set;for(const De of Ot.features){const Ee=Ur(De,$e);if(Ee==null||ot.has(Ee))return!1;ot.add(Ee)}return!0}return!1}function fn(Ot,$e){const ot=new Map;if(Ot!=null)if(Ot.type==="Feature")ot.set(Ur(Ot,$e),Ot);else for(const De of Ot.features)ot.set(Ur(De,$e),De);return ot}class Br extends s{constructor(){super(...arguments),this._dataUpdateable=new Map}loadVectorTile($e,ot){return t._(this,void 0,void 0,function*(){const De=$e.tileID.canonical;if(!this._geoJSONIndex)throw new Error("Unable to parse the data into a cluster or geojson");const Ee=this._geoJSONIndex.getTile(De.z,De.x,De.y);if(!Ee)return null;const Ae=new class{constructor(tt){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=t.X,this.length=tt.length,this._features=tt}feature(tt){return new class{constructor(st){this._feature=st,this.extent=t.X,this.type=st.type,this.properties=st.tags,"id"in st&&!isNaN(st.id)&&(this.id=parseInt(st.id,10))}loadGeometry(){if(this._feature.type===1){const st=[];for(const Bt of this._feature.geometry)st.push([new t.P(Bt[0],Bt[1])]);return st}{const st=[];for(const Bt of this._feature.geometry){const Ft=[];for(const Wt of Bt)Ft.push(new t.P(Wt[0],Wt[1]));st.push(Ft)}return st}}toGeoJSON(st,Bt,Ft){return g.call(this,st,Bt,Ft)}}(this._features[tt])}}(Ee.features);let Ie=U(Ae);return Ie.byteOffset===0&&Ie.byteLength===Ie.buffer.byteLength||(Ie=new Uint8Array(Ie)),{vectorTile:Ae,rawData:Ie.buffer}})}loadData($e){return t._(this,void 0,void 0,function*(){var ot;(ot=this._pendingRequest)===null||ot===void 0||ot.abort();const De=!!($e&&$e.request&&$e.request.collectResourceTiming)&&new t.bv($e.request);this._pendingRequest=new AbortController;try{this._pendingData=this.loadAndProcessGeoJSON($e,this._pendingRequest),this._geoJSONIndex=$e.cluster?new le((function({superclusterOptions:Ie,clusterProperties:tt}){if(!tt||!Ie)return Ie;const st={},Bt={},Ft={accumulated:null,zoom:0},Wt={properties:null},lr=Object.keys(tt);for(const Rr of lr){const[Mr,Sr]=tt[Rr],Kr=t.bC(Sr),Hn=t.bC(typeof Mr=="string"?[Mr,["accumulated"],["get",Rr]]:Mr);st[Rr]=Kr.value,Bt[Rr]=Hn.value}return Ie.map=Rr=>{Wt.properties=Rr;const Mr={};for(const Sr of lr)Mr[Sr]=st[Sr].evaluate(Ft,Wt);return Mr},Ie.reduce=(Rr,Mr)=>{Wt.properties=Mr;for(const Sr of lr)Ft.accumulated=Rr[Sr],Rr[Sr]=Bt[Sr].evaluate(Ft,Wt)},Ie})($e)).load((yield this._pendingData).features):(Ee=yield this._pendingData,new fr(Ee,$e.geojsonVtOptions)),this.loaded={};const Ae={};if(De){const Ie=De.finish();Ie&&(Ae.resourceTiming={},Ae.resourceTiming[$e.source]=JSON.parse(JSON.stringify(Ie)))}return Ae}catch(Ae){if(delete this._pendingRequest,t.bB(Ae))return{abandoned:!0};throw Ae}var Ee})}getData(){return t._(this,void 0,void 0,function*(){return this._pendingData})}reloadTile($e){const ot=this.loaded;return ot&&ot[$e.uid]?super.reloadTile($e):this.loadTile($e)}loadAndProcessGeoJSON($e,ot){return t._(this,void 0,void 0,function*(){let De=yield this.loadGeoJSON($e,ot);if(delete this._pendingRequest,typeof De!="object")throw new Error(`Input data given to '${$e.source}' is not a valid GeoJSON object.`);if(h(De,!0),$e.filter){const Ee=t.bC($e.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(Ee.result==="error")throw new Error(Ee.value.map(Ie=>`${Ie.key}: ${Ie.message}`).join(", "));De={type:"FeatureCollection",features:De.features.filter(Ie=>Ee.value.evaluate({zoom:0},Ie))}}return De})}loadGeoJSON($e,ot){return t._(this,void 0,void 0,function*(){const{promoteId:De}=$e;if($e.request){const Ee=yield t.h($e.request,ot);return this._dataUpdateable=jr(Ee.data,De)?fn(Ee.data,De):void 0,Ee.data}if(typeof $e.data=="string")try{const Ee=JSON.parse($e.data);return this._dataUpdateable=jr(Ee,De)?fn(Ee,De):void 0,Ee}catch{throw new Error(`Input data given to '${$e.source}' is not a valid GeoJSON object.`)}if(!$e.dataDiff)throw new Error(`Input data given to '${$e.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${$e.source}`);return(function(Ee,Ae,Ie){var tt,st,Bt,Ft;if(Ae.removeAll&&Ee.clear(),Ae.remove)for(const Wt of Ae.remove)Ee.delete(Wt);if(Ae.add)for(const Wt of Ae.add){const lr=Ur(Wt,Ie);lr!=null&&Ee.set(lr,Wt)}if(Ae.update)for(const Wt of Ae.update){let lr=Ee.get(Wt.id);if(lr==null)continue;const Rr=!Wt.removeAllProperties&&(((tt=Wt.removeProperties)===null||tt===void 0?void 0:tt.length)>0||((st=Wt.addOrUpdateProperties)===null||st===void 0?void 0:st.length)>0);if((Wt.newGeometry||Wt.removeAllProperties||Rr)&&(lr=Object.assign({},lr),Ee.set(Wt.id,lr),Rr&&(lr.properties=Object.assign({},lr.properties))),Wt.newGeometry&&(lr.geometry=Wt.newGeometry),Wt.removeAllProperties)lr.properties={};else if(((Bt=Wt.removeProperties)===null||Bt===void 0?void 0:Bt.length)>0)for(const Mr of Wt.removeProperties)Object.prototype.hasOwnProperty.call(lr.properties,Mr)&&delete lr.properties[Mr];if(((Ft=Wt.addOrUpdateProperties)===null||Ft===void 0?void 0:Ft.length)>0)for(const{key:Mr,value:Sr}of Wt.addOrUpdateProperties)lr.properties[Mr]=Sr}})(this._dataUpdateable,$e.dataDiff,De),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}})}removeSource($e){return t._(this,void 0,void 0,function*(){this._pendingRequest&&this._pendingRequest.abort()})}getClusterExpansionZoom($e){return this._geoJSONIndex.getClusterExpansionZoom($e.clusterId)}getClusterChildren($e){return this._geoJSONIndex.getChildren($e.clusterId)}getClusterLeaves($e){return this._geoJSONIndex.getLeaves($e.clusterId,$e.limit,$e.offset)}}class Qr{constructor($e){this.self=$e,this.actor=new t.F($e),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.self.registerWorkerSource=(ot,De)=>{if(this.externalWorkerSourceTypes[ot])throw new Error(`Worker source with name "${ot}" already registered.`);this.externalWorkerSourceTypes[ot]=De},this.self.addProtocol=t.bi,this.self.removeProtocol=t.bj,this.self.registerRTLTextPlugin=ot=>{if(t.bD.isParsed())throw new Error("RTL text plugin already registered.");t.bD.setMethods(ot)},this.actor.registerMessageHandler("LDT",(ot,De)=>this._getDEMWorkerSource(ot,De.source).loadTile(De)),this.actor.registerMessageHandler("RDT",(ot,De)=>t._(this,void 0,void 0,function*(){this._getDEMWorkerSource(ot,De.source).removeTile(De)})),this.actor.registerMessageHandler("GCEZ",(ot,De)=>t._(this,void 0,void 0,function*(){return this._getWorkerSource(ot,De.type,De.source).getClusterExpansionZoom(De)})),this.actor.registerMessageHandler("GCC",(ot,De)=>t._(this,void 0,void 0,function*(){return this._getWorkerSource(ot,De.type,De.source).getClusterChildren(De)})),this.actor.registerMessageHandler("GCL",(ot,De)=>t._(this,void 0,void 0,function*(){return this._getWorkerSource(ot,De.type,De.source).getClusterLeaves(De)})),this.actor.registerMessageHandler("LD",(ot,De)=>this._getWorkerSource(ot,De.type,De.source).loadData(De)),this.actor.registerMessageHandler("GD",(ot,De)=>this._getWorkerSource(ot,De.type,De.source).getData()),this.actor.registerMessageHandler("LT",(ot,De)=>this._getWorkerSource(ot,De.type,De.source).loadTile(De)),this.actor.registerMessageHandler("RT",(ot,De)=>this._getWorkerSource(ot,De.type,De.source).reloadTile(De)),this.actor.registerMessageHandler("AT",(ot,De)=>this._getWorkerSource(ot,De.type,De.source).abortTile(De)),this.actor.registerMessageHandler("RMT",(ot,De)=>this._getWorkerSource(ot,De.type,De.source).removeTile(De)),this.actor.registerMessageHandler("RS",(ot,De)=>t._(this,void 0,void 0,function*(){if(!this.workerSources[ot]||!this.workerSources[ot][De.type]||!this.workerSources[ot][De.type][De.source])return;const Ee=this.workerSources[ot][De.type][De.source];delete this.workerSources[ot][De.type][De.source],Ee.removeSource!==void 0&&Ee.removeSource(De)})),this.actor.registerMessageHandler("RM",ot=>t._(this,void 0,void 0,function*(){delete this.layerIndexes[ot],delete this.availableImages[ot],delete this.workerSources[ot],delete this.demWorkerSources[ot]})),this.actor.registerMessageHandler("SR",(ot,De)=>t._(this,void 0,void 0,function*(){this.referrer=De})),this.actor.registerMessageHandler("SRPS",(ot,De)=>this._syncRTLPluginState(ot,De)),this.actor.registerMessageHandler("IS",(ot,De)=>t._(this,void 0,void 0,function*(){this.self.importScripts(De)})),this.actor.registerMessageHandler("SI",(ot,De)=>this._setImages(ot,De)),this.actor.registerMessageHandler("UL",(ot,De)=>t._(this,void 0,void 0,function*(){this._getLayerIndex(ot).update(De.layers,De.removedIds)})),this.actor.registerMessageHandler("SL",(ot,De)=>t._(this,void 0,void 0,function*(){this._getLayerIndex(ot).replace(De)}))}_setImages($e,ot){return t._(this,void 0,void 0,function*(){this.availableImages[$e]=ot;for(const De in this.workerSources[$e]){const Ee=this.workerSources[$e][De];for(const Ae in Ee)Ee[Ae].availableImages=ot}})}_syncRTLPluginState($e,ot){return t._(this,void 0,void 0,function*(){if(t.bD.isParsed())return t.bD.getState();if(ot.pluginStatus!=="loading")return t.bD.setState(ot),ot;const De=ot.pluginURL;if(this.self.importScripts(De),t.bD.isParsed()){const Ee={pluginStatus:"loaded",pluginURL:De};return t.bD.setState(Ee),Ee}throw t.bD.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${De}`)})}_getAvailableImages($e){let ot=this.availableImages[$e];return ot||(ot=[]),ot}_getLayerIndex($e){let ot=this.layerIndexes[$e];return ot||(ot=this.layerIndexes[$e]=new r),ot}_getWorkerSource($e,ot,De){if(this.workerSources[$e]||(this.workerSources[$e]={}),this.workerSources[$e][ot]||(this.workerSources[$e][ot]={}),!this.workerSources[$e][ot][De]){const Ee={sendAsync:(Ae,Ie)=>(Ae.targetMapId=$e,this.actor.sendAsync(Ae,Ie))};switch(ot){case"vector":this.workerSources[$e][ot][De]=new s(Ee,this._getLayerIndex($e),this._getAvailableImages($e));break;case"geojson":this.workerSources[$e][ot][De]=new Br(Ee,this._getLayerIndex($e),this._getAvailableImages($e));break;default:this.workerSources[$e][ot][De]=new this.externalWorkerSourceTypes[ot](Ee,this._getLayerIndex($e),this._getAvailableImages($e))}}return this.workerSources[$e][ot][De]}_getDEMWorkerSource($e,ot){return this.demWorkerSources[$e]||(this.demWorkerSources[$e]={}),this.demWorkerSources[$e][ot]||(this.demWorkerSources[$e][ot]=new o),this.demWorkerSources[$e][ot]}}return t.i(self)&&(self.worker=new Qr(self)),Qr}),C("index",["exports","./shared"],function(t,r){var a="4.7.1";let l,i;const s={now:typeof performance<"u"&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frameAsync:Ze=>new Promise((O,fe)=>{const Re=requestAnimationFrame(O);Ze.signal.addEventListener("abort",()=>{cancelAnimationFrame(Re),fe(r.c())})}),getImageData(Ze,O=0){return this.getImageCanvasContext(Ze).getImageData(-O,-O,Ze.width+2*O,Ze.height+2*O)},getImageCanvasContext(Ze){const O=window.document.createElement("canvas"),fe=O.getContext("2d",{willReadFrequently:!0});if(!fe)throw new Error("failed to create canvas 2d context");return O.width=Ze.width,O.height=Ze.height,fe.drawImage(Ze,0,0,Ze.width,Ze.height),fe},resolveURL:Ze=>(l||(l=document.createElement("a")),l.href=Ze,l.href),hardwareConcurrency:typeof navigator<"u"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(i==null&&(i=matchMedia("(prefers-reduced-motion: reduce)")),i.matches)}};class o{static testProp(O){if(!o.docStyle)return O[0];for(let fe=0;fe<O.length;fe++)if(O[fe]in o.docStyle)return O[fe];return O[0]}static create(O,fe,Re){const Oe=window.document.createElement(O);return fe!==void 0&&(Oe.className=fe),Re&&Re.appendChild(Oe),Oe}static createNS(O,fe){return window.document.createElementNS(O,fe)}static disableDrag(){o.docStyle&&o.selectProp&&(o.userSelect=o.docStyle[o.selectProp],o.docStyle[o.selectProp]="none")}static enableDrag(){o.docStyle&&o.selectProp&&(o.docStyle[o.selectProp]=o.userSelect)}static setTransform(O,fe){O.style[o.transformProp]=fe}static addEventListener(O,fe,Re,Oe={}){O.addEventListener(fe,Re,"passive"in Oe?Oe:Oe.capture)}static removeEventListener(O,fe,Re,Oe={}){O.removeEventListener(fe,Re,"passive"in Oe?Oe:Oe.capture)}static suppressClickInternal(O){O.preventDefault(),O.stopPropagation(),window.removeEventListener("click",o.suppressClickInternal,!0)}static suppressClick(){window.addEventListener("click",o.suppressClickInternal,!0),window.setTimeout(()=>{window.removeEventListener("click",o.suppressClickInternal,!0)},0)}static getScale(O){const fe=O.getBoundingClientRect();return{x:fe.width/O.offsetWidth||1,y:fe.height/O.offsetHeight||1,boundingClientRect:fe}}static getPoint(O,fe,Re){const Oe=fe.boundingClientRect;return new r.P((Re.clientX-Oe.left)/fe.x-O.clientLeft,(Re.clientY-Oe.top)/fe.y-O.clientTop)}static mousePos(O,fe){const Re=o.getScale(O);return o.getPoint(O,Re,fe)}static touchPos(O,fe){const Re=[],Oe=o.getScale(O);for(let We=0;We<fe.length;We++)Re.push(o.getPoint(O,Oe,fe[We]));return Re}static mouseButton(O){return O.button}static remove(O){O.parentNode&&O.parentNode.removeChild(O)}}o.docStyle=typeof window<"u"&&window.document&&window.document.documentElement.style,o.selectProp=o.testProp(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]),o.transformProp=o.testProp(["transform","WebkitTransform"]);const u={supported:!1,testSupport:function(Ze){!g&&h&&(m?E(Ze):d=Ze)}};let d,h,g=!1,m=!1;function E(Ze){const O=Ze.createTexture();Ze.bindTexture(Ze.TEXTURE_2D,O);try{if(Ze.texImage2D(Ze.TEXTURE_2D,0,Ze.RGBA,Ze.RGBA,Ze.UNSIGNED_BYTE,h),Ze.isContextLost())return;u.supported=!0}catch{}Ze.deleteTexture(O),g=!0}var c;typeof document<"u"&&(h=document.createElement("img"),h.onload=()=>{d&&E(d),d=null,m=!0},h.onerror=()=>{g=!0,d=null},h.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="),(function(Ze){let O,fe,Re,Oe;Ze.resetRequestQueue=()=>{O=[],fe=0,Re=0,Oe={}},Ze.addThrottleControl=rr=>{const Tr=Re++;return Oe[Tr]=rr,Tr},Ze.removeThrottleControl=rr=>{delete Oe[rr],Ct()},Ze.getImage=(rr,Tr,Fr=!0)=>new Promise((Vr,mn)=>{u.supported&&(rr.headers||(rr.headers={}),rr.headers.accept="image/webp,*/*"),r.e(rr,{type:"image"}),O.push({abortController:Tr,requestParameters:rr,supportImageRefresh:Fr,state:"queued",onError:Dn=>{mn(Dn)},onSuccess:Dn=>{Vr(Dn)}}),Ct()});const We=rr=>r._(this,void 0,void 0,function*(){rr.state="running";const{requestParameters:Tr,supportImageRefresh:Fr,onError:Vr,onSuccess:mn,abortController:Dn}=rr,nt=Fr===!1&&!r.i(self)&&!r.g(Tr.url)&&(!Tr.headers||Object.keys(Tr.headers).reduce((Pt,Gt)=>Pt&&Gt==="accept",!0));fe++;const ct=nt?Nt(Tr,Dn):r.m(Tr,Dn);try{const Pt=yield ct;delete rr.abortController,rr.state="completed",Pt.data instanceof HTMLImageElement||r.b(Pt.data)?mn(Pt):Pt.data&&mn({data:yield(Tt=Pt.data,typeof createImageBitmap=="function"?r.d(Tt):r.f(Tt)),cacheControl:Pt.cacheControl,expires:Pt.expires})}catch(Pt){delete rr.abortController,Vr(Pt)}finally{fe--,Ct()}var Tt}),Ct=()=>{const rr=(()=>{for(const Tr of Object.keys(Oe))if(Oe[Tr]())return!0;return!1})()?r.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:r.a.MAX_PARALLEL_IMAGE_REQUESTS;for(let Tr=fe;Tr<rr&&O.length>0;Tr++){const Fr=O.shift();Fr.abortController.signal.aborted?Tr--:We(Fr)}},Nt=(rr,Tr)=>new Promise((Fr,Vr)=>{const mn=new Image,Dn=rr.url,nt=rr.credentials;nt&&nt==="include"?mn.crossOrigin="use-credentials":(nt&&nt==="same-origin"||!r.s(Dn))&&(mn.crossOrigin="anonymous"),Tr.signal.addEventListener("abort",()=>{mn.src="",Vr(r.c())}),mn.fetchPriority="high",mn.onload=()=>{mn.onerror=mn.onload=null,Fr({data:mn})},mn.onerror=()=>{mn.onerror=mn.onload=null,Tr.signal.aborted||Vr(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."))},mn.src=Dn})})(c||(c={})),c.resetRequestQueue();class _{constructor(O){this._transformRequestFn=O}transformRequest(O,fe){return this._transformRequestFn&&this._transformRequestFn(O,fe)||{url:O}}setTransformRequest(O){this._transformRequestFn=O}}function T(Ze){var O=new r.A(3);return O[0]=Ze[0],O[1]=Ze[1],O[2]=Ze[2],O}var M,k=function(Ze,O,fe){return Ze[0]=O[0]-fe[0],Ze[1]=O[1]-fe[1],Ze[2]=O[2]-fe[2],Ze};M=new r.A(3),r.A!=Float32Array&&(M[0]=0,M[1]=0,M[2]=0);var b=function(Ze){var O=Ze[0],fe=Ze[1];return O*O+fe*fe};function A(Ze){const O=[];if(typeof Ze=="string")O.push({id:"default",url:Ze});else if(Ze&&Ze.length>0){const fe=[];for(const{id:Re,url:Oe}of Ze){const We=`${Re}${Oe}`;fe.indexOf(We)===-1&&(fe.push(We),O.push({id:Re,url:Oe}))}}return O}function y(Ze,O,fe){const Re=Ze.split("?");return Re[0]+=`${O}${fe}`,Re.join("?")}(function(){var Ze=new r.A(2);r.A!=Float32Array&&(Ze[0]=0,Ze[1]=0)})();class f{constructor(O,fe,Re,Oe){this.context=O,this.format=Re,this.texture=O.gl.createTexture(),this.update(fe,Oe)}update(O,fe,Re){const{width:Oe,height:We}=O,Ct=!(this.size&&this.size[0]===Oe&&this.size[1]===We||Re),{context:Nt}=this,{gl:rr}=Nt;if(this.useMipmap=!!(fe&&fe.useMipmap),rr.bindTexture(rr.TEXTURE_2D,this.texture),Nt.pixelStoreUnpackFlipY.set(!1),Nt.pixelStoreUnpack.set(1),Nt.pixelStoreUnpackPremultiplyAlpha.set(this.format===rr.RGBA&&(!fe||fe.premultiply!==!1)),Ct)this.size=[Oe,We],O instanceof HTMLImageElement||O instanceof HTMLCanvasElement||O instanceof HTMLVideoElement||O instanceof ImageData||r.b(O)?rr.texImage2D(rr.TEXTURE_2D,0,this.format,this.format,rr.UNSIGNED_BYTE,O):rr.texImage2D(rr.TEXTURE_2D,0,this.format,Oe,We,0,this.format,rr.UNSIGNED_BYTE,O.data);else{const{x:Tr,y:Fr}=Re||{x:0,y:0};O instanceof HTMLImageElement||O instanceof HTMLCanvasElement||O instanceof HTMLVideoElement||O instanceof ImageData||r.b(O)?rr.texSubImage2D(rr.TEXTURE_2D,0,Tr,Fr,rr.RGBA,rr.UNSIGNED_BYTE,O):rr.texSubImage2D(rr.TEXTURE_2D,0,Tr,Fr,Oe,We,rr.RGBA,rr.UNSIGNED_BYTE,O.data)}this.useMipmap&&this.isSizePowerOfTwo()&&rr.generateMipmap(rr.TEXTURE_2D)}bind(O,fe,Re){const{context:Oe}=this,{gl:We}=Oe;We.bindTexture(We.TEXTURE_2D,this.texture),Re!==We.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(Re=We.LINEAR),O!==this.filter&&(We.texParameteri(We.TEXTURE_2D,We.TEXTURE_MAG_FILTER,O),We.texParameteri(We.TEXTURE_2D,We.TEXTURE_MIN_FILTER,Re||O),this.filter=O),fe!==this.wrap&&(We.texParameteri(We.TEXTURE_2D,We.TEXTURE_WRAP_S,fe),We.texParameteri(We.TEXTURE_2D,We.TEXTURE_WRAP_T,fe),this.wrap=fe)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){const{gl:O}=this.context;O.deleteTexture(this.texture),this.texture=null}}function p(Ze){const{userImage:O}=Ze;return!!(O&&O.render&&O.render())&&(Ze.data.replace(new Uint8Array(O.data.buffer)),!0)}class x extends r.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new r.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(O){if(this.loaded!==O&&(this.loaded=O,O)){for(const{ids:fe,promiseResolve:Re}of this.requestors)Re(this._getImagesForIds(fe));this.requestors=[]}}getImage(O){const fe=this.images[O];if(fe&&!fe.data&&fe.spriteData){const Re=fe.spriteData;fe.data=new r.R({width:Re.width,height:Re.height},Re.context.getImageData(Re.x,Re.y,Re.width,Re.height).data),fe.spriteData=null}return fe}addImage(O,fe){if(this.images[O])throw new Error(`Image id ${O} already exist, use updateImage instead`);this._validate(O,fe)&&(this.images[O]=fe)}_validate(O,fe){let Re=!0;const Oe=fe.data||fe.spriteData;return this._validateStretch(fe.stretchX,Oe&&Oe.width)||(this.fire(new r.j(new Error(`Image "${O}" has invalid "stretchX" value`))),Re=!1),this._validateStretch(fe.stretchY,Oe&&Oe.height)||(this.fire(new r.j(new Error(`Image "${O}" has invalid "stretchY" value`))),Re=!1),this._validateContent(fe.content,fe)||(this.fire(new r.j(new Error(`Image "${O}" has invalid "content" value`))),Re=!1),Re}_validateStretch(O,fe){if(!O)return!0;let Re=0;for(const Oe of O){if(Oe[0]<Re||Oe[1]<Oe[0]||fe<Oe[1])return!1;Re=Oe[1]}return!0}_validateContent(O,fe){if(!O)return!0;if(O.length!==4)return!1;const Re=fe.spriteData,Oe=Re&&Re.width||fe.data.width,We=Re&&Re.height||fe.data.height;return!(O[0]<0||Oe<O[0]||O[1]<0||We<O[1]||O[2]<0||Oe<O[2]||O[3]<0||We<O[3]||O[2]<O[0]||O[3]<O[1])}updateImage(O,fe,Re=!0){const Oe=this.getImage(O);if(Re&&(Oe.data.width!==fe.data.width||Oe.data.height!==fe.data.height))throw new Error(`size mismatch between old image (${Oe.data.width}x${Oe.data.height}) and new image (${fe.data.width}x${fe.data.height}).`);fe.version=Oe.version+1,this.images[O]=fe,this.updatedImages[O]=!0}removeImage(O){const fe=this.images[O];delete this.images[O],delete this.patterns[O],fe.userImage&&fe.userImage.onRemove&&fe.userImage.onRemove()}listImages(){return Object.keys(this.images)}getImages(O){return new Promise((fe,Re)=>{let Oe=!0;if(!this.isLoaded())for(const We of O)this.images[We]||(Oe=!1);this.isLoaded()||Oe?fe(this._getImagesForIds(O)):this.requestors.push({ids:O,promiseResolve:fe})})}_getImagesForIds(O){const fe={};for(const Re of O){let Oe=this.getImage(Re);Oe||(this.fire(new r.k("styleimagemissing",{id:Re})),Oe=this.getImage(Re)),Oe?fe[Re]={data:Oe.data.clone(),pixelRatio:Oe.pixelRatio,sdf:Oe.sdf,version:Oe.version,stretchX:Oe.stretchX,stretchY:Oe.stretchY,content:Oe.content,textFitWidth:Oe.textFitWidth,textFitHeight:Oe.textFitHeight,hasRenderCallback:!!(Oe.userImage&&Oe.userImage.render)}:r.w(`Image "${Re}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.`)}return fe}getPixelSize(){const{width:O,height:fe}=this.atlasImage;return{width:O,height:fe}}getPattern(O){const fe=this.patterns[O],Re=this.getImage(O);if(!Re)return null;if(fe&&fe.position.version===Re.version)return fe.position;if(fe)fe.position.version=Re.version;else{const Oe={w:Re.data.width+2,h:Re.data.height+2,x:0,y:0},We=new r.I(Oe,Re);this.patterns[O]={bin:Oe,position:We}}return this._updatePatternAtlas(),this.patterns[O].position}bind(O){const fe=O.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new f(O,this.atlasImage,fe.RGBA),this.atlasTexture.bind(fe.LINEAR,fe.CLAMP_TO_EDGE)}_updatePatternAtlas(){const O=[];for(const We in this.patterns)O.push(this.patterns[We].bin);const{w:fe,h:Re}=r.p(O),Oe=this.atlasImage;Oe.resize({width:fe||1,height:Re||1});for(const We in this.patterns){const{bin:Ct}=this.patterns[We],Nt=Ct.x+1,rr=Ct.y+1,Tr=this.getImage(We).data,Fr=Tr.width,Vr=Tr.height;r.R.copy(Tr,Oe,{x:0,y:0},{x:Nt,y:rr},{width:Fr,height:Vr}),r.R.copy(Tr,Oe,{x:0,y:Vr-1},{x:Nt,y:rr-1},{width:Fr,height:1}),r.R.copy(Tr,Oe,{x:0,y:0},{x:Nt,y:rr+Vr},{width:Fr,height:1}),r.R.copy(Tr,Oe,{x:Fr-1,y:0},{x:Nt-1,y:rr},{width:1,height:Vr}),r.R.copy(Tr,Oe,{x:0,y:0},{x:Nt+Fr,y:rr},{width:1,height:Vr})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(O){for(const fe of O){if(this.callbackDispatchedThisFrame[fe])continue;this.callbackDispatchedThisFrame[fe]=!0;const Re=this.getImage(fe);Re||r.w(`Image with ID: "${fe}" was not found`),p(Re)&&this.updateImage(fe,Re)}}}const N=1e20;function D(Ze,O,fe,Re,Oe,We,Ct,Nt,rr){for(let Tr=O;Tr<O+Re;Tr++)B(Ze,fe*We+Tr,We,Oe,Ct,Nt,rr);for(let Tr=fe;Tr<fe+Oe;Tr++)B(Ze,Tr*We+O,1,Re,Ct,Nt,rr)}function B(Ze,O,fe,Re,Oe,We,Ct){We[0]=0,Ct[0]=-N,Ct[1]=N,Oe[0]=Ze[O];for(let Nt=1,rr=0,Tr=0;Nt<Re;Nt++){Oe[Nt]=Ze[O+Nt*fe];const Fr=Nt*Nt;do{const Vr=We[rr];Tr=(Oe[Nt]-Oe[Vr]+Fr-Vr*Vr)/(Nt-Vr)/2}while(Tr<=Ct[rr]&&--rr>-1);rr++,We[rr]=Nt,Ct[rr]=Tr,Ct[rr+1]=N}for(let Nt=0,rr=0;Nt<Re;Nt++){for(;Ct[rr+1]<Nt;)rr++;const Tr=We[rr],Fr=Nt-Tr;Ze[O+Nt*fe]=Oe[Tr]+Fr*Fr}}class U{constructor(O,fe){this.requestManager=O,this.localIdeographFontFamily=fe,this.entries={}}setURL(O){this.url=O}getGlyphs(O){return r._(this,void 0,void 0,function*(){const fe=[];for(const We in O)for(const Ct of O[We])fe.push(this._getAndCacheGlyphsPromise(We,Ct));const Re=yield Promise.all(fe),Oe={};for(const{stack:We,id:Ct,glyph:Nt}of Re)Oe[We]||(Oe[We]={}),Oe[We][Ct]=Nt&&{id:Nt.id,bitmap:Nt.bitmap.clone(),metrics:Nt.metrics};return Oe})}_getAndCacheGlyphsPromise(O,fe){return r._(this,void 0,void 0,function*(){let Re=this.entries[O];Re||(Re=this.entries[O]={glyphs:{},requests:{},ranges:{}});let Oe=Re.glyphs[fe];if(Oe!==void 0)return{stack:O,id:fe,glyph:Oe};if(Oe=this._tinySDF(Re,O,fe),Oe)return Re.glyphs[fe]=Oe,{stack:O,id:fe,glyph:Oe};const We=Math.floor(fe/256);if(256*We>65535)throw new Error("glyphs > 65535 not supported");if(Re.ranges[We])return{stack:O,id:fe,glyph:Oe};if(!this.url)throw new Error("glyphsUrl is not set");if(!Re.requests[We]){const Nt=U.loadGlyphRange(O,We,this.url,this.requestManager);Re.requests[We]=Nt}const Ct=yield Re.requests[We];for(const Nt in Ct)this._doesCharSupportLocalGlyph(+Nt)||(Re.glyphs[+Nt]=Ct[+Nt]);return Re.ranges[We]=!0,{stack:O,id:fe,glyph:Ct[fe]||null}})}_doesCharSupportLocalGlyph(O){return!!this.localIdeographFontFamily&&new RegExp("\\p{Ideo}|\\p{sc=Hang}|\\p{sc=Hira}|\\p{sc=Kana}","u").test(String.fromCodePoint(O))}_tinySDF(O,fe,Re){const Oe=this.localIdeographFontFamily;if(!Oe||!this._doesCharSupportLocalGlyph(Re))return;let We=O.tinySDF;if(!We){let Nt="400";/bold/i.test(fe)?Nt="900":/medium/i.test(fe)?Nt="500":/light/i.test(fe)&&(Nt="200"),We=O.tinySDF=new U.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:Oe,fontWeight:Nt})}const Ct=We.draw(String.fromCharCode(Re));return{id:Re,bitmap:new r.o({width:Ct.width||60,height:Ct.height||60},Ct.data),metrics:{width:Ct.glyphWidth/2||24,height:Ct.glyphHeight/2||24,left:Ct.glyphLeft/2+.5||0,top:Ct.glyphTop/2-27.5||-8,advance:Ct.glyphAdvance/2||24,isDoubleResolution:!0}}}}U.loadGlyphRange=function(Ze,O,fe,Re){return r._(this,void 0,void 0,function*(){const Oe=256*O,We=Oe+255,Ct=Re.transformRequest(fe.replace("{fontstack}",Ze).replace("{range}",`${Oe}-${We}`),"Glyphs"),Nt=yield r.l(Ct,new AbortController);if(!Nt||!Nt.data)throw new Error(`Could not load glyph range. range: ${O}, ${Oe}-${We}`);const rr={};for(const Tr of r.n(Nt.data))rr[Tr.id]=Tr;return rr})},U.TinySDF=class{constructor({fontSize:Ze=24,buffer:O=3,radius:fe=8,cutoff:Re=.25,fontFamily:Oe="sans-serif",fontWeight:We="normal",fontStyle:Ct="normal"}={}){this.buffer=O,this.cutoff=Re,this.radius=fe;const Nt=this.size=Ze+4*O,rr=this._createCanvas(Nt),Tr=this.ctx=rr.getContext("2d",{willReadFrequently:!0});Tr.font=`${Ct} ${We} ${Ze}px ${Oe}`,Tr.textBaseline="alphabetic",Tr.textAlign="left",Tr.fillStyle="black",this.gridOuter=new Float64Array(Nt*Nt),this.gridInner=new Float64Array(Nt*Nt),this.f=new Float64Array(Nt),this.z=new Float64Array(Nt+1),this.v=new Uint16Array(Nt)}_createCanvas(Ze){const O=document.createElement("canvas");return O.width=O.height=Ze,O}draw(Ze){const{width:O,actualBoundingBoxAscent:fe,actualBoundingBoxDescent:Re,actualBoundingBoxLeft:Oe,actualBoundingBoxRight:We}=this.ctx.measureText(Ze),Ct=Math.ceil(fe),Nt=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(We-Oe))),rr=Math.min(this.size-this.buffer,Ct+Math.ceil(Re)),Tr=Nt+2*this.buffer,Fr=rr+2*this.buffer,Vr=Math.max(Tr*Fr,0),mn=new Uint8ClampedArray(Vr),Dn={data:mn,width:Tr,height:Fr,glyphWidth:Nt,glyphHeight:rr,glyphTop:Ct,glyphLeft:0,glyphAdvance:O};if(Nt===0||rr===0)return Dn;const{ctx:nt,buffer:ct,gridInner:Tt,gridOuter:Pt}=this;nt.clearRect(ct,ct,Nt,rr),nt.fillText(Ze,ct,ct+Ct);const Gt=nt.getImageData(ct,ct,Nt,rr);Pt.fill(N,0,Vr),Tt.fill(0,0,Vr);for(let zt=0;zt<rr;zt++)for(let Kt=0;Kt<Nt;Kt++){const Cr=Gt.data[4*(zt*Nt+Kt)+3]/255;if(Cr===0)continue;const Nr=(zt+ct)*Tr+Kt+ct;if(Cr===1)Pt[Nr]=0,Tt[Nr]=N;else{const Hr=.5-Cr;Pt[Nr]=Hr>0?Hr*Hr:0,Tt[Nr]=Hr<0?Hr*Hr:0}}D(Pt,0,0,Tr,Fr,Tr,this.f,this.v,this.z),D(Tt,ct,ct,Nt,rr,Tr,this.f,this.v,this.z);for(let zt=0;zt<Vr;zt++){const Kt=Math.sqrt(Pt[zt])-Math.sqrt(Tt[zt]);mn[zt]=Math.round(255-255*(Kt/this.radius+this.cutoff))}return Dn}};class V{constructor(){this.specification=r.v.light.position}possiblyEvaluate(O,fe){return r.x(O.expression.evaluate(fe))}interpolate(O,fe,Re){return{x:r.y.number(O.x,fe.x,Re),y:r.y.number(O.y,fe.y,Re),z:r.y.number(O.z,fe.z,Re)}}}let q;class z extends r.E{constructor(O){super(),q=q||new r.q({anchor:new r.D(r.v.light.anchor),position:new V,color:new r.D(r.v.light.color),intensity:new r.D(r.v.light.intensity)}),this._transitionable=new r.T(q),this.setLight(O),this._transitioning=this._transitionable.untransitioned()}getLight(){return this._transitionable.serialize()}setLight(O,fe={}){if(!this._validate(r.r,O,fe))for(const Re in O){const Oe=O[Re];Re.endsWith("-transition")?this._transitionable.setTransition(Re.slice(0,-11),Oe):this._transitionable.setValue(Re,Oe)}}updateTransitions(O){this._transitioning=this._transitionable.transitioned(O,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(O){this.properties=this._transitioning.possiblyEvaluate(O)}_validate(O,fe,Re){return(!Re||Re.validate!==!1)&&r.t(this,O.call(r.u,{value:fe,style:{glyphs:!0,sprite:!0},styleSpec:r.v}))}}const H=new r.q({"sky-color":new r.D(r.v.sky["sky-color"]),"horizon-color":new r.D(r.v.sky["horizon-color"]),"fog-color":new r.D(r.v.sky["fog-color"]),"fog-ground-blend":new r.D(r.v.sky["fog-ground-blend"]),"horizon-fog-blend":new r.D(r.v.sky["horizon-fog-blend"]),"sky-horizon-blend":new r.D(r.v.sky["sky-horizon-blend"]),"atmosphere-blend":new r.D(r.v.sky["atmosphere-blend"])});class G extends r.E{constructor(O){super(),this._transitionable=new r.T(H),this.setSky(O),this._transitioning=this._transitionable.untransitioned(),this.recalculate(new r.z(0))}setSky(O,fe={}){if(!this._validate(r.B,O,fe)){O||(O={"sky-color":"transparent","horizon-color":"transparent","fog-color":"transparent","fog-ground-blend":1,"atmosphere-blend":0});for(const Re in O){const Oe=O[Re];Re.endsWith("-transition")?this._transitionable.setTransition(Re.slice(0,-11),Oe):this._transitionable.setValue(Re,Oe)}}}getSky(){return this._transitionable.serialize()}updateTransitions(O){this._transitioning=this._transitionable.transitioned(O,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(O){this.properties=this._transitioning.possiblyEvaluate(O)}_validate(O,fe,Re={}){return Re?.validate!==!1&&r.t(this,O.call(r.u,r.e({value:fe,style:{glyphs:!0,sprite:!0},styleSpec:r.v})))}calculateFogBlendOpacity(O){return O<60?0:O<70?(O-60)/10:1}}class J{constructor(O,fe){this.width=O,this.height=fe,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}}getDash(O,fe){const Re=O.join(",")+String(fe);return this.dashEntry[Re]||(this.dashEntry[Re]=this.addDash(O,fe)),this.dashEntry[Re]}getDashRanges(O,fe,Re){const Oe=[];let We=O.length%2==1?-O[O.length-1]*Re:0,Ct=O[0]*Re,Nt=!0;Oe.push({left:We,right:Ct,isDash:Nt,zeroLength:O[0]===0});let rr=O[0];for(let Tr=1;Tr<O.length;Tr++){Nt=!Nt;const Fr=O[Tr];We=rr*Re,rr+=Fr,Ct=rr*Re,Oe.push({left:We,right:Ct,isDash:Nt,zeroLength:Fr===0})}return Oe}addRoundDash(O,fe,Re){const Oe=fe/2;for(let We=-Re;We<=Re;We++){const Ct=this.width*(this.nextRow+Re+We);let Nt=0,rr=O[Nt];for(let Tr=0;Tr<this.width;Tr++){Tr/rr.right>1&&(rr=O[++Nt]);const Fr=Math.abs(Tr-rr.left),Vr=Math.abs(Tr-rr.right),mn=Math.min(Fr,Vr);let Dn;const nt=We/Re*(Oe+1);if(rr.isDash){const ct=Oe-Math.abs(nt);Dn=Math.sqrt(mn*mn+ct*ct)}else Dn=Oe-Math.sqrt(mn*mn+nt*nt);this.data[Ct+Tr]=Math.max(0,Math.min(255,Dn+128))}}}addRegularDash(O){for(let Nt=O.length-1;Nt>=0;--Nt){const rr=O[Nt],Tr=O[Nt+1];rr.zeroLength?O.splice(Nt,1):Tr&&Tr.isDash===rr.isDash&&(Tr.left=rr.left,O.splice(Nt,1))}const fe=O[0],Re=O[O.length-1];fe.isDash===Re.isDash&&(fe.left=Re.left-this.width,Re.right=fe.right+this.width);const Oe=this.width*this.nextRow;let We=0,Ct=O[We];for(let Nt=0;Nt<this.width;Nt++){Nt/Ct.right>1&&(Ct=O[++We]);const rr=Math.abs(Nt-Ct.left),Tr=Math.abs(Nt-Ct.right),Fr=Math.min(rr,Tr);this.data[Oe+Nt]=Math.max(0,Math.min(255,(Ct.isDash?Fr:-Fr)+128))}}addDash(O,fe){const Re=fe?7:0,Oe=2*Re+1;if(this.nextRow+Oe>this.height)return r.w("LineAtlas out of space"),null;let We=0;for(let Nt=0;Nt<O.length;Nt++)We+=O[Nt];if(We!==0){const Nt=this.width/We,rr=this.getDashRanges(O,this.width,Nt);fe?this.addRoundDash(rr,Nt,Re):this.addRegularDash(rr)}const Ct={y:(this.nextRow+Re+.5)/this.height,height:2*Re/this.height,width:We};return this.nextRow+=Oe,this.dirty=!0,Ct}bind(O){const fe=O.gl;this.texture?(fe.bindTexture(fe.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,fe.texSubImage2D(fe.TEXTURE_2D,0,0,0,this.width,this.height,fe.ALPHA,fe.UNSIGNED_BYTE,this.data))):(this.texture=fe.createTexture(),fe.bindTexture(fe.TEXTURE_2D,this.texture),fe.texParameteri(fe.TEXTURE_2D,fe.TEXTURE_WRAP_S,fe.REPEAT),fe.texParameteri(fe.TEXTURE_2D,fe.TEXTURE_WRAP_T,fe.REPEAT),fe.texParameteri(fe.TEXTURE_2D,fe.TEXTURE_MIN_FILTER,fe.LINEAR),fe.texParameteri(fe.TEXTURE_2D,fe.TEXTURE_MAG_FILTER,fe.LINEAR),fe.texImage2D(fe.TEXTURE_2D,0,fe.ALPHA,this.width,this.height,0,fe.ALPHA,fe.UNSIGNED_BYTE,this.data))}}const le="maplibre_preloaded_worker_pool";class ge{constructor(){this.active={}}acquire(O){if(!this.workers)for(this.workers=[];this.workers.length<ge.workerCount;)this.workers.push(new Worker(r.a.WORKER_URL));return this.active[O]=!0,this.workers.slice()}release(O){delete this.active[O],this.numActive()===0&&(this.workers.forEach(fe=>{fe.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[le]}numActive(){return Object.keys(this.active).length}}const de=Math.floor(s.hardwareConcurrency/2);let me,W;function ie(){return me||(me=new ge),me}ge.workerCount=r.C(globalThis)?Math.max(Math.min(de,3),1):1;class se{constructor(O,fe){this.workerPool=O,this.actors=[],this.currentActor=0,this.id=fe;const Re=this.workerPool.acquire(fe);for(let Oe=0;Oe<Re.length;Oe++){const We=new r.F(Re[Oe],fe);We.name=`Worker ${Oe}`,this.actors.push(We)}if(!this.actors.length)throw new Error("No actors found")}broadcast(O,fe){const Re=[];for(const Oe of this.actors)Re.push(Oe.sendAsync({type:O,data:fe}));return Promise.all(Re)}getActor(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]}remove(O=!0){this.actors.forEach(fe=>{fe.remove()}),this.actors=[],O&&this.workerPool.release(this.id)}registerMessageHandler(O,fe){for(const Re of this.actors)Re.registerMessageHandler(O,fe)}}function ee(){return W||(W=new se(ie(),r.G),W.registerMessageHandler("GR",(Ze,O,fe)=>r.m(O,fe))),W}function pe(Ze,O){const fe=r.H();return r.J(fe,fe,[1,1,0]),r.K(fe,fe,[.5*Ze.width,.5*Ze.height,1]),r.L(fe,fe,Ze.calculatePosMatrix(O.toUnwrapped()))}function oe(Ze,O,fe,Re,Oe,We){const Ct=(function(Vr,mn,Dn){if(Vr)for(const nt of Vr){const ct=mn[nt];if(ct&&ct.source===Dn&&ct.type==="fill-extrusion")return!0}else for(const nt in mn){const ct=mn[nt];if(ct.source===Dn&&ct.type==="fill-extrusion")return!0}return!1})(Oe&&Oe.layers,O,Ze.id),Nt=We.maxPitchScaleFactor(),rr=Ze.tilesIn(Re,Nt,Ct);rr.sort(Y);const Tr=[];for(const Vr of rr)Tr.push({wrappedTileID:Vr.tileID.wrapped().key,queryResults:Vr.tile.queryRenderedFeatures(O,fe,Ze._state,Vr.queryGeometry,Vr.cameraQueryGeometry,Vr.scale,Oe,We,Nt,pe(Ze.transform,Vr.tileID))});const Fr=(function(Vr){const mn={},Dn={};for(const nt of Vr){const ct=nt.queryResults,Tt=nt.wrappedTileID,Pt=Dn[Tt]=Dn[Tt]||{};for(const Gt in ct){const zt=ct[Gt],Kt=Pt[Gt]=Pt[Gt]||{},Cr=mn[Gt]=mn[Gt]||[];for(const Nr of zt)Kt[Nr.featureIndex]||(Kt[Nr.featureIndex]=!0,Cr.push(Nr))}}return mn})(Tr);for(const Vr in Fr)Fr[Vr].forEach(mn=>{const Dn=mn.feature,nt=Ze.getFeatureState(Dn.layer["source-layer"],Dn.id);Dn.source=Dn.layer.source,Dn.layer["source-layer"]&&(Dn.sourceLayer=Dn.layer["source-layer"]),Dn.state=nt});return Fr}function Y(Ze,O){const fe=Ze.tileID,Re=O.tileID;return fe.overscaledZ-Re.overscaledZ||fe.canonical.y-Re.canonical.y||fe.wrap-Re.wrap||fe.canonical.x-Re.canonical.x}function ce(Ze,O,fe){return r._(this,void 0,void 0,function*(){let Re=Ze;if(Ze.url?Re=(yield r.h(O.transformRequest(Ze.url,"Source"),fe)).data:yield s.frameAsync(fe),!Re)return null;const Oe=r.M(r.e(Re,Ze),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in Re&&Re.vector_layers&&(Oe.vectorLayerIds=Re.vector_layers.map(We=>We.id)),Oe})}class ue{constructor(O,fe){O&&(fe?this.setSouthWest(O).setNorthEast(fe):Array.isArray(O)&&(O.length===4?this.setSouthWest([O[0],O[1]]).setNorthEast([O[2],O[3]]):this.setSouthWest(O[0]).setNorthEast(O[1])))}setNorthEast(O){return this._ne=O instanceof r.N?new r.N(O.lng,O.lat):r.N.convert(O),this}setSouthWest(O){return this._sw=O instanceof r.N?new r.N(O.lng,O.lat):r.N.convert(O),this}extend(O){const fe=this._sw,Re=this._ne;let Oe,We;if(O instanceof r.N)Oe=O,We=O;else{if(!(O instanceof ue))return Array.isArray(O)?O.length===4||O.every(Array.isArray)?this.extend(ue.convert(O)):this.extend(r.N.convert(O)):O&&("lng"in O||"lon"in O)&&"lat"in O?this.extend(r.N.convert(O)):this;if(Oe=O._sw,We=O._ne,!Oe||!We)return this}return fe||Re?(fe.lng=Math.min(Oe.lng,fe.lng),fe.lat=Math.min(Oe.lat,fe.lat),Re.lng=Math.max(We.lng,Re.lng),Re.lat=Math.max(We.lat,Re.lat)):(this._sw=new r.N(Oe.lng,Oe.lat),this._ne=new r.N(We.lng,We.lat)),this}getCenter(){return new r.N((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new r.N(this.getWest(),this.getNorth())}getSouthEast(){return new r.N(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(O){const{lng:fe,lat:Re}=r.N.convert(O);let Oe=this._sw.lng<=fe&&fe<=this._ne.lng;return this._sw.lng>this._ne.lng&&(Oe=this._sw.lng>=fe&&fe>=this._ne.lng),this._sw.lat<=Re&&Re<=this._ne.lat&&Oe}static convert(O){return O instanceof ue?O:O&&new ue(O)}static fromLngLat(O,fe=0){const Re=360*fe/40075017,Oe=Re/Math.cos(Math.PI/180*O.lat);return new ue(new r.N(O.lng-Oe,O.lat-Re),new r.N(O.lng+Oe,O.lat+Re))}adjustAntiMeridian(){const O=new r.N(this._sw.lng,this._sw.lat),fe=new r.N(this._ne.lng,this._ne.lat);return new ue(O,O.lng>fe.lng?new r.N(fe.lng+360,fe.lat):fe)}}class _e{constructor(O,fe,Re){this.bounds=ue.convert(this.validateBounds(O)),this.minzoom=fe||0,this.maxzoom=Re||24}validateBounds(O){return Array.isArray(O)&&O.length===4?[Math.max(-180,O[0]),Math.max(-90,O[1]),Math.min(180,O[2]),Math.min(90,O[3])]:[-180,-90,180,90]}contains(O){const fe=Math.pow(2,O.z),Re=Math.floor(r.O(this.bounds.getWest())*fe),Oe=Math.floor(r.Q(this.bounds.getNorth())*fe),We=Math.ceil(r.O(this.bounds.getEast())*fe),Ct=Math.ceil(r.Q(this.bounds.getSouth())*fe);return O.x>=Re&&O.x<We&&O.y>=Oe&&O.y<Ct}}class Le extends r.E{constructor(O,fe,Re,Oe){if(super(),this.id=O,this.dispatcher=Re,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,r.e(this,r.M(fe,["url","scheme","tileSize","promoteId"])),this._options=r.e({type:"vector"},fe),this._collectResourceTiming=fe.collectResourceTiming,this.tileSize!==512)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(Oe)}load(){return r._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new r.k("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{const O=yield ce(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,this.map.style.sourceCaches[this.id].clearTiles(),O&&(r.e(this,O),O.bounds&&(this.tileBounds=new _e(O.bounds,this.minzoom,this.maxzoom)),this.fire(new r.k("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new r.k("data",{dataType:"source",sourceDataType:"content"})))}catch(O){this._tileJSONRequest=null,this.fire(new r.j(O))}})}loaded(){return this._loaded}hasTile(O){return!this.tileBounds||this.tileBounds.contains(O.canonical)}onAdd(O){this.map=O,this.load()}setSourceProperty(O){this._tileJSONRequest&&this._tileJSONRequest.abort(),O(),this.load()}setTiles(O){return this.setSourceProperty(()=>{this._options.tiles=O}),this}setUrl(O){return this.setSourceProperty(()=>{this.url=O,this._options.url=O}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return r.e({},this._options)}loadTile(O){return r._(this,void 0,void 0,function*(){const fe=O.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),Re={request:this.map._requestManager.transformRequest(fe,"Tile"),uid:O.uid,tileID:O.tileID,zoom:O.tileID.overscaledZ,tileSize:this.tileSize*O.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};Re.request.collectResourceTiming=this._collectResourceTiming;let Oe="RT";if(O.actor&&O.state!=="expired"){if(O.state==="loading")return new Promise((We,Ct)=>{O.reloadPromise={resolve:We,reject:Ct}})}else O.actor=this.dispatcher.getActor(),Oe="LT";O.abortController=new AbortController;try{const We=yield O.actor.sendAsync({type:Oe,data:Re},O.abortController);if(delete O.abortController,O.aborted)return;this._afterTileLoadWorkerResponse(O,We)}catch(We){if(delete O.abortController,O.aborted)return;if(We&&We.status!==404)throw We;this._afterTileLoadWorkerResponse(O,null)}})}_afterTileLoadWorkerResponse(O,fe){if(fe&&fe.resourceTiming&&(O.resourceTiming=fe.resourceTiming),fe&&this.map._refreshExpiredTiles&&O.setExpiryData(fe),O.loadVectorData(fe,this.map.painter),O.reloadPromise){const Re=O.reloadPromise;O.reloadPromise=null,this.loadTile(O).then(Re.resolve).catch(Re.reject)}}abortTile(O){return r._(this,void 0,void 0,function*(){O.abortController&&(O.abortController.abort(),delete O.abortController),O.actor&&(yield O.actor.sendAsync({type:"AT",data:{uid:O.uid,type:this.type,source:this.id}}))})}unloadTile(O){return r._(this,void 0,void 0,function*(){O.unloadVectorData(),O.actor&&(yield O.actor.sendAsync({type:"RMT",data:{uid:O.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}}class ze extends r.E{constructor(O,fe,Re,Oe){super(),this.id=O,this.dispatcher=Re,this.setEventedParent(Oe),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=r.e({type:"raster"},fe),r.e(this,r.M(fe,["url","scheme","tileSize"]))}load(){return r._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new r.k("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{const O=yield ce(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,O&&(r.e(this,O),O.bounds&&(this.tileBounds=new _e(O.bounds,this.minzoom,this.maxzoom)),this.fire(new r.k("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new r.k("data",{dataType:"source",sourceDataType:"content"})))}catch(O){this._tileJSONRequest=null,this.fire(new r.j(O))}})}loaded(){return this._loaded}onAdd(O){this.map=O,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(O){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),O(),this.load()}setTiles(O){return this.setSourceProperty(()=>{this._options.tiles=O}),this}setUrl(O){return this.setSourceProperty(()=>{this.url=O,this._options.url=O}),this}serialize(){return r.e({},this._options)}hasTile(O){return!this.tileBounds||this.tileBounds.contains(O.canonical)}loadTile(O){return r._(this,void 0,void 0,function*(){const fe=O.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);O.abortController=new AbortController;try{const Re=yield c.getImage(this.map._requestManager.transformRequest(fe,"Tile"),O.abortController,this.map._refreshExpiredTiles);if(delete O.abortController,O.aborted)return void(O.state="unloaded");if(Re&&Re.data){this.map._refreshExpiredTiles&&Re.cacheControl&&Re.expires&&O.setExpiryData({cacheControl:Re.cacheControl,expires:Re.expires});const Oe=this.map.painter.context,We=Oe.gl,Ct=Re.data;O.texture=this.map.painter.getTileTexture(Ct.width),O.texture?O.texture.update(Ct,{useMipmap:!0}):(O.texture=new f(Oe,Ct,We.RGBA,{useMipmap:!0}),O.texture.bind(We.LINEAR,We.CLAMP_TO_EDGE,We.LINEAR_MIPMAP_NEAREST)),O.state="loaded"}}catch(Re){if(delete O.abortController,O.aborted)O.state="unloaded";else if(Re)throw O.state="errored",Re}})}abortTile(O){return r._(this,void 0,void 0,function*(){O.abortController&&(O.abortController.abort(),delete O.abortController)})}unloadTile(O){return r._(this,void 0,void 0,function*(){O.texture&&this.map.painter.saveTileTexture(O.texture)})}hasTransition(){return!1}}class Xe extends ze{constructor(O,fe,Re,Oe){super(O,fe,Re,Oe),this.type="raster-dem",this.maxzoom=22,this._options=r.e({type:"raster-dem"},fe),this.encoding=fe.encoding||"mapbox",this.redFactor=fe.redFactor,this.greenFactor=fe.greenFactor,this.blueFactor=fe.blueFactor,this.baseShift=fe.baseShift}loadTile(O){return r._(this,void 0,void 0,function*(){const fe=O.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),Re=this.map._requestManager.transformRequest(fe,"Tile");O.neighboringTiles=this._getNeighboringTiles(O.tileID),O.abortController=new AbortController;try{const Oe=yield c.getImage(Re,O.abortController,this.map._refreshExpiredTiles);if(delete O.abortController,O.aborted)return void(O.state="unloaded");if(Oe&&Oe.data){const We=Oe.data;this.map._refreshExpiredTiles&&Oe.cacheControl&&Oe.expires&&O.setExpiryData({cacheControl:Oe.cacheControl,expires:Oe.expires});const Ct=r.b(We)&&r.U()?We:yield this.readImageNow(We),Nt={type:this.type,uid:O.uid,source:this.id,rawImageData:Ct,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(!O.actor||O.state==="expired"){O.actor=this.dispatcher.getActor();const rr=yield O.actor.sendAsync({type:"LDT",data:Nt});O.dem=rr,O.needsHillshadePrepare=!0,O.needsTerrainPrepare=!0,O.state="loaded"}}}catch(Oe){if(delete O.abortController,O.aborted)O.state="unloaded";else if(Oe)throw O.state="errored",Oe}})}readImageNow(O){return r._(this,void 0,void 0,function*(){if(typeof VideoFrame<"u"&&r.V()){const fe=O.width+2,Re=O.height+2;try{return new r.R({width:fe,height:Re},yield r.W(O,-1,-1,fe,Re))}catch{}}return s.getImageData(O,1)})}_getNeighboringTiles(O){const fe=O.canonical,Re=Math.pow(2,fe.z),Oe=(fe.x-1+Re)%Re,We=fe.x===0?O.wrap-1:O.wrap,Ct=(fe.x+1+Re)%Re,Nt=fe.x+1===Re?O.wrap+1:O.wrap,rr={};return rr[new r.S(O.overscaledZ,We,fe.z,Oe,fe.y).key]={backfilled:!1},rr[new r.S(O.overscaledZ,Nt,fe.z,Ct,fe.y).key]={backfilled:!1},fe.y>0&&(rr[new r.S(O.overscaledZ,We,fe.z,Oe,fe.y-1).key]={backfilled:!1},rr[new r.S(O.overscaledZ,O.wrap,fe.z,fe.x,fe.y-1).key]={backfilled:!1},rr[new r.S(O.overscaledZ,Nt,fe.z,Ct,fe.y-1).key]={backfilled:!1}),fe.y+1<Re&&(rr[new r.S(O.overscaledZ,We,fe.z,Oe,fe.y+1).key]={backfilled:!1},rr[new r.S(O.overscaledZ,O.wrap,fe.z,fe.x,fe.y+1).key]={backfilled:!1},rr[new r.S(O.overscaledZ,Nt,fe.z,Ct,fe.y+1).key]={backfilled:!1}),rr}unloadTile(O){return r._(this,void 0,void 0,function*(){O.demTexture&&this.map.painter.saveTileTexture(O.demTexture),O.fbo&&(O.fbo.destroy(),delete O.fbo),O.dem&&delete O.dem,delete O.neighboringTiles,O.state="unloaded",O.actor&&(yield O.actor.sendAsync({type:"RDT",data:{type:this.type,uid:O.uid,source:this.id}}))})}}class Ve extends r.E{constructor(O,fe,Re,Oe){super(),this.id=O,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._pendingLoads=0,this.actor=Re.getActor(),this.setEventedParent(Oe),this._data=fe.data,this._options=r.e({},fe),this._collectResourceTiming=fe.collectResourceTiming,fe.maxzoom!==void 0&&(this.maxzoom=fe.maxzoom),fe.type&&(this.type=fe.type),fe.attribution&&(this.attribution=fe.attribution),this.promoteId=fe.promoteId;const We=r.X/this.tileSize;fe.clusterMaxZoom!==void 0&&this.maxzoom<=fe.clusterMaxZoom&&r.w(`The maxzoom value "${this.maxzoom}" is expected to be greater than the clusterMaxZoom value "${fe.clusterMaxZoom}".`),this.workerOptions=r.e({source:this.id,cluster:fe.cluster||!1,geojsonVtOptions:{buffer:(fe.buffer!==void 0?fe.buffer:128)*We,tolerance:(fe.tolerance!==void 0?fe.tolerance:.375)*We,extent:r.X,maxZoom:this.maxzoom,lineMetrics:fe.lineMetrics||!1,generateId:fe.generateId||!1},superclusterOptions:{maxZoom:fe.clusterMaxZoom!==void 0?fe.clusterMaxZoom:this.maxzoom-1,minPoints:Math.max(2,fe.clusterMinPoints||2),extent:r.X,radius:(fe.clusterRadius||50)*We,log:!1,generateId:fe.generateId||!1},clusterProperties:fe.clusterProperties,filter:fe.filter},fe.workerOptions),typeof this.promoteId=="string"&&(this.workerOptions.promoteId=this.promoteId)}load(){return r._(this,void 0,void 0,function*(){yield this._updateWorkerData()})}onAdd(O){this.map=O,this.load()}setData(O){return this._data=O,this._updateWorkerData(),this}updateData(O){return this._updateWorkerData(O),this}getData(){return r._(this,void 0,void 0,function*(){const O=r.e({type:this.type},this.workerOptions);return this.actor.sendAsync({type:"GD",data:O})})}setClusterOptions(O){return this.workerOptions.cluster=O.cluster,O&&(O.clusterRadius!==void 0&&(this.workerOptions.superclusterOptions.radius=O.clusterRadius),O.clusterMaxZoom!==void 0&&(this.workerOptions.superclusterOptions.maxZoom=O.clusterMaxZoom)),this._updateWorkerData(),this}getClusterExpansionZoom(O){return this.actor.sendAsync({type:"GCEZ",data:{type:this.type,clusterId:O,source:this.id}})}getClusterChildren(O){return this.actor.sendAsync({type:"GCC",data:{type:this.type,clusterId:O,source:this.id}})}getClusterLeaves(O,fe,Re){return this.actor.sendAsync({type:"GCL",data:{type:this.type,source:this.id,clusterId:O,limit:fe,offset:Re}})}_updateWorkerData(O){return r._(this,void 0,void 0,function*(){const fe=r.e({type:this.type},this.workerOptions);O?fe.dataDiff=O:typeof this._data=="string"?(fe.request=this.map._requestManager.transformRequest(s.resolveURL(this._data),"Source"),fe.request.collectResourceTiming=this._collectResourceTiming):fe.data=JSON.stringify(this._data),this._pendingLoads++,this.fire(new r.k("dataloading",{dataType:"source"}));try{const Re=yield this.actor.sendAsync({type:"LD",data:fe});if(this._pendingLoads--,this._removed||Re.abandoned)return void this.fire(new r.k("dataabort",{dataType:"source"}));let Oe=null;Re.resourceTiming&&Re.resourceTiming[this.id]&&(Oe=Re.resourceTiming[this.id].slice(0));const We={dataType:"source"};this._collectResourceTiming&&Oe&&Oe.length>0&&r.e(We,{resourceTiming:Oe}),this.fire(new r.k("data",Object.assign(Object.assign({},We),{sourceDataType:"metadata"}))),this.fire(new r.k("data",Object.assign(Object.assign({},We),{sourceDataType:"content"})))}catch(Re){if(this._pendingLoads--,this._removed)return void this.fire(new r.k("dataabort",{dataType:"source"}));this.fire(new r.j(Re))}})}loaded(){return this._pendingLoads===0}loadTile(O){return r._(this,void 0,void 0,function*(){const fe=O.actor?"RT":"LT";O.actor=this.actor;const Re={type:this.type,uid:O.uid,tileID:O.tileID,zoom:O.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};O.abortController=new AbortController;const Oe=yield this.actor.sendAsync({type:fe,data:Re},O.abortController);delete O.abortController,O.unloadVectorData(),O.aborted||O.loadVectorData(Oe,this.map.painter,fe==="RT")})}abortTile(O){return r._(this,void 0,void 0,function*(){O.abortController&&(O.abortController.abort(),delete O.abortController),O.aborted=!0})}unloadTile(O){return r._(this,void 0,void 0,function*(){O.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:O.uid,type:this.type,source:this.id}})})}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}})}serialize(){return r.e({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}}var rt=r.Y([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class mt extends r.E{constructor(O,fe,Re,Oe){super(),this.id=O,this.dispatcher=Re,this.coordinates=fe.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(Oe),this.options=fe}load(O){return r._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new r.k("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{const fe=yield c.getImage(this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,fe&&fe.data&&(this.image=fe.data,O&&(this.coordinates=O),this._finishLoading())}catch(fe){this._request=null,this._loaded=!0,this.fire(new r.j(fe))}})}loaded(){return this._loaded}updateImage(O){return O.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=O.url,this.load(O.coordinates).finally(()=>{this.texture=null}),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new r.k("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(O){this.map=O,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(O){this.coordinates=O;const fe=O.map(r.Z.fromLngLat);this.tileID=(function(Oe){let We=1/0,Ct=1/0,Nt=-1/0,rr=-1/0;for(const mn of Oe)We=Math.min(We,mn.x),Ct=Math.min(Ct,mn.y),Nt=Math.max(Nt,mn.x),rr=Math.max(rr,mn.y);const Tr=Math.max(Nt-We,rr-Ct),Fr=Math.max(0,Math.floor(-Math.log(Tr)/Math.LN2)),Vr=Math.pow(2,Fr);return new r.a1(Fr,Math.floor((We+Nt)/2*Vr),Math.floor((Ct+rr)/2*Vr))})(fe),this.minzoom=this.maxzoom=this.tileID.z;const Re=fe.map(Oe=>this.tileID.getTilePoint(Oe)._round());return this._boundsArray=new r.$,this._boundsArray.emplaceBack(Re[0].x,Re[0].y,0,0),this._boundsArray.emplaceBack(Re[1].x,Re[1].y,r.X,0),this._boundsArray.emplaceBack(Re[3].x,Re[3].y,0,r.X),this._boundsArray.emplaceBack(Re[2].x,Re[2].y,r.X,r.X),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new r.k("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;const O=this.map.painter.context,fe=O.gl;this.boundsBuffer||(this.boundsBuffer=O.createVertexBuffer(this._boundsArray,rt.members)),this.boundsSegments||(this.boundsSegments=r.a0.simpleSegment(0,0,4,2)),this.texture||(this.texture=new f(O,this.image,fe.RGBA),this.texture.bind(fe.LINEAR,fe.CLAMP_TO_EDGE));let Re=!1;for(const Oe in this.tiles){const We=this.tiles[Oe];We.state!=="loaded"&&(We.state="loaded",We.texture=this.texture,Re=!0)}Re&&this.fire(new r.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(O){return r._(this,void 0,void 0,function*(){this.tileID&&this.tileID.equals(O.tileID.canonical)?(this.tiles[String(O.tileID.wrap)]=O,O.buckets={}):O.state="errored"})}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}}class _t extends mt{constructor(O,fe,Re,Oe){super(O,fe,Re,Oe),this.roundZoom=!0,this.type="video",this.options=fe}load(){return r._(this,void 0,void 0,function*(){this._loaded=!1;const O=this.options;this.urls=[];for(const fe of O.urls)this.urls.push(this.map._requestManager.transformRequest(fe,"Source").url);try{const fe=yield r.a3(this.urls);if(this._loaded=!0,!fe)return;this.video=fe,this.video.loop=!0,this.video.addEventListener("playing",()=>{this.map.triggerRepaint()}),this.map&&this.video.play(),this._finishLoading()}catch(fe){this.fire(new r.j(fe))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(O){if(this.video){const fe=this.video.seekable;O<fe.start(0)||O>fe.end(0)?this.fire(new r.j(new r.a2(`sources.${this.id}`,null,`Playback for this video can be set only between the ${fe.start(0)} and ${fe.end(0)}-second mark.`))):this.video.currentTime=O}}getVideo(){return this.video}onAdd(O){this.map||(this.map=O,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}prepare(){if(Object.keys(this.tiles).length===0||this.video.readyState<2)return;const O=this.map.painter.context,fe=O.gl;this.boundsBuffer||(this.boundsBuffer=O.createVertexBuffer(this._boundsArray,rt.members)),this.boundsSegments||(this.boundsSegments=r.a0.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(fe.LINEAR,fe.CLAMP_TO_EDGE),fe.texSubImage2D(fe.TEXTURE_2D,0,0,0,fe.RGBA,fe.UNSIGNED_BYTE,this.video)):(this.texture=new f(O,this.video,fe.RGBA),this.texture.bind(fe.LINEAR,fe.CLAMP_TO_EDGE));let Re=!1;for(const Oe in this.tiles){const We=this.tiles[Oe];We.state!=="loaded"&&(We.state="loaded",We.texture=this.texture,Re=!0)}Re&&this.fire(new r.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class vt extends mt{constructor(O,fe,Re,Oe){super(O,fe,Re,Oe),fe.coordinates?Array.isArray(fe.coordinates)&&fe.coordinates.length===4&&!fe.coordinates.some(We=>!Array.isArray(We)||We.length!==2||We.some(Ct=>typeof Ct!="number"))||this.fire(new r.j(new r.a2(`sources.${O}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new r.j(new r.a2(`sources.${O}`,null,'missing required property "coordinates"'))),fe.animate&&typeof fe.animate!="boolean"&&this.fire(new r.j(new r.a2(`sources.${O}`,null,'optional "animate" property must be a boolean value'))),fe.canvas?typeof fe.canvas=="string"||fe.canvas instanceof HTMLCanvasElement||this.fire(new r.j(new r.a2(`sources.${O}`,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 r.j(new r.a2(`sources.${O}`,null,'missing required property "canvas"'))),this.options=fe,this.animate=fe.animate===void 0||fe.animate}load(){return r._(this,void 0,void 0,function*(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new r.j(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())})}getCanvas(){return this.canvas}onAdd(O){this.map=O,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let O=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,O=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,O=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;const fe=this.map.painter.context,Re=fe.gl;this.boundsBuffer||(this.boundsBuffer=fe.createVertexBuffer(this._boundsArray,rt.members)),this.boundsSegments||(this.boundsSegments=r.a0.simpleSegment(0,0,4,2)),this.texture?(O||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new f(fe,this.canvas,Re.RGBA,{premultiply:!0});let Oe=!1;for(const We in this.tiles){const Ct=this.tiles[We];Ct.state!=="loaded"&&(Ct.state="loaded",Ct.texture=this.texture,Oe=!0)}Oe&&this.fire(new r.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(const O of[this.canvas.width,this.canvas.height])if(isNaN(O)||O<=0)return!0;return!1}}const ut={},Fe=Ze=>{switch(Ze){case"geojson":return Ve;case"image":return mt;case"raster":return ze;case"raster-dem":return Xe;case"vector":return Le;case"video":return _t;case"canvas":return vt}return ut[Ze]},Pe="RTLPluginLoaded";class be extends r.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=ee()}_syncState(O){return this.status=O,this.dispatcher.broadcast("SRPS",{pluginStatus:O,pluginURL:this.url}).catch(fe=>{throw this.status="error",fe})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(O){return r._(this,arguments,void 0,function*(fe,Re=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=s.resolveURL(fe),!this.url)throw new Error(`requested url ${fe} is invalid`);if(this.status==="unavailable"){if(!Re)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if(this.status==="requested")return this._requestImport()})}_requestImport(){return r._(this,void 0,void 0,function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new r.k(Pe))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let Ye=null;function yt(){return Ye||(Ye=new be),Ye}class wt{constructor(O,fe){this.timeAdded=0,this.fadeEndTime=0,this.tileID=O,this.uid=r.a4(),this.uses=0,this.tileSize=fe,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttCoords={},this.expiredRequestCount=0,this.state="loading"}registerFadeDuration(O){const fe=O+this.timeAdded;fe<this.fadeEndTime||(this.fadeEndTime=fe)}wasRequested(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"}clearTextures(O){this.demTexture&&O.saveTileTexture(this.demTexture),this.demTexture=null}loadVectorData(O,fe,Re){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",O){O.featureIndex&&(this.latestFeatureIndex=O.featureIndex,O.rawTileData?(this.latestRawTileData=O.rawTileData,this.latestFeatureIndex.rawTileData=O.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=O.collisionBoxArray,this.buckets=(function(Oe,We){const Ct={};if(!We)return Ct;for(const Nt of Oe){const rr=Nt.layerIds.map(Tr=>We.getLayer(Tr)).filter(Boolean);if(rr.length!==0){Nt.layers=rr,Nt.stateDependentLayerIds&&(Nt.stateDependentLayers=Nt.stateDependentLayerIds.map(Tr=>rr.filter(Fr=>Fr.id===Tr)[0]));for(const Tr of rr)Ct[Tr.id]=Nt}}return Ct})(O.buckets,fe.style),this.hasSymbolBuckets=!1;for(const Oe in this.buckets){const We=this.buckets[Oe];if(We instanceof r.a6){if(this.hasSymbolBuckets=!0,!Re)break;We.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(const Oe in this.buckets){const We=this.buckets[Oe];if(We instanceof r.a6&&We.hasRTLText){this.hasRTLText=!0,yt().lazyLoad();break}}this.queryPadding=0;for(const Oe in this.buckets){const We=this.buckets[Oe];this.queryPadding=Math.max(this.queryPadding,fe.style.getLayer(Oe).queryRadius(We))}O.imageAtlas&&(this.imageAtlas=O.imageAtlas),O.glyphAtlasImage&&(this.glyphAtlasImage=O.glyphAtlasImage)}else this.collisionBoxArray=new r.a5}unloadVectorData(){for(const O in this.buckets)this.buckets[O].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"}getBucket(O){return this.buckets[O.id]}upload(O){for(const Re in this.buckets){const Oe=this.buckets[Re];Oe.uploadPending()&&Oe.upload(O)}const fe=O.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new f(O,this.imageAtlas.image,fe.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new f(O,this.glyphAtlasImage,fe.ALPHA),this.glyphAtlasImage=null)}prepare(O){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(O,this.imageAtlasTexture)}queryRenderedFeatures(O,fe,Re,Oe,We,Ct,Nt,rr,Tr,Fr){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:Oe,cameraQueryGeometry:We,scale:Ct,tileSize:this.tileSize,pixelPosMatrix:Fr,transform:rr,params:Nt,queryPadding:this.queryPadding*Tr},O,fe,Re):{}}querySourceFeatures(O,fe){const Re=this.latestFeatureIndex;if(!Re||!Re.rawTileData)return;const Oe=Re.loadVTLayers(),We=fe&&fe.sourceLayer?fe.sourceLayer:"",Ct=Oe._geojsonTileLayer||Oe[We];if(!Ct)return;const Nt=r.a7(fe&&fe.filter),{z:rr,x:Tr,y:Fr}=this.tileID.canonical,Vr={z:rr,x:Tr,y:Fr};for(let mn=0;mn<Ct.length;mn++){const Dn=Ct.feature(mn);if(Nt.needGeometry){const Tt=r.a8(Dn,!0);if(!Nt.filter(new r.z(this.tileID.overscaledZ),Tt,this.tileID.canonical))continue}else if(!Nt.filter(new r.z(this.tileID.overscaledZ),Dn))continue;const nt=Re.getId(Dn,We),ct=new r.a9(Dn,rr,Tr,Fr,nt);ct.tile=Vr,O.push(ct)}}hasData(){return this.state==="loaded"||this.state==="reloading"||this.state==="expired"}patternsLoaded(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length}setExpiryData(O){const fe=this.expirationTime;if(O.cacheControl){const Re=r.aa(O.cacheControl);Re["max-age"]&&(this.expirationTime=Date.now()+1e3*Re["max-age"])}else O.expires&&(this.expirationTime=new Date(O.expires).getTime());if(this.expirationTime){const Re=Date.now();let Oe=!1;if(this.expirationTime>Re)Oe=!1;else if(fe)if(this.expirationTime<fe)Oe=!0;else{const We=this.expirationTime-fe;We?this.expirationTime=Re+Math.max(We,3e4):Oe=!0}else Oe=!0;Oe?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}}getExpiryTimeout(){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)}setFeatureState(O,fe){if(!this.latestFeatureIndex||!this.latestFeatureIndex.rawTileData||Object.keys(O).length===0)return;const Re=this.latestFeatureIndex.loadVTLayers();for(const Oe in this.buckets){if(!fe.style.hasLayer(Oe))continue;const We=this.buckets[Oe],Ct=We.layers[0].sourceLayer||"_geojsonTileLayer",Nt=Re[Ct],rr=O[Ct];if(!Nt||!rr||Object.keys(rr).length===0)continue;We.update(rr,Nt,this.imageAtlas&&this.imageAtlas.patternPositions||{});const Tr=fe&&fe.style&&fe.style.getLayer(Oe);Tr&&(this.queryPadding=Math.max(this.queryPadding,Tr.queryRadius(We)))}}holdingForFade(){return this.symbolFadeHoldUntil!==void 0}symbolFadeFinished(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<s.now()}clearFadeHold(){this.symbolFadeHoldUntil=void 0}setHoldDuration(O){this.symbolFadeHoldUntil=s.now()+O}setDependencies(O,fe){const Re={};for(const Oe of fe)Re[Oe]=!0;this.dependencies[O]=Re}hasDependency(O,fe){for(const Re of O){const Oe=this.dependencies[Re];if(Oe){for(const We of fe)if(Oe[We])return!0}}return!1}}class ht{constructor(O,fe){this.max=O,this.onRemove=fe,this.reset()}reset(){for(const O in this.data)for(const fe of this.data[O])fe.timeout&&clearTimeout(fe.timeout),this.onRemove(fe.value);return this.data={},this.order=[],this}add(O,fe,Re){const Oe=O.wrapped().key;this.data[Oe]===void 0&&(this.data[Oe]=[]);const We={value:fe,timeout:void 0};if(Re!==void 0&&(We.timeout=setTimeout(()=>{this.remove(O,We)},Re)),this.data[Oe].push(We),this.order.push(Oe),this.order.length>this.max){const Ct=this._getAndRemoveByKey(this.order[0]);Ct&&this.onRemove(Ct)}return this}has(O){return O.wrapped().key in this.data}getAndRemove(O){return this.has(O)?this._getAndRemoveByKey(O.wrapped().key):null}_getAndRemoveByKey(O){const fe=this.data[O].shift();return fe.timeout&&clearTimeout(fe.timeout),this.data[O].length===0&&delete this.data[O],this.order.splice(this.order.indexOf(O),1),fe.value}getByKey(O){const fe=this.data[O];return fe?fe[0].value:null}get(O){return this.has(O)?this.data[O.wrapped().key][0].value:null}remove(O,fe){if(!this.has(O))return this;const Re=O.wrapped().key,Oe=fe===void 0?0:this.data[Re].indexOf(fe),We=this.data[Re][Oe];return this.data[Re].splice(Oe,1),We.timeout&&clearTimeout(We.timeout),this.data[Re].length===0&&delete this.data[Re],this.onRemove(We.value),this.order.splice(this.order.indexOf(Re),1),this}setMaxSize(O){for(this.max=O;this.order.length>this.max;){const fe=this._getAndRemoveByKey(this.order[0]);fe&&this.onRemove(fe)}return this}filter(O){const fe=[];for(const Re in this.data)for(const Oe of this.data[Re])O(Oe.value)||fe.push(Oe);for(const Re of fe)this.remove(Re.value.tileID,Re)}}class Yt{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(O,fe,Re){const Oe=String(fe);if(this.stateChanges[O]=this.stateChanges[O]||{},this.stateChanges[O][Oe]=this.stateChanges[O][Oe]||{},r.e(this.stateChanges[O][Oe],Re),this.deletedStates[O]===null){this.deletedStates[O]={};for(const We in this.state[O])We!==Oe&&(this.deletedStates[O][We]=null)}else if(this.deletedStates[O]&&this.deletedStates[O][Oe]===null){this.deletedStates[O][Oe]={};for(const We in this.state[O][Oe])Re[We]||(this.deletedStates[O][Oe][We]=null)}else for(const We in Re)this.deletedStates[O]&&this.deletedStates[O][Oe]&&this.deletedStates[O][Oe][We]===null&&delete this.deletedStates[O][Oe][We]}removeFeatureState(O,fe,Re){if(this.deletedStates[O]===null)return;const Oe=String(fe);if(this.deletedStates[O]=this.deletedStates[O]||{},Re&&fe!==void 0)this.deletedStates[O][Oe]!==null&&(this.deletedStates[O][Oe]=this.deletedStates[O][Oe]||{},this.deletedStates[O][Oe][Re]=null);else if(fe!==void 0)if(this.stateChanges[O]&&this.stateChanges[O][Oe])for(Re in this.deletedStates[O][Oe]={},this.stateChanges[O][Oe])this.deletedStates[O][Oe][Re]=null;else this.deletedStates[O][Oe]=null;else this.deletedStates[O]=null}getState(O,fe){const Re=String(fe),Oe=r.e({},(this.state[O]||{})[Re],(this.stateChanges[O]||{})[Re]);if(this.deletedStates[O]===null)return{};if(this.deletedStates[O]){const We=this.deletedStates[O][fe];if(We===null)return{};for(const Ct in We)delete Oe[Ct]}return Oe}initializeTileState(O,fe){O.setFeatureState(this.state,fe)}coalesceChanges(O,fe){const Re={};for(const Oe in this.stateChanges){this.state[Oe]=this.state[Oe]||{};const We={};for(const Ct in this.stateChanges[Oe])this.state[Oe][Ct]||(this.state[Oe][Ct]={}),r.e(this.state[Oe][Ct],this.stateChanges[Oe][Ct]),We[Ct]=this.state[Oe][Ct];Re[Oe]=We}for(const Oe in this.deletedStates){this.state[Oe]=this.state[Oe]||{};const We={};if(this.deletedStates[Oe]===null)for(const Ct in this.state[Oe])We[Ct]={},this.state[Oe][Ct]={};else for(const Ct in this.deletedStates[Oe]){if(this.deletedStates[Oe][Ct]===null)this.state[Oe][Ct]={};else for(const Nt of Object.keys(this.deletedStates[Oe][Ct]))delete this.state[Oe][Ct][Nt];We[Ct]=this.state[Oe][Ct]}Re[Oe]=Re[Oe]||{},r.e(Re[Oe],We)}if(this.stateChanges={},this.deletedStates={},Object.keys(Re).length!==0)for(const Oe in O)O[Oe].setFeatureState(Re,fe)}}class $t extends r.E{constructor(O,fe,Re){super(),this.id=O,this.dispatcher=Re,this.on("data",Oe=>this._dataHandler(Oe)),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=((Oe,We,Ct,Nt)=>{const rr=new(Fe(We.type))(Oe,We,Ct,Nt);if(rr.id!==Oe)throw new Error(`Expected Source id to be ${Oe} instead of ${rr.id}`);return rr})(O,fe,Re,this),this._tiles={},this._cache=new ht(0,Oe=>this._unloadTile(Oe)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new Yt,this._didEmitContent=!1,this._updated=!1}onAdd(O){this.map=O,this._maxTileCacheSize=O?O._maxTileCacheSize:null,this._maxTileCacheZoomLevels=O?O._maxTileCacheZoomLevels:null,this._source&&this._source.onAdd&&this._source.onAdd(O)}onRemove(O){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(O)}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;if(!(this.used===void 0&&this.usedForTerrain===void 0||this.used||this.usedForTerrain))return!0;if(!this._updated)return!1;for(const O in this._tiles){const fe=this._tiles[O];if(fe.state!=="loaded"&&fe.state!=="errored")return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;const O=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,O&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(O,fe,Re){return r._(this,void 0,void 0,function*(){try{yield this._source.loadTile(O),this._tileLoaded(O,fe,Re)}catch(Oe){O.state="errored",Oe.status!==404?this._source.fire(new r.j(Oe,{tile:O})):this.update(this.transform,this.terrain)}})}_unloadTile(O){this._source.unloadTile&&this._source.unloadTile(O)}_abortTile(O){this._source.abortTile&&this._source.abortTile(O),this._source.fire(new r.k("dataabort",{tile:O,coord:O.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(O){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(const fe in this._tiles){const Re=this._tiles[fe];Re.upload(O),Re.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map(O=>O.tileID).sort(fr).map(O=>O.key)}getRenderableIds(O){const fe=[];for(const Re in this._tiles)this._isIdRenderable(Re,O)&&fe.push(this._tiles[Re]);return O?fe.sort((Re,Oe)=>{const We=Re.tileID,Ct=Oe.tileID,Nt=new r.P(We.canonical.x,We.canonical.y)._rotate(this.transform.angle),rr=new r.P(Ct.canonical.x,Ct.canonical.y)._rotate(this.transform.angle);return We.overscaledZ-Ct.overscaledZ||rr.y-Nt.y||rr.x-Nt.x}).map(Re=>Re.tileID.key):fe.map(Re=>Re.tileID).sort(fr).map(Re=>Re.key)}hasRenderableParent(O){const fe=this.findLoadedParent(O,0);return!!fe&&this._isIdRenderable(fe.tileID.key)}_isIdRenderable(O,fe){return this._tiles[O]&&this._tiles[O].hasData()&&!this._coveredTiles[O]&&(fe||!this._tiles[O].holdingForFade())}reload(){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(const O in this._tiles)this._tiles[O].state!=="errored"&&this._reloadTile(O,"reloading")}}_reloadTile(O,fe){return r._(this,void 0,void 0,function*(){const Re=this._tiles[O];Re&&(Re.state!=="loading"&&(Re.state=fe),yield this._loadTile(Re,O,fe))})}_tileLoaded(O,fe,Re){O.timeAdded=s.now(),Re==="expired"&&(O.refreshedUponExpiration=!0),this._setTileReloadTimer(fe,O),this.getSource().type==="raster-dem"&&O.dem&&this._backfillDEM(O),this._state.initializeTileState(O,this.map?this.map.painter:null),O.aborted||this._source.fire(new r.k("data",{dataType:"source",tile:O,coord:O.tileID}))}_backfillDEM(O){const fe=this.getRenderableIds();for(let Oe=0;Oe<fe.length;Oe++){const We=fe[Oe];if(O.neighboringTiles&&O.neighboringTiles[We]){const Ct=this.getTileByID(We);Re(O,Ct),Re(Ct,O)}}function Re(Oe,We){Oe.needsHillshadePrepare=!0,Oe.needsTerrainPrepare=!0;let Ct=We.tileID.canonical.x-Oe.tileID.canonical.x;const Nt=We.tileID.canonical.y-Oe.tileID.canonical.y,rr=Math.pow(2,Oe.tileID.canonical.z),Tr=We.tileID.key;Ct===0&&Nt===0||Math.abs(Nt)>1||(Math.abs(Ct)>1&&(Math.abs(Ct+rr)===1?Ct+=rr:Math.abs(Ct-rr)===1&&(Ct-=rr)),We.dem&&Oe.dem&&(Oe.dem.backfillBorder(We.dem,Ct,Nt),Oe.neighboringTiles&&Oe.neighboringTiles[Tr]&&(Oe.neighboringTiles[Tr].backfilled=!0)))}}getTile(O){return this.getTileByID(O.key)}getTileByID(O){return this._tiles[O]}_retainLoadedChildren(O,fe,Re,Oe){for(const We in this._tiles){let Ct=this._tiles[We];if(Oe[We]||!Ct.hasData()||Ct.tileID.overscaledZ<=fe||Ct.tileID.overscaledZ>Re)continue;let Nt=Ct.tileID;for(;Ct&&Ct.tileID.overscaledZ>fe+1;){const Tr=Ct.tileID.scaledTo(Ct.tileID.overscaledZ-1);Ct=this._tiles[Tr.key],Ct&&Ct.hasData()&&(Nt=Tr)}let rr=Nt;for(;rr.overscaledZ>fe;)if(rr=rr.scaledTo(rr.overscaledZ-1),O[rr.key]){Oe[Nt.key]=Nt;break}}}findLoadedParent(O,fe){if(O.key in this._loadedParentTiles){const Re=this._loadedParentTiles[O.key];return Re&&Re.tileID.overscaledZ>=fe?Re:null}for(let Re=O.overscaledZ-1;Re>=fe;Re--){const Oe=O.scaledTo(Re),We=this._getLoadedTile(Oe);if(We)return We}}findLoadedSibling(O){return this._getLoadedTile(O)}_getLoadedTile(O){const fe=this._tiles[O.key];return fe&&fe.hasData()?fe:this._cache.getByKey(O.wrapped().key)}updateCacheSize(O){const fe=Math.ceil(O.width/this._source.tileSize)+1,Re=Math.ceil(O.height/this._source.tileSize)+1,Oe=Math.floor(fe*Re*(this._maxTileCacheZoomLevels===null?r.a.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),We=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,Oe):Oe;this._cache.setMaxSize(We)}handleWrapJump(O){const fe=Math.round((O-(this._prevLng===void 0?O:this._prevLng))/360);if(this._prevLng=O,fe){const Re={};for(const Oe in this._tiles){const We=this._tiles[Oe];We.tileID=We.tileID.unwrapTo(We.tileID.wrap+fe),Re[We.tileID.key]=We}this._tiles=Re;for(const Oe in this._timers)clearTimeout(this._timers[Oe]),delete this._timers[Oe];for(const Oe in this._tiles)this._setTileReloadTimer(Oe,this._tiles[Oe])}}_updateCoveredAndRetainedTiles(O,fe,Re,Oe,We,Ct){const Nt={},rr={},Tr=Object.keys(O),Fr=s.now();for(const Vr of Tr){const mn=O[Vr],Dn=this._tiles[Vr];if(!Dn||Dn.fadeEndTime!==0&&Dn.fadeEndTime<=Fr)continue;const nt=this.findLoadedParent(mn,fe),ct=this.findLoadedSibling(mn),Tt=nt||ct||null;Tt&&(this._addTile(Tt.tileID),Nt[Tt.tileID.key]=Tt.tileID),rr[Vr]=mn}this._retainLoadedChildren(rr,Oe,Re,O);for(const Vr in Nt)O[Vr]||(this._coveredTiles[Vr]=!0,O[Vr]=Nt[Vr]);if(Ct){const Vr={},mn={};for(const Dn of We)this._tiles[Dn.key].hasData()?Vr[Dn.key]=Dn:mn[Dn.key]=Dn;for(const Dn in mn){const nt=mn[Dn].children(this._source.maxzoom);this._tiles[nt[0].key]&&this._tiles[nt[1].key]&&this._tiles[nt[2].key]&&this._tiles[nt[3].key]&&(Vr[nt[0].key]=O[nt[0].key]=nt[0],Vr[nt[1].key]=O[nt[1].key]=nt[1],Vr[nt[2].key]=O[nt[2].key]=nt[2],Vr[nt[3].key]=O[nt[3].key]=nt[3],delete mn[Dn])}for(const Dn in mn){const nt=mn[Dn],ct=this.findLoadedParent(nt,this._source.minzoom),Tt=this.findLoadedSibling(nt),Pt=ct||Tt||null;if(Pt){Vr[Pt.tileID.key]=O[Pt.tileID.key]=Pt.tileID;for(const Gt in Vr)Vr[Gt].isChildOf(Pt.tileID)&&delete Vr[Gt]}}for(const Dn in this._tiles)Vr[Dn]||(this._coveredTiles[Dn]=!0)}}update(O,fe){if(!this._sourceLoaded||this._paused)return;let Re;this.transform=O,this.terrain=fe,this.updateCacheSize(O),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?Re=O.getVisibleUnwrappedCoordinates(this._source.tileID).map(Fr=>new r.S(Fr.canonical.z,Fr.wrap,Fr.canonical.z,Fr.canonical.x,Fr.canonical.y)):(Re=O.coveringTiles({tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:fe}),this._source.hasTile&&(Re=Re.filter(Fr=>this._source.hasTile(Fr)))):Re=[];const Oe=O.coveringZoomLevel(this._source),We=Math.max(Oe-$t.maxOverzooming,this._source.minzoom),Ct=Math.max(Oe+$t.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){const Fr={};for(const Vr of Re)if(Vr.canonical.z>this._source.minzoom){const mn=Vr.scaledTo(Vr.canonical.z-1);Fr[mn.key]=mn;const Dn=Vr.scaledTo(Math.max(this._source.minzoom,Math.min(Vr.canonical.z,5)));Fr[Dn.key]=Dn}Re=Re.concat(Object.values(Fr))}const Nt=Re.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,Nt&&this.fire(new r.k("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));const rr=this._updateRetainedTiles(Re,Oe);mr(this._source.type)&&this._updateCoveredAndRetainedTiles(rr,We,Ct,Oe,Re,fe);for(const Fr in rr)this._tiles[Fr].clearFadeHold();const Tr=r.ab(this._tiles,rr);for(const Fr of Tr){const Vr=this._tiles[Fr];Vr.hasSymbolBuckets&&!Vr.holdingForFade()?Vr.setHoldDuration(this.map._fadeDuration):Vr.hasSymbolBuckets&&!Vr.symbolFadeFinished()||this._removeTile(Fr)}this._updateLoadedParentTileCache(),this._updateLoadedSiblingTileCache()}releaseSymbolFadeTiles(){for(const O in this._tiles)this._tiles[O].holdingForFade()&&this._removeTile(O)}_updateRetainedTiles(O,fe){var Re;const Oe={},We={},Ct=Math.max(fe-$t.maxOverzooming,this._source.minzoom),Nt=Math.max(fe+$t.maxUnderzooming,this._source.minzoom),rr={};for(const Tr of O){const Fr=this._addTile(Tr);Oe[Tr.key]=Tr,Fr.hasData()||fe<this._source.maxzoom&&(rr[Tr.key]=Tr)}this._retainLoadedChildren(rr,fe,Nt,Oe);for(const Tr of O){let Fr=this._tiles[Tr.key];if(Fr.hasData())continue;if(fe+1>this._source.maxzoom){const mn=Tr.children(this._source.maxzoom)[0],Dn=this.getTile(mn);if(Dn&&Dn.hasData()){Oe[mn.key]=mn;continue}}else{const mn=Tr.children(this._source.maxzoom);if(Oe[mn[0].key]&&Oe[mn[1].key]&&Oe[mn[2].key]&&Oe[mn[3].key])continue}let Vr=Fr.wasRequested();for(let mn=Tr.overscaledZ-1;mn>=Ct;--mn){const Dn=Tr.scaledTo(mn);if(We[Dn.key])break;if(We[Dn.key]=!0,Fr=this.getTile(Dn),!Fr&&Vr&&(Fr=this._addTile(Dn)),Fr){const nt=Fr.hasData();if((nt||!(!((Re=this.map)===null||Re===void 0)&&Re.cancelPendingTileRequestsWhileZooming)||Vr)&&(Oe[Dn.key]=Dn),Vr=Fr.wasRequested(),nt)break}}}return Oe}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(const O in this._tiles){const fe=[];let Re,Oe=this._tiles[O].tileID;for(;Oe.overscaledZ>0;){if(Oe.key in this._loadedParentTiles){Re=this._loadedParentTiles[Oe.key];break}fe.push(Oe.key);const We=Oe.scaledTo(Oe.overscaledZ-1);if(Re=this._getLoadedTile(We),Re)break;Oe=We}for(const We of fe)this._loadedParentTiles[We]=Re}}_updateLoadedSiblingTileCache(){this._loadedSiblingTiles={};for(const O in this._tiles){const fe=this._tiles[O].tileID,Re=this._getLoadedTile(fe);this._loadedSiblingTiles[fe.key]=Re}}_addTile(O){let fe=this._tiles[O.key];if(fe)return fe;fe=this._cache.getAndRemove(O),fe&&(this._setTileReloadTimer(O.key,fe),fe.tileID=O,this._state.initializeTileState(fe,this.map?this.map.painter:null),this._cacheTimers[O.key]&&(clearTimeout(this._cacheTimers[O.key]),delete this._cacheTimers[O.key],this._setTileReloadTimer(O.key,fe)));const Re=fe;return fe||(fe=new wt(O,this._source.tileSize*O.overscaleFactor()),this._loadTile(fe,O.key,fe.state)),fe.uses++,this._tiles[O.key]=fe,Re||this._source.fire(new r.k("dataloading",{tile:fe,coord:fe.tileID,dataType:"source"})),fe}_setTileReloadTimer(O,fe){O in this._timers&&(clearTimeout(this._timers[O]),delete this._timers[O]);const Re=fe.getExpiryTimeout();Re&&(this._timers[O]=setTimeout(()=>{this._reloadTile(O,"expired"),delete this._timers[O]},Re))}_removeTile(O){const fe=this._tiles[O];fe&&(fe.uses--,delete this._tiles[O],this._timers[O]&&(clearTimeout(this._timers[O]),delete this._timers[O]),fe.uses>0||(fe.hasData()&&fe.state!=="reloading"?this._cache.add(fe.tileID,fe,fe.getExpiryTimeout()):(fe.aborted=!0,this._abortTile(fe),this._unloadTile(fe))))}_dataHandler(O){const fe=O.sourceDataType;O.dataType==="source"&&fe==="metadata"&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&O.dataType==="source"&&fe==="content"&&(this.reload(),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(const O in this._tiles)this._removeTile(O);this._cache.reset()}tilesIn(O,fe,Re){const Oe=[],We=this.transform;if(!We)return Oe;const Ct=Re?We.getCameraQueryGeometry(O):O,Nt=O.map(nt=>We.pointCoordinate(nt,this.terrain)),rr=Ct.map(nt=>We.pointCoordinate(nt,this.terrain)),Tr=this.getIds();let Fr=1/0,Vr=1/0,mn=-1/0,Dn=-1/0;for(const nt of rr)Fr=Math.min(Fr,nt.x),Vr=Math.min(Vr,nt.y),mn=Math.max(mn,nt.x),Dn=Math.max(Dn,nt.y);for(let nt=0;nt<Tr.length;nt++){const ct=this._tiles[Tr[nt]];if(ct.holdingForFade())continue;const Tt=ct.tileID,Pt=Math.pow(2,We.zoom-ct.tileID.overscaledZ),Gt=fe*ct.queryPadding*r.X/ct.tileSize/Pt,zt=[Tt.getTilePoint(new r.Z(Fr,Vr)),Tt.getTilePoint(new r.Z(mn,Dn))];if(zt[0].x-Gt<r.X&&zt[0].y-Gt<r.X&&zt[1].x+Gt>=0&&zt[1].y+Gt>=0){const Kt=Nt.map(Nr=>Tt.getTilePoint(Nr)),Cr=rr.map(Nr=>Tt.getTilePoint(Nr));Oe.push({tile:ct,tileID:Tt,queryGeometry:Kt,cameraQueryGeometry:Cr,scale:Pt})}}return Oe}getVisibleCoordinates(O){const fe=this.getRenderableIds(O).map(Re=>this._tiles[Re].tileID);for(const Re of fe)Re.posMatrix=this.transform.calculatePosMatrix(Re.toUnwrapped());return fe}hasTransition(){if(this._source.hasTransition())return!0;if(mr(this._source.type)){const O=s.now();for(const fe in this._tiles)if(this._tiles[fe].fadeEndTime>=O)return!0}return!1}setFeatureState(O,fe,Re){this._state.updateState(O=O||"_geojsonTileLayer",fe,Re)}removeFeatureState(O,fe,Re){this._state.removeFeatureState(O=O||"_geojsonTileLayer",fe,Re)}getFeatureState(O,fe){return this._state.getState(O=O||"_geojsonTileLayer",fe)}setDependencies(O,fe,Re){const Oe=this._tiles[O];Oe&&Oe.setDependencies(fe,Re)}reloadTilesForDependencies(O,fe){for(const Re in this._tiles)this._tiles[Re].hasDependency(O,fe)&&this._reloadTile(Re,"reloading");this._cache.filter(Re=>!Re.hasDependency(O,fe))}}function fr(Ze,O){const fe=Math.abs(2*Ze.wrap)-+(Ze.wrap<0),Re=Math.abs(2*O.wrap)-+(O.wrap<0);return Ze.overscaledZ-O.overscaledZ||Re-fe||O.canonical.y-Ze.canonical.y||O.canonical.x-Ze.canonical.x}function mr(Ze){return Ze==="raster"||Ze==="image"||Ze==="video"}$t.maxOverzooming=10,$t.maxUnderzooming=3;class Ur{constructor(O,fe){this.reset(O,fe)}reset(O,fe){this.points=O||[],this._distances=[0];for(let 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(fe||0,.5*this.length),this.paddedLength=this.length-2*this.padding}lerp(O){if(this.points.length===1)return this.points[0];O=r.ac(O,0,1);let fe=1,Re=this._distances[fe];const Oe=O*this.paddedLength+this.padding;for(;Re<Oe&&fe<this._distances.length;)Re=this._distances[++fe];const We=fe-1,Ct=this._distances[We],Nt=Re-Ct,rr=Nt>0?(Oe-Ct)/Nt:0;return this.points[We].mult(1-rr).add(this.points[fe].mult(rr))}}function jr(Ze,O){let fe=!0;return Ze==="always"||Ze!=="never"&&O!=="never"||(fe=!1),fe}class fn{constructor(O,fe,Re){const Oe=this.boxCells=[],We=this.circleCells=[];this.xCellCount=Math.ceil(O/Re),this.yCellCount=Math.ceil(fe/Re);for(let Ct=0;Ct<this.xCellCount*this.yCellCount;Ct++)Oe.push([]),We.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=O,this.height=fe,this.xScale=this.xCellCount/O,this.yScale=this.yCellCount/fe,this.boxUid=0,this.circleUid=0}keysLength(){return this.boxKeys.length+this.circleKeys.length}insert(O,fe,Re,Oe,We){this._forEachCell(fe,Re,Oe,We,this._insertBoxCell,this.boxUid++),this.boxKeys.push(O),this.bboxes.push(fe),this.bboxes.push(Re),this.bboxes.push(Oe),this.bboxes.push(We)}insertCircle(O,fe,Re,Oe){this._forEachCell(fe-Oe,Re-Oe,fe+Oe,Re+Oe,this._insertCircleCell,this.circleUid++),this.circleKeys.push(O),this.circles.push(fe),this.circles.push(Re),this.circles.push(Oe)}_insertBoxCell(O,fe,Re,Oe,We,Ct){this.boxCells[We].push(Ct)}_insertCircleCell(O,fe,Re,Oe,We,Ct){this.circleCells[We].push(Ct)}_query(O,fe,Re,Oe,We,Ct,Nt){if(Re<0||O>this.width||Oe<0||fe>this.height)return[];const rr=[];if(O<=0&&fe<=0&&this.width<=Re&&this.height<=Oe){if(We)return[{key:null,x1:O,y1:fe,x2:Re,y2:Oe}];for(let Tr=0;Tr<this.boxKeys.length;Tr++)rr.push({key:this.boxKeys[Tr],x1:this.bboxes[4*Tr],y1:this.bboxes[4*Tr+1],x2:this.bboxes[4*Tr+2],y2:this.bboxes[4*Tr+3]});for(let Tr=0;Tr<this.circleKeys.length;Tr++){const Fr=this.circles[3*Tr],Vr=this.circles[3*Tr+1],mn=this.circles[3*Tr+2];rr.push({key:this.circleKeys[Tr],x1:Fr-mn,y1:Vr-mn,x2:Fr+mn,y2:Vr+mn})}}else this._forEachCell(O,fe,Re,Oe,this._queryCell,rr,{hitTest:We,overlapMode:Ct,seenUids:{box:{},circle:{}}},Nt);return rr}query(O,fe,Re,Oe){return this._query(O,fe,Re,Oe,!1,null)}hitTest(O,fe,Re,Oe,We,Ct){return this._query(O,fe,Re,Oe,!0,We,Ct).length>0}hitTestCircle(O,fe,Re,Oe,We){const Ct=O-Re,Nt=O+Re,rr=fe-Re,Tr=fe+Re;if(Nt<0||Ct>this.width||Tr<0||rr>this.height)return!1;const Fr=[];return this._forEachCell(Ct,rr,Nt,Tr,this._queryCellCircle,Fr,{hitTest:!0,overlapMode:Oe,circle:{x:O,y:fe,radius:Re},seenUids:{box:{},circle:{}}},We),Fr.length>0}_queryCell(O,fe,Re,Oe,We,Ct,Nt,rr){const{seenUids:Tr,hitTest:Fr,overlapMode:Vr}=Nt,mn=this.boxCells[We];if(mn!==null){const nt=this.bboxes;for(const ct of mn)if(!Tr.box[ct]){Tr.box[ct]=!0;const Tt=4*ct,Pt=this.boxKeys[ct];if(O<=nt[Tt+2]&&fe<=nt[Tt+3]&&Re>=nt[Tt+0]&&Oe>=nt[Tt+1]&&(!rr||rr(Pt))&&(!Fr||!jr(Vr,Pt.overlapMode))&&(Ct.push({key:Pt,x1:nt[Tt],y1:nt[Tt+1],x2:nt[Tt+2],y2:nt[Tt+3]}),Fr))return!0}}const Dn=this.circleCells[We];if(Dn!==null){const nt=this.circles;for(const ct of Dn)if(!Tr.circle[ct]){Tr.circle[ct]=!0;const Tt=3*ct,Pt=this.circleKeys[ct];if(this._circleAndRectCollide(nt[Tt],nt[Tt+1],nt[Tt+2],O,fe,Re,Oe)&&(!rr||rr(Pt))&&(!Fr||!jr(Vr,Pt.overlapMode))){const Gt=nt[Tt],zt=nt[Tt+1],Kt=nt[Tt+2];if(Ct.push({key:Pt,x1:Gt-Kt,y1:zt-Kt,x2:Gt+Kt,y2:zt+Kt}),Fr)return!0}}}return!1}_queryCellCircle(O,fe,Re,Oe,We,Ct,Nt,rr){const{circle:Tr,seenUids:Fr,overlapMode:Vr}=Nt,mn=this.boxCells[We];if(mn!==null){const nt=this.bboxes;for(const ct of mn)if(!Fr.box[ct]){Fr.box[ct]=!0;const Tt=4*ct,Pt=this.boxKeys[ct];if(this._circleAndRectCollide(Tr.x,Tr.y,Tr.radius,nt[Tt+0],nt[Tt+1],nt[Tt+2],nt[Tt+3])&&(!rr||rr(Pt))&&!jr(Vr,Pt.overlapMode))return Ct.push(!0),!0}}const Dn=this.circleCells[We];if(Dn!==null){const nt=this.circles;for(const ct of Dn)if(!Fr.circle[ct]){Fr.circle[ct]=!0;const Tt=3*ct,Pt=this.circleKeys[ct];if(this._circlesCollide(nt[Tt],nt[Tt+1],nt[Tt+2],Tr.x,Tr.y,Tr.radius)&&(!rr||rr(Pt))&&!jr(Vr,Pt.overlapMode))return Ct.push(!0),!0}}}_forEachCell(O,fe,Re,Oe,We,Ct,Nt,rr){const Tr=this._convertToXCellCoord(O),Fr=this._convertToYCellCoord(fe),Vr=this._convertToXCellCoord(Re),mn=this._convertToYCellCoord(Oe);for(let Dn=Tr;Dn<=Vr;Dn++)for(let nt=Fr;nt<=mn;nt++)if(We.call(this,O,fe,Re,Oe,this.xCellCount*nt+Dn,Ct,Nt,rr))return}_convertToXCellCoord(O){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(O*this.xScale)))}_convertToYCellCoord(O){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(O*this.yScale)))}_circlesCollide(O,fe,Re,Oe,We,Ct){const Nt=Oe-O,rr=We-fe,Tr=Re+Ct;return Tr*Tr>Nt*Nt+rr*rr}_circleAndRectCollide(O,fe,Re,Oe,We,Ct,Nt){const rr=(Ct-Oe)/2,Tr=Math.abs(O-(Oe+rr));if(Tr>rr+Re)return!1;const Fr=(Nt-We)/2,Vr=Math.abs(fe-(We+Fr));if(Vr>Fr+Re)return!1;if(Tr<=rr||Vr<=Fr)return!0;const mn=Tr-rr,Dn=Vr-Fr;return mn*mn+Dn*Dn<=Re*Re}}function Br(Ze,O,fe,Re,Oe){const We=r.H();return O?(r.K(We,We,[1/Oe,1/Oe,1]),fe||r.ad(We,We,Re.angle)):r.L(We,Re.labelPlaneMatrix,Ze),We}function Qr(Ze,O,fe,Re,Oe){if(O){const We=r.ae(Ze);return r.K(We,We,[Oe,Oe,1]),fe||r.ad(We,We,-Re.angle),We}return Re.glCoordMatrix}function Ot(Ze,O,fe,Re){let Oe;Re?(Oe=[Ze,O,Re(Ze,O),1],r.af(Oe,Oe,fe)):(Oe=[Ze,O,0,1],Sr(Oe,Oe,fe));const We=Oe[3];return{point:new r.P(Oe[0]/We,Oe[1]/We),signedDistanceFromCamera:We,isOccluded:!1}}function $e(Ze,O){return .5+Ze/O*.5}function ot(Ze,O){return Ze.x>=-O[0]&&Ze.x<=O[0]&&Ze.y>=-O[1]&&Ze.y<=O[1]}function De(Ze,O,fe,Re,Oe,We,Ct,Nt,rr,Tr,Fr,Vr,mn,Dn,nt){const ct=Re?Ze.textSizeData:Ze.iconSizeData,Tt=r.ag(ct,fe.transform.zoom),Pt=[256/fe.width*2+1,256/fe.height*2+1],Gt=Re?Ze.text.dynamicLayoutVertexArray:Ze.icon.dynamicLayoutVertexArray;Gt.clear();const zt=Ze.lineVertexArray,Kt=Re?Ze.text.placedSymbolArray:Ze.icon.placedSymbolArray,Cr=fe.transform.width/fe.transform.height;let Nr=!1;for(let Hr=0;Hr<Kt.length;Hr++){const sn=Kt.get(Hr);if(sn.hidden||sn.writingMode===r.ah.vertical&&!Nr){Mr(sn.numGlyphs,Gt);continue}Nr=!1;const bn=Ot(sn.anchorX,sn.anchorY,O,nt);if(!ot(bn.point,Pt)){Mr(sn.numGlyphs,Gt);continue}const Vn=$e(fe.transform.cameraToCenterDistance,bn.signedDistanceFromCamera),Yn=r.ai(ct,Tt,sn),va=Ct?Yn/Vn:Yn*Vn,Va={getElevation:nt,labelPlaneMatrix:Oe,lineVertexArray:zt,pitchWithMap:Ct,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},projection:Tr,tileAnchorPoint:new r.P(sn.anchorX,sn.anchorY),unwrappedTileID:Fr,width:Vr,height:mn,translation:Dn},Si=Ie(Va,sn,va,!1,Nt,O,We,Ze.glyphOffsetArray,Gt,Cr,rr);Nr=Si.useVertical,(Si.notEnoughRoom||Nr||Si.needsFlipping&&Ie(Va,sn,va,!0,Nt,O,We,Ze.glyphOffsetArray,Gt,Cr,rr).notEnoughRoom)&&Mr(sn.numGlyphs,Gt)}Re?Ze.text.dynamicLayoutVertexBuffer.updateData(Gt):Ze.icon.dynamicLayoutVertexBuffer.updateData(Gt)}function Ee(Ze,O,fe,Re,Oe,We,Ct,Nt){const rr=We.glyphStartIndex+We.numGlyphs,Tr=We.lineStartIndex,Fr=We.lineStartIndex+We.lineLength,Vr=O.getoffsetX(We.glyphStartIndex),mn=O.getoffsetX(rr-1),Dn=lr(Ze*Vr,fe,Re,Oe,We.segment,Tr,Fr,Nt,Ct);if(!Dn)return null;const nt=lr(Ze*mn,fe,Re,Oe,We.segment,Tr,Fr,Nt,Ct);return nt?Nt.projectionCache.anyProjectionOccluded?null:{first:Dn,last:nt}:null}function Ae(Ze,O,fe,Re){return Ze===r.ah.horizontal&&Math.abs(fe.y-O.y)>Math.abs(fe.x-O.x)*Re?{useVertical:!0}:(Ze===r.ah.vertical?O.y<fe.y:O.x>fe.x)?{needsFlipping:!0}:null}function Ie(Ze,O,fe,Re,Oe,We,Ct,Nt,rr,Tr,Fr){const Vr=fe/24,mn=O.lineOffsetX*Vr,Dn=O.lineOffsetY*Vr;let nt;if(O.numGlyphs>1){const ct=O.glyphStartIndex+O.numGlyphs,Tt=O.lineStartIndex,Pt=O.lineStartIndex+O.lineLength,Gt=Ee(Vr,Nt,mn,Dn,Re,O,Fr,Ze);if(!Gt)return{notEnoughRoom:!0};const zt=Ot(Gt.first.point.x,Gt.first.point.y,Ct,Ze.getElevation).point,Kt=Ot(Gt.last.point.x,Gt.last.point.y,Ct,Ze.getElevation).point;if(Oe&&!Re){const Cr=Ae(O.writingMode,zt,Kt,Tr);if(Cr)return Cr}nt=[Gt.first];for(let Cr=O.glyphStartIndex+1;Cr<ct-1;Cr++)nt.push(lr(Vr*Nt.getoffsetX(Cr),mn,Dn,Re,O.segment,Tt,Pt,Ze,Fr));nt.push(Gt.last)}else{if(Oe&&!Re){const Tt=Ot(Ze.tileAnchorPoint.x,Ze.tileAnchorPoint.y,We,Ze.getElevation).point,Pt=O.lineStartIndex+O.segment+1,Gt=new r.P(Ze.lineVertexArray.getx(Pt),Ze.lineVertexArray.gety(Pt)),zt=Ot(Gt.x,Gt.y,We,Ze.getElevation),Kt=zt.signedDistanceFromCamera>0?zt.point:(function(Nr,Hr,sn,bn,Vn,Yn){return tt(Nr,Hr,sn,1,Vn,Yn)})(Ze.tileAnchorPoint,Gt,Tt,0,We,Ze),Cr=Ae(O.writingMode,Tt,Kt,Tr);if(Cr)return Cr}const ct=lr(Vr*Nt.getoffsetX(O.glyphStartIndex),mn,Dn,Re,O.segment,O.lineStartIndex,O.lineStartIndex+O.lineLength,Ze,Fr);if(!ct||Ze.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};nt=[ct]}for(const ct of nt)r.aj(rr,ct.point,ct.angle);return{}}function tt(Ze,O,fe,Re,Oe,We){const Ct=Ze.add(Ze.sub(O)._unit()),Nt=Oe!==void 0?Ot(Ct.x,Ct.y,Oe,We.getElevation).point:Bt(Ct.x,Ct.y,We).point,rr=fe.sub(Nt);return fe.add(rr._mult(Re/rr.mag()))}function st(Ze,O,fe){const Re=O.projectionCache;if(Re.projections[Ze])return Re.projections[Ze];const Oe=new r.P(O.lineVertexArray.getx(Ze),O.lineVertexArray.gety(Ze)),We=Bt(Oe.x,Oe.y,O);if(We.signedDistanceFromCamera>0)return Re.projections[Ze]=We.point,Re.anyProjectionOccluded=Re.anyProjectionOccluded||We.isOccluded,We.point;const Ct=Ze-fe.direction;return(function(Nt,rr,Tr,Fr,Vr){return tt(Nt,rr,Tr,Fr,void 0,Vr)})(fe.distanceFromAnchor===0?O.tileAnchorPoint:new r.P(O.lineVertexArray.getx(Ct),O.lineVertexArray.gety(Ct)),Oe,fe.previousVertex,fe.absOffsetX-fe.distanceFromAnchor+1,O)}function Bt(Ze,O,fe){const Re=Ze+fe.translation[0],Oe=O+fe.translation[1];let We;return!fe.pitchWithMap&&fe.projection.useSpecialProjectionForSymbols?(We=fe.projection.projectTileCoordinates(Re,Oe,fe.unwrappedTileID,fe.getElevation),We.point.x=(.5*We.point.x+.5)*fe.width,We.point.y=(.5*-We.point.y+.5)*fe.height):(We=Ot(Re,Oe,fe.labelPlaneMatrix,fe.getElevation),We.isOccluded=!1),We}function Ft(Ze,O,fe){return Ze._unit()._perp()._mult(O*fe)}function Wt(Ze,O,fe,Re,Oe,We,Ct,Nt,rr){if(Nt.projectionCache.offsets[Ze])return Nt.projectionCache.offsets[Ze];const Tr=fe.add(O);if(Ze+rr.direction<Re||Ze+rr.direction>=Oe)return Nt.projectionCache.offsets[Ze]=Tr,Tr;const Fr=st(Ze+rr.direction,Nt,rr),Vr=Ft(Fr.sub(fe),Ct,rr.direction),mn=fe.add(Vr),Dn=Fr.add(Vr);return Nt.projectionCache.offsets[Ze]=r.ak(We,Tr,mn,Dn)||Tr,Nt.projectionCache.offsets[Ze]}function lr(Ze,O,fe,Re,Oe,We,Ct,Nt,rr){const Tr=Re?Ze-O:Ze+O;let Fr=Tr>0?1:-1,Vr=0;Re&&(Fr*=-1,Vr=Math.PI),Fr<0&&(Vr+=Math.PI);let mn,Dn=Fr>0?We+Oe:We+Oe+1;Nt.projectionCache.cachedAnchorPoint?mn=Nt.projectionCache.cachedAnchorPoint:(mn=Bt(Nt.tileAnchorPoint.x,Nt.tileAnchorPoint.y,Nt).point,Nt.projectionCache.cachedAnchorPoint=mn);let nt,ct,Tt=mn,Pt=mn,Gt=0,zt=0;const Kt=Math.abs(Tr),Cr=[];let Nr;for(;Gt+zt<=Kt;){if(Dn+=Fr,Dn<We||Dn>=Ct)return null;Gt+=zt,Pt=Tt,ct=nt;const bn={absOffsetX:Kt,direction:Fr,distanceFromAnchor:Gt,previousVertex:Pt};if(Tt=st(Dn,Nt,bn),fe===0)Cr.push(Pt),Nr=Tt.sub(Pt);else{let Vn;const Yn=Tt.sub(Pt);Vn=Yn.mag()===0?Ft(st(Dn+Fr,Nt,bn).sub(Tt),fe,Fr):Ft(Yn,fe,Fr),ct||(ct=Pt.add(Vn)),nt=Wt(Dn,Vn,Tt,We,Ct,ct,fe,Nt,bn),Cr.push(ct),Nr=nt.sub(ct)}zt=Nr.mag()}const Hr=Nr._mult((Kt-Gt)/zt)._add(ct||Pt),sn=Vr+Math.atan2(Tt.y-Pt.y,Tt.x-Pt.x);return Cr.push(Hr),{point:Hr,angle:rr?sn:0,path:Cr}}const Rr=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Mr(Ze,O){for(let fe=0;fe<Ze;fe++){const Re=O.length;O.resize(Re+4),O.float32.set(Rr,3*Re)}}function Sr(Ze,O,fe){const Re=O[0],Oe=O[1];return Ze[0]=fe[0]*Re+fe[4]*Oe+fe[12],Ze[1]=fe[1]*Re+fe[5]*Oe+fe[13],Ze[3]=fe[3]*Re+fe[7]*Oe+fe[15],Ze}const Kr=100;class Hn{constructor(O,fe,Re=new fn(O.width+200,O.height+200,25),Oe=new fn(O.width+200,O.height+200,25)){this.transform=O,this.mapProjection=fe,this.grid=Re,this.ignoredGrid=Oe,this.pitchFactor=Math.cos(O._pitch)*O.cameraToCenterDistance,this.screenRightBoundary=O.width+Kr,this.screenBottomBoundary=O.height+Kr,this.gridRightBoundary=O.width+200,this.gridBottomBoundary=O.height+200,this.perspectiveRatioCutoff=.6}placeCollisionBox(O,fe,Re,Oe,We,Ct,Nt,rr,Tr,Fr,Vr){const mn=O.anchorPointX+rr[0],Dn=O.anchorPointY+rr[1],nt=this.projectAndGetPerspectiveRatio(Oe,mn,Dn,We,Fr),ct=Re*nt.perspectiveRatio;let Tt;if(Ct||Nt)Tt=this._projectCollisionBox(O,ct,Oe,We,Ct,Nt,rr,nt,Fr,Vr);else{const Cr=nt.point.x+(Vr?Vr.x*ct:0),Nr=nt.point.y+(Vr?Vr.y*ct:0);Tt={allPointsOccluded:!1,box:[Cr+O.x1*ct,Nr+O.y1*ct,Cr+O.x2*ct,Nr+O.y2*ct]}}const[Pt,Gt,zt,Kt]=Tt.box;return this.mapProjection.useSpecialProjectionForSymbols&&(Ct?Tt.allPointsOccluded:this.mapProjection.isOccluded(mn,Dn,We))||nt.perspectiveRatio<this.perspectiveRatioCutoff||!this.isInsideGrid(Pt,Gt,zt,Kt)||fe!=="always"&&this.grid.hitTest(Pt,Gt,zt,Kt,fe,Tr)?{box:[Pt,Gt,zt,Kt],placeable:!1,offscreen:!1}:{box:[Pt,Gt,zt,Kt],placeable:!0,offscreen:this.isOffscreen(Pt,Gt,zt,Kt)}}placeCollisionCircles(O,fe,Re,Oe,We,Ct,Nt,rr,Tr,Fr,Vr,mn,Dn,nt,ct,Tt){const Pt=[],Gt=new r.P(fe.anchorX,fe.anchorY),zt=this.getPerspectiveRatio(Ct,Gt.x,Gt.y,Nt,Tt),Kt=(Vr?We/zt:We*zt)/r.ap,Cr={getElevation:Tt,labelPlaneMatrix:rr,lineVertexArray:Re,pitchWithMap:Vr,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},projection:this.mapProjection,tileAnchorPoint:Gt,unwrappedTileID:Nt,width:this.transform.width,height:this.transform.height,translation:ct},Nr=Ee(Kt,Oe,fe.lineOffsetX*Kt,fe.lineOffsetY*Kt,!1,fe,!1,Cr);let Hr=!1,sn=!1,bn=!0;if(Nr){const Vn=.5*Dn*zt+nt,Yn=new r.P(-100,-100),va=new r.P(this.screenRightBoundary,this.screenBottomBoundary),Va=new Ur,Si=Nr.first,yi=Nr.last;let Mi=[];for(let Do=Si.path.length-1;Do>=1;Do--)Mi.push(Si.path[Do]);for(let Do=1;Do<yi.path.length;Do++)Mi.push(yi.path[Do]);const go=2.5*Vn;if(Tr){const Do=this.projectPathToScreenSpace(Mi,Cr,Tr);Mi=Do.some(us=>us.signedDistanceFromCamera<=0)?[]:Do.map(us=>us.point)}let jo=[];if(Mi.length>0){const Do=Mi[0].clone(),us=Mi[0].clone();for(let sl=1;sl<Mi.length;sl++)Do.x=Math.min(Do.x,Mi[sl].x),Do.y=Math.min(Do.y,Mi[sl].y),us.x=Math.max(us.x,Mi[sl].x),us.y=Math.max(us.y,Mi[sl].y);jo=Do.x>=Yn.x&&us.x<=va.x&&Do.y>=Yn.y&&us.y<=va.y?[Mi]:us.x<Yn.x||Do.x>va.x||us.y<Yn.y||Do.y>va.y?[]:r.al([Mi],Yn.x,Yn.y,va.x,va.y)}for(const Do of jo){Va.reset(Do,.25*Vn);let us=0;us=Va.length<=.5*Vn?1:Math.ceil(Va.paddedLength/go)+1;for(let sl=0;sl<us;sl++){const ll=sl/Math.max(us-1,1),Bs=Va.lerp(ll),vl=Bs.x+Kr,Eu=Bs.y+Kr;Pt.push(vl,Eu,Vn,0);const vu=vl-Vn,Us=Eu-Vn,qs=vl+Vn,Hu=Eu+Vn;if(bn=bn&&this.isOffscreen(vu,Us,qs,Hu),sn=sn||this.isInsideGrid(vu,Us,qs,Hu),O!=="always"&&this.grid.hitTestCircle(vl,Eu,Vn,O,mn)&&(Hr=!0,!Fr))return{circles:[],offscreen:!1,collisionDetected:Hr}}}}return{circles:!Fr&&Hr||!sn||zt<this.perspectiveRatioCutoff?[]:Pt,offscreen:bn,collisionDetected:Hr}}projectPathToScreenSpace(O,fe,Re){return O.map(Oe=>Ot(Oe.x,Oe.y,Re,fe.getElevation))}queryRenderedSymbols(O){if(O.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};const fe=[];let Re=1/0,Oe=1/0,We=-1/0,Ct=-1/0;for(const Fr of O){const Vr=new r.P(Fr.x+Kr,Fr.y+Kr);Re=Math.min(Re,Vr.x),Oe=Math.min(Oe,Vr.y),We=Math.max(We,Vr.x),Ct=Math.max(Ct,Vr.y),fe.push(Vr)}const Nt=this.grid.query(Re,Oe,We,Ct).concat(this.ignoredGrid.query(Re,Oe,We,Ct)),rr={},Tr={};for(const Fr of Nt){const Vr=Fr.key;if(rr[Vr.bucketInstanceId]===void 0&&(rr[Vr.bucketInstanceId]={}),rr[Vr.bucketInstanceId][Vr.featureIndex])continue;const mn=[new r.P(Fr.x1,Fr.y1),new r.P(Fr.x2,Fr.y1),new r.P(Fr.x2,Fr.y2),new r.P(Fr.x1,Fr.y2)];r.am(fe,mn)&&(rr[Vr.bucketInstanceId][Vr.featureIndex]=!0,Tr[Vr.bucketInstanceId]===void 0&&(Tr[Vr.bucketInstanceId]=[]),Tr[Vr.bucketInstanceId].push(Vr.featureIndex))}return Tr}insertCollisionBox(O,fe,Re,Oe,We,Ct){(Re?this.ignoredGrid:this.grid).insert({bucketInstanceId:Oe,featureIndex:We,collisionGroupID:Ct,overlapMode:fe},O[0],O[1],O[2],O[3])}insertCollisionCircles(O,fe,Re,Oe,We,Ct){const Nt=Re?this.ignoredGrid:this.grid,rr={bucketInstanceId:Oe,featureIndex:We,collisionGroupID:Ct,overlapMode:fe};for(let Tr=0;Tr<O.length;Tr+=4)Nt.insertCircle(rr,O[Tr],O[Tr+1],O[Tr+2])}projectAndGetPerspectiveRatio(O,fe,Re,Oe,We){let Ct;We?(Ct=[fe,Re,We(fe,Re),1],r.af(Ct,Ct,O)):(Ct=[fe,Re,0,1],Sr(Ct,Ct,O));const Nt=Ct[3];return{point:new r.P((Ct[0]/Nt+1)/2*this.transform.width+Kr,(-Ct[1]/Nt+1)/2*this.transform.height+Kr),perspectiveRatio:.5+this.transform.cameraToCenterDistance/Nt*.5,isOccluded:!1,signedDistanceFromCamera:Nt}}getPerspectiveRatio(O,fe,Re,Oe,We){const Ct=this.mapProjection.useSpecialProjectionForSymbols?this.mapProjection.projectTileCoordinates(fe,Re,Oe,We):Ot(fe,Re,O,We);return .5+this.transform.cameraToCenterDistance/Ct.signedDistanceFromCamera*.5}isOffscreen(O,fe,Re,Oe){return Re<Kr||O>=this.screenRightBoundary||Oe<Kr||fe>this.screenBottomBoundary}isInsideGrid(O,fe,Re,Oe){return Re>=0&&O<this.gridRightBoundary&&Oe>=0&&fe<this.gridBottomBoundary}getViewportMatrix(){const O=r.an([]);return r.J(O,O,[-100,-100,0]),O}_projectCollisionBox(O,fe,Re,Oe,We,Ct,Nt,rr,Tr,Fr){let Vr=new r.P(1,0),mn=new r.P(0,1);const Dn=new r.P(O.anchorPointX+Nt[0],O.anchorPointY+Nt[1]);if(Ct&&!We){const bn=this.projectAndGetPerspectiveRatio(Re,Dn.x+1,Dn.y,Oe,Tr).point.sub(rr.point).unit(),Vn=Math.atan(bn.y/bn.x)+(bn.x<0?Math.PI:0),Yn=Math.sin(Vn),va=Math.cos(Vn);Vr=new r.P(va,Yn),mn=new r.P(-Yn,va)}else if(!Ct&&We){const bn=-this.transform.angle,Vn=Math.sin(bn),Yn=Math.cos(bn);Vr=new r.P(Yn,Vn),mn=new r.P(-Vn,Yn)}let nt=rr.point,ct=fe;if(We){nt=Dn;const bn=this.transform.zoom-Math.floor(this.transform.zoom);ct=Math.pow(2,-bn),ct*=this.mapProjection.getPitchedTextCorrection(this.transform,Dn,Oe),Fr||(ct*=r.ac(.5+rr.signedDistanceFromCamera/this.transform.cameraToCenterDistance*.5,0,4))}Fr&&(nt=nt.add(Vr.mult(Fr.x*ct)).add(mn.mult(Fr.y*ct)));const Tt=O.x1*ct,Pt=O.x2*ct,Gt=(Tt+Pt)/2,zt=O.y1*ct,Kt=O.y2*ct,Cr=(zt+Kt)/2,Nr=[{offsetX:Tt,offsetY:zt},{offsetX:Gt,offsetY:zt},{offsetX:Pt,offsetY:zt},{offsetX:Pt,offsetY:Cr},{offsetX:Pt,offsetY:Kt},{offsetX:Gt,offsetY:Kt},{offsetX:Tt,offsetY:Kt},{offsetX:Tt,offsetY:Cr}];let Hr=[];for(const{offsetX:bn,offsetY:Vn}of Nr)Hr.push(new r.P(nt.x+Vr.x*bn+mn.x*Vn,nt.y+Vr.y*bn+mn.y*Vn));let sn=!1;if(We){const bn=Hr.map(Vn=>this.projectAndGetPerspectiveRatio(Re,Vn.x,Vn.y,Oe,Tr));sn=bn.some(Vn=>!Vn.isOccluded),Hr=bn.map(Vn=>Vn.point)}else sn=!0;return{box:r.ao(Hr),allPointsOccluded:!sn}}}function ga(Ze,O,fe){return O*(r.X/(Ze.tileSize*Math.pow(2,fe-Ze.tileID.overscaledZ)))}class ua{constructor(O,fe,Re,Oe){this.opacity=O?Math.max(0,Math.min(1,O.opacity+(O.placed?fe:-fe))):Oe&&Re?1:0,this.placed=Re}isHidden(){return this.opacity===0&&!this.placed}}class Ta{constructor(O,fe,Re,Oe,We){this.text=new ua(O?O.text:null,fe,Re,We),this.icon=new ua(O?O.icon:null,fe,Oe,We)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class Aa{constructor(O,fe,Re){this.text=O,this.icon=fe,this.skipFade=Re}}class ia{constructor(){this.invProjMatrix=r.H(),this.viewportMatrix=r.H(),this.circles=[]}}class $a{constructor(O,fe,Re,Oe,We){this.bucketInstanceId=O,this.featureIndex=fe,this.sourceLayerIndex=Re,this.bucketIndex=Oe,this.tileID=We}}class ci{constructor(O){this.crossSourceCollisions=O,this.maxGroupID=0,this.collisionGroups={}}get(O){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[O]){const fe=++this.maxGroupID;this.collisionGroups[O]={ID:fe,predicate:Re=>Re.collisionGroupID===fe}}return this.collisionGroups[O]}}function _r(Ze,O,fe,Re,Oe){const{horizontalAlign:We,verticalAlign:Ct}=r.au(Ze);return new r.P(-(We-.5)*O+Re[0]*Oe,-(Ct-.5)*fe+Re[1]*Oe)}class Qt{constructor(O,fe,Re,Oe,We,Ct){this.transform=O.clone(),this.terrain=Re,this.collisionIndex=new Hn(this.transform,fe),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=Oe,this.retainedQueryData={},this.collisionGroups=new ci(We),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=Ct,Ct&&(Ct.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(O){const fe=this.terrain;return fe?(Re,Oe)=>fe.getElevation(O,Re,Oe):null}getBucketParts(O,fe,Re,Oe){const We=Re.getBucket(fe),Ct=Re.latestFeatureIndex;if(!We||!Ct||fe.id!==We.layerIds[0])return;const Nt=Re.collisionBoxArray,rr=We.layers[0].layout,Tr=We.layers[0].paint,Fr=Math.pow(2,this.transform.zoom-Re.tileID.overscaledZ),Vr=Re.tileSize/r.X,mn=Re.tileID.toUnwrapped(),Dn=this.transform.calculatePosMatrix(mn),nt=rr.get("text-pitch-alignment")==="map",ct=rr.get("text-rotation-alignment")==="map",Tt=ga(Re,1,this.transform.zoom),Pt=this.collisionIndex.mapProjection.translatePosition(this.transform,Re,Tr.get("text-translate"),Tr.get("text-translate-anchor")),Gt=this.collisionIndex.mapProjection.translatePosition(this.transform,Re,Tr.get("icon-translate"),Tr.get("icon-translate-anchor")),zt=Br(Dn,nt,ct,this.transform,Tt);let Kt=null;if(nt){const Nr=Qr(Dn,nt,ct,this.transform,Tt);Kt=r.L([],this.transform.labelPlaneMatrix,Nr)}this.retainedQueryData[We.bucketInstanceId]=new $a(We.bucketInstanceId,Ct,We.sourceLayerIndex,We.index,Re.tileID);const Cr={bucket:We,layout:rr,translationText:Pt,translationIcon:Gt,posMatrix:Dn,unwrappedTileID:mn,textLabelPlaneMatrix:zt,labelToScreenMatrix:Kt,scale:Fr,textPixelRatio:Vr,holdingForFade:Re.holdingForFade(),collisionBoxArray:Nt,partiallyEvaluatedTextSize:r.ag(We.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(We.sourceID)};if(Oe)for(const Nr of We.sortKeyRanges){const{sortKey:Hr,symbolInstanceStart:sn,symbolInstanceEnd:bn}=Nr;O.push({sortKey:Hr,symbolInstanceStart:sn,symbolInstanceEnd:bn,parameters:Cr})}else O.push({symbolInstanceStart:0,symbolInstanceEnd:We.symbolInstances.length,parameters:Cr})}attemptAnchorPlacement(O,fe,Re,Oe,We,Ct,Nt,rr,Tr,Fr,Vr,mn,Dn,nt,ct,Tt,Pt,Gt,zt){const Kt=r.aq[O.textAnchor],Cr=[O.textOffset0,O.textOffset1],Nr=_r(Kt,Re,Oe,Cr,We),Hr=this.collisionIndex.placeCollisionBox(fe,mn,rr,Tr,Fr,Nt,Ct,Tt,Vr.predicate,zt,Nr);if((!Gt||this.collisionIndex.placeCollisionBox(Gt,mn,rr,Tr,Fr,Nt,Ct,Pt,Vr.predicate,zt,Nr).placeable)&&Hr.placeable){let sn;if(this.prevPlacement&&this.prevPlacement.variableOffsets[Dn.crossTileID]&&this.prevPlacement.placements[Dn.crossTileID]&&this.prevPlacement.placements[Dn.crossTileID].text&&(sn=this.prevPlacement.variableOffsets[Dn.crossTileID].anchor),Dn.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[Dn.crossTileID]={textOffset:Cr,width:Re,height:Oe,anchor:Kt,textBoxScale:We,prevAnchor:sn},this.markUsedJustification(nt,Kt,Dn,ct),nt.allowVerticalPlacement&&(this.markUsedOrientation(nt,ct,Dn),this.placedOrientations[Dn.crossTileID]=ct),{shift:Nr,placedGlyphBoxes:Hr}}}placeLayerBucketPart(O,fe,Re){const{bucket:Oe,layout:We,translationText:Ct,translationIcon:Nt,posMatrix:rr,unwrappedTileID:Tr,textLabelPlaneMatrix:Fr,labelToScreenMatrix:Vr,textPixelRatio:mn,holdingForFade:Dn,collisionBoxArray:nt,partiallyEvaluatedTextSize:ct,collisionGroup:Tt}=O.parameters,Pt=We.get("text-optional"),Gt=We.get("icon-optional"),zt=r.ar(We,"text-overlap","text-allow-overlap"),Kt=zt==="always",Cr=r.ar(We,"icon-overlap","icon-allow-overlap"),Nr=Cr==="always",Hr=We.get("text-rotation-alignment")==="map",sn=We.get("text-pitch-alignment")==="map",bn=We.get("icon-text-fit")!=="none",Vn=We.get("symbol-z-order")==="viewport-y",Yn=Kt&&(Nr||!Oe.hasIconData()||Gt),va=Nr&&(Kt||!Oe.hasTextData()||Pt);!Oe.collisionArrays&&nt&&Oe.deserializeCollisionBoxes(nt);const Va=this._getTerrainElevationFunc(this.retainedQueryData[Oe.bucketInstanceId].tileID),Si=(yi,Mi,go)=>{var jo,Do;if(fe[yi.crossTileID])return;if(Dn)return void(this.placements[yi.crossTileID]=new Aa(!1,!1,!1));let us=!1,sl=!1,ll=!0,Bs=null,vl={box:null,placeable:!1,offscreen:null},Eu={placeable:!1},vu=null,Us=null,qs=null,Hu=0,yc=0,Zc=0;Mi.textFeatureIndex?Hu=Mi.textFeatureIndex:yi.useRuntimeCollisionCircles&&(Hu=yi.featureIndex),Mi.verticalTextFeatureIndex&&(yc=Mi.verticalTextFeatureIndex);const Te=Mi.textBox;if(Te){const Dt=Pr=>{let ln=r.ah.horizontal;if(Oe.allowVerticalPlacement&&!Pr&&this.prevPlacement){const on=this.prevPlacement.placedOrientations[yi.crossTileID];on&&(this.placedOrientations[yi.crossTileID]=on,ln=on,this.markUsedOrientation(Oe,ln,yi))}return ln},qt=(Pr,ln)=>{if(Oe.allowVerticalPlacement&&yi.numVerticalGlyphVertices>0&&Mi.verticalTextBox){for(const on of Oe.writingModes)if(on===r.ah.vertical?(vl=ln(),Eu=vl):vl=Pr(),vl&&vl.placeable)break}else vl=Pr()},dr=yi.textAnchorOffsetStartIndex,hr=yi.textAnchorOffsetEndIndex;if(hr===dr){const Pr=(ln,on)=>{const Mn=this.collisionIndex.placeCollisionBox(ln,zt,mn,rr,Tr,sn,Hr,Ct,Tt.predicate,Va);return Mn&&Mn.placeable&&(this.markUsedOrientation(Oe,on,yi),this.placedOrientations[yi.crossTileID]=on),Mn};qt(()=>Pr(Te,r.ah.horizontal),()=>{const ln=Mi.verticalTextBox;return Oe.allowVerticalPlacement&&yi.numVerticalGlyphVertices>0&&ln?Pr(ln,r.ah.vertical):{box:null,offscreen:null}}),Dt(vl&&vl.placeable)}else{let Pr=r.aq[(Do=(jo=this.prevPlacement)===null||jo===void 0?void 0:jo.variableOffsets[yi.crossTileID])===null||Do===void 0?void 0:Do.anchor];const ln=(Mn,Un,Gn)=>{const Ja=Mn.x2-Mn.x1,Qn=Mn.y2-Mn.y1,ba=yi.textBoxScale,Ca=bn&&Cr==="never"?Un:null;let Xa=null,ei=zt==="never"?1:2,Ma="never";Pr&&ei++;for(let Ci=0;Ci<ei;Ci++){for(let po=dr;po<hr;po++){const ro=Oe.textAnchorOffsets.get(po);if(Pr&&ro.textAnchor!==Pr)continue;const fo=this.attemptAnchorPlacement(ro,Mn,Ja,Qn,ba,Hr,sn,mn,rr,Tr,Tt,Ma,yi,Oe,Gn,Ct,Nt,Ca,Va);if(fo&&(Xa=fo.placedGlyphBoxes,Xa&&Xa.placeable))return us=!0,Bs=fo.shift,Xa}Pr?Pr=null:Ma=zt}return Re&&!Xa&&(Xa={box:this.collisionIndex.placeCollisionBox(Te,"always",mn,rr,Tr,sn,Hr,Ct,Tt.predicate,Va,new r.P(0,0)).box,offscreen:!1,placeable:!1}),Xa};qt(()=>ln(Te,Mi.iconBox,r.ah.horizontal),()=>{const Mn=Mi.verticalTextBox;return Oe.allowVerticalPlacement&&(!vl||!vl.placeable)&&yi.numVerticalGlyphVertices>0&&Mn?ln(Mn,Mi.verticalIconBox,r.ah.vertical):{box:null,occluded:!0,offscreen:null}}),vl&&(us=vl.placeable,ll=vl.offscreen);const on=Dt(vl&&vl.placeable);if(!us&&this.prevPlacement){const Mn=this.prevPlacement.variableOffsets[yi.crossTileID];Mn&&(this.variableOffsets[yi.crossTileID]=Mn,this.markUsedJustification(Oe,Mn.anchor,yi,on))}}}if(vu=vl,us=vu&&vu.placeable,ll=vu&&vu.offscreen,yi.useRuntimeCollisionCircles){const Dt=Oe.text.placedSymbolArray.get(yi.centerJustifiedTextSymbolIndex),qt=r.ai(Oe.textSizeData,ct,Dt),dr=We.get("text-padding");Us=this.collisionIndex.placeCollisionCircles(zt,Dt,Oe.lineVertexArray,Oe.glyphOffsetArray,qt,rr,Tr,Fr,Vr,Re,sn,Tt.predicate,yi.collisionCircleDiameter,dr,Ct,Va),Us.circles.length&&Us.collisionDetected&&!Re&&r.w("Collisions detected, but collision boxes are not shown"),us=Kt||Us.circles.length>0&&!Us.collisionDetected,ll=ll&&Us.offscreen}if(Mi.iconFeatureIndex&&(Zc=Mi.iconFeatureIndex),Mi.iconBox){const Dt=qt=>this.collisionIndex.placeCollisionBox(qt,Cr,mn,rr,Tr,sn,Hr,Nt,Tt.predicate,Va,bn&&Bs?Bs:void 0);Eu&&Eu.placeable&&Mi.verticalIconBox?(qs=Dt(Mi.verticalIconBox),sl=qs.placeable):(qs=Dt(Mi.iconBox),sl=qs.placeable),ll=ll&&qs.offscreen}const He=Pt||yi.numHorizontalGlyphVertices===0&&yi.numVerticalGlyphVertices===0,ft=Gt||yi.numIconVertices===0;He||ft?ft?He||(sl=sl&&us):us=sl&&us:sl=us=sl&&us;const Lt=sl&&qs.placeable;if(us&&vu.placeable&&this.collisionIndex.insertCollisionBox(vu.box,zt,We.get("text-ignore-placement"),Oe.bucketInstanceId,Eu&&Eu.placeable&&yc?yc:Hu,Tt.ID),Lt&&this.collisionIndex.insertCollisionBox(qs.box,Cr,We.get("icon-ignore-placement"),Oe.bucketInstanceId,Zc,Tt.ID),Us&&us&&this.collisionIndex.insertCollisionCircles(Us.circles,zt,We.get("text-ignore-placement"),Oe.bucketInstanceId,Hu,Tt.ID),Re&&this.storeCollisionData(Oe.bucketInstanceId,go,Mi,vu,qs,Us),yi.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");if(Oe.bucketInstanceId===0)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[yi.crossTileID]=new Aa(us||Yn,sl||va,ll||Oe.justReloaded),fe[yi.crossTileID]=!0};if(Vn){if(O.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");const yi=Oe.getSortedSymbolIndexes(this.transform.angle);for(let Mi=yi.length-1;Mi>=0;--Mi){const go=yi[Mi];Si(Oe.symbolInstances.get(go),Oe.collisionArrays[go],go)}}else for(let yi=O.symbolInstanceStart;yi<O.symbolInstanceEnd;yi++)Si(Oe.symbolInstances.get(yi),Oe.collisionArrays[yi],yi);if(Re&&Oe.bucketInstanceId in this.collisionCircleArrays){const yi=this.collisionCircleArrays[Oe.bucketInstanceId];r.as(yi.invProjMatrix,rr),yi.viewportMatrix=this.collisionIndex.getViewportMatrix()}Oe.justReloaded=!1}storeCollisionData(O,fe,Re,Oe,We,Ct){if(Re.textBox||Re.iconBox){let Nt,rr;this.collisionBoxArrays.has(O)?Nt=this.collisionBoxArrays.get(O):(Nt=new Map,this.collisionBoxArrays.set(O,Nt)),Nt.has(fe)?rr=Nt.get(fe):(rr={text:null,icon:null},Nt.set(fe,rr)),Re.textBox&&(rr.text=Oe.box),Re.iconBox&&(rr.icon=We.box)}if(Ct){let Nt=this.collisionCircleArrays[O];Nt===void 0&&(Nt=this.collisionCircleArrays[O]=new ia);for(let rr=0;rr<Ct.circles.length;rr+=4)Nt.circles.push(Ct.circles[rr+0]),Nt.circles.push(Ct.circles[rr+1]),Nt.circles.push(Ct.circles[rr+2]),Nt.circles.push(Ct.collisionDetected?1:0)}}markUsedJustification(O,fe,Re,Oe){let We;We=Oe===r.ah.vertical?Re.verticalPlacedTextSymbolIndex:{left:Re.leftJustifiedTextSymbolIndex,center:Re.centerJustifiedTextSymbolIndex,right:Re.rightJustifiedTextSymbolIndex}[r.at(fe)];const Ct=[Re.leftJustifiedTextSymbolIndex,Re.centerJustifiedTextSymbolIndex,Re.rightJustifiedTextSymbolIndex,Re.verticalPlacedTextSymbolIndex];for(const Nt of Ct)Nt>=0&&(O.text.placedSymbolArray.get(Nt).crossTileID=We>=0&&Nt!==We?0:Re.crossTileID)}markUsedOrientation(O,fe,Re){const Oe=fe===r.ah.horizontal||fe===r.ah.horizontalOnly?fe:0,We=fe===r.ah.vertical?fe:0,Ct=[Re.leftJustifiedTextSymbolIndex,Re.centerJustifiedTextSymbolIndex,Re.rightJustifiedTextSymbolIndex];for(const Nt of Ct)O.text.placedSymbolArray.get(Nt).placedOrientation=Oe;Re.verticalPlacedTextSymbolIndex&&(O.text.placedSymbolArray.get(Re.verticalPlacedTextSymbolIndex).placedOrientation=We)}commit(O){this.commitTime=O,this.zoomAtLastRecencyCheck=this.transform.zoom;const fe=this.prevPlacement;let Re=!1;this.prevZoomAdjustment=fe?fe.zoomAdjustment(this.transform.zoom):0;const Oe=fe?fe.symbolFadeChange(O):1,We=fe?fe.opacities:{},Ct=fe?fe.variableOffsets:{},Nt=fe?fe.placedOrientations:{};for(const rr in this.placements){const Tr=this.placements[rr],Fr=We[rr];Fr?(this.opacities[rr]=new Ta(Fr,Oe,Tr.text,Tr.icon),Re=Re||Tr.text!==Fr.text.placed||Tr.icon!==Fr.icon.placed):(this.opacities[rr]=new Ta(null,Oe,Tr.text,Tr.icon,Tr.skipFade),Re=Re||Tr.text||Tr.icon)}for(const rr in We){const Tr=We[rr];if(!this.opacities[rr]){const Fr=new Ta(Tr,Oe,!1,!1);Fr.isHidden()||(this.opacities[rr]=Fr,Re=Re||Tr.text.placed||Tr.icon.placed)}}for(const rr in Ct)this.variableOffsets[rr]||!this.opacities[rr]||this.opacities[rr].isHidden()||(this.variableOffsets[rr]=Ct[rr]);for(const rr in Nt)this.placedOrientations[rr]||!this.opacities[rr]||this.opacities[rr].isHidden()||(this.placedOrientations[rr]=Nt[rr]);if(fe&&fe.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");Re?this.lastPlacementChangeTime=O:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=fe?fe.lastPlacementChangeTime:O)}updateLayerOpacities(O,fe){const Re={};for(const Oe of fe){const We=Oe.getBucket(O);We&&Oe.latestFeatureIndex&&O.id===We.layerIds[0]&&this.updateBucketOpacities(We,Oe.tileID,Re,Oe.collisionBoxArray)}}updateBucketOpacities(O,fe,Re,Oe){O.hasTextData()&&(O.text.opacityVertexArray.clear(),O.text.hasVisibleVertices=!1),O.hasIconData()&&(O.icon.opacityVertexArray.clear(),O.icon.hasVisibleVertices=!1),O.hasIconCollisionBoxData()&&O.iconCollisionBox.collisionVertexArray.clear(),O.hasTextCollisionBoxData()&&O.textCollisionBox.collisionVertexArray.clear();const We=O.layers[0],Ct=We.layout,Nt=new Ta(null,0,!1,!1,!0),rr=Ct.get("text-allow-overlap"),Tr=Ct.get("icon-allow-overlap"),Fr=We._unevaluatedLayout.hasValue("text-variable-anchor")||We._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Vr=Ct.get("text-rotation-alignment")==="map",mn=Ct.get("text-pitch-alignment")==="map",Dn=Ct.get("icon-text-fit")!=="none",nt=new Ta(null,0,rr&&(Tr||!O.hasIconData()||Ct.get("icon-optional")),Tr&&(rr||!O.hasTextData()||Ct.get("text-optional")),!0);!O.collisionArrays&&Oe&&(O.hasIconCollisionBoxData()||O.hasTextCollisionBoxData())&&O.deserializeCollisionBoxes(Oe);const ct=(Pt,Gt,zt)=>{for(let Kt=0;Kt<Gt/4;Kt++)Pt.opacityVertexArray.emplaceBack(zt);Pt.hasVisibleVertices=Pt.hasVisibleVertices||zt!==Ba},Tt=this.collisionBoxArrays.get(O.bucketInstanceId);for(let Pt=0;Pt<O.symbolInstances.length;Pt++){const Gt=O.symbolInstances.get(Pt),{numHorizontalGlyphVertices:zt,numVerticalGlyphVertices:Kt,crossTileID:Cr}=Gt;let Nr=this.opacities[Cr];Re[Cr]?Nr=Nt:Nr||(Nr=nt,this.opacities[Cr]=Nr),Re[Cr]=!0;const Hr=Gt.numIconVertices>0,sn=this.placedOrientations[Gt.crossTileID],bn=sn===r.ah.vertical,Vn=sn===r.ah.horizontal||sn===r.ah.horizontalOnly;if(zt>0||Kt>0){const va=Ia(Nr.text);ct(O.text,zt,bn?Ba:va),ct(O.text,Kt,Vn?Ba:va);const Va=Nr.text.isHidden();[Gt.rightJustifiedTextSymbolIndex,Gt.centerJustifiedTextSymbolIndex,Gt.leftJustifiedTextSymbolIndex].forEach(Mi=>{Mi>=0&&(O.text.placedSymbolArray.get(Mi).hidden=Va||bn?1:0)}),Gt.verticalPlacedTextSymbolIndex>=0&&(O.text.placedSymbolArray.get(Gt.verticalPlacedTextSymbolIndex).hidden=Va||Vn?1:0);const Si=this.variableOffsets[Gt.crossTileID];Si&&this.markUsedJustification(O,Si.anchor,Gt,sn);const yi=this.placedOrientations[Gt.crossTileID];yi&&(this.markUsedJustification(O,"left",Gt,yi),this.markUsedOrientation(O,yi,Gt))}if(Hr){const va=Ia(Nr.icon),Va=!(Dn&&Gt.verticalPlacedIconSymbolIndex&&bn);Gt.placedIconSymbolIndex>=0&&(ct(O.icon,Gt.numIconVertices,Va?va:Ba),O.icon.placedSymbolArray.get(Gt.placedIconSymbolIndex).hidden=Nr.icon.isHidden()),Gt.verticalPlacedIconSymbolIndex>=0&&(ct(O.icon,Gt.numVerticalIconVertices,Va?Ba:va),O.icon.placedSymbolArray.get(Gt.verticalPlacedIconSymbolIndex).hidden=Nr.icon.isHidden())}const Yn=Tt&&Tt.has(Pt)?Tt.get(Pt):{text:null,icon:null};if(O.hasIconCollisionBoxData()||O.hasTextCollisionBoxData()){const va=O.collisionArrays[Pt];if(va){let Va=new r.P(0,0);if(va.textBox||va.verticalTextBox){let Si=!0;if(Fr){const yi=this.variableOffsets[Cr];yi?(Va=_r(yi.anchor,yi.width,yi.height,yi.textOffset,yi.textBoxScale),Vr&&Va._rotate(mn?this.transform.angle:-this.transform.angle)):Si=!1}if(va.textBox||va.verticalTextBox){let yi;va.textBox&&(yi=bn),va.verticalTextBox&&(yi=Vn),yr(O.textCollisionBox.collisionVertexArray,Nr.text.placed,!Si||yi,Yn.text,Va.x,Va.y)}}if(va.iconBox||va.verticalIconBox){const Si=!!(!Vn&&va.verticalIconBox);let yi;va.iconBox&&(yi=Si),va.verticalIconBox&&(yi=!Si),yr(O.iconCollisionBox.collisionVertexArray,Nr.icon.placed,yi,Yn.icon,Dn?Va.x:0,Dn?Va.y:0)}}}}if(O.sortFeatures(this.transform.angle),this.retainedQueryData[O.bucketInstanceId]&&(this.retainedQueryData[O.bucketInstanceId].featureSortOrder=O.featureSortOrder),O.hasTextData()&&O.text.opacityVertexBuffer&&O.text.opacityVertexBuffer.updateData(O.text.opacityVertexArray),O.hasIconData()&&O.icon.opacityVertexBuffer&&O.icon.opacityVertexBuffer.updateData(O.icon.opacityVertexArray),O.hasIconCollisionBoxData()&&O.iconCollisionBox.collisionVertexBuffer&&O.iconCollisionBox.collisionVertexBuffer.updateData(O.iconCollisionBox.collisionVertexArray),O.hasTextCollisionBoxData()&&O.textCollisionBox.collisionVertexBuffer&&O.textCollisionBox.collisionVertexBuffer.updateData(O.textCollisionBox.collisionVertexArray),O.text.opacityVertexArray.length!==O.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${O.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${O.text.layoutVertexArray.length}) / 4`);if(O.icon.opacityVertexArray.length!==O.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${O.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${O.icon.layoutVertexArray.length}) / 4`);if(O.bucketInstanceId in this.collisionCircleArrays){const Pt=this.collisionCircleArrays[O.bucketInstanceId];O.placementInvProjMatrix=Pt.invProjMatrix,O.placementViewportMatrix=Pt.viewportMatrix,O.collisionCircleArray=Pt.circles,delete this.collisionCircleArrays[O.bucketInstanceId]}}symbolFadeChange(O){return this.fadeDuration===0?1:(O-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(O){return Math.max(0,(this.transform.zoom-O)/1.5)}hasTransitions(O){return this.stale||O-this.lastPlacementChangeTime<this.fadeDuration}stillRecent(O,fe){const Re=this.zoomAtLastRecencyCheck===fe?1-this.zoomAdjustment(fe):1;return this.zoomAtLastRecencyCheck=fe,this.commitTime+this.fadeDuration*Re>O}setStale(){this.stale=!0}}function yr(Ze,O,fe,Re,Oe,We){Re&&Re.length!==0||(Re=[0,0,0,0]);const Ct=Re[0]-Kr,Nt=Re[1]-Kr,rr=Re[2]-Kr,Tr=Re[3]-Kr;Ze.emplaceBack(O?1:0,fe?1:0,Oe||0,We||0,Ct,Nt),Ze.emplaceBack(O?1:0,fe?1:0,Oe||0,We||0,rr,Nt),Ze.emplaceBack(O?1:0,fe?1:0,Oe||0,We||0,rr,Tr),Ze.emplaceBack(O?1:0,fe?1:0,Oe||0,We||0,Ct,Tr)}const br=Math.pow(2,25),an=Math.pow(2,24),wn=Math.pow(2,17),Ln=Math.pow(2,16),Bn=Math.pow(2,9),xa=Math.pow(2,8),za=Math.pow(2,1);function Ia(Ze){if(Ze.opacity===0&&!Ze.placed)return 0;if(Ze.opacity===1&&Ze.placed)return 4294967295;const O=Ze.placed?1:0,fe=Math.floor(127*Ze.opacity);return fe*br+O*an+fe*wn+O*Ln+fe*Bn+O*xa+fe*za+O}const Ba=0;function Ka(){return{isOccluded:(Ze,O,fe)=>!1,getPitchedTextCorrection:(Ze,O,fe)=>1,get useSpecialProjectionForSymbols(){return!1},projectTileCoordinates(Ze,O,fe,Re){throw new Error("Not implemented.")},translatePosition:(Ze,O,fe,Re)=>(function(Oe,We,Ct,Nt,rr=!1){if(!Ct[0]&&!Ct[1])return[0,0];const Tr=rr?Nt==="map"?Oe.angle:0:Nt==="viewport"?-Oe.angle:0;if(Tr){const Fr=Math.sin(Tr),Vr=Math.cos(Tr);Ct=[Ct[0]*Vr-Ct[1]*Fr,Ct[0]*Fr+Ct[1]*Vr]}return[rr?Ct[0]:ga(We,Ct[0],Oe.zoom),rr?Ct[1]:ga(We,Ct[1],Oe.zoom)]})(Ze,O,fe,Re),getCircleRadiusCorrection:Ze=>1}}class fa{constructor(O){this._sortAcrossTiles=O.layout.get("symbol-z-order")!=="viewport-y"&&!O.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(O,fe,Re,Oe,We){const Ct=this._bucketParts;for(;this._currentTileIndex<O.length;)if(fe.getBucketParts(Ct,Oe,O[this._currentTileIndex],this._sortAcrossTiles),this._currentTileIndex++,We())return!0;for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,Ct.sort((Nt,rr)=>Nt.sortKey-rr.sortKey));this._currentPartIndex<Ct.length;)if(fe.placeLayerBucketPart(Ct[this._currentPartIndex],this._seenCrossTileIDs,Re),this._currentPartIndex++,We())return!0;return!1}}class Bi{constructor(O,fe,Re,Oe,We,Ct,Nt,rr){this.placement=new Qt(O,Ka(),fe,Ct,Nt,rr),this._currentPlacementIndex=Re.length-1,this._forceFullPlacement=Oe,this._showCollisionBoxes=We,this._done=!1}isDone(){return this._done}continuePlacement(O,fe,Re){const Oe=s.now(),We=()=>!this._forceFullPlacement&&s.now()-Oe>2;for(;this._currentPlacementIndex>=0;){const Ct=fe[O[this._currentPlacementIndex]],Nt=this.placement.collisionIndex.transform.zoom;if(Ct.type==="symbol"&&(!Ct.minzoom||Ct.minzoom<=Nt)&&(!Ct.maxzoom||Ct.maxzoom>Nt)){if(this._inProgressLayer||(this._inProgressLayer=new fa(Ct)),this._inProgressLayer.continuePlacement(Re[Ct.source],this.placement,this._showCollisionBoxes,Ct,We))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(O){return this.placement.commit(O),this.placement}}const Yi=512/r.X/2;class Ht{constructor(O,fe,Re){this.tileID=O,this.bucketInstanceId=Re,this._symbolsByKey={};const Oe=new Map;for(let We=0;We<fe.length;We++){const Ct=fe.get(We),Nt=Ct.key,rr=Oe.get(Nt);rr?rr.push(Ct):Oe.set(Nt,[Ct])}for(const[We,Ct]of Oe){const Nt={positions:Ct.map(rr=>({x:Math.floor(rr.anchorX*Yi),y:Math.floor(rr.anchorY*Yi)})),crossTileIDs:Ct.map(rr=>rr.crossTileID)};if(Nt.positions.length>128){const rr=new r.av(Nt.positions.length,16,Uint16Array);for(const{x:Tr,y:Fr}of Nt.positions)rr.add(Tr,Fr);rr.finish(),delete Nt.positions,Nt.index=rr}this._symbolsByKey[We]=Nt}}getScaledCoordinates(O,fe){const{x:Re,y:Oe,z:We}=this.tileID.canonical,{x:Ct,y:Nt,z:rr}=fe.canonical,Tr=Yi/Math.pow(2,rr-We),Fr=(Nt*r.X+O.anchorY)*Tr,Vr=Oe*r.X*Yi;return{x:Math.floor((Ct*r.X+O.anchorX)*Tr-Re*r.X*Yi),y:Math.floor(Fr-Vr)}}findMatches(O,fe,Re){const Oe=this.tileID.canonical.z<fe.canonical.z?1:Math.pow(2,this.tileID.canonical.z-fe.canonical.z);for(let We=0;We<O.length;We++){const Ct=O.get(We);if(Ct.crossTileID)continue;const Nt=this._symbolsByKey[Ct.key];if(!Nt)continue;const rr=this.getScaledCoordinates(Ct,fe);if(Nt.index){const Tr=Nt.index.range(rr.x-Oe,rr.y-Oe,rr.x+Oe,rr.y+Oe).sort();for(const Fr of Tr){const Vr=Nt.crossTileIDs[Fr];if(!Re[Vr]){Re[Vr]=!0,Ct.crossTileID=Vr;break}}}else if(Nt.positions)for(let Tr=0;Tr<Nt.positions.length;Tr++){const Fr=Nt.positions[Tr],Vr=Nt.crossTileIDs[Tr];if(Math.abs(Fr.x-rr.x)<=Oe&&Math.abs(Fr.y-rr.y)<=Oe&&!Re[Vr]){Re[Vr]=!0,Ct.crossTileID=Vr;break}}}}getCrossTileIDsLists(){return Object.values(this._symbolsByKey).map(({crossTileIDs:O})=>O)}}class kt{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class qr{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(O){const fe=Math.round((O-this.lng)/360);if(fe!==0)for(const Re in this.indexes){const Oe=this.indexes[Re],We={};for(const Ct in Oe){const Nt=Oe[Ct];Nt.tileID=Nt.tileID.unwrapTo(Nt.tileID.wrap+fe),We[Nt.tileID.key]=Nt}this.indexes[Re]=We}this.lng=O}addBucket(O,fe,Re){if(this.indexes[O.overscaledZ]&&this.indexes[O.overscaledZ][O.key]){if(this.indexes[O.overscaledZ][O.key].bucketInstanceId===fe.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(O.overscaledZ,this.indexes[O.overscaledZ][O.key])}for(let We=0;We<fe.symbolInstances.length;We++)fe.symbolInstances.get(We).crossTileID=0;this.usedCrossTileIDs[O.overscaledZ]||(this.usedCrossTileIDs[O.overscaledZ]={});const Oe=this.usedCrossTileIDs[O.overscaledZ];for(const We in this.indexes){const Ct=this.indexes[We];if(Number(We)>O.overscaledZ)for(const Nt in Ct){const rr=Ct[Nt];rr.tileID.isChildOf(O)&&rr.findMatches(fe.symbolInstances,O,Oe)}else{const Nt=Ct[O.scaledTo(Number(We)).key];Nt&&Nt.findMatches(fe.symbolInstances,O,Oe)}}for(let We=0;We<fe.symbolInstances.length;We++){const Ct=fe.symbolInstances.get(We);Ct.crossTileID||(Ct.crossTileID=Re.generate(),Oe[Ct.crossTileID]=!0)}return this.indexes[O.overscaledZ]===void 0&&(this.indexes[O.overscaledZ]={}),this.indexes[O.overscaledZ][O.key]=new Ht(O,fe.symbolInstances,fe.bucketInstanceId),!0}removeBucketCrossTileIDs(O,fe){for(const Re of fe.getCrossTileIDsLists())for(const Oe of Re)delete this.usedCrossTileIDs[O][Oe]}removeStaleBuckets(O){let fe=!1;for(const Re in this.indexes){const Oe=this.indexes[Re];for(const We in Oe)O[Oe[We].bucketInstanceId]||(this.removeBucketCrossTileIDs(Re,Oe[We]),delete Oe[We],fe=!0)}return fe}}class en{constructor(){this.layerIndexes={},this.crossTileIDs=new kt,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}}addLayer(O,fe,Re){let Oe=this.layerIndexes[O.id];Oe===void 0&&(Oe=this.layerIndexes[O.id]=new qr);let We=!1;const Ct={};Oe.handleWrapJump(Re);for(const Nt of fe){const rr=Nt.getBucket(O);rr&&O.id===rr.layerIds[0]&&(rr.bucketInstanceId||(rr.bucketInstanceId=++this.maxBucketInstanceId),Oe.addBucket(Nt.tileID,rr,this.crossTileIDs)&&(We=!0),Ct[rr.bucketInstanceId]=!0)}return Oe.removeStaleBuckets(Ct)&&(We=!0),We}pruneUnusedLayers(O){const fe={};O.forEach(Re=>{fe[Re]=!0});for(const Re in this.layerIndexes)fe[Re]||delete this.layerIndexes[Re]}}const rn=(Ze,O)=>r.t(Ze,O&&O.filter(fe=>fe.identifier!=="source.canvas")),Wr=r.aw();class tn extends r.E{constructor(O,fe={}){super(),this._rtlPluginLoaded=()=>{for(const Re in this.sourceCaches){const Oe=this.sourceCaches[Re].getSource().type;Oe!=="vector"&&Oe!=="geojson"||this.sourceCaches[Re].reload()}},this.map=O,this.dispatcher=new se(ie(),O._getMapId()),this.dispatcher.registerMessageHandler("GG",(Re,Oe)=>this.getGlyphs(Re,Oe)),this.dispatcher.registerMessageHandler("GI",(Re,Oe)=>this.getImages(Re,Oe)),this.imageManager=new x,this.imageManager.setEventedParent(this),this.glyphManager=new U(O._requestManager,fe.localIdeographFontFamily),this.lineAtlas=new J(256,512),this.crossTileSymbolIndex=new en,this._spritesImagesIds={},this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new r.ax,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("SR",r.ay()),yt().on(Pe,this._rtlPluginLoaded),this.on("data",Re=>{if(Re.dataType!=="source"||Re.sourceDataType!=="metadata")return;const Oe=this.sourceCaches[Re.sourceId];if(!Oe)return;const We=Oe.getSource();if(We&&We.vectorLayerIds)for(const Ct in this._layers){const Nt=this._layers[Ct];Nt.source===We.id&&this._validateLayer(Nt)}})}loadURL(O,fe={},Re){this.fire(new r.k("dataloading",{dataType:"style"})),fe.validate=typeof fe.validate!="boolean"||fe.validate;const Oe=this.map._requestManager.transformRequest(O,"Style");this._loadStyleRequest=new AbortController;const We=this._loadStyleRequest;r.h(Oe,this._loadStyleRequest).then(Ct=>{this._loadStyleRequest=null,this._load(Ct.data,fe,Re)}).catch(Ct=>{this._loadStyleRequest=null,Ct&&!We.signal.aborted&&this.fire(new r.j(Ct))})}loadJSON(O,fe={},Re){this.fire(new r.k("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,s.frameAsync(this._frameRequest).then(()=>{this._frameRequest=null,fe.validate=fe.validate!==!1,this._load(O,fe,Re)}).catch(()=>{})}loadEmpty(){this.fire(new r.k("dataloading",{dataType:"style"})),this._load(Wr,{validate:!1})}_load(O,fe,Re){var Oe;const We=fe.transformStyle?fe.transformStyle(Re,O):O;if(!fe.validate||!rn(this,r.u(We))){this._loaded=!0,this.stylesheet=We;for(const Ct in We.sources)this.addSource(Ct,We.sources[Ct],{validate:!1});We.sprite?this._loadSprite(We.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(We.glyphs),this._createLayers(),this.light=new z(this.stylesheet.light),this.sky=new G(this.stylesheet.sky),this.map.setTerrain((Oe=this.stylesheet.terrain)!==null&&Oe!==void 0?Oe:null),this.fire(new r.k("data",{dataType:"style"})),this.fire(new r.k("style.load"))}}_createLayers(){const O=r.az(this.stylesheet.layers);this.dispatcher.broadcast("SL",O),this._order=O.map(fe=>fe.id),this._layers={},this._serializedLayers=null;for(const fe of O){const Re=r.aA(fe);Re.setEventedParent(this,{layer:{id:fe.id}}),this._layers[fe.id]=Re}}_loadSprite(O,fe=!1,Re=void 0){let Oe;this.imageManager.setLoaded(!1),this._spriteRequest=new AbortController,(function(We,Ct,Nt,rr){return r._(this,void 0,void 0,function*(){const Tr=A(We),Fr=Nt>1?"@2x":"",Vr={},mn={};for(const{id:Dn,url:nt}of Tr){const ct=Ct.transformRequest(y(nt,Fr,".json"),"SpriteJSON");Vr[Dn]=r.h(ct,rr);const Tt=Ct.transformRequest(y(nt,Fr,".png"),"SpriteImage");mn[Dn]=c.getImage(Tt,rr)}return yield Promise.all([...Object.values(Vr),...Object.values(mn)]),(function(Dn,nt){return r._(this,void 0,void 0,function*(){const ct={};for(const Tt in Dn){ct[Tt]={};const Pt=s.getImageCanvasContext((yield nt[Tt]).data),Gt=(yield Dn[Tt]).data;for(const zt in Gt){const{width:Kt,height:Cr,x:Nr,y:Hr,sdf:sn,pixelRatio:bn,stretchX:Vn,stretchY:Yn,content:va,textFitWidth:Va,textFitHeight:Si}=Gt[zt];ct[Tt][zt]={data:null,pixelRatio:bn,sdf:sn,stretchX:Vn,stretchY:Yn,content:va,textFitWidth:Va,textFitHeight:Si,spriteData:{width:Kt,height:Cr,x:Nr,y:Hr,context:Pt}}}}return ct})})(Vr,mn)})})(O,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(We=>{if(this._spriteRequest=null,We)for(const Ct in We){this._spritesImagesIds[Ct]=[];const Nt=this._spritesImagesIds[Ct]?this._spritesImagesIds[Ct].filter(rr=>!(rr in We)):[];for(const rr of Nt)this.imageManager.removeImage(rr),this._changedImages[rr]=!0;for(const rr in We[Ct]){const Tr=Ct==="default"?rr:`${Ct}:${rr}`;this._spritesImagesIds[Ct].push(Tr),Tr in this.imageManager.images?this.imageManager.updateImage(Tr,We[Ct][rr],!1):this.imageManager.addImage(Tr,We[Ct][rr]),fe&&(this._changedImages[Tr]=!0)}}}).catch(We=>{this._spriteRequest=null,Oe=We,this.fire(new r.j(Oe))}).finally(()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),fe&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new r.k("data",{dataType:"style"})),Re&&Re(Oe)})}_unloadSprite(){for(const O of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(O),this._changedImages[O]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new r.k("data",{dataType:"style"}))}_validateLayer(O){const fe=this.sourceCaches[O.source];if(!fe)return;const Re=O.sourceLayer;if(!Re)return;const Oe=fe.getSource();(Oe.type==="geojson"||Oe.vectorLayerIds&&Oe.vectorLayerIds.indexOf(Re)===-1)&&this.fire(new r.j(new Error(`Source layer "${Re}" does not exist on source "${Oe.id}" as specified by style layer "${O.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(const O in this.sourceCaches)if(!this.sourceCaches[O].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeByIds(O,fe=!1){const Re=this._serializedAllLayers();if(!O||O.length===0)return Object.values(fe?r.aB(Re):Re);const Oe=[];for(const We of O)if(Re[We]){const Ct=fe?r.aB(Re[We]):Re[We];Oe.push(Ct)}return Oe}_serializedAllLayers(){let O=this._serializedLayers;if(O)return O;O=this._serializedLayers={};const fe=Object.keys(this._layers);for(const Re of fe){const Oe=this._layers[Re];Oe.type!=="custom"&&(O[Re]=Oe.serialize())}return O}hasTransitions(){if(this.light&&this.light.hasTransition()||this.sky&&this.sky.hasTransition())return!0;for(const O in this.sourceCaches)if(this.sourceCaches[O].hasTransition())return!0;for(const O in this._layers)if(this._layers[O].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(O){if(!this._loaded)return;const fe=this._changed;if(fe){const Oe=Object.keys(this._updatedLayers),We=Object.keys(this._removedLayers);(Oe.length||We.length)&&this._updateWorkerLayers(Oe,We);for(const Ct in this._updatedSources){const Nt=this._updatedSources[Ct];if(Nt==="reload")this._reloadSource(Ct);else{if(Nt!=="clear")throw new Error(`Invalid action ${Nt}`);this._clearSource(Ct)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(const Ct in this._updatedPaintProps)this._layers[Ct].updateTransitions(O);this.light.updateTransitions(O),this.sky.updateTransitions(O),this._resetUpdates()}const Re={};for(const Oe in this.sourceCaches){const We=this.sourceCaches[Oe];Re[Oe]=We.used,We.used=!1}for(const Oe of this._order){const We=this._layers[Oe];We.recalculate(O,this._availableImages),!We.isHidden(O.zoom)&&We.source&&(this.sourceCaches[We.source].used=!0)}for(const Oe in Re){const We=this.sourceCaches[Oe];!!Re[Oe]!=!!We.used&&We.fire(new r.k("data",{sourceDataType:"visibility",dataType:"source",sourceId:Oe}))}this.light.recalculate(O),this.sky.recalculate(O),this.z=O.zoom,fe&&this.fire(new r.k("data",{dataType:"style"}))}_updateTilesForChangedImages(){const O=Object.keys(this._changedImages);if(O.length){for(const fe in this.sourceCaches)this.sourceCaches[fe].reloadTilesForDependencies(["icons","patterns"],O);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(const O in this.sourceCaches)this.sourceCaches[O].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(O,fe){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(O,!1),removedIds:fe})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(O,fe={}){var Re;this._checkLoaded();const Oe=this.serialize();if(O=fe.transformStyle?fe.transformStyle(Oe,O):O,((Re=fe.validate)===null||Re===void 0||Re)&&rn(this,r.u(O)))return!1;(O=r.aB(O)).layers=r.az(O.layers);const We=r.aC(Oe,O),Ct=this._getOperationsToPerform(We);if(Ct.unimplemented.length>0)throw new Error(`Unimplemented: ${Ct.unimplemented.join(", ")}.`);if(Ct.operations.length===0)return!1;for(const Nt of Ct.operations)Nt();return this.stylesheet=O,this._serializedLayers=null,!0}_getOperationsToPerform(O){const fe=[],Re=[];for(const Oe of O)switch(Oe.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":continue;case"addLayer":fe.push(()=>this.addLayer.apply(this,Oe.args));break;case"removeLayer":fe.push(()=>this.removeLayer.apply(this,Oe.args));break;case"setPaintProperty":fe.push(()=>this.setPaintProperty.apply(this,Oe.args));break;case"setLayoutProperty":fe.push(()=>this.setLayoutProperty.apply(this,Oe.args));break;case"setFilter":fe.push(()=>this.setFilter.apply(this,Oe.args));break;case"addSource":fe.push(()=>this.addSource.apply(this,Oe.args));break;case"removeSource":fe.push(()=>this.removeSource.apply(this,Oe.args));break;case"setLayerZoomRange":fe.push(()=>this.setLayerZoomRange.apply(this,Oe.args));break;case"setLight":fe.push(()=>this.setLight.apply(this,Oe.args));break;case"setGeoJSONSourceData":fe.push(()=>this.setGeoJSONSourceData.apply(this,Oe.args));break;case"setGlyphs":fe.push(()=>this.setGlyphs.apply(this,Oe.args));break;case"setSprite":fe.push(()=>this.setSprite.apply(this,Oe.args));break;case"setSky":fe.push(()=>this.setSky.apply(this,Oe.args));break;case"setTerrain":fe.push(()=>this.map.setTerrain.apply(this,Oe.args));break;case"setTransition":fe.push(()=>{});break;default:Re.push(Oe.command)}return{operations:fe,unimplemented:Re}}addImage(O,fe){if(this.getImage(O))return this.fire(new r.j(new Error(`An image named "${O}" already exists.`)));this.imageManager.addImage(O,fe),this._afterImageUpdated(O)}updateImage(O,fe){this.imageManager.updateImage(O,fe)}getImage(O){return this.imageManager.getImage(O)}removeImage(O){if(!this.getImage(O))return this.fire(new r.j(new Error(`An image named "${O}" does not exist.`)));this.imageManager.removeImage(O),this._afterImageUpdated(O)}_afterImageUpdated(O){this._availableImages=this.imageManager.listImages(),this._changedImages[O]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new r.k("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(O,fe,Re={}){if(this._checkLoaded(),this.sourceCaches[O]!==void 0)throw new Error(`Source "${O}" already exists.`);if(!fe.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(fe).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(fe.type)>=0&&this._validate(r.u.source,`sources.${O}`,fe,null,Re))return;this.map&&this.map._collectResourceTiming&&(fe.collectResourceTiming=!0);const Oe=this.sourceCaches[O]=new $t(O,fe,this.dispatcher);Oe.style=this,Oe.setEventedParent(this,()=>({isSourceLoaded:Oe.loaded(),source:Oe.serialize(),sourceId:O})),Oe.onAdd(this.map),this._changed=!0}removeSource(O){if(this._checkLoaded(),this.sourceCaches[O]===void 0)throw new Error("There is no source with this ID");for(const Re in this._layers)if(this._layers[Re].source===O)return this.fire(new r.j(new Error(`Source "${O}" cannot be removed while layer "${Re}" is using it.`)));const fe=this.sourceCaches[O];delete this.sourceCaches[O],delete this._updatedSources[O],fe.fire(new r.k("data",{sourceDataType:"metadata",dataType:"source",sourceId:O})),fe.setEventedParent(null),fe.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(O,fe){if(this._checkLoaded(),this.sourceCaches[O]===void 0)throw new Error(`There is no source with this ID=${O}`);const Re=this.sourceCaches[O].getSource();if(Re.type!=="geojson")throw new Error(`geojsonSource.type is ${Re.type}, which is !== 'geojson`);Re.setData(fe),this._changed=!0}getSource(O){return this.sourceCaches[O]&&this.sourceCaches[O].getSource()}addLayer(O,fe,Re={}){this._checkLoaded();const Oe=O.id;if(this.getLayer(Oe))return void this.fire(new r.j(new Error(`Layer "${Oe}" already exists on this map.`)));let We;if(O.type==="custom"){if(rn(this,r.aD(O)))return;We=r.aA(O)}else{if("source"in O&&typeof O.source=="object"&&(this.addSource(Oe,O.source),O=r.aB(O),O=r.e(O,{source:Oe})),this._validate(r.u.layer,`layers.${Oe}`,O,{arrayIndex:-1},Re))return;We=r.aA(O),this._validateLayer(We),We.setEventedParent(this,{layer:{id:Oe}})}const Ct=fe?this._order.indexOf(fe):this._order.length;if(fe&&Ct===-1)this.fire(new r.j(new Error(`Cannot add layer "${Oe}" before non-existing layer "${fe}".`)));else{if(this._order.splice(Ct,0,Oe),this._layerOrderChanged=!0,this._layers[Oe]=We,this._removedLayers[Oe]&&We.source&&We.type!=="custom"){const Nt=this._removedLayers[Oe];delete this._removedLayers[Oe],Nt.type!==We.type?this._updatedSources[We.source]="clear":(this._updatedSources[We.source]="reload",this.sourceCaches[We.source].pause())}this._updateLayer(We),We.onAdd&&We.onAdd(this.map)}}moveLayer(O,fe){if(this._checkLoaded(),this._changed=!0,!this._layers[O])return void this.fire(new r.j(new Error(`The layer '${O}' does not exist in the map's style and cannot be moved.`)));if(O===fe)return;const Re=this._order.indexOf(O);this._order.splice(Re,1);const Oe=fe?this._order.indexOf(fe):this._order.length;fe&&Oe===-1?this.fire(new r.j(new Error(`Cannot move layer "${O}" before non-existing layer "${fe}".`))):(this._order.splice(Oe,0,O),this._layerOrderChanged=!0)}removeLayer(O){this._checkLoaded();const fe=this._layers[O];if(!fe)return void this.fire(new r.j(new Error(`Cannot remove non-existing layer "${O}".`)));fe.setEventedParent(null);const Re=this._order.indexOf(O);this._order.splice(Re,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[O]=fe,delete this._layers[O],this._serializedLayers&&delete this._serializedLayers[O],delete this._updatedLayers[O],delete this._updatedPaintProps[O],fe.onRemove&&fe.onRemove(this.map)}getLayer(O){return this._layers[O]}getLayersOrder(){return[...this._order]}hasLayer(O){return O in this._layers}setLayerZoomRange(O,fe,Re){this._checkLoaded();const Oe=this.getLayer(O);Oe?Oe.minzoom===fe&&Oe.maxzoom===Re||(fe!=null&&(Oe.minzoom=fe),Re!=null&&(Oe.maxzoom=Re),this._updateLayer(Oe)):this.fire(new r.j(new Error(`Cannot set the zoom range of non-existing layer "${O}".`)))}setFilter(O,fe,Re={}){this._checkLoaded();const Oe=this.getLayer(O);if(Oe){if(!r.aE(Oe.filter,fe))return fe==null?(Oe.filter=void 0,void this._updateLayer(Oe)):void(this._validate(r.u.filter,`layers.${Oe.id}.filter`,fe,null,Re)||(Oe.filter=r.aB(fe),this._updateLayer(Oe)))}else this.fire(new r.j(new Error(`Cannot filter non-existing layer "${O}".`)))}getFilter(O){return r.aB(this.getLayer(O).filter)}setLayoutProperty(O,fe,Re,Oe={}){this._checkLoaded();const We=this.getLayer(O);We?r.aE(We.getLayoutProperty(fe),Re)||(We.setLayoutProperty(fe,Re,Oe),this._updateLayer(We)):this.fire(new r.j(new Error(`Cannot style non-existing layer "${O}".`)))}getLayoutProperty(O,fe){const Re=this.getLayer(O);if(Re)return Re.getLayoutProperty(fe);this.fire(new r.j(new Error(`Cannot get style of non-existing layer "${O}".`)))}setPaintProperty(O,fe,Re,Oe={}){this._checkLoaded();const We=this.getLayer(O);We?r.aE(We.getPaintProperty(fe),Re)||(We.setPaintProperty(fe,Re,Oe)&&this._updateLayer(We),this._changed=!0,this._updatedPaintProps[O]=!0,this._serializedLayers=null):this.fire(new r.j(new Error(`Cannot style non-existing layer "${O}".`)))}getPaintProperty(O,fe){return this.getLayer(O).getPaintProperty(fe)}setFeatureState(O,fe){this._checkLoaded();const Re=O.source,Oe=O.sourceLayer,We=this.sourceCaches[Re];if(We===void 0)return void this.fire(new r.j(new Error(`The source '${Re}' does not exist in the map's style.`)));const Ct=We.getSource().type;Ct==="geojson"&&Oe?this.fire(new r.j(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):Ct!=="vector"||Oe?(O.id===void 0&&this.fire(new r.j(new Error("The feature id parameter must be provided."))),We.setFeatureState(Oe,O.id,fe)):this.fire(new r.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(O,fe){this._checkLoaded();const Re=O.source,Oe=this.sourceCaches[Re];if(Oe===void 0)return void this.fire(new r.j(new Error(`The source '${Re}' does not exist in the map's style.`)));const We=Oe.getSource().type,Ct=We==="vector"?O.sourceLayer:void 0;We!=="vector"||Ct?fe&&typeof O.id!="string"&&typeof O.id!="number"?this.fire(new r.j(new Error("A feature id is required to remove its specific state property."))):Oe.removeFeatureState(Ct,O.id,fe):this.fire(new r.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(O){this._checkLoaded();const fe=O.source,Re=O.sourceLayer,Oe=this.sourceCaches[fe];if(Oe!==void 0)return Oe.getSource().type!=="vector"||Re?(O.id===void 0&&this.fire(new r.j(new Error("The feature id parameter must be provided."))),Oe.getFeatureState(Re,O.id)):void this.fire(new r.j(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new r.j(new Error(`The source '${fe}' does not exist in the map's style.`)))}getTransition(){return r.e({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){if(!this._loaded)return;const O=r.aF(this.sourceCaches,We=>We.serialize()),fe=this._serializeByIds(this._order,!0),Re=this.map.getTerrain()||void 0,Oe=this.stylesheet;return r.aG({version:Oe.version,name:Oe.name,metadata:Oe.metadata,light:Oe.light,sky:Oe.sky,center:Oe.center,zoom:Oe.zoom,bearing:Oe.bearing,pitch:Oe.pitch,sprite:Oe.sprite,glyphs:Oe.glyphs,transition:Oe.transition,sources:O,layers:fe,terrain:Re},We=>We!==void 0)}_updateLayer(O){this._updatedLayers[O.id]=!0,O.source&&!this._updatedSources[O.source]&&this.sourceCaches[O.source].getSource().type!=="raster"&&(this._updatedSources[O.source]="reload",this.sourceCaches[O.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(O){const fe=Ct=>this._layers[Ct].type==="fill-extrusion",Re={},Oe=[];for(let Ct=this._order.length-1;Ct>=0;Ct--){const Nt=this._order[Ct];if(fe(Nt)){Re[Nt]=Ct;for(const rr of O){const Tr=rr[Nt];if(Tr)for(const Fr of Tr)Oe.push(Fr)}}}Oe.sort((Ct,Nt)=>Nt.intersectionZ-Ct.intersectionZ);const We=[];for(let Ct=this._order.length-1;Ct>=0;Ct--){const Nt=this._order[Ct];if(fe(Nt))for(let rr=Oe.length-1;rr>=0;rr--){const Tr=Oe[rr].feature;if(Re[Tr.layer.id]<Ct)break;We.push(Tr),Oe.pop()}else for(const rr of O){const Tr=rr[Nt];if(Tr)for(const Fr of Tr)We.push(Fr.feature)}}return We}queryRenderedFeatures(O,fe,Re){fe&&fe.filter&&this._validate(r.u.filter,"queryRenderedFeatures.filter",fe.filter,null,fe);const Oe={};if(fe&&fe.layers){if(!Array.isArray(fe.layers))return this.fire(new r.j(new Error("parameters.layers must be an Array."))),[];for(const Nt of fe.layers){const rr=this._layers[Nt];if(!rr)return this.fire(new r.j(new Error(`The layer '${Nt}' does not exist in the map's style and cannot be queried for features.`))),[];Oe[rr.source]=!0}}const We=[];fe.availableImages=this._availableImages;const Ct=this._serializedAllLayers();for(const Nt in this.sourceCaches)fe.layers&&!Oe[Nt]||We.push(oe(this.sourceCaches[Nt],this._layers,Ct,O,fe,Re));return this.placement&&We.push((function(Nt,rr,Tr,Fr,Vr,mn,Dn){const nt={},ct=mn.queryRenderedSymbols(Fr),Tt=[];for(const Pt of Object.keys(ct).map(Number))Tt.push(Dn[Pt]);Tt.sort(Y);for(const Pt of Tt){const Gt=Pt.featureIndex.lookupSymbolFeatures(ct[Pt.bucketInstanceId],rr,Pt.bucketIndex,Pt.sourceLayerIndex,Vr.filter,Vr.layers,Vr.availableImages,Nt);for(const zt in Gt){const Kt=nt[zt]=nt[zt]||[],Cr=Gt[zt];Cr.sort((Nr,Hr)=>{const sn=Pt.featureSortOrder;if(sn){const bn=sn.indexOf(Nr.featureIndex);return sn.indexOf(Hr.featureIndex)-bn}return Hr.featureIndex-Nr.featureIndex});for(const Nr of Cr)Kt.push(Nr)}}for(const Pt in nt)nt[Pt].forEach(Gt=>{const zt=Gt.feature,Kt=Tr[Nt[Pt].source].getFeatureState(zt.layer["source-layer"],zt.id);zt.source=zt.layer.source,zt.layer["source-layer"]&&(zt.sourceLayer=zt.layer["source-layer"]),zt.state=Kt});return nt})(this._layers,Ct,this.sourceCaches,O,fe,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(We)}querySourceFeatures(O,fe){fe&&fe.filter&&this._validate(r.u.filter,"querySourceFeatures.filter",fe.filter,null,fe);const Re=this.sourceCaches[O];return Re?(function(Oe,We){const Ct=Oe.getRenderableIds().map(Tr=>Oe.getTileByID(Tr)),Nt=[],rr={};for(let Tr=0;Tr<Ct.length;Tr++){const Fr=Ct[Tr],Vr=Fr.tileID.canonical.key;rr[Vr]||(rr[Vr]=!0,Fr.querySourceFeatures(Nt,We))}return Nt})(Re,fe):[]}getLight(){return this.light.getLight()}setLight(O,fe={}){this._checkLoaded();const Re=this.light.getLight();let Oe=!1;for(const Ct in O)if(!r.aE(O[Ct],Re[Ct])){Oe=!0;break}if(!Oe)return;const We={now:s.now(),transition:r.e({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(O,fe),this.light.updateTransitions(We)}getSky(){var O;return(O=this.stylesheet)===null||O===void 0?void 0:O.sky}setSky(O,fe={}){const Re=this.getSky();let Oe=!1;if(!O&&!Re)return;if(O&&!Re)Oe=!0;else if(!O&&Re)Oe=!0;else for(const Ct in O)if(!r.aE(O[Ct],Re[Ct])){Oe=!0;break}if(!Oe)return;const We={now:s.now(),transition:r.e({duration:300,delay:0},this.stylesheet.transition)};this.stylesheet.sky=O,this.sky.setSky(O,fe),this.sky.updateTransitions(We)}_validate(O,fe,Re,Oe,We={}){return(!We||We.validate!==!1)&&rn(this,O.call(r.u,r.e({key:fe,style:this.serialize(),value:Re,styleSpec:r.v},Oe)))}_remove(O=!0){this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._loadStyleRequest&&(this._loadStyleRequest.abort(),this._loadStyleRequest=null),this._spriteRequest&&(this._spriteRequest.abort(),this._spriteRequest=null),yt().off(Pe,this._rtlPluginLoaded);for(const fe in this._layers)this._layers[fe].setEventedParent(null);for(const fe in this.sourceCaches){const Re=this.sourceCaches[fe];Re.setEventedParent(null),Re.onRemove(this.map)}this.imageManager.setEventedParent(null),this.setEventedParent(null),O&&this.dispatcher.broadcast("RM",void 0),this.dispatcher.remove(O)}_clearSource(O){this.sourceCaches[O].clearTiles()}_reloadSource(O){this.sourceCaches[O].resume(),this.sourceCaches[O].reload()}_updateSources(O){for(const fe in this.sourceCaches)this.sourceCaches[fe].update(O,this.map.terrain)}_generateCollisionBoxes(){for(const O in this.sourceCaches)this._reloadSource(O)}_updatePlacement(O,fe,Re,Oe,We=!1){let Ct=!1,Nt=!1;const rr={};for(const Tr of this._order){const Fr=this._layers[Tr];if(Fr.type!=="symbol")continue;if(!rr[Fr.source]){const mn=this.sourceCaches[Fr.source];rr[Fr.source]=mn.getRenderableIds(!0).map(Dn=>mn.getTileByID(Dn)).sort((Dn,nt)=>nt.tileID.overscaledZ-Dn.tileID.overscaledZ||(Dn.tileID.isLessThan(nt.tileID)?-1:1))}const Vr=this.crossTileSymbolIndex.addLayer(Fr,rr[Fr.source],O.center.lng);Ct=Ct||Vr}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((We=We||this._layerOrderChanged||Re===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(s.now(),O.zoom))&&(this.pauseablePlacement=new Bi(O,this.map.terrain,this._order,We,fe,Re,Oe,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,rr),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(s.now()),Nt=!0),Ct&&this.pauseablePlacement.placement.setStale()),Nt||Ct)for(const Tr of this._order){const Fr=this._layers[Tr];Fr.type==="symbol"&&this.placement.updateLayerOpacities(Fr,rr[Fr.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(s.now())}_releaseSymbolFadeTiles(){for(const O in this.sourceCaches)this.sourceCaches[O].releaseSymbolFadeTiles()}getImages(O,fe){return r._(this,void 0,void 0,function*(){const Re=yield this.imageManager.getImages(fe.icons);this._updateTilesForChangedImages();const Oe=this.sourceCaches[fe.source];return Oe&&Oe.setDependencies(fe.tileID.key,fe.type,fe.icons),Re})}getGlyphs(O,fe){return r._(this,void 0,void 0,function*(){const Re=yield this.glyphManager.getGlyphs(fe.stacks),Oe=this.sourceCaches[fe.source];return Oe&&Oe.setDependencies(fe.tileID.key,fe.type,[""]),Re})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(O,fe={}){this._checkLoaded(),O&&this._validate(r.u.glyphs,"glyphs",O,null,fe)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=O,this.glyphManager.entries={},this.glyphManager.setURL(O))}addSprite(O,fe,Re={},Oe){this._checkLoaded();const We=[{id:O,url:fe}],Ct=[...A(this.stylesheet.sprite),...We];this._validate(r.u.sprite,"sprite",Ct,null,Re)||(this.stylesheet.sprite=Ct,this._loadSprite(We,!0,Oe))}removeSprite(O){this._checkLoaded();const fe=A(this.stylesheet.sprite);if(fe.find(Re=>Re.id===O)){if(this._spritesImagesIds[O])for(const Re of this._spritesImagesIds[O])this.imageManager.removeImage(Re),this._changedImages[Re]=!0;fe.splice(fe.findIndex(Re=>Re.id===O),1),this.stylesheet.sprite=fe.length>0?fe:void 0,delete this._spritesImagesIds[O],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new r.k("data",{dataType:"style"}))}else this.fire(new r.j(new Error(`Sprite "${O}" doesn't exists on this map.`)))}getSprite(){return A(this.stylesheet.sprite)}setSprite(O,fe={},Re){this._checkLoaded(),O&&this._validate(r.u.sprite,"sprite",O,null,fe)||(this.stylesheet.sprite=O,O?this._loadSprite(O,!0,Re):(this._unloadSprite(),Re&&Re(null)))}}var Tn=r.Y([{name:"a_pos",type:"Int16",components:2}]);const dn={prelude:It(`#ifdef GL_ES
precision mediump float;
#else
#if !defined(lowp)
#define lowp
#endif
#if !defined(mediump)
#define mediump
#endif
#if !defined(highp)
#define highp
#endif
#endif
`,`#ifdef GL_ES
precision highp float;
#else
#if !defined(lowp)
#define lowp
#endif
#if !defined(mediump)
#define mediump
#endif
#if !defined(highp)
#define highp
#endif
#endif
vec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0
);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}
#ifdef TERRAIN3D
uniform sampler2D u_terrain;uniform float u_terrain_dim;uniform mat4 u_terrain_matrix;uniform vec4 u_terrain_unpack;uniform float u_terrain_exaggeration;uniform highp sampler2D u_depth;
#endif
const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitShifts=vec4(1.)/bitSh;highp float unpack(highp vec4 color) {return dot(color,bitShifts);}highp float depthOpacity(vec3 frag) {
#ifdef TERRAIN3D
highp float d=unpack(texture2D(u_depth,frag.xy*0.5+0.5))+0.0001-frag.z;return 1.0-max(0.0,min(1.0,-d*500.0));
#else
return 1.0;
#endif
}float calculate_visibility(vec4 pos) {
#ifdef TERRAIN3D
vec3 frag=pos.xyz/pos.w;highp float d=depthOpacity(frag);if (d > 0.95) return 1.0;return (d+depthOpacity(frag+vec3(0.0,0.01,0.0)))/2.0;
#else
return 1.0;
#endif
}float ele(vec2 pos) {
#ifdef TERRAIN3D
vec4 rgb=(texture2D(u_terrain,pos)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a;
#else
return 0.0;
#endif
}float get_elevation(vec2 pos) {
#ifdef TERRAIN3D
vec2 coord=(u_terrain_matrix*vec4(pos,0.0,1.0)).xy*u_terrain_dim+1.0;vec2 f=fract(coord);vec2 c=(floor(coord)+0.5)/(u_terrain_dim+2.0);float d=1.0/(u_terrain_dim+2.0);float tl=ele(c);float tr=ele(c+vec2(d,0.0));float bl=ele(c+vec2(0.0,d));float br=ele(c+vec2(d,d));float elevation=mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);return elevation*u_terrain_exaggeration;
#else
return 0.0;
#endif
}`),background:It(`uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,"attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),backgroundPattern:It(`uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,"uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),circle:It(`varying vec3 v_data;varying float v_visibility;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define mediump float radius
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define highp vec4 stroke_color
#pragma mapbox: define mediump float stroke_width
#pragma mapbox: define lowp float stroke_opacity
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize mediump float radius
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize highp vec4 stroke_color
#pragma mapbox: initialize mediump float stroke_width
#pragma mapbox: initialize lowp float stroke_opacity
vec2 extrude=v_data.xy;float extrude_length=length(extrude);float antialiased_blur=v_data.z;float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));gl_FragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`uniform mat4 u_matrix;uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;varying vec3 v_data;varying float v_visibility;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define mediump float radius
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define highp vec4 stroke_color
#pragma mapbox: define mediump float stroke_width
#pragma mapbox: define lowp float stroke_opacity
void main(void) {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize mediump float radius
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize highp vec4 stroke_color
#pragma mapbox: initialize mediump float stroke_width
#pragma mapbox: initialize lowp float stroke_opacity
vec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);float ele=get_elevation(circle_center);v_visibility=calculate_visibility(u_matrix*vec4(circle_center,ele,1.0));if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,ele,1);} else {gl_Position=u_matrix*vec4(circle_center,ele,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}float antialiasblur=-max(1.0/u_device_pixel_ratio/(radius+stroke_width),blur);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`),clippingMask:It("void main() {gl_FragColor=vec4(1.0);}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),heatmap:It(`uniform highp float u_intensity;varying vec2 v_extrude;
#pragma mapbox: define highp float weight
#define GAUSS_COEF 0.3989422804014327
void main() {
#pragma mapbox: initialize highp float weight
float d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);gl_FragColor=vec4(val,1.0,1.0,1.0);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`uniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;varying vec2 v_extrude;
#pragma mapbox: define highp float weight
#pragma mapbox: define mediump float radius
const highp float ZERO=1.0/255.0/16.0;
#define GAUSS_COEF 0.3989422804014327
void main(void) {
#pragma mapbox: initialize highp float weight
#pragma mapbox: initialize mediump float radius
vec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec4 pos=vec4(floor(a_pos*0.5)+extrude,get_elevation(floor(a_pos*0.5)),1);gl_Position=u_matrix*pos;}`),heatmapTexture:It(`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(0.0);
#endif
}`,"uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),collisionBox:It("varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}","attribute vec2 a_anchor_pos;attribute vec2 a_placed;attribute vec2 a_box_real;uniform mat4 u_matrix;uniform vec2 u_pixel_extrude_scale;varying float v_placed;varying float v_notUsed;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}void main() {gl_Position=projectTileWithElevation(a_anchor_pos,get_elevation(a_anchor_pos));gl_Position.xy=((a_box_real+0.5)*u_pixel_extrude_scale*2.0-1.0)*vec2(1.0,-1.0)*gl_Position.w;if (gl_Position.z/gl_Position.w < 1.1) {gl_Position.z=0.5;}v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:It("varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}","attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd  =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz  /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),debug:It("uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}","attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,get_elevation(a_pos),1);}"),fill:It(`#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float opacity
gl_FragColor=color*opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`attribute vec2 a_pos;uniform mat4 u_matrix;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float opacity
gl_Position=u_matrix*vec4(a_pos,0,1);}`),fillOutline:It(`varying vec2 v_pos;
#pragma mapbox: define highp vec4 outline_color
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 outline_color
#pragma mapbox: initialize lowp float opacity
float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;
#pragma mapbox: define highp vec4 outline_color
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 outline_color
#pragma mapbox: initialize lowp float opacity
gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),fillOutlinePattern:It(`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
void main() {
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),fillPattern:It(`#ifdef GL_ES
precision highp float;
#endif
uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
void main() {
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}`),fillExtrusion:It(`varying vec4 v_color;void main() {gl_FragColor=v_color;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;
#ifdef TERRAIN3D
attribute vec2 a_centroid;
#endif
varying vec4 v_color;
#pragma mapbox: define highp float base
#pragma mapbox: define highp float height
#pragma mapbox: define highp vec4 color
void main() {
#pragma mapbox: initialize highp float base
#pragma mapbox: initialize highp float height
#pragma mapbox: initialize highp vec4 color
vec3 normal=a_normal_ed.xyz;
#ifdef TERRAIN3D
float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);
#else
float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;
#endif
base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}`),fillExtrusionPattern:It(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;
#pragma mapbox: define lowp float base
#pragma mapbox: define lowp float height
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float base
#pragma mapbox: initialize lowp float height
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;
#ifdef TERRAIN3D
attribute vec2 a_centroid;
#endif
varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;
#pragma mapbox: define lowp float base
#pragma mapbox: define lowp float height
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float base
#pragma mapbox: initialize lowp float height
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;
#ifdef TERRAIN3D
float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);
#else
float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;
#endif
base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0
? a_pos
: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`),hillshadePrepare:It(`#ifdef GL_ES
precision highp float;
#endif
uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,"uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),hillshade:It(`uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;
#define PI 3.141592653589793
void main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,"uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}"),line:It(`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`
#define scale 0.015873016
attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float width
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float width
float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;
#ifdef TERRAIN3D
v_gamma_scale=1.0;
#else
float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
#endif
v_width2=vec2(outset,inset);}`),lineGradient:It(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv;
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,v_uv);gl_FragColor=color*(alpha*opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`
#define scale 0.015873016
attribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv;
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float width
void main() {
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float width
float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;
#ifdef TERRAIN3D
v_gamma_scale=1.0;
#else
float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
#endif
v_width2=vec2(outset,inset);}`),linePattern:It(`#ifdef GL_ES
precision highp float;
#endif
uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`
#define scale 0.015873016
#define LINE_DISTANCE_SCALE 2.0
attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define mediump float width
#pragma mapbox: define lowp float floorwidth
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize mediump float width
#pragma mapbox: initialize lowp float floorwidth
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;
#ifdef TERRAIN3D
v_gamma_scale=1.0;
#else
float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
#endif
v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),lineSDF:It(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float width
#pragma mapbox: define lowp float floorwidth
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float width
#pragma mapbox: initialize lowp float floorwidth
float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`
#define scale 0.015873016
#define LINE_DISTANCE_SCALE 2.0
attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float width
#pragma mapbox: define lowp float floorwidth
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float width
#pragma mapbox: initialize lowp float floorwidth
float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;
#ifdef TERRAIN3D
v_gamma_scale=1.0;
#else
float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
#endif
v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}`),raster:It(`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,"uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),symbolIcon:It(`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize lowp float opacity
lowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec2 v_tex;varying float v_fade_opacity;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize lowp float opacity
vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
camera_to_anchor_distance/u_camera_to_center_distance :
u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}gl_Position=finalPos;v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float visibility=calculate_visibility(projectedPoint);v_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));}`),symbolSDF:It(`#define SDF_PX 8.0
uniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1;
#pragma mapbox: define highp vec4 fill_color
#pragma mapbox: define highp vec4 halo_color
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float halo_width
#pragma mapbox: define lowp float halo_blur
void main() {
#pragma mapbox: initialize highp vec4 fill_color
#pragma mapbox: initialize highp vec4 halo_color
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float halo_width
#pragma mapbox: initialize lowp float halo_blur
float EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float inner_edge=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);inner_edge=inner_edge+gamma*gamma_scale;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(inner_edge-gamma_scaled,inner_edge+gamma_scaled,dist);if (u_is_halo) {lowp float halo_edge=(6.0-halo_width/fontScale)/SDF_PX;alpha=min(smoothstep(halo_edge-gamma_scaled,halo_edge+gamma_scaled,dist),1.0-alpha);}gl_FragColor=color*(alpha*opacity*fade_opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec2 v_data0;varying vec3 v_data1;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}
#pragma mapbox: define highp vec4 fill_color
#pragma mapbox: define highp vec4 halo_color
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float halo_width
#pragma mapbox: define lowp float halo_blur
void main() {
#pragma mapbox: initialize highp vec4 fill_color
#pragma mapbox: initialize highp vec4 halo_color
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float halo_width
#pragma mapbox: initialize lowp float halo_blur
vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
camera_to_anchor_distance/u_camera_to_center_distance :
u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`),symbolTextAndIcon:It(`#define SDF_PX 8.0
#define SDF 1.0
#define ICON 0.0
uniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1;
#pragma mapbox: define highp vec4 fill_color
#pragma mapbox: define highp vec4 halo_color
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float halo_width
#pragma mapbox: define lowp float halo_blur
void main() {
#pragma mapbox: initialize highp vec4 fill_color
#pragma mapbox: initialize highp vec4 halo_color
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float halo_width
#pragma mapbox: initialize lowp float halo_blur
float fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec4 v_data0;varying vec4 v_data1;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}
#pragma mapbox: define highp vec4 fill_color
#pragma mapbox: define highp vec4 halo_color
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float halo_width
#pragma mapbox: define lowp float halo_blur
void main() {
#pragma mapbox: initialize highp vec4 fill_color
#pragma mapbox: initialize highp vec4 halo_color
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float halo_width
#pragma mapbox: initialize lowp float halo_blur
vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
camera_to_anchor_distance/u_camera_to_center_distance :
u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`),terrain:It("uniform sampler2D u_texture;uniform vec4 u_fog_color;uniform vec4 u_horizon_color;uniform float u_fog_ground_blend;uniform float u_fog_ground_blend_opacity;uniform float u_horizon_fog_blend;varying vec2 v_texture_pos;varying float v_fog_depth;const float gamma=2.2;vec4 gammaToLinear(vec4 color) {return pow(color,vec4(gamma));}vec4 linearToGamma(vec4 color) {return pow(color,vec4(1.0/gamma));}void main() {vec4 surface_color=texture2D(u_texture,v_texture_pos);if (v_fog_depth > u_fog_ground_blend) {vec4 surface_color_linear=gammaToLinear(surface_color);float blend_color=smoothstep(0.0,1.0,max((v_fog_depth-u_horizon_fog_blend)/(1.0-u_horizon_fog_blend),0.0));vec4 fog_horizon_color_linear=mix(gammaToLinear(u_fog_color),gammaToLinear(u_horizon_color),blend_color);float factor_fog=max(v_fog_depth-u_fog_ground_blend,0.0)/(1.0-u_fog_ground_blend);gl_FragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {gl_FragColor=surface_color;}}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform mat4 u_fog_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;varying float v_fog_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}"),terrainDepth:It("varying float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {gl_FragColor=pack(v_depth);}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying float v_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);v_depth=gl_Position.z/gl_Position.w;}"),terrainCoords:It("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;varying vec2 v_texture_pos;void main() {vec4 rgba=texture2D(u_texture,v_texture_pos);gl_FragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);}"),sky:It("uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform float u_horizon;uniform float u_sky_horizon_blend;void main() {float y=gl_FragCoord.y;if (y > u_horizon) {float blend=y-u_horizon;if (blend < u_sky_horizon_blend) {gl_FragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {gl_FragColor=u_sky_color;}}}","attribute vec2 a_pos;void main() {gl_Position=vec4(a_pos,1.0,1.0);}")};function It(Ze,O){const fe=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,Re=O.match(/attribute ([\w]+) ([\w]+)/g),Oe=Ze.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),We=O.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),Ct=We?We.concat(Oe):Oe,Nt={};return{fragmentSource:Ze=Ze.replace(fe,(rr,Tr,Fr,Vr,mn)=>(Nt[mn]=!0,Tr==="define"?`
#ifndef HAS_UNIFORM_u_${mn}
varying ${Fr} ${Vr} ${mn};
#else
uniform ${Fr} ${Vr} u_${mn};
#endif
`:`
#ifdef HAS_UNIFORM_u_${mn}
    ${Fr} ${Vr} ${mn} = u_${mn};
#endif
`)),vertexSource:O=O.replace(fe,(rr,Tr,Fr,Vr,mn)=>{const Dn=Vr==="float"?"vec2":"vec4",nt=mn.match(/color/)?"color":Dn;return Nt[mn]?Tr==="define"?`
#ifndef HAS_UNIFORM_u_${mn}
uniform lowp float u_${mn}_t;
attribute ${Fr} ${Dn} a_${mn};
varying ${Fr} ${Vr} ${mn};
#else
uniform ${Fr} ${Vr} u_${mn};
#endif
`:nt==="vec4"?`
#ifndef HAS_UNIFORM_u_${mn}
    ${mn} = a_${mn};
#else
    ${Fr} ${Vr} ${mn} = u_${mn};
#endif
`:`
#ifndef HAS_UNIFORM_u_${mn}
    ${mn} = unpack_mix_${nt}(a_${mn}, u_${mn}_t);
#else
    ${Fr} ${Vr} ${mn} = u_${mn};
#endif
`:Tr==="define"?`
#ifndef HAS_UNIFORM_u_${mn}
uniform lowp float u_${mn}_t;
attribute ${Fr} ${Dn} a_${mn};
#else
uniform ${Fr} ${Vr} u_${mn};
#endif
`:nt==="vec4"?`
#ifndef HAS_UNIFORM_u_${mn}
    ${Fr} ${Vr} ${mn} = a_${mn};
#else
    ${Fr} ${Vr} ${mn} = u_${mn};
#endif
`:`
#ifndef HAS_UNIFORM_u_${mn}
    ${Fr} ${Vr} ${mn} = unpack_mix_${nt}(a_${mn}, u_${mn}_t);
#else
    ${Fr} ${Vr} ${mn} = u_${mn};
#endif
`}),staticAttributes:Re,staticUniforms:Ct}}class xr{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(O,fe,Re,Oe,We,Ct,Nt,rr,Tr){this.context=O;let Fr=this.boundPaintVertexBuffers.length!==Oe.length;for(let Vr=0;!Fr&&Vr<Oe.length;Vr++)this.boundPaintVertexBuffers[Vr]!==Oe[Vr]&&(Fr=!0);!this.vao||this.boundProgram!==fe||this.boundLayoutVertexBuffer!==Re||Fr||this.boundIndexBuffer!==We||this.boundVertexOffset!==Ct||this.boundDynamicVertexBuffer!==Nt||this.boundDynamicVertexBuffer2!==rr||this.boundDynamicVertexBuffer3!==Tr?this.freshBind(fe,Re,Oe,We,Ct,Nt,rr,Tr):(O.bindVertexArray.set(this.vao),Nt&&Nt.bind(),We&&We.dynamicDraw&&We.bind(),rr&&rr.bind(),Tr&&Tr.bind())}freshBind(O,fe,Re,Oe,We,Ct,Nt,rr){const Tr=O.numAttributes,Fr=this.context,Vr=Fr.gl;this.vao&&this.destroy(),this.vao=Fr.createVertexArray(),Fr.bindVertexArray.set(this.vao),this.boundProgram=O,this.boundLayoutVertexBuffer=fe,this.boundPaintVertexBuffers=Re,this.boundIndexBuffer=Oe,this.boundVertexOffset=We,this.boundDynamicVertexBuffer=Ct,this.boundDynamicVertexBuffer2=Nt,this.boundDynamicVertexBuffer3=rr,fe.enableAttributes(Vr,O);for(const mn of Re)mn.enableAttributes(Vr,O);Ct&&Ct.enableAttributes(Vr,O),Nt&&Nt.enableAttributes(Vr,O),rr&&rr.enableAttributes(Vr,O),fe.bind(),fe.setVertexAttribPointers(Vr,O,We);for(const mn of Re)mn.bind(),mn.setVertexAttribPointers(Vr,O,We);Ct&&(Ct.bind(),Ct.setVertexAttribPointers(Vr,O,We)),Oe&&Oe.bind(),Nt&&(Nt.bind(),Nt.setVertexAttribPointers(Vr,O,We)),rr&&(rr.bind(),rr.setVertexAttribPointers(Vr,O,We)),Fr.currentNumAttributes=Tr}destroy(){this.vao&&(this.context.deleteVertexArray(this.vao),this.vao=null)}}const Yr=(Ze,O,fe,Re,Oe)=>({u_matrix:Ze,u_texture:0,u_ele_delta:O,u_fog_matrix:fe,u_fog_color:Re?Re.properties.get("fog-color"):r.aM.white,u_fog_ground_blend:Re?Re.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:Re?Re.calculateFogBlendOpacity(Oe):0,u_horizon_color:Re?Re.properties.get("horizon-color"):r.aM.white,u_horizon_fog_blend:Re?Re.properties.get("horizon-fog-blend"):1});function An(Ze){const O=[];for(let fe=0;fe<Ze.length;fe++){if(Ze[fe]===null)continue;const Re=Ze[fe].split(" ");O.push(Re.pop())}return O}class Zn{constructor(O,fe,Re,Oe,We,Ct){const Nt=O.gl;this.program=Nt.createProgram();const rr=An(fe.staticAttributes),Tr=Re?Re.getBinderAttributes():[],Fr=rr.concat(Tr),Vr=dn.prelude.staticUniforms?An(dn.prelude.staticUniforms):[],mn=fe.staticUniforms?An(fe.staticUniforms):[],Dn=Re?Re.getBinderUniforms():[],nt=Vr.concat(mn).concat(Dn),ct=[];for(const Nr of nt)ct.indexOf(Nr)<0&&ct.push(Nr);const Tt=Re?Re.defines():[];We&&Tt.push("#define OVERDRAW_INSPECTOR;"),Ct&&Tt.push("#define TERRAIN3D;");const Pt=Tt.concat(dn.prelude.fragmentSource,fe.fragmentSource).join(`
`),Gt=Tt.concat(dn.prelude.vertexSource,fe.vertexSource).join(`
`),zt=Nt.createShader(Nt.FRAGMENT_SHADER);if(Nt.isContextLost())return void(this.failedToCreate=!0);if(Nt.shaderSource(zt,Pt),Nt.compileShader(zt),!Nt.getShaderParameter(zt,Nt.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${Nt.getShaderInfoLog(zt)}`);Nt.attachShader(this.program,zt);const Kt=Nt.createShader(Nt.VERTEX_SHADER);if(Nt.isContextLost())return void(this.failedToCreate=!0);if(Nt.shaderSource(Kt,Gt),Nt.compileShader(Kt),!Nt.getShaderParameter(Kt,Nt.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${Nt.getShaderInfoLog(Kt)}`);Nt.attachShader(this.program,Kt),this.attributes={};const Cr={};this.numAttributes=Fr.length;for(let Nr=0;Nr<this.numAttributes;Nr++)Fr[Nr]&&(Nt.bindAttribLocation(this.program,Nr,Fr[Nr]),this.attributes[Fr[Nr]]=Nr);if(Nt.linkProgram(this.program),!Nt.getProgramParameter(this.program,Nt.LINK_STATUS))throw new Error(`Program failed to link: ${Nt.getProgramInfoLog(this.program)}`);Nt.deleteShader(Kt),Nt.deleteShader(zt);for(let Nr=0;Nr<ct.length;Nr++){const Hr=ct[Nr];if(Hr&&!Cr[Hr]){const sn=Nt.getUniformLocation(this.program,Hr);sn&&(Cr[Hr]=sn)}}this.fixedUniforms=Oe(O,Cr),this.terrainUniforms=((Nr,Hr)=>({u_depth:new r.aH(Nr,Hr.u_depth),u_terrain:new r.aH(Nr,Hr.u_terrain),u_terrain_dim:new r.aI(Nr,Hr.u_terrain_dim),u_terrain_matrix:new r.aJ(Nr,Hr.u_terrain_matrix),u_terrain_unpack:new r.aK(Nr,Hr.u_terrain_unpack),u_terrain_exaggeration:new r.aI(Nr,Hr.u_terrain_exaggeration)}))(O,Cr),this.binderUniforms=Re?Re.getUniforms(O,Cr):[]}draw(O,fe,Re,Oe,We,Ct,Nt,rr,Tr,Fr,Vr,mn,Dn,nt,ct,Tt,Pt,Gt){const zt=O.gl;if(this.failedToCreate)return;if(O.program.set(this.program),O.setDepthMode(Re),O.setStencilMode(Oe),O.setColorMode(We),O.setCullFace(Ct),rr){O.activeTexture.set(zt.TEXTURE2),zt.bindTexture(zt.TEXTURE_2D,rr.depthTexture),O.activeTexture.set(zt.TEXTURE3),zt.bindTexture(zt.TEXTURE_2D,rr.texture);for(const Cr in this.terrainUniforms)this.terrainUniforms[Cr].set(rr[Cr])}for(const Cr in this.fixedUniforms)this.fixedUniforms[Cr].set(Nt[Cr]);ct&&ct.setUniforms(O,this.binderUniforms,Dn,{zoom:nt});let Kt=0;switch(fe){case zt.LINES:Kt=2;break;case zt.TRIANGLES:Kt=3;break;case zt.LINE_STRIP:Kt=1}for(const Cr of mn.get()){const Nr=Cr.vaos||(Cr.vaos={});(Nr[Tr]||(Nr[Tr]=new xr)).bind(O,this,Fr,ct?ct.getPaintVertexBuffers():[],Vr,Cr.vertexOffset,Tt,Pt,Gt),zt.drawElements(fe,Cr.primitiveLength*Kt,zt.UNSIGNED_SHORT,Cr.primitiveOffset*Kt*2)}}}function sa(Ze,O,fe){const Re=1/ga(fe,1,O.transform.tileZoom),Oe=Math.pow(2,fe.tileID.overscaledZ),We=fe.tileSize*Math.pow(2,O.transform.tileZoom)/Oe,Ct=We*(fe.tileID.canonical.x+fe.tileID.wrap*Oe),Nt=We*fe.tileID.canonical.y;return{u_image:0,u_texsize:fe.imageAtlasTexture.size,u_scale:[Re,Ze.fromScale,Ze.toScale],u_fade:Ze.t,u_pixel_coord_upper:[Ct>>16,Nt>>16],u_pixel_coord_lower:[65535&Ct,65535&Nt]}}const oa=(Ze,O,fe,Re)=>{const Oe=O.style.light,We=Oe.properties.get("position"),Ct=[We.x,We.y,We.z],Nt=(function(){var Tr=new r.A(9);return r.A!=Float32Array&&(Tr[1]=0,Tr[2]=0,Tr[3]=0,Tr[5]=0,Tr[6]=0,Tr[7]=0),Tr[0]=1,Tr[4]=1,Tr[8]=1,Tr})();Oe.properties.get("anchor")==="viewport"&&(function(Tr,Fr){var Vr=Math.sin(Fr),mn=Math.cos(Fr);Tr[0]=mn,Tr[1]=Vr,Tr[2]=0,Tr[3]=-Vr,Tr[4]=mn,Tr[5]=0,Tr[6]=0,Tr[7]=0,Tr[8]=1})(Nt,-O.transform.angle),(function(Tr,Fr,Vr){var mn=Fr[0],Dn=Fr[1],nt=Fr[2];Tr[0]=mn*Vr[0]+Dn*Vr[3]+nt*Vr[6],Tr[1]=mn*Vr[1]+Dn*Vr[4]+nt*Vr[7],Tr[2]=mn*Vr[2]+Dn*Vr[5]+nt*Vr[8]})(Ct,Ct,Nt);const rr=Oe.properties.get("color");return{u_matrix:Ze,u_lightpos:Ct,u_lightintensity:Oe.properties.get("intensity"),u_lightcolor:[rr.r,rr.g,rr.b],u_vertical_gradient:+fe,u_opacity:Re}},Sn=(Ze,O,fe,Re,Oe,We,Ct)=>r.e(oa(Ze,O,fe,Re),sa(We,O,Ct),{u_height_factor:-Math.pow(2,Oe.overscaledZ)/Ct.tileSize/8}),Kn=Ze=>({u_matrix:Ze}),Ui=(Ze,O,fe,Re)=>r.e(Kn(Ze),sa(fe,O,Re)),Za=(Ze,O)=>({u_matrix:Ze,u_world:O}),Ki=(Ze,O,fe,Re,Oe)=>r.e(Ui(Ze,O,fe,Re),{u_world:Oe}),ho=(Ze,O,fe,Re)=>{const Oe=Ze.transform;let We,Ct;if(Re.paint.get("circle-pitch-alignment")==="map"){const Nt=ga(fe,1,Oe.zoom);We=!0,Ct=[Nt,Nt]}else We=!1,Ct=Oe.pixelsToGLUnits;return{u_camera_to_center_distance:Oe.cameraToCenterDistance,u_scale_with_map:+(Re.paint.get("circle-pitch-scale")==="map"),u_matrix:Ze.translatePosMatrix(O.posMatrix,fe,Re.paint.get("circle-translate"),Re.paint.get("circle-translate-anchor")),u_pitch_with_map:+We,u_device_pixel_ratio:Ze.pixelRatio,u_extrude_scale:Ct}},Co=(Ze,O,fe)=>({u_matrix:Ze,u_inv_matrix:O,u_camera_to_center_distance:fe.cameraToCenterDistance,u_viewport_size:[fe.width,fe.height]}),So=(Ze,O,fe=1)=>({u_matrix:Ze,u_color:O,u_overlay:0,u_overlay_scale:fe}),Vo=Ze=>({u_matrix:Ze}),Oi=(Ze,O,fe,Re)=>({u_matrix:Ze,u_extrude_scale:ga(O,1,fe),u_intensity:Re}),ps=(Ze,O,fe,Re)=>{const Oe=r.H();r.aP(Oe,0,Ze.width,Ze.height,0,0,1);const We=Ze.context.gl;return{u_matrix:Oe,u_world:[We.drawingBufferWidth,We.drawingBufferHeight],u_image:fe,u_color_ramp:Re,u_opacity:O.paint.get("heatmap-opacity")}};function as(Ze,O){const fe=Math.pow(2,O.canonical.z),Re=O.canonical.y;return[new r.Z(0,Re/fe).toLngLat().lat,new r.Z(0,(Re+1)/fe).toLngLat().lat]}const rl=(Ze,O,fe,Re)=>{const Oe=Ze.transform;return{u_matrix:Qs(Ze,O,fe,Re),u_ratio:1/ga(O,1,Oe.zoom),u_device_pixel_ratio:Ze.pixelRatio,u_units_to_pixels:[1/Oe.pixelsToGLUnits[0],1/Oe.pixelsToGLUnits[1]]}},As=(Ze,O,fe,Re,Oe)=>r.e(rl(Ze,O,fe,Oe),{u_image:0,u_image_height:Re}),hs=(Ze,O,fe,Re,Oe)=>{const We=Ze.transform,Ct=nl(O,We);return{u_matrix:Qs(Ze,O,fe,Oe),u_texsize:O.imageAtlasTexture.size,u_ratio:1/ga(O,1,We.zoom),u_device_pixel_ratio:Ze.pixelRatio,u_image:0,u_scale:[Ct,Re.fromScale,Re.toScale],u_fade:Re.t,u_units_to_pixels:[1/We.pixelsToGLUnits[0],1/We.pixelsToGLUnits[1]]}},ts=(Ze,O,fe,Re,Oe,We)=>{const Ct=Ze.lineAtlas,Nt=nl(O,Ze.transform),rr=fe.layout.get("line-cap")==="round",Tr=Ct.getDash(Re.from,rr),Fr=Ct.getDash(Re.to,rr),Vr=Tr.width*Oe.fromScale,mn=Fr.width*Oe.toScale;return r.e(rl(Ze,O,fe,We),{u_patternscale_a:[Nt/Vr,-Tr.height/2],u_patternscale_b:[Nt/mn,-Fr.height/2],u_sdfgamma:Ct.width/(256*Math.min(Vr,mn)*Ze.pixelRatio)/2,u_image:0,u_tex_y_a:Tr.y,u_tex_y_b:Fr.y,u_mix:Oe.t})};function nl(Ze,O){return 1/ga(Ze,1,O.tileZoom)}function Qs(Ze,O,fe,Re){return Ze.translatePosMatrix(Re?Re.posMatrix:O.tileID.posMatrix,O,fe.paint.get("line-translate"),fe.paint.get("line-translate-anchor"))}const _l=(Ze,O,fe,Re,Oe)=>{return{u_matrix:Ze,u_tl_parent:O,u_scale_parent:fe,u_buffer_scale:1,u_fade_t:Re.mix,u_opacity:Re.opacity*Oe.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:Oe.paint.get("raster-brightness-min"),u_brightness_high:Oe.paint.get("raster-brightness-max"),u_saturation_factor:(Ct=Oe.paint.get("raster-saturation"),Ct>0?1-1/(1.001-Ct):-Ct),u_contrast_factor:(We=Oe.paint.get("raster-contrast"),We>0?1/(1-We):1+We),u_spin_weights:Ss(Oe.paint.get("raster-hue-rotate"))};var We,Ct};function Ss(Ze){Ze*=Math.PI/180;const O=Math.sin(Ze),fe=Math.cos(Ze);return[(2*fe+1)/3,(-Math.sqrt(3)*O-fe+1)/3,(Math.sqrt(3)*O-fe+1)/3]}const ls=(Ze,O,fe,Re,Oe,We,Ct,Nt,rr,Tr,Fr,Vr,mn,Dn)=>{const nt=Ct.transform;return{u_is_size_zoom_constant:+(Ze==="constant"||Ze==="source"),u_is_size_feature_constant:+(Ze==="constant"||Ze==="camera"),u_size_t:O?O.uSizeT:0,u_size:O?O.uSize:0,u_camera_to_center_distance:nt.cameraToCenterDistance,u_pitch:nt.pitch/360*2*Math.PI,u_rotate_symbol:+fe,u_aspect_ratio:nt.width/nt.height,u_fade_change:Ct.options.fadeDuration?Ct.symbolFadeChange:1,u_matrix:Nt,u_label_plane_matrix:rr,u_coord_matrix:Tr,u_is_text:+Vr,u_pitch_with_map:+Re,u_is_along_line:Oe,u_is_variable_anchor:We,u_texsize:mn,u_texture:0,u_translation:Fr,u_pitched_scale:Dn}},Oo=(Ze,O,fe,Re,Oe,We,Ct,Nt,rr,Tr,Fr,Vr,mn,Dn,nt)=>{const ct=Ct.transform;return r.e(ls(Ze,O,fe,Re,Oe,We,Ct,Nt,rr,Tr,Fr,Vr,mn,nt),{u_gamma_scale:Re?Math.cos(ct._pitch)*ct.cameraToCenterDistance:1,u_device_pixel_ratio:Ct.pixelRatio,u_is_halo:1})},Es=(Ze,O,fe,Re,Oe,We,Ct,Nt,rr,Tr,Fr,Vr,mn,Dn)=>r.e(Oo(Ze,O,fe,Re,Oe,We,Ct,Nt,rr,Tr,Fr,!0,Vr,!0,Dn),{u_texsize_icon:mn,u_texture_icon:1}),xl=(Ze,O,fe)=>({u_matrix:Ze,u_opacity:O,u_color:fe}),Ul=(Ze,O,fe,Re,Oe,We)=>r.e((function(Ct,Nt,rr,Tr){const Fr=rr.imageManager.getPattern(Ct.from.toString()),Vr=rr.imageManager.getPattern(Ct.to.toString()),{width:mn,height:Dn}=rr.imageManager.getPixelSize(),nt=Math.pow(2,Tr.tileID.overscaledZ),ct=Tr.tileSize*Math.pow(2,rr.transform.tileZoom)/nt,Tt=ct*(Tr.tileID.canonical.x+Tr.tileID.wrap*nt),Pt=ct*Tr.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:Fr.tl,u_pattern_br_a:Fr.br,u_pattern_tl_b:Vr.tl,u_pattern_br_b:Vr.br,u_texsize:[mn,Dn],u_mix:Nt.t,u_pattern_size_a:Fr.displaySize,u_pattern_size_b:Vr.displaySize,u_scale_a:Nt.fromScale,u_scale_b:Nt.toScale,u_tile_units_to_pixels:1/ga(Tr,1,rr.transform.tileZoom),u_pixel_coord_upper:[Tt>>16,Pt>>16],u_pixel_coord_lower:[65535&Tt,65535&Pt]}})(Re,We,fe,Oe),{u_matrix:Ze,u_opacity:O}),Hl={fillExtrusion:(Ze,O)=>({u_matrix:new r.aJ(Ze,O.u_matrix),u_lightpos:new r.aN(Ze,O.u_lightpos),u_lightintensity:new r.aI(Ze,O.u_lightintensity),u_lightcolor:new r.aN(Ze,O.u_lightcolor),u_vertical_gradient:new r.aI(Ze,O.u_vertical_gradient),u_opacity:new r.aI(Ze,O.u_opacity)}),fillExtrusionPattern:(Ze,O)=>({u_matrix:new r.aJ(Ze,O.u_matrix),u_lightpos:new r.aN(Ze,O.u_lightpos),u_lightintensity:new r.aI(Ze,O.u_lightintensity),u_lightcolor:new r.aN(Ze,O.u_lightcolor),u_vertical_gradient:new r.aI(Ze,O.u_vertical_gradient),u_height_factor:new r.aI(Ze,O.u_height_factor),u_image:new r.aH(Ze,O.u_image),u_texsize:new r.aO(Ze,O.u_texsize),u_pixel_coord_upper:new r.aO(Ze,O.u_pixel_coord_upper),u_pixel_coord_lower:new r.aO(Ze,O.u_pixel_coord_lower),u_scale:new r.aN(Ze,O.u_scale),u_fade:new r.aI(Ze,O.u_fade),u_opacity:new r.aI(Ze,O.u_opacity)}),fill:(Ze,O)=>({u_matrix:new r.aJ(Ze,O.u_matrix)}),fillPattern:(Ze,O)=>({u_matrix:new r.aJ(Ze,O.u_matrix),u_image:new r.aH(Ze,O.u_image),u_texsize:new r.aO(Ze,O.u_texsize),u_pixel_coord_upper:new r.aO(Ze,O.u_pixel_coord_upper),u_pixel_coord_lower:new r.aO(Ze,O.u_pixel_coord_lower),u_scale:new r.aN(Ze,O.u_scale),u_fade:new r.aI(Ze,O.u_fade)}),fillOutline:(Ze,O)=>({u_matrix:new r.aJ(Ze,O.u_matrix),u_world:new r.aO(Ze,O.u_world)}),fillOutlinePattern:(Ze,O)=>({u_matrix:new r.aJ(Ze,O.u_matrix),u_world:new r.aO(Ze,O.u_world),u_image:new r.aH(Ze,O.u_image),u_texsize:new r.aO(Ze,O.u_texsize),u_pixel_coord_upper:new r.aO(Ze,O.u_pixel_coord_upper),u_pixel_coord_lower:new r.aO(Ze,O.u_pixel_coord_lower),u_scale:new r.aN(Ze,O.u_scale),u_fade:new r.aI(Ze,O.u_fade)}),circle:(Ze,O)=>({u_camera_to_center_distance:new r.aI(Ze,O.u_camera_to_center_distance),u_scale_with_map:new r.aH(Ze,O.u_scale_with_map),u_pitch_with_map:new r.aH(Ze,O.u_pitch_with_map),u_extrude_scale:new r.aO(Ze,O.u_extrude_scale),u_device_pixel_ratio:new r.aI(Ze,O.u_device_pixel_ratio),u_matrix:new r.aJ(Ze,O.u_matrix)}),collisionBox:(Ze,O)=>({u_matrix:new r.aJ(Ze,O.u_matrix),u_pixel_extrude_scale:new r.aO(Ze,O.u_pixel_extrude_scale)}),collisionCircle:(Ze,O)=>({u_matrix:new r.aJ(Ze,O.u_matrix),u_inv_matrix:new r.aJ(Ze,O.u_inv_matrix),u_camera_to_center_distance:new r.aI(Ze,O.u_camera_to_center_distance),u_viewport_size:new r.aO(Ze,O.u_viewport_size)}),debug:(Ze,O)=>({u_color:new r.aL(Ze,O.u_color),u_matrix:new r.aJ(Ze,O.u_matrix),u_overlay:new r.aH(Ze,O.u_overlay),u_overlay_scale:new r.aI(Ze,O.u_overlay_scale)}),clippingMask:(Ze,O)=>({u_matrix:new r.aJ(Ze,O.u_matrix)}),heatmap:(Ze,O)=>({u_extrude_scale:new r.aI(Ze,O.u_extrude_scale),u_intensity:new r.aI(Ze,O.u_intensity),u_matrix:new r.aJ(Ze,O.u_matrix)}),heatmapTexture:(Ze,O)=>({u_matrix:new r.aJ(Ze,O.u_matrix),u_world:new r.aO(Ze,O.u_world),u_image:new r.aH(Ze,O.u_image),u_color_ramp:new r.aH(Ze,O.u_color_ramp),u_opacity:new r.aI(Ze,O.u_opacity)}),hillshade:(Ze,O)=>({u_matrix:new r.aJ(Ze,O.u_matrix),u_image:new r.aH(Ze,O.u_image),u_latrange:new r.aO(Ze,O.u_latrange),u_light:new r.aO(Ze,O.u_light),u_shadow:new r.aL(Ze,O.u_shadow),u_highlight:new r.aL(Ze,O.u_highlight),u_accent:new r.aL(Ze,O.u_accent)}),hillshadePrepare:(Ze,O)=>({u_matrix:new r.aJ(Ze,O.u_matrix),u_image:new r.aH(Ze,O.u_image),u_dimension:new r.aO(Ze,O.u_dimension),u_zoom:new r.aI(Ze,O.u_zoom),u_unpack:new r.aK(Ze,O.u_unpack)}),line:(Ze,O)=>({u_matrix:new r.aJ(Ze,O.u_matrix),u_ratio:new r.aI(Ze,O.u_ratio),u_device_pixel_ratio:new r.aI(Ze,O.u_device_pixel_ratio),u_units_to_pixels:new r.aO(Ze,O.u_units_to_pixels)}),lineGradient:(Ze,O)=>({u_matrix:new r.aJ(Ze,O.u_matrix),u_ratio:new r.aI(Ze,O.u_ratio),u_device_pixel_ratio:new r.aI(Ze,O.u_device_pixel_ratio),u_units_to_pixels:new r.aO(Ze,O.u_units_to_pixels),u_image:new r.aH(Ze,O.u_image),u_image_height:new r.aI(Ze,O.u_image_height)}),linePattern:(Ze,O)=>({u_matrix:new r.aJ(Ze,O.u_matrix),u_texsize:new r.aO(Ze,O.u_texsize),u_ratio:new r.aI(Ze,O.u_ratio),u_device_pixel_ratio:new r.aI(Ze,O.u_device_pixel_ratio),u_image:new r.aH(Ze,O.u_image),u_units_to_pixels:new r.aO(Ze,O.u_units_to_pixels),u_scale:new r.aN(Ze,O.u_scale),u_fade:new r.aI(Ze,O.u_fade)}),lineSDF:(Ze,O)=>({u_matrix:new r.aJ(Ze,O.u_matrix),u_ratio:new r.aI(Ze,O.u_ratio),u_device_pixel_ratio:new r.aI(Ze,O.u_device_pixel_ratio),u_units_to_pixels:new r.aO(Ze,O.u_units_to_pixels),u_patternscale_a:new r.aO(Ze,O.u_patternscale_a),u_patternscale_b:new r.aO(Ze,O.u_patternscale_b),u_sdfgamma:new r.aI(Ze,O.u_sdfgamma),u_image:new r.aH(Ze,O.u_image),u_tex_y_a:new r.aI(Ze,O.u_tex_y_a),u_tex_y_b:new r.aI(Ze,O.u_tex_y_b),u_mix:new r.aI(Ze,O.u_mix)}),raster:(Ze,O)=>({u_matrix:new r.aJ(Ze,O.u_matrix),u_tl_parent:new r.aO(Ze,O.u_tl_parent),u_scale_parent:new r.aI(Ze,O.u_scale_parent),u_buffer_scale:new r.aI(Ze,O.u_buffer_scale),u_fade_t:new r.aI(Ze,O.u_fade_t),u_opacity:new r.aI(Ze,O.u_opacity),u_image0:new r.aH(Ze,O.u_image0),u_image1:new r.aH(Ze,O.u_image1),u_brightness_low:new r.aI(Ze,O.u_brightness_low),u_brightness_high:new r.aI(Ze,O.u_brightness_high),u_saturation_factor:new r.aI(Ze,O.u_saturation_factor),u_contrast_factor:new r.aI(Ze,O.u_contrast_factor),u_spin_weights:new r.aN(Ze,O.u_spin_weights)}),symbolIcon:(Ze,O)=>({u_is_size_zoom_constant:new r.aH(Ze,O.u_is_size_zoom_constant),u_is_size_feature_constant:new r.aH(Ze,O.u_is_size_feature_constant),u_size_t:new r.aI(Ze,O.u_size_t),u_size:new r.aI(Ze,O.u_size),u_camera_to_center_distance:new r.aI(Ze,O.u_camera_to_center_distance),u_pitch:new r.aI(Ze,O.u_pitch),u_rotate_symbol:new r.aH(Ze,O.u_rotate_symbol),u_aspect_ratio:new r.aI(Ze,O.u_aspect_ratio),u_fade_change:new r.aI(Ze,O.u_fade_change),u_matrix:new r.aJ(Ze,O.u_matrix),u_label_plane_matrix:new r.aJ(Ze,O.u_label_plane_matrix),u_coord_matrix:new r.aJ(Ze,O.u_coord_matrix),u_is_text:new r.aH(Ze,O.u_is_text),u_pitch_with_map:new r.aH(Ze,O.u_pitch_with_map),u_is_along_line:new r.aH(Ze,O.u_is_along_line),u_is_variable_anchor:new r.aH(Ze,O.u_is_variable_anchor),u_texsize:new r.aO(Ze,O.u_texsize),u_texture:new r.aH(Ze,O.u_texture),u_translation:new r.aO(Ze,O.u_translation),u_pitched_scale:new r.aI(Ze,O.u_pitched_scale)}),symbolSDF:(Ze,O)=>({u_is_size_zoom_constant:new r.aH(Ze,O.u_is_size_zoom_constant),u_is_size_feature_constant:new r.aH(Ze,O.u_is_size_feature_constant),u_size_t:new r.aI(Ze,O.u_size_t),u_size:new r.aI(Ze,O.u_size),u_camera_to_center_distance:new r.aI(Ze,O.u_camera_to_center_distance),u_pitch:new r.aI(Ze,O.u_pitch),u_rotate_symbol:new r.aH(Ze,O.u_rotate_symbol),u_aspect_ratio:new r.aI(Ze,O.u_aspect_ratio),u_fade_change:new r.aI(Ze,O.u_fade_change),u_matrix:new r.aJ(Ze,O.u_matrix),u_label_plane_matrix:new r.aJ(Ze,O.u_label_plane_matrix),u_coord_matrix:new r.aJ(Ze,O.u_coord_matrix),u_is_text:new r.aH(Ze,O.u_is_text),u_pitch_with_map:new r.aH(Ze,O.u_pitch_with_map),u_is_along_line:new r.aH(Ze,O.u_is_along_line),u_is_variable_anchor:new r.aH(Ze,O.u_is_variable_anchor),u_texsize:new r.aO(Ze,O.u_texsize),u_texture:new r.aH(Ze,O.u_texture),u_gamma_scale:new r.aI(Ze,O.u_gamma_scale),u_device_pixel_ratio:new r.aI(Ze,O.u_device_pixel_ratio),u_is_halo:new r.aH(Ze,O.u_is_halo),u_translation:new r.aO(Ze,O.u_translation),u_pitched_scale:new r.aI(Ze,O.u_pitched_scale)}),symbolTextAndIcon:(Ze,O)=>({u_is_size_zoom_constant:new r.aH(Ze,O.u_is_size_zoom_constant),u_is_size_feature_constant:new r.aH(Ze,O.u_is_size_feature_constant),u_size_t:new r.aI(Ze,O.u_size_t),u_size:new r.aI(Ze,O.u_size),u_camera_to_center_distance:new r.aI(Ze,O.u_camera_to_center_distance),u_pitch:new r.aI(Ze,O.u_pitch),u_rotate_symbol:new r.aH(Ze,O.u_rotate_symbol),u_aspect_ratio:new r.aI(Ze,O.u_aspect_ratio),u_fade_change:new r.aI(Ze,O.u_fade_change),u_matrix:new r.aJ(Ze,O.u_matrix),u_label_plane_matrix:new r.aJ(Ze,O.u_label_plane_matrix),u_coord_matrix:new r.aJ(Ze,O.u_coord_matrix),u_is_text:new r.aH(Ze,O.u_is_text),u_pitch_with_map:new r.aH(Ze,O.u_pitch_with_map),u_is_along_line:new r.aH(Ze,O.u_is_along_line),u_is_variable_anchor:new r.aH(Ze,O.u_is_variable_anchor),u_texsize:new r.aO(Ze,O.u_texsize),u_texsize_icon:new r.aO(Ze,O.u_texsize_icon),u_texture:new r.aH(Ze,O.u_texture),u_texture_icon:new r.aH(Ze,O.u_texture_icon),u_gamma_scale:new r.aI(Ze,O.u_gamma_scale),u_device_pixel_ratio:new r.aI(Ze,O.u_device_pixel_ratio),u_is_halo:new r.aH(Ze,O.u_is_halo),u_translation:new r.aO(Ze,O.u_translation),u_pitched_scale:new r.aI(Ze,O.u_pitched_scale)}),background:(Ze,O)=>({u_matrix:new r.aJ(Ze,O.u_matrix),u_opacity:new r.aI(Ze,O.u_opacity),u_color:new r.aL(Ze,O.u_color)}),backgroundPattern:(Ze,O)=>({u_matrix:new r.aJ(Ze,O.u_matrix),u_opacity:new r.aI(Ze,O.u_opacity),u_image:new r.aH(Ze,O.u_image),u_pattern_tl_a:new r.aO(Ze,O.u_pattern_tl_a),u_pattern_br_a:new r.aO(Ze,O.u_pattern_br_a),u_pattern_tl_b:new r.aO(Ze,O.u_pattern_tl_b),u_pattern_br_b:new r.aO(Ze,O.u_pattern_br_b),u_texsize:new r.aO(Ze,O.u_texsize),u_mix:new r.aI(Ze,O.u_mix),u_pattern_size_a:new r.aO(Ze,O.u_pattern_size_a),u_pattern_size_b:new r.aO(Ze,O.u_pattern_size_b),u_scale_a:new r.aI(Ze,O.u_scale_a),u_scale_b:new r.aI(Ze,O.u_scale_b),u_pixel_coord_upper:new r.aO(Ze,O.u_pixel_coord_upper),u_pixel_coord_lower:new r.aO(Ze,O.u_pixel_coord_lower),u_tile_units_to_pixels:new r.aI(Ze,O.u_tile_units_to_pixels)}),terrain:(Ze,O)=>({u_matrix:new r.aJ(Ze,O.u_matrix),u_texture:new r.aH(Ze,O.u_texture),u_ele_delta:new r.aI(Ze,O.u_ele_delta),u_fog_matrix:new r.aJ(Ze,O.u_fog_matrix),u_fog_color:new r.aL(Ze,O.u_fog_color),u_fog_ground_blend:new r.aI(Ze,O.u_fog_ground_blend),u_fog_ground_blend_opacity:new r.aI(Ze,O.u_fog_ground_blend_opacity),u_horizon_color:new r.aL(Ze,O.u_horizon_color),u_horizon_fog_blend:new r.aI(Ze,O.u_horizon_fog_blend)}),terrainDepth:(Ze,O)=>({u_matrix:new r.aJ(Ze,O.u_matrix),u_ele_delta:new r.aI(Ze,O.u_ele_delta)}),terrainCoords:(Ze,O)=>({u_matrix:new r.aJ(Ze,O.u_matrix),u_texture:new r.aH(Ze,O.u_texture),u_terrain_coords_id:new r.aI(Ze,O.u_terrain_coords_id),u_ele_delta:new r.aI(Ze,O.u_ele_delta)}),sky:(Ze,O)=>({u_sky_color:new r.aL(Ze,O.u_sky_color),u_horizon_color:new r.aL(Ze,O.u_horizon_color),u_horizon:new r.aI(Ze,O.u_horizon),u_sky_horizon_blend:new r.aI(Ze,O.u_sky_horizon_blend)})};class Fs{constructor(O,fe,Re){this.context=O;const Oe=O.gl;this.buffer=Oe.createBuffer(),this.dynamicDraw=!!Re,this.context.unbindVAO(),O.bindElementBuffer.set(this.buffer),Oe.bufferData(Oe.ELEMENT_ARRAY_BUFFER,fe.arrayBuffer,this.dynamicDraw?Oe.DYNAMIC_DRAW:Oe.STATIC_DRAW),this.dynamicDraw||delete fe.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(O){const fe=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),fe.bufferSubData(fe.ELEMENT_ARRAY_BUFFER,0,O.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}const Ni={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class wo{constructor(O,fe,Re,Oe){this.length=fe.length,this.attributes=Re,this.itemSize=fe.bytesPerElement,this.dynamicDraw=Oe,this.context=O;const We=O.gl;this.buffer=We.createBuffer(),O.bindVertexBuffer.set(this.buffer),We.bufferData(We.ARRAY_BUFFER,fe.arrayBuffer,this.dynamicDraw?We.DYNAMIC_DRAW:We.STATIC_DRAW),this.dynamicDraw||delete fe.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(O){if(O.length!==this.length)throw new Error(`Length of new data is ${O.length}, which doesn't match current length of ${this.length}`);const fe=this.context.gl;this.bind(),fe.bufferSubData(fe.ARRAY_BUFFER,0,O.arrayBuffer)}enableAttributes(O,fe){for(let Re=0;Re<this.attributes.length;Re++){const Oe=fe.attributes[this.attributes[Re].name];Oe!==void 0&&O.enableVertexAttribArray(Oe)}}setVertexAttribPointers(O,fe,Re){for(let Oe=0;Oe<this.attributes.length;Oe++){const We=this.attributes[Oe],Ct=fe.attributes[We.name];Ct!==void 0&&O.vertexAttribPointer(Ct,We.components,O[Ni[We.type]],!1,this.itemSize,We.offset+this.itemSize*(Re||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}const ql=new WeakMap;function Gs(Ze){var O;if(ql.has(Ze))return ql.get(Ze);{const fe=(O=Ze.getParameter(Ze.VERSION))===null||O===void 0?void 0:O.startsWith("WebGL 2.0");return ql.set(Ze,fe),fe}}class Jo{constructor(O){this.gl=O.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(O){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class Gl extends Jo{getDefault(){return r.aM.transparent}set(O){const fe=this.current;(O.r!==fe.r||O.g!==fe.g||O.b!==fe.b||O.a!==fe.a||this.dirty)&&(this.gl.clearColor(O.r,O.g,O.b,O.a),this.current=O,this.dirty=!1)}}class al extends Jo{getDefault(){return 1}set(O){(O!==this.current||this.dirty)&&(this.gl.clearDepth(O),this.current=O,this.dirty=!1)}}class bl extends Jo{getDefault(){return 0}set(O){(O!==this.current||this.dirty)&&(this.gl.clearStencil(O),this.current=O,this.dirty=!1)}}class Iu extends Jo{getDefault(){return[!0,!0,!0,!0]}set(O){const fe=this.current;(O[0]!==fe[0]||O[1]!==fe[1]||O[2]!==fe[2]||O[3]!==fe[3]||this.dirty)&&(this.gl.colorMask(O[0],O[1],O[2],O[3]),this.current=O,this.dirty=!1)}}class _o extends Jo{getDefault(){return!0}set(O){(O!==this.current||this.dirty)&&(this.gl.depthMask(O),this.current=O,this.dirty=!1)}}class Ps extends Jo{getDefault(){return 255}set(O){(O!==this.current||this.dirty)&&(this.gl.stencilMask(O),this.current=O,this.dirty=!1)}}class ms extends Jo{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(O){const fe=this.current;(O.func!==fe.func||O.ref!==fe.ref||O.mask!==fe.mask||this.dirty)&&(this.gl.stencilFunc(O.func,O.ref,O.mask),this.current=O,this.dirty=!1)}}class ru extends Jo{getDefault(){const O=this.gl;return[O.KEEP,O.KEEP,O.KEEP]}set(O){const fe=this.current;(O[0]!==fe[0]||O[1]!==fe[1]||O[2]!==fe[2]||this.dirty)&&(this.gl.stencilOp(O[0],O[1],O[2]),this.current=O,this.dirty=!1)}}class nu extends Jo{getDefault(){return!1}set(O){if(O===this.current&&!this.dirty)return;const fe=this.gl;O?fe.enable(fe.STENCIL_TEST):fe.disable(fe.STENCIL_TEST),this.current=O,this.dirty=!1}}class Zo extends Jo{getDefault(){return[0,1]}set(O){const fe=this.current;(O[0]!==fe[0]||O[1]!==fe[1]||this.dirty)&&(this.gl.depthRange(O[0],O[1]),this.current=O,this.dirty=!1)}}class _u extends Jo{getDefault(){return!1}set(O){if(O===this.current&&!this.dirty)return;const fe=this.gl;O?fe.enable(fe.DEPTH_TEST):fe.disable(fe.DEPTH_TEST),this.current=O,this.dirty=!1}}class Au extends Jo{getDefault(){return this.gl.LESS}set(O){(O!==this.current||this.dirty)&&(this.gl.depthFunc(O),this.current=O,this.dirty=!1)}}class Ys extends Jo{getDefault(){return!1}set(O){if(O===this.current&&!this.dirty)return;const fe=this.gl;O?fe.enable(fe.BLEND):fe.disable(fe.BLEND),this.current=O,this.dirty=!1}}class Ol extends Jo{getDefault(){const O=this.gl;return[O.ONE,O.ZERO]}set(O){const fe=this.current;(O[0]!==fe[0]||O[1]!==fe[1]||this.dirty)&&(this.gl.blendFunc(O[0],O[1]),this.current=O,this.dirty=!1)}}class $l extends Jo{getDefault(){return r.aM.transparent}set(O){const fe=this.current;(O.r!==fe.r||O.g!==fe.g||O.b!==fe.b||O.a!==fe.a||this.dirty)&&(this.gl.blendColor(O.r,O.g,O.b,O.a),this.current=O,this.dirty=!1)}}class Ql extends Jo{getDefault(){return this.gl.FUNC_ADD}set(O){(O!==this.current||this.dirty)&&(this.gl.blendEquation(O),this.current=O,this.dirty=!1)}}class ac extends Jo{getDefault(){return!1}set(O){if(O===this.current&&!this.dirty)return;const fe=this.gl;O?fe.enable(fe.CULL_FACE):fe.disable(fe.CULL_FACE),this.current=O,this.dirty=!1}}class Tf extends Jo{getDefault(){return this.gl.BACK}set(O){(O!==this.current||this.dirty)&&(this.gl.cullFace(O),this.current=O,this.dirty=!1)}}class rf extends Jo{getDefault(){return this.gl.CCW}set(O){(O!==this.current||this.dirty)&&(this.gl.frontFace(O),this.current=O,this.dirty=!1)}}class df extends Jo{getDefault(){return null}set(O){(O!==this.current||this.dirty)&&(this.gl.useProgram(O),this.current=O,this.dirty=!1)}}class Zh extends Jo{getDefault(){return this.gl.TEXTURE0}set(O){(O!==this.current||this.dirty)&&(this.gl.activeTexture(O),this.current=O,this.dirty=!1)}}class zh extends Jo{getDefault(){const O=this.gl;return[0,0,O.drawingBufferWidth,O.drawingBufferHeight]}set(O){const fe=this.current;(O[0]!==fe[0]||O[1]!==fe[1]||O[2]!==fe[2]||O[3]!==fe[3]||this.dirty)&&(this.gl.viewport(O[0],O[1],O[2],O[3]),this.current=O,this.dirty=!1)}}class zl extends Jo{getDefault(){return null}set(O){if(O===this.current&&!this.dirty)return;const fe=this.gl;fe.bindFramebuffer(fe.FRAMEBUFFER,O),this.current=O,this.dirty=!1}}class Vc extends Jo{getDefault(){return null}set(O){if(O===this.current&&!this.dirty)return;const fe=this.gl;fe.bindRenderbuffer(fe.RENDERBUFFER,O),this.current=O,this.dirty=!1}}class $h extends Jo{getDefault(){return null}set(O){if(O===this.current&&!this.dirty)return;const fe=this.gl;fe.bindTexture(fe.TEXTURE_2D,O),this.current=O,this.dirty=!1}}class pc extends Jo{getDefault(){return null}set(O){if(O===this.current&&!this.dirty)return;const fe=this.gl;fe.bindBuffer(fe.ARRAY_BUFFER,O),this.current=O,this.dirty=!1}}class ic extends Jo{getDefault(){return null}set(O){const fe=this.gl;fe.bindBuffer(fe.ELEMENT_ARRAY_BUFFER,O),this.current=O,this.dirty=!1}}class mc extends Jo{getDefault(){return null}set(O){var fe;if(O===this.current&&!this.dirty)return;const Re=this.gl;Gs(Re)?Re.bindVertexArray(O):(fe=Re.getExtension("OES_vertex_array_object"))===null||fe===void 0||fe.bindVertexArrayOES(O),this.current=O,this.dirty=!1}}class vf extends Jo{getDefault(){return 4}set(O){if(O===this.current&&!this.dirty)return;const fe=this.gl;fe.pixelStorei(fe.UNPACK_ALIGNMENT,O),this.current=O,this.dirty=!1}}class uu extends Jo{getDefault(){return!1}set(O){if(O===this.current&&!this.dirty)return;const fe=this.gl;fe.pixelStorei(fe.UNPACK_PREMULTIPLY_ALPHA_WEBGL,O),this.current=O,this.dirty=!1}}class oc extends Jo{getDefault(){return!1}set(O){if(O===this.current&&!this.dirty)return;const fe=this.gl;fe.pixelStorei(fe.UNPACK_FLIP_Y_WEBGL,O),this.current=O,this.dirty=!1}}class el extends Jo{constructor(O,fe){super(O),this.context=O,this.parent=fe}getDefault(){return null}}class Xl extends el{setDirty(){this.dirty=!0}set(O){if(O===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const fe=this.gl;fe.framebufferTexture2D(fe.FRAMEBUFFER,fe.COLOR_ATTACHMENT0,fe.TEXTURE_2D,O,0),this.current=O,this.dirty=!1}}class zf extends el{set(O){if(O===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const fe=this.gl;fe.framebufferRenderbuffer(fe.FRAMEBUFFER,fe.DEPTH_ATTACHMENT,fe.RENDERBUFFER,O),this.current=O,this.dirty=!1}}class Lc extends el{set(O){if(O===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const fe=this.gl;fe.framebufferRenderbuffer(fe.FRAMEBUFFER,fe.DEPTH_STENCIL_ATTACHMENT,fe.RENDERBUFFER,O),this.current=O,this.dirty=!1}}class $f{constructor(O,fe,Re,Oe,We){this.context=O,this.width=fe,this.height=Re;const Ct=O.gl,Nt=this.framebuffer=Ct.createFramebuffer();if(this.colorAttachment=new Xl(O,Nt),Oe)this.depthAttachment=We?new Lc(O,Nt):new zf(O,Nt);else if(We)throw new Error("Stencil cannot be set without depth");if(Ct.checkFramebufferStatus(Ct.FRAMEBUFFER)!==Ct.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer is not complete")}destroy(){const O=this.context.gl,fe=this.colorAttachment.get();if(fe&&O.deleteTexture(fe),this.depthAttachment){const Re=this.depthAttachment.get();Re&&O.deleteRenderbuffer(Re)}O.deleteFramebuffer(this.framebuffer)}}class xu{constructor(O,fe,Re){this.blendFunction=O,this.blendColor=fe,this.mask=Re}}xu.Replace=[1,0],xu.disabled=new xu(xu.Replace,r.aM.transparent,[!1,!1,!1,!1]),xu.unblended=new xu(xu.Replace,r.aM.transparent,[!0,!0,!0,!0]),xu.alphaBlended=new xu([1,771],r.aM.transparent,[!0,!0,!0,!0]);class Wd{constructor(O){var fe,Re;if(this.gl=O,this.clearColor=new Gl(this),this.clearDepth=new al(this),this.clearStencil=new bl(this),this.colorMask=new Iu(this),this.depthMask=new _o(this),this.stencilMask=new Ps(this),this.stencilFunc=new ms(this),this.stencilOp=new ru(this),this.stencilTest=new nu(this),this.depthRange=new Zo(this),this.depthTest=new _u(this),this.depthFunc=new Au(this),this.blend=new Ys(this),this.blendFunc=new Ol(this),this.blendColor=new $l(this),this.blendEquation=new Ql(this),this.cullFace=new ac(this),this.cullFaceSide=new Tf(this),this.frontFace=new rf(this),this.program=new df(this),this.activeTexture=new Zh(this),this.viewport=new zh(this),this.bindFramebuffer=new zl(this),this.bindRenderbuffer=new Vc(this),this.bindTexture=new $h(this),this.bindVertexBuffer=new pc(this),this.bindElementBuffer=new ic(this),this.bindVertexArray=new mc(this),this.pixelStoreUnpack=new vf(this),this.pixelStoreUnpackPremultiplyAlpha=new uu(this),this.pixelStoreUnpackFlipY=new oc(this),this.extTextureFilterAnisotropic=O.getExtension("EXT_texture_filter_anisotropic")||O.getExtension("MOZ_EXT_texture_filter_anisotropic")||O.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=O.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=O.getParameter(O.MAX_TEXTURE_SIZE),Gs(O)){this.HALF_FLOAT=O.HALF_FLOAT;const Oe=O.getExtension("EXT_color_buffer_half_float");this.RGBA16F=(fe=O.RGBA16F)!==null&&fe!==void 0?fe:Oe?.RGBA16F_EXT,this.RGB16F=(Re=O.RGB16F)!==null&&Re!==void 0?Re:Oe?.RGB16F_EXT,O.getExtension("EXT_color_buffer_float")}else{O.getExtension("EXT_color_buffer_half_float"),O.getExtension("OES_texture_half_float_linear");const Oe=O.getExtension("OES_texture_half_float");this.HALF_FLOAT=Oe?.HALF_FLOAT_OES}}setDefault(){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()}setDirty(){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.bindVertexArray.dirty=!0,this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0}createIndexBuffer(O,fe){return new Fs(this,O,fe)}createVertexBuffer(O,fe,Re){return new wo(this,O,fe,Re)}createRenderbuffer(O,fe,Re){const Oe=this.gl,We=Oe.createRenderbuffer();return this.bindRenderbuffer.set(We),Oe.renderbufferStorage(Oe.RENDERBUFFER,O,fe,Re),this.bindRenderbuffer.set(null),We}createFramebuffer(O,fe,Re,Oe){return new $f(this,O,fe,Re,Oe)}clear({color:O,depth:fe,stencil:Re}){const Oe=this.gl;let We=0;O&&(We|=Oe.COLOR_BUFFER_BIT,this.clearColor.set(O),this.colorMask.set([!0,!0,!0,!0])),fe!==void 0&&(We|=Oe.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(fe),this.depthMask.set(!0)),Re!==void 0&&(We|=Oe.STENCIL_BUFFER_BIT,this.clearStencil.set(Re),this.stencilMask.set(255)),Oe.clear(We)}setCullFace(O){O.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(O.mode),this.frontFace.set(O.frontFace))}setDepthMode(O){O.func!==this.gl.ALWAYS||O.mask?(this.depthTest.set(!0),this.depthFunc.set(O.func),this.depthMask.set(O.mask),this.depthRange.set(O.range)):this.depthTest.set(!1)}setStencilMode(O){O.test.func!==this.gl.ALWAYS||O.mask?(this.stencilTest.set(!0),this.stencilMask.set(O.mask),this.stencilOp.set([O.fail,O.depthFail,O.pass]),this.stencilFunc.set({func:O.test.func,ref:O.ref,mask:O.test.mask})):this.stencilTest.set(!1)}setColorMode(O){r.aE(O.blendFunction,xu.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(O.blendFunction),this.blendColor.set(O.blendColor)),this.colorMask.set(O.mask)}createVertexArray(){var O;return Gs(this.gl)?this.gl.createVertexArray():(O=this.gl.getExtension("OES_vertex_array_object"))===null||O===void 0?void 0:O.createVertexArrayOES()}deleteVertexArray(O){var fe;return Gs(this.gl)?this.gl.deleteVertexArray(O):(fe=this.gl.getExtension("OES_vertex_array_object"))===null||fe===void 0?void 0:fe.deleteVertexArrayOES(O)}unbindVAO(){this.bindVertexArray.set(null)}}class Zs{constructor(O,fe,Re){this.func=O,this.mask=fe,this.range=Re}}Zs.ReadOnly=!1,Zs.ReadWrite=!0,Zs.disabled=new Zs(519,Zs.ReadOnly,[0,1]);const dv=7680;class Ml{constructor(O,fe,Re,Oe,We,Ct){this.test=O,this.ref=fe,this.mask=Re,this.fail=Oe,this.depthFail=We,this.pass=Ct}}Ml.disabled=new Ml({func:519,mask:0},0,0,dv,dv,dv);class Ko{constructor(O,fe,Re){this.enable=O,this.mode=fe,this.frontFace=Re}}let ph;function pf(Ze,O,fe,Re,Oe){const We=Ze.context,Ct=We.gl,Nt=Ze.useProgram("collisionBox"),rr=[];let Tr=0,Fr=0;for(let Pt=0;Pt<Re.length;Pt++){const Gt=Re[Pt],zt=O.getTile(Gt).getBucket(fe);if(!zt)continue;const Kt=Oe?zt.textCollisionBox:zt.iconCollisionBox,Cr=zt.collisionCircleArray;if(Cr.length>0){const Nr=r.H();r.aQ(Nr,zt.placementInvProjMatrix,Ze.transform.glCoordMatrix),r.aQ(Nr,Nr,zt.placementViewportMatrix),rr.push({circleArray:Cr,circleOffset:Fr,transform:Gt.posMatrix,invTransform:Nr,coord:Gt}),Tr+=Cr.length/4,Fr=Tr}Kt&&Nt.draw(We,Ct.LINES,Zs.disabled,Ml.disabled,Ze.colorModeForRenderPass(),Ko.disabled,{u_matrix:Gt.posMatrix,u_pixel_extrude_scale:[1/(Vr=Ze.transform).width,1/Vr.height]},Ze.style.map.terrain&&Ze.style.map.terrain.getTerrainData(Gt),fe.id,Kt.layoutVertexBuffer,Kt.indexBuffer,Kt.segments,null,Ze.transform.zoom,null,null,Kt.collisionVertexBuffer)}var Vr;if(!Oe||!rr.length)return;const mn=Ze.useProgram("collisionCircle"),Dn=new r.aR;Dn.resize(4*Tr),Dn._trim();let nt=0;for(const Pt of rr)for(let Gt=0;Gt<Pt.circleArray.length/4;Gt++){const zt=4*Gt,Kt=Pt.circleArray[zt+0],Cr=Pt.circleArray[zt+1],Nr=Pt.circleArray[zt+2],Hr=Pt.circleArray[zt+3];Dn.emplace(nt++,Kt,Cr,Nr,Hr,0),Dn.emplace(nt++,Kt,Cr,Nr,Hr,1),Dn.emplace(nt++,Kt,Cr,Nr,Hr,2),Dn.emplace(nt++,Kt,Cr,Nr,Hr,3)}(!ph||ph.length<2*Tr)&&(ph=(function(Pt){const Gt=2*Pt,zt=new r.aT;zt.resize(Gt),zt._trim();for(let Kt=0;Kt<Gt;Kt++){const Cr=6*Kt;zt.uint16[Cr+0]=4*Kt+0,zt.uint16[Cr+1]=4*Kt+1,zt.uint16[Cr+2]=4*Kt+2,zt.uint16[Cr+3]=4*Kt+2,zt.uint16[Cr+4]=4*Kt+3,zt.uint16[Cr+5]=4*Kt+0}return zt})(Tr));const ct=We.createIndexBuffer(ph,!0),Tt=We.createVertexBuffer(Dn,r.aS.members,!0);for(const Pt of rr){const Gt=Co(Pt.transform,Pt.invTransform,Ze.transform);mn.draw(We,Ct.TRIANGLES,Zs.disabled,Ml.disabled,Ze.colorModeForRenderPass(),Ko.disabled,Gt,Ze.style.map.terrain&&Ze.style.map.terrain.getTerrainData(Pt.coord),fe.id,Tt,ct,r.a0.simpleSegment(0,2*Pt.circleOffset,Pt.circleArray.length,Pt.circleArray.length/2),null,Ze.transform.zoom,null,null,null)}Tt.destroy(),ct.destroy()}Ko.disabled=new Ko(!1,1029,2305),Ko.backCCW=new Ko(!0,1029,2305);const Yu=r.an(new Float32Array(16));function Kh(Ze,O,fe,Re,Oe,We){const{horizontalAlign:Ct,verticalAlign:Nt}=r.au(Ze);return new r.P((-(Ct-.5)*O/Oe+Re[0])*We,(-(Nt-.5)*fe/Oe+Re[1])*We)}function Kf(Ze,O,fe,Re,Oe,We){const Ct=O.tileAnchorPoint.add(new r.P(O.translation[0],O.translation[1]));if(O.pitchWithMap){let Nt=Re.mult(We);fe||(Nt=Nt.rotate(-Oe));const rr=Ct.add(Nt);return Ot(rr.x,rr.y,O.labelPlaneMatrix,O.getElevation).point}if(fe){const Nt=Bt(O.tileAnchorPoint.x+1,O.tileAnchorPoint.y,O).point.sub(Ze),rr=Math.atan(Nt.y/Nt.x)+(Nt.x<0?Math.PI:0);return Ze.add(Re.rotate(rr))}return Ze.add(Re)}function Ah(Ze,O,fe,Re,Oe,We,Ct,Nt,rr,Tr,Fr,Vr,mn,Dn){const nt=Ze.text.placedSymbolArray,ct=Ze.text.dynamicLayoutVertexArray,Tt=Ze.icon.dynamicLayoutVertexArray,Pt={};ct.clear();for(let Gt=0;Gt<nt.length;Gt++){const zt=nt.get(Gt),Kt=zt.hidden||!zt.crossTileID||Ze.allowVerticalPlacement&&!zt.placedOrientation?null:Re[zt.crossTileID];if(Kt){const Cr=new r.P(zt.anchorX,zt.anchorY),Nr={getElevation:Dn,width:Oe.width,height:Oe.height,labelPlaneMatrix:We,pitchWithMap:fe,projection:Fr,tileAnchorPoint:Cr,translation:Vr,unwrappedTileID:mn},Hr=fe?Ot(Cr.x,Cr.y,Ct,Dn):Bt(Cr.x,Cr.y,Nr),sn=$e(Oe.cameraToCenterDistance,Hr.signedDistanceFromCamera);let bn=r.ai(Ze.textSizeData,rr,zt)*sn/r.ap;fe&&(bn*=Ze.tilePixelRatio/Nt);const{width:Vn,height:Yn,anchor:va,textOffset:Va,textBoxScale:Si}=Kt,yi=Kh(va,Vn,Yn,Va,Si,bn),Mi=Fr.getPitchedTextCorrection(Oe,Cr.add(new r.P(Vr[0],Vr[1])),mn),go=Kf(Hr.point,Nr,O,yi,Oe.angle,Mi),jo=Ze.allowVerticalPlacement&&zt.placedOrientation===r.ah.vertical?Math.PI/2:0;for(let Do=0;Do<zt.numGlyphs;Do++)r.aj(ct,go,jo);Tr&&zt.associatedIconIndex>=0&&(Pt[zt.associatedIconIndex]={shiftedAnchor:go,angle:jo})}else Mr(zt.numGlyphs,ct)}if(Tr){Tt.clear();const Gt=Ze.icon.placedSymbolArray;for(let zt=0;zt<Gt.length;zt++){const Kt=Gt.get(zt);if(Kt.hidden)Mr(Kt.numGlyphs,Tt);else{const Cr=Pt[zt];if(Cr)for(let Nr=0;Nr<Kt.numGlyphs;Nr++)r.aj(Tt,Cr.shiftedAnchor,Cr.angle);else Mr(Kt.numGlyphs,Tt)}}Ze.icon.dynamicLayoutVertexBuffer.updateData(Tt)}Ze.text.dynamicLayoutVertexBuffer.updateData(ct)}function sc(Ze,O,fe){return fe.iconsInText&&O?"symbolTextAndIcon":Ze?"symbolSDF":"symbolIcon"}function Ld(Ze,O,fe,Re,Oe,We,Ct,Nt,rr,Tr,Fr,Vr){const mn=Ze.context,Dn=mn.gl,nt=Ze.transform,ct=Ka(),Tt=Nt==="map",Pt=rr==="map",Gt=Nt!=="viewport"&&fe.layout.get("symbol-placement")!=="point",zt=Tt&&!Pt&&!Gt,Kt=!Pt&&Gt,Cr=!fe.layout.get("symbol-sort-key").isConstant();let Nr=!1;const Hr=Ze.depthModeForSublayer(0,Zs.ReadOnly),sn=fe._unevaluatedLayout.hasValue("text-variable-anchor")||fe._unevaluatedLayout.hasValue("text-variable-anchor-offset"),bn=[],Vn=ct.getCircleRadiusCorrection(nt);for(const Yn of Re){const va=O.getTile(Yn),Va=va.getBucket(fe);if(!Va)continue;const Si=Oe?Va.text:Va.icon;if(!Si||!Si.segments.get().length||!Si.hasVisibleVertices)continue;const yi=Si.programConfigurations.get(fe.id),Mi=Oe||Va.sdfIcons,go=Oe?Va.textSizeData:Va.iconSizeData,jo=Pt||nt.pitch!==0,Do=Ze.useProgram(sc(Mi,Oe,Va),yi),us=r.ag(go,nt.zoom),sl=Ze.style.map.terrain&&Ze.style.map.terrain.getTerrainData(Yn);let ll,Bs,vl,Eu,vu=[0,0],Us=null;if(Oe)Bs=va.glyphAtlasTexture,vl=Dn.LINEAR,ll=va.glyphAtlasTexture.size,Va.iconsInText&&(vu=va.imageAtlasTexture.size,Us=va.imageAtlasTexture,Eu=jo||Ze.options.rotating||Ze.options.zooming||go.kind==="composite"||go.kind==="camera"?Dn.LINEAR:Dn.NEAREST);else{const Mn=fe.layout.get("icon-size").constantOr(0)!==1||Va.iconsNeedLinear;Bs=va.imageAtlasTexture,vl=Mi||Ze.options.rotating||Ze.options.zooming||Mn||jo?Dn.LINEAR:Dn.NEAREST,ll=va.imageAtlasTexture.size}const qs=ga(va,1,Ze.transform.zoom),Hu=Kt?Yn.posMatrix:Yu,yc=Br(Hu,Pt,Tt,Ze.transform,qs),Zc=Qr(Hu,Pt,Tt,Ze.transform,qs),Te=Qr(Yn.posMatrix,Pt,Tt,Ze.transform,qs),He=ct.translatePosition(Ze.transform,va,We,Ct),ft=sn&&Va.hasTextData(),Lt=fe.layout.get("icon-text-fit")!=="none"&&ft&&Va.hasIconData();if(Gt){const Mn=Ze.style.map.terrain?(Gn,Ja)=>Ze.style.map.terrain.getElevation(Yn,Gn,Ja):null,Un=fe.layout.get("text-rotation-alignment")==="map";De(Va,Yn.posMatrix,Ze,Oe,yc,Te,Pt,Tr,Un,ct,Yn.toUnwrapped(),nt.width,nt.height,He,Mn)}const Dt=Yn.posMatrix,qt=Oe&&sn||Lt,dr=Gt||qt?Yu:yc,hr=Zc,Pr=Mi&&fe.paint.get(Oe?"text-halo-width":"icon-halo-width").constantOr(1)!==0;let ln;ln=Mi?Va.iconsInText?Es(go.kind,us,zt,Pt,Gt,qt,Ze,Dt,dr,hr,He,ll,vu,Vn):Oo(go.kind,us,zt,Pt,Gt,qt,Ze,Dt,dr,hr,He,Oe,ll,!0,Vn):ls(go.kind,us,zt,Pt,Gt,qt,Ze,Dt,dr,hr,He,Oe,ll,Vn);const on={program:Do,buffers:Si,uniformValues:ln,atlasTexture:Bs,atlasTextureIcon:Us,atlasInterpolation:vl,atlasInterpolationIcon:Eu,isSDF:Mi,hasHalo:Pr};if(Cr&&Va.canOverlap){Nr=!0;const Mn=Si.segments.get();for(const Un of Mn)bn.push({segments:new r.a0([Un]),sortKey:Un.sortKey,state:on,terrainData:sl})}else bn.push({segments:Si.segments,sortKey:0,state:on,terrainData:sl})}Nr&&bn.sort((Yn,va)=>Yn.sortKey-va.sortKey);for(const Yn of bn){const va=Yn.state;if(mn.activeTexture.set(Dn.TEXTURE0),va.atlasTexture.bind(va.atlasInterpolation,Dn.CLAMP_TO_EDGE),va.atlasTextureIcon&&(mn.activeTexture.set(Dn.TEXTURE1),va.atlasTextureIcon&&va.atlasTextureIcon.bind(va.atlasInterpolationIcon,Dn.CLAMP_TO_EDGE)),va.isSDF){const Va=va.uniformValues;va.hasHalo&&(Va.u_is_halo=1,sd(va.buffers,Yn.segments,fe,Ze,va.program,Hr,Fr,Vr,Va,Yn.terrainData)),Va.u_is_halo=0}sd(va.buffers,Yn.segments,fe,Ze,va.program,Hr,Fr,Vr,va.uniformValues,Yn.terrainData)}}function sd(Ze,O,fe,Re,Oe,We,Ct,Nt,rr,Tr){const Fr=Re.context;Oe.draw(Fr,Fr.gl.TRIANGLES,We,Ct,Nt,Ko.disabled,rr,Tr,fe.id,Ze.layoutVertexBuffer,Ze.indexBuffer,O,fe.paint,Re.transform.zoom,Ze.programConfigurations.get(fe.id),Ze.dynamicLayoutVertexBuffer,Ze.opacityVertexBuffer)}function Sh(Ze,O,fe,Re){const Oe=Ze.context,We=Oe.gl,Ct=Ml.disabled,Nt=new xu([We.ONE,We.ONE],r.aM.transparent,[!0,!0,!0,!0]),rr=O.getBucket(fe);if(!rr)return;const Tr=Re.key;let Fr=fe.heatmapFbos.get(Tr);Fr||(Fr=Jh(Oe,O.tileSize,O.tileSize),fe.heatmapFbos.set(Tr,Fr)),Oe.bindFramebuffer.set(Fr.framebuffer),Oe.viewport.set([0,0,O.tileSize,O.tileSize]),Oe.clear({color:r.aM.transparent});const Vr=rr.programConfigurations.get(fe.id),mn=Ze.useProgram("heatmap",Vr),Dn=Ze.style.map.terrain.getTerrainData(Re);mn.draw(Oe,We.TRIANGLES,Zs.disabled,Ct,Nt,Ko.disabled,Oi(Re.posMatrix,O,Ze.transform.zoom,fe.paint.get("heatmap-intensity")),Dn,fe.id,rr.layoutVertexBuffer,rr.indexBuffer,rr.segments,fe.paint,Ze.transform.zoom,Vr)}function Jf(Ze,O,fe){const Re=Ze.context,Oe=Re.gl;Re.setColorMode(Ze.colorModeForRenderPass());const We=Qh(Re,O),Ct=fe.key,Nt=O.heatmapFbos.get(Ct);Nt&&(Re.activeTexture.set(Oe.TEXTURE0),Oe.bindTexture(Oe.TEXTURE_2D,Nt.colorAttachment.get()),Re.activeTexture.set(Oe.TEXTURE1),We.bind(Oe.LINEAR,Oe.CLAMP_TO_EDGE),Ze.useProgram("heatmapTexture").draw(Re,Oe.TRIANGLES,Zs.disabled,Ml.disabled,Ze.colorModeForRenderPass(),Ko.disabled,ps(Ze,O,0,1),null,O.id,Ze.rasterBoundsBuffer,Ze.quadTriangleIndexBuffer,Ze.rasterBoundsSegments,O.paint,Ze.transform.zoom),Nt.destroy(),O.heatmapFbos.delete(Ct))}function Jh(Ze,O,fe){var Re,Oe;const We=Ze.gl,Ct=We.createTexture();We.bindTexture(We.TEXTURE_2D,Ct),We.texParameteri(We.TEXTURE_2D,We.TEXTURE_WRAP_S,We.CLAMP_TO_EDGE),We.texParameteri(We.TEXTURE_2D,We.TEXTURE_WRAP_T,We.CLAMP_TO_EDGE),We.texParameteri(We.TEXTURE_2D,We.TEXTURE_MIN_FILTER,We.LINEAR),We.texParameteri(We.TEXTURE_2D,We.TEXTURE_MAG_FILTER,We.LINEAR);const Nt=(Re=Ze.HALF_FLOAT)!==null&&Re!==void 0?Re:We.UNSIGNED_BYTE,rr=(Oe=Ze.RGBA16F)!==null&&Oe!==void 0?Oe:We.RGBA;We.texImage2D(We.TEXTURE_2D,0,rr,O,fe,0,We.RGBA,Nt,null);const Tr=Ze.createFramebuffer(O,fe,!1,!1);return Tr.colorAttachment.set(Ct),Tr}function Qh(Ze,O){return O.colorRampTexture||(O.colorRampTexture=new f(Ze,O.colorRamp,Ze.gl.RGBA)),O.colorRampTexture}function mf(Ze,O,fe,Re,Oe){if(!fe||!Re||!Re.imageAtlas)return;const We=Re.imageAtlas.patternPositions;let Ct=We[fe.to.toString()],Nt=We[fe.from.toString()];if(!Ct&&Nt&&(Ct=Nt),!Nt&&Ct&&(Nt=Ct),!Ct||!Nt){const rr=Oe.getPaintProperty(O);Ct=We[rr],Nt=We[rr]}Ct&&Nt&&Ze.setConstantPatternPositions(Ct,Nt)}function ld(Ze,O,fe,Re,Oe,We,Ct){const Nt=Ze.context.gl,rr="fill-pattern",Tr=fe.paint.get(rr),Fr=Tr&&Tr.constantOr(1),Vr=fe.getCrossfadeParameters();let mn,Dn,nt,ct,Tt;Ct?(Dn=Fr&&!fe.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",mn=Nt.LINES):(Dn=Fr?"fillPattern":"fill",mn=Nt.TRIANGLES);const Pt=Tr.constantOr(null);for(const Gt of Re){const zt=O.getTile(Gt);if(Fr&&!zt.patternsLoaded())continue;const Kt=zt.getBucket(fe);if(!Kt)continue;const Cr=Kt.programConfigurations.get(fe.id),Nr=Ze.useProgram(Dn,Cr),Hr=Ze.style.map.terrain&&Ze.style.map.terrain.getTerrainData(Gt);Fr&&(Ze.context.activeTexture.set(Nt.TEXTURE0),zt.imageAtlasTexture.bind(Nt.LINEAR,Nt.CLAMP_TO_EDGE),Cr.updatePaintBuffers(Vr)),mf(Cr,rr,Pt,zt,fe);const sn=Hr?Gt:null,bn=Ze.translatePosMatrix(sn?sn.posMatrix:Gt.posMatrix,zt,fe.paint.get("fill-translate"),fe.paint.get("fill-translate-anchor"));if(Ct){ct=Kt.indexBuffer2,Tt=Kt.segments2;const Vn=[Nt.drawingBufferWidth,Nt.drawingBufferHeight];nt=Dn==="fillOutlinePattern"&&Fr?Ki(bn,Ze,Vr,zt,Vn):Za(bn,Vn)}else ct=Kt.indexBuffer,Tt=Kt.segments,nt=Fr?Ui(bn,Ze,Vr,zt):Kn(bn);Nr.draw(Ze.context,mn,Oe,Ze.stencilModeForClipping(Gt),We,Ko.disabled,nt,Hr,fe.id,Kt.layoutVertexBuffer,ct,Tt,fe.paint,Ze.transform.zoom,Cr)}}function Nf(Ze,O,fe,Re,Oe,We,Ct){const Nt=Ze.context,rr=Nt.gl,Tr="fill-extrusion-pattern",Fr=fe.paint.get(Tr),Vr=Fr.constantOr(1),mn=fe.getCrossfadeParameters(),Dn=fe.paint.get("fill-extrusion-opacity"),nt=Fr.constantOr(null);for(const ct of Re){const Tt=O.getTile(ct),Pt=Tt.getBucket(fe);if(!Pt)continue;const Gt=Ze.style.map.terrain&&Ze.style.map.terrain.getTerrainData(ct),zt=Pt.programConfigurations.get(fe.id),Kt=Ze.useProgram(Vr?"fillExtrusionPattern":"fillExtrusion",zt);Vr&&(Ze.context.activeTexture.set(rr.TEXTURE0),Tt.imageAtlasTexture.bind(rr.LINEAR,rr.CLAMP_TO_EDGE),zt.updatePaintBuffers(mn)),mf(zt,Tr,nt,Tt,fe);const Cr=Ze.translatePosMatrix(ct.posMatrix,Tt,fe.paint.get("fill-extrusion-translate"),fe.paint.get("fill-extrusion-translate-anchor")),Nr=fe.paint.get("fill-extrusion-vertical-gradient"),Hr=Vr?Sn(Cr,Ze,Nr,Dn,ct,mn,Tt):oa(Cr,Ze,Nr,Dn);Kt.draw(Nt,Nt.gl.TRIANGLES,Oe,We,Ct,Ko.backCCW,Hr,Gt,fe.id,Pt.layoutVertexBuffer,Pt.indexBuffer,Pt.segments,fe.paint,Ze.transform.zoom,zt,Ze.style.map.terrain&&Pt.centroidVertexBuffer)}}function Af(Ze,O,fe,Re,Oe,We,Ct){const Nt=Ze.context,rr=Nt.gl,Tr=fe.fbo;if(!Tr)return;const Fr=Ze.useProgram("hillshade"),Vr=Ze.style.map.terrain&&Ze.style.map.terrain.getTerrainData(O);Nt.activeTexture.set(rr.TEXTURE0),rr.bindTexture(rr.TEXTURE_2D,Tr.colorAttachment.get()),Fr.draw(Nt,rr.TRIANGLES,Oe,We,Ct,Ko.disabled,((mn,Dn,nt,ct)=>{const Tt=nt.paint.get("hillshade-shadow-color"),Pt=nt.paint.get("hillshade-highlight-color"),Gt=nt.paint.get("hillshade-accent-color");let zt=nt.paint.get("hillshade-illumination-direction")*(Math.PI/180);nt.paint.get("hillshade-illumination-anchor")==="viewport"&&(zt-=mn.transform.angle);const Kt=!mn.options.moving;return{u_matrix:ct?ct.posMatrix:mn.transform.calculatePosMatrix(Dn.tileID.toUnwrapped(),Kt),u_image:0,u_latrange:as(0,Dn.tileID),u_light:[nt.paint.get("hillshade-exaggeration"),zt],u_shadow:Tt,u_highlight:Pt,u_accent:Gt}})(Ze,fe,Re,Vr?O:null),Vr,Re.id,Ze.rasterBoundsBuffer,Ze.quadTriangleIndexBuffer,Ze.rasterBoundsSegments)}function lc(Ze,O,fe,Re,Oe,We){const Ct=Ze.context,Nt=Ct.gl,rr=O.dem;if(rr&&rr.data){const Tr=rr.dim,Fr=rr.stride,Vr=rr.getPixels();if(Ct.activeTexture.set(Nt.TEXTURE1),Ct.pixelStoreUnpackPremultiplyAlpha.set(!1),O.demTexture=O.demTexture||Ze.getTileTexture(Fr),O.demTexture){const Dn=O.demTexture;Dn.update(Vr,{premultiply:!1}),Dn.bind(Nt.NEAREST,Nt.CLAMP_TO_EDGE)}else O.demTexture=new f(Ct,Vr,Nt.RGBA,{premultiply:!1}),O.demTexture.bind(Nt.NEAREST,Nt.CLAMP_TO_EDGE);Ct.activeTexture.set(Nt.TEXTURE0);let mn=O.fbo;if(!mn){const Dn=new f(Ct,{width:Tr,height:Tr,data:null},Nt.RGBA);Dn.bind(Nt.LINEAR,Nt.CLAMP_TO_EDGE),mn=O.fbo=Ct.createFramebuffer(Tr,Tr,!0,!1),mn.colorAttachment.set(Dn.texture)}Ct.bindFramebuffer.set(mn.framebuffer),Ct.viewport.set([0,0,Tr,Tr]),Ze.useProgram("hillshadePrepare").draw(Ct,Nt.TRIANGLES,Re,Oe,We,Ko.disabled,((Dn,nt)=>{const ct=nt.stride,Tt=r.H();return r.aP(Tt,0,r.X,-r.X,0,0,1),r.J(Tt,Tt,[0,-r.X,0]),{u_matrix:Tt,u_image:1,u_dimension:[ct,ct],u_zoom:Dn.overscaledZ,u_unpack:nt.getUnpackVector()}})(O.tileID,rr),null,fe.id,Ze.rasterBoundsBuffer,Ze.quadTriangleIndexBuffer,Ze.rasterBoundsSegments),O.needsHillshadePrepare=!1}}function lh(Ze,O,fe,Re,Oe,We){const Ct=Re.paint.get("raster-fade-duration");if(!We&&Ct>0){const Nt=s.now(),rr=(Nt-Ze.timeAdded)/Ct,Tr=O?(Nt-O.timeAdded)/Ct:-1,Fr=fe.getSource(),Vr=Oe.coveringZoomLevel({tileSize:Fr.tileSize,roundZoom:Fr.roundZoom}),mn=!O||Math.abs(O.tileID.overscaledZ-Vr)>Math.abs(Ze.tileID.overscaledZ-Vr),Dn=mn&&Ze.refreshedUponExpiration?1:r.ac(mn?rr:1-Tr,0,1);return Ze.refreshedUponExpiration&&rr>=1&&(Ze.refreshedUponExpiration=!1),O?{opacity:1,mix:1-Dn}:{opacity:Dn,mix:0}}return{opacity:1,mix:0}}const ed=new r.aM(1,0,0,1),Kl=new r.aM(0,1,0,1),Nh=new r.aM(0,0,1,1),Yd=new r.aM(1,0,1,1),ud=new r.aM(0,1,1,1);function Eh(Ze,O,fe,Re){Hc(Ze,0,O+fe/2,Ze.transform.width,fe,Re)}function cd(Ze,O,fe,Re){Hc(Ze,O-fe/2,0,fe,Ze.transform.height,Re)}function Hc(Ze,O,fe,Re,Oe,We){const Ct=Ze.context,Nt=Ct.gl;Nt.enable(Nt.SCISSOR_TEST),Nt.scissor(O*Ze.pixelRatio,fe*Ze.pixelRatio,Re*Ze.pixelRatio,Oe*Ze.pixelRatio),Ct.clear({color:We}),Nt.disable(Nt.SCISSOR_TEST)}function fd(Ze,O,fe){const Re=Ze.context,Oe=Re.gl,We=fe.posMatrix,Ct=Ze.useProgram("debug"),Nt=Zs.disabled,rr=Ml.disabled,Tr=Ze.colorModeForRenderPass(),Fr="$debug",Vr=Ze.style.map.terrain&&Ze.style.map.terrain.getTerrainData(fe);Re.activeTexture.set(Oe.TEXTURE0);const mn=O.getTileByID(fe.key).latestRawTileData,Dn=Math.floor((mn&&mn.byteLength||0)/1024),nt=O.getTile(fe).tileSize,ct=512/Math.min(nt,512)*(fe.overscaledZ/Ze.transform.zoom)*.5;let Tt=fe.canonical.toString();fe.overscaledZ!==fe.canonical.z&&(Tt+=` => ${fe.overscaledZ}`),(function(Pt,Gt){Pt.initDebugOverlayCanvas();const zt=Pt.debugOverlayCanvas,Kt=Pt.context.gl,Cr=Pt.debugOverlayCanvas.getContext("2d");Cr.clearRect(0,0,zt.width,zt.height),Cr.shadowColor="white",Cr.shadowBlur=2,Cr.lineWidth=1.5,Cr.strokeStyle="white",Cr.textBaseline="top",Cr.font="bold 36px Open Sans, sans-serif",Cr.fillText(Gt,5,5),Cr.strokeText(Gt,5,5),Pt.debugOverlayTexture.update(zt),Pt.debugOverlayTexture.bind(Kt.LINEAR,Kt.CLAMP_TO_EDGE)})(Ze,`${Tt} ${Dn}kB`),Ct.draw(Re,Oe.TRIANGLES,Nt,rr,xu.alphaBlended,Ko.disabled,So(We,r.aM.transparent,ct),null,Fr,Ze.debugBuffer,Ze.quadTriangleIndexBuffer,Ze.debugSegments),Ct.draw(Re,Oe.LINE_STRIP,Nt,rr,Tr,Ko.disabled,So(We,r.aM.red),Vr,Fr,Ze.debugBuffer,Ze.tileBorderIndexBuffer,Ze.debugSegments)}function Pu(Ze,O,fe){const Re=Ze.context,Oe=Re.gl,We=Ze.colorModeForRenderPass(),Ct=new Zs(Oe.LEQUAL,Zs.ReadWrite,Ze.depthRangeFor3D),Nt=Ze.useProgram("terrain"),rr=O.getTerrainMesh();Re.bindFramebuffer.set(null),Re.viewport.set([0,0,Ze.width,Ze.height]);for(const Tr of fe){const Fr=Ze.renderToTexture.getTexture(Tr),Vr=O.getTerrainData(Tr.tileID);Re.activeTexture.set(Oe.TEXTURE0),Oe.bindTexture(Oe.TEXTURE_2D,Fr.texture);const mn=Ze.transform.calculatePosMatrix(Tr.tileID.toUnwrapped()),Dn=O.getMeshFrameDelta(Ze.transform.zoom),nt=Ze.transform.calculateFogMatrix(Tr.tileID.toUnwrapped()),ct=Yr(mn,Dn,nt,Ze.style.sky,Ze.transform.pitch);Nt.draw(Re,Oe.TRIANGLES,Ct,Ml.disabled,We,Ko.backCCW,ct,Vr,"terrain",rr.vertexBuffer,rr.indexBuffer,rr.segments)}}class Gc{constructor(O,fe,Re){this.vertexBuffer=O,this.indexBuffer=fe,this.segments=Re}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}class Qf{constructor(O,fe){this.context=new Wd(O),this.transform=fe,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:r.an(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=$t.maxUnderzooming+$t.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new en}resize(O,fe,Re){if(this.width=Math.floor(O*Re),this.height=Math.floor(fe*Re),this.pixelRatio=Re,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const Oe of this.style._order)this.style._layers[Oe].resize()}setup(){const O=this.context,fe=new r.aX;fe.emplaceBack(0,0),fe.emplaceBack(r.X,0),fe.emplaceBack(0,r.X),fe.emplaceBack(r.X,r.X),this.tileExtentBuffer=O.createVertexBuffer(fe,Tn.members),this.tileExtentSegments=r.a0.simpleSegment(0,0,4,2);const Re=new r.aX;Re.emplaceBack(0,0),Re.emplaceBack(r.X,0),Re.emplaceBack(0,r.X),Re.emplaceBack(r.X,r.X),this.debugBuffer=O.createVertexBuffer(Re,Tn.members),this.debugSegments=r.a0.simpleSegment(0,0,4,5);const Oe=new r.$;Oe.emplaceBack(0,0,0,0),Oe.emplaceBack(r.X,0,r.X,0),Oe.emplaceBack(0,r.X,0,r.X),Oe.emplaceBack(r.X,r.X,r.X,r.X),this.rasterBoundsBuffer=O.createVertexBuffer(Oe,rt.members),this.rasterBoundsSegments=r.a0.simpleSegment(0,0,4,2);const We=new r.aX;We.emplaceBack(0,0),We.emplaceBack(1,0),We.emplaceBack(0,1),We.emplaceBack(1,1),this.viewportBuffer=O.createVertexBuffer(We,Tn.members),this.viewportSegments=r.a0.simpleSegment(0,0,4,2);const Ct=new r.aZ;Ct.emplaceBack(0),Ct.emplaceBack(1),Ct.emplaceBack(3),Ct.emplaceBack(2),Ct.emplaceBack(0),this.tileBorderIndexBuffer=O.createIndexBuffer(Ct);const Nt=new r.aY;Nt.emplaceBack(0,1,2),Nt.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=O.createIndexBuffer(Nt);const rr=this.context.gl;this.stencilClearMode=new Ml({func:rr.ALWAYS,mask:0},0,255,rr.ZERO,rr.ZERO,rr.ZERO)}clearStencil(){const O=this.context,fe=O.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const Re=r.H();r.aP(Re,0,this.width,this.height,0,0,1),r.K(Re,Re,[fe.drawingBufferWidth,fe.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(O,fe.TRIANGLES,Zs.disabled,this.stencilClearMode,xu.disabled,Ko.disabled,Vo(Re),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(O,fe){if(this.currentStencilSource===O.source||!O.isTileClipped()||!fe||!fe.length)return;this.currentStencilSource=O.source;const Re=this.context,Oe=Re.gl;this.nextStencilID+fe.length>256&&this.clearStencil(),Re.setColorMode(xu.disabled),Re.setDepthMode(Zs.disabled);const We=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(const Ct of fe){const Nt=this._tileClippingMaskIDs[Ct.key]=this.nextStencilID++,rr=this.style.map.terrain&&this.style.map.terrain.getTerrainData(Ct);We.draw(Re,Oe.TRIANGLES,Zs.disabled,new Ml({func:Oe.ALWAYS,mask:0},Nt,255,Oe.KEEP,Oe.KEEP,Oe.REPLACE),xu.disabled,Ko.disabled,Vo(Ct.posMatrix),rr,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const O=this.nextStencilID++,fe=this.context.gl;return new Ml({func:fe.NOTEQUAL,mask:255},O,255,fe.KEEP,fe.KEEP,fe.REPLACE)}stencilModeForClipping(O){const fe=this.context.gl;return new Ml({func:fe.EQUAL,mask:255},this._tileClippingMaskIDs[O.key],0,fe.KEEP,fe.KEEP,fe.REPLACE)}stencilConfigForOverlap(O){const fe=this.context.gl,Re=O.sort((Ct,Nt)=>Nt.overscaledZ-Ct.overscaledZ),Oe=Re[Re.length-1].overscaledZ,We=Re[0].overscaledZ-Oe+1;if(We>1){this.currentStencilSource=void 0,this.nextStencilID+We>256&&this.clearStencil();const Ct={};for(let Nt=0;Nt<We;Nt++)Ct[Nt+Oe]=new Ml({func:fe.GEQUAL,mask:255},Nt+this.nextStencilID,255,fe.KEEP,fe.KEEP,fe.REPLACE);return this.nextStencilID+=We,[Ct,Re]}return[{[Oe]:Ml.disabled},Re]}colorModeForRenderPass(){const O=this.context.gl;return this._showOverdrawInspector?new xu([O.CONSTANT_COLOR,O.ONE],new r.aM(.125,.125,.125,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?xu.unblended:xu.alphaBlended}depthModeForSublayer(O,fe,Re){if(!this.opaquePassEnabledForLayer())return Zs.disabled;const Oe=1-((1+this.currentLayer)*this.numSublayers+O)*this.depthEpsilon;return new Zs(Re||this.context.gl.LEQUAL,fe,[Oe,Oe])}opaquePassEnabledForLayer(){return this.currentLayer<this.opaquePassCutoff}render(O,fe){this.style=O,this.options=fe,this.lineAtlas=O.lineAtlas,this.imageManager=O.imageManager,this.glyphManager=O.glyphManager,this.symbolFadeChange=O.placement.symbolFadeChange(s.now()),this.imageManager.beginFrame();const Re=this.style._order,Oe=this.style.sourceCaches,We={},Ct={},Nt={};for(const rr in Oe){const Tr=Oe[rr];Tr.used&&Tr.prepare(this.context),We[rr]=Tr.getVisibleCoordinates(),Ct[rr]=We[rr].slice().reverse(),Nt[rr]=Tr.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let rr=0;rr<Re.length;rr++)if(this.style._layers[Re[rr]].is3D()){this.opaquePassCutoff=rr;break}this.maybeDrawDepthAndCoords(!1),this.renderToTexture&&(this.renderToTexture.prepareForRender(this.style,this.transform.zoom),this.opaquePassCutoff=0),this.renderPass="offscreen";for(const rr of Re){const Tr=this.style._layers[rr];if(!Tr.hasOffscreenPass()||Tr.isHidden(this.transform.zoom))continue;const Fr=Ct[Tr.source];(Tr.type==="custom"||Fr.length)&&this.renderLayer(this,Oe[Tr.source],Tr,Fr)}if(this.context.bindFramebuffer.set(null),this.context.clear({color:fe.showOverdrawInspector?r.aM.black:r.aM.transparent,depth:1}),this.clearStencil(),this.style.sky&&(function(rr,Tr){const Fr=rr.context,Vr=Fr.gl,mn=((Pt,Gt,zt)=>({u_sky_color:Pt.properties.get("sky-color"),u_horizon_color:Pt.properties.get("horizon-color"),u_horizon:(Gt.height/2+Gt.getHorizon())*zt,u_sky_horizon_blend:Pt.properties.get("sky-horizon-blend")*Gt.height/2*zt}))(Tr,rr.style.map.transform,rr.pixelRatio),Dn=new Zs(Vr.LEQUAL,Zs.ReadWrite,[0,1]),nt=Ml.disabled,ct=rr.colorModeForRenderPass(),Tt=rr.useProgram("sky");if(!Tr.mesh){const Pt=new r.aX;Pt.emplaceBack(-1,-1),Pt.emplaceBack(1,-1),Pt.emplaceBack(1,1),Pt.emplaceBack(-1,1);const Gt=new r.aY;Gt.emplaceBack(0,1,2),Gt.emplaceBack(0,2,3),Tr.mesh=new Gc(Fr.createVertexBuffer(Pt,Tn.members),Fr.createIndexBuffer(Gt),r.a0.simpleSegment(0,0,Pt.length,Gt.length))}Tt.draw(Fr,Vr.TRIANGLES,Dn,nt,ct,Ko.disabled,mn,void 0,"sky",Tr.mesh.vertexBuffer,Tr.mesh.indexBuffer,Tr.mesh.segments)})(this,this.style.sky),this._showOverdrawInspector=fe.showOverdrawInspector,this.depthRangeFor3D=[0,1-(O._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=Re.length-1;this.currentLayer>=0;this.currentLayer--){const rr=this.style._layers[Re[this.currentLayer]],Tr=Oe[rr.source],Fr=We[rr.source];this._renderTileClippingMasks(rr,Fr),this.renderLayer(this,Tr,rr,Fr)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<Re.length;this.currentLayer++){const rr=this.style._layers[Re[this.currentLayer]],Tr=Oe[rr.source];if(this.renderToTexture&&this.renderToTexture.renderLayer(rr))continue;const Fr=(rr.type==="symbol"?Nt:Ct)[rr.source];this._renderTileClippingMasks(rr,We[rr.source]),this.renderLayer(this,Tr,rr,Fr)}if(this.options.showTileBoundaries){const rr=(function(Tr,Fr){let Vr=null;const mn=Object.values(Tr._layers).flatMap(Tt=>Tt.source&&!Tt.isHidden(Fr)?[Tr.sourceCaches[Tt.source]]:[]),Dn=mn.filter(Tt=>Tt.getSource().type==="vector"),nt=mn.filter(Tt=>Tt.getSource().type!=="vector"),ct=Tt=>{(!Vr||Vr.getSource().maxzoom<Tt.getSource().maxzoom)&&(Vr=Tt)};return Dn.forEach(Tt=>ct(Tt)),Vr||nt.forEach(Tt=>ct(Tt)),Vr})(this.style,this.transform.zoom);rr&&(function(Tr,Fr,Vr){for(let mn=0;mn<Vr.length;mn++)fd(Tr,Fr,Vr[mn])})(this,rr,rr.getVisibleCoordinates())}this.options.showPadding&&(function(rr){const Tr=rr.transform.padding;Eh(rr,rr.transform.height-(Tr.top||0),3,ed),Eh(rr,Tr.bottom||0,3,Kl),cd(rr,Tr.left||0,3,Nh),cd(rr,rr.transform.width-(Tr.right||0),3,Yd);const Fr=rr.transform.centerPoint;(function(Vr,mn,Dn,nt){Hc(Vr,mn-1,Dn-10,2,20,nt),Hc(Vr,mn-10,Dn-1,20,2,nt)})(rr,Fr.x,rr.transform.height-Fr.y,ud)})(this),this.context.setDefault()}maybeDrawDepthAndCoords(O){if(!this.style||!this.style.map||!this.style.map.terrain)return;const fe=this.terrainFacilitator.matrix,Re=this.transform.modelViewProjectionMatrix;let Oe=this.terrainFacilitator.dirty;Oe||(Oe=O?!r.a_(fe,Re):!r.a$(fe,Re)),Oe||(Oe=this.style.map.terrain.sourceCache.tilesAfterTime(this.terrainFacilitator.renderTime).length>0),Oe&&(r.b0(fe,Re),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,(function(We,Ct){const Nt=We.context,rr=Nt.gl,Tr=xu.unblended,Fr=new Zs(rr.LEQUAL,Zs.ReadWrite,[0,1]),Vr=Ct.getTerrainMesh(),mn=Ct.sourceCache.getRenderableTiles(),Dn=We.useProgram("terrainDepth");Nt.bindFramebuffer.set(Ct.getFramebuffer("depth").framebuffer),Nt.viewport.set([0,0,We.width/devicePixelRatio,We.height/devicePixelRatio]),Nt.clear({color:r.aM.transparent,depth:1});for(const nt of mn){const ct=Ct.getTerrainData(nt.tileID),Tt={u_matrix:We.transform.calculatePosMatrix(nt.tileID.toUnwrapped()),u_ele_delta:Ct.getMeshFrameDelta(We.transform.zoom)};Dn.draw(Nt,rr.TRIANGLES,Fr,Ml.disabled,Tr,Ko.backCCW,Tt,ct,"terrain",Vr.vertexBuffer,Vr.indexBuffer,Vr.segments)}Nt.bindFramebuffer.set(null),Nt.viewport.set([0,0,We.width,We.height])})(this,this.style.map.terrain),(function(We,Ct){const Nt=We.context,rr=Nt.gl,Tr=xu.unblended,Fr=new Zs(rr.LEQUAL,Zs.ReadWrite,[0,1]),Vr=Ct.getTerrainMesh(),mn=Ct.getCoordsTexture(),Dn=Ct.sourceCache.getRenderableTiles(),nt=We.useProgram("terrainCoords");Nt.bindFramebuffer.set(Ct.getFramebuffer("coords").framebuffer),Nt.viewport.set([0,0,We.width/devicePixelRatio,We.height/devicePixelRatio]),Nt.clear({color:r.aM.transparent,depth:1}),Ct.coordsIndex=[];for(const ct of Dn){const Tt=Ct.getTerrainData(ct.tileID);Nt.activeTexture.set(rr.TEXTURE0),rr.bindTexture(rr.TEXTURE_2D,mn.texture);const Pt={u_matrix:We.transform.calculatePosMatrix(ct.tileID.toUnwrapped()),u_terrain_coords_id:(255-Ct.coordsIndex.length)/255,u_texture:0,u_ele_delta:Ct.getMeshFrameDelta(We.transform.zoom)};nt.draw(Nt,rr.TRIANGLES,Fr,Ml.disabled,Tr,Ko.backCCW,Pt,Tt,"terrain",Vr.vertexBuffer,Vr.indexBuffer,Vr.segments),Ct.coordsIndex.push(ct.tileID.key)}Nt.bindFramebuffer.set(null),Nt.viewport.set([0,0,We.width,We.height])})(this,this.style.map.terrain))}renderLayer(O,fe,Re,Oe){if(!Re.isHidden(this.transform.zoom)&&(Re.type==="background"||Re.type==="custom"||(Oe||[]).length))switch(this.id=Re.id,Re.type){case"symbol":(function(We,Ct,Nt,rr,Tr){if(We.renderPass!=="translucent")return;const Fr=Ml.disabled,Vr=We.colorModeForRenderPass();(Nt._unevaluatedLayout.hasValue("text-variable-anchor")||Nt._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&(function(mn,Dn,nt,ct,Tt,Pt,Gt,zt,Kt){const Cr=Dn.transform,Nr=Ka(),Hr=Tt==="map",sn=Pt==="map";for(const bn of mn){const Vn=ct.getTile(bn),Yn=Vn.getBucket(nt);if(!Yn||!Yn.text||!Yn.text.segments.get().length)continue;const va=r.ag(Yn.textSizeData,Cr.zoom),Va=ga(Vn,1,Dn.transform.zoom),Si=Br(bn.posMatrix,sn,Hr,Dn.transform,Va),yi=nt.layout.get("icon-text-fit")!=="none"&&Yn.hasIconData();if(va){const Mi=Math.pow(2,Cr.zoom-Vn.tileID.overscaledZ),go=Dn.style.map.terrain?(Do,us)=>Dn.style.map.terrain.getElevation(bn,Do,us):null,jo=Nr.translatePosition(Cr,Vn,Gt,zt);Ah(Yn,Hr,sn,Kt,Cr,Si,bn.posMatrix,Mi,va,yi,Nr,jo,bn.toUnwrapped(),go)}}})(rr,We,Nt,Ct,Nt.layout.get("text-rotation-alignment"),Nt.layout.get("text-pitch-alignment"),Nt.paint.get("text-translate"),Nt.paint.get("text-translate-anchor"),Tr),Nt.paint.get("icon-opacity").constantOr(1)!==0&&Ld(We,Ct,Nt,rr,!1,Nt.paint.get("icon-translate"),Nt.paint.get("icon-translate-anchor"),Nt.layout.get("icon-rotation-alignment"),Nt.layout.get("icon-pitch-alignment"),Nt.layout.get("icon-keep-upright"),Fr,Vr),Nt.paint.get("text-opacity").constantOr(1)!==0&&Ld(We,Ct,Nt,rr,!0,Nt.paint.get("text-translate"),Nt.paint.get("text-translate-anchor"),Nt.layout.get("text-rotation-alignment"),Nt.layout.get("text-pitch-alignment"),Nt.layout.get("text-keep-upright"),Fr,Vr),Ct.map.showCollisionBoxes&&(pf(We,Ct,Nt,rr,!0),pf(We,Ct,Nt,rr,!1))})(O,fe,Re,Oe,this.style.placement.variableOffsets);break;case"circle":(function(We,Ct,Nt,rr){if(We.renderPass!=="translucent")return;const Tr=Nt.paint.get("circle-opacity"),Fr=Nt.paint.get("circle-stroke-width"),Vr=Nt.paint.get("circle-stroke-opacity"),mn=!Nt.layout.get("circle-sort-key").isConstant();if(Tr.constantOr(1)===0&&(Fr.constantOr(1)===0||Vr.constantOr(1)===0))return;const Dn=We.context,nt=Dn.gl,ct=We.depthModeForSublayer(0,Zs.ReadOnly),Tt=Ml.disabled,Pt=We.colorModeForRenderPass(),Gt=[];for(let zt=0;zt<rr.length;zt++){const Kt=rr[zt],Cr=Ct.getTile(Kt),Nr=Cr.getBucket(Nt);if(!Nr)continue;const Hr=Nr.programConfigurations.get(Nt.id),sn=We.useProgram("circle",Hr),bn=Nr.layoutVertexBuffer,Vn=Nr.indexBuffer,Yn=We.style.map.terrain&&We.style.map.terrain.getTerrainData(Kt),va={programConfiguration:Hr,program:sn,layoutVertexBuffer:bn,indexBuffer:Vn,uniformValues:ho(We,Kt,Cr,Nt),terrainData:Yn};if(mn){const Va=Nr.segments.get();for(const Si of Va)Gt.push({segments:new r.a0([Si]),sortKey:Si.sortKey,state:va})}else Gt.push({segments:Nr.segments,sortKey:0,state:va})}mn&&Gt.sort((zt,Kt)=>zt.sortKey-Kt.sortKey);for(const zt of Gt){const{programConfiguration:Kt,program:Cr,layoutVertexBuffer:Nr,indexBuffer:Hr,uniformValues:sn,terrainData:bn}=zt.state;Cr.draw(Dn,nt.TRIANGLES,ct,Tt,Pt,Ko.disabled,sn,bn,Nt.id,Nr,Hr,zt.segments,Nt.paint,We.transform.zoom,Kt)}})(O,fe,Re,Oe);break;case"heatmap":(function(We,Ct,Nt,rr){if(Nt.paint.get("heatmap-opacity")===0)return;const Tr=We.context;if(We.style.map.terrain){for(const Fr of rr){const Vr=Ct.getTile(Fr);Ct.hasRenderableParent(Fr)||(We.renderPass==="offscreen"?Sh(We,Vr,Nt,Fr):We.renderPass==="translucent"&&Jf(We,Nt,Fr))}Tr.viewport.set([0,0,We.width,We.height])}else We.renderPass==="offscreen"?(function(Fr,Vr,mn,Dn){const nt=Fr.context,ct=nt.gl,Tt=Ml.disabled,Pt=new xu([ct.ONE,ct.ONE],r.aM.transparent,[!0,!0,!0,!0]);(function(Gt,zt,Kt){const Cr=Gt.gl;Gt.activeTexture.set(Cr.TEXTURE1),Gt.viewport.set([0,0,zt.width/4,zt.height/4]);let Nr=Kt.heatmapFbos.get(r.aU);Nr?(Cr.bindTexture(Cr.TEXTURE_2D,Nr.colorAttachment.get()),Gt.bindFramebuffer.set(Nr.framebuffer)):(Nr=Jh(Gt,zt.width/4,zt.height/4),Kt.heatmapFbos.set(r.aU,Nr))})(nt,Fr,mn),nt.clear({color:r.aM.transparent});for(let Gt=0;Gt<Dn.length;Gt++){const zt=Dn[Gt];if(Vr.hasRenderableParent(zt))continue;const Kt=Vr.getTile(zt),Cr=Kt.getBucket(mn);if(!Cr)continue;const Nr=Cr.programConfigurations.get(mn.id),Hr=Fr.useProgram("heatmap",Nr),{zoom:sn}=Fr.transform;Hr.draw(nt,ct.TRIANGLES,Zs.disabled,Tt,Pt,Ko.disabled,Oi(zt.posMatrix,Kt,sn,mn.paint.get("heatmap-intensity")),null,mn.id,Cr.layoutVertexBuffer,Cr.indexBuffer,Cr.segments,mn.paint,Fr.transform.zoom,Nr)}nt.viewport.set([0,0,Fr.width,Fr.height])})(We,Ct,Nt,rr):We.renderPass==="translucent"&&(function(Fr,Vr){const mn=Fr.context,Dn=mn.gl;mn.setColorMode(Fr.colorModeForRenderPass());const nt=Vr.heatmapFbos.get(r.aU);nt&&(mn.activeTexture.set(Dn.TEXTURE0),Dn.bindTexture(Dn.TEXTURE_2D,nt.colorAttachment.get()),mn.activeTexture.set(Dn.TEXTURE1),Qh(mn,Vr).bind(Dn.LINEAR,Dn.CLAMP_TO_EDGE),Fr.useProgram("heatmapTexture").draw(mn,Dn.TRIANGLES,Zs.disabled,Ml.disabled,Fr.colorModeForRenderPass(),Ko.disabled,ps(Fr,Vr,0,1),null,Vr.id,Fr.viewportBuffer,Fr.quadTriangleIndexBuffer,Fr.viewportSegments,Vr.paint,Fr.transform.zoom))})(We,Nt)})(O,fe,Re,Oe);break;case"line":(function(We,Ct,Nt,rr){if(We.renderPass!=="translucent")return;const Tr=Nt.paint.get("line-opacity"),Fr=Nt.paint.get("line-width");if(Tr.constantOr(1)===0||Fr.constantOr(1)===0)return;const Vr=We.depthModeForSublayer(0,Zs.ReadOnly),mn=We.colorModeForRenderPass(),Dn=Nt.paint.get("line-dasharray"),nt=Nt.paint.get("line-pattern"),ct=nt.constantOr(1),Tt=Nt.paint.get("line-gradient"),Pt=Nt.getCrossfadeParameters(),Gt=ct?"linePattern":Dn?"lineSDF":Tt?"lineGradient":"line",zt=We.context,Kt=zt.gl;let Cr=!0;for(const Nr of rr){const Hr=Ct.getTile(Nr);if(ct&&!Hr.patternsLoaded())continue;const sn=Hr.getBucket(Nt);if(!sn)continue;const bn=sn.programConfigurations.get(Nt.id),Vn=We.context.program.get(),Yn=We.useProgram(Gt,bn),va=Cr||Yn.program!==Vn,Va=We.style.map.terrain&&We.style.map.terrain.getTerrainData(Nr),Si=nt.constantOr(null);if(Si&&Hr.imageAtlas){const go=Hr.imageAtlas,jo=go.patternPositions[Si.to.toString()],Do=go.patternPositions[Si.from.toString()];jo&&Do&&bn.setConstantPatternPositions(jo,Do)}const yi=Va?Nr:null,Mi=ct?hs(We,Hr,Nt,Pt,yi):Dn?ts(We,Hr,Nt,Dn,Pt,yi):Tt?As(We,Hr,Nt,sn.lineClipsArray.length,yi):rl(We,Hr,Nt,yi);if(ct)zt.activeTexture.set(Kt.TEXTURE0),Hr.imageAtlasTexture.bind(Kt.LINEAR,Kt.CLAMP_TO_EDGE),bn.updatePaintBuffers(Pt);else if(Dn&&(va||We.lineAtlas.dirty))zt.activeTexture.set(Kt.TEXTURE0),We.lineAtlas.bind(zt);else if(Tt){const go=sn.gradients[Nt.id];let jo=go.texture;if(Nt.gradientVersion!==go.version){let Do=256;if(Nt.stepInterpolant){const us=Ct.getSource().maxzoom,sl=Nr.canonical.z===us?Math.ceil(1<<We.transform.maxZoom-Nr.canonical.z):1;Do=r.ac(r.aV(sn.maxLineLength/r.X*1024*sl),256,zt.maxTextureSize)}go.gradient=r.aW({expression:Nt.gradientExpression(),evaluationKey:"lineProgress",resolution:Do,image:go.gradient||void 0,clips:sn.lineClipsArray}),go.texture?go.texture.update(go.gradient):go.texture=new f(zt,go.gradient,Kt.RGBA),go.version=Nt.gradientVersion,jo=go.texture}zt.activeTexture.set(Kt.TEXTURE0),jo.bind(Nt.stepInterpolant?Kt.NEAREST:Kt.LINEAR,Kt.CLAMP_TO_EDGE)}Yn.draw(zt,Kt.TRIANGLES,Vr,We.stencilModeForClipping(Nr),mn,Ko.disabled,Mi,Va,Nt.id,sn.layoutVertexBuffer,sn.indexBuffer,sn.segments,Nt.paint,We.transform.zoom,bn,sn.layoutVertexBuffer2),Cr=!1}})(O,fe,Re,Oe);break;case"fill":(function(We,Ct,Nt,rr){const Tr=Nt.paint.get("fill-color"),Fr=Nt.paint.get("fill-opacity");if(Fr.constantOr(1)===0)return;const Vr=We.colorModeForRenderPass(),mn=Nt.paint.get("fill-pattern"),Dn=We.opaquePassEnabledForLayer()&&!mn.constantOr(1)&&Tr.constantOr(r.aM.transparent).a===1&&Fr.constantOr(0)===1?"opaque":"translucent";if(We.renderPass===Dn){const nt=We.depthModeForSublayer(1,We.renderPass==="opaque"?Zs.ReadWrite:Zs.ReadOnly);ld(We,Ct,Nt,rr,nt,Vr,!1)}if(We.renderPass==="translucent"&&Nt.paint.get("fill-antialias")){const nt=We.depthModeForSublayer(Nt.getPaintProperty("fill-outline-color")?2:0,Zs.ReadOnly);ld(We,Ct,Nt,rr,nt,Vr,!0)}})(O,fe,Re,Oe);break;case"fill-extrusion":(function(We,Ct,Nt,rr){const Tr=Nt.paint.get("fill-extrusion-opacity");if(Tr!==0&&We.renderPass==="translucent"){const Fr=new Zs(We.context.gl.LEQUAL,Zs.ReadWrite,We.depthRangeFor3D);if(Tr!==1||Nt.paint.get("fill-extrusion-pattern").constantOr(1))Nf(We,Ct,Nt,rr,Fr,Ml.disabled,xu.disabled),Nf(We,Ct,Nt,rr,Fr,We.stencilModeFor3D(),We.colorModeForRenderPass());else{const Vr=We.colorModeForRenderPass();Nf(We,Ct,Nt,rr,Fr,Ml.disabled,Vr)}}})(O,fe,Re,Oe);break;case"hillshade":(function(We,Ct,Nt,rr){if(We.renderPass!=="offscreen"&&We.renderPass!=="translucent")return;const Tr=We.context,Fr=We.depthModeForSublayer(0,Zs.ReadOnly),Vr=We.colorModeForRenderPass(),[mn,Dn]=We.renderPass==="translucent"?We.stencilConfigForOverlap(rr):[{},rr];for(const nt of Dn){const ct=Ct.getTile(nt);ct.needsHillshadePrepare!==void 0&&ct.needsHillshadePrepare&&We.renderPass==="offscreen"?lc(We,ct,Nt,Fr,Ml.disabled,Vr):We.renderPass==="translucent"&&Af(We,nt,ct,Nt,Fr,mn[nt.overscaledZ],Vr)}Tr.viewport.set([0,0,We.width,We.height])})(O,fe,Re,Oe);break;case"raster":(function(We,Ct,Nt,rr){if(We.renderPass!=="translucent"||Nt.paint.get("raster-opacity")===0||!rr.length)return;const Tr=We.context,Fr=Tr.gl,Vr=Ct.getSource(),mn=We.useProgram("raster"),Dn=We.colorModeForRenderPass(),[nt,ct]=Vr instanceof mt?[{},rr]:We.stencilConfigForOverlap(rr),Tt=ct[ct.length-1].overscaledZ,Pt=!We.options.moving;for(const Gt of ct){const zt=We.depthModeForSublayer(Gt.overscaledZ-Tt,Nt.paint.get("raster-opacity")===1?Zs.ReadWrite:Zs.ReadOnly,Fr.LESS),Kt=Ct.getTile(Gt);Kt.registerFadeDuration(Nt.paint.get("raster-fade-duration"));const Cr=Ct.findLoadedParent(Gt,0),Nr=Ct.findLoadedSibling(Gt),Hr=lh(Kt,Cr||Nr||null,Ct,Nt,We.transform,We.style.map.terrain);let sn,bn;const Vn=Nt.paint.get("raster-resampling")==="nearest"?Fr.NEAREST:Fr.LINEAR;Tr.activeTexture.set(Fr.TEXTURE0),Kt.texture.bind(Vn,Fr.CLAMP_TO_EDGE,Fr.LINEAR_MIPMAP_NEAREST),Tr.activeTexture.set(Fr.TEXTURE1),Cr?(Cr.texture.bind(Vn,Fr.CLAMP_TO_EDGE,Fr.LINEAR_MIPMAP_NEAREST),sn=Math.pow(2,Cr.tileID.overscaledZ-Kt.tileID.overscaledZ),bn=[Kt.tileID.canonical.x*sn%1,Kt.tileID.canonical.y*sn%1]):Kt.texture.bind(Vn,Fr.CLAMP_TO_EDGE,Fr.LINEAR_MIPMAP_NEAREST),Kt.texture.useMipmap&&Tr.extTextureFilterAnisotropic&&We.transform.pitch>20&&Fr.texParameterf(Fr.TEXTURE_2D,Tr.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,Tr.extTextureFilterAnisotropicMax);const Yn=We.style.map.terrain&&We.style.map.terrain.getTerrainData(Gt),va=Yn?Gt:null,Va=va?va.posMatrix:We.transform.calculatePosMatrix(Gt.toUnwrapped(),Pt),Si=_l(Va,bn||[0,0],sn||1,Hr,Nt);Vr instanceof mt?mn.draw(Tr,Fr.TRIANGLES,zt,Ml.disabled,Dn,Ko.disabled,Si,Yn,Nt.id,Vr.boundsBuffer,We.quadTriangleIndexBuffer,Vr.boundsSegments):mn.draw(Tr,Fr.TRIANGLES,zt,nt[Gt.overscaledZ],Dn,Ko.disabled,Si,Yn,Nt.id,We.rasterBoundsBuffer,We.quadTriangleIndexBuffer,We.rasterBoundsSegments)}})(O,fe,Re,Oe);break;case"background":(function(We,Ct,Nt,rr){const Tr=Nt.paint.get("background-color"),Fr=Nt.paint.get("background-opacity");if(Fr===0)return;const Vr=We.context,mn=Vr.gl,Dn=We.transform,nt=Dn.tileSize,ct=Nt.paint.get("background-pattern");if(We.isPatternMissing(ct))return;const Tt=!ct&&Tr.a===1&&Fr===1&&We.opaquePassEnabledForLayer()?"opaque":"translucent";if(We.renderPass!==Tt)return;const Pt=Ml.disabled,Gt=We.depthModeForSublayer(0,Tt==="opaque"?Zs.ReadWrite:Zs.ReadOnly),zt=We.colorModeForRenderPass(),Kt=We.useProgram(ct?"backgroundPattern":"background"),Cr=rr||Dn.coveringTiles({tileSize:nt,terrain:We.style.map.terrain});ct&&(Vr.activeTexture.set(mn.TEXTURE0),We.imageManager.bind(We.context));const Nr=Nt.getCrossfadeParameters();for(const Hr of Cr){const sn=rr?Hr.posMatrix:We.transform.calculatePosMatrix(Hr.toUnwrapped()),bn=ct?Ul(sn,Fr,We,ct,{tileID:Hr,tileSize:nt},Nr):xl(sn,Fr,Tr),Vn=We.style.map.terrain&&We.style.map.terrain.getTerrainData(Hr);Kt.draw(Vr,mn.TRIANGLES,Gt,Pt,zt,Ko.disabled,bn,Vn,Nt.id,We.tileExtentBuffer,We.quadTriangleIndexBuffer,We.tileExtentSegments)}})(O,0,Re,Oe);break;case"custom":(function(We,Ct,Nt){const rr=We.context,Tr=Nt.implementation;if(We.renderPass==="offscreen"){const Fr=Tr.prerender;Fr&&(We.setCustomLayerDefaults(),rr.setColorMode(We.colorModeForRenderPass()),Fr.call(Tr,rr.gl,We.transform.customLayerMatrix()),rr.setDirty(),We.setBaseState())}else if(We.renderPass==="translucent"){We.setCustomLayerDefaults(),rr.setColorMode(We.colorModeForRenderPass()),rr.setStencilMode(Ml.disabled);const Fr=Tr.renderingMode==="3d"?new Zs(We.context.gl.LEQUAL,Zs.ReadWrite,We.depthRangeFor3D):We.depthModeForSublayer(0,Zs.ReadOnly);rr.setDepthMode(Fr),Tr.render(rr.gl,We.transform.customLayerMatrix(),{farZ:We.transform.farZ,nearZ:We.transform.nearZ,fov:We.transform._fov,modelViewProjectionMatrix:We.transform.modelViewProjectionMatrix,projectionMatrix:We.transform.projectionMatrix}),rr.setDirty(),We.setBaseState(),rr.bindFramebuffer.set(null)}})(O,0,Re)}}translatePosMatrix(O,fe,Re,Oe,We){if(!Re[0]&&!Re[1])return O;const Ct=We?Oe==="map"?this.transform.angle:0:Oe==="viewport"?-this.transform.angle:0;if(Ct){const Tr=Math.sin(Ct),Fr=Math.cos(Ct);Re=[Re[0]*Fr-Re[1]*Tr,Re[0]*Tr+Re[1]*Fr]}const Nt=[We?Re[0]:ga(fe,Re[0],this.transform.zoom),We?Re[1]:ga(fe,Re[1],this.transform.zoom),0],rr=new Float32Array(16);return r.J(rr,O,Nt),rr}saveTileTexture(O){const fe=this._tileTextures[O.size[0]];fe?fe.push(O):this._tileTextures[O.size[0]]=[O]}getTileTexture(O){const fe=this._tileTextures[O];return fe&&fe.length>0?fe.pop():null}isPatternMissing(O){if(!O)return!1;if(!O.from||!O.to)return!0;const fe=this.imageManager.getPattern(O.from.toString()),Re=this.imageManager.getPattern(O.to.toString());return!fe||!Re}useProgram(O,fe){this.cache=this.cache||{};const Re=O+(fe?fe.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[Re]||(this.cache[Re]=new Zn(this.context,dn[O],fe,Hl[O],this._showOverdrawInspector,this.style.map.terrain)),this.cache[Re]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){const O=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(O.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new f(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){const{drawingBufferWidth:O,drawingBufferHeight:fe}=this.context.gl;return this.width!==O||this.height!==fe}}class cu{constructor(O,fe){this.points=O,this.planes=fe}static fromInvProjectionMatrix(O,fe,Re){const Oe=Math.pow(2,Re),We=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(Nt=>{const rr=1/(Nt=r.af([],Nt,O))[3]/fe*Oe;return r.b1(Nt,Nt,[rr,rr,1/Nt[3],rr])}),Ct=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(Nt=>{const rr=(function(mn,Dn){var nt=Dn[0],ct=Dn[1],Tt=Dn[2],Pt=nt*nt+ct*ct+Tt*Tt;return Pt>0&&(Pt=1/Math.sqrt(Pt)),mn[0]=Dn[0]*Pt,mn[1]=Dn[1]*Pt,mn[2]=Dn[2]*Pt,mn})([],(function(mn,Dn,nt){var ct=Dn[0],Tt=Dn[1],Pt=Dn[2],Gt=nt[0],zt=nt[1],Kt=nt[2];return mn[0]=Tt*Kt-Pt*zt,mn[1]=Pt*Gt-ct*Kt,mn[2]=ct*zt-Tt*Gt,mn})([],k([],We[Nt[0]],We[Nt[1]]),k([],We[Nt[2]],We[Nt[1]]))),Tr=-((Fr=rr)[0]*(Vr=We[Nt[1]])[0]+Fr[1]*Vr[1]+Fr[2]*Vr[2]);var Fr,Vr;return rr.concat(Tr)});return new cu(We,Ct)}}class Ff{constructor(O,fe){this.min=O,this.max=fe,this.center=(function(Re,Oe,We){return Re[0]=.5*Oe[0],Re[1]=.5*Oe[1],Re[2]=.5*Oe[2],Re})([],(function(Re,Oe,We){return Re[0]=Oe[0]+We[0],Re[1]=Oe[1]+We[1],Re[2]=Oe[2]+We[2],Re})([],this.min,this.max))}quadrant(O){const fe=[O%2==0,O<2],Re=T(this.min),Oe=T(this.max);for(let We=0;We<fe.length;We++)Re[We]=fe[We]?this.min[We]:this.center[We],Oe[We]=fe[We]?this.center[We]:this.max[We];return Oe[2]=this.max[2],new Ff(Re,Oe)}distanceX(O){return Math.max(Math.min(this.max[0],O[0]),this.min[0])-O[0]}distanceY(O){return Math.max(Math.min(this.max[1],O[1]),this.min[1])-O[1]}intersects(O){const fe=[[this.min[0],this.min[1],this.min[2],1],[this.max[0],this.min[1],this.min[2],1],[this.max[0],this.max[1],this.min[2],1],[this.min[0],this.max[1],this.min[2],1],[this.min[0],this.min[1],this.max[2],1],[this.max[0],this.min[1],this.max[2],1],[this.max[0],this.max[1],this.max[2],1],[this.min[0],this.max[1],this.max[2],1]];let Re=!0;for(let Oe=0;Oe<O.planes.length;Oe++){const We=O.planes[Oe];let Ct=0;for(let Nt=0;Nt<fe.length;Nt++)r.b2(We,fe[Nt])>=0&&Ct++;if(Ct===0)return 0;Ct!==fe.length&&(Re=!1)}if(Re)return 2;for(let Oe=0;Oe<3;Oe++){let We=Number.MAX_VALUE,Ct=-Number.MAX_VALUE;for(let Nt=0;Nt<O.points.length;Nt++){const rr=O.points[Nt][Oe]-this.min[Oe];We=Math.min(We,rr),Ct=Math.max(Ct,rr)}if(Ct<0||We>this.max[Oe]-this.min[Oe])return 0}return 1}}class Sc{constructor(O=0,fe=0,Re=0,Oe=0){if(isNaN(O)||O<0||isNaN(fe)||fe<0||isNaN(Re)||Re<0||isNaN(Oe)||Oe<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=O,this.bottom=fe,this.left=Re,this.right=Oe}interpolate(O,fe,Re){return fe.top!=null&&O.top!=null&&(this.top=r.y.number(O.top,fe.top,Re)),fe.bottom!=null&&O.bottom!=null&&(this.bottom=r.y.number(O.bottom,fe.bottom,Re)),fe.left!=null&&O.left!=null&&(this.left=r.y.number(O.left,fe.left,Re)),fe.right!=null&&O.right!=null&&(this.right=r.y.number(O.right,fe.right,Re)),this}getCenter(O,fe){const Re=r.ac((this.left+O-this.right)/2,0,O),Oe=r.ac((this.top+fe-this.bottom)/2,0,fe);return new r.P(Re,Oe)}equals(O){return this.top===O.top&&this.bottom===O.bottom&&this.left===O.left&&this.right===O.right}clone(){return new Sc(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}const Xc=85.051129;class bu{constructor(O,fe,Re,Oe,We){this.tileSize=512,this._renderWorldCopies=We===void 0||!!We,this._minZoom=O||0,this._maxZoom=fe||22,this._minPitch=Re??0,this._maxPitch=Oe??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new r.N(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new Sc,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={},this.minElevationForCurrentTile=0}clone(){const O=new bu(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return O.apply(this),O}apply(O){this.tileSize=O.tileSize,this.latRange=O.latRange,this.lngRange=O.lngRange,this.width=O.width,this.height=O.height,this._center=O._center,this._elevation=O._elevation,this.minElevationForCurrentTile=O.minElevationForCurrentTile,this.zoom=O.zoom,this.angle=O.angle,this._fov=O._fov,this._pitch=O._pitch,this._unmodified=O._unmodified,this._edgeInsets=O._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(O){this._minZoom!==O&&(this._minZoom=O,this.zoom=Math.max(this.zoom,O))}get maxZoom(){return this._maxZoom}set maxZoom(O){this._maxZoom!==O&&(this._maxZoom=O,this.zoom=Math.min(this.zoom,O))}get minPitch(){return this._minPitch}set minPitch(O){this._minPitch!==O&&(this._minPitch=O,this.pitch=Math.max(this.pitch,O))}get maxPitch(){return this._maxPitch}set maxPitch(O){this._maxPitch!==O&&(this._maxPitch=O,this.pitch=Math.min(this.pitch,O))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(O){O===void 0?O=!0:O===null&&(O=!1),this._renderWorldCopies=O}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new r.P(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(O){const fe=-r.b3(O,-180,180)*Math.PI/180;this.angle!==fe&&(this._unmodified=!1,this.angle=fe,this._calcMatrices(),this.rotationMatrix=(function(){var Re=new r.A(4);return r.A!=Float32Array&&(Re[1]=0,Re[2]=0),Re[0]=1,Re[3]=1,Re})(),(function(Re,Oe,We){var Ct=Oe[0],Nt=Oe[1],rr=Oe[2],Tr=Oe[3],Fr=Math.sin(We),Vr=Math.cos(We);Re[0]=Ct*Vr+rr*Fr,Re[1]=Nt*Vr+Tr*Fr,Re[2]=Ct*-Fr+rr*Vr,Re[3]=Nt*-Fr+Tr*Vr})(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(O){const fe=r.ac(O,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==fe&&(this._unmodified=!1,this._pitch=fe,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(O){O=Math.max(.01,Math.min(60,O)),this._fov!==O&&(this._unmodified=!1,this._fov=O/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(O){const fe=Math.min(Math.max(O,this.minZoom),this.maxZoom);this._zoom!==fe&&(this._unmodified=!1,this._zoom=fe,this.tileZoom=Math.max(0,Math.floor(fe)),this.scale=this.zoomScale(fe),this._constrain(),this._calcMatrices())}get center(){return this._center}set center(O){O.lat===this._center.lat&&O.lng===this._center.lng||(this._unmodified=!1,this._center=O,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(O){O!==this._elevation&&(this._elevation=O,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(O){this._edgeInsets.equals(O)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,O,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(O){return this._edgeInsets.equals(O)}interpolatePadding(O,fe,Re){this._unmodified=!1,this._edgeInsets.interpolate(O,fe,Re),this._constrain(),this._calcMatrices()}coveringZoomLevel(O){const fe=(O.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/O.tileSize));return Math.max(0,fe)}getVisibleUnwrappedCoordinates(O){const fe=[new r.b4(0,O)];if(this._renderWorldCopies){const Re=this.pointCoordinate(new r.P(0,0)),Oe=this.pointCoordinate(new r.P(this.width,0)),We=this.pointCoordinate(new r.P(this.width,this.height)),Ct=this.pointCoordinate(new r.P(0,this.height)),Nt=Math.floor(Math.min(Re.x,Oe.x,We.x,Ct.x)),rr=Math.floor(Math.max(Re.x,Oe.x,We.x,Ct.x)),Tr=1;for(let Fr=Nt-Tr;Fr<=rr+Tr;Fr++)Fr!==0&&fe.push(new r.b4(Fr,O))}return fe}coveringTiles(O){var fe,Re;let Oe=this.coveringZoomLevel(O);const We=Oe;if(O.minzoom!==void 0&&Oe<O.minzoom)return[];O.maxzoom!==void 0&&Oe>O.maxzoom&&(Oe=O.maxzoom);const Ct=this.pointCoordinate(this.getCameraPoint()),Nt=r.Z.fromLngLat(this.center),rr=Math.pow(2,Oe),Tr=[rr*Ct.x,rr*Ct.y,0],Fr=[rr*Nt.x,rr*Nt.y,0],Vr=cu.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,Oe);let mn=O.minzoom||0;!O.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(mn=Oe);const Dn=O.terrain?2/Math.min(this.tileSize,O.tileSize)*this.tileSize:3,nt=zt=>({aabb:new Ff([zt*rr,0,0],[(zt+1)*rr,rr,0]),zoom:0,x:0,y:0,wrap:zt,fullyVisible:!1}),ct=[],Tt=[],Pt=Oe,Gt=O.reparseOverscaled?We:Oe;if(this._renderWorldCopies)for(let zt=1;zt<=3;zt++)ct.push(nt(-zt)),ct.push(nt(zt));for(ct.push(nt(0));ct.length>0;){const zt=ct.pop(),Kt=zt.x,Cr=zt.y;let Nr=zt.fullyVisible;if(!Nr){const Yn=zt.aabb.intersects(Vr);if(Yn===0)continue;Nr=Yn===2}const Hr=O.terrain?Tr:Fr,sn=zt.aabb.distanceX(Hr),bn=zt.aabb.distanceY(Hr),Vn=Math.max(Math.abs(sn),Math.abs(bn));if(zt.zoom===Pt||Vn>Dn+(1<<Pt-zt.zoom)-2&&zt.zoom>=mn){const Yn=Pt-zt.zoom,va=Tr[0]-.5-(Kt<<Yn),Va=Tr[1]-.5-(Cr<<Yn);Tt.push({tileID:new r.S(zt.zoom===Pt?Gt:zt.zoom,zt.wrap,zt.zoom,Kt,Cr),distanceSq:b([Fr[0]-.5-Kt,Fr[1]-.5-Cr]),tileDistanceToCamera:Math.sqrt(va*va+Va*Va)})}else for(let Yn=0;Yn<4;Yn++){const va=(Kt<<1)+Yn%2,Va=(Cr<<1)+(Yn>>1),Si=zt.zoom+1;let yi=zt.aabb.quadrant(Yn);if(O.terrain){const Mi=new r.S(Si,zt.wrap,Si,va,Va),go=O.terrain.getMinMaxElevation(Mi),jo=(fe=go.minElevation)!==null&&fe!==void 0?fe:this.elevation,Do=(Re=go.maxElevation)!==null&&Re!==void 0?Re:this.elevation;yi=new Ff([yi.min[0],yi.min[1],jo],[yi.max[0],yi.max[1],Do])}ct.push({aabb:yi,zoom:Si,x:va,y:Va,wrap:zt.wrap,fullyVisible:Nr})}}return Tt.sort((zt,Kt)=>zt.distanceSq-Kt.distanceSq).map(zt=>zt.tileID)}resize(O,fe){this.width=O,this.height=fe,this.pixelsToGLUnits=[2/O,-2/fe],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(O){return Math.pow(2,O)}scaleZoom(O){return Math.log(O)/Math.LN2}project(O){const fe=r.ac(O.lat,-85.051129,Xc);return new r.P(r.O(O.lng)*this.worldSize,r.Q(fe)*this.worldSize)}unproject(O){return new r.Z(O.x/this.worldSize,O.y/this.worldSize).toLngLat()}get point(){return this.project(this.center)}getCameraPosition(){return{lngLat:this.pointLocation(this.getCameraPoint()),altitude:Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter+this.elevation}}recalculateZoom(O){const fe=this.elevation,Re=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,Oe=this.pointLocation(this.centerPoint,O),We=O.getElevationForLngLatZoom(Oe,this.tileZoom);if(!(this.elevation-We))return;const Ct=Re+fe-We,Nt=Math.cos(this._pitch)*this.cameraToCenterDistance/Ct/r.b5(1,Oe.lat),rr=this.scaleZoom(Nt/this.tileSize);this._elevation=We,this._center=Oe,this.zoom=rr}setLocationAtPoint(O,fe){const Re=this.pointCoordinate(fe),Oe=this.pointCoordinate(this.centerPoint),We=this.locationCoordinate(O),Ct=new r.Z(We.x-(Re.x-Oe.x),We.y-(Re.y-Oe.y));this.center=this.coordinateLocation(Ct),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(O,fe){return fe?this.coordinatePoint(this.locationCoordinate(O),fe.getElevationForLngLatZoom(O,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(O))}pointLocation(O,fe){return this.coordinateLocation(this.pointCoordinate(O,fe))}locationCoordinate(O){return r.Z.fromLngLat(O)}coordinateLocation(O){return O&&O.toLngLat()}pointCoordinate(O,fe){if(fe){const mn=fe.pointCoordinate(O);if(mn!=null)return mn}const Re=[O.x,O.y,0,1],Oe=[O.x,O.y,1,1];r.af(Re,Re,this.pixelMatrixInverse),r.af(Oe,Oe,this.pixelMatrixInverse);const We=Re[3],Ct=Oe[3],Nt=Re[1]/We,rr=Oe[1]/Ct,Tr=Re[2]/We,Fr=Oe[2]/Ct,Vr=Tr===Fr?0:(0-Tr)/(Fr-Tr);return new r.Z(r.y.number(Re[0]/We,Oe[0]/Ct,Vr)/this.worldSize,r.y.number(Nt,rr,Vr)/this.worldSize)}coordinatePoint(O,fe=0,Re=this.pixelMatrix){const Oe=[O.x*this.worldSize,O.y*this.worldSize,fe,1];return r.af(Oe,Oe,Re),new r.P(Oe[0]/Oe[3],Oe[1]/Oe[3])}getBounds(){const O=Math.max(0,this.height/2-this.getHorizon());return new ue().extend(this.pointLocation(new r.P(0,O))).extend(this.pointLocation(new r.P(this.width,O))).extend(this.pointLocation(new r.P(this.width,this.height))).extend(this.pointLocation(new r.P(0,this.height)))}getMaxBounds(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new ue([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null}getHorizon(){return Math.tan(Math.PI/2-this._pitch)*this.cameraToCenterDistance*.85}setMaxBounds(O){O?(this.lngRange=[O.getWest(),O.getEast()],this.latRange=[O.getSouth(),O.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-85.051129,Xc])}calculateTileMatrix(O){const fe=O.canonical,Re=this.worldSize/this.zoomScale(fe.z),Oe=fe.x+Math.pow(2,fe.z)*O.wrap,We=r.an(new Float64Array(16));return r.J(We,We,[Oe*Re,fe.y*Re,0]),r.K(We,We,[Re/r.X,Re/r.X,1]),We}calculatePosMatrix(O,fe=!1){const Re=O.key,Oe=fe?this._alignedPosMatrixCache:this._posMatrixCache;if(Oe[Re])return Oe[Re];const We=this.calculateTileMatrix(O);return r.L(We,fe?this.alignedModelViewProjectionMatrix:this.modelViewProjectionMatrix,We),Oe[Re]=new Float32Array(We),Oe[Re]}calculateFogMatrix(O){const fe=O.key,Re=this._fogMatrixCache;if(Re[fe])return Re[fe];const Oe=this.calculateTileMatrix(O);return r.L(Oe,this.fogMatrix,Oe),Re[fe]=new Float32Array(Oe),Re[fe]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(O,fe){fe=r.ac(+fe,this.minZoom,this.maxZoom);const Re={center:new r.N(O.lng,O.lat),zoom:fe};let Oe=this.lngRange;if(!this._renderWorldCopies&&Oe===null){const zt=179.9999999999;Oe=[-zt,zt]}const We=this.tileSize*this.zoomScale(Re.zoom);let Ct=0,Nt=We,rr=0,Tr=We,Fr=0,Vr=0;const{x:mn,y:Dn}=this.size;if(this.latRange){const zt=this.latRange;Ct=r.Q(zt[1])*We,Nt=r.Q(zt[0])*We,Nt-Ct<Dn&&(Fr=Dn/(Nt-Ct))}Oe&&(rr=r.b3(r.O(Oe[0])*We,0,We),Tr=r.b3(r.O(Oe[1])*We,0,We),Tr<rr&&(Tr+=We),Tr-rr<mn&&(Vr=mn/(Tr-rr)));const{x:nt,y:ct}=this.project.call({worldSize:We},O);let Tt,Pt;const Gt=Math.max(Vr||0,Fr||0);if(Gt){const zt=new r.P(Vr?(Tr+rr)/2:nt,Fr?(Nt+Ct)/2:ct);return Re.center=this.unproject.call({worldSize:We},zt).wrap(),Re.zoom+=this.scaleZoom(Gt),Re}if(this.latRange){const zt=Dn/2;ct-zt<Ct&&(Pt=Ct+zt),ct+zt>Nt&&(Pt=Nt-zt)}if(Oe){const zt=(rr+Tr)/2;let Kt=nt;this._renderWorldCopies&&(Kt=r.b3(nt,zt-We/2,zt+We/2));const Cr=mn/2;Kt-Cr<rr&&(Tt=rr+Cr),Kt+Cr>Tr&&(Tt=Tr-Cr)}if(Tt!==void 0||Pt!==void 0){const zt=new r.P(Tt??nt,Pt??ct);Re.center=this.unproject.call({worldSize:We},zt).wrap()}return Re}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;const O=this._unmodified,{center:fe,zoom:Re}=this.getConstrained(this.center,this.zoom);this.center=fe,this.zoom=Re,this._unmodified=O,this._constraining=!1}_calcMatrices(){if(!this.height)return;const O=this.centerOffset,fe=this.point.x,Re=this.point.y;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height,this._pixelPerMeter=r.b5(1,this.center.lat)*this.worldSize;let Oe=r.an(new Float64Array(16));r.K(Oe,Oe,[this.width/2,-this.height/2,1]),r.J(Oe,Oe,[1,-1,0]),this.labelPlaneMatrix=Oe,Oe=r.an(new Float64Array(16)),r.K(Oe,Oe,[1,-1,1]),r.J(Oe,Oe,[-1,-1,0]),r.K(Oe,Oe,[2/this.width,2/this.height,1]),this.glCoordMatrix=Oe;const We=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),Ct=Math.min(this.elevation,this.minElevationForCurrentTile),Nt=We-Ct*this._pixelPerMeter/Math.cos(this._pitch),rr=Ct<0?Nt:We,Tr=Math.PI/2+this._pitch,Fr=this._fov*(.5+O.y/this.height),Vr=Math.sin(Fr)*rr/Math.sin(r.ac(Math.PI-Tr-Fr,.01,Math.PI-.01)),mn=this.getHorizon(),Dn=2*Math.atan(mn/this.cameraToCenterDistance)*(.5+O.y/(2*mn)),nt=Math.sin(Dn)*rr/Math.sin(r.ac(Math.PI-Tr-Dn,.01,Math.PI-.01)),ct=Math.min(Vr,nt);this.farZ=1.01*(Math.cos(Math.PI/2-this._pitch)*ct+rr),this.nearZ=this.height/50,Oe=new Float64Array(16),r.b6(Oe,this._fov,this.width/this.height,this.nearZ,this.farZ),Oe[8]=2*-O.x/this.width,Oe[9]=2*O.y/this.height,this.projectionMatrix=r.ae(Oe),r.K(Oe,Oe,[1,-1,1]),r.J(Oe,Oe,[0,0,-this.cameraToCenterDistance]),r.b7(Oe,Oe,this._pitch),r.ad(Oe,Oe,this.angle),r.J(Oe,Oe,[-fe,-Re,0]),this.mercatorMatrix=r.K([],Oe,[this.worldSize,this.worldSize,this.worldSize]),r.K(Oe,Oe,[1,1,this._pixelPerMeter]),this.pixelMatrix=r.L(new Float64Array(16),this.labelPlaneMatrix,Oe),r.J(Oe,Oe,[0,0,-this.elevation]),this.modelViewProjectionMatrix=Oe,this.invModelViewProjectionMatrix=r.as([],Oe),this.fogMatrix=new Float64Array(16),r.b6(this.fogMatrix,this._fov,this.width/this.height,We,this.farZ),this.fogMatrix[8]=2*-O.x/this.width,this.fogMatrix[9]=2*O.y/this.height,r.K(this.fogMatrix,this.fogMatrix,[1,-1,1]),r.J(this.fogMatrix,this.fogMatrix,[0,0,-this.cameraToCenterDistance]),r.b7(this.fogMatrix,this.fogMatrix,this._pitch),r.ad(this.fogMatrix,this.fogMatrix,this.angle),r.J(this.fogMatrix,this.fogMatrix,[-fe,-Re,0]),r.K(this.fogMatrix,this.fogMatrix,[1,1,this._pixelPerMeter]),r.J(this.fogMatrix,this.fogMatrix,[0,0,-this.elevation]),this.pixelMatrix3D=r.L(new Float64Array(16),this.labelPlaneMatrix,Oe);const Tt=this.width%2/2,Pt=this.height%2/2,Gt=Math.cos(this.angle),zt=Math.sin(this.angle),Kt=fe-Math.round(fe)+Gt*Tt+zt*Pt,Cr=Re-Math.round(Re)+Gt*Pt+zt*Tt,Nr=new Float64Array(Oe);if(r.J(Nr,Nr,[Kt>.5?Kt-1:Kt,Cr>.5?Cr-1:Cr,0]),this.alignedModelViewProjectionMatrix=Nr,Oe=r.as(new Float64Array(16),this.pixelMatrix),!Oe)throw new Error("failed to invert matrix");this.pixelMatrixInverse=Oe,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;const O=this.pointCoordinate(new r.P(0,0)),fe=[O.x*this.worldSize,O.y*this.worldSize,0,1];return r.af(fe,fe,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){const O=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new r.P(0,O))}getCameraQueryGeometry(O){const fe=this.getCameraPoint();if(O.length===1)return[O[0],fe];{let Re=fe.x,Oe=fe.y,We=fe.x,Ct=fe.y;for(const Nt of O)Re=Math.min(Re,Nt.x),Oe=Math.min(Oe,Nt.y),We=Math.max(We,Nt.x),Ct=Math.max(Ct,Nt.y);return[new r.P(Re,Oe),new r.P(We,Oe),new r.P(We,Ct),new r.P(Re,Ct),new r.P(Re,Oe)]}}lngLatToCameraDepth(O,fe){const Re=this.locationCoordinate(O),Oe=[Re.x*this.worldSize,Re.y*this.worldSize,fe,1];return r.af(Oe,Oe,this.modelViewProjectionMatrix),Oe[2]/Oe[3]}}function mh(Ze,O){let fe,Re=!1,Oe=null,We=null;const Ct=()=>{Oe=null,Re&&(Ze.apply(We,fe),Oe=setTimeout(Ct,O),Re=!1)};return(...Nt)=>(Re=!0,We=this,fe=Nt,Oe||Ct(),Oe)}class Sf{constructor(O){this._getCurrentHash=()=>{const fe=window.location.hash.replace("#","");if(this._hashName){let Re;return fe.split("&").map(Oe=>Oe.split("=")).forEach(Oe=>{Oe[0]===this._hashName&&(Re=Oe)}),(Re&&Re[1]||"").split("/")}return fe.split("/")},this._onHashChange=()=>{const fe=this._getCurrentHash();if(fe.length>=3&&!fe.some(Re=>isNaN(Re))){const Re=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(fe[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+fe[2],+fe[1]],zoom:+fe[0],bearing:Re,pitch:+(fe[4]||0)}),!0}return!1},this._updateHashUnthrottled=()=>{const fe=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,fe)},this._removeHash=()=>{const fe=this._getCurrentHash();if(fe.length===0)return;const Re=fe.join("/");let Oe=Re;Oe.split("&").length>0&&(Oe=Oe.split("&")[0]),this._hashName&&(Oe=`${this._hashName}=${Re}`);let We=window.location.hash.replace(Oe,"");We.startsWith("#&")?We=We.slice(0,1)+We.slice(2):We==="#"&&(We="");let Ct=window.location.href.replace(/(#.+)?$/,We);Ct=Ct.replace("&&","&"),window.history.replaceState(window.history.state,null,Ct)},this._updateHash=mh(this._updateHashUnthrottled,300),this._hashName=O&&encodeURIComponent(O)}addTo(O){return this._map=O,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),this._removeHash(),delete this._map,this}getHashString(O){const fe=this._map.getCenter(),Re=Math.round(100*this._map.getZoom())/100,Oe=Math.ceil((Re*Math.LN2+Math.log(512/360/.5))/Math.LN10),We=Math.pow(10,Oe),Ct=Math.round(fe.lng*We)/We,Nt=Math.round(fe.lat*We)/We,rr=this._map.getBearing(),Tr=this._map.getPitch();let Fr="";if(Fr+=O?`/${Ct}/${Nt}/${Re}`:`${Re}/${Nt}/${Ct}`,(rr||Tr)&&(Fr+="/"+Math.round(10*rr)/10),Tr&&(Fr+=`/${Math.round(Tr)}`),this._hashName){const Vr=this._hashName;let mn=!1;const Dn=window.location.hash.slice(1).split("&").map(nt=>{const ct=nt.split("=")[0];return ct===Vr?(mn=!0,`${ct}=${Fr}`):nt}).filter(nt=>nt);return mn||Dn.push(`${Vr}=${Fr}`),`#${Dn.join("&")}`}return`#${Fr}`}}const eh={linearity:.3,easing:r.b8(0,0,.3,1)},Fh=r.e({deceleration:2500,maxSpeed:1400},eh),Zd=r.e({deceleration:20,maxSpeed:1400},eh),Sv=r.e({deceleration:1e3,maxSpeed:360},eh),gh=r.e({deceleration:1e3,maxSpeed:90},eh);class Bh{constructor(O){this._map=O,this.clear()}clear(){this._inertiaBuffer=[]}record(O){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:s.now(),settings:O})}_drainInertiaBuffer(){const O=this._inertiaBuffer,fe=s.now();for(;O.length>0&&fe-O[0].time>160;)O.shift()}_onMoveEnd(O){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const fe={zoom:0,bearing:0,pitch:0,pan:new r.P(0,0),pinchAround:void 0,around:void 0};for(const{settings:We}of this._inertiaBuffer)fe.zoom+=We.zoomDelta||0,fe.bearing+=We.bearingDelta||0,fe.pitch+=We.pitchDelta||0,We.panDelta&&fe.pan._add(We.panDelta),We.around&&(fe.around=We.around),We.pinchAround&&(fe.pinchAround=We.pinchAround);const Re=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,Oe={};if(fe.pan.mag()){const We=jh(fe.pan.mag(),Re,r.e({},Fh,O||{}));Oe.offset=fe.pan.mult(We.amount/fe.pan.mag()),Oe.center=this._map.transform.center,nf(Oe,We)}if(fe.zoom){const We=jh(fe.zoom,Re,Zd);Oe.zoom=this._map.transform.zoom+We.amount,nf(Oe,We)}if(fe.bearing){const We=jh(fe.bearing,Re,Sv);Oe.bearing=this._map.transform.bearing+r.ac(We.amount,-179,179),nf(Oe,We)}if(fe.pitch){const We=jh(fe.pitch,Re,gh);Oe.pitch=this._map.transform.pitch+We.amount,nf(Oe,We)}if(Oe.zoom||Oe.bearing){const We=fe.pinchAround===void 0?fe.around:fe.pinchAround;Oe.around=We?this._map.unproject(We):this._map.getCenter()}return this.clear(),r.e(Oe,{noMoveStart:!0})}}function nf(Ze,O){(!Ze.duration||Ze.duration<O.duration)&&(Ze.duration=O.duration,Ze.easing=O.easing)}function jh(Ze,O,fe){const{maxSpeed:Re,linearity:Oe,deceleration:We}=fe,Ct=r.ac(Ze*Oe/(O/1e3),-Re,Re),Nt=Math.abs(Ct)/(We*Oe);return{easing:fe.easing,duration:1e3*Nt,amount:Ct*(Nt/2)}}class gc extends r.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(O,fe,Re,Oe={}){const We=o.mousePos(fe.getCanvas(),Re),Ct=fe.unproject(We);super(O,r.e({point:We,lngLat:Ct,originalEvent:Re},Oe)),this._defaultPrevented=!1,this.target=fe}}class yh extends r.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(O,fe,Re){const Oe=O==="touchend"?Re.changedTouches:Re.touches,We=o.touchPos(fe.getCanvasContainer(),Oe),Ct=We.map(rr=>fe.unproject(rr)),Nt=We.reduce((rr,Tr,Fr,Vr)=>rr.add(Tr.div(Vr.length)),new r.P(0,0));super(O,{points:We,point:Nt,lngLats:Ct,lngLat:fe.unproject(Nt),originalEvent:Re}),this._defaultPrevented=!1}}class hd extends r.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(O,fe,Re){super(O,{originalEvent:Re}),this._defaultPrevented=!1}}class _h{constructor(O,fe){this._map=O,this._clickTolerance=fe.clickTolerance}reset(){delete this._mousedownPos}wheel(O){return this._firePreventable(new hd(O.type,this._map,O))}mousedown(O,fe){return this._mousedownPos=fe,this._firePreventable(new gc(O.type,this._map,O))}mouseup(O){this._map.fire(new gc(O.type,this._map,O))}click(O,fe){this._mousedownPos&&this._mousedownPos.dist(fe)>=this._clickTolerance||this._map.fire(new gc(O.type,this._map,O))}dblclick(O){return this._firePreventable(new gc(O.type,this._map,O))}mouseover(O){this._map.fire(new gc(O.type,this._map,O))}mouseout(O){this._map.fire(new gc(O.type,this._map,O))}touchstart(O){return this._firePreventable(new yh(O.type,this._map,O))}touchmove(O){this._map.fire(new yh(O.type,this._map,O))}touchend(O){this._map.fire(new yh(O.type,this._map,O))}touchcancel(O){this._map.fire(new yh(O.type,this._map,O))}_firePreventable(O){if(this._map.fire(O),O.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class du{constructor(O){this._map=O}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(O){this._map.fire(new gc(O.type,this._map,O))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new gc("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(O){this._delayContextMenu?this._contextMenuEvent=O:this._ignoreContextMenu||this._map.fire(new gc(O.type,this._map,O)),this._map.listens("contextmenu")&&O.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Wc{constructor(O){this._map=O}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(O){return this.transform.pointLocation(r.P.convert(O),this._map.terrain)}}class gf{constructor(O,fe){this._map=O,this._tr=new Wc(O),this._el=O.getCanvasContainer(),this._container=O.getContainer(),this._clickTolerance=fe.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(O,fe){this.isEnabled()&&O.shiftKey&&O.button===0&&(o.disableDrag(),this._startPos=this._lastPos=fe,this._active=!0)}mousemoveWindow(O,fe){if(!this._active)return;const Re=fe;if(this._lastPos.equals(Re)||!this._box&&Re.dist(this._startPos)<this._clickTolerance)return;const Oe=this._startPos;this._lastPos=Re,this._box||(this._box=o.create("div","maplibregl-boxzoom",this._container),this._container.classList.add("maplibregl-crosshair"),this._fireEvent("boxzoomstart",O));const We=Math.min(Oe.x,Re.x),Ct=Math.max(Oe.x,Re.x),Nt=Math.min(Oe.y,Re.y),rr=Math.max(Oe.y,Re.y);o.setTransform(this._box,`translate(${We}px,${Nt}px)`),this._box.style.width=Ct-We+"px",this._box.style.height=rr-Nt+"px"}mouseupWindow(O,fe){if(!this._active||O.button!==0)return;const Re=this._startPos,Oe=fe;if(this.reset(),o.suppressClick(),Re.x!==Oe.x||Re.y!==Oe.y)return this._map.fire(new r.k("boxzoomend",{originalEvent:O})),{cameraAnimation:We=>We.fitScreenCoordinates(Re,Oe,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",O)}keydown(O){this._active&&O.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",O))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(o.remove(this._box),this._box=null),o.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(O,fe){return this._map.fire(new r.k(O,{originalEvent:fe}))}}function td(Ze,O){if(Ze.length!==O.length)throw new Error(`The number of touches and points are not equal - touches ${Ze.length}, points ${O.length}`);const fe={};for(let Re=0;Re<Ze.length;Re++)fe[Ze[Re].identifier]=O[Re];return fe}class gu{constructor(O){this.reset(),this.numTouches=O.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(O,fe,Re){(this.centroid||Re.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=O.timeStamp),Re.length===this.numTouches&&(this.centroid=(function(Oe){const We=new r.P(0,0);for(const Ct of Oe)We._add(Ct);return We.div(Oe.length)})(fe),this.touches=td(Re,fe)))}touchmove(O,fe,Re){if(this.aborted||!this.centroid)return;const Oe=td(Re,fe);for(const We in this.touches){const Ct=Oe[We];(!Ct||Ct.dist(this.touches[We])>30)&&(this.aborted=!0)}}touchend(O,fe,Re){if((!this.centroid||O.timeStamp-this.startTime>500)&&(this.aborted=!0),Re.length===0){const Oe=!this.aborted&&this.centroid;if(this.reset(),Oe)return Oe}}}class Mh{constructor(O){this.singleTap=new gu(O),this.numTaps=O.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(O,fe,Re){this.singleTap.touchstart(O,fe,Re)}touchmove(O,fe,Re){this.singleTap.touchmove(O,fe,Re)}touchend(O,fe,Re){const Oe=this.singleTap.touchend(O,fe,Re);if(Oe){const We=O.timeStamp-this.lastTime<500,Ct=!this.lastTap||this.lastTap.dist(Oe)<30;if(We&&Ct||this.reset(),this.count++,this.lastTime=O.timeStamp,this.lastTap=Oe,this.count===this.numTaps)return this.reset(),Oe}}}class th{constructor(O){this._tr=new Wc(O),this._zoomIn=new Mh({numTouches:1,numTaps:2}),this._zoomOut=new Mh({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(O,fe,Re){this._zoomIn.touchstart(O,fe,Re),this._zoomOut.touchstart(O,fe,Re)}touchmove(O,fe,Re){this._zoomIn.touchmove(O,fe,Re),this._zoomOut.touchmove(O,fe,Re)}touchend(O,fe,Re){const Oe=this._zoomIn.touchend(O,fe,Re),We=this._zoomOut.touchend(O,fe,Re),Ct=this._tr;return Oe?(this._active=!0,O.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:Nt=>Nt.easeTo({duration:300,zoom:Ct.zoom+1,around:Ct.unproject(Oe)},{originalEvent:O})}):We?(this._active=!0,O.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:Nt=>Nt.easeTo({duration:300,zoom:Ct.zoom-1,around:Ct.unproject(We)},{originalEvent:O})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class af{constructor(O){this._enabled=!!O.enable,this._moveStateManager=O.moveStateManager,this._clickTolerance=O.clickTolerance||1,this._moveFunction=O.move,this._activateOnStart=!!O.activateOnStart,O.assignEvents(this),this.reset()}reset(O){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(O)}_move(...O){const fe=this._moveFunction(...O);if(fe.bearingDelta||fe.pitchDelta||fe.around||fe.panDelta)return this._active=!0,fe}dragStart(O,fe){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(O)&&(this._moveStateManager.startMove(O),this._lastPoint=fe.length?fe[0]:fe,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(O,fe){if(!this.isEnabled())return;const Re=this._lastPoint;if(!Re)return;if(O.preventDefault(),!this._moveStateManager.isValidMoveEvent(O))return void this.reset(O);const Oe=fe.length?fe[0]:fe;return!this._moved&&Oe.dist(Re)<this._clickTolerance?void 0:(this._moved=!0,this._lastPoint=Oe,this._move(Re,Oe))}dragEnd(O){this.isEnabled()&&this._lastPoint&&this._moveStateManager.isValidEndEvent(O)&&(this._moved&&o.suppressClick(),this.reset(O))}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}getClickTolerance(){return this._clickTolerance}}const Ch={0:1,2:2};class Ef{constructor(O){this._correctEvent=O.checkCorrectEvent}startMove(O){const fe=o.mouseButton(O);this._eventButton=fe}endMove(O){delete this._eventButton}isValidStartEvent(O){return this._correctEvent(O)}isValidMoveEvent(O){return!(function(fe,Re){const Oe=Ch[Re];return fe.buttons===void 0||(fe.buttons&Oe)!==Oe})(O,this._eventButton)}isValidEndEvent(O){return o.mouseButton(O)===this._eventButton}}class kh{constructor(){this._firstTouch=void 0}_isOneFingerTouch(O){return O.targetTouches.length===1}_isSameTouchEvent(O){return O.targetTouches[0].identifier===this._firstTouch}startMove(O){this._firstTouch=O.targetTouches[0].identifier}endMove(O){delete this._firstTouch}isValidStartEvent(O){return this._isOneFingerTouch(O)}isValidMoveEvent(O){return this._isOneFingerTouch(O)&&this._isSameTouchEvent(O)}isValidEndEvent(O){return this._isOneFingerTouch(O)&&this._isSameTouchEvent(O)}}const $d=Ze=>{Ze.mousedown=Ze.dragStart,Ze.mousemoveWindow=Ze.dragMove,Ze.mouseup=Ze.dragEnd,Ze.contextmenu=O=>{O.preventDefault()}},xc=({enable:Ze,clickTolerance:O,bearingDegreesPerPixelMoved:fe=.8})=>{const Re=new Ef({checkCorrectEvent:Oe=>o.mouseButton(Oe)===0&&Oe.ctrlKey||o.mouseButton(Oe)===2});return new af({clickTolerance:O,move:(Oe,We)=>({bearingDelta:(We.x-Oe.x)*fe}),moveStateManager:Re,enable:Ze,assignEvents:$d})},dd=({enable:Ze,clickTolerance:O,pitchDegreesPerPixelMoved:fe=-.5})=>{const Re=new Ef({checkCorrectEvent:Oe=>o.mouseButton(Oe)===0&&Oe.ctrlKey||o.mouseButton(Oe)===2});return new af({clickTolerance:O,move:(Oe,We)=>({pitchDelta:(We.y-Oe.y)*fe}),moveStateManager:Re,enable:Ze,assignEvents:$d})};class of{constructor(O,fe){this._clickTolerance=O.clickTolerance||1,this._map=fe,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new r.P(0,0)}_shouldBePrevented(O){return O<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(O,fe,Re){return this._calculateTransform(O,fe,Re)}touchmove(O,fe,Re){if(this._active){if(!this._shouldBePrevented(Re.length))return O.preventDefault(),this._calculateTransform(O,fe,Re);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",O)}}touchend(O,fe,Re){this._calculateTransform(O,fe,Re),this._active&&this._shouldBePrevented(Re.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(O,fe,Re){Re.length>0&&(this._active=!0);const Oe=td(Re,fe),We=new r.P(0,0),Ct=new r.P(0,0);let Nt=0;for(const Tr in Oe){const Fr=Oe[Tr],Vr=this._touches[Tr];Vr&&(We._add(Fr),Ct._add(Fr.sub(Vr)),Nt++,Oe[Tr]=Fr)}if(this._touches=Oe,this._shouldBePrevented(Nt)||!Ct.mag())return;const rr=Ct.div(Nt);return this._sum._add(rr),this._sum.mag()<this._clickTolerance?void 0:{around:We.div(Nt),panDelta:rr}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Bf{constructor(){this.reset()}reset(){this._active=!1,delete this._firstTwoTouches}touchstart(O,fe,Re){this._firstTwoTouches||Re.length<2||(this._firstTwoTouches=[Re[0].identifier,Re[1].identifier],this._start([fe[0],fe[1]]))}touchmove(O,fe,Re){if(!this._firstTwoTouches)return;O.preventDefault();const[Oe,We]=this._firstTwoTouches,Ct=Mf(Re,fe,Oe),Nt=Mf(Re,fe,We);if(!Ct||!Nt)return;const rr=this._aroundCenter?null:Ct.add(Nt).div(2);return this._move([Ct,Nt],rr,O)}touchend(O,fe,Re){if(!this._firstTwoTouches)return;const[Oe,We]=this._firstTwoTouches,Ct=Mf(Re,fe,Oe),Nt=Mf(Re,fe,We);Ct&&Nt||(this._active&&o.suppressClick(),this.reset())}touchcancel(){this.reset()}enable(O){this._enabled=!0,this._aroundCenter=!!O&&O.around==="center"}disable(){this._enabled=!1,this.reset()}isEnabled(){return!!this._enabled}isActive(){return!!this._active}}function Mf(Ze,O,fe){for(let Re=0;Re<Ze.length;Re++)if(Ze[Re].identifier===fe)return O[Re]}function Du(Ze,O){return Math.log(Ze/O)/Math.LN2}class Rc extends Bf{reset(){super.reset(),delete this._distance,delete this._startDistance}_start(O){this._startDistance=this._distance=O[0].dist(O[1])}_move(O,fe){const Re=this._distance;if(this._distance=O[0].dist(O[1]),this._active||!(Math.abs(Du(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:Du(this._distance,Re),pinchAround:fe}}}function Su(Ze,O){return 180*Ze.angleWith(O)/Math.PI}class rh extends Bf{reset(){super.reset(),delete this._minDiameter,delete this._startVector,delete this._vector}_start(O){this._startVector=this._vector=O[0].sub(O[1]),this._minDiameter=O[0].dist(O[1])}_move(O,fe,Re){const Oe=this._vector;if(this._vector=O[0].sub(O[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:Su(this._vector,Oe),pinchAround:fe}}_isBelowThreshold(O){this._minDiameter=Math.min(this._minDiameter,O.mag());const fe=25/(Math.PI*this._minDiameter)*360,Re=Su(O,this._startVector);return Math.abs(Re)<fe}}function Cf(Ze){return Math.abs(Ze.y)>Math.abs(Ze.x)}class rd extends Bf{constructor(O){super(),this._currentTouchCount=0,this._map=O}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(O,fe,Re){super.touchstart(O,fe,Re),this._currentTouchCount=Re.length}_start(O){this._lastPoints=O,Cf(O[0].sub(O[1]))&&(this._valid=!1)}_move(O,fe,Re){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;const Oe=O[0].sub(this._lastPoints[0]),We=O[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(Oe,We,Re.timeStamp),this._valid?(this._lastPoints=O,this._active=!0,{pitchDelta:(Oe.y+We.y)/2*-.5}):void 0}gestureBeginsVertically(O,fe,Re){if(this._valid!==void 0)return this._valid;const Oe=O.mag()>=2,We=fe.mag()>=2;if(!Oe&&!We)return;if(!Oe||!We)return this._firstMove===void 0&&(this._firstMove=Re),Re-this._firstMove<100&&void 0;const Ct=O.y>0==fe.y>0;return Cf(O)&&Cf(fe)&&Ct}}const wr={panStep:100,bearingStep:15,pitchStep:10};class Gr{constructor(O){this._tr=new Wc(O);const fe=wr;this._panStep=fe.panStep,this._bearingStep=fe.bearingStep,this._pitchStep=fe.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(O){if(O.altKey||O.ctrlKey||O.metaKey)return;let fe=0,Re=0,Oe=0,We=0,Ct=0;switch(O.keyCode){case 61:case 107:case 171:case 187:fe=1;break;case 189:case 109:case 173:fe=-1;break;case 37:O.shiftKey?Re=-1:(O.preventDefault(),We=-1);break;case 39:O.shiftKey?Re=1:(O.preventDefault(),We=1);break;case 38:O.shiftKey?Oe=1:(O.preventDefault(),Ct=-1);break;case 40:O.shiftKey?Oe=-1:(O.preventDefault(),Ct=1);break;default:return}return this._rotationDisabled&&(Re=0,Oe=0),{cameraAnimation:Nt=>{const rr=this._tr;Nt.easeTo({duration:300,easeId:"keyboardHandler",easing:kn,zoom:fe?Math.round(rr.zoom)+fe*(O.shiftKey?2:1):rr.zoom,bearing:rr.bearing+Re*this._bearingStep,pitch:rr.pitch+Oe*this._pitchStep,offset:[-We*this._panStep,-Ct*this._panStep],center:rr.center},{originalEvent:O})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function kn(Ze){return Ze*(2-Ze)}const _n=4.000244140625;class ta{constructor(O,fe){this._onTimeout=Re=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(Re)},this._map=O,this._tr=new Wc(O),this._triggerRenderFrame=fe,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(O){this._defaultZoomRate=O}setWheelZoomRate(O){this._wheelZoomRate=O}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(O){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!O&&O.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(O){return!!this._map.cooperativeGestures.isEnabled()&&!(O.ctrlKey||this._map.cooperativeGestures.isBypassed(O))}wheel(O){if(!this.isEnabled())return;if(this._shouldBePrevented(O))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",O);let fe=O.deltaMode===WheelEvent.DOM_DELTA_LINE?40*O.deltaY:O.deltaY;const Re=s.now(),Oe=Re-(this._lastWheelEventTime||0);this._lastWheelEventTime=Re,fe!==0&&fe%_n==0?this._type="wheel":fe!==0&&Math.abs(fe)<4?this._type="trackpad":Oe>400?(this._type=null,this._lastValue=fe,this._timeout=setTimeout(this._onTimeout,40,O)):this._type||(this._type=Math.abs(Oe*fe)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,fe+=this._lastValue)),O.shiftKey&&fe&&(fe/=4),this._type&&(this._lastWheelEvent=O,this._delta-=fe,this._active||this._start(O)),O.preventDefault()}_start(O){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);const fe=o.mousePos(this._map.getCanvas(),O),Re=this._tr;this._around=fe.y>Re.transform.height/2-Re.transform.getHorizon()?r.N.convert(this._aroundCenter?Re.center:Re.unproject(fe)):r.N.convert(Re.center),this._aroundPoint=Re.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;const O=this._tr.transform;if(this._delta!==0){const rr=this._type==="wheel"&&Math.abs(this._delta)>_n?this._wheelZoomRate:this._defaultZoomRate;let Tr=2/(1+Math.exp(-Math.abs(this._delta*rr)));this._delta<0&&Tr!==0&&(Tr=1/Tr);const Fr=typeof this._targetZoom=="number"?O.zoomScale(this._targetZoom):O.scale;this._targetZoom=Math.min(O.maxZoom,Math.max(O.minZoom,O.scaleZoom(Fr*Tr))),this._type==="wheel"&&(this._startZoom=O.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const fe=typeof this._targetZoom=="number"?this._targetZoom:O.zoom,Re=this._startZoom,Oe=this._easing;let We,Ct=!1;const Nt=s.now()-this._lastWheelEventTime;if(this._type==="wheel"&&Re&&Oe&&Nt){const rr=Math.min(Nt/200,1),Tr=Oe(rr);We=r.y.number(Re,fe,Tr),rr<1?this._frameId||(this._frameId=!0):Ct=!0}else We=fe,Ct=!0;return this._active=!0,Ct&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!Ct,zoomDelta:We-O.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(O){let fe=r.b9;if(this._prevEase){const Re=this._prevEase,Oe=(s.now()-Re.start)/Re.duration,We=Re.easing(Oe+.01)-Re.easing(Oe),Ct=.27/Math.sqrt(We*We+1e-4)*.01,Nt=Math.sqrt(.0729-Ct*Ct);fe=r.b8(Ct,Nt,.25,1)}return this._prevEase={start:s.now(),duration:O,easing:fe},fe}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class Ga{constructor(O,fe){this._clickZoom=O,this._tapZoom=fe}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class ja{constructor(O){this._tr=new Wc(O),this.reset()}reset(){this._active=!1}dblclick(O,fe){return O.preventDefault(),{cameraAnimation:Re=>{Re.easeTo({duration:300,zoom:this._tr.zoom+(O.shiftKey?-1:1),around:this._tr.unproject(fe)},{originalEvent:O})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Ai{constructor(){this._tap=new Mh({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(O,fe,Re){if(!this._swipePoint)if(this._tapTime){const Oe=fe[0],We=O.timeStamp-this._tapTime<500,Ct=this._tapPoint.dist(Oe)<30;We&&Ct?Re.length>0&&(this._swipePoint=Oe,this._swipeTouch=Re[0].identifier):this.reset()}else this._tap.touchstart(O,fe,Re)}touchmove(O,fe,Re){if(this._tapTime){if(this._swipePoint){if(Re[0].identifier!==this._swipeTouch)return;const Oe=fe[0],We=Oe.y-this._swipePoint.y;return this._swipePoint=Oe,O.preventDefault(),this._active=!0,{zoomDelta:We/128}}}else this._tap.touchmove(O,fe,Re)}touchend(O,fe,Re){if(this._tapTime)this._swipePoint&&Re.length===0&&this.reset();else{const Oe=this._tap.touchend(O,fe,Re);Oe&&(this._tapTime=O.timeStamp,this._tapPoint=Oe)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Ii{constructor(O,fe,Re){this._el=O,this._mousePan=fe,this._touchPan=Re}enable(O){this._inertiaOptions=O||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class oo{constructor(O,fe,Re){this._pitchWithRotate=O.pitchWithRotate,this._mouseRotate=fe,this._mousePitch=Re}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()}}class hi{constructor(O,fe,Re,Oe){this._el=O,this._touchZoom=fe,this._touchRotate=Re,this._tapDragZoom=Oe,this._rotationDisabled=!1,this._enabled=!0}enable(O){this._touchZoom.enable(O),this._rotationDisabled||this._touchRotate.enable(O),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class Gi{constructor(O,fe){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=O,this._options=fe,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;const O=this._map.getCanvasContainer();O.classList.add("maplibregl-cooperative-gestures"),this._container=o.create("div","maplibregl-cooperative-gesture-screen",O);let fe=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(fe=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));const Re=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),Oe=document.createElement("div");Oe.className="maplibregl-desktop-message",Oe.textContent=fe,this._container.appendChild(Oe);const We=document.createElement("div");We.className="maplibregl-mobile-message",We.textContent=Re,this._container.appendChild(We),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(o.remove(this._container),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(O){return O[this._bypassKey]}notifyGestureBlocked(O,fe){this._enabled&&(this._map.fire(new r.k("cooperativegestureprevented",{gestureType:O,originalEvent:fe})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}const wi=Ze=>Ze.zoom||Ze.drag||Ze.pitch||Ze.rotate;class si extends r.k{}function vo(Ze){return Ze.panDelta&&Ze.panDelta.mag()||Ze.zoomDelta||Ze.bearingDelta||Ze.pitchDelta}class es{constructor(O,fe){this.handleWindowEvent=Oe=>{this.handleEvent(Oe,`${Oe.type}Window`)},this.handleEvent=(Oe,We)=>{if(Oe.type==="blur")return void this.stop(!0);this._updatingCamera=!0;const Ct=Oe.type==="renderFrame"?void 0:Oe,Nt={needsRenderFrame:!1},rr={},Tr={},Fr=Oe.touches,Vr=Fr?this._getMapTouches(Fr):void 0,mn=Vr?o.touchPos(this._map.getCanvas(),Vr):o.mousePos(this._map.getCanvas(),Oe);for(const{handlerName:ct,handler:Tt,allowed:Pt}of this._handlers){if(!Tt.isEnabled())continue;let Gt;this._blockedByActive(Tr,Pt,ct)?Tt.reset():Tt[We||Oe.type]&&(Gt=Tt[We||Oe.type](Oe,mn,Vr),this.mergeHandlerResult(Nt,rr,Gt,ct,Ct),Gt&&Gt.needsRenderFrame&&this._triggerRenderFrame()),(Gt||Tt.isActive())&&(Tr[ct]=Tt)}const Dn={};for(const ct in this._previousActiveHandlers)Tr[ct]||(Dn[ct]=Ct);this._previousActiveHandlers=Tr,(Object.keys(Dn).length||vo(Nt))&&(this._changes.push([Nt,rr,Dn]),this._triggerRenderFrame()),(Object.keys(Tr).length||vo(Nt))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:nt}=Nt;nt&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],nt(this._map))},this._map=O,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Bh(O),this._bearingSnap=fe.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(fe);const Re=this._el;this._listeners=[[Re,"touchstart",{passive:!0}],[Re,"touchmove",{passive:!1}],[Re,"touchend",void 0],[Re,"touchcancel",void 0],[Re,"mousedown",void 0],[Re,"mousemove",void 0],[Re,"mouseup",void 0],[document,"mousemove",{capture:!0}],[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],[window,"blur",void 0]];for(const[Oe,We,Ct]of this._listeners)o.addEventListener(Oe,We,Oe===document?this.handleWindowEvent:this.handleEvent,Ct)}destroy(){for(const[O,fe,Re]of this._listeners)o.removeEventListener(O,fe,O===document?this.handleWindowEvent:this.handleEvent,Re)}_addDefaultHandlers(O){const fe=this._map,Re=fe.getCanvasContainer();this._add("mapEvent",new _h(fe,O));const Oe=fe.boxZoom=new gf(fe,O);this._add("boxZoom",Oe),O.interactive&&O.boxZoom&&Oe.enable();const We=fe.cooperativeGestures=new Gi(fe,O.cooperativeGestures);this._add("cooperativeGestures",We),O.cooperativeGestures&&We.enable();const Ct=new th(fe),Nt=new ja(fe);fe.doubleClickZoom=new Ga(Nt,Ct),this._add("tapZoom",Ct),this._add("clickZoom",Nt),O.interactive&&O.doubleClickZoom&&fe.doubleClickZoom.enable();const rr=new Ai;this._add("tapDragZoom",rr);const Tr=fe.touchPitch=new rd(fe);this._add("touchPitch",Tr),O.interactive&&O.touchPitch&&fe.touchPitch.enable(O.touchPitch);const Fr=xc(O),Vr=dd(O);fe.dragRotate=new oo(O,Fr,Vr),this._add("mouseRotate",Fr,["mousePitch"]),this._add("mousePitch",Vr,["mouseRotate"]),O.interactive&&O.dragRotate&&fe.dragRotate.enable();const mn=(({enable:Gt,clickTolerance:zt})=>{const Kt=new Ef({checkCorrectEvent:Cr=>o.mouseButton(Cr)===0&&!Cr.ctrlKey});return new af({clickTolerance:zt,move:(Cr,Nr)=>({around:Nr,panDelta:Nr.sub(Cr)}),activateOnStart:!0,moveStateManager:Kt,enable:Gt,assignEvents:$d})})(O),Dn=new of(O,fe);fe.dragPan=new Ii(Re,mn,Dn),this._add("mousePan",mn),this._add("touchPan",Dn,["touchZoom","touchRotate"]),O.interactive&&O.dragPan&&fe.dragPan.enable(O.dragPan);const nt=new rh,ct=new Rc;fe.touchZoomRotate=new hi(Re,ct,nt,rr),this._add("touchRotate",nt,["touchPan","touchZoom"]),this._add("touchZoom",ct,["touchPan","touchRotate"]),O.interactive&&O.touchZoomRotate&&fe.touchZoomRotate.enable(O.touchZoomRotate);const Tt=fe.scrollZoom=new ta(fe,()=>this._triggerRenderFrame());this._add("scrollZoom",Tt,["mousePan"]),O.interactive&&O.scrollZoom&&fe.scrollZoom.enable(O.scrollZoom);const Pt=fe.keyboard=new Gr(fe);this._add("keyboard",Pt),O.interactive&&O.keyboard&&fe.keyboard.enable(),this._add("blockableMapEvent",new du(fe))}_add(O,fe,Re){this._handlers.push({handlerName:O,handler:fe,allowed:Re}),this._handlersById[O]=fe}stop(O){if(!this._updatingCamera){for(const{handler:fe}of this._handlers)fe.reset();this._inertia.clear(),this._fireEvents({},{},O),this._changes=[]}}isActive(){for(const{handler:O}of this._handlers)if(O.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!wi(this._eventsInProgress)||this.isZooming()}_blockedByActive(O,fe,Re){for(const Oe in O)if(Oe!==Re&&(!fe||fe.indexOf(Oe)<0))return!0;return!1}_getMapTouches(O){const fe=[];for(const Re of O)this._el.contains(Re.target)&&fe.push(Re);return fe}mergeHandlerResult(O,fe,Re,Oe,We){if(!Re)return;r.e(O,Re);const Ct={handlerName:Oe,originalEvent:Re.originalEvent||We};Re.zoomDelta!==void 0&&(fe.zoom=Ct),Re.panDelta!==void 0&&(fe.drag=Ct),Re.pitchDelta!==void 0&&(fe.pitch=Ct),Re.bearingDelta!==void 0&&(fe.rotate=Ct)}_applyChanges(){const O={},fe={},Re={};for(const[Oe,We,Ct]of this._changes)Oe.panDelta&&(O.panDelta=(O.panDelta||new r.P(0,0))._add(Oe.panDelta)),Oe.zoomDelta&&(O.zoomDelta=(O.zoomDelta||0)+Oe.zoomDelta),Oe.bearingDelta&&(O.bearingDelta=(O.bearingDelta||0)+Oe.bearingDelta),Oe.pitchDelta&&(O.pitchDelta=(O.pitchDelta||0)+Oe.pitchDelta),Oe.around!==void 0&&(O.around=Oe.around),Oe.pinchAround!==void 0&&(O.pinchAround=Oe.pinchAround),Oe.noInertia&&(O.noInertia=Oe.noInertia),r.e(fe,We),r.e(Re,Ct);this._updateMapTransform(O,fe,Re),this._changes=[]}_updateMapTransform(O,fe,Re){const Oe=this._map,We=Oe._getTransformForUpdate(),Ct=Oe.terrain;if(!(vo(O)||Ct&&this._terrainMovement))return this._fireEvents(fe,Re,!0);let{panDelta:Nt,zoomDelta:rr,bearingDelta:Tr,pitchDelta:Fr,around:Vr,pinchAround:mn}=O;mn!==void 0&&(Vr=mn),Oe._stop(!0),Vr=Vr||Oe.transform.centerPoint;const Dn=We.pointLocation(Nt?Vr.sub(Nt):Vr);Tr&&(We.bearing+=Tr),Fr&&(We.pitch+=Fr),rr&&(We.zoom+=rr),Ct?this._terrainMovement||!fe.drag&&!fe.zoom?fe.drag&&this._terrainMovement?We.center=We.pointLocation(We.centerPoint.sub(Nt)):We.setLocationAtPoint(Dn,Vr):(this._terrainMovement=!0,this._map._elevationFreeze=!0,We.setLocationAtPoint(Dn,Vr)):We.setLocationAtPoint(Dn,Vr),Oe._applyUpdatedTransform(We),this._map._update(),O.noInertia||this._inertia.record(O),this._fireEvents(fe,Re,!0)}_fireEvents(O,fe,Re){const Oe=wi(this._eventsInProgress),We=wi(O),Ct={};for(const Vr in O){const{originalEvent:mn}=O[Vr];this._eventsInProgress[Vr]||(Ct[`${Vr}start`]=mn),this._eventsInProgress[Vr]=O[Vr]}!Oe&&We&&this._fireEvent("movestart",We.originalEvent);for(const Vr in Ct)this._fireEvent(Vr,Ct[Vr]);We&&this._fireEvent("move",We.originalEvent);for(const Vr in O){const{originalEvent:mn}=O[Vr];this._fireEvent(Vr,mn)}const Nt={};let rr;for(const Vr in this._eventsInProgress){const{handlerName:mn,originalEvent:Dn}=this._eventsInProgress[Vr];this._handlersById[mn].isActive()||(delete this._eventsInProgress[Vr],rr=fe[mn]||Dn,Nt[`${Vr}end`]=rr)}for(const Vr in Nt)this._fireEvent(Vr,Nt[Vr]);const Tr=wi(this._eventsInProgress),Fr=(Oe||We)&&!Tr;if(Fr&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;const Vr=this._map._getTransformForUpdate();Vr.recalculateZoom(this._map.terrain),this._map._applyUpdatedTransform(Vr)}if(Re&&Fr){this._updatingCamera=!0;const Vr=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),mn=Dn=>Dn!==0&&-this._bearingSnap<Dn&&Dn<this._bearingSnap;!Vr||!Vr.essential&&s.prefersReducedMotion?(this._map.fire(new r.k("moveend",{originalEvent:rr})),mn(this._map.getBearing())&&this._map.resetNorth()):(mn(Vr.bearing||this._map.getBearing())&&(Vr.bearing=0),Vr.freezeElevation=!0,this._map.easeTo(Vr,{originalEvent:rr})),this._updatingCamera=!1}}_fireEvent(O,fe){this._map.fire(new r.k(O,fe?{originalEvent:fe}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add(O=>{delete this._frameId,this.handleEvent(new si("renderFrame",{timeStamp:O})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class $o extends r.E{constructor(O,fe){super(),this._renderFrameCallback=()=>{const Re=Math.min((s.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(Re)),Re<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=O,this._bearingSnap=fe.bearingSnap,this.on("moveend",()=>{delete this._requestedCameraState})}getCenter(){return new r.N(this.transform.center.lng,this.transform.center.lat)}setCenter(O,fe){return this.jumpTo({center:O},fe)}panBy(O,fe,Re){return O=r.P.convert(O).mult(-1),this.panTo(this.transform.center,r.e({offset:O},fe),Re)}panTo(O,fe,Re){return this.easeTo(r.e({center:O},fe),Re)}getZoom(){return this.transform.zoom}setZoom(O,fe){return this.jumpTo({zoom:O},fe),this}zoomTo(O,fe,Re){return this.easeTo(r.e({zoom:O},fe),Re)}zoomIn(O,fe){return this.zoomTo(this.getZoom()+1,O,fe),this}zoomOut(O,fe){return this.zoomTo(this.getZoom()-1,O,fe),this}getBearing(){return this.transform.bearing}setBearing(O,fe){return this.jumpTo({bearing:O},fe),this}getPadding(){return this.transform.padding}setPadding(O,fe){return this.jumpTo({padding:O},fe),this}rotateTo(O,fe,Re){return this.easeTo(r.e({bearing:O},fe),Re)}resetNorth(O,fe){return this.rotateTo(0,r.e({duration:1e3},O),fe),this}resetNorthPitch(O,fe){return this.easeTo(r.e({bearing:0,pitch:0,duration:1e3},O),fe),this}snapToNorth(O,fe){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(O,fe):this}getPitch(){return this.transform.pitch}setPitch(O,fe){return this.jumpTo({pitch:O},fe),this}cameraForBounds(O,fe){O=ue.convert(O).adjustAntiMeridian();const Re=fe&&fe.bearing||0;return this._cameraForBoxAndBearing(O.getNorthWest(),O.getSouthEast(),Re,fe)}_cameraForBoxAndBearing(O,fe,Re,Oe){const We={top:0,bottom:0,right:0,left:0};if(typeof(Oe=r.e({padding:We,offset:[0,0],maxZoom:this.transform.maxZoom},Oe)).padding=="number"){const Yn=Oe.padding;Oe.padding={top:Yn,bottom:Yn,right:Yn,left:Yn}}Oe.padding=r.e(We,Oe.padding);const Ct=this.transform,Nt=Ct.padding,rr=new ue(O,fe),Tr=Ct.project(rr.getNorthWest()),Fr=Ct.project(rr.getNorthEast()),Vr=Ct.project(rr.getSouthEast()),mn=Ct.project(rr.getSouthWest()),Dn=r.ba(-Re),nt=Tr.rotate(Dn),ct=Fr.rotate(Dn),Tt=Vr.rotate(Dn),Pt=mn.rotate(Dn),Gt=new r.P(Math.max(nt.x,ct.x,Pt.x,Tt.x),Math.max(nt.y,ct.y,Pt.y,Tt.y)),zt=new r.P(Math.min(nt.x,ct.x,Pt.x,Tt.x),Math.min(nt.y,ct.y,Pt.y,Tt.y)),Kt=Gt.sub(zt),Cr=(Ct.width-(Nt.left+Nt.right+Oe.padding.left+Oe.padding.right))/Kt.x,Nr=(Ct.height-(Nt.top+Nt.bottom+Oe.padding.top+Oe.padding.bottom))/Kt.y;if(Nr<0||Cr<0)return void r.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.");const Hr=Math.min(Ct.scaleZoom(Ct.scale*Math.min(Cr,Nr)),Oe.maxZoom),sn=r.P.convert(Oe.offset),bn=new r.P((Oe.padding.left-Oe.padding.right)/2,(Oe.padding.top-Oe.padding.bottom)/2).rotate(r.ba(Re)),Vn=sn.add(bn).mult(Ct.scale/Ct.zoomScale(Hr));return{center:Ct.unproject(Tr.add(Vr).div(2).sub(Vn)),zoom:Hr,bearing:Re}}fitBounds(O,fe,Re){return this._fitInternal(this.cameraForBounds(O,fe),fe,Re)}fitScreenCoordinates(O,fe,Re,Oe,We){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(r.P.convert(O)),this.transform.pointLocation(r.P.convert(fe)),Re,Oe),Oe,We)}_fitInternal(O,fe,Re){return O?(delete(fe=r.e(O,fe)).padding,fe.linear?this.easeTo(fe,Re):this.flyTo(fe,Re)):this}jumpTo(O,fe){this.stop();const Re=this._getTransformForUpdate();let Oe=!1,We=!1,Ct=!1;return"zoom"in O&&Re.zoom!==+O.zoom&&(Oe=!0,Re.zoom=+O.zoom),O.center!==void 0&&(Re.center=r.N.convert(O.center)),"bearing"in O&&Re.bearing!==+O.bearing&&(We=!0,Re.bearing=+O.bearing),"pitch"in O&&Re.pitch!==+O.pitch&&(Ct=!0,Re.pitch=+O.pitch),O.padding==null||Re.isPaddingEqual(O.padding)||(Re.padding=O.padding),this._applyUpdatedTransform(Re),this.fire(new r.k("movestart",fe)).fire(new r.k("move",fe)),Oe&&this.fire(new r.k("zoomstart",fe)).fire(new r.k("zoom",fe)).fire(new r.k("zoomend",fe)),We&&this.fire(new r.k("rotatestart",fe)).fire(new r.k("rotate",fe)).fire(new r.k("rotateend",fe)),Ct&&this.fire(new r.k("pitchstart",fe)).fire(new r.k("pitch",fe)).fire(new r.k("pitchend",fe)),this.fire(new r.k("moveend",fe))}calculateCameraOptionsFromTo(O,fe,Re,Oe=0){const We=r.Z.fromLngLat(O,fe),Ct=r.Z.fromLngLat(Re,Oe),Nt=Ct.x-We.x,rr=Ct.y-We.y,Tr=Ct.z-We.z,Fr=Math.hypot(Nt,rr,Tr);if(Fr===0)throw new Error("Can't calculate camera options with same From and To");const Vr=Math.hypot(Nt,rr),mn=this.transform.scaleZoom(this.transform.cameraToCenterDistance/Fr/this.transform.tileSize),Dn=180*Math.atan2(Nt,-rr)/Math.PI;let nt=180*Math.acos(Vr/Fr)/Math.PI;return nt=Tr<0?90-nt:90+nt,{center:Ct.toLngLat(),zoom:mn,pitch:nt,bearing:Dn}}easeTo(O,fe){var Re;this._stop(!1,O.easeId),((O=r.e({offset:[0,0],duration:500,easing:r.b9},O)).animate===!1||!O.essential&&s.prefersReducedMotion)&&(O.duration=0);const Oe=this._getTransformForUpdate(),We=Oe.zoom,Ct=Oe.bearing,Nt=Oe.pitch,rr=Oe.padding,Tr="bearing"in O?this._normalizeBearing(O.bearing,Ct):Ct,Fr="pitch"in O?+O.pitch:Nt,Vr="padding"in O?O.padding:Oe.padding,mn=r.P.convert(O.offset);let Dn=Oe.centerPoint.add(mn);const nt=Oe.pointLocation(Dn),{center:ct,zoom:Tt}=Oe.getConstrained(r.N.convert(O.center||nt),(Re=O.zoom)!==null&&Re!==void 0?Re:We);this._normalizeCenter(ct,Oe);const Pt=Oe.project(nt),Gt=Oe.project(ct).sub(Pt),zt=Oe.zoomScale(Tt-We);let Kt,Cr;O.around&&(Kt=r.N.convert(O.around),Cr=Oe.locationPoint(Kt));const Nr={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||Tt!==We,this._rotating=this._rotating||Ct!==Tr,this._pitching=this._pitching||Fr!==Nt,this._padding=!Oe.isPaddingEqual(Vr),this._easeId=O.easeId,this._prepareEase(fe,O.noMoveStart,Nr),this.terrain&&this._prepareElevation(ct),this._ease(Hr=>{if(this._zooming&&(Oe.zoom=r.y.number(We,Tt,Hr)),this._rotating&&(Oe.bearing=r.y.number(Ct,Tr,Hr)),this._pitching&&(Oe.pitch=r.y.number(Nt,Fr,Hr)),this._padding&&(Oe.interpolatePadding(rr,Vr,Hr),Dn=Oe.centerPoint.add(mn)),this.terrain&&!O.freezeElevation&&this._updateElevation(Hr),Kt)Oe.setLocationAtPoint(Kt,Cr);else{const sn=Oe.zoomScale(Oe.zoom-We),bn=Tt>We?Math.min(2,zt):Math.max(.5,zt),Vn=Math.pow(bn,1-Hr),Yn=Oe.unproject(Pt.add(Gt.mult(Hr*Vn)).mult(sn));Oe.setLocationAtPoint(Oe.renderWorldCopies?Yn.wrap():Yn,Dn)}this._applyUpdatedTransform(Oe),this._fireMoveEvents(fe)},Hr=>{this.terrain&&O.freezeElevation&&this._finalizeElevation(),this._afterEase(fe,Hr)},O),this}_prepareEase(O,fe,Re={}){this._moving=!0,fe||Re.moving||this.fire(new r.k("movestart",O)),this._zooming&&!Re.zooming&&this.fire(new r.k("zoomstart",O)),this._rotating&&!Re.rotating&&this.fire(new r.k("rotatestart",O)),this._pitching&&!Re.pitching&&this.fire(new r.k("pitchstart",O))}_prepareElevation(O){this._elevationCenter=O,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(O,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(O){this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);const fe=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(O<1&&fe!==this._elevationTarget){const Re=this._elevationTarget-this._elevationStart;this._elevationStart+=O*(Re-(fe-(Re*O+this._elevationStart))/(1-O)),this._elevationTarget=fe}this.transform.elevation=r.y.number(this._elevationStart,this._elevationTarget,O)}_finalizeElevation(){this._elevationFreeze=!1,this.transform.recalculateZoom(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(O){const fe=O.getCameraPosition(),Re=this.terrain.getElevationForLngLatZoom(fe.lngLat,O.zoom);if(fe.altitude<Re){const Oe=this.calculateCameraOptionsFromTo(fe.lngLat,Re,O.center,O.elevation);return{pitch:Oe.pitch,zoom:Oe.zoom}}return{}}_applyUpdatedTransform(O){const fe=[];if(this.terrain&&fe.push(Oe=>this._elevateCameraIfInsideTerrain(Oe)),this.transformCameraUpdate&&fe.push(Oe=>this.transformCameraUpdate(Oe)),!fe.length)return;const Re=O.clone();for(const Oe of fe){const We=Re.clone(),{center:Ct,zoom:Nt,pitch:rr,bearing:Tr,elevation:Fr}=Oe(We);Ct&&(We.center=Ct),Nt!==void 0&&(We.zoom=Nt),rr!==void 0&&(We.pitch=rr),Tr!==void 0&&(We.bearing=Tr),Fr!==void 0&&(We.elevation=Fr),Re.apply(We)}this.transform.apply(Re)}_fireMoveEvents(O){this.fire(new r.k("move",O)),this._zooming&&this.fire(new r.k("zoom",O)),this._rotating&&this.fire(new r.k("rotate",O)),this._pitching&&this.fire(new r.k("pitch",O))}_afterEase(O,fe){if(this._easeId&&fe&&this._easeId===fe)return;delete this._easeId;const Re=this._zooming,Oe=this._rotating,We=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,Re&&this.fire(new r.k("zoomend",O)),Oe&&this.fire(new r.k("rotateend",O)),We&&this.fire(new r.k("pitchend",O)),this.fire(new r.k("moveend",O))}flyTo(O,fe){var Re;if(!O.essential&&s.prefersReducedMotion){const Mi=r.M(O,["center","zoom","bearing","pitch","around"]);return this.jumpTo(Mi,fe)}this.stop(),O=r.e({offset:[0,0],speed:1.2,curve:1.42,easing:r.b9},O);const Oe=this._getTransformForUpdate(),We=Oe.zoom,Ct=Oe.bearing,Nt=Oe.pitch,rr=Oe.padding,Tr="bearing"in O?this._normalizeBearing(O.bearing,Ct):Ct,Fr="pitch"in O?+O.pitch:Nt,Vr="padding"in O?O.padding:Oe.padding,mn=r.P.convert(O.offset);let Dn=Oe.centerPoint.add(mn);const nt=Oe.pointLocation(Dn),{center:ct,zoom:Tt}=Oe.getConstrained(r.N.convert(O.center||nt),(Re=O.zoom)!==null&&Re!==void 0?Re:We);this._normalizeCenter(ct,Oe);const Pt=Oe.zoomScale(Tt-We),Gt=Oe.project(nt),zt=Oe.project(ct).sub(Gt);let Kt=O.curve;const Cr=Math.max(Oe.width,Oe.height),Nr=Cr/Pt,Hr=zt.mag();if("minZoom"in O){const Mi=r.ac(Math.min(O.minZoom,We,Tt),Oe.minZoom,Oe.maxZoom),go=Cr/Oe.zoomScale(Mi-We);Kt=Math.sqrt(go/Hr*2)}const sn=Kt*Kt;function bn(Mi){const go=(Nr*Nr-Cr*Cr+(Mi?-1:1)*sn*sn*Hr*Hr)/(2*(Mi?Nr:Cr)*sn*Hr);return Math.log(Math.sqrt(go*go+1)-go)}function Vn(Mi){return(Math.exp(Mi)-Math.exp(-Mi))/2}function Yn(Mi){return(Math.exp(Mi)+Math.exp(-Mi))/2}const va=bn(!1);let Va=function(Mi){return Yn(va)/Yn(va+Kt*Mi)},Si=function(Mi){return Cr*((Yn(va)*(Vn(go=va+Kt*Mi)/Yn(go))-Vn(va))/sn)/Hr;var go},yi=(bn(!0)-va)/Kt;if(Math.abs(Hr)<1e-6||!isFinite(yi)){if(Math.abs(Cr-Nr)<1e-6)return this.easeTo(O,fe);const Mi=Nr<Cr?-1:1;yi=Math.abs(Math.log(Nr/Cr))/Kt,Si=()=>0,Va=go=>Math.exp(Mi*Kt*go)}return O.duration="duration"in O?+O.duration:1e3*yi/("screenSpeed"in O?+O.screenSpeed/Kt:+O.speed),O.maxDuration&&O.duration>O.maxDuration&&(O.duration=0),this._zooming=!0,this._rotating=Ct!==Tr,this._pitching=Fr!==Nt,this._padding=!Oe.isPaddingEqual(Vr),this._prepareEase(fe,!1),this.terrain&&this._prepareElevation(ct),this._ease(Mi=>{const go=Mi*yi,jo=1/Va(go);Oe.zoom=Mi===1?Tt:We+Oe.scaleZoom(jo),this._rotating&&(Oe.bearing=r.y.number(Ct,Tr,Mi)),this._pitching&&(Oe.pitch=r.y.number(Nt,Fr,Mi)),this._padding&&(Oe.interpolatePadding(rr,Vr,Mi),Dn=Oe.centerPoint.add(mn)),this.terrain&&!O.freezeElevation&&this._updateElevation(Mi);const Do=Mi===1?ct:Oe.unproject(Gt.add(zt.mult(Si(go))).mult(jo));Oe.setLocationAtPoint(Oe.renderWorldCopies?Do.wrap():Do,Dn),this._applyUpdatedTransform(Oe),this._fireMoveEvents(fe)},()=>{this.terrain&&O.freezeElevation&&this._finalizeElevation(),this._afterEase(fe)},O),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(O,fe){var Re;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const Oe=this._onEaseEnd;delete this._onEaseEnd,Oe.call(this,fe)}return O||(Re=this.handlers)===null||Re===void 0||Re.stop(!1),this}_ease(O,fe,Re){Re.animate===!1||Re.duration===0?(O(1),fe()):(this._easeStart=s.now(),this._easeOptions=Re,this._onEaseFrame=O,this._onEaseEnd=fe,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(O,fe){O=r.b3(O,-180,180);const Re=Math.abs(O-fe);return Math.abs(O-360-fe)<Re&&(O-=360),Math.abs(O+360-fe)<Re&&(O+=360),O}_normalizeCenter(O,fe){if(!fe.renderWorldCopies||fe.lngRange)return;const Re=O.lng-fe.center.lng;O.lng+=Re>180?-360:Re<-180?360:0}queryTerrainElevation(O){return this.terrain?this.terrain.getElevationForLngLatZoom(r.N.convert(O),this.transform.tileZoom)-this.transform.elevation:null}}const is={compact:!0,customAttribution:'<a href="https://maplibre.org/" target="_blank">MapLibre</a>'};class rs{constructor(O=is){this._toggleAttribution=()=>{this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show")):(this._container.classList.add("maplibregl-compact-show"),this._container.removeAttribute("open")))},this._updateData=fe=>{!fe||fe.sourceDataType!=="metadata"&&fe.sourceDataType!=="visibility"&&fe.dataType!=="style"&&fe.type!=="terrain"||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact===!1?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=O}getDefaultPosition(){return"bottom-right"}onAdd(O){return this._map=O,this._compact=this.options.compact,this._container=o.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=o.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=o.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){o.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(O,fe){const Re=this._map._getUIString(`AttributionControl.${fe}`);O.title=Re,O.setAttribute("aria-label",Re)}_updateAttributions(){if(!this._map.style)return;let O=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?O=O.concat(this.options.customAttribution.map(Oe=>typeof Oe!="string"?"":Oe)):typeof this.options.customAttribution=="string"&&O.push(this.options.customAttribution)),this._map.style.stylesheet){const Oe=this._map.style.stylesheet;this.styleOwner=Oe.owner,this.styleId=Oe.id}const fe=this._map.style.sourceCaches;for(const Oe in fe){const We=fe[Oe];if(We.used||We.usedForTerrain){const Ct=We.getSource();Ct.attribution&&O.indexOf(Ct.attribution)<0&&O.push(Ct.attribution)}}O=O.filter(Oe=>String(Oe).trim()),O.sort((Oe,We)=>Oe.length-We.length),O=O.filter((Oe,We)=>{for(let Ct=We+1;Ct<O.length;Ct++)if(O[Ct].indexOf(Oe)>=0)return!1;return!0});const Re=O.join(" | ");Re!==this._attribHTML&&(this._attribHTML=Re,O.length?(this._innerContainer.innerHTML=Re,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class mo{constructor(O={}){this._updateCompact=()=>{const fe=this._container.children;if(fe.length){const Re=fe[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&Re.classList.add("maplibregl-compact"):Re.classList.remove("maplibregl-compact")}},this.options=O}getDefaultPosition(){return"bottom-left"}onAdd(O){this._map=O,this._compact=this.options&&this.options.compact,this._container=o.create("div","maplibregl-ctrl");const fe=o.create("a","maplibregl-ctrl-logo");return fe.target="_blank",fe.rel="noopener nofollow",fe.href="https://maplibre.org/",fe.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),fe.setAttribute("rel","noopener nofollow"),this._container.appendChild(fe),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){o.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class Ji{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(O){const fe=++this._id;return this._queue.push({callback:O,id:fe,cancelled:!1}),fe}remove(O){const fe=this._currentlyRunning,Re=fe?this._queue.concat(fe):this._queue;for(const Oe of Re)if(Oe.id===O)return void(Oe.cancelled=!0)}run(O=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const fe=this._currentlyRunning=this._queue;this._queue=[];for(const Re of fe)if(!Re.cancelled&&(Re.callback(O),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var gs=r.Y([{name:"a_pos3d",type:"Int16",components:3}]);class $s extends r.E{constructor(O){super(),this.sourceCache=O,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,O.usedForTerrain=!0,O.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(O,fe){this.sourceCache.update(O,fe),this._renderableTilesKeys=[];const Re={};for(const Oe of O.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:fe}))Re[Oe.key]=!0,this._renderableTilesKeys.push(Oe.key),this._tiles[Oe.key]||(Oe.posMatrix=new Float64Array(16),r.aP(Oe.posMatrix,0,r.X,0,r.X,0,1),this._tiles[Oe.key]=new wt(Oe,this.tileSize));for(const Oe in this._tiles)Re[Oe]||delete this._tiles[Oe]}freeRtt(O){for(const fe in this._tiles){const Re=this._tiles[fe];(!O||Re.tileID.equals(O)||Re.tileID.isChildOf(O)||O.isChildOf(Re.tileID))&&(Re.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(O=>this.getTileByID(O))}getTileByID(O){return this._tiles[O]}getTerrainCoords(O){const fe={};for(const Re of this._renderableTilesKeys){const Oe=this._tiles[Re].tileID;if(Oe.canonical.equals(O.canonical)){const We=O.clone();We.posMatrix=new Float64Array(16),r.aP(We.posMatrix,0,r.X,0,r.X,0,1),fe[Re]=We}else if(Oe.canonical.isChildOf(O.canonical)){const We=O.clone();We.posMatrix=new Float64Array(16);const Ct=Oe.canonical.z-O.canonical.z,Nt=Oe.canonical.x-(Oe.canonical.x>>Ct<<Ct),rr=Oe.canonical.y-(Oe.canonical.y>>Ct<<Ct),Tr=r.X>>Ct;r.aP(We.posMatrix,0,Tr,0,Tr,0,1),r.J(We.posMatrix,We.posMatrix,[-Nt*Tr,-rr*Tr,0]),fe[Re]=We}else if(O.canonical.isChildOf(Oe.canonical)){const We=O.clone();We.posMatrix=new Float64Array(16);const Ct=O.canonical.z-Oe.canonical.z,Nt=O.canonical.x-(O.canonical.x>>Ct<<Ct),rr=O.canonical.y-(O.canonical.y>>Ct<<Ct),Tr=r.X>>Ct;r.aP(We.posMatrix,0,r.X,0,r.X,0,1),r.J(We.posMatrix,We.posMatrix,[Nt*Tr,rr*Tr,0]),r.K(We.posMatrix,We.posMatrix,[1/2**Ct,1/2**Ct,0]),fe[Re]=We}}return fe}getSourceTile(O,fe){const Re=this.sourceCache._source;let Oe=O.overscaledZ-this.deltaZoom;if(Oe>Re.maxzoom&&(Oe=Re.maxzoom),Oe<Re.minzoom)return null;this._sourceTileCache[O.key]||(this._sourceTileCache[O.key]=O.scaledTo(Oe).key);let We=this.sourceCache.getTileByID(this._sourceTileCache[O.key]);if((!We||!We.dem)&&fe)for(;Oe>=Re.minzoom&&(!We||!We.dem);)We=this.sourceCache.getTileByID(O.scaledTo(Oe--).key);return We}tilesAfterTime(O=Date.now()){return Object.values(this._tiles).filter(fe=>fe.timeAdded>=O)}}class Nl{constructor(O,fe,Re){this.painter=O,this.sourceCache=new $s(fe),this.options=Re,this.exaggeration=typeof Re.exaggeration=="number"?Re.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(O,fe,Re,Oe=r.X){var We;if(!(fe>=0&&fe<Oe&&Re>=0&&Re<Oe))return 0;const Ct=this.getTerrainData(O),Nt=(We=Ct.tile)===null||We===void 0?void 0:We.dem;if(!Nt)return 0;const rr=(function(nt,ct,Tt){var Pt=ct[0],Gt=ct[1];return nt[0]=Tt[0]*Pt+Tt[4]*Gt+Tt[12],nt[1]=Tt[1]*Pt+Tt[5]*Gt+Tt[13],nt})([],[fe/Oe*r.X,Re/Oe*r.X],Ct.u_terrain_matrix),Tr=[rr[0]*Nt.dim,rr[1]*Nt.dim],Fr=Math.floor(Tr[0]),Vr=Math.floor(Tr[1]),mn=Tr[0]-Fr,Dn=Tr[1]-Vr;return Nt.get(Fr,Vr)*(1-mn)*(1-Dn)+Nt.get(Fr+1,Vr)*mn*(1-Dn)+Nt.get(Fr,Vr+1)*(1-mn)*Dn+Nt.get(Fr+1,Vr+1)*mn*Dn}getElevationForLngLatZoom(O,fe){if(!r.bb(fe,O.wrap()))return 0;const{tileID:Re,mercatorX:Oe,mercatorY:We}=this._getOverscaledTileIDFromLngLatZoom(O,fe);return this.getElevation(Re,Oe%r.X,We%r.X,r.X)}getElevation(O,fe,Re,Oe=r.X){return this.getDEMElevation(O,fe,Re,Oe)*this.exaggeration}getTerrainData(O){if(!this._emptyDemTexture){const Oe=this.painter.context,We=new r.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new f(Oe,We,Oe.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new f(Oe,new r.R({width:1,height:1}),Oe.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(Oe.gl.NEAREST,Oe.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=r.an([])}const fe=this.sourceCache.getSourceTile(O,!0);if(fe&&fe.dem&&(!fe.demTexture||fe.needsTerrainPrepare)){const Oe=this.painter.context;fe.demTexture=this.painter.getTileTexture(fe.dem.stride),fe.demTexture?fe.demTexture.update(fe.dem.getPixels(),{premultiply:!1}):fe.demTexture=new f(Oe,fe.dem.getPixels(),Oe.gl.RGBA,{premultiply:!1}),fe.demTexture.bind(Oe.gl.NEAREST,Oe.gl.CLAMP_TO_EDGE),fe.needsTerrainPrepare=!1}const Re=fe&&fe+fe.tileID.key+O.key;if(Re&&!this._demMatrixCache[Re]){const Oe=this.sourceCache.sourceCache._source.maxzoom;let We=O.canonical.z-fe.tileID.canonical.z;O.overscaledZ>O.canonical.z&&(O.canonical.z>=Oe?We=O.canonical.z-Oe:r.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const Ct=O.canonical.x-(O.canonical.x>>We<<We),Nt=O.canonical.y-(O.canonical.y>>We<<We),rr=r.bc(new Float64Array(16),[1/(r.X<<We),1/(r.X<<We),0]);r.J(rr,rr,[Ct*r.X,Nt*r.X,0]),this._demMatrixCache[O.key]={matrix:rr,coord:O}}return{u_depth:2,u_terrain:3,u_terrain_dim:fe&&fe.dem&&fe.dem.dim||1,u_terrain_matrix:Re?this._demMatrixCache[O.key].matrix:this._emptyDemMatrix,u_terrain_unpack:fe&&fe.dem&&fe.dem.getUnpackVector()||this._emptyDemUnpack,u_terrain_exaggeration:this.exaggeration,texture:(fe&&fe.demTexture||this._emptyDemTexture).texture,depthTexture:(this._fboDepthTexture||this._emptyDepthTexture).texture,tile:fe}}getFramebuffer(O){const fe=this.painter,Re=fe.width/devicePixelRatio,Oe=fe.height/devicePixelRatio;return!this._fbo||this._fbo.width===Re&&this._fbo.height===Oe||(this._fbo.destroy(),this._fboCoordsTexture.destroy(),this._fboDepthTexture.destroy(),delete this._fbo,delete this._fboDepthTexture,delete this._fboCoordsTexture),this._fboCoordsTexture||(this._fboCoordsTexture=new f(fe.context,{width:Re,height:Oe,data:null},fe.context.gl.RGBA,{premultiply:!1}),this._fboCoordsTexture.bind(fe.context.gl.NEAREST,fe.context.gl.CLAMP_TO_EDGE)),this._fboDepthTexture||(this._fboDepthTexture=new f(fe.context,{width:Re,height:Oe,data:null},fe.context.gl.RGBA,{premultiply:!1}),this._fboDepthTexture.bind(fe.context.gl.NEAREST,fe.context.gl.CLAMP_TO_EDGE)),this._fbo||(this._fbo=fe.context.createFramebuffer(Re,Oe,!0,!1),this._fbo.depthAttachment.set(fe.context.createRenderbuffer(fe.context.gl.DEPTH_COMPONENT16,Re,Oe))),this._fbo.colorAttachment.set(O==="coords"?this._fboCoordsTexture.texture:this._fboDepthTexture.texture),this._fbo}getCoordsTexture(){const O=this.painter.context;if(this._coordsTexture)return this._coordsTexture;const fe=new Uint8Array(this._coordsTextureSize*this._coordsTextureSize*4);for(let We=0,Ct=0;We<this._coordsTextureSize;We++)for(let Nt=0;Nt<this._coordsTextureSize;Nt++,Ct+=4)fe[Ct+0]=255&Nt,fe[Ct+1]=255&We,fe[Ct+2]=Nt>>8<<4|We>>8,fe[Ct+3]=0;const Re=new r.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(fe.buffer)),Oe=new f(O,Re,O.gl.RGBA,{premultiply:!1});return Oe.bind(O.gl.NEAREST,O.gl.CLAMP_TO_EDGE),this._coordsTexture=Oe,Oe}pointCoordinate(O){this.painter.maybeDrawDepthAndCoords(!0);const fe=new Uint8Array(4),Re=this.painter.context,Oe=Re.gl,We=Math.round(O.x*this.painter.pixelRatio/devicePixelRatio),Ct=Math.round(O.y*this.painter.pixelRatio/devicePixelRatio),Nt=Math.round(this.painter.height/devicePixelRatio);Re.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),Oe.readPixels(We,Nt-Ct-1,1,1,Oe.RGBA,Oe.UNSIGNED_BYTE,fe),Re.bindFramebuffer.set(null);const rr=fe[0]+(fe[2]>>4<<8),Tr=fe[1]+((15&fe[2])<<8),Fr=this.coordsIndex[255-fe[3]],Vr=Fr&&this.sourceCache.getTileByID(Fr);if(!Vr)return null;const mn=this._coordsTextureSize,Dn=(1<<Vr.tileID.canonical.z)*mn;return new r.Z((Vr.tileID.canonical.x*mn+rr)/Dn+Vr.tileID.wrap,(Vr.tileID.canonical.y*mn+Tr)/Dn,this.getElevation(Vr.tileID,rr,Tr,mn))}depthAtPoint(O){const fe=new Uint8Array(4),Re=this.painter.context,Oe=Re.gl;return Re.bindFramebuffer.set(this.getFramebuffer("depth").framebuffer),Oe.readPixels(O.x,this.painter.height/devicePixelRatio-O.y-1,1,1,Oe.RGBA,Oe.UNSIGNED_BYTE,fe),Re.bindFramebuffer.set(null),(fe[0]/16777216+fe[1]/65536+fe[2]/256+fe[3])/256}getTerrainMesh(){if(this._mesh)return this._mesh;const O=this.painter.context,fe=new r.bd,Re=new r.aY,Oe=this.meshSize,We=r.X/Oe,Ct=Oe*Oe;for(let Vr=0;Vr<=Oe;Vr++)for(let mn=0;mn<=Oe;mn++)fe.emplaceBack(mn*We,Vr*We,0);for(let Vr=0;Vr<Ct;Vr+=Oe+1)for(let mn=0;mn<Oe;mn++)Re.emplaceBack(mn+Vr,Oe+mn+Vr+1,Oe+mn+Vr+2),Re.emplaceBack(mn+Vr,Oe+mn+Vr+2,mn+Vr+1);const Nt=fe.length,rr=Nt+2*(Oe+1);for(const Vr of[0,1])for(let mn=0;mn<=Oe;mn++)for(const Dn of[0,1])fe.emplaceBack(mn*We,Vr*r.X,Dn);for(let Vr=0;Vr<2*Oe;Vr+=2)Re.emplaceBack(rr+Vr,rr+Vr+1,rr+Vr+3),Re.emplaceBack(rr+Vr,rr+Vr+3,rr+Vr+2),Re.emplaceBack(Nt+Vr,Nt+Vr+3,Nt+Vr+1),Re.emplaceBack(Nt+Vr,Nt+Vr+2,Nt+Vr+3);const Tr=fe.length,Fr=Tr+2*(Oe+1);for(const Vr of[0,1])for(let mn=0;mn<=Oe;mn++)for(const Dn of[0,1])fe.emplaceBack(Vr*r.X,mn*We,Dn);for(let Vr=0;Vr<2*Oe;Vr+=2)Re.emplaceBack(Tr+Vr,Tr+Vr+1,Tr+Vr+3),Re.emplaceBack(Tr+Vr,Tr+Vr+3,Tr+Vr+2),Re.emplaceBack(Fr+Vr,Fr+Vr+3,Fr+Vr+1),Re.emplaceBack(Fr+Vr,Fr+Vr+2,Fr+Vr+3);return this._mesh=new Gc(O.createVertexBuffer(fe,gs.members),O.createIndexBuffer(Re),r.a0.simpleSegment(0,0,fe.length,Re.length)),this._mesh}getMeshFrameDelta(O){return 2*Math.PI*r.be/Math.pow(2,O)/5}getMinTileElevationForLngLatZoom(O,fe){var Re;const{tileID:Oe}=this._getOverscaledTileIDFromLngLatZoom(O,fe);return(Re=this.getMinMaxElevation(Oe).minElevation)!==null&&Re!==void 0?Re:0}getMinMaxElevation(O){const fe=this.getTerrainData(O).tile,Re={minElevation:null,maxElevation:null};return fe&&fe.dem&&(Re.minElevation=fe.dem.min*this.exaggeration,Re.maxElevation=fe.dem.max*this.exaggeration),Re}_getOverscaledTileIDFromLngLatZoom(O,fe){const Re=r.Z.fromLngLat(O.wrap()),Oe=(1<<fe)*r.X,We=Re.x*Oe,Ct=Re.y*Oe,Nt=Math.floor(We/r.X),rr=Math.floor(Ct/r.X);return{tileID:new r.S(fe,0,fe,Nt,rr),mercatorX:We,mercatorY:Ct}}}class au{constructor(O,fe,Re){this._context=O,this._size=fe,this._tileSize=Re,this._objects=[],this._recentlyUsed=[],this._stamp=0}destruct(){for(const O of this._objects)O.texture.destroy(),O.fbo.destroy()}_createObject(O){const fe=this._context.createFramebuffer(this._tileSize,this._tileSize,!0,!0),Re=new f(this._context,{width:this._tileSize,height:this._tileSize,data:null},this._context.gl.RGBA);return Re.bind(this._context.gl.LINEAR,this._context.gl.CLAMP_TO_EDGE),fe.depthAttachment.set(this._context.createRenderbuffer(this._context.gl.DEPTH_STENCIL,this._tileSize,this._tileSize)),fe.colorAttachment.set(Re.texture),{id:O,fbo:fe,texture:Re,stamp:-1,inUse:!1}}getObjectForId(O){return this._objects[O]}useObject(O){O.inUse=!0,this._recentlyUsed=this._recentlyUsed.filter(fe=>O.id!==fe),this._recentlyUsed.push(O.id)}stampObject(O){O.stamp=++this._stamp}getOrCreateFreeObject(){for(const fe of this._recentlyUsed)if(!this._objects[fe].inUse)return this._objects[fe];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");const O=this._createObject(this._objects.length);return this._objects.push(O),O}freeObject(O){O.inUse=!1}freeAllObjects(){for(const O of this._objects)this.freeObject(O)}isFull(){return!(this._objects.length<this._size)&&this._objects.some(O=>!O.inUse)===!1}}const Bl={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class iu{constructor(O,fe){this.painter=O,this.terrain=fe,this.pool=new au(O.context,30,fe.sourceCache.tileSize*fe.qualityFactor)}destruct(){this.pool.destruct()}getTexture(O){return this.pool.getObjectForId(O.rtt[this._stacks.length-1].id).texture}prepareForRender(O,fe){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=O._order.filter(Re=>!O._layers[Re].isHidden(fe)),this._coordsDescendingInv={};for(const Re in O.sourceCaches){this._coordsDescendingInv[Re]={};const Oe=O.sourceCaches[Re].getVisibleCoordinates();for(const We of Oe){const Ct=this.terrain.sourceCache.getTerrainCoords(We);for(const Nt in Ct)this._coordsDescendingInv[Re][Nt]||(this._coordsDescendingInv[Re][Nt]=[]),this._coordsDescendingInv[Re][Nt].push(Ct[Nt])}}this._coordsDescendingInvStr={};for(const Re of O._order){const Oe=O._layers[Re],We=Oe.source;if(Bl[Oe.type]&&!this._coordsDescendingInvStr[We]){this._coordsDescendingInvStr[We]={};for(const Ct in this._coordsDescendingInv[We])this._coordsDescendingInvStr[We][Ct]=this._coordsDescendingInv[We][Ct].map(Nt=>Nt.key).sort().join()}}for(const Re of this._renderableTiles)for(const Oe in this._coordsDescendingInvStr){const We=this._coordsDescendingInvStr[Oe][Re.tileID.key];We&&We!==Re.rttCoords[Oe]&&(Re.rtt=[])}}renderLayer(O){if(O.isHidden(this.painter.transform.zoom))return!1;const fe=O.type,Re=this.painter,Oe=this._renderableLayerIds[this._renderableLayerIds.length-1]===O.id;if(Bl[fe]&&(this._prevType&&Bl[this._prevType]||this._stacks.push([]),this._prevType=fe,this._stacks[this._stacks.length-1].push(O.id),!Oe))return!0;if(Bl[this._prevType]||Bl[fe]&&Oe){this._prevType=fe;const We=this._stacks.length-1,Ct=this._stacks[We]||[];for(const Nt of this._renderableTiles){if(this.pool.isFull()&&(Pu(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(Nt),Nt.rtt[We]){const Tr=this.pool.getObjectForId(Nt.rtt[We].id);if(Tr.stamp===Nt.rtt[We].stamp){this.pool.useObject(Tr);continue}}const rr=this.pool.getOrCreateFreeObject();this.pool.useObject(rr),this.pool.stampObject(rr),Nt.rtt[We]={id:rr.id,stamp:rr.stamp},Re.context.bindFramebuffer.set(rr.fbo.framebuffer),Re.context.clear({color:r.aM.transparent,stencil:0}),Re.currentStencilSource=void 0;for(let Tr=0;Tr<Ct.length;Tr++){const Fr=Re.style._layers[Ct[Tr]],Vr=Fr.source?this._coordsDescendingInv[Fr.source][Nt.tileID.key]:[Nt.tileID];Re.context.viewport.set([0,0,rr.fbo.width,rr.fbo.height]),Re._renderTileClippingMasks(Fr,Vr),Re.renderLayer(Re,Re.style.sourceCaches[Fr.source],Fr,Vr),Fr.source&&(Nt.rttCoords[Fr.source]=this._coordsDescendingInvStr[Fr.source][Nt.tileID.key])}}return Pu(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects(),Bl[fe]}return!1}}const hl={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"MapLibre logo","Map.Title":"Map","Marker.Title":"Map marker","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","Popup.Close":"Close popup","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm","TerrainControl.Enable":"Enable terrain","TerrainControl.Disable":"Disable terrain","CooperativeGesturesHandler.WindowsHelpText":"Use Ctrl + scroll to zoom the map","CooperativeGesturesHandler.MacHelpText":"Use ⌘ + scroll to zoom the map","CooperativeGesturesHandler.MobileHelpText":"Use two fingers to move the map"},Bu=a,Ou={hash:!1,interactive:!0,bearingSnap:7,attributionControl:is,maplibreLogo:!1,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,refreshExpiredTiles:!0,scrollZoom:!0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,cooperativeGestures:!1,trackResize:!0,center:[0,0],zoom:0,bearing:0,pitch:0,renderWorldCopies:!0,maxTileCacheSize:null,maxTileCacheZoomLevels:r.a.MAX_TILE_CACHE_ZOOM_LEVELS,transformRequest:null,transformCameraUpdate:null,fadeDuration:300,crossSourceCollisions:!0,clickTolerance:3,localIdeographFontFamily:"sans-serif",pitchWithRotate:!0,validateStyle:!0,maxCanvasSize:[4096,4096],cancelPendingTileRequestsWhileZooming:!0},eu=Ze=>{Ze.touchstart=Ze.dragStart,Ze.touchmoveWindow=Ze.dragMove,Ze.touchend=Ze.dragEnd},No={showCompass:!0,showZoom:!0,visualizePitch:!1};class Ls{constructor(O,fe,Re=!1){this.mousedown=Ct=>{this.startMouse(r.e({},Ct,{ctrlKey:!0,preventDefault:()=>Ct.preventDefault()}),o.mousePos(this.element,Ct)),o.addEventListener(window,"mousemove",this.mousemove),o.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=Ct=>{this.moveMouse(Ct,o.mousePos(this.element,Ct))},this.mouseup=Ct=>{this.mouseRotate.dragEnd(Ct),this.mousePitch&&this.mousePitch.dragEnd(Ct),this.offTemp()},this.touchstart=Ct=>{Ct.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=o.touchPos(this.element,Ct.targetTouches)[0],this.startTouch(Ct,this._startPos),o.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),o.addEventListener(window,"touchend",this.touchend))},this.touchmove=Ct=>{Ct.targetTouches.length!==1?this.reset():(this._lastPos=o.touchPos(this.element,Ct.targetTouches)[0],this.moveTouch(Ct,this._lastPos))},this.touchend=Ct=>{Ct.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),delete this._startPos,delete this._lastPos,this.offTemp()},this.reset=()=>{this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),this.touchRotate.reset(),this.touchPitch&&this.touchPitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10;const Oe=O.dragRotate._mouseRotate.getClickTolerance(),We=O.dragRotate._mousePitch.getClickTolerance();this.element=fe,this.mouseRotate=xc({clickTolerance:Oe,enable:!0}),this.touchRotate=(({enable:Ct,clickTolerance:Nt,bearingDegreesPerPixelMoved:rr=.8})=>{const Tr=new kh;return new af({clickTolerance:Nt,move:(Fr,Vr)=>({bearingDelta:(Vr.x-Fr.x)*rr}),moveStateManager:Tr,enable:Ct,assignEvents:eu})})({clickTolerance:Oe,enable:!0}),this.map=O,Re&&(this.mousePitch=dd({clickTolerance:We,enable:!0}),this.touchPitch=(({enable:Ct,clickTolerance:Nt,pitchDegreesPerPixelMoved:rr=-.5})=>{const Tr=new kh;return new af({clickTolerance:Nt,move:(Fr,Vr)=>({pitchDelta:(Vr.y-Fr.y)*rr}),moveStateManager:Tr,enable:Ct,assignEvents:eu})})({clickTolerance:We,enable:!0})),o.addEventListener(fe,"mousedown",this.mousedown),o.addEventListener(fe,"touchstart",this.touchstart,{passive:!1}),o.addEventListener(fe,"touchcancel",this.reset)}startMouse(O,fe){this.mouseRotate.dragStart(O,fe),this.mousePitch&&this.mousePitch.dragStart(O,fe),o.disableDrag()}startTouch(O,fe){this.touchRotate.dragStart(O,fe),this.touchPitch&&this.touchPitch.dragStart(O,fe),o.disableDrag()}moveMouse(O,fe){const Re=this.map,{bearingDelta:Oe}=this.mouseRotate.dragMove(O,fe)||{};if(Oe&&Re.setBearing(Re.getBearing()+Oe),this.mousePitch){const{pitchDelta:We}=this.mousePitch.dragMove(O,fe)||{};We&&Re.setPitch(Re.getPitch()+We)}}moveTouch(O,fe){const Re=this.map,{bearingDelta:Oe}=this.touchRotate.dragMove(O,fe)||{};if(Oe&&Re.setBearing(Re.getBearing()+Oe),this.touchPitch){const{pitchDelta:We}=this.touchPitch.dragMove(O,fe)||{};We&&Re.setPitch(Re.getPitch()+We)}}off(){const O=this.element;o.removeEventListener(O,"mousedown",this.mousedown),o.removeEventListener(O,"touchstart",this.touchstart,{passive:!1}),o.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),o.removeEventListener(window,"touchend",this.touchend),o.removeEventListener(O,"touchcancel",this.reset),this.offTemp()}offTemp(){o.enableDrag(),o.removeEventListener(window,"mousemove",this.mousemove),o.removeEventListener(window,"mouseup",this.mouseup),o.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),o.removeEventListener(window,"touchend",this.touchend)}}let Wl;function Cl(Ze,O,fe){const Re=new r.N(Ze.lng,Ze.lat);if(Ze=new r.N(Ze.lng,Ze.lat),O){const Oe=new r.N(Ze.lng-360,Ze.lat),We=new r.N(Ze.lng+360,Ze.lat),Ct=fe.locationPoint(Ze).distSqr(O);fe.locationPoint(Oe).distSqr(O)<Ct?Ze=Oe:fe.locationPoint(We).distSqr(O)<Ct&&(Ze=We)}for(;Math.abs(Ze.lng-fe.center.lng)>180;){const Oe=fe.locationPoint(Ze);if(Oe.x>=0&&Oe.y>=0&&Oe.x<=fe.width&&Oe.y<=fe.height)break;Ze.lng>fe.center.lng?Ze.lng-=360:Ze.lng+=360}return Ze.lng!==Re.lng&&fe.locationPoint(Ze).y>fe.height/2-fe.getHorizon()?Ze:Re}const Ec={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 Mc(Ze,O,fe){const Re=Ze.classList;for(const Oe in Ec)Re.remove(`maplibregl-${fe}-anchor-${Oe}`);Re.add(`maplibregl-${fe}-anchor-${O}`)}class Ic extends r.E{constructor(O){if(super(),this._onKeyPress=fe=>{const Re=fe.code,Oe=fe.charCode||fe.keyCode;Re!=="Space"&&Re!=="Enter"&&Oe!==32&&Oe!==13||this.togglePopup()},this._onMapClick=fe=>{const Re=fe.originalEvent.target,Oe=this._element;this._popup&&(Re===Oe||Oe.contains(Re))&&this.togglePopup()},this._update=fe=>{var Re;if(!this._map)return;const Oe=this._map.loaded()&&!this._map.isMoving();(fe?.type==="terrain"||fe?.type==="render"&&!Oe)&&this._map.once("render",this._update),this._lngLat=this._map.transform.renderWorldCopies?Cl(this._lngLat,this._flatPos,this._map.transform):(Re=this._lngLat)===null||Re===void 0?void 0:Re.wrap(),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationPoint(this._lngLat)._add(this._offset));let We="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?We=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(We=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let Ct="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?Ct="rotateX(0deg)":this._pitchAlignment==="map"&&(Ct=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||fe&&fe.type!=="moveend"||(this._pos=this._pos.round()),o.setTransform(this._element,`${Ec[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${Ct} ${We}`),s.frameAsync(new AbortController).then(()=>{this._updateOpacity(fe&&fe.type==="moveend")}).catch(()=>{})},this._onMove=fe=>{if(!this._isDragging){const Re=this._clickTolerance||this._map._clickTolerance;this._isDragging=fe.point.dist(this._pointerdownPos)>=Re}this._isDragging&&(this._pos=fe.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 r.k("dragstart"))),this.fire(new r.k("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new r.k("dragend")),this._state="inactive"},this._addDragHandler=fe=>{this._element.contains(fe.originalEvent.target)&&(fe.preventDefault(),this._positionDelta=fe.point.sub(this._pos).add(this._offset),this._pointerdownPos=fe.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},this._anchor=O&&O.anchor||"center",this._color=O&&O.color||"#3FB1CE",this._scale=O&&O.scale||1,this._draggable=O&&O.draggable||!1,this._clickTolerance=O&&O.clickTolerance||0,this._subpixelPositioning=O&&O.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=O&&O.rotation||0,this._rotationAlignment=O&&O.rotationAlignment||"auto",this._pitchAlignment=O&&O.pitchAlignment&&O.pitchAlignment!=="auto"?O.pitchAlignment:this._rotationAlignment,this.setOpacity(),this.setOpacity(O?.opacity,O?.opacityWhenCovered),O&&O.element)this._element=O.element,this._offset=r.P.convert(O&&O.offset||[0,0]);else{this._defaultMarker=!0,this._element=o.create("div");const fe=o.createNS("http://www.w3.org/2000/svg","svg"),Re=41,Oe=27;fe.setAttributeNS(null,"display","block"),fe.setAttributeNS(null,"height",`${Re}px`),fe.setAttributeNS(null,"width",`${Oe}px`),fe.setAttributeNS(null,"viewBox",`0 0 ${Oe} ${Re}`);const We=o.createNS("http://www.w3.org/2000/svg","g");We.setAttributeNS(null,"stroke","none"),We.setAttributeNS(null,"stroke-width","1"),We.setAttributeNS(null,"fill","none"),We.setAttributeNS(null,"fill-rule","evenodd");const Ct=o.createNS("http://www.w3.org/2000/svg","g");Ct.setAttributeNS(null,"fill-rule","nonzero");const Nt=o.createNS("http://www.w3.org/2000/svg","g");Nt.setAttributeNS(null,"transform","translate(3.0, 29.0)"),Nt.setAttributeNS(null,"fill","#000000");const rr=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];for(const Pt of rr){const Gt=o.createNS("http://www.w3.org/2000/svg","ellipse");Gt.setAttributeNS(null,"opacity","0.04"),Gt.setAttributeNS(null,"cx","10.5"),Gt.setAttributeNS(null,"cy","5.80029008"),Gt.setAttributeNS(null,"rx",Pt.rx),Gt.setAttributeNS(null,"ry",Pt.ry),Nt.appendChild(Gt)}const Tr=o.createNS("http://www.w3.org/2000/svg","g");Tr.setAttributeNS(null,"fill",this._color);const Fr=o.createNS("http://www.w3.org/2000/svg","path");Fr.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"),Tr.appendChild(Fr);const Vr=o.createNS("http://www.w3.org/2000/svg","g");Vr.setAttributeNS(null,"opacity","0.25"),Vr.setAttributeNS(null,"fill","#000000");const mn=o.createNS("http://www.w3.org/2000/svg","path");mn.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(mn);const Dn=o.createNS("http://www.w3.org/2000/svg","g");Dn.setAttributeNS(null,"transform","translate(6.0, 7.0)"),Dn.setAttributeNS(null,"fill","#FFFFFF");const nt=o.createNS("http://www.w3.org/2000/svg","g");nt.setAttributeNS(null,"transform","translate(8.0, 8.0)");const ct=o.createNS("http://www.w3.org/2000/svg","circle");ct.setAttributeNS(null,"fill","#000000"),ct.setAttributeNS(null,"opacity","0.25"),ct.setAttributeNS(null,"cx","5.5"),ct.setAttributeNS(null,"cy","5.5"),ct.setAttributeNS(null,"r","5.4999962");const Tt=o.createNS("http://www.w3.org/2000/svg","circle");Tt.setAttributeNS(null,"fill","#FFFFFF"),Tt.setAttributeNS(null,"cx","5.5"),Tt.setAttributeNS(null,"cy","5.5"),Tt.setAttributeNS(null,"r","5.4999962"),nt.appendChild(ct),nt.appendChild(Tt),Ct.appendChild(Nt),Ct.appendChild(Tr),Ct.appendChild(Vr),Ct.appendChild(Dn),Ct.appendChild(nt),fe.appendChild(Ct),fe.setAttributeNS(null,"height",Re*this._scale+"px"),fe.setAttributeNS(null,"width",Oe*this._scale+"px"),this._element.appendChild(fe),this._offset=r.P.convert(O&&O.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",fe=>{fe.preventDefault()}),this._element.addEventListener("mousedown",fe=>{fe.preventDefault()}),Mc(this._element,this._anchor,"marker"),O&&O.className)for(const fe of O.className.split(" "))this._element.classList.add(fe);this._popup=null}addTo(O){return this.remove(),this._map=O,this._element.setAttribute("aria-label",O._getUIString("Marker.Title")),O.getCanvasContainer().appendChild(this._element),O.on("move",this._update),O.on("moveend",this._update),O.on("terrain",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),o.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(O){return this._lngLat=r.N.convert(O),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(O){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),O){if(!("offset"in O.options)){const Oe=Math.abs(13.5)/Math.SQRT2;O.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[Oe,-1*(38.1-13.5+Oe)],"bottom-right":[-Oe,-1*(38.1-13.5+Oe)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=O,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(O){return this._subpixelPositioning=O,this}getPopup(){return this._popup}togglePopup(){const O=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:O?(O.isOpen()?O.remove():(O.setLngLat(this._lngLat),O.addTo(this._map)),this):this}_updateOpacity(O=!1){var fe,Re;if(!(!((fe=this._map)===null||fe===void 0)&&fe.terrain))return void(this._element.style.opacity!==this._opacity&&(this._element.style.opacity=this._opacity));if(O)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}const Oe=this._map,We=Oe.terrain.depthAtPoint(this._pos),Ct=Oe.terrain.getElevationForLngLatZoom(this._lngLat,Oe.transform.tileZoom);if(Oe.transform.lngLatToCameraDepth(this._lngLat,Ct)-We<.006)return void(this._element.style.opacity=this._opacity);const Nt=-this._offset.y/Oe.transform._pixelPerMeter,rr=Math.sin(Oe.getPitch()*Math.PI/180)*Nt,Tr=Oe.terrain.depthAtPoint(new r.P(this._pos.x,this._pos.y-this._offset.y)),Fr=Oe.transform.lngLatToCameraDepth(this._lngLat,Ct+rr)-Tr>.006;!((Re=this._popup)===null||Re===void 0)&&Re.isOpen()&&Fr&&this._popup.remove(),this._element.style.opacity=Fr?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(O){return this._offset=r.P.convert(O),this._update(),this}addClassName(O){this._element.classList.add(O)}removeClassName(O){this._element.classList.remove(O)}toggleClassName(O){return this._element.classList.toggle(O)}setDraggable(O){return this._draggable=!!O,this._map&&(O?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(O){return this._rotation=O||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(O){return this._rotationAlignment=O||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(O){return this._pitchAlignment=O&&O!=="auto"?O:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(O,fe){return O===void 0&&fe===void 0&&(this._opacity="1",this._opacityWhenCovered="0.2"),O!==void 0&&(this._opacity=O),fe!==void 0&&(this._opacityWhenCovered=fe),this._map&&this._updateOpacity(!0),this}}const uh={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let Cc=0,jf=!1;const ju={maxWidth:100,unit:"metric"};function Uf(Ze,O,fe){const Re=fe&&fe.maxWidth||100,Oe=Ze._container.clientHeight/2,We=Ze.unproject([0,Oe]),Ct=Ze.unproject([Re,Oe]),Nt=We.distanceTo(Ct);if(fe&&fe.unit==="imperial"){const rr=3.2808*Nt;rr>5280?os(O,Re,rr/5280,Ze._getUIString("ScaleControl.Miles")):os(O,Re,rr,Ze._getUIString("ScaleControl.Feet"))}else fe&&fe.unit==="nautical"?os(O,Re,Nt/1852,Ze._getUIString("ScaleControl.NauticalMiles")):Nt>=1e3?os(O,Re,Nt/1e3,Ze._getUIString("ScaleControl.Kilometers")):os(O,Re,Nt,Ze._getUIString("ScaleControl.Meters"))}function os(Ze,O,fe,Re){const Oe=(function(We){const Ct=Math.pow(10,`${Math.floor(We)}`.length-1);let Nt=We/Ct;return Nt=Nt>=10?10:Nt>=5?5:Nt>=3?3:Nt>=2?2:Nt>=1?1:(function(rr){const Tr=Math.pow(10,Math.ceil(-Math.log(rr)/Math.LN10));return Math.round(rr*Tr)/Tr})(Nt),Ct*Nt})(fe);Ze.style.width=O*(Oe/fe)+"px",Ze.innerHTML=`${Oe}&nbsp;${Re}`}const _s={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},qf=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function sf(Ze){if(Ze){if(typeof Ze=="number"){const O=Math.round(Math.abs(Ze)/Math.SQRT2);return{center:new r.P(0,0),top:new r.P(0,Ze),"top-left":new r.P(O,O),"top-right":new r.P(-O,O),bottom:new r.P(0,-Ze),"bottom-left":new r.P(O,-O),"bottom-right":new r.P(-O,-O),left:new r.P(Ze,0),right:new r.P(-Ze,0)}}if(Ze instanceof r.P||Array.isArray(Ze)){const O=r.P.convert(Ze);return{center:O,top:O,"top-left":O,"top-right":O,bottom:O,"bottom-left":O,"bottom-right":O,left:O,right:O}}return{center:r.P.convert(Ze.center||[0,0]),top:r.P.convert(Ze.top||[0,0]),"top-left":r.P.convert(Ze["top-left"]||[0,0]),"top-right":r.P.convert(Ze["top-right"]||[0,0]),bottom:r.P.convert(Ze.bottom||[0,0]),"bottom-left":r.P.convert(Ze["bottom-left"]||[0,0]),"bottom-right":r.P.convert(Ze["bottom-right"]||[0,0]),left:r.P.convert(Ze.left||[0,0]),right:r.P.convert(Ze.right||[0,0])}}return sf(new r.P(0,0))}const Yc=a;t.AJAXError=r.bh,t.Evented=r.E,t.LngLat=r.N,t.MercatorCoordinate=r.Z,t.Point=r.P,t.addProtocol=r.bi,t.config=r.a,t.removeProtocol=r.bj,t.AttributionControl=rs,t.BoxZoomHandler=gf,t.CanvasSource=vt,t.CooperativeGesturesHandler=Gi,t.DoubleClickZoomHandler=Ga,t.DragPanHandler=Ii,t.DragRotateHandler=oo,t.EdgeInsets=Sc,t.FullscreenControl=class extends r.E{constructor(Ze={}){super(),this._onFullscreenChange=()=>{var O;let fe=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((O=fe?.shadowRoot)===null||O===void 0)&&O.fullscreenElement;)fe=fe.shadowRoot.fullscreenElement;fe===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,Ze&&Ze.container&&(Ze.container instanceof HTMLElement?this._container=Ze.container:r.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(Ze){return this._map=Ze,this._container||(this._container=this._map.getContainer()),this._controlContainer=o.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){o.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){const Ze=this._fullscreenButton=o.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);o.create("span","maplibregl-ctrl-icon",Ze).setAttribute("aria-hidden","true"),Ze.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){const Ze=this._getTitle();this._fullscreenButton.setAttribute("aria-label",Ze),this._fullscreenButton.title=Ze}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new r.k("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new r.k("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},t.GeoJSONSource=Ve,t.GeolocateControl=class extends r.E{constructor(Ze){super(),this._onSuccess=O=>{if(this._map){if(this._isOutOfMapMaxBounds(O))return this._setErrorState(),this.fire(new r.k("outofmaxbounds",O)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=O,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(O),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(O),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new r.k("geolocate",O)),this._finish()}},this._updateCamera=O=>{const fe=new r.N(O.coords.longitude,O.coords.latitude),Re=O.coords.accuracy,Oe=this._map.getBearing(),We=r.e({bearing:Oe},this.options.fitBoundsOptions),Ct=ue.fromLngLat(fe,Re);this._map.fitBounds(Ct,We,{geolocateSource:!0})},this._updateMarker=O=>{if(O){const fe=new r.N(O.coords.longitude,O.coords.latitude);this._accuracyCircleMarker.setLngLat(fe).addTo(this._map),this._userLocationDotMarker.setLngLat(fe).addTo(this._map),this._accuracy=O.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onZoom=()=>{this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},this._onError=O=>{if(this._map){if(this.options.trackUserLocation)if(O.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;const fe=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=fe,this._geolocateButton.setAttribute("aria-label",fe),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(O.code===3&&jf)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new r.k("error",O)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",O=>O.preventDefault()),this._geolocateButton=o.create("button","maplibregl-ctrl-geolocate",this._container),o.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=O=>{if(this._map){if(O===!1){r.w("Geolocation support is not available so the GeolocateControl will be disabled.");const fe=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=fe,this._geolocateButton.setAttribute("aria-label",fe)}else{const fe=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=fe,this._geolocateButton.setAttribute("aria-label",fe)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=o.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new Ic({element:this._dotElement}),this._circleElement=o.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Ic({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",fe=>{fe.geolocateSource||this._watchState!=="ACTIVE_LOCK"||fe.originalEvent&&fe.originalEvent.type==="resize"||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new r.k("trackuserlocationend")),this.fire(new r.k("userlocationlostfocus")))})}},this.options=r.e({},uh,Ze)}onAdd(Ze){return this._map=Ze,this._container=o.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),(function(){return r._(this,arguments,void 0,function*(O=!1){if(Wl!==void 0&&!O)return Wl;if(window.navigator.permissions===void 0)return Wl=!!window.navigator.geolocation,Wl;try{Wl=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{Wl=!!window.navigator.geolocation}return Wl})})().then(O=>this._finishSetupUI(O)),this._container}onRemove(){this._geolocationWatchID!==void 0&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),o.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Cc=0,jf=!1}_isOutOfMapMaxBounds(Ze){const O=this._map.getMaxBounds(),fe=Ze.coords;return O&&(fe.longitude<O.getWest()||fe.longitude>O.getEast()||fe.latitude<O.getSouth()||fe.latitude>O.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadius(){const Ze=this._map.getBounds(),O=Ze.getSouthEast(),fe=Ze.getNorthEast(),Re=O.distanceTo(fe),Oe=Math.ceil(this._accuracy/(Re/this._map._container.clientHeight)*2);this._circleElement.style.width=`${Oe}px`,this._circleElement.style.height=`${Oe}px`}trigger(){if(!this._setup)return r.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new r.k("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Cc--,jf=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new r.k("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new r.k("trackuserlocationstart")),this.fire(new r.k("userlocationfocus"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let Ze;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Cc++,Cc>1?(Ze={maximumAge:6e5,timeout:0},jf=!0):(Ze=this.options.positionOptions,jf=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,Ze)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},t.Hash=Sf,t.ImageSource=mt,t.KeyboardHandler=Gr,t.LngLatBounds=ue,t.LogoControl=mo,t.Map=class extends $o{constructor(Ze){r.bf.mark(r.bg.create);const O=Object.assign(Object.assign({},Ou),Ze);if(O.minZoom!=null&&O.maxZoom!=null&&O.minZoom>O.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(O.minPitch!=null&&O.maxPitch!=null&&O.minPitch>O.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(O.minPitch!=null&&O.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(O.maxPitch!=null&&O.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new bu(O.minZoom,O.maxZoom,O.minPitch,O.maxPitch,O.renderWorldCopies),{bearingSnap:O.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new Ji,this._controls=[],this._mapId=r.a4(),this._contextLost=fe=>{fe.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new r.k("webglcontextlost",{originalEvent:fe}))},this._contextRestored=fe=>{this._setupPainter(),this.resize(),this._update(),this.fire(new r.k("webglcontextrestored",{originalEvent:fe}))},this._onMapScroll=fe=>{if(fe.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=O.interactive,this._maxTileCacheSize=O.maxTileCacheSize,this._maxTileCacheZoomLevels=O.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=O.failIfMajorPerformanceCaveat===!0,this._preserveDrawingBuffer=O.preserveDrawingBuffer===!0,this._antialias=O.antialias===!0,this._trackResize=O.trackResize===!0,this._bearingSnap=O.bearingSnap,this._refreshExpiredTiles=O.refreshExpiredTiles===!0,this._fadeDuration=O.fadeDuration,this._crossSourceCollisions=O.crossSourceCollisions===!0,this._collectResourceTiming=O.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},hl),O.locale),this._clickTolerance=O.clickTolerance,this._overridePixelRatio=O.pixelRatio,this._maxCanvasSize=O.maxCanvasSize,this.transformCameraUpdate=O.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=O.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=c.addThrottleControl(()=>this.isMoving()),this._requestManager=new _(O.transformRequest),typeof O.container=="string"){if(this._container=document.getElementById(O.container),!this._container)throw new Error(`Container '${O.container}' not found.`)}else{if(!(O.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=O.container}if(O.maxBounds&&this.setMaxBounds(O.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)).on("moveend",()=>this._update(!1)).on("zoom",()=>this._update(!0)).on("terrain",()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)}).once("idle",()=>{this._idleTriggered=!0}),typeof window<"u"){addEventListener("online",this._onWindowOnline,!1);let fe=!1;const Re=mh(Oe=>{this._trackResize&&!this._removed&&(this.resize(Oe),this.redraw())},50);this._resizeObserver=new ResizeObserver(Oe=>{fe?Re(Oe):fe=!0}),this._resizeObserver.observe(this._container)}this.handlers=new es(this,O),this._hash=O.hash&&new Sf(typeof O.hash=="string"&&O.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:O.center,zoom:O.zoom,bearing:O.bearing,pitch:O.pitch}),O.bounds&&(this.resize(),this.fitBounds(O.bounds,r.e({},O.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=O.localIdeographFontFamily,this._validateStyle=O.validateStyle,O.style&&this.setStyle(O.style,{localIdeographFontFamily:O.localIdeographFontFamily}),O.attributionControl&&this.addControl(new rs(typeof O.attributionControl=="boolean"?void 0:O.attributionControl)),O.maplibreLogo&&this.addControl(new mo,O.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",fe=>{this._update(fe.dataType==="style"),this.fire(new r.k(`${fe.dataType}data`,fe))}),this.on("dataloading",fe=>{this.fire(new r.k(`${fe.dataType}dataloading`,fe))}),this.on("dataabort",fe=>{this.fire(new r.k("sourcedataabort",fe))})}_getMapId(){return this._mapId}addControl(Ze,O){if(O===void 0&&(O=Ze.getDefaultPosition?Ze.getDefaultPosition():"top-right"),!Ze||!Ze.onAdd)return this.fire(new r.j(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const fe=Ze.onAdd(this);this._controls.push(Ze);const Re=this._controlPositions[O];return O.indexOf("bottom")!==-1?Re.insertBefore(fe,Re.firstChild):Re.appendChild(fe),this}removeControl(Ze){if(!Ze||!Ze.onRemove)return this.fire(new r.j(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const O=this._controls.indexOf(Ze);return O>-1&&this._controls.splice(O,1),Ze.onRemove(this),this}hasControl(Ze){return this._controls.indexOf(Ze)>-1}calculateCameraOptionsFromTo(Ze,O,fe,Re){return Re==null&&this.terrain&&(Re=this.terrain.getElevationForLngLatZoom(fe,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(Ze,O,fe,Re)}resize(Ze){var O;const fe=this._containerDimensions(),Re=fe[0],Oe=fe[1],We=this._getClampedPixelRatio(Re,Oe);if(this._resizeCanvas(Re,Oe,We),this.painter.resize(Re,Oe,We),this.painter.overLimit()){const Nt=this.painter.context.gl;this._maxCanvasSize=[Nt.drawingBufferWidth,Nt.drawingBufferHeight];const rr=this._getClampedPixelRatio(Re,Oe);this._resizeCanvas(Re,Oe,rr),this.painter.resize(Re,Oe,rr)}this.transform.resize(Re,Oe),(O=this._requestedCameraState)===null||O===void 0||O.resize(Re,Oe);const Ct=!this._moving;return Ct&&(this.stop(),this.fire(new r.k("movestart",Ze)).fire(new r.k("move",Ze))),this.fire(new r.k("resize",Ze)),Ct&&this.fire(new r.k("moveend",Ze)),this}_getClampedPixelRatio(Ze,O){const{0:fe,1:Re}=this._maxCanvasSize,Oe=this.getPixelRatio(),We=Ze*Oe,Ct=O*Oe;return Math.min(We>fe?fe/We:1,Ct>Re?Re/Ct:1)*Oe}getPixelRatio(){var Ze;return(Ze=this._overridePixelRatio)!==null&&Ze!==void 0?Ze:devicePixelRatio}setPixelRatio(Ze){this._overridePixelRatio=Ze,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(Ze){return this.transform.setMaxBounds(ue.convert(Ze)),this._update()}setMinZoom(Ze){if((Ze=Ze??-2)>=-2&&Ze<=this.transform.maxZoom)return this.transform.minZoom=Ze,this._update(),this.getZoom()<Ze&&this.setZoom(Ze),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(Ze){if((Ze=Ze??22)>=this.transform.minZoom)return this.transform.maxZoom=Ze,this._update(),this.getZoom()>Ze&&this.setZoom(Ze),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(Ze){if((Ze=Ze??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(Ze>=0&&Ze<=this.transform.maxPitch)return this.transform.minPitch=Ze,this._update(),this.getPitch()<Ze&&this.setPitch(Ze),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(Ze){if((Ze=Ze??60)>85)throw new Error("maxPitch must be less than or equal to 85");if(Ze>=this.transform.minPitch)return this.transform.maxPitch=Ze,this._update(),this.getPitch()>Ze&&this.setPitch(Ze),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(Ze){return this.transform.renderWorldCopies=Ze,this._update()}project(Ze){return this.transform.locationPoint(r.N.convert(Ze),this.style&&this.terrain)}unproject(Ze){return this.transform.pointLocation(r.P.convert(Ze),this.terrain)}isMoving(){var Ze;return this._moving||((Ze=this.handlers)===null||Ze===void 0?void 0:Ze.isMoving())}isZooming(){var Ze;return this._zooming||((Ze=this.handlers)===null||Ze===void 0?void 0:Ze.isZooming())}isRotating(){var Ze;return this._rotating||((Ze=this.handlers)===null||Ze===void 0?void 0:Ze.isRotating())}_createDelegatedListener(Ze,O,fe){if(Ze==="mouseenter"||Ze==="mouseover"){let Re=!1;return{layers:O,listener:fe,delegates:{mousemove:We=>{const Ct=O.filter(rr=>this.getLayer(rr)),Nt=Ct.length!==0?this.queryRenderedFeatures(We.point,{layers:Ct}):[];Nt.length?Re||(Re=!0,fe.call(this,new gc(Ze,this,We.originalEvent,{features:Nt}))):Re=!1},mouseout:()=>{Re=!1}}}}if(Ze==="mouseleave"||Ze==="mouseout"){let Re=!1;return{layers:O,listener:fe,delegates:{mousemove:Ct=>{const Nt=O.filter(rr=>this.getLayer(rr));(Nt.length!==0?this.queryRenderedFeatures(Ct.point,{layers:Nt}):[]).length?Re=!0:Re&&(Re=!1,fe.call(this,new gc(Ze,this,Ct.originalEvent)))},mouseout:Ct=>{Re&&(Re=!1,fe.call(this,new gc(Ze,this,Ct.originalEvent)))}}}}{const Re=Oe=>{const We=O.filter(Nt=>this.getLayer(Nt)),Ct=We.length!==0?this.queryRenderedFeatures(Oe.point,{layers:We}):[];Ct.length&&(Oe.features=Ct,fe.call(this,Oe),delete Oe.features)};return{layers:O,listener:fe,delegates:{[Ze]:Re}}}}_saveDelegatedListener(Ze,O){this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[Ze]=this._delegatedListeners[Ze]||[],this._delegatedListeners[Ze].push(O)}_removeDelegatedListener(Ze,O,fe){if(!this._delegatedListeners||!this._delegatedListeners[Ze])return;const Re=this._delegatedListeners[Ze];for(let Oe=0;Oe<Re.length;Oe++){const We=Re[Oe];if(We.listener===fe&&We.layers.length===O.length&&We.layers.every(Ct=>O.includes(Ct))){for(const Ct in We.delegates)this.off(Ct,We.delegates[Ct]);return void Re.splice(Oe,1)}}}on(Ze,O,fe){if(fe===void 0)return super.on(Ze,O);const Re=this._createDelegatedListener(Ze,typeof O=="string"?[O]:O,fe);this._saveDelegatedListener(Ze,Re);for(const Oe in Re.delegates)this.on(Oe,Re.delegates[Oe]);return this}once(Ze,O,fe){if(fe===void 0)return super.once(Ze,O);const Re=typeof O=="string"?[O]:O,Oe=this._createDelegatedListener(Ze,Re,fe);for(const We in Oe.delegates){const Ct=Oe.delegates[We];Oe.delegates[We]=(...Nt)=>{this._removeDelegatedListener(Ze,Re,fe),Ct(...Nt)}}this._saveDelegatedListener(Ze,Oe);for(const We in Oe.delegates)this.once(We,Oe.delegates[We]);return this}off(Ze,O,fe){return fe===void 0?super.off(Ze,O):(this._removeDelegatedListener(Ze,typeof O=="string"?[O]:O,fe),this)}queryRenderedFeatures(Ze,O){if(!this.style)return[];let fe;const Re=Ze instanceof r.P||Array.isArray(Ze),Oe=Re?Ze:[[0,0],[this.transform.width,this.transform.height]];if(O=O||(Re?{}:Ze)||{},Oe instanceof r.P||typeof Oe[0]=="number")fe=[r.P.convert(Oe)];else{const We=r.P.convert(Oe[0]),Ct=r.P.convert(Oe[1]);fe=[We,new r.P(Ct.x,We.y),Ct,new r.P(We.x,Ct.y),We]}return this.style.queryRenderedFeatures(fe,O,this.transform)}querySourceFeatures(Ze,O){return this.style.querySourceFeatures(Ze,O)}setStyle(Ze,O){return(O=r.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},O)).diff!==!1&&O.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&Ze?(this._diffStyle(Ze,O),this):(this._localIdeographFontFamily=O.localIdeographFontFamily,this._updateStyle(Ze,O))}setTransformRequest(Ze){return this._requestManager.setTransformRequest(Ze),this}_getUIString(Ze){const O=this._locale[Ze];if(O==null)throw new Error(`Missing UI string '${Ze}'`);return O}_updateStyle(Ze,O){if(O.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(Ze,O));const fe=this.style&&O.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!Ze)),Ze?(this.style=new tn(this,O||{}),this.style.setEventedParent(this,{style:this.style}),typeof Ze=="string"?this.style.loadURL(Ze,O,fe):this.style.loadJSON(Ze,O,fe),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new tn(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(Ze,O){if(typeof Ze=="string"){const fe=this._requestManager.transformRequest(Ze,"Style");r.h(fe,new AbortController).then(Re=>{this._updateDiff(Re.data,O)}).catch(Re=>{Re&&this.fire(new r.j(Re))})}else typeof Ze=="object"&&this._updateDiff(Ze,O)}_updateDiff(Ze,O){try{this.style.setState(Ze,O)&&this._update(!0)}catch(fe){r.w(`Unable to perform style diff: ${fe.message||fe.error||fe}.  Rebuilding the style from scratch.`),this._updateStyle(Ze,O)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():r.w("There is no style added to the map.")}addSource(Ze,O){return this._lazyInitEmptyStyle(),this.style.addSource(Ze,O),this._update(!0)}isSourceLoaded(Ze){const O=this.style&&this.style.sourceCaches[Ze];if(O!==void 0)return O.loaded();this.fire(new r.j(new Error(`There is no source with ID '${Ze}'`)))}setTerrain(Ze){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),Ze){const O=this.style.sourceCaches[Ze.source];if(!O)throw new Error(`cannot load terrain, because there exists no source with ID: ${Ze.source}`);this.terrain===null&&O.reload();for(const fe in this.style._layers){const Re=this.style._layers[fe];Re.type==="hillshade"&&Re.source===Ze.source&&r.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new Nl(this.painter,O,Ze),this.painter.renderToTexture=new iu(this.painter,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._terrainDataCallback=fe=>{fe.dataType==="style"?this.terrain.sourceCache.freeRtt():fe.dataType==="source"&&fe.tile&&(fe.sourceId!==Ze.source||this._elevationFreeze||(this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.terrain.sourceCache.freeRtt(fe.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.sourceCache.destruct(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.minElevationForCurrentTile=0,this.transform.elevation=0;return this.fire(new r.k("terrain",{terrain:Ze})),this}getTerrain(){var Ze,O;return(O=(Ze=this.terrain)===null||Ze===void 0?void 0:Ze.options)!==null&&O!==void 0?O:null}areTilesLoaded(){const Ze=this.style&&this.style.sourceCaches;for(const O in Ze){const fe=Ze[O]._tiles;for(const Re in fe){const Oe=fe[Re];if(Oe.state!=="loaded"&&Oe.state!=="errored")return!1}}return!0}removeSource(Ze){return this.style.removeSource(Ze),this._update(!0)}getSource(Ze){return this.style.getSource(Ze)}addImage(Ze,O,fe={}){const{pixelRatio:Re=1,sdf:Oe=!1,stretchX:We,stretchY:Ct,content:Nt,textFitWidth:rr,textFitHeight:Tr}=fe;if(this._lazyInitEmptyStyle(),!(O instanceof HTMLImageElement||r.b(O))){if(O.width===void 0||O.height===void 0)return this.fire(new r.j(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{const{width:Fr,height:Vr,data:mn}=O,Dn=O;return this.style.addImage(Ze,{data:new r.R({width:Fr,height:Vr},new Uint8Array(mn)),pixelRatio:Re,stretchX:We,stretchY:Ct,content:Nt,textFitWidth:rr,textFitHeight:Tr,sdf:Oe,version:0,userImage:Dn}),Dn.onAdd&&Dn.onAdd(this,Ze),this}}{const{width:Fr,height:Vr,data:mn}=s.getImageData(O);this.style.addImage(Ze,{data:new r.R({width:Fr,height:Vr},mn),pixelRatio:Re,stretchX:We,stretchY:Ct,content:Nt,textFitWidth:rr,textFitHeight:Tr,sdf:Oe,version:0})}}updateImage(Ze,O){const fe=this.style.getImage(Ze);if(!fe)return this.fire(new r.j(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const Re=O instanceof HTMLImageElement||r.b(O)?s.getImageData(O):O,{width:Oe,height:We,data:Ct}=Re;if(Oe===void 0||We===void 0)return this.fire(new r.j(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(Oe!==fe.data.width||We!==fe.data.height)return this.fire(new r.j(new Error("The width and height of the updated image must be that same as the previous version of the image")));const Nt=!(O instanceof HTMLImageElement||r.b(O));return fe.data.replace(Ct,Nt),this.style.updateImage(Ze,fe),this}getImage(Ze){return this.style.getImage(Ze)}hasImage(Ze){return Ze?!!this.style.getImage(Ze):(this.fire(new r.j(new Error("Missing required image id"))),!1)}removeImage(Ze){this.style.removeImage(Ze)}loadImage(Ze){return c.getImage(this._requestManager.transformRequest(Ze,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(Ze,O){return this._lazyInitEmptyStyle(),this.style.addLayer(Ze,O),this._update(!0)}moveLayer(Ze,O){return this.style.moveLayer(Ze,O),this._update(!0)}removeLayer(Ze){return this.style.removeLayer(Ze),this._update(!0)}getLayer(Ze){return this.style.getLayer(Ze)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(Ze,O,fe){return this.style.setLayerZoomRange(Ze,O,fe),this._update(!0)}setFilter(Ze,O,fe={}){return this.style.setFilter(Ze,O,fe),this._update(!0)}getFilter(Ze){return this.style.getFilter(Ze)}setPaintProperty(Ze,O,fe,Re={}){return this.style.setPaintProperty(Ze,O,fe,Re),this._update(!0)}getPaintProperty(Ze,O){return this.style.getPaintProperty(Ze,O)}setLayoutProperty(Ze,O,fe,Re={}){return this.style.setLayoutProperty(Ze,O,fe,Re),this._update(!0)}getLayoutProperty(Ze,O){return this.style.getLayoutProperty(Ze,O)}setGlyphs(Ze,O={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(Ze,O),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(Ze,O,fe={}){return this._lazyInitEmptyStyle(),this.style.addSprite(Ze,O,fe,Re=>{Re||this._update(!0)}),this}removeSprite(Ze){return this._lazyInitEmptyStyle(),this.style.removeSprite(Ze),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(Ze,O={}){return this._lazyInitEmptyStyle(),this.style.setSprite(Ze,O,fe=>{fe||this._update(!0)}),this}setLight(Ze,O={}){return this._lazyInitEmptyStyle(),this.style.setLight(Ze,O),this._update(!0)}getLight(){return this.style.getLight()}setSky(Ze){return this._lazyInitEmptyStyle(),this.style.setSky(Ze),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(Ze,O){return this.style.setFeatureState(Ze,O),this._update()}removeFeatureState(Ze,O){return this.style.removeFeatureState(Ze,O),this._update()}getFeatureState(Ze){return this.style.getFeatureState(Ze)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let Ze=0,O=0;return this._container&&(Ze=this._container.clientWidth||400,O=this._container.clientHeight||300),[Ze,O]}_setupContainer(){const Ze=this._container;Ze.classList.add("maplibregl-map");const O=this._canvasContainer=o.create("div","maplibregl-canvas-container",Ze);this._interactive&&O.classList.add("maplibregl-interactive"),this._canvas=o.create("canvas","maplibregl-canvas",O),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex",this._interactive?"0":"-1"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region");const fe=this._containerDimensions(),Re=this._getClampedPixelRatio(fe[0],fe[1]);this._resizeCanvas(fe[0],fe[1],Re);const Oe=this._controlContainer=o.create("div","maplibregl-control-container",Ze),We=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(Ct=>{We[Ct]=o.create("div",`maplibregl-ctrl-${Ct} `,Oe)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(Ze,O,fe){this._canvas.width=Math.floor(fe*Ze),this._canvas.height=Math.floor(fe*O),this._canvas.style.width=`${Ze}px`,this._canvas.style.height=`${O}px`}_setupPainter(){const Ze={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1};let O=null;this._canvas.addEventListener("webglcontextcreationerror",Re=>{O={requestedAttributes:Ze},Re&&(O.statusMessage=Re.statusMessage,O.type=Re.type)},{once:!0});const fe=this._canvas.getContext("webgl2",Ze)||this._canvas.getContext("webgl",Ze);if(!fe){const Re="Failed to initialize WebGL";throw O?(O.message=Re,new Error(JSON.stringify(O))):new Error(Re)}this.painter=new Qf(fe,this.transform),u.testSupport(fe)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(Ze){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||Ze,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(Ze){return this._update(),this._renderTaskQueue.add(Ze)}_cancelRenderFrame(Ze){this._renderTaskQueue.remove(Ze)}_render(Ze){const O=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(Ze),this._removed)return;let fe=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const Oe=this.transform.zoom,We=s.now();this.style.zoomHistory.update(Oe,We);const Ct=new r.z(Oe,{now:We,fadeDuration:O,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),Nt=Ct.crossFadingFactor();Nt===1&&Nt===this._crossFadingFactor||(fe=!0,this._crossFadingFactor=Nt),this.style.update(Ct)}this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._elevationFreeze||(this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.minElevationForCurrentTile=0,this.transform.elevation=0),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,O,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:O,showPadding:this.showPadding}),this.fire(new r.k("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,r.bf.mark(r.bg.load),this.fire(new r.k("load"))),this.style&&(this.style.hasTransitions()||fe)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();const Re=this._sourcesDirty||this._styleDirty||this._placementDirty;return Re||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new r.k("idle")),!this._loaded||this._fullyLoaded||Re||(this._fullyLoaded=!0,r.bf.mark(r.bg.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var Ze;this._hash&&this._hash.remove();for(const fe of this._controls)fe.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&removeEventListener("online",this._onWindowOnline,!1),c.removeThrottleControl(this._imageQueueHandle),(Ze=this._resizeObserver)===null||Ze===void 0||Ze.disconnect();const O=this.painter.context.gl.getExtension("WEBGL_lose_context");O?.loseContext&&O.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),o.remove(this._canvasContainer),o.remove(this._controlContainer),this._container.classList.remove("maplibregl-map"),r.bf.clearMetrics(),this._removed=!0,this.fire(new r.k("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,s.frameAsync(this._frameRequest).then(Ze=>{r.bf.frame(Ze),this._frameRequest=null,this._render(Ze)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(Ze){this._showTileBoundaries!==Ze&&(this._showTileBoundaries=Ze,this._update())}get showPadding(){return!!this._showPadding}set showPadding(Ze){this._showPadding!==Ze&&(this._showPadding=Ze,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(Ze){this._showCollisionBoxes!==Ze&&(this._showCollisionBoxes=Ze,Ze?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(Ze){this._showOverdrawInspector!==Ze&&(this._showOverdrawInspector=Ze,this._update())}get repaint(){return!!this._repaint}set repaint(Ze){this._repaint!==Ze&&(this._repaint=Ze,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(Ze){this._vertices=Ze,this._update()}get version(){return Bu}getCameraTargetElevation(){return this.transform.elevation}},t.MapMouseEvent=gc,t.MapTouchEvent=yh,t.MapWheelEvent=hd,t.Marker=Ic,t.NavigationControl=class{constructor(Ze){this._updateZoomButtons=()=>{const O=this._map.getZoom(),fe=O===this._map.getMaxZoom(),Re=O===this._map.getMinZoom();this._zoomInButton.disabled=fe,this._zoomOutButton.disabled=Re,this._zoomInButton.setAttribute("aria-disabled",fe.toString()),this._zoomOutButton.setAttribute("aria-disabled",Re.toString())},this._rotateCompassArrow=()=>{const O=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=O},this._setButtonTitle=(O,fe)=>{const Re=this._map._getUIString(`NavigationControl.${fe}`);O.title=Re,O.setAttribute("aria-label",Re)},this.options=r.e({},No,Ze),this._container=o.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",O=>O.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",O=>this._map.zoomIn({},{originalEvent:O})),o.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",O=>this._map.zoomOut({},{originalEvent:O})),o.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",O=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:O}):this._map.resetNorth({},{originalEvent:O})}),this._compassIcon=o.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(Ze){return this._map=Ze,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 Ls(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){o.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(Ze,O){const fe=o.create("button",Ze,this._container);return fe.type="button",fe.addEventListener("click",O),fe}},t.Popup=class extends r.E{constructor(Ze){super(),this.remove=()=>(this._content&&o.remove(this._content),this._container&&(o.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new r.k("close"))),this),this._onMouseUp=O=>{this._update(O.point)},this._onMouseMove=O=>{this._update(O.point)},this._onDrag=O=>{this._update(O.point)},this._update=O=>{var fe;if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=o.create("div","maplibregl-popup",this._map.getContainer()),this._tip=o.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(const Nt of this.options.className.split(" "))this._container.classList.add(Nt);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=this._map.transform.renderWorldCopies&&!this._trackPointer?Cl(this._lngLat,this._flatPos,this._map.transform):(fe=this._lngLat)===null||fe===void 0?void 0:fe.wrap(),this._trackPointer&&!O)return;const Re=this._flatPos=this._pos=this._trackPointer&&O?O:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&O?O:this._map.transform.locationPoint(this._lngLat));let Oe=this.options.anchor;const We=sf(this.options.offset);if(!Oe){const Nt=this._container.offsetWidth,rr=this._container.offsetHeight;let Tr;Tr=Re.y+We.bottom.y<rr?["top"]:Re.y>this._map.transform.height-rr?["bottom"]:[],Re.x<Nt/2?Tr.push("left"):Re.x>this._map.transform.width-Nt/2&&Tr.push("right"),Oe=Tr.length===0?"bottom":Tr.join("-")}let Ct=Re.add(We[Oe]);this.options.subpixelPositioning||(Ct=Ct.round()),o.setTransform(this._container,`${Ec[Oe]} translate(${Ct.x}px,${Ct.y}px)`),Mc(this._container,Oe,"popup")},this._onClose=()=>{this.remove()},this.options=r.e(Object.create(_s),Ze)}addTo(Ze){return this._map&&this.remove(),this._map=Ze,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new r.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(Ze){return this._lngLat=r.N.convert(Ze),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(Ze){return this.setDOMContent(document.createTextNode(Ze))}setHTML(Ze){const O=document.createDocumentFragment(),fe=document.createElement("body");let Re;for(fe.innerHTML=Ze;Re=fe.firstChild,Re;)O.appendChild(Re);return this.setDOMContent(O)}getMaxWidth(){var Ze;return(Ze=this._container)===null||Ze===void 0?void 0:Ze.style.maxWidth}setMaxWidth(Ze){return this.options.maxWidth=Ze,this._update(),this}setDOMContent(Ze){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=o.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(Ze),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(Ze){return this._container&&this._container.classList.add(Ze),this}removeClassName(Ze){return this._container&&this._container.classList.remove(Ze),this}setOffset(Ze){return this.options.offset=Ze,this._update(),this}toggleClassName(Ze){if(this._container)return this._container.classList.toggle(Ze)}setSubpixelPositioning(Ze){this.options.subpixelPositioning=Ze}_createCloseButton(){this.options.closeButton&&(this._closeButton=o.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="&#215;",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const Ze=this._container.querySelector(qf);Ze&&Ze.focus()}},t.RasterDEMTileSource=Xe,t.RasterTileSource=ze,t.ScaleControl=class{constructor(Ze){this._onMove=()=>{Uf(this._map,this._container,this.options)},this.setUnit=O=>{this.options.unit=O,Uf(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},ju),Ze)}getDefaultPosition(){return"bottom-left"}onAdd(Ze){return this._map=Ze,this._container=o.create("div","maplibregl-ctrl maplibregl-ctrl-scale",Ze.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){o.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},t.ScrollZoomHandler=ta,t.Style=tn,t.TerrainControl=class{constructor(Ze){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=Ze}onAdd(Ze){return this._map=Ze,this._container=o.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=o.create("button","maplibregl-ctrl-terrain",this._container),o.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){o.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},t.TwoFingersTouchPitchHandler=rd,t.TwoFingersTouchRotateHandler=rh,t.TwoFingersTouchZoomHandler=Rc,t.TwoFingersTouchZoomRotateHandler=hi,t.VectorTileSource=Le,t.VideoSource=_t,t.addSourceType=(Ze,O)=>r._(void 0,void 0,void 0,function*(){if(Fe(Ze))throw new Error(`A source type called "${Ze}" already exists.`);((fe,Re)=>{ut[fe]=Re})(Ze,O)}),t.clearPrewarmedResources=function(){const Ze=me;Ze&&(Ze.isPreloaded()&&Ze.numActive()===1?(Ze.release(le),me=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},t.getMaxParallelImageRequests=function(){return r.a.MAX_PARALLEL_IMAGE_REQUESTS},t.getRTLTextPluginStatus=function(){return yt().getRTLTextPluginStatus()},t.getVersion=function(){return Yc},t.getWorkerCount=function(){return ge.workerCount},t.getWorkerUrl=function(){return r.a.WORKER_URL},t.importScriptInWorkers=function(Ze){return ee().broadcast("IS",Ze)},t.prewarm=function(){ie().acquire(le)},t.setMaxParallelImageRequests=function(Ze){r.a.MAX_PARALLEL_IMAGE_REQUESTS=Ze},t.setRTLTextPlugin=function(Ze,O){return yt().setRTLTextPlugin(Ze,O)},t.setWorkerCount=function(Ze){ge.workerCount=Ze},t.setWorkerUrl=function(Ze){r.a.WORKER_URL=Ze}});var P=v;return P})}}),zte=Ne({"src/plots/map/layers.js"(te,Z){var v=In(),w=hc().sanitizeHTML,C=vF(),P=Bb();function t(s,o){this.subplot=s,this.uid=s.uid+"-"+o,this.index=o,this.idSource="source-"+this.uid,this.idLayer=P.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var r=t.prototype;r.update=function(o){this.visible?this.needsNewImage(o)?this.updateImage(o):this.needsNewSource(o)?(this.removeLayer(),this.updateSource(o),this.updateLayer(o)):this.needsNewLayer(o)?this.updateLayer(o):this.updateStyle(o):(this.updateSource(o),this.updateLayer(o)),this.visible=a(o)},r.needsNewImage=function(s){var o=this.subplot.map;return o.getSource(this.idSource)&&this.sourceType==="image"&&s.sourcetype==="image"&&(this.source!==s.source||JSON.stringify(this.coordinates)!==JSON.stringify(s.coordinates))},r.needsNewSource=function(s){return this.sourceType!==s.sourcetype||JSON.stringify(this.source)!==JSON.stringify(s.source)||this.layerType!==s.type},r.needsNewLayer=function(s){return this.layerType!==s.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},r.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},r.updateImage=function(s){var o=this.subplot.map;o.getSource(this.idSource).updateImage({url:s.source,coordinates:s.coordinates});var u=this.findFollowingMapLayerId(this.lookupBelow());u!==null&&this.subplot.map.moveLayer(this.idLayer,u)},r.updateSource=function(s){var o=this.subplot.map;if(o.getSource(this.idSource)&&o.removeSource(this.idSource),this.sourceType=s.sourcetype,this.source=s.source,!!a(s)){var u=i(s);o.addSource(this.idSource,u)}},r.findFollowingMapLayerId=function(s){if(s==="traces")for(var o=this.subplot.getMapLayers(),u=0;u<o.length;u++){var d=o[u].id;if(typeof d=="string"&&d.indexOf(P.traceLayerPrefix)===0){s=d;break}}return s},r.updateLayer=function(s){var o=this.subplot,u=l(s),d=this.lookupBelow(),h=this.findFollowingMapLayerId(d);this.removeLayer(),a(s)&&o.addLayer({id:this.idLayer,source:this.idSource,"source-layer":s.sourcelayer||"",type:s.type,minzoom:s.minzoom,maxzoom:s.maxzoom,layout:u.layout,paint:u.paint},h),this.layerType=s.type,this.below=d},r.updateStyle=function(s){if(a(s)){var o=l(s);this.subplot.setOptions(this.idLayer,"setLayoutProperty",o.layout),this.subplot.setOptions(this.idLayer,"setPaintProperty",o.paint)}},r.removeLayer=function(){var s=this.subplot.map;s.getLayer(this.idLayer)&&s.removeLayer(this.idLayer)},r.dispose=function(){var s=this.subplot.map;s.getLayer(this.idLayer)&&s.removeLayer(this.idLayer),s.getSource(this.idSource)&&s.removeSource(this.idSource)};function a(s){if(!s.visible)return!1;var o=s.source;if(Array.isArray(o)&&o.length>0){for(var u=0;u<o.length;u++)if(typeof o[u]!="string"||o[u].length===0)return!1;return!0}return v.isPlainObject(o)||typeof o=="string"&&o.length>0}function l(s){var o={},u={};switch(s.type){case"circle":v.extendFlat(u,{"circle-radius":s.circle.radius,"circle-color":s.color,"circle-opacity":s.opacity});break;case"line":v.extendFlat(u,{"line-width":s.line.width,"line-color":s.color,"line-opacity":s.opacity,"line-dasharray":s.line.dash});break;case"fill":v.extendFlat(u,{"fill-color":s.color,"fill-outline-color":s.fill.outlinecolor,"fill-opacity":s.opacity});break;case"symbol":var d=s.symbol,h=C(d.textposition,d.iconsize);v.extendFlat(o,{"icon-image":d.icon+"-15","icon-size":d.iconsize/10,"text-field":d.text,"text-size":d.textfont.size,"text-anchor":h.anchor,"text-offset":h.offset,"symbol-placement":d.placement}),v.extendFlat(u,{"icon-color":s.color,"text-color":d.textfont.color,"text-opacity":s.opacity});break;case"raster":v.extendFlat(u,{"raster-fade-duration":0,"raster-opacity":s.opacity});break}return{layout:o,paint:u}}function i(s){var o=s.sourcetype,u=s.source,d={type:o},h;return o==="geojson"?h="data":o==="vector"?h=typeof u=="string"?"url":"tiles":o==="raster"?(h="tiles",d.tileSize=256):o==="image"&&(h="url",d.coordinates=s.coordinates),d[h]=u,s.sourceattribution&&(d.attribution=w(s.sourceattribution)),d}Z.exports=function(o,u,d){var h=new t(o,u);return h.update(d),h}}}),Nte=Ne({"src/plots/map/map.js"(te,Z){var v=Ote(),w=In(),C=Ob(),P=Yo(),t=Os(),r=Uv(),a=oh(),l=Pm(),i=l.drawMode,s=l.selectMode,o=dh().prepSelect,u=dh().clearOutline,d=dh().clearSelectionsCache,h=dh().selectOnClick,g=Bb(),m=zte();function E(b,A){this.id=A,this.gd=b;var y=b._fullLayout,f=b._context;this.container=y._glcontainer.node(),this.isStatic=f.staticPlot,this.uid=y._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(y),this.map=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var c=E.prototype;c.plot=function(b,A,y){var f=this,p;f.map?p=new Promise(function(x,N){f.updateMap(b,A,x,N)}):p=new Promise(function(x,N){f.createMap(b,A,x,N)}),y.push(p)},c.createMap=function(b,A,y,f){var p=this,x=A[p.id],N=p.styleObj=T(x.style),D=x.bounds,B=D?[[D.west,D.south],[D.east,D.north]]:null,U=p.map=new v.Map({container:p.div,style:N.style,center:k(x.center),zoom:x.zoom,bearing:x.bearing,pitch:x.pitch,maxBounds:B,interactive:!p.isStatic,preserveDrawingBuffer:p.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new v.AttributionControl({compact:!0})),V={};U.on("styleimagemissing",function(z){var H=z.id;if(!V[H]&&H.includes("-15")){V[H]=!0;var G=new Image(15,15);G.onload=function(){U.addImage(H,G)},G.crossOrigin="Anonymous",G.src="https://unpkg.com/maki@2.1.0/icons/"+H+".svg"}}),U.setTransformRequest(function(z){return z=z.replace("https://fonts.openmaptiles.org/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),z=z.replace("https://tiles.basemaps.cartocdn.com/fonts/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),z=z.replace("https://fonts.openmaptiles.org/Open Sans Regular,Arial Unicode MS Regular","https://fonts.openmaptiles.org/Klokantech Noto Sans Regular"),{url:z}}),U._canvas.style.left="0px",U._canvas.style.top="0px",p.rejectOnError(f),p.isStatic||p.initFx(b,A);var q=[];q.push(new Promise(function(z){U.once("load",z)})),q=q.concat(C.fetchTraceGeoData(b)),Promise.all(q).then(function(){p.fillBelowLookup(b,A),p.updateData(b),p.updateLayout(A),p.resolveOnRender(y)}).catch(f)},c.updateMap=function(b,A,y,f){var p=this,x=p.map,N=A[this.id];p.rejectOnError(f);var D=[],B=T(N.style);JSON.stringify(p.styleObj)!==JSON.stringify(B)&&(p.styleObj=B,x.setStyle(B.style),p.traceHash={},D.push(new Promise(function(U){x.once("styledata",U)}))),D=D.concat(C.fetchTraceGeoData(b)),Promise.all(D).then(function(){p.fillBelowLookup(b,A),p.updateData(b),p.updateLayout(A),p.resolveOnRender(y)}).catch(f)},c.fillBelowLookup=function(b,A){var y=A[this.id],f=y.layers,p,x,N=this.belowLookup={},D=!1;for(p=0;p<b.length;p++){var B=b[p][0].trace,U=B._module;typeof B.below=="string"?x=B.below:U.getBelow&&(x=U.getBelow(B,this)),x===""&&(D=!0),N["trace-"+B.uid]=x||""}for(p=0;p<f.length;p++){var V=f[p];typeof V.below=="string"?x=V.below:D?x="traces":x="",N["layout-"+p]=x}var q={},z,H;for(z in N)x=N[z],q[x]?q[x].push(z):q[x]=[z];for(x in q){var G=q[x];if(G.length>1)for(p=0;p<G.length;p++)z=G[p],z.indexOf("trace-")===0?(H=z.split("trace-")[1],this.traceHash[H]&&(this.traceHash[H].below=null)):z.indexOf("layout-")===0&&(H=z.split("layout-")[1],this.layerList[H]&&(this.layerList[H].below=null))}};var _={choroplethmap:0,densitymap:1,scattermap:2};c.updateData=function(b){var A=this.traceHash,y,f,p,x,N=b.slice().sort(function(q,z){return _[q[0].trace.type]-_[z[0].trace.type]});for(p=0;p<N.length;p++){var D=N[p];f=D[0].trace,y=A[f.uid];var B=!1;y&&(y.type===f.type?(y.update(D),B=!0):y.dispose()),!B&&f._module&&(A[f.uid]=f._module.plot(this,D))}var U=Object.keys(A);e:for(p=0;p<U.length;p++){var V=U[p];for(x=0;x<b.length;x++)if(f=b[x][0].trace,V===f.uid)continue e;y=A[V],y.dispose(),delete A[V]}},c.updateLayout=function(b){var A=this.map,y=b[this.id];!this.dragging&&!this.wheeling&&(A.setCenter(k(y.center)),A.setZoom(y.zoom),A.setBearing(y.bearing),A.setPitch(y.pitch)),this.updateLayers(b),this.updateFramework(b),this.updateFx(b),this.map.resize(),this.gd._context._scrollZoom.map?A.scrollZoom.enable():A.scrollZoom.disable()},c.resolveOnRender=function(b){var A=this.map;A.on("render",function y(){A.loaded()&&(A.off("render",y),setTimeout(b,10))})},c.rejectOnError=function(b){var A=this.map;function y(){b(new Error(g.mapOnErrorMsg))}A.once("error",y),A.once("style.error",y),A.once("source.error",y),A.once("tile.error",y),A.once("layer.error",y)},c.createFramework=function(b){var A=this,y=A.div=document.createElement("div");y.id=A.uid,y.style.position="absolute",A.container.appendChild(y),A.xaxis={_id:"x",c2p:function(f){return A.project(f).x}},A.yaxis={_id:"y",c2p:function(f){return A.project(f).y}},A.updateFramework(b),A.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},t.setConvert(A.mockAxis,b)},c.initFx=function(b,A){var y=this,f=y.gd,p=y.map;p.on("moveend",function(D){if(y.map){var B=f._fullLayout;if(D.originalEvent||y.wheeling){var U=B[y.id];P.call("_storeDirectGUIEdit",f.layout,B._preGUI,y.getViewEdits(U));var V=y.getView();U._input.center=U.center=V.center,U._input.zoom=U.zoom=V.zoom,U._input.bearing=U.bearing=V.bearing,U._input.pitch=U.pitch=V.pitch,f.emit("plotly_relayout",y.getViewEditsWithDerived(V))}D.originalEvent&&D.originalEvent.type==="mouseup"?y.dragging=!1:y.wheeling&&(y.wheeling=!1),B&&B._rehover&&B._rehover()}}),p.on("wheel",function(){y.wheeling=!0}),p.on("mousemove",function(D){var B=y.div.getBoundingClientRect(),U=[D.originalEvent.offsetX,D.originalEvent.offsetY];D.target.getBoundingClientRect=function(){return B},y.xaxis.p2c=function(){return p.unproject(U).lng},y.yaxis.p2c=function(){return p.unproject(U).lat},f._fullLayout._rehover=function(){f._fullLayout._hoversubplot===y.id&&f._fullLayout[y.id]&&a.hover(f,D,y.id)},a.hover(f,D,y.id),f._fullLayout._hoversubplot=y.id});function x(){a.loneUnhover(A._hoverlayer)}p.on("dragstart",function(){y.dragging=!0,x()}),p.on("zoomstart",x),p.on("mouseout",function(){f._fullLayout._hoversubplot=null});function N(){var D=y.getView();f.emit("plotly_relayouting",y.getViewEditsWithDerived(D))}p.on("drag",N),p.on("zoom",N),p.on("dblclick",function(){var D=f._fullLayout[y.id];P.call("_storeDirectGUIEdit",f.layout,f._fullLayout._preGUI,y.getViewEdits(D));var B=y.viewInitial;p.setCenter(k(B.center)),p.setZoom(B.zoom),p.setBearing(B.bearing),p.setPitch(B.pitch);var U=y.getView();D._input.center=D.center=U.center,D._input.zoom=D.zoom=U.zoom,D._input.bearing=D.bearing=U.bearing,D._input.pitch=D.pitch=U.pitch,f.emit("plotly_doubleclick",null),f.emit("plotly_relayout",y.getViewEditsWithDerived(U))}),y.clearOutline=function(){d(y.dragOptions),u(y.dragOptions.gd)},y.onClickInPanFn=function(D){return function(B){var U=f._fullLayout.clickmode;U.indexOf("select")>-1&&h(B.originalEvent,f,[y.xaxis],[y.yaxis],y.id,D),U.indexOf("event")>-1&&a.click(f,B.originalEvent)}}},c.updateFx=function(b){var A=this,y=A.map,f=A.gd;if(A.isStatic)return;function p(B){var U=A.map.unproject(B);return[U.lng,U.lat]}var x=b.dragmode,N;N=function(B,U){if(U.isRect){var V=B.range={};V[A.id]=[p([U.xmin,U.ymin]),p([U.xmax,U.ymax])]}else{var q=B.lassoPoints={};q[A.id]=U.map(p)}};var D=A.dragOptions;A.dragOptions=w.extendDeep(D||{},{dragmode:b.dragmode,element:A.div,gd:f,plotinfo:{id:A.id,domain:b[A.id].domain,xaxis:A.xaxis,yaxis:A.yaxis,fillRangeItems:N},xaxes:[A.xaxis],yaxes:[A.yaxis],subplot:A.id}),y.off("click",A.onClickInPanHandler),s(x)||i(x)?(y.dragPan.disable(),y.on("zoomstart",A.clearOutline),A.dragOptions.prepFn=function(B,U,V){o(B,U,V,A.dragOptions,x)},r.init(A.dragOptions)):(y.dragPan.enable(),y.off("zoomstart",A.clearOutline),A.div.onmousedown=null,A.div.ontouchstart=null,A.div.removeEventListener("touchstart",A.div._ontouchstart),A.onClickInPanHandler=A.onClickInPanFn(A.dragOptions),y.on("click",A.onClickInPanHandler))},c.updateFramework=function(b){var A=b[this.id].domain,y=b._size,f=this.div.style;f.width=y.w*(A.x[1]-A.x[0])+"px",f.height=y.h*(A.y[1]-A.y[0])+"px",f.left=y.l+A.x[0]*y.w+"px",f.top=y.t+(1-A.y[1])*y.h+"px",this.xaxis._offset=y.l+A.x[0]*y.w,this.xaxis._length=y.w*(A.x[1]-A.x[0]),this.yaxis._offset=y.t+(1-A.y[1])*y.h,this.yaxis._length=y.h*(A.y[1]-A.y[0])},c.updateLayers=function(b){var A=b[this.id],y=A.layers,f=this.layerList,p;if(y.length!==f.length){for(p=0;p<f.length;p++)f[p].dispose();for(f=this.layerList=[],p=0;p<y.length;p++)f.push(m(this,p,y[p]))}else for(p=0;p<y.length;p++)f[p].update(y[p])},c.destroy=function(){this.map&&(this.map.remove(),this.map=null,this.container.removeChild(this.div))},c.toImage=function(){return this.map.stop(),this.map.getCanvas().toDataURL()},c.setOptions=function(b,A,y){for(var f in y)this.map[A](b,f,y[f])},c.getMapLayers=function(){return this.map.getStyle().layers},c.addLayer=function(b,A){var y=this.map;if(typeof A=="string"){if(A===""){y.addLayer(b,A);return}for(var f=this.getMapLayers(),p=0;p<f.length;p++)if(A===f[p].id){y.addLayer(b,A);return}w.warn(["Trying to add layer with *below* value",A,"referencing a layer that does not exist","or that does not yet exist."].join(" "))}y.addLayer(b)},c.project=function(b){return this.map.project(new v.LngLat(b[0],b[1]))},c.getView=function(){var b=this.map,A=b.getCenter(),y=A.lng,f=A.lat,p={lon:y,lat:f},x=b.getCanvas(),N=parseInt(x.style.width),D=parseInt(x.style.height);return{center:p,zoom:b.getZoom(),bearing:b.getBearing(),pitch:b.getPitch(),_derived:{coordinates:[b.unproject([0,0]).toArray(),b.unproject([N,0]).toArray(),b.unproject([N,D]).toArray(),b.unproject([0,D]).toArray()]}}},c.getViewEdits=function(b){for(var A=this.id,y=["center","zoom","bearing","pitch"],f={},p=0;p<y.length;p++){var x=y[p];f[A+"."+x]=b[x]}return f},c.getViewEditsWithDerived=function(b){var A=this.id,y=this.getViewEdits(b);return y[A+"._derived"]=b._derived,y};function T(b){var A={};return w.isPlainObject(b)?(A.id=b.id,A.style=b):typeof b=="string"?(A.id=b,g.stylesMap[b]?A.style=g.stylesMap[b]:A.style=b):(A.id=g.styleValueDflt,A.style=M(g.styleValueDflt)),A.transition={duration:0,delay:0},A}function M(b){return g.styleUrlPrefix+b+"-"+g.styleUrlSuffix}function k(b){return[b.lon,b.lat]}Z.exports=E}}),Fte=Ne({"src/plots/map/layout_defaults.js"(te,Z){var v=In(),w=W0(),C=jd(),P=_k();Z.exports=function(l,i,s){w(l,i,s,{type:"map",attributes:P,handleDefaults:t,partition:"y"})};function t(a,l,i){i("style"),i("center.lon"),i("center.lat"),i("zoom"),i("bearing"),i("pitch");var s=i("bounds.west"),o=i("bounds.east"),u=i("bounds.south"),d=i("bounds.north");(s===void 0||o===void 0||u===void 0||d===void 0)&&delete l.bounds,C(a,l,{name:"layers",handleItemDefaults:r}),l._input=a}function r(a,l){function i(g,m){return v.coerce(a,l,P.layers,g,m)}var s=i("visible");if(s){var o=i("sourcetype"),u=o==="raster"||o==="image";i("source"),i("sourceattribution"),o==="vector"&&i("sourcelayer"),o==="image"&&i("coordinates");var d;u&&(d="raster");var h=i("type",d);u&&h!=="raster"&&(h=l.type="raster",v.log("Source types *raster* and *image* must drawn *raster* layer type.")),i("below"),i("color"),i("opacity"),i("minzoom"),i("maxzoom"),h==="circle"&&i("circle.radius"),h==="line"&&(i("line.width"),i("line.dash")),h==="fill"&&i("fill.outlinecolor"),h==="symbol"&&(i("symbol.icon"),i("symbol.iconsize"),i("symbol.text"),v.coerceFont(i,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),i("symbol.textposition"),i("symbol.placement"))}}}}),XR=Ne({"src/plots/map/index.js"(te){var Z=In(),v=Z.strTranslate,w=Z.strScale,C=lv().getSubplotCalcData,P=hp(),t=xn(),r=zs(),a=hc(),l=Nte(),i="map";te.name=i,te.attr="subplot",te.idRoot=i,te.idRegex=te.attrRegex=Z.counterRegex(i),te.attributes={subplot:{valType:"subplotid",dflt:"map",editType:"calc"}},te.layoutAttributes=_k(),te.supplyLayoutDefaults=Fte(),te.plot=function(o){for(var u=o._fullLayout,d=o.calcdata,h=u._subplots[i],g=0;g<h.length;g++){var m=h[g],E=C(d,i,m),c=u[m],_=c._subplot;_||(_=new l(o,m),u[m]._subplot=_),_.viewInitial||(_.viewInitial={center:Z.extendFlat({},c.center),zoom:c.zoom,bearing:c.bearing,pitch:c.pitch}),_.plot(E,u,o._promises)}},te.clean=function(s,o,u,d){for(var h=d._subplots[i]||[],g=0;g<h.length;g++){var m=h[g];!o[m]&&d[m]._subplot&&d[m]._subplot.destroy()}},te.toSVG=function(s){for(var o=s._fullLayout,u=o._subplots[i],d=o._size,h=0;h<u.length;h++){var g=o[u[h]],m=g.domain,E=g._subplot,c=E.toImage("png"),_=o._glimages.append("svg:image");_.attr({xmlns:P.svg,"xlink:href":c,x:d.l+d.w*m.x[0],y:d.t+d.h*(1-m.y[1]),width:d.w*(m.x[1]-m.x[0]),height:d.h*(m.y[1]-m.y[0]),preserveAspectRatio:"none"});var T=t.select(g._subplot.div),M=T.select(".maplibregl-ctrl-attrib").text().replace("Improve this map",""),k=o._glimages.append("g"),b=k.append("text");b.text(M).classed("static-attribution",!0).attr({"font-size":12,"font-family":"Arial",color:"rgba(0, 0, 0, 0.75)","text-anchor":"end","data-unformatted":M});var A=r.bBox(b.node()),y=d.w*(m.x[1]-m.x[0]);if(A.width>y/2){var f=M.split("|").join("<br>");b.text(f).attr("data-unformatted",f).call(a.convertToTspans,s),A=r.bBox(b.node())}b.attr("transform",v(-3,-A.height+8)),k.insert("rect",".static-attribution").attr({x:-A.width-6,y:-A.height-3,width:A.width+6,height:A.height+3,fill:"rgba(255, 255, 255, 0.75)"});var p=1;A.width+6>y&&(p=y/(A.width+6));var x=[d.l+d.w*m.x[1],d.t+d.h*(1-m.y[0])];k.attr("transform",v(x[0],x[1])+w(p))}},te.updateFx=function(s){for(var o=s._fullLayout,u=o._subplots[i],d=0;d<u.length;d++){var h=o[u[d]]._subplot;h.updateFx(o)}}}}),Bte=Ne({"src/traces/scattermap/index.js"(te,Z){Z.exports={attributes:HR(),supplyDefaults:Pte(),colorbar:sh(),formatLabels:dF(),calc:bR(),plot:Rte(),hoverPoints:GR().hoverPoints,eventData:Ite(),selectPoints:Dte(),styleOnSelect:function(v,w){if(w){var C=w[0].trace;C._glTrace.update(w)}},moduleType:"trace",name:"scattermap",basePlotModule:XR(),categories:["map","gl","symbols","showLegend","scatter-like"],meta:{}}}}),jte=Ne({"lib/scattermap.js"(te,Z){Z.exports=Bte()}}),pF=Ne({"src/traces/choroplethmap/attributes.js"(te,Z){var v=KS(),w=Wu(),{hovertemplateAttrs:C,templatefallbackAttrs:P}=Fl(),t=qo(),r=fi().extendFlat;Z.exports=r({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:r({},v.featureidkey,{}),below:{valType:"string",editType:"plot"},text:v.text,hovertext:v.hovertext,marker:{line:{color:r({},v.marker.line.color,{editType:"plot"}),width:r({},v.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:r({},v.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:r({},v.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:r({},v.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:v.hoverinfo,hovertemplate:C({},{keys:["properties"]}),hovertemplatefallback:P(),showlegend:r({},t.showlegend,{dflt:!1})},w("",{cLetter:"z",editTypeOverride:"calc"}))}}),Ute=Ne({"src/traces/choroplethmap/defaults.js"(te,Z){var v=In(),w=Rh(),C=pF();Z.exports=function(t,r,a,l){function i(h,g){return v.coerce(t,r,C,h,g)}var s=i("locations"),o=i("z"),u=i("geojson");if(!v.isArrayOrTypedArray(s)||!s.length||!v.isArrayOrTypedArray(o)||!o.length||!(typeof u=="string"&&u!==""||v.isPlainObject(u))){r.visible=!1;return}i("featureidkey"),r._length=Math.min(s.length,o.length),i("below"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback");var d=i("marker.line.width");d&&i("marker.line.color"),i("marker.opacity"),w(t,r,l,i,{prefix:"",cLetter:"z"}),v.coerceSelectionMarkerOpacity(r,i)}}}),mF=Ne({"src/traces/choroplethmap/convert.js"(te,Z){var v=Fn(),w=In(),C=Nc(),P=zs(),t=Db().makeBlank,r=Ob();function a(i){var s=i[0].trace,o=s.visible===!0&&s._length!==0,u={layout:{visibility:"none"},paint:{}},d={layout:{visibility:"none"},paint:{}},h=s._opts={fill:u,line:d,geojson:t()};if(!o)return h;var g=r.extractTraceFeature(i);if(!g)return h;var m=C.makeColorScaleFuncFromTrace(s),E=s.marker,c=E.line||{},_;w.isArrayOrTypedArray(E.opacity)&&(_=function(p){var x=p.mo;return v(x)?+w.constrain(x,0,1):0});var T;w.isArrayOrTypedArray(c.color)&&(T=function(p){return p.mlc});var M;w.isArrayOrTypedArray(c.width)&&(M=function(p){return p.mlw});for(var k=0;k<i.length;k++){var b=i[k],A=b.fOut;if(A){var y=A.properties;y.fc=m(b.z),_&&(y.mo=_(b)),T&&(y.mlc=T(b)),M&&(y.mlw=M(b)),b.ct=y.ct,b._polygons=r.feature2polygons(A)}}var f=_?{type:"identity",property:"mo"}:E.opacity;return w.extendFlat(u.paint,{"fill-color":{type:"identity",property:"fc"},"fill-opacity":f}),w.extendFlat(d.paint,{"line-color":T?{type:"identity",property:"mlc"}:c.color,"line-width":M?{type:"identity",property:"mlw"}:c.width,"line-opacity":f}),u.layout.visibility="visible",d.layout.visibility="visible",h.geojson={type:"FeatureCollection",features:g},l(i),h}function l(i){var s=i[0].trace,o=s._opts,u;if(s.selectedpoints){for(var d=P.makeSelectedPointStyleFns(s),h=0;h<i.length;h++){var g=i[h];g.fOut&&(g.fOut.properties.mo2=d.selectedOpacityFn(g))}u={type:"identity",property:"mo2"}}else u=w.isArrayOrTypedArray(s.marker.opacity)?{type:"identity",property:"mo"}:s.marker.opacity;return w.extendFlat(o.fill.paint,{"fill-opacity":u}),w.extendFlat(o.line.paint,{"line-opacity":u}),o}Z.exports={convert:a,convertOnSelect:l}}}),qte=Ne({"src/traces/choroplethmap/plot.js"(te,Z){var v=mF().convert,w=mF().convertOnSelect,C=Bb().traceLayerPrefix;function P(r,a){this.type="choroplethmap",this.subplot=r,this.uid=a,this.sourceId="source-"+a,this.layerList=[["fill",C+a+"-fill"],["line",C+a+"-line"]],this.below=null}var t=P.prototype;t.update=function(r){this._update(v(r)),r[0].trace._glTrace=this},t.updateOnSelect=function(r){this._update(w(r))},t._update=function(r){var a=this.subplot,l=this.layerList,i=a.belowLookup["trace-"+this.uid];a.map.getSource(this.sourceId).setData(r.geojson),i!==this.below&&(this._removeLayers(),this._addLayers(r,i),this.below=i);for(var s=0;s<l.length;s++){var o=l[s],u=o[0],d=o[1],h=r[u];a.setOptions(d,"setLayoutProperty",h.layout),h.layout.visibility==="visible"&&a.setOptions(d,"setPaintProperty",h.paint)}},t._addLayers=function(r,a){for(var l=this.subplot,i=this.layerList,s=this.sourceId,o=0;o<i.length;o++){var u=i[o],d=u[0],h=r[d];l.addLayer({type:d,id:u[1],source:s,layout:h.layout,paint:h.paint},a)}},t._removeLayers=function(){for(var r=this.subplot.map,a=this.layerList,l=a.length-1;l>=0;l--)r.removeLayer(a[l][1])},t.dispose=function(){var r=this.subplot.map;this._removeLayers(),r.removeSource(this.sourceId)},Z.exports=function(a,l){var i=l[0].trace,s=new P(a,i.uid),o=s.sourceId,u=v(l),d=s.below=a.belowLookup["trace-"+i.uid];return a.map.addSource(o,{type:"geojson",data:u.geojson}),s._addLayers(u,d),l[0].trace._glTrace=s,s}}}),Vte=Ne({"src/traces/choroplethmap/index.js"(te,Z){Z.exports={attributes:pF(),supplyDefaults:Ute(),colorbar:Bg(),calc:SR(),plot:qte(),hoverPoints:MR(),eventData:CR(),selectPoints:kR(),styleOnSelect:function(v,w){if(w){var C=w[0].trace;C._glTrace.updateOnSelect(w)}},getBelow:function(v,w){for(var C=w.getMapLayers(),P=C.length-2;P>=0;P--){var t=C[P].id;if(typeof t=="string"&&t.indexOf("water")===0){for(var r=P+1;r<C.length;r++)if(t=C[r].id,typeof t=="string"&&t.indexOf("plotly-")===-1)return t}}},moduleType:"trace",name:"choroplethmap",basePlotModule:XR(),categories:["map","gl","noOpacity","showLegend"],meta:{hr_name:"choropleth_map"}}}}),Hte=Ne({"lib/choroplethmap.js"(te,Z){Z.exports=Vte()}}),gF=Ne({"src/traces/densitymap/attributes.js"(te,Z){var v=Wu(),{hovertemplateAttrs:w,templatefallbackAttrs:C}=Fl(),P=qo(),t=HR(),r=fi().extendFlat;Z.exports=r({lon:t.lon,lat:t.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:t.text,hovertext:t.hovertext,hoverinfo:r({},P.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:w(),hovertemplatefallback:C(),showlegend:r({},P.showlegend,{dflt:!1})},v("",{cLetter:"z",editTypeOverride:"calc"}))}}),Gte=Ne({"src/traces/densitymap/defaults.js"(te,Z){var v=In(),w=Rh(),C=gF();Z.exports=function(t,r,a,l){function i(d,h){return v.coerce(t,r,C,d,h)}var s=i("lon")||[],o=i("lat")||[],u=Math.min(s.length,o.length);if(!u){r.visible=!1;return}r._length=u,i("z"),i("radius"),i("below"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),w(t,r,l,i,{prefix:"",cLetter:"z"})}}}),Xte=Ne({"src/traces/densitymap/calc.js"(te,Z){var v=Fn(),w=In().isArrayOrTypedArray,C=da().BADNUM,P=Ud(),t=In()._;Z.exports=function(a,l){for(var i=l._length,s=new Array(i),o=l.z,u=w(o)&&o.length,d=0;d<i;d++){var h=s[d]={},g=l.lon[d],m=l.lat[d];if(h.lonlat=v(g)&&v(m)?[+g,+m]:[C,C],u){var E=o[d];h.z=v(E)?E:C}}return P(a,l,{vals:u?o:[0,1],containerStr:"",cLetter:"z"}),i&&(s[0].t={labels:{lat:t(a,"lat:")+" ",lon:t(a,"lon:")+" "}}),s}}}),Wte=Ne({"src/traces/densitymap/convert.js"(te,Z){var v=Fn(),w=In(),C=Ha(),P=Nc(),t=da().BADNUM,r=Db().makeBlank;Z.exports=function(l){var i=l[0].trace,s=i.visible===!0&&i._length!==0,o={layout:{visibility:"none"},paint:{}},u=i._opts={heatmap:o,geojson:r()};if(!s)return u;var d=[],h,g=i.z,m=i.radius,E=w.isArrayOrTypedArray(g)&&g.length,c=w.isArrayOrTypedArray(m);for(h=0;h<l.length;h++){var _=l[h],T=_.lonlat;if(T[0]!==t){var M={};if(E){var k=_.z;M.z=k!==t?k:0}c&&(M.r=v(m[h])&&m[h]>0?+m[h]:0),d.push({type:"Feature",geometry:{type:"Point",coordinates:T},properties:M})}}var b=P.extractOpts(i),A=b.reversescale?P.flipScale(b.colorscale):b.colorscale,y=A[0][1],f=C.opacity(y)<1?y:C.addOpacity(y,0),p=["interpolate",["linear"],["heatmap-density"],0,f];for(h=1;h<A.length;h++)p.push(A[h][0],A[h][1]);var x=["interpolate",["linear"],["get","z"],b.min,0,b.max,1];return w.extendFlat(u.heatmap.paint,{"heatmap-weight":E?x:1/(b.max-b.min),"heatmap-color":p,"heatmap-radius":c?{type:"identity",property:"r"}:i.radius,"heatmap-opacity":i.opacity}),u.geojson={type:"FeatureCollection",features:d},u.heatmap.layout.visibility="visible",u}}}),Yte=Ne({"src/traces/densitymap/plot.js"(te,Z){var v=Wte(),w=Bb().traceLayerPrefix;function C(t,r){this.type="densitymap",this.subplot=t,this.uid=r,this.sourceId="source-"+r,this.layerList=[["heatmap",w+r+"-heatmap"]],this.below=null}var P=C.prototype;P.update=function(t){var r=this.subplot,a=this.layerList,l=v(t),i=r.belowLookup["trace-"+this.uid];r.map.getSource(this.sourceId).setData(l.geojson),i!==this.below&&(this._removeLayers(),this._addLayers(l,i),this.below=i);for(var s=0;s<a.length;s++){var o=a[s],u=o[0],d=o[1],h=l[u];r.setOptions(d,"setLayoutProperty",h.layout),h.layout.visibility==="visible"&&r.setOptions(d,"setPaintProperty",h.paint)}},P._addLayers=function(t,r){for(var a=this.subplot,l=this.layerList,i=this.sourceId,s=0;s<l.length;s++){var o=l[s],u=o[0],d=t[u];a.addLayer({type:u,id:o[1],source:i,layout:d.layout,paint:d.paint},r)}},P._removeLayers=function(){for(var t=this.subplot.map,r=this.layerList,a=r.length-1;a>=0;a--)t.removeLayer(r[a][1])},P.dispose=function(){var t=this.subplot.map;this._removeLayers(),t.removeSource(this.sourceId)},Z.exports=function(r,a){var l=a[0].trace,i=new C(r,l.uid),s=i.sourceId,o=v(a),u=i.below=r.belowLookup["trace-"+l.uid];return r.map.addSource(s,{type:"geojson",data:o.geojson}),i._addLayers(o,u),i}}}),Zte=Ne({"src/traces/densitymap/hover.js"(te,Z){var v=Os(),w=GR().hoverPoints,C=GR().getExtraText;Z.exports=function(t,r,a){var l=w(t,r,a);if(l){var i=l[0],s=i.cd,o=s[0].trace,u=s[i.index];if(delete i.color,"z"in u){var d=i.subplot.mockAxis;i.z=u.z,i.zLabel=v.tickText(d,d.c2l(u.z),"hover").text}return i.extraText=C(o,u,s[0].t.labels),[i]}}}}),$te=Ne({"src/traces/densitymap/event_data.js"(te,Z){Z.exports=function(w,C){return w.lon=C.lon,w.lat=C.lat,w.z=C.z,w}}}),Kte=Ne({"src/traces/densitymap/index.js"(te,Z){Z.exports={attributes:gF(),supplyDefaults:Gte(),colorbar:Bg(),formatLabels:dF(),calc:Xte(),plot:Yte(),hoverPoints:Zte(),eventData:$te(),getBelow:function(v,w){for(var C=w.getMapLayers(),P=0;P<C.length;P++){var t=C[P],r=t.id;if(t.type==="symbol"&&typeof r=="string"&&r.indexOf("plotly-")===-1)return r}},moduleType:"trace",name:"densitymap",basePlotModule:XR(),categories:["map","gl","showLegend"],meta:{hr_name:"density_map"}}}}),Jte=Ne({"lib/densitymap.js"(te,Z){Z.exports=Kte()}}),yF=Ne({"src/traces/sankey/attributes.js"(te,Z){var v=bo(),w=qo(),C=js(),P=Hs(),t=Fc().attributes,{hovertemplateAttrs:r,templatefallbackAttrs:a}=Fl(),l=Wu(),i=Cu().templatedArray,s=Ac().descriptionOnlyNumbers,o=fi().extendFlat,u=ef().overrideAll;Z.exports=u({hoverinfo:o({},w.hoverinfo,{flags:[],arrayOk:!1}),hoverlabel:P.hoverlabel,domain:t({name:"sankey",trace:!0}),orientation:{valType:"enumerated",values:["v","h"],dflt:"h"},valueformat:{valType:"string",dflt:".3s",description:s("value")},valuesuffix:{valType:"string",dflt:""},arrangement:{valType:"enumerated",values:["snap","perpendicular","freeform","fixed"],dflt:"snap"},textfont:v({autoShadowDflt:!0}),customdata:void 0,node:{label:{valType:"data_array",dflt:[]},groups:{valType:"info_array",impliedEdits:{x:[],y:[]},dimensions:2,freeLength:!0,dflt:[],items:{valType:"number",editType:"calc"}},x:{valType:"data_array",dflt:[]},y:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:C.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:P.hoverlabel,hovertemplate:r({},{keys:["value","label"]}),hovertemplatefallback:a(),align:{valType:"enumerated",values:["justify","left","right","center"],dflt:"justify"}},link:{arrowlen:{valType:"number",min:0,dflt:0},label:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},hovercolor:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:C.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:P.hoverlabel,hovertemplate:r({},{keys:["value","label"]}),hovertemplatefallback:a(),colorscales:i("concentrationscales",{editType:"calc",label:{valType:"string",editType:"calc",dflt:""},cmax:{valType:"number",editType:"calc",dflt:1},cmin:{valType:"number",editType:"calc",dflt:0},colorscale:o(l().colorscale,{dflt:[[0,"white"],[1,"black"]]})})}},"calc","nested")}}),Qte=Ne({"src/traces/sankey/defaults.js"(te,Z){var v=In(),w=yF(),C=Ha(),P=to(),t=Fc().defaults,r=Ow(),a=Cu(),l=jd();Z.exports=function(o,u,d,h){function g(D,B){return v.coerce(o,u,w,D,B)}var m=v.extendDeep(h.hoverlabel,o.hoverlabel),E=o.node,c=a.newContainer(u,"node");function _(D,B){return v.coerce(E,c,w.node,D,B)}_("label"),_("groups"),_("x"),_("y"),_("pad"),_("thickness"),_("line.color"),_("line.width"),_("hoverinfo",o.hoverinfo),r(E,c,_,m),_("hovertemplate"),_("align");var T=h.colorway,M=function(D){return T[D%T.length]};_("color",c.label.map(function(D,B){return C.addOpacity(M(B),.8)})),_("customdata");var k=o.link||{},b=a.newContainer(u,"link");function A(D,B){return v.coerce(k,b,w.link,D,B)}A("label"),A("arrowlen"),A("source"),A("target"),A("value"),A("line.color"),A("line.width"),A("hoverinfo",o.hoverinfo),r(k,b,A,m),A("hovertemplate");var y=P(h.paper_bgcolor).getLuminance()<.333,f=y?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)",p=A("color",f);function x(D){var B=P(D);if(!B.isValid())return D;var U=B.getAlpha();return U<=.8?B.setAlpha(U+.2):B=y?B.brighten():B.darken(),B.toRgbString()}A("hovercolor",Array.isArray(p)?p.map(x):x(p)),A("customdata"),l(k,b,{name:"colorscales",handleItemDefaults:i}),t(u,h,g),g("orientation"),g("valueformat"),g("valuesuffix");var N;c.x.length&&c.y.length&&(N="freeform"),g("arrangement",N),v.coerceFont(g,"textfont",h.font,{autoShadowDflt:!0}),u._length=null};function i(s,o){function u(d,h){return v.coerce(s,o,w.link.colorscales,d,h)}u("label"),u("cmin"),u("cmax"),u("colorscale")}}}),_F=Ne({"node_modules/strongly-connected-components/scc.js"(te,Z){Z.exports=v;function v(w){for(var C=w.length,P=new Array(C),t=new Array(C),r=new Array(C),a=new Array(C),l=new Array(C),i=new Array(C),s=0;s<C;++s)P[s]=-1,t[s]=0,r[s]=!1,a[s]=0,l[s]=-1,i[s]=[];var o=0,u=[],d=[];function h(c){var _=[c],T=[c];for(P[c]=t[c]=o,r[c]=!0,o+=1;T.length>0;){c=T[T.length-1];var M=w[c];if(a[c]<M.length){for(var k=a[c];k<M.length;++k){var b=M[k];if(P[b]<0){P[b]=t[b]=o,r[b]=!0,o+=1,_.push(b),T.push(b);break}else r[b]&&(t[c]=Math.min(t[c],t[b])|0);l[b]>=0&&i[c].push(l[b])}a[c]=k}else{if(t[c]===P[c]){for(var A=[],y=[],f=0,k=_.length-1;k>=0;--k){var p=_[k];if(r[p]=!1,A.push(p),y.push(i[p]),f+=i[p].length,l[p]=u.length,p===c){_.length=k;break}}u.push(A);for(var x=new Array(f),k=0;k<y.length;k++)for(var N=0;N<y[k].length;N++)x[--f]=y[k][N];d.push(x)}T.pop()}}}for(var s=0;s<C;++s)P[s]<0&&h(s);for(var g,s=0;s<d.length;s++){var m=d[s];if(m.length!==0){m.sort(function(_,T){return _-T}),g=[m[0]];for(var E=1;E<m.length;E++)m[E]!==m[E-1]&&g.push(m[E]);d[s]=g}}return{components:u,adjacencyList:d}}}}),ere=Ne({"src/traces/sankey/calc.js"(te,Z){var v=_F(),w=In(),C=a1().wrap,P=w.isArrayOrTypedArray,t=w.isIndex,r=Nc();function a(i){var s=i.node,o=i.link,u=[],d=P(o.color),h=P(o.hovercolor),g=P(o.customdata),m={},E={},c=o.colorscales.length,_;for(_=0;_<c;_++){var T=o.colorscales[_],M=r.extractScale(T,{cLetter:"c"}),k=r.makeColorScaleFunc(M);E[T.label]=k}var b=0;for(_=0;_<o.value.length;_++)o.source[_]>b&&(b=o.source[_]),o.target[_]>b&&(b=o.target[_]);var A=b+1;i.node._count=A;var y,f=i.node.groups,p={};for(_=0;_<f.length;_++){var x=f[_];for(y=0;y<x.length;y++){var N=x[y],D=A+_;p.hasOwnProperty(N)?w.warn("Node "+N+" is already part of a group."):p[N]=D}}var B={source:[],target:[]};for(_=0;_<o.value.length;_++){var U=o.value[_],V=o.source[_],q=o.target[_];if(U>0&&t(V,A)&&t(q,A)&&!(p.hasOwnProperty(V)&&p.hasOwnProperty(q)&&p[V]===p[q])){p.hasOwnProperty(q)&&(q=p[q]),p.hasOwnProperty(V)&&(V=p[V]),V=+V,q=+q,m[V]=m[q]=!0;var z="";o.label&&o.label[_]&&(z=o.label[_]);var H=null;z&&E.hasOwnProperty(z)&&(H=E[z]),u.push({pointNumber:_,label:z,color:d?o.color[_]:o.color,hovercolor:h?o.hovercolor[_]:o.hovercolor,customdata:g?o.customdata[_]:o.customdata,concentrationscale:H,source:V,target:q,value:+U}),B.source.push(V),B.target.push(q)}}var G=A+f.length,J=P(s.color),le=P(s.customdata),ge=[];for(_=0;_<G;_++)if(m[_]){var de=s.label[_];ge.push({group:_>A-1,childrenNodes:[],pointNumber:_,label:de,color:J?s.color[_]:s.color,customdata:le?s.customdata[_]:s.customdata})}var me=!1;return l(G,B.source,B.target)&&(me=!0),{circular:me,links:u,nodes:ge,groups:f,groupLookup:p}}function l(i,s,o){for(var u=w.init2dArray(i,0),d=0;d<Math.min(s.length,o.length);d++)if(w.isIndex(s[d],i)&&w.isIndex(o[d],i)){if(s[d]===o[d])return!0;u[s[d]].push(o[d])}var h=v(u);return h.components.some(function(g){return g.length>1})}Z.exports=function(s,o){var u=a(o);return C({circular:u.circular,_nodes:u.nodes,_links:u.links,_groups:u.groups,_groupLookup:u.groupLookup})}}}),tre=Ne({"node_modules/d3-quadtree/dist/d3-quadtree.js"(te,Z){(function(v,w){typeof te=="object"&&typeof Z<"u"?w(te):(v=v||self,w(v.d3=v.d3||{}))})(te,function(v){function w(A){var y=+this._x.call(null,A),f=+this._y.call(null,A);return C(this.cover(y,f),y,f,A)}function C(A,y,f,p){if(isNaN(y)||isNaN(f))return A;var x,N=A._root,D={data:p},B=A._x0,U=A._y0,V=A._x1,q=A._y1,z,H,G,J,le,ge,de,me;if(!N)return A._root=D,A;for(;N.length;)if((le=y>=(z=(B+V)/2))?B=z:V=z,(ge=f>=(H=(U+q)/2))?U=H:q=H,x=N,!(N=N[de=ge<<1|le]))return x[de]=D,A;if(G=+A._x.call(null,N.data),J=+A._y.call(null,N.data),y===G&&f===J)return D.next=N,x?x[de]=D:A._root=D,A;do x=x?x[de]=new Array(4):A._root=new Array(4),(le=y>=(z=(B+V)/2))?B=z:V=z,(ge=f>=(H=(U+q)/2))?U=H:q=H;while((de=ge<<1|le)===(me=(J>=H)<<1|G>=z));return x[me]=N,x[de]=D,A}function P(A){var y,f,p=A.length,x,N,D=new Array(p),B=new Array(p),U=1/0,V=1/0,q=-1/0,z=-1/0;for(f=0;f<p;++f)isNaN(x=+this._x.call(null,y=A[f]))||isNaN(N=+this._y.call(null,y))||(D[f]=x,B[f]=N,x<U&&(U=x),x>q&&(q=x),N<V&&(V=N),N>z&&(z=N));if(U>q||V>z)return this;for(this.cover(U,V).cover(q,z),f=0;f<p;++f)C(this,D[f],B[f],A[f]);return this}function t(A,y){if(isNaN(A=+A)||isNaN(y=+y))return this;var f=this._x0,p=this._y0,x=this._x1,N=this._y1;if(isNaN(f))x=(f=Math.floor(A))+1,N=(p=Math.floor(y))+1;else{for(var D=x-f,B=this._root,U,V;f>A||A>=x||p>y||y>=N;)switch(V=(y<p)<<1|A<f,U=new Array(4),U[V]=B,B=U,D*=2,V){case 0:x=f+D,N=p+D;break;case 1:f=x-D,N=p+D;break;case 2:x=f+D,p=N-D;break;case 3:f=x-D,p=N-D;break}this._root&&this._root.length&&(this._root=B)}return this._x0=f,this._y0=p,this._x1=x,this._y1=N,this}function r(){var A=[];return this.visit(function(y){if(!y.length)do A.push(y.data);while(y=y.next)}),A}function a(A){return arguments.length?this.cover(+A[0][0],+A[0][1]).cover(+A[1][0],+A[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function l(A,y,f,p,x){this.node=A,this.x0=y,this.y0=f,this.x1=p,this.y1=x}function i(A,y,f){var p,x=this._x0,N=this._y0,D,B,U,V,q=this._x1,z=this._y1,H=[],G=this._root,J,le;for(G&&H.push(new l(G,x,N,q,z)),f==null?f=1/0:(x=A-f,N=y-f,q=A+f,z=y+f,f*=f);J=H.pop();)if(!(!(G=J.node)||(D=J.x0)>q||(B=J.y0)>z||(U=J.x1)<x||(V=J.y1)<N))if(G.length){var ge=(D+U)/2,de=(B+V)/2;H.push(new l(G[3],ge,de,U,V),new l(G[2],D,de,ge,V),new l(G[1],ge,B,U,de),new l(G[0],D,B,ge,de)),(le=(y>=de)<<1|A>=ge)&&(J=H[H.length-1],H[H.length-1]=H[H.length-1-le],H[H.length-1-le]=J)}else{var me=A-+this._x.call(null,G.data),W=y-+this._y.call(null,G.data),ie=me*me+W*W;if(ie<f){var se=Math.sqrt(f=ie);x=A-se,N=y-se,q=A+se,z=y+se,p=G.data}}return p}function s(A){if(isNaN(q=+this._x.call(null,A))||isNaN(z=+this._y.call(null,A)))return this;var y,f=this._root,p,x,N,D=this._x0,B=this._y0,U=this._x1,V=this._y1,q,z,H,G,J,le,ge,de;if(!f)return this;if(f.length)for(;;){if((J=q>=(H=(D+U)/2))?D=H:U=H,(le=z>=(G=(B+V)/2))?B=G:V=G,y=f,!(f=f[ge=le<<1|J]))return this;if(!f.length)break;(y[ge+1&3]||y[ge+2&3]||y[ge+3&3])&&(p=y,de=ge)}for(;f.data!==A;)if(x=f,!(f=f.next))return this;return(N=f.next)&&delete f.next,x?(N?x.next=N:delete x.next,this):y?(N?y[ge]=N:delete y[ge],(f=y[0]||y[1]||y[2]||y[3])&&f===(y[3]||y[2]||y[1]||y[0])&&!f.length&&(p?p[de]=f:this._root=f),this):(this._root=N,this)}function o(A){for(var y=0,f=A.length;y<f;++y)this.remove(A[y]);return this}function u(){return this._root}function d(){var A=0;return this.visit(function(y){if(!y.length)do++A;while(y=y.next)}),A}function h(A){var y=[],f,p=this._root,x,N,D,B,U;for(p&&y.push(new l(p,this._x0,this._y0,this._x1,this._y1));f=y.pop();)if(!A(p=f.node,N=f.x0,D=f.y0,B=f.x1,U=f.y1)&&p.length){var V=(N+B)/2,q=(D+U)/2;(x=p[3])&&y.push(new l(x,V,q,B,U)),(x=p[2])&&y.push(new l(x,N,q,V,U)),(x=p[1])&&y.push(new l(x,V,D,B,q)),(x=p[0])&&y.push(new l(x,N,D,V,q))}return this}function g(A){var y=[],f=[],p;for(this._root&&y.push(new l(this._root,this._x0,this._y0,this._x1,this._y1));p=y.pop();){var x=p.node;if(x.length){var N,D=p.x0,B=p.y0,U=p.x1,V=p.y1,q=(D+U)/2,z=(B+V)/2;(N=x[0])&&y.push(new l(N,D,B,q,z)),(N=x[1])&&y.push(new l(N,q,B,U,z)),(N=x[2])&&y.push(new l(N,D,z,q,V)),(N=x[3])&&y.push(new l(N,q,z,U,V))}f.push(p)}for(;p=f.pop();)A(p.node,p.x0,p.y0,p.x1,p.y1);return this}function m(A){return A[0]}function E(A){return arguments.length?(this._x=A,this):this._x}function c(A){return A[1]}function _(A){return arguments.length?(this._y=A,this):this._y}function T(A,y,f){var p=new M(y??m,f??c,NaN,NaN,NaN,NaN);return A==null?p:p.addAll(A)}function M(A,y,f,p,x,N){this._x=A,this._y=y,this._x0=f,this._y0=p,this._x1=x,this._y1=N,this._root=void 0}function k(A){for(var y={data:A.data},f=y;A=A.next;)f=f.next={data:A.data};return y}var b=T.prototype=M.prototype;b.copy=function(){var A=new M(this._x,this._y,this._x0,this._y0,this._x1,this._y1),y=this._root,f,p;if(!y)return A;if(!y.length)return A._root=k(y),A;for(f=[{source:y,target:A._root=new Array(4)}];y=f.pop();)for(var x=0;x<4;++x)(p=y.source[x])&&(p.length?f.push({source:p,target:y.target[x]=new Array(4)}):y.target[x]=k(p));return A},b.add=w,b.addAll=P,b.cover=t,b.data=r,b.extent=a,b.find=i,b.remove=s,b.removeAll=o,b.root=u,b.size=d,b.visit=h,b.visitAfter=g,b.x=E,b.y=_,v.quadtree=T,Object.defineProperty(v,"__esModule",{value:!0})})}}),WR=Ne({"node_modules/d3-collection/dist/d3-collection.js"(te,Z){(function(v,w){w(typeof te=="object"&&typeof Z<"u"?te:v.d3=v.d3||{})})(te,function(v){var w="$";function C(){}C.prototype=P.prototype={constructor:C,has:function(m){return w+m in this},get:function(m){return this[w+m]},set:function(m,E){return this[w+m]=E,this},remove:function(m){var E=w+m;return E in this&&delete this[E]},clear:function(){for(var m in this)m[0]===w&&delete this[m]},keys:function(){var m=[];for(var E in this)E[0]===w&&m.push(E.slice(1));return m},values:function(){var m=[];for(var E in this)E[0]===w&&m.push(this[E]);return m},entries:function(){var m=[];for(var E in this)E[0]===w&&m.push({key:E.slice(1),value:this[E]});return m},size:function(){var m=0;for(var E in this)E[0]===w&&++m;return m},empty:function(){for(var m in this)if(m[0]===w)return!1;return!0},each:function(m){for(var E in this)E[0]===w&&m(this[E],E.slice(1),this)}};function P(m,E){var c=new C;if(m instanceof C)m.each(function(b,A){c.set(A,b)});else if(Array.isArray(m)){var _=-1,T=m.length,M;if(E==null)for(;++_<T;)c.set(_,m[_]);else for(;++_<T;)c.set(E(M=m[_],_,m),M)}else if(m)for(var k in m)c.set(k,m[k]);return c}function t(){var m=[],E=[],c,_,T;function M(b,A,y,f){if(A>=m.length)return c!=null&&b.sort(c),_!=null?_(b):b;for(var p=-1,x=b.length,N=m[A++],D,B,U=P(),V,q=y();++p<x;)(V=U.get(D=N(B=b[p])+""))?V.push(B):U.set(D,[B]);return U.each(function(z,H){f(q,H,M(z,A,y,f))}),q}function k(b,A){if(++A>m.length)return b;var y,f=E[A-1];return _!=null&&A>=m.length?y=b.entries():(y=[],b.each(function(p,x){y.push({key:x,values:k(p,A)})})),f!=null?y.sort(function(p,x){return f(p.key,x.key)}):y}return T={object:function(b){return M(b,0,r,a)},map:function(b){return M(b,0,l,i)},entries:function(b){return k(M(b,0,l,i),0)},key:function(b){return m.push(b),T},sortKeys:function(b){return E[m.length-1]=b,T},sortValues:function(b){return c=b,T},rollup:function(b){return _=b,T}}}function r(){return{}}function a(m,E,c){m[E]=c}function l(){return P()}function i(m,E,c){m.set(E,c)}function s(){}var o=P.prototype;s.prototype=u.prototype={constructor:s,has:o.has,add:function(m){return m+="",this[w+m]=m,this},remove:o.remove,clear:o.clear,values:o.keys,size:o.size,empty:o.empty,each:o.each};function u(m,E){var c=new s;if(m instanceof s)m.each(function(M){c.add(M)});else if(m){var _=-1,T=m.length;if(E==null)for(;++_<T;)c.add(m[_]);else for(;++_<T;)c.add(E(m[_],_,m))}return c}function d(m){var E=[];for(var c in m)E.push(c);return E}function h(m){var E=[];for(var c in m)E.push(m[c]);return E}function g(m){var E=[];for(var c in m)E.push({key:c,value:m[c]});return E}v.nest=t,v.set=u,v.map=P,v.keys=d,v.values=h,v.entries=g,Object.defineProperty(v,"__esModule",{value:!0})})}}),rre=Ne({"node_modules/d3-dispatch/dist/d3-dispatch.js"(te,Z){(function(v,w){typeof te=="object"&&typeof Z<"u"?w(te):(v=v||self,w(v.d3=v.d3||{}))})(te,function(v){var w={value:function(){}};function C(){for(var l=0,i=arguments.length,s={},o;l<i;++l){if(!(o=arguments[l]+"")||o in s||/[\s.]/.test(o))throw new Error("illegal type: "+o);s[o]=[]}return new P(s)}function P(l){this._=l}function t(l,i){return l.trim().split(/^|\s+/).map(function(s){var o="",u=s.indexOf(".");if(u>=0&&(o=s.slice(u+1),s=s.slice(0,u)),s&&!i.hasOwnProperty(s))throw new Error("unknown type: "+s);return{type:s,name:o}})}P.prototype=C.prototype={constructor:P,on:function(l,i){var s=this._,o=t(l+"",s),u,d=-1,h=o.length;if(arguments.length<2){for(;++d<h;)if((u=(l=o[d]).type)&&(u=r(s[u],l.name)))return u;return}if(i!=null&&typeof i!="function")throw new Error("invalid callback: "+i);for(;++d<h;)if(u=(l=o[d]).type)s[u]=a(s[u],l.name,i);else if(i==null)for(u in s)s[u]=a(s[u],l.name,null);return this},copy:function(){var l={},i=this._;for(var s in i)l[s]=i[s].slice();return new P(l)},call:function(l,i){if((u=arguments.length-2)>0)for(var s=new Array(u),o=0,u,d;o<u;++o)s[o]=arguments[o+2];if(!this._.hasOwnProperty(l))throw new Error("unknown type: "+l);for(d=this._[l],o=0,u=d.length;o<u;++o)d[o].value.apply(i,s)},apply:function(l,i,s){if(!this._.hasOwnProperty(l))throw new Error("unknown type: "+l);for(var o=this._[l],u=0,d=o.length;u<d;++u)o[u].value.apply(i,s)}};function r(l,i){for(var s=0,o=l.length,u;s<o;++s)if((u=l[s]).name===i)return u.value}function a(l,i,s){for(var o=0,u=l.length;o<u;++o)if(l[o].name===i){l[o]=w,l=l.slice(0,o).concat(l.slice(o+1));break}return s!=null&&l.push({name:i,value:s}),l}v.dispatch=C,Object.defineProperty(v,"__esModule",{value:!0})})}}),nre=Ne({"node_modules/d3-timer/dist/d3-timer.js"(te,Z){(function(v,w){typeof te=="object"&&typeof Z<"u"?w(te):(v=v||self,w(v.d3=v.d3||{}))})(te,function(v){var w=0,C=0,P=0,t=1e3,r,a,l=0,i=0,s=0,o=typeof performance=="object"&&performance.now?performance:Date,u=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(A){setTimeout(A,17)};function d(){return i||(u(h),i=o.now()+s)}function h(){i=0}function g(){this._call=this._time=this._next=null}g.prototype=m.prototype={constructor:g,restart:function(A,y,f){if(typeof A!="function")throw new TypeError("callback is not a function");f=(f==null?d():+f)+(y==null?0:+y),!this._next&&a!==this&&(a?a._next=this:r=this,a=this),this._call=A,this._time=f,M()},stop:function(){this._call&&(this._call=null,this._time=1/0,M())}};function m(A,y,f){var p=new g;return p.restart(A,y,f),p}function E(){d(),++w;for(var A=r,y;A;)(y=i-A._time)>=0&&A._call.call(null,y),A=A._next;--w}function c(){i=(l=o.now())+s,w=C=0;try{E()}finally{w=0,T(),i=0}}function _(){var A=o.now(),y=A-l;y>t&&(s-=y,l=A)}function T(){for(var A,y=r,f,p=1/0;y;)y._call?(p>y._time&&(p=y._time),A=y,y=y._next):(f=y._next,y._next=null,y=A?A._next=f:r=f);a=A,M(p)}function M(A){if(!w){C&&(C=clearTimeout(C));var y=A-i;y>24?(A<1/0&&(C=setTimeout(c,A-o.now()-s)),P&&(P=clearInterval(P))):(P||(l=o.now(),P=setInterval(_,t)),w=1,u(c))}}function k(A,y,f){var p=new g;return y=y==null?0:+y,p.restart(function(x){p.stop(),A(x+y)},y,f),p}function b(A,y,f){var p=new g,x=y;return y==null?(p.restart(A,y,f),p):(y=+y,f=f==null?d():+f,p.restart(function N(D){D+=x,p.restart(N,x+=y,f),A(D)},y,f),p)}v.interval=b,v.now=d,v.timeout=k,v.timer=m,v.timerFlush=E,Object.defineProperty(v,"__esModule",{value:!0})})}}),are=Ne({"node_modules/d3-force/dist/d3-force.js"(te,Z){(function(v,w){typeof te=="object"&&typeof Z<"u"?w(te,tre(),WR(),rre(),nre()):w(v.d3=v.d3||{},v.d3,v.d3,v.d3,v.d3)})(te,function(v,w,C,P,t){function r(A,y){var f;A==null&&(A=0),y==null&&(y=0);function p(){var x,N=f.length,D,B=0,U=0;for(x=0;x<N;++x)D=f[x],B+=D.x,U+=D.y;for(B=B/N-A,U=U/N-y,x=0;x<N;++x)D=f[x],D.x-=B,D.y-=U}return p.initialize=function(x){f=x},p.x=function(x){return arguments.length?(A=+x,p):A},p.y=function(x){return arguments.length?(y=+x,p):y},p}function a(A){return function(){return A}}function l(){return(Math.random()-.5)*1e-6}function i(A){return A.x+A.vx}function s(A){return A.y+A.vy}function o(A){var y,f,p=1,x=1;typeof A!="function"&&(A=a(A==null?1:+A));function N(){for(var U,V=y.length,q,z,H,G,J,le,ge=0;ge<x;++ge)for(q=w.quadtree(y,i,s).visitAfter(D),U=0;U<V;++U)z=y[U],J=f[z.index],le=J*J,H=z.x+z.vx,G=z.y+z.vy,q.visit(de);function de(me,W,ie,se,ee){var pe=me.data,oe=me.r,Y=J+oe;if(pe){if(pe.index>z.index){var ce=H-pe.x-pe.vx,ue=G-pe.y-pe.vy,_e=ce*ce+ue*ue;_e<Y*Y&&(ce===0&&(ce=l(),_e+=ce*ce),ue===0&&(ue=l(),_e+=ue*ue),_e=(Y-(_e=Math.sqrt(_e)))/_e*p,z.vx+=(ce*=_e)*(Y=(oe*=oe)/(le+oe)),z.vy+=(ue*=_e)*Y,pe.vx-=ce*(Y=1-Y),pe.vy-=ue*Y)}return}return W>H+Y||se<H-Y||ie>G+Y||ee<G-Y}}function D(U){if(U.data)return U.r=f[U.data.index];for(var V=U.r=0;V<4;++V)U[V]&&U[V].r>U.r&&(U.r=U[V].r)}function B(){if(y){var U,V=y.length,q;for(f=new Array(V),U=0;U<V;++U)q=y[U],f[q.index]=+A(q,U,y)}}return N.initialize=function(U){y=U,B()},N.iterations=function(U){return arguments.length?(x=+U,N):x},N.strength=function(U){return arguments.length?(p=+U,N):p},N.radius=function(U){return arguments.length?(A=typeof U=="function"?U:a(+U),B(),N):A},N}function u(A){return A.index}function d(A,y){var f=A.get(y);if(!f)throw new Error("missing: "+y);return f}function h(A){var y=u,f=q,p,x=a(30),N,D,B,U,V=1;A==null&&(A=[]);function q(le){return 1/Math.min(B[le.source.index],B[le.target.index])}function z(le){for(var ge=0,de=A.length;ge<V;++ge)for(var me=0,W,ie,se,ee,pe,oe,Y;me<de;++me)W=A[me],ie=W.source,se=W.target,ee=se.x+se.vx-ie.x-ie.vx||l(),pe=se.y+se.vy-ie.y-ie.vy||l(),oe=Math.sqrt(ee*ee+pe*pe),oe=(oe-N[me])/oe*le*p[me],ee*=oe,pe*=oe,se.vx-=ee*(Y=U[me]),se.vy-=pe*Y,ie.vx+=ee*(Y=1-Y),ie.vy+=pe*Y}function H(){if(D){var le,ge=D.length,de=A.length,me=C.map(D,y),W;for(le=0,B=new Array(ge);le<de;++le)W=A[le],W.index=le,typeof W.source!="object"&&(W.source=d(me,W.source)),typeof W.target!="object"&&(W.target=d(me,W.target)),B[W.source.index]=(B[W.source.index]||0)+1,B[W.target.index]=(B[W.target.index]||0)+1;for(le=0,U=new Array(de);le<de;++le)W=A[le],U[le]=B[W.source.index]/(B[W.source.index]+B[W.target.index]);p=new Array(de),G(),N=new Array(de),J()}}function G(){if(D)for(var le=0,ge=A.length;le<ge;++le)p[le]=+f(A[le],le,A)}function J(){if(D)for(var le=0,ge=A.length;le<ge;++le)N[le]=+x(A[le],le,A)}return z.initialize=function(le){D=le,H()},z.links=function(le){return arguments.length?(A=le,H(),z):A},z.id=function(le){return arguments.length?(y=le,z):y},z.iterations=function(le){return arguments.length?(V=+le,z):V},z.strength=function(le){return arguments.length?(f=typeof le=="function"?le:a(+le),G(),z):f},z.distance=function(le){return arguments.length?(x=typeof le=="function"?le:a(+le),J(),z):x},z}function g(A){return A.x}function m(A){return A.y}var E=10,c=Math.PI*(3-Math.sqrt(5));function _(A){var y,f=1,p=.001,x=1-Math.pow(p,1/300),N=0,D=.6,B=C.map(),U=t.timer(q),V=P.dispatch("tick","end");A==null&&(A=[]);function q(){z(),V.call("tick",y),f<p&&(U.stop(),V.call("end",y))}function z(J){var le,ge=A.length,de;J===void 0&&(J=1);for(var me=0;me<J;++me)for(f+=(N-f)*x,B.each(function(W){W(f)}),le=0;le<ge;++le)de=A[le],de.fx==null?de.x+=de.vx*=D:(de.x=de.fx,de.vx=0),de.fy==null?de.y+=de.vy*=D:(de.y=de.fy,de.vy=0);return y}function H(){for(var J=0,le=A.length,ge;J<le;++J){if(ge=A[J],ge.index=J,ge.fx!=null&&(ge.x=ge.fx),ge.fy!=null&&(ge.y=ge.fy),isNaN(ge.x)||isNaN(ge.y)){var de=E*Math.sqrt(J),me=J*c;ge.x=de*Math.cos(me),ge.y=de*Math.sin(me)}(isNaN(ge.vx)||isNaN(ge.vy))&&(ge.vx=ge.vy=0)}}function G(J){return J.initialize&&J.initialize(A),J}return H(),y={tick:z,restart:function(){return U.restart(q),y},stop:function(){return U.stop(),y},nodes:function(J){return arguments.length?(A=J,H(),B.each(G),y):A},alpha:function(J){return arguments.length?(f=+J,y):f},alphaMin:function(J){return arguments.length?(p=+J,y):p},alphaDecay:function(J){return arguments.length?(x=+J,y):+x},alphaTarget:function(J){return arguments.length?(N=+J,y):N},velocityDecay:function(J){return arguments.length?(D=1-J,y):1-D},force:function(J,le){return arguments.length>1?(le==null?B.remove(J):B.set(J,G(le)),y):B.get(J)},find:function(J,le,ge){var de=0,me=A.length,W,ie,se,ee,pe;for(ge==null?ge=1/0:ge*=ge,de=0;de<me;++de)ee=A[de],W=J-ee.x,ie=le-ee.y,se=W*W+ie*ie,se<ge&&(pe=ee,ge=se);return pe},on:function(J,le){return arguments.length>1?(V.on(J,le),y):V.on(J)}}}function T(){var A,y,f,p=a(-30),x,N=1,D=1/0,B=.81;function U(H){var G,J=A.length,le=w.quadtree(A,g,m).visitAfter(q);for(f=H,G=0;G<J;++G)y=A[G],le.visit(z)}function V(){if(A){var H,G=A.length,J;for(x=new Array(G),H=0;H<G;++H)J=A[H],x[J.index]=+p(J,H,A)}}function q(H){var G=0,J,le,ge=0,de,me,W;if(H.length){for(de=me=W=0;W<4;++W)(J=H[W])&&(le=Math.abs(J.value))&&(G+=J.value,ge+=le,de+=le*J.x,me+=le*J.y);H.x=de/ge,H.y=me/ge}else{J=H,J.x=J.data.x,J.y=J.data.y;do G+=x[J.data.index];while(J=J.next)}H.value=G}function z(H,G,J,le){if(!H.value)return!0;var ge=H.x-y.x,de=H.y-y.y,me=le-G,W=ge*ge+de*de;if(me*me/B<W)return W<D&&(ge===0&&(ge=l(),W+=ge*ge),de===0&&(de=l(),W+=de*de),W<N&&(W=Math.sqrt(N*W)),y.vx+=ge*H.value*f/W,y.vy+=de*H.value*f/W),!0;if(H.length||W>=D)return;(H.data!==y||H.next)&&(ge===0&&(ge=l(),W+=ge*ge),de===0&&(de=l(),W+=de*de),W<N&&(W=Math.sqrt(N*W)));do H.data!==y&&(me=x[H.data.index]*f/W,y.vx+=ge*me,y.vy+=de*me);while(H=H.next)}return U.initialize=function(H){A=H,V()},U.strength=function(H){return arguments.length?(p=typeof H=="function"?H:a(+H),V(),U):p},U.distanceMin=function(H){return arguments.length?(N=H*H,U):Math.sqrt(N)},U.distanceMax=function(H){return arguments.length?(D=H*H,U):Math.sqrt(D)},U.theta=function(H){return arguments.length?(B=H*H,U):Math.sqrt(B)},U}function M(A,y,f){var p,x=a(.1),N,D;typeof A!="function"&&(A=a(+A)),y==null&&(y=0),f==null&&(f=0);function B(V){for(var q=0,z=p.length;q<z;++q){var H=p[q],G=H.x-y||1e-6,J=H.y-f||1e-6,le=Math.sqrt(G*G+J*J),ge=(D[q]-le)*N[q]*V/le;H.vx+=G*ge,H.vy+=J*ge}}function U(){if(p){var V,q=p.length;for(N=new Array(q),D=new Array(q),V=0;V<q;++V)D[V]=+A(p[V],V,p),N[V]=isNaN(D[V])?0:+x(p[V],V,p)}}return B.initialize=function(V){p=V,U()},B.strength=function(V){return arguments.length?(x=typeof V=="function"?V:a(+V),U(),B):x},B.radius=function(V){return arguments.length?(A=typeof V=="function"?V:a(+V),U(),B):A},B.x=function(V){return arguments.length?(y=+V,B):y},B.y=function(V){return arguments.length?(f=+V,B):f},B}function k(A){var y=a(.1),f,p,x;typeof A!="function"&&(A=a(A==null?0:+A));function N(B){for(var U=0,V=f.length,q;U<V;++U)q=f[U],q.vx+=(x[U]-q.x)*p[U]*B}function D(){if(f){var B,U=f.length;for(p=new Array(U),x=new Array(U),B=0;B<U;++B)p[B]=isNaN(x[B]=+A(f[B],B,f))?0:+y(f[B],B,f)}}return N.initialize=function(B){f=B,D()},N.strength=function(B){return arguments.length?(y=typeof B=="function"?B:a(+B),D(),N):y},N.x=function(B){return arguments.length?(A=typeof B=="function"?B:a(+B),D(),N):A},N}function b(A){var y=a(.1),f,p,x;typeof A!="function"&&(A=a(A==null?0:+A));function N(B){for(var U=0,V=f.length,q;U<V;++U)q=f[U],q.vy+=(x[U]-q.y)*p[U]*B}function D(){if(f){var B,U=f.length;for(p=new Array(U),x=new Array(U),B=0;B<U;++B)p[B]=isNaN(x[B]=+A(f[B],B,f))?0:+y(f[B],B,f)}}return N.initialize=function(B){f=B,D()},N.strength=function(B){return arguments.length?(y=typeof B=="function"?B:a(+B),D(),N):y},N.y=function(B){return arguments.length?(A=typeof B=="function"?B:a(+B),D(),N):A},N}v.forceCenter=r,v.forceCollide=o,v.forceLink=h,v.forceManyBody=T,v.forceRadial=M,v.forceSimulation=_,v.forceX=k,v.forceY=b,Object.defineProperty(v,"__esModule",{value:!0})})}}),ire=Ne({"node_modules/d3-path/dist/d3-path.js"(te,Z){(function(v,w){typeof te=="object"&&typeof Z<"u"?w(te):(v=v||self,w(v.d3=v.d3||{}))})(te,function(v){var w=Math.PI,C=2*w,P=1e-6,t=C-P;function r(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function a(){return new r}r.prototype=a.prototype={constructor:r,moveTo:function(l,i){this._+="M"+(this._x0=this._x1=+l)+","+(this._y0=this._y1=+i)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(l,i){this._+="L"+(this._x1=+l)+","+(this._y1=+i)},quadraticCurveTo:function(l,i,s,o){this._+="Q"+ +l+","+ +i+","+(this._x1=+s)+","+(this._y1=+o)},bezierCurveTo:function(l,i,s,o,u,d){this._+="C"+ +l+","+ +i+","+ +s+","+ +o+","+(this._x1=+u)+","+(this._y1=+d)},arcTo:function(l,i,s,o,u){l=+l,i=+i,s=+s,o=+o,u=+u;var d=this._x1,h=this._y1,g=s-l,m=o-i,E=d-l,c=h-i,_=E*E+c*c;if(u<0)throw new Error("negative radius: "+u);if(this._x1===null)this._+="M"+(this._x1=l)+","+(this._y1=i);else if(_>P)if(!(Math.abs(c*g-m*E)>P)||!u)this._+="L"+(this._x1=l)+","+(this._y1=i);else{var T=s-d,M=o-h,k=g*g+m*m,b=T*T+M*M,A=Math.sqrt(k),y=Math.sqrt(_),f=u*Math.tan((w-Math.acos((k+_-b)/(2*A*y)))/2),p=f/y,x=f/A;Math.abs(p-1)>P&&(this._+="L"+(l+p*E)+","+(i+p*c)),this._+="A"+u+","+u+",0,0,"+ +(c*T>E*M)+","+(this._x1=l+x*g)+","+(this._y1=i+x*m)}},arc:function(l,i,s,o,u,d){l=+l,i=+i,s=+s,d=!!d;var h=s*Math.cos(o),g=s*Math.sin(o),m=l+h,E=i+g,c=1^d,_=d?o-u:u-o;if(s<0)throw new Error("negative radius: "+s);this._x1===null?this._+="M"+m+","+E:(Math.abs(this._x1-m)>P||Math.abs(this._y1-E)>P)&&(this._+="L"+m+","+E),s&&(_<0&&(_=_%C+C),_>t?this._+="A"+s+","+s+",0,1,"+c+","+(l-h)+","+(i-g)+"A"+s+","+s+",0,1,"+c+","+(this._x1=m)+","+(this._y1=E):_>P&&(this._+="A"+s+","+s+",0,"+ +(_>=w)+","+c+","+(this._x1=l+s*Math.cos(u))+","+(this._y1=i+s*Math.sin(u))))},rect:function(l,i,s,o){this._+="M"+(this._x0=this._x1=+l)+","+(this._y0=this._y1=+i)+"h"+ +s+"v"+ +o+"h"+-s+"Z"},toString:function(){return this._}},v.path=a,Object.defineProperty(v,"__esModule",{value:!0})})}}),xF=Ne({"node_modules/d3-shape/dist/d3-shape.js"(te,Z){(function(v,w){typeof te=="object"&&typeof Z<"u"?w(te,ire()):(v=v||self,w(v.d3=v.d3||{},v.d3))})(te,function(v,w){function C(It){return function(){return It}}var P=Math.abs,t=Math.atan2,r=Math.cos,a=Math.max,l=Math.min,i=Math.sin,s=Math.sqrt,o=1e-12,u=Math.PI,d=u/2,h=2*u;function g(It){return It>1?0:It<-1?u:Math.acos(It)}function m(It){return It>=1?d:It<=-1?-d:Math.asin(It)}function E(It){return It.innerRadius}function c(It){return It.outerRadius}function _(It){return It.startAngle}function T(It){return It.endAngle}function M(It){return It&&It.padAngle}function k(It,xr,Yr,An,Zn,sa,oa,Sn){var Kn=Yr-It,Ui=An-xr,Za=oa-Zn,Ki=Sn-sa,ho=Ki*Kn-Za*Ui;if(!(ho*ho<o))return ho=(Za*(xr-sa)-Ki*(It-Zn))/ho,[It+ho*Kn,xr+ho*Ui]}function b(It,xr,Yr,An,Zn,sa,oa){var Sn=It-Yr,Kn=xr-An,Ui=(oa?sa:-sa)/s(Sn*Sn+Kn*Kn),Za=Ui*Kn,Ki=-Ui*Sn,ho=It+Za,Co=xr+Ki,So=Yr+Za,Vo=An+Ki,Oi=(ho+So)/2,ps=(Co+Vo)/2,as=So-ho,rl=Vo-Co,As=as*as+rl*rl,hs=Zn-sa,ts=ho*Vo-So*Co,nl=(rl<0?-1:1)*s(a(0,hs*hs*As-ts*ts)),Qs=(ts*rl-as*nl)/As,_l=(-ts*as-rl*nl)/As,Ss=(ts*rl+as*nl)/As,ls=(-ts*as+rl*nl)/As,Oo=Qs-Oi,Es=_l-ps,xl=Ss-Oi,Ul=ls-ps;return Oo*Oo+Es*Es>xl*xl+Ul*Ul&&(Qs=Ss,_l=ls),{cx:Qs,cy:_l,x01:-Za,y01:-Ki,x11:Qs*(Zn/hs-1),y11:_l*(Zn/hs-1)}}function A(){var It=E,xr=c,Yr=C(0),An=null,Zn=_,sa=T,oa=M,Sn=null;function Kn(){var Ui,Za,Ki=+It.apply(this,arguments),ho=+xr.apply(this,arguments),Co=Zn.apply(this,arguments)-d,So=sa.apply(this,arguments)-d,Vo=P(So-Co),Oi=So>Co;if(Sn||(Sn=Ui=w.path()),ho<Ki&&(Za=ho,ho=Ki,Ki=Za),!(ho>o))Sn.moveTo(0,0);else if(Vo>h-o)Sn.moveTo(ho*r(Co),ho*i(Co)),Sn.arc(0,0,ho,Co,So,!Oi),Ki>o&&(Sn.moveTo(Ki*r(So),Ki*i(So)),Sn.arc(0,0,Ki,So,Co,Oi));else{var ps=Co,as=So,rl=Co,As=So,hs=Vo,ts=Vo,nl=oa.apply(this,arguments)/2,Qs=nl>o&&(An?+An.apply(this,arguments):s(Ki*Ki+ho*ho)),_l=l(P(ho-Ki)/2,+Yr.apply(this,arguments)),Ss=_l,ls=_l,Oo,Es;if(Qs>o){var xl=m(Qs/Ki*i(nl)),Ul=m(Qs/ho*i(nl));(hs-=xl*2)>o?(xl*=Oi?1:-1,rl+=xl,As-=xl):(hs=0,rl=As=(Co+So)/2),(ts-=Ul*2)>o?(Ul*=Oi?1:-1,ps+=Ul,as-=Ul):(ts=0,ps=as=(Co+So)/2)}var Hl=ho*r(ps),Fs=ho*i(ps),Ni=Ki*r(As),wo=Ki*i(As);if(_l>o){var ql=ho*r(as),Gs=ho*i(as),Jo=Ki*r(rl),Gl=Ki*i(rl),al;if(Vo<u&&(al=k(Hl,Fs,Jo,Gl,ql,Gs,Ni,wo))){var bl=Hl-al[0],Iu=Fs-al[1],_o=ql-al[0],Ps=Gs-al[1],ms=1/i(g((bl*_o+Iu*Ps)/(s(bl*bl+Iu*Iu)*s(_o*_o+Ps*Ps)))/2),ru=s(al[0]*al[0]+al[1]*al[1]);Ss=l(_l,(Ki-ru)/(ms-1)),ls=l(_l,(ho-ru)/(ms+1))}}ts>o?ls>o?(Oo=b(Jo,Gl,Hl,Fs,ho,ls,Oi),Es=b(ql,Gs,Ni,wo,ho,ls,Oi),Sn.moveTo(Oo.cx+Oo.x01,Oo.cy+Oo.y01),ls<_l?Sn.arc(Oo.cx,Oo.cy,ls,t(Oo.y01,Oo.x01),t(Es.y01,Es.x01),!Oi):(Sn.arc(Oo.cx,Oo.cy,ls,t(Oo.y01,Oo.x01),t(Oo.y11,Oo.x11),!Oi),Sn.arc(0,0,ho,t(Oo.cy+Oo.y11,Oo.cx+Oo.x11),t(Es.cy+Es.y11,Es.cx+Es.x11),!Oi),Sn.arc(Es.cx,Es.cy,ls,t(Es.y11,Es.x11),t(Es.y01,Es.x01),!Oi))):(Sn.moveTo(Hl,Fs),Sn.arc(0,0,ho,ps,as,!Oi)):Sn.moveTo(Hl,Fs),!(Ki>o)||!(hs>o)?Sn.lineTo(Ni,wo):Ss>o?(Oo=b(Ni,wo,ql,Gs,Ki,-Ss,Oi),Es=b(Hl,Fs,Jo,Gl,Ki,-Ss,Oi),Sn.lineTo(Oo.cx+Oo.x01,Oo.cy+Oo.y01),Ss<_l?Sn.arc(Oo.cx,Oo.cy,Ss,t(Oo.y01,Oo.x01),t(Es.y01,Es.x01),!Oi):(Sn.arc(Oo.cx,Oo.cy,Ss,t(Oo.y01,Oo.x01),t(Oo.y11,Oo.x11),!Oi),Sn.arc(0,0,Ki,t(Oo.cy+Oo.y11,Oo.cx+Oo.x11),t(Es.cy+Es.y11,Es.cx+Es.x11),Oi),Sn.arc(Es.cx,Es.cy,Ss,t(Es.y11,Es.x11),t(Es.y01,Es.x01),!Oi))):Sn.arc(0,0,Ki,As,rl,Oi)}if(Sn.closePath(),Ui)return Sn=null,Ui+""||null}return Kn.centroid=function(){var Ui=(+It.apply(this,arguments)+ +xr.apply(this,arguments))/2,Za=(+Zn.apply(this,arguments)+ +sa.apply(this,arguments))/2-u/2;return[r(Za)*Ui,i(Za)*Ui]},Kn.innerRadius=function(Ui){return arguments.length?(It=typeof Ui=="function"?Ui:C(+Ui),Kn):It},Kn.outerRadius=function(Ui){return arguments.length?(xr=typeof Ui=="function"?Ui:C(+Ui),Kn):xr},Kn.cornerRadius=function(Ui){return arguments.length?(Yr=typeof Ui=="function"?Ui:C(+Ui),Kn):Yr},Kn.padRadius=function(Ui){return arguments.length?(An=Ui==null?null:typeof Ui=="function"?Ui:C(+Ui),Kn):An},Kn.startAngle=function(Ui){return arguments.length?(Zn=typeof Ui=="function"?Ui:C(+Ui),Kn):Zn},Kn.endAngle=function(Ui){return arguments.length?(sa=typeof Ui=="function"?Ui:C(+Ui),Kn):sa},Kn.padAngle=function(Ui){return arguments.length?(oa=typeof Ui=="function"?Ui:C(+Ui),Kn):oa},Kn.context=function(Ui){return arguments.length?(Sn=Ui??null,Kn):Sn},Kn}function y(It){this._context=It}y.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(It,xr){switch(It=+It,xr=+xr,this._point){case 0:this._point=1,this._line?this._context.lineTo(It,xr):this._context.moveTo(It,xr);break;case 1:this._point=2;default:this._context.lineTo(It,xr);break}}};function f(It){return new y(It)}function p(It){return It[0]}function x(It){return It[1]}function N(){var It=p,xr=x,Yr=C(!0),An=null,Zn=f,sa=null;function oa(Sn){var Kn,Ui=Sn.length,Za,Ki=!1,ho;for(An==null&&(sa=Zn(ho=w.path())),Kn=0;Kn<=Ui;++Kn)!(Kn<Ui&&Yr(Za=Sn[Kn],Kn,Sn))===Ki&&((Ki=!Ki)?sa.lineStart():sa.lineEnd()),Ki&&sa.point(+It(Za,Kn,Sn),+xr(Za,Kn,Sn));if(ho)return sa=null,ho+""||null}return oa.x=function(Sn){return arguments.length?(It=typeof Sn=="function"?Sn:C(+Sn),oa):It},oa.y=function(Sn){return arguments.length?(xr=typeof Sn=="function"?Sn:C(+Sn),oa):xr},oa.defined=function(Sn){return arguments.length?(Yr=typeof Sn=="function"?Sn:C(!!Sn),oa):Yr},oa.curve=function(Sn){return arguments.length?(Zn=Sn,An!=null&&(sa=Zn(An)),oa):Zn},oa.context=function(Sn){return arguments.length?(Sn==null?An=sa=null:sa=Zn(An=Sn),oa):An},oa}function D(){var It=p,xr=null,Yr=C(0),An=x,Zn=C(!0),sa=null,oa=f,Sn=null;function Kn(Za){var Ki,ho,Co,So=Za.length,Vo,Oi=!1,ps,as=new Array(So),rl=new Array(So);for(sa==null&&(Sn=oa(ps=w.path())),Ki=0;Ki<=So;++Ki){if(!(Ki<So&&Zn(Vo=Za[Ki],Ki,Za))===Oi)if(Oi=!Oi)ho=Ki,Sn.areaStart(),Sn.lineStart();else{for(Sn.lineEnd(),Sn.lineStart(),Co=Ki-1;Co>=ho;--Co)Sn.point(as[Co],rl[Co]);Sn.lineEnd(),Sn.areaEnd()}Oi&&(as[Ki]=+It(Vo,Ki,Za),rl[Ki]=+Yr(Vo,Ki,Za),Sn.point(xr?+xr(Vo,Ki,Za):as[Ki],An?+An(Vo,Ki,Za):rl[Ki]))}if(ps)return Sn=null,ps+""||null}function Ui(){return N().defined(Zn).curve(oa).context(sa)}return Kn.x=function(Za){return arguments.length?(It=typeof Za=="function"?Za:C(+Za),xr=null,Kn):It},Kn.x0=function(Za){return arguments.length?(It=typeof Za=="function"?Za:C(+Za),Kn):It},Kn.x1=function(Za){return arguments.length?(xr=Za==null?null:typeof Za=="function"?Za:C(+Za),Kn):xr},Kn.y=function(Za){return arguments.length?(Yr=typeof Za=="function"?Za:C(+Za),An=null,Kn):Yr},Kn.y0=function(Za){return arguments.length?(Yr=typeof Za=="function"?Za:C(+Za),Kn):Yr},Kn.y1=function(Za){return arguments.length?(An=Za==null?null:typeof Za=="function"?Za:C(+Za),Kn):An},Kn.lineX0=Kn.lineY0=function(){return Ui().x(It).y(Yr)},Kn.lineY1=function(){return Ui().x(It).y(An)},Kn.lineX1=function(){return Ui().x(xr).y(Yr)},Kn.defined=function(Za){return arguments.length?(Zn=typeof Za=="function"?Za:C(!!Za),Kn):Zn},Kn.curve=function(Za){return arguments.length?(oa=Za,sa!=null&&(Sn=oa(sa)),Kn):oa},Kn.context=function(Za){return arguments.length?(Za==null?sa=Sn=null:Sn=oa(sa=Za),Kn):sa},Kn}function B(It,xr){return xr<It?-1:xr>It?1:xr>=It?0:NaN}function U(It){return It}function V(){var It=U,xr=B,Yr=null,An=C(0),Zn=C(h),sa=C(0);function oa(Sn){var Kn,Ui=Sn.length,Za,Ki,ho=0,Co=new Array(Ui),So=new Array(Ui),Vo=+An.apply(this,arguments),Oi=Math.min(h,Math.max(-h,Zn.apply(this,arguments)-Vo)),ps,as=Math.min(Math.abs(Oi)/Ui,sa.apply(this,arguments)),rl=as*(Oi<0?-1:1),As;for(Kn=0;Kn<Ui;++Kn)(As=So[Co[Kn]=Kn]=+It(Sn[Kn],Kn,Sn))>0&&(ho+=As);for(xr!=null?Co.sort(function(hs,ts){return xr(So[hs],So[ts])}):Yr!=null&&Co.sort(function(hs,ts){return Yr(Sn[hs],Sn[ts])}),Kn=0,Ki=ho?(Oi-Ui*rl)/ho:0;Kn<Ui;++Kn,Vo=ps)Za=Co[Kn],As=So[Za],ps=Vo+(As>0?As*Ki:0)+rl,So[Za]={data:Sn[Za],index:Kn,value:As,startAngle:Vo,endAngle:ps,padAngle:as};return So}return oa.value=function(Sn){return arguments.length?(It=typeof Sn=="function"?Sn:C(+Sn),oa):It},oa.sortValues=function(Sn){return arguments.length?(xr=Sn,Yr=null,oa):xr},oa.sort=function(Sn){return arguments.length?(Yr=Sn,xr=null,oa):Yr},oa.startAngle=function(Sn){return arguments.length?(An=typeof Sn=="function"?Sn:C(+Sn),oa):An},oa.endAngle=function(Sn){return arguments.length?(Zn=typeof Sn=="function"?Sn:C(+Sn),oa):Zn},oa.padAngle=function(Sn){return arguments.length?(sa=typeof Sn=="function"?Sn:C(+Sn),oa):sa},oa}var q=H(f);function z(It){this._curve=It}z.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(It,xr){this._curve.point(xr*Math.sin(It),xr*-Math.cos(It))}};function H(It){function xr(Yr){return new z(It(Yr))}return xr._curve=It,xr}function G(It){var xr=It.curve;return It.angle=It.x,delete It.x,It.radius=It.y,delete It.y,It.curve=function(Yr){return arguments.length?xr(H(Yr)):xr()._curve},It}function J(){return G(N().curve(q))}function le(){var It=D().curve(q),xr=It.curve,Yr=It.lineX0,An=It.lineX1,Zn=It.lineY0,sa=It.lineY1;return It.angle=It.x,delete It.x,It.startAngle=It.x0,delete It.x0,It.endAngle=It.x1,delete It.x1,It.radius=It.y,delete It.y,It.innerRadius=It.y0,delete It.y0,It.outerRadius=It.y1,delete It.y1,It.lineStartAngle=function(){return G(Yr())},delete It.lineX0,It.lineEndAngle=function(){return G(An())},delete It.lineX1,It.lineInnerRadius=function(){return G(Zn())},delete It.lineY0,It.lineOuterRadius=function(){return G(sa())},delete It.lineY1,It.curve=function(oa){return arguments.length?xr(H(oa)):xr()._curve},It}function ge(It,xr){return[(xr=+xr)*Math.cos(It-=Math.PI/2),xr*Math.sin(It)]}var de=Array.prototype.slice;function me(It){return It.source}function W(It){return It.target}function ie(It){var xr=me,Yr=W,An=p,Zn=x,sa=null;function oa(){var Sn,Kn=de.call(arguments),Ui=xr.apply(this,Kn),Za=Yr.apply(this,Kn);if(sa||(sa=Sn=w.path()),It(sa,+An.apply(this,(Kn[0]=Ui,Kn)),+Zn.apply(this,Kn),+An.apply(this,(Kn[0]=Za,Kn)),+Zn.apply(this,Kn)),Sn)return sa=null,Sn+""||null}return oa.source=function(Sn){return arguments.length?(xr=Sn,oa):xr},oa.target=function(Sn){return arguments.length?(Yr=Sn,oa):Yr},oa.x=function(Sn){return arguments.length?(An=typeof Sn=="function"?Sn:C(+Sn),oa):An},oa.y=function(Sn){return arguments.length?(Zn=typeof Sn=="function"?Sn:C(+Sn),oa):Zn},oa.context=function(Sn){return arguments.length?(sa=Sn??null,oa):sa},oa}function se(It,xr,Yr,An,Zn){It.moveTo(xr,Yr),It.bezierCurveTo(xr=(xr+An)/2,Yr,xr,Zn,An,Zn)}function ee(It,xr,Yr,An,Zn){It.moveTo(xr,Yr),It.bezierCurveTo(xr,Yr=(Yr+Zn)/2,An,Yr,An,Zn)}function pe(It,xr,Yr,An,Zn){var sa=ge(xr,Yr),oa=ge(xr,Yr=(Yr+Zn)/2),Sn=ge(An,Yr),Kn=ge(An,Zn);It.moveTo(sa[0],sa[1]),It.bezierCurveTo(oa[0],oa[1],Sn[0],Sn[1],Kn[0],Kn[1])}function oe(){return ie(se)}function Y(){return ie(ee)}function ce(){var It=ie(pe);return It.angle=It.x,delete It.x,It.radius=It.y,delete It.y,It}var ue={draw:function(It,xr){var Yr=Math.sqrt(xr/u);It.moveTo(Yr,0),It.arc(0,0,Yr,0,h)}},_e={draw:function(It,xr){var Yr=Math.sqrt(xr/5)/2;It.moveTo(-3*Yr,-Yr),It.lineTo(-Yr,-Yr),It.lineTo(-Yr,-3*Yr),It.lineTo(Yr,-3*Yr),It.lineTo(Yr,-Yr),It.lineTo(3*Yr,-Yr),It.lineTo(3*Yr,Yr),It.lineTo(Yr,Yr),It.lineTo(Yr,3*Yr),It.lineTo(-Yr,3*Yr),It.lineTo(-Yr,Yr),It.lineTo(-3*Yr,Yr),It.closePath()}},Le=Math.sqrt(1/3),ze=Le*2,Xe={draw:function(It,xr){var Yr=Math.sqrt(xr/ze),An=Yr*Le;It.moveTo(0,-Yr),It.lineTo(An,0),It.lineTo(0,Yr),It.lineTo(-An,0),It.closePath()}},Ve=.8908130915292852,rt=Math.sin(u/10)/Math.sin(7*u/10),mt=Math.sin(h/10)*rt,_t=-Math.cos(h/10)*rt,vt={draw:function(It,xr){var Yr=Math.sqrt(xr*Ve),An=mt*Yr,Zn=_t*Yr;It.moveTo(0,-Yr),It.lineTo(An,Zn);for(var sa=1;sa<5;++sa){var oa=h*sa/5,Sn=Math.cos(oa),Kn=Math.sin(oa);It.lineTo(Kn*Yr,-Sn*Yr),It.lineTo(Sn*An-Kn*Zn,Kn*An+Sn*Zn)}It.closePath()}},ut={draw:function(It,xr){var Yr=Math.sqrt(xr),An=-Yr/2;It.rect(An,An,Yr,Yr)}},Fe=Math.sqrt(3),Pe={draw:function(It,xr){var Yr=-Math.sqrt(xr/(Fe*3));It.moveTo(0,Yr*2),It.lineTo(-Fe*Yr,-Yr),It.lineTo(Fe*Yr,-Yr),It.closePath()}},be=-.5,Ye=Math.sqrt(3)/2,yt=1/Math.sqrt(12),wt=(yt/2+1)*3,ht={draw:function(It,xr){var Yr=Math.sqrt(xr/wt),An=Yr/2,Zn=Yr*yt,sa=An,oa=Yr*yt+Yr,Sn=-sa,Kn=oa;It.moveTo(An,Zn),It.lineTo(sa,oa),It.lineTo(Sn,Kn),It.lineTo(be*An-Ye*Zn,Ye*An+be*Zn),It.lineTo(be*sa-Ye*oa,Ye*sa+be*oa),It.lineTo(be*Sn-Ye*Kn,Ye*Sn+be*Kn),It.lineTo(be*An+Ye*Zn,be*Zn-Ye*An),It.lineTo(be*sa+Ye*oa,be*oa-Ye*sa),It.lineTo(be*Sn+Ye*Kn,be*Kn-Ye*Sn),It.closePath()}},Yt=[ue,_e,Xe,ut,vt,Pe,ht];function $t(){var It=C(ue),xr=C(64),Yr=null;function An(){var Zn;if(Yr||(Yr=Zn=w.path()),It.apply(this,arguments).draw(Yr,+xr.apply(this,arguments)),Zn)return Yr=null,Zn+""||null}return An.type=function(Zn){return arguments.length?(It=typeof Zn=="function"?Zn:C(Zn),An):It},An.size=function(Zn){return arguments.length?(xr=typeof Zn=="function"?Zn:C(+Zn),An):xr},An.context=function(Zn){return arguments.length?(Yr=Zn??null,An):Yr},An}function fr(){}function mr(It,xr,Yr){It._context.bezierCurveTo((2*It._x0+It._x1)/3,(2*It._y0+It._y1)/3,(It._x0+2*It._x1)/3,(It._y0+2*It._y1)/3,(It._x0+4*It._x1+xr)/6,(It._y0+4*It._y1+Yr)/6)}function Ur(It){this._context=It}Ur.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:mr(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(It,xr){switch(It=+It,xr=+xr,this._point){case 0:this._point=1,this._line?this._context.lineTo(It,xr):this._context.moveTo(It,xr);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:mr(this,It,xr);break}this._x0=this._x1,this._x1=It,this._y0=this._y1,this._y1=xr}};function jr(It){return new Ur(It)}function fn(It){this._context=It}fn.prototype={areaStart:fr,areaEnd:fr,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(It,xr){switch(It=+It,xr=+xr,this._point){case 0:this._point=1,this._x2=It,this._y2=xr;break;case 1:this._point=2,this._x3=It,this._y3=xr;break;case 2:this._point=3,this._x4=It,this._y4=xr,this._context.moveTo((this._x0+4*this._x1+It)/6,(this._y0+4*this._y1+xr)/6);break;default:mr(this,It,xr);break}this._x0=this._x1,this._x1=It,this._y0=this._y1,this._y1=xr}};function Br(It){return new fn(It)}function Qr(It){this._context=It}Qr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(It,xr){switch(It=+It,xr=+xr,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var Yr=(this._x0+4*this._x1+It)/6,An=(this._y0+4*this._y1+xr)/6;this._line?this._context.lineTo(Yr,An):this._context.moveTo(Yr,An);break;case 3:this._point=4;default:mr(this,It,xr);break}this._x0=this._x1,this._x1=It,this._y0=this._y1,this._y1=xr}};function Ot(It){return new Qr(It)}function $e(It,xr){this._basis=new Ur(It),this._beta=xr}$e.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var It=this._x,xr=this._y,Yr=It.length-1;if(Yr>0)for(var An=It[0],Zn=xr[0],sa=It[Yr]-An,oa=xr[Yr]-Zn,Sn=-1,Kn;++Sn<=Yr;)Kn=Sn/Yr,this._basis.point(this._beta*It[Sn]+(1-this._beta)*(An+Kn*sa),this._beta*xr[Sn]+(1-this._beta)*(Zn+Kn*oa));this._x=this._y=null,this._basis.lineEnd()},point:function(It,xr){this._x.push(+It),this._y.push(+xr)}};var ot=(function It(xr){function Yr(An){return xr===1?new Ur(An):new $e(An,xr)}return Yr.beta=function(An){return It(+An)},Yr})(.85);function De(It,xr,Yr){It._context.bezierCurveTo(It._x1+It._k*(It._x2-It._x0),It._y1+It._k*(It._y2-It._y0),It._x2+It._k*(It._x1-xr),It._y2+It._k*(It._y1-Yr),It._x2,It._y2)}function Ee(It,xr){this._context=It,this._k=(1-xr)/6}Ee.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:De(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(It,xr){switch(It=+It,xr=+xr,this._point){case 0:this._point=1,this._line?this._context.lineTo(It,xr):this._context.moveTo(It,xr);break;case 1:this._point=2,this._x1=It,this._y1=xr;break;case 2:this._point=3;default:De(this,It,xr);break}this._x0=this._x1,this._x1=this._x2,this._x2=It,this._y0=this._y1,this._y1=this._y2,this._y2=xr}};var Ae=(function It(xr){function Yr(An){return new Ee(An,xr)}return Yr.tension=function(An){return It(+An)},Yr})(0);function Ie(It,xr){this._context=It,this._k=(1-xr)/6}Ie.prototype={areaStart:fr,areaEnd:fr,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(It,xr){switch(It=+It,xr=+xr,this._point){case 0:this._point=1,this._x3=It,this._y3=xr;break;case 1:this._point=2,this._context.moveTo(this._x4=It,this._y4=xr);break;case 2:this._point=3,this._x5=It,this._y5=xr;break;default:De(this,It,xr);break}this._x0=this._x1,this._x1=this._x2,this._x2=It,this._y0=this._y1,this._y1=this._y2,this._y2=xr}};var tt=(function It(xr){function Yr(An){return new Ie(An,xr)}return Yr.tension=function(An){return It(+An)},Yr})(0);function st(It,xr){this._context=It,this._k=(1-xr)/6}st.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(It,xr){switch(It=+It,xr=+xr,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:De(this,It,xr);break}this._x0=this._x1,this._x1=this._x2,this._x2=It,this._y0=this._y1,this._y1=this._y2,this._y2=xr}};var Bt=(function It(xr){function Yr(An){return new st(An,xr)}return Yr.tension=function(An){return It(+An)},Yr})(0);function Ft(It,xr,Yr){var An=It._x1,Zn=It._y1,sa=It._x2,oa=It._y2;if(It._l01_a>o){var Sn=2*It._l01_2a+3*It._l01_a*It._l12_a+It._l12_2a,Kn=3*It._l01_a*(It._l01_a+It._l12_a);An=(An*Sn-It._x0*It._l12_2a+It._x2*It._l01_2a)/Kn,Zn=(Zn*Sn-It._y0*It._l12_2a+It._y2*It._l01_2a)/Kn}if(It._l23_a>o){var Ui=2*It._l23_2a+3*It._l23_a*It._l12_a+It._l12_2a,Za=3*It._l23_a*(It._l23_a+It._l12_a);sa=(sa*Ui+It._x1*It._l23_2a-xr*It._l12_2a)/Za,oa=(oa*Ui+It._y1*It._l23_2a-Yr*It._l12_2a)/Za}It._context.bezierCurveTo(An,Zn,sa,oa,It._x2,It._y2)}function Wt(It,xr){this._context=It,this._alpha=xr}Wt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(It,xr){if(It=+It,xr=+xr,this._point){var Yr=this._x2-It,An=this._y2-xr;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Yr*Yr+An*An,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(It,xr):this._context.moveTo(It,xr);break;case 1:this._point=2;break;case 2:this._point=3;default:Ft(this,It,xr);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=It,this._y0=this._y1,this._y1=this._y2,this._y2=xr}};var lr=(function It(xr){function Yr(An){return xr?new Wt(An,xr):new Ee(An,0)}return Yr.alpha=function(An){return It(+An)},Yr})(.5);function Rr(It,xr){this._context=It,this._alpha=xr}Rr.prototype={areaStart:fr,areaEnd:fr,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(It,xr){if(It=+It,xr=+xr,this._point){var Yr=this._x2-It,An=this._y2-xr;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Yr*Yr+An*An,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=It,this._y3=xr;break;case 1:this._point=2,this._context.moveTo(this._x4=It,this._y4=xr);break;case 2:this._point=3,this._x5=It,this._y5=xr;break;default:Ft(this,It,xr);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=It,this._y0=this._y1,this._y1=this._y2,this._y2=xr}};var Mr=(function It(xr){function Yr(An){return xr?new Rr(An,xr):new Ie(An,0)}return Yr.alpha=function(An){return It(+An)},Yr})(.5);function Sr(It,xr){this._context=It,this._alpha=xr}Sr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(It,xr){if(It=+It,xr=+xr,this._point){var Yr=this._x2-It,An=this._y2-xr;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Yr*Yr+An*An,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ft(this,It,xr);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=It,this._y0=this._y1,this._y1=this._y2,this._y2=xr}};var Kr=(function It(xr){function Yr(An){return xr?new Sr(An,xr):new st(An,0)}return Yr.alpha=function(An){return It(+An)},Yr})(.5);function Hn(It){this._context=It}Hn.prototype={areaStart:fr,areaEnd:fr,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(It,xr){It=+It,xr=+xr,this._point?this._context.lineTo(It,xr):(this._point=1,this._context.moveTo(It,xr))}};function ga(It){return new Hn(It)}function ua(It){return It<0?-1:1}function Ta(It,xr,Yr){var An=It._x1-It._x0,Zn=xr-It._x1,sa=(It._y1-It._y0)/(An||Zn<0&&-0),oa=(Yr-It._y1)/(Zn||An<0&&-0),Sn=(sa*Zn+oa*An)/(An+Zn);return(ua(sa)+ua(oa))*Math.min(Math.abs(sa),Math.abs(oa),.5*Math.abs(Sn))||0}function Aa(It,xr){var Yr=It._x1-It._x0;return Yr?(3*(It._y1-It._y0)/Yr-xr)/2:xr}function ia(It,xr,Yr){var An=It._x0,Zn=It._y0,sa=It._x1,oa=It._y1,Sn=(sa-An)/3;It._context.bezierCurveTo(An+Sn,Zn+Sn*xr,sa-Sn,oa-Sn*Yr,sa,oa)}function $a(It){this._context=It}$a.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:ia(this,this._t0,Aa(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(It,xr){var Yr=NaN;if(It=+It,xr=+xr,!(It===this._x1&&xr===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(It,xr):this._context.moveTo(It,xr);break;case 1:this._point=2;break;case 2:this._point=3,ia(this,Aa(this,Yr=Ta(this,It,xr)),Yr);break;default:ia(this,this._t0,Yr=Ta(this,It,xr));break}this._x0=this._x1,this._x1=It,this._y0=this._y1,this._y1=xr,this._t0=Yr}}};function ci(It){this._context=new _r(It)}(ci.prototype=Object.create($a.prototype)).point=function(It,xr){$a.prototype.point.call(this,xr,It)};function _r(It){this._context=It}_r.prototype={moveTo:function(It,xr){this._context.moveTo(xr,It)},closePath:function(){this._context.closePath()},lineTo:function(It,xr){this._context.lineTo(xr,It)},bezierCurveTo:function(It,xr,Yr,An,Zn,sa){this._context.bezierCurveTo(xr,It,An,Yr,sa,Zn)}};function Qt(It){return new $a(It)}function yr(It){return new ci(It)}function br(It){this._context=It}br.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var It=this._x,xr=this._y,Yr=It.length;if(Yr)if(this._line?this._context.lineTo(It[0],xr[0]):this._context.moveTo(It[0],xr[0]),Yr===2)this._context.lineTo(It[1],xr[1]);else for(var An=an(It),Zn=an(xr),sa=0,oa=1;oa<Yr;++sa,++oa)this._context.bezierCurveTo(An[0][sa],Zn[0][sa],An[1][sa],Zn[1][sa],It[oa],xr[oa]);(this._line||this._line!==0&&Yr===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(It,xr){this._x.push(+It),this._y.push(+xr)}};function an(It){var xr,Yr=It.length-1,An,Zn=new Array(Yr),sa=new Array(Yr),oa=new Array(Yr);for(Zn[0]=0,sa[0]=2,oa[0]=It[0]+2*It[1],xr=1;xr<Yr-1;++xr)Zn[xr]=1,sa[xr]=4,oa[xr]=4*It[xr]+2*It[xr+1];for(Zn[Yr-1]=2,sa[Yr-1]=7,oa[Yr-1]=8*It[Yr-1]+It[Yr],xr=1;xr<Yr;++xr)An=Zn[xr]/sa[xr-1],sa[xr]-=An,oa[xr]-=An*oa[xr-1];for(Zn[Yr-1]=oa[Yr-1]/sa[Yr-1],xr=Yr-2;xr>=0;--xr)Zn[xr]=(oa[xr]-Zn[xr+1])/sa[xr];for(sa[Yr-1]=(It[Yr]+Zn[Yr-1])/2,xr=0;xr<Yr-1;++xr)sa[xr]=2*It[xr+1]-Zn[xr+1];return[Zn,sa]}function wn(It){return new br(It)}function Ln(It,xr){this._context=It,this._t=xr}Ln.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(It,xr){switch(It=+It,xr=+xr,this._point){case 0:this._point=1,this._line?this._context.lineTo(It,xr):this._context.moveTo(It,xr);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,xr),this._context.lineTo(It,xr);else{var Yr=this._x*(1-this._t)+It*this._t;this._context.lineTo(Yr,this._y),this._context.lineTo(Yr,xr)}break}}this._x=It,this._y=xr}};function Bn(It){return new Ln(It,.5)}function xa(It){return new Ln(It,0)}function za(It){return new Ln(It,1)}function Ia(It,xr){if((oa=It.length)>1)for(var Yr=1,An,Zn,sa=It[xr[0]],oa,Sn=sa.length;Yr<oa;++Yr)for(Zn=sa,sa=It[xr[Yr]],An=0;An<Sn;++An)sa[An][1]+=sa[An][0]=isNaN(Zn[An][1])?Zn[An][0]:Zn[An][1]}function Ba(It){for(var xr=It.length,Yr=new Array(xr);--xr>=0;)Yr[xr]=xr;return Yr}function Ka(It,xr){return It[xr]}function fa(){var It=C([]),xr=Ba,Yr=Ia,An=Ka;function Zn(sa){var oa=It.apply(this,arguments),Sn,Kn=sa.length,Ui=oa.length,Za=new Array(Ui),Ki;for(Sn=0;Sn<Ui;++Sn){for(var ho=oa[Sn],Co=Za[Sn]=new Array(Kn),So=0,Vo;So<Kn;++So)Co[So]=Vo=[0,+An(sa[So],ho,So,sa)],Vo.data=sa[So];Co.key=ho}for(Sn=0,Ki=xr(Za);Sn<Ui;++Sn)Za[Ki[Sn]].index=Sn;return Yr(Za,Ki),Za}return Zn.keys=function(sa){return arguments.length?(It=typeof sa=="function"?sa:C(de.call(sa)),Zn):It},Zn.value=function(sa){return arguments.length?(An=typeof sa=="function"?sa:C(+sa),Zn):An},Zn.order=function(sa){return arguments.length?(xr=sa==null?Ba:typeof sa=="function"?sa:C(de.call(sa)),Zn):xr},Zn.offset=function(sa){return arguments.length?(Yr=sa??Ia,Zn):Yr},Zn}function Bi(It,xr){if((An=It.length)>0){for(var Yr,An,Zn=0,sa=It[0].length,oa;Zn<sa;++Zn){for(oa=Yr=0;Yr<An;++Yr)oa+=It[Yr][Zn][1]||0;if(oa)for(Yr=0;Yr<An;++Yr)It[Yr][Zn][1]/=oa}Ia(It,xr)}}function Yi(It,xr){if((Kn=It.length)>0)for(var Yr,An=0,Zn,sa,oa,Sn,Kn,Ui=It[xr[0]].length;An<Ui;++An)for(oa=Sn=0,Yr=0;Yr<Kn;++Yr)(sa=(Zn=It[xr[Yr]][An])[1]-Zn[0])>0?(Zn[0]=oa,Zn[1]=oa+=sa):sa<0?(Zn[1]=Sn,Zn[0]=Sn+=sa):(Zn[0]=0,Zn[1]=sa)}function Ht(It,xr){if((Zn=It.length)>0){for(var Yr=0,An=It[xr[0]],Zn,sa=An.length;Yr<sa;++Yr){for(var oa=0,Sn=0;oa<Zn;++oa)Sn+=It[oa][Yr][1]||0;An[Yr][1]+=An[Yr][0]=-Sn/2}Ia(It,xr)}}function kt(It,xr){if(!(!((oa=It.length)>0)||!((sa=(Zn=It[xr[0]]).length)>0))){for(var Yr=0,An=1,Zn,sa,oa;An<sa;++An){for(var Sn=0,Kn=0,Ui=0;Sn<oa;++Sn){for(var Za=It[xr[Sn]],Ki=Za[An][1]||0,ho=Za[An-1][1]||0,Co=(Ki-ho)/2,So=0;So<Sn;++So){var Vo=It[xr[So]],Oi=Vo[An][1]||0,ps=Vo[An-1][1]||0;Co+=Oi-ps}Kn+=Ki,Ui+=Co*Ki}Zn[An-1][1]+=Zn[An-1][0]=Yr,Kn&&(Yr-=Ui/Kn)}Zn[An-1][1]+=Zn[An-1][0]=Yr,Ia(It,xr)}}function qr(It){var xr=It.map(en);return Ba(It).sort(function(Yr,An){return xr[Yr]-xr[An]})}function en(It){for(var xr=-1,Yr=0,An=It.length,Zn,sa=-1/0;++xr<An;)(Zn=+It[xr][1])>sa&&(sa=Zn,Yr=xr);return Yr}function rn(It){var xr=It.map(Wr);return Ba(It).sort(function(Yr,An){return xr[Yr]-xr[An]})}function Wr(It){for(var xr=0,Yr=-1,An=It.length,Zn;++Yr<An;)(Zn=+It[Yr][1])&&(xr+=Zn);return xr}function tn(It){return rn(It).reverse()}function Tn(It){var xr=It.length,Yr,An,Zn=It.map(Wr),sa=qr(It),oa=0,Sn=0,Kn=[],Ui=[];for(Yr=0;Yr<xr;++Yr)An=sa[Yr],oa<Sn?(oa+=Zn[An],Kn.push(An)):(Sn+=Zn[An],Ui.push(An));return Ui.reverse().concat(Kn)}function dn(It){return Ba(It).reverse()}v.arc=A,v.area=D,v.areaRadial=le,v.curveBasis=jr,v.curveBasisClosed=Br,v.curveBasisOpen=Ot,v.curveBundle=ot,v.curveCardinal=Ae,v.curveCardinalClosed=tt,v.curveCardinalOpen=Bt,v.curveCatmullRom=lr,v.curveCatmullRomClosed=Mr,v.curveCatmullRomOpen=Kr,v.curveLinear=f,v.curveLinearClosed=ga,v.curveMonotoneX=Qt,v.curveMonotoneY=yr,v.curveNatural=wn,v.curveStep=Bn,v.curveStepAfter=za,v.curveStepBefore=xa,v.line=N,v.lineRadial=J,v.linkHorizontal=oe,v.linkRadial=ce,v.linkVertical=Y,v.pie=V,v.pointRadial=ge,v.radialArea=le,v.radialLine=J,v.stack=fa,v.stackOffsetDiverging=Yi,v.stackOffsetExpand=Bi,v.stackOffsetNone=Ia,v.stackOffsetSilhouette=Ht,v.stackOffsetWiggle=kt,v.stackOrderAppearance=qr,v.stackOrderAscending=rn,v.stackOrderDescending=tn,v.stackOrderInsideOut=Tn,v.stackOrderNone=Ba,v.stackOrderReverse=dn,v.symbol=$t,v.symbolCircle=ue,v.symbolCross=_e,v.symbolDiamond=Xe,v.symbolSquare=ut,v.symbolStar=vt,v.symbolTriangle=Pe,v.symbolWye=ht,v.symbols=Yt,Object.defineProperty(v,"__esModule",{value:!0})})}}),ore=Ne({"node_modules/@plotly/d3-sankey/build/d3-sankey.js"(te,Z){(function(v,w){typeof te=="object"&&typeof Z<"u"?w(te,ck(),WR(),xF()):w(v.d3=v.d3||{},v.d3,v.d3,v.d3)})(te,function(v,w,C,P){function t(f){return f.target.depth}function r(f){return f.depth}function a(f,p){return p-1-f.height}function l(f,p){return f.sourceLinks.length?f.depth:p-1}function i(f){return f.targetLinks.length?f.depth:f.sourceLinks.length?w.min(f.sourceLinks,t)-1:0}function s(f){return function(){return f}}function o(f,p){return d(f.source,p.source)||f.index-p.index}function u(f,p){return d(f.target,p.target)||f.index-p.index}function d(f,p){return f.y0-p.y0}function h(f){return f.value}function g(f){return(f.y0+f.y1)/2}function m(f){return g(f.source)*f.value}function E(f){return g(f.target)*f.value}function c(f){return f.index}function _(f){return f.nodes}function T(f){return f.links}function M(f,p){var x=f.get(p);if(!x)throw new Error("missing: "+p);return x}var k=function(){var f=0,p=0,x=1,N=1,D=24,B=8,U=c,V=l,q=_,z=T,H=32,G=2/3;function J(){var ie={nodes:q.apply(null,arguments),links:z.apply(null,arguments)};return le(ie),ge(ie),de(ie),me(ie),W(ie),ie}J.update=function(ie){return W(ie),ie},J.nodeId=function(ie){return arguments.length?(U=typeof ie=="function"?ie:s(ie),J):U},J.nodeAlign=function(ie){return arguments.length?(V=typeof ie=="function"?ie:s(ie),J):V},J.nodeWidth=function(ie){return arguments.length?(D=+ie,J):D},J.nodePadding=function(ie){return arguments.length?(B=+ie,J):B},J.nodes=function(ie){return arguments.length?(q=typeof ie=="function"?ie:s(ie),J):q},J.links=function(ie){return arguments.length?(z=typeof ie=="function"?ie:s(ie),J):z},J.size=function(ie){return arguments.length?(f=p=0,x=+ie[0],N=+ie[1],J):[x-f,N-p]},J.extent=function(ie){return arguments.length?(f=+ie[0][0],x=+ie[1][0],p=+ie[0][1],N=+ie[1][1],J):[[f,p],[x,N]]},J.iterations=function(ie){return arguments.length?(H=+ie,J):H};function le(ie){ie.nodes.forEach(function(ee,pe){ee.index=pe,ee.sourceLinks=[],ee.targetLinks=[]});var se=C.map(ie.nodes,U);ie.links.forEach(function(ee,pe){ee.index=pe;var oe=ee.source,Y=ee.target;typeof oe!="object"&&(oe=ee.source=M(se,oe)),typeof Y!="object"&&(Y=ee.target=M(se,Y)),oe.sourceLinks.push(ee),Y.targetLinks.push(ee)})}function ge(ie){ie.nodes.forEach(function(se){se.value=Math.max(w.sum(se.sourceLinks,h),w.sum(se.targetLinks,h))})}function de(ie){var se,ee,pe;for(se=ie.nodes,ee=[],pe=0;se.length;++pe,se=ee,ee=[])se.forEach(function(Y){Y.depth=pe,Y.sourceLinks.forEach(function(ce){ee.indexOf(ce.target)<0&&ee.push(ce.target)})});for(se=ie.nodes,ee=[],pe=0;se.length;++pe,se=ee,ee=[])se.forEach(function(Y){Y.height=pe,Y.targetLinks.forEach(function(ce){ee.indexOf(ce.source)<0&&ee.push(ce.source)})});var oe=(x-f-D)/(pe-1);ie.nodes.forEach(function(Y){Y.x1=(Y.x0=f+Math.max(0,Math.min(pe-1,Math.floor(V.call(null,Y,pe))))*oe)+D})}function me(ie){var se=C.nest().key(function(_e){return _e.x0}).sortKeys(w.ascending).entries(ie.nodes).map(function(_e){return _e.values});oe(),ue();for(var ee=1,pe=H;pe>0;--pe)ce(ee*=.99),ue(),Y(ee),ue();function oe(){var _e=w.max(se,function(Xe){return Xe.length}),Le=G*(N-p)/(_e-1);B>Le&&(B=Le);var ze=w.min(se,function(Xe){return(N-p-(Xe.length-1)*B)/w.sum(Xe,h)});se.forEach(function(Xe){Xe.forEach(function(Ve,rt){Ve.y1=(Ve.y0=rt)+Ve.value*ze})}),ie.links.forEach(function(Xe){Xe.width=Xe.value*ze})}function Y(_e){se.forEach(function(Le){Le.forEach(function(ze){if(ze.targetLinks.length){var Xe=(w.sum(ze.targetLinks,m)/w.sum(ze.targetLinks,h)-g(ze))*_e;ze.y0+=Xe,ze.y1+=Xe}})})}function ce(_e){se.slice().reverse().forEach(function(Le){Le.forEach(function(ze){if(ze.sourceLinks.length){var Xe=(w.sum(ze.sourceLinks,E)/w.sum(ze.sourceLinks,h)-g(ze))*_e;ze.y0+=Xe,ze.y1+=Xe}})})}function ue(){se.forEach(function(_e){var Le,ze,Xe=p,Ve=_e.length,rt;for(_e.sort(d),rt=0;rt<Ve;++rt)Le=_e[rt],ze=Xe-Le.y0,ze>0&&(Le.y0+=ze,Le.y1+=ze),Xe=Le.y1+B;if(ze=Xe-B-N,ze>0)for(Xe=Le.y0-=ze,Le.y1-=ze,rt=Ve-2;rt>=0;--rt)Le=_e[rt],ze=Le.y1+B-Xe,ze>0&&(Le.y0-=ze,Le.y1-=ze),Xe=Le.y0})}}function W(ie){ie.nodes.forEach(function(se){se.sourceLinks.sort(u),se.targetLinks.sort(o)}),ie.nodes.forEach(function(se){var ee=se.y0,pe=ee;se.sourceLinks.forEach(function(oe){oe.y0=ee+oe.width/2,ee+=oe.width}),se.targetLinks.forEach(function(oe){oe.y1=pe+oe.width/2,pe+=oe.width})})}return J};function b(f){return[f.source.x1,f.y0]}function A(f){return[f.target.x0,f.y1]}var y=function(){return P.linkHorizontal().source(b).target(A)};v.sankey=k,v.sankeyCenter=i,v.sankeyLeft=r,v.sankeyRight=a,v.sankeyJustify=l,v.sankeyLinkHorizontal=y,Object.defineProperty(v,"__esModule",{value:!0})})}}),sre=Ne({"node_modules/elementary-circuits-directed-graph/johnson.js"(te,Z){var v=_F();Z.exports=function(C,P){var t=[],r=[],a=[],l={},i=[],s;function o(M){a[M]=!1,l.hasOwnProperty(M)&&Object.keys(l[M]).forEach(function(k){delete l[M][k],a[k]&&o(k)})}function u(M){var k=!1;r.push(M),a[M]=!0;var b,A;for(b=0;b<i[M].length;b++)A=i[M][b],A===s?(d(s,r),k=!0):a[A]||(k=u(A));if(k)o(M);else for(b=0;b<i[M].length;b++){A=i[M][b];var y=l[A];y||(y={},l[A]=y),y[A]=!0}return r.pop(),k}function d(M,k){var b=[].concat(k).concat(M);P?P(u):t.push(b)}function h(M){for(var k=0;k<C.length;k++)k<M&&(C[k]=[]),C[k]=C[k].filter(function(b){return b>=M})}function g(M){h(M);for(var k=C,b=v(k),A=b.components.filter(function(B){return B.length>1}),y=1/0,f,p=0;p<A.length;p++)for(var x=0;x<A[p].length;x++)A[p][x]<y&&(y=A[p][x],f=p);var N=A[f];if(!N)return!1;var D=C.map(function(B,U){return N.indexOf(U)===-1?[]:B.filter(function(V){return N.indexOf(V)!==-1})});return{leastVertex:y,adjList:D}}s=0;for(var m=C.length;s<m;){var E=g(s);if(s=E.leastVertex,i=E.adjList,i){for(var c=0;c<i.length;c++)for(var _=0;_<i[c].length;_++){var T=i[c][_];a[+T]=!1,l[T]={}}u(s),s=s+1}else s=m}if(!P)return t}}}),lre=Ne({"node_modules/@plotly/d3-sankey-circular/dist/d3-sankey-circular.js"(te,Z){(function(v,w){typeof te=="object"&&typeof Z<"u"?w(te,ck(),WR(),xF(),sre()):w(v.d3=v.d3||{},v.d3,v.d3,v.d3,null)})(te,function(v,w,C,P,t){t=t&&t.hasOwnProperty("default")?t.default:t;function r(Ve){return Ve.target.depth}function a(Ve){return Ve.depth}function l(Ve,rt){return rt-1-Ve.height}function i(Ve,rt){return Ve.sourceLinks.length?Ve.depth:rt-1}function s(Ve){return Ve.targetLinks.length?Ve.depth:Ve.sourceLinks.length?w.min(Ve.sourceLinks,r)-1:0}function o(Ve){return function(){return Ve}}var u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Ve){return typeof Ve}:function(Ve){return Ve&&typeof Symbol=="function"&&Ve.constructor===Symbol&&Ve!==Symbol.prototype?"symbol":typeof Ve};function d(Ve,rt){return g(Ve.source,rt.source)||Ve.index-rt.index}function h(Ve,rt){return g(Ve.target,rt.target)||Ve.index-rt.index}function g(Ve,rt){return Ve.partOfCycle===rt.partOfCycle?Ve.y0-rt.y0:Ve.circularLinkType==="top"||rt.circularLinkType==="bottom"?-1:1}function m(Ve){return Ve.value}function E(Ve){return(Ve.y0+Ve.y1)/2}function c(Ve){return E(Ve.source)}function _(Ve){return E(Ve.target)}function T(Ve){return Ve.index}function M(Ve){return Ve.nodes}function k(Ve){return Ve.links}function b(Ve,rt){var mt=Ve.get(rt);if(!mt)throw new Error("missing: "+rt);return mt}function A(Ve,rt){return rt(Ve)}var y=25,f=10,p=.3;function x(){var Ve=0,rt=0,mt=1,_t=1,vt=24,ut,Fe=T,Pe=i,be=M,Ye=k,yt=32,wt=2,ht,Yt=null;function $t(){var Ot={nodes:be.apply(null,arguments),links:Ye.apply(null,arguments)};fr(Ot),N(Ot,Fe,Yt),mr(Ot),fn(Ot),D(Ot,Fe),Br(Ot,yt,Fe),Qr(Ot);for(var $e=4,ot=0;ot<$e;ot++)ce(Ot,_t,Fe),ue(Ot,_t,Fe),pe(Ot,rt,_t,Fe),ce(Ot,_t,Fe),ue(Ot,_t,Fe);return Xe(Ot,rt,_t),H(Ot,wt,_t,Fe),Ot}$t.nodeId=function(Ot){return arguments.length?(Fe=typeof Ot=="function"?Ot:o(Ot),$t):Fe},$t.nodeAlign=function(Ot){return arguments.length?(Pe=typeof Ot=="function"?Ot:o(Ot),$t):Pe},$t.nodeWidth=function(Ot){return arguments.length?(vt=+Ot,$t):vt},$t.nodePadding=function(Ot){return arguments.length?(ut=+Ot,$t):ut},$t.nodes=function(Ot){return arguments.length?(be=typeof Ot=="function"?Ot:o(Ot),$t):be},$t.links=function(Ot){return arguments.length?(Ye=typeof Ot=="function"?Ot:o(Ot),$t):Ye},$t.size=function(Ot){return arguments.length?(Ve=rt=0,mt=+Ot[0],_t=+Ot[1],$t):[mt-Ve,_t-rt]},$t.extent=function(Ot){return arguments.length?(Ve=+Ot[0][0],mt=+Ot[1][0],rt=+Ot[0][1],_t=+Ot[1][1],$t):[[Ve,rt],[mt,_t]]},$t.iterations=function(Ot){return arguments.length?(yt=+Ot,$t):yt},$t.circularLinkGap=function(Ot){return arguments.length?(wt=+Ot,$t):wt},$t.nodePaddingRatio=function(Ot){return arguments.length?(ht=+Ot,$t):ht},$t.sortNodes=function(Ot){return arguments.length?(Yt=Ot,$t):Yt},$t.update=function(Ot){return D(Ot,Fe),Qr(Ot),Ot.links.forEach(function($e){$e.circular&&($e.circularLinkType=$e.y0+$e.y1<_t?"top":"bottom",$e.source.circularLinkType=$e.circularLinkType,$e.target.circularLinkType=$e.circularLinkType)}),ce(Ot,_t,Fe,!1),ue(Ot,_t,Fe),H(Ot,wt,_t,Fe),Ot};function fr(Ot){Ot.nodes.forEach(function(ot,De){ot.index=De,ot.sourceLinks=[],ot.targetLinks=[]});var $e=C.map(Ot.nodes,Fe);return Ot.links.forEach(function(ot,De){ot.index=De;var Ee=ot.source,Ae=ot.target;(typeof Ee>"u"?"undefined":u(Ee))!=="object"&&(Ee=ot.source=b($e,Ee)),(typeof Ae>"u"?"undefined":u(Ae))!=="object"&&(Ae=ot.target=b($e,Ae)),Ee.sourceLinks.push(ot),Ae.targetLinks.push(ot)}),Ot}function mr(Ot){Ot.nodes.forEach(function($e){$e.partOfCycle=!1,$e.value=Math.max(w.sum($e.sourceLinks,m),w.sum($e.targetLinks,m)),$e.sourceLinks.forEach(function(ot){ot.circular&&($e.partOfCycle=!0,$e.circularLinkType=ot.circularLinkType)}),$e.targetLinks.forEach(function(ot){ot.circular&&($e.partOfCycle=!0,$e.circularLinkType=ot.circularLinkType)})})}function Ur(Ot){var $e=0,ot=0,De=0,Ee=0,Ae=w.max(Ot.nodes,function(Ie){return Ie.column});return Ot.links.forEach(function(Ie){Ie.circular&&(Ie.circularLinkType=="top"?$e=$e+Ie.width:ot=ot+Ie.width,Ie.target.column==0&&(Ee=Ee+Ie.width),Ie.source.column==Ae&&(De=De+Ie.width))}),$e=$e>0?$e+y+f:$e,ot=ot>0?ot+y+f:ot,De=De>0?De+y+f:De,Ee=Ee>0?Ee+y+f:Ee,{top:$e,bottom:ot,left:Ee,right:De}}function jr(Ot,$e){var ot=w.max(Ot.nodes,function(Bt){return Bt.column}),De=mt-Ve,Ee=_t-rt,Ae=De+$e.right+$e.left,Ie=Ee+$e.top+$e.bottom,tt=De/Ae,st=Ee/Ie;return Ve=Ve*tt+$e.left,mt=$e.right==0?mt:mt*tt,rt=rt*st+$e.top,_t=_t*st,Ot.nodes.forEach(function(Bt){Bt.x0=Ve+Bt.column*((mt-Ve-vt)/ot),Bt.x1=Bt.x0+vt}),st}function fn(Ot){var $e,ot,De;for($e=Ot.nodes,ot=[],De=0;$e.length;++De,$e=ot,ot=[])$e.forEach(function(Ee){Ee.depth=De,Ee.sourceLinks.forEach(function(Ae){ot.indexOf(Ae.target)<0&&!Ae.circular&&ot.push(Ae.target)})});for($e=Ot.nodes,ot=[],De=0;$e.length;++De,$e=ot,ot=[])$e.forEach(function(Ee){Ee.height=De,Ee.targetLinks.forEach(function(Ae){ot.indexOf(Ae.source)<0&&!Ae.circular&&ot.push(Ae.source)})});Ot.nodes.forEach(function(Ee){Ee.column=Math.floor(Pe.call(null,Ee,De))})}function Br(Ot,$e,ot){var De=C.nest().key(function(Bt){return Bt.column}).sortKeys(w.ascending).entries(Ot.nodes).map(function(Bt){return Bt.values});Ie(ot),st();for(var Ee=1,Ae=$e;Ae>0;--Ae)tt(Ee*=.99,ot),st();function Ie(Bt){if(ht){var Ft=1/0;De.forEach(function(Mr){var Sr=_t*ht/(Mr.length+1);Ft=Sr<Ft?Sr:Ft}),ut=Ft}var Wt=w.min(De,function(Mr){return(_t-rt-(Mr.length-1)*ut)/w.sum(Mr,m)});Wt=Wt*p,Ot.links.forEach(function(Mr){Mr.width=Mr.value*Wt});var lr=Ur(Ot),Rr=jr(Ot,lr);Wt=Wt*Rr,Ot.links.forEach(function(Mr){Mr.width=Mr.value*Wt}),De.forEach(function(Mr){var Sr=Mr.length;Mr.forEach(function(Kr,Hn){Kr.depth==De.length-1&&Sr==1||Kr.depth==0&&Sr==1?(Kr.y0=_t/2-Kr.value*Wt,Kr.y1=Kr.y0+Kr.value*Wt):Kr.partOfCycle?V(Kr,Bt)==0?(Kr.y0=_t/2+Hn,Kr.y1=Kr.y0+Kr.value*Wt):Kr.circularLinkType=="top"?(Kr.y0=rt+Hn,Kr.y1=Kr.y0+Kr.value*Wt):(Kr.y0=_t-Kr.value*Wt-Hn,Kr.y1=Kr.y0+Kr.value*Wt):lr.top==0||lr.bottom==0?(Kr.y0=(_t-rt)/Sr*Hn,Kr.y1=Kr.y0+Kr.value*Wt):(Kr.y0=(_t-rt)/2-Sr/2+Hn,Kr.y1=Kr.y0+Kr.value*Wt)})})}function tt(Bt,Ft){var Wt=De.length;De.forEach(function(lr){var Rr=lr.length,Mr=lr[0].depth;lr.forEach(function(Sr){var Kr;if((Sr.sourceLinks.length||Sr.targetLinks.length)&&!(Sr.partOfCycle&&V(Sr,Ft)>0))if(Mr==0&&Rr==1)Kr=Sr.y1-Sr.y0,Sr.y0=_t/2-Kr/2,Sr.y1=_t/2+Kr/2;else if(Mr==Wt-1&&Rr==1)Kr=Sr.y1-Sr.y0,Sr.y0=_t/2-Kr/2,Sr.y1=_t/2+Kr/2;else{var Hn=0,ga=w.mean(Sr.sourceLinks,_),ua=w.mean(Sr.targetLinks,c);ga&&ua?Hn=(ga+ua)/2:Hn=ga||ua;var Ta=(Hn-E(Sr))*Bt;Sr.y0+=Ta,Sr.y1+=Ta}})})}function st(){De.forEach(function(Bt){var Ft,Wt,lr=rt,Rr=Bt.length,Mr;for(Bt.sort(g),Mr=0;Mr<Rr;++Mr)Ft=Bt[Mr],Wt=lr-Ft.y0,Wt>0&&(Ft.y0+=Wt,Ft.y1+=Wt),lr=Ft.y1+ut;if(Wt=lr-ut-_t,Wt>0)for(lr=Ft.y0-=Wt,Ft.y1-=Wt,Mr=Rr-2;Mr>=0;--Mr)Ft=Bt[Mr],Wt=Ft.y1+ut-lr,Wt>0&&(Ft.y0-=Wt,Ft.y1-=Wt),lr=Ft.y0})}}function Qr(Ot){Ot.nodes.forEach(function($e){$e.sourceLinks.sort(h),$e.targetLinks.sort(d)}),Ot.nodes.forEach(function($e){var ot=$e.y0,De=ot,Ee=$e.y1,Ae=Ee;$e.sourceLinks.forEach(function(Ie){Ie.circular?(Ie.y0=Ee-Ie.width/2,Ee=Ee-Ie.width):(Ie.y0=ot+Ie.width/2,ot+=Ie.width)}),$e.targetLinks.forEach(function(Ie){Ie.circular?(Ie.y1=Ae-Ie.width/2,Ae=Ae-Ie.width):(Ie.y1=De+Ie.width/2,De+=Ie.width)})})}return $t}function N(Ve,rt,mt){var _t=0;if(mt===null){for(var vt=[],ut=0;ut<Ve.links.length;ut++){var Fe=Ve.links[ut],Pe=Fe.source.index,be=Fe.target.index;vt[Pe]||(vt[Pe]=[]),vt[be]||(vt[be]=[]),vt[Pe].indexOf(be)===-1&&vt[Pe].push(be)}var Ye=t(vt);Ye.sort(function(Yt,$t){return Yt.length-$t.length});var yt={};for(ut=0;ut<Ye.length;ut++){var wt=Ye[ut],ht=wt.slice(-2);yt[ht[0]]||(yt[ht[0]]={}),yt[ht[0]][ht[1]]=!0}Ve.links.forEach(function(Yt){var $t=Yt.target.index,fr=Yt.source.index;$t===fr||yt[fr]&&yt[fr][$t]?(Yt.circular=!0,Yt.circularLinkID=_t,_t=_t+1):Yt.circular=!1})}else Ve.links.forEach(function(Yt){Yt.source[mt]<Yt.target[mt]?Yt.circular=!1:(Yt.circular=!0,Yt.circularLinkID=_t,_t=_t+1)})}function D(Ve,rt){var mt=0,_t=0;Ve.links.forEach(function(vt){vt.circular&&(vt.source.circularLinkType||vt.target.circularLinkType?vt.circularLinkType=vt.source.circularLinkType?vt.source.circularLinkType:vt.target.circularLinkType:vt.circularLinkType=mt<_t?"top":"bottom",vt.circularLinkType=="top"?mt=mt+1:_t=_t+1,Ve.nodes.forEach(function(ut){(A(ut,rt)==A(vt.source,rt)||A(ut,rt)==A(vt.target,rt))&&(ut.circularLinkType=vt.circularLinkType)}))}),Ve.links.forEach(function(vt){vt.circular&&(vt.source.circularLinkType==vt.target.circularLinkType&&(vt.circularLinkType=vt.source.circularLinkType),ze(vt,rt)&&(vt.circularLinkType=vt.source.circularLinkType))})}function B(Ve){var rt=Math.abs(Ve.y1-Ve.y0),mt=Math.abs(Ve.target.x0-Ve.source.x1);return Math.atan(mt/rt)}function U(Ve,rt){return Ve.source.column<rt.target.column?!1:!(Ve.target.column>rt.source.column)}function V(Ve,rt){var mt=0;Ve.sourceLinks.forEach(function(vt){mt=vt.circular&&!ze(vt,rt)?mt+1:mt});var _t=0;return Ve.targetLinks.forEach(function(vt){_t=vt.circular&&!ze(vt,rt)?_t+1:_t}),mt+_t}function q(Ve){var rt=Ve.source.sourceLinks,mt=0;rt.forEach(function(ut){mt=ut.circular?mt+1:mt});var _t=Ve.target.targetLinks,vt=0;return _t.forEach(function(ut){vt=ut.circular?vt+1:vt}),!(mt>1||vt>1)}function z(Ve,rt,mt){return Ve.sort(J),Ve.forEach(function(_t,vt){var ut=0;if(ze(_t,mt)&&q(_t))_t.circularPathData.verticalBuffer=ut+_t.width/2;else{var Fe=0;for(Fe;Fe<vt;Fe++)if(U(Ve[vt],Ve[Fe])){var Pe=Ve[Fe].circularPathData.verticalBuffer+Ve[Fe].width/2+rt;ut=Pe>ut?Pe:ut}_t.circularPathData.verticalBuffer=ut+_t.width/2}}),Ve}function H(Ve,rt,mt,_t){var vt=5,ut=w.min(Ve.links,function(be){return be.source.y0});Ve.links.forEach(function(be){be.circular&&(be.circularPathData={})});var Fe=Ve.links.filter(function(be){return be.circularLinkType=="top"});z(Fe,rt,_t);var Pe=Ve.links.filter(function(be){return be.circularLinkType=="bottom"});z(Pe,rt,_t),Ve.links.forEach(function(be){if(be.circular){if(be.circularPathData.arcRadius=be.width+f,be.circularPathData.leftNodeBuffer=vt,be.circularPathData.rightNodeBuffer=vt,be.circularPathData.sourceWidth=be.source.x1-be.source.x0,be.circularPathData.sourceX=be.source.x0+be.circularPathData.sourceWidth,be.circularPathData.targetX=be.target.x0,be.circularPathData.sourceY=be.y0,be.circularPathData.targetY=be.y1,ze(be,_t)&&q(be))be.circularPathData.leftSmallArcRadius=f+be.width/2,be.circularPathData.leftLargeArcRadius=f+be.width/2,be.circularPathData.rightSmallArcRadius=f+be.width/2,be.circularPathData.rightLargeArcRadius=f+be.width/2,be.circularLinkType=="bottom"?(be.circularPathData.verticalFullExtent=be.source.y1+y+be.circularPathData.verticalBuffer,be.circularPathData.verticalLeftInnerExtent=be.circularPathData.verticalFullExtent-be.circularPathData.leftLargeArcRadius,be.circularPathData.verticalRightInnerExtent=be.circularPathData.verticalFullExtent-be.circularPathData.rightLargeArcRadius):(be.circularPathData.verticalFullExtent=be.source.y0-y-be.circularPathData.verticalBuffer,be.circularPathData.verticalLeftInnerExtent=be.circularPathData.verticalFullExtent+be.circularPathData.leftLargeArcRadius,be.circularPathData.verticalRightInnerExtent=be.circularPathData.verticalFullExtent+be.circularPathData.rightLargeArcRadius);else{var Ye=be.source.column,yt=be.circularLinkType,wt=Ve.links.filter(function($t){return $t.source.column==Ye&&$t.circularLinkType==yt});be.circularLinkType=="bottom"?wt.sort(ge):wt.sort(le);var ht=0;wt.forEach(function($t,fr){$t.circularLinkID==be.circularLinkID&&(be.circularPathData.leftSmallArcRadius=f+be.width/2+ht,be.circularPathData.leftLargeArcRadius=f+be.width/2+fr*rt+ht),ht=ht+$t.width}),Ye=be.target.column,wt=Ve.links.filter(function($t){return $t.target.column==Ye&&$t.circularLinkType==yt}),be.circularLinkType=="bottom"?wt.sort(me):wt.sort(de),ht=0,wt.forEach(function($t,fr){$t.circularLinkID==be.circularLinkID&&(be.circularPathData.rightSmallArcRadius=f+be.width/2+ht,be.circularPathData.rightLargeArcRadius=f+be.width/2+fr*rt+ht),ht=ht+$t.width}),be.circularLinkType=="bottom"?(be.circularPathData.verticalFullExtent=Math.max(mt,be.source.y1,be.target.y1)+y+be.circularPathData.verticalBuffer,be.circularPathData.verticalLeftInnerExtent=be.circularPathData.verticalFullExtent-be.circularPathData.leftLargeArcRadius,be.circularPathData.verticalRightInnerExtent=be.circularPathData.verticalFullExtent-be.circularPathData.rightLargeArcRadius):(be.circularPathData.verticalFullExtent=ut-y-be.circularPathData.verticalBuffer,be.circularPathData.verticalLeftInnerExtent=be.circularPathData.verticalFullExtent+be.circularPathData.leftLargeArcRadius,be.circularPathData.verticalRightInnerExtent=be.circularPathData.verticalFullExtent+be.circularPathData.rightLargeArcRadius)}be.circularPathData.leftInnerExtent=be.circularPathData.sourceX+be.circularPathData.leftNodeBuffer,be.circularPathData.rightInnerExtent=be.circularPathData.targetX-be.circularPathData.rightNodeBuffer,be.circularPathData.leftFullExtent=be.circularPathData.sourceX+be.circularPathData.leftLargeArcRadius+be.circularPathData.leftNodeBuffer,be.circularPathData.rightFullExtent=be.circularPathData.targetX-be.circularPathData.rightLargeArcRadius-be.circularPathData.rightNodeBuffer}if(be.circular)be.path=G(be);else{var Yt=P.linkHorizontal().source(function($t){var fr=$t.source.x0+($t.source.x1-$t.source.x0),mr=$t.y0;return[fr,mr]}).target(function($t){var fr=$t.target.x0,mr=$t.y1;return[fr,mr]});be.path=Yt(be)}})}function G(Ve){var rt="";return Ve.circularLinkType=="top"?rt="M"+Ve.circularPathData.sourceX+" "+Ve.circularPathData.sourceY+" L"+Ve.circularPathData.leftInnerExtent+" "+Ve.circularPathData.sourceY+" A"+Ve.circularPathData.leftLargeArcRadius+" "+Ve.circularPathData.leftSmallArcRadius+" 0 0 0 "+Ve.circularPathData.leftFullExtent+" "+(Ve.circularPathData.sourceY-Ve.circularPathData.leftSmallArcRadius)+" L"+Ve.circularPathData.leftFullExtent+" "+Ve.circularPathData.verticalLeftInnerExtent+" A"+Ve.circularPathData.leftLargeArcRadius+" "+Ve.circularPathData.leftLargeArcRadius+" 0 0 0 "+Ve.circularPathData.leftInnerExtent+" "+Ve.circularPathData.verticalFullExtent+" L"+Ve.circularPathData.rightInnerExtent+" "+Ve.circularPathData.verticalFullExtent+" A"+Ve.circularPathData.rightLargeArcRadius+" "+Ve.circularPathData.rightLargeArcRadius+" 0 0 0 "+Ve.circularPathData.rightFullExtent+" "+Ve.circularPathData.verticalRightInnerExtent+" L"+Ve.circularPathData.rightFullExtent+" "+(Ve.circularPathData.targetY-Ve.circularPathData.rightSmallArcRadius)+" A"+Ve.circularPathData.rightLargeArcRadius+" "+Ve.circularPathData.rightSmallArcRadius+" 0 0 0 "+Ve.circularPathData.rightInnerExtent+" "+Ve.circularPathData.targetY+" L"+Ve.circularPathData.targetX+" "+Ve.circularPathData.targetY:rt="M"+Ve.circularPathData.sourceX+" "+Ve.circularPathData.sourceY+" L"+Ve.circularPathData.leftInnerExtent+" "+Ve.circularPathData.sourceY+" A"+Ve.circularPathData.leftLargeArcRadius+" "+Ve.circularPathData.leftSmallArcRadius+" 0 0 1 "+Ve.circularPathData.leftFullExtent+" "+(Ve.circularPathData.sourceY+Ve.circularPathData.leftSmallArcRadius)+" L"+Ve.circularPathData.leftFullExtent+" "+Ve.circularPathData.verticalLeftInnerExtent+" A"+Ve.circularPathData.leftLargeArcRadius+" "+Ve.circularPathData.leftLargeArcRadius+" 0 0 1 "+Ve.circularPathData.leftInnerExtent+" "+Ve.circularPathData.verticalFullExtent+" L"+Ve.circularPathData.rightInnerExtent+" "+Ve.circularPathData.verticalFullExtent+" A"+Ve.circularPathData.rightLargeArcRadius+" "+Ve.circularPathData.rightLargeArcRadius+" 0 0 1 "+Ve.circularPathData.rightFullExtent+" "+Ve.circularPathData.verticalRightInnerExtent+" L"+Ve.circularPathData.rightFullExtent+" "+(Ve.circularPathData.targetY+Ve.circularPathData.rightSmallArcRadius)+" A"+Ve.circularPathData.rightLargeArcRadius+" "+Ve.circularPathData.rightSmallArcRadius+" 0 0 1 "+Ve.circularPathData.rightInnerExtent+" "+Ve.circularPathData.targetY+" L"+Ve.circularPathData.targetX+" "+Ve.circularPathData.targetY,rt}function J(Ve,rt){return W(Ve)==W(rt)?Ve.circularLinkType=="bottom"?ge(Ve,rt):le(Ve,rt):W(rt)-W(Ve)}function le(Ve,rt){return Ve.y0-rt.y0}function ge(Ve,rt){return rt.y0-Ve.y0}function de(Ve,rt){return Ve.y1-rt.y1}function me(Ve,rt){return rt.y1-Ve.y1}function W(Ve){return Ve.target.column-Ve.source.column}function ie(Ve){return Ve.target.x0-Ve.source.x1}function se(Ve,rt){var mt=B(Ve),_t=ie(rt)/Math.tan(mt),vt=Le(Ve)=="up"?Ve.y1+_t:Ve.y1-_t;return vt}function ee(Ve,rt){var mt=B(Ve),_t=ie(rt)/Math.tan(mt),vt=Le(Ve)=="up"?Ve.y1-_t:Ve.y1+_t;return vt}function pe(Ve,rt,mt,_t){Ve.links.forEach(function(vt){if(!vt.circular&&vt.target.column-vt.source.column>1){var ut=vt.source.column+1,Fe=vt.target.column-1,Pe=1,be=Fe-ut+1;for(Pe=1;ut<=Fe;ut++,Pe++)Ve.nodes.forEach(function(Ye){if(Ye.column==ut){var yt=Pe/(be+1),wt=Math.pow(1-yt,3),ht=3*yt*Math.pow(1-yt,2),Yt=3*Math.pow(yt,2)*(1-yt),$t=Math.pow(yt,3),fr=wt*vt.y0+ht*vt.y0+Yt*vt.y1+$t*vt.y1,mr=fr-vt.width/2,Ur=fr+vt.width/2,jr;mr>Ye.y0&&mr<Ye.y1?(jr=Ye.y1-mr+10,jr=Ye.circularLinkType=="bottom"?jr:-jr,Ye=Y(Ye,jr,rt,mt),Ve.nodes.forEach(function(fn){A(fn,_t)==A(Ye,_t)||fn.column!=Ye.column||oe(Ye,fn)&&Y(fn,jr,rt,mt)})):Ur>Ye.y0&&Ur<Ye.y1?(jr=Ur-Ye.y0+10,Ye=Y(Ye,jr,rt,mt),Ve.nodes.forEach(function(fn){A(fn,_t)==A(Ye,_t)||fn.column!=Ye.column||fn.y0<Ye.y1&&fn.y1>Ye.y1&&Y(fn,jr,rt,mt)})):mr<Ye.y0&&Ur>Ye.y1&&(jr=Ur-Ye.y0+10,Ye=Y(Ye,jr,rt,mt),Ve.nodes.forEach(function(fn){A(fn,_t)==A(Ye,_t)||fn.column!=Ye.column||fn.y0<Ye.y1&&fn.y1>Ye.y1&&Y(fn,jr,rt,mt)}))}})}})}function oe(Ve,rt){return Ve.y0>rt.y0&&Ve.y0<rt.y1||Ve.y1>rt.y0&&Ve.y1<rt.y1?!0:Ve.y0<rt.y0&&Ve.y1>rt.y1}function Y(Ve,rt,mt,_t){return Ve.y0+rt>=mt&&Ve.y1+rt<=_t&&(Ve.y0=Ve.y0+rt,Ve.y1=Ve.y1+rt,Ve.targetLinks.forEach(function(vt){vt.y1=vt.y1+rt}),Ve.sourceLinks.forEach(function(vt){vt.y0=vt.y0+rt})),Ve}function ce(Ve,rt,mt,_t){Ve.nodes.forEach(function(vt){_t&&vt.y+(vt.y1-vt.y0)>rt&&(vt.y=vt.y-(vt.y+(vt.y1-vt.y0)-rt));var ut=Ve.links.filter(function(be){return A(be.source,mt)==A(vt,mt)}),Fe=ut.length;Fe>1&&ut.sort(function(be,Ye){if(!be.circular&&!Ye.circular){if(be.target.column==Ye.target.column)return be.y1-Ye.y1;if(_e(be,Ye)){if(be.target.column>Ye.target.column){var yt=ee(Ye,be);return be.y1-yt}if(Ye.target.column>be.target.column){var wt=ee(be,Ye);return wt-Ye.y1}}else return be.y1-Ye.y1}if(be.circular&&!Ye.circular)return be.circularLinkType=="top"?-1:1;if(Ye.circular&&!be.circular)return Ye.circularLinkType=="top"?1:-1;if(be.circular&&Ye.circular)return be.circularLinkType===Ye.circularLinkType&&be.circularLinkType=="top"?be.target.column===Ye.target.column?be.target.y1-Ye.target.y1:Ye.target.column-be.target.column:be.circularLinkType===Ye.circularLinkType&&be.circularLinkType=="bottom"?be.target.column===Ye.target.column?Ye.target.y1-be.target.y1:be.target.column-Ye.target.column:be.circularLinkType=="top"?-1:1});var Pe=vt.y0;ut.forEach(function(be){be.y0=Pe+be.width/2,Pe=Pe+be.width}),ut.forEach(function(be,Ye){if(be.circularLinkType=="bottom"){var yt=Ye+1,wt=0;for(yt;yt<Fe;yt++)wt=wt+ut[yt].width;be.y0=vt.y1-wt-be.width/2}})})}function ue(Ve,rt,mt){Ve.nodes.forEach(function(_t){var vt=Ve.links.filter(function(Pe){return A(Pe.target,mt)==A(_t,mt)}),ut=vt.length;ut>1&&vt.sort(function(Pe,be){if(!Pe.circular&&!be.circular){if(Pe.source.column==be.source.column)return Pe.y0-be.y0;if(_e(Pe,be)){if(be.source.column<Pe.source.column){var Ye=se(be,Pe);return Pe.y0-Ye}if(Pe.source.column<be.source.column){var yt=se(Pe,be);return yt-be.y0}}else return Pe.y0-be.y0}if(Pe.circular&&!be.circular)return Pe.circularLinkType=="top"?-1:1;if(be.circular&&!Pe.circular)return be.circularLinkType=="top"?1:-1;if(Pe.circular&&be.circular)return Pe.circularLinkType===be.circularLinkType&&Pe.circularLinkType=="top"?Pe.source.column===be.source.column?Pe.source.y1-be.source.y1:Pe.source.column-be.source.column:Pe.circularLinkType===be.circularLinkType&&Pe.circularLinkType=="bottom"?Pe.source.column===be.source.column?Pe.source.y1-be.source.y1:be.source.column-Pe.source.column:Pe.circularLinkType=="top"?-1:1});var Fe=_t.y0;vt.forEach(function(Pe){Pe.y1=Fe+Pe.width/2,Fe=Fe+Pe.width}),vt.forEach(function(Pe,be){if(Pe.circularLinkType=="bottom"){var Ye=be+1,yt=0;for(Ye;Ye<ut;Ye++)yt=yt+vt[Ye].width;Pe.y1=_t.y1-yt-Pe.width/2}})})}function _e(Ve,rt){return Le(Ve)==Le(rt)}function Le(Ve){return Ve.y0-Ve.y1>0?"up":"down"}function ze(Ve,rt){return A(Ve.source,rt)==A(Ve.target,rt)}function Xe(Ve,rt,mt){var _t=Ve.nodes,vt=Ve.links,ut=!1,Fe=!1;if(vt.forEach(function(ht){ht.circularLinkType=="top"?ut=!0:ht.circularLinkType=="bottom"&&(Fe=!0)}),ut==!1||Fe==!1){var Pe=w.min(_t,function(ht){return ht.y0}),be=w.max(_t,function(ht){return ht.y1}),Ye=be-Pe,yt=mt-rt,wt=yt/Ye;_t.forEach(function(ht){var Yt=(ht.y1-ht.y0)*wt;ht.y0=(ht.y0-Pe)*wt,ht.y1=ht.y0+Yt}),vt.forEach(function(ht){ht.y0=(ht.y0-Pe)*wt,ht.y1=(ht.y1-Pe)*wt,ht.width=ht.width*wt})}}v.sankeyCircular=x,v.sankeyCenter=s,v.sankeyLeft=a,v.sankeyRight=l,v.sankeyJustify=i,Object.defineProperty(v,"__esModule",{value:!0})})}}),bF=Ne({"src/traces/sankey/constants.js"(te,Z){Z.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"}}}}),ure=Ne({"src/traces/sankey/render.js"(te,Z){var v=are(),w=(Ao(),Or(Hi)).interpolateNumber,C=xn(),P=ore(),t=lre(),r=bF(),a=to(),l=Ha(),i=zs(),s=In(),o=s.strTranslate,u=s.strRotate,d=a1(),h=d.keyFun,g=d.repeat,m=d.unwrap,E=hc(),c=Yo(),_=Ad(),T=_.CAP_SHIFT,M=_.LINE_SPACING,k=3;function b(se,ee,pe){var oe=m(ee),Y=oe.trace,ce=Y.domain,ue=Y.orientation==="h",_e=Y.node.pad,Le=Y.node.thickness,ze={justify:P.sankeyJustify,left:P.sankeyLeft,right:P.sankeyRight,center:P.sankeyCenter}[Y.node.align],Xe=se.width*(ce.x[1]-ce.x[0]),Ve=se.height*(ce.y[1]-ce.y[0]),rt=oe._nodes,mt=oe._links,_t=oe.circular,vt;_t?vt=t.sankeyCircular().circularLinkGap(0):vt=P.sankey(),vt.iterations(r.sankeyIterations).size(ue?[Xe,Ve]:[Ve,Xe]).nodeWidth(Le).nodePadding(_e).nodeId(function(fn){return fn.pointNumber}).nodeAlign(ze).nodes(rt).links(mt);var ut=vt();vt.nodePadding()<_e&&s.warn("node.pad was reduced to ",vt.nodePadding()," to fit within the figure.");var Fe,Pe,be;for(var Ye in oe._groupLookup){var yt=parseInt(oe._groupLookup[Ye]),wt;for(Fe=0;Fe<ut.nodes.length;Fe++)if(ut.nodes[Fe].pointNumber===yt){wt=ut.nodes[Fe];break}if(wt){var ht={pointNumber:parseInt(Ye),x0:wt.x0,x1:wt.x1,y0:wt.y0,y1:wt.y1,partOfGroup:!0,sourceLinks:[],targetLinks:[]};ut.nodes.unshift(ht),wt.childrenNodes.unshift(ht)}}function Yt(){for(Fe=0;Fe<ut.nodes.length;Fe++){var fn=ut.nodes[Fe],Br={},Qr,Ot;for(Pe=0;Pe<fn.targetLinks.length;Pe++)Ot=fn.targetLinks[Pe],Qr=Ot.source.pointNumber+":"+Ot.target.pointNumber,Br.hasOwnProperty(Qr)||(Br[Qr]=[]),Br[Qr].push(Ot);var $e=Object.keys(Br);for(Pe=0;Pe<$e.length;Pe++){Qr=$e[Pe];var ot=Br[Qr],De=0,Ee={};for(be=0;be<ot.length;be++)Ot=ot[be],Ee[Ot.label]||(Ee[Ot.label]=0),Ee[Ot.label]+=Ot.value,De+=Ot.value;for(be=0;be<ot.length;be++)Ot=ot[be],Ot.flow={value:De,labelConcentration:Ee[Ot.label]/De,concentration:Ot.value/De,links:ot},Ot.concentrationscale&&(Ot.color=a(Ot.concentrationscale(Ot.flow.labelConcentration)))}var Ae=0;for(Pe=0;Pe<fn.sourceLinks.length;Pe++)Ae+=fn.sourceLinks[Pe].value;for(Pe=0;Pe<fn.sourceLinks.length;Pe++)Ot=fn.sourceLinks[Pe],Ot.concentrationOut=Ot.value/Ae;var Ie=0;for(Pe=0;Pe<fn.targetLinks.length;Pe++)Ie+=fn.targetLinks[Pe].value;for(Pe=0;Pe<fn.targetLinks.length;Pe++)Ot=fn.targetLinks[Pe],Ot.concenrationIn=Ot.value/Ie}}Yt();function $t(fn){fn.forEach(function(Br){var Qr,Ot,$e=0,ot=Br.length,De;for(Br.sort(function(Ee,Ae){return Ee.y0-Ae.y0}),De=0;De<ot;++De)Qr=Br[De],Qr.y0>=$e||(Ot=$e-Qr.y0,Ot>1e-6&&(Qr.y0+=Ot,Qr.y1+=Ot)),$e=Qr.y1+_e})}function fr(fn){var Br=fn.map(function(Ae,Ie){return{x0:Ae.x0,index:Ie}}).sort(function(Ae,Ie){return Ae.x0-Ie.x0}),Qr=[],Ot=-1,$e,ot=-1/0,De;for(Fe=0;Fe<Br.length;Fe++){var Ee=fn[Br[Fe].index];Ee.x0>ot+Le&&(Ot+=1,$e=Ee.x0),ot=Ee.x0,Qr[Ot]||(Qr[Ot]=[]),Qr[Ot].push(Ee),De=$e-Ee.x0,Ee.x0+=De,Ee.x1+=De}return Qr}if(Y.node.x.length&&Y.node.y.length){for(Fe=0;Fe<Math.min(Y.node.x.length,Y.node.y.length,ut.nodes.length);Fe++)if(Y.node.x[Fe]&&Y.node.y[Fe]){var mr=[Y.node.x[Fe]*Xe,Y.node.y[Fe]*Ve];ut.nodes[Fe].x0=mr[0]-Le/2,ut.nodes[Fe].x1=mr[0]+Le/2;var Ur=ut.nodes[Fe].y1-ut.nodes[Fe].y0;ut.nodes[Fe].y0=mr[1]-Ur/2,ut.nodes[Fe].y1=mr[1]+Ur/2}if(Y.arrangement==="snap"){rt=ut.nodes;var jr=fr(rt);$t(jr)}vt.update(ut)}return{circular:_t,key:pe,trace:Y,guid:s.randstr(),horizontal:ue,width:Xe,height:Ve,nodePad:Y.node.pad,nodeLineColor:Y.node.line.color,nodeLineWidth:Y.node.line.width,linkLineColor:Y.link.line.color,linkLineWidth:Y.link.line.width,linkArrowLength:Y.link.arrowlen,valueFormat:Y.valueformat,valueSuffix:Y.valuesuffix,textFont:Y.textfont,translateX:ce.x[0]*se.width+se.margin.l,translateY:se.height-ce.y[1]*se.height+se.margin.t,dragParallel:ue?Ve:Xe,dragPerpendicular:ue?Xe:Ve,arrangement:Y.arrangement,sankey:vt,graph:ut,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}function A(se,ee,pe){var oe=a(ee.color),Y=a(ee.hovercolor),ce=ee.source.label+"|"+ee.target.label,ue=ce+"__"+pe;return ee.trace=se.trace,ee.curveNumber=se.trace.index,{circular:se.circular,key:ue,traceId:se.key,pointNumber:ee.pointNumber,link:ee,tinyColorHue:l.tinyRGB(oe),tinyColorAlpha:oe.getAlpha(),tinyColorHoverHue:l.tinyRGB(Y),tinyColorHoverAlpha:Y.getAlpha(),linkPath:f,linkLineColor:se.linkLineColor,linkLineWidth:se.linkLineWidth,linkArrowLength:se.linkArrowLength,valueFormat:se.valueFormat,valueSuffix:se.valueSuffix,sankey:se.sankey,parent:se,interactionState:se.interactionState,flow:ee.flow}}function y(se,ee){var pe="",oe=se.width/2,Y=se.circularPathData,ce=Y.sourceX+Y.verticalBuffer<Y.targetX,ue=Y.rightFullExtent-Y.rightLargeArcRadius-ee<=Y.leftFullExtent-oe;return Math.abs(Y.rightFullExtent-Y.leftFullExtent-oe)<oe,se.circularLinkType==="top"?(pe="M "+(Y.targetX-ee)+" "+(Y.targetY+oe)+" L "+(Y.rightInnerExtent-ee)+" "+(Y.targetY+oe)+"A "+(Y.rightLargeArcRadius+oe)+" "+(Y.rightSmallArcRadius+oe)+" 0 0 1 "+(Y.rightFullExtent-oe-ee)+" "+(Y.targetY-Y.rightSmallArcRadius)+"L "+(Y.rightFullExtent-oe-ee)+" "+Y.verticalRightInnerExtent,ce&&ue?pe+=" A "+(Y.rightLargeArcRadius+oe)+" "+(Y.rightLargeArcRadius+oe)+" 0 0 1 "+(Y.rightFullExtent+oe-ee-(Y.rightLargeArcRadius-oe))+" "+(Y.verticalRightInnerExtent-(Y.rightLargeArcRadius+oe))+" L "+(Y.rightFullExtent+oe-(Y.rightLargeArcRadius-oe)-ee)+" "+(Y.verticalRightInnerExtent-(Y.rightLargeArcRadius+oe))+" A "+(Y.leftLargeArcRadius+oe)+" "+(Y.leftLargeArcRadius+oe)+" 0 0 1 "+(Y.leftFullExtent+oe)+" "+Y.verticalRightInnerExtent:ce?pe+=" A "+(Y.rightLargeArcRadius-oe)+" "+(Y.rightLargeArcRadius-oe)+" 0 0 0 "+(Y.rightFullExtent-oe-ee-(Y.rightLargeArcRadius-oe))+" "+(Y.verticalRightInnerExtent-(Y.rightLargeArcRadius-oe))+" L "+(Y.leftFullExtent+oe+(Y.rightLargeArcRadius-oe))+" "+(Y.verticalRightInnerExtent-(Y.rightLargeArcRadius-oe))+" A "+(Y.leftLargeArcRadius-oe)+" "+(Y.leftLargeArcRadius-oe)+" 0 0 0 "+(Y.leftFullExtent+oe)+" "+Y.verticalLeftInnerExtent:pe+=" A "+(Y.rightLargeArcRadius+oe)+" "+(Y.rightLargeArcRadius+oe)+" 0 0 1 "+(Y.rightInnerExtent-ee)+" "+(Y.verticalFullExtent-oe)+" L "+Y.leftInnerExtent+" "+(Y.verticalFullExtent-oe)+" A "+(Y.leftLargeArcRadius+oe)+" "+(Y.leftLargeArcRadius+oe)+" 0 0 1 "+(Y.leftFullExtent+oe)+" "+Y.verticalLeftInnerExtent,pe+=" L "+(Y.leftFullExtent+oe)+" "+(Y.sourceY-Y.leftSmallArcRadius)+" A "+(Y.leftLargeArcRadius+oe)+" "+(Y.leftSmallArcRadius+oe)+" 0 0 1 "+Y.leftInnerExtent+" "+(Y.sourceY+oe)+" L "+Y.sourceX+" "+(Y.sourceY+oe)+" L "+Y.sourceX+" "+(Y.sourceY-oe)+" L "+Y.leftInnerExtent+" "+(Y.sourceY-oe)+" A "+(Y.leftLargeArcRadius-oe)+" "+(Y.leftSmallArcRadius-oe)+" 0 0 0 "+(Y.leftFullExtent-oe)+" "+(Y.sourceY-Y.leftSmallArcRadius)+" L "+(Y.leftFullExtent-oe)+" "+Y.verticalLeftInnerExtent,ce&&ue?pe+=" A "+(Y.leftLargeArcRadius+oe)+" "+(Y.leftSmallArcRadius+oe)+" 0 0 0 "+(Y.leftFullExtent-oe)+" "+(Y.verticalFullExtent+oe)+"L"+(Y.rightFullExtent+oe-ee)+" "+(Y.verticalFullExtent+oe)+" A "+(Y.leftLargeArcRadius+oe)+" "+(Y.leftSmallArcRadius+oe)+" 0 0 0 "+(Y.rightFullExtent+oe-ee)+" "+Y.verticalRightInnerExtent:ce?pe+=" A "+(Y.leftLargeArcRadius+oe)+" "+(Y.leftSmallArcRadius+oe)+" 0 0 1 "+(Y.leftFullExtent+oe)+" "+(Y.verticalFullExtent-oe)+" L "+(Y.rightFullExtent-oe-ee)+" "+(Y.verticalFullExtent-oe)+" A "+(Y.leftLargeArcRadius+oe)+" "+(Y.leftSmallArcRadius+oe)+" 0 0 1 "+(Y.rightFullExtent+oe-ee)+" "+Y.verticalRightInnerExtent:pe+=" A "+(Y.leftLargeArcRadius-oe)+" "+(Y.leftLargeArcRadius-oe)+" 0 0 0 "+Y.leftInnerExtent+" "+(Y.verticalFullExtent+oe)+" L "+(Y.rightInnerExtent-ee)+" "+(Y.verticalFullExtent+oe)+" A "+(Y.rightLargeArcRadius-oe)+" "+(Y.rightLargeArcRadius-oe)+" 0 0 0 "+(Y.rightFullExtent+oe-ee)+" "+Y.verticalRightInnerExtent,pe+=" L "+(Y.rightFullExtent+oe-ee)+" "+(Y.targetY-Y.rightSmallArcRadius)+" A "+(Y.rightLargeArcRadius-oe)+" "+(Y.rightSmallArcRadius-oe)+" 0 0 0 "+(Y.rightInnerExtent-ee)+" "+(Y.targetY-oe)+" L "+(Y.targetX-ee)+" "+(Y.targetY-oe)+(ee>0?" L "+Y.targetX+" "+Y.targetY:"")+"Z"):(pe="M "+(Y.targetX-ee)+" "+(Y.targetY-oe)+"  L "+(Y.rightInnerExtent-ee)+" "+(Y.targetY-oe)+" A "+(Y.rightLargeArcRadius+oe)+" "+(Y.rightSmallArcRadius+oe)+" 0 0 0 "+(Y.rightFullExtent-oe-ee)+" "+(Y.targetY+Y.rightSmallArcRadius)+" L "+(Y.rightFullExtent-oe-ee)+" "+Y.verticalRightInnerExtent,ce&&ue?pe+=" A "+(Y.rightLargeArcRadius+oe)+" "+(Y.rightLargeArcRadius+oe)+" 0 0 0 "+(Y.rightInnerExtent-oe-ee)+" "+(Y.verticalFullExtent+oe)+" L "+(Y.rightFullExtent+oe-ee-(Y.rightLargeArcRadius-oe))+" "+(Y.verticalFullExtent+oe)+" A "+(Y.rightLargeArcRadius+oe)+" "+(Y.rightLargeArcRadius+oe)+" 0 0 0 "+(Y.leftFullExtent+oe)+" "+Y.verticalLeftInnerExtent:ce?pe+=" A "+(Y.rightLargeArcRadius-oe)+" "+(Y.rightSmallArcRadius-oe)+" 0 0 1 "+(Y.rightFullExtent-ee-oe-(Y.rightLargeArcRadius-oe))+" "+(Y.verticalFullExtent-oe)+" L "+(Y.leftFullExtent+oe+(Y.rightLargeArcRadius-oe))+" "+(Y.verticalFullExtent-oe)+" A "+(Y.rightLargeArcRadius-oe)+" "+(Y.rightSmallArcRadius-oe)+" 0 0 1 "+(Y.leftFullExtent+oe)+" "+Y.verticalLeftInnerExtent:pe+=" A "+(Y.rightLargeArcRadius+oe)+" "+(Y.rightLargeArcRadius+oe)+" 0 0 0 "+(Y.rightInnerExtent-ee)+" "+(Y.verticalFullExtent+oe)+" L "+Y.leftInnerExtent+" "+(Y.verticalFullExtent+oe)+" A "+(Y.leftLargeArcRadius+oe)+" "+(Y.leftLargeArcRadius+oe)+" 0 0 0 "+(Y.leftFullExtent+oe)+" "+Y.verticalLeftInnerExtent,pe+=" L "+(Y.leftFullExtent+oe)+" "+(Y.sourceY+Y.leftSmallArcRadius)+" A "+(Y.leftLargeArcRadius+oe)+" "+(Y.leftSmallArcRadius+oe)+" 0 0 0 "+Y.leftInnerExtent+" "+(Y.sourceY-oe)+" L "+Y.sourceX+" "+(Y.sourceY-oe)+" L "+Y.sourceX+" "+(Y.sourceY+oe)+" L "+Y.leftInnerExtent+" "+(Y.sourceY+oe)+" A "+(Y.leftLargeArcRadius-oe)+" "+(Y.leftSmallArcRadius-oe)+" 0 0 1 "+(Y.leftFullExtent-oe)+" "+(Y.sourceY+Y.leftSmallArcRadius)+" L "+(Y.leftFullExtent-oe)+" "+Y.verticalLeftInnerExtent,ce&&ue?pe+=" A "+(Y.rightLargeArcRadius-oe)+" "+(Y.rightSmallArcRadius-oe)+" 0 0 1 "+(Y.leftFullExtent-oe-(Y.rightLargeArcRadius-oe))+" "+(Y.verticalFullExtent-oe)+" L "+(Y.rightFullExtent+oe-ee+(Y.rightLargeArcRadius-oe))+" "+(Y.verticalFullExtent-oe)+" A "+(Y.rightLargeArcRadius-oe)+" "+(Y.rightSmallArcRadius-oe)+" 0 0 1 "+(Y.rightFullExtent+oe-ee)+" "+Y.verticalRightInnerExtent:ce?pe+=" A "+(Y.rightLargeArcRadius+oe)+" "+(Y.rightLargeArcRadius+oe)+" 0 0 0 "+(Y.leftFullExtent+oe)+" "+(Y.verticalFullExtent+oe)+" L "+(Y.rightFullExtent-ee-oe)+" "+(Y.verticalFullExtent+oe)+" A "+(Y.rightLargeArcRadius+oe)+" "+(Y.rightLargeArcRadius+oe)+" 0 0 0 "+(Y.rightFullExtent+oe-ee)+" "+Y.verticalRightInnerExtent:pe+=" A "+(Y.leftLargeArcRadius-oe)+" "+(Y.leftLargeArcRadius-oe)+" 0 0 1 "+Y.leftInnerExtent+" "+(Y.verticalFullExtent-oe)+" L "+(Y.rightInnerExtent-ee)+" "+(Y.verticalFullExtent-oe)+" A "+(Y.rightLargeArcRadius-oe)+" "+(Y.rightLargeArcRadius-oe)+" 0 0 1 "+(Y.rightFullExtent+oe-ee)+" "+Y.verticalRightInnerExtent,pe+=" L "+(Y.rightFullExtent+oe-ee)+" "+(Y.targetY+Y.rightSmallArcRadius)+" A "+(Y.rightLargeArcRadius-oe)+" "+(Y.rightSmallArcRadius-oe)+" 0 0 1 "+(Y.rightInnerExtent-ee)+" "+(Y.targetY+oe)+" L "+(Y.targetX-ee)+" "+(Y.targetY+oe)+(ee>0?" L "+Y.targetX+" "+Y.targetY:"")+"Z"),pe}function f(){var se=.5;function ee(pe){var oe=pe.linkArrowLength;if(pe.link.circular)return y(pe.link,oe);var Y=Math.abs((pe.link.target.x0-pe.link.source.x1)/2);oe>Y&&(oe=Y);var ce=pe.link.source.x1,ue=pe.link.target.x0-oe,_e=w(ce,ue),Le=_e(se),ze=_e(1-se),Xe=pe.link.y0-pe.link.width/2,Ve=pe.link.y0+pe.link.width/2,rt=pe.link.y1-pe.link.width/2,mt=pe.link.y1+pe.link.width/2,_t="M"+ce+","+Xe,vt="C"+Le+","+Xe+" "+ze+","+rt+" "+ue+","+rt,ut="C"+ze+","+mt+" "+Le+","+Ve+" "+ce+","+Ve,Fe=oe>0?"L"+(ue+oe)+","+(rt+pe.link.width/2):"";return Fe+="L"+ue+","+mt,_t+vt+Fe+ut+"Z"}return ee}function p(se,ee){var pe=a(ee.color),oe=r.nodePadAcross,Y=se.nodePad/2;ee.dx=ee.x1-ee.x0,ee.dy=ee.y1-ee.y0;var ce=ee.dx,ue=Math.max(.5,ee.dy),_e="node_"+ee.pointNumber;return ee.group&&(_e=s.randstr()),ee.trace=se.trace,ee.curveNumber=se.trace.index,{index:ee.pointNumber,key:_e,partOfGroup:ee.partOfGroup||!1,group:ee.group,traceId:se.key,trace:se.trace,node:ee,nodePad:se.nodePad,nodeLineColor:se.nodeLineColor,nodeLineWidth:se.nodeLineWidth,textFont:se.textFont,size:se.horizontal?se.height:se.width,visibleWidth:Math.ceil(ce),visibleHeight:ue,zoneX:-oe,zoneY:-Y,zoneWidth:ce+2*oe,zoneHeight:ue+2*Y,labelY:se.horizontal?ee.dy/2+1:ee.dx/2+1,left:ee.originalLayer===1,sizeAcross:se.width,forceLayouts:se.forceLayouts,horizontal:se.horizontal,darkBackground:pe.getBrightness()<=128,tinyColorHue:l.tinyRGB(pe),tinyColorAlpha:pe.getAlpha(),valueFormat:se.valueFormat,valueSuffix:se.valueSuffix,sankey:se.sankey,graph:se.graph,arrangement:se.arrangement,uniqueNodeLabelPathId:[se.guid,se.key,_e].join("_"),interactionState:se.interactionState,figure:se}}function x(se){se.attr("transform",function(ee){return o(ee.node.x0.toFixed(3),ee.node.y0.toFixed(3))})}function N(se){se.call(x)}function D(se,ee){se.call(N),ee.attr("d",f())}function B(se){se.attr("width",function(ee){return ee.node.x1-ee.node.x0}).attr("height",function(ee){return ee.visibleHeight})}function U(se){return se.link.width>1||se.linkLineWidth>0}function V(se){var ee=o(se.translateX,se.translateY);return ee+(se.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function q(se,ee,pe){se.on(".basic",null).on("mouseover.basic",function(oe){!oe.interactionState.dragInProgress&&!oe.partOfGroup&&(pe.hover(this,oe,ee),oe.interactionState.hovered=[this,oe])}).on("mousemove.basic",function(oe){!oe.interactionState.dragInProgress&&!oe.partOfGroup&&(pe.follow(this,oe),oe.interactionState.hovered=[this,oe])}).on("mouseout.basic",function(oe){!oe.interactionState.dragInProgress&&!oe.partOfGroup&&(pe.unhover(this,oe,ee),oe.interactionState.hovered=!1)}).on("click.basic",function(oe){oe.interactionState.hovered&&(pe.unhover(this,oe,ee),oe.interactionState.hovered=!1),!oe.interactionState.dragInProgress&&!oe.partOfGroup&&pe.select(this,oe,ee)})}function z(se,ee,pe,oe){var Y=C.behavior.drag().origin(function(ce){return{x:ce.node.x0+ce.visibleWidth/2,y:ce.node.y0+ce.visibleHeight/2}}).on("dragstart",function(ce){if(ce.arrangement!=="fixed"&&(s.ensureSingle(oe._fullLayout._infolayer,"g","dragcover",function(_e){oe._fullLayout._dragCover=_e}),s.raiseToTop(this),ce.interactionState.dragInProgress=ce.node,de(ce.node),ce.interactionState.hovered&&(pe.nodeEvents.unhover.apply(0,ce.interactionState.hovered),ce.interactionState.hovered=!1),ce.arrangement==="snap")){var ue=ce.traceId+"|"+ce.key;ce.forceLayouts[ue]?ce.forceLayouts[ue].alpha(1):H(se,ue,ce),G(se,ee,ce,ue,oe)}}).on("drag",function(ce){if(ce.arrangement!=="fixed"){var ue=C.event.x,_e=C.event.y;ce.arrangement==="snap"?(ce.node.x0=ue-ce.visibleWidth/2,ce.node.x1=ue+ce.visibleWidth/2,ce.node.y0=_e-ce.visibleHeight/2,ce.node.y1=_e+ce.visibleHeight/2):(ce.arrangement==="freeform"&&(ce.node.x0=ue-ce.visibleWidth/2,ce.node.x1=ue+ce.visibleWidth/2),_e=Math.max(0,Math.min(ce.size-ce.visibleHeight/2,_e)),ce.node.y0=_e-ce.visibleHeight/2,ce.node.y1=_e+ce.visibleHeight/2),de(ce.node),ce.arrangement!=="snap"&&(ce.sankey.update(ce.graph),D(se.filter(me(ce)),ee))}}).on("dragend",function(ce){if(ce.arrangement!=="fixed"){ce.interactionState.dragInProgress=!1;for(var ue=0;ue<ce.node.childrenNodes.length;ue++)ce.node.childrenNodes[ue].x=ce.node.x,ce.node.childrenNodes[ue].y=ce.node.y;ce.arrangement!=="snap"&&le(ce,oe)}});se.on(".drag",null).call(Y)}function H(se,ee,pe,oe){W(pe.graph.nodes);var Y=pe.graph.nodes.filter(function(ce){return ce.originalX===pe.node.originalX}).filter(function(ce){return!ce.partOfGroup});pe.forceLayouts[ee]=v.forceSimulation(Y).alphaDecay(0).force("collide",v.forceCollide().radius(function(ce){return ce.dy/2+pe.nodePad/2}).strength(1).iterations(r.forceIterations)).force("constrain",J(se,ee,Y,pe)).stop()}function G(se,ee,pe,oe,Y){window.requestAnimationFrame(function ce(){var ue;for(ue=0;ue<r.forceTicksPerFrame;ue++)pe.forceLayouts[oe].tick();var _e=pe.graph.nodes;if(ie(_e),pe.sankey.update(pe.graph),D(se.filter(me(pe)),ee),pe.forceLayouts[oe].alpha()>0)window.requestAnimationFrame(ce);else{var Le=pe.node.originalX;pe.node.x0=Le-pe.visibleWidth/2,pe.node.x1=Le+pe.visibleWidth/2,le(pe,Y)}})}function J(se,ee,pe,oe){return function(){for(var ce=0,ue=0;ue<pe.length;ue++){var _e=pe[ue];_e===oe.interactionState.dragInProgress?(_e.x=_e.lastDraggedX,_e.y=_e.lastDraggedY):(_e.vx=(_e.originalX-_e.x)/r.forceTicksPerFrame,_e.y=Math.min(oe.size-_e.dy/2,Math.max(_e.dy/2,_e.y))),ce=Math.max(ce,Math.abs(_e.vx),Math.abs(_e.vy))}!oe.interactionState.dragInProgress&&ce<.1&&oe.forceLayouts[ee].alpha()>0&&oe.forceLayouts[ee].alpha(0)}}function le(se,ee){for(var pe=[],oe=[],Y=0;Y<se.graph.nodes.length;Y++){var ce=(se.graph.nodes[Y].x0+se.graph.nodes[Y].x1)/2,ue=(se.graph.nodes[Y].y0+se.graph.nodes[Y].y1)/2;pe.push(ce/se.figure.width),oe.push(ue/se.figure.height)}c.call("_guiRestyle",ee,{"node.x":[pe],"node.y":[oe]},se.trace.index).then(function(){ee._fullLayout._dragCover&&ee._fullLayout._dragCover.remove()})}function ge(se){var ee=[],pe;for(pe=0;pe<se.length;pe++)se[pe].originalX=(se[pe].x0+se[pe].x1)/2,se[pe].originalY=(se[pe].y0+se[pe].y1)/2,ee.indexOf(se[pe].originalX)===-1&&ee.push(se[pe].originalX);for(ee.sort(function(oe,Y){return oe-Y}),pe=0;pe<se.length;pe++)se[pe].originalLayerIndex=ee.indexOf(se[pe].originalX),se[pe].originalLayer=se[pe].originalLayerIndex/(ee.length-1)}function de(se){se.lastDraggedX=se.x0+se.dx/2,se.lastDraggedY=se.y0+se.dy/2}function me(se){return function(ee){return ee.node.originalX===se.node.originalX}}function W(se){for(var ee=0;ee<se.length;ee++)se[ee].y=(se[ee].y0+se[ee].y1)/2,se[ee].x=(se[ee].x0+se[ee].x1)/2}function ie(se){for(var ee=0;ee<se.length;ee++)se[ee].y0=se[ee].y-se[ee].dy/2,se[ee].y1=se[ee].y0+se[ee].dy,se[ee].x0=se[ee].x-se[ee].dx/2,se[ee].x1=se[ee].x0+se[ee].dx}Z.exports=function(se,ee,pe,oe,Y){var ce=se._context.staticPlot,ue=!1;s.ensureSingle(se._fullLayout._infolayer,"g","first-render",function(){ue=!0});var _e=se._fullLayout._dragCover,Le=pe.filter(function(ut){return m(ut).trace.visible}).map(b.bind(null,oe)),ze=ee.selectAll("."+r.cn.sankey).data(Le,h);ze.exit().remove(),ze.enter().append("g").classed(r.cn.sankey,!0).style("box-sizing","content-box").style("position","absolute").style("left",0).style("shape-rendering","geometricPrecision").style("pointer-events",ce?"none":"auto").attr("transform",V),ze.each(function(ut,Fe){se._fullData[Fe]._sankey=ut;var Pe="bgsankey-"+ut.trace.uid+"-"+Fe;s.ensureSingle(se._fullLayout._draggers,"rect",Pe),se._fullData[Fe]._bgRect=C.select("."+Pe),se._fullData[Fe]._bgRect.style("pointer-events",ce?"none":"all").attr("width",ut.width).attr("height",ut.height).attr("x",ut.translateX).attr("y",ut.translateY).classed("bgsankey",!0).style({fill:"transparent","stroke-width":0})}),ze.transition().ease(r.ease).duration(r.duration).attr("transform",V);var Xe=ze.selectAll("."+r.cn.sankeyLinks).data(g,h);Xe.enter().append("g").classed(r.cn.sankeyLinks,!0).style("fill","none");var Ve=Xe.selectAll("."+r.cn.sankeyLink).data(function(ut){var Fe=ut.graph.links;return Fe.filter(function(Pe){return Pe.value}).map(A.bind(null,ut))},h);Ve.enter().append("path").classed(r.cn.sankeyLink,!0).call(q,ze,Y.linkEvents),Ve.style("stroke",function(ut){return U(ut)?l.tinyRGB(a(ut.linkLineColor)):ut.tinyColorHue}).style("stroke-opacity",function(ut){return U(ut)?l.opacity(ut.linkLineColor):ut.tinyColorAlpha}).style("fill",function(ut){return ut.tinyColorHue}).style("fill-opacity",function(ut){return ut.tinyColorAlpha}).style("stroke-width",function(ut){return U(ut)?ut.linkLineWidth:1}).attr("d",f()),Ve.style("opacity",function(){return se._context.staticPlot||ue||_e?1:0}).transition().ease(r.ease).duration(r.duration).style("opacity",1),Ve.exit().transition().ease(r.ease).duration(r.duration).style("opacity",0).remove();var rt=ze.selectAll("."+r.cn.sankeyNodeSet).data(g,h);rt.enter().append("g").classed(r.cn.sankeyNodeSet,!0),rt.style("cursor",function(ut){switch(ut.arrangement){case"fixed":return"default";case"perpendicular":return"ns-resize";default:return"move"}});var mt=rt.selectAll("."+r.cn.sankeyNode).data(function(ut){var Fe=ut.graph.nodes;return ge(Fe),Fe.map(p.bind(null,ut))},h);mt.enter().append("g").classed(r.cn.sankeyNode,!0).call(x).style("opacity",function(ut){return(se._context.staticPlot||ue)&&!ut.partOfGroup?1:0}),mt.call(q,ze,Y.nodeEvents).call(z,Ve,Y,se),mt.transition().ease(r.ease).duration(r.duration).call(x).style("opacity",function(ut){return ut.partOfGroup?0:1}),mt.exit().transition().ease(r.ease).duration(r.duration).style("opacity",0).remove();var _t=mt.selectAll("."+r.cn.nodeRect).data(g);_t.enter().append("rect").classed(r.cn.nodeRect,!0).call(B),_t.style("stroke-width",function(ut){return ut.nodeLineWidth}).style("stroke",function(ut){return l.tinyRGB(a(ut.nodeLineColor))}).style("stroke-opacity",function(ut){return l.opacity(ut.nodeLineColor)}).style("fill",function(ut){return ut.tinyColorHue}).style("fill-opacity",function(ut){return ut.tinyColorAlpha}),_t.transition().ease(r.ease).duration(r.duration).call(B);var vt=mt.selectAll("."+r.cn.nodeLabel).data(g);vt.enter().append("text").classed(r.cn.nodeLabel,!0).style("cursor","default"),vt.attr("data-notex",1).text(function(ut){return ut.node.label}).each(function(ut){var Fe=C.select(this);i.font(Fe,ut.textFont),E.convertToTspans(Fe,se)}).attr("text-anchor",function(ut){return ut.horizontal&&ut.left?"end":"start"}).attr("transform",function(ut){var Fe=C.select(this),Pe=E.lineCount(Fe),be=ut.textFont.size*((Pe-1)*M-T),Ye=ut.nodeLineWidth/2+k,yt=((ut.horizontal?ut.visibleHeight:ut.visibleWidth)-be)/2;ut.horizontal&&(ut.left?Ye=-Ye:Ye+=ut.visibleWidth);var wt=ut.horizontal?"":"scale(-1,1)"+u(90);return o(ut.horizontal?Ye:yt,ut.horizontal?yt:Ye)+wt}),vt.transition().ease(r.ease).duration(r.duration)}}}),wF=Ne({"src/traces/sankey/plot.js"(te,Z){var v=xn(),w=In(),C=w.numberFormat,P=ure(),t=oh(),r=Ha(),a=bF().cn,l=w._;function i(T){return T!==""}function s(T,M){return T.filter(function(k){return k.key===M.traceId})}function o(T,M){v.select(T).select("path").style("fill-opacity",M),v.select(T).select("rect").style("fill-opacity",M)}function u(T){v.select(T).select("text.name").style("fill","black")}function d(T){return function(M){return T.node.sourceLinks.indexOf(M.link)!==-1||T.node.targetLinks.indexOf(M.link)!==-1}}function h(T){return function(M){return M.node.sourceLinks.indexOf(T.link)!==-1||M.node.targetLinks.indexOf(T.link)!==-1}}function g(T,M,k){M&&k&&s(k,M).selectAll("."+a.sankeyLink).filter(d(M)).call(E.bind(0,M,k,!1))}function m(T,M,k){M&&k&&s(k,M).selectAll("."+a.sankeyLink).filter(d(M)).call(c.bind(0,M,k,!1))}function E(T,M,k,b){b.style("fill",function(A){if(!A.link.concentrationscale)return A.tinyColorHoverHue}).style("fill-opacity",function(A){if(!A.link.concentrationscale)return A.tinyColorHoverAlpha}),b.each(function(A){var y=A.link.label;y!==""&&s(M,T).selectAll("."+a.sankeyLink).filter(function(f){return f.link.label===y}).style("fill",function(f){if(!f.link.concentrationscale)return f.tinyColorHoverHue}).style("fill-opacity",function(f){if(!f.link.concentrationscale)return f.tinyColorHoverAlpha})}),k&&s(M,T).selectAll("."+a.sankeyNode).filter(h(T)).call(g)}function c(T,M,k,b){b.style("fill",function(A){return A.tinyColorHue}).style("fill-opacity",function(A){return A.tinyColorAlpha}),b.each(function(A){var y=A.link.label;y!==""&&s(M,T).selectAll("."+a.sankeyLink).filter(function(f){return f.link.label===y}).style("fill",function(f){return f.tinyColorHue}).style("fill-opacity",function(f){return f.tinyColorAlpha})}),k&&s(M,T).selectAll(a.sankeyNode).filter(h(T)).call(m)}function _(T,M){var k=T.hoverlabel||{},b=w.nestedProperty(k,M).get();return Array.isArray(b)?!1:b}Z.exports=function(M,k){for(var b=M._fullLayout,A=b._paper,y=b._size,f=0;f<M._fullData.length;f++)if(M._fullData[f].visible&&M._fullData[f].type===a.sankey&&!M._fullData[f]._viewInitial){var p=M._fullData[f].node;M._fullData[f]._viewInitial={node:{groups:p.groups.slice(),x:p.x.slice(),y:p.y.slice()}}}var x=function(de,me){var W=me.link;W.originalEvent=v.event,M._hoverdata=[W],t.click(M,{target:!0})},N=function(de,me,W){M._fullLayout.hovermode!==!1&&(v.select(de).call(E.bind(0,me,W,!0)),me.link.trace.link.hoverinfo!=="skip"&&(me.link.fullData=me.link.trace,M.emit("plotly_hover",{event:v.event,points:[me.link]})))},D=l(M,"source:")+" ",B=l(M,"target:")+" ",U=l(M,"concentration:")+" ",V=l(M,"incoming flow count:")+" ",q=l(M,"outgoing flow count:")+" ",z=function(de,me){if(M._fullLayout.hovermode===!1)return;var W=me.link.trace.link;if(W.hoverinfo==="none"||W.hoverinfo==="skip")return;var ie=[];function se(_e){var Le,ze;_e.circular?(Le=(_e.circularPathData.leftInnerExtent+_e.circularPathData.rightInnerExtent)/2,ze=_e.circularPathData.verticalFullExtent):(Le=(_e.source.x1+_e.target.x0)/2,ze=(_e.y0+_e.y1)/2);var Xe=[Le,ze];return _e.trace.orientation==="v"&&Xe.reverse(),Xe[0]+=me.parent.translateX,Xe[1]+=me.parent.translateY,Xe}for(var ee=0,pe=0;pe<me.flow.links.length;pe++){var oe=me.flow.links[pe];if(!(M._fullLayout.hovermode==="closest"&&me.link.pointNumber!==oe.pointNumber)){me.link.pointNumber===oe.pointNumber&&(ee=pe),oe.fullData=oe.trace,W=me.link.trace.link;var Y=se(oe),ce={valueLabel:C(me.valueFormat)(oe.value)+me.valueSuffix};ie.push({x:Y[0],y:Y[1],name:ce.valueLabel,text:[oe.label||"",D+oe.source.label,B+oe.target.label,oe.concentrationscale?U+C("%0.2f")(oe.flow.labelConcentration):""].filter(i).join("<br>"),color:_(W,"bgcolor")||r.addOpacity(oe.color,1),borderColor:_(W,"bordercolor"),fontFamily:_(W,"font.family"),fontSize:_(W,"font.size"),fontColor:_(W,"font.color"),fontWeight:_(W,"font.weight"),fontStyle:_(W,"font.style"),fontVariant:_(W,"font.variant"),fontTextcase:_(W,"font.textcase"),fontLineposition:_(W,"font.lineposition"),fontShadow:_(W,"font.shadow"),nameLength:_(W,"namelength"),textAlign:_(W,"align"),idealAlign:v.event.x<Y[0]?"right":"left",hovertemplate:W.hovertemplate,hovertemplateLabels:ce,eventData:[oe]})}}var ue=t.loneHover(ie,{container:b._hoverlayer.node(),outerContainer:b._paper.node(),gd:M,anchorIndex:ee});ue.each(function(){var _e=this;me.link.concentrationscale||o(_e,.65),u(_e)})},H=function(de,me,W){M._fullLayout.hovermode!==!1&&(v.select(de).call(c.bind(0,me,W,!0)),me.link.trace.link.hoverinfo!=="skip"&&(me.link.fullData=me.link.trace,M.emit("plotly_unhover",{event:v.event,points:[me.link]})),t.loneUnhover(b._hoverlayer.node()))},G=function(de,me,W){var ie=me.node;ie.originalEvent=v.event,M._hoverdata=[ie],v.select(de).call(m,me,W),t.click(M,{target:!0})},J=function(de,me,W){M._fullLayout.hovermode!==!1&&(v.select(de).call(g,me,W),me.node.trace.node.hoverinfo!=="skip"&&(me.node.fullData=me.node.trace,M.emit("plotly_hover",{event:v.event,points:[me.node]})))},le=function(de,me){if(M._fullLayout.hovermode!==!1){var W=me.node.trace.node;if(!(W.hoverinfo==="none"||W.hoverinfo==="skip")){var ie=v.select(de).select("."+a.nodeRect),se=M._fullLayout._paperdiv.node().getBoundingClientRect(),ee=ie.node().getBoundingClientRect(),pe=ee.left-2-se.left,oe=ee.right+2-se.left,Y=ee.top+ee.height/4-se.top,ce={valueLabel:C(me.valueFormat)(me.node.value)+me.valueSuffix};me.node.fullData=me.node.trace,M._fullLayout._calcInverseTransform(M);var ue=M._fullLayout._invScaleX,_e=M._fullLayout._invScaleY,Le=t.loneHover({x0:ue*pe,x1:ue*oe,y:_e*Y,name:C(me.valueFormat)(me.node.value)+me.valueSuffix,text:[me.node.label,V+me.node.targetLinks.length,q+me.node.sourceLinks.length].filter(i).join("<br>"),color:_(W,"bgcolor")||me.tinyColorHue,borderColor:_(W,"bordercolor"),fontFamily:_(W,"font.family"),fontSize:_(W,"font.size"),fontColor:_(W,"font.color"),fontWeight:_(W,"font.weight"),fontStyle:_(W,"font.style"),fontVariant:_(W,"font.variant"),fontTextcase:_(W,"font.textcase"),fontLineposition:_(W,"font.lineposition"),fontShadow:_(W,"font.shadow"),nameLength:_(W,"namelength"),textAlign:_(W,"align"),idealAlign:"left",hovertemplate:W.hovertemplate,hovertemplateLabels:ce,eventData:[me.node]},{container:b._hoverlayer.node(),outerContainer:b._paper.node(),gd:M});o(Le,.85),u(Le)}}},ge=function(de,me,W){M._fullLayout.hovermode!==!1&&(v.select(de).call(m,me,W),me.node.trace.node.hoverinfo!=="skip"&&(me.node.fullData=me.node.trace,M.emit("plotly_unhover",{event:v.event,points:[me.node]})),t.loneUnhover(b._hoverlayer.node()))};P(M,A,k,{width:y.w,height:y.h,margin:{t:y.t,r:y.r,b:y.b,l:y.l}},{linkEvents:{hover:N,follow:z,unhover:H,select:x},nodeEvents:{hover:J,follow:le,unhover:ge,select:G}})}}}),cre=Ne({"src/traces/sankey/base_plot.js"(te){var Z=ef().overrideAll,v=lv().getModuleCalcData,w=wF(),C=Mo(),P=km(),t=Uv(),r=dh().prepSelect,a=In(),l=Yo(),i="sankey";te.name=i,te.baseLayoutAttrOverrides=Z({hoverlabel:C.hoverlabel},"plot","nested"),te.plot=function(o){var u=v(o.calcdata,i)[0];w(o,u),te.updateFx(o)},te.clean=function(o,u,d,h){var g=h._has&&h._has(i),m=u._has&&u._has(i);g&&!m&&(h._paperdiv.selectAll(".sankey").remove(),h._paperdiv.selectAll(".bgsankey").remove())},te.updateFx=function(o){for(var u=0;u<o._fullData.length;u++)s(o,u)};function s(o,u){var d=o._fullData[u],h=o._fullLayout,g=h.dragmode,m=h.dragmode==="pan"?"move":"crosshair",E=d._bgRect;if(E&&!(g==="pan"||g==="zoom")){P(E,m);var c={_id:"x",c2p:a.identity,_offset:d._sankey.translateX,_length:d._sankey.width},_={_id:"y",c2p:a.identity,_offset:d._sankey.translateY,_length:d._sankey.height},T={gd:o,element:E.node(),plotinfo:{id:u,xaxis:c,yaxis:_,fillRangeItems:a.noop},subplot:u,xaxes:[c],yaxes:[_],doneFnCompleted:function(M){var k=o._fullData[u],b,A=k.node.groups.slice(),y=[];function f(D){for(var B=k._sankey.graph.nodes,U=0;U<B.length;U++)if(B[U].pointNumber===D)return B[U]}for(var p=0;p<M.length;p++){var x=f(M[p].pointNumber);if(x)if(x.group){for(var N=0;N<x.childrenNodes.length;N++)y.push(x.childrenNodes[N].pointNumber);A[x.pointNumber-k.node._count]=!1}else y.push(x.pointNumber)}b=A.filter(Boolean).concat([y]),l.call("_guiRestyle",o,{"node.groups":[b]},u)}};T.prepFn=function(M,k,b){r(M,k,b,T,g)},t.init(T)}}}}),fre=Ne({"src/traces/sankey/select.js"(te,Z){Z.exports=function(w,C){for(var P=w.cd,t=[],r=P[0].trace,a=r._sankey.graph.nodes,l=0;l<a.length;l++){var i=a[l];if(!i.partOfGroup){var s=[(i.x0+i.x1)/2,(i.y0+i.y1)/2];r.orientation==="v"&&s.reverse(),C&&C.contains(s,!1,l,w)&&t.push({pointNumber:i.pointNumber})}}return t}}}),hre=Ne({"src/traces/sankey/index.js"(te,Z){Z.exports={attributes:yF(),supplyDefaults:Qte(),calc:ere(),plot:wF(),moduleType:"trace",name:"sankey",basePlotModule:cre(),selectPoints:fre(),categories:["noOpacity"],meta:{}}}}),dre=Ne({"lib/sankey.js"(te,Z){Z.exports=hre()}}),vre=Ne({"src/traces/indicator/base_plot.js"(te){var Z=ff();te.name="indicator",te.plot=function(v,w,C,P){Z.plotBasePlot(te.name,v,w,C,P)},te.clean=function(v,w,C,P){Z.cleanBasePlot(te.name,v,w,C,P)}}}),TF=Ne({"src/traces/indicator/attributes.js"(te,Z){var v=fi().extendFlat,w=fi().extendDeep,C=ef().overrideAll,P=bo(),t=js(),r=Fc().attributes,a=Sd(),l=Cu().templatedArray,i=a_(),s=Ac().descriptionOnlyNumbers,o=P({editType:"plot",colorEditType:"plot"}),u={color:{valType:"color",editType:"plot"},line:{color:{valType:"color",dflt:t.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"},d={valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},h=l("step",w({},u,{range:d}));Z.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:r({name:"indicator",trace:!0,editType:"calc"}),title:{text:{valType:"string",editType:"plot"},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},font:v({},o,{}),editType:"plot"},number:{valueformat:{valType:"string",dflt:"",editType:"plot",description:s("value")},font:v({},o,{}),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:i.INCREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:i.INCREASING.COLOR,editType:"plot"},editType:"plot"},decreasing:{symbol:{valType:"string",dflt:i.DECREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:i.DECREASING.COLOR,editType:"plot"},editType:"plot"},font:v({},o,{}),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:w({},u,{color:{dflt:"green"}}),bgcolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:t.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:1,editType:"plot"},axis:C({range:d,visible:v({},a.visible,{dflt:!0}),tickmode:a.minor.tickmode,nticks:a.nticks,tick0:a.tick0,dtick:a.dtick,tickvals:a.tickvals,ticktext:a.ticktext,ticks:v({},a.ticks,{dflt:"outside"}),ticklen:a.ticklen,tickwidth:a.tickwidth,tickcolor:a.tickcolor,ticklabelstep:a.ticklabelstep,showticklabels:a.showticklabels,labelalias:a.labelalias,tickfont:P({}),tickangle:a.tickangle,tickformat:a.tickformat,tickformatstops:a.tickformatstops,tickprefix:a.tickprefix,showtickprefix:a.showtickprefix,ticksuffix:a.ticksuffix,showticksuffix:a.showticksuffix,separatethousands:a.separatethousands,exponentformat:a.exponentformat,minexponent:a.minexponent,showexponent:a.showexponent,editType:"plot"},"plot"),steps:h,threshold:{line:{color:v({},u.line.color,{}),width:v({},u.line.width,{dflt:1}),editType:"plot"},thickness:v({},u.thickness,{dflt:.85}),value:{valType:"number",editType:"calc",dflt:!1},editType:"plot"},editType:"plot"}}}}),AF=Ne({"src/traces/indicator/constants.js"(te,Z){Z.exports={defaultNumberFontSize:80,bulletNumberDomainSize:.25,bulletPadding:.025,innerRadius:.75,valueThickness:.5,titlePadding:5,horizontalPadding:10}}}),pre=Ne({"src/traces/indicator/defaults.js"(te,Z){var v=In(),w=TF(),C=Fc().defaults,P=Cu(),t=jd(),r=AF(),a=Ty(),l=j0(),i=Em(),s=dp();function o(d,h,g,m){function E(z,H){return v.coerce(d,h,w,z,H)}C(h,m,E),E("mode"),h._hasNumber=h.mode.indexOf("number")!==-1,h._hasDelta=h.mode.indexOf("delta")!==-1,h._hasGauge=h.mode.indexOf("gauge")!==-1;var c=E("value");h._range=[0,typeof c=="number"?1.5*c:1];var _=new Array(2),T;if(h._hasNumber){E("number.valueformat");var M=v.extendFlat({},m.font);M.size=void 0,v.coerceFont(E,"number.font",M),h.number.font.size===void 0&&(h.number.font.size=r.defaultNumberFontSize,_[0]=!0),E("number.prefix"),E("number.suffix"),T=h.number.font.size}var k;if(h._hasDelta){var b=v.extendFlat({},m.font);b.size=void 0,v.coerceFont(E,"delta.font",b),h.delta.font.size===void 0&&(h.delta.font.size=(h._hasNumber?.5:1)*(T||r.defaultNumberFontSize),_[1]=!0),E("delta.reference",h.value),E("delta.relative"),E("delta.valueformat",h.delta.relative?"2%":""),E("delta.increasing.symbol"),E("delta.increasing.color"),E("delta.decreasing.symbol"),E("delta.decreasing.color"),E("delta.position"),E("delta.prefix"),E("delta.suffix"),k=h.delta.font.size}h._scaleNumbers=(!h._hasNumber||_[0])&&(!h._hasDelta||_[1])||!1;var A=v.extendFlat({},m.font);A.size=.25*(T||k||r.defaultNumberFontSize),v.coerceFont(E,"title.font",A),E("title.text");var y,f,p,x;function N(z,H){return v.coerce(y,f,w.gauge,z,H)}function D(z,H){return v.coerce(p,x,w.gauge.axis,z,H)}if(h._hasGauge){y=d.gauge,y||(y={}),f=P.newContainer(h,"gauge"),N("shape");var B=h._isBullet=h.gauge.shape==="bullet";B||E("title.align","center");var U=h._isAngular=h.gauge.shape==="angular";U||E("align","center"),N("bgcolor",m.paper_bgcolor),N("borderwidth"),N("bordercolor"),N("bar.color"),N("bar.line.color"),N("bar.line.width");var V=r.valueThickness*(h.gauge.shape==="bullet"?.5:1);N("bar.thickness",V),t(y,f,{name:"steps",handleItemDefaults:u}),N("threshold.value"),N("threshold.thickness"),N("threshold.line.width"),N("threshold.line.color"),p={},y&&(p=y.axis||{}),x=P.newContainer(f,"axis"),D("visible"),h._range=D("range",h._range);var q={font:m.font,noAutotickangles:!0,outerTicks:!0,noTicklabelshift:!0,noTicklabelstandoff:!0};a(p,x,D,"linear"),s(p,x,D,"linear",q),i(p,x,D,"linear",q),l(p,x,D,q)}else E("title.align","center"),E("align","center"),h._isAngular=h._isBullet=!1;h._length=null}function u(d,h){function g(m,E){return v.coerce(d,h,w.gauge.steps,m,E)}g("color"),g("line.color"),g("line.width"),g("range"),g("thickness")}Z.exports={supplyDefaults:o}}}),mre=Ne({"src/traces/indicator/calc.js"(te,Z){function v(w,C){var P=[],t=C.value;typeof C._lastValue!="number"&&(C._lastValue=C.value);var r=C._lastValue,a=r;return C._hasDelta&&typeof C.delta.reference=="number"&&(a=C.delta.reference),P[0]={y:t,lastY:r,delta:t-a,relativeDelta:(t-a)/a},P}Z.exports={calc:v}}}),gre=Ne({"src/traces/indicator/plot.js"(te,Z){var v=xn(),w=(Ao(),Or(Hi)).interpolate,C=(Ao(),Or(Hi)).interpolateNumber,P=In(),t=P.strScale,r=P.strTranslate,a=P.rad2deg,l=Ad().MID_SHIFT,i=zs(),s=AF(),o=hc(),u=Os(),d=Om(),h=vp(),g=Sd(),m=Ha(),E={left:"start",center:"middle",right:"end"},c={left:0,center:.5,right:1},_=/[yzafpnµmkMGTPEZY]/;function T(B){return B&&B.duration>0}Z.exports=function(U,V,q,z){var H=U._fullLayout,G;T(q)&&z&&(G=z()),P.makeTraceGroups(H._indicatorlayer,V,"trace").each(function(J){var le=J[0],ge=le.trace,de=v.select(this),me=ge._hasGauge,W=ge._isAngular,ie=ge._isBullet,se=ge.domain,ee={w:H._size.w*(se.x[1]-se.x[0]),h:H._size.h*(se.y[1]-se.y[0]),l:H._size.l+H._size.w*se.x[0],r:H._size.r+H._size.w*(1-se.x[1]),t:H._size.t+H._size.h*(1-se.y[1]),b:H._size.b+H._size.h*se.y[0]},pe=ee.l+ee.w/2,oe=ee.t+ee.h/2,Y=Math.min(ee.w/2,ee.h),ce=s.innerRadius*Y,ue,_e,Le,ze=ge.align||"center";if(_e=oe,!me)ue=ee.l+c[ze]*ee.w,Le=function(be){return p(be,ee.w,ee.h)};else if(W&&(ue=pe,_e=oe+Y/2,Le=function(be){return x(be,.9*ce)}),ie){var Xe=s.bulletPadding,Ve=1-s.bulletNumberDomainSize+Xe;ue=ee.l+(Ve+(1-Ve)*c[ze])*ee.w,Le=function(be){return p(be,(s.bulletNumberDomainSize-Xe)*ee.w,ee.h)}}b(U,de,J,{numbersX:ue,numbersY:_e,numbersScaler:Le,transitionOpts:q,onComplete:G});var rt,mt;me&&(rt={range:ge.gauge.axis.range,color:ge.gauge.bgcolor,line:{color:ge.gauge.bordercolor,width:0},thickness:1},mt={range:ge.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:ge.gauge.bordercolor,width:ge.gauge.borderwidth},thickness:1});var _t=de.selectAll("g.angular").data(W?J:[]);_t.exit().remove();var vt=de.selectAll("g.angularaxis").data(W?J:[]);vt.exit().remove(),W&&k(U,de,J,{radius:Y,innerRadius:ce,gauge:_t,layer:vt,size:ee,gaugeBg:rt,gaugeOutline:mt,transitionOpts:q,onComplete:G});var ut=de.selectAll("g.bullet").data(ie?J:[]);ut.exit().remove();var Fe=de.selectAll("g.bulletaxis").data(ie?J:[]);Fe.exit().remove(),ie&&M(U,de,J,{gauge:ut,layer:Fe,size:ee,gaugeBg:rt,gaugeOutline:mt,transitionOpts:q,onComplete:G});var Pe=de.selectAll("text.title").data(J);Pe.exit().remove(),Pe.enter().append("text").classed("title",!0),Pe.attr("text-anchor",function(){return ie?E.right:E[ge.title.align]}).text(ge.title.text).call(i.font,ge.title.font).call(o.convertToTspans,U),Pe.attr("transform",function(){var be=ee.l+ee.w*c[ge.title.align],Ye,yt=s.titlePadding,wt=i.bBox(Pe.node());if(me){if(W)if(ge.gauge.axis.visible){var ht=i.bBox(vt.node());Ye=ht.top-yt-wt.bottom}else Ye=ee.t+ee.h/2-Y/2-wt.bottom-yt;ie&&(Ye=_e-(wt.top+wt.bottom)/2,be=ee.l-s.bulletPadding*ee.w)}else Ye=ge._numbersTop-yt-wt.bottom;return r(be,Ye)})})};function M(B,U,V,q){var z=V[0].trace,H=q.gauge,G=q.layer,J=q.gaugeBg,le=q.gaugeOutline,ge=q.size,de=z.domain,me=q.transitionOpts,W=q.onComplete,ie,se,ee,pe,oe;H.enter().append("g").classed("bullet",!0),H.attr("transform",r(ge.l,ge.t)),G.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),G.selectAll("g.xbulletaxistick,path,text").remove();var Y=ge.h,ce=z.gauge.bar.thickness*Y,ue=de.x[0],_e=de.x[0]+(de.x[1]-de.x[0])*(z._hasNumber||z._hasDelta?1-s.bulletNumberDomainSize:1);ie=f(B,z.gauge.axis),ie._id="xbulletaxis",ie.domain=[ue,_e],ie.setScale(),se=u.calcTicks(ie),ee=u.makeTransTickFn(ie),pe=u.getTickSigns(ie)[2],oe=ge.t+ge.h,ie.visible&&(u.drawTicks(B,ie,{vals:ie.ticks==="inside"?u.clipEnds(ie,se):se,layer:G,path:u.makeTickPath(ie,oe,pe),transFn:ee}),u.drawLabels(B,ie,{vals:se,layer:G,transFn:ee,labelFns:u.makeLabelFns(ie,oe)}));function Le(vt){vt.attr("width",function(ut){return Math.max(0,ie.c2p(ut.range[1])-ie.c2p(ut.range[0]))}).attr("x",function(ut){return ie.c2p(ut.range[0])}).attr("y",function(ut){return .5*(1-ut.thickness)*Y}).attr("height",function(ut){return ut.thickness*Y})}var ze=[J].concat(z.gauge.steps),Xe=H.selectAll("g.bg-bullet").data(ze);Xe.enter().append("g").classed("bg-bullet",!0).append("rect"),Xe.select("rect").call(Le).call(A),Xe.exit().remove();var Ve=H.selectAll("g.value-bullet").data([z.gauge.bar]);Ve.enter().append("g").classed("value-bullet",!0).append("rect"),Ve.select("rect").attr("height",ce).attr("y",(Y-ce)/2).call(A),T(me)?Ve.select("rect").transition().duration(me.duration).ease(me.easing).each("end",function(){W&&W()}).each("interrupt",function(){W&&W()}).attr("width",Math.max(0,ie.c2p(Math.min(z.gauge.axis.range[1],V[0].y)))):Ve.select("rect").attr("width",typeof V[0].y=="number"?Math.max(0,ie.c2p(Math.min(z.gauge.axis.range[1],V[0].y))):0),Ve.exit().remove();var rt=V.filter(function(){return z.gauge.threshold.value||z.gauge.threshold.value===0}),mt=H.selectAll("g.threshold-bullet").data(rt);mt.enter().append("g").classed("threshold-bullet",!0).append("line"),mt.select("line").attr("x1",ie.c2p(z.gauge.threshold.value)).attr("x2",ie.c2p(z.gauge.threshold.value)).attr("y1",(1-z.gauge.threshold.thickness)/2*Y).attr("y2",(1-(1-z.gauge.threshold.thickness)/2)*Y).call(m.stroke,z.gauge.threshold.line.color).style("stroke-width",z.gauge.threshold.line.width),mt.exit().remove();var _t=H.selectAll("g.gauge-outline").data([le]);_t.enter().append("g").classed("gauge-outline",!0).append("rect"),_t.select("rect").call(Le).call(A),_t.exit().remove()}function k(B,U,V,q){var z=V[0].trace,H=q.size,G=q.radius,J=q.innerRadius,le=q.gaugeBg,ge=q.gaugeOutline,de=[H.l+H.w/2,H.t+H.h/2+G/2],me=q.gauge,W=q.layer,ie=q.transitionOpts,se=q.onComplete,ee=Math.PI/2;function pe(Yt){var $t=z.gauge.axis.range[0],fr=z.gauge.axis.range[1],mr=(Yt-$t)/(fr-$t)*Math.PI-ee;return mr<-ee?-ee:mr>ee?ee:mr}function oe(Yt){return v.svg.arc().innerRadius((J+G)/2-Yt/2*(G-J)).outerRadius((J+G)/2+Yt/2*(G-J)).startAngle(-ee)}function Y(Yt){Yt.attr("d",function($t){return oe($t.thickness).startAngle(pe($t.range[0])).endAngle(pe($t.range[1]))()})}var ce,ue,_e,Le;me.enter().append("g").classed("angular",!0),me.attr("transform",r(de[0],de[1])),W.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),W.selectAll("g.xangularaxistick,path,text").remove(),ce=f(B,z.gauge.axis),ce.type="linear",ce.range=z.gauge.axis.range,ce._id="xangularaxis",ce.ticklabeloverflow="allow",ce.setScale();var ze=function(Yt){return(ce.range[0]-Yt.x)/(ce.range[1]-ce.range[0])*Math.PI+Math.PI},Xe={},Ve=u.makeLabelFns(ce,0),rt=Ve.labelStandoff;Xe.xFn=function(Yt){var $t=ze(Yt);return Math.cos($t)*rt},Xe.yFn=function(Yt){var $t=ze(Yt),fr=Math.sin($t)>0?.2:1;return-Math.sin($t)*(rt+Yt.fontSize*fr)+Math.abs(Math.cos($t))*(Yt.fontSize*l)},Xe.anchorFn=function(Yt){var $t=ze(Yt),fr=Math.cos($t);return Math.abs(fr)<.1?"middle":fr>0?"start":"end"},Xe.heightFn=function(Yt,$t,fr){var mr=ze(Yt);return-.5*(1+Math.sin(mr))*fr};var mt=function(Yt){return r(de[0]+G*Math.cos(Yt),de[1]-G*Math.sin(Yt))};_e=function(Yt){return mt(ze(Yt))};var _t=function(Yt){var $t=ze(Yt);return mt($t)+"rotate("+-a($t)+")"};if(ue=u.calcTicks(ce),Le=u.getTickSigns(ce)[2],ce.visible){Le=ce.ticks==="inside"?-1:1;var vt=(ce.linewidth||1)/2;u.drawTicks(B,ce,{vals:ue,layer:W,path:"M"+Le*vt+",0h"+Le*ce.ticklen,transFn:_t}),u.drawLabels(B,ce,{vals:ue,layer:W,transFn:_e,labelFns:Xe})}var ut=[le].concat(z.gauge.steps),Fe=me.selectAll("g.bg-arc").data(ut);Fe.enter().append("g").classed("bg-arc",!0).append("path"),Fe.select("path").call(Y).call(A),Fe.exit().remove();var Pe=oe(z.gauge.bar.thickness),be=me.selectAll("g.value-arc").data([z.gauge.bar]);be.enter().append("g").classed("value-arc",!0).append("path");var Ye=be.select("path");T(ie)?(Ye.transition().duration(ie.duration).ease(ie.easing).each("end",function(){se&&se()}).each("interrupt",function(){se&&se()}).attrTween("d",y(Pe,pe(V[0].lastY),pe(V[0].y))),z._lastValue=V[0].y):Ye.attr("d",typeof V[0].y=="number"?Pe.endAngle(pe(V[0].y)):"M0,0Z"),Ye.call(A),be.exit().remove(),ut=[];var yt=z.gauge.threshold.value;(yt||yt===0)&&ut.push({range:[yt,yt],color:z.gauge.threshold.color,line:{color:z.gauge.threshold.line.color,width:z.gauge.threshold.line.width},thickness:z.gauge.threshold.thickness});var wt=me.selectAll("g.threshold-arc").data(ut);wt.enter().append("g").classed("threshold-arc",!0).append("path"),wt.select("path").call(Y).call(A),wt.exit().remove();var ht=me.selectAll("g.gauge-outline").data([ge]);ht.enter().append("g").classed("gauge-outline",!0).append("path"),ht.select("path").call(Y).call(A),ht.exit().remove()}function b(B,U,V,q){var z=V[0].trace,H=q.numbersX,G=q.numbersY,J=z.align||"center",le=E[J],ge=q.transitionOpts,de=q.onComplete,me=P.ensureSingle(U,"g","numbers"),W,ie,se,ee=[];z._hasNumber&&ee.push("number"),z._hasDelta&&(ee.push("delta"),z.delta.position==="left"&&ee.reverse());var pe=me.selectAll("text").data(ee);pe.enter().append("text"),pe.attr("text-anchor",function(){return le}).attr("class",function(mt){return mt}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),pe.exit().remove();function oe(mt,_t,vt,ut){if(mt.match("s")&&vt>=0!=ut>=0&&!_t(vt).slice(-1).match(_)&&!_t(ut).slice(-1).match(_)){var Fe=mt.slice().replace("s","f").replace(/\d+/,function(be){return parseInt(be)-1}),Pe=f(B,{tickformat:Fe});return function(be){return Math.abs(be)<1?u.tickText(Pe,be).text:_t(be)}}else return _t}function Y(){var mt=f(B,{tickformat:z.number.valueformat},z._range);mt.setScale(),u.prepTicks(mt);var _t=function(be){return u.tickText(mt,be).text},vt=z.number.suffix,ut=z.number.prefix,Fe=me.select("text.number");function Pe(){var be=typeof V[0].y=="number"?ut+_t(V[0].y)+vt:"-";Fe.text(be).call(i.font,z.number.font).call(o.convertToTspans,B)}return T(ge)?Fe.transition().duration(ge.duration).ease(ge.easing).each("end",function(){Pe(),de&&de()}).each("interrupt",function(){Pe(),de&&de()}).attrTween("text",function(){var be=v.select(this),Ye=C(V[0].lastY,V[0].y);z._lastValue=V[0].y;var yt=oe(z.number.valueformat,_t,V[0].lastY,V[0].y);return function(wt){be.text(ut+yt(Ye(wt))+vt)}}):Pe(),W=N(ut+_t(V[0].y)+vt,z.number.font,le,B),Fe}function ce(){var mt=f(B,{tickformat:z.delta.valueformat},z._range);mt.setScale(),u.prepTicks(mt);var _t=function(wt){return u.tickText(mt,wt).text},vt=z.delta.suffix,ut=z.delta.prefix,Fe=function(wt){var ht=z.delta.relative?wt.relativeDelta:wt.delta;return ht},Pe=function(wt,ht){return wt===0||typeof wt!="number"||isNaN(wt)?"-":(wt>0?z.delta.increasing.symbol:z.delta.decreasing.symbol)+ut+ht(wt)+vt},be=function(wt){return wt.delta>=0?z.delta.increasing.color:z.delta.decreasing.color};z._deltaLastValue===void 0&&(z._deltaLastValue=Fe(V[0]));var Ye=me.select("text.delta");Ye.call(i.font,z.delta.font).call(m.fill,be({delta:z._deltaLastValue}));function yt(){Ye.text(Pe(Fe(V[0]),_t)).call(m.fill,be(V[0])).call(o.convertToTspans,B)}return T(ge)?Ye.transition().duration(ge.duration).ease(ge.easing).tween("text",function(){var wt=v.select(this),ht=Fe(V[0]),Yt=z._deltaLastValue,$t=oe(z.delta.valueformat,_t,Yt,ht),fr=C(Yt,ht);return z._deltaLastValue=ht,function(mr){wt.text(Pe(fr(mr),$t)),wt.call(m.fill,be({delta:fr(mr)}))}}).each("end",function(){yt(),de&&de()}).each("interrupt",function(){yt(),de&&de()}):yt(),ie=N(Pe(Fe(V[0]),_t),z.delta.font,le,B),Ye}var ue=z.mode+z.align,_e;if(z._hasDelta&&(_e=ce(),ue+=z.delta.position+z.delta.font.size+z.delta.font.family+z.delta.valueformat,ue+=z.delta.increasing.symbol+z.delta.decreasing.symbol,se=ie),z._hasNumber&&(Y(),ue+=z.number.font.size+z.number.font.family+z.number.valueformat+z.number.suffix+z.number.prefix,se=W),z._hasDelta&&z._hasNumber){var Le=[(W.left+W.right)/2,(W.top+W.bottom)/2],ze=[(ie.left+ie.right)/2,(ie.top+ie.bottom)/2],Xe,Ve,rt=.75*z.delta.font.size;z.delta.position==="left"&&(Xe=D(z,"deltaPos",0,-1*(W.width*c[z.align]+ie.width*(1-c[z.align])+rt),ue,Math.min),Ve=Le[1]-ze[1],se={width:W.width+ie.width+rt,height:Math.max(W.height,ie.height),left:ie.left+Xe,right:W.right,top:Math.min(W.top,ie.top+Ve),bottom:Math.max(W.bottom,ie.bottom+Ve)}),z.delta.position==="right"&&(Xe=D(z,"deltaPos",0,W.width*(1-c[z.align])+ie.width*c[z.align]+rt,ue,Math.max),Ve=Le[1]-ze[1],se={width:W.width+ie.width+rt,height:Math.max(W.height,ie.height),left:W.left,right:ie.right+Xe,top:Math.min(W.top,ie.top+Ve),bottom:Math.max(W.bottom,ie.bottom+Ve)}),z.delta.position==="bottom"&&(Xe=null,Ve=ie.height,se={width:Math.max(W.width,ie.width),height:W.height+ie.height,left:Math.min(W.left,ie.left),right:Math.max(W.right,ie.right),top:W.bottom-W.height,bottom:W.bottom+ie.height}),z.delta.position==="top"&&(Xe=null,Ve=W.top,se={width:Math.max(W.width,ie.width),height:W.height+ie.height,left:Math.min(W.left,ie.left),right:Math.max(W.right,ie.right),top:W.bottom-W.height-ie.height,bottom:W.bottom}),_e.attr({dx:Xe,dy:Ve})}(z._hasNumber||z._hasDelta)&&me.attr("transform",function(){var mt=q.numbersScaler(se);ue+=mt[2];var _t=D(z,"numbersScale",1,mt[0],ue,Math.min),vt;z._scaleNumbers||(_t=1),z._isAngular?vt=G-_t*se.bottom:vt=G-_t*(se.top+se.bottom)/2,z._numbersTop=_t*se.top+vt;var ut=se[J];J==="center"&&(ut=(se.left+se.right)/2);var Fe=H-_t*ut;return Fe=D(z,"numbersTranslate",0,Fe,ue,Math.max),r(Fe,vt)+t(_t)})}function A(B){B.each(function(U){m.stroke(v.select(this),U.line.color)}).each(function(U){m.fill(v.select(this),U.color)}).style("stroke-width",function(U){return U.line.width})}function y(B,U,V){return function(){var q=w(U,V);return function(z){return B.endAngle(q(z))()}}}function f(B,U,V){var q=B._fullLayout,z=P.extendFlat({type:"linear",ticks:"outside",range:V,showline:!0},U),H={type:"linear",_id:"x"+U._id},G={letter:"x",font:q.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function J(le,ge){return P.coerce(z,H,g,le,ge)}return d(z,H,J,G,q),h(z,H,J,G),H}function p(B,U,V){var q=Math.min(U/B.width,V/B.height);return[q,B,U+"x"+V]}function x(B,U){var V=Math.sqrt(B.width/2*(B.width/2)+B.height*B.height),q=U/V;return[q,B,U]}function N(B,U,V,q){var z=document.createElementNS("http://www.w3.org/2000/svg","text"),H=v.select(z);return H.text(B).attr("x",0).attr("y",0).attr("text-anchor",V).attr("data-unformatted",B).call(o.convertToTspans,q).call(i.font,U),i.bBox(H.node())}function D(B,U,V,q,z,H){var G="_cache"+U;B[G]&&B[G].key===z||(B[G]={key:z,value:V});var J=P.aggNums(H,null,[B[G].value,q],2);return B[G].value=J,J}}}),yre=Ne({"src/traces/indicator/index.js"(te,Z){Z.exports={moduleType:"trace",name:"indicator",basePlotModule:vre(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:TF(),supplyDefaults:pre().supplyDefaults,calc:mre().calc,plot:gre(),meta:{}}}}),_re=Ne({"lib/indicator.js"(te,Z){Z.exports=yre()}}),SF=Ne({"src/traces/table/attributes.js"(te,Z){var v=Mg(),w=fi().extendFlat,C=ef().overrideAll,P=bo(),t=Fc().attributes,r=Ac().descriptionOnlyNumbers;Z.exports=C({domain:t({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:r("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:28},align:w({},v.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:w({},P({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:r("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:20},align:w({},v.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:w({},P({arrayOk:!0}))}},"calc","from-root")}}),xre=Ne({"src/traces/table/defaults.js"(te,Z){var v=In(),w=SF(),C=Fc().defaults;function P(t,r){for(var a=t.columnorder||[],l=t.header.values.length,i=a.slice(0,l),s=i.slice().sort(function(d,h){return d-h}),o=i.map(function(d){return s.indexOf(d)}),u=o.length;u<l;u++)o.push(u);r("columnorder",o)}Z.exports=function(r,a,l,i){function s(o,u){return v.coerce(r,a,w,o,u)}C(a,i,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"),v.coerceFont(s,"header.font",i.font),P(a,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"),v.coerceFont(s,"cells.font",i.font),a._length=null}}}),bre=Ne({"src/traces/table/calc.js"(te,Z){var v=a1().wrap;Z.exports=function(){return v({})}}}),EF=Ne({"src/traces/table/constants.js"(te,Z){Z.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"}}}}),wre=Ne({"src/traces/table/data_preparation_helper.js"(te,Z){var v=EF(),w=fi().extendFlat,C=Fn(),P=Ri().isTypedArray,t=Ri().isArrayOrTypedArray;Z.exports=function(g,m){var E=l(m.cells.values),c=function(le){return le.slice(m.header.values.length,le.length)},_=l(m.header.values);_.length&&!_[0].length&&(_[0]=[""],_=l(_));var T=_.concat(c(E).map(function(){return i((_[0]||[""]).length)})),M=m.domain,k=Math.floor(g._fullLayout._size.w*(M.x[1]-M.x[0])),b=Math.floor(g._fullLayout._size.h*(M.y[1]-M.y[0])),A=m.header.values.length?T[0].map(function(){return m.header.height}):[v.emptyHeaderHeight],y=E.length?E[0].map(function(){return m.cells.height}):[],f=A.reduce(a,0),p=b-f,x=p+v.uplift,N=u(y,x),D=u(A,f),B=o(D,[]),U=o(N,B),V={},q=m._fullInput.columnorder;t(q)&&(q=Array.from(q)),q=q.concat(c(E.map(function(le,ge){return ge})));var z=T.map(function(le,ge){var de=t(m.columnwidth)?m.columnwidth[Math.min(ge,m.columnwidth.length-1)]:m.columnwidth;return C(de)?Number(de):1}),H=z.reduce(a,0);z=z.map(function(le){return le/H*k});var G=Math.max(r(m.header.line.width),r(m.cells.line.width)),J={key:m.uid+g._context.staticPlot,translateX:M.x[0]*g._fullLayout._size.w,translateY:g._fullLayout._size.h*(1-M.y[1]),size:g._fullLayout._size,width:k,maxLineWidth:G,height:b,columnOrder:q,groupHeight:b,rowBlocks:U,headerRowBlocks:B,scrollY:0,cells:w({},m.cells,{values:E}),headerCells:w({},m.header,{values:T}),gdColumns:T.map(function(le){return le[0]}),gdColumnsOriginalOrder:T.map(function(le){return le[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:T.map(function(le,ge){var de=V[le];V[le]=(de||0)+1;var me=le+"__"+V[le];return{key:me,label:le,specIndex:ge,xIndex:q[ge],xScale:s,x:void 0,calcdata:void 0,columnWidth:z[ge]}})};return J.columns.forEach(function(le){le.calcdata=J,le.x=s(le)}),J};function r(h){if(t(h)){for(var g=0,m=0;m<h.length;m++)g=Math.max(g,r(h[m]));return g}return h}function a(h,g){return h+g}function l(h){var g=h.slice(),m=1/0,E=0,c;for(c=0;c<g.length;c++)P(g[c])?g[c]=Array.from(g[c]):t(g[c])||(g[c]=[g[c]]),m=Math.min(m,g[c].length),E=Math.max(E,g[c].length);if(m!==E)for(c=0;c<g.length;c++){var _=E-g[c].length;_&&(g[c]=g[c].concat(i(_)))}return g}function i(h){for(var g=new Array(h),m=0;m<h;m++)g[m]="";return g}function s(h){return h.calcdata.columns.reduce(function(g,m){return m.xIndex<h.xIndex?g+m.columnWidth:g},0)}function o(h,g){var m=Object.keys(h);return m.map(function(E){return w({},h[E],{auxiliaryBlocks:g})})}function u(h,g){for(var m={},E,c=0,_=0,T=d(),M=0,k=0,b=0;b<h.length;b++)E=h[b],T.rows.push({rowIndex:b,rowHeight:E}),_+=E,(_>=g||b===h.length-1)&&(m[c]=T,T.key=k++,T.firstRowIndex=M,T.lastRowIndex=b,T=d(),c+=_,M=b+1,_=0);return m}function d(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}}}),Tre=Ne({"src/traces/table/data_split_helpers.js"(te){var Z=fi().extendFlat;te.splitToPanels=function(w){var C=[0,0],P=Z({},w,{key:"header",type:"header",page:0,prevPages:C,currentRepaint:[null,null],dragHandle:!0,values:w.calcdata.headerCells.values[w.specIndex],rowBlocks:w.calcdata.headerRowBlocks,calcdata:Z({},w.calcdata,{cells:w.calcdata.headerCells})}),t=Z({},w,{key:"cells1",type:"cells",page:0,prevPages:C,currentRepaint:[null,null],dragHandle:!1,values:w.calcdata.cells.values[w.specIndex],rowBlocks:w.calcdata.rowBlocks}),r=Z({},w,{key:"cells2",type:"cells",page:1,prevPages:C,currentRepaint:[null,null],dragHandle:!1,values:w.calcdata.cells.values[w.specIndex],rowBlocks:w.calcdata.rowBlocks});return[t,r,P]},te.splitToCells=function(w){var C=v(w);return(w.values||[]).slice(C[0],C[1]).map(function(P,t){var r=typeof P=="string"&&P.match(/[<$&> ]/)?"_keybuster_"+Math.random():"";return{keyWithinBlock:t+r,key:C[0]+t,column:w,calcdata:w.calcdata,page:w.page,rowBlocks:w.rowBlocks,value:P}})};function v(w){var C=w.rowBlocks[w.page],P=C?C.rows[0].rowIndex:0,t=C?P+C.rows.length:0;return[P,t]}}}),MF=Ne({"src/traces/table/plot.js"(te,Z){var v=EF(),w=xn(),C=In(),P=C.numberFormat,t=a1(),r=zs(),a=hc(),l=In().raiseToTop,i=In().strTranslate,s=In().cancelTransition,o=wre(),u=Tre(),d=Ha();Z.exports=function(ue,_e){var Le=!ue._context.staticPlot,ze=ue._fullLayout._paper.selectAll("."+v.cn.table).data(_e.map(function(ht){var Yt=t.unwrap(ht),$t=Yt.trace;return o(ue,$t)}),t.keyFun);ze.exit().remove(),ze.enter().append("g").classed(v.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"),ze.attr("width",function(ht){return ht.width+ht.size.l+ht.size.r}).attr("height",function(ht){return ht.height+ht.size.t+ht.size.b}).attr("transform",function(ht){return i(ht.translateX,ht.translateY)});var Xe=ze.selectAll("."+v.cn.tableControlView).data(t.repeat,t.keyFun),Ve=Xe.enter().append("g").classed(v.cn.tableControlView,!0).style("box-sizing","content-box");if(Le){var rt="onwheel"in document?"wheel":"mousewheel";Ve.on("mousemove",function(ht){Xe.filter(function(Yt){return ht===Yt}).call(c,ue)}).on(rt,function(ht){if(!ht.scrollbarState.wheeling){ht.scrollbarState.wheeling=!0;var Yt=ht.scrollY+w.event.deltaY,$t=le(ue,Xe,null,Yt)(ht);$t||(w.event.stopPropagation(),w.event.preventDefault()),ht.scrollbarState.wheeling=!1}}).call(c,ue,!0)}Xe.attr("transform",function(ht){return i(ht.size.l,ht.size.t)});var mt=Xe.selectAll("."+v.cn.scrollBackground).data(t.repeat,t.keyFun);mt.enter().append("rect").classed(v.cn.scrollBackground,!0).attr("fill","none"),mt.attr("width",function(ht){return ht.width}).attr("height",function(ht){return ht.height}),Xe.each(function(ht){r.setClipUrl(w.select(this),g(ue,ht),ue)});var _t=Xe.selectAll("."+v.cn.yColumn).data(function(ht){return ht.columns},t.keyFun);_t.enter().append("g").classed(v.cn.yColumn,!0),_t.exit().remove(),_t.attr("transform",function(ht){return i(ht.x,0)}),Le&&_t.call(w.behavior.drag().origin(function(ht){var Yt=w.select(this);return V(Yt,ht,-v.uplift),l(this),ht.calcdata.columnDragInProgress=!0,c(Xe.filter(function($t){return ht.calcdata.key===$t.key}),ue),ht}).on("drag",function(ht){var Yt=w.select(this),$t=function(Ur){return(ht===Ur?w.event.x:Ur.x)+Ur.columnWidth/2};ht.x=Math.max(-v.overdrag,Math.min(ht.calcdata.width+v.overdrag-ht.columnWidth,w.event.x));var fr=E(_t).filter(function(Ur){return Ur.calcdata.key===ht.calcdata.key}),mr=fr.sort(function(Ur,jr){return $t(Ur)-$t(jr)});mr.forEach(function(Ur,jr){Ur.xIndex=jr,Ur.x=ht===Ur?Ur.x:Ur.xScale(Ur)}),_t.filter(function(Ur){return ht!==Ur}).transition().ease(v.transitionEase).duration(v.transitionDuration).attr("transform",function(Ur){return i(Ur.x,0)}),Yt.call(s).attr("transform",i(ht.x,-v.uplift))}).on("dragend",function(ht){var Yt=w.select(this),$t=ht.calcdata;ht.x=ht.xScale(ht),ht.calcdata.columnDragInProgress=!1,V(Yt,ht,0),B(ue,$t,$t.columns.map(function(fr){return fr.xIndex}))})),_t.each(function(ht){r.setClipUrl(w.select(this),m(ue,ht),ue)});var vt=_t.selectAll("."+v.cn.columnBlock).data(u.splitToPanels,t.keyFun);vt.enter().append("g").classed(v.cn.columnBlock,!0).attr("id",function(ht){return ht.key}),vt.style("cursor",function(ht){return ht.dragHandle?"ew-resize":ht.calcdata.scrollbarState.barWiggleRoom?"ns-resize":"default"});var ut=vt.filter(z),Fe=vt.filter(q);Le&&Fe.call(w.behavior.drag().origin(function(ht){return w.event.stopPropagation(),ht}).on("drag",le(ue,Xe,-1)).on("dragend",function(){})),_(ue,Xe,ut,vt),_(ue,Xe,Fe,vt);var Pe=Xe.selectAll("."+v.cn.scrollAreaClip).data(t.repeat,t.keyFun);Pe.enter().append("clipPath").classed(v.cn.scrollAreaClip,!0).attr("id",function(ht){return g(ue,ht)});var be=Pe.selectAll("."+v.cn.scrollAreaClipRect).data(t.repeat,t.keyFun);be.enter().append("rect").classed(v.cn.scrollAreaClipRect,!0).attr("x",-v.overdrag).attr("y",-v.uplift).attr("fill","none"),be.attr("width",function(ht){return ht.width+2*v.overdrag}).attr("height",function(ht){return ht.height+v.uplift});var Ye=_t.selectAll("."+v.cn.columnBoundary).data(t.repeat,t.keyFun);Ye.enter().append("g").classed(v.cn.columnBoundary,!0);var yt=_t.selectAll("."+v.cn.columnBoundaryClippath).data(t.repeat,t.keyFun);yt.enter().append("clipPath").classed(v.cn.columnBoundaryClippath,!0),yt.attr("id",function(ht){return m(ue,ht)});var wt=yt.selectAll("."+v.cn.columnBoundaryRect).data(t.repeat,t.keyFun);wt.enter().append("rect").classed(v.cn.columnBoundaryRect,!0).attr("fill","none"),wt.attr("width",function(ht){return ht.columnWidth+2*h(ht)}).attr("height",function(ht){return ht.calcdata.height+2*h(ht)+v.uplift}).attr("x",function(ht){return-h(ht)}).attr("y",function(ht){return-h(ht)}),J(null,Fe,Xe)};function h(ce){return Math.ceil(ce.calcdata.maxLineWidth/2)}function g(ce,ue){return"clip"+ce._fullLayout._uid+"_scrollAreaBottomClip_"+ue.key}function m(ce,ue){return"clip"+ce._fullLayout._uid+"_columnBoundaryClippath_"+ue.calcdata.key+"_"+ue.specIndex}function E(ce){return[].concat.apply([],ce.map(function(ue){return ue})).map(function(ue){return ue.__data__})}function c(ce,ue,_e){function Le(_t){var vt=_t.rowBlocks;return se(vt,vt.length-1)+(vt.length?ee(vt[vt.length-1],1/0):1)}var ze=ce.selectAll("."+v.cn.scrollbarKit).data(t.repeat,t.keyFun);ze.enter().append("g").classed(v.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),ze.each(function(_t){var vt=_t.scrollbarState;vt.totalHeight=Le(_t),vt.scrollableAreaHeight=_t.groupHeight-H(_t),vt.currentlyVisibleHeight=Math.min(vt.totalHeight,vt.scrollableAreaHeight),vt.ratio=vt.currentlyVisibleHeight/vt.totalHeight,vt.barLength=Math.max(vt.ratio*vt.currentlyVisibleHeight,v.goldenRatio*v.scrollbarWidth),vt.barWiggleRoom=vt.currentlyVisibleHeight-vt.barLength,vt.wiggleRoom=Math.max(0,vt.totalHeight-vt.scrollableAreaHeight),vt.topY=vt.barWiggleRoom===0?0:_t.scrollY/vt.wiggleRoom*vt.barWiggleRoom,vt.bottomY=vt.topY+vt.barLength,vt.dragMultiplier=vt.wiggleRoom/vt.barWiggleRoom}).attr("transform",function(_t){var vt=_t.width+v.scrollbarWidth/2+v.scrollbarOffset;return i(vt,H(_t))});var Xe=ze.selectAll("."+v.cn.scrollbar).data(t.repeat,t.keyFun);Xe.enter().append("g").classed(v.cn.scrollbar,!0);var Ve=Xe.selectAll("."+v.cn.scrollbarSlider).data(t.repeat,t.keyFun);Ve.enter().append("g").classed(v.cn.scrollbarSlider,!0),Ve.attr("transform",function(_t){return i(0,_t.scrollbarState.topY||0)});var rt=Ve.selectAll("."+v.cn.scrollbarGlyph).data(t.repeat,t.keyFun);rt.enter().append("line").classed(v.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",v.scrollbarWidth).attr("stroke-linecap","round").attr("y1",v.scrollbarWidth/2),rt.attr("y2",function(_t){return _t.scrollbarState.barLength-v.scrollbarWidth/2}).attr("stroke-opacity",function(_t){return _t.columnDragInProgress||!_t.scrollbarState.barWiggleRoom||_e?0:.4}),rt.transition().delay(0).duration(0),rt.transition().delay(v.scrollbarHideDelay).duration(v.scrollbarHideDuration).attr("stroke-opacity",0);var mt=Xe.selectAll("."+v.cn.scrollbarCaptureZone).data(t.repeat,t.keyFun);mt.enter().append("line").classed(v.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",v.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(_t){var vt=w.event.y,ut=this.getBoundingClientRect(),Fe=_t.scrollbarState,Pe=vt-ut.top,be=w.scale.linear().domain([0,Fe.scrollableAreaHeight]).range([0,Fe.totalHeight]).clamp(!0);Fe.topY<=Pe&&Pe<=Fe.bottomY||le(ue,ce,null,be(Pe-Fe.barLength/2))(_t)}).call(w.behavior.drag().origin(function(_t){return w.event.stopPropagation(),_t.scrollbarState.scrollbarScrollInProgress=!0,_t}).on("drag",le(ue,ce)).on("dragend",function(){})),mt.attr("y2",function(_t){return _t.scrollbarState.scrollableAreaHeight}),ue._context.staticPlot&&(rt.remove(),mt.remove())}function _(ce,ue,_e,Le){var ze=T(_e),Xe=M(ze);y(Xe);var Ve=k(Xe);p(Ve);var rt=A(Xe),mt=b(rt);f(mt),x(mt,ue,Le,ce),ie(Xe)}function T(ce){var ue=ce.selectAll("."+v.cn.columnCells).data(t.repeat,t.keyFun);return ue.enter().append("g").classed(v.cn.columnCells,!0),ue.exit().remove(),ue}function M(ce){var ue=ce.selectAll("."+v.cn.columnCell).data(u.splitToCells,function(_e){return _e.keyWithinBlock});return ue.enter().append("g").classed(v.cn.columnCell,!0),ue.exit().remove(),ue}function k(ce){var ue=ce.selectAll("."+v.cn.cellRect).data(t.repeat,function(_e){return _e.keyWithinBlock});return ue.enter().append("rect").classed(v.cn.cellRect,!0),ue}function b(ce){var ue=ce.selectAll("."+v.cn.cellText).data(t.repeat,function(_e){return _e.keyWithinBlock});return ue.enter().append("text").classed(v.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){w.event.stopPropagation()}),ue}function A(ce){var ue=ce.selectAll("."+v.cn.cellTextHolder).data(t.repeat,function(_e){return _e.keyWithinBlock});return ue.enter().append("g").classed(v.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),ue}function y(ce){ce.each(function(ue,_e){var Le=ue.calcdata.cells.font,ze=ue.column.specIndex,Xe={size:U(Le.size,ze,_e),color:U(Le.color,ze,_e),family:U(Le.family,ze,_e),weight:U(Le.weight,ze,_e),style:U(Le.style,ze,_e),variant:U(Le.variant,ze,_e),textcase:U(Le.textcase,ze,_e),lineposition:U(Le.lineposition,ze,_e),shadow:U(Le.shadow,ze,_e)};ue.rowNumber=ue.key,ue.align=U(ue.calcdata.cells.align,ze,_e),ue.cellBorderWidth=U(ue.calcdata.cells.line.width,ze,_e),ue.font=Xe})}function f(ce){ce.each(function(ue){r.font(w.select(this),ue.font)})}function p(ce){ce.attr("width",function(ue){return ue.column.columnWidth}).attr("stroke-width",function(ue){return ue.cellBorderWidth}).each(function(ue){var _e=w.select(this);d.stroke(_e,U(ue.calcdata.cells.line.color,ue.column.specIndex,ue.rowNumber)),d.fill(_e,U(ue.calcdata.cells.fill.color,ue.column.specIndex,ue.rowNumber))})}function x(ce,ue,_e,Le){ce.text(function(ze){var Xe=ze.column.specIndex,Ve=ze.rowNumber,rt=ze.value,mt=typeof rt=="string",_t=mt&&rt.match(/<br>/i),vt=!mt||_t;ze.mayHaveMarkup=mt&&rt.match(/[<&>]/);var ut=N(rt);ze.latex=ut;var Fe=ut?"":U(ze.calcdata.cells.prefix,Xe,Ve)||"",Pe=ut?"":U(ze.calcdata.cells.suffix,Xe,Ve)||"",be=ut?null:U(ze.calcdata.cells.format,Xe,Ve)||null,Ye=Fe+(be?P(be)(ze.value):ze.value)+Pe,yt;ze.wrappingNeeded=!ze.wrapped&&!vt&&!ut&&(yt=D(Ye)),ze.cellHeightMayIncrease=_t||ut||ze.mayHaveMarkup||(yt===void 0?D(Ye):yt),ze.needsConvertToTspans=ze.mayHaveMarkup||ze.wrappingNeeded||ze.latex;var wt;if(ze.wrappingNeeded){var ht=v.wrapSplitCharacter===" "?Ye.replace(/<a href=/ig,"<a_href="):Ye,Yt=ht.split(v.wrapSplitCharacter),$t=v.wrapSplitCharacter===" "?Yt.map(function(fr){return fr.replace(/<a_href=/ig,"<a href=")}):Yt;ze.fragments=$t.map(function(fr){return{text:fr,width:null}}),ze.fragments.push({fragment:v.wrapSpacer,width:null}),wt=$t.join(v.lineBreaker)+v.lineBreaker+v.wrapSpacer}else delete ze.fragments,wt=Ye;return wt}).attr("dy",function(ze){return ze.needsConvertToTspans?0:"0.75em"}).each(function(ze){var Xe=this,Ve=w.select(Xe),rt=ze.wrappingNeeded?de:me;ze.needsConvertToTspans?a.convertToTspans(Ve,Le,rt(_e,Xe,ue,Le,ze)):w.select(Xe.parentNode).attr("transform",function(mt){return i(W(mt),v.cellPad)}).attr("text-anchor",function(mt){return{left:"start",center:"middle",right:"end"}[mt.align]})})}function N(ce){return typeof ce=="string"&&ce.match(v.latexCheck)}function D(ce){return ce.indexOf(v.wrapSplitCharacter)!==-1}function B(ce,ue,_e){var Le=ue.gdColumnsOriginalOrder;ue.gdColumns.sort(function(ze,Xe){return _e[Le.indexOf(ze)]-_e[Le.indexOf(Xe)]}),ue.columnorder=_e,ce.emit("plotly_restyle")}function U(ce,ue,_e){if(C.isArrayOrTypedArray(ce)){var Le=ce[Math.min(ue,ce.length-1)];return C.isArrayOrTypedArray(Le)?Le[Math.min(_e,Le.length-1)]:Le}else return ce}function V(ce,ue,_e){ce.transition().ease(v.releaseTransitionEase).duration(v.releaseTransitionDuration).attr("transform",i(ue.x,_e))}function q(ce){return ce.type==="cells"}function z(ce){return ce.type==="header"}function H(ce){var ue=ce.rowBlocks.length?ce.rowBlocks[0].auxiliaryBlocks:[];return ue.reduce(function(_e,Le){return _e+ee(Le,1/0)},0)}function G(ce,ue,_e){for(var Le=[],ze=0,Xe=0;Xe<ce.length;Xe++){for(var Ve=ce[Xe],rt=Ve.rows,mt=0,_t=0;_t<rt.length;_t++)mt+=rt[_t].rowHeight;Ve.allRowsHeight=mt;var vt=ze+mt,ut=ue,Fe=ut+_e;ut<vt&&Fe>ze&&Le.push(Xe),ze+=mt}return Le}function J(ce,ue,_e){var Le=E(ue)[0];if(Le!==void 0){var ze=Le.rowBlocks,Xe=Le.calcdata,Ve=se(ze,ze.length),rt=Le.calcdata.groupHeight-H(Le),mt=Xe.scrollY=Math.max(0,Math.min(Ve-rt,Xe.scrollY)),_t=G(ze,mt,rt);_t.length===1&&(_t[0]===ze.length-1?_t.unshift(_t[0]-1):_t.push(_t[0]+1)),_t[0]%2&&_t.reverse(),ue.each(function(vt,ut){vt.page=_t[ut],vt.scrollY=mt}),ue.attr("transform",function(vt){var ut=se(vt.rowBlocks,vt.page)-vt.scrollY;return i(0,ut)}),ce&&(ge(ce,_e,ue,_t,Le.prevPages,Le,0),ge(ce,_e,ue,_t,Le.prevPages,Le,1),c(_e,ce))}}function le(ce,ue,_e,Le){return function(Xe){var Ve=Xe.calcdata?Xe.calcdata:Xe,rt=ue.filter(function(ut){return Ve.key===ut.key}),mt=_e||Ve.scrollbarState.dragMultiplier,_t=Ve.scrollY;Ve.scrollY=Le===void 0?Ve.scrollY+mt*w.event.dy:Le;var vt=rt.selectAll("."+v.cn.yColumn).selectAll("."+v.cn.columnBlock).filter(q);return J(ce,vt,rt),Ve.scrollY===_t}}function ge(ce,ue,_e,Le,ze,Xe,Ve){var rt=Le[Ve]!==ze[Ve];rt&&(clearTimeout(Xe.currentRepaint[Ve]),Xe.currentRepaint[Ve]=setTimeout(function(){var mt=_e.filter(function(_t,vt){return vt===Ve&&Le[vt]!==ze[vt]});_(ce,ue,mt,_e),ze[Ve]=Le[Ve]}))}function de(ce,ue,_e,Le){return function(){var Xe=w.select(ue.parentNode);Xe.each(function(Ve){var rt=Ve.fragments;Xe.selectAll("tspan.line").each(function(Ye,yt){rt[yt].width=this.getComputedTextLength()});var mt=rt[rt.length-1].width,_t=rt.slice(0,-1),vt=[],ut,Fe,Pe=0,be=Ve.column.columnWidth-2*v.cellPad;for(Ve.value="";_t.length;)ut=_t.shift(),Fe=ut.width+mt,Pe+Fe>be&&(Ve.value+=vt.join(v.wrapSpacer)+v.lineBreaker,vt=[],Pe=0),vt.push(ut.text),Pe+=Fe;Pe&&(Ve.value+=vt.join(v.wrapSpacer)),Ve.wrapped=!0}),Xe.selectAll("tspan.line").remove(),x(Xe.select("."+v.cn.cellText),_e,ce,Le),w.select(ue.parentNode.parentNode).call(ie)}}function me(ce,ue,_e,Le,ze){return function(){if(!ze.settledY){var Ve=w.select(ue.parentNode),rt=oe(ze),mt=ze.key-rt.firstRowIndex,_t=rt.rows[mt].rowHeight,vt=ze.cellHeightMayIncrease?ue.parentNode.getBoundingClientRect().height+2*v.cellPad:_t,ut=Math.max(vt,_t),Fe=ut-rt.rows[mt].rowHeight;Fe&&(rt.rows[mt].rowHeight=ut,ce.selectAll("."+v.cn.columnCell).call(ie),J(null,ce.filter(q),0),c(_e,Le,!0)),Ve.attr("transform",function(){var Pe=this,be=Pe.parentNode,Ye=be.getBoundingClientRect(),yt=w.select(Pe.parentNode).select("."+v.cn.cellRect).node().getBoundingClientRect(),wt=Pe.transform.baseVal.consolidate(),ht=yt.top-Ye.top+(wt?wt.matrix.f:v.cellPad);return i(W(ze,w.select(Pe.parentNode).select("."+v.cn.cellTextHolder).node().getBoundingClientRect().width),ht)}),ze.settledY=!0}}}function W(ce,ue){switch(ce.align){case"left":return v.cellPad;case"right":return ce.column.columnWidth-(ue||0)-v.cellPad;case"center":return(ce.column.columnWidth-(ue||0))/2;default:return v.cellPad}}function ie(ce){ce.attr("transform",function(ue){var _e=ue.rowBlocks[0].auxiliaryBlocks.reduce(function(Ve,rt){return Ve+ee(rt,1/0)},0),Le=oe(ue),ze=ee(Le,ue.key),Xe=ze+_e;return i(0,Xe)}).selectAll("."+v.cn.cellRect).attr("height",function(ue){return Y(oe(ue),ue.key).rowHeight})}function se(ce,ue){for(var _e=0,Le=ue-1;Le>=0;Le--)_e+=pe(ce[Le]);return _e}function ee(ce,ue){for(var _e=0,Le=0;Le<ce.rows.length&&ce.rows[Le].rowIndex<ue;Le++)_e+=ce.rows[Le].rowHeight;return _e}function pe(ce){var ue=ce.allRowsHeight;if(ue!==void 0)return ue;for(var _e=0,Le=0;Le<ce.rows.length;Le++)_e+=ce.rows[Le].rowHeight;return ce.allRowsHeight=_e,_e}function oe(ce){return ce.rowBlocks[ce.page]}function Y(ce,ue){return ce.rows[ue-ce.firstRowIndex]}}}),Are=Ne({"src/traces/table/base_plot.js"(te){var Z=lv().getModuleCalcData,v=MF(),w="table";te.name=w,te.plot=function(C){var P=Z(C.calcdata,w)[0];P.length&&v(C,P)},te.clean=function(C,P,t,r){var a=r._has&&r._has(w),l=P._has&&P._has(w);a&&!l&&r._paperdiv.selectAll(".table").remove()}}}),Sre=Ne({"src/traces/table/index.js"(te,Z){Z.exports={attributes:SF(),supplyDefaults:xre(),calc:bre(),plot:MF(),moduleType:"trace",name:"table",basePlotModule:Are(),categories:["noOpacity"],meta:{}}}}),Ere=Ne({"lib/table.js"(te,Z){Z.exports=Sre()}}),Mre=Ne({"src/traces/carpet/axis_attributes.js"(te,Z){var v=bo(),w=js(),C=Sd(),P=Ac().descriptionWithDates,t=ef().overrideAll,r=Fd().dash,a=fi().extendFlat;Z.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:v({editType:"calc"}),offset:{valType:"number",dflt:10,editType:"calc"},editType:"calc"},type:{valType:"enumerated",values:["-","linear","date","category"],dflt:"-",editType:"calc"},autotypenumbers:C.autotypenumbers,autorange:{valType:"enumerated",values:[!0,!1,"reversed"],dflt:!0,editType:"calc"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"calc"},range:{valType:"info_array",editType:"calc",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}]},fixedrange:{valType:"boolean",dflt:!1,editType:"calc"},cheatertype:{valType:"enumerated",values:["index","value"],dflt:"value",editType:"calc"},tickmode:{valType:"enumerated",values:["linear","array"],dflt:"array",editType:"calc"},nticks:{valType:"integer",min:0,dflt:0,editType:"calc"},tickvals:{valType:"data_array",editType:"calc"},ticktext:{valType:"data_array",editType:"calc"},showticklabels:{valType:"enumerated",values:["start","end","both","none"],dflt:"start",editType:"calc"},labelalias:a({},C.labelalias,{editType:"calc"}),tickfont:v({editType:"calc"}),tickangle:{valType:"angle",dflt:"auto",editType:"calc"},tickprefix:{valType:"string",dflt:"",editType:"calc"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},ticksuffix:{valType:"string",dflt:"",editType:"calc"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B","SI extended"],dflt:"B",editType:"calc"},minexponent:{valType:"number",dflt:3,min:0,editType:"calc"},separatethousands:{valType:"boolean",dflt:!1,editType:"calc"},tickformat:{valType:"string",dflt:"",editType:"calc",description:P("tick label")},tickformatstops:t(C.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:w.defaultLine,editType:"calc"},linewidth:{valType:"number",min:0,dflt:1,editType:"calc"},gridcolor:{valType:"color",editType:"calc"},gridwidth:{valType:"number",min:0,dflt:1,editType:"calc"},griddash:a({},r,{editType:"calc"}),showgrid:{valType:"boolean",dflt:!0,editType:"calc"},minorgridcount:{valType:"integer",min:0,dflt:0,editType:"calc"},minorgridwidth:{valType:"number",min:0,dflt:1,editType:"calc"},minorgriddash:a({},r,{editType:"calc"}),minorgridcolor:{valType:"color",dflt:w.lightLine,editType:"calc"},startline:{valType:"boolean",editType:"calc"},startlinecolor:{valType:"color",editType:"calc"},startlinewidth:{valType:"number",dflt:1,editType:"calc"},endline:{valType:"boolean",editType:"calc"},endlinewidth:{valType:"number",dflt:1,editType:"calc"},endlinecolor:{valType:"color",editType:"calc"},tick0:{valType:"number",min:0,dflt:0,editType:"calc"},dtick:{valType:"number",min:0,dflt:1,editType:"calc"},arraytick0:{valType:"integer",min:0,dflt:0,editType:"calc"},arraydtick:{valType:"integer",min:1,dflt:1,editType:"calc"},editType:"calc"}}}),YR=Ne({"src/traces/carpet/attributes.js"(te,Z){var v=bo(),w=Mre(),C=js(),P=v({editType:"calc"}),t=tf().zorder;P.family.dflt='"Open Sans", verdana, arial, sans-serif',P.size.dflt=12,P.color.dflt=C.defaultLine,Z.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:w,baxis:w,font:P,color:{valType:"color",dflt:C.defaultLine,editType:"plot"},zorder:t}}}),Cre=Ne({"src/traces/carpet/xy_defaults.js"(te,Z){var v=In().isArray1D;Z.exports=function(C,P,t){var r=t("x"),a=r&&r.length,l=t("y"),i=l&&l.length;if(!a&&!i)return!1;if(P._cheater=!r,(!a||v(r))&&(!i||v(l))){var s=a?r.length:1/0;i&&(s=Math.min(s,l.length)),P.a&&P.a.length&&(s=Math.min(s,P.a.length)),P.b&&P.b.length&&(s=Math.min(s,P.b.length)),P._length=s}else P._length=null;return!0}}}),kre=Ne({"src/traces/carpet/axis_defaults.js"(te,Z){var v=YR(),w=Ha().addOpacity,C=Yo(),P=In(),t=Ty(),r=Em(),a=dp(),l=Yf(),i=Vp(),s=Ag();Z.exports=function(d,h,g){var m=g.letter,E=g.font||{},c=v[m+"axis"];function _(G,J){return P.coerce(d,h,c,G,J)}function T(G,J){return P.coerce2(d,h,c,G,J)}g.name&&(h._name=g.name,h._id=g.name),_("autotypenumbers",g.autotypenumbersDflt);var M=_("type");if(M==="-"&&(g.data&&o(h,g.data),h.type==="-"?h.type="linear":M=d.type=h.type),_("smoothing"),_("cheatertype"),_("showticklabels"),_("labelprefix",m+" = "),_("labelsuffix"),_("showtickprefix"),_("showticksuffix"),_("separatethousands"),_("tickformat"),_("exponentformat"),_("minexponent"),_("showexponent"),_("categoryorder"),_("tickmode"),_("tickvals"),_("ticktext"),_("tick0"),_("dtick"),h.tickmode==="array"&&(_("arraytick0"),_("arraydtick")),_("labelpadding"),h._hovertitle=m,M==="date"){var k=C.getComponentMethod("calendars","handleDefaults");k(d,h,"calendar",g.calendar)}i(h,g.fullLayout),h.c2p=P.identity;var b=_("color",g.dfltColor),A=b===d.color?b:E.color,y=_("title.text");y&&(P.coerceFont(_,"title.font",E,{overrideDflt:{size:P.bigFont(E.size),color:A}}),_("title.offset")),_("tickangle");var f=_("autorange",!h.isValidRange(d.range));f&&_("rangemode"),_("range"),h.cleanRange(),_("fixedrange"),t(d,h,_,M),a(d,h,_,M,g),r(d,h,_,M,g),l(d,h,_,{data:g.data,dataAttr:m});var p=T("gridcolor",w(b,.3)),x=T("gridwidth"),N=T("griddash"),D=_("showgrid");D||(delete h.gridcolor,delete h.gridwidth,delete h.griddash);var B=T("startlinecolor",b),U=T("startlinewidth",x),V=_("startline",h.showgrid||!!B||!!U);V||(delete h.startlinecolor,delete h.startlinewidth);var q=T("endlinecolor",b),z=T("endlinewidth",x),H=_("endline",h.showgrid||!!q||!!z);return H||(delete h.endlinecolor,delete h.endlinewidth),D?(_("minorgridcount"),_("minorgridwidth",x),_("minorgriddash",N),_("minorgridcolor",w(p,.06)),h.minorgridcount||(delete h.minorgridwidth,delete h.minorgriddash,delete h.minorgridcolor)):(delete h.gridcolor,delete h.gridwidth,delete h.griddash),h.showticklabels==="none"&&(delete h.tickfont,delete h.tickangle,delete h.showexponent,delete h.exponentformat,delete h.minexponent,delete h.tickformat,delete h.showticksuffix,delete h.showtickprefix),h.showticksuffix||delete h.ticksuffix,h.showtickprefix||delete h.tickprefix,_("tickmode"),h};function o(u,d){if(u.type==="-"){var h=u._id,g=h.charAt(0),m=g+"calendar",E=u[m];u.type=s(d,E,{autotypenumbers:u.autotypenumbers})}}}}),Pre=Ne({"src/traces/carpet/ab_defaults.js"(te,Z){var v=kre(),w=Cu();Z.exports=function(t,r,a,l,i){var s=l("a");s||(l("da"),l("a0"));var o=l("b");o||(l("db"),l("b0")),C(t,r,a,i)};function C(P,t,r,a){var l=["aaxis","baxis"];l.forEach(function(i){var s=i.charAt(0),o=P[i]||{},u=w.newContainer(t,i),d={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,noTicklabelstep:!0,tickfont:"x",id:s+"axis",letter:s,font:t.font,name:i,data:P[s],calendar:t.calendar,dfltColor:a,bgColor:r.paper_bgcolor,autotypenumbersDflt:r.autotypenumbers,fullLayout:r};v(o,u,d),u._categories=u._categories||[],!P[i]&&o.type!=="-"&&(P[i]={type:o.type})})}}}),Lre=Ne({"src/traces/carpet/defaults.js"(te,Z){var v=In(),w=Cre(),C=Pre(),P=YR(),t=js();Z.exports=function(a,l,i,s){function o(h,g){return v.coerce(a,l,P,h,g)}l._clipPathId="clip"+l.uid+"carpet";var u=o("color",t.defaultLine);if(v.coerceFont(o,"font",s.font),o("carpet"),C(a,l,s,o,u),!l.a||!l.b){l.visible=!1;return}l.a.length<3&&(l.aaxis.smoothing=0),l.b.length<3&&(l.baxis.smoothing=0);var d=w(a,l,o);d||(l.visible=!1),l._cheater&&o("cheaterslope"),o("zorder")}}}),CF=Ne({"src/traces/carpet/map_1d_array.js"(te,Z){var v=In().isArrayOrTypedArray;Z.exports=function(C,P,t){var r;for(v(C)?C.length>P.length&&(C=C.slice(0,P.length)):C=[],r=0;r<P.length;r++)C[r]=t(P[r]);return C}}}),kF=Ne({"src/traces/carpet/makepath.js"(te,Z){Z.exports=function(w,C,P){if(w.length===0)return"";var t,r=[],a=P?3:1;for(t=0;t<w.length;t+=a)r.push(w[t]+","+C[t]),P&&t<w.length-a&&(r.push("C"),r.push([w[t+1]+","+C[t+1],w[t+2]+","+C[t+2]+" "].join(" ")));return r.join(P?"":"L")}}}),Rre=Ne({"src/traces/carpet/orient_text.js"(te,Z){Z.exports=function(w,C,P,t,r,a){var l=r[0]*w.dpdx(C),i=r[1]*w.dpdy(P),s=1,o=1;if(a){var u=Math.sqrt(r[0]*r[0]+r[1]*r[1]),d=Math.sqrt(a[0]*a[0]+a[1]*a[1]),h=(r[0]*a[0]+r[1]*a[1])/u/d;o=Math.max(0,h)}var g=Math.atan2(i,l)*180/Math.PI;return g<-90?(g+=180,s=-s):g>90&&(g-=180,s=-s),{angle:g,flip:s,p:w.c2p(t,C,P),offsetMultplier:o}}}}),Ire=Ne({"src/traces/carpet/plot.js"(te,Z){var v=xn(),w=zs(),C=CF(),P=kF(),t=Rre(),r=hc(),a=In(),l=a.strRotate,i=a.strTranslate,s=Ad();Z.exports=function(_,T,M,k){var b=_._context.staticPlot,A=T.xaxis,y=T.yaxis,f=_._fullLayout,p=f._clips;a.makeTraceGroups(k,M,"trace").each(function(x){var N=v.select(this),D=x[0],B=D.trace,U=B.aaxis,V=B.baxis,q=a.ensureSingle(N,"g","minorlayer"),z=a.ensureSingle(N,"g","majorlayer"),H=a.ensureSingle(N,"g","boundarylayer"),G=a.ensureSingle(N,"g","labellayer");N.style("opacity",B.opacity),u(A,y,z,U,"a",U._gridlines,!0),u(A,y,z,V,"b",V._gridlines,!0),u(A,y,q,U,"a",U._minorgridlines,!0),u(A,y,q,V,"b",V._minorgridlines,!0),u(A,y,H,U,"a-boundary",U._boundarylines,b),u(A,y,H,V,"b-boundary",V._boundarylines,b);var J=d(_,A,y,B,D,G,U._labels,"a-label"),le=d(_,A,y,B,D,G,V._labels,"b-label");h(_,G,B,D,A,y,J,le),o(B,D,p,A,y)})};function o(c,_,T,M,k){var b,A,y,f,p=T.select("#"+c._clipPathId);p.size()||(p=T.append("clipPath").classed("carpetclip",!0));var x=a.ensureSingle(p,"path","carpetboundary"),N=_.clipsegments,D=[];for(f=0;f<N.length;f++)b=N[f],A=C([],b.x,M.c2p),y=C([],b.y,k.c2p),D.push(P(A,y,b.bicubic));var B="M"+D.join("L")+"Z";p.attr("id",c._clipPathId),x.attr("d",B)}function u(c,_,T,M,k,b,A){var y="const-"+k+"-lines",f=T.selectAll("."+y).data(b);f.enter().append("path").classed(y,!0).style("vector-effect",A?"none":"non-scaling-stroke"),f.each(function(p){var x=p,N=x.x,D=x.y,B=C([],N,c.c2p),U=C([],D,_.c2p),V="M"+P(B,U,x.smoothing),q=v.select(this);q.attr("d",V).style("stroke-width",x.width).style("stroke",x.color).style("stroke-dasharray",w.dashStyle(x.dash,x.width)).style("fill","none")}),f.exit().remove()}function d(c,_,T,M,k,b,A,y){var f=b.selectAll("text."+y).data(A);f.enter().append("text").classed(y,!0);var p=0,x={};return f.each(function(N,D){var B;if(N.axis.tickangle==="auto")B=t(M,_,T,N.xy,N.dxy);else{var U=(N.axis.tickangle+180)*Math.PI/180;B=t(M,_,T,N.xy,[Math.cos(U),Math.sin(U)])}D||(x={angle:B.angle,flip:B.flip});var V=(N.endAnchor?-1:1)*B.flip,q=v.select(this).attr({"text-anchor":V>0?"start":"end","data-notex":1}).call(w.font,N.font).text(N.text).call(r.convertToTspans,c),z=w.bBox(this);q.attr("transform",i(B.p[0],B.p[1])+l(B.angle)+i(N.axis.labelpadding*V,z.height*.3)),p=Math.max(p,z.width+N.axis.labelpadding)}),f.exit().remove(),x.maxExtent=p,x}function h(c,_,T,M,k,b,A,y){var f,p,x,N,D=a.aggNums(Math.min,null,T.a),B=a.aggNums(Math.max,null,T.a),U=a.aggNums(Math.min,null,T.b),V=a.aggNums(Math.max,null,T.b);f=.5*(D+B),p=U,x=T.ab2xy(f,p,!0),N=T.dxyda_rough(f,p),A.angle===void 0&&a.extendFlat(A,t(T,k,b,x,T.dxydb_rough(f,p))),E(c,_,T,M,x,N,T.aaxis,k,b,A,"a-title"),f=D,p=.5*(U+V),x=T.ab2xy(f,p,!0),N=T.dxydb_rough(f,p),y.angle===void 0&&a.extendFlat(y,t(T,k,b,x,T.dxyda_rough(f,p))),E(c,_,T,M,x,N,T.baxis,k,b,y,"b-title")}var g=s.LINE_SPACING,m=(1-s.MID_SHIFT)/g+1;function E(c,_,T,M,k,b,A,y,f,p,x){var N=[];A.title.text&&N.push(A.title.text);var D=_.selectAll("text."+x).data(N),B=p.maxExtent;D.enter().append("text").classed(x,!0),D.each(function(){var U=t(T,y,f,k,b);["start","both"].indexOf(A.showticklabels)===-1&&(B=0);var V=A.title.font.size;B+=V+A.title.offset;var q=p.angle+(p.flip<0?180:0),z=(q-U.angle+450)%360,H=z>90&&z<270,G=v.select(this);G.text(A.title.text).call(r.convertToTspans,c),H&&(B=(-r.lineCount(G)+m)*g*V-B),G.attr("transform",i(U.p[0],U.p[1])+l(U.angle)+i(0,B)).attr("text-anchor","middle").call(w.font,A.title.font)}),D.exit().remove()}}}),Dre=Ne({"src/traces/carpet/cheater_basis.js"(te,Z){var v=In().isArrayOrTypedArray;Z.exports=function(w,C,P){var t,r,a,l,i,s,o=[],u=v(w)?w.length:w,d=v(C)?C.length:C,h=v(w)?w:null,g=v(C)?C:null;h&&(a=(h.length-1)/(h[h.length-1]-h[0])/(u-1)),g&&(l=(g.length-1)/(g[g.length-1]-g[0])/(d-1));var m,E=1/0,c=-1/0;for(r=0;r<d;r++)for(o[r]=[],s=g?(g[r]-g[0])*l:r/(d-1),t=0;t<u;t++)i=h?(h[t]-h[0])*a:t/(u-1),m=i-s*P,E=Math.min(m,E),c=Math.max(m,c),o[r][t]=m;var _=1/(c-E),T=-E*_;for(r=0;r<d;r++)for(t=0;t<u;t++)o[r][t]=_*o[r][t]+T;return o}}}),Ore=Ne({"src/traces/carpet/array_minmax.js"(te,Z){var v=In().isArrayOrTypedArray;Z.exports=function(C){return w(C,0)};function w(C,P){if(!v(C)||P>=10)return null;for(var t=1/0,r=-1/0,a=C.length,l=0;l<a;l++){var i=C[l];if(v(i)){var s=w(i,P+1);s&&(t=Math.min(s[0],t),r=Math.max(s[1],r))}else t=Math.min(i,t),r=Math.max(i,r)}return[t,r]}}}),zre=Ne({"src/traces/carpet/calc_gridlines.js"(te,Z){var v=Os(),w=fi().extendFlat;Z.exports=function(P,t,r){var a,l,i,s,o,u,d,h,g,m,E,c,_,T,M=P["_"+t],k=P[t+"axis"],b=k._gridlines=[],A=k._minorgridlines=[],y=k._boundarylines=[],f=P["_"+r],p=P[r+"axis"];k.tickmode==="array"&&(k.tickvals=M.slice());var x=P._xctrl,N=P._yctrl,D=x[0].length,B=x.length,U=P._a.length,V=P._b.length;v.prepTicks(k),k.tickmode==="array"&&delete k.tickvals;var q=k.smoothing?3:1;function z(G){var J,le,ge,de,me,W,ie,se,ee,pe,oe,Y,ce=[],ue=[],_e={};if(t==="b")for(le=P.b2j(G),ge=Math.floor(Math.max(0,Math.min(V-2,le))),de=le-ge,_e.length=V,_e.crossLength=U,_e.xy=function(Le){return P.evalxy([],Le,le)},_e.dxy=function(Le,ze){return P.dxydi([],Le,ge,ze,de)},J=0;J<U;J++)W=Math.min(U-2,J),ie=J-W,se=P.evalxy([],J,le),p.smoothing&&J>0&&(ee=P.dxydi([],J-1,ge,0,de),ce.push(me[0]+ee[0]/3),ue.push(me[1]+ee[1]/3),pe=P.dxydi([],J-1,ge,1,de),ce.push(se[0]-pe[0]/3),ue.push(se[1]-pe[1]/3)),ce.push(se[0]),ue.push(se[1]),me=se;else for(J=P.a2i(G),W=Math.floor(Math.max(0,Math.min(U-2,J))),ie=J-W,_e.length=U,_e.crossLength=V,_e.xy=function(Le){return P.evalxy([],J,Le)},_e.dxy=function(Le,ze){return P.dxydj([],W,Le,ie,ze)},le=0;le<V;le++)ge=Math.min(V-2,le),de=le-ge,se=P.evalxy([],J,le),p.smoothing&&le>0&&(oe=P.dxydj([],W,le-1,ie,0),ce.push(me[0]+oe[0]/3),ue.push(me[1]+oe[1]/3),Y=P.dxydj([],W,le-1,ie,1),ce.push(se[0]-Y[0]/3),ue.push(se[1]-Y[1]/3)),ce.push(se[0]),ue.push(se[1]),me=se;return _e.axisLetter=t,_e.axis=k,_e.crossAxis=p,_e.value=G,_e.constvar=r,_e.index=h,_e.x=ce,_e.y=ue,_e.smoothing=p.smoothing,_e}function H(G){var J,le,ge,de,me,W=[],ie=[],se={};if(se.length=M.length,se.crossLength=f.length,t==="b")for(ge=Math.max(0,Math.min(V-2,G)),me=Math.min(1,Math.max(0,G-ge)),se.xy=function(ee){return P.evalxy([],ee,G)},se.dxy=function(ee,pe){return P.dxydi([],ee,ge,pe,me)},J=0;J<D;J++)W[J]=x[G*q][J],ie[J]=N[G*q][J];else for(le=Math.max(0,Math.min(U-2,G)),de=Math.min(1,Math.max(0,G-le)),se.xy=function(ee){return P.evalxy([],G,ee)},se.dxy=function(ee,pe){return P.dxydj([],le,ee,de,pe)},J=0;J<B;J++)W[J]=x[J][G*q],ie[J]=N[J][G*q];return se.axisLetter=t,se.axis=k,se.crossAxis=p,se.value=M[G],se.constvar=r,se.index=G,se.x=W,se.y=ie,se.smoothing=p.smoothing,se}if(k.tickmode==="array"){for(s=5e-15,o=[Math.floor((M.length-1-k.arraytick0)/k.arraydtick*(1+s)),Math.ceil(-k.arraytick0/k.arraydtick/(1+s))].sort(function(G,J){return G-J}),u=o[0]-1,d=o[1]+1,h=u;h<d;h++)l=k.arraytick0+k.arraydtick*h,!(l<0||l>M.length-1)&&b.push(w(H(l),{color:k.gridcolor,width:k.gridwidth,dash:k.griddash}));for(h=u;h<d;h++)if(i=k.arraytick0+k.arraydtick*h,E=Math.min(i+k.arraydtick,M.length-1),!(i<0||i>M.length-1)&&!(E<0||E>M.length-1))for(c=M[i],_=M[E],a=0;a<k.minorgridcount;a++)T=E-i,!(T<=0)&&(m=c+(_-c)*(a+1)/(k.minorgridcount+1)*(k.arraydtick/T),!(m<M[0]||m>M[M.length-1])&&A.push(w(z(m),{color:k.minorgridcolor,width:k.minorgridwidth,dash:k.minorgriddash})));k.startline&&y.push(w(H(0),{color:k.startlinecolor,width:k.startlinewidth})),k.endline&&y.push(w(H(M.length-1),{color:k.endlinecolor,width:k.endlinewidth}))}else{for(s=5e-15,o=[Math.floor((M[M.length-1]-k.tick0)/k.dtick*(1+s)),Math.ceil((M[0]-k.tick0)/k.dtick/(1+s))].sort(function(G,J){return G-J}),u=o[0],d=o[1],h=u;h<=d;h++)g=k.tick0+k.dtick*h,b.push(w(z(g),{color:k.gridcolor,width:k.gridwidth,dash:k.griddash}));for(h=u-1;h<d+1;h++)for(g=k.tick0+k.dtick*h,a=0;a<k.minorgridcount;a++)m=g+k.dtick*(a+1)/(k.minorgridcount+1),!(m<M[0]||m>M[M.length-1])&&A.push(w(z(m),{color:k.minorgridcolor,width:k.minorgridwidth,dash:k.minorgriddash}));k.startline&&y.push(w(z(M[0]),{color:k.startlinecolor,width:k.startlinewidth})),k.endline&&y.push(w(z(M[M.length-1]),{color:k.endlinecolor,width:k.endlinewidth}))}}}}),Nre=Ne({"src/traces/carpet/calc_labels.js"(te,Z){var v=Os(),w=fi().extendFlat;Z.exports=function(P,t){var r,a,l,i,s,o=t._labels=[],u=t._gridlines;for(r=0;r<u.length;r++)s=u[r],["start","both"].indexOf(t.showticklabels)!==-1&&(a=v.tickText(t,s.value),w(a,{prefix:l,suffix:i,endAnchor:!0,xy:s.xy(0),dxy:s.dxy(0,0),axis:s.axis,length:s.crossAxis.length,font:s.axis.tickfont,isFirst:r===0,isLast:r===u.length-1}),o.push(a)),["end","both"].indexOf(t.showticklabels)!==-1&&(a=v.tickText(t,s.value),w(a,{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:r===0,isLast:r===u.length-1}),o.push(a))}}}),Fre=Ne({"src/traces/carpet/calc_clippath.js"(te,Z){Z.exports=function(w,C,P,t){var r,a,l,i=[],s=!!P.smoothing,o=!!t.smoothing,u=w[0].length-1,d=w.length-1;for(r=0,a=[],l=[];r<=u;r++)a[r]=w[0][r],l[r]=C[0][r];for(i.push({x:a,y:l,bicubic:s}),r=0,a=[],l=[];r<=d;r++)a[r]=w[r][u],l[r]=C[r][u];for(i.push({x:a,y:l,bicubic:o}),r=u,a=[],l=[];r>=0;r--)a[u-r]=w[d][r],l[u-r]=C[d][r];for(i.push({x:a,y:l,bicubic:s}),r=d,a=[],l=[];r>=0;r--)a[d-r]=w[r][0],l[d-r]=C[r][0];return i.push({x:a,y:l,bicubic:o}),i}}}),Bre=Ne({"src/traces/carpet/smooth_fill_2d_array.js"(te,Z){var v=In();Z.exports=function(C,P,t){var r,a,l,i=[],s=[],o=C[0].length,u=C.length;function d(le,ge){var de=0,me,W=0;return le>0&&(me=C[ge][le-1])!==void 0&&(W++,de+=me),le<o-1&&(me=C[ge][le+1])!==void 0&&(W++,de+=me),ge>0&&(me=C[ge-1][le])!==void 0&&(W++,de+=me),ge<u-1&&(me=C[ge+1][le])!==void 0&&(W++,de+=me),de/Math.max(1,W)}var h=0;for(r=0;r<o;r++)for(a=0;a<u;a++)C[a][r]===void 0&&(i.push(r),s.push(a),C[a][r]=d(r,a)),h=Math.max(h,Math.abs(C[a][r]));if(!i.length)return C;var g,m,E,c,_,T,M,k,b,A,y,f=1e-5,p=0,x=100,N=0,D=i.length;do{for(p=0,l=0;l<D;l++){r=i[l],a=s[l];var B=0,U=0,V,q,z,H,G,J;r===0?(G=Math.min(o-1,2),z=P[G],H=P[1],V=C[a][G],q=C[a][1],U+=q+(q-V)*(P[0]-H)/(H-z),B++):r===o-1&&(G=Math.max(0,o-3),z=P[G],H=P[o-2],V=C[a][G],q=C[a][o-2],U+=q+(q-V)*(P[o-1]-H)/(H-z),B++),(r===0||r===o-1)&&a>0&&a<u-1&&(g=t[a+1]-t[a],m=t[a]-t[a-1],U+=(m*C[a+1][r]+g*C[a-1][r])/(m+g),B++),a===0?(J=Math.min(u-1,2),z=t[J],H=t[1],V=C[J][r],q=C[1][r],U+=q+(q-V)*(t[0]-H)/(H-z),B++):a===u-1&&(J=Math.max(0,u-3),z=t[J],H=t[u-2],V=C[J][r],q=C[u-2][r],U+=q+(q-V)*(t[u-1]-H)/(H-z),B++),(a===0||a===u-1)&&r>0&&r<o-1&&(g=P[r+1]-P[r],m=P[r]-P[r-1],U+=(m*C[a][r+1]+g*C[a][r-1])/(m+g),B++),B?U/=B:(E=P[r+1]-P[r],c=P[r]-P[r-1],_=t[a+1]-t[a],T=t[a]-t[a-1],M=E*c*(E+c),k=_*T*(_+T),U=(M*(T*C[a+1][r]+_*C[a-1][r])+k*(c*C[a][r+1]+E*C[a][r-1]))/(k*(c+E)+M*(T+_))),b=U-C[a][r],A=b/h,p+=A*A,y=B?0:.85,C[a][r]+=b*(1+y)}p=Math.sqrt(p)}while(N++<x&&p>f);return v.log("Smoother converged to",p,"after",N,"iterations"),C}}}),jre=Ne({"src/traces/carpet/constants.js"(te,Z){Z.exports={RELATIVE_CULL_TOLERANCE:1e-6}}}),Ure=Ne({"src/traces/carpet/catmull_rom.js"(te,Z){var v=.5;Z.exports=function(C,P,t,r){var a=C[0]-P[0],l=C[1]-P[1],i=t[0]-P[0],s=t[1]-P[1],o=Math.pow(a*a+l*l,v/2),u=Math.pow(i*i+s*s,v/2),d=(u*u*a-o*o*i)*r,h=(u*u*l-o*o*s)*r,g=u*(o+u)*3,m=o*(o+u)*3;return[[P[0]+(g&&d/g),P[1]+(g&&h/g)],[P[0]-(m&&d/m),P[1]-(m&&h/m)]]}}}),qre=Ne({"src/traces/carpet/compute_control_points.js"(te,Z){var v=Ure(),w=In().ensureArray;function C(P,t,r){var a=-.5*r[0]+1.5*t[0],l=-.5*r[1]+1.5*t[1];return[(2*a+P[0])/3,(2*l+P[1])/3]}Z.exports=function(t,r,a,l,i,s){var o,u,d,h,g,m,E,c,_,T,M=a[0].length,k=a.length,b=i?3*M-2:M,A=s?3*k-2:k;for(t=w(t,A),r=w(r,A),d=0;d<A;d++)t[d]=w(t[d],b),r[d]=w(r[d],b);for(u=0,h=0;u<k;u++,h+=s?3:1)for(g=t[h],m=r[h],E=a[u],c=l[u],o=0,d=0;o<M;o++,d+=i?3:1)g[d]=E[o],m[d]=c[o];if(i)for(u=0,h=0;u<k;u++,h+=s?3:1){for(o=1,d=3;o<M-1;o++,d+=3)_=v([a[u][o-1],l[u][o-1]],[a[u][o],l[u][o]],[a[u][o+1],l[u][o+1]],i),t[h][d-1]=_[0][0],r[h][d-1]=_[0][1],t[h][d+1]=_[1][0],r[h][d+1]=_[1][1];T=C([t[h][0],r[h][0]],[t[h][2],r[h][2]],[t[h][3],r[h][3]]),t[h][1]=T[0],r[h][1]=T[1],T=C([t[h][b-1],r[h][b-1]],[t[h][b-3],r[h][b-3]],[t[h][b-4],r[h][b-4]]),t[h][b-2]=T[0],r[h][b-2]=T[1]}if(s)for(d=0;d<b;d++){for(h=3;h<A-3;h+=3)_=v([t[h-3][d],r[h-3][d]],[t[h][d],r[h][d]],[t[h+3][d],r[h+3][d]],s),t[h-1][d]=_[0][0],r[h-1][d]=_[0][1],t[h+1][d]=_[1][0],r[h+1][d]=_[1][1];T=C([t[0][d],r[0][d]],[t[2][d],r[2][d]],[t[3][d],r[3][d]]),t[1][d]=T[0],r[1][d]=T[1],T=C([t[A-1][d],r[A-1][d]],[t[A-3][d],r[A-3][d]],[t[A-4][d],r[A-4][d]]),t[A-2][d]=T[0],r[A-2][d]=T[1]}if(i&&s)for(h=1;h<A;h+=(h+1)%3===0?2:1){for(d=3;d<b-3;d+=3)_=v([t[h][d-3],r[h][d-3]],[t[h][d],r[h][d]],[t[h][d+3],r[h][d+3]],i),t[h][d-1]=.5*(t[h][d-1]+_[0][0]),r[h][d-1]=.5*(r[h][d-1]+_[0][1]),t[h][d+1]=.5*(t[h][d+1]+_[1][0]),r[h][d+1]=.5*(r[h][d+1]+_[1][1]);T=C([t[h][0],r[h][0]],[t[h][2],r[h][2]],[t[h][3],r[h][3]]),t[h][1]=.5*(t[h][1]+T[0]),r[h][1]=.5*(r[h][1]+T[1]),T=C([t[h][b-1],r[h][b-1]],[t[h][b-3],r[h][b-3]],[t[h][b-4],r[h][b-4]]),t[h][b-2]=.5*(t[h][b-2]+T[0]),r[h][b-2]=.5*(r[h][b-2]+T[1])}return[t,r]}}}),Vre=Ne({"src/traces/carpet/create_spline_evaluator.js"(te,Z){Z.exports=function(v,w,C,P,t){var r=w-2,a=C-2;return P&&t?function(l,i,s){l||(l=[]);var o,u,d,h,g,m,E=Math.max(0,Math.min(Math.floor(i),r)),c=Math.max(0,Math.min(Math.floor(s),a)),_=Math.max(0,Math.min(1,i-E)),T=Math.max(0,Math.min(1,s-c));E*=3,c*=3;var M=_*_,k=M*_,b=1-_,A=b*b,y=A*b,f=T*T,p=f*T,x=1-T,N=x*x,D=N*x;for(m=0;m<v.length;m++)g=v[m],o=y*g[c][E]+3*(A*_*g[c][E+1]+b*M*g[c][E+2])+k*g[c][E+3],u=y*g[c+1][E]+3*(A*_*g[c+1][E+1]+b*M*g[c+1][E+2])+k*g[c+1][E+3],d=y*g[c+2][E]+3*(A*_*g[c+2][E+1]+b*M*g[c+2][E+2])+k*g[c+2][E+3],h=y*g[c+3][E]+3*(A*_*g[c+3][E+1]+b*M*g[c+3][E+2])+k*g[c+3][E+3],l[m]=D*o+3*(N*T*u+x*f*d)+p*h;return l}:P?function(l,i,s){l||(l=[]);var o=Math.max(0,Math.min(Math.floor(i),r)),u=Math.max(0,Math.min(Math.floor(s),a)),d=Math.max(0,Math.min(1,i-o)),h=Math.max(0,Math.min(1,s-u)),g,m,E,c,_,T;o*=3;var M=d*d,k=M*d,b=1-d,A=b*b,y=A*b,f=1-h;for(_=0;_<v.length;_++)T=v[_],g=f*T[u][o]+h*T[u+1][o],m=f*T[u][o+1]+h*T[u+1][o+1],E=f*T[u][o+2]+h*T[u+1][o+1],c=f*T[u][o+3]+h*T[u+1][o+1],l[_]=y*g+3*(A*d*m+b*M*E)+k*c;return l}:t?function(l,i,s){l||(l=[]);var o=Math.max(0,Math.min(Math.floor(i),r)),u=Math.max(0,Math.min(Math.floor(s),a)),d=Math.max(0,Math.min(1,i-o)),h=Math.max(0,Math.min(1,s-u)),g,m,E,c,_,T;u*=3;var M=h*h,k=M*h,b=1-h,A=b*b,y=A*b,f=1-d;for(_=0;_<v.length;_++)T=v[_],g=f*T[u][o]+d*T[u][o+1],m=f*T[u+1][o]+d*T[u+1][o+1],E=f*T[u+2][o]+d*T[u+2][o+1],c=f*T[u+3][o]+d*T[u+3][o+1],l[_]=y*g+3*(A*h*m+b*M*E)+k*c;return l}:function(l,i,s){l||(l=[]);var o=Math.max(0,Math.min(Math.floor(i),r)),u=Math.max(0,Math.min(Math.floor(s),a)),d=Math.max(0,Math.min(1,i-o)),h=Math.max(0,Math.min(1,s-u)),g,m,E,c,_=1-h,T=1-d;for(E=0;E<v.length;E++)c=v[E],g=T*c[u][o]+d*c[u][o+1],m=T*c[u+1][o]+d*c[u+1][o+1],l[E]=_*g+h*m;return l}}}}),Hre=Ne({"src/traces/carpet/create_i_derivative_evaluator.js"(te,Z){Z.exports=function(v,w,C){return w&&C?function(P,t,r,a,l){P||(P=[]);var i,s,o,u,d,h;t*=3,r*=3;var g=a*a,m=1-a,E=m*m,c=m*a*2,_=-3*E,T=3*(E-c),M=3*(c-g),k=3*g,b=l*l,A=b*l,y=1-l,f=y*y,p=f*y;for(h=0;h<v.length;h++)d=v[h],i=_*d[r][t]+T*d[r][t+1]+M*d[r][t+2]+k*d[r][t+3],s=_*d[r+1][t]+T*d[r+1][t+1]+M*d[r+1][t+2]+k*d[r+1][t+3],o=_*d[r+2][t]+T*d[r+2][t+1]+M*d[r+2][t+2]+k*d[r+2][t+3],u=_*d[r+3][t]+T*d[r+3][t+1]+M*d[r+3][t+2]+k*d[r+3][t+3],P[h]=p*i+3*(f*l*s+y*b*o)+A*u;return P}:w?function(P,t,r,a,l){P||(P=[]);var i,s,o,u;t*=3;var d=a*a,h=1-a,g=h*h,m=h*a*2,E=-3*g,c=3*(g-m),_=3*(m-d),T=3*d,M=1-l;for(o=0;o<v.length;o++)u=v[o],i=E*u[r][t]+c*u[r][t+1]+_*u[r][t+2]+T*u[r][t+3],s=E*u[r+1][t]+c*u[r+1][t+1]+_*u[r+1][t+2]+T*u[r+1][t+3],P[o]=M*i+l*s;return P}:C?function(P,t,r,a,l){P||(P=[]);var i,s,o,u,d,h;r*=3;var g=l*l,m=g*l,E=1-l,c=E*E,_=c*E;for(d=0;d<v.length;d++)h=v[d],i=h[r][t+1]-h[r][t],s=h[r+1][t+1]-h[r+1][t],o=h[r+2][t+1]-h[r+2][t],u=h[r+3][t+1]-h[r+3][t],P[d]=_*i+3*(c*l*s+E*g*o)+m*u;return P}:function(P,t,r,a,l){P||(P=[]);var i,s,o,u,d=1-l;for(o=0;o<v.length;o++)u=v[o],i=u[r][t+1]-u[r][t],s=u[r+1][t+1]-u[r+1][t],P[o]=d*i+l*s;return P}}}}),Gre=Ne({"src/traces/carpet/create_j_derivative_evaluator.js"(te,Z){Z.exports=function(v,w,C){return w&&C?function(P,t,r,a,l){P||(P=[]);var i,s,o,u,d,h;t*=3,r*=3;var g=a*a,m=g*a,E=1-a,c=E*E,_=c*E,T=l*l,M=1-l,k=M*M,b=M*l*2,A=-3*k,y=3*(k-b),f=3*(b-T),p=3*T;for(h=0;h<v.length;h++)d=v[h],i=A*d[r][t]+y*d[r+1][t]+f*d[r+2][t]+p*d[r+3][t],s=A*d[r][t+1]+y*d[r+1][t+1]+f*d[r+2][t+1]+p*d[r+3][t+1],o=A*d[r][t+2]+y*d[r+1][t+2]+f*d[r+2][t+2]+p*d[r+3][t+2],u=A*d[r][t+3]+y*d[r+1][t+3]+f*d[r+2][t+3]+p*d[r+3][t+3],P[h]=_*i+3*(c*a*s+E*g*o)+m*u;return P}:w?function(P,t,r,a,l){P||(P=[]);var i,s,o,u,d,h;t*=3;var g=l*l,m=g*l,E=1-l,c=E*E,_=c*E;for(d=0;d<v.length;d++)h=v[d],i=h[r+1][t]-h[r][t],s=h[r+1][t+1]-h[r][t+1],o=h[r+1][t+2]-h[r][t+2],u=h[r+1][t+3]-h[r][t+3],P[d]=_*i+3*(c*l*s+E*g*o)+m*u;return P}:C?function(P,t,r,a,l){P||(P=[]);var i,s,o,u;r*=3;var d=1-a,h=l*l,g=1-l,m=g*g,E=g*l*2,c=-3*m,_=3*(m-E),T=3*(E-h),M=3*h;for(o=0;o<v.length;o++)u=v[o],i=c*u[r][t]+_*u[r+1][t]+T*u[r+2][t]+M*u[r+3][t],s=c*u[r][t+1]+_*u[r+1][t+1]+T*u[r+2][t+1]+M*u[r+3][t+1],P[o]=d*i+a*s;return P}:function(P,t,r,a,l){P||(P=[]);var i,s,o,u,d=1-a;for(o=0;o<v.length;o++)u=v[o],i=u[r+1][t]-u[r][t],s=u[r+1][t+1]-u[r][t+1],P[o]=d*i+a*s;return P}}}}),Xre=Ne({"src/traces/carpet/set_convert.js"(te,Z){var v=jre(),w=_g().findBin,C=qre(),P=Vre(),t=Hre(),r=Gre();Z.exports=function(l){var i=l._a,s=l._b,o=i.length,u=s.length,d=l.aaxis,h=l.baxis,g=i[0],m=i[o-1],E=s[0],c=s[u-1],_=i[i.length-1]-i[0],T=s[s.length-1]-s[0],M=_*v.RELATIVE_CULL_TOLERANCE,k=T*v.RELATIVE_CULL_TOLERANCE;g-=M,m+=M,E-=k,c+=k,l.isVisible=function(b,A){return b>g&&b<m&&A>E&&A<c},l.isOccluded=function(b,A){return b<g||b>m||A<E||A>c},l.setScale=function(){var b=l._x,A=l._y,y=C(l._xctrl,l._yctrl,b,A,d.smoothing,h.smoothing);l._xctrl=y[0],l._yctrl=y[1],l.evalxy=P([l._xctrl,l._yctrl],o,u,d.smoothing,h.smoothing),l.dxydi=t([l._xctrl,l._yctrl],d.smoothing,h.smoothing),l.dxydj=r([l._xctrl,l._yctrl],d.smoothing,h.smoothing)},l.i2a=function(b){var A=Math.max(0,Math.floor(b[0]),o-2),y=b[0]-A;return(1-y)*i[A]+y*i[A+1]},l.j2b=function(b){var A=Math.max(0,Math.floor(b[1]),o-2),y=b[1]-A;return(1-y)*s[A]+y*s[A+1]},l.ij2ab=function(b){return[l.i2a(b[0]),l.j2b(b[1])]},l.a2i=function(b){var A=Math.max(0,Math.min(w(b,i),o-2)),y=i[A],f=i[A+1];return Math.max(0,Math.min(o-1,A+(b-y)/(f-y)))},l.b2j=function(b){var A=Math.max(0,Math.min(w(b,s),u-2)),y=s[A],f=s[A+1];return Math.max(0,Math.min(u-1,A+(b-y)/(f-y)))},l.ab2ij=function(b){return[l.a2i(b[0]),l.b2j(b[1])]},l.i2c=function(b,A){return l.evalxy([],b,A)},l.ab2xy=function(b,A,y){if(!y&&(b<i[0]||b>i[o-1]|A<s[0]||A>s[u-1]))return[!1,!1];var f=l.a2i(b),p=l.b2j(A),x=l.evalxy([],f,p);if(y){var N=0,D=0,B=[],U,V,q,z;b<i[0]?(U=0,V=0,N=(b-i[0])/(i[1]-i[0])):b>i[o-1]?(U=o-2,V=1,N=(b-i[o-1])/(i[o-1]-i[o-2])):(U=Math.max(0,Math.min(o-2,Math.floor(f))),V=f-U),A<s[0]?(q=0,z=0,D=(A-s[0])/(s[1]-s[0])):A>s[u-1]?(q=u-2,z=1,D=(A-s[u-1])/(s[u-1]-s[u-2])):(q=Math.max(0,Math.min(u-2,Math.floor(p))),z=p-q),N&&(l.dxydi(B,U,q,V,z),x[0]+=B[0]*N,x[1]+=B[1]*N),D&&(l.dxydj(B,U,q,V,z),x[0]+=B[0]*D,x[1]+=B[1]*D)}return x},l.c2p=function(b,A,y){return[A.c2p(b[0]),y.c2p(b[1])]},l.p2x=function(b,A,y){return[A.p2c(b[0]),y.p2c(b[1])]},l.dadi=function(b){var A=Math.max(0,Math.min(i.length-2,b));return i[A+1]-i[A]},l.dbdj=function(b){var A=Math.max(0,Math.min(s.length-2,b));return s[A+1]-s[A]},l.dxyda=function(b,A,y,f){var p=l.dxydi(null,b,A,y,f),x=l.dadi(b,y);return[p[0]/x,p[1]/x]},l.dxydb=function(b,A,y,f){var p=l.dxydj(null,b,A,y,f),x=l.dbdj(A,f);return[p[0]/x,p[1]/x]},l.dxyda_rough=function(b,A,y){var f=_*(y||.1),p=l.ab2xy(b+f,A,!0),x=l.ab2xy(b-f,A,!0);return[(p[0]-x[0])*.5/f,(p[1]-x[1])*.5/f]},l.dxydb_rough=function(b,A,y){var f=T*(y||.1),p=l.ab2xy(b,A+f,!0),x=l.ab2xy(b,A-f,!0);return[(p[0]-x[0])*.5/f,(p[1]-x[1])*.5/f]},l.dpdx=function(b){return b._m},l.dpdy=function(b){return b._m}}}}),Wre=Ne({"src/traces/carpet/calc.js"(te,Z){var v=Os(),w=In().isArray1D,C=Dre(),P=Ore(),t=zre(),r=Nre(),a=Fre(),l=s2(),i=Bre(),s=o2(),o=Xre();Z.exports=function(d,h){var g=v.getFromId(d,h.xaxis),m=v.getFromId(d,h.yaxis),E=h.aaxis,c=h.baxis,_=h.x,T=h.y,M=[];_&&w(_)&&M.push("x"),T&&w(T)&&M.push("y"),M.length&&s(h,E,c,"a","b",M);var k=h._a=h._a||h.a,b=h._b=h._b||h.b;_=h._x||h.x,T=h._y||h.y;var A={};if(h._cheater){var y=E.cheatertype==="index"?k.length:k,f=c.cheatertype==="index"?b.length:b;_=C(y,f,h.cheaterslope)}h._x=_=l(_),h._y=T=l(T),i(_,k,b),i(T,k,b),o(h),h.setScale();var p=P(_),x=P(T),N=.5*(p[1]-p[0]),D=.5*(p[1]+p[0]),B=.5*(x[1]-x[0]),U=.5*(x[1]+x[0]),V=1.3;return p=[D-N*V,D+N*V],x=[U-B*V,U+B*V],h._extremes[g._id]=v.findExtremes(g,p,{padded:!0}),h._extremes[m._id]=v.findExtremes(m,x,{padded:!0}),t(h,"a","b"),t(h,"b","a"),r(h,E),r(h,c),A.clipsegments=a(h._xctrl,h._yctrl,E,c),A.x=_,A.y=T,A.a=k,A.b=b,[A]}}}),Yre=Ne({"src/traces/carpet/index.js"(te,Z){Z.exports={attributes:YR(),supplyDefaults:Lre(),plot:Ire(),calc:Wre(),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:Ih(),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}}}),Zre=Ne({"lib/carpet.js"(te,Z){Z.exports=Yre()}}),PF=Ne({"src/traces/scattercarpet/attributes.js"(te,Z){var v=qv(),w=tf(),C=qo(),{hovertemplateAttrs:P,texttemplateAttrs:t,templatefallbackAttrs:r}=Fl(),a=Wu(),l=fi().extendFlat,i=w.marker,s=w.line,o=i.line;Z.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:l({},w.mode,{dflt:"markers"}),text:l({},w.text,{}),texttemplate:t({editType:"plot"},{keys:["a","b","text"]}),texttemplatefallback:r({editType:"plot"}),hovertext:l({},w.hovertext,{}),line:{color:s.color,width:s.width,dash:s.dash,backoff:s.backoff,shape:l({},s.shape,{values:["linear","spline"]}),smoothing:s.smoothing,editType:"calc"},connectgaps:w.connectgaps,fill:l({},w.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:v(),marker:l({symbol:i.symbol,opacity:i.opacity,maxdisplayed:i.maxdisplayed,angle:i.angle,angleref:i.angleref,standoff:i.standoff,size:i.size,sizeref:i.sizeref,sizemin:i.sizemin,sizemode:i.sizemode,line:l({width:o.width,editType:"calc"},a("marker.line")),gradient:i.gradient,editType:"calc"},a("marker")),textfont:w.textfont,textposition:w.textposition,selected:w.selected,unselected:w.unselected,hoverinfo:l({},C.hoverinfo,{flags:["a","b","text","name"]}),hoveron:w.hoveron,hovertemplate:P(),hovertemplatefallback:r(),zorder:w.zorder}}}),$re=Ne({"src/traces/scattercarpet/defaults.js"(te,Z){var v=In(),w=i0(),C=yu(),P=wv(),t=Im(),r=Tv(),a=Wp(),l=uv(),i=PF();Z.exports=function(o,u,d,h){function g(k,b){return v.coerce(o,u,i,k,b)}g("carpet"),u.xaxis="x",u.yaxis="y";var m=g("a"),E=g("b"),c=Math.min(m.length,E.length);if(!c){u.visible=!1;return}u._length=c,g("text"),g("texttemplate"),g("texttemplatefallback"),g("hovertext");var _=c<w.PTS_LINESONLY?"lines+markers":"lines";g("mode",_),C.hasMarkers(u)&&P(o,u,d,h,g,{gradient:!0}),C.hasLines(u)&&(t(o,u,d,h,g,{backoff:!0}),r(o,u,g),g("connectgaps")),C.hasText(u)&&a(o,u,h,g);var T=[];(C.hasMarkers(u)||C.hasText(u))&&(g("marker.maxdisplayed"),T.push("points")),g("fill"),u.fill!=="none"&&(l(o,u,d,g),C.hasLines(u)||r(o,u,g)),(u.fill==="tonext"||u.fill==="toself")&&T.push("fills");var M=g("hoveron",T.join("+")||"points");M!=="fills"&&(g("hovertemplate"),g("hovertemplatefallback")),g("zorder"),v.coerceSelectionMarkerOpacity(u,g)}}}),Kre=Ne({"src/traces/scattercarpet/format_labels.js"(te,Z){Z.exports=function(w,C){var P={},t=C._carpet,r=t.ab2ij([w.a,w.b]),a=Math.floor(r[0]),l=r[0]-a,i=Math.floor(r[1]),s=r[1]-i,o=t.evalxy([],a,i,l,s);return P.yLabel=o[1].toFixed(3),P}}}),ZR=Ne({"src/traces/carpet/lookup_carpetid.js"(te,Z){Z.exports=function(v,w){for(var C=v._fullData.length,P,t=0;t<C;t++){var r=v._fullData[t];if(r.index!==w.index&&r.type==="carpet"&&(P||(P=r),r.carpet===w.carpet))return r}return P}}}),Jre=Ne({"src/traces/scattercarpet/calc.js"(te,Z){var v=Fn(),w=Yp(),C=s0(),P=Gh(),t=Vv().calcMarkerSize,r=ZR();Z.exports=function(l,i){var s=i._carpetTrace=r(l,i);if(!(!s||!s.visible||s.visible==="legendonly")){var o;i.xaxis=s.xaxis,i.yaxis=s.yaxis;var u=i._length,d=new Array(u),h,g,m=!1;for(o=0;o<u;o++)if(h=i.a[o],g=i.b[o],v(h)&&v(g)){var E=s.ab2xy(+h,+g,!0),c=s.isVisible(+h,+g);c||(m=!0),d[o]={x:E[0],y:E[1],a:h,b:g,vis:c}}else d[o]={x:!1,y:!1};return i._needsCull=m,d[0].carpet=s,d[0].trace=i,t(i,u),w(l,i),C(d,i),P(d,i),d}}}}),Qre=Ne({"src/traces/scattercarpet/plot.js"(te,Z){var v=sm(),w=Os(),C=zs();Z.exports=function(t,r,a,l){var i,s,o,u=a[0][0].carpet,d=w.getFromId(t,u.xaxis||"x"),h=w.getFromId(t,u.yaxis||"y"),g={xaxis:d,yaxis:h,plot:r.plot};for(i=0;i<a.length;i++)s=a[i][0].trace,s._xA=d,s._yA=h;for(v(t,g,a,l),i=0;i<a.length;i++)s=a[i][0].trace,o=l.selectAll("g.trace"+s.uid+" .js-line"),C.setClipUrl(o,a[i][0].carpet._clipPathId,t)}}}),ene=Ne({"src/traces/scattercarpet/hover.js"(te,Z){var v=ky(),w=In().fillText;Z.exports=function(P,t,r,a){var l=v(P,t,r,a);if(!l||l[0].index===!1)return;var i=l[0];if(i.index===void 0){var s=1-i.y0/P.ya._length,o=P.xa._length,u=o*s/2,d=o-u;return i.x0=Math.max(Math.min(i.x0,d),u),i.x1=Math.max(Math.min(i.x1,d),u),l}var h=i.cd[i.index];i.a=h.a,i.b=h.b,i.xLabelVal=void 0,i.yLabelVal=void 0;var g=i.trace,m=g._carpet,E=g._module.formatLabels(h,g);i.yLabel=E.yLabel,delete i.text;var c=[];function _(k,b){var A;k.labelprefix&&k.labelprefix.length>0?A=k.labelprefix.replace(/ = $/,""):A=k._hovertitle,c.push(A+": "+b.toFixed(3)+k.labelsuffix)}if(!g.hovertemplate){var T=h.hi||g.hoverinfo,M=T.split("+");M.indexOf("all")!==-1&&(M=["a","b","text"]),M.indexOf("a")!==-1&&_(m.aaxis,h.a),M.indexOf("b")!==-1&&_(m.baxis,h.b),c.push("y: "+i.yLabel),M.indexOf("text")!==-1&&w(h,g,c),i.extraText=c.join("<br>")}return l}}}),tne=Ne({"src/traces/scattercarpet/event_data.js"(te,Z){Z.exports=function(w,C,P,t,r){var a=t[r];return w.a=a.a,w.b=a.b,w.y=a.y,w}}}),rne=Ne({"src/traces/scattercarpet/index.js"(te,Z){Z.exports={attributes:PF(),supplyDefaults:$re(),colorbar:sh(),formatLabels:Kre(),calc:Jre(),plot:Qre(),style:Xh().style,styleOnSelect:Xh().styleOnSelect,hoverPoints:ene(),selectPoints:Py(),eventData:tne(),moduleType:"trace",name:"scattercarpet",basePlotModule:Ih(),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}}}),nne=Ne({"lib/scattercarpet.js"(te,Z){Z.exports=rne()}}),LF=Ne({"src/traces/contourcarpet/attributes.js"(te,Z){var v=Vd(),w=Xx(),C=Wu(),P=fi().extendFlat,t=w.contours;Z.exports=P({carpet:{valType:"string",editType:"calc"},z:v.z,a:v.x,a0:v.x0,da:v.dx,b:v.y,b0:v.y0,db:v.dy,text:v.text,hovertext:v.hovertext,transpose:v.transpose,atype:v.xtype,btype:v.ytype,fillcolor:w.fillcolor,autocontour:w.autocontour,ncontours:w.ncontours,contours:{type:t.type,start:t.start,end:t.end,size:t.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:t.showlines,showlabels:t.showlabels,labelfont:t.labelfont,labelformat:t.labelformat,operation:t.operation,value:t.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:w.line.color,width:w.line.width,dash:w.line.dash,smoothing:w.line.smoothing,editType:"plot"},zorder:w.zorder},C("",{cLetter:"z",autoColorDflt:!1}))}}),RF=Ne({"src/traces/contourcarpet/defaults.js"(te,Z){var v=In(),w=Oh(),C=LF(),P=XA(),t=b2(),r=Wx();Z.exports=function(l,i,s,o){function u(m,E){return v.coerce(l,i,C,m,E)}function d(m){return v.coerce2(l,i,C,m)}if(u("carpet"),l.a&&l.b){var h=w(l,i,u,o,"a","b");if(!h){i.visible=!1;return}u("text");var g=u("contours.type")==="constraint";g?P(l,i,u,o,s,{hasHover:!1}):(t(l,i,u,d),r(l,i,u,o,{hasHover:!1}))}else i._defaultColor=s,i._length=null;u("zorder")}}}),ane=Ne({"src/traces/contourcarpet/calc.js"(te,Z){var v=Ud(),w=In(),C=o2(),P=s2(),t=l2(),r=u2(),a=FA(),l=RF(),i=ZR(),s=qA();Z.exports=function(d,h){var g=h._carpetTrace=i(d,h);if(!(!g||!g.visible||g.visible==="legendonly")){if(!h.a||!h.b){var m=d.data[g.index],E=d.data[h.index];E.a||(E.a=m.a),E.b||(E.b=m.b),l(E,h,h._defaultColor,d._fullLayout)}var c=o(d,h);return s(h,h._z),c}};function o(u,d){var h=d._carpetTrace,g=h.aaxis,m=h.baxis,E,c,_,T,M,k,b;g._minDtick=0,m._minDtick=0,w.isArray1D(d.z)&&C(d,g,m,"a","b",["z"]),E=d._a=d._a||d.a,T=d._b=d._b||d.b,E=E?g.makeCalcdata(d,"_a"):[],T=T?m.makeCalcdata(d,"_b"):[],c=d.a0||0,_=d.da||1,M=d.b0||0,k=d.db||1,b=d._z=P(d._z||d.z,d.transpose),d._emptypoints=r(b),t(b,d._emptypoints);var A=w.maxRowLength(b),y=d.xtype==="scaled"?"":E,f=a(d,y,c,_,A,g),p=d.ytype==="scaled"?"":T,x=a(d,p,M,k,b.length,m),N={a:f,b:x,z:b};return d.contours.type==="levels"&&d.contours.coloring!=="none"&&v(u,d,{vals:b,containerStr:"",cLetter:"z"}),[N]}}}),ine=Ne({"src/traces/carpet/axis_aligned_line.js"(te,Z){var v=In().isArrayOrTypedArray;Z.exports=function(w,C,P,t){var r,a,l,i,s,o,u,d,h,g,m,E,c,_=v(P)?"a":"b",T=_==="a"?w.aaxis:w.baxis,M=T.smoothing,k=_==="a"?w.a2i:w.b2j,b=_==="a"?P:t,A=_==="a"?t:P,y=_==="a"?C.a.length:C.b.length,f=_==="a"?C.b.length:C.a.length,p=Math.floor(_==="a"?w.b2j(A):w.a2i(A)),x=_==="a"?function(ge){return w.evalxy([],ge,p)}:function(ge){return w.evalxy([],p,ge)};M&&(l=Math.max(0,Math.min(f-2,p)),i=p-l,a=_==="a"?function(ge,de){return w.dxydi([],ge,l,de,i)}:function(ge,de){return w.dxydj([],l,ge,i,de)});var N=k(b[0]),D=k(b[1]),B=N<D?1:-1,U=(D-N)*1e-8,V=B>0?Math.floor:Math.ceil,q=B>0?Math.ceil:Math.floor,z=B>0?Math.min:Math.max,H=B>0?Math.max:Math.min,G=V(N+U),J=q(D-U);u=x(N);var le=[[u]];for(r=G;r*B<J*B;r+=B)s=[],m=H(N,r),E=z(D,r+B),c=E-m,o=Math.max(0,Math.min(y-2,Math.floor(.5*(m+E)))),d=x(E),M&&(h=a(o,m-o),g=a(o,E-o),s.push([u[0]+h[0]/3*c,u[1]+h[1]/3*c]),s.push([d[0]-g[0]/3*c,d[1]-g[1]/3*c])),s.push(d),le.push(s),u=d;return le}}}),one=Ne({"src/traces/contourcarpet/plot.js"(te,Z){var v=xn(),w=CF(),C=kF(),P=zs(),t=In(),r=VA(),a=A2(),l=S2(),i=Yx(),s=WM(),o=HA(),u=YM(),d=ZR(),h=ine();Z.exports=function(y,f,p,x){var N=f.xaxis,D=f.yaxis;t.makeTraceGroups(x,p,"contour").each(function(B){var U=v.select(this),V=B[0],q=V.trace,z=q._carpetTrace=d(y,q),H=y.calcdata[z.index][0];if(!z.visible||z.visible==="legendonly")return;var G=V.a,J=V.b,le=q.contours,ge=o(le,f,V),de=le.type==="constraint",me=le._operation,W=de?me==="="?"lines":"fill":le.coloring;function ie(Xe){var Ve=z.ab2xy(Xe[0],Xe[1],!0);return[N.c2p(Ve[0]),D.c2p(Ve[1])]}var se=[[G[0],J[J.length-1]],[G[G.length-1],J[J.length-1]],[G[G.length-1],J[0]],[G[0],J[0]]];r(ge);var ee=(G[G.length-1]-G[0])*1e-8,pe=(J[J.length-1]-J[0])*1e-8;a(ge,ee,pe);var oe=ge;le.type==="constraint"&&(oe=s(ge,me)),g(ge,ie);var Y,ce,ue,_e,Le=[];for(_e=H.clipsegments.length-1;_e>=0;_e--)Y=H.clipsegments[_e],ce=w([],Y.x,N.c2p),ue=w([],Y.y,D.c2p),ce.reverse(),ue.reverse(),Le.push(C(ce,ue,Y.bicubic));var ze="M"+Le.join("L")+"Z";M(U,H.clipsegments,N,D,de,W),k(q,U,N,D,oe,se,ie,z,H,W,ze),m(U,ge,y,V,le,f,z),P.setClipUrl(U,z._clipPathId,y)})};function g(A,y){var f,p,x,N,D,B,U,V,q;for(f=0;f<A.length;f++){for(N=A[f],D=N.pedgepaths=[],B=N.ppaths=[],p=0;p<N.edgepaths.length;p++){for(q=N.edgepaths[p],U=[],x=0;x<q.length;x++)U[x]=y(q[x]);D.push(U)}for(p=0;p<N.paths.length;p++){for(q=N.paths[p],V=[],x=0;x<q.length;x++)V[x]=y(q[x]);B.push(V)}}}function m(A,y,f,p,x,N,D){var B=f._context.staticPlot,U=t.ensureSingle(A,"g","contourlines"),V=x.showlines!==!1,q=x.showlabels,z=V&&q,H=l.createLines(U,V||q,y,B),G=l.createLineClip(U,z,f,p.trace.uid),J=A.selectAll("g.contourlabels").data(q?[0]:[]);if(J.exit().remove(),J.enter().append("g").classed("contourlabels",!0),q){var le=N.xaxis,ge=N.yaxis,de=le._length,me=ge._length,W=[[[0,0],[de,0],[de,me],[0,me]]],ie=[];t.clearLocationCache();var se=l.labelFormatter(f,p),ee=P.tester.append("text").attr("data-notex",1).call(P.font,x.labelfont),pe={left:0,right:de,center:de/2,top:0,bottom:me,middle:me/2},oe=Math.sqrt(de*de+me*me),Y=i.LABELDISTANCE*oe/Math.max(1,y.length/i.LABELINCREASE);H.each(function(ce){var ue=l.calcTextOpts(ce.level,se,ee,f);v.select(this).selectAll("path").each(function(_e){var Le=this,ze=t.getVisibleSegment(Le,pe,ue.height/2);if(ze&&(E(Le,_e,ce,ze,D,ue.height),!(ze.len<(ue.width+ue.height)*i.LABELMIN)))for(var Xe=Math.min(Math.ceil(ze.len/Y),i.LABELMAX),Ve=0;Ve<Xe;Ve++){var rt=l.findBestTextLocation(Le,ze,ue,ie,pe);if(!rt)break;l.addLabelData(rt,ue,ie,W)}})}),ee.remove(),l.drawLabels(J,ie,f,G,z?W:null)}q&&!V&&H.remove()}function E(A,y,f,p,x,N){for(var D,B=0;B<f.pedgepaths.length;B++)y===f.pedgepaths[B]&&(D=f.edgepaths[B]);if(!D)return;var U=x.a[0],V=x.a[x.a.length-1],q=x.b[0],z=x.b[x.b.length-1];function H(de,me){var W=0,ie,se=.1;return(Math.abs(de[0]-U)<se||Math.abs(de[0]-V)<se)&&(ie=_(x.dxydb_rough(de[0],de[1],se)),W=Math.max(W,N*T(me,ie)/2)),(Math.abs(de[1]-q)<se||Math.abs(de[1]-z)<se)&&(ie=_(x.dxyda_rough(de[0],de[1],se)),W=Math.max(W,N*T(me,ie)/2)),W}var G=c(A,0,1),J=c(A,p.total,p.total-1),le=H(D[0],G),ge=p.total-H(D[D.length-1],J);p.min<le&&(p.min=le),p.max>ge&&(p.max=ge),p.len=p.max-p.min}function c(A,y,f){var p=A.getPointAtLength(y),x=A.getPointAtLength(f),N=x.x-p.x,D=x.y-p.y,B=Math.sqrt(N*N+D*D);return[N/B,D/B]}function _(A){var y=Math.sqrt(A[0]*A[0]+A[1]*A[1]);return[A[0]/y,A[1]/y]}function T(A,y){var f=Math.abs(A[0]*y[0]+A[1]*y[1]),p=Math.sqrt(1-f*f);return p/f}function M(A,y,f,p,x,N){var D,B,U,V,q=t.ensureSingle(A,"g","contourbg"),z=q.selectAll("path").data(N==="fill"&&!x?[0]:[]);z.enter().append("path"),z.exit().remove();var H=[];for(V=0;V<y.length;V++)D=y[V],B=w([],D.x,f.c2p),U=w([],D.y,p.c2p),H.push(C(B,U,D.bicubic));z.attr("d","M"+H.join("L")+"Z").style("stroke","none")}function k(A,y,f,p,x,N,D,B,U,V,q){var z=V==="fill";z&&u(x,A.contours);var H=t.ensureSingle(y,"g","contourfill"),G=H.selectAll("path").data(z?x:[]);G.enter().append("path"),G.exit().remove(),G.each(function(J){var le=(J.prefixBoundary?q:"")+b(A,J,N,D,B,U,f,p);le?v.select(this).attr("d",le).style("stroke","none"):v.select(this).remove()})}function b(A,y,f,p,x,N,D,B){var U,V="",q=y.edgepaths.map(function(ue,_e){return _e}),z=!0,H,G,J,le,ge,de,me=Math.abs(f[0][0]-f[2][0])*1e-4,W=Math.abs(f[0][1]-f[2][1])*1e-4;function ie(ue){return Math.abs(ue[1]-f[0][1])<W}function se(ue){return Math.abs(ue[1]-f[2][1])<W}function ee(ue){return Math.abs(ue[0]-f[0][0])<me}function pe(ue){return Math.abs(ue[0]-f[2][0])<me}function oe(ue,_e){var Le,ze,Xe,Ve,rt="";for(ie(ue)&&!pe(ue)||se(ue)&&!ee(ue)?(Ve=x.aaxis,Xe=h(x,N,[ue[0],_e[0]],.5*(ue[1]+_e[1]))):(Ve=x.baxis,Xe=h(x,N,.5*(ue[0]+_e[0]),[ue[1],_e[1]])),Le=1;Le<Xe.length;Le++)for(rt+=Ve.smoothing?"C":"L",ze=0;ze<Xe[Le].length;ze++){var mt=Xe[Le][ze];rt+=[D.c2p(mt[0]),B.c2p(mt[1])]+" "}return rt}for(U=0,H=null;q.length;){var Y=y.edgepaths[U][0];for(H&&(V+=oe(H,Y)),de=P.smoothopen(y.edgepaths[U].map(p),y.smoothing),V+=z?de:de.replace(/^M/,"L"),q.splice(q.indexOf(U),1),H=y.edgepaths[U][y.edgepaths[U].length-1],le=-1,J=0;J<4;J++){if(!H){t.log("Missing end?",U,y);break}for(ie(H)&&!pe(H)?G=f[1]:ee(H)?G=f[0]:se(H)?G=f[3]:pe(H)&&(G=f[2]),ge=0;ge<y.edgepaths.length;ge++){var ce=y.edgepaths[ge][0];Math.abs(H[0]-G[0])<me?Math.abs(H[0]-ce[0])<me&&(ce[1]-H[1])*(G[1]-ce[1])>=0&&(G=ce,le=ge):Math.abs(H[1]-G[1])<W?Math.abs(H[1]-ce[1])<W&&(ce[0]-H[0])*(G[0]-ce[0])>=0&&(G=ce,le=ge):t.log("endpt to newendpt is not vert. or horz.",H,G,ce)}if(le>=0)break;V+=oe(H,G),H=G}if(le===y.edgepaths.length){t.log("unclosed perimeter path");break}U=le,z=q.indexOf(U)===-1,z&&(U=q[0],V+=oe(H,G)+"Z",H=null)}for(U=0;U<y.paths.length;U++)V+=P.smoothclosed(y.paths[U].map(p),y.smoothing);return V}}}),sne=Ne({"src/traces/contourcarpet/index.js"(te,Z){Z.exports={attributes:LF(),supplyDefaults:RF(),colorbar:n_(),calc:ane(),plot:one(),style:Zx(),moduleType:"trace",name:"contourcarpet",basePlotModule:Ih(),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{}}}}),lne=Ne({"lib/contourcarpet.js"(te,Z){Z.exports=sne()}}),$R=Ne({"src/traces/ohlc/attributes.js"(te,Z){var v=In().extendFlat,w=tf(),C=Ac().axisHoverFormat,{hovertemplateAttrs:P,templatefallbackAttrs:t}=Fl(),r=Fd().dash,a=Hs(),l=a_(),i=l.INCREASING.COLOR,s=l.DECREASING.COLOR,o=w.line;function u(d){return{line:{color:v({},o.color,{dflt:d}),width:o.width,dash:r,editType:"style"},editType:"style"}}Z.exports={xperiod:w.xperiod,xperiod0:w.xperiod0,xperiodalignment:w.xperiodalignment,xhoverformat:C("x"),yhoverformat:C("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:v({},o.width,{}),dash:v({},r,{}),editType:"style"},increasing:u(i),decreasing:u(s),text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:P({},{keys:["open","high","low","close"]}),hovertemplatefallback:t(),tickwidth:{valType:"number",min:0,max:.5,dflt:.3,editType:"calc"},hoverlabel:v({},a.hoverlabel,{split:{valType:"boolean",dflt:!1,editType:"style"}}),zorder:w.zorder}}}),IF=Ne({"src/traces/ohlc/ohlc_defaults.js"(te,Z){var v=Yo(),w=In();Z.exports=function(P,t,r,a){var l=r("x"),i=r("open"),s=r("high"),o=r("low"),u=r("close");r("hoverlabel.split");var d=v.getComponentMethod("calendars","handleTraceDefaults");if(d(P,t,["x"],a),!!(i&&s&&o&&u)){var h=Math.min(i.length,s.length,o.length,u.length);return l&&(h=Math.min(h,w.minRowLength(l))),t._length=h,h}}}}),une=Ne({"src/traces/ohlc/defaults.js"(te,Z){var v=In(),w=IF(),C=Rm(),P=$R();Z.exports=function(a,l,i,s){function o(d,h){return v.coerce(a,l,P,d,h)}var u=w(a,l,o,s);if(!u){l.visible=!1;return}C(a,l,s,o,{x:!0}),o("xhoverformat"),o("yhoverformat"),o("line.width"),o("line.dash"),t(a,l,o,"increasing"),t(a,l,o,"decreasing"),o("text"),o("hovertext"),o("hovertemplate"),o("hovertemplatefallback"),o("tickwidth"),s._requestRangeslider[l.xaxis]=!0,o("zorder")};function t(r,a,l,i){l(i+".line.color"),l(i+".line.width",a.line.width),l(i+".line.dash",a.line.dash)}}}),DF=Ne({"src/traces/ohlc/calc.js"(te,Z){var v=In(),w=v._,C=Os(),P=Dm(),t=da().BADNUM;function r(s,o){var u=C.getFromId(s,o.xaxis),d=C.getFromId(s,o.yaxis),h=i(s,u,o),g=o._minDiff;o._minDiff=null;var m=o._origX;o._origX=null;var E=o._xcalc;o._xcalc=null;var c=l(s,o,m,E,d,a);return o._extremes[u._id]=C.findExtremes(u,E,{vpad:g/2}),c.length?(v.extendFlat(c[0].t,{wHover:g/2,tickLen:h}),c):[{t:{empty:!0}}]}function a(s,o,u,d){return{o:s,h:o,l:u,c:d}}function l(s,o,u,d,h,g){for(var m=h.makeCalcdata(o,"open"),E=h.makeCalcdata(o,"high"),c=h.makeCalcdata(o,"low"),_=h.makeCalcdata(o,"close"),T=v.isArrayOrTypedArray(o.text),M=v.isArrayOrTypedArray(o.hovertext),k=!0,b=null,A=!!o.xperiodalignment,y=[],f=0;f<d.length;f++){var p=d[f],x=m[f],N=E[f],D=c[f],B=_[f];if(p!==t&&x!==t&&N!==t&&D!==t&&B!==t){B===x?b!==null&&B!==b&&(k=B>b):k=B>x,b=B;var U=g(x,N,D,B);U.pos=p,U.yc=(x+B)/2,U.i=f,U.dir=k?"increasing":"decreasing",U.x=U.pos,U.y=[D,N],A&&(U.orig_p=u[f]),T&&(U.tx=o.text[f]),M&&(U.htx=o.hovertext[f]),y.push(U)}else y.push({pos:p,empty:!0})}return o._extremes[h._id]=C.findExtremes(h,v.concat(c,E),{padded:!0}),y.length&&(y[0].t={labels:{open:w(s,"open:")+" ",high:w(s,"high:")+" ",low:w(s,"low:")+" ",close:w(s,"close:")+" "}}),y}function i(s,o,u){var d=u._minDiff;if(!d){var h=s._fullData,g=[];d=1/0;var m;for(m=0;m<h.length;m++){var E=h[m];if(E.type==="ohlc"&&E.visible===!0&&E.xaxis===o._id){g.push(E);var c=o.makeCalcdata(E,"x");E._origX=c;var _=P(u,o,"x",c).vals;E._xcalc=_;var T=v.distinctVals(_).minDiff;T&&isFinite(T)&&(d=Math.min(d,T))}}for(d===1/0&&(d=1),m=0;m<g.length;m++)g[m]._minDiff=d}return d*u.tickwidth}Z.exports={calc:r,calcCommon:l}}}),cne=Ne({"src/traces/ohlc/plot.js"(te,Z){var v=xn(),w=In();Z.exports=function(P,t,r,a){var l=t.yaxis,i=t.xaxis,s=!!i.rangebreaks;w.makeTraceGroups(a,r,"trace ohlc").each(function(o){var u=v.select(this),d=o[0],h=d.t,g=d.trace;if(g.visible!==!0||h.empty){u.remove();return}var m=h.tickLen,E=u.selectAll("path").data(w.identity);E.enter().append("path"),E.exit().remove(),E.attr("d",function(c){if(c.empty)return"M0,0Z";var _=i.c2p(c.pos-m,!0),T=i.c2p(c.pos+m,!0),M=s?(_+T)/2:i.c2p(c.pos,!0),k=l.c2p(c.o,!0),b=l.c2p(c.h,!0),A=l.c2p(c.l,!0),y=l.c2p(c.c,!0);return"M"+_+","+k+"H"+M+"M"+M+","+b+"V"+A+"M"+T+","+y+"H"+M})})}}}),fne=Ne({"src/traces/ohlc/style.js"(te,Z){var v=xn(),w=zs(),C=Ha();Z.exports=function(t,r,a){var l=a||v.select(t).selectAll("g.ohlclayer").selectAll("g.trace");l.style("opacity",function(i){return i[0].trace.opacity}),l.each(function(i){var s=i[0].trace;v.select(this).selectAll("path").each(function(o){if(!o.empty){var u=s[o.dir].line;v.select(this).style("fill","none").call(C.stroke,u.color).call(w.dashLine,u.dash,u.width).style("opacity",s.selectedpoints&&!o.selected?.3:1)}})})}}}),OF=Ne({"src/traces/ohlc/hover.js"(te,Z){var v=Os(),w=In(),C=oh(),P=Ha(),t=In().fillText,r=a_(),a={increasing:r.INCREASING.SYMBOL,decreasing:r.DECREASING.SYMBOL};function l(u,d,h,g){var m=u.cd,E=m[0].trace;return E.hoverlabel.split?s(u,d,h,g):o(u,d,h,g)}function i(u,d,h,g){var m=u.cd,E=u.xa,c=m[0].trace,_=m[0].t,T=c.type,M=T==="ohlc"?"l":"min",k=T==="ohlc"?"h":"max",b,A,y=_.bPos||0,f=function(J){return J.pos+y-d},p=_.bdPos||_.tickLen,x=_.wHover,N=Math.min(1,p/Math.abs(E.r2c(E.range[1])-E.r2c(E.range[0])));b=u.maxHoverDistance-N,A=u.maxSpikeDistance-N;function D(J){var le=f(J);return C.inbox(le-x,le+x,b)}function B(J){var le=J[M],ge=J[k];return le===ge||C.inbox(le-h,ge-h,b)}function U(J){return(D(J)+B(J))/2}var V=C.getDistanceFunction(g,D,B,U);if(C.getClosest(m,V,u),u.index===!1)return null;var q=m[u.index];if(q.empty)return null;var z=q.dir,H=c[z],G=H.line.color;return P.opacity(G)&&H.line.width?u.color=G:u.color=H.fillcolor,u.x0=E.c2p(q.pos+y-p,!0),u.x1=E.c2p(q.pos+y+p,!0),u.xLabelVal=q.orig_p!==void 0?q.orig_p:q.pos,u.spikeDistance=U(q)*A/b,u.xSpike=E.c2p(q.pos,!0),u}function s(u,d,h,g){var m=u.cd,E=u.ya,c=m[0].trace,_=m[0].t,T=[],M=i(u,d,h,g);if(!M)return[];var k=m[M.index],b=k.hi||c.hoverinfo||"";if(b==="none"||b==="skip")return[];for(var A=["high","open","close","low"],y={},f=0;f<A.length;f++){var p=A[f],x=c[p][M.index],N=E.c2p(x,!0),D;x in y?(D=y[x],D.yLabel+="<br>"+_.labels[p]+v.hoverLabelText(E,x,c.yhoverformat)):(D=w.extendFlat({},M),D.y0=D.y1=N,D.yLabelVal=x,D.yLabel=_.labels[p]+v.hoverLabelText(E,x,c.yhoverformat),D.name="",T.push(D),y[x]=D)}return T}function o(u,d,h,g){var m=u.cd,E=u.ya,c=m[0].trace,_=m[0].t,T=i(u,d,h,g);if(!T)return[];var M=T.index,k=m[M],b=T.index=k.i,A=k.dir;function y(U){return _.labels[U]+v.hoverLabelText(E,c[U][b],c.yhoverformat)}var f=k.hi||c.hoverinfo||"",p=f.split("+"),x=f==="all",N=x||p.indexOf("y")!==-1,D=x||p.indexOf("text")!==-1,B=N?[y("open"),y("high"),y("low"),y("close")+"  "+a[A]]:[];return D&&t(k,c,B),T.extraText=B.join("<br>"),T.y0=T.y1=E.c2p(k.yc,!0),[T]}Z.exports={hoverPoints:l,hoverSplit:s,hoverOnPoints:o}}}),zF=Ne({"src/traces/ohlc/select.js"(te,Z){Z.exports=function(w,C){var P=w.cd,t=w.xaxis,r=w.yaxis,a=[],l,i=P[0].t.bPos||0;if(C===!1)for(l=0;l<P.length;l++)P[l].selected=0;else for(l=0;l<P.length;l++){var s=P[l];C.contains([t.c2p(s.pos+i),r.c2p(s.yc)],null,s.i,w)?(a.push({pointNumber:s.i,x:t.c2d(s.pos),y:r.c2d(s.yc)}),s.selected=1):s.selected=0}return a}}}),hne=Ne({"src/traces/ohlc/index.js"(te,Z){Z.exports={moduleType:"trace",name:"ohlc",basePlotModule:Ih(),categories:["cartesian","svg","showLegend"],meta:{},attributes:$R(),supplyDefaults:une(),calc:DF().calc,plot:cne(),style:fne(),hoverPoints:OF().hoverPoints,selectPoints:zF()}}}),dne=Ne({"lib/ohlc.js"(te,Z){Z.exports=hne()}}),NF=Ne({"src/traces/candlestick/attributes.js"(te,Z){var v=In().extendFlat,w=Ac().axisHoverFormat,C=$R(),P=Fy();function t(r){return{line:{color:v({},P.line.color,{dflt:r}),width:P.line.width,editType:"style"},fillcolor:P.fillcolor,editType:"style"}}Z.exports={xperiod:C.xperiod,xperiod0:C.xperiod0,xperiodalignment:C.xperiodalignment,xhoverformat:w("x"),yhoverformat:w("y"),x:C.x,open:C.open,high:C.high,low:C.low,close:C.close,line:{width:v({},P.line.width,{}),editType:"style"},increasing:t(C.increasing.line.color.dflt),decreasing:t(C.decreasing.line.color.dflt),text:C.text,hovertext:C.hovertext,hovertemplate:C.hovertemplate,hovertemplatefallback:C.hovertemplatefallback,whiskerwidth:v({},P.whiskerwidth,{dflt:0}),hoverlabel:C.hoverlabel,zorder:P.zorder}}}),vne=Ne({"src/traces/candlestick/defaults.js"(te,Z){var v=In(),w=Ha(),C=IF(),P=Rm(),t=NF();Z.exports=function(l,i,s,o){function u(h,g){return v.coerce(l,i,t,h,g)}var d=C(l,i,u,o);if(!d){i.visible=!1;return}P(l,i,o,u,{x:!0}),u("xhoverformat"),u("yhoverformat"),u("line.width"),r(l,i,u,"increasing"),r(l,i,u,"decreasing"),u("text"),u("hovertext"),u("hovertemplate"),u("hovertemplatefallback"),u("whiskerwidth"),o._requestRangeslider[i.xaxis]=!0,u("zorder")};function r(a,l,i,s){var o=i(s+".line.color");i(s+".line.width",l.line.width),i(s+".fillcolor",w.addOpacity(o,.5))}}}),pne=Ne({"src/traces/candlestick/calc.js"(te,Z){var v=In(),w=Os(),C=Dm(),P=DF().calcCommon;Z.exports=function(r,a){var l=r._fullLayout,i=w.getFromId(r,a.xaxis),s=w.getFromId(r,a.yaxis),o=i.makeCalcdata(a,"x"),u=C(a,i,"x",o).vals,d=P(r,a,o,u,s,t);return d.length?(v.extendFlat(d[0].t,{num:l._numBoxes,dPos:v.distinctVals(u).minDiff/2,posLetter:"x",valLetter:"y"}),l._numBoxes++,d):[{t:{empty:!0}}]};function t(r,a,l,i){return{min:l,q1:Math.min(r,i),med:i,q3:Math.max(r,i),max:a}}}}),mne=Ne({"src/traces/candlestick/index.js"(te,Z){Z.exports={moduleType:"trace",name:"candlestick",basePlotModule:Ih(),categories:["cartesian","svg","showLegend","candlestick","boxLayout"],meta:{},attributes:NF(),layoutAttributes:Fg(),supplyLayoutDefaults:DA().supplyLayoutDefaults,crossTraceCalc:Ux().crossTraceCalc,supplyDefaults:vne(),calc:pne(),plot:qx().plot,layerName:"boxlayer",style:e2().style,hoverPoints:OF().hoverPoints,selectPoints:zF()}}}),gne=Ne({"lib/candlestick.js"(te,Z){Z.exports=mne()}}),FF=Ne({"src/plots/polar/set_convert.js"(te,Z){var v=In(),w=Vp(),C=v.deg2rad,P=v.rad2deg;Z.exports=function(s,o,u){switch(w(s,u),s._id){case"x":case"radialaxis":t(s,o);break;case"angularaxis":l(s,o);break}};function t(i,s){var o=s._subplot;i.setGeometry=function(){var u=i._rl[0],d=i._rl[1],h=o.innerRadius,g=(o.radius-h)/(d-u),m=h/g,E=u>d?function(c){return c<=0}:function(c){return c>=0};i.c2g=function(c){var _=i.c2l(c)-u;return(E(_)?_:0)+m},i.g2c=function(c){return i.l2c(c+u-m)},i.g2p=function(c){return c*g},i.c2p=function(c){return i.g2p(i.c2g(c))}}}function r(i,s){return s==="degrees"?C(i):i}function a(i,s){return s==="degrees"?P(i):i}function l(i,s){var o=i.type;if(o==="linear"){var u=i.d2c,d=i.c2d;i.d2c=function(h,g){return r(u(h),g)},i.c2d=function(h,g){return d(a(h,g))}}i.makeCalcdata=function(h,g){var m=h[g],E=h._length,c,_,T=function(y){return i.d2c(y,h.thetaunit)};if(m)for(c=new Array(E),_=0;_<E;_++)c[_]=T(m[_]);else{var M=g+"0",k="d"+g,b=M in h?T(h[M]):0,A=h[k]?T(h[k]):(i.period||2*Math.PI)/E;for(c=new Array(E),_=0;_<E;_++)c[_]=b+_*A}return c},i.setGeometry=function(){var h=s.sector,g=h.map(C),m={clockwise:-1,counterclockwise:1}[i.direction],E=C(i.rotation),c=function(f){return m*f+E},_=function(f){return(f-E)/m},T,M,k,b;switch(o){case"linear":M=T=v.identity,b=C,k=P,i.range=v.isFullCircle(g)?[h[0],h[0]+360]:g.map(_).map(P);break;case"category":var A=i._categories.length,y=i.period?Math.max(i.period,A):A;y===0&&(y=1),M=b=function(f){return f*2*Math.PI/y},T=k=function(f){return f*y/Math.PI/2},i.range=[0,y];break}i.c2g=function(f){return c(M(f))},i.g2c=function(f){return T(_(f))},i.t2g=function(f){return c(b(f))},i.g2t=function(f){return k(_(f))}}}}}),KR=Ne({"src/plots/polar/constants.js"(te,Z){Z.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}}}),JR=Ne({"src/plots/polar/helpers.js"(te,Z){var v=In(),w=j1().tester,C=v.findIndexOfMin,P=v.isAngleInsideSector,t=v.angleDelta,r=v.angleDist;function a(_,T,M,k,b){if(!P(T,k))return!1;var A,y;M[0]<M[1]?(A=M[0],y=M[1]):(A=M[1],y=M[0]);var f=w(u(A,k[0],k[1],b)),p=w(u(y,k[0],k[1],b)),x=[_*Math.cos(T),_*Math.sin(T)];return p.contains(x)&&!f.contains(x)}function l(_,T,M,k){var b,A,y=k[0],f=k[1],p=g(Math.sin(T)-Math.sin(_)),x=g(Math.cos(T)-Math.cos(_)),N=Math.tan(M),D=g(1/N),B=p/x,U=f-B*y;return D?p&&x?(b=U/(N-B),A=N*b):x?(b=f*D,A=f):(b=y,A=y*N):p&&x?(b=0,A=U):x?(b=0,A=f):b=A=NaN,[b,A]}function i(_,T,M,k){var b=-T*M,A=T*T+1,y=2*(T*b-M),f=b*b+M*M-_*_,p=Math.sqrt(y*y-4*A*f),x=(-y+p)/(2*A),N=(-y-p)/(2*A);return[[x,T*x+b+k],[N,T*N+b+k]]}function s(_,T){var M=T.length,k=new Array(M+1),b;for(b=0;b<M;b++){var A=T[b];k[b]=[_*Math.cos(A),_*Math.sin(A)]}return k[b]=k[0].slice(),k}function o(_,T,M,k){var b=k.length,A=[],y,f;function p(H){return[_*Math.cos(H),_*Math.sin(H)]}function x(H,G,J){return l(H,G,J,p(H))}function N(H){return v.mod(H,b)}function D(H){return P(H,[T,M])}var B=C(k,function(H){return D(H)?r(H,T):1/0}),U=x(k[B],k[N(B-1)],T);for(A.push(U),y=B,f=0;f<b;y++,f++){var V=k[N(y)];if(!D(V))break;A.push(p(V))}var q=C(k,function(H){return D(H)?r(H,M):1/0}),z=x(k[q],k[N(q+1)],M);return A.push(z),A.push([0,0]),A.push(A[0].slice()),A}function u(_,T,M,k){return v.isFullCircle([T,M])?s(_,k):o(_,T,M,k)}function d(_,T,M,k){for(var b=1/0,A=1/0,y=u(_,T,M,k),f=0;f<y.length;f++){var p=y[f];b=Math.min(b,p[0]),A=Math.min(A,-p[1])}return[b,A]}function h(_,T){var M=function(A){var y=t(A,_);return y>0?y:1/0},k=C(T,M),b=v.mod(k+1,T.length);return[T[k],T[b]]}function g(_){return Math.abs(_)>1e-10?_:0}function m(_,T,M){T=T||0,M=M||0;for(var k=_.length,b=new Array(k),A=0;A<k;A++){var y=_[A];b[A]=[T+y[0],M-y[1]]}return b}function E(_,T,M,k,b,A){var y=u(_,T,M,k);return"M"+m(y,b,A).join("L")}function c(_,T,M,k,b,A,y){var f,p;_<T?(f=_,p=T):(f=T,p=_);var x=m(u(f,M,k,b),A,y),N=m(u(p,M,k,b),A,y);return"M"+N.reverse().join("L")+"M"+x.join("L")}Z.exports={isPtInsidePolygon:a,findPolygonOffset:d,findEnclosingVertexAngles:h,findIntersectionXY:l,findXYatLength:i,clampTiny:g,pathPolygon:E,pathPolygonAnnulus:c}}}),BF=Ne({"src/plots/smith/helpers.js"(te,Z){function v(a){return a<0?-1:a>0?1:0}function w(a){var l=a[0],i=a[1];if(!isFinite(l)||!isFinite(i))return[1,0];var s=(l+1)*(l+1)+i*i;return[(l*l+i*i-1)/s,2*i/s]}function C(a,l){var i=l[0],s=l[1];return[i*a.radius+a.cx,-s*a.radius+a.cy]}function P(a,l){return l*a.radius}function t(a,l,i,s){var o=C(a,w([i,l])),u=o[0],d=o[1],h=C(a,w([s,l])),g=h[0],m=h[1];if(l===0)return["M"+u+","+d,"L"+g+","+m].join(" ");var E=P(a,1/Math.abs(l));return["M"+u+","+d,"A"+E+","+E+" 0 0,"+(l<0?1:0)+" "+g+","+m].join(" ")}function r(a,l,i,s){var o=P(a,1/(l+1)),u=C(a,w([l,i])),d=u[0],h=u[1],g=C(a,w([l,s])),m=g[0],E=g[1];if(v(i)!==v(s)){var c=C(a,w([l,0])),_=c[0],T=c[1];return["M"+d+","+h,"A"+o+","+o+" 0 0,"+(0<i?0:1)+" "+_+","+T,"A"+o+","+o+" 0 0,"+(s<0?0:1)+m+","+E].join(" ")}return["M"+d+","+h,"A"+o+","+o+" 0 0,"+(s<i?0:1)+" "+m+","+E].join(" ")}Z.exports={smith:w,reactanceArc:t,resistanceArc:r,smithTransform:C}}}),jF=Ne({"src/plots/polar/polar.js"(te,Z){var v=xn(),w=to(),C=Yo(),P=In(),t=P.strRotate,r=P.strTranslate,a=Ha(),l=zs(),i=ff(),s=Os(),o=Vp(),u=FF(),d=Cm().doAutoRange,h=vA(),g=Uv(),m=oh(),E=Tg(),c=dh().prepSelect,_=dh().selectOnClick,T=dh().clearOutline,M=km(),k=Ex(),b=jw().redrawReglTraces,A=Ad().MID_SHIFT,y=KR(),f=JR(),p=BF(),x=p.smith,N=p.reactanceArc,D=p.resistanceArc,B=p.smithTransform,U=P._,V=P.mod,q=P.deg2rad,z=P.rad2deg;function H(me,W,ie){this.isSmith=ie||!1,this.id=W,this.gd=me,this._hasClipOnAxisFalse=null,this.vangles=null,this.radialAxisAngle=null,this.traceHash={},this.layers={},this.clipPaths={},this.clipIds={},this.viewInitial={};var se=me._fullLayout,ee="clip"+se._uid+W;this.clipIds.forTraces=ee+"-for-traces",this.clipPaths.forTraces=se._clips.append("clipPath").attr("id",this.clipIds.forTraces),this.clipPaths.forTraces.append("path"),this.framework=se["_"+(ie?"smith":"polar")+"layer"].append("g").attr("class",W),this.getHole=function(pe){return this.isSmith?0:pe.hole},this.getSector=function(pe){return this.isSmith?[0,360]:pe.sector},this.getRadial=function(pe){return this.isSmith?pe.realaxis:pe.radialaxis},this.getAngular=function(pe){return this.isSmith?pe.imaginaryaxis:pe.angularaxis},ie||(this.radialTickLayout=null,this.angularTickLayout=null)}var G=H.prototype;Z.exports=function(W,ie,se){return new H(W,ie,se)},G.plot=function(me,W){for(var ie=this,se=W[ie.id],ee=!1,pe=0;pe<me.length;pe++){var oe=me[pe][0].trace;if(oe.cliponaxis===!1){ee=!0;break}}ie._hasClipOnAxisFalse=ee,ie.updateLayers(W,se),ie.updateLayout(W,se),i.generalUpdatePerTraceModule(ie.gd,ie,me,se),ie.updateFx(W,se),ie.isSmith&&(delete se.realaxis.range,delete se.imaginaryaxis.range)},G.updateLayers=function(me,W){var ie=this,se=ie.isSmith,ee=ie.layers,pe=ie.getRadial(W),oe=ie.getAngular(W),Y=y.layerNames,ce=Y.indexOf("frontplot"),ue=Y.slice(0,ce),_e=oe.layer==="below traces",Le=pe.layer==="below traces";_e&&ue.push("angular-line"),Le&&ue.push("radial-line"),_e&&ue.push("angular-axis"),Le&&ue.push("radial-axis"),ue.push("frontplot"),_e||ue.push("angular-line"),Le||ue.push("radial-line"),_e||ue.push("angular-axis"),Le||ue.push("radial-axis");var ze=(se?"smith":"polar")+"sublayer",Xe=ie.framework.selectAll("."+ze).data(ue,String);Xe.enter().append("g").attr("class",function(Ve){return ze+" "+Ve}).each(function(Ve){var rt=ee[Ve]=v.select(this);switch(Ve){case"frontplot":se||rt.append("g").classed("barlayer",!0),rt.append("g").classed("scatterlayer",!0);break;case"backplot":rt.append("g").classed("maplayer",!0);break;case"plotbg":ee.bg=rt.append("path");break;case"radial-grid":rt.style("fill","none");break;case"angular-grid":rt.style("fill","none");break;case"radial-line":rt.append("line").style("fill","none");break;case"angular-line":rt.append("path").style("fill","none");break}}),Xe.order()},G.updateLayout=function(me,W){var ie=this,se=ie.layers,ee=me._size,pe=ie.getRadial(W),oe=ie.getAngular(W),Y=W.domain.x,ce=W.domain.y;ie.xOffset=ee.l+ee.w*Y[0],ie.yOffset=ee.t+ee.h*(1-ce[1]);var ue=ie.xLength=ee.w*(Y[1]-Y[0]),_e=ie.yLength=ee.h*(ce[1]-ce[0]),Le=ie.getSector(W);ie.sectorInRad=Le.map(q);var ze=ie.sectorBBox=le(Le),Xe=ze[2]-ze[0],Ve=ze[3]-ze[1],rt=_e/ue,mt=Math.abs(Ve/Xe),_t,vt,ut,Fe,Pe;rt>mt?(_t=ue,vt=ue*mt,Pe=(_e-vt)/ee.h/2,ut=[Y[0],Y[1]],Fe=[ce[0]+Pe,ce[1]-Pe]):(_t=_e/mt,vt=_e,Pe=(ue-_t)/ee.w/2,ut=[Y[0]+Pe,Y[1]-Pe],Fe=[ce[0],ce[1]]),ie.xLength2=_t,ie.yLength2=vt,ie.xDomain2=ut,ie.yDomain2=Fe;var be=ie.xOffset2=ee.l+ee.w*ut[0],Ye=ie.yOffset2=ee.t+ee.h*(1-Fe[1]),yt=ie.radius=_t/Xe,wt=ie.innerRadius=ie.getHole(W)*yt,ht=ie.cx=be-yt*ze[0],Yt=ie.cy=Ye+yt*ze[3],$t=ie.cxx=ht-be,fr=ie.cyy=Yt-Ye,mr=pe.side,Ur;mr==="counterclockwise"?(Ur=mr,mr="top"):mr==="clockwise"&&(Ur=mr,mr="bottom"),ie.radialAxis=ie.mockAxis(me,W,pe,{_id:"x",side:mr,_trueSide:Ur,domain:[wt/ee.w,yt/ee.w]}),ie.angularAxis=ie.mockAxis(me,W,oe,{side:"right",domain:[0,Math.PI],autorange:!1}),ie.doAutoRange(me,W),ie.updateAngularAxis(me,W),ie.updateRadialAxis(me,W),ie.updateRadialAxisTitle(me,W),ie.xaxis=ie.mockCartesianAxis(me,W,{_id:"x",domain:ut}),ie.yaxis=ie.mockCartesianAxis(me,W,{_id:"y",domain:Fe});var jr=ie.pathSubplot();ie.clipPaths.forTraces.select("path").attr("d",jr).attr("transform",r($t,fr)),se.frontplot.attr("transform",r(be,Ye)).call(l.setClipUrl,ie._hasClipOnAxisFalse?null:ie.clipIds.forTraces,ie.gd),se.bg.attr("d",jr).attr("transform",r(ht,Yt)).call(a.fill,W.bgcolor)},G.mockAxis=function(me,W,ie,se){var ee=P.extendFlat({},ie,se);return u(ee,W,me),ee},G.mockCartesianAxis=function(me,W,ie){var se=this,ee=se.isSmith,pe=ie._id,oe=P.extendFlat({type:"linear"},ie);o(oe,me);var Y={x:[0,2],y:[1,3]};return oe.setRange=function(){var ce=se.sectorBBox,ue=Y[pe],_e=se.radialAxis._rl,Le=(_e[1]-_e[0])/(1-se.getHole(W));oe.range=[ce[ue[0]]*Le,ce[ue[1]]*Le]},oe.isPtWithinRange=pe==="x"&&!ee?function(ce){return se.isPtInside(ce)}:function(){return!0},oe.setRange(),oe.setScale(),oe},G.doAutoRange=function(me,W){var ie=this,se=ie.gd,ee=ie.radialAxis,pe=ie.getRadial(W);d(se,ee);var oe=ee.range;if(pe.range=oe.slice(),pe._input.range=oe.slice(),ee._rl=[ee.r2l(oe[0],null,"gregorian"),ee.r2l(oe[1],null,"gregorian")],ee.minallowed!==void 0){var Y=ee.r2l(ee.minallowed);ee._rl[0]>ee._rl[1]?ee._rl[1]=Math.max(ee._rl[1],Y):ee._rl[0]=Math.max(ee._rl[0],Y)}if(ee.maxallowed!==void 0){var ce=ee.r2l(ee.maxallowed);ee._rl[0]<ee._rl[1]?ee._rl[1]=Math.min(ee._rl[1],ce):ee._rl[0]=Math.min(ee._rl[0],ce)}},G.updateRadialAxis=function(me,W){var ie=this,se=ie.gd,ee=ie.layers,pe=ie.radius,oe=ie.innerRadius,Y=ie.cx,ce=ie.cy,ue=ie.getRadial(W),_e=V(ie.getSector(W)[0],360),Le=ie.radialAxis,ze=oe<pe,Xe=ie.isSmith;Xe||(ie.fillViewInitialKey("radialaxis.angle",ue.angle),ie.fillViewInitialKey("radialaxis.range",Le.range.slice()),Le.setGeometry()),Le.tickangle==="auto"&&_e>90&&_e<=270&&(Le.tickangle=180);var Ve=Xe?function(yt){var wt=B(ie,x([yt.x,0]));return r(wt[0]-Y,wt[1]-ce)}:function(yt){return r(Le.l2p(yt.x)+oe,0)},rt=Xe?function(yt){return D(ie,yt.x,-1/0,1/0)}:function(yt){return ie.pathArc(Le.r2p(yt.x)+oe)},mt=J(ue);if(ie.radialTickLayout!==mt&&(ee["radial-axis"].selectAll(".xtick").remove(),ie.radialTickLayout=mt),ze){Le.setScale();var _t=0,vt=Xe?(Le.tickvals||[]).filter(function(yt){return yt>=0}).map(function(yt){return s.tickText(Le,yt,!0,!1)}):s.calcTicks(Le),ut=Xe?vt:s.clipEnds(Le,vt),Fe=s.getTickSigns(Le)[2];Xe&&((Le.ticks==="top"&&Le.side==="bottom"||Le.ticks==="bottom"&&Le.side==="top")&&(Fe=-Fe),Le.ticks==="top"&&Le.side==="top"&&(_t=-Le.ticklen),Le.ticks==="bottom"&&Le.side==="bottom"&&(_t=Le.ticklen)),s.drawTicks(se,Le,{vals:vt,layer:ee["radial-axis"],path:s.makeTickPath(Le,0,Fe),transFn:Ve,crisp:!1}),s.drawGrid(se,Le,{vals:ut,layer:ee["radial-grid"],path:rt,transFn:P.noop,crisp:!1}),s.drawLabels(se,Le,{vals:vt,layer:ee["radial-axis"],transFn:Ve,labelFns:s.makeLabelFns(Le,_t)})}var Pe=ie.radialAxisAngle=ie.vangles?z(ge(q(ue.angle),ie.vangles)):ue.angle,be=r(Y,ce),Ye=be+t(-Pe);de(ee["radial-axis"],ze&&(ue.showticklabels||ue.ticks),{transform:Ye}),de(ee["radial-grid"],ze&&ue.showgrid,{transform:Xe?"":be}),de(ee["radial-line"].select("line"),ze&&ue.showline,{x1:Xe?-pe:oe,y1:0,x2:pe,y2:0,transform:Ye}).attr("stroke-width",ue.linewidth).call(a.stroke,ue.linecolor)},G.updateRadialAxisTitle=function(me,W,ie){if(!this.isSmith){var se=this,ee=se.gd,pe=se.radius,oe=se.cx,Y=se.cy,ce=se.getRadial(W),ue=se.id+"title",_e=0;if(ce.title){var Le=l.bBox(se.layers["radial-axis"].node()).height,ze=ce.title.font.size,Xe=ce.side;_e=Xe==="top"?ze:Xe==="counterclockwise"?-(Le+ze*.4):Le+ze*.8}var Ve=ie!==void 0?ie:se.radialAxisAngle,rt=q(Ve),mt=Math.cos(rt),_t=Math.sin(rt),vt=oe+pe/2*mt+_e*_t,ut=Y-pe/2*_t+_e*mt;se.layers["radial-axis-title"]=E.draw(ee,ue,{propContainer:ce,propName:se.id+".radialaxis.title.text",placeholder:U(ee,"Click to enter radial axis title"),attributes:{x:vt,y:ut,"text-anchor":"middle"},transform:{rotate:-Ve}})}},G.updateAngularAxis=function(me,W){var ie=this,se=ie.gd,ee=ie.layers,pe=ie.radius,oe=ie.innerRadius,Y=ie.cx,ce=ie.cy,ue=ie.getAngular(W),_e=ie.angularAxis,Le=ie.isSmith;Le||(ie.fillViewInitialKey("angularaxis.rotation",ue.rotation),_e.setGeometry(),_e.setScale());var ze=Le?function(wt){var ht=B(ie,x([0,wt.x]));return Math.atan2(ht[0]-Y,ht[1]-ce)-Math.PI/2}:function(wt){return _e.t2g(wt.x)};_e.type==="linear"&&_e.thetaunit==="radians"&&(_e.tick0=z(_e.tick0),_e.dtick=z(_e.dtick));var Xe=function(wt){return r(Y+pe*Math.cos(wt),ce-pe*Math.sin(wt))},Ve=Le?function(wt){var ht=B(ie,x([0,wt.x]));return r(ht[0],ht[1])}:function(wt){return Xe(ze(wt))},rt=Le?function(wt){var ht=B(ie,x([0,wt.x])),Yt=Math.atan2(ht[0]-Y,ht[1]-ce)-Math.PI/2;return r(ht[0],ht[1])+t(-z(Yt))}:function(wt){var ht=ze(wt);return Xe(ht)+t(-z(ht))},mt=Le?function(wt){return N(ie,wt.x,0,1/0)}:function(wt){var ht=ze(wt),Yt=Math.cos(ht),$t=Math.sin(ht);return"M"+[Y+oe*Yt,ce-oe*$t]+"L"+[Y+pe*Yt,ce-pe*$t]},_t=s.makeLabelFns(_e,0),vt=_t.labelStandoff,ut={};ut.xFn=function(wt){var ht=ze(wt);return Math.cos(ht)*vt},ut.yFn=function(wt){var ht=ze(wt),Yt=Math.sin(ht)>0?.2:1;return-Math.sin(ht)*(vt+wt.fontSize*Yt)+Math.abs(Math.cos(ht))*(wt.fontSize*A)},ut.anchorFn=function(wt){var ht=ze(wt),Yt=Math.cos(ht);return Math.abs(Yt)<.1?"middle":Yt>0?"start":"end"},ut.heightFn=function(wt,ht,Yt){var $t=ze(wt);return-.5*(1+Math.sin($t))*Yt};var Fe=J(ue);ie.angularTickLayout!==Fe&&(ee["angular-axis"].selectAll("."+_e._id+"tick").remove(),ie.angularTickLayout=Fe);var Pe=Le?[1/0].concat(_e.tickvals||[]).map(function(wt){return s.tickText(_e,wt,!0,!1)}):s.calcTicks(_e);Le&&(Pe[0].text="∞",Pe[0].fontSize*=1.75);var be;if(W.gridshape==="linear"?(be=Pe.map(ze),P.angleDelta(be[0],be[1])<0&&(be=be.slice().reverse())):be=null,ie.vangles=be,_e.type==="category"&&(Pe=Pe.filter(function(wt){return P.isAngleInsideSector(ze(wt),ie.sectorInRad)})),_e.visible){var Ye=_e.ticks==="inside"?-1:1,yt=(_e.linewidth||1)/2;s.drawTicks(se,_e,{vals:Pe,layer:ee["angular-axis"],path:"M"+Ye*yt+",0h"+Ye*_e.ticklen,transFn:rt,crisp:!1}),s.drawGrid(se,_e,{vals:Pe,layer:ee["angular-grid"],path:mt,transFn:P.noop,crisp:!1}),s.drawLabels(se,_e,{vals:Pe,layer:ee["angular-axis"],repositionOnUpdate:!0,transFn:Ve,labelFns:ut})}de(ee["angular-line"].select("path"),ue.showline,{d:ie.pathSubplot(),transform:r(Y,ce)}).attr("stroke-width",ue.linewidth).call(a.stroke,ue.linecolor)},G.updateFx=function(me,W){if(!this.gd._context.staticPlot){var ie=!this.isSmith;ie&&(this.updateAngularDrag(me),this.updateRadialDrag(me,W,0),this.updateRadialDrag(me,W,1)),this.updateHoverAndMainDrag(me)}},G.updateHoverAndMainDrag=function(me){var W=this,ie=W.isSmith,se=W.gd,ee=W.layers,pe=me._zoomlayer,oe=y.MINZOOM,Y=y.OFFEDGE,ce=W.radius,ue=W.innerRadius,_e=W.cx,Le=W.cy,ze=W.cxx,Xe=W.cyy,Ve=W.sectorInRad,rt=W.vangles,mt=W.radialAxis,_t=f.clampTiny,vt=f.findXYatLength,ut=f.findEnclosingVertexAngles,Fe=y.cornerHalfWidth,Pe=y.cornerLen/2,be,Ye,yt=h.makeDragger(ee,"path","maindrag",me.dragmode===!1?"none":"crosshair");v.select(yt).attr("d",W.pathSubplot()).attr("transform",r(_e,Le)),yt.onmousemove=function(Mr){m.hover(se,Mr,W.id),se._fullLayout._lasthover=yt,se._fullLayout._hoversubplot=W.id},yt.onmouseout=function(Mr){se._dragging||g.unhover(se,Mr)};var wt={element:yt,gd:se,subplot:W.id,plotinfo:{id:W.id,xaxis:W.xaxis,yaxis:W.yaxis},xaxes:[W.xaxis],yaxes:[W.yaxis]},ht,Yt,$t,fr,mr,Ur,jr,fn,Br;function Qr(Mr,Sr){return Math.sqrt(Mr*Mr+Sr*Sr)}function Ot(Mr,Sr){return Qr(Mr-ze,Sr-Xe)}function $e(Mr,Sr){return Math.atan2(Xe-Sr,Mr-ze)}function ot(Mr,Sr){return[Mr*Math.cos(Sr),Mr*Math.sin(-Sr)]}function De(Mr,Sr){if(Mr===0)return W.pathSector(2*Fe);var Kr=Pe/Mr,Hn=Sr-Kr,ga=Sr+Kr,ua=Math.max(0,Math.min(Mr,ce)),Ta=ua-Fe,Aa=ua+Fe;return"M"+ot(Ta,Hn)+"A"+[Ta,Ta]+" 0,0,0 "+ot(Ta,ga)+"L"+ot(Aa,ga)+"A"+[Aa,Aa]+" 0,0,1 "+ot(Aa,Hn)+"Z"}function Ee(Mr,Sr,Kr){if(Mr===0)return W.pathSector(2*Fe);var Hn=ot(Mr,Sr),ga=ot(Mr,Kr),ua=_t((Hn[0]+ga[0])/2),Ta=_t((Hn[1]+ga[1])/2),Aa,ia;if(ua&&Ta){var $a=Ta/ua,ci=-1/$a,_r=vt(Fe,$a,ua,Ta);Aa=vt(Pe,ci,_r[0][0],_r[0][1]),ia=vt(Pe,ci,_r[1][0],_r[1][1])}else{var Qt,yr;Ta?(Qt=Pe,yr=Fe):(Qt=Fe,yr=Pe),Aa=[[ua-Qt,Ta-yr],[ua+Qt,Ta-yr]],ia=[[ua-Qt,Ta+yr],[ua+Qt,Ta+yr]]}return"M"+Aa.join("L")+"L"+ia.reverse().join("L")+"Z"}function Ae(){$t=null,fr=null,mr=W.pathSubplot(),Ur=!1;var Mr=se._fullLayout[W.id];jr=w(Mr.bgcolor).getLuminance(),fn=h.makeZoombox(pe,jr,_e,Le,mr),fn.attr("fill-rule","evenodd"),Br=h.makeCorners(pe,_e,Le),T(se)}function Ie(Mr,Sr){return Sr=Math.max(Math.min(Sr,ce),ue),Mr<Y?Mr=0:ce-Mr<Y?Mr=ce:Sr<Y?Sr=0:ce-Sr<Y&&(Sr=ce),Math.abs(Sr-Mr)>oe?(Mr<Sr?($t=Mr,fr=Sr):($t=Sr,fr=Mr),!0):($t=null,fr=null,!1)}function tt(Mr,Sr){Mr=Mr||mr,Sr=Sr||"M0,0Z",fn.attr("d",Mr),Br.attr("d",Sr),h.transitionZoombox(fn,Br,Ur,jr),Ur=!0;var Kr={};lr(Kr),se.emit("plotly_relayouting",Kr)}function st(Mr,Sr){Mr=Mr*be,Sr=Sr*Ye;var Kr=ht+Mr,Hn=Yt+Sr,ga=Ot(ht,Yt),ua=Math.min(Ot(Kr,Hn),ce),Ta=$e(ht,Yt),Aa,ia;Ie(ga,ua)&&(Aa=mr+W.pathSector(fr),$t&&(Aa+=W.pathSector($t)),ia=De($t,Ta)+De(fr,Ta)),tt(Aa,ia)}function Bt(Mr,Sr,Kr,Hn){var ga=f.findIntersectionXY(Kr,Hn,Kr,[Mr-ze,Xe-Sr]);return Qr(ga[0],ga[1])}function Ft(Mr,Sr){var Kr=ht+Mr,Hn=Yt+Sr,ga=$e(ht,Yt),ua=$e(Kr,Hn),Ta=ut(ga,rt),Aa=ut(ua,rt),ia=Bt(ht,Yt,Ta[0],Ta[1]),$a=Math.min(Bt(Kr,Hn,Aa[0],Aa[1]),ce),ci,_r;Ie(ia,$a)&&(ci=mr+W.pathSector(fr),$t&&(ci+=W.pathSector($t)),_r=[Ee($t,Ta[0],Ta[1]),Ee(fr,Ta[0],Ta[1])].join(" ")),tt(ci,_r)}function Wt(){if(h.removeZoombox(se),!($t===null||fr===null)){var Mr={};lr(Mr),h.showDoubleClickNotifier(se),C.call("_guiRelayout",se,Mr)}}function lr(Mr){var Sr=mt._rl,Kr=(Sr[1]-Sr[0])/(1-ue/ce)/ce,Hn=[Sr[0]+($t-ue)*Kr,Sr[0]+(fr-ue)*Kr];Mr[W.id+".radialaxis.range"]=Hn}function Rr(Mr,Sr){var Kr=se._fullLayout.clickmode;if(h.removeZoombox(se),Mr===2){var Hn={};for(var ga in W.viewInitial)Hn[W.id+"."+ga]=W.viewInitial[ga];se.emit("plotly_doubleclick",null),C.call("_guiRelayout",se,Hn)}Kr.indexOf("select")>-1&&Mr===1&&_(Sr,se,[W.xaxis],[W.yaxis],W.id,wt),Kr.indexOf("event")>-1&&m.click(se,Sr,W.id)}wt.prepFn=function(Mr,Sr,Kr){var Hn=se._fullLayout.dragmode,ga=yt.getBoundingClientRect();se._fullLayout._calcInverseTransform(se);var ua=se._fullLayout._invTransform;be=se._fullLayout._invScaleX,Ye=se._fullLayout._invScaleY;var Ta=P.apply3DTransform(ua)(Sr-ga.left,Kr-ga.top);if(ht=Ta[0],Yt=Ta[1],rt){var Aa=f.findPolygonOffset(ce,Ve[0],Ve[1],rt);ht+=ze+Aa[0],Yt+=Xe+Aa[1]}switch(Hn){case"zoom":wt.clickFn=Rr,ie||(rt?wt.moveFn=Ft:wt.moveFn=st,wt.doneFn=Wt,Ae());break;case"select":case"lasso":c(Mr,Sr,Kr,wt,Hn);break}},g.init(wt)},G.updateRadialDrag=function(me,W,ie){var se=this,ee=se.gd,pe=se.layers,oe=se.radius,Y=se.innerRadius,ce=se.cx,ue=se.cy,_e=se.radialAxis,Le=y.radialDragBoxSize,ze=Le/2;if(!_e.visible)return;var Xe=q(se.radialAxisAngle),Ve=_e._rl,rt=Ve[0],mt=Ve[1],_t=Ve[ie],vt=.75*(Ve[1]-Ve[0])/(1-se.getHole(W))/oe,ut,Fe,Pe;ie?(ut=ce+(oe+ze)*Math.cos(Xe),Fe=ue-(oe+ze)*Math.sin(Xe),Pe="radialdrag"):(ut=ce+(Y-ze)*Math.cos(Xe),Fe=ue-(Y-ze)*Math.sin(Xe),Pe="radialdrag-inner");var be=h.makeRectDragger(pe,Pe,"crosshair",-ze,-ze,Le,Le),Ye={element:be,gd:ee};me.dragmode===!1&&(Ye.dragmode=!1),de(v.select(be),_e.visible&&Y<oe,{transform:r(ut,Fe)});var yt,wt,ht;function Yt(jr,fn){if(yt)yt(jr,fn);else{var Br=[jr,-fn],Qr=[Math.cos(Xe),Math.sin(Xe)],Ot=Math.abs(P.dot(Br,Qr)/Math.sqrt(P.dot(Br,Br)));isNaN(Ot)||(yt=Ot<.5?mr:Ur)}var $e={};$t($e),ee.emit("plotly_relayouting",$e)}function $t(jr){wt!==null?jr[se.id+".radialaxis.angle"]=wt:ht!==null&&(jr[se.id+".radialaxis.range["+ie+"]"]=ht)}function fr(){wt!==null?C.call("_guiRelayout",ee,se.id+".radialaxis.angle",wt):ht!==null&&C.call("_guiRelayout",ee,se.id+".radialaxis.range["+ie+"]",ht)}function mr(jr,fn){if(ie!==0){var Br=ut+jr,Qr=Fe+fn;wt=Math.atan2(ue-Qr,Br-ce),se.vangles&&(wt=ge(wt,se.vangles)),wt=z(wt);var Ot=r(ce,ue)+t(-wt);pe["radial-axis"].attr("transform",Ot),pe["radial-line"].select("line").attr("transform",Ot);var $e=se.gd._fullLayout,ot=$e[se.id];se.updateRadialAxisTitle($e,ot,wt)}}function Ur(jr,fn){var Br=P.dot([jr,-fn],[Math.cos(Xe),Math.sin(Xe)]);if(ht=_t-vt*Br,vt>0!=(ie?ht>rt:ht<mt)){ht=null;return}var Qr=ee._fullLayout,Ot=Qr[se.id];_e.range[ie]=ht,_e._rl[ie]=ht,se.updateRadialAxis(Qr,Ot),se.xaxis.setRange(),se.xaxis.setScale(),se.yaxis.setRange(),se.yaxis.setScale();var $e=!1;for(var ot in se.traceHash){var De=se.traceHash[ot],Ee=P.filterVisible(De),Ae=De[0][0].trace._module;Ae.plot(ee,se,Ee,Ot),C.traceIs(ot,"gl")&&Ee.length&&($e=!0)}$e&&(k(ee),b(ee))}Ye.prepFn=function(){yt=null,wt=null,ht=null,Ye.moveFn=Yt,Ye.doneFn=fr,T(ee)},Ye.clampFn=function(jr,fn){return Math.sqrt(jr*jr+fn*fn)<y.MINDRAG&&(jr=0,fn=0),[jr,fn]},g.init(Ye)},G.updateAngularDrag=function(me){var W=this,ie=W.gd,se=W.layers,ee=W.radius,pe=W.angularAxis,oe=W.cx,Y=W.cy,ce=W.cxx,ue=W.cyy,_e=y.angularDragBoxSize,Le=h.makeDragger(se,"path","angulardrag",me.dragmode===!1?"none":"move"),ze={element:Le,gd:ie};me.dragmode===!1?ze.dragmode=!1:v.select(Le).attr("d",W.pathAnnulus(ee,ee+_e)).attr("transform",r(oe,Y)).call(M,"move");function Xe(ht,Yt){return Math.atan2(ue+_e-Yt,ht-ce-_e)}var Ve=se.frontplot.select(".scatterlayer").selectAll(".trace"),rt=Ve.selectAll(".point"),mt=Ve.selectAll(".textpoint"),_t,vt,ut,Fe,Pe,be;function Ye(ht,Yt){var $t=W.gd._fullLayout,fr=$t[W.id],mr=_t+ht*me._invScaleX,Ur=vt+Yt*me._invScaleY,jr=Xe(mr,Ur),fn=z(jr-be);if(Fe=ut+fn,se.frontplot.attr("transform",r(W.xOffset2,W.yOffset2)+t([-fn,ce,ue])),W.vangles){Pe=W.radialAxisAngle+fn;var Br=r(oe,Y)+t(-fn),Qr=r(oe,Y)+t(-Pe);se.bg.attr("transform",Br),se["radial-grid"].attr("transform",Br),se["radial-axis"].attr("transform",Qr),se["radial-line"].select("line").attr("transform",Qr),W.updateRadialAxisTitle($t,fr,Pe)}else W.clipPaths.forTraces.select("path").attr("transform",r(ce,ue)+t(fn));rt.each(function(){var Ie=v.select(this),tt=l.getTranslate(Ie);Ie.attr("transform",r(tt.x,tt.y)+t([fn]))}),mt.each(function(){var Ie=v.select(this),tt=Ie.select("text"),st=l.getTranslate(Ie);Ie.attr("transform",t([fn,tt.attr("x"),tt.attr("y")])+r(st.x,st.y))}),pe.rotation=P.modHalf(Fe,360),W.updateAngularAxis($t,fr),W._hasClipOnAxisFalse&&!P.isFullCircle(W.sectorInRad)&&Ve.call(l.hideOutsideRangePoints,W);var Ot=!1;for(var $e in W.traceHash)if(C.traceIs($e,"gl")){var ot=W.traceHash[$e],De=P.filterVisible(ot),Ee=ot[0][0].trace._module;Ee.plot(ie,W,De,fr),De.length&&(Ot=!0)}Ot&&(k(ie),b(ie));var Ae={};yt(Ae),ie.emit("plotly_relayouting",Ae)}function yt(ht){ht[W.id+".angularaxis.rotation"]=Fe,W.vangles&&(ht[W.id+".radialaxis.angle"]=Pe)}function wt(){mt.select("text").attr("transform",null);var ht={};yt(ht),C.call("_guiRelayout",ie,ht)}ze.prepFn=function(ht,Yt,$t){var fr=me[W.id];ut=fr.angularaxis.rotation;var mr=Le.getBoundingClientRect();_t=Yt-mr.left,vt=$t-mr.top,ie._fullLayout._calcInverseTransform(ie);var Ur=P.apply3DTransform(me._invTransform)(_t,vt);_t=Ur[0],vt=Ur[1],be=Xe(_t,vt),ze.moveFn=Ye,ze.doneFn=wt,T(ie)},W.vangles&&!P.isFullCircle(W.sectorInRad)&&(ze.prepFn=P.noop,M(v.select(Le),null)),g.init(ze)},G.isPtInside=function(me){if(this.isSmith)return!0;var W=this.sectorInRad,ie=this.vangles,se=this.angularAxis.c2g(me.theta),ee=this.radialAxis,pe=ee.c2l(me.r),oe=ee._rl,Y=ie?f.isPtInsidePolygon:P.isPtInsideSector;return Y(pe,se,oe,W,ie)},G.pathArc=function(me){var W=this.sectorInRad,ie=this.vangles,se=ie?f.pathPolygon:P.pathArc;return se(me,W[0],W[1],ie)},G.pathSector=function(me){var W=this.sectorInRad,ie=this.vangles,se=ie?f.pathPolygon:P.pathSector;return se(me,W[0],W[1],ie)},G.pathAnnulus=function(me,W){var ie=this.sectorInRad,se=this.vangles,ee=se?f.pathPolygonAnnulus:P.pathAnnulus;return ee(me,W,ie[0],ie[1],se)},G.pathSubplot=function(){var me=this.innerRadius,W=this.radius;return me?this.pathAnnulus(me,W):this.pathSector(W)},G.fillViewInitialKey=function(me,W){me in this.viewInitial||(this.viewInitial[me]=W)};function J(me){var W=me.ticks+String(me.ticklen)+String(me.showticklabels);return"side"in me&&(W+=me.side),W}function le(me){var W=me[0],ie=me[1],se=ie-W,ee=V(W,360),pe=ee+se,oe=Math.cos(q(ee)),Y=Math.sin(q(ee)),ce=Math.cos(q(pe)),ue=Math.sin(q(pe)),_e,Le,ze,Xe;return ee<=90&&pe>=90||ee>90&&pe>=450?Xe=1:Y<=0&&ue<=0?Xe=0:Xe=Math.max(Y,ue),ee<=180&&pe>=180||ee>180&&pe>=540?_e=-1:oe>=0&&ce>=0?_e=0:_e=Math.min(oe,ce),ee<=270&&pe>=270||ee>270&&pe>=630?Le=-1:Y>=0&&ue>=0?Le=0:Le=Math.min(Y,ue),pe>=360?ze=1:oe<=0&&ce<=0?ze=0:ze=Math.max(oe,ce),[_e,Le,ze,Xe]}function ge(me,W){var ie=function(ee){return P.angleDist(me,ee)},se=P.findIndexOfMin(W,ie);return W[se]}function de(me,W,ie){return W?(me.attr("display",null),me.attr(ie)):me&&me.attr("display","none"),me}}}),UF=Ne({"src/plots/polar/layout_attributes.js"(te,Z){var v=js(),w=Sd(),C=Fc().attributes,P=In().extendFlat,t=ef().overrideAll,r=t({color:w.color,showline:P({},w.showline,{dflt:!0}),linecolor:w.linecolor,linewidth:w.linewidth,showgrid:P({},w.showgrid,{dflt:!0}),gridcolor:w.gridcolor,gridwidth:w.gridwidth,griddash:w.griddash},"plot","from-root"),a=t({tickmode:w.minor.tickmode,nticks:w.nticks,tick0:w.tick0,dtick:w.dtick,tickvals:w.tickvals,ticktext:w.ticktext,ticks:w.ticks,ticklen:w.ticklen,tickwidth:w.tickwidth,tickcolor:w.tickcolor,ticklabelstep:w.ticklabelstep,showticklabels:w.showticklabels,labelalias:w.labelalias,minorloglabels:w.minorloglabels,showtickprefix:w.showtickprefix,tickprefix:w.tickprefix,showticksuffix:w.showticksuffix,ticksuffix:w.ticksuffix,showexponent:w.showexponent,exponentformat:w.exponentformat,minexponent:w.minexponent,separatethousands:w.separatethousands,tickfont:w.tickfont,tickangle:w.tickangle,tickformat:w.tickformat,tickformatstops:w.tickformatstops,layer:w.layer},"plot","from-root"),l={visible:P({},w.visible,{dflt:!0}),type:P({},w.type,{values:["-","linear","log","date","category"]}),autotypenumbers:w.autotypenumbers,autorangeoptions:{minallowed:w.autorangeoptions.minallowed,maxallowed:w.autorangeoptions.maxallowed,clipmin:w.autorangeoptions.clipmin,clipmax:w.autorangeoptions.clipmax,include:w.autorangeoptions.include,editType:"plot"},autorange:P({},w.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},minallowed:P({},w.minallowed,{editType:"plot"}),maxallowed:P({},w.maxallowed,{editType:"plot"}),range:P({},w.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:w.categoryorder,categoryarray:w.categoryarray,angle:{valType:"angle",editType:"plot"},autotickangles:w.autotickangles,side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:P({},w.title.text,{editType:"plot",dflt:""}),font:P({},w.title.font,{editType:"plot"}),editType:"plot"},hoverformat:w.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};P(l,r,a);var i={visible:P({},w.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:w.autotypenumbers,categoryorder:w.categoryorder,categoryarray:w.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:w.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};P(i,r,a),Z.exports={domain:C({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:v.background},radialaxis:l,angularaxis:i,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot"},uirevision:{valType:"any",editType:"none"},editType:"calc"}}}),yne=Ne({"src/plots/polar/layout_defaults.js"(te,Z){var v=In(),w=Ha(),C=Cu(),P=W0(),t=lv().getSubplotData,r=Ty(),a=j0(),l=Em(),i=dp(),s=Yf(),o=ec(),u=aM(),d=Ag(),h=UF(),g=FF(),m=KR(),E=m.axisNames;function c(T,M,k,b){var A=k("bgcolor");b.bgColor=w.combine(A,b.paper_bgcolor);var y=k("sector");k("hole");var f=t(b.fullData,m.name,b.id),p=b.layoutOut,x;function N(Le,ze){return k(x+"."+Le,ze)}for(var D=0;D<E.length;D++){x=E[D],v.isPlainObject(T[x])||(T[x]={});var B=T[x],U=C.newContainer(M,x);U._id=U._name=x,U._attr=b.id+"."+x,U._traceIndices=f.map(function(Le){return Le.index});var V=m.axisName2dataArray[x],q=_(B,U,N,f,V,b);s(B,U,N,{axData:f,dataAttr:V});var z=N("visible");switch(g(U,M,p),N("uirevision",M.uirevision),U._m=1,x){case"radialaxis":N("minallowed"),N("maxallowed");var H=N("range"),G=U.getAutorangeDflt(H),J=N("autorange",G),le;H&&(H[0]===null&&H[1]===null||(H[0]===null||H[1]===null)&&(J==="reversed"||J===!0)||H[0]!==null&&(J==="min"||J==="max reversed")||H[1]!==null&&(J==="max"||J==="min reversed"))&&(H=void 0,delete U.range,U.autorange=!0,le=!0),le||(G=U.getAutorangeDflt(H),J=N("autorange",G)),B.autorange=J,J&&(u(N,J,H),(q==="linear"||q==="-")&&N("rangemode"),U.isReversed()&&(U._m=-1)),U.cleanRange("range",{dfltRange:[0,1]});break;case"angularaxis":if(q==="date"){v.log("Polar plots do not support date angular axes yet.");for(var ge=0;ge<f.length;ge++)f[ge].visible=!1;q=B.type=U.type="linear"}N(q==="linear"?"thetaunit":"period");var de=N("direction");N("rotation",{counterclockwise:0,clockwise:90}[de]);break}if(i(B,U,N,U.type,{tickSuffixDflt:U.thetaunit==="degrees"?"°":void 0}),z){var me,W,ie,se,ee,pe,oe,Y,ce,ue,_e=b.font||{};me=N("color"),W=me===B.color?me:_e.color,ie=_e.size,se=_e.family,ee=_e.weight,pe=_e.style,oe=_e.variant,Y=_e.textcase,ce=_e.lineposition,ue=_e.shadow,r(B,U,N,U.type),l(B,U,N,U.type,{font:{weight:ee,style:pe,variant:oe,textcase:Y,lineposition:ce,shadow:ue,color:W,size:ie,family:se},noAutotickangles:x==="angularaxis",noTicklabelshift:!0,noTicklabelstandoff:!0}),a(B,U,N,{outerTicks:!0}),o(B,U,N,{dfltColor:me,bgColor:b.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:h[x]}),N("layer"),x==="radialaxis"&&(N("side"),N("angle",y[0]),N("title.text"),v.coerceFont(N,"title.font",{weight:ee,style:pe,variant:oe,textcase:Y,lineposition:ce,shadow:ue,color:W,size:v.bigFont(ie),family:se}))}q!=="category"&&N("hoverformat"),U._input=B}M.angularaxis.type==="category"&&k("gridshape")}function _(T,M,k,b,A,y){var f=k("autotypenumbers",y.autotypenumbersDflt),p=k("type");if(p==="-"){for(var x,N=0;N<b.length;N++)if(b[N].visible){x=b[N];break}x&&x[A]&&(M.type=d(x[A],"gregorian",{noMultiCategory:!0,autotypenumbers:f})),M.type==="-"?M.type="linear":T.type=M.type}return M.type}Z.exports=function(M,k,b){P(M,k,b,{type:m.name,attributes:h,handleDefaults:c,font:k.font,autotypenumbersDflt:k.autotypenumbers,paper_bgcolor:k.paper_bgcolor,fullData:b,layoutOut:k})}}}),QR=Ne({"src/plots/polar/index.js"(te,Z){var v=lv().getSubplotCalcData,w=In().counterRegex,C=jF(),P=KR(),t=P.attr,r=P.name,a=w(r),l={};l[t]={valType:"subplotid",dflt:r,editType:"calc"};function i(o){for(var u=o._fullLayout,d=o.calcdata,h=u._subplots[r],g=0;g<h.length;g++){var m=h[g],E=v(d,r,m),c=u[m]._subplot;c||(c=C(o,m),u[m]._subplot=c),c.plot(E,u,o._promises)}}function s(o,u,d,h){for(var g=h._subplots[r]||[],m=h._has&&h._has("gl"),E=u._has&&u._has("gl"),c=m&&!E,_=0;_<g.length;_++){var T=g[_],M=h[T]._subplot;if(!u[T]&&M){M.framework.remove(),M.layers["radial-axis-title"].remove();for(var k in M.clipPaths)M.clipPaths[k].remove()}c&&M._scene&&(M._scene.destroy(),M._scene=null)}}Z.exports={attr:t,name:r,idRoot:r,idRegex:a,attrRegex:a,attributes:l,layoutAttributes:UF(),supplyLayoutDefaults:yne(),plot:i,clean:s,toSVG:Ih().toSVG}}}),xk=Ne({"src/traces/scatterpolar/attributes.js"(te,Z){var{hovertemplateAttrs:v,texttemplateAttrs:w,templatefallbackAttrs:C}=Fl(),P=fi().extendFlat,t=qv(),r=tf(),a=qo(),l=r.line;Z.exports={mode:r.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:r.text,texttemplate:w({editType:"plot"},{keys:["r","theta","text"]}),texttemplatefallback:C({editType:"plot"}),hovertext:r.hovertext,line:{color:l.color,width:l.width,dash:l.dash,backoff:l.backoff,shape:P({},l.shape,{values:["linear","spline"]}),smoothing:l.smoothing,editType:"calc"},connectgaps:r.connectgaps,marker:r.marker,cliponaxis:P({},r.cliponaxis,{dflt:!1}),textposition:r.textposition,textfont:r.textfont,fill:P({},r.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:t(),hoverinfo:P({},a.hoverinfo,{flags:["r","theta","text","name"]}),hoveron:r.hoveron,hovertemplate:v(),hovertemplatefallback:C(),selected:r.selected,unselected:r.unselected}}}),e8=Ne({"src/traces/scatterpolar/defaults.js"(te,Z){var v=In(),w=yu(),C=wv(),P=Im(),t=Tv(),r=Wp(),a=uv(),l=i0().PTS_LINESONLY,i=xk();function s(u,d,h,g){function m(_,T){return v.coerce(u,d,i,_,T)}var E=o(u,d,g,m);if(!E){d.visible=!1;return}m("thetaunit"),m("mode",E<l?"lines+markers":"lines"),m("text"),m("hovertext"),d.hoveron!=="fills"&&(m("hovertemplate"),m("hovertemplatefallback")),w.hasMarkers(d)&&C(u,d,h,g,m,{gradient:!0}),w.hasLines(d)&&(P(u,d,h,g,m,{backoff:!0}),t(u,d,m),m("connectgaps")),w.hasText(d)&&(m("texttemplate"),m("texttemplatefallback"),r(u,d,g,m));var c=[];(w.hasMarkers(d)||w.hasText(d))&&(m("cliponaxis"),m("marker.maxdisplayed"),c.push("points")),m("fill"),d.fill!=="none"&&(a(u,d,h,m),w.hasLines(d)||t(u,d,m)),(d.fill==="tonext"||d.fill==="toself")&&c.push("fills"),m("hoveron",c.join("+")||"points"),v.coerceSelectionMarkerOpacity(d,m)}function o(u,d,h,g){var m=g("r"),E=g("theta");v.isTypedArray(m)&&(d.r=m=Array.from(m)),v.isTypedArray(E)&&(d.theta=E=Array.from(E));var c;if(m)E?c=Math.min(m.length,E.length):(c=m.length,g("theta0"),g("dtheta"));else{if(!E)return 0;c=d.theta.length,g("r0"),g("dr")}return d._length=c,c}Z.exports={handleRThetaDefaults:o,supplyDefaults:s}}}),t8=Ne({"src/traces/scatterpolar/format_labels.js"(te,Z){var v=In(),w=Os();Z.exports=function(P,t,r){var a={},l=r[t.subplot]._subplot,i,s;l?(i=l.radialAxis,s=l.angularAxis):(l=r[t.subplot],i=l.radialaxis,s=l.angularaxis);var o=i.c2l(P.r);a.rLabel=w.tickText(i,o,!0).text;var u=s.thetaunit==="degrees"?v.rad2deg(P.theta):P.theta;return a.thetaLabel=w.tickText(s,u,!0).text,a}}}),_ne=Ne({"src/traces/scatterpolar/calc.js"(te,Z){var v=Fn(),w=da().BADNUM,C=Os(),P=Yp(),t=s0(),r=Gh(),a=Vv().calcMarkerSize;Z.exports=function(i,s){for(var o=i._fullLayout,u=s.subplot,d=o[u].radialaxis,h=o[u].angularaxis,g=d.makeCalcdata(s,"r"),m=h.makeCalcdata(s,"theta"),E=s._length,c=new Array(E),_=0;_<E;_++){var T=g[_],M=m[_],k=c[_]={};v(T)&&v(M)?(k.r=T,k.theta=M):k.r=w}var b=a(s,E);return s._extremes.x=C.findExtremes(d,g,{ppad:b}),P(i,s),t(c,s),r(c,s),c}}}),xne=Ne({"src/traces/scatterpolar/plot.js"(te,Z){var v=sm(),w=da().BADNUM;Z.exports=function(P,t,r){for(var a=t.layers.frontplot.select("g.scatterlayer"),l=t.xaxis,i=t.yaxis,s={xaxis:l,yaxis:i,plot:t.framework,layerClipId:t._hasClipOnAxisFalse?t.clipIds.forTraces:null},o=t.radialAxis,u=t.angularAxis,d=0;d<r.length;d++)for(var h=r[d],g=0;g<h.length;g++){g===0&&(h[0].trace._xA=l,h[0].trace._yA=i);var m=h[g],E=m.r;if(E===w)m.x=m.y=w;else{var c=o.c2g(E),_=u.c2g(m.theta);m.x=c*Math.cos(_),m.y=c*Math.sin(_)}}v(P,s,r,a)}}}),r8=Ne({"src/traces/scatterpolar/hover.js"(te,Z){var v=ky();function w(P,t,r,a){var l=v(P,t,r,a);if(!(!l||l[0].index===!1)){var i=l[0];if(i.index===void 0)return l;var s=P.subplot,o=i.cd[i.index],u=i.trace;if(s.isPtInside(o))return i.xLabelVal=void 0,i.yLabelVal=void 0,C(o,u,s,i),i.hovertemplate=u.hovertemplate,l}}function C(P,t,r,a){var l=r.radialAxis,i=r.angularAxis;l._hovertitle="r",i._hovertitle="θ";var s={};s[t.subplot]={_subplot:r};var o=t._module.formatLabels(P,t,s);a.rLabel=o.rLabel,a.thetaLabel=o.thetaLabel;var u=P.hi||t.hoverinfo,d=[];function h(m,E){d.push(m._hovertitle+": "+E)}if(!t.hovertemplate){var g=u.split("+");g.indexOf("all")!==-1&&(g=["r","theta","text"]),g.indexOf("r")!==-1&&h(l,a.rLabel),g.indexOf("theta")!==-1&&h(i,a.thetaLabel),g.indexOf("text")!==-1&&a.text&&(d.push(a.text),delete a.text),a.extraText=d.join("<br>")}}Z.exports={hoverPoints:w,makeHoverPointText:C}}}),bne=Ne({"src/traces/scatterpolar/index.js"(te,Z){Z.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:QR(),categories:["polar","symbols","showLegend","scatter-like"],attributes:xk(),supplyDefaults:e8().supplyDefaults,colorbar:sh(),formatLabels:t8(),calc:_ne(),plot:xne(),style:Xh().style,styleOnSelect:Xh().styleOnSelect,hoverPoints:r8().hoverPoints,selectPoints:Py(),meta:{}}}}),wne=Ne({"lib/scatterpolar.js"(te,Z){Z.exports=bne()}}),qF=Ne({"src/traces/scatterpolargl/attributes.js"(te,Z){var v=xk(),{cliponaxis:w,hoveron:C}=v,P=nr(v,["cliponaxis","hoveron"]),{connectgaps:t,line:{color:r,dash:a,width:l},fill:i,fillcolor:s,marker:o,textfont:u,textposition:d}=fk();Z.exports=sr(cr({},P),{connectgaps:t,fill:i,fillcolor:s,line:{color:r,dash:a,editType:"calc",width:l},marker:o,textfont:u,textposition:d})}}),Tne=Ne({"src/traces/scatterpolargl/defaults.js"(te,Z){var v=In(),w=yu(),C=e8().handleRThetaDefaults,P=wv(),t=Im(),r=Wp(),a=uv(),l=i0().PTS_LINESONLY,i=qF();Z.exports=function(o,u,d,h){function g(E,c){return v.coerce(o,u,i,E,c)}var m=C(o,u,h,g);if(!m){u.visible=!1;return}g("thetaunit"),g("mode",m<l?"lines+markers":"lines"),g("text"),g("hovertext"),u.hoveron!=="fills"&&(g("hovertemplate"),g("hovertemplatefallback")),w.hasMarkers(u)&&P(o,u,d,h,g,{noAngleRef:!0,noStandOff:!0}),w.hasLines(u)&&(t(o,u,d,h,g),g("connectgaps")),w.hasText(u)&&(g("texttemplate"),g("texttemplatefallback"),r(o,u,h,g,{noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0})),g("fill"),u.fill!=="none"&&a(o,u,d,g),v.coerceSelectionMarkerOpacity(u,g)}}}),Ane=Ne({"src/traces/scatterpolargl/format_labels.js"(te,Z){var v=t8();Z.exports=function(C,P,t){var r=C.i;return"r"in C||(C.r=P._r[r]),"theta"in C||(C.theta=P._theta[r]),v(C,P,t)}}}),Sne=Ne({"src/traces/scatterpolargl/calc.js"(te,Z){var v=Yp(),w=Vv().calcMarkerSize,C=_3(),P=Os(),t=zb().TOO_MANY_POINTS;Z.exports=function(a,l){var i=a._fullLayout,s=l.subplot,o=i[s].radialaxis,u=i[s].angularaxis,d=l._r=o.makeCalcdata(l,"r"),h=l._theta=u.makeCalcdata(l,"theta"),g=l._length,m={};g<d.length&&(d=d.slice(0,g)),g<h.length&&(h=h.slice(0,g)),m.r=d,m.theta=h,v(a,l);var E=m.opts=C.style(a,l),c;return g<t?c=w(l,g):E.marker&&(c=2*(E.marker.sizeAvg||Math.max(E.marker.size,3))),l._extremes.x=P.findExtremes(o,d,{ppad:c}),[{x:!1,y:!1,t:m,trace:l}]}}}),Ene=Ne({"src/traces/scatterpolargl/hover.js"(te,Z){var v=PR(),w=r8().makeHoverPointText;function C(P,t,r,a){var l=P.cd,i=l[0].t,s=i.r,o=i.theta,u=v.hoverPoints(P,t,r,a);if(!(!u||u[0].index===!1)){var d=u[0];if(d.index===void 0)return u;var h=P.subplot,g=d.cd[d.index],m=d.trace;if(g.r=s[d.index],g.theta=o[d.index],!!h.isPtInside(g))return d.xLabelVal=void 0,d.yLabelVal=void 0,w(g,m,h,d),u}}Z.exports={hoverPoints:C}}}),Mne=Ne({"src/traces/scatterpolargl/base_index.js"(te,Z){Z.exports={moduleType:"trace",name:"scatterpolargl",basePlotModule:QR(),categories:["gl","regl","polar","symbols","showLegend","scatter-like"],attributes:qF(),supplyDefaults:Tne(),colorbar:sh(),formatLabels:Ane(),calc:Sne(),hoverPoints:Ene().hoverPoints,selectPoints:TN(),meta:{}}}}),Cne=Ne({"src/traces/scatterpolargl/plot.js"(te,Z){var v=RR(),w=Fn(),C=WN(),P=bN(),t=_3(),r=In(),a=zb().TOO_MANY_POINTS,l={};Z.exports=function(s,o,u){if(u.length){var d=o.radialAxis,h=o.angularAxis,g=P(s,o);return u.forEach(function(m){if(!(!m||!m[0]||!m[0].trace)){var E=m[0],c=E.trace,_=E.t,T=c._length,M=_.r,k=_.theta,b=_.opts,A,y=M.slice(),f=k.slice();for(A=0;A<M.length;A++)o.isPtInside({r:M[A],theta:k[A]})||(y[A]=NaN,f[A]=NaN);var p=new Array(T*2),x=Array(T),N=Array(T);for(A=0;A<T;A++){var D=y[A],B,U;if(w(D)){var V=d.c2g(D),q=h.c2g(f[A],c.thetaunit);B=V*Math.cos(q),U=V*Math.sin(q)}else B=U=NaN;x[A]=p[A*2]=B,N[A]=p[A*2+1]=U}_.tree=v(p),b.marker&&T>=a&&(b.marker.cluster=_.tree),b.marker&&(b.markerSel.positions=b.markerUnsel.positions=b.marker.positions=p),b.line&&p.length>1&&r.extendFlat(b.line,t.linePositions(s,c,p)),b.text&&(r.extendFlat(b.text,{positions:p},t.textPosition(s,c,b.text,b.marker)),r.extendFlat(b.textSel,{positions:p},t.textPosition(s,c,b.text,b.markerSel)),r.extendFlat(b.textUnsel,{positions:p},t.textPosition(s,c,b.text,b.markerUnsel))),b.fill&&!g.fill2d&&(g.fill2d=!0),b.marker&&!g.scatter2d&&(g.scatter2d=!0),b.line&&!g.line2d&&(g.line2d=!0),b.text&&!g.glText&&(g.glText=!0),g.lineOptions.push(b.line),g.fillOptions.push(b.fill),g.markerOptions.push(b.marker),g.markerSelectedOptions.push(b.markerSel),g.markerUnselectedOptions.push(b.markerUnsel),g.textOptions.push(b.text),g.textSelectedOptions.push(b.textSel),g.textUnselectedOptions.push(b.textUnsel),g.selectBatch.push([]),g.unselectBatch.push([]),_.x=x,_.y=N,_.rawx=x,_.rawy=N,_.r=M,_.theta=k,_.positions=p,_._scene=g,_.index=g.count,g.count++}}),C(s,o,u)}},Z.exports.reglPrecompiled=l}}),kne=Ne({"src/traces/scatterpolargl/index.js"(te,Z){var v=Mne();v.plot=Cne(),Z.exports=v}}),Pne=Ne({"lib/scatterpolargl.js"(te,Z){Z.exports=kne()}}),VF=Ne({"src/traces/barpolar/attributes.js"(te,Z){var{hovertemplateAttrs:v,templatefallbackAttrs:w}=Fl(),C=fi().extendFlat,P=xk(),t=id();Z.exports={r:P.r,theta:P.theta,r0:P.r0,dr:P.dr,theta0:P.theta0,dtheta:P.dtheta,thetaunit:P.thetaunit,base:C({},t.base,{}),offset:C({},t.offset,{}),width:C({},t.width,{}),text:C({},t.text,{}),hovertext:C({},t.hovertext,{}),marker:r(),hoverinfo:P.hoverinfo,hovertemplate:v(),hovertemplatefallback:w(),selected:t.selected,unselected:t.unselected};function r(){var a=C({},t.marker);return delete a.cornerradius,a}}}),HF=Ne({"src/traces/barpolar/layout_attributes.js"(te,Z){Z.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}}}),Lne=Ne({"src/traces/barpolar/defaults.js"(te,Z){var v=In(),w=e8().handleRThetaDefaults,C=l0(),P=VF();Z.exports=function(r,a,l,i){function s(u,d){return v.coerce(r,a,P,u,d)}var o=w(r,a,i,s);if(!o){a.visible=!1;return}s("thetaunit"),s("base"),s("offset"),s("width"),s("text"),s("hovertext"),s("hovertemplate"),s("hovertemplatefallback"),C(r,a,s,l,i),v.coerceSelectionMarkerOpacity(a,s)}}}),Rne=Ne({"src/traces/barpolar/layout_defaults.js"(te,Z){var v=In(),w=HF();Z.exports=function(C,P,t){var r={},a;function l(o,u){return v.coerce(C[a]||{},P[a],w,o,u)}for(var i=0;i<t.length;i++){var s=t[i];s.type==="barpolar"&&s.visible===!0&&(a=s.subplot,r[a]||(l("barmode"),l("bargap"),r[a]=1))}}}}),GF=Ne({"src/traces/barpolar/calc.js"(te,Z){var v=Bd().hasColorscale,w=Ud(),C=In().isArrayOrTypedArray,P=Nm(),t=q0().setGroupPositions,r=Gh(),a=Yo().traceIs,l=In().extendFlat;function i(o,u){for(var d=o._fullLayout,h=u.subplot,g=d[h].radialaxis,m=d[h].angularaxis,E=g.makeCalcdata(u,"r"),c=m.makeCalcdata(u,"theta"),_=u._length,T=new Array(_),M=E,k=c,b=0;b<_;b++)T[b]={p:k[b],s:M[b]};function A(y){var f=u[y];f!==void 0&&(u["_"+y]=C(f)?m.makeCalcdata(u,y):m.d2c(f,u.thetaunit))}return m.type==="linear"&&(A("width"),A("offset")),v(u,"marker")&&w(o,u,{vals:u.marker.color,containerStr:"marker",cLetter:"c"}),v(u,"marker.line")&&w(o,u,{vals:u.marker.line.color,containerStr:"marker.line",cLetter:"c"}),P(T,u),r(T,u),T}function s(o,u,d){for(var h=o.calcdata,g=[],m=0;m<h.length;m++){var E=h[m],c=E[0].trace;c.visible===!0&&a(c,"bar")&&c.subplot===d&&g.push(E)}var _=l({},u.radialaxis,{_id:"x"}),T=u.angularaxis;t(o,T,_,g,{mode:u.barmode,norm:u.barnorm,gap:u.bargap,groupgap:u.bargroupgap})}Z.exports={calc:i,crossTraceCalc:s}}}),Ine=Ne({"src/traces/barpolar/plot.js"(te,Z){var v=xn(),w=Fn(),C=In(),P=zs(),t=JR();Z.exports=function(l,i,s){var o=l._context.staticPlot,u=i.xaxis,d=i.yaxis,h=i.radialAxis,g=i.angularAxis,m=r(i),E=i.layers.frontplot.select("g.barlayer");C.makeTraceGroups(E,s,"trace bars").each(function(){var c=v.select(this),_=C.ensureSingle(c,"g","points"),T=_.selectAll("g.point").data(C.identity);T.enter().append("g").style("vector-effect",o?"none":"non-scaling-stroke").style("stroke-miterlimit",2).classed("point",!0),T.exit().remove(),T.each(function(M){var k=v.select(this),b=M.rp0=h.c2p(M.s0),A=M.rp1=h.c2p(M.s1),y=M.thetag0=g.c2g(M.p0),f=M.thetag1=g.c2g(M.p1),p;if(!w(b)||!w(A)||!w(y)||!w(f)||b===A||y===f)p="M0,0Z";else{var x=h.c2g(M.s1),N=(y+f)/2;M.ct=[u.c2p(x*Math.cos(N)),d.c2p(x*Math.sin(N))],p=m(b,A,y,f)}C.ensureSingle(k,"path").attr("d",p)}),P.setClipUrl(c,i._hasClipOnAxisFalse?i.clipIds.forTraces:null,l)})};function r(a){var l=a.cxx,i=a.cyy;return a.vangles?function(s,o,u,d){var h,g;C.angleDelta(u,d)>0?(h=u,g=d):(h=d,g=u);var m=t.findEnclosingVertexAngles(h,a.vangles)[0],E=t.findEnclosingVertexAngles(g,a.vangles)[1],c=[m,(h+g)/2,E];return t.pathPolygonAnnulus(s,o,h,g,c,l,i)}:function(s,o,u,d){return C.pathAnnulus(s,o,u,d,l,i)}}}}),Dne=Ne({"src/traces/barpolar/hover.js"(te,Z){var v=oh(),w=In(),C=Bc().getTraceColor,P=w.fillText,t=r8().makeHoverPointText,r=JR().isPtInsidePolygon;Z.exports=function(l,i,s){var o=l.cd,u=o[0].trace,d=l.subplot,h=d.radialAxis,g=d.angularAxis,m=d.vangles,E=m?r:w.isPtInsideSector,c=l.maxHoverDistance,_=g._period||2*Math.PI,T=Math.abs(h.g2p(Math.sqrt(i*i+s*s))),M=Math.atan2(s,i);h.range[0]>h.range[1]&&(M+=Math.PI);var k=function(f){return E(T,M,[f.rp0,f.rp1],[f.thetag0,f.thetag1],m)?c+Math.min(1,Math.abs(f.thetag1-f.thetag0)/_)-1+(f.rp1-T)/(f.rp1-f.rp0)-1:1/0};if(v.getClosest(o,k,l),l.index!==!1){var b=l.index,A=o[b];l.x0=l.x1=A.ct[0],l.y0=l.y1=A.ct[1];var y=w.extendFlat({},A,{r:A.s,theta:A.p});return P(A,u,l),t(y,u,d,l),l.hovertemplate=u.hovertemplate,l.color=C(u,A),l.xLabelVal=l.yLabelVal=void 0,A.s<0&&(l.idealAlign="left"),[l]}}}}),One=Ne({"src/traces/barpolar/index.js"(te,Z){Z.exports={moduleType:"trace",name:"barpolar",basePlotModule:QR(),categories:["polar","bar","showLegend"],attributes:VF(),layoutAttributes:HF(),supplyDefaults:Lne(),supplyLayoutDefaults:Rne(),calc:GF().calc,crossTraceCalc:GF().crossTraceCalc,plot:Ine(),colorbar:sh(),formatLabels:t8(),style:qd().style,styleOnSelect:qd().styleOnSelect,hoverPoints:Dne(),selectPoints:Ng(),meta:{}}}}),zne=Ne({"lib/barpolar.js"(te,Z){Z.exports=One()}}),XF=Ne({"src/plots/smith/constants.js"(te,Z){Z.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}}}),WF=Ne({"src/plots/smith/layout_attributes.js"(te,Z){var v=js(),w=Sd(),C=Fc().attributes,P=In().extendFlat,t=ef().overrideAll,r=t({color:w.color,showline:P({},w.showline,{dflt:!0}),linecolor:w.linecolor,linewidth:w.linewidth,showgrid:P({},w.showgrid,{dflt:!0}),gridcolor:w.gridcolor,gridwidth:w.gridwidth,griddash:w.griddash},"plot","from-root"),a=t({ticklen:w.ticklen,tickwidth:P({},w.tickwidth,{dflt:2}),tickcolor:w.tickcolor,showticklabels:w.showticklabels,labelalias:w.labelalias,showtickprefix:w.showtickprefix,tickprefix:w.tickprefix,showticksuffix:w.showticksuffix,ticksuffix:w.ticksuffix,tickfont:w.tickfont,tickformat:w.tickformat,hoverformat:w.hoverformat,layer:w.layer},"plot","from-root"),l=P({visible:P({},w.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:P({},w.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},editType:"calc"},r,a),i=P({visible:P({},w.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:w.ticks,editType:"calc"},r,a);Z.exports={domain:C({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:v.background},realaxis:l,imaginaryaxis:i,editType:"calc"}}}),Nne=Ne({"src/plots/smith/layout_defaults.js"(te,Z){var v=In(),w=Ha(),C=Cu(),P=W0(),t=lv().getSubplotData,r=dp(),a=Em(),l=ec(),i=Vp(),s=WF(),o=XF(),u=o.axisNames,d=g(function(m){return v.isTypedArray(m)&&(m=Array.from(m)),m.slice().reverse().map(function(E){return-E}).concat([0]).concat(m)},String);function h(m,E,c,_){var T=c("bgcolor");_.bgColor=w.combine(T,_.paper_bgcolor);var M=t(_.fullData,o.name,_.id),k=_.layoutOut,b;function A(G,J){return c(b+"."+G,J)}for(var y=0;y<u.length;y++){b=u[y],v.isPlainObject(m[b])||(m[b]={});var f=m[b],p=C.newContainer(E,b);p._id=p._name=b,p._attr=_.id+"."+b,p._traceIndices=M.map(function(G){return G.index});var x=A("visible");if(p.type="linear",i(p,k),r(f,p,A,p.type),x){var N=b==="realaxis";if(N&&A("side"),N)A("tickvals");else{var D=d(E.realaxis.tickvals||s.realaxis.tickvals.dflt);A("tickvals",D)}v.isTypedArray(p.tickvals)&&(p.tickvals=Array.from(p.tickvals));var B,U,V,q,z=_.font||{};x&&(B=A("color"),U=B===f.color?B:z.color,V=z.size,q=z.family),a(f,p,A,p.type,{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,noTicklabelstep:!0,noAng:!N,noExp:!0,font:{color:U,size:V,family:q}}),v.coerce2(m,E,s,b+".ticklen"),v.coerce2(m,E,s,b+".tickwidth"),v.coerce2(m,E,s,b+".tickcolor",E.color);var H=A("ticks");H||(delete E[b].ticklen,delete E[b].tickwidth,delete E[b].tickcolor),l(f,p,A,{dfltColor:B,bgColor:_.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:s[b]}),A("layer")}A("hoverformat"),delete p.type,p._input=f}}Z.exports=function(E,c,_){P(E,c,_,{noUirevision:!0,type:o.name,attributes:s,handleDefaults:h,font:c.font,paper_bgcolor:c.paper_bgcolor,fullData:_,layoutOut:c})};function g(m,E){var c={};return function(_){var T=E?E(_):_;if(T in c)return c[T];var M=m(_);return c[T]=M,M}}}}),Fne=Ne({"src/plots/smith/index.js"(te,Z){var v=lv().getSubplotCalcData,w=In().counterRegex,C=jF(),P=XF(),t=P.attr,r=P.name,a=w(r),l={};l[t]={valType:"subplotid",dflt:r,editType:"calc"};function i(o){for(var u=o._fullLayout,d=o.calcdata,h=u._subplots[r],g=0;g<h.length;g++){var m=h[g],E=v(d,r,m),c=u[m]._subplot;c||(c=C(o,m,!0),u[m]._subplot=c),c.plot(E,u,o._promises)}}function s(o,u,d,h){for(var g=h._subplots[r]||[],m=0;m<g.length;m++){var E=g[m],c=h[E]._subplot;if(!u[E]&&c){c.framework.remove();for(var _ in c.clipPaths)c.clipPaths[_].remove()}}}Z.exports={attr:t,name:r,idRoot:r,idRegex:a,attrRegex:a,attributes:l,layoutAttributes:WF(),supplyLayoutDefaults:Nne(),plot:i,clean:s,toSVG:Ih().toSVG}}}),YF=Ne({"src/traces/scattersmith/attributes.js"(te,Z){var{hovertemplateAttrs:v,texttemplateAttrs:w,templatefallbackAttrs:C}=Fl(),P=fi().extendFlat,t=qv(),r=tf(),a=qo(),l=r.line;Z.exports={mode:r.mode,real:{valType:"data_array",editType:"calc+clearAxisTypes"},imag:{valType:"data_array",editType:"calc+clearAxisTypes"},text:r.text,texttemplate:w({editType:"plot"},{keys:["real","imag","text"]}),texttemplatefallback:C({editType:"plot"}),hovertext:r.hovertext,line:{color:l.color,width:l.width,dash:l.dash,backoff:l.backoff,shape:P({},l.shape,{values:["linear","spline"]}),smoothing:l.smoothing,editType:"calc"},connectgaps:r.connectgaps,marker:r.marker,cliponaxis:P({},r.cliponaxis,{dflt:!1}),textposition:r.textposition,textfont:r.textfont,fill:P({},r.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:t(),hoverinfo:P({},a.hoverinfo,{flags:["real","imag","text","name"]}),hoveron:r.hoveron,hovertemplate:v(),hovertemplatefallback:C(),selected:r.selected,unselected:r.unselected}}}),Bne=Ne({"src/traces/scattersmith/defaults.js"(te,Z){var v=In(),w=yu(),C=wv(),P=Im(),t=Tv(),r=Wp(),a=uv(),l=i0().PTS_LINESONLY,i=YF();Z.exports=function(u,d,h,g){function m(_,T){return v.coerce(u,d,i,_,T)}var E=s(u,d,g,m);if(!E){d.visible=!1;return}m("mode",E<l?"lines+markers":"lines"),m("text"),m("hovertext"),d.hoveron!=="fills"&&(m("hovertemplate"),m("hovertemplatefallback")),w.hasMarkers(d)&&C(u,d,h,g,m,{gradient:!0}),w.hasLines(d)&&(P(u,d,h,g,m,{backoff:!0}),t(u,d,m),m("connectgaps")),w.hasText(d)&&(m("texttemplate"),m("texttemplatefallback"),r(u,d,g,m));var c=[];(w.hasMarkers(d)||w.hasText(d))&&(m("cliponaxis"),m("marker.maxdisplayed"),c.push("points")),m("fill"),d.fill!=="none"&&(a(u,d,h,m),w.hasLines(d)||t(u,d,m)),(d.fill==="tonext"||d.fill==="toself")&&c.push("fills"),m("hoveron",c.join("+")||"points"),v.coerceSelectionMarkerOpacity(d,m)};function s(o,u,d,h){var g=h("real"),m=h("imag"),E;return g&&m&&(E=Math.min(g.length,m.length)),v.isTypedArray(g)&&(u.real=g=Array.from(g)),v.isTypedArray(m)&&(u.imag=m=Array.from(m)),u._length=E,E}}}),jne=Ne({"src/traces/scattersmith/format_labels.js"(te,Z){var v=Os();Z.exports=function(C,P,t){var r={},a=t[P.subplot]._subplot;return r.realLabel=v.tickText(a.radialAxis,C.real,!0).text,r.imagLabel=v.tickText(a.angularAxis,C.imag,!0).text,r}}}),Une=Ne({"src/traces/scattersmith/calc.js"(te,Z){var v=Fn(),w=da().BADNUM,C=Yp(),P=s0(),t=Gh(),r=Vv().calcMarkerSize;Z.exports=function(l,i){for(var s=l._fullLayout,o=i.subplot,u=s[o].realaxis,d=s[o].imaginaryaxis,h=u.makeCalcdata(i,"real"),g=d.makeCalcdata(i,"imag"),m=i._length,E=new Array(m),c=0;c<m;c++){var _=h[c],T=g[c],M=E[c]={};v(_)&&v(T)?(M.real=_,M.imag=T):M.real=w}return r(i,m),C(l,i),P(E,i),t(E,i),E}}}),qne=Ne({"src/traces/scattersmith/plot.js"(te,Z){var v=sm(),w=da().BADNUM,C=BF(),P=C.smith;Z.exports=function(r,a,l){for(var i=a.layers.frontplot.select("g.scatterlayer"),s=a.xaxis,o=a.yaxis,u={xaxis:s,yaxis:o,plot:a.framework,layerClipId:a._hasClipOnAxisFalse?a.clipIds.forTraces:null},d=0;d<l.length;d++)for(var h=l[d],g=0;g<h.length;g++){g===0&&(h[0].trace._xA=s,h[0].trace._yA=o);var m=h[g],E=m.real;if(E===w)m.x=m.y=w;else{var c=P([E,m.imag]);m.x=c[0],m.y=c[1]}}v(r,u,l,i)}}}),Vne=Ne({"src/traces/scattersmith/hover.js"(te,Z){var v=ky();function w(P,t,r,a){var l=v(P,t,r,a);if(!(!l||l[0].index===!1)){var i=l[0];if(i.index===void 0)return l;var s=P.subplot,o=i.cd[i.index],u=i.trace;if(s.isPtInside(o))return i.xLabelVal=void 0,i.yLabelVal=void 0,C(o,u,s,i),i.hovertemplate=u.hovertemplate,l}}function C(P,t,r,a){var l=r.radialAxis,i=r.angularAxis;l._hovertitle="real",i._hovertitle="imag";var s={};s[t.subplot]={_subplot:r};var o=t._module.formatLabels(P,t,s);a.realLabel=o.realLabel,a.imagLabel=o.imagLabel;var u=P.hi||t.hoverinfo,d=[];function h(m,E){d.push(m._hovertitle+": "+E)}if(!t.hovertemplate){var g=u.split("+");g.indexOf("all")!==-1&&(g=["real","imag","text"]),g.indexOf("real")!==-1&&h(l,a.realLabel),g.indexOf("imag")!==-1&&h(i,a.imagLabel),g.indexOf("text")!==-1&&a.text&&(d.push(a.text),delete a.text),a.extraText=d.join("<br>")}}Z.exports={hoverPoints:w,makeHoverPointText:C}}}),Hne=Ne({"src/traces/scattersmith/index.js"(te,Z){Z.exports={moduleType:"trace",name:"scattersmith",basePlotModule:Fne(),categories:["smith","symbols","showLegend","scatter-like"],attributes:YF(),supplyDefaults:Bne(),colorbar:sh(),formatLabels:jne(),calc:Une(),plot:qne(),style:Xh().style,styleOnSelect:Xh().styleOnSelect,hoverPoints:Vne().hoverPoints,selectPoints:Py(),meta:{}}}}),Gne=Ne({"lib/scattersmith.js"(te,Z){Z.exports=Hne()}}),Sp=Ne({"node_modules/world-calendars/dist/main.js"(te,Z){var v=Xd();function w(){this.regionalOptions=[],this.regionalOptions[""]={invalidCalendar:"Calendar {0} not found",invalidDate:"Invalid {0} date",invalidMonth:"Invalid {0} month",invalidYear:"Invalid {0} year",differentCalendars:"Cannot mix {0} and {1} dates"},this.local=this.regionalOptions[""],this.calendars={},this._localCals={}}v(w.prototype,{instance:function(l,i){l=(l||"gregorian").toLowerCase(),i=i||"";var s=this._localCals[l+"-"+i];if(!s&&this.calendars[l]&&(s=new this.calendars[l](i),this._localCals[l+"-"+i]=s),!s)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,l);return s},newDate:function(l,i,s,o,u){return o=(l!=null&&l.year?l.calendar():typeof o=="string"?this.instance(o,u):o)||this.instance(),o.newDate(l,i,s)},substituteDigits:function(l){return function(i){return(i+"").replace(/[0-9]/g,function(s){return l[s]})}},substituteChineseDigits:function(l,i){return function(s){for(var o="",u=0;s>0;){var d=s%10;o=(d===0?"":l[d]+i[u])+o,u++,s=Math.floor(s/10)}return o.indexOf(l[1]+i[1])===0&&(o=o.substr(1)),o||l[0]}}});function C(l,i,s,o){if(this._calendar=l,this._year=i,this._month=s,this._day=o,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(a.local.invalidDate||a.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function P(l,i){return l=""+l,"000000".substring(0,i-l.length)+l}v(C.prototype,{newDate:function(l,i,s){return this._calendar.newDate(l??this,i,s)},year:function(l){return arguments.length===0?this._year:this.set(l,"y")},month:function(l){return arguments.length===0?this._month:this.set(l,"m")},day:function(l){return arguments.length===0?this._day:this.set(l,"d")},date:function(l,i,s){if(!this._calendar.isValid(l,i,s))throw(a.local.invalidDate||a.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=l,this._month=i,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(l,i){return this._calendar.add(this,l,i)},set:function(l,i){return this._calendar.set(this,l,i)},compareTo:function(l){if(this._calendar.name!==l._calendar.name)throw(a.local.differentCalendars||a.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,l._calendar.local.name);var i=this._year!==l._year?this._year-l._year:this._month!==l._month?this.monthOfYear()-l.monthOfYear():this._day-l._day;return i===0?0:i<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(l){return this._calendar.fromJD(l)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(l){return this._calendar.fromJSDate(l)},toString:function(){return(this.year()<0?"-":"")+P(Math.abs(this.year()),4)+"-"+P(this.month(),2)+"-"+P(this.day(),2)}});function t(){this.shortYearCutoff="+10"}v(t.prototype,{_validateLevel:0,newDate:function(l,i,s){return l==null?this.today():(l.year&&(this._validate(l,i,s,a.local.invalidDate||a.regionalOptions[""].invalidDate),s=l.day(),i=l.month(),l=l.year()),new C(this,l,i,s))},today:function(){return this.fromJSDate(new Date)},epoch:function(l){var i=this._validate(l,this.minMonth,this.minDay,a.local.invalidYear||a.regionalOptions[""].invalidYear);return i.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(l){var i=this._validate(l,this.minMonth,this.minDay,a.local.invalidYear||a.regionalOptions[""].invalidYear);return(i.year()<0?"-":"")+P(Math.abs(i.year()),4)},monthsInYear:function(l){return this._validate(l,this.minMonth,this.minDay,a.local.invalidYear||a.regionalOptions[""].invalidYear),12},monthOfYear:function(l,i){var s=this._validate(l,i,this.minDay,a.local.invalidMonth||a.regionalOptions[""].invalidMonth);return(s.month()+this.monthsInYear(s)-this.firstMonth)%this.monthsInYear(s)+this.minMonth},fromMonthOfYear:function(l,i){var s=(i+this.firstMonth-2*this.minMonth)%this.monthsInYear(l)+this.minMonth;return this._validate(l,s,this.minDay,a.local.invalidMonth||a.regionalOptions[""].invalidMonth),s},daysInYear:function(l){var i=this._validate(l,this.minMonth,this.minDay,a.local.invalidYear||a.regionalOptions[""].invalidYear);return this.leapYear(i)?366:365},dayOfYear:function(l,i,s){var o=this._validate(l,i,s,a.local.invalidDate||a.regionalOptions[""].invalidDate);return o.toJD()-this.newDate(o.year(),this.fromMonthOfYear(o.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(l,i,s){var o=this._validate(l,i,s,a.local.invalidDate||a.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(o))+2)%this.daysInWeek()},extraInfo:function(l,i,s){return this._validate(l,i,s,a.local.invalidDate||a.regionalOptions[""].invalidDate),{}},add:function(l,i,s){return this._validate(l,this.minMonth,this.minDay,a.local.invalidDate||a.regionalOptions[""].invalidDate),this._correctAdd(l,this._add(l,i,s),i,s)},_add:function(l,i,s){if(this._validateLevel++,s==="d"||s==="w"){var o=l.toJD()+i*(s==="w"?this.daysInWeek():1),u=l.calendar().fromJD(o);return this._validateLevel--,[u.year(),u.month(),u.day()]}try{var d=l.year()+(s==="y"?i:0),h=l.monthOfYear()+(s==="m"?i:0),u=l.day(),g=function(c){for(;h<c.minMonth;)d--,h+=c.monthsInYear(d);for(var _=c.monthsInYear(d);h>_-1+c.minMonth;)d++,h-=_,_=c.monthsInYear(d)};s==="y"?(l.month()!==this.fromMonthOfYear(d,h)&&(h=this.newDate(d,l.month(),this.minDay).monthOfYear()),h=Math.min(h,this.monthsInYear(d)),u=Math.min(u,this.daysInMonth(d,this.fromMonthOfYear(d,h)))):s==="m"&&(g(this),u=Math.min(u,this.daysInMonth(d,this.fromMonthOfYear(d,h))));var m=[d,this.fromMonthOfYear(d,h),u];return this._validateLevel--,m}catch(E){throw this._validateLevel--,E}},_correctAdd:function(l,i,s,o){if(!this.hasYearZero&&(o==="y"||o==="m")&&(i[0]===0||l.year()>0!=i[0]>0)){var u={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[o],d=s<0?-1:1;i=this._add(l,s*u[0]+d*u[1],u[2])}return l.date(i[0],i[1],i[2])},set:function(l,i,s){this._validate(l,this.minMonth,this.minDay,a.local.invalidDate||a.regionalOptions[""].invalidDate);var o=s==="y"?i:l.year(),u=s==="m"?i:l.month(),d=s==="d"?i:l.day();return(s==="y"||s==="m")&&(d=Math.min(d,this.daysInMonth(o,u))),l.date(o,u,d)},isValid:function(l,i,s){this._validateLevel++;var o=this.hasYearZero||l!==0;if(o){var u=this.newDate(l,i,this.minDay);o=i>=this.minMonth&&i-this.minMonth<this.monthsInYear(u)&&s>=this.minDay&&s-this.minDay<this.daysInMonth(u)}return this._validateLevel--,o},toJSDate:function(l,i,s){var o=this._validate(l,i,s,a.local.invalidDate||a.regionalOptions[""].invalidDate);return a.instance().fromJD(this.toJD(o)).toJSDate()},fromJSDate:function(l){return this.fromJD(a.instance().fromJSDate(l).toJD())},_validate:function(l,i,s,o){if(l.year){if(this._validateLevel===0&&this.name!==l.calendar().name)throw(a.local.differentCalendars||a.regionalOptions[""].differentCalendars).replace(/\{0\}/,this.local.name).replace(/\{1\}/,l.calendar().local.name);return l}try{if(this._validateLevel++,this._validateLevel===1&&!this.isValid(l,i,s))throw o.replace(/\{0\}/,this.local.name);var u=this.newDate(l,i,s);return this._validateLevel--,u}catch(d){throw this._validateLevel--,d}}});function r(l){this.local=this.regionalOptions[l]||this.regionalOptions[""]}r.prototype=new t,v(r.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 i=this._validate(s,this.minMonth,this.minDay,a.local.invalidYear||a.regionalOptions[""].invalidYear),s=i.year()+(i.year()<0?1:0);return s%4===0&&(s%100!==0||s%400===0)},weekOfYear:function(l,i,s){var o=this.newDate(l,i,s);return o.add(4-(o.dayOfWeek()||7),"d"),Math.floor((o.dayOfYear()-1)/7)+1},daysInMonth:function(l,i){var s=this._validate(l,i,this.minDay,a.local.invalidMonth||a.regionalOptions[""].invalidMonth);return this.daysPerMonth[s.month()-1]+(s.month()===2&&this.leapYear(s.year())?1:0)},weekDay:function(l,i,s){return(this.dayOfWeek(l,i,s)||7)<6},toJD:function(l,i,s){var o=this._validate(l,i,s,a.local.invalidDate||a.regionalOptions[""].invalidDate);l=o.year(),i=o.month(),s=o.day(),l<0&&l++,i<3&&(i+=12,l--);var u=Math.floor(l/100),d=2-u+Math.floor(u/4);return Math.floor(365.25*(l+4716))+Math.floor(30.6001*(i+1))+s+d-1524.5},fromJD:function(l){var i=Math.floor(l+.5),s=Math.floor((i-186721625e-2)/36524.25);s=i+1+s-Math.floor(s/4);var o=s+1524,u=Math.floor((o-122.1)/365.25),d=Math.floor(365.25*u),h=Math.floor((o-d)/30.6001),g=o-d-Math.floor(h*30.6001),m=h-(h>13.5?13:1),E=u-(m>2.5?4716:4715);return E<=0&&E--,this.newDate(E,m,g)},toJSDate:function(l,i,s){var o=this._validate(l,i,s,a.local.invalidDate||a.regionalOptions[""].invalidDate),u=new Date(o.year(),o.month()-1,o.day());return u.setHours(0),u.setMinutes(0),u.setSeconds(0),u.setMilliseconds(0),u.setHours(u.getHours()>12?u.getHours()+2:0),u},fromJSDate:function(l){return this.newDate(l.getFullYear(),l.getMonth()+1,l.getDate())}});var a=Z.exports=new w;a.cdate=C,a.baseCalendar=t,a.calendars.gregorian=r}}),Xne=Ne({"node_modules/world-calendars/dist/plus.js"(){var te=Xd(),Z=Sp();te(Z.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"}),Z.local=Z.regionalOptions[""],te(Z.cdate.prototype,{formatDate:function(v,w){return typeof v!="string"&&(w=v,v=""),this._calendar.formatDate(v||"",this,w)}}),te(Z.baseCalendar.prototype,{UNIX_EPOCH:Z.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:1440*60,TICKS_EPOCH:Z.instance().jdEpoch,TICKS_PER_DAY:1440*60*1e7,ATOM:"yyyy-mm-dd",COOKIE:"D, dd M yyyy",FULL:"DD, MM d, yyyy",ISO_8601:"yyyy-mm-dd",JULIAN:"J",RFC_822:"D, d M yy",RFC_850:"DD, dd-M-yy",RFC_1036:"D, d M yy",RFC_1123:"D, d M yyyy",RFC_2822:"D, d M yyyy",RSS:"D, d M yy",TICKS:"!",TIMESTAMP:"@",W3C:"yyyy-mm-dd",formatDate:function(v,w,C){if(typeof v!="string"&&(C=w,w=v,v=""),!w)return"";if(w.calendar()!==this)throw Z.local.invalidFormat||Z.regionalOptions[""].invalidFormat;v=v||this.local.dateFormat,C=C||{};var P=C.dayNamesShort||this.local.dayNamesShort,t=C.dayNames||this.local.dayNames,r=C.monthNumbers||this.local.monthNumbers,a=C.monthNamesShort||this.local.monthNamesShort,l=C.monthNames||this.local.monthNames;C.calculateWeek||this.local.calculateWeek;for(var i=function(T,M){for(var k=1;_+k<v.length&&v.charAt(_+k)===T;)k++;return _+=k-1,Math.floor(k/(M||1))>1},s=function(T,M,k,b){var A=""+M;if(i(T,b))for(;A.length<k;)A="0"+A;return A},o=function(T,M,k,b){return i(T)?b[M]:k[M]},u=this,d=function(T){return typeof r=="function"?r.call(u,T,i("m")):m(s("m",T.month(),2))},h=function(T,M){return M?typeof l=="function"?l.call(u,T):l[T.month()-u.minMonth]:typeof a=="function"?a.call(u,T):a[T.month()-u.minMonth]},g=this.local.digits,m=function(T){return C.localNumbers&&g?g(T):T},E="",c=!1,_=0;_<v.length;_++)if(c)v.charAt(_)==="'"&&!i("'")?c=!1:E+=v.charAt(_);else switch(v.charAt(_)){case"d":E+=m(s("d",w.day(),2));break;case"D":E+=o("D",w.dayOfWeek(),P,t);break;case"o":E+=s("o",w.dayOfYear(),3);break;case"w":E+=s("w",w.weekOfYear(),2);break;case"m":E+=d(w);break;case"M":E+=h(w,i("M"));break;case"y":E+=i("y",2)?w.year():(w.year()%100<10?"0":"")+w.year()%100;break;case"Y":i("Y",2),E+=w.formatYear();break;case"J":E+=w.toJD();break;case"@":E+=(w.toJD()-this.UNIX_EPOCH)*this.SECS_PER_DAY;break;case"!":E+=(w.toJD()-this.TICKS_EPOCH)*this.TICKS_PER_DAY;break;case"'":i("'")?E+="'":c=!0;break;default:E+=v.charAt(_)}return E},parseDate:function(v,w,C){if(w==null)throw Z.local.invalidArguments||Z.regionalOptions[""].invalidArguments;if(w=typeof w=="object"?w.toString():w+"",w==="")return null;v=v||this.local.dateFormat,C=C||{};var P=C.shortYearCutoff||this.shortYearCutoff;P=typeof P!="string"?P:this.today().year()%100+parseInt(P,10);for(var t=C.dayNamesShort||this.local.dayNamesShort,r=C.dayNames||this.local.dayNames,a=C.parseMonth||this.local.parseMonth,l=C.monthNumbers||this.local.monthNumbers,i=C.monthNamesShort||this.local.monthNamesShort,s=C.monthNames||this.local.monthNames,o=-1,u=-1,d=-1,h=-1,g=-1,m=!1,E=!1,c=function(N,D){for(var B=1;f+B<v.length&&v.charAt(f+B)===N;)B++;return f+=B-1,Math.floor(B/(D||1))>1},_=function(N,D){var B=c(N,D),U=[2,3,B?4:2,B?4:2,10,11,20]["oyYJ@!".indexOf(N)+1],V=new RegExp("^-?\\d{1,"+U+"}"),q=w.substring(y).match(V);if(!q)throw(Z.local.missingNumberAt||Z.regionalOptions[""].missingNumberAt).replace(/\{0\}/,y);return y+=q[0].length,parseInt(q[0],10)},T=this,M=function(){if(typeof l=="function"){c("m");var N=l.call(T,w.substring(y));return y+=N.length,N}return _("m")},k=function(N,D,B,U){for(var V=c(N,U)?B:D,q=0;q<V.length;q++)if(w.substr(y,V[q].length).toLowerCase()===V[q].toLowerCase())return y+=V[q].length,q+T.minMonth;throw(Z.local.unknownNameAt||Z.regionalOptions[""].unknownNameAt).replace(/\{0\}/,y)},b=function(){if(typeof s=="function"){var N=c("M")?s.call(T,w.substring(y)):i.call(T,w.substring(y));return y+=N.length,N}return k("M",i,s)},A=function(){if(w.charAt(y)!==v.charAt(f))throw(Z.local.unexpectedLiteralAt||Z.regionalOptions[""].unexpectedLiteralAt).replace(/\{0\}/,y);y++},y=0,f=0;f<v.length;f++)if(E)v.charAt(f)==="'"&&!c("'")?E=!1:A();else switch(v.charAt(f)){case"d":h=_("d");break;case"D":k("D",t,r);break;case"o":g=_("o");break;case"w":_("w");break;case"m":d=M();break;case"M":d=b();break;case"y":var p=f;m=!c("y",2),f=p,u=_("y",2);break;case"Y":u=_("Y",2);break;case"J":o=_("J")+.5,w.charAt(y)==="."&&(y++,_("J"));break;case"@":o=_("@")/this.SECS_PER_DAY+this.UNIX_EPOCH;break;case"!":o=_("!")/this.TICKS_PER_DAY+this.TICKS_EPOCH;break;case"*":y=w.length;break;case"'":c("'")?A():E=!0;break;default:A()}if(y<w.length)throw Z.local.unexpectedText||Z.regionalOptions[""].unexpectedText;if(u===-1?u=this.today().year():u<100&&m&&(u+=P===-1?1900:this.today().year()-this.today().year()%100-(u<=P?0:100)),typeof d=="string"&&(d=a.call(this,u,d)),g>-1){d=1,h=g;for(var x=this.daysInMonth(u,d);h>x;x=this.daysInMonth(u,d))d++,h-=x}return o>-1?this.fromJD(o):this.newDate(u,d,h)},determineDate:function(v,w,C,P,t){C&&typeof C!="object"&&(t=P,P=C,C=null),typeof P!="string"&&(t=P,P="");var r=this,a=function(l){try{return r.parseDate(P,l,t)}catch{}l=l.toLowerCase();for(var i=(l.match(/^c/)&&C?C.newDate():null)||r.today(),s=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,o=s.exec(l);o;)i.add(parseInt(o[1],10),o[2]||"d"),o=s.exec(l);return i};return w=w?w.newDate():null,v=v==null?w:typeof v=="string"?a(v):typeof v=="number"?isNaN(v)||v===1/0||v===-1/0?w:r.today().add(v,"d"):r.newDate(v),v}})}}),Wne=Ne({"node_modules/world-calendars/dist/calendars/chinese.js"(){var te=Sp(),Z=Xd(),v=te.instance();function w(o){this.local=this.regionalOptions[o||""]||this.regionalOptions[""]}w.prototype=new te.baseCalendar,Z(w.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(o,u){if(typeof o=="string"){var d=o.match(P);return d?d[0]:""}var h=this._validateYear(o),g=o.month(),m=""+this.toChineseMonth(h,g);return u&&m.length<2&&(m="0"+m),this.isIntercalaryMonth(h,g)&&(m+="i"),m},monthNames:function(o){if(typeof o=="string"){var u=o.match(t);return u?u[0]:""}var d=this._validateYear(o),h=o.month(),g=this.toChineseMonth(d,h),m=["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"][g-1];return this.isIntercalaryMonth(d,h)&&(m="闰"+m),m},monthNamesShort:function(o){if(typeof o=="string"){var u=o.match(r);return u?u[0]:""}var d=this._validateYear(o),h=o.month(),g=this.toChineseMonth(d,h),m=["一","二","三","四","五","六","七","八","九","十","十一","十二"][g-1];return this.isIntercalaryMonth(d,h)&&(m="闰"+m),m},parseMonth:function(o,u){o=this._validateYear(o);var d=parseInt(u),h;if(isNaN(d))u[0]==="闰"&&(h=!0,u=u.substring(1)),u[u.length-1]==="月"&&(u=u.substring(0,u.length-1)),d=1+["一","二","三","四","五","六","七","八","九","十","十一","十二"].indexOf(u);else{var g=u[u.length-1];h=g==="i"||g==="I"}var m=this.toMonthIndex(o,d,h);return m},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(o,u){if(o.year&&(o=o.year()),typeof o!="number"||o<1888||o>2111)throw u.replace(/\{0\}/,this.local.name);return o},toMonthIndex:function(o,u,d){var h=this.intercalaryMonth(o),g=d&&u!==h;if(g||u<1||u>12)throw te.local.invalidMonth.replace(/\{0\}/,this.local.name);var m;return h?!d&&u<=h?m=u-1:m=u:m=u-1,m},toChineseMonth:function(o,u){o.year&&(o=o.year(),u=o.month());var d=this.intercalaryMonth(o),h=d?12:11;if(u<0||u>h)throw te.local.invalidMonth.replace(/\{0\}/,this.local.name);var g;return d?u<d?g=u+1:g=u:g=u+1,g},intercalaryMonth:function(o){o=this._validateYear(o);var u=a[o-a[0]],d=u>>13;return d},isIntercalaryMonth:function(o,u){o.year&&(o=o.year(),u=o.month());var d=this.intercalaryMonth(o);return!!d&&d===u},leapYear:function(o){return this.intercalaryMonth(o)!==0},weekOfYear:function(o,u,d){var h=this._validateYear(o,te.local.invalidyear),g=l[h-l[0]],m=g>>9&4095,E=g>>5&15,c=g&31,_;_=v.newDate(m,E,c),_.add(4-(_.dayOfWeek()||7),"d");var T=this.toJD(o,u,d)-_.toJD();return 1+Math.floor(T/7)},monthsInYear:function(o){return this.leapYear(o)?13:12},daysInMonth:function(o,u){o.year&&(u=o.month(),o=o.year()),o=this._validateYear(o);var d=a[o-a[0]],h=d>>13,g=h?12:11;if(u>g)throw te.local.invalidMonth.replace(/\{0\}/,this.local.name);var m=d&1<<12-u?30:29;return m},weekDay:function(o,u,d){return(this.dayOfWeek(o,u,d)||7)<6},toJD:function(o,u,d){var h=this._validate(o,m,d,te.local.invalidDate);o=this._validateYear(h.year()),u=h.month(),d=h.day();var g=this.isIntercalaryMonth(o,u),m=this.toChineseMonth(o,u),E=s(o,m,d,g);return v.toJD(E.year,E.month,E.day)},fromJD:function(o){var u=v.fromJD(o),d=i(u.year(),u.month(),u.day()),h=this.toMonthIndex(d.year,d.month,d.isIntercalary);return this.newDate(d.year,h,d.day)},fromString:function(o){var u=o.match(C),d=this._validateYear(+u[1]),h=+u[2],g=!!u[3],m=this.toMonthIndex(d,h,g),E=+u[4];return this.newDate(d,m,E)},add:function(o,u,d){var h=o.year(),g=o.month(),m=this.isIntercalaryMonth(h,g),E=this.toChineseMonth(h,g),c=Object.getPrototypeOf(w.prototype).add.call(this,o,u,d);if(d==="y"){var _=c.year(),T=c.month(),M=this.isIntercalaryMonth(_,E),k=m&&M?this.toMonthIndex(_,E,!0):this.toMonthIndex(_,E,!1);k!==T&&c.month(k)}return c}});var C=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,P=/^\d?\d[iI]?/m,t=/^闰?十?[一二三四五六七八九]?月/m,r=/^闰?十?[一二三四五六七八九]?/m;te.calendars.chinese=w;var a=[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],l=[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 i(o,u,d,h){var g,m;if(typeof o=="object")g=o,m=u||{};else{var E=typeof o=="number"&&o>=1888&&o<=2111;if(!E)throw new Error("Solar year outside range 1888-2111");var c=typeof u=="number"&&u>=1&&u<=12;if(!c)throw new Error("Solar month outside range 1 - 12");var _=typeof d=="number"&&d>=1&&d<=31;if(!_)throw new Error("Solar day outside range 1 - 31");g={year:o,month:u,day:d},m={}}var T=l[g.year-l[0]],M=g.year<<9|g.month<<5|g.day;m.year=M>=T?g.year:g.year-1,T=l[m.year-l[0]];var k=T>>9&4095,b=T>>5&15,A=T&31,y,f=new Date(k,b-1,A),p=new Date(g.year,g.month-1,g.day);y=Math.round((p-f)/(24*3600*1e3));var x=a[m.year-a[0]],N;for(N=0;N<13;N++){var D=x&1<<12-N?30:29;if(y<D)break;y-=D}var B=x>>13;return!B||N<B?(m.isIntercalary=!1,m.month=1+N):N===B?(m.isIntercalary=!0,m.month=N):(m.isIntercalary=!1,m.month=N),m.day=1+y,m}function s(o,u,d,h,g){var m,E;if(typeof o=="object")E=o,m=u||{};else{var c=typeof o=="number"&&o>=1888&&o<=2111;if(!c)throw new Error("Lunar year outside range 1888-2111");var _=typeof u=="number"&&u>=1&&u<=12;if(!_)throw new Error("Lunar month outside range 1 - 12");var T=typeof d=="number"&&d>=1&&d<=30;if(!T)throw new Error("Lunar day outside range 1 - 30");var M;typeof h=="object"?(M=!1,m=h):(M=!!h,m={}),E={year:o,month:u,day:d,isIntercalary:M}}var k;k=E.day-1;var b=a[E.year-a[0]],A=b>>13,y;A&&(E.month>A||E.isIntercalary)?y=E.month:y=E.month-1;for(var f=0;f<y;f++){var p=b&1<<12-f?30:29;k+=p}var x=l[E.year-l[0]],N=x>>9&4095,D=x>>5&15,B=x&31,U=new Date(N,D-1,B+k);return m.year=U.getFullYear(),m.month=1+U.getMonth(),m.day=U.getDate(),m}}}),Yne=Ne({"node_modules/world-calendars/dist/calendars/coptic.js"(){var te=Sp(),Z=Xd();function v(w){this.local=this.regionalOptions[w||""]||this.regionalOptions[""]}v.prototype=new te.baseCalendar,Z(v.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(P){var C=this._validate(P,this.minMonth,this.minDay,te.local.invalidYear),P=C.year()+(C.year()<0?1:0);return P%4===3||P%4===-1},monthsInYear:function(w){return this._validate(w,this.minMonth,this.minDay,te.local.invalidYear||te.regionalOptions[""].invalidYear),13},weekOfYear:function(w,C,P){var t=this.newDate(w,C,P);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(w,C){var P=this._validate(w,C,this.minDay,te.local.invalidMonth);return this.daysPerMonth[P.month()-1]+(P.month()===13&&this.leapYear(P.year())?1:0)},weekDay:function(w,C,P){return(this.dayOfWeek(w,C,P)||7)<6},toJD:function(w,C,P){var t=this._validate(w,C,P,te.local.invalidDate);return w=t.year(),w<0&&w++,t.day()+(t.month()-1)*30+(w-1)*365+Math.floor(w/4)+this.jdEpoch-1},fromJD:function(w){var C=Math.floor(w)+.5-this.jdEpoch,P=Math.floor((C-Math.floor((C+366)/1461))/365)+1;P<=0&&P--,C=Math.floor(w)+.5-this.newDate(P,1,1).toJD();var t=Math.floor(C/30)+1,r=C-(t-1)*30+1;return this.newDate(P,t,r)}}),te.calendars.coptic=v}}),Zne=Ne({"node_modules/world-calendars/dist/calendars/discworld.js"(){var te=Sp(),Z=Xd();function v(C){this.local=this.regionalOptions[C||""]||this.regionalOptions[""]}v.prototype=new te.baseCalendar,Z(v.prototype,{name:"Discworld",jdEpoch:17214255e-1,daysPerMonth:[16,32,32,32,32,32,32,32,32,32,32,32,32],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Discworld",epochs:["BUC","UC"],monthNames:["Ick","Offle","February","March","April","May","June","Grune","August","Spune","Sektober","Ember","December"],monthNamesShort:["Ick","Off","Feb","Mar","Apr","May","Jun","Gru","Aug","Spu","Sek","Emb","Dec"],dayNames:["Sunday","Octeday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Oct","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Oc","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:2,isRTL:!1}},leapYear:function(C){return this._validate(C,this.minMonth,this.minDay,te.local.invalidYear),!1},monthsInYear:function(C){return this._validate(C,this.minMonth,this.minDay,te.local.invalidYear),13},daysInYear:function(C){return this._validate(C,this.minMonth,this.minDay,te.local.invalidYear),400},weekOfYear:function(C,P,t){var r=this.newDate(C,P,t);return r.add(-r.dayOfWeek(),"d"),Math.floor((r.dayOfYear()-1)/8)+1},daysInMonth:function(C,P){var t=this._validate(C,P,this.minDay,te.local.invalidMonth);return this.daysPerMonth[t.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(C,P,t){var r=this._validate(C,P,t,te.local.invalidDate);return(r.day()+1)%8},weekDay:function(C,P,t){var r=this.dayOfWeek(C,P,t);return r>=2&&r<=6},extraInfo:function(C,P,t){var r=this._validate(C,P,t,te.local.invalidDate);return{century:w[Math.floor((r.year()-1)/100)+1]||""}},toJD:function(C,P,t){var r=this._validate(C,P,t,te.local.invalidDate);return C=r.year()+(r.year()<0?1:0),P=r.month(),t=r.day(),t+(P>1?16:0)+(P>2?(P-2)*32:0)+(C-1)*400+this.jdEpoch-1},fromJD:function(C){C=Math.floor(C+.5)-Math.floor(this.jdEpoch)-1;var P=Math.floor(C/400)+1;C-=(P-1)*400,C+=C>15?16:0;var t=Math.floor(C/32)+1,r=C-(t-1)*32+1;return this.newDate(P<=0?P-1:P,t,r)}});var w={20:"Fruitbat",21:"Anchovy"};te.calendars.discworld=v}}),$ne=Ne({"node_modules/world-calendars/dist/calendars/ethiopian.js"(){var te=Sp(),Z=Xd();function v(w){this.local=this.regionalOptions[w||""]||this.regionalOptions[""]}v.prototype=new te.baseCalendar,Z(v.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(P){var C=this._validate(P,this.minMonth,this.minDay,te.local.invalidYear),P=C.year()+(C.year()<0?1:0);return P%4===3||P%4===-1},monthsInYear:function(w){return this._validate(w,this.minMonth,this.minDay,te.local.invalidYear||te.regionalOptions[""].invalidYear),13},weekOfYear:function(w,C,P){var t=this.newDate(w,C,P);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(w,C){var P=this._validate(w,C,this.minDay,te.local.invalidMonth);return this.daysPerMonth[P.month()-1]+(P.month()===13&&this.leapYear(P.year())?1:0)},weekDay:function(w,C,P){return(this.dayOfWeek(w,C,P)||7)<6},toJD:function(w,C,P){var t=this._validate(w,C,P,te.local.invalidDate);return w=t.year(),w<0&&w++,t.day()+(t.month()-1)*30+(w-1)*365+Math.floor(w/4)+this.jdEpoch-1},fromJD:function(w){var C=Math.floor(w)+.5-this.jdEpoch,P=Math.floor((C-Math.floor((C+366)/1461))/365)+1;P<=0&&P--,C=Math.floor(w)+.5-this.newDate(P,1,1).toJD();var t=Math.floor(C/30)+1,r=C-(t-1)*30+1;return this.newDate(P,t,r)}}),te.calendars.ethiopian=v}}),Kne=Ne({"node_modules/world-calendars/dist/calendars/hebrew.js"(){var te=Sp(),Z=Xd();function v(C){this.local=this.regionalOptions[C||""]||this.regionalOptions[""]}v.prototype=new te.baseCalendar,Z(v.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(C){var P=this._validate(C,this.minMonth,this.minDay,te.local.invalidYear);return this._leapYear(P.year())},_leapYear:function(C){return C=C<0?C+1:C,w(C*7+1,19)<7},monthsInYear:function(C){return this._validate(C,this.minMonth,this.minDay,te.local.invalidYear),this._leapYear(C.year?C.year():C)?13:12},weekOfYear:function(C,P,t){var r=this.newDate(C,P,t);return r.add(-r.dayOfWeek(),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInYear:function(C){var P=this._validate(C,this.minMonth,this.minDay,te.local.invalidYear);return C=P.year(),this.toJD(C===-1?1:C+1,7,1)-this.toJD(C,7,1)},daysInMonth:function(C,P){return C.year&&(P=C.month(),C=C.year()),this._validate(C,P,this.minDay,te.local.invalidMonth),P===12&&this.leapYear(C)||P===8&&w(this.daysInYear(C),10)===5?30:P===9&&w(this.daysInYear(C),10)===3?29:this.daysPerMonth[P-1]},weekDay:function(C,P,t){return this.dayOfWeek(C,P,t)!==6},extraInfo:function(C,P,t){var r=this._validate(C,P,t,te.local.invalidDate);return{yearType:(this.leapYear(r)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(r)%10-3]}},toJD:function(C,P,t){var r=this._validate(C,P,t,te.local.invalidDate);C=r.year(),P=r.month(),t=r.day();var a=C<=0?C+1:C,l=this.jdEpoch+this._delay1(a)+this._delay2(a)+t+1;if(P<7){for(var i=7;i<=this.monthsInYear(C);i++)l+=this.daysInMonth(C,i);for(var i=1;i<P;i++)l+=this.daysInMonth(C,i)}else for(var i=7;i<P;i++)l+=this.daysInMonth(C,i);return l},_delay1:function(C){var P=Math.floor((235*C-234)/19),t=12084+13753*P,r=P*29+Math.floor(t/25920);return w(3*(r+1),7)<3&&r++,r},_delay2:function(C){var P=this._delay1(C-1),t=this._delay1(C),r=this._delay1(C+1);return r-t===356?2:t-P===382?1:0},fromJD:function(C){C=Math.floor(C)+.5;for(var P=Math.floor((C-this.jdEpoch)*98496/35975351)-1;C>=this.toJD(P===-1?1:P+1,7,1);)P++;for(var t=C<this.toJD(P,1,1)?7:1;C>this.toJD(P,t,this.daysInMonth(P,t));)t++;var r=C-this.toJD(P,t,1)+1;return this.newDate(P,t,r)}});function w(C,P){return C-P*Math.floor(C/P)}te.calendars.hebrew=v}}),Jne=Ne({"node_modules/world-calendars/dist/calendars/islamic.js"(){var te=Sp(),Z=Xd();function v(w){this.local=this.regionalOptions[w||""]||this.regionalOptions[""]}v.prototype=new te.baseCalendar,Z(v.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(w){var C=this._validate(w,this.minMonth,this.minDay,te.local.invalidYear);return(C.year()*11+14)%30<11},weekOfYear:function(w,C,P){var t=this.newDate(w,C,P);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInYear:function(w){return this.leapYear(w)?355:354},daysInMonth:function(w,C){var P=this._validate(w,C,this.minDay,te.local.invalidMonth);return this.daysPerMonth[P.month()-1]+(P.month()===12&&this.leapYear(P.year())?1:0)},weekDay:function(w,C,P){return this.dayOfWeek(w,C,P)!==5},toJD:function(w,C,P){var t=this._validate(w,C,P,te.local.invalidDate);return w=t.year(),C=t.month(),P=t.day(),w=w<=0?w+1:w,P+Math.ceil(29.5*(C-1))+(w-1)*354+Math.floor((3+11*w)/30)+this.jdEpoch-1},fromJD:function(w){w=Math.floor(w)+.5;var C=Math.floor((30*(w-this.jdEpoch)+10646)/10631);C=C<=0?C-1:C;var P=Math.min(12,Math.ceil((w-29-this.toJD(C,1,1))/29.5)+1),t=w-this.toJD(C,P,1)+1;return this.newDate(C,P,t)}}),te.calendars.islamic=v}}),Qne=Ne({"node_modules/world-calendars/dist/calendars/julian.js"(){var te=Sp(),Z=Xd();function v(w){this.local=this.regionalOptions[w||""]||this.regionalOptions[""]}v.prototype=new te.baseCalendar,Z(v.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(P){var C=this._validate(P,this.minMonth,this.minDay,te.local.invalidYear),P=C.year()<0?C.year()+1:C.year();return P%4===0},weekOfYear:function(w,C,P){var t=this.newDate(w,C,P);return t.add(4-(t.dayOfWeek()||7),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(w,C){var P=this._validate(w,C,this.minDay,te.local.invalidMonth);return this.daysPerMonth[P.month()-1]+(P.month()===2&&this.leapYear(P.year())?1:0)},weekDay:function(w,C,P){return(this.dayOfWeek(w,C,P)||7)<6},toJD:function(w,C,P){var t=this._validate(w,C,P,te.local.invalidDate);return w=t.year(),C=t.month(),P=t.day(),w<0&&w++,C<=2&&(w--,C+=12),Math.floor(365.25*(w+4716))+Math.floor(30.6001*(C+1))+P-1524.5},fromJD:function(w){var C=Math.floor(w+.5),P=C+1524,t=Math.floor((P-122.1)/365.25),r=Math.floor(365.25*t),a=Math.floor((P-r)/30.6001),l=a-Math.floor(a<14?1:13),i=t-Math.floor(l>2?4716:4715),s=P-r-Math.floor(30.6001*a);return i<=0&&i--,this.newDate(i,l,s)}}),te.calendars.julian=v}}),eae=Ne({"node_modules/world-calendars/dist/calendars/mayan.js"(){var te=Sp(),Z=Xd();function v(P){this.local=this.regionalOptions[P||""]||this.regionalOptions[""]}v.prototype=new te.baseCalendar,Z(v.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(P){return this._validate(P,this.minMonth,this.minDay,te.local.invalidYear),!1},formatYear:function(P){var t=this._validate(P,this.minMonth,this.minDay,te.local.invalidYear);P=t.year();var r=Math.floor(P/400);P=P%400,P+=P<0?400:0;var a=Math.floor(P/20);return r+"."+a+"."+P%20},forYear:function(P){if(P=P.split("."),P.length<3)throw"Invalid Mayan year";for(var t=0,r=0;r<P.length;r++){var a=parseInt(P[r],10);if(Math.abs(a)>19||r>0&&a<0)throw"Invalid Mayan year";t=t*20+a}return t},monthsInYear:function(P){return this._validate(P,this.minMonth,this.minDay,te.local.invalidYear),18},weekOfYear:function(P,t,r){return this._validate(P,t,r,te.local.invalidDate),0},daysInYear:function(P){return this._validate(P,this.minMonth,this.minDay,te.local.invalidYear),360},daysInMonth:function(P,t){return this._validate(P,t,this.minDay,te.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(P,t,r){var a=this._validate(P,t,r,te.local.invalidDate);return a.day()},weekDay:function(P,t,r){return this._validate(P,t,r,te.local.invalidDate),!0},extraInfo:function(P,t,r){var a=this._validate(P,t,r,te.local.invalidDate),l=a.toJD(),i=this._toHaab(l),s=this._toTzolkin(l);return{haabMonthName:this.local.haabMonths[i[0]-1],haabMonth:i[0],haabDay:i[1],tzolkinDayName:this.local.tzolkinMonths[s[0]-1],tzolkinDay:s[0],tzolkinTrecena:s[1]}},_toHaab:function(P){P-=this.jdEpoch;var t=w(P+8+340,365);return[Math.floor(t/20)+1,w(t,20)]},_toTzolkin:function(P){return P-=this.jdEpoch,[C(P+20,20),C(P+4,13)]},toJD:function(P,t,r){var a=this._validate(P,t,r,te.local.invalidDate);return a.day()+a.month()*20+a.year()*360+this.jdEpoch},fromJD:function(P){P=Math.floor(P)+.5-this.jdEpoch;var t=Math.floor(P/360);P=P%360,P+=P<0?360:0;var r=Math.floor(P/20),a=P%20;return this.newDate(t,r,a)}});function w(P,t){return P-t*Math.floor(P/t)}function C(P,t){return w(P-1,t)+1}te.calendars.mayan=v}}),tae=Ne({"node_modules/world-calendars/dist/calendars/nanakshahi.js"(){var te=Sp(),Z=Xd();function v(C){this.local=this.regionalOptions[C||""]||this.regionalOptions[""]}v.prototype=new te.baseCalendar;var w=te.instance("gregorian");Z(v.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(C){var P=this._validate(C,this.minMonth,this.minDay,te.local.invalidYear||te.regionalOptions[""].invalidYear);return w.leapYear(P.year()+(P.year()<1?1:0)+1469)},weekOfYear:function(C,P,t){var r=this.newDate(C,P,t);return r.add(1-(r.dayOfWeek()||7),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInMonth:function(C,P){var t=this._validate(C,P,this.minDay,te.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===12&&this.leapYear(t.year())?1:0)},weekDay:function(C,P,t){return(this.dayOfWeek(C,P,t)||7)<6},toJD:function(a,P,t){var r=this._validate(a,P,t,te.local.invalidMonth),a=r.year();a<0&&a++;for(var l=r.day(),i=1;i<r.month();i++)l+=this.daysPerMonth[i-1];return l+w.toJD(a+1468,3,13)},fromJD:function(C){C=Math.floor(C+.5);for(var P=Math.floor((C-(this.jdEpoch-1))/366);C>=this.toJD(P+1,1,1);)P++;for(var t=C-Math.floor(this.toJD(P,1,1)+.5)+1,r=1;t>this.daysInMonth(P,r);)t-=this.daysInMonth(P,r),r++;return this.newDate(P,r,t)}}),te.calendars.nanakshahi=v}}),rae=Ne({"node_modules/world-calendars/dist/calendars/nepali.js"(){var te=Sp(),Z=Xd();function v(w){this.local=this.regionalOptions[w||""]||this.regionalOptions[""]}v.prototype=new te.baseCalendar,Z(v.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(w){return this.daysInYear(w)!==this.daysPerYear},weekOfYear:function(w,C,P){var t=this.newDate(w,C,P);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInYear:function(w){var C=this._validate(w,this.minMonth,this.minDay,te.local.invalidYear);if(w=C.year(),typeof this.NEPALI_CALENDAR_DATA[w]>"u")return this.daysPerYear;for(var P=0,t=this.minMonth;t<=12;t++)P+=this.NEPALI_CALENDAR_DATA[w][t];return P},daysInMonth:function(w,C){return w.year&&(C=w.month(),w=w.year()),this._validate(w,C,this.minDay,te.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[w]>"u"?this.daysPerMonth[C-1]:this.NEPALI_CALENDAR_DATA[w][C]},weekDay:function(w,C,P){return this.dayOfWeek(w,C,P)!==6},toJD:function(w,C,P){var t=this._validate(w,C,P,te.local.invalidDate);w=t.year(),C=t.month(),P=t.day();var r=te.instance(),a=0,l=C,i=w;this._createMissingCalendarData(w);var s=w-(l>9||l===9&&P>=this.NEPALI_CALENDAR_DATA[i][0]?56:57);for(C!==9&&(a=P,l--);l!==9;)l<=0&&(l=12,i--),a+=this.NEPALI_CALENDAR_DATA[i][l],l--;return C===9?(a+=P-this.NEPALI_CALENDAR_DATA[i][0],a<0&&(a+=r.daysInYear(s))):a+=this.NEPALI_CALENDAR_DATA[i][9]-this.NEPALI_CALENDAR_DATA[i][0],r.newDate(s,1,1).add(a,"d").toJD()},fromJD:function(w){var C=te.instance(),P=C.fromJD(w),t=P.year(),r=P.dayOfYear(),a=t+56;this._createMissingCalendarData(a);for(var l=9,i=this.NEPALI_CALENDAR_DATA[a][0],s=this.NEPALI_CALENDAR_DATA[a][l]-i+1;r>s;)l++,l>12&&(l=1,a++),s+=this.NEPALI_CALENDAR_DATA[a][l];var o=this.NEPALI_CALENDAR_DATA[a][l]-(s-r);return this.newDate(a,l,o)},_createMissingCalendarData:function(w){var C=this.daysPerMonth.slice(0);C.unshift(17);for(var P=w-1;P<w+2;P++)typeof this.NEPALI_CALENDAR_DATA[P]>"u"&&(this.NEPALI_CALENDAR_DATA[P]=C)},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]}}),te.calendars.nepali=v}}),nae=Ne({"node_modules/world-calendars/dist/calendars/persian.js"(){var te=Sp(),Z=Xd();function v(C){this.local=this.regionalOptions[C||""]||this.regionalOptions[""]}function w(C){var P=C-475;C<0&&P++;var t=.242197,r=t*P,a=t*(P+1),l=r-Math.floor(r),i=a-Math.floor(a);return l>i}v.prototype=new te.baseCalendar,Z(v.prototype,{name:"Persian",jdEpoch:19483205e-1,daysPerMonth:[31,31,31,31,31,31,30,30,30,30,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Persian",epochs:["BP","AP"],monthNames:["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Dey","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Dey","Bah","Esf"],dayNames:["Yekshanbeh","Doshanbeh","Seshanbeh","Chahārshanbeh","Panjshanbeh","Jom'eh","Shanbeh"],dayNamesShort:["Yek","Do","Se","Cha","Panj","Jom","Sha"],dayNamesMin:["Ye","Do","Se","Ch","Pa","Jo","Sh"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(C){var P=this._validate(C,this.minMonth,this.minDay,te.local.invalidYear);return w(P.year())},weekOfYear:function(C,P,t){var r=this.newDate(C,P,t);return r.add(-((r.dayOfWeek()+1)%7),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInMonth:function(C,P){var t=this._validate(C,P,this.minDay,te.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===12&&this.leapYear(t.year())?1:0)},weekDay:function(C,P,t){return this.dayOfWeek(C,P,t)!==5},toJD:function(C,P,t){var r=this._validate(C,P,t,te.local.invalidDate);C=r.year(),P=r.month(),t=r.day();var a=0;if(C>0)for(var l=1;l<C;l++)w(l)&&a++;else if(C<0)for(var l=C;l<0;l++)w(l)&&a--;return t+(P<=7?(P-1)*31:(P-1)*30+6)+(C>0?C-1:C)*365+a+this.jdEpoch-1},fromJD:function(C){C=Math.floor(C)+.5;var P=475+(C-this.toJD(475,1,1))/365.242197,t=Math.floor(P);t<=0&&t--,C>this.toJD(t,12,w(t)?30:29)&&(t++,t===0&&t++);var r=C-this.toJD(t,1,1)+1,a=r<=186?Math.ceil(r/31):Math.ceil((r-6)/30),l=C-this.toJD(t,a,1)+1;return this.newDate(t,a,l)}}),te.calendars.persian=v,te.calendars.jalali=v}}),aae=Ne({"node_modules/world-calendars/dist/calendars/taiwan.js"(){var te=Sp(),Z=Xd(),v=te.instance();function w(C){this.local=this.regionalOptions[C||""]||this.regionalOptions[""]}w.prototype=new te.baseCalendar,Z(w.prototype,{name:"Taiwan",jdEpoch:24194025e-1,yearsOffset:1911,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Taiwan",epochs:["BROC","ROC"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},leapYear:function(t){var P=this._validate(t,this.minMonth,this.minDay,te.local.invalidYear),t=this._t2gYear(P.year());return v.leapYear(t)},weekOfYear:function(a,P,t){var r=this._validate(a,this.minMonth,this.minDay,te.local.invalidYear),a=this._t2gYear(r.year());return v.weekOfYear(a,r.month(),r.day())},daysInMonth:function(C,P){var t=this._validate(C,P,this.minDay,te.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===2&&this.leapYear(t.year())?1:0)},weekDay:function(C,P,t){return(this.dayOfWeek(C,P,t)||7)<6},toJD:function(a,P,t){var r=this._validate(a,P,t,te.local.invalidDate),a=this._t2gYear(r.year());return v.toJD(a,r.month(),r.day())},fromJD:function(C){var P=v.fromJD(C),t=this._g2tYear(P.year());return this.newDate(t,P.month(),P.day())},_t2gYear:function(C){return C+this.yearsOffset+(C>=-this.yearsOffset&&C<=-1?1:0)},_g2tYear:function(C){return C-this.yearsOffset-(C>=1&&C<=this.yearsOffset?1:0)}}),te.calendars.taiwan=w}}),iae=Ne({"node_modules/world-calendars/dist/calendars/thai.js"(){var te=Sp(),Z=Xd(),v=te.instance();function w(C){this.local=this.regionalOptions[C||""]||this.regionalOptions[""]}w.prototype=new te.baseCalendar,Z(w.prototype,{name:"Thai",jdEpoch:15230985e-1,yearsOffset:543,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Thai",epochs:["BBE","BE"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var P=this._validate(t,this.minMonth,this.minDay,te.local.invalidYear),t=this._t2gYear(P.year());return v.leapYear(t)},weekOfYear:function(a,P,t){var r=this._validate(a,this.minMonth,this.minDay,te.local.invalidYear),a=this._t2gYear(r.year());return v.weekOfYear(a,r.month(),r.day())},daysInMonth:function(C,P){var t=this._validate(C,P,this.minDay,te.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===2&&this.leapYear(t.year())?1:0)},weekDay:function(C,P,t){return(this.dayOfWeek(C,P,t)||7)<6},toJD:function(a,P,t){var r=this._validate(a,P,t,te.local.invalidDate),a=this._t2gYear(r.year());return v.toJD(a,r.month(),r.day())},fromJD:function(C){var P=v.fromJD(C),t=this._g2tYear(P.year());return this.newDate(t,P.month(),P.day())},_t2gYear:function(C){return C-this.yearsOffset-(C>=1&&C<=this.yearsOffset?1:0)},_g2tYear:function(C){return C+this.yearsOffset+(C>=-this.yearsOffset&&C<=-1?1:0)}}),te.calendars.thai=w}}),oae=Ne({"node_modules/world-calendars/dist/calendars/ummalqura.js"(){var te=Sp(),Z=Xd();function v(C){this.local=this.regionalOptions[C||""]||this.regionalOptions[""]}v.prototype=new te.baseCalendar,Z(v.prototype,{name:"UmmAlQura",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Umm al-Qura",epochs:["BH","AH"],monthNames:["Al-Muharram","Safar","Rabi' al-awwal","Rabi' Al-Thani","Jumada Al-Awwal","Jumada Al-Thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-Ahad","Yawm al-Ithnain","Yawm al-Thalāthā’","Yawm al-Arba‘ā’","Yawm al-Khamīs","Yawm al-Jum‘a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(C){var P=this._validate(C,this.minMonth,this.minDay,te.local.invalidYear);return this.daysInYear(P.year())===355},weekOfYear:function(C,P,t){var r=this.newDate(C,P,t);return r.add(-r.dayOfWeek(),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInYear:function(C){for(var P=0,t=1;t<=12;t++)P+=this.daysInMonth(C,t);return P},daysInMonth:function(C,P){for(var t=this._validate(C,P,this.minDay,te.local.invalidMonth),r=t.toJD()-24e5+.5,a=0,l=0;l<w.length;l++){if(w[l]>r)return w[a]-w[a-1];a++}return 30},weekDay:function(C,P,t){return this.dayOfWeek(C,P,t)!==5},toJD:function(C,P,t){var r=this._validate(C,P,t,te.local.invalidDate),a=12*(r.year()-1)+r.month()-15292,l=r.day()+w[a-1]-1;return l+24e5-.5},fromJD:function(C){for(var P=C-24e5+.5,t=0,r=0;r<w.length&&!(w[r]>P);r++)t++;var a=t+15292,l=Math.floor((a-1)/12),i=l+1,s=a-12*l,o=P-w[t-1]+1;return this.newDate(i,s,o)},isValid:function(C,P,t){var r=te.baseCalendar.prototype.isValid.apply(this,arguments);return r&&(C=C.year!=null?C.year:C,r=C>=1276&&C<=1500),r},_validate:function(C,P,t,r){var a=te.baseCalendar.prototype._validate.apply(this,arguments);if(a.year<1276||a.year>1500)throw r.replace(/\{0\}/,this.local.name);return a}}),te.calendars.ummalqura=v;var w=[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]}}),sae=Ne({"src/components/calendars/calendars.js"(te,Z){Z.exports=Sp(),Xne(),Wne(),Yne(),Zne(),$ne(),Kne(),Jne(),Qne(),eae(),tae(),rae(),nae(),aae(),iae(),oae()}}),lae=Ne({"src/components/calendars/index.js"(te,Z){var v=sae(),w=In(),C=da(),P=C.EPOCHJD,t=C.ONEDAY,r={valType:"enumerated",values:w.sortObjectKeys(v.calendars),editType:"calc",dflt:"gregorian"},a=function(b,A,y,f){var p={};return p[y]=r,w.coerce(b,A,p,y,f)},l=function(b,A,y,f){for(var p=0;p<y.length;p++)a(b,A,y[p]+"calendar",f.calendar)},i={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"},o={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"]},u="##",d={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:u,w:u,c:{0:"D M d %X yyyy","-":"D M d %X yyyy"},x:{0:"mm/dd/yyyy","-":"mm/dd/yyyy"}};function h(b,A,y){for(var f=Math.floor((A+.05)/t)+P,p=m(y).fromJD(f),x=0,N,D,B,U,V;(x=b.indexOf("%",x))!==-1;)N=b.charAt(x+1),N==="0"||N==="-"||N==="_"?(B=3,D=b.charAt(x+2),N==="_"&&(N="-")):(D=N,N="0",B=2),U=d[D],U?(U===u?V=u:V=p.formatDate(U[N]),b=b.substr(0,x)+V+b.substr(x+B),x+=V.length):x+=B;return b}var g={};function m(b){var A=g[b];return A||(A=g[b]=v.instance(b),A)}function E(b){return w.extendFlat({},r,{description:b})}function c(b){return"Sets the calendar system to use with `"+b+"` date data."}var _={xcalendar:E(c("x"))},T=w.extendFlat({},_,{ycalendar:E(c("y"))}),M=w.extendFlat({},T,{zcalendar:E(c("z"))}),k=E(["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(" "));Z.exports={moduleType:"component",name:"calendars",schema:{traces:{scatter:T,bar:T,box:T,heatmap:T,contour:T,histogram:T,histogram2d:T,histogram2dcontour:T,scatter3d:M,surface:M,mesh3d:M,scattergl:T,ohlc:_,candlestick:_},layout:{calendar:E(["Sets the default calendar system to use for interpreting and","displaying dates throughout the plot."].join(" "))},subplots:{xaxis:{calendar:k},yaxis:{calendar:k},scene:{xaxis:{calendar:k},yaxis:{calendar:k},zaxis:{calendar:k}},polar:{radialaxis:{calendar:k}}}},layoutAttributes:r,handleDefaults:a,handleTraceDefaults:l,CANONICAL_SUNDAY:s,CANONICAL_TICK:i,DFLTRANGE:o,getCal:m,worldCalFmt:h}}}),uae=Ne({"lib/calendars.js"(te,Z){Z.exports=lae()}}),cae=Ne({"lib/index.js"(te,Z){var v=RA();v.register([Ny(),NA(),jM(),m2(),HM(),$x(),YA(),$A(),P2(),fC(),Qx(),HC(),sb(),Qg(),wK(),PK(),NK(),eJ(),aJ(),oJ(),cJ(),pJ(),xJ(),AJ(),BJ(),qJ(),See(),jee(),Qee(),ite(),pte(),_te(),Mte(),jte(),Hte(),Jte(),dre(),_re(),Ere(),Zre(),nne(),lne(),dne(),gne(),wne(),Pne(),zne(),Gne(),uae()]),Z.exports=v}});return cae()})();/*!
 * pad-left <https://github.com/jonschlinkert/pad-left>
 *
 * Copyright (c) 2014-2015, Jon Schlinkert.
 * Licensed under the MIT license.
 *//*!
 * repeat-string <https://github.com/jonschlinkert/repeat-string>
 *
 * Copyright (c) 2014-2015, Jon Schlinkert.
 * Licensed under the MIT License.
 *//*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *//*!
 * The buffer module from node.js, for the browser.
 *
 * @author   Feross Aboukhadijeh <https://feross.org>
 * @license  MIT
 *//*!
 * Determine if an object is a Buffer
 *
 * @author   Feross Aboukhadijeh <https://feross.org>
 * @license  MIT
 *//*! Bundled license information:

native-promise-only/lib/npo.src.js:
  (*! Native Promise Only
      v0.8.1 (c) Kyle Simpson
      MIT License: http://getify.mit-license.org
  *)

polybooljs/index.js:
  (*
   * @copyright 2016 Sean Connelly (@voidqk), http://syntheti.cc
   * @license MIT
   * @preserve Project Home: https://github.com/voidqk/polybooljs
   *)

ieee754/index.js:
  (*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *)

buffer/index.js:
  (*!
   * The buffer module from node.js, for the browser.
   *
   * @author   Feross Aboukhadijeh <https://feross.org>
   * @license  MIT
   *)

safe-buffer/index.js:
  (*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)

assert/build/internal/util/comparisons.js:
  (*!
   * The buffer module from node.js, for the browser.
   *
   * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
   * @license  MIT
   *)

object-assign/index.js:
  (*
  object-assign
  (c) Sindre Sorhus
  @license MIT
  *)

maplibre-gl/dist/maplibre-gl.js:
  (**
   * MapLibre GL JS
   * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v4.7.1/LICENSE.txt
   *)
*/return window.Plotly=S,S})})(I6)),I6.exports}var KX;function K3e(){return KX||(KX=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=L(Y3e()),S=L($3e());function L(Ce){return Ce&&Ce.__esModule?Ce:{default:Ce}}var re=(0,n.default)(S.default),ve=re;e.default=ve})(WO)),WO}var J3e=K3e();const Q3e=ih(J3e);function vK(){const[e,n]=na.useState(()=>localStorage.getItem("theme")||"dark");return na.useEffect(()=>{const L=document.documentElement;e==="dark"?L.classList.add("dark"):L.classList.remove("dark"),localStorage.setItem("theme",e)},[e]),{theme:e,toggleTheme:()=>{n(L=>L==="dark"?"light":"dark")}}}function eTe({sessionId:e}){const{data:n}=UP(e),{theme:S}=vK(),L=na.useMemo(()=>n?n.variables.filter(qn=>qn.type==="real"):[],[n]),[re,ve]=na.useState(""),[Ce,Be]=na.useState(""),[Ge,Ke]=na.useState({}),[dt,gt]=na.useState({}),[Vt,Xt]=na.useState(50),[cr,sr]=na.useState(50),[nr,zr]=na.useState(!1),[Ne,Jr]=na.useState(!1),[pn,Lr]=na.useState("Viridis");na.useEffect(()=>{L.length>=2&&!re&&(ve(L[0].name),Be(L[1].name))},[L,re]),na.useEffect(()=>{if(!n)return;const qn={};n.variables.forEach(ca=>{if(!(ca.name===re||ca.name===Ce)){if(ca.type==="real"&&ca.bounds){const Fn=ca.bounds[0],da=ca.bounds[1];qn[ca.name]={value:(Fn+da)/2,min:Fn,max:da,type:"Real"}}else if(ca.type==="integer"&&ca.bounds){const Fn=ca.bounds[0],da=ca.bounds[1];qn[ca.name]={value:Math.floor((Fn+da)/2),min:Fn,max:da,type:"Integer"}}else if(ca.type==="categorical"&&ca.categories)qn[ca.name]={value:ca.categories[0],categories:ca.categories,type:"Categorical"};else if(ca.type==="discrete"&&ca.allowed_values&&ca.allowed_values.length>0){const Fn=ca.allowed_values;qn[ca.name]={value:Fn[Math.floor(Fn.length/2)],allowed_values:Fn,type:"Discrete"}}}}),Ke(qn),gt(qn)},[re,Ce,n]);const Or=na.useMemo(()=>{if(!re||!Ce)return null;const qn={};return Object.entries(dt).forEach(([Fn,da])=>{Fn!==re&&Fn!==Ce&&(qn[Fn]=da.value)}),{x_var:re,y_var:Ce,fixed_values:qn,grid_resolution:cr,include_experiments:nr,include_suggestions:Ne}},[re,Ce,dt,cr,nr,Ne]),{data:cn,isLoading:$n,error:xn}=B3e(e,Or,!!Or),Wa=na.useCallback((qn,ca)=>{Ke(Fn=>({...Fn,[qn]:{...Fn[qn],value:ca}}))},[]),On=na.useCallback((qn,ca)=>{gt(Fn=>({...Fn,[qn]:{...Fn[qn],value:ca}}))},[]);return L.length<2?lt.jsx("div",{className:"flex items-center justify-center h-96",children:lt.jsx("p",{className:"text-muted-foreground",children:"Need at least two Real (continuous) variables for contour plotting"})}):lt.jsxs("div",{className:"flex flex-col h-full gap-2",children:[lt.jsxs("div",{className:"flex-1 flex flex-col min-h-[550px]",children:[$n&&lt.jsx("div",{className:"flex-1 flex items-center justify-center",children:lt.jsxs("div",{className:"text-center",children:[lt.jsx(ux,{className:"w-8 h-8 animate-spin text-primary mx-auto mb-2"}),lt.jsx("p",{className:"text-sm text-muted-foreground",children:"Generating contour plot..."})]})}),xn&&lt.jsx("div",{className:"flex-1 flex items-center justify-center",children:lt.jsxs("div",{className:"text-center",children:[lt.jsx("p",{className:"text-destructive font-medium",children:"Error loading contour plot"}),lt.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:xn.message})]})}),!$n&&!xn&&cn&&lt.jsx("div",{className:"flex-1 min-h-0",children:lt.jsx(tTe,{data:cn,xAxis:re,yAxis:Ce,showExperiments:nr,showNextPoint:Ne,colormap:pn,theme:S})})]}),lt.jsx("div",{className:"bg-muted/30 rounded-lg p-3 flex-shrink-0",children:lt.jsxs("div",{className:"grid grid-cols-5 gap-3",children:[lt.jsxs("div",{className:"space-y-2",children:[lt.jsx("h3",{className:"font-semibold text-xs uppercase tracking-wide text-muted-foreground border-b pb-1.5",children:"Axes"}),lt.jsxs("div",{children:[lt.jsx("label",{className:"text-xs font-medium block mb-1",children:"X-Axis:"}),lt.jsx("select",{value:re,onChange:qn=>ve(qn.target.value),className:"w-full px-2.5 py-1.5 text-xs bg-background border border-input rounded-md",children:L.map(qn=>lt.jsx("option",{value:qn.name,children:qn.name},qn.name))})]}),lt.jsxs("div",{children:[lt.jsx("label",{className:"text-xs font-medium block mb-1",children:"Y-Axis:"}),lt.jsx("select",{value:Ce,onChange:qn=>Be(qn.target.value),className:"w-full px-2.5 py-1.5 text-xs bg-background border border-input rounded-md",children:L.map(qn=>lt.jsx("option",{value:qn.name,children:qn.name},qn.name))})]})]}),lt.jsxs("div",{className:"space-y-2",children:[lt.jsx("h3",{className:"font-semibold text-xs uppercase tracking-wide text-muted-foreground border-b pb-1.5",children:"Fixed Values"}),lt.jsx("div",{className:"space-y-2 max-h-[120px] overflow-y-auto pr-2",children:Object.entries(Ge).map(([qn,ca])=>lt.jsxs("div",{children:[lt.jsxs("label",{className:"text-xs font-medium block mb-1",children:[qn,":"]}),ca.type==="Real"&&lt.jsxs("div",{children:[lt.jsx("input",{type:"range",min:ca.min,max:ca.max,step:(ca.max-ca.min)/100,value:ca.value,onChange:Fn=>Wa(qn,parseFloat(Fn.target.value)),onMouseUp:Fn=>On(qn,parseFloat(Fn.target.value)),onTouchEnd:Fn=>On(qn,parseFloat(Fn.target.value)),className:"w-full"}),lt.jsx("div",{className:"text-xs text-muted-foreground mt-1",children:ca.value.toFixed(3)})]}),ca.type==="Integer"&&lt.jsx("input",{type:"number",min:ca.min,max:ca.max,step:1,value:ca.value,onChange:Fn=>{const da=parseInt(Fn.target.value);Wa(qn,da),On(qn,da)},className:"w-full px-2 py-1 text-xs bg-background border border-input rounded"}),ca.type==="Categorical"&&lt.jsx("select",{value:ca.value,onChange:Fn=>{Wa(qn,Fn.target.value),On(qn,Fn.target.value)},className:"w-full px-2 py-1 text-xs bg-background border border-input rounded",children:ca.categories?.map(Fn=>lt.jsx("option",{value:Fn,children:Fn},Fn))}),ca.type==="Discrete"&&lt.jsx("select",{value:ca.value,onChange:Fn=>{const da=parseFloat(Fn.target.value);Wa(qn,da),On(qn,da)},className:"w-full px-2 py-1 text-xs bg-background border border-input rounded",children:ca.allowed_values?.map(Fn=>lt.jsx("option",{value:Fn,children:Fn},Fn))})]},qn))})]}),lt.jsxs("div",{className:"space-y-2",children:[lt.jsx("h3",{className:"font-semibold text-xs uppercase tracking-wide text-muted-foreground border-b pb-1.5",children:"Display"}),lt.jsxs("div",{className:"space-y-2",children:[lt.jsxs("label",{className:"flex items-center gap-2 text-xs",children:[lt.jsx("input",{type:"checkbox",checked:nr,onChange:qn=>zr(qn.target.checked),className:"w-3.5 h-3.5 rounded border-gray-300"}),lt.jsx("span",{children:"Show Experimental Points"})]}),lt.jsxs("label",{className:"flex items-center gap-2 text-xs",children:[lt.jsx("input",{type:"checkbox",checked:Ne,onChange:qn=>Jr(qn.target.checked),className:"w-3.5 h-3.5 rounded border-gray-300"}),lt.jsx("span",{children:"Show Next Point"})]})]})]}),lt.jsxs("div",{className:"space-y-2",children:[lt.jsx("h3",{className:"font-semibold text-xs uppercase tracking-wide text-muted-foreground border-b pb-1.5",children:"Colormap"}),lt.jsx("div",{children:lt.jsxs("select",{value:pn,onChange:qn=>Lr(qn.target.value),className:"w-full px-2 py-1 text-xs bg-background border border-input rounded",children:[lt.jsx("option",{value:"Viridis",children:"Viridis"}),lt.jsx("option",{value:"Plasma",children:"Plasma"}),lt.jsx("option",{value:"Inferno",children:"Inferno"}),lt.jsx("option",{value:"Magma",children:"Magma"}),lt.jsx("option",{value:"Cividis",children:"Cividis"}),lt.jsx("option",{value:"Jet",children:"Jet"}),lt.jsx("option",{value:"Hot",children:"Hot"}),lt.jsx("option",{value:"Cool",children:"Cool"}),lt.jsx("option",{value:"RdBu",children:"Red-Blue"}),lt.jsx("option",{value:"YlOrRd",children:"Yellow-Orange-Red"})]})})]}),lt.jsxs("div",{className:"space-y-2",children:[lt.jsx("h3",{className:"font-semibold text-xs uppercase tracking-wide text-muted-foreground border-b pb-1.5",children:"Resolution"}),lt.jsxs("div",{children:[lt.jsx("label",{className:"text-xs font-medium block mb-1",children:"Grid Resolution:"}),lt.jsx("input",{type:"range",min:30,max:150,step:10,value:Vt,onChange:qn=>Xt(parseInt(qn.target.value)),onMouseUp:qn=>sr(parseInt(qn.target.value)),onTouchEnd:qn=>sr(parseInt(qn.target.value)),className:"w-full"}),lt.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:[Vt," × ",Vt]})]})]})]})})]})}function tTe({data:e,xAxis:n,yAxis:S,showExperiments:L,showNextPoint:re,colormap:ve,theme:Ce}){const Be=e.x_grid[0],Ge=e.y_grid.map(Xt=>Xt[0]),Ke=[],dt={type:"contour",x:Be,y:Ge,z:e.predictions,colorscale:ve,colorbar:{title:{text:"Prediction",side:"right"},thickness:20,len:.7},contours:{coloring:"heatmap"},hovertemplate:`${n}: %{x:.3f}<br>${S}: %{y:.3f}<br>Prediction: %{z:.3f}<br><extra></extra>`};if(Ke.push(dt),L&&e.experiments&&e.experiments.x.length>0){const Xt={type:"scatter",mode:"markers",x:e.experiments.x,y:e.experiments.y,marker:{color:"white",size:8,line:{color:"black",width:2},symbol:"circle"},name:"Experiments",hovertemplate:`${n}: %{x:.3f}<br>${S}: %{y:.3f}<br>Output: %{text}<br><extra></extra>`,text:e.experiments.output.map(cr=>cr.toFixed(3))};Ke.push(Xt)}if(re&&e.suggestions&&e.suggestions.x.length>0){const Xt={type:"scatter",mode:"markers",x:e.suggestions.x,y:e.suggestions.y,marker:{color:"red",size:12,line:{color:"darkred",width:2},symbol:"diamond"},name:"Next Point",hovertemplate:`${n}: %{x:.3f}<br>${S}: %{y:.3f}<br><extra></extra>`};Ke.push(Xt)}const gt=na.useMemo(()=>({title:{text:"Contour Plot of Model Predictions",font:{size:16,family:"Arial, sans-serif"}},xaxis:{title:{text:n,font:{size:14}},range:e.x_bounds,showgrid:!0,zeroline:!1},yaxis:{title:{text:S,font:{size:14}},range:e.y_bounds,showgrid:!0,zeroline:!1},autosize:!0,margin:{l:70,r:110,t:60,b:50},hovermode:"closest",showlegend:!!(L&&e.experiments||re&&e.suggestions),legend:{x:1.05,y:1,xanchor:"left",yanchor:"top",bgcolor:Ce==="dark"?"rgba(40, 46, 56, 0.9)":"rgba(255, 255, 255, 0.9)",bordercolor:Ce==="dark"?"hsl(220 13% 24%)":"#ccc",borderwidth:1,font:{color:Ce==="dark"?"hsl(210 40% 98%)":"hsl(222.2 84% 4.9%)"}},plot_bgcolor:Ce==="dark"?"hsl(220 13% 13%)":"#fafafa",paper_bgcolor:Ce==="dark"?"hsl(220 13% 16%)":"white",font:{color:Ce==="dark"?"hsl(210 40% 98%)":"hsl(222.2 84% 4.9%)"}}),[e.x_bounds,e.y_bounds,n,S,L,re,e.experiments,e.suggestions,Ce]),Vt={responsive:!0,displayModeBar:!0,displaylogo:!1,modeBarButtonsToRemove:["lasso2d","select2d"],toImageButtonOptions:{format:"png",filename:`contour_${n}_${S}`,height:600,width:800,scale:2}};return lt.jsx("div",{className:"w-full h-full",children:lt.jsx(Q3e,{data:Ke,layout:gt,config:Vt,style:{width:"100%",height:"100%"},useResizeHandler:!0})})}function rTe({sessionId:e,embedded:n=!1}){const[S,L]=na.useState("parity"),[re,ve]=na.useState("RMSE"),[Ce,Be]=na.useState("1.96"),[Ge,Ke]=na.useState(!1),dt=lt.jsxs(lt.Fragment,{children:[lt.jsx("div",{className:"p-3 border-b border-border bg-muted/30",children:lt.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[lt.jsx("button",{onClick:()=>L("parity"),className:`px-3 py-1.5 rounded-md text-xs font-medium transition-colors ${S==="parity"?"bg-primary text-primary-foreground":"bg-muted hover:bg-muted/80"}`,children:"Plot Parity"}),lt.jsx("button",{onClick:()=>L("metrics"),className:`px-3 py-1.5 rounded-md text-xs font-medium transition-colors ${S==="metrics"?"bg-primary text-primary-foreground":"bg-muted hover:bg-muted/80"}`,children:"Plot Metrics"}),lt.jsx("button",{onClick:()=>L("qq"),className:`px-3 py-1.5 rounded-md text-xs font-medium transition-colors ${S==="qq"?"bg-primary text-primary-foreground":"bg-muted hover:bg-muted/80"}`,children:"Plot Q-Q"}),lt.jsx("button",{onClick:()=>L("calibration"),className:`px-3 py-1.5 rounded-md text-xs font-medium transition-colors ${S==="calibration"?"bg-primary text-primary-foreground":"bg-muted hover:bg-muted/80"}`,children:"Plot Calibration"}),lt.jsx("button",{onClick:()=>L("contour"),className:`px-3 py-1.5 rounded-md text-xs font-medium transition-colors ${S==="contour"?"bg-primary text-primary-foreground":"bg-muted hover:bg-muted/80"}`,children:"Plot Contour"}),S==="metrics"&&lt.jsxs("select",{value:re,onChange:gt=>ve(gt.target.value),className:"px-2.5 py-1.5 bg-background border border-input rounded-md text-xs",children:[lt.jsx("option",{value:"RMSE",children:"RMSE"}),lt.jsx("option",{value:"MAE",children:"MAE"}),lt.jsx("option",{value:"MAPE",children:"MAPE"}),lt.jsx("option",{value:"R2",children:"R²"})]}),S==="parity"&&lt.jsxs(lt.Fragment,{children:[lt.jsx("span",{className:"flex items-center text-xs text-muted-foreground ml-2",children:"Error bars:"}),lt.jsxs("select",{value:Ce,onChange:gt=>Be(gt.target.value),className:"px-2.5 py-1.5 bg-background border border-input rounded-md text-xs",children:[lt.jsx("option",{value:"None",children:"None"}),lt.jsx("option",{value:"1.0",children:"1.0σ (68%)"}),lt.jsx("option",{value:"1.96",children:"1.96σ (95%)"}),lt.jsx("option",{value:"2.0",children:"2.0σ (95.4%)"}),lt.jsx("option",{value:"2.58",children:"2.58σ (99%)"}),lt.jsx("option",{value:"3.0",children:"3.0σ (99.7%)"})]})]})]})}),(S==="parity"||S==="qq"||S==="calibration")&&lt.jsx("div",{className:"px-3 py-1.5 border-b border-border bg-muted/20",children:lt.jsxs("label",{className:"flex items-center gap-2 text-xs",children:[lt.jsx("input",{type:"checkbox",checked:Ge,onChange:gt=>Ke(gt.target.checked),className:"w-3.5 h-3.5 rounded border-gray-300"}),lt.jsx("span",{children:"Use Calibrated Results"})]})}),lt.jsxs("div",{className:"flex-1 overflow-auto p-4",children:[S==="parity"&&lt.jsx(H3e,{sessionId:e,useCalibrated:Ge,sigmaMultiplier:Ce}),S==="metrics"&&lt.jsx(G3e,{sessionId:e,selectedMetric:re,cvSplits:5}),S==="qq"&&lt.jsx(X3e,{sessionId:e,useCalibrated:Ge}),S==="calibration"&&lt.jsx(W3e,{sessionId:e,useCalibrated:Ge}),lt.jsx("div",{className:S==="contour"?"block h-full":"hidden",children:lt.jsx(eTe,{sessionId:e})})]}),S==="contour"&&lt.jsx("div",{className:"border-t border-border bg-muted/30 p-3",children:lt.jsx("div",{className:"text-xs text-muted-foreground text-center",children:"Use the panel on the right to customize contour plot options"})})]});return n?lt.jsx("div",{className:"h-full flex flex-col bg-card",children:dt}):null}function nTe({tabs:e,defaultTab:n,className:S=""}){const[L,re]=na.useState(n||e[0]?.id);return lt.jsxs("div",{className:`flex flex-col h-full ${S}`,children:[lt.jsx("div",{className:"flex border-b bg-muted/30",children:e.map(ve=>lt.jsxs("button",{onClick:()=>re(ve.id),className:`
              px-6 py-3 text-sm font-medium transition-all relative
              ${L===ve.id?"text-foreground bg-card":"text-muted-foreground hover:text-foreground hover:bg-muted/50"}
            `,children:[ve.label,L===ve.id&&lt.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-0.5 bg-primary"})]},ve.id))}),lt.jsx("div",{className:"flex-1 overflow-auto bg-card",children:e.map(ve=>lt.jsx("div",{className:L===ve.id?"h-full":"hidden",children:ve.content},ve.id))})]})}function aTe({sessionId:e,metadata:n,onSave:S,onCancel:L}){const[re,ve]=na.useState(n.name||""),[Ce,Be]=na.useState(n.description||""),[Ge,Ke]=na.useState(n.tags?.join(", ")||""),[dt,gt]=na.useState(n.author||""),[Vt,Xt]=na.useState(!1);async function cr(){Xt(!0);try{const sr=Ge.split(",").map(nr=>nr.trim()).filter(nr=>nr);await S({name:re.trim()||void 0,description:Ce.trim()||void 0,tags:sr.length>0?sr:void 0,author:dt.trim()||void 0})}finally{Xt(!1)}}return lt.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:L,children:lt.jsxs("div",{className:"bg-card border border-border rounded-lg shadow-lg w-full max-w-xl",onClick:sr=>sr.stopPropagation(),children:[lt.jsxs("div",{className:"border-b border-border p-4 flex items-center justify-between",children:[lt.jsx("h3",{className:"text-lg font-semibold",children:"Session Metadata"}),lt.jsx("button",{onClick:L,className:"p-1.5 rounded hover:bg-accent",children:lt.jsx(qP,{className:"w-4 h-4"})})]}),lt.jsxs("div",{className:"p-6 space-y-4",children:[lt.jsxs("div",{className:"space-y-1",children:[lt.jsx("label",{className:"block text-sm font-medium",children:"Session Name"}),lt.jsx("input",{type:"text",value:re,onChange:sr=>ve(sr.target.value),placeholder:"My Optimization Session",className:"w-full px-3 py-2 text-sm rounded-md border border-border bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-primary/50"})]}),lt.jsxs("div",{className:"space-y-1",children:[lt.jsx("label",{className:"block text-sm font-medium",children:"Description"}),lt.jsx("textarea",{value:Ce,onChange:sr=>Be(sr.target.value),placeholder:"Enter a brief description of this optimization session...",rows:4,className:"w-full px-3 py-2 text-sm rounded-md border border-border bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-primary/50 resize-y"})]}),lt.jsxs("div",{className:"space-y-1",children:[lt.jsx("label",{className:"block text-sm font-medium",children:"Tags (comma-separated)"}),lt.jsx("input",{type:"text",value:Ge,onChange:sr=>Ke(sr.target.value),placeholder:"catalyst, optimization, batch-1",className:"w-full px-3 py-2 text-sm rounded-md border border-border bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-primary/50"})]}),lt.jsxs("div",{className:"space-y-1",children:[lt.jsx("label",{className:"block text-sm font-medium",children:"Author"}),lt.jsx("input",{type:"text",value:dt,onChange:sr=>gt(sr.target.value),placeholder:"Your name",className:"w-full px-3 py-2 text-sm rounded-md border border-border bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-primary/50"})]}),lt.jsxs("div",{className:"space-y-1",children:[lt.jsx("label",{className:"block text-sm font-medium text-muted-foreground",children:"Session ID"}),lt.jsxs("div",{className:"px-3 py-2 text-sm rounded-md border border-border bg-muted text-foreground font-mono",children:[e.substring(0,16),"..."]})]})]}),lt.jsxs("div",{className:"border-t border-border p-4 flex justify-end gap-3",children:[lt.jsx("button",{onClick:L,disabled:Vt,className:"px-4 py-2 text-sm rounded-md border border-border hover:bg-accent disabled:opacity-50",children:"Cancel"}),lt.jsx("button",{onClick:cr,disabled:Vt,className:"px-4 py-2 text-sm rounded-md bg-primary text-primary-foreground hover:bg-primary/90 disabled:opacity-50",children:Vt?"Saving...":"Save"})]})]})})}function iTe(){const[e,n]=na.useState(null),[S,L]=na.useState(!1),[re,ve]=na.useState(!1),[Ce,Be]=na.useState(!1),[Ge,Ke]=na.useState(!1),[dt,gt]=na.useState(!1),[Vt,Xt]=na.useState(null),cr=na.useRef(null),sr=na.useRef(null),[nr,zr]=na.useState(""),Ne=ele(),Jr=nle(),pn=ale(),Lr=tle(e),{data:Or,error:cn}=Jse(e),{theme:$n,toggleTheme:xn}=vK(),{isVisualizationOpen:Wa,closeVisualization:On,sessionId:qn}=hW(),{lockStatus:ca}=ile(e,fi=>{L(fi)}),[Fn,da]=na.useState([]);na.useEffect(()=>{if(!e)return;async function fi(){try{const bo=await fetch(`/api/v1/sessions/${e}/experiments/staged`);if(bo.ok){const Hs=await bo.json();if(Hs.experiments&&Hs.experiments.length>0){const qo=Hs.reason||"Staged",Di=Hs.experiments.map(js=>({...js,_reason:qo}));da(Di),console.log(`✓ Restored ${Hs.experiments.length} staged experiments from API (reason: ${qo})`);return}}const Ll=await fetch(`/api/v1/sessions/${e}/audit?entry_type=acquisition_locked`);if(!Ll.ok)return;const Mo=await Ll.json();if(Mo.entries&&Mo.entries.length>0){const Hs=Mo.entries[Mo.entries.length-1],qo=Hs.parameters?.suggestions||[];if(qo.length>0){const Di=Hs.parameters?.strategy||"Acquisition",js=qo.map(Ha=>({...Ha,_reason:Di,Iteration:Hs.parameters?.iteration}));da(js),console.log(`✓ Restored ${qo.length} pending suggestions from audit log (fallback)`)}}}catch(bo){console.error("Failed to restore staged experiments:",bo)}}fi()},[e]),na.useEffect(()=>{const fi=new URLSearchParams(window.location.search),bo=fi.get("session");bo&&(sr.current=bo,n(bo),Ke(!0),console.log(`✓ Loaded session from URL: ${bo}`)),fi.get("mode")==="monitor"&&(L(!0),console.log("✓ Monitoring mode enabled"))},[]),na.useEffect(()=>{sr.current||fetch("/api/v1/recovery/list").then(fi=>fi.json()).then(fi=>{fi.recoveries&&fi.recoveries.length>0&&(Xt(fi.recoveries[0]),gt(!0),console.log("✓ Found recovery session:",fi.recoveries[0]))}).catch(fi=>console.warn("Failed to check for recovery sessions:",fi))},[]),na.useEffect(()=>{cn&&e&&!Ge?(Il.error("Session not found. Please create a new session."),qa()):cn&&Ge&&console.warn("Session from URL not found or error loading:",cn)},[cn,e,Ge]),na.useEffect(()=>{if(!e||!Or||Or.variable_count===0&&Or.experiment_count===0)return;const fi=setInterval(()=>{fetch(`/api/v1/sessions/${e}/backup`,{method:"POST"}).then(()=>console.debug("Recovery backup saved")).catch(bo=>console.warn("Recovery backup failed:",bo))},3e4);return()=>clearInterval(fi)},[e,Or]),na.useEffect(()=>{if(!e)return;const fi=bo=>{if(Or&&(Or.variable_count>0||Or.experiment_count>0))return bo.preventDefault(),bo.returnValue="You have unsaved changes. Are you sure you want to leave?",bo.returnValue};return window.addEventListener("beforeunload",fi),()=>window.removeEventListener("beforeunload",fi)},[e,Or]);const ea=async()=>{try{const fi=await Ne.mutateAsync({ttl_hours:24});n(fi.session_id),Il.success("Session created successfully!"),ve(!0)}catch(fi){Il.error(fi.response?.data?.detail||"Failed to create session"),console.error("Error creating session:",fi)}},qa=()=>{rle(),n(null),Il.info("Session cleared")},Ri=async()=>{if(e)try{await Jr.mutateAsync({sessionId:e,serverSide:!1}),fetch(`/api/v1/sessions/${e}/backup`,{method:"DELETE"}).then(()=>console.log("Recovery backup cleared after save")).catch(fi=>console.warn("Failed to clear recovery backup:",fi)),Il.success("Session saved to Downloads folder!")}catch(fi){Il.error("Failed to save session"),console.error("Error exporting session:",fi)}},mi=()=>{cr.current?.click()},Io=async fi=>{const bo=fi.target.files?.[0];if(bo)try{const Ll=await pn.mutateAsync(bo);n(Ll.session_id),Il.success("Session imported successfully!"),cr.current&&(cr.current.value="")}catch(Ll){Il.error(Ll.response?.data?.detail||"Failed to import session"),console.error("Error importing session:",Ll)}},ya=async()=>{if(Vt)try{const fi=await fetch(`/api/v1/recovery/${Vt.session_id}/restore`,{method:"POST"});if(!fi.ok)throw new Error("Failed to restore recovery session");const bo=await fi.json();n(bo.session_id),gt(!1),Xt(null),Il.success("Session restored from recovery backup!")}catch(fi){Il.error("Failed to restore recovery session"),console.error("Error restoring recovery:",fi)}},Wn=async()=>{if(Vt)try{await fetch(`/api/v1/sessions/${Vt.session_id}/backup`,{method:"DELETE"}),gt(!1),Xt(null),Il.info("Recovery session discarded")}catch(fi){console.error("Error dismissing recovery:",fi),gt(!1),Xt(null)}},Ei=async()=>{if(e)try{const fi=await fetch(`/api/v1/sessions/${e}/audit/export`);if(!fi.ok)throw new Error("Failed to export audit log");const bo=await fi.blob(),Ll=window.URL.createObjectURL(bo),Mo=document.createElement("a");Mo.href=Ll,Mo.download=`audit_log_${e.substring(0,8)}.md`,document.body.appendChild(Mo),Mo.click(),window.URL.revokeObjectURL(Ll),document.body.removeChild(Mo),Il.success("Audit log exported successfully!")}catch(fi){Il.error("Failed to export audit log"),console.error("Error exporting audit log:",fi)}},$i=async()=>{if(e)try{await navigator.clipboard.writeText(e),Be(!0),Il.success("Session ID copied to clipboard!"),setTimeout(()=>Be(!1),2e3)}catch(fi){Il.error("Failed to copy session ID"),console.error("Error copying session ID:",fi)}},to=()=>{const fi=nr.trim();fi&&(n(fi),Ke(!0),zr(""))};return console.log("=== Render State ==="),console.log("sessionId:",e),console.log("isMonitoringMode:",S),console.log("Should show monitoring:",S&&e),lt.jsxs("div",{className:"h-screen bg-background flex flex-col overflow-hidden",children:[dt&&Vt&&lt.jsx("div",{className:"bg-yellow-50 dark:bg-yellow-900/20 border-b border-yellow-200 dark:border-yellow-800",children:lt.jsx("div",{className:"max-w-7xl mx-auto px-6 py-4",children:lt.jsxs("div",{className:"flex items-start justify-between",children:[lt.jsxs("div",{className:"flex-1",children:[lt.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[lt.jsx("svg",{className:"w-5 h-5 text-yellow-600 dark:text-yellow-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:lt.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),lt.jsx("h3",{className:"text-sm font-semibold text-yellow-900 dark:text-yellow-100",children:"Unsaved work detected"})]}),lt.jsxs("p",{className:"text-sm text-yellow-800 dark:text-yellow-200 mb-2",children:["We found a session from ",new Date(Vt.backup_time).toLocaleString()," that wasn't saved. Would you like to restore it?"]}),lt.jsxs("div",{className:"text-xs text-yellow-700 dark:text-yellow-300 space-y-1",children:[lt.jsxs("div",{children:[lt.jsx("strong",{children:"Session:"})," ",Vt.session_name||"Untitled Session"]}),lt.jsxs("div",{children:[lt.jsx("strong",{children:"Data:"})," ",Vt.n_variables," variables, ",Vt.n_experiments," experiments",Vt.model_trained&&", trained model"]})]})]}),lt.jsxs("div",{className:"flex gap-2 ml-4",children:[lt.jsx("button",{onClick:ya,className:"px-4 py-2 bg-yellow-600 hover:bg-yellow-700 text-white text-sm font-medium rounded-md transition-colors",children:"Restore Session"}),lt.jsx("button",{onClick:Wn,className:"px-4 py-2 bg-gray-200 hover:bg-gray-300 dark:bg-gray-700 dark:hover:bg-gray-600 text-gray-800 dark:text-gray-200 text-sm font-medium rounded-md transition-colors",children:"Discard"})]})]})})}),S&&e?lt.jsx(due,{sessionId:e,pollingInterval:9e4}):lt.jsxs(lt.Fragment,{children:[lt.jsx("header",{className:"border-b bg-card px-6 py-1 flex-shrink-0",children:lt.jsxs("div",{className:"flex items-center justify-between",children:[lt.jsxs("div",{className:"flex items-center gap-4",children:[lt.jsxs("div",{className:"flex flex-col gap-0.5",children:[lt.jsx("img",{src:$n==="dark"?"/NEW_LOGO_DARK.png":"/NEW_LOGO_LIGHT.png",alt:"ALchemist",className:"h-auto",style:{width:"250px"}}),lt.jsx("p",{className:"text-xs text-muted-foreground",children:"Active Learning Toolkit for Chemical and Materials Research"})]}),lt.jsx("button",{onClick:xn,className:"p-2 rounded-md hover:bg-accent transition-colors",title:`Switch to ${$n==="dark"?"light":"dark"} mode`,children:$n==="dark"?lt.jsx(Gle,{className:"h-5 w-5 text-muted-foreground hover:text-foreground"}):lt.jsx(Vle,{className:"h-5 w-5 text-muted-foreground hover:text-foreground"})})]}),e?lt.jsxs("div",{className:"flex items-center gap-3",children:[lt.jsxs("div",{className:"flex items-center gap-2",children:[lt.jsxs("div",{className:"text-sm text-muted-foreground",children:[lt.jsx("code",{className:"bg-muted px-2 py-1 rounded text-xs",children:e.substring(0,8)}),Or&&lt.jsxs("span",{className:"ml-2",children:[Or.variable_count,"V · ",Or.experiment_count,"E"]}),ca?.locked&&lt.jsxs("span",{className:"ml-2 inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs bg-blue-500/10 text-blue-500 border border-blue-500/20",children:[lt.jsx("svg",{className:"h-3 w-3",fill:"currentColor",viewBox:"0 0 20 20",children:lt.jsx("path",{fillRule:"evenodd",d:"M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z",clipRule:"evenodd"})}),ca.locked_by]})]}),lt.jsx("button",{onClick:$i,className:"p-1.5 rounded hover:bg-accent transition-colors border border-transparent hover:border-border",title:"Copy full session ID to clipboard",children:Ce?lt.jsx(zle,{className:"h-4 w-4 text-green-500"}):lt.jsx(Ule,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"})})]}),lt.jsx("button",{onClick:()=>ve(!0),className:"text-xs text-muted-foreground hover:text-foreground px-2 py-1 rounded hover:bg-accent",title:"Edit session metadata",children:"Edit Info"}),lt.jsx("button",{onClick:Ei,className:"text-xs text-muted-foreground hover:text-foreground px-2 py-1 rounded hover:bg-accent",title:"Export audit log as markdown",children:"Export Log"}),lt.jsx("button",{onClick:Ri,disabled:Jr.isPending,className:"text-xs bg-primary text-primary-foreground px-3 py-1.5 rounded hover:bg-primary/90 transition-colors disabled:opacity-50",children:"Save"}),lt.jsx("button",{onClick:qa,className:"text-xs text-destructive hover:text-destructive/80 px-3 py-1.5 border border-destructive/30 rounded hover:bg-destructive/10 transition-colors",children:"Clear"})]}):lt.jsxs("div",{className:"flex gap-2",children:[lt.jsx("button",{onClick:ea,disabled:Ne.isPending,className:"text-sm bg-primary text-primary-foreground px-4 py-2 rounded hover:bg-primary/90 disabled:opacity-50",children:Ne.isPending?"Creating...":"New Session"}),lt.jsx("button",{onClick:mi,disabled:pn.isPending,className:"text-sm bg-secondary text-secondary-foreground px-4 py-2 rounded hover:bg-secondary/90 disabled:opacity-50",children:pn.isPending?"Loading...":"Load Session"}),lt.jsx("input",{ref:cr,type:"file",accept:".json",onChange:Io,className:"hidden"}),lt.jsxs("div",{className:"flex gap-2 items-center ml-4 pl-4 border-l border-border",children:[lt.jsx("input",{type:"text",value:nr,onChange:fi=>zr(fi.target.value),onKeyDown:fi=>fi.key==="Enter"&&to(),placeholder:"Paste session ID...",className:"text-sm px-3 py-2 rounded border border-input bg-background w-64"}),lt.jsx("button",{onClick:to,disabled:!nr.trim(),className:"text-sm bg-accent text-accent-foreground px-4 py-2 rounded hover:bg-accent/80 disabled:opacity-50",children:"Join"})]})]})]})}),e?lt.jsxs("div",{className:"flex-1 flex overflow-hidden",children:[lt.jsxs("div",{className:"w-[580px] flex-shrink-0 overflow-y-auto border-r bg-card p-4 space-y-4",children:[lt.jsx(yle,{sessionId:e}),lt.jsx($le,{sessionId:e,pendingSuggestions:Fn,onStageSuggestions:fi=>da(fi)}),lt.jsx(Qle,{sessionId:e,onStageSuggestions:fi=>da(fi)}),lt.jsx(sue,{sessionId:e,onStageSuggestions:fi=>da(fi)})]}),lt.jsx("div",{className:"flex-1 flex flex-col bg-background",children:Wa&&qn?lt.jsxs(lt.Fragment,{children:[lt.jsxs("div",{className:"border-b bg-card px-4 py-3 flex items-center justify-between",children:[lt.jsx("h3",{className:"font-semibold",children:"Model Visualizations"}),lt.jsx("button",{onClick:On,className:"p-1 rounded hover:bg-accent transition-colors",title:"Close visualizations",children:lt.jsx(qP,{className:"h-4 w-4"})})]}),lt.jsx("div",{className:"flex-1 overflow-auto",children:lt.jsx(rTe,{sessionId:qn,embedded:!0})})]}):lt.jsx("div",{className:"flex-1 flex items-center justify-center p-6",children:lt.jsxs("div",{className:"text-center text-muted-foreground",children:[lt.jsx("div",{className:"text-6xl mb-4",children:"📊"}),lt.jsx("p",{className:"text-lg font-medium mb-2",children:"Visualization Panel"}),lt.jsx("p",{className:"text-sm",children:"Train a model to see visualizations here"}),lt.jsx("p",{className:"text-xs mt-2 text-muted-foreground/60",children:"Plots will be embedded in this panel"})]})})}),lt.jsx("div",{className:"w-[320px] flex-shrink-0 border-l bg-card",children:lt.jsx(nTe,{tabs:[{id:"model",label:"Model",content:lt.jsx(uue,{sessionId:e})},{id:"acquisition",label:"Acquisition",content:lt.jsx(hue,{sessionId:e,modelBackend:Or?.model_trained?Or.model_backend:null,pendingSuggestions:Fn,onStageSuggestions:fi=>da(fi)})}],defaultTab:"model"})})]}):lt.jsx("div",{className:"flex-1 flex items-center justify-center bg-background",children:lt.jsxs("div",{className:"text-center max-w-md",children:[lt.jsx("div",{className:"text-6xl mb-4",children:"🧪"}),lt.jsx("h2",{className:"text-2xl font-bold mb-4",children:"Welcome to ALchemist"}),lt.jsx("p",{className:"text-muted-foreground mb-6",children:"Create a new session or load a previously saved session to begin your optimization workflow."})]})})]}),lt.jsx(QX,{position:"top-right",richColors:!0}),re&&e&&Or&&lt.jsx(aTe,{sessionId:e,metadata:Or.metadata||{},onSave:async fi=>{try{await Lr.mutateAsync(fi),Il.success("Session metadata updated"),ve(!1)}catch(bo){Il.error("Failed to update metadata: "+(bo?.message||String(bo)))}},onCancel:()=>ve(!1)})]})}function oTe(){return lt.jsx(doe,{children:lt.jsx(voe,{children:lt.jsx(iTe,{})})})}tie.createRoot(document.getElementById("root")).render(lt.jsx(na.StrictMode,{children:lt.jsx(oTe,{})}));
